@react-ui-org/react-ui 0.54.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.
- package/README.md +7 -5
- package/dist/react-ui.css +36 -38
- package/dist/react-ui.development.css +10021 -10523
- package/dist/react-ui.development.js +211 -231
- package/dist/react-ui.js +1 -1
- package/package.json +3 -2
- package/src/components/Alert/Alert.jsx +1 -1
- package/src/components/Alert/Alert.module.scss +100 -0
- package/src/components/Alert/README.md +9 -7
- package/src/components/Badge/Badge.jsx +1 -1
- package/src/components/Badge/Badge.module.scss +109 -0
- package/src/components/Badge/README.md +9 -7
- package/src/components/Button/Button.jsx +1 -1
- package/src/components/Button/README.md +9 -7
- package/src/components/Button/_base.scss +117 -115
- package/src/components/Button/_priorities.scss +135 -133
- package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
- package/src/components/ButtonGroup/ButtonGroup.module.scss +35 -0
- package/src/components/ButtonGroup/README.md +10 -8
- package/src/components/Card/Card.jsx +1 -1
- package/src/components/Card/Card.module.scss +72 -0
- package/src/components/Card/CardBody.jsx +1 -1
- package/src/components/Card/CardFooter.jsx +1 -1
- package/src/components/Card/README.md +9 -7
- package/src/components/CheckboxField/CheckboxField.jsx +1 -1
- package/src/components/CheckboxField/CheckboxField.module.scss +63 -0
- package/src/components/CheckboxField/README.md +10 -8
- package/src/components/FileInputField/FileInputField.jsx +1 -1
- package/src/components/FileInputField/FileInputField.module.scss +65 -0
- package/src/components/FileInputField/README.md +10 -8
- package/src/components/FormLayout/FormLayout.jsx +1 -1
- package/src/components/FormLayout/{FormLayout.scss → FormLayout.module.scss} +30 -28
- package/src/components/FormLayout/FormLayoutCustomField.jsx +1 -1
- package/src/components/FormLayout/FormLayoutCustomField.module.scss +65 -0
- package/src/components/FormLayout/README.md +11 -9
- package/src/components/Grid/Grid.jsx +1 -1
- package/src/components/Grid/Grid.module.scss +66 -0
- package/src/components/Grid/GridSpan.jsx +1 -1
- package/src/components/Grid/README.md +11 -8
- package/src/components/InputGroup/InputGroup.jsx +1 -1
- package/src/components/InputGroup/InputGroup.module.scss +93 -0
- package/src/components/InputGroup/README.md +10 -8
- package/src/components/Modal/Modal.jsx +1 -1
- package/src/components/Modal/Modal.module.scss +80 -0
- package/src/components/Modal/ModalBody.jsx +1 -1
- package/src/components/Modal/ModalBody.module.scss +20 -0
- package/src/components/Modal/ModalCloseButton.jsx +1 -1
- package/src/components/Modal/ModalCloseButton.module.scss +20 -0
- package/src/components/Modal/ModalContent.jsx +1 -1
- package/src/components/Modal/ModalContent.module.scss +7 -0
- package/src/components/Modal/ModalFooter.jsx +1 -1
- package/src/components/Modal/ModalFooter.module.scss +37 -0
- package/src/components/Modal/ModalHeader.jsx +1 -1
- package/src/components/Modal/ModalHeader.module.scss +32 -0
- package/src/components/Modal/ModalTitle.jsx +1 -1
- package/src/components/Modal/ModalTitle.module.scss +12 -0
- package/src/components/Modal/README.md +17 -14
- package/src/components/Paper/Paper.jsx +1 -1
- package/src/components/Paper/Paper.module.scss +19 -0
- package/src/components/Paper/README.md +9 -7
- package/src/components/Popover/Popover.jsx +1 -1
- package/src/components/Popover/Popover.module.scss +238 -0
- package/src/components/Popover/PopoverWrapper.jsx +1 -2
- package/src/components/Popover/PopoverWrapper.module.scss +5 -0
- package/src/components/Popover/README.md +9 -7
- package/src/components/Radio/README.md +12 -10
- package/src/components/Radio/Radio.jsx +1 -1
- package/src/components/Radio/Radio.module.scss +85 -0
- package/src/components/ScrollView/README.md +10 -8
- package/src/components/ScrollView/ScrollView.jsx +1 -1
- package/src/components/ScrollView/ScrollView.module.scss +233 -0
- package/src/components/SelectField/README.md +10 -8
- package/src/components/SelectField/SelectField.jsx +1 -1
- package/src/components/SelectField/SelectField.module.scss +111 -0
- package/src/components/Table/README.md +10 -8
- package/src/components/Table/Table.jsx +1 -1
- package/src/components/Table/Table.module.scss +30 -0
- package/src/components/Table/_components/TableBodyCell/TableBodyCell.jsx +1 -1
- package/src/components/Table/_components/TableCell.module.scss +28 -0
- package/src/components/Table/_components/TableHeaderCell/TableHeaderCell.jsx +1 -1
- package/src/components/Tabs/README.md +16 -10
- package/src/components/Tabs/Tabs.jsx +1 -1
- package/src/components/Tabs/Tabs.module.scss +31 -0
- package/src/components/Tabs/TabsItem.jsx +1 -1
- package/src/components/Tabs/TabsItem.module.scss +119 -0
- package/src/components/Text/README.md +15 -9
- package/src/components/Text/Text.jsx +1 -1
- package/src/components/Text/Text.module.scss +42 -0
- package/src/components/TextArea/README.md +10 -8
- package/src/components/TextArea/TextArea.jsx +1 -1
- package/src/components/TextArea/TextArea.module.scss +97 -0
- package/src/components/TextField/README.md +13 -8
- package/src/components/TextField/TextField.jsx +1 -1
- package/src/components/TextField/TextField.module.scss +109 -0
- package/src/components/TextLink/README.md +10 -8
- package/src/components/TextLink/TextLink.jsx +1 -1
- package/src/components/TextLink/TextLink.module.scss +18 -0
- package/src/components/Toggle/README.md +10 -8
- package/src/components/Toggle/Toggle.jsx +1 -1
- package/src/components/Toggle/Toggle.module.scss +63 -0
- package/src/components/Toolbar/README.md +9 -7
- package/src/components/Toolbar/Toolbar.jsx +1 -1
- package/src/components/Toolbar/Toolbar.module.scss +85 -0
- package/src/components/Toolbar/ToolbarGroup.jsx +1 -1
- package/src/components/Toolbar/ToolbarItem.jsx +1 -1
- package/src/components/_helpers/transferProps.js +47 -7
- package/src/foundation.scss +22 -17
- package/src/helpers.scss +12 -8
- package/src/index.js +3 -4
- package/src/index.scss +7 -0
- package/src/layers.scss +4 -0
- package/src/styles/elements/_page.scss +0 -4
- package/src/styles/helpers/_animation.scss +2 -2
- package/src/styles/tools/_utilities.scss +1 -1
- package/src/theme.scss +1040 -1038
- package/src/components/Alert/Alert.scss +0 -98
- package/src/components/Badge/Badge.scss +0 -107
- package/src/components/ButtonGroup/ButtonGroup.scss +0 -33
- package/src/components/Card/Card.scss +0 -70
- package/src/components/CheckboxField/CheckboxField.scss +0 -61
- package/src/components/FileInputField/FileInputField.scss +0 -63
- package/src/components/FormLayout/FormLayoutCustomField.scss +0 -63
- package/src/components/Grid/Grid.scss +0 -63
- package/src/components/InputGroup/InputGroup.scss +0 -91
- package/src/components/Modal/Modal.scss +0 -78
- package/src/components/Modal/ModalBody.scss +0 -18
- package/src/components/Modal/ModalCloseButton.scss +0 -18
- package/src/components/Modal/ModalContent.scss +0 -5
- package/src/components/Modal/ModalFooter.scss +0 -35
- package/src/components/Modal/ModalHeader.scss +0 -30
- package/src/components/Modal/ModalTitle.scss +0 -10
- package/src/components/Paper/Paper.scss +0 -17
- package/src/components/Popover/Popover.scss +0 -236
- package/src/components/Popover/PopoverWrapper.scss +0 -3
- package/src/components/Radio/Radio.scss +0 -83
- package/src/components/ScrollView/ScrollView.scss +0 -227
- package/src/components/SelectField/SelectField.scss +0 -109
- package/src/components/Table/Table.scss +0 -28
- package/src/components/Table/_components/TableCell.scss +0 -26
- package/src/components/Tabs/Tabs.scss +0 -28
- package/src/components/Tabs/TabsItem.scss +0 -117
- package/src/components/Text/Text.scss +0 -40
- package/src/components/TextArea/TextArea.scss +0 -95
- package/src/components/TextField/TextField.scss +0 -107
- package/src/components/TextLink/TextLink.scss +0 -16
- package/src/components/Toggle/Toggle.scss +0 -61
- package/src/components/Toolbar/Toolbar.scss +0 -83
- /package/src/components/Button/{Button.scss → Button.module.scss} +0 -0
|
@@ -3,145 +3,147 @@
|
|
|
3
3
|
@use "theme";
|
|
4
4
|
@use "tools";
|
|
5
5
|
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.isRootPriorityFilled.isRootColorSecondary {
|
|
11
|
-
@include tools.button-color(filled, secondary);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.isRootPriorityFilled.isRootColorSelected {
|
|
15
|
-
@include tools.button-color(filled, selected);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.isRootPriorityFilled.isRootColorSuccess {
|
|
19
|
-
@include tools.button-color(filled, success);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.isRootPriorityFilled.isRootColorWarning {
|
|
23
|
-
@include tools.button-color(filled, warning);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.isRootPriorityFilled.isRootColorDanger {
|
|
27
|
-
@include tools.button-color(filled, danger);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.isRootPriorityFilled.isRootColorHelp {
|
|
31
|
-
@include tools.button-color(filled, help);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.isRootPriorityFilled.isRootColorInfo {
|
|
35
|
-
@include tools.button-color(filled, info);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.isRootPriorityFilled.isRootColorNote {
|
|
39
|
-
@include tools.button-color(filled, note);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.isRootPriorityFilled.isRootColorLight {
|
|
43
|
-
@include tools.button-color(filled, light);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.isRootPriorityFilled.isRootColorDark {
|
|
47
|
-
@include tools.button-color(filled, dark);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.isRootPriorityOutline.isRootColorPrimary {
|
|
51
|
-
@include tools.button-color(outline, primary);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.isRootPriorityOutline.isRootColorSecondary {
|
|
55
|
-
@include tools.button-color(outline, secondary);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.isRootPriorityOutline.isRootColorSelected {
|
|
59
|
-
@include tools.button-color(outline, selected);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.isRootPriorityOutline.isRootColorSuccess {
|
|
63
|
-
@include tools.button-color(outline, success);
|
|
64
|
-
}
|
|
6
|
+
@layer components.button {
|
|
7
|
+
.isRootPriorityFilled.isRootColorPrimary {
|
|
8
|
+
@include tools.button-color(filled, primary);
|
|
9
|
+
}
|
|
65
10
|
|
|
66
|
-
.
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.isRootPriorityOutline.isRootColorDanger {
|
|
71
|
-
@include tools.button-color(outline, danger);
|
|
72
|
-
}
|
|
11
|
+
.isRootPriorityFilled.isRootColorSecondary {
|
|
12
|
+
@include tools.button-color(filled, secondary);
|
|
13
|
+
}
|
|
73
14
|
|
|
74
|
-
.
|
|
75
|
-
|
|
76
|
-
}
|
|
15
|
+
.isRootPriorityFilled.isRootColorSelected {
|
|
16
|
+
@include tools.button-color(filled, selected);
|
|
17
|
+
}
|
|
77
18
|
|
|
78
|
-
.
|
|
79
|
-
|
|
80
|
-
}
|
|
19
|
+
.isRootPriorityFilled.isRootColorSuccess {
|
|
20
|
+
@include tools.button-color(filled, success);
|
|
21
|
+
}
|
|
81
22
|
|
|
82
|
-
.
|
|
83
|
-
|
|
84
|
-
}
|
|
23
|
+
.isRootPriorityFilled.isRootColorWarning {
|
|
24
|
+
@include tools.button-color(filled, warning);
|
|
25
|
+
}
|
|
85
26
|
|
|
86
|
-
.
|
|
87
|
-
|
|
88
|
-
}
|
|
27
|
+
.isRootPriorityFilled.isRootColorDanger {
|
|
28
|
+
@include tools.button-color(filled, danger);
|
|
29
|
+
}
|
|
89
30
|
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
}
|
|
31
|
+
.isRootPriorityFilled.isRootColorHelp {
|
|
32
|
+
@include tools.button-color(filled, help);
|
|
33
|
+
}
|
|
93
34
|
|
|
94
|
-
.
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.isRootPriorityFlat.isRootColorSecondary {
|
|
99
|
-
@include tools.button-color(flat, secondary);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.isRootPriorityFlat.isRootColorSelected {
|
|
103
|
-
@include tools.button-color(flat, selected);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.isRootPriorityFlat.isRootColorSuccess {
|
|
107
|
-
@include tools.button-color(flat, success);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.isRootPriorityFlat.isRootColorWarning {
|
|
111
|
-
@include tools.button-color(flat, warning);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.isRootPriorityFlat.isRootColorDanger {
|
|
115
|
-
@include tools.button-color(flat, danger);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.isRootPriorityFlat.isRootColorHelp {
|
|
119
|
-
@include tools.button-color(flat, help);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.isRootPriorityFlat.isRootColorInfo {
|
|
123
|
-
@include tools.button-color(flat, info);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.isRootPriorityFlat.isRootColorNote {
|
|
127
|
-
@include tools.button-color(flat, note);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.isRootPriorityFlat.isRootColorLight {
|
|
131
|
-
@include tools.button-color(flat, light);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.isRootPriorityFlat.isRootColorDark {
|
|
135
|
-
@include tools.button-color(flat, dark);
|
|
136
|
-
}
|
|
35
|
+
.isRootPriorityFilled.isRootColorInfo {
|
|
36
|
+
@include tools.button-color(filled, info);
|
|
37
|
+
}
|
|
137
38
|
|
|
138
|
-
.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
39
|
+
.isRootPriorityFilled.isRootColorNote {
|
|
40
|
+
@include tools.button-color(filled, note);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.isRootPriorityFilled.isRootColorLight {
|
|
44
|
+
@include tools.button-color(filled, light);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.isRootPriorityFilled.isRootColorDark {
|
|
48
|
+
@include tools.button-color(filled, dark);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.isRootPriorityOutline.isRootColorPrimary {
|
|
52
|
+
@include tools.button-color(outline, primary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.isRootPriorityOutline.isRootColorSecondary {
|
|
56
|
+
@include tools.button-color(outline, secondary);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.isRootPriorityOutline.isRootColorSelected {
|
|
60
|
+
@include tools.button-color(outline, selected);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.isRootPriorityOutline.isRootColorSuccess {
|
|
64
|
+
@include tools.button-color(outline, success);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.isRootPriorityOutline.isRootColorWarning {
|
|
68
|
+
@include tools.button-color(outline, warning);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.isRootPriorityOutline.isRootColorDanger {
|
|
72
|
+
@include tools.button-color(outline, danger);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.isRootPriorityOutline.isRootColorHelp {
|
|
76
|
+
@include tools.button-color(outline, help);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.isRootPriorityOutline.isRootColorInfo {
|
|
80
|
+
@include tools.button-color(outline, info);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.isRootPriorityOutline.isRootColorNote {
|
|
84
|
+
@include tools.button-color(outline, note);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.isRootPriorityOutline.isRootColorLight {
|
|
88
|
+
@include tools.button-color(outline, light);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.isRootPriorityOutline.isRootColorDark {
|
|
92
|
+
@include tools.button-color(outline, dark);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.isRootPriorityFlat.isRootColorPrimary {
|
|
96
|
+
@include tools.button-color(flat, primary);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.isRootPriorityFlat.isRootColorSecondary {
|
|
100
|
+
@include tools.button-color(flat, secondary);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.isRootPriorityFlat.isRootColorSelected {
|
|
104
|
+
@include tools.button-color(flat, selected);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.isRootPriorityFlat.isRootColorSuccess {
|
|
108
|
+
@include tools.button-color(flat, success);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.isRootPriorityFlat.isRootColorWarning {
|
|
112
|
+
@include tools.button-color(flat, warning);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.isRootPriorityFlat.isRootColorDanger {
|
|
116
|
+
@include tools.button-color(flat, danger);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.isRootPriorityFlat.isRootColorHelp {
|
|
120
|
+
@include tools.button-color(flat, help);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.isRootPriorityFlat.isRootColorInfo {
|
|
124
|
+
@include tools.button-color(flat, info);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.isRootPriorityFlat.isRootColorNote {
|
|
128
|
+
@include tools.button-color(flat, note);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.isRootPriorityFlat.isRootColorLight {
|
|
132
|
+
@include tools.button-color(flat, light);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.isRootPriorityFlat.isRootColorDark {
|
|
136
|
+
@include tools.button-color(flat, dark);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.isRootInButtonGroup:not(:first-child)::before {
|
|
140
|
+
content: "";
|
|
141
|
+
position: absolute;
|
|
142
|
+
top: calc(-1 * #{theme.$border-width});
|
|
143
|
+
bottom: calc(-1 * #{theme.$border-width});
|
|
144
|
+
left: calc(-1 * #{theme.$border-width});
|
|
145
|
+
z-index: map.get(settings.$group-z-indexes, separator);
|
|
146
|
+
border-left: var(--rui-local-separator-width) solid var(--rui-local-separator-color);
|
|
147
|
+
transform: translateX(calc(-0.5 * var(--rui-local-gap) - 50%));
|
|
148
|
+
}
|
|
147
149
|
}
|
|
@@ -7,7 +7,7 @@ import { classNames } from '../../utils/classNames';
|
|
|
7
7
|
import getRootPriorityClassName from '../_helpers/getRootPriorityClassName';
|
|
8
8
|
import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
|
|
9
9
|
import { transferProps } from '../_helpers/transferProps';
|
|
10
|
-
import styles from './ButtonGroup.scss';
|
|
10
|
+
import styles from './ButtonGroup.module.scss';
|
|
11
11
|
import { ButtonGroupContext } from './ButtonGroupContext';
|
|
12
12
|
|
|
13
13
|
export const ButtonGroup = ({
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// 1. ButtonGroup gap is implemented using the `margin` property on buttons so the buttons can overlap and reduce
|
|
2
|
+
// duplicate borders.
|
|
3
|
+
|
|
4
|
+
@use "theme";
|
|
5
|
+
|
|
6
|
+
@layer components.button-group {
|
|
7
|
+
.root {
|
|
8
|
+
--rui-local-inner-border-radius: #{theme.$inner-border-radius};
|
|
9
|
+
|
|
10
|
+
display: inline-flex; // 1.
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.isRootPriorityFilled {
|
|
14
|
+
--rui-local-gap: #{theme.$filled-gap};
|
|
15
|
+
--rui-local-separator-width: #{theme.$filled-separator-width};
|
|
16
|
+
--rui-local-separator-color: #{theme.$filled-separator-color};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.isRootPriorityOutline {
|
|
20
|
+
--rui-local-gap: #{theme.$outline-gap};
|
|
21
|
+
--rui-local-separator-width: #{theme.$outline-separator-width};
|
|
22
|
+
--rui-local-separator-color: #{theme.$outline-separator-color};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.isRootPriorityFlat {
|
|
26
|
+
--rui-local-gap: #{theme.$flat-gap};
|
|
27
|
+
--rui-local-separator-width: #{theme.$flat-separator-width};
|
|
28
|
+
--rui-local-separator-color: #{theme.$flat-separator-color};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.isRootBlock {
|
|
32
|
+
display: flex;
|
|
33
|
+
width: 100%;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -249,13 +249,15 @@ and communicating the state of individual options.
|
|
|
249
249
|
## Forwarding HTML Attributes
|
|
250
250
|
|
|
251
251
|
In addition to the options below in the [component's API](#api) section, you
|
|
252
|
-
can specify
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
can specify **any HTML attribute you like.** All attributes that don't interfere
|
|
253
|
+
with the API of the React component are forwarded to the root `<div>` HTML
|
|
254
|
+
element. This enables making the component interactive and helps to improve
|
|
255
255
|
its accessibility.
|
|
256
256
|
|
|
257
|
-
👉
|
|
258
|
-
|
|
257
|
+
👉 For the full list of supported attributes refer to:
|
|
258
|
+
|
|
259
|
+
- [`<div>` HTML element attributes][div-attributes]{:target="_blank"}
|
|
260
|
+
- [React common props]{:target="_blank"}
|
|
259
261
|
|
|
260
262
|
## API
|
|
261
263
|
|
|
@@ -276,7 +278,7 @@ its accessibility.
|
|
|
276
278
|
| `--rui-ButtonGroup--flat__separator__width` | Separator width for `flat` buttons |
|
|
277
279
|
| `--rui-ButtonGroup--flat__separator__color` | Separator color for `flat` buttons |
|
|
278
280
|
|
|
279
|
-
[fieldset]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
|
|
280
281
|
[accessibility]: https://www.w3.org/WAI/tutorials/forms/grouping/
|
|
281
|
-
[
|
|
282
|
-
[
|
|
282
|
+
[div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
|
|
283
|
+
[fieldset]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset
|
|
284
|
+
[React common props]: https://react.dev/reference/react-dom/components/common#common-props
|
|
@@ -4,7 +4,7 @@ import { withGlobalProps } from '../../provider';
|
|
|
4
4
|
import { transferProps } from '../_helpers/transferProps';
|
|
5
5
|
import { classNames } from '../../utils/classNames';
|
|
6
6
|
import { getRootColorClassName } from '../_helpers/getRootColorClassName';
|
|
7
|
-
import styles from './Card.scss';
|
|
7
|
+
import styles from './Card.module.scss';
|
|
8
8
|
|
|
9
9
|
export const Card = ({
|
|
10
10
|
children,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// 1. Retain equal card widths in flex and grid layouts independently on their content.
|
|
2
|
+
|
|
3
|
+
@use "theme";
|
|
4
|
+
@use "tools";
|
|
5
|
+
|
|
6
|
+
@layer components.card {
|
|
7
|
+
.root {
|
|
8
|
+
--rui-local-padding: #{theme.$padding};
|
|
9
|
+
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
min-width: 0; // 1.
|
|
13
|
+
color: var(--rui-local-color);
|
|
14
|
+
border: theme.$border-width solid var(--rui-local-border-color);
|
|
15
|
+
border-radius: theme.$border-radius;
|
|
16
|
+
background-color: var(--rui-local-background-color);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.body {
|
|
20
|
+
flex: 1 0 auto;
|
|
21
|
+
padding: var(--rui-local-padding);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.footer {
|
|
25
|
+
padding: var(--rui-local-padding);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.isRootDense {
|
|
29
|
+
--rui-local-padding: #{theme.$dense-padding};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.isRootRaised {
|
|
33
|
+
box-shadow: theme.$raised-box-shadow;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.isRootColorSuccess {
|
|
37
|
+
@include tools.color(success);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.isRootColorWarning {
|
|
41
|
+
@include tools.color(warning);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.isRootColorDanger {
|
|
45
|
+
@include tools.color(danger);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.isRootColorHelp {
|
|
49
|
+
@include tools.color(help);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.isRootColorInfo {
|
|
53
|
+
@include tools.color(info);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.isRootColorNote {
|
|
57
|
+
@include tools.color(note);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.isRootColorLight {
|
|
61
|
+
@include tools.color(light);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.isRootColorDark {
|
|
65
|
+
@include tools.color(dark);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.isRootDisabled {
|
|
69
|
+
background-color: theme.$disabled-background-color;
|
|
70
|
+
opacity: theme.$disabled-opacity;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { withGlobalProps } from '../../provider';
|
|
4
4
|
import { transferProps } from '../_helpers/transferProps';
|
|
5
|
-
import styles from './Card.scss';
|
|
5
|
+
import styles from './Card.module.scss';
|
|
6
6
|
|
|
7
7
|
export const CardBody = ({
|
|
8
8
|
children,
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { withGlobalProps } from '../../provider';
|
|
4
4
|
import { isChildrenEmpty } from '../_helpers/isChildrenEmpty';
|
|
5
5
|
import { transferProps } from '../_helpers/transferProps';
|
|
6
|
-
import styles from './Card.scss';
|
|
6
|
+
import styles from './Card.module.scss';
|
|
7
7
|
|
|
8
8
|
export const CardFooter = ({
|
|
9
9
|
children,
|
|
@@ -255,13 +255,15 @@ its interactive elements to disallow user's interaction.
|
|
|
255
255
|
## Forwarding HTML Attributes
|
|
256
256
|
|
|
257
257
|
In addition to the options below in the [component's API](#api) section, you
|
|
258
|
-
can specify
|
|
259
|
-
|
|
260
|
-
|
|
258
|
+
can specify **any HTML attribute you like.** All attributes that don't interfere
|
|
259
|
+
with the API of the React component are forwarded to the root `<div>` HTML
|
|
260
|
+
element. This enables making the component interactive and helps to improve
|
|
261
261
|
its accessibility.
|
|
262
262
|
|
|
263
|
-
👉
|
|
264
|
-
|
|
263
|
+
👉 For the full list of supported attributes refer to:
|
|
264
|
+
|
|
265
|
+
- [`<div>` HTML element attributes][div-attributes]{:target="_blank"}
|
|
266
|
+
- [React common props]{:target="_blank"}
|
|
265
267
|
|
|
266
268
|
## API
|
|
267
269
|
|
|
@@ -310,5 +312,5 @@ Where:
|
|
|
310
312
|
- `<PROPERTY>` is one of `color` (color of text), `border-color`, or
|
|
311
313
|
`background-color`.
|
|
312
314
|
|
|
313
|
-
[
|
|
314
|
-
[
|
|
315
|
+
[div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes
|
|
316
|
+
[React common props]: https://react.dev/reference/react-dom/components/common#common-props
|
|
@@ -5,7 +5,7 @@ import { classNames } from '../../utils/classNames';
|
|
|
5
5
|
import { getRootValidationStateClassName } from '../_helpers/getRootValidationStateClassName';
|
|
6
6
|
import { transferProps } from '../_helpers/transferProps';
|
|
7
7
|
import { FormLayoutContext } from '../FormLayout';
|
|
8
|
-
import styles from './CheckboxField.scss';
|
|
8
|
+
import styles from './CheckboxField.module.scss';
|
|
9
9
|
|
|
10
10
|
export const CheckboxField = React.forwardRef((props, ref) => {
|
|
11
11
|
const {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@use "../../styles/tools/form-fields/foundation";
|
|
2
|
+
@use "../../styles/tools/form-fields/inline-field-elements";
|
|
3
|
+
@use "../../styles/tools/form-fields/inline-field-layout";
|
|
4
|
+
@use "../../styles/tools/form-fields/variants";
|
|
5
|
+
@use "../../styles/tools/accessibility";
|
|
6
|
+
|
|
7
|
+
@layer components.checkbox-field {
|
|
8
|
+
// Foundation
|
|
9
|
+
.root {
|
|
10
|
+
@include foundation.root();
|
|
11
|
+
@include inline-field-layout.root();
|
|
12
|
+
@include inline-field-elements.min-tap-target($type: checkbox);
|
|
13
|
+
@include variants.visual(check);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.label {
|
|
17
|
+
@include foundation.label();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.field {
|
|
21
|
+
@include inline-field-layout.field($type: checkbox);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.input {
|
|
25
|
+
@include inline-field-elements.check-input($type: checkbox);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.helpText,
|
|
29
|
+
.validationText {
|
|
30
|
+
@include foundation.help-text();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.isRootRequired .label {
|
|
34
|
+
@include foundation.label-required();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// States
|
|
38
|
+
.isRootStateInvalid {
|
|
39
|
+
@include variants.validation(invalid);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.isRootStateValid {
|
|
43
|
+
@include variants.validation(valid);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.isRootStateWarning {
|
|
47
|
+
@include variants.validation(warning);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Invisible label
|
|
51
|
+
.isLabelHidden {
|
|
52
|
+
@include accessibility.hide-text();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Layouts
|
|
56
|
+
.hasRootLabelBefore {
|
|
57
|
+
@include inline-field-layout.has-label-before();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.isRootInFormLayout {
|
|
61
|
+
@include inline-field-layout.in-form-layout();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -172,13 +172,15 @@ Disabled state makes the input unavailable.
|
|
|
172
172
|
## Forwarding HTML Attributes
|
|
173
173
|
|
|
174
174
|
In addition to the options below in the [component's API](#api) section, you
|
|
175
|
-
can specify
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
175
|
+
can specify **any HTML attribute you like.** All attributes that don't interfere
|
|
176
|
+
with the API of the React component are forwarded to the root `<input>` HTML
|
|
177
|
+
element. This enables making the component interactive and helps to improve
|
|
178
|
+
its accessibility.
|
|
179
179
|
|
|
180
|
-
👉
|
|
181
|
-
|
|
180
|
+
👉 For the full list of supported attributes refer to:
|
|
181
|
+
|
|
182
|
+
- [`<input type="checkbox" />` HTML element attributes][checkbox-attributes]{:target="_blank"}
|
|
183
|
+
- [React common props]{:target="_blank"}
|
|
182
184
|
|
|
183
185
|
## Forwarding ref
|
|
184
186
|
|
|
@@ -198,6 +200,6 @@ options. On top of that, the following options are available for CheckboxField.
|
|
|
198
200
|
| `--rui-FormField--check__input--checkbox__border-radius` | Input corner radius |
|
|
199
201
|
| `--rui-FormField--check__input--checkbox--checked__background-image` | Background image of checked input |
|
|
200
202
|
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
+
[checkbox-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#additional_attributes
|
|
204
|
+
[React common props]: https://react.dev/reference/react-dom/components/common#common-props
|
|
203
205
|
[ref]: https://reactjs.org/docs/refs-and-the-dom.html
|
|
@@ -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 './FileInputField.scss';
|
|
9
|
+
import styles from './FileInputField.module.scss';
|
|
10
10
|
|
|
11
11
|
export const FileInputField = React.forwardRef((props, ref) => {
|
|
12
12
|
const {
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
@use "../../styles/tools/form-fields/box-field-elements";
|
|
2
|
+
@use "../../styles/tools/form-fields/box-field-layout";
|
|
3
|
+
@use "../../styles/tools/form-fields/foundation";
|
|
4
|
+
@use "../../styles/tools/form-fields/variants";
|
|
5
|
+
@use "../../styles/tools/accessibility";
|
|
6
|
+
|
|
7
|
+
@layer components.file-input-field {
|
|
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
|
+
.helpText,
|
|
22
|
+
.validationText {
|
|
23
|
+
@include foundation.help-text();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.isRootRequired .label {
|
|
27
|
+
@include foundation.label-required();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// States
|
|
31
|
+
.isRootStateInvalid {
|
|
32
|
+
@include variants.validation(invalid);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.isRootStateValid {
|
|
36
|
+
@include variants.validation(valid);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.isRootStateWarning {
|
|
40
|
+
@include variants.validation(warning);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Invisible label
|
|
44
|
+
.isLabelHidden {
|
|
45
|
+
@include accessibility.hide-text();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Layouts
|
|
49
|
+
.isRootLayoutVertical,
|
|
50
|
+
.isRootLayoutHorizontal {
|
|
51
|
+
@include box-field-layout.vertical();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.isRootLayoutHorizontal {
|
|
55
|
+
@include box-field-layout.horizontal();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.isRootFullWidth {
|
|
59
|
+
@include box-field-layout.full-width();
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.isRootInFormLayout {
|
|
63
|
+
@include box-field-layout.in-form-layout();
|
|
64
|
+
}
|
|
65
|
+
}
|