@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.
Files changed (148) hide show
  1. package/README.md +7 -5
  2. package/dist/react-ui.css +36 -38
  3. package/dist/react-ui.development.css +10021 -10523
  4. package/dist/react-ui.development.js +211 -231
  5. package/dist/react-ui.js +1 -1
  6. package/package.json +3 -2
  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 +1 -1
  41. package/src/components/InputGroup/InputGroup.module.scss +93 -0
  42. package/src/components/InputGroup/README.md +10 -8
  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/src/components/Alert/Alert.scss +0 -98
  117. package/src/components/Badge/Badge.scss +0 -107
  118. package/src/components/ButtonGroup/ButtonGroup.scss +0 -33
  119. package/src/components/Card/Card.scss +0 -70
  120. package/src/components/CheckboxField/CheckboxField.scss +0 -61
  121. package/src/components/FileInputField/FileInputField.scss +0 -63
  122. package/src/components/FormLayout/FormLayoutCustomField.scss +0 -63
  123. package/src/components/Grid/Grid.scss +0 -63
  124. package/src/components/InputGroup/InputGroup.scss +0 -91
  125. package/src/components/Modal/Modal.scss +0 -78
  126. package/src/components/Modal/ModalBody.scss +0 -18
  127. package/src/components/Modal/ModalCloseButton.scss +0 -18
  128. package/src/components/Modal/ModalContent.scss +0 -5
  129. package/src/components/Modal/ModalFooter.scss +0 -35
  130. package/src/components/Modal/ModalHeader.scss +0 -30
  131. package/src/components/Modal/ModalTitle.scss +0 -10
  132. package/src/components/Paper/Paper.scss +0 -17
  133. package/src/components/Popover/Popover.scss +0 -236
  134. package/src/components/Popover/PopoverWrapper.scss +0 -3
  135. package/src/components/Radio/Radio.scss +0 -83
  136. package/src/components/ScrollView/ScrollView.scss +0 -227
  137. package/src/components/SelectField/SelectField.scss +0 -109
  138. package/src/components/Table/Table.scss +0 -28
  139. package/src/components/Table/_components/TableCell.scss +0 -26
  140. package/src/components/Tabs/Tabs.scss +0 -28
  141. package/src/components/Tabs/TabsItem.scss +0 -117
  142. package/src/components/Text/Text.scss +0 -40
  143. package/src/components/TextArea/TextArea.scss +0 -95
  144. package/src/components/TextField/TextField.scss +0 -107
  145. package/src/components/TextLink/TextLink.scss +0 -16
  146. package/src/components/Toggle/Toggle.scss +0 -61
  147. package/src/components/Toolbar/Toolbar.scss +0 -83
  148. /package/src/components/Button/{Button.scss → Button.module.scss} +0 -0
@@ -1,98 +0,0 @@
1
- @use "sass:map";
2
- @use "../../styles/theme/typography";
3
- @use "../../styles/tools/accessibility";
4
- @use "../../styles/tools/reset";
5
- @use "settings";
6
- @use "theme";
7
- @use "tools";
8
-
9
- .root {
10
- position: relative;
11
- display: flex;
12
- align-items: flex-start;
13
- width: 100%;
14
- color: var(--rui-local-color);
15
- border-width: theme.$border-width theme.$border-width theme.$border-width theme.$stripe-width;
16
- border-style: solid;
17
- border-color: var(--rui-local-foreground-color);
18
- border-radius: theme.$border-radius;
19
- background-color: var(--rui-local-background-color);
20
- }
21
-
22
- .icon,
23
- .message {
24
- padding: theme.$padding;
25
- }
26
-
27
- .close,
28
- .icon {
29
- height: settings.$min-height;
30
- color: var(--rui-local-foreground-color);
31
- }
32
-
33
- .icon {
34
- display: flex;
35
- flex: none;
36
- align-items: center;
37
- justify-content: center;
38
- padding-right: 0;
39
- }
40
-
41
- .message {
42
- flex-grow: 1;
43
- font-weight: theme.$font-weight;
44
- font-size: settings.$font-size;
45
- line-height: settings.$line-height;
46
- }
47
-
48
- .message a,
49
- .message strong {
50
- font-weight: theme.$emphasis-font-weight;
51
- color: var(--rui-local-foreground-color);
52
- }
53
-
54
- .close {
55
- @include reset.button();
56
- @include accessibility.min-tap-target();
57
-
58
- padding: theme.$padding;
59
- font-size: map.get(typography.$font-size-values, 4);
60
- line-height: 1;
61
- }
62
-
63
- .closeSign {
64
- position: relative;
65
- top: -0.1em;
66
- }
67
-
68
- .isRootColorSuccess {
69
- @include tools.color(success);
70
- }
71
-
72
- .isRootColorWarning {
73
- @include tools.color(warning);
74
- }
75
-
76
- .isRootColorDanger {
77
- @include tools.color(danger);
78
- }
79
-
80
- .isRootColorHelp {
81
- @include tools.color(help);
82
- }
83
-
84
- .isRootColorInfo {
85
- @include tools.color(info);
86
- }
87
-
88
- .isRootColorNote {
89
- @include tools.color(note);
90
- }
91
-
92
- .isRootColorLight {
93
- @include tools.color(light);
94
- }
95
-
96
- .isRootColorDark {
97
- @include tools.color(dark);
98
- }
@@ -1,107 +0,0 @@
1
- @use "sass:map";
2
- @use "sass:math";
3
- @use "../../styles/theme/borders";
4
- @use "../../styles/theme/typography";
5
-
6
- $_badge-size: 1.25rem;
7
-
8
- .root {
9
- display: inline-block;
10
- min-width: $_badge-size;
11
- height: $_badge-size;
12
- padding: 0.25rem 0.35rem;
13
- overflow: hidden;
14
- font-weight: map.get(typography.$font-weight-values, bold);
15
- font-size: typography.$font-size-smaller;
16
- line-height: 1;
17
- text-align: center;
18
- white-space: nowrap;
19
- vertical-align: baseline;
20
- color: var(--rui-local-color);
21
- border-radius: math.div($_badge-size, 2);
22
- background-color: var(--rui-local-background-color);
23
- box-shadow: var(--rui-local-box-shadow, #{0 0 0 2px rgb(255 255 255 / 80%)});
24
- }
25
-
26
- .isRootColorSuccess {
27
- --rui-local-color: var(--rui-color-feedback-on-success);
28
- --rui-local-background-color: var(--rui-color-feedback-success);
29
- }
30
-
31
- .isRootColorWarning {
32
- --rui-local-color: var(--rui-color-feedback-on-warning);
33
- --rui-local-background-color: var(--rui-color-feedback-warning);
34
- }
35
-
36
- .isRootColorDanger {
37
- --rui-local-color: var(--rui-color-feedback-on-danger);
38
- --rui-local-background-color: var(--rui-color-feedback-danger);
39
- }
40
-
41
- .isRootColorHelp {
42
- --rui-local-color: var(--rui-color-feedback-on-help);
43
- --rui-local-background-color: var(--rui-color-feedback-help);
44
- }
45
-
46
- .isRootColorInfo {
47
- --rui-local-color: var(--rui-color-feedback-on-info);
48
- --rui-local-background-color: var(--rui-color-feedback-info);
49
- }
50
-
51
- .isRootColorNote {
52
- --rui-local-color: var(--rui-color-feedback-on-note);
53
- --rui-local-background-color: var(--rui-color-feedback-note);
54
- }
55
-
56
- .isRootColorLight {
57
- --rui-local-color: var(--rui-color-neutral-on-light);
58
- --rui-local-background-color: var(--rui-color-neutral-light);
59
- --rui-local-box-shadow: none;
60
- }
61
-
62
- .isRootColorDark {
63
- --rui-local-color: var(--rui-color-neutral-on-dark);
64
- --rui-local-background-color: var(--rui-color-neutral-dark);
65
- --rui-local-box-shadow: none;
66
- }
67
-
68
- .isRootPriorityOutline {
69
- --rui-local-background-color: transparent;
70
- --rui-local-box-shadow: none;
71
-
72
- padding-top: 0.1875rem;
73
- padding-bottom: 0.1875rem;
74
- border: borders.$width solid currentcolor;
75
- }
76
-
77
- .isRootPriorityOutline.isRootColorSuccess {
78
- --rui-local-color: var(--rui-color-feedback-success);
79
- }
80
-
81
- .isRootPriorityOutline.isRootColorWarning {
82
- --rui-local-color: var(--rui-color-feedback-warning);
83
- }
84
-
85
- .isRootPriorityOutline.isRootColorDanger {
86
- --rui-local-color: var(--rui-color-feedback-danger);
87
- }
88
-
89
- .isRootPriorityOutline.isRootColorHelp {
90
- --rui-local-color: var(--rui-color-feedback-help);
91
- }
92
-
93
- .isRootPriorityOutline.isRootColorInfo {
94
- --rui-local-color: var(--rui-color-feedback-info);
95
- }
96
-
97
- .isRootPriorityOutline.isRootColorNote {
98
- --rui-local-color: var(--rui-color-feedback-note);
99
- }
100
-
101
- .isRootPriorityOutline.isRootColorLight {
102
- --rui-local-color: var(--rui-color-neutral-light);
103
- }
104
-
105
- .isRootPriorityOutline.isRootColorDark {
106
- --rui-local-color: var(--rui-color-neutral-dark);
107
- }
@@ -1,33 +0,0 @@
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
- .root {
7
- --rui-local-inner-border-radius: #{theme.$inner-border-radius};
8
-
9
- display: inline-flex; // 1.
10
- }
11
-
12
- .isRootPriorityFilled {
13
- --rui-local-gap: #{theme.$filled-gap};
14
- --rui-local-separator-width: #{theme.$filled-separator-width};
15
- --rui-local-separator-color: #{theme.$filled-separator-color};
16
- }
17
-
18
- .isRootPriorityOutline {
19
- --rui-local-gap: #{theme.$outline-gap};
20
- --rui-local-separator-width: #{theme.$outline-separator-width};
21
- --rui-local-separator-color: #{theme.$outline-separator-color};
22
- }
23
-
24
- .isRootPriorityFlat {
25
- --rui-local-gap: #{theme.$flat-gap};
26
- --rui-local-separator-width: #{theme.$flat-separator-width};
27
- --rui-local-separator-color: #{theme.$flat-separator-color};
28
- }
29
-
30
- .isRootBlock {
31
- display: flex;
32
- width: 100%;
33
- }
@@ -1,70 +0,0 @@
1
- // 1. Retain equal card widths in flex and grid layouts independently on their content.
2
-
3
- @use "theme";
4
- @use "tools";
5
-
6
- .root {
7
- --rui-local-padding: #{theme.$padding};
8
-
9
- display: flex;
10
- flex-direction: column;
11
- min-width: 0; // 1.
12
- color: var(--rui-local-color);
13
- border: theme.$border-width solid var(--rui-local-border-color);
14
- border-radius: theme.$border-radius;
15
- background-color: var(--rui-local-background-color);
16
- }
17
-
18
- .body {
19
- flex: 1 0 auto;
20
- padding: var(--rui-local-padding);
21
- }
22
-
23
- .footer {
24
- padding: var(--rui-local-padding);
25
- }
26
-
27
- .isRootDense {
28
- --rui-local-padding: #{theme.$dense-padding};
29
- }
30
-
31
- .isRootRaised {
32
- box-shadow: theme.$raised-box-shadow;
33
- }
34
-
35
- .isRootColorSuccess {
36
- @include tools.color(success);
37
- }
38
-
39
- .isRootColorWarning {
40
- @include tools.color(warning);
41
- }
42
-
43
- .isRootColorDanger {
44
- @include tools.color(danger);
45
- }
46
-
47
- .isRootColorHelp {
48
- @include tools.color(help);
49
- }
50
-
51
- .isRootColorInfo {
52
- @include tools.color(info);
53
- }
54
-
55
- .isRootColorNote {
56
- @include tools.color(note);
57
- }
58
-
59
- .isRootColorLight {
60
- @include tools.color(light);
61
- }
62
-
63
- .isRootColorDark {
64
- @include tools.color(dark);
65
- }
66
-
67
- .isRootDisabled {
68
- background-color: theme.$disabled-background-color;
69
- opacity: theme.$disabled-opacity;
70
- }
@@ -1,61 +0,0 @@
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
- // Foundation
8
- .root {
9
- @include foundation.root();
10
- @include inline-field-layout.root();
11
- @include inline-field-elements.min-tap-target($type: checkbox);
12
- @include variants.visual(check);
13
- }
14
-
15
- .label {
16
- @include foundation.label();
17
- }
18
-
19
- .field {
20
- @include inline-field-layout.field($type: checkbox);
21
- }
22
-
23
- .input {
24
- @include inline-field-elements.check-input($type: checkbox);
25
- }
26
-
27
- .helpText,
28
- .validationText {
29
- @include foundation.help-text();
30
- }
31
-
32
- .isRootRequired .label {
33
- @include foundation.label-required();
34
- }
35
-
36
- // States
37
- .isRootStateInvalid {
38
- @include variants.validation(invalid);
39
- }
40
-
41
- .isRootStateValid {
42
- @include variants.validation(valid);
43
- }
44
-
45
- .isRootStateWarning {
46
- @include variants.validation(warning);
47
- }
48
-
49
- // Invisible label
50
- .isLabelHidden {
51
- @include accessibility.hide-text();
52
- }
53
-
54
- // Layouts
55
- .hasRootLabelBefore {
56
- @include inline-field-layout.has-label-before();
57
- }
58
-
59
- .isRootInFormLayout {
60
- @include inline-field-layout.in-form-layout();
61
- }
@@ -1,63 +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/foundation";
4
- @use "../../styles/tools/form-fields/variants";
5
- @use "../../styles/tools/accessibility";
6
-
7
- // Foundation
8
- .root {
9
- @include foundation.root();
10
- }
11
-
12
- .label {
13
- @include foundation.label();
14
- }
15
-
16
- .inputContainer {
17
- @include box-field-elements.input-container();
18
- }
19
-
20
- .helpText,
21
- .validationText {
22
- @include foundation.help-text();
23
- }
24
-
25
- .isRootRequired .label {
26
- @include foundation.label-required();
27
- }
28
-
29
- // States
30
- .isRootStateInvalid {
31
- @include variants.validation(invalid);
32
- }
33
-
34
- .isRootStateValid {
35
- @include variants.validation(valid);
36
- }
37
-
38
- .isRootStateWarning {
39
- @include variants.validation(warning);
40
- }
41
-
42
- // Invisible label
43
- .isLabelHidden {
44
- @include accessibility.hide-text();
45
- }
46
-
47
- // Layouts
48
- .isRootLayoutVertical,
49
- .isRootLayoutHorizontal {
50
- @include box-field-layout.vertical();
51
- }
52
-
53
- .isRootLayoutHorizontal {
54
- @include box-field-layout.horizontal();
55
- }
56
-
57
- .isRootFullWidth {
58
- @include box-field-layout.full-width();
59
- }
60
-
61
- .isRootInFormLayout {
62
- @include box-field-layout.in-form-layout();
63
- }
@@ -1,63 +0,0 @@
1
- @use "../../styles/tools/form-fields/foundation";
2
- @use "../../styles/tools/form-fields/box-field-layout";
3
- @use "../../styles/tools/form-fields/box-field-sizes";
4
- @use "../../styles/tools/form-fields/variants";
5
-
6
- // Foundation
7
- .root {
8
- @include box-field-layout.in-form-layout();
9
- @include variants.visual(custom);
10
- }
11
-
12
- .label {
13
- @include foundation.label();
14
- }
15
-
16
- .isRootRequired .label {
17
- @include foundation.label-required();
18
- }
19
-
20
- // States
21
- .isRootStateInvalid {
22
- @include variants.validation(invalid);
23
- }
24
-
25
- .isRootStateValid {
26
- @include variants.validation(valid);
27
- }
28
-
29
- .isRootStateWarning {
30
- @include variants.validation(warning);
31
- }
32
-
33
- // Layouts
34
- .isRootLayoutVertical,
35
- .isRootLayoutHorizontal {
36
- @include box-field-layout.vertical();
37
- }
38
-
39
- .isRootLayoutHorizontal {
40
- @include box-field-layout.horizontal();
41
- }
42
-
43
- .isRootLayoutVertical .field,
44
- .isRootLayoutHorizontal .field {
45
- width: auto;
46
- }
47
-
48
- .isRootFullWidth .field {
49
- justify-self: stretch;
50
- }
51
-
52
- // Sizes
53
- .isRootSizeSmall {
54
- @include box-field-sizes.size(small);
55
- }
56
-
57
- .isRootSizeMedium {
58
- @include box-field-sizes.size(medium);
59
- }
60
-
61
- .isRootSizeLarge {
62
- @include box-field-sizes.size(large);
63
- }
@@ -1,63 +0,0 @@
1
- // 1. Read value of `--rui-local-<PROPERTY>-<BREAKPOINT>` that might have been defined by
2
- // JavaScript and assign it to `--rui-local-<PROPERTY>` used in 2.
3
- //
4
- // Fallback cascade containing fallbacks for all previous breakpoints recursively is included
5
- // using CSS custom property fallback mechanism like this:
6
- //
7
- // Fallback for `xs` breakpoint: `<INITIAL FALLBACK>`
8
- // Fallback for `sm` breakpoint: `var(--rui-local-<PROPERTY>-xs, <INITIAL FALLBACK>)`
9
- // Fallback for `md` breakpoint: `var(--rui-local-<PROPERTY>-sm, var(--rui-local-<PROPERTY>-xs, <INIT. FALLBACK>))`
10
- //
11
- // … etc, up to the largest breakpoint.
12
- //
13
- // A media query is then created for each breakpoint (with exception of `xs` which doesn't need a
14
- // media query) and a corresponding responsive custom property variant is assigned to
15
- // `--rui-local-<PROPERTY>` that is used later in CSS, see 2.
16
- //
17
- // Example for `sm` breakpoint:
18
- //
19
- // `--rui-local-<PROPERTY>: var(--rui-local-<PROPERTY>-sm, var(--rui-local-<PROPERTY>-xs, <INITIAL FALLBACK>))`
20
- //
21
- // 2. Apply custom property value that is defined within current breakpoint, see 1.
22
-
23
- @use "sass:map";
24
- @use "../../styles/tools/spacing";
25
- @use "settings";
26
- @use "tools";
27
-
28
- .root {
29
- @include tools.assign-responsive-custom-properties(settings.$grid-responsive-properties); // 1.
30
- @include spacing.bottom(layouts);
31
-
32
- display: grid;
33
- grid-template-columns: var(--rui-local-columns); // 2.
34
- grid-template-rows: var(--rui-local-rows); // 2.
35
- grid-auto-flow: var(--rui-local-auto-flow); // 2.
36
- grid-gap: var(--rui-local-row-gap) var(--rui-local-column-gap); // 2.
37
- align-content: var(--rui-local-align-content); // 2.
38
- align-items: var(--rui-local-align-items); // 2.
39
- justify-content: var(--rui-local-justify-content); // 2.
40
- justify-items: var(--rui-local-justify-items); // 2.
41
- }
42
-
43
- // stylelint-disable-next-line selector-max-universal -- Reset any previously added margins.
44
- .root > * {
45
- margin-block: 0;
46
- }
47
-
48
- .span {
49
- @include tools.assign-responsive-custom-properties(settings.$grid-span-responsive-properties); // 1.
50
-
51
- grid-column: span var(--rui-local-column-span); // 2.
52
- grid-row: span var(--rui-local-row-span); // 2.
53
- }
54
-
55
- // stylelint-disable selector-no-qualifying-type
56
- dl.root,
57
- ol.root,
58
- ul.root {
59
- padding-left: 0;
60
- margin-left: 0;
61
- list-style: none;
62
- }
63
- // stylelint-enable selector-no-qualifying-type
@@ -1,91 +0,0 @@
1
- // 1. The class name is intentionally singular because it's targeted by other mixins too.
2
- // 2. Use a block-level display mode to prevent extra white space below grouped inputs in Safari.
3
- // 3. Prevent individual inputs from overlapping inside narrow containers.
4
- // 4. Legends are tricky to style, let's use a `div` instead.
5
- // https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#styling_with_css
6
-
7
- @use "../../styles/tools/form-fields/box-field-elements";
8
- @use "../../styles/tools/form-fields/box-field-layout";
9
- @use "../../styles/tools/form-fields/box-field-sizes";
10
- @use "../../styles/tools/form-fields/foundation";
11
- @use "../../styles/tools/form-fields/variants";
12
- @use "../../styles/tools/accessibility";
13
- @use "../../styles/tools/reset";
14
- @use "theme";
15
-
16
- .root {
17
- @include foundation.root();
18
- @include foundation.fieldset();
19
- }
20
-
21
- // 4.
22
- .legend {
23
- @include accessibility.hide-text();
24
- }
25
-
26
- // 4.
27
- .label {
28
- @include foundation.label();
29
- }
30
-
31
- .inputGroup {
32
- --rui-local-inner-border-radius: #{theme.$inner-border-radius};
33
-
34
- display: flex; // 2.
35
- gap: theme.$gap;
36
- }
37
-
38
- // 1.
39
- .validationText {
40
- @include reset.list();
41
- @include foundation.help-text();
42
- }
43
-
44
- .isRootRequired .label {
45
- @include foundation.label-required();
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
- // Layouts
62
- .isRootLayoutVertical,
63
- .isRootLayoutHorizontal {
64
- @include box-field-layout.vertical();
65
- }
66
-
67
- .isRootLayoutVertical .field,
68
- .isRootLayoutHorizontal .field {
69
- max-width: none; // 3.
70
- }
71
-
72
- .isRootLayoutHorizontal {
73
- @include box-field-layout.horizontal();
74
- }
75
-
76
- .isRootInFormLayout {
77
- @include box-field-layout.in-form-layout($is-fieldset: true);
78
- }
79
-
80
- // Sizes
81
- .isRootSizeSmall {
82
- @include box-field-sizes.size(small, $has-input: false);
83
- }
84
-
85
- .isRootSizeMedium {
86
- @include box-field-sizes.size(medium, $has-input: false);
87
- }
88
-
89
- .isRootSizeLarge {
90
- @include box-field-sizes.size(large, $has-input: false);
91
- }