@f-ewald/components 1.39.0 → 1.40.1
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/README.md +48 -0
- package/custom-elements.json +1179 -100
- package/dist/address-autocomplete.js +2 -2
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/app-shell.js +4 -4
- package/dist/app-shell.js.map +1 -1
- package/dist/app-sidebar.js +2 -2
- package/dist/app-sidebar.js.map +1 -1
- package/dist/audio-player.js +1 -1
- package/dist/audio-player.js.map +1 -1
- package/dist/autocomplete-input.js +2 -2
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/breadcrumb-nav.d.ts +87 -0
- package/dist/breadcrumb-nav.d.ts.map +1 -0
- package/dist/breadcrumb-nav.js +281 -0
- package/dist/breadcrumb-nav.js.map +1 -0
- package/dist/button-group.js +2 -2
- package/dist/button-group.js.map +1 -1
- package/dist/calendar-day.js +3 -3
- package/dist/calendar-day.js.map +1 -1
- package/dist/calendar-month.d.ts.map +1 -1
- package/dist/calendar-month.js +4 -1
- package/dist/calendar-month.js.map +1 -1
- package/dist/calendar-week.js +4 -4
- package/dist/calendar-week.js.map +1 -1
- package/dist/chat-message.js +1 -1
- package/dist/chat-message.js.map +1 -1
- package/dist/comment-composer.js +1 -1
- package/dist/comment-composer.js.map +1 -1
- package/dist/confirm-dialog.d.ts.map +1 -1
- package/dist/confirm-dialog.js +5 -2
- package/dist/confirm-dialog.js.map +1 -1
- package/dist/content-divider.js +1 -1
- package/dist/content-divider.js.map +1 -1
- package/dist/cron-schedule.d.ts.map +1 -1
- package/dist/cron-schedule.js +6 -5
- package/dist/cron-schedule.js.map +1 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +3 -2
- package/dist/data-table.js.map +1 -1
- package/dist/dropdown-button.d.ts.map +1 -1
- package/dist/dropdown-button.js +4 -2
- package/dist/dropdown-button.js.map +1 -1
- package/dist/editable-text.js +1 -1
- package/dist/editable-text.js.map +1 -1
- package/dist/empty-state.d.ts +58 -0
- package/dist/empty-state.d.ts.map +1 -0
- package/dist/empty-state.js +203 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/form-field.js +1 -1
- package/dist/form-field.js.map +1 -1
- package/dist/form-select.js +3 -3
- package/dist/form-select.js.map +1 -1
- package/dist/frame-box.js +1 -1
- package/dist/frame-box.js.map +1 -1
- package/dist/fullscreen-button.js +1 -1
- package/dist/fullscreen-button.js.map +1 -1
- package/dist/icons.d.ts +2 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +2 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/kanban-card.js +1 -1
- package/dist/kanban-card.js.map +1 -1
- package/dist/kanban-column.js +3 -3
- package/dist/kanban-column.js.map +1 -1
- package/dist/kbd-hint.d.ts.map +1 -1
- package/dist/kbd-hint.js +2 -1
- package/dist/kbd-hint.js.map +1 -1
- package/dist/link-card.js +1 -1
- package/dist/link-card.js.map +1 -1
- package/dist/markdown-view.js +3 -3
- package/dist/markdown-view.js.map +1 -1
- package/dist/modal-dialog.js +1 -1
- package/dist/modal-dialog.js.map +1 -1
- package/dist/multi-select.js +5 -5
- package/dist/multi-select.js.map +1 -1
- package/dist/pagination-nav.d.ts.map +1 -1
- package/dist/pagination-nav.js +5 -1
- package/dist/pagination-nav.js.map +1 -1
- package/dist/photo-gallery.js +1 -1
- package/dist/photo-gallery.js.map +1 -1
- package/dist/popover-panel.d.ts.map +1 -1
- package/dist/popover-panel.js +4 -2
- package/dist/popover-panel.js.map +1 -1
- package/dist/progress-bar.d.ts.map +1 -1
- package/dist/progress-bar.js +1 -0
- package/dist/progress-bar.js.map +1 -1
- package/dist/radio-cards.js +1 -1
- package/dist/radio-cards.js.map +1 -1
- package/dist/radio-pills.js +1 -1
- package/dist/radio-pills.js.map +1 -1
- package/dist/reveal-button.js +1 -1
- package/dist/reveal-button.js.map +1 -1
- package/dist/scroll-to-bottom.js +1 -1
- package/dist/scroll-to-bottom.js.map +1 -1
- package/dist/scroll-to-top.js +1 -1
- package/dist/scroll-to-top.js.map +1 -1
- package/dist/skip-link.d.ts +38 -0
- package/dist/skip-link.d.ts.map +1 -0
- package/dist/skip-link.js +184 -0
- package/dist/skip-link.js.map +1 -0
- package/dist/slide-panel.js +1 -1
- package/dist/slide-panel.js.map +1 -1
- package/dist/spec-list.d.ts +58 -0
- package/dist/spec-list.d.ts.map +1 -0
- package/dist/spec-list.js +226 -0
- package/dist/spec-list.js.map +1 -0
- package/dist/stat-meter.d.ts.map +1 -1
- package/dist/stat-meter.js +1 -0
- package/dist/stat-meter.js.map +1 -1
- package/dist/tab-bar.js +1 -1
- package/dist/tab-bar.js.map +1 -1
- package/dist/text-area.js +1 -1
- package/dist/text-area.js.map +1 -1
- package/dist/tile-grid.js +1 -1
- package/dist/tile-grid.js.map +1 -1
- package/dist/tokens.css +42 -1
- package/dist/tokens.d.ts +50 -0
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +136 -0
- package/dist/tokens.js.map +1 -1
- package/dist/tree-view.js +2 -2
- package/dist/tree-view.js.map +1 -1
- package/dist/ui-admonition.js +1 -1
- package/dist/ui-admonition.js.map +1 -1
- package/dist/ui-button.js +1 -1
- package/dist/ui-button.js.map +1 -1
- package/dist/video-player.js +1 -1
- package/dist/video-player.js.map +1 -1
- package/dist/vote-control.d.ts +40 -0
- package/dist/vote-control.d.ts.map +1 -0
- package/dist/vote-control.js +318 -0
- package/dist/vote-control.js.map +1 -0
- package/docs/address-autocomplete.md +1 -0
- package/docs/app-shell.md +1 -0
- package/docs/app-sidebar.md +1 -0
- package/docs/audio-player.md +1 -0
- package/docs/autocomplete-input.md +1 -0
- package/docs/breadcrumb-nav.md +70 -0
- package/docs/button-group.md +1 -0
- package/docs/calendar-day.md +1 -0
- package/docs/calendar-month.md +1 -0
- package/docs/calendar-week.md +1 -0
- package/docs/chat-message.md +1 -0
- package/docs/comment-composer.md +1 -0
- package/docs/confirm-dialog.md +1 -0
- package/docs/content-divider.md +1 -0
- package/docs/cron-schedule.md +2 -0
- package/docs/data-table.md +2 -0
- package/docs/design-language.md +57 -5
- package/docs/dropdown-button.md +1 -0
- package/docs/editable-text.md +1 -0
- package/docs/empty-state.md +60 -0
- package/docs/form-field.md +1 -0
- package/docs/form-select.md +1 -0
- package/docs/frame-box.md +1 -0
- package/docs/fullscreen-button.md +1 -0
- package/docs/icons.md +1 -0
- package/docs/kanban-card.md +1 -0
- package/docs/kanban-column.md +1 -0
- package/docs/kbd-hint.md +1 -0
- package/docs/link-card.md +1 -0
- package/docs/markdown-view.md +1 -0
- package/docs/modal-dialog.md +1 -0
- package/docs/multi-select.md +1 -0
- package/docs/pagination-nav.md +2 -0
- package/docs/photo-gallery.md +1 -0
- package/docs/popover-panel.md +1 -0
- package/docs/progress-bar.md +1 -0
- package/docs/radio-cards.md +1 -0
- package/docs/radio-pills.md +1 -0
- package/docs/reveal-button.md +1 -0
- package/docs/scroll-to-bottom.md +1 -0
- package/docs/scroll-to-top.md +1 -0
- package/docs/skip-link.md +61 -0
- package/docs/slide-panel.md +1 -0
- package/docs/spec-list.md +79 -0
- package/docs/stat-meter.md +1 -0
- package/docs/tab-bar.md +1 -0
- package/docs/text-area.md +1 -0
- package/docs/tile-grid.md +1 -0
- package/docs/tree-view.md +1 -0
- package/docs/ui-admonition.md +1 -0
- package/docs/ui-button.md +1 -0
- package/docs/video-player.md +1 -0
- package/docs/vote-control.md +73 -0
- package/llms.txt +212 -49
- package/package.json +1 -1
package/dist/form-field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../src/form-field.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,Q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;gBAC9C,CAAC,CAAC,OAAO;sBACL;YACV,CAAC,CAAC,OAAO;8BACS,IAAI,CAAC,aAAa;;UAEtC,OAAO;YACP,CAAC,CAAC,IAAI,CAAA,YAAY,IAAI,CAAC,UAAU,mBAAmB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;iBAC9G,OAAO;cACV;YACJ,CAAC,CAAC,OAAO;;KAEd,CAAC;IACJ,CAAC;CACF,CAAA;AA9Qa;IAAX,QAAQ,EAAE;wCAAY;AAEX;IAAX,QAAQ,EAAE;uCAAW;AAEV;IAAX,QAAQ,EAAE;wCAAY;AAEM;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAkB;AAG9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;gDAClD;AAGL;IADhB,qBAAqB,EAAE;oDAC2B;AAElC;IAAhB,KAAK,EAAE;gDAA6D;AACpD;IAAhB,KAAK,EAAE;kDAAiC;AAxQ9B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAugBrB","sourcesContent":["import { LitElement, css, html, nothing, type PropertyValues } from \"lit\";\nimport {\n customElement,\n property,\n queryAssignedElements,\n state,\n} from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport {\n formFieldControl,\n supportsFormFieldControl,\n type FormFieldControl,\n} from \"./utils/form-field-control.js\";\n\nlet instanceCount = 0;\nconst NATIVE_TEXT_INPUT_TYPES = new Set([\n \"date\",\n \"datetime-local\",\n \"email\",\n \"month\",\n \"number\",\n \"password\",\n \"search\",\n \"tel\",\n \"text\",\n \"time\",\n \"url\",\n \"week\",\n]);\n\n/**\n * Per-field wrapper for a form control: label, slotted control, and an\n * optional hint or error message, in one consistent unit repeated across a\n * form. Purely presentational — composes whatever control is slotted\n * (`form-select`, `multi-select`, `autocomplete-input`, `ui-checkbox`, etc.)\n * without intercepting its events or value.\n *\n * Set `floating-label` for supported text controls (`input`, `textarea`,\n * `autocomplete-input`, `address-autocomplete`, and `text-area`). The label\n * then rests inside an empty field and moves to a smaller top-left position\n * while focused or non-empty. Other controls keep the external label.\n *\n * The label wraps the default slot for a best-effort visual/click\n * association only: every existing value-entry control encapsulates its\n * real `<input>` inside its own shadow DOM, so there is no light-DOM `id` a\n * `for` attribute could target from outside, and this component cannot set\n * `aria-describedby`/`aria-invalid` on an arbitrary slotted control's\n * shadow-encapsulated input for the same reason. The error message uses\n * `role=\"alert\"` as the practical accessibility mitigation instead of true\n * `aria-describedby` association.\n *\n * @element form-field\n * @slot - The wrapped form control.\n */\n@customElement(\"form-field\")\nexport class FormField extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n .control-label {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n .label-text {\n display: flex;\n align-items: baseline;\n gap: 0.25rem;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text, #0f172a);\n }\n .control-label.floating-native {\n position: relative;\n display: block;\n border-radius: var(--ui-radius-sm, 0.25rem);\n background: var(--ui-surface, #ffffff);\n box-shadow: inset 0 0 0 1px var(--ui-border, #e2e8f0);\n }\n .control-label.floating-native:focus-within {\n box-shadow:\n inset 0 0 0 1px var(--ui-primary, #4f46e5),\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .control-label.floating-native .label-text {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n right: 0.75rem;\n z-index: 1;\n overflow: hidden;\n transform: translateY(-50%);\n color: var(--ui-text-muted, #64748b);\n font-weight: var(--ui-font-weight-regular, 400);\n white-space: nowrap;\n text-overflow: ellipsis;\n cursor: text;\n transition:\n top 150ms ease,\n transform 150ms ease,\n font-size 150ms ease;\n }\n .control-label.floating-native.multiline .label-text {\n top: 0.25rem;\n transform: none;\n }\n .control-label.floating-native.has-value .label-text,\n .control-label.floating-native:focus-within .label-text {\n top: 0.25rem;\n transform: none;\n font-size: var(--ui-font-size-xs, 0.6875rem);\n }\n .control-label.floating-native ::slotted(input),\n .control-label.floating-native ::slotted(textarea) {\n display: block;\n box-sizing: border-box;\n width: 100%;\n min-height: 3rem;\n margin: 0;\n /*\n * !important below survives a host page's own global element reset\n * (e.g. Tailwind v4's layered preflight): a slotted control is real\n * light-DOM content, so the host page's own rules for \"input\"/\n * \"textarea\" compete directly against ::slotted() here, and in\n * practice win over it at equal-or-lower specificity despite living\n * in a CSS layer, since ::slotted() rules cross a shadow boundary.\n */\n padding: 1.25rem 0.75rem 0.25rem !important;\n border: 0 !important;\n border-radius: var(--ui-radius-sm, 0.25rem) !important;\n color: var(--ui-text, #0f172a) !important;\n background: transparent !important;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n ) !important;\n font-size: var(--ui-font-size, 0.875rem) !important;\n line-height: var(--ui-line-height-tight, 1.25) !important;\n }\n .control-label.floating-native ::slotted(input) {\n height: 3rem;\n }\n .control-label.floating-native ::slotted(textarea) {\n padding-bottom: 0.5rem !important;\n resize: vertical;\n }\n .control-label.floating-native.multiline ::slotted(textarea) {\n padding-top: 1.5rem !important;\n }\n .control-label.floating-native ::slotted(input:focus-visible),\n .control-label.floating-native ::slotted(textarea:focus-visible) {\n outline: none;\n }\n .control-label.floating-native ::slotted(input:disabled),\n .control-label.floating-native ::slotted(textarea:disabled) {\n cursor: not-allowed;\n opacity: 0.6 !important;\n }\n .control-label.floating-native:has(:disabled) .label-text {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .control-label.floating-native ::slotted(input:-webkit-autofill) {\n animation: form-field-autofill 0.001s;\n }\n .control-label:not(.floating-native) ::slotted(input),\n .control-label:not(.floating-native) ::slotted(textarea) {\n display: block;\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n /* See the !important note on the floating-native rule above. */\n padding: 0.5rem 0.75rem !important;\n border: 1px solid var(--ui-border, #e2e8f0) !important;\n border-radius: var(--ui-radius-sm, 0.25rem) !important;\n color: var(--ui-text, #0f172a) !important;\n background: var(--ui-surface, #ffffff) !important;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n ) !important;\n font-size: var(--ui-font-size, 0.875rem) !important;\n line-height: var(--ui-line-height-normal, 1.5) !important;\n }\n .control-label:not(.floating-native) ::slotted(input) {\n height: 2rem;\n }\n .control-label:not(.floating-native) ::slotted(textarea) {\n resize: vertical;\n }\n .control-label:not(.floating-native) ::slotted(input:focus-visible),\n .control-label:not(.floating-native) ::slotted(textarea:focus-visible) {\n outline: none;\n border-color: var(--ui-primary, #4f46e5) !important;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .control-label:not(.floating-native) ::slotted(input:disabled),\n .control-label:not(.floating-native) ::slotted(textarea:disabled) {\n cursor: not-allowed;\n opacity: 0.6 !important;\n }\n .required-mark {\n color: var(--ui-danger, #dc2626);\n }\n .message {\n font-size: var(--ui-font-size-xs, 0.6875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text-muted, #64748b);\n }\n .message.error {\n color: var(--ui-danger, #dc2626);\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n @media (prefers-reduced-motion: reduce) {\n .control-label.floating-native .label-text {\n transition: none;\n }\n }\n @keyframes form-field-autofill {\n from {\n opacity: 1;\n }\n to {\n opacity: 1;\n }\n }\n @media (forced-colors: active) {\n .control-label.floating-native {\n border: 1px solid CanvasText;\n box-shadow: none;\n }\n .control-label.floating-native:focus-within {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .control-label.floating-native ::slotted(input:disabled),\n .control-label.floating-native ::slotted(textarea:disabled),\n .control-label.floating-native:has(:disabled) .label-text {\n color: GrayText !important;\n opacity: 1 !important;\n }\n .control-label:not(.floating-native) ::slotted(input),\n .control-label:not(.floating-native) ::slotted(textarea) {\n border-color: CanvasText !important;\n }\n .control-label:not(.floating-native) ::slotted(input:focus-visible),\n .control-label:not(.floating-native) ::slotted(textarea:focus-visible) {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .control-label:not(.floating-native) ::slotted(input:disabled),\n .control-label:not(.floating-native) ::slotted(textarea:disabled) {\n color: GrayText !important;\n opacity: 1 !important;\n }\n }\n `,\n ];\n\n /** Field label text. */\n @property() label = \"\";\n /** Optional helper text shown below the control when there's no `error`. */\n @property() hint = \"\";\n /** Optional error text; replaces the `hint` display when non-empty. */\n @property() error = \"\";\n /** Shows a required indicator next to the label. */\n @property({ type: Boolean }) required = false;\n /** Moves labels inside supported text controls until they receive focus or content. */\n @property({ type: Boolean, reflect: true, attribute: \"floating-label\" })\n floatingLabel = false;\n\n @queryAssignedElements()\n private readonly _assignedElements!: HTMLElement[];\n\n @state() private _floatingKind: \"delegated\" | \"native\" | null = null;\n @state() private _nativeHasValue = false;\n\n readonly #messageId = `form-field-message-${++instanceCount}`;\n #configuredControls = new Set<FormFieldControl>();\n #resetForm: HTMLFormElement | null = null;\n #placeholderControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #placeholder = \"\";\n #accessibleNameControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #accessibleName: string | null = null;\n #nativeEventControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #nativeFocused = false;\n readonly #onNativeValueChange = () => this._onControlValueChange();\n readonly #onNativeFocus = () => this._onControlFocusIn();\n readonly #onNativeBlur = () => this._onControlFocusOut();\n readonly #onNativeAnimation = (event: Event) => {\n if (event instanceof AnimationEvent) this._onNativeAnimationStart(event);\n };\n readonly #onFormReset = () => {\n window.setTimeout(() => {\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n });\n };\n\n /** Synchronizes label configuration after the component first renders. */\n protected override firstUpdated(): void {\n this.#syncControls();\n }\n\n /** Resynchronizes delegated controls when public label configuration changes. */\n protected override updated(changed: PropertyValues<this>): void {\n if (\n changed.has(\"label\") ||\n changed.has(\"required\") ||\n changed.has(\"floatingLabel\")\n ) {\n this.#syncControls();\n }\n }\n\n /** Removes delegated configuration and form listeners when disconnected. */\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n for (const control of this.#configuredControls) control[formFieldControl](null);\n this.#configuredControls.clear();\n this.#bindNativePlaceholder(null);\n this.#bindNativeAccessibleName(null);\n this.#bindNativeEvents(null);\n this.#bindResetForm(null);\n }\n\n /** Handles assigned-control changes and updates the floating-label strategy. */\n private _onSlotChange(): void {\n this.#syncControls();\n }\n\n /** Tracks native input/textarea content after user edits. */\n private _onControlValueChange(): void {\n if (this._floatingKind !== \"native\") return;\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n }\n\n /** Reveals the native placeholder once focus floats the label. */\n private _onControlFocusIn(): void {\n if (this._floatingKind !== \"native\") return;\n this.#nativeFocused = true;\n this.#syncNativePlaceholder();\n }\n\n /** Hides the native placeholder again when an empty field loses focus. */\n private _onControlFocusOut(): void {\n if (this._floatingKind !== \"native\") return;\n this.#nativeFocused = false;\n this.#syncNativePlaceholder();\n }\n\n /** Focuses a native control when its shadow-rendered floating label is clicked. */\n private _onControlLabelClick(event: MouseEvent): void {\n if (this._floatingKind !== \"native\") return;\n const control = this.#nativeControl();\n if (!control || event.composedPath().includes(control)) return;\n control.focus();\n }\n\n /** Synchronizes native value state when WebKit applies autofill without input events. */\n private _onNativeAnimationStart(event: AnimationEvent): void {\n if (\n this._floatingKind !== \"native\" ||\n event.animationName !== \"form-field-autofill\"\n ) {\n return;\n }\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n }\n\n /** Finds the sole assigned native text control, if present. */\n #nativeControl(): HTMLInputElement | HTMLTextAreaElement | null {\n if (this._assignedElements?.length !== 1) return null;\n const [element] = this._assignedElements;\n if (element instanceof HTMLTextAreaElement) return element;\n if (!(element instanceof HTMLInputElement)) return null;\n return NATIVE_TEXT_INPUT_TYPES.has(element.type) ? element : null;\n }\n\n /** Pushes current label configuration into a supported slotted control. */\n #syncControls(): void {\n const assigned = this._assignedElements ?? [];\n const delegated =\n this.floatingLabel &&\n Boolean(this.label) &&\n assigned.length === 1 &&\n supportsFormFieldControl(assigned[0])\n ? assigned[0]\n : null;\n const native =\n this.floatingLabel && Boolean(this.label) && !delegated\n ? this.#nativeControl()\n : null;\n const nextConfigured = new Set<FormFieldControl>();\n\n if (delegated) {\n delegated[formFieldControl]({\n label: this.label,\n required: this.required,\n floating: true,\n });\n nextConfigured.add(delegated);\n }\n for (const control of this.#configuredControls) {\n if (!nextConfigured.has(control)) control[formFieldControl](null);\n }\n this.#configuredControls = nextConfigured;\n\n this._floatingKind = delegated ? \"delegated\" : native ? \"native\" : null;\n this.#updateNativeValue();\n this.#bindNativePlaceholder(native);\n this.#bindNativeAccessibleName(native);\n this.#bindNativeEvents(native);\n this.#bindResetForm(native?.form ?? null);\n }\n\n /** Updates whether a native control currently contains a value. */\n #updateNativeValue(): void {\n this._nativeHasValue = Boolean(this.#nativeControl()?.value);\n }\n\n /** Preserves the consumer placeholder while floating mode temporarily hides it. */\n #bindNativePlaceholder(\n control: HTMLInputElement | HTMLTextAreaElement | null,\n ): void {\n if (control === this.#placeholderControl) {\n this.#syncNativePlaceholder();\n return;\n }\n if (this.#placeholderControl) this.#placeholderControl.placeholder = this.#placeholder;\n this.#placeholderControl = control;\n this.#placeholder = control?.placeholder ?? \"\";\n this.#nativeFocused = control === document.activeElement;\n this.#syncNativePlaceholder();\n }\n\n /** Applies the correct placeholder for the native label's focus/value state. */\n #syncNativePlaceholder(): void {\n if (!this.#placeholderControl) return;\n this.#placeholderControl.placeholder =\n this.#nativeFocused || this._nativeHasValue ? this.#placeholder : \"\";\n }\n\n /** Applies a shadow-boundary-safe accessible name and restores any prior value. */\n #bindNativeAccessibleName(\n control: HTMLInputElement | HTMLTextAreaElement | null,\n ): void {\n if (control !== this.#accessibleNameControl) {\n if (this.#accessibleNameControl) {\n if (this.#accessibleName == null) {\n this.#accessibleNameControl.removeAttribute(\"aria-label\");\n } else {\n this.#accessibleNameControl.setAttribute(\"aria-label\", this.#accessibleName);\n }\n }\n this.#accessibleNameControl = control;\n this.#accessibleName = control?.getAttribute(\"aria-label\") ?? null;\n }\n if (!control) return;\n control.setAttribute(\n \"aria-label\",\n this.required ? `${this.label} (required)` : this.label,\n );\n }\n\n /** Moves native field listeners directly between assigned controls. */\n #bindNativeEvents(control: HTMLInputElement | HTMLTextAreaElement | null): void {\n if (control === this.#nativeEventControl) return;\n this.#nativeEventControl?.removeEventListener(\"input\", this.#onNativeValueChange);\n this.#nativeEventControl?.removeEventListener(\"change\", this.#onNativeValueChange);\n this.#nativeEventControl?.removeEventListener(\"focus\", this.#onNativeFocus);\n this.#nativeEventControl?.removeEventListener(\"blur\", this.#onNativeBlur);\n this.#nativeEventControl?.removeEventListener(\n \"animationstart\",\n this.#onNativeAnimation,\n );\n this.#nativeEventControl = control;\n this.#nativeEventControl?.addEventListener(\"input\", this.#onNativeValueChange);\n this.#nativeEventControl?.addEventListener(\"change\", this.#onNativeValueChange);\n this.#nativeEventControl?.addEventListener(\"focus\", this.#onNativeFocus);\n this.#nativeEventControl?.addEventListener(\"blur\", this.#onNativeBlur);\n this.#nativeEventControl?.addEventListener(\n \"animationstart\",\n this.#onNativeAnimation,\n );\n }\n\n /** Moves the reset listener to the native control's current owner form. */\n #bindResetForm(form: HTMLFormElement | null): void {\n if (form === this.#resetForm) return;\n this.#resetForm?.removeEventListener(\"reset\", this.#onFormReset);\n this.#resetForm = form;\n this.#resetForm?.addEventListener(\"reset\", this.#onFormReset);\n }\n\n override render() {\n const message = this.error || this.hint;\n const delegatedFloating = this._floatingKind === \"delegated\";\n const nativeFloating = this._floatingKind === \"native\";\n const nativeMultiline =\n nativeFloating && this.#nativeControl() instanceof HTMLTextAreaElement;\n return html`\n <div class=\"field\">\n <label\n class=\"control-label ${nativeFloating ? \"floating-native\" : \"\"} ${nativeMultiline\n ? \"multiline\"\n : \"\"} ${this._nativeHasValue ? \"has-value\" : \"\"}\"\n @click=${this._onControlLabelClick}\n >\n ${this.label && !delegatedFloating\n ? html`<span class=\"label-text\">\n <span>${this.label}</span>\n ${this.required\n ? html`<span class=\"required-mark\" aria-hidden=\"true\">*</span\n ><span class=\"sr-only\"> (required)</span>`\n : nothing}\n </span>`\n : nothing}\n <slot @slotchange=${this._onSlotChange}></slot>\n </label>\n ${message\n ? html`<span id=${this.#messageId} class=\"message ${this.error ? \"error\" : \"\"}\" role=${this.error ? \"alert\" : nothing}\n >${message}</span\n >`\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"form-field\": FormField;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"form-field.js","sourceRoot":"","sources":["../src/form-field.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AAC1E,OAAO,EACL,aAAa,EACb,QAAQ,EACR,qBAAqB,EACrB,KAAK,GACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAA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tC,OAAO;YACP,CAAC,CAAC,IAAI,CAAA,YAAY,IAAI,CAAC,UAAU,mBAAmB,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;iBAC9G,OAAO;cACV;YACJ,CAAC,CAAC,OAAO;;KAEd,CAAC;IACJ,CAAC;CACF,CAAA;AA9Qa;IAAX,QAAQ,EAAE;wCAAY;AAEX;IAAX,QAAQ,EAAE;uCAAW;AAEV;IAAX,QAAQ,EAAE;wCAAY;AAEM;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;2CAAkB;AAG9C;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;gDAClD;AAGL;IADhB,qBAAqB,EAAE;oDAC2B;AAElC;IAAhB,KAAK,EAAE;gDAA6D;AACpD;IAAhB,KAAK,EAAE;kDAAiC;AAxQ9B,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAugBrB","sourcesContent":["import { LitElement, css, html, nothing, type PropertyValues } from \"lit\";\nimport {\n customElement,\n property,\n queryAssignedElements,\n state,\n} from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\nimport {\n formFieldControl,\n supportsFormFieldControl,\n type FormFieldControl,\n} from \"./utils/form-field-control.js\";\n\nlet instanceCount = 0;\nconst NATIVE_TEXT_INPUT_TYPES = new Set([\n \"date\",\n \"datetime-local\",\n \"email\",\n \"month\",\n \"number\",\n \"password\",\n \"search\",\n \"tel\",\n \"text\",\n \"time\",\n \"url\",\n \"week\",\n]);\n\n/**\n * Per-field wrapper for a form control: label, slotted control, and an\n * optional hint or error message, in one consistent unit repeated across a\n * form. Purely presentational — composes whatever control is slotted\n * (`form-select`, `multi-select`, `autocomplete-input`, `ui-checkbox`, etc.)\n * without intercepting its events or value.\n *\n * Set `floating-label` for supported text controls (`input`, `textarea`,\n * `autocomplete-input`, `address-autocomplete`, and `text-area`). The label\n * then rests inside an empty field and moves to a smaller top-left position\n * while focused or non-empty. Other controls keep the external label.\n *\n * The label wraps the default slot for a best-effort visual/click\n * association only: every existing value-entry control encapsulates its\n * real `<input>` inside its own shadow DOM, so there is no light-DOM `id` a\n * `for` attribute could target from outside, and this component cannot set\n * `aria-describedby`/`aria-invalid` on an arbitrary slotted control's\n * shadow-encapsulated input for the same reason. The error message uses\n * `role=\"alert\"` as the practical accessibility mitigation instead of true\n * `aria-describedby` association.\n *\n * @element form-field\n * @slot - The wrapped form control.\n */\n@customElement(\"form-field\")\nexport class FormField extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n }\n .field {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n .control-label {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n .label-text {\n display: flex;\n align-items: baseline;\n gap: 0.25rem;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-sm, 0.75rem);\n font-weight: var(--ui-font-weight-medium, 500);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text, #0f172a);\n }\n .control-label.floating-native {\n position: relative;\n display: block;\n border-radius: var(--ui-radius-sm, 0.25rem);\n background: var(--ui-surface, #ffffff);\n box-shadow: inset 0 0 0 1px var(--ui-border, #e2e8f0);\n }\n .control-label.floating-native:focus-within {\n box-shadow:\n inset 0 0 0 1px var(--ui-primary, #4f46e5),\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .control-label.floating-native .label-text {\n position: absolute;\n top: 50%;\n left: 0.75rem;\n right: 0.75rem;\n z-index: 1;\n overflow: hidden;\n transform: translateY(-50%);\n color: var(--ui-text-muted, #64748b);\n font-weight: var(--ui-font-weight-regular, 400);\n white-space: nowrap;\n text-overflow: ellipsis;\n cursor: text;\n transition:\n top 150ms ease,\n transform 150ms ease,\n font-size 150ms ease;\n }\n .control-label.floating-native.multiline .label-text {\n top: 0.25rem;\n transform: none;\n }\n .control-label.floating-native.has-value .label-text,\n .control-label.floating-native:focus-within .label-text {\n top: 0.25rem;\n transform: none;\n font-size: var(--ui-font-size-xs, 0.6875rem);\n }\n .control-label.floating-native ::slotted(input),\n .control-label.floating-native ::slotted(textarea) {\n display: block;\n box-sizing: border-box;\n width: 100%;\n min-height: 3rem;\n margin: 0;\n /*\n * !important below survives a host page's own global element reset\n * (e.g. Tailwind v4's layered preflight): a slotted control is real\n * light-DOM content, so the host page's own rules for \"input\"/\n * \"textarea\" compete directly against ::slotted() here, and in\n * practice win over it at equal-or-lower specificity despite living\n * in a CSS layer, since ::slotted() rules cross a shadow boundary.\n */\n padding: 1.25rem 0.75rem 0.25rem !important;\n border: 0 !important;\n border-radius: var(--ui-radius-sm, 0.25rem) !important;\n color: var(--ui-text, #0f172a) !important;\n background: transparent !important;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n ) !important;\n font-size: var(--ui-font-size, 0.875rem) !important;\n line-height: var(--ui-line-height-tight, 1.25) !important;\n }\n .control-label.floating-native ::slotted(input) {\n height: 3rem;\n }\n .control-label.floating-native ::slotted(textarea) {\n padding-bottom: 0.5rem !important;\n resize: vertical;\n }\n .control-label.floating-native.multiline ::slotted(textarea) {\n padding-top: 1.5rem !important;\n }\n .control-label.floating-native ::slotted(input:focus-visible),\n .control-label.floating-native ::slotted(textarea:focus-visible) {\n outline: none;\n }\n .control-label.floating-native ::slotted(input:disabled),\n .control-label.floating-native ::slotted(textarea:disabled) {\n cursor: not-allowed;\n opacity: 0.6 !important;\n }\n .control-label.floating-native:has(:disabled) .label-text {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .control-label.floating-native ::slotted(input:-webkit-autofill) {\n animation: form-field-autofill 0.001s;\n }\n .control-label:not(.floating-native) ::slotted(input),\n .control-label:not(.floating-native) ::slotted(textarea) {\n display: block;\n box-sizing: border-box;\n width: 100%;\n margin: 0;\n /* See the !important note on the floating-native rule above. */\n padding: 0.5rem 0.75rem !important;\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0) !important;\n border-radius: var(--ui-radius-sm, 0.25rem) !important;\n color: var(--ui-text, #0f172a) !important;\n background: var(--ui-surface, #ffffff) !important;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n ) !important;\n font-size: var(--ui-font-size, 0.875rem) !important;\n line-height: var(--ui-line-height-normal, 1.5) !important;\n }\n .control-label:not(.floating-native) ::slotted(input) {\n height: 2rem;\n }\n .control-label:not(.floating-native) ::slotted(textarea) {\n resize: vertical;\n }\n .control-label:not(.floating-native) ::slotted(input:focus-visible),\n .control-label:not(.floating-native) ::slotted(textarea:focus-visible) {\n outline: none;\n border-color: var(--ui-primary, #4f46e5) !important;\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .control-label:not(.floating-native) ::slotted(input:disabled),\n .control-label:not(.floating-native) ::slotted(textarea:disabled) {\n cursor: not-allowed;\n opacity: 0.6 !important;\n }\n .required-mark {\n color: var(--ui-danger, #dc2626);\n }\n .message {\n font-size: var(--ui-font-size-xs, 0.6875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text-muted, #64748b);\n }\n .message.error {\n color: var(--ui-danger, #dc2626);\n }\n .sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n white-space: nowrap;\n border: 0;\n }\n @media (prefers-reduced-motion: reduce) {\n .control-label.floating-native .label-text {\n transition: none;\n }\n }\n @keyframes form-field-autofill {\n from {\n opacity: 1;\n }\n to {\n opacity: 1;\n }\n }\n @media (forced-colors: active) {\n .control-label.floating-native {\n border: 1px solid CanvasText;\n box-shadow: none;\n }\n .control-label.floating-native:focus-within {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .control-label.floating-native ::slotted(input:disabled),\n .control-label.floating-native ::slotted(textarea:disabled),\n .control-label.floating-native:has(:disabled) .label-text {\n color: GrayText !important;\n opacity: 1 !important;\n }\n .control-label:not(.floating-native) ::slotted(input),\n .control-label:not(.floating-native) ::slotted(textarea) {\n border-color: CanvasText !important;\n }\n .control-label:not(.floating-native) ::slotted(input:focus-visible),\n .control-label:not(.floating-native) ::slotted(textarea:focus-visible) {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n .control-label:not(.floating-native) ::slotted(input:disabled),\n .control-label:not(.floating-native) ::slotted(textarea:disabled) {\n color: GrayText !important;\n opacity: 1 !important;\n }\n }\n `,\n ];\n\n /** Field label text. */\n @property() label = \"\";\n /** Optional helper text shown below the control when there's no `error`. */\n @property() hint = \"\";\n /** Optional error text; replaces the `hint` display when non-empty. */\n @property() error = \"\";\n /** Shows a required indicator next to the label. */\n @property({ type: Boolean }) required = false;\n /** Moves labels inside supported text controls until they receive focus or content. */\n @property({ type: Boolean, reflect: true, attribute: \"floating-label\" })\n floatingLabel = false;\n\n @queryAssignedElements()\n private readonly _assignedElements!: HTMLElement[];\n\n @state() private _floatingKind: \"delegated\" | \"native\" | null = null;\n @state() private _nativeHasValue = false;\n\n readonly #messageId = `form-field-message-${++instanceCount}`;\n #configuredControls = new Set<FormFieldControl>();\n #resetForm: HTMLFormElement | null = null;\n #placeholderControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #placeholder = \"\";\n #accessibleNameControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #accessibleName: string | null = null;\n #nativeEventControl: HTMLInputElement | HTMLTextAreaElement | null = null;\n #nativeFocused = false;\n readonly #onNativeValueChange = () => this._onControlValueChange();\n readonly #onNativeFocus = () => this._onControlFocusIn();\n readonly #onNativeBlur = () => this._onControlFocusOut();\n readonly #onNativeAnimation = (event: Event) => {\n if (event instanceof AnimationEvent) this._onNativeAnimationStart(event);\n };\n readonly #onFormReset = () => {\n window.setTimeout(() => {\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n });\n };\n\n /** Synchronizes label configuration after the component first renders. */\n protected override firstUpdated(): void {\n this.#syncControls();\n }\n\n /** Resynchronizes delegated controls when public label configuration changes. */\n protected override updated(changed: PropertyValues<this>): void {\n if (\n changed.has(\"label\") ||\n changed.has(\"required\") ||\n changed.has(\"floatingLabel\")\n ) {\n this.#syncControls();\n }\n }\n\n /** Removes delegated configuration and form listeners when disconnected. */\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n for (const control of this.#configuredControls) control[formFieldControl](null);\n this.#configuredControls.clear();\n this.#bindNativePlaceholder(null);\n this.#bindNativeAccessibleName(null);\n this.#bindNativeEvents(null);\n this.#bindResetForm(null);\n }\n\n /** Handles assigned-control changes and updates the floating-label strategy. */\n private _onSlotChange(): void {\n this.#syncControls();\n }\n\n /** Tracks native input/textarea content after user edits. */\n private _onControlValueChange(): void {\n if (this._floatingKind !== \"native\") return;\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n }\n\n /** Reveals the native placeholder once focus floats the label. */\n private _onControlFocusIn(): void {\n if (this._floatingKind !== \"native\") return;\n this.#nativeFocused = true;\n this.#syncNativePlaceholder();\n }\n\n /** Hides the native placeholder again when an empty field loses focus. */\n private _onControlFocusOut(): void {\n if (this._floatingKind !== \"native\") return;\n this.#nativeFocused = false;\n this.#syncNativePlaceholder();\n }\n\n /** Focuses a native control when its shadow-rendered floating label is clicked. */\n private _onControlLabelClick(event: MouseEvent): void {\n if (this._floatingKind !== \"native\") return;\n const control = this.#nativeControl();\n if (!control || event.composedPath().includes(control)) return;\n control.focus();\n }\n\n /** Synchronizes native value state when WebKit applies autofill without input events. */\n private _onNativeAnimationStart(event: AnimationEvent): void {\n if (\n this._floatingKind !== \"native\" ||\n event.animationName !== \"form-field-autofill\"\n ) {\n return;\n }\n this.#updateNativeValue();\n this.#syncNativePlaceholder();\n }\n\n /** Finds the sole assigned native text control, if present. */\n #nativeControl(): HTMLInputElement | HTMLTextAreaElement | null {\n if (this._assignedElements?.length !== 1) return null;\n const [element] = this._assignedElements;\n if (element instanceof HTMLTextAreaElement) return element;\n if (!(element instanceof HTMLInputElement)) return null;\n return NATIVE_TEXT_INPUT_TYPES.has(element.type) ? element : null;\n }\n\n /** Pushes current label configuration into a supported slotted control. */\n #syncControls(): void {\n const assigned = this._assignedElements ?? [];\n const delegated =\n this.floatingLabel &&\n Boolean(this.label) &&\n assigned.length === 1 &&\n supportsFormFieldControl(assigned[0])\n ? assigned[0]\n : null;\n const native =\n this.floatingLabel && Boolean(this.label) && !delegated\n ? this.#nativeControl()\n : null;\n const nextConfigured = new Set<FormFieldControl>();\n\n if (delegated) {\n delegated[formFieldControl]({\n label: this.label,\n required: this.required,\n floating: true,\n });\n nextConfigured.add(delegated);\n }\n for (const control of this.#configuredControls) {\n if (!nextConfigured.has(control)) control[formFieldControl](null);\n }\n this.#configuredControls = nextConfigured;\n\n this._floatingKind = delegated ? \"delegated\" : native ? \"native\" : null;\n this.#updateNativeValue();\n this.#bindNativePlaceholder(native);\n this.#bindNativeAccessibleName(native);\n this.#bindNativeEvents(native);\n this.#bindResetForm(native?.form ?? null);\n }\n\n /** Updates whether a native control currently contains a value. */\n #updateNativeValue(): void {\n this._nativeHasValue = Boolean(this.#nativeControl()?.value);\n }\n\n /** Preserves the consumer placeholder while floating mode temporarily hides it. */\n #bindNativePlaceholder(\n control: HTMLInputElement | HTMLTextAreaElement | null,\n ): void {\n if (control === this.#placeholderControl) {\n this.#syncNativePlaceholder();\n return;\n }\n if (this.#placeholderControl) this.#placeholderControl.placeholder = this.#placeholder;\n this.#placeholderControl = control;\n this.#placeholder = control?.placeholder ?? \"\";\n this.#nativeFocused = control === document.activeElement;\n this.#syncNativePlaceholder();\n }\n\n /** Applies the correct placeholder for the native label's focus/value state. */\n #syncNativePlaceholder(): void {\n if (!this.#placeholderControl) return;\n this.#placeholderControl.placeholder =\n this.#nativeFocused || this._nativeHasValue ? this.#placeholder : \"\";\n }\n\n /** Applies a shadow-boundary-safe accessible name and restores any prior value. */\n #bindNativeAccessibleName(\n control: HTMLInputElement | HTMLTextAreaElement | null,\n ): void {\n if (control !== this.#accessibleNameControl) {\n if (this.#accessibleNameControl) {\n if (this.#accessibleName == null) {\n this.#accessibleNameControl.removeAttribute(\"aria-label\");\n } else {\n this.#accessibleNameControl.setAttribute(\"aria-label\", this.#accessibleName);\n }\n }\n this.#accessibleNameControl = control;\n this.#accessibleName = control?.getAttribute(\"aria-label\") ?? null;\n }\n if (!control) return;\n control.setAttribute(\n \"aria-label\",\n this.required ? `${this.label} (required)` : this.label,\n );\n }\n\n /** Moves native field listeners directly between assigned controls. */\n #bindNativeEvents(control: HTMLInputElement | HTMLTextAreaElement | null): void {\n if (control === this.#nativeEventControl) return;\n this.#nativeEventControl?.removeEventListener(\"input\", this.#onNativeValueChange);\n this.#nativeEventControl?.removeEventListener(\"change\", this.#onNativeValueChange);\n this.#nativeEventControl?.removeEventListener(\"focus\", this.#onNativeFocus);\n this.#nativeEventControl?.removeEventListener(\"blur\", this.#onNativeBlur);\n this.#nativeEventControl?.removeEventListener(\n \"animationstart\",\n this.#onNativeAnimation,\n );\n this.#nativeEventControl = control;\n this.#nativeEventControl?.addEventListener(\"input\", this.#onNativeValueChange);\n this.#nativeEventControl?.addEventListener(\"change\", this.#onNativeValueChange);\n this.#nativeEventControl?.addEventListener(\"focus\", this.#onNativeFocus);\n this.#nativeEventControl?.addEventListener(\"blur\", this.#onNativeBlur);\n this.#nativeEventControl?.addEventListener(\n \"animationstart\",\n this.#onNativeAnimation,\n );\n }\n\n /** Moves the reset listener to the native control's current owner form. */\n #bindResetForm(form: HTMLFormElement | null): void {\n if (form === this.#resetForm) return;\n this.#resetForm?.removeEventListener(\"reset\", this.#onFormReset);\n this.#resetForm = form;\n this.#resetForm?.addEventListener(\"reset\", this.#onFormReset);\n }\n\n override render() {\n const message = this.error || this.hint;\n const delegatedFloating = this._floatingKind === \"delegated\";\n const nativeFloating = this._floatingKind === \"native\";\n const nativeMultiline =\n nativeFloating && this.#nativeControl() instanceof HTMLTextAreaElement;\n return html`\n <div class=\"field\">\n <label\n class=\"control-label ${nativeFloating ? \"floating-native\" : \"\"} ${nativeMultiline\n ? \"multiline\"\n : \"\"} ${this._nativeHasValue ? \"has-value\" : \"\"}\"\n @click=${this._onControlLabelClick}\n >\n ${this.label && !delegatedFloating\n ? html`<span class=\"label-text\">\n <span>${this.label}</span>\n ${this.required\n ? html`<span class=\"required-mark\" aria-hidden=\"true\">*</span\n ><span class=\"sr-only\"> (required)</span>`\n : nothing}\n </span>`\n : nothing}\n <slot @slotchange=${this._onSlotChange}></slot>\n </label>\n ${message\n ? html`<span id=${this.#messageId} class=\"message ${this.error ? \"error\" : \"\"}\" role=${this.error ? \"alert\" : nothing}\n >${message}</span\n >`\n : nothing}\n </div>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"form-field\": FormField;\n }\n}\n"]}
|
package/dist/form-select.js
CHANGED
|
@@ -106,7 +106,7 @@ let FormSelect = class FormSelect extends LitElement {
|
|
|
106
106
|
line-height: var(--ui-line-height-tight, 1.25);
|
|
107
107
|
color: var(--ui-text, #0f172a);
|
|
108
108
|
background: var(--ui-surface, #ffffff);
|
|
109
|
-
border: 1px solid var(--ui-border, #e2e8f0);
|
|
109
|
+
border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
|
|
110
110
|
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
111
111
|
padding: 0.5rem 0.75rem;
|
|
112
112
|
cursor: pointer;
|
|
@@ -133,7 +133,7 @@ let FormSelect = class FormSelect extends LitElement {
|
|
|
133
133
|
box-sizing: border-box;
|
|
134
134
|
color: var(--ui-text, #0f172a);
|
|
135
135
|
background: var(--ui-surface, #ffffff);
|
|
136
|
-
border: 1px solid var(--ui-border, #e2e8f0);
|
|
136
|
+
border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
|
|
137
137
|
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
138
138
|
cursor: text;
|
|
139
139
|
}
|
|
@@ -203,7 +203,7 @@ let FormSelect = class FormSelect extends LitElement {
|
|
|
203
203
|
white-space: nowrap;
|
|
204
204
|
color: var(--ui-text, #0f172a);
|
|
205
205
|
background: var(--ui-surface, #ffffff);
|
|
206
|
-
border: 1px solid var(--ui-border, #e2e8f0);
|
|
206
|
+
border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
|
|
207
207
|
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
208
208
|
box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
|
|
209
209
|
}
|
package/dist/form-select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-select.js","sourceRoot":"","sources":["../src/form-select.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,GAAG,EACH,IAAI,EACJ,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,IAAI,aAAa,GAAG,CAAC,CAAC;AAYtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;I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B,CAAC;IACJ,CAAC;CACF,CAAA;AAlaiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2CAA8B;AAEjD;IAAX,QAAQ,EAAE;yCAAY;AAEX;IAAX,QAAQ,EAAE;yCAAY;AAEM;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAkB;AAKF;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAoB;AAE9C;IAAhB,KAAK,EAAE;yCAAuB;AACd;IAAhB,KAAK,EAAE;gDAA2B;AAClB;IAAhB,KAAK,EAAE;0CAAsC;AAzPnC,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA4oBtB","sourcesContent":["import {\n LitElement,\n css,\n html,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconChevronRight } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\nlet instanceCount = 0;\n\n/** A single selectable option. */\nexport interface SelectOption {\n value: string;\n label: string;\n /** Optional pre-rendered icon template displayed before the label. */\n icon?: TemplateResult;\n /** Square icon size in pixels. Defaults to 16 when `icon` is set. */\n iconSize?: number;\n}\n\n/**\n * A styled dropdown select: a trigger button showing the current option's\n * label, opening a listbox popover on click. Drop-in generic replacement for\n * a native `<select>` wherever consistent cross-browser styling and a\n * `change` event carrying `{ value }` are wanted (e.g. a task's status\n * picker).\n *\n * The trigger fills its host's width (`justify-content: space-between`\n * pushes the chevron to the far edge), and the host is `display: block`, so a\n * `form-select` fills its container's width by default — matching the other\n * form fields. To make an instance shrink to its content instead (e.g. in a\n * filter bar or a status picker), constrain the host:\n * `form-select { display: inline-block; }` (or `width: fit-content`).\n *\n * Set `searchable` to replace the button trigger with an editable combobox\n * that filters the predefined options by case-insensitive label infix. Typed\n * text is only a query: `value` changes exclusively when an actual option is\n * selected, and an uncommitted query is discarded when the list closes.\n * Each option may also provide a pre-rendered `icon` and square `iconSize`;\n * iconless options reserve no leading space.\n *\n * @element form-select\n * @fires change - Fired with `{ value: string }` when a different option is picked.\n */\n@customElement(\"form-select\")\nexport class FormSelect extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n position: relative;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n }\n button.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.25rem;\n width: 100%;\n height: 2rem;\n box-sizing: border-box;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n }\n button.trigger:hover:not(:disabled) {\n background: var(--ui-surface-muted, #f8fafc);\n }\n button.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n button.trigger:focus-visible {\n outline: none;\n border-color: var(--ui-primary, #4f46e5);\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .search-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.25rem;\n width: 100%;\n height: 2rem;\n box-sizing: border-box;\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n cursor: text;\n }\n .search-trigger:hover:not(.disabled) {\n background: var(--ui-surface-muted, #f8fafc);\n }\n .search-trigger:not(.disabled):focus-within {\n border-color: var(--ui-primary, #4f46e5);\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .search-trigger.disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .search-trigger.has-icon input.search-input {\n padding-left: 0;\n }\n input.search-input {\n min-width: 0;\n flex: 1;\n box-sizing: border-box;\n padding: 0.5rem 0 0.5rem 0.75rem;\n color: inherit;\n background: transparent;\n border: 0;\n outline: 0;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n }\n .chevron {\n display: flex;\n flex: 0 0 auto;\n margin-right: 0.75rem;\n color: var(--ui-text-muted, #64748b);\n pointer-events: none;\n transform: rotate(90deg);\n transition: transform 150ms ease;\n }\n button.trigger .chevron {\n margin-right: 0;\n }\n :host([open]) .chevron {\n transform: rotate(-90deg);\n }\n ul.options {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n min-width: 100%;\n max-height: 40vh;\n overflow-y: auto;\n scrollbar-gutter: stable;\n margin: 0.25rem 0 0;\n padding: 0.25rem 0;\n list-style: none;\n white-space: nowrap;\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n ul.options::-webkit-scrollbar {\n width: 0.75rem;\n }\n ul.options::-webkit-scrollbar-thumb {\n background: var(--ui-border, #e2e8f0);\n border: 0.25rem solid transparent;\n border-radius: var(--ui-radius-pill, 9999px);\n background-clip: padding-box;\n }\n li {\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n }\n li.active,\n li:hover {\n background: var(--ui-surface-muted, #f8fafc);\n }\n li[aria-selected=\"true\"] {\n font-weight: var(--ui-font-weight-semibold, 600);\n color: var(--ui-primary, #4f46e5);\n }\n .option-content {\n display: inline-flex;\n min-width: 0;\n align-items: center;\n gap: 0.5rem;\n }\n li .option-content {\n display: flex;\n width: 100%;\n }\n .option-icon {\n display: inline-flex;\n width: var(--form-select-icon-size);\n height: var(--form-select-icon-size);\n flex: 0 0 var(--form-select-icon-size);\n align-items: center;\n justify-content: center;\n }\n .option-icon > svg {\n width: 100%;\n height: 100%;\n }\n .selected-icon {\n margin-left: 0.5rem;\n }\n .option-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n li.no-options {\n padding: 0.5rem 0.75rem;\n color: var(--ui-text-muted, #64748b);\n cursor: default;\n font-style: italic;\n }\n @media (prefers-reduced-motion: reduce) {\n .chevron {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n button.trigger:focus-visible,\n .search-trigger:not(.disabled):focus-within {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n button.trigger:disabled,\n .search-trigger.disabled {\n color: GrayText;\n opacity: 1;\n }\n li.active,\n li:hover {\n color: HighlightText;\n background: Highlight;\n }\n li[aria-selected=\"true\"] {\n color: Highlight;\n }\n li.active[aria-selected=\"true\"],\n li[aria-selected=\"true\"]:hover {\n color: HighlightText;\n }\n }\n `,\n ];\n\n /** The full list of selectable options. */\n @property({ attribute: false }) options: SelectOption[] = [];\n /** Currently selected value; must match one of `options[].value`. */\n @property() value = \"\";\n /** `aria-label` applied to the trigger button. */\n @property() label = \"\";\n /** Disables the trigger, preventing the popover from opening. */\n @property({ type: Boolean }) disabled = false;\n /**\n * Enables editable, case-insensitive infix filtering by option label.\n * Typed text never becomes the selected `value`.\n */\n @property({ type: Boolean, reflect: true }) searchable = false;\n\n @state() private _open = false;\n @state() private _activeIndex = -1;\n @state() private _query: string | null = null;\n\n #listboxPointerDown = false;\n #suppressNextBlur = false;\n #restoringSearchFocus = false;\n #searchSelection: [number | null, number | null] | null = null;\n #isComposing = false;\n #compositionJustEnded = false;\n #compositionEndTimer: ReturnType<typeof setTimeout> | null = null;\n #blurTimer: ReturnType<typeof setTimeout> | null = null;\n readonly #listboxId = `form-select-listbox-${++instanceCount}`;\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(\"mousedown\", this.#onWindowMousedown, true);\n if (this.#blurTimer) clearTimeout(this.#blurTimer);\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#listboxPointerDown = false;\n this.#suppressNextBlur = false;\n this.#searchSelection = null;\n this.#isComposing = false;\n this.#compositionJustEnded = false;\n this.#close();\n }\n\n protected override updated(changed: PropertyValues): void {\n if (changed.has(\"_open\")) {\n this.toggleAttribute(\"open\", this._open);\n if (this._open) {\n window.addEventListener(\"mousedown\", this.#onWindowMousedown, true);\n } else {\n window.removeEventListener(\"mousedown\", this.#onWindowMousedown, true);\n }\n }\n if ((changed.has(\"disabled\") && this.disabled) || changed.has(\"searchable\")) {\n this.#close();\n return;\n }\n if (changed.has(\"options\") && this._open) {\n this._activeIndex = this.#initialActiveIndex();\n } else if (changed.has(\"value\") && this._open && this._query === null) {\n this._activeIndex = this.#initialActiveIndex();\n }\n if (\n (changed.has(\"_activeIndex\") || changed.has(\"_query\") || changed.has(\"options\")) &&\n this._open &&\n this._activeIndex >= 0\n ) {\n this.renderRoot\n .querySelector<HTMLElement>(`#${this.#listboxId}-option-${this._activeIndex}`)\n ?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }\n }\n\n #onWindowMousedown = (e: MouseEvent): void => {\n if (!e.composedPath().includes(this)) this.#close();\n };\n\n #toggle(): void {\n if (this.disabled) return;\n if (this._open) this.#close();\n else this.#open();\n }\n\n #open(): void {\n if (this.disabled) return;\n this._query = null;\n this._open = true;\n this._activeIndex = this.#initialActiveIndex();\n }\n\n #close(): void {\n this._open = false;\n this._query = null;\n this._activeIndex = -1;\n this.#searchSelection = null;\n }\n\n #initialActiveIndex(): number {\n const options = this.#visibleOptions();\n if (options.length === 0) return -1;\n if (this._query !== null) return 0;\n const selectedIndex = options.findIndex((option) => option.value === this.value);\n return selectedIndex >= 0 ? selectedIndex : 0;\n }\n\n #visibleOptions(): SelectOption[] {\n if (!this.searchable || this._query === null) return this.options;\n const needle = this._query.trim().toLocaleLowerCase();\n if (!needle) return this.options;\n return this.options.filter((option) =>\n option.label.toLocaleLowerCase().includes(needle),\n );\n }\n\n #select(option: SelectOption): void {\n this.#close();\n if (option.value === this.value) return;\n this.value = option.value;\n this.dispatchEvent(new CustomEvent(\"change\", { detail: { value: option.value } }));\n }\n\n #onTriggerKeydown(e: KeyboardEvent): void {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\" || e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n if (!this._open) {\n this.#toggle();\n return;\n }\n if (e.key === \"ArrowDown\") this.#moveActive(1);\n else if (e.key === \"ArrowUp\") this.#moveActive(-1);\n else this.#confirmActive();\n } else if (e.key === \"Escape\" && this._open) {\n e.preventDefault();\n this.#close();\n }\n }\n\n #moveActive(delta: number): void {\n const options = this.#visibleOptions();\n if (options.length === 0) return;\n const n = options.length;\n this._activeIndex = (this._activeIndex + delta + n) % n;\n }\n\n #confirmActive(): void {\n const options = this.#visibleOptions();\n const option = options[this._activeIndex] ?? options[0];\n if (option) this.#select(option);\n }\n\n #onSearchFocus(e: FocusEvent): void {\n if (this.disabled) return;\n if (this.#blurTimer) {\n clearTimeout(this.#blurTimer);\n this.#blurTimer = null;\n }\n if (!this._open) this.#open();\n if (!this.#restoringSearchFocus) (e.currentTarget as HTMLInputElement).select();\n }\n\n #onSearchClick(e: MouseEvent): void {\n if (!this._open) this.#open();\n if (this._query === null) (e.currentTarget as HTMLInputElement).select();\n }\n\n #onSearchMousedown(e: MouseEvent): void {\n if (e.button !== 0) e.preventDefault();\n }\n\n #onSearchInput(e: InputEvent): void {\n this._query = (e.currentTarget as HTMLInputElement).value;\n this._open = true;\n const options = this.#visibleOptions();\n this._activeIndex = options.length > 0 ? 0 : -1;\n }\n\n #onSearchKeydown(e: KeyboardEvent): void {\n if (e.isComposing || e.keyCode === 229 || this.#isComposing || this.#compositionJustEnded) {\n return;\n }\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n if (!this._open) {\n this.#open();\n return;\n }\n this.#moveActive(e.key === \"ArrowDown\" ? 1 : -1);\n } else if (e.key === \"Enter\" && this._open) {\n e.preventDefault();\n this.#confirmActive();\n } else if (e.key === \"Escape\" && this._open) {\n e.preventDefault();\n this.#close();\n }\n }\n\n #onSearchBlur(): void {\n if (this.#blurTimer) clearTimeout(this.#blurTimer);\n this.#blurTimer = setTimeout(() => {\n this.#blurTimer = null;\n if (!this._open) return;\n if (!this.#listboxPointerDown && !this.#suppressNextBlur) this.#close();\n });\n }\n\n #focusSearchInput(e: MouseEvent): void {\n if (\n e.button !== 0 ||\n this.disabled ||\n e.composedPath()[0] instanceof HTMLInputElement\n ) {\n return;\n }\n e.preventDefault();\n const input = this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n if (!this._open) this.#open();\n input?.focus();\n input?.select();\n }\n\n #onCompositionStart(): void {\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#compositionEndTimer = null;\n this.#compositionJustEnded = false;\n this.#isComposing = true;\n }\n\n #onCompositionEnd(): void {\n this.#isComposing = false;\n this.#compositionJustEnded = true;\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#compositionEndTimer = setTimeout(() => {\n this.#compositionJustEnded = false;\n this.#compositionEndTimer = null;\n });\n }\n\n #onListboxMousedown(e: MouseEvent): void {\n if (e.button !== 0) return;\n this.#listboxPointerDown = true;\n this.#suppressNextBlur = true;\n const input = this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n this.#searchSelection = input\n ? [input.selectionStart, input.selectionEnd]\n : null;\n window.addEventListener(\n \"mouseup\",\n () => {\n this.#listboxPointerDown = false;\n if (this._open) {\n const searchInput =\n this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n if (searchInput) {\n this.#restoringSearchFocus = true;\n searchInput.focus({ preventScroll: true });\n this.#restoringSearchFocus = false;\n const [start, end] = this.#searchSelection ?? [null, null];\n if (start !== null && end !== null) searchInput.setSelectionRange(start, end);\n }\n }\n this.#searchSelection = null;\n setTimeout(() => {\n this.#suppressNextBlur = false;\n });\n },\n { capture: true, once: true },\n );\n }\n\n #onOptionMousedown(e: MouseEvent, option: SelectOption): void {\n if (e.button !== 0) return;\n const optionElement = e.currentTarget as HTMLElement;\n const listbox = optionElement.parentElement;\n if (listbox) {\n const scrollbarWidth = listbox.offsetWidth - listbox.clientWidth;\n const bounds = listbox.getBoundingClientRect();\n const isRtl = getComputedStyle(listbox).direction === \"rtl\";\n const inScrollbarGutter = isRtl\n ? e.clientX <= bounds.left + scrollbarWidth\n : e.clientX >= bounds.right - scrollbarWidth;\n if (scrollbarWidth > 0 && inScrollbarGutter) return;\n }\n e.preventDefault();\n this.#select(option);\n }\n\n #optionIconSize(option: SelectOption): number {\n const size = option.iconSize ?? 16;\n return Number.isFinite(size) && size > 0 ? size : 16;\n }\n\n #renderOptionIcon(option: SelectOption, className = \"option-icon\") {\n if (!option.icon) return nothing;\n return html`\n <span\n class=${className}\n style=${`--form-select-icon-size: ${this.#optionIconSize(option)}px`}\n aria-hidden=\"true\"\n >\n ${option.icon}\n </span>\n `;\n }\n\n #renderOptionContent(option: SelectOption) {\n return html`\n <span class=\"option-content\">\n ${this.#renderOptionIcon(option)}\n <span class=\"option-label\">${option.label}</span>\n </span>\n `;\n }\n\n private renderListbox() {\n if (!this._open) return nothing;\n const options = this.#visibleOptions();\n return html`\n <ul\n id=${this.#listboxId}\n class=\"options\"\n role=\"listbox\"\n aria-label=${this.label ? `${this.label} options` : \"Options\"}\n @mousedown=${(e: MouseEvent) => this.#onListboxMousedown(e)}\n >\n ${options.map(\n (o, i) => html`\n <li\n id=${`${this.#listboxId}-option-${i}`}\n role=\"option\"\n aria-selected=${o.value === this.value}\n class=${i === this._activeIndex ? \"active\" : \"\"}\n @mousedown=${(e: MouseEvent) => this.#onOptionMousedown(e, o)}\n >\n ${this.#renderOptionContent(o)}\n </li>\n `,\n )}\n ${options.length === 0\n ? html`<li class=\"no-options\" role=\"presentation\"><span role=\"status\">No options found</span></li>`\n : nothing}\n </ul>\n `;\n }\n\n private renderSearchTrigger(current: SelectOption | undefined) {\n const displayValue = this._query ?? current?.label ?? this.value;\n const showSelectedIcon = this._query === null && Boolean(current?.icon);\n const activeDescendant =\n this._open && this._activeIndex >= 0\n ? `${this.#listboxId}-option-${this._activeIndex}`\n : nothing;\n return html`\n <div\n class=\"search-trigger ${this.disabled ? \"disabled\" : \"\"} ${showSelectedIcon\n ? \"has-icon\"\n : \"\"}\"\n @mousedown=${(e: MouseEvent) => this.#focusSearchInput(e)}\n >\n ${showSelectedIcon && current\n ? this.#renderOptionIcon(current, \"option-icon selected-icon\")\n : nothing}\n <input\n type=\"text\"\n class=\"search-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=${this._open}\n aria-controls=${this.#listboxId}\n aria-activedescendant=${activeDescendant}\n aria-label=${this.label || \"Select an option\"}\n autocomplete=\"off\"\n ?disabled=${this.disabled}\n .value=${displayValue}\n @mousedown=${(e: MouseEvent) => this.#onSearchMousedown(e)}\n @focus=${(e: FocusEvent) => this.#onSearchFocus(e)}\n @click=${(e: MouseEvent) => this.#onSearchClick(e)}\n @input=${(e: InputEvent) => this.#onSearchInput(e)}\n @compositionstart=${() => this.#onCompositionStart()}\n @compositionend=${() => this.#onCompositionEnd()}\n @keydown=${(e: KeyboardEvent) => this.#onSearchKeydown(e)}\n @blur=${() => this.#onSearchBlur()}\n />\n <span class=\"chevron\">${iconChevronRight(14)}</span>\n </div>\n `;\n }\n\n private renderButtonTrigger(current: SelectOption | undefined) {\n const activeDescendant =\n this._open && this._activeIndex >= 0\n ? `${this.#listboxId}-option-${this._activeIndex}`\n : nothing;\n return html`\n <button\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"listbox\"\n aria-expanded=${this._open}\n aria-controls=${this.#listboxId}\n aria-activedescendant=${activeDescendant}\n aria-label=${this.label || nothing}\n ?disabled=${this.disabled}\n @click=${() => this.#toggle()}\n @keydown=${(e: KeyboardEvent) => this.#onTriggerKeydown(e)}\n >\n ${current\n ? this.#renderOptionContent(current)\n : html`<span class=\"option-label\">${this.value}</span>`}\n <span class=\"chevron\">${iconChevronRight(14)}</span>\n </button>\n `;\n }\n\n override render() {\n const current = this.options.find((o) => o.value === this.value);\n return html`\n ${this.searchable\n ? this.renderSearchTrigger(current)\n : this.renderButtonTrigger(current)}\n ${this.renderListbox()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"form-select\": FormSelect;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"form-select.js","sourceRoot":"","sources":["../src/form-select.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,GAAG,EACH,IAAI,EACJ,OAAO,GAGR,MAAM,KAAK,CAAC;AACb,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,IAAI,aAAa,GAAG,CAAC,CAAC;AAYtB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEI,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,UAAU;IAAnC;;QAyOL,2CAA2C;QACX,YAAO,GAAmB,EAAE,CAAC;QAC7D,qEAAqE;QACzD,UAAK,GAAG,EAAE,CAAC;QACvB,kDAAkD;QACtC,UAAK,GA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AE;yCAAY;AAEX;IAAX,QAAQ,EAAE;yCAAY;AAEM;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;4CAAkB;AAKF;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAAoB;AAE9C;IAAhB,KAAK,EAAE;yCAAuB;AACd;IAAhB,KAAK,EAAE;gDAA2B;AAClB;IAAhB,KAAK,EAAE;0CAAsC;AAzPnC,UAAU;IADtB,aAAa,CAAC,aAAa,CAAC;GAChB,UAAU,CA4oBtB","sourcesContent":["import {\n LitElement,\n css,\n html,\n nothing,\n type PropertyValues,\n type TemplateResult,\n} from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconChevronRight } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\nlet instanceCount = 0;\n\n/** A single selectable option. */\nexport interface SelectOption {\n value: string;\n label: string;\n /** Optional pre-rendered icon template displayed before the label. */\n icon?: TemplateResult;\n /** Square icon size in pixels. Defaults to 16 when `icon` is set. */\n iconSize?: number;\n}\n\n/**\n * A styled dropdown select: a trigger button showing the current option's\n * label, opening a listbox popover on click. Drop-in generic replacement for\n * a native `<select>` wherever consistent cross-browser styling and a\n * `change` event carrying `{ value }` are wanted (e.g. a task's status\n * picker).\n *\n * The trigger fills its host's width (`justify-content: space-between`\n * pushes the chevron to the far edge), and the host is `display: block`, so a\n * `form-select` fills its container's width by default — matching the other\n * form fields. To make an instance shrink to its content instead (e.g. in a\n * filter bar or a status picker), constrain the host:\n * `form-select { display: inline-block; }` (or `width: fit-content`).\n *\n * Set `searchable` to replace the button trigger with an editable combobox\n * that filters the predefined options by case-insensitive label infix. Typed\n * text is only a query: `value` changes exclusively when an actual option is\n * selected, and an uncommitted query is discarded when the list closes.\n * Each option may also provide a pre-rendered `icon` and square `iconSize`;\n * iconless options reserve no leading space.\n *\n * @element form-select\n * @fires change - Fired with `{ value: string }` when a different option is picked.\n */\n@customElement(\"form-select\")\nexport class FormSelect extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n position: relative;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n }\n button.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.25rem;\n width: 100%;\n height: 2rem;\n box-sizing: border-box;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n }\n button.trigger:hover:not(:disabled) {\n background: var(--ui-surface-muted, #f8fafc);\n }\n button.trigger:disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n button.trigger:focus-visible {\n outline: none;\n border-color: var(--ui-primary, #4f46e5);\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .search-trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 0.25rem;\n width: 100%;\n height: 2rem;\n box-sizing: border-box;\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n cursor: text;\n }\n .search-trigger:hover:not(.disabled) {\n background: var(--ui-surface-muted, #f8fafc);\n }\n .search-trigger:not(.disabled):focus-within {\n border-color: var(--ui-primary, #4f46e5);\n box-shadow: var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35));\n }\n .search-trigger.disabled {\n cursor: not-allowed;\n opacity: 0.6;\n }\n .search-trigger.has-icon input.search-input {\n padding-left: 0;\n }\n input.search-input {\n min-width: 0;\n flex: 1;\n box-sizing: border-box;\n padding: 0.5rem 0 0.5rem 0.75rem;\n color: inherit;\n background: transparent;\n border: 0;\n outline: 0;\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size, 0.875rem);\n line-height: var(--ui-line-height-tight, 1.25);\n }\n .chevron {\n display: flex;\n flex: 0 0 auto;\n margin-right: 0.75rem;\n color: var(--ui-text-muted, #64748b);\n pointer-events: none;\n transform: rotate(90deg);\n transition: transform 150ms ease;\n }\n button.trigger .chevron {\n margin-right: 0;\n }\n :host([open]) .chevron {\n transform: rotate(-90deg);\n }\n ul.options {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 10;\n min-width: 100%;\n max-height: 40vh;\n overflow-y: auto;\n scrollbar-gutter: stable;\n margin: 0.25rem 0 0;\n padding: 0.25rem 0;\n list-style: none;\n white-space: nowrap;\n color: var(--ui-text, #0f172a);\n background: var(--ui-surface, #ffffff);\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n ul.options::-webkit-scrollbar {\n width: 0.75rem;\n }\n ul.options::-webkit-scrollbar-thumb {\n background: var(--ui-border, #e2e8f0);\n border: 0.25rem solid transparent;\n border-radius: var(--ui-radius-pill, 9999px);\n background-clip: padding-box;\n }\n li {\n padding: 0.5rem 0.75rem;\n cursor: pointer;\n }\n li.active,\n li:hover {\n background: var(--ui-surface-muted, #f8fafc);\n }\n li[aria-selected=\"true\"] {\n font-weight: var(--ui-font-weight-semibold, 600);\n color: var(--ui-primary, #4f46e5);\n }\n .option-content {\n display: inline-flex;\n min-width: 0;\n align-items: center;\n gap: 0.5rem;\n }\n li .option-content {\n display: flex;\n width: 100%;\n }\n .option-icon {\n display: inline-flex;\n width: var(--form-select-icon-size);\n height: var(--form-select-icon-size);\n flex: 0 0 var(--form-select-icon-size);\n align-items: center;\n justify-content: center;\n }\n .option-icon > svg {\n width: 100%;\n height: 100%;\n }\n .selected-icon {\n margin-left: 0.5rem;\n }\n .option-label {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n li.no-options {\n padding: 0.5rem 0.75rem;\n color: var(--ui-text-muted, #64748b);\n cursor: default;\n font-style: italic;\n }\n @media (prefers-reduced-motion: reduce) {\n .chevron {\n transition: none;\n }\n }\n @media (forced-colors: active) {\n button.trigger:focus-visible,\n .search-trigger:not(.disabled):focus-within {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n button.trigger:disabled,\n .search-trigger.disabled {\n color: GrayText;\n opacity: 1;\n }\n li.active,\n li:hover {\n color: HighlightText;\n background: Highlight;\n }\n li[aria-selected=\"true\"] {\n color: Highlight;\n }\n li.active[aria-selected=\"true\"],\n li[aria-selected=\"true\"]:hover {\n color: HighlightText;\n }\n }\n `,\n ];\n\n /** The full list of selectable options. */\n @property({ attribute: false }) options: SelectOption[] = [];\n /** Currently selected value; must match one of `options[].value`. */\n @property() value = \"\";\n /** `aria-label` applied to the trigger button. */\n @property() label = \"\";\n /** Disables the trigger, preventing the popover from opening. */\n @property({ type: Boolean }) disabled = false;\n /**\n * Enables editable, case-insensitive infix filtering by option label.\n * Typed text never becomes the selected `value`.\n */\n @property({ type: Boolean, reflect: true }) searchable = false;\n\n @state() private _open = false;\n @state() private _activeIndex = -1;\n @state() private _query: string | null = null;\n\n #listboxPointerDown = false;\n #suppressNextBlur = false;\n #restoringSearchFocus = false;\n #searchSelection: [number | null, number | null] | null = null;\n #isComposing = false;\n #compositionJustEnded = false;\n #compositionEndTimer: ReturnType<typeof setTimeout> | null = null;\n #blurTimer: ReturnType<typeof setTimeout> | null = null;\n readonly #listboxId = `form-select-listbox-${++instanceCount}`;\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n window.removeEventListener(\"mousedown\", this.#onWindowMousedown, true);\n if (this.#blurTimer) clearTimeout(this.#blurTimer);\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#listboxPointerDown = false;\n this.#suppressNextBlur = false;\n this.#searchSelection = null;\n this.#isComposing = false;\n this.#compositionJustEnded = false;\n this.#close();\n }\n\n protected override updated(changed: PropertyValues): void {\n if (changed.has(\"_open\")) {\n this.toggleAttribute(\"open\", this._open);\n if (this._open) {\n window.addEventListener(\"mousedown\", this.#onWindowMousedown, true);\n } else {\n window.removeEventListener(\"mousedown\", this.#onWindowMousedown, true);\n }\n }\n if ((changed.has(\"disabled\") && this.disabled) || changed.has(\"searchable\")) {\n this.#close();\n return;\n }\n if (changed.has(\"options\") && this._open) {\n this._activeIndex = this.#initialActiveIndex();\n } else if (changed.has(\"value\") && this._open && this._query === null) {\n this._activeIndex = this.#initialActiveIndex();\n }\n if (\n (changed.has(\"_activeIndex\") || changed.has(\"_query\") || changed.has(\"options\")) &&\n this._open &&\n this._activeIndex >= 0\n ) {\n this.renderRoot\n .querySelector<HTMLElement>(`#${this.#listboxId}-option-${this._activeIndex}`)\n ?.scrollIntoView({ block: \"nearest\", inline: \"nearest\" });\n }\n }\n\n #onWindowMousedown = (e: MouseEvent): void => {\n if (!e.composedPath().includes(this)) this.#close();\n };\n\n #toggle(): void {\n if (this.disabled) return;\n if (this._open) this.#close();\n else this.#open();\n }\n\n #open(): void {\n if (this.disabled) return;\n this._query = null;\n this._open = true;\n this._activeIndex = this.#initialActiveIndex();\n }\n\n #close(): void {\n this._open = false;\n this._query = null;\n this._activeIndex = -1;\n this.#searchSelection = null;\n }\n\n #initialActiveIndex(): number {\n const options = this.#visibleOptions();\n if (options.length === 0) return -1;\n if (this._query !== null) return 0;\n const selectedIndex = options.findIndex((option) => option.value === this.value);\n return selectedIndex >= 0 ? selectedIndex : 0;\n }\n\n #visibleOptions(): SelectOption[] {\n if (!this.searchable || this._query === null) return this.options;\n const needle = this._query.trim().toLocaleLowerCase();\n if (!needle) return this.options;\n return this.options.filter((option) =>\n option.label.toLocaleLowerCase().includes(needle),\n );\n }\n\n #select(option: SelectOption): void {\n this.#close();\n if (option.value === this.value) return;\n this.value = option.value;\n this.dispatchEvent(new CustomEvent(\"change\", { detail: { value: option.value } }));\n }\n\n #onTriggerKeydown(e: KeyboardEvent): void {\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\" || e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n if (!this._open) {\n this.#toggle();\n return;\n }\n if (e.key === \"ArrowDown\") this.#moveActive(1);\n else if (e.key === \"ArrowUp\") this.#moveActive(-1);\n else this.#confirmActive();\n } else if (e.key === \"Escape\" && this._open) {\n e.preventDefault();\n this.#close();\n }\n }\n\n #moveActive(delta: number): void {\n const options = this.#visibleOptions();\n if (options.length === 0) return;\n const n = options.length;\n this._activeIndex = (this._activeIndex + delta + n) % n;\n }\n\n #confirmActive(): void {\n const options = this.#visibleOptions();\n const option = options[this._activeIndex] ?? options[0];\n if (option) this.#select(option);\n }\n\n #onSearchFocus(e: FocusEvent): void {\n if (this.disabled) return;\n if (this.#blurTimer) {\n clearTimeout(this.#blurTimer);\n this.#blurTimer = null;\n }\n if (!this._open) this.#open();\n if (!this.#restoringSearchFocus) (e.currentTarget as HTMLInputElement).select();\n }\n\n #onSearchClick(e: MouseEvent): void {\n if (!this._open) this.#open();\n if (this._query === null) (e.currentTarget as HTMLInputElement).select();\n }\n\n #onSearchMousedown(e: MouseEvent): void {\n if (e.button !== 0) e.preventDefault();\n }\n\n #onSearchInput(e: InputEvent): void {\n this._query = (e.currentTarget as HTMLInputElement).value;\n this._open = true;\n const options = this.#visibleOptions();\n this._activeIndex = options.length > 0 ? 0 : -1;\n }\n\n #onSearchKeydown(e: KeyboardEvent): void {\n if (e.isComposing || e.keyCode === 229 || this.#isComposing || this.#compositionJustEnded) {\n return;\n }\n if (e.key === \"ArrowDown\" || e.key === \"ArrowUp\") {\n e.preventDefault();\n if (!this._open) {\n this.#open();\n return;\n }\n this.#moveActive(e.key === \"ArrowDown\" ? 1 : -1);\n } else if (e.key === \"Enter\" && this._open) {\n e.preventDefault();\n this.#confirmActive();\n } else if (e.key === \"Escape\" && this._open) {\n e.preventDefault();\n this.#close();\n }\n }\n\n #onSearchBlur(): void {\n if (this.#blurTimer) clearTimeout(this.#blurTimer);\n this.#blurTimer = setTimeout(() => {\n this.#blurTimer = null;\n if (!this._open) return;\n if (!this.#listboxPointerDown && !this.#suppressNextBlur) this.#close();\n });\n }\n\n #focusSearchInput(e: MouseEvent): void {\n if (\n e.button !== 0 ||\n this.disabled ||\n e.composedPath()[0] instanceof HTMLInputElement\n ) {\n return;\n }\n e.preventDefault();\n const input = this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n if (!this._open) this.#open();\n input?.focus();\n input?.select();\n }\n\n #onCompositionStart(): void {\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#compositionEndTimer = null;\n this.#compositionJustEnded = false;\n this.#isComposing = true;\n }\n\n #onCompositionEnd(): void {\n this.#isComposing = false;\n this.#compositionJustEnded = true;\n if (this.#compositionEndTimer) clearTimeout(this.#compositionEndTimer);\n this.#compositionEndTimer = setTimeout(() => {\n this.#compositionJustEnded = false;\n this.#compositionEndTimer = null;\n });\n }\n\n #onListboxMousedown(e: MouseEvent): void {\n if (e.button !== 0) return;\n this.#listboxPointerDown = true;\n this.#suppressNextBlur = true;\n const input = this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n this.#searchSelection = input\n ? [input.selectionStart, input.selectionEnd]\n : null;\n window.addEventListener(\n \"mouseup\",\n () => {\n this.#listboxPointerDown = false;\n if (this._open) {\n const searchInput =\n this.renderRoot.querySelector<HTMLInputElement>(\"input.search-input\");\n if (searchInput) {\n this.#restoringSearchFocus = true;\n searchInput.focus({ preventScroll: true });\n this.#restoringSearchFocus = false;\n const [start, end] = this.#searchSelection ?? [null, null];\n if (start !== null && end !== null) searchInput.setSelectionRange(start, end);\n }\n }\n this.#searchSelection = null;\n setTimeout(() => {\n this.#suppressNextBlur = false;\n });\n },\n { capture: true, once: true },\n );\n }\n\n #onOptionMousedown(e: MouseEvent, option: SelectOption): void {\n if (e.button !== 0) return;\n const optionElement = e.currentTarget as HTMLElement;\n const listbox = optionElement.parentElement;\n if (listbox) {\n const scrollbarWidth = listbox.offsetWidth - listbox.clientWidth;\n const bounds = listbox.getBoundingClientRect();\n const isRtl = getComputedStyle(listbox).direction === \"rtl\";\n const inScrollbarGutter = isRtl\n ? e.clientX <= bounds.left + scrollbarWidth\n : e.clientX >= bounds.right - scrollbarWidth;\n if (scrollbarWidth > 0 && inScrollbarGutter) return;\n }\n e.preventDefault();\n this.#select(option);\n }\n\n #optionIconSize(option: SelectOption): number {\n const size = option.iconSize ?? 16;\n return Number.isFinite(size) && size > 0 ? size : 16;\n }\n\n #renderOptionIcon(option: SelectOption, className = \"option-icon\") {\n if (!option.icon) return nothing;\n return html`\n <span\n class=${className}\n style=${`--form-select-icon-size: ${this.#optionIconSize(option)}px`}\n aria-hidden=\"true\"\n >\n ${option.icon}\n </span>\n `;\n }\n\n #renderOptionContent(option: SelectOption) {\n return html`\n <span class=\"option-content\">\n ${this.#renderOptionIcon(option)}\n <span class=\"option-label\">${option.label}</span>\n </span>\n `;\n }\n\n private renderListbox() {\n if (!this._open) return nothing;\n const options = this.#visibleOptions();\n return html`\n <ul\n id=${this.#listboxId}\n class=\"options\"\n role=\"listbox\"\n aria-label=${this.label ? `${this.label} options` : \"Options\"}\n @mousedown=${(e: MouseEvent) => this.#onListboxMousedown(e)}\n >\n ${options.map(\n (o, i) => html`\n <li\n id=${`${this.#listboxId}-option-${i}`}\n role=\"option\"\n aria-selected=${o.value === this.value}\n class=${i === this._activeIndex ? \"active\" : \"\"}\n @mousedown=${(e: MouseEvent) => this.#onOptionMousedown(e, o)}\n >\n ${this.#renderOptionContent(o)}\n </li>\n `,\n )}\n ${options.length === 0\n ? html`<li class=\"no-options\" role=\"presentation\"><span role=\"status\">No options found</span></li>`\n : nothing}\n </ul>\n `;\n }\n\n private renderSearchTrigger(current: SelectOption | undefined) {\n const displayValue = this._query ?? current?.label ?? this.value;\n const showSelectedIcon = this._query === null && Boolean(current?.icon);\n const activeDescendant =\n this._open && this._activeIndex >= 0\n ? `${this.#listboxId}-option-${this._activeIndex}`\n : nothing;\n return html`\n <div\n class=\"search-trigger ${this.disabled ? \"disabled\" : \"\"} ${showSelectedIcon\n ? \"has-icon\"\n : \"\"}\"\n @mousedown=${(e: MouseEvent) => this.#focusSearchInput(e)}\n >\n ${showSelectedIcon && current\n ? this.#renderOptionIcon(current, \"option-icon selected-icon\")\n : nothing}\n <input\n type=\"text\"\n class=\"search-input\"\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-expanded=${this._open}\n aria-controls=${this.#listboxId}\n aria-activedescendant=${activeDescendant}\n aria-label=${this.label || \"Select an option\"}\n autocomplete=\"off\"\n ?disabled=${this.disabled}\n .value=${displayValue}\n @mousedown=${(e: MouseEvent) => this.#onSearchMousedown(e)}\n @focus=${(e: FocusEvent) => this.#onSearchFocus(e)}\n @click=${(e: MouseEvent) => this.#onSearchClick(e)}\n @input=${(e: InputEvent) => this.#onSearchInput(e)}\n @compositionstart=${() => this.#onCompositionStart()}\n @compositionend=${() => this.#onCompositionEnd()}\n @keydown=${(e: KeyboardEvent) => this.#onSearchKeydown(e)}\n @blur=${() => this.#onSearchBlur()}\n />\n <span class=\"chevron\">${iconChevronRight(14)}</span>\n </div>\n `;\n }\n\n private renderButtonTrigger(current: SelectOption | undefined) {\n const activeDescendant =\n this._open && this._activeIndex >= 0\n ? `${this.#listboxId}-option-${this._activeIndex}`\n : nothing;\n return html`\n <button\n type=\"button\"\n class=\"trigger\"\n aria-haspopup=\"listbox\"\n aria-expanded=${this._open}\n aria-controls=${this.#listboxId}\n aria-activedescendant=${activeDescendant}\n aria-label=${this.label || nothing}\n ?disabled=${this.disabled}\n @click=${() => this.#toggle()}\n @keydown=${(e: KeyboardEvent) => this.#onTriggerKeydown(e)}\n >\n ${current\n ? this.#renderOptionContent(current)\n : html`<span class=\"option-label\">${this.value}</span>`}\n <span class=\"chevron\">${iconChevronRight(14)}</span>\n </button>\n `;\n }\n\n override render() {\n const current = this.options.find((o) => o.value === this.value);\n return html`\n ${this.searchable\n ? this.renderSearchTrigger(current)\n : this.renderButtonTrigger(current)}\n ${this.renderListbox()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"form-select\": FormSelect;\n }\n}\n"]}
|
package/dist/frame-box.js
CHANGED
|
@@ -32,7 +32,7 @@ let FrameBox = class FrameBox extends LitElement {
|
|
|
32
32
|
.frame {
|
|
33
33
|
min-width: 0;
|
|
34
34
|
margin: 0;
|
|
35
|
-
border: 1px solid var(--ui-border, #e2e8f0);
|
|
35
|
+
border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);
|
|
36
36
|
border-radius: var(--ui-radius, 0.5rem);
|
|
37
37
|
padding: 0.75rem;
|
|
38
38
|
}
|
package/dist/frame-box.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frame-box.js","sourceRoot":"","sources":["../src/frame-box.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;GAQG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAqCL,iDAAiD;QACrC,UAAK,GAAG,EAAE,CAAC;IAUzB,CAAC;aA/CiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BF;KACF,AAlCqB,CAkCpB;IAKO,MAAM;QACb,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,yBAAyB,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI;;;KAG3E,CAAC;IACJ,CAAC;CACF,CAAA;AAVa;IAAX,QAAQ,EAAE;uCAAY;AAtCZ,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAgDpB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * A titled frame around a slot: a gray border with a small uppercase,\n * muted label overlapping the top edge (fieldset/legend-style). Generic —\n * the label text is entirely up to the consumer (e.g. \"Debug\" to visually\n * fence off dev-only chrome from the product UI).\n *\n * @element frame-box\n * @slot - Framed content.\n */\n@customElement(\"frame-box\")\nexport class FrameBox extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n margin-top: 0.5rem;\n }\n .frame {\n min-width: 0;\n margin: 0;\n border: 1px solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius, 0.5rem);\n padding: 0.75rem;\n }\n .label {\n padding: 0 0.5rem;\n background: var(--ui-surface, #ffffff);\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-xs, 0.6875rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n text-transform: uppercase;\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n color: var(--ui-text-muted, #64748b);\n }\n `,\n ];\n\n /** The overlapping title label, e.g. \"Debug\". */\n @property() label = \"\";\n\n override render() {\n return html`\n <fieldset class=\"frame\">\n ${this.label ? html`<legend class=\"label\">${this.label}</legend>` : null}\n <slot></slot>\n </fieldset>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"frame-box\": FrameBox;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"frame-box.js","sourceRoot":"","sources":["../src/frame-box.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;;;;;;;GAQG;AAEI,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAqCL,iDAAiD;QACrC,UAAK,GAAG,EAAE,CAAC;IAUzB,CAAC;aA/CiB,WAAM,GAAG;QACvB,MAAM;QACN,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA+BF;KACF,AAlCqB,CAkCpB;IAKO,MAAM;QACb,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA,yBAAyB,IAAI,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI;;;KAG3E,CAAC;IACJ,CAAC;CACF,CAAA;AAVa;IAAX,QAAQ,EAAE;uCAAY;AAtCZ,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAgDpB","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property } from \"lit/decorators.js\";\nimport { tokens } from \"./tokens.js\";\n\n/**\n * A titled frame around a slot: a gray border with a small uppercase,\n * muted label overlapping the top edge (fieldset/legend-style). Generic —\n * the label text is entirely up to the consumer (e.g. \"Debug\" to visually\n * fence off dev-only chrome from the product UI).\n *\n * @element frame-box\n * @slot - Framed content.\n */\n@customElement(\"frame-box\")\nexport class FrameBox extends LitElement {\n static override styles = [\n tokens,\n css`\n :host {\n display: block;\n margin-top: 0.5rem;\n }\n .frame {\n min-width: 0;\n margin: 0;\n border: var(--ui-border-width, 1px) solid var(--ui-border, #e2e8f0);\n border-radius: var(--ui-radius, 0.5rem);\n padding: 0.75rem;\n }\n .label {\n padding: 0 0.5rem;\n background: var(--ui-surface, #ffffff);\n font-family: var(\n --ui-font,\n ui-sans-serif,\n system-ui,\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\"\n );\n font-size: var(--ui-font-size-xs, 0.6875rem);\n font-weight: var(--ui-font-weight-semibold, 600);\n text-transform: uppercase;\n letter-spacing: var(--ui-tracking-wide, 0.04em);\n color: var(--ui-text-muted, #64748b);\n }\n `,\n ];\n\n /** The overlapping title label, e.g. \"Debug\". */\n @property() label = \"\";\n\n override render() {\n return html`\n <fieldset class=\"frame\">\n ${this.label ? html`<legend class=\"label\">${this.label}</legend>` : null}\n <slot></slot>\n </fieldset>\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"frame-box\": FrameBox;\n }\n}\n"]}
|
|
@@ -86,7 +86,7 @@ let FullscreenButton = class FullscreenButton extends LitElement {
|
|
|
86
86
|
background:
|
|
87
87
|
var(--ui-button-secondary-background, none),
|
|
88
88
|
var(--ui-surface, #ffffff);
|
|
89
|
-
border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));
|
|
89
|
+
border: var(--ui-border-width, 1px) solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));
|
|
90
90
|
border-radius: var(--ui-radius-sm, 0.25rem);
|
|
91
91
|
box-shadow:
|
|
92
92
|
var(--ui-button-highlight, 0 0 0 0 transparent),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen-button.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ASP;IAEF;;;;OAIG;IACH,OAAO,CAYL;CACH,CAAA;AAtHiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gDAAmC;AAG1B;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;oDAAkC;AAGlC;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;mDAAgC;AAErD;IAAhB,KAAK,EAAE;iDAAyB;AAVtB,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAwH5B;;AAED,6DAA6D;AAC7D,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,QAA0B,CAAC;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconArrowsPointingIn, iconArrowsPointingOut } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\n/** Fired after the fullscreen state changes. `detail.active` is the new state. */\nexport interface FullscreenChangeDetail {\n active: boolean;\n}\n\nconst ICON_SIZE = 18;\n\n/**\n * Vendor-prefixed Fullscreen API members still needed by Safari, which has no\n * unprefixed support on the document.\n */\ninterface WebkitDocument extends Document {\n webkitFullscreenElement?: Element | null;\n webkitExitFullscreen?: () => Promise<void> | void;\n}\n\ninterface WebkitElement extends HTMLElement {\n webkitRequestFullscreen?: () => Promise<void> | void;\n}\n\n/**\n * Toggles fullscreen presentation of the page, or of a given `target` element.\n *\n * The icon and accessible name track the *actual* fullscreen state rather than\n * this button's own clicks, because fullscreen can be left without touching it\n * — Escape, or the browser's own chrome — which would otherwise leave the\n * button showing the wrong affordance.\n *\n * The control is styled as a square icon-sized `ui-button` `secondary` variant\n * (2rem, `--ui-radius-sm` corners, the `--ui-button-secondary-*` background and\n * border tokens, so a gradient theme carries over) layered over an opaque\n * `--ui-surface` base and an elevation shadow, since it normally floats above\n * the content it expands.\n *\n * @element fullscreen-button\n * @fires fullscreen-change - The fullscreen state changed, from this button or\n * otherwise (`detail: { active }`).\n */\n@customElement(\"fullscreen-button\")\nexport class FullscreenButton extends LitElement {\n /** Element to present fullscreen; `null` (default) presents the whole page. */\n @property({ attribute: false }) target: HTMLElement | null = null;\n\n /** Accessible name while not fullscreen. */\n @property({ attribute: \"enter-label\" }) enterLabel = \"Enter full screen\";\n\n /** Accessible name while fullscreen. */\n @property({ attribute: \"exit-label\" }) exitLabel = \"Exit full screen\";\n\n @state() private _active = false;\n\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-flex;\n }\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 2rem;\n height: 2rem;\n padding: 0;\n color: var(--ui-text, #0f172a);\n /* ui-button's secondary variant, over an opaque --ui-surface base: a\n floating control can't let the content behind it show through the\n way a secondary button's transparent flat background does. */\n background:\n var(--ui-button-secondary-background, none),\n var(--ui-surface, #ffffff);\n border: 1px solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow:\n var(--ui-button-highlight, 0 0 0 0 transparent),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n cursor: pointer;\n line-height: var(--ui-line-height-glyph, 1);\n }\n button:hover {\n background:\n var(--ui-button-secondary-background-hover, none),\n var(--ui-surface-muted, #f8fafc);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n button:active {\n background:\n var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),\n var(--ui-surface-muted, #f8fafc);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n button:focus-visible {\n outline: none;\n box-shadow:\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n @media (forced-colors: active) {\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n override connectedCallback(): void {\n super.connectedCallback();\n document.addEventListener(\"fullscreenchange\", this.#onChange);\n document.addEventListener(\"webkitfullscreenchange\", this.#onChange);\n this._active = isFullscreen();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener(\"fullscreenchange\", this.#onChange);\n document.removeEventListener(\"webkitfullscreenchange\", this.#onChange);\n }\n\n override render() {\n const label = this._active ? this.exitLabel : this.enterLabel;\n return html`\n <button type=\"button\" aria-label=${label} title=${label} @click=${this.#toggle}>\n ${this._active ? iconArrowsPointingIn(ICON_SIZE) : iconArrowsPointingOut(ICON_SIZE)}\n </button>\n `;\n }\n\n #onChange = (): void => {\n this._active = isFullscreen();\n this.dispatchEvent(\n new CustomEvent<FullscreenChangeDetail>(\"fullscreen-change\", {\n detail: { active: this._active },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n /**\n * Rejections are swallowed: browsers refuse the request outside a user\n * gesture or under a permissions policy, and there is nothing useful to tell\n * the user about it.\n */\n #toggle = async (): Promise<void> => {\n const doc = document as WebkitDocument;\n try {\n if (isFullscreen()) {\n await (doc.exitFullscreen?.() ?? doc.webkitExitFullscreen?.());\n return;\n }\n const element = (this.target ?? document.documentElement) as WebkitElement;\n await (element.requestFullscreen?.() ?? element.webkitRequestFullscreen?.());\n } catch {\n // Ignored — see doc comment.\n }\n };\n}\n\n/** Whether any element is currently presented fullscreen. */\nfunction isFullscreen(): boolean {\n const doc = document as WebkitDocument;\n return Boolean(doc.fullscreenElement ?? doc.webkitFullscreenElement);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"fullscreen-button\": FullscreenButton;\n }\n}\n"]}
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tF,CAAC;IACJ,CAAC;IAED,SAAS,CASP;IAEF;;;;OAIG;IACH,OAAO,CAYL;CACH,CAAA;AAtHiC;IAA/B,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gDAAmC;AAG1B;IAAvC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;oDAAkC;AAGlC;IAAtC,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;mDAAgC;AAErD;IAAhB,KAAK,EAAE;iDAAyB;AAVtB,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAwH5B;;AAED,6DAA6D;AAC7D,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,QAA0B,CAAC;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACvE,CAAC","sourcesContent":["import { LitElement, css, html } from \"lit\";\nimport { customElement, property, state } from \"lit/decorators.js\";\nimport { iconArrowsPointingIn, iconArrowsPointingOut } from \"./icons.js\";\nimport { tokens } from \"./tokens.js\";\n\n/** Fired after the fullscreen state changes. `detail.active` is the new state. */\nexport interface FullscreenChangeDetail {\n active: boolean;\n}\n\nconst ICON_SIZE = 18;\n\n/**\n * Vendor-prefixed Fullscreen API members still needed by Safari, which has no\n * unprefixed support on the document.\n */\ninterface WebkitDocument extends Document {\n webkitFullscreenElement?: Element | null;\n webkitExitFullscreen?: () => Promise<void> | void;\n}\n\ninterface WebkitElement extends HTMLElement {\n webkitRequestFullscreen?: () => Promise<void> | void;\n}\n\n/**\n * Toggles fullscreen presentation of the page, or of a given `target` element.\n *\n * The icon and accessible name track the *actual* fullscreen state rather than\n * this button's own clicks, because fullscreen can be left without touching it\n * — Escape, or the browser's own chrome — which would otherwise leave the\n * button showing the wrong affordance.\n *\n * The control is styled as a square icon-sized `ui-button` `secondary` variant\n * (2rem, `--ui-radius-sm` corners, the `--ui-button-secondary-*` background and\n * border tokens, so a gradient theme carries over) layered over an opaque\n * `--ui-surface` base and an elevation shadow, since it normally floats above\n * the content it expands.\n *\n * @element fullscreen-button\n * @fires fullscreen-change - The fullscreen state changed, from this button or\n * otherwise (`detail: { active }`).\n */\n@customElement(\"fullscreen-button\")\nexport class FullscreenButton extends LitElement {\n /** Element to present fullscreen; `null` (default) presents the whole page. */\n @property({ attribute: false }) target: HTMLElement | null = null;\n\n /** Accessible name while not fullscreen. */\n @property({ attribute: \"enter-label\" }) enterLabel = \"Enter full screen\";\n\n /** Accessible name while fullscreen. */\n @property({ attribute: \"exit-label\" }) exitLabel = \"Exit full screen\";\n\n @state() private _active = false;\n\n static override styles = [\n tokens,\n css`\n :host {\n display: inline-flex;\n }\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 2rem;\n height: 2rem;\n padding: 0;\n color: var(--ui-text, #0f172a);\n /* ui-button's secondary variant, over an opaque --ui-surface base: a\n floating control can't let the content behind it show through the\n way a secondary button's transparent flat background does. */\n background:\n var(--ui-button-secondary-background, none),\n var(--ui-surface, #ffffff);\n border: var(--ui-border-width, 1px) solid var(--ui-button-secondary-border, var(--ui-border, #e2e8f0));\n border-radius: var(--ui-radius-sm, 0.25rem);\n box-shadow:\n var(--ui-button-highlight, 0 0 0 0 transparent),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n cursor: pointer;\n line-height: var(--ui-line-height-glyph, 1);\n }\n button:hover {\n background:\n var(--ui-button-secondary-background-hover, none),\n var(--ui-surface-muted, #f8fafc);\n border-color: var(--ui-button-secondary-border-hover, var(--ui-text-muted, #64748b));\n }\n button:active {\n background:\n var(--ui-button-secondary-background-active, var(--ui-button-secondary-background, none)),\n var(--ui-surface-muted, #f8fafc);\n box-shadow: var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n button:focus-visible {\n outline: none;\n box-shadow:\n var(--ui-focus-ring, 0 0 0 3px rgb(79 70 229 / 0.35)),\n var(--ui-shadow, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));\n }\n @media (forced-colors: active) {\n button:focus-visible {\n outline: 2px solid CanvasText;\n outline-offset: 2px;\n box-shadow: none;\n }\n }\n `,\n ];\n\n override connectedCallback(): void {\n super.connectedCallback();\n document.addEventListener(\"fullscreenchange\", this.#onChange);\n document.addEventListener(\"webkitfullscreenchange\", this.#onChange);\n this._active = isFullscreen();\n }\n\n override disconnectedCallback(): void {\n super.disconnectedCallback();\n document.removeEventListener(\"fullscreenchange\", this.#onChange);\n document.removeEventListener(\"webkitfullscreenchange\", this.#onChange);\n }\n\n override render() {\n const label = this._active ? this.exitLabel : this.enterLabel;\n return html`\n <button type=\"button\" aria-label=${label} title=${label} @click=${this.#toggle}>\n ${this._active ? iconArrowsPointingIn(ICON_SIZE) : iconArrowsPointingOut(ICON_SIZE)}\n </button>\n `;\n }\n\n #onChange = (): void => {\n this._active = isFullscreen();\n this.dispatchEvent(\n new CustomEvent<FullscreenChangeDetail>(\"fullscreen-change\", {\n detail: { active: this._active },\n bubbles: true,\n composed: true,\n }),\n );\n };\n\n /**\n * Rejections are swallowed: browsers refuse the request outside a user\n * gesture or under a permissions policy, and there is nothing useful to tell\n * the user about it.\n */\n #toggle = async (): Promise<void> => {\n const doc = document as WebkitDocument;\n try {\n if (isFullscreen()) {\n await (doc.exitFullscreen?.() ?? doc.webkitExitFullscreen?.());\n return;\n }\n const element = (this.target ?? document.documentElement) as WebkitElement;\n await (element.requestFullscreen?.() ?? element.webkitRequestFullscreen?.());\n } catch {\n // Ignored — see doc comment.\n }\n };\n}\n\n/** Whether any element is currently presented fullscreen. */\nfunction isFullscreen(): boolean {\n const doc = document as WebkitDocument;\n return Boolean(doc.fullscreenElement ?? doc.webkitFullscreenElement);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"fullscreen-button\": FullscreenButton;\n }\n}\n"]}
|
package/dist/icons.d.ts
CHANGED
|
@@ -20,6 +20,8 @@ export declare const iconPencil: (size?: number) => import("lit-html").TemplateR
|
|
|
20
20
|
export declare const iconTrash: (size?: number) => import("lit-html").TemplateResult<2>;
|
|
21
21
|
/** An overflow ("kebab") menu trigger, e.g. dropdown-button's icon variant. */
|
|
22
22
|
export declare const iconEllipsisVertical: (size?: number) => import("lit-html").TemplateResult<2>;
|
|
23
|
+
/** Collapsed items in an inline sequence, e.g. breadcrumb-nav's truncated middle. */
|
|
24
|
+
export declare const iconEllipsisHorizontal: (size?: number) => import("lit-html").TemplateResult<2>;
|
|
23
25
|
/** "Add new" actions, e.g. creating a new item or row. */
|
|
24
26
|
export declare const iconPlus: (size?: number) => import("lit-html").TemplateResult<2>;
|
|
25
27
|
/** A list-view toggle, or to represent list-type content. */
|
package/dist/icons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../src/icons.ts"],"names":[],"mappings":"AAKA,0EAA0E;AAC1E,eAAO,MAAM,KAAK,yDAC2O,CAAC;AAE9P,gFAAgF;AAChF,eAAO,MAAM,SAAS,yDAC+P,CAAC;AAEtR,wEAAwE;AACxE,eAAO,MAAM,eAAe,yDACwO,CAAC;AAErQ,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,yDACqO,CAAC;AAEnQ,iEAAiE;AACjE,eAAO,MAAM,aAAa,yDACyO,CAAC;AAEpQ,4DAA4D;AAC5D,eAAO,MAAM,OAAO,yDAC2xC,CAAC;AAEhzC,2EAA2E;AAC3E,eAAO,MAAM,QAAQ,yDAC4W,CAAC;AAElY,mDAAmD;AACnD,eAAO,MAAM,sBAAsB,yDAC6Y,CAAC;AAEjb,oEAAoE;AACpE,eAAO,MAAM,UAAU,yDACqX,CAAC;AAE7Y,+EAA+E;AAC/E,eAAO,MAAM,SAAS,yDACgnB,CAAC;AAE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BAAyB,yDACqV,CAAC;AAE5X,0DAA0D;AAC1D,eAAO,MAAM,qBAAqB,yDACgtB,CAAC;AAEnvB,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,yDACkV,CAAC;AAExW,iFAAiF;AACjF,eAAO,MAAM,SAAS,yDACkP,CAAC;AAEzQ,+EAA+E;AAC/E,eAAO,MAAM,eAAe,yDAC8d,CAAC;AAE3f,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,yDAC4d,CAAC;AAE1f,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB,yDAC6U,CAAC;AAE/W,6EAA6E;AAC7E,eAAO,MAAM,iBAAiB,yDAC2xB,CAAC;AAE1zB,iFAAiF;AACjF,eAAO,MAAM,YAAY,yDAC2qB,CAAC;AAErsB,kFAAkF;AAClF,eAAO,MAAM,UAAU,yDAC4f,CAAC;AAEphB,wDAAwD;AACxD,eAAO,MAAM,aAAa,yDAC+jB,CAAC;AAE1lB,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,yDACsR,CAAC"}
|
package/dist/icons.js
CHANGED
|
@@ -23,6 +23,8 @@ export const iconPencil = (size = 16) => svg `<svg xmlns="http://www.w3.org/2000
|
|
|
23
23
|
export const iconTrash = (size = 16) => svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="1.5" stroke="currentColor" width=${size} height=${size} aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"/></svg>`;
|
|
24
24
|
/** An overflow ("kebab") menu trigger, e.g. dropdown-button's icon variant. */
|
|
25
25
|
export const iconEllipsisVertical = (size = 16) => svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="1.5" stroke="currentColor" width=${size} height=${size} aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"/></svg>`;
|
|
26
|
+
/** Collapsed items in an inline sequence, e.g. breadcrumb-nav's truncated middle. */
|
|
27
|
+
export const iconEllipsisHorizontal = (size = 16) => svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="1.5" stroke="currentColor" width=${size} height=${size} aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM12.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM18.75 12a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"/></svg>`;
|
|
26
28
|
/** "Add new" actions, e.g. creating a new item or row. */
|
|
27
29
|
export const iconPlus = (size = 16) => svg `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke-width="1.5" stroke="currentColor" width=${size} height=${size} aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15"/></svg>`;
|
|
28
30
|
/** A list-view toggle, or to represent list-type content. */
|