@rt-tools/ui-kit 0.3.1 → 0.5.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 (42) hide show
  1. package/README.md +1 -1
  2. package/fesm2022/rt-tools-ui-kit.mjs +4394 -3750
  3. package/fesm2022/rt-tools-ui-kit.mjs.map +1 -1
  4. package/package.json +3 -4
  5. package/rt-tools-ui-kit-0.5.0.tgz +0 -0
  6. package/src/lib/ui-kit/action-bar/components/bar/rtui-action-bar.component.scss +14 -0
  7. package/src/lib/ui-kit/action-bar/components/container/rtui-action-bar-container.component.scss +47 -0
  8. package/src/lib/ui-kit/action-bar/stories/component/test-action-bar.component.scss +15 -0
  9. package/src/lib/ui-kit/aside/components/container/aside-container.component.scss +4 -1
  10. package/src/lib/ui-kit/aside/components/error-notification/aside-error-box.component.scss +1 -1
  11. package/src/lib/ui-kit/aside/components/panel/aside-panel.component.scss +24 -0
  12. package/src/lib/ui-kit/buttons/unified-button/rtui-button.component.scss +210 -206
  13. package/src/lib/ui-kit/buttons/unified-button/stories/component/test-button-matrix.component.scss +38 -0
  14. package/src/lib/ui-kit/icon/rtui-icon.component.scss +43 -24
  15. package/src/lib/ui-kit/info-badge/info-badge.component.scss +23 -23
  16. package/src/lib/ui-kit/popover/stories/component/test-popover.component.scss +32 -0
  17. package/src/lib/ui-kit/scrollable/scrollable-container.component.scss +57 -0
  18. package/src/lib/ui-kit/scrollable/stories/component/test-scrollable.component.scss +17 -0
  19. package/src/lib/ui-kit/side-menu/menu/rtui-side-menu.component.scss +185 -4
  20. package/src/lib/ui-kit/side-menu/menu-sub-item/rtui-side-menu-sub-item.component.scss +45 -4
  21. package/src/lib/ui-kit/snack-bar/snack-bar.component.scss +20 -0
  22. package/src/lib/ui-kit/spinner/spinner.component.scss +1 -1
  23. package/src/lib/ui-kit/table/components/pagination-view/rtui-pagination.component.scss +20 -17
  24. package/src/lib/ui-kit/table/components/table-base-cell/table-base-cell.component.scss +21 -0
  25. package/src/lib/ui-kit/table/components/table-container/table-container.component.scss +26 -0
  26. package/src/lib/ui-kit/table/stories/dynamic-list/test-dynamic-list.component.scss +18 -0
  27. package/src/lib/ui-kit/toolbar/stories/component/test-toolbar.component.scss +22 -0
  28. package/src/styles/TOKENS.md +25 -16
  29. package/src/styles/base/_base.scss +6 -3
  30. package/src/styles/base/_tokens.scss +24 -0
  31. package/src/styles/color-scheme.spec.ts +4 -1
  32. package/src/styles/components/_rtui_button.scss +13 -547
  33. package/src/styles/components/button/_base.scss +64 -0
  34. package/src/styles/components/button/_map.scss +184 -0
  35. package/src/styles/components/button/_palettes.scss +218 -0
  36. package/src/styles/components/button/_sizes.scss +29 -0
  37. package/src/styles/components/button/_text.scss +68 -0
  38. package/src/styles/main.scss +0 -1
  39. package/styles/tokens.css +11 -0
  40. package/types/rt-tools-ui-kit.d.ts +614 -361
  41. package/rt-tools-ui-kit-0.3.1.tgz +0 -0
  42. package/src/styles/components/_button.scss +0 -372
@@ -6,276 +6,280 @@
6
6
  display: block;
7
7
  width: 100%;
8
8
 
9
- .rtui-button,
10
- .rtui-button-material {
9
+ .rtui-button__control,
10
+ .rtui-button__material {
11
11
  width: 100%;
12
12
  }
13
13
  }
14
14
 
15
+ /* Класс блока и его модификаторы висят на хосте, поэтому правило вида
16
+ `&--type-pill &__control` читается как «кнопка внутри блока такого-то вида». */
15
17
  .rtui-button {
16
- position: relative;
17
- display: inline-flex;
18
- overflow: hidden;
19
- align-items: center;
20
- justify-content: center;
21
- border: 0;
22
- background-color: transparent;
23
- color: var(--mat-sys-on-surface-variant);
24
- cursor: pointer;
25
- line-height: 1;
26
- transition:
27
- background-color 0.15s ease,
28
- color 0.15s ease,
29
- opacity 0.15s ease;
30
-
31
- rtui-icon {
32
- color: inherit;
33
- }
34
-
35
- rtui-spinner {
36
- display: flex;
18
+ &__control {
19
+ position: relative;
20
+ display: inline-flex;
21
+ overflow: hidden;
37
22
  align-items: center;
38
23
  justify-content: center;
39
- }
24
+ border: 0;
25
+ background-color: transparent;
26
+ color: var(--mat-sys-on-surface-variant);
27
+ cursor: pointer;
28
+ line-height: 1;
29
+ transition:
30
+ background-color 0.15s ease,
31
+ color 0.15s ease,
32
+ opacity 0.15s ease;
33
+
34
+ rtui-icon {
35
+ color: inherit;
36
+ }
40
37
 
41
- &:disabled {
42
- cursor: not-allowed;
43
- opacity: 0.38;
44
- }
38
+ rtui-spinner {
39
+ display: flex;
40
+ align-items: center;
41
+ justify-content: center;
42
+ }
45
43
 
46
- &--loading {
47
- cursor: wait;
44
+ &:disabled {
45
+ cursor: not-allowed;
46
+ opacity: 0.38;
47
+ }
48
48
  }
49
49
 
50
- /* ===================== icon / fab ===================== */
51
- &--type-icon,
52
- &--type-fab {
53
- border-radius: 1.5rem;
50
+ /* ===================== design: material =====================
51
+ Under `design: 'material'` the pill renders a NATIVE Material button (see the
52
+ template) whose look is fully owned by the Material theme. The only styling
53
+ the library adds is the variant mapping: `danger` re-points the button's own
54
+ theme tokens at the M3 error role (M3 has no success/warning roles, so every
55
+ other variant keeps the theme primary). */
56
+ &__material {
57
+ rtui-spinner {
58
+ display: flex;
59
+ align-items: center;
60
+ justify-content: center;
61
+ }
54
62
 
55
- &:hover:not(:disabled) {
56
- background-color: var(--rt-bg-base-hover);
63
+ &--danger {
64
+ --mat-button-filled-container-color: var(--mat-sys-error);
65
+ --mat-button-filled-label-text-color: var(--mat-sys-on-error);
66
+ --mat-button-filled-state-layer-color: var(--mat-sys-on-error);
67
+ --mat-button-filled-ripple-color: color-mix(in srgb, var(--mat-sys-on-error) 12%, transparent);
68
+ --mat-button-outlined-label-text-color: var(--mat-sys-error);
69
+ --mat-button-outlined-outline-color: var(--mat-sys-error);
70
+ --mat-button-outlined-state-layer-color: var(--mat-sys-error);
71
+ --mat-button-outlined-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
72
+ --mat-button-text-label-text-color: var(--mat-sys-error);
73
+ --mat-button-text-state-layer-color: var(--mat-sys-error);
74
+ --mat-button-text-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
75
+ --mat-button-tonal-container-color: var(--mat-sys-error-container);
76
+ --mat-button-tonal-label-text-color: var(--mat-sys-on-error-container);
77
+ --mat-button-tonal-state-layer-color: var(--mat-sys-on-error-container);
78
+ --mat-button-tonal-ripple-color: color-mix(in srgb, var(--mat-sys-on-error-container) 12%, transparent);
57
79
  }
58
80
  }
81
+ }
59
82
 
60
- &--type-icon.rtui-button--size-xs,
61
- &--type-fab.rtui-button--size-xs {
62
- padding: 0.25rem;
63
- }
83
+ :host(.rtui-button--loading) .rtui-button__control {
84
+ cursor: wait;
85
+ }
64
86
 
65
- &--type-icon.rtui-button--size-sm,
66
- &--type-fab.rtui-button--size-sm {
67
- padding: 0.375rem;
68
- }
87
+ /* ===================== icon / fab ===================== */
88
+ :host(.rtui-button--type-icon) .rtui-button__control,
89
+ :host(.rtui-button--type-fab) .rtui-button__control {
90
+ border-radius: var(--rt-radius-xl);
69
91
 
70
- &--type-icon.rtui-button--size-md,
71
- &--type-fab.rtui-button--size-md {
72
- padding: 0.5rem;
92
+ &:hover:not(:disabled) {
93
+ background-color: var(--rt-bg-base-hover);
73
94
  }
95
+ }
74
96
 
75
- &--type-icon.rtui-button--size-lg,
76
- &--type-fab.rtui-button--size-lg {
77
- padding: 0.625rem;
78
- }
97
+ :host(.rtui-button--type-icon.rtui-button--size-xs) .rtui-button__control,
98
+ :host(.rtui-button--type-fab.rtui-button--size-xs) .rtui-button__control {
99
+ padding: var(--rt-spacing-4);
100
+ }
79
101
 
80
- &--type-icon.rtui-button--variant-primary,
81
- &--type-fab.rtui-button--variant-primary {
82
- color: var(--rt-icon-accent-primary);
83
- }
102
+ :host(.rtui-button--type-icon.rtui-button--size-sm) .rtui-button__control,
103
+ :host(.rtui-button--type-fab.rtui-button--size-sm) .rtui-button__control {
104
+ padding: var(--rt-spacing-6);
105
+ }
84
106
 
85
- &--type-icon.rtui-button--variant-danger,
86
- &--type-fab.rtui-button--variant-danger {
87
- color: var(--rt-icon-accent-danger);
88
- }
107
+ :host(.rtui-button--type-icon.rtui-button--size-md) .rtui-button__control,
108
+ :host(.rtui-button--type-fab.rtui-button--size-md) .rtui-button__control {
109
+ padding: var(--rt-spacing-8);
110
+ }
89
111
 
90
- &--type-icon.rtui-button--variant-success,
91
- &--type-fab.rtui-button--variant-success {
92
- color: var(--rt-icon-accent-success);
93
- }
112
+ :host(.rtui-button--type-icon.rtui-button--size-lg) .rtui-button__control,
113
+ :host(.rtui-button--type-fab.rtui-button--size-lg) .rtui-button__control {
114
+ padding: var(--rt-spacing-10);
115
+ }
94
116
 
95
- &--type-icon.rtui-button--variant-warning,
96
- &--type-fab.rtui-button--variant-warning {
97
- color: var(--rt-icon-accent-warning);
98
- }
117
+ :host(.rtui-button--type-icon.rtui-button--variant-primary) .rtui-button__control,
118
+ :host(.rtui-button--type-fab.rtui-button--variant-primary) .rtui-button__control {
119
+ color: var(--rt-icon-accent-primary);
120
+ }
99
121
 
100
- &--type-icon.rtui-button--variant-accent,
101
- &--type-fab.rtui-button--variant-accent {
102
- color: var(--rt-icon-accent-info);
103
- }
122
+ :host(.rtui-button--type-icon.rtui-button--variant-danger) .rtui-button__control,
123
+ :host(.rtui-button--type-fab.rtui-button--variant-danger) .rtui-button__control {
124
+ color: var(--rt-icon-accent-danger);
125
+ }
104
126
 
105
- /* ===================== pill ===================== */
106
- &--type-pill {
107
- border-radius: 1.5rem;
108
- background-color: var(--mat-sys-surface-container-high);
109
- color: var(--mat-sys-on-surface-variant);
110
- font-weight: 500;
111
- gap: 0.375rem;
127
+ :host(.rtui-button--type-icon.rtui-button--variant-success) .rtui-button__control,
128
+ :host(.rtui-button--type-fab.rtui-button--variant-success) .rtui-button__control {
129
+ color: var(--rt-icon-accent-success);
130
+ }
112
131
 
113
- &:hover:not(:disabled) {
114
- background-color: var(--mat-sys-surface-container-highest);
115
- }
132
+ :host(.rtui-button--type-icon.rtui-button--variant-warning) .rtui-button__control,
133
+ :host(.rtui-button--type-fab.rtui-button--variant-warning) .rtui-button__control {
134
+ color: var(--rt-icon-accent-warning);
135
+ }
116
136
 
117
- &:active:not(:disabled) {
118
- background-color: var(--mat-sys-surface-dim);
119
- }
120
- }
137
+ :host(.rtui-button--type-icon.rtui-button--variant-accent) .rtui-button__control,
138
+ :host(.rtui-button--type-fab.rtui-button--variant-accent) .rtui-button__control {
139
+ color: var(--rt-icon-accent-info);
140
+ }
121
141
 
122
- /* pill sizes */
123
- &--type-pill.rtui-button--size-xs {
124
- padding: 0.25rem 0.5rem;
125
- font-size: 0.6875rem;
126
- }
142
+ /* ===================== pill ===================== */
143
+ :host(.rtui-button--type-pill) .rtui-button__control {
144
+ border-radius: var(--rt-radius-xl);
145
+ background-color: var(--mat-sys-surface-container-high);
146
+ color: var(--mat-sys-on-surface-variant);
147
+ font-weight: var(--rt-font-weight-medium);
148
+ gap: var(--rt-spacing-6);
127
149
 
128
- &--type-pill.rtui-button--size-sm {
129
- padding: 0.375rem 0.625rem;
130
- font-size: 0.75rem;
150
+ &:hover:not(:disabled) {
151
+ background-color: var(--mat-sys-surface-container-highest);
131
152
  }
132
153
 
133
- &--type-pill.rtui-button--size-md {
134
- padding: 0.5rem 0.875rem;
135
- font-size: 0.8125rem;
154
+ &:active:not(:disabled) {
155
+ background-color: var(--mat-sys-surface-dim);
136
156
  }
157
+ }
137
158
 
138
- &--type-pill.rtui-button--size-lg {
139
- padding: 0.625rem 1rem;
140
- font-size: 0.875rem;
141
- }
159
+ /* pill sizes */
160
+ :host(.rtui-button--type-pill.rtui-button--size-xs) .rtui-button__control {
161
+ padding: var(--rt-spacing-4) var(--rt-spacing-8);
162
+ font-size: var(--rt-font-size-xs);
163
+ }
142
164
 
143
- /* pill radius */
144
- &--type-pill.rtui-button--radius-none {
145
- border-radius: 0;
146
- }
165
+ :host(.rtui-button--type-pill.rtui-button--size-sm) .rtui-button__control {
166
+ padding: var(--rt-spacing-6) var(--rt-spacing-10);
167
+ font-size: var(--rt-font-size-xs);
168
+ }
147
169
 
148
- &--type-pill.rtui-button--radius-sm {
149
- border-radius: 0.25rem;
150
- }
170
+ :host(.rtui-button--type-pill.rtui-button--size-md) .rtui-button__control {
171
+ padding: var(--rt-spacing-8) var(--rt-spacing-14);
172
+ font-size: var(--rt-font-size-sm);
173
+ }
151
174
 
152
- &--type-pill.rtui-button--radius-md {
153
- border-radius: 0.5rem;
154
- }
175
+ :host(.rtui-button--type-pill.rtui-button--size-lg) .rtui-button__control {
176
+ padding: var(--rt-spacing-10) var(--rt-spacing-16);
177
+ font-size: var(--rt-font-size-sm);
178
+ }
155
179
 
156
- &--type-pill.rtui-button--radius-lg {
157
- border-radius: 0.75rem;
158
- }
180
+ /* pill radius */
181
+ :host(.rtui-button--type-pill.rtui-button--radius-none) .rtui-button__control {
182
+ border-radius: 0;
183
+ }
159
184
 
160
- &--type-pill.rtui-button--radius-full {
161
- border-radius: 1.5rem;
162
- }
185
+ :host(.rtui-button--type-pill.rtui-button--radius-sm) .rtui-button__control {
186
+ border-radius: var(--rt-radius-xs);
187
+ }
163
188
 
164
- /* pill variants */
165
- &--type-pill.rtui-button--variant-primary {
166
- background-color: var(--rt-bg-accent-primary-subtle);
167
- color: var(--rt-text-accent-primary);
189
+ :host(.rtui-button--type-pill.rtui-button--radius-md) .rtui-button__control {
190
+ border-radius: var(--rt-radius-sm);
191
+ }
168
192
 
169
- &:hover:not(:disabled) {
170
- background-color: color-mix(in srgb, var(--rt-bg-accent-primary-subtle) 92%, var(--rt-color-neutral-100));
171
- }
193
+ :host(.rtui-button--type-pill.rtui-button--radius-lg) .rtui-button__control {
194
+ border-radius: var(--rt-radius-md);
195
+ }
172
196
 
173
- &:active:not(:disabled) {
174
- background-color: color-mix(in srgb, var(--rt-bg-accent-primary-subtle) 84%, var(--rt-color-neutral-100));
175
- }
176
- }
197
+ :host(.rtui-button--type-pill.rtui-button--radius-full) .rtui-button__control {
198
+ border-radius: var(--rt-radius-xl);
199
+ }
177
200
 
178
- &--type-pill.rtui-button--variant-danger {
179
- background-color: var(--rt-bg-accent-danger-subtle);
180
- color: var(--rt-text-accent-danger);
201
+ /* pill variants */
202
+ :host(.rtui-button--type-pill.rtui-button--variant-primary) .rtui-button__control {
203
+ background-color: var(--rt-bg-accent-primary-subtle);
204
+ color: var(--rt-text-accent-primary);
181
205
 
182
- &:hover:not(:disabled) {
183
- background-color: color-mix(in srgb, var(--rt-bg-accent-danger-subtle) 92%, var(--rt-color-neutral-100));
184
- }
206
+ &:hover:not(:disabled) {
207
+ background-color: color-mix(in srgb, var(--rt-bg-accent-primary-subtle) 92%, var(--rt-color-neutral-100));
208
+ }
185
209
 
186
- &:active:not(:disabled) {
187
- background-color: color-mix(in srgb, var(--rt-bg-accent-danger-subtle) 84%, var(--rt-color-neutral-100));
188
- }
210
+ &:active:not(:disabled) {
211
+ background-color: color-mix(in srgb, var(--rt-bg-accent-primary-subtle) 84%, var(--rt-color-neutral-100));
189
212
  }
213
+ }
190
214
 
191
- &--type-pill.rtui-button--variant-success {
192
- background-color: var(--rt-bg-accent-success-subtle);
193
- color: var(--rt-text-accent-success);
215
+ :host(.rtui-button--type-pill.rtui-button--variant-danger) .rtui-button__control {
216
+ background-color: var(--rt-bg-accent-danger-subtle);
217
+ color: var(--rt-text-accent-danger);
194
218
 
195
- &:hover:not(:disabled) {
196
- background-color: color-mix(in srgb, var(--rt-bg-accent-success-subtle) 92%, var(--rt-color-neutral-100));
197
- }
219
+ &:hover:not(:disabled) {
220
+ background-color: color-mix(in srgb, var(--rt-bg-accent-danger-subtle) 92%, var(--rt-color-neutral-100));
221
+ }
198
222
 
199
- &:active:not(:disabled) {
200
- background-color: color-mix(in srgb, var(--rt-bg-accent-success-subtle) 84%, var(--rt-color-neutral-100));
201
- }
223
+ &:active:not(:disabled) {
224
+ background-color: color-mix(in srgb, var(--rt-bg-accent-danger-subtle) 84%, var(--rt-color-neutral-100));
202
225
  }
226
+ }
203
227
 
204
- &--type-pill.rtui-button--variant-warning {
205
- background-color: var(--rt-bg-accent-warning-subtle);
206
- color: var(--rt-text-accent-warning);
228
+ :host(.rtui-button--type-pill.rtui-button--variant-success) .rtui-button__control {
229
+ background-color: var(--rt-bg-accent-success-subtle);
230
+ color: var(--rt-text-accent-success);
207
231
 
208
- &:hover:not(:disabled) {
209
- background-color: color-mix(in srgb, var(--rt-bg-accent-warning-subtle) 92%, var(--rt-color-neutral-100));
210
- }
232
+ &:hover:not(:disabled) {
233
+ background-color: color-mix(in srgb, var(--rt-bg-accent-success-subtle) 92%, var(--rt-color-neutral-100));
234
+ }
211
235
 
212
- &:active:not(:disabled) {
213
- background-color: color-mix(in srgb, var(--rt-bg-accent-warning-subtle) 84%, var(--rt-color-neutral-100));
214
- }
236
+ &:active:not(:disabled) {
237
+ background-color: color-mix(in srgb, var(--rt-bg-accent-success-subtle) 84%, var(--rt-color-neutral-100));
215
238
  }
239
+ }
216
240
 
217
- &--type-pill.rtui-button--variant-accent {
218
- background-color: var(--rt-bg-accent-info-subtle);
219
- color: var(--rt-text-accent-info);
241
+ :host(.rtui-button--type-pill.rtui-button--variant-warning) .rtui-button__control {
242
+ background-color: var(--rt-bg-accent-warning-subtle);
243
+ color: var(--rt-text-accent-warning);
220
244
 
221
- &:hover:not(:disabled) {
222
- background-color: color-mix(in srgb, var(--rt-bg-accent-info-subtle) 92%, var(--rt-color-neutral-100));
223
- }
245
+ &:hover:not(:disabled) {
246
+ background-color: color-mix(in srgb, var(--rt-bg-accent-warning-subtle) 92%, var(--rt-color-neutral-100));
247
+ }
224
248
 
225
- &:active:not(:disabled) {
226
- background-color: color-mix(in srgb, var(--rt-bg-accent-info-subtle) 84%, var(--rt-color-neutral-100));
227
- }
249
+ &:active:not(:disabled) {
250
+ background-color: color-mix(in srgb, var(--rt-bg-accent-warning-subtle) 84%, var(--rt-color-neutral-100));
228
251
  }
252
+ }
229
253
 
230
- /* pill appearance: text — transparent, borderless inline-text look.
231
- Radius is intentionally left to the `--radius-*` modifier (defaults to
232
- full) so a text-appearance pill keeps its pill shape. */
233
- &--type-pill.rtui-button--appearance-text {
234
- min-height: 1.875rem;
235
- padding: 0 0.625rem;
236
- background-color: transparent;
237
- color: var(--mat-sys-on-surface-variant);
238
- font-size: 1rem;
239
- font-weight: 400;
254
+ :host(.rtui-button--type-pill.rtui-button--variant-accent) .rtui-button__control {
255
+ background-color: var(--rt-bg-accent-info-subtle);
256
+ color: var(--rt-text-accent-info);
240
257
 
241
- &:hover:not(:disabled) {
242
- background-color: var(--rt-bg-base-hover);
243
- }
258
+ &:hover:not(:disabled) {
259
+ background-color: color-mix(in srgb, var(--rt-bg-accent-info-subtle) 92%, var(--rt-color-neutral-100));
260
+ }
244
261
 
245
- &:active:not(:disabled) {
246
- background-color: var(--rt-bg-base-hover);
247
- }
262
+ &:active:not(:disabled) {
263
+ background-color: color-mix(in srgb, var(--rt-bg-accent-info-subtle) 84%, var(--rt-color-neutral-100));
248
264
  }
249
265
  }
250
266
 
251
- /* ===================== design: material =====================
252
- Under `design: 'material'` the pill renders a NATIVE Material button (see the
253
- template) whose look is fully owned by the Material theme. The only styling
254
- the library adds is the variant mapping: `danger` re-points the button's own
255
- theme tokens at the M3 error role (M3 has no success/warning roles, so every
256
- other variant keeps the theme primary). */
257
- .rtui-button-material {
258
- rtui-spinner {
259
- display: flex;
260
- align-items: center;
261
- justify-content: center;
267
+ /* pill appearance: text — transparent, borderless inline-text look.
268
+ Radius is intentionally left to the `--radius-*` modifier (defaults to
269
+ full) so a text-appearance pill keeps its pill shape. */
270
+ :host(.rtui-button--type-pill.rtui-button--appearance-text) .rtui-button__control {
271
+ min-height: 1.875rem;
272
+ padding: 0 var(--rt-spacing-10);
273
+ background-color: transparent;
274
+ color: var(--mat-sys-on-surface-variant);
275
+ font-size: var(--rt-font-size-md);
276
+ font-weight: var(--rt-font-weight-regular);
277
+
278
+ &:hover:not(:disabled) {
279
+ background-color: var(--rt-bg-base-hover);
262
280
  }
263
281
 
264
- &--danger {
265
- --mat-button-filled-container-color: var(--mat-sys-error);
266
- --mat-button-filled-label-text-color: var(--mat-sys-on-error);
267
- --mat-button-filled-state-layer-color: var(--mat-sys-on-error);
268
- --mat-button-filled-ripple-color: color-mix(in srgb, var(--mat-sys-on-error) 12%, transparent);
269
- --mat-button-outlined-label-text-color: var(--mat-sys-error);
270
- --mat-button-outlined-outline-color: var(--mat-sys-error);
271
- --mat-button-outlined-state-layer-color: var(--mat-sys-error);
272
- --mat-button-outlined-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
273
- --mat-button-text-label-text-color: var(--mat-sys-error);
274
- --mat-button-text-state-layer-color: var(--mat-sys-error);
275
- --mat-button-text-ripple-color: color-mix(in srgb, var(--mat-sys-error) 12%, transparent);
276
- --mat-button-tonal-container-color: var(--mat-sys-error-container);
277
- --mat-button-tonal-label-text-color: var(--mat-sys-on-error-container);
278
- --mat-button-tonal-state-layer-color: var(--mat-sys-on-error-container);
279
- --mat-button-tonal-ripple-color: color-mix(in srgb, var(--mat-sys-on-error-container) 12%, transparent);
282
+ &:active:not(:disabled) {
283
+ background-color: var(--rt-bg-base-hover);
280
284
  }
281
285
  }
@@ -0,0 +1,38 @@
1
+ .matrix {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--rt-spacing-4);
5
+
6
+ &__title {
7
+ margin: var(--rt-spacing-16) 0 var(--rt-spacing-4);
8
+ color: var(--rt-text-base-secondary);
9
+ font-size: var(--rt-font-size-xs);
10
+ font-weight: var(--rt-font-weight-semibold);
11
+ letter-spacing: 0.04em;
12
+ text-transform: uppercase;
13
+ }
14
+
15
+ &__row {
16
+ display: flex;
17
+ flex-wrap: wrap;
18
+ align-items: flex-start;
19
+ gap: var(--rt-spacing-16);
20
+
21
+ &--stretch {
22
+ display: block;
23
+ }
24
+ }
25
+
26
+ &__cell {
27
+ display: flex;
28
+ min-width: 4rem;
29
+ flex-direction: column;
30
+ align-items: flex-start;
31
+ gap: var(--rt-spacing-4);
32
+ }
33
+
34
+ &__label {
35
+ color: var(--rt-text-base-disabled);
36
+ font-size: var(--rt-font-size-xs);
37
+ }
38
+ }
@@ -1,3 +1,22 @@
1
+ @use '../../../styles/base/mixin' as mixins;
2
+
3
+ /* Component tier: the one size every projected icon takes inside a text-appearance button.
4
+ It sits between the `md` and `lg` steps of the icon scale on purpose — see the rule at the
5
+ bottom of this file. */
6
+ $icon: (
7
+ text-button: (
8
+ size: 1.375rem,
9
+ ),
10
+ );
11
+
12
+ :root {
13
+ @each $element, $elements in $icon {
14
+ @each $style-token, $value in $elements {
15
+ #{mixins.generateCssVar('icon', #{$element}, #{$style-token})}: #{$value};
16
+ }
17
+ }
18
+ }
19
+
1
20
  .rtui-icon {
2
21
  display: inline-flex;
3
22
  align-items: center;
@@ -19,45 +38,45 @@
19
38
  }
20
39
 
21
40
  &--size-xs {
22
- width: 0.875rem;
23
- height: 0.875rem;
24
- font-size: 0.875rem;
41
+ width: var(--rt-icon-size-xs);
42
+ height: var(--rt-icon-size-xs);
43
+ font-size: var(--rt-icon-size-xs);
25
44
  }
26
45
 
27
46
  &--size-sm {
28
- width: 1rem;
29
- height: 1rem;
30
- font-size: 1rem;
47
+ width: var(--rt-icon-size-sm);
48
+ height: var(--rt-icon-size-sm);
49
+ font-size: var(--rt-icon-size-sm);
31
50
  }
32
51
 
33
52
  &--size-md {
34
- width: 1.5rem;
35
- height: 1.5rem;
36
- font-size: 1.5rem;
53
+ width: var(--rt-icon-size-md);
54
+ height: var(--rt-icon-size-md);
55
+ font-size: var(--rt-icon-size-md);
37
56
  }
38
57
 
39
58
  &--size-lg {
40
- width: 2rem;
41
- height: 2rem;
42
- font-size: 2rem;
59
+ width: var(--rt-icon-size-lg);
60
+ height: var(--rt-icon-size-lg);
61
+ font-size: var(--rt-icon-size-lg);
43
62
  }
44
63
 
45
64
  &--size-xl {
46
- width: 2.5rem;
47
- height: 2.5rem;
48
- font-size: 2.5rem;
65
+ width: var(--rt-icon-size-xl);
66
+ height: var(--rt-icon-size-xl);
67
+ font-size: var(--rt-icon-size-xl);
49
68
  }
50
69
 
51
70
  &--size-xxl {
52
- width: 3rem;
53
- height: 3rem;
54
- font-size: 3rem;
71
+ width: var(--rt-icon-size-xxl);
72
+ height: var(--rt-icon-size-xxl);
73
+ font-size: var(--rt-icon-size-xxl);
55
74
  }
56
75
 
57
76
  &--size-3xl {
58
- width: 3.5rem;
59
- height: 3.5rem;
60
- font-size: 3.5rem;
77
+ width: var(--rt-icon-size-3xl);
78
+ height: var(--rt-icon-size-3xl);
79
+ font-size: var(--rt-icon-size-3xl);
61
80
  }
62
81
 
63
82
  &--theme-inherit {
@@ -104,7 +123,7 @@
104
123
  and reaches the projected icon; specificity (0,2,0) wins over the icon's own
105
124
  `--size-*` (0,1,0). */
106
125
  .rtui-button--appearance-text .rtui-icon {
107
- width: 1.375rem;
108
- height: 1.375rem;
109
- font-size: 1.375rem;
126
+ width: var(--rt-icon-text-button-size);
127
+ height: var(--rt-icon-text-button-size);
128
+ font-size: var(--rt-icon-text-button-size);
110
129
  }