@esri/calcite-components 1.0.0-beta.71 → 1.0.0-beta.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (894) hide show
  1. package/dist/calcite/assets/calcite-icon/centerAlign16.json +1 -0
  2. package/dist/calcite/assets/calcite-icon/centerAlign24.json +1 -0
  3. package/dist/calcite/assets/calcite-icon/centerAlign32.json +1 -0
  4. package/dist/calcite/assets/calcite-icon/convert16.json +1 -0
  5. package/dist/calcite/assets/calcite-icon/convert24.json +1 -0
  6. package/dist/calcite/assets/calcite-icon/convert32.json +1 -0
  7. package/dist/calcite/assets/calcite-icon/formDropdown16.json +1 -0
  8. package/dist/calcite/assets/calcite-icon/formDropdown24.json +1 -0
  9. package/dist/calcite/assets/calcite-icon/formDropdown32.json +1 -0
  10. package/dist/calcite/assets/calcite-icon/language16.json +1 -0
  11. package/dist/calcite/assets/calcite-icon/language24.json +1 -0
  12. package/dist/calcite/assets/calcite-icon/language32.json +1 -0
  13. package/dist/calcite/assets/calcite-icon/languageTranslate16.json +1 -0
  14. package/dist/calcite/assets/calcite-icon/languageTranslate24.json +1 -0
  15. package/dist/calcite/assets/calcite-icon/languageTranslate32.json +1 -0
  16. package/dist/calcite/assets/calcite-icon/leftAlign16.json +1 -0
  17. package/dist/calcite/assets/calcite-icon/leftAlign24.json +1 -0
  18. package/dist/calcite/assets/calcite-icon/leftAlign32.json +1 -0
  19. package/dist/calcite/assets/calcite-icon/terminal16.json +1 -0
  20. package/dist/calcite/assets/calcite-icon/terminal24.json +1 -0
  21. package/dist/calcite/assets/calcite-icon/terminal32.json +1 -0
  22. package/dist/calcite/assets/calcite-icon/touch16.json +1 -0
  23. package/dist/calcite/assets/calcite-icon/touch24.json +1 -0
  24. package/dist/calcite/assets/calcite-icon/touch32.json +1 -0
  25. package/dist/calcite/calcite.css +1 -1
  26. package/dist/calcite/calcite.esm.js +1 -1
  27. package/dist/calcite/calcite.js +1 -1
  28. package/dist/calcite/{p-b6b6ec04.js → p-0229a408.js} +1 -1
  29. package/dist/calcite/p-04cc8259.entry.js +5 -0
  30. package/dist/calcite/p-057197f8.entry.js +5 -0
  31. package/dist/calcite/p-05c10c53.entry.js +5 -0
  32. package/dist/calcite/p-05edaadf.system.entry.js +5 -0
  33. package/dist/calcite/p-06ddf228.entry.js +5 -0
  34. package/dist/calcite/p-0b45733b.entry.js +5 -0
  35. package/dist/calcite/p-0f2b51bf.system.js +5 -0
  36. package/dist/calcite/p-112f20e6.system.entry.js +5 -0
  37. package/dist/calcite/p-11f01c0a.entry.js +5 -0
  38. package/dist/calcite/p-18d9a261.system.js +5 -0
  39. package/dist/calcite/p-1942876c.js +5 -0
  40. package/dist/calcite/{p-fba77b86.entry.js → p-2151c991.entry.js} +1 -1
  41. package/dist/calcite/{p-7bb94bfa.entry.js → p-27d9be53.entry.js} +1 -1
  42. package/dist/calcite/p-288899b9.entry.js +5 -0
  43. package/dist/calcite/p-2b294f8e.system.entry.js +5 -0
  44. package/dist/calcite/{p-2c66fb61.entry.js → p-2be1e8ee.entry.js} +1 -1
  45. package/dist/calcite/p-2d939f9e.system.entry.js +5 -0
  46. package/dist/calcite/p-2fbd50f3.system.entry.js +5 -0
  47. package/dist/calcite/p-30036f23.system.entry.js +5 -0
  48. package/dist/calcite/{p-d07ff1ee.system.js → p-35a5c74c.system.js} +1 -1
  49. package/dist/calcite/p-3739338a.system.entry.js +5 -0
  50. package/dist/calcite/p-3c25cb72.system.entry.js +5 -0
  51. package/dist/calcite/p-3d8ee39d.system.entry.js +5 -0
  52. package/dist/calcite/p-3dae9da3.js +5 -0
  53. package/dist/calcite/p-3e9c6068.entry.js +5 -0
  54. package/dist/calcite/p-3f8527a3.entry.js +5 -0
  55. package/dist/calcite/p-40991717.entry.js +5 -0
  56. package/dist/calcite/p-40e16f41.entry.js +5 -0
  57. package/dist/calcite/p-4278fb57.entry.js +5 -0
  58. package/dist/calcite/p-444ecda9.entry.js +5 -0
  59. package/dist/calcite/p-44cce7a3.system.entry.js +5 -0
  60. package/dist/calcite/p-4d02c6c0.system.entry.js +5 -0
  61. package/dist/calcite/{p-4035444d.system.js → p-4e9d072a.system.js} +1 -1
  62. package/dist/calcite/p-4f1f716a.system.entry.js +5 -0
  63. package/dist/calcite/p-4f7ebefc.system.js +5 -0
  64. package/dist/calcite/{p-71cdeee3.system.js → p-523bc291.system.js} +1 -1
  65. package/dist/calcite/p-52cc870b.js +5 -0
  66. package/dist/calcite/p-55f68e28.entry.js +5 -0
  67. package/dist/calcite/p-57169a74.entry.js +5 -0
  68. package/dist/calcite/p-5c9d89ce.system.entry.js +5 -0
  69. package/dist/calcite/p-62f3d4df.system.js +5 -0
  70. package/dist/calcite/p-63b9f804.entry.js +5 -0
  71. package/dist/calcite/p-66fda99e.entry.js +5 -0
  72. package/dist/calcite/p-689790cb.system.entry.js +5 -0
  73. package/dist/calcite/p-69bd1f5f.system.entry.js +5 -0
  74. package/dist/calcite/p-6a87d7b2.entry.js +5 -0
  75. package/dist/calcite/p-6cc23c39.system.js +5 -0
  76. package/dist/calcite/p-6faaa8af.system.entry.js +5 -0
  77. package/dist/calcite/p-6fb63fc1.entry.js +5 -0
  78. package/dist/calcite/p-72a60528.system.entry.js +5 -0
  79. package/dist/calcite/p-763479d6.system.entry.js +5 -0
  80. package/dist/calcite/p-768018df.entry.js +5 -0
  81. package/dist/calcite/p-76eda40b.entry.js +5 -0
  82. package/dist/calcite/p-7ac9f860.entry.js +5 -0
  83. package/dist/calcite/p-7ff5e336.entry.js +5 -0
  84. package/dist/calcite/p-83744979.system.js +5 -0
  85. package/dist/calcite/p-87327c2f.system.entry.js +5 -0
  86. package/dist/calcite/p-88296be9.system.entry.js +5 -0
  87. package/dist/calcite/p-88b31760.system.entry.js +5 -0
  88. package/dist/calcite/p-8a8982ab.system.entry.js +5 -0
  89. package/dist/calcite/p-8c4b6059.system.entry.js +5 -0
  90. package/dist/calcite/p-8ebc2d51.entry.js +5 -0
  91. package/dist/calcite/p-9180be05.system.entry.js +5 -0
  92. package/dist/calcite/p-93a189be.entry.js +5 -0
  93. package/dist/calcite/p-97117a5d.entry.js +5 -0
  94. package/dist/calcite/p-97efd284.system.entry.js +5 -0
  95. package/dist/calcite/p-998829cb.system.entry.js +5 -0
  96. package/dist/calcite/p-9a1ffbad.system.entry.js +5 -0
  97. package/dist/calcite/p-9a8f3883.entry.js +5 -0
  98. package/dist/calcite/p-9b979692.entry.js +5 -0
  99. package/dist/calcite/p-9fc14d49.entry.js +5 -0
  100. package/dist/calcite/p-9feb0f5a.system.entry.js +5 -0
  101. package/dist/calcite/p-a2a22cbc.entry.js +5 -0
  102. package/dist/calcite/p-a3c498de.entry.js +5 -0
  103. package/dist/calcite/p-a4784cf3.system.entry.js +5 -0
  104. package/dist/calcite/p-a4a12ffb.system.entry.js +5 -0
  105. package/dist/calcite/p-a6f99f79.entry.js +5 -0
  106. package/dist/calcite/p-a98344e2.system.entry.js +5 -0
  107. package/dist/calcite/p-a9f596be.system.entry.js +5 -0
  108. package/dist/calcite/p-adf4699d.system.entry.js +5 -0
  109. package/dist/calcite/p-b180d943.system.entry.js +5 -0
  110. package/dist/calcite/p-b2f0596f.entry.js +5 -0
  111. package/dist/calcite/p-b437a8eb.system.entry.js +5 -0
  112. package/dist/calcite/p-b43e699c.system.entry.js +5 -0
  113. package/dist/calcite/p-ba7c0f01.system.entry.js +5 -0
  114. package/dist/calcite/p-bca0b34f.entry.js +5 -0
  115. package/dist/calcite/p-bd091b49.system.entry.js +5 -0
  116. package/dist/calcite/p-bdca5372.entry.js +5 -0
  117. package/dist/calcite/p-bfa6bd72.entry.js +5 -0
  118. package/dist/calcite/p-c00b1d26.js +5 -0
  119. package/dist/calcite/p-c2bfd7f9.system.entry.js +5 -0
  120. package/dist/calcite/p-c2fcf603.system.entry.js +5 -0
  121. package/dist/calcite/{p-47f55191.system.js → p-c34c4414.system.js} +1 -1
  122. package/dist/calcite/p-c70bacc8.system.entry.js +5 -0
  123. package/dist/calcite/p-c8c6323c.entry.js +5 -0
  124. package/dist/calcite/p-cb660e54.entry.js +5 -0
  125. package/dist/calcite/p-cd5d5756.system.entry.js +5 -0
  126. package/dist/calcite/p-ce704ece.js +5 -0
  127. package/dist/calcite/p-cf499949.entry.js +5 -0
  128. package/dist/calcite/p-d17cfab3.entry.js +5 -0
  129. package/dist/calcite/{p-e956e279.js → p-d3bd900e.js} +1 -1
  130. package/dist/calcite/p-d3db2b58.system.entry.js +5 -0
  131. package/dist/calcite/p-d4d5665a.system.entry.js +5 -0
  132. package/dist/calcite/p-d8039e8a.system.entry.js +5 -0
  133. package/dist/calcite/p-d9414082.system.entry.js +5 -0
  134. package/dist/calcite/p-dc7124e9.entry.js +5 -0
  135. package/dist/calcite/p-dc777403.system.entry.js +5 -0
  136. package/dist/calcite/p-dda22c7e.system.entry.js +5 -0
  137. package/dist/calcite/p-de67ba93.system.entry.js +5 -0
  138. package/dist/calcite/p-e09bac0d.system.entry.js +5 -0
  139. package/dist/calcite/p-e0b1e90c.entry.js +5 -0
  140. package/dist/calcite/p-e35b29f5.system.entry.js +5 -0
  141. package/dist/calcite/p-e54784a8.system.entry.js +5 -0
  142. package/dist/calcite/p-e63c6a55.system.entry.js +5 -0
  143. package/dist/calcite/p-e697ab57.system.entry.js +5 -0
  144. package/dist/calcite/{p-23bc2d32.entry.js → p-e7801f1d.entry.js} +1 -1
  145. package/dist/calcite/{p-f07d3627.js → p-e7f7b0f8.js} +1 -1
  146. package/dist/calcite/p-eebd2bb0.entry.js +5 -0
  147. package/dist/calcite/p-f1f65708.entry.js +5 -0
  148. package/dist/calcite/p-f2340d02.system.entry.js +5 -0
  149. package/dist/calcite/p-f25f139a.entry.js +5 -0
  150. package/dist/calcite/p-f28d8e9e.system.entry.js +5 -0
  151. package/dist/calcite/p-f2f2ad57.entry.js +5 -0
  152. package/dist/calcite/p-f39dc5fd.entry.js +5 -0
  153. package/dist/calcite/p-f4a7fa43.entry.js +5 -0
  154. package/dist/calcite/p-f595d924.js +5 -0
  155. package/dist/calcite/{p-714ae4f6.entry.js → p-f72c037c.entry.js} +1 -1
  156. package/dist/calcite/p-f9e7371d.entry.js +5 -0
  157. package/dist/calcite/p-fc265aaf.entry.js +5 -0
  158. package/dist/calcite/p-fc9025a2.entry.js +5 -0
  159. package/dist/calcite/p-fd255a24.entry.js +5 -0
  160. package/dist/calcite/p-fd94e88d.system.entry.js +5 -0
  161. package/dist/cjs/{CalciteExpandToggle-ca629f39.js → CalciteExpandToggle-d654421a.js} +3 -3
  162. package/dist/cjs/calcite-accordion_2.cjs.entry.js +6 -7
  163. package/dist/cjs/calcite-action-bar.cjs.entry.js +27 -3
  164. package/dist/cjs/calcite-action-group.cjs.entry.js +2 -2
  165. package/dist/cjs/calcite-action-menu.cjs.entry.js +2 -2
  166. package/dist/cjs/calcite-action-pad.cjs.entry.js +4 -9
  167. package/dist/cjs/calcite-action.cjs.entry.js +1 -1
  168. package/dist/cjs/calcite-alert.cjs.entry.js +3 -5
  169. package/dist/cjs/calcite-avatar.cjs.entry.js +4 -5
  170. package/dist/cjs/calcite-block_2.cjs.entry.js +11 -7
  171. package/dist/cjs/calcite-button.cjs.entry.js +12 -7
  172. package/dist/cjs/calcite-card.cjs.entry.js +3 -7
  173. package/dist/cjs/calcite-checkbox.cjs.entry.js +4 -4
  174. package/dist/cjs/calcite-chip.cjs.entry.js +4 -5
  175. package/dist/cjs/calcite-color-picker_3.cjs.entry.js +30 -34
  176. package/dist/cjs/calcite-combobox_3.cjs.entry.js +16 -19
  177. package/dist/cjs/calcite-date-picker_4.cjs.entry.js +44 -34
  178. package/dist/cjs/calcite-dropdown_3.cjs.entry.js +14 -19
  179. package/dist/cjs/calcite-fab.cjs.entry.js +4 -5
  180. package/dist/cjs/calcite-filter.cjs.entry.js +4 -19
  181. package/dist/cjs/calcite-flow.cjs.entry.js +1 -1
  182. package/dist/cjs/calcite-graph_2.cjs.entry.js +35 -23
  183. package/dist/cjs/calcite-handle.cjs.entry.js +1 -1
  184. package/dist/cjs/calcite-icon.cjs.entry.js +2 -2
  185. package/dist/cjs/calcite-inline-editable.cjs.entry.js +3 -3
  186. package/dist/cjs/calcite-input-date-picker.cjs.entry.js +25 -13
  187. package/dist/cjs/calcite-input-message.cjs.entry.js +3 -4
  188. package/dist/cjs/calcite-input-time-picker_2.cjs.entry.js +376 -251
  189. package/dist/cjs/calcite-input.cjs.entry.js +12 -15
  190. package/dist/cjs/calcite-label.cjs.entry.js +2 -5
  191. package/dist/cjs/calcite-link.cjs.entry.js +3 -3
  192. package/dist/cjs/calcite-list_3.cjs.entry.js +4 -4
  193. package/dist/cjs/calcite-loader.cjs.entry.js +1 -1
  194. package/dist/cjs/calcite-modal.cjs.entry.js +4 -6
  195. package/dist/cjs/calcite-notice.cjs.entry.js +3 -4
  196. package/dist/cjs/calcite-option_3.cjs.entry.js +12 -11
  197. package/dist/cjs/calcite-pagination.cjs.entry.js +3 -6
  198. package/dist/cjs/calcite-panel.cjs.entry.js +6 -10
  199. package/dist/cjs/calcite-pick-list_3.cjs.entry.js +6 -8
  200. package/dist/cjs/calcite-popover_2.cjs.entry.js +5 -7
  201. package/dist/cjs/calcite-progress.cjs.entry.js +1 -1
  202. package/dist/cjs/calcite-radio-button-group.cjs.entry.js +1 -1
  203. package/dist/cjs/{calcite-radio_2.cjs.entry.js → calcite-radio-button.cjs.entry.js} +12 -54
  204. package/dist/cjs/calcite-radio-group_2.cjs.entry.js +14 -22
  205. package/dist/cjs/calcite-rating.cjs.entry.js +5 -6
  206. package/dist/cjs/calcite-scrim.cjs.entry.js +1 -1
  207. package/dist/cjs/calcite-shell_3.cjs.entry.js +8 -9
  208. package/dist/cjs/calcite-sortable-list.cjs.entry.js +1 -1
  209. package/dist/cjs/calcite-split-button.cjs.entry.js +2 -5
  210. package/dist/cjs/calcite-stepper_2.cjs.entry.js +6 -8
  211. package/dist/cjs/calcite-switch.cjs.entry.js +7 -9
  212. package/dist/cjs/calcite-tab_4.cjs.entry.js +13 -16
  213. package/dist/cjs/calcite-tile-select_2.cjs.entry.js +3 -5
  214. package/dist/cjs/calcite-tile.cjs.entry.js +2 -2
  215. package/dist/cjs/calcite-tip_3.cjs.entry.js +5 -5
  216. package/dist/cjs/calcite-tooltip_2.cjs.entry.js +5 -6
  217. package/dist/cjs/calcite-tree_2.cjs.entry.js +4 -5
  218. package/dist/cjs/calcite-value-list_2.cjs.entry.js +4 -4
  219. package/dist/cjs/calcite.cjs.js +2 -2
  220. package/dist/cjs/{dom-41ce6029.js → dom-19822169.js} +0 -7
  221. package/dist/cjs/{form-7f276aa5.js → form-a5b44a1f.js} +1 -1
  222. package/dist/cjs/{label-98a31f7d.js → label-8e3552b2.js} +1 -1
  223. package/dist/cjs/loader.cjs.js +2 -2
  224. package/dist/cjs/{locale-69dc9583.js → locale-33c458dc.js} +1 -1
  225. package/dist/cjs/{number-e6448e15.js → number-73f7b474.js} +17 -4
  226. package/dist/cjs/{popper-4c24a334.js → popper-a7580aca.js} +1 -1
  227. package/dist/cjs/{resources-3f7b51c8.js → resources-16974e48.js} +3 -2
  228. package/dist/cjs/{resources-1177e39b.js → resources-6c4b32ef.js} +5 -5
  229. package/dist/collection/collection-manifest.json +9 -11
  230. package/dist/collection/components/calcite-accordion/calcite-accordion.css +5 -1
  231. package/dist/collection/components/calcite-accordion/calcite-accordion.js +1 -2
  232. package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.css +10 -23
  233. package/dist/collection/components/calcite-accordion-item/calcite-accordion-item.js +1 -2
  234. package/dist/collection/components/calcite-action/calcite-action.css +5 -1
  235. package/dist/collection/components/calcite-action-bar/calcite-action-bar.css +5 -1
  236. package/dist/collection/components/calcite-action-bar/calcite-action-bar.js +3 -0
  237. package/dist/collection/components/calcite-action-group/calcite-action-group.css +5 -1
  238. package/dist/collection/components/calcite-action-menu/calcite-action-menu.css +5 -1
  239. package/dist/collection/components/calcite-action-pad/calcite-action-pad.css +7 -8
  240. package/dist/collection/components/calcite-action-pad/calcite-action-pad.js +2 -8
  241. package/dist/collection/components/calcite-alert/calcite-alert.css +29 -40
  242. package/dist/collection/components/calcite-alert/calcite-alert.js +2 -5
  243. package/dist/collection/components/calcite-avatar/calcite-avatar.css +5 -1
  244. package/dist/collection/components/calcite-avatar/calcite-avatar.js +2 -4
  245. package/dist/collection/components/calcite-block/calcite-block.css +13 -16
  246. package/dist/collection/components/calcite-block/calcite-block.js +8 -4
  247. package/dist/collection/components/calcite-block-section/calcite-block-section.css +7 -13
  248. package/dist/collection/components/calcite-block-section/calcite-block-section.js +3 -4
  249. package/dist/collection/components/calcite-button/calcite-button.css +24 -58
  250. package/dist/collection/components/calcite-button/calcite-button.js +9 -6
  251. package/dist/collection/components/calcite-button/resources.js +3 -1
  252. package/dist/collection/components/calcite-card/calcite-card.css +6 -7
  253. package/dist/collection/components/calcite-card/calcite-card.js +2 -6
  254. package/dist/collection/components/calcite-checkbox/calcite-checkbox.css +5 -1
  255. package/dist/collection/components/calcite-chip/calcite-chip.css +18 -39
  256. package/dist/collection/components/calcite-chip/calcite-chip.js +3 -5
  257. package/dist/collection/components/calcite-color-picker/calcite-color-picker.css +7 -8
  258. package/dist/collection/components/calcite-color-picker/calcite-color-picker.js +8 -12
  259. package/dist/collection/components/calcite-color-picker-hex-input/calcite-color-picker-hex-input.css +5 -1
  260. package/dist/collection/components/calcite-color-picker-hex-input/calcite-color-picker-hex-input.js +4 -6
  261. package/dist/collection/components/calcite-color-picker-swatch/calcite-color-picker-swatch.css +5 -1
  262. package/dist/collection/components/calcite-combobox/calcite-combobox.css +9 -13
  263. package/dist/collection/components/calcite-combobox/calcite-combobox.js +10 -11
  264. package/dist/collection/components/calcite-combobox-item/calcite-combobox-item.css +7 -14
  265. package/dist/collection/components/calcite-combobox-item/calcite-combobox-item.js +2 -5
  266. package/dist/collection/components/calcite-combobox-item-group/calcite-combobox-item-group.css +7 -19
  267. package/dist/collection/components/calcite-combobox-item-group/calcite-combobox-item-group.js +3 -5
  268. package/dist/collection/components/calcite-date-picker/calcite-date-picker.css +5 -1
  269. package/dist/collection/components/calcite-date-picker/calcite-date-picker.js +46 -10
  270. package/dist/collection/components/calcite-date-picker/resources.js +2 -1
  271. package/dist/collection/components/calcite-date-picker-day/calcite-date-picker-day.css +27 -9
  272. package/dist/collection/components/calcite-date-picker-day/calcite-date-picker-day.js +1 -2
  273. package/dist/collection/components/calcite-date-picker-month/calcite-date-picker-month.css +5 -1
  274. package/dist/collection/components/calcite-date-picker-month/calcite-date-picker-month.js +6 -9
  275. package/dist/collection/components/calcite-date-picker-month-header/calcite-date-picker-month-header.css +5 -1
  276. package/dist/collection/components/calcite-date-picker-month-header/calcite-date-picker-month-header.js +25 -11
  277. package/dist/collection/components/calcite-dropdown/calcite-dropdown.css +5 -28
  278. package/dist/collection/components/calcite-dropdown/calcite-dropdown.js +5 -8
  279. package/dist/collection/components/calcite-dropdown-group/calcite-dropdown-group.css +5 -1
  280. package/dist/collection/components/calcite-dropdown-group/calcite-dropdown-group.js +2 -3
  281. package/dist/collection/components/calcite-dropdown-item/calcite-dropdown-item.css +41 -124
  282. package/dist/collection/components/calcite-dropdown-item/calcite-dropdown-item.js +4 -8
  283. package/dist/collection/components/calcite-fab/calcite-fab.css +5 -1
  284. package/dist/collection/components/calcite-fab/calcite-fab.js +3 -4
  285. package/dist/collection/components/calcite-filter/calcite-filter.css +8 -22
  286. package/dist/collection/components/calcite-filter/calcite-filter.js +7 -43
  287. package/dist/collection/components/calcite-flow/calcite-flow.css +5 -1
  288. package/dist/collection/components/calcite-flow/calcite-flow.js +1 -1
  289. package/dist/collection/components/calcite-graph/calcite-graph.css +5 -1
  290. package/dist/collection/components/calcite-handle/calcite-handle.css +5 -1
  291. package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign16.json +1 -0
  292. package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign24.json +1 -0
  293. package/dist/collection/components/calcite-icon/assets/calcite-icon/centerAlign32.json +1 -0
  294. package/dist/collection/components/calcite-icon/assets/calcite-icon/convert16.json +1 -0
  295. package/dist/collection/components/calcite-icon/assets/calcite-icon/convert24.json +1 -0
  296. package/dist/collection/components/calcite-icon/assets/calcite-icon/convert32.json +1 -0
  297. package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown16.json +1 -0
  298. package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown24.json +1 -0
  299. package/dist/collection/components/calcite-icon/assets/calcite-icon/formDropdown32.json +1 -0
  300. package/dist/collection/components/calcite-icon/assets/calcite-icon/language16.json +1 -0
  301. package/dist/collection/components/calcite-icon/assets/calcite-icon/language24.json +1 -0
  302. package/dist/collection/components/calcite-icon/assets/calcite-icon/language32.json +1 -0
  303. package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate16.json +1 -0
  304. package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate24.json +1 -0
  305. package/dist/collection/components/calcite-icon/assets/calcite-icon/languageTranslate32.json +1 -0
  306. package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign16.json +1 -0
  307. package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign24.json +1 -0
  308. package/dist/collection/components/calcite-icon/assets/calcite-icon/leftAlign32.json +1 -0
  309. package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal16.json +1 -0
  310. package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal24.json +1 -0
  311. package/dist/collection/components/calcite-icon/assets/calcite-icon/terminal32.json +1 -0
  312. package/dist/collection/components/calcite-icon/assets/calcite-icon/touch16.json +1 -0
  313. package/dist/collection/components/calcite-icon/assets/calcite-icon/touch24.json +1 -0
  314. package/dist/collection/components/calcite-icon/assets/calcite-icon/touch32.json +1 -0
  315. package/dist/collection/components/calcite-icon/calcite-icon.css +5 -1
  316. package/dist/collection/components/calcite-inline-editable/calcite-inline-editable.css +6 -2
  317. package/dist/collection/components/calcite-input/calcite-input.css +29 -117
  318. package/dist/collection/components/calcite-input/calcite-input.js +5 -8
  319. package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.css +5 -1
  320. package/dist/collection/components/calcite-input-date-picker/calcite-input-date-picker.js +44 -8
  321. package/dist/collection/components/calcite-input-message/calcite-input-message.css +9 -10
  322. package/dist/collection/components/calcite-input-message/calcite-input-message.js +2 -4
  323. package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.css +5 -1
  324. package/dist/collection/components/calcite-input-time-picker/calcite-input-time-picker.js +82 -78
  325. package/dist/collection/components/calcite-label/calcite-label.css +9 -8
  326. package/dist/collection/components/calcite-label/calcite-label.js +1 -4
  327. package/dist/collection/components/calcite-link/calcite-link.css +15 -18
  328. package/dist/collection/components/calcite-link/calcite-link.js +1 -1
  329. package/dist/collection/components/calcite-list/calcite-list.css +5 -1
  330. package/dist/collection/components/calcite-list-item/calcite-list-item.css +5 -1
  331. package/dist/collection/components/calcite-list-item-group/calcite-list-item-group.css +5 -1
  332. package/dist/collection/components/calcite-loader/calcite-loader.css +10 -11
  333. package/dist/collection/components/calcite-modal/calcite-modal.css +16 -26
  334. package/dist/collection/components/calcite-modal/calcite-modal.js +3 -6
  335. package/dist/collection/components/calcite-notice/calcite-notice.css +23 -33
  336. package/dist/collection/components/calcite-notice/calcite-notice.js +2 -4
  337. package/dist/collection/components/calcite-option/calcite-option.css +5 -1
  338. package/dist/collection/components/calcite-option/calcite-option.js +3 -1
  339. package/dist/collection/components/calcite-option-group/calcite-option-group.css +5 -1
  340. package/dist/collection/components/calcite-pagination/calcite-pagination.css +6 -2
  341. package/dist/collection/components/calcite-pagination/calcite-pagination.js +2 -4
  342. package/dist/collection/components/calcite-panel/calcite-panel.css +11 -32
  343. package/dist/collection/components/calcite-panel/calcite-panel.js +5 -10
  344. package/dist/collection/components/calcite-pick-list/calcite-pick-list.css +5 -1
  345. package/dist/collection/components/calcite-pick-list/calcite-pick-list.js +1 -1
  346. package/dist/collection/components/calcite-pick-list/shared-list-logic.js +2 -2
  347. package/dist/collection/components/calcite-pick-list/shared-list-render.js +2 -3
  348. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.css +6 -7
  349. package/dist/collection/components/calcite-pick-list-group/calcite-pick-list-group.js +2 -5
  350. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.css +6 -7
  351. package/dist/collection/components/calcite-pick-list-item/calcite-pick-list-item.js +1 -1
  352. package/dist/collection/components/calcite-popover/calcite-popover.css +6 -5
  353. package/dist/collection/components/calcite-popover/calcite-popover.js +2 -5
  354. package/dist/collection/components/calcite-popover-manager/calcite-popover-manager.css +5 -1
  355. package/dist/collection/components/calcite-progress/calcite-progress.css +5 -1
  356. package/dist/collection/components/calcite-radio-button/calcite-radio-button.css +74 -1
  357. package/dist/collection/components/calcite-radio-button/calcite-radio-button.js +4 -5
  358. package/dist/collection/components/calcite-radio-button-group/calcite-radio-button-group.css +5 -1
  359. package/dist/collection/components/calcite-radio-group/calcite-radio-group.css +5 -1
  360. package/dist/collection/components/calcite-radio-group/calcite-radio-group.js +8 -7
  361. package/dist/collection/components/calcite-radio-group-item/calcite-radio-group-item.css +7 -3
  362. package/dist/collection/components/calcite-radio-group-item/calcite-radio-group-item.js +5 -15
  363. package/dist/collection/components/calcite-rating/calcite-rating.css +8 -19
  364. package/dist/collection/components/calcite-rating/calcite-rating.js +2 -5
  365. package/dist/collection/components/calcite-scrim/calcite-scrim.css +6 -2
  366. package/dist/collection/components/calcite-select/calcite-select.css +12 -25
  367. package/dist/collection/components/calcite-select/calcite-select.js +10 -10
  368. package/dist/collection/components/calcite-shell/calcite-shell.css +6 -2
  369. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.css +8 -25
  370. package/dist/collection/components/calcite-shell-center-row/calcite-shell-center-row.js +3 -5
  371. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.css +6 -2
  372. package/dist/collection/components/calcite-shell-panel/calcite-shell-panel.js +3 -3
  373. package/dist/collection/components/calcite-slider/calcite-slider.css +148 -165
  374. package/dist/collection/components/calcite-slider/calcite-slider.js +65 -29
  375. package/dist/collection/components/calcite-sortable-list/calcite-sortable-list.css +5 -1
  376. package/dist/collection/components/calcite-split-button/calcite-split-button.css +9 -2
  377. package/dist/collection/components/calcite-split-button/calcite-split-button.js +4 -6
  378. package/dist/collection/components/calcite-stepper/calcite-stepper.css +5 -1
  379. package/dist/collection/components/calcite-stepper/calcite-stepper.js +1 -2
  380. package/dist/collection/components/calcite-stepper-item/calcite-stepper-item.css +19 -73
  381. package/dist/collection/components/calcite-stepper-item/calcite-stepper-item.js +3 -6
  382. package/dist/collection/components/calcite-switch/calcite-switch.css +9 -23
  383. package/dist/collection/components/calcite-switch/calcite-switch.js +3 -6
  384. package/dist/collection/components/calcite-tab/calcite-tab.css +5 -2
  385. package/dist/collection/components/calcite-tab-nav/calcite-tab-nav.css +5 -3
  386. package/dist/collection/components/calcite-tab-nav/calcite-tab-nav.js +3 -3
  387. package/dist/collection/components/calcite-tab-title/calcite-tab-title.css +16 -23
  388. package/dist/collection/components/calcite-tab-title/calcite-tab-title.js +7 -11
  389. package/dist/collection/components/calcite-tabs/calcite-tabs.css +5 -1
  390. package/dist/collection/components/calcite-tile/calcite-tile.css +5 -1
  391. package/dist/collection/components/calcite-tile-select/calcite-tile-select.css +7 -15
  392. package/dist/collection/components/calcite-tile-select/calcite-tile-select.js +1 -4
  393. package/dist/collection/components/calcite-tile-select-group/calcite-tile-select-group.css +5 -1
  394. package/dist/collection/components/calcite-time-picker/calcite-time-picker.css +61 -92
  395. package/dist/collection/components/calcite-time-picker/calcite-time-picker.js +261 -296
  396. package/dist/collection/components/calcite-time-picker/resources.js +15 -9
  397. package/dist/collection/components/calcite-tip/calcite-tip.css +5 -1
  398. package/dist/collection/components/calcite-tip-group/calcite-tip-group.css +5 -1
  399. package/dist/collection/components/calcite-tip-manager/calcite-tip-manager.css +8 -13
  400. package/dist/collection/components/calcite-tip-manager/calcite-tip-manager.js +2 -2
  401. package/dist/collection/components/calcite-tooltip/calcite-tooltip.css +5 -1
  402. package/dist/collection/components/calcite-tooltip-manager/calcite-tooltip-manager.css +5 -1
  403. package/dist/collection/components/calcite-tooltip-manager/calcite-tooltip-manager.js +1 -2
  404. package/dist/collection/components/calcite-tree/calcite-tree.css +5 -1
  405. package/dist/collection/components/calcite-tree-item/calcite-tree-item.css +9 -5
  406. package/dist/collection/components/calcite-tree-item/calcite-tree-item.js +1 -2
  407. package/dist/collection/components/calcite-value-list/calcite-value-list.css +5 -1
  408. package/dist/collection/components/calcite-value-list/calcite-value-list.js +1 -1
  409. package/dist/collection/components/calcite-value-list-item/calcite-value-list-item.css +5 -1
  410. package/dist/collection/components/functional/CalciteExpandToggle.js +3 -3
  411. package/dist/collection/utils/conditionalSlot.js +26 -0
  412. package/dist/collection/utils/dom.js +0 -6
  413. package/dist/collection/utils/key.js +0 -23
  414. package/dist/collection/utils/number.js +9 -1
  415. package/dist/collection/utils/time.js +144 -36
  416. package/dist/components/CalciteExpandToggle.js +3 -3
  417. package/dist/components/calcite-accordion-item.js +2 -3
  418. package/dist/components/calcite-accordion.js +2 -3
  419. package/dist/components/calcite-action-bar.js +26 -2
  420. package/dist/components/calcite-action-group2.js +1 -1
  421. package/dist/components/calcite-action-menu2.js +1 -1
  422. package/dist/components/calcite-action-pad.js +3 -8
  423. package/dist/components/calcite-action2.js +1 -1
  424. package/dist/components/calcite-alert.js +3 -5
  425. package/dist/components/calcite-avatar.js +4 -5
  426. package/dist/components/calcite-block-section.js +4 -4
  427. package/dist/components/calcite-block.js +7 -3
  428. package/dist/components/calcite-button2.js +11 -6
  429. package/dist/components/calcite-card.js +3 -6
  430. package/dist/components/calcite-checkbox2.js +1 -1
  431. package/dist/components/calcite-chip2.js +4 -5
  432. package/dist/components/calcite-color-picker-hex-input2.js +5 -7
  433. package/dist/components/calcite-color-picker-swatch2.js +5 -5
  434. package/dist/components/calcite-color-picker.js +9 -12
  435. package/dist/components/calcite-combobox-item-group.js +3 -4
  436. package/dist/components/calcite-combobox-item.js +2 -4
  437. package/dist/components/calcite-combobox.js +8 -9
  438. package/dist/components/calcite-date-picker-day2.js +2 -3
  439. package/dist/components/calcite-date-picker-month-header2.js +9 -11
  440. package/dist/components/calcite-date-picker-month2.js +7 -10
  441. package/dist/components/calcite-date-picker2.js +25 -12
  442. package/dist/components/calcite-dropdown-group.js +3 -4
  443. package/dist/components/calcite-dropdown-item.js +5 -8
  444. package/dist/components/calcite-dropdown2.js +5 -7
  445. package/dist/components/calcite-fab.js +4 -5
  446. package/dist/components/calcite-filter2.js +4 -20
  447. package/dist/components/calcite-flow.js +1 -1
  448. package/dist/components/calcite-graph2.js +1 -1
  449. package/dist/components/calcite-handle2.js +1 -1
  450. package/dist/components/calcite-icon2.js +1 -1
  451. package/dist/components/calcite-inline-editable.js +1 -1
  452. package/dist/components/calcite-input-date-picker.js +21 -9
  453. package/dist/components/calcite-input-message.js +3 -4
  454. package/dist/components/calcite-input-time-picker.js +53 -51
  455. package/dist/components/calcite-input2.js +7 -10
  456. package/dist/components/calcite-label2.js +2 -4
  457. package/dist/components/calcite-link2.js +2 -2
  458. package/dist/components/calcite-list-item-group.js +1 -1
  459. package/dist/components/calcite-list-item.js +1 -1
  460. package/dist/components/calcite-list.js +1 -1
  461. package/dist/components/calcite-loader2.js +1 -1
  462. package/dist/components/calcite-modal.js +4 -6
  463. package/dist/components/calcite-notice.js +3 -4
  464. package/dist/components/calcite-option-group.js +1 -1
  465. package/dist/components/calcite-option.js +4 -2
  466. package/dist/components/calcite-pagination.js +3 -5
  467. package/dist/components/calcite-panel.js +6 -10
  468. package/dist/components/calcite-pick-list-group.js +3 -5
  469. package/dist/components/calcite-pick-list-item2.js +1 -1
  470. package/dist/components/calcite-pick-list.js +1 -1
  471. package/dist/components/calcite-popover-manager.js +2 -2
  472. package/dist/components/calcite-popover2.js +3 -5
  473. package/dist/components/calcite-progress2.js +1 -1
  474. package/dist/components/calcite-radio-button-group.js +1 -1
  475. package/dist/components/calcite-radio-button.js +6 -13
  476. package/dist/components/calcite-radio-group-item.js +6 -14
  477. package/dist/components/calcite-radio-group.js +5 -6
  478. package/dist/components/calcite-rating.js +2 -4
  479. package/dist/components/calcite-scrim2.js +1 -1
  480. package/dist/components/calcite-select.js +6 -7
  481. package/dist/components/calcite-shell-center-row.js +4 -5
  482. package/dist/components/calcite-shell-panel.js +4 -4
  483. package/dist/components/calcite-shell.js +1 -1
  484. package/dist/components/calcite-slider.js +25 -12
  485. package/dist/components/calcite-sortable-list.js +1 -1
  486. package/dist/components/calcite-split-button.js +2 -4
  487. package/dist/components/calcite-stepper-item.js +4 -6
  488. package/dist/components/calcite-stepper.js +2 -3
  489. package/dist/components/calcite-switch2.js +4 -6
  490. package/dist/components/calcite-tab-nav2.js +4 -4
  491. package/dist/components/calcite-tab-title2.js +8 -11
  492. package/dist/components/calcite-tab2.js +1 -1
  493. package/dist/components/calcite-tabs2.js +1 -1
  494. package/dist/components/calcite-tile-select-group.js +1 -1
  495. package/dist/components/calcite-tile-select.js +2 -4
  496. package/dist/components/calcite-tile2.js +1 -1
  497. package/dist/components/calcite-time-picker2.js +327 -195
  498. package/dist/components/calcite-tip-group.js +1 -1
  499. package/dist/components/calcite-tip-manager.js +3 -3
  500. package/dist/components/calcite-tip.js +1 -1
  501. package/dist/components/calcite-tooltip-manager2.js +2 -3
  502. package/dist/components/calcite-tooltip.js +1 -1
  503. package/dist/components/calcite-tree-item.js +3 -4
  504. package/dist/components/calcite-tree.js +1 -1
  505. package/dist/components/calcite-value-list-item.js +1 -1
  506. package/dist/components/calcite-value-list.js +1 -1
  507. package/dist/components/dom.js +1 -7
  508. package/dist/components/form.js +1 -1
  509. package/dist/components/label.js +1 -1
  510. package/dist/components/number.js +14 -3
  511. package/dist/components/shared-list-render.js +5 -5
  512. package/dist/custom-elements/index.d.ts +0 -6
  513. package/dist/custom-elements/index.js +688 -620
  514. package/dist/esm/{CalciteExpandToggle-4b38a7d1.js → CalciteExpandToggle-c33bd6fd.js} +3 -3
  515. package/dist/esm/calcite-accordion_2.entry.js +5 -6
  516. package/dist/esm/calcite-action-bar.entry.js +28 -4
  517. package/dist/esm/calcite-action-group.entry.js +2 -2
  518. package/dist/esm/calcite-action-menu.entry.js +2 -2
  519. package/dist/esm/calcite-action-pad.entry.js +4 -9
  520. package/dist/esm/calcite-action.entry.js +1 -1
  521. package/dist/esm/calcite-alert.entry.js +3 -5
  522. package/dist/esm/calcite-avatar.entry.js +4 -5
  523. package/dist/esm/calcite-block_2.entry.js +11 -7
  524. package/dist/esm/calcite-button.entry.js +12 -7
  525. package/dist/esm/calcite-card.entry.js +3 -7
  526. package/dist/esm/calcite-checkbox.entry.js +4 -4
  527. package/dist/esm/calcite-chip.entry.js +4 -5
  528. package/dist/esm/calcite-color-picker_3.entry.js +17 -21
  529. package/dist/esm/calcite-combobox_3.entry.js +15 -18
  530. package/dist/esm/calcite-date-picker_4.entry.js +41 -31
  531. package/dist/esm/calcite-dropdown_3.entry.js +12 -17
  532. package/dist/esm/calcite-fab.entry.js +4 -5
  533. package/dist/esm/calcite-filter.entry.js +4 -19
  534. package/dist/esm/calcite-flow.entry.js +1 -1
  535. package/dist/esm/calcite-graph_2.entry.js +27 -15
  536. package/dist/esm/calcite-handle.entry.js +1 -1
  537. package/dist/esm/calcite-icon.entry.js +2 -2
  538. package/dist/esm/calcite-inline-editable.entry.js +3 -3
  539. package/dist/esm/calcite-input-date-picker.entry.js +25 -13
  540. package/dist/esm/calcite-input-message.entry.js +3 -4
  541. package/dist/esm/calcite-input-time-picker_2.entry.js +361 -236
  542. package/dist/esm/calcite-input.entry.js +11 -14
  543. package/dist/esm/calcite-label.entry.js +2 -5
  544. package/dist/esm/calcite-link.entry.js +3 -3
  545. package/dist/esm/calcite-list_3.entry.js +4 -4
  546. package/dist/esm/calcite-loader.entry.js +1 -1
  547. package/dist/esm/calcite-modal.entry.js +4 -6
  548. package/dist/esm/calcite-notice.entry.js +3 -4
  549. package/dist/esm/calcite-option_3.entry.js +12 -11
  550. package/dist/esm/calcite-pagination.entry.js +3 -6
  551. package/dist/esm/calcite-panel.entry.js +6 -10
  552. package/dist/esm/calcite-pick-list_3.entry.js +6 -8
  553. package/dist/esm/calcite-popover_2.entry.js +5 -7
  554. package/dist/esm/calcite-progress.entry.js +1 -1
  555. package/dist/esm/calcite-radio-button-group.entry.js +1 -1
  556. package/dist/esm/{calcite-radio_2.entry.js → calcite-radio-button.entry.js} +9 -50
  557. package/dist/esm/calcite-radio-group_2.entry.js +10 -18
  558. package/dist/esm/calcite-rating.entry.js +5 -6
  559. package/dist/esm/calcite-scrim.entry.js +1 -1
  560. package/dist/esm/calcite-shell_3.entry.js +8 -9
  561. package/dist/esm/calcite-sortable-list.entry.js +1 -1
  562. package/dist/esm/calcite-split-button.entry.js +2 -5
  563. package/dist/esm/calcite-stepper_2.entry.js +6 -8
  564. package/dist/esm/calcite-switch.entry.js +6 -8
  565. package/dist/esm/calcite-tab_4.entry.js +13 -16
  566. package/dist/esm/calcite-tile-select_2.entry.js +3 -5
  567. package/dist/esm/calcite-tile.entry.js +2 -2
  568. package/dist/esm/calcite-tip_3.entry.js +5 -5
  569. package/dist/esm/calcite-tooltip_2.entry.js +5 -6
  570. package/dist/esm/calcite-tree_2.entry.js +4 -5
  571. package/dist/esm/calcite-value-list_2.entry.js +4 -4
  572. package/dist/esm/calcite.js +2 -2
  573. package/dist/esm/{dom-dc012a45.js → dom-f24e866c.js} +1 -7
  574. package/dist/esm/{form-6b717ce8.js → form-160b0fb5.js} +1 -1
  575. package/dist/esm/{label-0d804a87.js → label-5559055d.js} +1 -1
  576. package/dist/esm/loader.js +2 -2
  577. package/dist/esm/{locale-6c1b85c7.js → locale-4c38cf6d.js} +1 -1
  578. package/dist/esm/{number-e7393766.js → number-06e8500e.js} +14 -3
  579. package/dist/esm/{popper-ed1eefa6.js → popper-f5caedc4.js} +1 -1
  580. package/dist/esm/{resources-eafda211.js → resources-35c1823f.js} +5 -5
  581. package/dist/esm/{resources-bece7a88.js → resources-b4eee1d4.js} +3 -2
  582. package/dist/esm-es5/CalciteExpandToggle-c33bd6fd.js +5 -0
  583. package/dist/esm-es5/calcite-accordion_2.entry.js +1 -1
  584. package/dist/esm-es5/calcite-action-bar.entry.js +2 -2
  585. package/dist/esm-es5/calcite-action-group.entry.js +1 -1
  586. package/dist/esm-es5/calcite-action-menu.entry.js +2 -2
  587. package/dist/esm-es5/calcite-action-pad.entry.js +1 -1
  588. package/dist/esm-es5/calcite-action.entry.js +2 -2
  589. package/dist/esm-es5/calcite-alert.entry.js +2 -2
  590. package/dist/esm-es5/calcite-avatar.entry.js +1 -1
  591. package/dist/esm-es5/calcite-block_2.entry.js +1 -1
  592. package/dist/esm-es5/calcite-button.entry.js +1 -1
  593. package/dist/esm-es5/calcite-card.entry.js +1 -1
  594. package/dist/esm-es5/calcite-checkbox.entry.js +1 -1
  595. package/dist/esm-es5/calcite-chip.entry.js +1 -1
  596. package/dist/esm-es5/calcite-color-picker_3.entry.js +1 -1
  597. package/dist/esm-es5/calcite-combobox_3.entry.js +2 -2
  598. package/dist/esm-es5/calcite-date-picker_4.entry.js +1 -1
  599. package/dist/esm-es5/calcite-dropdown_3.entry.js +2 -2
  600. package/dist/esm-es5/calcite-fab.entry.js +2 -2
  601. package/dist/esm-es5/calcite-filter.entry.js +2 -2
  602. package/dist/esm-es5/calcite-flow.entry.js +2 -2
  603. package/dist/esm-es5/calcite-graph_2.entry.js +2 -2
  604. package/dist/esm-es5/calcite-handle.entry.js +2 -2
  605. package/dist/esm-es5/calcite-icon.entry.js +2 -2
  606. package/dist/esm-es5/calcite-inline-editable.entry.js +1 -1
  607. package/dist/esm-es5/calcite-input-date-picker.entry.js +2 -2
  608. package/dist/esm-es5/calcite-input-message.entry.js +1 -1
  609. package/dist/esm-es5/calcite-input-time-picker_2.entry.js +2 -2
  610. package/dist/esm-es5/calcite-input.entry.js +2 -2
  611. package/dist/esm-es5/calcite-label.entry.js +1 -1
  612. package/dist/esm-es5/calcite-link.entry.js +2 -2
  613. package/dist/esm-es5/calcite-list_3.entry.js +2 -2
  614. package/dist/esm-es5/calcite-loader.entry.js +1 -1
  615. package/dist/esm-es5/calcite-modal.entry.js +2 -2
  616. package/dist/esm-es5/calcite-notice.entry.js +2 -2
  617. package/dist/esm-es5/calcite-option_3.entry.js +2 -2
  618. package/dist/esm-es5/calcite-pagination.entry.js +1 -1
  619. package/dist/esm-es5/calcite-panel.entry.js +1 -1
  620. package/dist/esm-es5/calcite-pick-list_3.entry.js +2 -2
  621. package/dist/esm-es5/calcite-popover_2.entry.js +2 -2
  622. package/dist/esm-es5/calcite-progress.entry.js +1 -1
  623. package/dist/esm-es5/calcite-radio-button-group.entry.js +1 -1
  624. package/dist/esm-es5/calcite-radio-button.entry.js +5 -0
  625. package/dist/esm-es5/calcite-radio-group_2.entry.js +2 -2
  626. package/dist/esm-es5/calcite-rating.entry.js +2 -2
  627. package/dist/esm-es5/calcite-scrim.entry.js +1 -1
  628. package/dist/esm-es5/calcite-shell_3.entry.js +1 -1
  629. package/dist/esm-es5/calcite-sortable-list.entry.js +1 -1
  630. package/dist/esm-es5/calcite-split-button.entry.js +1 -1
  631. package/dist/esm-es5/calcite-stepper_2.entry.js +1 -1
  632. package/dist/esm-es5/calcite-switch.entry.js +2 -2
  633. package/dist/esm-es5/calcite-tab_4.entry.js +1 -1
  634. package/dist/esm-es5/calcite-tile-select_2.entry.js +2 -2
  635. package/dist/esm-es5/calcite-tile.entry.js +1 -1
  636. package/dist/esm-es5/calcite-tip_3.entry.js +2 -2
  637. package/dist/esm-es5/calcite-tooltip_2.entry.js +2 -2
  638. package/dist/esm-es5/calcite-tree_2.entry.js +1 -1
  639. package/dist/esm-es5/calcite-value-list_2.entry.js +2 -2
  640. package/dist/esm-es5/calcite.js +1 -1
  641. package/dist/esm-es5/dom-f24e866c.js +5 -0
  642. package/dist/esm-es5/{form-6b717ce8.js → form-160b0fb5.js} +1 -1
  643. package/dist/esm-es5/{label-0d804a87.js → label-5559055d.js} +1 -1
  644. package/dist/esm-es5/loader.js +1 -1
  645. package/dist/esm-es5/{locale-6c1b85c7.js → locale-4c38cf6d.js} +1 -1
  646. package/dist/esm-es5/number-06e8500e.js +5 -0
  647. package/dist/esm-es5/{popper-ed1eefa6.js → popper-f5caedc4.js} +1 -1
  648. package/dist/esm-es5/resources-35c1823f.js +5 -0
  649. package/dist/esm-es5/{resources-bece7a88.js → resources-b4eee1d4.js} +1 -1
  650. package/dist/extras/docs-json.json +136 -256
  651. package/dist/types/components/calcite-button/resources.d.ts +2 -0
  652. package/dist/types/components/calcite-date-picker/resources.d.ts +1 -0
  653. package/dist/types/components/calcite-time-picker/resources.d.ts +14 -8
  654. package/dist/types/components.d.ts +54 -105
  655. package/dist/types/preact.d.ts +0 -2
  656. package/dist/types/utils/conditionalSlot.d.ts +17 -0
  657. package/dist/types/utils/dom.d.ts +0 -4
  658. package/dist/types/utils/key.d.ts +0 -4
  659. package/dist/types/utils/number.d.ts +2 -0
  660. package/dist/types/utils/time.d.ts +18 -5
  661. package/hydrate/index.js +713 -642
  662. package/package.json +20 -20
  663. package/readme.md +2 -2
  664. package/dist/calcite/p-04a2538a.entry.js +0 -5
  665. package/dist/calcite/p-051cc8c6.entry.js +0 -5
  666. package/dist/calcite/p-058ee7b0.entry.js +0 -5
  667. package/dist/calcite/p-0c827dec.entry.js +0 -5
  668. package/dist/calcite/p-0f33798d.system.entry.js +0 -5
  669. package/dist/calcite/p-0f9f1f89.system.entry.js +0 -5
  670. package/dist/calcite/p-1161e56f.js +0 -5
  671. package/dist/calcite/p-18fbf2af.system.entry.js +0 -5
  672. package/dist/calcite/p-198902ca.entry.js +0 -5
  673. package/dist/calcite/p-1ad123f9.entry.js +0 -5
  674. package/dist/calcite/p-1eb04aad.system.entry.js +0 -5
  675. package/dist/calcite/p-1f809e6c.system.entry.js +0 -5
  676. package/dist/calcite/p-2033f545.system.entry.js +0 -5
  677. package/dist/calcite/p-20f91a4e.system.entry.js +0 -5
  678. package/dist/calcite/p-227bc238.system.entry.js +0 -5
  679. package/dist/calcite/p-239b44dd.system.entry.js +0 -5
  680. package/dist/calcite/p-266ee9db.entry.js +0 -5
  681. package/dist/calcite/p-33802886.entry.js +0 -5
  682. package/dist/calcite/p-343cd887.entry.js +0 -5
  683. package/dist/calcite/p-3d69fba9.entry.js +0 -5
  684. package/dist/calcite/p-3ec67fae.entry.js +0 -5
  685. package/dist/calcite/p-42091a1f.system.entry.js +0 -5
  686. package/dist/calcite/p-42c7e2f0.system.entry.js +0 -5
  687. package/dist/calcite/p-43020fb5.js +0 -5
  688. package/dist/calcite/p-44a07313.system.entry.js +0 -5
  689. package/dist/calcite/p-4a8b3cf3.system.entry.js +0 -5
  690. package/dist/calcite/p-4cc182af.system.entry.js +0 -5
  691. package/dist/calcite/p-4ee2f6cf.system.entry.js +0 -5
  692. package/dist/calcite/p-50273eed.entry.js +0 -5
  693. package/dist/calcite/p-5035488d.entry.js +0 -5
  694. package/dist/calcite/p-52578054.js +0 -5
  695. package/dist/calcite/p-538e542a.system.entry.js +0 -5
  696. package/dist/calcite/p-55bfe4fc.entry.js +0 -5
  697. package/dist/calcite/p-56b352bf.system.js +0 -5
  698. package/dist/calcite/p-57e9b7cb.system.entry.js +0 -5
  699. package/dist/calcite/p-659898bf.entry.js +0 -5
  700. package/dist/calcite/p-6c5b849f.system.entry.js +0 -5
  701. package/dist/calcite/p-6ca051ef.entry.js +0 -5
  702. package/dist/calcite/p-702140ce.entry.js +0 -5
  703. package/dist/calcite/p-71e299a6.system.js +0 -5
  704. package/dist/calcite/p-72563742.js +0 -5
  705. package/dist/calcite/p-730b8963.system.entry.js +0 -5
  706. package/dist/calcite/p-7325e7fc.system.entry.js +0 -5
  707. package/dist/calcite/p-784e4e32.system.entry.js +0 -5
  708. package/dist/calcite/p-80a527ef.entry.js +0 -5
  709. package/dist/calcite/p-82c6cd9a.entry.js +0 -5
  710. package/dist/calcite/p-832affcb.system.entry.js +0 -5
  711. package/dist/calcite/p-837f9bb4.system.entry.js +0 -5
  712. package/dist/calcite/p-83fca16e.system.entry.js +0 -5
  713. package/dist/calcite/p-84d6696b.entry.js +0 -5
  714. package/dist/calcite/p-87f1831b.entry.js +0 -5
  715. package/dist/calcite/p-88b4f504.entry.js +0 -5
  716. package/dist/calcite/p-89987575.entry.js +0 -5
  717. package/dist/calcite/p-8b2d4eac.system.entry.js +0 -5
  718. package/dist/calcite/p-8b2ead09.system.entry.js +0 -5
  719. package/dist/calcite/p-8da7ad4b.entry.js +0 -5
  720. package/dist/calcite/p-8e252799.system.js +0 -5
  721. package/dist/calcite/p-8fef13ca.system.entry.js +0 -5
  722. package/dist/calcite/p-91645bf7.system.js +0 -5
  723. package/dist/calcite/p-9470d123.system.entry.js +0 -5
  724. package/dist/calcite/p-95b9a0f2.system.entry.js +0 -5
  725. package/dist/calcite/p-99de28b4.system.entry.js +0 -5
  726. package/dist/calcite/p-99e52ea7.system.entry.js +0 -5
  727. package/dist/calcite/p-9abbbcbd.system.entry.js +0 -5
  728. package/dist/calcite/p-9be50494.entry.js +0 -5
  729. package/dist/calcite/p-a821e9b3.system.entry.js +0 -5
  730. package/dist/calcite/p-a98e5444.system.entry.js +0 -5
  731. package/dist/calcite/p-ab9c6a18.entry.js +0 -5
  732. package/dist/calcite/p-abdc7a4b.system.entry.js +0 -5
  733. package/dist/calcite/p-ac38b743.system.entry.js +0 -5
  734. package/dist/calcite/p-aced5f01.entry.js +0 -5
  735. package/dist/calcite/p-b0b6baf4.system.entry.js +0 -5
  736. package/dist/calcite/p-b16b831d.entry.js +0 -5
  737. package/dist/calcite/p-b174f9ac.entry.js +0 -5
  738. package/dist/calcite/p-b2ab0485.js +0 -5
  739. package/dist/calcite/p-b37b7b9e.system.entry.js +0 -5
  740. package/dist/calcite/p-b3e418f0.entry.js +0 -5
  741. package/dist/calcite/p-b4b1081f.system.entry.js +0 -5
  742. package/dist/calcite/p-b5d21a5d.system.entry.js +0 -5
  743. package/dist/calcite/p-b5f412fb.entry.js +0 -5
  744. package/dist/calcite/p-b7518275.system.entry.js +0 -5
  745. package/dist/calcite/p-b75ffebb.system.entry.js +0 -5
  746. package/dist/calcite/p-bef1f0d9.entry.js +0 -5
  747. package/dist/calcite/p-c0690971.entry.js +0 -5
  748. package/dist/calcite/p-c12e88cd.entry.js +0 -5
  749. package/dist/calcite/p-c1794615.entry.js +0 -5
  750. package/dist/calcite/p-c3ba61ea.entry.js +0 -5
  751. package/dist/calcite/p-c937f25f.system.js +0 -5
  752. package/dist/calcite/p-c9551366.entry.js +0 -5
  753. package/dist/calcite/p-ca5c0679.entry.js +0 -5
  754. package/dist/calcite/p-cbe9f1a2.system.entry.js +0 -5
  755. package/dist/calcite/p-cd1cdf3c.entry.js +0 -5
  756. package/dist/calcite/p-d102e280.system.entry.js +0 -5
  757. package/dist/calcite/p-d830efad.entry.js +0 -5
  758. package/dist/calcite/p-dacd3cf8.entry.js +0 -5
  759. package/dist/calcite/p-dcc6b40f.entry.js +0 -5
  760. package/dist/calcite/p-dccb5ffd.entry.js +0 -5
  761. package/dist/calcite/p-dff7dc90.system.js +0 -5
  762. package/dist/calcite/p-e2d18d39.system.entry.js +0 -5
  763. package/dist/calcite/p-e5305b02.js +0 -5
  764. package/dist/calcite/p-e6a47d34.system.entry.js +0 -5
  765. package/dist/calcite/p-e78e743b.entry.js +0 -5
  766. package/dist/calcite/p-ea3fee96.entry.js +0 -5
  767. package/dist/calcite/p-eada9cef.entry.js +0 -5
  768. package/dist/calcite/p-eb0f1e0f.system.entry.js +0 -5
  769. package/dist/calcite/p-ed3f000d.system.entry.js +0 -5
  770. package/dist/calcite/p-ee40deba.system.entry.js +0 -5
  771. package/dist/calcite/p-ee45cff5.system.entry.js +0 -5
  772. package/dist/calcite/p-eeb8dfe5.system.entry.js +0 -5
  773. package/dist/calcite/p-f0338acf.system.entry.js +0 -5
  774. package/dist/calcite/p-f05b5dc9.system.entry.js +0 -5
  775. package/dist/calcite/p-f1832595.system.entry.js +0 -5
  776. package/dist/calcite/p-f2620bc3.js +0 -5
  777. package/dist/calcite/p-f333e31b.entry.js +0 -5
  778. package/dist/calcite/p-f6323ffa.system.entry.js +0 -5
  779. package/dist/calcite/p-f87ba8eb.system.js +0 -5
  780. package/dist/calcite/p-f97e1a2d.entry.js +0 -5
  781. package/dist/calcite/p-fb817417.entry.js +0 -5
  782. package/dist/calcite/p-fb8b2c96.entry.js +0 -5
  783. package/dist/calcite/p-fc32b022.entry.js +0 -5
  784. package/dist/calcite/p-fc47547f.system.entry.js +0 -5
  785. package/dist/calcite/p-fccc1605.entry.js +0 -5
  786. package/dist/calcite/p-fd1ddcd2.system.entry.js +0 -5
  787. package/dist/cjs/key-8bfb93ec.js +0 -37
  788. package/dist/collection/components/calcite-radio/calcite-radio.css +0 -162
  789. package/dist/collection/components/calcite-radio/calcite-radio.js +0 -169
  790. package/dist/components/calcite-radio.d.ts +0 -11
  791. package/dist/components/calcite-radio.js +0 -10
  792. package/dist/components/calcite-radio2.js +0 -71
  793. package/dist/components/key.js +0 -33
  794. package/dist/esm/key-69001a68.js +0 -33
  795. package/dist/esm-es5/CalciteExpandToggle-4b38a7d1.js +0 -5
  796. package/dist/esm-es5/calcite-radio_2.entry.js +0 -5
  797. package/dist/esm-es5/dom-dc012a45.js +0 -5
  798. package/dist/esm-es5/key-69001a68.js +0 -5
  799. package/dist/esm-es5/number-e7393766.js +0 -5
  800. package/dist/esm-es5/resources-eafda211.js +0 -5
  801. package/dist/types/components/calcite-accordion/calcite-accordion.d.ts +0 -42
  802. package/dist/types/components/calcite-accordion-item/calcite-accordion-item.d.ts +0 -53
  803. package/dist/types/components/calcite-action/calcite-action.d.ts +0 -73
  804. package/dist/types/components/calcite-action-bar/calcite-action-bar.d.ts +0 -68
  805. package/dist/types/components/calcite-action-group/calcite-action-group.d.ts +0 -39
  806. package/dist/types/components/calcite-action-menu/calcite-action-menu.d.ts +0 -82
  807. package/dist/types/components/calcite-action-pad/calcite-action-pad.d.ts +0 -52
  808. package/dist/types/components/calcite-alert/calcite-alert.d.ts +0 -82
  809. package/dist/types/components/calcite-avatar/calcite-avatar.d.ts +0 -26
  810. package/dist/types/components/calcite-block/calcite-block.d.ts +0 -72
  811. package/dist/types/components/calcite-block-section/calcite-block-section.d.ts +0 -43
  812. package/dist/types/components/calcite-button/calcite-button.d.ts +0 -81
  813. package/dist/types/components/calcite-card/calcite-card.d.ts +0 -43
  814. package/dist/types/components/calcite-checkbox/calcite-checkbox.d.ts +0 -73
  815. package/dist/types/components/calcite-chip/calcite-chip.d.ts +0 -37
  816. package/dist/types/components/calcite-color-picker/calcite-color-picker.d.ts +0 -224
  817. package/dist/types/components/calcite-color-picker-hex-input/calcite-color-picker-hex-input.d.ts +0 -51
  818. package/dist/types/components/calcite-color-picker-swatch/calcite-color-picker-swatch.d.ts +0 -23
  819. package/dist/types/components/calcite-combobox/calcite-combobox.d.ts +0 -177
  820. package/dist/types/components/calcite-combobox/interfaces.d.ts +0 -6
  821. package/dist/types/components/calcite-combobox/utils.d.ts +0 -6
  822. package/dist/types/components/calcite-combobox-item/calcite-combobox-item.d.ts +0 -46
  823. package/dist/types/components/calcite-combobox-item-group/calcite-combobox-item-group.d.ts +0 -17
  824. package/dist/types/components/calcite-date-picker/calcite-date-picker.d.ts +0 -126
  825. package/dist/types/components/calcite-date-picker-day/calcite-date-picker-day.d.ts +0 -45
  826. package/dist/types/components/calcite-date-picker-month/calcite-date-picker-month.d.ts +0 -97
  827. package/dist/types/components/calcite-date-picker-month-header/calcite-date-picker-month-header.d.ts +0 -55
  828. package/dist/types/components/calcite-dropdown/calcite-dropdown.d.ts +0 -98
  829. package/dist/types/components/calcite-dropdown-group/calcite-dropdown-group.d.ts +0 -32
  830. package/dist/types/components/calcite-dropdown-item/calcite-dropdown-item.d.ts +0 -52
  831. package/dist/types/components/calcite-fab/calcite-fab.d.ts +0 -47
  832. package/dist/types/components/calcite-filter/calcite-filter.d.ts +0 -62
  833. package/dist/types/components/calcite-flow/calcite-flow.d.ts +0 -22
  834. package/dist/types/components/calcite-graph/calcite-graph.d.ts +0 -29
  835. package/dist/types/components/calcite-handle/calcite-handle.d.ts +0 -22
  836. package/dist/types/components/calcite-icon/calcite-icon.d.ts +0 -32
  837. package/dist/types/components/calcite-inline-editable/calcite-inline-editable.d.ts +0 -69
  838. package/dist/types/components/calcite-input/calcite-input.d.ts +0 -166
  839. package/dist/types/components/calcite-input-date-picker/calcite-input-date-picker.d.ts +0 -164
  840. package/dist/types/components/calcite-input-message/calcite-input-message.d.ts +0 -27
  841. package/dist/types/components/calcite-input-time-picker/calcite-input-time-picker.d.ts +0 -82
  842. package/dist/types/components/calcite-label/calcite-label.d.ts +0 -30
  843. package/dist/types/components/calcite-link/calcite-link.d.ts +0 -33
  844. package/dist/types/components/calcite-list/calcite-list.d.ts +0 -16
  845. package/dist/types/components/calcite-list-item/calcite-list-item.d.ts +0 -37
  846. package/dist/types/components/calcite-list-item-group/calcite-list-item-group.d.ts +0 -18
  847. package/dist/types/components/calcite-loader/calcite-loader.d.ts +0 -27
  848. package/dist/types/components/calcite-modal/calcite-modal.d.ts +0 -88
  849. package/dist/types/components/calcite-notice/calcite-notice.d.ts +0 -51
  850. package/dist/types/components/calcite-pagination/calcite-pagination.d.ts +0 -51
  851. package/dist/types/components/calcite-panel/calcite-panel.d.ts +0 -119
  852. package/dist/types/components/calcite-pick-list/calcite-pick-list.d.ts +0 -74
  853. package/dist/types/components/calcite-pick-list/shared-list-logic.d.ts +0 -30
  854. package/dist/types/components/calcite-pick-list/shared-list-render.d.ts +0 -18
  855. package/dist/types/components/calcite-pick-list-group/calcite-pick-list-group.d.ts +0 -18
  856. package/dist/types/components/calcite-pick-list-item/calcite-pick-list-item.d.ts +0 -103
  857. package/dist/types/components/calcite-popover/calcite-popover.d.ts +0 -107
  858. package/dist/types/components/calcite-popover-manager/calcite-popover-manager.d.ts +0 -19
  859. package/dist/types/components/calcite-progress/calcite-progress.d.ts +0 -15
  860. package/dist/types/components/calcite-radio/calcite-radio.d.ts +0 -22
  861. package/dist/types/components/calcite-radio-button/calcite-radio-button.d.ts +0 -91
  862. package/dist/types/components/calcite-radio-button-group/calcite-radio-button-group.d.ts +0 -32
  863. package/dist/types/components/calcite-radio-group/calcite-radio-group.d.ts +0 -56
  864. package/dist/types/components/calcite-radio-group-item/calcite-radio-group-item.d.ts +0 -32
  865. package/dist/types/components/calcite-rating/calcite-rating.d.ts +0 -60
  866. package/dist/types/components/calcite-scrim/calcite-scrim.d.ts +0 -17
  867. package/dist/types/components/calcite-select/calcite-select.d.ts +0 -76
  868. package/dist/types/components/calcite-shell/calcite-shell.d.ts +0 -21
  869. package/dist/types/components/calcite-shell-center-row/calcite-shell-center-row.d.ts +0 -22
  870. package/dist/types/components/calcite-shell-panel/calcite-shell-panel.d.ts +0 -67
  871. package/dist/types/components/calcite-slider/calcite-slider.d.ts +0 -187
  872. package/dist/types/components/calcite-sortable-list/calcite-sortable-list.d.ts +0 -50
  873. package/dist/types/components/calcite-split-button/calcite-split-button.d.ts +0 -52
  874. package/dist/types/components/calcite-stepper/calcite-stepper.d.ts +0 -58
  875. package/dist/types/components/calcite-stepper-item/calcite-stepper-item.d.ts +0 -65
  876. package/dist/types/components/calcite-switch/calcite-switch.d.ts +0 -46
  877. package/dist/types/components/calcite-tab/calcite-tab.d.ts +0 -42
  878. package/dist/types/components/calcite-tab-nav/calcite-tab-nav.d.ts +0 -74
  879. package/dist/types/components/calcite-tab-title/calcite-tab-title.d.ts +0 -92
  880. package/dist/types/components/calcite-tabs/calcite-tabs.d.ts +0 -65
  881. package/dist/types/components/calcite-tile/calcite-tile.d.ts +0 -33
  882. package/dist/types/components/calcite-tile-select/calcite-tile-select.d.ts +0 -57
  883. package/dist/types/components/calcite-time-picker/calcite-time-picker.d.ts +0 -123
  884. package/dist/types/components/calcite-tip/calcite-tip.d.ts +0 -44
  885. package/dist/types/components/calcite-tip-manager/calcite-tip-manager.d.ts +0 -65
  886. package/dist/types/components/calcite-tooltip/calcite-tooltip.d.ts +0 -60
  887. package/dist/types/components/calcite-tooltip-manager/calcite-tooltip-manager.d.ts +0 -41
  888. package/dist/types/components/calcite-tree/calcite-tree.d.ts +0 -38
  889. package/dist/types/components/calcite-tree/interfaces.d.ts +0 -10
  890. package/dist/types/components/calcite-tree-item/calcite-tree-item.d.ts +0 -56
  891. package/dist/types/components/calcite-value-list/calcite-value-list.d.ts +0 -87
  892. package/dist/types/components/calcite-value-list-item/calcite-value-list-item.d.ts +0 -76
  893. package/dist/types/components/functional/CalciteExpandToggle.d.ts +0 -19
  894. package/dist/types/utils/label.d.ts +0 -35
@@ -4,13 +4,78 @@
4
4
  */
5
5
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-9de00868.js';
6
6
  import { g as guid } from './guid-196bd5ea.js';
7
- import { g as getKey, n as numberKeys, i as isActivationKey } from './key-69001a68.js';
8
- import { i as isValidNumber } from './number-e7393766.js';
9
- import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-0d804a87.js';
10
- import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-6b717ce8.js';
11
- import './dom-dc012a45.js';
7
+ import { i as isValidNumber, n as numberKeys, b as isActivationKey } from './number-06e8500e.js';
8
+ import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label-5559055d.js';
9
+ import { c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form-160b0fb5.js';
10
+ import './dom-f24e866c.js';
12
11
 
13
12
  const maxTenthForMinuteAndSecond = 5;
13
+ function createLocaleDateTimeFormatter(locale, includeSeconds = true) {
14
+ try {
15
+ const options = {
16
+ hour: "2-digit",
17
+ minute: "2-digit",
18
+ timeZone: "UTC"
19
+ };
20
+ if (includeSeconds) {
21
+ options.second = "2-digit";
22
+ }
23
+ return new Intl.DateTimeFormat(locale, options);
24
+ }
25
+ catch (e) {
26
+ throw new Error(`Invalid locale supplied while attempting to create a DateTime formatter: ${locale}`);
27
+ }
28
+ }
29
+ function formatTimePart(number) {
30
+ const numberAsString = number.toString();
31
+ return number >= 0 && number <= 9 ? numberAsString.padStart(2, "0") : numberAsString;
32
+ }
33
+ function formatTimeString(value) {
34
+ if (!isValidTime(value)) {
35
+ return null;
36
+ }
37
+ const [hourString, minuteString, secondString] = value.split(":");
38
+ const hour = formatTimePart(parseInt(hourString));
39
+ const minute = formatTimePart(parseInt(minuteString));
40
+ if (secondString) {
41
+ const second = formatTimePart(parseInt(secondString));
42
+ return `${hour}:${minute}:${second}`;
43
+ }
44
+ return `${hour}:${minute}`;
45
+ }
46
+ function getLocaleHourCycle(locale) {
47
+ const formatter = createLocaleDateTimeFormatter(locale);
48
+ const parts = formatter.formatToParts(new Date(Date.UTC(0, 0, 0, 0, 0, 0)));
49
+ return getLocalizedTimePart("meridiem", parts) ? "12" : "24";
50
+ }
51
+ function getLocalizedTimePart(part, parts) {
52
+ var _a, _b, _c, _d;
53
+ if (!part || !parts) {
54
+ return null;
55
+ }
56
+ if (part === "hourSuffix") {
57
+ const hourIndex = parts.indexOf(parts.find(({ type }) => type === "hour"));
58
+ const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
59
+ const hourSuffix = parts[hourIndex + 1];
60
+ return hourSuffix && hourSuffix.type === "literal" && minuteIndex - hourIndex === 2
61
+ ? ((_a = hourSuffix.value) === null || _a === void 0 ? void 0 : _a.trim()) || null
62
+ : null;
63
+ }
64
+ if (part === "minuteSuffix") {
65
+ const minuteIndex = parts.indexOf(parts.find(({ type }) => type === "minute"));
66
+ const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
67
+ const minuteSuffix = parts[minuteIndex + 1];
68
+ return minuteSuffix && minuteSuffix.type === "literal" && secondIndex - minuteIndex === 2
69
+ ? ((_b = minuteSuffix.value) === null || _b === void 0 ? void 0 : _b.trim()) || null
70
+ : null;
71
+ }
72
+ if (part === "secondSuffix") {
73
+ const secondIndex = parts.indexOf(parts.find(({ type }) => type === "second"));
74
+ const secondSuffix = parts[secondIndex + 1];
75
+ return secondSuffix && secondSuffix.type === "literal" ? ((_c = secondSuffix.value) === null || _c === void 0 ? void 0 : _c.trim()) || null : null;
76
+ }
77
+ return ((_d = parts.find(({ type }) => (part == "meridiem" ? type === "dayPeriod" : type === part))) === null || _d === void 0 ? void 0 : _d.value) || null;
78
+ }
14
79
  function getMeridiem(hour) {
15
80
  if (!isValidNumber(hour)) {
16
81
  return null;
@@ -18,54 +83,96 @@ function getMeridiem(hour) {
18
83
  const hourAsNumber = parseInt(hour);
19
84
  return hourAsNumber >= 0 && hourAsNumber <= 11 ? "AM" : "PM";
20
85
  }
21
- function getMeridiemHour(hour) {
22
- if (!isValidNumber(hour)) {
23
- return null;
86
+ function isValidTime(value) {
87
+ if (!value || value.startsWith(":") || value.endsWith(":")) {
88
+ return false;
24
89
  }
25
- const hourAsNumber = parseInt(hour);
26
- if (hourAsNumber === 0) {
27
- return "12";
90
+ const splitValue = value.split(":");
91
+ const validLength = splitValue.length > 1 && splitValue.length < 4;
92
+ if (!validLength) {
93
+ return false;
94
+ }
95
+ const [hour, minute, second] = splitValue;
96
+ const hourAsNumber = parseInt(splitValue[0]);
97
+ const minuteAsNumber = parseInt(splitValue[1]);
98
+ const secondAsNumber = parseInt(splitValue[2]);
99
+ const hourValid = isValidNumber(hour) && hourAsNumber >= 0 && hourAsNumber < 24;
100
+ const minuteValid = isValidNumber(minute) && minuteAsNumber >= 0 && minuteAsNumber < 60;
101
+ const secondValid = isValidNumber(second) && secondAsNumber >= 0 && secondAsNumber < 60;
102
+ if ((hourValid && minuteValid && !second) || (hourValid && minuteValid && secondValid)) {
103
+ return true;
28
104
  }
29
- return hourAsNumber > 12 ? formatTimePart(hourAsNumber - 12) : hour;
30
105
  }
31
- function parseTimeString(value) {
32
- const timeString = formatTimeString(value);
33
- const [hour, minute, second] = timeString ? timeString.split(":") : [null, null, null];
34
- return {
35
- hour,
36
- minute,
37
- second: second || (hour && minute ? "00" : null)
38
- };
106
+ function isValidTimePart(value, part) {
107
+ if (part === "meridiem") {
108
+ return value === "AM" || value === "PM";
109
+ }
110
+ if (!isValidNumber(value)) {
111
+ return false;
112
+ }
113
+ const valueAsNumber = Number(value);
114
+ return part === "hour" ? valueAsNumber >= 0 && valueAsNumber < 24 : valueAsNumber >= 0 && valueAsNumber < 60;
39
115
  }
40
- function formatTimeString(value) {
41
- if (!value || value.endsWith(":") || value.startsWith(":")) {
116
+ function localizeTimePart(value, part, locale) {
117
+ if (!isValidTimePart(value, part)) {
118
+ return;
119
+ }
120
+ const valueAsNumber = parseInt(value);
121
+ const date = new Date(Date.UTC(0, 0, 0, part === "hour" ? valueAsNumber : part === "meridiem" ? (value === "AM" ? 0 : 12) : 0, part === "minute" ? valueAsNumber : 0, part === "second" ? valueAsNumber : 0));
122
+ if (!date) {
123
+ return;
124
+ }
125
+ const formatter = createLocaleDateTimeFormatter(locale);
126
+ const parts = formatter.formatToParts(date);
127
+ return getLocalizedTimePart(part, parts);
128
+ }
129
+ function localizeTimeString(value, locale = "en", includeSeconds = true) {
130
+ if (!isValidTime(value)) {
42
131
  return null;
43
132
  }
44
- const splitValue = value.split(":");
45
- if (splitValue.length > 1) {
46
- const [hour, minute, second] = splitValue;
47
- const hourAsNumber = parseInt(splitValue[0]);
48
- const minuteAsNumber = parseInt(splitValue[1]);
49
- const secondAsNumber = parseInt(splitValue[2]);
50
- const hourValid = isValidNumber(hour) && hourAsNumber >= 0 && hourAsNumber < 24;
51
- const minuteValid = isValidNumber(minute) && minuteAsNumber >= 0 && minuteAsNumber < 60;
52
- const secondValid = isValidNumber(second) && secondAsNumber >= 0 && secondAsNumber < 60;
53
- if ((hourValid && minuteValid && !second) || (hourValid && minuteValid && secondValid)) {
54
- let newValue = `${formatTimePart(hourAsNumber)}:${formatTimePart(minuteAsNumber)}`;
55
- if (secondValid) {
56
- newValue = `${newValue}:${formatTimePart(secondAsNumber)}`;
57
- }
58
- return newValue;
59
- }
133
+ const { hour, minute, second = "0" } = parseTimeString(value);
134
+ const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
135
+ const formatter = createLocaleDateTimeFormatter(locale, includeSeconds);
136
+ return (formatter === null || formatter === void 0 ? void 0 : formatter.format(dateFromTimeString)) || null;
137
+ }
138
+ function localizeTimeStringToParts(value, locale = "en") {
139
+ if (!isValidTime(value)) {
140
+ return null;
141
+ }
142
+ const { hour, minute, second = "0" } = parseTimeString(value);
143
+ const dateFromTimeString = new Date(Date.UTC(0, 0, 0, parseInt(hour), parseInt(minute), parseInt(second)));
144
+ if (dateFromTimeString) {
145
+ const formatter = createLocaleDateTimeFormatter(locale);
146
+ const parts = formatter.formatToParts(dateFromTimeString);
147
+ return {
148
+ localizedHour: getLocalizedTimePart("hour", parts),
149
+ localizedHourSuffix: getLocalizedTimePart("hourSuffix", parts),
150
+ localizedMinute: getLocalizedTimePart("minute", parts),
151
+ localizedMinuteSuffix: getLocalizedTimePart("minuteSuffix", parts),
152
+ localizedSecond: getLocalizedTimePart("second", parts),
153
+ localizedSecondSuffix: getLocalizedTimePart("secondSuffix", parts),
154
+ localizedMeridiem: getLocalizedTimePart("meridiem", parts)
155
+ };
60
156
  }
61
157
  return null;
62
158
  }
63
- function formatTimePart(number) {
64
- const numberAsString = number.toString();
65
- return number >= 0 && number <= 9 ? numberAsString.padStart(2, "0") : numberAsString;
159
+ function parseTimeString(value) {
160
+ if (isValidTime(value)) {
161
+ const [hour, minute, second] = value.split(":");
162
+ return {
163
+ hour,
164
+ minute,
165
+ second
166
+ };
167
+ }
168
+ return {
169
+ hour: null,
170
+ minute: null,
171
+ second: null
172
+ };
66
173
  }
67
174
 
68
- const calciteInputTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
175
+ const calciteInputTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}::slotted(input[slot=hidden-form-input]){bottom:0 !important;left:0 !important;margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;right:0 !important;top:0 !important;-webkit-transform:none !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
69
176
 
70
177
  let CalciteInputTimePicker = class {
71
178
  constructor(hostRef) {
@@ -80,8 +187,11 @@ let CalciteInputTimePicker = class {
80
187
  this.active = false;
81
188
  /** The disabled state of the time input */
82
189
  this.disabled = false;
83
- /** Format of the hour value (12-hour or 24-hour) (this will be replaced by locale eventually) */
84
- this.hourDisplayFormat = "12";
190
+ /**
191
+ * BCP 47 language tag for desired language and country format
192
+ * @internal
193
+ */
194
+ this.locale = document.documentElement.lang || navigator.language || "en";
85
195
  /**
86
196
  * When true, makes the component required for form-submission.
87
197
  *
@@ -105,56 +215,60 @@ let CalciteInputTimePicker = class {
105
215
  //--------------------------------------------------------------------------
106
216
  this.calciteInputBlurHandler = () => {
107
217
  this.active = false;
108
- const newValue = formatTimeString(this.calciteInputEl.value) || formatTimeString(this.value);
109
- if (newValue !== this.calciteInputEl.value) {
110
- this.setInputValue(newValue);
111
- }
218
+ const shouldIncludeSeconds = this.shouldIncludeSeconds();
219
+ const localizedInputValue = localizeTimeString(this.calciteInputEl.value, this.locale, shouldIncludeSeconds);
220
+ this.setInputValue(localizedInputValue || localizeTimeString(this.value, this.locale, shouldIncludeSeconds));
112
221
  };
113
222
  this.calciteInputFocusHandler = () => {
114
223
  this.active = true;
115
224
  };
116
225
  this.calciteInputInputHandler = (event) => {
117
- this.setValue({ value: event.detail.value });
226
+ const target = event.target;
227
+ this.setValue({ value: target.value });
228
+ };
229
+ this.timePickerChangeHandler = (event) => {
230
+ event.stopPropagation();
231
+ const target = event.target;
232
+ const value = target.value;
233
+ this.setValue({ value, origin: "time-picker" });
118
234
  };
119
235
  this.setCalciteInputEl = (el) => {
120
236
  this.calciteInputEl = el;
121
237
  };
238
+ this.setCalciteTimePickerEl = (el) => {
239
+ this.calciteTimePickerEl = el;
240
+ };
122
241
  this.setInputValue = (newInputValue) => {
123
242
  if (!this.calciteInputEl) {
124
243
  return;
125
244
  }
126
- if (this.hourDisplayFormat === "12") {
127
- const { hour, minute, second } = parseTimeString(newInputValue);
128
- this.calciteInputEl.value = newInputValue
129
- ? `${getMeridiemHour(hour)}:${minute}${this.step !== 60 ? ":" + second : ""} ${getMeridiem(hour)}`
130
- : null;
131
- }
132
- else {
133
- this.calciteInputEl.value = newInputValue;
134
- }
245
+ this.calciteInputEl.value = newInputValue;
135
246
  };
136
247
  this.setValue = ({ value, origin = "input" }) => {
137
248
  const previousValue = this.value;
138
- const validatedNewValue = formatTimeString(value);
249
+ const newValue = formatTimeString(value);
250
+ const newLocalizedValue = localizeTimeString(newValue, this.locale, this.shouldIncludeSeconds());
139
251
  this.internalValueChange = origin !== "external" && origin !== "loading";
140
252
  const shouldEmit = origin !== "loading" &&
141
253
  origin !== "external" &&
142
254
  ((value !== this.previousValidValue && !value) ||
143
- !!(!this.previousValidValue && validatedNewValue) ||
144
- (validatedNewValue !== this.previousValidValue && validatedNewValue));
255
+ !!(!this.previousValidValue && newValue) ||
256
+ (newValue !== this.previousValidValue && newValue));
145
257
  if (value) {
146
258
  if (shouldEmit) {
147
- this.previousValidValue = validatedNewValue;
259
+ this.previousValidValue = newValue;
148
260
  }
149
- if (validatedNewValue && validatedNewValue !== this.value) {
150
- this.value = validatedNewValue;
261
+ if (newValue && newValue !== this.value) {
262
+ this.value = newValue;
151
263
  }
264
+ this.localizedValue = newLocalizedValue;
152
265
  }
153
266
  else {
154
267
  this.value = value;
268
+ this.localizedValue = null;
155
269
  }
156
270
  if (origin === "time-picker" || origin === "external") {
157
- this.setInputValue(validatedNewValue);
271
+ this.setInputValue(newLocalizedValue);
158
272
  }
159
273
  if (shouldEmit) {
160
274
  const changeEvent = this.calciteInputTimePickerChange.emit();
@@ -165,19 +279,28 @@ let CalciteInputTimePicker = class {
165
279
  this.previousValidValue = previousValue;
166
280
  }
167
281
  else {
168
- this.previousValidValue = validatedNewValue;
282
+ this.previousValidValue = newValue;
169
283
  }
170
284
  }
171
285
  };
172
286
  }
287
+ localeWatcher(newLocale) {
288
+ this.setInputValue(localizeTimeString(this.value, newLocale, this.shouldIncludeSeconds()));
289
+ }
173
290
  valueWatcher(newValue) {
174
291
  if (!this.internalValueChange) {
175
292
  this.setValue({ value: newValue, origin: "external" });
176
293
  }
177
294
  this.internalValueChange = false;
178
295
  }
296
+ clickHandler(event) {
297
+ if (event.composedPath().includes(this.calciteTimePickerEl)) {
298
+ return;
299
+ }
300
+ this.setFocus();
301
+ }
179
302
  keyUpHandler(event) {
180
- if (getKey(event.key) === "Escape" && this.active) {
303
+ if (event.key === "Escape" && this.active) {
181
304
  this.active = false;
182
305
  }
183
306
  }
@@ -186,21 +309,6 @@ let CalciteInputTimePicker = class {
186
309
  event.stopPropagation();
187
310
  this.active = false;
188
311
  }
189
- timePickerChangeHandler(event) {
190
- event.preventDefault();
191
- event.stopPropagation();
192
- if (event.detail) {
193
- const { hour, minute, second } = event.detail;
194
- let value;
195
- if (hour && minute) {
196
- value = second && this.step !== 60 ? `${hour}:${minute}:${second}` : `${hour}:${minute}`;
197
- }
198
- else {
199
- value = "";
200
- }
201
- this.setValue({ value, origin: "time-picker" });
202
- }
203
- }
204
312
  timePickerFocusHandler(event) {
205
313
  event.preventDefault();
206
314
  event.stopPropagation();
@@ -223,6 +331,9 @@ let CalciteInputTimePicker = class {
223
331
  onLabelClick() {
224
332
  this.setFocus();
225
333
  }
334
+ shouldIncludeSeconds() {
335
+ return this.step < 60;
336
+ }
226
337
  //--------------------------------------------------------------------------
227
338
  //
228
339
  // Lifecycle
@@ -230,15 +341,13 @@ let CalciteInputTimePicker = class {
230
341
  //--------------------------------------------------------------------------
231
342
  connectedCallback() {
232
343
  if (this.value) {
233
- this.setValue({ value: this.value, origin: "loading" });
344
+ this.setValue({ value: isValidTime(this.value) ? this.value : undefined, origin: "loading" });
234
345
  }
235
346
  connectLabel(this);
236
347
  connectForm(this);
237
348
  }
238
349
  componentDidLoad() {
239
- if (this.calciteInputEl.value !== this.value) {
240
- this.setInputValue(this.value);
241
- }
350
+ this.setInputValue(this.localizedValue);
242
351
  }
243
352
  disconnectedCallback() {
244
353
  disconnectLabel(this);
@@ -250,38 +359,44 @@ let CalciteInputTimePicker = class {
250
359
  //
251
360
  // --------------------------------------------------------------------------
252
361
  render() {
253
- const { hour, minute, second } = parseTimeString(this.value);
254
362
  const popoverId = `${this.referenceElementId}-popover`;
255
- return (h(Host, null, h("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, h("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active || false, referenceElement: this.referenceElementId }, h("calcite-time-picker", { hour: hour, "hour-display-format": this.hourDisplayFormat, intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, minute: minute, scale: this.scale, second: second, step: this.step })), h(HiddenFormInputSlot, { component: this })));
363
+ return (h(Host, null, h("div", { "aria-controls": popoverId, "aria-haspopup": "dialog", "aria-label": this.name, "aria-owns": popoverId, id: this.referenceElementId, role: "combobox" }, h("calcite-input", { disabled: this.disabled, icon: "clock", label: getLabelText(this), onCalciteInputBlur: this.calciteInputBlurHandler, onCalciteInputFocus: this.calciteInputFocusHandler, onCalciteInputInput: this.calciteInputInputHandler, ref: this.setCalciteInputEl, scale: this.scale, step: this.step })), h("calcite-popover", { id: popoverId, label: "Time Picker", open: this.active || false, referenceElement: this.referenceElementId }, h("calcite-time-picker", { intlHour: this.intlHour, intlHourDown: this.intlHourDown, intlHourUp: this.intlHourUp, intlMeridiem: this.intlMeridiem, intlMeridiemDown: this.intlMeridiemDown, intlMeridiemUp: this.intlMeridiemUp, intlMinute: this.intlMinute, intlMinuteDown: this.intlMinuteDown, intlMinuteUp: this.intlMinuteUp, intlSecond: this.intlSecond, intlSecondDown: this.intlSecondDown, intlSecondUp: this.intlSecondUp, lang: this.locale, onCalciteTimePickerChange: this.timePickerChangeHandler, ref: this.setCalciteTimePickerEl, scale: this.scale, step: this.step, value: this.value })), h(HiddenFormInputSlot, { component: this })));
256
364
  }
257
365
  get el() { return getElement(this); }
258
366
  static get watchers() { return {
367
+ "locale": ["localeWatcher"],
259
368
  "value": ["valueWatcher"]
260
369
  }; }
261
370
  };
262
371
  CalciteInputTimePicker.style = calciteInputTimePickerCss;
263
372
 
264
373
  const CSS = {
374
+ button: "button",
265
375
  buttonBottomLeft: "button--bottom-left",
266
376
  buttonBottomRight: "button--bottom-right",
267
- button: "button",
268
- delimiter: "delimiter",
269
- hour: "hour",
270
377
  buttonHourDown: "button--hour-down",
271
378
  buttonHourUp: "button--hour-up",
272
- input: "input",
273
- meridiem: "meridiem",
274
379
  buttonMeridiemDown: "button--meridiem-down",
275
380
  buttonMeridiemUp: "button--meridiem-up",
276
- minute: "minute",
277
381
  buttonMinuteDown: "button--minute-down",
278
382
  buttonMinuteUp: "button--minute-up",
279
- second: "second",
280
383
  buttonSecondDown: "button--second-down",
281
384
  buttonSecondUp: "button--second-up",
282
- timePicker: "time-picker",
283
385
  buttonTopLeft: "button--top-left",
284
- buttonTopRight: "button--top-right"
386
+ buttonTopRight: "button--top-right",
387
+ column: "column",
388
+ delimiter: "delimiter",
389
+ hour: "hour",
390
+ input: "input",
391
+ meridiem: "meridiem",
392
+ minute: "minute",
393
+ second: "second",
394
+ showMeridiem: "show-meridiem",
395
+ showSecond: "show-second",
396
+ "scale-s": "scale-s",
397
+ "scale-m": "scale-m",
398
+ "scale-l": "scale-l",
399
+ timePicker: "time-picker"
285
400
  };
286
401
  const TEXT = {
287
402
  hour: "Hour",
@@ -298,8 +413,11 @@ const TEXT = {
298
413
  secondUp: "Increase second"
299
414
  };
300
415
 
301
- const calciteTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:300ms}.calcite-animate{opacity:0;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{color:var(--calcite-ui-text-1);display:inline-block;font-weight:var(--calcite-font-weight-medium);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.time-picker{-webkit-box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;border-radius:var(--calcite-border-radius)}span{-ms-flex-align:center;align-items:center;background-color:var(--calcite-ui-foreground-1);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center}span.button{cursor:pointer}span.button:hover,span.button:focus{background-color:var(--calcite-ui-foreground-2)}span.button:focus{outline:2px solid transparent;outline-offset:2px}span.button:active{background-color:var(--calcite-ui-foreground-3)}span.button.top-left{border-top-left-radius:var(--calcite-border-radius)}span.button.bottom-left{border-bottom-left-radius:var(--calcite-border-radius)}span.button.top-right{border-top-right-radius:var(--calcite-border-radius)}span.button.bottom-right{border-bottom-right-radius:var(--calcite-border-radius)}span.button calcite-icon{color:var(--calcite-ui-text-3)}span.input{font-weight:var(--calcite-font-weight-medium);position:relative}span.input:hover{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2);box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2)}span.input:focus,span.input:hover:focus{outline:2px solid transparent;outline-offset:2px;-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}:host([scale=s]){font-size:var(--calcite-font-size--1)}:host([scale=s]) span{height:24px;width:40px}:host([scale=s]) .delimiter{height:72px}:host([scale=s][hour-display-format=\"12\"]) .time-picker{width:124.2px}:host([scale=s][hour-display-format=\"12\"]:not([step=\"60\"])) .time-picker{width:168px}:host([scale=s][hour-display-format=\"24\"]) .time-picker{width:84.2px}:host([scale=s][hour-display-format=\"24\"]:not([step=\"60\"])) .time-picker{width:128.4px}:host([scale=m]){font-size:var(--calcite-font-size-0)}:host([scale=m]) span{height:32px;width:44px}:host([scale=m]) .delimiter{height:96px}:host([scale=m][hour-display-format=\"12\"]) .time-picker{width:136.8px}:host([scale=m][hour-display-format=\"12\"]:not([step=\"60\"])) .time-picker{width:186px}:host([scale=m][hour-display-format=\"24\"]) .time-picker{width:92.8px}:host([scale=m][hour-display-format=\"24\"]:not([step=\"60\"])) .time-picker{width:141.6px}:host([scale=l]){font-size:var(--calcite-font-size-1)}:host([scale=l]) span{height:48px;width:64px}:host([scale=l]) .delimiter{height:144px}:host([scale=l][hour-display-format=\"12\"]) .time-picker{width:198px}:host([scale=l][hour-display-format=\"12\"]:not([step=\"60\"])) .time-picker{width:268px}:host([scale=l][hour-display-format=\"24\"]) .time-picker{width:134px}:host([scale=l][hour-display-format=\"24\"]:not([step=\"60\"])) .time-picker{width:204px}";
416
+ const calciteTimePickerCss = "@-webkit-keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in{0%{opacity:0}100%{opacity:1}}@-webkit-keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-down{0%{opacity:0;-webkit-transform:translate3D(0, -5px, 0);transform:translate3D(0, -5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;-webkit-transform:translate3D(0, 5px, 0);transform:translate3D(0, 5px, 0)}100%{opacity:1;-webkit-transform:translate3D(0, 0, 0);transform:translate3D(0, 0, 0)}}@-webkit-keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}}@keyframes in-scale{0%{opacity:0;-webkit-transform:scale3D(0.95, 0.95, 1);transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;-webkit-transform:scale3D(1, 1, 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;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:var(--calcite-animation-timing);animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{-webkit-animation-name:in;animation-name:in}.calcite-animate__in-down{-webkit-animation-name:in-down;animation-name:in-down}.calcite-animate__in-up{-webkit-animation-name:in-up;animation-name:in-up}.calcite-animate__in-scale{-webkit-animation-name:in-scale;animation-name:in-scale}:root{--calcite-popper-transition:150ms ease-in-out}:host([hidden]){display:none}:host{display:inline-block}.time-picker{background-color:var(--calcite-ui-foreground-1);display:-ms-flexbox;display:flex;font-weight:var(--calcite-font-weight-medium);-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);box-shadow:0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);color:var(--calcite-ui-text-1);border-radius:var(--calcite-border-radius)}.time-picker .column{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.time-picker .button{background-color:var(--calcite-ui-foreground-1);cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.time-picker .button:hover,.time-picker .button:focus{background-color:var(--calcite-ui-foreground-2);outline:2px solid transparent;outline-offset:2px}.time-picker .button:active{background-color:var(--calcite-ui-foreground-3)}.time-picker .button.top-left{border-top-left-radius:var(--calcite-border-radius)}.time-picker .button.bottom-left{border-bottom-left-radius:var(--calcite-border-radius)}.time-picker .button.top-right{border-top-right-radius:var(--calcite-border-radius)}.time-picker .button.bottom-right{border-bottom-right-radius:var(--calcite-border-radius)}.time-picker .button calcite-icon{color:var(--calcite-ui-text-3)}.time-picker .input{background-color:var(--calcite-ui-foreground-1);cursor:pointer;font-weight:var(--calcite-font-weight-medium);display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.time-picker .input:hover{-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2);box-shadow:inset 0 0 0 2px var(--calcite-ui-foreground-2)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;-webkit-box-shadow:inset 0 0 0 2px var(--calcite-ui-brand);box-shadow:inset 0 0 0 2px var(--calcite-ui-brand)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-left:0.75rem;padding-right:0.75rem;padding-top:0.25rem;padding-bottom:0.25rem}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:0.75rem;padding-inline-end:0.75rem}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-left:1rem;padding-right:1rem;padding-top:0.5rem;padding-bottom:0.5rem}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:1rem;padding-inline-end:1rem}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-left:1.25rem;padding-right:1.25rem;padding-top:0.75rem;padding-bottom:0.75rem}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{-webkit-padding-end:1.25rem;padding-inline-end:1.25rem}";
302
417
 
418
+ function capitalize(str) {
419
+ return str.charAt(0).toUpperCase() + str.slice(1);
420
+ }
303
421
  let CalciteTimePicker = class {
304
422
  constructor(hostRef) {
305
423
  registerInstance(this, hostRef);
@@ -311,10 +429,6 @@ let CalciteTimePicker = class {
311
429
  // Properties
312
430
  //
313
431
  //--------------------------------------------------------------------------
314
- /** The hour value (24-hour format) */
315
- this.hour = null;
316
- /** Format of the hour value (12-hour or 24-hour) (this will be replaced by locale eventually) */
317
- this.hourDisplayFormat = "12";
318
432
  /** aria-label for the hour input
319
433
  * @default "Hour"
320
434
  */
@@ -363,35 +477,25 @@ let CalciteTimePicker = class {
363
477
  * @default "Increase second"
364
478
  */
365
479
  this.intlSecondUp = TEXT.secondUp;
366
- /** The minute value */
367
- this.minute = null;
368
- /** The second value */
369
- this.second = null;
480
+ /**
481
+ * BCP 47 language tag for desired language and country format
482
+ * @internal
483
+ */
484
+ this.locale = document.documentElement.lang || navigator.language || "en";
370
485
  /** The scale (size) of the time picker */
371
486
  this.scale = "m";
372
487
  /** number that specifies the granularity that the value must adhere to */
373
488
  this.step = 60;
374
- this.timeChanged = false;
375
- // --------------------------------------------------------------------------
376
- //
377
- // State
378
- //
379
- // --------------------------------------------------------------------------
380
- /** The am/pm value */
381
- this.meridiem = null;
382
- this.displayHour = this.getDisplayHour();
383
- // --------------------------------------------------------------------------
384
- //
385
- // Private Methods
386
- //
387
- // --------------------------------------------------------------------------
489
+ /** The selected time in UTC */
490
+ this.value = null;
491
+ this.showSecond = this.step < 60;
388
492
  this.decrementHour = () => {
389
493
  const newHour = !this.hour ? 0 : this.hour === "00" ? 23 : parseInt(this.hour) - 1;
390
- this.setTime("hour", newHour);
494
+ this.setValuePart("hour", newHour);
391
495
  };
392
496
  this.decrementMeridiem = () => {
393
497
  const newMeridiem = this.meridiem === "PM" ? "AM" : "PM";
394
- this.setTime("meridiem", newMeridiem);
498
+ this.setValuePart("meridiem", newMeridiem);
395
499
  };
396
500
  this.decrementMinuteOrSecond = (key) => {
397
501
  let newValue;
@@ -402,7 +506,7 @@ let CalciteTimePicker = class {
402
506
  else {
403
507
  newValue = 59;
404
508
  }
405
- this.setTime(key, newValue);
509
+ this.setValuePart(key, newValue);
406
510
  };
407
511
  this.decrementMinute = () => {
408
512
  this.decrementMinuteOrSecond("minute");
@@ -419,12 +523,12 @@ let CalciteTimePicker = class {
419
523
  }
420
524
  };
421
525
  this.hourKeyDownHandler = (event) => {
422
- const key = getKey(event.key);
526
+ const key = event.key;
423
527
  if (numberKeys.includes(key)) {
424
528
  const keyAsNumber = parseInt(key);
425
529
  let newHour;
426
530
  if (isValidNumber(this.hour)) {
427
- switch (this.hourDisplayFormat) {
531
+ switch (this.hourCycle) {
428
532
  case "12":
429
533
  newHour =
430
534
  this.hour === "01" && keyAsNumber >= 0 && keyAsNumber <= 2
@@ -447,13 +551,13 @@ let CalciteTimePicker = class {
447
551
  else {
448
552
  newHour = keyAsNumber;
449
553
  }
450
- this.setTime("hour", newHour);
554
+ this.setValuePart("hour", newHour);
451
555
  }
452
556
  else {
453
557
  switch (key) {
454
558
  case "Backspace":
455
559
  case "Delete":
456
- this.setTime("hour", null);
560
+ this.setValuePart("hour", null);
457
561
  break;
458
562
  case "ArrowDown":
459
563
  event.preventDefault();
@@ -477,7 +581,7 @@ let CalciteTimePicker = class {
477
581
  };
478
582
  this.incrementMeridiem = () => {
479
583
  const newMeridiem = this.meridiem === "AM" ? "PM" : "AM";
480
- this.setTime("meridiem", newMeridiem);
584
+ this.setValuePart("meridiem", newMeridiem);
481
585
  };
482
586
  this.incrementHour = () => {
483
587
  const newHour = isValidNumber(this.hour)
@@ -485,7 +589,7 @@ let CalciteTimePicker = class {
485
589
  ? 0
486
590
  : parseInt(this.hour) + 1
487
591
  : 1;
488
- this.setTime("hour", newHour);
592
+ this.setValuePart("hour", newHour);
489
593
  };
490
594
  this.incrementMinuteOrSecond = (key) => {
491
595
  const newValue = isValidNumber(this[key])
@@ -493,7 +597,7 @@ let CalciteTimePicker = class {
493
597
  ? 0
494
598
  : parseInt(this[key]) + 1
495
599
  : 0;
496
- this.setTime(key, newValue);
600
+ this.setValuePart(key, newValue);
497
601
  };
498
602
  this.incrementMinute = () => {
499
603
  this.incrementMinuteOrSecond("minute");
@@ -507,16 +611,16 @@ let CalciteTimePicker = class {
507
611
  }
508
612
  };
509
613
  this.meridiemKeyDownHandler = (event) => {
510
- switch (getKey(event.key)) {
614
+ switch (event.key) {
511
615
  case "a":
512
- this.setTime("meridiem", "AM");
616
+ this.setValuePart("meridiem", "AM");
513
617
  break;
514
618
  case "p":
515
- this.setTime("meridiem", "PM");
619
+ this.setValuePart("meridiem", "PM");
516
620
  break;
517
621
  case "Backspace":
518
622
  case "Delete":
519
- this.setTime("meridiem", null);
623
+ this.setValuePart("meridiem", null);
520
624
  break;
521
625
  case "ArrowUp":
522
626
  event.preventDefault();
@@ -543,7 +647,7 @@ let CalciteTimePicker = class {
543
647
  }
544
648
  };
545
649
  this.minuteKeyDownHandler = (event) => {
546
- const key = getKey(event.key);
650
+ const key = event.key;
547
651
  if (numberKeys.includes(key)) {
548
652
  const keyAsNumber = parseInt(key);
549
653
  let newMinute;
@@ -557,13 +661,13 @@ let CalciteTimePicker = class {
557
661
  else {
558
662
  newMinute = keyAsNumber;
559
663
  }
560
- this.setTime("minute", newMinute);
664
+ this.setValuePart("minute", newMinute);
561
665
  }
562
666
  else {
563
667
  switch (key) {
564
668
  case "Backspace":
565
669
  case "Delete":
566
- this.setTime("minute", null);
670
+ this.setValuePart("minute", null);
567
671
  break;
568
672
  case "ArrowDown":
569
673
  event.preventDefault();
@@ -591,7 +695,7 @@ let CalciteTimePicker = class {
591
695
  }
592
696
  };
593
697
  this.secondKeyDownHandler = (event) => {
594
- const key = getKey(event.key);
698
+ const key = event.key;
595
699
  if (numberKeys.includes(key)) {
596
700
  const keyAsNumber = parseInt(key);
597
701
  let newSecond;
@@ -605,13 +709,13 @@ let CalciteTimePicker = class {
605
709
  else {
606
710
  newSecond = keyAsNumber;
607
711
  }
608
- this.setTime("second", newSecond);
712
+ this.setValuePart("second", newSecond);
609
713
  }
610
714
  else {
611
715
  switch (key) {
612
716
  case "Backspace":
613
717
  case "Delete":
614
- this.setTime("second", null);
718
+ this.setValuePart("second", null);
615
719
  break;
616
720
  case "ArrowDown":
617
721
  event.preventDefault();
@@ -633,59 +737,96 @@ let CalciteTimePicker = class {
633
737
  this.incrementSecond();
634
738
  }
635
739
  };
636
- this.setTime = (key, value, emit = true) => {
637
- switch (key) {
638
- default:
639
- return;
640
- case "hour":
641
- this.hour = typeof value === "number" ? formatTimePart(value) : value;
642
- break;
643
- case "minute":
644
- this.minute = typeof value === "number" ? formatTimePart(value) : value;
645
- break;
646
- case "second":
647
- this.second = typeof value === "number" ? formatTimePart(value) : value;
648
- break;
649
- case "meridiem":
650
- if (isValidNumber(this.hour)) {
651
- const hourAsNumber = parseInt(this.hour);
652
- switch (value) {
653
- case "AM":
654
- if (hourAsNumber >= 12) {
655
- this.hour = formatTimePart(hourAsNumber - 12);
656
- }
657
- break;
658
- case "PM":
659
- if (hourAsNumber < 12) {
660
- this.hour = formatTimePart(hourAsNumber + 12);
661
- }
662
- break;
663
- }
664
- this.meridiem = value;
665
- }
666
- else {
667
- this.meridiem = value;
740
+ this.setHourEl = (el) => (this.hourEl = el);
741
+ this.setMeridiemEl = (el) => (this.meridiemEl = el);
742
+ this.setMinuteEl = (el) => (this.minuteEl = el);
743
+ this.setSecondEl = (el) => (this.secondEl = el);
744
+ this.setValue = (value, emit = true) => {
745
+ if (isValidTime(value)) {
746
+ const { hour, minute, second } = parseTimeString(value);
747
+ const { localizedHour, localizedHourSuffix, localizedMinute, localizedMinuteSuffix, localizedSecond, localizedSecondSuffix, localizedMeridiem } = localizeTimeStringToParts(value, this.locale);
748
+ this.localizedHour = localizedHour;
749
+ this.localizedHourSuffix = localizedHourSuffix;
750
+ this.localizedMinute = localizedMinute;
751
+ this.localizedMinuteSuffix = localizedMinuteSuffix;
752
+ this.localizedSecond = localizedSecond;
753
+ this.localizedSecondSuffix = localizedSecondSuffix;
754
+ this.hour = hour;
755
+ this.minute = minute;
756
+ this.second = second;
757
+ if (localizedMeridiem) {
758
+ this.localizedMeridiem = localizedMeridiem;
759
+ this.meridiem = getMeridiem(this.hour);
760
+ }
761
+ }
762
+ else {
763
+ this.hour = null;
764
+ this.localizedHour = null;
765
+ this.localizedHourSuffix = null;
766
+ this.localizedMeridiem = null;
767
+ this.localizedMinute = null;
768
+ this.localizedMinuteSuffix = null;
769
+ this.localizedSecond = null;
770
+ this.localizedSecondSuffix = null;
771
+ this.meridiem = null;
772
+ this.minute = null;
773
+ this.second = null;
774
+ this.value = null;
775
+ }
776
+ if (emit) {
777
+ this.calciteTimePickerChange.emit();
778
+ }
779
+ };
780
+ this.setValuePart = (key, value, emit = true) => {
781
+ var _a;
782
+ if (key === "meridiem") {
783
+ this.meridiem = value;
784
+ if (isValidNumber(this.hour)) {
785
+ const hourAsNumber = parseInt(this.hour);
786
+ switch (value) {
787
+ case "AM":
788
+ if (hourAsNumber >= 12) {
789
+ this.hour = formatTimePart(hourAsNumber - 12);
790
+ }
791
+ break;
792
+ case "PM":
793
+ if (hourAsNumber < 12) {
794
+ this.hour = formatTimePart(hourAsNumber + 12);
795
+ }
796
+ break;
668
797
  }
669
- break;
798
+ this.localizedHour = localizeTimePart(this.hour, "hour", this.locale);
799
+ }
800
+ }
801
+ else {
802
+ this[key] = typeof value === "number" ? formatTimePart(value) : value;
803
+ this[`localized${capitalize(key)}`] = localizeTimePart(this[key], key, this.locale);
804
+ }
805
+ if (this.hour && this.minute) {
806
+ const showSeconds = this.second && this.showSecond;
807
+ this.value = `${this.hour}:${this.minute}:${showSeconds ? this.second : "00"}`;
670
808
  }
671
- this.timeChanged = true;
809
+ else {
810
+ this.value = null;
811
+ }
812
+ this.localizedMeridiem = this.value
813
+ ? ((_a = localizeTimeStringToParts(this.value, this.locale)) === null || _a === void 0 ? void 0 : _a.localizedMeridiem) || null
814
+ : localizeTimePart(this.meridiem, "meridiem", this.locale);
672
815
  if (emit) {
673
- this.calciteTimePickerChange.emit(this.getTime());
816
+ this.calciteTimePickerChange.emit();
674
817
  }
675
818
  };
676
819
  }
677
- hourChanged(newHour) {
678
- if (this.hourDisplayFormat === "12" && isValidNumber(newHour)) {
679
- this.meridiem = getMeridiem(newHour);
680
- }
820
+ localeWatcher(newLocale) {
821
+ this.hourCycle = getLocaleHourCycle(newLocale);
822
+ this.setValue(this.value, false);
681
823
  }
682
- timeChangeHandler() {
683
- const { hour, minute } = this.getTime();
684
- if (!hour && !minute) {
685
- this.setTime("meridiem", null, false);
686
- }
687
- if (this.timeChanged) {
688
- this.timeChanged = false;
824
+ valueWatcher(newValue) {
825
+ this.setValue(newValue, false);
826
+ }
827
+ hourChanged(newHour) {
828
+ if (this.meridiem && isValidNumber(newHour)) {
829
+ this.setValuePart("meridiem", getMeridiem(newHour));
689
830
  }
690
831
  }
691
832
  //--------------------------------------------------------------------------
@@ -700,7 +841,7 @@ let CalciteTimePicker = class {
700
841
  this.calciteTimePickerFocus.emit();
701
842
  }
702
843
  keyDownHandler(event) {
703
- const key = getKey(event.key);
844
+ const key = event.key;
704
845
  switch (this.activeEl) {
705
846
  case this.hourEl:
706
847
  if (key === "ArrowRight") {
@@ -716,7 +857,7 @@ let CalciteTimePicker = class {
716
857
  if (this.step !== 60) {
717
858
  this.setFocus("second");
718
859
  }
719
- else if (this.hourDisplayFormat === "12") {
860
+ else if (this.hourCycle === "12") {
720
861
  this.setFocus("meridiem");
721
862
  }
722
863
  break;
@@ -728,7 +869,7 @@ let CalciteTimePicker = class {
728
869
  this.setFocus("minute");
729
870
  break;
730
871
  case "ArrowRight":
731
- if (this.hourDisplayFormat === "12") {
872
+ if (this.hourCycle === "12") {
732
873
  this.setFocus("meridiem");
733
874
  }
734
875
  break;
@@ -758,47 +899,26 @@ let CalciteTimePicker = class {
758
899
  var _a;
759
900
  (_a = this[`${target || "hour"}El`]) === null || _a === void 0 ? void 0 : _a.focus();
760
901
  }
902
+ // --------------------------------------------------------------------------
903
+ //
904
+ // Private Methods
905
+ //
906
+ // --------------------------------------------------------------------------
761
907
  buttonActivated(event) {
762
- const key = getKey(event.key);
908
+ const key = event.key;
763
909
  if (key === " ") {
764
910
  event.preventDefault();
765
911
  }
766
912
  return isActivationKey(key);
767
913
  }
768
- getDisplayHour() {
769
- if (!this.hour) {
770
- return "--";
771
- }
772
- if (this.hourDisplayFormat === "12") {
773
- return getMeridiemHour(this.hour);
774
- }
775
- return this.hour;
776
- }
777
- getTime() {
778
- return {
779
- hour: this.hour,
780
- minute: this.minute,
781
- second: this.second
782
- };
783
- }
784
914
  // --------------------------------------------------------------------------
785
915
  //
786
916
  // Lifecycle
787
917
  //
788
918
  // --------------------------------------------------------------------------
789
919
  connectedCallback() {
790
- if (this.hourDisplayFormat === "12") {
791
- this.meridiem = getMeridiem(this.hour);
792
- }
793
- if (isValidNumber(this.hour)) {
794
- this.hour = formatTimePart(parseInt(this.hour));
795
- }
796
- if (isValidNumber(this.minute)) {
797
- this.minute = formatTimePart(parseInt(this.minute));
798
- }
799
- if (isValidNumber(this.second)) {
800
- this.second = formatTimePart(parseInt(this.second));
801
- }
920
+ this.setValue(this.value, false);
921
+ this.hourCycle = getLocaleHourCycle(this.locale);
802
922
  }
803
923
  // --------------------------------------------------------------------------
804
924
  //
@@ -806,58 +926,63 @@ let CalciteTimePicker = class {
806
926
  //
807
927
  // --------------------------------------------------------------------------
808
928
  render() {
809
- const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
810
- const includeSeconds = this.step !== 60;
811
929
  const hourIsNumber = isValidNumber(this.hour);
930
+ const iconScale = this.scale === "s" || this.scale === "m" ? "s" : "m";
812
931
  const minuteIsNumber = isValidNumber(this.minute);
813
932
  const secondIsNumber = isValidNumber(this.second);
814
- return (h(Host, null, h("div", { class: CSS.timePicker }, h("div", { role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
933
+ const showMeridiem = this.hourCycle === "12";
934
+ return (h("div", { class: {
935
+ [CSS.timePicker]: true,
936
+ [CSS.showMeridiem]: showMeridiem,
937
+ [CSS.showSecond]: this.showSecond,
938
+ [CSS[`scale-${this.scale}`]]: true
939
+ } }, h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlHourUp, class: {
815
940
  [CSS.button]: true,
816
941
  [CSS.buttonHourUp]: true,
817
942
  [CSS.buttonTopLeft]: true
818
- }, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": hourIsNumber && parseInt(this.hour), "aria-valuetext": this.hour, class: {
943
+ }, onClick: this.incrementHour, onKeyDown: this.hourUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlHour, "aria-valuemax": "23", "aria-valuemin": "1", "aria-valuenow": (hourIsNumber && parseInt(this.hour)) || "0", "aria-valuetext": this.hour, class: {
819
944
  [CSS.input]: true,
820
945
  [CSS.hour]: true
821
- }, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref: (el) => (this.hourEl = el), role: "spinbutton", tabIndex: 0 }, this.getDisplayHour()), h("span", { "aria-label": this.intlHourDown, class: {
946
+ }, onFocus: this.focusHandler, onKeyDown: this.hourKeyDownHandler, ref: this.setHourEl, role: "spinbutton", tabIndex: 0 }, this.localizedHour || "--"), h("span", { "aria-label": this.intlHourDown, class: {
822
947
  [CSS.button]: true,
823
948
  [CSS.buttonHourDown]: true,
824
949
  [CSS.buttonBottomLeft]: true
825
- }, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), h("span", { class: CSS.delimiter }, ":"), h("div", { role: "group" }, h("span", { "aria-label": this.intlMinuteUp, class: {
950
+ }, onClick: this.decrementHour, onKeyDown: this.hourDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), h("span", { class: CSS.delimiter }, this.localizedHourSuffix), h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlMinuteUp, class: {
826
951
  [CSS.button]: true,
827
952
  [CSS.buttonMinuteUp]: true
828
- }, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": minuteIsNumber && parseInt(this.minute), "aria-valuetext": this.minute, class: {
953
+ }, onClick: this.incrementMinute, onKeyDown: this.minuteUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMinute, "aria-valuemax": "12", "aria-valuemin": "1", "aria-valuenow": (minuteIsNumber && parseInt(this.minute)) || "0", "aria-valuetext": this.minute, class: {
829
954
  [CSS.input]: true,
830
955
  [CSS.minute]: true
831
- }, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref: (el) => (this.minuteEl = el), role: "spinbutton", tabIndex: 0 }, this.minute ? this.minute : "--"), h("span", { "aria-label": this.intlMinuteDown, class: {
956
+ }, onFocus: this.focusHandler, onKeyDown: this.minuteKeyDownHandler, ref: this.setMinuteEl, role: "spinbutton", tabIndex: 0 }, this.localizedMinute || "--"), h("span", { "aria-label": this.intlMinuteDown, class: {
832
957
  [CSS.button]: true,
833
958
  [CSS.buttonMinuteDown]: true
834
- }, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), includeSeconds && h("span", { class: CSS.delimiter }, ":"), includeSeconds && (h("div", { role: "group" }, h("span", { "aria-label": this.intlSecondUp, class: {
959
+ }, onClick: this.decrementMinute, onKeyDown: this.minuteDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))), this.showSecond && h("span", { class: CSS.delimiter }, this.localizedMinuteSuffix), this.showSecond && (h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlSecondUp, class: {
835
960
  [CSS.button]: true,
836
961
  [CSS.buttonSecondUp]: true
837
- }, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": secondIsNumber && parseInt(this.second), "aria-valuetext": this.second, class: {
962
+ }, onClick: this.incrementSecond, onKeyDown: this.secondUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlSecond, "aria-valuemax": "59", "aria-valuemin": "0", "aria-valuenow": (secondIsNumber && parseInt(this.second)) || "0", "aria-valuetext": this.second, class: {
838
963
  [CSS.input]: true,
839
964
  [CSS.second]: true
840
- }, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref: (el) => (this.secondEl = el), role: "spinbutton", tabIndex: 0 }, this.second ? this.second : "--"), h("span", { "aria-label": this.intlSecondDown, class: {
965
+ }, onFocus: this.focusHandler, onKeyDown: this.secondKeyDownHandler, ref: this.setSecondEl, role: "spinbutton", tabIndex: 0 }, this.localizedSecond || "--"), h("span", { "aria-label": this.intlSecondDown, class: {
841
966
  [CSS.button]: true,
842
967
  [CSS.buttonSecondDown]: true
843
- }, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale })))), this.hourDisplayFormat === "12" && (h("div", { role: "group" }, h("span", { "aria-label": this.intlMeridiemUp, class: {
968
+ }, onClick: this.decrementSecond, onKeyDown: this.secondDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale })))), this.localizedSecondSuffix && (h("span", { class: CSS.delimiter }, this.localizedSecondSuffix)), showMeridiem && (h("div", { class: CSS.column, role: "group" }, h("span", { "aria-label": this.intlMeridiemUp, class: {
844
969
  [CSS.button]: true,
845
970
  [CSS.buttonMeridiemUp]: true,
846
971
  [CSS.buttonTopRight]: true
847
- }, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": this.meridiem === "AM" ? "1" : this.meridiem === "PM" ? "2" : undefined, "aria-valuetext": this.meridiem, class: {
972
+ }, onClick: this.incrementMeridiem, onKeyDown: this.meridiemUpButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-up", scale: iconScale })), h("span", { "aria-label": this.intlMeridiem, "aria-valuemax": "2", "aria-valuemin": "1", "aria-valuenow": (this.meridiem === "PM" && "2") || "1", "aria-valuetext": this.meridiem, class: {
848
973
  [CSS.input]: true,
849
974
  [CSS.meridiem]: true
850
- }, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref: (el) => (this.meridiemEl = el), role: "spinbutton", tabIndex: 0 }, this.meridiem ? this.meridiem : "--"), h("span", { "aria-label": this.intlMeridiemDown, class: {
975
+ }, onFocus: this.focusHandler, onKeyDown: this.meridiemKeyDownHandler, ref: this.setMeridiemEl, role: "spinbutton", tabIndex: 0 }, this.localizedMeridiem || "--"), h("span", { "aria-label": this.intlMeridiemDown, class: {
851
976
  [CSS.button]: true,
852
977
  [CSS.buttonMeridiemDown]: true,
853
978
  [CSS.buttonBottomRight]: true
854
- }, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale })))))));
979
+ }, onClick: this.decrementMeridiem, onKeyDown: this.meridiemDownButtonKeyDownHandler, role: "button", tabIndex: -1 }, h("calcite-icon", { icon: "chevron-down", scale: iconScale }))))));
855
980
  }
856
981
  get el() { return getElement(this); }
857
982
  static get watchers() { return {
858
- "hour": ["hourChanged", "timeChangeHandler"],
859
- "minute": ["timeChangeHandler"],
860
- "second": ["timeChangeHandler"]
983
+ "locale": ["localeWatcher"],
984
+ "value": ["valueWatcher"],
985
+ "hour": ["hourChanged"]
861
986
  }; }
862
987
  };
863
988
  CalciteTimePicker.style = calciteTimePickerCss;