@esri/solutions-components 0.1.7 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/buffer-tools_6.cjs.entry.js +21 -79
- package/dist/cjs/calcite-action-bar_6.cjs.entry.js +14 -16
- package/dist/cjs/calcite-action_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block-section.cjs.entry.js +1 -1
- package/dist/cjs/calcite-block.cjs.entry.js +1 -1
- package/dist/cjs/calcite-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/calcite-color-picker-hex-input.cjs.entry.js +2 -2
- package/dist/cjs/calcite-color-picker-swatch.cjs.entry.js +1 -1
- package/dist/cjs/calcite-color-picker.cjs.entry.js +3 -3
- package/dist/cjs/calcite-combobox_3.cjs.entry.js +3 -18
- package/dist/cjs/calcite-date-picker-day_3.cjs.entry.js +1 -1
- package/dist/cjs/calcite-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/calcite-fab.cjs.entry.js +1 -1
- package/dist/cjs/calcite-filter.cjs.entry.js +1 -1
- package/dist/cjs/calcite-flow-item.cjs.entry.js +1 -1
- package/dist/cjs/calcite-inline-editable.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-number.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-text.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-input_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-label.cjs.entry.js +1 -1
- package/dist/cjs/calcite-link.cjs.entry.js +1 -1
- package/dist/cjs/calcite-list_2.cjs.entry.js +2 -2
- package/dist/cjs/calcite-option_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-pagination.cjs.entry.js +1 -1
- package/dist/cjs/calcite-panel_2.cjs.entry.js +1 -1
- package/dist/cjs/calcite-pick-list-item.cjs.entry.js +1 -1
- package/dist/cjs/calcite-pick-list.cjs.entry.js +1 -1
- package/dist/cjs/calcite-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-rating.cjs.entry.js +1 -1
- package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +17 -116
- package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
- package/dist/cjs/calcite-split-button.cjs.entry.js +1 -1
- package/dist/cjs/calcite-stepper-item.cjs.entry.js +1 -1
- package/dist/cjs/calcite-switch.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile-select-group.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile-select.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tile.cjs.entry.js +1 -1
- package/dist/cjs/calcite-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/calcite-tree_3.cjs.entry.js +1 -15
- package/dist/cjs/check-list.cjs.entry.js +2 -10
- package/dist/cjs/config-buffer-tools.cjs.entry.js +2 -11
- package/dist/cjs/config-draw-tools.cjs.entry.js +1 -9
- package/dist/cjs/config-layer-picker.cjs.entry.js +2 -19
- package/dist/cjs/config-pdf-download.cjs.entry.js +1 -17
- package/dist/cjs/{index-73010cd8.js → index-7af21b6f.js} +7 -158
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/map-search.cjs.entry.js +3 -0
- package/dist/cjs/public-notification.cjs.entry.js +3 -24
- package/dist/cjs/{resources-f7622a24.js → resources-aa19bf8c.js} +1 -1
- package/dist/cjs/solution-configuration.cjs.entry.js +7 -24
- package/dist/cjs/solution-contents_3.cjs.entry.js +7 -33
- package/dist/cjs/solutions.cjs.js +1 -1
- package/dist/cjs/store-manager.cjs.entry.js +1 -12
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/buffer-tools/buffer-tools.js +1 -29
- package/dist/collection/components/check-list/check-list.js +2 -10
- package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +2 -11
- package/dist/collection/components/config-draw-tools/config-draw-tools.js +1 -9
- package/dist/collection/components/config-layer-picker/config-layer-picker.js +2 -19
- package/dist/collection/components/config-pdf-download/config-pdf-download.js +1 -17
- package/dist/collection/components/json-editor/assets/monaco-editor/LICENSE +21 -21
- package/dist/collection/components/json-editor/json-editor.js +2 -22
- package/dist/collection/components/map-draw-tools/map-draw-tools.js +5 -14
- package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -16
- package/dist/collection/components/map-search/map-search.js +5 -0
- package/dist/collection/components/map-select-tools/map-select-tools.js +8 -4
- package/dist/collection/components/pdf-download/pdf-download.js +2 -8
- package/dist/collection/components/public-notification/public-notification.js +3 -24
- package/dist/collection/components/refine-selection/refine-selection.js +4 -4
- package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +13 -34
- package/dist/collection/components/solution-configuration/solution-configuration.js +7 -24
- package/dist/collection/components/solution-contents/solution-contents.js +1 -3
- package/dist/collection/components/solution-item/solution-item.js +3 -9
- package/dist/collection/components/solution-item-details/solution-item-details.js +4 -8
- package/dist/collection/components/solution-item-icon/solution-item-icon.js +0 -14
- package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -11
- package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -13
- package/dist/collection/components/solution-resource-item/solution-resource-item.js +3 -16
- package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +3 -21
- package/dist/collection/components/solution-template-data/solution-template-data.js +2 -30
- package/dist/collection/components/solution-variables/solution-variables.js +1 -13
- package/dist/collection/components/store-manager/store-manager.js +1 -12
- package/dist/components/action.js +1 -1
- package/dist/components/buffer-tools2.js +1 -29
- package/dist/components/button.js +1 -1
- package/dist/components/calcite-block-section.js +1 -1
- package/dist/components/calcite-block.js +1 -1
- package/dist/components/calcite-color-picker.js +1 -1
- package/dist/components/calcite-fab.js +1 -1
- package/dist/components/calcite-filter.js +1 -1
- package/dist/components/calcite-flow-item.js +1 -1
- package/dist/components/calcite-inline-editable.js +1 -1
- package/dist/components/calcite-input-date-picker.js +1 -1
- package/dist/components/calcite-input-number.js +1 -1
- package/dist/components/calcite-input-text.js +1 -1
- package/dist/components/calcite-input-time-picker.js +1 -1
- package/dist/components/calcite-pagination.js +1 -1
- package/dist/components/calcite-pick-list.js +1 -1
- package/dist/components/calcite-radio-button.js +1 -1
- package/dist/components/calcite-rating.js +1 -1
- package/dist/components/calcite-sortable-list.js +1 -1
- package/dist/components/calcite-split-button.js +1 -1
- package/dist/components/calcite-stepper-item.js +1 -1
- package/dist/components/calcite-tile-select-group.js +1 -1
- package/dist/components/calcite-tile-select.js +1 -1
- package/dist/components/check-list2.js +2 -10
- package/dist/components/checkbox.js +1 -1
- package/dist/components/color-picker-swatch.js +7 -158
- package/dist/components/combobox-item.js +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/config-buffer-tools.js +2 -11
- package/dist/components/config-draw-tools.js +1 -9
- package/dist/components/config-layer-picker.js +2 -19
- package/dist/components/config-pdf-download.js +1 -17
- package/dist/components/date-picker-day.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/json-editor2.js +2 -22
- package/dist/components/label.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/components/map-draw-tools2.js +5 -14
- package/dist/components/map-layer-picker2.js +1 -16
- package/dist/components/map-search.js +3 -0
- package/dist/components/map-select-tools2.js +8 -4
- package/dist/components/panel.js +1 -1
- package/dist/components/pdf-download2.js +2 -8
- package/dist/components/pick-list-item.js +1 -1
- package/dist/components/public-notification.js +3 -24
- package/dist/components/radio-group.js +1 -1
- package/dist/components/refine-selection-tools2.js +13 -34
- package/dist/components/refine-selection2.js +4 -4
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/solution-configuration.js +7 -24
- package/dist/components/solution-contents2.js +1 -3
- package/dist/components/solution-item-details2.js +4 -8
- package/dist/components/solution-item-icon2.js +0 -14
- package/dist/components/solution-item-sharing2.js +1 -11
- package/dist/components/solution-item2.js +3 -9
- package/dist/components/solution-organization-variables2.js +1 -13
- package/dist/components/solution-resource-item2.js +3 -16
- package/dist/components/solution-spatial-ref2.js +3 -21
- package/dist/components/solution-template-data2.js +2 -30
- package/dist/components/solution-variables2.js +1 -13
- package/dist/components/store-manager.js +1 -12
- package/dist/components/switch.js +1 -1
- package/dist/components/tab-title.js +1 -1
- package/dist/components/tile.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/tree-item.js +1 -1
- package/dist/components/value-list-item.js +1 -1
- package/dist/components/value-list.js +1 -1
- package/dist/esm/buffer-tools_6.entry.js +21 -79
- package/dist/esm/calcite-action-bar_6.entry.js +14 -16
- package/dist/esm/calcite-action_2.entry.js +1 -1
- package/dist/esm/calcite-block-section.entry.js +1 -1
- package/dist/esm/calcite-block.entry.js +1 -1
- package/dist/esm/calcite-button.entry.js +1 -1
- package/dist/esm/calcite-checkbox.entry.js +1 -1
- package/dist/esm/calcite-color-picker-hex-input.entry.js +2 -2
- package/dist/esm/calcite-color-picker-swatch.entry.js +1 -1
- package/dist/esm/calcite-color-picker.entry.js +3 -3
- package/dist/esm/calcite-combobox_3.entry.js +3 -18
- package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
- package/dist/esm/calcite-dropdown.entry.js +1 -1
- package/dist/esm/calcite-fab.entry.js +1 -1
- package/dist/esm/calcite-filter.entry.js +1 -1
- package/dist/esm/calcite-flow-item.entry.js +1 -1
- package/dist/esm/calcite-inline-editable.entry.js +1 -1
- package/dist/esm/calcite-input-date-picker.entry.js +1 -1
- package/dist/esm/calcite-input-number.entry.js +1 -1
- package/dist/esm/calcite-input-text.entry.js +1 -1
- package/dist/esm/calcite-input-time-picker.entry.js +1 -1
- package/dist/esm/calcite-input_2.entry.js +1 -1
- package/dist/esm/calcite-label.entry.js +1 -1
- package/dist/esm/calcite-link.entry.js +1 -1
- package/dist/esm/calcite-list_2.entry.js +2 -2
- package/dist/esm/calcite-option_2.entry.js +1 -1
- package/dist/esm/calcite-pagination.entry.js +1 -1
- package/dist/esm/calcite-panel_2.entry.js +1 -1
- package/dist/esm/calcite-pick-list-item.entry.js +1 -1
- package/dist/esm/calcite-pick-list.entry.js +1 -1
- package/dist/esm/calcite-radio-button.entry.js +1 -1
- package/dist/esm/calcite-rating.entry.js +1 -1
- package/dist/esm/calcite-shell-panel_14.entry.js +17 -116
- package/dist/esm/calcite-sortable-list.entry.js +1 -1
- package/dist/esm/calcite-split-button.entry.js +1 -1
- package/dist/esm/calcite-stepper-item.entry.js +1 -1
- package/dist/esm/calcite-switch.entry.js +1 -1
- package/dist/esm/calcite-tile-select-group.entry.js +1 -1
- package/dist/esm/calcite-tile-select.entry.js +1 -1
- package/dist/esm/calcite-tile.entry.js +1 -1
- package/dist/esm/calcite-time-picker.entry.js +1 -1
- package/dist/esm/calcite-tree_3.entry.js +1 -15
- package/dist/esm/check-list.entry.js +2 -10
- package/dist/esm/config-buffer-tools.entry.js +2 -11
- package/dist/esm/config-draw-tools.entry.js +1 -9
- package/dist/esm/config-layer-picker.entry.js +2 -19
- package/dist/esm/config-pdf-download.entry.js +1 -17
- package/dist/esm/{index-dc607780.js → index-d33ebc35.js} +7 -158
- package/dist/esm/loader.js +1 -1
- package/dist/esm/map-search.entry.js +3 -0
- package/dist/esm/public-notification.entry.js +3 -24
- package/dist/esm/{resources-adf937de.js → resources-7d4a587f.js} +1 -1
- package/dist/esm/solution-configuration.entry.js +7 -24
- package/dist/esm/solution-contents_3.entry.js +7 -33
- package/dist/esm/solutions.js +1 -1
- package/dist/esm/store-manager.entry.js +1 -12
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/action/action.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/block/block.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/block-section/block-section.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/button/button.css +0 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/checkbox/checkbox.css +0 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/color-picker/color-picker.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox/combobox.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox-item/combobox-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker-day/date-picker-day.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/dropdown/dropdown.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/fab/fab.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/filter/filter.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/flow-item/flow-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/inline-editable/inline-editable.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/input/input.css +0 -6
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-date-picker/input-date-picker.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-number/input-number.css +0 -6
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-text/input-text.css +0 -6
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-time-picker/input-time-picker.css +0 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/label/label.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/link/link.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/list/list.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/list-item/list-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/pagination/pagination.css +1 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/panel/panel.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list/pick-list.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/pick-list-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-button/radio-button.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-group/radio-group.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/rating/rating.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/select/select.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/slider/slider.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/sortable-list/sortable-list.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/split-button/split-button.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/stepper-item/stepper-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/switch/switch.css +0 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/tab-title/tab-title.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile/tile.css +0 -2
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select/tile-select.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select-group/tile-select-group.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/time-picker/time-picker.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/tree-item/tree-item.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list/value-list.css +0 -1
- package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list-item/value-list-item.css +0 -1
- package/dist/solutions/assets/monaco-editor/LICENSE +21 -21
- package/dist/solutions/{p-9fdfd6c6.entry.js → p-07ff4a74.entry.js} +1 -1
- package/dist/solutions/p-08c96ac2.entry.js +6 -0
- package/dist/solutions/p-1033ca8d.entry.js +6 -0
- package/dist/solutions/{p-22b54603.entry.js → p-15994a4d.entry.js} +1 -1
- package/dist/solutions/p-199c5c24.entry.js +6 -0
- package/dist/solutions/p-1db37170.entry.js +6 -0
- package/dist/solutions/p-1ed2008f.entry.js +22 -0
- package/dist/solutions/{p-0922119b.entry.js → p-255ff9e3.entry.js} +2 -2
- package/dist/solutions/p-2a977e48.entry.js +11 -0
- package/dist/solutions/{p-911c476b.entry.js → p-320edf27.entry.js} +1 -1
- package/dist/solutions/p-33d9d95c.entry.js +11 -0
- package/dist/solutions/{p-5f367dbf.js → p-374a5031.js} +2 -2
- package/dist/solutions/{p-8b19de1b.entry.js → p-3841527d.entry.js} +2 -2
- package/dist/solutions/p-420de3c4.entry.js +29 -0
- package/dist/solutions/{p-f8df8f60.entry.js → p-46cb43a6.entry.js} +1 -1
- package/dist/solutions/{p-01e27538.entry.js → p-4a418e85.entry.js} +1 -1
- package/dist/solutions/{p-2f504ad4.entry.js → p-4d5989db.entry.js} +2 -2
- package/dist/solutions/{p-972c9f6b.entry.js → p-4ed258b7.entry.js} +1 -1
- package/dist/solutions/{p-aecc26bc.entry.js → p-58022a7b.entry.js} +1 -1
- package/dist/solutions/p-59070b11.entry.js +6 -0
- package/dist/solutions/{p-fee0d21a.entry.js → p-60e33308.entry.js} +1 -1
- package/dist/solutions/{p-32bde829.entry.js → p-6152930f.entry.js} +1 -1
- package/dist/solutions/{p-1c4e26cd.entry.js → p-66e3e92c.entry.js} +1 -1
- package/dist/solutions/{p-5aa00dda.entry.js → p-68a32f82.entry.js} +2 -2
- package/dist/solutions/p-6d81d035.entry.js +12 -0
- package/dist/solutions/{p-062a0a85.entry.js → p-74c52dd8.entry.js} +1 -1
- package/dist/solutions/p-763f2aff.entry.js +6 -0
- package/dist/solutions/{p-e73ac319.entry.js → p-838b5963.entry.js} +1 -1
- package/dist/solutions/p-8717d549.entry.js +11 -0
- package/dist/solutions/p-93d3119d.js +6 -0
- package/dist/solutions/{p-f65f29be.entry.js → p-953d2b0b.entry.js} +1 -1
- package/dist/solutions/{p-b506be5a.entry.js → p-9645aeb2.entry.js} +1 -1
- package/dist/solutions/{p-1d59f41f.entry.js → p-9b36c7c3.entry.js} +2 -2
- package/dist/solutions/{p-6cd67c8f.entry.js → p-9bbaf3a6.entry.js} +1 -1
- package/dist/solutions/{p-3ba01dcf.entry.js → p-9eebe062.entry.js} +1 -1
- package/dist/solutions/p-9efcd26b.entry.js +23 -0
- package/dist/solutions/{p-4d3cc150.entry.js → p-9f4aab0d.entry.js} +1 -1
- package/dist/solutions/p-a25b2981.entry.js +6 -0
- package/dist/solutions/{p-11aefdf6.entry.js → p-a25b5eac.entry.js} +1 -1
- package/dist/solutions/{p-0d969c42.entry.js → p-a2ff7885.entry.js} +1 -1
- package/dist/solutions/{p-cdcf8087.entry.js → p-a47e729e.entry.js} +2 -2
- package/dist/solutions/p-a8def555.entry.js +11 -0
- package/dist/solutions/{p-c5e2efca.entry.js → p-ac1f7035.entry.js} +2 -2
- package/dist/solutions/p-adaf2269.entry.js +6 -0
- package/dist/solutions/{p-60d5be8d.entry.js → p-b498f95f.entry.js} +1 -1
- package/dist/solutions/p-ba3f1e2c.entry.js +6 -0
- package/dist/solutions/p-bd9c54b1.entry.js +12 -0
- package/dist/solutions/{p-28c78bbe.entry.js → p-c188f72f.entry.js} +1 -1
- package/dist/solutions/{p-d6d15e07.entry.js → p-c55027a5.entry.js} +3 -3
- package/dist/solutions/{p-f8910acc.entry.js → p-d63c9fda.entry.js} +1 -1
- package/dist/solutions/{p-7e9bcf39.entry.js → p-d6d803fd.entry.js} +1 -1
- package/dist/solutions/{p-d6d53153.entry.js → p-e9b057bb.entry.js} +1 -1
- package/dist/solutions/{p-e1ac2e9d.entry.js → p-efa46da1.entry.js} +1 -1
- package/dist/solutions/p-fb544e27.entry.js +6 -0
- package/dist/solutions/solutions.css +1 -1
- package/dist/solutions/solutions.esm.js +1 -1
- package/dist/solutions-components_commit.txt +5 -7
- package/dist/types/stencil-public-runtime.d.ts +5 -0
- package/package.json +1 -1
- package/dist/solutions/p-092a0bff.entry.js +0 -12
- package/dist/solutions/p-0b6167b7.entry.js +0 -11
- package/dist/solutions/p-3c69af40.entry.js +0 -6
- package/dist/solutions/p-437e55cb.entry.js +0 -6
- package/dist/solutions/p-4c125f96.entry.js +0 -6
- package/dist/solutions/p-57157b9d.entry.js +0 -12
- package/dist/solutions/p-599afe71.entry.js +0 -6
- package/dist/solutions/p-5ba1efd5.entry.js +0 -6
- package/dist/solutions/p-60deec33.entry.js +0 -6
- package/dist/solutions/p-7e689d39.entry.js +0 -6
- package/dist/solutions/p-7ee9ae73.entry.js +0 -23
- package/dist/solutions/p-87c09099.entry.js +0 -11
- package/dist/solutions/p-ba6ba612.entry.js +0 -6
- package/dist/solutions/p-be63740d.entry.js +0 -6
- package/dist/solutions/p-c89eefda.entry.js +0 -11
- package/dist/solutions/p-cd33aa83.entry.js +0 -6
- package/dist/solutions/p-ce33ef37.js +0 -6
- package/dist/solutions/p-d58c1b71.entry.js +0 -29
- package/dist/solutions/p-e9641c29.entry.js +0 -11
- package/dist/solutions/p-f27e1023.entry.js +0 -22
@@ -8,4 +8,4 @@ import{r as t,c as i,h as e,H as n,g as a}from"./p-be2e3b99.js";import{a as o,i
|
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
10
|
* v1.0.0-beta.97
|
11
|
-
*/const W={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},K=class{constructor(e){t(this,e),this.calciteInternalInputFocus=i(this,"calciteInternalInputFocus",6),this.calciteInternalInputBlur=i(this,"calciteInternalInputBlur",6),this.calciteInputInput=i(this,"calciteInputInput",7),this.calciteInputChange=i(this,"calciteInputChange",6),this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.groupSeparator=!1,this.hidden=!1,this.intlLoading=I.loading,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.editingEnabled=!1,this.type="text",this.value="",this.childElType="input",this.previousValueOrigin="initial",this.mutationObserver=C("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.effectiveLocale="",this.keyDownHandler=t=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===t.key&&(this.clearInputValue(t),t.preventDefault()),"Enter"!==t.key||t.defaultPrevented||m(this)&&t.preventDefault())},this.clearInputValue=t=>{this.setValue({committing:!0,nativeEvent:t,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&this.calciteInputChange.emit(),this.previousEmittedValue=this.value},this.inputBlurHandler=()=>{this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()},this.inputFocusHandler=t=>{const i=o(this.el,"action");t.target!==i&&this.setFocus(),this.calciteInternalInputFocus.emit()},this.inputInputHandler=t=>{this.disabled||this.readOnly||this.setValue({nativeEvent:t,origin:"user",value:t.target.value})},this.inputKeyDownHandler=t=>{this.disabled||this.readOnly||"Enter"===t.key&&this.emitChangeIfUserModified()},this.inputNumberInputHandler=t=>{if(this.disabled||this.readOnly)return;const i=t.target.value;v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const e=v.delocalize(i);"insertFromPaste"===t.inputType?(g(e)||t.preventDefault(),this.setValue({nativeEvent:t,origin:"user",value:x(e)}),this.childNumberEl.value=this.localizedValue):this.setValue({nativeEvent:t,origin:"user",value:e})},this.inputNumberKeyDownHandler=t=>{if("number"!==this.type||this.disabled||this.readOnly)return;if("ArrowUp"===t.key)return t.preventDefault(),void this.nudgeNumberValue("up",t);if("ArrowDown"===t.key)return void this.nudgeNumberValue("down",t);const i=[...D,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.shiftKey&&"Tab"===t.key;if(!i.includes(t.key)||t.shiftKey&&!e){if(v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},t.key===v.decimal){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&-1===this.childNumberEl.value.indexOf(v.decimal))return}if(/[eE]/.test(t.key)){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&!/[eE]/.test(this.childNumberEl.value))return}if("-"===t.key){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&this.childNumberEl.value.split("-").length<=2)return}t.preventDefault()}else"Enter"===t.key&&this.emitChangeIfUserModified()},this.nudgeNumberValue=(t,i)=>{if(i instanceof KeyboardEvent&&i.repeat||"number"!==this.type)return;const e=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(t,e,n,i),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let a=!0;this.nudgeNumberValueIntervalId=window.setInterval((()=>{a?a=!1:this.incrementOrDecrementNumberValue(t,e,n,i)}),100)},this.numberButtonPointerUpAndOutHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.numberButtonPointerDownHandler=t=>{s(t)&&(t.preventDefault(),this.disabled||this.nudgeNumberValue(t.target.dataset.adjustment,t))},this.hiddenInputChangeHandler=t=>{if(t.target.name===this.name){const i=t.target.value,e="number"===this.type?g(i)?i:"":i;this.setValue({value:e,origin:"direct"})}t.stopPropagation()},this.setChildElRef=t=>{this.childEl=t},this.setChildNumberElRef=t=>{this.childNumberEl=t},this.setInputValue=t=>{("text"!==this.type||this.childEl)&&("number"!==this.type||this.childNumberEl)&&(this[`child${"number"===this.type?"Number":""}El`].value=t)},this.setPreviousEmittedValue=t=>{this.previousEmittedValue="number"===this.type?g(t)?t:"":t},this.setPreviousValue=t=>{this.previousValue="number"===this.type?g(t)?t:"":t},this.setValue=({committing:t=!1,nativeEvent:i,origin:e,previousValue:n,value:a})=>{if(v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},"number"===this.type){const t=this.numberingSystem&&"latn"!==this.numberingSystem||"latn"!==y?v.delocalize(a):a,i=k(t),n=a&&!i||[".","-"].includes(i)?g(this.previousValue)?this.previousValue:"":i,o=v.localize(n);this.localizedValue=o,this.userChangedValue="user"===e&&this.value!==n,this.value=n,"direct"===e&&this.setInputValue(o)}else this.userChangedValue="user"===e&&this.value!==a,this.value=a,"direct"===e&&this.setInputValue(a);this.setPreviousValue(n||this.value),this.previousValueOrigin=e,i&&(this.calciteInputInput.emit({element:this.childEl,nativeEvent:i,value:this.value}).defaultPrevented?(this.value=this.previousValue,this.localizedValue="number"===this.type?v.localize(this.previousValue):this.previousValue):t&&this.emitChangeIfUserModified())},this.inputKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)}}disabledWatcher(){this.setDisabledAction()}localeChanged(){w(this)}maxWatcher(){var t;this.maxString=(null===(t=this.max)||void 0===t?void 0:t.toString())||null}minWatcher(){var t;this.minString=(null===(t=this.min)||void 0===t?void 0:t.toString())||null}valueWatcher(t,i){this.userChangedValue||(this.setValue({origin:"direct",previousValue:i,value:null==t||""==t?"":"number"===this.type?g(t)?t:this.previousValue||"":t}),this.warnAboutInvalidNumberValue(t)),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=r(W,this.icon,this.type)}get isClearable(){return!this.isTextarea&&(this.clearable||"search"===this.type)&&this.value.length>0}get isTextarea(){return"textarea"===this.childElType}connectedCallback(){var t;z(this),this.scale=l(this.el,"scale",this.scale),this.status=l(this.el,"status",this.status),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),u(this),p(this),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),"number"===this.type&&(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:g(this.value)?this.value:""})),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var t;h(this),b(this),j(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}componentWillLoad(){var t,i;this.childElType="textarea"===this.type?"textarea":"input",this.maxString=null===(t=this.max)||void 0===t?void 0:t.toString(),this.minString=null===(i=this.min)||void 0===i?void 0:i.toString(),this.requestedIcon=r(W,this.icon,this.type)}componentShouldUpdate(t,i,e){return!("number"===this.type&&"value"===e&&t&&!g(t)&&(this.setValue({origin:"reset",value:i}),1))}componentDidRender(){F(this)}async setFocus(){var t,i;"number"===this.type?null===(t=this.childNumberEl)||void 0===t||t.focus():null===(i=this.childEl)||void 0===i||i.focus()}async selectText(){var t,i;"number"===this.type?null===(t=this.childNumberEl)||void 0===t||t.select():null===(i=this.childEl)||void 0===i||i.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,i,e,n){const{value:a}=this,o="any"===this.step?1:Math.abs(this.step||1),s=a&&""!==a?parseFloat(a):0,r=s+o*("up"===t?1:-1),l="number"==typeof e&&!isNaN(e)&&r<e||"number"==typeof i&&!isNaN(i)&&r>i?s:r,c=E(s),u=E(o);this.setValue({committing:!0,nativeEvent:n,origin:"user",value:l.toFixed(Math.max(c,u))})}onFormReset(){this.setValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(t){var i,e,n,a;"number"===this.type?(t.type="number",t.min=null!==(e=null===(i=this.min)||void 0===i?void 0:i.toString(10))&&void 0!==e?e:"",t.max=null!==(a=null===(n=this.max)||void 0===n?void 0:n.toString(10))&&void 0!==a?a:""):"text"===this.type?(t.type="text",null!=this.minLength&&(t.minLength=this.minLength),null!=this.maxLength&&(t.maxLength=this.maxLength)):"password"===this.type&&(t.type="password")}setDisabledAction(){const t=o(this.el,"action");t&&(this.disabled?t.setAttribute("disabled",""):t.removeAttribute("disabled"))}warnAboutInvalidNumberValue(t){"number"===this.type&&t&&!g(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){const t=c(this.el),i=e("div",{class:"loader"},e("calcite-progress",{label:this.intlLoading,type:"indeterminate"})),a=e("button",{"aria-label":this.intlClear||"Clear value",class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"s"})),o=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"s"}),s="horizontal"===this.numberButtonType,r=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-up",scale:"s"})),l=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-down",scale:"s"})),u=e("div",{class:"number-button-wrapper"},r,l),h=e("div",{class:"prefix"},this.prefixText),m=e("div",{class:"suffix"},this.suffixText),p="number"===this.type?e("input",{"aria-label":d(this),autofocus:!!this.autofocus||null,defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,name:void 0,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildNumberElRef,type:"text",value:this.localizedValue}):null,b="number"!==this.type?[e(this.childElType,{"aria-label":d(this),autofocus:!!this.autofocus||null,class:{"editing-enabled":this.editingEnabled,"inline-child":!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,max:this.maxString,maxLength:this.maxLength,min:this.minString,minLength:this.minLength,name:this.name,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputInputHandler,onKeyDown:this.inputKeyDownHandler,onKeyUp:this.inputKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildElRef,required:!!this.required||null,step:this.step,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:this.type,value:this.value}),this.isTextarea?e("div",{class:"resize-icon-wrapper"},e("calcite-icon",{icon:"chevron-down",scale:"s"})):null]:null;return e(n,{onClick:this.inputFocusHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[_.rtl]:"rtl"===t}},"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:l,this.prefixText?h:null,e("div",{class:"element-wrapper"},p,b,this.isClearable?a:null,this.requestedIcon?o:null,this.loading?i:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),"number"!==this.type||"vertical"!==this.numberButtonType||this.readOnly?null:u,this.suffixText?m:null,"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:r,e(f,{component:this})))}get el(){return a(this)}static get watchers(){return{disabled:["disabledWatcher"],locale:["localeChanged"],max:["maxWatcher"],min:["minWatcher"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"]}}};K.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) textarea{block-size:1.5rem;min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) input[type=file]{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:0.25rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) input[type=file]{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) input[type=file]{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host textarea,:host input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}:host input[type=search]::-webkit-search-decoration{-webkit-appearance:none}:host input,:host textarea{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder,:host textarea::placeholder,:host textarea:-ms-input-placeholder,:host textarea::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus,:host textarea:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly],:host textarea[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus,:host textarea[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}:host textarea,:host input{outline-color:transparent}:host textarea:focus,:host input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{-webkit-padding-start:2rem;padding-inline-start:2rem}:host([icon][scale=m]) input{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host([icon][scale=l]) input{-webkit-padding-start:3rem;padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.icon,.resize-icon-wrapper{z-index:1}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0px}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-ui-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item:active{background-color:var(--calcite-ui-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host input::-webkit-calendar-picker-indicator{display:none}:host input[type=date]::-webkit-input-placeholder{visibility:hidden !important}:host textarea::-webkit-resizer{position:absolute;inset-block-end:0px;box-sizing:border-box;padding-block:0px;padding-inline:0.25rem;inset-inline-end:0}.resize-icon-wrapper{inset-block-end:2px;inset-inline-end:2px;pointer-events:none;position:absolute;block-size:0.75rem;inline-size:0.75rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-3)}.resize-icon-wrapper calcite-icon{inset-block-end:0.25rem;inset-inline-end:0.25rem;transform:rotate(-45deg)}.calcite--rtl .resize-icon-wrapper calcite-icon{transform:rotate(45deg)}:host([type=color]) input{padding:0.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);text-align:center}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:0.5rem}:host([type=file][scale=m]) input{padding-block:0.25rem;padding-inline:0.75rem}:host([type=file][scale=l]) input{padding-block:0.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}:host .inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .inline-child .editing-enabled{background-color:inherit}:host .inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;-webkit-padding-start:0;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const L=class{constructor(i){t(this,i),this.type="determinate",this.value=0,this.reversed=!1}render(){return e("div",{"aria-label":this.label||this.text,"aria-valuemax":1,"aria-valuemin":0,"aria-valuenow":this.value,role:"progressbar"},e("div",{class:"track"},e("div",{class:{bar:!0,indeterminate:"indeterminate"===this.type,reversed:this.reversed},style:"determinate"===this.type?{width:100*this.value+"%"}:{}})),this.text?e("div",{class:"text"},this.text):null)}get el(){return a(this)}};L.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:1;inline-size:100%;overflow:hidden;background:var(--calcite-ui-border-3)}.bar{z-index:1;background-color:var(--calcite-ui-brand)}@media (forced-colors: active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) * 11) linear infinite}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(600%, 0, 0)}}";export{K as calcite_input,L as calcite_progress}
|
11
|
+
*/const W={tel:"phone",password:"lock",email:"email-address",date:"calendar",time:"clock",search:"search"},K=class{constructor(e){t(this,e),this.calciteInternalInputFocus=i(this,"calciteInternalInputFocus",6),this.calciteInternalInputBlur=i(this,"calciteInternalInputBlur",6),this.calciteInputInput=i(this,"calciteInputInput",7),this.calciteInputChange=i(this,"calciteInputChange",6),this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.groupSeparator=!1,this.hidden=!1,this.intlLoading=I.loading,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.editingEnabled=!1,this.type="text",this.value="",this.childElType="input",this.previousValueOrigin="initial",this.mutationObserver=C("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.effectiveLocale="",this.keyDownHandler=t=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===t.key&&(this.clearInputValue(t),t.preventDefault()),"Enter"!==t.key||t.defaultPrevented||m(this)&&t.preventDefault())},this.clearInputValue=t=>{this.setValue({committing:!0,nativeEvent:t,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&this.calciteInputChange.emit(),this.previousEmittedValue=this.value},this.inputBlurHandler=()=>{this.calciteInternalInputBlur.emit(),this.emitChangeIfUserModified()},this.inputFocusHandler=t=>{const i=o(this.el,"action");t.target!==i&&this.setFocus(),this.calciteInternalInputFocus.emit()},this.inputInputHandler=t=>{this.disabled||this.readOnly||this.setValue({nativeEvent:t,origin:"user",value:t.target.value})},this.inputKeyDownHandler=t=>{this.disabled||this.readOnly||"Enter"===t.key&&this.emitChangeIfUserModified()},this.inputNumberInputHandler=t=>{if(this.disabled||this.readOnly)return;const i=t.target.value;v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const e=v.delocalize(i);"insertFromPaste"===t.inputType?(g(e)||t.preventDefault(),this.setValue({nativeEvent:t,origin:"user",value:x(e)}),this.childNumberEl.value=this.localizedValue):this.setValue({nativeEvent:t,origin:"user",value:e})},this.inputNumberKeyDownHandler=t=>{if("number"!==this.type||this.disabled||this.readOnly)return;if("ArrowUp"===t.key)return t.preventDefault(),void this.nudgeNumberValue("up",t);if("ArrowDown"===t.key)return void this.nudgeNumberValue("down",t);const i=[...D,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.shiftKey&&"Tab"===t.key;if(!i.includes(t.key)||t.shiftKey&&!e){if(v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},t.key===v.decimal){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&-1===this.childNumberEl.value.indexOf(v.decimal))return}if(/[eE]/.test(t.key)){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&!/[eE]/.test(this.childNumberEl.value))return}if("-"===t.key){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&this.childNumberEl.value.split("-").length<=2)return}t.preventDefault()}else"Enter"===t.key&&this.emitChangeIfUserModified()},this.nudgeNumberValue=(t,i)=>{if(i instanceof KeyboardEvent&&i.repeat||"number"!==this.type)return;const e=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(t,e,n,i),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let a=!0;this.nudgeNumberValueIntervalId=window.setInterval((()=>{a?a=!1:this.incrementOrDecrementNumberValue(t,e,n,i)}),100)},this.numberButtonPointerUpAndOutHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)},this.numberButtonPointerDownHandler=t=>{s(t)&&(t.preventDefault(),this.disabled||this.nudgeNumberValue(t.target.dataset.adjustment,t))},this.hiddenInputChangeHandler=t=>{if(t.target.name===this.name){const i=t.target.value,e="number"===this.type?g(i)?i:"":i;this.setValue({value:e,origin:"direct"})}t.stopPropagation()},this.setChildElRef=t=>{this.childEl=t},this.setChildNumberElRef=t=>{this.childNumberEl=t},this.setInputValue=t=>{("text"!==this.type||this.childEl)&&("number"!==this.type||this.childNumberEl)&&(this[`child${"number"===this.type?"Number":""}El`].value=t)},this.setPreviousEmittedValue=t=>{this.previousEmittedValue="number"===this.type?g(t)?t:"":t},this.setPreviousValue=t=>{this.previousValue="number"===this.type?g(t)?t:"":t},this.setValue=({committing:t=!1,nativeEvent:i,origin:e,previousValue:n,value:a})=>{if(v.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},"number"===this.type){const t=this.numberingSystem&&"latn"!==this.numberingSystem||"latn"!==y?v.delocalize(a):a,i=k(t),n=a&&!i||[".","-"].includes(i)?g(this.previousValue)?this.previousValue:"":i,o=v.localize(n);this.localizedValue=o,this.userChangedValue="user"===e&&this.value!==n,this.value=n,"direct"===e&&this.setInputValue(o)}else this.userChangedValue="user"===e&&this.value!==a,this.value=a,"direct"===e&&this.setInputValue(a);this.setPreviousValue(n||this.value),this.previousValueOrigin=e,i&&(this.calciteInputInput.emit({element:this.childEl,nativeEvent:i,value:this.value}).defaultPrevented?(this.value=this.previousValue,this.localizedValue="number"===this.type?v.localize(this.previousValue):this.previousValue):t&&this.emitChangeIfUserModified())},this.inputKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)}}disabledWatcher(){this.setDisabledAction()}localeChanged(){w(this)}maxWatcher(){var t;this.maxString=(null===(t=this.max)||void 0===t?void 0:t.toString())||null}minWatcher(){var t;this.minString=(null===(t=this.min)||void 0===t?void 0:t.toString())||null}valueWatcher(t,i){this.userChangedValue||(this.setValue({origin:"direct",previousValue:i,value:null==t||""==t?"":"number"===this.type?g(t)?t:this.previousValue||"":t}),this.warnAboutInvalidNumberValue(t)),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=r(W,this.icon,this.type)}get isClearable(){return!this.isTextarea&&(this.clearable||"search"===this.type)&&this.value.length>0}get isTextarea(){return"textarea"===this.childElType}connectedCallback(){var t;z(this),this.scale=l(this.el,"scale",this.scale),this.status=l(this.el,"status",this.status),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),u(this),p(this),this.setPreviousEmittedValue(this.value),this.setPreviousValue(this.value),"number"===this.type&&(this.warnAboutInvalidNumberValue(this.value),this.setValue({origin:"connected",value:g(this.value)?this.value:""})),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var t;h(this),b(this),j(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}componentWillLoad(){var t,i;this.childElType="textarea"===this.type?"textarea":"input",this.maxString=null===(t=this.max)||void 0===t?void 0:t.toString(),this.minString=null===(i=this.min)||void 0===i?void 0:i.toString(),this.requestedIcon=r(W,this.icon,this.type)}componentShouldUpdate(t,i,e){return!("number"===this.type&&"value"===e&&t&&!g(t)&&(this.setValue({origin:"reset",value:i}),1))}componentDidRender(){F(this)}async setFocus(){var t,i;"number"===this.type?null===(t=this.childNumberEl)||void 0===t||t.focus():null===(i=this.childEl)||void 0===i||i.focus()}async selectText(){var t,i;"number"===this.type?null===(t=this.childNumberEl)||void 0===t||t.select():null===(i=this.childEl)||void 0===i||i.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,i,e,n){const{value:a}=this,o="any"===this.step?1:Math.abs(this.step||1),s=a&&""!==a?parseFloat(a):0,r=s+o*("up"===t?1:-1),l="number"==typeof e&&!isNaN(e)&&r<e||"number"==typeof i&&!isNaN(i)&&r>i?s:r,c=E(s),u=E(o);this.setValue({committing:!0,nativeEvent:n,origin:"user",value:l.toFixed(Math.max(c,u))})}onFormReset(){this.setValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(t){var i,e,n,a;"number"===this.type?(t.type="number",t.min=null!==(e=null===(i=this.min)||void 0===i?void 0:i.toString(10))&&void 0!==e?e:"",t.max=null!==(a=null===(n=this.max)||void 0===n?void 0:n.toString(10))&&void 0!==a?a:""):"text"===this.type?(t.type="text",null!=this.minLength&&(t.minLength=this.minLength),null!=this.maxLength&&(t.maxLength=this.maxLength)):"password"===this.type&&(t.type="password")}setDisabledAction(){const t=o(this.el,"action");t&&(this.disabled?t.setAttribute("disabled",""):t.removeAttribute("disabled"))}warnAboutInvalidNumberValue(t){"number"===this.type&&t&&!g(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){const t=c(this.el),i=e("div",{class:"loader"},e("calcite-progress",{label:this.intlLoading,type:"indeterminate"})),a=e("button",{"aria-label":this.intlClear||"Clear value",class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"s"})),o=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"s"}),s="horizontal"===this.numberButtonType,r=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-up",scale:"s"})),l=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.numberButtonPointerDownHandler,onPointerOut:this.numberButtonPointerUpAndOutHandler,onPointerUp:this.numberButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-down",scale:"s"})),u=e("div",{class:"number-button-wrapper"},r,l),h=e("div",{class:"prefix"},this.prefixText),m=e("div",{class:"suffix"},this.suffixText),p="number"===this.type?e("input",{"aria-label":d(this),autofocus:!!this.autofocus||null,defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,name:void 0,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildNumberElRef,type:"text",value:this.localizedValue}):null,b="number"!==this.type?[e(this.childElType,{"aria-label":d(this),autofocus:!!this.autofocus||null,class:{"editing-enabled":this.editingEnabled,"inline-child":!!this.inlineEditableEl},defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,max:this.maxString,maxLength:this.maxLength,min:this.minString,minLength:this.minLength,name:this.name,onBlur:this.inputBlurHandler,onFocus:this.inputFocusHandler,onInput:this.inputInputHandler,onKeyDown:this.inputKeyDownHandler,onKeyUp:this.inputKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildElRef,required:!!this.required||null,step:this.step,tabIndex:this.disabled||this.inlineEditableEl&&!this.editingEnabled?-1:null,type:this.type,value:this.value}),this.isTextarea?e("div",{class:"resize-icon-wrapper"},e("calcite-icon",{icon:"chevron-down",scale:"s"})):null]:null;return e(n,{onClick:this.inputFocusHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[_.rtl]:"rtl"===t}},"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:l,this.prefixText?h:null,e("div",{class:"element-wrapper"},p,b,this.isClearable?a:null,this.requestedIcon?o:null,this.loading?i:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),"number"!==this.type||"vertical"!==this.numberButtonType||this.readOnly?null:u,this.suffixText?m:null,"number"!==this.type||"horizontal"!==this.numberButtonType||this.readOnly?null:r,e(f,{component:this})))}get el(){return a(this)}static get watchers(){return{disabled:["disabledWatcher"],locale:["localeChanged"],max:["maxWatcher"],min:["minWatcher"],value:["valueWatcher"],icon:["updateRequestedIcon"],type:["updateRequestedIcon"]}}};K.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) textarea{block-size:1.5rem;min-block-size:1.5rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) input[type=file]{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=s]) textarea{block-size:auto;padding-block:0.25rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) textarea{min-block-size:2rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) input[type=file]{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=m]) textarea{block-size:auto;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) textarea{min-block-size:2.75rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) input[type=file]{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([scale=l]) textarea{block-size:auto;padding-block:0.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([disabled]) textarea{resize:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host textarea,:host input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}:host input[type=search]::-webkit-search-decoration{-webkit-appearance:none}:host input,:host textarea{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder,:host textarea::placeholder,:host textarea:-ms-input-placeholder,:host textarea::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus,:host textarea:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly],:host textarea[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus,:host textarea[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}:host textarea,:host input{outline-color:transparent}:host textarea:focus,:host input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input,:host([status=invalid]) textarea{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus,:host([status=invalid]) textarea:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{-webkit-padding-start:2rem;padding-inline-start:2rem}:host([icon][scale=m]) input{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host([icon][scale=l]) input{-webkit-padding-start:3rem;padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.icon,.resize-icon-wrapper{z-index:1}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration,input[type=date]::-webkit-clear-button,input[type=time]::-webkit-clear-button{display:none}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) textarea,:host([alignment=start]) input{text-align:start}:host([alignment=end]) textarea,:host([alignment=end]) input{text-align:end}:host input[type=number]{-moz-appearance:textfield}:host input[type=number]::-webkit-inner-spin-button,:host input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:textfield;margin:0px}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input,:host([number-button-type=vertical]) textarea{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-ui-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item:active{background-color:var(--calcite-ui-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host input::-webkit-calendar-picker-indicator{display:none}:host input[type=date]::-webkit-input-placeholder{visibility:hidden !important}:host textarea::-webkit-resizer{position:absolute;inset-block-end:0px;box-sizing:border-box;padding-block:0px;padding-inline:0.25rem;inset-inline-end:0}.resize-icon-wrapper{inset-block-end:2px;inset-inline-end:2px;pointer-events:none;position:absolute;block-size:0.75rem;inline-size:0.75rem;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-3)}.resize-icon-wrapper calcite-icon{inset-block-end:0.25rem;inset-inline-end:0.25rem;transform:rotate(-45deg)}.calcite--rtl .resize-icon-wrapper calcite-icon{transform:rotate(45deg)}:host([type=color]) input{padding:0.25rem}:host([type=file]) input{cursor:pointer;border-width:1px;border-style:dashed;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);text-align:center}:host([type=file][scale=s]) input{padding-block:1px;padding-inline:0.5rem}:host([type=file][scale=m]) input{padding-block:0.25rem;padding-inline:0.75rem}:host([type=file][scale=l]) input{padding-block:0.5rem;padding-inline:1rem}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}:host .inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .inline-child .editing-enabled{background-color:inherit}:host .inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;-webkit-padding-start:0;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";const L=class{constructor(i){t(this,i),this.type="determinate",this.value=0,this.reversed=!1}render(){return e("div",{"aria-label":this.label||this.text,"aria-valuemax":1,"aria-valuemin":0,"aria-valuenow":this.value,role:"progressbar"},e("div",{class:"track"},e("div",{class:{bar:!0,indeterminate:"indeterminate"===this.type,reversed:this.reversed},style:"determinate"===this.type?{width:100*this.value+"%"}:{}})),this.text?e("div",{class:"text"},this.text):null)}get el(){return a(this)}};L.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:block;inline-size:100%}.track,.bar{position:absolute;inset-block-start:0px;block-size:2px}.track{z-index:1;inline-size:100%;overflow:hidden;background:var(--calcite-ui-border-3)}.bar{z-index:1;background-color:var(--calcite-ui-brand)}@media (forced-colors: active){.track{background-color:highlightText}.bar{background-color:linkText}}.indeterminate{inline-size:20%;animation:looping-progress-bar-ani calc(var(--calcite-internal-animation-timing-medium) * 11) linear infinite}.reversed{animation-direction:reverse}.text{padding-inline:0px;padding-block:1rem 0px;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-2)}@keyframes looping-progress-bar-ani{0%{transform:translate3d(-100%, 0, 0)}50%{inline-size:40%}100%{transform:translate3d(600%, 0, 0)}}";export{K as calcite_input,L as calcite_progress}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as e,c as t,h as i,H as a,g as o,a as n}from"./p-be2e3b99.js";import{f as c,n as r,m as s,a as l,b as d,t as m,l as p}from"./p-32a67cb2.js";import{C as h}from"./p-729708a3.js";import{c as u,d as g}from"./p-61dc587c.js";import{u as b}from"./p-7daea1df.js";import"./p-a80b3880.js";import"./p-9a9955db.js";
|
7
|
+
/*!
|
8
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
+
* v1.0.0-beta.97
|
11
|
+
*/var f;function k(e,t){const i="down"===t?"nextElementSibling":"previousElementSibling";let a=e,o=null;for(;null==(n=a)?void 0:n.matches("calcite-tree-item");){if(!a.disabled){o=a;break}a=a[i]}
|
12
|
+
/*!
|
13
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
15
|
+
* v1.0.0-beta.97
|
16
|
+
*/
|
17
|
+
var n;return o}!function(e){e.Single="single",e.Multi="multi",e.None="none",e.Children="children",e.MultiChildren="multi-children",e.Ancestors="ancestors"}(f||(f={}));const y=class{constructor(i){e(this,i),this.calciteTreeSelect=t(this,"calciteTreeSelect",6),this.lines=!1,this.inputEnabled=!1,this.scale="m",this.selectionMode=f.Single}componentWillRender(){var e;const t=null===(e=this.el.parentElement)||void 0===e?void 0:e.closest("calcite-tree");this.lines=t?t.lines:this.lines,this.scale=t?t.scale:this.scale,this.selectionMode=t?t.selectionMode:this.selectionMode,this.child=!!t}render(){return i(a,{"aria-multiselectable":this.child?void 0:(this.selectionMode===f.Multi||this.selectionMode===f.MultiChildren).toString(),role:this.child?void 0:"tree",tabIndex:this.getRootTabIndex()},i("slot",null))}onFocus(){if(!this.child){const e=this.el.querySelector("calcite-tree-item[selected]:not([disabled])")||this.el.querySelector("calcite-tree-item:not([disabled])");c(e)}}onFocusIn(e){(e.relatedTarget===this.el||!this.el.contains(e.relatedTarget))&&this.el.removeAttribute("tabindex")}onFocusOut(e){!this.el.contains(e.relatedTarget)&&(this.el.tabIndex=this.getRootTabIndex())}onClick(e){const t=e.target,i=r(t.querySelectorAll("calcite-tree-item"));if(this.child)return;if(this.child||(e.preventDefault(),e.stopPropagation()),this.selectionMode===f.Ancestors&&!this.child)return void this.updateAncestorTree(e);const a=this.selectionMode===f.None,o=!a&&e.detail.modifyCurrentSelection&&(this.selectionMode===f.Multi||this.selectionMode===f.MultiChildren),n=this.selectionMode===f.MultiChildren||this.selectionMode===f.Children,c=!o&&((this.selectionMode===f.Single||this.selectionMode===f.Multi)&&i.length<=0||this.selectionMode===f.Children||this.selectionMode===f.MultiChildren),s=this.selectionMode===f.Children||this.selectionMode===f.MultiChildren;if(!this.child){const l=[];null!==this.selectionMode&&(!t.hasChildren||t.hasChildren&&(this.selectionMode===f.Children||this.selectionMode===f.MultiChildren))&&l.push(t),n&&i.forEach((e=>{l.push(e)})),c&&r(this.el.querySelectorAll("calcite-tree-item[selected]")).forEach((e=>{l.includes(e)||(e.selected=!1)})),s&&!e.detail.forceToggle&&(t.expanded=!0),o&&window.getSelection().removeAllRanges(),o&&t.selected||n&&e.detail.forceToggle?l.forEach((e=>{e.disabled||(e.selected=!1)})):a||l.forEach((e=>{e.disabled||(e.selected=!0)}))}const l=a?[t]:r(this.el.querySelectorAll("calcite-tree-item")).filter((e=>e.selected));this.calciteTreeSelect.emit({selected:l}),e.stopPropagation()}keyDownHandler(e){var t;const i=this.el.closest("calcite-tree:not([child])"),a=e.target;if(i===this.el&&"CALCITE-TREE-ITEM"===a.tagName&&this.el.contains(a))if("ArrowDown"!==e.key){if("ArrowUp"===e.key){const t=k(a.previousElementSibling,"up");t&&(t.focus(),e.preventDefault())}if("ArrowLeft"===e.key&&!a.disabled){if(a.hasChildren&&a.expanded)return a.expanded=!1,void e.preventDefault();const t=a.parentElement.closest("calcite-tree-item");return!t||a.hasChildren&&!1!==a.expanded?void 0:(t.focus(),void e.preventDefault())}"ArrowRight"!==e.key||a.disabled||a.hasChildren&&(a.expanded&&s(this.el).activeElement===a?(null===(t=k(a.querySelector("calcite-tree-item"),"down"))||void 0===t||t.focus(),e.preventDefault()):(a.expanded=!0,e.preventDefault()))}else{const t=k(a.nextElementSibling,"down");t&&(t.focus(),e.preventDefault())}}updateAncestorTree(e){const t=e.target;if(t.disabled)return;const i=[];let a=t.parentElement.closest("calcite-tree-item");for(;a;)i.push(a),a=a.parentElement.closest("calcite-tree-item");const o=Array.from(t.querySelectorAll("calcite-tree-item:not([disabled])")),n=o.filter((e=>!e.hasChildren)),c=o.filter((e=>e.hasChildren)),s=t.hasChildren?!(t.selected||t.indeterminate):!t.selected;function l(e,t){const i=e.filter((e=>e.selected)),a=e.filter((e=>!e.selected));t.selected=i.length===e.length,t.indeterminate=i.length>0&&a.length>0}n.forEach((e=>{e.selected=s,e.indeterminate=!1})),c.forEach((e=>{l(Array.from(e.querySelectorAll(":scope > calcite-tree > calcite-tree-item")),e)})),t.hasChildren?l(o,t):(t.selected=s,t.indeterminate=!1),i.forEach((e=>{const t=r(e.querySelectorAll("calcite-tree-item")),i=t.filter((e=>e.selected));if(0===i.length)return e.selected=!1,void(e.indeterminate=!1);const a=i.length<t.length;e.indeterminate=a,e.selected=!a})),this.calciteTreeSelect.emit({selected:r(this.el.querySelectorAll("calcite-tree-item")).filter((e=>e.selected))})}getRootTabIndex(){return this.child?-1:0}get el(){return o(this)}};y.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:block}:host(:focus){outline:2px solid transparent;outline-offset:2px}";
|
18
|
+
/*!
|
19
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
20
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
21
|
+
* v1.0.0-beta.97
|
22
|
+
*/
|
23
|
+
const v=class{constructor(i){e(this,i),this.calciteInternalTreeItemSelect=t(this,"calciteInternalTreeItemSelect",6),this.disabled=!1,this.selected=!1,this.expanded=!1,this.parentExpanded=!1,this.depth=-1,this.hasChildren=null,this.iconClickHandler=e=>{e.stopPropagation(),this.expanded=!this.expanded},this.childrenClickHandler=e=>e.stopPropagation(),this.updateParentIsExpanded=(e,t)=>{l(e,"children",{all:!0,selector:"calcite-tree-item"}).forEach((e=>e.parentExpanded=t))},this.updateAncestorTree=()=>{var e;if(this.selected&&this.selectionMode===f.Ancestors){const t=[];let i=this.parentTreeItem;for(;i;)t.push(i),i=null===(e=i.parentElement)||void 0===e?void 0:e.closest("calcite-tree-item");t.forEach((e=>e.indeterminate=!0))}}}expandedHandler(e){this.updateParentIsExpanded(this.el,e)}getselectionMode(){this.isSelectionMultiLike=this.selectionMode===f.Multi||this.selectionMode===f.MultiChildren}connectedCallback(){var e;if(this.parentTreeItem=null===(e=this.el.parentElement)||void 0===e?void 0:e.closest("calcite-tree-item"),this.parentTreeItem){const{expanded:e}=this.parentTreeItem;this.updateParentIsExpanded(this.parentTreeItem,e)}u(this)}disconnectedCallback(){g(this)}componentWillRender(){var e;this.hasChildren=!!this.el.querySelector("calcite-tree"),this.depth=0;let t,i=this.el.closest("calcite-tree");if(i)for(this.selectionMode=i.selectionMode,this.scale=i.scale||"m",this.lines=i.lines;i&&(t=null===(e=i.parentElement)||void 0===e?void 0:e.closest("calcite-tree"),t!==i);)i=t,this.depth=this.depth+1}componentDidLoad(){this.updateAncestorTree()}componentDidRender(){b(this,(()=>this.parentExpanded||1===this.depth))}render(){const e="rtl"===d(this.el),t=this.selectionMode===f.Single||this.selectionMode===f.Children,o=this.selectionMode===f.Multi||this.selectionMode===f.MultiChildren,n=this.selectionMode===f.None&&!this.hasChildren,c=this.hasChildren?i("calcite-icon",{class:{chevron:!0,[h.rtl]:e},"data-test-id":"icon",icon:"chevron-right",onClick:this.iconClickHandler,scale:"s"}):null,r=i("slot",{key:"default-slot"}),s=this.selectionMode===f.Ancestors?i("label",{class:"checkbox-label",key:"checkbox-label"},i("calcite-checkbox",{checked:this.selected,class:"checkbox","data-test-id":"checkbox",indeterminate:this.hasChildren&&this.indeterminate,scale:this.scale,tabIndex:-1}),r):null,l=t?"bullet-point":o?"check":n?"blank":null,p=l?i("calcite-icon",{class:{"bullet-point":"bullet-point"===l,checkmark:"check"===l,[h.rtl]:e},icon:l,scale:"s"}):null,u=!(this.parentExpanded||1===this.depth);return i(a,{"aria-expanded":this.hasChildren?m(this.expanded):void 0,"aria-hidden":m(u),"aria-selected":this.selected?"true":o?"false":void 0,"calcite-hydrated-hidden":u,role:"treeitem"},i("div",{class:{"node-container":!0,[h.rtl]:e},"data-selection-mode":this.selectionMode,ref:e=>this.defaultSlotWrapper=e},c,p,s||r),i("div",{class:{"children-container":!0,[h.rtl]:e},"data-test-id":"calcite-tree-children",onClick:this.childrenClickHandler,ref:e=>this.childrenSlotWrapper=e,role:this.hasChildren?"group":void 0},i("slot",{name:"children"})))}onClick(e){const[t]=p(this.el,"a");t&&"a"!==e.composedPath()[0].tagName.toLowerCase()&&window.open(t.href,""===t.target?"_self":t.target),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode===f.Ancestors||this.isSelectionMultiLike,forceToggle:!1})}keyDownHandler(e){let t;switch(e.key){case" ":this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,forceToggle:!1}),e.preventDefault();break;case"Enter":const i=r(this.el.children).find((e=>e.matches("a")));i?(i.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,forceToggle:!1}),e.preventDefault();break;case"Home":t=this.el.closest("calcite-tree:not([child])");const a=t.querySelector("calcite-tree-item");null==a||a.focus();break;case"End":t=this.el.closest("calcite-tree:not([child])");let o=t.children[t.children.length-1],n=r(o.children).find((e=>e.matches("calcite-tree")));for(;n;)o=n.children[t.children.length-1],n=r(o.children).find((e=>e.matches("calcite-tree")));null==o||o.focus()}}get el(){return o(this)}static get watchers(){return{expanded:["expandedHandler"],selectionMode:["getselectionMode"]}}};v.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block;max-inline-size:100%;cursor:pointer;color:var(--calcite-ui-text-3)}:host([calcite-hydrated-hidden]){visibility:hidden !important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .node-container{--calcite-tree-padding-y:0.25rem}:host([scale=s]) .node-container .checkbox,:host([scale=s]) .node-container .chevron,:host([scale=s]) .node-container .checkmark,:host([scale=s]) .node-container .bullet-point{margin-inline:0.25rem}:host([scale=m]){font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .node-container{--calcite-tree-padding-y:0.5rem}:host([scale=m]) .node-container .checkbox,:host([scale=m]) .node-container .chevron,:host([scale=m]) .node-container .checkmark,:host([scale=m]) .node-container .bullet-point{margin-inline:0.5rem}:host([scale=l]){font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .node-container{--calcite-tree-padding-y:0.75rem}:host([scale=l]) .node-container .checkbox,:host([scale=l]) .node-container .chevron,:host([scale=l]) .node-container .checkmark,:host([scale=l]) .node-container .bullet-point{margin-inline:0.75rem}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:1;inline-size:1px;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;block-size:96%;content:"";background-color:var(--calcite-ui-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none !important}::slotted(*):hover{text-decoration:none !important}::slotted(a){inline-size:100%;-webkit-text-decoration-line:none;text-decoration-line:none}:host{outline-color:transparent}:host(:focus:not([disabled])){outline:2px solid transparent;outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.checkbox{line-height:0}.checkbox-label{pointer-events:none;display:flex;align-items:center}.checkbox:focus{outline:2px solid transparent;outline-offset:2px}.children-container{position:relative;block-size:0px;overflow:hidden;-webkit-margin-start:1.25rem;margin-inline-start:1.25rem;transform:scaleY(0);opacity:0;transition:var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), opacity var(--calcite-animation-timing) cubic-bezier(0.215, 0.44, 0.42, 0.88), all var(--calcite-animation-timing) ease-in-out;transform-origin:top}:host([expanded])>.children-container{transform:scaleY(1);opacity:1;block-size:auto}.node-container{position:relative;display:flex;align-items:center;padding-block:var(--calcite-tree-padding-y);padding-inline:0}.node-container .checkmark,.node-container .bullet-point{opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;color:var(--calcite-ui-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus:not([disabled])) .node-container .checkmark,:host(:focus:not([disabled])) .node-container .bullet-point{opacity:1}:host([selected])>.node-container,:host([selected])>.node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([selected])>.node-container .bullet-point,:host([selected])>.node-container .checkmark,:host([selected])>.node-container:hover .bullet-point,:host([selected])>.node-container:hover .checkmark{opacity:1;color:var(--calcite-ui-brand)}:host([selection-mode=none]:not([has-children])):host([scale=s])>.node-container{-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}:host([selection-mode=none]:not([has-children])):host([scale=m])>.node-container{-webkit-padding-start:1rem;padding-inline-start:1rem}:host([selection-mode=none]:not([has-children])):host([scale=l])>.node-container{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=s])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.25rem;padding-inline-start:1.25rem}:host(:not([has-children])):host([scale=m])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.5rem;padding-inline-start:1.5rem}:host(:not([has-children])):host([scale=l])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-padding-start:1.75rem;padding-inline-start:1.75rem}:host([has-children])>.node-container[data-selection-mode=ancestors] .checkbox{-webkit-margin-start:0;margin-inline-start:0}:host([has-children])>.node-container .bullet-point,:host([has-children])>.node-container .checkmark{display:none}:host([has-children][expanded]:not([selected]):not([selection-mode=none]))>.node-container ::slotted(*){font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}:host([has-children][selected])>.node-container[data-selection-mode=children],:host([has-children][selected])>.node-container[data-selection-mode=multi-children]{color:var(--calcite-ui-brand)}.chevron{position:relative;align-self:center;color:var(--calcite-ui-text-3);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;flex:0 0 auto;transform:rotate(0deg)}.calcite--rtl .chevron{transform:rotate(180deg)}:host([expanded])>.node-container>.chevron{transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-ui-brand)}';const w=class{constructor(t){e(this,t),this.isPortal=!1,this.type="",this.typeKeywords=[]}render(){return i("div",{title:this.type},i("img",{class:"item-type-icon item-type-icon-margin",height:"16",src:this._getIconUrl(this.type,this.typeKeywords),width:"16"}))}_getIconUrl(e,t){const i=e&&e.toLowerCase()||"";let a=!1,o=!1,c=!1,r=!1,s=!1,l=!1,d="";return t=t||[],i.indexOf("service")>0||"feature collection"===i||"kml"===i||"wms"===i||"wmts"===i||"wfs"===i?(a=t.indexOf("Hosted Service")>-1,"feature service"===i||"feature collection"===i||"kml"===i||"wfs"===i?(r=t.indexOf("Table")>-1,o=t.indexOf("Route Layer")>-1,c=t.indexOf("Markup")>-1,s=-1!==t.indexOf("Spatiotemporal"),d=s&&r?"spatiotemporaltable":r?"table":o?"routelayer":c?"markup":s?"spatiotemporal":a?"featureshosted":"features"):"map service"===i||"wms"===i||"wmts"===i?(s=-1!==t.indexOf("Spatiotemporal"),l=-1!==t.indexOf("Relational"),d=s||l?"mapimages":a||t.indexOf("Tiled")>-1||"wmts"===i?"maptiles":"mapimages"):d="scene service"===i?t.indexOf("Line")>-1?"sceneweblayerline":t.indexOf("3DObject")>-1?"sceneweblayermultipatch":t.indexOf("Point")>-1?"sceneweblayerpoint":t.indexOf("IntegratedMesh")>-1?"sceneweblayermesh":t.indexOf("PointCloud")>-1?"sceneweblayerpointcloud":t.indexOf("Polygon")>-1?"sceneweblayerpolygon":t.indexOf("Building")>-1?"sceneweblayerbuilding":"sceneweblayer":"image service"===i?t.indexOf("Elevation 3D Layer")>-1?"elevationlayer":t.indexOf("Tiled Imagery")>-1?"tiledimagerylayer":"imagery":"stream service"===i?"streamlayer":"vector tile service"===i?"vectortile":"datastore catalog service"===i?"datastorecollection":"geocoding service"===i?"geocodeservice":"geoprocessing service"===i&&t.indexOf("Web Tool")>-1&&this.isPortal?"tool":"layers"):d="web map"===i||"cityengine web scene"===i?"maps":"web scene"===i?t.indexOf("ViewingMode-Local")>-1?"webscenelocal":"websceneglobal":"web mapping application"===i||"mobile application"===i||"application"===i||"operation view"===i||"desktop application"===i?"apps":"map document"===i||"map package"===i||"published map"===i||"scene document"===i||"globe document"===i||"basemap package"===i||"mobile basemap package"===i||"mobile map package"===i||"project package"===i||"project template"===i||"pro map"===i||"layout"===i||"layer"===i&&t.indexOf("ArcGIS Pro")>-1||"explorer map"===i&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===i||"csv"===i||"shapefile"===i||"cad drawing"===i||"geojson"===i||"360 vr experience"===i||"netcdf"===i||"administrative report"===i?"datafiles":"explorer add in"===i||"desktop add in"===i||"windows viewer add in"===i||"windows viewer configuration"===i?"appsgray":"arcgis pro add in"===i||"arcgis pro configuration"===i?"addindesktop":"rule package"===i||"file geodatabase"===i||"sqlite geodatabase"===i||"csv collection"===i||"kml collection"===i||"windows mobile package"===i||"map template"===i||"desktop application template"===i||"gml"===i||"arcpad package"===i||"code sample"===i||"form"===i||"document link"===i||"operations dashboard add in"===i||"rules package"===i||"image"===i||"workflow manager package"===i||"explorer map"===i&&t.indexOf("Explorer Mapping Application")>-1||t.indexOf("Document")>-1?"datafilesgray":"network analysis service"===i||"geoprocessing service"===i||"geodata service"===i||"geometry service"===i||"geoprocessing package"===i||"locator package"===i||"geoprocessing sample"===i||"workflow manager service"===i?"toolsgray":"layer"===i||"layer package"===i||"explorer layer"===i?"layersgray":"scene package"===i?"scenepackage":"mobile scene package"===i?"mobilescenepackage":"tile package"===i||"compact tile package"===i?"tilepackage":"task file"===i?"taskfile":"report template"===i?"report-template":"statistical data collection"===i?"statisticaldatacollection":"insights workbook"===i?"workbook":"insights model"===i?"insightsmodel":"insights page"===i?"insightspage":"insights theme"===i?"insightstheme":"hub initiative"===i?"hubinitiative":"hub page"===i?"hubpage":"hub site application"===i?"hubsite":"hub event"===i?"hubevent":"relational database connection"===i?"relationaldatabaseconnection":"big data file share"===i?"datastorecollection":"image collection"===i?"imagecollection":"desktop style"===i?"desktopstyle":"style"===i?"style":"dashboard"===i?"dashboard":"raster function template"===i?"rasterprocessingtemplate":"vector tile package"===i?"vectortilepackage":"ortho mapping project"===i?"orthomappingproject":"ortho mapping template"===i?"orthomappingtemplate":"solution"===i?"solutions":"geopackage"===i?"geopackage":"deep learning package"===i?"deeplearningpackage":"real time analytic"===i?"realtimeanalytics":"big data analytic"===i?"bigdataanalytics":"feed"===i?"feed":"excalibur imagery project"===i?"excaliburimageryproject":"notebook"===i?"notebook":"storymap"===i?"storymap":"survey123 add in"===i?"survey123addin":"mission"===i?"mission":"mission report"===i?"missionreport":"quickcapture project"===i?"quickcaptureproject":"pro report"===i?"proreport":"urban model"===i?"urbanmodel":"web experience"===i?"experiencebuilder":"web experience template"===i?"webexperiencetemplate":"workflow"===i?"workflow":"kernel gateway connection"===i?"kernelgatewayconnection":"insights script"===i?"insightsscript":"hub initiative template"===i?"hubinitiativetemplate":"storymap theme"===i?"storymaptheme":"group"===i?"group":"maps",d?n("./item-icons/"+d+"16.png"):null}static get assetsDirs(){return["item-icons"]}get el(){return o(this)}};w.style='.item-type-icon{pointer-events:none;display:block;height:1rem;box-sizing:border-box;margin-left:0.75rem;margin-right:0.75rem;min-width:0;flex-grow:0;flex-shrink:1}.item-type-icon-group-1-up>.block{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.item-type-icon-group-2-up>.block{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.item-type-icon-group-3-up>.block{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.item-type-icon-group-4-up>.block{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.item-type-icon-group-5-up>.block{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.item-type-icon-group-6-up>.block{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.item-type-icon-group-7-up>.block{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.item-type-icon-group-8-up>.block{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.tablet-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.tablet-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.tablet-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.tablet-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.tablet-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.tablet-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.tablet-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.tablet-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.phone-block-group-1-up>.item-type-icon{flex-basis:calc(100% - 1.5rem);width:calc(100% - 1.5rem)}.phone-block-group-2-up>.item-type-icon{flex-basis:calc(50% - 1.5rem);width:calc(50% - 1.5rem)}.phone-block-group-3-up>.item-type-icon{flex-basis:calc(33.33333% - 1.5rem);width:calc(33.33333% - 1.5rem)}.phone-block-group-4-up>.item-type-icon{flex-basis:calc(25% - 1.5rem);width:calc(25% - 1.5rem)}.phone-block-group-5-up>.item-type-icon{flex-basis:calc(20% - 1.5rem);width:calc(20% - 1.5rem)}.phone-block-group-6-up>.item-type-icon{flex-basis:calc(16.66666% - 1.5rem);width:calc(16.66666% - 1.5rem)}.phone-block-group-7-up>.item-type-icon{flex-basis:calc(14.2857% - 1.5rem);width:calc(14.2857% - 1.5rem)}.phone-block-group-8-up>.item-type-icon{flex-basis:calc(12.5% - 1.5rem);width:calc(12.5% - 1.5rem)}.code-face .item-type-icon{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:normal}.code-face .item-type-icon b,.code-face .item-type-icon strong{font-weight:400}.code-italic .item-type-icon{letter-spacing:0em;font-family:"Consolas", "Andale Mono", "Lucida Console", "Monaco", monospace;font-weight:400;font-style:italic}.code-italic .item-type-icon b,.code-italic .item-type-icon strong{font-weight:400}.item-type-icon{margin-top:0.15em !important;min-width:16px;fill:currentColor;transform:rotate(360deg)}.item-type-icon-margin{-webkit-margin-end:0.375rem;margin-inline-end:0.375rem}';export{y as calcite_tree,v as calcite_tree_item,w as solution_item_icon}
|
@@ -3,4 +3,4 @@
|
|
3
3
|
* Licensed under the Apache License, Version 2.0
|
4
4
|
* http://www.apache.org/licenses/LICENSE-2.0
|
5
5
|
*/
|
6
|
-
import{r as t,c as i,h as a,F as e,g as n}from"./p-be2e3b99.js";import{T as o,I as c,C as r,S as s}from"./p-de5416e8.js";import{I as l}from"./p-b978636e.js";import{a as d,t as h}from"./p-32a67cb2.js";import{c as m,d as p}from"./p-61dc587c.js";import{u}from"./p-7daea1df.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const f=class{constructor(a){t(this,a),this.calciteListItemChange=i(this,"calciteListItemChange",6),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.calciteInternalListItemPropsChange=i(this,"calciteInternalListItemPropsChange",6),this.calciteInternalListItemValueChange=i(this,"calciteInternalListItemValueChange",6),this.disabled=!1,this.disableDeselect=!1,this.nonInteractive=!1,this.icon=null,this.removable=!1,this.selected=!1,this.intlRemove=o.remove,this.pickListClickHandler=t=>{this.disabled||this.disableDeselect&&this.selected||this.nonInteractive||(this.shiftPressed=t.shiftKey,this.selected=!this.selected)},this.pickListKeyDownHandler=t=>{if(" "===t.key){if(t.preventDefault(),this.disableDeselect&&this.selected||this.nonInteractive)return;this.selected=!this.selected}},this.removeClickHandler=()=>{this.calciteListItemRemove.emit()}}descriptionWatchHandler(){this.calciteInternalListItemPropsChange.emit()}labelWatchHandler(){this.calciteInternalListItemPropsChange.emit()}metadataWatchHandler(){this.calciteInternalListItemPropsChange.emit()}selectedWatchHandler(){this.calciteListItemChange.emit({item:this.el,value:this.value,selected:this.selected,shiftPressed:this.shiftPressed}),this.shiftPressed=!1}valueWatchHandler(t,i){this.calciteInternalListItemValueChange.emit({oldValue:i,newValue:t})}connectedCallback(){m(this)}disconnectedCallback(){p(this)}componentDidRender(){u(this,!!this.el.closest("calcite-pick-list")&&"managed")}async toggleSelected(t){this.selected="boolean"==typeof t?t:!this.selected}async setFocus(){var t;null===(t=this.focusEl)||void 0===t||t.focus()}renderIcon(){const{icon:t}=this;return t?a("span",{class:{[r.icon]:!0,[r.iconDot]:t===l.circle},onClick:this.pickListClickHandler},t===l.square?a("calcite-icon",{icon:c.checked,scale:"s"}):null):null}renderRemoveAction(){return this.removable?a("calcite-action",{class:r.remove,icon:c.remove,onCalciteActionClick:this.removeClickHandler,slot:s.actionsEnd,text:this.intlRemove}):null}renderActionsStart(){const{el:t}=this;return d(t,s.actionsStart)?a("div",{class:{[r.actions]:!0,[r.actionsStart]:!0}},a("slot",{name:s.actionsStart})):null}renderActionsEnd(){const{el:t,removable:i}=this;return d(t,s.actionsEnd)||i?a("div",{class:{[r.actions]:!0,[r.actionsEnd]:!0}},a("slot",{name:s.actionsEnd}),this.renderRemoveAction()):null}render(){const{description:t,label:i}=this;return a(e,null,this.renderIcon(),this.renderActionsStart(),a("label",{"aria-label":i,class:r.label,onClick:this.pickListClickHandler,onKeyDown:this.pickListKeyDownHandler,ref:t=>this.focusEl=t,tabIndex:0},a("div",{"aria-checked":h(this.selected),class:r.textContainer,role:"menuitemcheckbox"},a("span",{class:r.title},i),t?a("span",{class:r.description},t):null)),this.renderActionsEnd())}get el(){return n(this)}static get watchers(){return{description:["descriptionWatchHandler"],label:["labelWatchHandler"],metadata:["metadataWatchHandler"],selected:["selectedWatchHandler"],value:["valueWatchHandler"]}}};f.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none
|
6
|
+
import{r as t,c as i,h as a,F as e,g as n}from"./p-be2e3b99.js";import{T as o,I as c,C as r,S as s}from"./p-de5416e8.js";import{I as l}from"./p-b978636e.js";import{a as d,t as h}from"./p-32a67cb2.js";import{c as m,d as p}from"./p-61dc587c.js";import{u}from"./p-7daea1df.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-9a9955db.js";const f=class{constructor(a){t(this,a),this.calciteListItemChange=i(this,"calciteListItemChange",6),this.calciteListItemRemove=i(this,"calciteListItemRemove",7),this.calciteInternalListItemPropsChange=i(this,"calciteInternalListItemPropsChange",6),this.calciteInternalListItemValueChange=i(this,"calciteInternalListItemValueChange",6),this.disabled=!1,this.disableDeselect=!1,this.nonInteractive=!1,this.icon=null,this.removable=!1,this.selected=!1,this.intlRemove=o.remove,this.pickListClickHandler=t=>{this.disabled||this.disableDeselect&&this.selected||this.nonInteractive||(this.shiftPressed=t.shiftKey,this.selected=!this.selected)},this.pickListKeyDownHandler=t=>{if(" "===t.key){if(t.preventDefault(),this.disableDeselect&&this.selected||this.nonInteractive)return;this.selected=!this.selected}},this.removeClickHandler=()=>{this.calciteListItemRemove.emit()}}descriptionWatchHandler(){this.calciteInternalListItemPropsChange.emit()}labelWatchHandler(){this.calciteInternalListItemPropsChange.emit()}metadataWatchHandler(){this.calciteInternalListItemPropsChange.emit()}selectedWatchHandler(){this.calciteListItemChange.emit({item:this.el,value:this.value,selected:this.selected,shiftPressed:this.shiftPressed}),this.shiftPressed=!1}valueWatchHandler(t,i){this.calciteInternalListItemValueChange.emit({oldValue:i,newValue:t})}connectedCallback(){m(this)}disconnectedCallback(){p(this)}componentDidRender(){u(this,!!this.el.closest("calcite-pick-list")&&"managed")}async toggleSelected(t){this.selected="boolean"==typeof t?t:!this.selected}async setFocus(){var t;null===(t=this.focusEl)||void 0===t||t.focus()}renderIcon(){const{icon:t}=this;return t?a("span",{class:{[r.icon]:!0,[r.iconDot]:t===l.circle},onClick:this.pickListClickHandler},t===l.square?a("calcite-icon",{icon:c.checked,scale:"s"}):null):null}renderRemoveAction(){return this.removable?a("calcite-action",{class:r.remove,icon:c.remove,onCalciteActionClick:this.removeClickHandler,slot:s.actionsEnd,text:this.intlRemove}):null}renderActionsStart(){const{el:t}=this;return d(t,s.actionsStart)?a("div",{class:{[r.actions]:!0,[r.actionsStart]:!0}},a("slot",{name:s.actionsStart})):null}renderActionsEnd(){const{el:t,removable:i}=this;return d(t,s.actionsEnd)||i?a("div",{class:{[r.actions]:!0,[r.actionsEnd]:!0}},a("slot",{name:s.actionsEnd}),this.renderRemoveAction()):null}render(){const{description:t,label:i}=this;return a(e,null,this.renderIcon(),this.renderActionsStart(),a("label",{"aria-label":i,class:r.label,onClick:this.pickListClickHandler,onKeyDown:this.pickListKeyDownHandler,ref:t=>this.focusEl=t,tabIndex:0},a("div",{"aria-checked":h(this.selected),class:r.textContainer,role:"menuitemcheckbox"},a("span",{class:r.title},i),t?a("span",{class:r.description},t):null)),this.renderActionsEnd())}get el(){return n(this)}static get watchers(){return{description:["descriptionWatchHandler"],label:["labelWatchHandler"],metadata:["metadataWatchHandler"],selected:["selectedWatchHandler"],value:["valueWatchHandler"]}}};f.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{margin:0px;-webkit-margin-after:1px;margin-block-end:1px;box-sizing:border-box;display:flex;align-items:stretch;background-color:var(--calcite-ui-foreground-1);font-size:var(--calcite-font-size--1);line-height:1rem;color:var(--calcite-ui-text-1);--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);transition:background-color var(--calcite-animation-timing);animation:calcite-fade-in var(--calcite-animation-timing)}:host *{box-sizing:border-box}.label{display:flex;flex:1 1 auto;cursor:pointer;align-items:center;background-color:transparent;outline-color:transparent}.label:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover{background-color:var(--calcite-ui-foreground-2)}:host([non-interactive]:hover){background-color:var(--calcite-ui-foreground-1)}:host([non-interactive]) .label,:host([non-interactive]) .icon{pointer-events:none}.icon{margin-block:0px;display:flex;cursor:pointer;align-items:center;padding:0.25rem;color:var(--calcite-ui-brand);flex:0 0 auto;line-height:0}.icon:hover{background-color:var(--calcite-ui-foreground-2)}.icon-dot{display:flex;inline-size:1.5rem;align-items:center;padding:0.5rem}.icon-dot:before{opacity:0;content:"•"}.icon calcite-icon{opacity:0}:host([selected]) .icon-dot:before,:host([selected]) .icon calcite-icon{transition:opacity var(--calcite-animation-timing);opacity:1}.text-container{pointer-events:none;display:flex;flex-direction:column;flex-wrap:nowrap;overflow:hidden;padding-block:0.5rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--2);line-height:1.375;word-wrap:break-word;word-break:break-word}.title{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}.description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}.actions{margin:0px;display:flex;flex:0 1 auto;align-items:stretch;justify-content:flex-end}.actions--start~.label{-webkit-padding-start:0.25rem;padding-inline-start:0.25rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}';export{f as calcite_pick_list_item}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as i,h as t,H as e,g as n}from"./p-be2e3b99.js";import{g as l}from"./p-0af82897.js";import"./p-3b010ce1.js";const s=class{constructor(t){i(this,t),this.alignment="VERTICAL",this.distance=100,this.unit=void 0,this._translations=void 0}async getConfigInfo(){return Promise.resolve({distance:this.distance,unit:this.unit})}async componentWillLoad(){await this._getTranslations(),this.unit=this._translations.units.meters}render(){var i,n,l;const s="HORIZONTAL"===this.alignment,a=s?"width-half":"width-full";return t(e,null,t("div",{class:s?"horizontal-display":""},t("div",{class:`${s?"padding-inline-end-1":"padding-block-end-1"} ${a}`},t("calcite-label",{class:"label-spacing"},null===(i=this._translations)||void 0===i?void 0:i.defaultBufferDistance,t("calcite-input",{min:0,"number-button-type":"vertical",onCalciteInputInput:i=>{this._distanceChanged(i)},type:"number",value:this.distance.toString()}))),t("div",{class:`${a}`},t("calcite-label",{class:"label-spacing"},null===(n=this._translations)||void 0===n?void 0:n.defaultUnit,t("calcite-select",{label:null===(l=this._translations)||void 0===l?void 0:l.defaultUnit,onCalciteSelectChange:i=>{this._unitSelectionChange(i)}},this._renderUnitOptions())))))}_distanceChanged(i){this.distance=i.detail.value}_unitSelectionChange(i){this.unit=i.target.value}_renderUnitOptions(){var i;const e=(null===(i=this._translations)||void 0===i?void 0:i.units)||{};return Object.keys(e).map((i=>e[i])).map((i=>t("calcite-option",{label:i,selected:i===this.unit,value:i})))}async _getTranslations(){const i=await l(this.el);this._translations=i[0]}get el(){return n(this)}};s.style=":host{display:block}.horizontal-display{display:flex}.label-spacing{--calcite-label-margin-bottom:0}.padding-inline-end-1{-webkit-padding-end:1rem;padding-inline-end:1rem}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.width-half{width:50%}.width-full{width:100%}";export{s as config_buffer_tools}
|
@@ -8,4 +8,4 @@ import{r as t,c as i,h as a,g as s}from"./p-be2e3b99.js";import{g as e,a as n}fr
|
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
10
|
* v1.0.0-beta.97
|
11
|
-
*/const d=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.disabled=!1,this.editingEnabled=!1,this.loading=!1,this.controls=!1,this.intlEnableEditing="Click to edit",this.intlCancelEditing="Cancel",this.intlConfirmChanges="Save",this.mutationObserver=r("mutation",(()=>this.mutationObserverCallback())),this.enableEditing=()=>{var t,i;this.valuePriorToEditing=null===(t=this.inputElement)||void 0===t?void 0:t.value,this.editingEnabled=!0,null===(i=this.inputElement)||void 0===i||i.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=>{var i;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(),null===(i=this.inputElement)||void 0===i||i.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}}}disabledWatcher(t){this.inputElement&&(this.inputElement.disabled=t)}editingEnabledWatcher(t,i){this.inputElement&&(this.inputElement.editingEnabled=t),!t&&i&&(this.shouldEmitCancel=!0)}connectedCallback(){var t;c(this),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.mutationObserverCallback()}disconnectedCallback(){var t;l(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect()}componentDidRender(){h(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",color:"neutral",disabled:this.disabled,iconStart:"pencil",label:this.intlEnableEditing,onClick:this.enableEditingHandler,ref:t=>this.enableEditingButton=t,scale:this.scale,style:{opacity:this.editingEnabled?"0":"1",width:this.editingEnabled?"0":"inherit"},type:"button"}),this.shouldShowControls&&[a("div",{class:"cancel-editing-button-wrapper"},a("calcite-button",{appearance:"transparent",class:"cancel-editing-button",color:"neutral",disabled:this.disabled,iconStart:"x",label:this.intlCancelEditing,onClick:this.cancelEditingHandler,ref:t=>this.cancelEditingButton=t,scale:this.scale,type:"button"})),a("calcite-button",{appearance:"solid",class:"confirm-changes-button",color:"blue",disabled:this.disabled,iconStart:"check",label:this.intlConfirmChanges,loading:this.loading,onClick:this.confirmChangesHandler,ref:t=>this.confirmEditingButton=t,scale:this.scale,type:"button"})]))}blurHandler(){this.controls||this.disableEditing()}async setFocus(){var t,i;this.editingEnabled?null===(t=this.inputElement)||void 0===t||t.setFocus():null===(i=this.enableEditingButton)||void 0===i||i.setFocus()}mutationObserverCallback(){var t;this.updateSlottedInput(),this.scale=this.scale||(null===(t=this.inputElement)||void 0===t?void 0:t.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||o(this))}get shouldShowControls(){return this.editingEnabled&&this.controls}get el(){return s(this)}static get watchers(){return{disabled:["disabledWatcher"],editingEnabled:["editingEnabledWatcher"]}}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none
|
11
|
+
*/const d=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.disabled=!1,this.editingEnabled=!1,this.loading=!1,this.controls=!1,this.intlEnableEditing="Click to edit",this.intlCancelEditing="Cancel",this.intlConfirmChanges="Save",this.mutationObserver=r("mutation",(()=>this.mutationObserverCallback())),this.enableEditing=()=>{var t,i;this.valuePriorToEditing=null===(t=this.inputElement)||void 0===t?void 0:t.value,this.editingEnabled=!0,null===(i=this.inputElement)||void 0===i||i.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=>{var i;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(),null===(i=this.inputElement)||void 0===i||i.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}}}disabledWatcher(t){this.inputElement&&(this.inputElement.disabled=t)}editingEnabledWatcher(t,i){this.inputElement&&(this.inputElement.editingEnabled=t),!t&&i&&(this.shouldEmitCancel=!0)}connectedCallback(){var t;c(this),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.mutationObserverCallback()}disconnectedCallback(){var t;l(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect()}componentDidRender(){h(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",color:"neutral",disabled:this.disabled,iconStart:"pencil",label:this.intlEnableEditing,onClick:this.enableEditingHandler,ref:t=>this.enableEditingButton=t,scale:this.scale,style:{opacity:this.editingEnabled?"0":"1",width:this.editingEnabled?"0":"inherit"},type:"button"}),this.shouldShowControls&&[a("div",{class:"cancel-editing-button-wrapper"},a("calcite-button",{appearance:"transparent",class:"cancel-editing-button",color:"neutral",disabled:this.disabled,iconStart:"x",label:this.intlCancelEditing,onClick:this.cancelEditingHandler,ref:t=>this.cancelEditingButton=t,scale:this.scale,type:"button"})),a("calcite-button",{appearance:"solid",class:"confirm-changes-button",color:"blue",disabled:this.disabled,iconStart:"check",label:this.intlConfirmChanges,loading:this.loading,onClick:this.confirmChangesHandler,ref:t=>this.confirmEditingButton=t,scale:this.scale,type:"button"})]))}blurHandler(){this.controls||this.disableEditing()}async setFocus(){var t,i;this.editingEnabled?null===(t=this.inputElement)||void 0===t||t.setFocus():null===(i=this.enableEditingButton)||void 0===i||i.setFocus()}mutationObserverCallback(){var t;this.updateSlottedInput(),this.scale=this.scale||(null===(t=this.inputElement)||void 0===t?void 0:t.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||o(this))}get shouldShowControls(){return this.editingEnabled&&this.controls}get el(){return s(this)}static get watchers(){return{disabled:["disabledWatcher"],editingEnabled:["editingEnabledWatcher"]}}};d.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-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{d as calcite_inline_editable}
|
@@ -8,4 +8,4 @@ import{r as t,c as i,h as e,H as n,g as o}from"./p-be2e3b99.js";import{a,i as s,
|
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
10
|
* v1.0.0-beta.97
|
11
|
-
*/const F=class{constructor(e){t(this,e),this.calciteInternalInputNumberFocus=i(this,"calciteInternalInputNumberFocus",6),this.calciteInternalInputNumberBlur=i(this,"calciteInternalInputNumberBlur",6),this.calciteInputNumberInput=i(this,"calciteInputNumberInput",7),this.calciteInputNumberChange=i(this,"calciteInputNumberChange",6),this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.groupSeparator=!1,this.hidden=!1,this.intlLoading=D.loading,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.editingEnabled=!1,this.value="",this.previousValueOrigin="initial",this.mutationObserver=N("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.effectiveLocale="",this.keyDownHandler=t=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===t.key&&(this.clearInputValue(t),t.preventDefault()),"Enter"!==t.key||t.defaultPrevented||m(this)&&t.preventDefault())},this.clearInputValue=t=>{this.setNumberValue({committing:!0,nativeEvent:t,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&this.calciteInputNumberChange.emit(),this.previousEmittedValue=this.value},this.inputNumberBlurHandler=()=>{this.calciteInternalInputNumberBlur.emit(),this.emitChangeIfUserModified()},this.inputNumberFocusHandler=t=>{const i=a(this.el,"action");t.target!==i&&this.setFocus(),this.calciteInternalInputNumberFocus.emit()},this.inputNumberInputHandler=t=>{if(this.disabled||this.readOnly)return;const i=t.target.value;f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const e=f.delocalize(i);"insertFromPaste"===t.inputType?(g(e)||t.preventDefault(),this.setNumberValue({nativeEvent:t,origin:"user",value:x(e)}),this.childNumberEl.value=this.localizedValue):this.setNumberValue({nativeEvent:t,origin:"user",value:e})},this.inputNumberKeyDownHandler=t=>{if(this.disabled||this.readOnly)return;if("ArrowUp"===t.key)return t.preventDefault(),void this.nudgeNumberValue("up",t);if("ArrowDown"===t.key)return void this.nudgeNumberValue("down",t);const i=[...I,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.shiftKey&&"Tab"===t.key;if(!i.includes(t.key)||t.shiftKey&&!e){if(f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},t.key===f.decimal){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&-1===this.childNumberEl.value.indexOf(f.decimal))return}if(/[eE]/.test(t.key)){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&!/[eE]/.test(this.childNumberEl.value))return}if("-"===t.key){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&this.childNumberEl.value.split("-").length<=2)return}t.preventDefault()}else"Enter"===t.key&&this.emitChangeIfUserModified()},this.nudgeNumberValue=(t,i)=>{if(i instanceof KeyboardEvent&&i.repeat)return;const e=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(t,e,n,i),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let o=!0;this.nudgeNumberValueIntervalId=window.setInterval((()=>{o?o=!1:this.incrementOrDecrementNumberValue(t,e,n,i)}),100)},this.nudgeButtonPointerUpAndOutHandler=t=>{s(t)&&window.clearInterval(this.nudgeNumberValueIntervalId)},this.nudgeButtonPointerDownHandler=t=>{s(t)&&(t.preventDefault(),this.disabled||this.nudgeNumberValue(t.target.dataset.adjustment,t))},this.hiddenInputChangeHandler=t=>{t.target.name===this.name&&this.setNumberValue({value:t.target.value,origin:"direct"}),t.stopPropagation()},this.setChildNumberElRef=t=>{this.childNumberEl=t},this.setInputNumberValue=t=>{this.childNumberEl&&(this.childNumberEl.value=t)},this.setPreviousEmittedNumberValue=t=>{this.previousEmittedValue=g(t)?t:""},this.setPreviousNumberValue=t=>{this.previousValue=g(t)?t:""},this.setNumberValue=({committing:t=!1,nativeEvent:i,origin:e,previousValue:n,value:o})=>{f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const a=w(this.numberingSystem&&"latn"!==this.numberingSystem||"latn"!==y?f.delocalize(o):o),s=o&&!a?g(this.previousValue)?this.previousValue:"":a,r=f.localize(s);if(this.setPreviousNumberValue(n||this.value),this.previousValueOrigin=e,this.userChangedValue="user"===e&&this.value!==s,this.value=s,this.localizedValue=r,"direct"===e&&this.setInputNumberValue(r),i)if(this.calciteInputNumberInput.emit({element:this.childNumberEl,nativeEvent:i,value:this.value}).defaultPrevented){const t=f.localize(this.previousValue);this.value=this.previousValue,this.localizedValue=t}else t&&this.emitChangeIfUserModified()},this.inputNumberKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)}}disabledWatcher(){this.setDisabledAction()}localeChanged(){k(this)}maxWatcher(){var t;this.maxString=(null===(t=this.max)||void 0===t?void 0:t.toString())||null}minWatcher(){var t;this.minString=(null===(t=this.min)||void 0===t?void 0:t.toString())||null}valueWatcher(t,i){this.userChangedValue||(this.setNumberValue({origin:"direct",previousValue:i,value:null==t||""==t?"":g(t)?t:this.previousValue||""}),this.warnAboutInvalidNumberValue(t)),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=r({},this.icon,"number")}get isClearable(){return this.clearable&&this.value.length>0}connectedCallback(){var t;z(this),this.scale=l(this.el,"scale",this.scale),this.status=l(this.el,"status",this.status),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),u(this),b(this),this.setPreviousEmittedNumberValue(this.value),this.setPreviousNumberValue(this.value),this.warnAboutInvalidNumberValue(this.value),this.setNumberValue({origin:"connected",value:g(this.value)?this.value:""}),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var t;h(this),p(this),j(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}componentWillLoad(){var t,i;this.maxString=null===(t=this.max)||void 0===t?void 0:t.toString(),this.minString=null===(i=this.min)||void 0===i?void 0:i.toString(),this.requestedIcon=r({},this.icon,"number")}componentShouldUpdate(t,i,e){return!("value"===e&&t&&!g(t)&&(this.setNumberValue({origin:"reset",value:i}),1))}componentDidRender(){_(this)}async setFocus(){var t;null===(t=this.childNumberEl)||void 0===t||t.focus()}async selectText(){var t;null===(t=this.childNumberEl)||void 0===t||t.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,i,e,n){const{value:o}=this,a="any"===this.step?1:Math.abs(this.step||1),s=o&&""!==o?parseFloat(o):0,r=s+a*("up"===t?1:-1),l="number"==typeof e&&!isNaN(e)&&r<e||"number"==typeof i&&!isNaN(i)&&r>i?s:r,c=C(s),u=C(a);this.setNumberValue({committing:!0,nativeEvent:n,origin:"user",value:l.toFixed(Math.max(c,u))})}onFormReset(){this.setNumberValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(t){var i,e,n,o;t.type="number",t.min=null!==(e=null===(i=this.min)||void 0===i?void 0:i.toString(10))&&void 0!==e?e:"",t.max=null!==(o=null===(n=this.max)||void 0===n?void 0:n.toString(10))&&void 0!==o?o:""}setDisabledAction(){const t=a(this.el,"action");t&&(this.disabled?t.setAttribute("disabled",""):t.removeAttribute("disabled"))}warnAboutInvalidNumberValue(t){t&&!g(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){const t=c(this.el),i=e("div",{class:"loader"},e("calcite-progress",{label:this.intlLoading,type:"indeterminate"})),o=e("button",{"aria-label":this.intlClear||"Clear value",class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"s"})),a=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"s"}),s="horizontal"===this.numberButtonType,r=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.nudgeButtonPointerDownHandler,onPointerOut:this.nudgeButtonPointerUpAndOutHandler,onPointerUp:this.nudgeButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-up",scale:"s"})),l=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.nudgeButtonPointerDownHandler,onPointerOut:this.nudgeButtonPointerUpAndOutHandler,onPointerUp:this.nudgeButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-down",scale:"s"})),u=e("div",{class:"number-button-wrapper"},r,l),h=e("div",{class:"prefix"},this.prefixText),m=e("div",{class:"suffix"},this.suffixText),b=e("input",{"aria-label":d(this),autofocus:!!this.autofocus||null,defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,name:void 0,onBlur:this.inputNumberBlurHandler,onFocus:this.inputNumberFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputNumberKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildNumberElRef,type:"text",value:this.localizedValue});return e(n,{onClick:this.inputNumberFocusHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[E.rtl]:"rtl"===t}},"horizontal"!==this.numberButtonType||this.readOnly?null:l,this.prefixText?h:null,e("div",{class:"element-wrapper"},b,this.isClearable?o:null,this.requestedIcon?a:null,this.loading?i:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),"vertical"!==this.numberButtonType||this.readOnly?null:u,this.suffixText?m:null,"horizontal"!==this.numberButtonType||this.readOnly?null:r,e(v,{component:this})))}get el(){return o(this)}static get watchers(){return{disabled:["disabledWatcher"],locale:["localeChanged"],max:["maxWatcher"],min:["minWatcher"],value:["valueWatcher"],icon:["updateRequestedIcon"]}}};F.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input:-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}:host input{outline-color:transparent}:host input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{-webkit-padding-start:2rem;padding-inline-start:2rem}:host([icon][scale=m]) input{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host([icon][scale=l]) input{-webkit-padding-start:3rem;padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;z-index:1;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-ui-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item:active{background-color:var(--calcite-ui-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}:host .inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .inline-child .editing-enabled{background-color:inherit}:host .inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;-webkit-padding-start:0;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{F as calcite_input_number}
|
11
|
+
*/const F=class{constructor(e){t(this,e),this.calciteInternalInputNumberFocus=i(this,"calciteInternalInputNumberFocus",6),this.calciteInternalInputNumberBlur=i(this,"calciteInternalInputNumberBlur",6),this.calciteInputNumberInput=i(this,"calciteInputNumberInput",7),this.calciteInputNumberChange=i(this,"calciteInputNumberChange",6),this.alignment="start",this.autofocus=!1,this.clearable=!1,this.disabled=!1,this.groupSeparator=!1,this.hidden=!1,this.intlLoading=D.loading,this.iconFlipRtl=!1,this.loading=!1,this.localeFormat=!1,this.numberButtonType="vertical",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.editingEnabled=!1,this.value="",this.previousValueOrigin="initial",this.mutationObserver=N("mutation",(()=>this.setDisabledAction())),this.userChangedValue=!1,this.effectiveLocale="",this.keyDownHandler=t=>{this.readOnly||this.disabled||(this.isClearable&&"Escape"===t.key&&(this.clearInputValue(t),t.preventDefault()),"Enter"!==t.key||t.defaultPrevented||m(this)&&t.preventDefault())},this.clearInputValue=t=>{this.setNumberValue({committing:!0,nativeEvent:t,origin:"user",value:""})},this.emitChangeIfUserModified=()=>{"user"===this.previousValueOrigin&&this.value!==this.previousEmittedValue&&this.calciteInputNumberChange.emit(),this.previousEmittedValue=this.value},this.inputNumberBlurHandler=()=>{this.calciteInternalInputNumberBlur.emit(),this.emitChangeIfUserModified()},this.inputNumberFocusHandler=t=>{const i=a(this.el,"action");t.target!==i&&this.setFocus(),this.calciteInternalInputNumberFocus.emit()},this.inputNumberInputHandler=t=>{if(this.disabled||this.readOnly)return;const i=t.target.value;f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const e=f.delocalize(i);"insertFromPaste"===t.inputType?(g(e)||t.preventDefault(),this.setNumberValue({nativeEvent:t,origin:"user",value:x(e)}),this.childNumberEl.value=this.localizedValue):this.setNumberValue({nativeEvent:t,origin:"user",value:e})},this.inputNumberKeyDownHandler=t=>{if(this.disabled||this.readOnly)return;if("ArrowUp"===t.key)return t.preventDefault(),void this.nudgeNumberValue("up",t);if("ArrowDown"===t.key)return void this.nudgeNumberValue("down",t);const i=[...I,"ArrowLeft","ArrowRight","Backspace","Delete","Enter","Escape","Tab"];if(t.altKey||t.ctrlKey||t.metaKey)return;const e=t.shiftKey&&"Tab"===t.key;if(!i.includes(t.key)||t.shiftKey&&!e){if(f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator},t.key===f.decimal){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&-1===this.childNumberEl.value.indexOf(f.decimal))return}if(/[eE]/.test(t.key)){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&!/[eE]/.test(this.childNumberEl.value))return}if("-"===t.key){if(!this.value&&!this.childNumberEl.value)return;if(this.value&&this.childNumberEl.value.split("-").length<=2)return}t.preventDefault()}else"Enter"===t.key&&this.emitChangeIfUserModified()},this.nudgeNumberValue=(t,i)=>{if(i instanceof KeyboardEvent&&i.repeat)return;const e=this.maxString?parseFloat(this.maxString):null,n=this.minString?parseFloat(this.minString):null;this.incrementOrDecrementNumberValue(t,e,n,i),this.nudgeNumberValueIntervalId&&window.clearInterval(this.nudgeNumberValueIntervalId);let o=!0;this.nudgeNumberValueIntervalId=window.setInterval((()=>{o?o=!1:this.incrementOrDecrementNumberValue(t,e,n,i)}),100)},this.nudgeButtonPointerUpAndOutHandler=t=>{s(t)&&window.clearInterval(this.nudgeNumberValueIntervalId)},this.nudgeButtonPointerDownHandler=t=>{s(t)&&(t.preventDefault(),this.disabled||this.nudgeNumberValue(t.target.dataset.adjustment,t))},this.hiddenInputChangeHandler=t=>{t.target.name===this.name&&this.setNumberValue({value:t.target.value,origin:"direct"}),t.stopPropagation()},this.setChildNumberElRef=t=>{this.childNumberEl=t},this.setInputNumberValue=t=>{this.childNumberEl&&(this.childNumberEl.value=t)},this.setPreviousEmittedNumberValue=t=>{this.previousEmittedValue=g(t)?t:""},this.setPreviousNumberValue=t=>{this.previousValue=g(t)?t:""},this.setNumberValue=({committing:t=!1,nativeEvent:i,origin:e,previousValue:n,value:o})=>{f.numberFormatOptions={locale:this.effectiveLocale,numberingSystem:this.numberingSystem,useGrouping:this.groupSeparator};const a=w(this.numberingSystem&&"latn"!==this.numberingSystem||"latn"!==y?f.delocalize(o):o),s=o&&!a?g(this.previousValue)?this.previousValue:"":a,r=f.localize(s);if(this.setPreviousNumberValue(n||this.value),this.previousValueOrigin=e,this.userChangedValue="user"===e&&this.value!==s,this.value=s,this.localizedValue=r,"direct"===e&&this.setInputNumberValue(r),i)if(this.calciteInputNumberInput.emit({element:this.childNumberEl,nativeEvent:i,value:this.value}).defaultPrevented){const t=f.localize(this.previousValue);this.value=this.previousValue,this.localizedValue=t}else t&&this.emitChangeIfUserModified()},this.inputNumberKeyUpHandler=()=>{window.clearInterval(this.nudgeNumberValueIntervalId)}}disabledWatcher(){this.setDisabledAction()}localeChanged(){k(this)}maxWatcher(){var t;this.maxString=(null===(t=this.max)||void 0===t?void 0:t.toString())||null}minWatcher(){var t;this.minString=(null===(t=this.min)||void 0===t?void 0:t.toString())||null}valueWatcher(t,i){this.userChangedValue||(this.setNumberValue({origin:"direct",previousValue:i,value:null==t||""==t?"":g(t)?t:this.previousValue||""}),this.warnAboutInvalidNumberValue(t)),this.userChangedValue=!1}updateRequestedIcon(){this.requestedIcon=r({},this.icon,"number")}get isClearable(){return this.clearable&&this.value.length>0}connectedCallback(){var t;z(this),this.scale=l(this.el,"scale",this.scale),this.status=l(this.el,"status",this.status),this.inlineEditableEl=this.el.closest("calcite-inline-editable"),this.inlineEditableEl&&(this.editingEnabled=this.inlineEditableEl.editingEnabled||!1),u(this),b(this),this.setPreviousEmittedNumberValue(this.value),this.setPreviousNumberValue(this.value),this.warnAboutInvalidNumberValue(this.value),this.setNumberValue({origin:"connected",value:g(this.value)?this.value:""}),null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0}),this.setDisabledAction(),this.el.addEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}disconnectedCallback(){var t;h(this),p(this),j(this),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.el.removeEventListener("calciteInternalHiddenInputChange",this.hiddenInputChangeHandler)}componentWillLoad(){var t,i;this.maxString=null===(t=this.max)||void 0===t?void 0:t.toString(),this.minString=null===(i=this.min)||void 0===i?void 0:i.toString(),this.requestedIcon=r({},this.icon,"number")}componentShouldUpdate(t,i,e){return!("value"===e&&t&&!g(t)&&(this.setNumberValue({origin:"reset",value:i}),1))}componentDidRender(){_(this)}async setFocus(){var t;null===(t=this.childNumberEl)||void 0===t||t.focus()}async selectText(){var t;null===(t=this.childNumberEl)||void 0===t||t.select()}onLabelClick(){this.setFocus()}incrementOrDecrementNumberValue(t,i,e,n){const{value:o}=this,a="any"===this.step?1:Math.abs(this.step||1),s=o&&""!==o?parseFloat(o):0,r=s+a*("up"===t?1:-1),l="number"==typeof e&&!isNaN(e)&&r<e||"number"==typeof i&&!isNaN(i)&&r>i?s:r,c=C(s),u=C(a);this.setNumberValue({committing:!0,nativeEvent:n,origin:"user",value:l.toFixed(Math.max(c,u))})}onFormReset(){this.setNumberValue({origin:"reset",value:this.defaultValue})}syncHiddenFormInput(t){var i,e,n,o;t.type="number",t.min=null!==(e=null===(i=this.min)||void 0===i?void 0:i.toString(10))&&void 0!==e?e:"",t.max=null!==(o=null===(n=this.max)||void 0===n?void 0:n.toString(10))&&void 0!==o?o:""}setDisabledAction(){const t=a(this.el,"action");t&&(this.disabled?t.setAttribute("disabled",""):t.removeAttribute("disabled"))}warnAboutInvalidNumberValue(t){t&&!g(t)&&console.warn(`The specified value "${t}" cannot be parsed, or is out of range.`)}render(){const t=c(this.el),i=e("div",{class:"loader"},e("calcite-progress",{label:this.intlLoading,type:"indeterminate"})),o=e("button",{"aria-label":this.intlClear||"Clear value",class:"clear-button",disabled:this.disabled||this.readOnly,onClick:this.clearInputValue,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"x",scale:"s"})),a=e("calcite-icon",{class:"icon",flipRtl:this.iconFlipRtl,icon:this.requestedIcon,scale:"s"}),s="horizontal"===this.numberButtonType,r=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"up",disabled:this.disabled||this.readOnly,onPointerDown:this.nudgeButtonPointerDownHandler,onPointerOut:this.nudgeButtonPointerUpAndOutHandler,onPointerUp:this.nudgeButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-up",scale:"s"})),l=e("button",{"aria-hidden":"true",class:{"number-button-item":!0,"number-button-item--horizontal":s},"data-adjustment":"down",disabled:this.disabled||this.readOnly,onPointerDown:this.nudgeButtonPointerDownHandler,onPointerOut:this.nudgeButtonPointerUpAndOutHandler,onPointerUp:this.nudgeButtonPointerUpAndOutHandler,tabIndex:-1,type:"button"},e("calcite-icon",{icon:"chevron-down",scale:"s"})),u=e("div",{class:"number-button-wrapper"},r,l),h=e("div",{class:"prefix"},this.prefixText),m=e("div",{class:"suffix"},this.suffixText),b=e("input",{"aria-label":d(this),autofocus:!!this.autofocus||null,defaultValue:this.defaultValue,disabled:!!this.disabled||null,enterKeyHint:this.el.enterKeyHint,inputMode:this.el.inputMode,key:"localized-input",maxLength:this.maxLength,minLength:this.minLength,name:void 0,onBlur:this.inputNumberBlurHandler,onFocus:this.inputNumberFocusHandler,onInput:this.inputNumberInputHandler,onKeyDown:this.inputNumberKeyDownHandler,onKeyUp:this.inputNumberKeyUpHandler,placeholder:this.placeholder||"",readOnly:this.readOnly,ref:this.setChildNumberElRef,type:"text",value:this.localizedValue});return e(n,{onClick:this.inputNumberFocusHandler,onKeyDown:this.keyDownHandler},e("div",{class:{wrapper:!0,[E.rtl]:"rtl"===t}},"horizontal"!==this.numberButtonType||this.readOnly?null:l,this.prefixText?h:null,e("div",{class:"element-wrapper"},b,this.isClearable?o:null,this.requestedIcon?a:null,this.loading?i:null),e("div",{class:"action-wrapper"},e("slot",{name:"action"})),"vertical"!==this.numberButtonType||this.readOnly?null:u,this.suffixText?m:null,"horizontal"!==this.numberButtonType||this.readOnly?null:r,e(v,{component:this})))}get el(){return o(this)}static get watchers(){return{disabled:["disabledWatcher"],locale:["localeChanged"],max:["maxWatcher"],min:["minWatcher"],value:["valueWatcher"],icon:["updateRequestedIcon"]}}};F.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .number-button-wrapper,:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .number-button-wrapper,:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .number-button-wrapper,:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}:host input{outline-color:transparent}:host input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{-webkit-padding-start:2rem;padding-inline-start:2rem}:host([icon][scale=m]) input{-webkit-padding-start:2.5rem;padding-inline-start:2.5rem}:host([icon][scale=l]) input{-webkit-padding-start:3rem;padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;z-index:1;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}.number-button-wrapper{pointer-events:none;order:6;box-sizing:border-box;display:flex;flex-direction:column;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host([number-button-type=vertical]) .wrapper{flex-direction:row;display:flex}:host([number-button-type=vertical]) input{order:2}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=down] calcite-icon{transform:rotate(-90deg)}:host([number-button-type=horizontal]) .calcite--rtl .number-button-item[data-adjustment=up] calcite-icon{transform:rotate(-90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down],.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:1;max-block-size:100%;min-block-size:100%;align-self:stretch}.number-button-item.number-button-item--horizontal[data-adjustment=down] calcite-icon,.number-button-item.number-button-item--horizontal[data-adjustment=up] calcite-icon{transform:rotate(90deg)}.number-button-item.number-button-item--horizontal[data-adjustment=down]{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);border-inline-end-width:0px}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item.number-button-item--horizontal[data-adjustment=up]{order:5}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}.number-button-item.number-button-item--horizontal[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover{background-color:var(--calcite-ui-foreground-2)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=up]:hover calcite-icon{color:var(--calcite-ui-text-1)}:host([number-button-type=vertical]) .number-button-item[data-adjustment=down]{border-block-start-width:0px}.number-button-item{max-block-size:50%;min-block-size:50%;pointer-events:initial;margin:0px;box-sizing:border-box;display:flex;cursor:pointer;align-items:center;align-self:center;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);padding-block:0px;padding-inline:0.5rem;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;border-inline-start-width:0px}.number-button-item calcite-icon{pointer-events:none;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.number-button-item:focus{background-color:var(--calcite-ui-foreground-2)}.number-button-item:focus calcite-icon{color:var(--calcite-ui-text-1)}.number-button-item:active{background-color:var(--calcite-ui-foreground-3)}.number-button-item:disabled{pointer-events:none}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}:host .inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}:host .inline-child .editing-enabled{background-color:inherit}:host .inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;-webkit-padding-start:0;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{F as calcite_input_number}
|
@@ -8,10 +8,10 @@ import{r as t,h as n,H as a,g as e}from"./p-be2e3b99.js";import{u as i}from"./p-
|
|
8
8
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
9
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
10
|
* v1.0.0-beta.97
|
11
|
-
*/const l=class{constructor(n){t(this,n),this.disabled=!1}componentDidRender(){i(this)}async setFocus(){const t=this.el.querySelector("calcite-list-item:not([non-interactive])");null==t||t.setFocus()}render(){return n(a,{role:"list"},n("div",{class:"container"},n("slot",null)))}get el(){return e(this)}};l.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none
|
11
|
+
*/const l=class{constructor(n){t(this,n),this.disabled=!1}componentDidRender(){i(this)}async setFocus(){const t=this.el.querySelector("calcite-list-item:not([non-interactive])");null==t||t.setFocus()}render(){return n(a,{role:"list"},n("div",{class:"container"},n("slot",null)))}get el(){return e(this)}};l.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;inline-size:100%;flex-direction:column;background-color:transparent}.container *{box-sizing:border-box}::slotted(calcite-list-item){-webkit-margin-after:1px;margin-block-end:1px;--tw-shadow:0 1px 0 var(--calcite-ui-border-3);--tw-shadow-colored:0 1px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}::slotted(calcite-list-item:last-child){--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)}";
|
12
12
|
/*!
|
13
13
|
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
14
14
|
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
15
15
|
* v1.0.0-beta.97
|
16
16
|
*/
|
17
|
-
const s=class{constructor(n){t(this,n),this.nonInteractive=!1,this.disabled=!1}componentDidRender(){i(this)}connectedCallback(){c(this)}disconnectedCallback(){r(this)}async setFocus(){var t;null===(t=this.focusEl)||void 0===t||t.focus()}renderActionsStart(){const{el:t}=this;return o(t,"actions-start")?n("div",{class:"actions-start"},n("slot",{name:"actions-start"})):null}renderActionsEnd(){const{el:t}=this;return o(t,"actions-end")?n("div",{class:"actions-end"},n("slot",{name:"actions-end"})):null}renderContentStart(){const{el:t}=this;return o(t,"content-start")?n("div",{class:"content-start"},n("slot",{name:"content-start"})):null}renderContentEnd(){const{el:t}=this;return o(t,"content-end")?n("div",{class:"content-end"},n("slot",{name:"content-end"})):null}renderContent(){const{label:t,description:a}=this;return t||a?n("div",{class:"content"},t?n("div",{class:"label"},t):null,a?n("div",{class:"description"},a):null):null}renderContentContainer(){const{description:t,disabled:a,label:e,nonInteractive:i}=this,o=!!e||!!t,c=[this.renderContentStart(),this.renderContent(),this.renderContentEnd()];return i?n("div",{class:{"content-container":!0,"has-center-content":o},ref:()=>this.focusEl=null},c):n("button",{class:{"content-container":!0,"content-container--button":!0,"has-center-content":o},disabled:a,ref:t=>this.focusEl=t},c)}render(){return n(a,{role:"listitem"},n("div",{class:"container"},this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),n("div",{class:"nested-container"},n("slot",null)))}get el(){return e(this)}};s.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none
|
17
|
+
const s=class{constructor(n){t(this,n),this.nonInteractive=!1,this.disabled=!1}componentDidRender(){i(this)}connectedCallback(){c(this)}disconnectedCallback(){r(this)}async setFocus(){var t;null===(t=this.focusEl)||void 0===t||t.focus()}renderActionsStart(){const{el:t}=this;return o(t,"actions-start")?n("div",{class:"actions-start"},n("slot",{name:"actions-start"})):null}renderActionsEnd(){const{el:t}=this;return o(t,"actions-end")?n("div",{class:"actions-end"},n("slot",{name:"actions-end"})):null}renderContentStart(){const{el:t}=this;return o(t,"content-start")?n("div",{class:"content-start"},n("slot",{name:"content-start"})):null}renderContentEnd(){const{el:t}=this;return o(t,"content-end")?n("div",{class:"content-end"},n("slot",{name:"content-end"})):null}renderContent(){const{label:t,description:a}=this;return t||a?n("div",{class:"content"},t?n("div",{class:"label"},t):null,a?n("div",{class:"description"},a):null):null}renderContentContainer(){const{description:t,disabled:a,label:e,nonInteractive:i}=this,o=!!e||!!t,c=[this.renderContentStart(),this.renderContent(),this.renderContentEnd()];return i?n("div",{class:{"content-container":!0,"has-center-content":o},ref:()=>this.focusEl=null},c):n("button",{class:{"content-container":!0,"content-container--button":!0,"has-center-content":o},disabled:a,ref:t=>this.focusEl=t},c)}render(){return n(a,{role:"listitem"},n("div",{class:"container"},this.renderActionsStart(),this.renderContentContainer(),this.renderActionsEnd()),n("div",{class:"nested-container"},n("slot",null)))}get el(){return e(this)}};s.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;flex-direction:column}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{box-sizing:border-box;display:flex;flex:1 1 0%;background-color:var(--calcite-ui-foreground-1);font-family:var(--calcite-sans-family)}.container *{box-sizing:border-box}.nested-container{display:flex;flex-direction:column;background-color:var(--calcite-ui-foreground-1)}.content-container{display:flex;flex:1 1 auto;align-items:stretch;padding:0px;font-family:var(--calcite-sans-family);font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);outline-color:transparent}.content-container--button{cursor:pointer;border-style:none;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;text-align:initial}.content-container--button:hover{background-color:var(--calcite-ui-foreground-2)}.content-container--button:hover .label,.content-container--button:hover .description{color:var(--calcite-ui-text-1)}.content-container--button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.content-container--button .content-start,.content-container--button .content-end{pointer-events:none}.content{display:flex;flex:1 1 auto;flex-direction:column;justify-content:center;padding-inline:0.75rem;padding-block:0.5rem;font-size:var(--calcite-font-size--2);line-height:1.375}.label,.description{font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal);word-wrap:break-word;word-break:break-word}.label:only-child,.description:only-child{margin:0px;padding-block:0.25rem}.label{color:var(--calcite-ui-text-1)}.description{-webkit-margin-before:0.125rem;margin-block-start:0.125rem;color:var(--calcite-ui-text-3)}.content-start{justify-content:flex-start}.content-end{justify-content:flex-end}.content-start,.content-end{flex:1 1 auto}.has-center-content .content-start,.has-center-content .content-end{flex:0 1 auto}.actions-start,.actions-end,.content-start,.content-end{display:flex;align-items:center}.content-start ::slotted(calcite-icon),.content-end ::slotted(calcite-icon){margin-inline:0.75rem;align-self:center}.actions-start ::slotted(calcite-action),.actions-end ::slotted(calcite-action){align-self:stretch;color:inherit}::slotted(calcite-list-item-group),::slotted(calcite-list-item){-webkit-padding-start:0.5rem;padding-inline-start:0.5rem}";export{l as calcite_list,s as calcite_list_item}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/*!
|
2
|
+
* Copyright 2022 Esri
|
3
|
+
* Licensed under the Apache License, Version 2.0
|
4
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
5
|
+
*/
|
6
|
+
import{r as t,c as a,h as i,H as e,g as n,f as o}from"./p-be2e3b99.js";import{c as r}from"./p-9a9955db.js";import{u as c}from"./p-7daea1df.js";import{t as l}from"./p-32a67cb2.js";import{g as s}from"./p-a80b3880.js";import"./p-729708a3.js";
|
7
|
+
/*!
|
8
|
+
* All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
9
|
+
* See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
|
10
|
+
* v1.0.0-beta.97
|
11
|
+
*/const d=class{constructor(i){t(this,i),this.calciteActionClick=a(this,"calciteActionClick",6),this.active=!1,this.appearance="solid",this.compact=!1,this.disabled=!1,this.indicator=!1,this.intlLoading="Loading",this.loading=!1,this.scale="m",this.textEnabled=!1,this.mutationObserver=r("mutation",(()=>o(this))),this.handleTooltipSlotChange=t=>{const a=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-tooltip")))[0];a&&(a.referenceElement=this.buttonEl)},this.calciteActionClickHandler=()=>{this.disabled||this.calciteActionClick.emit()}}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()}componentDidRender(){c(this)}async setFocus(){var t;null===(t=this.buttonEl)||void 0===t||t.focus()}renderTextContainer(){const{text:t,textEnabled:a}=this;return t?i("div",{class:{"text-container":!0,"text-container--visible":a},key:"text-container"},t):null}renderIconContainer(){var t;const{loading:a,icon:e,scale:n,el:o,intlLoading:r}=this,c="l"===n?"m":"s",l=a?i("calcite-loader",{active:!0,inline:!0,label:r,scale:"l"===n?"l":"m"}):null,s=e?i("calcite-icon",{icon:e,scale:c}):null,d=l||s,m=d||(null===(t=o.children)||void 0===t?void 0:t.length),u=i("div",{class:{"slot-container":!0,"slot-container--hidden":a}},i("slot",null));return m?i("div",{"aria-hidden":"true",class:"icon-container",key:"icon-container"},d,u):null}render(){const{compact:t,disabled:a,loading:n,textEnabled:o,label:r,text:c}=this,s=r||c,d={button:!0,"button--text-visible":o,"button--compact":t};return i(e,{onClick:this.calciteActionClickHandler},i("button",{"aria-busy":l(n),"aria-disabled":l(a),"aria-label":s,class:d,disabled:a,ref:t=>this.buttonEl=t},this.renderIconContainer(),this.renderTextContainer()),i("slot",{name:"tooltip",onSlotchange:this.handleTooltipSlotChange}))}get el(){return n(this)}};d.style='@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:flex;background-color:transparent;--calcite-action-indicator-color:var(--calcite-ui-brand)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.button{position:relative;margin:0px;display:flex;inline-size:auto;cursor:pointer;align-items:center;justify-content:flex-start;border-style:none;background-color:var(--calcite-ui-foreground-1);fill:var(--calcite-ui-text-3);font-family:var(--calcite-sans-family);font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-3);outline-color:transparent;text-align:unset;flex:1 0 auto}.button:hover{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}.button:focus{background-color:var(--calcite-ui-foreground-2);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1);outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.button:active{background-color:var(--calcite-ui-foreground-3)}.button .icon-container{pointer-events:none;margin:0px;display:flex;align-items:center;justify-content:center;min-inline-size:1rem;min-block-size:1rem}.button .text-container{margin:0px;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.5rem;opacity:0;transition-property:opacity;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-property:margin;transition-property:inline-size}.button .text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([scale=s]) .button{padding-inline:0.5rem;padding-block:0.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=s]) .button--text-visible .icon-container{-webkit-margin-end:0.5rem;margin-inline-end:0.5rem}:host([scale=m]) .button{padding-inline:1rem;padding-block:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=m]) .button--text-visible .icon-container{-webkit-margin-end:0.75rem;margin-inline-end:0.75rem}:host([scale=l]) .button{padding:1.25rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;font-weight:var(--calcite-font-weight-normal)}:host([scale=l]) .button--text-visible .icon-container{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.button--text-visible{inline-size:100%}:host([active]) .button,:host([active]) .button:hover,:host([active]) .button:focus,:host([active][loading]) .button{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([active]) .button:active{background-color:var(--calcite-ui-foreground-1)}:host([appearance=clear]) .button,:host([appearance=transparent]) .button{background-color:transparent;transition-property:box-shadow;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}:host([appearance=clear]) .button:hover,:host([appearance=clear]) .button:focus,:host([appearance=transparent]) .button:hover,:host([appearance=transparent]) .button:focus{background-color:transparent;box-shadow:0 0 0 2px var(--calcite-ui-border-1) inset}:host([active][appearance=clear]) .button,:host([active][appearance=clear]) .button:hover,:host([active][appearance=clear]) .button:focus,:host([active][appearance=transparent]) .button,:host([active][appearance=transparent]) .button:hover,:host([active][appearance=transparent]) .button:focus{background-color:var(--calcite-ui-foreground-3);fill:var(--calcite-ui-text-1);color:var(--calcite-ui-text-1)}:host([appearance=clear][loading]) .button,:host([appearance=clear][disabled]) .button,:host([appearance=transparent][loading]) .button,:host([appearance=transparent][disabled]) .button{background-color:transparent}:host([loading]) .button,:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-ui-foreground-1)}:host([loading]) .button .text-container,:host([loading]) .button:hover .text-container,:host([loading]) .button:focus .text-container{opacity:var(--calcite-ui-opacity-disabled)}:host([loading]) calcite-loader[inline]{color:var(--calcite-ui-text-3);-webkit-margin-end:0px;margin-inline-end:0px}:host([disabled]) .button,:host([disabled]) .button:hover,:host([disabled]) .button:focus{cursor:default;background-color:var(--calcite-ui-foreground-1);opacity:var(--calcite-ui-opacity-disabled)}:host([disabled][active]) .button,:host([disabled][active]) .button:hover,:host([disabled][active]) .button:focus{background-color:var(--calcite-ui-foreground-3);opacity:var(--calcite-ui-opacity-disabled)}:host([indicator]) .button::after{content:"";position:absolute;block-size:0.5rem;inline-size:0.5rem;border-radius:9999px;border-width:2px;background-color:var(--calcite-action-indicator-color);border-color:var(--calcite-ui-foreground-1);inset-block-end:0.75rem;inset-inline-end:0.75rem}:host([indicator]) .button--text-visible::after{inset-block-end:auto}:host([indicator]) .button--text-visible .text-container--visible{-webkit-margin-end:1rem;margin-inline-end:1rem}:host([indicator]) .button:hover::after,:host([indicator]) .button:focus::after{border-color:var(--calcite-ui-foreground-1)}:host([indicator][scale=s]) .button::after{inset-block-end:0.25rem;inset-inline-end:0.25rem}:host([indicator][scale=s]) .button--text-visible::after{inset-block-end:auto;inset-inline-end:0.5rem}:host([indicator][active]) .button::after{border-color:var(--calcite-ui-foreground-3)}';const m=class{constructor(a){t(this,a),this.active=!1,this.inline=!1,this.scale="m",this.value=0,this.text="",this.noPadding=!1}render(){const{el:t,inline:a,label:n,scale:o,text:r,type:c,value:l}=this,d=t.id||s(),m=a?this.getInlineSize(o):this.getSize(o),u=.45*m,v=`0 0 ${m} ${m}`,b="determinate"===c,f=2*u*Math.PI,h=l/100*f,p=f-h,g=Math.floor(l),k={r:u,cx:m/2,cy:m/2},y={"stroke-dasharray":`${h} ${p}`};return i(e,Object.assign({"aria-label":n,id:d,role:"progressbar"},b?{"aria-valuenow":g,"aria-valuemin":0,"aria-valuemax":100,complete:100===g}:{}),i("div",{class:"loader__svgs"},i("svg",{class:"loader__svg loader__svg--1",viewBox:v},i("circle",Object.assign({},k))),i("svg",{class:"loader__svg loader__svg--2",viewBox:v},i("circle",Object.assign({},k))),i("svg",Object.assign({class:"loader__svg loader__svg--3",viewBox:v},b?{style:y}:{}),i("circle",Object.assign({},k)))),r&&i("div",{class:"loader__text"},r),b&&i("div",{class:"loader__percentage"},l))}getSize(t){return{s:32,m:56,l:80}[t]}getInlineSize(t){return{s:12,m:16,l:20}[t]}get el(){return n(this)}};m.style='@charset "UTF-8";@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;margin-inline:auto;display:none;align-items:center;justify-content:center;opacity:1;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke:var(--calcite-ui-brand);stroke-width:3;fill:none;transform:scale(1, 1);animation:loader-color-shift calc(var(--calcite-internal-animation-timing-slow) * 2) alternate-reverse infinite linear;padding-block:var(--calcite-loader-padding, 4rem)}:host([scale=s]){--calcite-loader-font-size:var(--calcite-font-size--2);--calcite-loader-size:2rem;--calcite-loader-size-inline:0.75rem}:host([scale=m]){--calcite-loader-font-size:var(--calcite-font-size-0);--calcite-loader-size:4rem;--calcite-loader-size-inline:1rem}:host([scale=l]){--calcite-loader-font-size:var(--calcite-font-size-2);--calcite-loader-size:6rem;--calcite-loader-size-inline:1.5rem}:host([no-padding]){padding-block:0px}:host{display:none}:host([active]){display:flex}.loader__text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;color:var(--calcite-ui-text-1);-webkit-margin-before:calc(var(--calcite-loader-size) + 1.5rem);margin-block-start:calc(var(--calcite-loader-size) + 1.5rem)}.loader__percentage{position:absolute;display:block;text-align:center;color:var(--calcite-ui-text-1);font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);line-height:0.25;transform:scale(1, 1)}.loader__svgs{position:absolute;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);inset-inline-start:50%;-webkit-margin-start:calc(var(--calcite-loader-size) / 2 * -1);margin-inline-start:calc(var(--calcite-loader-size) / 2 * -1);transform:scale(1, 1)}.loader__svg{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size);block-size:var(--calcite-loader-size);animation-iteration-count:infinite;animation-timing-function:linear;animation-name:loader-clockwise}@supports (display: grid){.loader__svg--1{animation-name:loader-offset-1}.loader__svg--2{animation-name:loader-offset-2}.loader__svg--3{animation-name:loader-offset-3}}:host([type=determinate]){animation:none;stroke:var(--calcite-ui-border-3)}:host([type=determinate]) .loader__svg--3{animation:none;stroke:var(--calcite-ui-brand);stroke-dasharray:150.79632;transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([inline]){position:relative;margin:0px;animation:none;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size-inline);min-block-size:var(--calcite-loader-size-inline);inline-size:var(--calcite-loader-size-inline);-webkit-margin-end:calc(var(--calcite-loader-size-inline) * 0.5);margin-inline-end:calc(var(--calcite-loader-size-inline) * 0.5);vertical-align:calc(var(--calcite-loader-size-inline) * -1 * 0.2)}:host([active][inline]){display:inline-block}:host([inline]) .loader__svgs{inset-block-start:0px;margin:0px;inset-inline-start:0;inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([inline]) .loader__svg{inline-size:var(--calcite-loader-size-inline);block-size:var(--calcite-loader-size-inline)}:host([complete]){opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1000ms, transform var(--calcite-internal-animation-timing-medium) linear 1000ms}:host([complete]) .loader__svgs{opacity:0;transform:scale(0.75, 0.75);transform-origin:center;transition:opacity calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms, transform calc(180ms * var(--calcite-internal-duration-factor)) linear 800ms}:host([complete]) .loader__percentage{color:var(--calcite-ui-brand);transform:scale(1.05, 1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear, transform var(--calcite-internal-animation-timing-medium) linear}.loader__svg--1{stroke-dasharray:27.9252444444% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 2.4)}@keyframes loader-offset-1{0%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-83.7757333333%}100%{stroke-dasharray:27.9252444444% 251.3272%;stroke-dashoffset:-279.2524444444%}}.loader__svg--2{stroke-dasharray:55.8504888889% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.2)}@keyframes loader-offset-2{0%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-97.7383555556%}100%{stroke-dasharray:55.8504888889% 223.4019555556%;stroke-dashoffset:-279.2524444444%}}.loader__svg--3{stroke-dasharray:13.9626222222% 139.6262222222%;animation-duration:calc(var(--calcite-internal-animation-timing-slow) * 3.867)}@keyframes loader-offset-3{0%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:0}50%{stroke-dasharray:139.6262222222% 139.6262222222%;stroke-dashoffset:-76.7944222222%}100%{stroke-dasharray:13.9626222222% 265.2898222222%;stroke-dashoffset:-279.2524444444%}}@keyframes loader-color-shift{0%{stroke:var(--calcite-ui-brand)}33%{stroke:var(--calcite-ui-brand-press)}66%{stroke:var(--calcite-ui-brand-hover)}100%{stroke:var(--calcite-ui-brand)}}@keyframes loader-clockwise{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}';export{d as calcite_action,m as calcite_loader}
|