@tangible/ui 0.0.18 → 0.0.20

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 (80) hide show
  1. package/README.md +32 -1
  2. package/components/Avatar/Avatar.d.ts +3 -1
  3. package/components/Avatar/Avatar.js +6 -25
  4. package/components/Avatar/index.d.ts +2 -2
  5. package/components/Avatar/index.js +1 -1
  6. package/components/Avatar/types.d.ts +8 -8
  7. package/components/Avatar/types.js +0 -12
  8. package/components/Icon/Icon.d.ts +10 -1
  9. package/components/Icon/Icon.js +5 -1
  10. package/components/Modal/Modal.js +1 -1
  11. package/components/OverlapStack/OverlapStack.js +4 -2
  12. package/components/Pager/Pager.js +9 -3
  13. package/components/Pager/types.d.ts +9 -0
  14. package/components/Pager/types.js +2 -0
  15. package/components/Progress/Progress.js +3 -3
  16. package/components/Rating/Rating.js +4 -2
  17. package/components/Rating/types.d.ts +5 -1
  18. package/components/Rating/types.js +1 -0
  19. package/components/Select/Select.d.ts +1 -1
  20. package/components/Select/Select.js +5 -3
  21. package/components/Select/types.d.ts +5 -0
  22. package/components/StepIndicator/StepIndicator.js +6 -2
  23. package/components/StepIndicator/types.d.ts +3 -0
  24. package/components/StepIndicator/types.js +1 -0
  25. package/components/Table/BulkActionsBar.js +4 -1
  26. package/components/Table/DataTable.js +8 -5
  27. package/components/index.d.ts +3 -2
  28. package/components/index.js +2 -1
  29. package/package.json +3 -1
  30. package/styles/all.css +1 -1
  31. package/styles/all.expanded.css +220 -88
  32. package/styles/all.expanded.unlayered.css +220 -88
  33. package/styles/all.unlayered.css +1 -1
  34. package/styles/components/_bundle.scss +98 -71
  35. package/styles/components/accordion.scss +289 -0
  36. package/styles/components/avatar.scss +298 -0
  37. package/styles/components/button.scss +468 -0
  38. package/styles/components/card.scss +261 -0
  39. package/styles/components/checkbox.scss +184 -0
  40. package/styles/components/chip-group.scss +49 -0
  41. package/styles/components/chip.scss +472 -0
  42. package/styles/components/combobox.scss +378 -0
  43. package/styles/components/content-indicator.scss +114 -0
  44. package/styles/components/dropdown.scss +179 -0
  45. package/styles/components/field.scss +120 -0
  46. package/styles/components/icon-button.scss +311 -0
  47. package/styles/components/icon.scss +42 -0
  48. package/styles/components/input/index.scss +6 -1
  49. package/styles/components/modal.scss +312 -0
  50. package/styles/components/move-handle.scss +383 -0
  51. package/styles/components/multi-select.scss +449 -0
  52. package/styles/components/notice.scss +430 -0
  53. package/styles/components/overlap-stack.scss +82 -0
  54. package/styles/components/pager.scss +86 -0
  55. package/styles/components/popover.scss +70 -0
  56. package/styles/components/progress.scss +403 -0
  57. package/styles/components/radio.scss +259 -0
  58. package/styles/components/rating.scss +142 -0
  59. package/styles/components/segmented-control.scss +285 -0
  60. package/styles/components/select.scss +386 -0
  61. package/styles/components/sidebar.scss +240 -0
  62. package/styles/components/step-indicator.scss +118 -0
  63. package/styles/components/step-list.scss +130 -0
  64. package/styles/components/switch.scss +229 -0
  65. package/styles/components/table.scss +140 -0
  66. package/styles/components/tabs.scss +297 -0
  67. package/styles/components/text-input.scss +142 -0
  68. package/styles/components/textarea.scss +35 -0
  69. package/styles/components/toolbar.scss +62 -0
  70. package/styles/components/tooltip.scss +102 -0
  71. package/styles/core.css +1 -0
  72. package/styles/core.scss +12 -0
  73. package/styles/core.unlayered.css +1 -0
  74. package/styles/index.scss +34 -6
  75. package/styles/system/_constants.scss +2 -2
  76. package/styles/system/_motion.scss +20 -18
  77. package/styles/system/_tokens.scss +89 -10
  78. package/tui-manifest.json +10 -3
  79. package/utils/generative.d.ts +16 -0
  80. package/utils/generative.js +45 -0
@@ -0,0 +1,430 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-notice-bg
5
+ --tui-notice-border
6
+ --tui-notice-stripe
7
+ --tui-notice-stripe-width
8
+ --tui-notice-fg
9
+ --tui-notice-radius
10
+ --tui-notice-padding
11
+ --tui-notice-foot-basis
12
+ */
13
+
14
+ @mixin styles() {
15
+ // ==========================================================================
16
+ // Notice Component
17
+ // ==========================================================================
18
+ //
19
+ // Component API tokens (never defined here, only read via fallback):
20
+ // --tui-notice-bg Background color
21
+ // --tui-notice-border Border color
22
+ // --tui-notice-stripe Stripe color (left edge, when enabled)
23
+ // --tui-notice-stripe-width Stripe width (default 4px)
24
+ // --tui-notice-fg Text color
25
+ // --tui-notice-radius Border radius
26
+ // --tui-notice-padding Padding
27
+ // --tui-notice-foot-basis Flex basis for foot in inline layout
28
+ //
29
+ // To override from consuming code:
30
+ // .my-context .tui-notice { --tui-notice-bg: hotpink; }
31
+ //
32
+ // ==========================================================================
33
+
34
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}notice {
35
+ // Internal tokens — read component API with fallback to primitives
36
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}color-bg-muted));
37
+ --_border: var(--#{sys.$prefix}notice-border, transparent);
38
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-primary-base));
39
+ --_fg: var(--#{sys.$prefix}notice-fg, inherit);
40
+ --_radius: var(--#{sys.$prefix}notice-radius, var(--#{sys.$prefix}radius-md));
41
+ --_padding: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
42
+ --_foot-basis: var(--#{sys.$prefix}notice-foot-basis, 500px);
43
+
44
+ // Layout internal
45
+ --_gap: var(--#{sys.$prefix}spacing-sm);
46
+ --_para-gap: var(--#{sys.$prefix}spacing-sm);
47
+
48
+ container-type: inline-size;
49
+ container-name: tuiNotice;
50
+ position: relative;
51
+ width: 100%;
52
+ border-style: solid;
53
+ border-width: var(--#{sys.$prefix}border-width);
54
+ border-color: var(--_border);
55
+ border-radius: var(--_radius);
56
+ background-color: var(--_bg);
57
+ color: var(--_fg);
58
+
59
+ // -------------------------------------------------------------------------
60
+ // Inner container
61
+ // -------------------------------------------------------------------------
62
+ &__inner {
63
+ display: flex;
64
+ flex-direction: column;
65
+ }
66
+
67
+ // -------------------------------------------------------------------------
68
+ // Head: icon + title (+ dismiss in stack mode)
69
+ // -------------------------------------------------------------------------
70
+
71
+ &__icon {
72
+ flex: 0 0 auto;
73
+ display: inline-flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ line-height: 0;
77
+ font-size: var(--#{sys.$prefix}typography-size-xl);
78
+ color: var(--_icon-color, inherit);
79
+ }
80
+
81
+ &__title {
82
+ flex: 1 1 auto;
83
+ margin: 0;
84
+ font-weight: var(--#{sys.$prefix}typography-weight-semibold, 600);
85
+ }
86
+ // -------------------------------------------------------------------------
87
+ // Slots
88
+ // -------------------------------------------------------------------------
89
+ &__head {
90
+ padding-block: var(--_padding);
91
+ padding-inline: var(--_padding);
92
+ width: 100%;
93
+ display: flex;
94
+ align-items: center;
95
+ gap: var(--_gap);
96
+ }
97
+
98
+ &__body {
99
+ padding-inline: var(--_padding);
100
+ width: 100%;
101
+
102
+ > *:first-child {
103
+ margin-block-start: unset;
104
+ }
105
+
106
+ > *:last-child {
107
+ margin-block-end: unset;
108
+ }
109
+
110
+ > p {
111
+ margin: 0;
112
+ margin-block-end: var(--_para-gap);
113
+
114
+ &:last-child {
115
+ margin-block-end: 0;
116
+ }
117
+ }
118
+
119
+ a {
120
+ color: var(--#{sys.$prefix}theme-primary-strong);
121
+ text-decoration: underline;
122
+
123
+ &:hover {
124
+ color: var(--#{sys.$prefix}theme-primary-stronger);
125
+ }
126
+ }
127
+
128
+ &:first-child {
129
+ padding-block-start: var(--_padding);
130
+ }
131
+
132
+ &:last-child {
133
+ padding-block-end: var(--_padding);
134
+ }
135
+ }
136
+
137
+ &__foot {
138
+ padding-block: var(--_padding);
139
+ padding-inline: var(--_padding);
140
+ width: 100%;
141
+ }
142
+
143
+ // -------------------------------------------------------------------------
144
+ // Size presets — scale padding, internal gap, title typography, and body text.
145
+ // Default (md) requires no class. Icon size stays fixed across tiers.
146
+ // -------------------------------------------------------------------------
147
+ &.is-size-sm {
148
+ --_padding: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-sm));
149
+ --_gap: var(--#{sys.$prefix}spacing-xs);
150
+ --_para-gap: var(--#{sys.$prefix}spacing-xs);
151
+
152
+ .#{sys.$prefix}notice__title {
153
+ font-size: var(--#{sys.$prefix}typography-size-md);
154
+ }
155
+
156
+ .#{sys.$prefix}notice__body {
157
+ font-size: var(--#{sys.$prefix}typography-size-sm);
158
+ }
159
+ }
160
+
161
+ &.is-size-lg {
162
+ --_padding: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-lg));
163
+ --_gap: var(--#{sys.$prefix}spacing-md);
164
+ --_para-gap: var(--#{sys.$prefix}spacing-md);
165
+
166
+ .#{sys.$prefix}notice__title {
167
+ font-size: var(--#{sys.$prefix}typography-size-lg);
168
+ }
169
+ }
170
+
171
+ // -------------------------------------------------------------------------
172
+ // Inline layout
173
+ // -------------------------------------------------------------------------
174
+ // Note: Root flex must be outside container query — elements can't query themselves
175
+ &.is-layout-inline {
176
+ display: flex;
177
+ align-items: center;
178
+ }
179
+
180
+ @container tuiNotice (width >= 400px) {
181
+ &.is-layout-inline {
182
+ // Make root a flex container so dismiss button flows at end
183
+ display: flex;
184
+ align-items: center;
185
+ }
186
+
187
+ // :where() on layout modifier keeps slot specificity low for overrides
188
+ :where(&.is-layout-inline) .#{sys.$prefix}notice__inner {
189
+ display: flex;
190
+ flex-direction: row;
191
+ align-items: center;
192
+ gap: var(--_padding);
193
+ flex: 1 1 auto;
194
+
195
+ .#{sys.$prefix}notice__head {
196
+ padding-inline-start: var(--_padding);
197
+ padding-block: var(--_padding);
198
+ flex: 0 1 auto;
199
+
200
+ &:has(.#{sys.$prefix}icon:only-child) {
201
+ flex: 0 0 max-content;
202
+ }
203
+ }
204
+
205
+ .#{sys.$prefix}notice__body {
206
+ flex: 2 1 auto;
207
+ padding-block: var(--_padding);
208
+ }
209
+
210
+ .#{sys.$prefix}notice__foot {
211
+ width: unset;
212
+ flex: 0 1 var(--_foot-basis);
213
+ padding-block: var(--_padding);
214
+ padding-inline-end: var(--_padding);
215
+ margin-inline-start: auto;
216
+ justify-content: flex-end;
217
+ }
218
+
219
+ .#{sys.$prefix}notice__head,
220
+ .#{sys.$prefix}notice__body,
221
+ .#{sys.$prefix}notice__foot {
222
+ &:not(:first-child) {
223
+ padding-inline-start: 0;
224
+ }
225
+
226
+ &:not(:last-child) {
227
+ padding-inline-end: 0;
228
+ }
229
+ }
230
+ }
231
+ }
232
+ // -------------------------------------------------------------------------
233
+ // Reserve space for dismiss button when present (stacked mode only)
234
+ // -------------------------------------------------------------------------
235
+ &.is-dismissible .#{sys.$prefix}notice__inner {
236
+ padding-inline-end: calc(var(--_padding) + var(--#{sys.$prefix}control-height-sm));
237
+ }
238
+
239
+ // In inline mode, dismiss flows so no reserved space needed
240
+ @container tuiNotice (width >= 400px) {
241
+ :where(&.is-layout-inline.is-dismissible) .#{sys.$prefix}notice__inner {
242
+ padding-inline-end: 0;
243
+
244
+ // Remove end padding from last child — gap comes from dismiss button's margin
245
+ .#{sys.$prefix}notice__head,
246
+ .#{sys.$prefix}notice__body,
247
+ .#{sys.$prefix}notice__foot {
248
+ &:last-child {
249
+ padding-inline-end: 0;
250
+ }
251
+ }
252
+ }
253
+ }
254
+
255
+ // -------------------------------------------------------------------------
256
+ // Stripe (opt-in left accent bar)
257
+ // -------------------------------------------------------------------------
258
+ // Uses a pseudo-element instead of border-inline-start so the stripe
259
+ // doesn't interact with border-radius geometry or border-width changes.
260
+ &.has-stripe {
261
+ overflow: hidden; // clip pseudo to border-radius
262
+ padding-inline-start: var(--#{sys.$prefix}notice-stripe-width, 4px);
263
+
264
+ &::before {
265
+ content: "";
266
+ position: absolute;
267
+ inset-block: 0;
268
+ inset-inline-start: 0;
269
+ width: var(--#{sys.$prefix}notice-stripe-width, 4px);
270
+ background-color: var(--_stripe);
271
+ z-index: 1;
272
+ }
273
+ }
274
+
275
+ // -------------------------------------------------------------------------
276
+ // Themes
277
+ // -------------------------------------------------------------------------
278
+ &.is-theme-info {
279
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-primary-subtlest));
280
+ --_bg-hover: var(--#{sys.$prefix}theme-primary-subtle);
281
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-primary-base));
282
+ --_icon-color: var(--#{sys.$prefix}theme-primary-base);
283
+ }
284
+
285
+ &.is-theme-success {
286
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-success-subtlest));
287
+ --_bg-hover: var(--#{sys.$prefix}theme-success-subtle);
288
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-success-base));
289
+ --_icon-color: var(--#{sys.$prefix}theme-success-base);
290
+ }
291
+
292
+ &.is-theme-warning {
293
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-warning-subtlest));
294
+ --_bg-hover: var(--#{sys.$prefix}theme-warning-subtle);
295
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-warning-base));
296
+ --_icon-color: var(--#{sys.$prefix}theme-warning-base);
297
+ }
298
+
299
+ &.is-theme-danger {
300
+ --_bg: var(--#{sys.$prefix}notice-bg, var(--#{sys.$prefix}theme-danger-subtlest));
301
+ --_bg-hover: var(--#{sys.$prefix}theme-danger-subtle);
302
+ --_stripe: var(--#{sys.$prefix}notice-stripe, var(--#{sys.$prefix}theme-danger-base));
303
+ --_icon-color: var(--#{sys.$prefix}theme-danger-base);
304
+ }
305
+
306
+ // -------------------------------------------------------------------------
307
+ // Elevated style
308
+ // -------------------------------------------------------------------------
309
+ &.is-style-elevated {
310
+ box-shadow: var(--#{sys.$prefix}shadow-md);
311
+ }
312
+
313
+ // -------------------------------------------------------------------------
314
+ // Interactive state
315
+ // -------------------------------------------------------------------------
316
+ &.has-interaction {
317
+ cursor: pointer;
318
+ transition-property: background-color, border-color, box-shadow;
319
+ transition-duration: var(--#{sys.$prefix}motion-duration);
320
+ transition-timing-function: var(--#{sys.$prefix}motion-timing);
321
+
322
+ &:hover {
323
+ --_bg: var(--_bg-hover, var(--#{sys.$prefix}color-bg-muted));
324
+ }
325
+
326
+ // Focus ring for interactive (clickable) notices
327
+ &:focus-visible {
328
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
329
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
330
+ }
331
+ }
332
+
333
+ // -------------------------------------------------------------------------
334
+ // Focusable state (programmatic focus, e.g., toast notifications)
335
+ // -------------------------------------------------------------------------
336
+ &.is-focusable:focus-visible {
337
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
338
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
339
+ }
340
+
341
+ // -------------------------------------------------------------------------
342
+ // Disabled state
343
+ // -------------------------------------------------------------------------
344
+ &.is-disabled {
345
+ opacity: var(--#{sys.$prefix}opacity-disabled);
346
+ pointer-events: none;
347
+ }
348
+
349
+ // -------------------------------------------------------------------------
350
+ // Exit Animations
351
+ // -------------------------------------------------------------------------
352
+
353
+ // Collapse: fade + height collapse (for inline/block notices)
354
+ &.is-exiting-collapse {
355
+ display: grid;
356
+ animation: #{sys.$prefix}noticeExitCollapse var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
357
+
358
+ .#{sys.$prefix}notice__inner {
359
+ min-height: 0;
360
+ overflow: hidden;
361
+ }
362
+ }
363
+
364
+ // Fade: opacity + subtle scale (for overlays/toasts)
365
+ &.is-exiting-fade {
366
+ animation: #{sys.$prefix}noticeExitFade var(--#{sys.$prefix}motion-duration) var(--#{sys.$prefix}motion-timing) forwards;
367
+ }
368
+
369
+ // -------------------------------------------------------------------------
370
+ // Reduced Motion
371
+ // -------------------------------------------------------------------------
372
+ @media (prefers-reduced-motion: reduce) {
373
+ &.is-exiting-collapse,
374
+ &.is-exiting-fade {
375
+ animation: none;
376
+ opacity: 0;
377
+ }
378
+
379
+ &.has-interaction {
380
+ transition-duration: 0s;
381
+ }
382
+ }
383
+ }
384
+
385
+ // ---------------------------------------------------------------------------
386
+ // Exit Animation Keyframes
387
+ // ---------------------------------------------------------------------------
388
+
389
+ @keyframes #{sys.$prefix}noticeExitCollapse {
390
+ 0% {
391
+ grid-template-rows: 1fr;
392
+ opacity: 1;
393
+ }
394
+ 100% {
395
+ grid-template-rows: 0fr;
396
+ opacity: 0;
397
+ }
398
+ }
399
+
400
+ @keyframes #{sys.$prefix}noticeExitFade {
401
+ 0% {
402
+ opacity: 1;
403
+ transform: scale(1);
404
+ }
405
+ 100% {
406
+ opacity: 0;
407
+ transform: scale(0.95);
408
+ }
409
+ }
410
+
411
+ // ---------------------------------------------------------------------------
412
+ // Dismiss button (outside :where() for specificity over IconButton)
413
+ // ---------------------------------------------------------------------------
414
+ // IconButton has `.tui-interface .tui-icon-button { position: relative }`
415
+ // which would override :where() selectors. Compound selector wins.
416
+ .#{sys.$prefix}notice .#{sys.$prefix}notice__dismiss {
417
+ position: absolute;
418
+ inset-block-start: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
419
+ inset-inline-end: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
420
+ }
421
+
422
+ // In inline mode, dismiss button flows at end instead of absolute positioning
423
+ .#{sys.$prefix}notice.is-layout-inline .#{sys.$prefix}notice__dismiss {
424
+ position: static;
425
+ flex-shrink: 0;
426
+ align-self: center;
427
+ margin-inline-start: var(--#{sys.$prefix}spacing-sm);
428
+ margin-inline-end: var(--#{sys.$prefix}notice-padding, var(--#{sys.$prefix}spacing-md));
429
+ }
430
+ }
@@ -0,0 +1,82 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-overlap-stack-overlap
5
+ --tui-overlap-stack-overflow-bg
6
+ --tui-overlap-stack-overflow-fg
7
+ --tui-overlap-stack-item-radius
8
+ --tui-overlap-stack-border-width
9
+ --tui-overlap-stack-border-color
10
+ */
11
+
12
+ @mixin styles() {
13
+ // ==========================================================================
14
+ // OverlapStack Component
15
+ // ==========================================================================
16
+ //
17
+ // Layout utility for overlapping items with ascending z-index stacking.
18
+ // Last item (and the overflow badge) appears on top — the convention for
19
+ // avatar stacks, where the newest/overflow edge reads as frontmost.
20
+ //
21
+ // Component API tokens (never defined here, only read via fallback):
22
+ // --tui-overlap-stack-overlap Overlap amount (-0.5rem)
23
+ // --tui-overlap-stack-overflow-bg Overflow badge background
24
+ // --tui-overlap-stack-overflow-fg Overflow badge foreground
25
+ //
26
+ // Frame-only tokens (require `frame` prop):
27
+ // --tui-overlap-stack-item-radius Clipping radius (full)
28
+ // --tui-overlap-stack-border-width Border width (0 = off)
29
+ // --tui-overlap-stack-border-color Border color (bg-surface)
30
+ //
31
+ // ==========================================================================
32
+
33
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ }
37
+
38
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack__item {
39
+ position: relative;
40
+ display: inline-flex; // Prevent line-height weirdness from span
41
+ // z-index set inline per item
42
+
43
+ // Apply overlap margin to all but first item
44
+ &:not(:first-child) {
45
+ margin-inline-start: var(--#{sys.$prefix}overlap-stack-overlap, -0.5rem);
46
+ }
47
+
48
+ // Framing opt-in via `frame` prop — adds clipping and optional border
49
+ &.is-framed {
50
+ // Internal tokens for frame styling
51
+ --_radius: var(--#{sys.$prefix}overlap-stack-item-radius, var(--#{sys.$prefix}radius-full));
52
+ --_border-width: var(--#{sys.$prefix}overlap-stack-border-width, 0);
53
+ --_border-color: var(--#{sys.$prefix}overlap-stack-border-color, var(--#{sys.$prefix}color-bg-surface));
54
+
55
+ overflow: hidden;
56
+ border-radius: var(--_radius);
57
+ border: var(--_border-width) solid var(--_border-color);
58
+ }
59
+ }
60
+
61
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack__overflow {
62
+ // Internal tokens
63
+ --_bg: var(--#{sys.$prefix}overlap-stack-overflow-bg, var(--#{sys.$prefix}color-bg-muted));
64
+ --_fg: var(--#{sys.$prefix}overlap-stack-overflow-fg, var(--#{sys.$prefix}color-fg-muted));
65
+
66
+ display: inline-flex;
67
+ align-items: center;
68
+ justify-content: center;
69
+ min-width: 1.5rem;
70
+ min-height: 1.5rem;
71
+ padding-inline: 0.25rem;
72
+ border-radius: var(--#{sys.$prefix}radius-full);
73
+ background-color: var(--_bg);
74
+ color: var(--_fg);
75
+ font-size: 0.75rem;
76
+ font-weight: var(--#{sys.$prefix}typography-weight-medium, 500);
77
+
78
+ @media (forced-colors: active) {
79
+ border: 1px solid CanvasText;
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,86 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-pager-gap
5
+ */
6
+
7
+ @mixin styles() {
8
+ // ==========================================================================
9
+ // Pager Component
10
+ // ==========================================================================
11
+ //
12
+ // Generic pagination control. Used standalone or wrapped by TablePagination.
13
+ //
14
+ // Component API tokens (never defined here, only read via fallback):
15
+ // --tui-pager-gap Gap between nav and info sections
16
+ //
17
+ // ==========================================================================
18
+
19
+ .#{sys.$prefix}pager {
20
+ display: flex;
21
+ flex-wrap: wrap;
22
+ align-items: center;
23
+ justify-content: space-between;
24
+ gap: var(--#{sys.$prefix}pager-gap, var(--#{sys.$prefix}spacing-md));
25
+ padding-block: var(--#{sys.$prefix}spacing-md);
26
+
27
+ // Connected button group for nav items
28
+ &__nav {
29
+ display: flex;
30
+ align-items: center;
31
+ gap: 0;
32
+ .#{sys.$prefix}pager__item,
33
+ .#{sys.$prefix}pager__ellipsis {
34
+ // Token Bridging: pager items are Button consumers — the connected
35
+ // group border routes through Button's own API token instead of
36
+ // fighting its internals with !important. Theme via
37
+ // --tui-pager-item-border.
38
+ --#{sys.$prefix}button-border: var(--#{sys.$prefix}pager-item-border, var(--#{sys.$prefix}color-border));
39
+ border-color: var(--#{sys.$prefix}button-border);
40
+ font-size: var(--#{sys.$prefix}typography-size-sm);
41
+ padding-inline: 0.85em;
42
+ padding-block: 0.4em;
43
+
44
+ // Connected button group: remove inner radii
45
+ &:not(:first-child) {
46
+ border-start-start-radius: 0;
47
+ border-end-start-radius: 0;
48
+ border-inline-start-width: 0;
49
+ }
50
+
51
+ &:not(:last-child) {
52
+ border-start-end-radius: 0;
53
+ border-end-end-radius: 0;
54
+ }
55
+ }
56
+
57
+ // Ellipsis: non-interactive, styled to match outline buttons
58
+ .#{sys.$prefix}pager__ellipsis {
59
+ display: inline-flex;
60
+ align-items: center;
61
+ justify-content: center;
62
+ border: var(--#{sys.$prefix}border-width) solid var(--_border);
63
+ background: transparent;
64
+ color: var(--#{sys.$prefix}color-fg-muted);
65
+ border-radius: var(--#{sys.$prefix}radius-sm);
66
+ cursor: default;
67
+ user-select: none;
68
+ }
69
+ }
70
+
71
+ // Info section: page count + page size selector
72
+ &__info {
73
+ display: flex;
74
+ align-items: center;
75
+ gap: var(--#{sys.$prefix}spacing-sm);
76
+ margin-inline-start: auto;
77
+ }
78
+
79
+ // Page size selector label
80
+ &__page-size-label {
81
+ display: flex;
82
+ align-items: center;
83
+ gap: var(--#{sys.$prefix}spacing-xs);
84
+ }
85
+ }
86
+ }
@@ -0,0 +1,70 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-popover-bg
5
+ --tui-popover-fg
6
+ --tui-popover-radius
7
+ --tui-popover-shadow
8
+ --tui-popover-border
9
+ --tui-popover-z
10
+ --tui-popover-min-width
11
+ --tui-popover-max-width
12
+ --tui-popover-padding
13
+ */
14
+
15
+ @mixin styles() {
16
+ // ==========================================================================
17
+ // Popover Component
18
+ // ==========================================================================
19
+ //
20
+ // Component API tokens (never defined here, only read via fallback):
21
+ // --tui-popover-bg Background color
22
+ // --tui-popover-fg Text color
23
+ // --tui-popover-radius Border radius
24
+ // --tui-popover-shadow Box shadow
25
+ // --tui-popover-border Border color
26
+ // --tui-popover-z Z-index for portal
27
+ // --tui-popover-min-width Minimum width
28
+ // --tui-popover-max-width Maximum width
29
+ // --tui-popover-padding Content padding
30
+ //
31
+ // The dialog-flavored sibling of Dropdown: an anchored panel for
32
+ // arbitrary content (pickers, small forms, previews). Same elevated
33
+ // surface treatment; padding is a token because embedded content
34
+ // (calendars, comboboxes) often brings its own.
35
+ //
36
+ // ==========================================================================
37
+
38
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}popover {
39
+ // Internal tokens
40
+ --_bg: var(--#{sys.$prefix}popover-bg, var(--#{sys.$prefix}color-bg-elevated));
41
+ --_fg: var(--#{sys.$prefix}popover-fg, var(--#{sys.$prefix}color-fg));
42
+ --_radius: var(--#{sys.$prefix}popover-radius, var(--#{sys.$prefix}radius-sm));
43
+ --_shadow: var(--#{sys.$prefix}popover-shadow, var(--#{sys.$prefix}shadow-md));
44
+ --_z: var(--#{sys.$prefix}popover-z, var(--#{sys.$prefix}layer-top));
45
+ --_border: var(--#{sys.$prefix}popover-border, var(--#{sys.$prefix}color-border));
46
+
47
+ // Layout
48
+ z-index: var(--_z);
49
+ min-width: var(--#{sys.$prefix}popover-min-width, 200px);
50
+ max-width: var(--#{sys.$prefix}popover-max-width, min(360px, calc(100vw - 32px)));
51
+ padding: var(--#{sys.$prefix}popover-padding, var(--#{sys.$prefix}spacing-sm, 12px));
52
+ box-sizing: border-box;
53
+ pointer-events: auto;
54
+
55
+ // Visual
56
+ background-color: var(--_bg);
57
+ color: var(--_fg);
58
+ border-radius: var(--_radius);
59
+ box-shadow: var(--_shadow);
60
+ border: 1px solid var(--_border);
61
+
62
+ // Typography
63
+ font-size: var(--#{sys.$prefix}typography-size-sm, 14px);
64
+ line-height: 1.4;
65
+
66
+ &:focus-visible {
67
+ outline: none;
68
+ }
69
+ }
70
+ }