@esri/calcite-components 1.0.0-next.607 → 1.0.0-next.609
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-36207d38.entry.js → p-01d9f2b2.entry.js} +2 -2
- package/dist/calcite/{p-3c0e6bf9.entry.js → p-01edbd82.entry.js} +2 -2
- package/dist/calcite/{p-0194be0b.js → p-020fc01c.js} +1 -1
- package/dist/calcite/{p-2577a91d.entry.js → p-0655d47b.entry.js} +2 -2
- package/dist/calcite/{p-c1f41172.entry.js → p-096089a8.entry.js} +2 -2
- package/dist/calcite/{p-ffb58fa7.entry.js → p-0f731c33.entry.js} +2 -2
- package/dist/calcite/{p-2e91306b.js → p-121b14f1.js} +1 -1
- package/dist/calcite/{p-10ed6464.entry.js → p-1357b688.entry.js} +2 -2
- package/dist/calcite/p-190e3c87.entry.js +6 -0
- package/dist/calcite/{p-4b6ab904.entry.js → p-19c76953.entry.js} +2 -2
- package/dist/calcite/{p-ab2f0124.js → p-1c9d57e5.js} +1 -1
- package/dist/calcite/{p-a9c93bf7.js → p-1e2ee265.js} +1 -1
- package/dist/calcite/{p-b2c6b06b.entry.js → p-282f7cfd.entry.js} +2 -2
- package/dist/calcite/{p-963f91e7.entry.js → p-31351210.entry.js} +2 -2
- package/dist/calcite/p-32d2eda0.js +6 -0
- package/dist/calcite/{p-f9398f20.entry.js → p-32db9377.entry.js} +2 -2
- package/dist/calcite/{p-8bbc5021.entry.js → p-3319b962.entry.js} +2 -2
- package/dist/calcite/{p-68be1a57.js → p-3599bc85.js} +1 -1
- package/dist/calcite/{p-dfda39cf.entry.js → p-3a825fa6.entry.js} +2 -2
- package/dist/calcite/{p-bd7bf633.entry.js → p-3b5e2f5d.entry.js} +2 -2
- package/dist/calcite/{p-de41e5a9.js → p-3de96267.js} +1 -1
- package/dist/calcite/{p-a19ba1b8.js → p-42581097.js} +1 -1
- package/dist/calcite/{p-2a2d9854.entry.js → p-428eaf14.entry.js} +2 -2
- package/dist/calcite/{p-8ce99d30.entry.js → p-4688735d.entry.js} +2 -2
- package/dist/calcite/{p-389235c5.entry.js → p-47818178.entry.js} +2 -2
- package/dist/calcite/{p-35a4696c.entry.js → p-4a6650ae.entry.js} +2 -2
- package/dist/calcite/{p-8027c4fc.js → p-4ab4a47a.js} +2 -2
- package/dist/calcite/p-4b5392d5.js +6 -0
- package/dist/calcite/{p-c3f0ca58.entry.js → p-52ceed6e.entry.js} +2 -2
- package/dist/calcite/{p-5a7d6abb.js → p-56effd98.js} +1 -1
- package/dist/calcite/{p-dfe47ce7.entry.js → p-57bbb2a2.entry.js} +2 -2
- package/dist/calcite/{p-0c941429.entry.js → p-5b625926.entry.js} +2 -2
- package/dist/calcite/{p-4053f375.entry.js → p-5d178eae.entry.js} +2 -2
- package/dist/calcite/{p-215f9b3e.entry.js → p-5e5f2ea3.entry.js} +2 -2
- package/dist/calcite/{p-ae537940.entry.js → p-62a06a43.entry.js} +2 -2
- package/dist/calcite/{p-f478e34c.js → p-6310c9ff.js} +2 -2
- package/dist/calcite/{p-05d91128.entry.js → p-641b7f2d.entry.js} +2 -2
- package/dist/calcite/{p-d5d91d87.js → p-68797523.js} +1 -1
- package/dist/calcite/{p-e0cb72b7.entry.js → p-72cf2fb5.entry.js} +2 -2
- package/dist/calcite/{p-e85ec259.entry.js → p-7669b964.entry.js} +2 -2
- package/dist/calcite/{p-4054de19.entry.js → p-79464ecc.entry.js} +2 -2
- package/dist/calcite/{p-2ac4da68.entry.js → p-7a8cf3be.entry.js} +2 -2
- package/dist/calcite/{p-f0513696.js → p-7ab7a2f3.js} +1 -1
- package/dist/calcite/{p-8d64e950.js → p-7d55308f.js} +2 -2
- package/dist/calcite/{p-4bba5de5.js → p-83adc8a0.js} +2 -2
- package/dist/calcite/{p-9ef24687.entry.js → p-8423a3e3.entry.js} +2 -2
- package/dist/calcite/{p-0a89a06d.entry.js → p-865213d7.entry.js} +2 -2
- package/dist/calcite/{p-c943664b.entry.js → p-88947214.entry.js} +2 -2
- package/dist/calcite/{p-1305ee55.entry.js → p-93f56622.entry.js} +2 -2
- package/dist/calcite/{p-ff2616f4.js → p-971cc677.js} +1 -1
- package/dist/calcite/{p-27480e42.entry.js → p-9b795b60.entry.js} +2 -2
- package/dist/calcite/{p-29e7d607.entry.js → p-9d7cdcc1.entry.js} +2 -2
- package/dist/calcite/{p-dbd28f14.entry.js → p-9ea15e8f.entry.js} +2 -2
- package/dist/calcite/{p-e423377f.entry.js → p-a0b68544.entry.js} +2 -2
- package/dist/calcite/{p-724ffb2b.js → p-a25a17b0.js} +1 -1
- package/dist/calcite/{p-331f03ef.js → p-a49228cd.js} +2 -2
- package/dist/calcite/{p-c9c594e4.js → p-a4d32092.js} +2 -2
- package/dist/calcite/{p-2b623d7a.entry.js → p-abbded48.entry.js} +2 -2
- package/dist/calcite/{p-3ad75dbc.entry.js → p-b50ef0fb.entry.js} +2 -2
- package/dist/calcite/p-b5294ea2.entry.js +6 -0
- package/dist/calcite/{p-befa72be.js → p-b874cfdf.js} +1 -1
- package/dist/calcite/{p-ba8d8dbd.entry.js → p-bc4591e3.entry.js} +2 -2
- package/dist/calcite/{p-04cd97f0.js → p-be2ec1e1.js} +2 -2
- package/dist/calcite/{p-56e13c26.entry.js → p-c0be08aa.entry.js} +2 -2
- package/dist/calcite/{p-233e9c82.entry.js → p-c19e7ca9.entry.js} +2 -2
- package/dist/calcite/{p-2824d942.entry.js → p-c5b28f49.entry.js} +2 -2
- package/dist/calcite/{p-57cd8bf6.entry.js → p-c9436894.entry.js} +2 -2
- package/dist/calcite/{p-228742f9.js → p-cfbc998b.js} +2 -2
- package/dist/calcite/{p-ef74f7df.entry.js → p-d0a6534c.entry.js} +2 -2
- package/dist/calcite/{p-b96cd9fe.entry.js → p-d4c89f14.entry.js} +2 -2
- package/dist/calcite/{p-a214e596.entry.js → p-d901da67.entry.js} +2 -2
- package/dist/calcite/{p-1142d6c8.entry.js → p-d970b1cf.entry.js} +2 -2
- package/dist/calcite/{p-3f71cb54.entry.js → p-e0568bca.entry.js} +2 -2
- package/dist/calcite/{p-35f864c5.entry.js → p-e1477331.entry.js} +2 -2
- package/dist/calcite/{p-7f645e69.entry.js → p-e349526e.entry.js} +2 -2
- package/dist/calcite/{p-976bd33d.entry.js → p-e7ef43fa.entry.js} +2 -2
- package/dist/calcite/{p-ecd9436e.js → p-e8c440c0.js} +2 -2
- package/dist/calcite/{p-aec0e90c.js → p-ebd65ed7.js} +1 -1
- package/dist/calcite/{p-4d118fe7.entry.js → p-eea10b41.entry.js} +2 -2
- package/dist/calcite/{p-860f95db.entry.js → p-ef88f057.entry.js} +2 -2
- package/dist/calcite/{p-b068d057.js → p-f0f2e72f.js} +2 -2
- package/dist/calcite/{p-792a67ad.js → p-f28ee571.js} +1 -1
- package/dist/calcite/{p-cfd04b12.entry.js → p-f3eb3b52.entry.js} +2 -2
- package/dist/calcite/{p-534d76ec.js → p-f5023aea.js} +1 -1
- package/dist/calcite/{p-db5ed768.entry.js → p-f698d6d9.entry.js} +2 -2
- package/dist/calcite/{p-fad91c38.entry.js → p-f7904254.entry.js} +2 -2
- package/dist/calcite/{p-eb088883.entry.js → p-f9d6fcbc.entry.js} +2 -2
- package/dist/calcite/{p-3191298d.entry.js → p-fbac7fab.entry.js} +2 -2
- package/dist/calcite/{p-9cc66598.js → p-fbf41de1.js} +2 -2
- package/dist/cjs/{ExpandToggle-e018f211.js → ExpandToggle-7d5d809b.js} +5 -5
- package/dist/cjs/{Heading-c23ab3be.js → Heading-3d1b7a1e.js} +2 -2
- package/dist/cjs/{app-globals-882315c5.js → app-globals-07c5acbe.js} +2 -2
- package/dist/cjs/{array-46b159ae.js → array-d3a4c949.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 +14 -14
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +11 -11
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +11 -11
- 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 +13 -8
- 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 +15 -15
- package/dist/cjs/calcite-input-message.cjs.entry.js +12 -7
- 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 +11 -11
- 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 +10 -5
- 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 +11 -11
- 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 +7 -7
- 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-4f4eea6a.js → conditionalSlot-cbcbade7.js} +3 -3
- package/dist/cjs/{debounce-62882659.js → debounce-78511652.js} +1 -1
- package/dist/cjs/{dom-4d157abb.js → dom-c600f950.js} +3 -3
- package/dist/cjs/{filter-da2797e5.js → filter-c991aebd.js} +2 -2
- package/dist/cjs/{floating-ui-e4e82078.js → floating-ui-a6e5398a.js} +4 -4
- package/dist/cjs/{form-2f418822.js → form-b6d4748a.js} +3 -3
- package/dist/cjs/{guid-1d60d25f.js → guid-e77da52f.js} +1 -1
- package/dist/cjs/{index-9624081e.js → index-a41cd251.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-f3855fe3.js → interactive-b3e32d4c.js} +1 -1
- package/dist/cjs/{interfaces-78ca36e7.js → interfaces-bd030bbf.js} +1 -1
- package/dist/cjs/{key-dbb23e1d.js → key-32b6797a.js} +1 -1
- package/dist/cjs/{label-cf0a7e54.js → label-b764e7be.js} +2 -2
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-9261eb8c.js → locale-c4552747.js} +4 -4
- package/dist/cjs/{math-70844c29.js → math-8203a109.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-e6d5cb22.js → nonChromiumPlatformUtils-59b3b6f6.js} +6 -6
- package/dist/cjs/{observers-53e1a6d6.js → observers-4ca7f471.js} +1 -1
- package/dist/cjs/{openCloseComponent-af87dcf3.js → openCloseComponent-37a6be7c.js} +1 -1
- package/dist/cjs/{resources-d07d3444.js → resources-020ea412.js} +3 -3
- package/dist/cjs/{resources-8477fc7e.js → resources-122bfe1b.js} +1 -1
- package/dist/cjs/{resources-83f09a7b.js → resources-178ed7af.js} +5 -5
- package/dist/cjs/{resources-375914cd.js → resources-2c4539c2.js} +1 -1
- package/dist/cjs/{resources-020cc6d5.js → resources-699af4f5.js} +1 -1
- package/dist/cjs/{resources-2f6b4dae.js → resources-a967e4ac.js} +1 -1
- package/dist/cjs/{sortable.esm-7dbec412.js → sortable.esm-4788c293.js} +1 -1
- package/dist/cjs/{utils-a61e740b.js → utils-c4004ea8.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.js +1 -1
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +1 -1
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +21 -2
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +1 -1
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/inline-editable/inline-editable.js +1 -1
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +1 -1
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.css +6 -16
- package/dist/collection/components/input-message/input-message.js +14 -3
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.js +1 -1
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +1 -1
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.css +0 -7
- package/dist/collection/components/loader/loader.js +14 -3
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.js +1 -1
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/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.js +1 -1
- 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 +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/collection/utils/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 +1 -1
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +1 -1
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +1 -1
- package/dist/components/calcite-avatar.js +1 -1
- package/dist/components/calcite-block-section.js +1 -1
- package/dist/components/calcite-block.js +1 -1
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +1 -1
- package/dist/components/calcite-checkbox.js +1 -1
- package/dist/components/calcite-chip.js +1 -1
- package/dist/components/calcite-color-picker-hex-input.js +1 -1
- package/dist/components/calcite-color-picker-swatch.js +1 -1
- package/dist/components/calcite-color-picker.js +1 -1
- package/dist/components/calcite-combobox-item-group.js +1 -1
- package/dist/components/calcite-combobox-item.js +1 -1
- package/dist/components/calcite-combobox.js +1 -1
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +1 -1
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +7 -2
- package/dist/components/calcite-flow.js +1 -1
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-input-message.js +8 -3
- package/dist/components/calcite-input-number.js +1 -1
- package/dist/components/calcite-input-text.js +1 -1
- package/dist/components/calcite-input-time-picker.js +1 -1
- package/dist/components/calcite-input.js +1 -1
- package/dist/components/calcite-label.js +1 -1
- package/dist/components/calcite-link.js +1 -1
- package/dist/components/calcite-list-item-group.js +1 -1
- package/dist/components/calcite-list-item.js +1 -1
- package/dist/components/calcite-list.js +1 -1
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-option.js +1 -1
- package/dist/components/calcite-pagination.js +1 -1
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +1 -1
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-popover-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 +1 -1
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +1 -1
- package/dist/components/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 +8 -3
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +1 -1
- package/dist/components/shared-list-render.js +1 -1
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tab-nav.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/esm/{ExpandToggle-c19c7ae6.js → ExpandToggle-553f6971.js} +5 -5
- package/dist/esm/{Heading-55c4005d.js → Heading-4bba1618.js} +2 -2
- package/dist/esm/{app-globals-a52284f2.js → app-globals-2e8b70b6.js} +2 -2
- package/dist/esm/{array-740ce6b6.js → array-8bb228b2.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 +14 -14
- package/dist/esm/calcite-date-picker_4.entry.js +11 -11
- package/dist/esm/calcite-dropdown_3.entry.js +11 -11
- 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 +13 -8
- 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 +15 -15
- package/dist/esm/calcite-input-message.entry.js +12 -7
- 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 +11 -11
- 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 +10 -5
- 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 +11 -11
- 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 +7 -7
- 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-3441e8f2.js → conditionalSlot-0759ea2f.js} +3 -3
- package/dist/esm/{debounce-97857fea.js → debounce-b9ebb68c.js} +1 -1
- package/dist/esm/{dom-fbef4a17.js → dom-effde7fb.js} +3 -3
- package/dist/esm/{filter-5c7687ab.js → filter-a288dd14.js} +2 -2
- package/dist/esm/{floating-ui-d7d7ebf5.js → floating-ui-de50c628.js} +4 -4
- package/dist/esm/{form-6c6f44c9.js → form-11701878.js} +3 -3
- package/dist/esm/{guid-46425949.js → guid-e7ce142c.js} +1 -1
- package/dist/esm/{index-dd350c9e.js → index-8507b211.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-7bb63697.js → interactive-09a57b23.js} +1 -1
- package/dist/esm/{interfaces-1e4b4247.js → interfaces-a5953604.js} +1 -1
- package/dist/esm/{key-9fd0ee2d.js → key-965fc757.js} +1 -1
- package/dist/esm/{label-4476feb8.js → label-6baf6627.js} +2 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-59ce851a.js → locale-4ab64bc0.js} +4 -4
- package/dist/esm/{math-f58b6249.js → math-bc4d8ed1.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-9a77a585.js → nonChromiumPlatformUtils-8ff0371c.js} +6 -6
- package/dist/esm/{observers-4a45256c.js → observers-3c7e57f7.js} +1 -1
- package/dist/esm/{openCloseComponent-16ae97af.js → openCloseComponent-81cbce62.js} +1 -1
- package/dist/esm/{resources-172c2a25.js → resources-2ed36d60.js} +1 -1
- package/dist/esm/{resources-f25e2a24.js → resources-54c10930.js} +1 -1
- package/dist/esm/{resources-51ebf03b.js → resources-6f1eb9ee.js} +5 -5
- package/dist/esm/{resources-06042c92.js → resources-92ed3aeb.js} +1 -1
- package/dist/esm/{resources-c905d6cb.js → resources-c3da6440.js} +1 -1
- package/dist/esm/{resources-57d6fea9.js → resources-cb55eb73.js} +3 -3
- package/dist/esm/{sortable.esm-6094be14.js → sortable.esm-896bb173.js} +1 -1
- package/dist/esm/{utils-94170855.js → utils-1b4f60cc.js} +1 -1
- package/dist/extras/docs-json.json +32 -3
- 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/flow-item/flow-item.d.ts +5 -0
- package/dist/types/components/input-message/input-message.d.ts +6 -1
- package/dist/types/components/loader/loader.d.ts +6 -1
- package/dist/types/components.d.ts +12 -0
- package/dist/types/preact.d.ts +2 -1
- package/hydrate/index.js +21 -6
- package/package.json +1 -1
- package/dist/calcite/p-15fac2ab.js +0 -6
- package/dist/calcite/p-a4f2a140.js +0 -6
- package/dist/calcite/p-c7a40044.entry.js +0 -6
- package/dist/calcite/p-de5ad6d3.entry.js +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
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.609
|
|
5
5
|
*/
|
|
6
6
|
const e="calcite";let t,n,l=!1,s=!1;const o=e=>{const t=new URL(e,$e.t);return t.origin!==ue.location.origin?t.href:t.pathname},i="http://www.w3.org/1999/xlink",c={},r=e=>"object"==(e=typeof e)||"function"===e,a=(e,t,...n)=>{let l=null,s=null,o=!1,i=!1;const c=[],a=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?a(l):null!=l&&"boolean"!=typeof l&&((o="function"!=typeof e&&!r(l))&&(l+=""),o&&i?c[c.length-1].l+=l:c.push(o?u(null,l):l),i=o)};if(a(n),t){t.key&&(s=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}if("function"==typeof e)return e(null===t?{}:t,c,$);const f=u(e,null);return f.o=t,c.length>0&&(f.i=c),f.u=s,f},u=(e,t)=>({$:0,h:e,l:t,p:null,i:null,o:null,u:null}),f={},$={forEach:(e,t)=>e.map(d).forEach(t),map:(e,t)=>e.map(d).map(t).map(h)},d=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.m,vtag:e.h,vtext:e.l}),h=e=>{if("function"==typeof e.vtag){const t=Object.assign({},e.vattrs);return e.vkey&&(t.key=e.vkey),e.vname&&(t.name=e.vname),a(e.vtag,t,...e.vchildren||[])}const t=u(e.vtag,e.vtext);return t.o=e.vattrs,t.i=e.vchildren,t.u=e.vkey,t.m=e.vname,t},y=(e,t,n,l,s,o,i)=>{let c,r,a,f;if(1===o.nodeType){for(c=o.getAttribute("c-id"),c&&(r=c.split("."),r[0]!==i&&"0"!==r[0]||(a={$:0,g:r[0],v:r[1],k:r[2],j:r[3],h:o.tagName.toLowerCase(),p:o,o:null,i:null,u:null,m:null,l:null},t.push(a),o.removeAttribute("c-id"),e.i||(e.i=[]),e.i[a.j]=a,e=a,l&&"0"===a.k&&(l[a.j]=a.p))),f=o.childNodes.length-1;f>=0;f--)y(e,t,n,l,s,o.childNodes[f],i);if(o.shadowRoot)for(f=o.shadowRoot.childNodes.length-1;f>=0;f--)y(e,t,n,l,s,o.shadowRoot.childNodes[f],i)}else if(8===o.nodeType)r=o.nodeValue.split("."),r[1]!==i&&"0"!==r[1]||(c=r[0],a={$:0,g:r[1],v:r[2],k:r[3],j:r[4],p:o,o:null,i:null,u:null,m:null,h:null,l:null},"t"===c?(a.p=o.nextSibling,a.p&&3===a.p.nodeType&&(a.l=a.p.textContent,t.push(a),o.remove(),e.i||(e.i=[]),e.i[a.j]=a,l&&"0"===a.k&&(l[a.j]=a.p))):a.g===i&&("s"===c?(a.h="slot",o["s-sn"]=r[5]?a.m=r[5]:"",o["s-sr"]=!0,l&&(a.p=fe.createElement(a.h),a.m&&a.p.setAttribute("name",a.m),o.parentNode.insertBefore(a.p,o),o.remove(),"0"===a.k&&(l[a.j]=a.p)),n.push(a),e.i||(e.i=[]),e.i[a.j]=a):"r"===c&&l&&o.remove()));else if(e&&"style"===e.h){const t=u(null,o.textContent);t.p=o,t.j="0",e.i=[t]}},p=(e,t)=>{if(1===e.nodeType){let n=0;for(;n<e.childNodes.length;n++)p(e.childNodes[n],t);if(e.shadowRoot)for(n=0;n<e.shadowRoot.childNodes.length;n++)p(e.shadowRoot.childNodes[n],t)}else if(8===e.nodeType){const n=e.nodeValue.split(".");"o"===n[0]&&(t.set(n[1]+"."+n[2],e),e.nodeValue="",e["s-en"]=n[3])}},m=e=>ne(e).S,w=(e,t,n)=>{const l=m(e);return{emit:e=>b(l,t,{bubbles:!!(4&n),composed:!!(2&n),cancelable:!!(1&n),detail:e})}},b=(e,t,n)=>{const l=$e.ce(t,n);return e.dispatchEvent(l),l},g=new WeakMap,v=(e,t,n)=>{let l=ae.get(e);ye&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,ae.set(e,l)},k=(e,t)=>{let n=j(t);const l=ae.get(n);if(e=11===e.nodeType?e:fe,l)if("string"==typeof l){let t,s=g.get(e=e.head||e);s||g.set(e,s=new Set),s.has(n)||(e.host&&(t=e.querySelector(`[sty-id="${n}"]`))?t.innerHTML=l:(t=fe.createElement("style"),t.innerHTML=l,e.insertBefore(t,e.querySelector("link"))),s&&s.add(n))}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return n},j=e=>"sc-"+e.O,S=e=>e.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g,"$1{"),x=(e,t,n,l,s,o)=>{if(n!==l){let c=oe(e,t),a=t.toLowerCase();if("class"===t){const t=e.classList,s=M(n),o=M(l);t.remove(...s.filter((e=>e&&!o.includes(e)))),t.add(...o.filter((e=>e&&!s.includes(e))))}else if("style"===t){for(const t in n)l&&null!=l[t]||(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(const t in l)n&&l[t]===n[t]||(t.includes("-")?e.style.setProperty(t,l[t]):e.style[t]=l[t])}else if("key"===t);else if("ref"===t)l&&l(e);else if(c||"o"!==t[0]||"n"!==t[1]){const u=r(l);if((c||u&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const s=null==l?"":l;"list"===t?c=!1:null!=n&&e[t]==s||(e[t]=s)}}catch(e){}let f=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(t)||(f?e.removeAttributeNS(i,t):e.removeAttribute(t)):(!c||4&o||s)&&!u&&(l=!0===l?"":l,f?e.setAttributeNS(i,t,l):e.setAttribute(t,l))}else t="-"===t[2]?t.slice(3):oe(ue,a)?a.slice(2):a[2]+t.slice(3),n&&$e.rel(e,t,n,!1),l&&$e.ael(e,t,l,!1)}},O=/\s/,M=e=>e?e.split(O):[],C=(e,t,n,l)=>{const s=11===t.p.nodeType&&t.p.host?t.p.host:t.p,o=e&&e.o||c,i=t.o||c;for(l in o)l in i||x(s,l,o[l],void 0,n,t.$);for(l in i)x(s,l,o[l],i[l],n,t.$)},L=(e,n,s)=>{const o=n.i[s];let i,c,r=0;if(null!==o.l)i=o.p=fe.createTextNode(o.l);else{if(l||(l="svg"===o.h),i=o.p=fe.createElementNS(l?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o.h),l&&"foreignObject"===o.h&&(l=!1),C(null,o,l),null!=t&&i["s-si"]!==t&&i.classList.add(i["s-si"]=t),o.i)for(r=0;r<o.i.length;++r)c=L(e,o,r),c&&i.appendChild(c);"svg"===o.h?l=!1:"foreignObject"===i.tagName&&(l=!0)}return i},P=(e,t,l,s,o,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);o<=i;++o)s[o]&&(c=L(null,l,o),c&&(s[o].p=c,r.insertBefore(c,t)))},R=(e,t,n,l,s)=>{for(;t<=n;++t)(l=e[t])&&(s=l.p,N(l),s.remove())},E=(e,t)=>e.h===t.h&&e.u===t.u,I=(e,t)=>{const n=t.p=e.p,s=e.i,o=t.i,i=t.h,c=t.l;null===c?(l="svg"===i||"foreignObject"!==i&&l,"slot"===i||C(e,t,l),null!==s&&null!==o?((e,t,n,l)=>{let s,o,i=0,c=0,r=0,a=0,u=t.length-1,f=t[0],$=t[u],d=l.length-1,h=l[0],y=l[d];for(;i<=u&&c<=d;)if(null==f)f=t[++i];else if(null==$)$=t[--u];else if(null==h)h=l[++c];else if(null==y)y=l[--d];else if(E(f,h))I(f,h),f=t[++i],h=l[++c];else if(E($,y))I($,y),$=t[--u],y=l[--d];else if(E(f,y))I(f,y),e.insertBefore(f.p,$.p.nextSibling),f=t[++i],y=l[--d];else if(E($,h))I($,h),e.insertBefore($.p,f.p),$=t[--u],h=l[++c];else{for(r=-1,a=i;a<=u;++a)if(t[a]&&null!==t[a].u&&t[a].u===h.u){r=a;break}r>=0?(o=t[r],o.h!==h.h?s=L(t&&t[c],n,r):(I(o,h),t[r]=void 0,s=o.p),h=l[++c]):(s=L(t&&t[c],n,c),h=l[++c]),s&&f.p.parentNode.insertBefore(s,f.p)}i>u?P(e,null==l[d+1]?null:l[d+1].p,n,l,c,d):c>d&&R(t,i,u)})(n,s,t,o):null!==o?(null!==e.l&&(n.textContent=""),P(n,null,t,o,0,o.length-1)):null!==s&&R(s,0,s.length-1),l&&"svg"===i&&(l=!1)):e.l!==c&&(n.data=c)},N=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(N)},W=(e,t)=>{t&&!e.M&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.M=t)))},F=(e,t)=>{if(e.$|=16,!(4&e.$))return W(e,e.C),ke((()=>T(e,t)));e.$|=512},T=(e,t)=>{const n=e.L;let l;return t&&(e.$|=256,e.P&&(e.P.map((([e,t])=>V(n,e,t))),e.P=null),l=V(n,"componentWillLoad")),l=_(l,(()=>V(n,"componentWillRender"))),_(l,(()=>U(e,n,t)))},U=async(e,t,n)=>{const l=e.S,s=l["s-rc"];n&&(e=>{const t=e.R,n=e.S,l=t.$,s=k(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=s,n.classList.add(s+"-h"))})(e);A(e,t),s&&(s.map((e=>e())),l["s-rc"]=void 0);{const t=l["s-p"],n=()=>D(e);0===t.length?n():(Promise.all(t).then(n),e.$|=4,t.length=0)}},A=(e,l)=>{try{l=l.render(),e.$&=-17,e.$|=2,((e,l)=>{const s=e.S,o=e.R,i=e.I||u(null,null),c=(e=>e&&e.h===f)(l)?l:a(null,null,l);n=s.tagName,o.N&&(c.o=c.o||{},o.N.map((([e,t])=>c.o[t]=s[e]))),c.h=null,c.$|=4,e.I=c,c.p=i.p=s.shadowRoot||s,t=s["s-sc"],I(i,c)})(e,l)}catch(t){ie(t,e.S)}return null},D=e=>{const t=e.S,n=e.L,l=e.C;V(n,"componentDidRender"),64&e.$||(e.$|=64,z(t),V(n,"componentDidLoad"),e.W(t),l||q()),e.F(t),e.M&&(e.M(),e.M=void 0),512&e.$&&ve((()=>F(e,!1))),e.$&=-517},H=e=>{{const t=ne(e),n=t.S.isConnected;return n&&2==(18&t.$)&&F(t,!1),n}},q=()=>{z(fe.documentElement),ve((()=>b(ue,"appload",{detail:{namespace:"calcite"}})))},V=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){ie(e)}},_=(e,t)=>e&&e.then?e.then(t):t(),z=e=>e.setAttribute("calcite-hydrated",""),B=(e,t,n)=>{if(t.T){e.watchers&&(t.U=e.watchers);const l=Object.entries(t.T),s=e.prototype;if(l.map((([e,[l]])=>{31&l||2&n&&32&l?Object.defineProperty(s,e,{get(){return((e,t)=>ne(this).A.get(t))(0,e)},set(n){((e,t,n,l)=>{const s=ne(e),o=s.S,i=s.A.get(t),c=s.$,a=s.L;if(n=((e,t)=>null==e||r(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(n,l.T[t][0]),(!(8&c)||void 0===i)&&n!==i&&(!Number.isNaN(i)||!Number.isNaN(n))&&(s.A.set(t,n),a)){if(l.U&&128&c){const e=l.U[t];e&&e.map((e=>{try{a[e](n,i,t)}catch(e){ie(e,o)}}))}if(2==(18&c)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,i,t))return;F(s,!1)}}})(this,e,n,t)},configurable:!0,enumerable:!0}):1&n&&64&l&&Object.defineProperty(s,e,{value(...t){const n=ne(this);return n.D.then((()=>n.L[e](...t)))}})})),1&n){const n=new Map;s.attributeChangedCallback=function(e,t,l){$e.jmp((()=>{const t=n.get(e);if(this.hasOwnProperty(t))l=this[t],delete this[t];else if(s.hasOwnProperty(t)&&"number"==typeof this[t]&&this[t]==l)return;this[t]=(null!==l||"boolean"!=typeof this[t])&&l}))},e.observedAttributes=l.filter((([e,t])=>15&t[0])).map((([e,l])=>{const s=l[1]||e;return n.set(s,e),512&l[0]&&t.N.push([e,s]),s}))}}return e},G=e=>{V(e,"connectedCallback")},J=e=>{if(0==(1&$e.$)){const t=ne(e),n=t.R,l=()=>{};if(1&t.$)X(e,t,n.H),G(t.L);else{let l;if(t.$|=1,l=e.getAttribute("s-id"),l){if(1&n.$){const t=k(e.shadowRoot,n);e.classList.remove(t+"-h",t+"-s")}((e,t,n,l)=>{const s=e.shadowRoot,o=[],i=s?[]:null,c=l.I=u(t,null);$e.q||p(fe.body,$e.q=new Map),e["s-id"]=n,e.removeAttribute("s-id"),y(c,o,[],i,e,e,n),o.map((e=>{const n=e.g+"."+e.v,l=$e.q.get(n),o=e.p;l&&de&&""===l["s-en"]&&l.parentNode.insertBefore(o,l.nextSibling),s||(o["s-hn"]=t,l&&(o["s-ol"]=l,o["s-ol"]["s-nr"]=o)),$e.q.delete(n)})),s&&i.map((e=>{e&&s.appendChild(e)}))})(e,n.O,l,t)}{let n=e;for(;n=n.parentNode||n.host;)if(1===n.nodeType&&n.hasAttribute("s-id")&&n["s-p"]||n["s-p"]){W(t,t.C=n);break}}n.T&&Object.entries(n.T).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n,l,s)=>{if(0==(32&t.$)){{if(t.$|=32,(s=re(n)).then){const e=()=>{};s=await s,e()}s.isProxied||(n.U=s.watchers,B(s,n,2),s.isProxied=!0);const e=()=>{};t.$|=8;try{new s(t)}catch(e){ie(e)}t.$&=-9,t.$|=128,e(),G(t.L)}if(s.style){let e=s.style;const t=j(n);if(!ae.has(t)){const l=()=>{};v(t,e,!!(1&n.$)),l()}}}const o=t.C,i=()=>F(t,!0);o&&o["s-rc"]?o["s-rc"].push(i):i()})(0,t,n)}l()}},K=(e,t={})=>{const n=[],l=t.exclude||[],s=ue.customElements,o=fe.head,i=o.querySelector("meta[charset]"),c=fe.createElement("style"),r=[],a=fe.querySelectorAll("[sty-id]");let u,f=!0,$=0;for(Object.assign($e,t),$e.t=new URL(t.resourcesUrl||"./",fe.baseURI).href,$e.$|=2;$<a.length;$++)v(a[$].getAttribute("sty-id"),S(a[$].innerHTML),!0);e.map((e=>{e[1].map((t=>{const o={$:t[0],O:t[1],T:t[2],H:t[3]};o.T=t[2],o.H=t[3],o.N=[],o.U={};const i=o.O,c=class extends HTMLElement{constructor(e){super(e),se(e=this,o),1&o.$&&e.attachShadow({mode:"open"})}connectedCallback(){u&&(clearTimeout(u),u=null),f?r.push(this):$e.jmp((()=>J(this)))}disconnectedCallback(){$e.jmp((()=>(()=>{if(0==(1&$e.$)){const e=ne(this),t=e.L;e.V&&(e.V.map((e=>e())),e.V=void 0),V(t,"disconnectedCallback")}})()))}componentOnReady(){return ne(this)._}};o.B=e[0],l.includes(i)||s.get(i)||(n.push(i),s.define(i,B(c,o,1)))}))})),c.innerHTML=n+"{visibility:hidden}[calcite-hydrated]{visibility:inherit}",c.setAttribute("data-styles",""),o.insertBefore(c,i?i.nextSibling:o.firstChild),f=!1,r.length?r.map((e=>e.connectedCallback())):$e.jmp((()=>u=setTimeout(q,30)))},Q=(e,t)=>t,X=(e,t,n)=>{n&&n.map((([n,l,s])=>{const o=Z(e,n),i=Y(t,s),c=ee(n);$e.ael(o,l,i,c),(t.V=t.V||[]).push((()=>$e.rel(o,l,i,c)))}))},Y=(e,t)=>n=>{try{256&e.$?e.L[t](n):(e.P=e.P||[]).push([t,n])}catch(e){ie(e)}},Z=(e,t)=>4&t?fe:8&t?ue:16&t?fe.body:e,ee=e=>0!=(2&e),te=new WeakMap,ne=e=>te.get(e),le=(e,t)=>te.set(t.L=e,t),se=(e,t)=>{const n={$:0,S:e,R:t,A:new Map};return n.D=new Promise((e=>n.F=e)),n._=new Promise((e=>n.W=e)),e["s-p"]=[],e["s-rc"]=[],X(e,n,t.H),te.set(e,n)},oe=(e,t)=>t in e,ie=(e,t)=>(0,console.error)(e,t),ce=new Map,re=e=>{const t=e.O.replace(/-/g,"_"),n=e.B,l=ce.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(ce.set(n,e),e[t])),ie)
|
|
7
7
|
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/},ae=new Map,ue="undefined"!=typeof window?window:{},fe=ue.document||{head:{}},$e={$:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},de=!0,he=e=>Promise.resolve(e),ye=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),pe=[],me=[],we=(e,t)=>n=>{e.push(n),s||(s=!0,t&&4&$e.$?ve(ge):$e.raf(ge))},be=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){ie(e)}e.length=0},ge=()=>{be(pe),be(me),(s=pe.length>0)&&$e.raf(ge)},ve=e=>he().then(e),ke=we(me,!0);export{Q as F,f as H,e as N,o as a,K as b,w as c,fe as d,H as f,m as g,a as h,he as p,le as r}
|
|
@@ -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.609
|
|
5
5
|
*/
|
|
6
|
-
import{C as n}from"./p-
|
|
6
|
+
import{C as n}from"./p-121b14f1.js";import{g as t}from"./p-f5023aea.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.609
|
|
5
5
|
*/
|
|
6
|
-
import{a as n}from"./p-
|
|
6
|
+
import{a as n}from"./p-a25a17b0.js";import{n as t,g as e}from"./p-be2ec1e1.js";function a(n,t,e){const a=n.getTime(),r=!(t instanceof Date)||a>=t.getTime(),s=!(e instanceof Date)||a<=e.getTime();return r&&s}function r(n,t,e){if(!(n instanceof Date))return null;const a=n.getTime(),r=t instanceof Date&&a<t.getTime(),s=e instanceof Date&&a>e.getTime();return r?t:s?e:n}function s(n,t=!1){if(n instanceof Date)return n;if(!n||"string"!=typeof n)return null;const e=n.split(/[: T-]/).map(parseFloat),a=new Date(e[0],(e[1]||1)-1,e[2]||1);if(a.setFullYear(e[0]),isNaN(a.getTime()))throw new Error(`Invalid ISO 8601 date: "${n}"`);return t?l(a):a}function o(n){return"string"==typeof n?n:n instanceof Date?new Date(n.getTime()-6e4*n.getTimezoneOffset()).toISOString().split("T")[0]:""}function i(n,t){return n instanceof Date&&t instanceof Date&&n.getDate()===t.getDate()&&n.getMonth()===t.getMonth()&&n.getFullYear()===t.getFullYear()}function c(n){const t=n.getMonth(),e=new Date(n);return e.setMonth(t-1),t===e.getMonth()?new Date(n.getFullYear(),t,0):e}function f(n){const t=n.getMonth(),e=new Date(n);return e.setMonth(t+1),(t+2)%7==e.getMonth()%7?new Date(n.getFullYear(),t+2,0):e}function u(n,e){const{separator:a,unitOrder:r}=e,s=p(r),o=n.split(a).map((n=>t.delocalize(n)));return{day:parseInt(o[s.indexOf("d")]),month:parseInt(o[s.indexOf("m")])-1,year:parseInt(o[s.indexOf("y")])}}function p(n){const t=n.toLowerCase();return["d","m","y"].sort(((n,e)=>t.indexOf(n)-t.indexOf(e)))}function D(n,t){return(n.getTime()-t.getTime())/864e5}function l(n){return n.setHours(23,59,59,999),n}const d={},h={};async function m(t){const a=e(t);if(d[a])return d[a];h[a]||(h[a]=fetch(n(`./assets/date-picker/nls/${a}.json`)).then((n=>n.json())).catch((()=>(console.error(`Translations for "${a}" not found or invalid, falling back to english`),m("en")))));const r=await h[a];return d[a]=r,r}function w(n){return n.map(((n,t)=>s(n,1===t)))}const y=2,g={nextMonth:"Next month",prevMonth:"Previous month",year:"Year"};export{y as H,g as T,s as a,r as b,m as c,o as d,i as e,D as f,w as g,p as h,a as i,c as j,f as n,u as p,l as s}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.609
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,H as a,g as n,F as o}from"./p-724ffb2b.js";import{g as s}from"./p-534d76ec.js";import{n as r,a as c,m as l,e as d,t as h}from"./p-331f03ef.js";import{c as b}from"./p-befa72be.js";import{u as m}from"./p-ff2616f4.js";import"./p-2e91306b.js";const p=class{constructor(e){t(this,e),this.calciteInternalTabRegister=i(this,"calciteInternalTabRegister",6),this.active=!1,this.selected=!1,this.scale="m",this.guid=`calcite-tab-title-${s()}`}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t}render(){return e(a,{"aria-labelledby":this.labeledBy,id:this.el.id||this.guid},e("div",{class:"container",role:"tabpanel",tabIndex:this.selected?0:-1},e("section",null,e("slot",null))))}connectedCallback(){this.parentTabsEl=this.el.closest("calcite-tabs");const t=this.selected||this.active;t&&(this.activeHandler(t),this.selectedHandler(t))}componentDidLoad(){this.calciteInternalTabRegister.emit()}componentWillRender(){var t;this.scale=null===(t=this.parentTabsEl)||void 0===t?void 0:t.scale}disconnectedCallback(){var t;null===(t=document.body)||void 0===t||t.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((i=>{this.selected=i===t.detail.tab})),t.stopPropagation())}async getTabIndex(){return Array.prototype.indexOf.call(r(this.el.parentElement.children).filter((t=>t.matches("calcite-tab"))),this.el)}async updateAriaInfo(t=[],i=[]){this.labeledBy=i[t.indexOf(this.el.id)]||null}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"]}}};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([selected]) section,:host([selected]) .container{display:block}:host{display:none;block-size:100%;inline-size:100%}:host([selected]){display:block;block-size:100%;inline-size:100%;overflow:auto}section,.container{display:none;block-size:100%;inline-size:100%}:host([scale=s]){padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}";const u=class{constructor(e){t(this,e),this.calciteTabChange=i(this,"calciteTabChange",6),this.calciteInternalTabChange=i(this,"calciteInternalTabChange",6),this.scale="m",this.layout="inline",this.position="bottom",this.bordered=!1,this.animationActiveDuration=.3,this.resizeObserver=b("resize",(()=>{this.activeIndicatorEl.style.transitionDuration="0s",this.updateActiveWidth(),this.updateOffsetPosition()})),this.handleContainerScroll=()=>{this.activeIndicatorEl.style.transitionDuration="0s",this.updateOffsetPosition()}}async selectedTabChanged(){localStorage&&this.storageId&&null!=this.selectedTab&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTab)),this.calciteInternalTabChange.emit({tab:this.selectedTab}),this.selectedTabEl=await this.getTabTitleById(this.selectedTab)}selectedTabElChanged(){this.updateOffsetPosition(),this.updateActiveWidth(),this.activeIndicatorEl.style.transitionDuration=`${this.animationActiveDuration}s`}connectedCallback(){var t;this.parentTabsEl=this.el.closest("calcite-tabs"),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}componentWillLoad(){const t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){const i=JSON.parse(localStorage.getItem(t));this.selectedTab=i}}componentWillRender(){const{parentTabsEl:t}=this;this.layout=null==t?void 0:t.layout,this.position=null==t?void 0:t.position,this.scale=null==t?void 0:t.scale,this.bordered=null==t?void 0:t.bordered,this.selectedTabEl&&this.updateOffsetPosition()}componentDidRender(){this.tabTitles.length&&this.tabTitles.every((t=>!t.active))&&!this.selectedTab&&this.tabTitles[0].getTabIdentifier().then((t=>{this.calciteInternalTabChange.emit({tab:t})}))}render(){const t=c(this.el),i=`${this.indicatorWidth}px`,n=`${this.indicatorOffset}px`;return e(a,{role:"tablist"},e("div",{class:"tab-nav",onScroll:this.handleContainerScroll,ref:t=>this.tabNavEl=t},e("div",{class:"tab-nav-active-indicator-container",ref:t=>this.activeIndicatorContainerEl=t},e("div",{class:"tab-nav-active-indicator",ref:t=>this.activeIndicatorEl=t,style:"rtl"!==t?{width:i,left:n}:{width:i,right:n}})),e("slot",null)))}focusPreviousTabHandler(t){const i=this.getIndexOfTabTitle(t.target,this.enabledTabTitles),e=this.enabledTabTitles[i-1]||this.enabledTabTitles[this.enabledTabTitles.length-1];null==e||e.focus(),t.stopPropagation(),t.preventDefault()}focusNextTabHandler(t){const i=this.getIndexOfTabTitle(t.target,this.enabledTabTitles),e=this.enabledTabTitles[i+1]||this.enabledTabTitles[0];null==e||e.focus(),t.stopPropagation(),t.preventDefault()}internalActivateTabHandler(t){this.selectedTab=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(t.target),t.stopPropagation(),t.preventDefault()}activateTabHandler(t){this.calciteTabChange.emit({tab:this.selectedTab}),t.stopPropagation(),t.preventDefault()}updateTabTitles(t){t.target.active&&(this.selectedTab=t.detail)}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTab!==t.detail.tab&&(this.selectedTab=t.detail.tab),t.stopPropagation()}iconStartChangeHandler(){this.updateActiveWidth()}updateOffsetPosition(){var t,i,e,a,n;const o=c(this.el),s=null===(t=this.activeIndicatorContainerEl)||void 0===t?void 0:t.offsetWidth,r=null===(i=this.selectedTabEl)||void 0===i?void 0:i.offsetLeft,l=null===(e=this.selectedTabEl)||void 0===e?void 0:e.offsetWidth;this.indicatorOffset="rtl"!==o?r-(null===(a=this.tabNavEl)||void 0===a?void 0:a.scrollLeft):s-(r+l)+(null===(n=this.tabNavEl)||void 0===n?void 0:n.scrollLeft)}updateActiveWidth(){var t;this.indicatorWidth=null===(t=this.selectedTabEl)||void 0===t?void 0:t.offsetWidth}getIndexOfTabTitle(t,i=this.tabTitles){return i.indexOf(t)}async getTabTitleById(t){return Promise.all(this.tabTitles.map((t=>t.getTabIdentifier()))).then((i=>this.tabTitles[i.indexOf(t)]))}get tabTitles(){return l(this.el,"calcite-tab-title")}get enabledTabTitles(){return l(this.el,"calcite-tab-title:not([disabled])")}get el(){return n(this)}static get watchers(){return{selectedTab:["selectedTabChanged"],selectedTabEl:["selectedTabElChanged"]}}};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{position:relative;display:flex}:host([scale=s]){min-block-size:1.5rem}:host([scale=m]){min-block-size:2rem}:host([scale=l]){min-block-size:2.75rem}.tab-nav{display:flex;inline-size:100%;justify-content:flex-start;overflow:auto}.tab-nav-active-indicator-container{position:absolute;inset-inline:0px;inset-block-end:0px;block-size:0.125rem;inline-size:100%;overflow:hidden}.tab-nav-active-indicator{position:absolute;inset-block-end:0px;display:block;block-size:0.125rem;background-color:var(--calcite-ui-brand);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}:host([position=below]) .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host([position=bottom]) .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host([position=below]) .tab-nav-active-indicator-container{inset-block-start:0px;inset-block-end:unset}:host([position=bottom]) .tab-nav-active-indicator-container{inset-block-end:unset;inset-block-start:0px}:host([bordered]) .tab-nav-active-indicator-container{inset-block-end:unset}:host([bordered][position=below]) .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}:host([bordered][position=bottom]) .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}@media (forced-colors: active){.tab-nav-active-indicator{background-color:highlight}}";const f=class{constructor(e){t(this,e),this.calciteTabsActivate=i(this,"calciteTabsActivate",6),this.calciteInternalTabsActivate=i(this,"calciteInternalTabsActivate",6),this.calciteInternalTabsFocusNext=i(this,"calciteInternalTabsFocusNext",6),this.calciteInternalTabsFocusPrevious=i(this,"calciteInternalTabsFocusPrevious",6),this.calciteInternalTabTitleRegister=i(this,"calciteInternalTabTitleRegister",6),this.calciteInternalTabIconChanged=i(this,"calciteInternalTabIconChanged",6),this.active=!1,this.selected=!1,this.disabled=!1,this.bordered=!1,this.mutationObserver=b("mutation",(()=>this.updateHasText())),this.hasText=!1,this.resizeObserver=b("resize",(()=>{this.calciteInternalTabIconChanged.emit()})),this.guid=`calcite-tab-title-${s()}`}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t,this.selected&&this.emitActiveTab(!1)}connectedCallback(){const{selected:t,active:i}=this;t?this.active=t:i&&this.activeHandler(i),this.setupTextContentObserver(),this.parentTabNavEl=this.el.closest("calcite-tab-nav"),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){var t,i,e;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=document.body)||void 0===i||i.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}componentWillLoad(){this.updateHasText(),this.tab&&this.selected&&this.emitActiveTab(!1)}componentWillRender(){this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.position=this.parentTabsEl.position,this.scale=this.parentTabsEl.scale,this.bordered=this.parentTabsEl.bordered),!this.parentTabsEl&&this.parentTabNavEl&&(this.position=d(this.parentTabNavEl,"position",this.position),this.scale=d(this.parentTabNavEl,"scale",this.scale))}render(){const t=this.el.id||this.guid,i=e("calcite-icon",{class:"calcite-tab-title--icon icon-start",flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"s"}),n=e("calcite-icon",{class:"calcite-tab-title--icon icon-end",flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"s"});return e(a,{"aria-controls":this.controls,"aria-selected":h(this.selected),id:t,role:"tab",tabIndex:this.selected?0:-1},e("div",{class:{container:!0,"container--has-text":this.hasText},ref:t=>{var i;return null===(i=this.resizeObserver)||void 0===i?void 0:i.observe(t)}},this.iconStart?i:null,e("slot",null),this.iconEnd?n:null))}async componentDidLoad(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}componentDidRender(){m(this,(()=>this.selected))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((i=>{this.selected=i===t.detail.tab})),t.stopPropagation())}onClick(){this.emitActiveTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":this.emitActiveTab(),t.preventDefault();break;case"ArrowRight":t.preventDefault(),"ltr"===c(this.el)?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),"ltr"===c(this.el)?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit()}}async getTabIndex(){return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-tab-title"),this.el)}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}emitActiveTab(t=!0){if(this.disabled)return;const i={tab:this.tab};this.calciteInternalTabsActivate.emit(i),t&&this.calciteTabsActivate.emit(i)}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"]}}};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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block;flex:0 1 auto;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px;margin-inline-end:1.25rem}:host([layout=center]){margin-block:0px;margin-inline:1.25rem;text-align:center;flex-basis:12rem;margin:auto}:host([position=below]) .container{border-block-end-width:0px;border-block-start-width:2px;border-block-start-color:transparent;border-block-start-style:solid}:host([position=bottom]) .container{border-block-end-width:0px;border-block-start-width:2px;border-block-start-color:transparent;border-block-start-style:solid}:host .container{outline-color:transparent}:host(:focus) .container{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host(:active) a,:host(:focus) a,:host(:hover) a{border-color:var(--calcite-ui-border-2);color:var(--calcite-ui-text-1);text-decoration-line:none}:host([selected]) .container{border-color:transparent;color:var(--calcite-ui-text-1)}:host([disabled]) .container{pointer-events:none;opacity:0.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){margin-inline-end:1rem}:host([scale=s]) .container{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .container{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){margin-inline-end:1.5rem}:host([scale=l]) .container{padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}.container{box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-appearance:none;appearance:none;justify-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end-width:2px;padding-inline:0px;padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-3);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end-color:transparent;border-block-end-style:solid}.calcite-tab-title--icon{position:relative;margin:0px;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.container--has-text{padding:0.25rem}.container--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:0.5rem}.container--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:0.5rem}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:0.5rem}:host([bordered]){margin-inline-end:0}:host([bordered][selected]){box-shadow:inset 0px -2px var(--calcite-ui-foreground-1)}:host([bordered][selected][position=below]){box-shadow:inset 0 2px 0 var(--calcite-ui-foreground-1)}:host([bordered][selected][position=bottom]){box-shadow:inset 0 2px 0 var(--calcite-ui-foreground-1)}:host([bordered]:hover) .container,:host([bordered]:focus) .container,:host([bordered]:active) .container{position:relative}:host([bordered]:hover) .container{background-color:var(--calcite-button-transparent-hover)}:host([bordered]) .container{border-block-end-style:unset;border-inline-start:1px solid transparent;border-inline-end:1px solid transparent}:host([bordered][position=below]) .container{border-block-start-style:unset}:host([bordered][position=bottom]) .container{border-block-start-style:unset}:host([selected][bordered]) .container{border-inline-start-color:var(--calcite-ui-border-1);border-inline-end-color:var(--calcite-ui-border-1)}:host([bordered]) .container{padding-inline:0.75rem}:host([bordered][scale=s]) .container{padding-inline:0.5rem}:host([bordered][scale=l]) .container{padding-inline:1rem}@media (forced-colors: active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered]) .container{border-block-end-style:solid}:host([bordered][position=below]) .container{border-block-start-style:solid}:host([bordered][position=bottom]) .container{border-block-start-style:solid}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][position=below][selected]) .container{border-block-start-style:none}:host([bordered][position=bottom][selected]) .container{border-block-start-style:none}}";const v=class{constructor(i){t(this,i),this.layout="inline",this.position="top",this.scale="m",this.bordered=!1,this.titles=[],this.tabs=[]}connectedCallback(){"center"===this.layout&&(this.bordered=!1)}render(){return e(o,null,e("slot",{name:"tab-nav"}),e("section",null,e("slot",null)))}calciteInternalTabTitleRegister(t){this.titles=[...this.titles,t.target],this.registryHandler(),t.stopPropagation()}calciteTabTitleUnregister(t){this.titles=this.titles.filter((i=>i!==t.detail)),this.registryHandler(),t.stopPropagation()}calciteInternalTabRegister(t){this.tabs=[...this.tabs,t.target],this.registryHandler(),t.stopPropagation()}calciteTabUnregister(t){this.tabs=this.tabs.filter((i=>i!==t.detail)),this.registryHandler(),t.stopPropagation()}async registryHandler(){let t,i;if(this.tabs.some((t=>t.tab))||this.titles.some((t=>t.tab)))t=this.tabs.sort(((t,i)=>t.tab.localeCompare(i.tab))).map((t=>t.id)),i=this.titles.sort(((t,i)=>t.tab.localeCompare(i.tab))).map((t=>t.id));else{const e=await Promise.all(this.tabs.map((t=>t.getTabIndex()))),a=await Promise.all(this.titles.map((t=>t.getTabIndex())));t=e.reduce(((t,i,e)=>(t[i]=this.tabs[e].id,t)),[]),i=a.reduce(((t,i,e)=>(t[i]=this.titles[e].id,t)),[])}this.tabs.forEach((e=>e.updateAriaInfo(t,i))),this.titles.forEach((e=>e.updateAriaInfo(t,i)))}get el(){return n(this)}};v.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex;flex-direction:column}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1);background-color:var(--calcite-ui-foreground-1)}:host([bordered]:not([position=below])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered][position=below]) ::slotted(calcite-tab-nav){margin-block-start:-1px}:host([bordered][position=below]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1), inset 0 -1px 0 var(--calcite-ui-border-1)}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1), inset 0 -1px 0 var(--calcite-ui-border-1)}:host([bordered]) section{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1)}:host([bordered][scale=s]) section{padding:0.75rem}:host([bordered][scale=m]) section{padding:0.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=below]){flex-direction:column-reverse}:host([position=bottom]){flex-direction:column-reverse}section{display:flex;flex-grow:1;overflow:hidden;border-block-start-width:1px;border-block-start-color:var(--calcite-ui-border-1);border-block-start-style:solid}:host([position=below]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-ui-border-1)}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-ui-border-1)}:host([position=below]:not([bordered])) section{border-block-end-style:solid}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid}@media (forced-colors: active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=below][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}";export{p as calcite_tab,u as calcite_tab_nav,f as calcite_tab_title,v as calcite_tabs}
|
|
6
|
+
import{r as t,c as i,h as e,H as a,g as n,F as o}from"./p-a25a17b0.js";import{g as s}from"./p-f5023aea.js";import{n as r,a as c,m as l,e as d,t as h}from"./p-a49228cd.js";import{c as b}from"./p-b874cfdf.js";import{u as m}from"./p-971cc677.js";import"./p-121b14f1.js";const p=class{constructor(e){t(this,e),this.calciteInternalTabRegister=i(this,"calciteInternalTabRegister",6),this.active=!1,this.selected=!1,this.scale="m",this.guid=`calcite-tab-title-${s()}`}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t}render(){return e(a,{"aria-labelledby":this.labeledBy,id:this.el.id||this.guid},e("div",{class:"container",role:"tabpanel",tabIndex:this.selected?0:-1},e("section",null,e("slot",null))))}connectedCallback(){this.parentTabsEl=this.el.closest("calcite-tabs");const t=this.selected||this.active;t&&(this.activeHandler(t),this.selectedHandler(t))}componentDidLoad(){this.calciteInternalTabRegister.emit()}componentWillRender(){var t;this.scale=null===(t=this.parentTabsEl)||void 0===t?void 0:t.scale}disconnectedCallback(){var t;null===(t=document.body)||void 0===t||t.dispatchEvent(new CustomEvent("calciteTabUnregister",{detail:this.el}))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((i=>{this.selected=i===t.detail.tab})),t.stopPropagation())}async getTabIndex(){return Array.prototype.indexOf.call(r(this.el.parentElement.children).filter((t=>t.matches("calcite-tab"))),this.el)}async updateAriaInfo(t=[],i=[]){this.labeledBy=i[t.indexOf(this.el.id)]||null}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"]}}};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([selected]) section,:host([selected]) .container{display:block}:host{display:none;block-size:100%;inline-size:100%}:host([selected]){display:block;block-size:100%;inline-size:100%;overflow:auto}section,.container{display:none;block-size:100%;inline-size:100%}:host([scale=s]){padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}";const u=class{constructor(e){t(this,e),this.calciteTabChange=i(this,"calciteTabChange",6),this.calciteInternalTabChange=i(this,"calciteInternalTabChange",6),this.scale="m",this.layout="inline",this.position="bottom",this.bordered=!1,this.animationActiveDuration=.3,this.resizeObserver=b("resize",(()=>{this.activeIndicatorEl.style.transitionDuration="0s",this.updateActiveWidth(),this.updateOffsetPosition()})),this.handleContainerScroll=()=>{this.activeIndicatorEl.style.transitionDuration="0s",this.updateOffsetPosition()}}async selectedTabChanged(){localStorage&&this.storageId&&null!=this.selectedTab&&localStorage.setItem(`calcite-tab-nav-${this.storageId}`,JSON.stringify(this.selectedTab)),this.calciteInternalTabChange.emit({tab:this.selectedTab}),this.selectedTabEl=await this.getTabTitleById(this.selectedTab)}selectedTabElChanged(){this.updateOffsetPosition(),this.updateActiveWidth(),this.activeIndicatorEl.style.transitionDuration=`${this.animationActiveDuration}s`}connectedCallback(){var t;this.parentTabsEl=this.el.closest("calcite-tabs"),null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}componentWillLoad(){const t=`calcite-tab-nav-${this.storageId}`;if(localStorage&&this.storageId&&localStorage.getItem(t)){const i=JSON.parse(localStorage.getItem(t));this.selectedTab=i}}componentWillRender(){const{parentTabsEl:t}=this;this.layout=null==t?void 0:t.layout,this.position=null==t?void 0:t.position,this.scale=null==t?void 0:t.scale,this.bordered=null==t?void 0:t.bordered,this.selectedTabEl&&this.updateOffsetPosition()}componentDidRender(){this.tabTitles.length&&this.tabTitles.every((t=>!t.active))&&!this.selectedTab&&this.tabTitles[0].getTabIdentifier().then((t=>{this.calciteInternalTabChange.emit({tab:t})}))}render(){const t=c(this.el),i=`${this.indicatorWidth}px`,n=`${this.indicatorOffset}px`;return e(a,{role:"tablist"},e("div",{class:"tab-nav",onScroll:this.handleContainerScroll,ref:t=>this.tabNavEl=t},e("div",{class:"tab-nav-active-indicator-container",ref:t=>this.activeIndicatorContainerEl=t},e("div",{class:"tab-nav-active-indicator",ref:t=>this.activeIndicatorEl=t,style:"rtl"!==t?{width:i,left:n}:{width:i,right:n}})),e("slot",null)))}focusPreviousTabHandler(t){const i=this.getIndexOfTabTitle(t.target,this.enabledTabTitles),e=this.enabledTabTitles[i-1]||this.enabledTabTitles[this.enabledTabTitles.length-1];null==e||e.focus(),t.stopPropagation(),t.preventDefault()}focusNextTabHandler(t){const i=this.getIndexOfTabTitle(t.target,this.enabledTabTitles),e=this.enabledTabTitles[i+1]||this.enabledTabTitles[0];null==e||e.focus(),t.stopPropagation(),t.preventDefault()}internalActivateTabHandler(t){this.selectedTab=t.detail.tab?t.detail.tab:this.getIndexOfTabTitle(t.target),t.stopPropagation(),t.preventDefault()}activateTabHandler(t){this.calciteTabChange.emit({tab:this.selectedTab}),t.stopPropagation(),t.preventDefault()}updateTabTitles(t){t.target.active&&(this.selectedTab=t.detail)}globalInternalTabChangeHandler(t){this.syncId&&t.target!==this.el&&t.target.syncId===this.syncId&&this.selectedTab!==t.detail.tab&&(this.selectedTab=t.detail.tab),t.stopPropagation()}iconStartChangeHandler(){this.updateActiveWidth()}updateOffsetPosition(){var t,i,e,a,n;const o=c(this.el),s=null===(t=this.activeIndicatorContainerEl)||void 0===t?void 0:t.offsetWidth,r=null===(i=this.selectedTabEl)||void 0===i?void 0:i.offsetLeft,l=null===(e=this.selectedTabEl)||void 0===e?void 0:e.offsetWidth;this.indicatorOffset="rtl"!==o?r-(null===(a=this.tabNavEl)||void 0===a?void 0:a.scrollLeft):s-(r+l)+(null===(n=this.tabNavEl)||void 0===n?void 0:n.scrollLeft)}updateActiveWidth(){var t;this.indicatorWidth=null===(t=this.selectedTabEl)||void 0===t?void 0:t.offsetWidth}getIndexOfTabTitle(t,i=this.tabTitles){return i.indexOf(t)}async getTabTitleById(t){return Promise.all(this.tabTitles.map((t=>t.getTabIdentifier()))).then((i=>this.tabTitles[i.indexOf(t)]))}get tabTitles(){return l(this.el,"calcite-tab-title")}get enabledTabTitles(){return l(this.el,"calcite-tab-title:not([disabled])")}get el(){return n(this)}static get watchers(){return{selectedTab:["selectedTabChanged"],selectedTabEl:["selectedTabElChanged"]}}};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{position:relative;display:flex}:host([scale=s]){min-block-size:1.5rem}:host([scale=m]){min-block-size:2rem}:host([scale=l]){min-block-size:2.75rem}.tab-nav{display:flex;inline-size:100%;justify-content:flex-start;overflow:auto}.tab-nav-active-indicator-container{position:absolute;inset-inline:0px;inset-block-end:0px;block-size:0.125rem;inline-size:100%;overflow:hidden}.tab-nav-active-indicator{position:absolute;inset-block-end:0px;display:block;block-size:0.125rem;background-color:var(--calcite-ui-brand);transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}:host([position=below]) .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host([position=bottom]) .tab-nav-active-indicator{inset-block-end:unset;inset-block-start:0px}:host([position=below]) .tab-nav-active-indicator-container{inset-block-start:0px;inset-block-end:unset}:host([position=bottom]) .tab-nav-active-indicator-container{inset-block-end:unset;inset-block-start:0px}:host([bordered]) .tab-nav-active-indicator-container{inset-block-end:unset}:host([bordered][position=below]) .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}:host([bordered][position=bottom]) .tab-nav-active-indicator-container{inset-block-end:0;inset-block-start:unset}@media (forced-colors: active){.tab-nav-active-indicator{background-color:highlight}}";const v=class{constructor(e){t(this,e),this.calciteTabsActivate=i(this,"calciteTabsActivate",6),this.calciteInternalTabsActivate=i(this,"calciteInternalTabsActivate",6),this.calciteInternalTabsFocusNext=i(this,"calciteInternalTabsFocusNext",6),this.calciteInternalTabsFocusPrevious=i(this,"calciteInternalTabsFocusPrevious",6),this.calciteInternalTabTitleRegister=i(this,"calciteInternalTabTitleRegister",6),this.calciteInternalTabIconChanged=i(this,"calciteInternalTabIconChanged",6),this.active=!1,this.selected=!1,this.disabled=!1,this.bordered=!1,this.mutationObserver=b("mutation",(()=>this.updateHasText())),this.hasText=!1,this.resizeObserver=b("resize",(()=>{this.calciteInternalTabIconChanged.emit()})),this.guid=`calcite-tab-title-${s()}`}activeHandler(t){this.selected=t}selectedHandler(t){this.active=t,this.selected&&this.emitActiveTab(!1)}connectedCallback(){const{selected:t,active:i}=this;t?this.active=t:i&&this.activeHandler(i),this.setupTextContentObserver(),this.parentTabNavEl=this.el.closest("calcite-tab-nav"),this.parentTabsEl=this.el.closest("calcite-tabs")}disconnectedCallback(){var t,i,e;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=document.body)||void 0===i||i.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}componentWillLoad(){this.updateHasText(),this.tab&&this.selected&&this.emitActiveTab(!1)}componentWillRender(){this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.position=this.parentTabsEl.position,this.scale=this.parentTabsEl.scale,this.bordered=this.parentTabsEl.bordered),!this.parentTabsEl&&this.parentTabNavEl&&(this.position=d(this.parentTabNavEl,"position",this.position),this.scale=d(this.parentTabNavEl,"scale",this.scale))}render(){const t=this.el.id||this.guid,i=e("calcite-icon",{class:"calcite-tab-title--icon icon-start",flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"s"}),n=e("calcite-icon",{class:"calcite-tab-title--icon icon-end",flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"s"});return e(a,{"aria-controls":this.controls,"aria-selected":h(this.selected),id:t,role:"tab",tabIndex:this.selected?0:-1},e("div",{class:{container:!0,"container--has-text":this.hasText},ref:t=>{var i;return null===(i=this.resizeObserver)||void 0===i?void 0:i.observe(t)}},this.iconStart?i:null,e("slot",null),this.iconEnd?n:null))}async componentDidLoad(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}componentDidRender(){m(this,(()=>this.selected))}internalTabChangeHandler(t){t.composedPath().find((t=>"CALCITE-TABS"===t.tagName))===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then((i=>{this.selected=i===t.detail.tab})),t.stopPropagation())}onClick(){this.emitActiveTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":this.emitActiveTab(),t.preventDefault();break;case"ArrowRight":t.preventDefault(),"ltr"===c(this.el)?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),"ltr"===c(this.el)?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit()}}async getTabIndex(){return Array.prototype.indexOf.call(this.el.parentElement.querySelectorAll("calcite-tab-title"),this.el)}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}emitActiveTab(t=!0){if(this.disabled)return;const i={tab:this.tab};this.calciteInternalTabsActivate.emit(i),t&&this.calciteTabsActivate.emit(i)}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],selected:["selectedHandler"]}}};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}}: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:block;flex:0 1 auto;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px;margin-inline-end:1.25rem}:host([layout=center]){margin-block:0px;margin-inline:1.25rem;text-align:center;flex-basis:12rem;margin:auto}:host([position=below]) .container{border-block-end-width:0px;border-block-start-width:2px;border-block-start-color:transparent;border-block-start-style:solid}:host([position=bottom]) .container{border-block-end-width:0px;border-block-start-width:2px;border-block-start-color:transparent;border-block-start-style:solid}:host .container{outline-color:transparent}:host(:focus) .container{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host(:active) a,:host(:focus) a,:host(:hover) a{border-color:var(--calcite-ui-border-2);color:var(--calcite-ui-text-1);text-decoration-line:none}:host([selected]) .container{border-color:transparent;color:var(--calcite-ui-text-1)}:host([disabled]) .container{pointer-events:none;opacity:0.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){margin-inline-end:1rem}:host([scale=s]) .container{padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .container{padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){margin-inline-end:1.5rem}:host([scale=l]) .container{padding-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}.container{box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-appearance:none;appearance:none;justify-content:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-block-end-width:2px;padding-inline:0px;padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-3);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-block-end-color:transparent;border-block-end-style:solid}.calcite-tab-title--icon{position:relative;margin:0px;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.container--has-text{padding:0.25rem}.container--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:0.5rem}.container--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:0.5rem}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:0.5rem}:host([bordered]){margin-inline-end:0}:host([bordered][selected]){box-shadow:inset 0px -2px var(--calcite-ui-foreground-1)}:host([bordered][selected][position=below]){box-shadow:inset 0 2px 0 var(--calcite-ui-foreground-1)}:host([bordered][selected][position=bottom]){box-shadow:inset 0 2px 0 var(--calcite-ui-foreground-1)}:host([bordered]:hover) .container,:host([bordered]:focus) .container,:host([bordered]:active) .container{position:relative}:host([bordered]:hover) .container{background-color:var(--calcite-button-transparent-hover)}:host([bordered]) .container{border-block-end-style:unset;border-inline-start:1px solid transparent;border-inline-end:1px solid transparent}:host([bordered][position=below]) .container{border-block-start-style:unset}:host([bordered][position=bottom]) .container{border-block-start-style:unset}:host([selected][bordered]) .container{border-inline-start-color:var(--calcite-ui-border-1);border-inline-end-color:var(--calcite-ui-border-1)}:host([bordered]) .container{padding-inline:0.75rem}:host([bordered][scale=s]) .container{padding-inline:0.5rem}:host([bordered][scale=l]) .container{padding-inline:1rem}@media (forced-colors: active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered]) .container{border-block-end-style:solid}:host([bordered][position=below]) .container{border-block-start-style:solid}:host([bordered][position=bottom]) .container{border-block-start-style:solid}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][position=below][selected]) .container{border-block-start-style:none}:host([bordered][position=bottom][selected]) .container{border-block-start-style:none}}";const f=class{constructor(i){t(this,i),this.layout="inline",this.position="top",this.scale="m",this.bordered=!1,this.titles=[],this.tabs=[]}connectedCallback(){"center"===this.layout&&(this.bordered=!1)}render(){return e(o,null,e("slot",{name:"tab-nav"}),e("section",null,e("slot",null)))}calciteInternalTabTitleRegister(t){this.titles=[...this.titles,t.target],this.registryHandler(),t.stopPropagation()}calciteTabTitleUnregister(t){this.titles=this.titles.filter((i=>i!==t.detail)),this.registryHandler(),t.stopPropagation()}calciteInternalTabRegister(t){this.tabs=[...this.tabs,t.target],this.registryHandler(),t.stopPropagation()}calciteTabUnregister(t){this.tabs=this.tabs.filter((i=>i!==t.detail)),this.registryHandler(),t.stopPropagation()}async registryHandler(){let t,i;if(this.tabs.some((t=>t.tab))||this.titles.some((t=>t.tab)))t=this.tabs.sort(((t,i)=>t.tab.localeCompare(i.tab))).map((t=>t.id)),i=this.titles.sort(((t,i)=>t.tab.localeCompare(i.tab))).map((t=>t.id));else{const e=await Promise.all(this.tabs.map((t=>t.getTabIndex()))),a=await Promise.all(this.titles.map((t=>t.getTabIndex())));t=e.reduce(((t,i,e)=>(t[i]=this.tabs[e].id,t)),[]),i=a.reduce(((t,i,e)=>(t[i]=this.titles[e].id,t)),[])}this.tabs.forEach((e=>e.updateAriaInfo(t,i))),this.titles.forEach((e=>e.updateAriaInfo(t,i)))}get el(){return n(this)}};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:flex;flex-direction:column}:host([bordered]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1);background-color:var(--calcite-ui-foreground-1)}:host([bordered]:not([position=below])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered]:not([position=bottom])) ::slotted(calcite-tab-nav){margin-block-end:-1px}:host([bordered][position=below]) ::slotted(calcite-tab-nav){margin-block-start:-1px}:host([bordered][position=below]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1), inset 0 -1px 0 var(--calcite-ui-border-1)}:host([bordered][position=bottom]){box-shadow:inset 0 1px 0 var(--calcite-ui-border-1), inset 0 -1px 0 var(--calcite-ui-border-1)}:host([bordered]) section{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-1)}:host([bordered][scale=s]) section{padding:0.75rem}:host([bordered][scale=m]) section{padding:0.5rem}:host([bordered][scale=l]) section{padding:1rem}:host([position=below]){flex-direction:column-reverse}:host([position=bottom]){flex-direction:column-reverse}section{display:flex;flex-grow:1;overflow:hidden;border-block-start-width:1px;border-block-start-color:var(--calcite-ui-border-1);border-block-start-style:solid}:host([position=below]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-ui-border-1)}:host([position=bottom]) section{flex-direction:column-reverse;border-block-start-width:0px;border-block-end-width:1px;border-block-end-color:var(--calcite-ui-border-1)}:host([position=below]:not([bordered])) section{border-block-end-style:solid}:host([position=bottom]:not([bordered])) section{border-block-end-style:solid}@media (forced-colors: active){:host([bordered]) section{border-block-start-width:0px;border-block-end-width:1px}:host([position=below][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}:host([position=bottom][bordered]) section{border-block-start-width:1px;border-block-end-width:0px}}";export{p as calcite_tab,u as calcite_tab_nav,v as calcite_tab_title,f as calcite_tabs}
|
|
@@ -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.609
|
|
5
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}
|
|
6
|
+
import{r as t,c as i,h as e,H as n,g as s}from"./p-a25a17b0.js";import{g as a}from"./p-f5023aea.js";import{i as o,g as r,b as c,n as l,u as h,c as u,d}from"./p-be2ec1e1.js";import{c as m,d as p,g as f}from"./p-f0f2e72f.js";import{s as b,c as v,d as g,H as w}from"./p-6310c9ff.js";import{u as k}from"./p-971cc677.js";import{n as y,i as x}from"./p-56effd98.js";import"./p-b874cfdf.js";import"./p-a49228cd.js";import"./p-121b14f1.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}
|
|
@@ -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.609
|
|
5
|
+
*/
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as n}from"./p-a25a17b0.js";import{a as o}from"./p-a49228cd.js";import{S as l}from"./p-42581097.js";import{u as c}from"./p-971cc677.js";import"./p-121b14f1.js";import"./p-f5023aea.js";const s=class{constructor(a){t(this,a),this.calciteFlowItemBack=i(this,"calciteFlowItemBack",6),this.calciteFlowItemBackClick=i(this,"calciteFlowItemBackClick",6),this.calciteFlowItemScroll=i(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=i(this,"calciteFlowItemClose",6),this.closable=!1,this.closed=!1,this.disabled=!1,this.loading=!1,this.menuOpen=!1,this.showBackButton=!1,this.handlePanelScroll=t=>{t.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=t=>{t.stopPropagation(),this.calciteFlowItemClose.emit()},this.backButtonClick=()=>{this.calciteFlowItemBackClick.emit(),this.calciteFlowItemBack.emit()},this.setBackRef=t=>{this.backButtonEl=t},this.setContainerRef=t=>{this.containerEl=t},this.getBackLabel=()=>this.intlBack||"Back"}componentDidRender(){c(this)}async setFocus(){const{backButtonEl:t,containerEl:i}=this;t?t.setFocus():null==i||i.setFocus()}async scrollContentTo(t){var i;await(null===(i=this.containerEl)||void 0===i?void 0:i.scrollContentTo(t))}renderBackButton(){const{el:t}=this,i="rtl"===o(t),{showBackButton:e,backButtonClick:n}=this,l=this.getBackLabel();return e?a("calcite-action",{"aria-label":l,class:"back-button",icon:i?"chevron-right":"chevron-left",key:"flow-back-button",onClick:n,ref:this.setBackRef,scale:"s",slot:"header-actions-start",text:l}):null}render(){const{closable:t,closed:i,description:n,disabled:o,heading:c,headingLevel:s,heightScale:r,intlBack:d,intlClose:h,intlOptions:m,loading:u,menuOpen:p,widthScale:f,backButtonEl:b}=this,y=this.getBackLabel();return a(e,null,a("calcite-panel",{closable:t,closed:i,description:n,disabled:o,heading:c,headingLevel:s,heightScale:r,intlBack:d,intlClose:h,intlOptions:m,loading:u,menuOpen:p,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,ref:this.setContainerRef,widthScale:f},this.renderBackButton(),a("slot",{name:"header-actions-start",slot:l.headerActionsStart}),a("slot",{name:"header-actions-end",slot:l.headerActionsEnd}),a("slot",{name:"header-content",slot:l.headerContent}),a("slot",{name:"header-menu-actions",slot:l.headerMenuActions}),a("slot",{name:"fab",slot:l.fab}),a("slot",{name:"footer-actions",slot:l.footerActions}),a("slot",{name:"footer",slot:l.footer}),a("slot",null)),b?a("calcite-tooltip",{label:y,placement:"auto",referenceElement:b},y):null)}get el(){return n(this)}};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}}: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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}";export{s as calcite_flow_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.609
|
|
5
5
|
*/
|
|
6
6
|
function t(t,s,n){return new(function(t){class s extends window.MutationObserver{constructor(t){super(t),this.observedEntry=[],this.callback=t}observe(t,s){return this.observedEntry.push({target:t,options:s}),super.observe(t,s)}unobserve(t){const s=this.observedEntry.filter((s=>s.target!==t));this.observedEntry=[],this.callback(super.takeRecords(),this),this.disconnect(),s.forEach((t=>this.observe(t.target,t.options)))}}return"intersection"===t?window.IntersectionObserver:"mutation"===t?s:window.ResizeObserver}(t))(s,n)}export{t as c}
|
|
@@ -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.609
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,H as e,g as s}from"./p-724ffb2b.js";import{T as n,d as r,g as o,a as l,s as c,b as h,c as d,e as p,p as m,i as u}from"./p-c9c594e4.js";import{c as f,d as v,g}from"./p-b068d057.js";import{s as b,c as y,d as w,H as x}from"./p-f478e34c.js";import{d as k,f as D,c as C,u as z,r as I,a as P,F as A}from"./p-ecd9436e.js";import{u as j}from"./p-ff2616f4.js";import{t as R}from"./p-331f03ef.js";import{c as H,d as _}from"./p-0194be0b.js";import{n as O,c as E,d as F}from"./p-04cd97f0.js";import{n as B}from"./p-5a7d6abb.js";import"./p-a9c93bf7.js";import"./p-2e91306b.js";import"./p-534d76ec.js";import"./p-befa72be.js";const L=class{constructor(a){t(this,a),this.calciteDatePickerChange=i(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=i(this,"calciteDatePickerRangeChange",6),this.calciteInputDatePickerChange=i(this,"calciteInputDatePickerChange",6),this.calciteInputDatePickerBeforeClose=i(this,"calciteInputDatePickerBeforeClose",6),this.calciteInputDatePickerClose=i(this,"calciteInputDatePickerClose",6),this.calciteInputDatePickerBeforeOpen=i(this,"calciteInputDatePickerBeforeOpen",6),this.calciteInputDatePickerOpen=i(this,"calciteInputDatePickerOpen",6),this.disabled=!1,this.readOnly=!1,this.active=!1,this.open=!1,this.intlPrevMonth=n.prevMonth,this.intlNextMonth=n.nextMonth,this.intlYear=n.year,this.scale="m",this.placement=k,this.range=!1,this.required=!1,this.overlayPositioning="absolute",this.proximitySelectionDisabled=!1,this.layout="horizontal",this.effectiveLocale="",this.focusedInput="start",this.globalAttributes={},this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?D(i,t):null},this.setTransitionEl=t=>{this.transitionEl=t,H(this)},this.setStartInput=t=>{this.startInput=t},this.setEndInput=t=>{this.endInput=t},this.deactivate=()=>{this.open=!1},this.keyDownHandler=t=>{const{defaultPrevented:i,key:a}=t;"Enter"!==a||i?"Escape"!==a||i||(this.active=!1,this.open=!1,t.preventDefault()):b(this)&&t.preventDefault()},this.inputBlur=t=>{this.blur(t.currentTarget)},this.startInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="start"},this.endInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="end"},this.startInputInput=()=>{const t=this.parseNumerals(this.startInput.value),i=this.formatNumerals(t);this.startInput.value=i,this.input(t)},this.endInputInput=()=>{const t=this.parseNumerals(this.endInput.value),i=this.formatNumerals(t);this.endInput.value=i,this.input(t)},this.setFloatingEl=t=>{t&&(this.floatingEl=t,C(this,this.referenceEl,this.floatingEl))},this.setStartWrapper=t=>{this.startWrapper=t,this.setReferenceEl()},this.setEndWrapper=t=>{this.endWrapper=t,this.setReferenceEl()},this.handleDateChange=t=>{this.range||(this.value=r(t.detail))},this.handleDateRangeChange=t=>{var i,a;if(!this.range||!t.detail)return;const{startDate:e,endDate:s}=t.detail;this.start=r(e),this.end=r(s),this.value=[this.start,this.end],this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus())},this.commonDateSeparators=[".","-","/"],this.formatNumerals=t=>t?t.split("").map((t=>this.commonDateSeparators.includes(t)?this.localeData.separator:B.includes(t)?O.numberFormatter.format(Number(t)):t)).join(""):"",this.parseNumerals=t=>t?t.split("").map((t=>B.includes(t)?O.delocalize(t):t)).join(""):""}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueHandler(t){Array.isArray(t)?(this.valueAsDate=o(t),this.start=t[0],this.end=t[1]):t?(this.valueAsDate=l(t),this.start="",this.end=""):(this.valueAsDate=void 0,this.start=void 0,this.end=void 0)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){t&&(this.minAsDate=l(t))}onMaxChanged(t){t&&(this.maxAsDate=l(t))}activeHandler(t){this.open=t}openHandler(t){if(this.active=t,this.disabled||this.readOnly)return t||z(this.floatingEl),void(this.open=!1);t?this.reposition(!0):z(this.floatingEl)}overlayPositioningHandler(){this.reposition(!0)}handleDateOrRangeChange(){this.calciteInputDatePickerChange.emit()}calciteDaySelectHandler(){this.shouldFocusRangeStart()||this.shouldFocusRangeEnd()||(this.open=!1)}async setFocus(){var t;null===(t=this.startInput)||void 0===t||t.setFocus()}async reposition(t=!1){const{floatingEl:i,referenceEl:a,placement:e,overlayPositioning:s,filteredFlipPlacements:n}=this;return I(this,{floatingEl:i,referenceEl:a,overlayPositioning:s,placement:e,flipPlacements:n,type:"menu"},t)}connectedCallback(){E(this);const t=this.active||this.open;t&&this.activeHandler(t),t&&this.openHandler(t),Array.isArray(this.value)?(this.valueAsDate=o(this.value),this.start=this.value[0],this.end=this.value[1]):this.value&&(this.valueAsDate=l(this.value),this.start="",this.end=""),this.start&&(this.startAsDate=l(this.start)),this.end&&(this.endAsDate=c(l(this.end))),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),f(this),y(this),H(this),this.setFilteredPlacements(),this.reposition(!0),O.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}componentDidLoad(){this.reposition(!0)}disconnectedCallback(){v(this),w(this),P(this,this.referenceEl,this.floatingEl),_(this),F(this)}componentDidRender(){j(this)}render(){var t,i;const{disabled:s,readOnly:n}=this,r=h(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate),o=this.range?h(this.endAsDate,this.minAsDate,this.maxAsDate):null,l=o?this.formatNumerals(o.toLocaleDateString(this.effectiveLocale)):"",c=r?this.formatNumerals(r.toLocaleDateString(this.effectiveLocale)):"";return a(e,{onBlur:this.deactivate,onKeyDown:this.keyDownHandler,role:"application"},this.localeData&&a("div",{"aria-expanded":R(this.open),class:"input-container",role:"application"},a("div",{class:"input-wrapper",ref:this.setStartWrapper},a("calcite-input",{class:"input "+("vertical"===this.layout&&this.range?"no-bottom-border":""),disabled:s,icon:"calendar",label:g(this),lang:this.effectiveLocale,"number-button-type":"none",numberingSystem:this.numberingSystem,onCalciteInputInput:this.startInputInput,onCalciteInternalInputBlur:this.inputBlur,onCalciteInternalInputFocus:this.startInputFocus,placeholder:null===(t=this.localeData)||void 0===t?void 0:t.placeholder,readOnly:n,ref:this.setStartInput,scale:this.scale,type:"text",value:c})),a("div",{"aria-hidden":R(!this.open),class:{"menu-container":!0,"menu-container--active":this.open},ref:this.setFloatingEl},a("div",{class:{"calendar-picker-wrapper":!0,"calendar-picker-wrapper--end":"end"===this.focusedInput,[A.animation]:!0,[A.animationActive]:this.open},ref:this.setTransitionEl},a("calcite-date-picker",{activeRange:this.focusedInput,endAsDate:this.endAsDate,headingLevel:this.headingLevel,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,lang:this.effectiveLocale,max:this.max,maxAsDate:this.maxAsDate,min:this.min,minAsDate:this.minAsDate,numberingSystem:this.numberingSystem,onCalciteDatePickerChange:this.handleDateChange,onCalciteDatePickerRangeChange:this.handleDateRangeChange,proximitySelectionDisabled:this.proximitySelectionDisabled,range:this.range,scale:this.scale,startAsDate:this.startAsDate,tabIndex:0,valueAsDate:this.valueAsDate}))),this.range&&"horizontal"===this.layout&&a("div",{class:"horizontal-arrow-container"},a("calcite-icon",{flipRtl:!0,icon:"arrow-right",scale:"s"})),this.range&&"vertical"===this.layout&&"s"!==this.scale&&a("div",{class:"vertical-arrow-container"},a("calcite-icon",{icon:"arrow-down",scale:"s"})),this.range&&a("div",{class:"input-wrapper",ref:this.setEndWrapper},a("calcite-input",{class:{input:!0,"border-top-color-one":"vertical"===this.layout&&this.range},disabled:s,icon:"calendar",lang:this.effectiveLocale,"number-button-type":"none",numberingSystem:this.numberingSystem,onCalciteInputInput:this.endInputInput,onCalciteInternalInputBlur:this.inputBlur,onCalciteInternalInputFocus:this.endInputFocus,placeholder:null===(i=this.localeData)||void 0===i?void 0:i.placeholder,readOnly:n,ref:this.setEndInput,scale:this.scale,type:"text",value:l}))),a(x,{component:this}))}setReferenceEl(){const{focusedInput:t,layout:i,endWrapper:a,startWrapper:e}=this;this.referenceEl="end"===t||"vertical"===i?a||e:e||a,C(this,this.referenceEl,this.floatingEl)}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteInputDatePickerBeforeOpen.emit()}onOpen(){this.calciteInputDatePickerOpen.emit()}onBeforeClose(){this.calciteInputDatePickerBeforeClose.emit()}onClose(){this.calciteInputDatePickerClose.emit()}startWatcher(t){this.startAsDate=l(t)}endWatcher(t){this.endAsDate=t?c(l(t)):l(t)}async loadLocaleData(){this.localeData=await d(this.effectiveLocale)}clearCurrentValue(){if(!this.range)return"string"==typeof this.value&&this.value&&this.calciteDatePickerChange.emit(),void(this.value="");const{focusedInput:t}=this;"start"===t?(this.start&&this.calciteDatePickerRangeChange.emit(),this.value=Array.isArray(this.value)?["",this.value[1]||""]:[""],this.start=void 0):"end"===t&&(this.end&&this.calciteDatePickerRangeChange.emit(),this.value=Array.isArray(this.value)?[this.value[0]||"",""]:["",""],this.end=void 0)}input(t){const i=this.getDateFromInput(t);if(!i)return void this.clearCurrentValue();if(!this.range)return this.value=r(i),void this.calciteDatePickerChange.emit(i);const{focusedInput:a}=this;if("start"===a){if(!this.startAsDate||!p(i,this.startAsDate)){const t=r(i);this.value=Array.isArray(this.value)?[t,this.value[1]||""]:[t],this.start=t,this.calciteDatePickerRangeChange.emit({startDate:i,endDate:this.endAsDate})}}else if(!("end"!==a||this.endAsDate&&p(i,this.endAsDate))){const t=r(i);this.value=Array.isArray(this.value)?[this.value[0]||"",t]:["",t],this.end=t,this.calciteDatePickerRangeChange.emit({startDate:this.startAsDate,endDate:c(i)})}}blur(t){const{focusedInput:i,endAsDate:a,range:e,startAsDate:s,valueAsDate:n}=this,r=this.effectiveLocale;this.getDateFromInput(t.value)||(!e&&n?t.value=this.formatNumerals(Array.isArray(n)?n["end"===i?1:0].toLocaleDateString(r):n.toLocaleDateString(r)):"start"===i&&s?t.value=this.formatNumerals(s.toLocaleDateString(r)):"end"===i&&a&&(t.value=this.formatNumerals(a.toLocaleDateString(r))))}shouldFocusRangeStart(){return!(!this.endAsDate||this.startAsDate||"end"!==this.focusedInput||!this.startInput)}shouldFocusRangeEnd(){return!(!this.startAsDate||this.endAsDate||"start"!==this.focusedInput||!this.endInput)}getDateFromInput(t){if(!this.localeData)return!1;const{separator:i}=this.localeData,{day:a,month:e,year:s}=m(t,this.localeData),n=a>0,r=e>-1,o=new Date(s,e,a);o.setFullYear(s);const l=!isNaN(o.getTime()),c=t.split(i).filter((t=>t)).length>2,h=s.toString().length>0;return!!(n&&r&&l&&c&&h&&u(o,this.min,this.max))&&o}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],min:["onMinChanged"],max:["onMaxChanged"],active:["activeHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],layout:["setReferenceEl"],focusedInput:["setReferenceEl"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};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}}: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:inline-block;inline-size:100%;overflow:visible;vertical-align:top;--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 .menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host .menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}:host .menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}:host .menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}:host .menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.calendar-picker-wrapper{position:static;inline-size:100%;--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);transform:translate3d(0, 0, 0)}.input-wrapper{position:relative}:host([range]) .input-container{display:flex}:host([range]) .input-wrapper{flex:1 1 auto}:host([range]) .horizontal-arrow-container{display:flex;align-items:center;border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);padding-block:0px;padding-inline:0.25rem}:host([range][layout=vertical]) .input-wrapper{inline-size:100%}:host([range][layout=vertical]) .input-container{flex-direction:column;align-items:flex-start}:host([range][layout=vertical]) .calendar-picker-wrapper--end{transform:translate3d(0, 0, 0)}:host([range][layout=vertical]) .vertical-arrow-container{inset-block-start:1.5rem;position:absolute;z-index:1;margin-inline:1px;background-color:var(--calcite-ui-foreground-1);padding-inline:0.625rem;inset-inline-start:0}:host([scale=s][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:216px}:host([scale=m][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:286px}:host([scale=l][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:398px}.menu-container{display:block;position:absolute;z-index:900;inline-size:0;block-size:0;overflow:hidden;pointer-events:none;visibility:hidden}.menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([open]) .menu-container{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}.menu-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}.input .calcite-input__wrapper{margin-block-start:0px}:host([range][layout=vertical][scale=m]) .vertical-arrow-container{inset-block-start:1.5rem;padding-inline-start:0.75rem}:host([range][layout=vertical][scale=m]) .vertical-arrow-container calcite-icon{block-size:0.75rem;inline-size:0.75rem;min-inline-size:0px}:host([range][layout=vertical][scale=l]) .vertical-arrow-container{inset-block-start:2.25rem;padding-inline:0.875rem}:host([range][layout=vertical][open]) .vertical-arrow-container{display:none}::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{L as calcite_input_date_picker}
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as s}from"./p-a25a17b0.js";import{T as n,d as r,g as o,a as l,s as c,b as h,c as d,e as p,p as m,i as u}from"./p-a4d32092.js";import{c as f,d as v,g}from"./p-f0f2e72f.js";import{s as y,c as b,d as w,H as x}from"./p-6310c9ff.js";import{d as k,f as D,c as C,u as z,r as I,a as P,F as A}from"./p-e8c440c0.js";import{u as j}from"./p-971cc677.js";import{t as R}from"./p-a49228cd.js";import{c as H,d as _}from"./p-020fc01c.js";import{n as O,c as E,d as F}from"./p-be2ec1e1.js";import{n as B}from"./p-56effd98.js";import"./p-1e2ee265.js";import"./p-121b14f1.js";import"./p-f5023aea.js";import"./p-b874cfdf.js";const L=class{constructor(a){t(this,a),this.calciteDatePickerChange=i(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=i(this,"calciteDatePickerRangeChange",6),this.calciteInputDatePickerChange=i(this,"calciteInputDatePickerChange",6),this.calciteInputDatePickerBeforeClose=i(this,"calciteInputDatePickerBeforeClose",6),this.calciteInputDatePickerClose=i(this,"calciteInputDatePickerClose",6),this.calciteInputDatePickerBeforeOpen=i(this,"calciteInputDatePickerBeforeOpen",6),this.calciteInputDatePickerOpen=i(this,"calciteInputDatePickerOpen",6),this.disabled=!1,this.readOnly=!1,this.active=!1,this.open=!1,this.intlPrevMonth=n.prevMonth,this.intlNextMonth=n.nextMonth,this.intlYear=n.year,this.scale="m",this.placement=k,this.range=!1,this.required=!1,this.overlayPositioning="absolute",this.proximitySelectionDisabled=!1,this.layout="horizontal",this.effectiveLocale="",this.focusedInput="start",this.globalAttributes={},this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?D(i,t):null},this.setTransitionEl=t=>{this.transitionEl=t,H(this)},this.setStartInput=t=>{this.startInput=t},this.setEndInput=t=>{this.endInput=t},this.deactivate=()=>{this.open=!1},this.keyDownHandler=t=>{const{defaultPrevented:i,key:a}=t;"Enter"!==a||i?"Escape"!==a||i||(this.active=!1,this.open=!1,t.preventDefault()):y(this)&&t.preventDefault()},this.inputBlur=t=>{this.blur(t.currentTarget)},this.startInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="start"},this.endInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="end"},this.startInputInput=()=>{const t=this.parseNumerals(this.startInput.value),i=this.formatNumerals(t);this.startInput.value=i,this.input(t)},this.endInputInput=()=>{const t=this.parseNumerals(this.endInput.value),i=this.formatNumerals(t);this.endInput.value=i,this.input(t)},this.setFloatingEl=t=>{t&&(this.floatingEl=t,C(this,this.referenceEl,this.floatingEl))},this.setStartWrapper=t=>{this.startWrapper=t,this.setReferenceEl()},this.setEndWrapper=t=>{this.endWrapper=t,this.setReferenceEl()},this.handleDateChange=t=>{this.range||(this.value=r(t.detail))},this.handleDateRangeChange=t=>{var i,a;if(!this.range||!t.detail)return;const{startDate:e,endDate:s}=t.detail;this.start=r(e),this.end=r(s),this.value=[this.start,this.end],this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus())},this.commonDateSeparators=[".","-","/"],this.formatNumerals=t=>t?t.split("").map((t=>this.commonDateSeparators.includes(t)?this.localeData.separator:B.includes(t)?O.numberFormatter.format(Number(t)):t)).join(""):"",this.parseNumerals=t=>t?t.split("").map((t=>B.includes(t)?O.delocalize(t):t)).join(""):""}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueHandler(t){Array.isArray(t)?(this.valueAsDate=o(t),this.start=t[0],this.end=t[1]):t?(this.valueAsDate=l(t),this.start="",this.end=""):(this.valueAsDate=void 0,this.start=void 0,this.end=void 0)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){t&&(this.minAsDate=l(t))}onMaxChanged(t){t&&(this.maxAsDate=l(t))}activeHandler(t){this.open=t}openHandler(t){if(this.active=t,this.disabled||this.readOnly)return t||z(this.floatingEl),void(this.open=!1);t?this.reposition(!0):z(this.floatingEl)}overlayPositioningHandler(){this.reposition(!0)}handleDateOrRangeChange(){this.calciteInputDatePickerChange.emit()}calciteDaySelectHandler(){this.shouldFocusRangeStart()||this.shouldFocusRangeEnd()||(this.open=!1)}async setFocus(){var t;null===(t=this.startInput)||void 0===t||t.setFocus()}async reposition(t=!1){const{floatingEl:i,referenceEl:a,placement:e,overlayPositioning:s,filteredFlipPlacements:n}=this;return I(this,{floatingEl:i,referenceEl:a,overlayPositioning:s,placement:e,flipPlacements:n,type:"menu"},t)}connectedCallback(){E(this);const t=this.active||this.open;t&&this.activeHandler(t),t&&this.openHandler(t),Array.isArray(this.value)?(this.valueAsDate=o(this.value),this.start=this.value[0],this.end=this.value[1]):this.value&&(this.valueAsDate=l(this.value),this.start="",this.end=""),this.start&&(this.startAsDate=l(this.start)),this.end&&(this.endAsDate=c(l(this.end))),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max)),f(this),b(this),H(this),this.setFilteredPlacements(),this.reposition(!0),O.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}componentDidLoad(){this.reposition(!0)}disconnectedCallback(){v(this),w(this),P(this,this.referenceEl,this.floatingEl),_(this),F(this)}componentDidRender(){j(this)}render(){var t,i;const{disabled:s,readOnly:n}=this,r=h(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate),o=this.range?h(this.endAsDate,this.minAsDate,this.maxAsDate):null,l=o?this.formatNumerals(o.toLocaleDateString(this.effectiveLocale)):"",c=r?this.formatNumerals(r.toLocaleDateString(this.effectiveLocale)):"";return a(e,{onBlur:this.deactivate,onKeyDown:this.keyDownHandler,role:"application"},this.localeData&&a("div",{"aria-expanded":R(this.open),class:"input-container",role:"application"},a("div",{class:"input-wrapper",ref:this.setStartWrapper},a("calcite-input",{class:"input "+("vertical"===this.layout&&this.range?"no-bottom-border":""),disabled:s,icon:"calendar",label:g(this),lang:this.effectiveLocale,"number-button-type":"none",numberingSystem:this.numberingSystem,onCalciteInputInput:this.startInputInput,onCalciteInternalInputBlur:this.inputBlur,onCalciteInternalInputFocus:this.startInputFocus,placeholder:null===(t=this.localeData)||void 0===t?void 0:t.placeholder,readOnly:n,ref:this.setStartInput,scale:this.scale,type:"text",value:c})),a("div",{"aria-hidden":R(!this.open),class:{"menu-container":!0,"menu-container--active":this.open},ref:this.setFloatingEl},a("div",{class:{"calendar-picker-wrapper":!0,"calendar-picker-wrapper--end":"end"===this.focusedInput,[A.animation]:!0,[A.animationActive]:this.open},ref:this.setTransitionEl},a("calcite-date-picker",{activeRange:this.focusedInput,endAsDate:this.endAsDate,headingLevel:this.headingLevel,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,lang:this.effectiveLocale,max:this.max,maxAsDate:this.maxAsDate,min:this.min,minAsDate:this.minAsDate,numberingSystem:this.numberingSystem,onCalciteDatePickerChange:this.handleDateChange,onCalciteDatePickerRangeChange:this.handleDateRangeChange,proximitySelectionDisabled:this.proximitySelectionDisabled,range:this.range,scale:this.scale,startAsDate:this.startAsDate,tabIndex:0,valueAsDate:this.valueAsDate}))),this.range&&"horizontal"===this.layout&&a("div",{class:"horizontal-arrow-container"},a("calcite-icon",{flipRtl:!0,icon:"arrow-right",scale:"s"})),this.range&&"vertical"===this.layout&&"s"!==this.scale&&a("div",{class:"vertical-arrow-container"},a("calcite-icon",{icon:"arrow-down",scale:"s"})),this.range&&a("div",{class:"input-wrapper",ref:this.setEndWrapper},a("calcite-input",{class:{input:!0,"border-top-color-one":"vertical"===this.layout&&this.range},disabled:s,icon:"calendar",lang:this.effectiveLocale,"number-button-type":"none",numberingSystem:this.numberingSystem,onCalciteInputInput:this.endInputInput,onCalciteInternalInputBlur:this.inputBlur,onCalciteInternalInputFocus:this.endInputFocus,placeholder:null===(i=this.localeData)||void 0===i?void 0:i.placeholder,readOnly:n,ref:this.setEndInput,scale:this.scale,type:"text",value:l}))),a(x,{component:this}))}setReferenceEl(){const{focusedInput:t,layout:i,endWrapper:a,startWrapper:e}=this;this.referenceEl="end"===t||"vertical"===i?a||e:e||a,C(this,this.referenceEl,this.floatingEl)}onLabelClick(){this.setFocus()}onBeforeOpen(){this.calciteInputDatePickerBeforeOpen.emit()}onOpen(){this.calciteInputDatePickerOpen.emit()}onBeforeClose(){this.calciteInputDatePickerBeforeClose.emit()}onClose(){this.calciteInputDatePickerClose.emit()}startWatcher(t){this.startAsDate=l(t)}endWatcher(t){this.endAsDate=t?c(l(t)):l(t)}async loadLocaleData(){this.localeData=await d(this.effectiveLocale)}clearCurrentValue(){if(!this.range)return"string"==typeof this.value&&this.value&&this.calciteDatePickerChange.emit(),void(this.value="");const{focusedInput:t}=this;"start"===t?(this.start&&this.calciteDatePickerRangeChange.emit(),this.value=Array.isArray(this.value)?["",this.value[1]||""]:[""],this.start=void 0):"end"===t&&(this.end&&this.calciteDatePickerRangeChange.emit(),this.value=Array.isArray(this.value)?[this.value[0]||"",""]:["",""],this.end=void 0)}input(t){const i=this.getDateFromInput(t);if(!i)return void this.clearCurrentValue();if(!this.range)return this.value=r(i),void this.calciteDatePickerChange.emit(i);const{focusedInput:a}=this;if("start"===a){if(!this.startAsDate||!p(i,this.startAsDate)){const t=r(i);this.value=Array.isArray(this.value)?[t,this.value[1]||""]:[t],this.start=t,this.calciteDatePickerRangeChange.emit({startDate:i,endDate:this.endAsDate})}}else if(!("end"!==a||this.endAsDate&&p(i,this.endAsDate))){const t=r(i);this.value=Array.isArray(this.value)?[this.value[0]||"",t]:["",t],this.end=t,this.calciteDatePickerRangeChange.emit({startDate:this.startAsDate,endDate:c(i)})}}blur(t){const{focusedInput:i,endAsDate:a,range:e,startAsDate:s,valueAsDate:n}=this,r=this.effectiveLocale;this.getDateFromInput(t.value)||(!e&&n?t.value=this.formatNumerals(Array.isArray(n)?n["end"===i?1:0].toLocaleDateString(r):n.toLocaleDateString(r)):"start"===i&&s?t.value=this.formatNumerals(s.toLocaleDateString(r)):"end"===i&&a&&(t.value=this.formatNumerals(a.toLocaleDateString(r))))}shouldFocusRangeStart(){return!(!this.endAsDate||this.startAsDate||"end"!==this.focusedInput||!this.startInput)}shouldFocusRangeEnd(){return!(!this.startAsDate||this.endAsDate||"start"!==this.focusedInput||!this.endInput)}getDateFromInput(t){if(!this.localeData)return!1;const{separator:i}=this.localeData,{day:a,month:e,year:s}=m(t,this.localeData),n=a>0,r=e>-1,o=new Date(s,e,a);o.setFullYear(s);const l=!isNaN(o.getTime()),c=t.split(i).filter((t=>t)).length>2,h=s.toString().length>0;return!!(n&&r&&l&&c&&h&&u(o,this.min,this.max))&&o}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],min:["onMinChanged"],max:["onMaxChanged"],active:["activeHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],layout:["setReferenceEl"],focusedInput:["setReferenceEl"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};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}}: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:inline-block;inline-size:100%;overflow:visible;vertical-align:top;--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 .menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}:host .menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}:host .menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}:host .menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}:host .menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}:host .menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.calendar-picker-wrapper{position:static;inline-size:100%;--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);transform:translate3d(0, 0, 0)}.input-wrapper{position:relative}:host([range]) .input-container{display:flex}:host([range]) .input-wrapper{flex:1 1 auto}:host([range]) .horizontal-arrow-container{display:flex;align-items:center;border-width:1px;border-inline-start-width:0px;border-inline-end-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);padding-block:0px;padding-inline:0.25rem}:host([range][layout=vertical]) .input-wrapper{inline-size:100%}:host([range][layout=vertical]) .input-container{flex-direction:column;align-items:flex-start}:host([range][layout=vertical]) .calendar-picker-wrapper--end{transform:translate3d(0, 0, 0)}:host([range][layout=vertical]) .vertical-arrow-container{inset-block-start:1.5rem;position:absolute;z-index:1;margin-inline:1px;background-color:var(--calcite-ui-foreground-1);padding-inline:0.625rem;inset-inline-start:0}:host([scale=s][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:216px}:host([scale=m][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:286px}:host([scale=l][range]:not([layout=vertical])) .calendar-picker-wrapper{inline-size:398px}.menu-container{display:block;position:absolute;z-index:900;inline-size:0;block-size:0;overflow:hidden;pointer-events:none;visibility:hidden}.menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.menu-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.menu-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.menu-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.menu-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.menu-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([open]) .menu-container{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}.menu-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}.input .calcite-input__wrapper{margin-block-start:0px}:host([range][layout=vertical][scale=m]) .vertical-arrow-container{inset-block-start:1.5rem;padding-inline-start:0.75rem}:host([range][layout=vertical][scale=m]) .vertical-arrow-container calcite-icon{block-size:0.75rem;inline-size:0.75rem;min-inline-size:0px}:host([range][layout=vertical][scale=l]) .vertical-arrow-container{inset-block-start:2.25rem;padding-inline:0.875rem}:host([range][layout=vertical][open]) .vertical-arrow-container{display:none}::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{L as calcite_input_date_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.609
|
|
5
5
|
*/
|
|
6
|
-
import{n as t}from"./p-
|
|
6
|
+
import{n as t}from"./p-56effd98.js";import{c as n}from"./p-b874cfdf.js";import{c as e,b as i}from"./p-a49228cd.js";class s{constructor(t){if(t instanceof s)return t;const[n,e]=String(t).split(".").concat("");this.value=BigInt(n+e.padEnd(s.DECIMALS,"0").slice(0,s.DECIMALS))+BigInt(s.ROUNDED&&e[s.DECIMALS]>="5"),this.isNegative="-"===t.charAt(0)}static _divRound(t,n){return s.fromBigInt(t/n+(s.ROUNDED?t*BigInt(2)/n%BigInt(2):BigInt(0)))}static fromBigInt(t){return Object.assign(Object.create(s.prototype),{value:t})}toString(){const t=this.value.toString().replace(new RegExp("-","g"),"").padStart(s.DECIMALS+1,"0"),n=t.slice(0,-s.DECIMALS),e=t.slice(-s.DECIMALS).replace(/\.?0+$/,""),i=n.concat(e.length?"."+e:"");return`${this.isNegative?"-":""}${i}`}formatToParts(t){const n=this.value.toString().replace(new RegExp("-","g"),"").padStart(s.DECIMALS+1,"0"),e=n.slice(0,-s.DECIMALS),i=n.slice(-s.DECIMALS).replace(/\.?0+$/,""),r=t.formatToParts(BigInt(e));return this.isNegative&&r.unshift({type:"minusSign",value:R.minusSign}),i.length&&(r.push({type:"decimal",value:R.decimal}),i.split("").forEach((t=>r.push({type:"fraction",value:t})))),r}format(t){const n=this.value.toString().replace(new RegExp("-","g"),"").padStart(s.DECIMALS+1,"0"),e=n.slice(0,-s.DECIMALS),i=n.slice(-s.DECIMALS).replace(/\.?0+$/,"");return`${this.isNegative?R.minusSign:""}${t.format(BigInt(e))}${i.length?`${R.decimal}${t.format(BigInt(i))}`:""}`}add(t){return s.fromBigInt(this.value+new s(t).value)}subtract(t){return s.fromBigInt(this.value-new s(t).value)}multiply(t){return s._divRound(this.value*new s(t).value,s.SHIFT)}divide(t){return s._divRound(this.value*s.SHIFT,new s(t).value)}}function r(t){return!(!t||isNaN(Number(t)))}function u(n){return n&&(e=n,t.some((t=>e.includes(t))))?l(n,(n=>{let e=!1;const i=n.split("").filter(((n,i)=>n.match(/\./g)&&!e?(e=!0,!0):!(!n.match(/\-/g)||0!==i)||t.includes(n))).reduce(((t,n)=>t+n));return r(i)?new s(i).toString():""})):"";var e}s.DECIMALS=100,s.ROUNDED=!0,s.SHIFT=BigInt("1"+"0".repeat(s.DECIMALS));const a=/^([-0])0+(?=\d)/,o=/(?!^\.)\.$/,h=/(?!^-)-/g,g=/^-\b0\b\.?0*$/,c=t=>l(t,(t=>{const n=t.replace(h,"").replace(o,"").replace(a,"$1");return r(n)?g.test(n)?n:new s(n).toString():t}));function l(t,n){if(!t)return t;const e=t.toLowerCase().indexOf("e")+1;return e?t.replace(/[eE]*$/g,"").substring(0,e).concat(t.slice(e).replace(/[eE]/g,"")).split(/[eE]/).map(((t,e)=>n(1===e?t.replace(/\./g,""):t))).join("e").replace(/^e/,"1e"):n(t)}const m=["ar","bg","bs","ca","cs","da","de","de-CH","el","en","en-AU","en-CA","en-GB","es","es-MX","et","fi","fr","fr-CH","he","hi","hr","hu","id","it","it-CH","ja","ko","lt","lv","mk","nb","nl","pl","pt","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"],d=["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"],f=t=>d.includes(t),p=(new Intl.NumberFormat).resolvedOptions().numberingSystem,b="arab"!==p&&f(p)?p:"latn",w=t=>f(t)?t:b;function $(t){return m.indexOf(t)>-1?t:t?"nb"===(t=t.toLowerCase())?"no":(t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,((t,n,e)=>`${n}-${e.toUpperCase()}`)),m.includes(t)||(t=t.split("-")[0])),m.includes(t)?t:"en"):"en"}const v=new Set;function I(t){B(t),0===v.size&&x.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0}),v.add(t)}function B(t){t.effectiveLocale=function(t){var n;return t.el.lang||t.locale||(null===(n=e(t.el,"[lang]"))||void 0===n?void 0:n.lang)||document.documentElement.lang||"en"}(t)}function E(t){v.delete(t),0===v.size&&x.disconnect()}const x=n("mutation",(t=>{t.forEach((t=>{const n=t.target;v.forEach((t=>{const s=!(!t.locale||t.el.lang),r=!i(n,t.el);if(s||r)return;const u=e(t.el,"[lang]");if(!u)return void(t.effectiveLocale="en");const a=u.lang;t.effectiveLocale=u.hasAttribute("lang")&&""===a?"en":a}))}))})),R=new class{constructor(){this.delocalize=t=>this._numberFormatOptions?l(t,(t=>t.trim().replace(new RegExp(`[${this._minusSign}]`,"g"),"-").replace(new RegExp(`[${this._group}]`,"g"),"").replace(new RegExp(`[${this._decimal}]`,"g"),".").replace(new RegExp(`[${this._digits.join("")}]`,"g"),this._getDigitIndex))):t,this.localize=t=>this._numberFormatOptions?l(t,(t=>r(t.trim())?new s(t.trim()).format(this._numberFormatter).replace(new RegExp(`[${this._actualGroup}]`,"g"),this._group):t)):t}get group(){return this._group}get decimal(){return this._decimal}get minusSign(){return this._minusSign}get digits(){return this._digits}get numberFormatter(){return this._numberFormatter}get numberFormatOptions(){return this._numberFormatOptions}set numberFormatOptions(t){if(t.locale=$(null==t?void 0:t.locale),t.numberingSystem=w(null==t?void 0:t.numberingSystem),!this._numberFormatOptions&&"en"===t.locale&&t.numberingSystem===b&&2===Object.keys(t).length||JSON.stringify(this._numberFormatOptions)===JSON.stringify(t))return;this._numberFormatOptions=t,this._numberFormatter=new Intl.NumberFormat(this._numberFormatOptions.locale,this._numberFormatOptions),this._digits=[...new Intl.NumberFormat(this._numberFormatOptions.locale,{useGrouping:!1,numberingSystem:this._numberFormatOptions.numberingSystem}).format(9876543210)].reverse();const n=new Map(this._digits.map(((t,n)=>[t,n]))),e=new Intl.NumberFormat(this._numberFormatOptions.locale).formatToParts(-12345678.9);this._actualGroup=e.find((t=>"group"===t.type)).value,this._group=0===this._actualGroup.trim().length?" ":this._actualGroup,this._decimal=e.find((t=>"decimal"===t.type)).value,this._minusSign=e.find((t=>"minusSign"===t.type)).value,this._getDigitIndex=t=>n.get(t)}};export{b as a,w as b,I as c,E as d,$ as g,r as i,R as n,u as p,c as s,B as u}
|