@react-ui-org/react-ui 0.56.0 → 0.57.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 (40) hide show
  1. package/dist/react-ui.css +14 -14
  2. package/dist/react-ui.development.css +2352 -843
  3. package/dist/react-ui.development.js +10 -10
  4. package/dist/react-ui.js +1 -1
  5. package/package.json +2 -2
  6. package/src/CNAME +1 -0
  7. package/src/components/Alert/Alert.jsx +2 -1
  8. package/src/components/Alert/Alert.module.scss +9 -31
  9. package/src/components/Alert/README.md +6 -5
  10. package/src/components/Alert/_settings.scss +5 -0
  11. package/src/components/Alert/_theme.scss +0 -43
  12. package/src/components/Badge/Badge.jsx +4 -2
  13. package/src/components/Badge/Badge.module.scss +29 -74
  14. package/src/components/Badge/README.md +19 -2
  15. package/src/components/Badge/_settings.scss +8 -0
  16. package/src/components/Button/Button.jsx +3 -2
  17. package/src/components/Button/Button.module.scss +183 -2
  18. package/src/components/Button/README.md +8 -6
  19. package/src/components/Button/_settings.scss +8 -3
  20. package/src/components/Button/_theme.scss +0 -3
  21. package/src/components/Button/_tools.scss +7 -71
  22. package/src/components/ButtonGroup/ButtonGroup.jsx +1 -1
  23. package/src/components/Card/Card.jsx +2 -1
  24. package/src/components/Card/Card.module.scss +10 -31
  25. package/src/components/Card/README.md +6 -6
  26. package/src/components/Card/_settings.scss +5 -0
  27. package/src/components/Card/_theme.scss +0 -43
  28. package/src/components/Grid/Grid.module.scss +9 -2
  29. package/src/components/Popover/Popover.module.scss +16 -16
  30. package/src/components/Popover/_theme.scss +4 -2
  31. package/src/components/_helpers/getRootPriorityClassName.js +1 -1
  32. package/src/styles/settings/_collections.scss +9 -0
  33. package/src/styles/tools/_collections.scss +191 -0
  34. package/src/styles/tools/_string.scss +5 -2
  35. package/src/styles/tools/form-fields/_box-field-layout.scss +7 -1
  36. package/src/theme.scss +64 -0
  37. package/src/components/Alert/_tools.scss +0 -10
  38. package/src/components/Button/_base.scss +0 -156
  39. package/src/components/Button/_priorities.scss +0 -149
  40. package/src/components/Card/_tools.scss +0 -10
package/src/theme.scss CHANGED
@@ -306,6 +306,70 @@
306
306
  --rui-Alert--dark__foreground-color: var(--rui-color-neutral-on-dark);
307
307
  --rui-Alert--dark__background-color: var(--rui-color-background-dark);
308
308
 
309
+ //
310
+ // Badge
311
+ // =====
312
+
313
+ // Badge: filled priority
314
+
315
+ // Badge: filled priority: success variant
316
+ --rui-Badge--filled--success__color: var(--rui-color-feedback-on-success);
317
+ --rui-Badge--filled--success__background-color: var(--rui-color-feedback-success);
318
+
319
+ // Badge: filled priority: warning variant
320
+ --rui-Badge--filled--warning__color: var(--rui-color-feedback-on-warning);
321
+ --rui-Badge--filled--warning__background-color: var(--rui-color-feedback-warning);
322
+
323
+ // Badge: filled priority: danger variant
324
+ --rui-Badge--filled--danger__color: var(--rui-color-feedback-on-danger);
325
+ --rui-Badge--filled--danger__background-color: var(--rui-color-feedback-danger);
326
+
327
+ // Badge: filled priority: help variant
328
+ --rui-Badge--filled--help__color: var(--rui-color-feedback-on-help);
329
+ --rui-Badge--filled--help__background-color: var(--rui-color-feedback-help);
330
+
331
+ // Badge: filled priority: info variant
332
+ --rui-Badge--filled--info__color: var(--rui-color-feedback-on-info);
333
+ --rui-Badge--filled--info__background-color: var(--rui-color-feedback-info);
334
+
335
+ // Badge: filled priority: note variant
336
+ --rui-Badge--filled--note__color: var(--rui-color-feedback-on-note);
337
+ --rui-Badge--filled--note__background-color: var(--rui-color-feedback-note);
338
+
339
+ // Badge: filled priority: light variant
340
+ --rui-Badge--filled--light__color: var(--rui-color-neutral-on-light);
341
+ --rui-Badge--filled--light__background-color: var(--rui-color-neutral-light);
342
+
343
+ // Badge: filled priority: dark variant
344
+ --rui-Badge--filled--dark__color: var(--rui-color-neutral-on-dark);
345
+ --rui-Badge--filled--dark__background-color: var(--rui-color-neutral-dark);
346
+
347
+ // Badge: outline priority
348
+
349
+ // Badge: outline priority: success variant
350
+ --rui-Badge--outline--success__color: var(--rui-color-feedback-success);
351
+
352
+ // Badge: outline priority: warning variant
353
+ --rui-Badge--outline--warning__color: var(--rui-color-feedback-warning);
354
+
355
+ // Badge: outline priority: danger variant
356
+ --rui-Badge--outline--danger__color: var(--rui-color-feedback-danger);
357
+
358
+ // Badge: outline priority: help variant
359
+ --rui-Badge--outline--help__color: var(--rui-color-feedback-help);
360
+
361
+ // Badge: outline priority: info variant
362
+ --rui-Badge--outline--info__color: var(--rui-color-feedback-info);
363
+
364
+ // Badge: outline priority: note variant
365
+ --rui-Badge--outline--note__color: var(--rui-color-feedback-note);
366
+
367
+ // Badge: outline priority: light variant
368
+ --rui-Badge--outline--light__color: var(--rui-color-neutral-light);
369
+
370
+ // Badge: outline priority: dark variant
371
+ --rui-Badge--outline--dark__color: var(--rui-color-neutral-dark);
372
+
309
373
  //
310
374
  // Button
311
375
  // ======
@@ -1,10 +0,0 @@
1
- @use "sass:map";
2
- @use "theme";
3
-
4
- @mixin color($color) {
5
- $color-variant-properties: map.get(theme.$colors, $color);
6
-
7
- --rui-local-color: #{map.get($color-variant-properties, color)};
8
- --rui-local-foreground-color: #{map.get($color-variant-properties, foreground-color)};
9
- --rui-local-background-color: #{map.get($color-variant-properties, background-color)};
10
- }
@@ -1,156 +0,0 @@
1
- // 1. ButtonGroup gap is implemented using the `margin` property so the buttons can overlap and reduce duplicate
2
- // borders.
3
-
4
- @use "sass:map";
5
- @use "../../styles/tools/breakpoint";
6
- @use "settings";
7
- @use "theme";
8
- @use "tools";
9
-
10
- @layer components.button {
11
- .root {
12
- @include tools.button();
13
- }
14
-
15
- .label {
16
- display: block;
17
- }
18
-
19
- .beforeLabel,
20
- .afterLabel,
21
- .startCorner,
22
- .endCorner,
23
- .feedbackIcon {
24
- display: flex;
25
- align-items: baseline;
26
- justify-content: center;
27
- }
28
-
29
- .startCorner,
30
- .endCorner {
31
- position: absolute;
32
- top: -0.35rem;
33
- z-index: 2;
34
- }
35
-
36
- .startCorner {
37
- left: 0;
38
- margin-left: -0.35rem;
39
- }
40
-
41
- .endCorner {
42
- right: 0;
43
- margin-right: -0.35rem;
44
- }
45
-
46
- .feedbackIcon {
47
- position: absolute;
48
- inset: 0;
49
- z-index: 1;
50
- align-items: center;
51
- }
52
-
53
- .isRootSizeSmall {
54
- @include tools.button-size(small);
55
- }
56
-
57
- .isRootSizeMedium {
58
- @include tools.button-size(medium);
59
- }
60
-
61
- .isRootSizeLarge {
62
- @include tools.button-size(large);
63
- }
64
-
65
- .isRootBlock {
66
- width: 100%;
67
- }
68
-
69
- .hasRootFeedback:disabled {
70
- opacity: theme.$feedback-opacity;
71
- cursor: theme.$feedback-cursor;
72
- }
73
-
74
- .hasRootFeedback .label,
75
- .hasRootFeedback .beforeLabel,
76
- .hasRootFeedback .afterLabel {
77
- color: transparent;
78
- }
79
-
80
- .isRootInButtonGroup,
81
- .isRootInInputGroup {
82
- z-index: map.get(settings.$group-z-indexes, button);
83
-
84
- &:not(:first-child) {
85
- border-start-start-radius: var(--rui-local-inner-border-radius);
86
- border-end-start-radius: var(--rui-local-inner-border-radius);
87
- }
88
-
89
- &:not(:last-child) {
90
- border-start-end-radius: var(--rui-local-inner-border-radius);
91
- border-end-end-radius: var(--rui-local-inner-border-radius);
92
- }
93
- }
94
-
95
- .isRootInButtonGroup:not(:first-child) {
96
- margin-inline-start: var(--rui-local-gap); // 1.
97
- }
98
-
99
- .isRootInButtonGroup:focus,
100
- .isRootInButtonGroup:not(:disabled):hover {
101
- z-index: map.get(settings.$group-z-indexes, button-hover);
102
- }
103
-
104
- .isRootInButtonGroup .startCorner,
105
- .isRootInInputGroup .startCorner,
106
- .isRootInButtonGroup .endCorner,
107
- .isRootInInputGroup .endCorner {
108
- z-index: map.get(settings.$group-z-indexes, button-overflowing-elements);
109
- }
110
-
111
- .hasLabelHidden,
112
- .hasLabelVisibleSm,
113
- .hasLabelVisibleMd,
114
- .hasLabelVisibleLg,
115
- .hasLabelVisibleXl,
116
- .hasLabelVisibleX2l,
117
- .hasLabelVisibleX3l {
118
- @include tools.hide-label();
119
- }
120
-
121
- .hasLabelVisibleSm {
122
- @include breakpoint.up(sm) {
123
- @include tools.show-label();
124
- }
125
- }
126
-
127
- .hasLabelVisibleMd {
128
- @include breakpoint.up(md) {
129
- @include tools.show-label();
130
- }
131
- }
132
-
133
- .hasLabelVisibleLg {
134
- @include breakpoint.up(lg) {
135
- @include tools.show-label();
136
- }
137
- }
138
-
139
- .hasLabelVisibleXl {
140
- @include breakpoint.up(xl) {
141
- @include tools.show-label();
142
- }
143
- }
144
-
145
- .hasLabelVisibleX2l {
146
- @include breakpoint.up(x2l) {
147
- @include tools.show-label();
148
- }
149
- }
150
-
151
- .hasLabelVisibleX3l {
152
- @include breakpoint.up(x3l) {
153
- @include tools.show-label();
154
- }
155
- }
156
- }
@@ -1,149 +0,0 @@
1
- @use "sass:map";
2
- @use "settings";
3
- @use "theme";
4
- @use "tools";
5
-
6
- @layer components.button {
7
- .isRootPriorityFilled.isRootColorPrimary {
8
- @include tools.button-color(filled, primary);
9
- }
10
-
11
- .isRootPriorityFilled.isRootColorSecondary {
12
- @include tools.button-color(filled, secondary);
13
- }
14
-
15
- .isRootPriorityFilled.isRootColorSelected {
16
- @include tools.button-color(filled, selected);
17
- }
18
-
19
- .isRootPriorityFilled.isRootColorSuccess {
20
- @include tools.button-color(filled, success);
21
- }
22
-
23
- .isRootPriorityFilled.isRootColorWarning {
24
- @include tools.button-color(filled, warning);
25
- }
26
-
27
- .isRootPriorityFilled.isRootColorDanger {
28
- @include tools.button-color(filled, danger);
29
- }
30
-
31
- .isRootPriorityFilled.isRootColorHelp {
32
- @include tools.button-color(filled, help);
33
- }
34
-
35
- .isRootPriorityFilled.isRootColorInfo {
36
- @include tools.button-color(filled, info);
37
- }
38
-
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
- }
149
- }
@@ -1,10 +0,0 @@
1
- @use "sass:map";
2
- @use "theme";
3
-
4
- @mixin color($color) {
5
- $color-variant-properties: map.get(theme.$colors, $color);
6
-
7
- --rui-local-color: #{map.get($color-variant-properties, color)};
8
- --rui-local-border-color: #{map.get($color-variant-properties, border-color)};
9
- --rui-local-background-color: #{map.get($color-variant-properties, background-color)};
10
- }