@rt-tools/ui-kit 0.3.1 → 0.4.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/fesm2022/rt-tools-ui-kit.mjs +405 -156
- package/fesm2022/rt-tools-ui-kit.mjs.map +1 -1
- package/package.json +1 -1
- package/rt-tools-ui-kit-0.4.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/aside/components/error-notification/aside-error-box.component.scss +1 -1
- 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/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/styles/TOKENS.md +25 -16
- package/src/styles/base/_base.scss +6 -3
- package/src/styles/base/_tokens.scss +19 -0
- package/src/styles/main.scss +0 -1
- package/styles/tokens.css +9 -0
- package/types/rt-tools-ui-kit.d.ts +150 -33
- package/rt-tools-ui-kit-0.3.1.tgz +0 -0
- package/src/styles/components/_button.scss +0 -372
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
/// @deprecated — legacy `.c-button` system. New code uses `.rtui-btn` (_rtui_button.scss);
|
|
2
|
-
/// ~60% of this module duplicates it. Kept because consumers still apply `.c-button`
|
|
3
|
-
/// classes AND override `--rt-button-*` vars directly (incl. dark mode) — rerouting these rules
|
|
4
|
-
/// onto `--rt-rtui-btn-*` would silently kill those overrides. Removal plan (next major):
|
|
5
|
-
/// map classes `--fill-green→success`, `--fill-red→error`, `--fill-blue→accent-light`,
|
|
6
|
-
/// `--outline-*→*-outline`; `--txt-*`/`--fab` first need a text/icon appearance in .rtui-btn.
|
|
7
|
-
/// See TOKENS.md "Buttons: legacy vs rtui".
|
|
8
|
-
@use '../base/mixin' as mixins;
|
|
9
|
-
@use '../base/variables' as vars;
|
|
10
|
-
@use 'sass:color' as color;
|
|
11
|
-
|
|
12
|
-
$button: (
|
|
13
|
-
base: (
|
|
14
|
-
color: var(--rt-color-neutral-100),
|
|
15
|
-
font-family: var(--font-default),
|
|
16
|
-
),
|
|
17
|
-
fab: (
|
|
18
|
-
color: var(--rt-color-neutral-60),
|
|
19
|
-
),
|
|
20
|
-
fab-hover: (
|
|
21
|
-
color: var(--rt-color-neutral-100),
|
|
22
|
-
),
|
|
23
|
-
text-hover: (
|
|
24
|
-
background: var(--rt-color-neutral-15),
|
|
25
|
-
),
|
|
26
|
-
text-focus: (
|
|
27
|
-
background: var(--rt-color-neutral-25),
|
|
28
|
-
),
|
|
29
|
-
text-active: (
|
|
30
|
-
background: #b2cbca,
|
|
31
|
-
// palette outlier, no neutral-scale equivalent
|
|
32
|
-
),
|
|
33
|
-
text-base: (
|
|
34
|
-
color: var(--rt-color-neutral-60),
|
|
35
|
-
),
|
|
36
|
-
text-base-hover: (
|
|
37
|
-
color: var(--rt-color-neutral-100),
|
|
38
|
-
),
|
|
39
|
-
text-gray: (
|
|
40
|
-
color: var(--rt-color-neutral-60),
|
|
41
|
-
),
|
|
42
|
-
text-gray-hover: (
|
|
43
|
-
color: var(--rt-color-blue-60),
|
|
44
|
-
),
|
|
45
|
-
text-blue: (
|
|
46
|
-
color: var(--rt-color-blue-100),
|
|
47
|
-
),
|
|
48
|
-
text-blue-hover: (
|
|
49
|
-
color: var(--rt-color-neutral-100),
|
|
50
|
-
),
|
|
51
|
-
fill-base: (
|
|
52
|
-
background-color: var(--rt-color-neutral-100),
|
|
53
|
-
color: var(--rt-color-neutral-0),
|
|
54
|
-
),
|
|
55
|
-
fill-blue: (
|
|
56
|
-
background-color: var(--rt-color-blue-20),
|
|
57
|
-
color: var(--rt-color-blue-100),
|
|
58
|
-
),
|
|
59
|
-
fill-gray: (
|
|
60
|
-
background-color: var(--rt-color-neutral-5),
|
|
61
|
-
color: var(--rt-color-neutral-40),
|
|
62
|
-
),
|
|
63
|
-
fill-black: (
|
|
64
|
-
background-color: var(--rt-color-neutral-100),
|
|
65
|
-
color: var(--rt-color-neutral-0),
|
|
66
|
-
),
|
|
67
|
-
fill-green: (
|
|
68
|
-
border: 1px solid color.scale(vars.$btn-success, $lightness: -10%),
|
|
69
|
-
color: var(--rt-color-neutral-0),
|
|
70
|
-
background-color: var(--rt-color-green-80),
|
|
71
|
-
),
|
|
72
|
-
fill-green-hover: (
|
|
73
|
-
background-color: color.scale(vars.$btn-success, $lightness: -10%),
|
|
74
|
-
),
|
|
75
|
-
fill-green-light: (
|
|
76
|
-
border-color: color.scale(vars.$btn-success-soft, $lightness: -10%),
|
|
77
|
-
color: var(--rt-color-green-100),
|
|
78
|
-
background-color: var(--rt-color-green-10),
|
|
79
|
-
),
|
|
80
|
-
fill-green-light-hover: (
|
|
81
|
-
background-color: color.scale(vars.$btn-success-soft, $lightness: -10%),
|
|
82
|
-
),
|
|
83
|
-
fill-red: (
|
|
84
|
-
border: 1px solid color.scale(vars.$btn-danger, $lightness: -10%),
|
|
85
|
-
color: var(--rt-color-neutral-0),
|
|
86
|
-
background-color: vars.$btn-danger,
|
|
87
|
-
),
|
|
88
|
-
fill-red-hover: (
|
|
89
|
-
background-color: color.scale(vars.$btn-danger, $lightness: -10%),
|
|
90
|
-
),
|
|
91
|
-
fill-red-light: (
|
|
92
|
-
border-color: color.scale(vars.$btn-danger-soft, $lightness: -10%),
|
|
93
|
-
color: var(--rt-color-red-100),
|
|
94
|
-
background-color: var(--rt-color-red-10),
|
|
95
|
-
),
|
|
96
|
-
fill-red-light-hover: (
|
|
97
|
-
background-color: color.scale(vars.$btn-danger-soft, $lightness: -10%),
|
|
98
|
-
),
|
|
99
|
-
outline: (
|
|
100
|
-
border: 1px solid var(--rt-color-blue-40),
|
|
101
|
-
),
|
|
102
|
-
outline-blue: (
|
|
103
|
-
color: var(--rt-color-blue-100),
|
|
104
|
-
),
|
|
105
|
-
outline-base: (
|
|
106
|
-
color: var(--rt-color-neutral-100),
|
|
107
|
-
),
|
|
108
|
-
disabled: (
|
|
109
|
-
background-color: var(--rt-color-neutral-5),
|
|
110
|
-
color: var(--rt-color-neutral-40),
|
|
111
|
-
),
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
:root {
|
|
115
|
-
@each $element, $elements in $button {
|
|
116
|
-
@each $style-token, $value in $elements {
|
|
117
|
-
#{mixins.generateCssVar('button', #{$element}, #{$style-token})}: #{$value};
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
button {
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
line-height: 1;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.c-button {
|
|
128
|
-
position: relative;
|
|
129
|
-
display: inline-flex;
|
|
130
|
-
align-items: center;
|
|
131
|
-
justify-content: center;
|
|
132
|
-
color: var(--rt-button-base-color);
|
|
133
|
-
font-family: var(--rt-button-base-font-family);
|
|
134
|
-
font-size: 1rem;
|
|
135
|
-
line-height: 1;
|
|
136
|
-
transition: all 0.15s linear;
|
|
137
|
-
|
|
138
|
-
// FAB
|
|
139
|
-
&[class*='--fab'] {
|
|
140
|
-
border: 0;
|
|
141
|
-
background-color: transparent;
|
|
142
|
-
color: var(--rt-button-fab-color);
|
|
143
|
-
|
|
144
|
-
&:hover {
|
|
145
|
-
color: var(--rt-button-fab-hover-color);
|
|
146
|
-
|
|
147
|
-
svg {
|
|
148
|
-
g {
|
|
149
|
-
fill: var(--rt-button-fab-hover-color);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
// --fab {color}
|
|
156
|
-
|
|
157
|
-
// TEXT
|
|
158
|
-
&[class*='--txt-'] {
|
|
159
|
-
border: 0;
|
|
160
|
-
border-radius: 5px;
|
|
161
|
-
background-color: transparent;
|
|
162
|
-
|
|
163
|
-
&:hover {
|
|
164
|
-
background: var(--rt-button-text-hover-background);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&:focus {
|
|
168
|
-
background: var(--rt-button-text-focus-background);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
&:active {
|
|
172
|
-
background: var(--rt-button-text-active-background);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
&[class*='base'] {
|
|
176
|
-
color: var(--rt-button-text-base-color);
|
|
177
|
-
|
|
178
|
-
&:hover {
|
|
179
|
-
color: var(--rt-button-text-base-hover-color);
|
|
180
|
-
|
|
181
|
-
svg {
|
|
182
|
-
g {
|
|
183
|
-
fill: var(--rt-button-text-base-hover-color);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&[class*='gray'] {
|
|
190
|
-
color: var(--rt-button-text-gray-color);
|
|
191
|
-
|
|
192
|
-
&:hover {
|
|
193
|
-
color: var(--rt-button-text-gray-hover-color);
|
|
194
|
-
|
|
195
|
-
svg {
|
|
196
|
-
g {
|
|
197
|
-
fill: var(--rt-button-text-gray-hover-color);
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
&[class*='blue'] {
|
|
204
|
-
color: var(--rt-button-text-blue-color);
|
|
205
|
-
|
|
206
|
-
.c-circle {
|
|
207
|
-
border-color: var(--rt-button-text-blue-color);
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&:hover {
|
|
211
|
-
color: var(--rt-button-text-blue-hover-color);
|
|
212
|
-
|
|
213
|
-
.c-circle {
|
|
214
|
-
border-color: var(--rt-button-text-blue-hover-color);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
// --txt-{color}
|
|
221
|
-
|
|
222
|
-
// COLOR
|
|
223
|
-
&[class*='--fill-'] {
|
|
224
|
-
border: 0;
|
|
225
|
-
border-radius: mixins.rem(6);
|
|
226
|
-
|
|
227
|
-
&[class*='base'] {
|
|
228
|
-
background-color: var(--rt-button-fill-base-background-color);
|
|
229
|
-
color: var(--rt-button-fill-base-color);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
&[class*='blue'] {
|
|
233
|
-
background-color: var(--rt-button-fill-blue-background-color);
|
|
234
|
-
color: var(--rt-button-fill-blue-color);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
&[class*='gray'] {
|
|
238
|
-
background-color: var(--rt-button-fill-gray-background-color);
|
|
239
|
-
color: var(--rt-button-fill-gray-color);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
&[class*='black'] {
|
|
243
|
-
background-color: var(--rt-button-fill-black-background-color);
|
|
244
|
-
color: var(--rt-button-fill-black-color);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
&[class*='green'] {
|
|
248
|
-
border: var(--rt-button-fill-green-border);
|
|
249
|
-
border-radius: 2px;
|
|
250
|
-
background-color: var(--rt-button-fill-green-background-color);
|
|
251
|
-
box-shadow: 0 2px 4px rgb(24 24 24 / 10%);
|
|
252
|
-
color: var(--rt-button-fill-green-color);
|
|
253
|
-
|
|
254
|
-
&:hover {
|
|
255
|
-
background-color: var(--rt-button-fill-green-hover-background-color);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
&[class*='-light'] {
|
|
259
|
-
border-color: var(--rt-button-fill-green-light-border-color);
|
|
260
|
-
background-color: var(--rt-button-fill-green-light-background-color);
|
|
261
|
-
color: var(--rt-button-fill-green-light-color);
|
|
262
|
-
|
|
263
|
-
&:hover {
|
|
264
|
-
background-color: var(--rt-button-fill-green-light-hover-background-color);
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
&[class*='red'] {
|
|
270
|
-
border: var(--rt-button-fill-red-border);
|
|
271
|
-
border-radius: 2px;
|
|
272
|
-
background-color: var(--rt-button-fill-red-background-color);
|
|
273
|
-
box-shadow: 0 2px 4px rgb(24 24 24 / 10%);
|
|
274
|
-
color: var(--rt-button-fill-red-color);
|
|
275
|
-
|
|
276
|
-
&:hover {
|
|
277
|
-
background-color: var(--rt-button-fill-red-hover-background-color);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
&[class*='-light'] {
|
|
281
|
-
border-color: var(--rt-button-fill-red-light-border-color);
|
|
282
|
-
background-color: var(--rt-button-fill-red-light-background-color);
|
|
283
|
-
color: var(--rt-button-fill-red-light-color);
|
|
284
|
-
|
|
285
|
-
&:hover {
|
|
286
|
-
background-color: var(--rt-button-fill-red-light-hover-background-color);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// --fill-{color}
|
|
293
|
-
|
|
294
|
-
// OUTLINE
|
|
295
|
-
&[class*='--outline-'] {
|
|
296
|
-
border: var(--rt-button-outline-border);
|
|
297
|
-
border-radius: mixins.rem(40);
|
|
298
|
-
background-color: transparent;
|
|
299
|
-
|
|
300
|
-
&[class*='blue'] {
|
|
301
|
-
color: var(--rt-button-outline-blue-color);
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
&[class*='base'] {
|
|
305
|
-
color: var(--rt-button-outline-base-color);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
// --outline-{color}
|
|
310
|
-
|
|
311
|
-
// SIZE
|
|
312
|
-
&[class*='--size'] {
|
|
313
|
-
&[class*='-sm'] {
|
|
314
|
-
height: 1.75rem;
|
|
315
|
-
padding: 0 0.75rem;
|
|
316
|
-
font-size: mixins.rem(14);
|
|
317
|
-
|
|
318
|
-
svg + span {
|
|
319
|
-
margin-left: 0.75rem;
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
&[class*='-md'] {
|
|
324
|
-
height: 2.5rem;
|
|
325
|
-
padding: 0 1.25rem;
|
|
326
|
-
font-size: mixins.rem(18);
|
|
327
|
-
|
|
328
|
-
svg + span {
|
|
329
|
-
margin-left: mixins.rem(15);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
&[class*='-l'] {
|
|
334
|
-
height: mixins.rem(60);
|
|
335
|
-
padding: 0 2.5rem;
|
|
336
|
-
font-size: mixins.rem(18);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
// --size-{size}
|
|
341
|
-
|
|
342
|
-
// HEIGHT
|
|
343
|
-
&[class*='--h-'] {
|
|
344
|
-
&[class*='40'] {
|
|
345
|
-
height: 40px;
|
|
346
|
-
padding: 0 15px;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
&[class*='30'] {
|
|
350
|
-
height: 30px;
|
|
351
|
-
padding: 0 10px;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
// --h-{height}
|
|
356
|
-
|
|
357
|
-
// SHADOW
|
|
358
|
-
&[class*='--shadow'] {
|
|
359
|
-
box-shadow: 0 2px 4px rgb(24 24 24 / 10%);
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
// --shadow
|
|
363
|
-
|
|
364
|
-
// DISABLED
|
|
365
|
-
&[class*='--disabled'] {
|
|
366
|
-
background-color: var(--rt-button-disabled-background-color) !important;
|
|
367
|
-
color: var(--rt-button-disabled-color) !important;
|
|
368
|
-
cursor: not-allowed !important;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
// --disabled
|
|
372
|
-
}
|