@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,472 @@
1
+ @use "../system" as sys;
2
+
3
+ /* @tui-tokens
4
+ --tui-chip-bg
5
+ --tui-chip-fg
6
+ --tui-chip-border
7
+ --tui-chip-icon
8
+ --tui-chip-radius
9
+ --tui-chip-selected-ring
10
+ --tui-chip-icon-slot-bg
11
+ --tui-chip-icon-slot-fg
12
+ */
13
+
14
+ @mixin styles() {
15
+ // ==========================================================================
16
+ // Chip Component
17
+ // ==========================================================================
18
+ //
19
+ // Component API tokens (never defined here, only read via fallback):
20
+ // --tui-chip-bg Background color
21
+ // --tui-chip-fg Foreground/text color
22
+ // --tui-chip-border Border color
23
+ // --tui-chip-icon Icon color (optional, defaults to inherit)
24
+ // --tui-chip-radius Border radius
25
+ // --tui-chip-selected-ring Selected/pressed inset ring width (default: 1px)
26
+ // --tui-chip-icon-slot-bg Icon-slot panel background (used when leftIcon
27
+ // is wrapped in `.tui-chip__icon-slot`)
28
+ // --tui-chip-icon-slot-fg Icon-slot panel foreground / icon color
29
+ //
30
+ // To override from consuming code:
31
+ // .my-context .tui-chip { --tui-chip-bg: hotpink; }
32
+ //
33
+ // ---------------------------------------------------------------------------
34
+ // Design Decisions
35
+ // ---------------------------------------------------------------------------
36
+ //
37
+ // !important usage:
38
+ // font-weight, background-color, color, and border use !important to defeat
39
+ // WordPress core styles that target generic elements. Same rationale as
40
+ // Button — wp-admin specificity wars require it.
41
+ //
42
+ // Intentional omissions:
43
+ // - No `is-theme-info`: info semantics are covered by `secondary` theme in
44
+ // this system. Adding info would create a near-duplicate.
45
+ //
46
+ // `is-size-lg` is opt-in for chip-shaped readouts that need to sit alongside
47
+ // lg-height controls (Button lg, control-height-lg primitive). Default chips
48
+ // remain compact. See Chip.tsx for guidance.
49
+ //
50
+ // ==========================================================================
51
+
52
+ // Structural constants (em-based scaling, not tokenised)
53
+ $_spacing-inline: 0.75em;
54
+ $_spacing-block: 0.375em;
55
+ $_spacing-within: 0.25em;
56
+
57
+ :where(.#{sys.$prefix}interface) .#{sys.$prefix}chip {
58
+ // Internal tokens — read component API with fallback to primitives
59
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-subtle));
60
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-secondary-strongest));
61
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-subtle));
62
+ --_icon: var(--#{sys.$prefix}chip-icon, inherit);
63
+ --_radius: var(--#{sys.$prefix}chip-radius, var(--#{sys.$prefix}radius-sm));
64
+
65
+ display: inline-flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ font-weight: normal !important;
69
+ gap: $_spacing-within;
70
+ padding-inline: $_spacing-inline;
71
+ padding-block: $_spacing-block;
72
+ background-color: var(--_bg) !important;
73
+ color: var(--_fg) !important;
74
+ border: var(--#{sys.$prefix}border-width) solid var(--_border) !important;
75
+ border-radius: var(--_radius);
76
+ text-decoration: none;
77
+ line-height: 1.25;
78
+ white-space: nowrap;
79
+ transition-duration: var(--#{sys.$prefix}motion-duration);
80
+ transition-timing-function: var(--#{sys.$prefix}motion-timing);
81
+ transition-property: border-color, color, background-color, filter;
82
+
83
+ .#{sys.$prefix}icon {
84
+ color: var(--_icon);
85
+ }
86
+
87
+ &:where([aria-disabled="true"], [disabled]) {
88
+ opacity: var(--#{sys.$prefix}opacity-disabled);
89
+ pointer-events: none;
90
+ }
91
+
92
+ // -------------------------------------------------------------------------
93
+ // Sizes
94
+ // -------------------------------------------------------------------------
95
+ &.is-size-xs {
96
+ font-size: var(--#{sys.$prefix}typography-size-xs);
97
+ padding-inline: 0.5em;
98
+ }
99
+
100
+ &.is-size-sm {
101
+ font-size: var(--#{sys.$prefix}typography-size-sm);
102
+ }
103
+
104
+ &.is-size-md {
105
+ font-size: var(--#{sys.$prefix}typography-size-md);
106
+ }
107
+
108
+ &.is-size-lg {
109
+ font-size: var(--#{sys.$prefix}typography-size-md);
110
+ // Fallback to 3rem (48px @ 16px root) since --tui-control-height-lg is
111
+ // an opt-in override token, not a default primitive emission.
112
+ min-height: var(--#{sys.$prefix}control-height-lg, 3rem);
113
+ }
114
+
115
+ // -------------------------------------------------------------------------
116
+ // Icon slot — opt-in panel treatment for leftIcon
117
+ // -------------------------------------------------------------------------
118
+ // Wrap a chip's leftIcon in a span with class `tui-chip__icon-slot` to give
119
+ // it its own background fill, a vertical separator from the text, and pull
120
+ // it flush to the chip's left edge. Used for utility chips (timers, meters)
121
+ // where the icon reads as a discrete affordance, not just decoration.
122
+
123
+ .#{sys.$prefix}chip__icon-slot {
124
+ align-self: stretch;
125
+ display: inline-flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+ // Pull flush through the chip's own padding.
129
+ margin-inline-start: calc(-1 * #{$_spacing-inline});
130
+ margin-block: calc(-1 * #{$_spacing-block});
131
+ margin-inline-end: calc(#{$_spacing-inline} - #{$_spacing-within});
132
+ padding-inline: 0.4em;
133
+ // Defaults: surface (white in light mode) panel with a darker icon —
134
+ // a subtle "lighter than the chip body" treatment that reads well on
135
+ // the secondary-subtle default chip background.
136
+ background-color: var(--#{sys.$prefix}chip-icon-slot-bg, var(--#{sys.$prefix}color-bg-surface));
137
+ color: var(--#{sys.$prefix}chip-icon-slot-fg, var(--#{sys.$prefix}color-fg));
138
+ border-inline-end: var(--#{sys.$prefix}border-width) solid var(--_border);
139
+ border-start-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
140
+ border-end-start-radius: calc(var(--_radius) - var(--#{sys.$prefix}border-width));
141
+ }
142
+
143
+
144
+ // -------------------------------------------------------------------------
145
+ // Interactive behavior
146
+ // -------------------------------------------------------------------------
147
+ &.is-interactive,
148
+ &:is(a, button, [role="button"]),
149
+ &:has(input[type="checkbox"], input[type="radio"]) {
150
+ cursor: pointer;
151
+
152
+ // No hover on touch-only
153
+ @media (hover: hover) {
154
+ &:not(:disabled):not([aria-disabled="true"]):hover {
155
+ filter: brightness(0.95);
156
+ }
157
+ }
158
+
159
+ &:not(:disabled):not([aria-disabled="true"]):focus-visible {
160
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
161
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
162
+ }
163
+
164
+ // "Pressed/selected" parity
165
+ // Ring width is intentionally thin (1px) to match border weight.
166
+ // Override via --tui-chip-selected-ring if needed.
167
+ &:is(:active, [aria-pressed="true"], .is-selected),
168
+ &:has(input:checked) {
169
+ box-shadow: 0 0 0 var(--#{sys.$prefix}chip-selected-ring, 1px) var(--_fg) inset;
170
+ filter: brightness(0.95);
171
+ }
172
+
173
+ &:is(a) {
174
+ text-decoration: none;
175
+
176
+ &:visited {
177
+ color: var(--_fg);
178
+ }
179
+ }
180
+ }
181
+
182
+ // -------------------------------------------------------------------------
183
+ // Themes (default style - light background)
184
+ // -------------------------------------------------------------------------
185
+ &.is-theme-primary {
186
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-primary-subtlest));
187
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-primary-stronger));
188
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-primary-subtlest));
189
+ }
190
+
191
+ &.is-theme-secondary {
192
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-subtle));
193
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-secondary-stronger));
194
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-subtle));
195
+ --_icon: var(--#{sys.$prefix}chip-icon, var(--#{sys.$prefix}theme-secondary-base));
196
+ }
197
+
198
+ &.is-theme-success {
199
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-success-subtlest));
200
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-success-stronger));
201
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-success-subtlest));
202
+ --_icon: var(--#{sys.$prefix}chip-icon, var(--#{sys.$prefix}theme-success-base));
203
+ }
204
+
205
+ &.is-theme-warning {
206
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-warning-subtlest));
207
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-warning-stronger));
208
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-warning-subtlest));
209
+ --_icon: var(--#{sys.$prefix}chip-icon, var(--#{sys.$prefix}theme-warning-base));
210
+ }
211
+
212
+ &.is-theme-danger {
213
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-danger-subtlest));
214
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-danger-stronger));
215
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-danger-subtlest));
216
+ --_icon: var(--#{sys.$prefix}chip-icon, var(--#{sys.$prefix}theme-danger-base));
217
+ }
218
+
219
+ // -------------------------------------------------------------------------
220
+ // Style: Ghost
221
+ // -------------------------------------------------------------------------
222
+ &.is-style-ghost {
223
+ // Default: transparent background and border
224
+ --_bg: transparent;
225
+ --_border: transparent;
226
+
227
+ // Restore background on hover/focus for interactive chips
228
+ &.is-interactive,
229
+ &:is(a, button, [role="button"]),
230
+ &:has(input[type="checkbox"], input[type="radio"]) {
231
+ @media (hover: hover) {
232
+ &:hover {
233
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-subtle));
234
+ }
235
+ }
236
+
237
+ &:focus {
238
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-subtle));
239
+ }
240
+ }
241
+
242
+ // Restore border on active/selected states
243
+ &:is(:focus-visible, :active, [aria-pressed="true"], .is-selected),
244
+ &:has(input:checked) {
245
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-subtle));
246
+ }
247
+ }
248
+
249
+ // -------------------------------------------------------------------------
250
+ // Style: Outline
251
+ // -------------------------------------------------------------------------
252
+ &.is-style-outline {
253
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
254
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-secondary-base));
255
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-base));
256
+ }
257
+
258
+ &.is-style-outline.is-theme-primary {
259
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
260
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-primary-base));
261
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-primary-base));
262
+ }
263
+
264
+ &.is-style-outline.is-theme-secondary {
265
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
266
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-secondary-strong));
267
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-strong));
268
+ }
269
+
270
+ &.is-style-outline.is-theme-success {
271
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
272
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-success-strong));
273
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-success-strong));
274
+ }
275
+
276
+ &.is-style-outline.is-theme-warning {
277
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
278
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-warning-base));
279
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-warning-base));
280
+ }
281
+
282
+ &.is-style-outline.is-theme-danger {
283
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}color-bg-surface));
284
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}theme-danger-base));
285
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-danger-base));
286
+ }
287
+
288
+ // Outline selected: fill with border color
289
+ &.is-selected.is-style-outline {
290
+ --_bg: var(--_border);
291
+ --_fg: var(--#{sys.$prefix}color-fg-on-accent);
292
+ }
293
+
294
+ // -------------------------------------------------------------------------
295
+ // Style: Solid
296
+ // -------------------------------------------------------------------------
297
+ &.is-style-solid {
298
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-base));
299
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
300
+ --_icon: var(--#{sys.$prefix}chip-icon, var(--#{sys.$prefix}color-fg-on-accent));
301
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-base));
302
+
303
+ &.is-interactive,
304
+ &:is(a, button, [role="button"]),
305
+ &:has(input[type="checkbox"], input[type="radio"]) {
306
+ @media (hover: hover) {
307
+ &:not(:disabled):not([aria-disabled="true"]):hover {
308
+ --_bg: var(--#{sys.$prefix}theme-secondary-strong);
309
+ --_border: var(--#{sys.$prefix}theme-secondary-strong);
310
+ }
311
+ }
312
+
313
+ &:is(:active, [aria-pressed="true"], .is-selected),
314
+ &:has(input:checked) {
315
+ --_bg: var(--#{sys.$prefix}theme-secondary-stronger);
316
+ --_border: var(--#{sys.$prefix}theme-secondary-stronger);
317
+ }
318
+ }
319
+ }
320
+
321
+ &.is-style-solid.is-theme-primary {
322
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-primary-base));
323
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
324
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-primary-base));
325
+
326
+ &.is-interactive,
327
+ &:is(a, button, [role="button"]),
328
+ &:has(input[type="checkbox"], input[type="radio"]) {
329
+ @media (hover: hover) {
330
+ &:not(:disabled):not([aria-disabled="true"]):hover {
331
+ --_bg: var(--#{sys.$prefix}theme-primary-strong);
332
+ --_border: var(--#{sys.$prefix}theme-primary-strong);
333
+ }
334
+ }
335
+
336
+ &:is(:active, [aria-pressed="true"], .is-selected),
337
+ &:has(input:checked) {
338
+ --_bg: var(--#{sys.$prefix}theme-primary-stronger);
339
+ --_border: var(--#{sys.$prefix}theme-primary-stronger);
340
+ }
341
+ }
342
+ }
343
+
344
+ &.is-style-solid.is-theme-secondary {
345
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-secondary-base));
346
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
347
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-secondary-base));
348
+
349
+ &.is-interactive,
350
+ &:is(a, button, [role="button"]),
351
+ &:has(input[type="checkbox"], input[type="radio"]) {
352
+ @media (hover: hover) {
353
+ &:not(:disabled):not([aria-disabled="true"]):hover {
354
+ --_bg: var(--#{sys.$prefix}theme-secondary-strong);
355
+ --_border: var(--#{sys.$prefix}theme-secondary-strong);
356
+ }
357
+ }
358
+
359
+ &:is(:active, [aria-pressed="true"], .is-selected),
360
+ &:has(input:checked) {
361
+ --_bg: var(--#{sys.$prefix}theme-secondary-stronger);
362
+ --_border: var(--#{sys.$prefix}theme-secondary-stronger);
363
+ }
364
+ }
365
+ }
366
+
367
+ &.is-style-solid.is-theme-success {
368
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-success-base));
369
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
370
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-success-base));
371
+
372
+ &.is-interactive,
373
+ &:is(a, button, [role="button"]),
374
+ &:has(input[type="checkbox"], input[type="radio"]) {
375
+ @media (hover: hover) {
376
+ &:not(:disabled):not([aria-disabled="true"]):hover {
377
+ --_bg: var(--#{sys.$prefix}theme-success-strong);
378
+ --_border: var(--#{sys.$prefix}theme-success-strong);
379
+ }
380
+ }
381
+
382
+ &:is(:active, [aria-pressed="true"], .is-selected),
383
+ &:has(input:checked) {
384
+ --_bg: var(--#{sys.$prefix}theme-success-stronger);
385
+ --_border: var(--#{sys.$prefix}theme-success-stronger);
386
+ }
387
+ }
388
+ }
389
+
390
+ &.is-style-solid.is-theme-warning {
391
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-warning-base));
392
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
393
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-warning-base));
394
+
395
+ &.is-interactive,
396
+ &:is(a, button, [role="button"]),
397
+ &:has(input[type="checkbox"], input[type="radio"]) {
398
+ @media (hover: hover) {
399
+ &:not(:disabled):not([aria-disabled="true"]):hover {
400
+ --_bg: var(--#{sys.$prefix}theme-warning-strong);
401
+ --_border: var(--#{sys.$prefix}theme-warning-strong);
402
+ }
403
+ }
404
+
405
+ &:is(:active, [aria-pressed="true"], .is-selected),
406
+ &:has(input:checked) {
407
+ --_bg: var(--#{sys.$prefix}theme-warning-stronger);
408
+ --_border: var(--#{sys.$prefix}theme-warning-stronger);
409
+ }
410
+ }
411
+ }
412
+
413
+ &.is-style-solid.is-theme-danger {
414
+ --_bg: var(--#{sys.$prefix}chip-bg, var(--#{sys.$prefix}theme-danger-base));
415
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg-on-accent));
416
+ --_border: var(--#{sys.$prefix}chip-border, var(--#{sys.$prefix}theme-danger-base));
417
+
418
+ &.is-interactive,
419
+ &:is(a, button, [role="button"]),
420
+ &:has(input[type="checkbox"], input[type="radio"]) {
421
+ @media (hover: hover) {
422
+ &:not(:disabled):not([aria-disabled="true"]):hover {
423
+ --_bg: var(--#{sys.$prefix}theme-danger-strong);
424
+ --_border: var(--#{sys.$prefix}theme-danger-strong);
425
+ }
426
+ }
427
+
428
+ &:is(:active, [aria-pressed="true"], .is-selected),
429
+ &:has(input:checked) {
430
+ --_bg: var(--#{sys.$prefix}theme-danger-stronger);
431
+ --_border: var(--#{sys.$prefix}theme-danger-stronger);
432
+ }
433
+ }
434
+ }
435
+
436
+ // -------------------------------------------------------------------------
437
+ // Style: Flush (inline text-like)
438
+ // -------------------------------------------------------------------------
439
+ &.is-style-flush {
440
+ --_bg: transparent;
441
+ --_fg: var(--#{sys.$prefix}chip-fg, var(--#{sys.$prefix}color-fg));
442
+ --_border: transparent;
443
+
444
+ padding-inline: 0 !important;
445
+ padding-block: 0 !important;
446
+ border: 0 !important;
447
+ background: transparent !important;
448
+ filter: none !important;
449
+
450
+ &:hover,
451
+ &:active {
452
+ filter: none !important;
453
+ }
454
+
455
+ &.is-interactive,
456
+ &:is(a, button, [role="button"]) {
457
+ text-decoration: none;
458
+
459
+ @media (hover: hover) {
460
+ &:hover {
461
+ text-decoration: underline;
462
+ }
463
+ }
464
+
465
+ &:focus-visible {
466
+ outline: var(--#{sys.$prefix}focus-ring-width) solid var(--#{sys.$prefix}focus-ring-color);
467
+ outline-offset: var(--#{sys.$prefix}focus-ring-offset);
468
+ }
469
+ }
470
+ }
471
+ }
472
+ }