@lmvz-ds/components 0.16.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{icons-BOM23oli.js → Effect-DdYOHaR4.js} +153 -889
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -3
- package/dist/cjs/aria-loader-BRxRUIyi.js +121 -0
- package/dist/cjs/{assets-XY-cBmal.js → assets-OvQ-WUwR.js} +2 -5
- package/dist/cjs/component-Csg9MtNK.js +140 -0
- package/dist/cjs/element-activation-controller-DC_6T0Rt.js +31 -0
- package/dist/cjs/icons-EHBLbidD.js +653 -0
- package/dist/cjs/{index-ww_DCXU7.js → index-BBqtydE-.js} +426 -431
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{index-B1Puzu82.js → index-CH-YLRgg.js} +650 -10
- package/dist/cjs/index.cjs.js +12 -13
- package/dist/cjs/lmvz-action.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-button.cjs.entry.js +73 -0
- package/dist/cjs/lmvz-card.cjs.entry.js +3 -6
- package/dist/cjs/lmvz-chip.cjs.entry.js +2 -5
- package/dist/cjs/lmvz-components.cjs.js +2 -5
- package/dist/cjs/lmvz-header_2.cjs.entry.js +153 -0
- package/dist/cjs/lmvz-icon.cjs.entry.js +87 -0
- package/dist/cjs/lmvz-input.cjs.entry.js +183 -0
- package/dist/cjs/lmvz-menuitem.cjs.entry.js +36 -0
- package/dist/cjs/lmvz-select.cjs.entry.js +71 -0
- package/dist/cjs/loader.cjs.js +2 -5
- package/dist/cjs/reactive-controller-host-vy1TIIXv.js +189 -0
- package/dist/collection/api/ds.constants.js +0 -1
- package/dist/collection/api/index.js +0 -1
- package/dist/collection/collection-manifest.json +13 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js +1 -2
- package/dist/collection/components/lmvz-button/lmvz-button.css +2 -24
- package/dist/collection/components/lmvz-button/lmvz-button.js +1 -2
- package/dist/collection/components/lmvz-card/lmvz-card.css +2 -24
- package/dist/collection/components/lmvz-card/lmvz-card.js +1 -2
- package/dist/collection/components/lmvz-chip/lmvz-chip.js +1 -2
- package/dist/collection/components/lmvz-header/lmvz-header.js +1 -2
- package/dist/collection/components/lmvz-icon/icons.js +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js +1 -2
- package/dist/collection/components/lmvz-icon/public.js +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.css +2 -24
- package/dist/collection/components/lmvz-input/lmvz-input.js +2 -3
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.css +2 -24
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -2
- package/dist/collection/components/lmvz-select/lmvz-select.css +2 -24
- package/dist/collection/components/lmvz-select/lmvz-select.js +1 -2
- package/dist/collection/index.js +0 -1
- package/dist/collection/integration/header-integration.js +1 -2
- package/dist/collection/utils/aria/aria-validation-controller.js +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js +0 -1
- package/dist/collection/utils/assets.js +0 -1
- package/dist/collection/utils/component.js +0 -1
- package/dist/collection/utils/effect.js +0 -1
- package/dist/collection/utils/environment.js +0 -1
- package/dist/collection/utils/http.js +0 -1
- package/dist/collection/utils/http.unit.js +0 -1
- package/dist/collection/utils/public.js +0 -1
- package/dist/collection/utils/reactive-controller-host.js +0 -1
- package/dist/collection/utils/validation/svg.js +0 -1
- package/dist/components/index.d.ts +0 -2
- package/dist/components/index.js +1 -2
- package/dist/components/lmvz-action.js +1 -2
- package/dist/components/lmvz-button.js +1 -2
- package/dist/components/lmvz-card.js +1 -2
- package/dist/components/lmvz-chip.js +1 -2
- package/dist/components/lmvz-header.js +1 -2
- package/dist/components/lmvz-icon.js +1 -2
- package/dist/components/lmvz-input.js +1 -2
- package/dist/components/lmvz-menuitem.js +1 -2
- package/dist/components/lmvz-select.js +1 -2
- package/dist/components/p-BfTCfPZ1.js +2 -3
- package/dist/components/p-BsHYIl56.js +1 -2
- package/dist/components/p-CKtksB0G.js +1 -0
- package/dist/components/p-CN0JX9-m.js +1 -2
- package/dist/components/p-CahBdGGN.js +1 -0
- package/dist/components/p-DQEkWkMh.js +1 -2
- package/dist/components/p-GKEnURpp.js +1 -0
- package/dist/components/p-vIq2biqy.js +2 -3
- package/dist/esm/{icons-D1lxdRXP.js → Effect-9SROYpxM.js} +91 -854
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/aria-loader-JxXwTAe5.js +114 -0
- package/dist/esm/{assets-BD98wsl7.js → assets-CNHv_WMG.js} +1 -4
- package/dist/esm/component-DIrAQ4IB.js +134 -0
- package/dist/esm/element-activation-controller-CN0JX9-m.js +29 -0
- package/dist/esm/icons-B255FOe4.js +649 -0
- package/dist/esm/{index-DoNkkDv1.js → index-BW1YMEA3.js} +1 -6
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-WeqgWisK.js → index-CQb-mBBB.js} +650 -10
- package/dist/esm/index.js +5 -7
- package/dist/esm/lmvz-action.entry.js +2 -5
- package/dist/esm/lmvz-button.entry.js +71 -0
- package/dist/esm/lmvz-card.entry.js +3 -6
- package/dist/esm/lmvz-chip.entry.js +2 -5
- package/dist/esm/lmvz-components.js +3 -6
- package/dist/esm/lmvz-header_2.entry.js +150 -0
- package/dist/esm/lmvz-icon.entry.js +85 -0
- package/dist/esm/lmvz-input.entry.js +181 -0
- package/dist/esm/lmvz-menuitem.entry.js +34 -0
- package/dist/esm/lmvz-select.entry.js +69 -0
- package/dist/esm/loader.js +3 -6
- package/dist/esm/reactive-controller-host-OhKYwMvP.js +186 -0
- package/dist/lmvz-components/index.esm.js +1 -2
- package/dist/lmvz-components/lmvz-components.esm.js +1 -2
- package/dist/lmvz-components/p-150ecfb6.entry.js +1 -0
- package/dist/lmvz-components/p-22f67eff.entry.js +1 -0
- package/dist/lmvz-components/p-4530f088.entry.js +1 -0
- package/dist/lmvz-components/p-47d7ed0e.entry.js +1 -0
- package/dist/lmvz-components/p-5c3f1404.entry.js +1 -0
- package/dist/lmvz-components/p-8d51e396.entry.js +1 -0
- package/dist/lmvz-components/p-9SROYpxM.js +1 -0
- package/dist/lmvz-components/p-BfTCfPZ1.js +6 -0
- package/dist/lmvz-components/p-Bx29-tJt.js +1 -0
- package/dist/lmvz-components/p-CN0JX9-m.js +1 -0
- package/dist/lmvz-components/p-CQb-mBBB.js +2 -0
- package/dist/lmvz-components/p-Cp76bcGb.js +1 -0
- package/dist/lmvz-components/p-Cp7cp10e.js +12 -0
- package/dist/lmvz-components/p-DIrAQ4IB.js +1 -0
- package/dist/lmvz-components/p-DQuL1Twl.js +1 -2
- package/dist/lmvz-components/p-DyO6wO4l.js +1 -0
- package/dist/lmvz-components/p-b8926640.entry.js +1 -0
- package/dist/lmvz-components/p-b9d1953f.entry.js +1 -0
- package/dist/lmvz-components/p-d9c3f542.entry.js +1 -0
- package/dist/lmvz-components/p-i2508Ct1.js +1 -0
- package/dist/manifest.json +11 -47
- package/dist/stencil.config.base.js +0 -1
- package/dist/stencil.config.dev.js +0 -1
- package/dist/stencil.config.integration.js +0 -1
- package/dist/stencil.config.js +0 -1
- package/dist/stencil.config.prod.js +0 -1
- package/dist/types/components.d.ts +0 -18
- package/hydrate/index.js +11 -11
- package/hydrate/index.mjs +11 -11
- package/package.json +4 -4
- package/readme.md +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +0 -1
- package/dist/cjs/assets-XY-cBmal.js.map +0 -1
- package/dist/cjs/header-integration_7.cjs.entry.js +0 -1024
- package/dist/cjs/header-integration_7.cjs.entry.js.map +0 -1
- package/dist/cjs/icons-BOM23oli.js.map +0 -1
- package/dist/cjs/index-B1Puzu82.js.map +0 -1
- package/dist/cjs/index-ww_DCXU7.js.map +0 -1
- package/dist/cjs/index.cjs.js.map +0 -1
- package/dist/cjs/lmvz-action.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-card.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-chip.cjs.entry.js.map +0 -1
- package/dist/cjs/lmvz-components.cjs.js.map +0 -1
- package/dist/cjs/loader.cjs.js.map +0 -1
- package/dist/collection/api/ds.constants.js.map +0 -1
- package/dist/collection/api/index.js.map +0 -1
- package/dist/collection/components/lmvz-action/lmvz-action.js.map +0 -1
- package/dist/collection/components/lmvz-button/lmvz-button.js.map +0 -1
- package/dist/collection/components/lmvz-card/lmvz-card.js.map +0 -1
- package/dist/collection/components/lmvz-chip/lmvz-chip.js.map +0 -1
- package/dist/collection/components/lmvz-header/lmvz-header.js.map +0 -1
- package/dist/collection/components/lmvz-icon/icons.js.map +0 -1
- package/dist/collection/components/lmvz-icon/lmvz-icon.js.map +0 -1
- package/dist/collection/components/lmvz-icon/public.js.map +0 -1
- package/dist/collection/components/lmvz-icon/test/icons.unit.js.map +0 -1
- package/dist/collection/components/lmvz-input/lmvz-input.js.map +0 -1
- package/dist/collection/components/lmvz-menuitem/lmvz-menuitem.js.map +0 -1
- package/dist/collection/components/lmvz-select/lmvz-select.js.map +0 -1
- package/dist/collection/index.js.map +0 -1
- package/dist/collection/integration/header-integration.js.map +0 -1
- package/dist/collection/utils/aria/aria-validation-controller.js.map +0 -1
- package/dist/collection/utils/aria/element-activation-controller.js.map +0 -1
- package/dist/collection/utils/aria/list-keyboard-controller.js.map +0 -1
- package/dist/collection/utils/assets.js.map +0 -1
- package/dist/collection/utils/component.js.map +0 -1
- package/dist/collection/utils/effect.js.map +0 -1
- package/dist/collection/utils/environment.js.map +0 -1
- package/dist/collection/utils/http.js.map +0 -1
- package/dist/collection/utils/http.unit.js.map +0 -1
- package/dist/collection/utils/public.js.map +0 -1
- package/dist/collection/utils/reactive-controller-host.js.map +0 -1
- package/dist/collection/utils/validation/svg.js.map +0 -1
- package/dist/components/header-integration.d.ts +0 -11
- package/dist/components/header-integration.js +0 -2
- package/dist/components/header-integration.js.map +0 -1
- package/dist/components/index.js.map +0 -1
- package/dist/components/lmvz-action.js.map +0 -1
- package/dist/components/lmvz-button.js.map +0 -1
- package/dist/components/lmvz-card.js.map +0 -1
- package/dist/components/lmvz-chip.js.map +0 -1
- package/dist/components/lmvz-header.js.map +0 -1
- package/dist/components/lmvz-icon.js.map +0 -1
- package/dist/components/lmvz-input.js.map +0 -1
- package/dist/components/lmvz-menuitem.js.map +0 -1
- package/dist/components/lmvz-select.js.map +0 -1
- package/dist/components/p-B2g3aN-E.js +0 -2
- package/dist/components/p-B2g3aN-E.js.map +0 -1
- package/dist/components/p-BXdOuZTp.js +0 -2
- package/dist/components/p-BXdOuZTp.js.map +0 -1
- package/dist/components/p-BfTCfPZ1.js.map +0 -1
- package/dist/components/p-BpCjj39Z.js +0 -2
- package/dist/components/p-BpCjj39Z.js.map +0 -1
- package/dist/components/p-BsHYIl56.js.map +0 -1
- package/dist/components/p-C5rqq3bf.js +0 -2
- package/dist/components/p-C5rqq3bf.js.map +0 -1
- package/dist/components/p-CI0tffvo.js +0 -2
- package/dist/components/p-CI0tffvo.js.map +0 -1
- package/dist/components/p-CN0JX9-m.js.map +0 -1
- package/dist/components/p-ClmDNIy4.js +0 -2
- package/dist/components/p-ClmDNIy4.js.map +0 -1
- package/dist/components/p-DQEkWkMh.js.map +0 -1
- package/dist/components/p-X5fEFT9T.js +0 -2
- package/dist/components/p-X5fEFT9T.js.map +0 -1
- package/dist/components/p-vIq2biqy.js.map +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js.map +0 -1
- package/dist/esm/assets-BD98wsl7.js.map +0 -1
- package/dist/esm/header-integration_7.entry.js +0 -1016
- package/dist/esm/header-integration_7.entry.js.map +0 -1
- package/dist/esm/icons-D1lxdRXP.js.map +0 -1
- package/dist/esm/index-DoNkkDv1.js.map +0 -1
- package/dist/esm/index-WeqgWisK.js.map +0 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lmvz-action.entry.js.map +0 -1
- package/dist/esm/lmvz-card.entry.js.map +0 -1
- package/dist/esm/lmvz-chip.entry.js.map +0 -1
- package/dist/esm/lmvz-components.js.map +0 -1
- package/dist/esm/loader.js.map +0 -1
- package/dist/lmvz-components/index.esm.js.map +0 -1
- package/dist/lmvz-components/lmvz-components.esm.js.map +0 -1
- package/dist/lmvz-components/p-33485219.entry.js +0 -2
- package/dist/lmvz-components/p-33485219.entry.js.map +0 -1
- package/dist/lmvz-components/p-76032c32.entry.js +0 -2
- package/dist/lmvz-components/p-76032c32.entry.js.map +0 -1
- package/dist/lmvz-components/p-7aeec9a8.entry.js +0 -7
- package/dist/lmvz-components/p-7aeec9a8.entry.js.map +0 -1
- package/dist/lmvz-components/p-84e0a9dd.entry.js +0 -2
- package/dist/lmvz-components/p-84e0a9dd.entry.js.map +0 -1
- package/dist/lmvz-components/p-CkJb8WVZ.js +0 -2
- package/dist/lmvz-components/p-CkJb8WVZ.js.map +0 -1
- package/dist/lmvz-components/p-DQuL1Twl.js.map +0 -1
- package/dist/lmvz-components/p-WeqgWisK.js +0 -3
- package/dist/lmvz-components/p-WeqgWisK.js.map +0 -1
- package/dist/lmvz-components/p-Z9X0_ik0.js +0 -2
- package/dist/lmvz-components/p-Z9X0_ik0.js.map +0 -1
- package/dist/lmvz-components/p-eP0oxQ44.js +0 -13
- package/dist/lmvz-components/p-eP0oxQ44.js.map +0 -1
- package/dist/stencil.config.base.js.map +0 -1
- package/dist/stencil.config.dev.js.map +0 -1
- package/dist/stencil.config.integration.js.map +0 -1
- package/dist/stencil.config.js.map +0 -1
- package/dist/stencil.config.prod.js.map +0 -1
- package/dist/types/integration/header-integration.d.ts +0 -5
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.base.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.dev.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.integration.d.ts +0 -0
- /package/dist/types/{Users/patrick.nemenz/workspace/lmvz/lmvz-ds → opt/atlassian/pipelines/agent/build}/packages/components/.stencil/stencil.config.prod.d.ts +0 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CH-YLRgg.js');
|
|
4
|
+
var index$1 = require('./index-Bp6Dd2i1.js');
|
|
5
|
+
var reactiveControllerHost = require('./reactive-controller-host-vy1TIIXv.js');
|
|
6
|
+
var component = require('./component-Csg9MtNK.js');
|
|
7
|
+
require('./aria-loader-BRxRUIyi.js');
|
|
8
|
+
|
|
9
|
+
const lmvzInputCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-input-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --input-radius: var(--lmvz-component-input-radius-default, 999px); --input-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --input-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --input-border-color-hover: var(--lmvz-semantic-color-border-hover, #c7c7c7); --input-border-color-focus: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: 48px; --input-padding-x: 16px; --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); --label-floating-scale: 0.85; --label-minimized-top: -6px; --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } .input-container.sc-lmvz-input { display: flex; flex-direction: column; position: relative; width: 100%; } .input-wrapper.sc-lmvz-input { background-color: var(--input-bg); border: var(--input-border-width) solid var(--input-border-color); border-radius: var(--input-radius); display: flex; align-items: center; height: var(--input-height); padding: 0 var(--input-padding-x); position: relative; transition: border-color 0.2s ease; gap: 8px; } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .input-container.sc-lmvz-input:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: 2px solid var(--input-border-color-focus); outline-offset: 2px; } .input-container.sc-lmvz-input:has(input:focus-visible) .input-wrapper.sc-lmvz-input { box-shadow: 0 0 0 3px rgb(0 86 214 / 20%); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); } [error].sc-lmvz-input-h:focus-within .input-wrapper.sc-lmvz-input { border-color: var(--error-text-color); outline-color: var(--error-text-color); } .sc-lmvz-input-h:not([disabled]) .input-wrapper.sc-lmvz-input:hover { border-color: var(--input-border-color-hover); } .label-input-group.sc-lmvz-input { position: relative; flex-grow: 1; display: flex; align-items: center; height: 100%; } label.sc-lmvz-input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--label-color); font-size: 14px; font-family: Router, sans-serif; font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: normal; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0; transform: translateY(-50%) scale(0.85); transform-origin: left top; background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 500; } .required-indicator.sc-lmvz-input { color: var(--error-text-color); margin-left: 2px; } input.sc-lmvz-input { border: none; background: transparent; width: 100%; height: 100%; color: var(--input-text-color); font-family: inherit; font-size: 14px; outline: none; padding: 0; margin: 0; font-weight: 400; } input.sc-lmvz-input::placeholder { color: var(--label-color); } div.sc-lmvz-input:empty { display: none; } [role='status'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--helper-text-color); font-family: Router, sans-serif; font-weight: 500; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: 12px; font-size: 12px; color: var(--error-text-color); font-family: Router, sans-serif; font-weight: 500; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: 4px; }`;
|
|
10
|
+
|
|
11
|
+
let inputIdCounter = 0;
|
|
12
|
+
const LmvzInput = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
13
|
+
get el() { return index.getElement(this); }
|
|
14
|
+
get validationEl() {
|
|
15
|
+
return this.el;
|
|
16
|
+
}
|
|
17
|
+
lmvzInput;
|
|
18
|
+
internals;
|
|
19
|
+
nativeInputElement;
|
|
20
|
+
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
21
|
+
initialValue = '';
|
|
22
|
+
nativeError = false;
|
|
23
|
+
errorFromProp = false;
|
|
24
|
+
get helperId() {
|
|
25
|
+
return this.helperText ? `${this.inputId}-helper` : undefined;
|
|
26
|
+
}
|
|
27
|
+
get showErrorMessage() {
|
|
28
|
+
return this.error && Boolean(this.errorMessage);
|
|
29
|
+
}
|
|
30
|
+
get errorId() {
|
|
31
|
+
return `${this.inputId}-error`;
|
|
32
|
+
}
|
|
33
|
+
get describedBy() {
|
|
34
|
+
const ids = [];
|
|
35
|
+
if (this.helperId)
|
|
36
|
+
ids.push(this.helperId);
|
|
37
|
+
if (this.showErrorMessage)
|
|
38
|
+
ids.push(this.errorId);
|
|
39
|
+
return ids.length > 0 ? ids.join(' ') : undefined;
|
|
40
|
+
}
|
|
41
|
+
value;
|
|
42
|
+
label;
|
|
43
|
+
helperText;
|
|
44
|
+
placeholder;
|
|
45
|
+
disabled = false;
|
|
46
|
+
readonly = false;
|
|
47
|
+
required = false;
|
|
48
|
+
name;
|
|
49
|
+
type = 'text';
|
|
50
|
+
errorMessage;
|
|
51
|
+
autocomplete;
|
|
52
|
+
inputmode;
|
|
53
|
+
autocorrect;
|
|
54
|
+
autocapitalize;
|
|
55
|
+
spellcheck;
|
|
56
|
+
autofocus = false;
|
|
57
|
+
minlength;
|
|
58
|
+
maxlength;
|
|
59
|
+
pattern;
|
|
60
|
+
min;
|
|
61
|
+
max;
|
|
62
|
+
step;
|
|
63
|
+
form;
|
|
64
|
+
get error() {
|
|
65
|
+
return this.errorFromProp || this.nativeError;
|
|
66
|
+
}
|
|
67
|
+
set error(value) {
|
|
68
|
+
this.errorFromProp = value;
|
|
69
|
+
}
|
|
70
|
+
async setValue(newValue) {
|
|
71
|
+
const input = this.nativeInputElement;
|
|
72
|
+
const val = newValue ?? '';
|
|
73
|
+
if (input) {
|
|
74
|
+
input.value = val;
|
|
75
|
+
}
|
|
76
|
+
this.value = val;
|
|
77
|
+
this.internals.setFormValue?.(val);
|
|
78
|
+
this.lmvzInput.emit(val);
|
|
79
|
+
}
|
|
80
|
+
async focusInput() {
|
|
81
|
+
this.nativeInputElement?.focus();
|
|
82
|
+
}
|
|
83
|
+
async blurInput() {
|
|
84
|
+
this.nativeInputElement?.blur();
|
|
85
|
+
}
|
|
86
|
+
async select() {
|
|
87
|
+
this.nativeInputElement?.select();
|
|
88
|
+
}
|
|
89
|
+
async checkValidity() {
|
|
90
|
+
return this.nativeInputElement?.checkValidity?.() ?? false;
|
|
91
|
+
}
|
|
92
|
+
async reportValidity() {
|
|
93
|
+
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
94
|
+
}
|
|
95
|
+
async getInputElement() {
|
|
96
|
+
if (!this.nativeInputElement) {
|
|
97
|
+
await new Promise((resolve) => component.componentOnReady(this.el, resolve));
|
|
98
|
+
}
|
|
99
|
+
return Promise.resolve(this.nativeInputElement);
|
|
100
|
+
}
|
|
101
|
+
constructor(hostRef) {
|
|
102
|
+
super();
|
|
103
|
+
index.registerInstance(this, hostRef);
|
|
104
|
+
this.lmvzInput = index.createEvent(this, "lmvzInput");
|
|
105
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
106
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
110
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
111
|
+
}
|
|
112
|
+
this.addController(new reactiveControllerHost.AriaValidationController(this, {
|
|
113
|
+
reValidateOnPropChanges: true,
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
componentWillLoad() {
|
|
117
|
+
this.initialValue = this.value ?? '';
|
|
118
|
+
super.componentWillLoad();
|
|
119
|
+
}
|
|
120
|
+
formAssociatedCallback(form) {
|
|
121
|
+
if (!form)
|
|
122
|
+
return;
|
|
123
|
+
this.internals.setFormValue?.(this.value ?? '');
|
|
124
|
+
}
|
|
125
|
+
formResetCallback() {
|
|
126
|
+
this.internals.setValidity({});
|
|
127
|
+
this.setValue(this.initialValue);
|
|
128
|
+
}
|
|
129
|
+
formStateRestoreCallback(state) {
|
|
130
|
+
this.setValue(state);
|
|
131
|
+
}
|
|
132
|
+
handleValueChange(newValue) {
|
|
133
|
+
if (!this.nativeInputElement)
|
|
134
|
+
return;
|
|
135
|
+
const isInternalChange = this.nativeInputElement.value === newValue;
|
|
136
|
+
if (isInternalChange)
|
|
137
|
+
return;
|
|
138
|
+
this.setValue(newValue);
|
|
139
|
+
}
|
|
140
|
+
handleDisabledChange(disabled) {
|
|
141
|
+
if (disabled && this.nativeInputElement) {
|
|
142
|
+
this.nativeInputElement.blur();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
handleInput = (event) => {
|
|
146
|
+
const input = event.target;
|
|
147
|
+
this.setValue(input.value);
|
|
148
|
+
};
|
|
149
|
+
handleChange = (event) => {
|
|
150
|
+
const input = event.target ?? this.nativeInputElement;
|
|
151
|
+
this.updateNativeError(input);
|
|
152
|
+
};
|
|
153
|
+
handleFocus = () => { };
|
|
154
|
+
handleBlur = (event) => {
|
|
155
|
+
const input = event.target;
|
|
156
|
+
input.reportValidity?.();
|
|
157
|
+
};
|
|
158
|
+
updateNativeError(fromEvent) {
|
|
159
|
+
const input = fromEvent ?? this.nativeInputElement;
|
|
160
|
+
if (!input)
|
|
161
|
+
return;
|
|
162
|
+
this.nativeError = !(input.checkValidity?.() ?? true);
|
|
163
|
+
}
|
|
164
|
+
render() {
|
|
165
|
+
const hasValue = Boolean(this.value);
|
|
166
|
+
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
167
|
+
return (index.h("div", { key: '97674bbf9a17f1533340f19f0643bc8695417da6', class: index$1.classNames('input-container', {
|
|
168
|
+
'interaction-filled': hasValue,
|
|
169
|
+
}) }, index.h("div", { key: '51aee84c821a5ad8884981bae3c42d0ed29a1fc5', class: "input-wrapper" }, index.h("slot", { key: '589b38e7977f74f7037a71b6b530ea98750f3bee', name: "before-input" }), index.h("div", { key: 'f5856cfc71ceb9093ceaa1b60bb6f4d964dadc7f', class: "label-input-group" }, index.h("label", { key: 'fbd6bb71131cf7384a79ba6f4f606c430e326bef', htmlFor: this.inputId, class: index$1.classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (index.h("span", { key: 'd479254f9ac11a31278720d41e56db1300c06b15', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), index.h("input", { key: 'bb7b43947207bebb31412aa0e0eb58a9fed98963', id: this.inputId, ref: (el) => (this.nativeInputElement = el), type: this.type, min: this.min, max: this.max, step: this.step, value: this.value, name: this.name, placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, form: this.form, autocomplete: this.autocomplete, inputmode: this.inputmode, autocorrect: this.autocorrect, autocapitalize: this.autocapitalize, spellcheck: this.spellcheck, autofocus: this.autofocus, minlength: this.minlength, maxlength: this.maxlength, pattern: this.pattern, "aria-invalid": this.error ? 'true' : 'false', "aria-required": this.required ? 'true' : 'false', "aria-describedby": this.describedBy, "aria-errormessage": this.errorId, onInput: this.handleInput, onChange: this.handleChange, onFocus: this.handleFocus, onBlur: this.handleBlur })), index.h("slot", { key: 'a21d46103f1b0040e67e20b4faf016a2b2fdd4dc', name: "after-input" })), index.h("div", { key: '53adfecb08ab29d1636052061dc37dffcd697ab2', id: this.helperId, role: "status" }, this.helperText || null), index.h("div", { key: 'ea3406ebd72ef02a0f293ab01cf4cf9971687b30', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
170
|
+
}
|
|
171
|
+
static get formAssociated() { return true; }
|
|
172
|
+
static get watchers() { return {
|
|
173
|
+
"value": [{
|
|
174
|
+
"handleValueChange": 0
|
|
175
|
+
}],
|
|
176
|
+
"disabled": [{
|
|
177
|
+
"handleDisabledChange": 0
|
|
178
|
+
}]
|
|
179
|
+
}; }
|
|
180
|
+
};
|
|
181
|
+
LmvzInput.style = lmvzInputCss();
|
|
182
|
+
|
|
183
|
+
exports.lmvz_input = LmvzInput;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CH-YLRgg.js');
|
|
4
|
+
var reactiveControllerHost = require('./reactive-controller-host-vy1TIIXv.js');
|
|
5
|
+
var elementActivationController = require('./element-activation-controller-DC_6T0Rt.js');
|
|
6
|
+
require('./aria-loader-BRxRUIyi.js');
|
|
7
|
+
|
|
8
|
+
const lmvzMenuitemCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-menuitem-h { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.4 Router); padding: var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); cursor: pointer; --lmvz-menuitem-color: var(--lmvz-semantic-color-int-on-tertiary, #545454); --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); background: var(--lmvz-menuitem-background); color: var(--lmvz-menuitem-color); } .sc-lmvz-menuitem-h:hover { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } .sc-lmvz-menuitem-h:active { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } .sc-lmvz-menuitem-h:focus-visible { z-index: 1; } [aria-expanded='true'].sc-lmvz-menuitem-h { --lmvz-menuitem-background: var(--lmvz-semantic-color-status-selected, #f1f9fe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); }`;
|
|
9
|
+
|
|
10
|
+
const LmvzMenuItem = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
11
|
+
get el() { return index.getElement(this); }
|
|
12
|
+
get validationEl() {
|
|
13
|
+
return this.el;
|
|
14
|
+
}
|
|
15
|
+
validationSlot;
|
|
16
|
+
get role() {
|
|
17
|
+
return 'menuitem';
|
|
18
|
+
}
|
|
19
|
+
get ti() {
|
|
20
|
+
return 0;
|
|
21
|
+
}
|
|
22
|
+
lmvzActivation;
|
|
23
|
+
constructor(hostRef) {
|
|
24
|
+
super();
|
|
25
|
+
index.registerInstance(this, hostRef);
|
|
26
|
+
this.lmvzActivation = index.createEvent(this, "lmvzActivation");
|
|
27
|
+
this.addController(new reactiveControllerHost.AriaValidationController(this, { validationTiming: 'slot' }));
|
|
28
|
+
this.addController(new elementActivationController.ElementActivationController(this));
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return (index.h(index.Host, { key: '510ac59b18468ce9c65b866ae2767185f1b3da92' }, index.h("slot", { key: '7e032e0dab83f9bfbaa96ad2b78d8a5a58f978ab', ref: (e) => (this.validationSlot = e) })));
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
LmvzMenuItem.style = lmvzMenuitemCss();
|
|
35
|
+
|
|
36
|
+
exports.lmvz_menuitem = LmvzMenuItem;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CH-YLRgg.js');
|
|
4
|
+
var reactiveControllerHost = require('./reactive-controller-host-vy1TIIXv.js');
|
|
5
|
+
require('./aria-loader-BRxRUIyi.js');
|
|
6
|
+
|
|
7
|
+
const chevronDownSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIwLjMzMzQgOC42NjY2M0wxMi4wMDAxIDE3TDMuNjY2NzUgOC42NjY2MyIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=';
|
|
8
|
+
|
|
9
|
+
const lmvzSelectCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'), local('Router'); font-weight: 400 normal; } @font-face { font-family: Router; src: local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'), local('Router'); font-weight: 500; } @font-face { font-family: Router; src: local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'), local('Router'); font-weight: 700 bold; } } .sc-lmvz-select-h { display: block; font-family: var(--lmvz-global-font-family-default, Router); --lmvz-internal-select-floating-label-top-offset: 0.375rem; padding-top: var(--lmvz-internal-select-floating-label-top-offset); --lmvz-select-radius: var(--lmvz-component-input-radius-default, 999px); --lmvz-select-bg: var(--lmvz-semantic-color-int-secondary, #f0f0f0); --lmvz-select-bg-hover: var(--lmvz-semantic-color-int-secondary-hover, #e0e0e0); --lmvz-select-text-color: var(--lmvz-semantic-color-int-on-secondary, #000000); --lmvz-select-label-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --lmvz-select-padding-x: var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --lmvz-select-gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); --lmvz-select-height: 40px; --lmvz-select-label-font-size: var(--lmvz-component-component-typography-body-sm-font-size, 0.75rem); --lmvz-select-label-top-offset: calc(var(--lmvz-internal-select-floating-label-top-offset) * -1); --lmvz-select-label-minimized-padding-x: 4px; --lmvz-select-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); --lmvz-select-helper-color: var(--lmvz-semantic-color-on-surface-input-secondary, #7a7a7a); --lmvz-select-focus-color: var(--lmvz-semantic-color-status-on-selected, #0e7ab4); --lmvz-select-error-color: var(--lmvz-semantic-color-status-on-danger, #e52a31); } .select-wrapper.sc-lmvz-select { position: relative; height: var(--lmvz-select-height); } label.sc-lmvz-select { position: absolute; top: 50%; left: var(--lmvz-select-padding-x); font-size: var(--lmvz-select-label-font-size); color: var(--lmvz-select-label-color); line-height: normal; white-space: nowrap; pointer-events: none; z-index: 2; transform: translateY(-50%); transform-origin: left top; transition: top 0.2s ease-out, transform 0.2s ease-out, opacity 0.2s ease-out, padding 0.2s ease-out; } label.assistive-label.sc-lmvz-select { opacity: 0; padding: 0; } label.floating-label.sc-lmvz-select { top: var(--lmvz-select-label-top-offset); transform: translateY(0) scale(0.85); left: calc(var(--lmvz-select-padding-x) - 2px); background-color: var(--lmvz-select-bg); padding: 0 var(--lmvz-select-label-minimized-padding-x); opacity: 1; font-weight: 500; } label.sc-lmvz-select > span[aria-hidden='true'].sc-lmvz-select, div[aria-hidden='true'].sc-lmvz-select > span.sc-lmvz-select:first-child > span[aria-hidden='true'].sc-lmvz-select { color: var(--lmvz-select-error-color); margin-left: 2px; display: inline-block; line-height: 0; vertical-align: middle; } div[aria-hidden].sc-lmvz-select { display: flex; align-items: center; gap: var(--lmvz-select-gap); height: 100%; padding: 0 var(--lmvz-select-padding-x); border-radius: var(--lmvz-select-radius); background-color: var(--lmvz-select-bg); cursor: pointer; position: relative; z-index: 1; transition: background-color 0.15s ease; } .sc-lmvz-select-h:not([disabled]) .select-wrapper.sc-lmvz-select:hover div[aria-hidden].sc-lmvz-select { background-color: var(--lmvz-select-bg-hover); } .select-wrapper.sc-lmvz-select:focus-within div[aria-hidden].sc-lmvz-select { outline: 2px solid var(--lmvz-select-focus-color); outline-offset: 2px; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:first-child { flex: 1 0 0; font-size: var(--lmvz-component-component-typography-body-md-font-size, 0.875rem); font-weight: var(--lmvz-global-font-weight-500, 500); color: var(--lmvz-select-text-color); line-height: 1.4; letter-spacing: var(--lmvz-component-body-md-letter-spacing, 0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } div[aria-hidden].sc-lmvz-select > span.sc-lmvz-select:last-child { flex-shrink: 0; display: flex; align-items: center; justify-content: center; } img.sc-lmvz-select { display: block; width: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); height: var(--lmvz-component-icon-size-xs, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); } 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; }`;
|
|
10
|
+
|
|
11
|
+
let selectIdCounter = 0;
|
|
12
|
+
const LmvzSelect = class extends reactiveControllerHost.ReactiveControllerHost {
|
|
13
|
+
get el() { return index.getElement(this); }
|
|
14
|
+
get validationEl() {
|
|
15
|
+
return this.el;
|
|
16
|
+
}
|
|
17
|
+
selectId = `lmvz-select-${selectIdCounter++}`;
|
|
18
|
+
nativeSelectEl;
|
|
19
|
+
constructor(hostRef) {
|
|
20
|
+
super();
|
|
21
|
+
index.registerInstance(this, hostRef);
|
|
22
|
+
this.lmvzChange = index.createEvent(this, "lmvzChange");
|
|
23
|
+
this.addController(new reactiveControllerHost.AriaValidationController(this));
|
|
24
|
+
}
|
|
25
|
+
lmvzChange;
|
|
26
|
+
value;
|
|
27
|
+
label;
|
|
28
|
+
helperText;
|
|
29
|
+
disabled = false;
|
|
30
|
+
required = false;
|
|
31
|
+
name;
|
|
32
|
+
selectedLabel = '';
|
|
33
|
+
get hasValue() {
|
|
34
|
+
return Boolean(this.value);
|
|
35
|
+
}
|
|
36
|
+
componentDidLoad() {
|
|
37
|
+
this.syncSelectedLabel();
|
|
38
|
+
super.componentDidLoad();
|
|
39
|
+
}
|
|
40
|
+
handleValueChange(newValue) {
|
|
41
|
+
if (this.nativeSelectEl && this.nativeSelectEl.value !== (newValue ?? '')) {
|
|
42
|
+
this.nativeSelectEl.value = newValue ?? '';
|
|
43
|
+
}
|
|
44
|
+
this.syncSelectedLabel();
|
|
45
|
+
}
|
|
46
|
+
syncSelectedLabel() {
|
|
47
|
+
if (!this.nativeSelectEl)
|
|
48
|
+
return;
|
|
49
|
+
const idx = this.nativeSelectEl.selectedIndex;
|
|
50
|
+
this.selectedLabel = idx >= 0 ? (this.nativeSelectEl.options[idx]?.text ?? '') : '';
|
|
51
|
+
}
|
|
52
|
+
handleChange = (event) => {
|
|
53
|
+
const select = event.target;
|
|
54
|
+
this.value = select.value;
|
|
55
|
+
this.syncSelectedLabel();
|
|
56
|
+
this.lmvzChange.emit(select.value);
|
|
57
|
+
};
|
|
58
|
+
render() {
|
|
59
|
+
const hasValue = this.hasValue;
|
|
60
|
+
const shouldShowLabel = hasValue;
|
|
61
|
+
return (index.h(index.Host, { key: '7f4650d5971bb93dba48385df734e6b7a0b4f7eb' }, index.h("div", { key: '79d6234cd15f64c8bff787d715107e7e86145333', class: "select-wrapper" }, index.h("label", { key: '14d93469c6d309b68427ff7bfc2bd531c8f0ecf6', htmlFor: this.selectId, class: shouldShowLabel ? 'floating-label' : 'assistive-label' }, this.label, this.required && shouldShowLabel && index.h("span", { key: 'c8be809e09d768d6f73ccccdfbf0bf495869ac72', "aria-hidden": "true" }, " *")), index.h("div", { key: '1db5d44b44100342a4ca5feff648b61a0bdadb1a', "aria-hidden": "true" }, index.h("span", { key: '3fdc95aab9997a10f4ba42dabc3758aea0797a22' }, hasValue ? this.selectedLabel : this.label, this.required && !hasValue && index.h("span", { key: '11aef8194551059130b6be5351587219a1e80f00', "aria-hidden": "true" }, " *")), index.h("span", { key: '8fc52ff3e46d7b52d8d5069a74ebf7bb0d981081' }, index.h("img", { key: '129dd4038772eba9313e1e322866c70408f4e2ad', src: chevronDownSvg, alt: "" }))), index.h("select", { key: '6eb6cf496e60b3c1bd9556e596cbef34d4da5a09', id: this.selectId, ref: (el) => (this.nativeSelectEl = el), name: this.name, disabled: this.disabled, required: this.required, "aria-label": this.label, onChange: this.handleChange }, !hasValue && index.h("option", { key: '70d660e0bc7e4c127234ce77decf35d6fea7fe8d', value: "", disabled: true, selected: true, hidden: true }), index.h("slot", { key: 'e6cbc238c9c0cf8e8c31d0347a1f621272a94ca6' }))), this.helperText && index.h("div", { key: '432d405ee7338da46509ff207599b882a19ea44e', role: "status" }, this.helperText)));
|
|
62
|
+
}
|
|
63
|
+
static get watchers() { return {
|
|
64
|
+
"value": [{
|
|
65
|
+
"handleValueChange": 0
|
|
66
|
+
}]
|
|
67
|
+
}; }
|
|
68
|
+
};
|
|
69
|
+
LmvzSelect.style = lmvzSelectCss();
|
|
70
|
+
|
|
71
|
+
exports.lmvz_select = LmvzSelect;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CH-YLRgg.js');
|
|
4
4
|
var appGlobals = require('./app-globals-V2Kpy_OQ.js');
|
|
5
5
|
|
|
6
6
|
const defineCustomElements = async (win, options) => {
|
|
7
7
|
if (typeof window === 'undefined') return undefined;
|
|
8
8
|
await appGlobals.globalScripts();
|
|
9
|
-
return index.bootstrapLazy([["lmvz-action.cjs",[[257,"lmvz-action"]]],["lmvz-card.cjs",[[774,"lmvz-card",{"cardTitle":[1,"card-title"],"imageUrl":[1,"image-url"],"description":[1],"primaryActionLabel":[1,"primary-action-label"]}]]],["lmvz-chip.cjs",[[513,"lmvz-chip",{"text":[1]}]]],["
|
|
9
|
+
return index.bootstrapLazy([["lmvz-header_2.cjs",[[769,"lmvz-header",{"role":[2561],"lmvzActiveNav":[1,"lmvz-active-nav"]},null,{"lmvzActiveNav":[{"handleActiveNavChange":0}]}],[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-action.cjs",[[257,"lmvz-action"]]],["lmvz-button.cjs",[[785,"lmvz-button",{"ti":[2562,"tabindex"],"scale":[513],"variant":[513],"disabled":[516],"type":[1],"form":[1]}]]],["lmvz-card.cjs",[[774,"lmvz-card",{"cardTitle":[1,"card-title"],"imageUrl":[1,"image-url"],"description":[1],"primaryActionLabel":[1,"primary-action-label"]}]]],["lmvz-chip.cjs",[[513,"lmvz-chip",{"text":[1]}]]],["lmvz-icon.cjs",[[514,"lmvz-icon",{"icon":[513],"weight":[513],"size":[513],"ariaLabel":[513,"aria-label"],"iconData":[32],"visible":[32]},null,{"icon":[{"loadIconPathData":0}]}]]],["lmvz-input.cjs",[[838,"lmvz-input",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"placeholder":[1],"disabled":[516],"readonly":[516],"required":[516],"name":[1],"type":[1],"errorMessage":[1,"error-message"],"autocomplete":[1],"inputmode":[1],"autocorrect":[1],"autocapitalize":[1],"spellcheck":[4],"autofocus":[4],"minlength":[2],"maxlength":[2],"pattern":[1],"min":[8],"max":[8],"step":[8],"form":[1],"error":[6660],"nativeError":[32],"setValue":[64],"focusInput":[64],"blurInput":[64],"select":[64],"checkValidity":[64],"reportValidity":[64],"getInputElement":[64]},null,{"value":[{"handleValueChange":0}],"disabled":[{"handleDisabledChange":0}]}]]],["lmvz-menuitem.cjs",[[774,"lmvz-menuitem",{"role":[2561],"ti":[2562,"tabindex"]}]]],["lmvz-select.cjs",[[774,"lmvz-select",{"value":[1025],"label":[1],"helperText":[1,"helper-text"],"disabled":[516],"required":[516],"name":[1],"selectedLabel":[32]},null,{"value":[{"handleValueChange":0}]}]]]], options);
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.setNonce = index.setNonce;
|
|
13
13
|
exports.defineCustomElements = defineCustomElements;
|
|
14
|
-
//# sourceMappingURL=loader.cjs.js.map
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=loader.cjs.js.map
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ariaLoader = require('./aria-loader-BRxRUIyi.js');
|
|
4
|
+
var index = require('./index-CH-YLRgg.js');
|
|
5
|
+
|
|
6
|
+
class AriaValidationController {
|
|
7
|
+
host;
|
|
8
|
+
config;
|
|
9
|
+
visibilityObserver;
|
|
10
|
+
elementQueued = false;
|
|
11
|
+
elementValidated = false;
|
|
12
|
+
elementLoaded = false;
|
|
13
|
+
static knownValidationErrors = [];
|
|
14
|
+
get disabled() {
|
|
15
|
+
return !ariaLoader.isAriaValidationEnabled();
|
|
16
|
+
}
|
|
17
|
+
get useVerboseLogging() {
|
|
18
|
+
return this.config?.verboseLogging || index.Build.isDev || ariaLoader.useVerboseLogging();
|
|
19
|
+
}
|
|
20
|
+
constructor(host, config) {
|
|
21
|
+
this.host = host;
|
|
22
|
+
this.config = config;
|
|
23
|
+
}
|
|
24
|
+
onRuntimeConfigChange = () => {
|
|
25
|
+
if (!ariaLoader.isAriaValidationEnabled())
|
|
26
|
+
return;
|
|
27
|
+
this.checkLazyValidation();
|
|
28
|
+
};
|
|
29
|
+
hostDidLoad() {
|
|
30
|
+
this.elementLoaded = true;
|
|
31
|
+
if (typeof window !== 'undefined') {
|
|
32
|
+
window.addEventListener(ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
|
|
33
|
+
}
|
|
34
|
+
if (this.elementQueued || this.elementValidated)
|
|
35
|
+
return;
|
|
36
|
+
if (this.config?.validationTiming === 'slot') {
|
|
37
|
+
this.observeSlot();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (!this.host.validationEl?.checkVisibility() || this.config?.validationTiming !== 'load') {
|
|
41
|
+
this.observeVisibilityOnce();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.enqueueValidation();
|
|
45
|
+
}
|
|
46
|
+
hostDidUpdate() {
|
|
47
|
+
this.checkLazyValidation();
|
|
48
|
+
}
|
|
49
|
+
hostDisconnected() {
|
|
50
|
+
this.discardVisibilityObserver();
|
|
51
|
+
if (typeof window !== 'undefined') {
|
|
52
|
+
window.removeEventListener(ariaLoader.ARIA_VALIDATION_RUNTIME_CHANGED_EVENT, this.onRuntimeConfigChange);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
revalidateAria() {
|
|
56
|
+
this.enqueueValidation();
|
|
57
|
+
}
|
|
58
|
+
observeSlot() {
|
|
59
|
+
this.host.validationSlot?.addEventListener('slotchange', this.enqueueValidation.bind(this));
|
|
60
|
+
}
|
|
61
|
+
observeVisibilityOnce() {
|
|
62
|
+
window.setTimeout(() => {
|
|
63
|
+
if (!this.host.validationEl)
|
|
64
|
+
return;
|
|
65
|
+
this.visibilityObserver = new IntersectionObserver((entries) => {
|
|
66
|
+
for (const entry of entries) {
|
|
67
|
+
if (entry.target !== this.host.validationEl)
|
|
68
|
+
continue;
|
|
69
|
+
if (!entry.isIntersecting)
|
|
70
|
+
continue;
|
|
71
|
+
this.checkLazyValidation();
|
|
72
|
+
this.discardVisibilityObserver();
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
root: this.host.validationEl?.parentElement,
|
|
76
|
+
rootMargin: '0px',
|
|
77
|
+
threshold: 0.01,
|
|
78
|
+
});
|
|
79
|
+
this.visibilityObserver.observe(this.host.validationEl);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
checkLazyValidation() {
|
|
83
|
+
if (!this.elementLoaded)
|
|
84
|
+
return;
|
|
85
|
+
if (!this.config?.reValidateOnPropChanges && (this.elementQueued || this.elementValidated))
|
|
86
|
+
return;
|
|
87
|
+
if (!this.host.validationEl?.checkVisibility())
|
|
88
|
+
return;
|
|
89
|
+
this.enqueueValidation();
|
|
90
|
+
}
|
|
91
|
+
enqueueValidation() {
|
|
92
|
+
if (!ariaLoader.isAriaValidationEnabled())
|
|
93
|
+
return;
|
|
94
|
+
this.elementQueued = true;
|
|
95
|
+
ariaLoader.queueValidation({
|
|
96
|
+
context: { include: this.host.validationEl, exclude: AriaValidationController.knownValidationErrors },
|
|
97
|
+
onComplete: (error, results) => {
|
|
98
|
+
this.elementValidated = true;
|
|
99
|
+
const elementName = this.host.tagName || this.host.validationEl?.tagName || 'Element';
|
|
100
|
+
if (error) {
|
|
101
|
+
console.error('Error running ARIA validation:', error, elementName);
|
|
102
|
+
if (!this.host.validationEl?.tagName) {
|
|
103
|
+
console.dir(this.host);
|
|
104
|
+
}
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
const message = [elementName];
|
|
108
|
+
if (!results?.violations.length) {
|
|
109
|
+
if (this.useVerboseLogging) {
|
|
110
|
+
console.log(...message, 'has no ARIA violations');
|
|
111
|
+
if (!this.host.validationEl?.tagName) {
|
|
112
|
+
console.dir(this.host);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
const count = results.violations.length;
|
|
118
|
+
const label = [...message, results.violations.at(0).id, count > 1 ? `(+${count - 1} more)` : ''].filter(Boolean).join(' ');
|
|
119
|
+
if (this.useVerboseLogging) {
|
|
120
|
+
console.group(label);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
console.groupCollapsed(label);
|
|
124
|
+
}
|
|
125
|
+
const targets = results.violations.flatMap((violation) => {
|
|
126
|
+
console.dir(violation, { showHidden: true, compact: false });
|
|
127
|
+
return violation.nodes.map((node) => node.target);
|
|
128
|
+
});
|
|
129
|
+
if (this.host.validationEl) {
|
|
130
|
+
console.log('element:', this.host.validationEl);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
console.dir(this.host);
|
|
134
|
+
}
|
|
135
|
+
console.groupEnd();
|
|
136
|
+
AriaValidationController.knownValidationErrors.push(...targets);
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
discardVisibilityObserver() {
|
|
141
|
+
if (!this.visibilityObserver)
|
|
142
|
+
return;
|
|
143
|
+
this.visibilityObserver.disconnect();
|
|
144
|
+
this.visibilityObserver = undefined;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
class ReactiveControllerHost {
|
|
149
|
+
controllers = new Set();
|
|
150
|
+
addController(controller) {
|
|
151
|
+
this.controllers.add(controller);
|
|
152
|
+
}
|
|
153
|
+
removeController(controller) {
|
|
154
|
+
this.controllers.delete(controller);
|
|
155
|
+
}
|
|
156
|
+
get activeControllers() {
|
|
157
|
+
return Array.from(this.controllers).filter(controller => !controller.disabled);
|
|
158
|
+
}
|
|
159
|
+
connectedCallback() {
|
|
160
|
+
if (!this.controllers.size) {
|
|
161
|
+
console.warn('ReactiveControllerHost connected with no controllers registered.', this);
|
|
162
|
+
}
|
|
163
|
+
this.activeControllers.forEach(controller => controller.hostConnected?.());
|
|
164
|
+
}
|
|
165
|
+
disconnectedCallback() {
|
|
166
|
+
this.activeControllers.forEach(controller => controller.hostDisconnected?.());
|
|
167
|
+
}
|
|
168
|
+
componentWillLoad() {
|
|
169
|
+
this.activeControllers.forEach(controller => controller.hostWillLoad?.());
|
|
170
|
+
}
|
|
171
|
+
componentDidLoad() {
|
|
172
|
+
this.activeControllers.forEach(controller => controller.hostDidLoad?.());
|
|
173
|
+
}
|
|
174
|
+
componentWillRender() {
|
|
175
|
+
this.activeControllers.forEach(controller => controller.hostWillRender?.());
|
|
176
|
+
}
|
|
177
|
+
componentDidRender() {
|
|
178
|
+
this.activeControllers.forEach(controller => controller.hostDidRender?.());
|
|
179
|
+
}
|
|
180
|
+
componentWillUpdate() {
|
|
181
|
+
this.activeControllers.forEach(controller => controller.hostWillUpdate?.());
|
|
182
|
+
}
|
|
183
|
+
componentDidUpdate() {
|
|
184
|
+
this.activeControllers.forEach(controller => controller.hostDidUpdate?.());
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
exports.AriaValidationController = AriaValidationController;
|
|
189
|
+
exports.ReactiveControllerHost = ReactiveControllerHost;
|
|
@@ -5,7 +5,7 @@ export class LmvzAction {
|
|
|
5
5
|
this.actionClick.emit(event);
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '00da873d80f00dc57e5a0d60f2b58a6c505e41f1', onClick: this._onClick.bind(this) }, h("slot", { key: '7938b5e172ef2b027180aac801b0d9962cd68fa5' })));
|
|
9
9
|
}
|
|
10
10
|
static get is() { return "lmvz-action"; }
|
|
11
11
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,4 +43,3 @@ export class LmvzAction {
|
|
|
43
43
|
}];
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
//# sourceMappingURL=lmvz-action.js.map
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
@layer
|
|
3
|
-
/**
|
|
4
|
-
* reset: CSS resets for browser defaults or expectedly problematic 3rd party libraries
|
|
5
|
-
*/
|
|
6
|
-
lmvz-ds.reset,
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* theme: tokens, typography, etc.
|
|
10
|
-
*/
|
|
11
|
-
lmvz-ds.theme,
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* components: overrides for UI components and CSS-only component implementation
|
|
15
|
-
* Design System components should append their styles into this layer at definition!
|
|
16
|
-
*/
|
|
17
|
-
lmvz-ds.components,
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* overrides: utility classes, helpers, product- or application-specific styles.
|
|
21
|
-
* Usually, you do not want to add DS util styles to a layer directly.
|
|
22
|
-
* Only place those styles here, that are being exported as part of a theme.
|
|
23
|
-
*/
|
|
24
|
-
lmvz-ds.overrides;
|
|
2
|
+
@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides;
|
|
25
3
|
/**
|
|
26
|
-
* This defines the order of our lmvz-ds' CSS layers.
|
|
4
|
+
* This defines the order of our lmvz-ds' CSS layers. See readme.md for details.
|
|
27
5
|
* Important: Always import this file _before_ layering your own styles!
|
|
28
6
|
*/
|
|
29
7
|
@layer lmvz-ds.theme {
|
|
@@ -57,7 +57,7 @@ export class LmvzButton extends ReactiveControllerHost {
|
|
|
57
57
|
};
|
|
58
58
|
render() {
|
|
59
59
|
this.renderHiddenButton();
|
|
60
|
-
return (h(Host, { key: '
|
|
60
|
+
return (h(Host, { key: '9fb3bb6cc21e7d87fddb0313fd552e7070850881', "aria-disabled": this.disabled ? 'true' : null }, h("button", { key: '906117a1bb57fcc7e66a79be73959331066886be', ref: (e) => (this.validationEl = e), disabled: this.disabled, class: classNames(this.variant, { [this.scale ?? '']: !!this.scale, disabled: this.disabled }), ...this.inheritedAttributes }, h("slot", { key: '7028560eef75c978bea0ba3931100d4a6816ba37' }))));
|
|
61
61
|
}
|
|
62
62
|
static get is() { return "lmvz-button"; }
|
|
63
63
|
static get encapsulation() { return "shadow"; }
|
|
@@ -245,4 +245,3 @@ export class LmvzButton extends ReactiveControllerHost {
|
|
|
245
245
|
}
|
|
246
246
|
static get elementRef() { return "el"; }
|
|
247
247
|
}
|
|
248
|
-
//# sourceMappingURL=lmvz-button.js.map
|
|
@@ -1,29 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
@layer
|
|
3
|
-
/**
|
|
4
|
-
* reset: CSS resets for browser defaults or expectedly problematic 3rd party libraries
|
|
5
|
-
*/
|
|
6
|
-
lmvz-ds.reset,
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* theme: tokens, typography, etc.
|
|
10
|
-
*/
|
|
11
|
-
lmvz-ds.theme,
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* components: overrides for UI components and CSS-only component implementation
|
|
15
|
-
* Design System components should append their styles into this layer at definition!
|
|
16
|
-
*/
|
|
17
|
-
lmvz-ds.components,
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* overrides: utility classes, helpers, product- or application-specific styles.
|
|
21
|
-
* Usually, you do not want to add DS util styles to a layer directly.
|
|
22
|
-
* Only place those styles here, that are being exported as part of a theme.
|
|
23
|
-
*/
|
|
24
|
-
lmvz-ds.overrides;
|
|
2
|
+
@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides;
|
|
25
3
|
/**
|
|
26
|
-
* This defines the order of our lmvz-ds' CSS layers.
|
|
4
|
+
* This defines the order of our lmvz-ds' CSS layers. See readme.md for details.
|
|
27
5
|
* Important: Always import this file _before_ layering your own styles!
|
|
28
6
|
*/
|
|
29
7
|
@layer lmvz-ds.theme {
|