@esri/calcite-components 1.0.6 → 1.0.7
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/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/{p-aae5b739.entry.js → p-019e9c79.entry.js} +2 -2
- package/dist/calcite/{p-96cc2917.entry.js → p-0407ecac.entry.js} +2 -2
- package/dist/calcite/{p-9562f4c0.entry.js → p-06442038.entry.js} +2 -2
- package/dist/calcite/{p-50f2bb80.entry.js → p-072f8761.entry.js} +2 -2
- package/dist/calcite/{p-c4021e5c.entry.js → p-0954cf31.entry.js} +2 -2
- package/dist/calcite/{p-2d3d2c7e.entry.js → p-0f60fc32.entry.js} +2 -2
- package/dist/calcite/{p-7aaa14b2.entry.js → p-10601231.entry.js} +2 -2
- package/dist/calcite/{p-b52ffd67.entry.js → p-11210e59.entry.js} +2 -2
- package/dist/calcite/{p-536b8494.js → p-129976f3.js} +1 -1
- package/dist/calcite/{p-2b682737.entry.js → p-12b357e4.entry.js} +2 -2
- package/dist/calcite/{p-1f1cf63e.entry.js → p-13e07c1c.entry.js} +2 -2
- package/dist/calcite/{p-72081109.entry.js → p-178a264a.entry.js} +2 -2
- package/dist/calcite/{p-8142d3ff.entry.js → p-1812439f.entry.js} +2 -2
- package/dist/calcite/{p-a60fc92c.js → p-1a0f4b4a.js} +1 -1
- package/dist/calcite/{p-3c71d6ee.js → p-22563d9a.js} +2 -2
- package/dist/calcite/{p-9f066d03.js → p-243b7920.js} +1 -1
- package/dist/calcite/p-2516afdb.js +6 -0
- package/dist/calcite/{p-f2743a30.js → p-251f2a5e.js} +2 -2
- package/dist/calcite/{p-3596b7f4.entry.js → p-25c5f90a.entry.js} +2 -2
- package/dist/calcite/{p-40afd75a.entry.js → p-2621ab6f.entry.js} +2 -2
- package/dist/calcite/{p-f3e4ff92.entry.js → p-28402e89.entry.js} +2 -2
- package/dist/calcite/{p-0866faee.entry.js → p-299701fe.entry.js} +2 -2
- package/dist/calcite/{p-263c8da0.entry.js → p-29a4195b.entry.js} +2 -2
- package/dist/calcite/{p-a374ca29.js → p-2d3b1298.js} +1 -1
- package/dist/calcite/p-327823f3.js +6 -0
- package/dist/calcite/{p-e037d4a5.entry.js → p-3582f4c9.entry.js} +2 -2
- package/dist/calcite/{p-8754cd9b.entry.js → p-3806fbcf.entry.js} +2 -2
- package/dist/calcite/{p-dd163368.entry.js → p-3d466810.entry.js} +2 -2
- package/dist/calcite/{p-b3910a16.js → p-3d497b7d.js} +2 -2
- package/dist/calcite/{p-76168c3e.entry.js → p-40e18e9a.entry.js} +2 -2
- package/dist/calcite/{p-53942ced.js → p-4185fbaf.js} +1 -1
- package/dist/calcite/{p-c698881e.js → p-4acb3ea1.js} +2 -2
- package/dist/calcite/p-4c7630f9.entry.js +6 -0
- package/dist/calcite/{p-4dd10f06.js → p-4dba9ad1.js} +1 -1
- package/dist/calcite/{p-e24a9295.js → p-53865a5c.js} +1 -1
- package/dist/calcite/{p-1b8a7700.entry.js → p-561c37d6.entry.js} +2 -2
- package/dist/calcite/{p-0ea90766.entry.js → p-593ccc43.entry.js} +2 -2
- package/dist/calcite/{p-86d880fc.js → p-5d2a5f83.js} +2 -2
- package/dist/calcite/{p-691827d3.js → p-5d59d6b8.js} +2 -2
- package/dist/calcite/{p-ad180f2f.js → p-5f0fe068.js} +1 -1
- package/dist/calcite/{p-0854f55d.entry.js → p-62b376b0.entry.js} +2 -2
- package/dist/calcite/{p-93162688.entry.js → p-638175c2.entry.js} +2 -2
- package/dist/calcite/{p-0a19a968.js → p-644998ab.js} +1 -1
- package/dist/calcite/{p-93f63097.entry.js → p-66564300.entry.js} +2 -2
- package/dist/calcite/{p-c634c4ac.entry.js → p-66eae393.entry.js} +2 -2
- package/dist/calcite/{p-dcc2695b.entry.js → p-6c1801ab.entry.js} +2 -2
- package/dist/calcite/{p-5a21848f.js → p-6edaec38.js} +2 -2
- package/dist/calcite/{p-0bd1c3c7.entry.js → p-7d63e3b1.entry.js} +2 -2
- package/dist/calcite/{p-ec974717.entry.js → p-7e479ab3.entry.js} +2 -2
- package/dist/calcite/{p-38cce891.entry.js → p-83402ec4.entry.js} +2 -2
- package/dist/calcite/{p-07145d9d.entry.js → p-83b472ec.entry.js} +2 -2
- package/dist/calcite/p-88d410be.entry.js +6 -0
- package/dist/calcite/{p-758bebce.entry.js → p-8cd4c7e9.entry.js} +2 -2
- package/dist/calcite/{p-d8b3ec11.entry.js → p-8f8558aa.entry.js} +2 -2
- package/dist/calcite/{p-bb070cf6.entry.js → p-8f85ae03.entry.js} +2 -2
- package/dist/calcite/{p-c3ff2f47.js → p-901b24a6.js} +1 -1
- package/dist/calcite/{p-62ca92c9.js → p-93565bec.js} +1 -1
- package/dist/calcite/{p-d3b86f5b.entry.js → p-9651b147.entry.js} +2 -2
- package/dist/calcite/{p-839d1c4e.entry.js → p-9937e5b5.entry.js} +2 -2
- package/dist/calcite/{p-b4f6a7f0.entry.js → p-9c23e59a.entry.js} +2 -2
- package/dist/calcite/{p-c8897356.js → p-9e413c06.js} +1 -1
- package/dist/calcite/{p-f54f051a.entry.js → p-ab81b4ed.entry.js} +2 -2
- package/dist/calcite/{p-f22f5e2b.entry.js → p-b4155a81.entry.js} +2 -2
- package/dist/calcite/{p-8a556a44.js → p-b44a8d52.js} +1 -1
- package/dist/calcite/p-b7a514ed.entry.js +6 -0
- package/dist/calcite/{p-634dc3b9.entry.js → p-b81bbd53.entry.js} +2 -2
- package/dist/calcite/{p-1c7b9d7a.entry.js → p-bbaa4997.entry.js} +2 -2
- package/dist/calcite/{p-a0309c9b.js → p-bd942975.js} +1 -1
- package/dist/calcite/{p-cf911e65.entry.js → p-c2bb946b.entry.js} +2 -2
- package/dist/calcite/{p-94011775.js → p-c334f9b6.js} +2 -2
- package/dist/calcite/{p-b50ab308.entry.js → p-c43812da.entry.js} +2 -2
- package/dist/calcite/{p-f8ce2a65.entry.js → p-c4f0cdb1.entry.js} +2 -2
- package/dist/calcite/{p-f7cb6ac5.entry.js → p-c772be2b.entry.js} +2 -2
- package/dist/calcite/{p-14e72f25.js → p-c9e949ec.js} +1 -1
- package/dist/calcite/{p-e654df1c.entry.js → p-ca0779db.entry.js} +2 -2
- package/dist/calcite/{p-75373482.entry.js → p-d238c881.entry.js} +2 -2
- package/dist/calcite/{p-138492eb.js → p-d3a5b453.js} +2 -2
- package/dist/calcite/{p-83810479.entry.js → p-d3b96c5c.entry.js} +2 -2
- package/dist/calcite/{p-04af4e18.entry.js → p-d6fd431c.entry.js} +2 -2
- package/dist/calcite/{p-790a8f19.js → p-dc200732.js} +1 -1
- package/dist/calcite/{p-6ffcd57b.entry.js → p-dd3c94cf.entry.js} +2 -2
- package/dist/calcite/{p-43695026.js → p-ddf76e54.js} +2 -2
- package/dist/calcite/{p-4fdf84d0.js → p-e273b39f.js} +2 -2
- package/dist/calcite/{p-8e7e3d7a.entry.js → p-e5806b93.entry.js} +2 -2
- package/dist/calcite/{p-c84d524e.entry.js → p-e923223c.entry.js} +2 -2
- package/dist/calcite/p-edf85948.js +10 -0
- package/dist/calcite/{p-2a3443a7.entry.js → p-eef10fff.entry.js} +2 -2
- package/dist/calcite/{p-bf0d157f.entry.js → p-f141f293.entry.js} +2 -2
- package/dist/calcite/{p-a3dba63c.js → p-f2f9a865.js} +2 -2
- package/dist/calcite/{p-d124acc9.entry.js → p-f57deccc.entry.js} +2 -2
- package/dist/calcite/{p-4001a727.js → p-f68b2bdb.js} +2 -2
- package/dist/calcite/{p-3e1d392c.entry.js → p-f9b34f67.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-d79ee46b.js → ExpandToggle-1469f47a.js} +5 -5
- package/dist/cjs/{Heading-3965dc67.js → Heading-dbdd4fe3.js} +2 -2
- package/dist/cjs/{app-globals-ec12cb34.js → app-globals-69065772.js} +2 -2
- package/dist/cjs/{array-965c9955.js → array-60fe47ac.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +15 -15
- package/dist/cjs/calcite-action-group.cjs.entry.js +12 -12
- package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-pad.cjs.entry.js +14 -14
- package/dist/cjs/calcite-action.cjs.entry.js +11 -11
- package/dist/cjs/calcite-alert.cjs.entry.js +12 -12
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-button.cjs.entry.js +13 -13
- package/dist/cjs/calcite-card.cjs.entry.js +10 -10
- package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -10
- package/dist/cjs/calcite-chip.cjs.entry.js +11 -11
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +14 -14
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +18 -18
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +12 -12
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
- package/dist/cjs/calcite-filter.cjs.entry.js +13 -13
- package/dist/cjs/calcite-flow-item.cjs.entry.js +12 -12
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite-handle.cjs.entry.js +6 -6
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +16 -16
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +14 -14
- package/dist/cjs/calcite-input-text.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite-input.cjs.entry.js +14 -14
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +7 -7
- package/dist/cjs/calcite-list_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +13 -13
- package/dist/cjs/calcite-notice.cjs.entry.js +12 -12
- package/dist/cjs/calcite-option_3.cjs.entry.js +10 -10
- package/dist/cjs/calcite-pagination.cjs.entry.js +9 -9
- package/dist/cjs/calcite-panel.cjs.entry.js +14 -14
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +16 -16
- package/dist/cjs/calcite-popover.cjs.entry.js +15 -15
- package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button.cjs.entry.js +10 -10
- package/dist/cjs/calcite-rating.cjs.entry.js +13 -13
- package/dist/cjs/calcite-scrim.cjs.entry.js +9 -9
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-shell_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
- package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -10
- package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +5 -5
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-tooltip.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tree_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +16 -16
- package/dist/cjs/calcite.cjs.js +4 -4
- package/dist/cjs/{conditionalSlot-f3e69608.js → conditionalSlot-9cfea627.js} +3 -3
- package/dist/cjs/{debounce-50a003d0.js → debounce-af5882c5.js} +1 -1
- package/dist/cjs/{dom-1160c5f6.js → dom-1f61b001.js} +3 -3
- package/dist/cjs/{filter-d08ff7fa.js → filter-40ef5fb6.js} +2 -2
- package/dist/cjs/{floating-ui-410a45fc.js → floating-ui-cf8b7c7e.js} +4 -4
- package/dist/cjs/{focusTrapComponent-d58770cc.js → focusTrapComponent-2d67f179.js} +6 -6
- package/dist/cjs/{form-b504b496.js → form-3dfa2e33.js} +3 -3
- package/dist/cjs/{guid-113148c4.js → guid-624d4437.js} +1 -1
- package/dist/cjs/{index-8eb07112.js → index-89bc16ff.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-236d81ae.js → interactive-864c5140.js} +1 -1
- package/dist/cjs/{key-cd959c09.js → key-b8c79df1.js} +1 -1
- package/dist/cjs/{label-a2814e2a.js → label-655d2d81.js} +2 -2
- package/dist/cjs/{loadable-b00a5871.js → loadable-ba12e859.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-d803c496.js → locale-7e1fa938.js} +4 -4
- package/dist/cjs/{math-6ebfc36d.js → math-ad3373ec.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-a49912ad.js → nonChromiumPlatformUtils-9eb39d0e.js} +6 -6
- package/dist/cjs/{observers-4f8bf730.js → observers-915048e0.js} +1 -1
- package/dist/cjs/{openCloseComponent-06aca6ae.js → openCloseComponent-b566840a.js} +2 -2
- package/dist/cjs/{resources-f50a507e.js → resources-16650b54.js} +1 -1
- package/dist/cjs/{resources-32ee25af.js → resources-1c6040ad.js} +1 -1
- package/dist/cjs/{resources-82691963.js → resources-371525ef.js} +1 -1
- package/dist/cjs/{resources-835d9e38.js → resources-50130a88.js} +5 -5
- package/dist/cjs/{resources-31be8c32.js → resources-66c20f85.js} +1 -1
- package/dist/cjs/{resources-3053b72e.js → resources-c9182c3c.js} +1 -1
- package/dist/cjs/{sortable.esm-e95d15e6.js → sortable.esm-911336b9.js} +1 -1
- package/dist/cjs/{t9n-f1a1bf3e.js → t9n-e2509f8c.js} +3 -3
- package/dist/cjs/{utils-f93f3009.js → utils-556df4f4.js} +1 -1
- package/dist/cjs/{utils-5ff814ad.js → utils-9c8a64c5.js} +3 -3
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.js +1 -1
- package/dist/collection/components/accordion-item/resources.js +1 -1
- package/dist/collection/components/action/action.js +1 -1
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +1 -1
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +1 -1
- package/dist/collection/components/action-group/action-group.js +1 -1
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.js +1 -1
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.js +1 -1
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/avatar/utils.js +1 -1
- package/dist/collection/components/block/block.js +1 -1
- package/dist/collection/components/block/resources.js +1 -1
- package/dist/collection/components/block-section/block-section.js +1 -1
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +1 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/color-picker/resources.js +1 -1
- package/dist/collection/components/color-picker/utils.js +1 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +1 -1
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
- package/dist/collection/components/color-picker-swatch/resources.js +1 -1
- package/dist/collection/components/combobox/combobox.js +1 -1
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +1 -1
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +1 -1
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +1 -1
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/inline-editable/inline-editable.js +1 -1
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +1 -1
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.js +1 -1
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.js +1 -1
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +1 -1
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.js +1 -1
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +1 -1
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/rating/function/star.js +1 -1
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js +1 -1
- package/dist/collection/components/segmented-control-item/resources.js +1 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
- package/dist/collection/components/select/resources.js +1 -1
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.js +1 -1
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.js +1 -1
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.js +1 -1
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.js +1 -1
- package/dist/collection/components/tab-title/resources.js +1 -1
- package/dist/collection/components/tab-title/tab-title.js +1 -1
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tile/resources.js +1 -1
- package/dist/collection/components/tile/tile.js +1 -1
- package/dist/collection/components/tile-select/resources.js +1 -1
- package/dist/collection/components/tile-select/tile-select.js +1 -1
- package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
- package/dist/collection/components/time-picker/resources.js +1 -1
- package/dist/collection/components/time-picker/time-picker.js +1 -1
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.js +1 -1
- package/dist/collection/components/tip-group/tip-group.js +1 -1
- package/dist/collection/components/tip-manager/resources.js +1 -1
- package/dist/collection/components/tip-manager/tip-manager.js +1 -1
- package/dist/collection/components/tooltip/TooltipManager.js +1 -1
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tooltip/utils.js +1 -1
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/tree/utils.js +1 -1
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +1 -1
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +1 -1
- package/dist/collection/components/value-list/value-list.js +1 -1
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.js +1 -1
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/collection/utils/focusTrapComponent.js +5 -5
- package/dist/collection/utils/form.js +1 -1
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +1 -1
- package/dist/collection/utils/mode.js +1 -1
- package/dist/collection/utils/number.js +1 -1
- package/dist/collection/utils/observers.js +1 -1
- package/dist/collection/utils/openCloseComponent.js +1 -1
- package/dist/collection/utils/resources.js +1 -1
- package/dist/collection/utils/t9n.js +1 -1
- package/dist/collection/utils/time.js +1 -1
- package/dist/components/ExpandToggle.js +1 -1
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +1 -1
- package/dist/components/action-menu.js +1 -1
- package/dist/components/action.js +1 -1
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +1 -1
- package/dist/components/calcite-action-bar.js +1 -1
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +1 -1
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +1 -1
- package/dist/components/calcite-avatar.js +1 -1
- package/dist/components/calcite-block-section.js +1 -1
- package/dist/components/calcite-block.js +1 -1
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +1 -1
- package/dist/components/calcite-checkbox.js +1 -1
- package/dist/components/calcite-chip.js +1 -1
- package/dist/components/calcite-color-picker-hex-input.js +1 -1
- package/dist/components/calcite-color-picker-swatch.js +1 -1
- package/dist/components/calcite-color-picker.js +1 -1
- package/dist/components/calcite-combobox-item-group.js +1 -1
- package/dist/components/calcite-combobox-item.js +1 -1
- package/dist/components/calcite-combobox.js +1 -1
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +1 -1
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +1 -1
- package/dist/components/calcite-flow.js +1 -1
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-input-message.js +1 -1
- package/dist/components/calcite-input-number.js +1 -1
- package/dist/components/calcite-input-text.js +1 -1
- package/dist/components/calcite-input-time-picker.js +1 -1
- package/dist/components/calcite-input.js +1 -1
- package/dist/components/calcite-label.js +1 -1
- package/dist/components/calcite-link.js +1 -1
- package/dist/components/calcite-list-item-group.js +1 -1
- package/dist/components/calcite-list-item.js +1 -1
- package/dist/components/calcite-list.js +1 -1
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-option.js +1 -1
- package/dist/components/calcite-pagination.js +1 -1
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +1 -1
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +1 -1
- package/dist/components/calcite-radio-button.js +1 -1
- package/dist/components/calcite-rating.js +1 -1
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-segmented-control-item.js +1 -1
- package/dist/components/calcite-segmented-control.js +1 -1
- package/dist/components/calcite-select.js +1 -1
- package/dist/components/calcite-shell-center-row.js +1 -1
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +1 -1
- package/dist/components/calcite-sortable-list.js +1 -1
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-stepper-item.js +1 -1
- package/dist/components/calcite-stepper.js +1 -1
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-tile-select-group.js +1 -1
- package/dist/components/calcite-tile-select.js +1 -1
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +1 -1
- package/dist/components/calcite-tree.js +1 -1
- package/dist/components/calcite-value-list-item.js +1 -1
- package/dist/components/calcite-value-list.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/chip.js +1 -1
- package/dist/components/color-picker-hex-input.js +1 -1
- package/dist/components/color-picker-swatch.js +1 -1
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +1 -1
- package/dist/components/date-picker-month-header.js +1 -1
- package/dist/components/date-picker-month.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +1 -1
- package/dist/components/focusTrapComponent.js +5 -5
- package/dist/components/form.js +1 -1
- package/dist/components/graph.js +1 -1
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/interactive.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +1 -1
- package/dist/components/shared-list-render.js +1 -1
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/components/utils3.js +1 -1
- package/dist/esm/{ExpandToggle-83e12bfa.js → ExpandToggle-1dc348e4.js} +5 -5
- package/dist/esm/{Heading-6938ebca.js → Heading-c9cca1ea.js} +2 -2
- package/dist/esm/{app-globals-2da300d7.js → app-globals-523f5c6b.js} +2 -2
- package/dist/esm/{array-0c8804f0.js → array-a3f6bbc3.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +15 -15
- package/dist/esm/calcite-action-group.entry.js +12 -12
- package/dist/esm/calcite-action-menu.entry.js +9 -9
- package/dist/esm/calcite-action-pad.entry.js +14 -14
- package/dist/esm/calcite-action.entry.js +11 -11
- package/dist/esm/calcite-alert.entry.js +12 -12
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +12 -12
- package/dist/esm/calcite-button.entry.js +13 -13
- package/dist/esm/calcite-card.entry.js +10 -10
- package/dist/esm/calcite-checkbox.entry.js +10 -10
- package/dist/esm/calcite-chip.entry.js +11 -11
- package/dist/esm/calcite-color-picker_3.entry.js +14 -14
- package/dist/esm/calcite-combobox_3.entry.js +18 -18
- package/dist/esm/calcite-date-picker_4.entry.js +12 -12
- package/dist/esm/calcite-dropdown_3.entry.js +12 -12
- package/dist/esm/calcite-fab.entry.js +7 -7
- package/dist/esm/calcite-filter.entry.js +13 -13
- package/dist/esm/calcite-flow-item.entry.js +12 -12
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +13 -13
- package/dist/esm/calcite-handle.entry.js +6 -6
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +12 -12
- package/dist/esm/calcite-input-date-picker.entry.js +16 -16
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +14 -14
- package/dist/esm/calcite-input-text.entry.js +13 -13
- package/dist/esm/calcite-input-time-picker_2.entry.js +13 -13
- package/dist/esm/calcite-input.entry.js +14 -14
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +7 -7
- package/dist/esm/calcite-list_3.entry.js +9 -9
- package/dist/esm/calcite-loader.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +13 -13
- package/dist/esm/calcite-notice.entry.js +12 -12
- package/dist/esm/calcite-option_3.entry.js +10 -10
- package/dist/esm/calcite-pagination.entry.js +9 -9
- package/dist/esm/calcite-panel.entry.js +14 -14
- package/dist/esm/calcite-pick-list_3.entry.js +16 -16
- package/dist/esm/calcite-popover.entry.js +15 -15
- package/dist/esm/calcite-progress.entry.js +2 -2
- package/dist/esm/calcite-radio-button-group.entry.js +3 -3
- package/dist/esm/calcite-radio-button.entry.js +10 -10
- package/dist/esm/calcite-rating.entry.js +13 -13
- package/dist/esm/calcite-scrim.entry.js +9 -9
- package/dist/esm/calcite-segmented-control_2.entry.js +9 -9
- package/dist/esm/calcite-shell_3.entry.js +11 -11
- package/dist/esm/calcite-sortable-list.entry.js +5 -5
- package/dist/esm/calcite-split-button.entry.js +3 -3
- package/dist/esm/calcite-stepper_2.entry.js +10 -10
- package/dist/esm/calcite-switch.entry.js +10 -10
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-tile-select_2.entry.js +5 -5
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +11 -11
- package/dist/esm/calcite-tooltip.entry.js +8 -8
- package/dist/esm/calcite-tree_2.entry.js +9 -9
- package/dist/esm/calcite-value-list_2.entry.js +16 -16
- package/dist/esm/calcite.js +4 -4
- package/dist/esm/{conditionalSlot-4019f397.js → conditionalSlot-0feaf92e.js} +3 -3
- package/dist/esm/{debounce-18f0540f.js → debounce-7eda7983.js} +1 -1
- package/dist/esm/{dom-32ae8bc9.js → dom-8bd9a2e4.js} +3 -3
- package/dist/esm/{filter-8eadf2db.js → filter-617a0a20.js} +2 -2
- package/dist/esm/{floating-ui-db6e9f76.js → floating-ui-b1d5fc62.js} +4 -4
- package/dist/esm/{focusTrapComponent-4c928a1c.js → focusTrapComponent-509b8026.js} +6 -6
- package/dist/esm/{form-730cbc45.js → form-9666b7af.js} +3 -3
- package/dist/esm/{guid-401209dc.js → guid-be5a0c2d.js} +1 -1
- package/dist/esm/{index-a40da88d.js → index-6167ae21.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-d4dc0fc7.js → interactive-85bb17cd.js} +1 -1
- package/dist/esm/{key-4aa8c81c.js → key-c706eea1.js} +1 -1
- package/dist/esm/{label-546d34b0.js → label-664a12e5.js} +2 -2
- package/dist/esm/{loadable-e50fb942.js → loadable-53a96a9a.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-9f86374c.js → locale-88b820ed.js} +4 -4
- package/dist/esm/{math-881bb1fd.js → math-87f6a301.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-4fa8534e.js → nonChromiumPlatformUtils-253dee10.js} +6 -6
- package/dist/esm/{observers-7ca4e421.js → observers-aab95813.js} +1 -1
- package/dist/esm/{openCloseComponent-531a9ab0.js → openCloseComponent-dca8c4ff.js} +2 -2
- package/dist/esm/{resources-e0acc028.js → resources-006e59bb.js} +5 -5
- package/dist/esm/{resources-f78c5f1c.js → resources-03cd2a66.js} +1 -1
- package/dist/esm/{resources-e05f38e6.js → resources-186e0ad8.js} +1 -1
- package/dist/esm/{resources-64b0ebdc.js → resources-28d67c1d.js} +1 -1
- package/dist/esm/{resources-f5d2d85f.js → resources-44bb8b11.js} +1 -1
- package/dist/esm/{resources-3257f6ce.js → resources-d674096d.js} +1 -1
- package/dist/esm/{sortable.esm-7dae9c93.js → sortable.esm-59b0e396.js} +1 -1
- package/dist/esm/{t9n-d8973b84.js → t9n-9d290ff1.js} +3 -3
- package/dist/esm/{utils-8ce8c150.js → utils-20d9124f.js} +3 -3
- package/dist/esm/{utils-b3f680c0.js → utils-ce2bf7ba.js} +1 -1
- package/dist/extras/docs-json.json +1 -1
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/hydrate/index.js +5 -5
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/calcite/p-2e0a1e65.js +0 -6
- package/dist/calcite/p-34ba4efd.entry.js +0 -6
- package/dist/calcite/p-5c3d614b.entry.js +0 -6
- package/dist/calcite/p-8d6b1692.entry.js +0 -6
- package/dist/calcite/p-cca09fb9.js +0 -6
- package/dist/calcite/p-ec693d61.js +0 -10
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as a,H as i,g as r,F as o}from"./p-c8897356.js";import{h as s,b as n,c,g as l,f as h,e as d,s as u,j as g,i as p,k as f,n as v,p as m}from"./p-a3dba63c.js";import{c as w,d as y,n as x}from"./p-691827d3.js";import{c as b,d as k,s as D,u as z}from"./p-f2743a30.js";import{c as _,b as C}from"./p-b3910a16.js";import{u as A}from"./p-0a19a968.js";import{i as P}from"./p-9f066d03.js";import{C as S}from"./p-536b8494.js";import{H as j}from"./p-2e0a1e65.js";import"./p-a374ca29.js";import"./p-a60fc92c.js";const M=class{constructor(a){t(this,a),this.calciteDatePickerChange=e(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=e(this,"calciteDatePickerRangeChange",6),this.keyDownHandler=t=>{"Escape"===t.key&&this.reset()},this.monthHeaderSelectChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthActiveDateChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthHoverChange=t=>{if(!this.range)return void(this.hoverRange=void 0);const{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],r=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i?this.hoverRange=void 0:r<a?this.hoverRange={focused:"start",start:r,end:a}:(this.hoverRange.end=r,this.hoverRange.focused="end");else if(i){const t=s(r,a),e=s(r,i);e>0?(this.hoverRange.end=r,this.hoverRange.focused="end"):t<0||t>e?(this.hoverRange.start=r,this.hoverRange.focused="start"):(this.hoverRange.end=r,this.hoverRange.focused="end")}else a&&(r<a?this.hoverRange={focused:"start",start:r,end:a}:(this.hoverRange.end=r,this.hoverRange.focused="end"));t.stopPropagation()},this.monthMouseOutChange=()=>{this.hoverRange&&(this.hoverRange=void 0)},this.reset=()=>{const{valueAsDate:t}=this;!Array.isArray(t)&&t&&t?.getTime()!==this.activeDate?.getTime()&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]?.getTime()!==(this.activeStartDate instanceof Date&&this.activeStartDate?.getTime())&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]?.getTime()!==(this.activeStartDate instanceof Date&&this.activeEndDate?.getTime())&&(this.activeEndDate=new Date(t[1])))},this.monthDateChange=t=>{const e=new Date(t.detail),a=n(e);if(!this.range&&a===n(this.valueAsDate))return;if(!this.range)return this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,void this.calciteDatePickerChange.emit();const i=this.getStartDate(),r=this.getEndDate();if(!i||!r&&e<i)i&&this.setEndDate(new Date(i)),"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else if(r)if(this.proximitySelectionDisabled)this.setStartDate(e);else if(this.activeRange)"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else{const t=s(e,i),a=s(e,r);0===a||t<0?this.setStartDate(e):0===t||a<0?this.setEndDate(e):t<a?this.setStartDate(e):this.setEndDate(e)}else this.setEndDate(e);this.calciteDatePickerChange.emit()},this.activeDate=void 0,this.activeRange=void 0,this.value=void 0,this.headingLevel=void 0,this.valueAsDate=void 0,this.minAsDate=void 0,this.maxAsDate=void 0,this.min=void 0,this.max=void 0,this.numberingSystem=void 0,this.scale="m",this.range=!1,this.proximitySelectionDisabled=!1,this.messageOverrides=void 0,this.messages=void 0,this.activeStartDate=void 0,this.activeEndDate=void 0,this.startAsDate=void 0,this.endAsDate=void 0,this.effectiveLocale="",this.defaultMessages=void 0,this.localeData=void 0,this.hoverRange=void 0}activeDateWatcher(t){"end"===this.activeRange&&(this.activeEndDate=t)}valueAsDateWatcher(t){if(this.range&&Array.isArray(t)){const{activeStartDate:e,activeEndDate:a}=this,i=t[0],r=t[1];this.activeStartDate=e!==i&&i,this.activeEndDate=a!==r&&r}else t&&t!==this.activeDate&&(this.activeDate=t)}onMinChanged(t){t&&(this.minAsDate=c(t))}onMaxChanged(t){t&&(this.maxAsDate=c(t))}onMessagesChange(){}connectedCallback(){w(this),b(this),Array.isArray(this.value)?this.valueAsDate=l(this.value):this.value&&(this.valueAsDate=c(this.value)),this.min&&(this.minAsDate=c(this.min)),this.max&&(this.maxAsDate=c(this.max))}disconnectedCallback(){y(this),k(this)}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max),await D(this)}render(){const t=h(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate);let e=this.getActiveDate(t,this.minAsDate,this.maxAsDate);const r=this.range&&Array.isArray(this.valueAsDate)?h(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,o=this.getActiveEndDate(r,this.minAsDate,this.maxAsDate);return"end"!==this.activeRange&&("end"!==this.hoverRange?.focused||this.proximitySelectionDisabled&&!r)||!o||(e=o),this.range&&this.mostRecentRangeValue&&(e=this.mostRecentRangeValue),a(i,{onBlur:this.reset,onKeyDown:this.keyDownHandler,role:"application"},this.renderCalendar(e,this.range&&this.activeRange&&"start"===this.activeRange&&r||this.maxAsDate,this.range&&this.activeRange?"start"===this.activeRange?this.minAsDate:t||this.minAsDate:this.minAsDate,t,r))}effectiveLocaleChange(){z(this,this.effectiveLocale)}valueHandler(t){Array.isArray(t)?this.valueAsDate=l(t):t&&(this.valueAsDate=c(t))}async loadLocaleData(){x.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await d(this.effectiveLocale)}renderCalendar(t,e,i,r,o){return this.localeData&&[a("calcite-date-picker-month-header",{activeDate:t,headingLevel:this.headingLevel||2,localeData:this.localeData,max:e,messages:this.messages,min:i,onCalciteInternalDatePickerSelect:this.monthHeaderSelectChange,scale:this.scale,selectedDate:"end"===this.activeRange?o:r||new Date}),a("calcite-date-picker-month",{activeDate:t,endDate:this.range?o:void 0,hoverRange:this.hoverRange,localeData:this.localeData,max:e,min:i,onCalciteInternalDatePickerActiveDateChange:this.monthActiveDateChange,onCalciteInternalDatePickerHover:this.monthHoverChange,onCalciteInternalDatePickerMouseOut:this.monthMouseOutChange,onCalciteInternalDatePickerSelect:this.monthDateChange,scale:this.scale,selectedDate:"end"===this.activeRange?o:r,startDate:this.range?r:void 0})]}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t){const e=this.getStartDate(),a=t?u(t):t;this.value=[n(e),n(t)],this.valueAsDate=[e,t],this.mostRecentRangeValue=a,this.calciteDatePickerRangeChange.emit(),this.activeEndDate=t||null}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t){const e=this.getEndDate();this.value=[n(t),n(e)],this.valueAsDate=[t,e],this.mostRecentRangeValue=t,this.calciteDatePickerRangeChange.emit(),this.activeStartDate=t||null}getActiveDate(t,e,a){return h(this.activeDate,e,a)||t||h(new Date,e,a)}getActiveEndDate(t,e,a){return h(this.activeEndDate,e,a)||t||h(new Date,e,a)}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{activeDate:["activeDateWatcher"],valueAsDate:["valueAsDateWatcher"],min:["onMinChanged"],max:["onMaxChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange","loadLocaleData"],value:["valueHandler"]}}};M.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-block;inline-size:100%;overflow:visible;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);background-color:var(--calcite-ui-foreground-1);vertical-align:top}:host([scale=s]){max-inline-size:216px}:host([scale=m]){max-inline-size:286px}:host([scale=l]){max-inline-size:398px}";const I=class{constructor(a){t(this,a),this.calciteDaySelect=e(this,"calciteDaySelect",6),this.calciteInternalDayHover=e(this,"calciteInternalDayHover",6),this.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=t=>{P(t.key)&&(!this.disabled&&this.calciteDaySelect.emit(),t.preventDefault())},this.day=void 0,this.disabled=!1,this.currentMonth=!1,this.selected=!1,this.highlighted=!1,this.range=!1,this.startOfRange=!1,this.endOfRange=!1,this.rangeHover=!1,this.active=!1,this.scale=void 0,this.value=void 0}mouseoverHandler(){this.calciteInternalDayHover.emit()}componentWillLoad(){this.parentDatePickerEl=_(this.el,"calcite-date-picker")}render(){const t=n(this.value).replaceAll("-","");if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;x.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const e=x.localize(String(this.day)),r=C(this.el);return a(i,{id:t,onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[S.rtl]:"rtl"===r}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},e)))))}componentDidRender(){A(this,this.isTabbable)}isTabbable(){return this.active}get el(){return r(this)}};I.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;min-inline-size:0px;cursor:pointer;justify-content:center;color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.day-v-wrapper{flex:1 1 auto}.day-wrapper{display:flex;flex-direction:column;align-items:center}.day{display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background:none;box-shadow:0 0 0 2px transparent}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]) .day-v-wrapper{padding-block:0.125rem}:host([scale=s]) .day-wrapper{padding:0px}:host([scale=s]) .day{block-size:27px;inline-size:27px;font-size:var(--calcite-font-size--2)}:host([scale=m]) .day-v-wrapper{padding-block:0.25rem}:host([scale=m]) .day-wrapper{padding-inline:0.25rem}:host([scale=m]) .day{block-size:33px;inline-size:33px;font-size:var(--calcite-font-size--1)}:host([scale=l]) .day-v-wrapper{padding-block:0.25rem}:host([scale=l]) .day-wrapper{padding-inline:0.25rem}:host([scale=l]) .day{block-size:43px;inline-size:43px;font-size:var(--calcite-font-size-0)}:host([current-month]) .day{opacity:1}:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:focus),:host([active]){outline:2px solid transparent;outline-offset:2px}:host(:focus:not([disabled])) .day{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-ui-brand) !important;color:var(--calcite-ui-foreground-1) !important}:host([range][selected]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([start-of-range]) .day-wrapper{border-start-start-radius:40%;border-end-start-radius:40%}:host([end-of-range]) .day-wrapper{border-start-end-radius:40%;border-end-end-radius:40%}:host([start-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .day{opacity:1}:host([end-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .day{opacity:1}:host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day,:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day,:host([end-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([highlighted]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([highlighted]) .day-wrapper .day{color:var(--calcite-ui-text-1)}:host([highlighted]:not([active]:focus)) .day{color:var(--calcite-ui-text-1)}:host([range-hover]:not([selected])) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([range-hover]:not([selected])) .day{border-radius:0px}:host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--start) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--end) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1))}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper,:host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper{background-image:none}:host([start-of-range].hover--inside-range.focused--end) .day-wrapper,:host([end-of-range].hover--inside-range.focused--start) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:first-child) .calcite--rtl .day-wrapper,:host([range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:last-child) .calcite--rtl .day-wrapper,:host([range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 6px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) .day-wrapper,:host([range-hover]:first-child) .day-wrapper{border-start-start-radius:45%;border-end-start-radius:45%}:host([highlighted]:last-child) .day-wrapper,:host([range-hover]:last-child) .day-wrapper{border-start-end-radius:45%;border-end-end-radius:45%}:host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -6px 0px 0px 0px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{border-radius:0px}:host([selected]){outline:2px solid canvasText}:host([selected]) .day{border-radius:0px;background-color:highlight}:host([range][selected]) .day-wrapper,:host([highlighted]) .day-wrapper,:host([range-hover]:not([selected])) .day-wrapper{background-color:highlight}:host([range][selected][start-of-range]) .day-wrapper,:host([range][selected][end-of-range]) .day-wrapper{background-color:canvas}}";const H=class{constructor(a){t(this,a),this.calciteInternalDatePickerSelect=e(this,"calciteInternalDatePickerSelect",6),this.calciteInternalDatePickerHover=e(this,"calciteInternalDatePickerHover",6),this.calciteInternalDatePickerActiveDateChange=e(this,"calciteInternalDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=e(this,"calciteInternalDatePickerMouseOut",6),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const e="rtl"===this.el.dir;switch(t.key){case"ArrowUp":t.preventDefault(),this.addDays(-7);break;case"ArrowRight":t.preventDefault(),this.addDays(e?-1:1);break;case"ArrowDown":t.preventDefault(),this.addDays(7);break;case"ArrowLeft":t.preventDefault(),this.addDays(e?1:-1);break;case"PageUp":t.preventDefault(),this.addMonths(-1);break;case"PageDown":t.preventDefault(),this.addMonths(1);break;case"Home":t.preventDefault(),this.activeDate.setDate(1),this.addDays();break;case"End":t.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays();break;case"Enter":case" ":t.preventDefault();break;case"Tab":this.activeFocus=!1}},this.disableActiveFocus=()=>{this.activeFocus=!1},this.dayHover=t=>{const e=t.target;e.disabled?this.calciteInternalDatePickerMouseOut.emit():this.calciteInternalDatePickerHover.emit(e.value),t.stopPropagation()},this.daySelect=t=>{this.calciteInternalDatePickerSelect.emit(t.target.value)},this.selectedDate=void 0,this.activeDate=new Date,this.startDate=void 0,this.endDate=void 0,this.min=void 0,this.max=void 0,this.scale=void 0,this.localeData=void 0,this.hoverRange=void 0}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const t=this.activeDate.getMonth(),e=this.activeDate.getFullYear(),r=this.localeData.weekStart%7,{abbreviated:o,short:s,narrow:n}=this.localeData.days,c="s"===this.scale?n||s||o:s||o||n,l=[...c.slice(r,7),...c.slice(0,r)],h=this.getCurrentMonthDays(t,e),d=this.getPreviousMonthDays(t,e,r),u=this.getNextMonthDays(t,e,r),p=[...d.map((a=>{const i=new Date(e,t-1,a);return this.renderDateDay(!1,a,i)})),...h.map((a=>{const i=new Date(e,t,a),r=g(i,this.activeDate);return this.renderDateDay(r,a,i,!0,!0)})),...u.map((a=>{const i=new Date(e,t+1,a);return this.renderDateDay(!1,a,i)}))],f=[];for(let t=0;t<p.length;t+=7)f.push(p.slice(t,t+7));return a(i,{onFocusOut:this.disableActiveFocus,onKeyDown:this.keyDownHandler},a("div",{class:"calender",role:"grid"},a("div",{class:"week-headers",role:"row"},l.map((t=>a("span",{class:"week-header",role:"columnheader"},t)))),f.map((t=>a("div",{class:"week-days",role:"row"},t)))))}addMonths(t){const e=new Date(this.activeDate);e.setMonth(this.activeDate.getMonth()+t),this.calciteInternalDatePickerActiveDateChange.emit(h(e,this.min,this.max)),this.activeFocus=!0}addDays(t=0){const e=new Date(this.activeDate);e.setDate(this.activeDate.getDate()+t),this.calciteInternalDatePickerActiveDateChange.emit(h(e,this.min,this.max)),this.activeFocus=!0}getPreviousMonthDays(t,e,a){const i=new Date(e,t,0),r=i.getDate(),o=i.getDay(),s=[];if(o===(a+6)%7)return s;if(o===a)return[r];for(let t=(7+o-a)%7;t>=0;t--)s.push(r-t);return s}getCurrentMonthDays(t,e){const a=new Date(e,t+1,0).getDate(),i=[];for(let t=0;t<a;t++)i.push(t+1);return i}getNextMonthDays(t,e,a){const i=new Date(e,t+1,0).getDay(),r=[];if(i===(a+6)%7)return r;for(let t=0;t<(6-(i-a))%7;t++)r.push(t+1);return r}betweenSelectedRange(t){return!(!(this.startDate&&this.endDate&&t>this.startDate&&t<this.endDate)||this.isRangeHover(t))}isSelected(t){return!!(g(t,this.selectedDate)||this.startDate&&g(t,this.startDate)||this.endDate&&g(t,this.endDate))}isStartOfRange(t){return!(!this.startDate||g(this.startDate,this.endDate)||!g(this.startDate,t)||this.isEndOfRange(t))}isEndOfRange(t){return!!(this.endDate&&!g(this.startDate,this.endDate)&&g(this.endDate,t)||!this.endDate&&this.hoverRange&&g(this.startDate,this.hoverRange.end)&&g(t,this.hoverRange.end))}renderDateDay(t,e,i,r,o){const s=this.isFocusedOnStart(),n=this.isHoverInRange()||!this.endDate&&this.hoverRange&&g(this.hoverRange?.end,this.startDate);return a("calcite-date-picker-day",{active:t,class:{"hover--inside-range":this.startDate&&n,"hover--outside-range":this.startDate&&!n,"focused--start":s,"focused--end":!s},currentMonth:r,day:e,disabled:!p(i,this.min,this.max),endOfRange:this.isEndOfRange(i),highlighted:this.betweenSelectedRange(i),key:i.toDateString(),onCalciteDaySelect:this.daySelect,onCalciteInternalDayHover:this.dayHover,range:!!this.startDate&&!!this.endDate&&!g(this.startDate,this.endDate),rangeHover:this.isRangeHover(i),ref:e=>{o&&t&&this.activeFocus&&e?.focus()},scale:this.scale,selected:this.isSelected(i),startOfRange:this.isStartOfRange(i),value:i})}isFocusedOnStart(){return"start"===this.hoverRange?.focused}isHoverInRange(){if(!this.hoverRange)return!1;const{start:t,end:e}=this.hoverRange;return!!(!this.isFocusedOnStart()&&this.startDate&&(!this.endDate||e<this.endDate)||this.isFocusedOnStart()&&this.startDate&&t>this.startDate)}isRangeHover(t){if(!this.hoverRange)return!1;const{start:e,end:a}=this.hoverRange,i=this.isFocusedOnStart(),r=this.isHoverInRange(),o=r&&(!i&&t>this.startDate&&(t<a||g(t,a))||i&&t<this.endDate&&(t>e||g(t,e))),s=!r&&(!i&&t>=this.endDate&&(t<a||g(t,a))||i&&(this.startDate&&t<this.startDate||this.endDate&&g(t,this.startDate))&&(e&&t>e||g(t,e)));return o||s}get el(){return r(this)}};H.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}.calender{margin-block-end:0.25rem}.week-headers{display:flex;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline:0.25rem}.week-header{text-align:center;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([scale=s]) .week-header{padding-inline:0px;padding-block:0.5rem 0.75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .week-header{padding-inline:0px;padding-block:0.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]) .week-header{padding-inline:0px;padding-block:1rem 1.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}.week-days{display:flex;flex-direction:row;padding-block:0px;padding-inline:6px}.week-days:focus{outline:2px solid transparent;outline-offset:2px}";const R=class{constructor(a){t(this,a),this.calciteInternalDatePickerSelect=e(this,"calciteInternalDatePickerSelect",6),this.onYearKey=t=>{const e=this.parseCalendarYear(t.target.value);switch(t.key){case"ArrowDown":t.preventDefault(),this.setYear({localizedYear:e,offset:-1});break;case"ArrowUp":t.preventDefault(),this.setYear({localizedYear:e,offset:1})}},this.onYearChange=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value)})},this.onYearInput=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value),commit:!1})},this.prevMonthClick=t=>{this.handleArrowClick(t,this.prevMonthDate)},this.prevMonthKeydown=t=>{P(t.key)&&this.prevMonthClick(t)},this.nextMonthClick=t=>{this.handleArrowClick(t,this.nextMonthDate)},this.nextMonthKeydown=t=>{P(t.key)&&this.nextMonthClick(t)},this.handleArrowClick=(t,e)=>{t.preventDefault(),this.calciteInternalDatePickerSelect.emit(e)},this.selectedDate=void 0,this.activeDate=void 0,this.headingLevel=void 0,this.min=void 0,this.max=void 0,this.scale=void 0,this.localeData=void 0,this.messages=void 0,this.globalAttributes={},this.nextMonthDate=void 0,this.prevMonthDate=void 0}componentWillLoad(){this.parentDatePickerEl=_(this.el,"calcite-date-picker")}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){const{messages:t,localeData:e,activeDate:i}=this;if(!i||!e)return null;if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;x.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const r=i.getMonth(),{months:s,unitOrder:n}=e,c=(s.wide||s.narrow||s.abbreviated)[r],l=this.formatCalendarYear(i.getFullYear()),h="l"===this.scale?"m":"s",d=f(n),u=d.indexOf("y")<d.indexOf("m"),g=e.year?.suffix;return a(o,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===r}`,"aria-label":t.prevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===r?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:h})),a("div",{class:{text:!0,"text--reverse":u}},a(j,{class:"month",level:this.headingLevel},c),a("span",{class:"year-wrap"},a("input",{"aria-label":t.year,class:{year:!0,"year--suffix":!!g},inputmode:"numeric",maxlength:"4",minlength:"1",onChange:this.onYearChange,onInput:this.onYearInput,onKeyDown:this.onYearKey,pattern:"\\d*",ref:t=>this.yearInput=t,type:"text",value:l}),g&&a("span",{class:"suffix"},g))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===r}`,"aria-label":t.nextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===r?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:h})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(v(this.activeDate),this.min,this.max),this.prevMonthDate=h(m(this.activeDate),this.min,this.max))}formatCalendarYear(t){const{localeData:e}=this;return x.localize(`${t+("buddhist"===e["default-calendar"]?543:0)}`)}parseCalendarYear(t){const{localeData:e}=this,a="buddhist"===e["default-calendar"]?543:0,i=Number(x.delocalize(t))-a;return x.localize(`${i}`)}getInRangeDate({localizedYear:t,offset:e=0}){const{min:a,max:i,activeDate:r}=this,o=Number(x.delocalize(t)),s=o.toString().length,n=!isNaN(o)&&o+e,c=n&&(!a||a.getFullYear()<=n)&&(!i||i.getFullYear()>=n);if(n&&c&&s===t.length){const t=new Date(r);return t.setFullYear(n),h(t,a,i)}}setYear({localizedYear:t,commit:e=!0,offset:a=0}){const{yearInput:i,activeDate:r}=this,o=this.getInRangeDate({localizedYear:t,offset:a});o&&this.calciteInternalDatePickerSelect.emit(o),e&&(i.value=this.formatCalendarYear((o||r).getFullYear()))}get el(){return r(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};R.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.header{display:flex;justify-content:space-between;padding-block:0px;padding-inline:0.25rem}:host([scale=s]) .text{margin-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=s]) .chevron{block-size:2.25rem}:host([scale=m]) .text{margin-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m]) .chevron{block-size:3rem}:host([scale=l]) .text{margin-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.5rem}:host([scale=l]) .chevron{block-size:3.5rem}.chevron{margin-inline:-0.25rem;box-sizing:content-box;display:flex;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-inline:0.25rem;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inline-size:14.2857142857%}.chevron:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.chevron:hover,.chevron:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.chevron:active{background-color:var(--calcite-ui-foreground-3)}.chevron[aria-disabled=true]{pointer-events:none;opacity:0}.text{margin-block:auto;display:flex;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text--reverse{flex-direction:row-reverse}.month,.year,.suffix{margin-inline:0.25rem;margin-block:auto;display:inline-block;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-1);font-size:inherit}.year{position:relative;inline-size:2.5rem;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent}.year:hover{transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:outline-color;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}.year:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.year--suffix{text-align:start}.year-wrap{position:relative}.suffix{inset-block-start:0px;white-space:nowrap;text-align:start;inset-inline-start:0}";export{M as calcite_date_picker,I as calcite_date_picker_day,H as calcite_date_picker_month,R as calcite_date_picker_month_header}
|
|
6
|
+
import{r as t,c as e,h as a,H as i,g as r,F as o}from"./p-9e413c06.js";import{h as s,b as n,c,g as l,f as h,e as d,s as u,j as g,i as p,k as f,n as v,p as m}from"./p-f2f9a865.js";import{c as w,d as y,n as x}from"./p-5d59d6b8.js";import{c as b,d as k,s as D,u as z}from"./p-251f2a5e.js";import{c as _,b as C}from"./p-3d497b7d.js";import{u as A}from"./p-644998ab.js";import{i as P}from"./p-243b7920.js";import{C as S}from"./p-129976f3.js";import{H as j}from"./p-327823f3.js";import"./p-2d3b1298.js";import"./p-1a0f4b4a.js";const M=class{constructor(a){t(this,a),this.calciteDatePickerChange=e(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=e(this,"calciteDatePickerRangeChange",6),this.keyDownHandler=t=>{"Escape"===t.key&&this.reset()},this.monthHeaderSelectChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthActiveDateChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthHoverChange=t=>{if(!this.range)return void(this.hoverRange=void 0);const{valueAsDate:e}=this,a=Array.isArray(e)&&e[0],i=Array.isArray(e)&&e[1],r=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:a,end:i},this.proximitySelectionDisabled)i?this.hoverRange=void 0:r<a?this.hoverRange={focused:"start",start:r,end:a}:(this.hoverRange.end=r,this.hoverRange.focused="end");else if(i){const t=s(r,a),e=s(r,i);e>0?(this.hoverRange.end=r,this.hoverRange.focused="end"):t<0||t>e?(this.hoverRange.start=r,this.hoverRange.focused="start"):(this.hoverRange.end=r,this.hoverRange.focused="end")}else a&&(r<a?this.hoverRange={focused:"start",start:r,end:a}:(this.hoverRange.end=r,this.hoverRange.focused="end"));t.stopPropagation()},this.monthMouseOutChange=()=>{this.hoverRange&&(this.hoverRange=void 0)},this.reset=()=>{const{valueAsDate:t}=this;!Array.isArray(t)&&t&&t?.getTime()!==this.activeDate?.getTime()&&(this.activeDate=new Date(t)),Array.isArray(t)&&(t[0]&&t[0]?.getTime()!==(this.activeStartDate instanceof Date&&this.activeStartDate?.getTime())&&(this.activeStartDate=new Date(t[0])),t[1]&&t[1]?.getTime()!==(this.activeStartDate instanceof Date&&this.activeEndDate?.getTime())&&(this.activeEndDate=new Date(t[1])))},this.monthDateChange=t=>{const e=new Date(t.detail),a=n(e);if(!this.range&&a===n(this.valueAsDate))return;if(!this.range)return this.value=a||"",this.valueAsDate=e||null,this.activeDate=e||null,void this.calciteDatePickerChange.emit();const i=this.getStartDate(),r=this.getEndDate();if(!i||!r&&e<i)i&&this.setEndDate(new Date(i)),"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else if(r)if(this.proximitySelectionDisabled)this.setStartDate(e);else if(this.activeRange)"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else{const t=s(e,i),a=s(e,r);0===a||t<0?this.setStartDate(e):0===t||a<0?this.setEndDate(e):t<a?this.setStartDate(e):this.setEndDate(e)}else this.setEndDate(e);this.calciteDatePickerChange.emit()},this.activeDate=void 0,this.activeRange=void 0,this.value=void 0,this.headingLevel=void 0,this.valueAsDate=void 0,this.minAsDate=void 0,this.maxAsDate=void 0,this.min=void 0,this.max=void 0,this.numberingSystem=void 0,this.scale="m",this.range=!1,this.proximitySelectionDisabled=!1,this.messageOverrides=void 0,this.messages=void 0,this.activeStartDate=void 0,this.activeEndDate=void 0,this.startAsDate=void 0,this.endAsDate=void 0,this.effectiveLocale="",this.defaultMessages=void 0,this.localeData=void 0,this.hoverRange=void 0}activeDateWatcher(t){"end"===this.activeRange&&(this.activeEndDate=t)}valueAsDateWatcher(t){if(this.range&&Array.isArray(t)){const{activeStartDate:e,activeEndDate:a}=this,i=t[0],r=t[1];this.activeStartDate=e!==i&&i,this.activeEndDate=a!==r&&r}else t&&t!==this.activeDate&&(this.activeDate=t)}onMinChanged(t){t&&(this.minAsDate=c(t))}onMaxChanged(t){t&&(this.maxAsDate=c(t))}onMessagesChange(){}connectedCallback(){w(this),b(this),Array.isArray(this.value)?this.valueAsDate=l(this.value):this.value&&(this.valueAsDate=c(this.value)),this.min&&(this.minAsDate=c(this.min)),this.max&&(this.maxAsDate=c(this.max))}disconnectedCallback(){y(this),k(this)}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max),await D(this)}render(){const t=h(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate);let e=this.getActiveDate(t,this.minAsDate,this.maxAsDate);const r=this.range&&Array.isArray(this.valueAsDate)?h(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,o=this.getActiveEndDate(r,this.minAsDate,this.maxAsDate);return"end"!==this.activeRange&&("end"!==this.hoverRange?.focused||this.proximitySelectionDisabled&&!r)||!o||(e=o),this.range&&this.mostRecentRangeValue&&(e=this.mostRecentRangeValue),a(i,{onBlur:this.reset,onKeyDown:this.keyDownHandler,role:"application"},this.renderCalendar(e,this.range&&this.activeRange&&"start"===this.activeRange&&r||this.maxAsDate,this.range&&this.activeRange?"start"===this.activeRange?this.minAsDate:t||this.minAsDate:this.minAsDate,t,r))}effectiveLocaleChange(){z(this,this.effectiveLocale)}valueHandler(t){Array.isArray(t)?this.valueAsDate=l(t):t&&(this.valueAsDate=c(t))}async loadLocaleData(){x.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await d(this.effectiveLocale)}renderCalendar(t,e,i,r,o){return this.localeData&&[a("calcite-date-picker-month-header",{activeDate:t,headingLevel:this.headingLevel||2,localeData:this.localeData,max:e,messages:this.messages,min:i,onCalciteInternalDatePickerSelect:this.monthHeaderSelectChange,scale:this.scale,selectedDate:"end"===this.activeRange?o:r||new Date}),a("calcite-date-picker-month",{activeDate:t,endDate:this.range?o:void 0,hoverRange:this.hoverRange,localeData:this.localeData,max:e,min:i,onCalciteInternalDatePickerActiveDateChange:this.monthActiveDateChange,onCalciteInternalDatePickerHover:this.monthHoverChange,onCalciteInternalDatePickerMouseOut:this.monthMouseOutChange,onCalciteInternalDatePickerSelect:this.monthDateChange,scale:this.scale,selectedDate:"end"===this.activeRange?o:r,startDate:this.range?r:void 0})]}getEndDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[1]||void 0}setEndDate(t){const e=this.getStartDate(),a=t?u(t):t;this.value=[n(e),n(t)],this.valueAsDate=[e,t],this.mostRecentRangeValue=a,this.calciteDatePickerRangeChange.emit(),this.activeEndDate=t||null}getStartDate(){return Array.isArray(this.valueAsDate)&&this.valueAsDate[0]}setStartDate(t){const e=this.getEndDate();this.value=[n(t),n(e)],this.valueAsDate=[t,e],this.mostRecentRangeValue=t,this.calciteDatePickerRangeChange.emit(),this.activeStartDate=t||null}getActiveDate(t,e,a){return h(this.activeDate,e,a)||t||h(new Date,e,a)}getActiveEndDate(t,e,a){return h(this.activeEndDate,e,a)||t||h(new Date,e,a)}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{activeDate:["activeDateWatcher"],valueAsDate:["valueAsDateWatcher"],min:["onMinChanged"],max:["onMaxChanged"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange","loadLocaleData"],value:["valueHandler"]}}};M.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-block;inline-size:100%;overflow:visible;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);background-color:var(--calcite-ui-foreground-1);vertical-align:top}:host([scale=s]){max-inline-size:216px}:host([scale=m]){max-inline-size:286px}:host([scale=l]){max-inline-size:398px}";const I=class{constructor(a){t(this,a),this.calciteDaySelect=e(this,"calciteDaySelect",6),this.calciteInternalDayHover=e(this,"calciteInternalDayHover",6),this.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=t=>{P(t.key)&&(!this.disabled&&this.calciteDaySelect.emit(),t.preventDefault())},this.day=void 0,this.disabled=!1,this.currentMonth=!1,this.selected=!1,this.highlighted=!1,this.range=!1,this.startOfRange=!1,this.endOfRange=!1,this.rangeHover=!1,this.active=!1,this.scale=void 0,this.value=void 0}mouseoverHandler(){this.calciteInternalDayHover.emit()}componentWillLoad(){this.parentDatePickerEl=_(this.el,"calcite-date-picker")}render(){const t=n(this.value).replaceAll("-","");if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;x.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const e=x.localize(String(this.day)),r=C(this.el);return a(i,{id:t,onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[S.rtl]:"rtl"===r}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},e)))))}componentDidRender(){A(this,this.isTabbable)}isTabbable(){return this.active}get el(){return r(this)}};I.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;min-inline-size:0px;cursor:pointer;justify-content:center;color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.day-v-wrapper{flex:1 1 auto}.day-wrapper{display:flex;flex-direction:column;align-items:center}.day{display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background:none;box-shadow:0 0 0 2px transparent}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]) .day-v-wrapper{padding-block:0.125rem}:host([scale=s]) .day-wrapper{padding:0px}:host([scale=s]) .day{block-size:27px;inline-size:27px;font-size:var(--calcite-font-size--2)}:host([scale=m]) .day-v-wrapper{padding-block:0.25rem}:host([scale=m]) .day-wrapper{padding-inline:0.25rem}:host([scale=m]) .day{block-size:33px;inline-size:33px;font-size:var(--calcite-font-size--1)}:host([scale=l]) .day-v-wrapper{padding-block:0.25rem}:host([scale=l]) .day-wrapper{padding-inline:0.25rem}:host([scale=l]) .day{block-size:43px;inline-size:43px;font-size:var(--calcite-font-size-0)}:host([current-month]) .day{opacity:1}:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:focus),:host([active]){outline:2px solid transparent;outline-offset:2px}:host(:focus:not([disabled])) .day{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-ui-brand) !important;color:var(--calcite-ui-foreground-1) !important}:host([range][selected]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([start-of-range]) .day-wrapper{border-start-start-radius:40%;border-end-start-radius:40%}:host([end-of-range]) .day-wrapper{border-start-end-radius:40%;border-end-end-radius:40%}:host([start-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .day{opacity:1}:host([end-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .day{opacity:1}:host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day,:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day,:host([end-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([highlighted]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([highlighted]) .day-wrapper .day{color:var(--calcite-ui-text-1)}:host([highlighted]:not([active]:focus)) .day{color:var(--calcite-ui-text-1)}:host([range-hover]:not([selected])) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([range-hover]:not([selected])) .day{border-radius:0px}:host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--start) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--end) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1))}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper,:host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper{background-image:none}:host([start-of-range].hover--inside-range.focused--end) .day-wrapper,:host([end-of-range].hover--inside-range.focused--start) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:first-child) .calcite--rtl .day-wrapper,:host([range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:last-child) .calcite--rtl .day-wrapper,:host([range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 6px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) .day-wrapper,:host([range-hover]:first-child) .day-wrapper{border-start-start-radius:45%;border-end-start-radius:45%}:host([highlighted]:last-child) .day-wrapper,:host([range-hover]:last-child) .day-wrapper{border-start-end-radius:45%;border-end-end-radius:45%}:host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -6px 0px 0px 0px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{border-radius:0px}:host([selected]){outline:2px solid canvasText}:host([selected]) .day{border-radius:0px;background-color:highlight}:host([range][selected]) .day-wrapper,:host([highlighted]) .day-wrapper,:host([range-hover]:not([selected])) .day-wrapper{background-color:highlight}:host([range][selected][start-of-range]) .day-wrapper,:host([range][selected][end-of-range]) .day-wrapper{background-color:canvas}}";const H=class{constructor(a){t(this,a),this.calciteInternalDatePickerSelect=e(this,"calciteInternalDatePickerSelect",6),this.calciteInternalDatePickerHover=e(this,"calciteInternalDatePickerHover",6),this.calciteInternalDatePickerActiveDateChange=e(this,"calciteInternalDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=e(this,"calciteInternalDatePickerMouseOut",6),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const e="rtl"===this.el.dir;switch(t.key){case"ArrowUp":t.preventDefault(),this.addDays(-7);break;case"ArrowRight":t.preventDefault(),this.addDays(e?-1:1);break;case"ArrowDown":t.preventDefault(),this.addDays(7);break;case"ArrowLeft":t.preventDefault(),this.addDays(e?1:-1);break;case"PageUp":t.preventDefault(),this.addMonths(-1);break;case"PageDown":t.preventDefault(),this.addMonths(1);break;case"Home":t.preventDefault(),this.activeDate.setDate(1),this.addDays();break;case"End":t.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays();break;case"Enter":case" ":t.preventDefault();break;case"Tab":this.activeFocus=!1}},this.disableActiveFocus=()=>{this.activeFocus=!1},this.dayHover=t=>{const e=t.target;e.disabled?this.calciteInternalDatePickerMouseOut.emit():this.calciteInternalDatePickerHover.emit(e.value),t.stopPropagation()},this.daySelect=t=>{this.calciteInternalDatePickerSelect.emit(t.target.value)},this.selectedDate=void 0,this.activeDate=new Date,this.startDate=void 0,this.endDate=void 0,this.min=void 0,this.max=void 0,this.scale=void 0,this.localeData=void 0,this.hoverRange=void 0}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const t=this.activeDate.getMonth(),e=this.activeDate.getFullYear(),r=this.localeData.weekStart%7,{abbreviated:o,short:s,narrow:n}=this.localeData.days,c="s"===this.scale?n||s||o:s||o||n,l=[...c.slice(r,7),...c.slice(0,r)],h=this.getCurrentMonthDays(t,e),d=this.getPreviousMonthDays(t,e,r),u=this.getNextMonthDays(t,e,r),p=[...d.map((a=>{const i=new Date(e,t-1,a);return this.renderDateDay(!1,a,i)})),...h.map((a=>{const i=new Date(e,t,a),r=g(i,this.activeDate);return this.renderDateDay(r,a,i,!0,!0)})),...u.map((a=>{const i=new Date(e,t+1,a);return this.renderDateDay(!1,a,i)}))],f=[];for(let t=0;t<p.length;t+=7)f.push(p.slice(t,t+7));return a(i,{onFocusOut:this.disableActiveFocus,onKeyDown:this.keyDownHandler},a("div",{class:"calender",role:"grid"},a("div",{class:"week-headers",role:"row"},l.map((t=>a("span",{class:"week-header",role:"columnheader"},t)))),f.map((t=>a("div",{class:"week-days",role:"row"},t)))))}addMonths(t){const e=new Date(this.activeDate);e.setMonth(this.activeDate.getMonth()+t),this.calciteInternalDatePickerActiveDateChange.emit(h(e,this.min,this.max)),this.activeFocus=!0}addDays(t=0){const e=new Date(this.activeDate);e.setDate(this.activeDate.getDate()+t),this.calciteInternalDatePickerActiveDateChange.emit(h(e,this.min,this.max)),this.activeFocus=!0}getPreviousMonthDays(t,e,a){const i=new Date(e,t,0),r=i.getDate(),o=i.getDay(),s=[];if(o===(a+6)%7)return s;if(o===a)return[r];for(let t=(7+o-a)%7;t>=0;t--)s.push(r-t);return s}getCurrentMonthDays(t,e){const a=new Date(e,t+1,0).getDate(),i=[];for(let t=0;t<a;t++)i.push(t+1);return i}getNextMonthDays(t,e,a){const i=new Date(e,t+1,0).getDay(),r=[];if(i===(a+6)%7)return r;for(let t=0;t<(6-(i-a))%7;t++)r.push(t+1);return r}betweenSelectedRange(t){return!(!(this.startDate&&this.endDate&&t>this.startDate&&t<this.endDate)||this.isRangeHover(t))}isSelected(t){return!!(g(t,this.selectedDate)||this.startDate&&g(t,this.startDate)||this.endDate&&g(t,this.endDate))}isStartOfRange(t){return!(!this.startDate||g(this.startDate,this.endDate)||!g(this.startDate,t)||this.isEndOfRange(t))}isEndOfRange(t){return!!(this.endDate&&!g(this.startDate,this.endDate)&&g(this.endDate,t)||!this.endDate&&this.hoverRange&&g(this.startDate,this.hoverRange.end)&&g(t,this.hoverRange.end))}renderDateDay(t,e,i,r,o){const s=this.isFocusedOnStart(),n=this.isHoverInRange()||!this.endDate&&this.hoverRange&&g(this.hoverRange?.end,this.startDate);return a("calcite-date-picker-day",{active:t,class:{"hover--inside-range":this.startDate&&n,"hover--outside-range":this.startDate&&!n,"focused--start":s,"focused--end":!s},currentMonth:r,day:e,disabled:!p(i,this.min,this.max),endOfRange:this.isEndOfRange(i),highlighted:this.betweenSelectedRange(i),key:i.toDateString(),onCalciteDaySelect:this.daySelect,onCalciteInternalDayHover:this.dayHover,range:!!this.startDate&&!!this.endDate&&!g(this.startDate,this.endDate),rangeHover:this.isRangeHover(i),ref:e=>{o&&t&&this.activeFocus&&e?.focus()},scale:this.scale,selected:this.isSelected(i),startOfRange:this.isStartOfRange(i),value:i})}isFocusedOnStart(){return"start"===this.hoverRange?.focused}isHoverInRange(){if(!this.hoverRange)return!1;const{start:t,end:e}=this.hoverRange;return!!(!this.isFocusedOnStart()&&this.startDate&&(!this.endDate||e<this.endDate)||this.isFocusedOnStart()&&this.startDate&&t>this.startDate)}isRangeHover(t){if(!this.hoverRange)return!1;const{start:e,end:a}=this.hoverRange,i=this.isFocusedOnStart(),r=this.isHoverInRange(),o=r&&(!i&&t>this.startDate&&(t<a||g(t,a))||i&&t<this.endDate&&(t>e||g(t,e))),s=!r&&(!i&&t>=this.endDate&&(t<a||g(t,a))||i&&(this.startDate&&t<this.startDate||this.endDate&&g(t,this.startDate))&&(e&&t>e||g(t,e)));return o||s}get el(){return r(this)}};H.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}.calender{margin-block-end:0.25rem}.week-headers{display:flex;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline:0.25rem}.week-header{text-align:center;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([scale=s]) .week-header{padding-inline:0px;padding-block:0.5rem 0.75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .week-header{padding-inline:0px;padding-block:0.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]) .week-header{padding-inline:0px;padding-block:1rem 1.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}.week-days{display:flex;flex-direction:row;padding-block:0px;padding-inline:6px}.week-days:focus{outline:2px solid transparent;outline-offset:2px}";const R=class{constructor(a){t(this,a),this.calciteInternalDatePickerSelect=e(this,"calciteInternalDatePickerSelect",6),this.onYearKey=t=>{const e=this.parseCalendarYear(t.target.value);switch(t.key){case"ArrowDown":t.preventDefault(),this.setYear({localizedYear:e,offset:-1});break;case"ArrowUp":t.preventDefault(),this.setYear({localizedYear:e,offset:1})}},this.onYearChange=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value)})},this.onYearInput=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value),commit:!1})},this.prevMonthClick=t=>{this.handleArrowClick(t,this.prevMonthDate)},this.prevMonthKeydown=t=>{P(t.key)&&this.prevMonthClick(t)},this.nextMonthClick=t=>{this.handleArrowClick(t,this.nextMonthDate)},this.nextMonthKeydown=t=>{P(t.key)&&this.nextMonthClick(t)},this.handleArrowClick=(t,e)=>{t.preventDefault(),this.calciteInternalDatePickerSelect.emit(e)},this.selectedDate=void 0,this.activeDate=void 0,this.headingLevel=void 0,this.min=void 0,this.max=void 0,this.scale=void 0,this.localeData=void 0,this.messages=void 0,this.globalAttributes={},this.nextMonthDate=void 0,this.prevMonthDate=void 0}componentWillLoad(){this.parentDatePickerEl=_(this.el,"calcite-date-picker")}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){const{messages:t,localeData:e,activeDate:i}=this;if(!i||!e)return null;if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;x.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const r=i.getMonth(),{months:s,unitOrder:n}=e,c=(s.wide||s.narrow||s.abbreviated)[r],l=this.formatCalendarYear(i.getFullYear()),h="l"===this.scale?"m":"s",d=f(n),u=d.indexOf("y")<d.indexOf("m"),g=e.year?.suffix;return a(o,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===r}`,"aria-label":t.prevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===r?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:h})),a("div",{class:{text:!0,"text--reverse":u}},a(j,{class:"month",level:this.headingLevel},c),a("span",{class:"year-wrap"},a("input",{"aria-label":t.year,class:{year:!0,"year--suffix":!!g},inputmode:"numeric",maxlength:"4",minlength:"1",onChange:this.onYearChange,onInput:this.onYearInput,onKeyDown:this.onYearKey,pattern:"\\d*",ref:t=>this.yearInput=t,type:"text",value:l}),g&&a("span",{class:"suffix"},g))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===r}`,"aria-label":t.nextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===r?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:h})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(v(this.activeDate),this.min,this.max),this.prevMonthDate=h(m(this.activeDate),this.min,this.max))}formatCalendarYear(t){const{localeData:e}=this;return x.localize(`${t+("buddhist"===e["default-calendar"]?543:0)}`)}parseCalendarYear(t){const{localeData:e}=this,a="buddhist"===e["default-calendar"]?543:0,i=Number(x.delocalize(t))-a;return x.localize(`${i}`)}getInRangeDate({localizedYear:t,offset:e=0}){const{min:a,max:i,activeDate:r}=this,o=Number(x.delocalize(t)),s=o.toString().length,n=!isNaN(o)&&o+e,c=n&&(!a||a.getFullYear()<=n)&&(!i||i.getFullYear()>=n);if(n&&c&&s===t.length){const t=new Date(r);return t.setFullYear(n),h(t,a,i)}}setYear({localizedYear:t,commit:e=!0,offset:a=0}){const{yearInput:i,activeDate:r}=this,o=this.getInRangeDate({localizedYear:t,offset:a});o&&this.calciteInternalDatePickerSelect.emit(o),e&&(i.value=this.formatCalendarYear((o||r).getFullYear()))}get el(){return r(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};R.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.header{display:flex;justify-content:space-between;padding-block:0px;padding-inline:0.25rem}:host([scale=s]) .text{margin-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=s]) .chevron{block-size:2.25rem}:host([scale=m]) .text{margin-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m]) .chevron{block-size:3rem}:host([scale=l]) .text{margin-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.5rem}:host([scale=l]) .chevron{block-size:3.5rem}.chevron{margin-inline:-0.25rem;box-sizing:content-box;display:flex;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-inline:0.25rem;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inline-size:14.2857142857%}.chevron:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.chevron:hover,.chevron:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.chevron:active{background-color:var(--calcite-ui-foreground-3)}.chevron[aria-disabled=true]{pointer-events:none;opacity:0}.text{margin-block:auto;display:flex;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text--reverse{flex-direction:row-reverse}.month,.year,.suffix{margin-inline:0.25rem;margin-block:auto;display:inline-block;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-1);font-size:inherit}.year{position:relative;inline-size:2.5rem;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent}.year:hover{transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:outline-color;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}.year:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.year--suffix{text-align:start}.year-wrap{position:relative}.suffix{inset-block-start:0px;white-space:nowrap;text-align:start;inset-inline-start:0}";export{M as calcite_date_picker,I as calcite_date_picker_day,H as calcite_date_picker_month,R as calcite_date_picker_month_header}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{a as i,r as a,h as t,H as n,g as e}from"./p-
|
|
6
|
+
import{a as i,r as a,h as t,H as n,g as e}from"./p-9e413c06.js";import{b as c,t as s}from"./p-3d497b7d.js";import{c as o}from"./p-2d3b1298.js";import"./p-1a0f4b4a.js";import"./p-129976f3.js";const r={},l={},m={s:16,m:24,l:32};const d=class{constructor(i){a(this,i),this.icon=null,this.flipRtl=!1,this.scale="m",this.textLabel=void 0,this.pathData=void 0,this.visible=!1}connectedCallback(){this.waitUntilVisible((()=>{this.visible=!0,this.loadIconPathData()}))}disconnectedCallback(){this.intersectionObserver?.disconnect(),this.intersectionObserver=null}async componentWillLoad(){this.loadIconPathData()}render(){const{el:i,flipRtl:a,pathData:e,scale:o,textLabel:r}=this,l=c(i),d=m[o],h=!!r,f=[].concat(e||"");return t(n,{"aria-hidden":s(!h),"aria-label":h?r:null,role:h?"img":null},t("svg",{"aria-hidden":"true",class:{"flip-rtl":"rtl"===l&&a,svg:!0},fill:"currentColor",height:"100%",viewBox:`0 0 ${d} ${d}`,width:"100%",xmlns:"http://www.w3.org/2000/svg"},f.map((i=>t("path","string"==typeof i?{d:i}:{d:i.d,opacity:"opacity"in i?i.opacity:1})))))}async loadIconPathData(){const{icon:a,scale:t,visible:n}=this;a&&n&&(this.pathData=await async function({icon:a,scale:t}){const n=m[t],e=function(i){const a=!isNaN(Number(i.charAt(0))),t=i.split("-");if(t.length>0){const a=/[a-z]/i;i=t.map(((i,t)=>i.replace(a,(function(i,a){return 0===t&&0===a?i:i.toUpperCase()})))).join("")}return a?`i${i}`:i}(a),c="F"===e.charAt(e.length-1),s=`${c?e.substring(0,e.length-1):e}${n}${c?"F":""}`;if(r[s])return r[s];l[s]||(l[s]=fetch(i(`./assets/icon/${s}.json`)).then((i=>i.json())).catch((()=>(console.error(`"${s}" is not a valid calcite-ui-icon name`),""))));const o=await l[s];return r[s]=o,o}({icon:a,scale:t}))}waitUntilVisible(i){this.intersectionObserver=o("intersection",(a=>{a.forEach((a=>{a.isIntersecting&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null,i())}))}),{rootMargin:"50px"}),this.intersectionObserver?this.intersectionObserver.observe(this.el):i()}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{icon:["loadIconPathData"],scale:["loadIconPathData"]}}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:inline-flex;color:var(--calcite-ui-icon-color)}:host([scale=s]){block-size:1rem;inline-size:1rem;min-inline-size:1rem;min-block-size:1rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem;min-inline-size:1.5rem;min-block-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem;min-inline-size:2rem;min-block-size:2rem}.flip-rtl{transform:scaleX(-1)}.svg{display:block}";export{d as calcite_icon}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as e,H as s}from"./p-c8897356.js";import{S as n}from"./p-14e72f25.js";import{u as o}from"./p-0a19a968.js";import{s as r,a as c,c as l}from"./p-790a8f19.js";import{c as h,d}from"./p-691827d3.js";import{c as m}from"./p-a374ca29.js";import{u as p,c as u,s as f,d as v}from"./p-f2743a30.js";import{g,m as w,d as b,a as y,s as x,h as k,b as D,c as L,k as _,e as j,i as C,f as I,j as z,l as A,n as H,r as F,o as R,p as S,q as U,t as $,L as B,I as M,C as O,S as q}from"./p-4001a727.js";import{c as K,d as T}from"./p-cca09fb9.js";import{g as W}from"./p-b3910a16.js";import{g as E}from"./p-a60fc92c.js";import"./p-9f066d03.js";import"./p-8a556a44.js";import"./p-ad180f2f.js";import"./p-536b8494.js";var P;function V(t,i,a){const{items:e,messages:s}=a,n=e.length,o=g(a,t)+1;return function(t,i,a,e){return t.replace("${position}",a.toString()).replace("${itemLabel}",i).replace("${total}",e.toString())}("idle"===i?s.dragHandleIdle:"active"===i?s.dragHandleActive:"change"===i?s.dragHandleChange:s.dragHandleCommit,t.label,o,n)}function G(t){return{handle:t.composedPath().find((t=>void 0!==t.dataset?.jsHandle)),item:t.composedPath().find((t=>"calcite-value-list-item"===t.tagName?.toLowerCase()))}}!function(t){t.grip="grip"}(P||(P={}));const J=class{constructor(a){t(this,a),this.calciteListChange=i(this,"calciteListChange",6),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.calciteListFilter=i(this,"calciteListFilter",6),this.lastSelectedItem=null,this.mutationObserver=m("mutation",w.bind(this)),this.setFilterEl=t=>{this.filterEl=t},this.setFilteredItems=t=>{this.filteredItems=t},this.deselectRemovedItems=b.bind(this),this.deselectSiblingItems=y.bind(this),this.selectSiblings=x.bind(this),this.handleFilter=k.bind(this),this.handleFilterEvent=D.bind(this),this.getItemData=L.bind(this),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const{handle:i,item:a}=G(t);if(i&&!a.handleActivated&&" "===t.key&&this.updateScreenReaderText(V(a,"commit",this)),!i||!a.handleActivated)return void _.call(this,t);const{items:e}=this;if(" "===t.key&&this.updateScreenReaderText(V(a,"active",this)),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.length<=1)return;t.preventDefault();const{el:s}=this,n=j(this,a,"ArrowUp"===t.key?"up":"down");if(n===e.length-1)s.appendChild(a);else{const t=s.children[n];s.insertBefore(a,t===a.nextElementSibling?t.nextElementSibling:t)}this.items=this.getItems(),this.calciteListOrderChange.emit(this.items.map((({value:t})=>t))),requestAnimationFrame((()=>i?.focus())),a.handleActivated=!0,this.updateHandleAriaLabel(i,V(a,"change",this))},this.storeAssistiveEl=t=>{this.assistiveTextEl=t},this.handleFocusIn=t=>{const{handle:i,item:a}=G(t);!a?.handleActivated&&a&&i&&this.updateHandleAriaLabel(i,V(a,"idle",this))},this.disabled=!1,this.dragEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterEnabled=!1,this.filterPlaceholder=void 0,this.filterText=void 0,this.group=void 0,this.loading=!1,this.multiple=!1,this.selectionFollowsFocus=!1,this.messageOverrides=void 0,this.messages=void 0,this.dataForFilter=[],this.defaultMessages=void 0,this.effectiveLocale="",this.selectedValues=new Map}onMessagesChange(){}effectiveLocaleChange(){p(this,this.effectiveLocale)}connectedCallback(){h(this),u(this),C.call(this),I.call(this)}async componentWillLoad(){r(this),await f(this)}componentDidLoad(){c(this),this.setUpDragAndDrop(),z.call(this)}componentDidRender(){o(this)}disconnectedCallback(){d(this),v(this),A.call(this),this.cleanUpDragAndDrop()}calciteListFocusOutHandler(t){H.call(this,t)}calciteListItemRemoveHandler(t){F.call(this,t)}calciteListItemChangeHandler(t){R.call(this,t)}calciteInternalListItemPropsChangeHandler(t){t.stopPropagation(),this.setUpFilter()}calciteInternalListItemValueChangeHandler(t){S.call(this,t),t.stopPropagation()}getItems(){return Array.from(this.el.querySelectorAll("calcite-value-list-item"))}setUpItems(){U.call(this,"calcite-value-list-item")}setUpFilter(){this.filterEnabled&&(this.dataForFilter=this.getItemData())}setUpDragAndDrop(){this.cleanUpDragAndDrop(),this.dragEnabled&&(this.sortable=n.create(this.el,{dataIdAttr:"id",handle:".handle",draggable:"calcite-value-list-item",group:this.group,onSort:()=>{this.items=Array.from(this.el.querySelectorAll("calcite-value-list-item"));const t=this.items.map((t=>t.value));this.calciteListOrderChange.emit(t)}}))}cleanUpDragAndDrop(){this.sortable?.destroy(),this.sortable=null}handleBlur(){this.dragEnabled&&this.updateScreenReaderText("")}async getSelectedItems(){return this.selectedValues}async setFocus(t){return await l(this),$.call(this,t)}getIconType(){let t=null;return this.dragEnabled&&(t=P.grip),t}updateScreenReaderText(t){this.assistiveTextEl.textContent=t}updateHandleAriaLabel(t,i){t.ariaLabel=i}render(){return a(B,{onBlur:this.handleBlur,onFocusin:this.handleFocusIn,onKeyDown:this.keyDownHandler,props:this})}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};J.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}calcite-value-list-item:last-of-type{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header{margin-block-end:0.25rem;display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:sticky;inset-block-start:0px;z-index:300}calcite-filter{margin-block-end:1px}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}";const N=class{constructor(a){t(this,a),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.pickListItem=null,this.guid=`calcite-value-list-item-${E()}`,this.getPickListRef=t=>this.pickListItem=t,this.handleKeyDown=t=>{" "===t.key&&(t.preventDefault(),this.handleActivated=!this.handleActivated)},this.handleBlur=()=>{this.handleActivated=!1},this.handleSelectChange=t=>{this.selected=t.detail.selected},this.description=void 0,this.disabled=!1,this.deselectDisabled=!1,this.nonInteractive=!1,this.handleActivated=!1,this.icon=null,this.iconFlipRtl=!1,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.value=void 0}connectedCallback(){K(this)}disconnectedCallback(){T(this)}componentWillLoad(){r(this)}componentDidLoad(){c(this)}componentDidRender(){o(this,!!this.el.closest("calcite-value-list")&&"managed")}async toggleSelected(t){this.pickListItem.toggleSelected(t)}async setFocus(){await l(this),this.pickListItem?.setFocus()}calciteListItemChangeHandler(t){t.detail.item=this.el}renderActionsEnd(){const{el:t}=this;return W(t,"actions-end")?a("slot",{name:"actions-end",slot:q.actionsEnd}):null}renderActionsStart(){const{el:t}=this;return W(t,"actions-start")?a("slot",{name:"actions-start",slot:q.actionsStart}):null}renderHandle(){const{icon:t,iconFlipRtl:i}=this;if(t===M.grip)return a("span",{class:{[O.handle]:!0,[O.handleActivated]:this.handleActivated},"data-js-handle":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0"},a("calcite-icon",{flipRtl:i,icon:"drag",scale:"s"}))}render(){return a(s,{id:this.el.id||this.guid},this.renderHandle(),a("calcite-pick-list-item",{description:this.description,deselectDisabled:this.deselectDisabled,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,ref:this.getPickListRef,removable:this.removable,selected:this.selected,value:this.value},this.renderActionsStart(),this.renderActionsEnd()))}get el(){return e(this)}};N.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{margin-block-end:1px;box-sizing:border-box;display:flex;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}:host *{box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-ui-brand);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.handle{display:flex;cursor:move;align-items:center;justify-content:center;border-style:none;background-color:transparent;padding-block:0px;padding-inline:0.25rem;color:var(--calcite-ui-border-input);outline-color:transparent}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{J as calcite_value_list,N as calcite_value_list_item}
|
|
6
|
+
import{r as t,c as i,h as a,g as e,H as s}from"./p-9e413c06.js";import{S as n}from"./p-c9e949ec.js";import{u as o}from"./p-644998ab.js";import{s as r,a as c,c as l}from"./p-dc200732.js";import{c as h,d}from"./p-5d59d6b8.js";import{c as m}from"./p-2d3b1298.js";import{u as p,c as u,s as f,d as v}from"./p-251f2a5e.js";import{g,m as w,d as b,a as y,s as x,h as k,b as D,c as L,k as _,e as j,i as C,f as I,j as z,l as A,n as H,r as F,o as R,p as S,q as U,t as $,L as B,I as M,C as O,S as q}from"./p-f68b2bdb.js";import{c as K,d as T}from"./p-2516afdb.js";import{g as W}from"./p-3d497b7d.js";import{g as E}from"./p-1a0f4b4a.js";import"./p-243b7920.js";import"./p-b44a8d52.js";import"./p-5f0fe068.js";import"./p-129976f3.js";var P;function V(t,i,a){const{items:e,messages:s}=a,n=e.length,o=g(a,t)+1;return function(t,i,a,e){return t.replace("${position}",a.toString()).replace("${itemLabel}",i).replace("${total}",e.toString())}("idle"===i?s.dragHandleIdle:"active"===i?s.dragHandleActive:"change"===i?s.dragHandleChange:s.dragHandleCommit,t.label,o,n)}function G(t){return{handle:t.composedPath().find((t=>void 0!==t.dataset?.jsHandle)),item:t.composedPath().find((t=>"calcite-value-list-item"===t.tagName?.toLowerCase()))}}!function(t){t.grip="grip"}(P||(P={}));const J=class{constructor(a){t(this,a),this.calciteListChange=i(this,"calciteListChange",6),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.calciteListFilter=i(this,"calciteListFilter",6),this.lastSelectedItem=null,this.mutationObserver=m("mutation",w.bind(this)),this.setFilterEl=t=>{this.filterEl=t},this.setFilteredItems=t=>{this.filteredItems=t},this.deselectRemovedItems=b.bind(this),this.deselectSiblingItems=y.bind(this),this.selectSiblings=x.bind(this),this.handleFilter=k.bind(this),this.handleFilterEvent=D.bind(this),this.getItemData=L.bind(this),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const{handle:i,item:a}=G(t);if(i&&!a.handleActivated&&" "===t.key&&this.updateScreenReaderText(V(a,"commit",this)),!i||!a.handleActivated)return void _.call(this,t);const{items:e}=this;if(" "===t.key&&this.updateScreenReaderText(V(a,"active",this)),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||e.length<=1)return;t.preventDefault();const{el:s}=this,n=j(this,a,"ArrowUp"===t.key?"up":"down");if(n===e.length-1)s.appendChild(a);else{const t=s.children[n];s.insertBefore(a,t===a.nextElementSibling?t.nextElementSibling:t)}this.items=this.getItems(),this.calciteListOrderChange.emit(this.items.map((({value:t})=>t))),requestAnimationFrame((()=>i?.focus())),a.handleActivated=!0,this.updateHandleAriaLabel(i,V(a,"change",this))},this.storeAssistiveEl=t=>{this.assistiveTextEl=t},this.handleFocusIn=t=>{const{handle:i,item:a}=G(t);!a?.handleActivated&&a&&i&&this.updateHandleAriaLabel(i,V(a,"idle",this))},this.disabled=!1,this.dragEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterEnabled=!1,this.filterPlaceholder=void 0,this.filterText=void 0,this.group=void 0,this.loading=!1,this.multiple=!1,this.selectionFollowsFocus=!1,this.messageOverrides=void 0,this.messages=void 0,this.dataForFilter=[],this.defaultMessages=void 0,this.effectiveLocale="",this.selectedValues=new Map}onMessagesChange(){}effectiveLocaleChange(){p(this,this.effectiveLocale)}connectedCallback(){h(this),u(this),C.call(this),I.call(this)}async componentWillLoad(){r(this),await f(this)}componentDidLoad(){c(this),this.setUpDragAndDrop(),z.call(this)}componentDidRender(){o(this)}disconnectedCallback(){d(this),v(this),A.call(this),this.cleanUpDragAndDrop()}calciteListFocusOutHandler(t){H.call(this,t)}calciteListItemRemoveHandler(t){F.call(this,t)}calciteListItemChangeHandler(t){R.call(this,t)}calciteInternalListItemPropsChangeHandler(t){t.stopPropagation(),this.setUpFilter()}calciteInternalListItemValueChangeHandler(t){S.call(this,t),t.stopPropagation()}getItems(){return Array.from(this.el.querySelectorAll("calcite-value-list-item"))}setUpItems(){U.call(this,"calcite-value-list-item")}setUpFilter(){this.filterEnabled&&(this.dataForFilter=this.getItemData())}setUpDragAndDrop(){this.cleanUpDragAndDrop(),this.dragEnabled&&(this.sortable=n.create(this.el,{dataIdAttr:"id",handle:".handle",draggable:"calcite-value-list-item",group:this.group,onSort:()=>{this.items=Array.from(this.el.querySelectorAll("calcite-value-list-item"));const t=this.items.map((t=>t.value));this.calciteListOrderChange.emit(t)}}))}cleanUpDragAndDrop(){this.sortable?.destroy(),this.sortable=null}handleBlur(){this.dragEnabled&&this.updateScreenReaderText("")}async getSelectedItems(){return this.selectedValues}async setFocus(t){return await l(this),$.call(this,t)}getIconType(){let t=null;return this.dragEnabled&&(t=P.grip),t}updateScreenReaderText(t){this.assistiveTextEl.textContent=t}updateHandleAriaLabel(t,i){t.ariaLabel=i}render(){return a(B,{onBlur:this.handleBlur,onFocusin:this.handleFocusIn,onKeyDown:this.keyDownHandler,props:this})}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};J.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;flex-grow:0;flex-direction:column;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}calcite-value-list-item:last-of-type{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header{margin-block-end:0.25rem;display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:sticky;inset-block-start:0px;z-index:300}calcite-filter{margin-block-end:1px}.assistive-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}";const N=class{constructor(a){t(this,a),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.pickListItem=null,this.guid=`calcite-value-list-item-${E()}`,this.getPickListRef=t=>this.pickListItem=t,this.handleKeyDown=t=>{" "===t.key&&(t.preventDefault(),this.handleActivated=!this.handleActivated)},this.handleBlur=()=>{this.handleActivated=!1},this.handleSelectChange=t=>{this.selected=t.detail.selected},this.description=void 0,this.disabled=!1,this.deselectDisabled=!1,this.nonInteractive=!1,this.handleActivated=!1,this.icon=null,this.iconFlipRtl=!1,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.value=void 0}connectedCallback(){K(this)}disconnectedCallback(){T(this)}componentWillLoad(){r(this)}componentDidLoad(){c(this)}componentDidRender(){o(this,!!this.el.closest("calcite-value-list")&&"managed")}async toggleSelected(t){this.pickListItem.toggleSelected(t)}async setFocus(){await l(this),this.pickListItem?.setFocus()}calciteListItemChangeHandler(t){t.detail.item=this.el}renderActionsEnd(){const{el:t}=this;return W(t,"actions-end")?a("slot",{name:"actions-end",slot:q.actionsEnd}):null}renderActionsStart(){const{el:t}=this;return W(t,"actions-start")?a("slot",{name:"actions-start",slot:q.actionsStart}):null}renderHandle(){const{icon:t,iconFlipRtl:i}=this;if(t===M.grip)return a("span",{class:{[O.handle]:!0,[O.handleActivated]:this.handleActivated},"data-js-handle":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,role:"button",tabindex:"0"},a("calcite-icon",{flipRtl:i,icon:"drag",scale:"s"}))}render(){return a(s,{id:this.el.id||this.guid},this.renderHandle(),a("calcite-pick-list-item",{description:this.description,deselectDisabled:this.deselectDisabled,disabled:this.disabled,label:this.label,metadata:this.metadata,nonInteractive:this.nonInteractive,onCalciteListItemChange:this.handleSelectChange,ref:this.getPickListRef,removable:this.removable,selected:this.selected,value:this.value},this.renderActionsStart(),this.renderActionsEnd()))}get el(){return e(this)}};N.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{margin-block-end:1px;box-sizing:border-box;display:flex;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing), box-shadow var(--calcite-animation-timing)}:host *{box-sizing:border-box}calcite-pick-list-item{position:relative;margin:0px;flex-grow:1;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([active]),:host([selected]){--tw-shadow:0 0 0 1px var(--calcite-ui-brand);--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.handle{display:flex;cursor:move;align-items:center;justify-content:center;border-style:none;background-color:transparent;padding-block:0px;padding-inline:0.25rem;color:var(--calcite-ui-border-input);outline-color:transparent}.handle:hover{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.handle:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.handle--activated{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}.handle calcite-icon{color:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{J as calcite_value_list,N as calcite_value_list_item}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as s}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,g as s}from"./p-9e413c06.js";import{h as e,g as n}from"./p-3d497b7d.js";import{u as c}from"./p-644998ab.js";import{c as o,d as r,g as l}from"./p-d3a5b453.js";import{s as h,a as d,c as p}from"./p-dc200732.js";import{c as m,d as b}from"./p-5d59d6b8.js";import{c as u}from"./p-2d3b1298.js";import{c as f,s as g,d as y,u as v}from"./p-251f2a5e.js";import"./p-1a0f4b4a.js";import"./p-129976f3.js";import"./p-243b7920.js";const w=class{constructor(a){t(this,a),this.calciteInlineEditableEditCancel=i(this,"calciteInlineEditableEditCancel",6),this.calciteInlineEditableEditConfirm=i(this,"calciteInlineEditableEditConfirm",6),this.calciteInternalInlineEditableEnableEditingChange=i(this,"calciteInternalInlineEditableEnableEditingChange",6),this.mutationObserver=u("mutation",(()=>this.mutationObserverCallback())),this.enableEditing=()=>{this.valuePriorToEditing=this.inputElement?.value,this.editingEnabled=!0,this.inputElement?.setFocus(),this.calciteInternalInlineEditableEnableEditingChange.emit()},this.disableEditing=()=>{this.editingEnabled=!1},this.cancelEditing=()=>{this.inputElement&&(this.inputElement.value=this.valuePriorToEditing),this.disableEditing(),this.enableEditingButton.setFocus(),!this.editingEnabled&&this.shouldEmitCancel&&this.calciteInlineEditableEditCancel.emit()},this.escapeKeyHandler=async t=>{t.defaultPrevented||("Escape"===t.key&&(t.preventDefault(),this.cancelEditing()),"Tab"===t.key&&this.shouldShowControls&&(t.shiftKey||t.target!==this.inputElement||(t.preventDefault(),this.cancelEditingButton.setFocus()),t.shiftKey&&t.target===this.cancelEditingButton&&(t.preventDefault(),this.inputElement?.setFocus())))},this.cancelEditingHandler=async t=>{t.preventDefault(),this.cancelEditing()},this.enableEditingHandler=async t=>{this.disabled||t.target===this.cancelEditingButton||t.target===this.confirmEditingButton||(t.preventDefault(),this.editingEnabled||this.enableEditing())},this.confirmChangesHandler=async t=>{t.preventDefault(),this.calciteInlineEditableEditConfirm.emit();try{this.afterConfirm&&(this.loading=!0,await this.afterConfirm(),this.disableEditing(),this.enableEditingButton.setFocus())}catch(t){}finally{this.loading=!1}},this.disabled=!1,this.editingEnabled=!1,this.loading=!1,this.controls=!1,this.scale=void 0,this.afterConfirm=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale=void 0}disabledWatcher(t){this.inputElement&&(this.inputElement.disabled=t)}editingEnabledWatcher(t,i){this.inputElement&&(this.inputElement.editingEnabled=t),!t&&i&&(this.shouldEmitCancel=!0)}onMessagesChange(){}connectedCallback(){o(this),m(this),f(this),this.mutationObserver?.observe(this.el,{childList:!0}),this.mutationObserverCallback()}async componentWillLoad(){h(this),await g(this)}componentDidLoad(){d(this)}disconnectedCallback(){r(this),b(this),y(this),this.mutationObserver?.disconnect()}componentDidRender(){c(this)}render(){return a("div",{class:"wrapper",onClick:this.enableEditingHandler,onKeyDown:this.escapeKeyHandler},a("div",{class:"input-wrapper"},a("slot",null)),a("div",{class:"controls-wrapper"},a("calcite-button",{appearance:"transparent",class:"enable-editing-button",disabled:this.disabled,iconStart:"pencil",kind:"neutral",label:this.messages.enableEditing,onClick:this.enableEditingHandler,ref:t=>this.enableEditingButton=t,scale:this.scale,style:{opacity:this.editingEnabled?"0":"1",width:this.editingEnabled?"0":"inherit"},type:"button"}),this.shouldShowControls&&[a("div",{class:"cancel-editing-button-wrapper"},a("calcite-button",{appearance:"transparent",class:"cancel-editing-button",disabled:this.disabled,iconStart:"x",kind:"neutral",label:this.messages.cancelEditing,onClick:this.cancelEditingHandler,ref:t=>this.cancelEditingButton=t,scale:this.scale,type:"button"})),a("calcite-button",{appearance:"solid",class:"confirm-changes-button",disabled:this.disabled,iconStart:"check",kind:"brand",label:this.messages.confirmChanges,loading:this.loading,onClick:this.confirmChangesHandler,ref:t=>this.confirmEditingButton=t,scale:this.scale,type:"button"})]))}blurHandler(){this.controls||this.disableEditing()}effectiveLocaleChange(){v(this,this.effectiveLocale)}async setFocus(){await p(this),this.el?.focus()}mutationObserverCallback(){this.updateSlottedInput(),this.scale=this.scale||this.inputElement?.scale||e(this.el,"scale",void 0)}onLabelClick(){this.setFocus()}updateSlottedInput(){const t=n(this.el,{matches:"calcite-input"});this.inputElement=t,t&&(this.inputElement.disabled=this.disabled,this.inputElement.label=this.inputElement.label||l(this))}get shouldShowControls(){return this.editingEnabled&&this.controls}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{disabled:["disabledWatcher"],editingEnabled:["editingEnabledWatcher"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};w.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) .controls-wrapper{block-size:1.5rem}:host([scale=m]) .controls-wrapper{block-size:2rem}:host([scale=l]) .controls-wrapper{block-size:2.75rem}:host(:not([editing-enabled]):not([disabled])) .wrapper:hover{background-color:var(--calcite-ui-foreground-2)}.wrapper{box-sizing:border-box;display:flex;justify-content:space-between;background-color:var(--calcite-ui-foreground-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.wrapper .input-wrapper{flex:1 1 0%}.controls-wrapper{display:flex}:host([disabled]) .cancel-editing-button-wrapper{border-color:var(--calcite-ui-border-2)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{w as calcite_inline_editable}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{q as e,c as n}from"./p-
|
|
6
|
+
import{q as e,c as n}from"./p-3d497b7d.js";const t="calciteInternalLabelConnected",c="calciteInternaLabelDisconnected",a=new WeakMap,l=new WeakMap,o=new WeakMap,i=new Set;function s(t){const c=(t=>{const{id:c}=t,a=c&&e(t,{selector:`calcite-label[for="${c}"]`});if(a)return a;const l=n(t,"calcite-label");return!l||function(e,n){let t;const c="custom-element-ancestor-check",a=c=>{c.stopImmediatePropagation();const a=c.composedPath();t=a.slice(a.indexOf(n),a.indexOf(e))};return e.addEventListener(c,a,{once:!0}),n.dispatchEvent(new CustomEvent(c,{composed:!0,bubbles:!0})),e.removeEventListener(c,a),t.filter((t=>t!==n&&t!==e)).filter((e=>e.tagName?.includes("-"))).length>0}(l,t)?null:l})(t.el);if(a.has(c)||!c&&i.has(t))return;const s=f.bind(t);if(c){t.labelEl=c;const e=d.bind(t);a.set(t.labelEl,e),t.labelEl.addEventListener("calciteInternalLabelClick",e),i.delete(t),document.removeEventListener("calciteInternalLabelConnected",l.get(t)),o.set(t,s),document.addEventListener("calciteInternaLabelDisconnected",s)}else i.has(t)||(s(),document.removeEventListener("calciteInternaLabelDisconnected",o.get(t)))}function r(e){if(i.delete(e),document.removeEventListener("calciteInternalLabelConnected",l.get(e)),document.removeEventListener("calciteInternaLabelDisconnected",o.get(e)),l.delete(e),o.delete(e),!e.labelEl)return;const n=a.get(e.labelEl);e.labelEl.removeEventListener("calciteInternalLabelClick",n),a.delete(e.labelEl)}function u(e){return e.label||e.labelEl?.textContent?.trim()||""}function d(e){this.disabled||this.el.contains(e.detail.sourceEvent.target)||this.onLabelClick(e)}function b(){i.has(this)&&s(this)}function f(){i.add(this);const e=l.get(this)||b.bind(this);l.set(this,e),document.addEventListener("calciteInternalLabelConnected",e)}export{c as a,s as c,r as d,u as g,t as l}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,g as n,H as a}from"./p-c8897356.js";import{t as s,s as c,b as o}from"./p-b3910a16.js";import{u as l}from"./p-0a19a968.js";import{c as r}from"./p-a374ca29.js";import{s as d,a as h,c as m}from"./p-790a8f19.js";import{d as p}from"./p-ad180f2f.js";import"./p-a60fc92c.js";import"./p-536b8494.js";function u(t){const i=t.target.assignedElements({flatten:!0});return[...i.filter((t=>t?.matches("calcite-list-item-group"))).map((t=>Array.from(t.querySelectorAll("calcite-list-item")))).reduce(((t,i)=>[...t,...i]),[]),...i.filter((t=>t?.matches("calcite-list-item")))]}function f(t){t.forEach((i=>{i.setPosition=t.indexOf(i)+1,i.setSize=t.length}))}function b(t,i=!1){return document.evaluate(i?"ancestor::calcite-list-item | ancestor::calcite-list-item-group":"ancestor::calcite-list-item",t,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const g=class{constructor(e){t(this,e),this.calciteListFilter=i(this,"calciteListFilter",6),this.listItems=[],this.enabledListItems=[],this.mutationObserver=r("mutation",(()=>this.updateListItems())),this.handleDefaultSlotChange=t=>{f(u(t))},this.setActiveListItem=()=>{const{enabledListItems:t}=this;t.some((t=>t.active))||t[0]&&(t[0].active=!0)},this.updateSelectedItems=p((()=>{this.selectedItems=this.enabledListItems.filter((t=>t.selected))}),100),this.updateFilteredItems=p((()=>{const{listItems:t,filteredData:i,filterText:e}=this,n=i.map((t=>t.value)),a=new Set,s=t?.filter((t=>{const i=t.parentElement;i.matches("calcite-list-item-group")&&a.add(i);const s=!e||n.includes(t.value);return t.hidden=!s,s}))||[];this.filteredItems=s,a.forEach((t=>{const i=s.some((i=>t.contains(i)));if(t.hidden=!i,!i)return;const e=t.closest("calcite-list-item");e&&(e.hidden=!1,s.includes(e)&&Array.from(t.querySelectorAll("calcite-list-item")).forEach((t=>t.hidden=!1)))})),a.clear()})),this.handleFilter=t=>{t.stopPropagation();const{filteredItems:i,value:e}=t.currentTarget;this.filteredData=i,this.filterText=e,this.updateFilteredItems(),this.calciteListFilter.emit()},this.getItemData=()=>this.listItems.map((t=>({label:t.label,description:t.description,metadata:t.metadata,value:t.value}))),this.updateListItems=p((()=>{const{selectionAppearance:t,selectionMode:i}=this,e=this.queryListItems();e.forEach((e=>{e.selectionAppearance=t,e.selectionMode=i})),this.listItems=e,this.enabledListItems=e.filter((t=>!t.disabled)),this.filterEnabled&&(this.dataForFilter=this.getItemData()),this.setActiveListItem(),this.updateSelectedItems(),this.updateFilteredItems()}),100),this.queryListItems=()=>Array.from(this.el.querySelectorAll("calcite-list-item")),this.focusRow=t=>{const{enabledListItems:i}=this;t&&(i.forEach((i=>i.active=i===t)),t.setFocus())},this.isNavigable=t=>{const i=t.parentElement?.closest("calcite-list-item");return!i||i.open&&this.isNavigable(i)},this.handleListKeydown=t=>{const{key:i}=t,e=this.enabledListItems.filter((t=>this.isNavigable(t))),n=e.findIndex((t=>t.active));if("ArrowDown"===i){t.preventDefault();const i=n+1;e[i]&&this.focusRow(e[i])}else if("ArrowUp"===i){t.preventDefault();const i=n-1;e[i]&&this.focusRow(e[i])}else if("Home"===i){t.preventDefault();const i=e[0];i&&this.focusRow(i)}else if("End"===i){t.preventDefault();const i=e[e.length-1];i&&this.focusRow(i)}},this.disabled=!1,this.filterEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterPlaceholder=void 0,this.filterText=void 0,this.label=void 0,this.loading=!1,this.openable=!1,this.selectedItems=[],this.selectionMode="none",this.selectionAppearance="icon",this.dataForFilter=[]}handleFilterEnabledChange(){this.updateListItems()}handleSelectionAppearanceChange(){this.updateListItems()}handleCalciteInternalFocusPreviousItem(t){t.stopPropagation();const{enabledListItems:i}=this,e=i.findIndex((t=>t.active))-1;i[e]&&this.focusRow(i[e])}handleCalciteListItemActive(t){const i=t.target,{listItems:e}=this;e.forEach((t=>{t.active=t===i}))}handleCalciteListItemSelect(t){const i=t.target,{listItems:e,selectionMode:n}=this;e.forEach((t=>{"single"===n&&(t.selected=t===i)})),this.updateSelectedItems()}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateListItems()}disconnectedCallback(){this.mutationObserver?.disconnect()}componentWillLoad(){d(this)}componentDidRender(){l(this)}componentDidLoad(){h(this);const{filterEl:t}=this,i=t?.filteredItems;i&&(this.filteredData=i),this.updateFilteredItems()}async setFocus(){await m(this),this.enabledListItems.find((t=>t.active))?.setFocus()}render(){const{loading:t,label:i,disabled:n,dataForFilter:a,filterEnabled:c,filterPlaceholder:o,filterText:l}=this;return e("div",{class:"container"},t?e("calcite-scrim",{class:"scrim",loading:t}):null,e("table",{"aria-busy":s(t),"aria-label":i||"",class:"table",onKeyDown:this.handleListKeydown,role:"treegrid"},c?e("thead",null,e("tr",{class:{"sticky-pos":!0}},e("th",{colSpan:5},e("calcite-filter",{"aria-label":o,disabled:t||n,items:a,onCalciteFilterChange:this.handleFilter,placeholder:o,ref:t=>this.filterEl=t,value:l})))):null,e("tbody",{class:"table-container"},e("slot",{onSlotchange:this.handleDefaultSlotChange}))))}get el(){return n(this)}static get watchers(){return{filterEnabled:["handleFilterEnabledChange"],selectionMode:["handleSelectionAppearanceChange"],selectionAppearance:["handleSelectionAppearanceChange"]}}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{position:relative}.table-container{position:relative;z-index:1;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.sticky-pos{position:sticky;inset-block-start:0px;z-index:300}calcite-filter{margin-block-end:1px}";const y=new Map,v=class{constructor(e){t(this,e),this.calciteListItemSelect=i(this,"calciteListItemSelect",6),this.calciteInternalListItemSelect=i(this,"calciteInternalListItemSelect",6),this.calciteInternalListItemActive=i(this,"calciteInternalListItemActive",6),this.calciteInternalFocusPreviousItem=i(this,"calciteInternalFocusPreviousItem",6),this.handleContentSlotChange=t=>{this.hasCustomContent=c(t)},this.handleActionsStartSlotChange=t=>{this.hasActionsStart=c(t)},this.handleActionsEndSlotChange=t=>{this.hasActionsEnd=c(t)},this.handleContentStartSlotChange=t=>{this.hasContentStart=c(t)},this.handleContentEndSlotChange=t=>{this.hasContentEnd=c(t)},this.handleDefaultSlotChange=t=>{const{parentListEl:i}=this,e=u(t);f(e);const n=!!e.length;n&&i&&!i.openable&&(i.openable=!0),this.openable=n,n||(this.open=!1)},this.toggleOpen=()=>{this.open=!this.open},this.itemClicked=()=>{this.toggleSelected(),this.calciteInternalListItemActive.emit()},this.toggleSelected=()=>{this.disabled||("none"!==this.selectionMode&&(this.selected=!this.selected),this.calciteListItemSelect.emit())},this.handleItemKeyDown=t=>{const{key:i}=t,e=t.composedPath(),{containerEl:n,contentEl:a,actionsStartEl:s,actionsEndEl:c,open:o,openable:l}=this,r=[s,a,c].filter(Boolean),d=r.findIndex((t=>e.includes(t)));if(" "===i)t.preventDefault(),this.toggleSelected();else if("ArrowRight"===i){t.preventDefault();const i=d+1;-1===d?!o&&l?(this.open=!0,this.focusCell(null)):r[0]&&this.focusCell(r[0]):r[d]&&r[i]&&this.focusCell(r[i])}else if("ArrowLeft"===i){t.preventDefault();const i=d-1;-1===d?(this.focusCell(null),o&&l?this.open=!1:this.calciteInternalFocusPreviousItem.emit()):0===d?(this.focusCell(null),n.focus()):r[d]&&r[i]&&this.focusCell(r[i])}},this.focusCellNull=()=>{this.focusCell(null)},this.focusCell=(t,i=!0)=>{const{contentEl:e,actionsStartEl:n,actionsEndEl:a,parentListEl:s}=this;i&&y.set(s,null),[n,e,a].filter(Boolean).forEach(((e,n)=>{const a="tabindex";e===t?(e.setAttribute(a,"0"),i&&y.set(s,n)):e.removeAttribute(a)})),t?.focus()},this.active=!1,this.description=void 0,this.disabled=!1,this.label=void 0,this.metadata=void 0,this.open=!1,this.setSize=null,this.setPosition=null,this.selected=!1,this.value=void 0,this.selectionMode=null,this.selectionAppearance=null,this.level=null,this.visualLevel=null,this.parentListEl=void 0,this.openable=!1,this.hasActionsStart=!1,this.hasActionsEnd=!1,this.hasCustomContent=!1,this.hasContentStart=!1,this.hasContentEnd=!1}activeHandler(t){t||this.focusCell(null,!1)}handleSelectedChange(t){t&&this.calciteInternalListItemSelect.emit()}connectedCallback(){const{el:t}=this;this.parentListEl=t.closest("calcite-list"),this.level=b(t)+1,this.visualLevel=b(t,!0),this.setSelectionDefaults()}componentWillLoad(){d(this)}componentDidLoad(){h(this)}componentDidRender(){l(this,"managed")}async setFocus(){await m(this);const{containerEl:t,contentEl:i,actionsStartEl:e,actionsEndEl:n,parentListEl:a}=this,s=y.get(a);if("number"!=typeof s)t?.focus();else{const a=[e,i,n].filter(Boolean);a[s]?this.focusCell(a[s]):t?.focus()}}renderSelected(){const{selected:t,selectionMode:i,selectionAppearance:n}=this;return"none"===i||"border"===n?null:e("td",{class:"selection-container",key:"selection-container",onClick:this.itemClicked},e("calcite-icon",{icon:t?"multiple"===i?"check-circle-f":"circle-f":"blank",scale:"s"}))}renderOpen(){const{el:t,open:i,openable:n,parentListEl:a}=this,s=o(t);return n?e("td",{class:"open-container",key:"open-container",onClick:this.toggleOpen},e("calcite-icon",{icon:i?"caret-down":"rtl"===s?"caret-left":"caret-right",scale:"s"})):a?.openable?e("td",{class:"open-container",key:"open-container",onClick:this.itemClicked},e("calcite-icon",{icon:"blank",scale:"s"})):null}renderActionsStart(){const{label:t,hasActionsStart:i}=this;return e("td",{"aria-label":t,class:"actions-start",hidden:!i,key:"actions-start-container",ref:t=>this.actionsStartEl=t,role:"gridcell"},e("slot",{name:"actions-start",onSlotchange:this.handleActionsStartSlotChange}))}renderActionsEnd(){const{label:t,hasActionsEnd:i}=this;return e("td",{"aria-label":t,class:"actions-end",hidden:!i,key:"actions-end-container",ref:t=>this.actionsEndEl=t,role:"gridcell"},e("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}))}renderContentStart(){const{hasContentStart:t}=this;return e("div",{class:"content-start",hidden:!t},e("slot",{name:"content-start",onSlotchange:this.handleContentStartSlotChange}))}renderCustomContent(){const{hasCustomContent:t}=this;return e("div",{class:"custom-content",hidden:!t},e("slot",{name:"content",onSlotchange:this.handleContentSlotChange}))}renderContentEnd(){const{hasContentEnd:t}=this;return e("div",{class:"content-end",hidden:!t},e("slot",{name:"content-end",onSlotchange:this.handleContentEndSlotChange}))}renderContentProperties(){const{label:t,description:i,hasCustomContent:n}=this;return n||!t&&!i?null:e("div",{class:"content",key:"content"},t?e("div",{class:"label",key:"label"},t):null,i?e("div",{class:"description",key:"description"},i):null)}renderContentContainer(){const{description:t,label:i,selectionMode:n,hasCustomContent:a}=this,s=a||!!i||!!t,c=[this.renderContentStart(),this.renderCustomContent(),this.renderContentProperties(),this.renderContentEnd()];return e("td",{"aria-label":i,class:{"content-container":!0,"content-container--selectable":"none"!==n,"content-container--has-center-content":s},key:"content-container",onClick:this.itemClicked,ref:t=>this.contentEl=t,role:"gridcell"},c)}render(){const{openable:t,open:i,level:n,setPosition:c,setSize:o,active:l,label:r,selected:d,selectionAppearance:h,selectionMode:m}=this,p="none"!==m&&"border"===h,u=p&&d,f=p&&!d;return e(a,null,e("tr",{"aria-expanded":t?s(i):null,"aria-label":r,"aria-level":n,"aria-posinset":c,"aria-selected":s(d),"aria-setsize":o,class:{container:!0,"container--border-selected":u,"container--border-unselected":f},onFocus:this.focusCellNull,onKeyDown:this.handleItemKeyDown,ref:t=>this.containerEl=t,role:"row",style:{"--calcite-list-item-spacing-indent-multiplier":`${this.visualLevel}`},tabIndex:l?0:-1},this.renderSelected(),this.renderOpen(),this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),e("div",{class:{"nested-container":!0,"nested-container--hidden":t&&!i}},e("slot",{onSlotchange:this.handleDefaultSlotChange})))}setSelectionDefaults(){const{parentListEl:t,selectionMode:i,selectionAppearance:e}=this;t&&(i||(this.selectionMode=t.selectionMode),e||(this.selectionAppearance=t.selectionAppearance))}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["handleSelectedChange"]}}};v.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-direction:column;--calcite-list-item-icon-color:var(--calcite-ui-brand);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-1);font-family:var(--calcite-sans-family);padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}.container *{box-sizing:border-box}.container:hover{cursor:pointer;background-color:var(--calcite-ui-foreground-2)}.container--border-selected{border-inline-start:4px solid var(--calcite-ui-brand)}.container--border-unselected{border-inline-start:4px solid transparent}.nested-container{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}.nested-container--hidden{display:none}.content-container{display:flex;flex:1 1 auto;align-items:stretch;padding:0px;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}tr,td{outline-color:transparent}tr:focus,td:focus{z-index:300;outline:2px solid var(--calcite-ui-brand)}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}.label,.description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}.label:only-child,.description:only-child{margin:0px;padding-block:0.25rem}.label{color:var(--calcite-ui-text-1)}.description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.selection-container{display:flex;padding-inline:0.75rem;color:var(--calcite-list-item-icon-color)}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.open-container{display:flex;align-items:center}.open-container,.selection-container{cursor:pointer}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch;color:inherit}::slotted(calcite-list-item){border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}[hidden]{display:none}";const w=class{constructor(i){t(this,i),this.disabled=!1,this.heading=void 0,this.visualLevel=null}connectedCallback(){const{el:t}=this;this.visualLevel=b(t,!0)}componentDidRender(){l(this)}render(){const{heading:t,visualLevel:i}=this;return e(a,null,e("tr",{class:"container",style:{"--calcite-list-item-spacing-indent-multiplier":`${i}`}},e("td",{class:"heading",colSpan:5},t)),e("slot",null))}get el(){return n(this)}};w.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{margin:0px;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-2);padding:0.75rem;font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}.heading{padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";export{g as calcite_list,v as calcite_list_item,w as calcite_list_item_group}
|
|
6
|
+
import{r as t,c as i,h as e,g as n,H as a}from"./p-9e413c06.js";import{t as s,s as c,b as o}from"./p-3d497b7d.js";import{u as l}from"./p-644998ab.js";import{c as r}from"./p-2d3b1298.js";import{s as d,a as h,c as m}from"./p-dc200732.js";import{d as p}from"./p-5f0fe068.js";import"./p-1a0f4b4a.js";import"./p-129976f3.js";function u(t){const i=t.target.assignedElements({flatten:!0});return[...i.filter((t=>t?.matches("calcite-list-item-group"))).map((t=>Array.from(t.querySelectorAll("calcite-list-item")))).reduce(((t,i)=>[...t,...i]),[]),...i.filter((t=>t?.matches("calcite-list-item")))]}function f(t){t.forEach((i=>{i.setPosition=t.indexOf(i)+1,i.setSize=t.length}))}function b(t,i=!1){return document.evaluate(i?"ancestor::calcite-list-item | ancestor::calcite-list-item-group":"ancestor::calcite-list-item",t,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const g=class{constructor(e){t(this,e),this.calciteListFilter=i(this,"calciteListFilter",6),this.listItems=[],this.enabledListItems=[],this.mutationObserver=r("mutation",(()=>this.updateListItems())),this.handleDefaultSlotChange=t=>{f(u(t))},this.setActiveListItem=()=>{const{enabledListItems:t}=this;t.some((t=>t.active))||t[0]&&(t[0].active=!0)},this.updateSelectedItems=p((()=>{this.selectedItems=this.enabledListItems.filter((t=>t.selected))}),100),this.updateFilteredItems=p((()=>{const{listItems:t,filteredData:i,filterText:e}=this,n=i.map((t=>t.value)),a=new Set,s=t?.filter((t=>{const i=t.parentElement;i.matches("calcite-list-item-group")&&a.add(i);const s=!e||n.includes(t.value);return t.hidden=!s,s}))||[];this.filteredItems=s,a.forEach((t=>{const i=s.some((i=>t.contains(i)));if(t.hidden=!i,!i)return;const e=t.closest("calcite-list-item");e&&(e.hidden=!1,s.includes(e)&&Array.from(t.querySelectorAll("calcite-list-item")).forEach((t=>t.hidden=!1)))})),a.clear()})),this.handleFilter=t=>{t.stopPropagation();const{filteredItems:i,value:e}=t.currentTarget;this.filteredData=i,this.filterText=e,this.updateFilteredItems(),this.calciteListFilter.emit()},this.getItemData=()=>this.listItems.map((t=>({label:t.label,description:t.description,metadata:t.metadata,value:t.value}))),this.updateListItems=p((()=>{const{selectionAppearance:t,selectionMode:i}=this,e=this.queryListItems();e.forEach((e=>{e.selectionAppearance=t,e.selectionMode=i})),this.listItems=e,this.enabledListItems=e.filter((t=>!t.disabled)),this.filterEnabled&&(this.dataForFilter=this.getItemData()),this.setActiveListItem(),this.updateSelectedItems(),this.updateFilteredItems()}),100),this.queryListItems=()=>Array.from(this.el.querySelectorAll("calcite-list-item")),this.focusRow=t=>{const{enabledListItems:i}=this;t&&(i.forEach((i=>i.active=i===t)),t.setFocus())},this.isNavigable=t=>{const i=t.parentElement?.closest("calcite-list-item");return!i||i.open&&this.isNavigable(i)},this.handleListKeydown=t=>{const{key:i}=t,e=this.enabledListItems.filter((t=>this.isNavigable(t))),n=e.findIndex((t=>t.active));if("ArrowDown"===i){t.preventDefault();const i=n+1;e[i]&&this.focusRow(e[i])}else if("ArrowUp"===i){t.preventDefault();const i=n-1;e[i]&&this.focusRow(e[i])}else if("Home"===i){t.preventDefault();const i=e[0];i&&this.focusRow(i)}else if("End"===i){t.preventDefault();const i=e[e.length-1];i&&this.focusRow(i)}},this.disabled=!1,this.filterEnabled=!1,this.filteredItems=[],this.filteredData=[],this.filterPlaceholder=void 0,this.filterText=void 0,this.label=void 0,this.loading=!1,this.openable=!1,this.selectedItems=[],this.selectionMode="none",this.selectionAppearance="icon",this.dataForFilter=[]}handleFilterEnabledChange(){this.updateListItems()}handleSelectionAppearanceChange(){this.updateListItems()}handleCalciteInternalFocusPreviousItem(t){t.stopPropagation();const{enabledListItems:i}=this,e=i.findIndex((t=>t.active))-1;i[e]&&this.focusRow(i[e])}handleCalciteListItemActive(t){const i=t.target,{listItems:e}=this;e.forEach((t=>{t.active=t===i}))}handleCalciteListItemSelect(t){const i=t.target,{listItems:e,selectionMode:n}=this;e.forEach((t=>{"single"===n&&(t.selected=t===i)})),this.updateSelectedItems()}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.updateListItems()}disconnectedCallback(){this.mutationObserver?.disconnect()}componentWillLoad(){d(this)}componentDidRender(){l(this)}componentDidLoad(){h(this);const{filterEl:t}=this,i=t?.filteredItems;i&&(this.filteredData=i),this.updateFilteredItems()}async setFocus(){await m(this),this.enabledListItems.find((t=>t.active))?.setFocus()}render(){const{loading:t,label:i,disabled:n,dataForFilter:a,filterEnabled:c,filterPlaceholder:o,filterText:l}=this;return e("div",{class:"container"},t?e("calcite-scrim",{class:"scrim",loading:t}):null,e("table",{"aria-busy":s(t),"aria-label":i||"",class:"table",onKeyDown:this.handleListKeydown,role:"treegrid"},c?e("thead",null,e("tr",{class:{"sticky-pos":!0}},e("th",{colSpan:5},e("calcite-filter",{"aria-label":o,disabled:t||n,items:a,onCalciteFilterChange:this.handleFilter,placeholder:o,ref:t=>this.filterEl=t,value:l})))):null,e("tbody",{class:"table-container"},e("slot",{onSlotchange:this.handleDefaultSlotChange}))))}get el(){return n(this)}static get watchers(){return{filterEnabled:["handleFilterEnabledChange"],selectionMode:["handleSelectionAppearanceChange"],selectionAppearance:["handleSelectionAppearanceChange"]}}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{position:relative}.table-container{position:relative;z-index:1;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.table-container *{box-sizing:border-box}.table{inline-size:100%}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.sticky-pos{position:sticky;inset-block-start:0px;z-index:300}calcite-filter{margin-block-end:1px}";const y=new Map,v=class{constructor(e){t(this,e),this.calciteListItemSelect=i(this,"calciteListItemSelect",6),this.calciteInternalListItemSelect=i(this,"calciteInternalListItemSelect",6),this.calciteInternalListItemActive=i(this,"calciteInternalListItemActive",6),this.calciteInternalFocusPreviousItem=i(this,"calciteInternalFocusPreviousItem",6),this.handleContentSlotChange=t=>{this.hasCustomContent=c(t)},this.handleActionsStartSlotChange=t=>{this.hasActionsStart=c(t)},this.handleActionsEndSlotChange=t=>{this.hasActionsEnd=c(t)},this.handleContentStartSlotChange=t=>{this.hasContentStart=c(t)},this.handleContentEndSlotChange=t=>{this.hasContentEnd=c(t)},this.handleDefaultSlotChange=t=>{const{parentListEl:i}=this,e=u(t);f(e);const n=!!e.length;n&&i&&!i.openable&&(i.openable=!0),this.openable=n,n||(this.open=!1)},this.toggleOpen=()=>{this.open=!this.open},this.itemClicked=()=>{this.toggleSelected(),this.calciteInternalListItemActive.emit()},this.toggleSelected=()=>{this.disabled||("none"!==this.selectionMode&&(this.selected=!this.selected),this.calciteListItemSelect.emit())},this.handleItemKeyDown=t=>{const{key:i}=t,e=t.composedPath(),{containerEl:n,contentEl:a,actionsStartEl:s,actionsEndEl:c,open:o,openable:l}=this,r=[s,a,c].filter(Boolean),d=r.findIndex((t=>e.includes(t)));if(" "===i)t.preventDefault(),this.toggleSelected();else if("ArrowRight"===i){t.preventDefault();const i=d+1;-1===d?!o&&l?(this.open=!0,this.focusCell(null)):r[0]&&this.focusCell(r[0]):r[d]&&r[i]&&this.focusCell(r[i])}else if("ArrowLeft"===i){t.preventDefault();const i=d-1;-1===d?(this.focusCell(null),o&&l?this.open=!1:this.calciteInternalFocusPreviousItem.emit()):0===d?(this.focusCell(null),n.focus()):r[d]&&r[i]&&this.focusCell(r[i])}},this.focusCellNull=()=>{this.focusCell(null)},this.focusCell=(t,i=!0)=>{const{contentEl:e,actionsStartEl:n,actionsEndEl:a,parentListEl:s}=this;i&&y.set(s,null),[n,e,a].filter(Boolean).forEach(((e,n)=>{const a="tabindex";e===t?(e.setAttribute(a,"0"),i&&y.set(s,n)):e.removeAttribute(a)})),t?.focus()},this.active=!1,this.description=void 0,this.disabled=!1,this.label=void 0,this.metadata=void 0,this.open=!1,this.setSize=null,this.setPosition=null,this.selected=!1,this.value=void 0,this.selectionMode=null,this.selectionAppearance=null,this.level=null,this.visualLevel=null,this.parentListEl=void 0,this.openable=!1,this.hasActionsStart=!1,this.hasActionsEnd=!1,this.hasCustomContent=!1,this.hasContentStart=!1,this.hasContentEnd=!1}activeHandler(t){t||this.focusCell(null,!1)}handleSelectedChange(t){t&&this.calciteInternalListItemSelect.emit()}connectedCallback(){const{el:t}=this;this.parentListEl=t.closest("calcite-list"),this.level=b(t)+1,this.visualLevel=b(t,!0),this.setSelectionDefaults()}componentWillLoad(){d(this)}componentDidLoad(){h(this)}componentDidRender(){l(this,"managed")}async setFocus(){await m(this);const{containerEl:t,contentEl:i,actionsStartEl:e,actionsEndEl:n,parentListEl:a}=this,s=y.get(a);if("number"!=typeof s)t?.focus();else{const a=[e,i,n].filter(Boolean);a[s]?this.focusCell(a[s]):t?.focus()}}renderSelected(){const{selected:t,selectionMode:i,selectionAppearance:n}=this;return"none"===i||"border"===n?null:e("td",{class:"selection-container",key:"selection-container",onClick:this.itemClicked},e("calcite-icon",{icon:t?"multiple"===i?"check-circle-f":"circle-f":"blank",scale:"s"}))}renderOpen(){const{el:t,open:i,openable:n,parentListEl:a}=this,s=o(t);return n?e("td",{class:"open-container",key:"open-container",onClick:this.toggleOpen},e("calcite-icon",{icon:i?"caret-down":"rtl"===s?"caret-left":"caret-right",scale:"s"})):a?.openable?e("td",{class:"open-container",key:"open-container",onClick:this.itemClicked},e("calcite-icon",{icon:"blank",scale:"s"})):null}renderActionsStart(){const{label:t,hasActionsStart:i}=this;return e("td",{"aria-label":t,class:"actions-start",hidden:!i,key:"actions-start-container",ref:t=>this.actionsStartEl=t,role:"gridcell"},e("slot",{name:"actions-start",onSlotchange:this.handleActionsStartSlotChange}))}renderActionsEnd(){const{label:t,hasActionsEnd:i}=this;return e("td",{"aria-label":t,class:"actions-end",hidden:!i,key:"actions-end-container",ref:t=>this.actionsEndEl=t,role:"gridcell"},e("slot",{name:"actions-end",onSlotchange:this.handleActionsEndSlotChange}))}renderContentStart(){const{hasContentStart:t}=this;return e("div",{class:"content-start",hidden:!t},e("slot",{name:"content-start",onSlotchange:this.handleContentStartSlotChange}))}renderCustomContent(){const{hasCustomContent:t}=this;return e("div",{class:"custom-content",hidden:!t},e("slot",{name:"content",onSlotchange:this.handleContentSlotChange}))}renderContentEnd(){const{hasContentEnd:t}=this;return e("div",{class:"content-end",hidden:!t},e("slot",{name:"content-end",onSlotchange:this.handleContentEndSlotChange}))}renderContentProperties(){const{label:t,description:i,hasCustomContent:n}=this;return n||!t&&!i?null:e("div",{class:"content",key:"content"},t?e("div",{class:"label",key:"label"},t):null,i?e("div",{class:"description",key:"description"},i):null)}renderContentContainer(){const{description:t,label:i,selectionMode:n,hasCustomContent:a}=this,s=a||!!i||!!t,c=[this.renderContentStart(),this.renderCustomContent(),this.renderContentProperties(),this.renderContentEnd()];return e("td",{"aria-label":i,class:{"content-container":!0,"content-container--selectable":"none"!==n,"content-container--has-center-content":s},key:"content-container",onClick:this.itemClicked,ref:t=>this.contentEl=t,role:"gridcell"},c)}render(){const{openable:t,open:i,level:n,setPosition:c,setSize:o,active:l,label:r,selected:d,selectionAppearance:h,selectionMode:m}=this,p="none"!==m&&"border"===h,u=p&&d,f=p&&!d;return e(a,null,e("tr",{"aria-expanded":t?s(i):null,"aria-label":r,"aria-level":n,"aria-posinset":c,"aria-selected":s(d),"aria-setsize":o,class:{container:!0,"container--border-selected":u,"container--border-unselected":f},onFocus:this.focusCellNull,onKeyDown:this.handleItemKeyDown,ref:t=>this.containerEl=t,role:"row",style:{"--calcite-list-item-spacing-indent-multiplier":`${this.visualLevel}`},tabIndex:l?0:-1},this.renderSelected(),this.renderOpen(),this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),e("div",{class:{"nested-container":!0,"nested-container--hidden":t&&!i}},e("slot",{onSlotchange:this.handleDefaultSlotChange})))}setSelectionDefaults(){const{parentListEl:t,selectionMode:i,selectionAppearance:e}=this;t&&(i||(this.selectionMode=t.selectionMode),e||(this.selectionAppearance=t.selectionAppearance))}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["handleSelectedChange"]}}};v.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-direction:column;--calcite-list-item-icon-color:var(--calcite-ui-brand);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-1);font-family:var(--calcite-sans-family);padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}.container *{box-sizing:border-box}.container:hover{cursor:pointer;background-color:var(--calcite-ui-foreground-2)}.container--border-selected{border-inline-start:4px solid var(--calcite-ui-brand)}.container--border-unselected{border-inline-start:4px solid transparent}.nested-container{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}.nested-container--hidden{display:none}.content-container{display:flex;flex:1 1 auto;align-items:stretch;padding:0px;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2)}tr,td{outline-color:transparent}tr:focus,td:focus{z-index:300;outline:2px solid var(--calcite-ui-brand)}.content,.custom-content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}.label,.description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}.label:only-child,.description:only-child{margin:0px;padding-block:0.25rem}.label{color:var(--calcite-ui-text-1)}.description{margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.content-container--has-center-content .content-start,.content-container--has-center-content .content-end{flex:0 1 auto}.selection-container{display:flex;padding-inline:0.75rem;color:var(--calcite-list-item-icon-color)}.actions-start,.actions-end,.content-start,.content-end,.selection-container,.open-container{display:flex;align-items:center}.open-container,.selection-container{cursor:pointer}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch;color:inherit}::slotted(calcite-list-item){border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}[hidden]{display:none}";const w=class{constructor(i){t(this,i),this.disabled=!1,this.heading=void 0,this.visualLevel=null}connectedCallback(){const{el:t}=this;this.visualLevel=b(t,!0)}componentDidRender(){l(this)}render(){const{heading:t,visualLevel:i}=this;return e(a,null,e("tr",{class:"container",style:{"--calcite-list-item-spacing-indent-multiplier":`${i}`}},e("td",{class:"heading",colSpan:5},t)),e("slot",null))}get el(){return n(this)}};w.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);--calcite-list-item-spacing-indent:1rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{margin:0px;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-2);padding:0.75rem;font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2)}.heading{padding-inline-start:calc(var(--calcite-list-item-spacing-indent) * var(--calcite-list-item-spacing-indent-multiplier))}::slotted(calcite-list-item){margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";export{g as calcite_list,v as calcite_list_item,w as calcite_list_item_group}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as n}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,g as n}from"./p-9e413c06.js";import{S as e}from"./p-c9e949ec.js";import{u as s}from"./p-644998ab.js";import{c}from"./p-2d3b1298.js";const o=class{constructor(a){t(this,a),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.items=[],this.mutationObserver=c("mutation",(()=>{this.cleanUpDragAndDrop(),this.items=Array.from(this.el.children),this.setUpDragAndDrop()})),this.dragSelector=void 0,this.group=void 0,this.handleSelector="calcite-handle",this.layout="vertical",this.disabled=!1,this.loading=!1,this.handleActivated=!1}connectedCallback(){this.items=Array.from(this.el.children),this.setUpDragAndDrop(),this.beginObserving()}disconnectedCallback(){this.mutationObserver?.disconnect(),this.cleanUpDragAndDrop()}componentDidRender(){s(this)}calciteHandleNudgeNextHandler(t){this.handleNudgeEvent(t)}handleNudgeEvent(t){const{direction:i}=t.detail,a=t.target,n=this.items.find((i=>i.contains(a)||t.composedPath().includes(i))),e=this.items.length-1,s=this.items.indexOf(n);let c,o=!1;"up"===i?0===s?o=!0:c=s-1:s===e?c=0:s===e-1?o=!0:c=s+2,this.mutationObserver?.disconnect(),o?n.parentElement.appendChild(n):n.parentElement.insertBefore(n,this.items[c]),this.items=Array.from(this.el.children),a.activated=!0,a.setFocus(),this.beginObserving()}setUpDragAndDrop(){this.cleanUpDragAndDrop();const t={dataIdAttr:"id",group:this.group,handle:this.handleSelector,onUpdate:()=>{this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()},onStart:()=>{this.mutationObserver?.disconnect()},onEnd:()=>{this.beginObserving()}};this.dragSelector&&(t.draggable=this.dragSelector),this.sortable=e.create(this.el,t)}cleanUpDragAndDrop(){this.sortable?.destroy(),this.sortable=null}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}render(){const{layout:t}=this,i="horizontal"===t||!1;return a("div",{class:{container:!0,"container--vertical":!i,"container--horizontal":i}},a("slot",null))}get el(){return n(this)}};o.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}";export{o as calcite_sortable_list}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
6
|
const n=new WeakMap,a=new WeakMap;function e(e){a.set(e,new Promise((a=>n.set(e,a))))}function o(a){n.get(a)()}function s(n){return a.get(n)}export{o as a,s as c,e as s}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.
|
|
4
|
+
* v1.0.7
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,c as t,h as e,g as n}from"./p-c8897356.js";import{c as a,d as o}from"./p-cca09fb9.js";import{s as c}from"./p-b3910a16.js";import{g as r}from"./p-a60fc92c.js";import{a as s,s as l,c as d}from"./p-790a8f19.js";import{c as h,d as p}from"./p-691827d3.js";import{c as m}from"./p-a374ca29.js";import{u,c as b,d as g,s as v}from"./p-f2743a30.js";import"./p-536b8494.js";import"./p-9f066d03.js";const f=class{constructor(e){i(this,e),this.calciteChipClose=t(this,"calciteChipClose",6),this.closeClickHandler=i=>{i.preventDefault(),this.calciteChipClose.emit(),this.closed=!0},this.handleSlotImageChange=i=>{this.hasImage=c(i)},this.mutationObserver=m("mutation",(()=>this.updateHasContent())),this.guid=r(),this.appearance="solid",this.kind="neutral",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.value=void 0,this.closed=!1,this.messageOverrides=void 0,this.messages=void 0,this.defaultMessages=void 0,this.effectiveLocale=void 0,this.hasContent=!1,this.hasImage=!1}onMessagesChange(){}effectiveLocaleChange(){u(this,this.effectiveLocale)}connectedCallback(){a(this),h(this),b(this),this.setupTextContentObserver()}componentDidLoad(){s(this)}disconnectedCallback(){o(this),p(this),g(this)}async componentWillLoad(){l(this),await v(this),this.updateHasContent()}async setFocus(){await d(this),this.closeButton?.focus()}updateHasContent(){const i=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=this.el.childNodes.length>0&&"#text"===this.el.childNodes[0]?.nodeName?this.el.textContent?.trim().length>0:i}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}renderChipImage(){return e("div",{class:"image-container",key:"image"},e("slot",{name:"image",onSlotchange:this.handleSlotImageChange}))}render(){const i=e("calcite-icon",{class:"chip-icon",flipRtl:this.iconFlipRtl,icon:this.icon,scale:"l"===this.scale?"m":"s"}),t=e("button",{"aria-describedby":this.guid,"aria-label":this.messages.dismissLabel,class:"close",onClick:this.closeClickHandler,ref:i=>this.closeButton=i},e("calcite-icon",{class:"close-icon",icon:"x",scale:"l"===this.scale?"m":"s"}));return e("div",{class:{container:!0,"content--slotted":this.hasContent,"image--slotted":this.hasImage}},this.renderChipImage(),this.icon?i:null,e("span",{class:"title",id:this.guid},e("slot",null)),this.closable?t:null)}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};f.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([scale=s]){block-size:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-unit-l:0.5rem;--calcite-chip-spacing-unit-s:0.25rem}:host([scale=s]) .image-container{block-size:1.25rem;inline-size:1.25rem;padding-inline-start:0.125rem}:host([scale=m]){block-size:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-unit-l:0.75rem;--calcite-chip-spacing-unit-s:calc(0.75rem / 2)}:host([scale=m]) .image-container{block-size:1.5rem;inline-size:1.5rem;padding-inline-start:0.25rem}:host([scale=l]){block-size:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-unit-l:1rem;--calcite-chip-spacing-unit-s:0.5rem}:host([scale=l]) .image-container{block-size:2rem;inline-size:2rem;padding-inline-start:0.5rem}:host{box-sizing:border-box;display:inline-flex;cursor:default;align-items:center;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container{display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:0}.content--slotted .title{padding-inline:var(--calcite-chip-spacing-unit-l)}:host([closable][icon]) .container:not(.content--slotted) .title{padding-inline:0 var(--calcite-chip-spacing-unit-s)}:host(:not([closable])) .container:not(.content--slotted) .chip-icon{margin-inline:auto}.container:not(.image--slotted) .image-container{display:none}:host([scale=s][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.125rem}:host([scale=m][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.25rem}:host([scale=l][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.5rem}:host([scale=s]:not([closable])) .container:not(.content--slotted){block-size:1.5rem;inline-size:1.5rem}:host([scale=s]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:0.125rem}:host([scale=m]:not([closable])) .container:not(.content--slotted){block-size:2rem;inline-size:2rem}:host([scale=m]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:0.25rem}:host([scale=l]:not([closable])) .container:not(.content--slotted){block-size:2.75rem;inline-size:2.75rem}:host([scale=l]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:calc(0.75rem / 2)}:host([closable]) .content--slotted .title{padding-inline:var(--calcite-chip-spacing-unit-l) var(--calcite-chip-spacing-unit-s)}:host([scale=s]) button{inline-size:1rem;block-size:1rem;margin-inline-end:0.125rem}:host([scale=m]) button{inline-size:1.5rem;block-size:1.5rem;margin-inline-end:0.25rem}:host([scale=l]) button{inline-size:2rem;block-size:2rem;margin-inline-end:0.5rem}button{margin:0px;cursor:pointer;align-items:center;border-style:none;background-color:transparent;color:var(--calcite-ui-text-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-appearance:none;display:flex;border-radius:50%;padding-inline:var(--calcite-chip-spacing-unit-s);color:inherit;align-content:center;justify-content:center;--calcite-chip-transparent-hover:var(--calcite-button-transparent-hover);--calcite-chip-transparent-press:var(--calcite-button-transparent-press)}button:hover{background-color:var(--calcite-chip-transparent-hover)}button:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}button:active{background-color:var(--calcite-chip-transparent-press)}.image-container{display:inline-flex;overflow:hidden}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:0;margin-inline-start:var(--calcite-chip-spacing-unit-l)}:host([kind=neutral]){border-color:transparent;background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host([kind=neutral]) button,:host([kind=neutral]) .close-icon{color:var(--calcite-ui-text-3)}:host([kind=neutral]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([kind=inverse]){border-color:transparent;background-color:var(--calcite-ui-inverse);color:var(--calcite-ui-text-inverse)}:host([kind=inverse]) button,:host([kind=inverse]) .close-icon{color:var(--calcite-ui-text-inverse)}:host([kind=inverse]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-inverse))}:host([kind=brand]){border-color:transparent;background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([kind=brand]) button,:host([kind=brand]) .close-icon{color:var(--calcite-ui-text-inverse)}:host([kind=brand]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-inverse))}:host([appearance=outline-fill]),:host([appearance=outline]){background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) .close-icon,:host([appearance=outline]) button,:host([appearance=outline]) .close-icon{color:var(--calcite-ui-text-3)}:host([appearance=outline-fill]) .chip-icon,:host([appearance=outline]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([appearance=outline-fill]){background-color:var(--calcite-ui-foreground-1)}:host([appearance=outline]){background-color:transparent}:host([kind=neutral][appearance=outline-fill]),:host([kind=neutral][appearance=outline]){border-color:var(--calcite-ui-border-1)}:host([kind=inverse][appearance=outline-fill]),:host([kind=inverse][appearance=outline]){border-color:var(--calcite-ui-border-inverse)}:host([kind=brand][appearance=outline-fill]),:host([kind=brand][appearance=outline]){border-color:var(--calcite-ui-brand)}:host([kind=brand][appearance=solid]) button,:host([kind=inverse][appearance=solid]) button{outline-color:var(--calcite-ui-text-inverse)}:host([closed]){display:none}";export{f as calcite_chip}
|
|
6
|
+
import{r as i,c as t,h as e,g as n}from"./p-9e413c06.js";import{c as a,d as o}from"./p-2516afdb.js";import{s as c}from"./p-3d497b7d.js";import{g as r}from"./p-1a0f4b4a.js";import{a as s,s as l,c as d}from"./p-dc200732.js";import{c as h,d as p}from"./p-5d59d6b8.js";import{c as m}from"./p-2d3b1298.js";import{u,c as b,d as g,s as v}from"./p-251f2a5e.js";import"./p-129976f3.js";import"./p-243b7920.js";const f=class{constructor(e){i(this,e),this.calciteChipClose=t(this,"calciteChipClose",6),this.closeClickHandler=i=>{i.preventDefault(),this.calciteChipClose.emit(),this.closed=!0},this.handleSlotImageChange=i=>{this.hasImage=c(i)},this.mutationObserver=m("mutation",(()=>this.updateHasContent())),this.guid=r(),this.appearance="solid",this.kind="neutral",this.closable=!1,this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.value=void 0,this.closed=!1,this.messageOverrides=void 0,this.messages=void 0,this.defaultMessages=void 0,this.effectiveLocale=void 0,this.hasContent=!1,this.hasImage=!1}onMessagesChange(){}effectiveLocaleChange(){u(this,this.effectiveLocale)}connectedCallback(){a(this),h(this),b(this),this.setupTextContentObserver()}componentDidLoad(){s(this)}disconnectedCallback(){o(this),p(this),g(this)}async componentWillLoad(){l(this),await v(this),this.updateHasContent()}async setFocus(){await d(this),this.closeButton?.focus()}updateHasContent(){const i=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=this.el.childNodes.length>0&&"#text"===this.el.childNodes[0]?.nodeName?this.el.textContent?.trim().length>0:i}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}renderChipImage(){return e("div",{class:"image-container",key:"image"},e("slot",{name:"image",onSlotchange:this.handleSlotImageChange}))}render(){const i=e("calcite-icon",{class:"chip-icon",flipRtl:this.iconFlipRtl,icon:this.icon,scale:"l"===this.scale?"m":"s"}),t=e("button",{"aria-describedby":this.guid,"aria-label":this.messages.dismissLabel,class:"close",onClick:this.closeClickHandler,ref:i=>this.closeButton=i},e("calcite-icon",{class:"close-icon",icon:"x",scale:"l"===this.scale?"m":"s"}));return e("div",{class:{container:!0,"content--slotted":this.hasContent,"image--slotted":this.hasImage}},this.renderChipImage(),this.icon?i:null,e("span",{class:"title",id:this.guid},e("slot",null)),this.closable?t:null)}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};f.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([scale=s]){block-size:1.5rem;font-size:var(--calcite-font-size--2);--calcite-chip-spacing-unit-l:0.5rem;--calcite-chip-spacing-unit-s:0.25rem}:host([scale=s]) .image-container{block-size:1.25rem;inline-size:1.25rem;padding-inline-start:0.125rem}:host([scale=m]){block-size:2rem;font-size:var(--calcite-font-size--1);--calcite-chip-spacing-unit-l:0.75rem;--calcite-chip-spacing-unit-s:calc(0.75rem / 2)}:host([scale=m]) .image-container{block-size:1.5rem;inline-size:1.5rem;padding-inline-start:0.25rem}:host([scale=l]){block-size:2.75rem;font-size:var(--calcite-font-size-0);--calcite-chip-spacing-unit-l:1rem;--calcite-chip-spacing-unit-s:0.5rem}:host([scale=l]) .image-container{block-size:2rem;inline-size:2rem;padding-inline-start:0.5rem}:host{box-sizing:border-box;display:inline-flex;cursor:default;align-items:center;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container{display:inline-flex;block-size:100%;max-inline-size:100%;align-items:center}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-block:0}.content--slotted .title{padding-inline:var(--calcite-chip-spacing-unit-l)}:host([closable][icon]) .container:not(.content--slotted) .title{padding-inline:0 var(--calcite-chip-spacing-unit-s)}:host(:not([closable])) .container:not(.content--slotted) .chip-icon{margin-inline:auto}.container:not(.image--slotted) .image-container{display:none}:host([scale=s][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.125rem}:host([scale=m][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.25rem}:host([scale=l][closable]) .container:not(.content--slotted) .image-container{margin-inline-end:0.5rem}:host([scale=s]:not([closable])) .container:not(.content--slotted){block-size:1.5rem;inline-size:1.5rem}:host([scale=s]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:0.125rem}:host([scale=m]:not([closable])) .container:not(.content--slotted){block-size:2rem;inline-size:2rem}:host([scale=m]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:0.25rem}:host([scale=l]:not([closable])) .container:not(.content--slotted){block-size:2.75rem;inline-size:2.75rem}:host([scale=l]:not([closable])) .container:not(.content--slotted) .image-container{padding-inline:calc(0.75rem / 2)}:host([closable]) .content--slotted .title{padding-inline:var(--calcite-chip-spacing-unit-l) var(--calcite-chip-spacing-unit-s)}:host([scale=s]) button{inline-size:1rem;block-size:1rem;margin-inline-end:0.125rem}:host([scale=m]) button{inline-size:1.5rem;block-size:1.5rem;margin-inline-end:0.25rem}:host([scale=l]) button{inline-size:2rem;block-size:2rem;margin-inline-end:0.5rem}button{margin:0px;cursor:pointer;align-items:center;border-style:none;background-color:transparent;color:var(--calcite-ui-text-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;-webkit-appearance:none;display:flex;border-radius:50%;padding-inline:var(--calcite-chip-spacing-unit-s);color:inherit;align-content:center;justify-content:center;--calcite-chip-transparent-hover:var(--calcite-button-transparent-hover);--calcite-chip-transparent-press:var(--calcite-button-transparent-press)}button:hover{background-color:var(--calcite-chip-transparent-hover)}button:focus{background-color:var(--calcite-chip-transparent-hover);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}button:active{background-color:var(--calcite-chip-transparent-press)}.image-container{display:inline-flex;overflow:hidden}slot[name=image]::slotted(*){display:flex;block-size:100%;inline-size:100%;overflow:hidden;border-radius:50%}.chip-icon{position:relative;margin-block:0px;display:inline-flex;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:0;margin-inline-start:var(--calcite-chip-spacing-unit-l)}:host([kind=neutral]){border-color:transparent;background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host([kind=neutral]) button,:host([kind=neutral]) .close-icon{color:var(--calcite-ui-text-3)}:host([kind=neutral]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([kind=inverse]){border-color:transparent;background-color:var(--calcite-ui-inverse);color:var(--calcite-ui-text-inverse)}:host([kind=inverse]) button,:host([kind=inverse]) .close-icon{color:var(--calcite-ui-text-inverse)}:host([kind=inverse]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-inverse))}:host([kind=brand]){border-color:transparent;background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([kind=brand]) button,:host([kind=brand]) .close-icon{color:var(--calcite-ui-text-inverse)}:host([kind=brand]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-inverse))}:host([appearance=outline-fill]),:host([appearance=outline]){background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}:host([appearance=outline-fill]) button,:host([appearance=outline-fill]) .close-icon,:host([appearance=outline]) button,:host([appearance=outline]) .close-icon{color:var(--calcite-ui-text-3)}:host([appearance=outline-fill]) .chip-icon,:host([appearance=outline]) .chip-icon{color:var(--calcite-ui-icon-color, var(--calcite-ui-text-3))}:host([appearance=outline-fill]){background-color:var(--calcite-ui-foreground-1)}:host([appearance=outline]){background-color:transparent}:host([kind=neutral][appearance=outline-fill]),:host([kind=neutral][appearance=outline]){border-color:var(--calcite-ui-border-1)}:host([kind=inverse][appearance=outline-fill]),:host([kind=inverse][appearance=outline]){border-color:var(--calcite-ui-border-inverse)}:host([kind=brand][appearance=outline-fill]),:host([kind=brand][appearance=outline]){border-color:var(--calcite-ui-brand)}:host([kind=brand][appearance=solid]) button,:host([kind=inverse][appearance=solid]) button{outline-color:var(--calcite-ui-text-inverse)}:host([closed]){display:none}";export{f as calcite_chip}
|