@lmvz-ds/components 0.17.3 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +3 -0
- package/cjs/{aria-loader-W9Zvc9e-.js → aria-loader-CfFuAbJn.js} +2 -2
- package/cjs/icons-swqMn6s2.js +163 -0
- package/cjs/{index-BNm4PQrX.js → index--7IqZZqn.js} +12179 -516
- package/cjs/index.cjs.js +6 -85
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button.cjs.entry.js +4 -4
- package/cjs/lmvz-card.cjs.entry.js +24 -4
- package/cjs/lmvz-chip.cjs.entry.js +1 -1
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +5 -5
- package/cjs/lmvz-icon.cjs.entry.js +24 -13
- package/cjs/lmvz-input.cjs.entry.js +5 -5
- package/cjs/lmvz-menuitem.cjs.entry.js +4 -4
- package/cjs/lmvz-select.cjs.entry.js +4 -4
- package/cjs/loader.cjs.js +1 -1
- package/cjs/logger-Bn2yoZGP.js +7189 -0
- package/cjs/{reactive-controller-host-B_davRfI.js → reactive-controller-host-CtaVAiYJ.js} +27 -23
- package/collection/api/ds.constants.js +0 -66
- package/collection/collection-manifest.json +1 -1
- package/collection/components/lmvz-action/lmvz-action.js +1 -1
- package/collection/components/lmvz-button/lmvz-button.css +2 -2
- package/collection/components/lmvz-button/lmvz-button.js +5 -5
- package/collection/components/lmvz-card/lmvz-card.css +5 -5
- package/collection/components/lmvz-card/lmvz-card.js +1 -1
- package/collection/components/lmvz-chip/lmvz-chip.js +1 -1
- package/collection/components/lmvz-header/lmvz-header.js +2 -2
- package/collection/components/lmvz-icon/lmvz-icon.css +13 -13
- package/collection/components/lmvz-icon/lmvz-icon.js +49 -18
- package/collection/components/lmvz-input/lmvz-input.css +1 -1
- package/collection/components/lmvz-input/lmvz-input.js +6 -6
- package/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -2
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-select/lmvz-select.css +3 -3
- package/collection/components/lmvz-select/lmvz-select.js +1 -1
- package/collection/index.js +1 -2
- package/collection/integration/header-integration/header-integration.js +51 -0
- package/collection/utils/aria/aria-validation-controller.js +27 -23
- package/collection/utils/http.js +10 -13
- package/collection/utils/icons/icons-registry.js +34 -0
- package/collection/utils/icons/icons.js +49 -0
- package/collection/utils/icons/icons.unit.js +73 -0
- package/collection/utils/icons/public.js +2 -0
- package/collection/utils/public.js +1 -1
- package/components/index.d.ts +9 -9
- package/components/index.d.ts.bak +10 -10
- package/components/index.js +1 -1
- package/components/lmvz-action.d.ts +1 -1
- package/components/lmvz-action.d.ts.bak +11 -0
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button.d.ts +1 -1
- package/components/lmvz-button.d.ts.bak +11 -0
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.d.ts +1 -1
- package/components/lmvz-card.d.ts.bak +11 -0
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-chip.d.ts +1 -1
- package/components/lmvz-chip.d.ts.bak +11 -0
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.d.ts +1 -1
- package/components/lmvz-header.d.ts.bak +11 -0
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.d.ts +1 -1
- package/components/lmvz-icon.d.ts.bak +11 -0
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.d.ts +1 -1
- package/components/lmvz-input.d.ts.bak +11 -0
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-menuitem.d.ts +1 -1
- package/components/lmvz-menuitem.d.ts.bak +11 -0
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-select.d.ts +1 -1
- package/components/lmvz-select.d.ts.bak +11 -0
- package/components/lmvz-select.js +1 -1
- package/components/{p-Clo63DJF.js → p-CBLAeife.js} +1 -1
- package/components/p-DXOTa5VF.js +12 -0
- package/components/p-fiRXhuXK.js +1 -0
- package/esm/{aria-loader-D9aySMw6.js → aria-loader-BF_AYtbb.js} +2 -2
- package/esm/icons-Ca8oMiRa.js +157 -0
- package/esm/{index-n6jVNpyp.js → index-7Ru1khgk.js} +11972 -309
- package/esm/index.js +4 -80
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button.entry.js +4 -4
- package/esm/lmvz-card.entry.js +23 -4
- package/esm/lmvz-chip.entry.js +1 -1
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +5 -5
- package/esm/lmvz-icon.entry.js +24 -13
- package/esm/lmvz-input.entry.js +5 -5
- package/esm/lmvz-menuitem.entry.js +4 -4
- package/esm/lmvz-select.entry.js +4 -4
- package/esm/loader.js +1 -1
- package/esm/logger-fiRXhuXK.js +6990 -0
- package/esm/{reactive-controller-host-ByKmPKq1.js → reactive-controller-host-sR2jJxNG.js} +27 -23
- package/hydrate/index.js +78 -3842
- package/hydrate/index.mjs +78 -3842
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-0f645295.entry.js +1 -0
- package/lmvz-components/{p-986acfd0.entry.js → p-1506fa34.entry.js} +1 -1
- package/lmvz-components/p-658c5c34.entry.js +1 -0
- package/lmvz-components/{p-1bda378c.entry.js → p-80675ee5.entry.js} +1 -1
- package/lmvz-components/p-872e2106.entry.js +1 -0
- package/lmvz-components/p-93038c98.entry.js +1 -0
- package/lmvz-components/{p-CU4XwA2K.js → p-B3dnXEPG.js} +1 -1
- package/lmvz-components/p-Bh2Epkwf.js +1 -0
- package/lmvz-components/{p-DPHHQR5F.js → p-Bkfdgg0T.js} +1 -1
- package/lmvz-components/p-DXOTa5VF.js +12 -0
- package/lmvz-components/p-bbab5471.entry.js +1 -0
- package/lmvz-components/p-c7e368c4.entry.js +1 -0
- package/lmvz-components/{p-b704eca8.entry.js → p-ff6a0267.entry.js} +1 -1
- package/lmvz-components/p-fiRXhuXK.js +1 -0
- package/manifest.json +64 -283
- package/package.json +4 -2
- package/types/api/ds.constants.d.ts +22 -1
- package/types/api/ds.types.d.ts +3 -38
- package/types/api/index.d.ts +0 -1
- package/types/components/lmvz-action/lmvz-action.d.ts +1 -0
- package/types/components/lmvz-button/lmvz-button.d.ts +2 -2
- package/types/components/lmvz-card/lmvz-card.d.ts +1 -0
- package/types/components/lmvz-chip/lmvz-chip.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +1 -0
- package/types/components/lmvz-icon/lmvz-icon.d.ts +4 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +1 -0
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +1 -0
- package/types/components/lmvz-select/lmvz-select.d.ts +1 -0
- package/types/components.d.ts +747 -931
- package/types/index.d.ts +2 -2
- package/types/utils/aria/aria-validation-controller.d.ts +1 -0
- package/types/utils/aria/element-activation-controller.d.ts +1 -0
- package/types/utils/aria/list-keyboard-controller.d.ts +1 -0
- package/types/utils/assets.d.ts +1 -0
- package/types/utils/component.d.ts +2 -4
- package/types/utils/environment.d.ts +1 -0
- package/types/utils/http.d.ts +11 -8
- package/types/utils/http.unit.d.ts +1 -0
- package/types/utils/icons/icons-registry.d.ts +13 -0
- package/types/utils/icons/icons.d.ts +8 -0
- package/types/utils/icons/icons.unit.d.ts +8 -0
- package/types/utils/icons/public.d.ts +4 -0
- package/types/utils/public.d.ts +2 -1
- package/types/utils/reactive-controller-host.d.ts +1 -0
- package/assets/.DS_Store +0 -0
- package/assets/icons/.DS_Store +0 -0
- package/assets/icons/actions.svg +0 -5
- package/assets/icons/adduser.svg +0 -3
- package/assets/icons/alert.svg +0 -3
- package/assets/icons/apple.svg +0 -3
- package/assets/icons/arrow-down.svg +0 -3
- package/assets/icons/arrow-left.svg +0 -3
- package/assets/icons/arrow-right.svg +0 -3
- package/assets/icons/arrow-up.svg +0 -3
- package/assets/icons/book.svg +0 -3
- package/assets/icons/bookmark.svg +0 -3
- package/assets/icons/checkmark.svg +0 -3
- package/assets/icons/chevron-left.svg +0 -3
- package/assets/icons/chevron-right.svg +0 -3
- package/assets/icons/chevron-up.svg +0 -3
- package/assets/icons/close-l.svg +0 -3
- package/assets/icons/close-sm.svg +0 -3
- package/assets/icons/cog.svg +0 -4
- package/assets/icons/computer.svg +0 -3
- package/assets/icons/dashboard.svg +0 -6
- package/assets/icons/delete.svg +0 -3
- package/assets/icons/download.svg +0 -3
- package/assets/icons/edit.svg +0 -3
- package/assets/icons/external.svg +0 -3
- package/assets/icons/facebook.svg +0 -3
- package/assets/icons/favorite.svg +0 -3
- package/assets/icons/filter.svg +0 -3
- package/assets/icons/group.svg +0 -3
- package/assets/icons/hide.svg +0 -3
- package/assets/icons/home.svg +0 -3
- package/assets/icons/info.svg +0 -3
- package/assets/icons/instagram.svg +0 -3
- package/assets/icons/letter.svg +0 -3
- package/assets/icons/linkedin.svg +0 -5
- package/assets/icons/logout.svg +0 -3
- package/assets/icons/map.svg +0 -3
- package/assets/icons/minus.svg +0 -3
- package/assets/icons/navigation.svg +0 -3
- package/assets/icons/plus.svg +0 -3
- package/assets/icons/qr-scan.svg +0 -3
- package/assets/icons/question.svg +0 -10
- package/assets/icons/reader.svg +0 -3
- package/assets/icons/reset.svg +0 -3
- package/assets/icons/school.svg +0 -3
- package/assets/icons/search.svg +0 -3
- package/assets/icons/send.svg +0 -3
- package/assets/icons/settings.svg +0 -3
- package/assets/icons/share.svg +0 -10
- package/assets/icons/shopping-cart.svg +0 -3
- package/assets/icons/show.svg +0 -3
- package/assets/icons/snapchat.svg +0 -3
- package/assets/icons/sort.svg +0 -3
- package/assets/icons/speech-bubble.svg +0 -3
- package/assets/icons/star.svg +0 -3
- package/assets/icons/student.svg +0 -3
- package/assets/icons/upload.svg +0 -3
- package/assets/icons/user.svg +0 -3
- package/assets/icons/warn-circle.svg +0 -3
- package/assets/icons/warn-triangle.svg +0 -3
- package/assets/icons/whatsapp.svg +0 -4
- package/assets/icons/world.svg +0 -10
- package/assets/icons/x.svg +0 -3
- package/assets/icons/youtube.svg +0 -3
- package/cjs/Effect-YVFLBEfy.js +0 -19037
- package/cjs/assets-DxYhun-q.js +0 -26
- package/cjs/icons-DgYgcKGK.js +0 -653
- package/collection/api/index.js +0 -1
- package/collection/assets/.DS_Store +0 -0
- package/collection/assets/icons/.DS_Store +0 -0
- package/collection/assets/icons/actions.svg +0 -5
- package/collection/assets/icons/adduser.svg +0 -3
- package/collection/assets/icons/alert.svg +0 -3
- package/collection/assets/icons/apple.svg +0 -3
- package/collection/assets/icons/arrow-down.svg +0 -3
- package/collection/assets/icons/arrow-left.svg +0 -3
- package/collection/assets/icons/arrow-right.svg +0 -3
- package/collection/assets/icons/arrow-up.svg +0 -3
- package/collection/assets/icons/book.svg +0 -3
- package/collection/assets/icons/bookmark.svg +0 -3
- package/collection/assets/icons/checkmark.svg +0 -3
- package/collection/assets/icons/chevron-left.svg +0 -3
- package/collection/assets/icons/chevron-right.svg +0 -3
- package/collection/assets/icons/chevron-up.svg +0 -3
- package/collection/assets/icons/close-l.svg +0 -3
- package/collection/assets/icons/close-sm.svg +0 -3
- package/collection/assets/icons/cog.svg +0 -4
- package/collection/assets/icons/computer.svg +0 -3
- package/collection/assets/icons/dashboard.svg +0 -6
- package/collection/assets/icons/delete.svg +0 -3
- package/collection/assets/icons/download.svg +0 -3
- package/collection/assets/icons/edit.svg +0 -3
- package/collection/assets/icons/external.svg +0 -3
- package/collection/assets/icons/facebook.svg +0 -3
- package/collection/assets/icons/favorite.svg +0 -3
- package/collection/assets/icons/filter.svg +0 -3
- package/collection/assets/icons/group.svg +0 -3
- package/collection/assets/icons/hide.svg +0 -3
- package/collection/assets/icons/home.svg +0 -3
- package/collection/assets/icons/info.svg +0 -3
- package/collection/assets/icons/instagram.svg +0 -3
- package/collection/assets/icons/letter.svg +0 -3
- package/collection/assets/icons/linkedin.svg +0 -5
- package/collection/assets/icons/logout.svg +0 -3
- package/collection/assets/icons/map.svg +0 -3
- package/collection/assets/icons/minus.svg +0 -3
- package/collection/assets/icons/navigation.svg +0 -3
- package/collection/assets/icons/plus.svg +0 -3
- package/collection/assets/icons/qr-scan.svg +0 -3
- package/collection/assets/icons/question.svg +0 -10
- package/collection/assets/icons/reader.svg +0 -3
- package/collection/assets/icons/reset.svg +0 -3
- package/collection/assets/icons/school.svg +0 -3
- package/collection/assets/icons/search.svg +0 -3
- package/collection/assets/icons/send.svg +0 -3
- package/collection/assets/icons/settings.svg +0 -3
- package/collection/assets/icons/share.svg +0 -10
- package/collection/assets/icons/shopping-cart.svg +0 -3
- package/collection/assets/icons/show.svg +0 -3
- package/collection/assets/icons/snapchat.svg +0 -3
- package/collection/assets/icons/sort.svg +0 -3
- package/collection/assets/icons/speech-bubble.svg +0 -3
- package/collection/assets/icons/star.svg +0 -3
- package/collection/assets/icons/student.svg +0 -3
- package/collection/assets/icons/upload.svg +0 -3
- package/collection/assets/icons/user.svg +0 -3
- package/collection/assets/icons/warn-circle.svg +0 -3
- package/collection/assets/icons/warn-triangle.svg +0 -3
- package/collection/assets/icons/whatsapp.svg +0 -4
- package/collection/assets/icons/world.svg +0 -10
- package/collection/assets/icons/x.svg +0 -3
- package/collection/assets/icons/youtube.svg +0 -3
- package/collection/components/lmvz-icon/icons.js +0 -36
- package/collection/components/lmvz-icon/public.js +0 -1
- package/collection/components/lmvz-icon/test/icons.unit.js +0 -98
- package/collection/integration/header-integration.js +0 -46
- package/collection/utils/effect.js +0 -6
- package/collection/utils/validation/svg.js +0 -24
- package/components/p-CYcWxAp5.js +0 -1
- package/components/p-DHtXOUVf.js +0 -1
- package/components/p-VkiNs_yz.js +0 -12
- package/esm/Effect-DkwJP3kx.js +0 -18828
- package/esm/assets-_WDisN-f.js +0 -23
- package/esm/icons-Crg18Lio.js +0 -649
- package/lmvz-components/p-121f74d8.entry.js +0 -1
- package/lmvz-components/p-373a9cbf.entry.js +0 -1
- package/lmvz-components/p-43e295ba.entry.js +0 -1
- package/lmvz-components/p-5f150890.entry.js +0 -1
- package/lmvz-components/p-6d5fa8c4.entry.js +0 -1
- package/lmvz-components/p-BT8PQPMJ.js +0 -1
- package/lmvz-components/p-BxiCs9Wn.js +0 -1
- package/lmvz-components/p-CXQcJLbG.js +0 -12
- package/lmvz-components/p-DkwJP3kx.js +0 -1
- package/lmvz-components/p-abbfa6aa.entry.js +0 -1
- package/types/components/lmvz-icon/icons.d.ts +0 -8
- package/types/components/lmvz-icon/public.d.ts +0 -1
- package/types/components/lmvz-icon/test/icons.unit.d.ts +0 -1
- package/types/utils/effect.d.ts +0 -3
- package/types/utils/validation/svg.d.ts +0 -11
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzChip extends Components.LmvzChip, HTMLElement {}
|
|
4
|
+
export const LmvzChip: {
|
|
5
|
+
prototype: LmvzChip;
|
|
6
|
+
new (): LmvzChip;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
package/components/lmvz-chip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as s,d as c,t as n}from"./p-C_bScbrd.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}text;render(){return s(c,{key:"
|
|
1
|
+
import{p as t,H as e,h as s,d as c,t as n}from"./p-C_bScbrd.js";const o=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}text;render(){return s(c,{key:"134d510fe3a04b989b0005bf31358149a9661cb2"},this.text)}static get style(){return":host{display:block}"}},[513,"lmvz-chip",{text:[1]}]),r=o,i=function(){"undefined"!=typeof customElements&&["lmvz-chip"].forEach((t=>{"lmvz-chip"===t&&(customElements.get(n(t))||customElements.define(n(t),o))}))};export{r as LmvzChip,i as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzHeader extends Components.LmvzHeader, HTMLElement {}
|
|
4
|
+
export const LmvzHeader: {
|
|
5
|
+
prototype: LmvzHeader;
|
|
6
|
+
new (): LmvzHeader;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as M,h as N,d as e,t as I}from"./p-C_bScbrd.js";import{R as j,a as D}from"./p-
|
|
1
|
+
import{p as M,h as N,d as e,t as I}from"./p-C_bScbrd.js";import{R as j,a as D}from"./p-CBLAeife.js";import{g,c as a}from"./p-DQEkWkMh.js";class i{host;elements=[];constructor(M){this.host=M}hostDidRender(){this.host.el.addEventListener("keydown",this.handleKeydown)}updateElements(M){this.elements=M}handleKeydown=M=>{const{key:N}=M;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft"].includes(N))return;const e=g(document),I=this.getNextFocusableElement(e,["ArrowDown","ArrowRight"].includes(N)?"down":"up");I&&(M.preventDefault(),I.focus?.())};getNextFocusableElement(M,N){if(!M)return;const{elements:e}=this,I=e.indexOf(M);if(-1===I)return;let j;if("down"===N?j=(I+1)%e.length:"up"===N&&(j=(I-1+e.length)%e.length),null==j)return;const D=e[j];return a(D)?D:this.getNextFocusableElement(D,N)}}const u=M(class extends j{get el(){return this}get validationEl(){return this.el}primarySlot;secondarySlot;secondaryNav;keyboardNavigationController=new i(this);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(!1),!1!==M&&this.__registerHost(),this.__attachShadow(),this.addController(new D(this,{reValidateOnPropChanges:!0})),this.addController(this.keyboardNavigationController)}handleActiveNavChange(){this.updateElementsActive()}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 N(e,{key:"58cf99b555112f6209b6d16047bda2cc0bbf5cde",onFocus:this.delegateFocus.bind(this)},N("div",{key:"d9bda5c2a6b9abd6e5ea849fb31a0543c8c36bb7",class:"brand"},N("slot",{key:"e1c2c2a0bd69875ecd46ef9f7406ccb52409b570",name:"brand"},N("img",{key:"8dfca875ffc837f2c413527ea106d640a9b9bb97",id:"fallback-logo-lmvz",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=",alt:"Lehrmittelverlag Zürich"}))),N("nav",{key:"24ceb7f3ef54399ecb9b7b78418d3be9bb547f60","aria-label":"Hauptnavigation"},N("div",{key:"c9fb6b1850330493e0a26bf20ea04013725025f6",role:"menubar",class:"primary-menubar"},N("slot",{key:"19640032a28d0a9bd7f5396f7c1acd477135f864",name:"nav-primary",ref:M=>this.primarySlot=M}),N("div",{key:"c11f19e15c0fea300a771060e2e4c77cce76c20f",role:"menu",id:"nav-secondary",class:"secondary-menubar",hidden:!this.lmvzActiveNav,ref:M=>this.secondaryNav=M},N("slot",{key:"2df2cf852595a78391bcd7c3dd8b8d6db3847aaa",name:this.secondarySlotName,ref:M=>this.secondarySlot=M})))),N("div",{key:"c256862d4f5ea38c120218372d9ad73ae19efd74",class:"actions"},N("slot",{key:"91b5eb2d9ab06005384a28cddee3d6c92afd418c",name:"actions"})))}static get watchers(){return{lmvzActiveNav:[{handleActiveNavChange:0}]}}static get style(){return":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-8-28, 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-8-16, 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)}}"}},[769,"lmvz-header",{role:[2561],lmvzActiveNav:[1,"lmvz-active-nav"]},void 0,{lmvzActiveNav:[{handleActiveNavChange:0}]}]),t=u,A=function(){"undefined"!=typeof customElements&&["lmvz-header"].forEach((M=>{"lmvz-header"===M&&(customElements.get(I(M))||customElements.define(I(M),u))}))};export{t as LmvzHeader,A as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzIcon extends Components.LmvzIcon, HTMLElement {}
|
|
4
|
+
export const LmvzIcon: {
|
|
5
|
+
prototype: LmvzIcon;
|
|
6
|
+
new (): LmvzIcon;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
package/components/lmvz-icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,h as s,d as e,t as i}from"./p-C_bScbrd.js";import{g as r,a as n,l as o,i as a,b as c,c as h,m as l,d as m,e as d,f as u,h as v,j as p,k as g,s as f,n as w,o as z,p as y,q as b,t as x,u as S,v as k,w as C,x as E,y as D,z as O,A as _,B as V,C as M,D as P,E as R,F as j,G as L,H as N,I as T,J as A,K as B,L as I,M as F,N as H,O as K,P as G,Q as J,R as U,S as W,T as $,U as X,_ as Y,V as q,W as Q,X as Z,Y as tt,Z as st,$ as et,a0 as it,a1 as rt,a2 as nt,a3 as ot,a4 as at,a5 as ct,a6 as ht,a7 as lt,a8 as mt,a9 as dt,aa as ut,r as vt,ab as pt,ac as gt,ad as ft,ae as wt}from"./p-CYcWxAp5.js";import{R as zt,a as yt}from"./p-Clo63DJF.js";import{c as bt}from"./p-DHtXOUVf.js";const xt=Symbol.for("effect/Brand/Refined"),St=(t,s,e,i)=>_({_tag:"Complete",key:t,exit:s,entryStats:e,timeToLiveMillis:i}),kt=(t,s)=>_({_tag:"Pending",key:t,deferred:s}),Ct=Symbol.for("effect/Cache/MapKey");class Et{current;[Ct]=Ct;previous=void 0;next=void 0;constructor(t){this.current=t}[F](){return H(J(this.current),G(J(this.previous)),G(J(this.next)),K(this))}[U](t){return this===t||Ot(t)&&$(this.current,t.current)&&$(this.previous,t.previous)&&$(this.next,t.next)}}const Dt=t=>new Et(t),Ot=t=>W(t,Ct);class _t{head=void 0;tail=void 0;add(t){if(t!==this.tail)if(void 0===this.tail)this.head=t,this.tail=t;else{const s=t.previous,e=t.next;void 0!==e&&(t.next=void 0,void 0!==s?(s.next=e,e.previous=s):(this.head=e,this.head.previous=void 0)),this.tail.next=t,t.previous=this.tail,this.tail=t}}remove(){const t=this.head;if(void 0!==t){const s=t.next;void 0!==s?(t.next=void 0,this.head=s,this.head.previous=void 0):(this.head=void 0,this.tail=void 0)}return t}}const Vt=Symbol.for("effect/Cache"),Mt={_Key:t=>t,_Error:t=>t,_Value:t=>t},Pt=Symbol.for("effect/ConsumerCache"),Rt={_Key:t=>t,_Error:t=>t,_Value:t=>t},jt=t=>({loadedMillis:t});class Lt{capacity;context;fiberId;lookup;timeToLive;[Vt]=Mt;[Pt]=Rt;cacheState;constructor(t,s,e,i,r){this.capacity=t,this.context=s,this.fiberId=e,this.lookup=i,this.timeToLive=r,this.cacheState={map:P(),keys:new _t,accesses:I(),updating:B(!1),hits:0,misses:0}}get(t){return d(this.getEither(t),g)}get cacheStats(){return f((()=>({hits:this.cacheState.hits,misses:this.cacheState.misses,size:w(this.cacheState.map)})))}getOption(t){return z((()=>l(y(this.cacheState.map,t),{onNone:()=>{const s=Dt(t);return this.trackAccess(s),this.trackMiss(),b(x())},onSome:t=>this.resolveMapValue(t)})))}getOptionComplete(t){return z((()=>l(y(this.cacheState.map,t),{onNone:()=>{const s=Dt(t);return this.trackAccess(s),this.trackMiss(),b(x())},onSome:t=>this.resolveMapValue(t,!0)})))}contains(t){return f((()=>S(this.cacheState.map,t)))}entryStats(t){return f((()=>{const s=y(this.cacheState.map,t);if(k(s))switch(s.value._tag){case"Complete":return C(jt(s.value.entryStats.loadedMillis));case"Pending":return x();case"Refreshing":return C(jt(s.value.complete.entryStats.loadedMillis))}return x()}))}getEither(t){return z((()=>{const s=t;let e,i,r=E(y(this.cacheState.map,s));return void 0===r&&(i=D(this.fiberId),e=Dt(s),S(this.cacheState.map,s)?r=E(y(this.cacheState.map,s)):O(this.cacheState.map,s,kt(e,i))),void 0===r?(this.trackAccess(e),this.trackMiss(),d(this.lookupValueOf(t,i),n)):V(this.resolveMapValue(r),l({onNone:()=>this.getEither(t),onSome:t=>b(o(t))}))}))}invalidate(t){return f((()=>{M(this.cacheState.map,t)}))}invalidateWhen(t,s){return f((()=>{const e=y(this.cacheState.map,t);k(e)&&"Complete"===e.value._tag&&"Success"===e.value.exit._tag&&s(e.value.exit.value)&&M(this.cacheState.map,t)}))}get invalidateAll(){return f((()=>{this.cacheState.map=P()}))}refresh(t){return R((s=>z((()=>{const e=t,i=D(this.fiberId);let r=E(y(this.cacheState.map,e));if(void 0===r&&(S(this.cacheState.map,e)?r=E(y(this.cacheState.map,e)):O(this.cacheState.map,e,kt(Dt(e),i))),void 0===r)return X(this.lookupValueOf(t,i));switch(r._tag){case"Complete":if(this.hasExpired(s,r.timeToLiveMillis)){const s=E(y(this.cacheState.map,e));return $(s,r)&&M(this.cacheState.map,e),X(this.get(t))}return H(this.lookupValueOf(t,i),q((()=>{const t=E(y(this.cacheState.map,e));if($(t,r)){const t=((t,s)=>_({_tag:"Refreshing",deferred:t,complete:s}))(i,r);return O(this.cacheState.map,e,t),!0}return!1})),X);case"Pending":case"Refreshing":return Y(r.deferred)}}))))}set(t,s){return R((e=>f((()=>{const i=e.unsafeCurrentTimeMillis(),r=t,n=Q(s),o=St(Dt(r),n,jt(i),i+Z(m(this.timeToLive(n))));O(this.cacheState.map,r,o)}))))}get size(){return f((()=>w(this.cacheState.map)))}get values(){return f((()=>{const t=[];for(const s of this.cacheState.map)"Complete"===s[1]._tag&&"Success"===s[1].exit._tag&&t.push(s[1].exit.value);return t}))}get entries(){return f((()=>{const t=[];for(const s of this.cacheState.map)"Complete"===s[1]._tag&&"Success"===s[1].exit._tag&&t.push([s[0],s[1].exit.value]);return t}))}get keys(){return f((()=>{const t=[];for(const s of this.cacheState.map)"Complete"===s[1]._tag&&"Success"===s[1].exit._tag&&t.push(s[0]);return t}))}resolveMapValue(t,s=!1){return R((e=>{switch(t._tag){case"Complete":return this.trackAccess(t.key),this.hasExpired(e,t.timeToLiveMillis)?(M(this.cacheState.map,t.key.current),b(x())):(this.trackHit(),d(t.exit,C));case"Pending":return this.trackAccess(t.key),this.trackHit(),s?b(x()):d(Y(t.deferred),C);case"Refreshing":return this.trackAccess(t.complete.key),this.trackHit(),this.hasExpired(e,t.complete.timeToLiveMillis)?s?b(x()):d(Y(t.deferred),C):d(t.complete.exit,C)}}))}trackHit(){this.cacheState.hits=this.cacheState.hits+1}trackMiss(){this.cacheState.misses=this.cacheState.misses+1}trackAccess(t){if(j(this.cacheState.accesses,t),L(this.cacheState.updating,!1,!0)){let t=!0;for(;t;){const s=N(this.cacheState.accesses,T);s===T?t=!1:this.cacheState.keys.add(s)}let s=w(this.cacheState.map);for(t=s>this.capacity;t;){const e=this.cacheState.keys.remove();void 0!==e?S(this.cacheState.map,e.current)&&(M(this.cacheState.map,e.current),s-=1,t=s>this.capacity):t=!1}A(this.cacheState.updating,!1)}}hasExpired(t,s){return t.unsafeCurrentTimeMillis()>s}lookupValueOf(t,s){return R((e=>z((()=>{const i=t;return H(this.lookup(t),nt(this.context),rt,V((t=>{const r=e.unsafeCurrentTimeMillis(),n=jt(r),o=St(Dt(i),t,n,r+Z(m(this.timeToLive(t))));return O(this.cacheState.map,i,o),st(it(s,t),t)})),tt((()=>st(et(s),f((()=>{M(this.cacheState.map,i)}))))))}))))}}const Nt=t=>{const s=m(t.timeToLive);return(t=>d(u([v(),p]),(([s,e])=>new Lt(t.capacity,s,e,t.lookup,(s=>m(t.timeToLive(s)))))))({capacity:t.capacity,lookup:t.lookup,timeToLive:()=>s})},Tt=function(){const t=Symbol.for("effect/Data/Error/plainArgs");return class extends ot{constructor(s){super(s?.message,s?.cause?{cause:s.cause}:void 0),s&&(Object.assign(this,s),Object.defineProperty(this,t,{value:s,enumerable:!1}))}toJSON(){return{...this[t],...this}}}}(),At=t=>{const s={BaseEffectError:class extends Tt{_tag=t}};return s.BaseEffectError.prototype.name=t,s.BaseEffectError};class Bt extends(At("FetchError")){}class It extends(At("NotFoundError")){}class Ft extends(At("ResponseTextError")){constructor(t){super(Error("Failed to read response text",{cause:t}))}}const Ht=function(...t){const s=2===t.length?s=>t[0](s)?n(s):o(t[1](s)):s=>l(t[0](s),{onNone:()=>n(s),onSome:o});return Object.assign((t=>r(s(t),a)),{[xt]:xt,option:t=>h(s(t)),either:s,is:t=>c(s(t))})}((function(t){if("string"!=typeof t)return!1;try{return"svg"===(new DOMParser).parseFromString(t,"image/svg+xml").documentElement.nodeName}catch{return!1}}),(()=>[{message:"SVG data is malformed",meta:void 0}]));class Kt extends(At("BrandValidationError")){constructor(t,s){super(Error(`Brand validation failed for type ${s}.`,{cause:t}))}}let Gt=null;function Jt(){return mt((function*(){Gt?yield*Gt.invalidateAll:dt("Attempted to clear icon cache before it was initialized")}))}const Ut=t(class extends zt{intersectionObserver;ariaValidationController=new yt(this);get el(){return this}validationEl;icon;weight="medium";size="md";iconData;visible=!1;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(t){super(!1),!1!==t&&this.__registerHost(),this.addController(this.ariaValidationController)}connectedCallback(){this.waitUntilVisible((()=>{this.visible=!0,this.loadIconPathData()})),super.connectedCallback()}disconnectedCallback(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0),super.disconnectedCallback()}async loadIconPathData(){const{icon:t,visible:s}=this;t&&s&&(this.iconData=await vt(function(t){const s=t;return mt((function*(){return Gt||(Gt=yield*Nt({capacity:200,timeToLive:ut,lookup:t=>mt((function*(){const s=bt(t+".svg","icons"),e=yield*(t=>at((function*(){const s=yield*ct({try:()=>fetch(t,void 0),catch:t=>new Bt({cause:t})});return 404===s.status?yield*ht(new It({url:s.url})):s})))(s),i=yield*(t=>ct({try:()=>t.text(),catch:t=>new Ft(t)}))(e);return yield*(t=>lt({try:()=>Ht(t),catch:t=>new Kt(t,"SVGString")}))(i)}))})),yield*Gt.get(s)}))}(this.icon).pipe(pt((s=>gt(`Error loading icon "${t}":`,s.message,s.cause,s.stack))),ft((()=>wt(Ht('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>')))))))}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return s(e,{key:"f5c2f8025d0e9598d903e72770ebca6cad01961c",role:"img","aria-hidden":""+this.ariaHidden,innerHTML:this.iconData})}waitUntilVisible(t,s=50){"undefined"!=typeof window&&window.IntersectionObserver?(this.intersectionObserver=new IntersectionObserver((s=>{s.some((s=>!!s.isIntersecting&&(this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,t(),!0)))}),{rootMargin:s+"px"}),this.intersectionObserver.observe(this.el)):t()}static get assetsDirs(){return["../../assets/icons"]}static get watchers(){return{icon:[{loadIconPathData:0}]}}static get style(){return".sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg>path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.81rem + 0.26vw, 1.13rem))}}[size='md'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));height:var(--lmvz-component-icon-size-md, clamp(1rem, 0.88rem + 0.52vw, 1.5rem))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.38rem + 0.52vw, 2rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height: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)}}"}},[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},void 0,{icon:[{loadIconPathData:0}]}]),Wt=Ut,$t=function(){"undefined"!=typeof customElements&&["lmvz-icon"].forEach((t=>{"lmvz-icon"===t&&(customElements.get(i(t))||customElements.define(i(t),Ut))}))};export{Wt as LmvzIcon,Jt as c,$t as defineCustomElement}
|
|
1
|
+
import{p as i,h as e,d as t,t as n}from"./p-C_bScbrd.js";import{g as o,r as s,l as r,i as c,a,b as l,m,t as h,T as v,c as d}from"./p-fiRXhuXK.js";import{R as g,a as p}from"./p-CBLAeife.js";const u=Symbol.for("effect/Brand/Refined"),f=function(...i){const e=2===i.length?e=>i[0](e)?s(e):r(i[1](e)):e=>m(i[0](e),{onNone:()=>s(e),onSome:r});return Object.assign((i=>o(e(i),c)),{[u]:u,option:i=>l(e(i)),either:e,is:i=>a(e(i))})}(z,(()=>[{message:"SVG data is malformed",meta:void 0}]));class w extends(v("BrandValidationError")){constructor(i,e){super(Error(`Brand validation failed for type ${e}.`,{cause:i}))}}function z(i){if("string"!=typeof i)return!1;try{return"svg"===(new DOMParser).parseFromString(i,"image/svg+xml").documentElement.nodeName}catch{return!1}}const b=Symbol.for("LMVZ__iconProviderRegistry"),y={};function $(){return"undefined"==typeof window?y:window[b]??(window[b]={})}function x(i,e){const t=$(),n=i;Object.prototype.hasOwnProperty.call(t,n)&&console.warn(`Icon provider with name "${n}" is already registered. Overwriting existing provider.`),t[n]=e}function k(i){const e=$();if(i)return e[i];const t=Object.keys(e);if(0===t.length)return;t.length>1&&console.warn(`Multiple icon providers registered (${t.join(", ")}). Using the first one: "${t[0]}".`);const n=t[0];return n?e[n]:void 0}const I=()=>f('<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"></svg>');function D(i,e){return{iconset:i,icon:e}}const P=i(class extends g{intersectionObserver;ariaValidationController=new p(this);get el(){return this}validationEl;icon;weight="medium";size="md";iconset;iconData;visible=!1;ariaLabel;get ariaHidden(){return!this.ariaLabel}constructor(i){super(!1),!1!==i&&this.__registerHost(),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:i,iconset:e,visible:t}=this;i&&t&&(this.iconData=z(i)?i:await async function(i){const{icon:e,iconset:t}=i;return await(async()=>{const i=k(t);if(i)try{const n=await Promise.resolve(i.resolve(e));if(!n?.svg)return void console.warn(`Icon "${e}"${t?` from set "${t}"`:""} not found in provider. Using default icon.`);const o=await async function(i){try{return await d((i=>h({try:()=>f(i),catch:i=>new w(i,"SVGString")}))(i))}catch{return console.error("Invalid SVG string:",i),I()}}(n.svg);if(o)return o}catch(i){return void console.error(`Error resolving icon "${e}" with provider:`,i)}else console.warn(`No icon provider registered. Unable to resolve icon "${e}"${t?` from set "${t}"`:""}. Using default icon.`)})()||(console.error(`Icon "${e}" not found${t?` in set "${t}"`:""}. Using default icon.`),I())}({icon:i,iconset:e}))}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return e(t,{key:"b36586af32709b492336fe4ec1fe1fe1fe7a9e4b",role:"img","aria-hidden":""+this.ariaHidden,innerHTML:this.iconData})}waitUntilVisible(i,e=50){"undefined"!=typeof window&&window.IntersectionObserver?(this.intersectionObserver=new IntersectionObserver((e=>{e.some((e=>!!e.isIntersecting&&(this.intersectionObserver&&"function"==typeof this.intersectionObserver.disconnect&&this.intersectionObserver.disconnect(),this.intersectionObserver=void 0,i(),!0)))}),{rootMargin:e+"px"}),this.intersectionObserver.observe(this.el)):i()}static get watchers(){return{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}}static get style(){return".sc-lmvz-icon-h{--lmvz-icon-color:var(--lmvz-component-color, var(--lmvz-semantic-color-on-surface-input-primary, #000000));display:inline-block;line-height:0;svg{display:block}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));height:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem));height:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{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))}}[size='lg'].sc-lmvz-icon-h{svg{width:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem));height:var(--lmvz-component-icon-size-lg, clamp(1.5rem, 1.44rem + 0.26vw, 1.75rem))}}[size='inherit'].sc-lmvz-icon-h{svg{width:inherit;height: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)}}"}},[514,"lmvz-icon",{icon:[513],weight:[513],size:[513],iconset:[513],ariaLabel:[513,"aria-label"],iconData:[32],visible:[32]},void 0,{icon:[{loadIconPathData:0}],iconset:[{loadIconPathData:0}]}]),S=P,E=function(){"undefined"!=typeof customElements&&["lmvz-icon"].forEach((i=>{"lmvz-icon"===i&&(customElements.get(n(i))||customElements.define(n(i),P))}))};export{S as LmvzIcon,E as defineCustomElement,k as g,x as r,D as t}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzInput extends Components.LmvzInput, HTMLElement {}
|
|
4
|
+
export const LmvzInput: {
|
|
5
|
+
prototype: LmvzInput;
|
|
6
|
+
new (): LmvzInput;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
package/components/lmvz-input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,c as e,h as r,t as i}from"./p-C_bScbrd.js";import{c as o}from"./p-BfTCfPZ1.js";import{R as a,a as n}from"./p-Clo63DJF.js";import{a as l}from"./p-DQEkWkMh.js";let s=0;const c=t(class extends a{get el(){return this}get validationEl(){return this.el}lmvzInput;internals;nativeInputElement;inputId="lmvz-input-"+s++;initialValue="";nativeError=!1;errorFromProp=!1;get helperId(){return this.helperText?this.inputId+"-helper":void 0}get showErrorMessage(){return this.error&&!!this.errorMessage}get errorId(){return this.inputId+"-error"}get describedBy(){const t=[];return this.helperId&&t.push(this.helperId),this.showErrorMessage&&t.push(this.errorId),t.length>0?t.join(" "):void 0}value;label;helperText;placeholder;disabled=!1;readonly=!1;required=!1;name;type="text";errorMessage;autocomplete;inputmode;autocorrect;autocapitalize;spellcheck;autofocus=!1;minlength;maxlength;pattern;min;max;step;form;get error(){return this.errorFromProp||this.nativeError}set error(t){this.errorFromProp=t}async setValue(t){const e=this.nativeInputElement,r=t??"";e&&(e.value=r),this.value=r,this.internals.setFormValue?.(r),this.lmvzInput.emit(r)}async focusInput(){this.nativeInputElement?.focus()}async blurInput(){this.nativeInputElement?.blur()}async select(){this.nativeInputElement?.select()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getInputElement(){return this.nativeInputElement||await new Promise((t=>l(this.el,t))),Promise.resolve(this.nativeInputElement)}constructor(t){super(!1),!1!==t&&this.__registerHost(),this.lmvzInput=e(this,"lmvzInput"),this.internals=this.attachInternals(),this.addController(new n(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialValue=this.value??"",super.componentWillLoad()}formAssociatedCallback(t){t&&this.internals.setFormValue?.(this.value??"")}formResetCallback(){this.internals.setValidity({}),this.setValue(this.initialValue)}formStateRestoreCallback(t){this.setValue(t)}handleValueChange(t){this.nativeInputElement&&(this.nativeInputElement.value===t||this.setValue(t))}handleDisabledChange(t){t&&this.nativeInputElement&&this.nativeInputElement.blur()}handleInput=t=>{this.setValue(t.target.value)};handleChange=t=>{this.updateNativeError(t.target??this.nativeInputElement)};handleFocus=()=>{};handleBlur=t=>{const e=t.target;e.reportValidity?.()};updateNativeError(t){const e=t??this.nativeInputElement;e&&(this.nativeError=!(e.checkValidity?.()??1))}render(){const t=!!this.value,e=t||!!this.placeholder;return r("div",{key:"195e2c5046d48d01f4912993bde3c8d2b3a73d1d",class:o("input-container",{"interaction-filled":t})},r("div",{key:"66bc3deab063a309eefc0de5ebf7f54331c9190c",class:"input-wrapper"},r("slot",{key:"fac318070421d526bb09ba0dd0efdecf8964d952",name:"before-input"}),r("div",{key:"1945152dc010d571c5886f222332b057e89e496c",class:"label-input-group"},r("label",{key:"d57392c2c83b1e5f362dd33fa9d060e570417f3f",htmlFor:this.inputId,class:o({floating:e})},this.label,this.required&&r("span",{key:"507603a50eb08f0f4f5e2b87b2550fe6b657c4d4",class:"required-indicator","aria-hidden":"true"}," ","*")),r("input",{key:"0fe916fef48618331806142c0d3500d9e6dec9cb",id:this.inputId,ref:t=>this.nativeInputElement=t,type:this.type,min:this.min,max:this.max,step:this.step,value:this.value,name:this.name,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,form:this.form,autocomplete:this.autocomplete,inputmode:this.inputmode,autocorrect:this.autocorrect,autocapitalize:this.autocapitalize,spellcheck:this.spellcheck,autofocus:this.autofocus,minlength:this.minlength,maxlength:this.maxlength,pattern:this.pattern,"aria-invalid":this.error?"true":"false","aria-required":this.required?"true":"false","aria-describedby":this.describedBy,"aria-errormessage":this.errorId,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur})),r("slot",{key:"b415bedde58862e5bd7621f73a1d77bc478850a3",name:"after-input"})),r("div",{key:"bc0e07f5243417f4c632eb2f7976dc944fdbf17a",id:this.helperId,role:"status"},this.helperText||null),r("div",{key:"62e2267453b92edd47077b233cb231a1deecedc4",id:this.errorId,role:"alert"},this.showErrorMessage&&this.errorMessage||null))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }"}},[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],error:[6660],nativeError:[32],setValue:[64],focusInput:[64],blurInput:[64],select:[64],checkValidity:[64],reportValidity:[64],getInputElement:[64]},void 0,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]),p=c,u=function(){"undefined"!=typeof customElements&&["lmvz-input"].forEach((t=>{"lmvz-input"===t&&(customElements.get(i(t))||customElements.define(i(t),c))}))};export{p as LmvzInput,u as defineCustomElement}
|
|
1
|
+
import{p as t,c as e,h as r,t as i}from"./p-C_bScbrd.js";import{c as o}from"./p-BfTCfPZ1.js";import{R as a,a as n}from"./p-CBLAeife.js";import{a as l}from"./p-DQEkWkMh.js";let s=0;const c=t(class extends a{get el(){return this}get validationEl(){return this.el}lmvzInput;internals;nativeInputElement;inputId="lmvz-input-"+s++;initialValue="";nativeError=!1;errorFromProp=!1;get helperId(){return this.helperText?this.inputId+"-helper":void 0}get showErrorMessage(){return this.error&&!!this.errorMessage}get errorId(){return this.inputId+"-error"}get describedBy(){const t=[];return this.helperId&&t.push(this.helperId),this.showErrorMessage&&t.push(this.errorId),t.length>0?t.join(" "):void 0}value;label;helperText;placeholder;disabled=!1;readonly=!1;required=!1;name;type="text";errorMessage;autocomplete;inputmode;autocorrect;autocapitalize;spellcheck;autofocus=!1;minlength;maxlength;pattern;min;max;step;form;get error(){return this.errorFromProp||this.nativeError}set error(t){this.errorFromProp=t}async setValue(t){const e=this.nativeInputElement,r=t??"";e&&(e.value=r),this.value=r,this.internals.setFormValue?.(r),this.lmvzInput.emit(r)}async focusInput(){this.nativeInputElement?.focus()}async blurInput(){this.nativeInputElement?.blur()}async select(){this.nativeInputElement?.select()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getInputElement(){return this.nativeInputElement||await new Promise((t=>l(this.el,t))),Promise.resolve(this.nativeInputElement)}constructor(t){super(!1),!1!==t&&this.__registerHost(),this.lmvzInput=e(this,"lmvzInput"),this.internals=this.attachInternals(),this.addController(new n(this,{reValidateOnPropChanges:!0}))}componentWillLoad(){this.initialValue=this.value??"",super.componentWillLoad()}formAssociatedCallback(t){t&&this.internals.setFormValue?.(this.value??"")}formResetCallback(){this.internals.setValidity({}),this.setValue(this.initialValue)}formStateRestoreCallback(t){this.setValue(t)}handleValueChange(t){this.nativeInputElement&&(this.nativeInputElement.value===t||this.setValue(t))}handleDisabledChange(t){t&&this.nativeInputElement&&this.nativeInputElement.blur()}handleInput=t=>{this.setValue(t.target.value)};handleChange=t=>{this.updateNativeError(t.target??this.nativeInputElement)};handleFocus=()=>{};handleBlur=t=>{const e=t.target;e.reportValidity?.()};updateNativeError(t){const e=t??this.nativeInputElement;e&&(this.nativeError=!(e.checkValidity?.()??1))}render(){const t=!!this.value,e=t||!!this.placeholder;return r("div",{key:"9de2e4dd202edc937e96ff6ebdc8d0270851c4ca",class:o("input-container",{"interaction-filled":t})},r("div",{key:"0c9f92778e1c52dca13ed9175a09d757fc6eedc9",class:"input-wrapper"},r("slot",{key:"9cf29c45afdb127917a68ed6752faf3d50004c7d",name:"before-input"}),r("div",{key:"e7e6c54b6ee6db108ac3f8ddb676bb9fcf10517e",class:"label-input-group"},r("label",{key:"68eb29e585741971aae58c7693d011ba587f1c1b",htmlFor:this.inputId,class:o({floating:e})},this.label,this.required&&r("span",{key:"274d992a43c2de45af7172608fb1581c6ee771d2",class:"required-indicator","aria-hidden":"true"}," ","*")),r("input",{key:"a26b95dee9781e0e13db16d6e09681e36cab0230",id:this.inputId,ref:t=>this.nativeInputElement=t,type:this.type,min:this.min,max:this.max,step:this.step,value:this.value,name:this.name,placeholder:this.placeholder,disabled:this.disabled,readOnly:this.readonly,required:this.required,form:this.form,autocomplete:this.autocomplete,inputmode:this.inputmode,autocorrect:this.autocorrect,autocapitalize:this.autocapitalize,spellcheck:this.spellcheck,autofocus:this.autofocus,minlength:this.minlength,maxlength:this.maxlength,pattern:this.pattern,"aria-invalid":this.error?"true":"false","aria-required":this.required?"true":"false","aria-describedby":this.describedBy,"aria-errormessage":this.errorId,onInput:this.handleInput,onChange:this.handleChange,onFocus:this.handleFocus,onBlur:this.handleBlur})),r("slot",{key:"5b77b87ba1da3b8e71c7f6825eecf2216a93e4f9",name:"after-input"})),r("div",{key:"cac334a1e88d4136e923ef1355196997bfe97099",id:this.helperId,role:"status"},this.helperText||null),r("div",{key:"b3ea662fa0a57ed0d8c3f35e36aad6b2513af8ab",id:this.errorId,role:"alert"},this.showErrorMessage&&this.errorMessage||null))}static get formAssociated(){return!0}static get watchers(){return{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }"}},[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],error:[6660],nativeError:[32],setValue:[64],focusInput:[64],blurInput:[64],select:[64],checkValidity:[64],reportValidity:[64],getInputElement:[64]},void 0,{value:[{handleValueChange:0}],disabled:[{handleDisabledChange:0}]}]),p=c,u=function(){"undefined"!=typeof customElements&&["lmvz-input"].forEach((t=>{"lmvz-input"===t&&(customElements.get(i(t))||customElements.define(i(t),c))}))};export{p as LmvzInput,u as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzMenuitem extends Components.LmvzMenuitem, HTMLElement {}
|
|
4
|
+
export const LmvzMenuitem: {
|
|
5
|
+
prototype: LmvzMenuitem;
|
|
6
|
+
new (): LmvzMenuitem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,c as t,h as m,d as o,t as r}from"./p-C_bScbrd.js";import{R as
|
|
1
|
+
import{p as e,c as t,h as m,d as o,t as r}from"./p-C_bScbrd.js";import{R as a,a as n}from"./p-CBLAeife.js";import{E as i}from"./p-CN0JX9-m.js";const l=e(class extends a{get el(){return this}get validationEl(){return this.el}validationSlot;get role(){return"menuitem"}get ti(){return 0}lmvzActivation;constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzActivation=t(this,"lmvzActivation"),this.addController(new n(this,{validationTiming:"slot"})),this.addController(new i(this))}render(){return m(o,{key:"510ac59b18468ce9c65b866ae2767185f1b3da92"},m("slot",{key:"7e032e0dab83f9bfbaa96ad2b78d8a5a58f978ab",ref:e=>this.validationSlot=e}))}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-menuitem-h { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); padding: var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); cursor: pointer; --lmvz-menuitem-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); background: var(--lmvz-menuitem-background); color: var(--lmvz-menuitem-color); } .sc-lmvz-menuitem-h:hover { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } .sc-lmvz-menuitem-h:active { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } .sc-lmvz-menuitem-h:focus-visible { z-index: 1; } [aria-expanded='true'].sc-lmvz-menuitem-h { --lmvz-menuitem-background: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); }"}},[774,"lmvz-menuitem",{role:[2561],ti:[2562,"tabindex"]}]),s=l,c=function(){"undefined"!=typeof customElements&&["lmvz-menuitem"].forEach((e=>{"lmvz-menuitem"===e&&(customElements.get(r(e))||customElements.define(r(e),l))}))};export{s as LmvzMenuitem,c as defineCustomElement}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface LmvzSelect extends Components.LmvzSelect, HTMLElement {}
|
|
4
|
+
export const LmvzSelect: {
|
|
5
|
+
prototype: LmvzSelect;
|
|
6
|
+
new (): LmvzSelect;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,c as l,h as t,d as a,t as s}from"./p-C_bScbrd.js";import{R as o,a as
|
|
1
|
+
import{p as e,c as l,h as t,d as a,t as s}from"./p-C_bScbrd.js";import{R as o,a as i}from"./p-CBLAeife.js";let c=0;const r=e(class extends o{get el(){return this}get validationEl(){return this.el}selectId="lmvz-select-"+c++;nativeSelectEl;constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzChange=l(this,"lmvzChange"),this.addController(new i(this))}lmvzChange;value;label;helperText;disabled=!1;required=!1;name;selectedLabel="";get hasValue(){return!!this.value}componentDidLoad(){this.syncSelectedLabel(),super.componentDidLoad()}handleValueChange(e){this.nativeSelectEl&&this.nativeSelectEl.value!==(e??"")&&(this.nativeSelectEl.value=e??""),this.syncSelectedLabel()}syncSelectedLabel(){if(!this.nativeSelectEl)return;const e=this.nativeSelectEl.selectedIndex;this.selectedLabel=e>=0?this.nativeSelectEl.options[e]?.text??"":""}handleChange=e=>{const l=e.target;this.value=l.value,this.syncSelectedLabel(),this.lmvzChange.emit(l.value)};render(){const e=this.hasValue;return t(a,{key:"7f4650d5971bb93dba48385df734e6b7a0b4f7eb"},t("div",{key:"79d6234cd15f64c8bff787d715107e7e86145333",class:"select-wrapper"},t("label",{key:"14d93469c6d309b68427ff7bfc2bd531c8f0ecf6",htmlFor:this.selectId,class:e?"floating-label":"assistive-label"},this.label,this.required&&e&&t("span",{key:"c8be809e09d768d6f73ccccdfbf0bf495869ac72","aria-hidden":"true"}," *")),t("div",{key:"1db5d44b44100342a4ca5feff648b61a0bdadb1a","aria-hidden":"true"},t("span",{key:"3fdc95aab9997a10f4ba42dabc3758aea0797a22"},e?this.selectedLabel:this.label,this.required&&!e&&t("span",{key:"11aef8194551059130b6be5351587219a1e80f00","aria-hidden":"true"}," *")),t("span",{key:"8fc52ff3e46d7b52d8d5069a74ebf7bb0d981081"},t("img",{key:"129dd4038772eba9313e1e322866c70408f4e2ad",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjMzMzQgOC42NjY2M0wxMi4wMDAxIDE3TDMuNjY2NzUgOC42NjY2MyIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=",alt:""}))),t("select",{key:"6eb6cf496e60b3c1bd9556e596cbef34d4da5a09",id:this.selectId,ref:e=>this.nativeSelectEl=e,name:this.name,disabled:this.disabled,required:this.required,"aria-label":this.label,onChange:this.handleChange},!e&&t("option",{key:"70d660e0bc7e4c127234ce77decf35d6fea7fe8d",value:"",disabled:!0,selected:!0,hidden:!0}),t("slot",{key:"e6cbc238c9c0cf8e8c31d0347a1f621272a94ca6"}))),this.helperText&&t("div",{key:"432d405ee7338da46509ff207599b882a19ea44e",role:"status"},this.helperText))}static get watchers(){return{value:[{handleValueChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; padding-top: var(--lmvz-internal-select-floating-label-top-offset); --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-select-bg-hover: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-select-text-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-select-height: 40px; --lmvz-select-label-font-size: var(--lmvz-component-component-typography-body-sm-font-size, 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, #7a7a7a); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } .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, div[aria-hidden='true'].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; } div[aria-hidden].sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); cursor: pointer; position: relative; z-index: 1; transition: background-color 0.15s ease; } .sc-lmvz-select-h:not([disabled]) .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-select-bg-hover); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: 2px solid var(--lmvz-select-focus-color); outline-offset: 2px; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font-size: var(--lmvz-component-component-typography-body-md-font-size, 0.875rem); font-weight: var(--lmvz-global-font-weight-500, 500); color: var(--lmvz-select-text-color); line-height: 1.4; letter-spacing: var(--lmvz-component-body-md-letter-spacing, 0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } img.sc-lmvz-select { display: block; width: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); height: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } select.sc-lmvz-select { appearance: none; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 2; border: none; background: transparent; margin: 0; padding: 0; } [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 { margin-top: 4px; padding-left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-helper-color); line-height: normal; }"}},[774,"lmvz-select",{value:[1025],label:[1],helperText:[1,"helper-text"],disabled:[516],required:[516],name:[1],selectedLabel:[32]},void 0,{value:[{handleValueChange:0}]}]),n=r,d=function(){"undefined"!=typeof customElements&&["lmvz-select"].forEach((e=>{"lmvz-select"===e&&(customElements.get(s(e))||customElements.define(s(e),r))}))};export{n as LmvzSelect,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as t,H as i}from"./p-C_bScbrd.js";const o=Symbol("
|
|
1
|
+
import{B as t,H as i}from"./p-C_bScbrd.js";const o=Symbol("LMVZ__ariaValidationRuntimeState"),e="lmvz:aria-validation-runtime-changed";function n(){const t=globalThis;return t[o]||(t[o]={enabled:!1}),t[o]}function s(){"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent(e))}const a=()=>n().enabled,r=()=>n().verboseLogging??!1,l=(t={})=>{const i=n();i.enabled||(Object.assign(i,t),i.enabled=!0,async function(...t){const i=await async function(){const t=n();if(!t.enabled)return null;if(t.runtime)return t.runtime;t.loadPromise||(t.loadPromise=import("./p-DXOTa5VF.js").catch((()=>null)));const i=await t.loadPromise;return i&&(t.runtime=i),i}();n().enabled&&(i?i.initializeValidationStream(...t):console.warn("Failed to load aria validation runtime"))}().then((()=>{s()})))},h=()=>{const t=n();t.enabled&&(t.enabled=!1,s())};function d(...t){const{enabled:i,runtime:o,loadPromise:e,lazyCondition:s}=n();if(i){if(!s)return a();(function(t,i=[]){const o=t(...i);return(e=o)&&"object"==typeof e&&"function"==typeof e.then?o:Promise.resolve(o);var e})(s).then((t=>{t&&a()}))}function a(){if(o)return o.enqueueValidation(...t);e?e.then((i=>{i?.enqueueValidation?i.enqueueValidation(...t):console.error("Failed to load aria validation runtime")})).catch((()=>{console.error("Failed to enqueue validation due to an error while loading the runtime")})):console.warn("neither runtime nor load promise found for aria validation. This should not happen, as enabling aria validation should have triggered the loading of the runtime.")}}class c{host;config;visibilityObserver;elementQueued=!1;elementValidated=!1;elementLoaded=!1;static knownValidationErrors=[];get disabled(){return!a()}get useVerboseLogging(){return this.config?.verboseLogging||t.isDev||r()}constructor(t,i){this.host=t,this.config=i}onRuntimeConfigChange=()=>{a()&&this.checkLazyValidation()};hostDidLoad(){this.elementLoaded=!0,"undefined"!=typeof window&&window.addEventListener(e,this.onRuntimeConfigChange),this.elementQueued||this.elementValidated||("slot"!==this.config?.validationTiming?this.host.validationEl?.checkVisibility?.()&&"load"===this.config?.validationTiming?this.enqueueValidation():this.observeVisibilityOnce():this.observeSlot())}hostDidUpdate(){this.checkLazyValidation()}hostDisconnected(){this.discardVisibilityObserver(),"undefined"!=typeof window&&window.removeEventListener(e,this.onRuntimeConfigChange)}revalidateAria(){this.enqueueValidation()}observeSlot(){this.host.validationSlot?.addEventListener("slotchange",this.enqueueValidation.bind(this))}observeVisibilityOnce(){window.setTimeout((()=>{this.host.validationEl&&(this.visibilityObserver=new IntersectionObserver((t=>{for(const i of t)i.target===this.host.validationEl&&i.isIntersecting&&(this.checkLazyValidation(),this.discardVisibilityObserver())}),{root:this.host.validationEl?.parentElement,rootMargin:"0px",threshold:.01}),this.visibilityObserver.observe(this.host.validationEl))}))}checkLazyValidation(){this.elementLoaded&&(this.config?.reValidateOnPropChanges||!this.elementQueued&&!this.elementValidated)&&this.host.validationEl?.checkVisibility?.()&&this.enqueueValidation()}enqueueValidation(){a()&&(this.elementQueued=!0,d({context:{include:this.host.validationEl,exclude:c.knownValidationErrors},onComplete:(t,i)=>{this.elementValidated=!0;const o=this.host.tagName||this.host.validationEl?.tagName||"Element";if(t)return console.error("Error running ARIA validation:",t,o),void(this.host.validationEl?.tagName||console.dir(this.host));const e=[o];if(!i?.violations.length)return void(this.useVerboseLogging&&(console.log(...e,"has no ARIA violations"),this.host.validationEl?.tagName||console.dir(this.host)));const n=i.violations.length,s=[...e,i.violations.at(0).id,n>1?`(+${n-1} more)`:""].filter(Boolean).join(" ");this.useVerboseLogging?console.group(s):console.groupCollapsed(s);const a=i.violations.flatMap((t=>(console.dir(t,{showHidden:!0,compact:!1}),t.nodes.map((t=>t.target)))));this.host.validationEl?console.log("element:",this.host.validationEl):console.dir(this.host),console.groupEnd(),c.knownValidationErrors.push(...a)}}))}discardVisibilityObserver(){this.visibilityObserver&&(this.visibilityObserver.disconnect(),this.visibilityObserver=void 0)}}const u=class extends i{constructor(){super(!1)}controllers=new Set;addController(t){this.controllers.add(t)}removeController(t){this.controllers.delete(t)}get activeControllers(){return Array.from(this.controllers).filter((t=>!t.disabled))}connectedCallback(){this.controllers.size||console.warn("ReactiveControllerHost connected with no controllers registered.",this),this.activeControllers.forEach((t=>t.hostConnected?.()))}disconnectedCallback(){this.activeControllers.forEach((t=>t.hostDisconnected?.()))}componentWillLoad(){this.activeControllers.forEach((t=>t.hostWillLoad?.()))}componentDidLoad(){this.activeControllers.forEach((t=>t.hostDidLoad?.()))}componentWillRender(){this.activeControllers.forEach((t=>t.hostWillRender?.()))}componentDidRender(){this.activeControllers.forEach((t=>t.hostDidRender?.()))}componentWillUpdate(){this.activeControllers.forEach((t=>t.hostWillUpdate?.()))}componentDidUpdate(){this.activeControllers.forEach((t=>t.hostDidUpdate?.()))}};export{e as A,u as R,c as a,h as d,l as e,a as i,d as q,r as u}
|