@lmvz-ds/components 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/cjs/{ds.constants-DSnxZ3ia.js → ds.constants-8fh6ItAF.js} +1 -1
- package/cjs/index.cjs.js +196 -2
- package/cjs/lmvz-button-group.cjs.entry.js +183 -0
- package/cjs/lmvz-button_2.cjs.entry.js +198 -0
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +1 -1
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-menuitem.cjs.entry.js +1 -1
- package/cjs/lmvz-modal.cjs.entry.js +1 -1
- package/cjs/lmvz-radio.cjs.entry.js +1 -1
- package/cjs/lmvz-snackbar.cjs.entry.js +83 -0
- package/cjs/lmvz-toggle.cjs.entry.js +2 -2
- package/cjs/loader.cjs.js +1 -1
- package/collection/api/ds.constants.js +4 -1
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-button/lmvz-button.css +6 -6
- package/collection/components/lmvz-button-group/lmvz-button-group.css +2 -2
- package/collection/components/lmvz-card/lmvz-card.css +9 -9
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +4 -4
- package/collection/components/lmvz-chip/lmvz-chip.css +2 -2
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.css +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.css +4 -16
- package/collection/components/lmvz-radio/lmvz-radio.css +4 -4
- package/collection/components/lmvz-snackbar/lmvz-snackbar.css +101 -0
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +266 -0
- package/collection/components/lmvz-snackbar/public.js +1 -0
- package/collection/components/lmvz-snackbar/snackbar-controller.js +194 -0
- package/collection/components/lmvz-toggle/lmvz-toggle.css +2 -2
- package/collection/components/lmvz-toggle/lmvz-toggle.js +1 -1
- package/collection/index.js +1 -0
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.d.ts +11 -0
- package/components/lmvz-snackbar.d.ts.bak +11 -0
- package/components/lmvz-snackbar.js +1 -0
- package/components/lmvz-toggle.js +1 -1
- package/components/{p-CNmHnJ1D.js → p-BOzeYzKk.js} +1 -1
- package/components/{p-CCcoDnH-.js → p-DYa3zcGE.js} +1 -1
- package/components/{p-DOTK1OW3.js → p-JAKQdFhF.js} +1 -1
- package/components/p-WLZ7VWNX.js +1 -0
- package/components/{p-DYr7Jc0V.js → p-c7OzBK8f.js} +1 -1
- package/components/p-lsUdmjdw.js +1 -0
- package/esm/{ds.constants-Bmi89ll1.js → ds.constants-BOOwq5dE.js} +1 -1
- package/esm/index.js +198 -1
- package/esm/lmvz-button-group.entry.js +181 -0
- package/esm/lmvz-button_2.entry.js +195 -0
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +1 -1
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-menuitem.entry.js +1 -1
- package/esm/lmvz-modal.entry.js +1 -1
- package/esm/lmvz-radio.entry.js +1 -1
- package/esm/lmvz-snackbar.entry.js +81 -0
- package/esm/lmvz-toggle.entry.js +2 -2
- package/esm/loader.js +1 -1
- package/hydrate/index.js +106 -10
- package/hydrate/index.mjs +106 -10
- package/lmvz-components/index.esm.js +1 -1
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-01aeca60.entry.js +1 -1
- package/lmvz-components/p-0a37e0f2.entry.js +1 -0
- package/lmvz-components/p-14c3d837.entry.js +1 -0
- package/lmvz-components/{p-3df070b0.entry.js → p-24e63b0a.entry.js} +1 -1
- package/lmvz-components/p-25f045b2.entry.js +1 -0
- package/lmvz-components/{p-2044a9ac.entry.js → p-3da301a6.entry.js} +1 -1
- package/lmvz-components/{p-e23d0054.entry.js → p-40228d48.entry.js} +1 -1
- package/lmvz-components/{p-0dced359.entry.js → p-4da9073a.entry.js} +1 -1
- package/lmvz-components/p-6de9981f.entry.js +1 -0
- package/lmvz-components/{p-c01a6c70.entry.js → p-8dae99f1.entry.js} +1 -1
- package/lmvz-components/p-BOOwq5dE.js +1 -0
- package/lmvz-components/p-f5cece32.entry.js +1 -0
- package/manifest.json +288 -9
- package/package.json +5 -1
- package/types/api/ds.constants.d.ts +9 -1
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +21 -0
- package/types/components/lmvz-snackbar/public.d.ts +2 -0
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +32 -0
- package/types/components.d.ts +61 -1
- package/types/index.d.ts +1 -0
- package/cjs/lmvz-button_3.cjs.entry.js +0 -375
- package/components/p-Bb-kEOmU.js +0 -1
- package/components/p-vUYpZZoR.js +0 -1
- package/esm/lmvz-button_3.entry.js +0 -371
- package/lmvz-components/p-3c2adbb4.entry.js +0 -1
- package/lmvz-components/p-90f5a19d.entry.js +0 -1
- package/lmvz-components/p-Bmi89ll1.js +0 -1
- package/lmvz-components/p-acfeae08.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as o,r as e,h as r,H as t}from"./p-CKYszC64.js";import{a,c as
|
|
1
|
+
import{g as o,r as e,h as r,H as t}from"./p-CKYszC64.js";import{a,c as s}from"./p-BOOwq5dE.js";import{R as l,A as c}from"./p-CwX1wKkM.js";import{i as n}from"./p-CdDO7mQa.js";const i=class extends l{ariaValidationController=new c(this);beforeSlot;defaultSlot;afterSlot;get el(){return o(this)}get validationEl(){return this.el}type="active";size="default";constructor(o){super(),e(this,o),this.addController(this.ariaValidationController)}normalizeType(o){const e=a.includes(o)?o:"active";e!==this.type&&(this.type=e)}normalizeSize(o){const e=s.includes(o)?o:"default";e!==this.size&&(this.size=e)}componentWillLoad(){this.normalizeType(this.type),this.normalizeSize(this.size),super.componentWillLoad()}connectedCallback(){super.connectedCallback(),this.checkContent()}checkContent=function(o){let e;return()=>{void 0!==e&&window.clearTimeout(e),e=window.setTimeout((()=>{o(),e=void 0}),500)}}((()=>{n()&&([...this.beforeSlot?.assignedElements()??[],...this.defaultSlot?.assignedElements()??[],...this.afterSlot?.assignedElements()??[]].length||console.warn("LmvzChip has no assigned content. Please add content to the default slot or the before-text/after-text slots."))}));render(){return r(t,{key:"70654d69189e77f9356853a921366083b2c4b969",type:this.type,size:this.size},r("slot",{key:"c7e667b93166286fe68a812dd8eec82885e3fc5e",name:"before-text",ref:o=>this.beforeSlot=o,onSlotchange:()=>this.checkContent()}),r("span",{key:"af38dd0429b42685a114e26175ce42d09f5fdcc1",class:"content-overflow-wrapper"},r("slot",{key:"924158498d65b9ac7c912b6b1a479016176e0b78",ref:o=>this.defaultSlot=o,onSlotchange:()=>this.checkContent()})),r("slot",{key:"9ff0394dbfb2131fafe513d0f2d8ce26c7781f20",name:"after-text",ref:o=>this.afterSlot=o,onSlotchange:()=>this.checkContent()}))}static get watchers(){return{type:[{normalizeType:0}],size:[{normalizeSize:0}]}}};i.style=":host { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); padding-block: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); padding-inline: var(--lmvz-dimension-8-10, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); border: 1px solid var(--lmvz-chip-border-color); border-radius: var(--lmvz-semantic-border-radius-round, 999px); font: var(--lmvz-typography-body-xs-strong, 500 clamp(0.63rem, 0.61rem + 0.06vw, 0.69rem) / 1.5 Router); background-color: var(--lmvz-chip-background-color); color: var(--lmvz-chip-foreground-color); display: inline-flex; align-items: center; justify-content: center; gap: var(--lmvz-dimension-4-6, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); box-sizing: border-box; max-width: 100%; overflow: hidden; white-space: nowrap; > .content-overflow-wrapper { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } } :host([size='small']) { padding-block: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); padding-inline: var(--lmvz-dimension-6-8, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); font: var(--lmvz-typography-body-2xs-strong, 500 clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem) / 1.5 Router); gap: var(--lmvz-dimension-2-4, clamp(0.13rem, 0.09rem + 0.13vw, 0.25rem)); } ::slotted(*) { display: inline; white-space: inherit; } ::slotted(lmvz-icon) { --lmvz-component-color: var(--lmvz-chip-foreground-color); --lmvz-component-size: var(--lmvz-dimension-12-14, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } :host([size='small']) ::slotted(lmvz-icon) { --lmvz-component-size: var(--lmvz-dimension-10-12, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } :host([type='active']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-active-subtle, #c1e6fa); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } :host([type='warning']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-warning-subtle, #ffdf75); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-warning, #fffbf0); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-warning, #7a5e00); } :host([type='success']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-success-subtle, #a5dad3); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-success, #f1f9f8); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-success, #37867c); } :host([type='error']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-danger-subtle, #f7bfc2); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-danger, #fdf1f2); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } :host([type='neutral']) { --lmvz-chip-border-color: var(--lmvz-semantic-color-status-on-neutral-subtle, #d4d4d4); --lmvz-chip-background-color: var(--lmvz-semantic-color-status-neutral, #fcfcfc); --lmvz-chip-foreground-color: var(--lmvz-semantic-color-status-on-neutral, #545454); } ";export{i as lmvz_chip}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,r as t,c as i,h as o,H as s}from"./p-CKYszC64.js";import{t as a}from"./p-CcxjkCOx.js";import{R as l,A as r}from"./p-CwX1wKkM.js";import{i as n,g as d}from"./p-DOTK1OW3.js";import"./p-CGmJG63p.js";import"./p-CdDO7mQa.js";const c=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgNkwxMiAxMk0xMiAxMkwxOCAxOE0xMiAxMkw2IDE4TTEyIDEyTDE4IDYiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==");let h=0;const m=class extends l{get el(){return e(this)}inheritedAriaAttributes={};dialogEl;dialogStateObserver;headerSlot;buttonGroupEl;closeButtonEl;previouslyFocusedElement=null;wrappedDialogShowModal;pendingCloseReturnValue;dialogTitleId="lmvz-modal-title-"+h++;hasHeader=!1;open=!1;closeLabel="Schliessen";dialogClose;dialogCancel;get dialog(){return this.dialogEl}get validationEl(){return this.dialogEl??this.el}constructor(e){super(),t(this,e),this.dialogClose=i(this,"close",6),this.dialogCancel=i(this,"cancel",1),this.addController(new r(this,{validationTiming:"slot"}))}handleFormDialogSubmit(e){const t=e.submitter;("dialog"===e.target.method||"dialog"===t?.getAttribute("formmethod"))&&(e.preventDefault(),this.dialogEl?.close(t?.value??""))}connectedCallback(){this.inheritedAriaAttributes=n(this.el,["role"]),Object.defineProperty(this.el,"dialog",{configurable:!0,enumerable:!0,get:()=>(this.ensureDialogShowModalCapture(),this.dialogEl)}),super.connectedCallback()}componentDidLoad(){this.handleHeaderSlotChange(),this.observeDialogState(),this.syncDialogVisibility(),super.componentDidLoad()}disconnectedCallback(){this.dialogStateObserver?.disconnect(),super.disconnectedCallback()}componentDidRender(){this.open&&this.focusPrimaryAction(),super.componentDidRender()}handleOpenChange(){this.syncDialogVisibility()}get dialogAccessibilityAttributes(){const e={...this.inheritedAriaAttributes};if(delete e["aria-label"],delete e["aria-labelledby"],this.hasHeader)return e["aria-labelledby"]=this.dialogTitleId,e;const t=this.inheritedAriaAttributes["aria-labelledby"];if("string"==typeof t)return e["aria-labelledby"]=t,e;const i=this.inheritedAriaAttributes["aria-label"];return"string"==typeof i&&(e["aria-label"]=i),e}hasAssignedContent(e){return Boolean(e?.assignedNodes({flatten:!0}).some((e=>e.nodeType===Node.TEXT_NODE?Boolean(e.textContent?.trim()):e.nodeType===Node.ELEMENT_NODE)))}observeDialogState(){this.dialogEl&&"undefined"!=typeof MutationObserver&&(this.dialogStateObserver?.disconnect(),this.dialogStateObserver=new MutationObserver((()=>{this.dialogEl&&this.dialogEl.open!==this.open&&(this.open=!!this.dialogEl.open)})),this.dialogStateObserver.observe(this.dialogEl,{attributes:!0,attributeFilter:["open"]}))}capturePreviouslyFocusedElement(){const e=this.dialogEl,t=d(document);e&&t&&!e.contains(t)&&(this.previouslyFocusedElement=t)}ensureDialogShowModalCapture(){const e=this.dialogEl;if(!e||"function"!=typeof e.showModal)return;const t=e.showModal;if(t===this.wrappedDialogShowModal)return;const i=()=>(this.capturePreviouslyFocusedElement(),t.call(e));Object.defineProperty(e,"showModal",{configurable:!0,value:i}),this.wrappedDialogShowModal=i}syncDialogVisibility(){const e=this.dialogEl;if(e)return this.open?(e.open||(this.capturePreviouslyFocusedElement(),"function"==typeof e.showModal?e.showModal():e.setAttribute("open","")),void this.focusPrimaryAction()):void(e.open&&("function"==typeof e.close?e.close():(e.removeAttribute("open"),this.handleDialogClose())))}focusPrimaryAction(){const e=this.buttonGroupEl?.primaryEnabledAction??this.closeButtonEl;e&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{this.open&&e.focus()}))}restoreFocus(){this.previouslyFocusedElement?.isConnected&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}handleCloseButtonClick=()=>{if(!this.dialogEl)return;const e=this.dialogEl;if("function"==typeof e.requestClose)return this.pendingCloseReturnValue="close",void e.requestClose("close");"function"!=typeof this.dialogEl.close?this.handleDialogClose():this.dialogEl.close("close")};handleDialogCancel=e=>{if(e.preventDefault(),this.dialogCancel.emit().defaultPrevented)return void(this.pendingCloseReturnValue=void 0);const t=this.pendingCloseReturnValue;this.pendingCloseReturnValue=void 0,this.dialogEl?.close(t)};handleDialogClose=()=>{console.log("Dialog close handler called"),this.open&&(this.open=!1),this.restoreFocus(),this.dialogClose.emit()};handleHeaderSlotChange=()=>{this.hasHeader=this.hasAssignedContent(this.headerSlot)};render(){return o(s,{key:"1fbdbb1ab2d3ad423075465108d4ff807d07404e"},o("dialog",{key:"622dd60366ad594e16471cc8921c97d23af14ccb",ref:e=>this.dialogEl=e,onCancel:this.handleDialogCancel,onClose:this.handleDialogClose,...this.dialogAccessibilityAttributes},o("div",{key:"bcdfbefbd5f380e2bf946aed479d542a33927af1",class:"modal-shell"},o("header",{key:"dcd23467473d58b51bddaf613b3ac8c922eecdc6",class:{header:!0,"has-title":this.hasHeader}},o("div",{key:"b2aa21fda4a80d2ea003e6ec876c2b74df5d29fd",class:"title",id:this.dialogTitleId,hidden:!this.hasHeader},o("slot",{key:"b7238e5b24c0822a94087d4ff0567e6406542c73",name:"header",ref:e=>this.headerSlot=e,onSlotchange:this.handleHeaderSlotChange})),o("lmvz-button",{key:"5059671fb4d81c685becd3adb0be52dd92ec4dec",ref:e=>this.closeButtonEl=e,type:"button",class:"close-button","aria-label":this.closeLabel,onClick:this.handleCloseButtonClick,variant:"tertiary"},o("lmvz-icon",{key:"498447e60e0e33fc165f39cea35434080e869d3c",icon:c}))),o("div",{key:"39ecefb52d5990cb689b0e4f18a8b6fc501c840d",class:"body"},o("slot",{key:"b014d0633c28fb6b399f11f2323e102949548776"})),o("footer",{key:"201dae98bcf810f369d77b7e9f36d7cc71ed5db4",class:"actions",hidden:!this.buttonGroupEl?.hasActions},o("lmvz-button-group",{key:"e4559d383992e059f915670a0874cc3b9ef655a3",ref:e=>this.buttonGroupEl=e},o("slot",{key:"88b007e139d4a166a2ee886dcd0256293d5d33c9",name:"actions"}))))))}static get watchers(){return{open:[{handleOpenChange:0}]}}};m.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; } } :host { display: contents; --lmvz-modal-shell-gap: var(--lmvz-dimension-16-20, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); } dialog { border: none; padding: 0; background: transparent; height: 100vh; width: 100vw; contain: layout size; } dialog::backdrop { background: rgba(0, 0, 0, 0.19); background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.29); } .modal-shell { margin-inline: auto; top: 50%; transform: translateY(-50%); box-sizing: border-box; width: fit-content; max-height: 100%; max-width: clamp(20rem, 100%, 90vw); display: flex; flex-direction: column; gap: var(--lmvz-modal-shell-gap); padding: var(--lmvz-component-
|
|
1
|
+
import{g as e,r as t,c as i,h as o,H as s}from"./p-CKYszC64.js";import{t as a}from"./p-CcxjkCOx.js";import{R as l,A as r}from"./p-CwX1wKkM.js";import{i as n,g as d}from"./p-DOTK1OW3.js";import"./p-CGmJG63p.js";import"./p-CdDO7mQa.js";const c=a("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYgNkwxMiAxMk0xMiAxMkwxOCAxOE0xMiAxMkw2IDE4TTEyIDEyTDE4IDYiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMS43NSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+Cg==");let h=0;const m=class extends l{get el(){return e(this)}inheritedAriaAttributes={};dialogEl;dialogStateObserver;headerSlot;buttonGroupEl;closeButtonEl;previouslyFocusedElement=null;wrappedDialogShowModal;pendingCloseReturnValue;dialogTitleId="lmvz-modal-title-"+h++;hasHeader=!1;open=!1;closeLabel="Schliessen";dialogClose;dialogCancel;get dialog(){return this.dialogEl}get validationEl(){return this.dialogEl??this.el}constructor(e){super(),t(this,e),this.dialogClose=i(this,"close",6),this.dialogCancel=i(this,"cancel",1),this.addController(new r(this,{validationTiming:"slot"}))}handleFormDialogSubmit(e){const t=e.submitter;("dialog"===e.target.method||"dialog"===t?.getAttribute("formmethod"))&&(e.preventDefault(),this.dialogEl?.close(t?.value??""))}connectedCallback(){this.inheritedAriaAttributes=n(this.el,["role"]),Object.defineProperty(this.el,"dialog",{configurable:!0,enumerable:!0,get:()=>(this.ensureDialogShowModalCapture(),this.dialogEl)}),super.connectedCallback()}componentDidLoad(){this.handleHeaderSlotChange(),this.observeDialogState(),this.syncDialogVisibility(),super.componentDidLoad()}disconnectedCallback(){this.dialogStateObserver?.disconnect(),super.disconnectedCallback()}componentDidRender(){this.open&&this.focusPrimaryAction(),super.componentDidRender()}handleOpenChange(){this.syncDialogVisibility()}get dialogAccessibilityAttributes(){const e={...this.inheritedAriaAttributes};if(delete e["aria-label"],delete e["aria-labelledby"],this.hasHeader)return e["aria-labelledby"]=this.dialogTitleId,e;const t=this.inheritedAriaAttributes["aria-labelledby"];if("string"==typeof t)return e["aria-labelledby"]=t,e;const i=this.inheritedAriaAttributes["aria-label"];return"string"==typeof i&&(e["aria-label"]=i),e}hasAssignedContent(e){return Boolean(e?.assignedNodes({flatten:!0}).some((e=>e.nodeType===Node.TEXT_NODE?Boolean(e.textContent?.trim()):e.nodeType===Node.ELEMENT_NODE)))}observeDialogState(){this.dialogEl&&"undefined"!=typeof MutationObserver&&(this.dialogStateObserver?.disconnect(),this.dialogStateObserver=new MutationObserver((()=>{this.dialogEl&&this.dialogEl.open!==this.open&&(this.open=!!this.dialogEl.open)})),this.dialogStateObserver.observe(this.dialogEl,{attributes:!0,attributeFilter:["open"]}))}capturePreviouslyFocusedElement(){const e=this.dialogEl,t=d(document);e&&t&&!e.contains(t)&&(this.previouslyFocusedElement=t)}ensureDialogShowModalCapture(){const e=this.dialogEl;if(!e||"function"!=typeof e.showModal)return;const t=e.showModal;if(t===this.wrappedDialogShowModal)return;const i=()=>(this.capturePreviouslyFocusedElement(),t.call(e));Object.defineProperty(e,"showModal",{configurable:!0,value:i}),this.wrappedDialogShowModal=i}syncDialogVisibility(){const e=this.dialogEl;if(e)return this.open?(e.open||(this.capturePreviouslyFocusedElement(),"function"==typeof e.showModal?e.showModal():e.setAttribute("open","")),void this.focusPrimaryAction()):void(e.open&&("function"==typeof e.close?e.close():(e.removeAttribute("open"),this.handleDialogClose())))}focusPrimaryAction(){const e=this.buttonGroupEl?.primaryEnabledAction??this.closeButtonEl;e&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{this.open&&e.focus()}))}restoreFocus(){this.previouslyFocusedElement?.isConnected&&(this.previouslyFocusedElement.focus(),this.previouslyFocusedElement=null)}handleCloseButtonClick=()=>{if(!this.dialogEl)return;const e=this.dialogEl;if("function"==typeof e.requestClose)return this.pendingCloseReturnValue="close",void e.requestClose("close");"function"!=typeof this.dialogEl.close?this.handleDialogClose():this.dialogEl.close("close")};handleDialogCancel=e=>{if(e.preventDefault(),this.dialogCancel.emit().defaultPrevented)return void(this.pendingCloseReturnValue=void 0);const t=this.pendingCloseReturnValue;this.pendingCloseReturnValue=void 0,this.dialogEl?.close(t)};handleDialogClose=()=>{console.log("Dialog close handler called"),this.open&&(this.open=!1),this.restoreFocus(),this.dialogClose.emit()};handleHeaderSlotChange=()=>{this.hasHeader=this.hasAssignedContent(this.headerSlot)};render(){return o(s,{key:"1fbdbb1ab2d3ad423075465108d4ff807d07404e"},o("dialog",{key:"622dd60366ad594e16471cc8921c97d23af14ccb",ref:e=>this.dialogEl=e,onCancel:this.handleDialogCancel,onClose:this.handleDialogClose,...this.dialogAccessibilityAttributes},o("div",{key:"bcdfbefbd5f380e2bf946aed479d542a33927af1",class:"modal-shell"},o("header",{key:"dcd23467473d58b51bddaf613b3ac8c922eecdc6",class:{header:!0,"has-title":this.hasHeader}},o("div",{key:"b2aa21fda4a80d2ea003e6ec876c2b74df5d29fd",class:"title",id:this.dialogTitleId,hidden:!this.hasHeader},o("slot",{key:"b7238e5b24c0822a94087d4ff0567e6406542c73",name:"header",ref:e=>this.headerSlot=e,onSlotchange:this.handleHeaderSlotChange})),o("lmvz-button",{key:"5059671fb4d81c685becd3adb0be52dd92ec4dec",ref:e=>this.closeButtonEl=e,type:"button",class:"close-button","aria-label":this.closeLabel,onClick:this.handleCloseButtonClick,variant:"tertiary"},o("lmvz-icon",{key:"498447e60e0e33fc165f39cea35434080e869d3c",icon:c}))),o("div",{key:"39ecefb52d5990cb689b0e4f18a8b6fc501c840d",class:"body"},o("slot",{key:"b014d0633c28fb6b399f11f2323e102949548776"})),o("footer",{key:"201dae98bcf810f369d77b7e9f36d7cc71ed5db4",class:"actions",hidden:!this.buttonGroupEl?.hasActions},o("lmvz-button-group",{key:"e4559d383992e059f915670a0874cc3b9ef655a3",ref:e=>this.buttonGroupEl=e},o("slot",{key:"88b007e139d4a166a2ee886dcd0256293d5d33c9",name:"actions"}))))))}static get watchers(){return{open:[{handleOpenChange:0}]}}};m.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; } } :host { display: contents; --lmvz-modal-shell-gap: var(--lmvz-dimension-16-20, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); } dialog { border: none; padding: 0; background: transparent; height: 100vh; width: 100vw; contain: layout size; } dialog::backdrop { background: rgba(0, 0, 0, 0.19); background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.29); } .modal-shell { margin-inline: auto; top: 50%; transform: translateY(-50%); box-sizing: border-box; width: fit-content; max-height: 100%; max-width: clamp(20rem, 100%, 90vw); display: flex; flex-direction: column; gap: var(--lmvz-modal-shell-gap); 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); background: var(--lmvz-semantic-color-surface-primary, #ffffff); position: relative; .close-button { position: absolute; top: var(--lmvz-dimension-10-12, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); right: var(--lmvz-dimension-10-12, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } } .header { display: flex; align-items: flex-start; justify-content: flex-end; gap: var(--lmvz-modal-shell-gap); } .title { min-inline-size: 0; font: var(--lmvz-typography-heading-lg, 500 clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem) / 1.5 Router); } .has-title .title { flex: 1 1 auto; } .body { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); flex: 1; overflow: scroll; } ";export{m as lmvz_modal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as r,r as e,c as o,h as t,H as i}from"./p-CKYszC64.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import"./p-CdDO7mQa.js";function l(r){return r.el.shadowRoot?.querySelector("input")??r.el.querySelector("input")??null}class c{hosts=[];_focusedHost=null;_focusinHandler=r=>{this.hosts.some((e=>e.el.contains(r.target)))||this.clearFocused()};register(r){if(!this.hosts.includes(r)){const e=0===this.hosts.length;this.hosts.push(r),this.sortHosts(),e&&document.addEventListener("focusin",this._focusinHandler,!0)}}unregister(r){r===this._focusedHost&&(this._focusedHost=null),this.hosts=this.hosts.filter((e=>e!==r)),0===this.hosts.length&&document.removeEventListener("focusin",this._focusinHandler,!0)}get sortedEnabled(){return this.hosts.filter((r=>!r.disabled))}setFocused(r){this._focusedHost=r,this.updateTabindex(),r.focusInput()}clearFocused(){this._focusedHost=null,this.updateTabindex()}select(r){this._focusedHost=null;for(const e of this.hosts)e.checked=e===r;this.updateTabindex()}updateTabindex(){const r=this.sortedEnabled,e=this.hosts.find((r=>r.checked));let o;o=this._focusedHost&&r.includes(this._focusedHost)?this._focusedHost:e??r[0]??null;for(const r of this.hosts){const e=l(r);e&&(e.tabIndex=r===o?0:-1)}}sortHosts(){this.hosts.sort(((r,e)=>r.el.compareDocumentPosition(e.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}}class n{host;static registry=new Map;group=null;_groupKey=null;_scope=null;constructor(r){this.host=r}hostConnected(){const{group:r,key:e,scope:o}=n.acquireGroup(this.host);this._groupKey=e,this._scope=o,this.group=r,this.group.register(this.host),this.group.updateTabindex()}hostDidRender(){this.group?.updateTabindex()}hostDisconnected(){this.group&&(this.group.unregister(this.host),this.group.updateTabindex(),n.releaseGroup(this._groupKey,this._scope),this._groupKey=null,this._scope=null,this.group=null)}get sortedEnabled(){return this.group?.sortedEnabled??[]}select(r){this.group?.select(r)}setFocused(r){this.group?.setFocused(r)}clearFocused(){this.group?.clearFocused()}updateTabindex(){this.group?.updateTabindex()}static acquireGroup(r){const e=r.name;if(!e)return{group:new c,key:null,scope:null};const o=r.el.closest("form")??document,t=function(r,e){return e instanceof HTMLFormElement?(e.dataset.lmvzRadioGroupId||(e.dataset.lmvzRadioGroupId=String(Math.random())),`${r}::form::${e.dataset.lmvzRadioGroupId}`):`${r}::document`}(e,o);let i=n.registry.get(t);return i||(i={group:new c,refCount:0},n.registry.set(t,i)),i.refCount++,{group:i.group,key:t,scope:o}}static releaseGroup(r,e){if(!r)return;const o=n.registry.get(r);o&&(o.refCount--,o.refCount<=0&&(n.registry.delete(r),e instanceof HTMLFormElement&&e.removeAttribute("data-lmvz-radio-group-id")))}}let d=0;const h=class extends a{get el(){return r(this)}get validationEl(){return this.el}internals;nativeInput;radioId="lmvz-radio-"+d++;initialChecked=!1;radioGroupController;get helperId(){return this.helperText?`${this.radioId}-helper`:void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;error=!1;helperText;form;autofocus=!1;_handlingNativeChange=!1;_handlingFormReset=!1;handleCheckedChange(r,e){this.internals.setFormValue?.(r?this.value:null),r||!e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!1),!r||e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!0)}handleValueChange(r){this.checked&&this.internals.setFormValue?.(r)}handleLabelChange(r){r||console.warn("[lmvz-radio] label prop is required and must not be empty")}lmvzChange;lmvzActivation;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}constructor(r){super(),e(this,r),this.lmvzChange=o(this,"lmvzChange",7),this.lmvzActivation=o(this,"lmvzActivation",7),r.$hostElement$["s-ei"]?this.internals=r.$hostElement$["s-ei"]:(this.internals=r.$hostElement$.attachInternals(),r.$hostElement$["s-ei"]=this.internals),this.addController(new s(this,{reValidateOnPropChanges:!0})),this.radioGroupController=new n(this),this.addController(this.radioGroupController)}componentWillLoad(){this.initialChecked=this.checked,this.internals.setFormValue?.(this.checked?this.value:null),super.componentWillLoad()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this._handlingFormReset=!0;try{this.checked=this.initialChecked}finally{this._handlingFormReset=!1}}formStateRestoreCallback(r){if("string"==typeof r){this._handlingFormReset=!0;try{this.checked=r===this.value}finally{this._handlingFormReset=!1}}}handleChange=r=>{this._handlingNativeChange=!0;try{this.checked=r.target.checked,this.lmvzChange.emit(this.checked),this.radioGroupController.select(this),this.lmvzActivation.emit()}finally{this._handlingNativeChange=!1}};handleKeydown(r){const{key:e}=r;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(e))return;r.preventDefault();const o=this.radioGroupController.sortedEnabled;if(0===o.length)return;const t=o.indexOf(this);if(-1===t)return;let i;i="ArrowDown"===e||"ArrowRight"===e?(t+1)%o.length:"ArrowUp"===e||"ArrowLeft"===e?(t-1+o.length)%o.length:"Home"===e?0:o.length-1;const a=o[i];a&&this.radioGroupController.setFocused(a)}render(){return t(i,{key:"0226e313fcf4fe3c3cf343cfe0776cf71da169a6"},t("input",{key:"5bb1f733d2f29217bc7544d8fd24f6b21bedc654",type:"radio",id:this.radioId,name:this.name??void 0,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,autoFocus:this.autofocus,"aria-invalid":this.error?"true":void 0,"aria-describedby":this.helperId,ref:r=>this.nativeInput=r,onChange:this.handleChange}),t("span",{key:"ae18f49167d1a2e8e6ec4ceca435e69e3d79f593",class:"circle","aria-hidden":"true"},this.checked&&t("span",{key:"5dfb65105831a672f2a47952aff987cd45e9b178",class:"dot"})),t("span",{key:"df148ca52be7e580226d94ff9aef4e3cf5a6182c",class:"content"},t("label",{key:"e042c57755eadb64692ace49204dccb1ee03ed1c",htmlFor:this.radioId},this.label),t("span",{key:"a90b0bef927dddb39f9e6357adf888e0818a3c5a","aria-live":"polite",class:"helper-text",id:this.helperId},this.helperText)))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}}};h.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-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #e52a31); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.4 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }.sc-lmvz-radio-h:focus-within{outline:var(--lmvz-ds-outline, 1px solid #0e7ab4);outline-offset:var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem))}@media (forced-colors: active){.sc-lmvz-radio-h:focus-within{outline-color:Highlight;box-shadow:none}}";export{h as lmvz_radio}
|
|
1
|
+
import{g as r,r as e,c as o,h as t,H as i}from"./p-CKYszC64.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import"./p-CdDO7mQa.js";function l(r){return r.el.shadowRoot?.querySelector("input")??r.el.querySelector("input")??null}class c{hosts=[];_focusedHost=null;_focusinHandler=r=>{this.hosts.some((e=>e.el.contains(r.target)))||this.clearFocused()};register(r){if(!this.hosts.includes(r)){const e=0===this.hosts.length;this.hosts.push(r),this.sortHosts(),e&&document.addEventListener("focusin",this._focusinHandler,!0)}}unregister(r){r===this._focusedHost&&(this._focusedHost=null),this.hosts=this.hosts.filter((e=>e!==r)),0===this.hosts.length&&document.removeEventListener("focusin",this._focusinHandler,!0)}get sortedEnabled(){return this.hosts.filter((r=>!r.disabled))}setFocused(r){this._focusedHost=r,this.updateTabindex(),r.focusInput()}clearFocused(){this._focusedHost=null,this.updateTabindex()}select(r){this._focusedHost=null;for(const e of this.hosts)e.checked=e===r;this.updateTabindex()}updateTabindex(){const r=this.sortedEnabled,e=this.hosts.find((r=>r.checked));let o;o=this._focusedHost&&r.includes(this._focusedHost)?this._focusedHost:e??r[0]??null;for(const r of this.hosts){const e=l(r);e&&(e.tabIndex=r===o?0:-1)}}sortHosts(){this.hosts.sort(((r,e)=>r.el.compareDocumentPosition(e.el)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1))}}class n{host;static registry=new Map;group=null;_groupKey=null;_scope=null;constructor(r){this.host=r}hostConnected(){const{group:r,key:e,scope:o}=n.acquireGroup(this.host);this._groupKey=e,this._scope=o,this.group=r,this.group.register(this.host),this.group.updateTabindex()}hostDidRender(){this.group?.updateTabindex()}hostDisconnected(){this.group&&(this.group.unregister(this.host),this.group.updateTabindex(),n.releaseGroup(this._groupKey,this._scope),this._groupKey=null,this._scope=null,this.group=null)}get sortedEnabled(){return this.group?.sortedEnabled??[]}select(r){this.group?.select(r)}setFocused(r){this.group?.setFocused(r)}clearFocused(){this.group?.clearFocused()}updateTabindex(){this.group?.updateTabindex()}static acquireGroup(r){const e=r.name;if(!e)return{group:new c,key:null,scope:null};const o=r.el.closest("form")??document,t=function(r,e){return e instanceof HTMLFormElement?(e.dataset.lmvzRadioGroupId||(e.dataset.lmvzRadioGroupId=String(Math.random())),`${r}::form::${e.dataset.lmvzRadioGroupId}`):`${r}::document`}(e,o);let i=n.registry.get(t);return i||(i={group:new c,refCount:0},n.registry.set(t,i)),i.refCount++,{group:i.group,key:t,scope:o}}static releaseGroup(r,e){if(!r)return;const o=n.registry.get(r);o&&(o.refCount--,o.refCount<=0&&(n.registry.delete(r),e instanceof HTMLFormElement&&e.removeAttribute("data-lmvz-radio-group-id")))}}let d=0;const h=class extends a{get el(){return r(this)}get validationEl(){return this.el}internals;nativeInput;radioId="lmvz-radio-"+d++;initialChecked=!1;radioGroupController;get helperId(){return this.helperText?`${this.radioId}-helper`:void 0}label;checked=!1;value="on";name;disabled=!1;required=!1;error=!1;helperText;form;autofocus=!1;_handlingNativeChange=!1;_handlingFormReset=!1;handleCheckedChange(r,e){this.internals.setFormValue?.(r?this.value:null),r||!e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!1),!r||e||this._handlingNativeChange||this._handlingFormReset||this.lmvzChange.emit(!0)}handleValueChange(r){this.checked&&this.internals.setFormValue?.(r)}handleLabelChange(r){r||console.warn("[lmvz-radio] label prop is required and must not be empty")}lmvzChange;lmvzActivation;async focusInput(){this.nativeInput?.focus()}async checkValidity(){return this.internals?.checkValidity()??!0}async reportValidity(){return this.internals?.reportValidity()??!0}constructor(r){super(),e(this,r),this.lmvzChange=o(this,"lmvzChange",7),this.lmvzActivation=o(this,"lmvzActivation",7),r.$hostElement$["s-ei"]?this.internals=r.$hostElement$["s-ei"]:(this.internals=r.$hostElement$.attachInternals(),r.$hostElement$["s-ei"]=this.internals),this.addController(new s(this,{reValidateOnPropChanges:!0})),this.radioGroupController=new n(this),this.addController(this.radioGroupController)}componentWillLoad(){this.initialChecked=this.checked,this.internals.setFormValue?.(this.checked?this.value:null),super.componentWillLoad()}formAssociatedCallback(){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this._handlingFormReset=!0;try{this.checked=this.initialChecked}finally{this._handlingFormReset=!1}}formStateRestoreCallback(r){if("string"==typeof r){this._handlingFormReset=!0;try{this.checked=r===this.value}finally{this._handlingFormReset=!1}}}handleChange=r=>{this._handlingNativeChange=!0;try{this.checked=r.target.checked,this.lmvzChange.emit(this.checked),this.radioGroupController.select(this),this.lmvzActivation.emit()}finally{this._handlingNativeChange=!1}};handleKeydown(r){const{key:e}=r;if(!["ArrowDown","ArrowRight","ArrowUp","ArrowLeft","Home","End"].includes(e))return;r.preventDefault();const o=this.radioGroupController.sortedEnabled;if(0===o.length)return;const t=o.indexOf(this);if(-1===t)return;let i;i="ArrowDown"===e||"ArrowRight"===e?(t+1)%o.length:"ArrowUp"===e||"ArrowLeft"===e?(t-1+o.length)%o.length:"Home"===e?0:o.length-1;const a=o[i];a&&this.radioGroupController.setFocused(a)}render(){return t(i,{key:"0226e313fcf4fe3c3cf343cfe0776cf71da169a6"},t("input",{key:"5bb1f733d2f29217bc7544d8fd24f6b21bedc654",type:"radio",id:this.radioId,name:this.name??void 0,value:this.value,checked:this.checked,disabled:this.disabled,required:this.required,autoFocus:this.autofocus,"aria-invalid":this.error?"true":void 0,"aria-describedby":this.helperId,ref:r=>this.nativeInput=r,onChange:this.handleChange}),t("span",{key:"ae18f49167d1a2e8e6ec4ceca435e69e3d79f593",class:"circle","aria-hidden":"true"},this.checked&&t("span",{key:"5dfb65105831a672f2a47952aff987cd45e9b178",class:"dot"})),t("span",{key:"df148ca52be7e580226d94ff9aef4e3cf5a6182c",class:"content"},t("label",{key:"e042c57755eadb64692ace49204dccb1ee03ed1c",htmlFor:this.radioId},this.label),t("span",{key:"a90b0bef927dddb39f9e6357adf888e0818a3c5a","aria-live":"polite",class:"helper-text",id:this.helperId},this.helperText)))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],value:[{handleValueChange:0}],label:[{handleLabelChange:0}]}}};h.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-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #e52a31); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #7a7a7a); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-8-12, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.69rem, 0.67rem + 0.06vw, 0.75rem) / 1.5 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }.sc-lmvz-radio-h:focus-within{outline:var(--lmvz-ds-outline, 1px solid #0e7ab4);outline-offset:var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem))}@media (forced-colors: active){.sc-lmvz-radio-h:focus-within{outline-color:Highlight;box-shadow:none}}";export{h as lmvz_radio}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as n}from"./p-CKYszC64.js";import{a as i,i as s}from"./p-CdDO7mQa.js";import{a as r}from"./p-DOTK1OW3.js";const o=class{constructor(e){t(this,e)}actionsSlot;validationMessageCache=[];actionsStateObserver;get primaryEnabledAction(){return this.enabledButtons.find(l)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>h(t)&&a(t)&&!d(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(a)}get visibleButtons(){return this.assignedButtons.filter(h)}get enabledButtons(){return this.visibleButtons.filter((t=d,(...e)=>{const n=t(...e);return i(n)?n.then((t=>!t)):!n}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(l),e=this.visibleButtons.filter(m),n=[],i=this.visibleButtons.toReversed();if(1!==t.length&&n.push("LmvzModal actions slot must contain exactly one primary action."),e.length>1&&n.push(`LmvzModal actions slot must contain at most one secondary action (received ${e.length})`),t.length){const s=e[0];0!==i.indexOf(t[0])&&n.push("Primary action must be the last focusable element in the actions slot (i.e. rightmost button)."),s&&1!==i.indexOf(s)&&n.push("Secondary action must be the second-to-last focusable element in the actions slot (i.e. left of primary button).")}else e.length&&0!==i.indexOf(e[0])&&n.push("Secondary action must be the last focusable element in the actions slot when no primary action is present (i.e. rightmost button).");return n}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.length;for(let e=0;e<t;e++){const n=e===t-1?"primary":e===t-2?"secondary":"tertiary",i=this.visibleButtons.at(e);i&&(c(i)?i.getAttribute("variant")||i.setAttribute("variant",n):i.classList.add(n))}this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{r(t)&&t.focus()}))}checkActions(){if(!s())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return e(n,{key:"56b60821ecaa2301d13e78d621e873aa74cd170e"},e("slot",{key:"e6a1422950fa5b0026356b7788a607a690116186",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}};function a(t){return["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())}function c(t){return"LMVZ-BUTTON"===t?.tagName.toUpperCase()}function d(t){return t.hasAttribute("disabled")||!0===t.disabled}function h(t){return!t.hasAttribute("hidden")}function u(t){const e=t.getAttribute("variant")??t.variant;return"primary"===e||"secondary"===e||"tertiary"===e?e:"secondary"}function l(t){return"primary"===u(t)}function m(t){return"secondary"===u(t)}o.style=":host{display:flex;justify-content:flex-end;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);flex-wrap:wrap}::slotted([hidden]){display:none !important}";export{o as lmvz_button_group}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,r as t,c as r,h as o,H as m}from"./p-CKYszC64.js";import{R as a,A as i}from"./p-CwX1wKkM.js";import{E as l}from"./p-CN0JX9-m.js";import"./p-CdDO7mQa.js";const n=class extends a{get el(){return e(this)}get validationEl(){return this.el}validationSlot;get role(){return"menuitem"}get ti(){return 0}lmvzActivation;constructor(e){super(),t(this,e),this.lmvzActivation=r(this,"lmvzActivation",7),this.addController(new i(this,{validationTiming:"slot"})),this.addController(new l(this))}render(){return o(m,{key:"3a722fe1fbacabd99ac5a5bd23537a1ff383fb95"},o("slot",{key:"e475dd50bbd2f9f349edb61766a0b21c1fb1ae16",ref:e=>this.validationSlot=e}))}};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; } } .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.
|
|
1
|
+
import{g as e,r as t,c as r,h as o,H as m}from"./p-CKYszC64.js";import{R as a,A as i}from"./p-CwX1wKkM.js";import{E as l}from"./p-CN0JX9-m.js";import"./p-CdDO7mQa.js";const n=class extends a{get el(){return e(this)}get validationEl(){return this.el}validationSlot;get role(){return"menuitem"}get ti(){return 0}lmvzActivation;constructor(e){super(),t(this,e),this.lmvzActivation=r(this,"lmvzActivation",7),this.addController(new i(this,{validationTiming:"slot"})),this.addController(new l(this))}render(){return o(m,{key:"3a722fe1fbacabd99ac5a5bd23537a1ff383fb95"},o("slot",{key:"e475dd50bbd2f9f349edb61766a0b21c1fb1ae16",ref:e=>this.validationSlot=e}))}};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; } } .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.5 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, #000000); --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-active, #f6fbfe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); }";export{n as lmvz_menuitem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const s=["xs","sm","md","lg"],a=[...s,"xl"],e=["text","email","password","tel","url","search","number"],r=[...s,"inherit"],t=["thin","medium","bold"],l=["active","warning","success","error","neutral"],i=["default","small"];export{l as a,t as b,i as c,e as d,r as i,a as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,r as t,c as o,h as r,H as l}from"./p-CKYszC64.js";import{R as a,A as s}from"./p-CwX1wKkM.js";import{c as i}from"./p-DOTK1OW3.js";import"./p-CdDO7mQa.js";let c=0;const n=class extends a{get el(){return e(this)}get validationEl(){return this.el}internals;nativeInputElement;toggleId="lmvz-toggle-"+c++;lmvzChange;label;checked=!1;disabled=!1;required=!1;name;value="on";form;constructor(e){super(),t(this,e),this.lmvzChange=o(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 s(this))}formAssociatedCallback(e){this.internals.setFormValue?.(this.checked?this.value:null)}formResetCallback(){this.checked=!1}formStateRestoreCallback(e){this.checked=e===this.value,this.internals.setFormValue?.(this.checked?this.value:null)}handleCheckedChange(e){this.internals.setFormValue?.(e?this.value:null)}handleDisabledChange(e){e&&this.nativeInputElement&&this.nativeInputElement.blur()}async focusToggle(){this.nativeInputElement?.focus()}async blurToggle(){this.nativeInputElement?.blur()}async checkValidity(){return this.nativeInputElement?.checkValidity?.()??!1}async reportValidity(){return this.nativeInputElement?.reportValidity?.()??!1}async getInputElement(){return this.nativeInputElement||await new Promise((e=>i(this.el,e))),Promise.resolve(this.nativeInputElement)}handleChange=e=>{const t=e.target.checked;this.checked=t,this.lmvzChange.emit(t)};render(){return r(l,{key:"202842250b2c22f64b608e4d5a517a045e50a54c"},r("span",{key:"105869ad771c9146a6a31e767e51807bb7e0b565",class:"track"},r("input",{key:"8113919f2c474b61a2745a000fd4995f81b58c1e",type:"checkbox",role:"switch",id:this.toggleId,checked:this.checked,disabled:this.disabled,required:this.required,name:this.name,value:this.value,form:this.form,ref:e=>this.nativeInputElement=e,onChange:this.handleChange}),r("span",{key:"9d7201d14abdb987b20f52f21a314434051c9f84",class:"thumb","aria-hidden":"true"})),r("label",{key:"7291494dd6f440099e9cbd04b3cff03a338a0e93",htmlFor:this.toggleId},this.label))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}}};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; } } .sc-lmvz-toggle-h { display: inline-flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); padding-block: var(--lmvz-dimension-2-8, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-4-10, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); cursor: pointer; background-color: transparent; user-select: none; } .sc-lmvz-toggle-h:not([disabled]):hover { background-color: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } [checked].sc-lmvz-toggle-h { background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); } [disabled][checked].sc-lmvz-toggle-h { background-color: var(--lmvz-semantic-color-status-active, #f6fbfe); } [disabled].sc-lmvz-toggle-h { cursor: not-allowed; opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; } .track.sc-lmvz-toggle { position: relative; flex-shrink: 0; width: var(--lmvz-global-s32, 32px); height: var(--lmvz-global-s20, 20px); border-radius: var(--lmvz-semantic-border-radius-round, 999px); background-color: var(--lmvz-semantic-color-surface-input-primary, #ffffff); border: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-default, #e0e0e0); } .sc-lmvz-toggle-h:not([disabled]):hover .track.sc-lmvz-toggle { border-color: var(--lmvz-semantic-color-border-hover, #c7c7c7); } [checked].sc-lmvz-toggle-h .track.sc-lmvz-toggle { border-color: var(--lmvz-semantic-color-border-active, #0f8acc); } input.sc-lmvz-toggle { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: inherit; } .thumb.sc-lmvz-toggle { position: absolute; width: var(--lmvz-global-s13, 13px); height: var(--lmvz-global-s13, 13px); border-radius: 50%; background-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); top: 50%; transform: translateY(-50%); left: var(--lmvz-global-s4, 4px); transition: left 0.2s ease, background-color 0.2s ease; pointer-events: none; } [checked].sc-lmvz-toggle-h .thumb.sc-lmvz-toggle { left: calc(var(--lmvz-global-s4, 4px) + var(--lmvz-global-s11, 11px)); background-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); } label.sc-lmvz-toggle { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-semantic-color-on-surface-primary, #000000); cursor: pointer; }.sc-lmvz-toggle-h:focus-within{outline:var(--lmvz-ds-outline, 1px solid #0e7ab4);outline-offset:var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem))}@media (forced-colors: active){.sc-lmvz-toggle-h:focus-within{outline-color:Highlight;box-shadow:none}}";export{n as lmvz_toggle}
|
package/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-06-
|
|
2
|
+
"timestamp": "2026-06-09T08:16:24",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.5",
|
|
@@ -452,12 +452,16 @@
|
|
|
452
452
|
],
|
|
453
453
|
"states": [],
|
|
454
454
|
"dependents": [
|
|
455
|
-
"lmvz-modal"
|
|
455
|
+
"lmvz-modal",
|
|
456
|
+
"lmvz-snackbar"
|
|
456
457
|
],
|
|
457
458
|
"dependencies": [],
|
|
458
459
|
"dependencyGraph": {
|
|
459
460
|
"lmvz-modal": [
|
|
460
461
|
"lmvz-button"
|
|
462
|
+
],
|
|
463
|
+
"lmvz-snackbar": [
|
|
464
|
+
"lmvz-button"
|
|
461
465
|
]
|
|
462
466
|
}
|
|
463
467
|
},
|
|
@@ -1512,10 +1516,10 @@
|
|
|
1512
1516
|
},
|
|
1513
1517
|
{
|
|
1514
1518
|
"name": "weight",
|
|
1515
|
-
"type": "\"bold\" | \"
|
|
1519
|
+
"type": "\"bold\" | \"medium\" | \"thin\" | undefined",
|
|
1516
1520
|
"complexType": {
|
|
1517
1521
|
"original": "Icon.IconWeight",
|
|
1518
|
-
"resolved": "\"bold\" | \"
|
|
1522
|
+
"resolved": "\"bold\" | \"medium\" | \"thin\" | undefined",
|
|
1519
1523
|
"references": {
|
|
1520
1524
|
"Icon": {
|
|
1521
1525
|
"location": "import",
|
|
@@ -1541,10 +1545,6 @@
|
|
|
1541
1545
|
"value": "bold",
|
|
1542
1546
|
"type": "string"
|
|
1543
1547
|
},
|
|
1544
|
-
{
|
|
1545
|
-
"value": "filled",
|
|
1546
|
-
"type": "string"
|
|
1547
|
-
},
|
|
1548
1548
|
{
|
|
1549
1549
|
"value": "medium",
|
|
1550
1550
|
"type": "string"
|
|
@@ -1582,12 +1582,16 @@
|
|
|
1582
1582
|
"parts": [],
|
|
1583
1583
|
"states": [],
|
|
1584
1584
|
"dependents": [
|
|
1585
|
-
"lmvz-modal"
|
|
1585
|
+
"lmvz-modal",
|
|
1586
|
+
"lmvz-snackbar"
|
|
1586
1587
|
],
|
|
1587
1588
|
"dependencies": [],
|
|
1588
1589
|
"dependencyGraph": {
|
|
1589
1590
|
"lmvz-modal": [
|
|
1590
1591
|
"lmvz-icon"
|
|
1592
|
+
],
|
|
1593
|
+
"lmvz-snackbar": [
|
|
1594
|
+
"lmvz-icon"
|
|
1591
1595
|
]
|
|
1592
1596
|
}
|
|
1593
1597
|
},
|
|
@@ -6499,6 +6503,276 @@
|
|
|
6499
6503
|
"dependencies": [],
|
|
6500
6504
|
"dependencyGraph": {}
|
|
6501
6505
|
},
|
|
6506
|
+
{
|
|
6507
|
+
"filePath": "src/components/lmvz-snackbar/lmvz-snackbar.tsx",
|
|
6508
|
+
"encapsulation": "shadow",
|
|
6509
|
+
"tag": "lmvz-snackbar",
|
|
6510
|
+
"readme": "# lmvz-snackbar\n\nBrief notification displayed at the bottom center of the screen with optional auto-dismiss. Use snackbars to communicate non-blocking confirmations, warnings, or errors to the user.\n\n## Status Semantics\n\nThe snackbar's `status` prop controls both the visual appearance and accessibility semantics:\n\n| Status | ARIA Role | aria-live | Semantic Meaning |\n|--------|-----------|-----------|------------------|\n| `success` | `status` | `polite` | Non-critical confirmation or successful action. Announced when convenient. |\n| `warning` | `status` | `polite` | Non-blocking warning that the user should be aware of. Announced when convenient. |\n| `error` | `alert` | `assertive` | Critical error requiring immediate attention. Announced with interruption. |\n\n## Props\n\n| Prop | Type | Default | Description |\n|------|------|---------|-------------|\n| `status` | `'success' \\| 'warning' \\| 'error'` | `'success'` | Status variant controlling color, icon, and ARIA role/aria-live. |\n| `message` | `string` | `''` | Message text displayed in the snackbar. |\n| `duration` | `number \\| undefined` | `undefined` | Auto-dismiss timeout in milliseconds. `undefined` uses the per-status default (5000 ms for success/warning, 8000 ms for error). Set to `0` to disable auto-dismiss and require manual dismissal. |\n| `priority` | `'low' \\| 'normal' \\| 'high'` | `'normal'` | Priority level. When a snackbar is already visible, an incoming higher-priority call overrides it; lower-priority calls are silently swallowed with no queue. |\n| `showLeadingIcon` | `boolean` | `true` | Show the status-specific leading icon (info for success, warning triangle for warning, exclamation for error). |\n| `actionLabel` | `string \\| undefined` | `undefined` | Optional action button label. When set, an action button is rendered. |\n\n## Methods\n\n### `show() => Promise<void>`\n\nTriggers the entry animation. Used internally by the controller; may be called directly when using the snackbar as a declarative component.\n\n### `hide() => Promise<void>`\n\nTriggers the exit animation and waits for completion before resolving. The animation duration is 300 ms.\n\n## Events\n\n### `lmvzClose`\n\nFired when the snackbar is dismissed. The event detail includes the dismiss reason:\n\n```typescript\ntype lmvzClose = CustomEvent<{ reason: 'timeout' | 'manual' | 'action' | 'overridden' | 'swallowed' }>;\n```\n\n**Reason meanings:**\n- `'timeout'` — Auto-dismiss timer elapsed.\n- `'manual'` — Dismissed by calling the controller's `dismiss()` or the component's `hide()` method.\n- `'action'` — User clicked the action button.\n- `'overridden'` — A higher-priority snackbar call displaced this one.\n- `'swallowed'` — A lower-priority call was ignored because a higher-priority snackbar was already visible (controller only).\n\n## ARIA & Accessibility\n\n- The snackbar host element has a dynamic `role` that changes with the `status` prop: `role=\"status\"` for success/warning, `role=\"alert\"` for error.\n- `aria-live` is set to `\"polite\"` for success/warning (non-interrupting announcements) and `\"assertive\"` for error (interrupting announcements).\n- The leading status icon is marked `aria-hidden=\"true\"` because its information is redundant with the status prop and role semantics.\n- The optional action button uses its `actionLabel` text as its accessible name (via native button semantics).\n- The snackbar does not receive focus on appearance. Keyboard users can tab to the action button if present.\n\n## Motion & Reduced Motion\n\nThe snackbar slides up from the bottom with a fade-in on entry, and slides down with a fade-out on exit. Both animations use a duration of 200 ms.\n\nWhen `prefers-reduced-motion: reduce` is active, spatial motion (slide) is removed and replaced with a brief opacity-only fade (80 ms), providing a perceptual cue without distracting motion.\n\n## Color Contrast\n\nThe error variant (`status=\"error\"`) achieves a color contrast ratio of 4.5:1 (WCAG AA) between the error surface color and text. The success and warning variants also meet WCAG AA contrast requirements.\n\n## Examples\n\n### Imperative Usage with Controller\n\nMost applications use the snackbar via the imperative `SnackbarController` API. The controller manages a singleton host element and handles priority-based override logic automatically:\n\n```typescript\nimport { SnackbarController } from '@lmvz-ds/components';\n\n// Show a success notification\nSnackbarController.open({\n message: 'Your changes have been saved.',\n status: 'success',\n duration: 5000, // auto-dismiss after 5 seconds\n});\n\n// Show an error with an action\nconst handle = SnackbarController.open({\n message: 'Upload failed.',\n status: 'error',\n duration: 8000,\n actionLabel: 'Retry',\n onAction: () => {\n console.log('User clicked Retry');\n retryUpload();\n },\n});\n\n// Wait for dismissal (for any reason)\nhandle.closed.then(({ reason }) => {\n console.log(`Closed due to: ${reason}`);\n});\n\n// Manually dismiss\nhandle.dismiss();\n```\n\n### Priority Override\n\nThe controller enforces a single visible snackbar. Higher-priority calls override lower-priority ones:\n\n```typescript\n// High-priority error appears\nSnackbarController.open({\n message: 'Critical error',\n status: 'error',\n priority: 'high',\n});\n\n// Low-priority confirmation is silently swallowed\nconst handle = SnackbarController.open({\n message: 'Saved.',\n status: 'success',\n priority: 'low',\n});\n\nhandle.closed.then(({ reason }) => {\n console.log(reason); // 'swallowed'\n});\n```\n\n### Declarative Usage\n\nFor in-place rendering (e.g., in tests or special layouts), the snackbar can be declared in HTML and controlled via `show()`/`hide()` methods:\n\n```html\n<lmvz-snackbar\n message=\"Operation complete\"\n status=\"success\"\n show-leading-icon=\"true\"\n></lmvz-snackbar>\n```\n\n```typescript\nconst snackbar = document.querySelector('lmvz-snackbar');\nawait snackbar.show();\n// ... later\nawait snackbar.hide();\n```\n",
|
|
6511
|
+
"docs": "Brief notification displayed at the bottom center of the screen with optional auto-dismiss. Use snackbars to communicate non-blocking confirmations, warnings, or errors to the user.",
|
|
6512
|
+
"docsTags": [],
|
|
6513
|
+
"usage": {},
|
|
6514
|
+
"props": [
|
|
6515
|
+
{
|
|
6516
|
+
"name": "actionLabel",
|
|
6517
|
+
"type": "string | undefined",
|
|
6518
|
+
"complexType": {
|
|
6519
|
+
"original": "string",
|
|
6520
|
+
"resolved": "string | undefined",
|
|
6521
|
+
"references": {}
|
|
6522
|
+
},
|
|
6523
|
+
"mutable": true,
|
|
6524
|
+
"attr": "action-label",
|
|
6525
|
+
"reflectToAttr": false,
|
|
6526
|
+
"docs": "",
|
|
6527
|
+
"docsTags": [],
|
|
6528
|
+
"values": [
|
|
6529
|
+
{
|
|
6530
|
+
"type": "string"
|
|
6531
|
+
},
|
|
6532
|
+
{
|
|
6533
|
+
"type": "undefined"
|
|
6534
|
+
}
|
|
6535
|
+
],
|
|
6536
|
+
"optional": true,
|
|
6537
|
+
"required": false,
|
|
6538
|
+
"getter": false,
|
|
6539
|
+
"setter": false
|
|
6540
|
+
},
|
|
6541
|
+
{
|
|
6542
|
+
"name": "duration",
|
|
6543
|
+
"type": "number | undefined",
|
|
6544
|
+
"complexType": {
|
|
6545
|
+
"original": "number",
|
|
6546
|
+
"resolved": "number | undefined",
|
|
6547
|
+
"references": {}
|
|
6548
|
+
},
|
|
6549
|
+
"mutable": true,
|
|
6550
|
+
"attr": "duration",
|
|
6551
|
+
"reflectToAttr": false,
|
|
6552
|
+
"docs": "",
|
|
6553
|
+
"docsTags": [],
|
|
6554
|
+
"values": [
|
|
6555
|
+
{
|
|
6556
|
+
"type": "number"
|
|
6557
|
+
},
|
|
6558
|
+
{
|
|
6559
|
+
"type": "undefined"
|
|
6560
|
+
}
|
|
6561
|
+
],
|
|
6562
|
+
"optional": true,
|
|
6563
|
+
"required": false,
|
|
6564
|
+
"getter": false,
|
|
6565
|
+
"setter": false
|
|
6566
|
+
},
|
|
6567
|
+
{
|
|
6568
|
+
"name": "message",
|
|
6569
|
+
"type": "string",
|
|
6570
|
+
"complexType": {
|
|
6571
|
+
"original": "string",
|
|
6572
|
+
"resolved": "string",
|
|
6573
|
+
"references": {}
|
|
6574
|
+
},
|
|
6575
|
+
"mutable": true,
|
|
6576
|
+
"attr": "message",
|
|
6577
|
+
"reflectToAttr": false,
|
|
6578
|
+
"docs": "",
|
|
6579
|
+
"docsTags": [
|
|
6580
|
+
{
|
|
6581
|
+
"name": "default",
|
|
6582
|
+
"text": "''"
|
|
6583
|
+
}
|
|
6584
|
+
],
|
|
6585
|
+
"default": "''",
|
|
6586
|
+
"values": [
|
|
6587
|
+
{
|
|
6588
|
+
"type": "string"
|
|
6589
|
+
}
|
|
6590
|
+
],
|
|
6591
|
+
"optional": false,
|
|
6592
|
+
"required": false,
|
|
6593
|
+
"getter": false,
|
|
6594
|
+
"setter": false
|
|
6595
|
+
},
|
|
6596
|
+
{
|
|
6597
|
+
"name": "priority",
|
|
6598
|
+
"type": "\"high\" | \"low\" | \"normal\" | undefined",
|
|
6599
|
+
"complexType": {
|
|
6600
|
+
"original": "Snackbar.Priority",
|
|
6601
|
+
"resolved": "\"high\" | \"low\" | \"normal\" | undefined",
|
|
6602
|
+
"references": {
|
|
6603
|
+
"Snackbar": {
|
|
6604
|
+
"location": "import",
|
|
6605
|
+
"path": "../../api",
|
|
6606
|
+
"id": "src/api/index.d.ts::Snackbar",
|
|
6607
|
+
"referenceLocation": "Snackbar"
|
|
6608
|
+
}
|
|
6609
|
+
}
|
|
6610
|
+
},
|
|
6611
|
+
"mutable": true,
|
|
6612
|
+
"attr": "priority",
|
|
6613
|
+
"reflectToAttr": false,
|
|
6614
|
+
"docs": "",
|
|
6615
|
+
"docsTags": [
|
|
6616
|
+
{
|
|
6617
|
+
"name": "default",
|
|
6618
|
+
"text": "'normal'"
|
|
6619
|
+
}
|
|
6620
|
+
],
|
|
6621
|
+
"default": "'normal'",
|
|
6622
|
+
"values": [
|
|
6623
|
+
{
|
|
6624
|
+
"value": "high",
|
|
6625
|
+
"type": "string"
|
|
6626
|
+
},
|
|
6627
|
+
{
|
|
6628
|
+
"value": "low",
|
|
6629
|
+
"type": "string"
|
|
6630
|
+
},
|
|
6631
|
+
{
|
|
6632
|
+
"value": "normal",
|
|
6633
|
+
"type": "string"
|
|
6634
|
+
},
|
|
6635
|
+
{
|
|
6636
|
+
"type": "undefined"
|
|
6637
|
+
}
|
|
6638
|
+
],
|
|
6639
|
+
"optional": true,
|
|
6640
|
+
"required": false,
|
|
6641
|
+
"getter": false,
|
|
6642
|
+
"setter": false
|
|
6643
|
+
},
|
|
6644
|
+
{
|
|
6645
|
+
"name": "status",
|
|
6646
|
+
"type": "\"error\" | \"success\" | \"warning\"",
|
|
6647
|
+
"complexType": {
|
|
6648
|
+
"original": "Snackbar.Status",
|
|
6649
|
+
"resolved": "\"error\" | \"success\" | \"warning\"",
|
|
6650
|
+
"references": {
|
|
6651
|
+
"Snackbar": {
|
|
6652
|
+
"location": "import",
|
|
6653
|
+
"path": "../../api",
|
|
6654
|
+
"id": "src/api/index.d.ts::Snackbar",
|
|
6655
|
+
"referenceLocation": "Snackbar"
|
|
6656
|
+
}
|
|
6657
|
+
}
|
|
6658
|
+
},
|
|
6659
|
+
"mutable": true,
|
|
6660
|
+
"attr": "status",
|
|
6661
|
+
"reflectToAttr": true,
|
|
6662
|
+
"docs": "",
|
|
6663
|
+
"docsTags": [
|
|
6664
|
+
{
|
|
6665
|
+
"name": "default",
|
|
6666
|
+
"text": "'success'"
|
|
6667
|
+
}
|
|
6668
|
+
],
|
|
6669
|
+
"default": "'success'",
|
|
6670
|
+
"values": [
|
|
6671
|
+
{
|
|
6672
|
+
"value": "error",
|
|
6673
|
+
"type": "string"
|
|
6674
|
+
},
|
|
6675
|
+
{
|
|
6676
|
+
"value": "success",
|
|
6677
|
+
"type": "string"
|
|
6678
|
+
},
|
|
6679
|
+
{
|
|
6680
|
+
"value": "warning",
|
|
6681
|
+
"type": "string"
|
|
6682
|
+
}
|
|
6683
|
+
],
|
|
6684
|
+
"optional": false,
|
|
6685
|
+
"required": false,
|
|
6686
|
+
"getter": false,
|
|
6687
|
+
"setter": false
|
|
6688
|
+
}
|
|
6689
|
+
],
|
|
6690
|
+
"methods": [
|
|
6691
|
+
{
|
|
6692
|
+
"name": "hide",
|
|
6693
|
+
"returns": {
|
|
6694
|
+
"type": "Promise<void>",
|
|
6695
|
+
"docs": ""
|
|
6696
|
+
},
|
|
6697
|
+
"complexType": {
|
|
6698
|
+
"signature": "() => Promise<void>",
|
|
6699
|
+
"parameters": [],
|
|
6700
|
+
"references": {
|
|
6701
|
+
"Promise": {
|
|
6702
|
+
"location": "global",
|
|
6703
|
+
"id": "global::Promise"
|
|
6704
|
+
}
|
|
6705
|
+
},
|
|
6706
|
+
"return": "Promise<void>"
|
|
6707
|
+
},
|
|
6708
|
+
"signature": "hide() => Promise<void>",
|
|
6709
|
+
"parameters": [],
|
|
6710
|
+
"docs": "",
|
|
6711
|
+
"docsTags": []
|
|
6712
|
+
},
|
|
6713
|
+
{
|
|
6714
|
+
"name": "show",
|
|
6715
|
+
"returns": {
|
|
6716
|
+
"type": "Promise<void>",
|
|
6717
|
+
"docs": ""
|
|
6718
|
+
},
|
|
6719
|
+
"complexType": {
|
|
6720
|
+
"signature": "() => Promise<void>",
|
|
6721
|
+
"parameters": [],
|
|
6722
|
+
"references": {
|
|
6723
|
+
"Promise": {
|
|
6724
|
+
"location": "global",
|
|
6725
|
+
"id": "global::Promise"
|
|
6726
|
+
}
|
|
6727
|
+
},
|
|
6728
|
+
"return": "Promise<void>"
|
|
6729
|
+
},
|
|
6730
|
+
"signature": "show() => Promise<void>",
|
|
6731
|
+
"parameters": [],
|
|
6732
|
+
"docs": "",
|
|
6733
|
+
"docsTags": []
|
|
6734
|
+
}
|
|
6735
|
+
],
|
|
6736
|
+
"events": [
|
|
6737
|
+
{
|
|
6738
|
+
"event": "lmvzClose",
|
|
6739
|
+
"detail": "{ reason: \"timeout\" | \"manual\" | \"action\" | \"overridden\" | \"swallowed\"; }",
|
|
6740
|
+
"bubbles": true,
|
|
6741
|
+
"complexType": {
|
|
6742
|
+
"original": "{ reason: Snackbar.DismissReason }",
|
|
6743
|
+
"resolved": "{ reason: \"timeout\" | \"manual\" | \"action\" | \"overridden\" | \"swallowed\"; }",
|
|
6744
|
+
"references": {
|
|
6745
|
+
"Snackbar": {
|
|
6746
|
+
"location": "import",
|
|
6747
|
+
"path": "../../api",
|
|
6748
|
+
"id": "src/api/index.d.ts::Snackbar",
|
|
6749
|
+
"referenceLocation": "Snackbar"
|
|
6750
|
+
}
|
|
6751
|
+
}
|
|
6752
|
+
},
|
|
6753
|
+
"cancelable": false,
|
|
6754
|
+
"composed": true,
|
|
6755
|
+
"docs": "",
|
|
6756
|
+
"docsTags": []
|
|
6757
|
+
}
|
|
6758
|
+
],
|
|
6759
|
+
"listeners": [],
|
|
6760
|
+
"styles": [],
|
|
6761
|
+
"slots": [],
|
|
6762
|
+
"parts": [],
|
|
6763
|
+
"states": [],
|
|
6764
|
+
"dependents": [],
|
|
6765
|
+
"dependencies": [
|
|
6766
|
+
"lmvz-icon",
|
|
6767
|
+
"lmvz-button"
|
|
6768
|
+
],
|
|
6769
|
+
"dependencyGraph": {
|
|
6770
|
+
"lmvz-snackbar": [
|
|
6771
|
+
"lmvz-icon",
|
|
6772
|
+
"lmvz-button"
|
|
6773
|
+
]
|
|
6774
|
+
}
|
|
6775
|
+
},
|
|
6502
6776
|
{
|
|
6503
6777
|
"filePath": "src/components/lmvz-toggle/lmvz-toggle.tsx",
|
|
6504
6778
|
"encapsulation": "scoped",
|
|
@@ -6877,6 +7151,11 @@
|
|
|
6877
7151
|
"declaration": "any",
|
|
6878
7152
|
"docstring": "",
|
|
6879
7153
|
"path": "src/api/index.d.ts"
|
|
7154
|
+
},
|
|
7155
|
+
"src/api/index.d.ts::Snackbar": {
|
|
7156
|
+
"declaration": "any",
|
|
7157
|
+
"docstring": "",
|
|
7158
|
+
"path": "src/api/index.d.ts"
|
|
6880
7159
|
}
|
|
6881
7160
|
}
|
|
6882
7161
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmvz-ds/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.26.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The components of the design system",
|
|
7
7
|
"author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
|
|
@@ -72,6 +72,10 @@
|
|
|
72
72
|
"types": "./components/lmvz-select.d.ts",
|
|
73
73
|
"import": "./components/lmvz-select.js"
|
|
74
74
|
},
|
|
75
|
+
"./lmvz-snackbar": {
|
|
76
|
+
"types": "./components/lmvz-snackbar.d.ts",
|
|
77
|
+
"import": "./components/lmvz-snackbar.js"
|
|
78
|
+
},
|
|
75
79
|
"./lmvz-checkbox": {
|
|
76
80
|
"import": "./components/lmvz-checkbox.js",
|
|
77
81
|
"types": "./components/lmvz-checkbox.d.ts"
|
|
@@ -4,7 +4,7 @@ export declare const sizes: readonly ["xs", "sm", "md", "lg"];
|
|
|
4
4
|
export declare const textSizes: readonly ["xs", "sm", "md", "lg", "xl"];
|
|
5
5
|
export declare const inputTypes: readonly ["text", "email", "password", "tel", "url", "search", "number"];
|
|
6
6
|
export declare const iconSizes: readonly ["xs", "sm", "md", "lg", "inherit"];
|
|
7
|
-
export declare const iconWeights: readonly ["thin", "medium", "bold"
|
|
7
|
+
export declare const iconWeights: readonly ["thin", "medium", "bold"];
|
|
8
8
|
export declare const chipTypes: readonly ["active", "warning", "success", "error", "neutral"];
|
|
9
9
|
export declare const chipSizes: readonly ["default", "small"];
|
|
10
10
|
export declare namespace LmvzDS {
|
|
@@ -32,3 +32,11 @@ export declare namespace Input {
|
|
|
32
32
|
type Inputmode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
33
33
|
type Autocapitalize = 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';
|
|
34
34
|
}
|
|
35
|
+
export declare const snackbarStatuses: readonly ["success", "warning", "error"];
|
|
36
|
+
export declare const snackbarPriorities: readonly ["low", "normal", "high"];
|
|
37
|
+
export declare const snackbarDismissReasons: readonly ["timeout", "manual", "action", "overridden", "swallowed"];
|
|
38
|
+
export declare namespace Snackbar {
|
|
39
|
+
type Status = (typeof snackbarStatuses)[number];
|
|
40
|
+
type Priority = (typeof snackbarPriorities)[number];
|
|
41
|
+
type DismissReason = (typeof snackbarDismissReasons)[number];
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import type { Snackbar } from '../../api';
|
|
3
|
+
export declare class LmvzSnackbar {
|
|
4
|
+
el: HTMLElement;
|
|
5
|
+
animationClass: string;
|
|
6
|
+
status: Snackbar.Status;
|
|
7
|
+
protected onStatusChange(): void;
|
|
8
|
+
message: string;
|
|
9
|
+
duration?: number;
|
|
10
|
+
priority?: Snackbar.Priority;
|
|
11
|
+
actionLabel?: string;
|
|
12
|
+
lmvzClose: EventEmitter<{
|
|
13
|
+
reason: Snackbar.DismissReason;
|
|
14
|
+
}>;
|
|
15
|
+
connectedCallback(): void;
|
|
16
|
+
show(): Promise<void>;
|
|
17
|
+
hide(): Promise<void>;
|
|
18
|
+
private applyAriaLiveAttributes;
|
|
19
|
+
private readonly handleActionClick;
|
|
20
|
+
render(): any;
|
|
21
|
+
}
|