-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #5988 Button Group Item new design Fixes #5988 * #5988 fix disabled styles, add flex styles and update screenshots Fixes #5988 * #5988 - fix tests * #5988 - fix postcss * #5988 - update screenshots * fix toolbox subtype paddings
- Loading branch information
Showing
13 changed files
with
99 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 69 additions & 52 deletions
121
packages/survey-creator-core/src/property-grid-theme/blocks/spg-buttongroup.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,88 @@ | ||
.spg-root-modern { | ||
.sv-button-group { | ||
border: 1px solid var(--ctr-button-group-item-border-color, $border); | ||
transition: box-shadow $creator-transition-duration, border-color $creator-transition-duration, border $creator-transition-duration; | ||
} | ||
.spg-button-group { | ||
position: relative; | ||
display: flex; | ||
padding: var(--ctr-button-group-padding, 0px); | ||
align-items: center; | ||
align-self: stretch; | ||
|
||
.sv-button-group:focus-within { | ||
box-shadow: 0 0 0 1px var(--ctr-button-group-border-color-focused, $primary); | ||
border-color: var(--ctr-button-group-border-color-focused, $primary); | ||
border-radius: var(--ctr-button-group-corner-radius, 0px); | ||
box-shadow: inset 0 0 0 var(--ctr-button-group-border-width, 0px) var(--ctr-button-group-border-color, $border); | ||
background-color: var(--ctr-button-group-background-color, $background); | ||
|
||
&::after { | ||
content: ""; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
box-shadow: inset 0 0 0 var(--ctr-button-group-border-width-focused, 2px) transparent; | ||
pointer-events: none; | ||
transition: box-shadow $creator-transition-duration; | ||
} | ||
} | ||
|
||
.sv-button-group__item { | ||
@include ctrDefaultFont; | ||
background: var(--ctr-button-group-item-background-color, $background); | ||
transition: background $creator-transition-duration, background-color $creator-transition-duration, color $creator-transition-duration; | ||
|
||
&:not(:last-of-type) { | ||
border-right: 1px solid var(--ctr-button-group-item-border-color, $border); | ||
} | ||
} | ||
.spg-button-group:focus-within::after { | ||
box-shadow: inset 0 0 0 var(--ctr-button-group-border-width-focused, 2px) var(--ctr-button-group-border-color-focused, $primary); | ||
} | ||
|
||
.sv-button-group__item--hover:hover { | ||
background-color: var(--ctr-button-group-item-background-color-hovered, $background-dim); | ||
} | ||
.spg-button-group__item { | ||
@include ctrDefaultFont; | ||
color: var(--ctr-button-group-item-text-color, rgba(0, 0, 0, 0.91)); | ||
|
||
.sv-button-group__item-icon { | ||
use { | ||
fill: var(--ctr-button-group-item-icon-color, $foreground-light); | ||
} | ||
} | ||
display: flex; | ||
padding: var(--ctr-button-group-item-padding-vertical, calcSize(1.5)) var(--ctr-button-group-item-padding-horizontal, calcSize(2)); | ||
justify-content: center; | ||
align-items: center; | ||
align-self: stretch; | ||
flex-basis: 0; | ||
flex-grow: 1; | ||
|
||
.sv-button-group__item--selected { | ||
@include ctrDefaultBoldFont; | ||
color: var(--ctr-button-group-item-text-color-selected, $primary); | ||
border-radius: var(--ctr-button-group-item-corner-radius, 0px); | ||
box-shadow: inset 0 0 0 var(--ctr-button-group-item-border-width, 1px) var(--ctr-button-group-item-border-color, $border); | ||
background-color: var(--ctr-button-group-item-background-color, $background); | ||
|
||
.sv-button-group__item-icon use { | ||
fill: var(--ctr-button-group-item-icon-color-selected, $primary); | ||
} | ||
transition: background $creator-transition-duration, background-color $creator-transition-duration, color $creator-transition-duration; | ||
|
||
&:hover { | ||
background-color: var(--ctr-button-group-item-background-color-hovered, $background); | ||
} | ||
&:not(:last-of-type) { | ||
margin-right: var(--ctr-button-group-gap, -1px); | ||
} | ||
} | ||
|
||
.sv-button-group__item--disabled { | ||
color: var(--ctr-button-group-item-text-color-disabled, $foreground); | ||
.spg-button-group__item--hover:hover { | ||
background-color: var(--ctr-button-group-item-background-color-hovered, $background-dim); | ||
} | ||
|
||
.sv-button-group__item-icon use { | ||
fill: var(--ctr-button-group-item-text-color-disabled, $foreground); | ||
} | ||
.spg-button-group__item-icon { | ||
use { | ||
fill: var(--ctr-button-group-item-icon-color, $foreground-light); | ||
} | ||
} | ||
|
||
&:hover { | ||
background-color: var(--ctr-button-group-item-background-color-disabled, $background); | ||
} | ||
.spg-button-group__item--selected { | ||
@include ctrDefaultBoldFont; | ||
color: var(--ctr-button-group-item-text-color-selected, $primary); | ||
box-shadow: inset 0 0 0 var(--ctr-button-group-item-border-width-selected, 1px) var(--ctr-button-group-item-border-color, $border); | ||
background: var(--ctr-button-group-item-background-color-selected, $background); | ||
.spg-button-group__item-icon use { | ||
fill: var(--ctr-button-group-item-icon-color-selected, $primary); | ||
} | ||
|
||
.sv-button-group:focus-within { | ||
box-shadow: 0 0 0 1px var(--ctr-button-group-border-color-focused, $primary); | ||
border-color: var(--ctr-button-group-border-color-focused, $primary); | ||
&:hover { | ||
background-color: var(--ctr-button-group-item-background-color-hovered, $background); | ||
} | ||
} | ||
|
||
.spg-root-modern.spg-root--one-category { | ||
height: 100%; | ||
background-color: var(--ctr-property-grid-form-background-color, $background-dim); | ||
border-right: unset; | ||
|
||
.spg-page.spg-body__page { | ||
box-shadow: unset; | ||
.spg-button-group__item--disabled { | ||
color: var(--ctr-button-group-item-text-color-disabled, $foreground); | ||
background: var(--ctr-button-group-item-background-color-disabled, $background-dim); | ||
.spg-button-group__item-icon use { | ||
fill: var(--ctr-button-group-item-text-color-disabled, $foreground); | ||
} | ||
.spg-button-group__item-caption { | ||
opacity: var(--ctr-button-group-item-text-opacity-disabled, 0.25); | ||
} | ||
&:hover { | ||
background-color: var(--ctr-button-group-item-background-color-disabled, $background-dim); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+41 Bytes
(100%)
visualRegressionTests/tests/designer/etalons/side-bar-search-question-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2 Bytes
(100%)
...ts/designer/etalons/side-bar-tabbed-property-grid-theme-appearance-advanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-347 Bytes
(98%)
...ionTests/tests/designer/etalons/side-bar-tabbed-property-grid-theme-general.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-865 Bytes
(100%)
...ssionTests/tests/designer/etalons/theme-editor-property-grid-advanced-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+127 Bytes
(100%)
...ionTests/tests/designer/etalons/theme-editor-property-grid-background-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+171 Bytes
(100%)
...ests/tests/designer/etalons/theme-editor-property-grid-general-group-mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-2.22 KB
(98%)
...sts/tests/designer/etalons/theme-editor-property-grid-header-group-advanced.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1.6 KB
(100%)
...ressionTests/tests/designer/etalons/theme-editor-property-grid-header-group.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters