@lmvz-ds/components 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/cjs/{aria-validation-controller-Do0uEK4t.js → aria-validation-controller-DKNXjnQr.js} +1 -1
- package/cjs/checkmark-CuKDPAcx.js +5 -0
- package/cjs/{index-BgvZ4y-3.js → index-DWy4nuyZ.js} +41 -0
- package/cjs/lmvz-action-list.cjs.entry.js +2 -2
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +1 -1
- package/cjs/lmvz-button_2.cjs.entry.js +2 -2
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +4 -5
- package/cjs/lmvz-chip.cjs.entry.js +5 -5
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +2 -2
- package/cjs/lmvz-input.cjs.entry.js +4 -7
- package/cjs/lmvz-link.cjs.entry.js +1 -1
- package/cjs/lmvz-menuitem.cjs.entry.js +2 -2
- package/cjs/lmvz-message.cjs.entry.js +2 -2
- package/cjs/lmvz-modal.cjs.entry.js +2 -2
- package/cjs/lmvz-popover.cjs.entry.js +4 -13
- package/cjs/lmvz-radio.cjs.entry.js +2 -2
- package/cjs/lmvz-select.cjs.entry.js +110 -15
- package/cjs/lmvz-snackbar.cjs.entry.js +1 -1
- package/cjs/lmvz-spinner.cjs.entry.js +1 -1
- package/cjs/lmvz-tab.cjs.entry.js +1 -1
- package/cjs/lmvz-tabs.cjs.entry.js +1 -1
- package/cjs/lmvz-toggle.cjs.entry.js +2 -2
- package/cjs/loader.cjs.js +2 -2
- package/collection/components/lmvz-chip/lmvz-chip.css +1 -1
- package/collection/components/lmvz-chip/lmvz-chip.js +2 -2
- package/collection/components/lmvz-input/lmvz-input.js +2 -5
- package/collection/components/lmvz-message/lmvz-message.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +2 -11
- package/collection/components/lmvz-select/lmvz-select.css +46 -12
- package/collection/components/lmvz-select/lmvz-select.js +151 -17
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-datepicker.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/p-B6bUOPCG.js +1 -0
- package/components/{p-BLMXiDE0.js → p-CcP_sfo8.js} +1 -1
- package/components/{p--FDdvoIg.js → p-CgGqXTxQ.js} +1 -1
- package/components/{p-DiRcp9V6.js → p-D3wobLRi.js} +1 -1
- package/components/p-DAikapVO.js +1 -0
- package/components/{p-diOze8wI.js → p-DXFoXTse.js} +1 -1
- package/components/p-D_mff3n7.js +1 -0
- package/components/p-DbBJxuBm.js +1 -0
- package/components/{p-CrQCHVKL.js → p-DfFdoFeH.js} +1 -1
- package/components/{p-DqdrUt_G.js → p-GJaYKpHS.js} +1 -1
- package/components/p-SnHLBAbf.js +1 -0
- package/{lmvz-components/p-BeY96W7m.js → components/p-sACbyedu.js} +1 -1
- package/esm/{aria-validation-controller-Cp6pofER.js → aria-validation-controller-Dwv7n0rk.js} +1 -1
- package/esm/checkmark-DAikapVO.js +3 -0
- package/esm/{index-BOXP1Vx0.js → index-DVab4vzV.js} +41 -1
- package/esm/lmvz-action-list.entry.js +2 -2
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +1 -1
- package/esm/lmvz-button_2.entry.js +2 -2
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +3 -4
- package/esm/lmvz-chip.entry.js +5 -5
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +1 -1
- package/esm/lmvz-header_2.entry.js +2 -2
- package/esm/lmvz-input.entry.js +4 -7
- package/esm/lmvz-link.entry.js +1 -1
- package/esm/lmvz-menuitem.entry.js +2 -2
- package/esm/lmvz-message.entry.js +2 -2
- package/esm/lmvz-modal.entry.js +2 -2
- package/esm/lmvz-popover.entry.js +4 -13
- package/esm/lmvz-radio.entry.js +2 -2
- package/esm/lmvz-select.entry.js +110 -15
- package/esm/lmvz-snackbar.entry.js +1 -1
- package/esm/lmvz-spinner.entry.js +1 -1
- package/esm/lmvz-tab.entry.js +1 -1
- package/esm/lmvz-tabs.entry.js +1 -1
- package/esm/lmvz-toggle.entry.js +2 -2
- package/esm/loader.js +3 -3
- package/hydrate/index.js +159 -37
- package/hydrate/index.mjs +159 -37
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-1e1dea53.entry.js +1 -0
- package/lmvz-components/{p-0f65d001.entry.js → p-27e8b4fa.entry.js} +1 -1
- package/lmvz-components/{p-3d5867df.entry.js → p-335b3867.entry.js} +1 -1
- package/lmvz-components/{p-7872a6b4.entry.js → p-3b7203a3.entry.js} +1 -1
- package/lmvz-components/{p-70f1e31a.entry.js → p-3fc6c3f6.entry.js} +1 -1
- package/lmvz-components/p-6aae1df9.entry.js +1 -0
- package/lmvz-components/p-743616c0.entry.js +1 -0
- package/lmvz-components/{p-26dd9684.entry.js → p-773e9d95.entry.js} +1 -1
- package/lmvz-components/{p-a6fe9b61.entry.js → p-7cbfbc88.entry.js} +1 -1
- package/lmvz-components/p-87f21ac9.entry.js +1 -0
- package/lmvz-components/{p-a680a7b2.entry.js → p-8ba6ec19.entry.js} +1 -1
- package/lmvz-components/{p-57a366e6.entry.js → p-9813a7d2.entry.js} +1 -1
- package/lmvz-components/p-DAikapVO.js +1 -0
- package/lmvz-components/p-DVab4vzV.js +2 -0
- package/{components/p-BAj4FkUt.js → lmvz-components/p-Wi9d2-w9.js} +1 -1
- package/lmvz-components/{p-e14058e1.entry.js → p-b5a5eb9a.entry.js} +1 -1
- package/lmvz-components/{p-00489151.entry.js → p-cadd88e5.entry.js} +1 -1
- package/lmvz-components/p-cebaddb0.entry.js +1 -0
- package/lmvz-components/{p-4deaa010.entry.js → p-d53e69de.entry.js} +1 -1
- package/lmvz-components/{p-eabbf901.entry.js → p-d73bb7fd.entry.js} +1 -1
- package/lmvz-components/{p-398b5cf4.entry.js → p-db75e362.entry.js} +1 -1
- package/lmvz-components/{p-137b1fe1.entry.js → p-e35f49a1.entry.js} +1 -1
- package/lmvz-components/{p-0af0211a.entry.js → p-eb741e1f.entry.js} +1 -1
- package/lmvz-components/{p-88661c50.entry.js → p-efd9d50e.entry.js} +1 -1
- package/lmvz-components/p-f24f5207.entry.js +1 -0
- package/manifest.json +75 -13
- package/package.json +1 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +0 -2
- package/types/components/lmvz-popover/lmvz-popover.d.ts +0 -1
- package/types/components/lmvz-select/lmvz-select.d.ts +12 -2
- package/types/components.d.ts +39 -8
- package/components/p-BApwCp0R.js +0 -1
- package/components/p-BPYBmylI.js +0 -1
- package/components/p-C5gRiLRR.js +0 -1
- package/lmvz-components/p-40716828.entry.js +0 -1
- package/lmvz-components/p-492adf21.entry.js +0 -1
- package/lmvz-components/p-4fa6e72f.entry.js +0 -1
- package/lmvz-components/p-91eb71bb.entry.js +0 -1
- package/lmvz-components/p-BOXP1Vx0.js +0 -2
- package/lmvz-components/p-f3f0ed49.entry.js +0 -1
- package/lmvz-components/p-f516a949.entry.js +0 -1
package/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-
|
|
2
|
+
"timestamp": "2026-08-10T15:37:26",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.5",
|
|
@@ -1426,9 +1426,15 @@
|
|
|
1426
1426
|
],
|
|
1427
1427
|
"parts": [],
|
|
1428
1428
|
"states": [],
|
|
1429
|
-
"dependents": [
|
|
1429
|
+
"dependents": [
|
|
1430
|
+
"lmvz-select"
|
|
1431
|
+
],
|
|
1430
1432
|
"dependencies": [],
|
|
1431
|
-
"dependencyGraph": {
|
|
1433
|
+
"dependencyGraph": {
|
|
1434
|
+
"lmvz-select": [
|
|
1435
|
+
"lmvz-chip"
|
|
1436
|
+
]
|
|
1437
|
+
}
|
|
1432
1438
|
},
|
|
1433
1439
|
{
|
|
1434
1440
|
"filePath": "src/components/lmvz-datepicker/lmvz-datepicker.tsx",
|
|
@@ -7376,7 +7382,7 @@
|
|
|
7376
7382
|
"filePath": "src/components/lmvz-popover/lmvz-popover.tsx",
|
|
7377
7383
|
"encapsulation": "shadow",
|
|
7378
7384
|
"tag": "lmvz-popover",
|
|
7379
|
-
"readme": "# lmvz-popover\n\nA non-modal floating dialog anchored to a trigger element. Positions automatically via `@floating-ui/dom` with collision avoidance (flip and shift middleware). Content-agnostic: accepts any slotted elements.\n\n## Usage\n\nAnchor the popover to a trigger element by setting the `anchor` prop to the trigger's `id` or element reference.\n\nIf no `id` is set on the popover host, one is auto-assigned at load time.\n\n```html\n<button\n id=\"trigger\"\n onclick=\"document.getElementById('my-popover').toggle()\"\n>\n Open menu\n</button>\n<lmvz-popover id=\"my-popover\" anchor=\"trigger\" label=\"Menu options\">\n <p>Popover content goes here</p>\n</lmvz-popover>\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n|---|---|---|---|\n| `open` | `boolean` | `false` | Opens or closes the popover. |\n| `anchor` | `string \\| HTMLElement` | – | Anchor element id or reference for positioning. |\n| `placement` | `'top' \\| 'bottom' \\| 'start' \\| 'end' \\| 'top-start' \\| 'top-end' \\| 'bottom-start' \\| 'bottom-end'` | `'bottom-start'` | Preferred placement relative to the anchor. |\n| `size` | `'sm' \\| 'md' \\| 'lg'` | `'sm'` | Size variant of the card surface. |\n| `autoFocus` | `boolean` | `true` | Moves focus to the first focusable element when opened. |\n| `label` | `string` | – | Accessible label for the popover container (reflected on
|
|
7385
|
+
"readme": "# lmvz-popover\n\nA non-modal floating dialog anchored to a trigger element. Positions automatically via `@floating-ui/dom` with collision avoidance (flip and shift middleware). Content-agnostic: accepts any slotted elements.\n\n## Usage\n\nAnchor the popover to a trigger element by setting the `anchor` prop to the trigger's `id` or element reference.\n\nIf no `id` is set on the popover host, one is auto-assigned at load time.\n\n```html\n<button\n id=\"trigger\"\n onclick=\"document.getElementById('my-popover').toggle()\"\n>\n Open menu\n</button>\n<lmvz-popover id=\"my-popover\" anchor=\"trigger\" label=\"Menu options\">\n <p>Popover content goes here</p>\n</lmvz-popover>\n```\n\n## Props\n\n| Prop | Type | Default | Description |\n|---|---|---|---|\n| `open` | `boolean` | `false` | Opens or closes the popover. |\n| `anchor` | `string \\| HTMLElement` | – | Anchor element id or reference for positioning. |\n| `placement` | `'top' \\| 'bottom' \\| 'start' \\| 'end' \\| 'top-start' \\| 'top-end' \\| 'bottom-start' \\| 'bottom-end'` | `'bottom-start'` | Preferred placement relative to the anchor. |\n| `size` | `'sm' \\| 'md' \\| 'lg'` | `'sm'` | Size variant of the card surface. |\n| `autoFocus` | `boolean` | `true` | Moves focus to the first focusable element when opened. |\n| `label` | `string` | – | Accessible label for the popover container (reflected on host element). |\n\n## Slots\n\n| Slot | Description |\n|---|---|\n| `default` | Popover content. Any elements may be slotted. |\n\n## Events\n\n| Event | Cancelable | Description |\n|---|---|---|\n| `lmvzOpen` | No | Fired after the popover opens. |\n| `lmvzClose` | No | Fired after the popover closes. |\n| `lmvzCancel` | **Yes** | Fired before light-dismiss (click outside) or Escape close. Call `event.preventDefault()` to veto the close and keep the popover open. |\n\n## Methods\n\n| Method | Returns | Description |\n|---|---|---|\n| `show()` | `Promise<void>` | Opens the popover. |\n| `hide()` | `Promise<void>` | Closes the popover after firing `lmvzCancel`. If `lmvzCancel` is prevented, the popover remains open. |\n| `toggle()` | `Promise<void>` | Toggles the open state. |\n\n## CSS Customization\n\n### Shadow Parts\n\n| Part | Description |\n|---|---|\n| `container` | The popover's content container (a styled surface). The ARIA role is on the host element, not this container. Target to customize sizing, overflow, or visual appearance. |\n\n### Custom Properties\n\n| Property | Description | Default |\n|---|---|---|\n| `--lmvz-popover-max-width` | Maximum width of the popover surface. | `none` |\n| `--lmvz-popover-max-height` | Maximum height of the popover surface. | `none` |\n| `--lmvz-popover-z-index` | Z-index of the popover surface. | `1` |\n\n## Accessibility\n\n### Trigger Requirements\n\nWhen you set the `anchor` prop, the popover automatically writes three ARIA attributes to the resolved anchor element for screen reader and assistive technology support:\n\n- **`aria-haspopup=\"dialog\"`** — Announces that the trigger opens a dialog.\n- **`aria-expanded`** — Reflects the popover's open state (`\"true\"` when open, `\"false\"` when closed).\n- **`aria-controls`** — Points to the popover's `id` to establish the relationship between trigger and content.\n\nDo not set these attributes manually. Exception: if you pre-set `aria-haspopup` to a different value (e.g. `\"menu\"` for an action-list popover), the component preserves your value.\n\n### Content Semantics\n\nThe popover's ARIA role and accessible label are applied to the **host element** (not an internal container). The role defaults to `'dialog'`, configurable via the `containerRole` prop. Provide a `label` prop or set `aria-labelledby` on the host element to satisfy dialog labeling requirements.\n\nConsumers may set additional ARIA attributes directly on the `<lmvz-popover>` host element as plain attributes. For example, when using the popover as a listbox in a combobox pattern, set `aria-multiselectable=\"true\"` on the host if the listbox supports multiselection:\n\n```html\n<lmvz-popover container-role=\"listbox\" aria-multiselectable=\"true\">\n <!-- listbox content -->\n</lmvz-popover>\n```\n\n**Accessibility note (WebKit/Safari):** The host element uses `display: contents`, combined with an explicit host-level `role`. This combination has a known cross-engine accessibility-tree inconsistency in WebKit/Safari that is not fully resolvable in the current Stencil architecture. This design has been accepted as a documented trade-off to maintain semantic clarity in the DOM.\n\n### AriaValidation\n\nWhen `@lmvz-ds/aria-validation` is enabled (development only), the component validates:\n\n- **Host element:** Must have an accessible label via the `label` prop or `aria-labelledby` attribute.\n- **Anchor element:** Must be interactive and focusable (e.g., `<button>`, `<a href>`, elements with `tabindex`, or elements with an interactive ARIA role). Non-interactive anchors produce a dev-time warning.\n\nValidation is disabled in production builds and test runtimes.\n\n## Notes\n\n- The popover is non-modal: focus is not trapped, and interaction outside does not require acknowledgment.\n- Positioning is automatic with collision avoidance. Use `placement` to express preference, but the component will flip or shift as needed to keep content visible.\n- Light-dismiss (clicking outside the popover or pressing Escape) fires `lmvzCancel` first, allowing consumers to intercept and prevent close (e.g., to warn unsaved changes).\n\n## Integration Patterns\n\n### Combobox and Listbox (Active Descendant Model)\n\nThe popover supports integration with combobox and listbox components via the `containerRole` prop. When `containerRole` is set to a non-dialog value (e.g. `'listbox'`, `'menu'`, `'tree'`, or `'grid'`):\n\n- The popover container receives the specified ARIA role instead of `role=\"dialog\"`\n- Focus remains on the trigger/anchor element (active descendant pattern), so `autoFocus` has no effect\n- `aria-haspopup` on the anchor is automatically set to match the `containerRole` value\n\nThis enables tight integration with components like `lmvz-select`, which uses `containerRole=\"listbox\"` to implement the WAI-ARIA combobox pattern with a listbox popup. In this mode, the popover acts as a styled container while the trigger manages focus and active descendant state.\n\n## Out of Scope\n\nBroader component integration patterns (e.g., date-picker, action menu with complex internal logic) remain the responsibility of consuming applications. The popover provides the container and positioning mechanism; application-specific behavior flows stay at the consuming component level.\n",
|
|
7380
7386
|
"docs": "A non-modal floating dialog anchored to a trigger element. Positions automatically via `@floating-ui/dom` with collision avoidance (flip and shift middleware). Content-agnostic: accepts any slotted elements.",
|
|
7381
7387
|
"docsTags": [
|
|
7382
7388
|
{
|
|
@@ -8247,8 +8253,8 @@
|
|
|
8247
8253
|
"filePath": "src/components/lmvz-select/lmvz-select.tsx",
|
|
8248
8254
|
"encapsulation": "scoped",
|
|
8249
8255
|
"tag": "lmvz-select",
|
|
8250
|
-
"readme": "# lmvz-select\n\nSelect component with floating label and pill-shaped trigger that implements the WAI-ARIA \"combobox with listbox popup\" pattern.\n\n## What changed: Breaking rewrite from native `<select>` to custom WAI-ARIA combobox\n\nIn previous versions, `lmvz-select` wrapped a native `<select>` element and inherited its form behavior and platform-specific UI (including native mobile pickers on iOS/Android). As of this version, it is a fully custom WAI-ARIA combobox implemented using:\n\n- A `role=\"combobox\"` trigger button (your interaction target)\n- A `role=\"listbox\"` popup menu hosted in `lmvz-popover`\n- Focus management via `aria-activedescendant` (trigger keeps focus; the selected item is tracked via an aria attribute rather than DOM focus)\n- Form submission via `ElementInternals` (like `lmvz-input`, `lmvz-checkbox`, etc. in this design system)\n\n**What consumers must know:**\n\n- **No native mobile picker:** On iOS, Android, and other platforms, users see the custom popup instead of the OS-native picker. This is by design, to ensure consistent styling and behavior across platforms.\n- **Slot contract:** You pass native `<option>` and `<optgroup>` elements as children. The component translates them internally to `role=\"listbox\"` and `role=\"option\"` elements.\n- **`<option selected>` is meaningful:** If you do not set the `value` prop, the first `<option selected=\"selected\">` becomes the initial value.\n- **Validation is minimal:** The component uses native HTML form constraint validation (`ElementInternals.setValidity()`). When `required` is true and no value is set, the browser's default validation UI appears on form submit; the component does not provide custom validation message styling beyond `errorMessage` (which you control via props).\n- **Form submission:** Use the `name` attribute (set directly on the `<lmvz-select>` host) and the current `value` to participate in HTML form submission. Form reset correctly restores the initial value.\n\n## Slot contract\n\nThe default slot accepts only native `<option>` and `<optgroup>` elements. The component reads this markup once on mount and translates it into an internal listbox model, re-parsing whenever the slotted content changes structurally (options/optgroups added or removed) or an already-slotted option/optgroup is mutated in place (e.g. `.disabled`, `.selected`, `.value`, `.label`, or its text content), mirroring native `<select>` reactivity. The slotted markup is never rendered; it serves as a template.\n\n```html\n<lmvz-select label=\"Fruit\" name=\"fruit\">\n <option value=\"apple\">Apple</option>\n <optgroup label=\"Citrus\">\n <option value=\"orange\">Orange</option>\n <option value=\"lemon\">Lemon</option>\n </optgroup>\n <option value=\"banana\" selected>Banana</option>\n</lmvz-select>\n```\n\n## Form integration\n\n`lmvz-select` is a form-associated custom element (`formAssociated: true`). Set the `name` attribute on the host element, and the component participates in:\n\n- **Form submission:** The current `value` is submitted under the `name` key.\n- **Form reset:** Restores `value` to
|
|
8251
|
-
"docs": "Select component with floating label and pill-shaped trigger.\nImplements the WAI-ARIA APG \"combobox with listbox popup\" pattern: a `role=\"combobox\"`\ntrigger drives an `lmvz-popover`-hosted `role=\"listbox\"`/`role=\"option\"` list via the\nactivedescendant model (the trigger keeps real DOM focus; `aria-activedescendant` tracks\nthe highlighted option).\n\nParticipates in native HTML forms via `ElementInternals` (form-associated custom element):\nthe `name` attribute (set directly on the host element) and the current `value` are submitted
|
|
8256
|
+
"readme": "# lmvz-select\n\nSelect component with floating label and pill-shaped trigger that implements the WAI-ARIA \"combobox with listbox popup\" pattern.\n\n## What changed: Breaking rewrite from native `<select>` to custom WAI-ARIA combobox\n\nIn previous versions, `lmvz-select` wrapped a native `<select>` element and inherited its form behavior and platform-specific UI (including native mobile pickers on iOS/Android). As of this version, it is a fully custom WAI-ARIA combobox implemented using:\n\n- A `role=\"combobox\"` trigger button (your interaction target)\n- A `role=\"listbox\"` popup menu hosted in `lmvz-popover`\n- Focus management via `aria-activedescendant` (trigger keeps focus; the selected item is tracked via an aria attribute rather than DOM focus)\n- Form submission via `ElementInternals` (like `lmvz-input`, `lmvz-checkbox`, etc. in this design system)\n\n**What consumers must know:**\n\n- **No native mobile picker:** On iOS, Android, and other platforms, users see the custom popup instead of the OS-native picker. This is by design, to ensure consistent styling and behavior across platforms.\n- **Slot contract:** You pass native `<option>` and `<optgroup>` elements as children. The component translates them internally to `role=\"listbox\"` and `role=\"option\"` elements.\n- **`<option selected>` is meaningful:** If you do not set the `value` prop, the first `<option selected=\"selected\">` becomes the initial value (or, in multiselect mode, all enabled `<option selected>` elements are collected into the initial `values`).\n- **Validation is minimal:** The component uses native HTML form constraint validation (`ElementInternals.setValidity()`). When `required` is true and no value is set, the browser's default validation UI appears on form submit; the component does not provide custom validation message styling beyond `errorMessage` (which you control via props).\n- **Form submission:** Use the `name` attribute (set directly on the `<lmvz-select>` host) and the current `value` to participate in HTML form submission. Form reset correctly restores the initial value.\n\n### Multiselect mode\n\nSet the `multiple` prop to enable multiselect mode. When `multiple` is `true`:\n\n- **Selection is tracked in `values`** (a `string[]` array), not in the single-select `value` prop. The `value` prop is ignored; do not set it alongside `multiple`.\n- **Options toggle membership** on selection instead of replacing a single value. Selecting an already-selected option deselects it.\n- **The listbox stays open** after selecting or deselecting an option. Close it via Escape, outside click, or re-clicking the trigger.\n- **The closed trigger renders one chip per selected value** for display only, using the `lmvz-chip` component. Removing a value is done by reselecting it in the open listbox.\n- **Keyboard selection works the same:** Space or Enter while an option is active (highlighted) toggles its selection without closing the popover.\n- **Preselection:** Pass `<option selected>` elements — *all* enabled ones are collected into the initial `values` array, not just the first (mirroring how `<select multiple>` works).\n- **Known limitation:** A \"select all\" control is not implemented in this iteration; it is planned as a future follow-up.\n\n## Slot contract\n\nThe default slot accepts only native `<option>` and `<optgroup>` elements. The component reads this markup once on mount and translates it into an internal listbox model, re-parsing whenever the slotted content changes structurally (options/optgroups added or removed) or an already-slotted option/optgroup is mutated in place (e.g. `.disabled`, `.selected`, `.value`, `.label`, or its text content), mirroring native `<select>` reactivity. The slotted markup is never rendered; it serves as a template.\n\n```html\n<lmvz-select label=\"Fruit\" name=\"fruit\">\n <option value=\"apple\">Apple</option>\n <optgroup label=\"Citrus\">\n <option value=\"orange\">Orange</option>\n <option value=\"lemon\">Lemon</option>\n </optgroup>\n <option value=\"banana\" selected>Banana</option>\n</lmvz-select>\n```\n\n## Form integration\n\n`lmvz-select` is a form-associated custom element (`formAssociated: true`). Set the `name` attribute on the host element, and the component participates in:\n\n- **Form submission:** The current `value` is submitted under the `name` key (single-select mode), or multiple form entries are submitted (multiselect mode).\n- **Form reset:** Restores `value` or `values` to their initial state (the prop values at mount time).\n- **Validation:** Set `required` to enforce that a value is present. Use `checkValidity()`, `reportValidity()`, and `getValidationMessage()` methods for programmatic validation.\n\n### Multiselect form submission\n\nIn multiselect mode (`multiple` true), form submission uses `FormData` to submit one entry per selected value:\n\n```javascript\nconst form = document.querySelector('form');\nconst formData = new FormData(form);\n// If the select has name=\"country\" and values=[\"ch\", \"de\"], then:\n// formData.getAll('country') returns ['ch', 'de']\n```\n\nForm reset restores `values` to its initial state (all enabled `<option selected>` elements, or an empty array if none). Programmatically, you can also detect multiselect form state restoration via the `formStateRestoreCallback()` lifecycle (called during form reset or history navigation).\n\n## Props explained\n\n### `size`\n\n- Type: `'small' | 'default' | 'large'`\n- Default: `'default'`\n\nControls the visual height variant of the select trigger. Use `small` for compact layouts, `default` for standard use, and `large` for emphasis.\n\n### `highlighted`\n\n- Type: `boolean`\n- Default: `false`\n\nIndicates that an active filter or selection applies (e.g., a filter chip is active). When `true`:\n- The host attribute `[highlighted]` is present for CSS styling (`:host([highlighted])`).\n- The host attribute `data-highlighted=\"true\"` is set for assistive-technology consumers.\n\nWhen `false`, `data-highlighted=\"false\"` is set. The `data-highlighted` attribute (rather than `aria-pressed`) provides this accessible contract; `aria-selected` is reserved for the `role=\"option\"` elements in the listbox popup.\n\n### `error`\n\n- Type: `boolean`\n- Default: `false`\n- Reflected as host attribute: yes\n\nWhen `true`:\n- Applies danger-themed border color to the combobox trigger.\n- Sets `aria-invalid=\"true\"` on the trigger element.\n\n`aria-invalid` is also automatically set to `true` when the select's real constraint validity becomes invalid following a validation attempt (e.g., after a failed `submit`, `checkValidity()`, or `reportValidity()` call), and is cleared once the constraint is resolved. This allows automatic reflect of native HTML5 validation state independent of the `error` prop.\n\nTypically set alongside `errorMessage` to provide inline error text.\n\n### `errorMessage`\n\n- Type: `string | undefined`\n- Default: `undefined`\n\nError message text rendered below the select field when `error={true}`. Rendered as an assertive live region (`role=\"alert\"`), linked to the trigger via `aria-describedby` and `aria-errormessage`.\n\nCoexists with `helperText` — both can be displayed simultaneously, with `helperText` rendered first.\n",
|
|
8257
|
+
"docs": "Select component with floating label and pill-shaped trigger.\nImplements the WAI-ARIA APG \"combobox with listbox popup\" pattern: a `role=\"combobox\"`\ntrigger drives an `lmvz-popover`-hosted `role=\"listbox\"`/`role=\"option\"` list via the\nactivedescendant model (the trigger keeps real DOM focus; `aria-activedescendant` tracks\nthe highlighted option).\n\nSupports an opt-in multiselect mode (`multiple`): selection is tracked in `values` (an array)\ninstead of the single-select `value`, selecting an option toggles its membership without\nclosing the popup, and the closed trigger renders one `lmvz-chip` per selected value for\ndisplay only — removing a value is done by reselecting it in the open listbox, not from a\nchip control.\n\nParticipates in native HTML forms via `ElementInternals` (form-associated custom element):\nthe `name` attribute (set directly on the host element) and the current `value` (or, in\nmultiselect mode, one form entry per selected `values` entry) are submitted, and selection\nresets to its initial state on form reset.",
|
|
8252
8258
|
"docsTags": [
|
|
8253
8259
|
{
|
|
8254
8260
|
"name": "example",
|
|
@@ -8260,7 +8266,7 @@
|
|
|
8260
8266
|
},
|
|
8261
8267
|
{
|
|
8262
8268
|
"name": "slot",
|
|
8263
|
-
"text": "default - Native `<option>` or `<optgroup>` elements. Never rendered directly; read once\nassigned to build the internal `role=\"option\"` listbox, and re-read on structural slot changes\nor in-place mutation (attribute/text/subtree) of already-slotted elements. `<option selected>`\ndetermines the initial value when the `value` prop is not set."
|
|
8269
|
+
"text": "default - Native `<option>` or `<optgroup>` elements. Never rendered directly; read once\nassigned to build the internal `role=\"option\"` listbox, and re-read on structural slot changes\nor in-place mutation (attribute/text/subtree) of already-slotted elements. `<option selected>`\ndetermines the initial value (or, in multiselect mode, the initial `values`) when the `value`/\n`values` prop is not set."
|
|
8264
8270
|
}
|
|
8265
8271
|
],
|
|
8266
8272
|
"usage": {},
|
|
@@ -8426,6 +8432,35 @@
|
|
|
8426
8432
|
"getter": false,
|
|
8427
8433
|
"setter": false
|
|
8428
8434
|
},
|
|
8435
|
+
{
|
|
8436
|
+
"name": "multiple",
|
|
8437
|
+
"type": "boolean",
|
|
8438
|
+
"complexType": {
|
|
8439
|
+
"original": "boolean",
|
|
8440
|
+
"resolved": "boolean",
|
|
8441
|
+
"references": {}
|
|
8442
|
+
},
|
|
8443
|
+
"mutable": false,
|
|
8444
|
+
"attr": "multiple",
|
|
8445
|
+
"reflectToAttr": true,
|
|
8446
|
+
"docs": "Enables multiselect mode. When `true`, `values` becomes the sole selection source (`value`\nis not read or written by the component), options toggle membership on selection instead of\nreplacing a single value, the popup stays open after selecting/deselecting an option, and the\nclosed trigger renders one `lmvz-chip` per selected value for display only. Removing a value\nis done by reselecting it in the open listbox (via `handleOptionSelect`'s toggle-off path),\nnot from a control on the chip itself.",
|
|
8447
|
+
"docsTags": [
|
|
8448
|
+
{
|
|
8449
|
+
"name": "default",
|
|
8450
|
+
"text": "false"
|
|
8451
|
+
}
|
|
8452
|
+
],
|
|
8453
|
+
"default": "false",
|
|
8454
|
+
"values": [
|
|
8455
|
+
{
|
|
8456
|
+
"type": "boolean"
|
|
8457
|
+
}
|
|
8458
|
+
],
|
|
8459
|
+
"optional": false,
|
|
8460
|
+
"required": false,
|
|
8461
|
+
"getter": false,
|
|
8462
|
+
"setter": false
|
|
8463
|
+
},
|
|
8429
8464
|
{
|
|
8430
8465
|
"name": "name",
|
|
8431
8466
|
"type": "string | undefined",
|
|
@@ -8537,7 +8572,7 @@
|
|
|
8537
8572
|
"mutable": true,
|
|
8538
8573
|
"attr": "value",
|
|
8539
8574
|
"reflectToAttr": false,
|
|
8540
|
-
"docs": "Currently selected value.",
|
|
8575
|
+
"docs": "Currently selected value. Ignored (not read or written) when `multiple` is `true` — use\n`values` instead.",
|
|
8541
8576
|
"docsTags": [],
|
|
8542
8577
|
"values": [
|
|
8543
8578
|
{
|
|
@@ -8551,6 +8586,31 @@
|
|
|
8551
8586
|
"required": false,
|
|
8552
8587
|
"getter": false,
|
|
8553
8588
|
"setter": false
|
|
8589
|
+
},
|
|
8590
|
+
{
|
|
8591
|
+
"name": "values",
|
|
8592
|
+
"type": "string[] | undefined",
|
|
8593
|
+
"complexType": {
|
|
8594
|
+
"original": "string[]",
|
|
8595
|
+
"resolved": "string[] | undefined",
|
|
8596
|
+
"references": {}
|
|
8597
|
+
},
|
|
8598
|
+
"mutable": true,
|
|
8599
|
+
"reflectToAttr": false,
|
|
8600
|
+
"docs": "Currently selected values in multiselect mode (`multiple` true). Not attribute-reflected;\nset/read as a JS property. Preselection collects every enabled `<option selected>` (not just\nthe first) into the initial value when unset.",
|
|
8601
|
+
"docsTags": [],
|
|
8602
|
+
"values": [
|
|
8603
|
+
{
|
|
8604
|
+
"type": "string[]"
|
|
8605
|
+
},
|
|
8606
|
+
{
|
|
8607
|
+
"type": "undefined"
|
|
8608
|
+
}
|
|
8609
|
+
],
|
|
8610
|
+
"optional": true,
|
|
8611
|
+
"required": false,
|
|
8612
|
+
"getter": false,
|
|
8613
|
+
"setter": false
|
|
8554
8614
|
}
|
|
8555
8615
|
],
|
|
8556
8616
|
"methods": [
|
|
@@ -8668,16 +8728,16 @@
|
|
|
8668
8728
|
"events": [
|
|
8669
8729
|
{
|
|
8670
8730
|
"event": "lmvzChange",
|
|
8671
|
-
"detail": "string",
|
|
8731
|
+
"detail": "string | string[]",
|
|
8672
8732
|
"bubbles": true,
|
|
8673
8733
|
"complexType": {
|
|
8674
|
-
"original": "string",
|
|
8675
|
-
"resolved": "string",
|
|
8734
|
+
"original": "string | string[]",
|
|
8735
|
+
"resolved": "string | string[]",
|
|
8676
8736
|
"references": {}
|
|
8677
8737
|
},
|
|
8678
8738
|
"cancelable": true,
|
|
8679
8739
|
"composed": true,
|
|
8680
|
-
"docs": "Emitted when the user
|
|
8740
|
+
"docs": "Emitted when the user changes the selection. Detail contains the new value:\na `string` in single-select mode (`multiple` false/unset — same shape as before), or the\nfull updated `string[]` of selected values in multiselect mode (`multiple` true).",
|
|
8681
8741
|
"docsTags": []
|
|
8682
8742
|
}
|
|
8683
8743
|
],
|
|
@@ -8692,17 +8752,19 @@
|
|
|
8692
8752
|
"slots": [
|
|
8693
8753
|
{
|
|
8694
8754
|
"name": "default",
|
|
8695
|
-
"docs": "Native `<option>` or `<optgroup>` elements. Never rendered directly; read once\nassigned to build the internal `role=\"option\"` listbox, and re-read on structural slot changes\nor in-place mutation (attribute/text/subtree) of already-slotted elements. `<option selected>`\ndetermines the initial value when the `value` prop is not set."
|
|
8755
|
+
"docs": "Native `<option>` or `<optgroup>` elements. Never rendered directly; read once\nassigned to build the internal `role=\"option\"` listbox, and re-read on structural slot changes\nor in-place mutation (attribute/text/subtree) of already-slotted elements. `<option selected>`\ndetermines the initial value (or, in multiselect mode, the initial `values`) when the `value`/\n`values` prop is not set."
|
|
8696
8756
|
}
|
|
8697
8757
|
],
|
|
8698
8758
|
"parts": [],
|
|
8699
8759
|
"states": [],
|
|
8700
8760
|
"dependents": [],
|
|
8701
8761
|
"dependencies": [
|
|
8762
|
+
"lmvz-chip",
|
|
8702
8763
|
"lmvz-popover"
|
|
8703
8764
|
],
|
|
8704
8765
|
"dependencyGraph": {
|
|
8705
8766
|
"lmvz-select": [
|
|
8767
|
+
"lmvz-chip",
|
|
8706
8768
|
"lmvz-popover"
|
|
8707
8769
|
]
|
|
8708
8770
|
}
|
package/package.json
CHANGED
|
@@ -64,8 +64,6 @@ export declare class LmvzInput extends ReactiveControllerHost implements AriaVal
|
|
|
64
64
|
protected handleValueChange(newValue: string | undefined): void;
|
|
65
65
|
protected handleDisabledChange(disabled: boolean): void;
|
|
66
66
|
private handleInput;
|
|
67
|
-
private handleChange;
|
|
68
|
-
private handleFocus;
|
|
69
67
|
private handleInvalid;
|
|
70
68
|
private handleBlur;
|
|
71
69
|
private updateNativeError;
|
|
@@ -25,7 +25,6 @@ export declare class LmvzPopover {
|
|
|
25
25
|
protected handleOpenChange(isOpen: boolean): void;
|
|
26
26
|
protected handleAnchorChange(anchor: string | HTMLElement | undefined): Promise<void>;
|
|
27
27
|
disconnectedCallback(): void;
|
|
28
|
-
private syncContainerId;
|
|
29
28
|
private setupAnchorEl;
|
|
30
29
|
private updatePosition;
|
|
31
30
|
private onOpen;
|
|
@@ -14,6 +14,8 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
|
|
|
14
14
|
private optionsMutationObserver?;
|
|
15
15
|
private initialValue?;
|
|
16
16
|
private initialValueCaptured;
|
|
17
|
+
private initialValues?;
|
|
18
|
+
private initialValuesCaptured;
|
|
17
19
|
private flatOptions;
|
|
18
20
|
private optionsById;
|
|
19
21
|
private readonly listboxController;
|
|
@@ -22,8 +24,10 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
|
|
|
22
24
|
private get errorId();
|
|
23
25
|
private get describedBy();
|
|
24
26
|
constructor();
|
|
25
|
-
lmvzChange: EventEmitter<string>;
|
|
27
|
+
lmvzChange: EventEmitter<string | string[]>;
|
|
26
28
|
value?: string;
|
|
29
|
+
multiple: boolean;
|
|
30
|
+
values?: string[];
|
|
27
31
|
label: string;
|
|
28
32
|
helperText?: string;
|
|
29
33
|
private nativeError;
|
|
@@ -42,6 +46,8 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
|
|
|
42
46
|
private isOpen;
|
|
43
47
|
private optionGroups;
|
|
44
48
|
private get hasValue();
|
|
49
|
+
private get triggerAriaLabel();
|
|
50
|
+
private get chipSize();
|
|
45
51
|
componentWillLoad(): void;
|
|
46
52
|
componentDidLoad(): void;
|
|
47
53
|
disconnectedCallback(): void;
|
|
@@ -53,12 +59,15 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
|
|
|
53
59
|
getValidationMessage(): Promise<string>;
|
|
54
60
|
formAssociatedCallback(form: HTMLFormElement | undefined): void;
|
|
55
61
|
formResetCallback(): void;
|
|
56
|
-
formStateRestoreCallback(state: string): void;
|
|
62
|
+
formStateRestoreCallback(state: string | FormData | File): void;
|
|
57
63
|
protected handleValueChange(newValue: string | undefined): void;
|
|
64
|
+
protected handleValuesChange(): void;
|
|
58
65
|
protected handleRequiredChange(): void;
|
|
59
66
|
protected handleDisabledChange(disabled: boolean): void;
|
|
60
67
|
private handleSlotChange;
|
|
61
68
|
private applySelectionFromValue;
|
|
69
|
+
private isOptionSelected;
|
|
70
|
+
private syncFormValue;
|
|
62
71
|
private updateValidity;
|
|
63
72
|
protected handleInvalid(): void;
|
|
64
73
|
private handleOptionSelect;
|
|
@@ -72,5 +81,6 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
|
|
|
72
81
|
private closePopover;
|
|
73
82
|
private renderOptionGroups;
|
|
74
83
|
private renderOption;
|
|
84
|
+
private renderChips;
|
|
75
85
|
render(): any;
|
|
76
86
|
}
|
package/types/components.d.ts
CHANGED
|
@@ -729,9 +729,15 @@ export declare namespace Components {
|
|
|
729
729
|
* trigger drives an `lmvz-popover`-hosted `role="listbox"`/`role="option"` list via the
|
|
730
730
|
* activedescendant model (the trigger keeps real DOM focus; `aria-activedescendant` tracks
|
|
731
731
|
* the highlighted option).
|
|
732
|
+
* Supports an opt-in multiselect mode (`multiple`): selection is tracked in `values` (an array)
|
|
733
|
+
* instead of the single-select `value`, selecting an option toggles its membership without
|
|
734
|
+
* closing the popup, and the closed trigger renders one `lmvz-chip` per selected value for
|
|
735
|
+
* display only — removing a value is done by reselecting it in the open listbox, not from a
|
|
736
|
+
* chip control.
|
|
732
737
|
* Participates in native HTML forms via `ElementInternals` (form-associated custom element):
|
|
733
|
-
* the `name` attribute (set directly on the host element) and the current `value`
|
|
734
|
-
*
|
|
738
|
+
* the `name` attribute (set directly on the host element) and the current `value` (or, in
|
|
739
|
+
* multiselect mode, one form entry per selected `values` entry) are submitted, and selection
|
|
740
|
+
* resets to its initial state on form reset.
|
|
735
741
|
* @example ```html
|
|
736
742
|
* <lmvz-select label="Country" name="country">
|
|
737
743
|
* <option value="ch">Switzerland</option>
|
|
@@ -788,6 +794,11 @@ export declare namespace Components {
|
|
|
788
794
|
* Label text displayed as a placeholder when no value is selected, and floated above the trigger when a value is present.
|
|
789
795
|
*/
|
|
790
796
|
"label": string;
|
|
797
|
+
/**
|
|
798
|
+
* Enables multiselect mode. When `true`, `values` becomes the sole selection source (`value` is not read or written by the component), options toggle membership on selection instead of replacing a single value, the popup stays open after selecting/deselecting an option, and the closed trigger renders one `lmvz-chip` per selected value for display only. Removing a value is done by reselecting it in the open listbox (via `handleOptionSelect`'s toggle-off path), not from a control on the chip itself.
|
|
799
|
+
* @default false
|
|
800
|
+
*/
|
|
801
|
+
"multiple": boolean;
|
|
791
802
|
/**
|
|
792
803
|
* Name attribute for form submission via ElementInternals.
|
|
793
804
|
*/
|
|
@@ -807,9 +818,13 @@ export declare namespace Components {
|
|
|
807
818
|
*/
|
|
808
819
|
"size": Select.Size;
|
|
809
820
|
/**
|
|
810
|
-
* Currently selected value.
|
|
821
|
+
* Currently selected value. Ignored (not read or written) when `multiple` is `true` — use `values` instead.
|
|
811
822
|
*/
|
|
812
823
|
"value"?: string;
|
|
824
|
+
/**
|
|
825
|
+
* Currently selected values in multiselect mode (`multiple` true). Not attribute-reflected; set/read as a JS property. Preselection collects every enabled `<option selected>` (not just the first) into the initial value when unset.
|
|
826
|
+
*/
|
|
827
|
+
"values"?: string[];
|
|
813
828
|
}
|
|
814
829
|
export interface LmvzSnackbar {
|
|
815
830
|
"actionLabel"?: string;
|
|
@@ -1732,9 +1747,15 @@ export declare namespace JSX {
|
|
|
1732
1747
|
* trigger drives an `lmvz-popover`-hosted `role="listbox"`/`role="option"` list via the
|
|
1733
1748
|
* activedescendant model (the trigger keeps real DOM focus; `aria-activedescendant` tracks
|
|
1734
1749
|
* the highlighted option).
|
|
1750
|
+
* Supports an opt-in multiselect mode (`multiple`): selection is tracked in `values` (an array)
|
|
1751
|
+
* instead of the single-select `value`, selecting an option toggles its membership without
|
|
1752
|
+
* closing the popup, and the closed trigger renders one `lmvz-chip` per selected value for
|
|
1753
|
+
* display only — removing a value is done by reselecting it in the open listbox, not from a
|
|
1754
|
+
* chip control.
|
|
1735
1755
|
* Participates in native HTML forms via `ElementInternals` (form-associated custom element):
|
|
1736
|
-
* the `name` attribute (set directly on the host element) and the current `value`
|
|
1737
|
-
*
|
|
1756
|
+
* the `name` attribute (set directly on the host element) and the current `value` (or, in
|
|
1757
|
+
* multiselect mode, one form entry per selected `values` entry) are submitted, and selection
|
|
1758
|
+
* resets to its initial state on form reset.
|
|
1738
1759
|
* @example ```html
|
|
1739
1760
|
* <lmvz-select label="Country" name="country">
|
|
1740
1761
|
* <option value="ch">Switzerland</option>
|
|
@@ -1779,14 +1800,19 @@ export declare namespace JSX {
|
|
|
1779
1800
|
* Label text displayed as a placeholder when no value is selected, and floated above the trigger when a value is present.
|
|
1780
1801
|
*/
|
|
1781
1802
|
"label": string;
|
|
1803
|
+
/**
|
|
1804
|
+
* Enables multiselect mode. When `true`, `values` becomes the sole selection source (`value` is not read or written by the component), options toggle membership on selection instead of replacing a single value, the popup stays open after selecting/deselecting an option, and the closed trigger renders one `lmvz-chip` per selected value for display only. Removing a value is done by reselecting it in the open listbox (via `handleOptionSelect`'s toggle-off path), not from a control on the chip itself.
|
|
1805
|
+
* @default false
|
|
1806
|
+
*/
|
|
1807
|
+
"multiple"?: boolean;
|
|
1782
1808
|
/**
|
|
1783
1809
|
* Name attribute for form submission via ElementInternals.
|
|
1784
1810
|
*/
|
|
1785
1811
|
"name"?: string;
|
|
1786
1812
|
/**
|
|
1787
|
-
* Emitted when the user
|
|
1813
|
+
* Emitted when the user changes the selection. Detail contains the new value: a `string` in single-select mode (`multiple` false/unset — same shape as before), or the full updated `string[]` of selected values in multiselect mode (`multiple` true).
|
|
1788
1814
|
*/
|
|
1789
|
-
"onLmvzChange"?: (event: LmvzSelectCustomEvent<string>) => void;
|
|
1815
|
+
"onLmvzChange"?: (event: LmvzSelectCustomEvent<string | string[]>) => void;
|
|
1790
1816
|
/**
|
|
1791
1817
|
* Whether a value is required.
|
|
1792
1818
|
* @default false
|
|
@@ -1798,9 +1824,13 @@ export declare namespace JSX {
|
|
|
1798
1824
|
*/
|
|
1799
1825
|
"size"?: Select.Size;
|
|
1800
1826
|
/**
|
|
1801
|
-
* Currently selected value.
|
|
1827
|
+
* Currently selected value. Ignored (not read or written) when `multiple` is `true` — use `values` instead.
|
|
1802
1828
|
*/
|
|
1803
1829
|
"value"?: string;
|
|
1830
|
+
/**
|
|
1831
|
+
* Currently selected values in multiselect mode (`multiple` true). Not attribute-reflected; set/read as a JS property. Preselection collects every enabled `<option selected>` (not just the first) into the initial value when unset.
|
|
1832
|
+
*/
|
|
1833
|
+
"values"?: string[];
|
|
1804
1834
|
}
|
|
1805
1835
|
export interface LmvzSnackbar {
|
|
1806
1836
|
"actionLabel"?: string;
|
|
@@ -2087,6 +2117,7 @@ export declare namespace JSX {
|
|
|
2087
2117
|
}
|
|
2088
2118
|
export interface LmvzSelectAttributes {
|
|
2089
2119
|
"value": string;
|
|
2120
|
+
"multiple": boolean;
|
|
2090
2121
|
"label": string;
|
|
2091
2122
|
"helperText": string;
|
|
2092
2123
|
"error": boolean;
|
package/components/p-BApwCp0R.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,c as t,h as i,t as r}from"./p-BPYBmylI.js";import{c as a}from"./p-BfTCfPZ1.js";import{A as o}from"./p-BAj4FkUt.js";import{a as n}from"./p-C-pRMuMh.js";import{R as s}from"./p-diOze8wI.js";import{c as l}from"./p-bh9cItsP.js";let p=0;const m=e(class extends s{get el(){return this}get validationEl(){return this.el}lmvzInput;internals;inputValidityActive=!1;nativeInputElement;inputId="lmvz-input-"+p++;initialValue="";ariaHostMirrorObserver;nativeError=!1;errorFromProp=!1;get helperId(){return this.helperText?`${this.inputId}-helper`:void 0}get showErrorMessage(){return this.error&&Boolean(this.errorMessage)}get errorId(){return`${this.inputId}-error`}get describedBy(){const e=[];return this.helperId&&e.push(this.helperId),this.showErrorMessage&&e.push(this.errorId),e.length>0?e.join(" "):void 0}value;label;helperText;placeholder;disabled=!1;readonly=!1;required=!1;name;type="text";errorMessage;autocomplete;inputmode;autocorrect;autocapitalize;spellcheck;autofocus=!1;minlength;maxlength;pattern;min;max;step;form;size="md";get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}async setValue(e){const t=this.nativeInputElement,i=e??"";t&&t.value!==i&&(t.value=i),this.value=i,this.internals.setFormValue?.(i),this.lmvzInput.emit(i)}async focusInput(){this.nativeInputElement?.focus()}async blurInput(){this.nativeInputElement?.blur()}async select(){this.nativeInputElement?.select()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getValidationMessage(){return this.nativeInputElement?.validationMessage??""}async getInputElement(){return this.nativeInputElement||await new Promise((e=>l(this.el,e))),Promise.resolve(this.nativeInputElement)}constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzInput=t(this,"lmvzInput",7),this.internals=this.attachInternals(),this.addController(new o(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialValue=this.value??"",super.componentWillLoad()}connectedCallback(){super.connectedCallback(),this.ariaHostMirrorObserver=new MutationObserver((e=>{for(const t of e)this.mirrorHostAriaAttribute(t.attributeName)})),this.ariaHostMirrorObserver.observe(this.el,{attributes:!0,attributeFilter:[...n]})}disconnectedCallback(){super.disconnectedCallback(),this.ariaHostMirrorObserver?.disconnect(),this.ariaHostMirrorObserver=void 0}componentDidLoad(){super.componentDidLoad();for(const e of n)this.mirrorHostAriaAttribute(e)}mirrorHostAriaAttribute(e){if(e&&this.nativeInputElement)if(this.el.hasAttribute(e)){const t=this.el.getAttribute(e);null!==t&&this.nativeInputElement.setAttribute(e,t)}else this.nativeInputElement.removeAttribute(e)}formAssociatedCallback(e){e&&this.internals.setFormValue?.(this.value??"")}formResetCallback(){this.inputValidityActive=!1,this.internals.setValidity({}),this.setValue(this.initialValue),this.nativeInputElement?.checkValidity?.()&&(this.nativeError=!1)}formStateRestoreCallback(e){this.setValue(e)}handleValueChange(e){this.nativeInputElement&&(this.nativeInputElement.value===e||this.setValue(e))}handleDisabledChange(e){this.nativeInputElement&&(e?this.nativeInputElement.blur():this.inputValidityActive=!1)}handleInput=e=>{this.setValue(e.target.value),this.inputValidityActive&&this.updateNativeError("input")};handleChange=()=>{};handleFocus=()=>{};handleInvalid=()=>this.updateNativeError("invalid");handleBlur=()=>{this.inputValidityActive=!0,this.updateNativeError("blur")};updateNativeError(e){const t=this.nativeInputElement;if(!t)return;const i="invalid"===e||!(t.checkValidity?.()??1);this.nativeError!==i&&(this.nativeError=i)}render(){const e=Boolean(this.value),t=e||Boolean(this.placeholder);return i("div",{key:"626697f00e9ba3ad46e6304d06b04df0f27bb2c2",class:a("input-container",{"interaction-filled":e})},i("div",{key:"25ec1f448b689ff80defded1323f321d95d6b197",class:"input-wrapper"},i("slot",{key:"1d5f301e0327b4cd1714f403615f94658a754466",name:"before-input"}),i("div",{key:"ef553e6e8f6b74a5bb7cddef003d3b51650c7c9d",class:"label-input-group"},i("label",{key:"17d92ff7c65598739e8a379680580561936e21dc",htmlFor:this.inputId,class:a({floating:t})},this.label,this.required&&i("span",{key:"cd40da3c85cc6cea49d7d8d270bba317534779f5",class:"required-indicator","aria-hidden":"true"}," ","*")),i("input",{key:"3ede0644d383c2a3f702230de2aac6fbcb2c7a06",id:this.inputId,ref:e=>this.nativeInputElement=e,type:this.type,min:this.min,max:this.max,step:this.step,value:this.value,name:this.name,placeholder:this.placeholder,disabled:this.disabled,readonly:this.readonly,required:this.required,form:this.form,autocomplete:this.autocomplete,inputmode:this.inputmode,autocorrect:this.autocorrect,autocapitalize:this.autocapitalize,spellcheck:this.spellcheck,autofocus:this.autofocus,minlength:this.minlength,maxlength:this.maxlength,pattern:this.pattern,"aria-invalid":this.error?"true":"false","aria-required":this.required?"true":"false","aria-describedby":this.describedBy,"aria-errormessage":this.errorId,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur,onInvalid:this.handleInvalid})),i("slot",{key:"b282c5d9553b72af7fd05ed0f872af0d7b8a5689",name:"after-input"})),i("div",{key:"da6008e798cb5ee29fa7d1ba3208057c1845a217",id:this.helperId,role:"status"},this.helperText||null),i("div",{key:"5e7717a2d0dd32c53dd7ba6e170152239f3bfae9",id:this.errorId,role:"alert"},this.showErrorMessage&&this.errorMessage||null))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --input-border-color-focus: var(--lmvz-semantic-color-border-active, #0f8acc); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } [size='sm'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --input-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --input-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --input-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='md'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); } [size='lg'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --input-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --input-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --input-font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: var(--input-gap); } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .sc-lmvz-input-h:has(:focus-visible) .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: var(--input-font-size); font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: 1.5; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0.5em; transform: translateY(-100%); transform-origin: left top; font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 400; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: var(--input-font-size); outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: var(--input-padding-x); font-size: 12px; color: var(--helper-text-color); font-weight: 400; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: var(--input-padding-x); font-size: 12px; color: var(--error-text-color); font-weight: 400; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); --lmvz-button-min-height-override: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); }"}},[838,"lmvz-input",{value:[1025],label:[1],helperText:[1,"helper-text"],placeholder:[1],disabled:[516],readonly:[516],required:[516],name:[1],type:[1],errorMessage:[1,"error-message"],autocomplete:[1],inputmode:[1],autocorrect:[1],autocapitalize:[1],spellcheck:[4],autofocus:[4],minlength:[2],maxlength:[2],pattern:[1],min:[8],max:[8],step:[8],form:[1],size:[513],error:[6660],nativeError:[32],setValue:[64],focusInput:[64],blurInput:[64],select:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},void 0,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]);function c(){"undefined"!=typeof customElements&&["lmvz-input"].forEach((e=>{"lmvz-input"===e&&(customElements.get(r(e))||customElements.define(r(e),m))}))}export{m as L,c as d}
|
package/components/p-BPYBmylI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t={isDev:!1},n=(t=>(t.Undefined="undefined",t.Null="null",t.String="string",t.Number="number",t.SpecialNumber="number",t.Boolean="boolean",t.BigInt="bigint",t))(n||{}),e=(t=>(t.Array="array",t.Date="date",t.Map="map",t.Object="object",t.RegularExpression="regexp",t.Set="set",t.Channel="channel",t.Symbol="symbol",t))(e||{}),o="type",l="value",s="serialized:";function r(t,n,e){const o="undefined"!=typeof HTMLElement?HTMLElement.prototype:null;for(;t&&t!==o;){const o=Object.getOwnPropertyDescriptor(t,n);if(o&&(!e||o.get))return o;t=Object.getPrototypeOf(t)}}var i,c=(t,n)=>{var e;Object.entries(null!=(e=n.o.t)?e:{}).map((([e,[o]])=>{if(31&o||32&o){const o=t[e],l=r(Object.getPrototypeOf(t),e,!0)||Object.getOwnPropertyDescriptor(t,e);l&&Object.defineProperty(t,e,{get(){return l.get.call(this)},set(t){l.set.call(this,t)},configurable:!0,enumerable:!0}),n.l.has(e)?t[e]=n.l.get(e):void 0!==o&&(t[e]=o)}}))},f=t=>{if(t.__stencil__getHostRef)return t.__stencil__getHostRef()},u=(t,n)=>n in t,a=(t,n)=>(0,console.error)(t,n),d=new Map,$="s-id",p="sty-id",v="c-id",h="http://www.w3.org/1999/xlink",b=["formAssociatedCallback","formResetCallback","formDisabledCallback","formStateRestoreCallback"],y="undefined"!=typeof window?window:{},m=y.HTMLElement||class{},g={i:0,u:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,n,e,o)=>t.addEventListener(n,e,o),rel:(t,n,e,o)=>t.removeEventListener(n,e,o),ce:(t,n)=>new CustomEvent(t,n)},w=(()=>{var t;let n=!1;try{null==(t=y.document)||t.addEventListener("e",null,Object.defineProperty({},"passive",{get(){n=!0}}))}catch(t){}return n})(),j=(()=>{try{return!!y.document.adoptedStyleSheets&&(new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync)}catch(t){}return!1})(),O=!!j&&(()=>!!y.document&&Object.getOwnPropertyDescriptor(y.document.adoptedStyleSheets,"length").writable)(),S=!1,k=[],N=[],x=(t,n)=>e=>{t.push(e),S||(S=!0,n&&4&g.i?E(C):g.raf(C))},M=t=>{for(let n=0;n<t.length;n++)try{t[n](performance.now())}catch(t){a(t)}t.length=0},C=()=>{M(k),M(N),(S=k.length>0)&&g.raf(C)},E=t=>Promise.resolve(undefined).then(t),A=x(N,!0),I=t=>{const n=new URL(t,g.u);return n.origin!==y.location.origin?n.href:n.pathname},L=t=>g.u=t;function R(t){const n={mode:"open"};n.delegatesFocus=!!(16&t.i);const e=this.attachShadow(n);void 0===i&&(i=null),i&&(O?e.adoptedStyleSheets.push(i):e.adoptedStyleSheets=[...e.adoptedStyleSheets,i])}var _=t=>{const n=H(t,"childNodes");t.tagName&&t.tagName.includes("-")&&t["s-cr"]&&"SLOT-FB"!==t.tagName&&D(n,t.tagName).forEach((t=>{1===t.nodeType&&"SLOT-FB"===t.tagName&&(t.hidden=!!T(t,U(t),!1).length)}));let e=0;for(e=0;e<n.length;e++){const t=n[e];1===t.nodeType&&H(t,"childNodes").length&&_(t)}};function D(t,n,e){let o,l=0,s=[];for(;l<t.length;l++){if(o=t[l],o["s-sr"]&&(!n||o["s-hn"]===n)&&(void 0===e||U(o)===e)&&(s.push(o),void 0!==e))return s;s=[...s,...D(o.childNodes,n,e)]}return s}var T=(t,n,e=!0)=>{const o=[];(e&&t["s-sr"]||!t["s-sr"])&&o.push(t);let l=t;for(;l=l.nextSibling;)U(l)!==n||!e&&l["s-sr"]||o.push(l);return o},B=(t,n)=>1===t.nodeType?null===t.getAttribute("slot")&&""===n||t.getAttribute("slot")===n:t["s-sn"]===n||""===n,F=(t,n,e,o)=>{if(t["s-ol"]&&t["s-ol"].isConnected)return;const l=document.createTextNode("");if(l["s-nr"]=t,!n["s-cr"]||!n["s-cr"].parentNode)return;const s=n["s-cr"].parentNode,r=H(s,"appendChild");if(void 0!==o){l["s-oo"]=o;const t=H(s,"childNodes"),n=[l];t.forEach((t=>{t["s-nr"]&&n.push(t)})),n.sort(((t,n)=>!t["s-oo"]||t["s-oo"]<(n["s-oo"]||0)?-1:!n["s-oo"]||n["s-oo"]<t["s-oo"]?1:0)),n.forEach((t=>r.call(s,t)))}else r.call(s,l);t["s-ol"]=l,t["s-sh"]=n["s-hn"]},U=t=>"string"==typeof t["s-sn"]?t["s-sn"]:1===t.nodeType&&t.getAttribute("slot")||void 0;function V(t){if(t.assignedElements||t.assignedNodes||!t["s-sr"])return;const n=n=>function(t){const e=[],o=this["s-sn"];(null==t?void 0:t.flatten)&&console.error("\n Flattening is not supported for Stencil non-shadow slots.\n You can use `.childNodes` to nested slot fallback content.\n If you have a particular use case, please open an issue on the Stencil repo.\n ");const l=this["s-cr"].parentElement;return(l.__childNodes?l.childNodes:(t=>{const n=[];for(let e=0;e<t.length;e++){const o=t[e]["s-nr"]||void 0;o&&o.isConnected&&n.push(o)}return n})(l.childNodes)).forEach((t=>{o===U(t)&&e.push(t)})),n?e.filter((t=>1===t.nodeType)):e}.bind(t);t.assignedElements=n(!0),t.assignedNodes=n(!1)}function H(t,n){if("__"+n in t){const e=t["__"+n];return"function"!=typeof e?e:e.bind(t)}return"function"!=typeof t[n]?t[n]:t[n].bind(t)}var P=new WeakMap,W=(t,n,e)=>{let o=d.get(t);j&&e?(o=o||new CSSStyleSheet,"string"==typeof o?o=n:o.replaceSync(n)):o=n,d.set(t,o)},z=(t,n)=>{var e,o,l;const s=q(n),r=d.get(s);if(!y.document)return s;if(t=11===t.nodeType?t:y.document,r)if("string"==typeof r){let l,i=P.get(t=t.head||t);i||P.set(t,i=new Set);const c=t.querySelector(`[${p}="${s}"]`);if(c)c.textContent=r;else if(!i.has(s)){l=y.document.createElement("style"),l.textContent=r;const c=null!=(e=g.$)?e:function(){var t,n,e;return null!=(e=null==(n=null==(t=y.document.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?e:void 0}();if(null!=c&&l.setAttribute("nonce",c),!(1&n.i))if("HEAD"===t.nodeName){const n=t.querySelectorAll("link[rel=preconnect]"),e=n.length>0?n[n.length-1].nextSibling:t.querySelector("style");t.insertBefore(l,(null==e?void 0:e.parentNode)===t?e:null)}else if("host"in t)if(j){const n=new(null!=(o=t.defaultView)?o:t.ownerDocument.defaultView).CSSStyleSheet;n.replaceSync(r),O?t.adoptedStyleSheets.unshift(n):t.adoptedStyleSheets=[n,...t.adoptedStyleSheets]}else{const n=t.querySelector("style");n?n.textContent=r+n.textContent:t.prepend(l)}else t.append(l);1&n.i&&t.insertBefore(l,null),4&n.i&&(l.textContent+="slot-fb{display:contents}slot-fb[hidden]{display:none}"),i&&i.add(s)}}else{let n=P.get(t);if(n||P.set(t,n=new Set),!n.has(s)){const e=null!=(l=t.defaultView)?l:t.ownerDocument.defaultView;let o;if(r.constructor===e.CSSStyleSheet)o=r;else{o=new e.CSSStyleSheet;for(let t=0;t<r.cssRules.length;t++)o.insertRule(r.cssRules[t].cssText,t)}if(O?t.adoptedStyleSheets.push(o):t.adoptedStyleSheets=[...t.adoptedStyleSheets,o],n.add(s),"host"in t){const n=t.querySelector(`[${p}="${s}"]`);n&&A((()=>n.remove()))}}}return s},q=t=>"sc-"+t.p,Y=t=>"object"==(t=typeof t)||"function"===t,J=(t,n,...e)=>{let o=null,l=null,s=null,r=!1,i=!1;const c=[],f=n=>{for(let e=0;e<n.length;e++)o=n[e],Array.isArray(o)?f(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof t&&!Y(o))&&(o=String(o)),r&&i?c[c.length-1].v+=o:c.push(r?Z(null,o):o),i=r)};if(f(e),n){n.key&&(l=n.key),n.name&&(s=n.name);{const t=n.className||n.class;t&&(n.class="object"!=typeof t?t:Object.keys(t).filter((n=>t[n])).join(" "))}}const u=Z(t,null);return u.h=n,c.length>0&&(u.m=c),u.j=l,u.O=s,u},Z=(t,n)=>({i:0,S:t,v:null!=n?n:null,k:null,m:null,h:null,j:null,O:null}),G={},K=(t,n,e,o,l,s,r,i=[])=>{let c,f,u,a;const d=l["s-sc"];if(1===s.nodeType){if(c=s.getAttribute(v),c&&(f=c.split("."),f[0]===r||"0"===f[0])){u=X({i:0,N:f[0],M:f[1],C:f[2],A:f[3],S:s.tagName.toLowerCase(),k:s,h:{class:s.className||""}}),n.push(u),s.removeAttribute(v),t.m||(t.m=[]),d&&f[0]===r&&(s["s-si"]=d,u.h.class+=" "+d);const l=u.k.getAttribute("s-sn");"string"==typeof l&&("slot-fb"===u.S&&(tt(l,f[2],u,s,t,n,e,o,i),d&&s.classList.add(d)),u.k["s-sn"]=l,u.k.removeAttribute("s-sn")),void 0!==u.A&&(t.m[u.A]=u),t=u,o&&"0"===u.C&&(o[u.A]=u.k)}if(s.shadowRoot)for(a=s.shadowRoot.childNodes.length-1;a>=0;a--)K(t,n,e,o,l,s.shadowRoot.childNodes[a],r,i);const $=s.__childNodes||s.childNodes;for(a=$.length-1;a>=0;a--)K(t,n,e,o,l,$[a],r,i)}else if(8===s.nodeType)f=s.nodeValue.split("."),(f[1]===r||"0"===f[1])&&(c=f[0],u=X({N:f[1],M:f[2],C:f[3],A:f[4]||"0",k:s,h:null,m:null,j:null,O:null,S:null,v:null}),"t"===c?(u.k=et(s,3),u.k&&3===u.k.nodeType&&(u.v=u.k.textContent,n.push(u),s.remove(),r===u.N&&(t.m||(t.m=[]),t.m[u.A]=u),o&&"0"===u.C&&(o[u.A]=u.k))):"c"===c?(u.k=et(s,8),u.k&&8===u.k.nodeType&&(n.push(u),s.remove())):u.N===r&&("s"===c?tt(s["s-sn"]=f[5]||"",f[2],u,s,t,n,e,o,i):"r"===c&&(o?s.remove():(l["s-cr"]=s,s["s-cn"]=!0))));else if(t&&"style"===t.S){const n=Z(null,s.textContent);n.k=s,n.A="0",t.m=[n]}return t},Q=(t,n)=>{if(1===t.nodeType){const e=t[$]||t.getAttribute($);e&&n.set(e,t);let o=0;if(t.shadowRoot)for(;o<t.shadowRoot.childNodes.length;o++)Q(t.shadowRoot.childNodes[o],n);const l=t.__childNodes||t.childNodes;for(o=0;o<l.length;o++)Q(l[o],n)}else if(8===t.nodeType){const e=t.nodeValue.split(".");"o"===e[0]&&(n.set(e[1]+"."+e[2],t),t.nodeValue="",t["s-en"]=e[3])}},X=t=>({i:0,N:null,M:null,C:null,A:"0",k:null,h:null,m:null,j:null,O:null,S:null,v:null,...t});function tt(t,n,e,o,l,s,r,i,c){o["s-sr"]=!0,e.O=t||null,e.S="slot";const f=(null==l?void 0:l.k)?l.k["s-id"]||l.k.getAttribute("s-id"):"";if(i&&y.document){const s=e.k=y.document.createElement(e.S);e.O&&e.k.setAttribute("name",t),l.k.shadowRoot&&f&&f!==e.N?H(l.k,"insertBefore")(s,H(l.k,"children")[0]):H(H(o,"parentNode"),"insertBefore")(s,o),nt(c,n,t,o,e.N),o.remove(),"0"===e.C&&(i[e.A]=e.k)}else{const s=e.k,r=f&&f!==e.N&&l.k.shadowRoot;nt(c,n,t,o,r?f:e.N),V(o),r&&l.k.insertBefore(s,l.k.children[0])}s.push(e),r.push(e),l.m||(l.m=[]),l.m[e.A]=e}var nt=(t,n,e,o,l)=>{var s,r;let i=o.nextSibling;if(t[n]=t[n]||[],i&&!(null==(s=i.nodeValue)?void 0:s.startsWith("s.")))do{!i||(i.getAttribute&&i.getAttribute("slot")||i["s-sn"])!==e&&(""!==e||i["s-sn"]||i.getAttribute&&i.getAttribute("slot")||8!==i.nodeType&&3!==i.nodeType)||(i["s-sn"]=e,t[n].push({slot:o,node:i,hostId:l})),i=null==i?void 0:i.nextSibling}while(i&&!(null==(r=i.nodeValue)?void 0:r.startsWith("s.")))},et=(t,n)=>{let e=t;do{e=e.nextSibling}while(e&&(e.nodeType!==n||!e.nodeValue));return e},ot=t=>{if(!t)return;const n=Object.keys(t);if(0===n.length)return;let e=!1;for(const o of n){if(e)break;for(const n of t[o])if("string"==typeof n){e=!0;break}}if(!e)return t;const o={};for(const e of n)o[e]=t[e].map((t=>"string"==typeof t?{[t]:0}:t));return o},lt=class t{static fromLocalValue(n){const e=n[o],s=l in n?n[l]:void 0;switch(e){case"string":case"boolean":return s;case"bigint":return BigInt(s);case"undefined":return;case"null":return null;case"number":return"NaN"===s?NaN:"-0"===s?-0:"Infinity"===s?1/0:"-Infinity"===s?-1/0:s;case"array":return s.map((n=>t.fromLocalValue(n)));case"date":return new Date(s);case"map":const n=new Map;for(const[e,o]of s){const l="object"==typeof e&&null!==e?t.fromLocalValue(e):e,s=t.fromLocalValue(o);n.set(l,s)}return n;case"object":const o={};for(const[n,e]of s)o[n]=t.fromLocalValue(e);return o;case"regexp":const{pattern:l,flags:r}=s;return new RegExp(l,r);case"set":const i=new Set;for(const n of s)i.add(t.fromLocalValue(n));return i;case"symbol":return Symbol(s);default:throw new Error(`Unsupported type: ${e}`)}}static fromLocalValueArray(n){return n.map((n=>t.fromLocalValue(n)))}static isLocalValueObject(t){if("object"!=typeof t||null===t)return!1;if(!t.hasOwnProperty(o))return!1;const s=t[o];return!!Object.values({...n,...e}).includes(s)&&("null"===s||"undefined"===s||t.hasOwnProperty(l))}};var st,rt,it,ct=(t,n,e)=>{return"string"==typeof t&&t.startsWith(s)?t="string"==typeof(o=t)&&o.startsWith(s)?lt.fromLocalValue(JSON.parse(function(t){const n=atob(t),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return(new TextDecoder).decode(e)}(o.slice(11)))):o:null==t||Y(t)?t:4&n?(e&&"string"==typeof t||"false"!==t)&&(""===t||!!t):2&n?"string"==typeof t?parseFloat(t):"number"==typeof t?t:NaN:1&n?String(t):t;var o},ft=(t,n,e)=>{const o=t;return{emit:t=>ut(o,n,{bubbles:!!(4&e),composed:!!(2&e),cancelable:!!(1&e),detail:t})}},ut=(t,n,e)=>{const o=g.ce(n,e);return t.dispatchEvent(o),o},at=(t,n,e,o,l,s,r)=>{if(e===o)return;let i=u(t,n),c=n.toLowerCase();if("class"===n){const n=t.classList,l=$t(e);let s=$t(o);if((t["s-si"]||t["s-sc"])&&r){const e=t["s-sc"]||t["s-si"];s.push(e),l.forEach((t=>{t.startsWith(e)&&s.push(t)})),s=[...new Set(s)].filter((t=>t)),n.add(...s)}else n.remove(...l.filter((t=>t&&!s.includes(t)))),n.add(...s.filter((t=>t&&!l.includes(t))))}else if("style"===n){for(const n in e)o&&null!=o[n]||(n.includes("-")?t.style.removeProperty(n):t.style[n]="");for(const n in o)e&&o[n]===e[n]||(n.includes("-")?t.style.setProperty(n,o[n]):t.style[n]=o[n])}else if("key"===n);else if("ref"===n)o&&_t(o,t);else if(t.__lookupSetter__(n)||"o"!==n[0]||"n"!==n[1]){if("a"===n[0]&&n.startsWith("attr:")){const e=n.slice(5);let l;{const n=f(t);if(n&&n.o&&n.o.t){const t=n.o.t[e];t&&t[1]&&(l=t[1])}}return l||(l=e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),void(null==o||!1===o?!1===o&&""!==t.getAttribute(l)||t.removeAttribute(l):t.setAttribute(l,!0===o?"":o))}if("p"===n[0]&&n.startsWith("prop:")){const e=n.slice(5);try{t[e]=o}catch(t){}return}{const r=Y(o);if((i||r&&null!==o)&&!l)try{if(t.tagName.includes("-"))t[n]!==o&&(t[n]=o);else{const l=null==o?"":o;"list"===n?i=!1:null!=e&&t[n]===l||("function"==typeof t.__lookupSetter__(n)?t[n]=l:t.setAttribute(n,l))}}catch(t){}let f=!1;c!==(c=c.replace(/^xlink\:?/,""))&&(n=c,f=!0),null==o||!1===o?!1===o&&""!==t.getAttribute(n)||(f?t.removeAttributeNS(h,n):t.removeAttribute(n)):(!i||4&s||l)&&!r&&1===t.nodeType&&(o=!0===o?"":o,f?t.setAttributeNS(h,n,o):t.setAttribute(n,o))}}else if(n="-"===n[2]?n.slice(3):u(y,c)?c.slice(2):c[2]+n.slice(3),e||o){const l=n.endsWith(pt);n=n.replace(vt,""),e&&g.rel(t,n,e,l),o&&g.ael(t,n,o,l)}},dt=/\s/,$t=t=>("object"==typeof t&&t&&"baseVal"in t&&(t=t.baseVal),t&&"string"==typeof t?t.split(dt):[]),pt="Capture",vt=new RegExp(pt+"$"),ht=(t,n,e,o)=>{const l=11===n.k.nodeType&&n.k.host?n.k.host:n.k,s=t&&t.h||{},r=n.h||{};for(const t of bt(Object.keys(s)))t in r||at(l,t,s[t],void 0,e,n.i,o);for(const t of bt(Object.keys(r)))at(l,t,s[t],r[t],e,n.i,o)};function bt(t){return t.includes("ref")?[...t.filter((t=>"ref"!==t)),"ref"]:t}var yt=!1,mt=!1,gt=!1,wt=!1,jt=[],Ot=[],St=(t,n,e)=>{var o;const l=n.m[e];let s,r,i,c=0;if(yt||(gt=!0,"slot"===l.S&&(l.i|=l.m?2:1)),null!=l.v)s=l.k=y.document.createTextNode(l.v);else if(1&l.i)s=l.k=y.document.createTextNode(""),ht(null,l,wt);else{if(wt||(wt="svg"===l.S),!y.document)throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM.");if(s=l.k=y.document.createElementNS(wt?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",!yt&&2&l.i?"slot-fb":l.S),wt&&"foreignObject"===l.S&&(wt=!1),ht(null,l,wt),null!=(f=st)&&void 0!==f&&s["s-si"]!==st&&s.classList.add(s["s-si"]=st),l.m){const n="template"===l.S?s.content:s;for(c=0;c<l.m.length;++c)r=St(t,l,c),r&&n.appendChild(r)}"svg"===l.S?wt=!1:"foreignObject"===s.tagName&&(wt=!0)}var f;return s["s-hn"]=it,3&l.i&&(s["s-sr"]=!0,s["s-cr"]=rt,s["s-sn"]=l.O||"",s["s-rf"]=null==(o=l.h)?void 0:o.ref,V(s),i=t&&t.m&&t.m[e],i&&i.S===l.S&&t.k&&kt(t.k),Tt(rt,s,n.k,null==t?void 0:t.k)),s},kt=t=>{g.i|=1;const n=t.closest(it.toLowerCase());if(null!=n){const e=Array.from(n.__childNodes||n.childNodes).find((t=>t["s-cr"])),o=Array.from(t.__childNodes||t.childNodes);for(const t of e?o.reverse():o)null!=t["s-sh"]&&(Dt(n,t,null!=e?e:null),t["s-sh"]=void 0,gt=!0)}g.i&=-2},Nt=(t,n)=>{g.i|=1;const e=Array.from(t.__childNodes||t.childNodes);if(t["s-sr"]){let n=t;for(;n=n.nextSibling;)n&&n["s-sn"]===t["s-sn"]&&n["s-sh"]===it&&e.push(n)}for(let t=e.length-1;t>=0;t--){const o=e[t];o["s-hn"]!==it&&o["s-ol"]&&(Dt(Et(o).parentNode,o,Et(o)),o["s-ol"].remove(),o["s-ol"]=void 0,o["s-sh"]=void 0,gt=!0),n&&Nt(o,n)}g.i&=-2},xt=(t,n,e,o,l,s)=>{let r,i=t["s-cr"]&&t["s-cr"].parentNode||t;for(i.shadowRoot&&i.tagName===it&&(i=i.shadowRoot),"template"===e.S&&(i=i.content);l<=s;++l)o[l]&&(r=St(null,e,l),r&&(o[l].k=r,Dt(i,r,Et(n))))},Mt=(t,n,e)=>{for(let o=n;o<=e;++o){const n=t[o];if(n){const t=n.k;Rt(n),t&&(mt=!0,t["s-ol"]?t["s-ol"].remove():Nt(t,!0),t.remove())}}},Ct=(t,n,e=!1)=>t.S===n.S&&("slot"===t.S?t.O===n.O:e?(e&&!t.j&&n.j&&(t.j=n.j),!0):t.j===n.j),Et=t=>t&&t["s-ol"]||t,At=(t,n,e=!1)=>{const o=n.k=t.k,l=t.m,s=n.m,r=n.S,i=n.v;let c;null==i?(wt="svg"===r||"foreignObject"!==r&&wt,"slot"!==r||yt||t.O!==n.O&&(n.k["s-sn"]=n.O||"",kt(n.k.parentElement)),ht(t,n,wt,e),null!==l&&null!==s?((t,n,e,o,l=!1)=>{let s,r,i=0,c=0,f=0,u=0,a=n.length-1,d=n[0],$=n[a],p=o.length-1,v=o[0],h=o[p];const b="template"===e.S?t.content:t;for(;i<=a&&c<=p;)if(null==d)d=n[++i];else if(null==$)$=n[--a];else if(null==v)v=o[++c];else if(null==h)h=o[--p];else if(Ct(d,v,l))At(d,v,l),d=n[++i],v=o[++c];else if(Ct($,h,l))At($,h,l),$=n[--a],h=o[--p];else if(Ct(d,h,l))"slot"!==d.S&&"slot"!==h.S||Nt(d.k.parentNode,!1),At(d,h,l),Dt(b,d.k,$.k.nextSibling),d=n[++i],h=o[--p];else if(Ct($,v,l))"slot"!==d.S&&"slot"!==h.S||Nt($.k.parentNode,!1),At($,v,l),Dt(b,$.k,d.k),$=n[--a],v=o[++c];else{for(f=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].j&&n[u].j===v.j){f=u;break}f>=0?(r=n[f],r.S!==v.S?s=St(n&&n[c],e,f):(At(r,v,l),n[f]=void 0,s=r.k),v=o[++c]):(s=St(n&&n[c],e,c),v=o[++c]),s&&Dt(Et(d.k).parentNode,s,Et(d.k))}i>a?xt(t,null==o[p+1]?null:o[p+1].k,e,o,c,p):c>p&&Mt(n,i,a)})(o,l,n,s,e):null!==s?(null!==t.v&&(o.textContent=""),xt(o,null,n,s,0,s.length-1)):e||null===l?e&&null!==l&&null===s&&(n.m=l):Mt(l,0,l.length-1),wt&&"svg"===r&&(wt=!1)):(c=o["s-cr"])?c.parentNode.textContent=i:t.v!==i&&(o.data=i)},It=[],Lt=t=>{let n,e,o;const l=t.__childNodes||t.childNodes;for(const t of l){if(t["s-sr"]&&(n=t["s-cr"])&&n.parentNode){e=n.parentNode.__childNodes||n.parentNode.childNodes;const l=t["s-sn"];for(o=e.length-1;o>=0;o--)if(n=e[o],!(n["s-cn"]||n["s-nr"]||n["s-hn"]===t["s-hn"]||n["s-sh"]&&n["s-sh"]===t["s-hn"]))if(B(n,l)){let e=It.find((t=>t.I===n));mt=!0,n["s-sn"]=n["s-sn"]||l,e?(e.I["s-sh"]=t["s-hn"],e.L=t):(n["s-sh"]=t["s-hn"],It.push({L:t,I:n})),n["s-sr"]&&It.map((t=>{B(t.I,n["s-sn"])&&(e=It.find((t=>t.I===n)),e&&!t.L&&(t.L=e.L))}))}else It.some((t=>t.I===n))||It.push({I:n})}1===t.nodeType&&Lt(t)}},Rt=t=>{t.h&&t.h.ref&&jt.push((()=>t.h.ref(null))),t.m&&t.m.map(Rt)},_t=(t,n)=>{Ot.push((()=>t(n)))},Dt=(t,n,e,o)=>{if("string"==typeof n["s-sn"]&&n["s-sr"]&&n["s-cr"])Tt(n["s-cr"],n,t,n.parentElement);else if("string"==typeof n["s-sn"]){t.insertBefore(n,e);const{slotNode:l}=function(t,n){var e;if(!(n=n||(null==(e=t["s-ol"])?void 0:e.parentElement)))return{slotNode:null,slotName:""};const o=t["s-sn"]=U(t)||"";return{slotNode:D(H(n,"childNodes"),n.tagName,o)[0],slotName:o}}(n);return l&&!o&&l.dispatchEvent(new CustomEvent("slotchange",{bubbles:!1,cancelable:!1,composed:!1})),n}return t.__insertBefore?t.__insertBefore(n,e):null==t?void 0:t.insertBefore(n,e)};function Tt(t,n,e,o){var l,s;let r;if(t&&"string"==typeof n["s-sn"]&&n["s-sr"]&&t.parentNode&&t.parentNode["s-sc"]&&(r=n["s-si"]||t.parentNode["s-sc"])){const t=n["s-sn"],i=n["s-hn"];if(null==(l=e.classList)||l.add(r+"-s"),o&&(null==(s=o.classList)?void 0:s.contains(r+"-s"))){let n=(o.__childNodes||o.childNodes)[0],e=!1;for(;n;){if(n["s-sn"]!==t&&n["s-hn"]===i&&n["s-sr"]){e=!0;break}n=n.nextSibling}e||o.classList.remove(r+"-s")}}}var Bt=(t,n,e=!1)=>{var o,l,s,r,i;const c=t.$hostElement$,f=t.o,u=t.R||Z(null,null);var a;const d=(a=n)&&a.S===G?n:J(null,null,n);if(it=c.tagName,f._&&(d.h=d.h||{},f._.forEach((([t,n])=>{d.h[n]=c[t]}))),e&&d.h)for(const t of Object.keys(d.h))c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)&&(d.h[t]=c[t]);if(d.S=null,d.i|=4,t.R=d,d.k=u.k=c.shadowRoot||c,st=c["s-sc"],yt=!(!(1&f.i)||128&f.i),rt=c["s-cr"],mt=!1,At(u,d,e),g.i|=1,gt){Lt(d.k);for(const t of It){const n=t.I;if(!n["s-ol"]&&y.document){const t=y.document.createTextNode("");t["s-nr"]=n,Dt(n.parentNode,n["s-ol"]=t,n,e)}}for(const t of It){const n=t.I,i=t.L;if(1===n.nodeType&&e&&(n["s-ih"]=null!=(o=n.hidden)&&o),i){const t=i.parentNode;let o=i.nextSibling;if(o&&1===o.nodeType){let e=null==(l=n["s-ol"])?void 0:l.previousSibling;for(;e;){let l=null!=(s=e["s-nr"])?s:null;if(l&&l["s-sn"]===n["s-sn"]&&t===(l.__parentNode||l.parentNode)){for(l=l.nextSibling;l===n||(null==l?void 0:l["s-sr"]);)l=null==l?void 0:l.nextSibling;if(!l||!l["s-nr"]){o=l;break}}e=e.previousSibling}}if((!o&&t!==(n.__parentNode||n.parentNode)||(n.__nextSibling||n.nextSibling)!==o)&&n!==o){if(Dt(t,n,o,e),8===n.nodeType&&n.nodeValue.startsWith("s-nt-")){const t=y.document.createTextNode(n.nodeValue.replace(/^s-nt-/,""));t["s-hn"]=n["s-hn"],t["s-sn"]=n["s-sn"],t["s-sh"]=n["s-sh"],t["s-sr"]=n["s-sr"],t["s-ol"]=n["s-ol"],t["s-ol"]["s-nr"]=t,Dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}1===n.nodeType&&"SLOT-FB"!==n.tagName&&(n.hidden=null!=(r=n["s-ih"])&&r)}n&&"function"==typeof i["s-rf"]&&i["s-rf"](i)}else 1===n.nodeType&&(n.hidden=!0)}}if(mt&&_(d.k),g.i&=-2,It.length=0,!yt&&!(1&f.i)&&c["s-cr"]){const t=d.k.__childNodes||d.k.childNodes;for(const n of t)if(n["s-hn"]!==it&&!n["s-sh"])if(e&&null==n["s-ih"]&&(n["s-ih"]=null!=(i=n.hidden)&&i),1===n.nodeType)n.hidden=!0;else if(3===n.nodeType&&n.nodeValue.trim()){const t=y.document.createComment("s-nt-"+n.nodeValue);t["s-sn"]=n["s-sn"],Dt(n.parentNode,t,n,e),n.parentNode.removeChild(n)}}rt=void 0,jt.forEach((t=>t())),jt.length=0,Ot.forEach((t=>t())),Ot.length=0},Ft=(t,n)=>{if(n&&!t.D&&n["s-p"]){const e=n["s-p"].push(new Promise((o=>t.D=()=>{n["s-p"].splice(e-1,1),o()})))}},Ut=(t,n)=>{if(t.i|=16,4&t.i)return void(t.i|=512);Ft(t,t.T);const e=()=>Vt(t,n);if(!n)return A(e);queueMicrotask((()=>{e()}))},Vt=(t,n)=>{const e=t.$hostElement$,o=e;if(!o)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return l=Zt(o,n?"componentWillLoad":"componentWillUpdate",void 0,e),l=Ht(l,(()=>Zt(o,"componentWillRender",void 0,e))),Ht(l,(()=>Wt(t,o,n)))},Ht=(t,n)=>Pt(t)?t.then(n).catch((t=>{console.error(t),n()})):n(),Pt=t=>t instanceof Promise||t&&t.then&&"function"==typeof t.then,Wt=async(t,n,e)=>{var o;const l=t.$hostElement$,s=l["s-rc"];e&&(t=>{const n=t.o,e=t.$hostElement$,o=n.i,l=z(e.shadowRoot?e.shadowRoot:e.getRootNode(),n);10&o&&(e["s-sc"]=l,e.classList.add(l+"-h"))})(t);zt(t,n,l,e),s&&(s.map((t=>t())),l["s-rc"]=void 0);{const n=null!=(o=l["s-p"])?o:[],e=()=>qt(t);0===n.length?e():(Promise.all(n).then(e).catch(e),t.i|=4,n.length=0)}},zt=(t,n,e,o)=>{try{n=n.render(),t.i&=-17,t.i|=2,Bt(t,n,o)}catch(n){a(n,t.$hostElement$)}return null},qt=t=>{const n=t.$hostElement$,e=n,o=t.T;Zt(e,"componentDidRender",void 0,n),64&t.i?Zt(e,"componentDidUpdate",void 0,n):(t.i|=64,Gt(n),Zt(e,"componentDidLoad",void 0,n),t.B(n),o||Jt()),t.D&&(t.D(),t.D=void 0),512&t.i&&E((()=>Ut(t,!1))),t.i&=-517},Yt=t=>{var n;{const e=f(t),o=null==(n=null==e?void 0:e.$hostElement$)?void 0:n.isConnected;return o&&2==(18&e.i)&&Ut(e,!1),o}},Jt=()=>{var t;E((()=>ut(y,"appload",{detail:{namespace:"lmvz-components"}}))),(null==(t=g.F)?void 0:t.size)&&g.F.clear()},Zt=(t,n,e,o)=>{if(t&&t[n])try{return t[n](e)}catch(t){a(t,o)}},Gt=t=>t.classList.add("hydrated"),Kt=(t,n,e,o)=>{const l=f(t);if(!l)return;const s=t,r=l.l.get(n),i=l.i,c=s;e=ct(e,o.t[n][0],!!(64&o.i));const u=Number.isNaN(r)&&Number.isNaN(e);if(e!==r&&!u){if(l.l.set(n,e),o.U){const t=o.U[n];t&&t.map((t=>{try{const[[o,s]]=Object.entries(t);(128&i||1&s)&&(c?c[o](e,r,n):l.V.push((()=>{l.H[o](e,r,n)})))}catch(t){a(t,s)}}))}if(2&i){if(c.componentShouldUpdate&&!1===c.componentShouldUpdate(e,r,n)&&!(16&i))return;16&i||Ut(l,!1)}}},Qt=(t,n,e)=>{var o,l;const s=t.prototype;64&n.i&&1&e&&b.forEach((t=>{const n=s[t];Object.defineProperty(s,t,{value(...e){var o;const l=f(this),s=this;s?"function"==typeof n&&n.call(s,...e):null==(o=null==l?void 0:l.P)||o.then((n=>{const o=n[t];"function"==typeof o&&o.call(n,...e)}))}})}));{t.watchers&&!n.U&&(n.U=ot(t.watchers)),t.deserializers&&!n.W&&(n.W=t.deserializers),t.serializers&&!n.q&&(n.q=t.serializers);const e=Object.entries(null!=(o=n.t)?o:{});e.map((([t,[e]])=>{if(31&e||32&e){const{get:o,set:l}=r(s,t)||{};o&&(n.t[t][0]|=2048),l&&(n.t[t][0]|=4096),Object.defineProperty(s,t,{get(){return o?o.apply(this):(n=t,f(this).l.get(n));var n},configurable:!0,enumerable:!0}),Object.defineProperty(s,t,{set(o){const s=f(this);if(s){if(l)return void 0===(32&e?this[t]:s.$hostElement$[t])&&s.l.get(t)&&(o=s.l.get(t)),l.apply(this,[ct(o,e,!!(64&n.i))]),void Kt(this,t,o=32&e?this[t]:s.$hostElement$[t],n);Kt(this,t,o,n)}}})}}));{const o=new Map;s.attributeChangedCallback=function(t,l,r){g.jmp((()=>{var i;const c=o.get(t),u=f(this);if(this.hasOwnProperty(c),s.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==r)return;if(null==c){const e=null==u?void 0:u.i;if(u&&e&&!(8&e)&&r!==l){const o=this,s=null==(i=n.U)?void 0:i[t];null==s||s.forEach((n=>{const[[s,i]]=Object.entries(n);null!=o[s]&&(128&e||1&i)&&o[s].call(o,r,l,t)}))}return}const a=e.find((([t])=>t===c)),d=a&&4&a[1][0],$=d&&null===r&&void 0===this[c];d&&(r=null!==r&&"false"!==r);const p=Object.getOwnPropertyDescriptor(s,c);$||r==this[c]||p.get&&!p.set||(this[c]=r)}))},t.observedAttributes=Array.from(new Set([...Object.keys(null!=(l=n.U)?l:{}),...e.filter((([t,n])=>31&n[0])).map((([t,e])=>{var l;const s=e[1]||t;return o.set(s,t),512&e[0]&&(null==(l=n._)||l.push([t,s])),s}))]))}}return t},Xt=t=>{if(!y.document)return;const n=t["s-cr"]=y.document.createComment("");n["s-cn"]=!0,Dt(t,n,t.firstChild)},tn=(t,n)=>{const e={i:n[0],p:n[1]};try{e.t=n[2],e.Y=n[3],e.U=ot(t.U),e.W=t.W,e.q=t.q,e._=[],(()=>{if(!y.document)return;const t=y.document.querySelectorAll(`[${p}]`);let n=0;for(;n<t.length;n++)W(t[n].getAttribute(p),t[n].innerHTML.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),!0)})();const o=t.prototype.connectedCallback,l=t.prototype.disconnectedCallback;return Object.assign(t.prototype,{__hasHostListenerAttached:!1,__registerHost(){((t,n)=>{const e={i:0,$hostElement$:t,o:n,l:new Map,J:new Map};e.P=new Promise((t=>e.B=t)),t["s-p"]=[],t["s-rc"]=[];const o=e;t.__stencil__getHostRef=()=>o,512&n.i&&c(t,e)})(this,e)},connectedCallback(){if(!this.__hasHostListenerAttached){const t=f(this);if(!t)return;nn(this,t,e.Y),this.__hasHostListenerAttached=!0}(t=>{if(!(1&g.i)){const n=f(t);if(!n)return;const e=n.o,o=()=>{};if(1&n.i)nn(t,n,e.Y),(null==n?void 0:n.H)||(null==n?void 0:n.P)&&n.P.then((()=>{}));else{let o;if(n.i|=1,o=t.getAttribute($),o){if(1&e.i){const n=z(t.shadowRoot,e);t.classList.remove(n+"-h",n+"-s")}else if(2&e.i){const n=q(e);t["s-sc"]=n}((t,n,e,o)=>{var l,s,r,i;const c=t.shadowRoot,u=[],a=[],d=[],p=c?[]:null,v=Z(n,null);let h;v.k=t;{const n=o.o;n&&10&n.i&&t["s-sc"]?(h=t["s-sc"],t.classList.add(h+"-h")):t["s-sc"]&&delete t["s-sc"]}!y.document||g.F&&g.F.size||Q(y.document.body,g.F=new Map),t[$]=e,t.removeAttribute($),o.R=K(v,u,a,p,t,t,e,d);let b=0;const m=u.length;let w;for(;b<m;b++){w=u[b];const e=w.N+"."+w.M,o=g.F.get(e),s=w.k;if(c){if((null==(l=w.S)?void 0:l.toString().includes("-"))&&"slot-fb"!==w.S&&!w.k.shadowRoot){const t=f(w.k);if(t){const n=q(t.o),e=y.document.querySelector(`style[sty-id="${n}"]`);e&&p.unshift(e.cloneNode(!0))}}}else s["s-hn"]=n.toUpperCase(),"slot"===w.S&&(s["s-cr"]=t["s-cr"]);"slot"===w.S&&(w.O=w.k["s-sn"]||w.k.name||null,w.m?(w.i|=2,w.k.childNodes.length||w.m.forEach((t=>{w.k.appendChild(t.k)}))):w.i|=1),o&&o.isConnected&&(o.parentElement.shadowRoot&&""===o["s-en"]&&o.parentNode.insertBefore(s,o.nextSibling),o.parentNode.removeChild(o),c||(s["s-oo"]=parseInt(w.M))),o&&!o["s-id"]&&g.F.delete(e)}const j=[],O=d.length;let S,k,N,x,M=0,C=0;for(;M<O;M++)if(S=d[M],S&&S.length)for(N=S.length,k=0;k<N;k++){if(x=S[k],j[x.hostId]||(j[x.hostId]=g.F.get(x.hostId)),!j[x.hostId])continue;const t=j[x.hostId];t.shadowRoot&&x.node.parentElement!==t&&t.insertBefore(x.node,null==(r=null==(s=S[k-1])?void 0:s.node)?void 0:r.nextSibling),t.shadowRoot&&c||(x.slot["s-cr"]||(x.slot["s-cr"]=t["s-cr"],x.slot["s-cr"]=!x.slot["s-cr"]&&t.shadowRoot?t:(t.__childNodes||t.childNodes)[0]),F(x.node,x.slot,0,x.node["s-oo"]||C),(null==(i=x.node.parentElement)?void 0:i.shadowRoot)&&x.node.getAttribute&&x.node.getAttribute("slot")&&x.node.removeAttribute("slot")),C=(x.node["s-oo"]||C)+1}if(h&&a.length&&a.forEach((t=>{t.k.parentElement.classList.add(h+"-s")})),c&&!c.childNodes.length){let n=0;const e=p.length;if(e){for(;n<e;n++){const t=p[n];t&&c.appendChild(t)}Array.from(t.childNodes).forEach((t=>{"string"!=typeof t["s-en"]&&"string"!=typeof t["s-sn"]&&(1===t.nodeType&&t.slot&&t.hidden?t.removeAttribute("hidden"):8!==t.nodeType||t.nodeValue||t.parentNode.removeChild(t))}))}}o.$hostElement$=t})(t,e.p,o,n)}o||12&e.i&&Xt(t);{let e=t;for(;e=e.parentNode||e.host;)if(1===e.nodeType&&e.hasAttribute("s-id")&&e["s-p"]||e["s-p"]){Ft(n,n.T=e);break}}e.t&&Object.entries(e.t).map((([n,[e]])=>{if(31&e&&Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];delete t[n],t[n]=e}})),(async(t,n,e)=>{let o;try{if(!(32&n.i)&&(n.i|=32,o=t.constructor,customElements.whenDefined(t.localName).then((()=>n.i|=128)),o&&o.style)){let t;"string"==typeof o.style&&(t=o.style);const n=q(e);if(!d.has(n)){const o=()=>{};W(n,t,!!(1&e.i)),o()}}const l=n.T,s=()=>Ut(n,!0);l&&l["s-rc"]?l["s-rc"].push(s):s()}catch(e){a(e,t),n.D&&(n.D(),n.D=void 0),n.B&&n.B(t)}})(t,n,e)}o()}})(this),o&&o.call(this)},disconnectedCallback(){(async t=>{if(!(1&g.i)){const n=f(t);(null==n?void 0:n.Z)&&(n.Z.map((t=>t())),n.Z=void 0)}P.has(t)&&P.delete(t),t.shadowRoot&&P.has(t.shadowRoot)&&P.delete(t.shadowRoot)})(this),l&&l.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw new Error(`Unable to re-use existing shadow root for ${e.p}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else R.call(this,e)}}),Object.defineProperty(t,"is",{value:e.p,configurable:!0}),Qt(t,e,3)}catch(n){return a(n),t}},nn=(t,n,e)=>{e&&y.document&&e.map((([e,o,l])=>{const s=t,r=en(n,l),i=on(e);g.ael(s,o,r,i),(n.Z=n.Z||[]).push((()=>g.rel(s,o,r,i)))}))},en=(t,n)=>e=>{try{t.$hostElement$[n](e)}catch(n){a(n,t.$hostElement$)}},on=t=>w?{passive:!!(1&t),capture:!!(2&t)}:!!(2&t),ln=t=>g.$=t,sn=t=>Object.assign(g,t),rn=new WeakMap;function cn(t,n){let e=rn.get(n);e||(e={i:0,o:{i:0,p:n.tagName},$hostElement$:n},rn.set(n,e)),Bt(e,t)}function fn(t){return t}export{t as B,m as H,ln as a,sn as b,ft as c,G as d,Yt as f,I as g,J as h,tn as p,cn as r,L as s,fn as t}
|
package/components/p-C5gRiLRR.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t,H as e,c as n,h as o,d as r,t as i}from"./p-BPYBmylI.js";import{i as a}from"./p-BDonpCG8.js";import{i as s}from"./p-DqdrUt_G.js";import{a as l}from"./p-BLMXiDE0.js";import{w as c,a as u}from"./p-DZj20TV1.js";import{d as f,g as d,j as p,w as h,k as m,h as v}from"./p-BhALzK62.js";const y=Math.min,g=Math.max,w=Math.round,x=t=>({x:t,y:t}),b={left:"right",right:"left",bottom:"top",top:"bottom"};function z(t,e,n){return g(t,y(e,n))}function A(t,e){return"function"==typeof t?t(e):t}function C(t){return t.split("-")[0]}function E(t){return t.split("-")[1]}function k(t){return"x"===t?"y":"x"}function S(t){return"y"===t?"height":"width"}function D(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function F(t){return k(D(t))}function R(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const O=["left","right"],P=["right","left"],j=["top","bottom"],L=["bottom","top"];function B(t){const e=C(t);return b[e]+t.slice(e.length)}function M(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function T(t,e,n){let{reference:o,floating:r}=t;const i=D(e),a=F(e),s=S(a),l=C(e),c="y"===i,u=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,d=o[s]/2-r[s]/2;let p;switch(l){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(E(e)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function $(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=A(e,t),h=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),m=s[d?"floating"===f?"reference":"floating":f],v=M(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===f?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,g=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(g))&&await(null==i.getScale?void 0:i.getScale(g))||{x:1,y:1},x=M(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:g,strategy:l}):y);return{top:(v.top-x.top+h.top)/w.y,bottom:(x.bottom-v.bottom+h.bottom)/w.y,left:(v.left-x.left+h.left)/w.x,right:(x.right-v.right+h.right)/w.x}}const H=new Set(["left","top"]);function I(){return"undefined"!=typeof window}function N(t){return X(t)?(t.nodeName||"").toLowerCase():"#document"}function G(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function V(t){var e;return null==(e=(X(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function X(t){return!!I()&&(t instanceof Node||t instanceof G(t).Node)}function Y(t){return!!I()&&(t instanceof Element||t instanceof G(t).Element)}function _(t){return!!I()&&(t instanceof HTMLElement||t instanceof G(t).HTMLElement)}function q(t){return!(!I()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof G(t).ShadowRoot)}function K(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=rt(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function U(t){return/^(table|td|th)$/.test(N(t))}function Z(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const J=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,W=t=>!!t&&"none"!==t;let tt;function et(t){const e=Y(t)?rt(t):t;return W(e.transform)||W(e.translate)||W(e.scale)||W(e.rotate)||W(e.perspective)||!nt()&&(W(e.backdropFilter)||W(e.filter))||J.test(e.willChange||"")||Q.test(e.contain||"")}function nt(){return null==tt&&(tt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tt}function ot(t){return/^(html|body|#document)$/.test(N(t))}function rt(t){return G(t).getComputedStyle(t)}function it(t){return Y(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function at(t){if("html"===N(t))return t;const e=t.assignedSlot||t.parentNode||q(t)&&t.host||V(t);return q(e)?e.host:e}function st(t){const e=at(t);return ot(e)?t.ownerDocument?t.ownerDocument.body:t.body:_(e)&&K(e)?e:st(e)}function lt(t,e){var n;void 0===e&&(e=[]);const o=st(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=G(o);return r?e.concat(i,i.visualViewport||[],K(o)?o:[],[]):e.concat(o,lt(o,[]))}function ct(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ut(t){const e=rt(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=_(t),i=r?t.offsetWidth:n,a=r?t.offsetHeight:o,s=w(n)!==i||w(o)!==a;return s&&(n=i,o=a),{width:n,height:o,$:s}}function ft(t){return Y(t)?t:t.contextElement}function dt(t){const e=ft(t);if(!_(e))return x(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ut(e);let a=(i?w(n.width):n.width)/o,s=(i?w(n.height):n.height)/r;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const pt=x(0);function ht(t){const e=G(t);return nt()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:pt}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ft(t);let a=x(1);e&&(o?Y(o)&&(a=dt(o)):a=dt(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==G(t))&&e}(i,n,o)?ht(i):x(0);let l=(r.left+s.x)/a.x,c=(r.top+s.y)/a.y,u=r.width/a.x,f=r.height/a.y;if(i){const t=G(i),e=o&&Y(o)?G(o):o;let n=t,r=ct(n);for(;r&&o&&e!==n;){const t=dt(r),e=r.getBoundingClientRect(),o=rt(r),i=e.left+(r.clientLeft+parseFloat(o.paddingLeft))*t.x,a=e.top+(r.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,c*=t.y,u*=t.x,f*=t.y,l+=i,c+=a,n=G(r),r=ct(n)}}return M({width:u,height:f,x:l,y:c})}function vt(t,e){const n=it(t).scrollLeft;return e?e.left+n:mt(V(t)).left+n}function yt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-vt(t,n),y:n.top+e.scrollTop}}function gt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=G(t),o=V(t),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const t=nt();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}const c=vt(o);if(c<=0){const t=o.ownerDocument,e=t.body,n=getComputedStyle(e),r="CSS1Compat"===t.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(o.clientWidth-e.clientWidth-r);a<=25&&(i-=a)}else c<=25&&(i+=c);return{width:i,height:a,x:s,y:l}}(t,n);else if("document"===e)o=function(t){const e=V(t),n=it(t),o=t.ownerDocument.body,r=g(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=g(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+vt(t);const s=-n.scrollTop;return"rtl"===rt(o).direction&&(a+=g(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(V(t));else if(Y(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=_(t)?dt(t):x(1);return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n);else{const n=ht(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return M(o)}function wt(t,e){const n=at(t);return!(n===e||!Y(n)||ot(n))&&("fixed"===rt(n).position||wt(n,e))}function xt(t,e,n){const o=_(e),r=V(e),i="fixed"===n,a=mt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=x(0);function c(){l.x=vt(r)}if(o||!o&&!i)if(("body"!==N(e)||K(r))&&(s=it(e)),o){const t=mt(e,!0,i,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&c();i&&!o&&r&&c();const u=!r||o||i?x(0):yt(r,s);return{x:a.left+s.scrollLeft-l.x-u.x,y:a.top+s.scrollTop-l.y-u.y,width:a.width,height:a.height}}function bt(t){return"static"===rt(t).position}function zt(t,e){if(!_(t)||"fixed"===rt(t).position)return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function At(t,e){const n=G(t);if(Z(t))return n;if(!_(t)){let e=at(t);for(;e&&!ot(e);){if(Y(e)&&!bt(e))return e;e=at(e)}return n}let o=zt(t,e);for(;o&&U(o)&&bt(o);)o=zt(o,e);return o&&ot(o)&&bt(o)&&!et(o)?n:o||function(t){let e=at(t);for(;_(e)&&!ot(e);){if(et(e))return e;if(Z(e))return null;e=at(e)}return null}(t)||n}const Ct={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=V(o),s=!!e&&Z(e.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=x(1);const u=x(0),f=_(o);if((f||!f&&!i)&&(("body"!==N(o)||K(a))&&(l=it(o)),f)){const t=mt(o);c=dt(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const d=!a||f||i?x(0):yt(a,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:V,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?Z(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=lt(t,[]).filter((t=>Y(t)&&"body"!==N(t))),r=null;const i="fixed"===rt(t).position;let a=i?at(t):t;for(;Y(a)&&!ot(a);){const e=rt(a),n=et(a);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||K(a)&&!n&&wt(t,a))?o=o.filter((t=>t!==a)):r=e,a=at(a)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=gt(e,i[0],r);let s=a.top,l=a.right,c=a.bottom,u=a.left;for(let t=1;t<i.length;t++){const n=gt(e,i[t],r);s=g(n.top,s),l=y(n.right,l),c=y(n.bottom,c),u=g(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:At,getElementRects:async function(t){const e=this.getOffsetParent||At,n=this.getDimensions,o=await n(t.floating);return{reference:xt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:n}=ut(t);return{width:e,height:n}},getScale:dt,isElement:Y,isRTL:function(t){return"rtl"===rt(t).direction}},Et=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:l={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=A(t,e),u={x:n,y:o},f=await i.detectOverflow(e,c),d=D(C(r)),p=k(d);let h=u[p],m=u[d];a&&(h=z(h+f["y"===p?"top":"left"],h,h-f["y"===p?"bottom":"right"])),s&&(m=z(m+f["y"===d?"top":"left"],m,m-f["y"===d?"bottom":"right"]));const v=l.fn({...e,[p]:h,[d]:m});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[p]:a,[d]:s}}}}}},kt=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=A(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=C(r),g=D(s),w=C(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=d||(w||!m?[B(s)]:function(t){const e=B(t);return[R(t),e,R(e)]}(s)),z="none"!==h;!d&&z&&b.push(...function(t,e,n,o){const r=E(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?P:O:e?O:P;case"left":case"right":return e?j:L;default:return[]}}(C(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(R)))),i}(s,m,h,x));const k=[s,...b],M=await l.detectOverflow(e,v),T=[];let $=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&T.push(M[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=E(t),r=F(t),i=S(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=B(a)),[a,B(a)]}(r,a,x);T.push(M[t[0]],M[t[1]])}if($=[...$,{placement:r,overflows:T}],!T.every((t=>t<=0))){var H,I;const t=((null==(H=i.flip)?void 0:H.index)||0)+1,e=k[t];if(e&&("alignment"!==f||g===D(e)||$.every((t=>D(t.placement)!==g||t.overflows[0]>0))))return{data:{index:t,overflows:$},reset:{placement:e}};let n=null==(I=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:I.placement;if(!n)switch(p){case"bestFit":{var N;const t=null==(N=$.filter((t=>{if(z){const e=D(t.placement);return e===g||"y"===e}return!0})).map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:N[0];t&&(n=t);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},St=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.lmvzOpen=n(this,"lmvzOpen",7),this.lmvzClose=n(this,"lmvzClose",7),this.lmvzCancel=n(this,"lmvzCancel",7)}get el(){return this}extEventController=new AbortController;closureController;containerEl;slotEl;previouslyFocusedElement=null;anchorEl;open=!1;anchor;placement="bottom-start";size="sm";autoFocus=!0;containerRole="dialog";label;lmvzOpen;lmvzClose;lmvzCancel;async show(){this.open=!0}async hide(){this.triggerClose()}async toggle(){this.open?await this.hide():await this.show()}componentDidLoad(){Ft(this.el),this.syncContainerId()}handleOpenChange(t){t?this.onOpen():this.onClose()}async handleAnchorChange(t){if(!t)return console.warn("anchor property missing for popover",this.el?.id),void(this.anchor=void 0);await c(),this.anchorEl="string"==typeof t?document.getElementById(t):t,this.setupAnchorEl(),this.open&&this.updatePosition()}disconnectedCallback(){this.removeCloseHandlers(),this.extEventController.abort()}syncContainerId(){const t=this.el.getAttribute("id");t&&this.containerEl&&(this.containerEl.id=t)}setupAnchorEl(){const{anchorEl:t}=this;t?(this.syncContainerId(),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"===this.containerRole?"dialog":this.containerRole),t.setAttribute("aria-controls",this.containerEl?.id||this.el.getAttribute("id")),t.hasAttribute("aria-expanded")||t.setAttribute("aria-expanded",this.open?"true":"false"),f(t)&&l(t,this.toggle.bind(this),this.extEventController.signal),function(t,e,n,o){if(!a())return;const r=!!e,i=t.hasAttribute("aria-labelledby");r||i||console.warn("[lmvz-popover] Host element has no accessible label. Provide a `label` prop or an `aria-labelledby` attribute pointing to a valid element."),n&&(o?m(o)||console.warn("[lmvz-popover] Anchor element is not interactive. Ensure the anchor is a button, link, input, select, textarea, has a `tabindex` attribute, or has an ARIA role that implies interactivity (button, link, menuitem, option, combobox, listbox, checkbox, radio, switch, tab)."):console.warn("[lmvz-popover] Anchor prop is set but resolved to null. Ensure the anchor element exists in the DOM when the component loads."))}(this.el,this.label,this.anchor,t)):console.warn("no anchor element set for",this)}async updatePosition(){const{anchorEl:t}=this,e=this.containerEl;if(!t||!e)return;const n=function(t){return"start"===t?"left":"end"===t?"right":t}(this.placement),{x:o,y:r}=await((t,e,n)=>{const o=new Map,r={platform:Ct,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=a.detectOverflow?a:{...a,detectOverflow:$},l=await(null==a.isRTL?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=T(c,o,l),d=o,p=0;const h={};for(let n=0;n<i.length;n++){const m=i[n];if(!m)continue;const{name:v,fn:y}=m,{x:g,y:w,data:x,reset:b}=await y({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:h,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=g?g:u,f=null!=w?w:f,h[v]={...h[v],...x},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):b.rects),({x:u,y:f}=T(c,d,l))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:h}})(t,e,{...r,platform:i})})(t,e,{placement:n,middleware:[(i=4,void 0===i&&(i=0),{name:"offset",options:i,async fn(t){var e,n;const{x:o,y:r,placement:a,middlewareData:s}=t,l=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=C(n),s=E(n),l="y"===D(n),c=H.has(a)?-1:1,u=i&&l?-1:1,f=A(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}(t,i);return a===(null==(e=s.offset)?void 0:e.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:r+l.y,data:{...l,placement:a}}}}),kt(),Et({padding:8})]});var i;e.style.left=`${o}px`,e.style.top=`${r}px`}async onOpen(){this.previouslyFocusedElement=d(document),this.setupCloseHandlers(),await u(),await this.updatePosition(),Ft(this.el),this.syncContainerId(),this.applyAnchorAriaOpen(),this.lmvzOpen.emit(),await u(),this.autoFocus&&"dialog"===this.containerRole&&this.focusFirst()}onClose(){this.removeCloseHandlers(),this.applyAnchorAriaClose(),this.restoreFocus(),this.lmvzClose.emit()}applyAnchorAriaOpen(){this.anchorEl&&this.anchorEl.setAttribute("aria-expanded","true")}applyAnchorAriaClose(){this.anchorEl&&this.anchorEl.setAttribute("aria-expanded","false")}focusFirst(){const{slotEl:t}=this;if(!t)return;const e=t.assignedElements({flatten:!0});for(const t of e){if(!p(t))continue;if(s(t))return void t.initFocus();const e=h(t,v);if(e)return void e.focus()}}restoreFocus(){const t=this.previouslyFocusedElement;t?.isConnected&&t.focus(),this.previouslyFocusedElement=null}triggerClose(){this.lmvzCancel.emit().defaultPrevented||(this.open=!1)}setupCloseHandlers(){this.closureController=new AbortController;const t={signal:this.closureController.signal};document.addEventListener("mousedown",(t=>{if(!this.open)return;const e=(t.target?.shadowRoot??document).elementFromPoint(t.x,t.y)??t.target;this.el===t.target||this.el.contains(e)||this.el.contains(t.target)||this.triggerClose()}),t),document.addEventListener("keydown",(t=>{this.open&&"Escape"===t.key&&this.triggerClose()}),t)}removeCloseHandlers(){this.closureController?.abort()}render(){return o(r,{key:"8dadcc766deebc03ea744fd1002078b382bfd48d"},o("div",{key:"d332714964212db6f5446afb1b8f38ff031a87b9",role:this.containerRole,part:"container",class:`container lmvz-wrapper-card-${this.size}`,"aria-label":this.label||void 0,ref:t=>this.containerEl=t},o("slot",{key:"0fa1d214c8c48942751cbd4759ebc992eacc8f72",ref:t=>this.slotEl=t})))}static get watchers(){return{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}}static get style(){return"@layer lmvz-ds.reset,lmvz-ds.theme,lmvz-ds.components,lmvz-ds.overrides; @layer lmvz-ds.components{.lmvz-wrapper-card-sm,.lmvz-wrapper-card-md,.lmvz-wrapper-card-lg{background:var(--lmvz-semantic-color-surface-primary, #ffffff);box-shadow:var(--lmvz-ds-shadow-l3-default-strong, 0 2px 32px 0 rgba(120, 120, 128, 0.11))}.lmvz-wrapper-card-sm{padding:var(--lmvz-component-wrapper-sm-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-wrapper-sm-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));border-radius:var(--lmvz-component-wrapper-sm-border-radius, 14px)}.lmvz-wrapper-card-md{padding:var(--lmvz-component-wrapper-md-padding-y, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)) var(--lmvz-component-wrapper-md-padding-x, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));border-radius:var(--lmvz-component-wrapper-md-border-radius, 18px)}.lmvz-wrapper-card-lg{padding:var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem));border-radius:var(--lmvz-component-wrapper-lg-border-radius, 18px)}}:host{--lmvz-popover-z-index-internal:var(--lmvz-popover-z-index, 100);display:contents;.container{position:absolute;top:-9999999999px;left:-9999999999px;max-width:var(--lmvz-popover-max-width, none);max-height:var(--lmvz-popover-max-height, none);z-index:var(--lmvz-popover-z-index-internal);overflow:auto;box-sizing:border-box}}:host(:not([open])) .container{display:none}"}},[769,"lmvz-popover",{open:[1540],anchor:[1],placement:[1],size:[1],autoFocus:[4,"auto-focus"],containerRole:[1,"container-role"],label:[1],anchorEl:[32],show:[64],hide:[64],toggle:[64]},void 0,{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}]);let Dt=0;function Ft(t){t.getAttribute("id")||t.setAttribute("id","lmvz-popover-"+Dt++)}function Rt(){"undefined"!=typeof customElements&&["lmvz-popover"].forEach((t=>{"lmvz-popover"===t&&(customElements.get(i(t))||customElements.define(i(t),St))}))}export{St as L,Rt as d}
|