@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
@@ -287,13 +287,15 @@ React.createElement(() => {
287
287
  ## Forwarding HTML Attributes
288
288
 
289
289
  In addition to the options below in the [component's API](#api) section, you
290
- can specify [React synthetic events] or **any HTML attribute you like.** All
291
- attributes that don't interfere with the API are forwarded to the root `<div>`
292
- HTML element. This enables making the component interactive and helps to improve
290
+ can specify **any HTML attribute you like.** All attributes that don't interfere
291
+ with the API of the React component are forwarded to the root `<div>` HTML
292
+ element. This enables making the component interactive and helps to improve
293
293
  its accessibility.
294
294
 
295
- 👉 Refer to the MDN reference for the full list of supported attributes of the
296
- [div] element.
295
+ 👉 For the full list of supported attributes refer to:
296
+
297
+ - [`<div>` HTML element attributes][div-attributes]{:target="_blank"}
298
+ - [React common props]{:target="_blank"}
297
299
 
298
300
  ## Forwarding ref
299
301
 
@@ -321,7 +323,7 @@ which enables [Advanced Positioning](#advanced-positioning).
321
323
  | `--rui-Popover__background-color` | Background color |
322
324
  | `--rui-Popover__box-shadow` | Popover box shadow |
323
325
 
326
+ [div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
324
327
  [Floating UI]: https://floating-ui.com/docs/react-dom
325
- [React synthetic events]: https://reactjs.org/docs/events.html
326
- [div]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
328
+ [React common props]: https://react.dev/reference/react-dom/components/common#common-props
327
329
  [ref]: https://reactjs.org/docs/refs-and-the-dom.html
@@ -279,13 +279,15 @@ It's possible to disable just some options or the whole set.
279
279
  ## Forwarding HTML Attributes
280
280
 
281
281
  In addition to the options below in the [component's API](#api) section, you
282
- can specify [React synthetic events] or you can **add whatever HTML attribute
283
- you like.** All attributes that don't interfere with the API are forwarded to
284
- the native HTML `<input>` elements. This enables making the component
285
- interactive and helps to improve its accessibility.
282
+ can specify **any HTML attribute you like.** All attributes that don't interfere
283
+ with the API of the React component are forwarded to the root `<input>` HTML
284
+ element. This enables making the component interactive and helps to improve
285
+ its accessibility.
286
286
 
287
- 👉 Refer to the MDN reference for the full list of supported attributes of the
288
- [radio] input type.
287
+ 👉 For the full list of supported attributes refer to:
288
+
289
+ - [`<input type="radio" />` HTML element attributes][radio-attributes]{:target="_blank"}
290
+ - [React common props]{:target="_blank"}
289
291
 
290
292
  ## API
291
293
 
@@ -301,8 +303,8 @@ options. On top of that, the following options are available for Radio.
301
303
  | `--rui-FormField--check__input--radio__border-radius` | Input corner radius |
302
304
  | `--rui-FormField--check__input--radio--checked__background-image` | Checked input background image (inline, URL, …) |
303
305
 
304
- [nng-radio]: https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/
305
- [fieldset]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
306
306
  [accessibility]: https://www.w3.org/WAI/tutorials/forms/grouping/
307
- [React synthetic events]: https://reactjs.org/docs/events.html
308
- [radio]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#additional_attributes
307
+ [fieldset]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
308
+ [nng-radio]: https://www.nngroup.com/articles/checkboxes-vs-radio-buttons/
309
+ [radio-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio#additional_attributes
310
+ [React common props]: https://react.dev/reference/react-dom/components/common#common-props
@@ -6,7 +6,7 @@ import { getRootValidationStateClassName } from '../_helpers/getRootValidationSt
6
6
  import { resolveContextOrProp } from '../_helpers/resolveContextOrProp';
7
7
  import { transferProps } from '../_helpers/transferProps';
8
8
  import { FormLayoutContext } from '../FormLayout';
9
- import styles from './Radio.scss';
9
+ import styles from './Radio.module.scss';
10
10
 
11
11
  export const Radio = ({
12
12
  disabled,
@@ -0,0 +1,85 @@
1
+ // 1. Legends are tricky to style, let's use a `div` instead.
2
+ // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#styling_with_css
3
+
4
+ @use "../../styles/tools/form-fields/box-field-elements";
5
+ @use "../../styles/tools/form-fields/box-field-layout";
6
+ @use "../../styles/tools/form-fields/foundation";
7
+ @use "../../styles/tools/form-fields/inline-field-elements";
8
+ @use "../../styles/tools/form-fields/inline-field-layout";
9
+ @use "../../styles/tools/form-fields/variants";
10
+ @use "../../styles/tools/accessibility";
11
+ @use "../../styles/tools/reset";
12
+ @use "../../styles/tools/spacing";
13
+
14
+ @layer components.radio {
15
+ // Foundation
16
+ .root {
17
+ @include foundation.root();
18
+ @include foundation.fieldset();
19
+ @include variants.visual(check);
20
+ }
21
+
22
+ // 1.
23
+ .legend {
24
+ @include accessibility.hide-text();
25
+ }
26
+
27
+ // 1.
28
+ .label,
29
+ .optionLabel {
30
+ @include foundation.label();
31
+ }
32
+
33
+ .options {
34
+ @include reset.list();
35
+ }
36
+
37
+ .option {
38
+ @include inline-field-layout.field($type: radio);
39
+ @include inline-field-elements.min-tap-target($type: radio);
40
+ }
41
+
42
+ .input {
43
+ @include inline-field-elements.check-input($type: radio);
44
+ }
45
+
46
+ .helpText,
47
+ .validationText {
48
+ @include foundation.help-text();
49
+ }
50
+
51
+ .isRootRequired .label {
52
+ @include foundation.label-required();
53
+ }
54
+
55
+ // States
56
+ .isRootStateInvalid {
57
+ @include variants.validation(invalid);
58
+ }
59
+
60
+ .isRootStateValid {
61
+ @include variants.validation(valid);
62
+ }
63
+
64
+ .isRootStateWarning {
65
+ @include variants.validation(warning);
66
+ }
67
+
68
+ // Layouts
69
+ .isRootLayoutVertical,
70
+ .isRootLayoutHorizontal {
71
+ @include box-field-layout.vertical($has-list: true);
72
+ }
73
+
74
+ .isRootLayoutHorizontal {
75
+ @include box-field-layout.horizontal($has-min-tap-target: true);
76
+ }
77
+
78
+ .isRootFullWidth {
79
+ @include box-field-layout.full-width();
80
+ }
81
+
82
+ .isRootInFormLayout {
83
+ @include box-field-layout.in-form-layout($is-fieldset: true);
84
+ }
85
+ }
@@ -480,13 +480,15 @@ React.createElement(() => {
480
480
  ## Forwarding HTML Attributes
481
481
 
482
482
  In addition to the options below in the [component's API](#api) section, you
483
- can specify [React synthetic events] or **any HTML attribute you like.** All
484
- attributes that don't interfere with the API are forwarded to the `<div>` HTML
485
- element. This enables making the component interactive and helps to improve its
486
- accessibility.
483
+ can specify **any HTML attribute you like.** All attributes that don't interfere
484
+ with the API of the React component are forwarded to the root `<div>` HTML
485
+ element. This enables making the component interactive and helps to improve
486
+ its accessibility.
487
487
 
488
- 👉 Refer to the MDN reference for the full list of supported attributes of the
489
- [div] element.
488
+ 👉 For the full list of supported attributes refer to:
489
+
490
+ - [`<div>` HTML element attributes][div-attributes]{:target="_blank"}
491
+ - [React common props]{:target="_blank"}
490
492
 
491
493
  ## Forwarding ref
492
494
 
@@ -497,7 +499,7 @@ If you provide [ref], it is forwarded to the scrolling viewport native HTML
497
499
 
498
500
  <docoff-react-props src="/components/ScrollView/ScrollView.jsx"></docoff-react-props>
499
501
 
502
+ [div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
500
503
  [linear gradients]: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient/linear-gradient
501
- [React synthetic events]: https://reactjs.org/docs/events.html
502
- [div]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
504
+ [React common props]: https://react.dev/reference/react-dom/components/common#common-props
503
505
  [ref]: https://reactjs.org/docs/refs-and-the-dom.html
@@ -15,7 +15,7 @@ import { transferProps } from '../_helpers/transferProps';
15
15
  import { getElementsPositionDifference } from './_helpers/getElementsPositionDifference';
16
16
  import { useLoadResize } from './_hooks/useLoadResizeHook';
17
17
  import { useScrollPosition } from './_hooks/useScrollPositionHook';
18
- import styles from './ScrollView.scss';
18
+ import styles from './ScrollView.module.scss';
19
19
 
20
20
  // Function `getElementsPositionDifference` sometimes returns floating point values that results
21
21
  // in inaccurate detection of start/end. It is necessary to accept this inaccuracy and take
@@ -0,0 +1,233 @@
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
+ // 8. Use the `clip` value for `overflow` to prevent the content from unwanted scrolling on the
25
+ // cross axis during keyboard navigation.
26
+
27
+ @use "../../styles/tools/accessibility";
28
+ @use "../../styles/tools/caret";
29
+ @use "../../styles/tools/reset";
30
+ @use "../../styles/tools/scrollbar";
31
+ @use "../../styles/tools/spacing";
32
+ @use "../../styles/tools/transition";
33
+
34
+ $_arrow-inner-spacing: spacing.of(2);
35
+ $_arrow-outer-spacing: spacing.of(4);
36
+
37
+ @layer components.scroll-view {
38
+ .root {
39
+ position: relative; // 2.
40
+ display: flex;
41
+ flex-direction: column;
42
+ width: 100%;
43
+ }
44
+
45
+ // 1.
46
+ .scrollingShadows {
47
+ position: absolute; // 2.
48
+ width: 100%; // 2.
49
+ height: 100%; // 2.
50
+ overflow: hidden; // 2.
51
+ pointer-events: none; // 2.
52
+
53
+ &::before,
54
+ &::after {
55
+ @include transition.add((visibility, opacity, transform));
56
+
57
+ content: "";
58
+ position: absolute;
59
+ z-index: 2; // 2.
60
+ display: block;
61
+ visibility: hidden;
62
+ opacity: 0;
63
+ }
64
+
65
+ &::before {
66
+ background: var(--rui-local-start-shadow-background);
67
+ }
68
+
69
+ &::after {
70
+ background: var(--rui-local-end-shadow-background);
71
+ }
72
+ }
73
+
74
+ .viewport {
75
+ z-index: 1; // 2.
76
+ width: 100%;
77
+ scroll-behavior: smooth;
78
+ }
79
+
80
+ .arrowPrev,
81
+ .arrowNext {
82
+ @include reset.button();
83
+ @include accessibility.min-tap-target();
84
+ @include transition.add((visibility, opacity, transform));
85
+
86
+ position: absolute; // 3.
87
+ z-index: 3; // 3.
88
+ display: flex;
89
+ align-items: center;
90
+ justify-content: center;
91
+ visibility: hidden;
92
+ opacity: 0;
93
+ }
94
+
95
+ .arrowIcon {
96
+ @include caret.create();
97
+ }
98
+
99
+ .isRootVertical {
100
+ height: 100%;
101
+ min-height: 0; // 6.
102
+ }
103
+
104
+ .isRootVertical .viewport {
105
+ height: 100%;
106
+ overflow-x: clip; // 7., 8.
107
+ overflow-y: auto; // 2.
108
+ }
109
+
110
+ .isRootVertical .arrowPrev {
111
+ top: 0;
112
+ right: 0;
113
+ left: 0;
114
+ width: 100%;
115
+ padding-top: $_arrow-outer-spacing;
116
+ padding-bottom: $_arrow-inner-spacing;
117
+ color: var(--rui-local-prev-arrow-color);
118
+ transform: translateY(var(--rui-local-prev-arrow-initial-offset));
119
+ }
120
+
121
+ .isRootVertical .arrowPrev .arrowIcon {
122
+ @include caret.rotate(180);
123
+ }
124
+
125
+ .isRootVertical .arrowNext {
126
+ right: 0;
127
+ bottom: 0;
128
+ left: 0;
129
+ width: 100%;
130
+ padding-top: $_arrow-inner-spacing;
131
+ padding-bottom: $_arrow-outer-spacing;
132
+ color: var(--rui-local-next-arrow-color);
133
+ transform: translateY(calc(-1 * var(--rui-local-next-arrow-initial-offset)));
134
+ }
135
+
136
+ .isRootHorizontal {
137
+ min-width: 0; // 6.
138
+ }
139
+
140
+ .isRootHorizontal .arrowPrev {
141
+ top: 0;
142
+ bottom: 0;
143
+ left: 0;
144
+ padding-right: $_arrow-inner-spacing;
145
+ padding-left: $_arrow-outer-spacing;
146
+ transform: translateX(var(--rui-local-prev-arrow-initial-offset));
147
+ }
148
+
149
+ .isRootHorizontal .arrowPrev .arrowIcon {
150
+ @include caret.rotate(90);
151
+ }
152
+
153
+ .isRootHorizontal .arrowNext {
154
+ top: 0;
155
+ right: 0;
156
+ bottom: 0;
157
+ padding-right: $_arrow-outer-spacing;
158
+ padding-left: $_arrow-inner-spacing;
159
+ transform: translateX(calc(-1 * var(--rui-local-next-arrow-initial-offset)));
160
+ }
161
+
162
+ .isRootHorizontal .arrowNext .arrowIcon {
163
+ @include caret.rotate(270);
164
+ }
165
+
166
+ .isRootVertical .scrollingShadows::before,
167
+ .isRootVertical .scrollingShadows::after {
168
+ right: 0;
169
+ left: 0;
170
+ width: auto;
171
+ }
172
+
173
+ .isRootVertical .scrollingShadows::before {
174
+ top: 0;
175
+ height: var(--rui-local-start-shadow-size);
176
+ transform: translateY(var(--rui-local-start-shadow-initial-offset));
177
+ }
178
+
179
+ .isRootVertical .scrollingShadows::after {
180
+ bottom: 0;
181
+ height: var(--rui-local-end-shadow-size);
182
+ transform: translateY(calc(-1 * var(--rui-local-end-shadow-initial-offset)));
183
+ }
184
+
185
+ .isRootHorizontal .viewport {
186
+ overflow-x: auto; // 2.
187
+ overflow-y: clip; // 5., 7., 8.
188
+ }
189
+
190
+ .isRootHorizontal .content {
191
+ display: inline-flex; // 4.
192
+ min-width: 100%;
193
+ overflow: clip; // 8.
194
+ vertical-align: top;
195
+ }
196
+
197
+ .isRootHorizontal .scrollingShadows::before,
198
+ .isRootHorizontal .scrollingShadows::after {
199
+ top: 0;
200
+ bottom: 0;
201
+ height: auto;
202
+ }
203
+
204
+ .isRootHorizontal .scrollingShadows::before {
205
+ left: 0;
206
+ width: var(--rui-local-start-shadow-size);
207
+ transform: translateX(var(--rui-local-start-shadow-initial-offset));
208
+ }
209
+
210
+ .isRootHorizontal .scrollingShadows::after {
211
+ right: 0;
212
+ width: var(--rui-local-end-shadow-size);
213
+ transform: translateX(calc(-1 * var(--rui-local-end-shadow-initial-offset)));
214
+ }
215
+
216
+ .isRootScrolledAtStart .scrollingShadows::before,
217
+ .isRootScrolledAtStart .arrowPrev {
218
+ visibility: visible;
219
+ opacity: 1;
220
+ transform: translate(0, 0);
221
+ }
222
+
223
+ .isRootScrolledAtEnd .scrollingShadows::after,
224
+ .isRootScrolledAtEnd .arrowNext {
225
+ visibility: visible;
226
+ opacity: 1;
227
+ transform: translate(0, 0);
228
+ }
229
+
230
+ .hasRootScrollbarDisabled .viewport {
231
+ @include scrollbar.hide();
232
+ }
233
+ }
@@ -649,13 +649,15 @@ React.createElement(() => {
649
649
  ## Forwarding HTML Attributes
650
650
 
651
651
  In addition to the options below in the [component's API](#api) section, you
652
- can specify [React synthetic events] or you can **add whatever HTML attribute
653
- you like.** All attributes that don't interfere with the API are forwarded to
654
- the native HTML `<select>`. This enables making the component interactive and helps
655
- to improve its accessibility.
652
+ can specify **any HTML attribute you like.** All attributes that don't interfere
653
+ with the API of the React component are forwarded to the root `<select>` HTML
654
+ element. This enables making the component interactive and helps to improve
655
+ its accessibility.
656
656
 
657
- 👉 Refer to the MDN reference for the full list of supported attributes of the
658
- [select] element.
657
+ 👉 For the full list of supported attributes refer to:
658
+
659
+ - [`<select>` HTML element attributes][select-attributes]{:target="_blank"}
660
+ - [React common props]{:target="_blank"}
659
661
 
660
662
  ## Forwarding ref
661
663
 
@@ -676,6 +678,6 @@ options. On top of that, the following options are available for SelectField.
676
678
  | `--rui-FormField--box--select__caret__background` | SelectField arrow background (including `url()` or gradient) |
677
679
  | `--rui-FormField--box--select__option--disabled__color` | Text color of disabled SelectField options |
678
680
 
679
- [React synthetic events]: https://reactjs.org/docs/events.html
680
- [select]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes
681
+ [React common props]: https://react.dev/reference/react-dom/components/common#common-props
681
682
  [ref]: https://reactjs.org/docs/refs-and-the-dom.html
683
+ [select-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attributes
@@ -9,7 +9,7 @@ import { transferProps } from '../_helpers/transferProps';
9
9
  import { FormLayoutContext } from '../FormLayout';
10
10
  import { InputGroupContext } from '../InputGroup/InputGroupContext';
11
11
  import { Option } from './_components/Option';
12
- import styles from './SelectField.scss';
12
+ import styles from './SelectField.module.scss';
13
13
 
14
14
  export const SelectField = React.forwardRef((props, ref) => {
15
15
  const {
@@ -0,0 +1,111 @@
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
+ @layer components.select-field {
9
+ // Foundation
10
+ .root {
11
+ @include foundation.root();
12
+ }
13
+
14
+ .label {
15
+ @include foundation.label();
16
+ }
17
+
18
+ .inputContainer {
19
+ @include box-field-elements.input-container();
20
+ }
21
+
22
+ .input {
23
+ @include box-field-elements.input();
24
+ @include box-field-elements.input-select();
25
+ @include box-field-elements.input-select-option();
26
+ }
27
+
28
+ .caret {
29
+ @include box-field-elements.caret();
30
+ }
31
+
32
+ .caretIcon {
33
+ @include box-field-elements.caret-icon();
34
+ }
35
+
36
+ .bottomLine {
37
+ @include box-field-elements.bottom-line();
38
+ }
39
+
40
+ .helpText,
41
+ .validationText {
42
+ @include foundation.help-text();
43
+ }
44
+
45
+ .isRootRequired .label {
46
+ @include foundation.label-required();
47
+ }
48
+
49
+ // Variants
50
+ .isRootVariantFilled {
51
+ @include variants.visual(box, $variant: filled, $has-caret: true);
52
+ }
53
+
54
+ .isRootVariantOutline {
55
+ @include variants.visual(box, $variant: outline, $has-caret: true);
56
+ }
57
+
58
+ // States
59
+ .isRootStateInvalid {
60
+ @include variants.validation(invalid);
61
+ }
62
+
63
+ .isRootStateValid {
64
+ @include variants.validation(valid);
65
+ }
66
+
67
+ .isRootStateWarning {
68
+ @include variants.validation(warning);
69
+ }
70
+
71
+ // Invisible label
72
+ .isLabelHidden {
73
+ @include accessibility.hide-text();
74
+ }
75
+
76
+ // Layouts
77
+ .isRootLayoutVertical,
78
+ .isRootLayoutHorizontal {
79
+ @include box-field-layout.vertical();
80
+ }
81
+
82
+ .isRootLayoutHorizontal {
83
+ @include box-field-layout.horizontal();
84
+ }
85
+
86
+ .isRootFullWidth {
87
+ @include box-field-layout.full-width();
88
+ }
89
+
90
+ .isRootInFormLayout {
91
+ @include box-field-layout.in-form-layout();
92
+ }
93
+
94
+ // Sizes
95
+ .isRootSizeSmall {
96
+ @include box-field-sizes.size(small);
97
+ }
98
+
99
+ .isRootSizeMedium {
100
+ @include box-field-sizes.size(medium);
101
+ }
102
+
103
+ .isRootSizeLarge {
104
+ @include box-field-sizes.size(large);
105
+ }
106
+
107
+ // Groups
108
+ .isRootGrouped {
109
+ @include box-field-elements.in-group-layout();
110
+ }
111
+ }
@@ -243,17 +243,19 @@ React.createElement(() => {
243
243
  ## Forwarding HTML Attributes
244
244
 
245
245
  In addition to the options below in the [component's API](#api) section, you
246
- can specify [React synthetic events] or **any HTML attribute you like.** All
247
- attributes that don't interfere with the API are forwarded to the `<table>` HTML
248
- element. This enables making the component interactive and helps to improve its
249
- accessibility.
246
+ can specify **any HTML attribute you like.** All attributes that don't interfere
247
+ with the API of the React component are forwarded to the root `<table>` HTML
248
+ element. This enables making the component interactive and helps to improve
249
+ its accessibility.
250
250
 
251
- 👉 Refer to the MDN reference for the full list of supported attributes of the
252
- [table] element.
251
+ 👉 For the full list of supported attributes refer to:
252
+
253
+ - [`<table>` HTML element attributes][table-attributes]{:target="_blank"}
254
+ - [React common props]{:target="_blank"}
253
255
 
254
256
  ## API
255
257
 
256
258
  <docoff-react-props src="/components/Table/Table.jsx"></docoff-react-props>
257
259
 
258
- [React synthetic events]: https://reactjs.org/docs/events.html
259
- [table]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table#attributes
260
+ [React common props]: https://react.dev/reference/react-dom/components/common#common-props
261
+ [table-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table#attributes
@@ -4,7 +4,7 @@ import { withGlobalProps } from '../../provider';
4
4
  import { transferProps } from '../_helpers/transferProps';
5
5
  import { TableHeaderCell } from './_components/TableHeaderCell';
6
6
  import { TableBodyCell } from './_components/TableBodyCell';
7
- import styles from './Table.scss';
7
+ import styles from './Table.module.scss';
8
8
 
9
9
  export const Table = ({
10
10
  columns,
@@ -0,0 +1,30 @@
1
+ @use "../../styles/tools/transition";
2
+ @use "settings";
3
+
4
+ @layer components.table {
5
+ .table {
6
+ width: 100%;
7
+ border-collapse: collapse;
8
+ }
9
+
10
+ .tableRow,
11
+ .tableHeadRow {
12
+ @include transition.add((background-color));
13
+ }
14
+
15
+ .tableRow {
16
+ background-color: settings.$background-color;
17
+
18
+ &:hover {
19
+ background-color: settings.$hover-background-color;
20
+ }
21
+ }
22
+
23
+ .tableHeadRow {
24
+ background-color: settings.$head-background-color;
25
+
26
+ &:hover {
27
+ background-color: settings.$head-background-color;
28
+ }
29
+ }
30
+ }
@@ -1,6 +1,6 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import React from 'react';
3
- import styles from '../TableCell.scss';
3
+ import styles from '../TableCell.module.scss';
4
4
 
5
5
  export const TableBodyCell = ({
6
6
  format,