@esri/calcite-components 1.0.0-next.653 → 1.0.0-next.655
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-043ea88f.entry.js +6 -0
- package/dist/calcite/{p-dee6d536.js → p-04a542d5.js} +2 -2
- package/dist/calcite/{p-2ec7c680.js → p-05c07433.js} +1 -1
- package/dist/calcite/{p-28884998.entry.js → p-06b8eaf1.entry.js} +2 -2
- package/dist/calcite/p-114b5d1c.entry.js +6 -0
- package/dist/calcite/p-15500e9a.entry.js +6 -0
- package/dist/calcite/p-1982152c.entry.js +6 -0
- package/dist/calcite/p-19eef56a.entry.js +6 -0
- package/dist/calcite/p-1d01393e.js +6 -0
- package/dist/calcite/p-1d457dd1.js +6 -0
- package/dist/calcite/p-20a4c9c3.entry.js +6 -0
- package/dist/calcite/{p-406fcc95.entry.js → p-21588351.entry.js} +2 -2
- package/dist/calcite/p-26e36a96.entry.js +6 -0
- package/dist/calcite/p-2964e90c.entry.js +6 -0
- package/dist/calcite/{p-49701eee.js → p-29dc2fc3.js} +1 -1
- package/dist/calcite/{p-bff4c20d.entry.js → p-2e002bf7.entry.js} +2 -2
- package/dist/calcite/p-31512acf.js +6 -0
- package/dist/calcite/{p-e2f5256c.entry.js → p-3403e756.entry.js} +2 -2
- package/dist/calcite/p-340e338f.entry.js +6 -0
- package/dist/calcite/p-3b4fbb37.entry.js +6 -0
- package/dist/calcite/{p-220b7569.entry.js → p-3c0dcfb7.entry.js} +2 -2
- package/dist/calcite/{p-048b7796.js → p-3f55b93b.js} +1 -1
- package/dist/calcite/p-3fcadef4.entry.js +6 -0
- package/dist/calcite/p-442b6798.entry.js +6 -0
- package/dist/calcite/p-46dd2ba4.entry.js +6 -0
- package/dist/calcite/p-47685252.entry.js +6 -0
- package/dist/calcite/p-4a861228.entry.js +6 -0
- package/dist/calcite/p-4b46c28a.entry.js +6 -0
- package/dist/calcite/{p-8fb7ee35.entry.js → p-4f08640a.entry.js} +2 -2
- package/dist/calcite/p-5007e6bd.entry.js +6 -0
- package/dist/calcite/{p-d849b5b6.entry.js → p-56ad5531.entry.js} +2 -2
- package/dist/calcite/p-595da7bb.entry.js +6 -0
- package/dist/calcite/{p-d5e70d38.entry.js → p-62677747.entry.js} +2 -2
- package/dist/calcite/{p-24c048b5.js → p-6c29460f.js} +1 -1
- package/dist/calcite/{p-6e0ecbed.entry.js → p-70af3d23.entry.js} +2 -2
- package/dist/calcite/p-70e5d6c1.entry.js +6 -0
- package/dist/calcite/{p-36046779.js → p-75665b0d.js} +1 -1
- package/dist/calcite/p-789b6bad.entry.js +6 -0
- package/dist/calcite/p-7a197dad.entry.js +6 -0
- package/dist/calcite/p-7ce637a8.entry.js +6 -0
- package/dist/calcite/p-7dfeef91.entry.js +6 -0
- package/dist/calcite/{p-3dc251f4.entry.js → p-8087a217.entry.js} +2 -2
- package/dist/calcite/p-8693a7bb.entry.js +6 -0
- package/dist/calcite/p-883da6ae.js +6 -0
- package/dist/calcite/{p-1e7d0a3e.entry.js → p-894b85ce.entry.js} +2 -2
- package/dist/calcite/{p-675dfbe8.entry.js → p-8d68685d.entry.js} +2 -2
- package/dist/calcite/{p-44a78e82.entry.js → p-914480aa.entry.js} +2 -2
- package/dist/calcite/p-93a37211.entry.js +6 -0
- package/dist/calcite/{p-b567d164.js → p-94d9499a.js} +1 -1
- package/dist/calcite/p-97338377.entry.js +6 -0
- package/dist/calcite/p-9a2d8ab0.entry.js +6 -0
- package/dist/calcite/{p-627cd0ab.entry.js → p-9b91641b.entry.js} +2 -2
- package/dist/calcite/p-9be856ff.entry.js +6 -0
- package/dist/calcite/p-a13d26d4.entry.js +6 -0
- package/dist/calcite/{p-e1fa408f.js → p-a176bb86.js} +2 -2
- package/dist/calcite/p-a2aa2633.entry.js +6 -0
- package/dist/calcite/{p-3274abf2.js → p-a46eae3b.js} +2 -2
- package/dist/calcite/{p-b0cecf6b.js → p-a9ad5958.js} +1 -1
- package/dist/calcite/p-ab331d08.entry.js +6 -0
- package/dist/calcite/p-adc56e8e.entry.js +6 -0
- package/dist/calcite/p-ae16f981.entry.js +6 -0
- package/dist/calcite/{p-0a1f589a.js → p-af6229cc.js} +2 -2
- package/dist/calcite/{p-5a953a75.js → p-b2464ba9.js} +1 -1
- package/dist/calcite/p-b257f060.entry.js +6 -0
- package/dist/calcite/p-b3de53d6.js +6 -0
- package/dist/calcite/p-b52352f0.entry.js +6 -0
- package/dist/calcite/p-b60fc503.js +6 -0
- package/dist/calcite/{p-5bb6cc45.js → p-bb298c47.js} +1 -1
- package/dist/calcite/{p-4296ca3f.js → p-c55e7664.js} +1 -1
- package/dist/calcite/{p-b9184c58.entry.js → p-c66c342c.entry.js} +2 -2
- package/dist/calcite/p-c8cb4d64.entry.js +6 -0
- package/dist/calcite/{p-f857cfa2.entry.js → p-c91c0d84.entry.js} +2 -2
- package/dist/calcite/{p-74c02e3a.js → p-ce2cd41b.js} +3 -3
- package/dist/calcite/{p-98183f7a.js → p-d1250cd5.js} +1 -1
- package/dist/calcite/p-d1ea7e98.entry.js +6 -0
- package/dist/calcite/p-d4897627.js +6 -0
- package/dist/calcite/{p-1a859cf5.js → p-d63eca00.js} +1 -1
- package/dist/calcite/p-d7a2f588.js +6 -0
- package/dist/calcite/p-d9073ba3.entry.js +6 -0
- package/dist/calcite/p-df638ece.entry.js +6 -0
- package/dist/calcite/{p-c8946ac4.js → p-e0117b64.js} +1 -1
- package/dist/calcite/p-e17d5384.entry.js +6 -0
- package/dist/calcite/p-ea9d9c5c.entry.js +6 -0
- package/dist/calcite/{p-4869c10e.js → p-f33ca6d1.js} +2 -2
- package/dist/calcite/p-f4006464.js +6 -0
- package/dist/calcite/p-f5c2dc70.entry.js +6 -0
- package/dist/calcite/{p-a53596e5.js → p-f5dbda7d.js} +1 -1
- package/dist/calcite/{p-e452903d.js → p-f735579b.js} +1 -1
- package/dist/calcite/p-f86dead7.entry.js +6 -0
- package/dist/calcite/{p-1cdae83d.js → p-fb2017d2.js} +1 -1
- package/dist/calcite/{p-a1a81de3.entry.js → p-fd4ed53a.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-8d248ee3.js → ExpandToggle-b5b731d6.js} +7 -8
- package/dist/cjs/{Heading-dd6d6eb7.js → Heading-86fb7f76.js} +2 -2
- package/dist/cjs/{app-globals-35dd7e0f.js → app-globals-f51875dc.js} +2 -2
- package/dist/cjs/{array-bc2da329.js → array-6f9691d3.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-action-bar.cjs.entry.js +17 -20
- package/dist/cjs/calcite-action-group.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-menu.cjs.entry.js +15 -15
- package/dist/cjs/calcite-action-pad.cjs.entry.js +12 -13
- package/dist/cjs/calcite-action.cjs.entry.js +13 -17
- package/dist/cjs/calcite-alert.cjs.entry.js +12 -13
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +11 -12
- package/dist/cjs/calcite-button.cjs.entry.js +15 -19
- package/dist/cjs/calcite-card.cjs.entry.js +7 -7
- package/dist/cjs/calcite-checkbox.cjs.entry.js +11 -12
- package/dist/cjs/calcite-chip.cjs.entry.js +9 -10
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +19 -21
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +30 -37
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +36 -28
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +19 -22
- 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 +10 -11
- package/dist/cjs/calcite-flow.cjs.entry.js +5 -7
- package/dist/cjs/calcite-graph_2.cjs.entry.js +16 -18
- package/dist/cjs/calcite-handle.cjs.entry.js +7 -8
- package/dist/cjs/calcite-icon.cjs.entry.js +7 -8
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +17 -23
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +32 -36
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +23 -31
- package/dist/cjs/calcite-input-text.cjs.entry.js +14 -18
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +23 -27
- package/dist/cjs/calcite-input.cjs.entry.js +25 -33
- 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 +22 -26
- package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +14 -17
- package/dist/cjs/calcite-notice.cjs.entry.js +9 -9
- package/dist/cjs/calcite-option_3.cjs.entry.js +17 -22
- package/dist/cjs/calcite-pagination.cjs.entry.js +8 -8
- package/dist/cjs/calcite-panel.cjs.entry.js +18 -21
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +15 -17
- package/dist/cjs/calcite-popover.cjs.entry.js +12 -12
- package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +5 -7
- package/dist/cjs/calcite-radio-button.cjs.entry.js +11 -11
- package/dist/cjs/calcite-radio-group_2.cjs.entry.js +11 -12
- package/dist/cjs/calcite-rating.cjs.entry.js +12 -14
- package/dist/cjs/calcite-scrim.cjs.entry.js +2 -2
- package/dist/cjs/calcite-shell_3.cjs.entry.js +12 -14
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +10 -15
- package/dist/cjs/calcite-split-button.cjs.entry.js +3 -3
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +17 -22
- package/dist/cjs/calcite-switch.cjs.entry.js +10 -10
- package/dist/cjs/calcite-tab_4.cjs.entry.js +26 -34
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +6 -7
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +12 -15
- package/dist/cjs/calcite-tooltip.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tree_2.cjs.entry.js +16 -21
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +19 -21
- package/dist/cjs/calcite.cjs.js +4 -4
- package/dist/cjs/{conditionalSlot-d2dd31d5.js → conditionalSlot-01e94659.js} +3 -3
- package/dist/cjs/{debounce-fec2cc26.js → debounce-9787fe3f.js} +1 -1
- package/dist/cjs/{dom-8db20575.js → dom-0c006683.js} +13 -13
- package/dist/cjs/{filter-4951900a.js → filter-1f20ad58.js} +3 -3
- package/dist/cjs/{floating-ui-16ec7ef7.js → floating-ui-357b6162.js} +7 -8
- package/dist/cjs/{focusTrapComponent-1f7ac746.js → focusTrapComponent-f6ec01ac.js} +4 -6
- package/dist/cjs/{form-df338099.js → form-affb950f.js} +5 -7
- package/dist/cjs/{guid-7c9bf705.js → guid-bcf2e27d.js} +1 -1
- package/dist/cjs/{index-11cbd6ae.js → index-e7f6d8a9.js} +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-12572356.js → interactive-50819d76.js} +1 -1
- package/dist/cjs/{interfaces-bcf5a504.js → interfaces-65e8ab48.js} +1 -1
- package/dist/cjs/{key-5efe25db.js → key-27cd9b48.js} +1 -1
- package/dist/cjs/{label-f2b57841.js → label-b53d0971.js} +4 -5
- package/dist/cjs/{loadable-fdc027c5.js → loadable-5fff6d49.js} +1 -1
- package/dist/cjs/loader.cjs.js +4 -4
- package/dist/cjs/{locale-ad2e4def.js → locale-7c7ea778.js} +7 -8
- package/dist/cjs/{math-e3bf7036.js → math-b2c68418.js} +1 -1
- package/dist/cjs/{nonChromiumPlatformUtils-ee7586d2.js → nonChromiumPlatformUtils-25b21483.js} +6 -6
- package/dist/cjs/{observers-1cb80ad6.js → observers-93a0a981.js} +1 -1
- package/dist/cjs/{openCloseComponent-42ea9fde.js → openCloseComponent-7e8c6590.js} +1 -1
- package/dist/cjs/{resources-61c779db.js → resources-154a6134.js} +1 -1
- package/dist/cjs/{resources-883ffa52.js → resources-2a151557.js} +3 -3
- package/dist/cjs/{resources-f5a03517.js → resources-34896b85.js} +1 -1
- package/dist/cjs/{resources-125245bd.js → resources-9a470a7e.js} +1 -1
- package/dist/cjs/{resources-e6605c29.js → resources-bdc925d6.js} +1 -1
- package/dist/cjs/{resources-01342a2b.js → resources-d4a726c6.js} +11 -16
- package/dist/cjs/{sortable.esm-ec7f83ae.js → sortable.esm-2e3e4661.js} +1 -1
- package/dist/cjs/{utils-727a0b8e.js → utils-dda0c978.js} +2 -2
- package/dist/collection/components/accordion/accordion.js +2 -2
- 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 +6 -10
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +6 -9
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +2 -2
- 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 +7 -7
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.js +2 -3
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.js +2 -3
- 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 +2 -3
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.js +6 -10
- 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 +2 -3
- package/dist/collection/components/chip/chip.js +2 -3
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.js +9 -11
- package/dist/collection/components/color-picker/resources.js +1 -1
- package/dist/collection/components/color-picker/utils.js +2 -2
- 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 +13 -18
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +4 -6
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +5 -7
- 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 +4 -6
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +7 -8
- package/dist/collection/components/date-picker-month-header/resources.js +14 -1
- package/dist/collection/components/dropdown/dropdown.js +7 -9
- 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 +2 -3
- 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 +3 -5
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +3 -4
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +2 -3
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +3 -5
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +2 -3
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +2 -3
- 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 +9 -15
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +13 -21
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +17 -21
- 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 +11 -19
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +5 -9
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +4 -6
- 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 +8 -12
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +5 -5
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +3 -3
- 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.css +1 -1
- package/dist/collection/components/modal/modal.js +5 -8
- 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 +3 -5
- 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 +8 -11
- 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 +7 -12
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +2 -3
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +2 -3
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +2 -2
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +3 -5
- package/dist/collection/components/radio-group/radio-group.js +3 -4
- 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 +3 -5
- 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 +6 -9
- 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 +2 -2
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.js +4 -6
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.js +6 -11
- 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 +3 -4
- package/dist/collection/components/stepper-item/stepper-item.js +6 -10
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/tab/tab.js +3 -5
- package/dist/collection/components/tab-nav/tab-nav.js +13 -17
- package/dist/collection/components/tab-title/tab-title.js +6 -8
- 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 +2 -3
- 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 +4 -5
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.js +2 -3
- 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 +4 -6
- package/dist/collection/components/tooltip/TooltipManager.js +2 -2
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tree/tree.js +3 -5
- package/dist/collection/components/tree/utils.js +2 -2
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +6 -9
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +3 -3
- package/dist/collection/components/value-list/value-list.js +4 -5
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.js +2 -3
- 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 +11 -11
- package/dist/collection/utils/filter.js +2 -2
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +1 -1
- package/dist/collection/utils/floating-ui.js +4 -5
- package/dist/collection/utils/focusTrapComponent.js +3 -5
- package/dist/collection/utils/form.js +3 -5
- 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 +3 -4
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +4 -5
- 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 +2 -3
- package/dist/collection/utils/theme.js +1 -1
- package/dist/collection/utils/time.js +6 -7
- package/dist/components/ExpandToggle.js +3 -4
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +1 -1
- package/dist/components/action-menu.js +7 -7
- package/dist/components/action.js +6 -10
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +6 -10
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +2 -2
- package/dist/components/calcite-action-bar.js +6 -9
- 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 +2 -3
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +2 -3
- package/dist/components/calcite-avatar.js +1 -1
- package/dist/components/calcite-block-section.js +2 -3
- 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 +9 -11
- package/dist/components/calcite-combobox-item-group.js +1 -1
- package/dist/components/calcite-combobox-item.js +1 -1
- package/dist/components/calcite-combobox.js +13 -18
- 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 +2 -3
- 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 +3 -4
- package/dist/components/calcite-flow.js +3 -5
- 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 +9 -15
- package/dist/components/calcite-input-date-picker.js +17 -21
- package/dist/components/calcite-input-message.js +1 -1
- package/dist/components/calcite-input-number.js +11 -19
- package/dist/components/calcite-input-text.js +5 -9
- package/dist/components/calcite-input-time-picker.js +4 -6
- 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 +5 -5
- package/dist/components/calcite-list.js +8 -12
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +5 -8
- package/dist/components/calcite-notice.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-option.js +3 -5
- package/dist/components/calcite-pagination.js +1 -1
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +2 -3
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +3 -5
- package/dist/components/calcite-radio-button.js +2 -2
- package/dist/components/calcite-radio-group-item.js +1 -1
- package/dist/components/calcite-radio-group.js +3 -4
- package/dist/components/calcite-rating.js +3 -5
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-select.js +6 -9
- package/dist/components/calcite-shell-center-row.js +2 -2
- package/dist/components/calcite-shell-panel.js +4 -6
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +2 -2
- package/dist/components/calcite-sortable-list.js +6 -11
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-stepper-item.js +6 -10
- package/dist/components/calcite-stepper.js +3 -4
- 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 +2 -3
- 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 +4 -6
- package/dist/components/calcite-tip.js +2 -3
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +6 -9
- package/dist/components/calcite-tree.js +4 -6
- package/dist/components/calcite-value-list-item.js +2 -3
- package/dist/components/calcite-value-list.js +6 -7
- package/dist/components/checkbox.js +2 -3
- package/dist/components/chip.js +2 -3
- 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 +19 -7
- package/dist/components/date-picker-month.js +4 -6
- package/dist/components/date-picker.js +5 -7
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +11 -11
- package/dist/components/dropdown.js +7 -9
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +2 -2
- package/dist/components/floating-ui.js +4 -5
- package/dist/components/focusTrapComponent.js +3 -5
- package/dist/components/form.js +3 -5
- package/dist/components/graph.js +3 -5
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +2 -3
- package/dist/components/icon.js +2 -3
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +13 -21
- 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 +3 -4
- 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 +4 -5
- 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 +8 -11
- package/dist/components/pick-list-item.js +2 -3
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +3 -3
- 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 +7 -12
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tab-nav.js +13 -17
- package/dist/components/tab-title.js +6 -8
- package/dist/components/tab.js +3 -5
- package/dist/components/tabs.js +1 -1
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +9 -11
- package/dist/components/tooltip.js +2 -2
- package/dist/components/utils.js +2 -2
- package/dist/components/utils2.js +4 -6
- package/dist/esm/{ExpandToggle-3ec34795.js → ExpandToggle-67f409ce.js} +7 -8
- package/dist/esm/{Heading-f71bbfe4.js → Heading-7d30eb95.js} +2 -2
- package/dist/esm/{app-globals-61e0f5bb.js → app-globals-91c967df.js} +2 -2
- package/dist/esm/{array-f3af604a.js → array-0f371fbe.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +8 -8
- package/dist/esm/calcite-action-bar.entry.js +17 -20
- package/dist/esm/calcite-action-group.entry.js +9 -9
- package/dist/esm/calcite-action-menu.entry.js +15 -15
- package/dist/esm/calcite-action-pad.entry.js +12 -13
- package/dist/esm/calcite-action.entry.js +13 -17
- package/dist/esm/calcite-alert.entry.js +12 -13
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +11 -12
- package/dist/esm/calcite-button.entry.js +15 -19
- package/dist/esm/calcite-card.entry.js +7 -7
- package/dist/esm/calcite-checkbox.entry.js +11 -12
- package/dist/esm/calcite-chip.entry.js +9 -10
- package/dist/esm/calcite-color-picker_3.entry.js +19 -21
- package/dist/esm/calcite-combobox_3.entry.js +30 -37
- package/dist/esm/calcite-date-picker_4.entry.js +36 -28
- package/dist/esm/calcite-dropdown_3.entry.js +19 -22
- 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 +10 -11
- package/dist/esm/calcite-flow.entry.js +5 -7
- package/dist/esm/calcite-graph_2.entry.js +16 -18
- package/dist/esm/calcite-handle.entry.js +7 -8
- package/dist/esm/calcite-icon.entry.js +7 -8
- package/dist/esm/calcite-inline-editable.entry.js +17 -23
- package/dist/esm/calcite-input-date-picker.entry.js +32 -36
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +23 -31
- package/dist/esm/calcite-input-text.entry.js +14 -18
- package/dist/esm/calcite-input-time-picker_2.entry.js +23 -27
- package/dist/esm/calcite-input.entry.js +25 -33
- 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 +22 -26
- package/dist/esm/calcite-loader.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +14 -17
- package/dist/esm/calcite-notice.entry.js +9 -9
- package/dist/esm/calcite-option_3.entry.js +17 -22
- package/dist/esm/calcite-pagination.entry.js +8 -8
- package/dist/esm/calcite-panel.entry.js +18 -21
- package/dist/esm/calcite-pick-list_3.entry.js +15 -17
- package/dist/esm/calcite-popover.entry.js +12 -12
- package/dist/esm/calcite-progress.entry.js +2 -2
- package/dist/esm/calcite-radio-button-group.entry.js +5 -7
- package/dist/esm/calcite-radio-button.entry.js +11 -11
- package/dist/esm/calcite-radio-group_2.entry.js +11 -12
- package/dist/esm/calcite-rating.entry.js +12 -14
- package/dist/esm/calcite-scrim.entry.js +2 -2
- package/dist/esm/calcite-shell_3.entry.js +12 -14
- package/dist/esm/calcite-sortable-list.entry.js +10 -15
- package/dist/esm/calcite-split-button.entry.js +3 -3
- package/dist/esm/calcite-stepper_2.entry.js +17 -22
- package/dist/esm/calcite-switch.entry.js +10 -10
- package/dist/esm/calcite-tab_4.entry.js +26 -34
- package/dist/esm/calcite-tile-select_2.entry.js +6 -7
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +12 -15
- package/dist/esm/calcite-tooltip.entry.js +9 -9
- package/dist/esm/calcite-tree_2.entry.js +16 -21
- package/dist/esm/calcite-value-list_2.entry.js +19 -21
- package/dist/esm/calcite.js +4 -4
- package/dist/esm/{conditionalSlot-be35718d.js → conditionalSlot-7375791c.js} +3 -3
- package/dist/esm/{debounce-511eda6a.js → debounce-fa1ba8dd.js} +1 -1
- package/dist/esm/{dom-3d0a39a1.js → dom-f86880a8.js} +13 -13
- package/dist/esm/{filter-275e53f4.js → filter-fe83cf69.js} +3 -3
- package/dist/esm/{floating-ui-fc56a23b.js → floating-ui-06e2aace.js} +7 -8
- package/dist/esm/{focusTrapComponent-2dcf390f.js → focusTrapComponent-725a0cce.js} +4 -6
- package/dist/esm/{form-99c3afb4.js → form-411e884b.js} +5 -7
- package/dist/esm/{guid-b0902c5e.js → guid-8a166774.js} +1 -1
- package/dist/esm/{index-a3e37dea.js → index-d632f7a1.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-ee12cb1f.js → interactive-3f5bd2e0.js} +1 -1
- package/dist/esm/{interfaces-461b2615.js → interfaces-7ca05385.js} +1 -1
- package/dist/esm/{key-26613542.js → key-d42e35a4.js} +1 -1
- package/dist/esm/{label-b9c0aa89.js → label-39b9caf1.js} +4 -5
- package/dist/esm/{loadable-9a013351.js → loadable-ecb83b69.js} +1 -1
- package/dist/esm/loader.js +4 -4
- package/dist/esm/{locale-35d09242.js → locale-9cc8d692.js} +7 -8
- package/dist/esm/{math-5fdb35a6.js → math-03369c68.js} +1 -1
- package/dist/esm/{nonChromiumPlatformUtils-928c5ed3.js → nonChromiumPlatformUtils-0dda1ba1.js} +6 -6
- package/dist/esm/{observers-1bc07c7a.js → observers-2b56a317.js} +1 -1
- package/dist/esm/{openCloseComponent-1a0f1e5f.js → openCloseComponent-08e9135e.js} +1 -1
- package/dist/esm/{resources-a1b41b10.js → resources-122bdb3c.js} +1 -1
- package/dist/esm/{resources-fd9aac1d.js → resources-34cf847c.js} +11 -16
- package/dist/esm/{resources-205e1a5e.js → resources-8ab3148f.js} +3 -3
- package/dist/esm/{resources-52b91f29.js → resources-b8533188.js} +1 -1
- package/dist/esm/{resources-9c2b241b.js → resources-c1317324.js} +1 -1
- package/dist/esm/{resources-0440659e.js → resources-cca3a0a9.js} +1 -1
- package/dist/esm/{sortable.esm-a20e5345.js → sortable.esm-baccf0e5.js} +1 -1
- package/dist/esm/{utils-a06ba7b4.js → utils-a76ce9e9.js} +2 -2
- package/dist/extras/docs-json.json +2 -2
- 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/date-picker-month-header/resources.d.ts +13 -0
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +0 -1
- package/hydrate/index.js +377 -509
- package/package.json +1 -1
- package/dist/calcite/p-01182fb3.entry.js +0 -6
- package/dist/calcite/p-01cdb480.entry.js +0 -6
- package/dist/calcite/p-0bf47b10.entry.js +0 -6
- package/dist/calcite/p-0fe25017.entry.js +0 -6
- package/dist/calcite/p-169a8a94.entry.js +0 -6
- package/dist/calcite/p-25ca3105.entry.js +0 -6
- package/dist/calcite/p-272fc5c7.entry.js +0 -6
- package/dist/calcite/p-2a4269f0.entry.js +0 -6
- package/dist/calcite/p-2d6e9def.entry.js +0 -6
- package/dist/calcite/p-377b89a4.entry.js +0 -6
- package/dist/calcite/p-3e45b099.entry.js +0 -6
- package/dist/calcite/p-4331211c.js +0 -6
- package/dist/calcite/p-47aa3608.entry.js +0 -6
- package/dist/calcite/p-47f53948.js +0 -6
- package/dist/calcite/p-49a74b3e.js +0 -6
- package/dist/calcite/p-4ee5ad79.js +0 -6
- package/dist/calcite/p-50755b97.entry.js +0 -6
- package/dist/calcite/p-5a715918.entry.js +0 -6
- package/dist/calcite/p-5dd53e64.js +0 -6
- package/dist/calcite/p-5fcff767.entry.js +0 -6
- package/dist/calcite/p-60967994.entry.js +0 -6
- package/dist/calcite/p-6653a04c.entry.js +0 -6
- package/dist/calcite/p-6d2cb8f4.entry.js +0 -6
- package/dist/calcite/p-761d2432.entry.js +0 -6
- package/dist/calcite/p-797fd5dd.entry.js +0 -6
- package/dist/calcite/p-798770da.entry.js +0 -6
- package/dist/calcite/p-7de16322.entry.js +0 -6
- package/dist/calcite/p-88a03f41.entry.js +0 -6
- package/dist/calcite/p-8e4e1bf2.entry.js +0 -6
- package/dist/calcite/p-90e5f7d2.entry.js +0 -6
- package/dist/calcite/p-95d84aec.entry.js +0 -6
- package/dist/calcite/p-9be255ca.entry.js +0 -6
- package/dist/calcite/p-9dd2a286.js +0 -6
- package/dist/calcite/p-9e30a932.entry.js +0 -6
- package/dist/calcite/p-9e30d06b.entry.js +0 -6
- package/dist/calcite/p-a3da6c86.entry.js +0 -6
- package/dist/calcite/p-a4a63866.js +0 -6
- package/dist/calcite/p-ae684eb2.entry.js +0 -6
- package/dist/calcite/p-b52accff.entry.js +0 -6
- package/dist/calcite/p-b858d734.entry.js +0 -6
- package/dist/calcite/p-c1792c48.entry.js +0 -6
- package/dist/calcite/p-c56796e6.entry.js +0 -6
- package/dist/calcite/p-c881f4fc.js +0 -6
- package/dist/calcite/p-c8b9c903.entry.js +0 -6
- package/dist/calcite/p-cce9a30d.entry.js +0 -6
- package/dist/calcite/p-cd5323d3.entry.js +0 -6
- package/dist/calcite/p-d16cee95.entry.js +0 -6
- package/dist/calcite/p-df1e5c64.entry.js +0 -6
- package/dist/calcite/p-e86f837e.js +0 -6
- package/dist/calcite/p-f00cdd90.entry.js +0 -6
- package/dist/calcite/p-f7fffa4a.entry.js +0 -6
- package/dist/calcite/p-fafa19e5.entry.js +0 -6
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as i,h as e,F as a,g as n}from"./p-49701eee.js";import{S as l,C as c,I as o,T as s}from"./p-4296ca3f.js";import{t as r}from"./p-a4a63866.js";import{H as d}from"./p-9dd2a286.js";import{S as h}from"./p-2ec7c680.js";import{u as m}from"./p-1cdae83d.js";import{c as p}from"./p-e452903d.js";import{s as u,a as f,c as g}from"./p-5bb6cc45.js";import"./p-a53596e5.js";import"./p-b0cecf6b.js";const b=class{constructor(e){t(this,e),this.calcitePanelClose=i(this,"calcitePanelClose",6),this.calcitePanelScroll=i(this,"calcitePanelScroll",6),this.resizeObserver=p("resize",(()=>this.resizeHandler())),this.resizeHandler=()=>{const{panelScrollEl:t}=this;t&&"number"==typeof t.scrollHeight&&"number"==typeof t.offsetHeight&&(t.tabIndex=t.scrollHeight>t.offsetHeight?0:-1)},this.setContainerRef=t=>{this.containerEl=t},this.setCloseRef=t=>{this.closeButtonEl=t},this.setBackRef=t=>{this.backButtonEl=t},this.panelKeyDownHandler=t=>{this.closable&&"Escape"===t.key&&!t.defaultPrevented&&(this.close(),t.preventDefault())},this.close=()=>{this.closed=!0,this.calcitePanelClose.emit()},this.panelScrollHandler=()=>{this.calcitePanelScroll.emit()},this.handleHeaderActionsStartSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasStartActions=!!i.length},this.handleHeaderActionsEndSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasEndActions=!!i.length},this.handleHeaderMenuActionsSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasMenuItems=!!i.length},this.handleHeaderContentSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasHeaderContent=!!i.length},this.handleFooterSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasFooterContent=!!i.length},this.handleFooterActionsSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasFooterActions=!!i.length},this.handleFabSlotChange=t=>{const i=t.target.assignedElements({flatten:!0});this.hasFab=!!i.length},this.setPanelScrollEl=t=>{var i,e;this.panelScrollEl=t,null===(i=this.resizeObserver)||void 0===i||i.disconnect(),t&&(null===(e=this.resizeObserver)||void 0===e||e.observe(t),this.resizeHandler())},this.closed=!1,this.disabled=!1,this.closable=!1,this.headingLevel=void 0,this.heightScale=void 0,this.widthScale=void 0,this.loading=!1,this.intlClose=void 0,this.intlOptions=void 0,this.heading=void 0,this.description=void 0,this.menuOpen=!1,this.hasStartActions=!1,this.hasEndActions=!1,this.hasMenuItems=!1,this.hasHeaderContent=!1,this.hasFooterContent=!1,this.hasFooterActions=!1,this.hasFab=!1}componentWillLoad(){u(this)}componentDidLoad(){f(this)}componentDidRender(){m(this)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}async setFocus(t){await g(this);const{backButtonEl:i,closeButtonEl:e,containerEl:a}=this;"back-button"!==t?"dismiss-button"!==t?i?i.setFocus():e?e.setFocus():null==a||a.focus():null==e||e.setFocus():null==i||i.setFocus()}async scrollContentTo(t){var i;null===(i=this.panelScrollEl)||void 0===i||i.scrollTo(t)}renderHeaderContent(){const{heading:t,headingLevel:i,description:a,hasHeaderContent:n}=this,l=t?e(d,{class:c.heading,level:i},t):null,o=a?e("span",{class:c.description},a):null;return n||!l&&!o?null:e("div",{class:c.headerContent,key:"header-content"},l,o)}renderHeaderSlottedContent(){return e("div",{class:c.headerContent,hidden:!this.hasHeaderContent,key:"slotted-header-content"},e("slot",{name:l.headerContent,onSlotchange:this.handleHeaderContentSlotChange}))}renderHeaderStartActions(){const{hasStartActions:t}=this;return e("div",{class:{[c.headerActionsStart]:!0,[c.headerActions]:!0},hidden:!t,key:"header-actions-start"},e("slot",{name:l.headerActionsStart,onSlotchange:this.handleHeaderActionsStartSlotChange}))}renderHeaderActionsEnd(){const{close:t,hasEndActions:i,intlClose:a,closable:n}=this,r=a||s.close,d=n?e("calcite-action",{"aria-label":r,icon:o.close,onClick:t,ref:this.setCloseRef,text:r}):null,h=e("slot",{name:l.headerActionsEnd,onSlotchange:this.handleHeaderActionsEndSlotChange});return e("div",{class:{[c.headerActionsEnd]:!0,[c.headerActions]:!0},hidden:!(i||d),key:"header-actions-end"},h,d)}renderMenu(){const{hasMenuItems:t,intlOptions:i,menuOpen:a}=this;return e("calcite-action-menu",{flipPlacements:["top","bottom"],hidden:!t,key:"menu",label:i||s.options,open:a,placement:"bottom-end"},e("calcite-action",{icon:o.menu,slot:h.trigger,text:i||s.options}),e("slot",{name:l.headerMenuActions,onSlotchange:this.handleHeaderMenuActionsSlotChange}))}renderHeaderNode(){const{hasHeaderContent:t,hasStartActions:i,hasEndActions:a,closable:n,hasMenuItems:l}=this,o=this.renderHeaderContent();return e("header",{class:c.header,hidden:!(t||o||i||a||n||l)},this.renderHeaderStartActions(),this.renderHeaderSlottedContent(),o,this.renderHeaderActionsEnd(),this.renderMenu())}renderFooterNode(){const{hasFooterContent:t,hasFooterActions:i}=this;return e("footer",{class:c.footer,hidden:!(t||i)},e("slot",{key:"footer-slot",name:l.footer,onSlotchange:this.handleFooterSlotChange}),e("slot",{key:"footer-actions-slot",name:l.footerActions,onSlotchange:this.handleFooterActionsSlotChange}))}renderContent(){const{hasFab:t}=this,i=e("slot",{key:"default-slot"}),a=t?e("section",{class:c.contentContainer},i):i;return e("div",{class:{[c.contentWrapper]:!0,[c.contentContainer]:!t,[c.contentHeight]:t},onScroll:this.panelScrollHandler,ref:this.setPanelScrollEl},a,this.renderFab())}renderFab(){return e("div",{class:c.fabContainer,hidden:!this.hasFab},e("slot",{name:l.fab,onSlotchange:this.handleFabSlotChange}))}render(){const{loading:t,panelKeyDownHandler:i,closed:n,closable:l}=this,o=e("article",{"aria-busy":r(t),class:c.container,hidden:n,onKeyDown:i,ref:this.setContainerRef,tabIndex:l?0:-1},this.renderHeaderNode(),this.renderContent(),this.renderFooterNode());return e(a,null,t?e("calcite-scrim",{loading:t}):null,o)}get el(){return n(this)}};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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden;--calcite-min-header-height:calc(var(--calcite-icon-size) * 3);--calcite-panel-max-height:unset;--calcite-panel-width:100%;--calcite-panel-min-width:unset;--calcite-panel-max-width:unset}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.container{margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;background-color:var(--calcite-ui-background);padding:0px;max-block-size:var(--calcite-panel-max-height);inline-size:var(--calcite-panel-width);max-inline-size:var(--calcite-panel-max-width);min-inline-size:var(--calcite-panel-min-width);transition:max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing)}:host([height-scale=s]){--calcite-panel-max-height:40vh}:host([height-scale=m]){--calcite-panel-max-height:60vh}:host([height-scale=l]){--calcite-panel-max-height:80vh}:host([width-scale=s]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 12vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 300px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 150px)}:host([width-scale=m]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 20vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 420px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 240px)}:host([width-scale=l]){--calcite-panel-width:calc(var(--calcite-panel-width-multiplier) * 45vw);--calcite-panel-max-width:calc(var(--calcite-panel-width-multiplier) * 680px);--calcite-panel-min-width:calc(var(--calcite-panel-width-multiplier) * 340px)}.container[hidden]{display:none}.header{border-block-end:1px solid;position:sticky;inset-block-start:0px;z-index:400;inline-size:100%;align-items:stretch;justify-content:flex-start;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3);flex:0 0 auto}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:0.75rem;padding-block:0.875rem;margin-inline-end:auto}.header-content .heading,.header-content .description{display:block;overflow-wrap:break-word;padding:0px}.header-content .heading{margin-inline:0px;margin-block:0px 0.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-medium)}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:stretch}.header-actions--end{margin-inline-start:auto}.content-wrapper{overflow:auto}.content-height{block-size:100%}.content-container{display:flex;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;background-color:var(--calcite-ui-background)}.footer{border-block-start:1px solid;position:sticky;inset-block-end:0px;display:flex;inline-size:100%;justify-content:space-evenly;background-color:var(--calcite-ui-foreground-1);border-block-start-color:var(--calcite-ui-border-3);flex:0 0 auto;min-block-size:3rem;padding:0.5rem}.fab-container{position:sticky;inset-block-end:0px;z-index:300;margin-block:0px;margin-inline:auto;display:block;padding:0.5rem;inset-inline:0;inline-size:-moz-fit-content;inline-size:fit-content}[hidden]{display:none}";export{b as calcite_panel}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{C as n}from"./p-a53596e5.js";import{g as t}from"./p-b0cecf6b.js";function r(n){return n?n.id=n.id||`${n.tagName.toLowerCase()}-${t()}`:""}function o(n){return Array.isArray(n)?n:Array.from(n)}function u(t){const r=f(t,`.${n.darkTheme}, .${n.lightTheme}`);return(null==r?void 0:r.classList.contains("calcite-theme-dark"))?"dark":"light"}function l(n){const t=f(n,"[dir]");return t?t.getAttribute("dir"):"ltr"}function i(n,t,r){const o=n.closest(`[${t}]`);return o?o.getAttribute(t):r}function e(n){return n.getRootNode()}function c(n){return n.host||null}function s(n,{selector:t,id:r}){return function n(o){if(!o)return null;o.assignedSlot&&(o=o.assignedSlot);const u=e(o),l=r?"getElementById"in u?u.getElementById(r):null:t?u.querySelector(t):null,i=c(u);return l||(i?n(i):null)}(n)}function f(n,t){return function n(r){return r?r.closest(t)||n(c(e(r))):null}(n)}function a(n,t){return d(n,t)}function d(n,t){if(!n)return;const r=t(n);if(void 0!==r)return r;const{parentNode:o}=n;return d(o instanceof ShadowRoot?o.host:o,t)}function v(n,t){return!!a(t,(t=>t===n||void 0))}async function y(n){if(n)return function(n){return"function"==typeof(null==n?void 0:n.setFocus)}(n)?n.setFocus():n.focus()}function p(n,t,r){t&&!Array.isArray(t)&&"string"!=typeof t&&(r=t,t=null);const o=t?Array.isArray(t)?t.map((n=>`[slot="${n}"]`)).join(","):`[slot="${t}"]`:":not([slot])";return(null==r?void 0:r.all)?function(n,t,r){let o=":not([slot])"===t?A(n,":not([slot])"):Array.from(n.querySelectorAll(t));o=r&&!1===r.direct?o:o.filter((t=>t.parentElement===n)),o=(null==r?void 0:r.matches)?o.filter((n=>null==n?void 0:n.matches(r.matches))):o;const u=null==r?void 0:r.selector;return u?o.map((n=>Array.from(n.querySelectorAll(u)))).reduce(((n,t)=>[...n,...t]),[]).filter((n=>!!n)):o}(n,o,r):function(n,t,r){let o=":not([slot])"===t?A(n,":not([slot])")[0]||null:n.querySelector(t);o=r&&!1===r.direct||(null==o?void 0:o.parentElement)===n?o:null,o=(null==r?void 0:r.matches)?(null==o?void 0:o.matches(r.matches))?o:null:o;const u=null==r?void 0:r.selector;return u?null==o?void 0:o.querySelector(u):o}(n,o,r)}function A(n,t){return n?Array.from(n.children||[]).filter((n=>null==n?void 0:n.matches(t))):[]}function m(n,t){return Array.from(n.children).filter((n=>n.matches(t)))}function $(n,t,r){return"string"==typeof t&&""!==t?t:""===t?n[r]:void 0}function g(n,t){return!(t.left>n.right||t.right<n.left||t.top>n.bottom||t.bottom<n.top)}function h(n){return Boolean(n).toString()}function b(n){return!!function(n){return n.target.assignedElements({flatten:!0})}(n).length}function j(n){return!(!n.isPrimary||0!==n.button)}export{l as a,$ as b,f as c,v as d,u as e,y as f,p as g,i as h,j as i,r as j,g as k,e as l,m,o as n,s as q,b as s,h as t}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as e,f as i,h as a,H as n,g as s}from"./p-49701eee.js";import{f as o,c as r,b as l,u as c,a as d,r as h,F as p}from"./p-c881f4fc.js";import{c as f,d as m,a as u}from"./p-74c02e3a.js";import{g}from"./p-b0cecf6b.js";import{i as b,t as v,q as w}from"./p-a4a63866.js";import{c as x,d as y}from"./p-048b7796.js";import{H as k}from"./p-9dd2a286.js";import{i as E}from"./p-5a953a75.js";import{s as H,a as P,c as z}from"./p-5bb6cc45.js";import"./p-c8946ac4.js";import"./p-a53596e5.js";const j=new class{constructor(){this.registeredElements=new Map,this.registeredElementCount=0,this.queryPopover=t=>{const{registeredElements:e}=this,i=t.find((t=>e.has(t)));return e.get(i)},this.togglePopovers=t=>{const e=t.composedPath(),i=this.queryPopover(e);i&&!i.triggerDisabled&&i.toggle(),Array.from(this.registeredElements.values()).filter((t=>t!==i&&t.autoClose&&t.open&&!e.includes(t))).forEach((t=>t.toggle(!1)))},this.keyHandler=t=>{t.defaultPrevented||("Escape"===t.key?this.closeAllPopovers():E(t.key)&&this.togglePopovers(t))},this.clickHandler=t=>{b(t)&&this.togglePopovers(t)}}registerElement(t,e){this.registeredElementCount++,this.registeredElements.set(t,e),1===this.registeredElementCount&&this.addListeners()}unregisterElement(t){this.registeredElements.delete(t)&&this.registeredElementCount--,0===this.registeredElementCount&&this.removeListeners()}closeAllPopovers(){Array.from(this.registeredElements.values()).forEach((t=>t.toggle(!1)))}addListeners(){document.addEventListener("pointerdown",this.clickHandler,{capture:!0}),document.addEventListener("keydown",this.keyHandler,{capture:!0})}removeListeners(){document.removeEventListener("pointerdown",this.clickHandler,{capture:!0}),document.removeEventListener("keydown",this.keyHandler,{capture:!0})}},D=class{constructor(i){t(this,i),this.calcitePopoverBeforeClose=e(this,"calcitePopoverBeforeClose",6),this.calcitePopoverClose=e(this,"calcitePopoverClose",6),this.calcitePopoverBeforeOpen=e(this,"calcitePopoverBeforeOpen",6),this.calcitePopoverOpen=e(this,"calcitePopoverOpen",6),this.guid=`calcite-popover-${g()}`,this.openTransitionProp="opacity",this.hasLoaded=!1,this.setTransitionEl=t=>{this.transitionEl=t,x(this),this.focusTrapEl=t,f(this)},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:e}=this;this.filteredFlipPlacements=e?o(e,t):null},this.setUpReferenceElement=(t=!0)=>{this.removeReferences(),this.effectiveReferenceElement=this.getReferenceElement(),r(this,this.effectiveReferenceElement,this.el);const{el:e,referenceElement:i,effectiveReferenceElement:a}=this;t&&i&&!a&&console.warn(`${e.tagName}: reference-element id "${i}" was not found.`,{el:e}),this.addReferences()},this.getId=()=>this.el.id||this.guid,this.setExpandedAttr=()=>{const{effectiveReferenceElement:t,open:e}=this;t&&"setAttribute"in t&&t.setAttribute("aria-expanded",v(e))},this.addReferences=()=>{const{effectiveReferenceElement:t}=this;if(!t)return;const e=this.getId();"setAttribute"in t&&t.setAttribute("aria-controls",e),j.registerElement(t,this.el),this.setExpandedAttr()},this.removeReferences=()=>{const{effectiveReferenceElement:t}=this;t&&("removeAttribute"in t&&(t.removeAttribute("aria-controls"),t.removeAttribute("aria-expanded")),j.unregisterElement(t))},this.hide=()=>{this.open=!1},this.storeArrowEl=t=>{this.arrowEl=t,this.reposition(!0)},this.autoClose=!1,this.closable=!1,this.disableFlip=!1,this.disableFocusTrap=!1,this.disablePointer=!1,this.flipPlacements=void 0,this.heading=void 0,this.headingLevel=void 0,this.label=void 0,this.offsetDistance=l,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.referenceElement=void 0,this.scale="m",this.triggerDisabled=!1,this.intlClose="Close",this.effectiveReferenceElement=void 0}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}offsetDistanceOffsetHandler(){this.reposition(!0)}offsetSkiddingHandler(){this.reposition(!0)}openHandler(t){t?this.reposition(!0):c(this.el),this.setExpandedAttr()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}referenceElementHandler(){this.setUpReferenceElement(),this.reposition(!0)}connectedCallback(){this.setFilteredPlacements(),x(this),this.setUpReferenceElement(this.hasLoaded)}componentWillLoad(){H(this)}componentDidLoad(){P(this),this.referenceElement&&!this.effectiveReferenceElement&&this.setUpReferenceElement(),this.reposition(),this.hasLoaded=!0}disconnectedCallback(){this.removeReferences(),d(this,this.effectiveReferenceElement,this.el),y(this),m(this)}async reposition(t=!1){const{el:e,effectiveReferenceElement:i,placement:a,overlayPositioning:n,disableFlip:s,filteredFlipPlacements:o,offsetDistance:r,offsetSkidding:l,arrowEl:c}=this;return h(this,{floatingEl:e,referenceEl:i,overlayPositioning:n,placement:a,disableFlip:s,flipPlacements:o,offsetDistance:r,offsetSkidding:l,includeArrow:!this.disablePointer,arrowEl:c,type:"popover"},t)}async setFocus(t){await z(this);const{closeButtonEl:e}=this;if("close-button"===t&&e)return i(e),void e.setFocus();u(this)}async toggle(t=!this.open){this.open=t}getReferenceElement(){const{referenceElement:t,el:e}=this;return("string"==typeof t?w(e,{id:t}):t)||null}onBeforeOpen(){this.calcitePopoverBeforeOpen.emit()}onOpen(){this.calcitePopoverOpen.emit(),this.disableFocusTrap||u(this)}onBeforeClose(){this.calcitePopoverBeforeClose.emit()}onClose(){this.calcitePopoverClose.emit(),m(this)}renderCloseButton(){const{intlClose:t,closable:e}=this;return e?a("div",{class:"close-button-container"},a("calcite-action",{class:"close-button",onClick:this.hide,ref:t=>this.closeButtonEl=t,scale:this.scale,text:t},a("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":this.scale}))):null}renderHeader(){const{heading:t,headingLevel:e}=this,i=t?a(k,{class:"heading",level:e},t):null;return i?a("div",{class:"header"},i,this.renderCloseButton()):null}render(){const{effectiveReferenceElement:t,heading:e,label:i,open:s,disablePointer:o}=this,r=t&&s,l=!r,c=o?null:a("div",{class:"arrow",ref:this.storeArrowEl});return a(n,{"aria-hidden":v(l),"aria-label":i,"aria-live":"polite","calcite-hydrated-hidden":l,id:this.getId(),role:"dialog"},a("div",{class:{[p.animation]:!0,[p.animationActive]:r},ref:this.setTransitionEl},c,a("div",{class:{"has-header":!!e,container:!0}},this.renderHeader(),a("div",{class:"content"},a("slot",null)),e?null:this.renderCloseButton())))}get el(){return s(this)}static get watchers(){return{flipPlacements:["flipPlacementsHandler"],offsetDistance:["offsetDistanceOffsetHandler"],offsetSkidding:["offsetSkiddingHandler"],open:["openHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"],referenceElement:["referenceElementHandler"]}}};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{display:block;position:absolute;z-index:900}.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([data-placement^=bottom]) .calcite-floating-ui-anim{transform:translateY(-5px)}:host([data-placement^=top]) .calcite-floating-ui-anim{transform:translateY(5px)}:host([data-placement^=left]) .calcite-floating-ui-anim{transform:translateX(5px)}:host([data-placement^=right]) .calcite-floating-ui-anim{transform:translateX(-5px)}:host([data-placement]) .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}.arrow,.arrow::before{position:absolute;inline-size:8px;block-size:8px;z-index:-1}.arrow::before{content:"";--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transform:rotate(45deg);background:var(--calcite-ui-foreground-1)}:host([data-placement^=top]) .arrow{inset-block-end:-4px}:host([data-placement^=bottom]) .arrow{inset-block-start:-4px}:host([data-placement^=right]) .arrow,:host([data-placement^=left]) .arrow{direction:ltr;text-align:start}:host([data-placement^=left]) .arrow{inset-inline-end:-4px}:host([data-placement^=right]) .arrow{inset-inline-start:-4px}:host([scale=s]) .heading{padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) .heading{padding-inline:0.75rem;padding-block:1rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) .heading{padding-inline:1rem;padding-block:1.25rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host{pointer-events:none}:host([open]){pointer-events:initial}.calcite-floating-ui-anim{border-radius:0.25rem;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1)}.arrow::before{outline:1px solid var(--calcite-ui-border-3)}.header{display:flex;flex:1 1 auto;align-items:stretch;justify-content:flex-start;border-width:0px;border-block-end-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);border-block-end-color:var(--calcite-ui-border-3)}.heading{margin:0px;display:block;flex:1 1 auto;align-self:center;white-space:normal;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);word-wrap:break-word;word-break:break-word}.container{position:relative;display:flex;block-size:100%;flex-direction:row;flex-wrap:nowrap;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1)}.container.has-header{flex-direction:column}.content{display:flex;block-size:100%;inline-size:100%;flex-direction:column;flex-wrap:nowrap;align-self:center;word-wrap:break-word;word-break:break-word}.close-button-container{display:flex;overflow:hidden;flex:0 0 auto;border-start-end-radius:0.25rem;border-end-end-radius:0.25rem}::slotted(calcite-panel),::slotted(calcite-flow){block-size:100%}';export{D as calcite_popover}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,h as i,g as a,f as e,c as s,H as n}from"./p-49701eee.js";import{g as l}from"./p-b0cecf6b.js";import{c as h}from"./p-e452903d.js";import{i as r,k as o}from"./p-a4a63866.js";import{d as c,c as d}from"./p-1a859cf5.js";import{c as u,d as m}from"./p-47f53948.js";import{c as b,d as p,a as v,H as f}from"./p-49a74b3e.js";import{u as g}from"./p-1cdae83d.js";import{i as x}from"./p-5a953a75.js";import{n as k,c as _,d as y}from"./p-4ee5ad79.js";import{s as $,a as w,c as V}from"./p-5bb6cc45.js";import"./p-a53596e5.js";function z(t,i,a){const e=i[0]-t[0];return e?(3*(i[1]-t[1])/e-a)/2:a}function M(t,i,a,e,s){const[n,l]=t,[h,r]=i,o=(h-n)/3;return`C ${s([n+o,l+o*a]).join(",")} ${s([h-o,r-o*e]).join(",")} ${s([h,r]).join(",")}`}const D=class{constructor(i){t(this,i),this.graphId=`calcite-graph-${l()}`,this.resizeObserver=h("resize",(()=>e(this))),this.data=[],this.colorStops=void 0,this.highlightMin=void 0,this.highlightMax=void 0,this.min=void 0,this.max=void 0}connectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.observe(this.el)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}render(){const{data:t,colorStops:a,el:e,highlightMax:s,highlightMin:n,min:l,max:h}=this,r=this.graphId,{clientHeight:o,clientWidth:c}=e;if(!t||0===t.length)return i("svg",{class:"svg",height:o,preserveAspectRatio:"none",viewBox:`0 0 ${c} ${o}`,width:c});const{min:d,max:u}=function(t){const[i,a]=t[0];return t.reduce((({min:t,max:i},[a,e])=>({min:[Math.min(t[0],a),Math.min(t[1],e)],max:[Math.max(i[0],a),Math.max(i[1],e)]})),{min:[i,a],max:[i,a]})}(t);let m=d,b=u;(l<d[0]||l>d[0])&&(m=[l,0]),(h>u[0]||h<u[0])&&(b=[h,u[1]]);const p=function({width:t,height:i,min:a,max:e}){const s=e[0]-a[0],n=e[1]-a[1];return e=>[(e[0]-a[0])/s*t,i-e[1]/n*i]}({min:m,max:b,width:c,height:o}),[v]=p([n,b[1]]),[f]=p([s,b[1]]),g=function({data:t,min:i,max:a,t:e}){if(0===t.length)return"";const[s,n]=e(t[0]),[l,h]=e(i),[r]=e(a);let o,c,d;const u=t.reduce(((i,a,s)=>{if(c=t[s-2],d=t[s-1],s>1){const t=function(t,i,a){const e=i[0]-t[0],s=a[0]-i[0],n=(i[1]-t[1])/(e||s<0&&0),l=(a[1]-i[1])/(s||e<0&&0),h=(n*s+l*e)/(e+s);return(Math.sign(n)+Math.sign(l))*Math.min(Math.abs(n),Math.abs(l),.5*Math.abs(h))||0}(c,d,a),s=void 0===o?z(c,d,t):o,n=M(c,d,s,t,e);return o=t,`${i} ${n}`}return i}),`M ${l},${h} L ${l},${n} L ${s},${n}`),m=t[t.length-1];return`${u} ${M(d,m,o,z(d,m,o),e)} L ${r},${h} Z`}({data:t,min:d,max:u,t:p}),x=a?`url(#linear-gradient-${r})`:void 0;return i("svg",{class:"svg",height:o,preserveAspectRatio:"none",viewBox:`0 0 ${c} ${o}`,width:c},a?i("defs",null,i("linearGradient",{id:`linear-gradient-${r}`,x1:"0",x2:"1",y1:"0",y2:"0"},a.map((({offset:t,color:a,opacity:e})=>i("stop",{offset:100*t+"%","stop-color":a,"stop-opacity":e}))))):null,void 0!==n?[i("mask",{height:"100%",id:`${r}1`,width:"100%",x:"0%",y:"0%"},i("path",{d:`\n M 0,0\n L ${v-1},0\n L ${v-1},${o}\n L 0,${o}\n Z\n `,fill:"white"})),i("mask",{height:"100%",id:`${r}2`,width:"100%",x:"0%",y:"0%"},i("path",{d:`\n M ${v+1},0\n L ${f-1},0\n L ${f-1},${o}\n L ${v+1}, ${o}\n Z\n `,fill:"white"})),i("mask",{height:"100%",id:`${r}3`,width:"100%",x:"0%",y:"0%"},i("path",{d:`\n M ${f+1},0\n L ${c},0\n L ${c},${o}\n L ${f+1}, ${o}\n Z\n `,fill:"white"})),i("path",{class:"graph-path",d:g,fill:x,mask:`url(#${r}1)`}),i("path",{class:"graph-path--highlight",d:g,fill:x,mask:`url(#${r}2)`}),i("path",{class:"graph-path",d:g,fill:x,mask:`url(#${r}3)`})]:i("path",{class:"graph-path",d:g,fill:x}))}get el(){return a(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{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0px;display:block;block-size:100%;inline-size:100%;padding:0px}.svg .graph-path--highlight{fill:var(--calcite-ui-brand);opacity:0.5}";function L(t){return Array.isArray(t)}const F=class{constructor(i){t(this,i),this.calciteSliderInput=s(this,"calciteSliderInput",6),this.calciteSliderChange=s(this,"calciteSliderChange",6),this.activeProp="value",this.guid=`calcite-slider-${l()}`,this.dragUpdate=t=>{if(t.preventDefault(),this.dragProp){const i=this.translate(t.clientX||t.pageX);if(L(this.value)&&"minMaxValue"===this.dragProp)if(this.minValueDragRange&&this.maxValueDragRange&&this.minMaxValueRange){const t=i-this.minValueDragRange,a=i+this.maxValueDragRange;a<=this.max&&t>=this.min&&a-t===this.minMaxValueRange&&this.setValue({minValue:this.clamp(t,"minValue"),maxValue:this.clamp(a,"maxValue")})}else this.minValueDragRange=i-this.minValue,this.maxValueDragRange=this.maxValue-i,this.minMaxValueRange=this.maxValue-this.minValue;else this.setValue({[this.dragProp]:this.clamp(i,this.dragProp)})}},this.pointerUpDragEnd=t=>{r(t)&&this.dragEnd(t)},this.dragEnd=t=>{this.removeDragListeners(),this.focusActiveHandle(t.clientX),this.lastDragPropValue!=this[this.dragProp]&&this.emitChange(),this.dragProp=null,this.lastDragPropValue=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.minMaxValueRange=null},this.storeTrackRef=t=>{this.trackEl=t},this.determineGroupSeparator=t=>{if("number"==typeof t)return k.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},k.localize(t.toString())},this.disabled=!1,this.groupSeparator=!1,this.hasHistogram=!1,this.histogram=void 0,this.histogramStops=void 0,this.labelHandles=!1,this.labelTicks=!1,this.max=100,this.maxLabel=void 0,this.maxValue=void 0,this.min=0,this.minLabel=void 0,this.minValue=void 0,this.mirrored=!1,this.name=void 0,this.numberingSystem=void 0,this.pageStep=void 0,this.precise=!1,this.required=!1,this.snap=!1,this.step=1,this.ticks=void 0,this.value=0,this.scale="m",this.effectiveLocale="",this.minMaxValueRange=null,this.minValueDragRange=null,this.maxValueDragRange=null,this.tickValues=[]}histogramWatcher(t){this.hasHistogram=!!t}valueHandler(){this.setMinMaxFromValue()}minMaxValueHandler(){this.setValueFromMinMax()}connectedCallback(){_(this),this.setMinMaxFromValue(),this.setValueFromMinMax(),u(this),b(this)}disconnectedCallback(){m(this),p(this),y(this),this.removeDragListeners()}componentWillLoad(){$(this),this.tickValues=this.generateTickValues(),L(this.value)||(this.value=this.clamp(this.value)),v(this,this.value),this.snap&&!L(this.value)&&(this.value=this.getClosestStep(this.value)),this.histogram&&(this.hasHistogram=!0)}componentDidLoad(){w(this)}componentDidRender(){this.labelHandles&&(this.adjustHostObscuredHandleLabel("value"),L(this.value)&&(this.adjustHostObscuredHandleLabel("minValue"),this.precise&&!this.hasHistogram||this.hyphenateCollidingRangeHandleLabels())),this.hideObscuredBoundingTickLabels(),g(this)}render(){const t=this.el.id||this.guid,a=L(this.value)?"maxValue":"value",e=L(this.value)?this.maxValue:this.value,s=this.determineGroupSeparator(e),l=this.determineGroupSeparator(this.minValue),h=this.minValue||this.min,r=this.shouldUseMinValue(),o=100*this.getUnitInterval(r?this.minValue:h),c=100*this.getUnitInterval(e),d=this.shouldMirror(),u=`${d?100-o:o}%`,m=`${d?c:100-c}%`,b=L(this.value),p="handle__label handle__label--minValue",v="handle__label handle__label--value",g=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("div",{class:"handle"})),x=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("span",{"aria-hidden":"true",class:v},s),i("span",{"aria-hidden":"true",class:`${v} static`},s),i("span",{"aria-hidden":"true",class:`${v} transformed`},s),i("div",{class:"handle"})),k=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("div",{class:"handle"}),i("span",{"aria-hidden":"true",class:v},s),i("span",{"aria-hidden":"true",class:`${v} static`},s),i("span",{"aria-hidden":"true",class:`${v} transformed`},s)),_=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("div",{class:"handle"}),i("div",{class:"handle-extension"})),y=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("div",{class:"handle-extension"}),i("div",{class:"handle"})),$=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("span",{"aria-hidden":"true",class:v},s),i("span",{"aria-hidden":"true",class:`${v} static`},s),i("span",{"aria-hidden":"true",class:`${v} transformed`},s),i("div",{class:"handle"}),i("div",{class:"handle-extension"})),w=i("div",{"aria-disabled":this.disabled,"aria-label":b?this.maxLabel:this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":e,class:{thumb:!0,"thumb--value":!0,"thumb--active":"minMaxValue"!==this.lastDragProp&&this.dragProp===a,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp=a,onPointerDown:t=>this.pointerDownDragStart(t,a),ref:t=>this.maxHandle=t,role:"slider",style:{right:m},tabIndex:0},i("div",{class:"handle-extension"}),i("div",{class:"handle"}),i("span",{"aria-hidden":"true",class:v},s),i("span",{"aria-hidden":"true",class:`${v} static`},s),i("span",{"aria-hidden":"true",class:`${v} transformed`},s)),V=i("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:t=>this.pointerDownDragStart(t,"minValue"),ref:t=>this.minHandle=t,role:"slider",style:{left:u},tabIndex:0},i("div",{class:"handle"})),z=i("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:t=>this.pointerDownDragStart(t,"minValue"),ref:t=>this.minHandle=t,role:"slider",style:{left:u},tabIndex:0},i("span",{"aria-hidden":"true",class:p},l),i("span",{"aria-hidden":"true",class:`${p} static`},l),i("span",{"aria-hidden":"true",class:`${p} transformed`},l),i("div",{class:"handle"})),M=i("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:t=>this.pointerDownDragStart(t,"minValue"),ref:t=>this.minHandle=t,role:"slider",style:{left:u},tabIndex:0},i("div",{class:"handle"}),i("span",{"aria-hidden":"true",class:p},l),i("span",{"aria-hidden":"true",class:`${p} static`},l),i("span",{"aria-hidden":"true",class:`${p} transformed`},l)),D=i("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:t=>this.pointerDownDragStart(t,"minValue"),ref:t=>this.minHandle=t,role:"slider",style:{left:u},tabIndex:0},i("div",{class:"handle-extension"}),i("div",{class:"handle"})),F=i("div",{"aria-disabled":this.disabled,"aria-label":this.minLabel,"aria-orientation":"horizontal","aria-valuemax":this.max,"aria-valuemin":this.min,"aria-valuenow":this.minValue,class:{thumb:!0,"thumb--minValue":!0,"thumb--active":"minValue"===this.dragProp,"thumb--precise":!0},onBlur:()=>this.activeProp=null,onFocus:()=>this.activeProp="minValue",onPointerDown:t=>this.pointerDownDragStart(t,"minValue"),ref:t=>this.minHandle=t,role:"slider",style:{left:u},tabIndex:0},i("div",{class:"handle-extension"}),i("div",{class:"handle"}),i("span",{"aria-hidden":"true",class:p},l),i("span",{"aria-hidden":"true",class:`${p} static`},l),i("span",{"aria-hidden":"true",class:`${p} transformed`},l));return i(n,{id:t,onTouchStart:this.handleTouchStart},i("div",{class:{container:!0,"container--range":b,[`scale--${this.scale}`]:!0}},this.renderGraph(),i("div",{class:"track",ref:this.storeTrackRef},i("div",{class:"track__range",onPointerDown:t=>this.pointerDownDragStart(t,"minMaxValue"),style:{left:`${d?100-c:o}%`,right:`${d?o:100-c}%`}}),i("div",{class:"ticks"},this.tickValues.map((t=>{const a=100*this.getUnitInterval(t)+"%";let s=t>=h&&t<=e;return r&&(s=t>=this.minValue&&t<=this.maxValue),i("span",{class:{tick:!0,"tick--active":s},style:{left:d?"":a,right:d?a:""}},this.renderTickLabel(t))})))),i("div",{class:"thumb-container"},!this.precise&&!this.labelHandles&&b&&V,!this.hasHistogram&&!this.precise&&this.labelHandles&&b&&z,this.precise&&!this.labelHandles&&b&&D,this.precise&&this.labelHandles&&b&&F,this.hasHistogram&&!this.precise&&this.labelHandles&&b&&M,!this.precise&&!this.labelHandles&&g,!this.hasHistogram&&!this.precise&&this.labelHandles&&x,!this.hasHistogram&&this.precise&&!this.labelHandles&&_,this.hasHistogram&&this.precise&&!this.labelHandles&&y,!this.hasHistogram&&this.precise&&this.labelHandles&&$,this.hasHistogram&&!this.precise&&this.labelHandles&&k,this.hasHistogram&&this.precise&&this.labelHandles&&w,i(f,{component:this}))))}renderGraph(){return this.histogram?i("calcite-graph",{class:"graph",colorStops:this.histogramStops,data:this.histogram,highlightMax:L(this.value)?this.maxValue:this.value,highlightMin:L(this.value)?this.minValue:this.min,max:this.max,min:this.min}):null}renderTickLabel(t){const a=L(this.value),e=t===this.min,s=t===this.max,n=this.determineGroupSeparator(t),l=i("span",{class:{tick__label:!0,"tick__label--min":e,"tick__label--max":s}},n);return this.labelTicks&&!this.hasHistogram&&!a||this.labelTicks&&!this.hasHistogram&&a&&!this.precise&&!this.labelHandles||this.labelTicks&&!this.hasHistogram&&a&&!this.precise&&this.labelHandles||this.labelTicks&&!this.hasHistogram&&a&&this.precise&&(e||s)||this.labelTicks&&this.hasHistogram&&!this.precise&&!this.labelHandles||this.labelTicks&&this.hasHistogram&&this.precise&&!this.labelHandles&&(e||s)||this.labelTicks&&this.hasHistogram&&!this.precise&&this.labelHandles&&(e||s)||this.labelTicks&&this.hasHistogram&&this.precise&&this.labelHandles&&(e||s)?l:null}keyDownHandler(t){const i=this.shouldMirror(),{activeProp:a,max:e,min:s,pageStep:n,step:l}=this,h=this[a],{key:r}=t;if(x(r))return void t.preventDefault();let o;if("ArrowUp"===r||"ArrowRight"===r?o=h+l*(i&&"ArrowRight"===r?-1:1):"ArrowDown"===r||"ArrowLeft"===r?o=h-l*(i&&"ArrowLeft"===r?-1:1):"PageUp"===r?n&&(o=h+n):"PageDown"===r?n&&(o=h-n):"Home"===r?o=s:"End"===r&&(o=e),isNaN(o))return;t.preventDefault();const d=Number(o.toFixed(c(l)));this.setValue({[a]:this.clamp(d,a)})}pointerDownHandler(t){if(!r(t))return;const i=t.clientX||t.pageX,a=this.translate(i);let e="value";L(this.value)&&(e=a>=this.minValue&&a<=this.maxValue&&"minMaxValue"===this.lastDragProp?"minMaxValue":Math.abs(this.maxValue-a)<Math.abs(this.minValue-a)||a>this.maxValue?"maxValue":"minValue"),this.lastDragPropValue=this[e],this.dragStart(e),this.el.shadowRoot.querySelector(".thumb:active")||this.setValue({[e]:this.clamp(a,e)}),this.focusActiveHandle(i)}handleTouchStart(t){t.preventDefault()}async setFocus(){await V(this);const t=this.minHandle?this.minHandle:this.maxHandle;null==t||t.focus()}setValueFromMinMax(){const{minValue:t,maxValue:i}=this;"number"==typeof t&&"number"==typeof i&&(this.value=[t,i])}setMinMaxFromValue(){const{value:t}=this;L(t)&&(this.minValue=t[0],this.maxValue=t[1])}onLabelClick(){this.setFocus()}shouldMirror(){return this.mirrored&&!this.hasHistogram}shouldUseMinValue(){return!!L(this.value)&&(this.hasHistogram&&0===this.maxValue||!this.hasHistogram&&0===this.minValue)}generateTickValues(){const t=[];let i=this.min;for(;this.ticks&&i<this.max+this.ticks;)t.push(Math.min(i,this.max)),i+=this.ticks;return t}pointerDownDragStart(t,i){r(t)&&this.dragStart(i)}dragStart(t){this.dragProp=t,this.lastDragProp=this.dragProp,this.activeProp=t,document.addEventListener("pointermove",this.dragUpdate),document.addEventListener("pointerup",this.pointerUpDragEnd),document.addEventListener("pointercancel",this.dragEnd)}focusActiveHandle(t){switch(this.dragProp){case"minValue":this.minHandle.focus();break;case"maxValue":case"value":this.maxHandle.focus();break;case"minMaxValue":this.getClosestHandle(t).focus()}}emitInput(){this.calciteSliderInput.emit()}emitChange(){this.calciteSliderChange.emit()}removeDragListeners(){document.removeEventListener("pointermove",this.dragUpdate),document.removeEventListener("pointerup",this.pointerUpDragEnd),document.removeEventListener("pointercancel",this.dragEnd)}setValue(t){let i;Object.keys(t).forEach((a=>{const e=t[a];i||(i=this[a]!==e),this[a]=e})),i&&(this.dragProp||this.emitChange(),this.emitInput())}clamp(t,i){return t=d(t,this.min,this.max),"maxValue"===i&&(t=Math.max(t,this.minValue)),"minValue"===i&&(t=Math.min(t,this.maxValue)),t}translate(t){const i=this.max-this.min,{left:a,width:e}=this.trackEl.getBoundingClientRect(),s=(t-a)/e,n=this.shouldMirror(),l=this.clamp(this.min+i*(n?1-s:s));let h=Number(l.toFixed(c(this.step)));return this.snap&&this.step&&(h=this.getClosestStep(h)),h}getClosestStep(t){if(t=Number(this.clamp(t).toFixed(c(this.step))),this.step){const i=Math.round(t/this.step)*this.step;t=Number(this.clamp(i).toFixed(c(this.step)))}return t}getClosestHandle(t){return this.getDistanceX(this.maxHandle,t)>this.getDistanceX(this.minHandle,t)?this.minHandle:this.maxHandle}getDistanceX(t,i){return Math.abs(t.getBoundingClientRect().left-i)}getFontSizeForElement(t){return Number(window.getComputedStyle(t).getPropertyValue("font-size").match(/\d+/)[0])}getUnitInterval(t){return((t=this.clamp(t))-this.min)/(this.max-this.min)}adjustHostObscuredHandleLabel(t){const i=this.el.shadowRoot.querySelector(`.handle__label--${t}`),a=this.el.shadowRoot.querySelector(`.handle__label--${t}.static`),e=this.el.shadowRoot.querySelector(`.handle__label--${t}.transformed`),s=a.getBoundingClientRect(),n=this.getHostOffset(s.left,s.right);i.style.transform=`translateX(${n}px)`,e.style.transform=`translateX(${n}px)`}hyphenateCollidingRangeHandleLabels(){const{shadowRoot:t}=this.el,i=this.shouldMirror(),a=i?"value":"minValue",e=i?"minValue":"value",s=t.querySelector(`.handle__label--${a}`),n=t.querySelector(`.handle__label--${a}.static`),l=t.querySelector(`.handle__label--${a}.transformed`),h=this.getHostOffset(n.getBoundingClientRect().left,n.getBoundingClientRect().right),r=t.querySelector(`.handle__label--${e}`),o=t.querySelector(`.handle__label--${e}.static`),c=t.querySelector(`.handle__label--${e}.transformed`),d=this.getHostOffset(o.getBoundingClientRect().left,o.getBoundingClientRect().right),u=this.getFontSizeForElement(s),m=this.getRangeLabelOverlap(l,c),b=s,p=u/2;if(m>0){if(b.classList.add("hyphen","hyphen--wrap"),0===d&&0===h){let t=m/2-p;t=-1===Math.sign(t)?Math.abs(t):-t;const i=this.getHostOffset(l.getBoundingClientRect().left+t-p,l.getBoundingClientRect().right+t-p);let a=m/2;const e=this.getHostOffset(c.getBoundingClientRect().left+a,c.getBoundingClientRect().right+a);0!==i&&(t+=i,a+=i),0!==e&&(t+=e,a+=e),s.style.transform=`translateX(${t}px)`,l.style.transform=`translateX(${t-p}px)`,r.style.transform=`translateX(${a}px)`,c.style.transform=`translateX(${a}px)`}else if(h>0||d>0)s.style.transform=`translateX(${h+p}px)`,r.style.transform=`translateX(${m+d}px)`,c.style.transform=`translateX(${m+d}px)`;else if(h<0||d<0){let t=Math.abs(h)+m-p;t=-1===Math.sign(t)?Math.abs(t):-t,s.style.transform=`translateX(${t}px)`,l.style.transform=`translateX(${t-p}px)`}}else b.classList.remove("hyphen","hyphen--wrap"),s.style.transform=`translateX(${h}px)`,l.style.transform=`translateX(${h}px)`,r.style.transform=`translateX(${d}px)`,c.style.transform=`translateX(${d}px)`}hideObscuredBoundingTickLabels(){const t=L(this.value);if(!(this.hasHistogram||t||this.labelHandles||this.precise))return;if(!this.hasHistogram&&!t&&this.labelHandles&&!this.precise)return;if(!this.hasHistogram&&!t&&!this.labelHandles&&this.precise)return;if(!this.hasHistogram&&!t&&this.labelHandles&&this.precise)return;if(!this.hasHistogram&&t&&!this.precise)return;if(this.hasHistogram&&!this.precise&&!this.labelHandles)return;const i=this.el.shadowRoot.querySelector(".thumb--minValue"),a=this.el.shadowRoot.querySelector(".thumb--value"),e=this.el.shadowRoot.querySelector(".tick__label--min"),s=this.el.shadowRoot.querySelector(".tick__label--max");!i&&a&&e&&s&&(e.style.opacity=this.isMinTickLabelObscured(e,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,a)?"0":"1"),i&&a&&e&&s&&(e.style.opacity=this.isMinTickLabelObscured(e,i)||this.isMinTickLabelObscured(e,a)?"0":"1",s.style.opacity=this.isMaxTickLabelObscured(s,i)||this.isMaxTickLabelObscured(s,a)&&this.hasHistogram?"0":"1")}getHostOffset(t,i){const a=this.el.getBoundingClientRect();return t+7<a.left?a.left-t-7:i-7>a.right?7-(i-a.right):0}getRangeLabelOverlap(t,i){const a=t.getBoundingClientRect(),e=i.getBoundingClientRect(),s=this.getFontSizeForElement(t);return Math.max(a.right+s-e.left,0)}isMinTickLabelObscured(t,i){const a=t.getBoundingClientRect(),e=i.getBoundingClientRect();return o(a,e)}isMaxTickLabelObscured(t,i){const a=t.getBoundingClientRect(),e=i.getBoundingClientRect();return o(a,e)}get el(){return a(this)}static get watchers(){return{histogram:["histogramWatcher"],value:["valueHandler"],minValue:["minMaxValueHandler"],maxValue:["minMaxValueHandler"]}}};F.style='@charset "UTF-8";@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)}.scale--s{--calcite-slider-handle-size:10px;--calcite-slider-handle-extension-height:6.5px;--calcite-slider-container-font-size:var(--calcite-font-size--3)}.scale--s .handle__label,.scale--s .tick__label{line-height:.75rem}.scale--m{--calcite-slider-handle-size:14px;--calcite-slider-handle-extension-height:8px;--calcite-slider-container-font-size:var(--calcite-font-size--2)}.scale--m .handle__label,.scale--m .tick__label{line-height:1rem}.scale--l{--calcite-slider-handle-size:16px;--calcite-slider-handle-extension-height:10.5px;--calcite-slider-container-font-size:var(--calcite-font-size--1)}.scale--l .handle__label,.scale--l .tick__label{line-height:1rem}.handle__label,.tick__label{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2);font-size:var(--calcite-slider-container-font-size)}:host{display:block}.container{position:relative;display:block;overflow-wrap:normal;word-break:normal;padding-inline:calc(var(--calcite-slider-handle-size) * 0.5);padding-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-block:calc(var(--calcite-slider-handle-size) * 0.5);margin-inline:0;--calcite-slider-full-handle-height:calc(\n var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height)\n )}:host([disabled]) .track__range,:host([disabled]) .tick--active{background-color:var(--calcite-ui-text-3)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-6px}.scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-8px}.scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-9px}:host([precise]:not([has-histogram])) .container .thumb--value{--calcite-slider-thumb-y-offset:calc(var(--calcite-slider-full-handle-height) * -1)}.thumb-container{position:relative;max-inline-size:100%}.thumb{--calcite-slider-thumb-x-offset:calc(var(--calcite-slider-handle-size) * 0.5);position:absolute;margin:0px;display:flex;cursor:pointer;flex-direction:column;align-items:center;border-style:none;background-color:transparent;padding:0px;font-family:inherit;outline:2px solid transparent;outline-offset:2px;transform:translate(var(--calcite-slider-thumb-x-offset), var(--calcite-slider-thumb-y-offset))}.thumb .handle__label.static,.thumb .handle__label.transformed{position:absolute;inset-block:0px;opacity:0}.thumb .handle__label.hyphen::after{content:"—";display:inline-block;inline-size:1em}.thumb .handle__label.hyphen--wrap{display:flex}.thumb .handle{box-sizing:border-box;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;block-size:var(--calcite-slider-handle-size);inline-size:var(--calcite-slider-handle-size);box-shadow:0 0 0 2px var(--calcite-ui-text-3) inset;transition:border var(--calcite-internal-animation-timing-medium) ease, background-color var(--calcite-internal-animation-timing-medium) ease, box-shadow var(--calcite-animation-timing) ease}.thumb .handle-extension{inline-size:0.125rem;block-size:var(--calcite-slider-handle-extension-height);background-color:var(--calcite-ui-text-3)}.thumb:hover .handle{box-shadow:0 0 0 3px var(--calcite-ui-brand) inset}.thumb:hover .handle-extension{background-color:var(--calcite-ui-brand)}.thumb:focus .handle{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.thumb:focus .handle-extension{background-color:var(--calcite-ui-brand)}.thumb.thumb--minValue{transform:translate(calc(var(--calcite-slider-thumb-x-offset) * -1), var(--calcite-slider-thumb-y-offset))}.thumb.thumb--precise{--calcite-slider-thumb-y-offset:-2px}:host([label-handles]) .thumb{--calcite-slider-thumb-x-offset:50%}:host([label-handles]):host(:not([has-histogram])) .scale--s .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-23px}:host([label-handles]):host(:not([has-histogram])) .scale--m .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-30px}:host([label-handles]):host(:not([has-histogram])) .scale--l .thumb:not(.thumb--precise){--calcite-slider-thumb-y-offset:-32px}:host([has-histogram][label-handles]) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--minValue.thumb--precise .handle__label{margin-block-start:0.5em}:host(:not([has-histogram]):not([precise])) .handle__label,:host([label-handles]:not([has-histogram])) .thumb--value .handle__label{margin-block-end:0.5em}:host([label-handles][precise]):host(:not([has-histogram])) .scale--s .thumb--value{--calcite-slider-thumb-y-offset:-33px}:host([label-handles][precise]):host(:not([has-histogram])) .scale--m .thumb--value{--calcite-slider-thumb-y-offset:-44px}:host([label-handles][precise]):host(:not([has-histogram])) .scale--l .thumb--value{--calcite-slider-thumb-y-offset:-49px}.thumb:focus .handle,.thumb--active .handle{background-color:var(--calcite-ui-brand);box-shadow:0 0 8px 0 rgba(0, 0, 0, 0.16)}.thumb:hover.thumb--precise:after,.thumb:focus.thumb--precise:after,.thumb--active.thumb--precise:after{background-color:var(--calcite-ui-brand)}.track{position:relative;block-size:0.125rem;border-radius:0px;background-color:var(--calcite-ui-border-2);transition:all var(--calcite-internal-animation-timing-medium) ease-in}.track__range{position:absolute;inset-block-start:0px;block-size:0.125rem;background-color:var(--calcite-ui-brand)}.container--range .track__range:hover{cursor:ew-resize}.container--range .track__range:after{position:absolute;inline-size:100%;content:"";inset-block-start:calc(var(--calcite-slider-full-handle-height) * 0.5 * -1);block-size:calc(var(--calcite-slider-handle-size) + var(--calcite-slider-handle-extension-height))}@media (forced-colors: active){.thumb{outline-width:0;outline-offset:0}.handle{outline:2px solid transparent;outline-offset:2px}.thumb:focus .handle,.thumb .handle-extension,.thumb:hover .handle-extension,.thumb:focus .handle-extension,.thumb:active .handle-extension{background-color:canvasText}.track{background-color:canvasText}.track__range{background-color:highlight}}.tick{position:absolute;block-size:0.25rem;inline-size:0.125rem;border-width:1px;border-style:solid;background-color:var(--calcite-ui-border-input);border-color:var(--calcite-ui-foreground-1);inset-block-start:-2px;pointer-events:none;margin-inline-start:calc(-1 * 0.125rem)}.tick--active{background-color:var(--calcite-ui-brand)}.tick__label{pointer-events:none;margin-block-start:0.875rem;display:flex;justify-content:center}.tick__label--min{transition:opacity var(--calcite-animation-timing)}.tick__label--max{transition:opacity var(--calcite-internal-animation-timing-fast)}:host([has-histogram][label-handles]) .tick__label--min,:host([has-histogram][label-handles]) .tick__label--max,:host([has-histogram][precise]) .tick__label--min,:host([has-histogram][precise]) .tick__label--max{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.graph{color:var(--calcite-ui-foreground-3);block-size:48px}:host([label-ticks][ticks]) .container{padding-block-end:calc(0.875rem + var(--calcite-slider-container-font-size))}:host([has-histogram]):host([precise][label-handles]) .container{padding-block-end:calc(var(--calcite-slider-full-handle-height) + 1em)}:host([has-histogram]):host([label-handles]:not([precise])) .container{padding-block-end:calc(var(--calcite-slider-handle-size) * 0.5 + 1em)}:host([has-histogram]):host([precise]:not([label-handles])) .container{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container{padding-block-start:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([precise]:not([label-handles])) .container--range{padding-block-end:var(--calcite-slider-full-handle-height)}:host(:not([has-histogram])):host([label-handles]:not([precise])) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container{padding-block-start:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}:host(:not([has-histogram])):host([label-handles][precise]) .container--range{padding-block-end:calc(var(--calcite-slider-full-handle-height) + var(--calcite-slider-container-font-size) + 4px)}::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{D as calcite_graph,F as calcite_slider}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as i,c as t,h as a,H as e,g as o}from"./p-49701eee.js";import{g as s}from"./p-b0cecf6b.js";import{a as n,f as c,t as r}from"./p-a4a63866.js";import{c as d,d as h,g as l}from"./p-47f53948.js";import{c as u,d as m,H as p}from"./p-49a74b3e.js";import{g as f}from"./p-98183f7a.js";import{u as b}from"./p-1cdae83d.js";import{c as v,s as k,a as w}from"./p-5bb6cc45.js";import"./p-a53596e5.js";const g=class{constructor(a){i(this,a),this.calciteInternalRadioButtonBlur=t(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=t(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=t(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=t(this,"calciteInternalRadioButtonFocus",6),this.selectItem=(i,t)=>{i[t].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((i=>i.name===this.name)),this.isDefaultSelectable=()=>{const i=this.queryButtons();return!i.some((i=>i.checked))&&i[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=i=>{this.containerEl=i},this.handleKeyDown=i=>{const{key:t}=i,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;if(" "===t)return this.check(),void i.preventDefault();let e=t;"rtl"===n(a)&&("ArrowRight"===t&&(e="ArrowLeft"),"ArrowLeft"===t&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((i=>i.name===this.name));let s=0;const c=o.length;switch(o.some(((i,t)=>{if(i.checked)return s=t,!0})),e){case"ArrowLeft":case"ArrowUp":return i.preventDefault(),void this.selectItem(o,f(Math.max(s-1,-1),c));case"ArrowRight":case"ArrowDown":return i.preventDefault(),void this.selectItem(o,f(s+1,c));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())},this.checked=!1,this.disabled=!1,this.focused=!1,this.guid=void 0,this.hidden=!1,this.hovered=!1,this.label=void 0,this.name=void 0,this.required=!1,this.scale="m",this.value=void 0}checkedChanged(i){i&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){await v(this),this.disabled||c(this.containerEl)}onLabelClick(i){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const t=i.currentTarget,a=t.for?this.rootNode.querySelector(`calcite-radio-button[id="${t.for}"]`):t.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const i=this.queryButtons().filter((i=>i.checked));if((null==i?void 0:i.length)>1){const t=i[i.length-1];i.filter((i=>i!==t)).forEach((i=>{i.checked=!1,i.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((i=>{i.checked&&(i.checked=!1,i.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((i=>i.guid!==this.guid)).forEach((i=>{i.checked&&(i.checked=!1,i.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${s()}`,this.name&&this.checkLastRadioButton(),d(this),u(this)}componentWillLoad(){k(this)}componentDidLoad(){w(this),this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){h(this),m(this)}componentDidRender(){b(this)}render(){const i=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":r(this.checked),"aria-label":l(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,ref:this.setContainerEl,role:"radio",tabIndex:i},a("div",{class:"radio"})),a(p,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};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([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::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{g as calcite_radio_button}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as e,h as i,H as a,g as r,F as s}from"./p-49701eee.js";import{h as o,b as n,T as c,c as l,g as h,f as d,e as u,s as p,j as g,i as f,k as v,n as m,p as w}from"./p-3274abf2.js";import{c as y,d as x,n as b}from"./p-4ee5ad79.js";import{c as k,a as D}from"./p-a4a63866.js";import{C as z}from"./p-a53596e5.js";import{u as _}from"./p-1cdae83d.js";import{i as C}from"./p-5a953a75.js";import{H as A}from"./p-9dd2a286.js";import"./p-e452903d.js";import"./p-b0cecf6b.js";const P=class{constructor(i){t(this,i),this.calciteDatePickerChange=e(this,"calciteDatePickerChange",6),this.calciteDatePickerRangeChange=e(this,"calciteDatePickerRangeChange",6),this.keyDownHandler=t=>{"Escape"===t.key&&this.reset()},this.monthHeaderSelectChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthActiveDateChange=t=>{const e=new Date(t.detail);this.range?("end"===this.activeRange?this.activeEndDate=e:this.activeStartDate=e,this.mostRecentRangeValue=e):this.activeDate=e},this.monthHoverChange=t=>{if(!this.startAsDate)return void(this.hoverRange=void 0);const e=new Date(t.detail);if(this.hoverRange={focused:this.activeRange||"start",start:this.startAsDate,end:this.endAsDate},this.proximitySelectionDisabled)this.endAsDate?this.hoverRange=void 0:e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");else if(this.endAsDate){const t=o(e,this.startAsDate),i=o(e,this.endAsDate);i>0?(this.hoverRange.end=e,this.hoverRange.focused="end"):t<0||t>i?(this.hoverRange.start=e,this.hoverRange.focused="start"):(this.hoverRange.end=e,this.hoverRange.focused="end")}else e<this.startAsDate?this.hoverRange={focused:"start",start:e,end:this.startAsDate}:(this.hoverRange.end=e,this.hoverRange.focused="end");t.stopPropagation()},this.monthMouseOutChange=()=>{this.hoverRange&&(this.hoverRange=void 0)},this.reset=()=>{var t,e,i,a,r,s;!Array.isArray(this.valueAsDate)&&this.valueAsDate&&(null===(t=this.valueAsDate)||void 0===t?void 0:t.getTime())!==(null===(e=this.activeDate)||void 0===e?void 0:e.getTime())&&(this.activeDate=new Date(this.valueAsDate)),this.startAsDate&&(null===(i=this.startAsDate)||void 0===i?void 0:i.getTime())!==(null===(a=this.activeStartDate)||void 0===a?void 0:a.getTime())&&(this.activeStartDate=new Date(this.startAsDate)),this.endAsDate&&(null===(r=this.endAsDate)||void 0===r?void 0:r.getTime())!==(null===(s=this.activeEndDate)||void 0===s?void 0:s.getTime())&&(this.activeEndDate=new Date(this.endAsDate))},this.monthDateChange=t=>{const e=new Date(t.detail),i=n(e);if(this.range||i!==n(this.valueAsDate)){if(!this.range)return this.value=i||"",this.valueAsDate=e||null,this.activeDate=e||null,void this.calciteDatePickerChange.emit(e);if(!this.startAsDate||!this.endAsDate&&e<this.startAsDate)this.startAsDate&&this.setEndDate(new Date(this.startAsDate)),"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else if(this.endAsDate)if(this.proximitySelectionDisabled)this.setStartDate(e),this.endAsDate=this.activeEndDate=this.end=void 0;else if(this.activeRange)"end"==this.activeRange?this.setEndDate(e):this.setStartDate(e);else{const t=o(e,this.startAsDate),i=o(e,this.endAsDate);0===i||t<0?this.setStartDate(e):0===t||i<0?this.setEndDate(e):t<i?this.setStartDate(e):this.setEndDate(e)}else this.setEndDate(e);this.calciteDatePickerChange.emit(e)}},this.activeDate=void 0,this.activeRange=void 0,this.value=void 0,this.headingLevel=void 0,this.valueAsDate=void 0,this.startAsDate=void 0,this.endAsDate=void 0,this.minAsDate=void 0,this.maxAsDate=void 0,this.min=void 0,this.max=void 0,this.intlPrevMonth=c.prevMonth,this.intlNextMonth=c.nextMonth,this.intlYear=c.year,this.locale=void 0,this.numberingSystem=void 0,this.scale="m",this.range=!1,this.start=void 0,this.end=void 0,this.proximitySelectionDisabled=!1,this.activeStartDate=void 0,this.activeEndDate=void 0,this.globalAttributes={},this.effectiveLocale="",this.localeData=void 0,this.hoverRange=void 0}activeDateWatcher(t){"end"===this.activeRange&&(this.activeEndDate=t)}handleValueAsDate(t){!Array.isArray(t)&&t&&t!==this.activeDate&&(this.activeDate=t)}handleRangeChange(){const{startAsDate:t,endAsDate:e}=this;this.activeEndDate=e,this.activeStartDate=t}onMinChanged(t){t&&(this.minAsDate=l(t))}onMaxChanged(t){t&&(this.maxAsDate=l(t))}connectedCallback(){y(this),Array.isArray(this.value)?(this.valueAsDate=h(this.value),this.start=this.value[0],this.end=this.value[1]):this.value&&(this.valueAsDate=l(this.value)),this.start&&this.setStartAsDate(l(this.start)),this.end&&this.setEndAsDate(l(this.end)),this.min&&(this.minAsDate=l(this.min)),this.max&&(this.maxAsDate=l(this.max))}disconnectedCallback(){x(this)}async componentWillLoad(){await this.loadLocaleData(),this.onMinChanged(this.min),this.onMaxChanged(this.max)}render(){var t;const e=d(this.range&&Array.isArray(this.valueAsDate)?this.valueAsDate[0]:this.valueAsDate,this.minAsDate,this.maxAsDate);let r=this.getActiveDate(e,this.minAsDate,this.maxAsDate);const s=this.range&&Array.isArray(this.valueAsDate)?d(this.valueAsDate[1],this.minAsDate,this.maxAsDate):null,o=this.getActiveEndDate(s,this.minAsDate,this.maxAsDate);return"end"!==this.activeRange&&("end"!==(null===(t=this.hoverRange)||void 0===t?void 0:t.focused)||this.proximitySelectionDisabled&&!s)||!o||(r=o),this.range&&this.mostRecentRangeValue&&(r=this.mostRecentRangeValue),i(a,{onBlur:this.reset,onKeyDown:this.keyDownHandler,role:"application"},this.renderCalendar(r,this.range&&this.activeRange&&"start"===this.activeRange&&s||this.maxAsDate,this.range&&this.activeRange?"start"===this.activeRange?this.minAsDate:e||this.minAsDate:this.minAsDate,e,s))}valueHandler(t){Array.isArray(t)?(this.valueAsDate=h(t),this.start=t[0],this.end=t[1]):t&&(this.valueAsDate=l(t),this.start="",this.end="")}startWatcher(t){this.setStartAsDate(l(t))}endWatcher(t){this.setEndAsDate(l(t))}async loadLocaleData(){b.numberFormatOptions={numberingSystem:this.numberingSystem,locale:this.effectiveLocale,useGrouping:!1},this.localeData=await u(this.effectiveLocale)}renderCalendar(t,e,a,r,s){return this.localeData&&[i("calcite-date-picker-month-header",{activeDate:t,headingLevel:this.headingLevel,intlNextMonth:this.intlNextMonth,intlPrevMonth:this.intlPrevMonth,intlYear:this.intlYear,localeData:this.localeData,max:e,min:a,onCalciteDatePickerSelect:this.monthHeaderSelectChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r||new Date}),i("calcite-date-picker-month",{activeDate:t,endDate:this.range?s:void 0,hoverRange:this.hoverRange,localeData:this.localeData,max:e,min:a,onCalciteDatePickerActiveDateChange:this.monthActiveDateChange,onCalciteDatePickerSelect:this.monthDateChange,onCalciteInternalDatePickerHover:this.monthHoverChange,onCalciteInternalDatePickerMouseOut:this.monthMouseOutChange,scale:this.scale,selectedDate:"end"===this.activeRange?s:r,startDate:this.range?r:void 0})]}setStartAsDate(t,e){this.startAsDate=t,this.mostRecentRangeValue=this.startAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:t,endDate:this.endAsDate})}setEndAsDate(t,e){this.endAsDate=t?p(t):t,this.mostRecentRangeValue=this.endAsDate,e&&this.calciteDatePickerRangeChange.emit({startDate:this.startAsDate,endDate:t})}setEndDate(t){this.end=t?n(t):"",this.setEndAsDate(t,!0),this.activeEndDate=t||null}setStartDate(t){this.start=t?n(t):"",this.setStartAsDate(t,!0),this.activeStartDate=t||null}getActiveDate(t,e,i){return d(this.activeDate,e,i)||t||d(new Date,e,i)}getActiveEndDate(t,e,i){return d(this.activeEndDate,e,i)||t||d(new Date,e,i)}static get assetsDirs(){return["assets"]}get el(){return r(this)}static get watchers(){return{activeDate:["activeDateWatcher"],valueAsDate:["handleValueAsDate"],startAsDate:["handleRangeChange"],endAsDate:["handleRangeChange"],min:["onMinChanged"],max:["onMaxChanged"],value:["valueHandler"],start:["startWatcher"],end:["endWatcher"],effectiveLocale:["loadLocaleData"]}}};P.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:inline-block;inline-size:100%;overflow:visible;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-1);vertical-align:top}:host([scale=s]){max-inline-size:216px}:host([scale=m]){max-inline-size:286px}:host([scale=l]){max-inline-size:398px}";const S=class{constructor(i){t(this,i),this.calciteDaySelect=e(this,"calciteDaySelect",6),this.calciteInternalDayHover=e(this,"calciteInternalDayHover",6),this.onClick=()=>{!this.disabled&&this.calciteDaySelect.emit()},this.keyDownHandler=t=>{C(t.key)&&(!this.disabled&&this.calciteDaySelect.emit(),t.preventDefault())},this.day=void 0,this.disabled=!1,this.currentMonth=!1,this.selected=!1,this.highlighted=!1,this.range=!1,this.startOfRange=!1,this.endOfRange=!1,this.rangeHover=!1,this.active=!1,this.scale=void 0,this.value=void 0}mouseoverHandler(){this.calciteInternalDayHover.emit()}componentWillLoad(){this.parentDatePickerEl=k(this.el,"calcite-date-picker")}render(){if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;b.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const t=b.localize(String(this.day)),e=D(this.el);return i(a,{onClick:this.onClick,onKeyDown:this.keyDownHandler,role:"gridcell"},i("div",{class:{"day-v-wrapper":!0,[z.rtl]:"rtl"===e}},i("div",{class:"day-wrapper"},i("span",{class:"day"},i("span",{class:"text"},t)))))}componentDidRender(){_(this,this.isTabbable)}isTabbable(){return this.active}get el(){return r(this)}};S.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;min-inline-size:0px;cursor:pointer;justify-content:center;color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.day-v-wrapper{flex:1 1 auto}.day-wrapper{display:flex;flex-direction:column;align-items:center}.day{display:flex;align-items:center;justify-content:center;border-radius:9999px;font-size:var(--calcite-font-size--2);line-height:1rem;line-height:1;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;background:none;box-shadow:0 0 0 2px transparent}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]) .day-v-wrapper{padding-block:0.125rem}:host([scale=s]) .day-wrapper{padding:0px}:host([scale=s]) .day{block-size:27px;inline-size:27px;font-size:var(--calcite-font-size--2)}:host([scale=m]) .day-v-wrapper{padding-block:0.25rem}:host([scale=m]) .day-wrapper{padding-inline:0.25rem}:host([scale=m]) .day{block-size:33px;inline-size:33px;font-size:var(--calcite-font-size--1)}:host([scale=l]) .day-v-wrapper{padding-block:0.25rem}:host([scale=l]) .day-wrapper{padding-inline:0.25rem}:host([scale=l]) .day{block-size:43px;inline-size:43px;font-size:var(--calcite-font-size-0)}:host([current-month]) .day{opacity:1}:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:focus),:host([active]){outline:2px solid transparent;outline-offset:2px}:host(:focus:not([disabled])) .day{outline:2px solid var(--calcite-ui-brand);outline-offset:2px;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-ui-brand) !important;color:var(--calcite-ui-foreground-1) !important}:host([range][selected]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([start-of-range]) .day-wrapper{border-start-start-radius:40%;border-end-start-radius:40%}:host([end-of-range]) .day-wrapper{border-start-end-radius:40%;border-end-end-radius:40%}:host([start-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([start-of-range]) .day{opacity:1}:host([end-of-range]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0 var(--calcite-ui-foreground-1)}:host([end-of-range]) .day{opacity:1}:host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day{box-shadow:0 0 0 -2px var(--calcite-ui-foreground-1)}:host([end-of-range]:not(:focus)) .calcite--rtl .day{box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([start-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper{box-shadow:inset -8px 0 var(--calcite-ui-foreground-1)}:host([end-of-range][scale=l]) .calcite--rtl .day-wrapper{box-shadow:inset 8px 0 var(--calcite-ui-foreground-1)}:host([highlighted]) .day-wrapper{background-color:var(--calcite-ui-foreground-current)}:host([highlighted]) .day-wrapper .day{color:var(--calcite-ui-text-1)}:host([highlighted]:not([active]:focus)) .day{border-radius:0px;color:var(--calcite-ui-text-1)}:host([range-hover]:not([selected])) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([range-hover]:not([selected])) .day{border-radius:0px}:host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,:host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper{background-image:linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));border-radius:0px;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--start) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current))}:host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--end) .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2))}:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper{background-image:linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1))}:host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day,:host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day{border-radius:9999px;opacity:1;box-shadow:0 0 0 2px var(--calcite-ui-foreground-1)}:host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper,:host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper{background-image:none}:host([start-of-range].hover--inside-range.focused--end) .day-wrapper,:host([end-of-range].hover--inside-range.focused--start) .day-wrapper{background-color:var(--calcite-ui-foreground-2)}:host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:first-child) .calcite--rtl .day-wrapper,:host([range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([highlighted]:last-child) .calcite--rtl .day-wrapper,:host([range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 4px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 1px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper{box-shadow:inset 6px 0px 0px 0px var(--calcite-ui-foreground-1)}:host([highlighted]:first-child) .day-wrapper,:host([range-hover]:first-child) .day-wrapper{border-start-start-radius:45%;border-end-start-radius:45%}:host([highlighted]:last-child) .day-wrapper,:host([range-hover]:last-child) .day-wrapper{border-start-end-radius:45%;border-end-end-radius:45%}:host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,:host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,:host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper{box-shadow:inset -6px 0px 0px 0px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host(:hover:not([disabled])) .day,:host([active]:not([range])) .day{border-radius:0px}:host([selected]){outline:2px solid canvasText}:host([selected]) .day{border-radius:0px;background-color:highlight}:host([range][selected]) .day-wrapper,:host([highlighted]) .day-wrapper,:host([range-hover]:not([selected])) .day-wrapper{background-color:highlight}:host([range][selected][start-of-range]) .day-wrapper,:host([range][selected][end-of-range]) .day-wrapper{background-color:canvas}}";const M=class{constructor(i){t(this,i),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.calciteInternalDatePickerHover=e(this,"calciteInternalDatePickerHover",6),this.calciteDatePickerActiveDateChange=e(this,"calciteDatePickerActiveDateChange",6),this.calciteInternalDatePickerMouseOut=e(this,"calciteInternalDatePickerMouseOut",6),this.keyDownHandler=t=>{if(t.defaultPrevented)return;const e="rtl"===this.el.dir;switch(t.key){case"ArrowUp":t.preventDefault(),this.addDays(-7);break;case"ArrowRight":t.preventDefault(),this.addDays(e?-1:1);break;case"ArrowDown":t.preventDefault(),this.addDays(7);break;case"ArrowLeft":t.preventDefault(),this.addDays(e?1:-1);break;case"PageUp":t.preventDefault(),this.addMonths(-1);break;case"PageDown":t.preventDefault(),this.addMonths(1);break;case"Home":t.preventDefault(),this.activeDate.setDate(1),this.addDays();break;case"End":t.preventDefault(),this.activeDate.setDate(new Date(this.activeDate.getFullYear(),this.activeDate.getMonth()+1,0).getDate()),this.addDays();break;case"Enter":case" ":t.preventDefault();break;case"Tab":this.activeFocus=!1}},this.disableActiveFocus=()=>{this.activeFocus=!1},this.dayHover=t=>{const e=t.target;e.disabled?this.calciteInternalDatePickerMouseOut.emit():this.calciteInternalDatePickerHover.emit(e.value),t.stopPropagation()},this.daySelect=t=>{this.calciteDatePickerSelect.emit(t.target.value)},this.selectedDate=void 0,this.activeDate=new Date,this.startDate=void 0,this.endDate=void 0,this.min=void 0,this.max=void 0,this.scale=void 0,this.localeData=void 0,this.hoverRange=void 0}mouseoutHandler(){this.calciteInternalDatePickerMouseOut.emit()}render(){const t=this.activeDate.getMonth(),e=this.activeDate.getFullYear(),r=this.localeData.weekStart%7,{abbreviated:s,short:o,narrow:n}=this.localeData.days,c="s"===this.scale?n||o||s:o||s||n,l=[...c.slice(r,7),...c.slice(0,r)],h=this.getCurrentMonthDays(t,e),d=this.getPrevMonthdays(t,e,r),u=this.getNextMonthDays(t,e,r),p=[...d.map((i=>{const a=new Date(e,t-1,i);return this.renderDateDay(!1,i,a)})),...h.map((i=>{const a=new Date(e,t,i),r=g(a,this.activeDate);return this.renderDateDay(r,i,a,!0,!0)})),...u.map((i=>{const a=new Date(e,t+1,i);return this.renderDateDay(!1,i,a)}))],f=[];for(let t=0;t<p.length;t+=7)f.push(p.slice(t,t+7));return i(a,{onFocusOut:this.disableActiveFocus,onKeyDown:this.keyDownHandler},i("div",{class:"calender",role:"grid"},i("div",{class:"week-headers",role:"row"},l.map((t=>i("span",{class:"week-header",role:"columnheader"},t)))),f.map((t=>i("div",{class:"week-days",role:"row"},t)))))}addMonths(t){const e=new Date(this.activeDate);e.setMonth(this.activeDate.getMonth()+t),this.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}addDays(t=0){const e=new Date(this.activeDate);e.setDate(this.activeDate.getDate()+t),this.calciteDatePickerActiveDateChange.emit(d(e,this.min,this.max)),this.activeFocus=!0}getPrevMonthdays(t,e,i){const a=new Date(e,t,0),r=a.getDate(),s=[];if(a.getDay()-6===i)return s;for(let t=a.getDay()-i;t>=0;t--)s.push(r-t);return s}getCurrentMonthDays(t,e){const i=new Date(e,t+1,0).getDate(),a=[];for(let t=0;t<i;t++)a.push(t+1);return a}getNextMonthDays(t,e,i){const a=new Date(e,t+1,0).getDay(),r=[];if(a===(i+6)%7)return r;for(let t=0;t<(6-(a-i))%7;t++)r.push(t+1);return r}betweenSelectedRange(t){return!(!(this.startDate&&this.endDate&&t>this.startDate&&t<this.endDate)||this.isRangeHover(t))}isSelected(t){return!!(g(t,this.selectedDate)||this.startDate&&g(t,this.startDate)||this.endDate&&g(t,this.endDate))}isStartOfRange(t){return!(!this.startDate||g(this.startDate,this.endDate)||!g(this.startDate,t)||this.isEndOfRange(t))}isEndOfRange(t){return!!(this.endDate&&!g(this.startDate,this.endDate)&&g(this.endDate,t)||!this.endDate&&this.hoverRange&&g(this.startDate,this.hoverRange.end)&&g(t,this.hoverRange.end))}renderDateDay(t,e,a,r,s){var o;const n=this.isFocusedOnStart(),c=this.isHoverInRange()||!this.endDate&&this.hoverRange&&g(null===(o=this.hoverRange)||void 0===o?void 0:o.end,this.startDate);return i("calcite-date-picker-day",{active:t,class:{"hover--inside-range":this.startDate&&c,"hover--outside-range":this.startDate&&!c,"focused--start":n,"focused--end":!n},currentMonth:r,day:e,disabled:!f(a,this.min,this.max),endOfRange:this.isEndOfRange(a),highlighted:this.betweenSelectedRange(a),key:a.toDateString(),onCalciteDaySelect:this.daySelect,onCalciteInternalDayHover:this.dayHover,range:!!this.startDate&&!!this.endDate&&!g(this.startDate,this.endDate),rangeHover:this.isRangeHover(a),ref:e=>{s&&t&&this.activeFocus&&(null==e||e.focus())},scale:this.scale,selected:this.isSelected(a),startOfRange:this.isStartOfRange(a),value:a})}isFocusedOnStart(){var t;return"start"===(null===(t=this.hoverRange)||void 0===t?void 0:t.focused)}isHoverInRange(){if(!this.hoverRange)return!1;const{start:t,end:e}=this.hoverRange;return!!(!this.isFocusedOnStart()&&this.startDate&&(!this.endDate||e<this.endDate)||this.isFocusedOnStart()&&this.startDate&&t>this.startDate)}isRangeHover(t){if(!this.hoverRange)return!1;const{start:e,end:i}=this.hoverRange,a=this.isFocusedOnStart(),r=this.isHoverInRange(),s=r&&(!a&&t>this.startDate&&(t<i||g(t,i))||a&&t<this.endDate&&(t>e||g(t,e))),o=!r&&(!a&&t>=this.endDate&&(t<i||g(t,i))||a&&(t<this.startDate||this.endDate&&g(t,this.startDate))&&(t>e||g(t,e)));return s||o}get el(){return r(this)}};M.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.calender{margin-block-end:0.25rem}.week-headers{display:flex;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;padding-inline:0.25rem}.week-header{text-align:center;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-3);inline-size:14.2857142857%}:host([scale=s]) .week-header{padding-inline:0px;padding-block:0.5rem 0.75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) .week-header{padding-inline:0px;padding-block:0.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=l]) .week-header{padding-inline:0px;padding-block:1rem 1.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}.week-days{display:flex;flex-direction:row;padding-block:0px;padding-inline:6px}.week-days:focus{outline:2px solid transparent;outline-offset:2px}";const j=class{constructor(i){t(this,i),this.calciteDatePickerSelect=e(this,"calciteDatePickerSelect",6),this.onYearKey=t=>{const e=this.parseCalendarYear(t.target.value);switch(t.key){case"ArrowDown":t.preventDefault(),this.setYear({localizedYear:e,offset:-1});break;case"ArrowUp":t.preventDefault(),this.setYear({localizedYear:e,offset:1})}},this.onYearChange=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value)})},this.onYearInput=t=>{this.setYear({localizedYear:this.parseCalendarYear(t.target.value),commit:!1})},this.prevMonthClick=t=>{this.handleArrowClick(t,this.prevMonthDate)},this.prevMonthKeydown=t=>{C(t.key)&&this.prevMonthClick(t)},this.nextMonthClick=t=>{this.handleArrowClick(t,this.nextMonthDate)},this.nextMonthKeydown=t=>{C(t.key)&&this.nextMonthClick(t)},this.handleArrowClick=(t,e)=>{t.preventDefault(),this.calciteDatePickerSelect.emit(e)},this.selectedDate=void 0,this.activeDate=void 0,this.headingLevel=void 0,this.min=void 0,this.max=void 0,this.intlPrevMonth=void 0,this.intlNextMonth=void 0,this.intlYear=void 0,this.scale=void 0,this.localeData=void 0,this.globalAttributes={},this.nextMonthDate=void 0,this.prevMonthDate=void 0}componentWillLoad(){this.parentDatePickerEl=k(this.el,"calcite-date-picker")}connectedCallback(){this.setNextPrevMonthDates()}render(){return i("div",{class:"header"},this.renderContent())}renderContent(){var t;if(!this.activeDate||!this.localeData)return null;if(this.parentDatePickerEl){const{numberingSystem:t,lang:e}=this.parentDatePickerEl;b.numberFormatOptions={useGrouping:!1,...t&&{numberingSystem:t},...e&&{locale:e}}}const e=this.activeDate.getMonth(),{months:a,unitOrder:r}=this.localeData,o=(a.wide||a.narrow||a.abbreviated)[e],n=this.formatCalendarYear(this.activeDate.getFullYear()),c="l"===this.scale?"m":"s",l=v(r),h=l.indexOf("y")<l.indexOf("m"),d=null===(t=this.localeData.year)||void 0===t?void 0:t.suffix;return i(s,null,i("a",{"aria-disabled":`${this.prevMonthDate.getMonth()===e}`,"aria-label":this.intlPrevMonth,class:"chevron",href:"#",onClick:this.prevMonthClick,onKeyDown:this.prevMonthKeydown,role:"button",tabindex:this.prevMonthDate.getMonth()===e?-1:0},i("calcite-icon",{"flip-rtl":!0,icon:"chevron-left",scale:c})),i("div",{class:{text:!0,"text--reverse":h}},i(A,{class:"month",level:this.headingLevel},o),i("span",{class:"year-wrap"},i("input",{"aria-label":this.intlYear,class:{year:!0,"year--suffix":!!d},inputmode:"numeric",maxlength:"4",minlength:"1",onChange:this.onYearChange,onInput:this.onYearInput,onKeyDown:this.onYearKey,pattern:"\\d*",ref:t=>this.yearInput=t,type:"text",value:n}),d&&i("span",{class:"suffix"},d))),i("a",{"aria-disabled":`${this.nextMonthDate.getMonth()===e}`,"aria-label":this.intlNextMonth,class:"chevron",href:"#",onClick:this.nextMonthClick,onKeyDown:this.nextMonthKeydown,role:"button",tabindex:this.nextMonthDate.getMonth()===e?-1:0},i("calcite-icon",{"flip-rtl":!0,icon:"chevron-right",scale:c})))}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=d(m(this.activeDate),this.min,this.max),this.prevMonthDate=d(w(this.activeDate),this.min,this.max))}formatCalendarYear(t){const{localeData:e}=this;return b.localize(`${t+("buddhist"===e["default-calendar"]?543:0)}`)}parseCalendarYear(t){const{localeData:e}=this,i="buddhist"===e["default-calendar"]?543:0,a=Number(b.delocalize(t))-i;return b.localize(`${a}`)}getInRangeDate({localizedYear:t,offset:e=0}){const{min:i,max:a,activeDate:r}=this,s=Number(b.delocalize(t)),o=s.toString().length,n=!isNaN(s)&&s+e,c=n&&(!i||i.getFullYear()<=n)&&(!a||a.getFullYear()>=n);if(n&&c&&o===t.length){const t=new Date(r);return t.setFullYear(n),d(t,i,a)}}setYear({localizedYear:t,commit:e=!0,offset:i=0}){const{yearInput:a,activeDate:r}=this,s=this.getInRangeDate({localizedYear:t,offset:i});s&&this.calciteDatePickerSelect.emit(s),e&&(a.value=this.formatCalendarYear((s||r).getFullYear()))}get el(){return r(this)}static get watchers(){return{min:["setNextPrevMonthDates"],max:["setNextPrevMonthDates"],activeDate:["setNextPrevMonthDates"]}}};j.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}.header{display:flex;justify-content:space-between;padding-block:0px;padding-inline:0.25rem}:host([scale=s]) .text{margin-block:0.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=s]) .chevron{block-size:2.25rem}:host([scale=m]) .text{margin-block:0.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m]) .chevron{block-size:3rem}:host([scale=l]) .text{margin-block:1rem;font-size:var(--calcite-font-size-1);line-height:1.5rem}:host([scale=l]) .chevron{block-size:3.5rem}.chevron{margin-inline:-0.25rem;box-sizing:content-box;display:flex;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;background-color:var(--calcite-ui-foreground-1);padding-inline:0.25rem;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;inline-size:14.2857142857%}.chevron:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.chevron:hover,.chevron:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.chevron:active{background-color:var(--calcite-ui-foreground-3)}.chevron[aria-disabled=true]{pointer-events:none;opacity:0}.text{margin-block:auto;display:flex;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:center;text-align:center;line-height:1}.text--reverse{flex-direction:row-reverse}.month,.year,.suffix{margin-inline:0.25rem;margin-block:auto;display:inline-block;background-color:var(--calcite-ui-foreground-1);font-weight:var(--calcite-font-weight-medium);line-height:1.25;color:var(--calcite-ui-text-1);font-size:inherit}.year{position:relative;inline-size:2.5rem;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent}.year:hover{transition-duration:100ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:outline-color;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}.year:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.year--suffix{text-align:start}.year-wrap{position:relative}.suffix{inset-block-start:0px;white-space:nowrap;text-align:start;inset-inline-start:0}";export{P as calcite_date_picker,S as calcite_date_picker_day,M as calcite_date_picker_month,j as calcite_date_picker_month_header}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as i,h as e,H as a,g as n}from"./p-49701eee.js";import{g as s,b as o,h as l,a as r}from"./p-a4a63866.js";import{c,d as h,g as d}from"./p-47f53948.js";import{s as u,c as p,d as m,H as b}from"./p-49a74b3e.js";import{T as f,C as v}from"./p-a53596e5.js";import{c as g}from"./p-e452903d.js";import{u as x}from"./p-1cdae83d.js";import{s as y,a as k,c as w}from"./p-5bb6cc45.js";import"./p-b0cecf6b.js";const z=class{constructor(e){t(this,e),this.calciteInternalInputTextFocus=i(this,"calciteInternalInputTextFocus",7),this.calciteInternalInputTextBlur=i(this,"calciteInternalInputTextBlur",7),this.calciteInputTextInput=i(this,"calciteInputTextInput",7),this.calciteInputTextChange=i(this,"calciteInputTextChange",7),this.previousValueOrigin="initial",this.mutationObserver=g("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.keyDownHandler=t=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===t.key&&(this.clearInputTextValue(t),t.preventDefault()),"Enter"!==t.key||t.defaultPrevented||u(this)&&t.preventDefault())},this.clearInputTextValue=t=>{this.setValue({committing:!0,nativeEvent:t,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&this.calciteInputTextChange.emit(),this.previousEmittedValue=this.value},this.inputTextBlurHandler=()=>{this.calciteInternalInputTextBlur.emit({element:this.childEl,value:this.value}),this.emitChangeIfUserModified()},this.inputTextFocusHandler=t=>{const i=s(this.el,"action");t.target!==i&&this.setFocus(),this.calciteInternalInputTextFocus.emit({element:this.childEl,value:this.value})},this.inputTextInputHandler=t=>{this.disabled||this.readOnly||this.setValue({nativeEvent:t,origin:"user",value:t.target.value})},this.inputTextKeyDownHandler=t=>{this.disabled||this.readOnly||"Enter"===t.key&&this.emitChangeIfUserModified()},this.hiddenInputChangeHandler=t=>{t.target.name===this.name&&this.setValue({value:t.target.value,origin:"direct"}),t.stopPropagation()},this.setChildElRef=t=>{this.childEl=t},this.setInputValue=t=>{this.childEl&&(this.childEl.value=t)},this.setPreviousEmittedValue=t=>{this.previousEmittedValue=t},this.setPreviousValue=t=>{this.previousValue=t},this.setValue=({committing:t=!1,nativeEvent:i,origin:e,previousValue:a,value:n})=>{this.setPreviousValue(a||this.value),this.previousValueOrigin=e,this.userChangedValue="user"===e&&n!==this.value,this.value=n,"direct"===e&&this.setInputValue(n),i&&(this.calciteInputTextInput.emit({element:this.childEl,nativeEvent:i,value:this.value}).defaultPrevented?this.value=this.previousValue:t&&this.emitChangeIfUserModified())},this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.hidden=!1,this.icon=void 0,this.intlClear=void 0,this.intlLoading=f.loading,this.iconFlipRtl=!1,this.label=void 0,this.loading=!1,this.maxLength=void 0,this.minLength=void 0,this.name=void 0,this.placeholder=void 0,this.prefixText=void 0,this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.autocomplete=void 0,this.pattern=void 0,this.suffixText=void 0,this.editingEnabled=!1,this.value=""}disabledWatcher(){this.setDisabledAction()}valueWatcher(t,i){this.userChangedValue||this.setValue({origin:"direct",previousValue:i,value:t||""}),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=o({},this.icon,"text")}get isClearable(){return this.clearable&&this.value.length>0}connectedCallback(){var t;this.scale=l(this.el,"scale",this.scale),this.status=l(this.el,"status",this.status),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),c(this),p(this),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var t;h(this),m(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}componentWillLoad(){y(this),this.requestedIcon=o({},this.icon,"text")}componentDidLoad(){k(this)}componentDidRender(){x(this)}async setFocus(){var t;await w(this),null===(t=this.childEl)||void 0===t||t.focus()}async selectText(){var t;null===(t=this.childEl)||void 0===t||t.select()}onLabelClick(){this.setFocus()}onFormReset(){this.setValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(t){null!=this.minLength&&(t.minLength=this.minLength),null!=this.maxLength&&(t.maxLength=this.maxLength)}setDisabledAction(){const t=s(this.el,"action");t&&(this.disabled?t.setAttribute("disabled",""):t.removeAttribute("disabled"))}render(){const t=r(this.el),i=e("div",{class:"loader"},e("calcite-progress",{label:this.intlLoading,type:"indeterminate"})),n=e("button",{"aria-label":this.intlClear||"Clear value",class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputTextValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"s"})),s=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"s"}),o=e("div",{class:"prefix"},this.prefixText),l=e("div",{class:"suffix"},this.suffixText),c=e("input",{"aria-label":d(this),autocomplete:this.autocomplete,autofocus:!!this.autofocus||null,class:{"editing-enabled":this.editingEnabled,"inline-child":!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,maxLength:this.maxLength,minLength:this.minLength,name:this.name,onBlur:this.inputTextBlurHandler,onFocus:this.inputTextFocusHandler,onInput:this.inputTextInputHandler,onKeyDown:this.inputTextKeyDownHandler,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildElRef,required:!!this.required||null,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:"text",value:this.value});return e(a,{onClick:this.inputTextFocusHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[v.rtl]:"rtl"===t}},this.prefixText?o:null,e("div",{class:"element-wrapper"},c,this.isClearable?n:null,this.requestedIcon?s:null,this.loading?i:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),this.suffixText?l:null,e(b,{component:this})))}get el(){return n(this)}static get watchers(){return{disabled:["disabledWatcher"],value:["valueWatcher"],icon:["updateRequestedIcon"]}}};z.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([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}:host input{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}input{outline-color:transparent}input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;z-index:1;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}.inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.inline-child .editing-enabled{background-color:inherit}.inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{z as calcite_input_text}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{c as t,a as n}from"./p-a4a63866.js";import{d as e}from"./p-c8946ac4.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 t&&Array.isArray(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 B(t){const n=/firefox/i.test(M()),e=D(t),o=e.backdropFilter||e.WebkitBackdropFilter;return"none"!==e.transform||"none"!==e.perspective||!!o&&"none"!==o||n&&"filter"===e.willChange||n&&!!e.filter&&"none"!==e.filter||["transform","perspective"].some((t=>e.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const n=e.contain;return null!=n&&n.includes(t)}))}function C(){return!/^((?!chrome|android).)*safari/i.test(M())}function z(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=!C()&&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){if("html"===F(t))return t;const n=t.assignedSlot||t.parentNode||(T(t)?t.host:null)||q(t);return T(n)?n.host:n}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&&!B(e))?n:e||function(t){let n=X(t);for(;O(n)&&!z(n);){if(B(n))return n;n=X(n)}return null}(t)||n}function J(t){const n=X(t);return z(n)?t.ownerDocument.body:O(n)&&j(n)?n:J(n)}function K(t,n){var e;void 0===n&&(n=[]);const o=J(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(K(a))}function Q(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=C();(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)))}const Z={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t){let n=K(t).filter((t=>$(t)&&"body"!==F(t))),e=null;const o="fixed"===D(t).position;let r=o?X(t):t;for(;$(r)&&!z(r);){const t=D(r),i=B(r);(o?i||e:i||"static"!==t.position||!e||!["absolute","fixed"].includes(e.position))?e=t:n=n.filter((t=>t!==r)),r=X(r)}return n}(n):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Q(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}),Q(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:function(t){if(O(t))return{width:t.offsetWidth,height:t.offsetHeight};const n=W(t);return{width:n.width,height:n.height}},getOffsetParent:G,getDocumentElement:q,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||G,i=this.getDimensions;return{reference:V(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===D(t).direction};const _={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},tt=async function(){if(_.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-e1fa408f.js");Z.getClippingRect=t,Z.getOffsetParent=e,Z.getElementRects=n}}(),nt=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],et="bottom-start",ot={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function rt({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,B=null!=S?S:j[0].placement;return B!==p?{data:{index:E+1,overflows:$},reset:{placement:B}}:{}}}}({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 it(t,n){const e=t.filter((t=>nt.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${nt.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function at(t,e){const o=["left","right"];return"rtl"===n(t)&&o.reverse(),e.replace(/leading/gi,o[0]).replace(/trailing/gi,o[1])}async function lt(t,n,e=!1){if(t.open)return e?st(n):ct(n)}const st=e(ct,100,{leading:!0,maxWait:100});async function ct({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 tt;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:at(n,o),middleware:rt({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=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let u=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:f,y:d}=l(u,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x:v,y:x,data:h,reset:w}=await g({x:f,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:u,platform:a,elements:{reference:t,floating:n}});f=null!=v?v:f,d=null!=x?x:d,p={...p,[i]:{...p[i],...h}},w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(m=w.placement),w.rects&&(u=!0===w.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):w.rects),({x:f,y:d}=l(u,m,c))),e=-1)}return{x:f,y:d,placement:m,strategy:r,middlewareData:p}})(x,h,{platform:Z,...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 ut=new WeakMap;function ft(t,n,e){if(!e||!n)return;dt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&vt(e),ut.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)?K(t):t.contextElement?K(t.contextElement):[],...K(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),$(t)||!t.contextElement||l||f.observe(t.contextElement),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 dt(t,n,e){if(!e||!n)return;yt(e).removeEventListener("transitionend",gt);const o=ut.get(t);o&&o(),ut.delete(t)}const mt=Math.ceil(Math.hypot(4,4));function pt(t){t&&"absolute"===t.style.position&&yt(t).addEventListener("transitionend",gt)}function yt(t){return t.shadowRoot||t}function gt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(ot.animation)){const n=function(n){return t(n,"[data-placement]")}(e);vt(n),yt(n).removeEventListener("transitionend",gt)}}function vt(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{ot as F,dt as a,mt as b,ft as c,et as d,c as e,it as f,lt as r,pt as u}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as i,c as t,h as a,g as c,H as e}from"./p-49701eee.js";import{h as n,g as o,a as r,t as s}from"./p-a4a63866.js";import{c as l,d}from"./p-5dd53e64.js";import{C as m}from"./p-a53596e5.js";import"./p-b0cecf6b.js";import"./p-e452903d.js";const h=class{constructor(a){i(this,a),this.calciteInternalAccordionChange=t(this,"calciteInternalAccordionChange",6),this.items=[],this.sorted=!1,this.sortItems=i=>i.sort(((i,t)=>i.position-t.position)).map((i=>i.item)),this.appearance="solid",this.iconPosition="end",this.iconType="chevron",this.scale="m",this.selectionMode="multi"}componentDidLoad(){this.sorted||(this.items=this.sortItems(this.items),this.sorted=!0)}render(){const i="transparent"===this.appearance,t="minimal"===this.appearance;return a("div",{class:{"accordion--transparent":i,"accordion--minimal":t,accordion:!i&&!t}},a("slot",null))}calciteInternalAccordionItemKeyEvent(i){const t=i.detail.item;if(this.el===i.detail.parent){const{key:a}=t,c=i.target,e=0===this.itemIndex(c),n=this.itemIndex(c)===this.items.length-1;switch(a){case"ArrowDown":n?this.focusFirstItem():this.focusNextItem(c);break;case"ArrowUp":e?this.focusLastItem():this.focusPrevItem(c);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}}i.stopPropagation()}registerCalciteAccordionItem(i){const t={item:i.target,parent:i.detail.parent,position:i.detail.position};this.el===t.parent&&this.items.push(t),i.stopPropagation()}updateActiveItemOnChange(i){this.requestedAccordionItem=i.detail.requestedAccordionItem,this.calciteInternalAccordionChange.emit({requestedAccordionItem:this.requestedAccordionItem}),i.stopPropagation()}focusFirstItem(){this.focusElement(this.items[0])}focusLastItem(){this.focusElement(this.items[this.items.length-1])}focusNextItem(i){const t=this.itemIndex(i);this.focusElement(this.items[t+1]||this.items[0])}focusPrevItem(i){const t=this.itemIndex(i);this.focusElement(this.items[t-1]||this.items[this.items.length-1])}itemIndex(i){return this.items.indexOf(i)}focusElement(i){null==i||i.focus()}get el(){return c(this)}};h.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([scale=s]){--calcite-accordion-item-spacing-unit:0.25rem;--calcite-accordion-icon-margin:0.5rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-accordion-item-spacing-unit:0.5rem;--calcite-accordion-icon-margin:0.75rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-accordion-item-spacing-unit:0.75rem;--calcite-accordion-icon-margin:1rem;--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:block;max-inline-size:100%;line-height:1.5rem;--calcite-accordion-item-border:var(--calcite-ui-border-2);--calcite-accordion-item-background:var(--calcite-ui-foreground-1)}.accordion--transparent{--calcite-accordion-item-border:transparent;--calcite-accordion-item-background:transparent}.accordion--minimal{--calcite-accordion-item-padding:var(--calcite-accordion-item-spacing-unit) 0}.accordion{border-width:1px;border-block-end-width:0px;border-style:solid;border-color:var(--calcite-ui-border-2)}";const p=class{constructor(a){i(this,a),this.calciteInternalAccordionItemKeyEvent=t(this,"calciteInternalAccordionItemKeyEvent",6),this.calciteInternalAccordionItemSelect=t(this,"calciteInternalAccordionItemSelect",6),this.calciteInternalAccordionItemClose=t(this,"calciteInternalAccordionItemClose",6),this.calciteInternalAccordionItemRegister=t(this,"calciteInternalAccordionItemRegister",6),this.iconPosition="end",this.itemHeaderClickHandler=()=>this.emitRequestedItem(),this.expanded=!1,this.heading=void 0,this.description=void 0,this.iconStart=void 0,this.iconEnd=void 0}connectedCallback(){this.parent=this.el.parentElement,this.selectionMode=n(this.el,"selection-mode","multi"),this.iconType=n(this.el,"icon-type","chevron"),this.iconPosition=n(this.el,"icon-position",this.iconPosition),l(this)}componentDidLoad(){this.itemPosition=this.getItemPosition(),this.calciteInternalAccordionItemRegister.emit({parent:this.parent,position:this.itemPosition})}disconnectedCallback(){d(this)}renderActionsStart(){const{el:i}=this;return o(i,"actions-start")?a("div",{class:"actions-start"},a("slot",{name:"actions-start"})):null}renderActionsEnd(){const{el:i}=this;return o(i,"actions-end")?a("div",{class:"actions-end"},a("slot",{name:"actions-end"})):null}render(){const i=r(this.el),t=this.iconStart?a("calcite-icon",{class:"icon--start",icon:this.iconStart,key:"icon-start",scale:"s"}):null,c=this.iconEnd?a("calcite-icon",{class:"icon--end",icon:this.iconEnd,key:"icon-end",scale:"s"}):null,{description:n}=this;return a(e,null,a("div",{class:{[`icon-position--${this.iconPosition}`]:!0,[`icon-type--${this.iconType}`]:!0}},a("div",{class:{header:!0,[m.rtl]:"rtl"===i}},this.renderActionsStart(),a("div",{"aria-expanded":s(this.expanded),class:"header-content",onClick:this.itemHeaderClickHandler,role:"button",tabindex:"0"},a("div",{class:"header-container"},t,a("div",{class:"header-text"},a("span",{class:"heading"},this.heading),n?a("span",{class:"description"},n):null),c),a("calcite-icon",{class:"expand-icon",icon:"chevron"===this.iconType?"chevronDown":"caret"===this.iconType?"caretDown":this.expanded?"minus":"plus",scale:"s"})),this.renderActionsEnd()),a("div",{class:"content"},a("slot",null))))}keyDownHandler(i){if(i.target===this.el)switch(i.key){case" ":case"Enter":this.emitRequestedItem(),i.preventDefault();break;case"ArrowUp":case"ArrowDown":case"Home":case"End":this.calciteInternalAccordionItemKeyEvent.emit({parent:this.parent,item:i}),i.preventDefault()}}updateActiveItemOnChange(i){this.requestedAccordionItem=i.detail.requestedAccordionItem,this.el.parentNode===this.requestedAccordionItem.parentNode&&(this.determineActiveItem(),i.stopPropagation())}determineActiveItem(){switch(this.selectionMode){case"multi":case"multiple":this.el===this.requestedAccordionItem&&(this.expanded=!this.expanded);break;case"single":this.expanded=this.el===this.requestedAccordionItem&&!this.expanded;break;case"single-persist":this.expanded=this.el===this.requestedAccordionItem}}emitRequestedItem(){this.calciteInternalAccordionItemSelect.emit({requestedAccordionItem:this.el})}getItemPosition(){return Array.prototype.indexOf.call(this.parent.querySelectorAll("calcite-accordion-item"),this.el)}get el(){return c(this)}};p.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}.icon-position--end,.icon-position--start{--calcite-accordion-item-icon-rotation:calc(90deg * -1);--calcite-accordion-item-active-icon-rotation:0deg;--calcite-accordion-item-icon-rotation-rtl:90deg;--calcite-accordion-item-active-icon-rotation-rtl:0deg}.icon-position--start{--calcite-accordion-item-flex-direction:row-reverse;--calcite-accordion-item-icon-spacing-start:0;--calcite-accordion-item-icon-spacing-end:var(--calcite-accordion-icon-margin)}.icon-position--end{--calcite-accordion-item-flex-direction:row;--calcite-accordion-item-icon-spacing-start:var(--calcite-accordion-icon-margin);--calcite-accordion-item-icon-spacing-end:0}.icon-position--end:not(.icon-type--plus-minus){--calcite-accordion-item-icon-rotation:0deg;--calcite-accordion-item-active-icon-rotation:180deg;--calcite-accordion-item-icon-rotation-rtl:0deg;--calcite-accordion-item-active-icon-rotation-rtl:calc(180deg * -1)}:host{position:relative;display:flex;flex-direction:column;color:var(--calcite-ui-text-3);text-decoration-line:none;background-color:var(--calcite-accordion-item-background, var(--calcite-ui-foreground-1))}:host .header-content{outline-color:transparent}:host(:focus) .header-content{outline:2px solid transparent;outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([expanded]){color:var(--calcite-ui-text-1)}:host([expanded]) .content{display:block;color:var(--calcite-ui-text-1)}:host([expanded]) .header{border-block-end-color:transparent}:host .header{display:flex;align-items:stretch}:host .icon{position:relative;margin:0px;display:inline-flex;color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-accordion-item-icon-spacing-start);margin-inline-start:var(--calcite-accordion-item-icon-spacing-end)}.icon--start{display:flex;align-items:center;margin-inline-end:var(--calcite-accordion-icon-margin)}.icon--end{display:flex;align-items:center;margin-inline-end:var(--calcite-accordion-icon-margin);margin-inline-start:var(--calcite-accordion-icon-margin)}.header-container{inline-size:100%}.content{padding:var(--calcite-accordion-item-padding)}:host .content,:host .header{border-block-end:1px solid var(--calcite-accordion-item-border, var(--calcite-ui-border-2))}:host .header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .content{display:none;padding-block-start:0px;color:var(--calcite-ui-text-3);text-align:initial}:host .expand-icon{color:var(--calcite-ui-text-3);margin-inline-start:var(--calcite-accordion-item-icon-spacing-start);margin-inline-end:var(--calcite-accordion-item-icon-spacing-end);transform:rotate(var(--calcite-accordion-item-icon-rotation))}.calcite--rtl .expand-icon{transform:rotate(var(--calcite-accordion-item-icon-rotation-rtl))}:host([expanded]) .expand-icon{color:var(--calcite-ui-text-1);transform:rotate(var(--calcite-accordion-item-active-icon-rotation))}:host([expanded]) .calcite--rtl .expand-icon{transform:rotate(var(--calcite-accordion-item-active-icon-rotation-rtl))}:host .header-text{margin-block:0px;flex-grow:1;flex-direction:column;padding-block:0px;text-align:initial;margin-inline-end:auto}:host .heading,:host .description{display:flex;inline-size:100%}:host .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .description{margin-block-start:0.25rem;color:var(--calcite-ui-text-3)}:host(:focus) .heading,:host(:hover) .heading{color:var(--calcite-ui-text-1)}:host(:focus) .icon,:host(:hover) .icon{color:var(--calcite-ui-text-1)}:host(:focus) .expand-icon,:host(:hover) .expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .description,:host(:hover) .description{color:var(--calcite-ui-text-2)}:host(:focus) .heading,:host(:active) .heading,:host([expanded]) .heading{color:var(--calcite-ui-text-1)}:host(:focus) .icon,:host(:active) .icon,:host([expanded]) .icon{color:var(--calcite-ui-text-1)}:host(:focus) .expand-icon,:host(:active) .expand-icon,:host([expanded]) .expand-icon{color:var(--calcite-ui-text-1)}:host(:focus) .description,:host(:active) .description,:host([expanded]) .description{color:var(--calcite-ui-text-2)}.header-content{flex-grow:1;cursor:pointer;padding:var(--calcite-accordion-item-padding);flex-direction:var(--calcite-accordion-item-flex-direction)}.actions-start,.actions-end{display:flex;align-items:center}@media (forced-colors: active){:host([expanded]) .header{border-block-end:none}:host([expanded]) .heading{font-weight:bolder}:host(:hover) .heading,:host(:focus) .heading{text-decoration:underline}}";export{h as calcite_accordion,p as calcite_accordion_item}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as i,c as t,h as a,H as e,g as n}from"./p-49701eee.js";import{a as o,h as r,t as l}from"./p-a4a63866.js";import{c,d as s}from"./p-47f53948.js";import{a as d,c as m,d as h,H as u}from"./p-49a74b3e.js";import{u as p}from"./p-1cdae83d.js";import{s as f,a as g,c as b}from"./p-5bb6cc45.js";import"./p-a53596e5.js";import"./p-b0cecf6b.js";const v=class{constructor(a){i(this,a),this.calciteRadioGroupChange=t(this,"calciteRadioGroupChange",6),this.handleClick=i=>{"calcite-radio-group-item"===i.target.localName&&this.selectItem(i.target,!0)},this.appearance="solid",this.disabled=!1,this.required=!1,this.layout="horizontal",this.name=void 0,this.scale="m",this.value=null,this.selectedItem=void 0,this.width="auto"}valueHandler(i){this.getItems().forEach((t=>t.checked=t.value===i))}handleSelectedItemChange(i,t){if(this.value=null==i?void 0:i.value,i===t)return;const a=this.getItems(),e=Array.from(a).filter((t=>t===i)).pop();e?this.selectItem(e):a[0]&&(a[0].tabIndex=0)}componentWillLoad(){f(this);const i=this.getItems(),t=Array.from(i).filter((i=>i.checked)).pop();t?this.selectItem(t):i[0]&&(i[0].tabIndex=0)}componentDidLoad(){d(this,this.value),g(this)}connectedCallback(){c(this),m(this)}disconnectedCallback(){s(this),h(this)}componentDidRender(){p(this)}render(){return a(e,{onClick:this.handleClick,role:"radiogroup"},a("slot",null),a(u,{component:this}))}handleSelected(i){i.preventDefault(),this.selectItem(i.target),i.stopPropagation()}handleKeyDown(i){const{key:t}=i,{el:a,selectedItem:e}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;let n=t;"rtl"===o(a)&&("ArrowRight"===t&&(n="ArrowLeft"),"ArrowLeft"===t&&(n="ArrowRight"));const r=this.getItems();let l=-1;switch(r.forEach(((i,t)=>{i===e&&(l=t)})),n){case"ArrowLeft":case"ArrowUp":i.preventDefault();const t=r.item(l<1?r.length-1:l-1);return void this.selectItem(t,!0);case"ArrowRight":case"ArrowDown":i.preventDefault();const a=-1===l?r.item(1):r.item(l+1)||r.item(0);return void this.selectItem(a,!0);case" ":return i.preventDefault(),void this.selectItem(i.target,!0);default:return}}async setFocus(){var i;await b(this),null===(i=this.selectedItem||this.getItems()[0])||void 0===i||i.focus()}onLabelClick(){this.setFocus()}getItems(){return this.el.querySelectorAll("calcite-radio-group-item")}selectItem(i,t=!1){if(i===this.selectedItem)return;const a=this.getItems();let e=null;a.forEach((a=>{const n=a.value===i.value;(n&&!a.checked||!n&&a.checked)&&(a.checked=n),a.tabIndex=n?0:-1,n&&(e=a,t&&this.calciteRadioGroupChange.emit(e.value))})),this.selectedItem=e,e&&e.focus()}get el(){return n(this)}static get watchers(){return{value:["valueHandler"],selectedItem:["handleSelectedItemChange"]}}};v.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:var(--calcite-ui-foreground-1);inline-size:-moz-fit-content;inline-size:fit-content;outline:1px solid var(--calcite-ui-border-input);outline-offset:-1px}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([layout=vertical]){flex-direction:column;align-items:flex-start;align-self:flex-start}:host([width=full]){inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content}:host([width=full]) ::slotted(calcite-radio-group-item){flex:1 1 auto}:host([width=full][layout=vertical]) ::slotted(calcite-radio-group-item){justify-content:flex-start}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const y=class{constructor(a){i(this,a),this.calciteInternalRadioGroupItemChange=t(this,"calciteInternalRadioGroupItemChange",6),this.checked=!1,this.iconFlipRtl=!1,this.iconStart=void 0,this.iconEnd=void 0,this.value=void 0}handleCheckedChange(){this.calciteInternalRadioGroupItemChange.emit()}render(){const{checked:i,value:t}=this,n=r(this.el,"scale","m"),o=r(this.el,"appearance","solid"),c=r(this.el,"layout","horizontal"),s=this.iconStart?a("calcite-icon",{class:"radio-group-item-icon",flipRtl:this.iconFlipRtl,icon:this.iconStart,key:"icon-start",scale:"s"}):null,d=this.iconEnd?a("calcite-icon",{class:"radio-group-item-icon",flipRtl:this.iconFlipRtl,icon:this.iconEnd,key:"icon-end",scale:"s"}):null;return a(e,{"aria-checked":l(i),"aria-label":t,role:"radio"},a("label",{class:{"label--scale-s":"s"===n,"label--scale-m":"m"===n,"label--scale-l":"l"===n,"label--horizontal":"horizontal"===c,"label--outline":"outline"===o}},this.iconStart?s:null,a("slot",null,t),a("slot",{name:"input"}),this.iconEnd?d:null))}get el(){return n(this)}static get watchers(){return{checked:["handleCheckedChange"]}}};y.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:flex;cursor:pointer;align-self:stretch;font-weight:var(--calcite-font-weight-normal);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out, border-color var(--calcite-animation-timing) ease-in-out}:host label{pointer-events:none;margin:0.125rem;box-sizing:border-box;display:flex;flex:1 1 0%;align-items:center;color:var(--calcite-ui-text-3);transition:background-color var(--calcite-internal-animation-timing-fast) ease-in-out, border-color var(--calcite-internal-animation-timing-fast) ease-in-out, color var(--calcite-internal-animation-timing-fast) ease-in-out}.label--horizontal{justify-content:center}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:-1px}.label--scale-s{padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem;padding-block:0.125rem}.label--scale-m{padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;padding-block:0.375rem}.label--scale-l{padding-inline:1rem;padding-block:0.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host(:hover) label{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}:host(:active) label{background-color:var(--calcite-ui-foreground-3)}:host([checked]) label{cursor:default;border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-brand);color:var(--calcite-ui-background)}:host([checked]) .label--outline{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand);color:var(--calcite-ui-brand)}::slotted(input){display:none}@media (forced-colors: active){:host([checked]) label{background-color:highlight}:host([checked]) .label--outline{outline:2px solid transparent;outline-offset:2px}:host([checked]) label:not([class~=label--outline]) .radio-group-item-icon{color:highlightText}}.radio-group-item-icon{position:relative;margin:0px;display:inline-flex;line-height:inherit}:host([icon-start]) .label--scale-s .radio-group-item-icon{margin-inline-end:0.5rem}:host([icon-end]) .label--scale-s .radio-group-item-icon{margin-inline-start:0.5rem}:host([icon-start]) .label--scale-m .radio-group-item-icon{margin-inline-end:0.75rem}:host([icon-end]) .label--scale-m .radio-group-item-icon{margin-inline-start:0.75rem}:host([icon-start]) .label--scale-l .radio-group-item-icon{margin-inline-end:1rem}:host([icon-end]) .label--scale-l .radio-group-item-icon{margin-inline-start:1rem}";export{v as calcite_radio_group,y as calcite_radio_group_item}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,h as i,H as e,g as n,f as a}from"./p-49701eee.js";import{c as o}from"./p-e452903d.js";import{u as r}from"./p-1cdae83d.js";import{t as c}from"./p-a4a63866.js";import{s as l,a as s,c as d}from"./p-5bb6cc45.js";import"./p-a53596e5.js";import"./p-b0cecf6b.js";const u=class{constructor(i){t(this,i),this.mutationObserver=o("mutation",(()=>a(this))),this.handleTooltipSlotChange=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")))[0];i&&(i.referenceElement=this.buttonEl)},this.active=!1,this.alignment=void 0,this.appearance="solid",this.compact=!1,this.disabled=!1,this.icon=void 0,this.indicator=!1,this.intlLoading="Loading",this.label=void 0,this.loading=!1,this.scale="m",this.text=void 0,this.textEnabled=!1}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}componentWillLoad(){l(this)}componentDidLoad(){s(this)}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}componentDidRender(){r(this)}async setFocus(){var t;await d(this),null===(t=this.buttonEl)||void 0===t||t.focus()}renderTextContainer(){const{text:t,textEnabled:e}=this;return t?i("div",{class:{"text-container":!0,"text-container--visible":e},key:"text-container"},t):null}renderIconContainer(){var t;const{loading:e,icon:n,scale:a,el:o,intlLoading:r}=this,c="l"===a?"m":"s",l=e?i("calcite-loader",{inline:!0,label:r,scale:"l"===a?"l":"m"}):null,s=n?i("calcite-icon",{icon:n,scale:c}):null,d=l||s,u=d||(null===(t=o.children)||void 0===t?void 0:t.length),b=i("div",{class:{"slot-container":!0,"slot-container--hidden":e}},i("slot",null));return u?i("div",{"aria-hidden":"true",class:"icon-container",key:"icon-container"},d,b):null}render(){const{compact:t,disabled:n,loading:a,textEnabled:o,label:r,text:l}=this,s=r||l,d={button:!0,"button--text-visible":o,"button--compact":t};return i(e,null,i("button",{"aria-busy":c(a),"aria-disabled":c(n),"aria-label":s,class:d,disabled:n,ref:t=>this.buttonEl=t},this.renderIconContainer(),this.renderTextContainer()),i("slot",{name:"tooltip",onSlotchange:this.handleTooltipSlotChange}))}get el(){return n(this)}};u.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:transparent;--calcite-action-indicator-color:var(--calcite-ui-brand)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.button{position:relative;margin:0px;display:flex;inline-size:auto;cursor:pointer;align-items:center;justify-content:flex-start;border-style:none;background-color:var(--calcite-ui-foreground-1);fill:var(--calcite-ui-text-3);font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);outline-color:transparent;text-align:unset;flex:1 0 auto}.button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.button:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.button:active{background-color:var(--calcite-ui-foreground-3)}.button .icon-container{pointer-events:none;margin:0px;display:flex;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1rem}.button .text-container{margin:0px;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5rem;opacity:0;transition-property:opacity;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:margin;transition-property:inline-size}.button .text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([scale=s]) .button{padding-inline:0.5rem;padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .button--text-visible .icon-container{margin-inline-end:0.5rem}:host([scale=m]) .button{padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=m]) .button--text-visible .icon-container{margin-inline-end:0.75rem}:host([scale=l]) .button{padding:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=l]) .button--text-visible .icon-container{margin-inline-end:1rem}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.button--text-visible{inline-size:100%}:host([active]) .button,:host([active]) .button:hover,:host([active]) .button:focus,:host([active][loading]) .button{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([active]) .button:active{background-color:var(--calcite-ui-foreground-1)}:host([appearance=transparent]) .button{background-color:transparent;transition-property:box-shadow;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host([appearance=transparent]) .button:hover,:host([appearance=transparent]) .button:focus{background-color:transparent;box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset}:host([active][appearance=transparent]) .button,:host([active][appearance=transparent]) .button:hover,:host([active][appearance=transparent]) .button:focus{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([appearance=transparent][loading]) .button,:host([appearance=transparent][disabled]) .button{background-color:transparent}:host([loading]) .button,:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-ui-foreground-1)}:host([loading]) .button .text-container,:host([loading]) .button:hover .text-container,:host([loading]) .button:focus .text-container{opacity:var(--calcite-ui-opacity-disabled)}:host([loading]) calcite-loader[inline]{color:var(--calcite-ui-text-3);margin-inline-end:0px}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;background-color:var(--calcite-ui-foreground-1);opacity:var(--calcite-ui-opacity-disabled)}:host([disabled][active]) .button,:host([disabled][active]) .button:hover,:host([disabled][active]) .button:focus{background-color:var(--calcite-ui-foreground-3);opacity:var(--calcite-ui-opacity-disabled)}:host([indicator]) .button::after{content:"";position:absolute;block-size:0.5rem;inline-size:0.5rem;border-radius:9999px;border-width:2px;background-color:var(--calcite-action-indicator-color);border-color:var(--calcite-ui-foreground-1);inset-block-end:0.75rem;inset-inline-end:0.75rem}:host([indicator]) .button--text-visible::after{inset-block-end:auto}:host([indicator]) .button--text-visible .text-container--visible{margin-inline-end:1rem}:host([indicator]) .button:hover::after,:host([indicator]) .button:focus::after{border-color:var(--calcite-ui-foreground-1)}:host([indicator][scale=s]) .button::after{inset-block-end:0.25rem;inset-inline-end:0.25rem}:host([indicator][scale=s]) .button--text-visible::after{inset-block-end:auto;inset-inline-end:0.5rem}:host([indicator][active]) .button::after{border-color:var(--calcite-ui-foreground-3)}';export{u as calcite_action}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as e,F as n}from"./p-49701eee.js";import{m as c,d as o,a as s,s as r,h as l,b as d,c as h,k as m,i as p,f as u,l as f,j as g,r as v,o as b,p as y,n as x,q as w,t as k,I as _,L as D,u as z,v as I,T as C,w as L,C as H,S as j}from"./p-4331211c.js";import{c as W}from"./p-e452903d.js";import{u as F}from"./p-1cdae83d.js";import{s as R,a as S,c as T}from"./p-5bb6cc45.js";import{g as V,t as A}from"./p-a4a63866.js";import{H as P,c as U}from"./p-9dd2a286.js";import{c as K,d as q}from"./p-5dd53e64.js";import"./p-98183f7a.js";import"./p-c8946ac4.js";import"./p-a53596e5.js";import"./p-b0cecf6b.js";const E=class{constructor(a){t(this,a),this.calciteListChange=i(this,"calciteListChange",6),this.calciteListFilter=i(this,"calciteListFilter",6),this.lastSelectedItem=null,this.mutationObserver=W("mutation",c.bind(this)),this.setFilterEl=t=>{this.filterEl=t},this.setFilteredItems=t=>{this.filteredItems=t},this.deselectRemovedItems=o.bind(this),this.deselectSiblingItems=s.bind(this),this.selectSiblings=r.bind(this),this.handleFilter=l.bind(this),this.handleFilterEvent=d.bind(this),this.getItemData=h.bind(this),this.keyDownHandler=m.bind(this),this.disabled=!1,this.filteredItems=[],this.filteredData=[],this.filterEnabled=!1,this.filterPlaceholder=void 0,this.filterText=void 0,this.headingLevel=void 0,this.loading=!1,this.multiple=!1,this.selectionFollowsFocus=!1,this.selectedValues=new Map,this.dataForFilter=[]}connectedCallback(){p.call(this),u.call(this)}disconnectedCallback(){f.call(this)}componentWillLoad(){R(this)}componentDidLoad(){S(this),g.call(this)}componentDidRender(){F(this)}calciteListItemRemoveHandler(t){v.call(this,t)}calciteListItemChangeHandler(t){b.call(this,t)}calciteInternalListItemPropsChangeHandler(t){t.stopPropagation(),this.setUpFilter()}calciteInternalListItemValueChangeHandler(t){y.call(this,t),t.stopPropagation()}calciteListFocusOutHandler(t){x.call(this,t)}setUpItems(){w.call(this,"calcite-pick-list-item")}setUpFilter(){this.filterEnabled&&(this.dataForFilter=this.getItemData())}async getSelectedItems(){return this.selectedValues}async setFocus(t){return await T(this),k.call(this,t)}getIconType(){return this.multiple?_.square:_.circle}render(){return a(D,{onKeyDown:this.keyDownHandler,props:this})}get el(){return e(this)}};E.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;box-sizing:border-box;display:flex;flex-shrink:0;flex-grow:1;flex-direction:column;align-items:stretch;background-color:transparent;font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([filter-enabled]) header{margin-block-end:0.25rem;display:flex;align-items:stretch;justify-content:flex-end;background-color:var(--calcite-ui-foreground-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([filter-enabled]) header.sticky-pos{position:sticky;inset-block-start:0px;z-index:1}calcite-filter{margin-block-end:0px}:host([loading][disabled]){min-block-size:2rem}";const M=class{constructor(i){t(this,i),this.groupTitle=void 0,this.headingLevel=void 0}connectedCallback(){K(this)}disconnectedCallback(){q(this)}render(){var t;const{el:i,groupTitle:e,headingLevel:c}=this,o=null!==V(i,z.parentItem),s={[I.container]:!0,[I.indented]:o},r=e,l=null===(t=i.closest("calcite-pick-list"))||void 0===t?void 0:t.headingLevel,d=l?U(l+1):null;return a(n,null,r?a(P,{class:I.heading,level:c||d},r):null,a("slot",{name:z.parentItem}),a("section",{class:s},a("slot",null)))}get el(){return e(this)}};M.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{margin-block-end:0.25rem;box-sizing:border-box;display:block;background-color:transparent;font-size:var(--calcite-font-size--1);color:var(--calcite-ui-text-2)}:host *{box-sizing:border-box}:host(:last-child){margin-block-end:0px}.header{margin:0px;display:flex;align-content:space-between;align-items:center;fill:var(--calcite-ui-text-2);color:var(--calcite-ui-text-2)}.heading{margin:0px;padding:0px;font-weight:var(--calcite-font-weight-medium)}.header .heading{flex:1 1 auto;padding:0.5rem}.heading{margin-block:0.5rem;margin-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-size:var(--calcite-font-size--1);line-height:1.375;color:var(--calcite-ui-text-3)}.container--indented{margin-inline-start:1.5rem}";const O=class{constructor(a){t(this,a),this.calciteListItemChange=i(this,"calciteListItemChange",6),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.calciteInternalListItemPropsChange=i(this,"calciteInternalListItemPropsChange",6),this.calciteInternalListItemValueChange=i(this,"calciteInternalListItemValueChange",6),this.pickListClickHandler=t=>{this.disabled||this.disableDeselect&&this.selected||this.nonInteractive||(this.shiftPressed=t.shiftKey,this.selected=!this.selected)},this.pickListKeyDownHandler=t=>{if(" "===t.key){if(t.preventDefault(),this.disableDeselect&&this.selected||this.nonInteractive)return;this.selected=!this.selected}},this.removeClickHandler=()=>{this.calciteListItemRemove.emit()},this.description=void 0,this.disabled=!1,this.disableDeselect=!1,this.nonInteractive=!1,this.icon=null,this.label=void 0,this.metadata=void 0,this.removable=!1,this.selected=!1,this.intlRemove=C.remove,this.value=void 0}descriptionWatchHandler(){this.calciteInternalListItemPropsChange.emit()}labelWatchHandler(){this.calciteInternalListItemPropsChange.emit()}metadataWatchHandler(){this.calciteInternalListItemPropsChange.emit()}selectedWatchHandler(){this.calciteListItemChange.emit({item:this.el,value:this.value,selected:this.selected,shiftPressed:this.shiftPressed}),this.shiftPressed=!1}valueWatchHandler(t,i){this.calciteInternalListItemValueChange.emit({oldValue:i,newValue:t})}connectedCallback(){K(this)}componentWillLoad(){R(this)}componentDidLoad(){S(this)}disconnectedCallback(){q(this)}componentDidRender(){F(this,!!this.el.closest("calcite-pick-list")&&"managed")}async toggleSelected(t){this.selected="boolean"==typeof t?t:!this.selected}async setFocus(){var t;await T(this),null===(t=this.focusEl)||void 0===t||t.focus()}renderIcon(){const{icon:t}=this;return t?a("span",{class:{[H.icon]:!0,[H.iconDot]:t===_.circle},onClick:this.pickListClickHandler},t===_.square?a("calcite-icon",{icon:L.checked,scale:"s"}):null):null}renderRemoveAction(){return this.removable?a("calcite-action",{class:H.remove,icon:L.remove,onClick:this.removeClickHandler,slot:j.actionsEnd,text:this.intlRemove}):null}renderActionsStart(){const{el:t}=this;return V(t,j.actionsStart)?a("div",{class:{[H.actions]:!0,[H.actionsStart]:!0}},a("slot",{name:j.actionsStart})):null}renderActionsEnd(){const{el:t,removable:i}=this;return V(t,j.actionsEnd)||i?a("div",{class:{[H.actions]:!0,[H.actionsEnd]:!0}},a("slot",{name:j.actionsEnd}),this.renderRemoveAction()):null}render(){const{description:t,label:i}=this;return a(n,null,this.renderIcon(),this.renderActionsStart(),a("label",{"aria-label":i,class:H.label,onClick:this.pickListClickHandler,onKeyDown:this.pickListKeyDownHandler,ref:t=>this.focusEl=t,tabIndex:0},a("div",{"aria-checked":A(this.selected),class:H.textContainer,role:"menuitemcheckbox"},a("span",{class:H.title},i),t?a("span",{class:H.description},t):null)),this.renderActionsEnd())}get el(){return e(this)}static get watchers(){return{description:["descriptionWatchHandler"],label:["labelWatchHandler"],metadata:["metadataWatchHandler"],selected:["selectedWatchHandler"],value:["valueWatchHandler"]}}};O.style='@charset "UTF-8";@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{margin:0px;margin-block-end:1px;box-sizing:border-box;display:flex;align-items:stretch;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing);animation:calcite-fade-in var(--calcite-animation-timing)}:host *{box-sizing:border-box}.label{display:flex;flex:1 1 auto;cursor:pointer;align-items:center;background-color:transparent;outline-color:transparent}.label:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover{background-color:var(--calcite-ui-foreground-2)}:host([non-interactive]:hover){background-color:var(--calcite-ui-foreground-1)}:host([non-interactive]) .label,:host([non-interactive]) .icon{pointer-events:none}.icon{margin-block:0px;display:flex;cursor:pointer;align-items:center;padding:0.25rem;color:var(--calcite-ui-brand);flex:0 0 auto;line-height:0}.icon:hover{background-color:var(--calcite-ui-foreground-2)}.icon-dot{display:flex;inline-size:1.5rem;align-items:center;padding:0.5rem}.icon-dot:before{opacity:0;content:"•"}.icon calcite-icon{opacity:0}:host([selected]) .icon-dot:before,:host([selected]) .icon calcite-icon{transition:opacity var(--calcite-animation-timing);opacity:1}.text-container{pointer-events:none;display:flex;flex-direction:column;flex-wrap:nowrap;overflow:hidden;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--2);line-height:1.375;word-wrap:break-word;word-break:break-word}.title{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}.description{margin-block-start:0.125rem;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.actions{margin:0px;display:flex;flex:0 1 auto;align-items:stretch;justify-content:flex-end}.actions--start~.label{padding-inline-start:0.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}';export{E as calcite_pick_list,M as calcite_pick_list_group,O as calcite_pick_list_item}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.0.0-next.653
|
|
5
|
-
*/
|
|
6
|
-
import{r as t,c as i,h as e,F as n,g as a}from"./p-49701eee.js";import{C as o,I as s,S as c}from"./p-2ec7c680.js";import{t as l,i as r,f as h}from"./p-a4a63866.js";import{g as m}from"./p-98183f7a.js";import{g as d}from"./p-b0cecf6b.js";import{i as u}from"./p-5a953a75.js";import{s as p,a as f,c as v}from"./p-5bb6cc45.js";import"./p-a53596e5.js";const x=["ArrowUp","ArrowDown","End","Home"],g=class{constructor(e){t(this,e),this.calciteActionMenuOpenChange=i(this,"calciteActionMenuOpenChange",6),this.actionElements=[],this.guid=`calcite-action-menu-${d()}`,this.menuId=`${this.guid}-menu`,this.menuButtonId=`${this.guid}-menu-button`,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},this.expanded=!1,this.flipPlacements=void 0,this.label=void 0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.scale=void 0,this.menuButtonEl=void 0,this.activeMenuItemIndex=-1}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(),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}
|