@esri/calcite-components 1.0.3 → 1.0.4-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/{p-7cb32fff.entry.js → p-01f961a4.entry.js} +2 -2
- package/dist/calcite/{p-b30eedec.entry.js → p-05acdf1c.entry.js} +2 -2
- package/dist/calcite/{p-1bfa7ea1.js → p-06b1cbd1.js} +1 -1
- package/dist/calcite/{p-5c4cdaae.entry.js → p-088beec0.entry.js} +2 -2
- package/dist/calcite/p-0cdbce46.entry.js +6 -0
- package/dist/calcite/{p-67e5fde1.entry.js → p-1071fb36.entry.js} +2 -2
- package/dist/calcite/p-15c09a02.entry.js +6 -0
- package/dist/calcite/{p-d12ba488.js → p-1612e8d4.js} +2 -2
- package/dist/calcite/{p-4e8cd5d9.entry.js → p-180cca7c.entry.js} +2 -2
- package/dist/calcite/{p-d2b2c5e3.entry.js → p-24b623d6.entry.js} +2 -2
- package/dist/calcite/{p-9b9dcea4.entry.js → p-252220da.entry.js} +2 -2
- package/dist/calcite/{p-31cfbe53.js → p-29eafa1b.js} +2 -2
- package/dist/calcite/{p-f2ec1b95.entry.js → p-2a492c3c.entry.js} +2 -2
- package/dist/calcite/{p-89607739.entry.js → p-2e915ad9.entry.js} +2 -2
- package/dist/calcite/{p-07ac6d69.entry.js → p-318665f3.entry.js} +2 -2
- package/dist/calcite/{p-9a7e83ac.entry.js → p-336172ed.entry.js} +2 -2
- package/dist/calcite/{p-8dc7801d.js → p-354c5edb.js} +1 -1
- package/dist/calcite/{p-eb5261ed.js → p-3784823d.js} +1 -1
- package/dist/calcite/{p-204d7bbc.entry.js → p-3b440428.entry.js} +2 -2
- package/dist/calcite/{p-248b702a.js → p-3b6d274c.js} +2 -2
- package/dist/calcite/{p-e028eab5.js → p-3db71314.js} +1 -1
- package/dist/calcite/{p-7222a31d.entry.js → p-425fc804.entry.js} +2 -2
- package/dist/calcite/{p-87ab5aa3.entry.js → p-434d2755.entry.js} +2 -2
- package/dist/calcite/{p-62d2b54a.entry.js → p-4852bbca.entry.js} +2 -2
- package/dist/calcite/{p-2a595b34.entry.js → p-49f5ddcf.entry.js} +2 -2
- package/dist/calcite/{p-cdc726ae.js → p-4c3a83fd.js} +2 -2
- package/dist/calcite/{p-879f7ded.js → p-4c7dc39a.js} +1 -1
- package/dist/calcite/{p-691d8abd.js → p-4fa9547a.js} +2 -2
- package/dist/calcite/{p-142bafbd.entry.js → p-5a8c4fc8.entry.js} +2 -2
- package/dist/calcite/{p-b1994651.entry.js → p-5f5132bc.entry.js} +2 -2
- package/dist/calcite/p-6999b5a2.entry.js +6 -0
- package/dist/calcite/{p-045d3f7c.entry.js → p-7129b555.entry.js} +2 -2
- package/dist/calcite/{p-66b6ca56.entry.js → p-75c27b64.entry.js} +2 -2
- package/dist/calcite/{p-786ab6a3.entry.js → p-75d43e2b.entry.js} +2 -2
- package/dist/calcite/{p-fad4f874.entry.js → p-7748f8ce.entry.js} +2 -2
- package/dist/calcite/{p-e01b4adf.js → p-776bd6fe.js} +1 -1
- package/dist/calcite/{p-d4edcf07.entry.js → p-77892551.entry.js} +2 -2
- package/dist/calcite/{p-34f492e7.entry.js → p-789ce85d.entry.js} +2 -2
- package/dist/calcite/{p-9d2cafc7.js → p-7af2ebcd.js} +1 -1
- package/dist/calcite/{p-fcea343b.entry.js → p-7c66ffa5.entry.js} +2 -2
- package/dist/calcite/{p-c3f9921b.entry.js → p-7e1c31b9.entry.js} +2 -2
- package/dist/calcite/{p-2770d40c.js → p-7f5c4915.js} +1 -1
- package/dist/calcite/{p-25b940a0.entry.js → p-7fa24b50.entry.js} +2 -2
- package/dist/calcite/{p-49960e49.entry.js → p-82a69866.entry.js} +2 -2
- package/dist/calcite/p-85db137d.entry.js +6 -0
- package/dist/calcite/p-86181526.entry.js +6 -0
- package/dist/calcite/{p-8ee130b1.entry.js → p-868e52f5.entry.js} +2 -2
- package/dist/calcite/{p-1d68e026.entry.js → p-8832a5db.entry.js} +2 -2
- package/dist/calcite/{p-d544e334.js → p-8f34215a.js} +1 -1
- package/dist/calcite/{p-373504ad.entry.js → p-91073236.entry.js} +2 -2
- package/dist/calcite/{p-8ebc626d.entry.js → p-962febd2.entry.js} +2 -2
- package/dist/calcite/{p-cbeeeec0.js → p-9780a1e1.js} +1 -1
- package/dist/calcite/{p-b22c4016.js → p-9bd46a0a.js} +1 -1
- package/dist/calcite/{p-045401c1.js → p-9d50a9a5.js} +2 -2
- package/dist/calcite/p-9eafa133.entry.js +6 -0
- package/dist/calcite/{p-13df424c.entry.js → p-a1924c95.entry.js} +2 -2
- package/dist/calcite/{p-fd5cde47.js → p-a1b0d8cd.js} +1 -1
- package/dist/calcite/p-a2f24ecd.js +6 -0
- package/dist/calcite/{p-66fb832d.js → p-a6d8f60f.js} +1 -1
- package/dist/calcite/{p-214d02aa.entry.js → p-ad2ed733.entry.js} +2 -2
- package/dist/calcite/{p-6d36a828.entry.js → p-b3d97e7f.entry.js} +2 -2
- package/dist/calcite/{p-8f711ea0.entry.js → p-b574e67b.entry.js} +2 -2
- package/dist/calcite/{p-3e800dd4.entry.js → p-b8dbeb13.entry.js} +2 -2
- package/dist/calcite/{p-3e421dc8.entry.js → p-b8f975f0.entry.js} +2 -2
- package/dist/calcite/{p-172d4b4d.entry.js → p-c335a85a.entry.js} +2 -2
- package/dist/calcite/{p-32296fbc.js → p-c5e8ae82.js} +1 -1
- package/dist/calcite/{p-c34f4e0e.entry.js → p-c6036fcb.entry.js} +2 -2
- package/dist/calcite/p-cd3df430.js +6 -0
- package/dist/calcite/{p-e5317764.js → p-cd6dd966.js} +2 -2
- package/dist/calcite/{p-841624d4.entry.js → p-cebc4397.entry.js} +2 -2
- package/dist/calcite/{p-0af81df1.js → p-d6917686.js} +2 -2
- package/dist/calcite/p-d780f755.entry.js +6 -0
- package/dist/calcite/{p-9d4caf83.entry.js → p-daff5cd8.entry.js} +2 -2
- package/dist/calcite/{p-1228c81e.js → p-dc867530.js} +2 -2
- package/dist/calcite/{p-a2a9c1f3.entry.js → p-dcb71db4.entry.js} +2 -2
- package/dist/calcite/{p-68cc3b45.entry.js → p-de290d01.entry.js} +2 -2
- package/dist/calcite/{p-5be0049d.entry.js → p-de809cf2.entry.js} +2 -2
- package/dist/calcite/{p-01f63f94.js → p-dfc48405.js} +2 -2
- package/dist/calcite/{p-1ed1b547.js → p-e47ac2cd.js} +2 -2
- package/dist/calcite/p-e4fa9a15.entry.js +6 -0
- package/dist/calcite/{p-44638c8e.entry.js → p-e5940b26.entry.js} +2 -2
- package/dist/calcite/{p-bf899770.entry.js → p-e5d37e6c.entry.js} +2 -2
- package/dist/calcite/{p-834e4056.entry.js → p-e66cd738.entry.js} +2 -2
- package/dist/calcite/{p-4503036c.js → p-e8d17c86.js} +1 -1
- package/dist/calcite/p-f0536e69.js +6 -0
- package/dist/calcite/{p-3a62eea7.entry.js → p-f1ca850e.entry.js} +2 -2
- package/dist/calcite/p-f30e0051.js +6 -0
- package/dist/calcite/{p-04b1e7c7.entry.js → p-f3537889.entry.js} +2 -2
- package/dist/calcite/{p-52addf05.js → p-f629bf5e.js} +2 -2
- package/dist/calcite/{p-1c084dbd.js → p-fa77fc91.js} +1 -1
- package/dist/calcite/{p-c61f49ca.entry.js → p-fadffec5.entry.js} +2 -2
- package/dist/calcite/{p-c99fd50b.entry.js → p-fb052bfc.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-fb44577b.js → ExpandToggle-2363789a.js} +5 -5
- package/dist/cjs/{Heading-f443025a.js → Heading-7215c262.js} +2 -2
- package/dist/cjs/{app-globals-52d90f77.js → app-globals-e3d17ead.js} +2 -2
- package/dist/cjs/{array-34ac1446.js → array-e7b0474d.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 +25 -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 +16 -16
- 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 +4 -4
- 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-7fc4af6b.js → conditionalSlot-76689329.js} +3 -3
- package/dist/cjs/{debounce-97675624.js → debounce-7afe4f17.js} +1 -1
- package/dist/cjs/{dom-0697ccaa.js → dom-1b8e5198.js} +3 -3
- package/dist/cjs/{filter-dbdd1c01.js → filter-7efe32ad.js} +2 -2
- package/dist/cjs/{floating-ui-b15f76ec.js → floating-ui-7b81c163.js} +4 -4
- package/dist/cjs/{focusTrapComponent-b37d0305.js → focusTrapComponent-eb7a1362.js} +2 -2
- package/dist/cjs/{form-b6b8a933.js → form-e67b4d2a.js} +3 -3
- package/dist/cjs/{guid-59f06cfa.js → guid-c17205f2.js} +1 -1
- package/dist/cjs/{index-0f675273.js → index-3c5be6da.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-ea66ff0d.js → interactive-112def9f.js} +1 -1
- package/dist/cjs/{key-9827ba28.js → key-5b64174d.js} +1 -1
- package/dist/cjs/{label-4d01b266.js → label-eedd47c5.js} +2 -2
- package/dist/cjs/{loadable-52d5c02f.js → loadable-217b0191.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-386ecb32.js → locale-ac606830.js} +4 -4
- package/dist/cjs/{math-68d9b9ab.js → math-e54757e6.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-6bc47a4a.js → nonChromiumPlatformUtils-2ad1ee83.js} +6 -6
- package/dist/cjs/{observers-e1c1fee7.js → observers-d1b28288.js} +1 -1
- package/dist/cjs/{openCloseComponent-47ea9a14.js → openCloseComponent-6f0108da.js} +2 -2
- package/dist/cjs/{resources-c273d4a6.js → resources-87e96778.js} +1 -1
- package/dist/cjs/{resources-85e4ccfb.js → resources-8863bd52.js} +1 -1
- package/dist/cjs/{resources-39d4ace7.js → resources-ad3e2189.js} +1 -1
- package/dist/cjs/{resources-bb031ffb.js → resources-be3c1944.js} +5 -5
- package/dist/cjs/{resources-ebd66c25.js → resources-e25967a0.js} +1 -1
- package/dist/cjs/{resources-d80bc8aa.js → resources-f929f517.js} +1 -1
- package/dist/cjs/{sortable.esm-612d63a2.js → sortable.esm-9076b83a.js} +1 -1
- package/dist/cjs/{t9n-a8e55a62.js → t9n-8e11963c.js} +3 -3
- package/dist/cjs/{utils-cbb23289.js → utils-774258a0.js} +3 -3
- package/dist/cjs/{utils-7cb716f2.js → utils-9a048cff.js} +1 -1
- 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 +10 -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.css +4 -4
- 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 +2 -2
- 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.css +1 -0
- 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/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 +1 -1
- 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 +10 -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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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-d65c0b91.js → ExpandToggle-1957d81e.js} +5 -5
- package/dist/esm/{Heading-c4723d9d.js → Heading-74f0471e.js} +2 -2
- package/dist/esm/{app-globals-9149bff7.js → app-globals-99986300.js} +2 -2
- package/dist/esm/{array-a8ab4bbd.js → array-69e48504.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 +25 -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 +16 -16
- 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 +4 -4
- 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-0d04f0c7.js → conditionalSlot-0763bea2.js} +3 -3
- package/dist/esm/{debounce-d3a80538.js → debounce-26095e18.js} +1 -1
- package/dist/esm/{dom-0e4fb5f9.js → dom-39947472.js} +3 -3
- package/dist/esm/{filter-bb432a8b.js → filter-0169f6f5.js} +2 -2
- package/dist/esm/{floating-ui-f4a115ba.js → floating-ui-fc311610.js} +4 -4
- package/dist/esm/{focusTrapComponent-299664a8.js → focusTrapComponent-5414d552.js} +2 -2
- package/dist/esm/{form-895373a8.js → form-fe021d9d.js} +3 -3
- package/dist/esm/{guid-a737b407.js → guid-fb423738.js} +1 -1
- package/dist/esm/{index-88b94637.js → index-90b3f02f.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-cdc6108d.js → interactive-f4341dd1.js} +1 -1
- package/dist/esm/{key-d26d2bfe.js → key-ffa4462c.js} +1 -1
- package/dist/esm/{label-a81b2f66.js → label-38d998fd.js} +2 -2
- package/dist/esm/{loadable-48424264.js → loadable-cdc38810.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-5313c9c2.js → locale-1fd8916c.js} +4 -4
- package/dist/esm/{math-095a2a96.js → math-52d54e77.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-f39c73ab.js → nonChromiumPlatformUtils-85ee3a72.js} +6 -6
- package/dist/esm/{observers-3d5b9a3f.js → observers-f70a0380.js} +1 -1
- package/dist/esm/{openCloseComponent-934ebd4e.js → openCloseComponent-446f2341.js} +2 -2
- package/dist/esm/{resources-0990b53c.js → resources-17c4d927.js} +1 -1
- package/dist/esm/{resources-8be493b2.js → resources-2e9e2f90.js} +1 -1
- package/dist/esm/{resources-e4f0db38.js → resources-8acc19d7.js} +1 -1
- package/dist/esm/{resources-16c567cd.js → resources-c97f26b9.js} +1 -1
- package/dist/esm/{resources-d3e9339d.js → resources-d0f2813f.js} +1 -1
- package/dist/esm/{resources-d8dd17ec.js → resources-fe07a362.js} +5 -5
- package/dist/esm/{sortable.esm-9b4b3ffe.js → sortable.esm-8bac98b1.js} +1 -1
- package/dist/esm/{t9n-4c805851.js → t9n-7831517f.js} +3 -3
- package/dist/esm/{utils-4654b244.js → utils-86c1d097.js} +1 -1
- package/dist/esm/{utils-21f65601.js → utils-9924b058.js} +3 -3
- package/dist/extras/docs-json.json +2 -2
- package/dist/extras/vscode-data.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/dist/types/components/input-date-picker/input-date-picker.d.ts +1 -0
- package/dist/types/components/progress/progress.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/hydrate/index.js +12 -3
- package/package.json +6 -5
- package/dist/calcite/p-0fc0b962.entry.js +0 -6
- package/dist/calcite/p-10846be3.entry.js +0 -6
- package/dist/calcite/p-2a07e1c3.entry.js +0 -6
- package/dist/calcite/p-3c134481.entry.js +0 -6
- package/dist/calcite/p-571184eb.entry.js +0 -6
- package/dist/calcite/p-5bc6ed36.entry.js +0 -6
- package/dist/calcite/p-6e524911.js +0 -6
- package/dist/calcite/p-81852ce6.js +0 -6
- package/dist/calcite/p-b831b6e6.js +0 -6
- package/dist/calcite/p-dbca18ca.entry.js +0 -6
- package/dist/calcite/p-ec24a111.js +0 -6
- package/dist/calcite/p-feb3a7b6.entry.js +0 -6
|
@@ -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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,g as n,H as a}from"./p-66fb832d.js";import{t as s,s as c,b as o}from"./p-cdc726ae.js";import{u as l}from"./p-cbeeeec0.js";import{c as r}from"./p-9d2cafc7.js";import{s as d,a as h,c as m}from"./p-879f7ded.js";import{d as p}from"./p-4503036c.js";import"./p-b22c4016.js";import"./p-e028eab5.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-a6d8f60f.js";import{t as s,s as c,b as o}from"./p-4c3a83fd.js";import{u as l}from"./p-9780a1e1.js";import{c as r}from"./p-7af2ebcd.js";import{s as d,a as h,c as m}from"./p-4c7dc39a.js";import{d as p}from"./p-e8d17c86.js";import"./p-9bd46a0a.js";import"./p-3db71314.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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,c as t,h as a,H as e,g as o}from"./p-
|
|
6
|
+
import{r as i,c as t,h as a,H as e,g as o}from"./p-a6d8f60f.js";import{f as n,t as r}from"./p-4c3a83fd.js";import{c,d as s,H as l}from"./p-a2f24ecd.js";import{u as d}from"./p-9780a1e1.js";import{i as m}from"./p-7f5c4915.js";import{c as h,d as p,g as u}from"./p-1612e8d4.js";import{c as b,s as f,a as v}from"./p-4c7dc39a.js";import"./p-9bd46a0a.js";import"./p-3db71314.js";const k=class{constructor(a){i(this,a),this.calciteSwitchChange=t(this,"calciteSwitchChange",6),this.keyDownHandler=i=>{!this.disabled&&m(i.key)&&(this.toggle(),i.preventDefault())},this.clickHandler=()=>{this.toggle()},this.setSwitchEl=i=>{this.switchEl=i},this.disabled=!1,this.label=void 0,this.name=void 0,this.scale="m",this.checked=!1,this.value=void 0}async setFocus(){await b(this),n(this.switchEl)}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit()}connectedCallback(){h(this),c(this)}componentWillLoad(){f(this)}componentDidLoad(){v(this)}disconnectedCallback(){p(this),s(this)}componentDidRender(){d(this)}render(){return a(e,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},a("div",{"aria-checked":r(this.checked),"aria-label":u(this),class:"container",ref:this.setSwitchEl,role:"switch",tabIndex:0},a("div",{class:"track"},a("div",{class:"handle"})),a(l,{component:this})))}get el(){return o(this)}};k.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([scale=s]) .container{block-size:0.75rem}:host([scale=s]) .track{block-size:0.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:0.5rem;inline-size:0.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:0.75rem;inline-size:0.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host{inline-size:auto;outline-color:transparent}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-2);vertical-align:top;transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.handle{pointer-events:none;position:absolute;display:block;border-radius:9999px;border-width:2px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);inset-block-start:-1px;inset-inline:-1px auto}:host(:hover) .handle,:host(:focus) .handle{border-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([checked]) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]) .handle{border-color:var(--calcite-ui-brand);inset-inline:auto -1px}:host([checked]:hover) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]:hover) .handle{border-color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}@media (forced-colors: active){:host([checked]) .track{background-color:canvasText}}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{k as calcite_switch}
|
|
@@ -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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{c as t,b as n}from"./p-cdc726ae.js";import{d as e}from"./p-4503036c.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=a(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:f}):v);return{top:(h.top-A.top+g.top)/b.y,bottom:(A.bottom-h.bottom+g.bottom)/b.y,left:(h.left-A.left+g.left)/b.x,right:(A.right-h.right+g.right)/b.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const x={start:"end",end:"start"};function h(t){return t.replace(/start|end/g,(t=>x[t]))}const v=["top","right","bottom","left"],w=v.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:x=!0,...v}=t,w=o(r),b=[l,...m||(w!==l&&x?function(t){const n=y(t);return[h(t),n,h(n)]}(l):[y(l)])],A=await f(n,v),P=[];let k=(null==(e=i.flip)?void 0:e.overflows)||[];if(u&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(k=[...k,{placement:r,overflows:P}],!P.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=i.flip)?void 0:D.index)?R:0)+1,n=b[t];if(n)return{data:{index:t,overflows:k},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return v.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function R(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return R(t).getComputedStyle(t)}function E(t){return $(t)?(t.nodeName||"").toLowerCase():""}let F;function M(){if(F)return F;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(F=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),F):navigator.userAgent}function O(t){return t instanceof R(t).HTMLElement}function S(t){return t instanceof R(t).Element}function $(t){return t instanceof R(t).Node}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof R(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function C(t){return["table","td","th"].includes(E(t))}function B(t){const n=/firefox/i.test(M()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function L(t){return["html","body","#document"].includes(E(t))}const H=Math.min,N=Math.max,I=Math.round;function W(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=I(e)!==r||I(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function q(t){return S(t)?t:t.contextElement}const U={x:1,y:1};function V(t){const n=q(t);if(!O(n))return U;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=W(n);let a=(i?I(e.width):e.width)/o,l=(i?I(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function X(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=U;n&&(o?S(o)&&(s=V(o)):s=V(t));const c=l?R(l):window,f=!z()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=R(l),n=o&&S(o)?R(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=V(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=R(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function Y(t){return(($(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G(t){return X(Y(t)).left+_(t).scrollLeft}function J(t,n,e){const o=O(n),r=Y(n),i=X(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==E(n)||j(r))&&(a=_(n)),O(n)){const t=X(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=G(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function K(t){if("html"===E(t))return t;const n=t.assignedSlot||t.parentNode||(T(t)?t.host:null)||Y(t);return T(n)?n.host:n}function Q(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function Z(t){const n=R(t);let e=Q(t);for(;e&&C(e)&&"static"===D(e).position;)e=Q(e);return e&&("html"===E(e)||"body"===E(e)&&"static"===D(e).position&&!B(e))?n:e||function(t){let n=K(t);for(;O(n)&&!L(n);){if(B(n))return n;n=K(n)}return null}(t)||n}function tt(t){const n=K(t);return L(n)?t.ownerDocument.body:O(n)&&j(n)?n:tt(n)}function nt(t,n){var e;void 0===n&&(n=[]);const o=tt(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=R(o);return r?n.concat(i,i.visualViewport||[],j(o)?o:[]):n.concat(o,nt(o))}function et(t,n,e){return"viewport"===n?c(function(t,n){const e=R(t),o=Y(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):S(n)?function(t,n){const e=X(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=O(t)?V(t):{x:1,y:1},a=t.clientWidth*i.x,l=t.clientHeight*i.y,s=r*i.x,c=o*i.y;return{top:c,left:s,right:s+a,bottom:c+l,x:s,y:c,width:a,height:l}}(n,e):c(function(t){var n;const e=Y(t),o=_(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=N(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=N(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+G(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=N(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(Y(t)))}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=nt(t).filter((t=>S(t)&&"body"!==E(t))),r=null;const i="fixed"===D(t).position;let a=i?K(t):t;for(;S(a)&&!L(a);){const t=D(a),n=B(a);(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=K(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=et(n,e,r);return t.top=N(o.top,t.top),t.right=H(o.right,t.right),t.bottom=H(o.bottom,t.bottom),t.left=N(o.left,t.left),t}),et(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=Y(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==E(e)||j(i))&&(a=_(e)),O(e))){const t=X(e);l=V(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:S,getDimensions:function(t){return W(t)},getOffsetParent:Z,getDocumentElement:Y,getScale:V,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||Z,i=this.getDimensions;return{reference:J(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){if(rt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return t?.brands?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-691d8abd.js");ot.getClippingRect=t,ot.getOffsetParent=e,ot.getElementRects=n}}(),at=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],lt="bottom-start",st={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ct({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,u={x:n,y:e},d=await f(t,c),p=i(o(r)),g="x"===p?"y":"x";let x=u[p],h=u[g];a&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===g?"top":"left"],h,h-d["y"===g?"bottom":"right"]));const v=s.fn({...t,[p]:x,[g]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var y,x;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),f=r(e),u="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:u,rects:d,middlewareData:m,placement:p,platform:y,elements:x}=n,{alignment:v,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,k=void 0!==v||b===w?function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&h(e)!==e))}(v||null,A,b):b,R=await f(n,P),D=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,E=k[D];if(null==E)return{};const{main:F,cross:M}=g(E,d,await(null==y.isRTL?void 0:y.isRTL(x.floating)));if(p!==E)return{x:c,y:u,reset:{placement:k[0]}};const O=[R[o(E)],R[F],R[M]],S=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:O}],$=k[D+1];if($)return{data:{index:D+1,overflows:S},reset:{placement:$}};const T=S.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),j=null==(s=T.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=j?j:T[0].placement;return C!==p?{data:{index:D+1,overflows:S},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(f),x=a(g),h=await d.getDimensions(e),v="y"===g?"top":"left",w="y"===g?"bottom":"right",b=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const R=p[v],D=k-h[x]-p[w],E=k/2-h[x]/2+(b/2-A/2),F=m(R,E,D),M=null!=r(f)&&E!=F&&u.reference[x]/2-(E<R?p[v]:p[w])-h[x]/2<0;return{[g]:y[g]-(M?E<R?R-E:D-E:0),data:{[g]:F,centerOffset:E-F}}}}))({element:u})),d}return[]}function ft(t,n){const e=t.filter((t=>at.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${at.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ut(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function dt(t,n,e=!1){if(t.open)return e?mt(n):pt(n)}const mt=e(pt,100,{leading:!0,maxWait:100});async function pt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:w}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(f=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:ut(n,o),middleware:ct({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden?"hidden":null,h=x?"none":null;n.setAttribute("data-placement",p);const v=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:x,pointerEvents:h,position:y,top:"0",left:"0",transform:v})}const yt=new WeakMap;function gt(t,n,e){if(!e||!n)return;xt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&At(e),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...S(t)?nt(t):t.contextElement?nt(t.contextElement):[],...nt(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),S(t)&&!l&&u.observe(t),S(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?X(t):null;return l&&function n(){const o=X(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function xt(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",bt);const o=yt.get(t);o&&o(),yt.delete(t)}const ht=Math.ceil(Math.hypot(4,4));function vt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",bt)}function wt(t){return t.shadowRoot||t}function bt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(st.animation)){const n=function(n){return t(n,"[data-placement]")}(e);At(n),wt(n).removeEventListener("transitionend",bt)}}function At(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{st as F,xt as a,ht as b,gt as c,lt as d,c as e,ft as f,dt as r,vt as u}
|
|
6
|
+
import{c as t,b as n}from"./p-4c3a83fd.js";import{d as e}from"./p-e8d17c86.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=i(n),d=a(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,w=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),b=await(null==i.isElement?void 0:i.isElement(w))&&await(null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:w,strategy:f}):v);return{top:(h.top-A.top+g.top)/b.y,bottom:(A.bottom-h.bottom+g.bottom)/b.y,left:(h.left-A.left+g.left)/b.x,right:(A.right-h.right+g.right)/b.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const x={start:"end",end:"start"};function h(t){return t.replace(/start|end/g,(t=>x[t]))}const v=["top","right","bottom","left"],w=v.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:x=!0,...v}=t,w=o(r),b=[l,...m||(w!==l&&x?function(t){const n=y(t);return[h(t),n,h(n)]}(l):[y(l)])],A=await f(n,v),P=[];let k=(null==(e=i.flip)?void 0:e.overflows)||[];if(u&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(k=[...k,{placement:r,overflows:P}],!P.every((t=>t<=0))){var R,D;const t=(null!=(R=null==(D=i.flip)?void 0:D.index)?R:0)+1,n=b[t];if(n)return{data:{index:t,overflows:k},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var E;const t=null==(E=k.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:E[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return v.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function R(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function D(t){return R(t).getComputedStyle(t)}function E(t){return $(t)?(t.nodeName||"").toLowerCase():""}let F;function M(){if(F)return F;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(F=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),F):navigator.userAgent}function O(t){return t instanceof R(t).HTMLElement}function S(t){return t instanceof R(t).Element}function $(t){return t instanceof R(t).Node}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof R(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function C(t){return["table","td","th"].includes(E(t))}function B(t){const n=/firefox/i.test(M()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function L(t){return["html","body","#document"].includes(E(t))}const H=Math.min,N=Math.max,I=Math.round;function W(t){const n=D(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=I(e)!==r||I(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function q(t){return S(t)?t:t.contextElement}const U={x:1,y:1};function V(t){const n=q(t);if(!O(n))return U;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=W(n);let a=(i?I(e.width):e.width)/o,l=(i?I(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function X(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=U;n&&(o?S(o)&&(s=V(o)):s=V(t));const c=l?R(l):window,f=!z()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=R(l),n=o&&S(o)?R(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=V(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=R(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function Y(t){return(($(t)?t.ownerDocument:t.document)||window.document).documentElement}function _(t){return S(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function G(t){return X(Y(t)).left+_(t).scrollLeft}function J(t,n,e){const o=O(n),r=Y(n),i=X(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==E(n)||j(r))&&(a=_(n)),O(n)){const t=X(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=G(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function K(t){if("html"===E(t))return t;const n=t.assignedSlot||t.parentNode||(T(t)?t.host:null)||Y(t);return T(n)?n.host:n}function Q(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function Z(t){const n=R(t);let e=Q(t);for(;e&&C(e)&&"static"===D(e).position;)e=Q(e);return e&&("html"===E(e)||"body"===E(e)&&"static"===D(e).position&&!B(e))?n:e||function(t){let n=K(t);for(;O(n)&&!L(n);){if(B(n))return n;n=K(n)}return null}(t)||n}function tt(t){const n=K(t);return L(n)?t.ownerDocument.body:O(n)&&j(n)?n:tt(n)}function nt(t,n){var e;void 0===n&&(n=[]);const o=tt(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=R(o);return r?n.concat(i,i.visualViewport||[],j(o)?o:[]):n.concat(o,nt(o))}function et(t,n,e){return"viewport"===n?c(function(t,n){const e=R(t),o=Y(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):S(n)?function(t,n){const e=X(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=O(t)?V(t):{x:1,y:1},a=t.clientWidth*i.x,l=t.clientHeight*i.y,s=r*i.x,c=o*i.y;return{top:c,left:s,right:s+a,bottom:c+l,x:s,y:c,width:a,height:l}}(n,e):c(function(t){var n;const e=Y(t),o=_(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=N(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=N(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+G(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=N(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(Y(t)))}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=nt(t).filter((t=>S(t)&&"body"!==E(t))),r=null;const i="fixed"===D(t).position;let a=i?K(t):t;for(;S(a)&&!L(a);){const t=D(a),n=B(a);(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=K(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=et(n,e,r);return t.top=N(o.top,t.top),t.right=H(o.right,t.right),t.bottom=H(o.bottom,t.bottom),t.left=N(o.left,t.left),t}),et(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=Y(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==E(e)||j(i))&&(a=_(e)),O(e))){const t=X(e);l=V(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:S,getDimensions:function(t){return W(t)},getOffsetParent:Z,getDocumentElement:Y,getScale:V,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||Z,i=this.getDimensions;return{reference:J(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){if(rt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return t?.brands?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-4fa9547a.js");ot.getClippingRect=t,ot.getOffsetParent=e,ot.getElementRects=n}}(),at=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],lt="bottom-start",st={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ct({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,u={x:n,y:e},d=await f(t,c),p=i(o(r)),g="x"===p?"y":"x";let x=u[p],h=u[g];a&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===g?"top":"left"],h,h-d["y"===g?"bottom":"right"]));const v=s.fn({...t,[p]:x,[g]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var y,x;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),f=r(e),u="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:u,rects:d,middlewareData:m,placement:p,platform:y,elements:x}=n,{alignment:v,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,k=void 0!==v||b===w?function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&h(e)!==e))}(v||null,A,b):b,R=await f(n,P),D=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,E=k[D];if(null==E)return{};const{main:F,cross:M}=g(E,d,await(null==y.isRTL?void 0:y.isRTL(x.floating)));if(p!==E)return{x:c,y:u,reset:{placement:k[0]}};const O=[R[o(E)],R[F],R[M]],S=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:E,overflows:O}],$=k[D+1];if($)return{data:{index:D+1,overflows:S},reset:{placement:$}};const T=S.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),j=null==(s=T.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=j?j:T[0].placement;return C!==p?{data:{index:D+1,overflows:S},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(f),x=a(g),h=await d.getDimensions(e),v="y"===g?"top":"left",w="y"===g?"bottom":"right",b=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const R=p[v],D=k-h[x]-p[w],E=k/2-h[x]/2+(b/2-A/2),F=m(R,E,D),M=null!=r(f)&&E!=F&&u.reference[x]/2-(E<R?p[v]:p[w])-h[x]/2<0;return{[g]:y[g]-(M?E<R?R-E:D-E:0),data:{[g]:F,centerOffset:E-F}}}}))({element:u})),d}return[]}function ft(t,n){const e=t.filter((t=>at.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${at.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ut(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function dt(t,n,e=!1){if(t.open)return e?mt(n):pt(n)}const mt=e(pt,100,{leading:!0,maxWait:100});async function pt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:w}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(f=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:ut(n,o),middleware:ct({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden?"hidden":null,h=x?"none":null;n.setAttribute("data-placement",p);const v=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:x,pointerEvents:h,position:y,top:"0",left:"0",transform:v})}const yt=new WeakMap;function gt(t,n,e){if(!e||!n)return;xt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&At(e),yt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...S(t)?nt(t):t.contextElement?nt(t.contextElement):[],...nt(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),S(t)&&!l&&u.observe(t),S(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?X(t):null;return l&&function n(){const o=X(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function xt(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",bt);const o=yt.get(t);o&&o(),yt.delete(t)}const ht=Math.ceil(Math.hypot(4,4));function vt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",bt)}function wt(t){return t.shadowRoot||t}function bt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(st.animation)){const n=function(n){return t(n,"[data-placement]")}(e);At(n),wt(n).removeEventListener("transitionend",bt)}}function At(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{st as F,xt as a,ht as b,gt as c,lt as d,c as e,ft as f,dt as r,vt as u}
|
|
@@ -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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{a as r,S as t,i as n,b as e,c as o,r as u,f}from"./p-
|
|
6
|
+
import{a as r,S as t,i as n,b as e,c as o,r as u,f}from"./p-e8d17c86.js";var c=Array.isArray,a=t?t.prototype:void 0,i=a?a.toString:void 0;function l(t){if("string"==typeof t)return t;if(c(t))return function(r,t){for(var n=-1,e=null==r?0:r.length,o=Array(e);++n<e;)o[n]=t(r[n],n,r);return o}(t,l)+"";if(r(t))return i?i.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function s(r){return r}var v=/^(?:0|[1-9]\d*)$/;function b(r,t){var n=typeof r;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&v.test(r))&&r>-1&&r%1==0&&r<t}function p(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=9007199254740991}var y=Object.prototype;function d(r){return o(r)&&"[object Arguments]"==e(r)}var j=Object.prototype,m=j.hasOwnProperty,x=j.propertyIsEnumerable,g=d(function(){return arguments}())?d:function(r){return o(r)&&m.call(r,"callee")&&!x.call(r,"callee")},O="object"==typeof exports&&exports&&!exports.nodeType&&exports,h=O&&"object"==typeof module&&module&&!module.nodeType&&module,A=h&&h.exports===O?u.Buffer:void 0,F=(A?A.isBuffer:void 0)||function(){return!1},$={};$["[object Float32Array]"]=$["[object Float64Array]"]=$["[object Int8Array]"]=$["[object Int16Array]"]=$["[object Int32Array]"]=$["[object Uint8Array]"]=$["[object Uint8ClampedArray]"]=$["[object Uint16Array]"]=$["[object Uint32Array]"]=!0,$["[object Arguments]"]=$["[object Array]"]=$["[object ArrayBuffer]"]=$["[object Boolean]"]=$["[object DataView]"]=$["[object Date]"]=$["[object Error]"]=$["[object Function]"]=$["[object Map]"]=$["[object Number]"]=$["[object Object]"]=$["[object RegExp]"]=$["[object Set]"]=$["[object String]"]=$["[object WeakMap]"]=!1;var w,E="object"==typeof exports&&exports&&!exports.nodeType&&exports,R=E&&"object"==typeof module&&module&&!module.nodeType&&module,S=R&&R.exports===E&&f.process,k=function(){try{return R&&R.require&&R.require("util").types||S&&S.binding&&S.binding("util")}catch(r){}}(),G=k&&k.isTypedArray,L=G?(w=G,function(r){return w(r)}):function(r){return o(r)&&p(r.length)&&!!$[e(r)]},N=Object.prototype.hasOwnProperty;var P=Object.prototype.hasOwnProperty;function T(r){return null!=(t=r)&&p(t.length)&&!function(r){if(!n(r))return!1;var t=e(r);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}(t)?function(r,t){var n=c(r),e=!n&&g(r),o=!n&&!e&&F(r),u=!n&&!e&&!o&&L(r),f=n||e||o||u,a=f?function(r,t){for(var n=-1,e=Array(r);++n<r;)e[n]=t(n);return e}(r.length,String):[],i=a.length;for(var l in r)!t&&!N.call(r,l)||f&&("length"==l||o&&("offset"==l||"parent"==l)||u&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||b(l,i))||a.push(l);return a}(r,!0):function(r){if(!n(r))return function(r){var t=[];if(null!=r)for(var n in Object(r))t.push(n);return t}(r);var t,e,o=(t=r)===("function"==typeof(e=t&&t.constructor)&&e.prototype||y),u=[];for(var f in r)("constructor"!=f||!o&&P.call(r,f))&&u.push(f);return u}(r);var t}var q=/[\\^$.*+?()[\]{}|]/g,z=RegExp(q.source);function B(r,t){return null==r?r:function(r,t,n){for(var e=-1,o=Object(r),u=n(r),f=u.length;f--;){var c=u[++e];if(!1===t(o[c],c,o))break}return r}(r,"function"==typeof(n=t)?n:s,T);var n}const C=(r,t)=>{const n=function(r){var t;return(r=null==(t=r)?"":l(t))&&z.test(r)?r.replace(q,"\\$&"):r}(t),e=new RegExp(n,"i");0===r.length&&console.warn("No data was passed to the filter function.\n The data argument should be an array of objects");const o=(r,t)=>{if(r?.constant||r?.filterDisabled)return!0;let n=!1;return B(r,(r=>{"function"!=typeof r&&null!=r&&(Array.isArray(r)||"object"==typeof r&&null!==r?o(r,t)&&(n=!0):t.test(r)&&(n=!0))})),n};return r.filter((r=>o(r,e)))};export{C as f}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
* v1.0.4-next.1
|
|
5
|
+
*/
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as o}from"./p-a6d8f60f.js";import{t as s}from"./p-4c3a83fd.js";import{c as n,d as c,H as r}from"./p-a2f24ecd.js";import{g as l}from"./p-9bd46a0a.js";import{u as h}from"./p-9780a1e1.js";import{i as d}from"./p-7f5c4915.js";import{c as m,d as p,g as u}from"./p-1612e8d4.js";import{c as f,s as g,a as b}from"./p-4c7dc39a.js";import"./p-3db71314.js";const v=class{constructor(a){t(this,a),this.calciteInternalCheckboxBlur=i(this,"calciteInternalCheckboxBlur",6),this.calciteCheckboxChange=i(this,"calciteCheckboxChange",6),this.calciteInternalCheckboxFocus=i(this,"calciteInternalCheckboxFocus",6),this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.indeterminatePath="M13 8v1H3V8z",this.getPath=()=>this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:"",this.toggle=()=>{this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())},this.keyDownHandler=t=>{d(t.key)&&(this.toggle(),t.preventDefault())},this.clickHandler=()=>{this.toggle()},this.onToggleBlur=()=>{this.calciteInternalCheckboxBlur.emit(!1)},this.onToggleFocus=()=>{this.calciteInternalCheckboxFocus.emit(!0)},this.onLabelClick=()=>{this.toggle()},this.checked=!1,this.disabled=!1,this.guid=void 0,this.hovered=!1,this.indeterminate=!1,this.label=void 0,this.name=void 0,this.required=!1,this.scale="m",this.value=void 0}async setFocus(){await f(this),this.toggleEl?.focus()}connectedCallback(){this.guid=this.el.id||`calcite-checkbox-${l()}`,m(this),n(this)}disconnectedCallback(){p(this),c(this)}componentWillLoad(){g(this)}componentDidLoad(){b(this)}componentDidRender(){h(this)}render(){return a(e,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},a("div",{"aria-checked":s(this.checked),"aria-label":u(this),class:"toggle",onBlur:this.onToggleBlur,onFocus:this.onToggleFocus,ref:t=>this.toggleEl=t,role:"checkbox",tabIndex:this.disabled?void 0:0},a("svg",{"aria-hidden":"true",class:"check-svg",viewBox:"0 0 16 16"},a("path",{d:this.getPath()})),a("slot",null)),a(r,{component:this}))}get el(){return o(this)}};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([scale=s]){--calcite-checkbox-size:0.75rem}:host([scale=m]){--calcite-checkbox-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-checkbox-size:1rem}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg,:host .toggle{inline-size:var(--calcite-checkbox-size);block-size:var(--calcite-checkbox-size)}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-ui-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input);color:var(--calcite-ui-background)}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.toggle{outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{v as calcite_checkbox}
|
|
@@ -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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,h as a,g as t}from"./p-
|
|
6
|
+
import{r as i,h as a,g as t}from"./p-a6d8f60f.js";const n=class{constructor(a){i(this,a),this.type="determinate",this.value=0,this.label=void 0,this.text=void 0,this.reversed=!1}render(){return a("div",{"aria-label":this.label||this.text,"aria-valuemax":1,"aria-valuemin":0,"aria-valuenow":this.value,role:"progressbar"},a("div",{class:"track"},a("div",{class:{bar:!0,indeterminate:"indeterminate"===this.type,reversed:this.reversed},style:"determinate"===this.type?{width:100*this.value+"%"}:{}})),this.text?a("div",{class:"text"},this.text):null)}get el(){return t(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{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:1;inline-size:100%;overflow:hidden;background:var(--calcite-ui-border-3)}.bar{z-index:1;background-color:var(--calcite-ui-brand)}@media (forced-colors: active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) * 11) linear infinite}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(600%, 0, 0)}}";export{n as calcite_progress}
|
|
@@ -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.4-next.1
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as a,H as i,g as r,F as o}from"./p-66fb832d.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-045401c1.js";import{c as w,d as y,n as x}from"./p-52addf05.js";import{c as b,d as k,s as D,u as z}from"./p-248b702a.js";import{c as _,b as C}from"./p-cdc726ae.js";import{u as A}from"./p-cbeeeec0.js";import{i as P}from"./p-2770d40c.js";import{C as S}from"./p-e028eab5.js";import{H as j}from"./p-b831b6e6.js";import"./p-9d2cafc7.js";import"./p-b22c4016.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 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&&(t<this.startDate||this.endDate&&g(t,this.startDate))&&(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-a6d8f60f.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-9d50a9a5.js";import{c as w,d as y,n as x}from"./p-f629bf5e.js";import{c as b,d as k,s as D,u as z}from"./p-3b6d274c.js";import{c as _,b as C}from"./p-4c3a83fd.js";import{u as A}from"./p-9780a1e1.js";import{i as P}from"./p-7f5c4915.js";import{C as S}from"./p-3db71314.js";import{H as j}from"./p-f30e0051.js";import"./p-7af2ebcd.js";import"./p-9bd46a0a.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 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&&(t<this.startDate||this.endDate&&g(t,this.startDate))&&(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}
|