@esri/calcite-components 1.1.1-next.2 → 1.2.0
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/assets/card/t9n/messages.json +1 -1
- package/dist/calcite/assets/card/t9n/messages_en.json +1 -1
- package/dist/calcite/assets/text-area/t9n/index.d.ts +4 -0
- package/dist/calcite/assets/text-area/t9n/messages.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ar.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_bg.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_bs.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ca.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_cs.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_da.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_de.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_el.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_en.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_es.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_et.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_fi.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_fr.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_he.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_hr.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_hu.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_id.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_it.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ja.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ko.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_lt.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_lv.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_nl.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_no.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_pl.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_pt-BR.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_pt-PT.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ro.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_ru.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_sk.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_sl.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_sr.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_sv.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_th.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_tr.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_uk.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_vi.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_zh-CN.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_zh-HK.json +4 -0
- package/dist/calcite/assets/text-area/t9n/messages_zh-TW.json +4 -0
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/{p-74f1c90b.js → p-002052f4.js} +2 -2
- package/dist/calcite/p-0142973c.entry.js +6 -0
- package/dist/calcite/p-016e277d.js +6 -0
- package/dist/calcite/p-05215047.js +6 -0
- package/dist/calcite/{p-488815fe.js → p-0b1f31dd.js} +1 -1
- package/dist/calcite/p-11c55611.entry.js +6 -0
- package/dist/calcite/{p-4534f76b.entry.js → p-13f0cdda.entry.js} +2 -2
- package/dist/calcite/{p-f86309f4.entry.js → p-1465611a.entry.js} +2 -2
- package/dist/calcite/{p-46d33089.js → p-19422786.js} +2 -2
- package/dist/calcite/{p-72a0bc37.js → p-1ac41302.js} +1 -1
- package/dist/calcite/p-1d969d62.entry.js +6 -0
- package/dist/calcite/{p-288e344c.entry.js → p-1e3ef9c7.entry.js} +2 -2
- package/dist/calcite/{p-8a043b9f.js → p-2154b7de.js} +1 -1
- package/dist/calcite/{p-7bb42e56.js → p-232abc61.js} +1 -1
- package/dist/calcite/{p-9981817e.js → p-26d8628f.js} +1 -1
- package/dist/calcite/{p-23ad4bfb.js → p-28407877.js} +1 -1
- package/dist/calcite/{p-3aeef6ee.entry.js → p-2d675cda.entry.js} +2 -2
- package/dist/calcite/p-320e4fc1.entry.js +6 -0
- package/dist/calcite/p-3421c539.entry.js +6 -0
- package/dist/calcite/p-3719b1b0.js +6 -0
- package/dist/calcite/p-384ea8a3.entry.js +6 -0
- package/dist/calcite/p-3aa0bac2.entry.js +6 -0
- package/dist/calcite/{p-f5c4eb5d.entry.js → p-3bfa15de.entry.js} +2 -2
- package/dist/calcite/p-3cf4821b.entry.js +6 -0
- package/dist/calcite/p-3d51c732.entry.js +6 -0
- package/dist/calcite/{p-20599012.entry.js → p-3e11d878.entry.js} +2 -2
- package/dist/calcite/{p-19f1fa4d.js → p-403627a1.js} +2 -2
- package/dist/calcite/{p-6c13263d.entry.js → p-42dd4006.entry.js} +2 -2
- package/dist/calcite/{p-c3712bbc.js → p-4680a41d.js} +1 -1
- package/dist/calcite/p-48ab9a1b.entry.js +6 -0
- package/dist/calcite/{p-e77e94ed.js → p-48b61c4b.js} +1 -1
- package/dist/calcite/{p-bb0841d9.entry.js → p-4ae1fc79.entry.js} +2 -2
- package/dist/calcite/{p-fd97b1db.entry.js → p-4df1bcf0.entry.js} +2 -2
- package/dist/calcite/{p-48436a62.js → p-5351c56f.js} +1 -1
- package/dist/calcite/{p-8dd480dc.js → p-55b16a54.js} +1 -1
- package/dist/calcite/{p-e6b2d77a.entry.js → p-55baafb1.entry.js} +2 -2
- package/dist/calcite/p-57475aad.entry.js +6 -0
- package/dist/calcite/p-57ae6d0f.entry.js +6 -0
- package/dist/calcite/{p-badf1941.entry.js → p-5b9ce91b.entry.js} +2 -2
- package/dist/calcite/{p-22f92d3d.js → p-5f91b826.js} +2 -2
- package/dist/calcite/{p-c2f6d427.entry.js → p-67dc4de5.entry.js} +2 -2
- package/dist/calcite/{p-51361b1d.entry.js → p-6813168f.entry.js} +2 -2
- package/dist/calcite/{p-1b45013b.entry.js → p-6931b06b.entry.js} +2 -2
- package/dist/calcite/{p-3f511ad2.entry.js → p-6fff0923.entry.js} +2 -2
- package/dist/calcite/p-72f2f04b.entry.js +6 -0
- package/dist/calcite/{p-8ff60594.js → p-76928557.js} +1 -1
- package/dist/calcite/{p-541d6ac8.entry.js → p-774c2616.entry.js} +2 -2
- package/dist/calcite/{p-92ea927c.js → p-78b606c3.js} +2 -2
- package/dist/calcite/{p-ae886df6.entry.js → p-863adbc0.entry.js} +2 -2
- package/dist/calcite/{p-24f78b05.js → p-8728d1dd.js} +1 -1
- package/dist/calcite/{p-22e3649b.entry.js → p-872be970.entry.js} +2 -2
- package/dist/calcite/{p-f6270352.js → p-89b710ae.js} +3 -3
- package/dist/calcite/{p-48ea2302.entry.js → p-89edac92.entry.js} +2 -2
- package/dist/calcite/{p-ad9d3a88.entry.js → p-8a099a88.entry.js} +2 -2
- package/dist/calcite/{p-45e7b17e.js → p-911962bd.js} +1 -1
- package/dist/calcite/p-969fa230.entry.js +6 -0
- package/dist/calcite/{p-0768b989.entry.js → p-9dea6751.entry.js} +2 -2
- package/dist/calcite/{p-ce55a9cd.entry.js → p-9e7a442e.entry.js} +2 -2
- package/dist/calcite/{p-abf7b09b.entry.js → p-9ea8dd79.entry.js} +2 -2
- package/dist/calcite/{p-ba611b6f.js → p-9ee2e227.js} +2 -2
- package/dist/calcite/p-9f076e5d.entry.js +6 -0
- package/dist/calcite/p-a8790d90.entry.js +6 -0
- package/dist/calcite/p-a9158071.js +6 -0
- package/dist/calcite/{p-7146c7ed.entry.js → p-aa232102.entry.js} +2 -2
- package/dist/calcite/{p-760418c4.entry.js → p-aa271401.entry.js} +2 -2
- package/dist/calcite/{p-8eb2ba0e.entry.js → p-ae7e71fe.entry.js} +2 -2
- package/dist/calcite/{p-5b32aa48.entry.js → p-aff8afea.entry.js} +2 -2
- package/dist/calcite/{p-cc3b11f8.entry.js → p-b0493125.entry.js} +2 -2
- package/dist/calcite/{p-48fb9a71.js → p-b16095ce.js} +1 -1
- package/dist/calcite/{p-c5b57b48.entry.js → p-b5774a7b.entry.js} +2 -2
- package/dist/calcite/{p-a2ccabc4.js → p-b5c59463.js} +1 -1
- package/dist/calcite/{p-6d3415c8.js → p-b80446b3.js} +3 -3
- package/dist/calcite/p-b9e13a83.entry.js +6 -0
- package/dist/calcite/{p-fe096fb9.js → p-bb5a7862.js} +1 -1
- package/dist/calcite/p-bd6b3b70.entry.js +6 -0
- package/dist/calcite/{p-df17746a.entry.js → p-be98f17e.entry.js} +2 -2
- package/dist/calcite/{p-f1d4dac5.entry.js → p-c519e114.entry.js} +2 -2
- package/dist/calcite/{p-8575ea0d.js → p-cce57689.js} +1 -1
- package/dist/calcite/{p-7a9de49d.js → p-cd6ef38b.js} +2 -2
- package/dist/calcite/p-ce979e83.entry.js +6 -0
- package/dist/calcite/{p-c056871a.entry.js → p-d1077a87.entry.js} +2 -2
- package/dist/calcite/p-d2b28559.entry.js +6 -0
- package/dist/calcite/p-d30a68d5.js +6 -0
- package/dist/calcite/p-d33afdbc.entry.js +6 -0
- package/dist/calcite/p-d6d039b5.entry.js +6 -0
- package/dist/calcite/{p-9dd20596.entry.js → p-d7a6cadf.entry.js} +2 -2
- package/dist/calcite/{p-117b271d.js → p-d95dd729.js} +2 -2
- package/dist/calcite/{p-0453ed05.entry.js → p-dc8b0da1.entry.js} +2 -2
- package/dist/calcite/{p-2e3f6511.entry.js → p-de9d0e6d.entry.js} +2 -2
- package/dist/calcite/{p-94633289.js → p-e1349fa9.js} +2 -2
- package/dist/calcite/{p-e8fe7c0d.entry.js → p-f0a56732.entry.js} +2 -2
- package/dist/calcite/p-fa5829ef.entry.js +6 -0
- package/dist/calcite/{p-e4c3a1c4.entry.js → p-fd3b58e5.entry.js} +2 -2
- package/dist/calcite/{p-b79fb255.entry.js → p-fd46c6b7.entry.js} +2 -2
- package/dist/cjs/{ExpandToggle-0c5a99b1.js → ExpandToggle-7367419c.js} +5 -5
- package/dist/cjs/{Heading-68ba8117.js → Heading-dcba7c66.js} +2 -2
- package/dist/cjs/{app-globals-496272d2.js → app-globals-0788b16e.js} +2 -2
- package/dist/cjs/{array-da28e904.js → array-16cfc2ce.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-action-bar.cjs.entry.js +15 -15
- package/dist/cjs/calcite-action-group.cjs.entry.js +27 -12
- package/dist/cjs/calcite-action-menu.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-pad.cjs.entry.js +14 -14
- package/dist/cjs/calcite-action.cjs.entry.js +11 -11
- package/dist/cjs/calcite-alert.cjs.entry.js +12 -12
- package/dist/cjs/calcite-avatar.cjs.entry.js +6 -6
- package/dist/cjs/calcite-block_2.cjs.entry.js +12 -12
- package/dist/cjs/calcite-button.cjs.entry.js +15 -14
- package/dist/cjs/calcite-card.cjs.entry.js +11 -12
- package/dist/cjs/calcite-checkbox.cjs.entry.js +11 -10
- package/dist/cjs/calcite-chip.cjs.entry.js +11 -11
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +16 -80
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +19 -18
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +27 -12
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +26 -12
- package/dist/cjs/calcite-fab.cjs.entry.js +7 -7
- package/dist/cjs/calcite-filter.cjs.entry.js +13 -13
- package/dist/cjs/calcite-flow-item.cjs.entry.js +12 -12
- package/dist/cjs/calcite-flow.cjs.entry.js +3 -3
- package/dist/cjs/calcite-graph_2.cjs.entry.js +14 -13
- package/dist/cjs/calcite-handle.cjs.entry.js +10 -10
- package/dist/cjs/calcite-icon.cjs.entry.js +6 -6
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +12 -12
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +17 -16
- package/dist/cjs/calcite-input-message.cjs.entry.js +5 -5
- package/dist/cjs/calcite-input-number.cjs.entry.js +14 -13
- package/dist/cjs/calcite-input-text.cjs.entry.js +14 -13
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +14 -13
- package/dist/cjs/calcite-input.cjs.entry.js +14 -13
- package/dist/cjs/calcite-label.cjs.entry.js +6 -6
- package/dist/cjs/calcite-link.cjs.entry.js +7 -7
- package/dist/cjs/calcite-list_3.cjs.entry.js +9 -9
- package/dist/cjs/calcite-loader.cjs.entry.js +3 -3
- package/dist/cjs/calcite-modal.cjs.entry.js +13 -13
- package/dist/cjs/calcite-notice.cjs.entry.js +12 -12
- package/dist/cjs/calcite-option_3.cjs.entry.js +11 -10
- package/dist/cjs/calcite-pagination.cjs.entry.js +22 -11
- package/dist/cjs/calcite-panel.cjs.entry.js +14 -14
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +16 -16
- package/dist/cjs/calcite-popover.cjs.entry.js +15 -15
- package/dist/cjs/calcite-progress.cjs.entry.js +2 -2
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button.cjs.entry.js +11 -10
- package/dist/cjs/calcite-rating.cjs.entry.js +14 -13
- package/dist/cjs/calcite-scrim.cjs.entry.js +9 -9
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +10 -9
- package/dist/cjs/calcite-shell_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +5 -5
- package/dist/cjs/calcite-split-button.cjs.entry.js +20 -3
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +10 -10
- package/dist/cjs/calcite-switch.cjs.entry.js +11 -10
- package/dist/cjs/calcite-tab_4.cjs.entry.js +7 -7
- package/dist/cjs/calcite-text-area.cjs.entry.js +246 -0
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tile.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tip_3.cjs.entry.js +11 -11
- package/dist/cjs/calcite-tooltip.cjs.entry.js +8 -8
- package/dist/cjs/calcite-tree_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +16 -16
- package/dist/cjs/calcite.cjs.js +5 -5
- package/dist/cjs/{conditionalSlot-f73b8511.js → conditionalSlot-5656d59c.js} +3 -3
- package/dist/cjs/{debounce-2f62ac4c.js → debounce-a11903ad.js} +1 -1
- package/dist/cjs/{dom-706667df.js → dom-dc375f9f.js} +6 -3
- package/dist/cjs/{filter-00579327.js → filter-09a2cbf3.js} +2 -2
- package/dist/cjs/{floating-ui-3a46b800.js → floating-ui-d76898e7.js} +4 -4
- package/dist/cjs/{focusTrapComponent-63afc9b2.js → focusTrapComponent-10b93e09.js} +2 -2
- package/dist/cjs/{form-05a4fadc.js → form-85e72154.js} +38 -8
- package/dist/cjs/{guid-fcb9c017.js → guid-4daeb326.js} +1 -1
- package/dist/cjs/{index-3dc519f7.js → index-b6e1067b.js} +5 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-27db04a1.js → interactive-059fb608.js} +1 -1
- package/dist/cjs/{key-235be376.js → key-d7b507f8.js} +1 -1
- package/dist/cjs/{label-26dbc15e.js → label-5380391e.js} +2 -2
- package/dist/cjs/{loadable-c38cb815.js → loadable-19d269a6.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{locale-0eccd9e9.js → locale-cc5d712a.js} +4 -4
- package/dist/cjs/{math-f65f9b02.js → math-da4701fc.js} +1 -1
- package/dist/cjs/{observers-484369d9.js → observers-8c623fb7.js} +1 -1
- package/dist/cjs/{openCloseComponent-946420f4.js → openCloseComponent-08e6daa2.js} +2 -2
- package/dist/cjs/{resources-9535a54e.js → resources-0c82b41e.js} +1 -1
- package/dist/cjs/{resources-6a879402.js → resources-6c2223d4.js} +1 -1
- package/dist/cjs/{resources-ec5696ad.js → resources-78766ff3.js} +1 -1
- package/dist/cjs/{resources-f5f0d735.js → resources-90786f6b.js} +5 -5
- package/dist/cjs/{resources-66f2676f.js → resources-e94f129e.js} +1 -1
- package/dist/cjs/{resources-4afcd38d.js → resources-ed022f42.js} +1 -1
- package/dist/cjs/{sortable.esm-495796bb.js → sortable.esm-ac24f8d4.js} +1 -1
- package/dist/cjs/{t9n-35486495.js → t9n-394540b0.js} +3 -3
- package/dist/cjs/throttle-27c991ba.js +75 -0
- package/dist/cjs/{utils-c07c9630.js → utils-3c442102.js} +1 -1
- package/dist/cjs/{utils-bf97166e.js → utils-bf247e2a.js} +1 -1
- package/dist/cjs/{utils-ff0206d1.js → utils-f0c307f8.js} +3 -3
- package/dist/collection/collection-manifest.json +6 -0
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.js +1 -1
- package/dist/collection/components/accordion-item/resources.js +1 -1
- package/dist/collection/components/action/action.js +1 -1
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.js +1 -1
- package/dist/collection/components/action-bar/resources.js +1 -1
- package/dist/collection/components/action-bar/utils.js +1 -1
- package/dist/collection/components/action-group/action-group.js +37 -3
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.js +1 -1
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.js +1 -1
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/avatar/utils.js +1 -1
- package/dist/collection/components/block/block.js +1 -1
- package/dist/collection/components/block/resources.js +1 -1
- package/dist/collection/components/block-section/block-section.js +1 -1
- package/dist/collection/components/block-section/resources.js +1 -1
- package/dist/collection/components/button/button.js +21 -4
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/assets/card/t9n/messages.json +1 -1
- package/dist/collection/components/card/assets/card/t9n/messages_en.json +1 -1
- package/dist/collection/components/card/card.js +2 -3
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +19 -1
- package/dist/collection/components/chip/chip.js +1 -1
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.js +1 -1
- package/dist/collection/components/color-picker/resources.js +1 -1
- package/dist/collection/components/color-picker/utils.js +1 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +1 -1
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
- package/dist/collection/components/color-picker-swatch/resources.js +1 -1
- package/dist/collection/components/combobox/combobox.js +19 -1
- package/dist/collection/components/combobox/resources.js +1 -1
- package/dist/collection/components/combobox/utils.js +1 -1
- package/dist/collection/components/combobox-item/combobox-item.js +1 -1
- package/dist/collection/components/combobox-item/resources.js +1 -1
- package/dist/collection/components/combobox-item-group/combobox-item-group.js +1 -1
- package/dist/collection/components/combobox-item-group/resources.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +36 -1
- package/dist/collection/components/date-picker/resources.js +1 -1
- package/dist/collection/components/date-picker/utils.js +1 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +1 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +1 -1
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.js +32 -1
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.js +1 -1
- package/dist/collection/components/dropdown-group/resources.js +1 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +1 -1
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.js +1 -1
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.js +1 -1
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.js +1 -1
- package/dist/collection/components/flow/resources.js +1 -1
- package/dist/collection/components/flow-item/flow-item.js +1 -1
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +1 -1
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/handle.js +1 -1
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/resources.js +1 -1
- package/dist/collection/components/icon/utils.js +1 -1
- package/dist/collection/components/inline-editable/inline-editable.js +1 -1
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.js +19 -1
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +19 -1
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.js +1 -1
- package/dist/collection/components/input-message/interfaces.js +1 -1
- package/dist/collection/components/input-number/input-number.js +19 -1
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.js +19 -1
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +19 -1
- package/dist/collection/components/label/label.js +1 -1
- package/dist/collection/components/label/resources.js +1 -1
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/list/list.js +1 -1
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.js +1 -1
- package/dist/collection/components/list-item/resources.js +1 -1
- package/dist/collection/components/list-item/utils.js +1 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.js +1 -1
- package/dist/collection/components/modal/resources.js +1 -1
- package/dist/collection/components/notice/notice.js +1 -1
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.js +30 -3
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.js +1 -1
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.js +1 -1
- package/dist/collection/components/pick-list/resources.js +1 -1
- package/dist/collection/components/pick-list/shared-list-logic.js +1 -1
- package/dist/collection/components/pick-list/shared-list-render.js +1 -1
- package/dist/collection/components/pick-list-group/pick-list-group.js +1 -1
- package/dist/collection/components/pick-list-group/resources.js +1 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +1 -1
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +19 -1
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/rating/function/star.js +1 -1
- package/dist/collection/components/rating/rating.js +19 -1
- package/dist/collection/components/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.js +19 -1
- package/dist/collection/components/segmented-control-item/resources.js +1 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.js +1 -1
- package/dist/collection/components/select/resources.js +1 -1
- package/dist/collection/components/select/select.js +19 -1
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.js +1 -1
- package/dist/collection/components/shell-center-row/resources.js +1 -1
- package/dist/collection/components/shell-center-row/shell-center-row.js +1 -1
- package/dist/collection/components/shell-panel/resources.js +1 -1
- package/dist/collection/components/shell-panel/shell-panel.js +1 -1
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.js +19 -1
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.js +1 -1
- package/dist/collection/components/split-button/resources.js +1 -1
- package/dist/collection/components/split-button/split-button.js +38 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +1 -1
- package/dist/collection/components/switch/switch.js +19 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.js +1 -1
- package/dist/collection/components/tab-title/resources.js +1 -1
- package/dist/collection/components/tab-title/tab-title.js +1 -1
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/text-area/assets/text-area/t9n/index.d.ts +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ar.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_bg.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_bs.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ca.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_cs.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_da.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_de.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_el.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_en.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_es.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_et.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_fi.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_fr.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_he.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_hr.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_hu.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_id.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_it.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ja.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ko.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_lt.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_lv.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_nl.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_no.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_pl.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_pt-BR.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_pt-PT.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ro.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_ru.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_sk.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_sl.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_sr.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_sv.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_th.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_tr.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_uk.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_vi.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_zh-CN.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_zh-HK.json +4 -0
- package/dist/collection/components/text-area/assets/text-area/t9n/messages_zh-TW.json +4 -0
- package/dist/collection/components/text-area/resources.js +27 -0
- package/dist/collection/components/text-area/text-area.css +287 -0
- package/dist/collection/components/text-area/text-area.js +691 -0
- 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 +7 -7
- package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
- package/dist/collection/components/time-picker/resources.js +1 -1
- package/dist/collection/components/time-picker/time-picker.js +1 -1
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.js +1 -1
- package/dist/collection/components/tip-group/tip-group.js +1 -1
- package/dist/collection/components/tip-manager/resources.js +1 -1
- package/dist/collection/components/tip-manager/tip-manager.js +1 -1
- package/dist/collection/components/tooltip/TooltipManager.js +1 -1
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/collection/components/tooltip/utils.js +1 -1
- package/dist/collection/components/tree/tree.js +1 -1
- package/dist/collection/components/tree/utils.js +1 -1
- package/dist/collection/components/tree-item/resources.js +1 -1
- package/dist/collection/components/tree-item/tree-item.js +1 -1
- package/dist/collection/components/value-list/resources.js +1 -1
- package/dist/collection/components/value-list/utils.js +1 -1
- package/dist/collection/components/value-list/value-list.js +1 -1
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.js +1 -1
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +4 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/utils.js +1 -1
- package/dist/collection/utils/floating-ui.js +1 -1
- package/dist/collection/utils/focusTrapComponent.js +1 -1
- package/dist/collection/utils/form.js +36 -7
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +1 -1
- package/dist/collection/utils/mode.js +1 -1
- package/dist/collection/utils/number.js +1 -1
- package/dist/collection/utils/observers.js +1 -1
- package/dist/collection/utils/openCloseComponent.js +1 -1
- package/dist/collection/utils/resources.js +1 -1
- package/dist/collection/utils/t9n.js +1 -1
- package/dist/collection/utils/time.js +1 -1
- package/dist/components/ExpandToggle.js +1 -1
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +18 -2
- package/dist/components/action-menu.js +1 -1
- package/dist/components/action.js +1 -1
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +5 -4
- package/dist/components/calcite-accordion-item.js +1 -1
- package/dist/components/calcite-accordion.js +1 -1
- package/dist/components/calcite-action-bar.js +1 -1
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +1 -1
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +1 -1
- package/dist/components/calcite-avatar.js +1 -1
- package/dist/components/calcite-block-section.js +1 -1
- package/dist/components/calcite-block.js +1 -1
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +2 -3
- 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 +2 -67
- 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 +3 -1
- package/dist/components/calcite-date-picker-day.js +1 -1
- package/dist/components/calcite-date-picker-month-header.js +1 -1
- package/dist/components/calcite-date-picker-month.js +1 -1
- package/dist/components/calcite-date-picker.js +1 -1
- package/dist/components/calcite-dropdown-group.js +1 -1
- package/dist/components/calcite-dropdown-item.js +1 -1
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +1 -1
- package/dist/components/calcite-flow.js +1 -1
- package/dist/components/calcite-graph.js +1 -1
- package/dist/components/calcite-handle.js +1 -1
- package/dist/components/calcite-icon.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +3 -1
- package/dist/components/calcite-input-message.js +1 -1
- package/dist/components/calcite-input-number.js +3 -1
- package/dist/components/calcite-input-text.js +3 -1
- package/dist/components/calcite-input-time-picker.js +3 -1
- package/dist/components/calcite-input.js +1 -1
- package/dist/components/calcite-label.js +1 -1
- package/dist/components/calcite-link.js +1 -1
- package/dist/components/calcite-list-item-group.js +1 -1
- package/dist/components/calcite-list-item.js +1 -1
- package/dist/components/calcite-list.js +1 -1
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +1 -1
- package/dist/components/calcite-notice.js +1 -1
- package/dist/components/calcite-option-group.js +1 -1
- package/dist/components/calcite-option.js +1 -1
- package/dist/components/calcite-pagination.js +15 -3
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +1 -1
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +1 -1
- package/dist/components/calcite-radio-button.js +3 -1
- package/dist/components/calcite-rating.js +3 -1
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-segmented-control-item.js +1 -1
- package/dist/components/calcite-segmented-control.js +3 -1
- package/dist/components/calcite-select.js +3 -1
- package/dist/components/calcite-shell-center-row.js +1 -1
- package/dist/components/calcite-shell-panel.js +1 -1
- package/dist/components/calcite-shell.js +1 -1
- package/dist/components/calcite-slider.js +3 -1
- package/dist/components/calcite-sortable-list.js +1 -1
- package/dist/components/calcite-split-button.js +20 -2
- package/dist/components/calcite-stepper-item.js +1 -1
- package/dist/components/calcite-stepper.js +1 -1
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-text-area.d.ts +11 -0
- package/dist/components/calcite-text-area.js +283 -0
- package/dist/components/calcite-tile-select-group.js +1 -1
- package/dist/components/calcite-tile-select.js +5 -5
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +1 -1
- package/dist/components/calcite-tip-manager.js +1 -1
- package/dist/components/calcite-tip.js +1 -1
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +1 -1
- package/dist/components/calcite-tree.js +1 -1
- package/dist/components/calcite-value-list-item.js +1 -1
- package/dist/components/calcite-value-list.js +1 -1
- package/dist/components/checkbox.js +3 -1
- package/dist/components/chip.js +1 -1
- package/dist/components/color-picker-hex-input.js +1 -1
- package/dist/components/color-picker-swatch.js +1 -1
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +1 -1
- package/dist/components/date-picker-month-header.js +1 -1
- package/dist/components/date-picker-month.js +1 -1
- package/dist/components/date-picker.js +18 -2
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +4 -1
- package/dist/components/dropdown.js +17 -1
- package/dist/components/filter.js +1 -1
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +1 -1
- package/dist/components/focusTrapComponent.js +1 -1
- package/dist/components/form.js +37 -8
- package/dist/components/graph.js +1 -1
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +3 -1
- package/dist/components/interactive.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/locale.js +1 -1
- package/dist/components/math.js +1 -1
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +1 -1
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/resources.js +1 -1
- package/dist/components/resources2.js +1 -1
- package/dist/components/resources3.js +1 -1
- package/dist/components/scrim.js +1 -1
- package/dist/components/shared-list-render.js +1 -1
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +3 -1
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tab.js +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/throttle.js +73 -0
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/utils.js +1 -1
- package/dist/components/utils2.js +1 -1
- package/dist/components/utils3.js +1 -1
- package/dist/components/utils4.js +1 -1
- package/dist/esm/{ExpandToggle-6dfbcf2f.js → ExpandToggle-65fad00d.js} +5 -5
- package/dist/esm/{Heading-0f8bb46b.js → Heading-1ea6b199.js} +2 -2
- package/dist/esm/{app-globals-8db1b089.js → app-globals-23bff25a.js} +2 -2
- package/dist/esm/{array-c34af128.js → array-d1cecef4.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +7 -7
- package/dist/esm/calcite-action-bar.entry.js +15 -15
- package/dist/esm/calcite-action-group.entry.js +27 -12
- package/dist/esm/calcite-action-menu.entry.js +9 -9
- package/dist/esm/calcite-action-pad.entry.js +14 -14
- package/dist/esm/calcite-action.entry.js +11 -11
- package/dist/esm/calcite-alert.entry.js +12 -12
- package/dist/esm/calcite-avatar.entry.js +6 -6
- package/dist/esm/calcite-block_2.entry.js +12 -12
- package/dist/esm/calcite-button.entry.js +15 -14
- package/dist/esm/calcite-card.entry.js +11 -12
- package/dist/esm/calcite-checkbox.entry.js +11 -10
- package/dist/esm/calcite-chip.entry.js +11 -11
- package/dist/esm/calcite-color-picker_3.entry.js +15 -79
- package/dist/esm/calcite-combobox_3.entry.js +19 -18
- package/dist/esm/calcite-date-picker_4.entry.js +27 -12
- package/dist/esm/calcite-dropdown_3.entry.js +26 -12
- package/dist/esm/calcite-fab.entry.js +7 -7
- package/dist/esm/calcite-filter.entry.js +13 -13
- package/dist/esm/calcite-flow-item.entry.js +12 -12
- package/dist/esm/calcite-flow.entry.js +3 -3
- package/dist/esm/calcite-graph_2.entry.js +14 -13
- package/dist/esm/calcite-handle.entry.js +10 -10
- package/dist/esm/calcite-icon.entry.js +6 -6
- package/dist/esm/calcite-inline-editable.entry.js +12 -12
- package/dist/esm/calcite-input-date-picker.entry.js +17 -16
- package/dist/esm/calcite-input-message.entry.js +5 -5
- package/dist/esm/calcite-input-number.entry.js +14 -13
- package/dist/esm/calcite-input-text.entry.js +14 -13
- package/dist/esm/calcite-input-time-picker_2.entry.js +14 -13
- package/dist/esm/calcite-input.entry.js +14 -13
- package/dist/esm/calcite-label.entry.js +6 -6
- package/dist/esm/calcite-link.entry.js +7 -7
- package/dist/esm/calcite-list_3.entry.js +9 -9
- package/dist/esm/calcite-loader.entry.js +3 -3
- package/dist/esm/calcite-modal.entry.js +13 -13
- package/dist/esm/calcite-notice.entry.js +12 -12
- package/dist/esm/calcite-option_3.entry.js +11 -10
- package/dist/esm/calcite-pagination.entry.js +22 -11
- package/dist/esm/calcite-panel.entry.js +14 -14
- package/dist/esm/calcite-pick-list_3.entry.js +16 -16
- package/dist/esm/calcite-popover.entry.js +15 -15
- package/dist/esm/calcite-progress.entry.js +2 -2
- package/dist/esm/calcite-radio-button-group.entry.js +3 -3
- package/dist/esm/calcite-radio-button.entry.js +11 -10
- package/dist/esm/calcite-rating.entry.js +14 -13
- package/dist/esm/calcite-scrim.entry.js +9 -9
- package/dist/esm/calcite-segmented-control_2.entry.js +10 -9
- package/dist/esm/calcite-shell_3.entry.js +11 -11
- package/dist/esm/calcite-sortable-list.entry.js +5 -5
- package/dist/esm/calcite-split-button.entry.js +20 -3
- package/dist/esm/calcite-stepper_2.entry.js +10 -10
- package/dist/esm/calcite-switch.entry.js +11 -10
- package/dist/esm/calcite-tab_4.entry.js +7 -7
- package/dist/esm/calcite-text-area.entry.js +242 -0
- package/dist/esm/calcite-tile-select_2.entry.js +8 -8
- package/dist/esm/calcite-tile.entry.js +8 -8
- package/dist/esm/calcite-tip_3.entry.js +11 -11
- package/dist/esm/calcite-tooltip.entry.js +8 -8
- package/dist/esm/calcite-tree_2.entry.js +9 -9
- package/dist/esm/calcite-value-list_2.entry.js +16 -16
- package/dist/esm/calcite.js +6 -6
- package/dist/esm/{conditionalSlot-bc3f48fd.js → conditionalSlot-fa8a7775.js} +3 -3
- package/dist/esm/{debounce-2f846e59.js → debounce-82a5515a.js} +1 -1
- package/dist/esm/{dom-dbf8ad7f.js → dom-d2c51b4f.js} +6 -3
- package/dist/esm/{filter-bbee9d77.js → filter-10435724.js} +2 -2
- package/dist/esm/{floating-ui-bac898d0.js → floating-ui-1971b3db.js} +4 -4
- package/dist/esm/{focusTrapComponent-01ea8684.js → focusTrapComponent-607ce12d.js} +2 -2
- package/dist/esm/{form-2110bc63.js → form-02f2cff9.js} +38 -9
- package/dist/esm/{guid-13cd82e7.js → guid-a16483b5.js} +1 -1
- package/dist/esm/{index-14a76282.js → index-7cac2f3f.js} +5 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-25afe2e1.js → interactive-06caa37b.js} +1 -1
- package/dist/esm/{key-e3a5ba48.js → key-81b2634f.js} +1 -1
- package/dist/esm/{label-f5e9f775.js → label-c485f4f8.js} +2 -2
- package/dist/esm/{loadable-b2a39249.js → loadable-8c121e4b.js} +1 -1
- package/dist/esm/loader.js +6 -6
- package/dist/esm/{locale-56186cbf.js → locale-270ffb3c.js} +4 -4
- package/dist/esm/{math-f83da299.js → math-a2bb65cb.js} +1 -1
- package/dist/esm/{observers-c93b41a6.js → observers-77a8b45d.js} +1 -1
- package/dist/esm/{openCloseComponent-f3056902.js → openCloseComponent-6705b509.js} +2 -2
- package/dist/esm/{resources-92aa2e8b.js → resources-044bcbc4.js} +1 -1
- package/dist/esm/{resources-2063ea55.js → resources-3f7ed5a5.js} +1 -1
- package/dist/esm/{resources-5d23bf07.js → resources-48b20118.js} +1 -1
- package/dist/esm/{resources-e064d460.js → resources-780d7239.js} +5 -5
- package/dist/esm/{resources-3bb07d09.js → resources-7a04dab1.js} +1 -1
- package/dist/esm/{resources-093f789e.js → resources-add10009.js} +1 -1
- package/dist/esm/{sortable.esm-67f7d66b.js → sortable.esm-325dcfc4.js} +1 -1
- package/dist/esm/{t9n-dc4494d1.js → t9n-223ccb9b.js} +3 -3
- package/dist/esm/throttle-0023c320.js +73 -0
- package/dist/esm/{utils-03006c2d.js → utils-35c56cd6.js} +1 -1
- package/dist/esm/{utils-2d3df878.js → utils-7c9d4f71.js} +3 -3
- package/dist/esm/{utils-06b5bddc.js → utils-c1c0f2c9.js} +1 -1
- package/dist/extras/docs-json.json +837 -4
- 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/action-group/action-group.d.ts +5 -1
- package/dist/types/components/button/button.d.ts +6 -0
- package/dist/types/components/checkbox/checkbox.d.ts +6 -0
- package/dist/types/components/combobox/combobox.d.ts +6 -0
- package/dist/types/components/date-picker/date-picker.d.ts +5 -1
- package/dist/types/components/dropdown/dropdown.d.ts +5 -1
- package/dist/types/components/input/input.d.ts +6 -0
- package/dist/types/components/input-date-picker/input-date-picker.d.ts +6 -0
- package/dist/types/components/input-number/input-number.d.ts +6 -0
- package/dist/types/components/input-text/input-text.d.ts +6 -0
- package/dist/types/components/input-time-picker/input-time-picker.d.ts +6 -0
- package/dist/types/components/pagination/pagination.d.ts +5 -1
- package/dist/types/components/radio-button/radio-button.d.ts +6 -0
- package/dist/types/components/rating/rating.d.ts +6 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +6 -0
- package/dist/types/components/select/select.d.ts +6 -0
- package/dist/types/components/slider/slider.d.ts +6 -0
- package/dist/types/components/split-button/split-button.d.ts +6 -1
- package/dist/types/components/switch/switch.d.ts +6 -0
- package/dist/types/components/text-area/assets/text-area/t9n/index.d.ts +4 -0
- package/dist/types/components/text-area/resources.d.ts +22 -0
- package/dist/types/components/text-area/text-area.d.ts +160 -0
- package/dist/types/components/tile-select/tile-select.d.ts +3 -3
- package/dist/types/components.d.ts +336 -0
- package/dist/types/preact.d.ts +5 -0
- package/dist/types/utils/form.d.ts +20 -4
- package/hydrate/index.js +835 -451
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/calcite/p-05be1985.entry.js +0 -6
- package/dist/calcite/p-08ff4ee6.entry.js +0 -6
- package/dist/calcite/p-0e2a04e5.entry.js +0 -6
- package/dist/calcite/p-0ee9a401.entry.js +0 -6
- package/dist/calcite/p-1bb8fab3.entry.js +0 -6
- package/dist/calcite/p-1c5f01f0.entry.js +0 -6
- package/dist/calcite/p-1dae11a4.entry.js +0 -6
- package/dist/calcite/p-28c2cdf8.js +0 -6
- package/dist/calcite/p-28f74ebe.entry.js +0 -6
- package/dist/calcite/p-3c74c413.js +0 -6
- package/dist/calcite/p-3cb23f94.entry.js +0 -6
- package/dist/calcite/p-424be0e9.entry.js +0 -6
- package/dist/calcite/p-6003caa1.entry.js +0 -6
- package/dist/calcite/p-6e447493.js +0 -6
- package/dist/calcite/p-79434104.entry.js +0 -6
- package/dist/calcite/p-799ce995.entry.js +0 -6
- package/dist/calcite/p-7d61c491.entry.js +0 -6
- package/dist/calcite/p-81cd8241.js +0 -6
- package/dist/calcite/p-8978cb1e.entry.js +0 -6
- package/dist/calcite/p-98ec07dc.entry.js +0 -6
- package/dist/calcite/p-a26871f1.entry.js +0 -6
- package/dist/calcite/p-af272da9.entry.js +0 -6
- package/dist/calcite/p-b610191a.entry.js +0 -6
- package/dist/calcite/p-e7ecc383.entry.js +0 -6
- package/dist/calcite/p-f367aaf0.entry.js +0 -6
- package/dist/calcite/p-f691bd92.entry.js +0 -6
- package/dist/extras/vscode-data.json +0 -6138
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,g as a,H as n}from"./p-8a043b9f.js";import{u as r,h as o,t as s}from"./p-f6270352.js";import{u as c}from"./p-fe096fb9.js";import{n as l,c as p,d}from"./p-ba611b6f.js";import{s as h,a as m,c as u}from"./p-48fb9a71.js";import"./p-a2ccabc4.js";import"./p-8dd480dc.js";import"./p-9981817e.js";import"./p-24f78b05.js";const f=class{constructor(i){t(this,i),this.calciteStepperItemChange=e(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=e(this,"calciteInternalStepperItemChange",6),this.itemMap=new Map,this.items=[],this.enabledItems=[],this.icon=!1,this.layout="horizontal",this.numbered=!1,this.numberingSystem=void 0,this.selectedItem=null,this.scale="m"}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return i("slot",{onSlotchange:t=>{const e=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===t?.tagName)),i=Array(e.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=i,this.el.style.gridTemplateColumns=i}})}calciteInternalStepperItemKeyEvent(t){const e=t.target;switch(t.detail.item.key){case"ArrowDown":case"ArrowRight":r(this.enabledItems,e,"next");break;case"ArrowUp":case"ArrowLeft":r(this.enabledItems,e,"previous");break;case"Home":r(this.enabledItems,e,"first");break;case"End":r(this.enabledItems,e,"last")}t.stopPropagation()}registerItem(t){const e=t.target,{content:i,position:a}=t.detail;this.itemMap.set(e,{position:a,content:i}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:e}=t.detail;"number"==typeof e&&(this.currentPosition=e,this.selectedItem=t.target),this.calciteInternalStepperItemChange.emit({position:e})}handleUserRequestedStepperItemSelect(){this.calciteStepperItemChange.emit()}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const e=t-1;this.currentPosition!==e&&this.updateStep(e)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,e="next"){const{items:i,currentPosition:a}=this;let n=t;for(;i[n]?.disabled;)n+="previous"===e?-1:1;return n!==a&&n<i.length&&n>=0?n:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((e,i)=>t.get(e).position-t.get(i).position))}filterItems(){return this.items.filter((t=>!t.disabled))}get el(){return a(this)}};f.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';const b=class{constructor(i){t(this,i),this.calciteInternalStepperItemKeyEvent=e(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=e(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=e(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=e(this,"calciteInternalStepperItemRegister",6),this.keyDownHandler=t=>{if(!this.disabled&&t.target===this.el)switch(t.key){case" ":case"Enter":this.emitUserRequestedItem(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:t}),t.preventDefault()}},this.handleItemClick=t=>{"horizontal"===this.layout&&t.composedPath().some((t=>t.classList?.contains("stepper-item-content")))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})},this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.heading=void 0,this.description=void 0,this.layout="horizontal",this.icon=!1,this.iconFlipRtl=!1,this.numbered=!1,this.scale="m",this.effectiveLocale=""}selectedHandler(){this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(t){l.numberFormatOptions={locale:t,numberingSystem:this.parentStepperEl?.numberingSystem,useGrouping:!1}}connectedCallback(){p(this)}componentWillLoad(){h(this),this.icon=o(this.el,"icon",!1),this.numbered=o(this.el,"numbered",!1),this.layout=o(this.el,"layout",!1),this.scale=o(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidLoad(){m(this)}componentDidRender(){c(this,!0)}disconnectedCallback(){d(this)}render(){return i(n,{"aria-expanded":s(this.selected),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",tabIndex:"horizontal"!==this.layout||this.disabled?null:0,ref:t=>this.headerEl=t},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},this.renderNumbers(),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading),i("span",{class:"stepper-item-description"},this.description))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(t){(t.target===this.parentStepperEl||t.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=t.detail.position,this.determineSelectedItem())}async setFocus(){await u(this),("vertical"===this.layout?this.el:this.headerEl)?.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",flipRtl:this.iconFlipRtl,icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}renderNumbers(){return l.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.parentStepperEl?.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}get el(){return a(this)}static get watchers(){return{selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};b.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content:not(:empty){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}";export{f as calcite_stepper,b as calcite_stepper_item}
|
|
6
|
+
import{r as t,c as e,h as i,g as a,H as n}from"./p-2154b7de.js";import{u as r,h as o,t as s}from"./p-89b710ae.js";import{u as c}from"./p-bb5a7862.js";import{n as l,c as p,d}from"./p-9ee2e227.js";import{s as h,a as m,c as u}from"./p-b16095ce.js";import"./p-b5c59463.js";import"./p-55b16a54.js";import"./p-26d8628f.js";import"./p-8728d1dd.js";const b=class{constructor(i){t(this,i),this.calciteStepperItemChange=e(this,"calciteStepperItemChange",6),this.calciteInternalStepperItemChange=e(this,"calciteInternalStepperItemChange",6),this.itemMap=new Map,this.items=[],this.enabledItems=[],this.icon=!1,this.layout="horizontal",this.numbered=!1,this.numberingSystem=void 0,this.selectedItem=null,this.scale="m"}componentDidLoad(){"number"!=typeof this.currentPosition&&this.calciteInternalStepperItemChange.emit({position:0})}render(){return i("slot",{onSlotchange:t=>{const e=t.currentTarget.assignedElements().filter((t=>"CALCITE-STEPPER-ITEM"===t?.tagName)),i=Array(e.length).fill("1fr").join(" ");this.el.style.gridTemplateAreas=i,this.el.style.gridTemplateColumns=i}})}calciteInternalStepperItemKeyEvent(t){const e=t.target;switch(t.detail.item.key){case"ArrowDown":case"ArrowRight":r(this.enabledItems,e,"next");break;case"ArrowUp":case"ArrowLeft":r(this.enabledItems,e,"previous");break;case"Home":r(this.enabledItems,e,"first");break;case"End":r(this.enabledItems,e,"last")}t.stopPropagation()}registerItem(t){const e=t.target,{content:i,position:a}=t.detail;this.itemMap.set(e,{position:a,content:i}),this.items=this.sortItems(),this.enabledItems=this.filterItems(),t.stopPropagation()}updateItem(t){const{position:e}=t.detail;"number"==typeof e&&(this.currentPosition=e,this.selectedItem=t.target),this.calciteInternalStepperItemChange.emit({position:e})}handleUserRequestedStepperItemSelect(){this.calciteStepperItemChange.emit()}async nextStep(){const t=this.getEnabledStepIndex(this.currentPosition+1,"next");"number"==typeof t&&this.updateStep(t)}async prevStep(){const t=this.getEnabledStepIndex(this.currentPosition-1,"previous");"number"==typeof t&&this.updateStep(t)}async goToStep(t){const e=t-1;this.currentPosition!==e&&this.updateStep(e)}async startStep(){const t=this.getEnabledStepIndex(0,"next");"number"==typeof t&&this.updateStep(t)}async endStep(){const t=this.getEnabledStepIndex(this.items.length-1,"previous");"number"==typeof t&&this.updateStep(t)}getEnabledStepIndex(t,e="next"){const{items:i,currentPosition:a}=this;let n=t;for(;i[n]?.disabled;)n+="previous"===e?-1:1;return n!==a&&n<i.length&&n>=0?n:null}updateStep(t){this.currentPosition=t,this.calciteInternalStepperItemChange.emit({position:t})}sortItems(){const{itemMap:t}=this;return Array.from(t.keys()).sort(((e,i)=>t.get(e).position-t.get(i).position))}filterItems(){return this.items.filter((t=>!t.disabled))}get el(){return a(this)}};b.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;min-inline-size:-moz-fit-content;min-inline-size:fit-content;flex-direction:row;flex-wrap:wrap;align-items:stretch;justify-content:space-between}:host([layout=vertical]){flex:1 1 auto;flex-direction:column}:host([layout=horizontal]){display:grid;grid-template-areas:"items" "content"}';const f=class{constructor(i){t(this,i),this.calciteInternalStepperItemKeyEvent=e(this,"calciteInternalStepperItemKeyEvent",6),this.calciteInternalStepperItemSelect=e(this,"calciteInternalStepperItemSelect",6),this.calciteInternalUserRequestedStepperItemSelect=e(this,"calciteInternalUserRequestedStepperItemSelect",6),this.calciteInternalStepperItemRegister=e(this,"calciteInternalStepperItemRegister",6),this.keyDownHandler=t=>{if(!this.disabled&&t.target===this.el)switch(t.key){case" ":case"Enter":this.emitUserRequestedItem(),t.preventDefault();break;case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"Home":case"End":this.calciteInternalStepperItemKeyEvent.emit({item:t}),t.preventDefault()}},this.handleItemClick=t=>{"horizontal"===this.layout&&t.composedPath().some((t=>t.classList?.contains("stepper-item-content")))||this.emitUserRequestedItem()},this.emitUserRequestedItem=()=>{this.emitRequestedItem(),this.disabled||this.calciteInternalUserRequestedStepperItemSelect.emit({position:this.itemPosition})},this.emitRequestedItem=()=>{this.disabled||this.calciteInternalStepperItemSelect.emit({position:this.itemPosition})},this.selected=!1,this.complete=!1,this.error=!1,this.disabled=!1,this.heading=void 0,this.description=void 0,this.layout="horizontal",this.icon=!1,this.iconFlipRtl=!1,this.numbered=!1,this.scale="m",this.effectiveLocale=""}selectedHandler(){this.selected&&this.emitRequestedItem()}disabledWatcher(){this.registerStepperItem()}effectiveLocaleWatcher(t){l.numberFormatOptions={locale:t,numberingSystem:this.parentStepperEl?.numberingSystem,useGrouping:!1}}connectedCallback(){p(this)}componentWillLoad(){h(this),this.icon=o(this.el,"icon",!1),this.numbered=o(this.el,"numbered",!1),this.layout=o(this.el,"layout",!1),this.scale=o(this.el,"scale","m"),this.parentStepperEl=this.el.parentElement,this.itemPosition=this.getItemPosition(),this.registerStepperItem(),this.selected&&this.emitRequestedItem()}componentDidLoad(){m(this)}componentDidRender(){c(this,!0)}disconnectedCallback(){d(this)}render(){return i(n,{"aria-expanded":s(this.selected),onClick:this.handleItemClick,onKeyDown:this.keyDownHandler},i("div",{class:"container"},i("div",{class:"stepper-item-header",tabIndex:"horizontal"!==this.layout||this.disabled?null:0,ref:t=>this.headerEl=t},this.icon?this.renderIcon():null,this.numbered?i("div",{class:"stepper-item-number"},this.renderNumbers(),"."):null,i("div",{class:"stepper-item-header-text"},i("span",{class:"stepper-item-heading"},this.heading),i("span",{class:"stepper-item-description"},this.description))),i("div",{class:"stepper-item-content"},i("slot",null))))}updateActiveItemOnChange(t){(t.target===this.parentStepperEl||t.composedPath().includes(this.parentStepperEl))&&(this.selectedPosition=t.detail.position,this.determineSelectedItem())}async setFocus(){await u(this),("vertical"===this.layout?this.el:this.headerEl)?.focus()}renderIcon(){return i("calcite-icon",{class:"stepper-item-icon",flipRtl:this.iconFlipRtl,icon:this.selected?"circleF":this.error?"exclamationMarkCircleF":this.complete?"checkCircleF":"circle",scale:"s"})}determineSelectedItem(){this.selected=!this.disabled&&this.itemPosition===this.selectedPosition}registerStepperItem(){this.calciteInternalStepperItemRegister.emit({position:this.itemPosition})}getItemPosition(){return Array.from(this.parentStepperEl?.querySelectorAll("calcite-stepper-item")).indexOf(this.el)}renderNumbers(){return l.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.parentStepperEl?.numberingSystem,useGrouping:!1},l.numberFormatter.format(this.itemPosition+1)}get el(){return a(this)}static get watchers(){return{selected:["selectedHandler"],disabled:["disabledWatcher"],effectiveLocale:["effectiveLocaleWatcher"]}}};f.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([layout=horizontal][disabled]) .stepper-item-header,:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([scale=s]){--calcite-stepper-item-spacing-unit-s:0.25rem;--calcite-stepper-item-spacing-unit-m:0.75rem;--calcite-stepper-item-spacing-unit-l:1rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-inline-end:0.25rem}:host([scale=s]) .stepper-item-description{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-stepper-item-spacing-unit-s:0.5rem;--calcite-stepper-item-spacing-unit-m:1rem;--calcite-stepper-item-spacing-unit-l:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-inline-end:0.5rem}:host([scale=m]) .stepper-item-description{font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-stepper-item-spacing-unit-s:0.75rem;--calcite-stepper-item-spacing-unit-m:1.25rem;--calcite-stepper-item-spacing-unit-l:1.5rem;font-size:var(--calcite-font-size-1);line-height:1.5rem;margin-inline-end:0.75rem}:host([scale=l]) .stepper-item-description{font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{position:relative;display:flex;flex-grow:1;flex-direction:column;align-self:flex-start;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host .container{position:relative;display:flex;flex-grow:1;cursor:pointer;flex-direction:column;border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);color:var(--calcite-ui-text-3);text-decoration-line:none;outline:2px solid transparent;outline-offset:2px;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host{outline-color:transparent}:host(:focus){outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host .stepper-item-header{display:flex;cursor:pointer;align-items:flex-start}:host .stepper-item-content,:host .stepper-item-header{transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:var(--calcite-stepper-item-spacing-unit-l);padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host .stepper-item-header *{display:inline-flex;align-items:center;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-content{display:none;inline-size:100%;flex-direction:column;font-size:var(--calcite-font-size--2);line-height:1.375}:host .stepper-item-icon{margin-inline-end:var(--calcite-stepper-item-spacing-unit-m);margin-block-start:1px;display:inline-flex;block-size:0.75rem;flex-shrink:0;align-self:flex-start;color:var(--calcite-ui-text-3);opacity:var(--calcite-ui-opacity-disabled);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host .stepper-item-header-text{flex-direction:column;text-align:initial;margin-inline-end:auto}:host .stepper-item-heading,:host .stepper-item-description{display:flex;inline-size:100%}:host .stepper-item-heading{margin-block-end:0.25rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}:host .stepper-item-description{color:var(--calcite-ui-text-3)}:host .stepper-item-number{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);margin-inline-end:var(--calcite-stepper-item-spacing-unit-m)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([complete]) .container .stepper-item-icon{color:var(--calcite-ui-brand)}:host([error]) .container{border-block-start-color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-number{color:var(--calcite-ui-danger)}:host([error]) .container .stepper-item-icon{opacity:1;color:var(--calcite-ui-danger)}:host(:hover:not([disabled]):not([selected])) .container,:host(:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-brand)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-heading,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host(:hover:not([disabled]):not([selected])) .container .stepper-item-description,:host(:focus:not([disabled]):not([selected])) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([error]:hover:not([disabled]):not([selected])) .container,:host([error]:focus:not([disabled]):not([selected])) .container{border-block-start-color:var(--calcite-ui-danger-hover)}:host([selected]) .container{border-block-start-color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-heading{color:var(--calcite-ui-text-1)}:host([selected]) .container .stepper-item-description{color:var(--calcite-ui-text-2)}:host([selected]) .container .stepper-item-number{color:var(--calcite-ui-brand)}:host([selected]) .container .stepper-item-icon{color:var(--calcite-ui-brand);opacity:1}:host([selected]) .container .stepper-item-content{display:flex}:host([layout=vertical]) .container{margin-inline:0px;margin-block-start:0px;flex:1 1 auto;border-block-start-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);padding-block:0px;border-inline-start-width:2px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]) .container .stepper-item-icon{order:3;margin-block:1px 0px;padding-inline-start:var(--calcite-stepper-item-spacing-unit-s);margin-inline-start:auto}:host([layout=vertical]) .container .stepper-item-header{padding-inline-end:0px}:host([layout=vertical]) .container .stepper-item-content{padding:0px}:host([layout=vertical][complete]) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][complete]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][complete]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][error]) .container{border-color:var(--calcite-ui-danger)}:host([layout=vertical][selected]) .container{border-color:var(--calcite-ui-brand)}:host([layout=vertical][selected]) .container .stepper-item-content:not(:empty){margin-block-end:var(--calcite-stepper-item-spacing-unit-l)}:host([layout=vertical]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical]:focus:not([disabled]):not([selected])) .container{border-color:rgba(0, 122, 194, 0.5)}:host([layout=vertical][error]:hover:not([disabled]):not([selected])) .container,:host([layout=vertical][error]:focus:not([disabled]):not([selected])) .container{border-color:var(--calcite-ui-danger-hover)}:host([layout=horizontal]){display:contents}:host([layout=horizontal]) .container{display:contents}:host([layout=horizontal]) .stepper-item-header{border-width:0px;border-block-start-width:2px;border-style:solid;border-color:var(--calcite-ui-border-3);outline-color:transparent;grid-row:items;margin-inline-end:0.5rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal]) .stepper-item-header:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([layout=horizontal]) .stepper-item-content{cursor:auto;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);padding-block:0;padding-inline-end:var(--calcite-stepper-item-spacing-unit-m);text-align:start}:host([layout=horizontal][selected]) .stepper-item-content{grid-area:2/1/2/-1}:host([layout=horizontal][scale=s]) .stepper-item-header{margin-inline-end:0.25rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][scale=l]) .stepper-item-header{margin-inline-end:0.75rem;margin-block-end:var(--calcite-stepper-item-spacing-unit-s)}:host([layout=horizontal][complete]) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][complete]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][complete]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal][error]) .stepper-item-header{border-color:var(--calcite-ui-danger)}:host([layout=horizontal][selected]) .stepper-item-header{border-color:var(--calcite-ui-brand)}:host([layout=horizontal]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:rgba(0, 122, 194, 0.5)}:host([layout=horizontal][error]:hover:not([disabled]):not([selected])) .stepper-item-header,:host([layout=horizontal][error]:focus:not([disabled]):not([selected])) .stepper-item-header{border-color:var(--calcite-ui-danger-hover)}@media (forced-colors: active){:host .container{outline-width:0;outline-offset:0}:host(:focus),:host(:focus-visible){outline-color:canvasText}:host([selected]) .container{border-block-start-color:highlight}:host([selected]) .container .stepper-item-number{color:highlight}:host([selected]) .container .stepper-item-icon{color:highlight}:host([layout=vertical][selected]) .container{border-color:highlight}}";export{b as calcite_stepper,f as calcite_stepper_item}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
6
|
const e={backButton:"back-button",container:"container",header:"header",heading:"heading",summary:"summary",description:"description",headerContent:"header-content",headerActions:"header-actions",headerActionsEnd:"header-actions--end",headerActionsStart:"header-actions--start",contentWrapper:"content-wrapper",contentContainer:"content-container",contentHeight:"content-height",fabContainer:"fab-container",footer:"footer"},t={close:"x",menu:"ellipsis",backLeft:"chevron-left",backRight:"chevron-right"},n={headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerActions:"footer-actions"};export{e as C,t as I,n as S}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
6
|
const a="calcite-mode-auto",t="calcite-mode-dark",e={autoMode:a,darkMode:t,lightMode:"calcite-mode-light",rtl:"calcite--rtl"};export{e as C,a,t as d}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,H as e,g as o}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,H as e,g as o}from"./p-2154b7de.js";import{b as s}from"./p-89b710ae.js";import{u as n}from"./p-bb5a7862.js";import{s as c,a as l,c as r}from"./p-b16095ce.js";import{c as d,d as m}from"./p-9ee2e227.js";import{c as h,s as p,d as f,u}from"./p-a9158071.js";import{S as b}from"./p-5351c56f.js";import"./p-b5c59463.js";import"./p-55b16a54.js";import"./p-26d8628f.js";import"./p-8728d1dd.js";const g=class{constructor(a){t(this,a),this.calciteFlowItemBack=i(this,"calciteFlowItemBack",6),this.calciteFlowItemScroll=i(this,"calciteFlowItemScroll",6),this.calciteFlowItemClose=i(this,"calciteFlowItemClose",6),this.handlePanelScroll=t=>{t.stopPropagation(),this.calciteFlowItemScroll.emit()},this.handlePanelClose=t=>{t.stopPropagation(),this.calciteFlowItemClose.emit()},this.backButtonClick=()=>{this.calciteFlowItemBack.emit()},this.setBackRef=t=>{this.backButtonEl=t},this.setContainerRef=t=>{this.containerEl=t},this.closable=!1,this.closed=!1,this.beforeBack=void 0,this.description=void 0,this.disabled=!1,this.heading=void 0,this.headingLevel=void 0,this.loading=!1,this.menuOpen=!1,this.messageOverrides=void 0,this.messages=void 0,this.showBackButton=!1,this.backButtonEl=void 0,this.defaultMessages=void 0,this.effectiveLocale=""}onMessagesChange(){}connectedCallback(){d(this),h(this)}async componentWillLoad(){await p(this),c(this)}componentDidRender(){n(this)}disconnectedCallback(){m(this),f(this)}componentDidLoad(){l(this)}effectiveLocaleChange(){u(this,this.effectiveLocale)}async setFocus(){await r(this);const{backButtonEl:t,containerEl:i}=this;t?t.setFocus():i?.setFocus()}async scrollContentTo(t){await(this.containerEl?.scrollContentTo(t))}renderBackButton(){const{el:t}=this,i="rtl"===s(t),{showBackButton:e,backButtonClick:o,messages:n}=this,c=n.back;return e?a("calcite-action",{"aria-label":c,class:"back-button",icon:i?"chevron-right":"chevron-left",key:"flow-back-button",onClick:o,scale:"s",slot:"header-actions-start",text:c,ref:this.setBackRef}):null}render(){const{closable:t,closed:i,description:o,disabled:s,heading:n,headingLevel:c,loading:l,menuOpen:r,messages:d,backButtonEl:m}=this,h=d.back;return a(e,null,a("calcite-panel",{closable:t,closed:i,description:o,disabled:s,heading:n,headingLevel:c,loading:l,menuOpen:r,messageOverrides:d,onCalcitePanelClose:this.handlePanelClose,onCalcitePanelScroll:this.handlePanelScroll,ref:this.setContainerRef},this.renderBackButton(),a("slot",{name:"header-actions-start",slot:b.headerActionsStart}),a("slot",{name:"header-actions-end",slot:b.headerActionsEnd}),a("slot",{name:"header-content",slot:b.headerContent}),a("slot",{name:"header-menu-actions",slot:b.headerMenuActions}),a("slot",{name:"fab",slot:b.fab}),a("slot",{name:"footer-actions",slot:b.footerActions}),a("slot",{name:"footer",slot:b.footer}),a("slot",null)),m?a("calcite-tooltip",{label:h,overlayPositioning:"fixed",placement:"top",referenceElement:m},h):null)}static get assetsDirs(){return["assets"]}get el(){return o(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};g.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.back-button{border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);border-inline-end-width:1px}";export{g as calcite_flow_item}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
* v1.2.0
|
|
5
|
+
*/
|
|
6
|
+
import{r as t,c as i,h as a,g as e,F as n}from"./p-2154b7de.js";import{c}from"./p-8728d1dd.js";import{f as o}from"./p-89b710ae.js";import{c as r,d as s,a as l,H as m}from"./p-05215047.js";import{u as d}from"./p-bb5a7862.js";import{c as h,d as p,g as u}from"./p-403627a1.js";import{s as f,a as g,c as b}from"./p-b16095ce.js";import"./p-b5c59463.js";import"./p-55b16a54.js";const v=class{constructor(a){t(this,a),this.calciteInternalOptionChange=i(this,"calciteInternalOptionChange",6),this.mutationObserver=c("mutation",(()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()})),this.disabled=!1,this.label=void 0,this.selected=void 0,this.value=void 0}handlePropChange(t,i,a){"label"!==a&&"value"!==a||this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){const{el:{textContent:t}}=this;this.label&&this.label!==this.internallySetLabel||(this.label=t,this.internallySetLabel=t),this.value&&this.value!==this.internallySetValue||(this.value=t,this.internallySetValue=t)}connectedCallback(){this.ensureTextContentDependentProps(),this.mutationObserver?.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}disconnectedCallback(){this.mutationObserver?.disconnect()}render(){return a("slot",null,this.label)}get el(){return e(this)}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"],selected:["handlePropChange"],value:["handlePropChange"]}}};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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}";const y=class{constructor(a){t(this,a),this.calciteInternalOptionGroupChange=i(this,"calciteInternalOptionGroupChange",6),this.disabled=!1,this.label=void 0}handlePropChange(){this.calciteInternalOptionGroupChange.emit()}render(){return a(n,null,a("div",null,this.label),a("slot",null))}static get watchers(){return{disabled:["handlePropChange"],label:["handlePropChange"]}}};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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}";function w(t){return"CALCITE-OPTION"===t.tagName}const x=class{constructor(a){t(this,a),this.calciteSelectChange=i(this,"calciteSelectChange",6),this.componentToNativeEl=new Map,this.mutationObserver=c("mutation",(()=>this.populateInternalSelect())),this.handleInternalSelectChange=()=>{this.selectFromNativeOption(this.selectEl.selectedOptions[0]),requestAnimationFrame((()=>this.emitChangeEvent()))},this.populateInternalSelect=()=>{const t=Array.from(this.el.children).filter((t=>"CALCITE-OPTION"===t.tagName||"CALCITE-OPTION-GROUP"===t.tagName));this.clearInternalSelect(),t.forEach((t=>this.selectEl?.append(this.toNativeElement(t))))},this.storeSelectRef=t=>{this.selectEl=t,this.populateInternalSelect(),this.selectFromNativeOption(this.selectEl.selectedOptions[0])},this.emitChangeEvent=()=>{this.calciteSelectChange.emit()},this.disabled=!1,this.form=void 0,this.label=void 0,this.name=void 0,this.required=!1,this.scale="m",this.value=null,this.selectedOption=void 0,this.width="auto"}valueHandler(t){this.el.querySelectorAll("calcite-option").forEach((i=>i.selected=i.value===t))}selectedOptionHandler(t){this.value=t?.value}connectedCallback(){const{el:t}=this;this.mutationObserver?.observe(t,{subtree:!0,childList:!0}),h(this),r(this)}disconnectedCallback(){this.mutationObserver?.disconnect(),p(this),s(this)}componentWillLoad(){f(this)}componentDidLoad(){g(this),l(this,this.selectedOption?.value??"")}componentDidRender(){d(this)}async setFocus(){await b(this),o(this.selectEl)}handleOptionOrGroupChange(t){t.stopPropagation();const i=t.target,a=this.componentToNativeEl.get(i);a&&(this.updateNativeElement(i,a),w(i)&&i.selected&&(this.deselectAllExcept(i),this.selectedOption=i))}onLabelClick(){this.setFocus()}updateNativeElement(t,i){if(i.disabled=t.disabled,i.label=t.label,w(t)){const a=i;a.selected=t.selected,a.value=t.value,a.innerText=t.label}}clearInternalSelect(){this.componentToNativeEl.forEach((t=>t.remove())),this.componentToNativeEl.clear()}selectFromNativeOption(t){if(!t)return;let i;this.componentToNativeEl.forEach(((a,e)=>{w(e)&&a===t&&(e.selected=!0,i=e,this.deselectAllExcept(e))})),i&&(this.selectedOption=i)}toNativeElement(t){if(w(t)){const i=document.createElement("option");return this.updateNativeElement(t,i),this.componentToNativeEl.set(t,i),i}if(function(t){return"CALCITE-OPTION-GROUP"===t.tagName}(t)){const i=document.createElement("optgroup");return this.updateNativeElement(t,i),Array.from(t.children).forEach((a=>{const e=this.toNativeElement(a);i.append(e),this.componentToNativeEl.set(t,e)})),this.componentToNativeEl.set(t,i),i}throw new Error("unsupported element child provided")}deselectAllExcept(t){this.el.querySelectorAll("calcite-option").forEach((i=>{i!==t&&(i.selected=!1)}))}renderChevron(){return a("div",{class:"icon-container"},a("calcite-icon",{class:"icon",icon:"chevron-down",scale:"l"===this.scale?"m":"s"}))}render(){return a(n,null,a("select",{"aria-label":u(this),class:"select",disabled:this.disabled,onChange:this.handleInternalSelectChange,ref:this.storeSelectRef},a("slot",null)),this.renderChevron(),a(m,{component:this}))}get el(){return e(this)}static get watchers(){return{value:["valueHandler"],selectedOption:["selectedOptionHandler"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{--calcite-icon-size:1rem;--calcite-spacing-eighth:0.125rem;--calcite-spacing-quarter:0.25rem;--calcite-spacing-half:0.5rem;--calcite-spacing-three-quarters:0.75rem;--calcite-spacing:1rem;--calcite-spacing-plus-quarter:1.25rem;--calcite-spacing-plus-half:1.5rem;--calcite-spacing-double:2rem;--calcite-menu-min-width:10rem;--calcite-header-min-height:3rem;--calcite-footer-min-height:3rem}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;align-items:stretch;inline-size:var(--select-width)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){block-size:1.5rem;--calcite-select-font-size:var(--calcite-font-size--2);--calcite-select-spacing-inline:0.5rem 2rem}:host([scale=s]) .icon-container{padding-inline:0.5rem}:host([scale=m]){block-size:2rem;--calcite-select-font-size:var(--calcite-font-size--1);--calcite-select-spacing-inline:0.75rem 2.5rem}:host([scale=m]) .icon-container{padding-inline:0.75rem}:host([scale=l]){block-size:44px;--calcite-select-font-size:var(--calcite-font-size-0);--calcite-select-spacing-inline:1rem 3rem}:host([scale=l]) .icon-container{padding-inline:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}.select{margin:0px;box-sizing:border-box;inline-size:100%;cursor:pointer;-webkit-appearance:none;appearance:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-radius:0px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);font-family:inherit;color:var(--calcite-ui-text-2);outline-color:transparent;font-size:var(--calcite-select-font-size);padding-inline:var(--calcite-select-spacing-inline);border-inline-end-width:0px}.select:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.select:hover{background-color:var(--calcite-ui-foreground-2)}select:disabled{border-color:var(--calcite-ui-border-input);--tw-bg-opacity:1}.icon-container{pointer-events:none;position:absolute;inset-block:0px;display:flex;align-items:center;border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:transparent;color:var(--calcite-ui-text-2);inset-inline-end:0px;border-inline-width:0px 1px}.select:focus~.icon-container{border-color:transparent}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{v as calcite_option,y as calcite_option_group,x as calcite_select}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
* v1.2.0
|
|
5
|
+
*/
|
|
6
|
+
import{h as i,r as t,c as s,H as a,g as e}from"./p-2154b7de.js";import{c as n,d as o,H as r}from"./p-05215047.js";import{g as c}from"./p-b5c59463.js";import{u as l}from"./p-bb5a7862.js";import{c as h,d}from"./p-403627a1.js";import{s as m,a as p,c as u}from"./p-b16095ce.js";import{c as f,d as v}from"./p-9ee2e227.js";import{u as g,c as b,s as y,d as w}from"./p-a9158071.js";import"./p-89b710ae.js";import"./p-55b16a54.js";import"./p-26d8628f.js";import"./p-8728d1dd.js";const k=({full:t,scale:s,partial:a})=>i("calcite-icon",{class:a?void 0:"icon",icon:t?"star-f":"star",scale:s}),x=class{constructor(i){t(this,i),this.calciteRatingChange=s(this,"calciteRatingChange",6),this.handleRatingPointerOver=()=>{this.isKeyboardInteraction=!1},this.handleRatingPointerOut=()=>{this.isKeyboardInteraction=!0,this.hoverValue=null,this.focusValue=null,this.hasFocus=!1},this.handleRatingFocusIn=()=>{const i=this.inputRefs[this.value>0?this.value-1:0],t=Number(i.value);i.select(),this.focusValue=t,this.hoverValue=t,this.hasFocus=!0},this.handleRatingFocusLeave=()=>{this.focusValue=null,this.hoverValue=null,this.hasFocus=!1},this.handleHostKeyDown=()=>{this.isKeyboardInteraction=!0},this.handleInputKeyDown=i=>{const t=Number(i.currentTarget.value),s=i.key,a=" "==s?void 0:Number(s);if(this.emit=!0,isNaN(a))switch(s){case"Enter":case" ":this.value=this.required||this.value!==t?t:0;break;case"ArrowLeft":this.value=t-1;break;case"ArrowRight":this.value=t+1;break;case"Tab":this.hasFocus&&(this.hasFocus=!1,this.focusValue=null,this.hoverValue=null)}else(!this.required&&a>=0&&a<=this.max||this.required&&a>0&&a<=this.max)&&(this.value=a)},this.handleInputChange=i=>{if(!0===this.isKeyboardInteraction){const t=Number(i.target.value);this.focusValue=t,this.hoverValue=t,this.value=t}},this.handleLabelPointerOver=i=>{const t=Number(i.currentTarget.firstChild.value||0);this.hoverValue=t,this.focusValue=null},this.handleLabelPointerDown=i=>{const t=Number(i.currentTarget.firstChild.value||0);this.focusValue=null,this.hoverValue=null,this.emit=!0,this.value=this.required||this.value!==t?t:0},this.emit=!1,this.guid=`calcite-ratings-${c()}`,this.isKeyboardInteraction=!0,this.max=5,this.average=void 0,this.count=void 0,this.disabled=!1,this.form=void 0,this.messages=void 0,this.messageOverrides=void 0,this.name=void 0,this.readOnly=!1,this.required=!1,this.scale="m",this.showChip=!1,this.value=0,this.effectiveLocale="",this.defaultMessages=void 0,this.hoverValue=void 0,this.focusValue=void 0,this.hasFocus=void 0}onMessagesChange(){}handleValueUpdate(i){this.hoverValue=i,this.focusValue=i,this.emit&&this.calciteRatingChange.emit(),this.emit=!1}effectiveLocaleChange(){g(this,this.effectiveLocale)}connectedCallback(){f(this),b(this),h(this),n(this)}async componentWillLoad(){await y(this),m(this),this.inputRefs=Array(this.max)}componentWillRender(){this.starsMap=Array.from({length:this.max},((i,t)=>{const s=t+1,a=this.average&&this.average+1-s,e=s<=this.hoverValue;return{average:!this.focusValue&&!this.hoverValue&&this.average&&!this.value&&s<=this.average,checked:s===this.value,focused:this.isKeyboardInteraction&&this.hasFocus&&this.focusValue===s,fraction:a,hovered:e,id:`${this.guid}-${s}`,idx:t,partial:!this.focusValue&&!this.hoverValue&&!this.value&&!e&&a>0&&a<1,selected:this.value>=s,value:s}}))}componentDidLoad(){p(this)}disconnectedCallback(){v(this),w(this),d(this),o(this)}componentDidRender(){l(this)}render(){return i(a,{onBlur:this.handleRatingFocusLeave,onFocus:this.handleRatingFocusIn,onKeyDown:this.handleHostKeyDown,onPointerOut:this.handleRatingPointerOut,onPointerOver:this.handleRatingPointerOver},i("span",{class:"wrapper"},i("fieldset",{class:"fieldset",disabled:this.disabled},i("legend",{class:"visually-hidden"},this.messages.rating),this.starsMap.map((({average:t,checked:s,focused:a,fraction:e,hovered:n,id:o,idx:r,partial:c,selected:l,value:h})=>i("label",{class:{star:!0,focused:a,selected:l,hovered:n,average:t,partial:c},htmlFor:o,onPointerDown:this.handleLabelPointerDown,onPointerOver:this.handleLabelPointerOver},i("input",{checked:s,class:"visually-hidden",disabled:this.disabled||this.readOnly,id:o,name:this.guid,onChange:this.handleInputChange,onKeyDown:this.handleInputKeyDown,type:"radio",value:h,ref:i=>(this.inputRefs[r]=i,(1===h||h===this.value)&&(this.inputFocusRef=i))}),i(k,{full:l||t,scale:this.scale}),c&&i("div",{class:"fraction",style:{width:100*e+"%"}},i(k,{full:!0,partial:!0,scale:this.scale})),i("span",{class:"visually-hidden"},this.messages.stars.replace("${num}",`${h}`))))),(this.count||this.average)&&this.showChip?i("calcite-chip",{scale:this.scale,value:this.count?.toString()},!!this.average&&i("span",{class:"number--average"},this.average.toString()),!!this.count&&i("span",{class:"number--count"},"(",this.count?.toString(),")")):null),i(r,{component:this})))}onLabelClick(){this.setFocus()}async setFocus(){await u(this),this.inputFocusRef?.focus()}static get assetsDirs(){return["assets"]}get el(){return e(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],value:["handleValueUpdate"],effectiveLocale:["effectiveLocaleChange"]}}};x.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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:flex;align-items:center;inline-size:-moz-fit-content;inline-size:fit-content}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){block-size:1.5rem;--calcite-rating-spacing-unit:0.25rem}:host([scale=m]){block-size:2rem;--calcite-rating-spacing-unit:0.5rem}:host([scale=l]){block-size:2.75rem;--calcite-rating-spacing-unit:0.75rem}:host([read-only]){pointer-events:none}.fieldset{margin:0;display:flex;border-width:0;padding:0;align-items:center;gap:var(--calcite-rating-spacing-unit)}.wrapper{display:inline-block}.star{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;position:relative;display:flex;flex-direction:column;cursor:pointer;color:var(--calcite-ui-border-input)}.focused{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.average,.fraction{color:var(--calcite-ui-warning)}.hovered,.selected{color:var(--calcite-ui-brand)}.fraction{transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;position:absolute;pointer-events:none;inset-block-start:0;overflow:hidden;inset-inline-start:0}calcite-chip{pointer-events:none;cursor:default}.number--average{font-weight:bold}.number--count{color:var(--calcite-ui-text-2);font-style:italic}.number--count:not(:first-child){margin-inline-start:var(--calcite-rating-spacing-unit)}.visually-hidden{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{x as calcite_rating}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,c as t,h as e,H as a,g as n}from"./p-8a043b9f.js";import{c as o,d as s}from"./p-3c74c413.js";import{g as r,s as l,j as c,k as d}from"./p-f6270352.js";import{c as m,d as h,a as p,u as b}from"./p-6d3415c8.js";import{s as u,a as f,c as g}from"./p-48fb9a71.js";import{c as x}from"./p-24f78b05.js";import{o as v}from"./p-46d33089.js";import{c as k,d as w}from"./p-ba611b6f.js";import{s as y,c as z,d as C,u as j}from"./p-6e447493.js";import"./p-a2ccabc4.js";import"./p-8dd480dc.js";import"./p-9981817e.js";const $="modal",D="header",M="overflow-hidden",_="container",O="modal--opening-idle",B="modal--opening-active",L="modal--closing-idle",F="modal--closing-active",S="content",T="back",E="secondary",H="primary",q=class{constructor(e){i(this,e),this.calciteModalBeforeClose=t(this,"calciteModalBeforeClose",6),this.calciteModalClose=t(this,"calciteModalClose",6),this.calciteModalBeforeOpen=t(this,"calciteModalBeforeOpen",6),this.calciteModalOpen=t(this,"calciteModalOpen",6),this.mutationObserver=x("mutation",(()=>{this.updateFooterVisibility()})),this.cssVarObserver=x("mutation",(()=>{this.updateSizeCssVars()})),this.openTransitionProp="opacity",this.setTransitionEl=i=>{this.transitionEl=i,this.focusTrapEl=i,m(this)},this.openEnd=()=>{this.setFocus(),this.el.removeEventListener("calciteModalOpen",this.openEnd)},this.handleOutsideClose=()=>{this.outsideCloseDisabled||this.close()},this.close=()=>this.beforeClose(this.el).then((()=>{this.open=!1,this.isOpen=!1,this.removeOverflowHiddenClass()})),this.updateFooterVisibility=()=>{this.hasFooter=!!r(this.el,[T,H,E])},this.updateSizeCssVars=()=>{this.cssWidth=getComputedStyle(this.el).getPropertyValue("--calcite-modal-width"),this.cssHeight=getComputedStyle(this.el).getPropertyValue("--calcite-modal-height")},this.contentTopSlotChangeHandler=i=>{this.hasContentTop=l(i)},this.contentBottomSlotChangeHandler=i=>{this.hasContentBottom=l(i)},this.open=!1,this.beforeClose=()=>Promise.resolve(),this.closeButtonDisabled=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.docked=void 0,this.escapeDisabled=!1,this.scale="m",this.width="m",this.fullscreen=void 0,this.kind=void 0,this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.cssWidth=void 0,this.cssHeight=void 0,this.hasFooter=!0,this.hasContentTop=!1,this.hasContentBottom=!1,this.isOpen=!1,this.effectiveLocale=void 0,this.defaultMessages=void 0}handlefocusTrapDisabled(i){this.open&&(i?h(this):p(this))}onMessagesChange(){}async componentWillLoad(){await y(this),u(this),this.open&&(v(this),requestAnimationFrame((()=>this.openModal())))}componentDidLoad(){f(this)}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.cssVarObserver?.observe(this.el,{attributeFilter:["style"]}),this.updateSizeCssVars(),this.updateFooterVisibility(),o(this),k(this),z(this)}disconnectedCallback(){this.removeOverflowHiddenClass(),this.mutationObserver?.disconnect(),this.cssVarObserver?.disconnect(),s(this),h(this),w(this),C(this),this.slottedInShell=!1}render(){return e(a,{"aria-describedby":this.contentId,"aria-labelledby":this.titleId,"aria-modal":"true",role:"dialog"},e("div",{class:{[_]:!0,"container--open":this.isOpen,"slotted-in-shell":this.slottedInShell}},e("calcite-scrim",{class:"scrim",onClick:this.handleOutsideClose}),this.renderStyle(),e("div",{class:{[$]:!0},ref:this.setTransitionEl},e("div",{class:D},this.renderCloseButton(),e("header",{class:"title"},e("slot",{name:D}))),this.renderContentTop(),e("div",{class:{content:!0,"content--no-footer":!this.hasFooter},ref:i=>this.modalContent=i},e("slot",{name:S})),this.renderContentBottom(),this.renderFooter())))}renderFooter(){return this.hasFooter?e("div",{class:"footer",key:"footer"},e("span",{class:"back"},e("slot",{name:T})),e("span",{class:"secondary"},e("slot",{name:E})),e("span",{class:"primary"},e("slot",{name:H}))):null}renderContentTop(){return e("div",{class:"content-top",hidden:!this.hasContentTop},e("slot",{name:"content-top",onSlotchange:this.contentTopSlotChangeHandler}))}renderContentBottom(){return e("div",{class:"content-bottom",hidden:!this.hasContentBottom},e("slot",{name:"content-bottom",onSlotchange:this.contentBottomSlotChangeHandler}))}renderCloseButton(){return this.closeButtonDisabled?null:e("button",{"aria-label":this.messages.close,class:"close",key:"button",onClick:this.close,title:this.messages.close,ref:i=>this.closeButtonEl=i},e("calcite-icon",{icon:"x",scale:"s"===this.scale?"s":"m"===this.scale?"m":"l"===this.scale?"l":null}))}renderStyle(){if(!this.fullscreen&&(this.cssWidth||this.cssHeight))return e("style",null,`.${_} {\n ${this.docked&&this.cssWidth?"align-items: center !important;":""}\n }\n .${$} {\n block-size: ${this.cssHeight?this.cssHeight:"auto"} !important;\n ${this.cssWidth?`inline-size: ${this.cssWidth} !important;`:""}\n ${this.cssWidth?`max-inline-size: ${this.cssWidth} !important;`:""}\n ${this.docked?"border-radius: var(--calcite-border-radius) !important;":""}\n }\n @media screen and (max-width: ${this.cssWidth}) {\n .${_} {\n ${this.docked?"align-items: flex-end !important;":""}\n }\n .${$} {\n max-block-size: 100% !important;\n inline-size: 100% !important;\n max-inline-size: 100% !important;\n min-inline-size: 100% !important;\n margin: 0 !important;\n ${this.docked?"":"block-size: 100% !important;"}\n ${this.docked?"":"border-radius: 0 !important;"}\n ${this.docked?"border-radius: var(--calcite-border-radius) var(--calcite-border-radius) 0 0 !important;":""}\n }\n }\n `)}effectiveLocaleChange(){j(this,this.effectiveLocale)}handleEscape(i){!this.open||this.escapeDisabled||"Escape"!==i.key||i.defaultPrevented||(this.close(),i.preventDefault())}async setFocus(){await g(this),c(this.focusTrapEl)}async updateFocusTrapElements(){b(this)}async scrollContent(i=0,t=0){this.modalContent&&(this.modalContent.scrollTo?this.modalContent.scrollTo({top:i,left:t,behavior:"smooth"}):(this.modalContent.scrollTop=i,this.modalContent.scrollLeft=t))}onBeforeOpen(){this.transitionEl.classList.add(B),this.calciteModalBeforeOpen.emit()}onOpen(){this.transitionEl.classList.remove(O,B),this.calciteModalOpen.emit(),p(this)}onBeforeClose(){this.transitionEl.classList.add(F),this.calciteModalBeforeClose.emit()}onClose(){this.transitionEl.classList.remove(L,F),this.calciteModalClose.emit(),h(this)}async toggleModal(i){v(this),i?(this.transitionEl?.classList.add(O),this.openModal()):(this.transitionEl?.classList.add(L),this.close())}openModal(){this.el.addEventListener("calciteModalOpen",this.openEnd),this.open=!0,this.isOpen=!0;const i=r(this.el,"header"),t=r(this.el,S);this.titleId=d(i),this.contentId=d(t),this.slottedInShell||document.documentElement.classList.add(M)}removeOverflowHiddenClass(){document.documentElement.classList.remove(M)}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{focusTrapDisabled:["handlefocusTrapDisabled"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"],open:["toggleModal"]}}};q.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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-scrim-background-internal:rgba(0, 0, 0, 0.85)}.content-top[hidden],.content-bottom[hidden]{display:none}.container{position:fixed;inset:0px;z-index:700;display:flex;align-items:center;justify-content:center;overflow-y:hidden;color:var(--calcite-ui-text-2);opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([scale=s]){--calcite-modal-padding-internal:0.75rem;--calcite-modal-padding-large-internal:1rem;--calcite-modal-title-text-internal:var(--calcite-font-size-1);--calcite-modal-content-text-internal:var(--calcite-font-size--1)}:host([scale=m]){--calcite-modal-padding-internal:1rem;--calcite-modal-padding-large-internal:1.25rem;--calcite-modal-title-text-internal:var(--calcite-font-size-2);--calcite-modal-content-text-internal:var(--calcite-font-size-0)}:host([scale=l]){--calcite-modal-padding-internal:1.25rem;--calcite-modal-padding-large-internal:1.5rem;--calcite-modal-title-text-internal:var(--calcite-font-size-3);--calcite-modal-content-text-internal:var(--calcite-font-size-1)}.scrim{--calcite-scrim-background:var(--calcite-modal-scrim-background, var(--calcite-modal-scrim-background-internal));position:fixed;inset:0px;display:flex;overflow-y:hidden}.modal{pointer-events:none;z-index:800;float:none;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);opacity:0;--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-hidden-position:translate3d(0, 20px, 0);--calcite-modal-shown-position:translate3d(0, 0, 0)}.modal--opening-idle{transform:var(--calcite-modal-hidden-position)}.modal--opening-active{transform:var(--calcite-modal-shown-position)}.modal--closing-idle{transform:var(--calcite-modal-shown-position)}.modal--closing-active{transform:var(--calcite-modal-hidden-position)}:host([open]){opacity:1;visibility:visible !important;transition-delay:0ms}.container--open{opacity:1;visibility:visible !important;transition-delay:0ms}.container--open .modal{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}.header{z-index:400;display:flex;min-inline-size:0px;max-inline-size:100%;border-start-start-radius:0.25rem;border-start-end-radius:0.25rem;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto}.close{order:2;margin:0px;cursor:pointer;-webkit-appearance:none;appearance:none;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-internal);flex:0 0 auto}.close calcite-icon{pointer-events:none;vertical-align:-2px}.close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.close:hover,.close:focus,.close:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.title{order:1;display:flex;min-inline-size:0px;align-items:center;flex:1 1 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}slot[name=header]::slotted(*),*::slotted([slot=header]){margin:0px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1);font-size:var(--calcite-modal-title-text-internal)}.content{position:relative;box-sizing:border-box;display:block;block-size:100%;overflow:auto;padding:0px;background-color:var(--calcite-modal-content-background, var(--calcite-ui-foreground-1));max-block-size:100%;padding:var(--calcite-modal-content-padding, var(--calcite-modal-padding-internal))}.content-top,.content-bottom{z-index:400;display:flex;border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding:var(--calcite-modal-padding-internal)}.content-top{min-inline-size:0px;max-inline-size:100%;border-block-end-width:1px}.content-bottom{margin-block-start:auto;box-sizing:border-box;inline-size:100%;justify-content:space-between;border-block-start-width:1px}.content-top:not(.header~.content-top){border-start-start-radius:0.25rem;border-start-end-radius:0.25rem}.content-bottom:not(.content-bottom~.footer),.content--no-footer{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}slot[name=content]::slotted(*),*::slotted([slot=content]){font-size:var(--calcite-modal-context-text-internal)}.footer{z-index:400;margin-block-start:auto;box-sizing:border-box;display:flex;inline-size:100%;justify-content:space-between;border-end-end-radius:0.25rem;border-end-start-radius:0.25rem;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}.footer--hide-back .back,.footer--hide-secondary .secondary{display:none}.back{display:block;margin-inline-end:auto}.secondary{margin-inline:0.25rem;display:block}slot[name=primary]{display:block}:host([width=small]) .modal{inline-size:auto}:host([width=s]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 32rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 35rem){:host([width=s]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=s]) .content{flex:1 1 auto;max-block-size:unset}:host([width=s][docked]) .container{align-items:flex-end}}:host([width=m]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 48rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 51rem){:host([width=m]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=m]) .content{flex:1 1 auto;max-block-size:unset}:host([width=m][docked]) .container{align-items:flex-end}}:host([width=l]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 94rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 97rem){:host([width=l]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=l]) .content{flex:1 1 auto;max-block-size:unset}:host([width=l][docked]) .container{align-items:flex-end}}:host([fullscreen]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px;--calcite-modal-hidden-position:translate3D(0, 20px, 0) scale(0.95);--calcite-modal-shown-position:translate3D(0, 0, 0) scale(1)}:host([fullscreen]) .content{max-block-size:100%;flex:1 1 auto}:host([open][fullscreen]) .header,:host([open][fullscreen]) .footer,:host([open][fullscreen]) .content-top,:host([open][fullscreen]) .content-bottom{border-radius:0}:host([docked]) .modal{block-size:var(--calcite-modal-height, auto)}:host([docked]) .content{block-size:auto;flex:1 1 auto}:host([kind=brand]) .modal{border-color:var(--calcite-ui-brand)}:host([kind=danger]) .modal{border-color:var(--calcite-ui-danger)}:host([kind=info]) .modal{border-color:var(--calcite-ui-info)}:host([kind=success]) .modal{border-color:var(--calcite-ui-success)}:host([kind=warning]) .modal{border-color:var(--calcite-ui-warning)}:host([kind=brand]) .modal,:host([kind=danger]) .modal,:host([kind=info]) .modal,:host([kind=success]) .modal,:host([kind=warning]) .modal{border-width:0px;border-block-start-width:4px;border-style:solid}:host([kind=brand]) .header,:host([kind=brand]) .content-top,:host([kind=danger]) .header,:host([kind=danger]) .content-top,:host([kind=info]) .header,:host([kind=info]) .content-top,:host([kind=success]) .header,:host([kind=success]) .content-top,:host([kind=warning]) .header,:host([kind=warning]) .content-top{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){* slot[name=header]::slotted(content-top),* content-top::slotted([slot=header]){font-size:var(--calcite-font-size-1)}.footer,.content-bottom{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){.footer,.content-bottom{flex-direction:column}.back,.secondary{margin:0px;margin-block-end:0.25rem}}.container.slotted-in-shell{position:absolute;pointer-events:auto}.container.slotted-in-shell calcite-scrim{position:absolute}";export{q as calcite_modal}
|
|
6
|
+
import{r as i,c as t,h as e,H as a,g as n}from"./p-2154b7de.js";import{c as o,d as s}from"./p-016e277d.js";import{g as r,s as l,j as c,k as d}from"./p-89b710ae.js";import{c as m,d as h,a as p,u as b}from"./p-b80446b3.js";import{s as u,a as g,c as f}from"./p-b16095ce.js";import{c as x}from"./p-8728d1dd.js";import{o as v}from"./p-19422786.js";import{c as k,d as w}from"./p-9ee2e227.js";import{s as y,c as z,d as C,u as j}from"./p-a9158071.js";import"./p-b5c59463.js";import"./p-55b16a54.js";import"./p-26d8628f.js";const $="modal",D="header",M="overflow-hidden",_="container",O="modal--opening-idle",B="modal--opening-active",L="modal--closing-idle",F="modal--closing-active",S="content",T="back",E="secondary",H="primary",q=class{constructor(e){i(this,e),this.calciteModalBeforeClose=t(this,"calciteModalBeforeClose",6),this.calciteModalClose=t(this,"calciteModalClose",6),this.calciteModalBeforeOpen=t(this,"calciteModalBeforeOpen",6),this.calciteModalOpen=t(this,"calciteModalOpen",6),this.mutationObserver=x("mutation",(()=>{this.updateFooterVisibility()})),this.cssVarObserver=x("mutation",(()=>{this.updateSizeCssVars()})),this.openTransitionProp="opacity",this.setTransitionEl=i=>{this.transitionEl=i,this.focusTrapEl=i,m(this)},this.openEnd=()=>{this.setFocus(),this.el.removeEventListener("calciteModalOpen",this.openEnd)},this.handleOutsideClose=()=>{this.outsideCloseDisabled||this.close()},this.close=()=>this.beforeClose(this.el).then((()=>{this.open=!1,this.isOpen=!1,this.removeOverflowHiddenClass()})),this.updateFooterVisibility=()=>{this.hasFooter=!!r(this.el,[T,H,E])},this.updateSizeCssVars=()=>{this.cssWidth=getComputedStyle(this.el).getPropertyValue("--calcite-modal-width"),this.cssHeight=getComputedStyle(this.el).getPropertyValue("--calcite-modal-height")},this.contentTopSlotChangeHandler=i=>{this.hasContentTop=l(i)},this.contentBottomSlotChangeHandler=i=>{this.hasContentBottom=l(i)},this.open=!1,this.beforeClose=()=>Promise.resolve(),this.closeButtonDisabled=!1,this.focusTrapDisabled=!1,this.outsideCloseDisabled=!1,this.docked=void 0,this.escapeDisabled=!1,this.scale="m",this.width="m",this.fullscreen=void 0,this.kind=void 0,this.messages=void 0,this.messageOverrides=void 0,this.slottedInShell=void 0,this.cssWidth=void 0,this.cssHeight=void 0,this.hasFooter=!0,this.hasContentTop=!1,this.hasContentBottom=!1,this.isOpen=!1,this.effectiveLocale=void 0,this.defaultMessages=void 0}handlefocusTrapDisabled(i){this.open&&(i?h(this):p(this))}onMessagesChange(){}async componentWillLoad(){await y(this),u(this),this.open&&(v(this),requestAnimationFrame((()=>this.openModal())))}componentDidLoad(){g(this)}connectedCallback(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.cssVarObserver?.observe(this.el,{attributeFilter:["style"]}),this.updateSizeCssVars(),this.updateFooterVisibility(),o(this),k(this),z(this)}disconnectedCallback(){this.removeOverflowHiddenClass(),this.mutationObserver?.disconnect(),this.cssVarObserver?.disconnect(),s(this),h(this),w(this),C(this),this.slottedInShell=!1}render(){return e(a,{"aria-describedby":this.contentId,"aria-labelledby":this.titleId,"aria-modal":"true",role:"dialog"},e("div",{class:{[_]:!0,"container--open":this.isOpen,"slotted-in-shell":this.slottedInShell}},e("calcite-scrim",{class:"scrim",onClick:this.handleOutsideClose}),this.renderStyle(),e("div",{class:{[$]:!0},ref:this.setTransitionEl},e("div",{class:D},this.renderCloseButton(),e("header",{class:"title"},e("slot",{name:D}))),this.renderContentTop(),e("div",{class:{content:!0,"content--no-footer":!this.hasFooter},ref:i=>this.modalContent=i},e("slot",{name:S})),this.renderContentBottom(),this.renderFooter())))}renderFooter(){return this.hasFooter?e("div",{class:"footer",key:"footer"},e("span",{class:"back"},e("slot",{name:T})),e("span",{class:"secondary"},e("slot",{name:E})),e("span",{class:"primary"},e("slot",{name:H}))):null}renderContentTop(){return e("div",{class:"content-top",hidden:!this.hasContentTop},e("slot",{name:"content-top",onSlotchange:this.contentTopSlotChangeHandler}))}renderContentBottom(){return e("div",{class:"content-bottom",hidden:!this.hasContentBottom},e("slot",{name:"content-bottom",onSlotchange:this.contentBottomSlotChangeHandler}))}renderCloseButton(){return this.closeButtonDisabled?null:e("button",{"aria-label":this.messages.close,class:"close",key:"button",onClick:this.close,title:this.messages.close,ref:i=>this.closeButtonEl=i},e("calcite-icon",{icon:"x",scale:"s"===this.scale?"s":"m"===this.scale?"m":"l"===this.scale?"l":null}))}renderStyle(){if(!this.fullscreen&&(this.cssWidth||this.cssHeight))return e("style",null,`.${_} {\n ${this.docked&&this.cssWidth?"align-items: center !important;":""}\n }\n .${$} {\n block-size: ${this.cssHeight?this.cssHeight:"auto"} !important;\n ${this.cssWidth?`inline-size: ${this.cssWidth} !important;`:""}\n ${this.cssWidth?`max-inline-size: ${this.cssWidth} !important;`:""}\n ${this.docked?"border-radius: var(--calcite-border-radius) !important;":""}\n }\n @media screen and (max-width: ${this.cssWidth}) {\n .${_} {\n ${this.docked?"align-items: flex-end !important;":""}\n }\n .${$} {\n max-block-size: 100% !important;\n inline-size: 100% !important;\n max-inline-size: 100% !important;\n min-inline-size: 100% !important;\n margin: 0 !important;\n ${this.docked?"":"block-size: 100% !important;"}\n ${this.docked?"":"border-radius: 0 !important;"}\n ${this.docked?"border-radius: var(--calcite-border-radius) var(--calcite-border-radius) 0 0 !important;":""}\n }\n }\n `)}effectiveLocaleChange(){j(this,this.effectiveLocale)}handleEscape(i){!this.open||this.escapeDisabled||"Escape"!==i.key||i.defaultPrevented||(this.close(),i.preventDefault())}async setFocus(){await f(this),c(this.focusTrapEl)}async updateFocusTrapElements(){b(this)}async scrollContent(i=0,t=0){this.modalContent&&(this.modalContent.scrollTo?this.modalContent.scrollTo({top:i,left:t,behavior:"smooth"}):(this.modalContent.scrollTop=i,this.modalContent.scrollLeft=t))}onBeforeOpen(){this.transitionEl.classList.add(B),this.calciteModalBeforeOpen.emit()}onOpen(){this.transitionEl.classList.remove(O,B),this.calciteModalOpen.emit(),p(this)}onBeforeClose(){this.transitionEl.classList.add(F),this.calciteModalBeforeClose.emit()}onClose(){this.transitionEl.classList.remove(L,F),this.calciteModalClose.emit(),h(this)}async toggleModal(i){v(this),i?(this.transitionEl?.classList.add(O),this.openModal()):(this.transitionEl?.classList.add(L),this.close())}openModal(){this.el.addEventListener("calciteModalOpen",this.openEnd),this.open=!0,this.isOpen=!0;const i=r(this.el,"header"),t=r(this.el,S);this.titleId=d(i),this.contentId=d(t),this.slottedInShell||document.documentElement.classList.add(M)}removeOverflowHiddenClass(){document.documentElement.classList.remove(M)}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{focusTrapDisabled:["handlefocusTrapDisabled"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"],open:["toggleModal"]}}};q.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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-scrim-background-internal:rgba(0, 0, 0, 0.85)}.content-top[hidden],.content-bottom[hidden]{display:none}.container{position:fixed;inset:0px;z-index:700;display:flex;align-items:center;justify-content:center;overflow-y:hidden;color:var(--calcite-ui-text-2);opacity:0;visibility:hidden !important;transition:visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88)}:host([scale=s]){--calcite-modal-padding-internal:0.75rem;--calcite-modal-padding-large-internal:1rem;--calcite-modal-title-text-internal:var(--calcite-font-size-1);--calcite-modal-content-text-internal:var(--calcite-font-size--1)}:host([scale=m]){--calcite-modal-padding-internal:1rem;--calcite-modal-padding-large-internal:1.25rem;--calcite-modal-title-text-internal:var(--calcite-font-size-2);--calcite-modal-content-text-internal:var(--calcite-font-size-0)}:host([scale=l]){--calcite-modal-padding-internal:1.25rem;--calcite-modal-padding-large-internal:1.5rem;--calcite-modal-title-text-internal:var(--calcite-font-size-3);--calcite-modal-content-text-internal:var(--calcite-font-size-1)}.scrim{--calcite-scrim-background:var(--calcite-modal-scrim-background, var(--calcite-modal-scrim-background-internal));position:fixed;inset:0px;display:flex;overflow-y:hidden}.modal{pointer-events:none;z-index:800;float:none;margin:1.5rem;box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;overflow:hidden;border-radius:0.25rem;background-color:var(--calcite-ui-foreground-1);opacity:0;--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);-webkit-overflow-scrolling:touch;visibility:hidden;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear var(--calcite-internal-animation-timing-slow), opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);--calcite-modal-hidden-position:translate3d(0, 20px, 0);--calcite-modal-shown-position:translate3d(0, 0, 0)}.modal--opening-idle{transform:var(--calcite-modal-hidden-position)}.modal--opening-active{transform:var(--calcite-modal-shown-position)}.modal--closing-idle{transform:var(--calcite-modal-shown-position)}.modal--closing-active{transform:var(--calcite-modal-hidden-position)}:host([open]){opacity:1;visibility:visible !important;transition-delay:0ms}.container--open{opacity:1;visibility:visible !important;transition-delay:0ms}.container--open .modal{pointer-events:auto;visibility:visible;opacity:1;transition:transform var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), visibility 0ms linear, opacity var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-inline-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88), max-block-size var(--calcite-internal-animation-timing-slow) cubic-bezier(0.215, 0.44, 0.42, 0.88);transition-delay:0ms}.header{z-index:400;display:flex;min-inline-size:0px;max-inline-size:100%;border-start-start-radius:0.25rem;border-start-end-radius:0.25rem;border-width:0px;border-block-end-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto}.close{order:2;margin:0px;cursor:pointer;-webkit-appearance:none;appearance:none;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-internal);flex:0 0 auto}.close calcite-icon{pointer-events:none;vertical-align:-2px}.close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.close:hover,.close:focus,.close:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.title{order:1;display:flex;min-inline-size:0px;align-items:center;flex:1 1 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}slot[name=header]::slotted(*),*::slotted([slot=header]){margin:0px;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1);font-size:var(--calcite-modal-title-text-internal)}.content{position:relative;box-sizing:border-box;display:block;block-size:100%;overflow:auto;padding:0px;background-color:var(--calcite-modal-content-background, var(--calcite-ui-foreground-1));max-block-size:100%;padding:var(--calcite-modal-content-padding, var(--calcite-modal-padding-internal))}.content-top,.content-bottom{z-index:400;display:flex;border-width:0px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding:var(--calcite-modal-padding-internal)}.content-top{min-inline-size:0px;max-inline-size:100%;border-block-end-width:1px}.content-bottom{margin-block-start:auto;box-sizing:border-box;inline-size:100%;justify-content:space-between;border-block-start-width:1px}.content-top:not(.header~.content-top){border-start-start-radius:0.25rem;border-start-end-radius:0.25rem}.content-bottom:not(.content-bottom~.footer),.content--no-footer{border-end-end-radius:0.25rem;border-end-start-radius:0.25rem}slot[name=content]::slotted(*),*::slotted([slot=content]){font-size:var(--calcite-modal-context-text-internal)}.footer{z-index:400;margin-block-start:auto;box-sizing:border-box;display:flex;inline-size:100%;justify-content:space-between;border-end-end-radius:0.25rem;border-end-start-radius:0.25rem;border-width:0px;border-block-start-width:1px;border-style:solid;border-color:var(--calcite-ui-border-3);background-color:var(--calcite-ui-foreground-1);flex:0 0 auto;padding-block:var(--calcite-modal-padding-internal);padding-inline:var(--calcite-modal-padding-large-internal)}.footer--hide-back .back,.footer--hide-secondary .secondary{display:none}.back{display:block;margin-inline-end:auto}.secondary{margin-inline:0.25rem;display:block}slot[name=primary]{display:block}:host([width=small]) .modal{inline-size:auto}:host([width=s]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 32rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 35rem){:host([width=s]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=s]) .content{flex:1 1 auto;max-block-size:unset}:host([width=s][docked]) .container{align-items:flex-end}}:host([width=m]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 48rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 51rem){:host([width=m]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=m]) .content{flex:1 1 auto;max-block-size:unset}:host([width=m][docked]) .container{align-items:flex-end}}:host([width=l]) .modal{max-block-size:100%;max-inline-size:100%;inline-size:var(--calcite-modal-width, 94rem);block-size:var(--calcite-modal-height, auto)}@media screen and (max-width: 97rem){:host([width=l]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%}:host([width=l]) .content{flex:1 1 auto;max-block-size:unset}:host([width=l][docked]) .container{align-items:flex-end}}:host([fullscreen]) .modal{margin:0px;block-size:100%;max-block-size:100%;inline-size:100%;max-inline-size:100%;border-radius:0px;--calcite-modal-hidden-position:translate3D(0, 20px, 0) scale(0.95);--calcite-modal-shown-position:translate3D(0, 0, 0) scale(1)}:host([fullscreen]) .content{max-block-size:100%;flex:1 1 auto}:host([open][fullscreen]) .header,:host([open][fullscreen]) .footer,:host([open][fullscreen]) .content-top,:host([open][fullscreen]) .content-bottom{border-radius:0}:host([docked]) .modal{block-size:var(--calcite-modal-height, auto)}:host([docked]) .content{block-size:auto;flex:1 1 auto}:host([kind=brand]) .modal{border-color:var(--calcite-ui-brand)}:host([kind=danger]) .modal{border-color:var(--calcite-ui-danger)}:host([kind=info]) .modal{border-color:var(--calcite-ui-info)}:host([kind=success]) .modal{border-color:var(--calcite-ui-success)}:host([kind=warning]) .modal{border-color:var(--calcite-ui-warning)}:host([kind=brand]) .modal,:host([kind=danger]) .modal,:host([kind=info]) .modal,:host([kind=success]) .modal,:host([kind=warning]) .modal{border-width:0px;border-block-start-width:4px;border-style:solid}:host([kind=brand]) .header,:host([kind=brand]) .content-top,:host([kind=danger]) .header,:host([kind=danger]) .content-top,:host([kind=info]) .header,:host([kind=info]) .content-top,:host([kind=success]) .header,:host([kind=success]) .content-top,:host([kind=warning]) .header,:host([kind=warning]) .content-top{border-radius:0.25rem;border-end-end-radius:0px;border-end-start-radius:0px}@media screen and (max-width: 860px){* slot[name=header]::slotted(content-top),* content-top::slotted([slot=header]){font-size:var(--calcite-font-size-1)}.footer,.content-bottom{position:sticky;inset-block-end:0px}}@media screen and (max-width: 480px){.footer,.content-bottom{flex-direction:column}.back,.secondary{margin:0px;margin-block-end:0.25rem}}.container.slotted-in-shell{position:absolute;pointer-events:auto}.container.slotted-in-shell calcite-scrim{position:absolute}";export{q as calcite_modal}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{c as t,b as n}from"./p-f6270352.js";import{d as e}from"./p-488815fe.js";function o(t){return t.split("-")[1]}function r(t){return"y"===t?"height":"width"}function i(t){return t.split("-")[0]}function a(t){return["top","bottom"].includes(i(t))?"x":"y"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=a(n),d=r(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(i(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(o(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:f}):v);return{top:(h.top-A.top+g.top)/w.y,bottom:(A.bottom-h.bottom+g.bottom)/w.y,left:(h.left-A.left+g.left)/w.x,right:(A.right-h.right+g.right)/w.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p=["top","right","bottom","left"],y=p.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),g={left:"right",right:"left",bottom:"top",top:"bottom"};function x(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function h(t,n,e){void 0===e&&(e=!1);const i=o(t),l=a(t),s=r(l);let c="x"===l?i===(e?"end":"start")?"right":"left":"start"===i?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=x(c)),{main:c,cross:x(c)}}const v={start:"end",end:"start"};function b(t){return t.replace(/start|end/g,(t=>v[t]))}const w=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:a,rects:l,initialPlacement:s,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=t,A=i(r),P=i(s)===s,k=await(null==c.isRTL?void 0:c.isRTL(u.floating)),D=p||(P||!v?[x(s)]:function(t){const n=x(t);return[b(t),n,b(n)]}(s));p||"none"===g||D.push(...function(t,n,e,r){const a=o(t);let l=function(t,n,e){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?r:o:n?o:r;case"left":case"right":return n?i:a;default:return[]}}(i(t),"start"===e,r);return a&&(l=l.map((t=>t+"-"+a)),n&&(l=l.concat(l.map(b)))),l}(s,v,g,k));const R=[s,...D],F=await f(n,w),M=[];let E=(null==(e=a.flip)?void 0:e.overflows)||[];if(d&&M.push(F[A]),m){const{main:t,cross:n}=h(r,l,k);M.push(F[t],F[n])}if(E=[...E,{placement:r,overflows:M}],!M.every((t=>t<=0))){var S,$;const t=((null==(S=a.flip)?void 0:S.index)||0)+1,n=R[t];if(n)return{data:{index:t,overflows:E},reset:{placement:n}};let e=null==($=E.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:$.placement;if(!e)switch(y){case"bestFit":{var C;const t=null==(C=E.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:C[0];t&&(e=t);break}case"initialPlacement":e=s}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 p.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function D(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function R(t){return D(t).getComputedStyle(t)}const F=Math.min,M=Math.max,E=Math.round;function S(t){const n=R(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=E(e)!==r||E(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function $(t){return B(t)?(t.nodeName||"").toLowerCase():""}let C;function O(){if(C)return C;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(C=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),C):navigator.userAgent}function T(t){return t instanceof D(t).HTMLElement}function j(t){return t instanceof D(t).Element}function B(t){return t instanceof D(t).Node}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof D(t).ShadowRoot||t instanceof ShadowRoot)}function L(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=R(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function H(t){return["table","td","th"].includes($(t))}function N(t){const n=/firefox/i.test(O()),e=R(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 I(){return/^((?!chrome|android).)*safari/i.test(O())}function W(t){return["html","body","#document"].includes($(t))}function q(t){return j(t)?t:t.contextElement}const G={x:1,y:1};function U(t){const n=q(t);if(!T(n))return G;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=S(n);let a=(i?E(e.width):e.width)/o,l=(i?E(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function V(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=G;n&&(o?j(o)&&(s=U(o)):s=U(t));const c=l?D(l):window,f=I()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=D(l),n=o&&j(o)?D(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=U(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=D(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function X(t){return((B(t)?t.ownerDocument:t.document)||window.document).documentElement}function Y(t){return j(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function _(t){return V(X(t)).left+Y(t).scrollLeft}function J(t){if("html"===$(t))return t;const n=t.assignedSlot||t.parentNode||z(t)&&t.host||X(t);return z(n)?n.host:n}function K(t){const n=J(t);return W(n)?n.ownerDocument.body:T(n)&&L(n)?n:K(n)}function Q(t,n){var e;void 0===n&&(n=[]);const o=K(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=D(o);return r?n.concat(i,i.visualViewport||[],L(o)?o:[]):n.concat(o,Q(o))}function Z(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=D(t),o=X(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=I();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e);else if("document"===n)o=function(t){const n=X(t),e=Y(t),o=t.ownerDocument.body,r=M(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=M(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-e.scrollLeft+_(t);const l=-e.scrollTop;return"rtl"===R(o).direction&&(a+=M(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(X(t));else if(j(n))o=function(t,n){const e=V(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=T(t)?U(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e={...n};if(I()){var r,i;const n=D(t);e.x-=(null==(r=n.visualViewport)?void 0:r.offsetLeft)||0,e.y-=(null==(i=n.visualViewport)?void 0:i.offsetTop)||0}o=e}return c(o)}function tt(t,n){return T(t)&&"fixed"!==R(t).position?n?n(t):t.offsetParent:null}function nt(t,n){const e=D(t);let o=tt(t,n);for(;o&&H(o)&&"static"===R(o).position;)o=tt(o,n);return o&&("html"===$(o)||"body"===$(o)&&"static"===R(o).position&&!N(o))?e:o||function(t){let n=J(t);for(;T(n)&&!W(n);){if(N(n))return n;n=J(n)}return null}(t)||e}function et(t,n,e){const o=T(n),r=X(n),i=V(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==$(n)||L(r))&&(a=Y(n)),T(n)){const t=V(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=_(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=Q(t).filter((t=>j(t)&&"body"!==$(t))),r=null;const i="fixed"===R(t).position;let a=i?J(t):t;for(;j(a)&&!W(a);){const t=R(a),n=N(a);"fixed"===t.position?r=null:(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=J(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Z(n,e,r);return t.top=M(o.top,t.top),t.right=F(o.right,t.right),t.bottom=F(o.bottom,t.bottom),t.left=M(o.left,t.left),t}),Z(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=T(e),i=X(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==$(e)||L(i))&&(a=Y(e)),T(e))){const t=V(e);l=U(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:j,getDimensions:function(t){return T(t)?S(t):t.getBoundingClientRect()},getOffsetParent:nt,getDocumentElement:X,getScale:U,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||nt,i=this.getDimensions;return{reference:et(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===R(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){function t(){return navigator.userAgentData}if(rt.floatingUINonChromiumPositioningFix&&(/firefox|safari/i.test(function(){const n=t();return n?.brands?n.brands.map((({brand:t,version:n})=>`${t}/${n}`)).join(" "):navigator.userAgent}())||function(){const n=t();return n?.brands?!!n.brands.find((({brand:t,version:n})=>("Google Chrome"===t||"Chromium"===t)&&Number(n)>=109)):!!navigator.userAgent.split(" ").find((t=>{const[n,e]=t.split("/");return"Chrome"===n&&parseInt(e)>=109}))}())){const{offsetParent:t}=await import("./p-23ad4bfb.js"),n=ot.getOffsetParent;ot.getOffsetParent=e=>n(e,t)}}(),at="data-placement",lt=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],st="bottom-start",ct={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ft({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===g&&(g={}),{name:"shift",options:g,async fn(t){const{x:n,y:e,placement:o}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=g,u={x:n,y:e},d=await f(t,c),p=a(i(o)),y="x"===p?"y":"x";let x=u[p],h=u[y];r&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===y?"top":"left"],h,h-d["y"===y?"bottom":"right"]));const v=s.fn({...t,[p]:x,[y]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var g,x;if("menu"===d)return[...p,w({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,r=await async function(t,n){const{placement:e,platform:r,elements:l}=t,s=await(null==r.isRTL?void 0:r.isRTL(l.floating)),c=i(e),f=o(e),u="x"===a(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+r.x,y:e+r.y,data:r}}})];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,r,a;const{rects:l,middlewareData:s,placement:c,platform:u,elements:d}=n,{crossAxis:m=!1,alignment:p,allowedPlacements:g=y,autoAlignment:x=!0,...v}=t,w=void 0!==p||g===y?function(t,n,e){return(t?[...e.filter((n=>o(n)===t)),...e.filter((n=>o(n)!==t))]:e.filter((t=>i(t)===t))).filter((e=>!t||o(e)===t||!!n&&b(e)!==e))}(p||null,x,g):g,A=await f(n,v),P=(null==(e=s.autoPlacement)?void 0:e.index)||0,k=w[P];if(null==k)return{};const{main:D,cross:R}=h(k,l,await(null==u.isRTL?void 0:u.isRTL(d.floating)));if(c!==k)return{reset:{placement:w[0]}};const F=[A[i(k)],A[D],A[R]],M=[...(null==(r=s.autoPlacement)?void 0:r.overflows)||[],{placement:k,overflows:F}],E=w[P+1];if(E)return{data:{index:P+1,overflows:M},reset:{placement:E}};const S=M.map((t=>{const n=o(t.placement);return[t.placement,n&&m?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),$=(null==(a=S.filter((t=>t[2].slice(0,o(t[0])?2:3).every((t=>t<=0))))[0])?void 0:a[0])||S[0][0];return $!==c?{data:{index:P+1,overflows:M},reset:{placement:$}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(w(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:i=0}=t||{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(i),y={x:l,y:c},g=a(f),x=r(g),h=await d.getDimensions(e),v="y"===g?"top":"left",b="y"===g?"bottom":"right",w=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const D=p[v],R=k-h[x]-p[b],F=k/2-h[x]/2+(w/2-A/2),M=m(D,F,R),E=null!=o(f)&&F!=M&&u.reference[x]/2-(F<D?p[v]:p[b])-h[x]/2<0;return{[g]:y[g]-(E?F<D?D-F:R-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:u})),d}return[]}function ut(t,n){const e=t.filter((t=>lt.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${lt.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function dt(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 mt(t,n,e=!1){if(t.open)return e?pt(n):yt(n)}const pt=e(yt,100,{leading:!0,maxWait:100});async function yt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(f=!0===b.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:dt(n,o),middleware:ft({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden,h=x?"hidden":null,v=h?"none":null;n.setAttribute(at,p);const b=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:h,pointerEvents:v,position:y,top:"0",left:"0",transform:b})}const gt=new WeakMap;function xt(t,n,e){if(!e||!n)return;ht(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&Pt(e),gt.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?[...j(t)?Q(t):t.contextElement?Q(t.contextElement):[],...Q(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),j(t)&&!l&&u.observe(t),j(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?V(t):null;return l&&function n(){const o=V(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function ht(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",At);const o=gt.get(t);o&&o(),gt.delete(t)}const vt=Math.ceil(Math.hypot(4,4));function bt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",At)}function wt(t){return t.shadowRoot||t}function At(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(ct.animation)){const n=function(n){return t(n,`[${at}]`)}(e);Pt(n),wt(n).removeEventListener("transitionend",At)}}function Pt(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{ct as F,ht as a,vt as b,xt as c,st as d,ut as f,mt as r,bt as u}
|
|
6
|
+
import{c as t,b as n}from"./p-89b710ae.js";import{d as e}from"./p-0b1f31dd.js";function o(t){return t.split("-")[1]}function r(t){return"y"===t?"height":"width"}function i(t){return t.split("-")[0]}function a(t){return["top","bottom"].includes(i(t))?"x":"y"}function l(t,n,e){let{reference:l,floating:s}=t;const c=l.x+l.width/2-s.width/2,f=l.y+l.height/2-s.height/2,u=a(n),d=r(u),m=l[d]/2-s[d]/2,p="x"===u;let y;switch(i(n)){case"top":y={x:c,y:l.y-s.height};break;case"bottom":y={x:c,y:l.y+l.height};break;case"right":y={x:l.x+l.width,y:f};break;case"left":y={x:l.x-s.width,y:f};break;default:y={x:l.x,y:l.y}}switch(o(n)){case"start":y[u]-=m*(e&&p?-1:1);break;case"end":y[u]+=m*(e&&p?-1:1)}return y}function s(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function c(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function f(t,n){var e;void 0===n&&(n={});const{x:o,y:r,platform:i,rects:a,elements:l,strategy:f}=t,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:y=0}=n,g=s(y),x=l[p?"floating"===m?"reference":"floating":m],h=c(await i.getClippingRect({element:null==(e=await(null==i.isElement?void 0:i.isElement(x)))||e?x:x.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:f})),v="floating"===m?{...a.floating,x:o,y:r}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l.floating)),w=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},A=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:f}):v);return{top:(h.top-A.top+g.top)/w.y,bottom:(A.bottom-h.bottom+g.bottom)/w.y,left:(h.left-A.left+g.left)/w.x,right:(A.right-h.right+g.right)/w.x}}const u=Math.min,d=Math.max;function m(t,n,e){return d(t,u(n,e))}const p=["top","right","bottom","left"],y=p.reduce(((t,n)=>t.concat(n,n+"-start",n+"-end")),[]),g={left:"right",right:"left",bottom:"top",top:"bottom"};function x(t){return t.replace(/left|right|bottom|top/g,(t=>g[t]))}function h(t,n,e){void 0===e&&(e=!1);const i=o(t),l=a(t),s=r(l);let c="x"===l?i===(e?"end":"start")?"right":"left":"start"===i?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=x(c)),{main:c,cross:x(c)}}const v={start:"end",end:"start"};function b(t){return t.replace(/start|end/g,(t=>v[t]))}const w=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(n){var e;const{placement:r,middlewareData:a,rects:l,initialPlacement:s,platform:c,elements:u}=n,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...w}=t,A=i(r),P=i(s)===s,k=await(null==c.isRTL?void 0:c.isRTL(u.floating)),D=p||(P||!v?[x(s)]:function(t){const n=x(t);return[b(t),n,b(n)]}(s));p||"none"===g||D.push(...function(t,n,e,r){const a=o(t);let l=function(t,n,e){const o=["left","right"],r=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return e?n?r:o:n?o:r;case"left":case"right":return n?i:a;default:return[]}}(i(t),"start"===e,r);return a&&(l=l.map((t=>t+"-"+a)),n&&(l=l.concat(l.map(b)))),l}(s,v,g,k));const R=[s,...D],F=await f(n,w),M=[];let E=(null==(e=a.flip)?void 0:e.overflows)||[];if(d&&M.push(F[A]),m){const{main:t,cross:n}=h(r,l,k);M.push(F[t],F[n])}if(E=[...E,{placement:r,overflows:M}],!M.every((t=>t<=0))){var S,$;const t=((null==(S=a.flip)?void 0:S.index)||0)+1,n=R[t];if(n)return{data:{index:t,overflows:E},reset:{placement:n}};let e=null==($=E.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:$.placement;if(!e)switch(y){case"bestFit":{var C;const t=null==(C=E.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,n)=>t+n),0)])).sort(((t,n)=>t[1]-n[1]))[0])?void 0:C[0];t&&(e=t);break}case"initialPlacement":e=s}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 p.some((n=>t[n]>=0))}const k=function(t){return void 0===t&&(t={}),{name:"hide",options:t,async fn(n){const{strategy:e="referenceHidden",...o}=t,{rects:r}=n;switch(e){case"referenceHidden":{const t=A(await f(n,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:P(t)}}}case"escaped":{const t=A(await f(n,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:P(t)}}}default:return{}}}}};function D(t){var n;return(null==(n=t.ownerDocument)?void 0:n.defaultView)||window}function R(t){return D(t).getComputedStyle(t)}const F=Math.min,M=Math.max,E=Math.round;function S(t){const n=R(t);let e=parseFloat(n.width),o=parseFloat(n.height);const r=t.offsetWidth,i=t.offsetHeight,a=E(e)!==r||E(o)!==i;return a&&(e=r,o=i),{width:e,height:o,fallback:a}}function $(t){return B(t)?(t.nodeName||"").toLowerCase():""}let C;function O(){if(C)return C;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(C=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),C):navigator.userAgent}function T(t){return t instanceof D(t).HTMLElement}function j(t){return t instanceof D(t).Element}function B(t){return t instanceof D(t).Node}function z(t){return"undefined"!=typeof ShadowRoot&&(t instanceof D(t).ShadowRoot||t instanceof ShadowRoot)}function L(t){const{overflow:n,overflowX:e,overflowY:o,display:r}=R(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(r)}function H(t){return["table","td","th"].includes($(t))}function N(t){const n=/firefox/i.test(O()),e=R(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 I(){return/^((?!chrome|android).)*safari/i.test(O())}function W(t){return["html","body","#document"].includes($(t))}function q(t){return j(t)?t:t.contextElement}const G={x:1,y:1};function U(t){const n=q(t);if(!T(n))return G;const e=n.getBoundingClientRect(),{width:o,height:r,fallback:i}=S(n);let a=(i?E(e.width):e.width)/o,l=(i?E(e.height):e.height)/r;return a&&Number.isFinite(a)||(a=1),l&&Number.isFinite(l)||(l=1),{x:a,y:l}}function V(t,n,e,o){var r,i;void 0===n&&(n=!1),void 0===e&&(e=!1);const a=t.getBoundingClientRect(),l=q(t);let s=G;n&&(o?j(o)&&(s=U(o)):s=U(t));const c=l?D(l):window,f=I()&&e;let u=(a.left+(f&&(null==(r=c.visualViewport)?void 0:r.offsetLeft)||0))/s.x,d=(a.top+(f&&(null==(i=c.visualViewport)?void 0:i.offsetTop)||0))/s.y,m=a.width/s.x,p=a.height/s.y;if(l){const t=D(l),n=o&&j(o)?D(o):o;let e=t.frameElement;for(;e&&o&&n!==t;){const t=U(e),n=e.getBoundingClientRect(),o=getComputedStyle(e);n.x+=(e.clientLeft+parseFloat(o.paddingLeft))*t.x,n.y+=(e.clientTop+parseFloat(o.paddingTop))*t.y,u*=t.x,d*=t.y,m*=t.x,p*=t.y,u+=n.x,d+=n.y,e=D(e).frameElement}}return{width:m,height:p,top:d,right:u+m,bottom:d+p,left:u,x:u,y:d}}function X(t){return((B(t)?t.ownerDocument:t.document)||window.document).documentElement}function Y(t){return j(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function _(t){return V(X(t)).left+Y(t).scrollLeft}function J(t){if("html"===$(t))return t;const n=t.assignedSlot||t.parentNode||z(t)&&t.host||X(t);return z(n)?n.host:n}function K(t){const n=J(t);return W(n)?n.ownerDocument.body:T(n)&&L(n)?n:K(n)}function Q(t,n){var e;void 0===n&&(n=[]);const o=K(t),r=o===(null==(e=t.ownerDocument)?void 0:e.body),i=D(o);return r?n.concat(i,i.visualViewport||[],L(o)?o:[]):n.concat(o,Q(o))}function Z(t,n,e){let o;if("viewport"===n)o=function(t,n){const e=D(t),o=X(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=I();(!t||t&&"fixed"===n)&&(l=r.offsetLeft,s=r.offsetTop)}return{width:i,height:a,x:l,y:s}}(t,e);else if("document"===n)o=function(t){const n=X(t),e=Y(t),o=t.ownerDocument.body,r=M(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=M(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let a=-e.scrollLeft+_(t);const l=-e.scrollTop;return"rtl"===R(o).direction&&(a+=M(n.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:l}}(X(t));else if(j(n))o=function(t,n){const e=V(t,!0,"fixed"===n),o=e.top+t.clientTop,r=e.left+t.clientLeft,i=T(t)?U(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(n,e);else{const e={...n};if(I()){var r,i;const n=D(t);e.x-=(null==(r=n.visualViewport)?void 0:r.offsetLeft)||0,e.y-=(null==(i=n.visualViewport)?void 0:i.offsetTop)||0}o=e}return c(o)}function tt(t,n){return T(t)&&"fixed"!==R(t).position?n?n(t):t.offsetParent:null}function nt(t,n){const e=D(t);let o=tt(t,n);for(;o&&H(o)&&"static"===R(o).position;)o=tt(o,n);return o&&("html"===$(o)||"body"===$(o)&&"static"===R(o).position&&!N(o))?e:o||function(t){let n=J(t);for(;T(n)&&!W(n);){if(N(n))return n;n=J(n)}return null}(t)||e}function et(t,n,e){const o=T(n),r=X(n),i=V(t,!0,"fixed"===e,n);let a={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(o||!o&&"fixed"!==e)if(("body"!==$(n)||L(r))&&(a=Y(n)),T(n)){const t=V(n,!0);l.x=t.x+n.clientLeft,l.y=t.y+n.clientTop}else r&&(l.x=_(r));return{x:i.left+a.scrollLeft-l.x,y:i.top+a.scrollTop-l.y,width:i.width,height:i.height}}const ot={getClippingRect:function(t){let{element:n,boundary:e,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===e?function(t,n){const e=n.get(t);if(e)return e;let o=Q(t).filter((t=>j(t)&&"body"!==$(t))),r=null;const i="fixed"===R(t).position;let a=i?J(t):t;for(;j(a)&&!W(a);){const t=R(a),n=N(a);"fixed"===t.position?r=null:(i?n||r:n||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==a)),a=J(a)}return n.set(t,o),o}(n,this._c):[].concat(e),o],a=i.reduce(((t,e)=>{const o=Z(n,e,r);return t.top=M(o.top,t.top),t.right=F(o.right,t.right),t.bottom=F(o.bottom,t.bottom),t.left=M(o.left,t.left),t}),Z(n,i[0],r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:e,strategy:o}=t;const r=T(e),i=X(e);if(e===i)return n;let a={scrollLeft:0,scrollTop:0},l={x:1,y:1};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==$(e)||L(i))&&(a=Y(e)),T(e))){const t=V(e);l=U(e),s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+s.x,y:n.y*l.y-a.scrollTop*l.y+s.y}},isElement:j,getDimensions:function(t){return T(t)?S(t):t.getBoundingClientRect()},getOffsetParent:nt,getDocumentElement:X,getScale:U,async getElementRects(t){let{reference:n,floating:e,strategy:o}=t;const r=this.getOffsetParent||nt,i=this.getDimensions;return{reference:et(n,await r(e),o),floating:{x:0,y:0,...await i(e)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===R(t).direction};const rt={floatingUINonChromiumPositioningFix:!0,...globalThis.calciteComponentsConfig},it=async function(){function t(){return navigator.userAgentData}if(rt.floatingUINonChromiumPositioningFix&&(/firefox|safari/i.test(function(){const n=t();return n?.brands?n.brands.map((({brand:t,version:n})=>`${t}/${n}`)).join(" "):navigator.userAgent}())||function(){const n=t();return n?.brands?!!n.brands.find((({brand:t,version:n})=>("Google Chrome"===t||"Chromium"===t)&&Number(n)>=109)):!!navigator.userAgent.split(" ").find((t=>{const[n,e]=t.split("/");return"Chrome"===n&&parseInt(e)>=109}))}())){const{offsetParent:t}=await import("./p-28407877.js"),n=ot.getOffsetParent;ot.getOffsetParent=e=>n(e,t)}}(),at="data-placement",lt=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],st="bottom-start",ct={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ft({placement:t,flipDisabled:n,flipPlacements:e,offsetDistance:l,offsetSkidding:c,arrowEl:u,type:d}){const p=[(void 0===g&&(g={}),{name:"shift",options:g,async fn(t){const{x:n,y:e,placement:o}=t,{mainAxis:r=!0,crossAxis:l=!1,limiter:s={fn:t=>{let{x:n,y:e}=t;return{x:n,y:e}}},...c}=g,u={x:n,y:e},d=await f(t,c),p=a(i(o)),y="x"===p?"y":"x";let x=u[p],h=u[y];r&&(x=m(x+d["y"===p?"top":"left"],x,x-d["y"===p?"bottom":"right"])),l&&(h=m(h+d["y"===y?"top":"left"],h,h-d["y"===y?"bottom":"right"]));const v=s.fn({...t,[p]:x,[y]:h});return{...v,data:{x:v.x-n,y:v.y-e}}}}),k()];var g,x;if("menu"===d)return[...p,w({fallbackPlacements:e||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})];if("popover"===d||"tooltip"===d){const d=[...p,(x={mainAxis:"number"==typeof l?l:0,crossAxis:"number"==typeof c?c:0},void 0===x&&(x=0),{name:"offset",options:x,async fn(t){const{x:n,y:e}=t,r=await async function(t,n){const{placement:e,platform:r,elements:l}=t,s=await(null==r.isRTL?void 0:r.isRTL(l.floating)),c=i(e),f=o(e),u="x"===a(e),d=["left","top"].includes(c)?-1:1,m=s&&u?-1:1,p="function"==typeof n?n(t):n;let{mainAxis:y,crossAxis:g,alignmentAxis:x}="number"==typeof p?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...p};return f&&"number"==typeof x&&(g="end"===f?-1*x:x),u?{x:g*m,y:y*d}:{x:y*d,y:g*m}}(t,x);return{x:n+r.x,y:e+r.y,data:r}}})];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,r,a;const{rects:l,middlewareData:s,placement:c,platform:u,elements:d}=n,{crossAxis:m=!1,alignment:p,allowedPlacements:g=y,autoAlignment:x=!0,...v}=t,w=void 0!==p||g===y?function(t,n,e){return(t?[...e.filter((n=>o(n)===t)),...e.filter((n=>o(n)!==t))]:e.filter((t=>i(t)===t))).filter((e=>!t||o(e)===t||!!n&&b(e)!==e))}(p||null,x,g):g,A=await f(n,v),P=(null==(e=s.autoPlacement)?void 0:e.index)||0,k=w[P];if(null==k)return{};const{main:D,cross:R}=h(k,l,await(null==u.isRTL?void 0:u.isRTL(d.floating)));if(c!==k)return{reset:{placement:w[0]}};const F=[A[i(k)],A[D],A[R]],M=[...(null==(r=s.autoPlacement)?void 0:r.overflows)||[],{placement:k,overflows:F}],E=w[P+1];if(E)return{data:{index:P+1,overflows:M},reset:{placement:E}};const S=M.map((t=>{const n=o(t.placement);return[t.placement,n&&m?t.overflows.slice(0,2).reduce(((t,n)=>t+n),0):t.overflows[0],t.overflows]})).sort(((t,n)=>t[1]-n[1])),$=(null==(a=S.filter((t=>t[2].slice(0,o(t[0])?2:3).every((t=>t<=0))))[0])?void 0:a[0])||S[0][0];return $!==c?{data:{index:P+1,overflows:M},reset:{placement:$}}:{}}}}({alignment:"auto-start"===t?"start":"auto-end"===t?"end":null})):n||d.push(w(e?{fallbackPlacements:e}:{})),u&&d.push((t=>({name:"arrow",options:t,async fn(n){const{element:e,padding:i=0}=t||{},{x:l,y:c,placement:f,rects:u,platform:d}=n;if(null==e)return{};const p=s(i),y={x:l,y:c},g=a(f),x=r(g),h=await d.getDimensions(e),v="y"===g?"top":"left",b="y"===g?"bottom":"right",w=u.reference[x]+u.reference[g]-y[g]-u.floating[x],A=y[g]-u.reference[g],P=await(null==d.getOffsetParent?void 0:d.getOffsetParent(e));let k=P?"y"===g?P.clientHeight||0:P.clientWidth||0:0;0===k&&(k=u.floating[x]);const D=p[v],R=k-h[x]-p[b],F=k/2-h[x]/2+(w/2-A/2),M=m(D,F,R),E=null!=o(f)&&F!=M&&u.reference[x]/2-(F<D?p[v]:p[b])-h[x]/2<0;return{[g]:y[g]-(E?F<D?D-F:R-F:0),data:{[g]:M,centerOffset:F-M}}}}))({element:u})),d}return[]}function ut(t,n){const e=t.filter((t=>lt.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${lt.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function dt(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 mt(t,n,e=!1){if(t.open)return e?pt(n):yt(n)}const pt=e(yt,100,{leading:!0,maxWait:100});async function yt({referenceEl:t,floatingEl:n,overlayPositioning:e="absolute",placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,includeArrow:c=!1,arrowEl:f,type:u}){if(!t||!n||c&&!f)return null;await it;const{x:d,y:m,placement:p,strategy:y,middlewareData:g}=await((t,n,e)=>{const o=new Map,r={platform:ot,...e},i={...r.platform,_c:o};return(async(t,n,e)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=e,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(n));let f=await a.getElementRects({reference:t,floating:n,strategy:r}),{x:u,y:d}=l(f,o,c),m=o,p={},y=0;for(let e=0;e<s.length;e++){const{name:i,fn:g}=s[e],{x,y:h,data:v,reset:b}=await g({x:u,y:d,initialPlacement:o,placement:m,strategy:r,middlewareData:p,rects:f,platform:a,elements:{reference:t,floating:n}});u=null!=x?x:u,d=null!=h?h:d,p={...p,[i]:{...p[i],...v}},b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(m=b.placement),b.rects&&(f=!0===b.rects?await a.getElementRects({reference:t,floating:n,strategy:r}):b.rects),({x:u,y:d}=l(f,m,c))),e=-1)}return{x:u,y:d,placement:m,strategy:r,middlewareData:p}})(t,n,{...r,platform:i})})(t,n,{strategy:e,placement:"auto"===o||"auto-start"===o||"auto-end"===o?void 0:dt(n,o),middleware:ft({placement:o,flipDisabled:r,flipPlacements:i,offsetDistance:a,offsetSkidding:s,arrowEl:f,type:u})});if(g?.arrow){const{x:t,y:n}=g.arrow;Object.assign(f.style,{left:null!=t?`${t}px`:"",top:null!=n?`${n}px`:""})}const x=g?.hide?.referenceHidden,h=x?"hidden":null,v=h?"none":null;n.setAttribute(at,p);const b=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:h,pointerEvents:v,position:y,top:"0",left:"0",transform:b})}const gt=new WeakMap;function xt(t,n,e){if(!e||!n)return;ht(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&Pt(e),gt.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?[...j(t)?Q(t):t.contextElement?Q(t.contextElement):[],...Q(n)]:[];c.forEach((t=>{s&&t.addEventListener("scroll",e,{passive:!0}),i&&t.addEventListener("resize",e)}));let f,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||e(),o=!1})),j(t)&&!l&&u.observe(t),j(t)||!t.contextElement||l||u.observe(t.contextElement),u.observe(n)}let d=l?V(t):null;return l&&function n(){const o=V(t);!d||o.x===d.x&&o.y===d.y&&o.width===d.width&&o.height===d.height||e(),d=o,f=requestAnimationFrame(n)}(),e(),()=>{var t;c.forEach((t=>{s&&t.removeEventListener("scroll",e),i&&t.removeEventListener("resize",e)})),null==(t=u)||t.disconnect(),u=null,l&&cancelAnimationFrame(f)}}(n,e,(()=>t.reposition())))}function ht(t,n,e){if(!e||!n)return;wt(e).removeEventListener("transitionend",At);const o=gt.get(t);o&&o(),gt.delete(t)}const vt=Math.ceil(Math.hypot(4,4));function bt(t){t&&"absolute"===t.style.position&&wt(t).addEventListener("transitionend",At)}function wt(t){return t.shadowRoot||t}function At(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(ct.animation)){const n=function(n){return t(n,`[${at}]`)}(e);Pt(n),wt(n).removeEventListener("transitionend",At)}}function Pt(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{ct as F,ht as a,vt as b,xt as c,st as d,ut as f,mt as r,bt as u}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as a,h as t,g as i}from"./p-
|
|
6
|
+
import{r as a,h as t,g as i}from"./p-2154b7de.js";import{f as o}from"./p-89b710ae.js";import{u as n}from"./p-bb5a7862.js";import{s as e,a as r,c as s}from"./p-b16095ce.js";import"./p-b5c59463.js";import"./p-55b16a54.js";const c=class{constructor(t){a(this,t),this.appearance="solid",this.kind="brand",this.disabled=!1,this.icon="plus",this.iconFlipRtl=!1,this.label=void 0,this.loading=!1,this.scale="m",this.text=void 0,this.textEnabled=!1}componentWillLoad(){e(this)}componentDidLoad(){r(this)}componentDidRender(){n(this)}async setFocus(){await s(this),o(this.buttonEl)}render(){const{appearance:a,kind:i,disabled:o,loading:n,scale:e,textEnabled:r,icon:s,label:c,text:l,iconFlipRtl:d}=this;return t("calcite-button",{appearance:"solid"===a?"solid":"outline-fill",class:"button",disabled:o,iconFlipRtl:d?"start":null,iconStart:s,kind:i,label:c,loading:n,round:!0,scale:e,title:r?null:c||l||null,type:"button",width:"auto",ref:a=>{this.buttonEl=a}},this.textEnabled?this.text:null)}get el(){return i(this)}};c.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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}calcite-button{--tw-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}calcite-button:hover{--tw-shadow:0 12px 32px -2px rgba(0, 0, 0, 0.1), 0 4px 20px 0 rgba(0, 0, 0, 0.08);--tw-shadow-colored:0 12px 32px -2px var(--tw-shadow-color), 0 4px 20px 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)}calcite-button:active{--tw-shadow:0 2px 12px -4px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.16);--tw-shadow-colored:0 2px 12px -4px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";export{c as calcite_fab}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as a,h as i,g as t}from"./p-
|
|
6
|
+
import{r as a,h as i,g as t}from"./p-2154b7de.js";import{c as e,d as n}from"./p-9ee2e227.js";import{u as c,c as o,s,d as r}from"./p-a9158071.js";import"./p-89b710ae.js";import"./p-b5c59463.js";import"./p-55b16a54.js";import"./p-26d8628f.js";import"./p-8728d1dd.js";const l=class{constructor(i){a(this,i),this.loading=!1,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale=""}onMessagesChange(){}effectiveLocaleChange(){c(this,this.effectiveLocale)}connectedCallback(){e(this),o(this)}async componentWillLoad(){await s(this)}disconnectedCallback(){n(this),r(this)}render(){const{el:a,loading:t,messages:e}=this,n=a.innerHTML.trim().length>0,c=t?i("calcite-loader",{label:e.loading}):null,o=n?i("div",{class:"content"},i("slot",null)):null;return i("div",{class:"scrim"},c,o)}static get assetsDirs(){return["assets"]}get el(){return t(this)}static get watchers(){return{messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};l.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:absolute;inset:0px;z-index:700;display:flex;block-size:100%;inline-size:100%;flex-direction:column;align-items:stretch}@keyframes calcite-scrim-fade-in{0%{--tw-bg-opacity:0}100%{--tw-text-opacity:1}}.scrim{position:absolute;inset:0px;display:flex;flex-direction:column;align-content:center;align-items:center;justify-content:center;overflow:hidden;animation:calcite-scrim-fade-in var(--calcite-internal-animation-timing-medium) ease-in-out;background-color:var(--calcite-scrim-background, var(--calcite-scrim-background-internal))}.content{padding:1rem}";export{l as calcite_scrim}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as i,h as a,g as s}from"./p-
|
|
6
|
+
import{r as t,c as i,h as a,g as s}from"./p-2154b7de.js";import{h as e,g as n}from"./p-89b710ae.js";import{u as c}from"./p-bb5a7862.js";import{c as o,d as r,g as l}from"./p-403627a1.js";import{s as h,a as d,c as p}from"./p-b16095ce.js";import{c as m,d as b}from"./p-9ee2e227.js";import{c as u}from"./p-8728d1dd.js";import{c as f,s as g,d as y,u as v}from"./p-a9158071.js";import"./p-b5c59463.js";import"./p-55b16a54.js";import"./p-26d8628f.js";const w=class{constructor(a){t(this,a),this.calciteInlineEditableEditCancel=i(this,"calciteInlineEditableEditCancel",6),this.calciteInlineEditableEditConfirm=i(this,"calciteInlineEditableEditConfirm",6),this.calciteInternalInlineEditableEnableEditingChange=i(this,"calciteInternalInlineEditableEnableEditingChange",6),this.mutationObserver=u("mutation",(()=>this.mutationObserverCallback())),this.enableEditing=()=>{this.valuePriorToEditing=this.inputElement?.value,this.editingEnabled=!0,this.inputElement?.setFocus(),this.calciteInternalInlineEditableEnableEditingChange.emit()},this.disableEditing=()=>{this.editingEnabled=!1},this.cancelEditing=()=>{this.inputElement&&(this.inputElement.value=this.valuePriorToEditing),this.disableEditing(),this.enableEditingButton.setFocus(),!this.editingEnabled&&this.shouldEmitCancel&&this.calciteInlineEditableEditCancel.emit()},this.escapeKeyHandler=async t=>{t.defaultPrevented||("Escape"===t.key&&(t.preventDefault(),this.cancelEditing()),"Tab"===t.key&&this.shouldShowControls&&(t.shiftKey||t.target!==this.inputElement||(t.preventDefault(),this.cancelEditingButton.setFocus()),t.shiftKey&&t.target===this.cancelEditingButton&&(t.preventDefault(),this.inputElement?.setFocus())))},this.cancelEditingHandler=async t=>{t.preventDefault(),this.cancelEditing()},this.enableEditingHandler=async t=>{this.disabled||t.target===this.cancelEditingButton||t.target===this.confirmEditingButton||(t.preventDefault(),this.editingEnabled||this.enableEditing())},this.confirmChangesHandler=async t=>{t.preventDefault(),this.calciteInlineEditableEditConfirm.emit();try{this.afterConfirm&&(this.loading=!0,await this.afterConfirm(),this.disableEditing(),this.enableEditingButton.setFocus())}catch(t){}finally{this.loading=!1}},this.disabled=!1,this.editingEnabled=!1,this.loading=!1,this.controls=!1,this.scale=void 0,this.afterConfirm=void 0,this.messages=void 0,this.messageOverrides=void 0,this.defaultMessages=void 0,this.effectiveLocale=void 0}disabledWatcher(t){this.inputElement&&(this.inputElement.disabled=t)}editingEnabledWatcher(t,i){this.inputElement&&(this.inputElement.editingEnabled=t),!t&&i&&(this.shouldEmitCancel=!0)}onMessagesChange(){}connectedCallback(){o(this),m(this),f(this),this.mutationObserver?.observe(this.el,{childList:!0}),this.mutationObserverCallback()}async componentWillLoad(){h(this),await g(this)}componentDidLoad(){d(this)}disconnectedCallback(){r(this),b(this),y(this),this.mutationObserver?.disconnect()}componentDidRender(){c(this)}render(){return a("div",{class:"wrapper",onClick:this.enableEditingHandler,onKeyDown:this.escapeKeyHandler},a("div",{class:"input-wrapper"},a("slot",null)),a("div",{class:"controls-wrapper"},a("calcite-button",{appearance:"transparent",class:"enable-editing-button",disabled:this.disabled,iconStart:"pencil",kind:"neutral",label:this.messages.enableEditing,onClick:this.enableEditingHandler,scale:this.scale,style:{opacity:this.editingEnabled?"0":"1",width:this.editingEnabled?"0":"inherit"},type:"button",ref:t=>this.enableEditingButton=t}),this.shouldShowControls&&[a("div",{class:"cancel-editing-button-wrapper"},a("calcite-button",{appearance:"transparent",class:"cancel-editing-button",disabled:this.disabled,iconStart:"x",kind:"neutral",label:this.messages.cancelEditing,onClick:this.cancelEditingHandler,scale:this.scale,type:"button",ref:t=>this.cancelEditingButton=t})),a("calcite-button",{appearance:"solid",class:"confirm-changes-button",disabled:this.disabled,iconStart:"check",kind:"brand",label:this.messages.confirmChanges,loading:this.loading,onClick:this.confirmChangesHandler,scale:this.scale,type:"button",ref:t=>this.confirmEditingButton=t})]))}blurHandler(){this.controls||this.disableEditing()}effectiveLocaleChange(){v(this,this.effectiveLocale)}async setFocus(){await p(this),this.el?.focus()}mutationObserverCallback(){this.updateSlottedInput(),this.scale=this.scale||this.inputElement?.scale||e(this.el,"scale",void 0)}onLabelClick(){this.setFocus()}updateSlottedInput(){const t=n(this.el,{matches:"calcite-input"});this.inputElement=t,t&&(this.inputElement.disabled=this.disabled,this.inputElement.label=this.inputElement.label||l(this))}get shouldShowControls(){return this.editingEnabled&&this.controls}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{disabled:["disabledWatcher"],editingEnabled:["editingEnabledWatcher"],messageOverrides:["onMessagesChange"],effectiveLocale:["effectiveLocaleChange"]}}};w.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) .controls-wrapper{block-size:1.5rem}:host([scale=m]) .controls-wrapper{block-size:2rem}:host([scale=l]) .controls-wrapper{block-size:2.75rem}:host(:not([editing-enabled]):not([disabled])) .wrapper:hover{background-color:var(--calcite-ui-foreground-2)}.wrapper{box-sizing:border-box;display:flex;justify-content:space-between;background-color:var(--calcite-ui-foreground-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.wrapper .input-wrapper{flex:1 1 0%}.controls-wrapper{display:flex}:host([disabled]) .cancel-editing-button-wrapper{border-color:var(--calcite-ui-border-2)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}";export{w as calcite_inline_editable}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.
|
|
4
|
+
* v1.2.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,h as a,g as t}from"./p-
|
|
6
|
+
import{r as i,h as a,g as t}from"./p-2154b7de.js";import{e}from"./p-89b710ae.js";import{h as n,i as r}from"./p-1ac41302.js";import"./p-b5c59463.js";import"./p-55b16a54.js";const c=class{constructor(a){i(this,a),this.scale="m",this.thumbnail=void 0,this.fullName=void 0,this.username=void 0,this.userId=void 0,this.thumbnailFailedToLoad=!1}render(){return this.determineContent()}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return a("img",{alt:"",class:"thumbnail",onError:()=>this.thumbnailFailedToLoad=!0,src:this.thumbnail});const i=this.generateInitials(),t=this.generateFillColor();return a("span",{class:"background",style:{backgroundColor:t}},i?a("span",{"aria-hidden":"true",class:"initials"},i):a("calcite-icon",{class:"icon",icon:"user",scale:this.scale}))}generateFillColor(){const{userId:i,username:a,fullName:t,el:c}=this,o=e(c),s=i&&`#${i.substr(i.length-6)}`,l=a||t||"",m=s&&r(s)?s:function(i){let a=0;for(let t=0;t<i.length;t++)a=i.charCodeAt(t)+((a<<5)-a);let t="#";for(let i=0;i<3;i++)t+=("00"+(a>>8*i&255).toString(16)).substr(-2);return t}(l);return(i||l)&&r(m)?`hsl(${function(i){return function(i){let{r:a,g:t,b:e}=i;a/=255,t/=255,e/=255;const n=Math.max(a,t,e),r=Math.min(a,t,e),c=n-r;if(n===r)return 0;let o=(n+r)/2;switch(n){case a:o=(t-e)/c+(t<e?6:0);break;case t:o=(e-a)/c+2;break;case e:o=(a-t)/c+4}return Math.round(60*o)}(n(i))}(m)}, 60%, ${"dark"===o?20:90}%)`:"var(--calcite-ui-foreground-2)"}generateInitials(){const{fullName:i,username:a}=this;return i?i.trim().split(" ").map((i=>i.substring(0,1))).join(""):!!a&&a.substring(0,2)}get el(){return t(this)}};c.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);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:inline-block;overflow:hidden;border-radius:50%}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size--3)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size--2)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-0)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:50%}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase;color:var(--calcite-ui-text-2)}.thumbnail{block-size:100%;inline-size:100%;border-radius:50%}";export{c as calcite_avatar}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
+
* v1.2.0
|
|
5
|
+
*/
|
|
6
|
+
import{r as i,c as t,h as a,H as e,g as o}from"./p-2154b7de.js";import{f as n,t as r}from"./p-89b710ae.js";import{c,d as s,H as l}from"./p-05215047.js";import{u as d}from"./p-bb5a7862.js";import{i as m}from"./p-26d8628f.js";import{c as h,d as p,g as b}from"./p-403627a1.js";import{c as u,s as v,a as f}from"./p-b16095ce.js";import"./p-b5c59463.js";import"./p-55b16a54.js";const k=class{constructor(a){i(this,a),this.calciteSwitchChange=t(this,"calciteSwitchChange",6),this.keyDownHandler=i=>{!this.disabled&&m(i.key)&&(this.toggle(),i.preventDefault())},this.clickHandler=()=>{this.toggle()},this.setSwitchEl=i=>{this.switchEl=i},this.disabled=!1,this.form=void 0,this.label=void 0,this.name=void 0,this.scale="m",this.checked=!1,this.value=void 0}async setFocus(){await u(this),n(this.switchEl)}syncHiddenFormInput(i){i.type="checkbox"}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit()}connectedCallback(){h(this),c(this)}componentWillLoad(){v(this)}componentDidLoad(){f(this)}disconnectedCallback(){p(this),s(this)}componentDidRender(){d(this)}render(){return a(e,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},a("div",{"aria-checked":r(this.checked),"aria-label":b(this),class:"container",role:"switch",tabIndex:0,ref:this.setSwitchEl},a("div",{class:"track"},a("div",{class:"handle"})),a(l,{component:this})))}get el(){return o(this)}};k.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host([scale=s]) .container{block-size:0.75rem}:host([scale=s]) .track{block-size:0.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:0.5rem;inline-size:0.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:0.75rem;inline-size:0.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host{inline-size:auto;outline-color:transparent}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-2);vertical-align:top;transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.handle{pointer-events:none;position:absolute;display:block;border-radius:9999px;border-width:2px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);inset-block-start:-1px;inset-inline:-1px auto}:host(:hover) .handle,:host(:focus) .handle{border-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([checked]) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]) .handle{border-color:var(--calcite-ui-brand);inset-inline:auto -1px}:host([checked]:hover) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]:hover) .handle{border-color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}@media (forced-colors: active){:host([checked]) .track{background-color:canvasText}}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{k as calcite_switch}
|