@esri/calcite-components 1.0.0-next.606 → 1.0.0-next.607
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-8faadeb1.js → p-0194be0b.js} +1 -1
- package/dist/calcite/{p-dbb8e6a4.js → p-04cd97f0.js} +2 -2
- package/dist/calcite/{p-404c6db8.entry.js → p-05d91128.entry.js} +2 -2
- package/dist/calcite/{p-ac96d103.entry.js → p-0a89a06d.entry.js} +2 -2
- package/dist/calcite/{p-791e76fc.entry.js → p-0c941429.entry.js} +2 -2
- package/dist/calcite/{p-967401e4.entry.js → p-10ed6464.entry.js} +2 -2
- package/dist/calcite/{p-1e3fdded.entry.js → p-1142d6c8.entry.js} +2 -2
- package/dist/calcite/p-1305ee55.entry.js +6 -0
- package/dist/calcite/p-15fac2ab.js +6 -0
- package/dist/calcite/{p-0020d7d5.entry.js → p-215f9b3e.entry.js} +2 -2
- package/dist/calcite/{p-ccd21f8c.js → p-228742f9.js} +2 -2
- package/dist/calcite/{p-06c6854a.entry.js → p-233e9c82.entry.js} +2 -2
- package/dist/calcite/{p-1e8d2fd7.entry.js → p-2577a91d.entry.js} +2 -2
- package/dist/calcite/{p-39ebfe9e.entry.js → p-27480e42.entry.js} +2 -2
- package/dist/calcite/{p-441037a9.entry.js → p-2824d942.entry.js} +2 -2
- package/dist/calcite/{p-96f53f90.entry.js → p-29e7d607.entry.js} +2 -2
- package/dist/calcite/{p-1eb05bb2.entry.js → p-2a2d9854.entry.js} +2 -2
- package/dist/calcite/{p-e5b5b117.entry.js → p-2ac4da68.entry.js} +2 -2
- package/dist/calcite/{p-33732b8f.entry.js → p-2b623d7a.entry.js} +2 -2
- package/dist/calcite/{p-54c6ec8e.js → p-2e91306b.js} +1 -1
- package/dist/calcite/{p-d973937d.entry.js → p-3191298d.entry.js} +2 -2
- package/dist/calcite/{p-98a6c8a4.js → p-331f03ef.js} +2 -2
- package/dist/calcite/{p-da82a06e.entry.js → p-35a4696c.entry.js} +2 -2
- package/dist/calcite/{p-1b06322f.entry.js → p-35f864c5.entry.js} +2 -2
- package/dist/calcite/{p-c8ffd3f8.entry.js → p-36207d38.entry.js} +2 -2
- package/dist/calcite/{p-36522d79.entry.js → p-389235c5.entry.js} +2 -2
- package/dist/calcite/p-3ad75dbc.entry.js +6 -0
- package/dist/calcite/{p-1de1447f.entry.js → p-3c0e6bf9.entry.js} +2 -2
- package/dist/calcite/{p-4d4bc233.entry.js → p-3f71cb54.entry.js} +2 -2
- package/dist/calcite/{p-8cf35eb8.entry.js → p-4053f375.entry.js} +2 -2
- package/dist/calcite/{p-c416a37b.entry.js → p-4054de19.entry.js} +2 -2
- package/dist/calcite/{p-cafb01e6.entry.js → p-4b6ab904.entry.js} +2 -2
- package/dist/calcite/{p-9df2c651.js → p-4bba5de5.js} +2 -2
- package/dist/calcite/{p-d5b3c1bb.entry.js → p-4d118fe7.entry.js} +2 -2
- package/dist/calcite/{p-9c59c88e.js → p-534d76ec.js} +1 -1
- package/dist/calcite/{p-9f88a197.entry.js → p-56e13c26.entry.js} +2 -2
- package/dist/calcite/{p-bf16098b.entry.js → p-57cd8bf6.entry.js} +2 -2
- package/dist/calcite/{p-74cc2ffc.js → p-5a7d6abb.js} +1 -1
- package/dist/calcite/{p-58a34298.js → p-68be1a57.js} +1 -1
- package/dist/calcite/{p-2eeff261.js → p-724ffb2b.js} +1 -1
- package/dist/calcite/{p-59bddc1f.js → p-792a67ad.js} +1 -1
- package/dist/calcite/{p-af04fadb.entry.js → p-7f645e69.entry.js} +2 -2
- package/dist/calcite/{p-37141771.js → p-8027c4fc.js} +2 -2
- package/dist/calcite/{p-718e40b5.entry.js → p-860f95db.entry.js} +2 -2
- package/dist/calcite/{p-7be2ad3b.entry.js → p-8bbc5021.entry.js} +2 -2
- package/dist/calcite/{p-c8f9eae5.entry.js → p-8ce99d30.entry.js} +2 -2
- package/dist/calcite/p-8d64e950.js +6 -0
- package/dist/calcite/{p-f8706ae9.entry.js → p-963f91e7.entry.js} +2 -2
- package/dist/calcite/{p-72c5d8e9.entry.js → p-976bd33d.entry.js} +2 -2
- package/dist/calcite/{p-452356bd.js → p-9cc66598.js} +2 -2
- package/dist/calcite/{p-b5284c7c.entry.js → p-9ef24687.entry.js} +2 -2
- package/dist/calcite/{p-a88b4c26.js → p-a19ba1b8.js} +1 -1
- package/dist/calcite/{p-32ef135d.entry.js → p-a214e596.entry.js} +2 -2
- package/dist/calcite/p-a4f2a140.js +6 -0
- package/dist/calcite/{p-edbb9009.js → p-a9c93bf7.js} +1 -1
- package/dist/calcite/{p-1e272a5d.js → p-ab2f0124.js} +1 -1
- package/dist/calcite/{p-72b59949.entry.js → p-ae537940.entry.js} +2 -2
- package/dist/calcite/{p-eb47be9d.js → p-aec0e90c.js} +1 -1
- package/dist/calcite/{p-a6373ef6.js → p-b068d057.js} +2 -2
- package/dist/calcite/{p-c7447ff5.entry.js → p-b2c6b06b.entry.js} +2 -2
- package/dist/calcite/{p-d2f79079.entry.js → p-b96cd9fe.entry.js} +2 -2
- package/dist/calcite/p-ba8d8dbd.entry.js +6 -0
- package/dist/calcite/{p-ba03e197.entry.js → p-bd7bf633.entry.js} +2 -2
- package/dist/calcite/{p-c564ee3d.js → p-befa72be.js} +1 -1
- package/dist/calcite/{p-a322bb86.entry.js → p-c1f41172.entry.js} +2 -2
- package/dist/calcite/{p-c5b28b2a.entry.js → p-c3f0ca58.entry.js} +2 -2
- package/dist/calcite/{p-8599b693.entry.js → p-c7a40044.entry.js} +2 -2
- package/dist/calcite/{p-20ab02b7.entry.js → p-c943664b.entry.js} +2 -2
- package/dist/calcite/{p-4b1cc441.js → p-c9c594e4.js} +2 -2
- package/dist/calcite/{p-5ef97e90.entry.js → p-cfd04b12.entry.js} +2 -2
- package/dist/calcite/{p-8d075e37.js → p-d5d91d87.js} +1 -1
- package/dist/calcite/p-db5ed768.entry.js +6 -0
- package/dist/calcite/{p-5a979e32.entry.js → p-dbd28f14.entry.js} +2 -2
- package/dist/calcite/{p-40e1d497.js → p-de41e5a9.js} +1 -1
- package/dist/calcite/{p-538fd2ae.entry.js → p-de5ad6d3.entry.js} +2 -2
- package/dist/calcite/p-dfda39cf.entry.js +6 -0
- package/dist/calcite/{p-1dd5f101.entry.js → p-dfe47ce7.entry.js} +2 -2
- package/dist/calcite/{p-52d3de61.entry.js → p-e0cb72b7.entry.js} +2 -2
- package/dist/calcite/{p-187c562d.entry.js → p-e423377f.entry.js} +2 -2
- package/dist/calcite/{p-a3f7f3c6.entry.js → p-e85ec259.entry.js} +2 -2
- package/dist/calcite/{p-f532a20d.entry.js → p-eb088883.entry.js} +2 -2
- package/dist/calcite/p-ecd9436e.js +6 -0
- package/dist/calcite/{p-aed4b6fc.entry.js → p-ef74f7df.entry.js} +2 -2
- package/dist/calcite/{p-1ed53169.js → p-f0513696.js} +1 -1
- package/dist/calcite/{p-7b0c6ea0.js → p-f478e34c.js} +2 -2
- package/dist/calcite/p-f9398f20.entry.js +6 -0
- package/dist/calcite/p-fad91c38.entry.js +6 -0
- package/dist/calcite/{p-f69de408.js → p-ff2616f4.js} +1 -1
- package/dist/calcite/{p-d90a2e81.entry.js → p-ffb58fa7.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-4c94697a.js → ExpandToggle-e018f211.js} +5 -5
- package/dist/cjs/{Heading-3af0e212.js → Heading-c23ab3be.js} +2 -2
- package/dist/cjs/{app-globals-3186acc4.js → app-globals-882315c5.js} +2 -2
- package/dist/cjs/{array-4f023a91.js → array-46b159ae.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +11 -11
- package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-menu.cjs.entry.js +8 -8
- package/dist/cjs/calcite-action-pad.cjs.entry.js +10 -10
- package/dist/cjs/calcite-action.cjs.entry.js +7 -7
- package/dist/cjs/calcite-alert.cjs.entry.js +10 -10
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +10 -10
- package/dist/cjs/calcite-button.cjs.entry.js +9 -9
- package/dist/cjs/calcite-card.cjs.entry.js +7 -7
- package/dist/cjs/calcite-checkbox.cjs.entry.js +9 -9
- package/dist/cjs/calcite-chip.cjs.entry.js +7 -7
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +10 -10
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +33 -27
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +11 -11
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +38 -27
- package/dist/cjs/calcite-fab.cjs.entry.js +6 -6
- package/dist/cjs/calcite-filter.cjs.entry.js +8 -8
- package/dist/cjs/calcite-flow-item.cjs.entry.js +7 -7
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-handle.cjs.entry.js +5 -5
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +8 -8
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +37 -26
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-text.cjs.entry.js +9 -9
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +21 -15
- package/dist/cjs/calcite-input.cjs.entry.js +12 -12
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +6 -6
- 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 +8 -8
- package/dist/cjs/calcite-notice.cjs.entry.js +8 -8
- package/dist/cjs/calcite-option_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
- package/dist/cjs/calcite-panel.cjs.entry.js +10 -10
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-popover_2.cjs.entry.js +36 -27
- 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 +9 -9
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-rating.cjs.entry.js +9 -9
- package/dist/cjs/calcite-scrim.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell_3.cjs.entry.js +8 -8
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
- package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-switch.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +4 -4
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +29 -20
- package/dist/cjs/calcite-tree_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite.cjs.js +4 -4
- package/dist/cjs/{conditionalSlot-cb35bd49.js → conditionalSlot-4f4eea6a.js} +3 -3
- package/dist/cjs/{debounce-7c328f60.js → debounce-62882659.js} +1 -1
- package/dist/cjs/{dom-c8d2699b.js → dom-4d157abb.js} +3 -3
- package/dist/cjs/{filter-9a46e30b.js → filter-da2797e5.js} +2 -2
- package/dist/cjs/{floating-ui-1eb7dfe6.js → floating-ui-e4e82078.js} +175 -23
- package/dist/cjs/{form-131e64b8.js → form-2f418822.js} +3 -3
- package/dist/cjs/{guid-ad9b119b.js → guid-1d60d25f.js} +1 -1
- package/dist/cjs/{index-b1ba5282.js → index-9624081e.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-baf36661.js → interactive-f3855fe3.js} +1 -1
- package/dist/cjs/{interfaces-084c0793.js → interfaces-78ca36e7.js} +1 -1
- package/dist/cjs/{key-59a119b9.js → key-dbb23e1d.js} +1 -1
- package/dist/cjs/{label-415bc940.js → label-cf0a7e54.js} +2 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-02d3d5ef.js → locale-9261eb8c.js} +4 -4
- package/dist/cjs/{math-45a2d4c0.js → math-70844c29.js} +1 -1
- package/dist/cjs/nonChromiumPlatformUtils-e6d5cb22.js +506 -0
- package/dist/cjs/{observers-bf725ee8.js → observers-53e1a6d6.js} +1 -1
- package/dist/cjs/{openCloseComponent-f4966a6b.js → openCloseComponent-af87dcf3.js} +1 -1
- package/dist/cjs/{resources-55a2a593.js → resources-020cc6d5.js} +1 -1
- package/dist/cjs/{resources-79bc4e72.js → resources-2f6b4dae.js} +1 -1
- package/dist/cjs/{resources-ef23c4c9.js → resources-375914cd.js} +1 -1
- package/dist/cjs/{resources-12c592bb.js → resources-83f09a7b.js} +5 -5
- package/dist/cjs/{resources-f51e581d.js → resources-8477fc7e.js} +1 -1
- package/dist/cjs/{resources-0da64a64.js → resources-d07d3444.js} +3 -3
- package/dist/cjs/{sortable.esm-f5415dc8.js → sortable.esm-7dbec412.js} +1 -1
- package/dist/cjs/{utils-332df7b7.js → utils-a61e740b.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/interfaces.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.css +0 -1
- package/dist/collection/components/combobox/combobox.js +32 -17
- 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.css +0 -1
- package/dist/collection/components/dropdown/dropdown.js +40 -21
- 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.css +0 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +35 -16
- 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 +23 -8
- 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-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 +0 -1
- package/dist/collection/components/popover/popover.js +38 -21
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/popover-manager/popover-manager.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +1 -1
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/radio-group-item/radio-group-item.js +1 -1
- package/dist/collection/components/radio-group-item/resources.js +1 -1
- package/dist/collection/components/rating/rating.js +1 -1
- package/dist/collection/components/rating/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/select/resources.js +1 -1
- package/dist/collection/components/select/select.js +1 -1
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.js +1 -1
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.js +1 -1
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.js +1 -1
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.js +1 -1
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.js +1 -1
- package/dist/collection/components/tab-title/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.css +0 -1
- package/dist/collection/components/tooltip/tooltip.js +35 -18
- package/dist/collection/components/tooltip-manager/tooltip-manager.js +1 -1
- package/dist/collection/components/tree/interfaces.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 +22 -0
- 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 +496 -0
- package/dist/collection/utils/floating-ui.js +123 -12
- 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/locale.js +1 -1
- package/dist/collection/utils/math.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/theme.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 +3 -3
- 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 +22 -16
- 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 +24 -14
- 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 +11 -5
- 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-manager.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-radio-group-item.js +1 -1
- package/dist/components/calcite-radio-group.js +1 -1
- package/dist/components/calcite-rating.js +1 -1
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-select.js +1 -1
- package/dist/components/calcite-shell-center-row.js +1 -1
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +1 -1
- package/dist/components/calcite-sortable-list.js +1 -1
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-stepper-item.js +1 -1
- package/dist/components/calcite-stepper.js +1 -1
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-tile-select-group.js +1 -1
- package/dist/components/calcite-tile-select.js +1 -1
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/calcite-tooltip-manager.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 +29 -19
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +181 -22
- 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/interfaces.js +1 -1
- package/dist/components/interfaces2.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/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +498 -0
- 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 +27 -19
- 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/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 +24 -16
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +2 -2
- package/dist/esm/{ExpandToggle-246dd7c6.js → ExpandToggle-c19c7ae6.js} +5 -5
- package/dist/esm/{Heading-11c2a834.js → Heading-55c4005d.js} +2 -2
- package/dist/esm/{app-globals-1b919870.js → app-globals-a52284f2.js} +2 -2
- package/dist/esm/{array-16ebf5c6.js → array-740ce6b6.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +11 -11
- package/dist/esm/calcite-action-group.entry.js +9 -9
- package/dist/esm/calcite-action-menu.entry.js +8 -8
- package/dist/esm/calcite-action-pad.entry.js +10 -10
- package/dist/esm/calcite-action.entry.js +7 -7
- package/dist/esm/calcite-alert.entry.js +10 -10
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +10 -10
- package/dist/esm/calcite-button.entry.js +9 -9
- package/dist/esm/calcite-card.entry.js +7 -7
- package/dist/esm/calcite-checkbox.entry.js +9 -9
- package/dist/esm/calcite-chip.entry.js +7 -7
- package/dist/esm/calcite-color-picker_3.entry.js +10 -10
- package/dist/esm/calcite-combobox_3.entry.js +33 -27
- package/dist/esm/calcite-date-picker_4.entry.js +11 -11
- package/dist/esm/calcite-dropdown_3.entry.js +38 -27
- package/dist/esm/calcite-fab.entry.js +6 -6
- package/dist/esm/calcite-filter.entry.js +8 -8
- package/dist/esm/calcite-flow-item.entry.js +7 -7
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +12 -12
- package/dist/esm/calcite-handle.entry.js +5 -5
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +8 -8
- package/dist/esm/calcite-input-date-picker.entry.js +37 -26
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +12 -12
- package/dist/esm/calcite-input-text.entry.js +9 -9
- package/dist/esm/calcite-input-time-picker_2.entry.js +21 -15
- package/dist/esm/calcite-input.entry.js +12 -12
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +6 -6
- 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 +8 -8
- package/dist/esm/calcite-notice.entry.js +8 -8
- package/dist/esm/calcite-option_3.entry.js +9 -9
- package/dist/esm/calcite-pagination.entry.js +8 -8
- package/dist/esm/calcite-panel.entry.js +10 -10
- package/dist/esm/calcite-pick-list_3.entry.js +12 -12
- package/dist/esm/calcite-popover_2.entry.js +36 -27
- 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 +9 -9
- package/dist/esm/calcite-radio-group_2.entry.js +8 -8
- package/dist/esm/calcite-rating.entry.js +9 -9
- package/dist/esm/calcite-scrim.entry.js +2 -2
- package/dist/esm/calcite-shell_3.entry.js +8 -8
- package/dist/esm/calcite-sortable-list.entry.js +5 -5
- package/dist/esm/calcite-split-button.entry.js +3 -3
- package/dist/esm/calcite-stepper_2.entry.js +9 -9
- package/dist/esm/calcite-switch.entry.js +9 -9
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-tile-select_2.entry.js +4 -4
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +8 -8
- package/dist/esm/calcite-tooltip_2.entry.js +29 -20
- package/dist/esm/calcite-tree_2.entry.js +8 -8
- package/dist/esm/calcite-value-list_2.entry.js +12 -12
- package/dist/esm/calcite.js +4 -4
- package/dist/esm/{conditionalSlot-833c523f.js → conditionalSlot-3441e8f2.js} +3 -3
- package/dist/esm/{debounce-98d20a38.js → debounce-97857fea.js} +1 -1
- package/dist/esm/{dom-640caf51.js → dom-fbef4a17.js} +3 -3
- package/dist/esm/{filter-38e63edc.js → filter-5c7687ab.js} +2 -2
- package/dist/esm/{floating-ui-b2f9718e.js → floating-ui-d7d7ebf5.js} +173 -22
- package/dist/esm/{form-493b70e6.js → form-6c6f44c9.js} +3 -3
- package/dist/esm/{guid-11f68c50.js → guid-46425949.js} +1 -1
- package/dist/esm/{index-06118eda.js → index-dd350c9e.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-fccdf326.js → interactive-7bb63697.js} +1 -1
- package/dist/esm/{interfaces-d9428b54.js → interfaces-1e4b4247.js} +1 -1
- package/dist/esm/{key-754bbff1.js → key-9fd0ee2d.js} +1 -1
- package/dist/esm/{label-57dd65d4.js → label-4476feb8.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-4e463ebf.js → locale-59ce851a.js} +4 -4
- package/dist/esm/{math-99ba6bfb.js → math-f58b6249.js} +1 -1
- package/dist/esm/nonChromiumPlatformUtils-9a77a585.js +502 -0
- package/dist/esm/{observers-74e54f0e.js → observers-4a45256c.js} +1 -1
- package/dist/esm/{openCloseComponent-ccf3f367.js → openCloseComponent-16ae97af.js} +1 -1
- package/dist/esm/{resources-f7ec4e42.js → resources-06042c92.js} +1 -1
- package/dist/esm/{resources-9331d9fa.js → resources-172c2a25.js} +1 -1
- package/dist/esm/{resources-bad5148f.js → resources-51ebf03b.js} +5 -5
- package/dist/esm/{resources-d9cf35ab.js → resources-57d6fea9.js} +3 -3
- package/dist/esm/{resources-f3f5aa83.js → resources-c905d6cb.js} +1 -1
- package/dist/esm/{resources-64b0963b.js → resources-f25e2a24.js} +1 -1
- package/dist/esm/{sortable.esm-76542737.js → sortable.esm-6094be14.js} +1 -1
- package/dist/esm/{utils-703b7ab8.js → utils-94170855.js} +1 -1
- package/dist/extras/docs-json.json +43 -13
- 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/combobox/combobox.d.ts +6 -3
- package/dist/types/components/dropdown/dropdown.d.ts +6 -3
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +6 -3
- package/dist/types/components/input-time-picker/input-time-picker.d.ts +6 -2
- package/dist/types/components/popover/popover.d.ts +7 -4
- package/dist/types/components/tooltip/tooltip.d.ts +7 -4
- package/dist/types/components.d.ts +12 -6
- package/dist/types/utils/config.d.ts +7 -0
- package/dist/types/utils/floating-ui/nonChromiumPlatformUtils.d.ts +16 -0
- package/dist/types/utils/floating-ui.d.ts +45 -2
- package/hydrate/index.js +266 -165
- package/package.json +2 -2
- package/dist/calcite/p-03afda80.entry.js +0 -6
- package/dist/calcite/p-0ae7c12f.js +0 -6
- package/dist/calcite/p-22cfa796.entry.js +0 -6
- package/dist/calcite/p-2a78a458.entry.js +0 -6
- package/dist/calcite/p-2d12183c.entry.js +0 -6
- package/dist/calcite/p-91036706.js +0 -6
- package/dist/calcite/p-c3e7ad35.entry.js +0 -6
- package/dist/calcite/p-cff1af31.entry.js +0 -6
- package/dist/calcite/p-da13cffd.entry.js +0 -6
- package/dist/calcite/p-fe3f8e2f.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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as e,F as n}from"./p-2eeff261.js";import{c}from"./p-c564ee3d.js";import{f as o}from"./p-98a6c8a4.js";import{c as r,d as l}from"./p-a6373ef6.js";import{c as s,d as m,a as d,H as h}from"./p-7b0c6ea0.js";import{u as p}from"./p-f69de408.js";import"./p-54c6ec8e.js";import"./p-9c59c88e.js";const u=class{constructor(a){t(this,a),this.calciteInternalOptionChange=i(this,"calciteInternalOptionChange",6),this.disabled=!1,this.mutationObserver=c("mutation",(()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}))}handlePropChange(t,i,a){"label"!==a&&"value"!==a||this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){const{el:{textContent:t}}=this;this.label&&this.label!==this.internallySetLabel||(this.label=t,this.internallySetLabel=t),this.value&&this.value!==this.internallySetValue||(this.value=t,this.internallySetValue=t)}connectedCallback(){var t;this.ensureTextContentDependentProps(),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}render(){return a("slot",null,this.label)}get el(){return e(this)}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"],selected:["handlePropChange"],value:["handlePropChange"]}}};u.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";const f=class{constructor(a){t(this,a),this.calciteInternalOptionGroupChange=i(this,"calciteInternalOptionGroupChange",6),this.disabled=!1}handlePropChange(){this.calciteInternalOptionGroupChange.emit()}render(){return a(n,null,a("div",null,this.label),a("slot",null))}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"]}}};f.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";function g(t){return"CALCITE-OPTION"===t.tagName}const v=class{constructor(a){t(this,a),this.calciteSelectChange=i(this,"calciteSelectChange",6),this.disabled=!1,this.required=!1,this.scale="m",this.value=null,this.width="auto",this.componentToNativeEl=new Map,this.mutationObserver=c("mutation",(()=>this.populateInternalSelect())),this.handleInternalSelectChange=()=>{this.selectFromNativeOption(this.selectEl.selectedOptions[0]),requestAnimationFrame((()=>this.emitChangeEvent()))},this.populateInternalSelect=()=>{const t=Array.from(this.el.children).filter((t=>"CALCITE-OPTION"===t.tagName||"CALCITE-OPTION-GROUP"===t.tagName));this.clearInternalSelect(),t.forEach((t=>{var i;return null===(i=this.selectEl)||void 0===i?void 0:i.append(this.toNativeElement(t))}))},this.storeSelectRef=t=>{this.selectEl=t,this.populateInternalSelect(),this.selectFromNativeOption(this.selectEl.selectedOptions[0])},this.emitChangeEvent=()=>{this.calciteSelectChange.emit()}}valueHandler(t){this.el.querySelectorAll("calcite-option").forEach((i=>i.selected=i.value===t))}selectedOptionHandler(t){this.value=null==t?void 0:t.value}connectedCallback(){var t;const{el:i}=this;null===(t=this.mutationObserver)||void 0===t||t.observe(i,{subtree:!0,childList:!0}),r(this),s(this)}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),l(this),m(this)}componentDidLoad(){var t,i;d(this,null!==(i=null===(t=this.selectedOption)||void 0===t?void 0:t.value)&&void 0!==i?i:"")}componentDidRender(){p(this)}async setFocus(){o(this.selectEl)}handleOptionOrGroupChange(t){t.stopPropagation();const i=t.target,a=this.componentToNativeEl.get(i);a&&(this.updateNativeElement(i,a),g(i)&&i.selected&&(this.deselectAllExcept(i),this.selectedOption=i))}onLabelClick(){this.setFocus()}updateNativeElement(t,i){if(i.disabled=t.disabled,i.label=t.label,g(t)){const a=i;a.selected=t.selected,a.value=t.value,a.innerText=t.label}}clearInternalSelect(){this.componentToNativeEl.forEach((t=>t.remove())),this.componentToNativeEl.clear()}selectFromNativeOption(t){if(!t)return;let i;this.componentToNativeEl.forEach(((a,e)=>{g(e)&&a===t&&(e.selected=!0,i=e,this.deselectAllExcept(e))})),i&&(this.selectedOption=i)}toNativeElement(t){if(g(t)){const i=document.createElement("option");return this.updateNativeElement(t,i),this.componentToNativeEl.set(t,i),i}if(function(t){return"CALCITE-OPTION-GROUP"===t.tagName}(t)){const i=document.createElement("optgroup");return this.updateNativeElement(t,i),Array.from(t.children).forEach((a=>{const e=this.toNativeElement(a);i.append(e),this.componentToNativeEl.set(t,e)})),this.componentToNativeEl.set(t,i),i}throw new Error("unsupported element child provided")}deselectAllExcept(t){this.el.querySelectorAll("calcite-option").forEach((i=>{i!==t&&(i.selected=!1)}))}renderChevron(){return a("div",{class:"icon-container"},a("calcite-icon",{class:"icon",icon:"chevron-down",scale:"s"}))}render(){return a(n,null,a("select",{"aria-label":this.label,class:"select",disabled:this.disabled,onChange:this.handleInternalSelectChange,ref:this.storeSelectRef},a("slot",null)),this.renderChevron(),a(h,{component:this}))}get el(){return e(this)}static get watchers(){return{value:["valueHandler"],selectedOption:["selectedOptionHandler"]}}};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.01}}:host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){block-size:1.5rem;--calcite-select-font-size:var(--calcite-font-size--2);--calcite-select-spacing-inline:0.5rem 2rem}:host([scale=s]) .icon-container{padding-inline:0.5rem}:host([scale=m]){block-size:2rem;--calcite-select-font-size:var(--calcite-font-size--1);--calcite-select-spacing-inline:0.75rem 2.5rem}:host([scale=m]) .icon-container{padding-inline:0.75rem}:host([scale=l]){block-size:44px;--calcite-select-font-size:var(--calcite-font-size-0);--calcite-select-spacing-inline:1rem 3rem}:host([scale=l]) .icon-container{padding-inline:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0px;box-sizing:border-box;inline-size:100%;cursor:pointer;-webkit-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);font-family:inherit;color:var(--calcite-ui-text-2);outline-color:transparent;font-size:var(--calcite-select-font-size);padding-inline:var(--calcite-select-spacing-inline);border-inline-end-width:0px}.select:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.select:hover{background-color:var(--calcite-ui-foreground-2)}select:disabled{border-color:var(--calcite-ui-border-input);--tw-bg-opacity:1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:transparent;color:var(--calcite-ui-text-2);inset-inline-end:0px;border-inline-width:0px 1px}.select:focus~.icon-container{border-color:transparent}::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{u as calcite_option,f as calcite_option_group,v as calcite_select}
|
|
6
|
+
import{r as t,c as i,h as a,g as e,F as n}from"./p-724ffb2b.js";import{c}from"./p-befa72be.js";import{f as o}from"./p-331f03ef.js";import{c as r,d as l}from"./p-b068d057.js";import{c as s,d as m,a as d,H as h}from"./p-f478e34c.js";import{u as p}from"./p-ff2616f4.js";import"./p-2e91306b.js";import"./p-534d76ec.js";const u=class{constructor(a){t(this,a),this.calciteInternalOptionChange=i(this,"calciteInternalOptionChange",6),this.disabled=!1,this.mutationObserver=c("mutation",(()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}))}handlePropChange(t,i,a){"label"!==a&&"value"!==a||this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){const{el:{textContent:t}}=this;this.label&&this.label!==this.internallySetLabel||(this.label=t,this.internallySetLabel=t),this.value&&this.value!==this.internallySetValue||(this.value=t,this.internallySetValue=t)}connectedCallback(){var t;this.ensureTextContentDependentProps(),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}render(){return a("slot",null,this.label)}get el(){return e(this)}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"],selected:["handlePropChange"],value:["handlePropChange"]}}};u.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";const f=class{constructor(a){t(this,a),this.calciteInternalOptionGroupChange=i(this,"calciteInternalOptionGroupChange",6),this.disabled=!1}handlePropChange(){this.calciteInternalOptionGroupChange.emit()}render(){return a(n,null,a("div",null,this.label),a("slot",null))}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"]}}};f.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}";function g(t){return"CALCITE-OPTION"===t.tagName}const v=class{constructor(a){t(this,a),this.calciteSelectChange=i(this,"calciteSelectChange",6),this.disabled=!1,this.required=!1,this.scale="m",this.value=null,this.width="auto",this.componentToNativeEl=new Map,this.mutationObserver=c("mutation",(()=>this.populateInternalSelect())),this.handleInternalSelectChange=()=>{this.selectFromNativeOption(this.selectEl.selectedOptions[0]),requestAnimationFrame((()=>this.emitChangeEvent()))},this.populateInternalSelect=()=>{const t=Array.from(this.el.children).filter((t=>"CALCITE-OPTION"===t.tagName||"CALCITE-OPTION-GROUP"===t.tagName));this.clearInternalSelect(),t.forEach((t=>{var i;return null===(i=this.selectEl)||void 0===i?void 0:i.append(this.toNativeElement(t))}))},this.storeSelectRef=t=>{this.selectEl=t,this.populateInternalSelect(),this.selectFromNativeOption(this.selectEl.selectedOptions[0])},this.emitChangeEvent=()=>{this.calciteSelectChange.emit()}}valueHandler(t){this.el.querySelectorAll("calcite-option").forEach((i=>i.selected=i.value===t))}selectedOptionHandler(t){this.value=null==t?void 0:t.value}connectedCallback(){var t;const{el:i}=this;null===(t=this.mutationObserver)||void 0===t||t.observe(i,{subtree:!0,childList:!0}),r(this),s(this)}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),l(this),m(this)}componentDidLoad(){var t,i;d(this,null!==(i=null===(t=this.selectedOption)||void 0===t?void 0:t.value)&&void 0!==i?i:"")}componentDidRender(){p(this)}async setFocus(){o(this.selectEl)}handleOptionOrGroupChange(t){t.stopPropagation();const i=t.target,a=this.componentToNativeEl.get(i);a&&(this.updateNativeElement(i,a),g(i)&&i.selected&&(this.deselectAllExcept(i),this.selectedOption=i))}onLabelClick(){this.setFocus()}updateNativeElement(t,i){if(i.disabled=t.disabled,i.label=t.label,g(t)){const a=i;a.selected=t.selected,a.value=t.value,a.innerText=t.label}}clearInternalSelect(){this.componentToNativeEl.forEach((t=>t.remove())),this.componentToNativeEl.clear()}selectFromNativeOption(t){if(!t)return;let i;this.componentToNativeEl.forEach(((a,e)=>{g(e)&&a===t&&(e.selected=!0,i=e,this.deselectAllExcept(e))})),i&&(this.selectedOption=i)}toNativeElement(t){if(g(t)){const i=document.createElement("option");return this.updateNativeElement(t,i),this.componentToNativeEl.set(t,i),i}if(function(t){return"CALCITE-OPTION-GROUP"===t.tagName}(t)){const i=document.createElement("optgroup");return this.updateNativeElement(t,i),Array.from(t.children).forEach((a=>{const e=this.toNativeElement(a);i.append(e),this.componentToNativeEl.set(t,e)})),this.componentToNativeEl.set(t,i),i}throw new Error("unsupported element child provided")}deselectAllExcept(t){this.el.querySelectorAll("calcite-option").forEach((i=>{i!==t&&(i.selected=!1)}))}renderChevron(){return a("div",{class:"icon-container"},a("calcite-icon",{class:"icon",icon:"chevron-down",scale:"s"}))}render(){return a(n,null,a("select",{"aria-label":this.label,class:"select",disabled:this.disabled,onChange:this.handleInternalSelectChange,ref:this.storeSelectRef},a("slot",null)),this.renderChevron(),a(h,{component:this}))}get el(){return e(this)}static get watchers(){return{value:["valueHandler"],selectedOption:["selectedOptionHandler"]}}};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.01}}:host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){block-size:1.5rem;--calcite-select-font-size:var(--calcite-font-size--2);--calcite-select-spacing-inline:0.5rem 2rem}:host([scale=s]) .icon-container{padding-inline:0.5rem}:host([scale=m]){block-size:2rem;--calcite-select-font-size:var(--calcite-font-size--1);--calcite-select-spacing-inline:0.75rem 2.5rem}:host([scale=m]) .icon-container{padding-inline:0.75rem}:host([scale=l]){block-size:44px;--calcite-select-font-size:var(--calcite-font-size-0);--calcite-select-spacing-inline:1rem 3rem}:host([scale=l]) .icon-container{padding-inline:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0px;box-sizing:border-box;inline-size:100%;cursor:pointer;-webkit-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);font-family:inherit;color:var(--calcite-ui-text-2);outline-color:transparent;font-size:var(--calcite-select-font-size);padding-inline:var(--calcite-select-spacing-inline);border-inline-end-width:0px}.select:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.select:hover{background-color:var(--calcite-ui-foreground-2)}select:disabled{border-color:var(--calcite-ui-border-input);--tw-bg-opacity:1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:transparent;color:var(--calcite-ui-text-2);inset-inline-end:0px;border-inline-width:0px 1px}.select:focus~.icon-container{border-color:transparent}::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{u as calcite_option,f as calcite_option_group,v as calcite_select}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{C as n}from"./p-
|
|
6
|
+
import{C as n}from"./p-2e91306b.js";import{g as t}from"./p-534d76ec.js";function r(n){return n?n.id=n.id||`${n.tagName.toLowerCase()}-${t()}`:""}function o(n){return Array.isArray(n)?n:Array.from(n)}function u(t){const r=f(t,`.${n.darkTheme}, .${n.lightTheme}`);return(null==r?void 0:r.classList.contains("calcite-theme-dark"))?"dark":"light"}function l(n){const t=f(n,"[dir]");return t?t.getAttribute("dir"):"ltr"}function i(n,t,r){const o=n.closest(`[${t}]`);return o?o.getAttribute(t):r}function e(n){return n.getRootNode()}function s(n){return n.host||null}function c(n,{selector:t,id:r}){return function n(o){if(!o)return null;o.assignedSlot&&(o=o.assignedSlot);const u=e(o),l=r?"getElementById"in u?u.getElementById(r):null:t?u.querySelector(t):null,i=s(u);return l||(i?n(i):null)}(n)}function f(n,t){return function n(r){return r?r.closest(t)||n(s(e(r))):null}(n)}function a(n,t){return d(n,t)}function d(n,t){if(!n)return;const r=t(n);if(void 0!==r)return r;const{parentNode:o}=n;return d(o instanceof ShadowRoot?o.host:o,t)}function v(n,t){return!!a(t,(t=>t===n||void 0))}function y(n){return"function"==typeof(null==n?void 0:n.setFocus)}async function p(n){if(n)return y(n)?n.setFocus():n.focus()}function A(n,t,r){t&&!Array.isArray(t)&&"string"!=typeof t&&(r=t,t=null);const o=t?Array.isArray(t)?t.map((n=>`[slot="${n}"]`)).join(","):`[slot="${t}"]`:":not([slot])";return(null==r?void 0:r.all)?function(n,t,r){let o=":not([slot])"===t?m(n,":not([slot])"):Array.from(n.querySelectorAll(t));o=r&&!1===r.direct?o:o.filter((t=>t.parentElement===n)),o=(null==r?void 0:r.matches)?o.filter((n=>null==n?void 0:n.matches(r.matches))):o;const u=null==r?void 0:r.selector;return u?o.map((n=>Array.from(n.querySelectorAll(u)))).reduce(((n,t)=>[...n,...t]),[]).filter((n=>!!n)):o}(n,o,r):function(n,t,r){let o=":not([slot])"===t?m(n,":not([slot])")[0]||null:n.querySelector(t);o=r&&!1===r.direct||(null==o?void 0:o.parentElement)===n?o:null,o=(null==r?void 0:r.matches)?(null==o?void 0:o.matches(r.matches))?o:null:o;const u=null==r?void 0:r.selector;return u?null==o?void 0:o.querySelector(u):o}(n,o,r)}function m(n,t){return n?Array.from(n.children||[]).filter((n=>null==n?void 0:n.matches(t))):[]}function $(n,t){return Array.from(n.children).filter((n=>n.matches(t)))}function g(n,t,r){return"string"==typeof t&&""!==t?t:""===t?n[r]:void 0}function h(n,t){return!(t.left>n.right||t.right<n.left||t.top>n.bottom||t.bottom<n.top)}function j(n){return Boolean(n).toString()}function k(n){return!(!n.isPrimary||0!==n.button)}export{l as a,v as b,f as c,u as d,i as e,p as f,A as g,r as h,k as i,y as j,h as k,e as l,$ as m,o as n,c as q,g as s,j as t}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as a,c as t,h as i,H as n,g as
|
|
6
|
+
import{r as a,c as t,h as i,H as n,g as o}from"./p-724ffb2b.js";import{c as e}from"./p-befa72be.js";const r=class{constructor(i){a(this,i),this.calciteRadioButtonGroupChange=t(this,"calciteRadioButtonGroupChange",6),this.disabled=!1,this.hidden=!1,this.layout="horizontal",this.required=!1,this.scale="m",this.mutationObserver=e("mutation",(()=>this.passPropsToRadioButtons())),this.passPropsToRadioButtons=()=>{const a=this.el.querySelectorAll("calcite-radio-button");a.length>0&&a.forEach((a=>{a.disabled=this.disabled||a.disabled,a.hidden=this.hidden,a.name=this.name,a.required=this.required,a.scale=this.scale}))}}onDisabledChange(){this.passPropsToRadioButtons()}onHiddenChange(){this.passPropsToRadioButtons()}onLayoutChange(){this.passPropsToRadioButtons()}onScaleChange(){this.passPropsToRadioButtons()}connectedCallback(){var a;this.passPropsToRadioButtons(),null===(a=this.mutationObserver)||void 0===a||a.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){var a;null===(a=this.mutationObserver)||void 0===a||a.disconnect()}radioButtonChangeHandler(a){this.calciteRadioButtonGroupChange.emit(a.target.value)}render(){return i(n,{role:"radiogroup"},i("slot",null))}get el(){return o(this)}static get watchers(){return{disabled:["onDisabledChange"],hidden:["onHiddenChange"],layout:["onLayoutChange"],scale:["onScaleChange"]}}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex;max-inline-size:100vw}:host([layout=horizontal]){flex-direction:row;flex-wrap:wrap}:host([layout=horizontal][scale=s]){gap:1rem}:host([layout=horizontal][scale=m]){gap:1.25rem}:host([layout=horizontal][scale=l]){gap:1.5rem}:host([layout=vertical]){flex-direction:column}";export{r as calcite_radio_button_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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,H as o,g as e}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,H as o,g as e}from"./p-724ffb2b.js";import{t as n,o as r,q as s,g as l,a as c,E as d,b as h}from"./p-8027c4fc.js";import{f as p,g as m}from"./p-331f03ef.js";import{c as u}from"./p-befa72be.js";import{c as f,d as x}from"./p-15fac2ab.js";import{d as b}from"./p-a9c93bf7.js";import"./p-de41e5a9.js";import"./p-d5d91d87.js";import"./p-2e91306b.js";import"./p-534d76ec.js";const g=class{constructor(a){t(this,a),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.mutationObserver=u("mutation",(()=>{const{el:t,expanded:i}=this;n({parent:t,expanded:i}),this.conditionallyOverflowActions()})),this.resizeObserver=u("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenChangeHandler=t=>{if(t.detail){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:a}=t.contentRect;this.resize({width:i,height:a})},this.resize=b((({width:t,height:i})=>{const{el:a,expanded:o,expandDisabled:e,layout:n}=this;if("vertical"===n&&!i||"horizontal"===n&&!t)return;const r=s(a),d=e?r.length:r.length+1,p=Array.from(a.querySelectorAll("calcite-action-group")),u=m(a,"bottom-actions")||!e?p.length+1:p.length,{actionHeight:f,actionWidth:x}=l(r),b=h({layout:n,actionCount:d,actionHeight:f,actionWidth:x,height:i,width:t,groupCount:u});c({actionGroups:p,expanded:o,overflowCount:b})}),r),this.conditionallyOverflowActions=()=>{this.overflowActionsDisabled||this.overflowActions()},this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.setExpandToggleRef=t=>{this.expandToggleEl=t}}expandHandler(){this.conditionallyOverflowActions()}expandedHandler(t){n({parent:this.el,expanded:t}),this.conditionallyOverflowActions()}overflowDisabledHandler(t){t?this.resizeObserver.disconnect():this.resizeObserver.observe(this.el)}componentDidLoad(){this.conditionallyOverflowActions()}connectedCallback(){var t,i;const{el:a,expanded:o}=this;n({parent:a,expanded:o}),null===(t=this.mutationObserver)||void 0===t||t.observe(a,{childList:!0,subtree:!0}),this.overflowActionsDisabled||null===(i=this.resizeObserver)||void 0===i||i.observe(a),this.conditionallyOverflowActions(),f(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),x(this)}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){var i;"expand-toggle"!==t?null===(i=this.el)||void 0===i||i.focus():await p(this.expandToggleEl)}renderBottomActionGroup(){const{expanded:t,expandDisabled:i,intlExpand:o,intlCollapse:e,el:n,position:r,toggleExpand:s,scale:l,layout:c}=this,h=m(n,"expand-tooltip"),p=i?null:a(d,{el:n,expanded:t,intlCollapse:e||"Collapse",intlExpand:o||"Expand",position:r,ref:this.setExpandToggleRef,scale:l,toggle:s,tooltip:h});return m(n,"bottom-actions")||p?a("calcite-action-group",{class:"action-group--bottom",layout:c,scale:l},a("slot",{name:"bottom-actions"}),a("slot",{name:"expand-tooltip"}),p):null}render(){return a(o,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},a("slot",null),this.renderBottomActionGroup())}get el(){return e(this)}static get watchers(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],overflowActionsDisabled:["overflowDisabledHandler"]}}};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.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{pointer-events:auto;display:inline-flex;align-self:stretch;background:transparent;--calcite-action-bar-expanded-max-width:auto}:host([layout=vertical]){flex-direction:column}:host([layout=horizontal]){flex-direction:row}:host([layout=vertical][overflow-actions-disabled]){overflow-y:auto}:host([layout=horizontal][overflow-actions-disabled]){overflow-x:auto}:host([layout=vertical][expanded]){max-inline-size:var(--calcite-action-bar-expanded-max-width)}::slotted(calcite-action-group){border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-width:0px;border-inline-end-width:1px;border-style:solid}::slotted(calcite-action-group:last-child){border-block-end-width:0px;border-inline-end-width:0px}.action-group--bottom{flex-grow:1;justify-content:flex-end;padding-block-end:0px;padding-inline-end:0px}";export{g as calcite_action_bar}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,g as a,H as n}from"./p-2eeff261.js";import{f as o,e as r,t as s}from"./p-98a6c8a4.js";import{u as c}from"./p-f69de408.js";import{n as l,c as d,d as h}from"./p-dbb8e6a4.js";import"./p-54c6ec8e.js";import"./p-9c59c88e.js";import"./p-74cc2ffc.js";import"./p-c564ee3d.js";const p=class{constructor(i){t(this,i),this.calciteStepperItemChange=e(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=e(this,"calciteInternalStepperItemChange",6),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.itemMap=new Map,this.items=[],this.enabledItems=[]}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return i("slot",{onSlotchange:t=>{const e=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===(null==t?void 0:t.tagName))),i=Array(e.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=i,this.el.style.gridTemplateColumns=i}})}calciteInternalStepperItemKeyEvent(t){const e=t.detail.item,i=t.target,a=0===this.itemIndex(i),n=this.itemIndex(i)===this.enabledItems.length-1;switch(e.key){case"ArrowDown":case"ArrowRight":n?this.focusFirstItem():this.focusNextItem(i);break;case"ArrowUp":case"ArrowLeft":a?this.focusLastItem():this.focusPrevItem(i);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}registerItem(t){const e=t.target,{content:i,position:a}=t.detail;this.itemMap.set(e,{position:a,content:i}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:e}=t.detail;"number"==typeof e&&(this.currentPosition=e),this.calciteInternalStepperItemChange.emit({position:e})}handleUserRequestedStepperItemSelect(t){const{position:e}=t.detail;this.calciteStepperItemChange.emit({position:e})}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const e=t-1;this.currentPosition!==e&&this.updateStep(e)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,e="next"){var i;const{items:a,currentPosition:n}=this;let o=t;for(;null===(i=a[o])||void 0===i?void 0:i.disabled;)o+="previous"===e?-1:1;return o!==n&&o<a.length&&o>=0?o:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}focusFirstItem(){o(this.enabledItems[0])}focusLastItem(){o(this.enabledItems[this.enabledItems.length-1])}focusNextItem(t){const e=this.itemIndex(t);o(this.enabledItems[e+1]||this.enabledItems[0])}focusPrevItem(t){const e=this.itemIndex(t);o(this.enabledItems[e-1]||this.enabledItems[this.enabledItems.length-1])}itemIndex(t){return this.enabledItems.indexOf(t)}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((e,i)=>t.get(e).position-t.get(i).position))}filterItems(){return this.items.filter((t=>!t.disabled))}get el(){return a(this)}};p.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';const m=class{constructor(i){t(this,i),this.calciteInternalStepperItemKeyEvent=e(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=e(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=e(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=e(this,"calciteInternalStepperItemRegister",6),this.active=!1,this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.layout="horizontal",this.icon=!1,this.numbered=!1,this.scale="m",this.effectiveLocale="",this.keyDownHandler=t=>{if(!this.disabled&&t.target===this.el)switch(t.key){case" ":case"Enter":this.emitUserRequestedItem(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:t}),t.preventDefault()}},this.handleItemClick=t=>{"horizontal"===this.layout&&t.composedPath().some((t=>{var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("stepper-item-content")}))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})}}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t,this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(t){var e;l.numberFormatOptions={locale:t,numberingSystem:null===(e=this.parentStepperEl)||void 0===e?void 0:e.numberingSystem,useGrouping:!1}}connectedCallback(){d(this);const{selected:t,active:e}=this;t?this.active=t:e&&(this.selected=e)}componentWillLoad(){this.icon=r(this.el,"icon",!1),this.numbered=r(this.el,"numbered",!1),this.layout=r(this.el,"layout",!1),this.scale=r(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidRender(){c(this,!0)}disconnectedCallback(){h(this)}render(){return i(n,{"aria-expanded":s(this.active),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",ref:t=>this.headerEl=t,tabIndex:"horizontal"!==this.layout||this.disabled?null:0},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},l.numberFormatter.format(this.itemPosition+1),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading||this.itemTitle),i("span",{class:"stepper-item-description"},this.description||this.itemSubtitle))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(t){(t.target===this.parentStepperEl||t.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=t.detail.position,this.determineSelectedItem())}async setFocus(){var t;null===(t="vertical"===this.layout?this.el:this.headerEl)||void 0===t||t.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){var t;return Array.from(null===(t=this.parentStepperEl)||void 0===t?void 0:t.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content ::slotted(:last-child){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}";export{p as calcite_stepper,m as calcite_stepper_item}
|
|
6
|
+
import{r as t,c as e,h as i,g as a,H as n}from"./p-724ffb2b.js";import{f as o,e as r,t as s}from"./p-331f03ef.js";import{u as c}from"./p-ff2616f4.js";import{n as l,c as d,d as h}from"./p-04cd97f0.js";import"./p-2e91306b.js";import"./p-534d76ec.js";import"./p-5a7d6abb.js";import"./p-befa72be.js";const p=class{constructor(i){t(this,i),this.calciteStepperItemChange=e(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=e(this,"calciteInternalStepperItemChange",6),this.icon=!1,this.layout="horizontal",this.numbered=!1,this.scale="m",this.itemMap=new Map,this.items=[],this.enabledItems=[]}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return i("slot",{onSlotchange:t=>{const e=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===(null==t?void 0:t.tagName))),i=Array(e.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=i,this.el.style.gridTemplateColumns=i}})}calciteInternalStepperItemKeyEvent(t){const e=t.detail.item,i=t.target,a=0===this.itemIndex(i),n=this.itemIndex(i)===this.enabledItems.length-1;switch(e.key){case"ArrowDown":case"ArrowRight":n?this.focusFirstItem():this.focusNextItem(i);break;case"ArrowUp":case"ArrowLeft":a?this.focusLastItem():this.focusPrevItem(i);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}registerItem(t){const e=t.target,{content:i,position:a}=t.detail;this.itemMap.set(e,{position:a,content:i}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:e}=t.detail;"number"==typeof e&&(this.currentPosition=e),this.calciteInternalStepperItemChange.emit({position:e})}handleUserRequestedStepperItemSelect(t){const{position:e}=t.detail;this.calciteStepperItemChange.emit({position:e})}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const e=t-1;this.currentPosition!==e&&this.updateStep(e)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,e="next"){var i;const{items:a,currentPosition:n}=this;let o=t;for(;null===(i=a[o])||void 0===i?void 0:i.disabled;)o+="previous"===e?-1:1;return o!==n&&o<a.length&&o>=0?o:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}focusFirstItem(){o(this.enabledItems[0])}focusLastItem(){o(this.enabledItems[this.enabledItems.length-1])}focusNextItem(t){const e=this.itemIndex(t);o(this.enabledItems[e+1]||this.enabledItems[0])}focusPrevItem(t){const e=this.itemIndex(t);o(this.enabledItems[e-1]||this.enabledItems[this.enabledItems.length-1])}itemIndex(t){return this.enabledItems.indexOf(t)}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((e,i)=>t.get(e).position-t.get(i).position))}filterItems(){return this.items.filter((t=>!t.disabled))}get el(){return a(this)}};p.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';const m=class{constructor(i){t(this,i),this.calciteInternalStepperItemKeyEvent=e(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=e(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=e(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=e(this,"calciteInternalStepperItemRegister",6),this.active=!1,this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.layout="horizontal",this.icon=!1,this.numbered=!1,this.scale="m",this.effectiveLocale="",this.keyDownHandler=t=>{if(!this.disabled&&t.target===this.el)switch(t.key){case" ":case"Enter":this.emitUserRequestedItem(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:t}),t.preventDefault()}},this.handleItemClick=t=>{"horizontal"===this.layout&&t.composedPath().some((t=>{var e;return null===(e=t.classList)||void 0===e?void 0:e.contains("stepper-item-content")}))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})}}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t,this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(t){var e;l.numberFormatOptions={locale:t,numberingSystem:null===(e=this.parentStepperEl)||void 0===e?void 0:e.numberingSystem,useGrouping:!1}}connectedCallback(){d(this);const{selected:t,active:e}=this;t?this.active=t:e&&(this.selected=e)}componentWillLoad(){this.icon=r(this.el,"icon",!1),this.numbered=r(this.el,"numbered",!1),this.layout=r(this.el,"layout",!1),this.scale=r(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidRender(){c(this,!0)}disconnectedCallback(){h(this)}render(){return i(n,{"aria-expanded":s(this.active),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",ref:t=>this.headerEl=t,tabIndex:"horizontal"!==this.layout||this.disabled?null:0},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},l.numberFormatter.format(this.itemPosition+1),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading||this.itemTitle),i("span",{class:"stepper-item-description"},this.description||this.itemSubtitle))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(t){(t.target===this.parentStepperEl||t.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=t.detail.position,this.determineSelectedItem())}async setFocus(){var t;null===(t="vertical"===this.layout?this.el:this.headerEl)||void 0===t||t.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){var t;return Array.from(null===(t=this.parentStepperEl)||void 0===t?void 0:t.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content ::slotted(:last-child){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}";export{p as calcite_stepper,m as calcite_stepper_item}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as a,H as i,g as r,F as s}from"./p-2eeff261.js";import{T as o,f as n,d as c,a as l,g as h,b as d,c as u,s as p,H as g,e as f,i as v,h as m,n as w,j as y}from"./p-4b1cc441.js";import{c as x,n as b,d as k}from"./p-dbb8e6a4.js";import{a as D}from"./p-98a6c8a4.js";import{C as z}from"./p-54c6ec8e.js";import{u as _}from"./p-f69de408.js";import{i as C}from"./p-74cc2ffc.js";import{H as A}from"./p-91036706.js";import"./p-c564ee3d.js";import"./p-9c59c88e.js";const P=class{constructor(a){t(this,a),this.calciteDatePickerChange=e(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=e(this,"calciteDatePickerRangeChange",6),this.intlPrevMonth=o.prevMonth,this.intlNextMonth=o.nextMonth,this.intlYear=o.year,this.scale="m",this.range=!1,this.proximitySelectionDisabled=!1,this.globalAttributes={},this.effectiveLocale="",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.startAsDate)return void(this.hoverRange=void 0);const e=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:this.startAsDate,end:this.endAsDate},this.proximitySelectionDisabled)this.endAsDate?this.hoverRange=void 0:e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");else if(this.endAsDate){const t=n(e,this.startAsDate),a=n(e,this.endAsDate);a>0?(this.hoverRange.end=e,this.hoverRange.focused="end"):t<0||t>a?(this.hoverRange.start=e,this.hoverRange.focused="start"):(this.hoverRange.end=e,this.hoverRange.focused="end")}else e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");t.stopPropagation()},this.monthMouseOutChange=()=>{this.hoverRange&&(this.hoverRange=void 0)},this.reset=()=>{var t,e,a,i,r,s;!Array.isArray(this.valueAsDate)&&this.valueAsDate&&(null===(t=this.valueAsDate)||void 0===t?void 0:t.getTime())!==(null===(e=this.activeDate)||void 0===e?void 0:e.getTime())&&(this.activeDate=new Date(this.valueAsDate)),this.startAsDate&&(null===(a=this.startAsDate)||void 0===a?void 0:a.getTime())!==(null===(i=this.activeStartDate)||void 0===i?void 0:i.getTime())&&(this.activeStartDate=new Date(this.startAsDate)),this.endAsDate&&(null===(r=this.endAsDate)||void 0===r?void 0:r.getTime())!==(null===(s=this.activeEndDate)||void 0===s?void 0:s.getTime())&&(this.activeEndDate=new Date(this.endAsDate))},this.monthDateChange=t=>{const e=new Date(t.detail);if(!this.range)return this.value=e?c(e):"",this.valueAsDate=e||null,this.activeDate=e||null,void this.calciteDatePickerChange.emit(e);if(!this.startAsDate||!this.endAsDate&&e<this.startAsDate)this.startAsDate&&this.setEndDate(new Date(this.startAsDate)),"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else if(this.endAsDate)if(this.proximitySelectionDisabled)this.setStartDate(e),this.endAsDate=this.activeEndDate=this.end=void 0;else if(this.activeRange)"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else{const t=n(e,this.startAsDate),a=n(e,this.endAsDate);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(e)}}handleValueAsDate(t){!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=t)}handleRangeChange(){const{startAsDate:t,endAsDate:e}=this;this.activeEndDate=e,this.activeStartDate=t}onMinChanged(t){t&&(this.minAsDate=l(t))}onMaxChanged(t){t&&(this.maxAsDate=l(t))}connectedCallback(){x(this),Array.isArray(this.value)?(this.valueAsDate=h(this.value),this.start=this.value[0],this.end=this.value[1]):this.value&&(this.valueAsDate=l(this.value)),this.start&&this.setStartAsDate(l(this.start)),this.end&&this.setEndAsDate(l(this.end)),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}disconnectedCallback(){k(this)}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}render(){var t;const e=d(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate);let r=this.range?this.getActiveStartDate(e,this.minAsDate,this.maxAsDate):this.getActiveDate(e,this.minAsDate,this.maxAsDate);const s=this.range?d(this.endAsDate,this.minAsDate,this.maxAsDate):null,o=this.getActiveEndDate(s,this.minAsDate,this.maxAsDate);return"end"!==this.activeRange&&("end"!==(null===(t=this.hoverRange)||void 0===t?void 0:t.focused)||this.proximitySelectionDisabled&&!s)||!o||(r=o),this.range&&this.mostRecentRangeValue&&(r=this.mostRecentRangeValue),a(i,{onBlur:this.reset,onKeyDown:this.keyDownHandler,role:"application"},this.renderCalendar(r,this.range&&this.activeRange&&"start"===this.activeRange&&s||this.maxAsDate,this.range&&this.activeRange?"start"===this.activeRange?this.minAsDate:e||this.minAsDate:this.minAsDate,e,s))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=h(t),this.start=t[0],this.end=t[1]):t&&(this.valueAsDate=l(t),this.start="",this.end="")}startWatcher(t){this.setStartAsDate(l(t))}endWatcher(t){this.setEndAsDate(l(t))}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await u(this.effectiveLocale)}renderCalendar(t,e,i,r,s){return this.localeData&&[a("calcite-date-picker-month-header",{activeDate:t,headingLevel:this.headingLevel||g,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,localeData:this.localeData,max:e,min:i,onCalciteDatePickerSelect:this.monthHeaderSelectChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r||new Date}),a("calcite-date-picker-month",{activeDate:t,endDate:this.range?s:void 0,hoverRange:this.hoverRange,localeData:this.localeData,max:e,min:i,onCalciteDatePickerActiveDateChange:this.monthActiveDateChange,onCalciteDatePickerSelect:this.monthDateChange,onCalciteInternalDatePickerHover:this.monthHoverChange,onCalciteInternalDatePickerMouseOut:this.monthMouseOutChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r,startDate:this.range?r:void 0})]}setStartAsDate(t,e){this.startAsDate=t,this.mostRecentRangeValue=this.startAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:t,endDate:this.endAsDate})}setEndAsDate(t,e){this.endAsDate=t?p(t):t,this.mostRecentRangeValue=this.endAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:this.startAsDate,endDate:t})}setEndDate(t){this.end=t?c(t):"",this.setEndAsDate(t,!0),this.activeEndDate=t||null}setStartDate(t){this.start=t?c(t):"",this.setStartAsDate(t,!0),this.activeStartDate=t||null}getActiveDate(t,e,a){return d(this.activeDate,e,a)||t||d(new Date,e,a)}getActiveStartDate(t,e,a){return d(this.activeStartDate,e,a)||t||d(new Date,e,a)}getActiveEndDate(t,e,a){return d(this.activeEndDate,e,a)||t||d(new Date,e,a)}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{valueAsDate:["handleValueAsDate"],startAsDate:["handleRangeChange"],endAsDate:["handleRangeChange"],min:["onMinChanged"],max:["onMaxChanged"],value:["valueHandler"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};P.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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-2);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 M=class{constructor(a){t(this,a),this.calciteDaySelect=e(this,"calciteDaySelect",6),this.calciteInternalDayHover=e(this,"calciteInternalDayHover",6),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.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=t=>{C(t.key)&&(!this.disabled&&this.calciteDaySelect.emit(),t.preventDefault())}}mouseoverHandler(){this.calciteInternalDayHover.emit()}render(){const t=b.localize(String(this.day)),e=D(this.el);return a(i,{onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[z.rtl]:"rtl"===e}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},t)))))}componentDidRender(){_(this,this.isTabbable)}isTabbable(){return this.active}get el(){return r(this)}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}: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{border-radius:0px;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 j=class{constructor(a){t(this,a),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.calciteInternalDatePickerHover=e(this,"calciteInternalDatePickerHover",6),this.calciteDatePickerActiveDateChange=e(this,"calciteDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=e(this,"calciteInternalDatePickerMouseOut",6),this.activeDate=new Date,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.calciteDatePickerSelect.emit(t.target.value)}}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const t=this.activeDate.getMonth(),e=this.activeDate.getFullYear(),r=this.localeData.weekStart%7,{abbreviated:s,short:o,narrow:n}=this.localeData.days,c="s"===this.scale?n||o||s:o||s||n,l=[...c.slice(r,7),...c.slice(0,r)],h=this.getCurrentMonthDays(t,e),d=this.getPrevMonthdays(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=f(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)}))],g=[];for(let t=0;t<p.length;t+=7)g.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)))),g.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.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}addDays(t=0){const e=new Date(this.activeDate);e.setDate(this.activeDate.getDate()+t),this.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}getPrevMonthdays(t,e,a){const i=new Date(e,t,0),r=i.getDate(),s=[];if(i.getDay()-6===a)return s;for(let t=i.getDay()-a;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!!(f(t,this.selectedDate)||this.startDate&&f(t,this.startDate)||this.endDate&&f(t,this.endDate))}isStartOfRange(t){return!(!this.startDate||f(this.startDate,this.endDate)||!f(this.startDate,t)||this.isEndOfRange(t))}isEndOfRange(t){return!!(this.endDate&&!f(this.startDate,this.endDate)&&f(this.endDate,t)||!this.endDate&&this.hoverRange&&f(this.startDate,this.hoverRange.end)&&f(t,this.hoverRange.end))}renderDateDay(t,e,i,r,s){var o;const n=this.isFocusedOnStart(),c=this.isHoverInRange()||!this.endDate&&this.hoverRange&&f(null===(o=this.hoverRange)||void 0===o?void 0:o.end,this.startDate);return a("calcite-date-picker-day",{active:t,class:{"hover--inside-range":this.startDate&&c,"hover--outside-range":this.startDate&&!c,"focused--start":n,"focused--end":!n},currentMonth:r,day:e,disabled:!v(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&&!f(this.startDate,this.endDate),rangeHover:this.isRangeHover(i),ref:e=>{s&&t&&this.activeFocus&&(null==e||e.focus())},scale:this.scale,selected:this.isSelected(i),startOfRange:this.isStartOfRange(i),value:i})}isFocusedOnStart(){var t;return"start"===(null===(t=this.hoverRange)||void 0===t?void 0:t.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(),s=r&&(!i&&t>this.startDate&&(t<a||f(t,a))||i&&t<this.endDate&&(t>e||f(t,e))),o=!r&&(!i&&t>=this.endDate&&(t<a||f(t,a))||i&&(t<this.startDate||this.endDate&&f(t,this.startDate))&&(t>e||f(t,e)));return s||o}get el(){return r(this)}};j.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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 S=class{constructor(a){t(this,a),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.globalAttributes={},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=>{C(t.key)&&this.prevMonthClick(t)},this.nextMonthClick=t=>{this.handleArrowClick(t,this.nextMonthDate)},this.nextMonthKeydown=t=>{C(t.key)&&this.nextMonthClick(t)},this.handleArrowClick=(t,e)=>{t.preventDefault(),this.calciteDatePickerSelect.emit(e)}}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){var t;if(!this.activeDate||!this.localeData)return null;const e=this.activeDate.getMonth(),{months:i,unitOrder:r}=this.localeData,o=(i.wide||i.narrow||i.abbreviated)[e],n=this.formatCalendarYear(this.activeDate.getFullYear()),c="l"===this.scale?"m":"s",l=m(r),h=l.indexOf("y")<l.indexOf("m"),d=null===(t=this.localeData.year)||void 0===t?void 0:t.suffix;return a(s,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===e}`,"aria-label":this.intlPrevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===e?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:c})),a("div",{class:{text:!0,"text--reverse":h}},a(A,{class:"month",level:this.headingLevel},o),a("span",{class:"year-wrap"},a("input",{"aria-label":this.intlYear,class:{year:!0,"year--suffix":!!d},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:n}),d&&a("span",{class:"suffix"},d))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===e}`,"aria-label":this.intlNextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===e?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:c})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=d(w(this.activeDate),this.min,this.max),this.prevMonthDate=d(y(this.activeDate),this.min,this.max))}formatCalendarYear(t){const{localeData:e}=this;return b.localize(`${t+("buddhist"===e["default-calendar"]?543:0)}`)}parseCalendarYear(t){const{localeData:e}=this,a="buddhist"===e["default-calendar"]?543:0,i=Number(b.delocalize(t))-a;return b.localize(`${i}`)}getInRangeDate({localizedYear:t,offset:e=0}){const{min:a,max:i,activeDate:r}=this,s=Number(b.delocalize(t)),o=s.toString().length,n=!isNaN(s)&&s+e,c=n&&(!a||a.getFullYear()<=n)&&(!i||i.getFullYear()>=n);if(n&&c&&o===t.length){const t=new Date(r);return t.setFullYear(n),d(t,a,i)}}setYear({localizedYear:t,commit:e=!0,offset:a=0}){const{yearInput:i,activeDate:r}=this,s=this.getInRangeDate({localizedYear:t,offset:a});s&&this.calciteDatePickerSelect.emit(s),e&&(i.value=this.formatCalendarYear((s||r).getFullYear()))}get el(){return r(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};S.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text-nreverse{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{P as calcite_date_picker,M as calcite_date_picker_day,j as calcite_date_picker_month,S 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 s}from"./p-724ffb2b.js";import{T as o,f as n,d as c,a as l,g as h,b as d,c as u,s as p,H as g,e as f,i as v,h as m,n as w,j as y}from"./p-c9c594e4.js";import{c as x,n as b,d as k}from"./p-04cd97f0.js";import{a as D}from"./p-331f03ef.js";import{C as z}from"./p-2e91306b.js";import{u as _}from"./p-ff2616f4.js";import{i as C}from"./p-5a7d6abb.js";import{H as A}from"./p-a4f2a140.js";import"./p-befa72be.js";import"./p-534d76ec.js";const P=class{constructor(a){t(this,a),this.calciteDatePickerChange=e(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=e(this,"calciteDatePickerRangeChange",6),this.intlPrevMonth=o.prevMonth,this.intlNextMonth=o.nextMonth,this.intlYear=o.year,this.scale="m",this.range=!1,this.proximitySelectionDisabled=!1,this.globalAttributes={},this.effectiveLocale="",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.startAsDate)return void(this.hoverRange=void 0);const e=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:this.startAsDate,end:this.endAsDate},this.proximitySelectionDisabled)this.endAsDate?this.hoverRange=void 0:e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");else if(this.endAsDate){const t=n(e,this.startAsDate),a=n(e,this.endAsDate);a>0?(this.hoverRange.end=e,this.hoverRange.focused="end"):t<0||t>a?(this.hoverRange.start=e,this.hoverRange.focused="start"):(this.hoverRange.end=e,this.hoverRange.focused="end")}else e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");t.stopPropagation()},this.monthMouseOutChange=()=>{this.hoverRange&&(this.hoverRange=void 0)},this.reset=()=>{var t,e,a,i,r,s;!Array.isArray(this.valueAsDate)&&this.valueAsDate&&(null===(t=this.valueAsDate)||void 0===t?void 0:t.getTime())!==(null===(e=this.activeDate)||void 0===e?void 0:e.getTime())&&(this.activeDate=new Date(this.valueAsDate)),this.startAsDate&&(null===(a=this.startAsDate)||void 0===a?void 0:a.getTime())!==(null===(i=this.activeStartDate)||void 0===i?void 0:i.getTime())&&(this.activeStartDate=new Date(this.startAsDate)),this.endAsDate&&(null===(r=this.endAsDate)||void 0===r?void 0:r.getTime())!==(null===(s=this.activeEndDate)||void 0===s?void 0:s.getTime())&&(this.activeEndDate=new Date(this.endAsDate))},this.monthDateChange=t=>{const e=new Date(t.detail);if(!this.range)return this.value=e?c(e):"",this.valueAsDate=e||null,this.activeDate=e||null,void this.calciteDatePickerChange.emit(e);if(!this.startAsDate||!this.endAsDate&&e<this.startAsDate)this.startAsDate&&this.setEndDate(new Date(this.startAsDate)),"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else if(this.endAsDate)if(this.proximitySelectionDisabled)this.setStartDate(e),this.endAsDate=this.activeEndDate=this.end=void 0;else if(this.activeRange)"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else{const t=n(e,this.startAsDate),a=n(e,this.endAsDate);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(e)}}handleValueAsDate(t){!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=t)}handleRangeChange(){const{startAsDate:t,endAsDate:e}=this;this.activeEndDate=e,this.activeStartDate=t}onMinChanged(t){t&&(this.minAsDate=l(t))}onMaxChanged(t){t&&(this.maxAsDate=l(t))}connectedCallback(){x(this),Array.isArray(this.value)?(this.valueAsDate=h(this.value),this.start=this.value[0],this.end=this.value[1]):this.value&&(this.valueAsDate=l(this.value)),this.start&&this.setStartAsDate(l(this.start)),this.end&&this.setEndAsDate(l(this.end)),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}disconnectedCallback(){k(this)}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}render(){var t;const e=d(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate);let r=this.range?this.getActiveStartDate(e,this.minAsDate,this.maxAsDate):this.getActiveDate(e,this.minAsDate,this.maxAsDate);const s=this.range?d(this.endAsDate,this.minAsDate,this.maxAsDate):null,o=this.getActiveEndDate(s,this.minAsDate,this.maxAsDate);return"end"!==this.activeRange&&("end"!==(null===(t=this.hoverRange)||void 0===t?void 0:t.focused)||this.proximitySelectionDisabled&&!s)||!o||(r=o),this.range&&this.mostRecentRangeValue&&(r=this.mostRecentRangeValue),a(i,{onBlur:this.reset,onKeyDown:this.keyDownHandler,role:"application"},this.renderCalendar(r,this.range&&this.activeRange&&"start"===this.activeRange&&s||this.maxAsDate,this.range&&this.activeRange?"start"===this.activeRange?this.minAsDate:e||this.minAsDate:this.minAsDate,e,s))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=h(t),this.start=t[0],this.end=t[1]):t&&(this.valueAsDate=l(t),this.start="",this.end="")}startWatcher(t){this.setStartAsDate(l(t))}endWatcher(t){this.setEndAsDate(l(t))}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await u(this.effectiveLocale)}renderCalendar(t,e,i,r,s){return this.localeData&&[a("calcite-date-picker-month-header",{activeDate:t,headingLevel:this.headingLevel||g,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,localeData:this.localeData,max:e,min:i,onCalciteDatePickerSelect:this.monthHeaderSelectChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r||new Date}),a("calcite-date-picker-month",{activeDate:t,endDate:this.range?s:void 0,hoverRange:this.hoverRange,localeData:this.localeData,max:e,min:i,onCalciteDatePickerActiveDateChange:this.monthActiveDateChange,onCalciteDatePickerSelect:this.monthDateChange,onCalciteInternalDatePickerHover:this.monthHoverChange,onCalciteInternalDatePickerMouseOut:this.monthMouseOutChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r,startDate:this.range?r:void 0})]}setStartAsDate(t,e){this.startAsDate=t,this.mostRecentRangeValue=this.startAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:t,endDate:this.endAsDate})}setEndAsDate(t,e){this.endAsDate=t?p(t):t,this.mostRecentRangeValue=this.endAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:this.startAsDate,endDate:t})}setEndDate(t){this.end=t?c(t):"",this.setEndAsDate(t,!0),this.activeEndDate=t||null}setStartDate(t){this.start=t?c(t):"",this.setStartAsDate(t,!0),this.activeStartDate=t||null}getActiveDate(t,e,a){return d(this.activeDate,e,a)||t||d(new Date,e,a)}getActiveStartDate(t,e,a){return d(this.activeStartDate,e,a)||t||d(new Date,e,a)}getActiveEndDate(t,e,a){return d(this.activeEndDate,e,a)||t||d(new Date,e,a)}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{valueAsDate:["handleValueAsDate"],startAsDate:["handleRangeChange"],endAsDate:["handleRangeChange"],min:["onMinChanged"],max:["onMaxChanged"],value:["valueHandler"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};P.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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-2);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 M=class{constructor(a){t(this,a),this.calciteDaySelect=e(this,"calciteDaySelect",6),this.calciteInternalDayHover=e(this,"calciteInternalDayHover",6),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.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=t=>{C(t.key)&&(!this.disabled&&this.calciteDaySelect.emit(),t.preventDefault())}}mouseoverHandler(){this.calciteInternalDayHover.emit()}render(){const t=b.localize(String(this.day)),e=D(this.el);return a(i,{onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},a("div",{class:{"day-v-wrapper":!0,[z.rtl]:"rtl"===e}},a("div",{class:"day-wrapper"},a("span",{class:"day"},a("span",{class:"text"},t)))))}componentDidRender(){_(this,this.isTabbable)}isTabbable(){return this.active}get el(){return r(this)}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}: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{border-radius:0px;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 j=class{constructor(a){t(this,a),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.calciteInternalDatePickerHover=e(this,"calciteInternalDatePickerHover",6),this.calciteDatePickerActiveDateChange=e(this,"calciteDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=e(this,"calciteInternalDatePickerMouseOut",6),this.activeDate=new Date,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.calciteDatePickerSelect.emit(t.target.value)}}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const t=this.activeDate.getMonth(),e=this.activeDate.getFullYear(),r=this.localeData.weekStart%7,{abbreviated:s,short:o,narrow:n}=this.localeData.days,c="s"===this.scale?n||o||s:o||s||n,l=[...c.slice(r,7),...c.slice(0,r)],h=this.getCurrentMonthDays(t,e),d=this.getPrevMonthdays(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=f(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)}))],g=[];for(let t=0;t<p.length;t+=7)g.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)))),g.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.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}addDays(t=0){const e=new Date(this.activeDate);e.setDate(this.activeDate.getDate()+t),this.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}getPrevMonthdays(t,e,a){const i=new Date(e,t,0),r=i.getDate(),s=[];if(i.getDay()-6===a)return s;for(let t=i.getDay()-a;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!!(f(t,this.selectedDate)||this.startDate&&f(t,this.startDate)||this.endDate&&f(t,this.endDate))}isStartOfRange(t){return!(!this.startDate||f(this.startDate,this.endDate)||!f(this.startDate,t)||this.isEndOfRange(t))}isEndOfRange(t){return!!(this.endDate&&!f(this.startDate,this.endDate)&&f(this.endDate,t)||!this.endDate&&this.hoverRange&&f(this.startDate,this.hoverRange.end)&&f(t,this.hoverRange.end))}renderDateDay(t,e,i,r,s){var o;const n=this.isFocusedOnStart(),c=this.isHoverInRange()||!this.endDate&&this.hoverRange&&f(null===(o=this.hoverRange)||void 0===o?void 0:o.end,this.startDate);return a("calcite-date-picker-day",{active:t,class:{"hover--inside-range":this.startDate&&c,"hover--outside-range":this.startDate&&!c,"focused--start":n,"focused--end":!n},currentMonth:r,day:e,disabled:!v(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&&!f(this.startDate,this.endDate),rangeHover:this.isRangeHover(i),ref:e=>{s&&t&&this.activeFocus&&(null==e||e.focus())},scale:this.scale,selected:this.isSelected(i),startOfRange:this.isStartOfRange(i),value:i})}isFocusedOnStart(){var t;return"start"===(null===(t=this.hoverRange)||void 0===t?void 0:t.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(),s=r&&(!i&&t>this.startDate&&(t<a||f(t,a))||i&&t<this.endDate&&(t>e||f(t,e))),o=!r&&(!i&&t>=this.endDate&&(t<a||f(t,a))||i&&(t<this.startDate||this.endDate&&f(t,this.startDate))&&(t>e||f(t,e)));return s||o}get el(){return r(this)}};j.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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 S=class{constructor(a){t(this,a),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.globalAttributes={},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=>{C(t.key)&&this.prevMonthClick(t)},this.nextMonthClick=t=>{this.handleArrowClick(t,this.nextMonthDate)},this.nextMonthKeydown=t=>{C(t.key)&&this.nextMonthClick(t)},this.handleArrowClick=(t,e)=>{t.preventDefault(),this.calciteDatePickerSelect.emit(e)}}connectedCallback(){this.setNextPrevMonthDates()}render(){return a("div",{class:"header"},this.renderContent())}renderContent(){var t;if(!this.activeDate||!this.localeData)return null;const e=this.activeDate.getMonth(),{months:i,unitOrder:r}=this.localeData,o=(i.wide||i.narrow||i.abbreviated)[e],n=this.formatCalendarYear(this.activeDate.getFullYear()),c="l"===this.scale?"m":"s",l=m(r),h=l.indexOf("y")<l.indexOf("m"),d=null===(t=this.localeData.year)||void 0===t?void 0:t.suffix;return a(s,null,a("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===e}`,"aria-label":this.intlPrevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===e?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:c})),a("div",{class:{text:!0,"text--reverse":h}},a(A,{class:"month",level:this.headingLevel},o),a("span",{class:"year-wrap"},a("input",{"aria-label":this.intlYear,class:{year:!0,"year--suffix":!!d},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:n}),d&&a("span",{class:"suffix"},d))),a("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===e}`,"aria-label":this.intlNextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===e?-1:0},a("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:c})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=d(w(this.activeDate),this.min,this.max),this.prevMonthDate=d(y(this.activeDate),this.min,this.max))}formatCalendarYear(t){const{localeData:e}=this;return b.localize(`${t+("buddhist"===e["default-calendar"]?543:0)}`)}parseCalendarYear(t){const{localeData:e}=this,a="buddhist"===e["default-calendar"]?543:0,i=Number(b.delocalize(t))-a;return b.localize(`${i}`)}getInRangeDate({localizedYear:t,offset:e=0}){const{min:a,max:i,activeDate:r}=this,s=Number(b.delocalize(t)),o=s.toString().length,n=!isNaN(s)&&s+e,c=n&&(!a||a.getFullYear()<=n)&&(!i||i.getFullYear()>=n);if(n&&c&&o===t.length){const t=new Date(r);return t.setFullYear(n),d(t,a,i)}}setYear({localizedYear:t,commit:e=!0,offset:a=0}){const{yearInput:i,activeDate:r}=this,s=this.getInRangeDate({localizedYear:t,offset:a});s&&this.calciteDatePickerSelect.emit(s),e&&(i.value=this.formatCalendarYear((s||r).getFullYear()))}get el(){return r(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};S.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text-nreverse{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{P as calcite_date_picker,M as calcite_date_picker_day,j as calcite_date_picker_month,S as calcite_date_picker_month_header}
|
|
@@ -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.0-next.607
|
|
5
|
+
*/
|
|
6
|
+
import{r as t,c as i,h as e,H as n,g as s}from"./p-724ffb2b.js";import{g as a}from"./p-534d76ec.js";import{i as o,g as r,b as c,n as l,u as h,c as u,d}from"./p-04cd97f0.js";import{c as m,d as p,g as f}from"./p-b068d057.js";import{s as b,c as v,d as g,H as w}from"./p-f478e34c.js";import{u as k}from"./p-ff2616f4.js";import{n as y,i as x}from"./p-5a7d6abb.js";import"./p-befa72be.js";import"./p-331f03ef.js";import"./p-2e91306b.js";function D(t,i,e=!0){try{const n={hour:"2-digit",minute:"2-digit",timeZone:"UTC",numberingSystem:c(i)};return e&&(n.second="2-digit"),new Intl.DateTimeFormat(r(t),n)}catch(i){throw new Error(`Invalid locale supplied while attempting to create a DateTime formatter: ${t}`)}}function I(t){const i=t.toString();return t>=0&&t<=9?i.padStart(2,"0"):i}function S(t,i){var e,n,s,a;if(!t||!i)return null;if("hourSuffix"===t){const t=i.indexOf(i.find((({type:t})=>"hour"===t))),n=i.indexOf(i.find((({type:t})=>"minute"===t))),s=i[t+1];return s&&"literal"===s.type&&n-t==2&&(null===(e=s.value)||void 0===e?void 0:e.trim())||null}if("minuteSuffix"===t){const t=i.indexOf(i.find((({type:t})=>"minute"===t))),e=i.indexOf(i.find((({type:t})=>"second"===t))),s=i[t+1];return s&&"literal"===s.type&&e-t==2&&(null===(n=s.value)||void 0===n?void 0:n.trim())||null}if("secondSuffix"===t){const t=i.indexOf(i.find((({type:t})=>"second"===t))),e=i[t+1];return e&&"literal"===e.type&&(null===(s=e.value)||void 0===s?void 0:s.trim())||null}return(null===(a=i.find((({type:i})=>"meridiem"==t?"dayPeriod"===i:i===t)))||void 0===a?void 0:a.value)||null}function M(t){if(!t||t.startsWith(":")||t.endsWith(":"))return!1;const i=t.split(":");if(!(i.length>1&&i.length<4))return!1;const[e,n,s]=i,a=parseInt(i[0]),r=parseInt(i[1]),c=parseInt(i[2]),l=o(e)&&a>=0&&a<24,h=o(n)&&r>=0&&r<60,u=o(s)&&c>=0&&c<60;return!!(l&&h&&!s||l&&h&&u)||void 0}function A({value:t,part:i,locale:e,numberingSystem:n}){if(!function(t,i){if("meridiem"===i)return"AM"===t||"PM"===t;if(!o(t))return!1;const e=Number(t);return"hour"===i?e>=0&&e<24:e>=0&&e<60}(t,i))return;const s=parseInt(t),a=new Date(Date.UTC(0,0,0,"hour"===i?s:"meridiem"===i?"AM"===t?0:12:0,"minute"===i?s:0,"second"===i?s:0));return a?S(i,D(e,n).formatToParts(a)):void 0}function C({value:t,locale:i,numberingSystem:e,includeSeconds:n=!0}){if(!M(t))return null;const{hour:s,minute:a,second:o="0"}=H(t),r=new Date(Date.UTC(0,0,0,parseInt(s),parseInt(a),parseInt(o))),c=D(i,e,n);return(null==c?void 0:c.format(r))||null}function P({value:t,locale:i,numberingSystem:e}){if(!M(t))return null;const{hour:n,minute:s,second:a="0"}=H(t),o=new Date(Date.UTC(0,0,0,parseInt(n),parseInt(s),parseInt(a)));if(o){const t=D(i,e).formatToParts(o);return{localizedHour:S("hour",t),localizedHourSuffix:S("hourSuffix",t),localizedMinute:S("minute",t),localizedMinuteSuffix:S("minuteSuffix",t),localizedSecond:S("second",t),localizedSecondSuffix:S("secondSuffix",t),localizedMeridiem:S("meridiem",t)}}return null}function z({value:t,locale:i,numberingSystem:e}){if(!M(t))return null;const{hour:n,minute:s,second:a="0"}=H(t),o=new Date(Date.UTC(0,0,0,parseInt(n),parseInt(s),parseInt(a)));return o?D(i,e).formatToParts(o):null}function H(t){if(M(t)){const[i,e,n]=t.split(":");return{hour:i,minute:e,second:n}}return{hour:null,minute:null,second:null}}const $=class{constructor(e){t(this,e),this.calciteInputTimePickerChange=i(this,"calciteInputTimePickerChange",7),this.active=!1,this.open=!1,this.disabled=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.overlayPositioning="absolute",this.placement="auto",this.step=60,this.value=null,this.internalValueChange=!1,this.previousValidValue=null,this.referenceElementId=`input-time-picker-${a()}`,this.effectiveLocale="",this.calciteInternalInputBlurHandler=()=>{this.open=!1;const t=this.shouldIncludeSeconds(),{effectiveLocale:i,numberingSystem:e,value:n,calciteInputEl:s}=this;l.numberFormatOptions={locale:i,numberingSystem:e,useGrouping:!1};const a=C({value:l.delocalize(s.value),includeSeconds:t,locale:i,numberingSystem:e});this.setInputValue(a||C({value:n,locale:i,numberingSystem:e,includeSeconds:t}))},this.calciteInternalInputFocusHandler=t=>{this.readOnly||(this.open=!0,t.stopPropagation())},this.calciteInputInputHandler=t=>{const i=t.target;l.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:!1};const e=l.delocalize(i.value);this.setValue({value:e});const n=e.split("").map((t=>y.includes(t)?l.numberFormatter.format(Number(t)):t)).join("");this.setInputValue(n)},this.timePickerChangeHandler=t=>{t.stopPropagation(),this.setValue({value:t.target.value,origin:"time-picker"})},this.keyDownHandler=t=>{const{defaultPrevented:i,key:e}=t;i||("Enter"===e&&b(this)&&t.preventDefault(),"Escape"===e&&this.open&&(this.open=!1,t.preventDefault()))},this.setCalcitePopoverEl=t=>{this.popoverEl=t},this.setCalciteInputEl=t=>{this.calciteInputEl=t},this.setCalciteTimePickerEl=t=>{this.calciteTimePickerEl=t},this.setInputValue=t=>{this.calciteInputEl&&(this.calciteInputEl.value=t)},this.setValue=({value:t,origin:i="input"})=>{const e=this.value,n=function(t){if(!M(t))return null;const[i,e,n]=t.split(":"),s=I(parseInt(i)),a=I(parseInt(e));return n?`${s}:${a}:${I(parseInt(n))}`:`${s}:${a}`}(t),s=C({value:n,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()});this.internalValueChange="external"!==i&&"loading"!==i;const a="loading"!==i&&"external"!==i&&(t!==this.previousValidValue&&!t||!(this.previousValidValue||!n)||n!==this.previousValidValue&&n);t?(a&&(this.previousValidValue=n),n&&n!==this.value&&(this.value=n),this.localizedValue=s):(this.value=t,this.localizedValue=null),"time-picker"!==i&&"external"!==i||this.setInputValue(s),a&&(this.calciteInputTimePickerChange.emit().defaultPrevented?(this.internalValueChange=!1,this.value=e,this.setInputValue(e),this.previousValidValue=e):this.previousValidValue=n)}}activeHandler(t){this.open=t}openHandler(t){this.active=t,this.disabled||this.readOnly?this.open=!1:t&&this.reposition(!0)}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}localeChanged(){h(this)}valueWatcher(t){this.internalValueChange||this.setValue({value:t,origin:"external"}),this.internalValueChange=!1}effectiveLocaleWatcher(){this.setInputValue(C({value:this.value,locale:this.effectiveLocale,numberingSystem:this.numberingSystem,includeSeconds:this.shouldIncludeSeconds()}))}clickHandler(t){t.composedPath().includes(this.calciteTimePickerEl)||this.setFocus()}timePickerBlurHandler(t){t.preventDefault(),t.stopPropagation(),this.open=!1}timePickerFocusHandler(t){t.preventDefault(),t.stopPropagation(),this.readOnly||(this.open=!0)}async setFocus(){var t;null===(t=this.calciteInputEl)||void 0===t||t.setFocus()}async reposition(t=!1){var i;null===(i=this.popoverEl)||void 0===i||i.reposition(t)}onLabelClick(){this.setFocus()}shouldIncludeSeconds(){return this.step<60}connectedCallback(){u(this);const{active:t,open:i}=this;this.value&&this.setValue({value:M(this.value)?this.value:void 0,origin:"loading"}),m(this),v(this),i?this.active=i:t&&(this.open=t)}componentDidLoad(){this.setInputValue(this.localizedValue)}disconnectedCallback(){p(this),g(this),d(this)}componentDidRender(){k(this)}render(){const t=`${this.referenceElementId}-popover`;return e(n,{onKeyDown:this.keyDownHandler},e("div",{"aria-controls":t,"aria-haspopup":"dialog","aria-label":this.name,"aria-owns":t,id:this.referenceElementId,role:"combobox"},e("calcite-input",{disabled:this.disabled,icon:"clock",label:f(this),onCalciteInputInput:this.calciteInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.calciteInternalInputFocusHandler,readOnly:this.readOnly,ref:this.setCalciteInputEl,scale:this.scale,step:this.step})),e("calcite-popover",{id:t,label:"Time Picker",open:this.open,overlayPositioning:this.overlayPositioning,placement:this.placement,ref:this.setCalcitePopoverEl,referenceElement:this.referenceElementId,triggerDisabled:!0},e("calcite-time-picker",{intlHour:this.intlHour,intlHourDown:this.intlHourDown,intlHourUp:this.intlHourUp,intlMeridiem:this.intlMeridiem,intlMeridiemDown:this.intlMeridiemDown,intlMeridiemUp:this.intlMeridiemUp,intlMinute:this.intlMinute,intlMinuteDown:this.intlMinuteDown,intlMinuteUp:this.intlMinuteUp,intlSecond:this.intlSecond,intlSecondDown:this.intlSecondDown,intlSecondUp:this.intlSecondUp,lang:this.effectiveLocale,numberingSystem:this.numberingSystem,onCalciteInternalTimePickerChange:this.timePickerChangeHandler,ref:this.setCalciteTimePickerEl,scale:this.scale,step:this.step,value:this.value})),e(w,{component:this}))}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],locale:["localeChanged"],value:["valueWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};$.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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:inline-block;-webkit-user-select:none;user-select:none}: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}";const _={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",delimiter:"delimiter",hour:"hour",input:"input",meridiem:"meridiem",minute:"minute",second:"second",showMeridiem:"show-meridiem",showSecond:"show-second","scale-s":"scale-s","scale-m":"scale-m","scale-l":"scale-l",timePicker:"time-picker",meridiemStart:"meridiem--start"},L=class{constructor(e){t(this,e),this.calciteInternalTimePickerBlur=i(this,"calciteInternalTimePickerBlur",6),this.calciteInternalTimePickerChange=i(this,"calciteInternalTimePickerChange",6),this.calciteInternalTimePickerFocus=i(this,"calciteInternalTimePickerFocus",6),this.intlHour="Hour",this.intlHourDown="Decrease hour",this.intlHourUp="Increase hour",this.intlMeridiem="AM/PM",this.intlMeridiemDown="Decrease AM/PM",this.intlMeridiemUp="Increase AM/PM",this.intlMinute="Minute",this.intlMinuteDown="Decrease minute",this.intlMinuteUp="Increase minute",this.intlSecond="Second",this.intlSecondDown="Decrease second",this.intlSecondUp="Increase second",this.scale="m",this.step=60,this.value=null,this.effectiveLocale="",this.showSecond=this.step<60,this.decrementHour=()=>{const t=this.hour?"00"===this.hour?23:parseInt(this.hour)-1:0;this.setValuePart("hour",t)},this.decrementMeridiem=()=>{this.setValuePart("meridiem","PM"===this.meridiem?"AM":"PM")},this.decrementMinuteOrSecond=t=>{let i;if(o(this[t])){const e=parseInt(this[t]);i=0===e?59:e-1}else i=59;this.setValuePart(t,i)},this.decrementMinute=()=>{this.decrementMinuteOrSecond("minute")},this.decrementSecond=()=>{this.decrementMinuteOrSecond("second")},this.focusHandler=t=>{this.activeEl=t.currentTarget},this.hourDownButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.decrementHour()},this.hourKeyDownHandler=t=>{const{key:i}=t;if(y.includes(i)){const t=parseInt(i);let e;if(o(this.hour))switch(this.hourCycle){case"12":e="01"===this.hour&&t>=0&&t<=2?`1${t}`:t;break;case"24":e="01"===this.hour?`1${t}`:"02"===this.hour&&t>=0&&t<=3?`2${t}`:t}else e=t;this.setValuePart("hour",e)}else switch(i){case"Backspace":case"Delete":this.setValuePart("hour",null);break;case"ArrowDown":t.preventDefault(),this.decrementHour();break;case"ArrowUp":t.preventDefault(),this.incrementHour();break;case" ":t.preventDefault()}},this.hourUpButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.incrementHour()},this.incrementMeridiem=()=>{this.setValuePart("meridiem","AM"===this.meridiem?"PM":"AM")},this.incrementHour=()=>{const t=o(this.hour)?"23"===this.hour?0:parseInt(this.hour)+1:1;this.setValuePart("hour",t)},this.incrementMinuteOrSecond=t=>{const i=o(this[t])?"59"===this[t]?0:parseInt(this[t])+1:0;this.setValuePart(t,i)},this.incrementMinute=()=>{this.incrementMinuteOrSecond("minute")},this.incrementSecond=()=>{this.incrementMinuteOrSecond("second")},this.meridiemDownButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.decrementMeridiem()},this.meridiemKeyDownHandler=t=>{switch(t.key){case"a":this.setValuePart("meridiem","AM");break;case"p":this.setValuePart("meridiem","PM");break;case"Backspace":case"Delete":this.setValuePart("meridiem",null);break;case"ArrowUp":t.preventDefault(),this.incrementMeridiem();break;case"ArrowDown":t.preventDefault(),this.decrementMeridiem();break;case" ":t.preventDefault()}},this.meridiemUpButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.incrementMeridiem()},this.minuteDownButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.decrementMinute()},this.minuteKeyDownHandler=t=>{const{key:i}=t;if(y.includes(i)){const t=parseInt(i);let e;if(o(this.minute)&&this.minute.startsWith("0")){const i=parseInt(this.minute);e=i>5?t:`${i}${t}`}else e=t;this.setValuePart("minute",e)}else switch(i){case"Backspace":case"Delete":this.setValuePart("minute",null);break;case"ArrowDown":t.preventDefault(),this.decrementMinute();break;case"ArrowUp":t.preventDefault(),this.incrementMinute();break;case" ":t.preventDefault()}},this.minuteUpButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.incrementMinute()},this.secondDownButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.decrementSecond()},this.secondKeyDownHandler=t=>{const{key:i}=t;if(y.includes(i)){const t=parseInt(i);let e;if(o(this.second)&&this.second.startsWith("0")){const i=parseInt(this.second);e=i>5?t:`${i}${t}`}else e=t;this.setValuePart("second",e)}else switch(i){case"Backspace":case"Delete":this.setValuePart("second",null);break;case"ArrowDown":t.preventDefault(),this.decrementSecond();break;case"ArrowUp":t.preventDefault(),this.incrementSecond();break;case" ":t.preventDefault()}},this.secondUpButtonKeyDownHandler=t=>{this.buttonActivated(t)&&this.incrementSecond()},this.setHourEl=t=>this.hourEl=t,this.setMeridiemEl=t=>this.meridiemEl=t,this.setMinuteEl=t=>this.minuteEl=t,this.setSecondEl=t=>this.secondEl=t,this.setValue=(t,i=!0)=>{if(M(t)){const{hour:i,minute:e,second:n}=H(t),{effectiveLocale:s,numberingSystem:a}=this,{localizedHour:r,localizedHourSuffix:c,localizedMinute:l,localizedMinuteSuffix:h,localizedSecond:u,localizedSecondSuffix:d,localizedMeridiem:m}=P({value:t,locale:s,numberingSystem:a});if(this.localizedHour=r,this.localizedHourSuffix=c,this.localizedMinute=l,this.localizedMinuteSuffix=h,this.localizedSecond=u,this.localizedSecondSuffix=d,this.hour=i,this.minute=e,this.second=n,m){this.localizedMeridiem=m,this.meridiem=function(t){if(!o(t))return null;const i=parseInt(t);return i>=0&&i<=11?"AM":"PM"}(this.hour);const i=z({value:t,locale:s,numberingSystem:a});this.meridiemOrder=this.getMeridiemOrder(i)}}else this.hour=null,this.localizedHour=null,this.localizedHourSuffix=null,this.localizedMeridiem=null,this.localizedMinute=null,this.localizedMinuteSuffix=null,this.localizedSecond=null,this.localizedSecondSuffix=null,this.meridiem=null,this.minute=null,this.second=null,this.value=null;i&&this.calciteInternalTimePickerChange.emit()},this.setValuePart=(t,i,e=!0)=>{var n;const{effectiveLocale:s,numberingSystem:a}=this;if("meridiem"===t){if(this.meridiem=i,o(this.hour)){const t=parseInt(this.hour);switch(i){case"AM":t>=12&&(this.hour=I(t-12));break;case"PM":t<12&&(this.hour=I(t+12))}this.localizedHour=A({value:this.hour,part:"hour",locale:s,numberingSystem:a})}}else this[t]="number"==typeof i?I(i):i,this[`localized${r=t,r.charAt(0).toUpperCase()+r.slice(1)}`]=A({value:this[t],part:t,locale:s,numberingSystem:a});var r;this.value=this.hour&&this.minute?`${this.hour}:${this.minute}:${this.second&&this.showSecond?this.second:"00"}`:null,this.localizedMeridiem=this.value?(null===(n=P({value:this.value,locale:s,numberingSystem:a}))||void 0===n?void 0:n.localizedMeridiem)||null:A({value:this.meridiem,part:"meridiem",locale:s,numberingSystem:a}),e&&this.calciteInternalTimePickerChange.emit()}}localeChanged(){h(this)}valueWatcher(t){this.setValue(t,!1)}effectiveLocaleWatcher(){this.updateLocale()}hostBlurHandler(){this.calciteInternalTimePickerBlur.emit()}hostFocusHandler(){this.calciteInternalTimePickerFocus.emit()}keyDownHandler(t){const{defaultPrevented:i,key:e}=t;if(!i)switch(this.activeEl){case this.hourEl:"ArrowRight"===e&&(this.setFocus("minute"),t.preventDefault());break;case this.minuteEl:switch(e){case"ArrowLeft":this.setFocus("hour"),t.preventDefault();break;case"ArrowRight":60!==this.step?(this.setFocus("second"),t.preventDefault()):"12"===this.hourCycle&&(this.setFocus("meridiem"),t.preventDefault())}break;case this.secondEl:switch(e){case"ArrowLeft":this.setFocus("minute"),t.preventDefault();break;case"ArrowRight":"12"===this.hourCycle&&(this.setFocus("meridiem"),t.preventDefault())}break;case this.meridiemEl:switch(e){case"ArrowLeft":60!==this.step?(this.setFocus("second"),t.preventDefault()):(this.setFocus("minute"),t.preventDefault())}}}async setFocus(t){var i;null===(i=this[`${t||"hour"}El`])||void 0===i||i.focus()}buttonActivated(t){const{key:i}=t;return" "===i&&t.preventDefault(),x(i)}getMeridiemOrder(t){const i=this.effectiveLocale;return t&&"ar"!==i&&"he"!==i?t.findIndex((t=>t.value===this.localizedMeridiem)):0}updateLocale(){this.hourCycle=S("meridiem",D(this.effectiveLocale,this.numberingSystem).formatToParts(new Date(Date.UTC(0,0,0,0,0,0))))?"12":"24",this.setValue(this.value,!1)}connectedCallback(){u(this),this.updateLocale(),this.meridiemOrder=this.getMeridiemOrder(z({value:"0:00:00",locale:this.effectiveLocale,numberingSystem:this.numberingSystem}))}disconnectedCallback(){d(this)}render(){const t=o(this.hour),i="s"===this.scale||"m"===this.scale?"s":"m",n=o(this.minute),s=o(this.second),a="12"===this.hourCycle;return e("div",{class:{[_.timePicker]:!0,[_.showMeridiem]:a,[_.showSecond]:this.showSecond,[_[`scale-${this.scale}`]]:!0},dir:"ltr"},e("div",{class:_.column,role:"group"},e("span",{"aria-label":this.intlHourUp,class:{[_.button]:!0,[_.buttonHourUp]:!0,[_.buttonTopLeft]:!0},onClick:this.incrementHour,onKeyDown:this.hourUpButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-up",scale:i})),e("span",{"aria-label":this.intlHour,"aria-valuemax":"23","aria-valuemin":"1","aria-valuenow":t&&parseInt(this.hour)||"0","aria-valuetext":this.hour,class:{[_.input]:!0,[_.hour]:!0},onFocus:this.focusHandler,onKeyDown:this.hourKeyDownHandler,ref:this.setHourEl,role:"spinbutton",tabIndex:0},this.localizedHour||"--"),e("span",{"aria-label":this.intlHourDown,class:{[_.button]:!0,[_.buttonHourDown]:!0,[_.buttonBottomLeft]:!0},onClick:this.decrementHour,onKeyDown:this.hourDownButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-down",scale:i}))),e("span",{class:_.delimiter},this.localizedHourSuffix),e("div",{class:_.column,role:"group"},e("span",{"aria-label":this.intlMinuteUp,class:{[_.button]:!0,[_.buttonMinuteUp]:!0},onClick:this.incrementMinute,onKeyDown:this.minuteUpButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-up",scale:i})),e("span",{"aria-label":this.intlMinute,"aria-valuemax":"12","aria-valuemin":"1","aria-valuenow":n&&parseInt(this.minute)||"0","aria-valuetext":this.minute,class:{[_.input]:!0,[_.minute]:!0},onFocus:this.focusHandler,onKeyDown:this.minuteKeyDownHandler,ref:this.setMinuteEl,role:"spinbutton",tabIndex:0},this.localizedMinute||"--"),e("span",{"aria-label":this.intlMinuteDown,class:{[_.button]:!0,[_.buttonMinuteDown]:!0},onClick:this.decrementMinute,onKeyDown:this.minuteDownButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-down",scale:i}))),this.showSecond&&e("span",{class:_.delimiter},this.localizedMinuteSuffix),this.showSecond&&e("div",{class:_.column,role:"group"},e("span",{"aria-label":this.intlSecondUp,class:{[_.button]:!0,[_.buttonSecondUp]:!0},onClick:this.incrementSecond,onKeyDown:this.secondUpButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-up",scale:i})),e("span",{"aria-label":this.intlSecond,"aria-valuemax":"59","aria-valuemin":"0","aria-valuenow":s&&parseInt(this.second)||"0","aria-valuetext":this.second,class:{[_.input]:!0,[_.second]:!0},onFocus:this.focusHandler,onKeyDown:this.secondKeyDownHandler,ref:this.setSecondEl,role:"spinbutton",tabIndex:0},this.localizedSecond||"--"),e("span",{"aria-label":this.intlSecondDown,class:{[_.button]:!0,[_.buttonSecondDown]:!0},onClick:this.decrementSecond,onKeyDown:this.secondDownButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-down",scale:i}))),this.localizedSecondSuffix&&e("span",{class:_.delimiter},this.localizedSecondSuffix),a&&e("div",{class:{[_.column]:!0,[_.meridiemStart]:0===this.meridiemOrder},role:"group"},e("span",{"aria-label":this.intlMeridiemUp,class:{[_.button]:!0,[_.buttonMeridiemUp]:!0,[_.buttonTopRight]:!0},onClick:this.incrementMeridiem,onKeyDown:this.meridiemUpButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-up",scale:i})),e("span",{"aria-label":this.intlMeridiem,"aria-valuemax":"2","aria-valuemin":"1","aria-valuenow":"PM"===this.meridiem?"2":"1","aria-valuetext":this.meridiem,class:{[_.input]:!0,[_.meridiem]:!0},onFocus:this.focusHandler,onKeyDown:this.meridiemKeyDownHandler,ref:this.setMeridiemEl,role:"spinbutton",tabIndex:0},this.localizedMeridiem||"--"),e("span",{"aria-label":this.intlMeridiemDown,class:{[_.button]:!0,[_.buttonMeridiemDown]:!0,[_.buttonBottomRight]:!0},onClick:this.decrementMeridiem,onKeyDown:this.meridiemDownButtonKeyDownHandler,role:"button",tabIndex:-1},e("calcite-icon",{icon:"chevron-down",scale:i}))))}get el(){return s(this)}static get watchers(){return{locale:["localeChanged"],value:["valueWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};L.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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);border-radius:var(--calcite-border-radius)}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-ui-foreground-1)}.time-picker .button:hover,.time-picker .button:focus{background-color:var(--calcite-ui-foreground-2);outline:2px solid transparent;outline-offset:2px}.time-picker .button:active{background-color:var(--calcite-ui-foreground-3)}.time-picker .button.top-left{border-start-start-radius:var(--calcite-border-radius)}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-border-radius)}.time-picker .button.top-right{border-start-end-radius:var(--calcite-border-radius)}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-border-radius)}.time-picker .button calcite-icon{color:var(--calcite-ui-text-3)}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium)}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:0.75rem;padding-block:0.25rem}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:0.75rem}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:1rem;padding-block:0.5rem}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:1rem}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:1.25rem;padding-block:0.75rem}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:1.25rem}";export{$ as calcite_input_time_picker,L as calcite_time_picker}
|
|
@@ -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.0-next.
|
|
4
|
+
* v1.0.0-next.607
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,c as t,h as a,F as
|
|
6
|
+
import{r as i,c as t,h as a,F as n,g as e}from"./p-724ffb2b.js";import{g as s}from"./p-534d76ec.js";import{c as o,d as r}from"./p-b068d057.js";import{c,d as l,H as d}from"./p-f478e34c.js";import{u as h}from"./p-ff2616f4.js";import{i as p}from"./p-5a7d6abb.js";import"./p-331f03ef.js";import"./p-2e91306b.js";const m=class{constructor(a){i(this,a),this.calciteRatingChange=t(this,"calciteRatingChange",6),this.scale="m",this.value=0,this.readOnly=!1,this.disabled=!1,this.showChip=!1,this.intlRating="Rating",this.intlStars="Stars: ${num}",this.required=!1,this.onKeyboardPressed=i=>{!this.required&&p(i.key)&&(i.preventDefault(),this.updateValue(0))},this.onFocusChange=i=>{this.hasFocus=!0,this.required||this.focusValue!==i?this.focusValue=i:this.updateValue(0)},this.guid=`calcite-ratings-${s()}`}connectedCallback(){o(this),c(this)}disconnectedCallback(){r(this),l(this)}componentDidRender(){h(this)}blurHandler(){this.hasFocus=!1}renderStars(){return[1,2,3,4,5].map((i=>{const t=this.value>=i,n=this.average&&!this.value&&i<=this.average,e=i<=this.hoverValue,s=this.average&&this.average+1-i,o=!this.value&&!e&&s>0&&s<1;return a("span",{class:{wrapper:!0}},a("label",{class:{star:!0,focused:this.hasFocus&&this.focusValue===i,selected:t,average:n,hovered:e,partial:o},htmlFor:`${this.guid}-${i}`,onPointerOver:()=>{this.hoverValue=i}},a("calcite-icon",{"aria-hidden":"true",class:"icon",icon:t||n||this.readOnly?"star-f":"star",scale:this.scale}),o&&a("div",{class:"fraction",style:{width:100*s+"%"}},a("calcite-icon",{icon:"star-f",scale:this.scale})),a("span",{class:"visually-hidden"},this.intlStars.replace("${num}",`${i}`))),a("input",{checked:i===this.value,class:"visually-hidden",disabled:this.disabled||this.readOnly,id:`${this.guid}-${i}`,name:this.guid,onChange:()=>this.updateValue(i),onClick:i=>i.stopPropagation(),onFocus:()=>this.onFocusChange(i),onKeyDown:this.onKeyboardPressed,ref:t=>(1===i||i===this.value)&&(this.inputFocusRef=t),type:"radio",value:i}))}))}render(){const{disabled:i,intlRating:t,showChip:e,scale:s,count:o,average:r}=this;return a(n,null,a("fieldset",{class:"fieldset",disabled:i,onBlur:()=>this.hoverValue=null,onPointerLeave:()=>this.hoverValue=null,onTouchEnd:()=>this.hoverValue=null},a("legend",{class:"visually-hidden"},t),this.renderStars()),(o||r)&&e?a("calcite-chip",{scale:s,value:null==o?void 0:o.toString()},!!r&&a("span",{class:"number--average"},r.toString()),!!o&&a("span",{class:"number--count"},"(",null==o?void 0:o.toString(),")")):null,a(d,{component:this}))}onLabelClick(){this.setFocus()}updateValue(i){this.value=i,this.calciteRatingChange.emit({value:i})}async setFocus(){var i;null===(i=this.inputFocusRef)||void 0===i||i.focus()}get el(){return e(this)}};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.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;align-items:center;inline-size:-moz-fit-content;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){block-size:1.5rem;--calcite-rating-spacing-unit:0.25rem}:host([scale=m]){block-size:2rem;--calcite-rating-spacing-unit:0.5rem}:host([scale=l]){block-size:2.75rem;--calcite-rating-spacing-unit:0.75rem}:host([read-only]){pointer-events:none}.fieldset{margin:0px;display:flex;border-width:0px;padding:0px}.wrapper{display:inline-block;margin-inline-end:var(--calcite-rating-spacing-unit)}.star{position:relative;display:flex;cursor:pointer;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;color:var(--calcite-ui-border-input)}.focused{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.average,.fraction{color:var(--calcite-ui-warning)}.hovered,.selected,:host([read-only]) .average,:host([read-only]) .fraction{color:var(--calcite-ui-brand)}:host .fraction{pointer-events:none;position:absolute;inset-block-start:0px;overflow:hidden;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:var(--calcite-font-weight-bold)}.number--count{color:var(--calcite-ui-text-2);font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing-unit)}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}::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{m as calcite_rating}
|