@esri/calcite-components 1.0.0-next.641 → 1.0.0-next.643
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-a68ec774.js → p-028685b2.js} +1 -1
- package/dist/calcite/{p-9fd20a91.js → p-060ebc7c.js} +1 -1
- package/dist/calcite/{p-2f66cf64.entry.js → p-0afe4628.entry.js} +2 -2
- package/dist/calcite/{p-66075334.entry.js → p-0b6f4619.entry.js} +2 -2
- package/dist/calcite/{p-ab67d39a.entry.js → p-0e907cbd.entry.js} +2 -2
- package/dist/calcite/p-1174e3fe.js +6 -0
- package/dist/calcite/{p-ac36fbe5.entry.js → p-12b6bf2f.entry.js} +2 -2
- package/dist/calcite/p-1455dd83.entry.js +6 -0
- package/dist/calcite/{p-af1d07d8.js → p-1c7e2836.js} +2 -2
- package/dist/calcite/{p-ae903532.entry.js → p-1cfd2718.entry.js} +2 -2
- package/dist/calcite/{p-a36813fa.entry.js → p-1d755400.entry.js} +2 -2
- package/dist/calcite/{p-289518aa.entry.js → p-1e6cc76e.entry.js} +2 -2
- package/dist/calcite/{p-e39b57e8.entry.js → p-1f9346ec.entry.js} +2 -2
- package/dist/calcite/{p-35622093.entry.js → p-2578e7eb.entry.js} +2 -2
- package/dist/calcite/{p-49ce54bd.js → p-25c0dcbb.js} +1 -1
- package/dist/calcite/{p-ae45c3fc.entry.js → p-265ff859.entry.js} +2 -2
- package/dist/calcite/{p-4de5cc2a.entry.js → p-28347a84.entry.js} +2 -2
- package/dist/calcite/{p-55991132.entry.js → p-2f2bb21a.entry.js} +2 -2
- package/dist/calcite/{p-0d979883.js → p-3412c15c.js} +2 -2
- package/dist/calcite/{p-95c0245c.entry.js → p-39da49a4.entry.js} +2 -2
- package/dist/calcite/{p-1a2217b9.js → p-3dea7591.js} +2 -2
- package/dist/calcite/{p-feffcd8b.js → p-3f3c8381.js} +1 -1
- package/dist/calcite/{p-3396631b.entry.js → p-415f8f96.entry.js} +2 -2
- package/dist/calcite/{p-10a99246.entry.js → p-4170b6c9.entry.js} +2 -2
- package/dist/calcite/{p-de7f2f7f.js → p-423d9239.js} +2 -2
- package/dist/calcite/{p-f0f5a40e.entry.js → p-43f12201.entry.js} +2 -2
- package/dist/calcite/{p-6814c9eb.js → p-45c2c679.js} +2 -2
- package/dist/calcite/{p-1fe7fa3f.entry.js → p-4b951e73.entry.js} +2 -2
- package/dist/calcite/{p-c4417c87.js → p-4e441b44.js} +2 -2
- package/dist/calcite/{p-f469174e.js → p-502e1c1a.js} +2 -2
- package/dist/calcite/{p-05bf3b90.entry.js → p-510b9b1b.entry.js} +2 -2
- package/dist/calcite/{p-596de746.js → p-5190781e.js} +1 -1
- package/dist/calcite/{p-d287114f.entry.js → p-53ea6732.entry.js} +2 -2
- package/dist/calcite/{p-d5eee0a5.js → p-5d39c98b.js} +1 -1
- package/dist/calcite/{p-1a13680e.entry.js → p-5e0f3030.entry.js} +2 -2
- package/dist/calcite/{p-00043507.js → p-60acf1af.js} +1 -1
- package/dist/calcite/{p-d9693692.entry.js → p-62294738.entry.js} +2 -2
- package/dist/calcite/{p-35a36511.js → p-65f1cd9f.js} +1 -1
- package/dist/calcite/p-672f4371.entry.js +6 -0
- package/dist/calcite/{p-3dafd020.entry.js → p-6963fea0.entry.js} +2 -2
- package/dist/calcite/p-6be4e56f.entry.js +6 -0
- package/dist/calcite/{p-b13424a4.js → p-6e471d13.js} +1 -1
- package/dist/calcite/{p-da98f8c6.entry.js → p-6f60f3da.entry.js} +2 -2
- package/dist/calcite/{p-84e7609e.js → p-6f661bc7.js} +2 -2
- package/dist/calcite/{p-d1c15346.entry.js → p-70e2936b.entry.js} +2 -2
- package/dist/calcite/{p-c57e155f.js → p-71675517.js} +1 -1
- package/dist/calcite/{p-e1c8d224.entry.js → p-7993e335.entry.js} +2 -2
- package/dist/calcite/p-7bd182db.entry.js +6 -0
- package/dist/calcite/{p-6719b292.js → p-7c2cb007.js} +1 -1
- package/dist/calcite/p-7fe96dcd.entry.js +6 -0
- package/dist/calcite/{p-b166d195.entry.js → p-816f3150.entry.js} +2 -2
- package/dist/calcite/{p-39df13df.entry.js → p-81ebadbb.entry.js} +2 -2
- package/dist/calcite/{p-88140777.entry.js → p-845bc694.entry.js} +2 -2
- package/dist/calcite/{p-4526a75d.js → p-87ee217c.js} +2 -2
- package/dist/calcite/{p-e31522b6.entry.js → p-88c8374f.entry.js} +2 -2
- package/dist/calcite/{p-a17bdbd9.entry.js → p-89a482b6.entry.js} +2 -2
- package/dist/calcite/{p-d96e27bb.js → p-936bec0c.js} +1 -1
- package/dist/calcite/{p-a014884a.js → p-94b56c57.js} +2 -2
- package/dist/calcite/{p-e783b38e.entry.js → p-9f5c1d88.entry.js} +2 -2
- package/dist/calcite/{p-ae0a02a4.entry.js → p-9f62d005.entry.js} +2 -2
- package/dist/calcite/{p-46dd62fb.entry.js → p-a115eb76.entry.js} +2 -2
- package/dist/calcite/{p-11049ae2.entry.js → p-a59d446c.entry.js} +2 -2
- package/dist/calcite/{p-c2b8f838.entry.js → p-a79b2337.entry.js} +2 -2
- package/dist/calcite/{p-a9c9a5f8.entry.js → p-a8dd60a2.entry.js} +2 -2
- package/dist/calcite/{p-e85c163c.js → p-a99d75ea.js} +2 -2
- package/dist/calcite/{p-08f4cb68.entry.js → p-af9a3a75.entry.js} +2 -2
- package/dist/calcite/{p-2d27b27d.js → p-b012c8ce.js} +1 -1
- package/dist/calcite/{p-536e49d8.entry.js → p-b657d06e.entry.js} +2 -2
- package/dist/calcite/{p-3e99528e.js → p-b9a24283.js} +1 -1
- package/dist/calcite/{p-113e5bde.entry.js → p-bde07c4d.entry.js} +2 -2
- package/dist/calcite/{p-1d7d918a.entry.js → p-cb6886cb.entry.js} +2 -2
- package/dist/calcite/{p-a3765780.entry.js → p-cb796141.entry.js} +2 -2
- package/dist/calcite/{p-a21d3dbc.entry.js → p-d026a19c.entry.js} +2 -2
- package/dist/calcite/{p-5df35333.js → p-db0dcd28.js} +2 -2
- package/dist/calcite/{p-7e89b13b.entry.js → p-e36d5e8a.entry.js} +2 -2
- package/dist/calcite/p-e3b57c5f.entry.js +6 -0
- package/dist/calcite/{p-1a5a2324.entry.js → p-e3dfae12.entry.js} +2 -2
- package/dist/calcite/p-e447f9af.entry.js +6 -0
- package/dist/calcite/{p-6a41da81.js → p-e6b8872f.js} +2 -2
- package/dist/calcite/{p-cb8a7e27.entry.js → p-e87bbe85.entry.js} +2 -2
- package/dist/calcite/{p-6e213400.entry.js → p-e956eeef.entry.js} +2 -2
- package/dist/calcite/p-ebe8dbda.entry.js +6 -0
- package/dist/calcite/{p-bee56a1f.js → p-ec73df09.js} +1 -1
- package/dist/calcite/p-edc9b8a0.entry.js +6 -0
- package/dist/calcite/{p-8611897b.js → p-f058f88f.js} +1 -1
- package/dist/calcite/{p-311b8523.entry.js → p-f1f0a576.entry.js} +2 -2
- package/dist/calcite/{p-79102009.js → p-f2e6a78a.js} +1 -1
- package/dist/calcite/{p-ea498f07.entry.js → p-f762d016.entry.js} +2 -2
- package/dist/calcite/{p-dac1a2c0.entry.js → p-fa28a628.entry.js} +2 -2
- package/dist/calcite/{p-ee18e66b.entry.js → p-fd79ea98.entry.js} +2 -2
- package/dist/calcite/{p-8e30cdbe.entry.js → p-ff32bf8b.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-f002b920.js → ExpandToggle-9c7158bc.js} +5 -5
- package/dist/cjs/{Heading-64b8453a.js → Heading-12a122e5.js} +2 -2
- package/dist/cjs/{app-globals-2f26c0e6.js → app-globals-cbe75cb7.js} +2 -2
- package/dist/cjs/{array-eea25516.js → array-8b147472.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +12 -12
- package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-pad.cjs.entry.js +11 -11
- package/dist/cjs/calcite-action.cjs.entry.js +8 -8
- package/dist/cjs/calcite-alert.cjs.entry.js +11 -11
- 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 +10 -10
- package/dist/cjs/calcite-card.cjs.entry.js +7 -7
- package/dist/cjs/calcite-checkbox.cjs.entry.js +10 -10
- package/dist/cjs/calcite-chip.cjs.entry.js +8 -8
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +17 -22
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +11 -11
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +12 -12
- package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
- package/dist/cjs/calcite-filter.cjs.entry.js +9 -9
- package/dist/cjs/calcite-flow-item.cjs.entry.js +8 -8
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite-handle.cjs.entry.js +6 -6
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +9 -9
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +16 -16
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +14 -14
- package/dist/cjs/calcite-input-text.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input.cjs.entry.js +24 -16
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +7 -7
- package/dist/cjs/calcite-list_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +10 -10
- package/dist/cjs/calcite-notice.cjs.entry.js +9 -9
- package/dist/cjs/calcite-option_3.cjs.entry.js +10 -10
- package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
- package/dist/cjs/calcite-panel.cjs.entry.js +11 -11
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +13 -13
- package/dist/cjs/calcite-popover_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button.cjs.entry.js +10 -10
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-rating.cjs.entry.js +10 -10
- 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 +10 -10
- package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +5 -5
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tooltip_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tree_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +13 -13
- package/dist/cjs/calcite.cjs.js +5 -5
- package/dist/cjs/{conditionalSlot-382ea58c.js → conditionalSlot-c01b272c.js} +3 -3
- package/dist/cjs/{debounce-d0ba3fdc.js → debounce-d368e86b.js} +1 -1
- package/dist/cjs/{dom-42e1294d.js → dom-55320d3e.js} +3 -3
- package/dist/cjs/{filter-df088cd7.js → filter-c9040a0e.js} +2 -2
- package/dist/cjs/{floating-ui-d6b7636b.js → floating-ui-53b6ec71.js} +4 -4
- package/dist/cjs/{focusTrapComponent-33cd0630.js → focusTrapComponent-cdd27d8f.js} +2 -2
- package/dist/cjs/{form-b2b0e215.js → form-50f5cddf.js} +3 -3
- package/dist/cjs/{guid-f876ba7a.js → guid-744b8cc7.js} +1 -1
- package/dist/cjs/{index-7e1b24b2.js → index-22c36a07.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-38c72ea0.js → interactive-f7e71a58.js} +1 -1
- package/dist/cjs/{interfaces-beb8b33b.js → interfaces-a5f7937b.js} +1 -1
- package/dist/cjs/{key-81f36c3e.js → key-c61994c1.js} +1 -1
- package/dist/cjs/{label-4a13dbdf.js → label-5f1c1508.js} +2 -2
- package/dist/cjs/{loadable-1a69896a.js → loadable-5ae70eb7.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{locale-6a96604d.js → locale-90813961.js} +4 -4
- package/dist/cjs/{math-14423801.js → math-8cc6a170.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-d6b6cc6f.js → nonChromiumPlatformUtils-98517dec.js} +6 -6
- package/dist/cjs/{observers-8cd4575d.js → observers-ec02346b.js} +1 -1
- package/dist/cjs/{openCloseComponent-8e15c3d7.js → openCloseComponent-2ad1bd98.js} +1 -1
- package/dist/cjs/{resources-9464676f.js → resources-1b5e87b7.js} +5 -5
- package/dist/cjs/{resources-76ef5e75.js → resources-59020d08.js} +3 -3
- package/dist/cjs/{resources-d64f36ac.js → resources-a8ad62cf.js} +1 -1
- package/dist/cjs/{resources-99f47bb8.js → resources-be3a275e.js} +1 -1
- package/dist/cjs/{resources-050abfc6.js → resources-f4f8c964.js} +1 -1
- package/dist/cjs/{resources-e4b060e6.js → resources-f72b8a17.js} +1 -1
- package/dist/cjs/{sortable.esm-62504581.js → sortable.esm-57d64bc8.js} +1 -1
- package/dist/cjs/{utils-6bf4b2c1.js → utils-2ffa20a8.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 +2 -4
- 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 +2 -5
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +1 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +1 -1
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +1 -1
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/inline-editable/inline-editable.js +1 -1
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +93 -4
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +1 -1
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.js +1 -1
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.js +22 -2
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +43 -3
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +1 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.js +1 -1
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/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/tree.js +1 -1
- package/dist/collection/components/tree/utils.js +1 -1
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +1 -1
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +1 -1
- package/dist/collection/components/value-list/value-list.js +1 -1
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.js +1 -1
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/collection/utils/focusTrapComponent.js +1 -1
- package/dist/collection/utils/form.js +1 -1
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +1 -1
- package/dist/collection/utils/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 +2 -5
- package/dist/components/calcite-combobox.js +2 -4
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +1 -1
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +1 -1
- package/dist/components/calcite-flow.js +1 -1
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-input-message.js +1 -1
- package/dist/components/calcite-input-number.js +3 -2
- package/dist/components/calcite-input-text.js +5 -3
- 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/focusTrapComponent.js +1 -1
- package/dist/components/form.js +1 -1
- package/dist/components/graph.js +1 -1
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +16 -4
- package/dist/components/interactive.js +1 -1
- package/dist/components/interfaces.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/nonChromiumPlatformUtils.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +1 -1
- package/dist/components/shared-list-render.js +1 -1
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/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-b98d88b1.js → ExpandToggle-66eb3440.js} +5 -5
- package/dist/esm/{Heading-700866ec.js → Heading-d3deccfd.js} +2 -2
- package/dist/esm/{app-globals-84f4a064.js → app-globals-22830dda.js} +2 -2
- package/dist/esm/{array-ef71ddf9.js → array-e4aef5ed.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +12 -12
- package/dist/esm/calcite-action-group.entry.js +9 -9
- package/dist/esm/calcite-action-menu.entry.js +9 -9
- package/dist/esm/calcite-action-pad.entry.js +11 -11
- package/dist/esm/calcite-action.entry.js +8 -8
- package/dist/esm/calcite-alert.entry.js +11 -11
- 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 +10 -10
- package/dist/esm/calcite-card.entry.js +7 -7
- package/dist/esm/calcite-checkbox.entry.js +10 -10
- package/dist/esm/calcite-chip.entry.js +8 -8
- package/dist/esm/calcite-color-picker_3.entry.js +11 -11
- package/dist/esm/calcite-combobox_3.entry.js +17 -22
- package/dist/esm/calcite-date-picker_4.entry.js +11 -11
- package/dist/esm/calcite-dropdown_3.entry.js +12 -12
- package/dist/esm/calcite-fab.entry.js +7 -7
- package/dist/esm/calcite-filter.entry.js +9 -9
- package/dist/esm/calcite-flow-item.entry.js +8 -8
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +13 -13
- package/dist/esm/calcite-handle.entry.js +6 -6
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +9 -9
- package/dist/esm/calcite-input-date-picker.entry.js +16 -16
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +14 -14
- package/dist/esm/calcite-input-text.entry.js +12 -12
- package/dist/esm/calcite-input-time-picker_2.entry.js +12 -12
- package/dist/esm/calcite-input.entry.js +24 -16
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +7 -7
- package/dist/esm/calcite-list_3.entry.js +9 -9
- package/dist/esm/calcite-loader.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +10 -10
- package/dist/esm/calcite-notice.entry.js +9 -9
- package/dist/esm/calcite-option_3.entry.js +10 -10
- package/dist/esm/calcite-pagination.entry.js +8 -8
- package/dist/esm/calcite-panel.entry.js +11 -11
- package/dist/esm/calcite-pick-list_3.entry.js +13 -13
- package/dist/esm/calcite-popover_2.entry.js +13 -13
- package/dist/esm/calcite-progress.entry.js +2 -2
- package/dist/esm/calcite-radio-button-group.entry.js +3 -3
- package/dist/esm/calcite-radio-button.entry.js +10 -10
- package/dist/esm/calcite-radio-group_2.entry.js +9 -9
- package/dist/esm/calcite-rating.entry.js +10 -10
- 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 +10 -10
- package/dist/esm/calcite-switch.entry.js +10 -10
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-tile-select_2.entry.js +5 -5
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +8 -8
- package/dist/esm/calcite-tooltip_2.entry.js +8 -8
- package/dist/esm/calcite-tree_2.entry.js +8 -8
- package/dist/esm/calcite-value-list_2.entry.js +13 -13
- package/dist/esm/calcite.js +5 -5
- package/dist/esm/{conditionalSlot-7cc2d681.js → conditionalSlot-ba0c17bb.js} +3 -3
- package/dist/esm/{debounce-03871b07.js → debounce-e6e21c09.js} +1 -1
- package/dist/esm/{dom-2c4bffc1.js → dom-42a3dd7d.js} +3 -3
- package/dist/esm/{filter-464a1c22.js → filter-7c10d473.js} +2 -2
- package/dist/esm/{floating-ui-44cd07e2.js → floating-ui-22f67739.js} +4 -4
- package/dist/esm/{focusTrapComponent-bebc994f.js → focusTrapComponent-1fde000b.js} +2 -2
- package/dist/esm/{form-6efcc2c2.js → form-1a5da8a4.js} +3 -3
- package/dist/esm/{guid-6e8ed271.js → guid-531683bd.js} +1 -1
- package/dist/esm/{index-343ceaf2.js → index-8f8da37b.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-5255797d.js → interactive-83a1fb7e.js} +1 -1
- package/dist/esm/{interfaces-e664b9a3.js → interfaces-f18083e6.js} +1 -1
- package/dist/esm/{key-e7eefc71.js → key-83bf9f3b.js} +1 -1
- package/dist/esm/{label-1327bfdb.js → label-b7185676.js} +2 -2
- package/dist/esm/{loadable-9acca4db.js → loadable-2431cf6a.js} +1 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{locale-23e93f2c.js → locale-caea3a83.js} +4 -4
- package/dist/esm/{math-a680d6c9.js → math-a827e678.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-ee349510.js → nonChromiumPlatformUtils-c27f54d7.js} +6 -6
- package/dist/esm/{observers-bed9c4d8.js → observers-13b0922c.js} +1 -1
- package/dist/esm/{openCloseComponent-c69e7077.js → openCloseComponent-d6c45847.js} +1 -1
- package/dist/esm/{resources-3a5e18a0.js → resources-1fc4e8f7.js} +1 -1
- package/dist/esm/{resources-1afee4d4.js → resources-7dcb577a.js} +3 -3
- package/dist/esm/{resources-69a4fa6d.js → resources-90404213.js} +5 -5
- package/dist/esm/{resources-6e376455.js → resources-a6757ac7.js} +1 -1
- package/dist/esm/{resources-d420ab30.js → resources-b3def517.js} +1 -1
- package/dist/esm/{resources-925b673b.js → resources-de1d724e.js} +1 -1
- package/dist/esm/{sortable.esm-7168b0e5.js → sortable.esm-dfb5fcaa.js} +1 -1
- package/dist/esm/{utils-08a53e6f.js → utils-5b1eda1a.js} +1 -1
- package/dist/extras/docs-json.json +149 -1
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/input/input.d.ts +30 -0
- package/dist/types/components/input-number/input-number.d.ts +7 -0
- package/dist/types/components/input-text/input-text.d.ts +14 -0
- package/dist/types/components.d.ts +70 -0
- package/hydrate/index.js +24 -14
- package/package.json +1 -1
- package/dist/calcite/p-042837f2.entry.js +0 -6
- package/dist/calcite/p-1578b549.entry.js +0 -6
- package/dist/calcite/p-39da9266.entry.js +0 -6
- package/dist/calcite/p-4b329d19.entry.js +0 -6
- package/dist/calcite/p-6ff7fff1.entry.js +0 -6
- package/dist/calcite/p-75f3ede0.entry.js +0 -6
- package/dist/calcite/p-83302dc3.js +0 -6
- package/dist/calcite/p-a93ec20a.entry.js +0 -6
- package/dist/calcite/p-d9ef3f37.entry.js +0 -6
- package/dist/calcite/p-fcfcfd2a.entry.js +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.643
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,H as e,g as s}from"./p-8611897b.js";import{T as n,d as r,a as o,i as l,b as c,g as h,s as d,c as p,e as m,f as u}from"./p-5df35333.js";import{c as f,d as g,g as v}from"./p-af1d07d8.js";import{s as y,c as b,d as w,H as x}from"./p-1a2217b9.js";import{d as k,f as D,c as C,u as I,r as P,a as z,F as A}from"./p-de7f2f7f.js";import{u as j}from"./p-00043507.js";import{t as R}from"./p-a014884a.js";import{c as _,d as H}from"./p-596de746.js";import{n as O,c as W,d as E}from"./p-c4417c87.js";import{n as S}from"./p-d5eee0a5.js";import{c as L,s as M,a as B}from"./p-79102009.js";import"./p-feffcd8b.js";import"./p-d96e27bb.js";import"./p-bee56a1f.js";import"./p-2d27b27d.js";const F=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.value="",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.calciteInternalInputInputHandler=t=>{const i=t.target.value,{year:a}=r(i,this.localeData);if(a&&a.length<4)return;const e=o(i,this.localeData);l(e,this.min,this.max)&&(this.datePickerActiveDate=e)},this.calciteInternalInputBlurHandler=()=>{this.commitValue()},this.effectiveLocale="",this.focusedInput="start",this.globalAttributes={},this.userChangedValue=!1,this.openTransitionProp="opacity",this.valueAsDateChangedExternally=!1,this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?D(i,t):null},this.setTransitionEl=t=>{this.transitionEl=t,_(this)},this.setStartInput=t=>{this.startInput=t},this.setEndInput=t=>{this.endInput=t},this.deactivate=()=>{this.open=!1},this.keyDownHandler=t=>{var i,a;const{defaultPrevented:e,key:s}=t;"Enter"!==s||e?"Escape"!==s||e||(this.active=!1,this.open=!1,t.preventDefault()):(this.commitValue(),this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus()),y(this)&&t.preventDefault())},this.startInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="start"},this.endInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="end"},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||(t.stopPropagation(),this.setValue(t.detail),this.localizeInputValues())},this.handleDateRangeChange=t=>{var i,a;if(!this.range||!t.detail)return;t.stopPropagation();const{startDate:e,endDate:s}=t.detail;this.setRangeValue([e,s]),this.localizeInputValues(),this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus())},this.setInputValue=(t,i="start")=>{const a=this[`${i}Input`];a&&(a.value=t)},this.setRangeValue=t=>{if(!this.range)return;const{value:i}=this,a=Array.isArray(i),e=Array.isArray(t),s=e?t[0]:"",n=e?c(s):"",r=e?t[1]:"",o=e?c(r):"",l=n||o?[n,o]:"";if(l===i)return;this.userChangedValue=!0,this.value=l,this.valueAsDate=l?h(l):void 0,this.start=n,this.end=o;const p={startDate:s,endDate:r?d(r):null},m=this.calciteInputDatePickerChange.emit(),u=this.calciteDatePickerRangeChange.emit(p);(m&&m.defaultPrevented||u&&u.defaultPrevented)&&(this.value=i,a?(this.setInputValue(i[0],"start"),this.setInputValue(i[1],"end")):(this.value=i,this.setInputValue(i)))},this.setValue=t=>{if(this.range)return;const i=this.value,a=c(t);if(a===i)return;this.userChangedValue=!0,this.valueAsDate=a?p(a):void 0,this.value=a||"";const e=this.calciteInputDatePickerChange.emit(),s=this.calciteDatePickerChange.emit(t);(e.defaultPrevented||s.defaultPrevented)&&(this.value=i,this.setInputValue(i))},this.commonDateSeparators=[".","-","/"],this.formatNumerals=t=>t?t.split("").map((t=>this.commonDateSeparators.includes(t)?this.localeData.separator:S.includes(t)?O.numberFormatter.format(Number(t)):t)).join(""):""}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueWatcher(t){if(!this.userChangedValue){let i;Array.isArray(t)?(i=h(t),this.start=t[0],this.end=t[1]):i=t?p(t):void 0,this.valueAsDateChangedExternally||i===this.valueAsDate||(this.valueAsDate=i),this.localizeInputValues()}this.userChangedValue=!1}valueAsDateWatcher(t){this.datePickerActiveDate=t;const i=this.range&&Array.isArray(t)?[c(t[0]),c(t[1])]:c(t);this.value!==i&&(this.valueAsDateChangedExternally=!0,this.value=i,this.valueAsDateChangedExternally=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){t&&(this.minAsDate=p(t))}onMaxChanged(t){t&&(this.maxAsDate=p(t))}activeHandler(t){this.open=t}openHandler(t){if(this.active=t,this.disabled||this.readOnly)return t||I(this.floatingEl),void(this.open=!1);t?this.reposition(!0):I(this.floatingEl)}overlayPositioningHandler(){this.reposition(!0)}calciteDaySelectHandler(){this.shouldFocusRangeStart()||this.shouldFocusRangeEnd()||(this.open=!1)}async setFocus(){var t;await L(this),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 P(this,{floatingEl:i,referenceEl:a,overlayPositioning:s,placement:e,flipPlacements:n,type:"menu"},t)}connectedCallback(){W(this);const t=this.active||this.open;if(t&&this.activeHandler(t),t&&this.openHandler(t),Array.isArray(this.value))this.valueAsDate=h(this.value),this.start=this.value[0],this.end=this.value[1];else if(this.value){try{this.valueAsDate=p(this.value)}catch(t){this.warnAboutInvalidValue(this.value),this.value=""}this.start="",this.end=""}else this.range&&this.valueAsDate&&this.setRangeValue(this.valueAsDate);this.start&&(this.startAsDate=p(this.start)),this.end&&(this.endAsDate=d(p(this.end))),this.min&&(this.minAsDate=p(this.min)),this.max&&(this.maxAsDate=p(this.max)),f(this),b(this),_(this),this.setFilteredPlacements(),this.reposition(!0),O.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}async componentWillLoad(){M(this),await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}componentDidLoad(){B(this),this.localizeInputValues(),this.reposition(!0)}disconnectedCallback(){g(this),w(this),z(this,this.referenceEl,this.floatingEl),H(this),E(this)}componentDidRender(){j(this)}render(){var t,i;const{disabled:s,effectiveLocale:n,numberingSystem:r,readOnly:o}=this;return O.numberFormatOptions={numberingSystem:r,locale:n,useGrouping:!1},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:v(this),lang:n,"number-button-type":"none",numberingSystem:r,onCalciteInputInput:this.calciteInternalInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.startInputFocus,placeholder:null===(t=this.localeData)||void 0===t?void 0:t.placeholder,readOnly:o,ref:this.setStartInput,scale:this.scale,type:"text"})),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",{activeDate:this.datePickerActiveDate,activeRange:this.focusedInput,endAsDate:this.endAsDate,headingLevel:this.headingLevel,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,lang:n,max:this.max,maxAsDate:this.maxAsDate,min:this.min,minAsDate:this.minAsDate,numberingSystem:r,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:n,"number-button-type":"none",numberingSystem:r,onCalciteInputInput:this.calciteInternalInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.endInputFocus,placeholder:null===(i=this.localeData)||void 0===i?void 0:i.placeholder,readOnly:o,ref:this.setEndInput,scale:this.scale,type:"text"}))),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()}commitValue(){const{focusedInput:t,value:i}=this,a=o(this[`${t}Input`].value,this.localeData),e=c(a),s=Array.isArray(i);if(this.range){const n="start"===t?0:1;if(s){if(e===i[n])return;a?(this.setRangeValue(["start"===t?a:p(i[0]),"end"===t?a:p(i[1])]),this.localizeInputValues()):this.setRangeValue(["end"===t&&p(i[0]),"start"===t&&p(i[1])])}else a&&(this.setRangeValue(["start"===t?a:p(i[0]),"end"===t?a:p(i[1])]),this.localizeInputValues())}else{if(e===i)return;this.setValue(a),this.localizeInputValues()}}startWatcher(t){this.startAsDate=p(t)}endWatcher(t){this.endAsDate=t?d(p(t)):p(t)}async loadLocaleData(){this.localeData=await m(this.effectiveLocale)}shouldFocusRangeStart(){return!(!this.endAsDate||this.startAsDate||"end"!==this.focusedInput||!this.startInput)}shouldFocusRangeEnd(){return!(!this.startAsDate||this.endAsDate||"start"!==this.focusedInput||!this.endInput)}localizeInputValues(){const t=u(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate),i=this.range?u(this.endAsDate,this.minAsDate,this.maxAsDate):null,a=t&&this.formatNumerals(t.toLocaleDateString(this.effectiveLocale)),e=i&&this.formatNumerals(i.toLocaleDateString(this.effectiveLocale));a&&this.setInputValue(a,"start"),this.range&&e&&this.setInputValue(e,"end")}warnAboutInvalidValue(t){console.warn(`The specified value "${t}" does not conform to the required format, "yyyy-MM-dd".`)}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],value:["valueWatcher"],valueAsDate:["valueAsDateWatcher"],flipPlacements:["flipPlacementsHandler"],min:["onMinChanged"],max:["onMaxChanged"],active:["activeHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],layout:["setReferenceEl"],focusedInput:["setReferenceEl"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};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}}: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);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;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;visibility:hidden}.menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);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;transform:translate(0)}:host([open]) .menu-container{visibility:visible}.menu-container--active{visibility:visible}.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{F as calcite_input_date_picker}
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as s}from"./p-f058f88f.js";import{T as n,d as r,a as o,i as c,b as l,g as h,s as d,c as p,e as m,f as u}from"./p-db0dcd28.js";import{c as f,d as g,g as v}from"./p-1c7e2836.js";import{s as y,c as b,d as w,H as x}from"./p-3dea7591.js";import{d as k,f as D,c as C,u as I,r as P,a as z,F as A}from"./p-423d9239.js";import{u as j}from"./p-60acf1af.js";import{t as R}from"./p-94b56c57.js";import{c as _,d as H}from"./p-5190781e.js";import{n as O,c as W,d as E}from"./p-4e441b44.js";import{n as S}from"./p-5d39c98b.js";import{c as L,s as M,a as B}from"./p-f2e6a78a.js";import"./p-3f3c8381.js";import"./p-936bec0c.js";import"./p-ec73df09.js";import"./p-b012c8ce.js";const F=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.value="",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.calciteInternalInputInputHandler=t=>{const i=t.target.value,{year:a}=r(i,this.localeData);if(a&&a.length<4)return;const e=o(i,this.localeData);c(e,this.min,this.max)&&(this.datePickerActiveDate=e)},this.calciteInternalInputBlurHandler=()=>{this.commitValue()},this.effectiveLocale="",this.focusedInput="start",this.globalAttributes={},this.userChangedValue=!1,this.openTransitionProp="opacity",this.valueAsDateChangedExternally=!1,this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?D(i,t):null},this.setTransitionEl=t=>{this.transitionEl=t,_(this)},this.setStartInput=t=>{this.startInput=t},this.setEndInput=t=>{this.endInput=t},this.deactivate=()=>{this.open=!1},this.keyDownHandler=t=>{var i,a;const{defaultPrevented:e,key:s}=t;"Enter"!==s||e?"Escape"!==s||e||(this.active=!1,this.open=!1,t.preventDefault()):(this.commitValue(),this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus()),y(this)&&t.preventDefault())},this.startInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="start"},this.endInputFocus=()=>{this.readOnly||(this.open=!0),this.focusedInput="end"},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||(t.stopPropagation(),this.setValue(t.detail),this.localizeInputValues())},this.handleDateRangeChange=t=>{var i,a;if(!this.range||!t.detail)return;t.stopPropagation();const{startDate:e,endDate:s}=t.detail;this.setRangeValue([e,s]),this.localizeInputValues(),this.shouldFocusRangeEnd()?null===(i=this.endInput)||void 0===i||i.setFocus():this.shouldFocusRangeStart()&&(null===(a=this.startInput)||void 0===a||a.setFocus())},this.setInputValue=(t,i="start")=>{const a=this[`${i}Input`];a&&(a.value=t)},this.setRangeValue=t=>{if(!this.range)return;const{value:i}=this,a=Array.isArray(i),e=Array.isArray(t),s=e?t[0]:"",n=e?l(s):"",r=e?t[1]:"",o=e?l(r):"",c=n||o?[n,o]:"";if(c===i)return;this.userChangedValue=!0,this.value=c,this.valueAsDate=c?h(c):void 0,this.start=n,this.end=o;const p={startDate:s,endDate:r?d(r):null},m=this.calciteInputDatePickerChange.emit(),u=this.calciteDatePickerRangeChange.emit(p);(m&&m.defaultPrevented||u&&u.defaultPrevented)&&(this.value=i,a?(this.setInputValue(i[0],"start"),this.setInputValue(i[1],"end")):(this.value=i,this.setInputValue(i)))},this.setValue=t=>{if(this.range)return;const i=this.value,a=l(t);if(a===i)return;this.userChangedValue=!0,this.valueAsDate=a?p(a):void 0,this.value=a||"";const e=this.calciteInputDatePickerChange.emit(),s=this.calciteDatePickerChange.emit(t);(e.defaultPrevented||s.defaultPrevented)&&(this.value=i,this.setInputValue(i))},this.commonDateSeparators=[".","-","/"],this.formatNumerals=t=>t?t.split("").map((t=>this.commonDateSeparators.includes(t)?this.localeData.separator:S.includes(t)?O.numberFormatter.format(Number(t)):t)).join(""):""}handleDisabledAndReadOnlyChange(t){t||(this.open=!1)}valueWatcher(t){if(!this.userChangedValue){let i;Array.isArray(t)?(i=h(t),this.start=t[0],this.end=t[1]):i=t?p(t):void 0,this.valueAsDateChangedExternally||i===this.valueAsDate||(this.valueAsDate=i),this.localizeInputValues()}this.userChangedValue=!1}valueAsDateWatcher(t){this.datePickerActiveDate=t;const i=this.range&&Array.isArray(t)?[l(t[0]),l(t[1])]:l(t);this.value!==i&&(this.valueAsDateChangedExternally=!0,this.value=i,this.valueAsDateChangedExternally=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}onMinChanged(t){t&&(this.minAsDate=p(t))}onMaxChanged(t){t&&(this.maxAsDate=p(t))}activeHandler(t){this.open=t}openHandler(t){if(this.active=t,this.disabled||this.readOnly)return t||I(this.floatingEl),void(this.open=!1);t?this.reposition(!0):I(this.floatingEl)}overlayPositioningHandler(){this.reposition(!0)}calciteDaySelectHandler(){this.shouldFocusRangeStart()||this.shouldFocusRangeEnd()||(this.open=!1)}async setFocus(){var t;await L(this),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 P(this,{floatingEl:i,referenceEl:a,overlayPositioning:s,placement:e,flipPlacements:n,type:"menu"},t)}connectedCallback(){W(this);const t=this.active||this.open;if(t&&this.activeHandler(t),t&&this.openHandler(t),Array.isArray(this.value))this.valueAsDate=h(this.value),this.start=this.value[0],this.end=this.value[1];else if(this.value){try{this.valueAsDate=p(this.value)}catch(t){this.warnAboutInvalidValue(this.value),this.value=""}this.start="",this.end=""}else this.range&&this.valueAsDate&&this.setRangeValue(this.valueAsDate);this.start&&(this.startAsDate=p(this.start)),this.end&&(this.endAsDate=d(p(this.end))),this.min&&(this.minAsDate=p(this.min)),this.max&&(this.maxAsDate=p(this.max)),f(this),b(this),_(this),this.setFilteredPlacements(),this.reposition(!0),O.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1}}async componentWillLoad(){M(this),await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}componentDidLoad(){B(this),this.localizeInputValues(),this.reposition(!0)}disconnectedCallback(){g(this),w(this),z(this,this.referenceEl,this.floatingEl),H(this),E(this)}componentDidRender(){j(this)}render(){var t,i;const{disabled:s,effectiveLocale:n,numberingSystem:r,readOnly:o}=this;return O.numberFormatOptions={numberingSystem:r,locale:n,useGrouping:!1},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:v(this),lang:n,"number-button-type":"none",numberingSystem:r,onCalciteInputInput:this.calciteInternalInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.startInputFocus,placeholder:null===(t=this.localeData)||void 0===t?void 0:t.placeholder,readOnly:o,ref:this.setStartInput,scale:this.scale,type:"text"})),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",{activeDate:this.datePickerActiveDate,activeRange:this.focusedInput,endAsDate:this.endAsDate,headingLevel:this.headingLevel,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,lang:n,max:this.max,maxAsDate:this.maxAsDate,min:this.min,minAsDate:this.minAsDate,numberingSystem:r,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:n,"number-button-type":"none",numberingSystem:r,onCalciteInputInput:this.calciteInternalInputInputHandler,onCalciteInternalInputBlur:this.calciteInternalInputBlurHandler,onCalciteInternalInputFocus:this.endInputFocus,placeholder:null===(i=this.localeData)||void 0===i?void 0:i.placeholder,readOnly:o,ref:this.setEndInput,scale:this.scale,type:"text"}))),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()}commitValue(){const{focusedInput:t,value:i}=this,a=o(this[`${t}Input`].value,this.localeData),e=l(a),s=Array.isArray(i);if(this.range){const n="start"===t?0:1;if(s){if(e===i[n])return;a?(this.setRangeValue(["start"===t?a:p(i[0]),"end"===t?a:p(i[1])]),this.localizeInputValues()):this.setRangeValue(["end"===t&&p(i[0]),"start"===t&&p(i[1])])}else a&&(this.setRangeValue(["start"===t?a:p(i[0]),"end"===t?a:p(i[1])]),this.localizeInputValues())}else{if(e===i)return;this.setValue(a),this.localizeInputValues()}}startWatcher(t){this.startAsDate=p(t)}endWatcher(t){this.endAsDate=t?d(p(t)):p(t)}async loadLocaleData(){this.localeData=await m(this.effectiveLocale)}shouldFocusRangeStart(){return!(!this.endAsDate||this.startAsDate||"end"!==this.focusedInput||!this.startInput)}shouldFocusRangeEnd(){return!(!this.startAsDate||this.endAsDate||"start"!==this.focusedInput||!this.endInput)}localizeInputValues(){const t=u(this.range?this.startAsDate:this.valueAsDate,this.minAsDate,this.maxAsDate),i=this.range?u(this.endAsDate,this.minAsDate,this.maxAsDate):null,a=t&&this.formatNumerals(t.toLocaleDateString(this.effectiveLocale)),e=i&&this.formatNumerals(i.toLocaleDateString(this.effectiveLocale));a&&this.setInputValue(a,"start"),this.range&&e&&this.setInputValue(e,"end")}warnAboutInvalidValue(t){console.warn(`The specified value "${t}" does not conform to the required format, "yyyy-MM-dd".`)}get el(){return s(this)}static get watchers(){return{disabled:["handleDisabledAndReadOnlyChange"],readOnly:["handleDisabledAndReadOnlyChange"],value:["valueWatcher"],valueAsDate:["valueAsDateWatcher"],flipPlacements:["flipPlacementsHandler"],min:["onMinChanged"],max:["onMaxChanged"],active:["activeHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],layout:["setReferenceEl"],focusedInput:["setReferenceEl"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};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}}: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);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;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;visibility:hidden}.menu-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);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;transform:translate(0)}:host([open]) .menu-container{visibility:visible}.menu-container--active{visibility:visible}.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{F 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.643
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as e,F as n,g as a}from"./p-
|
|
6
|
+
import{r as t,c as i,h as e,F as n,g as a}from"./p-f058f88f.js";import{C as o,I as s,S as c}from"./p-060ebc7c.js";import{t as l,i as r,f as h}from"./p-94b56c57.js";import{g as m}from"./p-65f1cd9f.js";import{g as d}from"./p-ec73df09.js";import{i as u}from"./p-5d39c98b.js";import{s as p,a as f,c as v}from"./p-f2e6a78a.js";import"./p-936bec0c.js";const x=["ArrowUp","ArrowDown","End","Home"],g=class{constructor(e){t(this,e),this.calciteActionMenuOpenChange=i(this,"calciteActionMenuOpenChange",6),this.expanded=!1,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.actionElements=[],this.guid=`calcite-action-menu-${d()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,this.activeMenuItemIndex=-1,this.connectMenuButtonEl=()=>{const{menuButtonId:t,menuId:i,open:e,label:n}=this,a=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==a&&(this.disconnectMenuButtonEl(),this.menuButtonEl=a,this.setTooltipReferenceElement(),a&&(a.active=e,a.setAttribute("aria-controls",i),a.setAttribute("aria-expanded",l(e)),a.setAttribute("aria-haspopup","true"),a.id||(a.id=t),a.label||(a.label=n),a.text||(a.text=n),a.addEventListener("pointerdown",this.menuButtonClick),a.addEventListener("keydown",this.menuButtonKeyDown)))},this.disconnectMenuButtonEl=()=>{const{menuButtonEl:t}=this;t&&(t.removeEventListener("pointerdown",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown))},this.setMenuButtonEl=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.slottedMenuButtonEl=i[0],this.connectMenuButtonEl()},this.setDefaultMenuButtonEl=t=>{this.defaultMenuButtonEl=t,this.connectMenuButtonEl()},this.handleCalciteActionClick=()=>{this.open=!1,this.setFocus()},this.menuButtonClick=t=>{r(t)&&this.toggleOpen()},this.updateTooltip=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")));this.tooltipEl=i[0],this.setTooltipReferenceElement()},this.setTooltipReferenceElement=()=>{const{tooltipEl:t,expanded:i,menuButtonEl:e,open:n}=this;t&&(t.referenceElement=i||n?null:e)},this.updateAction=(t,i)=>{const{guid:e,activeMenuItemIndex:n}=this,a=`${e}-action-${i}`;t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=a),t.active=i===n},this.updateActions=t=>{null==t||t.forEach(this.updateAction)},this.handleDefaultSlotChange=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-action")));this.actionElements=i},this.menuButtonKeyDown=t=>{const{key:i}=t,{actionElements:e,activeMenuItemIndex:n,open:a}=this;if(e.length){if(u(i)){if(t.preventDefault(),!a)return void this.toggleOpen();const i=e[n];i?i.click():this.toggleOpen(!1)}if("Tab"!==i)return"Escape"===i?(this.toggleOpen(!1),void t.preventDefault()):void this.handleActionNavigation(t,i,e);this.open=!1}},this.handleActionNavigation=(t,i,e)=>{if(!this.isValidKey(i,x))return;if(t.preventDefault(),!this.open)return this.toggleOpen(),"Home"!==i&&"ArrowDown"!==i||(this.activeMenuItemIndex=0),void("End"!==i&&"ArrowUp"!==i||(this.activeMenuItemIndex=e.length-1));"Home"===i&&(this.activeMenuItemIndex=0),"End"===i&&(this.activeMenuItemIndex=e.length-1);const n=this.activeMenuItemIndex;"ArrowUp"===i&&(this.activeMenuItemIndex=m(Math.max(n-1,-1),e.length)),"ArrowDown"===i&&(this.activeMenuItemIndex=m(n+1,e.length))},this.toggleOpenEnd=()=>{this.setFocus(),this.el.removeEventListener("calcitePopoverOpen",this.toggleOpenEnd)},this.toggleOpen=(t=!this.open)=>{this.el.addEventListener("calcitePopoverOpen",this.toggleOpenEnd),this.open=t}}componentWillLoad(){p(this)}componentDidLoad(){f(this)}disconnectedCallback(){this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.activeMenuItemIndex=this.open?0:-1,this.menuButtonEl&&(this.menuButtonEl.active=t),this.calciteActionMenuOpenChange.emit(t),this.setTooltipReferenceElement()}closeCalciteActionMenuOnClick(t){r(t)&&(t.composedPath().includes(this.el)||(this.open=!1))}activeMenuItemIndexHandler(){this.updateActions(this.actionElements)}async setFocus(){await v(this),h(this.menuButtonEl)}renderMenuButton(){const{label:t,scale:i,expanded:n}=this;return e("slot",{name:c.trigger,onSlotchange:this.setMenuButtonEl},e("calcite-action",{class:o.defaultTrigger,icon:s.menu,ref:this.setDefaultMenuButtonEl,scale:i,text:t,textEnabled:n}))}renderMenuItems(){const{actionElements:t,activeMenuItemIndex:i,open:n,menuId:a,menuButtonEl:s,label:c,placement:l,overlayPositioning:r,flipPlacements:h}=this,m=t[i];return e("calcite-popover",{disableFocusTrap:!0,disablePointer:!0,flipPlacements:h,label:c,offsetDistance:0,open:n,overlayPositioning:r,placement:l,referenceElement:s},e("div",{"aria-activedescendant":(null==m?void 0:m.id)||null,"aria-labelledby":null==s?void 0:s.id,class:o.menu,id:a,onClick:this.handleCalciteActionClick,role:"menu",tabIndex:-1},e("slot",{onSlotchange:this.handleDefaultSlotChange})))}render(){return e(n,null,this.renderMenuButton(),this.renderMenuItems(),e("slot",{name:c.tooltip,onSlotchange:this.updateTooltip}))}isValidKey(t,i){return!!i.find((i=>i===t))}get el(){return a(this)}static get watchers(){return{expanded:["expandedHandler"],open:["openHandler"],activeMenuItemIndex:["activeMenuItemIndexHandler"]}}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size-1);color:var(--calcite-ui-text-2)}.menu ::slotted(calcite-action){margin:0.125rem;display:flex;outline-color:transparent}.menu ::slotted(calcite-action[active]){outline:2px solid var(--calcite-ui-brand);outline-offset:0px}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{flex-direction:column;flex-wrap:nowrap;outline:2px solid transparent;outline-offset:2px}";export{g as calcite_action_menu}
|
|
@@ -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.643
|
|
5
5
|
*/
|
|
6
|
-
import{c as t,a as n}from"./p-a014884a.js";import{d as e}from"./p-feffcd8b.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,u=l.y+l.height/2-s.height/2,f=i(n),d=a(f),m=l[d]/2-s[d]/2,p="x"===f;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:u};break;case"left":y={x:l.x-s.width,y:u};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[f]-=m*(e&&p?-1:1);break;case"end":y[f]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function u(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),v=l[p?"floating"===m?"reference":"floating":m],x=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(v)))||e?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:u})),h=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===m?{...a.floating,x:o,y:r}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:u}):a[m]);return{top:x.top-h.top+g.top,bottom:h.bottom-x.bottom+g.bottom,left:x.left-h.left+g.left,right:h.right-x.right+g.right}}const f=Math.min,d=Math.max;function m(t,n,e){return d(t,f(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const v={start:"end",end:"start"};function x(t){return t.replace(/start|end/g,(t=>v[t]))}const h=["top","right","bottom","left"],w=h.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:v=!0,...h}=t,w=o(r),b=[l,...m||(w!==l&&v?function(t){const n=y(t);return[x(t),n,x(n)]}(l):[y(l)])],A=await u(n,h),P=[];let R=(null==(e=i.flip)?void 0:e.overflows)||[];if(f&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(R=[...R,{placement:r,overflows:P}],!P.every((t=>t<=0))){var k,E;const t=(null!=(k=null==(E=i.flip)?void 0:E.index)?k:0)+1,n=b[t];if(n)return{data:{index:t,overflows:R},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var D;const t=null==(D=R.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:D[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return h.some((n=>t[n]>=0))}const R=function(t){let{strategy:n="referenceHidden",...e}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:o}=t;switch(n){case"referenceHidden":{const n=A(await u(t,{...e,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:P(n)}}}case"escaped":{const n=A(await u(t,{...e,altBoundary:!0}),o.floating);return{data:{escapedOffsets:n,escaped:P(n)}}}default:return{}}}}};function k(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function E(t){if(null==t)return window;if(!k(t)){const n=t.ownerDocument;return n&&n.defaultView||window}return t}function D(t){return E(t).getComputedStyle(t)}function F(t){return k(t)?"":t?(t.nodeName||"").toLowerCase():""}function M(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function O(t){return t instanceof E(t).HTMLElement}function $(t){return t instanceof E(t).Element}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof E(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden/.test(n+o+e)&&!["inline","contents"].includes(r)}function S(t){return["table","td","th"].includes(F(t))}function C(t){const n=/firefox/i.test(M()),e=D(t);return"none"!==e.transform||"none"!==e.perspective||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function B(t){return["html","body","#document"].includes(F(t))}const L=Math.min,H=Math.max,I=Math.round;function W(t,n,e){var o,r,i,a;void 0===n&&(n=!1),void 0===e&&(e=!1);const l=t.getBoundingClientRect();let s=1,c=1;n&&O(t)&&(s=t.offsetWidth>0&&I(l.width)/t.offsetWidth||1,c=t.offsetHeight>0&&I(l.height)/t.offsetHeight||1);const u=$(t)?E(t):window,f=!z()&&e,d=(l.left+(f&&null!=(o=null==(r=u.visualViewport)?void 0:r.offsetLeft)?o:0))/s,m=(l.top+(f&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,p=l.width/s,y=l.height/c;return{width:p,height:y,top:m,right:d+p,bottom:m+y,left:d,x:d,y:m}}function q(t){return(n=t,(n instanceof E(n).Node?t.ownerDocument:t.document)||window.document).documentElement;var n}function N(t){return $(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function U(t){return W(q(t)).left+N(t).scrollLeft}function V(t,n,e){const o=O(n),r=q(n),i=W(t,o&&function(t){const n=W(t);return I(n.width)!==t.offsetWidth||I(n.height)!==t.offsetHeight}(n),"fixed"===e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==F(n)||j(r))&&(a=N(n)),O(n)){const t=W(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=U(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function X(t){return"html"===F(t)?t:t.assignedSlot||t.parentNode||(T(t)?t.host:null)||q(t)}function Y(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function G(t){const n=E(t);let e=Y(t);for(;e&&S(e)&&"static"===D(e).position;)e=Y(e);return e&&("html"===F(e)||"body"===F(e)&&"static"===D(e).position&&!C(e))?n:e||function(t){let n=X(t);for(T(n)&&(n=n.host);O(n)&&!B(n);){if(C(n))return n;{const t=n.parentNode;n=T(t)?t.host:t}}return null}(t)||n}function J(t){if(O(t))return{width:t.offsetWidth,height:t.offsetHeight};const n=W(t);return{width:n.width,height:n.height}}function K(t){const n=X(t);return B(n)?t.ownerDocument.body:O(n)&&j(n)?n:K(n)}function Q(t,n){var e;void 0===n&&(n=[]);const o=K(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=E(o),a=r?[i].concat(i.visualViewport||[],j(o)?o:[]):o,l=n.concat(a);return r?l:l.concat(Q(a))}function Z(t,n,e){return"viewport"===n?c(function(t,n){const e=E(t),o=q(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):$(n)?function(t,n){const e=W(t,!1,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft;return{top:o,left:r,x:r,y:o,right:r+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,e):c(function(t){var n;const e=q(t),o=N(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=H(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+U(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=H(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(q(t)))}function _(t){const n=Q(t),e=function(t,n){let e=t;for(;e&&!B(e)&&!n.includes(e)&&(!$(e)||!["absolute","fixed"].includes(D(e).position));){const t=X(e);e=T(t)?t.host:t}return e}(t,n);let o=null;if(e&&O(e)){const t=G(e);j(e)?o=e:O(t)&&(o=t)}return $(o)?n.filter((t=>o&&$(t)&&function(t,n){const e=null==n.getRootNode?void 0:n.getRootNode();if(t.contains(n))return!0;if(e&&T(e)){let e=n;do{if(e&&t===e)return!0;e=e.parentNode||e.host}while(e)}return!1}(t,o)&&"body"!==F(t))):[]}const tt={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?_(n):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Z(n,e,r);return t.top=H(o.top,t.top),t.right=L(o.right,t.right),t.bottom=L(o.bottom,t.bottom),t.left=H(o.left,t.left),t}),Z(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=q(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==F(e)||j(i))&&(a=N(e)),O(e))){const t=W(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}return{...n,x:n.x-a.scrollLeft+l.x,y:n.y-a.scrollTop+l.y}},isElement:$,getDimensions:J,getOffsetParent:G,getDocumentElement:q,getElementRects:t=>{let{reference:n,floating:e,strategy:o}=t;return{reference:V(n,G(e),o),floating:{...J(e),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const nt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},et=async function(){if(nt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return(null==t?void 0:t.brands)?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-6814c9eb.js");tt.getClippingRect=t,tt.getOffsetParent=e,tt.getElementRects=n}}(),ot=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],rt="bottom-start",it={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function at({placement:t,disableFlip:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:f,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,f={x:n,y:e},d=await u(t,c),p=i(o(r)),g="x"===p?"y":"x";let v=f[p],x=f[g];a&&(v=m(v+d["y"===p?"top":"left"],v,v-d["y"===p?"bottom":"right"])),l&&(x=m(x+d["y"===g?"top":"left"],x,x-d["y"===g?"bottom":"right"]));const h=s.fn({...t,[p]:v,[g]:x});return{...h,data:{x:h.x-n,y:h.y-e}}}}),R()];var y,v;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(v={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===v&&(v=0),{name:"offset",options:v,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),u=r(e),f="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&f?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:v}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return u&&"number"==typeof v&&(g="end"===u?-1*v:v),f?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,v);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:f,rects:d,middlewareData:m,placement:p,platform:y,elements:v}=n,{alignment:h=null,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,R=function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&x(e)!==e))}(h,A,b),k=await u(n,P),E=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,D=R[E];if(null==D)return{};const{main:F,cross:M}=g(D,d,await(null==y.isRTL?void 0:y.isRTL(v.floating)));if(p!==D)return{x:c,y:f,reset:{placement:R[0]}};const O=[k[o(D)],k[F],k[M]],$=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:D,overflows:O}],T=R[E+1];if(T)return{data:{index:E+1,overflows:$},reset:{placement:T}};const j=$.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),S=null==(s=j.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=S?S:j[0].placement;return C!==p?{data:{index:E+1,overflows:$},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),f&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:u,rects:f,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(u),v=r(u),x=a(g),h=await d.getDimensions(e),w="y"===g?"top":"left",b="y"===g?"bottom":"right",A=f.reference[x]+f.reference[g]-y[g]-f.floating[x],P=y[g]-f.reference[g],R=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=R?"y"===g?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=f.floating[x]);const E=p[w],D=k-h[x]-p[b],F=k/2-h[x]/2+(A/2-P/2),M=m(E,F,D);return{[g]:y[g]-(("start"===v?p[w]:p[b])>0&&F!==M&&f.reference[x]<=f.floating[x]?F<E?E-F:D-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:f})),d}return[]}function lt(t,n){const e=t.filter((t=>ot.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ot.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function st(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/-leading/gi,"-start").replace(/-trailing/gi,"-end").replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function ct(t,n,e=!1){if(t.open)return e?ut(n):ft(n)}const ut=e(ft,100,{leading:!0,maxWait:100});async function ft({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,disableFlip:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:u,type:f}){var d;if(!t||!n||c&&!u)return null;await et;const{x:m,y:p,placement:y,strategy:g,middlewareData:v}=await(x=t,h=n,w={strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:st(n,o),middleware:at({placement:o,disableFlip:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:u,type:f})},(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=await(null==a.isRTL?void 0:a.isRTL(n));let c=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=l(c,o,s),d=o,m={},p=0;for(let e=0;e<i.length;e++){const{name:y,fn:g}=i[e],{x:v,y:x,data:h,reset:w}=await g({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:n}});u=null!=v?v:u,f=null!=x?x:f,m={...m,[y]:{...m[y],...h}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:f}=l(c,d,s))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:m}})(x,h,{platform:tt,...w}));var x,h,w;if(null==v?void 0:v.arrow){const{x:t,y:n}=v.arrow;Object.assign(u.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const b=(null===(d=null==v?void 0:v.hide)||void 0===d?void 0:d.referenceHidden)?"hidden":null,A=b?"none":null;n.setAttribute("data-placement",y);const P=`translate(${Math.round(m)}px,${Math.round(p)}px)`;Object.assign(n.style,{visibility:b,pointerEvents:A,position:g,top:"0",left:"0",transform:P})}const dt=new WeakMap;function mt(t,n,e){if(!e||!n)return;pt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&ht(e),dt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...$(t)?Q(t):[],...Q(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let u,f=null;if(a){let o=!0;f=new ResizeObserver((()=>{o||e(),o=!1})),$(t)&&!l&&f.observe(t),f.observe(n)}let d=l?W(t):null;return l&&function n(){const o=W(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,u=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}(n,e,(()=>t.reposition())))}function pt(t,n,e){if(!e||!n)return;vt(e).removeEventListener("transitionend",xt);const o=dt.get(t);o&&o(),dt.delete(t)}const yt=Math.ceil(Math.hypot(4,4));function gt(t){t&&"absolute"===t.style.position&&vt(t).addEventListener("transitionend",xt)}function vt(t){return t.shadowRoot||t}function xt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(it.animation)){const n=function(n){return t(n,"[data-placement]")}(e);ht(n),vt(n).removeEventListener("transitionend",xt)}}function ht(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{it as F,pt as a,yt as b,mt as c,rt as d,c as e,lt as f,ct as r,gt as u}
|
|
6
|
+
import{c as t,a as n}from"./p-94b56c57.js";import{d as e}from"./p-3f3c8381.js";function o(t){return t.split("-")[0]}function r(t){return t.split("-")[1]}function i(t){return["top","bottom"].includes(o(t))?"x":"y"}function a(t){return"y"===t?"height":"width"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,u=l.y+l.height/2-s.height/2,f=i(n),d=a(f),m=l[d]/2-s[d]/2,p="x"===f;let y;switch(o(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:u};break;case"left":y={x:l.x-s.width,y:u};break;default:y={x:l.x,y:l.y}}switch(r(n)){case"start":y[f]-=m*(e&&p?-1:1);break;case"end":y[f]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function u(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:u}=t,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),v=l[p?"floating"===m?"reference":"floating":m],x=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(v)))||e?v:v.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:u})),h=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===m?{...a.floating,x:o,y:r}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),strategy:u}):a[m]);return{top:x.top-h.top+g.top,bottom:h.bottom-x.bottom+g.bottom,left:x.left-h.left+g.left,right:h.right-x.right+g.right}}const f=Math.min,d=Math.max;function m(t,n,e){return d(t,f(n,e))}const p={left:"right",right:"left",bottom:"top",top:"bottom"};function y(t){return t.replace(/left|right|bottom|top/g,(t=>p[t]))}function g(t,n,e){void 0===e&&(e=!1);const o=r(t),l=i(t),s=a(l);let c="x"===l?o===(e?"end":"start")?"right":"left":"start"===o?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const v={start:"end",end:"start"};function x(t){return t.replace(/start|end/g,(t=>v[t]))}const h=["top","right","bottom","left"],w=h.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),b=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:i,rects:a,initialPlacement:l,platform:s,elements:c}=n,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",flipAlignment:v=!0,...h}=t,w=o(r),b=[l,...m||(w!==l&&v?function(t){const n=y(t);return[x(t),n,x(n)]}(l):[y(l)])],A=await u(n,h),P=[];let R=(null==(e=i.flip)?void 0:e.overflows)||[];if(f&&P.push(A[w]),d){const{main:t,cross:n}=g(r,a,await(null==s.isRTL?void 0:s.isRTL(c.floating)));P.push(A[t],A[n])}if(R=[...R,{placement:r,overflows:P}],!P.every((t=>t<=0))){var k,E;const t=(null!=(k=null==(E=i.flip)?void 0:E.index)?k:0)+1,n=b[t];if(n)return{data:{index:t,overflows:R},reset:{placement:n}};let e="bottom";switch(p){case"bestFit":{var D;const t=null==(D=R.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:D[0].placement;t&&(e=t);break}case"initialPlacement":e=l}if(r!==e)return{reset:{placement:e}}}return{}}}};function A(t,n){return{top:t.top-n.height,right:t.right-n.width,bottom:t.bottom-n.height,left:t.left-n.width}}function P(t){return h.some((n=>t[n]>=0))}const R=function(t){let{strategy:n="referenceHidden",...e}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:o}=t;switch(n){case"referenceHidden":{const n=A(await u(t,{...e,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:P(n)}}}case"escaped":{const n=A(await u(t,{...e,altBoundary:!0}),o.floating);return{data:{escapedOffsets:n,escaped:P(n)}}}default:return{}}}}};function k(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function E(t){if(null==t)return window;if(!k(t)){const n=t.ownerDocument;return n&&n.defaultView||window}return t}function D(t){return E(t).getComputedStyle(t)}function F(t){return k(t)?"":t?(t.nodeName||"").toLowerCase():""}function M(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function O(t){return t instanceof E(t).HTMLElement}function $(t){return t instanceof E(t).Element}function T(t){return"undefined"!=typeof ShadowRoot&&(t instanceof E(t).ShadowRoot||t instanceof ShadowRoot)}function j(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=D(t);return/auto|scroll|overlay|hidden/.test(n+o+e)&&!["inline","contents"].includes(r)}function S(t){return["table","td","th"].includes(F(t))}function C(t){const n=/firefox/i.test(M()),e=D(t);return"none"!==e.transform||"none"!==e.perspective||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test(M())}function B(t){return["html","body","#document"].includes(F(t))}const L=Math.min,H=Math.max,I=Math.round;function W(t,n,e){var o,r,i,a;void 0===n&&(n=!1),void 0===e&&(e=!1);const l=t.getBoundingClientRect();let s=1,c=1;n&&O(t)&&(s=t.offsetWidth>0&&I(l.width)/t.offsetWidth||1,c=t.offsetHeight>0&&I(l.height)/t.offsetHeight||1);const u=$(t)?E(t):window,f=!z()&&e,d=(l.left+(f&&null!=(o=null==(r=u.visualViewport)?void 0:r.offsetLeft)?o:0))/s,m=(l.top+(f&&null!=(i=null==(a=u.visualViewport)?void 0:a.offsetTop)?i:0))/c,p=l.width/s,y=l.height/c;return{width:p,height:y,top:m,right:d+p,bottom:m+y,left:d,x:d,y:m}}function q(t){return(n=t,(n instanceof E(n).Node?t.ownerDocument:t.document)||window.document).documentElement;var n}function N(t){return $(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function U(t){return W(q(t)).left+N(t).scrollLeft}function V(t,n,e){const o=O(n),r=q(n),i=W(t,o&&function(t){const n=W(t);return I(n.width)!==t.offsetWidth||I(n.height)!==t.offsetHeight}(n),"fixed"===e);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==F(n)||j(r))&&(a=N(n)),O(n)){const t=W(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=U(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}function X(t){return"html"===F(t)?t:t.assignedSlot||t.parentNode||(T(t)?t.host:null)||q(t)}function Y(t){return O(t)&&"fixed"!==D(t).position?t.offsetParent:null}function G(t){const n=E(t);let e=Y(t);for(;e&&S(e)&&"static"===D(e).position;)e=Y(e);return e&&("html"===F(e)||"body"===F(e)&&"static"===D(e).position&&!C(e))?n:e||function(t){let n=X(t);for(T(n)&&(n=n.host);O(n)&&!B(n);){if(C(n))return n;{const t=n.parentNode;n=T(t)?t.host:t}}return null}(t)||n}function J(t){if(O(t))return{width:t.offsetWidth,height:t.offsetHeight};const n=W(t);return{width:n.width,height:n.height}}function K(t){const n=X(t);return B(n)?t.ownerDocument.body:O(n)&&j(n)?n:K(n)}function Q(t,n){var e;void 0===n&&(n=[]);const o=K(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=E(o),a=r?[i].concat(i.visualViewport||[],j(o)?o:[]):o,l=n.concat(a);return r?l:l.concat(Q(a))}function Z(t,n,e){return"viewport"===n?c(function(t,n){const e=E(t),o=q(t),r=e.visualViewport;let i=o.clientWidth,a=o.clientHeight,l=0,s=0;if(r){i=r.width,a=r.height;const t=z();(t||!t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e)):$(n)?function(t,n){const e=W(t,!1,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft;return{top:o,left:r,x:r,y:o,right:r+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(n,e):c(function(t){var n;const e=q(t),o=N(t),r=null==(n=t.ownerDocument)?void 0:n.body,i=H(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=H(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let l=-o.scrollLeft+U(t);const s=-o.scrollTop;return"rtl"===D(r||e).direction&&(l+=H(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:l,y:s}}(q(t)))}function _(t){const n=Q(t),e=function(t,n){let e=t;for(;e&&!B(e)&&!n.includes(e)&&(!$(e)||!["absolute","fixed"].includes(D(e).position));){const t=X(e);e=T(t)?t.host:t}return e}(t,n);let o=null;if(e&&O(e)){const t=G(e);j(e)?o=e:O(t)&&(o=t)}return $(o)?n.filter((t=>o&&$(t)&&function(t,n){const e=null==n.getRootNode?void 0:n.getRootNode();if(t.contains(n))return!0;if(e&&T(e)){let e=n;do{if(e&&t===e)return!0;e=e.parentNode||e.host}while(e)}return!1}(t,o)&&"body"!==F(t))):[]}const tt={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?_(n):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Z(n,e,r);return t.top=H(o.top,t.top),t.right=L(o.right,t.right),t.bottom=L(o.bottom,t.bottom),t.left=H(o.left,t.left),t}),Z(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=O(e),i=q(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==F(e)||j(i))&&(a=N(e)),O(e))){const t=W(e,!0);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}return{...n,x:n.x-a.scrollLeft+l.x,y:n.y-a.scrollTop+l.y}},isElement:$,getDimensions:J,getOffsetParent:G,getDocumentElement:q,getElementRects:t=>{let{reference:n,floating:e,strategy:o}=t;return{reference:V(n,G(e),o),floating:{...J(e),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const nt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},et=async function(){if(nt.floatingUINonChromiumPositioningFix&&/firefox|safari/i.test(function(){const t=navigator.userAgentData;return(null==t?void 0:t.brands)?t.brands.map((t=>`${t.brand}/${t.version}`)).join(" "):navigator.userAgent}())){const{getClippingRect:t,getElementRects:n,getOffsetParent:e}=await import("./p-45c2c679.js");tt.getClippingRect=t,tt.getOffsetParent=e,tt.getElementRects=n}}(),ot=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],rt="bottom-start",it={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function at({placement:t,disableFlip:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:f,type:d}){const p=[(void 0===y&&(y={}),{name:"shift",options:y,async fn(t){const{x:n,y:e,placement:r}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=y,f={x:n,y:e},d=await u(t,c),p=i(o(r)),g="x"===p?"y":"x";let v=f[p],x=f[g];a&&(v=m(v+d["y"===p?"top":"left"],v,v-d["y"===p?"bottom":"right"])),l&&(x=m(x+d["y"===g?"top":"left"],x,x-d["y"===g?"bottom":"right"]));const h=s.fn({...t,[p]:v,[g]:x});return{...h,data:{x:h.x-n,y:h.y-e}}}}),R()];var y,v;if("menu"===d)return[...p,b({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(v={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===v&&(v=0),{name:"offset",options:v,async fn(t){const{x:n,y:e}=t,a=await async function(t,n){const{placement:e,platform:a,elements:l}=t,s=await(null==a.isRTL?void 0:a.isRTL(l.floating)),c=o(e),u=r(e),f="x"===i(e),d=["left","top"].includes(c)?-1:1,m=s&&f?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:v}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return u&&"number"==typeof v&&(g="end"===u?-1*v:v),f?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,v);return{x:n+a.x,y:e+a.y,data:a}}})];return"auto"===t||"auto-start"===t||"auto-end"===t?d.push(function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,i,a,l,s;const{x:c,y:f,rects:d,middlewareData:m,placement:p,platform:y,elements:v}=n,{alignment:h=null,allowedPlacements:b=w,autoAlignment:A=!0,...P}=t,R=function(t,n,e){return(t?[...e.filter((n=>r(n)===t)),...e.filter((n=>r(n)!==t))]:e.filter((t=>o(t)===t))).filter((e=>!t||r(e)===t||!!n&&x(e)!==e))}(h,A,b),k=await u(n,P),E=null!=(e=null==(i=m.autoPlacement)?void 0:i.index)?e:0,D=R[E];if(null==D)return{};const{main:F,cross:M}=g(D,d,await(null==y.isRTL?void 0:y.isRTL(v.floating)));if(p!==D)return{x:c,y:f,reset:{placement:R[0]}};const O=[k[o(D)],k[F],k[M]],$=[...null!=(a=null==(l=m.autoPlacement)?void 0:l.overflows)?a:[],{placement:D,overflows:O}],T=R[E+1];if(T)return{data:{index:E+1,overflows:$},reset:{placement:T}};const j=$.slice().sort(((t,n)=>t.overflows[0]-n.overflows[0])),S=null==(s=j.find((t=>{let{overflows:n}=t;return n.every((t=>t<=0))})))?void 0:s.placement,C=null!=S?S:j[0].placement;return C!==p?{data:{index:E+1,overflows:$},reset:{placement:C}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(b(e?{fallbackPlacements:e}:{})),f&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:o=0}=null!=t?t:{},{x:l,y:c,placement:u,rects:f,platform:d}=n;if(null==e)return{};const p=s(o),y={x:l,y:c},g=i(u),v=r(u),x=a(g),h=await d.getDimensions(e),w="y"===g?"top":"left",b="y"===g?"bottom":"right",A=f.reference[x]+f.reference[g]-y[g]-f.floating[x],P=y[g]-f.reference[g],R=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=R?"y"===g?R.clientHeight||0:R.clientWidth||0:0;0===k&&(k=f.floating[x]);const E=p[w],D=k-h[x]-p[b],F=k/2-h[x]/2+(A/2-P/2),M=m(E,F,D);return{[g]:y[g]-(("start"===v?p[w]:p[b])>0&&F!==M&&f.reference[x]<=f.floating[x]?F<E?E-F:D-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:f})),d}return[]}function lt(t,n){const e=t.filter((t=>ot.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ot.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function st(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/-leading/gi,"-start").replace(/-trailing/gi,"-end").replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function ct(t,n,e=!1){if(t.open)return e?ut(n):ft(n)}const ut=e(ft,100,{leading:!0,maxWait:100});async function ft({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,disableFlip:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:u,type:f}){var d;if(!t||!n||c&&!u)return null;await et;const{x:m,y:p,placement:y,strategy:g,middlewareData:v}=await(x=t,h=n,w={strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:st(n,o),middleware:at({placement:o,disableFlip:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:u,type:f})},(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=await(null==a.isRTL?void 0:a.isRTL(n));let c=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:f}=l(c,o,s),d=o,m={},p=0;for(let e=0;e<i.length;e++){const{name:y,fn:g}=i[e],{x:v,y:x,data:h,reset:w}=await g({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:m,rects:c,platform:a,elements:{reference:t,floating:n}});u=null!=v?v:u,f=null!=x?x:f,m={...m,[y]:{...m[y],...h}},w&&p<=50&&(p++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(c=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:u,y:f}=l(c,d,s))),e=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:m}})(x,h,{platform:tt,...w}));var x,h,w;if(null==v?void 0:v.arrow){const{x:t,y:n}=v.arrow;Object.assign(u.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const b=(null===(d=null==v?void 0:v.hide)||void 0===d?void 0:d.referenceHidden)?"hidden":null,A=b?"none":null;n.setAttribute("data-placement",y);const P=`translate(${Math.round(m)}px,${Math.round(p)}px)`;Object.assign(n.style,{visibility:b,pointerEvents:A,position:g,top:"0",left:"0",transform:P})}const dt=new WeakMap;function mt(t,n,e){if(!e||!n)return;pt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&ht(e),dt.set(t,function(t,n,e,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:l=!1}=o,s=r&&!l,c=s||i?[...$(t)?Q(t):[],...Q(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let u,f=null;if(a){let o=!0;f=new ResizeObserver((()=>{o||e(),o=!1})),$(t)&&!l&&f.observe(t),f.observe(n)}let d=l?W(t):null;return l&&function n(){const o=W(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,u=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=f)||t.disconnect(),f=null,l&&cancelAnimationFrame(u)}}(n,e,(()=>t.reposition())))}function pt(t,n,e){if(!e||!n)return;vt(e).removeEventListener("transitionend",xt);const o=dt.get(t);o&&o(),dt.delete(t)}const yt=Math.ceil(Math.hypot(4,4));function gt(t){t&&"absolute"===t.style.position&&vt(t).addEventListener("transitionend",xt)}function vt(t){return t.shadowRoot||t}function xt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(it.animation)){const n=function(n){return t(n,"[data-placement]")}(e);ht(n),vt(n).removeEventListener("transitionend",xt)}}function ht(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{it as F,pt as a,yt as b,mt as c,rt as d,c as e,lt as f,ct as r,gt as u}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.643
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as n,g as e}from"./p-8611897b.js";import{g as a}from"./p-bee56a1f.js";import{u as o}from"./p-00043507.js";import{c,s as l,a as s}from"./p-79102009.js";const r=class{constructor(n){t(this,n),this.calciteTileSelectChange=i(this,"calciteTileSelectChange",6),this.checked=!1,this.disabled=!1,this.hidden=!1,this.inputEnabled=!1,this.inputAlignment="start",this.type="radio",this.width="auto",this.guid=`calcite-tile-select-${a()}`,this.focused=!1}checkedChanged(t){this.input.checked=t}nameChanged(t){this.input.name=t}async setFocus(){var t;await c(this),null===(t=this.input)||void 0===t||t.setFocus()}checkboxChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation(),this.calciteTileSelectChange.emit()}checkboxFocusBlurHandler(t){t.target===this.input&&(this.focused=t.detail),t.stopPropagation()}radioButtonChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation(),this.calciteTileSelectChange.emit()}radioButtonCheckedChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation()}radioButtonFocusBlurHandler(t){const i=t.target;i===this.input&&(this.focused=i.focused),t.stopPropagation()}click(t){["calcite-tile","calcite-tile-select"].includes(t.target.localName)&&this.input.click()}mouseenter(){"calcite-radio-button"===this.input.localName&&(this.input.hovered=!0),"calcite-checkbox"===this.input.localName&&(this.input.hovered=!0)}mouseleave(){"calcite-radio-button"===this.input.localName&&(this.input.hovered=!1),"calcite-checkbox"===this.input.localName&&(this.input.hovered=!1)}connectedCallback(){this.renderInput()}componentWillLoad(){l(this)}componentDidLoad(){s(this)}disconnectedCallback(){this.input.parentNode.removeChild(this.input)}componentDidRender(){o(this)}renderInput(){this.input=document.createElement("radio"===this.type?"calcite-radio-button":"calcite-checkbox"),this.input.checked=this.checked,this.input.disabled=this.disabled,this.input.hidden=this.hidden,this.input.id=this.guid,this.input.label=this.heading||this.name||"",this.name&&(this.input.name=this.name),this.value&&(this.input.value=null!=this.value?this.value.toString():""),this.el.insertAdjacentElement("beforeend",this.input)}render(){const{checked:t,description:i,disabled:e,focused:a,heading:o,icon:c,inputAlignment:l,inputEnabled:s,width:r}=this;return n("div",{class:{checked:t,container:!0,description:Boolean(i),"description-only":Boolean(!o&&!c&&i),disabled:e,focused:a,heading:Boolean(o),"heading-only":o&&!c&&!i,icon:Boolean(c),"icon-only":!o&&c&&!i,"input-alignment-end":"end"===l,"input-alignment-start":"start"===l,"input-enabled":s,"large-visual":o&&c&&!i,"width-auto":"auto"===r,"width-full":"full"===r}},n("calcite-tile",{active:t,description:i,embed:!0,heading:o,icon:c}),n("slot",null))}get el(){return e(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};r.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host .container{background-color:var(--calcite-ui-foreground-1);box-shadow:0 0 0 1px var(--calcite-ui-border-2);box-sizing:border-box;cursor:pointer;display:inline-block;block-size:100%;max-inline-size:300px;padding:0.75rem;position:relative;vertical-align:top;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .container.checked{z-index:1;box-shadow:0 0 0 1px var(--calcite-ui-brand)}:host .container.heading-only{align-items:center}:host .container:not(.input-enabled) ::slotted(calcite-checkbox),:host .container:not(.input-enabled) ::slotted(calcite-radio-button){position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}:host .container.focused{outline-color:transparent}:host .container.focused:not(.disabled):not(.input-enabled){outline:2px solid var(--calcite-ui-brand);outline-offset:-4px;box-shadow:0 0 0 1px var(--calcite-ui-brand), inset 0 0 0 2px var(--calcite-ui-foreground-1)}:host .container.input-enabled.input-alignment-start.width-auto.heading-only,:host .container.input-enabled.input-alignment-start.width-auto.icon-only,:host .container.input-enabled.input-alignment-start.width-auto.description-only,:host .container.input-enabled.input-alignment-start.width-auto.heading.description,:host .container.input-enabled.input-alignment-start.width-auto.icon.description,:host .container.input-enabled.input-alignment-start.width-auto.heading.icon.description{display:inline-grid;grid-template-columns:max-content 1fr}:host .container.input-enabled.input-alignment-start.heading-only,:host .container.input-enabled.input-alignment-start.icon-only,:host .container.input-enabled.input-alignment-start.description-only,:host .container.input-enabled.input-alignment-start.heading.description,:host .container.input-enabled.input-alignment-start.icon.description,:host .container.input-enabled.input-alignment-start.heading.icon.description{gap:0.75rem}:host .container.input-enabled.input-alignment-start calcite-tile{order:1}:host .container.input-enabled.input-alignment-start.large-visual ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-start.large-visual ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-start:0.75rem}:host .container.input-enabled.input-alignment-end.width-auto.heading-only,:host .container.input-enabled.input-alignment-end.width-auto.icon-only{display:inline-grid;grid-gap:0.75rem;grid-template-columns:max-content 1fr}:host .container.input-enabled.input-alignment-end.heading-only,:host .container.input-enabled.input-alignment-end.icon-only{gap:0.75rem}:host .container.input-enabled.input-alignment-end.description-only ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.description-only ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.heading.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.heading.description ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.icon.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.icon.description ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.heading.icon.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.heading.icon.description ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-end:0.75rem}:host .container.input-enabled.input-alignment-end.large-visual ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.large-visual ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-end:0.75rem}:host .container.width-full{display:flex;max-inline-size:none}:host .container.width-full calcite-tile{flex:1 1 auto}:host(:hover) .container:not(.input-enabled){box-shadow:0 0 0 1px var(--calcite-ui-brand)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";const d=class{constructor(i){t(this,i),this.disabled=!1,this.layout="horizontal"}componentDidRender(){o(this)}render(){return n("slot",null)}get el(){return e(this)}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-wrap:wrap}:host ::slotted(calcite-tile-select){margin-block-end:1px;margin-inline-end:1px}:host([layout=vertical]){flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{r as calcite_tile_select,d as calcite_tile_select_group}
|
|
6
|
+
import{r as t,c as i,h as n,g as e}from"./p-f058f88f.js";import{g as a}from"./p-ec73df09.js";import{u as o}from"./p-60acf1af.js";import{c,s as l,a as s}from"./p-f2e6a78a.js";const r=class{constructor(n){t(this,n),this.calciteTileSelectChange=i(this,"calciteTileSelectChange",6),this.checked=!1,this.disabled=!1,this.hidden=!1,this.inputEnabled=!1,this.inputAlignment="start",this.type="radio",this.width="auto",this.guid=`calcite-tile-select-${a()}`,this.focused=!1}checkedChanged(t){this.input.checked=t}nameChanged(t){this.input.name=t}async setFocus(){var t;await c(this),null===(t=this.input)||void 0===t||t.setFocus()}checkboxChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation(),this.calciteTileSelectChange.emit()}checkboxFocusBlurHandler(t){t.target===this.input&&(this.focused=t.detail),t.stopPropagation()}radioButtonChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation(),this.calciteTileSelectChange.emit()}radioButtonCheckedChangeHandler(t){const i=t.target;i===this.input&&(this.checked=i.checked),t.stopPropagation()}radioButtonFocusBlurHandler(t){const i=t.target;i===this.input&&(this.focused=i.focused),t.stopPropagation()}click(t){["calcite-tile","calcite-tile-select"].includes(t.target.localName)&&this.input.click()}mouseenter(){"calcite-radio-button"===this.input.localName&&(this.input.hovered=!0),"calcite-checkbox"===this.input.localName&&(this.input.hovered=!0)}mouseleave(){"calcite-radio-button"===this.input.localName&&(this.input.hovered=!1),"calcite-checkbox"===this.input.localName&&(this.input.hovered=!1)}connectedCallback(){this.renderInput()}componentWillLoad(){l(this)}componentDidLoad(){s(this)}disconnectedCallback(){this.input.parentNode.removeChild(this.input)}componentDidRender(){o(this)}renderInput(){this.input=document.createElement("radio"===this.type?"calcite-radio-button":"calcite-checkbox"),this.input.checked=this.checked,this.input.disabled=this.disabled,this.input.hidden=this.hidden,this.input.id=this.guid,this.input.label=this.heading||this.name||"",this.name&&(this.input.name=this.name),this.value&&(this.input.value=null!=this.value?this.value.toString():""),this.el.insertAdjacentElement("beforeend",this.input)}render(){const{checked:t,description:i,disabled:e,focused:a,heading:o,icon:c,inputAlignment:l,inputEnabled:s,width:r}=this;return n("div",{class:{checked:t,container:!0,description:Boolean(i),"description-only":Boolean(!o&&!c&&i),disabled:e,focused:a,heading:Boolean(o),"heading-only":o&&!c&&!i,icon:Boolean(c),"icon-only":!o&&c&&!i,"input-alignment-end":"end"===l,"input-alignment-start":"start"===l,"input-enabled":s,"large-visual":o&&c&&!i,"width-auto":"auto"===r,"width-full":"full"===r}},n("calcite-tile",{active:t,description:i,embed:!0,heading:o,icon:c}),n("slot",null))}get el(){return e(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};r.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host .container{background-color:var(--calcite-ui-foreground-1);box-shadow:0 0 0 1px var(--calcite-ui-border-2);box-sizing:border-box;cursor:pointer;display:inline-block;block-size:100%;max-inline-size:300px;padding:0.75rem;position:relative;vertical-align:top;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .container.checked{z-index:1;box-shadow:0 0 0 1px var(--calcite-ui-brand)}:host .container.heading-only{align-items:center}:host .container:not(.input-enabled) ::slotted(calcite-checkbox),:host .container:not(.input-enabled) ::slotted(calcite-radio-button){position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}:host .container.focused{outline-color:transparent}:host .container.focused:not(.disabled):not(.input-enabled){outline:2px solid var(--calcite-ui-brand);outline-offset:-4px;box-shadow:0 0 0 1px var(--calcite-ui-brand), inset 0 0 0 2px var(--calcite-ui-foreground-1)}:host .container.input-enabled.input-alignment-start.width-auto.heading-only,:host .container.input-enabled.input-alignment-start.width-auto.icon-only,:host .container.input-enabled.input-alignment-start.width-auto.description-only,:host .container.input-enabled.input-alignment-start.width-auto.heading.description,:host .container.input-enabled.input-alignment-start.width-auto.icon.description,:host .container.input-enabled.input-alignment-start.width-auto.heading.icon.description{display:inline-grid;grid-template-columns:max-content 1fr}:host .container.input-enabled.input-alignment-start.heading-only,:host .container.input-enabled.input-alignment-start.icon-only,:host .container.input-enabled.input-alignment-start.description-only,:host .container.input-enabled.input-alignment-start.heading.description,:host .container.input-enabled.input-alignment-start.icon.description,:host .container.input-enabled.input-alignment-start.heading.icon.description{gap:0.75rem}:host .container.input-enabled.input-alignment-start calcite-tile{order:1}:host .container.input-enabled.input-alignment-start.large-visual ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-start.large-visual ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-start:0.75rem}:host .container.input-enabled.input-alignment-end.width-auto.heading-only,:host .container.input-enabled.input-alignment-end.width-auto.icon-only{display:inline-grid;grid-gap:0.75rem;grid-template-columns:max-content 1fr}:host .container.input-enabled.input-alignment-end.heading-only,:host .container.input-enabled.input-alignment-end.icon-only{gap:0.75rem}:host .container.input-enabled.input-alignment-end.description-only ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.description-only ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.heading.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.heading.description ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.icon.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.icon.description ::slotted(calcite-radio-button),:host .container.input-enabled.input-alignment-end.heading.icon.description ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.heading.icon.description ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-end:0.75rem}:host .container.input-enabled.input-alignment-end.large-visual ::slotted(calcite-checkbox),:host .container.input-enabled.input-alignment-end.large-visual ::slotted(calcite-radio-button){position:absolute;inset-block-start:0.75rem;inset-inline-end:0.75rem}:host .container.width-full{display:flex;max-inline-size:none}:host .container.width-full calcite-tile{flex:1 1 auto}:host(:hover) .container:not(.input-enabled){box-shadow:0 0 0 1px var(--calcite-ui-brand)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";const d=class{constructor(i){t(this,i),this.disabled=!1,this.layout="horizontal"}componentDidRender(){o(this)}render(){return n("slot",null)}get el(){return e(this)}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-wrap:wrap}:host ::slotted(calcite-tile-select){margin-block-end:1px;margin-inline-end:1px}:host([layout=vertical]){flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{r as calcite_tile_select,d as calcite_tile_select_group}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.643
|
|
5
5
|
*/
|
|
6
|
-
import{e as t}from"./p-
|
|
6
|
+
import{e as t}from"./p-423d9239.js";import"./p-94b56c57.js";import"./p-936bec0c.js";import"./p-ec73df09.js";import"./p-3f3c8381.js";function n(t){return f(t)&&"fixed"!==i(t).position?function(t){let{offsetParent:n}=t,o=t,r=!1;for(;o&&o!==n;){const{assignedSlot:t}=o;if(t){let e=t.offsetParent;if("contents"===i(t).display){const n=t.hasAttribute("style"),r=t.style.display;t.style.display=i(o).display,e=t.offsetParent,t.style.display=r,n||t.removeAttribute("style")}o=t,n!==e&&(n=e,r=!0)}else if(s(o)&&o.host&&r)break;o=s(o)&&o.host||o.parentNode}return n}(t):null}function o(t){const{reference:n,floating:o,strategy:r}=t;return{reference:L(n,S(o),r),floating:{...T(o),x:0,y:0}}}function r(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function e(t){if(null==t)return window;if(!r(t)){const n=t.ownerDocument;return n&&n.defaultView||window}return t}function i(t){return e(t).getComputedStyle(t)}function u(t){return r(t)?"":t?(t.nodeName||"").toLowerCase():""}function c(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function f(t){return t instanceof e(t).HTMLElement}function l(t){return t instanceof e(t).Element}function s(t){return"undefined"!=typeof ShadowRoot&&(t instanceof e(t).ShadowRoot||t instanceof ShadowRoot)}function d(t){const{overflow:n,overflowX:o,overflowY:r,display:e}=i(t);return/auto|scroll|overlay|hidden/.test(n+r+o)&&!["inline","contents"].includes(e)}function a(t){return["table","td","th"].includes(u(t))}function h(t){const n=/firefox/i.test(c()),o=i(t);return"none"!==o.transform||"none"!==o.perspective||n&&"filter"===o.willChange||n&&!!o.filter&&"none"!==o.filter||["transform","perspective"].some((t=>o.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=o.contain;return null!=n&&n.includes(t)}))}function p(){return!/^((?!chrome|android).)*safari/i.test(c())}function w(t){return["html","body","#document"].includes(u(t))}const y=Math.min,v=Math.max,g=Math.round;function x(t,n,o){var r,i,u,c;void 0===n&&(n=!1),void 0===o&&(o=!1);const s=t.getBoundingClientRect();let d=1,a=1;n&&f(t)&&(d=t.offsetWidth>0&&g(s.width)/t.offsetWidth||1,a=t.offsetHeight>0&&g(s.height)/t.offsetHeight||1);const h=l(t)?e(t):window,w=!p()&&o,y=(s.left+(w&&null!=(r=null==(i=h.visualViewport)?void 0:i.offsetLeft)?r:0))/d,v=(s.top+(w&&null!=(u=null==(c=h.visualViewport)?void 0:c.offsetTop)?u:0))/a,x=s.width/d,m=s.height/a;return{width:x,height:m,top:v,right:y+x,bottom:v+m,left:y,x:y,y:v}}function m(t){return(n=t,(n instanceof e(n).Node?t.ownerDocument:t.document)||window.document).documentElement;var n}function b(t){return l(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function j(t){return x(m(t)).left+b(t).scrollLeft}function L(t,n,o){const r=f(n),e=m(n),i=x(t,r&&function(t){const n=x(t);return g(n.width)!==t.offsetWidth||g(n.height)!==t.offsetHeight}(n),"fixed"===o);let c={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(r||!r&&"fixed"!==o)if(("body"!==u(n)||d(e))&&(c=b(n)),f(n)){const t=x(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else e&&(l.x=j(e));return{x:i.left+c.scrollLeft-l.x,y:i.top+c.scrollTop-l.y,width:i.width,height:i.height}}function M(t){return"html"===u(t)?t:t.assignedSlot||t.parentNode||(s(t)?t.host:null)||m(t)}function S(t){const o=e(t);let r=n(t);for(;r&&a(r)&&"static"===i(r).position;)r=n(r);return r&&("html"===u(r)||"body"===u(r)&&"static"===i(r).position&&!h(r))?o:r||function(t){let n=M(t);for(s(n)&&(n=n.host);f(n)&&!w(n);){if(h(n))return n;{const t=n.parentNode;n=s(t)?t.host:t}}return null}(t)||o}function T(t){if(f(t))return{width:t.offsetWidth,height:t.offsetHeight};const n=x(t);return{width:n.width,height:n.height}}function R(t){const n=M(t);return w(n)?t.ownerDocument.body:f(n)&&d(n)?n:R(n)}function k(t,n){var o;void 0===n&&(n=[]);const r=R(t),i=r===(null==(o=t.ownerDocument)?void 0:o.body),u=e(r),c=i?[u].concat(u.visualViewport||[],d(r)?r:[]):r,f=n.concat(c);return i?f:f.concat(k(c))}function A(n,o,r){return"viewport"===o?t(function(t,n){const o=e(t),r=m(t),i=o.visualViewport;let u=r.clientWidth,c=r.clientHeight,f=0,l=0;if(i){u=i.width,c=i.height;const t=p();(t||!t&&"fixed"===n)&&(f=i.offsetLeft,l=i.offsetTop)}return{width:u,height:c,x:f,y:l}}(n,r)):l(o)?function(t,n){const o=x(t,!1,"fixed"===n),r=o.top+t.clientTop,e=o.left+t.clientLeft;return{top:r,left:e,x:e,y:r,right:e+t.clientWidth,bottom:r+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(o,r):t(function(t){var n;const o=m(t),r=b(t),e=null==(n=t.ownerDocument)?void 0:n.body,u=v(o.scrollWidth,o.clientWidth,e?e.scrollWidth:0,e?e.clientWidth:0),c=v(o.scrollHeight,o.clientHeight,e?e.scrollHeight:0,e?e.clientHeight:0);let f=-r.scrollLeft+j(t);const l=-r.scrollTop;return"rtl"===i(e||o).direction&&(f+=v(o.clientWidth,e?e.clientWidth:0)-u),{width:u,height:c,x:f,y:l}}(m(n)))}function B(t){const n=k(t),o=function(t,n){let o=t;for(;o&&!w(o)&&!n.includes(o)&&(!l(o)||!["absolute","fixed"].includes(i(o).position));){const t=M(o);o=s(t)?t.host:t}return o}(t,n);let r=null;if(o&&f(o)){const t=S(o);d(o)?r=o:f(t)&&(r=t)}return l(r)?n.filter((t=>r&&l(t)&&function(t,n){const o=null==n.getRootNode?void 0:n.getRootNode();if(t.contains(n))return!0;if(o&&s(o)){let o=n;do{if(o&&t===o)return!0;o=o.parentNode||o.host}while(o)}return!1}(t,r)&&"body"!==u(t))):[]}function P(t){let{element:n,boundary:o,rootBoundary:r,strategy:e}=t;const i=[..."clippingAncestors"===o?B(n):[].concat(o),r],u=i.reduce(((t,o)=>{const r=A(n,o,e);return t.top=v(r.top,t.top),t.right=y(r.right,t.right),t.bottom=y(r.bottom,t.bottom),t.left=v(r.left,t.left),t}),A(n,i[0],e));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}export{P as getClippingRect,o as getElementRects,S as getOffsetParent}
|
|
@@ -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.643
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,h as a,g as e}from"./p-8611897b.js";import{c as o}from"./p-a014884a.js";import{c as n,d as r,g as c}from"./p-af1d07d8.js";import{c as i}from"./p-2d27b27d.js";import{u as l}from"./p-00043507.js";import{s,r as u}from"./p-1a2217b9.js";import{s as p,a as d,c as h}from"./p-79102009.js";import"./p-d96e27bb.js";import"./p-bee56a1f.js";!function(t){function a(t,a,e){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+a+".",e)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,e){t instanceof HTMLElement||a(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||a(TypeError,"The specified element is not a submit button"),t.form==e||a(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);const b=class{constructor(a){t(this,a),this.alignment="center",this.appearance="solid",this.color="blue",this.disabled=!1,this.intlLoading="Loading",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto",this.mutationObserver=i("mutation",(()=>this.updateHasContent())),this.hasContent=!1,this.hasLoader=!1,this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?s(this):"reset"===t&&u(this))}}loadingChanged(t,a){t&&!a&&(this.hasLoader=!0),!t&&a&&window.setTimeout((()=>{this.hasLoader=!1}),300)}connectedCallback(){this.hasLoader=this.loading,this.setupTextContentObserver(),n(this),this.formEl=o(this.el,this.form?`#${this.form}`:"form")}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),r(this),this.formEl=null}componentWillLoad(){p(this),this.updateHasContent()}componentDidLoad(){d(this)}componentDidRender(){l(this)}render(){const t=this.href?"a":"button",e=t,o=this.hasLoader?a("div",{class:"calcite-button--loader"},a("calcite-loader",{class:this.loading?"loading-in":"loading-out",inline:!0,label:this.intlLoading,scale:"l"===this.scale?"m":"s"})):null,n=!this.iconStart&&!this.iconEnd,r=a("calcite-icon",{class:{icon:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),i=a("calcite-icon",{class:{icon:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),l=a("span",{class:"content"},a("slot",null));return a(e,{"aria-label":c(this),class:{"button-padding":n,"button-padding--shrunk":!n,"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},o,this.iconStart?r:null,this.hasContent?l:null,this.iconEnd?i:null)}async setFocus(){var t;await h(this),null===(t=this.childEl)||void 0===t||t.focus()}updateHasContent(){var t,a;const e=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===(null===(t=this.el.childNodes[0])||void 0===t?void 0:t.nodeName)?(null===(a=this.el.textContent)||void 0===a?void 0:a.trim().length)>0:e}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}get el(){return e(this)}static get watchers(){return{loading:["loadingChanged"]}}};b.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;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin:0.5rem;--calcite-button-padding-x:7px;--calcite-button-padding-y:3px;padding-block:var(--calcite-button-padding-y);padding-inline:var(--calcite-button-padding-x);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-button-content-margin)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{border-width:1px;border-style:solid;border-color:transparent}:host([color=blue]) button,:host([color=blue]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([color=blue]) button:hover,:host([color=blue]) button:focus,:host([color=blue]) a:hover,:host([color=blue]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([color=blue]) button:active,:host([color=blue]) a:active{background-color:var(--calcite-ui-brand-press)}:host([color=blue]) button calcite-loader,:host([color=blue]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=red]) button,:host([color=red]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=red]) button:hover,:host([color=red]) button:focus,:host([color=red]) a:hover,:host([color=red]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([color=red]) button:active,:host([color=red]) a:active{background-color:var(--calcite-ui-danger-press)}:host([color=red]) button calcite-loader,:host([color=red]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=neutral]) button,:host([color=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([color=neutral]) button:hover,:host([color=neutral]) button:focus,:host([color=neutral]) a:hover,:host([color=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([color=neutral]) button:active,:host([color=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([color=neutral]) button calcite-loader,:host([color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([color=inverse]) button,:host([color=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([color=inverse]) button:hover,:host([color=inverse]) button:focus,:host([color=inverse]) a:hover,:host([color=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([color=inverse]) button:active,:host([color=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([color=inverse]) button calcite-loader,:host([color=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=blue]) button,:host([appearance=outline][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:hover,:host([appearance=outline][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][color=blue]) button:focus,:host([appearance=outline][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:active,:host([appearance=outline][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button calcite-loader,:host([appearance=outline][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][color=red]) button,:host([appearance=outline][color=red]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:hover,:host([appearance=outline][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][color=red]) button:focus,:host([appearance=outline][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:active,:host([appearance=outline][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button calcite-loader,:host([appearance=outline][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][color=neutral]) button,:host([appearance=outline][color=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:hover,:host([appearance=outline][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:focus,:host([appearance=outline][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:active,:host([appearance=outline][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button calcite-loader,:host([appearance=outline][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button,:host([appearance=outline][color=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:hover,:host([appearance=outline][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][color=inverse]) button:focus,:host([appearance=outline][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:active,:host([appearance=outline][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][color=inverse]) button calcite-loader,:host([appearance=outline][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear]) button,:host([appearance=clear]) a,:host([appearance=minimal]) button,:host([appearance=minimal]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=blue]) button,:host([appearance=clear][color=blue]) a,:host([appearance=minimal][color=blue]) button,:host([appearance=minimal][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:hover,:host([appearance=clear][color=blue]) a:hover,:host([appearance=minimal][color=blue]) button:hover,:host([appearance=minimal][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=clear][color=blue]) button:focus,:host([appearance=clear][color=blue]) a:focus,:host([appearance=minimal][color=blue]) button:focus,:host([appearance=minimal][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:active,:host([appearance=clear][color=blue]) a:active,:host([appearance=minimal][color=blue]) button:active,:host([appearance=minimal][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button calcite-loader,:host([appearance=clear][color=blue]) a calcite-loader,:host([appearance=minimal][color=blue]) button calcite-loader,:host([appearance=minimal][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=clear][color=red]) button,:host([appearance=clear][color=red]) a,:host([appearance=minimal][color=red]) button,:host([appearance=minimal][color=red]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:hover,:host([appearance=clear][color=red]) a:hover,:host([appearance=minimal][color=red]) button:hover,:host([appearance=minimal][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=clear][color=red]) button:focus,:host([appearance=clear][color=red]) a:focus,:host([appearance=minimal][color=red]) button:focus,:host([appearance=minimal][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:active,:host([appearance=clear][color=red]) a:active,:host([appearance=minimal][color=red]) button:active,:host([appearance=minimal][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button calcite-loader,:host([appearance=clear][color=red]) a calcite-loader,:host([appearance=minimal][color=red]) button calcite-loader,:host([appearance=minimal][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=clear][color=neutral]) button,:host([appearance=clear][color=neutral]) a,:host([appearance=minimal][color=neutral]) button,:host([appearance=minimal][color=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:hover,:host([appearance=clear][color=neutral]) a:hover,:host([appearance=minimal][color=neutral]) button:hover,:host([appearance=minimal][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:focus,:host([appearance=clear][color=neutral]) a:focus,:host([appearance=minimal][color=neutral]) button:focus,:host([appearance=minimal][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:active,:host([appearance=clear][color=neutral]) a:active,:host([appearance=minimal][color=neutral]) button:active,:host([appearance=minimal][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button calcite-loader,:host([appearance=clear][color=neutral]) a calcite-loader,:host([appearance=minimal][color=neutral]) button calcite-loader,:host([appearance=minimal][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button,:host([appearance=clear][color=inverse]) a,:host([appearance=minimal][color=inverse]) button,:host([appearance=minimal][color=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:hover,:host([appearance=clear][color=inverse]) a:hover,:host([appearance=minimal][color=inverse]) button:hover,:host([appearance=minimal][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=clear][color=inverse]) button:focus,:host([appearance=clear][color=inverse]) a:focus,:host([appearance=minimal][color=inverse]) button:focus,:host([appearance=minimal][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:active,:host([appearance=clear][color=inverse]) a:active,:host([appearance=minimal][color=inverse]) button:active,:host([appearance=minimal][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=clear][color=inverse]) button calcite-loader,:host([appearance=clear][color=inverse]) a calcite-loader,:host([appearance=minimal][color=inverse]) button calcite-loader,:host([appearance=minimal][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][split-child=primary]) button,:host([appearance=clear][split-child=primary]) button,:host([appearance=minimal][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline][split-child=secondary]) button,:host([appearance=clear][split-child=secondary]) button,:host([appearance=minimal][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=blue]) button,:host([appearance=transparent][color=blue]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:hover,:host([appearance=transparent][color=blue]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][color=blue]) button:focus,:host([appearance=transparent][color=blue]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:active,:host([appearance=transparent][color=blue]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][color=blue]) button calcite-loader,:host([appearance=transparent][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=red]) button,:host([appearance=transparent][color=red]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:hover,:host([appearance=transparent][color=red]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][color=red]) button:focus,:host([appearance=transparent][color=red]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:active,:host([appearance=transparent][color=red]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][color=red]) button calcite-loader,:host([appearance=transparent][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][color=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y:0}:host([appearance=transparent][color=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][color=inverse]) button,:host([appearance=transparent][color=inverse]) a,:host([appearance=transparent][color=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-button-padding-y:3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-padding-y:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-button-padding-x:1rem;--calcite-button-padding-y:11px}:host([scale=l]) .button-padding--shrunk{--calcite-button-padding-y:9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:2.75rem}";export{b as calcite_button}
|
|
6
|
+
import{r as t,h as a,g as e}from"./p-f058f88f.js";import{c as o}from"./p-94b56c57.js";import{c as n,d as r,g as c}from"./p-1c7e2836.js";import{c as i}from"./p-b012c8ce.js";import{u as l}from"./p-60acf1af.js";import{s,r as u}from"./p-3dea7591.js";import{s as p,a as d,c as h}from"./p-f2e6a78a.js";import"./p-936bec0c.js";import"./p-ec73df09.js";!function(t){function a(t,a,e){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+a+".",e)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,e){t instanceof HTMLElement||a(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||a(TypeError,"The specified element is not a submit button"),t.form==e||a(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);const b=class{constructor(a){t(this,a),this.alignment="center",this.appearance="solid",this.color="blue",this.disabled=!1,this.intlLoading="Loading",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto",this.mutationObserver=i("mutation",(()=>this.updateHasContent())),this.hasContent=!1,this.hasLoader=!1,this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?s(this):"reset"===t&&u(this))}}loadingChanged(t,a){t&&!a&&(this.hasLoader=!0),!t&&a&&window.setTimeout((()=>{this.hasLoader=!1}),300)}connectedCallback(){this.hasLoader=this.loading,this.setupTextContentObserver(),n(this),this.formEl=o(this.el,this.form?`#${this.form}`:"form")}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),r(this),this.formEl=null}componentWillLoad(){p(this),this.updateHasContent()}componentDidLoad(){d(this)}componentDidRender(){l(this)}render(){const t=this.href?"a":"button",e=t,o=this.hasLoader?a("div",{class:"calcite-button--loader"},a("calcite-loader",{class:this.loading?"loading-in":"loading-out",inline:!0,label:this.intlLoading,scale:"l"===this.scale?"m":"s"})):null,n=!this.iconStart&&!this.iconEnd,r=a("calcite-icon",{class:{icon:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),i=a("calcite-icon",{class:{icon:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),l=a("span",{class:"content"},a("slot",null));return a(e,{"aria-label":c(this),class:{"button-padding":n,"button-padding--shrunk":!n,"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},o,this.iconStart?r:null,this.hasContent?l:null,this.iconEnd?i:null)}async setFocus(){var t;await h(this),null===(t=this.childEl)||void 0===t||t.focus()}updateHasContent(){var t,a;const e=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===(null===(t=this.el.childNodes[0])||void 0===t?void 0:t.nodeName)?(null===(a=this.el.textContent)||void 0===a?void 0:a.trim().length)>0:e}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}get el(){return e(this)}static get watchers(){return{loading:["loadingChanged"]}}};b.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;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin:0.5rem;--calcite-button-padding-x:7px;--calcite-button-padding-y:3px;padding-block:var(--calcite-button-padding-y);padding-inline:var(--calcite-button-padding-x);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin)}.icon-start-empty .content{margin-inline-start:unset}.icon-end-empty .content{margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:var(--calcite-button-content-margin)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{margin-inline-end:var(--calcite-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance]) button,:host([appearance]) a{border-width:1px;border-style:solid;border-color:transparent}:host([color=blue]) button,:host([color=blue]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([color=blue]) button:hover,:host([color=blue]) button:focus,:host([color=blue]) a:hover,:host([color=blue]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([color=blue]) button:active,:host([color=blue]) a:active{background-color:var(--calcite-ui-brand-press)}:host([color=blue]) button calcite-loader,:host([color=blue]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=red]) button,:host([color=red]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=red]) button:hover,:host([color=red]) button:focus,:host([color=red]) a:hover,:host([color=red]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([color=red]) button:active,:host([color=red]) a:active{background-color:var(--calcite-ui-danger-press)}:host([color=red]) button calcite-loader,:host([color=red]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=neutral]) button,:host([color=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([color=neutral]) button:hover,:host([color=neutral]) button:focus,:host([color=neutral]) a:hover,:host([color=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([color=neutral]) button:active,:host([color=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([color=neutral]) button calcite-loader,:host([color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([color=inverse]) button,:host([color=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([color=inverse]) button:hover,:host([color=inverse]) button:focus,:host([color=inverse]) a:hover,:host([color=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([color=inverse]) button:active,:host([color=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([color=inverse]) button calcite-loader,:host([color=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=blue]) button,:host([appearance=outline][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:hover,:host([appearance=outline][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][color=blue]) button:focus,:host([appearance=outline][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:active,:host([appearance=outline][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button calcite-loader,:host([appearance=outline][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][color=red]) button,:host([appearance=outline][color=red]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:hover,:host([appearance=outline][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][color=red]) button:focus,:host([appearance=outline][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:active,:host([appearance=outline][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button calcite-loader,:host([appearance=outline][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][color=neutral]) button,:host([appearance=outline][color=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:hover,:host([appearance=outline][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:focus,:host([appearance=outline][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:active,:host([appearance=outline][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button calcite-loader,:host([appearance=outline][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button,:host([appearance=outline][color=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:hover,:host([appearance=outline][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][color=inverse]) button:focus,:host([appearance=outline][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:active,:host([appearance=outline][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][color=inverse]) button calcite-loader,:host([appearance=outline][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear]) button,:host([appearance=clear]) a,:host([appearance=minimal]) button,:host([appearance=minimal]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=blue]) button,:host([appearance=clear][color=blue]) a,:host([appearance=minimal][color=blue]) button,:host([appearance=minimal][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:hover,:host([appearance=clear][color=blue]) a:hover,:host([appearance=minimal][color=blue]) button:hover,:host([appearance=minimal][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=clear][color=blue]) button:focus,:host([appearance=clear][color=blue]) a:focus,:host([appearance=minimal][color=blue]) button:focus,:host([appearance=minimal][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:active,:host([appearance=clear][color=blue]) a:active,:host([appearance=minimal][color=blue]) button:active,:host([appearance=minimal][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button calcite-loader,:host([appearance=clear][color=blue]) a calcite-loader,:host([appearance=minimal][color=blue]) button calcite-loader,:host([appearance=minimal][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=clear][color=red]) button,:host([appearance=clear][color=red]) a,:host([appearance=minimal][color=red]) button,:host([appearance=minimal][color=red]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:hover,:host([appearance=clear][color=red]) a:hover,:host([appearance=minimal][color=red]) button:hover,:host([appearance=minimal][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=clear][color=red]) button:focus,:host([appearance=clear][color=red]) a:focus,:host([appearance=minimal][color=red]) button:focus,:host([appearance=minimal][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:active,:host([appearance=clear][color=red]) a:active,:host([appearance=minimal][color=red]) button:active,:host([appearance=minimal][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button calcite-loader,:host([appearance=clear][color=red]) a calcite-loader,:host([appearance=minimal][color=red]) button calcite-loader,:host([appearance=minimal][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=clear][color=neutral]) button,:host([appearance=clear][color=neutral]) a,:host([appearance=minimal][color=neutral]) button,:host([appearance=minimal][color=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:hover,:host([appearance=clear][color=neutral]) a:hover,:host([appearance=minimal][color=neutral]) button:hover,:host([appearance=minimal][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:focus,:host([appearance=clear][color=neutral]) a:focus,:host([appearance=minimal][color=neutral]) button:focus,:host([appearance=minimal][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:active,:host([appearance=clear][color=neutral]) a:active,:host([appearance=minimal][color=neutral]) button:active,:host([appearance=minimal][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button calcite-loader,:host([appearance=clear][color=neutral]) a calcite-loader,:host([appearance=minimal][color=neutral]) button calcite-loader,:host([appearance=minimal][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button,:host([appearance=clear][color=inverse]) a,:host([appearance=minimal][color=inverse]) button,:host([appearance=minimal][color=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:hover,:host([appearance=clear][color=inverse]) a:hover,:host([appearance=minimal][color=inverse]) button:hover,:host([appearance=minimal][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=clear][color=inverse]) button:focus,:host([appearance=clear][color=inverse]) a:focus,:host([appearance=minimal][color=inverse]) button:focus,:host([appearance=minimal][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:active,:host([appearance=clear][color=inverse]) a:active,:host([appearance=minimal][color=inverse]) button:active,:host([appearance=minimal][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=clear][color=inverse]) button calcite-loader,:host([appearance=clear][color=inverse]) a calcite-loader,:host([appearance=minimal][color=inverse]) button calcite-loader,:host([appearance=minimal][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][split-child=primary]) button,:host([appearance=clear][split-child=primary]) button,:host([appearance=minimal][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline][split-child=secondary]) button,:host([appearance=clear][split-child=secondary]) button,:host([appearance=minimal][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=blue]) button,:host([appearance=transparent][color=blue]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:hover,:host([appearance=transparent][color=blue]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][color=blue]) button:focus,:host([appearance=transparent][color=blue]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:active,:host([appearance=transparent][color=blue]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][color=blue]) button calcite-loader,:host([appearance=transparent][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=red]) button,:host([appearance=transparent][color=red]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:hover,:host([appearance=transparent][color=red]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][color=red]) button:focus,:host([appearance=transparent][color=red]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:active,:host([appearance=transparent][color=red]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][color=red]) button calcite-loader,:host([appearance=transparent][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][color=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y:0}:host([appearance=transparent][color=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][color=inverse]) button,:host([appearance=transparent][color=inverse]) a,:host([appearance=transparent][color=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.5rem}:host([scale=s]) button,:host([scale=s]) a{--calcite-button-padding-y:3px}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-padding-y:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.75rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .button-padding{--calcite-button-padding-x:1rem;--calcite-button-padding-y:11px}:host([scale=l]) .button-padding--shrunk{--calcite-button-padding-y:9px}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:2.75rem}";export{b as calcite_button}
|
|
@@ -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.643
|
|
5
5
|
*/
|
|
6
|
-
import{n as t}from"./p-
|
|
6
|
+
import{n as t}from"./p-5d39c98b.js";import{c as n}from"./p-b012c8ce.js";import{c as e,d as i}from"./p-94b56c57.js";const s=new RegExp("-","g"),r=new RegExp("\\.?0+$");class a{constructor(t){if(this.add=t=>a.fromBigInt(this.value+new a(t).value),this.subtract=t=>a.fromBigInt(this.value-new a(t).value),this.multiply=t=>a._divRound(this.value*new a(t).value,a.SHIFT),this.divide=t=>a._divRound(this.value*a.SHIFT,new a(t).value),t instanceof a)return t;const[n,e]=String(t).split(".").concat("");this.value=BigInt(n+e.padEnd(a.DECIMALS,"0").slice(0,a.DECIMALS))+BigInt(a.ROUNDED&&e[a.DECIMALS]>="5"),this.isNegative="-"===t.charAt(0)}getIntegersAndDecimals(){const t=this.value.toString().replace(s,"").padStart(a.DECIMALS+1,"0");return{integers:t.slice(0,-a.DECIMALS),decimals:t.slice(-a.DECIMALS).replace(r,"")}}toString(){const{integers:t,decimals:n}=this.getIntegersAndDecimals();return`${this.isNegative?"-":""}${t}${n.length?"."+n:""}`}formatToParts(t){const{integers:n,decimals:e}=this.getIntegersAndDecimals(),i=t.numberFormatter.formatToParts(BigInt(n));return this.isNegative&&i.unshift({type:"minusSign",value:t.minusSign}),e.length&&(i.push({type:"decimal",value:t.decimal}),e.split("").forEach((t=>i.push({type:"fraction",value:t})))),i}format(t){const{integers:n,decimals:e}=this.getIntegersAndDecimals();return`${this.isNegative?t.minusSign:""}${t.numberFormatter.format(BigInt(n))}${e.length?`${t.decimal}${e.split("").map((n=>t.numberFormatter.format(Number(n)))).join("")}`:""}`}}function u(t){return!(!t||isNaN(Number(t)))}function o(n){return n&&(e=n,t.some((t=>e.includes(t))))?b(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 u(i)?new a(i).toString():""})):"";var e}a.DECIMALS=100,a.ROUNDED=!0,a.SHIFT=BigInt("1"+"0".repeat(a.DECIMALS)),a._divRound=(t,n)=>a.fromBigInt(t/n+(a.ROUNDED?t*BigInt(2)/n%BigInt(2):BigInt(0))),a.fromBigInt=t=>Object.assign(Object.create(a.prototype),{value:t});const h=/^([-0])0+(?=\d)/,g=/(?!^\.)\.$/,c=/(?!^-)-/g,l=/^-\b0\b\.?0*$/,m=t=>b(t,(t=>{const n=t.replace(c,"").replace(g,"").replace(h,"$1");return u(n)?l.test(n)?n:new a(n).toString():t}));function b(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 d=["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"],p=["arab","arabext","bali","beng","deva","fullwide","gujr","guru","hanidec","khmr","knda","laoo","latn","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt"],f=t=>p.includes(t),w=(new Intl.NumberFormat).resolvedOptions().numberingSystem,$="arab"!==w&&f(w)?w:"latn",v=t=>f(t)?t:$;function I(t){return d.indexOf(t)>-1?t:t?"nb"===(t=t.toLowerCase())?"no":(t.includes("-")&&(t=t.replace(/(\w+)-(\w+)/,((t,n,e)=>`${n}-${e.toUpperCase()}`)),d.includes(t)||(t=t.split("-")[0])),d.includes(t)?t:"en"):"en"}const E=new Set;function x(t){B(t),0===E.size&&j.observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0}),E.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 S(t){E.delete(t),0===E.size&&j.disconnect()}const j=n("mutation",(t=>{t.forEach((t=>{const n=t.target;E.forEach((t=>{const s=!(!t.locale||t.el.lang),r=!i(n,t.el);if(s||r)return;const a=e(t.el,"[lang]");if(!a)return void(t.effectiveLocale="en");const u=a.lang;t.effectiveLocale=a.hasAttribute("lang")&&""===u?"en":u}))}))})),y=new class{constructor(){this.delocalize=t=>this._numberFormatOptions?b(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?b(t,(t=>u(t.trim())?new a(t.trim()).format(this).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=I(null==t?void 0:t.locale),t.numberingSystem=v(null==t?void 0:t.numberingSystem),!this._numberFormatOptions&&"en"===t.locale&&t.numberingSystem===$&&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{$ as a,v as b,x as c,S as d,I as g,u as i,y as n,o as p,m as s,B as u}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.
|
|
4
|
+
* v1.0.0-next.643
|
|
5
5
|
*/
|
|
6
|
-
import{f as t,h as o}from"./p-
|
|
6
|
+
import{f as t,h as o}from"./p-f058f88f.js";import{a as e}from"./p-94b56c57.js";import{S as n}from"./p-060ebc7c.js";import{S as a}from"./p-6e471d13.js";const i=150,c=t=>t.reduce(((t,o)=>t+o),0)/t.length,l=t=>{const o=null==t?void 0:t.length;return{actionWidth:o?c(t.map((t=>t.clientWidth||0))):0,actionHeight:o?c(t.map((t=>t.clientHeight||0))):0}},r=({layout:t,actionCount:o,actionWidth:e,width:n,actionHeight:a,height:i,groupCount:c})=>Math.max(o-(({width:t,actionWidth:o,layout:e,height:n,actionHeight:a,groupCount:i})=>Math.floor((("horizontal"===e?t:n)-2*i)/("horizontal"===e?o:a)))({width:n,actionWidth:e,layout:t,height:i,actionHeight:a,groupCount:c}),0),s=t=>Array.from(t.querySelectorAll("calcite-action")).filter((t=>!t.closest("calcite-action-menu")||t.slot===n.trigger)),p=({actionGroups:o,expanded:e,overflowCount:n})=>{let i=n;o.reverse().forEach((o=>{let n=0;const c=s(o).reverse();c.forEach((t=>{t.slot===a.menuActions&&(t.removeAttribute("slot"),t.textEnabled=e)})),i>0&&c.some((t=>(c.filter((t=>!t.slot)).length>1&&c.length>2&&!t.closest("calcite-action-menu")&&(t.textEnabled=!0,t.setAttribute("slot",a.menuActions),n++,n>1&&i--),i<1))),t(o)}))};function h({parent:t,expanded:o}){s(t).filter((t=>t.slot!==a.menuActions)).forEach((t=>t.textEnabled=o)),t.querySelectorAll("calcite-action-group, calcite-action-menu").forEach((t=>t.expanded=o))}const d=({expanded:t,intlExpand:n,intlCollapse:a,toggle:i,el:c,position:l,tooltip:r,ref:s,scale:p})=>{const h="rtl"===e(c),d=t?a:n,u=["chevrons-left","chevrons-right"];h&&u.reverse();const f="end"===function(t,o){var e;return t||(null===(e=o.closest("calcite-shell-panel"))||void 0===e?void 0:e.position)||"start"}(l,c);return o("calcite-action",{icon:t?f?u[1]:u[0]:f?u[0]:u[1],onClick:i,ref:o=>(({tooltip:t,referenceElement:o,expanded:e,ref:n})=>(t&&(t.referenceElement=!e&&o?o:null),n&&n(o),o))({tooltip:r,referenceElement:o,expanded:t,ref:s}),scale:p,text:d,textEnabled:t})};export{d as E,p as a,r as b,l as g,i as o,s as q,h as t}
|