@esri/solutions-components 0.1.8 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (337) hide show
  1. package/dist/cjs/buffer-tools_6.cjs.entry.js +21 -79
  2. package/dist/cjs/calcite-action-bar_6.cjs.entry.js +14 -16
  3. package/dist/cjs/calcite-action_2.cjs.entry.js +1 -1
  4. package/dist/cjs/calcite-block-section.cjs.entry.js +1 -1
  5. package/dist/cjs/calcite-block.cjs.entry.js +1 -1
  6. package/dist/cjs/calcite-button.cjs.entry.js +1 -1
  7. package/dist/cjs/calcite-checkbox.cjs.entry.js +1 -1
  8. package/dist/cjs/calcite-color-picker-hex-input.cjs.entry.js +2 -2
  9. package/dist/cjs/calcite-color-picker-swatch.cjs.entry.js +1 -1
  10. package/dist/cjs/calcite-color-picker.cjs.entry.js +3 -3
  11. package/dist/cjs/calcite-combobox_3.cjs.entry.js +3 -18
  12. package/dist/cjs/calcite-date-picker-day_3.cjs.entry.js +1 -1
  13. package/dist/cjs/calcite-dropdown.cjs.entry.js +1 -1
  14. package/dist/cjs/calcite-fab.cjs.entry.js +1 -1
  15. package/dist/cjs/calcite-filter.cjs.entry.js +1 -1
  16. package/dist/cjs/calcite-flow-item.cjs.entry.js +1 -1
  17. package/dist/cjs/calcite-inline-editable.cjs.entry.js +1 -1
  18. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +1 -1
  19. package/dist/cjs/calcite-input-number.cjs.entry.js +1 -1
  20. package/dist/cjs/calcite-input-text.cjs.entry.js +1 -1
  21. package/dist/cjs/calcite-input-time-picker.cjs.entry.js +1 -1
  22. package/dist/cjs/calcite-input_2.cjs.entry.js +1 -1
  23. package/dist/cjs/calcite-label.cjs.entry.js +1 -1
  24. package/dist/cjs/calcite-link.cjs.entry.js +1 -1
  25. package/dist/cjs/calcite-list_2.cjs.entry.js +2 -2
  26. package/dist/cjs/calcite-option_2.cjs.entry.js +1 -1
  27. package/dist/cjs/calcite-pagination.cjs.entry.js +1 -1
  28. package/dist/cjs/calcite-panel_2.cjs.entry.js +1 -1
  29. package/dist/cjs/calcite-pick-list-item.cjs.entry.js +1 -1
  30. package/dist/cjs/calcite-pick-list.cjs.entry.js +1 -1
  31. package/dist/cjs/calcite-radio-button.cjs.entry.js +1 -1
  32. package/dist/cjs/calcite-rating.cjs.entry.js +1 -1
  33. package/dist/cjs/calcite-shell-panel_14.cjs.entry.js +17 -116
  34. package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
  35. package/dist/cjs/calcite-split-button.cjs.entry.js +1 -1
  36. package/dist/cjs/calcite-stepper-item.cjs.entry.js +1 -1
  37. package/dist/cjs/calcite-switch.cjs.entry.js +1 -1
  38. package/dist/cjs/calcite-tile-select-group.cjs.entry.js +1 -1
  39. package/dist/cjs/calcite-tile-select.cjs.entry.js +1 -1
  40. package/dist/cjs/calcite-tile.cjs.entry.js +1 -1
  41. package/dist/cjs/calcite-time-picker.cjs.entry.js +1 -1
  42. package/dist/cjs/calcite-tree_3.cjs.entry.js +1 -15
  43. package/dist/cjs/check-list.cjs.entry.js +2 -10
  44. package/dist/cjs/config-buffer-tools.cjs.entry.js +2 -11
  45. package/dist/cjs/config-draw-tools.cjs.entry.js +1 -9
  46. package/dist/cjs/config-layer-picker.cjs.entry.js +2 -19
  47. package/dist/cjs/config-pdf-download.cjs.entry.js +1 -17
  48. package/dist/cjs/{index-73010cd8.js → index-7af21b6f.js} +7 -158
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/map-search.cjs.entry.js +3 -0
  51. package/dist/cjs/public-notification.cjs.entry.js +3 -24
  52. package/dist/cjs/{resources-f7622a24.js → resources-aa19bf8c.js} +1 -1
  53. package/dist/cjs/solution-configuration.cjs.entry.js +7 -24
  54. package/dist/cjs/solution-contents_3.cjs.entry.js +7 -33
  55. package/dist/cjs/solutions.cjs.js +1 -1
  56. package/dist/cjs/store-manager.cjs.entry.js +1 -12
  57. package/dist/collection/collection-manifest.json +1 -1
  58. package/dist/collection/components/buffer-tools/buffer-tools.js +1 -29
  59. package/dist/collection/components/check-list/check-list.js +2 -10
  60. package/dist/collection/components/config-buffer-tools/config-buffer-tools.js +2 -11
  61. package/dist/collection/components/config-draw-tools/config-draw-tools.js +1 -9
  62. package/dist/collection/components/config-layer-picker/config-layer-picker.js +2 -19
  63. package/dist/collection/components/config-pdf-download/config-pdf-download.js +1 -17
  64. package/dist/collection/components/json-editor/assets/monaco-editor/LICENSE +21 -21
  65. package/dist/collection/components/json-editor/json-editor.js +2 -22
  66. package/dist/collection/components/map-draw-tools/map-draw-tools.js +5 -14
  67. package/dist/collection/components/map-layer-picker/map-layer-picker.js +1 -16
  68. package/dist/collection/components/map-search/map-search.js +5 -0
  69. package/dist/collection/components/map-select-tools/map-select-tools.js +8 -4
  70. package/dist/collection/components/pdf-download/pdf-download.js +2 -8
  71. package/dist/collection/components/public-notification/public-notification.js +3 -24
  72. package/dist/collection/components/refine-selection/refine-selection.js +4 -4
  73. package/dist/collection/components/refine-selection-tools/refine-selection-tools.js +13 -34
  74. package/dist/collection/components/solution-configuration/solution-configuration.js +7 -24
  75. package/dist/collection/components/solution-contents/solution-contents.js +1 -3
  76. package/dist/collection/components/solution-item/solution-item.js +3 -9
  77. package/dist/collection/components/solution-item-details/solution-item-details.js +4 -8
  78. package/dist/collection/components/solution-item-icon/solution-item-icon.js +0 -14
  79. package/dist/collection/components/solution-item-sharing/solution-item-sharing.js +1 -11
  80. package/dist/collection/components/solution-organization-variables/solution-organization-variables.js +1 -13
  81. package/dist/collection/components/solution-resource-item/solution-resource-item.js +3 -16
  82. package/dist/collection/components/solution-spatial-ref/solution-spatial-ref.js +3 -21
  83. package/dist/collection/components/solution-template-data/solution-template-data.js +2 -30
  84. package/dist/collection/components/solution-variables/solution-variables.js +1 -13
  85. package/dist/collection/components/store-manager/store-manager.js +1 -12
  86. package/dist/components/action.js +1 -1
  87. package/dist/components/buffer-tools2.js +1 -29
  88. package/dist/components/button.js +1 -1
  89. package/dist/components/calcite-block-section.js +1 -1
  90. package/dist/components/calcite-block.js +1 -1
  91. package/dist/components/calcite-color-picker.js +1 -1
  92. package/dist/components/calcite-fab.js +1 -1
  93. package/dist/components/calcite-filter.js +1 -1
  94. package/dist/components/calcite-flow-item.js +1 -1
  95. package/dist/components/calcite-inline-editable.js +1 -1
  96. package/dist/components/calcite-input-date-picker.js +1 -1
  97. package/dist/components/calcite-input-number.js +1 -1
  98. package/dist/components/calcite-input-text.js +1 -1
  99. package/dist/components/calcite-input-time-picker.js +1 -1
  100. package/dist/components/calcite-pagination.js +1 -1
  101. package/dist/components/calcite-pick-list.js +1 -1
  102. package/dist/components/calcite-radio-button.js +1 -1
  103. package/dist/components/calcite-rating.js +1 -1
  104. package/dist/components/calcite-sortable-list.js +1 -1
  105. package/dist/components/calcite-split-button.js +1 -1
  106. package/dist/components/calcite-stepper-item.js +1 -1
  107. package/dist/components/calcite-tile-select-group.js +1 -1
  108. package/dist/components/calcite-tile-select.js +1 -1
  109. package/dist/components/check-list2.js +2 -10
  110. package/dist/components/checkbox.js +1 -1
  111. package/dist/components/color-picker-swatch.js +7 -158
  112. package/dist/components/combobox-item.js +1 -1
  113. package/dist/components/combobox.js +1 -1
  114. package/dist/components/config-buffer-tools.js +2 -11
  115. package/dist/components/config-draw-tools.js +1 -9
  116. package/dist/components/config-layer-picker.js +2 -19
  117. package/dist/components/config-pdf-download.js +1 -17
  118. package/dist/components/date-picker-day.js +1 -1
  119. package/dist/components/dropdown.js +1 -1
  120. package/dist/components/input.js +1 -1
  121. package/dist/components/json-editor2.js +2 -22
  122. package/dist/components/label.js +1 -1
  123. package/dist/components/link.js +1 -1
  124. package/dist/components/list-item.js +1 -1
  125. package/dist/components/list.js +1 -1
  126. package/dist/components/map-draw-tools2.js +5 -14
  127. package/dist/components/map-layer-picker2.js +1 -16
  128. package/dist/components/map-search.js +3 -0
  129. package/dist/components/map-select-tools2.js +8 -4
  130. package/dist/components/panel.js +1 -1
  131. package/dist/components/pdf-download2.js +2 -8
  132. package/dist/components/pick-list-item.js +1 -1
  133. package/dist/components/public-notification.js +3 -24
  134. package/dist/components/radio-group.js +1 -1
  135. package/dist/components/refine-selection-tools2.js +13 -34
  136. package/dist/components/refine-selection2.js +4 -4
  137. package/dist/components/select.js +1 -1
  138. package/dist/components/slider.js +1 -1
  139. package/dist/components/solution-configuration.js +7 -24
  140. package/dist/components/solution-contents2.js +1 -3
  141. package/dist/components/solution-item-details2.js +4 -8
  142. package/dist/components/solution-item-icon2.js +0 -14
  143. package/dist/components/solution-item-sharing2.js +1 -11
  144. package/dist/components/solution-item2.js +3 -9
  145. package/dist/components/solution-organization-variables2.js +1 -13
  146. package/dist/components/solution-resource-item2.js +3 -16
  147. package/dist/components/solution-spatial-ref2.js +3 -21
  148. package/dist/components/solution-template-data2.js +2 -30
  149. package/dist/components/solution-variables2.js +1 -13
  150. package/dist/components/store-manager.js +1 -12
  151. package/dist/components/switch.js +1 -1
  152. package/dist/components/tab-title.js +1 -1
  153. package/dist/components/tile.js +1 -1
  154. package/dist/components/time-picker.js +1 -1
  155. package/dist/components/tree-item.js +1 -1
  156. package/dist/components/value-list-item.js +1 -1
  157. package/dist/components/value-list.js +1 -1
  158. package/dist/esm/buffer-tools_6.entry.js +21 -79
  159. package/dist/esm/calcite-action-bar_6.entry.js +14 -16
  160. package/dist/esm/calcite-action_2.entry.js +1 -1
  161. package/dist/esm/calcite-block-section.entry.js +1 -1
  162. package/dist/esm/calcite-block.entry.js +1 -1
  163. package/dist/esm/calcite-button.entry.js +1 -1
  164. package/dist/esm/calcite-checkbox.entry.js +1 -1
  165. package/dist/esm/calcite-color-picker-hex-input.entry.js +2 -2
  166. package/dist/esm/calcite-color-picker-swatch.entry.js +1 -1
  167. package/dist/esm/calcite-color-picker.entry.js +3 -3
  168. package/dist/esm/calcite-combobox_3.entry.js +3 -18
  169. package/dist/esm/calcite-date-picker-day_3.entry.js +1 -1
  170. package/dist/esm/calcite-dropdown.entry.js +1 -1
  171. package/dist/esm/calcite-fab.entry.js +1 -1
  172. package/dist/esm/calcite-filter.entry.js +1 -1
  173. package/dist/esm/calcite-flow-item.entry.js +1 -1
  174. package/dist/esm/calcite-inline-editable.entry.js +1 -1
  175. package/dist/esm/calcite-input-date-picker.entry.js +1 -1
  176. package/dist/esm/calcite-input-number.entry.js +1 -1
  177. package/dist/esm/calcite-input-text.entry.js +1 -1
  178. package/dist/esm/calcite-input-time-picker.entry.js +1 -1
  179. package/dist/esm/calcite-input_2.entry.js +1 -1
  180. package/dist/esm/calcite-label.entry.js +1 -1
  181. package/dist/esm/calcite-link.entry.js +1 -1
  182. package/dist/esm/calcite-list_2.entry.js +2 -2
  183. package/dist/esm/calcite-option_2.entry.js +1 -1
  184. package/dist/esm/calcite-pagination.entry.js +1 -1
  185. package/dist/esm/calcite-panel_2.entry.js +1 -1
  186. package/dist/esm/calcite-pick-list-item.entry.js +1 -1
  187. package/dist/esm/calcite-pick-list.entry.js +1 -1
  188. package/dist/esm/calcite-radio-button.entry.js +1 -1
  189. package/dist/esm/calcite-rating.entry.js +1 -1
  190. package/dist/esm/calcite-shell-panel_14.entry.js +17 -116
  191. package/dist/esm/calcite-sortable-list.entry.js +1 -1
  192. package/dist/esm/calcite-split-button.entry.js +1 -1
  193. package/dist/esm/calcite-stepper-item.entry.js +1 -1
  194. package/dist/esm/calcite-switch.entry.js +1 -1
  195. package/dist/esm/calcite-tile-select-group.entry.js +1 -1
  196. package/dist/esm/calcite-tile-select.entry.js +1 -1
  197. package/dist/esm/calcite-tile.entry.js +1 -1
  198. package/dist/esm/calcite-time-picker.entry.js +1 -1
  199. package/dist/esm/calcite-tree_3.entry.js +1 -15
  200. package/dist/esm/check-list.entry.js +2 -10
  201. package/dist/esm/config-buffer-tools.entry.js +2 -11
  202. package/dist/esm/config-draw-tools.entry.js +1 -9
  203. package/dist/esm/config-layer-picker.entry.js +2 -19
  204. package/dist/esm/config-pdf-download.entry.js +1 -17
  205. package/dist/esm/{index-dc607780.js → index-d33ebc35.js} +7 -158
  206. package/dist/esm/loader.js +1 -1
  207. package/dist/esm/map-search.entry.js +3 -0
  208. package/dist/esm/public-notification.entry.js +3 -24
  209. package/dist/esm/{resources-adf937de.js → resources-7d4a587f.js} +1 -1
  210. package/dist/esm/solution-configuration.entry.js +7 -24
  211. package/dist/esm/solution-contents_3.entry.js +7 -33
  212. package/dist/esm/solutions.js +1 -1
  213. package/dist/esm/store-manager.entry.js +1 -12
  214. package/dist/node_modules/@esri/calcite-components/dist/collection/components/action/action.css +0 -1
  215. package/dist/node_modules/@esri/calcite-components/dist/collection/components/block/block.css +0 -1
  216. package/dist/node_modules/@esri/calcite-components/dist/collection/components/block-section/block-section.css +0 -1
  217. package/dist/node_modules/@esri/calcite-components/dist/collection/components/button/button.css +0 -2
  218. package/dist/node_modules/@esri/calcite-components/dist/collection/components/checkbox/checkbox.css +0 -2
  219. package/dist/node_modules/@esri/calcite-components/dist/collection/components/color-picker/color-picker.css +0 -1
  220. package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox/combobox.css +0 -1
  221. package/dist/node_modules/@esri/calcite-components/dist/collection/components/combobox-item/combobox-item.css +0 -1
  222. package/dist/node_modules/@esri/calcite-components/dist/collection/components/date-picker-day/date-picker-day.css +0 -1
  223. package/dist/node_modules/@esri/calcite-components/dist/collection/components/dropdown/dropdown.css +0 -1
  224. package/dist/node_modules/@esri/calcite-components/dist/collection/components/fab/fab.css +0 -1
  225. package/dist/node_modules/@esri/calcite-components/dist/collection/components/filter/filter.css +0 -1
  226. package/dist/node_modules/@esri/calcite-components/dist/collection/components/flow-item/flow-item.css +0 -1
  227. package/dist/node_modules/@esri/calcite-components/dist/collection/components/inline-editable/inline-editable.css +0 -1
  228. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input/input.css +0 -6
  229. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-date-picker/input-date-picker.css +0 -1
  230. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-number/input-number.css +0 -6
  231. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-text/input-text.css +0 -6
  232. package/dist/node_modules/@esri/calcite-components/dist/collection/components/input-time-picker/input-time-picker.css +0 -2
  233. package/dist/node_modules/@esri/calcite-components/dist/collection/components/label/label.css +0 -1
  234. package/dist/node_modules/@esri/calcite-components/dist/collection/components/link/link.css +0 -1
  235. package/dist/node_modules/@esri/calcite-components/dist/collection/components/list/list.css +0 -1
  236. package/dist/node_modules/@esri/calcite-components/dist/collection/components/list-item/list-item.css +0 -1
  237. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pagination/pagination.css +1 -2
  238. package/dist/node_modules/@esri/calcite-components/dist/collection/components/panel/panel.css +0 -1
  239. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list/pick-list.css +0 -1
  240. package/dist/node_modules/@esri/calcite-components/dist/collection/components/pick-list-item/pick-list-item.css +0 -1
  241. package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-button/radio-button.css +0 -1
  242. package/dist/node_modules/@esri/calcite-components/dist/collection/components/radio-group/radio-group.css +0 -1
  243. package/dist/node_modules/@esri/calcite-components/dist/collection/components/rating/rating.css +0 -1
  244. package/dist/node_modules/@esri/calcite-components/dist/collection/components/select/select.css +0 -1
  245. package/dist/node_modules/@esri/calcite-components/dist/collection/components/slider/slider.css +0 -1
  246. package/dist/node_modules/@esri/calcite-components/dist/collection/components/sortable-list/sortable-list.css +0 -1
  247. package/dist/node_modules/@esri/calcite-components/dist/collection/components/split-button/split-button.css +0 -1
  248. package/dist/node_modules/@esri/calcite-components/dist/collection/components/stepper-item/stepper-item.css +0 -1
  249. package/dist/node_modules/@esri/calcite-components/dist/collection/components/switch/switch.css +0 -2
  250. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tab-title/tab-title.css +0 -1
  251. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile/tile.css +0 -2
  252. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select/tile-select.css +0 -1
  253. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tile-select-group/tile-select-group.css +0 -1
  254. package/dist/node_modules/@esri/calcite-components/dist/collection/components/time-picker/time-picker.css +0 -1
  255. package/dist/node_modules/@esri/calcite-components/dist/collection/components/tree-item/tree-item.css +0 -1
  256. package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list/value-list.css +0 -1
  257. package/dist/node_modules/@esri/calcite-components/dist/collection/components/value-list-item/value-list-item.css +0 -1
  258. package/dist/solutions/assets/monaco-editor/LICENSE +21 -21
  259. package/dist/solutions/{p-9fdfd6c6.entry.js → p-07ff4a74.entry.js} +1 -1
  260. package/dist/solutions/p-08c96ac2.entry.js +6 -0
  261. package/dist/solutions/p-1033ca8d.entry.js +6 -0
  262. package/dist/solutions/{p-22b54603.entry.js → p-15994a4d.entry.js} +1 -1
  263. package/dist/solutions/p-199c5c24.entry.js +6 -0
  264. package/dist/solutions/p-1db37170.entry.js +6 -0
  265. package/dist/solutions/p-1ed2008f.entry.js +22 -0
  266. package/dist/solutions/{p-0922119b.entry.js → p-255ff9e3.entry.js} +2 -2
  267. package/dist/solutions/p-2a977e48.entry.js +11 -0
  268. package/dist/solutions/{p-911c476b.entry.js → p-320edf27.entry.js} +1 -1
  269. package/dist/solutions/p-33d9d95c.entry.js +11 -0
  270. package/dist/solutions/{p-5f367dbf.js → p-374a5031.js} +2 -2
  271. package/dist/solutions/{p-8b19de1b.entry.js → p-3841527d.entry.js} +2 -2
  272. package/dist/solutions/p-420de3c4.entry.js +29 -0
  273. package/dist/solutions/{p-f8df8f60.entry.js → p-46cb43a6.entry.js} +1 -1
  274. package/dist/solutions/{p-01e27538.entry.js → p-4a418e85.entry.js} +1 -1
  275. package/dist/solutions/{p-2f504ad4.entry.js → p-4d5989db.entry.js} +2 -2
  276. package/dist/solutions/{p-972c9f6b.entry.js → p-4ed258b7.entry.js} +1 -1
  277. package/dist/solutions/{p-aecc26bc.entry.js → p-58022a7b.entry.js} +1 -1
  278. package/dist/solutions/p-59070b11.entry.js +6 -0
  279. package/dist/solutions/{p-fee0d21a.entry.js → p-60e33308.entry.js} +1 -1
  280. package/dist/solutions/{p-32bde829.entry.js → p-6152930f.entry.js} +1 -1
  281. package/dist/solutions/{p-1c4e26cd.entry.js → p-66e3e92c.entry.js} +1 -1
  282. package/dist/solutions/{p-5aa00dda.entry.js → p-68a32f82.entry.js} +2 -2
  283. package/dist/solutions/p-6d81d035.entry.js +12 -0
  284. package/dist/solutions/{p-062a0a85.entry.js → p-74c52dd8.entry.js} +1 -1
  285. package/dist/solutions/p-763f2aff.entry.js +6 -0
  286. package/dist/solutions/{p-e73ac319.entry.js → p-838b5963.entry.js} +1 -1
  287. package/dist/solutions/p-8717d549.entry.js +11 -0
  288. package/dist/solutions/p-93d3119d.js +6 -0
  289. package/dist/solutions/{p-f65f29be.entry.js → p-953d2b0b.entry.js} +1 -1
  290. package/dist/solutions/{p-b506be5a.entry.js → p-9645aeb2.entry.js} +1 -1
  291. package/dist/solutions/{p-1d59f41f.entry.js → p-9b36c7c3.entry.js} +2 -2
  292. package/dist/solutions/{p-6cd67c8f.entry.js → p-9bbaf3a6.entry.js} +1 -1
  293. package/dist/solutions/{p-3ba01dcf.entry.js → p-9eebe062.entry.js} +1 -1
  294. package/dist/solutions/p-9efcd26b.entry.js +23 -0
  295. package/dist/solutions/{p-4d3cc150.entry.js → p-9f4aab0d.entry.js} +1 -1
  296. package/dist/solutions/p-a25b2981.entry.js +6 -0
  297. package/dist/solutions/{p-11aefdf6.entry.js → p-a25b5eac.entry.js} +1 -1
  298. package/dist/solutions/{p-0d969c42.entry.js → p-a2ff7885.entry.js} +1 -1
  299. package/dist/solutions/{p-cdcf8087.entry.js → p-a47e729e.entry.js} +2 -2
  300. package/dist/solutions/p-a8def555.entry.js +11 -0
  301. package/dist/solutions/{p-c5e2efca.entry.js → p-ac1f7035.entry.js} +2 -2
  302. package/dist/solutions/p-adaf2269.entry.js +6 -0
  303. package/dist/solutions/{p-60d5be8d.entry.js → p-b498f95f.entry.js} +1 -1
  304. package/dist/solutions/p-ba3f1e2c.entry.js +6 -0
  305. package/dist/solutions/p-bd9c54b1.entry.js +12 -0
  306. package/dist/solutions/{p-28c78bbe.entry.js → p-c188f72f.entry.js} +1 -1
  307. package/dist/solutions/{p-d6d15e07.entry.js → p-c55027a5.entry.js} +3 -3
  308. package/dist/solutions/{p-f8910acc.entry.js → p-d63c9fda.entry.js} +1 -1
  309. package/dist/solutions/{p-7e9bcf39.entry.js → p-d6d803fd.entry.js} +1 -1
  310. package/dist/solutions/{p-d6d53153.entry.js → p-e9b057bb.entry.js} +1 -1
  311. package/dist/solutions/{p-e1ac2e9d.entry.js → p-efa46da1.entry.js} +1 -1
  312. package/dist/solutions/p-fb544e27.entry.js +6 -0
  313. package/dist/solutions/solutions.css +1 -1
  314. package/dist/solutions/solutions.esm.js +1 -1
  315. package/dist/solutions-components_commit.txt +5 -7
  316. package/dist/types/stencil-public-runtime.d.ts +5 -0
  317. package/package.json +1 -1
  318. package/dist/solutions/p-092a0bff.entry.js +0 -12
  319. package/dist/solutions/p-0b6167b7.entry.js +0 -11
  320. package/dist/solutions/p-3c69af40.entry.js +0 -6
  321. package/dist/solutions/p-437e55cb.entry.js +0 -6
  322. package/dist/solutions/p-4c125f96.entry.js +0 -6
  323. package/dist/solutions/p-57157b9d.entry.js +0 -12
  324. package/dist/solutions/p-599afe71.entry.js +0 -6
  325. package/dist/solutions/p-5ba1efd5.entry.js +0 -6
  326. package/dist/solutions/p-60deec33.entry.js +0 -6
  327. package/dist/solutions/p-7e689d39.entry.js +0 -6
  328. package/dist/solutions/p-7ee9ae73.entry.js +0 -23
  329. package/dist/solutions/p-87c09099.entry.js +0 -11
  330. package/dist/solutions/p-ba6ba612.entry.js +0 -6
  331. package/dist/solutions/p-be63740d.entry.js +0 -6
  332. package/dist/solutions/p-c89eefda.entry.js +0 -11
  333. package/dist/solutions/p-cd33aa83.entry.js +0 -6
  334. package/dist/solutions/p-ce33ef37.js +0 -6
  335. package/dist/solutions/p-d58c1b71.entry.js +0 -29
  336. package/dist/solutions/p-e9641c29.entry.js +0 -11
  337. package/dist/solutions/p-f27e1023.entry.js +0 -22
@@ -3,10 +3,10 @@
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 i,c as t,h as e,H as s,g as a}from"./p-be2e3b99.js";import{f as n}from"./p-d48a24e6.js";import{d as o,f as c,c as l,u as r,r as h,a as d,F as m}from"./p-600e23c6.js";import{g as p}from"./p-a80b3880.js";import{T as b,C as u,b as g,c as f,h as v,d as x,e as w,g as y,a as k}from"./p-eb976965.js";import{c as C,d as z,g as I}from"./p-dbad98e8.js";import{s as H,c as _,a as D,d as j,H as $}from"./p-ab93e73f.js";import{c as L}from"./p-9a9955db.js";import{u as A}from"./p-7daea1df.js";import{i as E,t as P,g as S,a as F}from"./p-32a67cb2.js";import{c as T,d as B}from"./p-2e9ed892.js";import{d as M}from"./p-4e32bf8c.js";import{c as O,d as R}from"./p-61dc587c.js";import{g as W}from"./p-fe0fdd8b.js";import{s as U}from"./p-fda0d45f.js";import"./p-729708a3.js";import"./p-6b9dc092.js";import"./p-91192214.js";const V=class{constructor(e){i(this,e),this.calciteLookupChange=t(this,"calciteLookupChange",6),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipDismiss=t(this,"calciteComboboxChipDismiss",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.active=!1,this.open=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multi",this.scale="m",this.value=null,this.intlRemoveTag=b.removeTag,this.placement=o,this.internalValueChangeFlag=!1,this.items=[],this.groupItems=[],this.selectedItems=[],this.visibleItems=[],this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.textInput=null,this.mutationObserver=L("mutation",(()=>this.updateItems())),this.resizeObserver=L("resize",(()=>this.setMaxScrollerHeight())),this.guid=p(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?c(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.visibleItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.visibleItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||H(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipDismissHandler=(i,t)=>{this.open=!1;const e=this.items.find((i=>i===t));e&&this.toggleSelection(e,!1),this.calciteComboboxChipDismiss.emit(i.detail)},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,l(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,l(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===w?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return M((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[a,n]=t.ancestors;(i(a,e)||i(n,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.visibleItems=this.getVisibleItems(),this.calciteComboboxFilterChange.emit({visibleItems:[...this.visibleItems],text:t})}),100)})(),this.internalCalciteLookupChangeEvent=()=>{this.calciteLookupChange.emit(this.selectedItems)},this.emitCalciteLookupChange=M(this.internalCalciteLookupChangeEvent,0),this.internalComboboxChangeEvent=()=>{const{selectedItems:i}=this;this.calciteComboboxChange.emit({selectedItems:i})},this.emitComboboxChange=M(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.visibleItems=this.getVisibleItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.visibleItems[this.activeItemIndex],t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)}}activeHandler(i){if(this.disabled)return this.active=!1,void(this.open=!1);this.open=i}openHandler(i){if(i||r(this.floatingEl),this.disabled)return this.active=!1,void(this.open=!1);this.active=i,this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.active=!1,this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}documentClickHandler(i){E(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.visibleItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return h(this,{floatingEl:t,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},i)}async setFocus(){var i;null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),C(this),_(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.active&&this.activeHandler(this.active),this.open&&this.openHandler(this.open)}componentWillLoad(){this.updateItems()}componentDidLoad(){D(this,this.getValue()),this.reposition(!0)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),A(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),z(this),j(this),d(this,this.referenceEl,this.floatingEl),B(this)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}textHandler(){this.updateActiveItemIndex(-1)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){let t=i.offsetHeight;return Array.from(i.querySelectorAll(u)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitCalciteLookupChange(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=g(i),e=f(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{v(i)||(i.selected=!1)})))}getVisibleItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!v(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({constant:i.constant,filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(x)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(w))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(x);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitCalciteLookupChange(),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#combobox-chip-${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.visibleItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){var t;this.activeItemIndex=i;let e=null;this.visibleItems.forEach(((t,s)=>{s===i?(t.active=!0,e=`combobox-item-${t.guid}`):t.active=!1})),this.activeDescendant=e,this.activeItemIndex>-1&&(this.activeChipIndex=-1,null===(t=this.textInput)||void 0===t||t.focus())}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:s,intlRemoveTag:a}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...g(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==s?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,dismissLabel:a,dismissible:!0,icon:n.icon,id:n.guid?`combobox-chip-${n.guid}`:null,key:n.textLabel,onCalciteChipDismiss:i=>this.calciteChipDismissHandler(i,n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,active:t,disabled:s,placeholder:a,selectionMode:n,selectedItems:o,open:c}=this,l="single"===n,r=o[0],h=!(c||t)&&l&&!!r;return e("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&e("span",{class:{label:!0,"label--icon":!!(null==r?void 0:r.icon)},key:"label"},r.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`combobox-listbox-${i}`,"aria-label":I(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":h,"input--icon":!!this.placeholderIcon},disabled:s,id:`combobox-input-${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,ref:i=>this.textInput=i,type:"text"}))}renderListBoxOptions(){return this.visibleItems.map((i=>e("li",{"aria-selected":P(i.selected),id:i.guid?`combobox-item-${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{active:i,setFloatingEl:t,setContainerEl:s,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a||i},ref:t},e("div",{class:{"list-container":!0,[m.animation]:!0,[m.animationActive]:a||i},ref:s},e("ul",{class:{list:!0,"list--hide":!(a||i)}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:s}=this,a=i[0],n=null==a?void 0:a.icon,o="single"===s;return(!this.open&&a?!!n&&o:!!this.placeholderIcon&&(!a||o))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",icon:!this.open&&a?n:t,scale:"s"}))}renderIconEnd(){const{active:i,open:t}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i||t?"chevron-up":"chevron-down",scale:"s"}))}render(){const{active:i,guid:t,label:a,open:n}=this,o="single"===this.selectionMode;return e(s,null,e("div",{"aria-autocomplete":"list","aria-controls":`combobox-listbox-${t}`,"aria-expanded":P(n||i),"aria-haspopup":"listbox","aria-labelledby":`combobox-label-${t}`,"aria-live":"polite","aria-owns":`combobox-listbox-${t}`,class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n||i},onClick:this.clickHandler,onKeyDown:this.keydownHandler,ref:this.setReferenceEl,role:"combobox"},e("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`combobox-input-${t}`,id:`combobox-label-${t}`},a),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`combobox-label-${t}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`combobox-listbox-${t}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e($,{component:this}))}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}}};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;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
6
+ import{r as i,c as t,h as e,H as s,g as a}from"./p-be2e3b99.js";import{f as n}from"./p-d48a24e6.js";import{d as o,f as c,c as l,u as r,r as h,a as d,F as m}from"./p-600e23c6.js";import{g as p}from"./p-a80b3880.js";import{T as b,C as u,b as g,c as f,h as v,d as x,e as w,g as y,a as k}from"./p-eb976965.js";import{c as C,d as z,g as I}from"./p-dbad98e8.js";import{s as H,c as _,a as D,d as j,H as $}from"./p-ab93e73f.js";import{c as L}from"./p-9a9955db.js";import{u as A}from"./p-7daea1df.js";import{i as E,t as P,g as S,a as F}from"./p-32a67cb2.js";import{c as T,d as B}from"./p-2e9ed892.js";import{d as M}from"./p-4e32bf8c.js";import{c as O,d as R}from"./p-61dc587c.js";import{g as W}from"./p-fe0fdd8b.js";import{s as U}from"./p-fda0d45f.js";import"./p-729708a3.js";import"./p-6b9dc092.js";import"./p-91192214.js";const V=class{constructor(e){i(this,e),this.calciteLookupChange=t(this,"calciteLookupChange",6),this.calciteComboboxChange=t(this,"calciteComboboxChange",6),this.calciteComboboxFilterChange=t(this,"calciteComboboxFilterChange",6),this.calciteComboboxChipDismiss=t(this,"calciteComboboxChipDismiss",6),this.calciteComboboxBeforeClose=t(this,"calciteComboboxBeforeClose",6),this.calciteComboboxClose=t(this,"calciteComboboxClose",6),this.calciteComboboxBeforeOpen=t(this,"calciteComboboxBeforeOpen",6),this.calciteComboboxOpen=t(this,"calciteComboboxOpen",6),this.active=!1,this.open=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.required=!1,this.selectionMode="multi",this.scale="m",this.value=null,this.intlRemoveTag=b.removeTag,this.placement=o,this.internalValueChangeFlag=!1,this.items=[],this.groupItems=[],this.selectedItems=[],this.visibleItems=[],this.activeItemIndex=-1,this.activeChipIndex=-1,this.activeDescendant="",this.text="",this.textInput=null,this.mutationObserver=L("mutation",(()=>this.updateItems())),this.resizeObserver=L("resize",(()=>this.setMaxScrollerHeight())),this.guid=p(),this.inputHeight=0,this.ignoreSelectedEventsFlag=!1,this.openTransitionProp="opacity",this.setFilteredPlacements=()=>{const{el:i,flipPlacements:t}=this;this.filteredFlipPlacements=t?c(t,i):null},this.getValue=()=>{const i=this.selectedItems.map((i=>{var t;return null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.toString()}));return(null==i?void 0:i.length)?i.length>1?i:i[0]:""},this.onLabelClick=()=>{this.setFocus()},this.keydownHandler=i=>{const{key:t}=i;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):this.open&&(this.open=!1,i.preventDefault());break;case"ArrowLeft":this.previousChip(),i.preventDefault();break;case"ArrowRight":this.nextChip(),i.preventDefault();break;case"ArrowUp":i.preventDefault(),this.shiftActiveItemIndex(-1),this.comboboxInViewport()||this.el.scrollIntoView();break;case"ArrowDown":i.preventDefault(),this.open||(this.open=!0),this.shiftActiveItemIndex(1),this.comboboxInViewport()||this.el.scrollIntoView();break;case" ":this.textInput.value||(i.preventDefault(),this.open=!0,this.shiftActiveItemIndex(1));break;case"Home":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;i.preventDefault(),this.updateActiveItemIndex(this.visibleItems.length-1),this.scrollToActiveItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":this.open=!1,i.preventDefault();break;case"Enter":this.activeItemIndex>-1?(this.toggleSelection(this.visibleItems[this.activeItemIndex]),i.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),i.preventDefault()):this.allowCustomValues&&this.text?(this.addCustomChip(this.text,!0),i.preventDefault()):i.defaultPrevented||H(this)&&i.preventDefault();break;case"Delete":case"Backspace":this.activeChipIndex>-1?(i.preventDefault(),this.removeActiveChip()):!this.text&&this.isMulti()&&(i.preventDefault(),this.removeLastChip())}},this.toggleCloseEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxClose",this.toggleCloseEnd)},this.toggleOpenEnd=()=>{this.open=!1,this.el.removeEventListener("calciteComboboxOpen",this.toggleOpenEnd)},this.setMaxScrollerHeight=async()=>{const{listContainerEl:i,open:t,referenceEl:e}=this;if(!i||!t)return;await this.reposition(!0);const s=this.getMaxScrollerHeight();i.style.maxHeight=s>0?`${s}px`:"",i.style.minWidth=`${e.clientWidth}px`,await this.reposition(!0)},this.calciteChipDismissHandler=(i,t)=>{this.open=!1;const e=this.items.find((i=>i===t));e&&this.toggleSelection(e,!1),this.calciteComboboxChipDismiss.emit(i.detail)},this.clickHandler=i=>{i.composedPath().some((i=>"CALCITE-CHIP"===i.tagName))||(this.open=!this.open,this.updateActiveItemIndex(0),this.setFocus())},this.setInactiveIfNotContained=i=>{const t=i.composedPath();!this.open||t.includes(this.el)||t.includes(this.referenceEl)||(this.allowCustomValues&&this.text.trim().length&&this.addCustomChip(this.text),"single"===this.selectionMode&&(this.textInput&&(this.textInput.value=""),this.text="",this.filterItems(""),this.updateActiveItemIndex(-1)),this.open=!1)},this.setFloatingEl=i=>{this.floatingEl=i,l(this,this.referenceEl,this.floatingEl)},this.setContainerEl=i=>{this.resizeObserver.observe(i),this.listContainerEl=i,this.transitionEl=i,T(this)},this.setReferenceEl=i=>{this.referenceEl=i,l(this,this.referenceEl,this.floatingEl)},this.inputHandler=i=>{const t=i.target.value;this.text=t,this.filterItems(t),t&&(this.activeChipIndex=-1)},this.filterItems=(()=>{const i=(i,t)=>i&&t.some((({label:t,value:e})=>i.tagName===w?e===i.label:e===i.textLabel||e===i.value||t===i.textLabel||t===i.value));return M((t=>{const e=n(this.data,t);this.getCombinedItems().forEach((t=>{const s=!i(t,e);t.hidden=s;const[a,n]=t.ancestors;(i(a,e)||i(n,e))&&(t.hidden=!1),s||t.ancestors.forEach((i=>i.hidden=!1))})),this.visibleItems=this.getVisibleItems(),this.calciteComboboxFilterChange.emit({visibleItems:[...this.visibleItems],text:t})}),100)})(),this.internalCalciteLookupChangeEvent=()=>{this.calciteLookupChange.emit(this.selectedItems)},this.emitCalciteLookupChange=M(this.internalCalciteLookupChangeEvent,0),this.internalComboboxChangeEvent=()=>{const{selectedItems:i}=this;this.calciteComboboxChange.emit({selectedItems:i})},this.emitComboboxChange=M(this.internalComboboxChangeEvent,0),this.updateItems=()=>{this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.selectedItems=this.getSelectedItems(),this.visibleItems=this.getVisibleItems(),this.needsIcon=this.getNeedsIcon(),this.allowCustomValues||this.setMaxScrollerHeight()},this.scrollToActiveItem=()=>{const i=this.visibleItems[this.activeItemIndex],t=this.calculateSingleItemHeight(i),{offsetHeight:e,scrollTop:s}=this.listContainerEl;e+s<i.offsetTop+t?this.listContainerEl.scrollTop=i.offsetTop-e+t:i.offsetTop<s&&(this.listContainerEl.scrollTop=i.offsetTop)},this.comboboxFocusHandler=()=>{var i;null===(i=this.textInput)||void 0===i||i.focus()},this.comboboxBlurHandler=i=>{this.setInactiveIfNotContained(i)}}activeHandler(i){if(this.disabled)return this.active=!1,void(this.open=!1);this.open=i}openHandler(i){if(i||r(this.floatingEl),this.disabled)return this.active=!1,void(this.open=!1);this.active=i,this.setMaxScrollerHeight()}handleDisabledChange(i){i||(this.active=!1,this.open=!1)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}valueHandler(i){if(!this.internalValueChangeFlag){const t=this.getItems();Array.isArray(i)?t.forEach((t=>t.selected=i.includes(t.value))):t.forEach(i?t=>t.selected=i===t.value:i=>i.selected=!1),this.updateItems()}}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}documentClickHandler(i){E(i)&&this.setInactiveIfNotContained(i)}calciteComboboxItemChangeHandler(i){if(this.ignoreSelectedEventsFlag)return;const t=i.target,e=this.visibleItems.indexOf(t);this.updateActiveItemIndex(e),this.toggleSelection(t,t.selected)}async reposition(i=!1){const{floatingEl:t,referenceEl:e,placement:s,overlayPositioning:a,filteredFlipPlacements:n}=this;return h(this,{floatingEl:t,referenceEl:e,overlayPositioning:a,placement:s,flipPlacements:n,type:"menu"},i)}async setFocus(){var i;null===(i=this.textInput)||void 0===i||i.focus(),this.activeChipIndex=-1,this.activeItemIndex=-1}connectedCallback(){var i;this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,null===(i=this.mutationObserver)||void 0===i||i.observe(this.el,{childList:!0,subtree:!0}),C(this),_(this),T(this),this.setFilteredPlacements(),this.reposition(!0),this.active&&this.activeHandler(this.active),this.open&&this.openHandler(this.open)}componentWillLoad(){this.updateItems()}componentDidLoad(){D(this,this.getValue()),this.reposition(!0)}componentDidRender(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),A(this)}disconnectedCallback(){var i,t;null===(i=this.mutationObserver)||void 0===i||i.disconnect(),null===(t=this.resizeObserver)||void 0===t||t.disconnect(),z(this),j(this),d(this,this.referenceEl,this.floatingEl),B(this)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}textHandler(){this.updateActiveItemIndex(-1)}comboboxInViewport(){const i=this.el.getBoundingClientRect();return i.top>=0&&i.left>=0&&i.right<=(window.innerWidth||document.documentElement.clientWidth)&&i.bottom<=(window.innerHeight||document.documentElement.clientHeight)}onBeforeOpen(){this.calciteComboboxBeforeOpen.emit()}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit()}getMaxScrollerHeight(){const i=this.getCombinedItems().filter((i=>!i.hidden)),{maxItems:t}=this;let e=0,s=0;return i.length>t&&i.forEach((i=>{if(e<t&&t>0){const t=this.calculateSingleItemHeight(i);t>0&&(s+=t,e++)}})),s}calculateSingleItemHeight(i){let t=i.offsetHeight;return Array.from(i.querySelectorAll(u)).map((i=>null==i?void 0:i.offsetHeight)).forEach((i=>{t-=i})),t}getCombinedItems(){return[...this.groupItems,...this.items]}toggleSelection(i,t=!i.selected){i&&(this.isMulti()?(i.selected=t,this.updateAncestors(i),this.selectedItems=this.getSelectedItems(),this.emitCalciteLookupChange(),this.emitComboboxChange(),this.resetText(),this.filterItems("")):(this.ignoreSelectedEventsFlag=!0,this.items.forEach((e=>e.selected=e===i&&t)),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInput&&(this.textInput.value=i.textLabel),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")))}updateAncestors(i){if("ancestors"!==this.selectionMode)return;const t=g(i),e=f(i);i.selected?t.forEach((i=>{i.selected=!0})):(e.forEach((i=>i.selected=!1)),[...t].forEach((i=>{v(i)||(i.selected=!1)})))}getVisibleItems(){return this.items.filter((i=>!i.hidden))}getSelectedItems(){if(!this.isMulti()){const i=this.items.find((({selected:i})=>i));return i?[i]:[]}return this.items.filter((i=>i.selected&&("ancestors"!==this.selectionMode||!v(i)))).sort(((i,t)=>{const e=this.selectedItems.indexOf(i),s=this.selectedItems.indexOf(t);return e>-1&&s>-1?e-s:s-e}))}getData(){return this.items.map((i=>({constant:i.constant,filterDisabled:i.filterDisabled,value:i.value,label:i.textLabel})))}getNeedsIcon(){return"single"===this.selectionMode&&this.items.some((i=>i.icon))}resetText(){this.textInput&&(this.textInput.value=""),this.text=""}getItems(){return Array.from(this.el.querySelectorAll(x)).filter((i=>!i.disabled))}getGroupItems(){return Array.from(this.el.querySelectorAll(w))}addCustomChip(i,t){const e=this.items.find((t=>t.textLabel===i));if(e)this.toggleSelection(e,!0);else{this.isMulti()||this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1);const e=document.createElement(x);e.value=i,e.textLabel=i,e.selected=!0,this.el.appendChild(e),this.resetText(),t&&this.setFocus(),this.updateItems(),this.filterItems(""),this.emitCalciteLookupChange(),this.emitComboboxChange()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){if(this.text)return;const i=this.activeChipIndex;this.activeChipIndex=-1===i?this.selectedItems.length-1:Math.max(i-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){if(this.text||-1===this.activeChipIndex)return;const i=this.activeChipIndex+1;i>this.selectedItems.length-1?(this.activeChipIndex=-1,this.setFocus()):(this.activeChipIndex=i,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){var i;const t=null===(i=this.selectedItems[this.activeChipIndex])||void 0===i?void 0:i.guid,e=t?this.referenceEl.querySelector(`#combobox-chip-${t}`):null;null==e||e.setFocus()}shiftActiveItemIndex(i){const{length:t}=this.visibleItems;this.updateActiveItemIndex((this.activeItemIndex+t+i)%t),this.scrollToActiveItem()}updateActiveItemIndex(i){var t;this.activeItemIndex=i;let e=null;this.visibleItems.forEach(((t,s)=>{s===i?(t.active=!0,e=`combobox-item-${t.guid}`):t.active=!1})),this.activeDescendant=e,this.activeItemIndex>-1&&(this.activeChipIndex=-1,null===(t=this.textInput)||void 0===t||t.focus())}isMulti(){return"single"!==this.selectionMode}renderChips(){const{activeChipIndex:i,scale:t,selectionMode:s,intlRemoveTag:a}=this;return this.selectedItems.map(((n,o)=>{const c={chip:!0,"chip--active":i===o},l=[...[...g(n)].reverse(),n].map((i=>i.textLabel)),r="ancestors"!==s?n.textLabel:l.join(" / ");return e("calcite-chip",{class:c,dismissLabel:a,dismissible:!0,icon:n.icon,id:n.guid?`combobox-chip-${n.guid}`:null,key:n.textLabel,onCalciteChipDismiss:i=>this.calciteChipDismissHandler(i,n),scale:t,title:r,value:n.value},r)}))}renderInput(){const{guid:i,active:t,disabled:s,placeholder:a,selectionMode:n,selectedItems:o,open:c}=this,l="single"===n,r=o[0],h=!(c||t)&&l&&!!r;return e("span",{class:{"input-wrap":!0,"input-wrap--single":l}},h&&e("span",{class:{label:!0,"label--icon":!!(null==r?void 0:r.icon)},key:"label"},r.textLabel),e("input",{"aria-activedescendant":this.activeDescendant,"aria-autocomplete":"list","aria-controls":`combobox-listbox-${i}`,"aria-label":I(this),class:{input:!0,"input--single":!0,"input--transparent":this.activeChipIndex>-1,"input--hidden":h,"input--icon":!!this.placeholderIcon},disabled:s,id:`combobox-input-${i}`,key:"input",onBlur:this.comboboxBlurHandler,onFocus:this.comboboxFocusHandler,onInput:this.inputHandler,placeholder:a,ref:i=>this.textInput=i,type:"text"}))}renderListBoxOptions(){return this.visibleItems.map((i=>e("li",{"aria-selected":P(i.selected),id:i.guid?`combobox-item-${i.guid}`:null,role:"option",tabindex:"-1"},i.textLabel)))}renderFloatingUIContainer(){const{active:i,setFloatingEl:t,setContainerEl:s,open:a}=this;return e("div",{"aria-hidden":"true",class:{"floating-ui-container":!0,"floating-ui-container--active":a||i},ref:t},e("div",{class:{"list-container":!0,[m.animation]:!0,[m.animationActive]:a||i},ref:s},e("ul",{class:{list:!0,"list--hide":!(a||i)}},e("slot",null))))}renderIconStart(){const{selectedItems:i,placeholderIcon:t,selectionMode:s}=this,a=i[0],n=null==a?void 0:a.icon,o="single"===s;return(!this.open&&a?!!n&&o:!!this.placeholderIcon&&(!a||o))&&e("span",{class:"icon-start"},e("calcite-icon",{class:"selected-icon",icon:!this.open&&a?n:t,scale:"s"}))}renderIconEnd(){const{active:i,open:t}=this;return e("span",{class:"icon-end"},e("calcite-icon",{icon:i||t?"chevron-up":"chevron-down",scale:"s"}))}render(){const{active:i,guid:t,label:a,open:n}=this,o="single"===this.selectionMode;return e(s,null,e("div",{"aria-autocomplete":"list","aria-controls":`combobox-listbox-${t}`,"aria-expanded":P(n||i),"aria-haspopup":"listbox","aria-labelledby":`combobox-label-${t}`,"aria-live":"polite","aria-owns":`combobox-listbox-${t}`,class:{wrapper:!0,"wrapper--single":o||!this.selectedItems.length,"wrapper--active":n||i},onClick:this.clickHandler,onKeyDown:this.keydownHandler,ref:this.setReferenceEl,role:"combobox"},e("div",{class:"grid-input"},this.renderIconStart(),!o&&this.renderChips(),e("label",{class:"screen-readers-only",htmlFor:`combobox-input-${t}`,id:`combobox-label-${t}`},a),this.renderInput()),this.renderIconEnd()),e("ul",{"aria-labelledby":`combobox-label-${t}`,"aria-multiselectable":"true",class:"screen-readers-only",id:`combobox-listbox-${t}`,role:"listbox",tabIndex:-1},this.renderListBoxOptions()),this.renderFloatingUIContainer(),e($,{component:this}))}get el(){return a(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],value:["valueHandler"],flipPlacements:["flipPlacementsHandler"],selectedItems:["selectedItemsHandler"],text:["textHandler"]}}};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{position:relative;display:block}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-input-height:1.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-input-height:2rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-input-height:2.75rem}.wrapper{display:flex;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);outline-color:transparent;padding-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host(:focus-within) .wrapper,.wrapper--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.wrapper--single{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px}.input{flex-grow:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-style:none;background-color:transparent;padding:0px;font-family:inherit;color:var(--calcite-ui-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);min-inline-size:120px;-webkit-margin-after:var(--calcite-combobox-item-spacing-unit-s);margin-block-end:var(--calcite-combobox-item-spacing-unit-s)}.input:focus{outline:2px solid transparent;outline-offset:2px}.input--transparent{opacity:0}.input--single{margin-block:0px;padding:0px}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;inline-size:0px;min-inline-size:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.input-wrap{display:flex;flex-grow:1}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;display:flex;max-inline-size:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0px;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon-end,.icon-start{display:flex;inline-size:1rem;cursor:pointer;align-items:center}.icon-end{flex:none}.floating-ui-container{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}.floating-ui-container--active{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}@media (forced-colors: active){.wrapper,.floating-ui-container--active{border:1px solid canvasText}}.screen-readers-only{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.list-container{max-block-size:45vh;overflow-y:auto;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.list{margin:0px;display:block;padding:0px}.list--hide{block-size:0px;overflow:hidden}.chip{margin-block:calc(var(--calcite-combobox-item-spacing-unit-s) / 4);margin-inline:0 var(--calcite-combobox-item-spacing-unit-s);max-inline-size:100%}.chip--active{background-color:var(--calcite-ui-foreground-3)}.item{display:block}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
7
7
  /*!
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
11
  */
12
- const X=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.disabled=!1,this.selected=!1,this.active=!1,this.guid=p(),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.disabled||(this.selected=!this.selected)}}selectedWatchHandler(){this.calciteComboboxItemChange.emit(this.el)}connectedCallback(){this.ancestors=y(this.el),this.scale=S(this.el,"scale",this.scale),O(this)}disconnectedCallback(){R(this)}componentDidRender(){A(this)}async toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){const{icon:t,disabled:s,selected:a}=this,n="icon--indent";return!i||t||s?e("calcite-icon",{class:{icon:!t,"icon--custom":!!t,"icon--active":t&&a,[n]:!0},icon:t||(s?"circle-disallowed":i?"dot":"check"),scale:"s"}):e("span",{class:{icon:!0,"icon--dot":!0,[n]:!0}})}renderChildren(){return F(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===S(this.el,"selection-mode","multi"),t={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},a=k(this.el);return e(s,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("li",{class:t,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(i),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return a(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};X.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;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{-webkit-margin-before:-1px;margin-block-start:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:flex-end;min-inline-size:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const Y=class{constructor(e){i(this,e),this.layerSelectionChange=t(this,"layerSelectionChange",7),this.layerNames=[],this.selectedLayers=[],this.selectionMode="single"}async watchStateHandler(i,t){i!==t&&(await this._setLayers(),"single"===this.selectionMode&&this.layerSelectionChange.emit([this.layerNames[0]]))}async componentWillLoad(){await this._setLayers(),"single"===this.selectionMode&&(this.layerNames.length>0||1===this.selectedLayers.length)&&this.layerSelectionChange.emit(1===this.selectedLayers.length?[this.selectedLayers[0]]:[this.layerNames[0]])}render(){return e(s,null,e("div",{class:"background-w map-layer-picker-container"},e("div",{class:"map-layer-picker"},"multi"===this.selectionMode?this._getCombobox():this._getSelect())))}_getSelect(){return e("calcite-select",{label:"",onCalciteSelectChange:i=>this._layerSelectionChange(i),ref:i=>{this._layerElement=i}},this._addMapLayersOptions())}_getCombobox(){return e("calcite-combobox",{label:"",onCalciteComboboxChange:i=>this._layerSelectionChange(i),"selection-mode":this.selectionMode},this._addMapLayersOptions())}_addMapLayersOptions(){return this.layerNames.reduce(((i,t)=>(U.managedLayers.indexOf(t)<0&&i.push("multi"===this.selectionMode&&this.selectedLayers.indexOf(t)>-1?e("calcite-combobox-item",{selected:!0,textLabel:t,value:t}):"multi"===this.selectionMode?e("calcite-combobox-item",{textLabel:t,value:t}):this.selectedLayers.indexOf(t)>-1?e("calcite-option",{label:t,selected:!0,value:t}):e("calcite-option",{label:t,value:t})),i)),[])}async _setLayers(){this.mapView&&(this.layerNames=await W(this.mapView))}_layerSelectionChange(i){var t;this.selectedLayers="single"===this.selectionMode?[this._layerElement.value]:(null===(t=i.detail)||void 0===t?void 0:t.selectedItems.map((i=>i.value)))||[],this.layerSelectionChange.emit(this.selectedLayers)}get el(){return a(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};Y.style=":host{display:block}.background-w{background-color:white}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}";export{V as calcite_combobox,X as calcite_combobox_item,Y as map_layer_picker}
12
+ const X=class{constructor(e){i(this,e),this.calciteComboboxItemChange=t(this,"calciteComboboxItemChange",6),this.disabled=!1,this.selected=!1,this.active=!1,this.guid=p(),this.scale="m",this.itemClickHandler=i=>{i.preventDefault(),this.disabled||(this.selected=!this.selected)}}selectedWatchHandler(){this.calciteComboboxItemChange.emit(this.el)}connectedCallback(){this.ancestors=y(this.el),this.scale=S(this.el,"scale",this.scale),O(this)}disconnectedCallback(){R(this)}componentDidRender(){A(this)}async toggleSelected(i){this.disabled||(this.selected="boolean"==typeof i?i:!this.selected)}renderIcon(i){const{icon:t,disabled:s,selected:a}=this,n="icon--indent";return!i||t||s?e("calcite-icon",{class:{icon:!t,"icon--custom":!!t,"icon--active":t&&a,[n]:!0},icon:t||(s?"circle-disallowed":i?"dot":"check"),scale:"s"}):e("span",{class:{icon:!0,"icon--dot":!0,[n]:!0}})}renderChildren(){return F(this.el)?e("ul",{key:"default-slot-container"},e("slot",null)):null}render(){const i="single"===S(this.el,"selection-mode","multi"),t={label:!0,"label--selected":this.selected,"label--active":this.active,"label--single":i},a=k(this.el);return e(s,{"aria-hidden":"true"},e("div",{class:`container scale--${this.scale}`,style:{"--calcite-combobox-item-spacing-indent-multiplier":`${a}`}},e("li",{class:t,id:this.guid,onClick:this.itemClickHandler},this.renderIcon(i),e("span",{class:"title"},this.textLabel)),this.renderChildren()))}get el(){return a(this)}static get watchers(){return{selected:["selectedWatchHandler"]}}};X.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)}.scale--s{font-size:var(--calcite-font-size--2);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.5rem;--calcite-combobox-item-spacing-unit-s:0.25rem;--calcite-combobox-item-spacing-indent:0.5rem}.scale--m{font-size:var(--calcite-font-size--1);line-height:1rem;--calcite-combobox-item-spacing-unit-l:0.75rem;--calcite-combobox-item-spacing-unit-s:0.5rem;--calcite-combobox-item-spacing-indent:0.75rem}.scale--l{font-size:var(--calcite-font-size-0);line-height:1.25rem;--calcite-combobox-item-spacing-unit-l:1rem;--calcite-combobox-item-spacing-unit-s:0.75rem;--calcite-combobox-item-spacing-indent:1rem}.container{--calcite-combobox-item-indent-value:calc(\n var(--calcite-combobox-item-spacing-indent) * var(--calcite-combobox-item-spacing-indent-multiplier)\n )}:host(:focus){--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host,ul{margin:0px;display:flex;flex-direction:column;padding:0px}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;color:var(--calcite-ui-text-3);-webkit-text-decoration-line:none;text-decoration-line:none;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);outline-color:transparent;padding-block:var(--calcite-combobox-item-spacing-unit-s);padding-inline:var(--calcite-combobox-item-spacing-unit-l)}:host([disabled]) .label{cursor:default}.label--selected{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.label--active{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.label:hover,.label:active{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1);-webkit-text-decoration-line:none;text-decoration-line:none;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.title{padding-block:0;padding-inline:var(--calcite-combobox-item-spacing-unit-l)}.icon{display:inline-flex;opacity:0;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);color:var(--calcite-ui-border-1)}.icon--indent{-webkit-padding-start:var(--calcite-combobox-item-indent-value);padding-inline-start:var(--calcite-combobox-item-indent-value)}.icon--custom{-webkit-margin-before:-1px;margin-block-start:-1px;color:var(--calcite-ui-text-3)}.icon--active{color:var(--calcite-ui-text-1)}.icon--dot{display:flex;justify-content:flex-end;min-inline-size:var(--calcite-combobox-item-spacing-unit-l)}.icon--dot:before{text-align:start;content:"•"}.label--active .icon{opacity:1}.label--selected .icon{opacity:1;color:var(--calcite-ui-brand)}:host(:hover[disabled]) .icon{opacity:1}';const Y=class{constructor(e){i(this,e),this.layerSelectionChange=t(this,"layerSelectionChange",7),this.layerNames=[],this.mapView=void 0,this.selectedLayers=[],this.selectionMode="single"}async watchStateHandler(i,t){i!==t&&(await this._setLayers(),"single"===this.selectionMode&&this.layerSelectionChange.emit([this.layerNames[0]]))}async componentWillLoad(){await this._setLayers(),"single"===this.selectionMode&&(this.layerNames.length>0||1===this.selectedLayers.length)&&this.layerSelectionChange.emit(1===this.selectedLayers.length?[this.selectedLayers[0]]:[this.layerNames[0]])}render(){return e(s,null,e("div",{class:"background-w map-layer-picker-container"},e("div",{class:"map-layer-picker"},"multi"===this.selectionMode?this._getCombobox():this._getSelect())))}_getSelect(){return e("calcite-select",{label:"",onCalciteSelectChange:i=>this._layerSelectionChange(i),ref:i=>{this._layerElement=i}},this._addMapLayersOptions())}_getCombobox(){return e("calcite-combobox",{label:"",onCalciteComboboxChange:i=>this._layerSelectionChange(i),"selection-mode":this.selectionMode},this._addMapLayersOptions())}_addMapLayersOptions(){return this.layerNames.reduce(((i,t)=>(U.managedLayers.indexOf(t)<0&&i.push("multi"===this.selectionMode&&this.selectedLayers.indexOf(t)>-1?e("calcite-combobox-item",{selected:!0,textLabel:t,value:t}):"multi"===this.selectionMode?e("calcite-combobox-item",{textLabel:t,value:t}):this.selectedLayers.indexOf(t)>-1?e("calcite-option",{label:t,selected:!0,value:t}):e("calcite-option",{label:t,value:t})),i)),[])}async _setLayers(){this.mapView&&(this.layerNames=await W(this.mapView))}_layerSelectionChange(i){var t;this.selectedLayers="single"===this.selectionMode?[this._layerElement.value]:(null===(t=i.detail)||void 0===t?void 0:t.selectedItems.map((i=>i.value)))||[],this.layerSelectionChange.emit(this.selectedLayers)}get el(){return a(this)}static get watchers(){return{mapView:["watchStateHandler"]}}};Y.style=":host{display:block}.background-w{background-color:white}.map-layer-picker-container{width:100%}.map-layer-picker{position:relative;width:100%;display:inline-block}.padding-bottom-1{padding-bottom:1rem}";export{V as calcite_combobox,X as calcite_combobox_item,Y as map_layer_picker}
@@ -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 s,g as a}from"./p-be2e3b99.js";import{g as e}from"./p-0af82897.js";import{p as n}from"./p-e99b1247.js";import"./p-3b010ce1.js";const l=class{constructor(t){i(this,t),this.defaultChecked=!0,this._formatOptions=[],this._translations=void 0}async getConfigInfo(){const i=await this._formatOptionsCheckList.getConfigInfo(),t=await this._csvOptionsCheckList.getConfigInfo();return Object.assign(Object.assign({},i),t)}async componentWillLoad(){await this._getTranslations(),await this._setFormatOptions()}render(){var i,a,e;return t(s,null,t("div",null,t("div",{class:"padding-block-end-1"},t("calcite-label",{class:"label-spacing"},null===(i=this._translations)||void 0===i?void 0:i.availableLabelFormats)),t("div",{class:"padding-block-end-1 padding-inline-start-1"},t("check-list",{defaultChecked:this.defaultChecked,ref:i=>{this._formatOptionsCheckList=i},values:this._formatOptions})),t("div",{class:"padding-block-end-1"},t("calcite-label",{class:"label-spacing"},null===(a=this._translations)||void 0===a?void 0:a.csvOptions)),t("div",{class:"padding-block-end-1 padding-inline-start-1"},t("check-list",{defaultChecked:this.defaultChecked,ref:i=>{this._csvOptionsCheckList=i},values:[null===(e=this._translations)||void 0===e?void 0:e.csvColumnTitle]}))))}async _setFormatOptions(){const i=(n.default||n).sort(((i,t)=>{const s=parseInt(i.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(t.descriptionPDF.labelsPerPageDisplay,10);return s<a?-1:s>a?1:0}));this._formatOptions=i.map((i=>this._getLabelSizeText(i)))}_getLabelSizeText(i){const t=`${i.descriptionPDF.labelWidthDisplay} x ${i.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",i.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",t)}async _getTranslations(){const i=await e(this.el);this._translations=i[0]}get el(){return a(this)}};l.style=":host{display:block}.label-spacing{--calcite-label-margin-bottom:0}.padding-block-end-1{-webkit-padding-after:1rem;padding-block-end:1rem}.padding-inline-start-1{-webkit-padding-start:1rem;padding-inline-start:1rem}";export{l as config_pdf_download}
@@ -3,7 +3,7 @@
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 i,h as t,g as a}from"./p-be2e3b99.js";import{c as n}from"./p-ce33ef37.js";import{e}from"./p-32a67cb2.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-a80b3880.js";
6
+ import{r as i,h as t,g as a}from"./p-be2e3b99.js";import{c as n}from"./p-93d3119d.js";import{e}from"./p-32a67cb2.js";import"./p-3b010ce1.js";import"./p-729708a3.js";import"./p-a80b3880.js";
7
7
  /*!
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.
@@ -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,c as t,h as a,H as e,g as o}from"./p-be2e3b99.js";import{f as n,t as r}from"./p-32a67cb2.js";import{c,d as s,g as l}from"./p-dbad98e8.js";import{c as d,d as h,H as m}from"./p-ab93e73f.js";import{u as p}from"./p-7daea1df.js";import{i as b}from"./p-73e23995.js";import"./p-729708a3.js";import"./p-a80b3880.js";const u=class{constructor(a){i(this,a),this.calciteSwitchChange=t(this,"calciteSwitchChange",6),this.disabled=!1,this.scale="m",this.switched=!1,this.checked=!1,this.keyDownHandler=i=>{!this.disabled&&b(i.key)&&(this.toggle(),i.preventDefault())},this.clickHandler=()=>{this.toggle()},this.setSwitchEl=i=>{this.switchEl=i}}switchedWatcher(i){this.checked=i}async setFocus(){n(this.switchEl)}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit({switched:this.checked})}connectedCallback(){const i=this.checked||this.switched;i&&(this.switched=this.checked=i),c(this),d(this)}disconnectedCallback(){s(this),h(this)}componentDidRender(){p(this)}render(){return a(e,{onClick:this.clickHandler,onKeyDown:this.keyDownHandler},a("div",{"aria-checked":r(this.checked),"aria-label":l(this),class:"container",ref:this.setSwitchEl,role:"switch",tabIndex:0},a("div",{class:"track"},a("div",{class:"handle"})),a(m,{component:this})))}get el(){return o(this)}static get watchers(){return{switched:["switchedWatcher"]}}};u.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}: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([scale=s]) .container{block-size:0.75rem}:host([scale=s]) .track{block-size:0.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:0.5rem;inline-size:0.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:0.75rem;inline-size:0.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host{inline-size:auto;outline-color:transparent}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;border-radius:9999px;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-2);background-color:var(--calcite-ui-foreground-2);vertical-align:top;transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.handle{pointer-events:none;position:absolute;display:block;border-radius:9999px;border-width:2px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);transition-property:all;transition-duration:150ms;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);inset-block-start:-1px;inset-inline:-1px auto}:host(:hover) .handle,:host(:focus) .handle{border-color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand)}:host([checked]) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]) .handle{border-color:var(--calcite-ui-brand);inset-inline:auto -1px}:host([checked]:hover) .track{border-color:var(--calcite-ui-brand-hover);background-color:var(--calcite-ui-brand)}:host([checked]:hover) .handle{border-color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}@media (forced-colors: active){:host([checked]) .track{background-color:canvasText}}.container:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";export{u as calcite_switch}
@@ -0,0 +1,12 @@
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,h as e,g as a}from"./p-be2e3b99.js";import{c as o}from"./p-32a67cb2.js";import{c as n,d as r,g as c}from"./p-dbad98e8.js";import{c as i}from"./p-9a9955db.js";import{u as l}from"./p-7daea1df.js";import{s,r as u}from"./p-ab93e73f.js";import"./p-729708a3.js";import"./p-a80b3880.js";!function(t){function e(t,e,a){throw new t("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+e+".",a)}"function"!=typeof t.requestSubmit&&(t.requestSubmit=function(t){t?(function(t,a){t instanceof HTMLElement||e(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||e(TypeError,"The specified element is not a submit button"),t.form==a||e(DOMException,"The specified element is not owned by this form element","NotFoundError")}(t,this),t.click()):((t=document.createElement("input")).type="submit",t.hidden=!0,this.appendChild(t),t.click(),this.removeChild(t))})}(HTMLFormElement.prototype);
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
+ */
12
+ const p=class{constructor(e){t(this,e),this.alignment="center",this.appearance="solid",this.color="blue",this.disabled=!1,this.intlLoading="Loading",this.loading=!1,this.round=!1,this.scale="m",this.splitChild=!1,this.type="button",this.width="auto",this.mutationObserver=i("mutation",(()=>this.updateHasContent())),this.hasContent=!1,this.hasLoader=!1,this.handleClick=()=>{const{type:t}=this;this.href||("submit"===t?s(this):"reset"===t&&u(this))}}loadingChanged(t,e){t&&!e&&(this.hasLoader=!0),!t&&e&&window.setTimeout((()=>{this.hasLoader=!1}),300)}connectedCallback(){this.hasLoader=this.loading,this.setupTextContentObserver(),n(this),this.formEl=o(this.el,this.form?`#${this.form}`:"form")}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),r(this),this.formEl=null}componentWillLoad(){this.updateHasContent()}componentDidRender(){l(this)}render(){const t=this.href?"a":"button",a=t,o=this.hasLoader?e("div",{class:"calcite-button--loader"},e("calcite-loader",{active:!0,class:this.loading?"loading-in":"loading-out",inline:!0,label:this.intlLoading,scale:"l"===this.scale?"m":"s"})):null,n=e("calcite-icon",{class:{icon:!0,"icon--start":!0},flipRtl:"start"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconStart,scale:"l"===this.scale?"m":"s"}),r=e("calcite-icon",{class:{icon:!0,"icon--end":!0},flipRtl:"end"===this.iconFlipRtl||"both"===this.iconFlipRtl,icon:this.iconEnd,scale:"l"===this.scale?"m":"s"}),i=e("span",{class:"content"},e("slot",null));return e(a,{"aria-label":c(this),class:{"content--slotted":this.hasContent,"icon-start-empty":!this.iconStart,"icon-end-empty":!this.iconEnd},disabled:this.disabled||this.loading,href:"a"===t&&this.href,name:"button"===t&&this.name,onClick:this.handleClick,ref:t=>this.childEl=t,rel:"a"===t&&this.rel,tabIndex:this.disabled||this.loading?-1:null,target:"a"===t&&this.target,type:"button"===t&&this.type},o,this.iconStart?n:null,this.hasContent?i:null,this.iconEnd?r:null)}async setFocus(){var t;null===(t=this.childEl)||void 0===t||t.focus()}updateHasContent(){var t,e;const a=this.el.textContent.trim().length>0||this.el.childNodes.length>0;this.hasContent=1===this.el.childNodes.length&&"#text"===(null===(t=this.el.childNodes[0])||void 0===t?void 0:t.nodeName)?(null===(e=this.el.textContent)||void 0===e?void 0:e.trim().length)>0:a}setupTextContentObserver(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}onLabelClick(){this.handleClick(),this.setFocus()}get el(){return a(this)}static get watchers(){return{loading:["loadingChanged"]}}};p.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([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:inline-block;inline-size:auto;vertical-align:middle}:host([round]){border-radius:50px}:host([round]) a,:host([round]) button{border-radius:50px}:host button,:host a{outline-color:transparent}:host button:focus,:host a:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host button,:host a{--calcite-button-content-margin:0.5rem;--calcite-button-padding-x:7px;--calcite-button-padding-y:3px;padding-block:var(--calcite-button-padding-y);padding-inline:var(--calcite-button-padding-x);position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;align-items:center;justify-content:center;border-radius:0px;border-style:none;text-align:center;font-family:inherit;font-weight:var(--calcite-font-weight-normal);-webkit-text-decoration-line:none;text-decoration-line:none;transition:color var(--calcite-animation-timing) ease-in-out, background-color var(--calcite-animation-timing) ease-in-out, box-shadow var(--calcite-animation-timing) ease-in-out, outline-color var(--calcite-internal-animation-timing-fast) ease-in-out}:host button:hover,:host a:hover{-webkit-text-decoration-line:none;text-decoration-line:none}.content{display:flex;flex-basis:auto;margin-inline:var(--calcite-button-content-margin)}.icon-start-empty .content{-webkit-margin-start:unset;margin-inline-start:unset}.icon-end-empty .content{-webkit-margin-end:unset;margin-inline-end:unset}:host([scale=m]) button,:host([scale=m]) a{--calcite-button-content-margin:0.75rem}:host([scale=l]) button,:host([scale=l]) a{--calcite-button-content-margin:1rem}:host([width=auto]){inline-size:auto}:host([width=half]){inline-size:50%}:host([width=full]){inline-size:100%}:host([alignment=center]:not([width=auto])) a,:host([alignment=center]:not([width=auto])) button{justify-content:center}:host([alignment=start]:not([width=auto])) a,:host([alignment=start]:not([width=auto])) button{justify-content:flex-start}:host([alignment=end]:not([width=auto])) a,:host([alignment=end]:not([width=auto])) button{justify-content:flex-end}:host([alignment*=space-between]:not([width=auto])) a,:host([alignment*=space-between]:not([width=auto])) button{justify-content:space-between}:host([alignment=icon-start-space-between]:not([width=auto])) .icon--start{-webkit-margin-end:auto;margin-inline-end:auto}:host([alignment=icon-start-space-between]:not([width=auto])) a,:host([alignment=icon-start-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=icon-end-space-between]:not([width=auto])) .icon--end{-webkit-margin-start:auto;margin-inline-start:auto}:host([alignment=icon-end-space-between]:not([width=auto])) a,:host([alignment=icon-end-space-between]:not([width=auto])) button{text-align:unset}:host([alignment=center]) a:not(.content--slotted) .icon--start+.icon--end,:host([alignment=center]) button:not(.content--slotted) .icon--start+.icon--end{-webkit-margin-start:var(--calcite-button-content-margin);margin-inline-start:var(--calcite-button-content-margin)}.icon{position:relative;margin:0px;display:inline-flex;font-weight:var(--calcite-font-weight-normal);line-height:inherit}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([loading]){pointer-events:none}:host([loading]) button,:host([loading]) a{pointer-events:none;opacity:var(--calcite-ui-opacity-disabled)}@keyframes loader-in{0%{inline-size:0;opacity:0;transform:scale(0.5)}100%{inline-size:1em;opacity:1;transform:scale(1)}}@keyframes loader-out{0%{inline-size:1em;opacity:1;transform:scale(1)}100%{inline-size:0;opacity:0;transform:scale(0.5)}}.calcite-button--loader{display:flex}.calcite-button--loader calcite-loader{margin:0px;transition:inline-size var(--calcite-internal-animation-timing-slow) ease-in-out, opacity var(--calcite-internal-animation-timing-slow) ease-in-out, transform var(--calcite-internal-animation-timing-slow) ease-in-out}.calcite-button--loader calcite-loader.loading-in{animation-name:loader-in;animation-duration:var(--calcite-internal-animation-timing-slow)}.calcite-button--loader calcite-loader.loading-out{animation-name:loader-out;animation-duration:var(--calcite-internal-animation-timing-slow)}:host([loading]) button.content--slotted .calcite-button--loader calcite-loader,:host([loading]) a.content--slotted .calcite-button--loader calcite-loader{-webkit-margin-end:var(--calcite-button-content-margin);margin-inline-end:var(--calcite-button-content-margin)}:host([loading]) button:not(.content--slotted) .icon--start,:host([loading]) button:not(.content--slotted) .icon--end,:host([loading]) a:not(.content--slotted) .icon--start,:host([loading]) a:not(.content--slotted) .icon--end{display:none}:host([appearance=solid]) button,:host([appearance=solid]) a{border-width:1px;border-style:solid;border-color:transparent}:host([color=blue]) button,:host([color=blue]) a{background-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-inverse)}:host([color=blue]) button:hover,:host([color=blue]) button:focus,:host([color=blue]) a:hover,:host([color=blue]) a:focus{background-color:var(--calcite-ui-brand-hover)}:host([color=blue]) button:active,:host([color=blue]) a:active{background-color:var(--calcite-ui-brand-press)}:host([color=blue]) button calcite-loader,:host([color=blue]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=red]) button,:host([color=red]) a{background-color:var(--calcite-ui-danger);color:var(--calcite-ui-text-inverse)}:host([color=red]) button:hover,:host([color=red]) button:focus,:host([color=red]) a:hover,:host([color=red]) a:focus{background-color:var(--calcite-ui-danger-hover)}:host([color=red]) button:active,:host([color=red]) a:active{background-color:var(--calcite-ui-danger-press)}:host([color=red]) button calcite-loader,:host([color=red]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([color=neutral]) button,:host([color=neutral]) a{background-color:var(--calcite-ui-foreground-3);color:var(--calcite-ui-text-1)}:host([color=neutral]) button:hover,:host([color=neutral]) button:focus,:host([color=neutral]) a:hover,:host([color=neutral]) a:focus{background-color:var(--calcite-ui-foreground-2)}:host([color=neutral]) button:active,:host([color=neutral]) a:active{background-color:var(--calcite-ui-foreground-1)}:host([color=neutral]) button calcite-loader,:host([color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([color=inverse]) button,:host([color=inverse]) a{color:var(--calcite-ui-text-inverse);background-color:var(--calcite-ui-inverse)}:host([color=inverse]) button:hover,:host([color=inverse]) button:focus,:host([color=inverse]) a:hover,:host([color=inverse]) a:focus{background-color:var(--calcite-ui-inverse-hover)}:host([color=inverse]) button:active,:host([color=inverse]) a:active{background-color:var(--calcite-ui-inverse-press)}:host([color=inverse]) button calcite-loader,:host([color=inverse]) a calcite-loader{color:var(--calcite-ui-text-inverse)}:host([appearance=outline]) button,:host([appearance=outline]) a{border-width:1px;border-style:solid;background-color:var(--calcite-ui-foreground-1);box-shadow:inset 0 0 0 1px transparent}:host([appearance=outline][color=blue]) button,:host([appearance=outline][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:hover,:host([appearance=outline][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=outline][color=blue]) button:focus,:host([appearance=outline][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=outline][color=blue]) button:active,:host([appearance=outline][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=outline][color=blue]) button calcite-loader,:host([appearance=outline][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=outline][color=red]) button,:host([appearance=outline][color=red]) a{border-color:var(--calcite-ui-danger);background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:hover,:host([appearance=outline][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=outline][color=red]) button:focus,:host([appearance=outline][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=outline][color=red]) button:active,:host([appearance=outline][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=outline][color=red]) button calcite-loader,:host([appearance=outline][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=outline][color=neutral]) button,:host([appearance=outline][color=neutral]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:hover,:host([appearance=outline][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:focus,:host([appearance=outline][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button:active,:host([appearance=outline][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=outline][color=neutral]) button calcite-loader,:host([appearance=outline][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][color=inverse]) button,:host([appearance=outline][color=inverse]) a{background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:hover,:host([appearance=outline][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=outline][color=inverse]) button:focus,:host([appearance=outline][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=outline][color=inverse]) button:active,:host([appearance=outline][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=outline][color=inverse]) button calcite-loader,:host([appearance=outline][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear]) button,:host([appearance=clear]) a,:host([appearance=minimal]) button,:host([appearance=minimal]) a{border-width:1px;border-style:solid;background-color:transparent;box-shadow:inset 0 0 0 1px transparent}:host([appearance=clear][color=blue]) button,:host([appearance=clear][color=blue]) a,:host([appearance=minimal][color=blue]) button,:host([appearance=minimal][color=blue]) a{border-color:var(--calcite-ui-brand);background-color:transparent;color:var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:hover,:host([appearance=clear][color=blue]) a:hover,:host([appearance=minimal][color=blue]) button:hover,:host([appearance=minimal][color=blue]) a:hover{border-color:var(--calcite-ui-brand-hover);color:var(--calcite-ui-brand-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-brand-hover)}:host([appearance=clear][color=blue]) button:focus,:host([appearance=clear][color=blue]) a:focus,:host([appearance=minimal][color=blue]) button:focus,:host([appearance=minimal][color=blue]) a:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([appearance=clear][color=blue]) button:active,:host([appearance=clear][color=blue]) a:active,:host([appearance=minimal][color=blue]) button:active,:host([appearance=minimal][color=blue]) a:active{border-color:var(--calcite-ui-brand-press);color:var(--calcite-ui-brand-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand-press)}:host([appearance=clear][color=blue]) button calcite-loader,:host([appearance=clear][color=blue]) a calcite-loader,:host([appearance=minimal][color=blue]) button calcite-loader,:host([appearance=minimal][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=clear][color=red]) button,:host([appearance=clear][color=red]) a,:host([appearance=minimal][color=red]) button,:host([appearance=minimal][color=red]) a{border-color:var(--calcite-ui-danger);background-color:transparent;color:var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:hover,:host([appearance=clear][color=red]) a:hover,:host([appearance=minimal][color=red]) button:hover,:host([appearance=minimal][color=red]) a:hover{border-color:var(--calcite-ui-danger-hover);color:var(--calcite-ui-danger-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-danger-hover)}:host([appearance=clear][color=red]) button:focus,:host([appearance=clear][color=red]) a:focus,:host([appearance=minimal][color=red]) button:focus,:host([appearance=minimal][color=red]) a:focus{border-color:var(--calcite-ui-danger);color:var(--calcite-ui-danger);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger)}:host([appearance=clear][color=red]) button:active,:host([appearance=clear][color=red]) a:active,:host([appearance=minimal][color=red]) button:active,:host([appearance=minimal][color=red]) a:active{border-color:var(--calcite-ui-danger-press);color:var(--calcite-ui-danger-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-danger-press)}:host([appearance=clear][color=red]) button calcite-loader,:host([appearance=clear][color=red]) a calcite-loader,:host([appearance=minimal][color=red]) button calcite-loader,:host([appearance=minimal][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=clear][color=neutral]) button,:host([appearance=clear][color=neutral]) a,:host([appearance=minimal][color=neutral]) button,:host([appearance=minimal][color=neutral]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:hover,:host([appearance=clear][color=neutral]) a:hover,:host([appearance=minimal][color=neutral]) button:hover,:host([appearance=minimal][color=neutral]) a:hover{box-shadow:inset 0 0 0 1px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:focus,:host([appearance=clear][color=neutral]) a:focus,:host([appearance=minimal][color=neutral]) button:focus,:host([appearance=minimal][color=neutral]) a:focus{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button:active,:host([appearance=clear][color=neutral]) a:active,:host([appearance=minimal][color=neutral]) button:active,:host([appearance=minimal][color=neutral]) a:active{box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-3)}:host([appearance=clear][color=neutral]) button calcite-loader,:host([appearance=clear][color=neutral]) a calcite-loader,:host([appearance=minimal][color=neutral]) button calcite-loader,:host([appearance=minimal][color=neutral]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=clear][color=inverse]) button,:host([appearance=clear][color=inverse]) a,:host([appearance=minimal][color=inverse]) button,:host([appearance=minimal][color=inverse]) a{background-color:transparent;color:var(--calcite-ui-text-1);border-color:var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:hover,:host([appearance=clear][color=inverse]) a:hover,:host([appearance=minimal][color=inverse]) button:hover,:host([appearance=minimal][color=inverse]) a:hover{border-color:var(--calcite-ui-inverse-hover);box-shadow:inset 0 0 0 1px var(--calcite-ui-inverse-hover)}:host([appearance=clear][color=inverse]) button:focus,:host([appearance=clear][color=inverse]) a:focus,:host([appearance=minimal][color=inverse]) button:focus,:host([appearance=minimal][color=inverse]) a:focus{border-color:var(--calcite-ui-inverse);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse)}:host([appearance=clear][color=inverse]) button:active,:host([appearance=clear][color=inverse]) a:active,:host([appearance=minimal][color=inverse]) button:active,:host([appearance=minimal][color=inverse]) a:active{border-color:var(--calcite-ui-inverse-press);box-shadow:inset 0 0 0 2px var(--calcite-ui-inverse-press)}:host([appearance=clear][color=inverse]) button calcite-loader,:host([appearance=clear][color=inverse]) a calcite-loader,:host([appearance=minimal][color=inverse]) button calcite-loader,:host([appearance=minimal][color=inverse]) a calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=outline][split-child=primary]) button,:host([appearance=clear][split-child=primary]) button,:host([appearance=minimal][split-child=primary]) button{border-inline-end-width:0;border-inline-start-width:1px}:host([appearance=outline][split-child=secondary]) button,:host([appearance=clear][split-child=secondary]) button,:host([appearance=minimal][split-child=secondary]) button{border-inline-start-width:0;border-inline-end-width:1px}:host([appearance=transparent]:not(.enable-editing-button)) button,:host([appearance=transparent]:not(.enable-editing-button)) a{background-color:transparent}:host([appearance=transparent]:not(.enable-editing-button)) button:hover,:host([appearance=transparent]:not(.enable-editing-button)) button:focus,:host([appearance=transparent]:not(.enable-editing-button)) a:hover,:host([appearance=transparent]:not(.enable-editing-button)) a:focus{background-color:var(--calcite-button-transparent-hover)}:host([appearance=transparent]:not(.enable-editing-button)) button:active,:host([appearance=transparent]:not(.enable-editing-button)) a:active{background-color:var(--calcite-button-transparent-press)}:host([appearance=transparent][color=blue]) button,:host([appearance=transparent][color=blue]) a{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:hover,:host([appearance=transparent][color=blue]) a:hover{color:var(--calcite-ui-brand-hover)}:host([appearance=transparent][color=blue]) button:focus,:host([appearance=transparent][color=blue]) a:focus{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=blue]) button:active,:host([appearance=transparent][color=blue]) a:active{color:var(--calcite-ui-brand-press)}:host([appearance=transparent][color=blue]) button calcite-loader,:host([appearance=transparent][color=blue]) a calcite-loader{color:var(--calcite-ui-brand)}:host([appearance=transparent][color=red]) button,:host([appearance=transparent][color=red]) a{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:hover,:host([appearance=transparent][color=red]) a:hover{color:var(--calcite-ui-danger-hover)}:host([appearance=transparent][color=red]) button:focus,:host([appearance=transparent][color=red]) a:focus{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=red]) button:active,:host([appearance=transparent][color=red]) a:active{color:var(--calcite-ui-danger-press)}:host([appearance=transparent][color=red]) button calcite-loader,:host([appearance=transparent][color=red]) a calcite-loader{color:var(--calcite-ui-danger)}:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) button,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) a,:host([appearance=transparent][color=neutral]:not(.cancel-editing-button)) calcite-loader{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].cancel-editing-button) button{border-block-start-width:1px;border-block-end-width:1px;color:var(--calcite-ui-text-3);border-block-start-color:var(--calcite-ui-border-input);border-block-end-color:var(--calcite-ui-border-input);border-block-style:solid}:host([appearance=transparent][color=neutral].cancel-editing-button) button:not(.content--slotted){--calcite-button-padding-y:0}:host([appearance=transparent][color=neutral].cancel-editing-button) button:hover{color:var(--calcite-ui-text-1)}:host([appearance=transparent][color=neutral].enable-editing-button) button{background-color:transparent}:host(.confirm-changes-button) button:focus,:host(.cancel-editing-button) button:focus,:host(.enable-editing-button) button:focus{outline-offset:-2px}:host([appearance=transparent][color=inverse]) button,:host([appearance=transparent][color=inverse]) a,:host([appearance=transparent][color=inverse]) calcite-loader{color:var(--calcite-ui-text-inverse)}:host([scale=s]) button.content--slotted,:host([scale=s]) a.content--slotted{font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s][appearance=transparent]) button.content--slotted,:host([scale=s][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.5rem;--calcite-button-padding-y:0.25rem}:host([scale=m]) button.content--slotted,:host([scale=m]) a.content--slotted{--calcite-button-padding-x:11px;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]:not([appearance=transparent])) button.content--slotted,:host([scale=m]:not([appearance=transparent])) a.content--slotted{--calcite-button-padding-y:7px}:host([scale=m][appearance=transparent]) button.content--slotted,:host([scale=m][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:0.75rem;--calcite-button-padding-y:0.5rem}:host([scale=l]) button.content--slotted,:host([scale=l]) a.content--slotted{--calcite-button-padding-x:15px;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]:not([appearance=transparent])) button.content--slotted,:host([scale=l]:not([appearance=transparent])) a.content--slotted{--calcite-button-padding-y:11px}:host([scale=l][appearance=transparent]) button.content--slotted,:host([scale=l][appearance=transparent]) a.content--slotted{--calcite-button-padding-x:1rem;--calcite-button-padding-y:0.75rem}:host([scale=s]) button:not(.content--slotted),:host([scale=s]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:3px;inline-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:1.5rem}:host([scale=s][appearance=transparent]) button:not(.content--slotted),:host([scale=s][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.25rem}:host([scale=m]) button:not(.content--slotted),:host([scale=m]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:7px;inline-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2rem}:host([scale=m][appearance=transparent]) button:not(.content--slotted),:host([scale=m][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.5rem}:host([scale=l]) button:not(.content--slotted),:host([scale=l]) a:not(.content--slotted){--calcite-button-padding-x:0.125rem;--calcite-button-padding-y:9px;inline-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;min-block-size:2.75rem}:host([scale=l][appearance=transparent]) button:not(.content--slotted),:host([scale=l][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-y:0.625rem}:host([scale=s][icon-start][icon-end]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:23px;block-size:1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=s][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=s][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:1.5rem}:host([scale=m][icon-start][icon-end]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:2rem;block-size:2rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=m][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=m][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:33px}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end]) a:not(.content--slotted){--calcite-button-padding-x:43px;block-size:2.75rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l][icon-start][icon-end]) button:not(.content--slotted) .icon--start+.icon--end,:host([scale=l][icon-start][icon-end]) a:not(.content--slotted) .icon--start+.icon--end{-webkit-margin-start:1rem;margin-inline-start:1rem}:host([scale=l][icon-start][icon-end][appearance=transparent]) button:not(.content--slotted),:host([scale=l][icon-start][icon-end][appearance=transparent]) a:not(.content--slotted){--calcite-button-padding-x:2.75rem}";export{p as calcite_button}
@@ -8,4 +8,4 @@ import{r as t,c as i,h as a,g as n}from"./p-be2e3b99.js";import{S as e}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 o=class{constructor(a){t(this,a),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.handleSelector="calcite-handle",this.layout="vertical",this.disabled=!1,this.loading=!1,this.handleActivated=!1,this.items=[],this.mutationObserver=r("mutation",(()=>{this.cleanUpDragAndDrop(),this.items=Array.from(this.el.children),this.setUpDragAndDrop()}))}connectedCallback(){this.items=Array.from(this.el.children),this.setUpDragAndDrop(),this.beginObserving()}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.cleanUpDragAndDrop()}componentDidRender(){s(this)}calciteHandleNudgeHandler(t){var i;const a=this.items.find((i=>i.contains(t.detail.handle)||t.composedPath().includes(i))),n=this.items.length-1,e=this.items.indexOf(a);let r,s=!1;switch(t.detail.direction){case"up":t.preventDefault(),0===e?s=!0:r=e-1;break;case"down":t.preventDefault(),e===n?r=0:e===n-1?s=!0:r=e+2;break;default:return}null===(i=this.mutationObserver)||void 0===i||i.disconnect(),s?a.parentElement.appendChild(a):a.parentElement.insertBefore(a,this.items[r]),this.items=Array.from(this.el.children),t.detail.handle.activated=!0,t.detail.handle.setFocus(),this.beginObserving()}setUpDragAndDrop(){this.cleanUpDragAndDrop();const t={dataIdAttr:"id",group:this.group,handle:this.handleSelector,onUpdate:()=>{this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()},onStart:()=>{var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()},onEnd:()=>{this.beginObserving()}};this.dragSelector&&(t.draggable=this.dragSelector),this.sortable=e.create(this.el,t)}cleanUpDragAndDrop(){var t;null===(t=this.sortable)||void 0===t||t.destroy(),this.sortable=null}beginObserving(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}render(){const{layout:t}=this,i="horizontal"===t||!1;return a("div",{class:{container:!0,"container--vertical":!i,"container--horizontal":i}},a("slot",null))}get el(){return n(this)}};o.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}";export{o as calcite_sortable_list}
11
+ */const o=class{constructor(a){t(this,a),this.calciteListOrderChange=i(this,"calciteListOrderChange",6),this.handleSelector="calcite-handle",this.layout="vertical",this.disabled=!1,this.loading=!1,this.handleActivated=!1,this.items=[],this.mutationObserver=r("mutation",(()=>{this.cleanUpDragAndDrop(),this.items=Array.from(this.el.children),this.setUpDragAndDrop()}))}connectedCallback(){this.items=Array.from(this.el.children),this.setUpDragAndDrop(),this.beginObserving()}disconnectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.cleanUpDragAndDrop()}componentDidRender(){s(this)}calciteHandleNudgeHandler(t){var i;const a=this.items.find((i=>i.contains(t.detail.handle)||t.composedPath().includes(i))),n=this.items.length-1,e=this.items.indexOf(a);let r,s=!1;switch(t.detail.direction){case"up":t.preventDefault(),0===e?s=!0:r=e-1;break;case"down":t.preventDefault(),e===n?r=0:e===n-1?s=!0:r=e+2;break;default:return}null===(i=this.mutationObserver)||void 0===i||i.disconnect(),s?a.parentElement.appendChild(a):a.parentElement.insertBefore(a,this.items[r]),this.items=Array.from(this.el.children),t.detail.handle.activated=!0,t.detail.handle.setFocus(),this.beginObserving()}setUpDragAndDrop(){this.cleanUpDragAndDrop();const t={dataIdAttr:"id",group:this.group,handle:this.handleSelector,onUpdate:()=>{this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()},onStart:()=>{var t;null===(t=this.mutationObserver)||void 0===t||t.disconnect()},onEnd:()=>{this.beginObserving()}};this.dragSelector&&(t.draggable=this.dragSelector),this.sortable=e.create(this.el,t)}cleanUpDragAndDrop(){var t;null===(t=this.sortable)||void 0===t||t.destroy(),this.sortable=null}beginObserving(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0})}render(){const{layout:t}=this,i="horizontal"===t||!1;return a("div",{class:{container:!0,"container--vertical":!i,"container--horizontal":i}},a("slot",null))}get el(){return n(this)}};o.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}";export{o as calcite_sortable_list}
@@ -3,12 +3,12 @@
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 e,H as a,g as n}from"./p-be2e3b99.js";import{t as s,o,q as c,g as l,a as r,E as d,b as h}from"./p-6b4a13fe.js";import{f as m,a as p,s as u,g}from"./p-32a67cb2.js";import{c as f}from"./p-9a9955db.js";import{c as v,d as b}from"./p-61dc587c.js";import{d as w}from"./p-4e32bf8c.js";import{S as y}from"./p-6fe17794.js";import{l as x}from"./p-a128b9ca.js";import{a as k,h as _,q as z,d as C,e as D}from"./p-fe0fdd8b.js";import{E as S,d as j,e as I}from"./p-6b9dc092.js";import{s as H}from"./p-fda0d45f.js";import{g as L}from"./p-0af82897.js";import{p as R}from"./p-e99b1247.js";import{a as G,g as T}from"./p-fc884dd6.js";import"./p-6e0da576.js";import"./p-708a63a8.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-91192214.js";import"./p-3b010ce1.js";
6
+ import{r as t,c as i,h as e,H as a,g as n}from"./p-be2e3b99.js";import{t as s,o,q as c,g as l,a as r,E as d,b as h}from"./p-6b4a13fe.js";import{f as m,a as p,s as u,g}from"./p-32a67cb2.js";import{c as v}from"./p-9a9955db.js";import{c as f,d as b}from"./p-61dc587c.js";import{d as w}from"./p-4e32bf8c.js";import{S as y}from"./p-6fe17794.js";import{l as x}from"./p-a128b9ca.js";import{a as k,h as _,q as z,d as C,e as D}from"./p-fe0fdd8b.js";import{E as S,d as j,e as I}from"./p-6b9dc092.js";import{s as H}from"./p-fda0d45f.js";import{g as L}from"./p-0af82897.js";import{p as R}from"./p-e99b1247.js";import{a as G,g as T}from"./p-fc884dd6.js";import"./p-6e0da576.js";import"./p-708a63a8.js";import"./p-729708a3.js";import"./p-a80b3880.js";import"./p-91192214.js";import"./p-3b010ce1.js";
7
7
  /*!
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 A=class{constructor(e){t(this,e),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.mutationObserver=f("mutation",(()=>{const{el:t,expanded:i}=this;s({parent:t,expanded:i}),this.conditionallyOverflowActions()})),this.resizeObserver=f("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenChangeHandler=t=>{if(t.detail){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:e}=t.contentRect;this.resize({width:i,height:e})},this.resize=w((({width:t,height:i})=>{const{el:e,expanded:a,expandDisabled:n,layout:s}=this;if("vertical"===s&&!i||"horizontal"===s&&!t)return;const o=c(e),d=n?o.length:o.length+1,m=Array.from(e.querySelectorAll("calcite-action-group")),u=p(e,"bottom-actions")||!n?m.length+1:m.length,{actionHeight:g,actionWidth:f}=l(o),v=h({layout:s,actionCount:d,actionHeight:g,actionWidth:f,height:i,width:t,groupCount:u});r({actionGroups:m,expanded:a,overflowCount:v})}),o),this.conditionallyOverflowActions=()=>{this.overflowActionsDisabled||this.overflowActions()},this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.setExpandToggleRef=t=>{this.expandToggleEl=t}}expandHandler(){this.conditionallyOverflowActions()}expandedHandler(t){s({parent:this.el,expanded:t}),this.conditionallyOverflowActions()}overflowDisabledHandler(t){t?this.resizeObserver.disconnect():this.resizeObserver.observe(this.el)}componentDidLoad(){this.conditionallyOverflowActions()}connectedCallback(){var t,i;const{el:e,expanded:a}=this;s({parent:e,expanded:a}),null===(t=this.mutationObserver)||void 0===t||t.observe(e,{childList:!0,subtree:!0}),this.overflowActionsDisabled||null===(i=this.resizeObserver)||void 0===i||i.observe(e),this.conditionallyOverflowActions(),v(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),b(this)}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){var i;"expand-toggle"!==t?null===(i=this.el)||void 0===i||i.focus():await m(this.expandToggleEl)}renderBottomActionGroup(){const{expanded:t,expandDisabled:i,intlExpand:a,intlCollapse:n,el:s,position:o,toggleExpand:c,scale:l,layout:r}=this,h=p(s,"expand-tooltip"),m=i?null:e(d,{el:s,expanded:t,intlCollapse:n||"Collapse",intlExpand:a||"Expand",position:o,ref:this.setExpandToggleRef,scale:l,toggle:c,tooltip:h});return p(s,"bottom-actions")||m?e("calcite-action-group",{class:"action-group--bottom",layout:r,scale:l},e("slot",{name:"bottom-actions"}),e("slot",{name:"expand-tooltip"}),m):null}render(){return e(a,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},e("slot",null),this.renderBottomActionGroup())}get el(){return n(this)}static get watchers(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],overflowActionsDisabled:["overflowDisabledHandler"]}}};
11
+ */const A=class{constructor(e){t(this,e),this.calciteActionBarToggle=i(this,"calciteActionBarToggle",6),this.expandDisabled=!1,this.expanded=!1,this.layout="vertical",this.overflowActionsDisabled=!1,this.mutationObserver=v("mutation",(()=>{const{el:t,expanded:i}=this;s({parent:t,expanded:i}),this.conditionallyOverflowActions()})),this.resizeObserver=v("resize",(t=>this.resizeHandlerEntries(t))),this.actionMenuOpenChangeHandler=t=>{if(t.detail){const i=t.composedPath();Array.from(this.el.querySelectorAll("calcite-action-group")).forEach((t=>{i.includes(t)||(t.menuOpen=!1)}))}},this.resizeHandlerEntries=t=>{t.forEach(this.resizeHandler)},this.resizeHandler=t=>{const{width:i,height:e}=t.contentRect;this.resize({width:i,height:e})},this.resize=w((({width:t,height:i})=>{const{el:e,expanded:a,expandDisabled:n,layout:s}=this;if("vertical"===s&&!i||"horizontal"===s&&!t)return;const o=c(e),d=n?o.length:o.length+1,m=Array.from(e.querySelectorAll("calcite-action-group")),u=p(e,"bottom-actions")||!n?m.length+1:m.length,{actionHeight:g,actionWidth:v}=l(o),f=h({layout:s,actionCount:d,actionHeight:g,actionWidth:v,height:i,width:t,groupCount:u});r({actionGroups:m,expanded:a,overflowCount:f})}),o),this.conditionallyOverflowActions=()=>{this.overflowActionsDisabled||this.overflowActions()},this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.setExpandToggleRef=t=>{this.expandToggleEl=t}}expandHandler(){this.conditionallyOverflowActions()}expandedHandler(t){s({parent:this.el,expanded:t}),this.conditionallyOverflowActions()}overflowDisabledHandler(t){t?this.resizeObserver.disconnect():this.resizeObserver.observe(this.el)}componentDidLoad(){this.conditionallyOverflowActions()}connectedCallback(){var t,i;const{el:e,expanded:a}=this;s({parent:e,expanded:a}),null===(t=this.mutationObserver)||void 0===t||t.observe(e,{childList:!0,subtree:!0}),this.overflowActionsDisabled||null===(i=this.resizeObserver)||void 0===i||i.observe(e),this.conditionallyOverflowActions(),f(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),b(this)}async overflowActions(){this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){var i;"expand-toggle"!==t?null===(i=this.el)||void 0===i||i.focus():await m(this.expandToggleEl)}renderBottomActionGroup(){const{expanded:t,expandDisabled:i,intlExpand:a,intlCollapse:n,el:s,position:o,toggleExpand:c,scale:l,layout:r}=this,h=p(s,"expand-tooltip"),m=i?null:e(d,{el:s,expanded:t,intlCollapse:n||"Collapse",intlExpand:a||"Expand",position:o,ref:this.setExpandToggleRef,scale:l,toggle:c,tooltip:h});return p(s,"bottom-actions")||m?e("calcite-action-group",{class:"action-group--bottom",layout:r,scale:l},e("slot",{name:"bottom-actions"}),e("slot",{name:"expand-tooltip"}),m):null}render(){return e(a,{onCalciteActionMenuOpenChange:this.actionMenuOpenChangeHandler},e("slot",null),this.renderBottomActionGroup())}get el(){return n(this)}static get watchers(){return{expandDisabled:["expandHandler"],expanded:["expandedHandler"],overflowActionsDisabled:["overflowDisabledHandler"]}}};
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.
@@ -20,4 +20,4 @@ var $;A.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{
20
20
  * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
21
21
  * v1.0.0-beta.97
22
22
  */
23
- const V=class{constructor(e){t(this,e),this.calciteNoticeClose=i(this,"calciteNoticeClose",6),this.calciteNoticeOpen=i(this,"calciteNoticeOpen",6),this.active=!1,this.open=!1,this.color="blue",this.dismissible=!1,this.closable=!1,this.intlClose="Close",this.scale="m",this.width="auto",this.close=()=>{this.open=!1,this.calciteNoticeClose.emit()}}activeHandler(t){this.open=t}openHandler(t){this.active=t}handleDismissible(t){this.closable=t}handleClosable(t){this.dismissible=t}updateRequestedIcon(){this.requestedIcon=u(y,this.icon,this.color)}connectedCallback(){v(this);const t=this.active||this.open;t&&(this.activeHandler(t),this.openHandler(t)),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){b(this)}componentWillLoad(){this.requestedIcon=u(y,this.icon,this.color)}render(){const{el:t}=this,i=e("button",{"aria-label":this.intlClose,class:"notice-close",onClick:this.close,ref:t=>this.closeButton=t},e("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),a=p(t,"actions-end");return e("div",{class:"container"},this.requestedIcon?e("div",{class:"notice-icon"},e("calcite-icon",{icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"})):null,e("div",{class:"notice-content"},e("slot",{name:"title"}),e("slot",{name:"message"}),e("slot",{name:"link"})),a?e("div",{class:"actions-end"},e("slot",{name:"actions-end"})):null,this.closable?i:null)}async setFocus(){const t=this.el.querySelector("calcite-link");(this.closeButton||t)&&(t?t.setFocus():this.closeButton&&this.closeButton.focus())}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],dismissible:["handleDismissible"],closable:["handleClosable"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"]}}};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([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";const F=class{constructor(e){t(this,e),this.selectionSetChange=i(this,"selectionSetChange",7),this.workflowTypeChange=i(this,"workflowTypeChange",7),this.isUpdate=!1,this._selectedIds=[],this._selectionLabel=""}async watchGeometriesHandler(t,i){if(t!==i){if(t.length>0)return this._geomQuery(this.geometries);if(0===t.length)return this._clearResults(!0,!0)}}async workflowTypeHandler(t,i){t!==i&&this.workflowTypeChange.emit(t)}async clearSelection(){return this._clearResults()}async getSelection(){return{id:this.isUpdate?this.selectionSet.id:Date.now(),workflowType:this._workflowType,searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._workflowType===S.SEARCH?this._selectionLabel:`${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,refineSelectLayers:this._refineTools.layerViews}}sketchGraphicsChange(t){this._updateSelection(S.SKETCH,t.detail,this._translations.sketch)}refineSelectionGraphicsChange(t){const i=t.detail;this._updateSelection(S.SELECT,i,this._translations.select);const e=Array.isArray(i)?i.map((t=>{var i;return t.attributes[null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.objectIdField]})):[];return this._highlightFeatures(e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){var t,i,n;const s=this._workflowType===S.SEARCH,o=s?" div-visible-search":" div-not-visible",c=this._workflowType===S.SKETCH,l=c?" div-visible":" div-not-visible",r=this._workflowType===S.SELECT,d=r?" div-visible":" div-not-visible";return e(a,null,e("div",{class:"padding-bottom-1"},e("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:t=>this._workflowChange(t)},e("calcite-radio-group-item",{checked:s,class:"w-50 end-border",value:S.SEARCH},this._translations.search),e("calcite-radio-group-item",{checked:r,class:"w-50 end-border",value:S.SELECT},this._translations.select),e("calcite-radio-group-item",{checked:c,class:"w-50",value:S.SKETCH},this._translations.sketch))),e("div",{class:o},e("div",{class:"search-widget",ref:t=>{this._searchElement=t}})),e("map-draw-tools",{active:c,border:!0,class:l,mapView:this.mapView,ref:t=>{this._drawTools=t}}),e("refine-selection-tools",{active:r,border:!0,class:d,layerViews:this._refineSelectLayers,mapView:this.mapView,mode:j.ADD,ref:t=>{this._refineTools=t},refineMode:I.SUBSET}),e("calcite-label",{style:{display:"flex","padding-top":"1rem"}},null===(t=this._translations)||void 0===t?void 0:t.searchDistance,e("buffer-tools",{distance:null===(i=this.selectionSet)||void 0===i?void 0:i.distance,geometries:this.geometries,onBufferComplete:t=>this._bufferComplete(t),ref:t=>this._bufferTools=t,unit:null===(n=this.selectionSet)||void 0===n?void 0:n.unit})),e("slot",null))}async _initModules(){const[t,i,e,a,n]=await x(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/Geometry","esri/geometry/geometryEngine"]);this.GraphicsLayer=t,this.Graphic=i,this.Search=e,this.Geometry=a,this._geometryEngine=n}async _init(){this._initGraphicsLayer(),this._initSelectionSet(),this._initSearchWidget()}_initSelectionSet(){var t,i,e,a,n,s,o;this.selectionSet?(this._searchTerm=null===(i=null===(t=this.selectionSet)||void 0===t?void 0:t.searchResult)||void 0===i?void 0:i.name,this._workflowType=null===(e=this.selectionSet)||void 0===e?void 0:e.workflowType,this._searchResult=null===(a=this.selectionSet)||void 0===a?void 0:a.searchResult,this._refineSelectLayers=null===(n=this.selectionSet)||void 0===n?void 0:n.refineSelectLayers,this.geometries=[...null===(s=this.selectionSet)||void 0===s?void 0:s.geometries],this._selectionLabel=this._workflowType===S.SKETCH?this._translations.sketch:this._workflowType===S.SELECT?this._translations.select:null===(o=this.selectionSet)||void 0===o?void 0:o.label,k(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1)):this._workflowType=S.SEARCH}_initSearchWidget(){this.mapView&&this._searchElement&&(this._searchWidget=new this.Search({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm}),this._searchWidget.on("search-clear",(()=>{this._clearResults(!1)})),this._searchWidget.on("select-result",(t=>{var i;this._clearResults(!1),t.result&&(this._searchResult=t.result,this._updateSelection(S.SEARCH,[t.result.feature],null===(i=null==t?void 0:t.result)||void 0===i?void 0:i.name))})))}_initGraphicsLayer(){const t=this._translations.bufferLayer,i=this.mapView.map.layers.findIndex((i=>i.title===t));if(i>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(i);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:t}),H.managedLayers.push(t);const i=this.mapView.map.layers.findIndex((t=>t.title===this._translations.sketchLayer));i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}_workflowChange(t){this._workflowType=t.detail}async _highlightFeatures(t){var i;null===(i=H.highlightHandle)||void 0===i||i.remove(),t.length>0&&(H.highlightHandle=await _(t,this.selectLayerView,this.mapView)),this.selectionSetChange.emit(t.length)}async _selectFeatures(t){this._selectedIds=await z(t,this.selectLayerView.layer),this._drawTools.graphics=this.geometries.map((t=>{var i,e,a;const n={geometry:t,symbol:"point"===t.type?null===(i=this._drawTools)||void 0===i?void 0:i.pointSymbol:"polyline"===t.type?null===(e=this._drawTools)||void 0===e?void 0:e.polylineSymbol:"polygon"===t.type?null===(a=this._drawTools)||void 0===a?void 0:a.polygonSymbol:void 0};return new this.Graphic(n)})),this._highlightFeatures(this._selectedIds)}async _bufferComplete(t){if(this._bufferGeometry=Array.isArray(t.detail)?t.detail[0]:t.detail,this._bufferGeometry){const t=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:[227,139,79,.8],outline:{color:[255,255,255],width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(t),this._selectFeatures([this._bufferGeometry]),this.mapView.goTo(t.geometry.extent)}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),this._geomQuery(this.geometries)}_geomQuery(t){const i=C(t,this._geometryEngine);return this._selectFeatures(i)}async _clearResults(t=!0,i=!0){var e;this._selectedIds=[],i&&(this._selectionLabel=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),t&&this._searchWidget&&this._searchWidget.clear(),null===(e=H.highlightHandle)||void 0===e||e.remove(),this._drawTools&&this._drawTools.clear(),this.selectionSetChange.emit(this._selectedIds.length)}_updateSelection(t,i,e){this.geometries=Array.isArray(i)?i.map((t=>t.geometry)):this.geometries,this._workflowType=t,this._selectionLabel=e}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],_workflowType:["workflowTypeHandler"]}}};F.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}';const W=class{constructor(i){t(this,i),this.disabled=!0}async downloadPDF(t,i){return this._downloadPDF(t,i)}async downloadCSV(t,i){return this._downloadCSV(t,i)}async componentWillLoad(){await this._getTranslations()}render(){return e(a,null,e("calcite-select",{disabled:this.disabled,label:"",ref:t=>{this._labelInfoElement=t}},this._renderItems()))}_renderItems(){return(R.default||R).sort(((t,i)=>{const e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(i.descriptionPDF.labelsPerPageDisplay,10);return e<a?-1:e>a?1:0})).map((t=>e("calcite-option",{value:t},this._getLabelSizeText(t))))}async _downloadPDF(t,i){alert(`PDF download: (${this._getLabelSizeText(this._labelInfoElement.selectedOption.value)}) (remove dups: ${i}) ${t.join(", ")}`)}async _downloadCSV(t,i){console.log(i),await async function(t,i){const e=(await D(i,t.layer)).features.map((t=>t.attributes)),a={},n=e[0];Object.keys(n).forEach((t=>{n.hasOwnProperty(t)&&(a[t]=t)})),function(t,i,e){t&&i.unshift(t);const a=i.reduce(((t,i)=>t+Object.values(i).map((t=>`"${t}"`)).join(",")+"\r\n"),""),n=document.createElement("a");void 0!==n.download&&(n.href=URL.createObjectURL(new Blob([a],{type:"text/csv;charset=utf-8;"})),n.download=`${e}.csv`||"export.csv",n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n))}(a,e,`notify-${Date.now().toString()}`)}(this.layerView,t)}_getLabelSizeText(t){const i=`${t.descriptionPDF.labelWidthDisplay} x ${t.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",t.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",i)}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}};W.style=":host{display:block}";const q=class{constructor(e){t(this,e),this.selectionSetsChanged=i(this,"selectionSetsChanged",7),this.selectionSets=[],this._addEnabled=!0}refineSelectionIdsChange(t){var i,e;const a=(null===(i=t.detail)||void 0===i?void 0:i.addIds)||[],n=(null===(e=t.detail)||void 0===e?void 0:e.removeIds)||[];this._updateSelectionSets(n),this._updateRefineSelectionSet(a,n)}async componentWillLoad(){await this._getTranslations()}render(){return e(a,null,e("div",{class:"padding-1"},e("div",null,e("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:t=>this._modeChanged(t)},e("calcite-radio-group-item",{checked:this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(j.ADD),value:j.ADD},this._translations.add),e("calcite-radio-group-item",{checked:!this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(j.REMOVE),value:j.REMOVE},this._translations.remove)),e("refine-selection-tools",{border:!0,ids:G(this.selectionSets),layerViews:[this.addresseeLayer],mapView:this.mapView,mode:this._addEnabled?j.ADD:j.REMOVE,ref:t=>{this._refineTools=t},useLayerPicker:!1})),e("br",null),e("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_modeChanged(t){this._addEnabled=t.detail===j.ADD}_setSelectionMode(t){this._refineTools.mode=t}_getRefineSelectionSetList(){var t,i,a;const n=T(this.selectionSets),s=this._getRefineSelectionSet(this.selectionSets),o=(null==s?void 0:s.refineIds.removeIds.length)||0;return[e("calcite-list-item",{label:null===(t=this._translations.featuresAdded)||void 0===t?void 0:t.replace("{{n}}",((null==s?void 0:s.refineIds.addIds.length)||0).toString())}),e("calcite-list-item",{label:null===(i=this._translations.featuresRemoved)||void 0===i?void 0:i.replace("{{n}}",o.toString())}),e("calcite-list-item",{label:null===(a=this._translations.totalSelected)||void 0===a?void 0:a.replace("{{n}}",n.toString())})]}_getRefineSelectionSet(t){let i;return t.some((t=>{if(t.workflowType===S.REFINE)return i=t,!0})),i}_getAction(t,i,a,n,s=!1,o=""){return e("calcite-action",{disabled:!t,icon:i,indicator:s,onClick:n,slot:o,text:a})}_updateSelectionSets(t){t.length>0&&(this.selectionSets=this.selectionSets.reduce(((i,e)=>(e.selectedIds=e.selectedIds.filter((i=>t.indexOf(i)<0)),e.selectedIds.length>0&&i.push(e),i)),[]),this.selectionSetsChanged.emit(this.selectionSets))}_updateRefineSelectionSet(t,i){const e=this._getRefineSelectionSet(this.selectionSets);this.selectionSets=e?this._updateRefineIds(e,t,i):this._addRefineSelectionSet(t,i),this.selectionSetsChanged.emit(this.selectionSets)}_updateRefineIds(t,i,e){t.refineIds.addIds=t.refineIds.addIds.filter((t=>e.indexOf(t)<0)),t.refineIds.removeIds=t.refineIds.removeIds.filter((t=>i.indexOf(t)<0));const a=[...new Set(t.refineIds.addIds.concat(i))],n=[...new Set(t.refineIds.removeIds.concat(e))];return t.refineIds={addIds:a.filter((t=>n.indexOf(t)<0)),removeIds:n.filter((t=>a.indexOf(t)<0))},t.selectedIds=t.refineIds.addIds.length>0?[...new Set(t.selectedIds.concat(t.refineIds.addIds))]:t.selectedIds.filter((i=>t.refineIds.removeIds.indexOf(i)<0)),this.selectionSets.map((i=>i.workflowType===S.REFINE?t:i))}_addRefineSelectionSet(t,i){return[...this.selectionSets,{buffer:void 0,distance:0,download:!0,geometries:[],id:Date.now(),label:"Refine",layerView:this.addresseeLayer,refineSelectLayers:[],searchResult:void 0,selectedIds:t,unit:"feet",workflowType:S.REFINE,refineIds:{addIds:t,removeIds:i}}]}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}};q.style=":host{display:block}";export{A as calcite_action_bar,E as calcite_input_message,V as calcite_notice,F as map_select_tools,W as pdf_download,q as refine_selection}
23
+ const V=class{constructor(e){t(this,e),this.calciteNoticeClose=i(this,"calciteNoticeClose",6),this.calciteNoticeOpen=i(this,"calciteNoticeOpen",6),this.active=!1,this.open=!1,this.color="blue",this.dismissible=!1,this.closable=!1,this.intlClose="Close",this.scale="m",this.width="auto",this.close=()=>{this.open=!1,this.calciteNoticeClose.emit()}}activeHandler(t){this.open=t}openHandler(t){this.active=t}handleDismissible(t){this.closable=t}handleClosable(t){this.dismissible=t}updateRequestedIcon(){this.requestedIcon=u(y,this.icon,this.color)}connectedCallback(){f(this);const t=this.active||this.open;t&&(this.activeHandler(t),this.openHandler(t)),this.dismissible&&this.handleDismissible(this.dismissible),this.closable&&this.handleClosable(this.closable)}disconnectedCallback(){b(this)}componentWillLoad(){this.requestedIcon=u(y,this.icon,this.color)}render(){const{el:t}=this,i=e("button",{"aria-label":this.intlClose,class:"notice-close",onClick:this.close,ref:t=>this.closeButton=t},e("calcite-icon",{icon:"x",scale:"l"===this.scale?"m":"s"})),a=p(t,"actions-end");return e("div",{class:"container"},this.requestedIcon?e("div",{class:"notice-icon"},e("calcite-icon",{icon:this.requestedIcon,scale:"l"===this.scale?"m":"s"})):null,e("div",{class:"notice-content"},e("slot",{name:"title"}),e("slot",{name:"message"}),e("slot",{name:"link"})),a?e("div",{class:"actions-end"},e("slot",{name:"actions-end"})):null,this.closable?i:null)}async setFocus(){const t=this.el.querySelector("calcite-link");(this.closeButton||t)&&(t?t.setFocus():this.closeButton&&this.closeButton.focus())}get el(){return n(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],dismissible:["handleDismissible"],closable:["handleClosable"],icon:["updateRequestedIcon"],color:["updateRequestedIcon"]}}};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([scale=s]){--calcite-notice-spacing-token-small:0.5rem;--calcite-notice-spacing-token-large:0.75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:0.5rem}:host([scale=m]){--calcite-notice-spacing-token-small:0.75rem;--calcite-notice-spacing-token-large:1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small:1rem;--calcite-notice-spacing-token-large:1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:0.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:0.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width:auto}:host([width=half]){--calcite-notice-width:50%}:host([width=full]){--calcite-notice-width:100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:none;inline-size:100%;background-color:var(--calcite-ui-foreground-1);opacity:0;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;max-block-size:0;text-align:start;-webkit-border-start:0px solid;border-inline-start:0px solid;box-shadow:0 0 0 0 transparent}.notice-close{outline-color:transparent}.notice-close:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host{display:flex}:host([open]) .container{pointer-events:auto;display:flex;max-block-size:100%;align-items:center;border-width:2px;opacity:1;--tw-shadow:0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);--tw-shadow-colored:0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0px;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-ui-text-1)}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0px;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-2);-webkit-margin-end:var(--calcite-notice-spacing-token-small);margin-inline-end:var(--calcite-notice-spacing-token-small)}.notice-content{box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){-webkit-padding-start:var(--calcite-notice-spacing-token-large);padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;color:var(--calcite-ui-text-3);outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-ui-foreground-2);color:var(--calcite-ui-text-1)}.notice-close:active{background-color:var(--calcite-ui-foreground-3)}.actions-end{display:flex;align-self:stretch}:host([color=blue]) .container{border-color:var(--calcite-ui-brand)}:host([color=blue]) .container .notice-icon{color:var(--calcite-ui-brand)}:host([color=red]) .container{border-color:var(--calcite-ui-danger)}:host([color=red]) .container .notice-icon{color:var(--calcite-ui-danger)}:host([color=yellow]) .container{border-color:var(--calcite-ui-warning)}:host([color=yellow]) .container .notice-icon{color:var(--calcite-ui-warning)}:host([color=green]) .container{border-color:var(--calcite-ui-success)}:host([color=green]) .container .notice-icon{color:var(--calcite-ui-success)}";const F=class{constructor(e){t(this,e),this.selectionSetChange=i(this,"selectionSetChange",7),this.workflowTypeChange=i(this,"workflowTypeChange",7),this._selectedIds=[],this._selectionLabel="",this.mapView=void 0,this.selectLayerView=void 0,this.geometries=void 0,this.selectionSet=void 0,this.isUpdate=!1,this._searchTerm=void 0,this._translations=void 0,this._workflowType=void 0}async watchGeometriesHandler(t,i){if(t!==i){if(t.length>0)return this._geomQuery(this.geometries);if(0===t.length)return this._clearResults(!0,!0)}}async workflowTypeHandler(t,i){t!==i&&this.workflowTypeChange.emit(t)}async clearSelection(){return this._clearResults()}async getSelection(){return{id:this.isUpdate?this.selectionSet.id:Date.now(),workflowType:this._workflowType,searchResult:this._searchResult,buffer:this._bufferGeometry,distance:this._bufferTools.distance,download:!0,unit:this._bufferTools.unit,label:this._workflowType===S.SEARCH?this._selectionLabel:`${this._selectionLabel} ${this._bufferTools.distance} ${this._bufferTools.unit}`,selectedIds:this._selectedIds,layerView:this.selectLayerView,geometries:this.geometries,refineSelectLayers:this._refineTools.layerViews}}sketchGraphicsChange(t){this._updateSelection(S.SKETCH,t.detail,this._translations.sketch)}refineSelectionGraphicsChange(t){const i=t.detail;this._updateSelection(S.SELECT,i,this._translations.select);const e=Array.isArray(i)?i.map((t=>{var i;return t.attributes[null===(i=null==t?void 0:t.layer)||void 0===i?void 0:i.objectIdField]})):[];return this._highlightFeatures(e)}async componentWillLoad(){await this._getTranslations(),await this._initModules()}async componentDidLoad(){return this._init()}render(){var t,i,n;const s=this._workflowType===S.SEARCH,o=s?" div-visible-search":" div-not-visible",c=this._workflowType===S.SKETCH,l=c?" div-visible":" div-not-visible",r=this._workflowType===S.SELECT,d=r?" div-visible":" div-not-visible";return e(a,null,e("div",{class:"padding-bottom-1"},e("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:t=>this._workflowChange(t)},e("calcite-radio-group-item",{checked:s,class:"w-50 end-border",value:S.SEARCH},this._translations.search),e("calcite-radio-group-item",{checked:r,class:"w-50 end-border",value:S.SELECT},this._translations.select),e("calcite-radio-group-item",{checked:c,class:"w-50",value:S.SKETCH},this._translations.sketch))),e("div",{class:o},e("div",{class:"search-widget",ref:t=>{this._searchElement=t}})),e("map-draw-tools",{active:c,border:!0,class:l,mapView:this.mapView,ref:t=>{this._drawTools=t}}),e("refine-selection-tools",{active:r,border:!0,class:d,layerViews:this._refineSelectLayers,mapView:this.mapView,mode:j.ADD,ref:t=>{this._refineTools=t},refineMode:I.SUBSET}),e("calcite-label",{style:{display:"flex","padding-top":"1rem"}},null===(t=this._translations)||void 0===t?void 0:t.searchDistance,e("buffer-tools",{distance:null===(i=this.selectionSet)||void 0===i?void 0:i.distance,geometries:this.geometries,onBufferComplete:t=>this._bufferComplete(t),ref:t=>this._bufferTools=t,unit:null===(n=this.selectionSet)||void 0===n?void 0:n.unit})),e("slot",null))}async _initModules(){const[t,i,e,a,n]=await x(["esri/layers/GraphicsLayer","esri/Graphic","esri/widgets/Search","esri/geometry/Geometry","esri/geometry/geometryEngine"]);this.GraphicsLayer=t,this.Graphic=i,this.Search=e,this.Geometry=a,this._geometryEngine=n}async _init(){this._initGraphicsLayer(),this._initSelectionSet(),this._initSearchWidget()}_initSelectionSet(){var t,i,e,a,n,s,o;this.selectionSet?(this._searchTerm=null===(i=null===(t=this.selectionSet)||void 0===t?void 0:t.searchResult)||void 0===i?void 0:i.name,this._workflowType=null===(e=this.selectionSet)||void 0===e?void 0:e.workflowType,this._searchResult=null===(a=this.selectionSet)||void 0===a?void 0:a.searchResult,this._refineSelectLayers=null===(n=this.selectionSet)||void 0===n?void 0:n.refineSelectLayers,this.geometries=[...null===(s=this.selectionSet)||void 0===s?void 0:s.geometries],this._selectionLabel=this._workflowType===S.SKETCH?this._translations.sketch:this._workflowType===S.SELECT?this._translations.select:null===(o=this.selectionSet)||void 0===o?void 0:o.label,k(this.selectionSet.selectedIds,this.selectionSet.layerView,this.mapView,!1)):this._workflowType=S.SEARCH}_initSearchWidget(){this.mapView&&this._searchElement&&(this._searchWidget=new this.Search({view:this.mapView,container:this._searchElement,searchTerm:this._searchTerm}),this._searchWidget.on("search-clear",(()=>{this._clearResults(!1)})),this._searchWidget.on("select-result",(t=>{var i;this._clearResults(!1),t.result&&(this._searchResult=t.result,this._updateSelection(S.SEARCH,[t.result.feature],null===(i=null==t?void 0:t.result)||void 0===i?void 0:i.name))})))}_initGraphicsLayer(){const t=this._translations.bufferLayer,i=this.mapView.map.layers.findIndex((i=>i.title===t));if(i>-1)this._bufferGraphicsLayer=this.mapView.map.layers.getItemAt(i);else{this._bufferGraphicsLayer=new this.GraphicsLayer({title:t}),H.managedLayers.push(t);const i=this.mapView.map.layers.findIndex((t=>t.title===this._translations.sketchLayer));i>-1?this.mapView.map.layers.add(this._bufferGraphicsLayer,i):this.mapView.map.layers.add(this._bufferGraphicsLayer)}}_workflowChange(t){this._workflowType=t.detail}async _highlightFeatures(t){var i;null===(i=H.highlightHandle)||void 0===i||i.remove(),t.length>0&&(H.highlightHandle=await _(t,this.selectLayerView,this.mapView)),this.selectionSetChange.emit(t.length)}async _selectFeatures(t){this._selectedIds=await z(t,this.selectLayerView.layer),this._drawTools.graphics=this.geometries.map((t=>{var i,e,a;const n={geometry:t,symbol:"point"===t.type?null===(i=this._drawTools)||void 0===i?void 0:i.pointSymbol:"polyline"===t.type?null===(e=this._drawTools)||void 0===e?void 0:e.polylineSymbol:"polygon"===t.type?null===(a=this._drawTools)||void 0===a?void 0:a.polygonSymbol:void 0};return new this.Graphic(n)})),this._highlightFeatures(this._selectedIds)}async _bufferComplete(t){if(this._bufferGeometry=Array.isArray(t.detail)?t.detail[0]:t.detail,this._bufferGeometry){const t=new this.Graphic({geometry:this._bufferGeometry,symbol:{type:"simple-fill",color:[227,139,79,.8],outline:{color:[255,255,255],width:1}}});this._bufferGraphicsLayer.removeAll(),this._bufferGraphicsLayer.add(t),this._selectFeatures([this._bufferGeometry]),this.mapView.goTo(t.geometry.extent)}else this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),this._geomQuery(this.geometries)}_geomQuery(t){const i=C(t,this._geometryEngine);return this._selectFeatures(i)}async _clearResults(t=!0,i=!0){var e;this._selectedIds=[],i&&(this._selectionLabel=""),this._bufferGraphicsLayer&&this._bufferGraphicsLayer.removeAll(),t&&this._searchWidget&&this._searchWidget.clear(),null===(e=H.highlightHandle)||void 0===e||e.remove(),this._drawTools&&this._drawTools.clear(),this.selectionSetChange.emit(this._selectedIds.length)}_updateSelection(t,i,e){this.geometries=Array.isArray(i)?i.map((t=>t.geometry)):this.geometries,this._workflowType=t,this._selectionLabel=e}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}static get watchers(){return{geometries:["watchGeometriesHandler"],_workflowType:["workflowTypeHandler"]}}};F.style=':host{display:block}.div-visible{display:inherit}.div-visible-search{display:flex;height:44px;align-items:center;padding-bottom:0}.div-not-visible{display:none}.padding-bottom-1{padding-bottom:1rem}.search-widget{width:100% !important;border:1px solid var(--calcite-ui-border-input)}.w-100{width:100%}.w-50{width:50%}.search-distance-container{padding-top:"1rem" !important}.end-border{-webkit-border-end:1px solid var(--calcite-ui-border-2);border-inline-end:1px solid var(--calcite-ui-border-2)}';const W=class{constructor(i){t(this,i),this.disabled=!0,this.layerView=void 0,this._translations=void 0}async downloadPDF(t,i){return this._downloadPDF(t,i)}async downloadCSV(t,i){return this._downloadCSV(t,i)}async componentWillLoad(){await this._getTranslations()}render(){return e(a,null,e("calcite-select",{disabled:this.disabled,label:"",ref:t=>{this._labelInfoElement=t}},this._renderItems()))}_renderItems(){return(R.default||R).sort(((t,i)=>{const e=parseInt(t.descriptionPDF.labelsPerPageDisplay,10),a=parseInt(i.descriptionPDF.labelsPerPageDisplay,10);return e<a?-1:e>a?1:0})).map((t=>e("calcite-option",{value:t},this._getLabelSizeText(t))))}async _downloadPDF(t,i){alert(`PDF download: (${this._getLabelSizeText(this._labelInfoElement.selectedOption.value)}) (remove dups: ${i}) ${t.join(", ")}`)}async _downloadCSV(t,i){console.log(i),await async function(t,i){const e=(await D(i,t.layer)).features.map((t=>t.attributes)),a={},n=e[0];Object.keys(n).forEach((t=>{n.hasOwnProperty(t)&&(a[t]=t)})),function(t,i,e){t&&i.unshift(t);const a=i.reduce(((t,i)=>t+Object.values(i).map((t=>`"${t}"`)).join(",")+"\r\n"),""),n=document.createElement("a");void 0!==n.download&&(n.href=URL.createObjectURL(new Blob([a],{type:"text/csv;charset=utf-8;"})),n.download=`${e}.csv`||"export.csv",n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n))}(a,e,`notify-${Date.now().toString()}`)}(this.layerView,t)}_getLabelSizeText(t){const i=`${t.descriptionPDF.labelWidthDisplay} x ${t.descriptionPDF.labelHeightDisplay}`;return this._translations.pdfLabel.replace("{{n}}",t.descriptionPDF.labelsPerPageDisplay).replace("{{labelSize}}",i)}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}};W.style=":host{display:block}";const q=class{constructor(e){t(this,e),this.selectionSetsChanged=i(this,"selectionSetsChanged",7),this._addEnabled=!0,this.addresseeLayer=void 0,this.mapView=void 0,this.selectionSets=[],this._translations=void 0}refineSelectionIdsChange(t){var i,e;const a=(null===(i=t.detail)||void 0===i?void 0:i.addIds)||[],n=(null===(e=t.detail)||void 0===e?void 0:e.removeIds)||[];this._updateSelectionSets(n),this._updateRefineSelectionSet(a,n)}async componentWillLoad(){await this._getTranslations()}render(){return e(a,null,e("div",{class:"padding-1"},e("div",null,e("calcite-radio-group",{class:"w-100",onCalciteRadioGroupChange:t=>this._modeChanged(t)},e("calcite-radio-group-item",{checked:this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(j.ADD),value:j.ADD},this._translations.add),e("calcite-radio-group-item",{checked:!this._addEnabled,class:"w-50",onClick:()=>this._setSelectionMode(j.REMOVE),value:j.REMOVE},this._translations.remove)),e("refine-selection-tools",{border:!0,ids:G(this.selectionSets),layerViews:[this.addresseeLayer],mapView:this.mapView,mode:this._addEnabled?j.ADD:j.REMOVE,ref:t=>{this._refineTools=t},useLayerPicker:!1})),e("br",null),e("calcite-list",{class:"list-border"},this._getRefineSelectionSetList())))}_modeChanged(t){this._addEnabled=t.detail===j.ADD}_setSelectionMode(t){this._refineTools.mode=t}_getRefineSelectionSetList(){var t,i,a;const n=T(this.selectionSets),s=this._getRefineSelectionSet(this.selectionSets),o=(null==s?void 0:s.refineIds.removeIds.length)||0;return[e("calcite-list-item",{label:null===(t=this._translations.featuresAdded)||void 0===t?void 0:t.replace("{{n}}",((null==s?void 0:s.refineIds.addIds.length)||0).toString())}),e("calcite-list-item",{label:null===(i=this._translations.featuresRemoved)||void 0===i?void 0:i.replace("{{n}}",o.toString())}),e("calcite-list-item",{label:null===(a=this._translations.totalSelected)||void 0===a?void 0:a.replace("{{n}}",n.toString())})]}_getRefineSelectionSet(t){let i;return t.some((t=>{if(t.workflowType===S.REFINE)return i=t,!0})),i}_getAction(t,i,a,n,s=!1,o=""){return e("calcite-action",{disabled:!t,icon:i,indicator:s,onClick:n,slot:o,text:a})}_updateSelectionSets(t){t.length>0&&(this.selectionSets=this.selectionSets.reduce(((i,e)=>(e.selectedIds=e.selectedIds.filter((i=>t.indexOf(i)<0)),e.selectedIds.length>0&&i.push(e),i)),[]),this.selectionSetsChanged.emit(this.selectionSets))}_updateRefineSelectionSet(t,i){const e=this._getRefineSelectionSet(this.selectionSets);this.selectionSets=e?this._updateRefineIds(e,t,i):this._addRefineSelectionSet(t,i),this.selectionSetsChanged.emit(this.selectionSets)}_updateRefineIds(t,i,e){t.refineIds.addIds=t.refineIds.addIds.filter((t=>e.indexOf(t)<0)),t.refineIds.removeIds=t.refineIds.removeIds.filter((t=>i.indexOf(t)<0));const a=[...new Set(t.refineIds.addIds.concat(i))],n=[...new Set(t.refineIds.removeIds.concat(e))];return t.refineIds={addIds:a.filter((t=>n.indexOf(t)<0)),removeIds:n.filter((t=>a.indexOf(t)<0))},t.selectedIds=t.refineIds.addIds.length>0?[...new Set(t.selectedIds.concat(t.refineIds.addIds))]:t.selectedIds.filter((i=>t.refineIds.removeIds.indexOf(i)<0)),this.selectionSets.map((i=>i.workflowType===S.REFINE?t:i))}_addRefineSelectionSet(t,i){return[...this.selectionSets,{buffer:void 0,distance:0,download:!0,geometries:[],id:Date.now(),label:"Refine",layerView:this.addresseeLayer,refineSelectLayers:[],searchResult:void 0,selectedIds:t,unit:"feet",workflowType:S.REFINE,refineIds:{addIds:t,removeIds:i}}]}async _getTranslations(){const t=await L(this.el);this._translations=t[0]}get el(){return n(this)}};q.style=":host{display:block}";export{A as calcite_action_bar,E as calcite_input_message,V as calcite_notice,F as map_select_tools,W as pdf_download,q as refine_selection}
@@ -8,4 +8,4 @@ import{r as t,c as i,h as a,H as e,g as o}from"./p-be2e3b99.js";import{g as s}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 v=class{constructor(a){t(this,a),this.calciteInternalRadioButtonBlur=i(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=i(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=i(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=i(this,"calciteInternalRadioButtonFocus",6),this.checked=!1,this.disabled=!1,this.focused=!1,this.hidden=!1,this.hovered=!1,this.required=!1,this.scale="m",this.selectItem=(t,i)=>{t[i].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((t=>t.name===this.name)),this.isDefaultSelectable=()=>{const t=this.queryButtons();return!t.some((t=>t.checked))&&t[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=t=>{this.containerEl=t},this.handleKeyDown=t=>{const{key:i}=t,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(i))return;if(" "===i)return this.check(),void t.preventDefault();let e=i;"rtl"===n(a)&&("ArrowRight"===i&&(e="ArrowLeft"),"ArrowLeft"===i&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((t=>t.name===this.name));let s=0;const r=o.length;switch(o.some(((t,i)=>{if(t.checked)return s=i,!0})),e){case"ArrowLeft":case"ArrowUp":return t.preventDefault(),void this.selectItem(o,f(Math.max(s-1,-1),r));case"ArrowRight":case"ArrowDown":return t.preventDefault(),void this.selectItem(o,f(s+1,r));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}}checkedChanged(t){t&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){this.disabled||r(this.containerEl)}onLabelClick(t){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const i=t.currentTarget,a=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const t=this.queryButtons().filter((t=>t.checked));if((null==t?void 0:t.length)>1){const i=t[t.length-1];t.filter((t=>t!==i)).forEach((t=>{t.checked=!1,t.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((t=>t.guid!==this.guid)).forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${s()}`,this.name&&this.checkLastRadioButton(),d(this),u(this)}componentDidLoad(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){l(this),m(this)}componentDidRender(){b(this)}render(){const t=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":c(this.checked),"aria-label":h(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,ref:this.setContainerEl,role:"radio",tabIndex:t},a("div",{class:"radio"})),a(p,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};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;-ms-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';export{v as calcite_radio_button}
11
+ */const v=class{constructor(a){t(this,a),this.calciteInternalRadioButtonBlur=i(this,"calciteInternalRadioButtonBlur",6),this.calciteRadioButtonChange=i(this,"calciteRadioButtonChange",6),this.calciteInternalRadioButtonCheckedChange=i(this,"calciteInternalRadioButtonCheckedChange",6),this.calciteInternalRadioButtonFocus=i(this,"calciteInternalRadioButtonFocus",6),this.checked=!1,this.disabled=!1,this.focused=!1,this.hidden=!1,this.hovered=!1,this.required=!1,this.scale="m",this.selectItem=(t,i)=>{t[i].click()},this.queryButtons=()=>Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter((t=>t.name===this.name)),this.isDefaultSelectable=()=>{const t=this.queryButtons();return!t.some((t=>t.checked))&&t[0]===this.el},this.check=()=>{this.disabled||(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.focused=!0,this.calciteRadioButtonChange.emit(),this.setFocus())},this.clickHandler=()=>{this.check()},this.setContainerEl=t=>{this.containerEl=t},this.handleKeyDown=t=>{const{key:i}=t,{el:a}=this;if(-1===["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "].indexOf(i))return;if(" "===i)return this.check(),void t.preventDefault();let e=i;"rtl"===n(a)&&("ArrowRight"===i&&(e="ArrowLeft"),"ArrowLeft"===i&&(e="ArrowRight"));const o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden]")).filter((t=>t.name===this.name));let s=0;const r=o.length;switch(o.some(((t,i)=>{if(t.checked)return s=i,!0})),e){case"ArrowLeft":case"ArrowUp":return t.preventDefault(),void this.selectItem(o,f(Math.max(s-1,-1),r));case"ArrowRight":case"ArrowDown":return t.preventDefault(),void this.selectItem(o,f(s+1,r));default:return}},this.onContainerBlur=()=>{this.focused=!1,this.calciteInternalRadioButtonBlur.emit()},this.onContainerFocus=()=>{this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}}checkedChanged(t){t&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}nameChanged(){this.checkLastRadioButton()}async setFocus(){this.disabled||r(this.containerEl)}onLabelClick(t){if(!this.disabled&&!this.hidden){this.uncheckOtherRadioButtonsInGroup();const i=t.currentTarget,a=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);a&&(a.checked=!0,a.focused=!0),this.calciteRadioButtonChange.emit(),this.setFocus()}}checkLastRadioButton(){const t=this.queryButtons().filter((t=>t.checked));if((null==t?void 0:t.length)>1){const i=t[t.length-1];t.filter((t=>t!==i)).forEach((t=>{t.checked=!1,t.emitCheckedChange()}))}}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter((t=>t.guid!==this.guid)).forEach((t=>{t.checked&&(t.checked=!1,t.focused=!1)}))}getTabIndex(){if(!this.disabled)return this.checked||this.isDefaultSelectable()?0:-1}mouseenter(){this.hovered=!0}mouseleave(){this.hovered=!1}connectedCallback(){this.rootNode=this.el.getRootNode(),this.guid=this.el.id||`calcite-radio-button-${s()}`,this.name&&this.checkLastRadioButton(),d(this),u(this)}componentDidLoad(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){l(this),m(this)}componentDidRender(){b(this)}render(){const t=this.getTabIndex();return a(e,{onClick:this.clickHandler,onKeyDown:this.handleKeyDown},a("div",{"aria-checked":c(this.checked),"aria-label":h(this),class:"container",onBlur:this.onContainerBlur,onFocus:this.onContainerFocus,ref:this.setContainerEl,role:"radio",tabIndex:t},a("div",{class:"radio"})),a(p,{component:this}))}get el(){return o(this)}static get watchers(){return{checked:["checkedChanged"],name:["nameChanged"]}}};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;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px}:host .radio{cursor:pointer;border-radius:9999px;background-color:var(--calcite-ui-foreground-1);outline-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s;box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([focused]) .radio{outline:2px solid var(--calcite-ui-brand);outline-offset:2px}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-ui-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 1px var(--calcite-ui-border-input)}:host([scale=s]){--calcite-radio-size:var(--calcite-font-size--2)}:host([scale=m]){--calcite-radio-size:var(--calcite-font-size--1)}:host([scale=l]){--calcite-radio-size:var(--calcite-font-size-0)}.radio{block-size:var(--calcite-radio-size);max-inline-size:var(--calcite-radio-size);min-inline-size:var(--calcite-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand)}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 4px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand)}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand)}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-ui-brand), 0 0 0 2px var(--calcite-ui-foreground-1)}@media (forced-colors: active){:host([checked]) .radio::after,:host([checked][disabled]) .radio::after{content:"";inline-size:var(--calcite-radio-size);block-size:var(--calcite-radio-size);background-color:windowText;display:block}}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}';export{v as calcite_radio_button}
@@ -8,4 +8,4 @@ import{r as t,c as i,h as e,H as a,g as s}from"./p-be2e3b99.js";import{t as n,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 x=class{constructor(e){t(this,e),this.calciteDropdownSelect=i(this,"calciteDropdownSelect",6),this.calciteDropdownBeforeClose=i(this,"calciteDropdownBeforeClose",6),this.calciteDropdownClose=i(this,"calciteDropdownClose",6),this.calciteDropdownBeforeOpen=i(this,"calciteDropdownBeforeOpen",6),this.calciteDropdownOpen=i(this,"calciteDropdownOpen",6),this.active=!1,this.open=!1,this.disableCloseOnSelect=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.placement=l,this.scale="m",this.selectedItems=[],this.type="click",this.items=[],this.groups=[],this.mutationObserver=u("mutation",(()=>this.updateItems())),this.resizeObserver=u("resize",(t=>this.resizeObserverCallback(t))),this.openTransitionProp="visibility",this.guid=`calcite-dropdown-${y()}`,this.defaultAssignedElements=[],this.slotChangeHandler=t=>{this.defaultAssignedElements=t.target.assignedElements({flatten:!0}),this.updateItems()},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?c(i,t):null},this.updateTriggers=t=>{this.triggers=t.target.assignedElements({flatten:!0}),this.reposition(!0)},this.updateItems=()=>{this.items=this.groups.map((t=>Array.from(null==t?void 0:t.querySelectorAll("calcite-dropdown-item")))).reduce(((t,i)=>[...t,...i]),[]),this.updateSelectedItems(),this.reposition(!0)},this.updateGroups=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-dropdown-group")));this.groups=i,this.updateItems()},this.resizeObserverCallback=t=>{t.forEach((t=>{const{target:i}=t;i===this.referenceEl?this.setDropdownWidth():i===this.scrollerEl&&this.setMaxScrollerHeight()}))},this.setDropdownWidth=()=>{const{referenceEl:t,scrollerEl:i}=this,e=null==t?void 0:t.clientWidth;e&&i&&(i.style.minWidth=`${e}px`)},this.setMaxScrollerHeight=()=>{const{scrollerEl:t}=this;if(!t)return;this.reposition(!0);const i=this.getMaxScrollerHeight();t.style.maxHeight=i>0?`${i}px`:"",this.reposition(!0)},this.setScrollerAndTransitionEl=t=>{this.resizeObserver.observe(t),this.scrollerEl=t,this.transitionEl=t,v(this)},this.setReferenceEl=t=>{this.referenceEl=t,h(this,this.referenceEl,this.floatingEl),this.resizeObserver.observe(t)},this.setFloatingEl=t=>{this.floatingEl=t,h(this,this.referenceEl,this.floatingEl)},this.keyDownHandler=t=>{if(t.target!==this.referenceEl)return;const{defaultPrevented:i,key:e}=t;if(!i){if(this.open){if("Escape"===e)return this.closeCalciteDropdown(),void t.preventDefault();if(t.shiftKey&&"Tab"===e)return this.closeCalciteDropdown(),void t.preventDefault()}g(e)?(this.openCalciteDropdown(),t.preventDefault()):"Escape"===e&&(this.closeCalciteDropdown(),t.preventDefault())}},this.focusOnFirstActiveOrFirstItem=()=>{this.getFocusableElement(this.items.find((t=>t.selected))||this.items[0])},this.toggleOpenEnd=()=>{this.focusOnFirstActiveOrFirstItem(),this.el.removeEventListener("calciteDropdownOpen",this.toggleOpenEnd)},this.openCalciteDropdown=()=>{this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.toggleOpenEnd)}}activeHandler(t){this.open=t}openHandler(t){if(!this.disabled)return t?this.reposition(!0):d(this.floatingEl),void(this.active=t);t||d(this.floatingEl),this.open=!1}handleDisabledChange(t){t||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.reposition(!0),this.open&&this.openHandler(this.open),this.active&&this.activeHandler(this.active),v(this)}componentDidLoad(){this.reposition(!0)}componentDidRender(){w(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),p(this,this.referenceEl,this.floatingEl),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),b(this)}render(){const{open:t,guid:i}=this;return e(a,null,e("div",{class:"calcite-dropdown-trigger-container",id:`${i}-menubutton`,onClick:this.openCalciteDropdown,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},e("slot",{"aria-controls":`${i}-menu`,"aria-expanded":n(t),"aria-haspopup":"menu",name:"dropdown-trigger",onSlotchange:this.updateTriggers})),e("div",{"aria-hidden":n(!t),class:"calcite-dropdown-wrapper",ref:this.setFloatingEl},e("div",{"aria-labelledby":`${i}-menubutton`,class:{"calcite-dropdown-content":!0,[m.animation]:!0,[m.animationActive]:t},id:`${i}-menu`,ref:this.setScrollerAndTransitionEl,role:"menu"},e("slot",{onSlotchange:this.updateGroups}))))}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:a,overlayPositioning:s,filteredFlipPlacements:n}=this;return f(this,{floatingEl:i,referenceEl:e,overlayPositioning:s,placement:a,flipPlacements:n,type:"menu"},t)}closeCalciteDropdownOnClick(t){o(t)&&this.open&&!t.composedPath().includes(this.el)&&this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(t){this.closeCalciteDropdown(),t.stopPropagation()}closeCalciteDropdownOnOpenEvent(t){t.composedPath().includes(this.el)||(this.open=!1)}mouseEnterHandler(){"hover"===this.type&&this.openCalciteDropdown()}mouseLeaveHandler(){"hover"===this.type&&this.closeCalciteDropdown()}calciteInternalDropdownItemKeyEvent(t){const{keyboardEvent:i}=t.detail,e=i.target,a="A"!==e.nodeName?e:e.parentNode,s=0===this.itemIndex(a),n=this.itemIndex(a)===this.items.length-1;switch(i.key){case"Tab":n&&!i.shiftKey||s&&i.shiftKey?this.closeCalciteDropdown():i.shiftKey?this.focusPrevItem(a):this.focusNextItem(a);break;case"ArrowDown":this.focusNextItem(a);break;case"ArrowUp":this.focusPrevItem(a);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}handleItemSelect(t){this.updateSelectedItems(),t.stopPropagation(),this.calciteDropdownSelect.emit({item:t.detail.requestedDropdownItem}),this.disableCloseOnSelect&&"none"!==t.detail.requestedDropdownGroup.selectionMode||this.closeCalciteDropdown(),t.stopPropagation()}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit()}updateSelectedItems(){this.selectedItems=this.items.filter((t=>t.selected))}getMaxScrollerHeight(){const{maxItems:t,items:i}=this;let e,a=0,s=0;return this.groups.forEach((i=>{t>0&&a<t&&Array.from(i.children).forEach(((i,n)=>{0===n&&(isNaN(e)&&(e=i.offsetTop),s+=e),a<t&&(s+=i.offsetHeight,a+=1)}))})),i.length>t?s:0}closeCalciteDropdown(t=!0){this.open=!1,t&&r(this.triggers[0])}focusFirstItem(){this.getFocusableElement(this.items[0])}focusLastItem(){this.getFocusableElement(this.items[this.items.length-1])}focusNextItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i+1]||this.items[0])}focusPrevItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i-1]||this.items[this.items.length-1])}itemIndex(t){return this.items.indexOf(t)}getFocusableElement(t){if(!t)return;const i=t.attributes.isLink?t.shadowRoot.querySelector("a"):t;r(i)}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],flipPlacements:["flipPlacementsHandler"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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:inline-flex;flex:0 1 auto}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host .calcite-dropdown-wrapper{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.calcite-dropdown-wrapper .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([open]) .calcite-dropdown-wrapper{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}:host .calcite-dropdown-content{max-block-size:45vh;inline-size:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-dropdown-trigger-container{position:relative;display:flex;flex:1 1 auto}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([width=s]){--calcite-dropdown-width:12rem}:host([width=m]){--calcite-dropdown-width:14rem}:host([width=l]){--calcite-dropdown-width:16rem}";export{x as calcite_dropdown}
11
+ */const x=class{constructor(e){t(this,e),this.calciteDropdownSelect=i(this,"calciteDropdownSelect",6),this.calciteDropdownBeforeClose=i(this,"calciteDropdownBeforeClose",6),this.calciteDropdownClose=i(this,"calciteDropdownClose",6),this.calciteDropdownBeforeOpen=i(this,"calciteDropdownBeforeOpen",6),this.calciteDropdownOpen=i(this,"calciteDropdownOpen",6),this.active=!1,this.open=!1,this.disableCloseOnSelect=!1,this.disabled=!1,this.maxItems=0,this.overlayPositioning="absolute",this.placement=l,this.scale="m",this.selectedItems=[],this.type="click",this.items=[],this.groups=[],this.mutationObserver=u("mutation",(()=>this.updateItems())),this.resizeObserver=u("resize",(t=>this.resizeObserverCallback(t))),this.openTransitionProp="visibility",this.guid=`calcite-dropdown-${y()}`,this.defaultAssignedElements=[],this.slotChangeHandler=t=>{this.defaultAssignedElements=t.target.assignedElements({flatten:!0}),this.updateItems()},this.setFilteredPlacements=()=>{const{el:t,flipPlacements:i}=this;this.filteredFlipPlacements=i?c(i,t):null},this.updateTriggers=t=>{this.triggers=t.target.assignedElements({flatten:!0}),this.reposition(!0)},this.updateItems=()=>{this.items=this.groups.map((t=>Array.from(null==t?void 0:t.querySelectorAll("calcite-dropdown-item")))).reduce(((t,i)=>[...t,...i]),[]),this.updateSelectedItems(),this.reposition(!0)},this.updateGroups=t=>{const i=t.target.assignedElements({flatten:!0}).filter((t=>null==t?void 0:t.matches("calcite-dropdown-group")));this.groups=i,this.updateItems()},this.resizeObserverCallback=t=>{t.forEach((t=>{const{target:i}=t;i===this.referenceEl?this.setDropdownWidth():i===this.scrollerEl&&this.setMaxScrollerHeight()}))},this.setDropdownWidth=()=>{const{referenceEl:t,scrollerEl:i}=this,e=null==t?void 0:t.clientWidth;e&&i&&(i.style.minWidth=`${e}px`)},this.setMaxScrollerHeight=()=>{const{scrollerEl:t}=this;if(!t)return;this.reposition(!0);const i=this.getMaxScrollerHeight();t.style.maxHeight=i>0?`${i}px`:"",this.reposition(!0)},this.setScrollerAndTransitionEl=t=>{this.resizeObserver.observe(t),this.scrollerEl=t,this.transitionEl=t,v(this)},this.setReferenceEl=t=>{this.referenceEl=t,h(this,this.referenceEl,this.floatingEl),this.resizeObserver.observe(t)},this.setFloatingEl=t=>{this.floatingEl=t,h(this,this.referenceEl,this.floatingEl)},this.keyDownHandler=t=>{if(t.target!==this.referenceEl)return;const{defaultPrevented:i,key:e}=t;if(!i){if(this.open){if("Escape"===e)return this.closeCalciteDropdown(),void t.preventDefault();if(t.shiftKey&&"Tab"===e)return this.closeCalciteDropdown(),void t.preventDefault()}g(e)?(this.openCalciteDropdown(),t.preventDefault()):"Escape"===e&&(this.closeCalciteDropdown(),t.preventDefault())}},this.focusOnFirstActiveOrFirstItem=()=>{this.getFocusableElement(this.items.find((t=>t.selected))||this.items[0])},this.toggleOpenEnd=()=>{this.focusOnFirstActiveOrFirstItem(),this.el.removeEventListener("calciteDropdownOpen",this.toggleOpenEnd)},this.openCalciteDropdown=()=>{this.open=!this.open,this.open&&this.el.addEventListener("calciteDropdownOpen",this.toggleOpenEnd)}}activeHandler(t){this.open=t}openHandler(t){if(!this.disabled)return t?this.reposition(!0):d(this.floatingEl),void(this.active=t);t||d(this.floatingEl),this.open=!1}handleDisabledChange(t){t||(this.open=!1)}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}maxItemsHandler(){this.setMaxScrollerHeight()}overlayPositioningHandler(){this.reposition(!0)}placementHandler(){this.reposition(!0)}connectedCallback(){var t;null===(t=this.mutationObserver)||void 0===t||t.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),this.reposition(!0),this.open&&this.openHandler(this.open),this.active&&this.activeHandler(this.active),v(this)}componentDidLoad(){this.reposition(!0)}componentDidRender(){w(this)}disconnectedCallback(){var t,i;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),p(this,this.referenceEl,this.floatingEl),null===(i=this.resizeObserver)||void 0===i||i.disconnect(),b(this)}render(){const{open:t,guid:i}=this;return e(a,null,e("div",{class:"calcite-dropdown-trigger-container",id:`${i}-menubutton`,onClick:this.openCalciteDropdown,onKeyDown:this.keyDownHandler,ref:this.setReferenceEl},e("slot",{"aria-controls":`${i}-menu`,"aria-expanded":n(t),"aria-haspopup":"menu",name:"dropdown-trigger",onSlotchange:this.updateTriggers})),e("div",{"aria-hidden":n(!t),class:"calcite-dropdown-wrapper",ref:this.setFloatingEl},e("div",{"aria-labelledby":`${i}-menubutton`,class:{"calcite-dropdown-content":!0,[m.animation]:!0,[m.animationActive]:t},id:`${i}-menu`,ref:this.setScrollerAndTransitionEl,role:"menu"},e("slot",{onSlotchange:this.updateGroups}))))}async reposition(t=!1){const{floatingEl:i,referenceEl:e,placement:a,overlayPositioning:s,filteredFlipPlacements:n}=this;return f(this,{floatingEl:i,referenceEl:e,overlayPositioning:s,placement:a,flipPlacements:n,type:"menu"},t)}closeCalciteDropdownOnClick(t){o(t)&&this.open&&!t.composedPath().includes(this.el)&&this.closeCalciteDropdown(!1)}closeCalciteDropdownOnEvent(t){this.closeCalciteDropdown(),t.stopPropagation()}closeCalciteDropdownOnOpenEvent(t){t.composedPath().includes(this.el)||(this.open=!1)}mouseEnterHandler(){"hover"===this.type&&this.openCalciteDropdown()}mouseLeaveHandler(){"hover"===this.type&&this.closeCalciteDropdown()}calciteInternalDropdownItemKeyEvent(t){const{keyboardEvent:i}=t.detail,e=i.target,a="A"!==e.nodeName?e:e.parentNode,s=0===this.itemIndex(a),n=this.itemIndex(a)===this.items.length-1;switch(i.key){case"Tab":n&&!i.shiftKey||s&&i.shiftKey?this.closeCalciteDropdown():i.shiftKey?this.focusPrevItem(a):this.focusNextItem(a);break;case"ArrowDown":this.focusNextItem(a);break;case"ArrowUp":this.focusPrevItem(a);break;case"Home":this.focusFirstItem();break;case"End":this.focusLastItem()}t.stopPropagation()}handleItemSelect(t){this.updateSelectedItems(),t.stopPropagation(),this.calciteDropdownSelect.emit({item:t.detail.requestedDropdownItem}),this.disableCloseOnSelect&&"none"!==t.detail.requestedDropdownGroup.selectionMode||this.closeCalciteDropdown(),t.stopPropagation()}onBeforeOpen(){this.calciteDropdownBeforeOpen.emit()}onOpen(){this.calciteDropdownOpen.emit()}onBeforeClose(){this.calciteDropdownBeforeClose.emit()}onClose(){this.calciteDropdownClose.emit()}updateSelectedItems(){this.selectedItems=this.items.filter((t=>t.selected))}getMaxScrollerHeight(){const{maxItems:t,items:i}=this;let e,a=0,s=0;return this.groups.forEach((i=>{t>0&&a<t&&Array.from(i.children).forEach(((i,n)=>{0===n&&(isNaN(e)&&(e=i.offsetTop),s+=e),a<t&&(s+=i.offsetHeight,a+=1)}))})),i.length>t?s:0}closeCalciteDropdown(t=!0){this.open=!1,t&&r(this.triggers[0])}focusFirstItem(){this.getFocusableElement(this.items[0])}focusLastItem(){this.getFocusableElement(this.items[this.items.length-1])}focusNextItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i+1]||this.items[0])}focusPrevItem(t){const i=this.itemIndex(t);this.getFocusableElement(this.items[i-1]||this.items[this.items.length-1])}itemIndex(t){return this.items.indexOf(t)}getFocusableElement(t){if(!t)return;const i=t.attributes.isLink?t.shadowRoot.querySelector("a"):t;r(i)}get el(){return s(this)}static get watchers(){return{active:["activeHandler"],open:["openHandler"],disabled:["handleDisabledChange"],flipPlacements:["flipPlacementsHandler"],maxItems:["maxItemsHandler"],overlayPositioning:["overlayPositioningHandler"],placement:["placementHandler"]}}};x.style="@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}: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:inline-flex;flex:0 1 auto}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}:host .calcite-dropdown-wrapper{display:block;position:absolute;z-index:900;visibility:hidden;pointer-events:none;inline-size:0;block-size:0;overflow:hidden}.calcite-dropdown-wrapper .calcite-floating-ui-anim{position:relative;transition:var(--calcite-floating-ui-transition);visibility:hidden;transition-property:transform, visibility, opacity;opacity:0;box-shadow:0 0 16px 0 rgba(0, 0, 0, 0.16);z-index:1;border-radius:0.25rem}.calcite-dropdown-wrapper[data-placement^=bottom] .calcite-floating-ui-anim{transform:translateY(-5px)}.calcite-dropdown-wrapper[data-placement^=top] .calcite-floating-ui-anim{transform:translateY(5px)}.calcite-dropdown-wrapper[data-placement^=left] .calcite-floating-ui-anim{transform:translateX(5px)}.calcite-dropdown-wrapper[data-placement^=right] .calcite-floating-ui-anim{transform:translateX(-5px)}.calcite-dropdown-wrapper[data-placement] .calcite-floating-ui-anim--active{opacity:1;visibility:visible;transform:translate(0)}:host([open]) .calcite-dropdown-wrapper{pointer-events:initial;visibility:visible;inline-size:unset;block-size:unset;overflow:unset}:host .calcite-dropdown-content{max-block-size:45vh;inline-size:auto;overflow-y:auto;overflow-x:hidden;background-color:var(--calcite-ui-foreground-1);inline-size:var(--calcite-dropdown-width)}.calcite-dropdown-trigger-container{position:relative;display:flex;flex:1 1 auto}@media (forced-colors: active){:host([open]) .calcite-dropdown-wrapper{border:1px solid canvasText}}:host([width=s]){--calcite-dropdown-width:12rem}:host([width=m]){--calcite-dropdown-width:14rem}:host([width=l]){--calcite-dropdown-width:16rem}";export{x as calcite_dropdown}