@lmvz-ds/components 0.35.0 → 0.35.2
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 +12 -0
- package/README.md +10 -0
- package/cjs/{async.util-BQ60l-WC.js → async.util-Dnl6c82X.js} +1 -0
- package/cjs/{list-keyboard-controller-Dm5S_l0D.js → directional-focus-controller-DBat-oF7.js} +13 -1
- package/cjs/element-activation-controller-BHqCUgQv.js +57 -0
- package/cjs/{element.util-Dbyc8yUG.js → element.util-CRS_YJ59.js} +10 -2
- package/cjs/lmvz-action-list.cjs.entry.js +9 -6
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +1 -1
- package/cjs/lmvz-button_2.cjs.entry.js +5 -6
- 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 +1 -1
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-header_2.cjs.entry.js +9 -6
- package/cjs/lmvz-input.cjs.entry.js +4 -4
- package/cjs/lmvz-menuitem.cjs.entry.js +3 -2
- package/cjs/lmvz-message.cjs.entry.js +42 -9
- package/cjs/lmvz-modal.cjs.entry.js +3 -3
- package/cjs/lmvz-popover.cjs.entry.js +48 -28
- package/cjs/lmvz-radio.cjs.entry.js +1 -1
- package/cjs/lmvz-select.cjs.entry.js +1 -1
- package/cjs/lmvz-tabs.cjs.entry.js +9 -6
- package/cjs/lmvz-toggle.cjs.entry.js +3 -3
- package/cjs/loader.cjs.js +1 -1
- package/{esm/reactive-controller-host-FBuCCcFC.js → cjs/reactive-controller-host-Bc6B_T45.js} +19 -1
- package/cjs/{stencil.util-DxdYjVoH.js → stencil.util-CBrPLd-F.js} +1 -1
- package/collection/components/lmvz-action/lmvz-action.js +1 -1
- package/collection/components/lmvz-action-list/lmvz-action-list.css +1 -0
- package/collection/components/lmvz-action-list/lmvz-action-list.js +26 -2
- package/collection/components/lmvz-button/lmvz-button.css +1 -0
- package/collection/components/lmvz-button/lmvz-button.js +1 -2
- package/collection/components/lmvz-card/lmvz-card.css +1 -0
- package/collection/components/lmvz-header/lmvz-header.js +26 -2
- package/collection/components/lmvz-input/lmvz-input.css +2 -1
- package/collection/components/lmvz-message/lmvz-message.js +42 -9
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-modal/test/testing.js +36 -0
- package/collection/components/lmvz-popover/lmvz-popover.js +55 -28
- package/collection/components/lmvz-tabs/lmvz-tabs.js +22 -2
- package/collection/utils/aria/{list-keyboard-controller.js → directional-focus-controller.js} +11 -0
- package/collection/utils/aria/element-activation-controller.js +27 -11
- package/collection/utils/data/{event.utilt.js → event.util.js} +8 -0
- package/collection/utils/element/element.util.js +9 -2
- package/collection/utils/stencil/reactive-controller-host.js +14 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-list.js +1 -1
- package/components/lmvz-action.js +1 -1
- package/components/lmvz-button-group.js +1 -1
- package/components/lmvz-button.js +1 -1
- package/components/lmvz-card.js +1 -1
- package/components/lmvz-checkbox.js +1 -1
- package/components/lmvz-chip.js +1 -1
- package/components/lmvz-header.js +1 -1
- package/components/lmvz-icon.js +1 -1
- package/components/lmvz-input.js +1 -1
- package/components/lmvz-link.js +1 -1
- package/components/lmvz-menuitem.js +1 -1
- package/components/lmvz-message.js +1 -1
- package/components/lmvz-modal.js +1 -1
- package/components/lmvz-popover.js +1 -1
- package/components/lmvz-radio.js +1 -1
- package/components/lmvz-select.js +1 -1
- package/components/lmvz-snackbar.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/p-B_rnXUwq.js +1 -0
- package/components/p-CgK6-SEe.js +1 -0
- package/components/{p-DbIm98qX.js → p-Chj7BuUZ.js} +1 -1
- package/components/p-CxLd309t.js +1 -0
- package/components/{p-D7S1WiEC.js → p-D5FL8n1q.js} +1 -1
- package/components/p-DLUsBYJH.js +1 -0
- package/components/p-DZj20TV1.js +1 -0
- package/components/p-bh9cItsP.js +1 -0
- package/components/p-zMWemcoB.js +1 -0
- package/esm/{async.util-D9nUtvTm.js → async.util-DZj20TV1.js} +1 -1
- package/esm/{list-keyboard-controller-tle6IRkv.js → directional-focus-controller-DgAdCZrG.js} +13 -2
- package/esm/element-activation-controller-7PNSl6io.js +54 -0
- package/esm/{element.util-B0eCxdyI.js → element.util-BFcYfHYq.js} +10 -3
- package/esm/lmvz-action-list.entry.js +8 -5
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +1 -1
- package/esm/lmvz-button_2.entry.js +5 -6
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +1 -1
- package/esm/lmvz-chip.entry.js +1 -1
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-header_2.entry.js +8 -5
- package/esm/lmvz-input.entry.js +4 -4
- package/esm/lmvz-menuitem.entry.js +3 -2
- package/esm/lmvz-message.entry.js +42 -9
- package/esm/lmvz-modal.entry.js +3 -3
- package/esm/lmvz-popover.entry.js +48 -28
- package/esm/lmvz-radio.entry.js +1 -1
- package/esm/lmvz-select.entry.js +1 -1
- package/esm/lmvz-tabs.entry.js +7 -4
- package/esm/lmvz-toggle.entry.js +3 -3
- package/esm/loader.js +1 -1
- package/{cjs/reactive-controller-host-B_lZtcA6.js → esm/reactive-controller-host-CICeIanv.js} +15 -3
- package/esm/{stencil.util-wGFRYLwZ.js → stencil.util-D2-5rsN3.js} +1 -1
- package/hydrate/index.js +216 -101
- package/hydrate/index.mjs +216 -101
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-c87e2281.entry.js → p-194a3af5.entry.js} +1 -1
- package/lmvz-components/{p-e0432f54.entry.js → p-24d13be6.entry.js} +1 -1
- package/lmvz-components/{p-c082390b.entry.js → p-46edf36f.entry.js} +1 -1
- package/lmvz-components/p-5ff55ba9.entry.js +1 -0
- package/lmvz-components/{p-c494bf8f.entry.js → p-888e04d7.entry.js} +1 -1
- package/lmvz-components/p-9dc420e2.entry.js +1 -0
- package/lmvz-components/p-BFcYfHYq.js +1 -0
- package/lmvz-components/p-BuEA0MWd.js +1 -0
- package/lmvz-components/p-CICeIanv.js +1 -0
- package/lmvz-components/p-DZj20TV1.js +1 -0
- package/lmvz-components/p-a887018d.entry.js +1 -0
- package/lmvz-components/p-aaa7691c.entry.js +1 -0
- package/lmvz-components/p-b6dd045b.entry.js +1 -0
- package/lmvz-components/p-bh9cItsP.js +1 -0
- package/lmvz-components/{p-4c68d21a.entry.js → p-c3e62aba.entry.js} +1 -1
- package/lmvz-components/{p-1d2c11ea.entry.js → p-d4154a65.entry.js} +1 -1
- package/lmvz-components/p-d45164a8.entry.js +1 -0
- package/lmvz-components/p-e4ce63b3.entry.js +1 -0
- package/lmvz-components/{p-cb75c951.entry.js → p-eb4c5a6f.entry.js} +1 -1
- package/lmvz-components/{p-8fb4c347.entry.js → p-eb62d4af.entry.js} +1 -1
- package/lmvz-components/{p-a4ef8e55.entry.js → p-f42b16e6.entry.js} +1 -1
- package/lmvz-components/p-fbf066d9.entry.js +1 -0
- package/lmvz-components/p-wlMjNjuv.js +1 -0
- package/manifest.json +79 -5
- package/package.json +1 -1
- package/types/api/ds.constants.d.ts +1 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +1 -0
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +3 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +2 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +1 -0
- package/types/components/lmvz-card/lmvz-card.d.ts +1 -0
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +1 -0
- package/types/components/lmvz-chip/lmvz-chip.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +4 -2
- package/types/components/lmvz-icon/lmvz-icon.d.ts +1 -0
- package/types/components/lmvz-input/lmvz-input.d.ts +1 -0
- package/types/components/lmvz-link/lmvz-link.d.ts +1 -0
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +1 -0
- package/types/components/lmvz-message/lmvz-message.d.ts +1 -0
- package/types/components/lmvz-message/public.d.ts +1 -0
- package/types/components/lmvz-modal/lmvz-modal.d.ts +1 -0
- package/types/components/lmvz-modal/test/testing.d.ts +10 -0
- package/types/components/lmvz-popover/lmvz-popover.d.ts +6 -3
- package/types/components/lmvz-radio/lmvz-radio.d.ts +1 -0
- package/types/components/lmvz-select/lmvz-select.d.ts +1 -0
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +1 -0
- package/types/components/lmvz-snackbar/public.d.ts +1 -0
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +1 -0
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +1 -0
- package/types/components/lmvz-tab/lmvz-tab.d.ts +1 -0
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +3 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +1 -0
- package/types/components.d.ts +18 -0
- package/types/index.d.ts +1 -0
- package/types/utils/aria/aria-validation-controller.d.ts +1 -0
- package/types/utils/aria/aria.constants.d.ts +1 -0
- package/types/utils/aria/{list-keyboard-controller.d.ts → directional-focus-controller.d.ts} +13 -2
- package/types/utils/aria/element-activation-controller.d.ts +11 -2
- package/types/utils/async/async.util.d.ts +1 -0
- package/types/utils/data/event.util.d.ts +6 -0
- package/types/utils/data/number.util.d.ts +1 -0
- package/types/utils/data/object.util.d.ts +1 -0
- package/types/utils/data/time.util.d.ts +1 -0
- package/types/utils/element/element.util.d.ts +2 -0
- package/types/utils/environment.d.ts +1 -0
- package/types/utils/icons/icons-registry.d.ts +1 -0
- package/types/utils/icons/icons.d.ts +1 -0
- package/types/utils/icons/icons.unit.d.ts +1 -0
- package/types/utils/icons/public.d.ts +1 -0
- package/types/utils/public.d.ts +1 -0
- package/types/utils/radio/radio-group-controller.d.ts +1 -0
- package/types/utils/stencil/assets.d.ts +1 -0
- package/types/utils/stencil/reactive-controller-host.d.ts +8 -1
- package/types/utils/stencil/stencil.util.d.ts +1 -0
- package/cjs/element-activation-controller-DC_6T0Rt.js +0 -31
- package/components/p-BhSTYZC6.js +0 -1
- package/components/p-CK3Ixl1K.js +0 -1
- package/components/p-CN0JX9-m.js +0 -1
- package/components/p-D-2gj6LP.js +0 -1
- package/components/p-D9nUtvTm.js +0 -1
- package/components/p-DAMVH-31.js +0 -1
- package/components/p-JtkmlmeY.js +0 -1
- package/esm/element-activation-controller-CN0JX9-m.js +0 -29
- package/lmvz-components/p-45c3ccb6.entry.js +0 -1
- package/lmvz-components/p-49e98627.entry.js +0 -1
- package/lmvz-components/p-50063516.entry.js +0 -1
- package/lmvz-components/p-76be3fc9.entry.js +0 -1
- package/lmvz-components/p-854f1c72.entry.js +0 -1
- package/lmvz-components/p-886e42c7.entry.js +0 -1
- package/lmvz-components/p-9f8fd077.entry.js +0 -1
- package/lmvz-components/p-B0eCxdyI.js +0 -1
- package/lmvz-components/p-BhSTYZC6.js +0 -1
- package/lmvz-components/p-CN0JX9-m.js +0 -1
- package/lmvz-components/p-D9nUtvTm.js +0 -1
- package/lmvz-components/p-DuLiExhX.js +0 -1
- package/lmvz-components/p-FBuCCcFC.js +0 -1
- package/lmvz-components/p-bc237ab7.entry.js +0 -1
- package/types/utils/data/event.utilt.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,c as l,h as t,d as a,t as s}from"./p-DGg7OzDl.js";import{A as r}from"./p-CFTmV4XZ.js";import{R as c}from"./p-DAMVH-31.js";let i=0;const o=e(class extends c{get el(){return this}get validationEl(){return this.el}selectId="lmvz-select-"+i++;nativeSelectEl;constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzChange=l(this,"lmvzChange",7),this.addController(new r(this))}lmvzChange;value;label;helperText;disabled=!1;required=!1;name;size="default";highlighted=!1;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:"f1180d4a5f1c30414b06c19314eb75630aa181f7","data-highlighted":this.highlighted+""},t("div",{key:"01088c7f3315faab1fb23c99cf8b30f7d59abfc6",class:e?"select-wrapper has-value":"select-wrapper"},t("label",{key:"34d23292b6b65fac000f822e1e2839e28b1bfee9",htmlFor:this.selectId,class:e?"floating-label":"assistive-label"},this.label,this.required&&e&&t("span",{key:"ba171cdd9b53f8fa7b7fcb2c39a0b4aa69940b95","aria-hidden":"true"}," *")),t("div",{key:"798a6ef187b4aaaa45ecb3d6f94c30e7facb7a38","aria-hidden":"true"},t("span",{key:"33ea2169d94f4f8cf6263ed0c3bd6a9e593207a4"},e?this.selectedLabel:this.label,this.required&&!e&&t("span",{key:"0ea2d4987587a1a42dfd037dcefeed3f1b3356ef","aria-hidden":"true"}," *")),t("span",{key:"7bd24b3921cc5cd261f563476a79d61a288d60bb"},t("svg",{key:"9887853724abada1fe36f7225db7903ee6e4040d",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{key:"b55a82230d46944ca3bd46f00f8c59b1a75ab8b8",d:"M20.3334 8.66663L12.0001 17L3.66675 8.66663",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})))),t("select",{key:"d786f49b4522baf4c803ed3046b3606f29d6dae1",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:"5ffa7ffb7cd79c28a8bd212cc4d123dceb77aad4",value:"",disabled:!0,selected:!0,hidden:!0}),t("slot",{key:"8a4141ead35cfd07c14d869715397d12ea8b64d7"}))),this.helperText&&t("div",{key:"dc5ccd28b0a903f6ed674d994e302caed1d9e9bb",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('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; 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-surface-input-primary, #ffffff); --lmvz-select-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --lmvz-select-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --lmvz-select-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-select-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-select-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-xs-font-size, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); } .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); border: var(--lmvz-select-border-width) solid var(--lmvz-select-border-color); box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; transition: border-color 0.15s ease; } .sc-lmvz-select-h:not([disabled] .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select, [highlighted]).sc-lmvz-select-h .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { border-color: var(--lmvz-select-border-color-hover); } [highlighted].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); border-color: var(--lmvz-semantic-color-border-active, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h label.floating-label.sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-select-text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sc-lmvz-select-h:not([highlighted]) .select-wrapper.has-value.sc-lmvz-select div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); height: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); flex-shrink: 0; } 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; } [size='small'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='small'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='small'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); height: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='large'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } [size='large'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { 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)); }"}},[774,"lmvz-select",{value:[1025],label:[1],helperText:[1,"helper-text"],disabled:[516],required:[516],name:[1],size:[513],highlighted:[516],selectedLabel:[32]},void 0,{value:[{handleValueChange:0}]}]),m=o,n=function(){"undefined"!=typeof customElements&&["lmvz-select"].forEach((e=>{"lmvz-select"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{m as LmvzSelect,n as defineCustomElement}
|
|
1
|
+
import{p as e,c as l,h as t,d as a,t as s}from"./p-DGg7OzDl.js";import{A as r}from"./p-CFTmV4XZ.js";import{R as c}from"./p-CgK6-SEe.js";let i=0;const o=e(class extends c{get el(){return this}get validationEl(){return this.el}selectId="lmvz-select-"+i++;nativeSelectEl;constructor(e){super(!1),!1!==e&&this.__registerHost(),this.lmvzChange=l(this,"lmvzChange",7),this.addController(new r(this))}lmvzChange;value;label;helperText;disabled=!1;required=!1;name;size="default";highlighted=!1;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:"f1180d4a5f1c30414b06c19314eb75630aa181f7","data-highlighted":this.highlighted+""},t("div",{key:"01088c7f3315faab1fb23c99cf8b30f7d59abfc6",class:e?"select-wrapper has-value":"select-wrapper"},t("label",{key:"34d23292b6b65fac000f822e1e2839e28b1bfee9",htmlFor:this.selectId,class:e?"floating-label":"assistive-label"},this.label,this.required&&e&&t("span",{key:"ba171cdd9b53f8fa7b7fcb2c39a0b4aa69940b95","aria-hidden":"true"}," *")),t("div",{key:"798a6ef187b4aaaa45ecb3d6f94c30e7facb7a38","aria-hidden":"true"},t("span",{key:"33ea2169d94f4f8cf6263ed0c3bd6a9e593207a4"},e?this.selectedLabel:this.label,this.required&&!e&&t("span",{key:"0ea2d4987587a1a42dfd037dcefeed3f1b3356ef","aria-hidden":"true"}," *")),t("span",{key:"7bd24b3921cc5cd261f563476a79d61a288d60bb"},t("svg",{key:"9887853724abada1fe36f7225db7903ee6e4040d",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},t("path",{key:"b55a82230d46944ca3bd46f00f8c59b1a75ab8b8",d:"M20.3334 8.66663L12.0001 17L3.66675 8.66663",stroke:"currentColor","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})))),t("select",{key:"d786f49b4522baf4c803ed3046b3606f29d6dae1",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:"5ffa7ffb7cd79c28a8bd212cc4d123dceb77aad4",value:"",disabled:!0,selected:!0,hidden:!0}),t("slot",{key:"8a4141ead35cfd07c14d869715397d12ea8b64d7"}))),this.helperText&&t("div",{key:"dc5ccd28b0a903f6ed674d994e302caed1d9e9bb",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('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; 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-surface-input-primary, #ffffff); --lmvz-select-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --lmvz-select-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --lmvz-select-border-width: var(--lmvz-semantic-border-width-default, 1px); --lmvz-select-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --lmvz-select-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-xs-font-size, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #a31419); } .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); border: var(--lmvz-select-border-width) solid var(--lmvz-select-border-color); box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; transition: border-color 0.15s ease; } .sc-lmvz-select-h:not([disabled] .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select, [highlighted]).sc-lmvz-select-h .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { border-color: var(--lmvz-select-border-color-hover); } [highlighted].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); border-color: var(--lmvz-semantic-color-border-active, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } [highlighted].sc-lmvz-select-h label.floating-label.sc-lmvz-select { background-color: var(--lmvz-semantic-color-status-active-alternate, #0f8acc); color: var(--lmvz-semantic-color-status-on-active-alternate, #ffffff); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font: var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--lmvz-select-text-color); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sc-lmvz-select-h:not([highlighted]) .select-wrapper.has-value.sc-lmvz-select div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { color: var(--lmvz-semantic-color-int-on-secondary-active, #000000); } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); height: var(--lmvz-component-icon-size-2xs, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); flex-shrink: 0; } 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; } [size='small'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='small'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='small'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { width: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); height: var(--lmvz-component-icon-size-4xs, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); } [size='large'].sc-lmvz-select-h { --lmvz-select-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --lmvz-select-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --lmvz-select-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-label-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='large'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } [size='large'].sc-lmvz-select-h div[aria-hidden].sc-lmvz-select svg.sc-lmvz-select { 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)); }"}},[774,"lmvz-select",{value:[1025],label:[1],helperText:[1,"helper-text"],disabled:[516],required:[516],name:[1],size:[513],highlighted:[516],selectedLabel:[32]},void 0,{value:[{handleValueChange:0}]}]),m=o,n=function(){"undefined"!=typeof customElements&&["lmvz-select"].forEach((e=>{"lmvz-select"===e&&(customElements.get(s(e))||customElements.define(s(e),o))}))};export{m as LmvzSelect,n as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,c as a,h as s,d as o,t as n}from"./p-DGg7OzDl.js";import{w as r,i}from"./p-DsT_K3_I.js";import{d as c}from"./p-
|
|
1
|
+
import{p as t,H as e,c as a,h as s,d as o,t as n}from"./p-DGg7OzDl.js";import{w as r,i}from"./p-DsT_K3_I.js";import{d as c}from"./p-B_rnXUwq.js";import{d as m}from"./p-Chj7BuUZ.js";const l={success:i,warning:r,error:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzM0Nl8zODApIj4KPHBhdGggZD0iTTEyIDUuMjVWMTMuMTI1TTIyLjUgMTJDMjIuNSAxNy43OTkgMTcuNzk5IDIyLjUgMTIgMjIuNUM2LjIwMTAxIDIyLjUgMS41IDE3Ljc5OSAxLjUgMTJDMS41IDYuMjAxMDEgNi4yMDEwMSAxLjUgMTIgMS41QzE3Ljc5OSAxLjUgMjIuNSA2LjIwMTAxIDIyLjUgMTJaTTEzLjEyNSAxNi44NzVDMTMuMTI1IDE3LjQ5NjMgMTIuNjIxMyAxOCAxMiAxOEMxMS4zNzg3IDE4IDEwLjg3NSAxNy40OTYzIDEwLjg3NSAxNi44NzVDMTAuODc1IDE2LjI1MzcgMTEuMzc4NyAxNS43NSAxMiAxNS43NUMxMi42MjEzIDE1Ljc1IDEzLjEyNSAxNi4yNTM3IDEzLjEyNSAxNi44NzVaIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEuNzUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzM0Nl8zODAiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg=="},u=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.lmvzClose=a(this,"lmvzClose",6)}get el(){return this}animationClass="";status="success";onStatusChange(){this.applyAriaLiveAttributes()}message="";duration;priority="normal";actionLabel;lmvzClose;connectedCallback(){"undefined"!=typeof document&&this.applyAriaLiveAttributes()}async show(){this.animationClass="",requestAnimationFrame((()=>{this.animationClass="entering"}))}async hide(){this.animationClass="leaving",await new Promise((t=>{const e=setTimeout(t,300),a=()=>{clearTimeout(e),this.el.removeEventListener("animationend",a),t()};this.el.addEventListener("animationend",a)}))}applyAriaLiveAttributes(){"error"===this.status?(this.el.setAttribute("role","alert"),this.el.setAttribute("aria-live","assertive")):(this.el.setAttribute("role","status"),this.el.setAttribute("aria-live","polite")),this.el.setAttribute("aria-atomic","true")}handleActionClick=()=>{this.lmvzClose.emit({reason:"action"}),this.el.dispatchEvent(new CustomEvent("lmvzAction",{bubbles:!1,composed:!1}))};render(){return s(o,{key:"6c2898f187ed9b456dd0c13294eb466270b116cb",class:this.animationClass},s("lmvz-icon",{key:"9b4903f0e2099d44f0ed1773ed23f948b894f603",icon:l[this.status],size:"md",weight:"bold"}),s("span",{key:"38163523ce0bba29dbe387e5c808ae9f5f2c2c55",class:"message"},this.message),this.actionLabel&&s("lmvz-button",{key:"bf5eb3e5075dec7c10f95a46db207ccb3181c88b",variant:"tertiary",scale:"small",onLmvzActivation:this.handleActionClick},this.actionLabel))}static get watchers(){return{status:[{onStatusChange:0}]}}static get style(){return":host{position:fixed;bottom:var(--lmvz-dimension-20-16, clamp(1rem, 0.94rem + 0.26vw, 1.25rem));left:50%;transform:translateX(-50%);z-index:2147483000;width:max-content;border:1px solid transparent;border-radius:var(--lmvz-semantic-border-radius-lg, 14px);padding:var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)) var(--lmvz-dimension-14-12, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem));display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--lmvz-dimension-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));pointer-events:auto;font:var(--lmvz-typography-body-md-strong, 500 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);--lmvz-component-color:var(--lmvz-semantic-color-status-on-success, #28625b);color:var(--lmvz-component-color)}:host([status='success']){background-color:var(--lmvz-semantic-color-status-success, #c2e6e1);border-color:var(--lmvz-semantic-color-status-on-success-subtle, #4eb6a9);--lmvz-component-color:var(--lmvz-semantic-color-status-on-success, #28625b)}:host([status='warning']){background-color:var(--lmvz-semantic-color-status-warning, #ffeeb8);border-color:var(--lmvz-semantic-color-status-on-warning-subtle, #e6b000);--lmvz-component-color:var(--lmvz-semantic-color-status-on-warning, #614a00)}:host([status='error']){background-color:var(--lmvz-semantic-color-status-danger, #fbdfe0);border-color:var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b);--lmvz-component-color:var(--lmvz-semantic-color-status-on-danger, #a31419)}lmvz-icon{flex-shrink:0}.message{white-space:nowrap}@keyframes snackbar-enter{from{transform:translateX(-50%) translateY(100%);opacity:0}to{transform:translateX(-50%) translateY(0);opacity:1}}@keyframes snackbar-leave{from{transform:translateX(-50%) translateY(0);opacity:1}to{transform:translateX(-50%) translateY(100%);opacity:0}}:host(.entering){animation:snackbar-enter 200ms cubic-bezier(0, 0, 0.2, 1) forwards}:host(.leaving){pointer-events:none;animation:snackbar-leave 200ms cubic-bezier(0.4, 0, 1, 1) forwards}@media (prefers-reduced-motion: reduce){:host(.entering){animation:none;transition:opacity 80ms ease;opacity:1}:host(.leaving){pointer-events:none;animation:none;transition:opacity 80ms ease;opacity:0}}"}},[513,"lmvz-snackbar",{status:[1537],message:[1025],duration:[1026],priority:[1025],actionLabel:[1025,"action-label"],animationClass:[32],show:[64],hide:[64]},void 0,{status:[{onStatusChange:0}]}]),d=u,v=function(){"undefined"!=typeof customElements&&["lmvz-snackbar","lmvz-button","lmvz-icon"].forEach((t=>{switch(t){case"lmvz-snackbar":customElements.get(n(t))||customElements.define(n(t),u);break;case"lmvz-button":customElements.get(n(t))||c();break;case"lmvz-icon":customElements.get(n(t))||m()}}))};export{d as LmvzSnackbar,v as defineCustomElement}
|
package/components/lmvz-tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,c as e,h as s,d as a,t as i}from"./p-DGg7OzDl.js";import{D as n}from"./p-
|
|
1
|
+
import{p as t,c as e,h as s,d as a,t as i}from"./p-DGg7OzDl.js";import{D as n}from"./p-DLUsBYJH.js";import{R as o}from"./p-CgK6-SEe.js";let l=0;const r=t(class extends o{get el(){return this}instanceId=++l;tabSlotEl;panelSlotEl;focusController=new n(this,{orientation:"horizontal",manageTabIndex:!0,enableHomeAndEnd:!0});value;orientation="horizontal";lmvzChange;resolvedValue;constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.lmvzChange=e(this,"lmvzChange",7),this.addController(this.focusController)}componentWillLoad(){super.componentWillLoad(),this.syncOrientation()}componentDidLoad(){this.tabSlotEl?.addEventListener("slotchange",this.handleTabSlotChange),this.panelSlotEl?.addEventListener("slotchange",this.handlePanelSlotChange),this.el.addEventListener("lmvzTabReady",this.handleTabReady),this.handleTabSlotChange(),super.componentDidLoad()}disconnectedCallback(){this.el.removeEventListener("lmvzTabReady",this.handleTabReady),super.disconnectedCallback()}handleValueChange(t){this.applySelection(t)}handleOrientationChange(){this.syncOrientation(),this.syncFocusTargets(),this.syncTabOrientation()}async initFocus(){this.focusController.initFocus()}async activateTab(t){const e=this.findTabByValue(t);e&&!this.isTabDisabled(e)&&this.selectTab(t)}async getTabElements(){return this.slottedTabs}async setTabPanelIds(t){const e=this.slottedTabs,s=this.slottedPanels;t.forEach((([t,a],i)=>{const n=e[i],o=s[i],l=t+"-btn";if(n){n.id=t;const e=n.shadowRoot?.querySelector("button");e&&(e.id=l,e.setAttribute("aria-controls",a))}o&&(o.id=a,o.setAttribute("aria-labelledby",l))}))}get slottedTabs(){return(this.tabSlotEl?.assignedElements({flatten:!1})??[]).filter((t=>"lmvz-tab"===t.tagName.toLowerCase()))}get slottedPanels(){return this.panelSlotEl?.assignedElements({flatten:!1})??[]}handleTabSlotChange=()=>{this.syncFocusTargets(),this.syncTabOrientation(),this.wireAriaIds(),this.applySelection(this.value),this.updateIconTabsAttr()};handlePanelSlotChange=()=>{this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value)};handleTabReady=()=>{this.syncFocusTargets(),this.wireAriaIds(),this.applySelection(this.resolvedValue??this.value),this.updateIconTabsAttr()};updateIconTabsAttr(){this.el.toggleAttribute("has-icon-tabs",this.slottedTabs.some((t=>t.hasAttribute("has-media"))))}syncFocusTargets(){const t=this.slottedTabs.map((t=>t.shadowRoot?.querySelector("button"))).filter((t=>!!t));this.focusController.updateElements(t)}syncOrientation(){this.removeController(this.focusController),this.focusController.hostDisconnected?.(),this.focusController=new n(this,{orientation:this.orientation,manageTabIndex:!0,enableHomeAndEnd:!0}),this.addController(this.focusController),this.el.isConnected&&this.focusController.hostConnected?.()}syncTabOrientation(){const t="vertical"===this.orientation;this.slottedTabs.forEach((e=>{e.toggleAttribute("vertical",t)}))}wireAriaIds(){const t=this.slottedPanels,e="lmvz-tabs-"+this.instanceId;this.slottedTabs.forEach(((s,a)=>{const i=s.id||`${e}-tab-${a}`;s.id=i;const n=t[a];if(!n)return;const o=n.id||`${e}-panel-${a}`;n.id=o;const l=s.shadowRoot?.querySelector("button");l&&(l.setAttribute("aria-controls",o),l.setAttribute("id",i+"-btn")),n.setAttribute("role",n.getAttribute("role")??"tabpanel"),n.setAttribute("aria-labelledby",i+"-btn")}))}applySelection(t){const e=this.slottedTabs;if(!e.length)return;let s=this.findTabByValue(t);if(s&&!this.isTabDisabled(s)||(s=this.findNearestEnabled(t)??void 0),!s)return;const a=s.getAttribute("value")??"";this.resolvedValue=a,this.value!==a&&(this.value=a),e.forEach((t=>{const e=t.getAttribute("value")===a;t.toggleAttribute("selected",e);const s=t.shadowRoot?.querySelector("button");s&&s.setAttribute("aria-selected",e+"")})),this.slottedPanels.forEach(((t,s)=>{const i=e[s],n=i?.getAttribute("value")===a;t.toggleAttribute("hidden",!n)}));const i=s.shadowRoot?.querySelector("button");i&&this.focusController.setCurrentElement(i)}isTabDisabled(t){return t.hasAttribute("disabled")||!!t.disabled}findTabByValue(t){return this.slottedTabs.find((e=>e.getAttribute("value")===t))}findNearestEnabled(t){const e=this.slottedTabs,s=e.findIndex((e=>e.getAttribute("value")===t));for(let t=1;t<e.length;t++){const a=e[(s+t)%e.length];if(a&&!this.isTabDisabled(a))return a;const i=e[(s-t+e.length)%e.length];if(i&&!this.isTabDisabled(i))return i}}selectTab(t){t!==this.resolvedValue&&(this.applySelection(t),this.lmvzChange.emit({value:t}))}handleTabClick=t=>{const e=t.target.closest("lmvz-tab");if(!e)return;const s=e.getAttribute("value");s&&!this.isTabDisabled(e)&&this.selectTab(s)};handleKeydown=t=>{if("Enter"!==t.key&&" "!==t.key)return;const e=this.el.ownerDocument.activeElement;if(!e)return;let s=null;for(const t of this.slottedTabs)if(t===e){s=t;break}if(!s)return;const a=s.getAttribute("value");a&&!this.isTabDisabled(s)&&(t.preventDefault(),this.selectTab(a))};render(){return s(a,{key:"98df29f336a3ea47efa6c76a773de28c5174c718",onClick:this.handleTabClick,onKeydown:this.handleKeydown},s("div",{key:"7e35ae180c4ebf2f5a82e0fad0977cd3c38ac659",role:"tablist","aria-orientation":this.orientation,class:"tablist"},s("slot",{key:"2520bc8b8988a60b37a067828ad237bf8dcfcc59",ref:t=>this.tabSlotEl=t})),s("div",{key:"bd4a954b6caca2d9f2eb588f58590821ec4af888",part:"panels-container",class:"panels-container"},s("slot",{key:"b4dffff530328e6e4c8d305895ef4dd2d5952757",name:"panels",ref:t=>this.panelSlotEl=t})))}static get watchers(){return{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}}static get style(){return" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { display: inline-block; } .tablist { display: inline-flex; flex-direction: row; background: var(--lmvz-semantic-color-int-secondary, #f0f0f0); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: auto hidden; scrollbar-width: none; } .tablist::-webkit-scrollbar { display: none; } :host([has-icon-tabs]) .tablist { gap: var(--lmvz-dimension-8-6, clamp(0.38rem, 0.34rem + 0.13vw, 0.5rem)); background: none; border-radius: 0; } :host([orientation='vertical']) .tablist { flex-direction: column; overflow: visible auto; } ::slotted([role='tabpanel']) { display: block; } ::slotted([role='tabpanel'][hidden]) { display: none; } "}},[769,"lmvz-tabs",{value:[1537],orientation:[1537],resolvedValue:[32],initFocus:[64],activateTab:[64],getTabElements:[64],setTabPanelIds:[64]},void 0,{value:[{handleValueChange:0}],orientation:[{handleOrientationChange:0}]}]),h=r,d=function(){"undefined"!=typeof customElements&&["lmvz-tabs"].forEach((t=>{"lmvz-tabs"===t&&(customElements.get(i(t))||customElements.define(i(t),r))}))};export{h as LmvzTabs,d as defineCustomElement}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,c as t,h as o,d as l,t as r}from"./p-DGg7OzDl.js";import{A as a}from"./p-CFTmV4XZ.js";import{R as s}from"./p-
|
|
1
|
+
import{p as e,c as t,h as o,d as l,t as r}from"./p-DGg7OzDl.js";import{A as a}from"./p-CFTmV4XZ.js";import{R as s}from"./p-CgK6-SEe.js";import{c as i}from"./p-bh9cItsP.js";let c=0;const n=e(class extends s{get el(){return 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(!1),!1!==e&&this.__registerHost(),this.lmvzChange=t(this,"lmvzChange",7),this.internals=this.attachInternals(),this.addController(new a(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 o(l,{key:"901f821ddae696fe877435bf20d08e4032cd61ee"},o("span",{key:"bbac0ab3e40e426be511cc49a0dcb2497edd7a9a",class:"track"},o("input",{key:"1df7a78df28517189f690c6d453193e30d97d9ea",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}),o("span",{key:"e975c1c280983355f2504fba15553a9f19e4216f",class:"thumb","aria-hidden":"true"})),o("label",{key:"09b3305a1d0d6c116310cf88d1f8a92f6856f57e",htmlFor:this.toggleId},this.label))}static get formAssociated(){return!0}static get watchers(){return{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}}static get style(){return"@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-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-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); padding-inline: var(--lmvz-dimension-10-4, 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, #a1a1a1); } [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}}"}},[578,"lmvz-toggle",{label:[1],checked:[1540],disabled:[516],required:[516],name:[1],value:[1],form:[1],focusToggle:[64],blurToggle:[64],checkValidity:[64],reportValidity:[64],getInputElement:[64]},void 0,{checked:[{handleCheckedChange:0}],disabled:[{handleDisabledChange:0}]}]),m=n,d=function(){"undefined"!=typeof customElements&&["lmvz-toggle"].forEach((e=>{"lmvz-toggle"===e&&(customElements.get(r(e))||customElements.define(r(e),n))}))};export{m as LmvzToggle,d as defineCustomElement}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as t,c as o,h as r,d as e,t as n}from"./p-DGg7OzDl.js";import{c as a}from"./p-BfTCfPZ1.js";import{A as l}from"./p-CFTmV4XZ.js";import{E as i}from"./p-CxLd309t.js";import{a as m,l as v}from"./p-zMWemcoB.js";import{R as d}from"./p-CgK6-SEe.js";const u=t(class extends d{get el(){return this}validationEl;inheritedAttributes={};formEl=null;formButtonEl=null;lmvzActivation;ti=0;resolveFocusableElement(){return this.validationEl}scale="default";variant;disabled=!1;type="button";form;formMethod;name;value;buttonRole;constructor(t){super(!1),!1!==t&&this.__registerHost(),this.__attachShadow(),this.lmvzActivation=o(this,"lmvzActivation",7),this.addController(new l(this)),this.addController(new i(this,{localHandler:this.handleClick.bind(this)}))}connectedCallback(){this.inheritedAttributes=m(this.el,["role"]),super.connectedCallback()}disconnectedCallback(){this.formButtonEl?.remove(),this.formButtonEl=null,this.formEl=null,super.disconnectedCallback()}renderHiddenButton(){if("submit"!==this.type)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);const t=v(this.form,this.el);if(!t)return this.formButtonEl?.remove(),this.formButtonEl=null,void(this.formEl=null);this.formEl=t;const o=this.formButtonEl??document.createElement("button");o.type="submit",o.style.display="none",o.disabled=this.disabled,o.name=this.name??"",o.value=this.value??"",this.formMethod?o.setAttribute("formmethod",this.formMethod):o.removeAttribute("formmethod"),this.formButtonEl!==o&&(this.formButtonEl=o),o.parentElement!==t&&(o.remove(),t.appendChild(o))}submitForm(t){this.formEl&&this.formButtonEl&&(t.preventDefault(),this.formButtonEl.click())}handleClick=t=>{"submit"===this.type&&this.submitForm(t)};render(){return this.renderHiddenButton(),r(e,{key:"eb0ee982f50f1e41b2aa72a0598d739b972cbcdf",role:"presentation"},r("button",{key:"aed6f44f51222e31d5f1deec952c0d81b8f1200a",ref:t=>this.validationEl=t,part:"button",role:this.buttonRole,disabled:this.disabled,type:this.type,class:a(this.variant??"secondary",{[this.scale??""]:!!this.scale,disabled:this.disabled}),...this.inheritedAttributes},r("slot",{key:"2aaedfde3c0d6ebf426f20a8489b22c2a356767e"})))}static get delegatesFocus(){return!0}static get style(){return" @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: inline-block; button { width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } "}},[785,"lmvz-button",{ti:[514,"tabindex"],scale:[513],variant:[513],disabled:[516],type:[1],form:[1],formMethod:[1,"form-method"],name:[1],value:[1],buttonRole:[1,"button-role"]}]);function s(){"undefined"!=typeof customElements&&["lmvz-button"].forEach((t=>{"lmvz-button"===t&&(customElements.get(n(t))||customElements.define(n(t),u))}))}export{u as L,s as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as t}from"./p-DGg7OzDl.js";const o="__LMVZ__",e=class extends t{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?.()))}};function n(t,e,n){if(!t)return void console.warn("component is undefined");const s=t;s[o]||(s[o]={}),s[o][e]=n}function s(t,e){return t?.[o]?.[e]}export{e as R,s as g,n as r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i,h as e,d as o,t as n}from"./p-DGg7OzDl.js";import{t,e as s,p as c}from"./p-DjvtQE7c.js";import{A as r}from"./p-CFTmV4XZ.js";import{R as a}from"./p-
|
|
1
|
+
import{p as i,h as e,d as o,t as n}from"./p-DGg7OzDl.js";import{t,e as s,p as c}from"./p-DjvtQE7c.js";import{A as r}from"./p-CFTmV4XZ.js";import{R as a}from"./p-CgK6-SEe.js";const l=Symbol.for("LMVZ__iconProviderRegistry"),m={};function v(){return"undefined"==typeof window?m:window[l]??(window[l]={})}function h(i,e){const o=v(),n=i;Object.prototype.hasOwnProperty.call(o,n)&&console.warn(`Icon provider with name "${n}" is already registered. Overwriting existing provider.`),o[n]=e}function d(i){const e=v();if(i)return e[i];const o=Object.keys(e);if(0===o.length)return;o.length>1&&console.warn(`Multiple icon providers registered (${o.join(", ")}). Using the first one: "${o[0]}".`);const n=o[0];return n?e[n]:void 0}function z(i,e){return{iconset:i,icon:e}}const p=i(class extends a{intersectionObserver;ariaValidationController=new r(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:o}=this;if(!i||!o)return;const n=c(i);this.iconData=n||await async function(i){const{icon:e,iconset:o}=i;return await(async()=>{const i=d(o);if(i)try{const n=await Promise.resolve(i.resolve(e));if(!n?.svg)return void console.warn(`Icon "${e}"${o?` from set "${o}"`:""} not found in provider. Using default icon.`);const s=t(n.svg);if(s)return s}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}"${o?` from set "${o}"`:""}. Using default icon.`)})()||(console.error(`Icon "${e}" not found${o?` in set "${o}"`:""}. Using default icon.`),s())}({icon:i,iconset:e})}componentDidRender(){this.validationEl=this.el.querySelector("svg"),this.ariaValidationController.revalidateAria(),super.componentDidRender()}render(){return e(o,{key:"4fba217d573d968951819f12af24d775c8ac62dc",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));--lmvz-icon-size:var(--lmvz-component-size, var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)));display:inline-block;line-height:0;svg{display:block;height:var(--lmvz-icon-size);width:auto}svg path{stroke:var(--lmvz-icon-color);fill:none}}[size='xs'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))}}[size='sm'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-sm, clamp(0.88rem, 0.84rem + 0.13vw, 1rem))}}[size='md'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-md, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))}}[size='lg'].sc-lmvz-icon-h{svg{--lmvz-icon-size:var(--lmvz-component-icon-size-lg, clamp(1.25rem, 1.19rem + 0.26vw, 1.5rem))}}[size='inherit'].sc-lmvz-icon-h{svg{height:var(--lmvz-component-size, inherit)}}[weight='light'].sc-lmvz-icon-h{svg path{stroke-width:1}}[weight='medium'].sc-lmvz-icon-h{svg path{stroke-width:1.5}}[weight='bold'].sc-lmvz-icon-h{svg path{stroke-width:2}}[weight='filled'].sc-lmvz-icon-h{svg path{stroke-width:2;fill:var(--lmvz-icon-color)}}"}},[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}]}]);function u(){"undefined"!=typeof customElements&&["lmvz-icon"].forEach((i=>{"lmvz-icon"===i&&(customElements.get(n(i))||customElements.define(n(i),p))}))}export{p as L,u as d,d as g,h as r,z as t}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{k as t}from"./p-zMWemcoB.js";import{r as i,g as s}from"./p-CgK6-SEe.js";class n{host;config;handlers=new AbortController;constructor(t,s){this.host=t,this.config=s,i(t.el,"isLmvzElementActivationHost",!0)}hostDidLoad(){o(this.host.el,this.handleActivation.bind(this),this.handlers.signal,this.config?.keys??["Enter"," "])}hostDisconnected(){this.handlers.abort()}handleActivation=t=>{this.host.lmvzActivation.emit(),this.config?.localHandler&&this.config.localHandler(t)}}function o(t,i,s,n=[" "]){t.addEventListener("keydown",function(t,i=[" "]){return s=>{i.includes(s.key)&&(s.preventDefault(),t(s))}}(i,n),{signal:s}),t.addEventListener("click",i,{signal:s})}function e(...[i,n,e,a]){s(i,"isLmvzElementActivationHost")?i.addEventListener("lmvzActivation",n,{signal:e}):t(i)?o(i,n,e,a):console.error("addElementActivationListener called with non-interactive element")}export{n as E,e as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,H as e,h as s,d as i,t as n}from"./p-DGg7OzDl.js";import{a,i as o}from"./p-BDonpCG8.js";import{v as r}from"./p-0ctLESas.js";import{b as c,c as d,d as h,e as l,f as u,i as m,h as f}from"./p-
|
|
1
|
+
import{p as t,H as e,h as s,d as i,t as n}from"./p-DGg7OzDl.js";import{a,i as o}from"./p-BDonpCG8.js";import{v as r}from"./p-0ctLESas.js";import{b as c,c as d,d as h,e as l,f as u,i as m,h as f}from"./p-zMWemcoB.js";const p=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}actionsSlot;validationMessageCache=[];actionsStateObserver;stacked=!1;get primaryEnabledAction(){return this.enabledButtons.find(c)??this.enabledButtons[0]}get hasActions(){return this.assignedButtons.some((t=>d(t)&&h(t)&&!l(t)))}componentDidLoad(){this.handleActionsSlotChange()}disconnectedCallback(){this.actionsStateObserver?.disconnect()}get assignedElements(){return this.actionsSlot?.assignedElements({flatten:!0})??[]}get assignedButtons(){return this.assignedElements.filter(h)}get visibleButtons(){return this.assignedButtons.filter(d)}get enabledButtons(){return this.visibleButtons.filter((t=l,(...e)=>{const s=t(...e);return a(s)?s.then((t=>!t)):!s}));var t}getActionValidationResult(){if(!this.visibleButtons.length)return[];const t=this.visibleButtons.filter(c),e=this.visibleButtons.filter(u),s=[],i=this.visibleButtons;if(1!==t.length&&s.push("LmvzButtonGroup actions slot should contain exactly one primary action."),e.length>1&&s.push(`LmvzButtonGroup actions slot should contain at most one secondary action (received ${e.length})`),t.length){const n=e[0];0!==i.indexOf(t[0])&&s.push("Primary action should be the first focusable element in the actions slot (i.e. first child of the actions slot)."),n&&1!==i.indexOf(n)&&s.push("Secondary action should be the second focusable element in the actions slot (i.e. immediately after the primary button).")}else e.length&&0!==i.indexOf(e[0])&&s.push("Secondary action should be the first focusable element in the actions slot when no primary action is present (i.e. first child of the actions slot).");return s}handleActionsSlotChange=()=>{this.observeActionState(),this.syncActionsState()};observeActionState(){"undefined"!=typeof MutationObserver&&(this.actionsStateObserver?.disconnect(),this.assignedButtons.length&&(this.actionsStateObserver=new MutationObserver((()=>{this.syncActionsState()})),this.assignedButtons.forEach((t=>{this.actionsStateObserver?.observe(t,{attributes:!0,attributeFilter:["disabled","hidden","variant"]})}))))}syncActionsState(){this.assignedElements.forEach((t=>{["LMVZ-BUTTON","BUTTON"].includes(t.tagName.toUpperCase())||(t.hasAttribute("hidden")||t.setAttribute("hidden",""),"true"!==t.getAttribute("aria-hidden")&&t.setAttribute("aria-hidden","true"))})),this.checkActions();const t=this.visibleButtons,e=t.length>0&&t.some((t=>c(t)||u(t)));t.length>0&&!e?this.el.setAttribute("data-only-tertiary",""):this.el.removeAttribute("data-only-tertiary"),this.visibleButtons.forEach(((t,e)=>{const s=r[e]??"tertiary";t&&(m(t)?t.getAttribute("variant")||t.variant||t.setAttribute("variant",s):t.classList.add(s))}));const s=this.visibleButtons.find((t=>"tertiary"===t.getAttribute("variant")));this.visibleButtons.forEach((t=>{t===s?t.setAttribute("data-first-tertiary",""):t.removeAttribute("data-first-tertiary")})),this.focusPrimaryAction()}focusPrimaryAction(){const t=this.primaryEnabledAction;t&&"undefined"!=typeof window&&window.requestAnimationFrame((()=>{f(t)&&t.focus()}))}checkActions(){if(!o())return;const t=this.getActionValidationResult();t.length&&t.forEach((t=>{this.validationMessageCache.includes(t)||(console.warn(t),this.validationMessageCache.push(t))}))}render(){return s(i,{key:"3e8ce38f7e83e201e47d31579f22161ff36247b1"},s("slot",{key:"bc953d19b333f51c5f5c5ba86be3a85d155a29d1",ref:t=>this.actionsSlot=t,onSlotchange:this.handleActionsSlotChange}))}static get style(){return":host{display:flex;flex-flow:row-reverse wrap;gap:var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem));font:var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router);}:host([stacked]){flex-flow:column nowrap;align-items:stretch;padding:0}:host([stacked]) ::slotted(*){display:block;width:100%}::slotted([hidden]){display:none !important}:host(:not([data-only-tertiary],[stacked])) ::slotted([data-first-tertiary]){margin-inline-end:auto}:host([data-only-tertiary]:not([stacked])){justify-content:flex-end}"}},[769,"lmvz-button-group",{stacked:[516],primaryEnabledAction:[2064],hasActions:[2052,"has-actions"]}]);function y(){"undefined"!=typeof customElements&&["lmvz-button-group"].forEach((t=>{"lmvz-button-group"===t&&(customElements.get(n(t))||customElements.define(n(t),p))}))}export{p as L,y as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./p-zMWemcoB.js";import{r as s,g as i}from"./p-CgK6-SEe.js";function e(t){return Boolean(i(t,"isFocusControllerHost"))}const n={orientation:"both",enableHomeAndEnd:!1,manageTabIndex:!1};class o{host;elements=[];currentElement;config;constructor(t,s={}){this.host=t,this.config={...n,...s}}hostConnected(){s(this.host.el,"isFocusControllerHost",!0),this.host.el.addEventListener("keydown",this.handleKeydown),this.syncManagedFocusTarget()}hostDisconnected(){this.host.el.removeEventListener("keydown",this.handleKeydown)}updateElements(t){const s=this.currentElement??this.getManagedActiveElement()??void 0;this.elements=t.filter((t=>"focus"in t&&1===t.nodeType)),this.syncManagedFocusTarget(s)}setCurrentElement(t){const s=this.currentElement;this.currentElement=null!=t&&"focus"in t&&1===t.nodeType?t:void 0,this.syncManagedFocusTarget(s)}async initFocus(){const t=this.selectManagedElement();t&&this.applyFocusTarget(t,!0)}handleKeydown=t=>{const s=this.getFocusIntent(t.key);if(!s)return;const i=this.getManagedActiveElement(),e=this.getTargetElement(i,s);e&&(t.preventDefault(),this.applyFocusTarget(e,!0))};getFocusIntent(t){return this.config.enableHomeAndEnd&&"Home"===t?"first":this.config.enableHomeAndEnd&&"End"===t?"last":"horizontal"===this.config.orientation?"ArrowRight"===t?"next":"ArrowLeft"===t?"previous":void 0:"vertical"===this.config.orientation?"ArrowDown"===t?"next":"ArrowUp"===t?"previous":void 0:"ArrowDown"===t||"ArrowRight"===t?"next":"ArrowUp"===t||"ArrowLeft"===t?"previous":void 0}getManagedActiveElement(){const s=t(this.host.el.ownerDocument??document);if(s instanceof HTMLElement){const t=this.elements.find((t=>function(t){return function(t){return"function"==typeof t.resolveFocusableElement}(t)?t.resolveFocusableElement()??t:t}(t)===s));if(t&&this.canMoveFocusTo(t))return t}if(this.currentElement&&this.elements.includes(this.currentElement)&&this.canMoveFocusTo(this.currentElement))return this.currentElement}getTargetElement(t,s){if(!this.elements.length)return;if("first"===s)return this.findFocusableFromIndex(-1,"next");if("last"===s)return this.findFocusableFromIndex(this.elements.length,"previous");const i=t?this.elements.indexOf(t):-1;return-1===i?"next"===s?this.findFocusableFromIndex(-1,"next"):this.findFocusableFromIndex(this.elements.length,"previous"):this.findFocusableFromIndex(i,s)}findFocusableFromIndex(t,s){if(!this.elements.length)return;const i="next"===s?1:-1;for(let s=1;s<=this.elements.length;s++){const e=this.elements[(t+i*s+this.elements.length)%this.elements.length];if(this.canMoveFocusTo(e))return e}}syncManagedFocusTarget(t){const s=this.selectManagedElement(t),i=s!==this.currentElement;this.currentElement=s,this.config.manageTabIndex&&this.updateTabIndexes(s),i&&s&&this.config.onFocusTargetChange?.(s)}selectManagedElement(t){const s=this.getManagedActiveElement();if(s)return s;if(this.currentElement&&this.elements.includes(this.currentElement)&&this.canMoveFocusTo(this.currentElement))return this.currentElement;if(t&&this.elements.includes(t))return this.findFocusableFromIndex(this.elements.indexOf(t),"next")??this.findFocusableFromIndex(-1,"next");return this.elements.find((t=>0===t.tabIndex&&this.canMoveFocusTo(t)))||this.findFocusableFromIndex(-1,"next")}updateTabIndexes(t){this.elements.forEach((s=>{s.tabIndex=t&&s===t?0:-1}))}applyFocusTarget(t,s){const i=t!==this.currentElement;this.currentElement=t,this.config.manageTabIndex&&this.updateTabIndexes(t),s&&t.focus(),i&&this.config.onFocusTargetChange?.(t)}canMoveFocusTo(t){return!!t&&(!t.hasAttribute("disabled")&&((!("disabled"in t)||!Boolean(t.disabled))&&("true"!==t.getAttribute("aria-disabled")&&(this.config.isFocusableElement?this.config.isFocusableElement(t):(this.config.manageTabIndex||t.tabIndex>=0)&&"true"!==t.getAttribute("aria-hidden")&&(t.checkVisibility?.()??!0)&&null!==t.offsetParent))))}}export{o as D,e as i}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=()=>new Promise((e=>setTimeout((()=>e())))),t=async()=>{await e(),await new Promise((e=>requestAnimationFrame((()=>e()))))},n=e=>"function"==typeof __zone_symbol__requestAnimationFrame?__zone_symbol__requestAnimationFrame(e):"function"==typeof requestAnimationFrame?requestAnimationFrame(e):setTimeout(e);export{t as a,n as r,e as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o}from"./p-DZj20TV1.js";const r=(r,p)=>{s(r)?r.componentOnReady().then((o=>p(o))):o((()=>p(r)))},s=o=>void 0!==o.componentOnReady;export{r as c}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=["role","aria-activedescendant","aria-atomic","aria-autocomplete","aria-braillelabel","aria-brailleroledescription","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colindextext","aria-colspan","aria-controls","aria-current","aria-describedby","aria-description","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowindextext","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext"];function e(a){return["LMVZ-BUTTON","BUTTON"].includes(a.tagName.toUpperCase())}function r(a){return"LMVZ-BUTTON"===a?.tagName.toUpperCase()}function i(a){return a.hasAttribute("disabled")||!0===a.disabled}function n(a){return!a.hasAttribute("hidden")}function t(a){const e=a.getAttribute("variant")??a.variant;return"primary"===e||"secondary"===e||"tertiary"===e?e:"secondary"}function o(a){return"primary"===t(a)}function l(a){return"secondary"===t(a)}const s=(e,r)=>{let i=a;return r&&r.length>0&&(i=i.filter((a=>!r.includes(a)))),((a,e=[])=>{const r={};return e.forEach((e=>{a.hasAttribute(e)&&(null!==a.getAttribute(e)&&(r[e]=a.getAttribute(e)),a.removeAttribute(e))})),r})(e,i)};function c(a=document){let e=a.activeElement;if(!e)return null;for(;e?.shadowRoot;){const a=e.shadowRoot.activeElement;if(!a)break;e=a}return e}function u(a,e){if(!a)return;if(e(a))return a;const r=Array.from(a.shadowRoot?a.shadowRoot.children:a.children);for(const a of r){const r=u(a,e);if(r)return r}}function d(a){return!!a&&a instanceof HTMLElement&&a.tabIndex>=0&&!a.hasAttribute("disabled")&&"true"!==a.getAttribute("aria-hidden")&&a.checkVisibility()&&null!==a.offsetParent}function f(a,e){if(a instanceof HTMLFormElement)return a;if("string"==typeof a){const e=document.getElementById(a);return e?e instanceof HTMLFormElement?e:(console.warn(`No Form found with selector: "#${a}". Verify that the element with id exists and is actually a <form> element.`,e),null):(console.warn(`No Form found with selector: "#${a}". Verify that the id is correct and the form is rendered in the DOM.`,e),null)}return void 0!==a?(console.warn('The provided "form" element is invalid. Verify that the form is a HTMLFormElement and rendered in the DOM.',e),null):e.closest("form")}function m(a){const e=a.tagName.toLowerCase();if(["button","lmvz-button","input","lmvz-input","select","lmvz-select","textarea"].includes(e))return!0;if(["a","lmvz-link"].includes(e)&&a.hasAttribute("href"))return!0;if(a.hasAttribute("tabindex")){const e=parseInt(a.getAttribute("tabindex")??"-1");return(isNaN(e)||e<0)&&console.warn("Interactive element is not keyboard accessible due to negative tabindex!",a),!0}const r=a.getAttribute("role");return!(!r||!["button","link","menuitem","option","combobox","listbox","checkbox","radio","switch","tab"].includes(r))}function b(a){return a instanceof HTMLElement}export{s as a,o as b,n as c,e as d,i as e,l as f,c as g,d as h,r as i,b as j,m as k,f as l,u as w}
|
package/esm/{list-keyboard-controller-tle6IRkv.js → directional-focus-controller-DgAdCZrG.js}
RENAMED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { g as getDeepActiveElement } from './element.util-
|
|
1
|
+
import { g as getDeepActiveElement } from './element.util-BFcYfHYq.js';
|
|
2
|
+
import { r as registerLmvzComponentMetaInfo, g as getLmvzComponentMetaInfo } from './reactive-controller-host-CICeIanv.js';
|
|
2
3
|
|
|
4
|
+
function isFocusControllerHost(el) {
|
|
5
|
+
return Boolean(getLmvzComponentMetaInfo(el, 'isFocusControllerHost'));
|
|
6
|
+
}
|
|
3
7
|
const defaultConfig = {
|
|
4
8
|
orientation: 'both',
|
|
5
9
|
enableHomeAndEnd: false,
|
|
@@ -18,6 +22,7 @@ class DirectionalFocusController {
|
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
hostConnected() {
|
|
25
|
+
registerLmvzComponentMetaInfo(this.host.el, 'isFocusControllerHost', true);
|
|
21
26
|
this.host.el.addEventListener('keydown', this.handleKeydown);
|
|
22
27
|
this.syncManagedFocusTarget();
|
|
23
28
|
}
|
|
@@ -34,6 +39,12 @@ class DirectionalFocusController {
|
|
|
34
39
|
this.currentElement = element !== null && element !== undefined && 'focus' in element && element.nodeType === 1 ? element : undefined;
|
|
35
40
|
this.syncManagedFocusTarget(previousElement);
|
|
36
41
|
}
|
|
42
|
+
async initFocus() {
|
|
43
|
+
const element = this.selectManagedElement();
|
|
44
|
+
if (!element)
|
|
45
|
+
return;
|
|
46
|
+
this.applyFocusTarget(element, true);
|
|
47
|
+
}
|
|
37
48
|
handleKeydown = (event) => {
|
|
38
49
|
const intent = this.getFocusIntent(event.key);
|
|
39
50
|
if (!intent)
|
|
@@ -173,4 +184,4 @@ function resolveElement(el) {
|
|
|
173
184
|
return isDirectionalFocusReceiver(el) ? (el.resolveFocusableElement() ?? el) : el;
|
|
174
185
|
}
|
|
175
186
|
|
|
176
|
-
export { DirectionalFocusController as D };
|
|
187
|
+
export { DirectionalFocusController as D, isFocusControllerHost as i };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { b as isInteractiveElement } from './element.util-BFcYfHYq.js';
|
|
2
|
+
import { r as registerLmvzComponentMetaInfo, g as getLmvzComponentMetaInfo } from './reactive-controller-host-CICeIanv.js';
|
|
3
|
+
|
|
4
|
+
function filterKeysAndCallback(callback, keys = [' ']) {
|
|
5
|
+
return (event) => {
|
|
6
|
+
if (!keys.includes(event.key))
|
|
7
|
+
return;
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
callback(event);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class ElementActivationController {
|
|
14
|
+
host;
|
|
15
|
+
config;
|
|
16
|
+
handlers = new AbortController();
|
|
17
|
+
constructor(host, config) {
|
|
18
|
+
this.host = host;
|
|
19
|
+
this.config = config;
|
|
20
|
+
registerLmvzComponentMetaInfo(host.el, 'isLmvzElementActivationHost', true);
|
|
21
|
+
}
|
|
22
|
+
hostDidLoad() {
|
|
23
|
+
bindHandlers(this.host.el, this.handleActivation.bind(this), this.handlers.signal, this.config?.keys ?? ['Enter', ' ']);
|
|
24
|
+
}
|
|
25
|
+
hostDisconnected() {
|
|
26
|
+
this.handlers.abort();
|
|
27
|
+
}
|
|
28
|
+
handleActivation = (event) => {
|
|
29
|
+
this.host.lmvzActivation.emit();
|
|
30
|
+
if (this.config?.localHandler) {
|
|
31
|
+
this.config.localHandler(event);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function bindHandlers(target, handler, abortSignal, keys = [' ']) {
|
|
36
|
+
target.addEventListener('keydown', filterKeysAndCallback(handler, keys), { signal: abortSignal });
|
|
37
|
+
target.addEventListener('click', handler, { signal: abortSignal });
|
|
38
|
+
}
|
|
39
|
+
function isLmvzElementActivationHost(el) {
|
|
40
|
+
return getLmvzComponentMetaInfo(el, 'isLmvzElementActivationHost');
|
|
41
|
+
}
|
|
42
|
+
function addElementActivationListener(...[target, handler, abortSignal, keys]) {
|
|
43
|
+
if (isLmvzElementActivationHost(target)) {
|
|
44
|
+
target.addEventListener('lmvzActivation', handler, { signal: abortSignal });
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (!isInteractiveElement(target)) {
|
|
48
|
+
console.error('addElementActivationListener called with non-interactive element');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
bindHandlers(target, handler, abortSignal, keys);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { ElementActivationController as E, addElementActivationListener as a };
|
|
@@ -154,13 +154,17 @@ function findFormByRef(form, el) {
|
|
|
154
154
|
}
|
|
155
155
|
function isInteractiveElement(el) {
|
|
156
156
|
const tagName = el.tagName.toLowerCase();
|
|
157
|
-
if (['button', 'input', 'select', 'textarea'].includes(tagName)) {
|
|
157
|
+
if (['button', 'lmvz-button', 'input', 'lmvz-input', 'select', 'lmvz-select', 'textarea'].includes(tagName)) {
|
|
158
158
|
return true;
|
|
159
159
|
}
|
|
160
|
-
if (
|
|
160
|
+
if (['a', 'lmvz-link'].includes(tagName) && el.hasAttribute('href')) {
|
|
161
161
|
return true;
|
|
162
162
|
}
|
|
163
163
|
if (el.hasAttribute('tabindex')) {
|
|
164
|
+
const tabindex = parseInt(el.getAttribute('tabindex') ?? '-1');
|
|
165
|
+
if (isNaN(tabindex) || tabindex < 0) {
|
|
166
|
+
console.warn('Interactive element is not keyboard accessible due to negative tabindex!', el);
|
|
167
|
+
}
|
|
164
168
|
return true;
|
|
165
169
|
}
|
|
166
170
|
const role = el.getAttribute('role');
|
|
@@ -172,5 +176,8 @@ function isInteractiveElement(el) {
|
|
|
172
176
|
}
|
|
173
177
|
return false;
|
|
174
178
|
}
|
|
179
|
+
function isHtmlElement(element) {
|
|
180
|
+
return element instanceof HTMLElement;
|
|
181
|
+
}
|
|
175
182
|
|
|
176
|
-
export { inheritAriaAttributes as a,
|
|
183
|
+
export { inheritAriaAttributes as a, isInteractiveElement as b, isPrimaryAction as c, isVisible as d, isActionButton as e, isDisabledButton as f, getDeepActiveElement as g, isSecondaryAction as h, isLmvzButton as i, canReceiveFocus as j, findFormByRef as k, isHtmlElement as l, walkShadowDOMUntil as w };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { g as getElement, r as registerInstance, h, H as Host } from './index-BPeerEwm.js';
|
|
2
2
|
import { A as AriaValidationController } from './aria-validation-controller-BvOU1BO8.js';
|
|
3
|
-
import { D as DirectionalFocusController } from './
|
|
4
|
-
import { i as isLmvzButton } from './element.util-
|
|
5
|
-
import { R as ReactiveControllerHost } from './reactive-controller-host-
|
|
3
|
+
import { D as DirectionalFocusController } from './directional-focus-controller-DgAdCZrG.js';
|
|
4
|
+
import { i as isLmvzButton } from './element.util-BFcYfHYq.js';
|
|
5
|
+
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
6
6
|
import './aria-loader-BfH06m7H.js';
|
|
7
7
|
|
|
8
|
-
const lmvzActionListCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }`;
|
|
8
|
+
const lmvzActionListCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } .sc-lmvz-action-list-h { display: flex; flex-direction: column; gap: 0; min-width: 15vw; button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } lmvz-button, button { --lmvz-button-radius-override: var(--lmvz-semantic-border-radius-md, 6px); --lmvz-button-padding-inline-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-padding-block-override: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --lmvz-button-font-override: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); --lmvz-button-content-justification-override: normal; width: 100%; display: block; } button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); &:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } &:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } } }`;
|
|
9
9
|
|
|
10
10
|
const LmvzActionList = class extends ReactiveControllerHost {
|
|
11
11
|
get el() { return getElement(this); }
|
|
@@ -34,6 +34,9 @@ const LmvzActionList = class extends ReactiveControllerHost {
|
|
|
34
34
|
this.handleSlotChange();
|
|
35
35
|
super.componentDidLoad();
|
|
36
36
|
}
|
|
37
|
+
async initFocus() {
|
|
38
|
+
this.focusController.initFocus();
|
|
39
|
+
}
|
|
37
40
|
handleSlotChange = () => {
|
|
38
41
|
const slot = this.slotEl;
|
|
39
42
|
if (!slot)
|
|
@@ -54,7 +57,7 @@ const LmvzActionList = class extends ReactiveControllerHost {
|
|
|
54
57
|
};
|
|
55
58
|
render() {
|
|
56
59
|
const ariaLabel = this.label || undefined;
|
|
57
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '9dee495856e733cb17f30d0d8588362a8dcb28ce', role: "menu", "aria-label": ariaLabel }, h("slot", { key: 'c6454dbbe63eed5be01f3247934245d1cc1ad6e2', onSlotchange: this.handleSlotChange, ref: (el) => (this.slotEl = el) })));
|
|
58
61
|
}
|
|
59
62
|
};
|
|
60
63
|
function collectInteractiveButtonsRecursively(el, collection) {
|
package/esm/lmvz-action.entry.js
CHANGED
|
@@ -12,7 +12,7 @@ const LmvzAction = class {
|
|
|
12
12
|
this.actionClick.emit(event);
|
|
13
13
|
}
|
|
14
14
|
render() {
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: '4d83f95393704400034fef7313ac52bcc100be95', onClick: this._onClick.bind(this) }, h("slot", { key: 'ffbdeca0877eb9a76bc4ac1b8b77b37b60fdabd5' })));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
LmvzAction.style = lmvzActionCss();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, g as getElement, h, H as Host } from './index-BPeerEwm.js';
|
|
2
2
|
import { a as isPromise, i as isAriaValidationEnabled } from './aria-loader-BfH06m7H.js';
|
|
3
3
|
import { v as variants } from './ds.constants-0ctLESas.js';
|
|
4
|
-
import {
|
|
4
|
+
import { c as isPrimaryAction, d as isVisible, e as isActionButton, f as isDisabledButton, h as isSecondaryAction, i as isLmvzButton, j as canReceiveFocus } from './element.util-BFcYfHYq.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Returns a function that delegates to the given predicate/filter and negates its result.
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-BPeerEwm.js';
|
|
2
2
|
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
3
|
import { A as AriaValidationController } from './aria-validation-controller-BvOU1BO8.js';
|
|
4
|
-
import { E as ElementActivationController } from './element-activation-controller-
|
|
5
|
-
import { a as inheritAriaAttributes,
|
|
6
|
-
import { R as ReactiveControllerHost } from './reactive-controller-host-
|
|
4
|
+
import { E as ElementActivationController } from './element-activation-controller-7PNSl6io.js';
|
|
5
|
+
import { a as inheritAriaAttributes, k as findFormByRef } from './element.util-BFcYfHYq.js';
|
|
6
|
+
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
7
7
|
import { p as parseSvgString } from './svg-Dz3GD0LB.js';
|
|
8
8
|
import { a as resolveIconSvg } from './icons-DQOFaux5.js';
|
|
9
9
|
import './aria-loader-BfH06m7H.js';
|
|
10
10
|
import './logger-D06Ds9Dh.js';
|
|
11
11
|
|
|
12
|
-
const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: inline-block; button { width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
12
|
+
const lmvzButtonCss = () => ` @layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } @layer lmvz-ds.reset { body { margin: 0; } h1, h2, h3, h4, h5, h6 { margin: 0; } *[hidden] { display: none !important; } hr { height: 0; border: none; margin: var(--lmvz-dimension-8-4, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)) 0; border-top: var(--lmvz-semantic-border-width-default, 1px) solid var(--lmvz-semantic-color-border-subtle, #f0f0f0); } } :host { button { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-secondary, #000000)); --lmvz-button-radius: var(--lmvz-button-radius-override, var(--lmvz-component-input-radius-default, 999px)); --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-button-padding, var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-md-strong, normal 700 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); display: inline-flex; align-items: center; justify-content: var(--lmvz-button-content-justification-override, center); gap: var(--lmvz-button-gap); padding-block: var(--lmvz-button-padding-block); padding-inline: var(--lmvz-button-padding-inline); min-height: var(--lmvz-button-min-height); min-width: var(--lmvz-button-min-height); border-radius: var(--lmvz-button-radius); border: var(--lmvz-button-border-width) solid var(--lmvz-button-border-color); background-color: var(--lmvz-button-background); color: var(--lmvz-button-color); cursor: pointer; font: var(--lmvz-button-font); text-decoration: none; white-space: nowrap; transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; } button > * { font: inherit; color: inherit; } button:focus-visible { outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); position: relative; z-index: 1; } button:is([disabled], .disabled) { cursor: not-allowed; pointer-events: none; opacity: var(--lmvz-component-input-disabled-opacity, 40%); } button:not([disabled]):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0)); } button:not([disabled]):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-secondary-active, #d4d4d4)); } button.primary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary, #000000)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-primary, #ffffff)); --lmvz-button-border-width: var(--lmvz-button-border-width-override, 0); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); } button.primary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-hover, #2e2e2e)); } button.primary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-primary-active, #545454)); } button.danger { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-border-color: var(--lmvz-button-border-color-override, transparent); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-danger, #fbdfe0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.danger:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-status-on-danger-subtle, #e8454b)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-status-on-danger, #a31419)); } button.tertiary { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary, #ffffff)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary, #000000)); } button.tertiary:not([disabled], .disabled):hover { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-hover, #000000)); } button.tertiary:not([disabled], .disabled):active { --lmvz-button-background: var(--lmvz-button-background-override, var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0)); --lmvz-button-color: var(--lmvz-button-color-override, var(--lmvz-semantic-color-int-on-tertiary-active, #000000)); } button.small { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-sm-strong, normal 700 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router)); } button.large { --lmvz-button-padding-inline: var(--lmvz-button-padding-inline-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-padding-block: var(--lmvz-button-padding-block-override, var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem))); --lmvz-button-gap: var(--lmvz-button-gap-override, var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem))); --lmvz-button-min-height: var(--lmvz-button-min-height-override, var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem))); --lmvz-button-font: var(--lmvz-button-font-override, var(--lmvz-typography-label-lg-strong, normal 700 clamp(1rem, 0.97rem + 0.13vw, 1.13rem) / 1.5 Router)); } display: inline-block; button { width: 100%; } } ::slotted(*) { --lmvz-component-color: var(--lmvz-button-color); } `;
|
|
13
13
|
|
|
14
14
|
const LmvzButton = class extends ReactiveControllerHost {
|
|
15
15
|
get el() { return getElement(this); }
|
|
@@ -38,7 +38,6 @@ const LmvzButton = class extends ReactiveControllerHost {
|
|
|
38
38
|
this.addController(new AriaValidationController(this));
|
|
39
39
|
this.addController(new ElementActivationController(this, {
|
|
40
40
|
localHandler: this.handleClick.bind(this),
|
|
41
|
-
keys: ['Enter'],
|
|
42
41
|
}));
|
|
43
42
|
}
|
|
44
43
|
connectedCallback() {
|
|
@@ -99,7 +98,7 @@ const LmvzButton = class extends ReactiveControllerHost {
|
|
|
99
98
|
};
|
|
100
99
|
render() {
|
|
101
100
|
this.renderHiddenButton();
|
|
102
|
-
return (h(Host, { key: '
|
|
101
|
+
return (h(Host, { key: 'eb0ee982f50f1e41b2aa72a0598d739b972cbcdf', role: "presentation" }, h("button", { key: 'aed6f44f51222e31d5f1deec952c0d81b8f1200a', ref: (e) => (this.validationEl = e), part: "button", role: this.buttonRole, disabled: this.disabled, type: this.type, class: classNames(this.variant ?? 'secondary', { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: '2aaedfde3c0d6ebf426f20a8489b22c2a356767e' }))));
|
|
103
102
|
}
|
|
104
103
|
static get delegatesFocus() { return true; }
|
|
105
104
|
};
|