@tangible/ui 0.0.21 → 0.2.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/components/Button/Button.js +6 -8
- package/components/Button/types.d.ts +5 -7
- package/components/Chip/Chip.d.ts +28 -0
- package/components/Chip/Chip.js +19 -3
- package/components/Combobox/Combobox.d.ts +1 -1
- package/components/Combobox/Combobox.js +2 -2
- package/components/Combobox/types.d.ts +13 -0
- package/components/DatePicker/Calendar.d.ts +12 -0
- package/components/DatePicker/Calendar.js +145 -0
- package/components/DatePicker/DatePicker.d.ts +23 -0
- package/components/DatePicker/DatePicker.js +123 -0
- package/components/DatePicker/DateRangePicker.d.ts +16 -0
- package/components/DatePicker/DateRangePicker.js +114 -0
- package/components/DatePicker/date-utils.d.ts +51 -0
- package/components/DatePicker/date-utils.js +228 -0
- package/components/DatePicker/index.d.ts +8 -0
- package/components/DatePicker/index.js +6 -0
- package/components/DatePicker/presets.d.ts +3 -0
- package/components/DatePicker/presets.js +37 -0
- package/components/DatePicker/types.d.ts +138 -0
- package/components/DatePicker/types.js +39 -0
- package/components/IconButton/types.d.ts +2 -2
- package/components/MultiCombobox/MultiCombobox.d.ts +33 -0
- package/components/MultiCombobox/MultiCombobox.js +595 -0
- package/components/MultiCombobox/MultiComboboxContext.d.ts +8 -0
- package/components/MultiCombobox/MultiComboboxContext.js +36 -0
- package/components/MultiCombobox/index.d.ts +3 -0
- package/components/MultiCombobox/index.js +2 -0
- package/components/MultiCombobox/types.d.ts +244 -0
- package/components/MultiCombobox/types.js +7 -0
- package/components/MultiSelect/MultiSelect.js +22 -2
- package/components/Popover/Popover.js +16 -2
- package/components/SegmentedControl/types.d.ts +2 -2
- package/components/Select/Select.js +14 -0
- package/components/Slider/Slider.d.ts +2 -0
- package/components/Slider/Slider.js +29 -0
- package/components/Slider/index.d.ts +2 -0
- package/components/Slider/index.js +1 -0
- package/components/Slider/types.d.ts +39 -0
- package/components/Slider/types.js +1 -0
- package/components/index.d.ts +4 -0
- package/components/index.js +3 -0
- package/package.json +13 -1
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +1181 -187
- package/styles/all.expanded.unlayered.css +1181 -187
- package/styles/all.unlayered.css +1 -1
- package/styles/components/_bundle.scss +6 -0
- package/styles/components/button.scss +59 -43
- package/styles/components/card.scss +1 -1
- package/styles/components/chip.scss +84 -10
- package/styles/components/combobox.scss +16 -2
- package/styles/components/date-picker.scss +400 -0
- package/styles/components/icon-button.scss +36 -30
- package/styles/components/input/index.scss +1 -2
- package/styles/components/multi-combobox.scss +457 -0
- package/styles/components/multi-select.scss +34 -18
- package/styles/components/notice.scss +15 -6
- package/styles/components/pager.scss +4 -2
- package/styles/components/popover.scss +6 -0
- package/styles/components/progress.scss +23 -6
- package/styles/components/segmented-control.scss +53 -15
- package/styles/components/select.scss +19 -3
- package/styles/components/slider.scss +184 -0
- package/styles/components/switch.scss +1 -1
- package/styles/core.css +1 -1
- package/styles/core.unlayered.css +1 -1
- package/styles/system/_control.scss +9 -8
- package/styles/system/_tokens.scss +16 -0
- package/tui-manifest.json +311 -14
- package/utils/portal.d.ts +0 -4
- package/utils/portal.js +38 -5
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
@use "../system" as sys;
|
|
2
|
+
|
|
3
|
+
/* @tui-tokens
|
|
4
|
+
--tui-calendar-cell-size
|
|
5
|
+
--tui-calendar-cell-radius
|
|
6
|
+
--tui-calendar-selected-bg
|
|
7
|
+
--tui-calendar-selected-fg
|
|
8
|
+
--tui-calendar-range-bg
|
|
9
|
+
--tui-calendar-today-bg
|
|
10
|
+
--tui-calendar-caption-color
|
|
11
|
+
--tui-date-picker-width
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
@mixin styles() {
|
|
15
|
+
// ==========================================================================
|
|
16
|
+
// Calendar + DatePicker + DateRangePicker
|
|
17
|
+
// ==========================================================================
|
|
18
|
+
//
|
|
19
|
+
// Component API tokens (never defined here, only read via fallback):
|
|
20
|
+
// --tui-calendar-cell-size Day cell square (default 2.5rem)
|
|
21
|
+
// --tui-calendar-cell-radius Day cell radius (default full circle)
|
|
22
|
+
// --tui-calendar-selected-bg Selected/range-endpoint fill
|
|
23
|
+
// --tui-calendar-selected-fg Selected/range-endpoint text
|
|
24
|
+
// --tui-calendar-range-bg In-range day fill
|
|
25
|
+
// --tui-calendar-today-bg Today's fill (unselected)
|
|
26
|
+
// --tui-calendar-caption-color Month/year caption button color
|
|
27
|
+
// --tui-date-picker-width Single-date popover width (default 20rem)
|
|
28
|
+
//
|
|
29
|
+
// ==========================================================================
|
|
30
|
+
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
// Calendar
|
|
33
|
+
// ---------------------------------------------------------------------------
|
|
34
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}calendar {
|
|
35
|
+
--_cell: var(--#{sys.$prefix}calendar-cell-size, 2.5rem);
|
|
36
|
+
--_cell-radius: var(--#{sys.$prefix}calendar-cell-radius, var(--#{sys.$prefix}radius-full, 999px));
|
|
37
|
+
--_selected-bg: var(--#{sys.$prefix}calendar-selected-bg, var(--#{sys.$prefix}theme-primary-base));
|
|
38
|
+
--_selected-fg: var(--#{sys.$prefix}calendar-selected-fg, var(--#{sys.$prefix}color-fg-on-accent));
|
|
39
|
+
--_range-bg: var(--#{sys.$prefix}calendar-range-bg, var(--#{sys.$prefix}color-bg-muted));
|
|
40
|
+
--_today-bg: var(--#{sys.$prefix}calendar-today-bg, var(--#{sys.$prefix}color-bg-muted));
|
|
41
|
+
--_caption: var(--#{sys.$prefix}calendar-caption-color, var(--#{sys.$prefix}theme-primary-base));
|
|
42
|
+
|
|
43
|
+
display: inline-flex;
|
|
44
|
+
flex-direction: column;
|
|
45
|
+
gap: var(--#{sys.$prefix}spacing-xs);
|
|
46
|
+
|
|
47
|
+
&__nav {
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: space-between;
|
|
51
|
+
gap: var(--#{sys.$prefix}spacing-xs);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&__caption {
|
|
55
|
+
border: 0;
|
|
56
|
+
background: none;
|
|
57
|
+
padding: var(--#{sys.$prefix}spacing-xxs) var(--#{sys.$prefix}spacing-xs);
|
|
58
|
+
border-radius: var(--#{sys.$prefix}radius-sm);
|
|
59
|
+
color: var(--_caption);
|
|
60
|
+
font: inherit;
|
|
61
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&__caption-year {
|
|
66
|
+
font-weight: var(--#{sys.$prefix}typography-weight-normal, 400);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
&__grid {
|
|
70
|
+
border-collapse: collapse;
|
|
71
|
+
|
|
72
|
+
th,
|
|
73
|
+
td {
|
|
74
|
+
padding: 0;
|
|
75
|
+
text-align: center;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__weekday {
|
|
80
|
+
inline-size: var(--_cell);
|
|
81
|
+
block-size: var(--_cell);
|
|
82
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
83
|
+
font-weight: var(--#{sys.$prefix}typography-weight-normal, 400);
|
|
84
|
+
font-size: var(--#{sys.$prefix}typography-size-sm);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__day {
|
|
88
|
+
inline-size: var(--_cell);
|
|
89
|
+
block-size: var(--_cell);
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
border: 0;
|
|
94
|
+
background: none;
|
|
95
|
+
border-radius: var(--_cell-radius);
|
|
96
|
+
color: var(--#{sys.$prefix}color-fg);
|
|
97
|
+
font: inherit;
|
|
98
|
+
cursor: pointer;
|
|
99
|
+
transition-property: background-color, color;
|
|
100
|
+
transition-duration: var(--#{sys.$prefix}motion-duration);
|
|
101
|
+
transition-timing-function: var(--#{sys.$prefix}motion-timing);
|
|
102
|
+
|
|
103
|
+
@media (hover: hover) {
|
|
104
|
+
&:hover {
|
|
105
|
+
background-color: var(--_range-bg);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[aria-disabled="true"] {
|
|
110
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
111
|
+
opacity: var(--#{sys.$prefix}opacity-disabled);
|
|
112
|
+
cursor: default;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Days that belong to the adjacent months at the grid edges.
|
|
117
|
+
&__cell.is-outside .#{sys.$prefix}calendar__day {
|
|
118
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&__cell.is-today .#{sys.$prefix}calendar__day {
|
|
122
|
+
background-color: var(--_today-bg);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Range fill: a continuous band, so the pill only rounds at its ends.
|
|
126
|
+
&__cell.is-in-range {
|
|
127
|
+
background-color: var(--_range-bg);
|
|
128
|
+
|
|
129
|
+
&:first-child,
|
|
130
|
+
&.is-range-start {
|
|
131
|
+
border-start-start-radius: var(--_cell-radius);
|
|
132
|
+
border-end-start-radius: var(--_cell-radius);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:last-child,
|
|
136
|
+
&.is-range-end {
|
|
137
|
+
border-start-end-radius: var(--_cell-radius);
|
|
138
|
+
border-end-end-radius: var(--_cell-radius);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&__cell.is-selected .#{sys.$prefix}calendar__day,
|
|
143
|
+
&__cell.is-range-start .#{sys.$prefix}calendar__day,
|
|
144
|
+
&__cell.is-range-end .#{sys.$prefix}calendar__day {
|
|
145
|
+
background-color: var(--_selected-bg);
|
|
146
|
+
color: var(--_selected-fg);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Month/year drill-down view
|
|
150
|
+
&__months {
|
|
151
|
+
display: grid;
|
|
152
|
+
grid-template-columns: repeat(3, 1fr);
|
|
153
|
+
gap: var(--#{sys.$prefix}spacing-xs);
|
|
154
|
+
min-inline-size: calc(var(--_cell) * 7);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&__month {
|
|
158
|
+
border: 0;
|
|
159
|
+
background: none;
|
|
160
|
+
padding: var(--#{sys.$prefix}spacing-sm);
|
|
161
|
+
border-radius: var(--#{sys.$prefix}radius-md);
|
|
162
|
+
color: var(--#{sys.$prefix}color-fg);
|
|
163
|
+
font: inherit;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
|
|
166
|
+
@media (hover: hover) {
|
|
167
|
+
&:hover {
|
|
168
|
+
background-color: var(--_range-bg);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&.is-selected {
|
|
173
|
+
background-color: var(--_selected-bg);
|
|
174
|
+
color: var(--_selected-fg);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// ---------------------------------------------------------------------------
|
|
180
|
+
// Shared trigger anatomy (both pickers): input-group button
|
|
181
|
+
// ---------------------------------------------------------------------------
|
|
182
|
+
:where(.#{sys.$prefix}interface)
|
|
183
|
+
:is(.#{sys.$prefix}date-picker__trigger, .#{sys.$prefix}date-range-picker__trigger) {
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
text-align: start;
|
|
186
|
+
min-inline-size: 14rem;
|
|
187
|
+
font: inherit;
|
|
188
|
+
color: var(--#{sys.$prefix}color-fg);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:where(.#{sys.$prefix}interface)
|
|
192
|
+
:is(.#{sys.$prefix}date-picker__trigger-value, .#{sys.$prefix}date-range-picker__trigger-value) {
|
|
193
|
+
flex: 1 1 auto;
|
|
194
|
+
overflow: hidden;
|
|
195
|
+
text-overflow: ellipsis;
|
|
196
|
+
white-space: nowrap;
|
|
197
|
+
|
|
198
|
+
&.is-placeholder {
|
|
199
|
+
color: var(--#{sys.$prefix}input-fg-placeholder, var(--#{sys.$prefix}color-fg-muted));
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
// DatePicker popover
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}date-picker {
|
|
207
|
+
// The picker root IS the popover panel; the panel's padding rule wins
|
|
208
|
+
// the cascade, so size it via the popover token rather than `padding`.
|
|
209
|
+
--#{sys.$prefix}popover-padding: var(--#{sys.$prefix}spacing-md);
|
|
210
|
+
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
gap: var(--#{sys.$prefix}spacing-md);
|
|
214
|
+
inline-size: var(--#{sys.$prefix}date-picker-width, 20rem);
|
|
215
|
+
|
|
216
|
+
// When the popover caps its height, scroll — don't compress the rows.
|
|
217
|
+
> * {
|
|
218
|
+
flex-shrink: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&__head {
|
|
222
|
+
display: flex;
|
|
223
|
+
align-items: center;
|
|
224
|
+
gap: var(--#{sys.$prefix}spacing-xs);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
&__title {
|
|
228
|
+
flex: 1 1 auto;
|
|
229
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&__time {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: stretch;
|
|
235
|
+
gap: var(--#{sys.$prefix}spacing-sm);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// In this row the AM/PM switcher sits as a peer control: input radius,
|
|
239
|
+
// control height (stretched to the control-sized time field).
|
|
240
|
+
&__meridiem {
|
|
241
|
+
--#{sys.$prefix}segmented-radius: var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md));
|
|
242
|
+
--#{sys.$prefix}segmented-item-radius: calc(
|
|
243
|
+
var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md)) - var(--#{sys.$prefix}spacing-xxs)
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&__time-field {
|
|
248
|
+
// Control-sized and input-surfaced so the box matches the
|
|
249
|
+
// month/day/year controls exactly.
|
|
250
|
+
@include sys.control-sizing(sys.$prefix);
|
|
251
|
+
|
|
252
|
+
display: inline-flex;
|
|
253
|
+
align-items: center;
|
|
254
|
+
background-color: var(--#{sys.$prefix}input-bg, var(--#{sys.$prefix}color-bg-surface));
|
|
255
|
+
border: var(--#{sys.$prefix}border-width) solid
|
|
256
|
+
var(--#{sys.$prefix}input-border, var(--#{sys.$prefix}color-border));
|
|
257
|
+
border-radius: var(--#{sys.$prefix}input-radius, var(--#{sys.$prefix}radius-md));
|
|
258
|
+
padding-inline: var(--#{sys.$prefix}spacing-sm);
|
|
259
|
+
|
|
260
|
+
.#{sys.$prefix}input {
|
|
261
|
+
border: 0;
|
|
262
|
+
min-height: 0;
|
|
263
|
+
inline-size: 2.5ch;
|
|
264
|
+
padding-inline: 0;
|
|
265
|
+
text-align: center;
|
|
266
|
+
background: transparent;
|
|
267
|
+
|
|
268
|
+
&:focus-visible {
|
|
269
|
+
outline: none;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
&:focus-within {
|
|
274
|
+
border-color: var(--#{sys.$prefix}input-border-focus, var(--#{sys.$prefix}theme-primary-base));
|
|
275
|
+
outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
|
|
276
|
+
outline-offset: var(--#{sys.$prefix}focus-ring-offset);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
&__time-colon {
|
|
281
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
&__zone {
|
|
285
|
+
margin-inline-start: auto;
|
|
286
|
+
align-self: center;
|
|
287
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
&__fields {
|
|
291
|
+
display: flex;
|
|
292
|
+
align-items: stretch;
|
|
293
|
+
gap: var(--#{sys.$prefix}spacing-sm);
|
|
294
|
+
|
|
295
|
+
.#{sys.$prefix}date-picker__month {
|
|
296
|
+
flex: 1 1 auto;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.#{sys.$prefix}date-picker__day-field {
|
|
300
|
+
inline-size: 3.5rem;
|
|
301
|
+
text-align: center;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.#{sys.$prefix}date-picker__year-field {
|
|
305
|
+
inline-size: 4.5rem;
|
|
306
|
+
text-align: center;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// ---------------------------------------------------------------------------
|
|
312
|
+
// DateRangePicker popover
|
|
313
|
+
// ---------------------------------------------------------------------------
|
|
314
|
+
:where(.#{sys.$prefix}interface) .#{sys.$prefix}date-range-picker {
|
|
315
|
+
// Two calendars + presets need more room than the popover default; and
|
|
316
|
+
// the body/foot own their padding, so zero the panel's (the picker root
|
|
317
|
+
// IS the popover panel — its padding would stack with theirs).
|
|
318
|
+
--#{sys.$prefix}popover-max-width: calc(100vw - 32px);
|
|
319
|
+
--#{sys.$prefix}popover-padding: 0;
|
|
320
|
+
|
|
321
|
+
display: flex;
|
|
322
|
+
flex-direction: column;
|
|
323
|
+
inline-size: max-content;
|
|
324
|
+
max-inline-size: 100%;
|
|
325
|
+
|
|
326
|
+
// When the popover caps its height, scroll — don't compress the rows.
|
|
327
|
+
> * {
|
|
328
|
+
flex-shrink: 0;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
&__body {
|
|
332
|
+
display: flex;
|
|
333
|
+
align-items: flex-start;
|
|
334
|
+
gap: var(--#{sys.$prefix}spacing-lg);
|
|
335
|
+
padding: var(--#{sys.$prefix}spacing-md);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&__presets {
|
|
339
|
+
display: flex;
|
|
340
|
+
flex-direction: column;
|
|
341
|
+
align-items: flex-start;
|
|
342
|
+
gap: var(--#{sys.$prefix}spacing-xxs);
|
|
343
|
+
padding-block-start: var(--#{sys.$prefix}spacing-xs);
|
|
344
|
+
|
|
345
|
+
.#{sys.$prefix}date-range-picker__preset {
|
|
346
|
+
white-space: nowrap;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&__main {
|
|
351
|
+
display: flex;
|
|
352
|
+
flex-direction: column;
|
|
353
|
+
gap: var(--#{sys.$prefix}spacing-md);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&__fields {
|
|
357
|
+
display: flex;
|
|
358
|
+
align-items: flex-end;
|
|
359
|
+
gap: var(--#{sys.$prefix}spacing-sm);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
&__field {
|
|
363
|
+
flex: 1 1 auto;
|
|
364
|
+
display: flex;
|
|
365
|
+
flex-direction: column;
|
|
366
|
+
gap: var(--#{sys.$prefix}spacing-xxs);
|
|
367
|
+
// Override the .tui-interface bold-label default; the field name is a
|
|
368
|
+
// small caps-style eyebrow, not a form label.
|
|
369
|
+
font-weight: var(--#{sys.$prefix}typography-weight-normal, 400);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
&__field-label {
|
|
373
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
374
|
+
font-size: var(--#{sys.$prefix}typography-size-xs);
|
|
375
|
+
font-weight: var(--#{sys.$prefix}typography-weight-medium, 600);
|
|
376
|
+
letter-spacing: 0.05em;
|
|
377
|
+
text-transform: uppercase;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
&__fields-dash {
|
|
381
|
+
color: var(--#{sys.$prefix}color-fg-muted);
|
|
382
|
+
padding-block-end: var(--#{sys.$prefix}spacing-sm);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&__calendars {
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: flex-start;
|
|
388
|
+
gap: var(--#{sys.$prefix}spacing-lg);
|
|
389
|
+
flex-wrap: wrap;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&__foot {
|
|
393
|
+
display: flex;
|
|
394
|
+
justify-content: flex-end;
|
|
395
|
+
gap: var(--#{sys.$prefix}spacing-sm);
|
|
396
|
+
padding: var(--#{sys.$prefix}spacing-md);
|
|
397
|
+
border-block-start: var(--#{sys.$prefix}border-width) solid var(--#{sys.$prefix}color-border);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
@@ -33,21 +33,20 @@
|
|
|
33
33
|
// ---------------------------------------------------------------------------
|
|
34
34
|
//
|
|
35
35
|
// Size xs:
|
|
36
|
-
// xs (24px) is
|
|
37
|
-
// Uses a smaller radius fallback (radius-sm)
|
|
36
|
+
// xs (24px) is the ladder's dense step, shared with Button via
|
|
37
|
+
// --tui-control-height-xs. Uses a smaller radius fallback (radius-sm).
|
|
38
38
|
// At 24px, this is below WCAG 2.5.8's 24×24 CSS pixel minimum for pointer
|
|
39
39
|
// targets. Acceptable inside toolbars with adequate spacing; add padding or
|
|
40
40
|
// min-size when used standalone on touch interfaces.
|
|
41
41
|
//
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
45
|
-
// warning themes add little value. Default ghost style uses neutral fg.
|
|
42
|
+
// Themes:
|
|
43
|
+
// secondary (default — neutral fg, grey interact washes), primary, and the
|
|
44
|
+
// status set (danger/success/warning/info) across all three variants.
|
|
46
45
|
//
|
|
47
46
|
// ==========================================================================
|
|
48
47
|
|
|
49
48
|
// Size defaults (used as fallbacks when control-height tokens aren't set)
|
|
50
|
-
$_size-xs: 1.5rem; // 24px —
|
|
49
|
+
$_size-xs: 1.5rem; // 24px — dense step, shared token --tui-control-height-xs
|
|
51
50
|
$_size-sm: 2rem; // 32px
|
|
52
51
|
$_size-md: 2.5rem; // 40px
|
|
53
52
|
$_size-lg: 3rem; // 48px
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
// Sizes
|
|
146
145
|
// -------------------------------------------------------------------------
|
|
147
146
|
&.is-size-xs {
|
|
148
|
-
--_size: #{$_size-xs};
|
|
147
|
+
--_size: var(--#{sys.$prefix}control-height-xs, #{$_size-xs});
|
|
149
148
|
--_radius: var(--#{sys.$prefix}icon-button-radius, var(--#{sys.$prefix}radius-sm));
|
|
150
149
|
}
|
|
151
150
|
|
|
@@ -174,11 +173,14 @@
|
|
|
174
173
|
--_bg-pressed: var(--#{sys.$prefix}theme-primary-subtle);
|
|
175
174
|
}
|
|
176
175
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
176
|
+
// Status themes (danger/success/warning/info) share one recipe.
|
|
177
|
+
@each $status in (danger, success, warning, info) {
|
|
178
|
+
&.is-theme-#{$status} {
|
|
179
|
+
--_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}theme-#{$status}-base));
|
|
180
|
+
--_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}theme-#{$status}-strong));
|
|
181
|
+
--_bg-interact: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-subtlest));
|
|
182
|
+
--_bg-pressed: var(--#{sys.$prefix}theme-#{$status}-subtle);
|
|
183
|
+
}
|
|
182
184
|
}
|
|
183
185
|
|
|
184
186
|
// -------------------------------------------------------------------------
|
|
@@ -198,10 +200,12 @@
|
|
|
198
200
|
--_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}theme-primary-strong));
|
|
199
201
|
}
|
|
200
202
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
@each $status in (danger, success, warning, info) {
|
|
204
|
+
&.is-style-outline.is-theme-#{$status} {
|
|
205
|
+
--_border: var(--#{sys.$prefix}icon-button-border, var(--#{sys.$prefix}theme-#{$status}-base));
|
|
206
|
+
--_bg-interact: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-subtlest));
|
|
207
|
+
--_fg-interact: var(--#{sys.$prefix}icon-button-fg-interact, var(--#{sys.$prefix}theme-#{$status}-strong));
|
|
208
|
+
}
|
|
205
209
|
}
|
|
206
210
|
|
|
207
211
|
// Solid: filled background, darken on hover
|
|
@@ -237,19 +241,21 @@
|
|
|
237
241
|
}
|
|
238
242
|
}
|
|
239
243
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
244
|
+
@each $status in (danger, success, warning, info) {
|
|
245
|
+
&.is-style-solid.is-theme-#{$status} {
|
|
246
|
+
--_bg: var(--#{sys.$prefix}icon-button-bg, var(--#{sys.$prefix}theme-#{$status}-base));
|
|
247
|
+
--_fg: var(--#{sys.$prefix}icon-button-fg, var(--#{sys.$prefix}color-fg-on-accent));
|
|
248
|
+
--_bg-pressed: var(--#{sys.$prefix}theme-#{$status}-stronger);
|
|
249
|
+
|
|
250
|
+
&:hover,
|
|
251
|
+
&:focus-visible,
|
|
252
|
+
&:active {
|
|
253
|
+
--_bg: var(--#{sys.$prefix}icon-button-bg-interact, var(--#{sys.$prefix}theme-#{$status}-stronger));
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
&[aria-pressed="true"] {
|
|
257
|
+
--_bg: var(--_bg-pressed);
|
|
258
|
+
}
|
|
253
259
|
}
|
|
254
260
|
}
|
|
255
261
|
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
input[type="search"],
|
|
48
48
|
input[type="number"],
|
|
49
49
|
input[type="tel"],
|
|
50
|
-
input[type="range"],
|
|
51
50
|
input[type="date"],
|
|
52
51
|
input[type="month"],
|
|
53
52
|
input[type="week"],
|
|
@@ -152,7 +151,7 @@
|
|
|
152
151
|
:where(.#{sys.$prefix}interface) .#{sys.$prefix}toggle {
|
|
153
152
|
// Internal tokens
|
|
154
153
|
--_accent: var(--#{sys.$prefix}input-accent, var(--#{sys.$prefix}theme-primary-base));
|
|
155
|
-
--_track-off: var(--#{sys.$prefix}
|
|
154
|
+
--_track-off: var(--#{sys.$prefix}color-fill-strong);
|
|
156
155
|
|
|
157
156
|
input[type="checkbox"] {
|
|
158
157
|
position: absolute;
|