@esri/calcite-components 1.1.0-next.2 → 1.1.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/handle/t9n/index.d.ts +3 -0
- package/dist/calcite/assets/handle/t9n/messages.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ar.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_bg.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_bs.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ca.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_cs.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_da.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_de.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_el.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_en.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_es.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_et.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_fi.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_fr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_he.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_hr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_hu.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_id.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_it.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ja.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ko.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_lt.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_lv.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_nl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_no.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pt-BR.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_pt-PT.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ro.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_ru.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sk.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sl.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_sv.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_th.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_tr.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_uk.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_vi.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-CN.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-HK.json +3 -0
- package/dist/calcite/assets/handle/t9n/messages_zh-TW.json +3 -0
- package/dist/calcite/assets/icon/analysisOverlay16.json +1 -0
- package/dist/calcite/assets/icon/analysisOverlay24.json +1 -0
- package/dist/calcite/assets/icon/analysisOverlay32.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem16.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem24.json +1 -0
- package/dist/calcite/assets/icon/coordinateSystem32.json +1 -0
- package/dist/calcite/assets/icon/graphAxis16.json +1 -0
- package/dist/calcite/assets/icon/graphAxis24.json +1 -0
- package/dist/calcite/assets/icon/graphAxis32.json +1 -0
- package/dist/calcite/assets/icon/graphGuides16.json +1 -0
- package/dist/calcite/assets/icon/graphGuides24.json +1 -0
- package/dist/calcite/assets/icon/graphGuides32.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries16.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries24.json +1 -0
- package/dist/calcite/assets/icon/graphLineSeries32.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice16.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice24.json +1 -0
- package/dist/calcite/assets/icon/graphPieSlice32.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer16.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer24.json +1 -0
- package/dist/calcite/assets/icon/mediaLayer32.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable16.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable24.json +1 -0
- package/dist/calcite/assets/icon/readOnlyNonEditable32.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea16.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea24.json +1 -0
- package/dist/calcite/assets/icon/trapezoidArea32.json +1 -0
- package/dist/calcite/calcite.css +1 -1
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/calcite/index.esm.js +1 -1
- package/dist/calcite/p-041d0f9f.entry.js +6 -0
- package/dist/calcite/{p-f4ae848c.js → p-0534cef5.js} +1 -1
- package/dist/calcite/{p-d3614e9b.entry.js → p-0743cc15.entry.js} +2 -2
- package/dist/calcite/p-07cddbf9.entry.js +6 -0
- package/dist/calcite/p-0824c673.entry.js +6 -0
- package/dist/calcite/p-09b4dbc1.entry.js +6 -0
- package/dist/calcite/p-0a7542f8.entry.js +6 -0
- package/dist/calcite/p-0df568c3.entry.js +6 -0
- package/dist/calcite/{p-d62db6f4.entry.js → p-0edfedfc.entry.js} +2 -2
- package/dist/calcite/p-145b7cdc.js +6 -0
- package/dist/calcite/p-1d322131.entry.js +6 -0
- package/dist/calcite/p-1e3db270.entry.js +6 -0
- package/dist/calcite/{p-25361452.entry.js → p-28ee997e.entry.js} +2 -2
- package/dist/calcite/p-291b75d5.entry.js +6 -0
- package/dist/calcite/p-299618f6.entry.js +6 -0
- package/dist/calcite/p-2afe300d.js +6 -0
- package/dist/calcite/p-31cf383e.js +6 -0
- package/dist/calcite/{p-8061aecd.js → p-32d3d2c6.js} +1 -1
- package/dist/calcite/p-3449e5c5.entry.js +6 -0
- package/dist/calcite/p-3abc3397.entry.js +6 -0
- package/dist/calcite/p-3b712fa3.entry.js +6 -0
- package/dist/calcite/p-3bd84462.js +10 -0
- package/dist/calcite/{p-383ae263.js → p-43215088.js} +2 -2
- package/dist/calcite/p-443e7495.js +6 -0
- package/dist/calcite/{p-ce1ac637.js → p-44e65dab.js} +1 -1
- package/dist/calcite/{p-871dd426.entry.js → p-45aba393.entry.js} +2 -2
- package/dist/calcite/p-4a902f71.entry.js +6 -0
- package/dist/calcite/p-4b8aad63.entry.js +6 -0
- package/dist/calcite/{p-fa92d0fa.entry.js → p-5738ec05.entry.js} +2 -2
- package/dist/calcite/{p-e76ab8cb.entry.js → p-586f2188.entry.js} +2 -2
- package/dist/calcite/p-5e2b13eb.js +6 -0
- package/dist/calcite/{p-2aa07ce3.js → p-5e822482.js} +1 -1
- package/dist/calcite/{p-0f8d9c80.js → p-6293ed16.js} +1 -1
- package/dist/calcite/p-681f5bcd.entry.js +6 -0
- package/dist/calcite/{p-d8f305f9.js → p-6cc03406.js} +1 -1
- package/dist/calcite/p-6ebb0713.entry.js +6 -0
- package/dist/calcite/{p-cc21ee89.js → p-6f9b73aa.js} +1 -1
- package/dist/calcite/p-721d4a15.entry.js +6 -0
- package/dist/calcite/{p-1cc77a48.js → p-72e0a2c6.js} +1 -1
- package/dist/calcite/p-747d2b6e.entry.js +6 -0
- package/dist/calcite/{p-6e558447.js → p-75651de9.js} +2 -2
- package/dist/calcite/p-7aee1b7a.js +6 -0
- package/dist/calcite/p-7beda7c9.entry.js +6 -0
- package/dist/calcite/p-7d37e5a3.entry.js +6 -0
- package/dist/calcite/p-7e570f52.entry.js +6 -0
- package/dist/calcite/{p-09c57eb5.js → p-7f1192e2.js} +2 -2
- package/dist/calcite/{p-a544dc0a.entry.js → p-8190fef7.entry.js} +2 -2
- package/dist/calcite/p-81a8751c.entry.js +6 -0
- package/dist/calcite/{p-45db0321.entry.js → p-88552502.entry.js} +2 -2
- package/dist/calcite/p-8880449d.entry.js +6 -0
- package/dist/calcite/p-8a48ce07.entry.js +6 -0
- package/dist/calcite/p-92c57358.entry.js +6 -0
- package/dist/calcite/p-941bc30e.entry.js +6 -0
- package/dist/calcite/{p-51c09654.js → p-95affd38.js} +1 -1
- package/dist/calcite/p-98c10ed9.entry.js +6 -0
- package/dist/calcite/{p-917b5c3c.js → p-9a811534.js} +2 -2
- package/dist/calcite/p-9b383655.entry.js +6 -0
- package/dist/calcite/p-9e7d290a.entry.js +6 -0
- package/dist/calcite/p-a0699bed.entry.js +6 -0
- package/dist/calcite/{p-7f40d693.js → p-a5d23ef8.js} +2 -2
- package/dist/calcite/p-a82b983d.entry.js +6 -0
- package/dist/calcite/{p-7adcf447.js → p-adef0422.js} +1 -1
- package/dist/calcite/{p-9b8c6bd5.entry.js → p-aea382ce.entry.js} +2 -2
- package/dist/calcite/p-b2fd4072.entry.js +6 -0
- package/dist/calcite/p-b33dc129.js +6 -0
- package/dist/calcite/{p-42a11557.entry.js → p-b3a9a53c.entry.js} +2 -2
- package/dist/calcite/p-b4c2f2ce.js +11 -0
- package/dist/calcite/{p-75936643.js → p-b4f3b351.js} +2 -2
- package/dist/calcite/p-b5a392d6.entry.js +6 -0
- package/dist/calcite/{p-c45ca041.js → p-b90df3dd.js} +1 -1
- package/dist/calcite/p-b9421f54.entry.js +6 -0
- package/dist/calcite/{p-c4b38335.entry.js → p-ba3e198d.entry.js} +2 -2
- package/dist/calcite/{p-63ab7d7a.js → p-bb1240f3.js} +1 -1
- package/dist/calcite/{p-b93df4a3.js → p-c097b143.js} +1 -1
- package/dist/calcite/p-c4d076eb.entry.js +6 -0
- package/dist/calcite/p-cc1203c0.entry.js +6 -0
- package/dist/calcite/{p-e06fda39.js → p-ce6a7f8c.js} +2 -2
- package/dist/calcite/p-d438c49f.entry.js +6 -0
- package/dist/calcite/{p-414f1e94.entry.js → p-d841eb93.entry.js} +2 -2
- package/dist/calcite/{p-8669328f.entry.js → p-de571c36.entry.js} +2 -2
- package/dist/calcite/p-de99d897.entry.js +6 -0
- package/dist/calcite/p-df405411.entry.js +6 -0
- package/dist/calcite/p-e370cd2d.entry.js +6 -0
- package/dist/calcite/p-e4e7c6c0.entry.js +6 -0
- package/dist/calcite/{p-4321c513.entry.js → p-e5e67c4b.entry.js} +2 -2
- package/dist/calcite/p-e683cacc.entry.js +6 -0
- package/dist/calcite/p-eaad3707.entry.js +6 -0
- package/dist/calcite/{p-9375c53f.entry.js → p-f27daa9e.entry.js} +2 -2
- package/dist/calcite/{p-ce9f7164.js → p-f44952aa.js} +2 -2
- package/dist/calcite/{p-abd69d92.js → p-f510244b.js} +1 -1
- package/dist/calcite/p-f91b9012.entry.js +6 -0
- package/dist/calcite/{p-1ca20cfc.js → p-fda34bfd.js} +1 -1
- package/dist/cjs/{ExpandToggle-e64129de.js → ExpandToggle-a335cfb1.js} +8 -6
- package/dist/cjs/{Heading-2fba9a7a.js → Heading-d361823f.js} +2 -2
- package/dist/cjs/{app-globals-c2211671.js → app-globals-a113245f.js} +2 -2
- package/dist/cjs/{array-77e138b0.js → array-2d1e4569.js} +1 -1
- package/dist/cjs/calcite-accordion_2.cjs.entry.js +9 -9
- package/dist/cjs/calcite-action-bar.cjs.entry.js +19 -17
- package/dist/cjs/calcite-action-group.cjs.entry.js +13 -28
- package/dist/cjs/calcite-action-menu.cjs.entry.js +13 -11
- package/dist/cjs/calcite-action-pad.cjs.entry.js +18 -16
- package/dist/cjs/calcite-action.cjs.entry.js +15 -13
- package/dist/cjs/calcite-alert.cjs.entry.js +19 -15
- package/dist/cjs/calcite-avatar.cjs.entry.js +7 -7
- package/dist/cjs/calcite-block_2.cjs.entry.js +14 -14
- package/dist/cjs/calcite-button.cjs.entry.js +17 -15
- package/dist/cjs/calcite-card.cjs.entry.js +11 -11
- package/dist/cjs/calcite-checkbox.cjs.entry.js +22 -17
- package/dist/cjs/calcite-chip.cjs.entry.js +15 -13
- package/dist/cjs/calcite-color-picker_3.cjs.entry.js +27 -19
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +34 -26
- package/dist/cjs/calcite-date-picker_4.cjs.entry.js +23 -34
- package/dist/cjs/calcite-dropdown_3.cjs.entry.js +26 -32
- package/dist/cjs/calcite-fab.cjs.entry.js +12 -10
- package/dist/cjs/calcite-filter.cjs.entry.js +18 -17
- package/dist/cjs/calcite-flow-item.cjs.entry.js +19 -15
- package/dist/cjs/calcite-flow.cjs.entry.js +4 -4
- package/dist/cjs/calcite-graph_2.cjs.entry.js +55 -29
- package/dist/cjs/calcite-handle.cjs.entry.js +41 -11
- package/dist/cjs/calcite-icon.cjs.entry.js +23 -18
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +23 -17
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +33 -21
- package/dist/cjs/calcite-input-message.cjs.entry.js +6 -6
- package/dist/cjs/calcite-input-number.cjs.entry.js +46 -37
- package/dist/cjs/calcite-input-text.cjs.entry.js +24 -21
- package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +34 -20
- package/dist/cjs/calcite-input.cjs.entry.js +53 -56
- package/dist/cjs/calcite-label.cjs.entry.js +7 -7
- package/dist/cjs/calcite-link.cjs.entry.js +11 -9
- package/dist/cjs/calcite-list_3.cjs.entry.js +43 -33
- package/dist/cjs/calcite-loader.cjs.entry.js +4 -4
- package/dist/cjs/calcite-modal.cjs.entry.js +45 -21
- package/dist/cjs/calcite-notice.cjs.entry.js +16 -14
- package/dist/cjs/calcite-option_3.cjs.entry.js +16 -14
- package/dist/cjs/calcite-pagination.cjs.entry.js +10 -20
- package/dist/cjs/calcite-panel.cjs.entry.js +24 -18
- package/dist/cjs/calcite-pick-list_3.cjs.entry.js +22 -20
- package/dist/cjs/calcite-popover.cjs.entry.js +25 -19
- package/dist/cjs/calcite-progress.cjs.entry.js +3 -3
- package/dist/cjs/calcite-radio-button-group.cjs.entry.js +4 -4
- package/dist/cjs/calcite-radio-button.cjs.entry.js +22 -17
- package/dist/cjs/calcite-rating.cjs.entry.js +18 -16
- package/dist/cjs/calcite-scrim.cjs.entry.js +10 -10
- package/dist/cjs/calcite-segmented-control_2.cjs.entry.js +11 -11
- package/dist/cjs/calcite-shell_3.cjs.entry.js +20 -16
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +6 -6
- package/dist/cjs/calcite-split-button.cjs.entry.js +4 -21
- package/dist/cjs/calcite-stepper_2.cjs.entry.js +16 -14
- package/dist/cjs/calcite-switch.cjs.entry.js +22 -17
- package/dist/cjs/calcite-tab_4.cjs.entry.js +21 -13
- package/dist/cjs/calcite-tile-select_2.cjs.entry.js +7 -7
- package/dist/cjs/calcite-tile.cjs.entry.js +9 -9
- package/dist/cjs/calcite-tip_3.cjs.entry.js +17 -15
- package/dist/cjs/calcite-tooltip.cjs.entry.js +29 -21
- package/dist/cjs/calcite-tree_2.cjs.entry.js +20 -15
- package/dist/cjs/calcite-value-list_2.cjs.entry.js +32 -22
- package/dist/cjs/calcite.cjs.js +5 -5
- package/dist/cjs/{conditionalSlot-096f7053.js → conditionalSlot-3a4fe2dc.js} +3 -3
- package/dist/cjs/{debounce-2cdcf435.js → debounce-408eb927.js} +1 -1
- package/dist/cjs/{dom-0d96f224.js → dom-553866e5.js} +100 -20
- package/dist/cjs/{filter-b111e6bc.js → filter-501e11ad.js} +2 -2
- package/dist/cjs/{floating-ui-e868382e.js → floating-ui-54f4c5a9.js} +365 -281
- package/dist/cjs/{focusTrapComponent-133aa5a6.js → focusTrapComponent-5bcf753e.js} +21 -26
- package/dist/cjs/{form-454d0da7.js → form-bffda67a.js} +4 -7
- package/dist/cjs/{guid-6b7d0d0a.js → guid-6bebe20b.js} +1 -1
- package/dist/cjs/{index-101ebeb8.js → index-16b54251.js} +251 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{interactive-ae2b81e5.js → interactive-9a753e3b.js} +1 -1
- package/dist/cjs/{key-1113b650.js → key-b11206cb.js} +1 -1
- package/dist/cjs/{label-4fa0c613.js → label-06c122f9.js} +2 -2
- package/dist/cjs/{loadable-be936384.js → loadable-03215740.js} +1 -1
- package/dist/cjs/loader.cjs.js +5 -5
- package/dist/cjs/{locale-7871bab2.js → locale-8539ef25.js} +62 -14
- package/dist/cjs/{math-91fa6fed.js → math-acfe02f4.js} +3 -2
- package/dist/cjs/{observers-958f20c2.js → observers-ef9e3899.js} +1 -1
- package/dist/cjs/{openCloseComponent-901d3fd9.js → openCloseComponent-ce345b01.js} +2 -2
- package/dist/cjs/{resources-2b9c8f2b.js → resources-305406be.js} +1 -1
- package/dist/cjs/{resources-dc916f0b.js → resources-379e317d.js} +1 -1
- package/dist/cjs/{resources-320ae0e0.js → resources-9f12de5f.js} +1 -1
- package/dist/cjs/{resources-a6a0d47b.js → resources-b829d4a6.js} +11 -7
- package/dist/cjs/{resources-8d67e54c.js → resources-bd729e69.js} +1 -1
- package/dist/cjs/{resources-e219e503.js → resources-d4657a03.js} +1 -1
- package/dist/cjs/{sortable.esm-8f9a6e42.js → sortable.esm-6dea5d6e.js} +1 -1
- package/dist/cjs/{t9n-75897fe6.js → t9n-64e84ec9.js} +3 -3
- package/dist/cjs/{utils-4bf76b74.js → utils-4aac28db.js} +3 -3
- package/dist/cjs/{utils-3251b332.js → utils-6539bbb0.js} +1 -1
- package/dist/cjs/utils-9af7bb5a.js +49 -0
- package/dist/collection/components/accordion/accordion.css +2 -1
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.css +2 -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.css +3 -4
- package/dist/collection/components/action/action.js +4 -2
- package/dist/collection/components/action/resources.js +1 -1
- package/dist/collection/components/action-bar/action-bar.css +2 -1
- package/dist/collection/components/action-bar/action-bar.js +4 -2
- 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.css +2 -1
- package/dist/collection/components/action-group/action-group.js +3 -37
- package/dist/collection/components/action-group/resources.js +1 -1
- package/dist/collection/components/action-menu/action-menu.css +2 -1
- package/dist/collection/components/action-menu/action-menu.js +4 -2
- package/dist/collection/components/action-menu/resources.js +1 -1
- package/dist/collection/components/action-pad/action-pad.css +2 -1
- package/dist/collection/components/action-pad/action-pad.js +4 -2
- package/dist/collection/components/action-pad/resources.js +1 -1
- package/dist/collection/components/alert/alert.css +2 -1
- package/dist/collection/components/alert/alert.js +7 -3
- package/dist/collection/components/alert/resources.js +1 -1
- package/dist/collection/components/avatar/avatar.css +3 -2
- package/dist/collection/components/avatar/avatar.js +1 -1
- package/dist/collection/components/avatar/utils.js +1 -1
- package/dist/collection/components/block/block.css +77 -2
- 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.css +2 -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.css +2 -1
- package/dist/collection/components/button/button.js +4 -2
- package/dist/collection/components/button/resources.js +1 -1
- package/dist/collection/components/card/card.css +2 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/resources.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +2 -1
- package/dist/collection/components/checkbox/checkbox.js +12 -7
- package/dist/collection/components/chip/chip.css +2 -1
- package/dist/collection/components/chip/chip.js +4 -2
- package/dist/collection/components/chip/resources.js +1 -1
- package/dist/collection/components/color-picker/color-picker.css +2 -1
- package/dist/collection/components/color-picker/color-picker.js +8 -2
- 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.css +2 -1
- package/dist/collection/components/color-picker-hex-input/color-picker-hex-input.js +4 -2
- package/dist/collection/components/color-picker-hex-input/resources.js +1 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.css +2 -1
- package/dist/collection/components/color-picker-swatch/color-picker-swatch.js +1 -1
- package/dist/collection/components/color-picker-swatch/resources.js +1 -1
- package/dist/collection/components/combobox/combobox.css +2 -1
- package/dist/collection/components/combobox/combobox.js +13 -5
- 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.css +2 -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.css +2 -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.css +2 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -36
- 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.css +2 -1
- package/dist/collection/components/date-picker-day/date-picker-day.js +1 -1
- package/dist/collection/components/date-picker-month/date-picker-month.css +2 -1
- package/dist/collection/components/date-picker-month/date-picker-month.js +5 -3
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.css +2 -1
- package/dist/collection/components/date-picker-month-header/date-picker-month-header.js +4 -2
- package/dist/collection/components/date-picker-month-header/resources.js +1 -1
- package/dist/collection/components/dropdown/dropdown.css +2 -1
- package/dist/collection/components/dropdown/dropdown.js +9 -34
- package/dist/collection/components/dropdown/resources.js +1 -1
- package/dist/collection/components/dropdown-group/dropdown-group.css +2 -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.css +2 -1
- package/dist/collection/components/dropdown-item/dropdown-item.js +4 -2
- package/dist/collection/components/dropdown-item/resources.js +1 -1
- package/dist/collection/components/fab/fab.css +2 -1
- package/dist/collection/components/fab/fab.js +5 -3
- package/dist/collection/components/fab/resources.js +1 -1
- package/dist/collection/components/filter/filter.css +2 -1
- package/dist/collection/components/filter/filter.js +5 -4
- package/dist/collection/components/filter/resources.js +1 -1
- package/dist/collection/components/flow/flow.css +2 -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.css +2 -1
- package/dist/collection/components/flow-item/flow-item.js +7 -3
- package/dist/collection/components/flow-item/resources.js +1 -1
- package/dist/collection/components/functional/ExpandToggle.js +4 -2
- package/dist/collection/components/functional/Heading.js +1 -1
- package/dist/collection/components/graph/graph.css +2 -1
- package/dist/collection/components/graph/graph.js +1 -1
- package/dist/collection/components/graph/util.js +1 -1
- package/dist/collection/components/handle/assets/handle/t9n/index.d.ts +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ar.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_bg.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_bs.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ca.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_cs.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_da.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_de.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_el.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_en.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_es.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_et.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_fi.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_fr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_he.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_hr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_hu.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_id.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_it.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ja.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ko.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_lt.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_lv.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_nl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_no.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pt-BR.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_pt-PT.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ro.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_ru.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sk.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sl.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_sv.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_th.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_tr.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_uk.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_vi.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-CN.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-HK.json +3 -0
- package/dist/collection/components/handle/assets/handle/t9n/messages_zh-TW.json +3 -0
- package/dist/collection/components/handle/handle.css +2 -1
- package/dist/collection/components/handle/handle.js +93 -9
- package/dist/collection/components/handle/resources.js +1 -1
- package/dist/collection/components/icon/assets/icon/analysisOverlay16.json +1 -0
- package/dist/collection/components/icon/assets/icon/analysisOverlay24.json +1 -0
- package/dist/collection/components/icon/assets/icon/analysisOverlay32.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem16.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem24.json +1 -0
- package/dist/collection/components/icon/assets/icon/coordinateSystem32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphAxis32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphGuides32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphLineSeries32.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice16.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice24.json +1 -0
- package/dist/collection/components/icon/assets/icon/graphPieSlice32.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer16.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer24.json +1 -0
- package/dist/collection/components/icon/assets/icon/mediaLayer32.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable16.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable24.json +1 -0
- package/dist/collection/components/icon/assets/icon/readOnlyNonEditable32.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea16.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea24.json +1 -0
- package/dist/collection/components/icon/assets/icon/trapezoidArea32.json +1 -0
- package/dist/collection/components/icon/icon.css +2 -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 +17 -12
- package/dist/collection/components/inline-editable/inline-editable.css +2 -1
- package/dist/collection/components/inline-editable/inline-editable.js +11 -5
- package/dist/collection/components/inline-editable/resources.js +1 -1
- package/dist/collection/components/input/input.css +2 -1
- package/dist/collection/components/input/input.js +41 -44
- package/dist/collection/components/input/resources.js +1 -1
- package/dist/collection/components/input-date-picker/input-date-picker.css +2 -1
- package/dist/collection/components/input-date-picker/input-date-picker.js +17 -5
- package/dist/collection/components/input-date-picker/resources.js +1 -1
- package/dist/collection/components/input-message/input-message.css +3 -2
- 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.css +2 -1
- package/dist/collection/components/input-number/input-number.js +34 -25
- package/dist/collection/components/input-number/resources.js +1 -1
- package/dist/collection/components/input-text/input-text.css +2 -1
- package/dist/collection/components/input-text/input-text.js +11 -8
- package/dist/collection/components/input-text/resources.js +1 -1
- package/dist/collection/components/input-time-picker/input-time-picker.css +2 -1
- package/dist/collection/components/input-time-picker/input-time-picker.js +8 -2
- package/dist/collection/components/label/label.css +2 -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.css +2 -1
- package/dist/collection/components/link/link.js +4 -2
- package/dist/collection/components/list/list.css +2 -1
- package/dist/collection/components/list/list.js +20 -18
- package/dist/collection/components/list/resources.js +1 -1
- package/dist/collection/components/list-item/list-item.css +2 -1
- package/dist/collection/components/list-item/list-item.js +13 -5
- 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.css +2 -1
- package/dist/collection/components/list-item-group/list-item-group.js +1 -1
- package/dist/collection/components/list-item-group/resources.js +1 -1
- package/dist/collection/components/loader/loader.css +85 -5
- package/dist/collection/components/loader/loader.js +1 -1
- package/dist/collection/components/modal/modal.css +59 -15
- package/dist/collection/components/modal/modal.js +32 -8
- package/dist/collection/components/modal/resources.js +6 -2
- package/dist/collection/components/notice/notice.css +2 -1
- package/dist/collection/components/notice/notice.js +4 -2
- package/dist/collection/components/notice/resources.js +1 -1
- package/dist/collection/components/option/option.css +2 -1
- package/dist/collection/components/option/option.js +1 -1
- package/dist/collection/components/option-group/option-group.css +2 -1
- package/dist/collection/components/option-group/option-group.js +1 -1
- package/dist/collection/components/pagination/pagination.css +2 -1
- package/dist/collection/components/pagination/pagination.js +1 -27
- package/dist/collection/components/pagination/resources.js +1 -1
- package/dist/collection/components/panel/panel.css +2 -1
- package/dist/collection/components/panel/panel.js +10 -4
- package/dist/collection/components/panel/resources.js +1 -1
- package/dist/collection/components/pick-list/pick-list.css +2 -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 +6 -2
- package/dist/collection/components/pick-list-group/pick-list-group.css +2 -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.css +2 -1
- package/dist/collection/components/pick-list-item/pick-list-item.js +4 -2
- package/dist/collection/components/pick-list-item/resources.js +1 -1
- package/dist/collection/components/popover/PopoverManager.js +1 -1
- package/dist/collection/components/popover/popover.css +2 -1
- package/dist/collection/components/popover/popover.js +10 -4
- package/dist/collection/components/popover/resources.js +1 -1
- package/dist/collection/components/progress/progress.css +77 -2
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/radio-button/radio-button.css +2 -1
- package/dist/collection/components/radio-button/radio-button.js +12 -7
- package/dist/collection/components/radio-button/resources.js +1 -1
- package/dist/collection/components/radio-button-group/radio-button-group.css +2 -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.css +2 -1
- package/dist/collection/components/rating/rating.js +5 -3
- package/dist/collection/components/resources.js +1 -1
- package/dist/collection/components/scrim/resources.js +1 -1
- package/dist/collection/components/scrim/scrim.css +2 -1
- package/dist/collection/components/scrim/scrim.js +1 -1
- package/dist/collection/components/segmented-control/segmented-control.css +2 -1
- package/dist/collection/components/segmented-control/segmented-control.js +2 -2
- package/dist/collection/components/segmented-control-item/resources.js +1 -1
- package/dist/collection/components/segmented-control-item/segmented-control-item.css +2 -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.css +2 -1
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/shell/resources.js +1 -1
- package/dist/collection/components/shell/shell.css +2 -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.css +2 -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.css +2 -1
- package/dist/collection/components/shell-panel/shell-panel.js +7 -3
- package/dist/collection/components/slider/resources.js +1 -1
- package/dist/collection/components/slider/slider.css +19 -17
- package/dist/collection/components/slider/slider.js +42 -16
- package/dist/collection/components/sortable-list/resources.js +1 -1
- package/dist/collection/components/sortable-list/sortable-list.css +2 -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.css +2 -1
- package/dist/collection/components/split-button/split-button.js +1 -38
- package/dist/collection/components/stepper/stepper.css +2 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.css +2 -1
- package/dist/collection/components/stepper-item/stepper-item.js +5 -3
- package/dist/collection/components/switch/switch.css +2 -1
- package/dist/collection/components/switch/switch.js +12 -7
- package/dist/collection/components/tab/tab.css +2 -1
- package/dist/collection/components/tab/tab.js +1 -1
- package/dist/collection/components/tab-nav/tab-nav.css +2 -1
- package/dist/collection/components/tab-nav/tab-nav.js +8 -2
- package/dist/collection/components/tab-title/resources.js +1 -1
- package/dist/collection/components/tab-title/tab-title.css +2 -1
- package/dist/collection/components/tab-title/tab-title.js +4 -2
- package/dist/collection/components/tabs/resources.js +1 -1
- package/dist/collection/components/tabs/tabs.css +2 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tile/resources.js +1 -1
- package/dist/collection/components/tile/tile.css +2 -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.css +2 -1
- package/dist/collection/components/tile-select/tile-select.js +1 -1
- package/dist/collection/components/tile-select-group/tile-select-group.css +2 -1
- package/dist/collection/components/tile-select-group/tile-select-group.js +1 -1
- package/dist/collection/components/time-picker/resources.js +1 -1
- package/dist/collection/components/time-picker/time-picker.css +2 -1
- package/dist/collection/components/time-picker/time-picker.js +13 -5
- package/dist/collection/components/tip/resources.js +1 -1
- package/dist/collection/components/tip/tip.css +2 -1
- package/dist/collection/components/tip/tip.js +1 -1
- package/dist/collection/components/tip-group/tip-group.css +2 -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.css +2 -1
- package/dist/collection/components/tip-manager/tip-manager.js +4 -2
- package/dist/collection/components/tooltip/TooltipManager.js +10 -5
- package/dist/collection/components/tooltip/resources.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +2 -1
- package/dist/collection/components/tooltip/tooltip.js +9 -10
- package/dist/collection/components/tooltip/utils.js +11 -0
- package/dist/collection/components/tree/tree.css +2 -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 +3 -2
- package/dist/collection/components/tree-item/tree-item.css +38 -32
- package/dist/collection/components/tree-item/tree-item.js +8 -4
- 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.css +2 -1
- package/dist/collection/components/value-list/value-list.js +15 -2
- package/dist/collection/components/value-list-item/interfaces.js +1 -0
- package/dist/collection/components/value-list-item/resources.js +1 -1
- package/dist/collection/components/value-list-item/value-list-item.css +2 -1
- package/dist/collection/components/value-list-item/value-list-item.js +29 -4
- package/dist/collection/utils/array.js +1 -1
- package/dist/collection/utils/conditionalSlot.js +1 -1
- package/dist/collection/utils/config.js +1 -1
- package/dist/collection/utils/date.js +1 -1
- package/dist/collection/utils/dom.js +1 -1
- package/dist/collection/utils/filter.js +1 -1
- package/dist/collection/utils/floating-ui/utils.js +45 -0
- package/dist/collection/utils/floating-ui.js +20 -9
- package/dist/collection/utils/focusTrapComponent.js +1 -1
- package/dist/collection/utils/form.js +2 -5
- package/dist/collection/utils/globalAttributes.js +1 -1
- package/dist/collection/utils/globalScript.js +1 -1
- package/dist/collection/utils/guid.js +1 -1
- package/dist/collection/utils/interactive.js +1 -1
- package/dist/collection/utils/key.js +1 -1
- package/dist/collection/utils/label.js +1 -1
- package/dist/collection/utils/loadable.js +1 -1
- package/dist/collection/utils/locale.js +1 -1
- package/dist/collection/utils/math.js +3 -2
- package/dist/collection/utils/mode.js +1 -1
- package/dist/collection/utils/number.js +58 -11
- 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 +4 -2
- package/dist/components/Heading.js +1 -1
- package/dist/components/action-group.js +3 -19
- package/dist/components/action-menu.js +5 -3
- package/dist/components/action.js +5 -3
- package/dist/components/array.js +1 -1
- package/dist/components/button.js +5 -3
- package/dist/components/calcite-accordion-item.js +2 -2
- package/dist/components/calcite-accordion.js +2 -2
- package/dist/components/calcite-action-bar.js +5 -3
- package/dist/components/calcite-action-group.js +1 -1
- package/dist/components/calcite-action-menu.js +1 -1
- package/dist/components/calcite-action-pad.js +5 -3
- package/dist/components/calcite-action.js +1 -1
- package/dist/components/calcite-alert.js +8 -4
- package/dist/components/calcite-avatar.js +2 -2
- package/dist/components/calcite-block-section.js +2 -2
- package/dist/components/calcite-block.js +2 -2
- package/dist/components/calcite-button.js +1 -1
- package/dist/components/calcite-card.js +2 -2
- package/dist/components/calcite-checkbox.js +1 -1
- package/dist/components/calcite-chip.js +1 -1
- package/dist/components/calcite-color-picker-hex-input.js +1 -1
- package/dist/components/calcite-color-picker-swatch.js +1 -1
- package/dist/components/calcite-color-picker.js +9 -3
- package/dist/components/calcite-combobox-item-group.js +2 -2
- package/dist/components/calcite-combobox-item.js +2 -2
- package/dist/components/calcite-combobox.js +14 -6
- 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 +2 -2
- package/dist/components/calcite-dropdown-item.js +5 -3
- package/dist/components/calcite-dropdown.js +1 -1
- package/dist/components/calcite-fab.js +6 -4
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +8 -4
- package/dist/components/calcite-flow.js +2 -2
- 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 +12 -6
- package/dist/components/calcite-input-date-picker.js +18 -6
- package/dist/components/calcite-input-message.js +2 -2
- package/dist/components/calcite-input-number.js +35 -26
- package/dist/components/calcite-input-text.js +12 -9
- package/dist/components/calcite-input-time-picker.js +9 -3
- 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 +2 -2
- package/dist/components/calcite-list-item.js +14 -6
- package/dist/components/calcite-list.js +21 -19
- package/dist/components/calcite-loader.js +1 -1
- package/dist/components/calcite-modal.js +36 -10
- package/dist/components/calcite-notice.js +5 -3
- package/dist/components/calcite-option-group.js +2 -2
- package/dist/components/calcite-option.js +2 -2
- package/dist/components/calcite-pagination.js +2 -13
- package/dist/components/calcite-panel.js +1 -1
- package/dist/components/calcite-pick-list-group.js +2 -2
- package/dist/components/calcite-pick-list-item.js +1 -1
- package/dist/components/calcite-pick-list.js +2 -2
- package/dist/components/calcite-popover.js +1 -1
- package/dist/components/calcite-progress.js +1 -1
- package/dist/components/calcite-radio-button-group.js +2 -2
- package/dist/components/calcite-radio-button.js +13 -8
- package/dist/components/calcite-rating.js +6 -4
- package/dist/components/calcite-scrim.js +1 -1
- package/dist/components/calcite-segmented-control-item.js +2 -2
- package/dist/components/calcite-segmented-control.js +2 -2
- package/dist/components/calcite-select.js +6 -4
- package/dist/components/calcite-shell-center-row.js +2 -2
- package/dist/components/calcite-shell-panel.js +8 -4
- package/dist/components/calcite-shell.js +2 -2
- package/dist/components/calcite-slider.js +43 -17
- package/dist/components/calcite-sortable-list.js +2 -2
- package/dist/components/calcite-split-button.js +3 -21
- package/dist/components/calcite-stepper-item.js +6 -4
- package/dist/components/calcite-stepper.js +2 -2
- package/dist/components/calcite-switch.js +1 -1
- package/dist/components/calcite-tab-nav.js +1 -1
- package/dist/components/calcite-tab-title.js +1 -1
- package/dist/components/calcite-tab.js +1 -1
- package/dist/components/calcite-tabs.js +1 -1
- package/dist/components/calcite-tile-select-group.js +2 -2
- package/dist/components/calcite-tile-select.js +2 -2
- package/dist/components/calcite-tile.js +1 -1
- package/dist/components/calcite-time-picker.js +1 -1
- package/dist/components/calcite-tip-group.js +2 -2
- package/dist/components/calcite-tip-manager.js +5 -3
- package/dist/components/calcite-tip.js +2 -2
- package/dist/components/calcite-tooltip.js +1 -1
- package/dist/components/calcite-tree-item.js +11 -6
- package/dist/components/calcite-tree.js +2 -2
- package/dist/components/calcite-value-list-item.js +8 -5
- package/dist/components/calcite-value-list.js +11 -4
- package/dist/components/checkbox.js +13 -8
- package/dist/components/chip.js +5 -3
- package/dist/components/color-picker-hex-input.js +5 -3
- package/dist/components/color-picker-swatch.js +2 -2
- package/dist/components/conditionalSlot.js +1 -1
- package/dist/components/date-picker-day.js +2 -2
- package/dist/components/date-picker-month-header.js +5 -3
- package/dist/components/date-picker-month.js +6 -4
- package/dist/components/date-picker.js +3 -19
- package/dist/components/date.js +1 -1
- package/dist/components/debounce.js +1 -1
- package/dist/components/dom.js +98 -18
- package/dist/components/dropdown.js +10 -20
- package/dist/components/filter.js +6 -5
- package/dist/components/filter2.js +1 -1
- package/dist/components/floating-ui.js +364 -279
- package/dist/components/focusTrapComponent.js +20 -25
- package/dist/components/form.js +2 -5
- package/dist/components/graph.js +2 -2
- package/dist/components/guid.js +1 -1
- package/dist/components/handle.js +39 -7
- package/dist/components/icon.js +18 -13
- package/dist/components/index.js +1 -1
- package/dist/components/input.js +42 -45
- package/dist/components/interactive.js +1 -1
- package/dist/components/key.js +1 -1
- package/dist/components/label.js +2 -2
- package/dist/components/label2.js +1 -1
- package/dist/components/link.js +5 -3
- package/dist/components/loadable.js +1 -1
- package/dist/components/loader.js +2 -2
- package/dist/components/locale.js +59 -12
- package/dist/components/math.js +3 -2
- package/dist/components/observers.js +1 -1
- package/dist/components/openCloseComponent.js +1 -1
- package/dist/components/panel.js +11 -5
- package/dist/components/pick-list-item.js +5 -3
- package/dist/components/popover.js +11 -5
- package/dist/components/progress.js +2 -2
- 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 +2 -2
- package/dist/components/shared-list-render.js +7 -3
- package/dist/components/sortable.esm.js +1 -1
- package/dist/components/switch.js +13 -8
- package/dist/components/t9n.js +1 -1
- package/dist/components/tab-nav.js +9 -3
- package/dist/components/tab-title.js +5 -3
- package/dist/components/tab.js +2 -2
- package/dist/components/tabs.js +2 -2
- package/dist/components/tile.js +2 -2
- package/dist/components/time-picker.js +14 -6
- package/dist/components/tooltip.js +23 -15
- 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 +47 -0
- package/dist/esm/{ExpandToggle-414f7b66.js → ExpandToggle-4727adf8.js} +8 -6
- package/dist/esm/{Heading-84086ab0.js → Heading-3bac0cfa.js} +2 -2
- package/dist/esm/{app-globals-b5c8ff3d.js → app-globals-74d44d89.js} +2 -2
- package/dist/esm/{array-bf7de305.js → array-6fd99808.js} +1 -1
- package/dist/esm/calcite-accordion_2.entry.js +9 -9
- package/dist/esm/calcite-action-bar.entry.js +19 -17
- package/dist/esm/calcite-action-group.entry.js +13 -28
- package/dist/esm/calcite-action-menu.entry.js +13 -11
- package/dist/esm/calcite-action-pad.entry.js +18 -16
- package/dist/esm/calcite-action.entry.js +15 -13
- package/dist/esm/calcite-alert.entry.js +19 -15
- package/dist/esm/calcite-avatar.entry.js +7 -7
- package/dist/esm/calcite-block_2.entry.js +14 -14
- package/dist/esm/calcite-button.entry.js +17 -15
- package/dist/esm/calcite-card.entry.js +11 -11
- package/dist/esm/calcite-checkbox.entry.js +22 -17
- package/dist/esm/calcite-chip.entry.js +15 -13
- package/dist/esm/calcite-color-picker_3.entry.js +27 -19
- package/dist/esm/calcite-combobox_3.entry.js +33 -25
- package/dist/esm/calcite-date-picker_4.entry.js +23 -34
- package/dist/esm/calcite-dropdown_3.entry.js +26 -32
- package/dist/esm/calcite-fab.entry.js +12 -10
- package/dist/esm/calcite-filter.entry.js +18 -17
- package/dist/esm/calcite-flow-item.entry.js +19 -15
- package/dist/esm/calcite-flow.entry.js +4 -4
- package/dist/esm/calcite-graph_2.entry.js +55 -29
- package/dist/esm/calcite-handle.entry.js +41 -11
- package/dist/esm/calcite-icon.entry.js +23 -18
- package/dist/esm/calcite-inline-editable.entry.js +23 -17
- package/dist/esm/calcite-input-date-picker.entry.js +33 -21
- package/dist/esm/calcite-input-message.entry.js +6 -6
- package/dist/esm/calcite-input-number.entry.js +46 -37
- package/dist/esm/calcite-input-text.entry.js +24 -21
- package/dist/esm/calcite-input-time-picker_2.entry.js +34 -20
- package/dist/esm/calcite-input.entry.js +53 -56
- package/dist/esm/calcite-label.entry.js +7 -7
- package/dist/esm/calcite-link.entry.js +11 -9
- package/dist/esm/calcite-list_3.entry.js +43 -33
- package/dist/esm/calcite-loader.entry.js +4 -4
- package/dist/esm/calcite-modal.entry.js +45 -21
- package/dist/esm/calcite-notice.entry.js +16 -14
- package/dist/esm/calcite-option_3.entry.js +16 -14
- package/dist/esm/calcite-pagination.entry.js +10 -20
- package/dist/esm/calcite-panel.entry.js +24 -18
- package/dist/esm/calcite-pick-list_3.entry.js +22 -20
- package/dist/esm/calcite-popover.entry.js +25 -19
- package/dist/esm/calcite-progress.entry.js +3 -3
- package/dist/esm/calcite-radio-button-group.entry.js +4 -4
- package/dist/esm/calcite-radio-button.entry.js +22 -17
- package/dist/esm/calcite-rating.entry.js +18 -16
- package/dist/esm/calcite-scrim.entry.js +10 -10
- package/dist/esm/calcite-segmented-control_2.entry.js +11 -11
- package/dist/esm/calcite-shell_3.entry.js +20 -16
- package/dist/esm/calcite-sortable-list.entry.js +6 -6
- package/dist/esm/calcite-split-button.entry.js +4 -21
- package/dist/esm/calcite-stepper_2.entry.js +16 -14
- package/dist/esm/calcite-switch.entry.js +22 -17
- package/dist/esm/calcite-tab_4.entry.js +21 -13
- package/dist/esm/calcite-tile-select_2.entry.js +7 -7
- package/dist/esm/calcite-tile.entry.js +9 -9
- package/dist/esm/calcite-tip_3.entry.js +17 -15
- package/dist/esm/calcite-tooltip.entry.js +29 -21
- package/dist/esm/calcite-tree_2.entry.js +20 -15
- package/dist/esm/calcite-value-list_2.entry.js +32 -22
- package/dist/esm/calcite.js +5 -5
- package/dist/esm/{conditionalSlot-ae0dd61c.js → conditionalSlot-03f34e10.js} +3 -3
- package/dist/esm/{debounce-189d5dea.js → debounce-f893dc12.js} +1 -1
- package/dist/esm/{dom-78b18cb9.js → dom-13d14bf1.js} +100 -20
- package/dist/esm/{filter-e6512b85.js → filter-e9b22c1c.js} +2 -2
- package/dist/esm/{floating-ui-0d6ec2b2.js → floating-ui-1d9078ac.js} +366 -281
- package/dist/esm/{focusTrapComponent-4aa7d5d9.js → focusTrapComponent-d8df0d61.js} +21 -26
- package/dist/esm/{form-e328ec3a.js → form-948b3633.js} +4 -7
- package/dist/esm/{guid-64b3949a.js → guid-7a9e307b.js} +1 -1
- package/dist/esm/{index-9cf36d00.js → index-b8735a76.js} +251 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/{interactive-d51bcec3.js → interactive-7c601b75.js} +1 -1
- package/dist/esm/{key-a234775a.js → key-4f8ab7a0.js} +1 -1
- package/dist/esm/{label-563cd240.js → label-84c0027e.js} +2 -2
- package/dist/esm/{loadable-5922f388.js → loadable-eacac1b0.js} +1 -1
- package/dist/esm/loader.js +5 -5
- package/dist/esm/{locale-bbb2ebf7.js → locale-e71d40b1.js} +62 -15
- package/dist/esm/{math-02026e26.js → math-bad59c37.js} +3 -2
- package/dist/esm/{observers-839e1444.js → observers-f268ee68.js} +1 -1
- package/dist/esm/{openCloseComponent-98481985.js → openCloseComponent-ec590820.js} +2 -2
- package/dist/esm/{resources-7229c9aa.js → resources-2537ff53.js} +1 -1
- package/dist/esm/{resources-e5970a41.js → resources-455d50da.js} +11 -7
- package/dist/esm/{resources-0e1235ca.js → resources-4c7e12d7.js} +1 -1
- package/dist/esm/{resources-743bbf4e.js → resources-6efb094b.js} +1 -1
- package/dist/esm/{resources-586c9301.js → resources-8032eb01.js} +1 -1
- package/dist/esm/{resources-0d118882.js → resources-8ee51466.js} +1 -1
- package/dist/esm/{sortable.esm-77d6f29b.js → sortable.esm-ad7263e5.js} +1 -1
- package/dist/esm/{t9n-754b0fb8.js → t9n-df463c97.js} +3 -3
- package/dist/esm/{utils-d4d4185c.js → utils-4755b12f.js} +3 -3
- package/dist/esm/utils-9b472a57.js +47 -0
- package/dist/esm/{utils-3599eaa5.js → utils-e9181006.js} +1 -1
- package/dist/extras/docs-json.json +43 -66
- package/dist/extras/vscode-data.json +1 -1
- package/dist/loader/cdn.js +1 -1
- package/dist/loader/index.cjs.js +1 -1
- package/dist/loader/index.es2017.js +1 -1
- package/dist/loader/index.js +1 -1
- package/dist/types/components/action-group/action-group.d.ts +1 -5
- package/dist/types/components/checkbox/checkbox.d.ts +1 -0
- package/dist/types/components/date-picker/date-picker.d.ts +1 -5
- package/dist/types/components/dropdown/dropdown.d.ts +1 -5
- package/dist/types/components/handle/assets/handle/t9n/index.d.ts +3 -0
- package/dist/types/components/handle/handle.d.ts +21 -3
- package/dist/types/components/icon/utils.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/input-number/input-number.d.ts +2 -1
- package/dist/types/components/modal/modal.d.ts +8 -0
- package/dist/types/components/modal/resources.d.ts +5 -1
- package/dist/types/components/pagination/pagination.d.ts +1 -5
- package/dist/types/components/radio-button/radio-button.d.ts +1 -0
- package/dist/types/components/segmented-control/segmented-control.d.ts +1 -1
- package/dist/types/components/split-button/split-button.d.ts +1 -6
- package/dist/types/components/switch/switch.d.ts +1 -0
- package/dist/types/components/tooltip/tooltip.d.ts +0 -1
- package/dist/types/components/tooltip/utils.d.ts +2 -0
- package/dist/types/components/tree-item/resources.d.ts +1 -0
- package/dist/types/components/value-list/value-list.d.ts +2 -0
- package/dist/types/components/value-list-item/interfaces.d.ts +4 -0
- package/dist/types/components/value-list-item/value-list-item.d.ts +6 -0
- package/dist/types/components.d.ts +23 -29
- package/dist/types/preact.d.ts +2 -1
- package/dist/types/utils/floating-ui/utils.d.ts +4 -0
- package/dist/types/utils/number.d.ts +14 -6
- package/hydrate/index.js +1099 -711
- package/package.json +19 -20
- package/readme.md +2 -2
- package/dist/calcite/p-00aaee4e.entry.js +0 -6
- package/dist/calcite/p-028df927.entry.js +0 -6
- package/dist/calcite/p-06b480ca.js +0 -6
- package/dist/calcite/p-085432f2.entry.js +0 -6
- package/dist/calcite/p-0b3db293.entry.js +0 -6
- package/dist/calcite/p-0df64c24.entry.js +0 -6
- package/dist/calcite/p-1a0b1b58.entry.js +0 -6
- package/dist/calcite/p-22876cde.entry.js +0 -6
- package/dist/calcite/p-26ca50af.entry.js +0 -6
- package/dist/calcite/p-371a9b25.js +0 -6
- package/dist/calcite/p-375aa8c5.entry.js +0 -6
- package/dist/calcite/p-3809dc43.entry.js +0 -6
- package/dist/calcite/p-3bf7891d.js +0 -6
- package/dist/calcite/p-3c0e3f7f.js +0 -10
- package/dist/calcite/p-4237e0a1.entry.js +0 -6
- package/dist/calcite/p-4318c033.entry.js +0 -6
- package/dist/calcite/p-5aa021f0.entry.js +0 -6
- package/dist/calcite/p-609edb26.entry.js +0 -6
- package/dist/calcite/p-65e6a718.entry.js +0 -6
- package/dist/calcite/p-698f8148.entry.js +0 -6
- package/dist/calcite/p-6a98931b.entry.js +0 -6
- package/dist/calcite/p-6ea72871.entry.js +0 -6
- package/dist/calcite/p-74301242.entry.js +0 -6
- package/dist/calcite/p-76f9d7e3.entry.js +0 -6
- package/dist/calcite/p-819f44b8.entry.js +0 -6
- package/dist/calcite/p-88b36d52.entry.js +0 -6
- package/dist/calcite/p-89eff9a5.entry.js +0 -6
- package/dist/calcite/p-9182f791.entry.js +0 -6
- package/dist/calcite/p-93262a30.entry.js +0 -6
- package/dist/calcite/p-96aa3e0a.entry.js +0 -6
- package/dist/calcite/p-9b7daa41.entry.js +0 -6
- package/dist/calcite/p-9c2f54a4.js +0 -6
- package/dist/calcite/p-a89528a5.entry.js +0 -6
- package/dist/calcite/p-bcf5419a.entry.js +0 -6
- package/dist/calcite/p-c0571703.entry.js +0 -6
- package/dist/calcite/p-c2e55866.js +0 -6
- package/dist/calcite/p-c41f36fa.entry.js +0 -6
- package/dist/calcite/p-c4ab60b0.js +0 -10
- package/dist/calcite/p-ca009796.entry.js +0 -6
- package/dist/calcite/p-ca8c0e97.entry.js +0 -6
- package/dist/calcite/p-d37321dc.entry.js +0 -6
- package/dist/calcite/p-d7098e62.entry.js +0 -6
- package/dist/calcite/p-d85ede55.entry.js +0 -6
- package/dist/calcite/p-d9461bd7.entry.js +0 -6
- package/dist/calcite/p-dab743a0.entry.js +0 -6
- package/dist/calcite/p-db3067be.js +0 -6
- package/dist/calcite/p-e5e13c12.entry.js +0 -6
- package/dist/calcite/p-ec14b352.entry.js +0 -6
- package/dist/calcite/p-ece7e6e5.entry.js +0 -6
- package/dist/calcite/p-f1ee4f0c.entry.js +0 -6
- package/dist/calcite/p-f8c9e6f5.entry.js +0 -6
- package/dist/calcite/p-f9367f73.entry.js +0 -6
- package/dist/calcite/p-fa867df2.js +0 -6
- package/dist/calcite/p-fda1dd03.entry.js +0 -6
- package/dist/cjs/nonChromiumPlatformUtils-fc704952.js +0 -506
- package/dist/collection/utils/floating-ui/nonChromiumPlatformUtils.js +0 -496
- package/dist/components/nonChromiumPlatformUtils.js +0 -498
- package/dist/esm/nonChromiumPlatformUtils-37df43f5.js +0 -502
- package/dist/types/utils/floating-ui/nonChromiumPlatformUtils.d.ts +0 -15
|
@@ -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.1.0
|
|
4
|
+
* v1.1.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-95affd38.js";import{h as e,g as n}from"./p-b4c2f2ce.js";import{u as c}from"./p-b90df3dd.js";import{c as o,d as r,g as l}from"./p-7f1192e2.js";import{s as h,a as d,c as p}from"./p-bb1240f3.js";import{c as m,d as b}from"./p-b33dc129.js";import{c as u}from"./p-f510244b.js";import{c as f,s as g,d as y,u as v}from"./p-145b7cdc.js";import"./p-c097b143.js";import"./p-44e65dab.js";import"./p-32d3d2c6.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}
|
|
@@ -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.1.0
|
|
5
|
+
*/
|
|
6
|
+
import{r as i,c as t,h as a,H as e,g as o}from"./p-95affd38.js";import{g as s}from"./p-fda34bfd.js";import{b as n,f as r,t as c}from"./p-b4c2f2ce.js";import{c as d,d as h,H as l}from"./p-43215088.js";import{g as u}from"./p-c097b143.js";import{u as m}from"./p-b90df3dd.js";import{c as p,d as f,g as b}from"./p-7f1192e2.js";import{c as v,s as k,a as g}from"./p-bb1240f3.js";import"./p-44e65dab.js";const w=class{constructor(a){i(this,a),this.calciteInternalRadioButtonBlur=t(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=t(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=t(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=t(this,"calciteInternalRadioButtonFocus",6),this.selectItem=(i,t)=>{i[t].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((i=>i.name===this.name)),this.isDefaultSelectable=()=>{const i=this.queryButtons();return!i.some((i=>i.checked))&&i[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=i=>{this.containerEl=i},this.handleKeyDown=i=>{const{key:t}=i,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(t))return;if(" "===t)return this.check(),void i.preventDefault();let e=t;"rtl"===n(a)&&("ArrowRight"===t&&(e="ArrowLeft"),"ArrowLeft"===t&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((i=>i.name===this.name));let r=0;const c=o.length;switch(o.some(((i,t)=>{if(i.checked)return r=t,!0})),e){case"ArrowLeft":case"ArrowUp":return i.preventDefault(),void this.selectItem(o,s(Math.max(r-1,-1),c));case"ArrowRight":case"ArrowDown":return i.preventDefault(),void this.selectItem(o,s(r+1,c));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())},this.checked=!1,this.disabled=!1,this.focused=!1,this.guid=void 0,this.hidden=!1,this.hovered=!1,this.label=void 0,this.name=void 0,this.required=!1,this.scale="m",this.value=void 0}checkedChanged(i){i&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){await v(this),this.disabled||r(this.containerEl)}syncHiddenFormInput(i){i.type="radio"}onLabelClick(i){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const t=i.currentTarget,a=t.for?this.rootNode.querySelector(`calcite-radio-button[id="${t.for}"]`):t.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const i=this.queryButtons().filter((i=>i.checked));if(i?.length>1){const t=i[i.length-1];i.filter((i=>i!==t)).forEach((i=>{i.checked=!1,i.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((i=>{i.checked&&(i.checked=!1,i.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((i=>i.guid!==this.guid)).forEach((i=>{i.checked&&(i.checked=!1,i.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${u()}`,this.name&&this.checkLastRadioButton(),p(this),d(this)}componentWillLoad(){k(this)}componentDidLoad(){g(this),this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){f(this),h(this)}componentDidRender(){m(this)}render(){const i=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":c(this.checked),"aria-label":b(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,role:"radio",tabIndex:i,ref:this.setContainerEl},a("div",{class:"radio"})),a(l,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};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;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';export{w as calcite_radio_button}
|
|
@@ -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.1.0
|
|
5
|
+
*/
|
|
6
|
+
import{r as i,c as t,h as e,H as a,g as s}from"./p-95affd38.js";import{f as n}from"./p-9a811534.js";import{v as o,i as c,t as l,h as r,g as h}from"./p-b4c2f2ce.js";import{d as m,f as d,c as p,u as b,r as u,a as f,F as g}from"./p-5e2b13eb.js";import{s as x,c as v,a as y,d as w,H as C}from"./p-43215088.js";import{g as k}from"./p-c097b143.js";import{u as z}from"./p-b90df3dd.js";import{c as I,d as O,g as _}from"./p-7f1192e2.js";import{c as D,s as E,a as H}from"./p-bb1240f3.js";import{c as M,d as B}from"./p-b33dc129.js";import{c as A}from"./p-f510244b.js";import{c as T,d as j}from"./p-75651de9.js";import{c as L,s as $,d as P,u as R}from"./p-145b7cdc.js";import{d as F}from"./p-6293ed16.js";import{c as X,d as S}from"./p-31cf383e.js";import"./p-44e65dab.js";import"./p-32d3d2c6.js";const U="CALCITE-COMBOBOX-ITEM, CALCITE-COMBOBOX-ITEM-GROUP";function G(i){const t=i.parentElement?.closest(U),e=t?.parentElement?.closest(U);return[t,e].filter((i=>i))}function W(i){return i.ancestors?.filter((i=>"CALCITE-COMBOBOX-ITEM"===i.nodeName))||[]}function Y(i){return o(i.querySelectorAll("calcite-combobox-item")).filter((i=>i.selected)).length>0}function K(i){return document.evaluate("ancestor::calcite-combobox-item",i,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,null).snapshotLength}const N=class{constructor(e){i(this,e),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipClose=t(this,"calciteComboboxChipClose",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.placement=m,this.internalValueChangeFlag=!1,this.textInput=null,this.mutationObserver=A("mutation",(()=>this.updateItems())),this.resizeObserver=A("resize",(()=>this.setMaxScrollerHeight())),this.guid=k(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?d(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>i?.value?.toString()));return i?.length?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.filteredItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||x(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const a=this.getMaxScrollerHeight();i.style.maxHeight=a>0?`${a}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipCloseHandler=i=>{this.open=!1;const t=this.items.find((t=>t===i));t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,p(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,p(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>"CALCITE-COMBOBOX-ITEM-GROUP"===i.tagName?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return F((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const a=!i(t,e);t.hidden=a;const[s,n]=t.ancestors;(i(s,e)||i(n,e))&&(t.hidden=!1),a||t.ancestors.forEach((i=>i.hidden=!1))})),this.filteredItems=this.getfilteredItems(),this.calciteComboboxFilterChange.emit()}),100)})(),this.internalComboboxChangeEvent=()=>{this.calciteComboboxChange.emit()},this.emitComboboxChange=F(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.filteredItems=this.getfilteredItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.filteredItems[this.activeItemIndex];if(!i)return;const t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:a}=this.listContainerEl;e+a<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<a&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{this.textInput?.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)},this.open=!1,this.disabled=!1,this.label=void 0,this.placeholder=void 0,this.placeholderIcon=void 0,this.placeholderIconFlipRtl=!1,this.maxItems=0,this.name=void 0,this.allowCustomValues=void 0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multiple",this.scale="m",this.value=null,this.flipPlacements=void 0,this.messages=void 0,this.messageOverrides=void 0,this.selectedItems=[],this.filteredItems=[],this.items=[],this.groupItems=[],this.needsIcon=void 0,this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.effectiveLocale=void 0,this.defaultMessages=void 0}openHandler(i){i||b(this.floatingEl),this.disabled?this.open=!1:this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}onMessagesChange(){}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}documentClickHandler(i){c(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.filteredItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:a,overlayPositioning:s,filteredFlipPlacements:n}=this;return u(this,{floatingEl:t,referenceEl:e,overlayPositioning:s,placement:a,flipPlacements:n,type:"menu"},i)}async setFocus(){await D(this),this.textInput?.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){M(this),L(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),I(this),v(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.open&&this.openHandler(this.open)}async componentWillLoad(){E(this),this.updateItems(),await $(this)}componentDidLoad(){y(this,this.getValue()),this.reposition(!0),H(this)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),z(this)}disconnectedCallback(){this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),O(this),w(this),f(this,this.referenceEl,this.floatingEl),j(this),B(this),P(this)}textHandler(){this.updateActiveItemIndex(-1)}effectiveLocaleChange(){R(this,this.effectiveLocale)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,a=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(a+=t,e++)}})),a}calculateSingleItemHeight(i){if(!i)return;let t=i.offsetHeight;return Array.from(i.querySelectorAll(U)).map((i=>i?.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=W(i),e=function(i){return o(i.querySelectorAll("calcite-combobox-item"))}(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{Y(i)||(i.selected=!1)})))}getfilteredItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!Y(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),a=this.selectedItems.indexOf(t);return e>-1&&a>-1?e-a:a-e}))}getData(){return this.items.map((i=>({filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll("CALCITE-COMBOBOX-ITEM")).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll("CALCITE-COMBOBOX-ITEM-GROUP"))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement("CALCITE-COMBOBOX-ITEM");e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){const i=this.selectedItems[this.activeChipIndex]?.guid;(i?this.referenceEl.querySelector(`#combobox-chip-${i}`):null)?.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.filteredItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){this.activeItemIndex=i;let t=null;this.filteredItems.forEach(((e,a)=>{a===i?(e.active=!0,t=`combobox-item-${e.guid}`):e.active=!1})),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:a,messages:s}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...W(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==a?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,closable:!0,icon:n.icon,iconFlipRtl:n.iconFlipRtl,id:n.guid?`combobox-chip-${n.guid}`:null,key:n.textLabel,messageOverrides:{dismissLabel:s.removeTag},onCalciteChipClose:()=>this.calciteChipCloseHandler(n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,disabled:t,placeholder:a,selectionMode:s,selectedItems:n,open:o}=this,c="single"===s,l=n[0],r=!o&&c&&!!l;return e("span",{class:{"input-wrap":!0,"input-wrap--single":c}},r&&e("span",{class:{label:!0,"label--icon":!!l?.icon},key:"label"},l.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`combobox-listbox-${i}`,"aria-label":_(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":r,"input--icon":!!this.placeholderIcon},disabled:t,id:`combobox-input-${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,type:"text",ref:i=>this.textInput=i}))}renderListBoxOptions(){return this.filteredItems.map((i=>e("li",{"aria-selected":l(i.selected),id:i.guid?`combobox-item-${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{setFloatingEl:i,setContainerEl:t,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a},ref:i},e("div",{class:{"list-container":!0,[g.animation]:!0,[g.animationActive]:a},ref:t},e("ul",{class:{list:!0,"list--hide":!a}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:a,placeholderIconFlipRtl:s}=this,n=i[0],o=n?.icon,c="single"===a;return(!this.open&&n?!!o&&c:!!this.placeholderIcon&&(!n||c))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",flipRtl:this.open&&n?n.iconFlipRtl:s,icon:!this.open&&n?o:t,scale:"s"}))}renderIconEnd(){const{open:i}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i?"chevron-up":"chevron-down",scale:"s"}))}render(){const{guid:i,label:t,open:s}=this,n="single"===this.selectionMode;return e(a,{onClick:this.comboboxFocusHandler},e("div",{"aria-autocomplete":"list","aria-controls":`combobox-listbox-${i}`,"aria-expanded":l(s),"aria-haspopup":"listbox","aria-label":_(this),"aria-live":"polite","aria-owns":`combobox-listbox-${i}`,class:{wrapper:!0,"wrapper--single":n||!this.selectedItems.length,"wrapper--active":s},onClick:this.clickHandler,onKeyDown:this.keydownHandler,role:"combobox",ref:this.setReferenceEl},e("div",{class:"grid-input"},this.renderIconStart(),!n&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`combobox-input-${i}`,id:`combobox-label-${i}`},t),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`combobox-label-${i}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`combobox-listbox-${i}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e(C,{component:this}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}static get watchers(){return{open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],messageOverrides:["onMessagesChange"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"],effectiveLocale:["effectiveLocaleChange"]}}};N.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:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{--calcite-floating-ui-z-index:600;display:block;position:absolute;z-index:var(--calcite-floating-ui-z-index);visibility:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;transform:translate(0)}.floating-ui-container--active{visibility:visible}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{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}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const V=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.toggleSelected()},this.disabled=!1,this.selected=!1,this.active=!1,this.ancestors=void 0,this.guid=k(),this.icon=void 0,this.iconFlipRtl=!1,this.textLabel=void 0,this.value=void 0,this.filterDisabled=void 0}selectedWatchHandler(){this.calciteComboboxItemChange.emit()}connectedCallback(){this.ancestors=G(this.el),this.scale=r(this.el,"scale",this.scale),X(this)}disconnectedCallback(){S(this)}componentDidRender(){z(this)}toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){return this.icon?e("calcite-icon",{class:{"icon--custom":!!this.icon,"icon--active":this.icon&&this.selected,"icon--indent":!0},flipRtl:this.iconFlipRtl,icon:this.icon||i,key:"icon",scale:"l"===this.scale?"m":"s"}):null}renderSelectIndicator(i,t){return i?e("span",{class:{icon:!0,"icon--dot":!0,"icon--indent":!0}}):e("calcite-icon",{class:{icon:!0,"icon--active":this.selected,"icon--indent":!0},flipRtl:this.iconFlipRtl,icon:t,key:"indicator",scale:"l"===this.scale?"m":"s"})}renderChildren(){return h(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===r(this.el,"selection-mode","multiple"),t=i&&!this.disabled,s=this.disabled?"circle-disallowed":i?"dot":"check",n={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},o=K(this.el);return e(a,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${o}`}},e("li",{class:n,id:this.guid,onClick:this.itemClickHandler},this.renderSelectIndicator(t,s),this.renderIcon(s),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return s(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};V.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--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)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem;--calcite-combobox-item-selector-icon-size:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem;--calcite-combobox-item-selector-icon-size:1rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.625rem;--calcite-combobox-item-spacing-indent:1rem;--calcite-combobox-item-selector-icon-size:1.5rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{margin-block-start:-1px;padding-inline-start:var(--calcite-combobox-item-spacing-unit-l);color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:center;min-inline-size:var(--calcite-combobox-item-selector-icon-size)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const q=class{constructor(t){i(this,t),this.guid=k(),this.scale="m",this.ancestors=void 0,this.label=void 0}connectedCallback(){this.ancestors=G(this.el),this.scale=r(this.el,"scale",this.scale)}render(){const{el:i,scale:t}=this,a=`label--indent-${K(i)}`;return e("ul",{"aria-labelledby":this.guid,class:{list:!0,[`scale--${t}`]:!0},role:"group"},e("li",{class:{label:!0,[a]:!0},id:this.guid,role:"presentation"},e("span",{class:"title"},this.label)),e("slot",null))}get el(){return s(this)}};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}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent-1:0.5rem;--calcite-combobox-item-spacing-indent-2:1rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent-1:0.75rem;--calcite-combobox-item-spacing-indent-2:1.5rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent-1:1rem;--calcite-combobox-item-spacing-indent-2:2rem}:host,.list{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),.list:focus{outline:2px solid transparent;outline-offset:2px}.label{box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:0px;max-inline-size:100%;color:var(--calcite-ui-text-3)}.label--indent-1{padding-inline-start:var(--calcite-combobox-item-spacing-indent-1)}.label--indent-2{padding-inline-start:var(--calcite-combobox-item-spacing-indent-2)}.title{border:0 solid;display:block;flex:1 1 0%;border-block-end-width:1px;font-weight:var(--calcite-font-weight-bold);color:var(--calcite-ui-text-2);word-wrap:break-word;word-break:break-word;border-block-end-color:var(--calcite-ui-border-3);padding-block:var(--calcite-combobox-item-spacing-unit-l);padding-inline:var(--calcite-combobox-item-spacing-unit-s)}";export{N as calcite_combobox,V as calcite_combobox_item,q as calcite_combobox_item_group}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
|
4
|
-
* v1.1.0
|
|
4
|
+
* v1.1.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as i,h as t,H as a,g as e}from"./p-
|
|
6
|
+
import{r as i,h as t,H as a,g as e}from"./p-95affd38.js";import{d as n,h as c}from"./p-b4c2f2ce.js";import"./p-c097b143.js";import"./p-44e65dab.js";var s;!function(i){i.valid="check-circle",i.invalid="exclamation-mark-triangle",i.idle="information"}(s||(s={}));const o=class{constructor(t){i(this,t),this.icon=void 0,this.iconFlipRtl=!1,this.scale="m",this.status="idle"}handleIconEl(){this.requestedIcon=n(s,this.icon,this.status)}connectedCallback(){this.scale=c(this.el,"scale",this.scale),this.requestedIcon=n(s,this.icon,this.status)}render(){return t(a,{"calcite-hydrated-hidden":this.el.hidden},this.renderIcon(this.requestedIcon),t("slot",null))}renderIcon(i){if(i)return t("calcite-icon",{class:"calcite-input-message-icon",flipRtl:this.iconFlipRtl,icon:i,scale:"s"})}get el(){return e(this)}static get watchers(){return{status:["handleIconEl"],icon:["handleIconEl"]}}};o.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([scale=m]),:host([scale=l]){--calcite-input-message-spacing-value:0.25rem}:host{visibility:hidden;box-sizing:border-box;display:flex;block-size:0px;inline-size:100%;align-items:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1);visibility:visible;block-size:auto;opacity:1;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([scale=m]),:host([scale=l]){margin-block-start:var(--calcite-input-message-spacing-value)}.calcite-input-message-icon{pointer-events:none;display:inline-flex;flex-shrink:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;margin-inline-end:0.5rem}:host([status=invalid]) .calcite-input-message-icon{color:var(--calcite-ui-danger)}:host([status=warning]) .calcite-input-message-icon{color:var(--calcite-ui-warning)}:host([status=valid]) .calcite-input-message-icon{color:var(--calcite-ui-success)}:host([status=idle]) .calcite-input-message-icon{color:var(--calcite-ui-brand)}:host([status]){color:var(--calcite-ui-text-1)}:host([status][scale=s]){font-size:var(--calcite-font-size--3);line-height:0.75rem}:host([status][scale=m]){margin-block-start:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([status][scale=l]){margin-block-start:0.25rem;font-size:var(--calcite-font-size--1);line-height:1rem}";export{o as calcite_input_message}
|
|
@@ -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.1.0
|
|
4
|
+
* v1.1.0
|
|
5
5
|
*/
|
|
6
|
-
import{r as t,c as e,h as i,g as n}from"./p-51c09654.js";import{i as a,b as s,f as r,e as o}from"./p-3c0e3f7f.js";import{n as l,C as c,p as h,c as u,i as d,a as m,r as f,b as p}from"./p-d8f305f9.js";import{u as g}from"./p-c45ca041.js";import{i as b}from"./p-8061aecd.js";import{c as y,s as v,a as w}from"./p-63ab7d7a.js";import{c as k,d as x}from"./p-db3067be.js";import{c as M}from"./p-371a9b25.js";import{u as C,s as j,c as z,d as D}from"./p-06b480ca.js";import{d as F,i as A}from"./p-0f8d9c80.js";import"./p-b93df4a3.js";import"./p-ce1ac637.js";import"./p-abd69d92.js";function S(t,e,i){return t(i={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O=S((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],s=0,r=t.length;s<r;s++){var o=t[s];(n=o)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,i.call(o)):a.push(o)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),q=S((function(t){var e=Object.hasOwnProperty,i={};for(var n in _)e.call(_,n)&&(i[_[n]]=n);var a=t.exports={to:{},get:{}};function s(t,e,i){return Math.min(Math.max(e,t),i)}function r(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,i;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),i="hsl";break;case"hwb":e=a.get.hwb(t),i="hwb";break;default:e=a.get.rgb(t),i="rgb"}return e?{model:i,value:e}:null},a.get.rgb=function(t){if(!t)return null;var i,n,a,r=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],n=0;n<3;n++){var o=2*n;r[n]=parseInt(i.slice(o,o+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],n=0;n<3;n++)r[n]=parseInt(i[n]+i[n],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(i[n+1],0);i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:e.call(_,i[1])?((r=_[i[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)r[n]=s(r[n],0,255);return r[3]=s(r[3],0,1),r},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=O(arguments);return"#"+r(t[0])+r(t[1])+r(t[2])+(t[3]<1?r(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=O(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=O(arguments),e=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+i+"%, "+n+"%)":"rgba("+e+"%, "+i+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(){var t=O(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=O(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return i[t.slice(0,3)]}})),$={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const I={};for(const t of Object.keys($))I[$[t]]=t;const E={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var L=E;for(const t of Object.keys(E)){if(!("channels"in E[t]))throw new Error("missing channels property: "+t);if(!("labels"in E[t]))throw new Error("missing channel labels property: "+t);if(E[t].labels.length!==E[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=E[t];delete E[t].channels,delete E[t].labels,Object.defineProperty(E[t],"channels",{value:e}),Object.defineProperty(E[t],"labels",{value:i})}function N(t,e){return function(i){return e(t(i))}}function K(t,e){const i=[e[t].parent,t];let n=L[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=N(L[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}E.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),s=Math.max(e,i,n),r=s-a;let o,l;s===a?o=0:e===s?o=(i-n)/r:i===s?o=2+(n-e)/r:n===s&&(o=4+(e-i)/r),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+s)/2;return l=s===a?0:c<=.5?r/(s+a):r/(2-s-a),[o,100*l,100*c]},E.rgb.hsv=function(t){let e,i,n,a,s;const r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(r,o,l),h=c-Math.min(r,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,s=0):(s=h/c,e=u(r),i=u(o),n=u(l),r===c?a=n-i:o===c?a=1/3+e-n:l===c&&(a=2/3+i-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*s,100*c]},E.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*s,100*n]},E.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(1-e,1-i,1-n);return[100*((1-e-a)/(1-a)||0),100*((1-i-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},E.rgb.keyword=function(t){const e=I[t];if(e)return e;let i,n=1/0;for(const e of Object.keys($)){const r=((a=t)[0]-(s=$[e])[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2;r<n&&(n=r,i=e)}var a,s;return i},E.keyword.rgb=function(t){return $[t]},E.rgb.xyz=function(t){let e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},E.rgb.lab=function(t){const e=E.rgb.xyz(t);let i=e[0],n=e[1],a=e[2];return i/=95.047,n/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*n-16,500*(i-n),200*(n-a)]},E.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,s,r;if(0===i)return r=255*n,[r,r,r];a=n<.5?n*(1+i):n+i-n*i;const o=2*n-a,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,r=6*s<1?o+6*(a-o)*s:2*s<1?a:3*s<2?o+(a-o)*(2/3-s)*6:o,l[t]=255*r;return l},E.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const s=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=s<=1?s:2-s,[e,100*(0===n?2*a/(s+a):2*i/(n+i)),(n+i)/2*100]},E.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,s=e-Math.floor(e),r=255*n*(1-i),o=255*n*(1-i*s),l=255*n*(1-i*(1-s));switch(n*=255,a){case 0:return[n,l,r];case 1:return[o,n,r];case 2:return[r,n,l];case 3:return[r,o,n];case 4:return[l,r,n];case 5:return[n,r,o]}},E.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let s,r;r=(2-i)*n;const o=(2-i)*a;return s=i*a,s/=o<=1?o:2-o,s=s||0,r/=2,[e,100*s,100*r]},E.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let s;a>1&&(i/=a,n/=a);const r=Math.floor(6*e),o=1-n;s=6*e-r,0!=(1&r)&&(s=1-s);const l=i+s*(o-i);let c,h,u;switch(r){default:case 6:case 0:c=o,h=l,u=i;break;case 1:c=l,h=o,u=i;break;case 2:c=i,h=o,u=l;break;case 3:c=i,h=l,u=o;break;case 4:c=l,h=i,u=o;break;case 5:c=o,h=i,u=l}return[255*c,255*h,255*u]},E.cmyk.rgb=function(t){const e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},E.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,s,r;return a=3.2406*e+-1.5372*i+-.4986*n,s=-.9689*e+1.8758*i+.0415*n,r=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*a,255*s,255*r]},E.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];return e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(e-i),200*(i-n)]},E.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const a=i**3,s=e**3,r=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},E.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let a;return a=360*Math.atan2(n,i)/2/Math.PI,a<0&&(a+=360),[e,Math.sqrt(i*i+n*n),a]},E.lch.lab=function(t){const e=t[1],i=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(i),e*Math.sin(i)]},E.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let s=null===e?E.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let r=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===s&&(r+=60),r},E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])},E.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},E.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},E.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},E.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},E.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},E.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,i),n),s=Math.min(Math.min(e,i),n),r=a-s;let o,l;return o=r<1?s/(1-r):0,l=r<=0?0:a===e?(i-n)/r%6:a===i?2+(n-e)/r:4+(e-i)/r,l/=6,l%=1,[360*l,100*r,100*o]},E.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let a=0;return n<1&&(a=(i-.5*n)/(1-n)),[t[0],100*n,100*a]},E.hsv.hcg=function(t){const e=t[2]/100,i=t[1]/100*e;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.hcg.rgb=function(t){const e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];const n=[0,0,0],a=t[0]/360%1*6,s=a%1,r=1-s;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=r,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=r,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=r}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},E.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},E.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},E.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},E.hwb.hcg=function(t){const e=1-t[2]/100,i=e-t[1]/100;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},E.gray.hsl=function(t){return[0,0,t[0]]},E.gray.hsv=E.gray.hsl,E.gray.hwb=function(t){return[0,100,t[0]]},E.gray.cmyk=function(t){return[0,0,0,t[0]]},E.gray.lab=function(t){return[t[0],0,0]},E.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},E.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const P={};Object.keys(L).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:L[t].channels}),Object.defineProperty(P[t],"labels",{value:L[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(L);for(let i=e.length,n=0;n<i;n++)t[e[n]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;){const t=i.pop(),n=Object.keys(L[t]);for(let a=n.length,s=0;s<a;s++){const a=n[s],r=e[a];-1===r.distance&&(r.distance=e[t].distance+1,r.parent=t,i.unshift(a))}}return e}(t),i={},n=Object.keys(e);for(let t=n.length,a=0;a<t;a++){const t=n[a];null!==e[t].parent&&(i[t]=K(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];P[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(n),P[t][i].raw=function(t){const e=function(...e){const i=e[0];return null==i?i:(i.length>1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var U=P;const T=["keyword","gray","hex"],H={};for(const t of Object.keys(U))H[[...U[t].labels].sort().join("")]=t;const V={};function J(t,e){if(!(this instanceof J))return new J(t,e);if(e&&e in T&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof J)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=q.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=U[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=U[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=X(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in H))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=H[n];const{labels:a}=U[this.model],s=[];for(i=0;i<a.length;i++)s.push(t[a[i]]);this.color=X(s)}if(V[this.model])for(n=U[this.model].channels,i=0;i<n;i++){const t=V[this.model][i];t&&(this.color[i]=t(this.color[i]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}J.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in q.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to[e.model](i)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=U[this.model],{labels:i}=U[this.model];for(let n=0;n<e;n++)t[i[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new J([...this.color.map(R(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new J([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:W("rgb",0,B(255)),green:W("rgb",1,B(255)),blue:W("rgb",2,B(255)),hue:W(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:W("hsl",1,B(100)),lightness:W("hsl",2,B(100)),saturationv:W("hsv",1,B(100)),value:W("hsv",2,B(100)),chroma:W("hcg",1,B(100)),gray:W("hcg",2,B(100)),white:W("hwb",1,B(100)),wblack:W("hwb",2,B(100)),cyan:W("cmyk",0,B(100)),magenta:W("cmyk",1,B(100)),yellow:W("cmyk",2,B(100)),black:W("cmyk",3,B(100)),x:W("xyz",0,B(95.047)),y:W("xyz",1,B(100)),z:W("xyz",2,B(108.833)),l:W("lab",0,B(100)),a:W("lab",1),b:W("lab",2),keyword(t){return void 0!==t?new J(t):U[this.model].keyword(this.color)},hex(t){return void 0!==t?new J(t):q.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new J(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),q.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return J.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,s=2*a-1,r=i.alpha()-n.alpha(),o=((s*r==-1?s:(s+r)/(1+s*r))+1)/2,l=1-o;return J.rgb(o*i.red()+l*n.red(),o*i.green()+l*n.green(),o*i.blue()+l*n.blue(),i.alpha()*a+n.alpha()*(1-a))}};for(const t of Object.keys(U)){if(T.includes(t))continue;const{channels:e}=U[t];J.prototype[t]=function(...e){return this.model===t?new J(this):new J(e.length>0?e:[...(i=U[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},J[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=X(i,e)),new J(n,t)}}function R(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(V[n]||(V[n]=[]))[e]=i;return t=t[0],function(n){let a;return void 0!==n?(i&&(n=i(n)),a=this[t](),a.color[e]=n,a):(a=this[t]().color[e],i&&(a=i(a)),a)}}function B(t){return function(e){return Math.max(0,Math.min(t,e))}}function X(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var Y=J;const G=Y("#007AC2"),Q={r:255,g:255,b:255},Z={h:360,s:100,v:100},tt={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}},et=l(G.hex()),it=class{constructor(n){var r,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:e}=t,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[e]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===e||"ArrowUp"===e?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[e].x||0,this.colorFieldScopeTop+i[e].y||0,!1))},this.handleHueScopeKeyDown=t=>{const e=t.shiftKey?10:1,{key:i}=t,n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[i]){t.preventDefault();const a=n[i]*e,s=this.baseColorFieldColor.hue(),r=this.baseColorFieldColor.hue(s+a);this.internalColorSet(r,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:e,color:i}=this,n=t.target.value;!e||n?n!==(i&&l(i.hex()))&&this.internalColorSet(Y(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(Y(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n="rgb"===this.channelMode?Q[Object.keys(Q)[i]]:Z[Object.keys(Z)[i]];let a;if(this.allowEmpty&&!e.value)a="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;a=M(t,0,n).toString()}e.value=a,e.internalSyncChildElValue()},this.handleChannelChange=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n=[...this.channels];if(this.allowEmpty&&!e.value)return this.channels=[null,null,null],void this.internalColorSet(null);n[i]=Number(e.value),this.updateColorFromChannels(n)},this.handleSavedColorKeyDown=t=>{b(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{if(!a(t))return;const{offsetX:e,offsetY:i}=t,n=this.getCanvasRegion(i);"color-field"===n?(this.hueThumbState="drag",this.captureColorFieldColor(e,i),this.colorFieldScopeNode?.focus()):"slider"===n&&(this.sliderThumbState="drag",this.captureHueSliderColor(e),this.hueScopeNode?.focus()),t.preventDefault(),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!a(t))return;const e="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),e&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:e,dimensions:i}=this,n="drag"===this.hueThumbState;if(!e.isConnected||"drag"!==this.sliderThumbState&&!n)return;let a,s;const r=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-r.x,s=l-r.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<r.x+t&&o>r.x?o-r.x:o<r.x?0:t-1,s=l<r.y+e+n&&l>r.y?l-r.y:l<r.y?0:e+n}n?this.captureColorFieldColor(a,s,!1):this.captureHueSliderColor(a)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:e})=>{const{dimensions:{colorField:i,slider:n,thumb:a}}=this;this.colorFieldAndSliderInteractive=e<=i.height+n.height,this.colorFieldAndSliderHovered=!0;const s=this.getCanvasRegion(e);if("color-field"===s){const n=this.hueThumbState,s=this.baseColorFieldColor.hsv(),r=Math.round(s.saturationv()/(Z.s/i.width)),o=Math.round(i.height-s.value()/(Z.v/i.height)),l=this.containsPoint(t,e,r,o,a.radius);let c=!1;"idle"===n&&l?(this.hueThumbState="hover",c=!0):"hover"!==n||l||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===s){const s=this.baseColorFieldColor.hsv().saturationv(100).value(100),r=this.sliderThumbState,o=Math.round(s.hue()/(360/n.width)),l=Math.round((n.height+this.getSliderCapSpacing())/2)+i.height,c=this.containsPoint(t,e,o,l,a.radius);let h=!1;"idle"===r&&c?(this.sliderThumbState="hover",h=!0):"hover"!==r||c||(this.sliderThumbState="idle",h=!0),"drag"!==this.sliderThumbState&&h&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:e,messages:n}=this;return i("calcite-tab-title",{class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate,selected:t===e},"rgb"===t?n.rgb:n.hsv)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,messages:a}=this,r=t===e,o="rgb"===t,l=o?[a.r,a.g,a.b]:[a.h,a.s,a.v],c=o?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],h=s(this.el);return i("calcite-tab",{class:"control",key:t,selected:r},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,l[e],c[e],h)))))},this.renderChannel=(t,e,n,a,s)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:s,label:a,lang:this.effectiveLocale,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:n,scale:"l"===this.scale?"m":"s",type:"number",value:t?.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const e=this.savedColors.filter((e=>e!==t));this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const e=[...this.savedColors,t];this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.drawColorFieldAndSlider=(r=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,A(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),F(r,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,s=Math.round(Z.s/a*t),r=Math.round(Z.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(r),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)},this.allowEmpty=!1,this.color=G,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.scale="m",this.storageId=void 0,this.messageOverrides=void 0,this.numberingSystem=void 0,this.value=et,this.defaultMessages=void 0,this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(G),this.dimensions=tt.m,this.effectiveLocale="",this.messages=void 0,this.savedColors=[],this.colorFieldScopeTop=void 0,this.colorFieldScopeLeft=void 0,this.scopeOrientation=void 0,this.hueScopeLeft=void 0,this.hueScopeTop=void 0}handleColorChange(t,e){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=e}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){this.updateDimensions(t),this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas)}onMessagesChange(){}handleValueChange(t,e){const{allowEmpty:i,format:n}=this;let a=!1;if(!i||t){const i=h(t);if(!i||"auto"!==n&&i!==n)return this.showIncompatibleColorWarning(t,n),void(this.value=e);a=this.mode!==i,this.setMode(i)}const s="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(s||this.calciteColorPickerChange.emit());const r=i&&!t?null:Y(t),o=!u(r,this.color);(a||o)&&this.internalColorSet(r,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||G}effectiveLocaleChange(){C(this,this.effectiveLocale)}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>t.classList?.contains("channel"))))return;const{shiftKey:i}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===e&&i?9:"ArrowDown"===e&&i?-9:0}async setFocus(){await y(this),this.el.focus()}async componentWillLoad(){v(this);const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,s=h(n),r=a||"auto"===i&&s||i===s,o=a?null:r?Y(n):e;r||this.showIncompatibleColorWarning(n,i),this.setMode(i),this.internalColorSet(o,!1,"initial"),this.updateDimensions(this.scale);const l=`calcite-color-${this.storageId}`;this.storageId&&localStorage.getItem(l)&&(this.savedColors=JSON.parse(localStorage.getItem(l))),await j(this)}connectedCallback(){k(this),z(this)}componentDidLoad(){w(this)}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler),x(this),D(this)}componentDidRender(){g(this)}render(){const{allowEmpty:t,color:e,messages:n,hideHex:a,hideChannels:s,hideSaved:r,savedColors:o,scale:l}=this,c=e?e.hex():null,h="l"===l?"m":"s",{colorFieldAndSliderInteractive:u,colorFieldScopeTop:d,colorFieldScopeLeft:m,hueScopeLeft:f,hueScopeTop:p,scopeOrientation:g,dimensions:{colorField:{height:b,width:y},slider:{height:v}}}=this,w=p??v/2+b,k=f??y*G.hue()/Z.h,x=null===e,M="vertical"===g;return i("div",{class:"container"},i("div",{class:"color-field-and-slider-wrap"},i("canvas",{class:{"color-field-and-slider":!0,"color-field-and-slider--interactive":u},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":M?n.value:n.saturation,"aria-valuemax":M?Z.v:Z.s,"aria-valuemin":"0","aria-valuenow":(M?e?.saturationv():e?.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,ref:this.storeColorFieldScope,role:"slider",style:{top:`${d||0}px`,left:`${m||0}px`},tabindex:"0"}),i("div",{"aria-label":n.hue,"aria-valuemax":Z.h,"aria-valuemin":"0","aria-valuenow":e?.round().hue()||G.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,ref:this.storeHueScope,role:"slider",style:{top:`${w}px`,left:`${k}px`},tabindex:"0"})),a&&s?null:i("div",{class:{"control-section":!0,section:!0}},a?null:i("div",{class:"color-hex-options"},i("span",{class:{header:!0,"header--hex":!0}},n.hex),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",hexLabel:n.hex,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:h,value:c})),s?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:h},i("calcite-tab-nav",{slot:"title-group"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),r?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,n.saved),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",disabled:x,iconStart:"minus",kind:"neutral",label:n.deleteColor,onClick:this.deleteColor,scale:h,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",disabled:x,iconStart:"plus",kind:"neutral",label:n.saveColor,onClick:this.saveColor,scale:h,type:"button"}))),o.length>0?i("div",{class:"saved-colors"},[...o.map((t=>i("calcite-color-picker-swatch",{active:c===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:l,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,e){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${e})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:e}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/e*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:e},slider:{height:i}}}=this;return t<=e?"color-field":t<=e+i?"slider":"none"}internalColorSet(t,e=!0,i="user-interaction"){e&&u(t,this.color)||(this.internalColorUpdateContext=i,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,e=this.mode){if(!t)return null;if(e.includes("hex"))return l(t.round().hex());if(e.includes("-css"))return t[e.replace("-css","").replace("a","")]().round().string();const i=t[e]().round().object();return e.endsWith("a")&&(i.a=i.alpha,delete i.alpha),i}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:e}}}=this;return 2*e-t}updateDimensions(t="m"){this.dimensions=tt[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e,width:i}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,i,e);const n=t.createLinearGradient(0,0,i,0);n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,i,e);const a=t.createLinearGradient(0,0,0,e);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=a,t.fillRect(0,0,i,e),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:e,width:i}){const n=window.devicePixelRatio||1;t.width=i*n,t.height=e*n,t.style.height=`${e}px`,t.style.width=`${i}px`,t.getContext("2d").scale(n,n)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,e,i,n,a){return Math.pow(t-i,2)+Math.pow(e-n,2)<=Math.pow(a,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const e=t.hsv(),{dimensions:{colorField:{height:i,width:n},thumb:{radius:a}}}=this,s=e.saturationv()/(Z.s/n),r=i-e.value()/(Z.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=r})),this.drawThumb(this.fieldAndSliderRenderingContext,a,s,r,e,this.hueThumbState)}drawThumb(t,e,i,n,a,s){const r=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,r),t.shadowBlur="hover"===s?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===s?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,r),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=a.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const e=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:i},slider:{height:n,width:a},thumb:{radius:s}}}=this,r=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=r,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,s,r,o,e,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e},slider:{height:i,width:n}}}=this,a=t.createLinearGradient(0,0,n,0),s=["red","yellow","lime","cyan","blue","magenta","red"],r=1/(s.length-1);let o=0;s.forEach((t=>{a.addColorStop(o,Y(t).string()),o+=r})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(Y(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:e}=this;return t[e]().array().map((t=>Math.floor(t)))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],messageOverrides:["onMessagesChange"],value:["handleValueChange"],effectiveLocale:["effectiveLocaleChange"]}}};it.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}}: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:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;margin-block-end:4px}:host([scale=s]) .channel:last-child{margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{pointer-events:none;position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:16px}.color-field-and-slider{margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";const nt=Y(),at=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,e=t.value,i=`#${e}`;this.allowEmpty&&!e||d(i)&&m(i)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(f(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t},this.hexLabel="Hex",this.allowEmpty=!1,this.scale="m",this.value=l(nt.hex()),this.numberingSystem=void 0,this.internalColor=nt}connectedCallback(){const{allowEmpty:t,value:e}=this;if(e){const t=l(e);d(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}componentWillLoad(){v(this)}componentDidLoad(){w(this)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:s,value:r}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return r?(this.internalSetValue(l(this.nudgeRGBChannels(s,(a?10:1)*("ArrowUp"===o?1:-1)).hex()),c),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,c),void t.preventDefault());const h=e||i||n,u=1===o.length,d=p.test(o);!u||h||d||t.preventDefault()}onPaste(t){const e=t.clipboardData.getData("text");d(e)&&(t.preventDefault(),this.inputNode.value=e.slice(1))}render(){const{value:t}=this,e=this.formatForInternalInput(t);return i("div",{class:"container"},i("calcite-input",{class:"input",label:this.hexLabel,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",ref:this.storeInputRef,scale:this.scale,value:e}),e?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${e}`,scale:this.scale}):null)}async setFocus(){await y(this),r(this.inputNode)}internalSetValue(t,e,i=!0){if(t){const e=l(t);if(d(e)){const{internalColor:t}=this,n=!t||e!==l(t.hex());return this.internalColor=Y(e),this.previousNonNullValue=e,this.value=e,void(n&&i&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(i&&this.calciteColorPickerHexInputChange.emit());this.value=e}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,e){return Y.rgb(t.array().map((t=>t+e)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};at.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}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{display:block}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";const st=class{constructor(e){t(this,e),this.active=!1,this.color=void 0,this.scale="m"}handleColorChange(t){this.internalColor=Y(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",s=n.hex(),r="light"===o(e)?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.15)";return i("svg",{class:"swatch",xmlns:"http://www.w3.org/2000/svg"},i("title",null,s),i("rect",{fill:s,height:"100%",id:"swatch",rx:a,stroke:r,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};st.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}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing);--calcite-floating-ui-z-index:600}:host([hidden]){display:none}:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:visible;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{position:absolute;inset:0px;block-size:100%;inline-size:100%}";export{it as calcite_color_picker,at as calcite_color_picker_hex_input,st as calcite_color_picker_swatch}
|
|
6
|
+
import{r as t,c as e,h as i,g as n}from"./p-95affd38.js";import{i as a,b as s,f as r,e as o}from"./p-b4c2f2ce.js";import{n as l,C as c,p as h,c as u,i as d,a as m,r as f,b as p}from"./p-6cc03406.js";import{u as g}from"./p-b90df3dd.js";import{i as b}from"./p-32d3d2c6.js";import{c as y,s as v,a as w}from"./p-bb1240f3.js";import{c as k,d as x}from"./p-b33dc129.js";import{c as M}from"./p-443e7495.js";import{u as C,s as j,c as z,d as D}from"./p-145b7cdc.js";import{d as F,i as A}from"./p-6293ed16.js";import"./p-c097b143.js";import"./p-44e65dab.js";import"./p-f510244b.js";function S(t,e,i){return t(i={path:e,exports:{},require:function(){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}},i.exports),i.exports}var _={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},O=S((function(t){var e=Array.prototype.concat,i=Array.prototype.slice,n=t.exports=function(t){for(var n,a=[],s=0,r=t.length;s<r;s++){var o=t[s];(n=o)&&"string"!=typeof n&&(n instanceof Array||Array.isArray(n)||n.length>=0&&(n.splice instanceof Function||Object.getOwnPropertyDescriptor(n,n.length-1)&&"String"!==n.constructor.name))?a=e.call(a,i.call(o)):a.push(o)}return a};n.wrap=function(t){return function(){return t(n(arguments))}}})),q=S((function(t){var e=Object.hasOwnProperty,i={};for(var n in _)e.call(_,n)&&(i[_[n]]=n);var a=t.exports={to:{},get:{}};function s(t,e,i){return Math.min(Math.max(e,t),i)}function r(t){var e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}a.get=function(t){var e,i;switch(t.substring(0,3).toLowerCase()){case"hsl":e=a.get.hsl(t),i="hsl";break;case"hwb":e=a.get.hwb(t),i="hwb";break;default:e=a.get.rgb(t),i="rgb"}return e?{model:i,value:e}:null},a.get.rgb=function(t){if(!t)return null;var i,n,a,r=[0,0,0,1];if(i=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(a=i[2],i=i[1],n=0;n<3;n++){var o=2*n;r[n]=parseInt(i.slice(o,o+2),16)}a&&(r[3]=parseInt(a,16)/255)}else if(i=t.match(/^#([a-f0-9]{3,4})$/i)){for(a=(i=i[1])[3],n=0;n<3;n++)r[n]=parseInt(i[n]+i[n],16);a&&(r[3]=parseInt(a+a,16)/255)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)r[n]=parseInt(i[n+1],0);i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}else{if(!(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(i=t.match(/^(\w+)$/))?"transparent"===i[1]?[0,0,0,0]:e.call(_,i[1])?((r=_[i[1]])[3]=1,r):null:null;for(n=0;n<3;n++)r[n]=Math.round(2.55*parseFloat(i[n+1]));i[4]&&(r[3]=i[5]?.01*parseFloat(i[4]):parseFloat(i[4]))}for(n=0;n<3;n++)r[n]=s(r[n],0,255);return r[3]=s(r[3],0,1),r},a.get.hsl=function(t){if(!t)return null;var e=t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.get.hwb=function(t){if(!t)return null;var e=t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(e){var i=parseFloat(e[4]);return[(parseFloat(e[1])%360+360)%360,s(parseFloat(e[2]),0,100),s(parseFloat(e[3]),0,100),s(isNaN(i)?1:i,0,1)]}return null},a.to.hex=function(){var t=O(arguments);return"#"+r(t[0])+r(t[1])+r(t[2])+(t[3]<1?r(Math.round(255*t[3])):"")},a.to.rgb=function(){var t=O(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},a.to.rgb.percent=function(){var t=O(arguments),e=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),n=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+i+"%, "+n+"%)":"rgba("+e+"%, "+i+"%, "+n+"%, "+t[3]+")"},a.to.hsl=function(){var t=O(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},a.to.hwb=function(){var t=O(arguments),e="";return t.length>=4&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},a.to.keyword=function(t){return i[t.slice(0,3)]}})),$={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const I={};for(const t of Object.keys($))I[$[t]]=t;const E={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var L=E;for(const t of Object.keys(E)){if(!("channels"in E[t]))throw new Error("missing channels property: "+t);if(!("labels"in E[t]))throw new Error("missing channel labels property: "+t);if(E[t].labels.length!==E[t].channels)throw new Error("channel and label counts mismatch: "+t);const{channels:e,labels:i}=E[t];delete E[t].channels,delete E[t].labels,Object.defineProperty(E[t],"channels",{value:e}),Object.defineProperty(E[t],"labels",{value:i})}function N(t,e){return function(i){return e(t(i))}}function K(t,e){const i=[e[t].parent,t];let n=L[e[t].parent][t],a=e[t].parent;for(;e[a].parent;)i.unshift(e[a].parent),n=N(L[e[a].parent][a],n),a=e[a].parent;return n.conversion=i,n}E.rgb.hsl=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(e,i,n),s=Math.max(e,i,n),r=s-a;let o,l;s===a?o=0:e===s?o=(i-n)/r:i===s?o=2+(n-e)/r:n===s&&(o=4+(e-i)/r),o=Math.min(60*o,360),o<0&&(o+=360);const c=(a+s)/2;return l=s===a?0:c<=.5?r/(s+a):r/(2-s-a),[o,100*l,100*c]},E.rgb.hsv=function(t){let e,i,n,a,s;const r=t[0]/255,o=t[1]/255,l=t[2]/255,c=Math.max(r,o,l),h=c-Math.min(r,o,l),u=function(t){return(c-t)/6/h+.5};return 0===h?(a=0,s=0):(s=h/c,e=u(r),i=u(o),n=u(l),r===c?a=n-i:o===c?a=1/3+e-n:l===c&&(a=2/3+i-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*s,100*c]},E.rgb.hwb=function(t){const e=t[0],i=t[1];let n=t[2];const a=E.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(i,n));return n=1-1/255*Math.max(e,Math.max(i,n)),[a,100*s,100*n]},E.rgb.cmyk=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.min(1-e,1-i,1-n);return[100*((1-e-a)/(1-a)||0),100*((1-i-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},E.rgb.keyword=function(t){const e=I[t];if(e)return e;let i,n=1/0;for(const e of Object.keys($)){const r=((a=t)[0]-(s=$[e])[0])**2+(a[1]-s[1])**2+(a[2]-s[2])**2;r<n&&(n=r,i=e)}var a,s;return i},E.keyword.rgb=function(t){return $[t]},E.rgb.xyz=function(t){let e=t[0]/255,i=t[1]/255,n=t[2]/255;return e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,[100*(.4124*e+.3576*i+.1805*n),100*(.2126*e+.7152*i+.0722*n),100*(.0193*e+.1192*i+.9505*n)]},E.rgb.lab=function(t){const e=E.rgb.xyz(t);let i=e[0],n=e[1],a=e[2];return i/=95.047,n/=100,a/=108.883,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,[116*n-16,500*(i-n),200*(n-a)]},E.hsl.rgb=function(t){const e=t[0]/360,i=t[1]/100,n=t[2]/100;let a,s,r;if(0===i)return r=255*n,[r,r,r];a=n<.5?n*(1+i):n+i-n*i;const o=2*n-a,l=[0,0,0];for(let t=0;t<3;t++)s=e+1/3*-(t-1),s<0&&s++,s>1&&s--,r=6*s<1?o+6*(a-o)*s:2*s<1?a:3*s<2?o+(a-o)*(2/3-s)*6:o,l[t]=255*r;return l},E.hsl.hsv=function(t){const e=t[0];let i=t[1]/100,n=t[2]/100,a=i;const s=Math.max(n,.01);return n*=2,i*=n<=1?n:2-n,a*=s<=1?s:2-s,[e,100*(0===n?2*a/(s+a):2*i/(n+i)),(n+i)/2*100]},E.hsv.rgb=function(t){const e=t[0]/60,i=t[1]/100;let n=t[2]/100;const a=Math.floor(e)%6,s=e-Math.floor(e),r=255*n*(1-i),o=255*n*(1-i*s),l=255*n*(1-i*(1-s));switch(n*=255,a){case 0:return[n,l,r];case 1:return[o,n,r];case 2:return[r,n,l];case 3:return[r,o,n];case 4:return[l,r,n];case 5:return[n,r,o]}},E.hsv.hsl=function(t){const e=t[0],i=t[1]/100,n=t[2]/100,a=Math.max(n,.01);let s,r;r=(2-i)*n;const o=(2-i)*a;return s=i*a,s/=o<=1?o:2-o,s=s||0,r/=2,[e,100*s,100*r]},E.hwb.rgb=function(t){const e=t[0]/360;let i=t[1]/100,n=t[2]/100;const a=i+n;let s;a>1&&(i/=a,n/=a);const r=Math.floor(6*e),o=1-n;s=6*e-r,0!=(1&r)&&(s=1-s);const l=i+s*(o-i);let c,h,u;switch(r){default:case 6:case 0:c=o,h=l,u=i;break;case 1:c=l,h=o,u=i;break;case 2:c=i,h=o,u=l;break;case 3:c=i,h=l,u=o;break;case 4:c=l,h=i,u=o;break;case 5:c=o,h=i,u=l}return[255*c,255*h,255*u]},E.cmyk.rgb=function(t){const e=t[1]/100,i=t[2]/100,n=t[3]/100;return[255*(1-Math.min(1,t[0]/100*(1-n)+n)),255*(1-Math.min(1,e*(1-n)+n)),255*(1-Math.min(1,i*(1-n)+n))]},E.xyz.rgb=function(t){const e=t[0]/100,i=t[1]/100,n=t[2]/100;let a,s,r;return a=3.2406*e+-1.5372*i+-.4986*n,s=-.9689*e+1.8758*i+.0415*n,r=.0557*e+-.204*i+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),r=Math.min(Math.max(0,r),1),[255*a,255*s,255*r]},E.xyz.lab=function(t){let e=t[0],i=t[1],n=t[2];return e/=95.047,i/=100,n/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,[116*i-16,500*(e-i),200*(i-n)]},E.lab.xyz=function(t){let e,i,n;i=(t[0]+16)/116,e=t[1]/500+i,n=i-t[2]/200;const a=i**3,s=e**3,r=n**3;return i=a>.008856?a:(i-16/116)/7.787,e=s>.008856?s:(e-16/116)/7.787,n=r>.008856?r:(n-16/116)/7.787,e*=95.047,i*=100,n*=108.883,[e,i,n]},E.lab.lch=function(t){const e=t[0],i=t[1],n=t[2];let a;return a=360*Math.atan2(n,i)/2/Math.PI,a<0&&(a+=360),[e,Math.sqrt(i*i+n*n),a]},E.lch.lab=function(t){const e=t[1],i=t[2]/360*2*Math.PI;return[t[0],e*Math.cos(i),e*Math.sin(i)]},E.rgb.ansi16=function(t,e=null){const[i,n,a]=t;let s=null===e?E.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),0===s)return 30;let r=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(i/255));return 2===s&&(r+=60),r},E.hsv.ansi16=function(t){return E.rgb.ansi16(E.hsv.rgb(t),t[2])},E.rgb.ansi256=function(t){const e=t[0],i=t[1],n=t[2];return e===i&&i===n?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(i/255*5)+Math.round(n/255*5)},E.ansi16.rgb=function(t){let e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];const i=.5*(1+~~(t>50));return[(1&e)*i*255,(e>>1&1)*i*255,(e>>2&1)*i*255]},E.ansi256.rgb=function(t){if(t>=232){const e=10*(t-232)+8;return[e,e,e]}let e;return t-=16,[Math.floor(t/36)/5*255,Math.floor((e=t%36)/6)/5*255,e%6/5*255]},E.rgb.hex=function(t){const e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},E.hex.rgb=function(t){const e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let i=e[0];3===e[0].length&&(i=i.split("").map((t=>t+t)).join(""));const n=parseInt(i,16);return[n>>16&255,n>>8&255,255&n]},E.rgb.hcg=function(t){const e=t[0]/255,i=t[1]/255,n=t[2]/255,a=Math.max(Math.max(e,i),n),s=Math.min(Math.min(e,i),n),r=a-s;let o,l;return o=r<1?s/(1-r):0,l=r<=0?0:a===e?(i-n)/r%6:a===i?2+(n-e)/r:4+(e-i)/r,l/=6,l%=1,[360*l,100*r,100*o]},E.hsl.hcg=function(t){const e=t[1]/100,i=t[2]/100,n=i<.5?2*e*i:2*e*(1-i);let a=0;return n<1&&(a=(i-.5*n)/(1-n)),[t[0],100*n,100*a]},E.hsv.hcg=function(t){const e=t[2]/100,i=t[1]/100*e;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.hcg.rgb=function(t){const e=t[1]/100,i=t[2]/100;if(0===e)return[255*i,255*i,255*i];const n=[0,0,0],a=t[0]/360%1*6,s=a%1,r=1-s;let o=0;switch(Math.floor(a)){case 0:n[0]=1,n[1]=s,n[2]=0;break;case 1:n[0]=r,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=s;break;case 3:n[0]=0,n[1]=r,n[2]=1;break;case 4:n[0]=s,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=r}return o=(1-e)*i,[255*(e*n[0]+o),255*(e*n[1]+o),255*(e*n[2]+o)]},E.hcg.hsv=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);let n=0;return i>0&&(n=e/i),[t[0],100*n,100*i]},E.hcg.hsl=function(t){const e=t[1]/100,i=t[2]/100*(1-e)+.5*e;let n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[t[0],100*n,100*i]},E.hcg.hwb=function(t){const e=t[1]/100,i=e+t[2]/100*(1-e);return[t[0],100*(i-e),100*(1-i)]},E.hwb.hcg=function(t){const e=1-t[2]/100,i=e-t[1]/100;let n=0;return i<1&&(n=(e-i)/(1-i)),[t[0],100*i,100*n]},E.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},E.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},E.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},E.gray.hsl=function(t){return[0,0,t[0]]},E.gray.hsv=E.gray.hsl,E.gray.hwb=function(t){return[0,100,t[0]]},E.gray.cmyk=function(t){return[0,0,0,t[0]]},E.gray.lab=function(t){return[t[0],0,0]},E.gray.hex=function(t){const e=255&Math.round(t[0]/100*255),i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i},E.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};const P={};Object.keys(L).forEach((t=>{P[t]={},Object.defineProperty(P[t],"channels",{value:L[t].channels}),Object.defineProperty(P[t],"labels",{value:L[t].labels});const e=function(t){const e=function(t){const e=function(){const t={},e=Object.keys(L);for(let i=e.length,n=0;n<i;n++)t[e[n]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;){const t=i.pop(),n=Object.keys(L[t]);for(let a=n.length,s=0;s<a;s++){const a=n[s],r=e[a];-1===r.distance&&(r.distance=e[t].distance+1,r.parent=t,i.unshift(a))}}return e}(t),i={},n=Object.keys(e);for(let t=n.length,a=0;a<t;a++){const t=n[a];null!==e[t].parent&&(i[t]=K(t,e))}return i}(t);Object.keys(e).forEach((i=>{const n=e[i];P[t][i]=function(t){const e=function(...e){const i=e[0];if(null==i)return i;i.length>1&&(e=i);const n=t(e);if("object"==typeof n)for(let t=n.length,e=0;e<t;e++)n[e]=Math.round(n[e]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(n),P[t][i].raw=function(t){const e=function(...e){const i=e[0];return null==i?i:(i.length>1&&(e=i),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(n)}))}));var U=P;const T=["keyword","gray","hex"],H={};for(const t of Object.keys(U))H[[...U[t].labels].sort().join("")]=t;const V={};function J(t,e){if(!(this instanceof J))return new J(t,e);if(e&&e in T&&(e=null),e&&!(e in U))throw new Error("Unknown model: "+e);let i,n;if(null==t)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof J)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if("string"==typeof t){const e=q.get(t);if(null===e)throw new Error("Unable to parse color from string: "+t);this.model=e.model,n=U[this.model].channels,this.color=e.value.slice(0,n),this.valpha="number"==typeof e.value[n]?e.value[n]:1}else if(t.length>0){this.model=e||"rgb",n=U[this.model].channels;const i=Array.prototype.slice.call(t,0,n);this.color=X(i,n),this.valpha="number"==typeof t[n]?t[n]:1}else if("number"==typeof t)this.model="rgb",this.color=[t>>16&255,t>>8&255,255&t],this.valpha=1;else{this.valpha=1;const e=Object.keys(t);"alpha"in t&&(e.splice(e.indexOf("alpha"),1),this.valpha="number"==typeof t.alpha?t.alpha:0);const n=e.sort().join("");if(!(n in H))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=H[n];const{labels:a}=U[this.model],s=[];for(i=0;i<a.length;i++)s.push(t[a[i]]);this.color=X(s)}if(V[this.model])for(n=U[this.model].channels,i=0;i<n;i++){const t=V[this.model][i];t&&(this.color[i]=t(this.color[i]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}J.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in q.to?this:this.rgb();e=e.round("number"==typeof t?t:1);const i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to[e.model](i)},percentString(t){const e=this.rgb().round("number"==typeof t?t:1),i=1===e.valpha?e.color:[...e.color,this.valpha];return q.to.rgb.percent(i)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const t={},{channels:e}=U[this.model],{labels:i}=U[this.model];for(let n=0;n<e;n++)t[i[n]]=this.color[n];return 1!==this.valpha&&(t.alpha=this.valpha),t},unitArray(){const t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,1!==this.valpha&&t.push(this.valpha),t},unitObject(){const t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,1!==this.valpha&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new J([...this.color.map(R(t)),this.valpha],this.model)},alpha(t){return void 0!==t?new J([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:W("rgb",0,B(255)),green:W("rgb",1,B(255)),blue:W("rgb",2,B(255)),hue:W(["hsl","hsv","hsl","hwb","hcg"],0,(t=>(t%360+360)%360)),saturationl:W("hsl",1,B(100)),lightness:W("hsl",2,B(100)),saturationv:W("hsv",1,B(100)),value:W("hsv",2,B(100)),chroma:W("hcg",1,B(100)),gray:W("hcg",2,B(100)),white:W("hwb",1,B(100)),wblack:W("hwb",2,B(100)),cyan:W("cmyk",0,B(100)),magenta:W("cmyk",1,B(100)),yellow:W("cmyk",2,B(100)),black:W("cmyk",3,B(100)),x:W("xyz",0,B(95.047)),y:W("xyz",1,B(100)),z:W("xyz",2,B(108.833)),l:W("lab",0,B(100)),a:W("lab",1),b:W("lab",2),keyword(t){return void 0!==t?new J(t):U[this.model].keyword(this.color)},hex(t){return void 0!==t?new J(t):q.to.hex(this.rgb().round().color)},hexa(t){if(void 0!==t)return new J(t);const e=this.rgb().round().color;let i=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===i.length&&(i="0"+i),q.to.hex(e)+i},rgbNumber(){const t=this.rgb().color;return(255&t[0])<<16|(255&t[1])<<8|255&t[2]},luminosity(){const t=this.rgb().color,e=[];for(const[i,n]of t.entries()){const t=n/255;e[i]=t<=.04045?t/12.92:((t+.055)/1.055)**2.4}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){const e=this.luminosity(),i=t.luminosity();return e>i?(e+.05)/(i+.05):(i+.05)/(e+.05)},level(t){const e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){const t=this.rgb().color;return(2126*t[0]+7152*t[1]+722*t[2])/1e4<128},isLight(){return!this.isDark()},negate(){const t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){const e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){const e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){const e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){const e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){const e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){const e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){const t=this.rgb().color,e=.3*t[0]+.59*t[1]+.11*t[2];return J.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){const e=this.hsl();let i=e.color[0];return i=(i+t)%360,i=i<0?360+i:i,e.color[0]=i,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);const i=t.rgb(),n=this.rgb(),a=void 0===e?.5:e,s=2*a-1,r=i.alpha()-n.alpha(),o=((s*r==-1?s:(s+r)/(1+s*r))+1)/2,l=1-o;return J.rgb(o*i.red()+l*n.red(),o*i.green()+l*n.green(),o*i.blue()+l*n.blue(),i.alpha()*a+n.alpha()*(1-a))}};for(const t of Object.keys(U)){if(T.includes(t))continue;const{channels:e}=U[t];J.prototype[t]=function(...e){return this.model===t?new J(this):new J(e.length>0?e:[...(i=U[this.model][t].raw(this.color),Array.isArray(i)?i:[i]),this.valpha],t);var i},J[t]=function(...i){let n=i[0];return"number"==typeof n&&(n=X(i,e)),new J(n,t)}}function R(t){return function(e){return function(t,e){return Number(t.toFixed(e))}(e,t)}}function W(t,e,i){t=Array.isArray(t)?t:[t];for(const n of t)(V[n]||(V[n]=[]))[e]=i;return t=t[0],function(n){let a;return void 0!==n?(i&&(n=i(n)),a=this[t](),a.color[e]=n,a):(a=this[t]().color[e],i&&(a=i(a)),a)}}function B(t){return function(e){return Math.max(0,Math.min(t,e))}}function X(t,e){for(let i=0;i<e;i++)"number"!=typeof t[i]&&(t[i]=0);return t}var Y=J;const G=Y("#007AC2"),Q={r:255,g:255,b:255},Z={h:360,s:100,v:100},tt={s:{slider:{height:10,width:160},colorField:{height:80,width:160},thumb:{radius:8}},m:{slider:{height:14,width:272},colorField:{height:150,width:272},thumb:{radius:10}},l:{slider:{height:16,width:464},colorField:{height:200,width:464},thumb:{radius:12}}},et=l(G.hex()),it=class{constructor(n){var r,o,h,u;t(this,n),this.calciteColorPickerChange=e(this,"calciteColorPickerChange",6),this.calciteColorPickerInput=e(this,"calciteColorPickerInput",6),this.colorFieldAndSliderHovered=!1,this.hueThumbState="idle",this.internalColorUpdateContext=null,this.mode=c.HEX,this.shiftKeyChannelAdjustment=0,this.sliderThumbState="idle",this.handleTabActivate=t=>{this.channelMode=t.currentTarget.getAttribute("data-color-mode"),this.updateChannelsFromColor(this.color)},this.handleColorFieldScopeKeyDown=t=>{const{key:e}=t,i={ArrowUp:{x:0,y:-10},ArrowRight:{x:10,y:0},ArrowDown:{x:0,y:10},ArrowLeft:{x:-10,y:0}};i[e]&&(t.preventDefault(),this.scopeOrientation="ArrowDown"===e||"ArrowUp"===e?"vertical":"horizontal",this.captureColorFieldColor(this.colorFieldScopeLeft+i[e].x||0,this.colorFieldScopeTop+i[e].y||0,!1))},this.handleHueScopeKeyDown=t=>{const e=t.shiftKey?10:1,{key:i}=t,n={ArrowUp:1,ArrowRight:1,ArrowDown:-1,ArrowLeft:-1};if(n[i]){t.preventDefault();const a=n[i]*e,s=this.baseColorFieldColor.hue(),r=this.baseColorFieldColor.hue(s+a);this.internalColorSet(r,!1)}},this.handleHexInputChange=t=>{t.stopPropagation();const{allowEmpty:e,color:i}=this,n=t.target.value;!e||n?n!==(i&&l(i.hex()))&&this.internalColorSet(Y(n)):this.internalColorSet(null)},this.handleSavedColorSelect=t=>{this.internalColorSet(Y(t.currentTarget.color))},this.handleChannelInput=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n="rgb"===this.channelMode?Q[Object.keys(Q)[i]]:Z[Object.keys(Z)[i]];let a;if(this.allowEmpty&&!e.value)a="";else{const t=Number(e.value)+this.shiftKeyChannelAdjustment;a=M(t,0,n).toString()}e.value=a,e.internalSyncChildElValue()},this.handleChannelChange=t=>{const e=t.currentTarget,i=Number(e.getAttribute("data-channel-index")),n=[...this.channels];if(this.allowEmpty&&!e.value)return this.channels=[null,null,null],void this.internalColorSet(null);n[i]=Number(e.value),this.updateColorFromChannels(n)},this.handleSavedColorKeyDown=t=>{b(t.key)&&(t.preventDefault(),this.handleSavedColorSelect(t))},this.handleColorFieldAndSliderPointerLeave=()=>{this.colorFieldAndSliderInteractive=!1,this.colorFieldAndSliderHovered=!1,"drag"!==this.sliderThumbState&&"drag"!==this.hueThumbState&&(this.hueThumbState="idle",this.sliderThumbState="idle",this.drawColorFieldAndSlider())},this.handleColorFieldAndSliderPointerDown=t=>{if(!a(t))return;const{offsetX:e,offsetY:i}=t,n=this.getCanvasRegion(i);"color-field"===n?(this.hueThumbState="drag",this.captureColorFieldColor(e,i),this.colorFieldScopeNode?.focus()):"slider"===n&&(this.sliderThumbState="drag",this.captureHueSliderColor(e),this.hueScopeNode?.focus()),t.preventDefault(),document.addEventListener("pointermove",this.globalPointerMoveHandler),document.addEventListener("pointerup",this.globalPointerUpHandler,{once:!0}),this.activeColorFieldAndSliderRect=this.fieldAndSliderRenderingContext.canvas.getBoundingClientRect()},this.globalPointerUpHandler=t=>{if(!a(t))return;const e="drag"===this.sliderThumbState||"drag"===this.hueThumbState;this.hueThumbState="idle",this.sliderThumbState="idle",this.activeColorFieldAndSliderRect=null,this.drawColorFieldAndSlider(),e&&this.calciteColorPickerChange.emit()},this.globalPointerMoveHandler=t=>{const{el:e,dimensions:i}=this,n="drag"===this.hueThumbState;if(!e.isConnected||"drag"!==this.sliderThumbState&&!n)return;let a,s;const r=this.activeColorFieldAndSliderRect,{clientX:o,clientY:l}=t;if(this.colorFieldAndSliderHovered)a=o-r.x,s=l-r.y;else{const t=i.colorField.width,e=i.colorField.height,n=i.slider.height;a=o<r.x+t&&o>r.x?o-r.x:o<r.x?0:t-1,s=l<r.y+e+n&&l>r.y?l-r.y:l<r.y?0:e+n}n?this.captureColorFieldColor(a,s,!1):this.captureHueSliderColor(a)},this.handleColorFieldAndSliderPointerEnterOrMove=({offsetX:t,offsetY:e})=>{const{dimensions:{colorField:i,slider:n,thumb:a}}=this;this.colorFieldAndSliderInteractive=e<=i.height+n.height,this.colorFieldAndSliderHovered=!0;const s=this.getCanvasRegion(e);if("color-field"===s){const n=this.hueThumbState,s=this.baseColorFieldColor.hsv(),r=Math.round(s.saturationv()/(Z.s/i.width)),o=Math.round(i.height-s.value()/(Z.v/i.height)),l=this.containsPoint(t,e,r,o,a.radius);let c=!1;"idle"===n&&l?(this.hueThumbState="hover",c=!0):"hover"!==n||l||(this.hueThumbState="idle",c=!0),"drag"!==this.hueThumbState&&c&&this.drawColorFieldAndSlider()}else if("slider"===s){const s=this.baseColorFieldColor.hsv().saturationv(100).value(100),r=this.sliderThumbState,o=Math.round(s.hue()/(360/n.width)),l=Math.round((n.height+this.getSliderCapSpacing())/2)+i.height,c=this.containsPoint(t,e,o,l,a.radius);let h=!1;"idle"===r&&c?(this.sliderThumbState="hover",h=!0):"hover"!==r||c||(this.sliderThumbState="idle",h=!0),"drag"!==this.sliderThumbState&&h&&this.drawColorFieldAndSlider()}},this.storeColorFieldScope=t=>{this.colorFieldScopeNode=t},this.storeHueScope=t=>{this.hueScopeNode=t},this.renderChannelsTabTitle=t=>{const{channelMode:e,messages:n}=this;return i("calcite-tab-title",{class:"color-mode","data-color-mode":t,key:t,onCalciteTabsActivate:this.handleTabActivate,selected:t===e},"rgb"===t?n.rgb:n.hsv)},this.renderChannelsTab=t=>{const{channelMode:e,channels:n,messages:a}=this,r=t===e,o="rgb"===t,l=o?[a.r,a.g,a.b]:[a.h,a.s,a.v],c=o?[a.red,a.green,a.blue]:[a.hue,a.saturation,a.value],h=s(this.el);return i("calcite-tab",{class:"control",key:t,selected:r},i("div",{class:"channels",dir:"ltr"},n.map(((t,e)=>this.renderChannel(t,e,l[e],c[e],h)))))},this.renderChannel=(t,e,n,a,s)=>i("calcite-input",{class:"channel","data-channel-index":e,dir:s,label:a,lang:this.effectiveLocale,numberButtonType:"none",numberingSystem:this.numberingSystem,onCalciteInputChange:this.handleChannelChange,onCalciteInputInput:this.handleChannelInput,onKeyDown:this.handleKeyDown,prefixText:n,scale:"l"===this.scale?"m":"s",type:"number",value:t?.toString()}),this.deleteColor=()=>{const t=this.color.hex();if(!(this.savedColors.indexOf(t)>-1))return;const e=this.savedColors.filter((e=>e!==t));this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.saveColor=()=>{const t=this.color.hex();if(this.savedColors.indexOf(t)>-1)return;const e=[...this.savedColors,t];this.savedColors=e,this.storageId&&localStorage.setItem(`calcite-color-${this.storageId}`,JSON.stringify(e))},this.drawColorFieldAndSlider=(r=()=>{this.fieldAndSliderRenderingContext&&(this.drawColorField(),this.drawHueSlider())},h=!0,u=!0,A(o)&&(h="leading"in o?!!o.leading:h,u="trailing"in o?!!o.trailing:u),F(r,16,{leading:h,maxWait:16,trailing:u})),this.captureColorFieldColor=(t,e,i=!0)=>{const{dimensions:{colorField:{height:n,width:a}}}=this,s=Math.round(Z.s/a*t),r=Math.round(Z.v/n*(n-e));this.internalColorSet(this.baseColorFieldColor.hsv().saturationv(s).value(r),i)},this.initColorFieldAndSlider=t=>{this.fieldAndSliderRenderingContext=t.getContext("2d"),this.updateCanvasSize(t)},this.allowEmpty=!1,this.color=G,this.disabled=!1,this.format="auto",this.hideHex=!1,this.hideChannels=!1,this.hideSaved=!1,this.scale="m",this.storageId=void 0,this.messageOverrides=void 0,this.numberingSystem=void 0,this.value=et,this.defaultMessages=void 0,this.colorFieldAndSliderInteractive=!1,this.channelMode="rgb",this.channels=this.toChannels(G),this.dimensions=tt.m,this.effectiveLocale="",this.messages=void 0,this.savedColors=[],this.colorFieldScopeTop=void 0,this.colorFieldScopeLeft=void 0,this.scopeOrientation=void 0,this.hueScopeLeft=void 0,this.hueScopeTop=void 0}handleColorChange(t,e){this.drawColorFieldAndSlider(),this.updateChannelsFromColor(t),this.previousColor=e}handleFormatChange(t){this.setMode(t),this.internalColorSet(this.color,!1,"internal")}handleScaleChange(t="m"){this.updateDimensions(t),this.updateCanvasSize(this.fieldAndSliderRenderingContext?.canvas)}onMessagesChange(){}handleValueChange(t,e){const{allowEmpty:i,format:n}=this;let a=!1;if(!i||t){const i=h(t);if(!i||"auto"!==n&&i!==n)return this.showIncompatibleColorWarning(t,n),void(this.value=e);a=this.mode!==i,this.setMode(i)}const s="drag"===this.sliderThumbState||"drag"===this.hueThumbState;if("initial"===this.internalColorUpdateContext)return;if("user-interaction"===this.internalColorUpdateContext)return this.calciteColorPickerInput.emit(),void(s||this.calciteColorPickerChange.emit());const r=i&&!t?null:Y(t),o=!u(r,this.color);(a||o)&&this.internalColorSet(r,!0,"internal")}get baseColorFieldColor(){return this.color||this.previousColor||G}effectiveLocaleChange(){C(this,this.effectiveLocale)}handleChannelKeyUpOrDown(t){this.shiftKeyChannelAdjustment=0;const{key:e}=t;if("ArrowUp"!==e&&"ArrowDown"!==e||!t.composedPath().some((t=>t.classList?.contains("channel"))))return;const{shiftKey:i}=t;if(t.preventDefault(),!this.color)return this.internalColorSet(this.previousColor),void t.stopPropagation();this.shiftKeyChannelAdjustment="ArrowUp"===e&&i?9:"ArrowDown"===e&&i?-9:0}async setFocus(){await y(this),this.el.focus()}async componentWillLoad(){v(this);const{allowEmpty:t,color:e,format:i,value:n}=this,a=t&&!n,s=h(n),r=a||"auto"===i&&s||i===s,o=a?null:r?Y(n):e;r||this.showIncompatibleColorWarning(n,i),this.setMode(i),this.internalColorSet(o,!1,"initial"),this.updateDimensions(this.scale);const l=`calcite-color-${this.storageId}`;this.storageId&&localStorage.getItem(l)&&(this.savedColors=JSON.parse(localStorage.getItem(l))),await j(this)}connectedCallback(){k(this),z(this)}componentDidLoad(){w(this)}disconnectedCallback(){document.removeEventListener("pointermove",this.globalPointerMoveHandler),document.removeEventListener("pointerup",this.globalPointerUpHandler),x(this),D(this)}componentDidRender(){g(this)}render(){const{allowEmpty:t,color:e,messages:n,hideHex:a,hideChannels:s,hideSaved:r,savedColors:o,scale:l}=this,c=e?e.hex():null,h="l"===l?"m":"s",{colorFieldAndSliderInteractive:u,colorFieldScopeTop:d,colorFieldScopeLeft:m,hueScopeLeft:f,hueScopeTop:p,scopeOrientation:g,dimensions:{colorField:{height:b,width:y},slider:{height:v}}}=this,w=p??v/2+b,k=f??y*G.hue()/Z.h,x=null===e,M="vertical"===g;return i("div",{class:"container"},i("div",{class:"color-field-and-slider-wrap"},i("canvas",{class:{"color-field-and-slider":!0,"color-field-and-slider--interactive":u},onPointerDown:this.handleColorFieldAndSliderPointerDown,onPointerEnter:this.handleColorFieldAndSliderPointerEnterOrMove,onPointerLeave:this.handleColorFieldAndSliderPointerLeave,onPointerMove:this.handleColorFieldAndSliderPointerEnterOrMove,ref:this.initColorFieldAndSlider}),i("div",{"aria-label":M?n.value:n.saturation,"aria-valuemax":M?Z.v:Z.s,"aria-valuemin":"0","aria-valuenow":(M?e?.saturationv():e?.value())||"0",class:{scope:!0,"scope--color-field":!0},onKeyDown:this.handleColorFieldScopeKeyDown,role:"slider",style:{top:`${d||0}px`,left:`${m||0}px`},tabindex:"0",ref:this.storeColorFieldScope}),i("div",{"aria-label":n.hue,"aria-valuemax":Z.h,"aria-valuemin":"0","aria-valuenow":e?.round().hue()||G.round().hue(),class:{scope:!0,"scope--hue":!0},onKeyDown:this.handleHueScopeKeyDown,role:"slider",style:{top:`${w}px`,left:`${k}px`},tabindex:"0",ref:this.storeHueScope})),a&&s?null:i("div",{class:{"control-section":!0,section:!0}},a?null:i("div",{class:"color-hex-options"},i("span",{class:{header:!0,"header--hex":!0}},n.hex),i("calcite-color-picker-hex-input",{allowEmpty:t,class:"control",hexLabel:n.hex,numberingSystem:this.numberingSystem,onCalciteColorPickerHexInputChange:this.handleHexInputChange,scale:h,value:c})),s?null:i("calcite-tabs",{class:{"color-mode-container":!0,"section--split":!0},scale:h},i("calcite-tab-nav",{slot:"title-group"},this.renderChannelsTabTitle("rgb"),this.renderChannelsTabTitle("hsv")),this.renderChannelsTab("rgb"),this.renderChannelsTab("hsv"))),r?null:i("div",{class:{"saved-colors-section":!0,section:!0}},i("div",{class:"header"},i("label",null,n.saved),i("div",{class:"saved-colors-buttons"},i("calcite-button",{appearance:"transparent",class:"delete-color",disabled:x,iconStart:"minus",kind:"neutral",label:n.deleteColor,onClick:this.deleteColor,scale:h,type:"button"}),i("calcite-button",{appearance:"transparent",class:"save-color",disabled:x,iconStart:"plus",kind:"neutral",label:n.saveColor,onClick:this.saveColor,scale:h,type:"button"}))),o.length>0?i("div",{class:"saved-colors"},[...o.map((t=>i("calcite-color-picker-swatch",{active:c===t,class:"saved-color",color:t,key:t,onClick:this.handleSavedColorSelect,onKeyDown:this.handleSavedColorKeyDown,scale:l,tabIndex:0})))]):null))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}showIncompatibleColorWarning(t,e){console.warn(`ignoring color value (${t}) as it is not compatible with the current format (${e})`)}setMode(t){this.mode="auto"===t?this.mode:t}captureHueSliderColor(t){const{dimensions:{slider:{width:e}}}=this;this.internalColorSet(this.baseColorFieldColor.hue(360/e*t),!1)}getCanvasRegion(t){const{dimensions:{colorField:{height:e},slider:{height:i}}}=this;return t<=e?"color-field":t<=e+i?"slider":"none"}internalColorSet(t,e=!0,i="user-interaction"){e&&u(t,this.color)||(this.internalColorUpdateContext=i,this.color=t,this.value=this.toValue(t),this.internalColorUpdateContext=null)}toValue(t,e=this.mode){if(!t)return null;if(e.includes("hex"))return l(t.round().hex());if(e.includes("-css"))return t[e.replace("-css","").replace("a","")]().round().string();const i=t[e]().round().object();return e.endsWith("a")&&(i.a=i.alpha,delete i.alpha),i}getSliderCapSpacing(){const{dimensions:{slider:{height:t},thumb:{radius:e}}}=this;return 2*e-t}updateDimensions(t="m"){this.dimensions=tt[t]}drawColorField(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e,width:i}}}=this;t.fillStyle=this.baseColorFieldColor.hsv().saturationv(100).value(100).string(),t.fillRect(0,0,i,e);const n=t.createLinearGradient(0,0,i,0);n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,i,e);const a=t.createLinearGradient(0,0,0,e);a.addColorStop(0,"rgba(0,0,0,0)"),a.addColorStop(1,"rgba(0,0,0,1)"),t.fillStyle=a,t.fillRect(0,0,i,e),this.drawActiveColorFieldColor()}setCanvasContextSize(t,{height:e,width:i}){const n=window.devicePixelRatio||1;t.width=i*n,t.height=e*n,t.style.height=`${e}px`,t.style.width=`${i}px`,t.getContext("2d").scale(n,n)}updateCanvasSize(t){t&&(this.setCanvasContextSize(t,{width:this.dimensions.colorField.width,height:this.dimensions.colorField.height+this.dimensions.slider.height+2*this.getSliderCapSpacing()}),this.drawColorFieldAndSlider())}containsPoint(t,e,i,n,a){return Math.pow(t-i,2)+Math.pow(e-n,2)<=Math.pow(a,2)}drawActiveColorFieldColor(){const{color:t}=this;if(!t)return;const e=t.hsv(),{dimensions:{colorField:{height:i,width:n},thumb:{radius:a}}}=this,s=e.saturationv()/(Z.s/n),r=i-e.value()/(Z.v/i);requestAnimationFrame((()=>{this.colorFieldScopeLeft=s,this.colorFieldScopeTop=r})),this.drawThumb(this.fieldAndSliderRenderingContext,a,s,r,e,this.hueThumbState)}drawThumb(t,e,i,n,a,s){const r=2*Math.PI;t.beginPath(),t.arc(i,n,e,0,r),t.shadowBlur="hover"===s?32:16,t.shadowColor=`rgba(0, 0, 0, ${"drag"===s?.32:.16})`,t.fillStyle="#fff",t.fill(),t.beginPath(),t.arc(i,n,e-3,0,r),t.shadowBlur=0,t.shadowColor="transparent",t.fillStyle=a.rgb().string(),t.fill()}drawActiveHueSliderColor(){const{color:t}=this;if(!t)return;const e=t.hsv().saturationv(100).value(100),{dimensions:{colorField:{height:i},slider:{height:n,width:a},thumb:{radius:s}}}=this,r=e.hue()/(360/a),o=n/2+i;requestAnimationFrame((()=>{this.hueScopeLeft=r,this.hueScopeTop=o})),this.drawThumb(this.fieldAndSliderRenderingContext,s,r,o,e,this.sliderThumbState)}drawHueSlider(){const t=this.fieldAndSliderRenderingContext,{dimensions:{colorField:{height:e},slider:{height:i,width:n}}}=this,a=t.createLinearGradient(0,0,n,0),s=["red","yellow","lime","cyan","blue","magenta","red"],r=1/(s.length-1);let o=0;s.forEach((t=>{a.addColorStop(o,Y(t).string()),o+=r})),t.fillStyle=a,t.clearRect(0,e,n,i+2*this.getSliderCapSpacing()),t.fillRect(0,e,n,i),this.drawActiveHueSliderColor()}updateColorFromChannels(t){this.internalColorSet(Y(t,this.channelMode))}updateChannelsFromColor(t){this.channels=t?this.toChannels(t):[null,null,null]}toChannels(t){const{channelMode:e}=this;return t[e]().array().map((t=>Math.floor(t)))}static get delegatesFocus(){return!0}static get assetsDirs(){return["assets"]}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"],format:["handleFormatChange"],scale:["handleScaleChange"],messageOverrides:["onMessagesChange"],value:["handleValueChange"],effectiveLocale:["effectiveLocaleChange"]}}};it.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:inline-block;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]) .container{inline-size:160px}:host([scale=s]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(20px, 1fr))}:host([scale=s]) .channels{flex-direction:column}:host([scale=s]) .channel{inline-size:100%;margin-block-end:4px}:host([scale=s]) .channel:last-child{margin-block-end:0}:host([scale=m]) .container{inline-size:272px}:host([scale=l]) .header{padding-block-end:0px}:host([scale=l]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) .container{inline-size:464px}:host([scale=l]) .color-field-and-slider{margin-block-end:-20px}:host([scale=l]) .section{padding-block:0 16px;padding-inline:16px}:host([scale=l]) .section:first-of-type{padding-block-start:16px}:host([scale=l]) .saved-colors{grid-template-columns:repeat(auto-fill, minmax(28px, 1fr));grid-gap:12px;padding-block-start:16px}:host([scale=l]) .control-section{flex-wrap:nowrap;align-items:baseline}:host([scale=l]) .control-section>:nth-child(2){margin-inline-start:12px}:host([scale=l]) .color-hex-options{display:flex;flex-shrink:1;flex-direction:column;justify-content:space-around;min-block-size:98px;inline-size:160px}:host([scale=l]) .color-mode-container{flex-shrink:3}.container{background-color:var(--calcite-ui-foreground-1);display:inline-block;border:1px solid var(--calcite-ui-border-1)}.color-field-and-slider-wrap{position:relative}.scope{pointer-events:none;position:absolute;font-size:var(--calcite-font-size--1);outline-color:transparent;outline-offset:14px}.scope:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:16px}.color-field-and-slider{margin-block-end:-16px;touch-action:none}.color-field-and-slider--interactive{cursor:pointer}.control-section{display:flex;flex-direction:row;flex-wrap:wrap}.section{padding-block:0 12px;padding-inline:12px}.section:first-of-type{padding-block-start:12px}.color-hex-options,.section--split{flex-grow:1}.header{display:flex;align-items:center;justify-content:space-between;padding-block-end:0.25rem;color:var(--calcite-ui-text-1)}.header--hex,.color-mode-container{padding-block-start:12px}.channels{display:flex;justify-content:space-between}.channel{inline-size:31%}.saved-colors{padding-block-start:12px;display:grid;grid-template-columns:repeat(auto-fill, minmax(24px, 1fr));grid-gap:8px;inline-size:100%}.saved-colors-buttons{display:flex}.saved-color{outline-offset:0;outline-color:transparent;cursor:pointer}.saved-color:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}.saved-color:hover{transition:outline-color var(--calcite-internal-animation-timing-fast) ease-in-out;outline:2px solid var(--calcite-ui-border-2);outline-offset:2px}";const nt=Y(),at=class{constructor(i){t(this,i),this.calciteColorPickerHexInputChange=e(this,"calciteColorPickerHexInputChange",6),this.onCalciteInternalInputBlur=()=>{const t=this.inputNode,e=t.value,i=`#${e}`;this.allowEmpty&&!e||d(i)&&m(i)||(t.value=this.allowEmpty&&!this.internalColor?"":this.formatForInternalInput(f(this.internalColor.object())))},this.onInputChange=()=>{this.internalSetValue(this.inputNode.value,this.value)},this.previousNonNullValue=this.value,this.storeInputRef=t=>{this.inputNode=t},this.hexLabel="Hex",this.allowEmpty=!1,this.scale="m",this.value=l(nt.hex()),this.numberingSystem=void 0,this.internalColor=nt}connectedCallback(){const{allowEmpty:t,value:e}=this;if(e){const t=l(e);d(t)&&this.internalSetValue(t,t,!1)}else t&&this.internalSetValue(null,null,!1)}componentWillLoad(){v(this)}componentDidLoad(){w(this)}handleValueChange(t,e){this.internalSetValue(t,e,!1)}onInputKeyDown(t){const{altKey:e,ctrlKey:i,metaKey:n,shiftKey:a}=t,{internalColor:s,value:r}=this,{key:o}=t;if("Tab"===o||"Enter"===o)return void this.onInputChange();const c=this.value;if("ArrowDown"===o||"ArrowUp"===o)return r?(this.internalSetValue(l(this.nudgeRGBChannels(s,(a?10:1)*("ArrowUp"===o?1:-1)).hex()),c),void t.preventDefault()):(this.internalSetValue(this.previousNonNullValue,c),void t.preventDefault());const h=e||i||n,u=1===o.length,d=p.test(o);!u||h||d||t.preventDefault()}onPaste(t){const e=t.clipboardData.getData("text");d(e)&&(t.preventDefault(),this.inputNode.value=e.slice(1))}render(){const{value:t}=this,e=this.formatForInternalInput(t);return i("div",{class:"container"},i("calcite-input",{class:"input",label:this.hexLabel,maxLength:6,numberingSystem:this.numberingSystem,onCalciteInputChange:this.onInputChange,onCalciteInternalInputBlur:this.onCalciteInternalInputBlur,onKeyDown:this.handleKeyDown,onPaste:this.onPaste,prefixText:"#",scale:this.scale,value:e,ref:this.storeInputRef}),e?i("calcite-color-picker-swatch",{active:!0,class:"preview",color:`#${e}`,scale:this.scale}):null)}async setFocus(){await y(this),r(this.inputNode)}internalSetValue(t,e,i=!0){if(t){const e=l(t);if(d(e)){const{internalColor:t}=this,n=!t||e!==l(t.hex());return this.internalColor=Y(e),this.previousNonNullValue=e,this.value=e,void(n&&i&&this.calciteColorPickerHexInputChange.emit())}}else if(this.allowEmpty)return this.internalColor=null,this.value=null,void(i&&this.calciteColorPickerHexInputChange.emit());this.value=e}formatForInternalInput(t){return t?t.replace("#",""):""}nudgeRGBChannels(t,e){return Y.rgb(t.array().map((t=>t+e)))}handleKeyDown(t){"Enter"===t.key&&t.preventDefault()}get el(){return n(this)}static get watchers(){return{value:["handleValueChange"]}}};at.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}.container{display:inline-grid;inline-size:100%;align-items:center;grid-template-columns:1fr auto}.preview{grid-column:2/3;pointer-events:none;margin-block:0px;margin-inline:0.25rem;display:flex;align-items:center}.preview,.input{grid-row:1}.input{grid-column:1/3;inline-size:100%;text-transform:uppercase}";const st=class{constructor(e){t(this,e),this.active=!1,this.color=void 0,this.scale="m"}handleColorChange(t){this.internalColor=Y(t)}componentWillLoad(){this.handleColorChange(this.color)}render(){const{active:t,el:e,internalColor:n}=this,a=t?"100%":"0",s=n.hex(),r="light"===o(e)?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.15)";return i("svg",{class:"swatch",xmlns:"http://www.w3.org/2000/svg"},i("title",null,s),i("rect",{fill:s,height:"100%",id:"swatch",rx:a,stroke:r,"stroke-width":"2",style:{"clip-path":`inset(0 round ${a})`},width:"100%"}))}get el(){return n(this)}static get watchers(){return{color:["handleColorChange"]}}};st.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:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:visible;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.no-color-icon{position:absolute;inset:0px;block-size:100%;inline-size:100%}";export{it as calcite_color_picker,at as calcite_color_picker_hex_input,st as calcite_color_picker_swatch}
|
|
@@ -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.1.0
|
|
5
|
+
*/
|
|
6
|
+
import{c as t,b as n}from"./p-b4c2f2ce.js";import{d as e}from"./p-6293ed16.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,C;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==(C=E.filter((t=>t.overflows[0]<=0)).sort(((t,n)=>t.overflows[1]-n.overflows[1]))[0])?void 0:C.placement;if(!e)switch(y){case"bestFit":{var O;const t=null==(O=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:O[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 C(t){return B(t)?(t.nodeName||"").toLowerCase():""}let O;function $(){if(O)return O;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(O=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),O):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(C(t))}function N(t){const n=/firefox/i.test($()),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($())}function W(t){return["html","body","#document"].includes(C(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"===C(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"===C(o)||"body"===C(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"!==C(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"!==C(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"!==C(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-7aee1b7a.js"),n=ot.getOffsetParent;ot.getOffsetParent=e=>n(e,t)}}(),at=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end"],lt="bottom-start",st={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function ct({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])),C=(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!==c?{data:{index:P+1,overflows:M},reset:{placement:C}}:{}}}}({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 ft(t,n){const e=t.filter((t=>at.includes(t)));return e.length!==t.length&&console.warn(`${n.tagName}: Invalid value found in: flipPlacements. Try any of these: ${at.map((t=>`"${t}"`)).join(", ").trim()}`,{el:n}),e}function ut(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 dt(t,n,e=!1){if(t.open)return e?mt(n):pt(n)}const mt=e(pt,100,{leading:!0,maxWait:100});async function pt({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:ut(n,o),middleware:ct({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?"hidden":null,h=x?"none":null;n.setAttribute("data-placement",p);const v=`translate(${Math.round(d)}px,${Math.round(m)}px)`;Object.assign(n.style,{visibility:x,pointerEvents:h,position:y,top:"0",left:"0",transform:v})}const yt=new WeakMap;function gt(t,n,e){if(!e||!n)return;xt(t,n,e);const o=t.overlayPositioning;Object.assign(e.style,{visibility:"hidden",pointerEvents:"none",position:o}),"absolute"===o&&At(e),yt.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 xt(t,n,e){if(!e||!n)return;bt(e).removeEventListener("transitionend",wt);const o=yt.get(t);o&&o(),yt.delete(t)}const ht=Math.ceil(Math.hypot(4,4));function vt(t){t&&"absolute"===t.style.position&&bt(t).addEventListener("transitionend",wt)}function bt(t){return t.shadowRoot||t}function wt(n){const e=n.target;if("opacity"===n.propertyName&&e.classList.contains(st.animation)){const n=function(n){return t(n,"[data-placement]")}(e);At(n),bt(n).removeEventListener("transitionend",wt)}}function At(t){t.style.transform="",t.style.top="0",t.style.left="0"}export{st as F,xt as a,ht as b,gt as c,lt as d,ft as f,dt as r,vt 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.1.0
|
|
4
|
+
* v1.1.0
|
|
5
5
|
*/
|
|
6
6
|
const n={menuActions:"menu-actions",menuTooltip:"menu-tooltip"},o={menu:"ellipsis"};export{o 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.1.0
|
|
4
|
+
* v1.1.0
|
|
5
5
|
*/
|
|
6
6
|
var t="object"==typeof global&&global&&global.Object===Object&&global,n="object"==typeof self&&self&&self.Object===Object&&self,r=t||n||Function("return this")(),e=r.Symbol,o=Object.prototype,i=o.hasOwnProperty,u=o.toString,f=e?e.toStringTag:void 0,a=Object.prototype.toString,c=e?e.toStringTag:void 0;function v(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":c&&c in Object(t)?function(t){var n=i.call(t,f),r=t[f];try{t[f]=void 0;var e=!0}catch(t){}var o=u.call(t);return e&&(n?t[f]=r:delete t[f]),o}(t):function(t){return a.call(t)}(t)}function l(t){return null!=t&&"object"==typeof t}function s(t){return"symbol"==typeof t||l(t)&&"[object Symbol]"==v(t)}var b=/\s/,d=/^\s+/;function p(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}var y=/^[-+]0x[0-9a-f]+$/i,j=/^0b[01]+$/i,m=/^0o[0-7]+$/i,T=parseInt;function g(t){if("number"==typeof t)return t;if(s(t))return NaN;if(p(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=p(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;var r;t=(r=t)?r.slice(0,function(t){for(var n=t.length;n--&&b.test(t.charAt(n)););return n}(r)+1).replace(d,""):r;var e=j.test(t);return e||m.test(t)?T(t.slice(2),e?2:8):y.test(t)?NaN:+t}var h=function(){return r.Date.now()},N=Math.max,O=Math.min;function x(t,n,r){var e,o,i,u,f,a,c=0,v=!1,l=!1,s=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function b(n){var r=e,i=o;return e=o=void 0,c=n,u=t.apply(i,r)}function d(t){return c=t,f=setTimeout(j,n),v?b(t):u}function y(t){var r=t-a;return void 0===a||r>=n||r<0||l&&t-c>=i}function j(){var t=h();if(y(t))return m(t);f=setTimeout(j,function(t){var r=n-(t-a);return l?O(r,i-(t-c)):r}(t))}function m(t){return f=void 0,s&&e?b(t):(e=o=void 0,u)}function T(){var t=h(),r=y(t);if(e=arguments,o=this,a=t,r){if(void 0===f)return d(a);if(l)return clearTimeout(f),f=setTimeout(j,n),b(a)}return void 0===f&&(f=setTimeout(j,n)),u}return n=g(n)||0,p(r)&&(v=!!r.leading,i=(l="maxWait"in r)?N(g(r.maxWait)||0,n):i,s="trailing"in r?!!r.trailing:s),T.cancel=function(){void 0!==f&&clearTimeout(f),c=0,e=a=o=f=void 0},T.flush=function(){return void 0===f?u:m(h())},T}export{e as S,s as a,v as b,l as c,x as d,t as f,p as i,r}
|