@react-ui-org/react-ui 0.53.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/README.md +7 -5
  2. package/dist/react-ui.css +36 -38
  3. package/dist/react-ui.development.css +10800 -0
  4. package/dist/react-ui.development.js +1568 -0
  5. package/dist/react-ui.js +1 -1
  6. package/package.json +7 -4
  7. package/src/components/Alert/Alert.jsx +1 -1
  8. package/src/components/Alert/Alert.module.scss +100 -0
  9. package/src/components/Alert/README.md +9 -7
  10. package/src/components/Badge/Badge.jsx +1 -1
  11. package/src/components/Badge/Badge.module.scss +109 -0
  12. package/src/components/Badge/README.md +9 -7
  13. package/src/components/Button/Button.jsx +1 -1
  14. package/src/components/Button/README.md +9 -7
  15. package/src/components/Button/_base.scss +117 -115
  16. package/src/components/Button/_priorities.scss +135 -133
  17. package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
  18. package/src/components/ButtonGroup/ButtonGroup.module.scss +35 -0
  19. package/src/components/ButtonGroup/README.md +10 -8
  20. package/src/components/Card/Card.jsx +1 -1
  21. package/src/components/Card/Card.module.scss +72 -0
  22. package/src/components/Card/CardBody.jsx +1 -1
  23. package/src/components/Card/CardFooter.jsx +1 -1
  24. package/src/components/Card/README.md +9 -7
  25. package/src/components/CheckboxField/CheckboxField.jsx +1 -1
  26. package/src/components/CheckboxField/CheckboxField.module.scss +63 -0
  27. package/src/components/CheckboxField/README.md +10 -8
  28. package/src/components/FileInputField/FileInputField.jsx +1 -1
  29. package/src/components/FileInputField/FileInputField.module.scss +65 -0
  30. package/src/components/FileInputField/README.md +10 -8
  31. package/src/components/FormLayout/FormLayout.jsx +1 -1
  32. package/src/components/FormLayout/{FormLayout.scss → FormLayout.module.scss} +30 -28
  33. package/src/components/FormLayout/FormLayoutCustomField.jsx +1 -1
  34. package/src/components/FormLayout/FormLayoutCustomField.module.scss +65 -0
  35. package/src/components/FormLayout/README.md +11 -9
  36. package/src/components/Grid/Grid.jsx +1 -1
  37. package/src/components/Grid/Grid.module.scss +66 -0
  38. package/src/components/Grid/GridSpan.jsx +1 -1
  39. package/src/components/Grid/README.md +11 -8
  40. package/src/components/InputGroup/InputGroup.jsx +9 -1
  41. package/src/components/InputGroup/InputGroup.module.scss +93 -0
  42. package/src/components/InputGroup/README.md +27 -10
  43. package/src/components/Modal/Modal.jsx +1 -1
  44. package/src/components/Modal/Modal.module.scss +80 -0
  45. package/src/components/Modal/ModalBody.jsx +1 -1
  46. package/src/components/Modal/ModalBody.module.scss +20 -0
  47. package/src/components/Modal/ModalCloseButton.jsx +1 -1
  48. package/src/components/Modal/ModalCloseButton.module.scss +20 -0
  49. package/src/components/Modal/ModalContent.jsx +1 -1
  50. package/src/components/Modal/ModalContent.module.scss +7 -0
  51. package/src/components/Modal/ModalFooter.jsx +1 -1
  52. package/src/components/Modal/ModalFooter.module.scss +37 -0
  53. package/src/components/Modal/ModalHeader.jsx +1 -1
  54. package/src/components/Modal/ModalHeader.module.scss +32 -0
  55. package/src/components/Modal/ModalTitle.jsx +1 -1
  56. package/src/components/Modal/ModalTitle.module.scss +12 -0
  57. package/src/components/Modal/README.md +17 -14
  58. package/src/components/Paper/Paper.jsx +1 -1
  59. package/src/components/Paper/Paper.module.scss +19 -0
  60. package/src/components/Paper/README.md +9 -7
  61. package/src/components/Popover/Popover.jsx +1 -1
  62. package/src/components/Popover/Popover.module.scss +238 -0
  63. package/src/components/Popover/PopoverWrapper.jsx +1 -2
  64. package/src/components/Popover/PopoverWrapper.module.scss +5 -0
  65. package/src/components/Popover/README.md +9 -7
  66. package/src/components/Radio/README.md +12 -10
  67. package/src/components/Radio/Radio.jsx +1 -1
  68. package/src/components/Radio/Radio.module.scss +85 -0
  69. package/src/components/ScrollView/README.md +10 -8
  70. package/src/components/ScrollView/ScrollView.jsx +1 -1
  71. package/src/components/ScrollView/ScrollView.module.scss +233 -0
  72. package/src/components/SelectField/README.md +10 -8
  73. package/src/components/SelectField/SelectField.jsx +1 -1
  74. package/src/components/SelectField/SelectField.module.scss +111 -0
  75. package/src/components/Table/README.md +10 -8
  76. package/src/components/Table/Table.jsx +1 -1
  77. package/src/components/Table/Table.module.scss +30 -0
  78. package/src/components/Table/_components/TableBodyCell/TableBodyCell.jsx +1 -1
  79. package/src/components/Table/_components/TableCell.module.scss +28 -0
  80. package/src/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +1 -1
  81. package/src/components/Tabs/README.md +16 -10
  82. package/src/components/Tabs/Tabs.jsx +1 -1
  83. package/src/components/Tabs/Tabs.module.scss +31 -0
  84. package/src/components/Tabs/TabsItem.jsx +1 -1
  85. package/src/components/Tabs/TabsItem.module.scss +119 -0
  86. package/src/components/Text/README.md +15 -9
  87. package/src/components/Text/Text.jsx +1 -1
  88. package/src/components/Text/Text.module.scss +42 -0
  89. package/src/components/TextArea/README.md +10 -8
  90. package/src/components/TextArea/TextArea.jsx +1 -1
  91. package/src/components/TextArea/TextArea.module.scss +97 -0
  92. package/src/components/TextField/README.md +13 -8
  93. package/src/components/TextField/TextField.jsx +1 -1
  94. package/src/components/TextField/TextField.module.scss +109 -0
  95. package/src/components/TextLink/README.md +10 -8
  96. package/src/components/TextLink/TextLink.jsx +1 -1
  97. package/src/components/TextLink/TextLink.module.scss +18 -0
  98. package/src/components/Toggle/README.md +10 -8
  99. package/src/components/Toggle/Toggle.jsx +1 -1
  100. package/src/components/Toggle/Toggle.module.scss +63 -0
  101. package/src/components/Toolbar/README.md +9 -7
  102. package/src/components/Toolbar/Toolbar.jsx +1 -1
  103. package/src/components/Toolbar/Toolbar.module.scss +85 -0
  104. package/src/components/Toolbar/ToolbarGroup.jsx +1 -1
  105. package/src/components/Toolbar/ToolbarItem.jsx +1 -1
  106. package/src/components/_helpers/transferProps.js +47 -7
  107. package/src/foundation.scss +22 -17
  108. package/src/helpers.scss +12 -8
  109. package/src/index.js +3 -4
  110. package/src/index.scss +7 -0
  111. package/src/layers.scss +4 -0
  112. package/src/styles/elements/_page.scss +0 -4
  113. package/src/styles/helpers/_animation.scss +2 -2
  114. package/src/styles/tools/_utilities.scss +1 -1
  115. package/src/theme.scss +1040 -1038
  116. package/CODEOWNERS +0 -23
  117. package/src/components/Alert/Alert.scss +0 -98
  118. package/src/components/Badge/Badge.scss +0 -107
  119. package/src/components/ButtonGroup/ButtonGroup.scss +0 -33
  120. package/src/components/Card/Card.scss +0 -70
  121. package/src/components/CheckboxField/CheckboxField.scss +0 -61
  122. package/src/components/FileInputField/FileInputField.scss +0 -63
  123. package/src/components/FormLayout/FormLayoutCustomField.scss +0 -63
  124. package/src/components/Grid/Grid.scss +0 -63
  125. package/src/components/InputGroup/InputGroup.scss +0 -87
  126. package/src/components/Modal/Modal.scss +0 -78
  127. package/src/components/Modal/ModalBody.scss +0 -18
  128. package/src/components/Modal/ModalCloseButton.scss +0 -18
  129. package/src/components/Modal/ModalContent.scss +0 -5
  130. package/src/components/Modal/ModalFooter.scss +0 -35
  131. package/src/components/Modal/ModalHeader.scss +0 -30
  132. package/src/components/Modal/ModalTitle.scss +0 -10
  133. package/src/components/Paper/Paper.scss +0 -17
  134. package/src/components/Popover/Popover.scss +0 -236
  135. package/src/components/Popover/PopoverWrapper.scss +0 -3
  136. package/src/components/Radio/Radio.scss +0 -83
  137. package/src/components/ScrollView/ScrollView.scss +0 -227
  138. package/src/components/SelectField/SelectField.scss +0 -109
  139. package/src/components/Table/Table.scss +0 -28
  140. package/src/components/Table/_components/TableCell.scss +0 -26
  141. package/src/components/Tabs/Tabs.scss +0 -28
  142. package/src/components/Tabs/TabsItem.scss +0 -117
  143. package/src/components/Text/Text.scss +0 -40
  144. package/src/components/TextArea/TextArea.scss +0 -95
  145. package/src/components/TextField/TextField.scss +0 -107
  146. package/src/components/TextLink/TextLink.scss +0 -16
  147. package/src/components/Toggle/Toggle.scss +0 -61
  148. package/src/components/Toolbar/Toolbar.scss +0 -83
  149. /package/src/components/Button/{Button.scss → Button.module.scss} +0 -0
@@ -1,227 +0,0 @@
1
- // 1. Scrolling shadows are implemented as pseudo elements. This way we can customise them only
2
- // with custom properties.
3
- //
4
- // 2. Stack scrolling shadows over viewport content while keeping the content interactive.
5
- //
6
- // - `.scrollingShadows` is positioned absolutely over the `.root`, with auto `z-index` (this is
7
- // important!), and with `overflow: hidden` to clip the shadows (ie. its pseudo elements).
8
- // - The `.viewport` is in `.root`'s stacking context and remains interactive because its
9
- // `z-index` is higher than the auto `z-index` of `.scrollingShadows`.
10
- //
11
- // 3. Optional arrows are positioned relative to the `.root` and stacked on top of scrolling
12
- // shadows. They can be shifted outside the `ScrollView` area only because `overflow: hidden` is
13
- // **not** present at `.root`.
14
- //
15
- // 4. Make the `.content`'s bounding rectangle spread beyond the part visible through `.viewport`.
16
- //
17
- // 5. Prevent undesired vertical scrolling that may occur with tables inside.
18
- //
19
- // 6. Make `ScrollView` adjust to flexible layouts.
20
- //
21
- // 7. Hide content overflowing in the other direction because scrollbars would be unreachable under
22
- // scrolling shadows.
23
-
24
- @use "../../styles/tools/accessibility";
25
- @use "../../styles/tools/caret";
26
- @use "../../styles/tools/reset";
27
- @use "../../styles/tools/scrollbar";
28
- @use "../../styles/tools/spacing";
29
- @use "../../styles/tools/transition";
30
-
31
- $_arrow-inner-spacing: spacing.of(2);
32
- $_arrow-outer-spacing: spacing.of(4);
33
-
34
- .root {
35
- position: relative; // 2.
36
- display: flex;
37
- flex-direction: column;
38
- width: 100%;
39
- }
40
-
41
- // 1.
42
- .scrollingShadows {
43
- position: absolute; // 2.
44
- width: 100%; // 2.
45
- height: 100%; // 2.
46
- overflow: hidden; // 2.
47
- pointer-events: none; // 2.
48
-
49
- &::before,
50
- &::after {
51
- @include transition.add((visibility, opacity, transform));
52
-
53
- content: "";
54
- position: absolute;
55
- z-index: 2; // 2.
56
- display: block;
57
- visibility: hidden;
58
- opacity: 0;
59
- }
60
-
61
- &::before {
62
- background: var(--rui-local-start-shadow-background);
63
- }
64
-
65
- &::after {
66
- background: var(--rui-local-end-shadow-background);
67
- }
68
- }
69
-
70
- .viewport {
71
- z-index: 1; // 2.
72
- width: 100%;
73
- scroll-behavior: smooth;
74
- }
75
-
76
- .arrowPrev,
77
- .arrowNext {
78
- @include reset.button();
79
- @include accessibility.min-tap-target();
80
- @include transition.add((visibility, opacity, transform));
81
-
82
- position: absolute; // 3.
83
- z-index: 3; // 3.
84
- display: flex;
85
- align-items: center;
86
- justify-content: center;
87
- visibility: hidden;
88
- opacity: 0;
89
- }
90
-
91
- .arrowIcon {
92
- @include caret.create();
93
- }
94
-
95
- .isRootVertical {
96
- height: 100%;
97
- min-height: 0; // 6.
98
- }
99
-
100
- .isRootVertical .viewport {
101
- height: 100%;
102
- overflow-x: hidden; // 7.
103
- overflow-y: auto; // 2.
104
- }
105
-
106
- .isRootVertical .arrowPrev {
107
- top: 0;
108
- right: 0;
109
- left: 0;
110
- width: 100%;
111
- padding-top: $_arrow-outer-spacing;
112
- padding-bottom: $_arrow-inner-spacing;
113
- color: var(--rui-local-prev-arrow-color);
114
- transform: translateY(var(--rui-local-prev-arrow-initial-offset));
115
- }
116
-
117
- .isRootVertical .arrowPrev .arrowIcon {
118
- @include caret.rotate(180);
119
- }
120
-
121
- .isRootVertical .arrowNext {
122
- right: 0;
123
- bottom: 0;
124
- left: 0;
125
- width: 100%;
126
- padding-top: $_arrow-inner-spacing;
127
- padding-bottom: $_arrow-outer-spacing;
128
- color: var(--rui-local-next-arrow-color);
129
- transform: translateY(calc(-1 * var(--rui-local-next-arrow-initial-offset)));
130
- }
131
-
132
- .isRootHorizontal {
133
- min-width: 0; // 6.
134
- }
135
-
136
- .isRootHorizontal .arrowPrev {
137
- top: 0;
138
- bottom: 0;
139
- left: 0;
140
- padding-right: $_arrow-inner-spacing;
141
- padding-left: $_arrow-outer-spacing;
142
- transform: translateX(var(--rui-local-prev-arrow-initial-offset));
143
- }
144
-
145
- .isRootHorizontal .arrowPrev .arrowIcon {
146
- @include caret.rotate(90);
147
- }
148
-
149
- .isRootHorizontal .arrowNext {
150
- top: 0;
151
- right: 0;
152
- bottom: 0;
153
- padding-right: $_arrow-outer-spacing;
154
- padding-left: $_arrow-inner-spacing;
155
- transform: translateX(calc(-1 * var(--rui-local-next-arrow-initial-offset)));
156
- }
157
-
158
- .isRootHorizontal .arrowNext .arrowIcon {
159
- @include caret.rotate(270);
160
- }
161
-
162
- .isRootVertical .scrollingShadows::before,
163
- .isRootVertical .scrollingShadows::after {
164
- right: 0;
165
- left: 0;
166
- width: auto;
167
- }
168
-
169
- .isRootVertical .scrollingShadows::before {
170
- top: 0;
171
- height: var(--rui-local-start-shadow-size);
172
- transform: translateY(var(--rui-local-start-shadow-initial-offset));
173
- }
174
-
175
- .isRootVertical .scrollingShadows::after {
176
- bottom: 0;
177
- height: var(--rui-local-end-shadow-size);
178
- transform: translateY(calc(-1 * var(--rui-local-end-shadow-initial-offset)));
179
- }
180
-
181
- .isRootHorizontal .viewport {
182
- overflow-x: auto; // 2.
183
- overflow-y: hidden; // 5., 7.
184
- }
185
-
186
- .isRootHorizontal .content {
187
- display: inline-flex; // 4.
188
- min-width: 100%;
189
- vertical-align: top;
190
- }
191
-
192
- .isRootHorizontal .scrollingShadows::before,
193
- .isRootHorizontal .scrollingShadows::after {
194
- top: 0;
195
- bottom: 0;
196
- height: auto;
197
- }
198
-
199
- .isRootHorizontal .scrollingShadows::before {
200
- left: 0;
201
- width: var(--rui-local-start-shadow-size);
202
- transform: translateX(var(--rui-local-start-shadow-initial-offset));
203
- }
204
-
205
- .isRootHorizontal .scrollingShadows::after {
206
- right: 0;
207
- width: var(--rui-local-end-shadow-size);
208
- transform: translateX(calc(-1 * var(--rui-local-end-shadow-initial-offset)));
209
- }
210
-
211
- .isRootScrolledAtStart .scrollingShadows::before,
212
- .isRootScrolledAtStart .arrowPrev {
213
- visibility: visible;
214
- opacity: 1;
215
- transform: translate(0, 0);
216
- }
217
-
218
- .isRootScrolledAtEnd .scrollingShadows::after,
219
- .isRootScrolledAtEnd .arrowNext {
220
- visibility: visible;
221
- opacity: 1;
222
- transform: translate(0, 0);
223
- }
224
-
225
- .hasRootScrollbarDisabled .viewport {
226
- @include scrollbar.hide();
227
- }
@@ -1,109 +0,0 @@
1
- @use "../../styles/tools/form-fields/box-field-elements";
2
- @use "../../styles/tools/form-fields/box-field-layout";
3
- @use "../../styles/tools/form-fields/box-field-sizes";
4
- @use "../../styles/tools/form-fields/foundation";
5
- @use "../../styles/tools/form-fields/variants";
6
- @use "../../styles/tools/accessibility";
7
-
8
- // Foundation
9
- .root {
10
- @include foundation.root();
11
- }
12
-
13
- .label {
14
- @include foundation.label();
15
- }
16
-
17
- .inputContainer {
18
- @include box-field-elements.input-container();
19
- }
20
-
21
- .input {
22
- @include box-field-elements.input();
23
- @include box-field-elements.input-select();
24
- @include box-field-elements.input-select-option();
25
- }
26
-
27
- .caret {
28
- @include box-field-elements.caret();
29
- }
30
-
31
- .caretIcon {
32
- @include box-field-elements.caret-icon();
33
- }
34
-
35
- .bottomLine {
36
- @include box-field-elements.bottom-line();
37
- }
38
-
39
- .helpText,
40
- .validationText {
41
- @include foundation.help-text();
42
- }
43
-
44
- .isRootRequired .label {
45
- @include foundation.label-required();
46
- }
47
-
48
- // Variants
49
- .isRootVariantFilled {
50
- @include variants.visual(box, $variant: filled, $has-caret: true);
51
- }
52
-
53
- .isRootVariantOutline {
54
- @include variants.visual(box, $variant: outline, $has-caret: true);
55
- }
56
-
57
- // States
58
- .isRootStateInvalid {
59
- @include variants.validation(invalid);
60
- }
61
-
62
- .isRootStateValid {
63
- @include variants.validation(valid);
64
- }
65
-
66
- .isRootStateWarning {
67
- @include variants.validation(warning);
68
- }
69
-
70
- // Invisible label
71
- .isLabelHidden {
72
- @include accessibility.hide-text();
73
- }
74
-
75
- // Layouts
76
- .isRootLayoutVertical,
77
- .isRootLayoutHorizontal {
78
- @include box-field-layout.vertical();
79
- }
80
-
81
- .isRootLayoutHorizontal {
82
- @include box-field-layout.horizontal();
83
- }
84
-
85
- .isRootFullWidth {
86
- @include box-field-layout.full-width();
87
- }
88
-
89
- .isRootInFormLayout {
90
- @include box-field-layout.in-form-layout();
91
- }
92
-
93
- // Sizes
94
- .isRootSizeSmall {
95
- @include box-field-sizes.size(small);
96
- }
97
-
98
- .isRootSizeMedium {
99
- @include box-field-sizes.size(medium);
100
- }
101
-
102
- .isRootSizeLarge {
103
- @include box-field-sizes.size(large);
104
- }
105
-
106
- // Groups
107
- .isRootGrouped {
108
- @include box-field-elements.in-group-layout();
109
- }
@@ -1,28 +0,0 @@
1
- @use "../../styles/tools/transition";
2
- @use "settings";
3
-
4
- .table {
5
- width: 100%;
6
- border-collapse: collapse;
7
- }
8
-
9
- .tableRow,
10
- .tableHeadRow {
11
- @include transition.add((background-color));
12
- }
13
-
14
- .tableRow {
15
- background-color: settings.$background-color;
16
-
17
- &:hover {
18
- background-color: settings.$hover-background-color;
19
- }
20
- }
21
-
22
- .tableHeadRow {
23
- background-color: settings.$head-background-color;
24
-
25
- &:hover {
26
- background-color: settings.$head-background-color;
27
- }
28
- }
@@ -1,26 +0,0 @@
1
- @use "../settings";
2
-
3
- .tableCell,
4
- .tableHeadCell,
5
- .isTableCellSortingActive,
6
- .isTableHeadCellSortingActive {
7
- padding: settings.$cell-padding-y settings.$cell-padding-x;
8
- text-align: left;
9
- border-bottom: settings.$border-width solid settings.$border-color;
10
- }
11
-
12
- .tableHeadCell {
13
- font-weight: settings.$head-font-weight;
14
- border-bottom-width: 2px;
15
- }
16
-
17
- .tableHeadCellLayout {
18
- display: flex;
19
- gap: settings.$cell-padding-x;
20
- align-items: center;
21
- }
22
-
23
- .isTableCellSortingActive,
24
- .isTableHeadCellSortingActive {
25
- background-color: settings.$sorted-background-color;
26
- }
@@ -1,28 +0,0 @@
1
- // 1. Decorative bottom border.
2
-
3
- @use "../../styles/tools/reset";
4
- @use "theme";
5
-
6
- .list {
7
- @include reset.list();
8
-
9
- position: relative;
10
- display: inline-flex;
11
- min-width: 100%;
12
- padding-right: theme.$padding-x;
13
- padding-left: theme.$padding-x;
14
- overflow-y: hidden;
15
- white-space: nowrap;
16
-
17
- // 1.
18
- &::after {
19
- content: "";
20
- position: absolute;
21
- right: 0;
22
- bottom: 0;
23
- left: 0;
24
- z-index: 1;
25
- height: theme.$border-bottom-width;
26
- background-color: theme.$border-bottom-color;
27
- }
28
- }
@@ -1,117 +0,0 @@
1
- // 1. Keep inactive items under Tabs' decorative bottom border and pop active ones above it.
2
-
3
- @use "../../styles/tools/breakpoint";
4
- @use "../../styles/tools/reset";
5
- @use "../../styles/tools/transition";
6
- @use "theme";
7
-
8
- .root {
9
- @include transition.add(transform);
10
-
11
- position: relative; // 1.
12
- z-index: 1; // 1.
13
- flex: none;
14
- padding-top: calc(-1 * #{theme.$item-active-shift-y});
15
- margin-bottom: theme.$item-active-shift-y;
16
- transform: translateY(0);
17
-
18
- &:hover,
19
- &:focus-within {
20
- transform: translateY(theme.$item-hover-shift-y);
21
- }
22
-
23
- &:not(:last-child) {
24
- margin-right: theme.$gap-xs;
25
- }
26
-
27
- @include breakpoint.up(sm) {
28
- &:not(:last-child) {
29
- margin-right: theme.$gap-sm;
30
- }
31
- }
32
-
33
- @include breakpoint.up(md) {
34
- &:not(:last-child) {
35
- margin-right: theme.$gap-md;
36
- }
37
- }
38
- }
39
-
40
- .link {
41
- @include reset.link();
42
- @include transition.add((color, border-color, background-color, box-shadow));
43
-
44
- display: block;
45
- padding: theme.$item-padding-xs;
46
- font-weight: theme.$item-font-weight;
47
- line-height: 1;
48
- text-decoration: none;
49
- color: theme.$item-color;
50
- border: theme.$item-border-width solid;
51
- border-color: theme.$item-border-color;
52
- border-top-left-radius: theme.$item-border-radius;
53
- border-top-right-radius: theme.$item-border-radius;
54
- background-color: theme.$item-background-color;
55
- box-shadow: theme.$item-box-shadow;
56
-
57
- &:hover,
58
- &:focus {
59
- font-weight: theme.$item-hover-font-weight;
60
- color: theme.$item-hover-color;
61
- border-width: theme.$item-hover-border-width;
62
- border-color: theme.$item-hover-border-color;
63
- background-color: theme.$item-hover-background-color;
64
- box-shadow: theme.$item-hover-box-shadow;
65
- }
66
-
67
- @include breakpoint.up(sm) {
68
- padding: theme.$item-padding-sm;
69
- }
70
-
71
- @include breakpoint.up(md) {
72
- padding: theme.$item-padding-md;
73
- }
74
- }
75
-
76
- .linkContent {
77
- @include transition.add(transform);
78
-
79
- display: flex;
80
- align-items: center;
81
- transform: translateY(0);
82
- }
83
-
84
- .label:not(:first-child) {
85
- margin-left: theme.$item-icon-gap;
86
- }
87
-
88
- .label:not(:last-child) {
89
- margin-right: theme.$item-icon-gap;
90
- }
91
-
92
- .isRootActive,
93
- .isRootActive:hover,
94
- .isRootActive:focus-within {
95
- z-index: 2; // 1.
96
- transform: translateY(theme.$item-active-shift-y);
97
- }
98
-
99
- .isRootActive .link {
100
- font-weight: theme.$item-active-font-weight;
101
- color: theme.$item-active-color;
102
- border-width: theme.$item-active-border-width;
103
- border-color: theme.$item-active-border-color;
104
- background-color: theme.$item-active-background-color;
105
- box-shadow: theme.$item-active-box-shadow;
106
- }
107
-
108
- .link:hover .linkContent,
109
- .link:focus .linkContent {
110
- transform: translateY(theme.$item-hover-label-shift-y);
111
- }
112
-
113
- .isRootActive .link .linkContent,
114
- .isRootActive .link:hover .linkContent,
115
- .isRootActive .link:focus .linkContent {
116
- transform: translateY(theme.$item-active-label-shift-y);
117
- }
@@ -1,40 +0,0 @@
1
- // 1. `word-break: break-word` is deprecated in favour of `overflow-wrap: anywhere`, but it's still
2
- // required for Safari.
3
- // https://caniuse.com/mdn-css_properties_overflow-wrap_anywhere
4
- //
5
- // 2. Different approaches are used for single and multiline texts because the latter approach
6
- // doesn't always work for single-line texts.
7
-
8
- .isRootClampSingleLine {
9
- display: block; // 2.
10
- overflow: hidden;
11
- text-overflow: ellipsis;
12
- white-space: nowrap;
13
- }
14
-
15
- // stylelint-disable property-no-vendor-prefix, value-no-vendor-prefix
16
- .isRootClampMultiLine {
17
- display: -webkit-box; // 2.
18
- -webkit-line-clamp: var(--rui-custom-lines);
19
- -webkit-box-orient: vertical;
20
- overflow: hidden;
21
- text-overflow: ellipsis;
22
- }
23
- // stylelint-enable property-no-vendor-prefix, value-no-vendor-prefix
24
-
25
- .isRootHyphensAuto {
26
- hyphens: auto;
27
- }
28
-
29
- .isRootHyphensManual {
30
- hyphens: manual;
31
- }
32
-
33
- .isRootWordWrappingAnywhere {
34
- word-break: break-all;
35
- }
36
-
37
- .isRootWordWrappingLongWords {
38
- word-break: break-word; // 1.
39
- overflow-wrap: anywhere;
40
- }
@@ -1,95 +0,0 @@
1
- @use "../../styles/tools/form-fields/box-field-elements";
2
- @use "../../styles/tools/form-fields/box-field-layout";
3
- @use "../../styles/tools/form-fields/box-field-sizes";
4
- @use "../../styles/tools/form-fields/foundation";
5
- @use "../../styles/tools/form-fields/variants";
6
- @use "../../styles/tools/accessibility";
7
-
8
- // Foundation
9
- .root {
10
- @include foundation.root();
11
- }
12
-
13
- .label {
14
- @include foundation.label();
15
- }
16
-
17
- .inputContainer {
18
- @include box-field-elements.input-container();
19
- }
20
-
21
- .input {
22
- @include box-field-elements.input();
23
- @include box-field-elements.input-textarea();
24
- }
25
-
26
- .bottomLine {
27
- @include box-field-elements.bottom-line();
28
- }
29
-
30
- .helpText,
31
- .validationText {
32
- @include foundation.help-text();
33
- }
34
-
35
- .isRootRequired .label {
36
- @include foundation.label-required();
37
- }
38
-
39
- // Visual variants
40
- .isRootVariantFilled {
41
- @include variants.visual(box, $variant: filled);
42
- }
43
-
44
- .isRootVariantOutline {
45
- @include variants.visual(box, $variant: outline);
46
- }
47
-
48
- // States
49
- .isRootStateInvalid {
50
- @include variants.validation(invalid);
51
- }
52
-
53
- .isRootStateValid {
54
- @include variants.validation(valid);
55
- }
56
-
57
- .isRootStateWarning {
58
- @include variants.validation(warning);
59
- }
60
-
61
- // Invisible label
62
- .isLabelHidden {
63
- @include accessibility.hide-text();
64
- }
65
-
66
- // Layouts
67
- .isRootLayoutVertical,
68
- .isRootLayoutHorizontal {
69
- @include box-field-layout.vertical();
70
- }
71
-
72
- .isRootLayoutHorizontal {
73
- @include box-field-layout.horizontal();
74
- }
75
-
76
- .isRootFullWidth {
77
- @include box-field-layout.full-width();
78
- }
79
-
80
- .isRootInFormLayout {
81
- @include box-field-layout.in-form-layout();
82
- }
83
-
84
- // Sizes
85
- .isRootSizeSmall {
86
- @include box-field-sizes.size(small, $is-multiline: true);
87
- }
88
-
89
- .isRootSizeMedium {
90
- @include box-field-sizes.size(medium, $is-multiline: true);
91
- }
92
-
93
- .isRootSizeLarge {
94
- @include box-field-sizes.size(large, $is-multiline: true);
95
- }