@react-ui-org/react-ui 0.44.1 → 0.47.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. package/CONTRIBUTING.md +7 -0
  2. package/README.md +15 -16
  3. package/dist/lib.development.js +271 -415
  4. package/dist/lib.js +1 -1
  5. package/package.json +11 -13
  6. package/src/lib/components/Alert/Alert.jsx +45 -44
  7. package/src/lib/components/Alert/Alert.scss +48 -48
  8. package/src/lib/components/Alert/README.mdx +2 -5
  9. package/src/lib/components/Alert/_settings.scss +4 -4
  10. package/src/lib/components/Alert/_theme.scss +50 -50
  11. package/src/lib/components/Alert/_tools.scss +6 -6
  12. package/src/lib/components/Badge/Badge.jsx +9 -11
  13. package/src/lib/components/Badge/Badge.scss +57 -57
  14. package/src/lib/components/Button/Button.jsx +14 -13
  15. package/src/lib/components/Button/Button.scss +2 -2
  16. package/src/lib/components/Button/README.mdx +11 -6
  17. package/src/lib/components/Button/_base.scss +69 -69
  18. package/src/lib/components/Button/_priorities.scss +49 -49
  19. package/src/lib/components/Button/_settings.scss +10 -10
  20. package/src/lib/components/Button/_theme.scss +18 -15
  21. package/src/lib/components/Button/_tools.scss +98 -100
  22. package/src/lib/components/Button/helpers/getRootLabelVisibilityClassName.js +4 -4
  23. package/src/lib/components/ButtonGroup/ButtonGroup.jsx +41 -25
  24. package/src/lib/components/ButtonGroup/ButtonGroup.scss +3 -3
  25. package/src/lib/components/ButtonGroup/README.mdx +1 -1
  26. package/src/lib/components/Card/Card.jsx +10 -9
  27. package/src/lib/components/Card/Card.scss +28 -28
  28. package/src/lib/components/Card/CardBody.jsx +17 -12
  29. package/src/lib/components/Card/CardFooter.jsx +22 -9
  30. package/src/lib/components/Card/_theme.scss +50 -50
  31. package/src/lib/components/Card/_tools.scss +6 -6
  32. package/src/lib/components/CheckboxField/CheckboxField.jsx +21 -20
  33. package/src/lib/components/CheckboxField/CheckboxField.scss +20 -20
  34. package/src/lib/components/CheckboxField/README.mdx +1 -1
  35. package/src/lib/components/FileInputField/FileInputField.jsx +16 -15
  36. package/src/lib/components/FileInputField/FileInputField.scss +19 -19
  37. package/src/lib/components/FileInputField/README.mdx +1 -1
  38. package/src/lib/components/FormLayout/FormLayout.jsx +19 -17
  39. package/src/lib/components/FormLayout/FormLayout.scss +17 -17
  40. package/src/lib/components/FormLayout/FormLayoutCustomField.jsx +18 -12
  41. package/src/lib/components/FormLayout/FormLayoutCustomField.scss +18 -18
  42. package/src/lib/components/FormLayout/README.mdx +26 -49
  43. package/src/lib/components/Grid/Grid.jsx +25 -24
  44. package/src/lib/components/Grid/Grid.scss +33 -29
  45. package/src/lib/components/Grid/GridSpan.jsx +11 -10
  46. package/src/lib/components/Grid/README.mdx +46 -20
  47. package/src/lib/components/Grid/{helpers → _helpers}/generateResponsiveCustomProperties.js +0 -2
  48. package/src/lib/components/Grid/_theme.scss +9 -9
  49. package/src/lib/components/Grid/_tools.scss +20 -20
  50. package/src/lib/components/Modal/Modal.jsx +38 -32
  51. package/src/lib/components/Modal/Modal.scss +73 -73
  52. package/src/lib/components/Modal/README.mdx +2 -5
  53. package/src/lib/components/Modal/_settings.scss +5 -5
  54. package/src/lib/components/Modal/_theme.scss +17 -17
  55. package/src/lib/components/Paper/Paper.jsx +9 -9
  56. package/src/lib/components/Paper/Paper.scss +8 -8
  57. package/src/lib/components/Popover/Popover.jsx +94 -0
  58. package/src/lib/components/Popover/Popover.scss +235 -0
  59. package/src/lib/components/Popover/PopoverWrapper.jsx +46 -0
  60. package/src/lib/components/Popover/README.mdx +333 -0
  61. package/src/lib/components/Popover/_helpers/getRootAlignmentClassName.js +13 -0
  62. package/src/lib/components/Popover/_helpers/getRootSideClassName.js +17 -0
  63. package/src/lib/components/Popover/_theme.scss +16 -0
  64. package/src/lib/components/Popover/index.js +2 -0
  65. package/src/lib/components/Radio/README.mdx +1 -1
  66. package/src/lib/components/Radio/Radio.jsx +15 -14
  67. package/src/lib/components/Radio/Radio.scss +26 -26
  68. package/src/lib/components/ScrollView/README.mdx +5 -5
  69. package/src/lib/components/ScrollView/ScrollView.jsx +22 -22
  70. package/src/lib/components/ScrollView/ScrollView.scss +113 -113
  71. package/src/lib/{services/elementPositionService.js → components/ScrollView/_helpers/getElementsPositionDifference.js} +0 -2
  72. package/src/lib/{hooks → components/ScrollView/_hooks}/useLoadResizeHook.js +1 -1
  73. package/src/lib/{hooks → components/ScrollView/_hooks}/useScrollPositionHook.js +1 -1
  74. package/src/lib/components/SelectField/README.mdx +1 -1
  75. package/src/lib/components/SelectField/SelectField.jsx +17 -16
  76. package/src/lib/components/SelectField/SelectField.scss +30 -30
  77. package/src/lib/components/Table/README.mdx +1 -1
  78. package/src/lib/components/Table/Table.jsx +3 -3
  79. package/src/lib/components/Table/Table.scss +28 -35
  80. package/src/lib/components/Table/_settings.scss +5 -5
  81. package/src/lib/components/Tabs/Tabs.jsx +4 -5
  82. package/src/lib/components/Tabs/Tabs.scss +21 -21
  83. package/src/lib/components/Tabs/TabsItem.jsx +7 -6
  84. package/src/lib/components/Tabs/TabsItem.scss +78 -78
  85. package/src/lib/components/Text/README.mdx +3 -3
  86. package/src/lib/components/Text/Text.jsx +16 -9
  87. package/src/lib/components/Text/Text.scss +23 -13
  88. package/src/lib/components/Text/_helpers/getRootClampClassName.js +11 -0
  89. package/src/lib/components/Text/{helpers → _helpers}/getRootHyphensClassName.js +1 -1
  90. package/src/lib/components/Text/{helpers → _helpers}/getRootWordWrappingClassName.js +1 -1
  91. package/src/lib/components/TextArea/README.mdx +1 -1
  92. package/src/lib/components/TextArea/TextArea.jsx +21 -17
  93. package/src/lib/components/TextArea/TextArea.scss +27 -27
  94. package/src/lib/components/TextField/README.mdx +1 -1
  95. package/src/lib/components/TextField/TextField.jsx +19 -18
  96. package/src/lib/components/TextField/TextField.scss +28 -28
  97. package/src/lib/components/TextLink/README.mdx +77 -0
  98. package/src/lib/components/TextLink/TextLink.jsx +44 -0
  99. package/src/lib/components/TextLink/TextLink.scss +11 -0
  100. package/src/lib/components/TextLink/_theme.scss +4 -0
  101. package/src/lib/components/TextLink/index.js +1 -0
  102. package/src/lib/components/Toggle/README.mdx +1 -1
  103. package/src/lib/components/Toggle/Toggle.jsx +21 -20
  104. package/src/lib/components/Toggle/Toggle.scss +20 -20
  105. package/src/lib/components/Toolbar/README.mdx +33 -5
  106. package/src/lib/components/Toolbar/Toolbar.jsx +33 -17
  107. package/src/lib/components/Toolbar/Toolbar.scss +29 -42
  108. package/src/lib/components/Toolbar/ToolbarGroup.jsx +28 -16
  109. package/src/lib/components/Toolbar/ToolbarItem.jsx +36 -10
  110. package/src/lib/{helpers → components/_helpers}/getRootColorClassName.js +1 -1
  111. package/src/lib/{helpers → components/_helpers}/getRootSizeClassName.js +1 -1
  112. package/src/lib/{helpers → components/_helpers}/getRootValidationStateClassName.js +1 -1
  113. package/src/lib/components/_helpers/isChildrenEmpty.js +3 -0
  114. package/src/lib/{helpers → components/_helpers}/resolveContextOrProp.js +0 -0
  115. package/src/lib/{utils → components/_helpers}/transferProps.js +1 -1
  116. package/src/lib/foundation.scss +11 -11
  117. package/src/lib/helpers.scss +2 -2
  118. package/src/lib/index.js +8 -17
  119. package/src/lib/provider/index.js +2 -1
  120. package/src/lib/provider/withGlobalProps.jsx +21 -0
  121. package/src/lib/styles/_utilities.scss +13 -13
  122. package/src/lib/styles/elements/_code.scss +7 -7
  123. package/src/lib/styles/elements/_links.scss +8 -8
  124. package/src/lib/styles/elements/_lists.scss +3 -3
  125. package/src/lib/styles/elements/_page.scss +14 -14
  126. package/src/lib/styles/elements/_rulers.scss +6 -6
  127. package/src/lib/styles/elements/_small.scss +2 -2
  128. package/src/lib/styles/generic/_box-sizing.scss +3 -2
  129. package/src/lib/styles/generic/_forms.scss +3 -3
  130. package/src/lib/styles/generic/_reset.scss +6 -6
  131. package/src/lib/styles/generic/_shared.scss +3 -3
  132. package/src/lib/styles/helpers/_animation.scss +8 -8
  133. package/src/lib/styles/settings/_breakpoints.scss +7 -7
  134. package/src/lib/styles/settings/_escaped-characters.scss +5 -5
  135. package/src/lib/styles/settings/_form-fields.scss +24 -24
  136. package/src/lib/styles/settings/_utilities.scss +112 -100
  137. package/src/lib/styles/theme/_colors.scss +50 -50
  138. package/src/lib/styles/theme/_form-fields.scss +32 -32
  139. package/src/lib/styles/theme/_spacing.scss +11 -11
  140. package/src/lib/styles/theme/_typography.scss +12 -11
  141. package/src/lib/styles/theme-constants/_breakpoints.scss +4 -4
  142. package/src/lib/styles/theme-constants/_colors.scss +2 -2
  143. package/src/lib/styles/theme-constants/_svg.scss +1 -2
  144. package/src/lib/styles/tools/_accessibility.scss +29 -29
  145. package/src/lib/styles/tools/_breakpoint.scss +11 -14
  146. package/src/lib/styles/tools/_caret.scss +8 -8
  147. package/src/lib/styles/tools/_colors.scss +3 -3
  148. package/src/lib/styles/tools/_reset.scss +24 -21
  149. package/src/lib/styles/tools/_scrollbar.scss +4 -4
  150. package/src/lib/styles/tools/_spacing.scss +14 -22
  151. package/src/lib/styles/tools/_string.scss +9 -9
  152. package/src/lib/styles/tools/_svg.scss +13 -16
  153. package/src/lib/styles/tools/_transition.scss +42 -44
  154. package/src/lib/styles/tools/_utilities.scss +19 -19
  155. package/src/lib/styles/tools/form-fields/_box-field-elements.scss +88 -88
  156. package/src/lib/styles/tools/form-fields/_box-field-layout.scss +147 -147
  157. package/src/lib/styles/tools/form-fields/_box-field-sizes.scss +13 -15
  158. package/src/lib/styles/tools/form-fields/_foundation.scss +12 -12
  159. package/src/lib/styles/tools/form-fields/_inline-field-elements.scss +82 -71
  160. package/src/lib/styles/tools/form-fields/_inline-field-layout.scss +88 -47
  161. package/src/lib/styles/tools/form-fields/_variants.scss +104 -106
  162. package/src/lib/theme.scss +959 -954
  163. package/src/lib/utils/classNames.js +8 -0
  164. package/src/lib/components/CTA/CTA.jsx +0 -60
  165. package/src/lib/components/CTA/CTA.scss +0 -71
  166. package/src/lib/components/CTA/CTACenter.jsx +0 -27
  167. package/src/lib/components/CTA/CTAEnd.jsx +0 -27
  168. package/src/lib/components/CTA/CTAStart.jsx +0 -27
  169. package/src/lib/components/CTA/README.mdx +0 -119
  170. package/src/lib/components/CTA/index.js +0 -4
  171. package/src/lib/components/Center/Center.jsx +0 -27
  172. package/src/lib/components/Center/Center.scss +0 -7
  173. package/src/lib/components/Center/README.mdx +0 -52
  174. package/src/lib/components/Center/index.js +0 -1
  175. package/src/lib/components/Link/Link.jsx +0 -45
  176. package/src/lib/components/Link/Link.scss +0 -11
  177. package/src/lib/components/Link/README.mdx +0 -85
  178. package/src/lib/components/Link/_theme.scss +0 -4
  179. package/src/lib/components/Link/index.js +0 -1
  180. package/src/lib/components/List/List.jsx +0 -71
  181. package/src/lib/components/List/List.scss +0 -53
  182. package/src/lib/components/List/ListItem.jsx +0 -31
  183. package/src/lib/components/List/README.mdx +0 -114
  184. package/src/lib/components/List/_theme.scss +0 -1
  185. package/src/lib/components/List/index.js +0 -2
  186. package/src/lib/components/Media/Media.jsx +0 -29
  187. package/src/lib/components/Media/Media.scss +0 -16
  188. package/src/lib/components/Media/MediaBody.jsx +0 -21
  189. package/src/lib/components/Media/MediaObject.jsx +0 -21
  190. package/src/lib/components/Media/README.mdx +0 -63
  191. package/src/lib/components/Media/index.js +0 -3
  192. package/src/lib/provider/withProviderContext.jsx +0 -32
@@ -8,66 +8,107 @@
8
8
  // 3. Make fields just as wide as necessary. Fields should be interactive only where their visible
9
9
  // content is.
10
10
 
11
- @use '../../settings/forms';
12
- @use '../../settings/form-fields' as settings;
13
- @use '../../theme/typography';
14
- @use '../breakpoint';
11
+ @use "../../settings/forms";
12
+ @use "../../settings/form-fields" as settings;
13
+ @use "../../theme/form-fields" as theme;
14
+ @use "../../theme/typography";
15
+ @use "../breakpoint";
15
16
 
16
17
  @mixin root() {
17
- display: inline-flex; // 1.
18
- flex-wrap: wrap;
19
- align-items: baseline;
20
- width: min-content;
21
- min-width: 0; // 1.
22
- max-width: 100%; // 1.
23
-
24
- .helpText,
25
- .validationText {
26
- padding-top: settings.$vertical-inner-gap;
27
- }
18
+ display: inline-flex; // 1.
19
+ flex-wrap: wrap;
20
+ align-items: baseline;
21
+ width: min-content;
22
+ min-width: 0; // 1.
23
+ max-width: 100%; // 1.
24
+
25
+ .helpText,
26
+ .validationText {
27
+ padding-top: settings.$vertical-inner-gap;
28
+ }
28
29
  }
29
30
 
30
- @mixin field() {
31
- display: flex; // 1.
32
- align-items: flex-start;
33
- min-width: 0; // 1.
31
+ @mixin field($type) {
32
+ display: flex; // 1.
33
+ align-items: flex-start;
34
+ min-width: 0; // 1.
35
+
36
+ @if $type == "radio" {
37
+ flex-direction: row;
38
+ } @else {
39
+ flex-direction: row-reverse;
40
+ justify-content: flex-end;
41
+ }
34
42
 
35
- .input {
36
- flex: none;
37
- }
43
+ .input {
44
+ flex: none;
45
+ }
38
46
 
39
- .label,
40
- .optionLabel {
41
- width: max-content; // 1.
42
- margin-left: settings.$inline-field-inner-gap;
43
- }
47
+ .label,
48
+ .optionLabel {
49
+ width: max-content; // 1.
50
+ margin-left: settings.$inline-field-inner-gap;
51
+ }
44
52
  }
45
53
 
46
54
  @mixin has-label-before() {
47
- .field {
48
- flex-direction: row-reverse;
49
- }
50
-
51
- .label,
52
- .optionLabel {
53
- margin-right: settings.$inline-field-inner-gap;
54
- margin-left: 0;
55
- }
55
+ .field {
56
+ flex-direction: row;
57
+ }
58
+
59
+ .label,
60
+ .optionLabel {
61
+ margin-right: settings.$inline-field-inner-gap;
62
+ margin-left: 0;
63
+ }
56
64
  }
57
65
 
58
66
  @mixin in-form-layout() {
59
- display: inline-grid; // 2.
60
- justify-self: start; // 3.
61
- width: auto; // 2., 3.
67
+ display: inline-grid; // 2.
68
+ justify-self: start; // 3.
69
+ width: auto; // 2., 3.
62
70
 
63
- @include breakpoint.up(forms.$horizontal-breakpoint) {
64
- &.rootLayoutHorizontal {
65
- grid-column-start: 2;
66
- }
71
+ @include breakpoint.up(forms.$horizontal-breakpoint) {
72
+ &.rootLayoutHorizontal {
73
+ grid: inherit;
74
+ grid-template-columns: subgrid;
75
+ grid-column: span 2;
76
+
77
+ @supports not (grid-template-columns: subgrid) {
78
+ display: contents;
79
+ }
80
+ }
81
+
82
+ &.rootLayoutHorizontal .field {
83
+ display: contents;
84
+ }
85
+
86
+ &.rootLayoutHorizontal .label {
87
+ grid-column-start: 1;
88
+ width: auto;
89
+ padding-right: settings.$horizontal-inner-gap;
90
+ margin-left: 0;
91
+ text-align: theme.$horizontal-label-text-align;
92
+ }
93
+
94
+ &.rootLayoutHorizontal .input,
95
+ &.rootLayoutHorizontal .helpText,
96
+ &.rootLayoutHorizontal .validationText {
97
+ grid-column-start: 2;
98
+ }
99
+
100
+ &.rootLayoutHorizontal .helpText,
101
+ &.rootLayoutHorizontal .validationText {
102
+ width: auto;
103
+ max-width: 100%;
104
+
105
+ @supports not (grid-template-columns: subgrid) {
106
+ margin-top: calc(-1 * var(--rui-FormLayout__row-gap));
107
+ }
108
+ }
67
109
 
68
- &.rootLayoutHorizontal .label,
69
- &.rootLayoutHorizontal .optionLabel {
70
- width: auto; // 1.
110
+ &.rootLayoutHorizontal.hasRootLabelBefore .label {
111
+ margin-right: 0;
112
+ }
71
113
  }
72
- }
73
114
  }
@@ -8,142 +8,140 @@
8
8
  //
9
9
  // 3. `.input:focus` is added just in case `:focus-within` doesn't work.
10
10
 
11
- @use 'sass:list';
12
- @use 'sass:map';
13
- @use '../../settings/form-fields' as settings;
14
- @use '../../theme/form-fields' as theme;
11
+ @use "sass:list";
12
+ @use "sass:map";
13
+ @use "../../settings/form-fields" as settings;
14
+ @use "../../theme/form-fields" as theme;
15
15
 
16
16
  @mixin _disabled-state() {
17
- opacity: theme.$disabled-opacity;
18
- cursor: theme.$disabled-cursor;
17
+ opacity: theme.$disabled-opacity;
18
+ cursor: theme.$disabled-cursor;
19
19
  }
20
20
 
21
21
  // 1.
22
22
  @mixin _generate-custom-properties($type, $variant, $state) {
23
- @if (not list.index(map.keys(map.get(settings.$themeable-variant-states, $type)), $variant)) {
24
- @error "Invalid variant specified! #{$variant} doesn't exist. "
25
- + "Choose one of #{map.keys(map.get(settings.$themeable-variant-states, $type))}.";
26
- }
27
-
28
- @if (not list.index(map.keys(settings.$themeable-state-properties), $state)) {
29
- @error "Invalid state specified! #{$state} doesn't exist. "
30
- + "Choose one of #{map.keys(settings.$themeable-state-properties)}.";
31
- }
32
-
33
- $properties: map.get(settings.$themeable-state-properties, $state);
34
- $infix: $type;
35
- $fallback-state: 'default';
36
-
37
- @if ($type == 'validation') {
38
- $infix: $variant;
39
- }
40
-
41
- @if ($type != 'validation' and $variant != 'default') {
42
- $infix: #{$type}--#{$variant};
43
- }
44
-
45
- @if ($state == 'checked-disabled') {
46
- $fallback-state: 'checked';
47
- }
48
-
49
- @if ($state == 'default') {
50
- @each $property in $properties {
51
- --rui-local-#{$property}: var(--rui-FormField--#{$infix}--#{$state}__#{$property});
52
- }
53
- }
54
-
55
- // 2.
56
- @else {
57
- @each $property in $properties {
58
- --rui-local-#{$property}:
59
- var(
60
- --rui-FormField--#{$infix}--#{$state}__#{$property},
61
- var(--rui-FormField--#{$infix}--#{$fallback-state}__#{$property})
62
- );
63
- }
64
- }
65
- }
23
+ @if not list.index(map.keys(map.get(settings.$themeable-variant-states, $type)), $variant) {
24
+ @error "Invalid variant specified! #{$variant} doesn't exist. "
25
+ + "Choose one of #{map.keys(map.get(settings.$themeable-variant-states, $type))}.";
26
+ }
66
27
 
67
- @mixin _get-theme($type, $variant) {
68
- @if (not list.index(map.keys(settings.$themeable-variant-states), $type)) {
69
- @error "Invalid type specified! #{$type} doesn't exist. "
70
- + "Choose one of #{map.keys(settings.$themeable-variant-states)}.";
71
- }
28
+ @if not list.index(map.keys(settings.$themeable-state-properties), $state) {
29
+ @error "Invalid state specified! #{$state} doesn't exist. "
30
+ + "Choose one of #{map.keys(settings.$themeable-state-properties)}.";
31
+ }
72
32
 
73
- $themeable-states: map.get(map.get(settings.$themeable-variant-states, $type), $variant);
33
+ $properties: map.get(settings.$themeable-state-properties, $state);
34
+ $infix: $type;
35
+ $fallback-state: "default";
74
36
 
75
- @if (list.index($themeable-states, 'hover')) {
76
- @include _generate-custom-properties($type, $variant, 'default');
37
+ @if $type == "validation" {
38
+ $infix: $variant;
39
+ }
77
40
 
78
- &:hover {
79
- @include _generate-custom-properties($type, $variant, 'hover');
41
+ @if $type != "validation" and $variant != "default" {
42
+ $infix: #{$type}--#{$variant};
80
43
  }
81
- }
82
44
 
83
- @else {
84
- &,
85
- &:hover {
86
- @include _generate-custom-properties($type, $variant, 'default');
45
+ @if $state == "checked-disabled" {
46
+ $fallback-state: "checked";
87
47
  }
88
- }
89
48
 
90
- @if (list.index($themeable-states, 'focus')) {
91
- // 3.
92
- &:focus-within,
93
- &:focus-within:hover,
94
- .input:focus {
95
- @include _generate-custom-properties($type, $variant, 'focus');
49
+ @if $state == "default" {
50
+ @each $property in $properties {
51
+ --rui-local-#{$property}: var(--rui-FormField--#{$infix}--#{$state}__#{$property});
52
+ }
96
53
  }
97
- }
98
54
 
99
- @if (list.index($themeable-states, 'checked')) {
100
- .input:checked {
101
- @include _generate-custom-properties($type, $variant, 'checked');
55
+ // 2.
56
+ @else {
57
+ @each $property in $properties {
58
+ --rui-local-#{$property}:
59
+ var(
60
+ --rui-FormField--#{$infix}--#{$state}__#{$property},
61
+ var(--rui-FormField--#{$infix}--#{$fallback-state}__#{$property})
62
+ );
63
+ }
102
64
  }
103
- }
65
+ }
104
66
 
105
- @if (list.index($themeable-states, 'disabled')) {
106
- &.isRootDisabled {
107
- @include _generate-custom-properties($type, $variant, 'disabled');
67
+ @mixin _get-theme($type, $variant) {
68
+ @if not list.index(map.keys(settings.$themeable-variant-states), $type) {
69
+ @error "Invalid type specified! #{$type} doesn't exist. "
70
+ + "Choose one of #{map.keys(settings.$themeable-variant-states)}.";
108
71
  }
109
- }
110
72
 
111
- @if (list.index($themeable-states, 'checked-disabled')) {
112
- .input:checked:disabled {
113
- @include _generate-custom-properties($type, $variant, 'checked-disabled');
73
+ $themeable-states: map.get(map.get(settings.$themeable-variant-states, $type), $variant);
74
+
75
+ @if list.index($themeable-states, "hover") {
76
+ @include _generate-custom-properties($type, $variant, "default");
77
+
78
+ &:hover {
79
+ @include _generate-custom-properties($type, $variant, "hover");
80
+ }
81
+ } @else {
82
+ &,
83
+ &:hover {
84
+ @include _generate-custom-properties($type, $variant, "default");
85
+ }
114
86
  }
115
- }
116
- }
117
87
 
118
- @mixin visual($type, $variant: 'default', $has-caret: false) {
119
- @include _get-theme($type, $variant);
88
+ @if list.index($themeable-states, "focus") {
89
+ // 3.
90
+ &:focus-within,
91
+ &:focus-within:hover,
92
+ .input:focus {
93
+ @include _generate-custom-properties($type, $variant, "focus");
94
+ }
95
+ }
120
96
 
121
- .input:disabled {
122
- @include _disabled-state();
123
- }
97
+ @if list.index($themeable-states, "checked") {
98
+ .input:checked {
99
+ @include _generate-custom-properties($type, $variant, "checked");
100
+ }
101
+ }
124
102
 
125
- @if ($type == 'box' and $variant == 'filled') {
126
- .input {
127
- border-top-color: transparent;
128
- border-right-color: transparent;
129
- border-left-color: transparent;
130
- border-bottom-right-radius: 0;
131
- border-bottom-left-radius: 0;
103
+ @if list.index($themeable-states, "disabled") {
104
+ &.isRootDisabled {
105
+ @include _generate-custom-properties($type, $variant, "disabled");
106
+ }
132
107
  }
133
- }
134
108
 
135
- @if ($type == 'box' and $variant == 'outline' and $has-caret) {
136
- .caret {
137
- border-left: theme.$box-border-width theme.$box-select-caret-border-style var(--rui-local-border-color);
138
- background: theme.$box-select-caret-background;
109
+ @if list.index($themeable-states, "checked-disabled") {
110
+ .input:checked:disabled {
111
+ @include _generate-custom-properties($type, $variant, "checked-disabled");
112
+ }
139
113
  }
114
+ }
115
+
116
+ @mixin visual($type, $variant: "default", $has-caret: false) {
117
+ @include _get-theme($type, $variant);
118
+
119
+ .input:disabled {
120
+ @include _disabled-state();
121
+ }
122
+
123
+ @if $type == "box" and $variant == "filled" {
124
+ .input {
125
+ border-top-color: transparent;
126
+ border-right-color: transparent;
127
+ border-left-color: transparent;
128
+ border-bottom-right-radius: 0;
129
+ border-bottom-left-radius: 0;
130
+ }
131
+ }
132
+
133
+ @if $type == "box" and $variant == "outline" and $has-caret {
134
+ .caret {
135
+ border-left: theme.$box-border-width theme.$box-select-caret-border-style var(--rui-local-border-color);
136
+ background: theme.$box-select-caret-background;
137
+ }
140
138
 
141
- &.isRootDisabled .caret {
142
- @include _disabled-state();
139
+ &.isRootDisabled .caret {
140
+ @include _disabled-state();
141
+ }
143
142
  }
144
- }
145
143
  }
146
144
 
147
145
  @mixin validation($variant) {
148
- @include _get-theme(validation, $variant);
146
+ @include _get-theme(validation, $variant);
149
147
  }