luxen-ui 0.24.0 → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cdn/custom-elements.json +359 -359
- package/cdn/elements/avatar/avatar.js +1 -1
- package/cdn/elements/avatar/avatar.js.map +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js +1 -1
- package/cdn/elements/dropdown-item/dropdown-item.js.map +1 -1
- package/cdn/elements/prose-editor/prose-editor.js +1 -1
- package/cdn/elements/prose-editor/prose-editor.js.map +1 -1
- package/cdn/elements/select/select.js +1 -1
- package/cdn/elements/select/select.js.map +1 -1
- package/cdn/elements/tag/tag.js +1 -1
- package/cdn/elements/tag/tag.js.map +1 -1
- package/cdn/elements/tree/tree.js +1 -1
- package/cdn/elements/tree/tree.js.map +1 -1
- package/cdn/elements/tree-item/tree-item.js +1 -1
- package/cdn/elements/tree-item/tree-item.js.map +1 -1
- package/cdn/shared/styles/button-core.styles.js +1 -1
- package/cdn/shared/styles/button-core.styles.js.map +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js +1 -1
- package/cdn/shared/styles/checkbox-appearance.styles.js.map +1 -1
- package/cdn/shared/styles/picker-core.styles.js +1 -1
- package/cdn/shared/styles/picker-core.styles.js.map +1 -1
- package/cdn/standalone.css +153 -64
- package/cdn/standalone.js +10 -10
- package/cdn/standalone.js.map +1 -1
- package/cdn/styles/elements/breadcrumb.css +1 -1
- package/cdn/styles/elements/button.css +1 -1
- package/cdn/styles/elements/checkbox.css +1 -1
- package/cdn/styles/elements/close-button/circle.css +1 -1
- package/cdn/styles/elements/close-button/ring.css +1 -1
- package/cdn/styles/elements/close-button/square.css +1 -1
- package/cdn/styles/elements/disclosure.css +2 -2
- package/cdn/styles/elements/input-otp.css +2 -2
- package/cdn/styles/elements/input-stepper/default.css +2 -2
- package/cdn/styles/elements/input-stepper/pill.css +2 -2
- package/cdn/styles/elements/input-stepper/rounded.css +2 -2
- package/cdn/styles/elements/input.css +48 -15
- package/cdn/styles/elements/prose-editor.css +23 -8
- package/cdn/styles/elements/radio-group.css +1 -1
- package/cdn/styles/elements/radio.css +1 -1
- package/cdn/styles/elements/segmented-control.css +2 -2
- package/cdn/styles/elements/select.css +25 -4
- package/cdn/styles/elements/story.css +1 -1
- package/cdn/styles/elements/switch.css +1 -1
- package/cdn/styles/elements/tabs/enclosed.css +3 -3
- package/cdn/styles/elements/tabs/line.css +3 -3
- package/cdn/styles/elements/textarea.css +22 -8
- package/cdn/styles/preset.css +7 -1
- package/cdn/styles/tokens/aliases.css +3 -1
- package/cdn/styles/tokens/forms.css +4 -0
- package/cdn/styles/tokens.css +7 -1
- package/dist/css/elements/breadcrumb.css +1 -1
- package/dist/css/elements/button.css +1 -1
- package/dist/css/elements/checkbox.css +1 -1
- package/dist/css/elements/close-button/circle.css +1 -1
- package/dist/css/elements/close-button/ring.css +1 -1
- package/dist/css/elements/close-button/square.css +1 -1
- package/dist/css/elements/disclosure.css +2 -2
- package/dist/css/elements/input-otp.css +2 -2
- package/dist/css/elements/input-stepper/default.css +2 -2
- package/dist/css/elements/input-stepper/pill.css +2 -2
- package/dist/css/elements/input-stepper/rounded.css +2 -2
- package/dist/css/elements/input.css +48 -15
- package/dist/css/elements/prose-editor.css +23 -8
- package/dist/css/elements/radio-group.css +1 -1
- package/dist/css/elements/radio.css +1 -1
- package/dist/css/elements/segmented-control.css +2 -2
- package/dist/css/elements/select.css +25 -4
- package/dist/css/elements/story.css +1 -1
- package/dist/css/elements/switch.css +1 -1
- package/dist/css/elements/tabs/enclosed.css +3 -3
- package/dist/css/elements/tabs/line.css +3 -3
- package/dist/css/elements/textarea.css +22 -8
- package/dist/css/preset.css +7 -1
- package/dist/css/tokens/aliases.css +3 -1
- package/dist/css/tokens/forms.css +4 -0
- package/dist/css/tokens.css +7 -1
- package/dist/custom-elements.json +359 -359
- package/dist/elements/avatar/avatar.css +1 -1
- package/dist/elements/dropdown-item/dropdown-item.css +5 -4
- package/dist/elements/prose-editor/prose-editor.css +1 -1
- package/dist/elements/select/select.css +0 -4
- package/dist/elements/tag/tag.css +3 -3
- package/dist/elements/tree/tree.css +1 -1
- package/dist/elements/tree-item/tree-item.css +1 -1
- package/dist/metadata/index.json +1 -1
- package/dist/shared/styles/button-core.css +1 -1
- package/dist/shared/styles/checkbox-appearance.css +1 -1
- package/dist/shared/styles/picker-core.css +25 -4
- package/package.json +1 -1
package/cdn/standalone.js
CHANGED
|
@@ -3506,7 +3506,7 @@ __decorate([e$6("dialog")], Dialog.prototype, "dialog", void 0);
|
|
|
3506
3506
|
* (l-alert-dialog, and any future l-confirm/l-prompt) shares one `CSSResult`
|
|
3507
3507
|
* (one constructed `CSSStyleSheet`, not one per importer).
|
|
3508
3508
|
*/
|
|
3509
|
-
var button_core_styles_default = r$7("/*\n * Shared `.l-button` appearance — the single source of truth for the button's\n * base look, primary, and destructive variants. Lives in the HTML tree so it is\n * both:\n * - `@import`ed (and layered) by src/css/elements/button.css for the light-DOM\n * `.l-button`, and\n * - imported `?inline` into shadow-DOM elements (l-alert-dialog) that render\n * their own `.l-button` actions and can't reach the global stylesheet.\n *\n * Intentionally UNLAYERED: the light-DOM import wraps it in `@layer components`\n * via `@import … layer(components)`, while shadow consumers want it unlayered to\n * sit alongside the (also unlayered) dialog styles. Size/icon-only/press-effect\n * variants stay in button.css — shadow actions don't need them.\n *\n * Shadow consumers must emit the class via `cls('button')`, never a static\n * `class=\"l-button\"` literal: this file ships to dist as a real CSS file, so the\n * CONSUMER's postcss-plugin-prefix rewrites this selector to\n * `.<cssPrefix>-button`, while the vite-plugin's `transform` hook only rewrites\n * `_cssPrefix` in registry.js and never touches template literals in element JS.\n */\n.l-button {\n /* Local size scaffolding (referenced by the size variants in button.css). */\n --_button-size-xs: var(--l-size-control-xs); /* 28px */\n --_button-size-sm: var(--l-size-control-sm); /* 32px */\n --_button-size-md: var(--l-size-control-md); /* 36px */\n --_button-size-lg: var(--l-size-control-lg); /* 40px */\n --_button-size-xl: var(--l-size-control-xl); /* 44px */\n\n /* Appearance (default: secondary) */\n --height: var(--_button-size-md);\n --padding-inline: 0.625rem;\n --background-color: var(--l-color-bg-fill-secondary);\n --background-color-active: color-mix(\n in oklab,\n var(--l-color-bg-fill-secondary) 90%,\n var(--l-color-text-primary)\n );\n --background-color-hover: var(--background-color-active);\n --font-size: var(--l-text-sm);\n --text-color: var(--l-color-text-primary);\n --text-color-hover: var(--text-color);\n --border-color: var(--l-color-border);\n --border-color-hover: color-mix(in oklab, var(--l-color-border) 75%, var(--l-color-text-primary));\n\n position: relative;\n display: inline-flex;\n place-items: center;\n justify-content: center;\n gap: var(--l-spacing-2);\n height: var(--height);\n padding-inline: var(--padding-inline);\n border: 1px solid var(--border-color);\n border-radius: calc(var(--height) / 8);\n background: var(--background-color);\n color: var(--text-color);\n outline: none;\n font-size: var(--font-size);\n font-weight: var(--l-font-weight-semibold);\n text-decoration: none;\n -webkit-user-select: none;\n user-select: none;\n white-space: nowrap;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n transition-property: background-color, color, text-decoration, border-color;\n transition-duration: 150ms;\n\n /* `:disabled` (native) and `[aria-disabled]` (a busy/blocked control kept in\n the tab order) read the same. */\n &:not(:disabled):not([aria-disabled='true']) {\n cursor: pointer;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n &:not(:disabled):not([aria-disabled='true']):hover {\n background-color: var(--background-color-hover);\n border-color: var(--border-color-hover);\n color: var(--text-color-hover);\n }\n\n &:not(:disabled):not([aria-disabled='true']):active {\n background-color: var(--background-color-active);\n }\n\n &:focus-visible {\n outline:
|
|
3509
|
+
var button_core_styles_default = r$7("/*\n * Shared `.l-button` appearance — the single source of truth for the button's\n * base look, primary, and destructive variants. Lives in the HTML tree so it is\n * both:\n * - `@import`ed (and layered) by src/css/elements/button.css for the light-DOM\n * `.l-button`, and\n * - imported `?inline` into shadow-DOM elements (l-alert-dialog) that render\n * their own `.l-button` actions and can't reach the global stylesheet.\n *\n * Intentionally UNLAYERED: the light-DOM import wraps it in `@layer components`\n * via `@import … layer(components)`, while shadow consumers want it unlayered to\n * sit alongside the (also unlayered) dialog styles. Size/icon-only/press-effect\n * variants stay in button.css — shadow actions don't need them.\n *\n * Shadow consumers must emit the class via `cls('button')`, never a static\n * `class=\"l-button\"` literal: this file ships to dist as a real CSS file, so the\n * CONSUMER's postcss-plugin-prefix rewrites this selector to\n * `.<cssPrefix>-button`, while the vite-plugin's `transform` hook only rewrites\n * `_cssPrefix` in registry.js and never touches template literals in element JS.\n */\n.l-button {\n /* Local size scaffolding (referenced by the size variants in button.css). */\n --_button-size-xs: var(--l-size-control-xs); /* 28px */\n --_button-size-sm: var(--l-size-control-sm); /* 32px */\n --_button-size-md: var(--l-size-control-md); /* 36px */\n --_button-size-lg: var(--l-size-control-lg); /* 40px */\n --_button-size-xl: var(--l-size-control-xl); /* 44px */\n\n /* Appearance (default: secondary) */\n --height: var(--_button-size-md);\n --padding-inline: 0.625rem;\n --background-color: var(--l-color-bg-fill-secondary);\n --background-color-active: color-mix(\n in oklab,\n var(--l-color-bg-fill-secondary) 90%,\n var(--l-color-text-primary)\n );\n --background-color-hover: var(--background-color-active);\n --font-size: var(--l-text-sm);\n --text-color: var(--l-color-text-primary);\n --text-color-hover: var(--text-color);\n --border-color: var(--l-color-border);\n --border-color-hover: color-mix(in oklab, var(--l-color-border) 75%, var(--l-color-text-primary));\n\n position: relative;\n display: inline-flex;\n place-items: center;\n justify-content: center;\n gap: var(--l-spacing-2);\n height: var(--height);\n padding-inline: var(--padding-inline);\n border: 1px solid var(--border-color);\n border-radius: calc(var(--height) / 8);\n background: var(--background-color);\n color: var(--text-color);\n outline: none;\n font-size: var(--font-size);\n font-weight: var(--l-font-weight-semibold);\n text-decoration: none;\n -webkit-user-select: none;\n user-select: none;\n white-space: nowrap;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n\n transition-property: background-color, color, text-decoration, border-color;\n transition-duration: 150ms;\n\n /* `:disabled` (native) and `[aria-disabled]` (a busy/blocked control kept in\n the tab order) read the same. */\n &:not(:disabled):not([aria-disabled='true']) {\n cursor: pointer;\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n &:not(:disabled):not([aria-disabled='true']):hover {\n background-color: var(--background-color-hover);\n border-color: var(--border-color-hover);\n color: var(--text-color-hover);\n }\n\n &:not(:disabled):not([aria-disabled='true']):active {\n background-color: var(--background-color-active);\n }\n\n &:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n }\n}\n\n.l-button[data-variant='primary'] {\n --background-color: var(--l-color-bg-fill-brand);\n --background-color-active: var(--l-color-bg-fill-brand-active);\n --background-color-hover: var(--l-color-bg-fill-brand-hover);\n --text-color: var(--l-color-text-on-fill-brand);\n --text-color-hover: var(--l-color-text-on-fill-brand);\n --border-color: transparent;\n --border-color-hover: transparent;\n}\n\n/* Soft danger fill: a pale tint with a dark-red label, deepening the tint on\n hover/active. Reads clearly as destructive without the visual shout of a solid\n red — the consequence lives in the copy and the confirmation, not the chrome.\n Derivations mix the soft fill toward the danger text color, so the tint\n deepens in light mode and lightens in dark mode (where soft is near-black). */\n.l-button[data-variant='destructive'] {\n --background-color: var(--l-color-bg-fill-danger-soft);\n --background-color-hover: color-mix(\n in oklab,\n var(--l-color-bg-fill-danger-soft) 80%,\n var(--l-color-text-danger)\n );\n --background-color-active: color-mix(\n in oklab,\n var(--l-color-bg-fill-danger-soft) 65%,\n var(--l-color-text-danger)\n );\n --text-color: var(--l-color-text-danger);\n --text-color-hover: var(--l-color-text-danger);\n --border-color: transparent;\n --border-color-hover: transparent;\n}\n\n/* Toggle button in the pressed state (APG toggle pattern): the button keeps its\n `:active` fill for as long as it is on. Rebinding the knobs rather than\n setting `background-color` is what makes this variant-agnostic — every\n variant inherits the pressed look from the active/hover colors it already\n defines. Hover mixes that fill toward the variant's own text color so a\n pressed button still answers the pointer: darker for the secondary button,\n lighter for `primary`, a deeper red for `destructive`.\n\n `:has(input:checked)` gives the same look to a `.l-button` wrapping a checked\n radio or checkbox — the shape `.l-radio-group` uses, where the visible segment\n is a `<label class=\"l-button\">`. Same state, same look, defined once.\n\n MUST stay after the variant rules: `.l-button[aria-pressed='true']` and\n `.l-button[data-variant='…']` have the same specificity, so source order is\n what lets the pressed state win over a variant's base fill. (The `:has()`\n selector scores one higher and would win either way.) */\n.l-button[aria-pressed='true'],\n.l-button:has(input:checked) {\n --background-color: var(--background-color-active);\n --background-color-hover: color-mix(\n in oklab,\n var(--background-color-active) 88%,\n var(--text-color)\n );\n --border-color: var(--border-color-hover);\n}\n");
|
|
3510
3510
|
// src/html/elements/alert-dialog/alert-dialog.css?inline
|
|
3511
3511
|
var alert_dialog_default = "/*\n * Layout for l-alert-dialog. Unlayered to match dialog.css (the inherited\n * shared styles) so these overrides win — inside a shadow root there's no host\n * cascade to guard against, and layered rules can't override dialog.css's\n * unlayered ones. The `.l-button` appearance comes from the shared button-core\n * (imported in alert-dialog.ts), not from here.\n *\n * Visual rhythm: a confirmation reads better with the title and description\n * grouped tight and the actions set off in their own bar.\n */\n\n/* Interruptive by nature: a stronger backdrop (the token meant for immersive\n overlays) plus a touch of blur pulls focus firmly onto the confirmation.\n Consumers can still retune --backdrop / --backdrop-blur. */\n:host {\n --backdrop: var(--l-backdrop-strong);\n --backdrop-blur: 2px;\n}\n\n/* Pull the description up close under the title (title keeps the inherited\n 1.125rem / 600 from dialog.css). */\n[part='header'] {\n padding-block-end: 0.5rem;\n}\n\n/* Muted, smaller description with a comfortable reading measure, plus its own\n block-end gap so the footer divider isn't crowded. */\n[part='body'] {\n padding-block-end: var(--padding);\n color: var(--l-color-text-secondary);\n font-size: var(--l-text-sm);\n line-height: 1.5;\n}\n\n/* Footer as a distinct action bar: subtle fill + top divider, corners rounded\n to match the dialog (which doesn't clip its overflow). */\n[part='footer'] {\n padding: 1rem var(--padding);\n border-top: 1px solid var(--l-color-border);\n background: var(--l-color-bg-fill-neutral-subtle);\n border-end-start-radius: var(--border-radius);\n border-end-end-radius: var(--border-radius);\n}\n";
|
|
3512
3512
|
// src/html/elements/spinner/spinner.ts
|
|
@@ -3731,7 +3731,7 @@ __decorate([n$5({
|
|
|
3731
3731
|
// src/html/elements/alert-dialog/index.ts
|
|
3732
3732
|
define("alert-dialog", AlertDialog);
|
|
3733
3733
|
// src/html/elements/avatar/avatar.ts
|
|
3734
|
-
var styles$17 = r$7(":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline:
|
|
3734
|
+
var styles$17 = r$7(":host {\n --size: 40px;\n --_font-size: calc(var(--size) * 0.4);\n display: inline-flex;\n align-items: center;\n justify-content: center;\n position: relative;\n width: var(--size);\n height: var(--size);\n border-radius: calc(var(--size) * 0.15);\n isolation: isolate;\n vertical-align: middle;\n flex-shrink: 0;\n color: var(--l-color-text-secondary);\n}\n\n:host([size='xs']) {\n --size: 24px;\n --_font-size: 0.75rem;\n}\n:host([size='sm']) {\n --size: 32px;\n --_font-size: 0.875rem;\n}\n:host([size='lg']) {\n --size: 48px;\n --_font-size: 1.25rem;\n}\n:host([size='xl']) {\n --size: 56px;\n --_font-size: 1.25rem;\n}\n\nimg {\n width: 100%;\n height: 100%;\n object-fit: cover;\n border-radius: inherit;\n}\n\n.initials {\n margin: auto;\n}\n\n.icon {\n width: 60%;\n height: 60%;\n color: currentColor;\n}\n\n.badge {\n position: absolute;\n bottom: 0;\n right: 0;\n z-index: 1;\n height: 12px;\n min-width: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-inline: 2px;\n border-radius: 3px;\n box-shadow: 0 0 0 2px var(--l-color-surface);\n background-color: var(--l-color-surface);\n font-size: 0.625rem;\n font-weight: var(--l-font-weight-medium);\n font-variant-numeric: tabular-nums;\n line-height: 1;\n color: var(--l-color-text-primary);\n overflow: hidden;\n}\n\n/*\n * Inset ring via ::after so it renders on top of the <img>.\n * A box-shadow on :host would be covered by the image since\n * it fills the entire element with object-fit: cover.\n */\n.base::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n box-shadow: inset 0 0 0 1px light-dark(oklch(0 0 0 / 7%), oklch(100% 0 0 / 10%));\n pointer-events: none;\n}\n\n.base {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n border: none;\n border-radius: calc(var(--size) * 0.15);\n background-color: var(--color, var(--l-color-bg-fill-neutral-soft));\n /*\n * Text over --color, decided by the background's own luminance — never the\n * document mode, since --color is consumer-set and ignores light/dark.\n * The contrast-color() block below is the primary path (Baseline 2026); this\n * --_on calc() is the fallback for browsers predating it (Chrome ≤146,\n * Safari <26, Firefox <146). It approximates WCAG relative luminance with\n * squared sRGB channels (a cheap linearization, Rec. 709 weights) and flips at\n * 0.2, just above the black/white crossover (~0.179) to offset squaring\n * underestimating mid-tones — holding AA across saturated brand colors where an\n * OKLCH-lightness threshold collapses to ≈1:1 (OKLCH L tracks hue, not\n * luminance: a mid red reads \"light\" yet needs white text). --text-color lets\n * consumers force a specific brand text color, overriding both paths.\n */\n --_on: calc(\n 255 *\n (\n 1 -\n sign(\n 0.2126 * (r / 255) * (r / 255) + 0.7152 * (g / 255) * (g / 255) + 0.0722 * (b / 255) *\n (b / 255) - 0.2\n )\n ) /\n 2\n );\n color: var(--text-color, rgb(from var(--color) var(--_on) var(--_on) var(--_on)));\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n text-transform: uppercase;\n padding: 0;\n cursor: inherit;\n}\n\n/* Primary path: native, guaranteed-contrast black/white. contrast-color() is\n * Baseline Newly Available (2026) — Safari 26+, Firefox 146+, Chrome/Edge 147+ —\n * and supersedes the luminance approximation above where supported. @supports (not\n * declaration order) is required: the value contains var(), so a non-supporting\n * browser would treat contrast-color() as invalid-at-computed-value-time and reset\n * to `inherit` rather than falling back to the calc() line. No bg fallback inside,\n * so a bare avatar (no --color) keeps inheriting --l-color-text-secondary.\n * --text-color still wins here, overriding contrast-color()'s choice.\n * (The earlier `… vs black, white to AA` extended syntax was dropped from the spec.) */\n@supports (color: contrast-color(red)) {\n .base {\n color: var(--text-color, contrast-color(var(--color)));\n }\n}\n\nbutton.base {\n cursor: pointer;\n}\n\nbutton.base:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n}\n\nbutton.base:hover {\n box-shadow: inset 0 0 0 1.5px var(--l-color-border-interactive);\n}\n\n@container style(--appearance: circle) {\n .base {\n border-radius: 50%;\n }\n}\n");
|
|
3735
3735
|
/**
|
|
3736
3736
|
* Extracts up to two uppercase initials from a name: the first letter of the
|
|
3737
3737
|
* first word, plus the first letter of the last word when there is more than one.
|
|
@@ -8139,7 +8139,7 @@ var select_item_suffix_styles_default = r$7("/*\n * Suffix of a rich option (`.l
|
|
|
8139
8139
|
* l-combobox share one `CSSResult` (one constructed `CSSStyleSheet`, not one
|
|
8140
8140
|
* per importer).
|
|
8141
8141
|
*/
|
|
8142
|
-
var picker_core_styles_default = r$7("/*\n * Shared core of the two shadow-DOM pickers, l-select and l-combobox: the\n * public knobs and size scale, the field frame, the chevron and clear button,\n * the listbox popover and the bits of an option row they draw the same way.\n * Imported `?inline` (through picker-core.styles.ts) BEFORE each element's own\n * stylesheet, so the element only adds what genuinely differs and can still\n * override anything here at equal specificity.\n *\n * The field frame is `.control` in l-combobox (a box wrapping the input) and\n * `.trigger` in l-select (the button itself); both are matched below.\n */\n\n:host {\n --height: var(--l-form-control-height);\n --border-radius: var(--l-form-control-border-radius);\n --background: var(--l-color-surface-overlay);\n\n display: block;\n inline-size: 100%;\n}\n\n:host([size='xs']) {\n --height: var(--l-size-control-xs);\n}\n:host([size='sm']) {\n --height: var(--l-size-control-sm);\n}\n:host([size='lg']) {\n --height: var(--l-size-control-lg);\n}\n:host([size='xl']) {\n --height: var(--l-size-control-xl);\n}\n\n:host([disabled]) {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.base {\n position: relative;\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅵🅸🅴🅻🅳 (field frame, chevron, clear button)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n:is(.control, .trigger) {\n display: flex;\n align-items: center;\n padding-inline: var(--l-form-control-padding-inline);\n border: var(--l-form-control-border-width) solid var(--l-form-control-border-color);\n border-radius: var(--border-radius);\n background-color: var(--l-form-control-background-color);\n}\n\n@media (hover: hover) {\n :is(.control, .trigger):hover {\n border-color: var(--l-form-control-border-color-hover);\n }\n}\n\n/* Focus: border takes the ring color plus the soft halo, matching l-input. The\n halo is mixed here rather than read from a :root token, so a --l-focus-ring\n re-themed on an ancestor recolors the halo as well as the border. */\n.control:has(.input:focus-visible),\n.trigger:focus-visible {\n border-color: var(--l-focus-ring);\n box-shadow: 0 0 0
|
|
8142
|
+
var picker_core_styles_default = r$7("/*\n * Shared core of the two shadow-DOM pickers, l-select and l-combobox: the\n * public knobs and size scale, the field frame, the chevron and clear button,\n * the listbox popover and the bits of an option row they draw the same way.\n * Imported `?inline` (through picker-core.styles.ts) BEFORE each element's own\n * stylesheet, so the element only adds what genuinely differs and can still\n * override anything here at equal specificity.\n *\n * The field frame is `.control` in l-combobox (a box wrapping the input) and\n * `.trigger` in l-select (the button itself); both are matched below.\n */\n\n:host {\n --height: var(--l-form-control-height);\n --border-radius: var(--l-form-control-border-radius);\n --background: var(--l-color-surface-overlay);\n\n display: block;\n inline-size: 100%;\n}\n\n:host([size='xs']) {\n --height: var(--l-size-control-xs);\n}\n:host([size='sm']) {\n --height: var(--l-size-control-sm);\n}\n:host([size='lg']) {\n --height: var(--l-size-control-lg);\n}\n:host([size='xl']) {\n --height: var(--l-size-control-xl);\n}\n\n:host([disabled]) {\n opacity: 0.5;\n pointer-events: none;\n}\n\n.base {\n position: relative;\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅵🅸🅴🅻🅳 (field frame, chevron, clear button)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n:is(.control, .trigger) {\n display: flex;\n align-items: center;\n padding-inline: var(--l-form-control-padding-inline);\n border: var(--l-form-control-border-width) solid var(--l-form-control-border-color);\n border-radius: var(--border-radius);\n background-color: var(--l-form-control-background-color);\n}\n\n@media (hover: hover) {\n :is(.control, .trigger):hover {\n border-color: var(--l-form-control-border-color-hover);\n }\n}\n\n/* Focus: border takes the ring color plus the soft halo, matching l-input. The\n halo is mixed here rather than read from a :root token, so a --l-focus-ring\n re-themed on an ancestor recolors the halo as well as the border.\n The --l-form-control-focus-border-width stroke is an outline drawn inward\n over the border, so the field, its text and its end actions never move (0 by\n default: nothing drawn).\n An outline, not an inset box-shadow: it paints above the clear button and\n the chevron, whose hover wash reaches the border, and it leaves box-shadow to\n the halo alone, 0 wide (--l-form-control-focus-halo-width: 0) painting\n nothing. */\n.control:has(.input:focus-visible),\n.trigger:focus-visible {\n border-color: var(--l-focus-ring);\n outline: var(--l-form-control-focus-border-width) solid var(--l-focus-ring);\n outline-offset: calc(var(--l-form-control-focus-border-width) * -1);\n box-shadow: 0 0 0 var(--l-form-control-focus-halo-width)\n color-mix(in oklab, var(--l-focus-ring) 22%, transparent);\n}\n\n/* Forced colors: the system palette overrides border-color and drops the halo.\n A transparent outline is forced to a visible system color: it is the\n indicator there. */\n@media (forced-colors: active) {\n .control:has(.input:focus-visible),\n .trigger:focus-visible {\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n}\n\n/* End actions — the clear button and the chevron each take a square as tall as\n the field inside its borders, so their hit area and the spacing between them\n follow `--height` (WCAG 2.5.8 with room to spare: 34px at the default 36px\n height). The chevron always comes last and bleeds over the field's end\n padding, so it sits flush against the border and its glyph stays centred in\n that square. The glyph is drawn by a pseudo-element at\n `--l-form-control-icon-size`, leaving the box itself free to carry a hover\n wash and a focus ring. Mirrors the interactive adornments of l-input-group. */\n:host {\n --_action-size: calc(var(--height) - 2 * var(--l-form-control-border-width));\n}\n\n:is(.chevron, .clear-button) {\n flex: none;\n display: grid;\n place-items: center;\n inline-size: var(--_action-size);\n color: var(--l-form-control-placeholder-color);\n}\n\n:is(.chevron, .clear-button)::before {\n content: '';\n inline-size: var(--l-form-control-icon-size);\n block-size: var(--l-form-control-icon-size);\n background-color: currentColor;\n mask: var(--_glyph) center / contain no-repeat;\n}\n\n/* Stretches over the row rather than taking a fixed block size: l-select's\n trigger has block padding, and a multiple trigger grows with its chips. */\n.chevron {\n --_glyph: var(--chevron-icon);\n\n align-self: stretch;\n margin-inline-end: calc(var(--l-form-control-padding-inline) * -1);\n}\n\n.chevron::before {\n transition: rotate 0.15s ease;\n}\n\n/* The element exposing `role=\"combobox\"` (l-combobox's input, l-select's\n trigger) carries the open state. */\n.base:has([role='combobox'][aria-expanded='true']) .chevron::before {\n rotate: 180deg;\n}\n\n.clear-button {\n --_glyph: var(--clear-icon);\n\n block-size: var(--_action-size);\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: calc(var(--border-radius) - var(--l-form-control-border-width));\n background: none;\n font: inherit;\n cursor: pointer;\n transition-property: background-color, color;\n transition-duration: 150ms;\n}\n\n@media (hover: hover) {\n .clear-button:hover {\n color: var(--l-form-control-value-color);\n background-color: var(--l-color-bg-fill-neutral-soft);\n }\n}\n\n.clear-button:active {\n background-color: var(--l-color-bg-fill-neutral-subtle);\n}\n\n.clear-button:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: calc(var(--l-focus-ring-width) * -1);\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅿🅰🅽🅴🅻 (popover listbox)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.panel {\n inset: auto;\n margin: 0;\n padding: 0;\n border: 1px solid var(--l-color-border-overlay);\n border-radius: var(--border-radius);\n background-color: var(--background);\n box-shadow: var(--l-popover-shadow);\n /* Same text as the l-dropdown panel, so rows read alike across overlays. */\n color: var(--l-color-text-primary);\n font-size: var(--l-popover-font-size);\n line-height: var(--l-popover-line-height);\n overflow: hidden;\n opacity: 0;\n scale: 0.98;\n transition:\n opacity 0.12s ease,\n scale 0.12s ease,\n display 0.12s allow-discrete,\n overlay 0.12s allow-discrete;\n}\n\n.panel:popover-open {\n opacity: 1;\n scale: 1;\n}\n\n@starting-style {\n .panel:popover-open {\n opacity: 0;\n scale: 0.98;\n }\n}\n\n.listbox {\n margin: 0;\n padding: var(--l-popover-padding);\n list-style: none;\n max-block-size: 16rem;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.option[aria-disabled='true'] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.option-label {\n flex: 1;\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* The part of an option that matches the search query. Scoped to the marks the\n * highlight adds, so a `<mark>` authored in a rich option keeps its own look. */\nmark.match {\n border-radius: 0.2em;\n background-color: var(--l-form-control-match-background-color);\n color: inherit;\n font-weight: var(--l-form-control-match-font-weight);\n -webkit-box-decoration-break: clone;\n box-decoration-break: clone;\n}\n\n.empty {\n padding: 0.5rem;\n color: var(--l-color-text-tertiary);\n text-align: center;\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅸🅲🅾🅽🆂\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n:host {\n /* Public glyphs of the end actions, as a `url()`. Set either on the element\n to re-skin it; the glyph is masked, so its color comes from the control. */\n --chevron-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E\");\n --clear-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E\");\n --_check-icon: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E\");\n}\n\n@media (prefers-reduced-motion: reduce) {\n .panel,\n .chevron::before,\n .clear-button {\n transition-duration: 0ms;\n }\n}\n");
|
|
8143
8143
|
// src/html/elements/combobox/combobox.ts
|
|
8144
8144
|
var styles$14 = r$7("/* Knobs, size scale, field frame, chevron, clear, listbox popover and the\n shared option bits come from shared/styles/picker-core.css (loaded first).\n This file holds what is specific to the editable combobox. */\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅲🅾🅽🆃🆁🅾🅻 (trigger)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.control {\n gap: 0.25rem;\n block-size: var(--height);\n cursor: text;\n}\n\n.input {\n flex: 1;\n min-inline-size: 0;\n border: 0;\n background: transparent;\n color: var(--l-form-control-value-color);\n font: inherit;\n outline: none;\n}\n\n.input::placeholder {\n color: var(--l-form-control-placeholder-color);\n}\n\n/* The clear button and the chevron sit side by side, square against square —\n the row's gap only separates them from the input. */\n.actions {\n flex: none;\n display: flex;\n align-self: stretch;\n align-items: center;\n}\n\n/* The chevron toggles the list (see _onControlPointerDown). */\n.chevron {\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .chevron:hover {\n color: var(--l-form-control-value-color);\n }\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅾🅿🆃🅸🅾🅽🆂\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.option {\n display: flex;\n align-items: center;\n gap: var(--l-menu-item-gap);\n min-block-size: var(--l-menu-item-min-height);\n padding-block: var(--l-menu-item-padding-block);\n /* Inline-end room for the checkmark of the committed value. It sits at the\n end, not in an inline-start column like l-select: a reserved start column\n would indent every row even when nothing is selected yet. */\n padding-inline: var(--l-menu-item-padding-inline) calc(var(--l-menu-item-padding-inline) + 1.5rem);\n position: relative;\n border-radius: var(--l-menu-item-border-radius);\n color: var(--l-color-text-primary);\n cursor: pointer;\n}\n\n/* The active option takes the same tint as a hovered l-dropdown-item. The\n mouse moves the active option too (ListboxNavController.onPointerMove), so\n hover and keyboard share this single highlight instead of tinting two rows. */\n.option[aria-selected='true'] {\n background-color: var(--l-color-bg-state-hover);\n}\n\n/* Checkmark on the currently committed value. */\n.option[data-current]::after {\n content: '';\n position: absolute;\n inset-inline-end: 0.5rem;\n inline-size: 1em;\n block-size: 1em;\n background-color: var(--l-form-control-activated-color);\n mask: var(--_check-icon) center / contain no-repeat;\n}\n\n/* Rich options — same authoring classes as l-select, copied straight into the\n row, so an option is rich by its content alone. */\n.option .l-select-item-media {\n flex: none;\n display: inline-flex;\n align-items: center;\n font-size: 1.25em;\n}\n\n.option .l-select-item-text {\n display: flex;\n flex-direction: column;\n min-inline-size: 0;\n}\n\n.option .l-select-item-title {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.option .l-select-item-description {\n font-size: 0.85em;\n color: var(--l-color-text-tertiary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n");
|
|
8145
8145
|
var defaultFilter$1 = (item, query) => {
|
|
@@ -9217,7 +9217,7 @@ __decorate([n$5({ attribute: "min-width" })], Dropdown.prototype, "minWidth", nu
|
|
|
9217
9217
|
// src/html/elements/dropdown/index.ts
|
|
9218
9218
|
define("dropdown", Dropdown);
|
|
9219
9219
|
// src/html/elements/dropdown-item/dropdown-item.ts
|
|
9220
|
-
var styles$12 = r$7(":host {\n display: block;\n}\n\n:host([disabled]) {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.item {\n display: flex;\n align-items: center;\n gap: var(--l-menu-item-gap);\n min-block-size: var(--l-menu-item-min-height);\n padding: var(--l-menu-item-padding-block) var(--l-menu-item-padding-inline);\n cursor: pointer;\n outline: none;\n border-radius: var(--l-menu-item-border-radius);\n font-size: var(--l-popover-font-size);\n line-height: var(--l-popover-line-height);\n color: var(--l-color-text-primary);\n white-space: nowrap;\n text-align: start;\n}\n\n.item:focus-visible {\n /* A ring distinct from the hover tint (which is the same low-contrast fill).\n
|
|
9220
|
+
var styles$12 = r$7(":host {\n display: block;\n}\n\n:host([disabled]) {\n pointer-events: none;\n opacity: 0.5;\n}\n\n.item {\n display: flex;\n align-items: center;\n gap: var(--l-menu-item-gap);\n min-block-size: var(--l-menu-item-min-height);\n padding: var(--l-menu-item-padding-block) var(--l-menu-item-padding-inline);\n cursor: pointer;\n outline: none;\n border-radius: var(--l-menu-item-border-radius);\n font-size: var(--l-popover-font-size);\n line-height: var(--l-popover-line-height);\n color: var(--l-color-text-primary);\n white-space: nowrap;\n text-align: start;\n}\n\n.item:focus-visible {\n /* A ring distinct from the hover tint (which is the same low-contrast fill).\n A negative offset equal to the ring width keeps the ring inside the row, at\n any --l-focus-ring-width, so it never collides with the panel edge or a\n neighboring item. */\n background: var(--l-color-bg-state-hover);\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: calc(var(--l-focus-ring-width) * -1);\n}\n\n@media (hover: hover) {\n .item:hover {\n background: var(--l-color-bg-state-hover);\n }\n}\n\n/* Parent item stays highlighted while its submenu is open. */\n:host([submenu-open]) .item {\n background: var(--l-color-bg-state-hover);\n}\n\n/* Destructive variant — a delete-style action. Red label at rest, danger-tinted\n fill and focus ring on hover/focus so the highlight reads as \"danger\" rather\n than the neutral hover tint. */\n:host([variant='destructive']) .item {\n color: var(--l-color-text-danger);\n}\n\n:host([variant='destructive']) .item:focus-visible {\n background: var(--l-color-bg-fill-danger-soft);\n outline-color: var(--l-color-text-danger);\n}\n\n@media (hover: hover) {\n :host([variant='destructive']) .item:hover {\n background: var(--l-color-bg-fill-danger-soft);\n }\n}\n\n.check {\n display: flex;\n width: 16px;\n flex-shrink: 0;\n}\n\n/* Inline-end chevron marking an item that opens a submenu. */\n.submenu-indicator {\n inline-size: 16px;\n block-size: 16px;\n flex-shrink: 0;\n background-color: currentColor;\n mask: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M6 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")\n no-repeat center / contain;\n}\n\n:host(:dir(rtl)) .submenu-indicator {\n scale: -1 1;\n}\n\n/* The submenu panel and its <hr> separators: shared/styles/menu-panel.css. */\n\n:host(:not([checked])) .check svg {\n visibility: hidden;\n}\n\n::slotted([slot='prefix']),\n::slotted([slot='suffix']) {\n display: flex;\n flex-shrink: 0;\n}\n\n.label {\n flex: 1;\n}\n");
|
|
9221
9221
|
/**
|
|
9222
9222
|
* A menu item for use inside `<l-dropdown>`.
|
|
9223
9223
|
*
|
|
@@ -34176,7 +34176,7 @@ var src_default = Mark.create({
|
|
|
34176
34176
|
}
|
|
34177
34177
|
});
|
|
34178
34178
|
// src/html/elements/prose-editor/prose-editor.css?inline
|
|
34179
|
-
var prose_editor_default = ":host {\n /* Editor frame */\n --border-color: var(--l-color-border);\n /* Consumed from the light-DOM stylesheet (luxen-ui/css/prose-editor), which\n is the only place that can see .ProseMirror's focus state. */\n --border-color-focus: var(--l-focus-ring);\n --border-width: 1px;\n --border-radius: var(--l-radius-md);\n --background: var(--l-color-surface);\n --color: var(--l-color-text-primary);\n\n /* Toolbar */\n --toolbar-background: var(--l-color-surface);\n --toolbar-padding: 0.5rem;\n --toolbar-gap: 0.25rem;\n --toolbar-divider-color: var(--l-color-divider);\n\n /* Toolbar buttons */\n --toolbar-button-size: 2rem;\n --toolbar-button-radius: var(--l-radius-sm);\n --toolbar-button-color: var(--l-color-text-secondary);\n --toolbar-button-color-active: var(--l-color-text-primary);\n --toolbar-button-background-hover: var(--l-color-bg-state-hover);\n --toolbar-button-background-active: var(--l-color-bg-fill-neutral-subtle);\n\n /* Editable content (rendered in light DOM, styled via luxen-ui/css/prose-editor) */\n --content-padding: 0.75rem 1rem;\n --content-min-height: 8rem;\n --placeholder-color: var(--l-color-text-tertiary);\n\n display: block;\n /* Opt into full width like the other text controls (.l-input, .l-textarea):\n `l-form-field` sets `justify-items: start`, so a control that doesn't ask\n for it collapses to fit-content. */\n box-sizing: border-box;\n inline-size: 100%;\n}\n\n:host([disabled]) {\n opacity: 0.5;\n pointer-events: none;\n}\n\n/* Fade the focus state in like l-input / l-textarea (same 150ms). The focus\n rules themselves live in the light-DOM stylesheet — only .ProseMirror's focus\n is observable from there — but the transition belongs here, on the elements\n that carry the properties. */\n.wrapper,\n.toolbar,\n.editor {\n transition-property: border-color, box-shadow;\n transition-duration: 150ms;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wrapper,\n .toolbar,\n .editor {\n transition-duration: 0ms;\n }\n}\n\n.wrapper {\n display: flex;\n flex-direction: column;\n border-radius: var(--border-radius);\n background-color: var(--background);\n color: var(--color);\n}\n\n.toolbar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--toolbar-gap);\n padding: var(--toolbar-padding);\n border: var(--border-width) solid var(--border-color);\n /* Same radius as .editor — the toolbar-placement rules below zero the two\n corners on the shared edge, so both halves must start from the full radius\n for the frame to read as one rounded box. */\n border-radius: var(--border-radius);\n background-color: var(--toolbar-background);\n}\n\n.editor {\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius);\n}\n\n/* Toolbar on top (default): collapse the shared edge between toolbar and editor */\n:host(:not([toolbar-placement])) .toolbar,\n:host([toolbar-placement='top']) .toolbar {\n border-bottom: 0;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n\n:host(:not([toolbar-placement])) .editor,\n:host([toolbar-placement='top']) .editor {\n border-top: 0;\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n}\n\n/* Toolbar on bottom */\n:host([toolbar-placement='bottom']) .toolbar {\n order: 1;\n border-top: 0;\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n}\n\n:host([toolbar-placement='bottom']) .editor {\n border-bottom: 0;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n\n.toolbar-button {\n display: grid;\n place-items: center;\n width: var(--toolbar-button-size);\n height: var(--toolbar-button-size);\n padding: 0;\n border: 0;\n border-radius: var(--toolbar-button-radius);\n background-color: transparent;\n color: var(--toolbar-button-color);\n font-size: calc(var(--toolbar-button-size) * 0.625);\n line-height: 1;\n cursor: pointer;\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--toolbar-button-background-hover);\n color: var(--toolbar-button-color-active);\n }\n }\n\n &:focus-visible {\n outline:
|
|
34179
|
+
var prose_editor_default = ":host {\n /* Editor frame */\n --border-color: var(--l-color-border);\n /* Consumed from the light-DOM stylesheet (luxen-ui/css/prose-editor), which\n is the only place that can see .ProseMirror's focus state. */\n --border-color-focus: var(--l-focus-ring);\n --border-width: 1px;\n --border-radius: var(--l-radius-md);\n --background: var(--l-color-surface);\n --color: var(--l-color-text-primary);\n\n /* Toolbar */\n --toolbar-background: var(--l-color-surface);\n --toolbar-padding: 0.5rem;\n --toolbar-gap: 0.25rem;\n --toolbar-divider-color: var(--l-color-divider);\n\n /* Toolbar buttons */\n --toolbar-button-size: 2rem;\n --toolbar-button-radius: var(--l-radius-sm);\n --toolbar-button-color: var(--l-color-text-secondary);\n --toolbar-button-color-active: var(--l-color-text-primary);\n --toolbar-button-background-hover: var(--l-color-bg-state-hover);\n --toolbar-button-background-active: var(--l-color-bg-fill-neutral-subtle);\n\n /* Editable content (rendered in light DOM, styled via luxen-ui/css/prose-editor) */\n --content-padding: 0.75rem 1rem;\n --content-min-height: 8rem;\n --placeholder-color: var(--l-color-text-tertiary);\n\n display: block;\n /* Opt into full width like the other text controls (.l-input, .l-textarea):\n `l-form-field` sets `justify-items: start`, so a control that doesn't ask\n for it collapses to fit-content. */\n box-sizing: border-box;\n inline-size: 100%;\n}\n\n:host([disabled]) {\n opacity: 0.5;\n pointer-events: none;\n}\n\n/* Fade the focus state in like l-input / l-textarea (same 150ms). The focus\n rules themselves live in the light-DOM stylesheet — only .ProseMirror's focus\n is observable from there — but the transition belongs here, on the elements\n that carry the properties. */\n.wrapper,\n.toolbar,\n.editor {\n transition-property: border-color, box-shadow;\n transition-duration: 150ms;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wrapper,\n .toolbar,\n .editor {\n transition-duration: 0ms;\n }\n}\n\n.wrapper {\n display: flex;\n flex-direction: column;\n border-radius: var(--border-radius);\n background-color: var(--background);\n color: var(--color);\n}\n\n.toolbar {\n display: flex;\n flex: 0 0 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--toolbar-gap);\n padding: var(--toolbar-padding);\n border: var(--border-width) solid var(--border-color);\n /* Same radius as .editor — the toolbar-placement rules below zero the two\n corners on the shared edge, so both halves must start from the full radius\n for the frame to read as one rounded box. */\n border-radius: var(--border-radius);\n background-color: var(--toolbar-background);\n}\n\n.editor {\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius);\n}\n\n/* Toolbar on top (default): collapse the shared edge between toolbar and editor */\n:host(:not([toolbar-placement])) .toolbar,\n:host([toolbar-placement='top']) .toolbar {\n border-bottom: 0;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n\n:host(:not([toolbar-placement])) .editor,\n:host([toolbar-placement='top']) .editor {\n border-top: 0;\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n}\n\n/* Toolbar on bottom */\n:host([toolbar-placement='bottom']) .toolbar {\n order: 1;\n border-top: 0;\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n}\n\n:host([toolbar-placement='bottom']) .editor {\n border-bottom: 0;\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n\n.toolbar-button {\n display: grid;\n place-items: center;\n width: var(--toolbar-button-size);\n height: var(--toolbar-button-size);\n padding: 0;\n border: 0;\n border-radius: var(--toolbar-button-radius);\n background-color: transparent;\n color: var(--toolbar-button-color);\n font-size: calc(var(--toolbar-button-size) * 0.625);\n line-height: 1;\n cursor: pointer;\n\n @media (hover: hover) {\n &:hover {\n background-color: var(--toolbar-button-background-hover);\n color: var(--toolbar-button-color-active);\n }\n }\n\n &:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 1px;\n }\n\n &.is-active {\n background-color: var(--toolbar-button-background-active);\n color: var(--toolbar-button-color-active);\n box-shadow: inset 0 0 0 1px var(--border-color);\n }\n\n @media (prefers-reduced-motion: no-preference) {\n transition:\n background-color 0.15s,\n color 0.15s;\n }\n}\n\n.divider {\n width: 1px;\n height: calc(var(--toolbar-button-size) * 0.5);\n margin-inline: var(--toolbar-gap);\n background-color: var(--toolbar-divider-color);\n}\n";
|
|
34180
34180
|
// ../../node_modules/.pnpm/emoji-picker-element@1.29.1/node_modules/emoji-picker-element/database.js
|
|
34181
34181
|
function assertNonEmptyString(str) {
|
|
34182
34182
|
if (typeof str !== "string" || !str) throw new Error("expected a non-empty string, got: " + str);
|
|
@@ -37185,7 +37185,7 @@ define("segmented-control", SegmentedControl);
|
|
|
37185
37185
|
*/
|
|
37186
37186
|
var select_item_styles_default = r$7("/*\n * Option row and rich-option content (`.l-select-item-media / -text / -title /\n * -description`) shared by the two select tiers, so they cannot drift apart:\n * - `@import`ed (and layered) by src/css/elements/select.css for the native\n * `select.l-select` picker, where `.l-select option` is the row, and\n * - imported `?inline` into the l-select shadow root, which copies each\n * option's markup straight into its `:host .option` row — the same shape as\n * a native <option>, so a row is rich by its content alone.\n * `:host` never matches in a document, so the shadow selectors cannot reach a\n * consumer's own `.option`. Each rule is a selector LIST (not\n * `:is()`), so every tier keeps its own specificity.\n *\n * The selected checkmark is NOT here: the native one is `::checkmark`, which a\n * browser without customizable select would reject — taking the whole rule,\n * and the shadow tier's checkmark with it.\n *\n * Intentionally UNLAYERED, like button-core.css / select-item-suffix.css.\n * In the shadow root it loads BEFORE picker-core.css, whose disabled-option rule\n * must win over the row's `cursor: pointer`.\n */\n\n.l-select option,\n:host .option {\n display: flex;\n position: relative;\n align-items: start;\n gap: var(--l-menu-item-gap);\n /* For the native tier: the document has no box-sizing reset, so the padding\n would add to the min-height. Shadow roots already get it from host.css. */\n box-sizing: border-box;\n /* Block padding that centres a one-line row on the item min-height (36px at\n the default tokens, like l-dropdown-item) but never drops below the item\n padding token. Rows top-align (`align-items: start`) so a wrapping\n description grows downwards; the checkmarks pin to this same offset. */\n --_row-padding-block: max(\n var(--l-menu-item-padding-block),\n (var(--l-menu-item-min-height) - var(--l-popover-font-size) * var(--l-popover-line-height)) / 2\n );\n\n min-block-size: var(--l-menu-item-min-height);\n padding-block: var(--_row-padding-block);\n /* Reserve the inline-start checkmark column on every row so titles align\n whether or not the option is selected (like l-dropdown). */\n padding-inline: 1.75rem var(--l-menu-item-padding-inline);\n border-radius: var(--l-menu-item-border-radius);\n cursor: pointer;\n color: var(--l-color-text-primary);\n}\n\n/* Selection is shown by the checkmark alone (like l-dropdown) — the selected\n option carries NO background, so it never reads as merged with the\n hovered/active row, which is the only one that takes the tint. Native tier\n only: in the l-select shadow root the mouse moves the active option\n (ListboxNavController.onPointerMove), whose `[data-active]` tint is the one\n highlight — a `:hover` tint there would add a second row. */\n@media (hover: hover) {\n .l-select option:hover {\n background: var(--l-color-bg-state-hover);\n }\n}\n\n/* Rich option content — image/icon + title + optional description. One class\n selector per part, not scoped to a tier: the classes are library-owned (like\n `.l-select-item-suffix`), so the same rule styles a native <option>, an\n l-select row and the copy each trigger shows. Each trigger then trims its copy\n (title weight, hidden description) next to its own rules. */\n.l-select-item-media {\n flex: 0 0 auto;\n inline-size: 1.5rem;\n block-size: 1.5rem;\n border-radius: 4px;\n object-fit: cover;\n}\n\n.l-select-item-text {\n display: flex;\n min-inline-size: 0;\n flex: 1 1 auto;\n flex-direction: column;\n}\n\n.l-select-item-title {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n font-weight: var(--l-font-weight-semibold);\n}\n\n.l-select-item-description {\n /* Override the `white-space: nowrap` inherited from the native <select>, so\n the description wraps within the picker's max-inline-size instead of\n overflowing on one line. */\n white-space: normal;\n text-wrap: pretty;\n color: var(--l-color-text-tertiary);\n font-size: 0.75rem;\n line-height: 1.3;\n}\n");
|
|
37187
37187
|
// src/html/elements/select/select.css?inline
|
|
37188
|
-
var select_default = "/* Knobs, size scale, field frame, chevron, clear, listbox popover and the\n shared option bits come from shared/styles/picker-core.css; the option row\n and rich-option content from shared/styles/select-item.css (also used by the\n native `.l-select` picker). This file holds what is specific to l-select. */\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆃🆁🅸🅶🅶🅴🆁 (button, opens the listbox popover)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.trigger {\n gap: 0.5rem;\n inline-size: 100%;\n min-block-size: var(--height);\n padding-block: 0.25rem;\n color: var(--l-form-control-value-color);\n font: inherit;\n text-align: start;\n cursor: pointer;\n}\n\n/* The form-control inline padding is tuned for text; before a chip row it reads\n as too much, so tighten the start edge in multiple mode (the chips bring their\n own spacing). */\n:host([multiple]) .trigger {\n padding-inline-start: 0.375rem;\n}\n\n
|
|
37188
|
+
var select_default = "/* Knobs, size scale, field frame, chevron, clear, listbox popover and the\n shared option bits come from shared/styles/picker-core.css; the option row\n and rich-option content from shared/styles/select-item.css (also used by the\n native `.l-select` picker). This file holds what is specific to l-select. */\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆃🆁🅸🅶🅶🅴🆁 (button, opens the listbox popover)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.trigger {\n gap: 0.5rem;\n inline-size: 100%;\n min-block-size: var(--height);\n padding-block: 0.25rem;\n color: var(--l-form-control-value-color);\n font: inherit;\n text-align: start;\n cursor: pointer;\n}\n\n/* The form-control inline padding is tuned for text; before a chip row it reads\n as too much, so tighten the start edge in multiple mode (the chips bring their\n own spacing). */\n:host([multiple]) .trigger {\n padding-inline-start: 0.375rem;\n}\n\n/* Selection display fills the trigger; the chevron (and overlaid clear) sit at the end. */\n.value {\n flex: 1;\n min-inline-size: 0;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 0.25rem;\n overflow: hidden;\n}\n\n.value-text {\n min-inline-size: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* This element's public knobs and the chip's share two names — `--height` and\n `--border-radius` — and custom properties inherit straight through a shadow\n boundary. Left alone, every chip in the trigger renders at the *select's*\n height and corner rather than its own: a 36px chip with a 6px corner, when\n `size=\"sm\"` asked for a 24px pill. `initial` is the guaranteed-invalid value,\n so each `var(--x, …)` inside the chip falls back to its own default. Matched\n on the part, not on the tag name, so a renamed `elementPrefix` can't miss it.\n\n The fill used to collide too, back when the chip read `--background`; it now\n reads `--background-color`, which this element does not expose. */\n[part='tag'] {\n --height: initial;\n --border-radius: initial;\n}\n\n.placeholder {\n color: var(--l-form-control-placeholder-color);\n}\n\n/* The clear button is a SIBLING of the trigger (not a child — no nested buttons),\n * overlaid on the trigger's end, square against the chevron's square — which\n * sits flush against the border (picker-core.css). */\n.clear-button {\n position: absolute;\n inset-block: 0;\n inset-inline-end: calc(var(--l-form-control-border-width) + var(--_action-size));\n margin-block: auto;\n}\n\n/* Keep the value (text or chips) clear of the overlaid button. */\n.base:has(> .clear-button) .chevron {\n margin-inline-start: var(--_action-size);\n}\n\n/* Rich content in the trigger takes the row styles (select-item.css), then\n mirrors the native trigger: only the media and title, at the value's weight —\n the secondary description and the trailing suffix are dropped so the selected\n value stays compact and consistent across options. */\n.value .l-select-item-title {\n font-weight: inherit;\n}\n.value .l-select-item-description,\n.value .l-select-item-suffix {\n display: none;\n}\n\n/*\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅿🅰🅽🅴🅻 (popover: search + listbox)\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n*/\n\n.search-row {\n padding: 0.375rem;\n border-block-end: 1px solid var(--l-color-border-overlay);\n}\n\n.search {\n inline-size: 100%;\n block-size: var(--l-size-control-sm);\n padding-inline: 0.5rem;\n border: var(--l-form-control-border-width) solid var(--l-form-control-border-color);\n border-radius: calc(var(--border-radius) - 2px);\n background-color: var(--l-form-control-background-color);\n color: var(--l-form-control-value-color);\n font: inherit;\n}\n\n.search:focus-visible {\n outline: none;\n border-color: var(--l-focus-ring);\n}\n\n.search::placeholder {\n color: var(--l-form-control-placeholder-color);\n}\n\n/* Keyboard-active row (moves with Arrow keys) — same tint as hover. */\n.option[data-active] {\n background-color: var(--l-color-bg-state-hover);\n}\n\n/* Selected indicator in the reserved inline-start column, pinned to the first\n * line so a wrapping description never shifts it (matches the native\n * `::checkmark` in src/css/elements/select.css). */\n.option[data-current]::after {\n content: '';\n position: absolute;\n inset-inline-start: 0.5rem;\n inset-block-start: var(--_row-padding-block);\n inline-size: 1rem;\n block-size: calc(var(--l-popover-font-size) * var(--l-popover-line-height));\n background-color: currentColor;\n mask: var(--_check-icon) center / 1rem no-repeat;\n}\n\n/* Rich content, rows and trigger alike: the shared layout (select-item.css)\n plus what only this tier needs — media may be an emoji or icon rather than an\n image, so it is centred and sized by font. */\n.l-select-item-media {\n display: inline-flex;\n align-items: center;\n font-size: 1.25em;\n}\n";
|
|
37189
37189
|
// src/html/shared/styles/checkbox-appearance.styles.ts
|
|
37190
37190
|
/**
|
|
37191
37191
|
* Shared `.l-checkbox` appearance for Shadow-DOM elements that render their own
|
|
@@ -37193,9 +37193,9 @@ var select_default = "/* Knobs, size scale, field frame, chevron, clear, listbox
|
|
|
37193
37193
|
* Wrapper module: `unsafeCSS()` is called once here so all importers share the
|
|
37194
37194
|
* same `CSSResult` instance (one constructed `CSSStyleSheet`).
|
|
37195
37195
|
*/
|
|
37196
|
-
var checkbox_appearance_styles_default = r$7("/* Shared checkbox appearance — the visual skin behind `.l-checkbox`.\n\n Colocated with its `checkbox-appearance.styles.ts` wrapper so Shadow-DOM\n elements that render their own native checkbox (e.g. `<l-tree-item>` in\n `selection=\"multiple\"`) can pull in the exact same look via `static styles`.\n The global light-DOM `checkbox.css` primitive `@import`s this file too, so\n both surfaces stay in sync. The global `.l-checkbox` class cannot pierce a\n shadow boundary, but the `--l-form-control-*` tokens this rule relies on DO\n inherit across shadow roots.\n\n Shadow consumers must emit the class via `cls('checkbox')`, never a static\n `class=\"l-checkbox\"` literal. This file ships to dist as a real CSS file and\n is imported `?inline`, so the CONSUMER's Vite runs postcss-plugin-prefix over\n it and rewrites this selector to `.<cssPrefix>-checkbox`. The vite-plugin's\n `transform` hook only rewrites `_cssPrefix` in registry.js — it never touches\n template literals in element JS — so a hardcoded class attribute would stop\n matching the rewritten selector and the checkbox would render unstyled.\n\n The checkmark / indeterminate dash are drawn with a `background-image` SVG on\n the input itself — `::before`/`::after` do not paint on replaced elements\n like `<input>`. `background-image` can't read the host's `currentColor`, so\n the glyph color is baked white. This stays legible because the accent\n (`--l-form-control-activated-color`) is a stable color that does not invert\n between light and dark. Override `--checkmark` to swap the icon. */\n\n@layer components {\n .l-checkbox,\n :where(l-form-field:not([unstyled])) > input[type='checkbox']:not([role='switch']) {\n /* Public knobs */\n --size: var(--l-form-control-toggle-size);\n --accent: var(--l-form-control-activated-color);\n --checkmark: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"white\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"/></svg>');\n --_dash: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"white\" stroke-width=\"2.5\" stroke-linecap=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>');\n\n box-sizing: border-box;\n flex: 0 0 auto;\n inline-size: var(--size);\n block-size: var(--size);\n margin: 0;\n padding: 0;\n appearance: none;\n border: var(--l-form-control-border-width) solid var(--l-form-control-border-color);\n border-radius: calc(var(--size) * 0.2);\n background-color: var(--l-form-control-background-color);\n background-repeat: no-repeat;\n background-position: center;\n background-size: 75%;\n vertical-align: middle;\n cursor: pointer;\n transition-property: background-color, border-color;\n transition-duration: 150ms;\n\n &:checked,\n &:indeterminate {\n border-color: var(--accent);\n background-color: var(--accent);\n }\n\n &:checked {\n background-image: var(--checkmark);\n }\n\n &:indeterminate {\n background-image: var(--_dash);\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n border-color: var(--l-form-control-border-color-hover);\n }\n }\n\n &:focus-visible {\n outline:
|
|
37196
|
+
var checkbox_appearance_styles_default = r$7("/* Shared checkbox appearance — the visual skin behind `.l-checkbox`.\n\n Colocated with its `checkbox-appearance.styles.ts` wrapper so Shadow-DOM\n elements that render their own native checkbox (e.g. `<l-tree-item>` in\n `selection=\"multiple\"`) can pull in the exact same look via `static styles`.\n The global light-DOM `checkbox.css` primitive `@import`s this file too, so\n both surfaces stay in sync. The global `.l-checkbox` class cannot pierce a\n shadow boundary, but the `--l-form-control-*` tokens this rule relies on DO\n inherit across shadow roots.\n\n Shadow consumers must emit the class via `cls('checkbox')`, never a static\n `class=\"l-checkbox\"` literal. This file ships to dist as a real CSS file and\n is imported `?inline`, so the CONSUMER's Vite runs postcss-plugin-prefix over\n it and rewrites this selector to `.<cssPrefix>-checkbox`. The vite-plugin's\n `transform` hook only rewrites `_cssPrefix` in registry.js — it never touches\n template literals in element JS — so a hardcoded class attribute would stop\n matching the rewritten selector and the checkbox would render unstyled.\n\n The checkmark / indeterminate dash are drawn with a `background-image` SVG on\n the input itself — `::before`/`::after` do not paint on replaced elements\n like `<input>`. `background-image` can't read the host's `currentColor`, so\n the glyph color is baked white. This stays legible because the accent\n (`--l-form-control-activated-color`) is a stable color that does not invert\n between light and dark. Override `--checkmark` to swap the icon. */\n\n@layer components {\n .l-checkbox,\n :where(l-form-field:not([unstyled])) > input[type='checkbox']:not([role='switch']) {\n /* Public knobs */\n --size: var(--l-form-control-toggle-size);\n --accent: var(--l-form-control-activated-color);\n --checkmark: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"white\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"/></svg>');\n --_dash: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"white\" stroke-width=\"2.5\" stroke-linecap=\"round\"><line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\"/></svg>');\n\n box-sizing: border-box;\n flex: 0 0 auto;\n inline-size: var(--size);\n block-size: var(--size);\n margin: 0;\n padding: 0;\n appearance: none;\n border: var(--l-form-control-border-width) solid var(--l-form-control-border-color);\n border-radius: calc(var(--size) * 0.2);\n background-color: var(--l-form-control-background-color);\n background-repeat: no-repeat;\n background-position: center;\n background-size: 75%;\n vertical-align: middle;\n cursor: pointer;\n transition-property: background-color, border-color;\n transition-duration: 150ms;\n\n &:checked,\n &:indeterminate {\n border-color: var(--accent);\n background-color: var(--accent);\n }\n\n &:checked {\n background-image: var(--checkmark);\n }\n\n &:indeterminate {\n background-image: var(--_dash);\n }\n\n @media (hover: hover) {\n &:hover:not(:disabled) {\n border-color: var(--l-form-control-border-color-hover);\n }\n }\n\n &:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n }\n\n /* High contrast: the checked fill is forced to Canvas, hiding the accent and\n leaving the baked-white glyph invisible — pin the checked box to a system\n color so the checkmark/dash stays legible. */\n @media (forced-colors: active) {\n &:checked,\n &:indeterminate {\n border-color: Highlight;\n background-color: Highlight;\n }\n\n &:disabled {\n border-color: GrayText;\n }\n\n &:disabled:is(:checked, :indeterminate) {\n background-color: GrayText;\n }\n }\n\n /* Invalid: only after interaction (`:user-invalid`), or forced via\n `aria-invalid` (set by `l-form-field` / server-side validation).\n Overriding `--accent` makes a checked invalid box fill with the error\n color too (not just the border). */\n &:user-invalid,\n &[aria-invalid='true'] {\n --accent: var(--l-form-control-border-color-invalid);\n border-color: var(--l-form-control-border-color-invalid);\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n /* Unchecked: the same three tokens as `input`/`select`/`textarea`, so a\n checkbox and an input in the same disabled form grey out identically.\n There is no mark here — only a box — so nothing can be washed out. */\n &:disabled:not(:checked, :indeterminate) {\n border-color: var(--l-form-control-border-color-disabled);\n background-color: var(--l-form-control-background-color-disabled);\n }\n\n /* Checked: faded rather than greyed. A solid neutral fill keeps the glyph\n crisp but reads as a styled, still-live control; the fade reads as\n \"inactive\" at a glance, which is the message that matters more here.\n The cost is measured and accepted: the checkmark drops to 1.85:1 against\n its own box, and the residual accent tint (1.81:1 against the page) is\n what carries \"this one is checked\". WCAG 1.4.11 exempts inactive\n components, so this is a deliberate trade, not a shortfall.\n\n It assumes the accent is dark enough for the baked-white glyph — the same\n assumption `--l-form-control-activated-color` already documents, and which\n the enabled state depends on just as much (a pale accent scores 1.31:1\n there, before anything is disabled). */\n &:disabled:is(:checked, :indeterminate) {\n opacity: 0.4;\n }\n\n /* Forced colors replaces author colors with the user's palette, so a fade\n would only dim a system color — the box is already GrayText up in the\n forced-colors block above. Placed here, after the fade, because it needs\n to win at equal specificity. */\n @media (forced-colors: active) {\n &:disabled:is(:checked, :indeterminate) {\n opacity: 1;\n }\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .l-checkbox,\n :where(l-form-field:not([unstyled])) > input[type='checkbox']:not([role='switch']) {\n transition-duration: 0ms;\n }\n }\n}\n");
|
|
37197
37197
|
// src/html/elements/tag/tag.ts
|
|
37198
|
-
var styles$6 = r$7("@layer components {\n :host {\n /* Size defaults (md). A removable tag is always ≥24px tall (target-size).\n The three public knobs are folded into the private vars here rather than\n at each use site, so an override also carries to what derives from them —\n the toggle's negative inline margins and the × button's spacing math. The\n trio mirrors `.l-button` (`--height` / `--padding-inline` / `--font-size`)\n so a chip can be tuned to a dense filter panel without ::part(base). */\n --_height: var(--height, 1.5rem);\n --_font-size: var(--font-size, var(--l-text-xs));\n --_padding-inline: var(--padding-inline, 0.5rem);\n --_gap: 0.25rem;\n\n /* Skin, resolved once so `[selected]` can swap all three at the source\n instead of re-declaring the properties that consume them. */\n --_background: var(--background-color, var(--l-color-bg-fill-neutral-subtle));\n --_color: var(--text-color, var(--l-color-text-neutral));\n --_border-strength: 14%;\n /* By default the line is a tint of the ink, so a chip stays coherent under\n any `--text-color` with one declaration. `--border-color` replaces that\n derivation outright rather than shifting it: a consumer with a token\n system wants *its* line token, not a 14% mix of its text color — and\n wants it to hold in every state, which is why it is the fallback in both\n of the pair below rather than a value the hover rule mixes further.\n `--_border-strength` stays private. Selecting a chip swaps the pair\n wholesale, the same way it swaps the fill and the ink. */\n --_border-color: var(\n --border-color,\n color-mix(in oklab, currentColor var(--_border-strength), transparent)\n );\n --_border-color-hover: var(\n --border-color,\n color-mix(in oklab, currentColor calc(var(--_border-strength) + 12%), transparent)\n );\n /* Resolved here rather than at `.base`, because the × segment has to round\n its outer end to the same curve. */\n --_border-radius: var(--border-radius, var(--l-radius-full));\n --_remove-glyph: 0.75rem;\n\n display: inline-flex;\n vertical-align: middle;\n max-inline-size: 100%;\n }\n\n :host([size='sm']) {\n --_padding-inline: var(--padding-inline, 0.375rem);\n --_gap: 0.125rem;\n }\n\n :host([size='lg']) {\n --_height: var(--height, 1.75rem);\n --_font-size: var(--font-size, var(--l-text-sm));\n --_padding-inline: var(--padding-inline, 0.625rem);\n --_remove-glyph: 0.875rem;\n }\n\n /* Disabled is conveyed by the greyed × button + cursor, NOT by washing out\n * the label — dimming the whole chip with opacity composites the text below\n * the WCAG AA contrast floor (axe flags it; a disabled <button> is exempt but\n * the label span is not). */\n :host([disabled]) .base {\n cursor: not-allowed;\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅲🅷🅸🅿\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n .base {\n display: inline-flex;\n align-items: center;\n gap: var(--_gap);\n min-block-size: var(--_height);\n padding-inline: var(--_padding-inline);\n border: 1px solid var(--_border-color);\n border-radius: var(--_border-radius);\n background-color: var(--_background);\n color: var(--_color);\n font-family: var(--l-font-neo-grotesque);\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n min-inline-size: 0;\n transition:\n background-color 120ms ease,\n border-color 120ms ease;\n }\n\n /* The remove segment is exactly as tall as the chip, so the chip is where the\n target floor has to live: `--height` still tunes a removable chip, but not\n under the 24px minimum (WCAG 2.5.8). Without this the promise held only for\n the default value. */\n :host([removable]) .base {\n min-block-size: max(1.5rem, var(--_height));\n }\n\n /* Whole-chip hover — only on a chip that is *wholly* a control. A display chip\n has no target at all, and a removable one has exactly its × segment: tinting\n the label under the pointer there promises a click that does nothing, and on\n a filter bar it fights the segment for the eye. `[selectable]` also covers\n `control=\"checkbox\"`, which derives the attribute. */\n @media (hover: hover) {\n :host([selectable]:hover:not([disabled])) .base {\n background-color: color-mix(in oklab, var(--_background), currentColor 7%);\n border-color: var(--_border-color-hover);\n }\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n min-inline-size: 0;\n /* `.base` sets `line-height: 1` so the chip's height comes from its own size\n tokens rather than the document's leading. That makes the line box exactly\n one em tall, and a plain `overflow: hidden` then shears every descender\n (g, j, p, q, y) at all three sizes — measured 1px short.\n\n Fixed by clipping the inline axis only — the one the ellipsis needs — so\n nothing is ever cut vertically and the box keeps its exact geometry.\n Growing the line box instead (`line-height: normal`) moves the text half a\n pixel against the × and the prefix icon, since the font's ascent and\n descent are not symmetrical; widening the clip with\n `overflow-clip-margin` leaves Safari shearing the text (WebKit has no\n such property). `clip` — unlike `hidden` — lets the block axis stay\n `visible`. */\n overflow-x: clip;\n overflow-y: visible;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n ::slotted([slot='prefix']) {\n display: inline-flex;\n flex: none;\n }\n\n /* A count or trailing glyph. It sits in its own slot so `.base`'s gap gives it\n a gutter by construction — the label is a bare text node and can never be\n targeted from the outside. Lighter weight than the medium label, and\n tabular so a column of counts stays aligned. */\n ::slotted([slot='suffix']) {\n flex: none;\n font-weight: var(--l-font-weight-normal);\n font-variant-numeric: tabular-nums;\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆂🅴🅻🅴🅲🆃🅰🅱🅻🅴 (filter chip — toggle button, or a checkbox riding inside)\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n :host([selectable]) {\n /* Taller than a display chip at the same `size`: a chip you click is a\n target (WCAG 2.5.8), and this is the dense step between `sm` and `lg` —\n more room, same 12px label, where `lg` would jump the label to body size.\n `--height` / `--font-size` tune it from there. */\n --_height: var(--height, 1.75rem);\n\n /* The selection accent is the same one the library's checkbox, radio and\n switch use, so a chip with a checkbox inside reads as a single control. */\n --_accent: var(--l-form-control-activated-color);\n /* The label is 12px, so it owes 4.5:1 over its own tint — and the raw accent\n misses it on the light one (4.35:1 measured). Darken it there, lighten it\n on the dark tint, and both modes clear 6:1. `color-mix()` resolves\n reliably inside `light-dark()` — `oklch(from …)` does not. */\n --_selected-color: var(\n --selected-text-color,\n light-dark(\n color-mix(in oklab, var(--_accent), black 14%),\n color-mix(in oklab, var(--_accent), white 45%)\n )\n );\n /* Derived from the text color, so overriding `--selected-text-color` alone\n repaints the whole chip coherently. Kept at 10%: a consumer accent skips\n the mode correction above, so the tint has to stay pale enough for a\n semantic token (`--l-color-text-success` and friends) to clear 4.5:1 on\n it unaided. The border carries the rest of the emphasis. */\n --_selected-background: var(\n --selected-background-color,\n color-mix(in oklab, var(--_selected-color) 10%, var(--l-color-surface))\n );\n /* The third member of the trio, beside `--selected-text-color` and\n `--selected-background-color`. Selection already replaces the fill and the ink\n outright, so the line has to be replaceable the same way — without this,\n a chip that sets `--border-color` keeps that exact line when picked and\n the emphasis step that says \"selected\" never happens. 45% by default, the\n strength the derived line has always used here. */\n --_selected-border-color: var(\n --selected-border-color,\n color-mix(in oklab, var(--_selected-color) 45%, transparent)\n );\n }\n\n :host([selectable][size='lg']) {\n --_height: var(--height, 2rem);\n }\n\n :host([selectable][selected]) {\n --_background: var(--_selected-background);\n --_color: var(--_selected-color);\n --_border-color: var(--_selected-border-color);\n /* Same +12 step the resting line takes on hover, and pinned in the same way\n when the consumer supplies the value. */\n --_border-color-hover: var(\n --selected-border-color,\n color-mix(in oklab, var(--_selected-color) 57%, transparent)\n );\n }\n\n :host([selectable]) .base {\n cursor: pointer;\n /* A chip is tapped, not read: never leave a text selection behind a\n double-click on a filter. */\n -webkit-user-select: none;\n user-select: none;\n }\n\n :host([selectable][disabled]) .base {\n cursor: not-allowed;\n }\n\n /* The chip *is* the button. Negative inline margins let it cover `.base`'s\n padding so the whole pill is the target, while `.base` keeps owning the\n border, background, and the × button's spacing math. */\n .toggle {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n align-self: stretch;\n gap: var(--_gap);\n min-inline-size: 0;\n margin-inline: calc(var(--_padding-inline) * -1);\n padding-inline: var(--_padding-inline);\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: inherit;\n }\n\n /* Stop before the × instead of running under it. */\n :host([removable]) .toggle {\n margin-inline-end: 0;\n padding-inline-end: 0;\n }\n\n /* One ring for the whole chip: the inner control is a detail of how the chip\n is operated, not a second thing to focus visually — and the ring drawn\n below fully encloses the box, so the indicator only grows (WCAG 2.4.7 /\n 2.4.13).\n\n Qualified by `:host(…)` on purpose. The shared appearance nests\n `&:focus-visible` under a selector list, so it lands as\n `:is(.l-checkbox, … input[type='checkbox']:not(…)):focus-visible` — 0,3,1,\n which outranks a bare `.checkbox:focus-visible` (0,2,0) and paints a second\n ring around the box. `:host([selectable])` brings this to 0,4,0. */\n :host([selectable]) .toggle:focus-visible,\n :host([selectable]) .checkbox:focus-visible {\n outline: none;\n }\n\n .base:has(:is(.toggle, .checkbox):focus-visible) {\n outline: 2px solid var(--l-focus-ring);\n outline-offset: 2px;\n }\n\n /* The skin comes from the shared `.l-checkbox` appearance, applied through\n `cls('checkbox')` rather than a static class literal: `dist` ships that CSS\n as a real file, so a consumer's PostCSS rewrites its selector under a\n renamed `cssPrefix` — a baked `l-checkbox` in the template would stop\n matching it. This rule only carries what is specific to a chip.\n\n The shared appearance sizes the box in `em`, and a UA gives `<input>` its\n own font — inheriting the chip's makes the box track the `size` step. The\n accent follows the selected color, so a themed chip keeps its checkbox in\n the same hue. */\n .checkbox {\n --accent: var(--selected-text-color, var(--l-form-control-activated-color));\n /* Hover halo — same ratio and same token flip as the light-DOM\n `.l-checkbox`, which keeps this rule out of the shared partial (see\n `css/elements/checkbox.css`). Repeated here rather than moved into the\n partial: `l-tree-item` shares that file and never opted into a glow. */\n --_halo: var(--l-form-control-border-color-hover);\n\n flex: none;\n font: inherit;\n transition-property: background-color, border-color, box-shadow;\n }\n\n .checkbox:checked,\n .checkbox:indeterminate {\n --_halo: var(--accent);\n }\n\n /* Driven by the chip, not by the box: the chip is the label and the whole\n click target, so a halo lighting up only over 15px of a 28px pill would\n read as a glitch. */\n @media (hover: hover) {\n :host([selectable]:not([disabled])) .base:hover .checkbox:not(:disabled) {\n box-shadow: 0 0 0 calc(var(--size) * var(--l-form-control-toggle-halo-ratio))\n color-mix(in oklab, var(--_halo), transparent 84%);\n }\n }\n\n /* Forced colors drop the tint (backgrounds are forced to Canvas), so pin the\n border to the system highlight — otherwise selection becomes invisible. */\n @media (forced-colors: active) {\n :host([selectable][selected]) .base {\n border-color: Highlight;\n }\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆁🅴🅼🅾🆅🅴 (≥24px target-size, mdi:close mask — mirrors l-close)\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n .remove {\n flex: none;\n display: grid;\n place-items: center;\n /* Full height, and split off by a rule: the affordance is drawn *at rest*\n rather than conjured on hover. Keyboard and touch users never get a hover\n state, and a filter bar of chips whose delete zone only appears under the\n pointer is a row of faint marks until you go hunting. */\n align-self: stretch;\n /* Square, and never under the 24px hit target (WCAG 2.5.8) however a\n consumer tunes `--height`. */\n inline-size: max(1.5rem, var(--_height));\n /* The segment spans `.base`'s *border* box, not its content box: the −1px\n block margins cancel the border on each side (a stretched flex item is\n sized by the line minus its own margins), which both lands the target on\n a full 24px — 22px otherwise, one short — and runs the rule edge to edge\n so it meets the chip's own border instead of stopping just inside it. */\n margin-block: -1px;\n /* End: flush to the chip's inner edge. Start: pushed off the label so it\n gets the same air on both sides. `.base`'s `gap` spaces *slotted items*\n (icon ↔ label) and is deliberately tighter than the chip's padding, so\n letting it also front the rule left the label with 8px on its left and\n 4px on its right — visibly crammed against the divider. This tops the gap\n back up to a full `--_padding-inline`, at every size. */\n margin-inline: calc(var(--_padding-inline) - var(--_gap))\n calc(var(--_padding-inline) * -1 - 1px);\n padding: 0;\n /* Transparent on three sides, so `background-clip` below keeps the hover\n fill off the 1px the chip's own border occupies. */\n border: 1px solid transparent;\n border-inline-start-color: var(--_border-color);\n /* The chip's own curve — the padding box rounds to one pixel less on its\n own, so the fill stops on the arc rather than squaring off the pill. */\n border-start-end-radius: var(--_border-radius);\n border-end-end-radius: var(--_border-radius);\n background-color: transparent;\n background-clip: padding-box;\n color: inherit;\n cursor: pointer;\n transition: background-color 120ms ease;\n /* The press dip goes through a variable so the reduced-motion block can\n cancel it by re-declaring *this* one line. Pairing the two `:active`\n selectors instead is a trap: the override only wins on source order while\n the specificities tie, and adding the `:not(:disabled)` guard below was\n enough to silently break it. */\n --_press-scale: 0.86;\n\n &::after {\n content: '';\n inline-size: var(--_remove-glyph);\n block-size: var(--_remove-glyph);\n background-color: currentColor;\n transition: scale 120ms ease;\n /* https://pictogrammers.com/library/mdi/icon/close */\n mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" /></svg>')\n center / contain no-repeat;\n }\n\n /* The whole segment fills. The chip already tints under the pointer (7%),\n so this has to read as the stronger of the two — it is what will actually\n be clicked. */\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background-color: color-mix(in oklab, transparent, currentColor 12%);\n }\n }\n\n &:active:not(:disabled) {\n background-color: color-mix(in oklab, transparent, currentColor 22%);\n }\n\n /* The glyph dips, not the segment: scaling the box would shrink the rule\n and pull it away from the chip's border. */\n &:active:not(:disabled)::after {\n scale: var(--_press-scale);\n }\n\n /* Inset, unlike the library's usual +2px: the segment is flush with the\n chip's border on three sides, so an outset ring would sit half outside\n the chip and clip against its neighbour in a wrapped filter bar. */\n &:focus-visible {\n outline: 2px solid var(--l-focus-ring);\n outline-offset: -2px;\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n /* `background-color` is forced to Canvas in high contrast, which would erase\n a masked glyph entirely — repaint it in the system button color. */\n @media (forced-colors: active) {\n &::after {\n background-color: ButtonText;\n }\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .base,\n .checkbox,\n .remove,\n .remove::after {\n transition-duration: 0ms;\n }\n .remove {\n --_press-scale: 1;\n }\n }\n}\n");
|
|
37198
|
+
var styles$6 = r$7("@layer components {\n :host {\n /* Size defaults (md). A removable tag is always ≥24px tall (target-size).\n The three public knobs are folded into the private vars here rather than\n at each use site, so an override also carries to what derives from them —\n the toggle's negative inline margins and the × button's spacing math. The\n trio mirrors `.l-button` (`--height` / `--padding-inline` / `--font-size`)\n so a chip can be tuned to a dense filter panel without ::part(base). */\n --_height: var(--height, 1.5rem);\n --_font-size: var(--font-size, var(--l-text-xs));\n --_padding-inline: var(--padding-inline, 0.5rem);\n --_gap: 0.25rem;\n\n /* Skin, resolved once so `[selected]` can swap all three at the source\n instead of re-declaring the properties that consume them. */\n --_background: var(--background-color, var(--l-color-bg-fill-neutral-subtle));\n --_color: var(--text-color, var(--l-color-text-neutral));\n --_border-strength: 14%;\n /* By default the line is a tint of the ink, so a chip stays coherent under\n any `--text-color` with one declaration. `--border-color` replaces that\n derivation outright rather than shifting it: a consumer with a token\n system wants *its* line token, not a 14% mix of its text color — and\n wants it to hold in every state, which is why it is the fallback in both\n of the pair below rather than a value the hover rule mixes further.\n `--_border-strength` stays private. Selecting a chip swaps the pair\n wholesale, the same way it swaps the fill and the ink. */\n --_border-color: var(\n --border-color,\n color-mix(in oklab, currentColor var(--_border-strength), transparent)\n );\n --_border-color-hover: var(\n --border-color,\n color-mix(in oklab, currentColor calc(var(--_border-strength) + 12%), transparent)\n );\n /* Resolved here rather than at `.base`, because the × segment has to round\n its outer end to the same curve. */\n --_border-radius: var(--border-radius, var(--l-radius-full));\n --_remove-glyph: 0.75rem;\n\n display: inline-flex;\n vertical-align: middle;\n max-inline-size: 100%;\n }\n\n :host([size='sm']) {\n --_padding-inline: var(--padding-inline, 0.375rem);\n --_gap: 0.125rem;\n }\n\n :host([size='lg']) {\n --_height: var(--height, 1.75rem);\n --_font-size: var(--font-size, var(--l-text-sm));\n --_padding-inline: var(--padding-inline, 0.625rem);\n --_remove-glyph: 0.875rem;\n }\n\n /* Disabled is conveyed by the greyed × button + cursor, NOT by washing out\n * the label — dimming the whole chip with opacity composites the text below\n * the WCAG AA contrast floor (axe flags it; a disabled <button> is exempt but\n * the label span is not). */\n :host([disabled]) .base {\n cursor: not-allowed;\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🅲🅷🅸🅿\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n .base {\n display: inline-flex;\n align-items: center;\n gap: var(--_gap);\n min-block-size: var(--_height);\n padding-inline: var(--_padding-inline);\n border: 1px solid var(--_border-color);\n border-radius: var(--_border-radius);\n background-color: var(--_background);\n color: var(--_color);\n font-family: var(--l-font-neo-grotesque);\n font-size: var(--_font-size);\n font-weight: var(--l-font-weight-medium);\n line-height: 1;\n min-inline-size: 0;\n transition:\n background-color 120ms ease,\n border-color 120ms ease;\n }\n\n /* The remove segment is exactly as tall as the chip, so the chip is where the\n target floor has to live: `--height` still tunes a removable chip, but not\n under the 24px minimum (WCAG 2.5.8). Without this the promise held only for\n the default value. */\n :host([removable]) .base {\n min-block-size: max(1.5rem, var(--_height));\n }\n\n /* Whole-chip hover — only on a chip that is *wholly* a control. A display chip\n has no target at all, and a removable one has exactly its × segment: tinting\n the label under the pointer there promises a click that does nothing, and on\n a filter bar it fights the segment for the eye. `[selectable]` also covers\n `control=\"checkbox\"`, which derives the attribute. */\n @media (hover: hover) {\n :host([selectable]:hover:not([disabled])) .base {\n background-color: color-mix(in oklab, var(--_background), currentColor 7%);\n border-color: var(--_border-color-hover);\n }\n }\n\n .content {\n display: inline-flex;\n align-items: center;\n min-inline-size: 0;\n /* `.base` sets `line-height: 1` so the chip's height comes from its own size\n tokens rather than the document's leading. That makes the line box exactly\n one em tall, and a plain `overflow: hidden` then shears every descender\n (g, j, p, q, y) at all three sizes — measured 1px short.\n\n Fixed by clipping the inline axis only — the one the ellipsis needs — so\n nothing is ever cut vertically and the box keeps its exact geometry.\n Growing the line box instead (`line-height: normal`) moves the text half a\n pixel against the × and the prefix icon, since the font's ascent and\n descent are not symmetrical; widening the clip with\n `overflow-clip-margin` leaves Safari shearing the text (WebKit has no\n such property). `clip` — unlike `hidden` — lets the block axis stay\n `visible`. */\n overflow-x: clip;\n overflow-y: visible;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n ::slotted([slot='prefix']) {\n display: inline-flex;\n flex: none;\n }\n\n /* A count or trailing glyph. It sits in its own slot so `.base`'s gap gives it\n a gutter by construction — the label is a bare text node and can never be\n targeted from the outside. Lighter weight than the medium label, and\n tabular so a column of counts stays aligned. */\n ::slotted([slot='suffix']) {\n flex: none;\n font-weight: var(--l-font-weight-normal);\n font-variant-numeric: tabular-nums;\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆂🅴🅻🅴🅲🆃🅰🅱🅻🅴 (filter chip — toggle button, or a checkbox riding inside)\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n :host([selectable]) {\n /* Taller than a display chip at the same `size`: a chip you click is a\n target (WCAG 2.5.8), and this is the dense step between `sm` and `lg` —\n more room, same 12px label, where `lg` would jump the label to body size.\n `--height` / `--font-size` tune it from there. */\n --_height: var(--height, 1.75rem);\n\n /* The selection accent is the same one the library's checkbox, radio and\n switch use, so a chip with a checkbox inside reads as a single control. */\n --_accent: var(--l-form-control-activated-color);\n /* The label is 12px, so it owes 4.5:1 over its own tint — and the raw accent\n misses it on the light one (4.35:1 measured). Darken it there, lighten it\n on the dark tint, and both modes clear 6:1. `color-mix()` resolves\n reliably inside `light-dark()` — `oklch(from …)` does not. */\n --_selected-color: var(\n --selected-text-color,\n light-dark(\n color-mix(in oklab, var(--_accent), black 14%),\n color-mix(in oklab, var(--_accent), white 45%)\n )\n );\n /* Derived from the text color, so overriding `--selected-text-color` alone\n repaints the whole chip coherently. Kept at 10%: a consumer accent skips\n the mode correction above, so the tint has to stay pale enough for a\n semantic token (`--l-color-text-success` and friends) to clear 4.5:1 on\n it unaided. The border carries the rest of the emphasis. */\n --_selected-background: var(\n --selected-background-color,\n color-mix(in oklab, var(--_selected-color) 10%, var(--l-color-surface))\n );\n /* The third member of the trio, beside `--selected-text-color` and\n `--selected-background-color`. Selection already replaces the fill and the ink\n outright, so the line has to be replaceable the same way — without this,\n a chip that sets `--border-color` keeps that exact line when picked and\n the emphasis step that says \"selected\" never happens. 45% by default, the\n strength the derived line has always used here. */\n --_selected-border-color: var(\n --selected-border-color,\n color-mix(in oklab, var(--_selected-color) 45%, transparent)\n );\n }\n\n :host([selectable][size='lg']) {\n --_height: var(--height, 2rem);\n }\n\n :host([selectable][selected]) {\n --_background: var(--_selected-background);\n --_color: var(--_selected-color);\n --_border-color: var(--_selected-border-color);\n /* Same +12 step the resting line takes on hover, and pinned in the same way\n when the consumer supplies the value. */\n --_border-color-hover: var(\n --selected-border-color,\n color-mix(in oklab, var(--_selected-color) 57%, transparent)\n );\n }\n\n :host([selectable]) .base {\n cursor: pointer;\n /* A chip is tapped, not read: never leave a text selection behind a\n double-click on a filter. */\n -webkit-user-select: none;\n user-select: none;\n }\n\n :host([selectable][disabled]) .base {\n cursor: not-allowed;\n }\n\n /* The chip *is* the button. Negative inline margins let it cover `.base`'s\n padding so the whole pill is the target, while `.base` keeps owning the\n border, background, and the × button's spacing math. */\n .toggle {\n flex: 1 1 auto;\n display: inline-flex;\n align-items: center;\n align-self: stretch;\n gap: var(--_gap);\n min-inline-size: 0;\n margin-inline: calc(var(--_padding-inline) * -1);\n padding-inline: var(--_padding-inline);\n border: 0;\n background: none;\n color: inherit;\n font: inherit;\n text-align: start;\n cursor: inherit;\n }\n\n /* Stop before the × instead of running under it. */\n :host([removable]) .toggle {\n margin-inline-end: 0;\n padding-inline-end: 0;\n }\n\n /* One ring for the whole chip: the inner control is a detail of how the chip\n is operated, not a second thing to focus visually — and the ring drawn\n below fully encloses the box, so the indicator only grows (WCAG 2.4.7 /\n 2.4.13).\n\n Qualified by `:host(…)` on purpose. The shared appearance nests\n `&:focus-visible` under a selector list, so it lands as\n `:is(.l-checkbox, … input[type='checkbox']:not(…)):focus-visible` — 0,3,1,\n which outranks a bare `.checkbox:focus-visible` (0,2,0) and paints a second\n ring around the box. `:host([selectable])` brings this to 0,4,0. */\n :host([selectable]) .toggle:focus-visible,\n :host([selectable]) .checkbox:focus-visible {\n outline: none;\n }\n\n .base:has(:is(.toggle, .checkbox):focus-visible) {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n }\n\n /* The skin comes from the shared `.l-checkbox` appearance, applied through\n `cls('checkbox')` rather than a static class literal: `dist` ships that CSS\n as a real file, so a consumer's PostCSS rewrites its selector under a\n renamed `cssPrefix` — a baked `l-checkbox` in the template would stop\n matching it. This rule only carries what is specific to a chip.\n\n The shared appearance sizes the box in `em`, and a UA gives `<input>` its\n own font — inheriting the chip's makes the box track the `size` step. The\n accent follows the selected color, so a themed chip keeps its checkbox in\n the same hue. */\n .checkbox {\n --accent: var(--selected-text-color, var(--l-form-control-activated-color));\n /* Hover halo — same ratio and same token flip as the light-DOM\n `.l-checkbox`, which keeps this rule out of the shared partial (see\n `css/elements/checkbox.css`). Repeated here rather than moved into the\n partial: `l-tree-item` shares that file and never opted into a glow. */\n --_halo: var(--l-form-control-border-color-hover);\n\n flex: none;\n font: inherit;\n transition-property: background-color, border-color, box-shadow;\n }\n\n .checkbox:checked,\n .checkbox:indeterminate {\n --_halo: var(--accent);\n }\n\n /* Driven by the chip, not by the box: the chip is the label and the whole\n click target, so a halo lighting up only over 15px of a 28px pill would\n read as a glitch. */\n @media (hover: hover) {\n :host([selectable]:not([disabled])) .base:hover .checkbox:not(:disabled) {\n box-shadow: 0 0 0 calc(var(--size) * var(--l-form-control-toggle-halo-ratio))\n color-mix(in oklab, var(--_halo), transparent 84%);\n }\n }\n\n /* Forced colors drop the tint (backgrounds are forced to Canvas), so pin the\n border to the system highlight — otherwise selection becomes invisible. */\n @media (forced-colors: active) {\n :host([selectable][selected]) .base {\n border-color: Highlight;\n }\n }\n\n /*\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n 🆁🅴🅼🅾🆅🅴 (≥24px target-size, mdi:close mask — mirrors l-close)\n ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\n */\n\n .remove {\n flex: none;\n display: grid;\n place-items: center;\n /* Full height, and split off by a rule: the affordance is drawn *at rest*\n rather than conjured on hover. Keyboard and touch users never get a hover\n state, and a filter bar of chips whose delete zone only appears under the\n pointer is a row of faint marks until you go hunting. */\n align-self: stretch;\n /* Square, and never under the 24px hit target (WCAG 2.5.8) however a\n consumer tunes `--height`. */\n inline-size: max(1.5rem, var(--_height));\n /* The segment spans `.base`'s *border* box, not its content box: the −1px\n block margins cancel the border on each side (a stretched flex item is\n sized by the line minus its own margins), which both lands the target on\n a full 24px — 22px otherwise, one short — and runs the rule edge to edge\n so it meets the chip's own border instead of stopping just inside it. */\n margin-block: -1px;\n /* End: flush to the chip's inner edge. Start: pushed off the label so it\n gets the same air on both sides. `.base`'s `gap` spaces *slotted items*\n (icon ↔ label) and is deliberately tighter than the chip's padding, so\n letting it also front the rule left the label with 8px on its left and\n 4px on its right — visibly crammed against the divider. This tops the gap\n back up to a full `--_padding-inline`, at every size. */\n margin-inline: calc(var(--_padding-inline) - var(--_gap))\n calc(var(--_padding-inline) * -1 - 1px);\n padding: 0;\n /* Transparent on three sides, so `background-clip` below keeps the hover\n fill off the 1px the chip's own border occupies. */\n border: 1px solid transparent;\n border-inline-start-color: var(--_border-color);\n /* The chip's own curve — the padding box rounds to one pixel less on its\n own, so the fill stops on the arc rather than squaring off the pill. */\n border-start-end-radius: var(--_border-radius);\n border-end-end-radius: var(--_border-radius);\n background-color: transparent;\n background-clip: padding-box;\n color: inherit;\n cursor: pointer;\n transition: background-color 120ms ease;\n /* The press dip goes through a variable so the reduced-motion block can\n cancel it by re-declaring *this* one line. Pairing the two `:active`\n selectors instead is a trap: the override only wins on source order while\n the specificities tie, and adding the `:not(:disabled)` guard below was\n enough to silently break it. */\n --_press-scale: 0.86;\n\n &::after {\n content: '';\n inline-size: var(--_remove-glyph);\n block-size: var(--_remove-glyph);\n background-color: currentColor;\n transition: scale 120ms ease;\n /* https://pictogrammers.com/library/mdi/icon/close */\n mask: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z\" /></svg>')\n center / contain no-repeat;\n }\n\n /* The whole segment fills. The chip already tints under the pointer (7%),\n so this has to read as the stronger of the two — it is what will actually\n be clicked. */\n @media (hover: hover) {\n &:hover:not(:disabled) {\n background-color: color-mix(in oklab, transparent, currentColor 12%);\n }\n }\n\n &:active:not(:disabled) {\n background-color: color-mix(in oklab, transparent, currentColor 22%);\n }\n\n /* The glyph dips, not the segment: scaling the box would shrink the rule\n and pull it away from the chip's border. */\n &:active:not(:disabled)::after {\n scale: var(--_press-scale);\n }\n\n /* Inset, unlike the library's usual +2px: the segment is flush with the\n chip's border on three sides, so an outset ring would sit half outside\n the chip and clip against its neighbour in a wrapped filter bar. */\n &:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: calc(var(--l-focus-ring-width) * -1);\n }\n\n &:disabled {\n cursor: not-allowed;\n opacity: 0.4;\n }\n\n /* `background-color` is forced to Canvas in high contrast, which would erase\n a masked glyph entirely — repaint it in the system button color. */\n @media (forced-colors: active) {\n &::after {\n background-color: ButtonText;\n }\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .base,\n .checkbox,\n .remove,\n .remove::after {\n transition-duration: 0ms;\n }\n .remove {\n --_press-scale: 1;\n }\n }\n}\n");
|
|
37199
37199
|
/**
|
|
37200
37200
|
* Fired when the user asks to remove the tag — clicking the × button, or
|
|
37201
37201
|
* pressing Backspace/Delete while it is focused. Cancelable: call
|
|
@@ -39648,7 +39648,7 @@ __decorate([n$5()], Tooltip.prototype, "trigger", null);
|
|
|
39648
39648
|
// src/html/elements/tooltip/index.ts
|
|
39649
39649
|
define("tooltip", Tooltip);
|
|
39650
39650
|
// src/html/elements/tree/tree.ts
|
|
39651
|
-
var styles$1 = r$7(":host {\n --indent-size: 1rem;\n --indent-guide-width: 1px;\n --indent-guide-style: solid;\n --indent-guide-color: var(--l-color-border-interactive);\n --row-height: 1.75rem;\n --row-padding-inline: 0.25rem;\n --chevron-size: 1.125rem;\n --item-gap: 0.375rem;\n\n display: block;\n color: var(--l-color-text-primary);\n font-family: inherit;\n line-height: 1.5;\n}\n\n.tree {\n display: block;\n outline: none;\n}\n\n.tree:focus-visible {\n outline:
|
|
39651
|
+
var styles$1 = r$7(":host {\n --indent-size: 1rem;\n --indent-guide-width: 1px;\n --indent-guide-style: solid;\n --indent-guide-color: var(--l-color-border-interactive);\n --row-height: 1.75rem;\n --row-padding-inline: 0.25rem;\n --chevron-size: 1.125rem;\n --item-gap: 0.375rem;\n\n display: block;\n color: var(--l-color-text-primary);\n font-family: inherit;\n line-height: 1.5;\n}\n\n.tree {\n display: block;\n outline: none;\n}\n\n.tree:focus-visible {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 2px;\n border-radius: 0.375rem;\n}\n");
|
|
39652
39652
|
/** Fired when the tree's selected items change. */
|
|
39653
39653
|
var SelectionChangeEvent = class extends Event {
|
|
39654
39654
|
constructor(selection) {
|
|
@@ -40063,7 +40063,7 @@ define("tree", Tree);
|
|
|
40063
40063
|
}
|
|
40064
40064
|
});
|
|
40065
40065
|
// src/html/elements/tree-item/tree-item.ts
|
|
40066
|
-
var styles = r$7(":host {\n display: block;\n color: var(--l-color-text-primary);\n font-size: 0.875rem;\n line-height: 1.5;\n /* The host is the roving-tabindex focus target, but the visible ring is drawn\n on the inner `.item` row. Suppress the host's UA outline so it doesn't paint\n a second ring around the whole subtree (row + children). */\n outline: none;\n}\n\n:host([disabled]) {\n opacity: 0.4;\n}\n\n:host([disabled]) .item {\n cursor: not-allowed;\n}\n\n.item {\n display: flex;\n align-items: center;\n gap: var(--item-gap);\n min-block-size: var(--row-height);\n padding-inline: var(--row-padding-inline);\n padding-inline-start: calc(var(--indent-size) * var(--_depth, 0) + var(--row-padding-inline));\n border-radius: 0.375rem;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n transition:\n background-color 120ms ease,\n color 120ms ease;\n position: relative;\n}\n\n.item:focus-visible,\n:host(:focus-visible) .item {\n outline:
|
|
40066
|
+
var styles = r$7(":host {\n display: block;\n color: var(--l-color-text-primary);\n font-size: 0.875rem;\n line-height: 1.5;\n /* The host is the roving-tabindex focus target, but the visible ring is drawn\n on the inner `.item` row. Suppress the host's UA outline so it doesn't paint\n a second ring around the whole subtree (row + children). */\n outline: none;\n}\n\n:host([disabled]) {\n opacity: 0.4;\n}\n\n:host([disabled]) .item {\n cursor: not-allowed;\n}\n\n.item {\n display: flex;\n align-items: center;\n gap: var(--item-gap);\n min-block-size: var(--row-height);\n padding-inline: var(--row-padding-inline);\n padding-inline-start: calc(var(--indent-size) * var(--_depth, 0) + var(--row-padding-inline));\n border-radius: 0.375rem;\n cursor: pointer;\n -webkit-user-select: none;\n user-select: none;\n transition:\n background-color 120ms ease,\n color 120ms ease;\n position: relative;\n}\n\n.item:focus-visible,\n:host(:focus-visible) .item {\n outline: var(--l-focus-ring-width) solid var(--l-focus-ring);\n outline-offset: 1px;\n}\n\n@media (hover: hover) {\n :host(:not([disabled])) .item:hover {\n background-color: var(--l-color-bg-state-hover);\n }\n}\n\n:host([selected]:not([disabled])) .item {\n background-color: var(--l-color-bg-state-selected);\n}\n\n.expand {\n inline-size: var(--chevron-size);\n block-size: var(--chevron-size);\n display: grid;\n place-items: center;\n flex: none;\n color: var(--l-color-text-secondary);\n border-radius: 3px;\n cursor: pointer;\n}\n\n/* Hide the DEFAULT fallback chevron SVG on a leaf — slotted content\n (user-provided icon, avatar, etc.) remains visible because it lives outside\n the slot in the DOM tree. The `.expand` span keeps its fixed --chevron-size\n so leaf rows stay aligned with branches. */\n:host(:not(:state(has-children)):not([lazy])) .expand > slot > svg {\n display: none;\n}\n\n.expand svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n/* The checkbox appearance comes from the shared `.l-checkbox` skin imported\n above; this rule only governs visibility. */\n:host(:not(:state(checkbox))) .checkbox {\n display: none;\n}\n\n.label {\n flex: 1;\n min-inline-size: 0;\n display: flex;\n align-items: center;\n gap: 0.375rem;\n /* The label truncates long text to an ellipsis, yet a slotted interactive\n control's hover/focus decoration (a row-action button, an `<l-dropdown>`\n trigger) must bleed past the row-height label box instead of being cut.\n\n Only the inline axis is clipped — `clip`, unlike `hidden`, lets the block\n axis stay `visible` — so nothing is ever cut above or below. On the inline\n axis the clip follows the padding box, so padding cancelled by an equal\n negative margin widens it without moving anything; it reaches exactly the\n row's own spacing (the gap before the label, the row padding after it), so\n the label never overlaps a sibling control, a neighbouring row, or the\n tree's edge. Growing the box on the block axis instead would spill into the\n rows above and below and steal their clicks; `overflow-clip-margin` would\n not, but WebKit has no such property. */\n overflow-x: clip;\n overflow-y: visible;\n padding-inline: var(--item-gap) var(--row-padding-inline);\n margin-inline: calc(-1 * var(--item-gap)) calc(-1 * var(--row-padding-inline));\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.label ::slotted(*) {\n min-inline-size: 0;\n}\n\n/* Wrapper around the content slot + children — anchor for the indent guide. */\n.branch {\n position: relative;\n}\n\n/* Content slot — block area between the row and the children.\n Aligned under the label text: same left offset as the row's label\n (depth indent + row padding + chevron + gap). Visible for leaves (no\n children) and for expanded branches; hidden when a branch is collapsed\n (mirrors the children visibility). */\n.content {\n display: block;\n padding-inline-start: calc(\n var(--indent-size) * var(--_depth, 0) + var(--row-padding-inline) + var(--chevron-size) +\n var(--item-gap)\n );\n padding-inline-end: var(--row-padding-inline);\n}\n\n:host(:state(has-children):not([expanded])) .content {\n display: none;\n}\n\n.children {\n display: none;\n}\n\n:host([expanded]) .children {\n display: block;\n}\n\n/* Vertical indent guide — spans the content + children block, starting\n right below the row so it never overlaps the chevron/avatar.\n The guide's visual centre sits exactly on the parent chevron's centre. */\n.branch::before {\n content: '';\n position: absolute;\n inset-block: 0;\n inset-inline-start: calc(\n var(--indent-size) * var(--_depth, 0) + var(--row-padding-inline) + (var(--chevron-size) / 2) -\n (var(--indent-guide-width) / 2)\n );\n inline-size: 0;\n border-inline-start: var(--indent-guide-width) var(--indent-guide-style) var(--indent-guide-color);\n pointer-events: none;\n}\n\n/* Only render the guide for open branches that have children. */\n:host(:not([expanded])) .branch::before,\n:host(:not(:state(has-children))) .branch::before {\n display: none;\n}\n\n.spinner {\n inline-size: 0.875rem;\n block-size: 0.875rem;\n border-radius: 50%;\n border: 2px solid var(--l-color-border);\n border-block-start-color: transparent;\n animation: spin 700ms linear infinite;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .spinner {\n animation: none;\n }\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n");
|
|
40067
40067
|
/** Fired when a tree item is expanded. Bubbles; not composed. */
|
|
40068
40068
|
var ExpandEvent = class extends Event {
|
|
40069
40069
|
constructor() {
|