@lmvz-ds/components 0.38.0 → 0.39.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.
Files changed (105) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +12 -20
  3. package/cjs/{directional-focus-controller-8Xd_7MHT.js → directional-focus-controller-DDnhfX5w.js} +15 -5
  4. package/cjs/index.cjs.js +3 -195
  5. package/cjs/lmvz-action-list.cjs.entry.js +2 -2
  6. package/cjs/lmvz-button-group.cjs.entry.js +4 -0
  7. package/cjs/lmvz-button_2.cjs.entry.js +1 -1
  8. package/cjs/lmvz-card.cjs.entry.js +1 -1
  9. package/cjs/lmvz-components.cjs.js +1 -1
  10. package/cjs/lmvz-header_2.cjs.entry.js +3 -3
  11. package/cjs/lmvz-message.cjs.entry.js +2 -0
  12. package/cjs/lmvz-popover.cjs.entry.js +1 -1
  13. package/cjs/lmvz-select.cjs.entry.js +2 -3
  14. package/cjs/lmvz-tabs.cjs.entry.js +8 -2
  15. package/cjs/loader.cjs.js +1 -1
  16. package/cjs/public-DTgpEs1_.js +206 -0
  17. package/collection/components/lmvz-action-list/lmvz-action-list.css +119 -116
  18. package/collection/components/lmvz-button/lmvz-button.css +109 -106
  19. package/collection/components/lmvz-card/lmvz-card.css +106 -103
  20. package/collection/components/lmvz-header/lmvz-header.js +2 -2
  21. package/collection/components/lmvz-select/lmvz-select.css +58 -43
  22. package/collection/components/lmvz-select/lmvz-select.js +1 -25
  23. package/collection/components/lmvz-snackbar/public.js +3 -0
  24. package/collection/components/lmvz-tabs/lmvz-tabs.js +7 -1
  25. package/collection/utils/aria/directional-focus-controller.js +16 -7
  26. package/collection/utils/icons/public.js +3 -0
  27. package/components/index.js +1 -1
  28. package/components/lmvz-action-list.js +1 -1
  29. package/components/lmvz-button-group.js +1 -1
  30. package/components/lmvz-button.js +1 -1
  31. package/components/lmvz-card.js +1 -1
  32. package/components/lmvz-datepicker.js +1 -1
  33. package/components/lmvz-header.js +1 -1
  34. package/components/lmvz-icon.js +1 -1
  35. package/components/lmvz-input.js +1 -1
  36. package/components/lmvz-link.js +1 -1
  37. package/components/lmvz-menuitem.js +1 -1
  38. package/components/lmvz-message.js +1 -1
  39. package/components/lmvz-modal.js +1 -1
  40. package/components/lmvz-popover.js +1 -1
  41. package/components/lmvz-select.js +1 -1
  42. package/components/lmvz-snackbar.js +1 -1
  43. package/components/lmvz-tabs.js +1 -1
  44. package/components/{p-CcP_sfo8.js → p--mU29mrX.js} +1 -1
  45. package/components/p-BPa0FHVO.js +1 -0
  46. package/components/{p-SnHLBAbf.js → p-Bc5MM0zh.js} +1 -1
  47. package/components/p-CyDgnpOB.js +1 -0
  48. package/components/{p-C-pRMuMh.js → p-DIyiticz.js} +1 -1
  49. package/components/{p-BhALzK62.js → p-DJLdOjL4.js} +1 -1
  50. package/components/{p-B6bUOPCG.js → p-DSDBThqb.js} +1 -1
  51. package/components/p-DXhP6UeF.js +1 -0
  52. package/components/p-DsTgD0_a.js +1 -0
  53. package/components/p-DyQ1GbaN.js +1 -0
  54. package/components/p-niXjuPxe.js +1 -0
  55. package/esm/{directional-focus-controller-QukTTWBE.js → directional-focus-controller-CJ0yNC00.js} +15 -5
  56. package/esm/index.js +1 -197
  57. package/esm/lmvz-action-list.entry.js +2 -2
  58. package/esm/lmvz-button-group.entry.js +4 -0
  59. package/esm/lmvz-button_2.entry.js +1 -1
  60. package/esm/lmvz-card.entry.js +1 -1
  61. package/esm/lmvz-components.js +1 -1
  62. package/esm/lmvz-header_2.entry.js +3 -3
  63. package/esm/lmvz-message.entry.js +2 -0
  64. package/esm/lmvz-popover.entry.js +1 -1
  65. package/esm/lmvz-select.entry.js +2 -3
  66. package/esm/lmvz-tabs.entry.js +8 -2
  67. package/esm/loader.js +1 -1
  68. package/esm/public-m6pRVUeP.js +204 -0
  69. package/hydrate/index.js +238 -16
  70. package/hydrate/index.mjs +238 -16
  71. package/lmvz-components/index.esm.js +1 -1
  72. package/lmvz-components/lmvz-components.esm.js +1 -1
  73. package/lmvz-components/p-1ba1af8d.entry.js +1 -0
  74. package/lmvz-components/p-304c7554.entry.js +1 -0
  75. package/lmvz-components/p-316dd61a.entry.js +1 -0
  76. package/lmvz-components/{p-1e1dea53.entry.js → p-41286514.entry.js} +1 -1
  77. package/lmvz-components/p-93b781ca.entry.js +1 -0
  78. package/lmvz-components/p-BPa0FHVO.js +1 -0
  79. package/lmvz-components/p-BlkpdeQI.js +1 -0
  80. package/lmvz-components/p-c884c76e.entry.js +1 -0
  81. package/lmvz-components/p-ebad823c.entry.js +1 -0
  82. package/lmvz-components/p-edec4d09.entry.js +1 -0
  83. package/lmvz-components/p-f911691c.entry.js +1 -0
  84. package/manifest.json +2 -31
  85. package/package.json +2 -1
  86. package/types/components/lmvz-select/lmvz-select.d.ts +0 -1
  87. package/types/components/lmvz-snackbar/public.d.ts +6 -0
  88. package/types/components/lmvz-tabs/lmvz-tabs.d.ts +1 -0
  89. package/types/components.d.ts +0 -11
  90. package/types/index.d.ts +5 -0
  91. package/types/utils/aria/directional-focus-controller.d.ts +9 -7
  92. package/types/utils/icons/public.d.ts +6 -0
  93. package/components/p-CgGqXTxQ.js +0 -1
  94. package/components/p-D3wobLRi.js +0 -1
  95. package/components/p-DfFdoFeH.js +0 -1
  96. package/components/p-GJaYKpHS.js +0 -1
  97. package/lmvz-components/p-3fc6c3f6.entry.js +0 -1
  98. package/lmvz-components/p-9813a7d2.entry.js +0 -1
  99. package/lmvz-components/p-CHxiS3ja.js +0 -1
  100. package/lmvz-components/p-b5a5eb9a.entry.js +0 -1
  101. package/lmvz-components/p-cadd88e5.entry.js +0 -1
  102. package/lmvz-components/p-cebaddb0.entry.js +0 -1
  103. package/lmvz-components/p-d53e69de.entry.js +0 -1
  104. package/lmvz-components/p-db75e362.entry.js +0 -1
  105. package/lmvz-components/p-eb741e1f.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-DVab4vzV.js";export{s as setNonce}from"./p-DVab4vzV.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-efd9d50e",[[593,"lmvz-datepicker",{value:[6145],visibleMonth:[6145,"visible-month"],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],disabled:[516],readonly:[516],required:[516],name:[513],label:[1],placeholder:[1],helperText:[1,"helper-text"],errorMessage:[1,"error-message"],open:[1540],displayFormat:[1,"display-format"],focusedDate:[32],valueDate:[32],visibleMonthDate:[32],inputText:[32],hasUnparseableInput:[32],isInvalid:[32],nativeError:[32],checkValidity:[64],reportValidity:[64]},[[0,"keydown","handleKeydown"],[0,"focusin","handleInputFocus"],[0,"click","handleInputFocus"],[0,"invalid","handleInvalid"]],{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-d73bb7fd",[[769,"lmvz-modal",{open:[1540],closeLabel:[1,"close-label"],hasHeader:[32]},[[0,"submit","handleFormDialogSubmit"]],{open:[{handleOpenChange:0}]}]]],["p-eb741e1f",[[769,"lmvz-message",{type:[513],live:[1],leadingIcon:[4,"leading-icon"],dismissible:[4],closeLabel:[1,"close-label"],actionLabel:[1,"action-label"]}]]],["p-cebaddb0",[[838,"lmvz-select",{value:[1025],multiple:[516],values:[1040],label:[1],helperText:[1,"helper-text"],error:[6660],errorMessage:[1,"error-message"],disabled:[516],required:[516],name:[513],size:[513],highlighted:[516],nativeError:[32],selectedLabel:[32],selectedId:[32],activeId:[32],isOpen:[32],optionGroups:[32],focusTrigger:[64],blurTrigger:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-7cbfbc88",[[513,"lmvz-snackbar",{status:[1537],message:[1025],duration:[1026],priority:[1025],actionLabel:[1025,"action-label"],animationClass:[32],show:[64],hide:[64]},null,{status:[{onStatusChange:0}]}]]],["p-335b3867",[[785,"lmvz-link",{href:[513],target:[513],rel:[1],type:[1537],externalLabel:[1,"external-label"]},null,{type:[{normalizeType:0}]}]]],["p-3fc6c3f6",[[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"],initFocus:[64]},null,{lmvzActiveNav:[{handleActiveNavChange:0}]}],[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-743616c0",[[257,"lmvz-action"]]],["p-d53e69de",[[774,"lmvz-action-list",{label:[1],initFocus:[64]}]]],["p-cadd88e5",[[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]]],["p-f24f5207",[[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]]],["p-8ba6ec19",[[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-e35f49a1",[[578,"lmvz-radio",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],helperText:[1,"helper-text"],form:[513],autofocus:[4],nativeError:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"],[0,"keydown","handleKeydown"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}]]],["p-27e8b4fa",[[513,"lmvz-spinner",{size:[513],ariaLabel:[513,"aria-label"]}]]],["p-3b7203a3",[[785,"lmvz-tab",{value:[513],disabled:[516],selected:[516],vertical:[516]}]]],["p-b5a5eb9a",[[769,"lmvz-tabs",{value:[1537],orientation:[1537],resolvedValue:[32],initFocus:[64],activateTab:[64],getTabElements:[64],setTabPanelIds:[64]},null,{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}]]],["p-773e9d95",[[578,"lmvz-toggle",{label:[1],checked:[1540],disabled:[516],required:[516],name:[1],value:[1],form:[1],focusToggle:[64],blurToggle:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-db75e362",[[769,"lmvz-button-group",{stacked:[516],primaryEnabledAction:[2064],hasActions:[2052,"has-actions"]}]]],["p-87f21ac9",[[769,"lmvz-chip",{type:[1537],size:[1537]},null,{type:[{normalizeType:0}],size:[{normalizeSize:0}]}]]],["p-6aae1df9",[[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]},null,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-1e1dea53",[[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]},null,{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}]]],["p-9813a7d2",[[785,"lmvz-button",{ti:[514,"tabindex"],scale:[513],variant:[513],disabled:[516],type:[1],form:[1],formMethod:[1,"form-method"],name:[1],value:[1],buttonRole:[1,"button-role"]}],[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],iconset:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},null,{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}]]]],e))));
1
+ import{p as e,b as a}from"./p-DVab4vzV.js";export{s as setNonce}from"./p-DVab4vzV.js";import{g as l}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,l={};return""!==a&&(l.resourcesUrl=new URL(".",a).href),e(l)})().then((async e=>(await l(),a([["p-efd9d50e",[[593,"lmvz-datepicker",{value:[6145],visibleMonth:[6145,"visible-month"],min:[1],max:[1],locale:[1],firstDayOfWeek:[2,"first-day-of-week"],disabled:[516],readonly:[516],required:[516],name:[513],label:[1],placeholder:[1],helperText:[1,"helper-text"],errorMessage:[1,"error-message"],open:[1540],displayFormat:[1,"display-format"],focusedDate:[32],valueDate:[32],visibleMonthDate:[32],inputText:[32],hasUnparseableInput:[32],isInvalid:[32],nativeError:[32],checkValidity:[64],reportValidity:[64]},[[0,"keydown","handleKeydown"],[0,"focusin","handleInputFocus"],[0,"click","handleInputFocus"],[0,"invalid","handleInvalid"]],{required:[{handleValidityRelevantPropChange:0}],min:[{handleValidityRelevantPropChange:0}],max:[{handleValidityRelevantPropChange:0}],locale:[{handleDisplayFormatChange:0}],displayFormat:[{handleDisplayFormatChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-d73bb7fd",[[769,"lmvz-modal",{open:[1540],closeLabel:[1,"close-label"],hasHeader:[32]},[[0,"submit","handleFormDialogSubmit"]],{open:[{handleOpenChange:0}]}]]],["p-edec4d09",[[769,"lmvz-message",{type:[513],live:[1],leadingIcon:[4,"leading-icon"],dismissible:[4],closeLabel:[1,"close-label"],actionLabel:[1,"action-label"]}]]],["p-f911691c",[[838,"lmvz-select",{value:[1025],multiple:[516],values:[1040],label:[1],helperText:[1,"helper-text"],error:[6660],errorMessage:[1,"error-message"],disabled:[516],required:[516],name:[513],size:[513],nativeError:[32],selectedLabel:[32],selectedId:[32],activeId:[32],isOpen:[32],optionGroups:[32],focusTrigger:[64],blurTrigger:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-7cbfbc88",[[513,"lmvz-snackbar",{status:[1537],message:[1025],duration:[1026],priority:[1025],actionLabel:[1025,"action-label"],animationClass:[32],show:[64],hide:[64]},null,{status:[{onStatusChange:0}]}]]],["p-335b3867",[[785,"lmvz-link",{href:[513],target:[513],rel:[1],type:[1537],externalLabel:[1,"external-label"]},null,{type:[{normalizeType:0}]}]]],["p-93b781ca",[[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"],initFocus:[64]},null,{lmvzActiveNav:[{handleActiveNavChange:0}]}],[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-743616c0",[[257,"lmvz-action"]]],["p-316dd61a",[[774,"lmvz-action-list",{label:[1],initFocus:[64]}]]],["p-c884c76e",[[774,"lmvz-card",{cardTitle:[1,"card-title"],imageUrl:[1,"image-url"],description:[1],primaryActionLabel:[1,"primary-action-label"]}]]],["p-f24f5207",[[578,"lmvz-checkbox",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],errorMessage:[1,"error-message"],helperText:[1,"helper-text"],form:[1],autofocus:[4],nativeError:[32],checkedState:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}]}]]],["p-8ba6ec19",[[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]]],["p-e35f49a1",[[578,"lmvz-radio",{label:[1],checked:[1540],value:[1],name:[513],disabled:[516],required:[516],error:[6660],helperText:[1,"helper-text"],form:[513],autofocus:[4],nativeError:[32],focusInput:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64]},[[0,"invalid","handleInvalid"],[0,"keydown","handleKeydown"]],{checked:[{handleCheckedChange:0}],required:[{handleRequiredChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}]]],["p-27e8b4fa",[[513,"lmvz-spinner",{size:[513],ariaLabel:[513,"aria-label"]}]]],["p-3b7203a3",[[785,"lmvz-tab",{value:[513],disabled:[516],selected:[516],vertical:[516]}]]],["p-1ba1af8d",[[769,"lmvz-tabs",{value:[1537],orientation:[1537],resolvedValue:[32],initFocus:[64],activateTab:[64],getTabElements:[64],setTabPanelIds:[64]},null,{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}]]],["p-773e9d95",[[578,"lmvz-toggle",{label:[1],checked:[1540],disabled:[516],required:[516],name:[1],value:[1],form:[1],focusToggle:[64],blurToggle:[64],checkValidity:[64],reportValidity:[64],getValidationMessage:[64],getInputElement:[64]},null,{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-304c7554",[[769,"lmvz-button-group",{stacked:[516],primaryEnabledAction:[2064],hasActions:[2052,"has-actions"]}]]],["p-87f21ac9",[[769,"lmvz-chip",{type:[1537],size:[1537]},null,{type:[{normalizeType:0}],size:[{normalizeSize:0}]}]]],["p-6aae1df9",[[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]},null,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]]],["p-41286514",[[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]},null,{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}]]],["p-ebad823c",[[785,"lmvz-button",{ti:[514,"tabindex"],scale:[513],variant:[513],disabled:[516],type:[1],form:[1],formMethod:[1,"form-method"],name:[1],value:[1],buttonRole:[1,"button-role"]}],[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],iconset:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},null,{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}]]]],e))));
@@ -0,0 +1 @@
1
+ import{g as t,r as e,c as s,h as i,H as a}from"./p-DVab4vzV.js";import{D as n}from"./p-BlkpdeQI.js";import{R as l}from"./p-CICeIanv.js";import"./p-BA3wizqg.js";import"./p-DIyiticz.js";let o=0;const r=class extends l{get el(){return t(this)}instanceId=++o;tabSlotEl;panelSlotEl;tablistEl;focusController=new n(this,{orientation:"horizontal",manageTabIndex:!0,enableHomeAndEnd:!0,listenerTarget:this.tablistEl});value;orientation="horizontal";lmvzChange;resolvedValue;constructor(t){super(),e(this,t),this.lmvzChange=s(this,"lmvzChange",7),this.addController(this.focusController)}componentWillLoad(){super.componentWillLoad(),this.syncOrientation()}componentDidLoad(){this.tabSlotEl?.addEventListener("slotchange",this.handleTabSlotChange),this.panelSlotEl?.addEventListener("slotchange",this.handlePanelSlotChange),this.el.addEventListener("lmvzTabReady",this.handleTabReady),this.handleTabSlotChange(),this.tablistEl&&this.focusController.updateListenerTarget(this.tablistEl),super.componentDidLoad()}disconnectedCallback(){this.el.removeEventListener("lmvzTabReady",this.handleTabReady),super.disconnectedCallback()}handleValueChange(t){this.applySelection(t)}handleOrientationChange(){this.syncOrientation(),this.syncFocusTargets(),this.syncTabOrientation()}async initFocus(){this.focusController.initFocus()}async activateTab(t){const e=this.findTabByValue(t);e&&!this.isTabDisabled(e)&&this.selectTab(t)}async getTabElements(){return this.slottedTabs}async setTabPanelIds(t){const e=this.slottedTabs,s=this.slottedPanels;t.forEach((([t,i],a)=>{const n=e[a],l=s[a],o=`${t}-btn`;if(n){n.id=t;const e=n.shadowRoot?.querySelector("button");e&&(e.id=o,e.setAttribute("aria-controls",i))}l&&(l.id=i,l.setAttribute("aria-labelledby",o))}))}get slottedTabs(){return(this.tabSlotEl?.assignedElements({flatten:!1})??[]).filter((t=>"lmvz-tab"===t.tagName.toLowerCase()))}get slottedPanels(){return this.panelSlotEl?.assignedElements({flatten:!1})??[]}handleTabSlotChange=()=>{this.syncFocusTargets(),this.syncTabOrientation(),this.wireAriaIds(),this.applySelection(this.value),this.updateIconTabsAttr()};handlePanelSlotChange=()=>{this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value)};handleTabReady=()=>{this.syncFocusTargets(),this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value),this.updateIconTabsAttr()};updateIconTabsAttr(){this.el.toggleAttribute("has-icon-tabs",this.slottedTabs.some((t=>t.hasAttribute("has-media"))))}syncFocusTargets(){const t=this.slottedTabs.map((t=>t.shadowRoot?.querySelector("button"))).filter((t=>!!t));this.focusController.updateElements(t)}syncOrientation(){this.removeController(this.focusController),this.focusController.hostDisconnected?.(),this.focusController=new n(this,{orientation:this.orientation,manageTabIndex:!0,enableHomeAndEnd:!0,listenerTarget:this.tablistEl}),this.addController(this.focusController),this.el.isConnected&&this.focusController.hostConnected?.()}syncTabOrientation(){const t="vertical"===this.orientation;this.slottedTabs.forEach((e=>{e.toggleAttribute("vertical",t)}))}wireAriaIds(){const t=this.slottedPanels,e=`lmvz-tabs-${this.instanceId}`;this.slottedTabs.forEach(((s,i)=>{const a=s.id||`${e}-tab-${i}`;s.id=a;const n=t[i];if(!n)return;const l=n.id||`${e}-panel-${i}`;n.id=l;const o=s.shadowRoot?.querySelector("button");o&&(o.setAttribute("aria-controls",l),o.setAttribute("id",`${a}-btn`)),n.setAttribute("role",n.getAttribute("role")??"tabpanel"),n.setAttribute("aria-labelledby",`${a}-btn`)}))}applySelection(t){const e=this.slottedTabs;if(!e.length)return;let s=this.findTabByValue(t);if(s&&!this.isTabDisabled(s)||(s=this.findNearestEnabled(t)??void 0),!s)return;const i=s.getAttribute("value")??"";this.resolvedValue=i,this.value!==i&&(this.value=i),e.forEach((t=>{const e=t.getAttribute("value")===i;t.toggleAttribute("selected",e);const s=t.shadowRoot?.querySelector("button");s&&s.setAttribute("aria-selected",String(e))})),this.slottedPanels.forEach(((t,s)=>{const a=e[s],n=a?.getAttribute("value")===i;t.toggleAttribute("hidden",!n)}));const a=s.shadowRoot?.querySelector("button");a&&this.focusController.setCurrentElement(a)}isTabDisabled(t){return t.hasAttribute("disabled")||!!t.disabled}findTabByValue(t){return this.slottedTabs.find((e=>e.getAttribute("value")===t))}findNearestEnabled(t){const e=this.slottedTabs,s=e.findIndex((e=>e.getAttribute("value")===t));for(let t=1;t<e.length;t++){const i=e[(s+t)%e.length];if(i&&!this.isTabDisabled(i))return i;const a=e[(s-t+e.length)%e.length];if(a&&!this.isTabDisabled(a))return a}}selectTab(t){t!==this.resolvedValue&&(this.applySelection(t),this.lmvzChange.emit({value:t}))}handleTabClick=t=>{const e=t.target.closest("lmvz-tab");if(!e)return;const s=e.getAttribute("value");s&&!this.isTabDisabled(e)&&this.selectTab(s)};handleKeydown=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this.el.ownerDocument.activeElement;if(!e)return;let s=null;for(const t of this.slottedTabs)if(t===e){s=t;break}if(!s)return;const i=s.getAttribute("value");i&&!this.isTabDisabled(s)&&(t.preventDefault(),this.selectTab(i))};render(){return i(a,{key:"be4fe04b1374a2793d3b1e9a658a449474efdd03",onClick:this.handleTabClick,onKeydown:this.handleKeydown},i("div",{key:"d91015eddf16dfad5d49e942eb86e9f568978f34",role:"tablist","aria-orientation":this.orientation,class:"tablist",ref:t=>this.tablistEl=t},i("slot",{key:"be0990a7c668bc96a67c01561e3142ec028dabd0",ref:t=>this.tabSlotEl=t})),i("div",{key:"338323738dfdbb436d86cdb4f6041a67c1af433d",part:"panels-container",class:"panels-container"},i("slot",{key:"d225be099c8cb902776ce0a7dbf7dcb2aef2d03b",name:"panels",ref:t=>this.panelSlotEl=t})))}static get watchers(){return{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}}};r.style=" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } :host([orientation='vertical']) .tablist { flex-direction: column; overflow: visible auto; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } ";export{r as lmvz_tabs}
@@ -0,0 +1 @@
1
+ import{r as t,g as e,h as s,H as i}from"./p-DVab4vzV.js";import{a,i as o}from"./p-BDonpCG8.js";import{v as n}from"./p-0ctLESas.js";import"./p-BPa0FHVO.js";import{d as r,e as c,f as h,h as d,j as l,a as m,k as p}from"./p-BA3wizqg.js";import"./p-CyDgnpOB.js";import"./p-DjvtQE7c.js";import"./p-D06Ds9Dh.js";import"./p-DIyiticz.js";const u=class{constructor(e){t(this,e)}get el(){return e(this)}actionsSlot;validationMessageCache=[];actionsStateObserver;stacked=!1;get primaryEnabledAction(){return this.enabledButtons.find(r)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>c(t)&&h(t)&&!d(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(h)}get visibleButtons(){return this.assignedButtons.filter(c)}get enabledButtons(){return this.visibleButtons.filter((t=d,(...e)=>{const s=t(...e);return a(s)?s.then((t=>!t)):!s}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(r),e=this.visibleButtons.filter(l),s=[],i=this.visibleButtons;if(1!==t.length&&s.push("LmvzButtonGroup actions slot should contain exactly one primary action."),e.length>1&&s.push(`LmvzButtonGroup actions slot should contain at most one secondary action (received ${e.length})`),t.length){const a=e[0];0!==i.indexOf(t[0])&&s.push("Primary action should be the first focusable element in the actions slot (i.e. first child of the actions slot)."),a&&1!==i.indexOf(a)&&s.push("Secondary action should be the second focusable element in the actions slot (i.e. immediately after the primary button).")}else e.length&&0!==i.indexOf(e[0])&&s.push("Secondary action should be the first focusable element in the actions slot when no primary action is present (i.e. first child of the actions slot).");return s}handleActionsSlotChange=()=>{this.observeActionState(),this.syncActionsState()};observeActionState(){"undefined"!=typeof MutationObserver&&(this.actionsStateObserver?.disconnect(),this.assignedButtons.length&&(this.actionsStateObserver=new MutationObserver((()=>{this.syncActionsState()})),this.assignedButtons.forEach((t=>{this.actionsStateObserver?.observe(t,{attributes:!0,attributeFilter:["disabled","hidden","variant"]})}))))}syncActionsState(){this.assignedElements.forEach((t=>{["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())||(t.hasAttribute("hidden")||t.setAttribute("hidden",""),"true"!==t.getAttribute("aria-hidden")&&t.setAttribute("aria-hidden","true"))})),this.checkActions();const t=this.visibleButtons,e=t.length>0&&t.some((t=>r(t)||l(t)));t.length>0&&!e?this.el.setAttribute("data-only-tertiary",""):this.el.removeAttribute("data-only-tertiary"),this.visibleButtons.forEach(((t,e)=>{const s=n[e]??"tertiary";t&&(m(t)?t.getAttribute("variant")||t.variant||t.setAttribute("variant",s):t.classList.add(s))}));const s=this.visibleButtons.find((t=>"tertiary"===t.getAttribute("variant")));this.visibleButtons.forEach((t=>{t===s?t.setAttribute("data-first-tertiary",""):t.removeAttribute("data-first-tertiary")})),this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{p(t)&&t.focus()}))}checkActions(){if(!o())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return s(i,{key:"3e8ce38f7e83e201e47d31579f22161ff36247b1"},s("slot",{key:"bc953d19b333f51c5f5c5ba86be3a85d155a29d1",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}};u.style=":host{display:flex;flex-flow:row-reverse wrap;gap:var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);}:host([stacked]){flex-flow:column nowrap;align-items:stretch;padding:0}:host([stacked]) ::slotted(*){display:block;width:100%}::slotted([hidden]){display:none !important}:host(:not([data-only-tertiary],[stacked])) ::slotted([data-first-tertiary]){margin-inline-end:auto}:host([data-only-tertiary]:not([stacked])){justify-content:flex-end}";export{u as lmvz_button_group}
@@ -0,0 +1 @@
1
+ import{g as r,r as o,h as t,H as e}from"./p-DVab4vzV.js";import{A as n}from"./p-Wi9d2-w9.js";import{D as a}from"./p-BlkpdeQI.js";import{a as v}from"./p-BA3wizqg.js";import{R as m}from"./p-CICeIanv.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";const l=class extends m{get el(){return r(this)}slotEl;get validationEl(){return this.el}get validationSlot(){return this.slotEl}focusController=new a(this,{orientation:"vertical",manageTabIndex:!0,enableHomeAndEnd:!0});label;constructor(r){super(),o(this,r),this.addController(this.focusController),this.addController(new n(this,{validationTiming:"slot"}))}componentDidLoad(){this.handleSlotChange(),super.componentDidLoad()}async initFocus(){this.focusController.initFocus()}handleSlotChange=()=>{const r=this.slotEl;if(!r)return;const o=r.assignedElements(),t=[];for(const r of o)i(r,t);for(const r of t)v(r)&&(r.variant||(r.variant="tertiary"));this.focusController.updateElements(t)};render(){return t(e,{key:"9dee495856e733cb17f30d0d8588362a8dcb28ce",role:"menu","aria-label":this.label||void 0},t("slot",{key:"c6454dbbe63eed5be01f3247934245d1cc1ad6e2",onSlotchange:this.handleSlotChange,ref:r=>this.slotEl=r}))}};function i(r,o){const t=r.tagName.toLowerCase();return"lmvz-button"===t?(r.buttonRole="menuitem",void o.push(r)):"button"===t?(r.setAttribute("role","menuitem"),void o.push(r)):void("hr"!==t&&("group"!==r.getAttribute("role")?console.warn("Unexpected element encountered in ActionList:",t):r.querySelectorAll("lmvz-button, button").forEach((r=>i(r,o)))))}l.style="@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { & { & { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification, center); gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); box-sizing: border-box; padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent); border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px)); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } & > * { font: inherit; color: inherit; } &:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } &:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } &:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } &:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } &.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } &.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } &.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } &.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } &.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } &.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } &.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } } --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification: normal; width: 100%; } }";export{l as lmvz_action_list}
@@ -1 +1 @@
1
- import{r as t,c as e,g as n,h as o,H as r}from"./p-DVab4vzV.js";import{i}from"./p-BDonpCG8.js";import{i as a}from"./p-CHxiS3ja.js";import{a as s}from"./p-CPSyM_e-.js";import{w as l,a as c}from"./p-DZj20TV1.js";import{f as u,g as f,m as d,w as p,c as m,k as h}from"./p-BA3wizqg.js";import"./p-CICeIanv.js";import"./p-DIyiticz.js";const v=Math.min,y=Math.max,w=Math.round,g=t=>({x:t,y:t}),x={left:"right",right:"left",bottom:"top",top:"bottom"};function b(t,e,n){return y(t,v(e,n))}function z(t,e){return"function"==typeof t?t(e):t}function A(t){return t.split("-")[0]}function C(t){return t.split("-")[1]}function k(t){return"x"===t?"y":"x"}function E(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function D(t){return k(S(t))}function j(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const F=["left","right"],R=["right","left"],O=["top","bottom"],P=["bottom","top"];function M(t){const e=A(t);return x[e]+t.slice(e.length)}function T(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 L(t,e,n){let{reference:o,floating:r}=t;const i=S(e),a=D(e),s=E(a),l=A(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(C(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}=z(e,t),m=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),h=s[d?"floating"===f?"reference":"floating":f],v=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.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,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),g=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-x.top+m.top)/g.y,bottom:(x.bottom-v.bottom+m.bottom)/g.y,left:(v.left-x.left+m.left)/g.x,right:(x.right-v.right+m.right)/g.x}}const B=new Set(["left","top"]);function H(){return"undefined"!=typeof window}function I(t){return _(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(_(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function _(t){return!!H()&&(t instanceof Node||t instanceof V(t).Node)}function q(t){return!!H()&&(t instanceof Element||t instanceof V(t).Element)}function G(t){return!!H()&&(t instanceof HTMLElement||t instanceof V(t).HTMLElement)}function X(t){return!(!H()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof V(t).ShadowRoot)}function Y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function Z(t){return/^(table|td|th)$/.test(I(t))}function J(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const K=/transform|translate|scale|rotate|perspective|filter/,Q=/paint|layout|strict|content/,U=t=>!!t&&"none"!==t;let W;function tt(t){const e=q(t)?ot(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!et()&&(U(e.backdropFilter)||U(e.filter))||K.test(e.willChange||"")||Q.test(e.contain||"")}function et(){return null==W&&(W="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),W}function nt(t){return/^(html|body|#document)$/.test(I(t))}function ot(t){return V(t).getComputedStyle(t)}function rt(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===I(t))return t;const e=t.assignedSlot||t.parentNode||X(t)&&t.host||N(t);return X(e)?e.host:e}function at(t){const e=it(t);return nt(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&Y(e)?e:at(e)}function st(t,e){var n;void 0===e&&(e=[]);const o=at(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=V(o);return r?e.concat(i,i.visualViewport||[],Y(o)?o:[],[]):e.concat(o,st(o,[]))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ct(t){const e=ot(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=G(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 ut(t){return q(t)?t:t.contextElement}function ft(t){const e=ut(t);if(!G(e))return g(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ct(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 dt=g(0);function pt(t){const e=V(t);return et()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:dt}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ut(t);let a=g(1);e&&(o?q(o)&&(a=ft(o)):a=ft(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==V(t))&&e}(i,n,o)?pt(i):g(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=V(i),e=o&&q(o)?V(o):o;let n=t,r=lt(n);for(;r&&o&&e!==n;){const t=ft(r),e=r.getBoundingClientRect(),o=ot(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=V(r),r=lt(n)}}return T({width:u,height:f,x:l,y:c})}function ht(t,e){const n=rt(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ht(t,n),y:n.top+e.scrollTop}}function yt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=V(t),o=N(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=et();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}const c=ht(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=N(t),n=rt(t),o=t.ownerDocument.body,r=y(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=y(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+ht(t);const s=-n.scrollTop;return"rtl"===ot(o).direction&&(a+=y(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(N(t));else if(q(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=G(t)?ft(t):g(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=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return T(o)}function wt(t,e){const n=it(t);return!(n===e||!q(n)||nt(n))&&("fixed"===ot(n).position||wt(n,e))}function gt(t,e,n){const o=G(e),r=N(e),i="fixed"===n,a=mt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=g(0);function c(){l.x=ht(r)}if(o||!o&&!i)if(("body"!==I(e)||Y(r))&&(s=rt(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?g(0):vt(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 xt(t){return"static"===ot(t).position}function bt(t,e){if(!G(t)||"fixed"===ot(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=V(t);if(J(t))return n;if(!G(t)){let e=it(t);for(;e&&!nt(e);){if(q(e)&&!xt(e))return e;e=it(e)}return n}let o=bt(t,e);for(;o&&Z(o)&&xt(o);)o=bt(o,e);return o&&nt(o)&&xt(o)&&!tt(o)?n:o||function(t){let e=it(t);for(;G(e)&&!nt(e);){if(tt(e))return e;if(J(e))return null;e=it(e)}return null}(t)||n}const At={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=N(o),s=!!e&&J(e.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=g(1);const u=g(0),f=G(o);if((f||!f&&!i)&&(("body"!==I(o)||Y(a))&&(l=rt(o)),f)){const t=mt(o);c=ft(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const d=!a||f||i?g(0):vt(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:N,getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?J(e)?[]:function(t,e){const n=e.get(t);if(n)return n;let o=st(t,[]).filter((t=>q(t)&&"body"!==I(t))),r=null;const i="fixed"===ot(t).position;let a=i?it(t):t;for(;q(a)&&!nt(a);){const e=ot(a),n=tt(a);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||Y(a)&&!n&&wt(t,a))?o=o.filter((t=>t!==a)):r=e,a=it(a)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=yt(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=yt(e,i[t],r);s=y(n.top,s),l=v(n.right,l),c=v(n.bottom,c),u=y(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:zt,getElementRects:async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:gt(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}=ct(t);return{width:e,height:n}},getScale:ft,isElement:q,isRTL:function(t){return"rtl"===ot(t).direction}},Ct=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}=z(t,e),u={x:n,y:o},f=await i.detectOverflow(e,c),d=S(A(r)),p=k(d);let m=u[p],h=u[d];a&&(m=b(m+f["y"===p?"top":"left"],m,m-f["y"===p?"bottom":"right"])),s&&(h=b(h+f["y"===d?"top":"left"],h,h-f["y"===d?"bottom":"right"]));const v=l.fn({...e,[p]:m,[d]:h});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:m="none",flipAlignment:h=!0,...v}=z(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=A(r),w=S(s),g=A(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=d||(g||!h?[M(s)]:function(t){const e=M(t);return[j(t),e,j(e)]}(s)),k="none"!==m;!d&&k&&b.push(...function(t,e,n,o){const r=C(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?R:F:e?F:R;case"left":case"right":return e?O:P;default:return[]}}(A(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(j)))),i}(s,h,m,x));const T=[s,...b],L=await l.detectOverflow(e,v),$=[];let B=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&$.push(L[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=C(t),r=D(t),i=E(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=M(a)),[a,M(a)]}(r,a,x);$.push(L[t[0]],L[t[1]])}if(B=[...B,{placement:r,overflows:$}],!$.every((t=>t<=0))){var H,I;const t=((null==(H=i.flip)?void 0:H.index)||0)+1,e=T[t];if(e&&("alignment"!==f||w===S(e)||B.every((t=>S(t.placement)!==w||t.overflows[0]>0))))return{data:{index:t,overflows:B},reset:{placement:e}};let n=null==(I=B.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 V;const t=null==(V=B.filter((t=>{if(k){const e=S(t.placement);return e===w||"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:V[0];t&&(n=t);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},Et=class{constructor(n){t(this,n),this.lmvzOpen=e(this,"lmvzOpen",7),this.lmvzClose=e(this,"lmvzClose",7),this.lmvzCancel=e(this,"lmvzCancel",7)}get el(){return n(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(){Dt(this.el)}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 l(),this.anchorEl="string"==typeof t?document.getElementById(t):t,this.setupAnchorEl(),this.open&&this.updatePosition()}disconnectedCallback(){this.removeCloseHandlers(),this.extEventController.abort()}setupAnchorEl(){const{anchorEl:t}=this;t?(t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"===this.containerRole?"dialog":this.containerRole),t.setAttribute("aria-controls",this.el.getAttribute("id")),t.hasAttribute("aria-expanded")||t.setAttribute("aria-expanded",this.open?"true":"false"),u(t)&&s(t,this.toggle.bind(this),this.extEventController.signal),function(t,e,n,o){if(!i())return;const r=!!e,a=t.hasAttribute("aria-labelledby");r||a||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:At,...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}=L(c,o,l),d=o,p=0;const m={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:v,fn:y}=h,{x:w,y:g,data:x,reset:b}=await y({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=w?w:u,f=null!=g?g:f,m[v]={...m[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}=L(c,d,l))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:m}})(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=A(n),s=C(n),l="y"===S(n),c=B.has(a)?-1:1,u=i&&l?-1:1,f=z(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),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(),Ct({padding:8})]});var i;e.style.left=`${o}px`,e.style.top=`${r}px`}async onOpen(){this.previouslyFocusedElement=f(document),this.setupCloseHandlers(),await c(),await this.updatePosition(),Dt(this.el),this.applyAnchorAriaOpen(),this.lmvzOpen.emit(),await c(),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(!d(t))continue;if(a(t))return void t.initFocus();const e=p(t,h);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:"83529aeac05cdc706193fa8bbbcc8f8672756111",role:this.containerRole,"aria-label":this.label||void 0},o("div",{key:"97c255e788806c0dec2f4ed04c6fc815150912a2",part:"container",class:`container lmvz-wrapper-card-${this.size}`,ref:t=>this.containerEl=t},o("slot",{key:"e4ea69d179557e7d34f1475c07c9284ea8d10a67",ref:t=>this.slotEl=t})))}static get watchers(){return{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}}};let St=0;function Dt(t){t.getAttribute("id")||t.setAttribute("id","lmvz-popover-"+St++)}Et.style="@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])){display:none}";export{Et as lmvz_popover}
1
+ import{r as t,c as e,g as n,h as o,H as r}from"./p-DVab4vzV.js";import{i}from"./p-BDonpCG8.js";import{i as a}from"./p-BlkpdeQI.js";import{a as s}from"./p-CPSyM_e-.js";import{w as l,a as c}from"./p-DZj20TV1.js";import{f as u,g as f,m as d,w as p,c as m,k as h}from"./p-BA3wizqg.js";import"./p-CICeIanv.js";import"./p-DIyiticz.js";const v=Math.min,y=Math.max,w=Math.round,g=t=>({x:t,y:t}),x={left:"right",right:"left",bottom:"top",top:"bottom"};function b(t,e,n){return y(t,v(e,n))}function z(t,e){return"function"==typeof t?t(e):t}function A(t){return t.split("-")[0]}function C(t){return t.split("-")[1]}function k(t){return"x"===t?"y":"x"}function E(t){return"y"===t?"height":"width"}function S(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function D(t){return k(S(t))}function F(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const R=["left","right"],j=["right","left"],O=["top","bottom"],P=["bottom","top"];function M(t){const e=A(t);return x[e]+t.slice(e.length)}function T(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 B(t,e,n){let{reference:o,floating:r}=t;const i=S(e),a=D(e),s=E(a),l=A(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(C(e)){case"start":p[a]-=d*(n&&c?-1:1);break;case"end":p[a]+=d*(n&&c?-1:1)}return p}async function L(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}=z(e,t),m=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),h=s[d?"floating"===f?"reference":"floating":f],v=T(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.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,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),g=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=T(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(v.top-x.top+m.top)/g.y,bottom:(x.bottom-v.bottom+m.bottom)/g.y,left:(v.left-x.left+m.left)/g.x,right:(x.right-v.right+m.right)/g.x}}const $=new Set(["left","top"]);function H(){return"undefined"!=typeof window}function I(t){return _(t)?(t.nodeName||"").toLowerCase():"#document"}function V(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function N(t){var e;return null==(e=(_(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function _(t){return!!H()&&(t instanceof Node||t instanceof V(t).Node)}function q(t){return!!H()&&(t instanceof Element||t instanceof V(t).Element)}function G(t){return!!H()&&(t instanceof HTMLElement||t instanceof V(t).HTMLElement)}function Q(t){return!(!H()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof V(t).ShadowRoot)}function X(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&"inline"!==r&&"contents"!==r}function Y(t){return/^(table|td|th)$/.test(I(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/,K=/paint|layout|strict|content/,U=t=>!!t&&"none"!==t;let W;function tt(t){const e=q(t)?ot(t):t;return U(e.transform)||U(e.translate)||U(e.scale)||U(e.rotate)||U(e.perspective)||!et()&&(U(e.backdropFilter)||U(e.filter))||J.test(e.willChange||"")||K.test(e.contain||"")}function et(){return null==W&&(W="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),W}function nt(t){return/^(html|body|#document)$/.test(I(t))}function ot(t){return V(t).getComputedStyle(t)}function rt(t){return q(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function it(t){if("html"===I(t))return t;const e=t.assignedSlot||t.parentNode||Q(t)&&t.host||N(t);return Q(e)?e.host:e}function at(t){const e=it(t);return nt(e)?t.ownerDocument?t.ownerDocument.body:t.body:G(e)&&X(e)?e:at(e)}function st(t,e){var n;void 0===e&&(e=[]);const o=at(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=V(o);return r?e.concat(i,i.visualViewport||[],X(o)?o:[],[]):e.concat(o,st(o,[]))}function lt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ct(t){const e=ot(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=G(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 ut(t){return q(t)?t:t.contextElement}function ft(t){const e=ut(t);if(!G(e))return g(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=ct(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 dt=g(0);function pt(t){const e=V(t);return et()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:dt}function mt(t,e,n,o){void 0===e&&(e=!1),void 0===n&&(n=!1);const r=t.getBoundingClientRect(),i=ut(t);let a=g(1);e&&(o?q(o)&&(a=ft(o)):a=ft(t));const s=function(t,e,n){return void 0===e&&(e=!1),!(!n||e&&n!==V(t))&&e}(i,n,o)?pt(i):g(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=V(i),e=o&&q(o)?V(o):o;let n=t,r=lt(n);for(;r&&o&&e!==n;){const t=ft(r),e=r.getBoundingClientRect(),o=ot(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=V(r),r=lt(n)}}return T({width:u,height:f,x:l,y:c})}function ht(t,e){const n=rt(t).scrollLeft;return e?e.left+n:mt(N(t)).left+n}function vt(t,e){const n=t.getBoundingClientRect();return{x:n.left+e.scrollLeft-ht(t,n),y:n.top+e.scrollTop}}function yt(t,e,n){let o;if("viewport"===e)o=function(t,e){const n=V(t),o=N(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=et();(!t||t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}const c=ht(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=N(t),n=rt(t),o=t.ownerDocument.body,r=y(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=y(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+ht(t);const s=-n.scrollTop;return"rtl"===ot(o).direction&&(a+=y(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:s}}(N(t));else if(q(e))o=function(t,e){const n=mt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=G(t)?ft(t):g(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=pt(t);o={x:e.x-n.x,y:e.y-n.y,width:e.width,height:e.height}}return T(o)}function wt(t,e){const n=it(t);return!(n===e||!q(n)||nt(n))&&("fixed"===ot(n).position||wt(n,e))}function gt(t,e,n){const o=G(e),r=N(e),i="fixed"===n,a=mt(t,!0,i,e);let s={scrollLeft:0,scrollTop:0};const l=g(0);function c(){l.x=ht(r)}if(o||!o&&!i)if(("body"!==I(e)||X(r))&&(s=rt(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?g(0):vt(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 xt(t){return"static"===ot(t).position}function bt(t,e){if(!G(t)||"fixed"===ot(t).position)return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=V(t);if(Z(t))return n;if(!G(t)){let e=it(t);for(;e&&!nt(e);){if(q(e)&&!xt(e))return e;e=it(e)}return n}let o=bt(t,e);for(;o&&Y(o)&&xt(o);)o=bt(o,e);return o&&nt(o)&&xt(o)&&!tt(o)?n:o||function(t){let e=it(t);for(;G(e)&&!nt(e);){if(tt(e))return e;if(Z(e))return null;e=it(e)}return null}(t)||n}const At={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i="fixed"===r,a=N(o),s=!!e&&Z(e.floating);if(o===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=g(1);const u=g(0),f=G(o);if((f||!f&&!i)&&(("body"!==I(o)||X(a))&&(l=rt(o)),f)){const t=mt(o);c=ft(o),u.x=t.x+o.clientLeft,u.y=t.y+o.clientTop}const d=!a||f||i?g(0):vt(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:N,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=st(t,[]).filter((t=>q(t)&&"body"!==I(t))),r=null;const i="fixed"===ot(t).position;let a=i?it(t):t;for(;q(a)&&!nt(a);){const e=ot(a),n=tt(a);n||"fixed"!==e.position||(r=null),(i?!n&&!r:!n&&"static"===e.position&&r&&("absolute"===r.position||"fixed"===r.position)||X(a)&&!n&&wt(t,a))?o=o.filter((t=>t!==a)):r=e,a=it(a)}return e.set(t,o),o}(e,this._c):[].concat(n),o],a=yt(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=yt(e,i[t],r);s=y(n.top,s),l=v(n.right,l),c=v(n.bottom,c),u=y(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:zt,getElementRects:async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:gt(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}=ct(t);return{width:e,height:n}},getScale:ft,isElement:q,isRTL:function(t){return"rtl"===ot(t).direction}},Ct=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}=z(t,e),u={x:n,y:o},f=await i.detectOverflow(e,c),d=S(A(r)),p=k(d);let m=u[p],h=u[d];a&&(m=b(m+f["y"===p?"top":"left"],m,m-f["y"===p?"bottom":"right"])),s&&(h=b(h+f["y"===d?"top":"left"],h,h-f["y"===d?"bottom":"right"]));const v=l.fn({...e,[p]:m,[d]:h});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:m="none",flipAlignment:h=!0,...v}=z(t,e);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=A(r),w=S(s),g=A(s)===s,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),b=d||(g||!h?[M(s)]:function(t){const e=M(t);return[F(t),e,F(e)]}(s)),k="none"!==m;!d&&k&&b.push(...function(t,e,n,o){const r=C(t);let i=function(t,e,n){switch(t){case"top":case"bottom":return n?e?j:R:e?R:j;case"left":case"right":return e?O:P;default:return[]}}(A(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(F)))),i}(s,h,m,x));const T=[s,...b],B=await l.detectOverflow(e,v),L=[];let $=(null==(o=i.flip)?void 0:o.overflows)||[];if(u&&L.push(B[y]),f){const t=function(t,e,n){void 0===n&&(n=!1);const o=C(t),r=D(t),i=E(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=M(a)),[a,M(a)]}(r,a,x);L.push(B[t[0]],B[t[1]])}if($=[...$,{placement:r,overflows:L}],!L.every((t=>t<=0))){var H,I;const t=((null==(H=i.flip)?void 0:H.index)||0)+1,e=T[t];if(e&&("alignment"!==f||w===S(e)||$.every((t=>S(t.placement)!==w||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 V;const t=null==(V=$.filter((t=>{if(k){const e=S(t.placement);return e===w||"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:V[0];t&&(n=t);break}case"initialPlacement":n=s}if(r!==n)return{reset:{placement:n}}}return{}}}},Et=class{constructor(n){t(this,n),this.lmvzOpen=e(this,"lmvzOpen",7),this.lmvzClose=e(this,"lmvzClose",7),this.lmvzCancel=e(this,"lmvzCancel",7)}get el(){return n(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(){Dt(this.el)}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 l(),this.anchorEl="string"==typeof t?document.getElementById(t):t,this.setupAnchorEl(),this.open&&this.updatePosition()}disconnectedCallback(){this.removeCloseHandlers(),this.extEventController.abort()}setupAnchorEl(){const{anchorEl:t}=this;t?(t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","dialog"===this.containerRole?"dialog":this.containerRole),t.setAttribute("aria-controls",this.el.getAttribute("id")),t.hasAttribute("aria-expanded")||t.setAttribute("aria-expanded",this.open?"true":"false"),u(t)&&s(t,this.toggle.bind(this),this.extEventController.signal),function(t,e,n,o){if(!i())return;const r=!!e,a=t.hasAttribute("aria-labelledby");r||a||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:At,...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},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}=B(c,o,l),d=o,p=0;const m={};for(let n=0;n<i.length;n++){const h=i[n];if(!h)continue;const{name:v,fn:y}=h,{x:w,y:g,data:x,reset:b}=await y({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:c,platform:s,elements:{reference:t,floating:e}});u=null!=w?w:u,f=null!=g?g:f,m[v]={...m[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}=B(c,d,l))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:m}})(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=A(n),s=C(n),l="y"===S(n),c=$.has(a)?-1:1,u=i&&l?-1:1,f=z(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:m}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),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(),Ct({padding:8})]});var i;e.style.left=`${o}px`,e.style.top=`${r}px`}async onOpen(){this.previouslyFocusedElement=f(document),this.setupCloseHandlers(),await c(),await this.updatePosition(),Dt(this.el),this.applyAnchorAriaOpen(),this.lmvzOpen.emit(),await c(),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(!d(t))continue;if(a(t))return void t.initFocus();const e=p(t,h);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:"83529aeac05cdc706193fa8bbbcc8f8672756111",role:this.containerRole,"aria-label":this.label||void 0},o("div",{key:"97c255e788806c0dec2f4ed04c6fc815150912a2",part:"container",class:`container lmvz-wrapper-card-${this.size}`,ref:t=>this.containerEl=t},o("slot",{key:"e4ea69d179557e7d34f1475c07c9284ea8d10a67",ref:t=>this.slotEl=t})))}static get watchers(){return{open:[{handleOpenChange:0}],anchor:[{handleAnchorChange:1}]}}};let St=0;function Dt(t){t.getAttribute("id")||t.setAttribute("id","lmvz-popover-"+St++)}Et.style="@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])){display:none}";export{Et as lmvz_popover}
@@ -0,0 +1 @@
1
+ import{g as M,r as N,h as e,H as I}from"./p-DVab4vzV.js";import{A as j}from"./p-Wi9d2-w9.js";import{D}from"./p-BlkpdeQI.js";import{R as g}from"./p-CICeIanv.js";export{lmvz_menuitem}from"./p-8ba6ec19.entry.js";import"./p-BDonpCG8.js";import"./p-BA3wizqg.js";import"./p-DIyiticz.js";import"./p-CPSyM_e-.js";const a=class extends g{get el(){return M(this)}get validationEl(){return this.el}primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new D(this,{orientation:"both",manageTabIndex:!1,enableHomeAndEnd:!1});get primaryMenuitems(){return this.primarySlot?.assignedElements({flatten:!1})||[]}get secondaryMenuitems(){return this.secondarySlot?.assignedElements({flatten:!0})||[]}get role(){return"banner"}lmvzActiveNav;get secondarySlotName(){return`connect-nav-${this.lmvzActiveNav}`}constructor(M){super(),N(this,M),this.addController(new j(this,{reValidateOnPropChanges:!0})),this.addController(this.keyboardNavigationController)}handleActiveNavChange(){this.updateElementsActive()}async initFocus(){this.keyboardNavigationController.initFocus()}componentDidLoad(){this.primarySlot?.addEventListener("slotchange",this.handlePrimaryNavItemsChange.bind(this)),this.handlePrimaryNavItemsChange(),this.secondarySlot?.addEventListener("slotchange",this.handleSecondaryNavItemsChange.bind(this)),super.componentDidLoad()}handlePrimaryNavItemsChange(){const M=this.primaryMenuitems;M.length?(M.forEach((M=>{M.setAttribute("aria-haspopup","true"),M.setAttribute("aria-controls","nav-secondary")})),this.updateElementsActive(),this.updateKeyboardNavSubjects()):console.warn("Primary slot has no assigned elements. Please add navigation items to the primary slot.")}handleSecondaryNavItemsChange(){this.secondaryMenuitems.length&&this.updateKeyboardNavSubjects()}updateKeyboardNavSubjects(){this.keyboardNavigationController.updateElements([...this.primaryMenuitems,...this.secondaryMenuitems])}updateElementsActive(){const M=this.primaryMenuitems;if(!M.length)return;let N="";M.forEach((M=>{const e=M.id===this.lmvzActiveNav;e&&(N=M.textContent||M.id),M.setAttribute("aria-expanded",e?"true":"false")})),N&&this.secondaryNav?.setAttribute("aria-label",`Untermenü für ${N}`)}delegateFocus(){const M=this.primaryMenuitems[0];M&&M.focus()}render(){return e(I,{key:"a72c860d7f67c9631c462c0abcc798bb142dfc55",onFocus:this.delegateFocus.bind(this)},e("div",{key:"4ed87264d201c513bce284536793692424ed864b",class:"brand"},e("slot",{key:"9291d81d7f8a630007b8ad827a16ebea7222b9d2",name:"brand"},e("img",{key:"77da99409f40d93e4a2d190cbb2a8857f1e81c36",id:"fallback-logo-lmvz",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",alt:"Lehrmittelverlag Zürich"}))),e("nav",{key:"3c40c04bb23524ae58e391a54b044e225a25ad07","aria-label":"Hauptnavigation"},e("div",{key:"207b8032d3d11b4bfacb6e7fcffb683ad5da8ccc",role:"menubar",class:"primary-menubar"},e("slot",{key:"8ae67a57ac7b6bb6083c469a857542e31b0c2294",name:"nav-primary",ref:M=>this.primarySlot=M}),e("div",{key:"86b9696c95e9ae0e3843fa1607f268dcae8cb279",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:M=>this.secondaryNav=M},e("slot",{key:"67966de33555dc26ac2dc51fc8a85d456a2e8e85",name:this.secondarySlotName,ref:M=>this.secondarySlot=M})))),e("div",{key:"bfb2831144cee723c3182d96d64f44be1cc5a78b",class:"actions"},e("slot",{key:"6956b81fa8ed6c446edc5f7d9708462b39bc8cbb",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}};a.style=":host{display:flex;width:100vw;flex-direction:row;align-items:center;box-sizing:border-box;background-color:var(--lmvz-semantic-color-surface-primary, #ffffff);--lmvz-header-x-spacing-level-1:var(--lmvz-dimension-28-8, clamp(0.5rem, 0.2rem + 1.29vw, 1.75rem));--lmvz-header-x-spacing-level-2:var(--lmvz-component-buttongroup-wrapper-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem));padding:var(--lmvz-dimension-16-8, clamp(0.5rem, 0.38rem + 0.52vw, 1rem)) var(--lmvz-header-x-spacing-level-1);gap:var(--lmvz-header-x-spacing-level-1);.brand{display:inline-flex;justify-content:center;align-items:center}#fallback-logo-lmvz{height:34px;width:auto}nav{flex-grow:1}.primary-menubar{display:flex;flex-direction:row;align-items:center}.secondary-menubar{display:flex;flex-direction:row;align-items:center;margin-left:var(--lmvz-header-x-spacing-level-2);padding-left:var(--lmvz-header-x-spacing-level-2);border-left:1px solid var(--lmvz-semantic-color-border-default, #e0e0e0)}}";export{a as lmvz_header}
@@ -0,0 +1 @@
1
+ import{t}from"./p-CyDgnpOB.js";const s={low:0,normal:1,high:2},i={success:5e3,warning:5e3,error:8e3};let o=0;function e(){return o+=1,`snackbar-${o}`}class n{hostEl=void 0;active=void 0;getHost(){return void 0===this.hostEl||this.hostEl.isConnected||(this.hostEl=void 0),void 0===this.hostEl&&(this.hostEl=function(){if("undefined"==typeof document)return;const t=document.querySelector("[data-snackbar-host]");if(t)return t;const s=document.createElement("lmvz-snackbar");return s.setAttribute("data-snackbar-host",""),document.body.appendChild(s),s}()),this.hostEl}clearTimer(t){void 0!==t.timerId&&(clearTimeout(t.timerId),t.timerId=void 0)}scheduleTimer(t,s){s<=0||(t.timerStartedAt=Date.now(),t.timerId=setTimeout((()=>{void 0!==this.active&&this.active.id===t.id&&this.dismissActive(t,"timeout")}),s))}dismissActive(t,s){this.clearTimer(t);const i=t.hostEl;i.removeEventListener("pointerenter",t.onPointerEnter),i.removeEventListener("pointerleave",t.onPointerLeave),i.removeEventListener("focusin",t.onFocusIn),i.removeEventListener("focusout",t.onFocusOut),t.onActionListener&&i.removeEventListener("lmvzAction",t.onActionListener),i.hide?.(),this.active?.id===t.id&&(this.active=void 0),"action"!==s&&i.dispatchEvent(new CustomEvent("lmvzClose",{detail:{reason:s},bubbles:!0,composed:!0})),t.resolve({reason:s})}pauseTimer(t){if(t.pauseCount+=1,t.pauseCount>1||void 0===t.timerId)return;const s=void 0!==t.timerStartedAt?Date.now()-t.timerStartedAt:0;t.remaining=Math.max(0,t.remaining-s),t.timerStartedAt=void 0,this.clearTimer(t)}resumeTimer(t){t.pauseCount>0&&(t.pauseCount-=1),t.pauseCount>0||t.remaining>0&&this.scheduleTimer(t,t.remaining)}applyToHost(t,s){t.setAttribute("status",s.status??"success"),void 0!==s.actionLabel?t.setAttribute("action-label",s.actionLabel):t.removeAttribute("action-label")}open(t){const o=s[t.priority??"normal"];if(void 0!==this.active&&o<this.active.priority){let t;const s=new Promise((s=>{t=s}));return t({reason:"swallowed"}),{id:e(),closed:s,dismiss(){}}}void 0!==this.active&&this.dismissActive(this.active,"overridden");const n=this.getHost();if(void 0===n){const t=e();let s;const i=new Promise((t=>{s=t}));return s({reason:"swallowed"}),{id:t,closed:i,dismiss(){}}}const r=e(),c=0===t.duration?0:t.duration??i[t.status??"success"];let a;const d=new Promise((t=>{a=t})),h={id:r,priority:o,resolve:a,timerId:void 0,remaining:c,timerStartedAt:void 0,pauseCount:0,hostEl:n,onPointerEnter:()=>this.pauseTimer(h),onPointerLeave:()=>this.resumeTimer(h),onFocusIn:()=>this.pauseTimer(h),onFocusOut:()=>this.resumeTimer(h)};this.active=h,n.addEventListener("pointerenter",h.onPointerEnter),n.addEventListener("pointerleave",h.onPointerLeave),n.addEventListener("focusin",h.onFocusIn),n.addEventListener("focusout",h.onFocusOut),this.applyToHost(n,t);const u=()=>{void 0!==this.active&&this.active.id===r&&(t.onAction?.(),this.dismissActive(h,"action"))};return h.onActionListener=u,n.addEventListener("lmvzAction",u,{once:!0}),n.show?.(),queueMicrotask((()=>n.setAttribute("message",t.message))),c>0&&this.scheduleTimer(h,c),{id:r,closed:d,dismiss:()=>{this.active?.id===r&&this.dismissActive(h,"manual")}}}dismiss(t){this.active&&(t&&this.active.id!==t||this.dismissActive(this.active,"manual"))}}window.LmvzApi??={},window.LmvzApi.SnackbarController=n,window.LmvzApi??={},window.LmvzApi.typedIconFromSet=t;export{n as S}
@@ -0,0 +1 @@
1
+ import{i as t,g as s}from"./p-BA3wizqg.js";import{r as i,g as e}from"./p-CICeIanv.js";const n={orientation:"both",enableHomeAndEnd:!1,manageTabIndex:!1};class h{host;elements=[];currentElement;config;constructor(t,s={}){this.host=t,this.config={...n,...s}}hostConnected(){i(this.host.el,"isFocusControllerHost",!0),this.getListenerTarget().addEventListener("keydown",this.handleKeydown),this.syncManagedFocusTarget()}hostDisconnected(){this.getListenerTarget().removeEventListener("keydown",this.handleKeydown)}updateListenerTarget(t){t!==this.config.listenerTarget&&(this.getListenerTarget().removeEventListener("keydown",this.handleKeydown),this.config.listenerTarget=t,this.getListenerTarget().addEventListener("keydown",this.handleKeydown))}getListenerTarget(){return this.config.listenerTarget??this.host.el}updateElements(t){const s=this.currentElement??this.getManagedActiveElement()??void 0;this.elements=t.filter((t=>"focus"in t&&1===t.nodeType)),this.syncManagedFocusTarget(s)}setCurrentElement(t){const s=this.currentElement;this.currentElement=null!=t&&"focus"in t&&1===t.nodeType?t:void 0,this.syncManagedFocusTarget(s)}async initFocus(){const t=this.selectManagedElement();t&&this.applyFocusTarget(t,!0)}handleKeydown=s=>{if(t(s.target))return;const i=this.getFocusIntent(s.key);if(!i)return;const e=this.getManagedActiveElement(),n=this.getTargetElement(e,i);n&&(s.preventDefault(),this.applyFocusTarget(n,!0))};getFocusIntent(t){return this.config.enableHomeAndEnd&&"Home"===t?"first":this.config.enableHomeAndEnd&&"End"===t?"last":"horizontal"===this.config.orientation?"ArrowRight"===t?"next":"ArrowLeft"===t?"previous":void 0:"vertical"===this.config.orientation?"ArrowDown"===t?"next":"ArrowUp"===t?"previous":void 0:"ArrowDown"===t||"ArrowRight"===t?"next":"ArrowUp"===t||"ArrowLeft"===t?"previous":void 0}getManagedActiveElement(){const t=s(this.host.el.ownerDocument??document);if(t instanceof HTMLElement){const s=this.elements.find((s=>function(t){return function(t){return"function"==typeof t.resolveFocusableElement}(t)?t.resolveFocusableElement()??t:t}(s)===t));if(s&&this.canMoveFocusTo(s))return s}if(this.currentElement&&this.elements.includes(this.currentElement)&&this.canMoveFocusTo(this.currentElement))return this.currentElement}getTargetElement(t,s){if(!this.elements.length)return;if("first"===s)return this.findFocusableFromIndex(-1,"next");if("last"===s)return this.findFocusableFromIndex(this.elements.length,"previous");const i=t?this.elements.indexOf(t):-1;return-1===i?"next"===s?this.findFocusableFromIndex(-1,"next"):this.findFocusableFromIndex(this.elements.length,"previous"):this.findFocusableFromIndex(i,s)}findFocusableFromIndex(t,s){if(!this.elements.length)return;const i="next"===s?1:-1;for(let s=1;s<=this.elements.length;s++){const e=this.elements[(t+i*s+this.elements.length)%this.elements.length];if(this.canMoveFocusTo(e))return e}}syncManagedFocusTarget(t){const s=this.selectManagedElement(t),i=s!==this.currentElement;this.currentElement=s,this.config.manageTabIndex&&this.updateTabIndexes(s),i&&s&&this.config.onFocusTargetChange?.(s)}selectManagedElement(t){const s=this.getManagedActiveElement();if(s)return s;if(this.currentElement&&this.elements.includes(this.currentElement)&&this.canMoveFocusTo(this.currentElement))return this.currentElement;if(t&&this.elements.includes(t))return this.findFocusableFromIndex(this.elements.indexOf(t),"next")??this.findFocusableFromIndex(-1,"next");return this.elements.find((t=>0===t.tabIndex&&this.canMoveFocusTo(t)))||this.findFocusableFromIndex(-1,"next")}updateTabIndexes(t){this.elements.forEach((s=>{s.tabIndex=t&&s===t?0:-1}))}applyFocusTarget(t,s){const i=t!==this.currentElement;this.currentElement=t,this.config.manageTabIndex&&this.updateTabIndexes(t),s&&t.focus(),i&&this.config.onFocusTargetChange?.(t)}canMoveFocusTo(t){return!!t&&(!t.hasAttribute("disabled")&&((!("disabled"in t)||!Boolean(t.disabled))&&("true"!==t.getAttribute("aria-disabled")&&(this.config.isFocusableElement?this.config.isFocusableElement(t):(this.config.manageTabIndex||t.tabIndex>=0)&&"true"!==t.getAttribute("aria-hidden")&&(t.checkVisibility?.()??!0)&&null!==t.offsetParent))))}}function r(t){return Boolean(e(t,"isFocusControllerHost"))}export{h as D,r as i}
@@ -0,0 +1 @@
1
+ import{a as r,r as e,c as o,h as t,H as a}from"./p-DVab4vzV.js";const n=class{constructor(r){e(this,r),this.primaryAction=o(this,"primaryAction",7)}cardTitle;imageUrl;description;primaryActionLabel="";primaryAction;get fallbackImage(){return((e,o)=>{const t=function(...r){return r.filter(Boolean).join("/").replace("//","/").replace("/./","/")}("../../assets",o,e);try{return r(t)}catch{return console.warn(`Failed to create URL for asset "${e}" in path "${o}".\n Please provide an absolute URL in your app's 'setAssetPath(...)' configuration! Falling back to a relative URL, which may work in some environments but is not guaranteed to be correct.`),new URL(t,import.meta?.url??window?.location?.origin??"")}})("card-placeholder.svg")}_onPrimaryClick(){this.primaryAction.emit()}_onOverflowClick(r){console.log(r)}render(){return t(a,{key:"1dd819fd7c752af8d15001c08f7f60c6ea7278b9",role:"article"},t("div",{key:"e0cc822e627b6bbe665e4faa705cc46a09bac7c6",class:"top"},t("div",{key:"db79cb5a67ebdd6097f985e4b4bd27665b6329ef",class:"image-wrapper",style:{backgroundImage:`url(${this.imageUrl??this.fallbackImage})`}},t("div",{key:"90facc8595ddbbf31e3768faa8254a82ab8d3e65",class:"chip-slot"},t("slot",{key:"cb2e6a1053aae2b2ca90c52c175e3c4174c89d23",name:"chip"})))),t("div",{key:"cb11069a329385178677e92d08044e0fe8e5b982",class:"bottom"},t("header",{key:"1e6076352124ca03de2fb13c17a565b4f492567e"},t("h2",{key:"73f11099fb751bd4f967dbe49b79763b6a8268f3",class:"title"},this.cardTitle)),t("p",{key:"36cf87b4c2004bff1e65feedd13e137d67115de3",class:"description"},this.description),t("div",{key:"6c1d82f4968ce8252307858e6ad0681274f06397",class:"actions"},t("button",{key:"0366e0caaf9235a3eaf7bfcab116e6a828fb248d",class:"primary",onClick:this._onPrimaryClick.bind(this),"data-testid":"primary"},this.primaryActionLabel),t("button",{key:"4f435e79d75a621d6fe065471a915b55308ad15d",class:"tertiary","aria-label":"More actions",onClick:this._onOverflowClick},t("span",{key:"7dec97e0b0ca58c40fc5308cc7863acafa8c5147",class:"icon-placeholder"},"...")))))}static get assetsDirs(){return["../../assets"]}};n.style="@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; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } .sc-lmvz-card-h { & { & { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification, center); gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); box-sizing: border-box; padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent); border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px)); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } & > * { font: inherit; color: inherit; } &:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } &:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } &:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } &:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } &.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } &.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } &.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } &.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } &.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } &.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } &.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } } display: flex; min-width: var(--lmvz-card-component-card-minwidth, 20.4375rem); max-width: var(--lmvz-card-component-card-maxwidth, 21.6875rem); flex-direction: column; align-items: flex-start; border-radius: var(--lmvz-semantic-border-radius-lg, 14px); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); background: var(--lmvz-semantic-color-surface-primary, #ffffff); } *.sc-lmvz-card { color: var(--lmvz-semantic-color-on-surface-primary, #000000); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .top.sc-lmvz-card { display: flex; padding: var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); flex-direction: column; justify-content: center; align-items: center; align-self: stretch; } .bottom.sc-lmvz-card { display: flex; min-width: 150px; padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)) var(--lmvz-dimension-14-10, clamp(0.63rem, 0.56rem + 0.26vw, 0.88rem)); flex-direction: column; align-items: flex-start; align-self: stretch; } .title.sc-lmvz-card { margin: 0; display: flex; justify-content: center; align-items: center; align-self: stretch; padding-bottom: var(--lmvz-global-s4, 4px); overflow-wrap: break-word; font: var(--lmvz-typography-heading-2xl, 500 clamp(2rem, 1.82rem + 0.78vw, 2.75rem) / 1.4 Router); } .description.sc-lmvz-card { display: flex; margin: 0; padding-bottom: var(--lmvz-component-body-sm-padding-bottom, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-items: flex-start; align-self: stretch; white-space: pre-line; font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); } .image-wrapper.sc-lmvz-card { aspect-ratio: 4 / 3; width: 100%; background-size: cover; background-position: center; flex: 1 0 0; align-self: stretch; border-radius: var(--lmvz-semantic-border-radius-md, 6px); } .actions.sc-lmvz-card { margin-top: var(--lmvz-component-form-wrapper-gap-y, clamp(1.13rem, 0.97rem + 0.65vw, 1.75rem)); display: flex; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); align-self: stretch; } button.primary.sc-lmvz-card, lmvz-button.primary.sc-lmvz-card { display: flex; justify-content: center; align-items: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); flex: 1 0 0; }";export{n as lmvz_card}
@@ -0,0 +1 @@
1
+ import{g as t,r as o,c as r,h as e,H as n}from"./p-DVab4vzV.js";import{c as i}from"./p-BfTCfPZ1.js";import{A as a}from"./p-Wi9d2-w9.js";import{E as l}from"./p-CPSyM_e-.js";import{b as m,l as v}from"./p-BA3wizqg.js";import{R as s}from"./p-CICeIanv.js";import{p as d}from"./p-DjvtQE7c.js";import{a as c}from"./p-CyDgnpOB.js";import"./p-BDonpCG8.js";import"./p-DIyiticz.js";import"./p-D06Ds9Dh.js";const u=class extends s{get el(){return t(this)}validationEl;inheritedAttributes={};formEl=null;formButtonEl=null;lmvzActivation;ti=0;resolveFocusableElement(){return this.validationEl}scale="default";variant;disabled=!1;type="button";form;formMethod;name;value;buttonRole;constructor(t){super(),o(this,t),this.lmvzActivation=r(this,"lmvzActivation",7),this.addController(new a(this)),this.addController(new l(this,{localHandler:this.handleClick.bind(this)}))}connectedCallback(){this.inheritedAttributes=m(this.el,["role"]),super.connectedCallback()}disconnectedCallback(){this.formButtonEl?.remove(),this.formButtonEl=null,this.formEl=null,super.disconnectedCallback()}renderHiddenButton(){if("submit"!==this.type)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);const t=v(this.form,this.el);if(!t)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);this.formEl=t;const o=this.formButtonEl??document.createElement("button");o.type="submit",o.style.display="none",o.disabled=this.disabled,o.name=this.name??"",o.value=this.value??"",this.formMethod?o.setAttribute("formmethod",this.formMethod):o.removeAttribute("formmethod"),this.formButtonEl!==o&&(this.formButtonEl=o),o.parentElement!==t&&(o.remove(),t.appendChild(o))}submitForm(t){this.formEl&&this.formButtonEl&&(t.preventDefault(),this.formButtonEl.click())}handleClick=t=>{"submit"===this.type&&this.submitForm(t)};render(){return this.renderHiddenButton(),e(n,{key:"eb0ee982f50f1e41b2aa72a0598d739b972cbcdf",role:"presentation"},e("button",{key:"aed6f44f51222e31d5f1deec952c0d81b8f1200a",ref:t=>this.validationEl=t,part:"button",role:this.buttonRole,disabled:this.disabled,type:this.type,class:i(this.variant??"secondary",{[this.scale??""]:!!this.scale,disabled:this.disabled}),...this.inheritedAttributes},e("slot",{key:"2aaedfde3c0d6ebf426f20a8489b22c2a356767e"})))}static get delegatesFocus(){return!0}};u.style=" @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; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } fieldset { border: none; margin: 0; padding: 0; } legend { padding: 0; display: block; } } :host { display: inline-block; button { & { & { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification, center); gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); box-sizing: border-box; padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent); border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px)); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } & > * { font: inherit; color: inherit; } &:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } &:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } &:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } &:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } &.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } &.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } &.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } &.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } &.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } &.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } &.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } &.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } } width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } ";const b=class extends s{intersectionObserver;ariaValidationController=new a(this);get el(){return t(this)}validationEl;icon;weight="medium";size="md";iconset;iconData;visible=!1;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(t){super(),o(this,t),this.addController(this.ariaValidationController)}connectedCallback(){this.waitUntilVisible((()=>{this.visible=!0,this.loadIconPathData()})),super.connectedCallback()}disconnectedCallback(){this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,super.disconnectedCallback()}async loadIconPathData(){const{icon:t,iconset:o,visible:r}=this;if(!t||!r)return;const e=d(t);this.iconData=e||await c({icon:t,iconset:o})}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return e(n,{key:"be6032d11399289c3baddd63ebc7d9e1fb98b773",role:"img","aria-hidden":`${this.ariaHidden}`,innerHTML:this.iconData})}waitUntilVisible(t,o=50){"undefined"!=typeof window&&window.IntersectionObserver?(this.intersectionObserver=new IntersectionObserver((o=>{o.some((o=>!!o.isIntersecting&&(this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,t(),!0)))}),{rootMargin:`${o}px`}),this.intersectionObserver.observe(this.el)):t()}static get watchers(){return{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}}};b.style=".sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}";export{u as lmvz_button,b as lmvz_icon}
@@ -0,0 +1 @@
1
+ import{r as e,c as a,h as t,H as s}from"./p-DVab4vzV.js";import{t as i}from"./p-DjvtQE7c.js";import{i as r}from"./p-BDonpCG8.js";import"./p-BPa0FHVO.js";import{c as o}from"./p-BSV3KDWl.js";import{i as n,w as l}from"./p-DsT_K3_I.js";import"./p-D06Ds9Dh.js";import"./p-CyDgnpOB.js";const c=i(n),m=i(l),d=i(o),v={neutral:c,warning:m},h=new Set(["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","CAPTION","COLGROUP","DD","DETAILS","DIALOG","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","MENU","NAV","OL","P","PRE","SECTION","TABLE","TBODY","TD","TH","THEAD","TFOOT","TR","UL"]),p=class{constructor(t){e(this,t),this.lmvzDismiss=a(this,"lmvzDismiss",6),this.lmvzAction=a(this,"lmvzAction",6)}messageSlot;warnedTags=new Set;type="neutral";live="off";leadingIcon=!0;dismissible=!1;closeLabel="Schliessen";actionLabel;lmvzDismiss;lmvzAction;componentDidLoad(){this.checkSlotContent()}handleDismissClick=()=>{this.lmvzDismiss.emit()};handleActionClick=()=>{this.lmvzAction.emit()};handleSlotChange=()=>{this.checkSlotContent()};checkSlotContent(){if(!r())return;this.warnedTags.clear();const e=this.messageSlot?.assignedElements({flatten:!0})??[];for(const a of e){const e=a.tagName;h.has(e)&&!this.warnedTags.has(e)&&(console.warn(`[lmvz-message] Block-level element <${e.toLowerCase()}> is not allowed in the message slot. Only inline content is permitted.`),this.warnedTags.add(e))}}render(){return t(s,{key:"1c45cf27f057535ffff047548a3d6681dd487d3c",role:"assertive"===this.live?"alert":"polite"===this.live?"status":"note"},this.leadingIcon&&t("span",{key:"8efab69f677dfaa06d333aa304479e17e6d60ad6",class:"leading-icon","aria-hidden":"true",innerHTML:v[this.type]}),t("span",{key:"2e88e9053444e2aae23341b7cba923c7c440ff64",class:"message"},t("slot",{key:"d6b0ee6c95846a1de97e0e6ed707001c29c78c92",ref:e=>this.messageSlot=e,onSlotchange:this.handleSlotChange})),this.actionLabel&&t("lmvz-button",{key:"c55e38e274e98c8ac584ae16520fb0cab5e11d17",variant:"tertiary",scale:"small",onLmvzActivation:this.handleActionClick},this.actionLabel),this.dismissible&&t("lmvz-button",{key:"1ae69fefbb23cd8a219aee1d624e9d7779ae0c08",variant:"tertiary",scale:"small","aria-label":this.closeLabel,onClick:this.handleDismissClick},t("lmvz-icon",{key:"572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc","aria-hidden":"true",icon:d})))}};p.style=":host{display:flex;flex-direction:row;align-items:flex-start;width:100%;padding:var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)) var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));gap:var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));border:var(--lmvz-semantic-border-width-default, 1px) solid;border-radius:var(--lmvz-semantic-border-radius-md, 6px);font:var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)}:host([type='neutral']){background-color:var(--lmvz-semantic-color-status-active, #f6fbfe);border-color:var(--lmvz-semantic-color-status-on-active-subtle, #7fccf5);color:var(--lmvz-semantic-color-status-on-active, #0e7ab4)}:host([type='warning']){background-color:var(--lmvz-semantic-color-status-warning, #ffeeb8);border-color:var(--lmvz-semantic-color-status-on-warning-subtle, #e6b000);color:var(--lmvz-semantic-color-status-on-warning, #614a00)}.leading-icon{flex-shrink:0;display:flex;align-items:flex-start;padding-top:2px;width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}.leading-icon svg{width:100%;height:100%}.message{flex:1}";export{p as lmvz_message}
@@ -0,0 +1 @@
1
+ import{g as e,r as t,c as s,h as i,F as l,H as r}from"./p-DVab4vzV.js";import{c as o}from"./p-DAikapVO.js";import{t as a}from"./p-DjvtQE7c.js";import{A as n}from"./p-Wi9d2-w9.js";import{R as c}from"./p-CICeIanv.js";import"./p-D06Ds9Dh.js";import"./p-BDonpCG8.js";const m={wrap:!0,typeaheadTimeoutMs:500};class v{options=[];_activeId;_selectedId;config;typeaheadBuffer="";typeaheadTimer;constructor(e={}){this.config={...m,...e}}hostDisconnected(){this.clearTypeaheadTimer()}get activeId(){return this._activeId}get activeDescendantId(){return this._activeId}get selectedId(){return this._selectedId}setOptions(e){if(this.options=e,this._activeId&&-1!==this.findEnabledIndex(this._activeId))return;const t=(this._selectedId&&-1!==this.findEnabledIndex(this._selectedId)?this._selectedId:void 0)??this.firstEnabledOption()?.id;this.setActiveId(t)}setActiveId(e){(void 0===e||this.isEnabledId(e))&&e!==this._activeId&&(this._activeId=e,this.config.onActiveChange?.(e))}setSelectedId(e){this._selectedId=e}selectOption(e){this.isEnabledId(e)&&(this._selectedId=e,this.config.onSelect?.(e))}selectActive(){this._activeId&&this.selectOption(this._activeId)}handleKeydown(e){switch(e.key){case"ArrowDown":return e.preventDefault(),this.moveActive("next"),!0;case"ArrowUp":return e.preventDefault(),this.moveActive("previous"),!0;case"Home":return e.preventDefault(),this.setActiveId(this.firstEnabledOption()?.id),!0;case"End":return e.preventDefault(),this.setActiveId(this.lastEnabledOption()?.id),!0;case"Enter":case" ":return e.preventDefault(),this.selectActive(),!0;case"Escape":return e.preventDefault(),this.config.onClose?.(),!0;default:return this.handleTypeahead(e)}}clearTypeahead(){this.typeaheadBuffer="",this.clearTypeaheadTimer()}moveActive(e){const t=this.enabledOptions();if(!t.length)return;const s=this._activeId?t.findIndex((e=>e.id===this._activeId)):-1;if(-1===s)return void this.setActiveId(("next"===e?t[0]:t[t.length-1])?.id);const i=s+("next"===e?1:-1);if(i<0||i>=t.length){if(!this.config.wrap)return;const e=(i+t.length)%t.length;this.setActiveId(t[e]?.id)}else this.setActiveId(t[i]?.id)}handleTypeahead(e){if(1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return!1;e.preventDefault(),this.typeaheadBuffer+=e.key.toLowerCase(),this.restartTypeaheadTimer();const t=this.enabledOptions();if(!t.length)return!0;const s=this._activeId?t.findIndex((e=>e.id===this._activeId)):-1,i=[...t.slice(s+1),...t.slice(0,s+1)].find((e=>e.label.toLowerCase().startsWith(this.typeaheadBuffer)));return i&&this.setActiveId(i.id),!0}restartTypeaheadTimer(){this.clearTypeaheadTimer(),this.typeaheadTimer=setTimeout((()=>{this.typeaheadBuffer=""}),this.config.typeaheadTimeoutMs)}clearTypeaheadTimer(){void 0!==this.typeaheadTimer&&(clearTimeout(this.typeaheadTimer),this.typeaheadTimer=void 0)}enabledOptions(){return this.options.filter((e=>!e.disabled))}firstEnabledOption(){return this.enabledOptions()[0]}lastEnabledOption(){const e=this.enabledOptions();return e[e.length-1]}isEnabledId(e){return-1!==this.findEnabledIndex(e)}findEnabledIndex(e){return this.enabledOptions().findIndex((t=>t.id===e))}}let d=0;const h=a(o),p=class extends c{get el(){return e(this)}get validationEl(){return this.el}internals;selectId="lmvz-select-"+d++;triggerId=`${this.selectId}-trigger`;popoverId=`${this.selectId}-listbox`;triggerEl;optionsSourceEl;optionsMutationObserver;initialValue;initialValueCaptured=!1;initialValues;initialValuesCaptured=!1;flatOptions=[];optionsById=new Map;listboxController=new v({onActiveChange:e=>{this.activeId=e},onSelect:e=>this.handleOptionSelect(e),onClose:()=>this.closePopover()});get helperId(){return this.helperText?`${this.selectId}-helper`:void 0}get showErrorMessage(){return this.error&&Boolean(this.errorMessage)}get errorId(){return`${this.selectId}-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}constructor(e){super(),t(this,e),this.lmvzChange=s(this,"lmvzChange",7),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.addController(new n(this)),this.addController(this.listboxController)}lmvzChange;value;multiple=!1;values;label;helperText;nativeError=!1;errorFromProp=!1;get error(){return this.errorFromProp||this.nativeError}set error(e){this.errorFromProp=e}errorMessage;disabled=!1;required=!1;name;size="default";selectedLabel="";selectedId;activeId;isOpen=!1;optionGroups=[];get hasValue(){return this.multiple?Boolean(this.values&&this.values.length>0):Boolean(this.value)}get triggerAriaLabel(){if(this.multiple){const e=this.values?.length??0;return e>0?`${this.label}, ${e} selected`:this.label}return this.hasValue?`${this.label}, ${this.selectedLabel}`:this.label}get chipSize(){return"small"===this.size?"small":"default"}componentWillLoad(){this.updateValidity(),super.componentWillLoad()}componentDidLoad(){this.handleSlotChange(),this.observeSlottedOptionMutations(),this.updateValidity(),super.componentDidLoad()}disconnectedCallback(){this.optionsMutationObserver?.disconnect(),super.disconnectedCallback()}observeSlottedOptionMutations(){"undefined"!=typeof MutationObserver&&(this.optionsMutationObserver?.disconnect(),this.optionsMutationObserver=new MutationObserver(this.handleSlotChange),this.optionsMutationObserver.observe(this.el,{attributes:!0,attributeFilter:["disabled","selected","value","label"],characterData:!0,childList:!0,subtree:!0}))}async focusTrigger(){this.triggerEl?.focus()}async blurTrigger(){this.triggerEl?.blur()}async checkValidity(){return this.internals.checkValidity?.()??!0}async reportValidity(){return this.internals.reportValidity?.()??!0}async getValidationMessage(){return this.internals.validationMessage??""}formAssociatedCallback(e){e&&this.syncFormValue()}formResetCallback(){this.internals.setValidity?.({}),this.multiple?this.values=this.initialValues?[...this.initialValues]:[]:this.value=this.initialValue,this.updateValidity()}formStateRestoreCallback(e){this.multiple?this.values=e instanceof FormData&&this.name?e.getAll(this.name).map(String):[]:this.value=e}handleValueChange(e){this.multiple||(this.applySelectionFromValue(),this.selectedId&&!this.isOpen&&this.listboxController.setActiveId(this.selectedId),this.internals.setFormValue?.(e??""),this.updateValidity())}handleValuesChange(){this.multiple&&(this.syncFormValue(),this.updateValidity())}handleRequiredChange(){this.updateValidity()}handleDisabledChange(e){e&&(this.closePopover(),this.triggerEl?.blur())}handleSlotChange=()=>{const e=this.optionsSourceEl;if(!e)return;const{flat:t,groups:s}=function(e,t){const s=[],i=[];let l,r=0;const o=(e,i=!1)=>{const l=e,o={id:`${t}-option-${r++}`,value:l.value,label:(l.textContent??"").trim(),disabled:i||l.disabled,selected:l.selected};return s.push(o),o};return Array.from(e.children).forEach((e=>{if("OPTGROUP"!==e.tagName)"OPTION"===e.tagName&&(l||(l={label:void 0,options:[]},i.push(l)),l.options.push(o(e)));else{l=void 0;const t=e,s=Array.from(t.querySelectorAll("option")).map((e=>o(e,t.disabled)));i.push({label:t.label||void 0,options:s})}})),{flat:s,groups:i}}(e,this.selectId);if(this.flatOptions=t,this.optionsById=new Map(t.map((e=>[e.id,e]))),this.optionGroups=s,this.multiple){if(!this.values){const e=t.filter((e=>e.selected&&!e.disabled)).map((e=>e.value));e.length>0&&(this.values=e)}}else{if(!this.value){const e=t.find((e=>e.selected&&!e.disabled));e&&(this.value=e.value)}this.applySelectionFromValue()}this.listboxController.setOptions(t.map((({id:e,label:t,disabled:s})=>({id:e,label:t,disabled:s})))),this.multiple?this.initialValuesCaptured||(this.initialValues=this.values?[...this.values]:[],this.initialValuesCaptured=!0):this.initialValueCaptured||(this.initialValue=this.value,this.initialValueCaptured=!0)};applySelectionFromValue(){const e=this.value?this.flatOptions.find((e=>e.value===this.value)):void 0;this.selectedId=e?.id,this.selectedLabel=e?.label??"",this.listboxController.setSelectedId(e?.id)}isOptionSelected(e){return this.multiple?(this.values??[]).includes(e.value):e.id===this.selectedId}syncFormValue(){if(this.multiple){const e=new FormData;if(this.name)for(const t of this.values??[])e.append(this.name,t);this.internals.setFormValue?.(e)}else this.internals.setFormValue?.(this.value??"")}updateValidity(){!this.required||(this.multiple?this.values&&this.values.length>0:this.value)?(this.internals.setValidity?.({}),this.nativeError=!1):this.internals.setValidity?.({valueMissing:!0},"Please select a value.",this.triggerEl)}handleInvalid(){this.nativeError=!0}handleOptionSelect(e){const t=this.optionsById.get(e);if(!t)return;if(this.multiple){const e=this.values??[],s=e.includes(t.value)?e.filter((e=>e!==t.value)):[...e,t.value];return this.values=s,void this.lmvzChange.emit(s)}const s=t.value!==this.value;this.value=t.value,s&&this.lmvzChange.emit(t.value),this.closePopover()}handleOptionClick=e=>{e.disabled||this.disabled||this.listboxController.selectOption(e.id)};handleLabelClick=()=>{this.disabled||(this.triggerEl?.focus(),this.openPopover())};handleTriggerClick=()=>{this.disabled||(this.isOpen?this.closePopover():this.openPopover())};handleTriggerKeydown=e=>{this.disabled||(this.isOpen?this.listboxController.handleKeydown(e):"ArrowDown"!==e.key&&"ArrowUp"!==e.key&&"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.openPopover()))};handleTriggerBlur=()=>{this.closePopover()};handlePopoverClose=()=>{this.isOpen=!1,this.listboxController.clearTypeahead()};openPopover(){this.isOpen||this.disabled||(this.isOpen=!0)}closePopover(){this.isOpen&&(this.isOpen=!1,this.listboxController.clearTypeahead())}renderOptionGroups(){return this.optionGroups.map(((e,t)=>e.label?i("div",{role:"group","aria-label":e.label,key:`lmvz-select-group-${t}`},e.options.map((e=>this.renderOption(e)))):e.options.map((e=>this.renderOption(e)))))}renderOption(e){const t=this.isOptionSelected(e);return i("div",{id:e.id,key:e.id,role:"option",class:"lmvz-select-option","aria-selected":t?"true":"false","aria-disabled":e.disabled?"true":void 0,"data-active":e.id===this.activeId?"true":void 0,onMouseDown:e=>e.preventDefault(),onClick:()=>this.handleOptionClick(e)},this.multiple&&i("span",{class:"lmvz-select-option-checkbox","aria-hidden":"true"},t&&i("span",{class:"lmvz-select-option-checkbox-indicator",innerHTML:h})),e.label)}renderChips(){const e=this.values??[],t=new Map;return i(l,null,e.map((e=>{const s=t.get(e)??0;t.set(e,s+1);const l=0===s?e:`${e}-dup-${s}`,r=this.flatOptions.find((t=>t.value===e));return i("lmvz-chip",{key:l,size:this.chipSize},r?.label??e)})))}render(){const e=this.hasValue,t=this.multiple&&e;return i(r,{key:"77cb72cdce635eae0f9a29cb9121dd7d16955219"},i("div",{key:"cc6c04090457df17c6a9e74354fc21875d378642",class:e?"select-wrapper has-value":"select-wrapper"},i("label",{key:"8dc52469a7b3333578494b2f7bdb4e870044ac6c",htmlFor:this.triggerId,class:e?"floating-label":"assistive-label",onMouseDown:e=>e.preventDefault(),onClick:this.handleLabelClick},this.label,this.required&&e&&i("span",{key:"c198fb4944e46c5219a42e16ae24dc3c414b1b00","aria-hidden":"true"}," *")),i("div",{key:"034cc67405aac73a6557036dea90e4644c1578ed",id:this.triggerId,ref:e=>this.triggerEl=e,class:"select-trigger",role:"combobox",tabIndex:this.disabled?-1:0,"aria-haspopup":"listbox","aria-expanded":String(this.isOpen),"aria-controls":this.popoverId,"aria-activedescendant":this.isOpen?this.activeId:void 0,"aria-label":this.triggerAriaLabel,"aria-disabled":this.disabled?"true":void 0,"aria-required":this.required?"true":"false","aria-invalid":this.error?"true":"false","aria-errormessage":this.showErrorMessage?this.errorId:void 0,"aria-describedby":this.describedBy,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeydown,onBlur:this.handleTriggerBlur},i("span",{key:"c61c136bfaab211572a988d3b16c2746f80b1ac6"},t?this.renderChips():e?this.selectedLabel:this.label,this.required&&!e&&i("span",{key:"24201baae63a4f6fdaef2441d304cd8f69430fb5","aria-hidden":"true"}," *")),i("span",{key:"547c61dfdc83f89cf7cd0582c785b9552190e533","aria-hidden":"true"},i("svg",{key:"f6a0cb7c77682aec03cd146e84712c17df5ff910",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{key:"35a8a50e27f18e54003974ae5b5ed578602664d3",d:"M20.3334 8.66663L12.0001 17L3.66675 8.66663",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})))),i("lmvz-popover",{key:"0d5b94659c23763d59638046a397963d79a5e588",id:this.popoverId,anchor:this.triggerId,open:this.isOpen,containerRole:"listbox",autoFocus:!1,label:this.label,"aria-multiselectable":this.multiple?"true":void 0,onLmvzClose:this.handlePopoverClose,size:"sm"},this.renderOptionGroups()),i("div",{key:"c4a313fe4b6c53678a4f3dafced210f00e3c93d5",class:"lmvz-select-native-options",hidden:!0,"aria-hidden":"true",ref:e=>this.optionsSourceEl=e},i("slot",{key:"1fb311e6938812e68ae5155184af2e2ba7c19861",onSlotchange:this.handleSlotChange}))),this.helperText&&i("div",{key:"accade9aae4cb2e23fa1d8f62dd9b6efdf3ddfb5",id:this.helperId,role:"status"},this.helperText),this.showErrorMessage&&i("div",{key:"faa5eba225adda67b44b8a63ae98a678fddf49ad",id:this.errorId,role:"alert"},this.errorMessage))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],values:[{handleValuesChange:0}],required:[{handleRequiredChange:0}],disabled:[{handleDisabledChange:0}]}}};p.style="@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-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --lmvz-select-border-color: var(--lmvz-semantic-color-border-alternate, #c7c7c7); --lmvz-select-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --lmvz-select-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-select-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-select-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-xs-font-size, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); padding-top: var(--lmvz-internal-select-floating-label-top-offset); } .select-wrapper.sc-lmvz-select { position: relative; height: var(--lmvz-select-height); } label.sc-lmvz-select { position: absolute; top: 50%; left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-label-color); line-height: normal; white-space: nowrap; pointer-events: none; z-index: 2; transform: translateY(-50%); transform-origin: left top; transition: top 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out; } label.assistive-label.sc-lmvz-select { opacity: 0; padding: 0; } label.floating-label.sc-lmvz-select { top: var(--lmvz-select-label-top-offset); transform: translateY(0) scale(0.85); left: calc(var(--lmvz-select-padding-x) - 2px); background-color: var(--lmvz-select-bg); padding: 0 var(--lmvz-select-label-minimized-padding-x); opacity: 1; font-weight: 500; } label.sc-lmvz-select > span[aria-hidden='true'].sc-lmvz-select, .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child > span[aria-hidden='true'].sc-lmvz-select { color: var(--lmvz-select-error-color); margin-left: 2px; display: inline-block; line-height: 0; vertical-align: middle; } .select-trigger.sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; width: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); border: var(--lmvz-select-border-width) solid var(--lmvz-select-border-color); box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; transition: border-color 0.15s ease; } .sc-lmvz-select-h:not([disabled] .select-wrapper.sc-lmvz-select:hover .select-trigger.sc-lmvz-select, [error]).sc-lmvz-select-h .select-wrapper.sc-lmvz-select:hover .select-trigger.sc-lmvz-select { border-color: var(--lmvz-select-border-color-hover); } [error].sc-lmvz-select-h .select-trigger.sc-lmvz-select { border-color: var(--lmvz-select-error-color); } .sc-lmvz-select-h:has(:focus-visible) .select-trigger.sc-lmvz-select { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-select-text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; } .select-wrapper.has-value.sc-lmvz-select .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child + span.sc-lmvz-select { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } .select-trigger.sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-select-chevron-size); height: var(--lmvz-select-chevron-size); flex-shrink: 0; } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child lmvz-chip.sc-lmvz-select { vertical-align: middle; } .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child lmvz-chip.sc-lmvz-select + lmvz-chip.sc-lmvz-select { margin-inline-start: var(--lmvz-select-gap); } .lmvz-select-native-options.sc-lmvz-select { display: none; } [disabled].sc-lmvz-select-h .select-wrapper.sc-lmvz-select { opacity: var(--lmvz-select-disabled-opacity); pointer-events: none; cursor: not-allowed; } [role='status'].sc-lmvz-select { padding-top: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-helper-color); line-height: normal; } [role='alert'].sc-lmvz-select { padding-top: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); color: var(--lmvz-select-error-color); line-height: normal; } [size='small'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='small'].sc-lmvz-select-h .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-chevron-size: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h .select-trigger.sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .lmvz-select-option.sc-lmvz-select { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-button-background-override: var(--lmvz-select-option-background); --lmvz-button-color-override: var(--lmvz-select-option-color); --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-button-content-justification: normal; --lmvz-button-font-override: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); & { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification, center); gap: var(--lmvz-button-gap, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); box-sizing: border-box; padding-block: var(--lmvz-button-padding-block, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); padding-inline: var(--lmvz-button-padding-inline, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))); min-height: var(--lmvz-button-min-height, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); border: var(--lmvz-button-border-width, 0) solid var(--lmvz-button-border-color, transparent); border-radius: var(--lmvz-button-radius, var(--lmvz-component-input-radius-default, 999px)); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } display: flex; } .lmvz-select-option.sc-lmvz-select:not([aria-disabled='true']):hover { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } .lmvz-select-option.sc-lmvz-select:not([aria-disabled='true']):active { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-active, #000000); } .lmvz-select-option.sc-lmvz-select:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } .lmvz-select-option[data-active='true'].sc-lmvz-select:not([aria-disabled='true']) { --lmvz-select-option-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --lmvz-select-option-color: var(--lmvz-semantic-color-int-on-tertiary-hover, #000000); } .sc-lmvz-select-h:not([multiple]) .lmvz-select-option[aria-selected='true'].sc-lmvz-select { --lmvz-select-option-background: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); --lmvz-select-option-color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } .lmvz-select-option[aria-disabled='true'].sc-lmvz-select { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .lmvz-select-option-checkbox.sc-lmvz-select { display: flex; align-items: center; justify-content: center; width: var(--lmvz-global-s18, 18px); height: var(--lmvz-global-s18, 18px); border: var(--lmvz-semantic-border-width-default, 1px) solid currentcolor; border-radius: var(--lmvz-global-s4, 4px); flex-shrink: 0; } .lmvz-select-option-checkbox-indicator.sc-lmvz-select { display: flex; align-items: center; justify-content: center; line-height: 0; } .lmvz-select-option-checkbox-indicator.sc-lmvz-select svg.sc-lmvz-select { width: 100%; height: 100%; }";export{p as lmvz_select}
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-08-10T15:37:26",
2
+ "timestamp": "2026-08-11T13:11:51",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "4.43.5",
@@ -8253,7 +8253,7 @@
8253
8253
  "filePath": "src/components/lmvz-select/lmvz-select.tsx",
8254
8254
  "encapsulation": "scoped",
8255
8255
  "tag": "lmvz-select",
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",
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### `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
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.",
8258
8258
  "docsTags": [
8259
8259
  {
@@ -8380,35 +8380,6 @@
8380
8380
  "getter": false,
8381
8381
  "setter": false
8382
8382
  },
8383
- {
8384
- "name": "highlighted",
8385
- "type": "boolean",
8386
- "complexType": {
8387
- "original": "boolean",
8388
- "resolved": "boolean",
8389
- "references": {}
8390
- },
8391
- "mutable": false,
8392
- "attr": "highlighted",
8393
- "reflectToAttr": true,
8394
- "docs": "Whether the select has an active filter or selection that should be visually\ndistinguished (e.g. a filter chip is applied).\n\nWhen `true`:\n- The host attribute `highlighted` is present (CSS: `:host([highlighted])`).\n- The host attribute `data-highlighted=\"true\"` is set for assistive-technology\n consumers that observe data attributes. When `false`, `data-highlighted` is\n set to `\"false\"`.\n\nNote: `aria-pressed` is intentionally not used here; it is reserved for toggle-button\nroles. `aria-selected` is reserved for this component's own `role=\"option\"` elements.\nThe `data-highlighted` attribute provides the accessible contract for this state.",
8395
- "docsTags": [
8396
- {
8397
- "name": "default",
8398
- "text": "false"
8399
- }
8400
- ],
8401
- "default": "false",
8402
- "values": [
8403
- {
8404
- "type": "boolean"
8405
- }
8406
- ],
8407
- "optional": false,
8408
- "required": false,
8409
- "getter": false,
8410
- "setter": false
8411
- },
8412
8383
  {
8413
8384
  "name": "label",
8414
8385
  "type": "string",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmvz-ds/components",
3
3
  "private": false,
4
- "version": "0.38.0",
4
+ "version": "0.39.0",
5
5
  "type": "module",
6
6
  "description": "The components of the design system",
7
7
  "author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
@@ -10,6 +10,7 @@
10
10
  "linkDirectory": false
11
11
  },
12
12
  "exports": {
13
+ "./index.js": "./index.js",
13
14
  ".": {
14
15
  "types": "./components/index.d.ts",
15
16
  "import": "./components/index.js"
@@ -39,7 +39,6 @@ export declare class LmvzSelect extends ReactiveControllerHost implements AriaVa
39
39
  required: boolean;
40
40
  name?: string;
41
41
  size: Select.Size;
42
- highlighted: boolean;
43
42
  private selectedLabel;
44
43
  private selectedId?;
45
44
  private activeId?;
@@ -1,2 +1,8 @@
1
+ import { SnackbarController } from './snackbar-controller';
1
2
  export { SnackbarController } from './snackbar-controller';
2
3
  export type { SnackbarDismissReason, SnackbarHandle, SnackbarOptions, SnackbarPriority, SnackbarStatus } from './snackbar-controller';
4
+ declare global {
5
+ interface LmvzApi {
6
+ SnackbarController?: typeof SnackbarController;
7
+ }
8
+ }
@@ -6,6 +6,7 @@ export declare class LmvzTabs extends ReactiveControllerHost implements Directio
6
6
  private readonly instanceId;
7
7
  private tabSlotEl?;
8
8
  private panelSlotEl?;
9
+ private tablistEl?;
9
10
  private focusController;
10
11
  value: string;
11
12
  orientation: 'horizontal' | 'vertical';
@@ -785,11 +785,6 @@ export declare namespace Components {
785
785
  * Helper text displayed below the select field.
786
786
  */
787
787
  "helperText"?: string;
788
- /**
789
- * Whether the select has an active filter or selection that should be visually distinguished (e.g. a filter chip is applied). When `true`: - The host attribute `highlighted` is present (CSS: `:host([highlighted])`). - The host attribute `data-highlighted="true"` is set for assistive-technology consumers that observe data attributes. When `false`, `data-highlighted` is set to `"false"`. Note: `aria-pressed` is intentionally not used here; it is reserved for toggle-button roles. `aria-selected` is reserved for this component's own `role="option"` elements. The `data-highlighted` attribute provides the accessible contract for this state.
790
- * @default false
791
- */
792
- "highlighted": boolean;
793
788
  /**
794
789
  * Label text displayed as a placeholder when no value is selected, and floated above the trigger when a value is present.
795
790
  */
@@ -1791,11 +1786,6 @@ export declare namespace JSX {
1791
1786
  * Helper text displayed below the select field.
1792
1787
  */
1793
1788
  "helperText"?: string;
1794
- /**
1795
- * Whether the select has an active filter or selection that should be visually distinguished (e.g. a filter chip is applied). When `true`: - The host attribute `highlighted` is present (CSS: `:host([highlighted])`). - The host attribute `data-highlighted="true"` is set for assistive-technology consumers that observe data attributes. When `false`, `data-highlighted` is set to `"false"`. Note: `aria-pressed` is intentionally not used here; it is reserved for toggle-button roles. `aria-selected` is reserved for this component's own `role="option"` elements. The `data-highlighted` attribute provides the accessible contract for this state.
1796
- * @default false
1797
- */
1798
- "highlighted"?: boolean;
1799
1789
  /**
1800
1790
  * Label text displayed as a placeholder when no value is selected, and floated above the trigger when a value is present.
1801
1791
  */
@@ -2126,7 +2116,6 @@ export declare namespace JSX {
2126
2116
  "required": boolean;
2127
2117
  "name": string;
2128
2118
  "size": Select.Size;
2129
- "highlighted": boolean;
2130
2119
  }
2131
2120
  export interface LmvzSnackbarAttributes {
2132
2121
  "status": Snackbar.Status;
package/types/index.d.ts CHANGED
@@ -5,3 +5,8 @@ export type { LmvzDS, Typography } from './api';
5
5
  export * from './components/lmvz-message/public';
6
6
  export * from './components/lmvz-snackbar/public';
7
7
  export * from './utils/public';
8
+ declare global {
9
+ interface Window {
10
+ LmvzApi: LmvzApi;
11
+ }
12
+ }