@lmvz-ds/components 0.35.2 → 0.36.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/assets/icons/calendar.svg +7 -0
- package/cjs/{aria-validation-controller-BC0Eaiv4.js → aria-validation-controller-Do0uEK4t.js} +1 -1
- package/cjs/aria.constants-DPK5mQEL.js +65 -0
- package/cjs/{directional-focus-controller-DBat-oF7.js → directional-focus-controller-8Xd_7MHT.js} +3 -1
- package/cjs/{element-activation-controller-BHqCUgQv.js → element-activation-controller-DzTUocEO.js} +1 -1
- package/cjs/{element.util-CRS_YJ59.js → element.util-BlhcwmfR.js} +8 -54
- package/cjs/{index-TGsVZNDP.js → index-BgvZ4y-3.js} +12 -0
- package/cjs/lmvz-action-list.cjs.entry.js +5 -4
- package/cjs/lmvz-action.cjs.entry.js +1 -1
- package/cjs/lmvz-button-group.cjs.entry.js +3 -2
- package/cjs/lmvz-button_2.cjs.entry.js +6 -5
- package/cjs/lmvz-card.cjs.entry.js +1 -1
- package/cjs/lmvz-checkbox.cjs.entry.js +40 -6
- package/cjs/lmvz-chip.cjs.entry.js +2 -2
- package/cjs/lmvz-components.cjs.js +2 -2
- package/cjs/lmvz-datepicker.cjs.entry.js +2771 -0
- package/cjs/lmvz-header_2.cjs.entry.js +7 -6
- package/cjs/lmvz-input.cjs.entry.js +71 -15
- package/cjs/lmvz-link.cjs.entry.js +2 -2
- package/cjs/lmvz-menuitem.cjs.entry.js +6 -5
- package/cjs/lmvz-message.cjs.entry.js +2 -2
- package/cjs/lmvz-modal.cjs.entry.js +5 -4
- package/cjs/lmvz-popover.cjs.entry.js +25 -10
- package/cjs/lmvz-radio.cjs.entry.js +63 -5
- package/cjs/lmvz-select.cjs.entry.js +425 -18
- package/cjs/lmvz-snackbar.cjs.entry.js +2 -2
- package/cjs/lmvz-spinner.cjs.entry.js +2 -2
- package/cjs/lmvz-tab.cjs.entry.js +2 -2
- package/cjs/lmvz-tabs.cjs.entry.js +5 -4
- package/cjs/lmvz-toggle.cjs.entry.js +7 -4
- package/cjs/loader.cjs.js +2 -2
- package/collection/assets/icons/calendar.svg +7 -0
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-checkbox/lmvz-checkbox.css +4 -2
- package/collection/components/lmvz-checkbox/lmvz-checkbox.js +68 -8
- package/collection/components/lmvz-datepicker/lmvz-datepicker.css +161 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.js +1002 -0
- package/collection/components/lmvz-datepicker/lmvz-datepicker.utils.js +189 -0
- package/collection/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.js +300 -0
- package/collection/components/lmvz-header/lmvz-header.js +1 -1
- package/collection/components/lmvz-icon/lmvz-icon.js +1 -1
- package/collection/components/lmvz-input/lmvz-input.css +1 -1
- package/collection/components/lmvz-input/lmvz-input.js +85 -12
- package/collection/components/lmvz-link/lmvz-link.js +1 -1
- package/collection/components/lmvz-menuitem/lmvz-menuitem.js +1 -1
- package/collection/components/lmvz-message/lmvz-message.js +1 -1
- package/collection/components/lmvz-modal/lmvz-modal.js +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.css +1 -1
- package/collection/components/lmvz-popover/lmvz-popover.js +50 -6
- package/collection/components/lmvz-radio/lmvz-radio.js +77 -9
- package/collection/components/lmvz-select/lmvz-select.css +96 -34
- package/collection/components/lmvz-select/lmvz-select.js +412 -21
- package/collection/components/lmvz-snackbar/lmvz-snackbar.js +1 -1
- package/collection/components/lmvz-spinner/lmvz-spinner.js +1 -1
- package/collection/components/lmvz-tab/lmvz-tab.js +1 -1
- package/collection/components/lmvz-tabs/lmvz-tabs.js +1 -1
- package/collection/components/lmvz-toggle/lmvz-toggle.js +21 -1
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/collection/styles/fragments/_focus-within.css +2 -2
- package/collection/utils/aria/aria.constants.js +7 -0
- package/collection/utils/aria/directional-focus-controller.js +3 -1
- package/collection/utils/aria/listbox-controller.js +154 -0
- package/collection/utils/element/element.util.js +5 -0
- package/collection/utils/radio/radio-group-controller.js +17 -0
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-action-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-datepicker.d.ts +11 -0
- package/components/lmvz-datepicker.d.ts.bak +11 -0
- package/components/lmvz-datepicker.js +1 -0
- 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-spinner.js +1 -1
- package/components/lmvz-tab.js +1 -1
- package/components/lmvz-tabs.js +1 -1
- package/components/lmvz-toggle.js +1 -1
- package/components/{p-Chj7BuUZ.js → p--FDdvoIg.js} +1 -1
- package/components/{p-CFTmV4XZ.js → p-BAj4FkUt.js} +1 -1
- package/components/p-BApwCp0R.js +1 -0
- package/components/{p-CxLd309t.js → p-BLMXiDE0.js} +1 -1
- package/components/{p-DGg7OzDl.js → p-BPYBmylI.js} +1 -1
- package/components/p-BhALzK62.js +1 -0
- package/components/{p-B_rnXUwq.js → p-Bnri3fEI.js} +1 -1
- package/components/p-C-pRMuMh.js +1 -0
- package/components/p-C5gRiLRR.js +1 -0
- package/components/{p-D5FL8n1q.js → p-CrQCHVKL.js} +1 -1
- package/components/p-DqdrUt_G.js +1 -0
- package/components/{p-CgK6-SEe.js → p-diOze8wI.js} +1 -1
- package/esm/{aria-validation-controller-BvOU1BO8.js → aria-validation-controller-Cp6pofER.js} +1 -1
- package/esm/aria.constants-DIyiticz.js +62 -0
- package/esm/{directional-focus-controller-DgAdCZrG.js → directional-focus-controller-QukTTWBE.js} +3 -1
- package/esm/{element-activation-controller-7PNSl6io.js → element-activation-controller-dxJZKMag.js} +1 -1
- package/esm/{element.util-BFcYfHYq.js → element.util-3ydVsxUW.js} +7 -54
- package/esm/{index-BPeerEwm.js → index-BOXP1Vx0.js} +12 -1
- package/esm/lmvz-action-list.entry.js +5 -4
- package/esm/lmvz-action.entry.js +1 -1
- package/esm/lmvz-button-group.entry.js +3 -2
- package/esm/lmvz-button_2.entry.js +6 -5
- package/esm/lmvz-card.entry.js +1 -1
- package/esm/lmvz-checkbox.entry.js +40 -6
- package/esm/lmvz-chip.entry.js +2 -2
- package/esm/lmvz-components.js +3 -3
- package/esm/lmvz-datepicker.entry.js +2769 -0
- package/esm/lmvz-header_2.entry.js +7 -6
- package/esm/lmvz-input.entry.js +71 -15
- package/esm/lmvz-link.entry.js +2 -2
- package/esm/lmvz-menuitem.entry.js +6 -5
- package/esm/lmvz-message.entry.js +2 -2
- package/esm/lmvz-modal.entry.js +5 -4
- package/esm/lmvz-popover.entry.js +25 -10
- package/esm/lmvz-radio.entry.js +63 -5
- package/esm/lmvz-select.entry.js +425 -18
- package/esm/lmvz-snackbar.entry.js +2 -2
- package/esm/lmvz-spinner.entry.js +2 -2
- package/esm/lmvz-tab.entry.js +2 -2
- package/esm/lmvz-tabs.entry.js +5 -4
- package/esm/lmvz-toggle.entry.js +7 -4
- package/esm/loader.js +3 -3
- package/hydrate/index.js +3474 -75
- package/hydrate/index.mjs +3474 -75
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/{p-eb62d4af.entry.js → p-0af0211a.entry.js} +1 -1
- package/lmvz-components/{p-5bbbcfc0.entry.js → p-0f65d001.entry.js} +1 -1
- package/lmvz-components/p-137b1fe1.entry.js +1 -0
- package/lmvz-components/p-26dd9684.entry.js +1 -0
- package/lmvz-components/p-36f44108.entry.js +1 -0
- package/lmvz-components/p-398b5cf4.entry.js +1 -0
- package/lmvz-components/p-3a396fc8.entry.js +1 -0
- package/lmvz-components/{p-0c05f24b.entry.js → p-3d5867df.entry.js} +1 -1
- package/lmvz-components/p-40716828.entry.js +1 -0
- package/lmvz-components/{p-a887018d.entry.js → p-492adf21.entry.js} +1 -1
- package/lmvz-components/{p-24d13be6.entry.js → p-4fa6e72f.entry.js} +1 -1
- package/lmvz-components/p-70f1e31a.entry.js +1 -0
- package/lmvz-components/p-71d06d1d.entry.js +1 -0
- package/lmvz-components/{p-d45164a8.entry.js → p-7a7aa922.entry.js} +1 -1
- package/lmvz-components/p-88661c50.entry.js +1 -0
- package/lmvz-components/p-91eb71bb.entry.js +1 -0
- package/lmvz-components/p-BA3wizqg.js +1 -0
- package/lmvz-components/{p-BPeerEwm.js → p-BOXP1Vx0.js} +2 -2
- package/lmvz-components/{p-D9PQIBzA.js → p-BeY96W7m.js} +1 -1
- package/lmvz-components/p-CHxiS3ja.js +1 -0
- package/lmvz-components/{p-wlMjNjuv.js → p-CPSyM_e-.js} +1 -1
- package/lmvz-components/p-DIyiticz.js +1 -0
- package/lmvz-components/p-a680a7b2.entry.js +1 -0
- package/lmvz-components/{p-c2544495.entry.js → p-a6fe9b61.entry.js} +1 -1
- package/lmvz-components/{p-ecbd9e93.entry.js → p-a99acb02.entry.js} +1 -1
- package/lmvz-components/p-f16a19fc.entry.js +1 -0
- package/lmvz-components/p-f3f0ed49.entry.js +1 -0
- package/lmvz-components/p-f516a949.entry.js +1 -0
- package/manifest.json +1305 -188
- package/package.json +5 -1
- package/types/api/ds.constants.d.ts +0 -1
- package/types/api/ds.types.d.ts +9 -0
- package/types/components/lmvz-action/lmvz-action.d.ts +0 -1
- package/types/components/lmvz-action-list/lmvz-action-list.d.ts +0 -1
- package/types/components/lmvz-button/lmvz-button.d.ts +0 -1
- package/types/components/lmvz-button-group/lmvz-button-group.d.ts +0 -1
- package/types/components/lmvz-card/lmvz-card.d.ts +0 -1
- package/types/components/lmvz-checkbox/lmvz-checkbox.d.ts +9 -2
- package/types/components/lmvz-chip/lmvz-chip.d.ts +0 -1
- package/types/components/lmvz-datepicker/lmvz-datepicker.d.ts +77 -0
- package/types/components/lmvz-datepicker/lmvz-datepicker.utils.d.ts +22 -0
- package/types/components/lmvz-datepicker/test/lmvz-datepicker.utils.unit.d.ts +1 -0
- package/types/components/lmvz-header/lmvz-header.d.ts +0 -1
- package/types/components/lmvz-icon/lmvz-icon.d.ts +0 -1
- package/types/components/lmvz-input/lmvz-input.d.ts +8 -1
- package/types/components/lmvz-link/lmvz-link.d.ts +0 -1
- package/types/components/lmvz-menuitem/lmvz-menuitem.d.ts +0 -1
- package/types/components/lmvz-message/lmvz-message.d.ts +0 -1
- package/types/components/lmvz-message/public.d.ts +0 -1
- package/types/components/lmvz-modal/lmvz-modal.d.ts +0 -1
- package/types/components/lmvz-modal/test/testing.d.ts +0 -1
- package/types/components/lmvz-popover/lmvz-popover.d.ts +2 -1
- package/types/components/lmvz-radio/lmvz-radio.d.ts +12 -3
- package/types/components/lmvz-select/lmvz-select.d.ts +53 -5
- package/types/components/lmvz-snackbar/lmvz-snackbar.d.ts +0 -1
- package/types/components/lmvz-snackbar/public.d.ts +0 -1
- package/types/components/lmvz-snackbar/snackbar-controller.d.ts +0 -1
- package/types/components/lmvz-spinner/lmvz-spinner.d.ts +0 -1
- package/types/components/lmvz-tab/lmvz-tab.d.ts +0 -1
- package/types/components/lmvz-tabs/lmvz-tabs.d.ts +0 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +1 -1
- package/types/components.d.ts +312 -12
- package/types/index.d.ts +0 -1
- package/types/utils/aria/aria-validation-controller.d.ts +0 -1
- package/types/utils/aria/aria.constants.d.ts +1 -1
- package/types/utils/aria/directional-focus-controller.d.ts +0 -1
- package/types/utils/aria/element-activation-controller.d.ts +0 -1
- package/types/utils/aria/listbox-controller.d.ts +42 -0
- package/types/utils/async/async.util.d.ts +1 -2
- package/types/utils/data/event.util.d.ts +0 -1
- package/types/utils/data/number.util.d.ts +0 -1
- package/types/utils/data/object.util.d.ts +0 -1
- package/types/utils/data/time.util.d.ts +0 -1
- package/types/utils/element/element.util.d.ts +1 -1
- package/types/utils/environment.d.ts +0 -1
- package/types/utils/icons/icons-registry.d.ts +0 -1
- package/types/utils/icons/icons.d.ts +0 -1
- package/types/utils/icons/icons.unit.d.ts +0 -1
- package/types/utils/icons/public.d.ts +0 -1
- package/types/utils/public.d.ts +0 -1
- package/types/utils/radio/radio-group-controller.d.ts +3 -1
- package/types/utils/stencil/assets.d.ts +0 -1
- package/types/utils/stencil/reactive-controller-host.d.ts +0 -1
- package/types/utils/stencil/stencil.util.d.ts +0 -1
- package/components/p-DLUsBYJH.js +0 -1
- package/components/p-zMWemcoB.js +0 -1
- package/lmvz-components/p-194a3af5.entry.js +0 -1
- package/lmvz-components/p-46edf36f.entry.js +0 -1
- package/lmvz-components/p-5ff55ba9.entry.js +0 -1
- package/lmvz-components/p-888e04d7.entry.js +0 -1
- package/lmvz-components/p-9dc420e2.entry.js +0 -1
- package/lmvz-components/p-BFcYfHYq.js +0 -1
- package/lmvz-components/p-BuEA0MWd.js +0 -1
- package/lmvz-components/p-aaa7691c.entry.js +0 -1
- package/lmvz-components/p-b6dd045b.entry.js +0 -1
- package/lmvz-components/p-c3e62aba.entry.js +0 -1
- package/lmvz-components/p-d4154a65.entry.js +0 -1
- package/lmvz-components/p-e4ce63b3.entry.js +0 -1
- package/lmvz-components/p-eb4c5a6f.entry.js +0 -1
- package/lmvz-components/p-f42b16e6.entry.js +0 -1
- package/lmvz-components/p-fbf066d9.entry.js +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, h, H as Host } from './index-
|
|
2
|
-
import { A as AriaValidationController } from './aria-validation-controller-
|
|
3
|
-
import { D as DirectionalFocusController } from './directional-focus-controller-
|
|
1
|
+
import { g as getElement, r as registerInstance, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
|
+
import { A as AriaValidationController } from './aria-validation-controller-Cp6pofER.js';
|
|
3
|
+
import { D as DirectionalFocusController } from './directional-focus-controller-QukTTWBE.js';
|
|
4
4
|
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
5
5
|
export { lmvz_menuitem } from './lmvz-menuitem.entry.js';
|
|
6
6
|
import './aria-loader-BfH06m7H.js';
|
|
7
|
-
import './element.util-
|
|
8
|
-
import './
|
|
7
|
+
import './element.util-3ydVsxUW.js';
|
|
8
|
+
import './aria.constants-DIyiticz.js';
|
|
9
|
+
import './element-activation-controller-dxJZKMag.js';
|
|
9
10
|
|
|
10
11
|
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDYiIGhlaWdodD0iNzIiIHZpZXdCb3g9IjAgMCA0NiA3MiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzI3Ml80MDUpIj4KPHBhdGggZD0iTTEyLjUgMjAuNjVDMTMuMSAyMC42NSAxNC4yIDIwLjM1IDE0LjcgMjAuMzVDMTYuMSAyMC4zNSAxNy4yIDIxLjQ1IDE3LjIgMjIuODVDMTcuMiAyNC4yNSAxNi4xIDI1LjM1IDE0LjcgMjUuMzVIMi44QzEuMiAyNS4zNSAwIDI0LjE1IDAgMjIuNTVDMCAyMS45NSAwLjIgMjAuNjUgMC4yIDIwLjA1VjUuODQ5OTlDMC4yIDUuMTQ5OTkgMCAzLjk0OTk5IDAgMy4zNDk5OUMwIDEuNzQ5OTkgMS4yIDAuNTQ5OTg4IDIuOCAwLjU0OTk4OEM0LjMgMC41NDk5ODggNS42IDEuNzQ5OTkgNS42IDMuMzQ5OTlDNS42IDMuOTQ5OTkgNS40IDUuMTQ5OTkgNS40IDUuODQ5OTlWMjAuNTVIMTIuNVYyMC42NVpNMjIuMSAyMi43NUMyMi4xIDIyLjE1IDIyLjMgMjAuOTUgMjIuMyAyMC4yNVY1Ljg0OTk5QzIyLjMgNS4xNDk5OSAyMi4xIDMuOTQ5OTkgMjIuMSAzLjQ0OTk5QzIyLjEgMS45NDk5OSAyMy4yIDAuNzQ5OTg4IDI0LjYgMC43NDk5ODhIMjUuMkMyNi40IDAuNzQ5OTg4IDI3LjIgMS41NDk5OSAyNy42IDIuNjQ5OTlMMjggMy40NDk5OUwzMi45IDE0LjA1QzMzLjMgMTQuOTUgMzMuNyAxNi4wNSAzNCAxNi43NUMzNC4zIDE2LjA1IDM0LjcgMTQuOTUgMzUuMSAxNC4wNUw0MCAzLjU0OTk5TDQwLjMgMi41NDk5OUM0MC43IDEuNTQ5OTkgNDEuNSAwLjY0OTk4OCA0Mi42IDAuNjQ5OTg4SDQzLjJDNDQuNyAwLjY0OTk4OCA0NS43IDEuODQ5OTkgNDUuNyAzLjM0OTk5QzQ1LjcgMy45NDk5OSA0NS41IDUuMTQ5OTkgNDUuNSA1Ljc0OTk5VjIwLjE1QzQ1LjUgMjAuODUgNDUuNyAyMi4wNSA0NS43IDIyLjY1QzQ1LjcgMjQuMjUgNDQuNSAyNS40NSA0MyAyNS40NUM0MS40IDI1LjQ1IDQwLjMgMjQuMjUgNDAuMyAyMi42NUM0MC4zIDIxLjk1IDQwLjQgMjAuNzUgNDAuNCAyMC4xNUw0MC42IDE0LjA1QzQwLjYgMTMuMTUgNDAuNyAxMS43NSA0MC43IDEwLjY1TDM3IDE5LjA1QzM2LjcgMTkuNzUgMzYuNiAxOS45NSAzNi40IDIwLjM1QzM2IDIxLjI1IDM1LjMgMjEuODUgMzMuOSAyMS44NUMzMi41IDIxLjg1IDMxLjggMjEuMjUgMzEuNCAyMC40NUMzMS4yIDIwLjA1IDMxLjIgMTkuNzUgMzAuOCAxOS4wNUwyNyAxMC43NUMyNyAxMC43NSAyNy4xIDEzLjE1IDI3LjIgMTQuMDVMMjcuNCAyMC4xNUMyNy40IDIwLjg1IDI3LjUgMjEuOTUgMjcuNSAyMi42NUMyNy41IDI0LjI1IDI2LjQgMjUuNDUgMjQuOCAyNS40NUMyMy4zIDI1LjU1IDIyLjEgMjQuMjUgMjIuMSAyMi43NVpNMjguNyAzMi45NUMyOS4xIDMyLjk1IDMwLjIgMzMuMTUgMzAuNyAzMy4xNUg0MS44QzQyLjMgMzMuMTUgNDMuMiAzMi45NSA0My43IDMyLjk1QzQ0LjkgMzIuOTUgNDUuOCAzMy44NSA0NS44IDM1LjA1QzQ1LjggMzYuMTUgNDQuOSAzNy4xNSA0My43IDM3LjE1QzQzLjMgMzcuMTUgNDIuMyAzNi45NSA0MS44IDM2Ljk1SDMwLjhDMzAuMyAzNi45NSAyOS4yIDM3LjE1IDI4LjggMzcuMTVDMjcuNiAzNy4xNSAyNi43IDM2LjI1IDI2LjcgMzUuMDVDMjYuNiAzMy45NSAyNy41IDMyLjk1IDI4LjcgMzIuOTVaTTIuMSA2Ny4yNUMyLjUgNjcuMjUgMy42IDY3LjQ1IDQuMSA2Ny40NUgxOC41QzE5IDY3LjQ1IDE5LjkgNjcuMjUgMjAuNCA2Ny4yNUMyMS42IDY3LjI1IDIyLjUgNjguMTUgMjIuNSA2OS4zNUMyMi41IDcwLjQ1IDIxLjYgNzEuNDUgMjAuNCA3MS40NUMyMCA3MS40NSAxOSA3MS4yNSAxOC41IDcxLjI1SDQuMUMzLjYgNzEuMjUgMi41IDcxLjQ1IDIuMSA3MS40NUMwLjkgNzEuNDUgMCA3MC41NSAwIDY5LjM1QzAgNjguMjUgMC45IDY3LjI1IDIuMSA2Ny4yNVpNMjEuOSAzNS42NUMyMS45IDM1Ljk1IDIxLjggMzYuMzUgMjEuNiAzNi43NUMyMS4zIDM3LjQ1IDIwLjkgMzguMzUgMjAuNyAzOC44NUwxNC43IDU0LjY1QzE0LjUgNTUuMDUgMTQuNCA1NS41NSAxNC4yIDU2LjM1QzEzLjggNTcuNjUgMTIuNiA1OC4yNSAxMS4yIDU4LjI1SDEwLjhDOS40IDU4LjI1IDguMiA1Ny43NSA3LjggNTYuMzVDNy42IDU1LjU1IDcuNCA1NS4xNSA3LjIgNTQuNjVMMS4yIDM4Ljg1QzEgMzguMzUgMC42IDM3LjU1IDAuMiAzNi44NUMwLjEgMzYuNDUgMCAzNS45NSAwIDM1LjY1QzAgMzQuMTUgMS4yIDMyLjg1IDIuOCAzMi44NUMzLjkgMzIuODUgNSAzMy41NSA1LjMgMzQuNzVDNS41IDM1LjU1IDUuNSAzNi4xNSA2IDM3LjU1TDEwLjIgNDkuNDVDMTAuNSA1MC4zNSAxMC45IDUxLjQ1IDExLjEgNTIuMzVDMTEuMyA1MS40NSAxMS42IDUwLjQ1IDExLjkgNDkuNTVMMTYgMzcuNTVDMTYuNSAzNi4wNSAxNi40IDM1LjY1IDE2LjcgMzQuODVDMTcuMSAzMy42NSAxOC4xIDMyLjg1IDE5LjMgMzIuODVDMjAuOSAzMi44NSAyMS45IDM0LjE1IDIxLjkgMzUuNjVaTTI5LjcgNzEuNDVDMjguMiA3MS40NSAyNy4yIDcwLjQ1IDI3LjIgNjkuMTVDMjcuMiA2OC43NSAyNy4yIDY4LjI1IDI3LjggNjcuNDVMMzcuNCA1My40NUMzNy45IDUyLjc1IDM4LjUgNTIuMDUgMzkuMSA1MS4zNUgzMi4yQzMxLjUgNTEuMzUgMzAuNyA1MS42NSAzMC4xIDUxLjY1QzI4LjcgNTEuNjUgMjcuNiA1MC43NSAyNy42IDQ5LjM1QzI3LjYgNDcuOTUgMjguNyA0Ni45NSAzMC4xIDQ2Ljk1SDQyLjdDNDQuMiA0Ni45NSA0NS4yIDQ3Ljg1IDQ1LjIgNDkuMjVDNDUuMiA0OS42NSA0NSA1MC4zNSA0NC41IDUxLjA1TDM1LjIgNjQuODVDMzQuNyA2NS42NSAzNC4xIDY2LjQ1IDMzLjUgNjcuMDVINDEuMUM0MS45IDY3LjA1IDQyLjcgNjYuNzUgNDMuMyA2Ni43NUM0NC43IDY2Ljc1IDQ1LjcgNjcuNzUgNDUuNyA2OS4wNUM0NS43IDcwLjU1IDQ0LjUgNzEuNTUgNDMuMiA3MS41NUgyOS43VjcxLjQ1WiIgZmlsbD0iYmxhY2siLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8yNzJfNDA1Ij4KPHJlY3Qgd2lkdGg9IjQ2IiBoZWlnaHQ9IjcyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=';
|
|
11
12
|
|
|
@@ -96,7 +97,7 @@ const LmvzHeader = class extends ReactiveControllerHost {
|
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
render() {
|
|
99
|
-
return (h(Host, { key: '
|
|
100
|
+
return (h(Host, { key: '77744fd74160551232eb0347e9ebb01eb3b9bec0', onFocus: this.delegateFocus.bind(this) }, h("div", { key: 'dfd78b2a2ab06b010d9f29dd61f57aced82243fe', class: "brand" }, h("slot", { key: 'c6d29bbdbcbe581a8a170fbeb3d6ab1e31d27dcd', name: "brand" }, h("img", { key: '80cea3b254d153411864d52c2ba300e0eb3c57a7', id: "fallback-logo-lmvz", src: logoSvg, alt: "Lehrmittelverlag Z\u00FCrich" }))), h("nav", { key: '71c53ae0300b61291d0763cdb23f1f645a83928a', "aria-label": "Hauptnavigation" }, h("div", { key: '09949b77a66c54a10c4c141de846fd5697b9d445', role: "menubar", class: "primary-menubar" }, h("slot", { key: 'acec0cf7e13325c49d1e0929b90b056ad1cbbe64', name: "nav-primary", ref: (el) => (this.primarySlot = el) }), h("div", { key: 'd35860c71ad5e28ee2e3aaafb157acbeff41d83e', role: "menu", id: "nav-secondary", class: "secondary-menubar", hidden: !this.lmvzActiveNav, ref: (el) => (this.secondaryNav = el) }, h("slot", { key: 'a4c3a1ad1b1de5bd903b54ed6bd1616ce6517bbb', name: this.secondarySlotName, ref: (el) => (this.secondarySlot = el) })))), h("div", { key: 'ff50045d9ab28bf66a619a48d9ea1f0ed2f5f952', class: "actions" }, h("slot", { key: '6ead0b7a54bf93bb06f0eab2aa8159bd6e96e8f5', name: "actions" }))));
|
|
100
101
|
}
|
|
101
102
|
static get watchers() { return {
|
|
102
103
|
"lmvzActiveNav": [{
|
package/esm/lmvz-input.entry.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h } from './index-BOXP1Vx0.js';
|
|
2
2
|
import { c as classNames } from './index-BfTCfPZ1.js';
|
|
3
|
-
import { A as AriaValidationController } from './aria-validation-controller-
|
|
3
|
+
import { A as AriaValidationController } from './aria-validation-controller-Cp6pofER.js';
|
|
4
|
+
import { b as ariaHostMirrorAttributes } from './aria.constants-DIyiticz.js';
|
|
4
5
|
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
5
6
|
import { c as componentOnReady } from './stencil.util-D2-5rsN3.js';
|
|
6
7
|
import './aria-loader-BfH06m7H.js';
|
|
7
8
|
import './async.util-DZj20TV1.js';
|
|
8
9
|
|
|
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('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-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, #a1a1a1); --input-border-color-focus: var(--lmvz-semantic-color-border-active, #0f8acc); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } [size='sm'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --input-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --input-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --input-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='md'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); } [size='lg'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --input-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --input-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --input-font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .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: var(--input-gap); } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .
|
|
10
|
+
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('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-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, #a1a1a1); --input-border-color-focus: var(--lmvz-semantic-color-border-active, #0f8acc); --input-border-width: var(--lmvz-semantic-border-width-default, 1px); --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --label-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --input-text-color: var(--lmvz-semantic-color-on-surface-input-primary, #000000); --helper-text-color: var(--lmvz-semantic-color-on-surface-input-secondary, #545454); --error-text-color: var(--lmvz-semantic-color-status-on-danger, #a31419); --label-minimized-bg: var(--input-bg); --label-minimized-padding-x: 4px; --input-disabled-opacity: var(--lmvz-component-input-disabled-opacity, 40%); } [size='sm'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); --input-padding-x: var(--lmvz-component-input-padding-sm, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); --input-gap: var(--lmvz-component-input-gap-sm, clamp(0.38rem, 0.31rem + 0.26vw, 0.63rem)); --input-font-size: var(--lmvz-component-body-sm-font-size, clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem)); } [size='md'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-md, clamp(2.5rem, 2.44rem + 0.26vw, 2.75rem)); --input-padding-x: var(--lmvz-component-input-padding-md, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); --input-gap: var(--lmvz-component-input-gap-md, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); --input-font-size: var(--lmvz-component-body-md-font-size, clamp(0.88rem, 0.84rem + 0.13vw, 1rem)); } [size='lg'].sc-lmvz-input-h { --input-height: var(--lmvz-component-input-size-lg, clamp(2.75rem, 2.69rem + 0.26vw, 3rem)); --input-padding-x: var(--lmvz-component-input-padding-lg, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); --input-gap: var(--lmvz-component-input-gap-lg, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); --input-font-size: var(--lmvz-component-body-lg-font-size, clamp(1rem, 0.97rem + 0.13vw, 1.13rem)); } .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: var(--input-gap); } [disabled].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { opacity: var(--input-disabled-opacity); cursor: not-allowed; pointer-events: none; } .sc-lmvz-input-h:has(:focus-visible) .input-wrapper.sc-lmvz-input { border-color: var(--input-border-color-focus); outline: var(--lmvz-ds-outline, 1px solid #0e7ab4); outline-offset: var(--lmvz-ds-outline-offset, clamp(0.25rem, 0.19rem + 0.26vw, 0.5rem)); } [error].sc-lmvz-input-h .input-wrapper.sc-lmvz-input { border-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: var(--input-font-size); font-weight: 400; pointer-events: none; transition: all 0.2s ease-out; background-color: transparent; padding: 0; margin: 0; line-height: 1.5; white-space: nowrap; } label.floating.sc-lmvz-input { top: 0.5em; transform: translateY(-100%); transform-origin: left top; font-size: var(--lmvz-component-body-2xs-font-size, clamp(0.5rem, 0.47rem + 0.13vw, 0.63rem)); background-color: var(--label-minimized-bg); padding: 0 var(--label-minimized-padding-x); left: -2px; color: var(--input-text-color); font-weight: 400; } .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: var(--input-font-size); 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: var(--input-padding-x); font-size: 12px; color: var(--helper-text-color); font-weight: 400; } [role='alert'].sc-lmvz-input { padding-top: 8px; padding-left: var(--input-padding-x); font-size: 12px; color: var(--error-text-color); font-weight: 400; } .sc-lmvz-input-s > lmvz-button { --lmvz-button-padding: var(--lmvz-dimension-6-4, clamp(0.25rem, 0.22rem + 0.13vw, 0.38rem)); --lmvz-button-min-height-override: var(--lmvz-component-input-size-sm, clamp(2rem, 1.94rem + 0.26vw, 2.25rem)); }`;
|
|
10
11
|
|
|
11
12
|
let inputIdCounter = 0;
|
|
12
13
|
const LmvzInput = class extends ReactiveControllerHost {
|
|
@@ -16,9 +17,11 @@ const LmvzInput = class extends ReactiveControllerHost {
|
|
|
16
17
|
}
|
|
17
18
|
lmvzInput;
|
|
18
19
|
internals;
|
|
20
|
+
inputValidityActive = false;
|
|
19
21
|
nativeInputElement;
|
|
20
22
|
inputId = `lmvz-input-${inputIdCounter++}`;
|
|
21
23
|
initialValue = '';
|
|
24
|
+
ariaHostMirrorObserver;
|
|
22
25
|
nativeError = false;
|
|
23
26
|
errorFromProp = false;
|
|
24
27
|
get helperId() {
|
|
@@ -71,7 +74,7 @@ const LmvzInput = class extends ReactiveControllerHost {
|
|
|
71
74
|
async setValue(newValue) {
|
|
72
75
|
const input = this.nativeInputElement;
|
|
73
76
|
const val = newValue ?? '';
|
|
74
|
-
if (input) {
|
|
77
|
+
if (input && input.value !== val) {
|
|
75
78
|
input.value = val;
|
|
76
79
|
}
|
|
77
80
|
this.value = val;
|
|
@@ -93,6 +96,9 @@ const LmvzInput = class extends ReactiveControllerHost {
|
|
|
93
96
|
async reportValidity() {
|
|
94
97
|
return this.nativeInputElement?.reportValidity?.() ?? false;
|
|
95
98
|
}
|
|
99
|
+
async getValidationMessage() {
|
|
100
|
+
return this.nativeInputElement?.validationMessage ?? '';
|
|
101
|
+
}
|
|
96
102
|
async getInputElement() {
|
|
97
103
|
if (!this.nativeInputElement) {
|
|
98
104
|
await new Promise((resolve) => componentOnReady(this.el, resolve));
|
|
@@ -118,14 +124,54 @@ const LmvzInput = class extends ReactiveControllerHost {
|
|
|
118
124
|
this.initialValue = this.value ?? '';
|
|
119
125
|
super.componentWillLoad();
|
|
120
126
|
}
|
|
127
|
+
connectedCallback() {
|
|
128
|
+
super.connectedCallback();
|
|
129
|
+
this.ariaHostMirrorObserver = new MutationObserver((mutations) => {
|
|
130
|
+
for (const mutation of mutations) {
|
|
131
|
+
this.mirrorHostAriaAttribute(mutation.attributeName);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
this.ariaHostMirrorObserver.observe(this.el, {
|
|
135
|
+
attributes: true,
|
|
136
|
+
attributeFilter: [...ariaHostMirrorAttributes],
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
disconnectedCallback() {
|
|
140
|
+
super.disconnectedCallback();
|
|
141
|
+
this.ariaHostMirrorObserver?.disconnect();
|
|
142
|
+
this.ariaHostMirrorObserver = undefined;
|
|
143
|
+
}
|
|
144
|
+
componentDidLoad() {
|
|
145
|
+
super.componentDidLoad();
|
|
146
|
+
for (const attr of ariaHostMirrorAttributes) {
|
|
147
|
+
this.mirrorHostAriaAttribute(attr);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
mirrorHostAriaAttribute(attr) {
|
|
151
|
+
if (!attr || !this.nativeInputElement)
|
|
152
|
+
return;
|
|
153
|
+
if (this.el.hasAttribute(attr)) {
|
|
154
|
+
const value = this.el.getAttribute(attr);
|
|
155
|
+
if (value !== null) {
|
|
156
|
+
this.nativeInputElement.setAttribute(attr, value);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
this.nativeInputElement.removeAttribute(attr);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
121
163
|
formAssociatedCallback(form) {
|
|
122
164
|
if (!form)
|
|
123
165
|
return;
|
|
124
166
|
this.internals.setFormValue?.(this.value ?? '');
|
|
125
167
|
}
|
|
126
168
|
formResetCallback() {
|
|
169
|
+
this.inputValidityActive = false;
|
|
127
170
|
this.internals.setValidity({});
|
|
128
171
|
this.setValue(this.initialValue);
|
|
172
|
+
if (this.nativeInputElement?.checkValidity?.()) {
|
|
173
|
+
this.nativeError = false;
|
|
174
|
+
}
|
|
129
175
|
}
|
|
130
176
|
formStateRestoreCallback(state) {
|
|
131
177
|
this.setValue(state);
|
|
@@ -139,35 +185,45 @@ const LmvzInput = class extends ReactiveControllerHost {
|
|
|
139
185
|
this.setValue(newValue);
|
|
140
186
|
}
|
|
141
187
|
handleDisabledChange(disabled) {
|
|
142
|
-
if (
|
|
188
|
+
if (!this.nativeInputElement)
|
|
189
|
+
return;
|
|
190
|
+
if (disabled) {
|
|
143
191
|
this.nativeInputElement.blur();
|
|
144
192
|
}
|
|
193
|
+
else {
|
|
194
|
+
this.inputValidityActive = false;
|
|
195
|
+
}
|
|
145
196
|
}
|
|
146
197
|
handleInput = (event) => {
|
|
147
198
|
const input = event.target;
|
|
148
199
|
this.setValue(input.value);
|
|
200
|
+
if (!this.inputValidityActive)
|
|
201
|
+
return;
|
|
202
|
+
this.updateNativeError('input');
|
|
149
203
|
};
|
|
150
204
|
handleChange = (event) => {
|
|
151
|
-
const input = event.target ?? this.nativeInputElement;
|
|
152
|
-
this.updateNativeError(input);
|
|
153
205
|
};
|
|
154
206
|
handleFocus = () => { };
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
207
|
+
handleInvalid = () => this.updateNativeError('invalid');
|
|
208
|
+
handleBlur = () => {
|
|
209
|
+
this.inputValidityActive = true;
|
|
210
|
+
this.updateNativeError('blur');
|
|
158
211
|
};
|
|
159
|
-
updateNativeError(
|
|
160
|
-
const input =
|
|
212
|
+
updateNativeError(sourceEvent) {
|
|
213
|
+
const input = this.nativeInputElement;
|
|
161
214
|
if (!input)
|
|
162
215
|
return;
|
|
163
|
-
|
|
216
|
+
const newState = sourceEvent === 'invalid' ? true : !(input.checkValidity?.() ?? true);
|
|
217
|
+
if (this.nativeError === newState)
|
|
218
|
+
return;
|
|
219
|
+
this.nativeError = newState;
|
|
164
220
|
}
|
|
165
221
|
render() {
|
|
166
222
|
const hasValue = Boolean(this.value);
|
|
167
223
|
const shouldFloatLabel = hasValue || Boolean(this.placeholder);
|
|
168
|
-
return (h("div", { key: '
|
|
224
|
+
return (h("div", { key: '626697f00e9ba3ad46e6304d06b04df0f27bb2c2', class: classNames('input-container', {
|
|
169
225
|
'interaction-filled': hasValue,
|
|
170
|
-
}) }, h("div", { key: '
|
|
226
|
+
}) }, h("div", { key: '25ec1f448b689ff80defded1323f321d95d6b197', class: "input-wrapper" }, h("slot", { key: '1d5f301e0327b4cd1714f403615f94658a754466', name: "before-input" }), h("div", { key: 'ef553e6e8f6b74a5bb7cddef003d3b51650c7c9d', class: "label-input-group" }, h("label", { key: '17d92ff7c65598739e8a379680580561936e21dc', htmlFor: this.inputId, class: classNames({ floating: shouldFloatLabel }) }, this.label, this.required && (h("span", { key: 'cd40da3c85cc6cea49d7d8d270bba317534779f5', class: "required-indicator", "aria-hidden": "true" }, ' ', "*"))), h("input", { key: '3ede0644d383c2a3f702230de2aac6fbcb2c7a06', 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, onInvalid: this.handleInvalid })), h("slot", { key: 'b282c5d9553b72af7fd05ed0f872af0d7b8a5689', name: "after-input" })), h("div", { key: 'da6008e798cb5ee29fa7d1ba3208057c1845a217', id: this.helperId, role: "status" }, this.helperText || null), h("div", { key: '5e7717a2d0dd32c53dd7ba6e170152239f3bfae9', id: this.errorId, role: "alert" }, (this.showErrorMessage && this.errorMessage) || null)));
|
|
171
227
|
}
|
|
172
228
|
static get formAssociated() { return true; }
|
|
173
229
|
static get watchers() { return {
|
package/esm/lmvz-link.entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
2
|
import { t as toValidSvgStringWithFallback } from './svg-Dz3GD0LB.js';
|
|
3
3
|
import { l as linkTypes } from './ds.constants-0ctLESas.js';
|
|
4
4
|
import './logger-D06Ds9Dh.js';
|
|
@@ -53,7 +53,7 @@ const LmvzLink = class {
|
|
|
53
53
|
const rel = this.computeRel();
|
|
54
54
|
const iconSvg = this.type === 'external' ? EXTERNAL_SVG : ARROW_RIGHT_SVG;
|
|
55
55
|
const isBlank = this.target === '_blank';
|
|
56
|
-
return (h(Host, { key: '
|
|
56
|
+
return (h(Host, { key: 'ee4f5c107243ff858f9189840e56a0525fdac782' }, h("a", { key: '28229373bec276579c2bb7b9fcf254872baae9e8', href: this.computeHref(), target: this.target, rel: rel }, h("slot", { key: '7c58f3f7501e457ee4a35d2a9f2bf80ed0c33fb0' }), h("lmvz-icon", { key: '14784743d148d57e7c83da0f92ba96e4bb3a30a1', "aria-hidden": "true", icon: iconSvg }), isBlank && h("span", { key: 'f72adde57b462282d1a8313e2eb06cf6b68c2697', class: "sr-only" }, this.externalLabel))));
|
|
57
57
|
}
|
|
58
58
|
static get delegatesFocus() { return true; }
|
|
59
59
|
static get watchers() { return {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { A as AriaValidationController } from './aria-validation-controller-
|
|
3
|
-
import { E as ElementActivationController } from './element-activation-controller-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
|
+
import { A as AriaValidationController } from './aria-validation-controller-Cp6pofER.js';
|
|
3
|
+
import { E as ElementActivationController } from './element-activation-controller-dxJZKMag.js';
|
|
4
4
|
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
5
5
|
import './aria-loader-BfH06m7H.js';
|
|
6
|
-
import './element.util-
|
|
6
|
+
import './element.util-3ydVsxUW.js';
|
|
7
|
+
import './aria.constants-DIyiticz.js';
|
|
7
8
|
|
|
8
9
|
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('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-menuitem-h { display: inline-flex; flex-direction: row; align-items: center; justify-content: center; gap: var(--lmvz-component-input-md-gap-x, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); border-radius: var(--lmvz-semantic-border-radius-lg, 14px); font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); padding: var(--lmvz-component-input-md-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-input-md-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)); cursor: pointer; --lmvz-menuitem-color: var(--lmvz-semantic-color-int-on-tertiary, #000000); --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary, #ffffff); background: var(--lmvz-menuitem-background); color: var(--lmvz-menuitem-color); } .sc-lmvz-menuitem-h:hover { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); } .sc-lmvz-menuitem-h:active { --lmvz-menuitem-background: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); } .sc-lmvz-menuitem-h:focus-visible { z-index: 1; } [aria-expanded='true'].sc-lmvz-menuitem-h { --lmvz-menuitem-background: var(--lmvz-semantic-color-status-active, #f6fbfe); --lmvz-menuitem-color: var(--lmvz-semantic-color-status-on-active, #0e7ab4); }`;
|
|
9
10
|
|
|
@@ -28,7 +29,7 @@ const LmvzMenuItem = class extends ReactiveControllerHost {
|
|
|
28
29
|
this.addController(new ElementActivationController(this));
|
|
29
30
|
}
|
|
30
31
|
render() {
|
|
31
|
-
return (h(Host, { key: '
|
|
32
|
+
return (h(Host, { key: 'cd5814d6bcfa9b0f5b1b2f5108ce0fc65722b909' }, h("slot", { key: 'b503b252c95bc09ca4b888d4576badd3976292e9', ref: (e) => (this.validationSlot = e) })));
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
LmvzMenuItem.style = lmvzMenuitemCss();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
2
|
import { t as toValidSvgStringWithFallback } from './svg-Dz3GD0LB.js';
|
|
3
3
|
import { i as isAriaValidationEnabled } from './aria-loader-BfH06m7H.js';
|
|
4
4
|
import { c as closeSmSvg } from './close-sm-BSV3KDWl.js';
|
|
@@ -101,7 +101,7 @@ const LmvzMessage = class {
|
|
|
101
101
|
}
|
|
102
102
|
render() {
|
|
103
103
|
const role = this.live === 'assertive' ? 'alert' : this.live === 'polite' ? 'status' : 'note';
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '1c45cf27f057535ffff047548a3d6681dd487d3c', role: role }, this.leadingIcon && h("span", { key: '8efab69f677dfaa06d333aa304479e17e6d60ad6', class: "leading-icon", "aria-hidden": "true", innerHTML: TYPE_SVG[this.type] }), h("span", { key: '2e88e9053444e2aae23341b7cba923c7c440ff64', class: "message" }, h("slot", { key: 'd6b0ee6c95846a1de97e0e6ed707001c29c78c92', ref: (el) => (this.messageSlot = el), onSlotchange: this.handleSlotChange })), this.actionLabel && (h("lmvz-button", { key: 'c55e38e274e98c8ac584ae16520fb0cab5e11d17', variant: "tertiary", scale: "small", onLmvzActivation: this.handleActionClick }, this.actionLabel)), this.dismissible && (h("lmvz-button", { key: '1ae69fefbb23cd8a219aee1d624e9d7779ae0c08', variant: "tertiary", scale: "small", "aria-label": this.closeLabel, onClick: this.handleDismissClick }, h("lmvz-icon", { key: '572c5b3309a1b1b9798dc6fc3f4ad11d0a354ebc', "aria-hidden": "true", icon: CLOSE_SM_SVG })))));
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
LmvzMessage.style = lmvzMessageCss();
|
package/esm/lmvz-modal.entry.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
2
|
import { c as closeSmSvg } from './close-sm-BSV3KDWl.js';
|
|
3
3
|
import { t as toValidSvgStringWithFallback } from './svg-Dz3GD0LB.js';
|
|
4
|
-
import { A as AriaValidationController } from './aria-validation-controller-
|
|
5
|
-
import {
|
|
4
|
+
import { A as AriaValidationController } from './aria-validation-controller-Cp6pofER.js';
|
|
5
|
+
import { b as inheritAriaAttributes, g as getDeepActiveElement } from './element.util-3ydVsxUW.js';
|
|
6
6
|
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
7
7
|
import './logger-D06Ds9Dh.js';
|
|
8
8
|
import './aria-loader-BfH06m7H.js';
|
|
9
|
+
import './aria.constants-DIyiticz.js';
|
|
9
10
|
|
|
10
11
|
const lmvzModalCss = () => ` @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 { display: contents; --lmvz-modal-shell-gap: var(--lmvz-dimension-20-16, clamp(1rem, 0.94rem + 0.26vw, 1.25rem)); } dialog { border: none; padding: 0; background: transparent; height: 100vh; width: 100vw; contain: layout size; } dialog::backdrop { background: rgba(0, 0, 0, 0.19); background: rgb(from var(--lmvz-semantic-color-int-primary, #000000) r g b / 0.29); } .modal-shell { margin-inline: auto; top: 50%; transform: translateY(-50%); box-sizing: border-box; width: fit-content; max-height: 100%; max-width: clamp(20rem, 100%, 90vw); display: flex; flex-direction: column; gap: var(--lmvz-modal-shell-gap); padding: var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem)); border-radius: var(--lmvz-component-wrapper-lg-border-radius, 18px); background: var(--lmvz-semantic-color-surface-primary, #ffffff); position: relative; .close-button { position: absolute; top: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); right: var(--lmvz-dimension-12-10, clamp(0.63rem, 0.59rem + 0.13vw, 0.75rem)); } } .header { display: flex; align-items: flex-start; justify-content: flex-end; gap: var(--lmvz-modal-shell-gap); } .title { min-inline-size: 0; font: var(--lmvz-typography-heading-lg, 500 clamp(1.13rem, 1.03rem + 0.39vw, 1.5rem) / 1.5 Router); } .has-title .title { flex: 1 1 auto; } .body { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); flex: 1; overflow: scroll; } `;
|
|
11
12
|
|
|
@@ -231,7 +232,7 @@ const LmvzModal = class extends ReactiveControllerHost {
|
|
|
231
232
|
this.hasHeader = this.hasAssignedContent(this.headerSlot);
|
|
232
233
|
};
|
|
233
234
|
render() {
|
|
234
|
-
return (h(Host, { key: '
|
|
235
|
+
return (h(Host, { key: '9eb1aa89e4c682586d10291e2a8a2523b8fd17f7' }, h("dialog", { key: '477c537328622f85759dc72a0c499d56e3d5e345', ref: (element) => (this.dialogEl = element), onCancel: this.handleDialogCancel, onClose: this.handleDialogClose, ...this.dialogAccessibilityAttributes }, h("div", { key: 'b9fe9cb306938a117002e5213740ea20269080b8', class: "modal-shell" }, h("header", { key: '34d0cd8078d55d98ec526843f02710044663de70', class: { header: true, 'has-title': this.hasHeader } }, h("div", { key: '1408f0e0875f5e0508ad0f5682f4879a93df65df', class: "title", id: this.dialogTitleId, hidden: !this.hasHeader }, h("slot", { key: '735c1757962e4f3804700a4669d0b49f2d11fb16', name: "header", ref: (element) => (this.headerSlot = element), onSlotchange: this.handleHeaderSlotChange })), h("lmvz-button", { key: 'b0eb76cde508fb434023abdc0f764e1b809b6447', ref: (element) => (this.closeButtonEl = element), type: "button", class: "close-button", "aria-label": this.closeLabel, onLmvzActivation: this.handleCloseButtonClick, variant: "tertiary" }, h("lmvz-icon", { key: '9f978d3117a4046202c3ba1df39aa0c7afc7ee28', icon: closeIconSvg }))), h("div", { key: '46ffd7e7315099189c0a2499d17bdeabeb0e46e5', class: "body" }, h("slot", { key: '095c3353f2ea00f6fa765ac0972ee0123f8e4154' })), h("footer", { key: '5b092b00f10acede66d0fac53f01584ecf528418', class: "actions", hidden: !this.buttonGroupEl?.hasActions }, h("lmvz-button-group", { key: 'ce312e1b1c3407838b8704f20393e7120d6338f9', ref: (element) => (this.buttonGroupEl = element) }, h("slot", { key: '6246782cbee1cc440cfdaf45dac36655f19c972e', name: "actions" })))))));
|
|
235
236
|
}
|
|
236
237
|
static get watchers() { return {
|
|
237
238
|
"open": [{
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
2
|
import { i as isAriaValidationEnabled } from './aria-loader-BfH06m7H.js';
|
|
3
|
-
import { i as isFocusControllerHost } from './directional-focus-controller-
|
|
4
|
-
import { a as addElementActivationListener } from './element-activation-controller-
|
|
3
|
+
import { i as isFocusControllerHost } from './directional-focus-controller-QukTTWBE.js';
|
|
4
|
+
import { a as addElementActivationListener } from './element-activation-controller-dxJZKMag.js';
|
|
5
5
|
import { w as wait, a as waitFrame } from './async.util-DZj20TV1.js';
|
|
6
|
-
import {
|
|
6
|
+
import { f as isActionButton, g as getDeepActiveElement, m as isHtmlElement, w as walkShadowDOMUntil, c as isInteractiveElement, k as canReceiveFocus } from './element.util-3ydVsxUW.js';
|
|
7
7
|
import './reactive-controller-host-CICeIanv.js';
|
|
8
|
+
import './aria.constants-DIyiticz.js';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Custom positioning reference element.
|
|
@@ -1363,7 +1364,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
1363
1364
|
});
|
|
1364
1365
|
};
|
|
1365
1366
|
|
|
1366
|
-
const lmvzPopoverCss = () => `@layer lmvz-ds.reset,lmvz-ds.theme,lmvz-ds.components,lmvz-ds.overrides; @layer lmvz-ds.components{.lmvz-wrapper-card-sm,.lmvz-wrapper-card-md,.lmvz-wrapper-card-lg{background:var(--lmvz-semantic-color-surface-primary, #ffffff);box-shadow:var(--lmvz-ds-shadow-l3-default-strong, 0 2px 32px 0 rgba(120, 120, 128, 0.11))}.lmvz-wrapper-card-sm{padding:var(--lmvz-component-wrapper-sm-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-wrapper-sm-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));border-radius:var(--lmvz-component-wrapper-sm-border-radius, 14px)}.lmvz-wrapper-card-md{padding:var(--lmvz-component-wrapper-md-padding-y, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)) var(--lmvz-component-wrapper-md-padding-x, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));border-radius:var(--lmvz-component-wrapper-md-border-radius, 18px)}.lmvz-wrapper-card-lg{padding:var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem));border-radius:var(--lmvz-component-wrapper-lg-border-radius, 18px)}}:host{--lmvz-popover-z-index-internal:var(--lmvz-popover-z-index,
|
|
1367
|
+
const lmvzPopoverCss = () => `@layer lmvz-ds.reset,lmvz-ds.theme,lmvz-ds.components,lmvz-ds.overrides; @layer lmvz-ds.components{.lmvz-wrapper-card-sm,.lmvz-wrapper-card-md,.lmvz-wrapper-card-lg{background:var(--lmvz-semantic-color-surface-primary, #ffffff);box-shadow:var(--lmvz-ds-shadow-l3-default-strong, 0 2px 32px 0 rgba(120, 120, 128, 0.11))}.lmvz-wrapper-card-sm{padding:var(--lmvz-component-wrapper-sm-padding-y, clamp(0.75rem, 0.69rem + 0.26vw, 1rem)) var(--lmvz-component-wrapper-sm-padding-x, clamp(0.75rem, 0.69rem + 0.26vw, 1rem));border-radius:var(--lmvz-component-wrapper-sm-border-radius, 14px)}.lmvz-wrapper-card-md{padding:var(--lmvz-component-wrapper-md-padding-y, clamp(1rem, 0.88rem + 0.52vw, 1.5rem)) var(--lmvz-component-wrapper-md-padding-x, clamp(1rem, 0.88rem + 0.52vw, 1.5rem));border-radius:var(--lmvz-component-wrapper-md-border-radius, 18px)}.lmvz-wrapper-card-lg{padding:var(--lmvz-component-wrapper-lg-padding-y, clamp(2.25rem, 2.19rem + 0.26vw, 2.5rem)) var(--lmvz-component-wrapper-lg-padding-x, clamp(1.5rem, 1.14rem + 1.55vw, 3rem));border-radius:var(--lmvz-component-wrapper-lg-border-radius, 18px)}}:host{--lmvz-popover-z-index-internal:var(--lmvz-popover-z-index, 100);display:contents;.container{position:absolute;top:-9999999999px;left:-9999999999px;max-width:var(--lmvz-popover-max-width, none);max-height:var(--lmvz-popover-max-height, none);z-index:var(--lmvz-popover-z-index-internal);overflow:auto;box-sizing:border-box}}:host(:not([open])) .container{display:none}`;
|
|
1367
1368
|
|
|
1368
1369
|
const LmvzPopover = class {
|
|
1369
1370
|
constructor(hostRef) {
|
|
@@ -1384,6 +1385,7 @@ const LmvzPopover = class {
|
|
|
1384
1385
|
placement = 'bottom-start';
|
|
1385
1386
|
size = 'sm';
|
|
1386
1387
|
autoFocus = true;
|
|
1388
|
+
containerRole = 'dialog';
|
|
1387
1389
|
label;
|
|
1388
1390
|
lmvzOpen;
|
|
1389
1391
|
lmvzClose;
|
|
@@ -1404,6 +1406,7 @@ const LmvzPopover = class {
|
|
|
1404
1406
|
}
|
|
1405
1407
|
componentDidLoad() {
|
|
1406
1408
|
autoAssignId(this.el);
|
|
1409
|
+
this.syncContainerId();
|
|
1407
1410
|
}
|
|
1408
1411
|
handleOpenChange(isOpen) {
|
|
1409
1412
|
if (isOpen) {
|
|
@@ -1430,16 +1433,26 @@ const LmvzPopover = class {
|
|
|
1430
1433
|
this.removeCloseHandlers();
|
|
1431
1434
|
this.extEventController.abort();
|
|
1432
1435
|
}
|
|
1436
|
+
syncContainerId() {
|
|
1437
|
+
const hostId = this.el.getAttribute('id');
|
|
1438
|
+
if (!hostId || !this.containerEl)
|
|
1439
|
+
return;
|
|
1440
|
+
this.containerEl.id = hostId;
|
|
1441
|
+
}
|
|
1433
1442
|
setupAnchorEl() {
|
|
1434
1443
|
const { anchorEl } = this;
|
|
1435
1444
|
if (!anchorEl) {
|
|
1436
1445
|
console.warn('no anchor element set for', this);
|
|
1437
1446
|
return;
|
|
1438
1447
|
}
|
|
1448
|
+
this.syncContainerId();
|
|
1439
1449
|
if (!anchorEl.hasAttribute('aria-haspopup')) {
|
|
1440
|
-
anchorEl.setAttribute('aria-haspopup', 'dialog');
|
|
1450
|
+
anchorEl.setAttribute('aria-haspopup', this.containerRole === 'dialog' ? 'dialog' : this.containerRole);
|
|
1451
|
+
}
|
|
1452
|
+
anchorEl.setAttribute('aria-controls', this.containerEl?.id || this.el.getAttribute('id'));
|
|
1453
|
+
if (!anchorEl.hasAttribute('aria-expanded')) {
|
|
1454
|
+
anchorEl.setAttribute('aria-expanded', this.open ? 'true' : 'false');
|
|
1441
1455
|
}
|
|
1442
|
-
anchorEl.setAttribute('aria-controls', this.el.getAttribute('id'));
|
|
1443
1456
|
if (isActionButton(anchorEl)) {
|
|
1444
1457
|
addElementActivationListener(anchorEl, this.toggle.bind(this), this.extEventController.signal);
|
|
1445
1458
|
}
|
|
@@ -1464,10 +1477,11 @@ const LmvzPopover = class {
|
|
|
1464
1477
|
await waitFrame();
|
|
1465
1478
|
await this.updatePosition();
|
|
1466
1479
|
autoAssignId(this.el);
|
|
1480
|
+
this.syncContainerId();
|
|
1467
1481
|
this.applyAnchorAriaOpen();
|
|
1468
1482
|
this.lmvzOpen.emit();
|
|
1469
1483
|
await waitFrame();
|
|
1470
|
-
if (this.autoFocus) {
|
|
1484
|
+
if (this.autoFocus && this.containerRole === 'dialog') {
|
|
1471
1485
|
this.focusFirst();
|
|
1472
1486
|
}
|
|
1473
1487
|
}
|
|
@@ -1525,7 +1539,8 @@ const LmvzPopover = class {
|
|
|
1525
1539
|
document.addEventListener('mousedown', (event) => {
|
|
1526
1540
|
if (!this.open)
|
|
1527
1541
|
return;
|
|
1528
|
-
|
|
1542
|
+
const mouseTarget = (event.target?.shadowRoot ?? document).elementFromPoint(event.x, event.y) ?? event.target;
|
|
1543
|
+
if (this.el === event.target || this.el.contains(mouseTarget) || this.el.contains(event.target))
|
|
1529
1544
|
return;
|
|
1530
1545
|
this.triggerClose();
|
|
1531
1546
|
}, options);
|
|
@@ -1541,7 +1556,7 @@ const LmvzPopover = class {
|
|
|
1541
1556
|
this.closureController?.abort();
|
|
1542
1557
|
}
|
|
1543
1558
|
render() {
|
|
1544
|
-
return (h(Host, { key: '
|
|
1559
|
+
return (h(Host, { key: '8dadcc766deebc03ea744fd1002078b382bfd48d' }, h("div", { key: 'd332714964212db6f5446afb1b8f38ff031a87b9', role: this.containerRole, part: "container", class: `container lmvz-wrapper-card-${this.size}`, "aria-label": this.label || undefined, ref: (el) => (this.containerEl = el) }, h("slot", { key: '0fa1d214c8c48942751cbd4759ebc992eacc8f72', ref: (el) => (this.slotEl = el) }))));
|
|
1545
1560
|
}
|
|
1546
1561
|
static get watchers() { return {
|
|
1547
1562
|
"open": [{
|
package/esm/lmvz-radio.entry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-
|
|
2
|
-
import { A as AriaValidationController } from './aria-validation-controller-
|
|
1
|
+
import { g as getElement, r as registerInstance, c as createEvent, h, H as Host } from './index-BOXP1Vx0.js';
|
|
2
|
+
import { A as AriaValidationController } from './aria-validation-controller-Cp6pofER.js';
|
|
3
3
|
import { R as ReactiveControllerHost } from './reactive-controller-host-CICeIanv.js';
|
|
4
4
|
import './aria-loader-BfH06m7H.js';
|
|
5
5
|
|
|
@@ -34,6 +34,7 @@ class RadioGroup {
|
|
|
34
34
|
if (wasEmpty) {
|
|
35
35
|
document.addEventListener('focusin', this._focusinHandler, true);
|
|
36
36
|
}
|
|
37
|
+
this.refreshValidity();
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
unregister(host) {
|
|
@@ -44,10 +45,19 @@ class RadioGroup {
|
|
|
44
45
|
if (this.hosts.length === 0) {
|
|
45
46
|
document.removeEventListener('focusin', this._focusinHandler, true);
|
|
46
47
|
}
|
|
48
|
+
this.refreshValidity();
|
|
47
49
|
}
|
|
48
50
|
get sortedEnabled() {
|
|
49
51
|
return this.hosts.filter((h) => !h.disabled);
|
|
50
52
|
}
|
|
53
|
+
isAnyChecked() {
|
|
54
|
+
return this.hosts.some((host) => host.checked);
|
|
55
|
+
}
|
|
56
|
+
refreshValidity() {
|
|
57
|
+
for (const host of this.hosts) {
|
|
58
|
+
host.updateValidity();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
51
61
|
setFocused(host) {
|
|
52
62
|
this._focusedHost = host;
|
|
53
63
|
this.updateTabindex();
|
|
@@ -63,6 +73,7 @@ class RadioGroup {
|
|
|
63
73
|
host.checked = host === selectedHost;
|
|
64
74
|
}
|
|
65
75
|
this.updateTabindex();
|
|
76
|
+
this.refreshValidity();
|
|
66
77
|
}
|
|
67
78
|
updateTabindex() {
|
|
68
79
|
const enabled = this.sortedEnabled;
|
|
@@ -124,6 +135,12 @@ class RadioGroupController {
|
|
|
124
135
|
select(selectedHost) {
|
|
125
136
|
this.group?.select(selectedHost);
|
|
126
137
|
}
|
|
138
|
+
isAnyChecked() {
|
|
139
|
+
return this.group?.isAnyChecked() ?? false;
|
|
140
|
+
}
|
|
141
|
+
refreshValidity() {
|
|
142
|
+
this.group?.refreshValidity();
|
|
143
|
+
}
|
|
127
144
|
setFocused(host) {
|
|
128
145
|
this.group?.setFocused(host);
|
|
129
146
|
}
|
|
@@ -166,7 +183,7 @@ class RadioGroupController {
|
|
|
166
183
|
|
|
167
184
|
const lmvzRadioCss = () => `@layer lmvz-ds.reset, lmvz-ds.theme, lmvz-ds.components, lmvz-ds.overrides; @layer lmvz-ds.theme { @font-face { font-family: Router; src: local('RouterBook-Regular'), local('Router-Book'), url('/assets/fonts/Router-Book.woff') format('woff'); font-weight: 400; } @font-face { font-family: Router; src: local('RouterMedium-Regular'), local('Router-Medium'), url('/assets/fonts/Router-Medium.woff') format('woff'); font-weight: 500; } @font-face { font-family: Router; src: local('RouterBold-Regular'), local('Router-Bold'), url('/assets/fonts/Router-Bold.woff') format('woff'); font-weight: 700; } } .sc-lmvz-radio-h { display: inline-block; --radio-circle-size: var(--lmvz-global-s18, 18px); --radio-dot-size: 0.5rem; --radio-bg: var(--lmvz-semantic-color-surface-input-primary, #ffffff); --radio-border-color: var(--lmvz-semantic-color-border-default, #e0e0e0); --radio-border-color-hover: var(--lmvz-semantic-color-border-hover, #a1a1a1); --radio-border-color-checked: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-border-color-error: var(--lmvz-semantic-color-status-on-danger, #a31419); --radio-dot-color: var(--lmvz-semantic-color-border-active, #0f8acc); --radio-wrapper-bg-hover: var(--lmvz-semantic-color-int-tertiary-hover, #f0f0f0); --radio-wrapper-bg-active: var(--lmvz-semantic-color-int-tertiary-active, #e0e0e0); --radio-label-color: var(--lmvz-semantic-color-on-surface-primary, #000000); --radio-label-color-checked: var(--lmvz-semantic-color-status-on-active, #0e7ab4); --radio-helper-color: var(--lmvz-semantic-color-on-surface-secondary, #545454); --radio-easing: var(--lmvz-global-easing-default, ease); --radio-duration: 0.2s; display: flex; align-items: center; gap: var(--lmvz-component-input-gap-md, clamp(0.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-12-8, clamp(0.5rem, 0.44rem + 0.26vw, 0.75rem)); border-radius: var(--lmvz-semantic-border-radius-round, 999px); overflow: clip; cursor: pointer; background-color: transparent; position: relative; transition: background-color var(--radio-duration) var(--radio-easing); } input.sc-lmvz-radio { position: absolute; inset-block-start: var(--lmvz-dimension-8-2, clamp(0.13rem, 0.03rem + 0.39vw, 0.5rem)); inset-inline-start: var(--lmvz-dimension-10-4, clamp(0.25rem, 0.16rem + 0.39vw, 0.63rem)); opacity: 0; width: var(--radio-circle-size); height: var(--radio-circle-size); margin: 0; cursor: pointer; z-index: 1; } .circle.sc-lmvz-radio { width: var(--radio-circle-size); height: var(--radio-circle-size); border-radius: 50%; border: var(--lmvz-semantic-border-width-default, 1px) solid var(--radio-border-color); background-color: var(--radio-bg); pointer-events: none; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; transition: border-color var(--radio-duration) var(--radio-easing); } .dot.sc-lmvz-radio { width: var(--radio-dot-size); height: var(--radio-dot-size); border-radius: 50%; background-color: var(--radio-dot-color); } .content.sc-lmvz-radio { display: flex; flex-direction: column; overflow-wrap: break-word; min-width: 0; } label.sc-lmvz-radio { font: var(--lmvz-typography-body-md, 400 clamp(0.88rem, 0.84rem + 0.13vw, 1rem) / 1.5 Router); color: var(--radio-label-color); cursor: pointer; transition: color var(--radio-duration) var(--radio-easing); } .helper-text.sc-lmvz-radio { display: block; font: var(--lmvz-typography-body-sm, 400 clamp(0.75rem, 0.72rem + 0.13vw, 0.88rem) / 1.5 Router); color: var(--radio-helper-color); margin-block-start: 2px; } .helper-text.sc-lmvz-radio:empty { display: none; } @media (hover: hover) { .sc-lmvz-radio-h:hover .circle.sc-lmvz-radio { border-color: var(--radio-border-color-hover); } .sc-lmvz-radio-h:hover { background-color: var(--radio-wrapper-bg-hover); } } .sc-lmvz-radio-h:active { background-color: var(--radio-wrapper-bg-active); } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-checked); } [checked].sc-lmvz-radio-h label.sc-lmvz-radio { color: var(--radio-label-color-checked); } [error].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: var(--radio-border-color-error); } [error].sc-lmvz-radio-h .helper-text.sc-lmvz-radio { color: var(--lmvz-semantic-color-status-on-danger, #a31419); } [disabled].sc-lmvz-radio-h { opacity: var(--lmvz-component-input-disabled-opacity, 40%); pointer-events: none; cursor: not-allowed; } @media (forced-colors: active) { .circle.sc-lmvz-radio { forced-color-adjust: auto; border-color: ButtonText; background-color: Field; } [checked].sc-lmvz-radio-h .circle.sc-lmvz-radio { border-color: Highlight; } .dot.sc-lmvz-radio { background-color: ButtonText; } [checked].sc-lmvz-radio-h .dot.sc-lmvz-radio { background-color: HighlightText; } }`;
|
|
168
185
|
|
|
169
|
-
const focusWithinCss = () => `.sc-lmvz-radio-h:focus-
|
|
186
|
+
const focusWithinCss = () => `.sc-lmvz-radio-h:has(: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))}@media (forced-colors: active){.sc-lmvz-radio-h:has(:focus-visible){outline-color:Highlight;box-shadow:none}}`;
|
|
170
187
|
|
|
171
188
|
let radioIdCounter = 0;
|
|
172
189
|
const LmvzRadio = class extends ReactiveControllerHost {
|
|
@@ -188,7 +205,14 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
188
205
|
name;
|
|
189
206
|
disabled = false;
|
|
190
207
|
required = false;
|
|
191
|
-
|
|
208
|
+
nativeError = false;
|
|
209
|
+
errorFromProp = false;
|
|
210
|
+
get error() {
|
|
211
|
+
return this.errorFromProp || this.nativeError;
|
|
212
|
+
}
|
|
213
|
+
set error(value) {
|
|
214
|
+
this.errorFromProp = value;
|
|
215
|
+
}
|
|
192
216
|
helperText;
|
|
193
217
|
form;
|
|
194
218
|
autofocus = false;
|
|
@@ -196,6 +220,7 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
196
220
|
_handlingFormReset = false;
|
|
197
221
|
handleCheckedChange(newVal, oldVal) {
|
|
198
222
|
this.internals.setFormValue?.(newVal ? this.value : null);
|
|
223
|
+
this.updateValidity();
|
|
199
224
|
if (!newVal && oldVal && !this._handlingNativeChange && !this._handlingFormReset) {
|
|
200
225
|
this.lmvzChange.emit(false);
|
|
201
226
|
}
|
|
@@ -203,6 +228,9 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
203
228
|
this.lmvzChange.emit(true);
|
|
204
229
|
}
|
|
205
230
|
}
|
|
231
|
+
handleRequiredChange() {
|
|
232
|
+
this.updateValidity();
|
|
233
|
+
}
|
|
206
234
|
handleValueChange(newVal) {
|
|
207
235
|
if (this.checked) {
|
|
208
236
|
this.internals.setFormValue?.(newVal);
|
|
@@ -224,6 +252,9 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
224
252
|
async reportValidity() {
|
|
225
253
|
return this.internals?.reportValidity() ?? true;
|
|
226
254
|
}
|
|
255
|
+
async getValidationMessage() {
|
|
256
|
+
return this.internals?.validationMessage ?? '';
|
|
257
|
+
}
|
|
227
258
|
constructor(hostRef) {
|
|
228
259
|
super();
|
|
229
260
|
registerInstance(this, hostRef);
|
|
@@ -245,8 +276,13 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
245
276
|
componentWillLoad() {
|
|
246
277
|
this.initialChecked = this.checked;
|
|
247
278
|
this.internals.setFormValue?.(this.checked ? this.value : null);
|
|
279
|
+
this.updateValidity();
|
|
248
280
|
super.componentWillLoad();
|
|
249
281
|
}
|
|
282
|
+
componentDidLoad() {
|
|
283
|
+
this.updateValidity();
|
|
284
|
+
super.componentDidLoad();
|
|
285
|
+
}
|
|
250
286
|
formAssociatedCallback() {
|
|
251
287
|
this.internals.setFormValue?.(this.checked ? this.value : null);
|
|
252
288
|
}
|
|
@@ -258,6 +294,8 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
258
294
|
finally {
|
|
259
295
|
this._handlingFormReset = false;
|
|
260
296
|
}
|
|
297
|
+
this.updateValidity();
|
|
298
|
+
this.radioGroupController.refreshValidity();
|
|
261
299
|
}
|
|
262
300
|
formStateRestoreCallback(state) {
|
|
263
301
|
if (typeof state !== 'string')
|
|
@@ -270,6 +308,20 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
270
308
|
this._handlingFormReset = false;
|
|
271
309
|
}
|
|
272
310
|
}
|
|
311
|
+
isAnyInGroupChecked() {
|
|
312
|
+
return this.radioGroupController.isAnyChecked();
|
|
313
|
+
}
|
|
314
|
+
updateValidity() {
|
|
315
|
+
if (this.required && !this.isAnyInGroupChecked()) {
|
|
316
|
+
this.internals.setValidity?.({ valueMissing: true }, 'Please select an option.', this.nativeInput);
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
319
|
+
this.internals.setValidity?.({});
|
|
320
|
+
this.nativeError = false;
|
|
321
|
+
}
|
|
322
|
+
handleInvalid() {
|
|
323
|
+
this.nativeError = true;
|
|
324
|
+
}
|
|
273
325
|
handleChange = (event) => {
|
|
274
326
|
this._handlingNativeChange = true;
|
|
275
327
|
try {
|
|
@@ -312,14 +364,20 @@ const LmvzRadio = class extends ReactiveControllerHost {
|
|
|
312
364
|
return;
|
|
313
365
|
this.radioGroupController.setFocused(target);
|
|
314
366
|
}
|
|
367
|
+
retargetInnerClicks() {
|
|
368
|
+
this.nativeInput?.click();
|
|
369
|
+
}
|
|
315
370
|
render() {
|
|
316
|
-
return (h(Host, { key: '
|
|
371
|
+
return (h(Host, { key: 'f1fdc1167c4e59c2524e1e545c3382ca32853788' }, h("input", { key: 'c1b711444475ed401766cc5827eeaec0c46b62cf', type: "radio", id: this.radioId, value: this.value, checked: this.checked, disabled: this.disabled, autoFocus: this.autofocus, "aria-required": this.required ? 'true' : 'false', "aria-invalid": this.error ? 'true' : undefined, "aria-describedby": this.helperId, ref: (el) => (this.nativeInput = el), onChange: this.handleChange }), h("span", { key: 'b25e623269df05bdf8159e72da4df2e0bfb5d7bc', class: "circle", "aria-hidden": "true" }, this.checked && h("span", { key: '93d12890c7ba0abe203c63953ea1115aee37d7a0', class: "dot" })), h("span", { key: '44dcfdc4e7ee3820624b0d02a438139f45bb8733', class: "content" }, h("label", { key: 'd0547cd5e79642b298da155c9937715224b52cae', htmlFor: this.radioId }, this.label), h("span", { key: 'a9df5dd8a775a2f7422d5bac296869f88553e33f', onClick: this.retargetInnerClicks.bind(this), "aria-live": "polite", class: "helper-text", id: this.helperId }, this.helperText))));
|
|
317
372
|
}
|
|
318
373
|
static get formAssociated() { return true; }
|
|
319
374
|
static get watchers() { return {
|
|
320
375
|
"checked": [{
|
|
321
376
|
"handleCheckedChange": 0
|
|
322
377
|
}],
|
|
378
|
+
"required": [{
|
|
379
|
+
"handleRequiredChange": 0
|
|
380
|
+
}],
|
|
323
381
|
"value": [{
|
|
324
382
|
"handleValueChange": 0
|
|
325
383
|
}],
|