@lushly-dev/violet-elements 0.2.0-preview.3 → 0.2.0-preview.5

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 (79) hide show
  1. package/README.md +8 -6
  2. package/custom-elements.json +54 -3
  3. package/dist/alert/violet-alert.js +2 -1
  4. package/dist/alert/violet-alert.js.map +1 -1
  5. package/dist/badge/violet-badge.js +3 -1
  6. package/dist/badge/violet-badge.js.map +1 -1
  7. package/dist/color-picker/violet-color-picker.js +11 -6
  8. package/dist/color-picker/violet-color-picker.js.map +1 -1
  9. package/dist/combobox/violet-combobox.js +9 -5
  10. package/dist/combobox/violet-combobox.js.map +1 -1
  11. package/dist/conversation/violet-approval-card.js +4 -4
  12. package/dist/conversation/violet-approval-card.js.map +1 -1
  13. package/dist/conversation/violet-chat-composer.js +2 -2
  14. package/dist/conversation/violet-chat-composer.js.map +1 -1
  15. package/dist/conversation/violet-chat-suggestions.js +5 -5
  16. package/dist/conversation/violet-chat-suggestions.js.map +1 -1
  17. package/dist/conversation/violet-conversation-thread.js +1 -1
  18. package/dist/conversation/violet-conversation-thread.js.map +1 -1
  19. package/dist/conversation/violet-message-media.js +4 -4
  20. package/dist/conversation/violet-message-media.js.map +1 -1
  21. package/dist/conversation/violet-message-status.js +6 -6
  22. package/dist/conversation/violet-message-status.js.map +1 -1
  23. package/dist/conversation/violet-message.js +5 -5
  24. package/dist/conversation/violet-message.js.map +1 -1
  25. package/dist/conversation/violet-reasoning-block.js +4 -4
  26. package/dist/conversation/violet-reasoning-block.js.map +1 -1
  27. package/dist/conversation/violet-source-citation.js +7 -7
  28. package/dist/conversation/violet-source-citation.js.map +1 -1
  29. package/dist/conversation/violet-tool-call-card.js +14 -14
  30. package/dist/conversation/violet-tool-call-card.js.map +1 -1
  31. package/dist/conversation/violet-tool-result-card.js +6 -6
  32. package/dist/conversation/violet-tool-result-card.js.map +1 -1
  33. package/dist/data-grid/violet-data-grid-multi-picker.js +9 -5
  34. package/dist/data-grid/violet-data-grid-multi-picker.js.map +1 -1
  35. package/dist/data-grid/violet-data-grid-persona-picker.js +9 -5
  36. package/dist/data-grid/violet-data-grid-persona-picker.js.map +1 -1
  37. package/dist/data-grid/violet-data-grid-pill-select.js +9 -5
  38. package/dist/data-grid/violet-data-grid-pill-select.js.map +1 -1
  39. package/dist/data-grid/violet-data-grid-reference-picker.js +9 -5
  40. package/dist/data-grid/violet-data-grid-reference-picker.js.map +1 -1
  41. package/dist/data-grid/violet-data-grid.styles.js +4 -1
  42. package/dist/data-grid/violet-data-grid.styles.js.map +1 -1
  43. package/dist/file-upload/violet-file-upload.d.ts +1 -0
  44. package/dist/file-upload/violet-file-upload.js +13 -10
  45. package/dist/file-upload/violet-file-upload.js.map +1 -1
  46. package/dist/icon/icon-registry.js +19 -0
  47. package/dist/icon/icon-registry.js.map +1 -1
  48. package/dist/listbox/violet-listbox.js +2 -5
  49. package/dist/listbox/violet-listbox.js.map +1 -1
  50. package/dist/option/violet-option.d.ts +3 -1
  51. package/dist/option/violet-option.js +22 -7
  52. package/dist/option/violet-option.js.map +1 -1
  53. package/dist/progress/violet-progress.js +15 -1
  54. package/dist/progress/violet-progress.js.map +1 -1
  55. package/dist/select/violet-select.js +10 -5
  56. package/dist/select/violet-select.js.map +1 -1
  57. package/dist/skeleton/violet-skeleton.js +3 -1
  58. package/dist/skeleton/violet-skeleton.js.map +1 -1
  59. package/dist/tab/violet-tab.js +3 -3
  60. package/dist/tab/violet-tab.js.map +1 -1
  61. package/dist/tab-panel/violet-tab-panel.js +14 -2
  62. package/dist/tab-panel/violet-tab-panel.js.map +1 -1
  63. package/dist/tabs/violet-tabs.d.ts +5 -0
  64. package/dist/tabs/violet-tabs.js +13 -5
  65. package/dist/tabs/violet-tabs.js.map +1 -1
  66. package/dist/teaching-tip/violet-teaching-tip.js +1 -1
  67. package/dist/teaching-tip/violet-teaching-tip.js.map +1 -1
  68. package/dist/text-area/violet-text-area.js +5 -0
  69. package/dist/text-area/violet-text-area.js.map +1 -1
  70. package/dist/text-field/violet-text-field.js +5 -0
  71. package/dist/text-field/violet-text-field.js.map +1 -1
  72. package/dist/theme/generated/violet-theme.generated.d.ts +15 -15
  73. package/dist/theme/generated/violet-theme.generated.js +15 -15
  74. package/dist/theme/generated/violet-theme.generated.js.map +1 -1
  75. package/dist/theme/violet-theme-runtime.js +28 -5
  76. package/dist/theme/violet-theme-runtime.js.map +1 -1
  77. package/package.json +6 -6
  78. package/tokens/raw-palette.proposal.jsonc +84 -81
  79. package/tokens/violet-theme.export.json +15 -15
package/README.md CHANGED
@@ -55,12 +55,14 @@ import "@lushly-dev/violet-elements";
55
55
  - `@lushly-dev/violet-elements/theme-css` is the Node-safe theme-set helpers (`findVioletThemeSetGaps` and the types), side-effect free; see [Runtime Theme](#runtime-theme).
56
56
  - Element modules register themselves when imported, so the package declares `sideEffects: true`.
57
57
 
58
- ## Storybook Review
58
+ ## Story Review
59
59
 
60
- Reusable components in this package should be reviewed in the root Storybook 10
61
- workspace before they are treated as reference-grade.
60
+ Reusable components in this package should be reviewed through their stories
61
+ before they are treated as reference-grade. The stories run on Specimen
62
+ (`@lushly-dev/specimen`), which replaced Storybook here.
62
63
 
63
- - Run `pnpm storybook` from the repo root.
64
+ - Run `pnpm test:stories` from the repo root: it typechecks the stories, runs
65
+ each one with its accessibility check and builds the review page.
64
66
  - New components should include co-located `*.stories.ts` files.
65
67
  - Stories are required as part of component creation, not a follow-up task.
66
68
 
@@ -224,8 +226,8 @@ applyVioletThemeRoot(panel, "dark");
224
226
  </violet-theme>
225
227
  ```
226
228
 
227
- Inside this repository (for example the root Storybook), the same functions are
228
- imported from `packages/violet-elements/src/theme`.
229
+ Inside this repository (for example Specimen's preview, `specimen/preview.ts`),
230
+ the same functions are imported from `packages/violet-elements/src/theme`.
229
231
 
230
232
  ## Gantt foundation
231
233
 
@@ -15613,7 +15613,7 @@
15613
15613
  {
15614
15614
  "kind": "variable",
15615
15615
  "name": "styles",
15616
- "default": "css` :host { display: block; container-type: inline-size; color: var(--color-text-primary, #181b1a); font-family: var(--violet-data-grid-font-family, var(--font-family-body, \"Inter\", system-ui, sans-serif)); --_surface-page: var(--color-surface-page, #f4f0ea); --_surface-card: var(--color-surface-card, #f8f9f3); --_surface-subtle: var(--color-surface-subtle, #e9e5de); --_surface-selected: var(--color-surface-selected, #dfeae3); --_control-selected-background: var(--color-control-selected-background, #badecf); --_control-selected-foreground: var(--color-control-selected-foreground, #2c5e4b); --_control-selected-border: var(--color-control-selected-border, rgba(44, 94, 75, 0.5)); --_surface-floating: var(--color-surface-floating, #ffffff); --_text-primary: var(--color-text-primary, #181b1a); --_text-secondary: var(--color-text-secondary, #48534b); --_text-muted: var(--color-text-muted, #5e6460); --_border-subtle: var(--color-border-subtle, rgba(24, 27, 26, 0.10)); --_border-strong: var(--color-border-strong, #6b7d6e); --_focus-ring: var(--color-focus-ring, #146ba0); --_error-background: var(--color-state-danger-background, #f7e4df); --_error-border: var(--color-state-danger-border, transparent); --_error-text: var(--color-state-danger-text, #c42a1a); --_active-cell-ring: var(--violet-data-grid-active-cell-ring, color-mix(in srgb, var(--_focus-ring) 82%, transparent)); --_active-cell-ring-width: var(--violet-data-grid-active-cell-ring-width, var(--size-focus-ring-width, 2px)); --_space-inline-sm: var(--space-inline-sm, 4px); --_space-inline-md: var(--space-inline-md, 8px); --_space-stack-xs: var(--space-stack-xs, 4px); --_space-stack-sm: var(--space-stack-sm, 8px); --_radius-md: var(--radius-md, 8px); --_shadow-card: var(--shadow-card, 0 0 0 1px rgba(24, 27, 26, 0.06), 0 1px 2px rgba(24, 27, 26, 0.06), 0 4px 10px -2px rgba(24, 27, 26, 0.06)); /* Stacking layers. Declared here rather than inherited: an undefined custom property makes the z-index declaration invalid at computed-value time, so it is dropped and the element falls back to z-index auto — a sticky header then scrolls behind the rows instead of above them. Values match violet-token-defaults. */ --_layer-raised: var(--z-index-raised, 1); --_layer-sticky: var(--z-index-sticky, 10); --_focus-outline-offset: 2px; --_type-meta-size: 0.875rem; --_type-cell-size: 0.9375rem; --_target-size-compact: var(--size-target-compact, 24px); --_target-size-natural: var(--size-target-natural, 32px); --_target-size-comfortable: var(--size-target-comfortable, 44px); --_row-target-size: var(--_target-size-natural); --_column-resizer-target-size: var(--_target-size-compact); --_filter-max-inline: min(24rem, 100%); --_toolbar-primary-column: 20rem; --_selection-column-size: 3.25rem; --_selection-control-size: 1rem; --_loading-min-block-size: 10rem; --_overlay-blur: 4px; --_visually-hidden-size: 1px; --_row-padding-inline: var(--violet-data-grid-row-padding-inline, 0.875rem); --_virtualized-max-block-size: var(--violet-data-grid-virtualized-max-block-size, 32rem); } :host([density=\"compact\"]) { --_row-target-size: var(--_target-size-compact); --_row-padding-inline: var(--violet-data-grid-row-padding-inline-compact, 0.875rem); } :host([density=\"comfortable\"]) { --_row-target-size: var(--_target-size-comfortable); --_row-padding-inline: var(--violet-data-grid-row-padding-inline-comfortable, 1rem); } :host(:focus-visible) { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); } :host([busy]) .table-scroll { cursor: progress; } .grid-shell { display: grid; gap: var(--_space-stack-sm); min-inline-size: 0; min-block-size: 0; block-size: 100%; } .toolbar { display: grid; gap: var(--_space-inline-sm); align-items: start; } .fill-actions { display: flex; flex-wrap: wrap; gap: var(--_space-inline-sm); } .fill-status { align-self: center; color: var(--_text-secondary); font-size: var(--_type-meta-size); } .fill-action { min-inline-size: 24px; min-block-size: 32px; padding: var(--_space-stack-xs) var(--_space-inline-md); border: 1px solid var(--_border-strong); border-radius: var(--_radius-md); background: var(--_surface-card); color: var(--_text-primary); font: inherit; font-size: var(--_type-meta-size); cursor: pointer; } .fill-action:disabled { color: var(--_text-muted); cursor: default; } .fill-action:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); } .toolbar-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--_space-inline-sm); color: var(--_text-secondary); font-size: var(--_type-meta-size); } .toolbar-slot { display: flex; flex-wrap: wrap; gap: var(--_space-inline-sm); } .filter-shell { display: grid; max-inline-size: var(--_filter-max-inline); } .filter-field { inline-size: 100%; } .table-region { position: relative; min-inline-size: 0; min-block-size: 0; } .edit-status { position: absolute; z-index: var(--_layer-sticky); inset-block-start: var(--_space-stack-xs); inset-inline-end: var(--_space-inline-sm); max-inline-size: min(24rem, calc(100% - (var(--_space-inline-sm) * 2))); padding: var(--_space-stack-xs) var(--_space-inline-sm); border: 1px solid var(--_error-border); border-radius: calc(var(--_radius-md) / 2); background: var(--_error-background); color: var(--_error-text); box-shadow: var(--_shadow-card); font-size: 0.8125rem; line-height: 1.35; pointer-events: none; } .edit-status:empty { display: none; } .table-scroll { box-sizing: border-box; max-inline-size: 100%; min-inline-size: 0; overflow: auto; border: 1px solid var(--_border-subtle); border-radius: calc(var(--_radius-md) - 2px); background: var(--_surface-card); scrollbar-color: color-mix(in srgb, var(--_border-strong) 65%, transparent) transparent; outline: none; } .table-scroll:focus-visible { box-shadow: 0 0 0 2px var(--_focus-ring); } :host([virtualize]) .table-scroll { block-size: 100%; max-block-size: var(--_virtualized-max-block-size); overflow-anchor: none; } .table-canvas { min-inline-size: 100%; overflow: visible; } :host([virtualize]) .table-canvas { min-block-size: calc(var(--_virtual-total-size, 0px) + var(--_row-target-size)); } .table-scroll::-webkit-scrollbar { inline-size: 0.625rem; block-size: 0.625rem; } .table-scroll::-webkit-scrollbar-track { background: transparent; } .table-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--_border-strong) 72%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; } .table-scroll::-webkit-scrollbar-corner { background: transparent; } .table-full-table { min-inline-size: 100%; inline-size: max-content; border-collapse: separate; border-spacing: 0; table-layout: fixed; } thead { background: var(--_surface-subtle); } :host([sticky-header]) .table-full-table thead th { position: sticky; inset-block-start: 0; z-index: var(--_layer-raised); background: var(--_surface-subtle); } th, td { box-sizing: border-box; block-size: var(--_row-target-size); border-block-end: 1px solid var(--_border-subtle); padding-inline: var(--_row-padding-inline); padding-block: 0; text-align: start; vertical-align: middle; } tbody tr:last-of-type td { border-block-end: none; } .virtual-spacer-row, .virtual-spacer-row td { padding: 0; border: 0; background: transparent; overflow-anchor: none; } .virtual-spacer-row td { min-block-size: 0; } th { color: var(--_text-secondary); font-size: var(--_type-meta-size); font-weight: 600; position: relative; } th[data-column-id] { padding-inline-end: var(--_column-resizer-target-size); } th:not(:last-child), td:not(:last-child) { border-inline-end: 1px solid var(--_border-subtle); } .header-button { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--_space-inline-sm); inline-size: 100%; block-size: 100%; padding: 0; padding-inline-end: calc(var(--_space-inline-sm) + 0.5rem); border: none; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; } .header-button:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); border-radius: calc(var(--_radius-md) / 2); } th[tabindex]:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: -2px; } .header-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sort-indicator { display: inline-flex; align-items: center; justify-content: center; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); color: var(--_text-muted); flex: 0 0 auto; transition: opacity 120ms ease, color 120ms ease; } .sort-indicator[data-sorted=\"false\"] { opacity: 0; color: color-mix(in srgb, var(--_text-muted) 72%, var(--_surface-card)); } th:hover .sort-indicator[data-sorted=\"false\"], .header-button:hover .sort-indicator[data-sorted=\"false\"], .header-button:focus-visible .sort-indicator[data-sorted=\"false\"] { opacity: 1; } .column-resizer { position: absolute; inset-block: 0; inset-inline-end: 0; box-sizing: border-box; inline-size: var(--_column-resizer-target-size); padding: 0; border: none; background: transparent; cursor: col-resize; touch-action: none; z-index: var(--_layer-sticky); } .column-resizer::before { content: \"\"; position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 1px; background: color-mix(in srgb, var(--_border-strong) 58%, transparent); opacity: 0; transition: opacity 120ms ease; } th:hover .column-resizer::before, .column-resizer:focus-visible::before { opacity: 1; } .column-resizer:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: 1px; border-radius: 999px; } td { background: var(--_surface-page); color: var(--_text-primary); font-size: var(--_type-cell-size); position: relative; user-select: text; -webkit-user-select: text; } :host([focus-mode=\"cell\"]) td { user-select: none; -webkit-user-select: none; } td[data-selected=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 48%, var(--_surface-page)); } td[data-fill-preview=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 62%, var(--_surface-page)); } td[data-active=\"true\"]::after { content: \"\"; position: absolute; inset: calc(-1 * var(--_active-cell-ring-width)); pointer-events: none; z-index: var(--_layer-raised); border: var(--_active-cell-ring-width) solid var(--_active-cell-ring); box-sizing: border-box; } td[data-active=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 70%, var(--_surface-page)); } /* Keep the 24px target inside the corner cell, including at scroll edges. */ .fill-handle { position: absolute; inset-inline-end: 0; inset-block-end: 0; inline-size: 24px; block-size: 24px; touch-action: none; cursor: crosshair; z-index: var(--_layer-sticky); } .fill-handle::after { content: \"\"; position: absolute; inset-inline-end: -3px; inset-block-end: -3px; inline-size: 6px; block-size: 6px; border: 1px solid var(--_active-cell-ring); border-radius: 2px; background: var(--_surface-card); pointer-events: none; box-shadow: 0 0 0 1px var(--_surface-card); } .cell-content { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cell-widget { display: inline-grid; align-items: center; justify-items: start; inline-size: 100%; min-inline-size: 0; } .cell-sizing-content { display: block; visibility: hidden; pointer-events: none; } .cell-widget[data-align=\"center\"] { justify-items: center; } .cell-checkbox { display: inline-grid; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; --violet-checkbox-inline-target-size: var(--_selection-control-size); } .cell-radio { display: inline-grid; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; --violet-radio-inline-target-size: var(--_selection-control-size); --violet-radio-inline-gap: 0; } .cell-editor { position: absolute; inset-inline-start: var(--_row-padding-inline); inset-inline-end: var(--_row-padding-inline); inset-block-start: 50%; transform: translateY(-50%); display: block; box-sizing: border-box; inline-size: auto; min-inline-size: 0; max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); padding: 0; border: none; background: transparent; color: var(--_text-primary); font: inherit; line-height: inherit; text-align: inherit; outline: none; appearance: none; } violet-data-grid-pill-select.cell-editor { inset-inline-start: var(--_row-padding-inline); inset-inline-end: auto; inset-block-start: 50%; transform: translateY(-50%); display: inline-grid; inline-size: fit-content; max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); justify-self: start; z-index: var(--_layer-raised); } input.cell-editor[type=\"number\"] { appearance: textfield; -moz-appearance: textfield; } input.cell-editor[type=\"number\"]::-webkit-outer-spin-button, input.cell-editor[type=\"number\"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; } .cell-editor:focus { outline: none; } .cell-editor-hint { position: absolute; /* Above the fill handle, which shares the sticky layer. */ z-index: calc(var(--_layer-sticky) + 1); inset-inline-start: var(--_row-padding-inline); inset-block-start: calc(100% - var(--_space-stack-xs)); /* A sentence rather than a word: wider than the edit error, still bounded. */ inline-size: max-content; max-inline-size: 18rem; padding: 2px var(--_space-stack-xs); border: 1px solid var(--_border-strong); border-radius: calc(var(--_radius-md) / 2); background: var(--_surface-floating); color: var(--_text-primary); box-shadow: var(--_shadow-card); font-size: 0.75rem; line-height: 1.25; white-space: normal; } .cell-editor-error { position: absolute; z-index: var(--_layer-sticky); inset-inline-start: var(--_row-padding-inline); inset-block-start: calc(100% - var(--_space-stack-xs)); max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); padding: 2px var(--_space-stack-xs); border: 1px solid var(--_error-border); border-radius: calc(var(--_radius-md) / 2); background: var(--_error-background); color: var(--_error-text); box-shadow: var(--_shadow-card); font-size: 0.75rem; line-height: 1.25; white-space: normal; } .selection-cell, .selection-header { inline-size: var(--_selection-column-size); padding-inline: 0; line-height: 0; text-align: center; } .selection-control { inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); accent-color: var(--_control-selected-foreground); user-select: auto; -webkit-user-select: auto; } .selection-checkbox { display: block; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; justify-self: center; --violet-checkbox-inline-target-size: var(--_selection-control-size); user-select: auto; -webkit-user-select: auto; } .selection-radio { display: block; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; justify-self: center; --violet-radio-inline-target-size: var(--_selection-control-size); --violet-radio-inline-gap: 0; user-select: auto; -webkit-user-select: auto; } tbody tr[data-selected=\"true\"] { background: var(--_surface-selected); } tbody tr[data-selected=\"true\"] td { color: var(--_text-primary); } .loading-state, .empty-state { display: grid; place-items: center; gap: var(--_space-stack-xs); min-block-size: var(--_loading-min-block-size); padding: calc(var(--_row-padding-inline) * 1.5); text-align: center; color: var(--_text-secondary); background: var(--_surface-card); } .loading-overlay { position: absolute; inset: 1px; display: grid; place-items: center; padding: var(--_space-inline-md); border-radius: calc(var(--_radius-md) - 2px); background: var(--violet-data-grid-loading-overlay-background, rgba(250, 249, 245, 0.58)); color: var(--_text-secondary); backdrop-filter: blur(calc(var(--_overlay-blur) * 1.75)); -webkit-backdrop-filter: blur(calc(var(--_overlay-blur) * 1.75)); } .default-slot { display: contents; } .visually-hidden { position: absolute; inline-size: var(--_visually-hidden-size); block-size: var(--_visually-hidden-size); padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } th[data-align=\"center\"], td[data-align=\"center\"] { text-align: center; } th[data-align=\"end\"], td[data-align=\"end\"] { text-align: end; } @container (min-width: 48rem) { .toolbar { grid-template-columns: minmax(0, var(--_toolbar-primary-column)) minmax(0, 1fr); align-items: end; } .toolbar-meta { justify-content: flex-end; } } `"
15616
+ "default": "css` :host { display: block; container-type: inline-size; color: var(--color-text-primary, #181b1a); font-family: var(--violet-data-grid-font-family, var(--font-family-body, \"Inter\", system-ui, sans-serif)); --_surface-page: var(--color-surface-page, #f4f0ea); --_surface-card: var(--color-surface-card, #f8f9f3); --_surface-subtle: var(--color-surface-subtle, #e9e5de); --_surface-selected: var(--color-surface-selected, #dfeae3); --_control-selected-background: var(--color-control-selected-background, #badecf); --_control-selected-foreground: var(--color-control-selected-foreground, #2c5e4b); --_control-selected-border: var(--color-control-selected-border, rgba(44, 94, 75, 0.5)); --_surface-floating: var(--color-surface-floating, #ffffff); --_text-primary: var(--color-text-primary, #181b1a); --_text-secondary: var(--color-text-secondary, #48534b); --_text-muted: var(--color-text-muted, #5e6460); --_border-subtle: var(--color-border-subtle, rgba(24, 27, 26, 0.10)); --_border-strong: var(--color-border-strong, #6b7d6e); --_focus-ring: var(--color-focus-ring, #146ba0); --_error-background: var(--color-state-danger-background, #f7e4df); --_error-border: var(--color-state-danger-border, transparent); --_error-text: var(--color-state-danger-text, #c42a1a); --_active-cell-ring: var(--violet-data-grid-active-cell-ring, color-mix(in srgb, var(--_focus-ring) 82%, transparent)); --_active-cell-ring-width: var(--violet-data-grid-active-cell-ring-width, var(--size-focus-ring-width, 2px)); --_space-inline-sm: var(--space-inline-sm, 4px); --_space-inline-md: var(--space-inline-md, 8px); --_space-stack-xs: var(--space-stack-xs, 4px); --_space-stack-sm: var(--space-stack-sm, 8px); --_radius-md: var(--radius-md, 8px); --_shadow-card: var(--shadow-card, 0 0 0 1px rgba(24, 27, 26, 0.06), 0 1px 2px rgba(24, 27, 26, 0.06), 0 4px 10px -2px rgba(24, 27, 26, 0.06)); /* Stacking layers. Declared here rather than inherited: an undefined custom property makes the z-index declaration invalid at computed-value time, so it is dropped and the element falls back to z-index auto — a sticky header then scrolls behind the rows instead of above them. Values match violet-token-defaults. */ --_layer-raised: var(--z-index-raised, 1); --_layer-sticky: var(--z-index-sticky, 10); --_focus-outline-offset: 2px; --_type-meta-size: 0.875rem; --_type-cell-size: 0.9375rem; --_target-size-compact: var(--size-target-compact, 24px); --_target-size-natural: var(--size-target-natural, 32px); --_target-size-comfortable: var(--size-target-comfortable, 44px); --_row-target-size: var(--_target-size-natural); --_column-resizer-target-size: var(--_target-size-compact); --_filter-max-inline: min(24rem, 100%); --_toolbar-primary-column: 20rem; --_selection-column-size: 3.25rem; --_selection-control-size: 1rem; --_loading-min-block-size: 10rem; --_overlay-blur: 4px; --_visually-hidden-size: 1px; --_row-padding-inline: var(--violet-data-grid-row-padding-inline, 0.875rem); --_virtualized-max-block-size: var(--violet-data-grid-virtualized-max-block-size, 32rem); } :host([density=\"compact\"]) { --_row-target-size: var(--_target-size-compact); --_row-padding-inline: var(--violet-data-grid-row-padding-inline-compact, 0.875rem); } :host([density=\"comfortable\"]) { --_row-target-size: var(--_target-size-comfortable); --_row-padding-inline: var(--violet-data-grid-row-padding-inline-comfortable, 1rem); } :host(:focus-visible) { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); } :host([busy]) .table-scroll { cursor: progress; } .grid-shell { display: grid; gap: var(--_space-stack-sm); min-inline-size: 0; min-block-size: 0; block-size: 100%; } .toolbar { display: grid; gap: var(--_space-inline-sm); align-items: start; } .fill-actions { display: flex; flex-wrap: wrap; gap: var(--_space-inline-sm); } .fill-status { align-self: center; color: var(--_text-secondary); font-size: var(--_type-meta-size); } .fill-action { min-inline-size: 24px; min-block-size: 32px; padding: var(--_space-stack-xs) var(--_space-inline-md); border: 1px solid var(--_border-strong); border-radius: var(--_radius-md); background: var(--_surface-card); color: var(--_text-primary); font: inherit; font-size: var(--_type-meta-size); cursor: pointer; } .fill-action:disabled { color: var(--_text-muted); cursor: default; } .fill-action:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); } .toolbar-meta { display: flex; justify-content: space-between; align-items: center; gap: var(--_space-inline-sm); color: var(--_text-secondary); font-size: var(--_type-meta-size); } .toolbar-slot { display: flex; flex-wrap: wrap; gap: var(--_space-inline-sm); } .filter-shell { display: grid; max-inline-size: var(--_filter-max-inline); } .filter-field { inline-size: 100%; } .table-region { position: relative; min-inline-size: 0; min-block-size: 0; } .edit-status { position: absolute; z-index: var(--_layer-sticky); inset-block-start: var(--_space-stack-xs); inset-inline-end: var(--_space-inline-sm); max-inline-size: min(24rem, calc(100% - (var(--_space-inline-sm) * 2))); padding: var(--_space-stack-xs) var(--_space-inline-sm); border: 1px solid var(--_error-border); border-radius: calc(var(--_radius-md) / 2); background: var(--_error-background); color: var(--_error-text); box-shadow: var(--_shadow-card); font-size: 0.8125rem; line-height: 1.35; pointer-events: none; } .edit-status:empty { display: none; } .table-scroll { box-sizing: border-box; max-inline-size: 100%; min-inline-size: 0; overflow: auto; border: 1px solid var(--_border-subtle); border-radius: calc(var(--_radius-md) - 2px); background: var(--_surface-card); scrollbar-color: color-mix(in srgb, var(--_border-strong) 65%, transparent) transparent; outline: none; } .table-scroll:focus-visible { box-shadow: 0 0 0 2px var(--_focus-ring); } :host([virtualize]) .table-scroll { block-size: 100%; max-block-size: var(--_virtualized-max-block-size); overflow-anchor: none; } .table-canvas { min-inline-size: 100%; overflow: visible; } :host([virtualize]) .table-canvas { min-block-size: calc(var(--_virtual-total-size, 0px) + var(--_row-target-size)); } .table-scroll::-webkit-scrollbar { inline-size: 0.625rem; block-size: 0.625rem; } .table-scroll::-webkit-scrollbar-track { background: transparent; } .table-scroll::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--_border-strong) 72%, transparent); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; } .table-scroll::-webkit-scrollbar-corner { background: transparent; } .table-full-table { min-inline-size: 100%; inline-size: max-content; border-collapse: separate; border-spacing: 0; table-layout: fixed; } thead { background: var(--_surface-subtle); } :host([sticky-header]) .table-full-table thead th { position: sticky; inset-block-start: 0; z-index: var(--_layer-raised); background: var(--_surface-subtle); } th, td { box-sizing: border-box; block-size: var(--_row-target-size); border-block-end: 1px solid var(--_border-subtle); padding-inline: var(--_row-padding-inline); padding-block: 0; text-align: start; vertical-align: middle; } tbody tr:last-of-type td { border-block-end: none; } .virtual-spacer-row, .virtual-spacer-row td { padding: 0; border: 0; background: transparent; overflow-anchor: none; } .virtual-spacer-row td { min-block-size: 0; } th { color: var(--_text-secondary); font-size: var(--_type-meta-size); font-weight: 600; position: relative; } th[data-column-id] { padding-inline-end: var(--_column-resizer-target-size); } th:not(:last-child), td:not(:last-child) { border-inline-end: 1px solid var(--_border-subtle); } .header-button { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--_space-inline-sm); inline-size: 100%; block-size: 100%; padding: 0; padding-inline-end: calc(var(--_space-inline-sm) + 0.5rem); border: none; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; } .header-button:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: var(--_focus-outline-offset); border-radius: calc(var(--_radius-md) / 2); } th[tabindex]:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: -2px; } .header-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sort-indicator { display: inline-flex; align-items: center; justify-content: center; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); color: var(--_text-muted); flex: 0 0 auto; transition: opacity 120ms ease, color 120ms ease; } .sort-indicator[data-sorted=\"false\"] { opacity: 0; color: color-mix(in srgb, var(--_text-muted) 72%, var(--_surface-card)); } th:hover .sort-indicator[data-sorted=\"false\"], .header-button:hover .sort-indicator[data-sorted=\"false\"], .header-button:focus-visible .sort-indicator[data-sorted=\"false\"] { opacity: 1; } .column-resizer { position: absolute; inset-block: 0; inset-inline-end: 0; box-sizing: border-box; inline-size: var(--_column-resizer-target-size); padding: 0; border: none; background: transparent; cursor: col-resize; touch-action: none; z-index: var(--_layer-sticky); } .column-resizer::before { content: \"\"; position: absolute; inset-block: 0; inset-inline-end: 0; inline-size: 1px; background: color-mix(in srgb, var(--_border-strong) 58%, transparent); opacity: 0; transition: opacity 120ms ease; } th:hover .column-resizer::before, .column-resizer:focus-visible::before { opacity: 1; } .column-resizer:focus-visible { outline: 2px solid var(--_focus-ring); outline-offset: 1px; border-radius: 999px; } td { background: var(--_surface-page); color: var(--_text-primary); font-size: var(--_type-cell-size); position: relative; user-select: text; -webkit-user-select: text; } :host([focus-mode=\"cell\"]) td { user-select: none; -webkit-user-select: none; } td[data-selected=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 48%, var(--_surface-page)); } td[data-fill-preview=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 62%, var(--_surface-page)); } td[data-active=\"true\"]::after { content: \"\"; position: absolute; inset: calc(-1 * var(--_active-cell-ring-width)); pointer-events: none; z-index: var(--_layer-raised); border: var(--_active-cell-ring-width) solid var(--_active-cell-ring); box-sizing: border-box; } td[data-active=\"true\"] { background: color-mix(in srgb, var(--_surface-selected) 70%, var(--_surface-page)); } /* Keep the 24px target inside the corner cell, including at scroll edges. */ .fill-handle { position: absolute; inset-inline-end: 0; inset-block-end: 0; inline-size: 24px; block-size: 24px; touch-action: none; cursor: crosshair; z-index: var(--_layer-sticky); } .fill-handle::after { content: \"\"; position: absolute; inset-inline-end: -3px; inset-block-end: -3px; inline-size: 6px; block-size: 6px; border: 1px solid var(--_active-cell-ring); border-radius: 2px; background: var(--_surface-card); pointer-events: none; box-shadow: 0 0 0 1px var(--_surface-card); } .cell-content { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cell-widget { display: inline-grid; align-items: center; justify-items: start; inline-size: 100%; min-inline-size: 0; } .cell-sizing-content { display: block; visibility: hidden; pointer-events: none; } .cell-widget[data-align=\"center\"] { justify-items: center; } .cell-checkbox { display: inline-grid; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; --violet-checkbox-inline-target-size: var(--_selection-control-size); } .cell-radio { display: inline-grid; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; --violet-radio-inline-target-size: var(--_selection-control-size); --violet-radio-inline-gap: 0; } .cell-editor { position: absolute; inset-inline-start: var(--_row-padding-inline); inset-inline-end: var(--_row-padding-inline); inset-block-start: 50%; transform: translateY(-50%); display: block; box-sizing: border-box; inline-size: auto; min-inline-size: 0; max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); padding: 0; border: none; background: transparent; color: var(--_text-primary); font: inherit; line-height: inherit; text-align: inherit; outline: none; appearance: none; } violet-data-grid-pill-select.cell-editor { inset-inline-start: var(--_row-padding-inline); inset-inline-end: auto; inset-block-start: 50%; transform: translateY(-50%); display: inline-grid; inline-size: fit-content; max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); justify-self: start; z-index: var(--_layer-raised); } input.cell-editor[type=\"number\"] { appearance: textfield; -moz-appearance: textfield; } input.cell-editor[type=\"number\"]::-webkit-outer-spin-button, input.cell-editor[type=\"number\"]::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; } .cell-editor:focus { outline: none; } .cell-editor-hint { position: absolute; /* Above the fill handle, which shares the sticky layer. */ z-index: calc(var(--_layer-sticky) + 1); inset-inline-start: var(--_row-padding-inline); inset-block-start: calc(100% - var(--_space-stack-xs)); /* A sentence rather than a word: wider than the edit error, still bounded. */ inline-size: max-content; max-inline-size: 18rem; padding: 2px var(--_space-stack-xs); border: 1px solid var(--_border-strong); border-radius: calc(var(--_radius-md) / 2); background: var(--_surface-floating); color: var(--_text-primary); box-shadow: var(--_shadow-card); font-size: 0.75rem; line-height: 1.25; white-space: normal; } .cell-editor-error { position: absolute; z-index: var(--_layer-sticky); inset-inline-start: var(--_row-padding-inline); inset-block-start: calc(100% - var(--_space-stack-xs)); max-inline-size: calc(100% - (var(--_row-padding-inline) * 2)); padding: 2px var(--_space-stack-xs); border: 1px solid var(--_error-border); border-radius: calc(var(--_radius-md) / 2); background: var(--_error-background); color: var(--_error-text); box-shadow: var(--_shadow-card); font-size: 0.75rem; line-height: 1.25; white-space: normal; } .selection-cell, .selection-header { inline-size: var(--_selection-column-size); padding-inline: 0; line-height: 0; text-align: center; } .selection-control { inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); accent-color: var(--_control-selected-foreground); user-select: auto; -webkit-user-select: auto; } .selection-checkbox { display: block; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; justify-self: center; --violet-checkbox-inline-target-size: var(--_selection-control-size); user-select: auto; -webkit-user-select: auto; } .selection-radio { display: block; inline-size: var(--_selection-control-size); block-size: var(--_selection-control-size); line-height: 0; justify-self: center; --violet-radio-inline-target-size: var(--_selection-control-size); --violet-radio-inline-gap: 0; user-select: auto; -webkit-user-select: auto; } tbody tr[data-selected=\"true\"] { background: var(--_surface-selected); } tbody tr[data-selected=\"true\"] td { color: var(--_text-primary); } .loading-state, .empty-state { display: grid; place-items: center; gap: var(--_space-stack-xs); min-block-size: var(--_loading-min-block-size); padding: calc(var(--_row-padding-inline) * 1.5); text-align: center; color: var(--_text-secondary); background: var(--_surface-card); } .loading-overlay { position: absolute; inset: 1px; display: grid; place-items: center; padding: var(--_space-inline-md); border-radius: calc(var(--_radius-md) - 2px); background: var( --violet-data-grid-loading-overlay-background, color-mix(in srgb, var(--_surface-card) 58%, transparent) ); color: var(--_text-secondary); backdrop-filter: blur(calc(var(--_overlay-blur) * 1.75)); -webkit-backdrop-filter: blur(calc(var(--_overlay-blur) * 1.75)); } .default-slot { display: contents; } .visually-hidden { position: absolute; inline-size: var(--_visually-hidden-size); block-size: var(--_visually-hidden-size); padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } th[data-align=\"center\"], td[data-align=\"center\"] { text-align: center; } th[data-align=\"end\"], td[data-align=\"end\"] { text-align: end; } @container (min-width: 48rem) { .toolbar { grid-template-columns: minmax(0, var(--_toolbar-primary-column)) minmax(0, 1fr); align-items: end; } .toolbar-meta { justify-content: flex-end; } } `"
15617
15617
  }
15618
15618
  ],
15619
15619
  "exports": [
@@ -24461,6 +24461,16 @@
24461
24461
  "privacy": "public",
24462
24462
  "default": "false"
24463
24463
  },
24464
+ {
24465
+ "kind": "method",
24466
+ "name": "dragActiveChanged",
24467
+ "privacy": "public",
24468
+ "return": {
24469
+ "type": {
24470
+ "text": "void"
24471
+ }
24472
+ }
24473
+ },
24464
24474
  {
24465
24475
  "kind": "field",
24466
24476
  "name": "dropzoneMessage",
@@ -29418,6 +29428,16 @@
29418
29428
  "kind": "class",
29419
29429
  "description": "Violet reusable option primitive.",
29420
29430
  "name": "VioletOption",
29431
+ "cssProperties": [
29432
+ {
29433
+ "description": "Background color of the active option row.",
29434
+ "name": "--violet-option-active-background"
29435
+ },
29436
+ {
29437
+ "description": "Inset ring color of the active option row when keyboard navigation is active.",
29438
+ "name": "--violet-option-active-ring"
29439
+ }
29440
+ ],
29421
29441
  "cssParts": [
29422
29442
  {
29423
29443
  "description": "Trailing slot wrapper.",
@@ -29497,7 +29517,9 @@
29497
29517
  "text": "boolean"
29498
29518
  },
29499
29519
  "privacy": "public",
29500
- "default": "false"
29520
+ "default": "false",
29521
+ "attribute": "active",
29522
+ "reflects": true
29501
29523
  },
29502
29524
  {
29503
29525
  "kind": "field",
@@ -29694,6 +29716,14 @@
29694
29716
  "default": "false",
29695
29717
  "fieldName": "selected"
29696
29718
  },
29719
+ {
29720
+ "name": "active",
29721
+ "type": {
29722
+ "text": "boolean"
29723
+ },
29724
+ "default": "false",
29725
+ "fieldName": "active"
29726
+ },
29697
29727
  {
29698
29728
  "name": "disabled",
29699
29729
  "type": {
@@ -37305,6 +37335,18 @@
37305
37335
  "privacy": "public",
37306
37336
  "default": "false"
37307
37337
  },
37338
+ {
37339
+ "kind": "field",
37340
+ "name": "label",
37341
+ "type": {
37342
+ "text": "string"
37343
+ },
37344
+ "privacy": "public",
37345
+ "description": "Accessible name for the tab list, which is inside the shadow root, so the host's aria-label\ncannot name it. It is not shown.",
37346
+ "default": "\"\"",
37347
+ "attribute": "label",
37348
+ "reflects": true
37349
+ },
37308
37350
  {
37309
37351
  "kind": "field",
37310
37352
  "name": "orientation",
@@ -37393,6 +37435,15 @@
37393
37435
  },
37394
37436
  "default": "\"\"",
37395
37437
  "fieldName": "activeid"
37438
+ },
37439
+ {
37440
+ "name": "label",
37441
+ "description": "Accessible name for the tab list, which is inside the shadow root, so the host's aria-label\ncannot name it. It is not shown.",
37442
+ "type": {
37443
+ "text": "string"
37444
+ },
37445
+ "default": "\"\"",
37446
+ "fieldName": "label"
37396
37447
  }
37397
37448
  ],
37398
37449
  "customElement": true,
@@ -39419,7 +39470,7 @@
39419
39470
  {
39420
39471
  "kind": "variable",
39421
39472
  "name": "violetThemeBuiltInSet",
39422
- "default": "{ defaultPreset: \"light\", presets: { \"light\": [ { id: \"color.action.danger.background\", value: \"#c42a1a\" }, { id: \"color.action.danger.hover\", value: \"#ad2416\" }, { id: \"color.action.danger.pressed\", value: \"#96200f\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#181b1a\" }, { id: \"color.action.primary.hover\", value: \"#2e3a33\" }, { id: \"color.action.primary.pressed\", value: \"#252e29\" }, { id: \"color.action.primary.text\", value: \"#f4f0ea\" }, { id: \"color.action.secondary.background\", value: \"rgba(24, 27, 26, 0.07)\" }, { id: \"color.action.secondary.border\", value: \"transparent\" }, { id: \"color.action.secondary.hover\", value: \"rgba(24, 27, 26, 0.11)\" }, { id: \"color.action.secondary.pressed\", value: \"rgba(24, 27, 26, 0.15)\" }, { id: \"color.action.secondary.text\", value: \"#181b1a\" }, { id: \"color.border.strong\", value: \"#6b7d6e\" }, { id: \"color.border.subtle\", value: \"rgba(24, 27, 26, 0.10)\" }, { id: \"color.control.selected.background\", value: \"#badecf\" }, { id: \"color.control.selected.border\", value: \"rgba(44, 94, 75, 0.5)\" }, { id: \"color.control.selected.foreground\", value: \"#2c5e4b\" }, { id: \"color.field.background\", value: \"#ffffff\" }, { id: \"color.field.background.readonly\", value: \"rgba(24, 27, 26, 0.05)\" }, { id: \"color.field.border\", value: \"#869089\" }, { id: \"color.field.border.focus\", value: \"#146ba0\" }, { id: \"color.field.border.hover\", value: \"#48534b\" }, { id: \"color.field.border.invalid\", value: \"#c42a1a\" }, { id: \"color.field.placeholder\", value: \"#5e6460\" }, { id: \"color.field.text\", value: \"#181b1a\" }, { id: \"color.focus.ring\", value: \"#146ba0\" }, { id: \"color.state.danger.background\", value: \"#f7e4df\" }, { id: \"color.state.danger.border\", value: \"transparent\" }, { id: \"color.state.danger.foreground\", value: \"#c42a1a\" }, { id: \"color.state.danger.text\", value: \"#c42a1a\" }, { id: \"color.state.success.background\", value: \"#dfeae3\" }, { id: \"color.state.success.border\", value: \"transparent\" }, { id: \"color.state.success.foreground\", value: \"#2c5e4b\" }, { id: \"color.state.success.text\", value: \"#2c5e4b\" }, { id: \"color.state.warning.background\", value: \"#f3e8d2\" }, { id: \"color.state.warning.border\", value: \"transparent\" }, { id: \"color.state.warning.text\", value: \"#92400e\" }, { id: \"color.surface.card\", value: \"#f8f9f3\" }, { id: \"color.surface.floating\", value: \"#ffffff\" }, { id: \"color.surface.highlight\", value: \"#ffffff\" }, { id: \"color.surface.page\", value: \"#f4f0ea\" }, { id: \"color.surface.pressed\", value: \"#d8dcd6\" }, { id: \"color.surface.selected\", value: \"#dfeae3\" }, { id: \"color.surface.subtle\", value: \"#e9e5de\" }, { id: \"color.text.muted\", value: \"#5e6460\" }, { id: \"color.text.primary\", value: \"#181b1a\" }, { id: \"color.text.secondary\", value: \"#48534b\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px rgba(24, 27, 26, 0.06), 0 1px 2px rgba(24, 27, 26, 0.06), 0 4px 10px -2px rgba(24, 27, 26, 0.06)\" }, { id: \"shadow.control\", value: \"0 0 0 1px rgba(24, 27, 26, 0.05), 0 1px 2px rgba(24, 27, 26, 0.10)\" }, { id: \"shadow.floating\", value: \"0 0 0 1px rgba(24, 27, 26, 0.08), 0 4px 12px -2px rgba(24, 27, 26, 0.12), 0 18px 40px -8px rgba(24, 27, 26, 0.20)\" }, { id: \"shadow.well\", value: \"inset 0 2px 3px -1px rgba(0, 0, 0, 0.1)\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], \"dark\": [ { id: \"color.action.danger.background\", value: \"#c42a1a\" }, { id: \"color.action.danger.hover\", value: \"#ad2416\" }, { id: \"color.action.danger.pressed\", value: \"#96200f\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#f4f0ea\" }, { id: \"color.action.primary.hover\", value: \"#d8dcd6\" }, { id: \"color.action.primary.pressed\", value: \"#bec6bd\" }, { id: \"color.action.primary.text\", value: \"#181b1a\" }, { id: \"color.action.secondary.background\", value: \"rgba(244, 240, 234, 0.09)\" }, { id: \"color.action.secondary.border\", value: \"transparent\" }, { id: \"color.action.secondary.hover\", value: \"rgba(244, 240, 234, 0.13)\" }, { id: \"color.action.secondary.pressed\", value: \"rgba(244, 240, 234, 0.17)\" }, { id: \"color.action.secondary.text\", value: \"#f4f0ea\" }, { id: \"color.border.strong\", value: \"#939c95\" }, { id: \"color.border.subtle\", value: \"rgba(244, 240, 234, 0.10)\" }, { id: \"color.control.selected.background\", value: \"#20352c\" }, { id: \"color.control.selected.border\", value: \"rgba(163, 235, 205, 0.45)\" }, { id: \"color.control.selected.foreground\", value: \"#a3ebcd\" }, { id: \"color.field.background\", value: \"rgba(0, 0, 0, 0.26)\" }, { id: \"color.field.background.readonly\", value: \"rgba(244, 240, 234, 0.06)\" }, { id: \"color.field.border\", value: \"#6b7d6e\" }, { id: \"color.field.border.focus\", value: \"#a3ebcd\" }, { id: \"color.field.border.hover\", value: \"#adb6ab\" }, { id: \"color.field.border.invalid\", value: \"#ff897a\" }, { id: \"color.field.placeholder\", value: \"#adb6ab\" }, { id: \"color.field.text\", value: \"#f4f0ea\" }, { id: \"color.focus.ring\", value: \"#a3ebcd\" }, { id: \"color.state.danger.background\", value: \"#3d211d\" }, { id: \"color.state.danger.border\", value: \"transparent\" }, { id: \"color.state.danger.foreground\", value: \"#ff897a\" }, { id: \"color.state.danger.text\", value: \"#ffab99\" }, { id: \"color.state.success.background\", value: \"#20352c\" }, { id: \"color.state.success.border\", value: \"transparent\" }, { id: \"color.state.success.foreground\", value: \"#a3ebcd\" }, { id: \"color.state.success.text\", value: \"#a3ebcd\" }, { id: \"color.state.warning.background\", value: \"#3a2b18\" }, { id: \"color.state.warning.border\", value: \"transparent\" }, { id: \"color.state.warning.text\", value: \"#f3d6a3\" }, { id: \"color.surface.card\", value: \"#222824\" }, { id: \"color.surface.floating\", value: \"#252e29\" }, { id: \"color.surface.highlight\", value: \"#4d5b50\" }, { id: \"color.surface.page\", value: \"#181b1a\" }, { id: \"color.surface.pressed\", value: \"rgba(244, 240, 234, 0.14)\" }, { id: \"color.surface.selected\", value: \"#20352c\" }, { id: \"color.surface.subtle\", value: \"#2e3a33\" }, { id: \"color.text.muted\", value: \"#adb6ab\" }, { id: \"color.text.primary\", value: \"#f4f0ea\" }, { id: \"color.text.secondary\", value: \"#bdcfc1\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px rgba(244, 240, 234, 0.07), 0 1px 2px rgba(0, 0, 0, 0.32), 0 6px 14px -2px rgba(0, 0, 0, 0.30)\" }, { id: \"shadow.control\", value: \"0 0 0 1px rgba(244, 240, 234, 0.07), 0 1px 2px rgba(0, 0, 0, 0.40)\" }, { id: \"shadow.floating\", value: \"0 0 0 1px rgba(244, 240, 234, 0.13), 0 6px 16px -2px rgba(0, 0, 0, 0.45), 0 22px 48px -8px rgba(0, 0, 0, 0.60)\" }, { id: \"shadow.well\", value: \"inset 0 2px 3px -1px rgba(0, 0, 0, 0.28)\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], \"high-contrast\": [ { id: \"color.action.danger.background\", value: \"#A30000\" }, { id: \"color.action.danger.hover\", value: \"#8A0000\" }, { id: \"color.action.danger.pressed\", value: \"#700000\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#000000\" }, { id: \"color.action.primary.hover\", value: \"#333333\" }, { id: \"color.action.primary.pressed\", value: \"#4D4D4D\" }, { id: \"color.action.primary.text\", value: \"#ffffff\" }, { id: \"color.action.secondary.background\", value: \"#ffffff\" }, { id: \"color.action.secondary.border\", value: \"#000000\" }, { id: \"color.action.secondary.hover\", value: \"#E6E6E6\" }, { id: \"color.action.secondary.pressed\", value: \"#CCCCCC\" }, { id: \"color.action.secondary.text\", value: \"#000000\" }, { id: \"color.border.strong\", value: \"#000000\" }, { id: \"color.border.subtle\", value: \"#595959\" }, { id: \"color.control.selected.background\", value: \"#E0E0E0\" }, { id: \"color.control.selected.border\", value: \"#000000\" }, { id: \"color.control.selected.foreground\", value: \"#000000\" }, { id: \"color.field.background\", value: \"#ffffff\" }, { id: \"color.field.background.readonly\", value: \"#F2F2F2\" }, { id: \"color.field.border\", value: \"#595959\" }, { id: \"color.field.border.focus\", value: \"#000000\" }, { id: \"color.field.border.hover\", value: \"#000000\" }, { id: \"color.field.border.invalid\", value: \"#A30000\" }, { id: \"color.field.placeholder\", value: \"#3D3D3D\" }, { id: \"color.field.text\", value: \"#000000\" }, { id: \"color.focus.ring\", value: \"#000000\" }, { id: \"color.state.danger.background\", value: \"#ffffff\" }, { id: \"color.state.danger.border\", value: \"#A30000\" }, { id: \"color.state.danger.foreground\", value: \"#A30000\" }, { id: \"color.state.danger.text\", value: \"#A30000\" }, { id: \"color.state.success.background\", value: \"#ffffff\" }, { id: \"color.state.success.border\", value: \"#0B5A1E\" }, { id: \"color.state.success.foreground\", value: \"#0B5A1E\" }, { id: \"color.state.success.text\", value: \"#0B5A1E\" }, { id: \"color.state.warning.background\", value: \"#ffffff\" }, { id: \"color.state.warning.border\", value: \"#6B3200\" }, { id: \"color.state.warning.text\", value: \"#6B3200\" }, { id: \"color.surface.card\", value: \"#ffffff\" }, { id: \"color.surface.floating\", value: \"#ffffff\" }, { id: \"color.surface.highlight\", value: \"#ffffff\" }, { id: \"color.surface.page\", value: \"#ffffff\" }, { id: \"color.surface.pressed\", value: \"#E6E6E6\" }, { id: \"color.surface.selected\", value: \"#E0E0E0\" }, { id: \"color.surface.subtle\", value: \"#F2F2F2\" }, { id: \"color.text.muted\", value: \"#3D3D3D\" }, { id: \"color.text.primary\", value: \"#000000\" }, { id: \"color.text.secondary\", value: \"#1F1F1F\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px #000000\" }, { id: \"shadow.control\", value: \"0 0 0 1px #000000\" }, { id: \"shadow.floating\", value: \"0 0 0 2px #000000\" }, { id: \"shadow.well\", value: \"inset 0 0 0 0 #000000\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], }, } as const satisfies VioletThemeSet",
39473
+ "default": "{ defaultPreset: \"light\", presets: { \"light\": [ { id: \"color.action.danger.background\", value: \"#c42a1a\" }, { id: \"color.action.danger.hover\", value: \"#ad2416\" }, { id: \"color.action.danger.pressed\", value: \"#96200f\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#181b1a\" }, { id: \"color.action.primary.hover\", value: \"#2e3a33\" }, { id: \"color.action.primary.pressed\", value: \"#252e29\" }, { id: \"color.action.primary.text\", value: \"#f4f0ea\" }, { id: \"color.action.secondary.background\", value: \"rgba(24, 27, 26, 0.07)\" }, { id: \"color.action.secondary.border\", value: \"transparent\" }, { id: \"color.action.secondary.hover\", value: \"rgba(24, 27, 26, 0.11)\" }, { id: \"color.action.secondary.pressed\", value: \"rgba(24, 27, 26, 0.15)\" }, { id: \"color.action.secondary.text\", value: \"#181b1a\" }, { id: \"color.border.strong\", value: \"#6b7d6e\" }, { id: \"color.border.subtle\", value: \"rgba(24, 27, 26, 0.10)\" }, { id: \"color.control.selected.background\", value: \"#badecf\" }, { id: \"color.control.selected.border\", value: \"rgba(44, 94, 75, 0.5)\" }, { id: \"color.control.selected.foreground\", value: \"#2c5e4b\" }, { id: \"color.field.background\", value: \"#ffffff\" }, { id: \"color.field.background.readonly\", value: \"rgba(24, 27, 26, 0.05)\" }, { id: \"color.field.border\", value: \"#869089\" }, { id: \"color.field.border.focus\", value: \"#146ba0\" }, { id: \"color.field.border.hover\", value: \"#48534b\" }, { id: \"color.field.border.invalid\", value: \"#c42a1a\" }, { id: \"color.field.placeholder\", value: \"#5e6460\" }, { id: \"color.field.text\", value: \"#181b1a\" }, { id: \"color.focus.ring\", value: \"#146ba0\" }, { id: \"color.state.danger.background\", value: \"#f7e4df\" }, { id: \"color.state.danger.border\", value: \"transparent\" }, { id: \"color.state.danger.foreground\", value: \"#c42a1a\" }, { id: \"color.state.danger.text\", value: \"#c42a1a\" }, { id: \"color.state.success.background\", value: \"#dfeae3\" }, { id: \"color.state.success.border\", value: \"transparent\" }, { id: \"color.state.success.foreground\", value: \"#2c5e4b\" }, { id: \"color.state.success.text\", value: \"#2c5e4b\" }, { id: \"color.state.warning.background\", value: \"#f3e8d2\" }, { id: \"color.state.warning.border\", value: \"transparent\" }, { id: \"color.state.warning.text\", value: \"#92400e\" }, { id: \"color.surface.card\", value: \"#f8f9f3\" }, { id: \"color.surface.floating\", value: \"#ffffff\" }, { id: \"color.surface.highlight\", value: \"#ffffff\" }, { id: \"color.surface.page\", value: \"#f4f0ea\" }, { id: \"color.surface.pressed\", value: \"#d8dcd6\" }, { id: \"color.surface.selected\", value: \"#dfeae3\" }, { id: \"color.surface.subtle\", value: \"#e9e5de\" }, { id: \"color.text.muted\", value: \"#5e6460\" }, { id: \"color.text.primary\", value: \"#181b1a\" }, { id: \"color.text.secondary\", value: \"#48534b\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px rgba(24, 27, 26, 0.06), 0 1px 2px rgba(24, 27, 26, 0.06), 0 4px 10px -2px rgba(24, 27, 26, 0.06)\" }, { id: \"shadow.control\", value: \"0 0 0 1px rgba(24, 27, 26, 0.05), 0 1px 2px rgba(24, 27, 26, 0.10)\" }, { id: \"shadow.floating\", value: \"0 0 0 1px rgba(24, 27, 26, 0.08), 0 4px 12px -2px rgba(24, 27, 26, 0.12), 0 18px 40px -8px rgba(24, 27, 26, 0.20)\" }, { id: \"shadow.well\", value: \"inset 0 2px 3px -1px rgba(0, 0, 0, 0.1)\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], \"dark\": [ { id: \"color.action.danger.background\", value: \"#c42a1a\" }, { id: \"color.action.danger.hover\", value: \"#ad2416\" }, { id: \"color.action.danger.pressed\", value: \"#96200f\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#f4f0ea\" }, { id: \"color.action.primary.hover\", value: \"#d8dcd6\" }, { id: \"color.action.primary.pressed\", value: \"#bec6bd\" }, { id: \"color.action.primary.text\", value: \"#141515\" }, { id: \"color.action.secondary.background\", value: \"rgba(244, 240, 234, 0.09)\" }, { id: \"color.action.secondary.border\", value: \"transparent\" }, { id: \"color.action.secondary.hover\", value: \"rgba(244, 240, 234, 0.13)\" }, { id: \"color.action.secondary.pressed\", value: \"rgba(244, 240, 234, 0.17)\" }, { id: \"color.action.secondary.text\", value: \"#f4f0ea\" }, { id: \"color.border.strong\", value: \"#999e9b\" }, { id: \"color.border.subtle\", value: \"rgba(244, 240, 234, 0.10)\" }, { id: \"color.control.selected.background\", value: \"#1b2823\" }, { id: \"color.control.selected.border\", value: \"rgba(163, 235, 205, 0.45)\" }, { id: \"color.control.selected.foreground\", value: \"#a3ebcd\" }, { id: \"color.field.background\", value: \"rgba(0, 0, 0, 0.26)\" }, { id: \"color.field.background.readonly\", value: \"rgba(244, 240, 234, 0.06)\" }, { id: \"color.field.border\", value: \"#767b78\" }, { id: \"color.field.border.focus\", value: \"#a3ebcd\" }, { id: \"color.field.border.hover\", value: \"#999e9b\" }, { id: \"color.field.border.invalid\", value: \"#ff897a\" }, { id: \"color.field.placeholder\", value: \"#999e9b\" }, { id: \"color.field.text\", value: \"#f4f0ea\" }, { id: \"color.focus.ring\", value: \"#a3ebcd\" }, { id: \"color.state.danger.background\", value: \"#3d211d\" }, { id: \"color.state.danger.border\", value: \"transparent\" }, { id: \"color.state.danger.foreground\", value: \"#ff897a\" }, { id: \"color.state.danger.text\", value: \"#ffab99\" }, { id: \"color.state.success.background\", value: \"#1b2823\" }, { id: \"color.state.success.border\", value: \"transparent\" }, { id: \"color.state.success.foreground\", value: \"#a3ebcd\" }, { id: \"color.state.success.text\", value: \"#a3ebcd\" }, { id: \"color.state.warning.background\", value: \"#3a2b18\" }, { id: \"color.state.warning.border\", value: \"transparent\" }, { id: \"color.state.warning.text\", value: \"#f3d6a3\" }, { id: \"color.surface.card\", value: \"#1b1c1c\" }, { id: \"color.surface.floating\", value: \"#252727\" }, { id: \"color.surface.highlight\", value: \"#333333\" }, { id: \"color.surface.page\", value: \"#141515\" }, { id: \"color.surface.pressed\", value: \"rgba(244, 240, 234, 0.14)\" }, { id: \"color.surface.selected\", value: \"#1b2823\" }, { id: \"color.surface.subtle\", value: \"#202222\" }, { id: \"color.text.muted\", value: \"#999e9b\" }, { id: \"color.text.primary\", value: \"#f4f0ea\" }, { id: \"color.text.secondary\", value: \"#CCCCCC\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px rgba(244, 240, 234, 0.07), 0 1px 2px rgba(0, 0, 0, 0.32), 0 6px 14px -2px rgba(0, 0, 0, 0.30)\" }, { id: \"shadow.control\", value: \"0 0 0 1px rgba(244, 240, 234, 0.07), 0 1px 2px rgba(0, 0, 0, 0.40)\" }, { id: \"shadow.floating\", value: \"0 0 0 1px rgba(244, 240, 234, 0.13), 0 6px 16px -2px rgba(0, 0, 0, 0.45), 0 22px 48px -8px rgba(0, 0, 0, 0.60)\" }, { id: \"shadow.well\", value: \"inset 0 2px 3px -1px rgba(0, 0, 0, 0.28)\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], \"high-contrast\": [ { id: \"color.action.danger.background\", value: \"#A30000\" }, { id: \"color.action.danger.hover\", value: \"#8A0000\" }, { id: \"color.action.danger.pressed\", value: \"#700000\" }, { id: \"color.action.danger.text\", value: \"#ffffff\" }, { id: \"color.action.primary.background\", value: \"#000000\" }, { id: \"color.action.primary.hover\", value: \"#333333\" }, { id: \"color.action.primary.pressed\", value: \"#4D4D4D\" }, { id: \"color.action.primary.text\", value: \"#ffffff\" }, { id: \"color.action.secondary.background\", value: \"#ffffff\" }, { id: \"color.action.secondary.border\", value: \"#000000\" }, { id: \"color.action.secondary.hover\", value: \"#E6E6E6\" }, { id: \"color.action.secondary.pressed\", value: \"#CCCCCC\" }, { id: \"color.action.secondary.text\", value: \"#000000\" }, { id: \"color.border.strong\", value: \"#000000\" }, { id: \"color.border.subtle\", value: \"#595959\" }, { id: \"color.control.selected.background\", value: \"#E0E0E0\" }, { id: \"color.control.selected.border\", value: \"#000000\" }, { id: \"color.control.selected.foreground\", value: \"#000000\" }, { id: \"color.field.background\", value: \"#ffffff\" }, { id: \"color.field.background.readonly\", value: \"#F2F2F2\" }, { id: \"color.field.border\", value: \"#595959\" }, { id: \"color.field.border.focus\", value: \"#000000\" }, { id: \"color.field.border.hover\", value: \"#000000\" }, { id: \"color.field.border.invalid\", value: \"#A30000\" }, { id: \"color.field.placeholder\", value: \"#3D3D3D\" }, { id: \"color.field.text\", value: \"#000000\" }, { id: \"color.focus.ring\", value: \"#000000\" }, { id: \"color.state.danger.background\", value: \"#ffffff\" }, { id: \"color.state.danger.border\", value: \"#A30000\" }, { id: \"color.state.danger.foreground\", value: \"#A30000\" }, { id: \"color.state.danger.text\", value: \"#A30000\" }, { id: \"color.state.success.background\", value: \"#ffffff\" }, { id: \"color.state.success.border\", value: \"#0B5A1E\" }, { id: \"color.state.success.foreground\", value: \"#0B5A1E\" }, { id: \"color.state.success.text\", value: \"#0B5A1E\" }, { id: \"color.state.warning.background\", value: \"#ffffff\" }, { id: \"color.state.warning.border\", value: \"#6B3200\" }, { id: \"color.state.warning.text\", value: \"#6B3200\" }, { id: \"color.surface.card\", value: \"#ffffff\" }, { id: \"color.surface.floating\", value: \"#ffffff\" }, { id: \"color.surface.highlight\", value: \"#ffffff\" }, { id: \"color.surface.page\", value: \"#ffffff\" }, { id: \"color.surface.pressed\", value: \"#E6E6E6\" }, { id: \"color.surface.selected\", value: \"#E0E0E0\" }, { id: \"color.surface.subtle\", value: \"#F2F2F2\" }, { id: \"color.text.muted\", value: \"#3D3D3D\" }, { id: \"color.text.primary\", value: \"#000000\" }, { id: \"color.text.secondary\", value: \"#1F1F1F\" }, { id: \"duration.base\", value: \"180ms\" }, { id: \"duration.fast\", value: \"120ms\" }, { id: \"duration.slow\", value: \"280ms\" }, { id: \"easing.emphasized\", value: \"cubic-bezier(0.16, 1, 0.3, 1)\" }, { id: \"easing.standard\", value: \"cubic-bezier(0.2, 0, 0, 1)\" }, { id: \"font.family.body\", value: \"\\\"Inter\\\", system-ui, sans-serif\" }, { id: \"font.family.heading\", value: \"\\\"Space Grotesk\\\", \\\"Segoe UI\\\", system-ui, sans-serif\" }, { id: \"font.family.mono\", value: \"\\\"IBM Plex Mono\\\", ui-monospace, Consolas, monospace\" }, { id: \"radius.lg\", value: \"12px\" }, { id: \"radius.md\", value: \"8px\" }, { id: \"radius.round\", value: \"9999px\" }, { id: \"radius.sm\", value: \"4px\" }, { id: \"shadow.card\", value: \"0 0 0 1px #000000\" }, { id: \"shadow.control\", value: \"0 0 0 1px #000000\" }, { id: \"shadow.floating\", value: \"0 0 0 2px #000000\" }, { id: \"shadow.well\", value: \"inset 0 0 0 0 #000000\" }, { id: \"size.focus-ring.width\", value: \"2px\" }, { id: \"size.font.lg\", value: \"18px\" }, { id: \"size.font.md\", value: \"14px\" }, { id: \"size.font.sm\", value: \"12px\" }, { id: \"size.font.xl\", value: \"24px\" }, { id: \"size.font.xs\", value: \"11px\" }, { id: \"size.line.lg\", value: \"24px\" }, { id: \"size.line.md\", value: \"20px\" }, { id: \"size.line.sm\", value: \"16px\" }, { id: \"size.line.xl\", value: \"32px\" }, { id: \"size.line.xs\", value: \"14px\" }, { id: \"size.space.lg\", value: \"12px\" }, { id: \"size.space.md\", value: \"8px\" }, { id: \"size.space.sm\", value: \"4px\" }, { id: \"size.space.xl\", value: \"24px\" }, { id: \"size.space.xs\", value: \"2px\" }, { id: \"size.target.comfortable\", value: \"44px\" }, { id: \"size.target.compact\", value: \"24px\" }, { id: \"size.target.natural\", value: \"32px\" }, { id: \"space.inline.lg\", value: \"12px\" }, { id: \"space.inline.md\", value: \"8px\" }, { id: \"space.inline.sm\", value: \"4px\" }, { id: \"space.layout.md\", value: \"24px\" }, { id: \"space.layout.sm\", value: \"12px\" }, { id: \"space.stack.md\", value: \"12px\" }, { id: \"space.stack.sm\", value: \"8px\" }, { id: \"space.stack.xs\", value: \"4px\" }, { id: \"type.body.md.line\", value: \"20px\" }, { id: \"type.body.md.size\", value: \"14px\" }, { id: \"type.body.md.weight\", value: \"400\" }, { id: \"type.caption.xs.line\", value: \"16px\" }, { id: \"type.caption.xs.size\", value: \"12px\" }, { id: \"type.caption.xs.weight\", value: \"400\" }, { id: \"type.label.sm.line\", value: \"16px\" }, { id: \"type.label.sm.size\", value: \"13px\" }, { id: \"type.label.sm.weight\", value: \"500\" }, { id: \"type.title.md.line\", value: \"32px\" }, { id: \"type.title.md.size\", value: \"24px\" }, { id: \"type.title.md.weight\", value: \"600\" }, { id: \"type.title.sm.line\", value: \"24px\" }, { id: \"type.title.sm.size\", value: \"18px\" }, { id: \"type.title.sm.weight\", value: \"600\" }, { id: \"weight.light\", value: \"100\" }, { id: \"weight.medium\", value: \"500\" }, { id: \"weight.regular\", value: \"400\" }, { id: \"weight.semibold\", value: \"600\" }, { id: \"z-index.base\", value: \"0\" }, { id: \"z-index.modal\", value: \"300\" }, { id: \"z-index.overlay\", value: \"100\" }, { id: \"z-index.popover\", value: \"200\" }, { id: \"z-index.raised\", value: \"1\" }, { id: \"z-index.sticky\", value: \"10\" }, { id: \"z-index.toast\", value: \"400\" }, ], }, } as const satisfies VioletThemeSet",
39423
39474
  "description": "The built-in default theme set, installed when a product installs none of its own."
39424
39475
  }
39425
39476
  ],
@@ -272,11 +272,12 @@ export class VioletAlert extends FASTElement {
272
272
  this.dismissible = false;
273
273
  }
274
274
  connectedCallback() {
275
- super.connectedCallback();
275
+ // Before the first render, so the first alert of a tone draws its own icon, not the fallback.
276
276
  registerSystemCheckmarkIcon();
277
277
  registerSystemCloseIcon();
278
278
  registerSystemDismissIcon();
279
279
  registerSystemWarningIcon();
280
+ super.connectedCallback();
280
281
  this.handleTitleSlotChange();
281
282
  this.handleActionsSlotChange();
282
283
  this.handleIconSlotChange();
@@ -1 +1 @@
1
- {"version":3,"file":"violet-alert.js","sourceRoot":"","sources":["../../src/alert/violet-alert.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,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E,aAAa,CAAC,QAAQ,CAA2B,CAAC;QAChF,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC9D,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnC,OAAO,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAtGkB;IADd,UAAU;6CACsB;AAGlB;IADd,UAAU;+CACwB;AAGpB;IADd,UAAU;4CACqB;AAqGpC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACpC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC5C,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAEhE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,cAAc;QACpB,QAAQ;QACR,MAAM;QACN,aAAa,EAAE;YACX,cAAc,EAAE,IAAI;SACvB;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { FASTElement, attr, css, html, observable } from \"@lushly-dev/fast-element\";\n\nimport { violetSurfaceTokenDefaults } from \"../theme/violet-token-defaults\";\nimport { registerSystemCheckmarkIcon } from \"../icon/generated/icons/system-checkmark\";\nimport { registerSystemCloseIcon } from \"../icon/generated/icons/system-close\";\nimport { registerSystemDismissIcon } from \"../icon/generated/icons/system-dismiss\";\nimport { registerSystemWarningIcon } from \"../icon/generated/icons/system-warning\";\nimport \"../button/violet-button\";\nimport \"../card/violet-card\";\nimport \"../icon/violet-icon\";\nimport \"../icon-button/violet-icon-button\";\n\nconst styles = css`\n ${violetSurfaceTokenDefaults}\n\n :host {\n display: block;\n color: var(--_text-primary);\n --_alert-radius: var(--violet-alert-radius, var(--_radius-lg));\n --_alert-padding: var(--violet-alert-padding, var(--_space-md));\n --_alert-gap: var(--violet-alert-gap, var(--_space-sm));\n --_alert-icon-size: var(--violet-alert-icon-size, 1rem);\n --_alert-title-size: var(--violet-alert-title-size, var(--_body-size));\n --_alert-title-line: var(--violet-alert-title-line, var(--_body-line));\n --_alert-body-size: var(--violet-alert-body-size, var(--_body-size));\n --_alert-body-line: var(--violet-alert-body-line, var(--_body-line));\n --_alert-meta-size: var(--violet-alert-meta-size, var(--_caption-size));\n /* The tone is the fill, the icon and the words; a plain or info alert is the quiet surface. */\n --_alert-border: var(--violet-alert-border, transparent);\n --_alert-surface: var(--violet-alert-surface, var(--_surface-subtle));\n --_alert-emphasis: var(--violet-alert-emphasis, var(--_text-secondary));\n --_alert-shadow: var(--violet-alert-shadow, none);\n }\n\n :host([tone=\"info\"]) {\n --_alert-emphasis: var(--_text-secondary);\n }\n\n :host([tone=\"success\"]) {\n --_alert-surface: var(--color-state-success-background, #dfeae3);\n --_alert-border: var(--color-state-success-border, transparent);\n --_alert-emphasis: var(--color-state-success-text, #2c5e4b);\n }\n\n :host([tone=\"warning\"]) {\n --_alert-surface: var(--color-state-warning-background, #f3e8d2);\n --_alert-border: var(--color-state-warning-border, transparent);\n --_alert-emphasis: var(--color-state-warning-text, #92400E);\n }\n\n :host([tone=\"danger\"]) {\n --_alert-surface: var(--color-state-danger-background, #f7e4df);\n --_alert-border: var(--color-state-danger-border, transparent);\n --_alert-emphasis: var(--color-state-danger-text, #c42a1a);\n }\n\n .frame {\n --violet-card-radius: var(--_alert-radius);\n --violet-card-padding: var(--_alert-padding);\n --violet-card-background: var(--_alert-surface);\n --violet-card-border-color: var(--_alert-border);\n --violet-card-shadow: var(--_alert-shadow);\n }\n\n .layout {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n gap: var(--_alert-gap);\n }\n\n /* The icon alone, on the title's line. */\n .leading {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--_alert-icon-size);\n block-size: var(--_alert-title-line);\n color: var(--_alert-emphasis);\n flex: 0 0 auto;\n }\n\n .leading[hidden] {\n display: none;\n }\n\n .leading ::slotted(violet-icon) {\n --violet-icon-size: var(--_alert-icon-size);\n color: currentColor;\n }\n\n .icon-slot {\n display: contents;\n }\n\n .body {\n display: grid;\n gap: var(--_space-stack-2xs);\n min-inline-size: 0;\n font-size: var(--_alert-body-size);\n line-height: var(--_alert-body-line);\n }\n\n .copy {\n display: grid;\n gap: var(--_space-stack-2xs);\n min-inline-size: 0;\n }\n\n .title {\n margin: 0;\n color: var(--_alert-emphasis);\n font-size: var(--_alert-title-size);\n line-height: var(--_alert-title-line);\n font-weight: 500;\n }\n\n .title[hidden] {\n display: none;\n }\n\n .content {\n display: grid;\n gap: var(--_space-stack-2xs);\n color: var(--_text-primary);\n }\n\n .content slot::slotted(*) {\n margin: 0;\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--_space-sm);\n margin-block-start: var(--_space-stack-xs);\n }\n\n .actions[hidden] {\n display: none;\n }\n\n .actions slot::slotted(*) {\n margin: 0;\n }\n\n /* The button is centred on the title's line and sits out to the alert's inset. */\n .dismiss {\n flex: 0 0 auto;\n margin-block-start: calc((var(--_alert-title-line) - var(--size-target-natural, 32px)) / 2);\n margin-inline-end: calc(var(--_space-stack-xs) * -1);\n color: var(--_alert-emphasis);\n }\n\n .dismiss[hidden] {\n display: none;\n }\n\n @media (max-width: 480px) {\n .layout {\n grid-template-columns: auto minmax(0, 1fr);\n }\n\n .dismiss {\n grid-column: 2;\n justify-self: end;\n margin-block-start: 0;\n }\n }\n\n @media (forced-colors: active) {\n .frame::part(root) {\n forced-color-adjust: none;\n border-color: ButtonText;\n background: Canvas;\n color: CanvasText;\n }\n\n /*\n * The frame's slot opts its content back in, so the layout, which the alert paints, opts out\n * again; what is slotted into the alert takes the system colours.\n */\n .layout {\n forced-color-adjust: none;\n }\n\n .title,\n .content {\n color: CanvasText;\n }\n\n .leading {\n color: ButtonText;\n }\n\n slot {\n forced-color-adjust: auto;\n }\n }\n`;\n\nconst template = html<VioletAlert>`\n <violet-card class=\"frame\" part=\"root\" appearance=\"outline\" padding=\"medium\">\n <div class=\"layout\" part=\"layout\">\n <span class=\"leading\" part=\"icon\" ?hidden=\"${x => !x.showLeading}\">\n <slot class=\"icon-slot\" name=\"icon\" @slotchange=\"${x => x.handleIconSlotChange()}\"></slot>\n ${x => (x.hasIcon ? html`` : x.defaultIconTemplate)}\n </span>\n\n <div class=\"body\" part=\"body\">\n <div\n class=\"copy\"\n part=\"copy\"\n role=\"${x => x.liveRegionRole || null}\"\n aria-live=\"${x => x.liveRegionPoliteness || null}\"\n >\n <p class=\"title\" part=\"title\" ?hidden=\"${x => !x.hasTitle}\">\n <slot name=\"title\" @slotchange=\"${x => x.handleTitleSlotChange()}\"></slot>\n </p>\n <div class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n </div>\n <div class=\"actions\" part=\"actions\" ?hidden=\"${x => !x.hasActions}\">\n <slot name=\"actions\" @slotchange=\"${x => x.handleActionsSlotChange()}\"></slot>\n </div>\n </div>\n\n <violet-icon-button\n class=\"dismiss\"\n part=\"dismiss-button\"\n appearance=\"transparent\"\n label=\"Dismiss alert\"\n ?hidden=\"${x => !x.dismissible}\"\n @click=\"${x => x.handleDismiss()}\"\n >\n <violet-icon icon=\"system/close\" decorative></violet-icon>\n </violet-icon-button>\n </div>\n </violet-card>\n`;\n\n/**\n * Persistent inline or banner-style message surface.\n *\n * @summary Token-driven alert composed with Violet card, icon, and button primitives.\n * @fires dismiss - Emitted when the dismiss control is activated.\n * @slot icon - Optional leading icon that overrides the default tone icon.\n * @slot title - Optional alert heading.\n * @slot - Alert body content.\n * @slot actions - Optional action buttons or links.\n * @csspart root - The outer card surface.\n * @csspart layout - Internal layout wrapper.\n * @csspart icon - Leading icon container.\n * @csspart body - Text and actions wrapper.\n * @csspart title - Heading text wrapper.\n * @csspart content - Body content wrapper.\n * @csspart actions - Action row wrapper.\n * @csspart dismiss-button - Optional dismiss button.\n */\nexport class VioletAlert extends FASTElement {\n @observable\n declare public hasTitle: boolean;\n\n @observable\n declare public hasActions: boolean;\n\n @observable\n declare public hasIcon: boolean;\n\n declare public tone: string;\n declare public announcement: string;\n declare public dismissible: boolean;\n\n public constructor() {\n super();\n this.hasTitle = false;\n this.hasActions = false;\n this.hasIcon = false;\n this.tone = \"default\";\n this.announcement = \"off\";\n this.dismissible = false;\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n registerSystemCheckmarkIcon();\n registerSystemCloseIcon();\n registerSystemDismissIcon();\n registerSystemWarningIcon();\n this.handleTitleSlotChange();\n this.handleActionsSlotChange();\n this.handleIconSlotChange();\n }\n\n public get showLeading(): boolean {\n return this.hasIcon || this.tone === \"success\" || this.tone === \"warning\" || this.tone === \"danger\";\n }\n\n public get liveRegionRole(): \"alert\" | \"status\" | null {\n if (this.announcement === \"assertive\") {\n return \"alert\";\n }\n\n if (this.announcement === \"polite\") {\n return \"status\";\n }\n\n return null;\n }\n\n public get liveRegionPoliteness(): \"assertive\" | \"polite\" | null {\n if (this.announcement === \"assertive\") {\n return \"assertive\";\n }\n\n if (this.announcement === \"polite\") {\n return \"polite\";\n }\n\n return null;\n }\n\n public get defaultIconTemplate() {\n if (this.tone === \"success\") {\n return html`<violet-icon icon=\"system/checkmark\" decorative></violet-icon>`;\n }\n\n if (this.tone === \"danger\") {\n return html`<violet-icon icon=\"system/dismiss\" decorative></violet-icon>`;\n }\n\n if (this.tone === \"warning\") {\n return html`<violet-icon icon=\"system/warning\" decorative></violet-icon>`;\n }\n\n return html``;\n }\n\n public handleTitleSlotChange(): void {\n this.hasTitle = this.#slotHasContent('slot[name=\"title\"]');\n }\n\n public handleActionsSlotChange(): void {\n this.hasActions = this.#slotHasContent('slot[name=\"actions\"]');\n }\n\n public handleIconSlotChange(): void {\n this.hasIcon = this.#slotHasContent('slot[name=\"icon\"]');\n }\n\n public handleDismiss(): void {\n this.$emit(\"dismiss\");\n }\n\n #slotHasContent(selector: string): boolean {\n const slot = this.shadowRoot?.querySelector(selector) as HTMLSlotElement | null;\n return (slot?.assignedNodes({ flatten: true }) ?? []).some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return Boolean(node.textContent?.trim());\n }\n return true;\n });\n }\n}\n\nexport type VioletAlertTone = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type VioletAlertAnnouncement = \"off\" | \"polite\" | \"assertive\";\n\nattr(VioletAlert.prototype, \"tone\");\nattr(VioletAlert.prototype, \"announcement\");\nattr({ mode: \"boolean\" })(VioletAlert.prototype, \"dismissible\");\n\nif (!customElements.get(\"violet-alert\")) {\n await FASTElement.define(VioletAlert, {\n name: \"violet-alert\",\n template,\n styles,\n shadowOptions: {\n delegatesFocus: true,\n },\n });\n}\n"]}
1
+ {"version":3,"file":"violet-alert.js","sourceRoot":"","sources":["../../src/alert/violet-alert.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,yBAAyB,CAAC;AACjC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mCAAmC,C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B;IADd,UAAU;4CACqB;AAsGpC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACpC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AAC5C,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;AAEhE,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,cAAc;QACpB,QAAQ;QACR,MAAM;QACN,aAAa,EAAE;YACX,cAAc,EAAE,IAAI;SACvB;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { FASTElement, attr, css, html, observable } from \"@lushly-dev/fast-element\";\n\nimport { violetSurfaceTokenDefaults } from \"../theme/violet-token-defaults\";\nimport { registerSystemCheckmarkIcon } from \"../icon/generated/icons/system-checkmark\";\nimport { registerSystemCloseIcon } from \"../icon/generated/icons/system-close\";\nimport { registerSystemDismissIcon } from \"../icon/generated/icons/system-dismiss\";\nimport { registerSystemWarningIcon } from \"../icon/generated/icons/system-warning\";\nimport \"../button/violet-button\";\nimport \"../card/violet-card\";\nimport \"../icon/violet-icon\";\nimport \"../icon-button/violet-icon-button\";\n\nconst styles = css`\n ${violetSurfaceTokenDefaults}\n\n :host {\n display: block;\n color: var(--_text-primary);\n --_alert-radius: var(--violet-alert-radius, var(--_radius-lg));\n --_alert-padding: var(--violet-alert-padding, var(--_space-md));\n --_alert-gap: var(--violet-alert-gap, var(--_space-sm));\n --_alert-icon-size: var(--violet-alert-icon-size, 1rem);\n --_alert-title-size: var(--violet-alert-title-size, var(--_body-size));\n --_alert-title-line: var(--violet-alert-title-line, var(--_body-line));\n --_alert-body-size: var(--violet-alert-body-size, var(--_body-size));\n --_alert-body-line: var(--violet-alert-body-line, var(--_body-line));\n --_alert-meta-size: var(--violet-alert-meta-size, var(--_caption-size));\n /* The tone is the fill, the icon and the words; a plain or info alert is the quiet surface. */\n --_alert-border: var(--violet-alert-border, transparent);\n --_alert-surface: var(--violet-alert-surface, var(--_surface-subtle));\n --_alert-emphasis: var(--violet-alert-emphasis, var(--_text-secondary));\n --_alert-shadow: var(--violet-alert-shadow, none);\n }\n\n :host([tone=\"info\"]) {\n --_alert-emphasis: var(--_text-secondary);\n }\n\n :host([tone=\"success\"]) {\n --_alert-surface: var(--color-state-success-background, #dfeae3);\n --_alert-border: var(--color-state-success-border, transparent);\n --_alert-emphasis: var(--color-state-success-text, #2c5e4b);\n }\n\n :host([tone=\"warning\"]) {\n --_alert-surface: var(--color-state-warning-background, #f3e8d2);\n --_alert-border: var(--color-state-warning-border, transparent);\n --_alert-emphasis: var(--color-state-warning-text, #92400E);\n }\n\n :host([tone=\"danger\"]) {\n --_alert-surface: var(--color-state-danger-background, #f7e4df);\n --_alert-border: var(--color-state-danger-border, transparent);\n --_alert-emphasis: var(--color-state-danger-text, #c42a1a);\n }\n\n .frame {\n --violet-card-radius: var(--_alert-radius);\n --violet-card-padding: var(--_alert-padding);\n --violet-card-background: var(--_alert-surface);\n --violet-card-border-color: var(--_alert-border);\n --violet-card-shadow: var(--_alert-shadow);\n }\n\n .layout {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr) auto;\n align-items: start;\n gap: var(--_alert-gap);\n }\n\n /* The icon alone, on the title's line. */\n .leading {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n inline-size: var(--_alert-icon-size);\n block-size: var(--_alert-title-line);\n color: var(--_alert-emphasis);\n flex: 0 0 auto;\n }\n\n .leading[hidden] {\n display: none;\n }\n\n .leading ::slotted(violet-icon) {\n --violet-icon-size: var(--_alert-icon-size);\n color: currentColor;\n }\n\n .icon-slot {\n display: contents;\n }\n\n .body {\n display: grid;\n gap: var(--_space-stack-2xs);\n min-inline-size: 0;\n font-size: var(--_alert-body-size);\n line-height: var(--_alert-body-line);\n }\n\n .copy {\n display: grid;\n gap: var(--_space-stack-2xs);\n min-inline-size: 0;\n }\n\n .title {\n margin: 0;\n color: var(--_alert-emphasis);\n font-size: var(--_alert-title-size);\n line-height: var(--_alert-title-line);\n font-weight: 500;\n }\n\n .title[hidden] {\n display: none;\n }\n\n .content {\n display: grid;\n gap: var(--_space-stack-2xs);\n color: var(--_text-primary);\n }\n\n .content slot::slotted(*) {\n margin: 0;\n }\n\n .actions {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--_space-sm);\n margin-block-start: var(--_space-stack-xs);\n }\n\n .actions[hidden] {\n display: none;\n }\n\n .actions slot::slotted(*) {\n margin: 0;\n }\n\n /* The button is centred on the title's line and sits out to the alert's inset. */\n .dismiss {\n flex: 0 0 auto;\n margin-block-start: calc((var(--_alert-title-line) - var(--size-target-natural, 32px)) / 2);\n margin-inline-end: calc(var(--_space-stack-xs) * -1);\n color: var(--_alert-emphasis);\n }\n\n .dismiss[hidden] {\n display: none;\n }\n\n @media (max-width: 480px) {\n .layout {\n grid-template-columns: auto minmax(0, 1fr);\n }\n\n .dismiss {\n grid-column: 2;\n justify-self: end;\n margin-block-start: 0;\n }\n }\n\n @media (forced-colors: active) {\n .frame::part(root) {\n forced-color-adjust: none;\n border-color: ButtonText;\n background: Canvas;\n color: CanvasText;\n }\n\n /*\n * The frame's slot opts its content back in, so the layout, which the alert paints, opts out\n * again; what is slotted into the alert takes the system colours.\n */\n .layout {\n forced-color-adjust: none;\n }\n\n .title,\n .content {\n color: CanvasText;\n }\n\n .leading {\n color: ButtonText;\n }\n\n slot {\n forced-color-adjust: auto;\n }\n }\n`;\n\nconst template = html<VioletAlert>`\n <violet-card class=\"frame\" part=\"root\" appearance=\"outline\" padding=\"medium\">\n <div class=\"layout\" part=\"layout\">\n <span class=\"leading\" part=\"icon\" ?hidden=\"${x => !x.showLeading}\">\n <slot class=\"icon-slot\" name=\"icon\" @slotchange=\"${x => x.handleIconSlotChange()}\"></slot>\n ${x => (x.hasIcon ? html`` : x.defaultIconTemplate)}\n </span>\n\n <div class=\"body\" part=\"body\">\n <div\n class=\"copy\"\n part=\"copy\"\n role=\"${x => x.liveRegionRole || null}\"\n aria-live=\"${x => x.liveRegionPoliteness || null}\"\n >\n <p class=\"title\" part=\"title\" ?hidden=\"${x => !x.hasTitle}\">\n <slot name=\"title\" @slotchange=\"${x => x.handleTitleSlotChange()}\"></slot>\n </p>\n <div class=\"content\" part=\"content\">\n <slot></slot>\n </div>\n </div>\n <div class=\"actions\" part=\"actions\" ?hidden=\"${x => !x.hasActions}\">\n <slot name=\"actions\" @slotchange=\"${x => x.handleActionsSlotChange()}\"></slot>\n </div>\n </div>\n\n <violet-icon-button\n class=\"dismiss\"\n part=\"dismiss-button\"\n appearance=\"transparent\"\n label=\"Dismiss alert\"\n ?hidden=\"${x => !x.dismissible}\"\n @click=\"${x => x.handleDismiss()}\"\n >\n <violet-icon icon=\"system/close\" decorative></violet-icon>\n </violet-icon-button>\n </div>\n </violet-card>\n`;\n\n/**\n * Persistent inline or banner-style message surface.\n *\n * @summary Token-driven alert composed with Violet card, icon, and button primitives.\n * @fires dismiss - Emitted when the dismiss control is activated.\n * @slot icon - Optional leading icon that overrides the default tone icon.\n * @slot title - Optional alert heading.\n * @slot - Alert body content.\n * @slot actions - Optional action buttons or links.\n * @csspart root - The outer card surface.\n * @csspart layout - Internal layout wrapper.\n * @csspart icon - Leading icon container.\n * @csspart body - Text and actions wrapper.\n * @csspart title - Heading text wrapper.\n * @csspart content - Body content wrapper.\n * @csspart actions - Action row wrapper.\n * @csspart dismiss-button - Optional dismiss button.\n */\nexport class VioletAlert extends FASTElement {\n @observable\n declare public hasTitle: boolean;\n\n @observable\n declare public hasActions: boolean;\n\n @observable\n declare public hasIcon: boolean;\n\n declare public tone: string;\n declare public announcement: string;\n declare public dismissible: boolean;\n\n public constructor() {\n super();\n this.hasTitle = false;\n this.hasActions = false;\n this.hasIcon = false;\n this.tone = \"default\";\n this.announcement = \"off\";\n this.dismissible = false;\n }\n\n public connectedCallback(): void {\n // Before the first render, so the first alert of a tone draws its own icon, not the fallback.\n registerSystemCheckmarkIcon();\n registerSystemCloseIcon();\n registerSystemDismissIcon();\n registerSystemWarningIcon();\n super.connectedCallback();\n this.handleTitleSlotChange();\n this.handleActionsSlotChange();\n this.handleIconSlotChange();\n }\n\n public get showLeading(): boolean {\n return this.hasIcon || this.tone === \"success\" || this.tone === \"warning\" || this.tone === \"danger\";\n }\n\n public get liveRegionRole(): \"alert\" | \"status\" | null {\n if (this.announcement === \"assertive\") {\n return \"alert\";\n }\n\n if (this.announcement === \"polite\") {\n return \"status\";\n }\n\n return null;\n }\n\n public get liveRegionPoliteness(): \"assertive\" | \"polite\" | null {\n if (this.announcement === \"assertive\") {\n return \"assertive\";\n }\n\n if (this.announcement === \"polite\") {\n return \"polite\";\n }\n\n return null;\n }\n\n public get defaultIconTemplate() {\n if (this.tone === \"success\") {\n return html`<violet-icon icon=\"system/checkmark\" decorative></violet-icon>`;\n }\n\n if (this.tone === \"danger\") {\n return html`<violet-icon icon=\"system/dismiss\" decorative></violet-icon>`;\n }\n\n if (this.tone === \"warning\") {\n return html`<violet-icon icon=\"system/warning\" decorative></violet-icon>`;\n }\n\n return html``;\n }\n\n public handleTitleSlotChange(): void {\n this.hasTitle = this.#slotHasContent('slot[name=\"title\"]');\n }\n\n public handleActionsSlotChange(): void {\n this.hasActions = this.#slotHasContent('slot[name=\"actions\"]');\n }\n\n public handleIconSlotChange(): void {\n this.hasIcon = this.#slotHasContent('slot[name=\"icon\"]');\n }\n\n public handleDismiss(): void {\n this.$emit(\"dismiss\");\n }\n\n #slotHasContent(selector: string): boolean {\n const slot = this.shadowRoot?.querySelector(selector) as HTMLSlotElement | null;\n return (slot?.assignedNodes({ flatten: true }) ?? []).some(node => {\n if (node.nodeType === Node.TEXT_NODE) {\n return Boolean(node.textContent?.trim());\n }\n return true;\n });\n }\n}\n\nexport type VioletAlertTone = \"default\" | \"info\" | \"success\" | \"warning\" | \"danger\";\nexport type VioletAlertAnnouncement = \"off\" | \"polite\" | \"assertive\";\n\nattr(VioletAlert.prototype, \"tone\");\nattr(VioletAlert.prototype, \"announcement\");\nattr({ mode: \"boolean\" })(VioletAlert.prototype, \"dismissible\");\n\nif (!customElements.get(\"violet-alert\")) {\n await FASTElement.define(VioletAlert, {\n name: \"violet-alert\",\n template,\n styles,\n shadowOptions: {\n delegatesFocus: true,\n },\n });\n}\n"]}
@@ -94,8 +94,10 @@ const styles = css `
94
94
  --violet-icon-size: 0.9em;
95
95
  }
96
96
 
97
+
97
98
  @media (forced-colors: active) {
98
- .badge {
99
+ .badge,
100
+ :host([appearance]) .badge {
99
101
  forced-color-adjust: none;
100
102
  background: Canvas;
101
103
  color: CanvasText;
@@ -1 +1 @@
1
- {"version":3,"file":"violet-badge.js","sourceRoot":"","sources":["../../src/badge/violet-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAM5E,MAAM,MAAM,GAAG,GAAG,CAAA;MACZ,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoG/B,CAAC;AAEF,MAAM,QAAQ,GAAG,IAAI,CAAa;oDACkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;UAChF,IAAI,CACF,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EACpB,IAAI,CAAa;qCACQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;aACnC,CACJ;;;;;CAKR,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C;IACvC,CAAC;CACJ;AAED,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACrC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACpC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC/D,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACpC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AAErC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,cAAc;QACpB,QAAQ;QACR,MAAM;KACT,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { FASTElement, attr, css, html, when } from \"@lushly-dev/fast-element\";\n\nimport \"../icon/violet-icon\";\nimport { violetSurfaceTokenDefaults } from \"../theme/violet-token-defaults\";\n\nexport type VioletBadgeAppearance = \"filled\" | \"outline\" | \"subtle\";\nexport type VioletBadgeColor = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type VioletBadgeSize = \"sm\" | \"md\" | \"lg\";\n\nconst styles = css`\n ${violetSurfaceTokenDefaults}\n\n :host {\n display: inline-flex;\n /* The tone is the fill and the words. A neutral badge is a wash of the text colour. */\n --_badge-bg: color-mix(in srgb, var(--_text-primary) 8%, transparent);\n --_badge-text: var(--_text-secondary);\n --_badge-padding-inline: var(--_space-md);\n --_badge-min-block: 1.25rem;\n --_badge-font-size: var(--_caption-size);\n --_badge-line-height: var(--_caption-line);\n }\n\n :host([size=\"sm\"]) {\n --_badge-padding-inline: var(--_space-sm);\n --_badge-min-block: 1.125rem;\n }\n\n :host([size=\"md\"]) {\n --_badge-padding-inline: var(--_space-md);\n --_badge-min-block: 1.25rem;\n }\n\n :host([size=\"lg\"]) {\n --_badge-padding-inline: var(--_space-lg);\n --_badge-min-block: 1.5rem;\n --_badge-font-size: var(--_body-size);\n --_badge-line-height: var(--_body-line);\n }\n\n :host([color=\"accent\"]) {\n --_badge-bg: var(--color-control-selected-background, #badecf);\n --_badge-text: var(--color-control-selected-foreground, #2c5e4b);\n }\n\n :host([color=\"success\"]) {\n --_badge-bg: var(--color-state-success-background, #dfeae3);\n --_badge-text: var(--color-state-success-text, #2c5e4b);\n }\n\n :host([color=\"warning\"]) {\n --_badge-bg: var(--color-state-warning-background, #f3e8d2);\n --_badge-text: var(--color-state-warning-text, #92400E);\n }\n\n :host([color=\"danger\"]) {\n --_badge-bg: var(--color-state-danger-background, #f7e4df);\n --_badge-text: var(--color-state-danger-text, #c42a1a);\n }\n\n .badge {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--_space-sm);\n min-block-size: var(--_badge-min-block);\n min-inline-size: var(--_badge-min-block);\n padding-inline: var(--_badge-padding-inline);\n border: 1px solid transparent;\n border-radius: calc(var(--_radius-md) - 2px);\n background: var(--_badge-bg);\n color: var(--_badge-text);\n font-size: var(--_badge-font-size);\n font-weight: var(--_type-label-weight);\n line-height: var(--_badge-line-height);\n white-space: nowrap;\n }\n\n /* An outline badge is the one place the outline is the point. */\n :host([appearance=\"outline\"]) .badge {\n background: transparent;\n border-color: color-mix(in srgb, currentColor 45%, transparent);\n }\n\n :host([appearance=\"subtle\"]) .badge {\n background: color-mix(in srgb, var(--_badge-bg) 65%, transparent);\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n }\n\n .content::slotted(*) {\n margin: 0;\n }\n\n violet-icon {\n --violet-icon-size: 0.9em;\n }\n\n @media (forced-colors: active) {\n .badge {\n forced-color-adjust: none;\n background: Canvas;\n color: CanvasText;\n border-color: ButtonText;\n }\n }\n`;\n\nconst template = html<VioletBadge>`\n <span class=\"badge\" part=\"badge\" aria-hidden=\"${x => (x.decorative ? \"true\" : \"false\")}\">\n ${when(\n x => Boolean(x.icon),\n html<VioletBadge>`\n <violet-icon icon=\"${x => x.icon}\" decorative=\"true\" part=\"icon\"></violet-icon>\n `\n )}\n <span class=\"content\" part=\"content\">\n <slot></slot>\n </span>\n </span>\n`;\n\n/**\n * Compact semantic badge for status, category, and count-like labeling.\n *\n * @summary Token-driven inline badge with semantic color and emphasis variants.\n * @slot - Badge text or short inline content.\n * @csspart badge - The outer pill surface.\n * @csspart icon - Optional leading icon.\n * @csspart content - Wrapper around slotted badge content.\n */\nexport class VioletBadge extends FASTElement {\n declare public appearance: VioletBadgeAppearance;\n declare public color: VioletBadgeColor;\n declare public size: VioletBadgeSize;\n declare public decorative: boolean;\n declare public icon: string;\n declare public label: string;\n\n public constructor() {\n super();\n this.label = \"\";\n this.appearance = \"filled\";\n this.color = \"neutral\";\n this.size = \"md\";\n this.decorative = false;\n this.icon = \"\";\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this.syncAccessibilityState();\n }\n\n public decorativeChanged(): void {\n this.syncAccessibilityState();\n }\n\n public labelChanged(): void {\n this.syncAccessibilityState();\n }\n\n private syncAccessibilityState(): void {\n if (this.decorative) {\n this.setAttribute(\"aria-hidden\", \"true\");\n this.removeAttribute(\"aria-label\");\n this.removeAttribute(\"role\");\n return;\n }\n\n this.removeAttribute(\"aria-hidden\");\n\n const label = (this.label ?? \"\").trim();\n\n if (label) {\n this.setAttribute(\"role\", \"img\");\n this.setAttribute(\"aria-label\", label);\n return;\n }\n\n this.removeAttribute(\"role\");\n this.removeAttribute(\"aria-label\");\n }\n}\n\nattr(VioletBadge.prototype, \"appearance\");\nattr(VioletBadge.prototype, \"color\");\nattr(VioletBadge.prototype, \"size\");\nattr({ mode: \"boolean\" })(VioletBadge.prototype, \"decorative\");\nattr(VioletBadge.prototype, \"icon\");\nattr(VioletBadge.prototype, \"label\");\n\nif (!customElements.get(\"violet-badge\")) {\n await FASTElement.define(VioletBadge, {\n name: \"violet-badge\",\n template,\n styles,\n });\n}\n"]}
1
+ {"version":3,"file":"violet-badge.js","sourceRoot":"","sources":["../../src/badge/violet-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAE9E,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAM5E,MAAM,MAAM,GAAG,GAAG,CAAA;MACZ,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsG/B,CAAC;AAEF,MAAM,QAAQ,GAAG,IAAI,CAAa;oDACkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;UAChF,IAAI,CACF,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EACpB,IAAI,CAAa;qCACQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;aACnC,CACJ;;;;;CAKR,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAQxC;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC;QAChB,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;QAC3B,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;IAEM,iBAAiB;QACpB,KAAK,CAAC,iBAAiB,EAAE,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,OAAO,CAAC,CAAC;AAErC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC;IACtC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE;QAClC,IAAI,EAAE,cAAc;QACpB,QAAQ;QACR,MAAM;KACT,CAAC,CAAC;AACP,CAAC","sourcesContent":["import { FASTElement, attr, css, html, when } from \"@lushly-dev/fast-element\";\n\nimport \"../icon/violet-icon\";\nimport { violetSurfaceTokenDefaults } from \"../theme/violet-token-defaults\";\n\nexport type VioletBadgeAppearance = \"filled\" | \"outline\" | \"subtle\";\nexport type VioletBadgeColor = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\nexport type VioletBadgeSize = \"sm\" | \"md\" | \"lg\";\n\nconst styles = css`\n ${violetSurfaceTokenDefaults}\n\n :host {\n display: inline-flex;\n /* The tone is the fill and the words. A neutral badge is a wash of the text colour. */\n --_badge-bg: color-mix(in srgb, var(--_text-primary) 8%, transparent);\n --_badge-text: var(--_text-secondary);\n --_badge-padding-inline: var(--_space-md);\n --_badge-min-block: 1.25rem;\n --_badge-font-size: var(--_caption-size);\n --_badge-line-height: var(--_caption-line);\n }\n\n :host([size=\"sm\"]) {\n --_badge-padding-inline: var(--_space-sm);\n --_badge-min-block: 1.125rem;\n }\n\n :host([size=\"md\"]) {\n --_badge-padding-inline: var(--_space-md);\n --_badge-min-block: 1.25rem;\n }\n\n :host([size=\"lg\"]) {\n --_badge-padding-inline: var(--_space-lg);\n --_badge-min-block: 1.5rem;\n --_badge-font-size: var(--_body-size);\n --_badge-line-height: var(--_body-line);\n }\n\n :host([color=\"accent\"]) {\n --_badge-bg: var(--color-control-selected-background, #badecf);\n --_badge-text: var(--color-control-selected-foreground, #2c5e4b);\n }\n\n :host([color=\"success\"]) {\n --_badge-bg: var(--color-state-success-background, #dfeae3);\n --_badge-text: var(--color-state-success-text, #2c5e4b);\n }\n\n :host([color=\"warning\"]) {\n --_badge-bg: var(--color-state-warning-background, #f3e8d2);\n --_badge-text: var(--color-state-warning-text, #92400E);\n }\n\n :host([color=\"danger\"]) {\n --_badge-bg: var(--color-state-danger-background, #f7e4df);\n --_badge-text: var(--color-state-danger-text, #c42a1a);\n }\n\n .badge {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--_space-sm);\n min-block-size: var(--_badge-min-block);\n min-inline-size: var(--_badge-min-block);\n padding-inline: var(--_badge-padding-inline);\n border: 1px solid transparent;\n border-radius: calc(var(--_radius-md) - 2px);\n background: var(--_badge-bg);\n color: var(--_badge-text);\n font-size: var(--_badge-font-size);\n font-weight: var(--_type-label-weight);\n line-height: var(--_badge-line-height);\n white-space: nowrap;\n }\n\n /* An outline badge is the one place the outline is the point. */\n :host([appearance=\"outline\"]) .badge {\n background: transparent;\n border-color: color-mix(in srgb, currentColor 45%, transparent);\n }\n\n :host([appearance=\"subtle\"]) .badge {\n background: color-mix(in srgb, var(--_badge-bg) 65%, transparent);\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n }\n\n .content::slotted(*) {\n margin: 0;\n }\n\n violet-icon {\n --violet-icon-size: 0.9em;\n }\n\n /* The second selector matches the appearance rules' specificity, so the system colours win for each. */\n @media (forced-colors: active) {\n .badge,\n :host([appearance]) .badge {\n forced-color-adjust: none;\n background: Canvas;\n color: CanvasText;\n border-color: ButtonText;\n }\n }\n`;\n\nconst template = html<VioletBadge>`\n <span class=\"badge\" part=\"badge\" aria-hidden=\"${x => (x.decorative ? \"true\" : \"false\")}\">\n ${when(\n x => Boolean(x.icon),\n html<VioletBadge>`\n <violet-icon icon=\"${x => x.icon}\" decorative=\"true\" part=\"icon\"></violet-icon>\n `\n )}\n <span class=\"content\" part=\"content\">\n <slot></slot>\n </span>\n </span>\n`;\n\n/**\n * Compact semantic badge for status, category, and count-like labeling.\n *\n * @summary Token-driven inline badge with semantic color and emphasis variants.\n * @slot - Badge text or short inline content.\n * @csspart badge - The outer pill surface.\n * @csspart icon - Optional leading icon.\n * @csspart content - Wrapper around slotted badge content.\n */\nexport class VioletBadge extends FASTElement {\n declare public appearance: VioletBadgeAppearance;\n declare public color: VioletBadgeColor;\n declare public size: VioletBadgeSize;\n declare public decorative: boolean;\n declare public icon: string;\n declare public label: string;\n\n public constructor() {\n super();\n this.label = \"\";\n this.appearance = \"filled\";\n this.color = \"neutral\";\n this.size = \"md\";\n this.decorative = false;\n this.icon = \"\";\n }\n\n public connectedCallback(): void {\n super.connectedCallback();\n this.syncAccessibilityState();\n }\n\n public decorativeChanged(): void {\n this.syncAccessibilityState();\n }\n\n public labelChanged(): void {\n this.syncAccessibilityState();\n }\n\n private syncAccessibilityState(): void {\n if (this.decorative) {\n this.setAttribute(\"aria-hidden\", \"true\");\n this.removeAttribute(\"aria-label\");\n this.removeAttribute(\"role\");\n return;\n }\n\n this.removeAttribute(\"aria-hidden\");\n\n const label = (this.label ?? \"\").trim();\n\n if (label) {\n this.setAttribute(\"role\", \"img\");\n this.setAttribute(\"aria-label\", label);\n return;\n }\n\n this.removeAttribute(\"role\");\n this.removeAttribute(\"aria-label\");\n }\n}\n\nattr(VioletBadge.prototype, \"appearance\");\nattr(VioletBadge.prototype, \"color\");\nattr(VioletBadge.prototype, \"size\");\nattr({ mode: \"boolean\" })(VioletBadge.prototype, \"decorative\");\nattr(VioletBadge.prototype, \"icon\");\nattr(VioletBadge.prototype, \"label\");\n\nif (!customElements.get(\"violet-badge\")) {\n await FASTElement.define(VioletBadge, {\n name: \"violet-badge\",\n template,\n styles,\n });\n}\n"]}
@@ -5,8 +5,9 @@ import { registerSystemChevronRightIcon } from "../icon/generated/icons/system-c
5
5
  import { installFormDisabled } from "../foundations/violet-form-disabled";
6
6
  import { clamp, hexToHsl, hslToHex, lightnessGradient, normalizeHexColor, saturationGradient, } from "./violet-color-utils";
7
7
  import { violetFieldTokenDefaults } from "../theme/violet-token-defaults";
8
- const DEFAULT_COLOR = "#c84f3b";
9
- const DEFAULT_PRESETS = ["#244635", "#c84f3b", "#df7f44", "#d2b062", "#7c9d83", "#5f7ea6", "#7d5fa6", "#b95a7b"];
8
+ // AFD Refined palette defaults (D159): fixed component defaults, not theme tokens.
9
+ const DEFAULT_COLOR = "#146ba0";
10
+ const DEFAULT_PRESETS = ["#181b1a", "#2c5e4b", "#a3ebcd", "#146ba0", "#c42a1a", "#f96e5b", "#92400e", "#6b7d6e"];
10
11
  let violetColorPickerCount = 0;
11
12
  registerSystemChevronRightIcon();
12
13
  const styles = css `
@@ -230,21 +231,25 @@ const styles = css `
230
231
  padding-inline: max(var(--_space-inline-md), 0.75rem);
231
232
  border: 1px solid var(--_field-border);
232
233
  border-radius: var(--_radius-md);
233
- background: var(--_surface-page);
234
- color: inherit;
234
+ background: var(--_field-background);
235
+ color: var(--_field-text);
235
236
  font: inherit;
236
237
  font-size: var(--_control-body-size);
237
238
  line-height: var(--_type-body-line);
238
239
  box-shadow: var(--_shadow-control);
239
240
  }
240
241
 
242
+ .hex-input:hover {
243
+ border-color: var(--_field-border-hover);
244
+ }
245
+
241
246
  .hex-input:focus {
242
247
  outline: none;
243
248
  }
244
249
 
245
250
  .hex-input:focus-visible {
246
- border-color: color-mix(in srgb, var(--_focus-ring) 48%, var(--_border-subtle));
247
- box-shadow: 0 0 0 2px var(--_focus-ring);
251
+ border-color: var(--_field-border-focus);
252
+ box-shadow: var(--_field-shadow-focus);
248
253
  }
249
254
 
250
255
  .hex-hint {