@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.
- package/README.md +1 -1
- package/fesm2022/rt-tools-ui-kit.mjs +4394 -3750
- package/fesm2022/rt-tools-ui-kit.mjs.map +1 -1
- package/package.json +3 -4
- package/rt-tools-ui-kit-0.5.0.tgz +0 -0
- package/src/lib/ui-kit/action-bar/components/bar/rtui-action-bar.component.scss +14 -0
- package/src/lib/ui-kit/action-bar/components/container/rtui-action-bar-container.component.scss +47 -0
- package/src/lib/ui-kit/action-bar/stories/component/test-action-bar.component.scss +15 -0
- package/src/lib/ui-kit/aside/components/container/aside-container.component.scss +4 -1
- package/src/lib/ui-kit/aside/components/error-notification/aside-error-box.component.scss +1 -1
- package/src/lib/ui-kit/aside/components/panel/aside-panel.component.scss +24 -0
- package/src/lib/ui-kit/buttons/unified-button/rtui-button.component.scss +210 -206
- package/src/lib/ui-kit/buttons/unified-button/stories/component/test-button-matrix.component.scss +38 -0
- package/src/lib/ui-kit/icon/rtui-icon.component.scss +43 -24
- package/src/lib/ui-kit/info-badge/info-badge.component.scss +23 -23
- package/src/lib/ui-kit/popover/stories/component/test-popover.component.scss +32 -0
- package/src/lib/ui-kit/scrollable/scrollable-container.component.scss +57 -0
- package/src/lib/ui-kit/scrollable/stories/component/test-scrollable.component.scss +17 -0
- package/src/lib/ui-kit/side-menu/menu/rtui-side-menu.component.scss +185 -4
- package/src/lib/ui-kit/side-menu/menu-sub-item/rtui-side-menu-sub-item.component.scss +45 -4
- package/src/lib/ui-kit/snack-bar/snack-bar.component.scss +20 -0
- package/src/lib/ui-kit/spinner/spinner.component.scss +1 -1
- package/src/lib/ui-kit/table/components/pagination-view/rtui-pagination.component.scss +20 -17
- package/src/lib/ui-kit/table/components/table-base-cell/table-base-cell.component.scss +21 -0
- package/src/lib/ui-kit/table/components/table-container/table-container.component.scss +26 -0
- package/src/lib/ui-kit/table/stories/dynamic-list/test-dynamic-list.component.scss +18 -0
- package/src/lib/ui-kit/toolbar/stories/component/test-toolbar.component.scss +22 -0
- package/src/styles/TOKENS.md +25 -16
- package/src/styles/base/_base.scss +6 -3
- package/src/styles/base/_tokens.scss +24 -0
- package/src/styles/color-scheme.spec.ts +4 -1
- package/src/styles/components/_rtui_button.scss +13 -547
- package/src/styles/components/button/_base.scss +64 -0
- package/src/styles/components/button/_map.scss +184 -0
- package/src/styles/components/button/_palettes.scss +218 -0
- package/src/styles/components/button/_sizes.scss +29 -0
- package/src/styles/components/button/_text.scss +68 -0
- package/src/styles/main.scss +0 -1
- package/styles/tokens.css +11 -0
- package/types/rt-tools-ui-kit.d.ts +614 -361
- package/rt-tools-ui-kit-0.3.1.tgz +0 -0
- package/src/styles/components/_button.scss +0 -372
|
@@ -6,276 +6,280 @@
|
|
|
6
6
|
display: block;
|
|
7
7
|
width: 100%;
|
|
8
8
|
|
|
9
|
-
.rtui-
|
|
10
|
-
.rtui-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
rtui-spinner {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
45
43
|
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
&:disabled {
|
|
45
|
+
cursor: not-allowed;
|
|
46
|
+
opacity: 0.38;
|
|
47
|
+
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
/* =====================
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
56
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
83
|
+
:host(.rtui-button--loading) .rtui-button__control {
|
|
84
|
+
cursor: wait;
|
|
85
|
+
}
|
|
64
86
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
71
|
-
|
|
72
|
-
padding: 0.5rem;
|
|
92
|
+
&:hover:not(:disabled) {
|
|
93
|
+
background-color: var(--rt-bg-base-hover);
|
|
73
94
|
}
|
|
95
|
+
}
|
|
74
96
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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
|
-
|
|
101
|
-
|
|
102
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
114
|
-
|
|
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
|
-
|
|
118
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
font-size: 0.75rem;
|
|
150
|
+
&:hover:not(:disabled) {
|
|
151
|
+
background-color: var(--mat-sys-surface-container-highest);
|
|
131
152
|
}
|
|
132
153
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
font-size: 0.8125rem;
|
|
154
|
+
&:active:not(:disabled) {
|
|
155
|
+
background-color: var(--mat-sys-surface-dim);
|
|
136
156
|
}
|
|
157
|
+
}
|
|
137
158
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
149
|
-
|
|
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
|
-
|
|
153
|
-
|
|
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
|
-
|
|
157
|
-
|
|
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
|
-
|
|
161
|
-
|
|
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
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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
|
-
|
|
170
|
-
|
|
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
|
-
|
|
174
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
183
|
-
|
|
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
|
-
|
|
187
|
-
|
|
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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
-
|
|
196
|
-
|
|
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
|
-
|
|
200
|
-
|
|
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
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
209
|
-
|
|
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
|
-
|
|
213
|
-
|
|
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
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
222
|
-
|
|
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
|
-
|
|
226
|
-
|
|
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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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
|
-
|
|
242
|
-
|
|
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
|
-
|
|
246
|
-
|
|
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
|
-
/*
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
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
|
-
|
|
265
|
-
|
|
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
|
}
|
package/src/lib/ui-kit/buttons/unified-button/stories/component/test-button-matrix.component.scss
ADDED
|
@@ -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:
|
|
23
|
-
height:
|
|
24
|
-
font-size:
|
|
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:
|
|
29
|
-
height:
|
|
30
|
-
font-size:
|
|
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:
|
|
35
|
-
height:
|
|
36
|
-
font-size:
|
|
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:
|
|
41
|
-
height:
|
|
42
|
-
font-size:
|
|
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:
|
|
47
|
-
height:
|
|
48
|
-
font-size:
|
|
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:
|
|
53
|
-
height:
|
|
54
|
-
font-size:
|
|
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:
|
|
59
|
-
height:
|
|
60
|
-
font-size:
|
|
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:
|
|
108
|
-
height:
|
|
109
|
-
font-size:
|
|
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
|
}
|