@tangible/ui 0.0.18 → 0.0.19

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 (43) hide show
  1. package/README.md +31 -1
  2. package/package.json +3 -1
  3. package/styles/components/_bundle.scss +98 -71
  4. package/styles/components/accordion.scss +289 -0
  5. package/styles/components/avatar.scss +346 -0
  6. package/styles/components/button.scss +468 -0
  7. package/styles/components/card.scss +261 -0
  8. package/styles/components/checkbox.scss +184 -0
  9. package/styles/components/chip-group.scss +49 -0
  10. package/styles/components/chip.scss +472 -0
  11. package/styles/components/combobox.scss +378 -0
  12. package/styles/components/content-indicator.scss +114 -0
  13. package/styles/components/dropdown.scss +179 -0
  14. package/styles/components/field.scss +120 -0
  15. package/styles/components/icon-button.scss +311 -0
  16. package/styles/components/icon.scss +42 -0
  17. package/styles/components/modal.scss +312 -0
  18. package/styles/components/move-handle.scss +383 -0
  19. package/styles/components/multi-select.scss +449 -0
  20. package/styles/components/notice.scss +430 -0
  21. package/styles/components/overlap-stack.scss +81 -0
  22. package/styles/components/pager.scss +83 -0
  23. package/styles/components/popover.scss +70 -0
  24. package/styles/components/progress.scss +391 -0
  25. package/styles/components/radio.scss +259 -0
  26. package/styles/components/rating.scss +142 -0
  27. package/styles/components/segmented-control.scss +285 -0
  28. package/styles/components/select.scss +386 -0
  29. package/styles/components/sidebar.scss +240 -0
  30. package/styles/components/step-indicator.scss +118 -0
  31. package/styles/components/step-list.scss +130 -0
  32. package/styles/components/switch.scss +229 -0
  33. package/styles/components/table.scss +139 -0
  34. package/styles/components/tabs.scss +297 -0
  35. package/styles/components/text-input.scss +142 -0
  36. package/styles/components/textarea.scss +35 -0
  37. package/styles/components/toolbar.scss +62 -0
  38. package/styles/components/tooltip.scss +102 -0
  39. package/styles/core.css +1 -0
  40. package/styles/core.scss +12 -0
  41. package/styles/core.unlayered.css +1 -0
  42. package/styles/index.scss +29 -4
  43. package/tui-manifest.json +2 -2
@@ -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}font-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,81 @@
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 reverse z-index stacking.
18
+ // First item appears on top, last on bottom.
19
+ //
20
+ // Component API tokens (never defined here, only read via fallback):
21
+ // --tui-overlap-stack-overlap Overlap amount (-0.5rem)
22
+ // --tui-overlap-stack-overflow-bg Overflow badge background
23
+ // --tui-overlap-stack-overflow-fg Overflow badge foreground
24
+ //
25
+ // Frame-only tokens (require `frame` prop):
26
+ // --tui-overlap-stack-item-radius Clipping radius (full)
27
+ // --tui-overlap-stack-border-width Border width (0 = off)
28
+ // --tui-overlap-stack-border-color Border color (bg-surface)
29
+ //
30
+ // ==========================================================================
31
+
32
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack {
33
+ display: inline-flex;
34
+ align-items: center;
35
+ }
36
+
37
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack__item {
38
+ position: relative;
39
+ display: inline-flex; // Prevent line-height weirdness from span
40
+ // z-index set inline per item
41
+
42
+ // Apply overlap margin to all but first item
43
+ &:not(:first-child) {
44
+ margin-inline-start: var(--#{sys.$prefix}overlap-stack-overlap, -0.5rem);
45
+ }
46
+
47
+ // Framing opt-in via `frame` prop — adds clipping and optional border
48
+ &.is-framed {
49
+ // Internal tokens for frame styling
50
+ --_radius: var(--#{sys.$prefix}overlap-stack-item-radius, var(--#{sys.$prefix}radius-full));
51
+ --_border-width: var(--#{sys.$prefix}overlap-stack-border-width, 0);
52
+ --_border-color: var(--#{sys.$prefix}overlap-stack-border-color, var(--#{sys.$prefix}color-bg-surface));
53
+
54
+ overflow: hidden;
55
+ border-radius: var(--_radius);
56
+ border: var(--_border-width) solid var(--_border-color);
57
+ }
58
+ }
59
+
60
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}overlap-stack__overflow {
61
+ // Internal tokens
62
+ --_bg: var(--#{sys.$prefix}overlap-stack-overflow-bg, var(--#{sys.$prefix}color-bg-muted));
63
+ --_fg: var(--#{sys.$prefix}overlap-stack-overflow-fg, var(--#{sys.$prefix}color-fg-muted));
64
+
65
+ display: inline-flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ min-width: 1.5rem;
69
+ min-height: 1.5rem;
70
+ padding-inline: 0.25rem;
71
+ border-radius: var(--#{sys.$prefix}radius-full);
72
+ background-color: var(--_bg);
73
+ color: var(--_fg);
74
+ font-size: 0.75rem;
75
+ font-weight: var(--#{sys.$prefix}font-weight-medium, 500);
76
+
77
+ @media (forced-colors: active) {
78
+ border: 1px solid CanvasText;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,83 @@
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
+ // Reference Button's border token with fallback
35
+ --_border: var(--#{sys.$prefix}button-border, var(--#{sys.$prefix}color-border));
36
+ border-color: var(--_border) !important;
37
+ font-size: var(--#{sys.$prefix}typography-size-sm);
38
+ padding-inline: 0.85em;
39
+ padding-block: 0.4em;
40
+
41
+ // Connected button group: remove inner radii
42
+ &:not(:first-child) {
43
+ border-start-start-radius: 0;
44
+ border-end-start-radius: 0;
45
+ border-inline-start-width: 0;
46
+ }
47
+
48
+ &:not(:last-child) {
49
+ border-start-end-radius: 0;
50
+ border-end-end-radius: 0;
51
+ }
52
+ }
53
+
54
+ // Ellipsis: non-interactive, styled to match outline buttons
55
+ .#{sys.$prefix}pager__ellipsis {
56
+ display: inline-flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ border: var(--#{sys.$prefix}border-width) solid var(--_border);
60
+ background: transparent;
61
+ color: var(--#{sys.$prefix}color-fg-muted);
62
+ border-radius: var(--#{sys.$prefix}radius-sm);
63
+ cursor: default;
64
+ user-select: none;
65
+ }
66
+ }
67
+
68
+ // Info section: page count + page size selector
69
+ &__info {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: var(--#{sys.$prefix}spacing-sm);
73
+ margin-inline-start: auto;
74
+ }
75
+
76
+ // Page size selector label
77
+ &__page-size-label {
78
+ display: flex;
79
+ align-items: center;
80
+ gap: var(--#{sys.$prefix}spacing-xs);
81
+ }
82
+ }
83
+ }
@@ -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
+ }