@six-group/ui-library 0.0.0-insider.a358260 → 0.0.0-insider.cd0cd0d

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 (737) hide show
  1. package/dist/cjs/event-listeners-b835dfae.js +61 -0
  2. package/dist/cjs/event-listeners-b835dfae.js.map +1 -0
  3. package/dist/cjs/{execution-control-46f388e0.js → execution-control-45c84c46.js} +6 -3
  4. package/dist/cjs/execution-control-45c84c46.js.map +1 -0
  5. package/dist/cjs/{focus-visible-0b352c74.js → focus-visible-e0d93a95.js} +3 -3
  6. package/dist/cjs/focus-visible-e0d93a95.js.map +1 -0
  7. package/dist/cjs/form-8cbd4e0e.js +20 -0
  8. package/dist/cjs/form-8cbd4e0e.js.map +1 -0
  9. package/dist/cjs/{form-control-2c17c573.js → form-control-8df00a52.js} +9 -10
  10. package/dist/cjs/form-control-8df00a52.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +94 -0
  12. package/dist/cjs/index.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +1 -1
  14. package/dist/cjs/{modal-48d42228.js → modal-21350fb5.js} +4 -3
  15. package/dist/cjs/modal-21350fb5.js.map +1 -0
  16. package/dist/cjs/{popover-f743f62b.js → popover-8885d50f.js} +39 -31
  17. package/dist/cjs/popover-8885d50f.js.map +1 -0
  18. package/dist/cjs/popup-44836aaf.js +103 -0
  19. package/dist/cjs/popup-44836aaf.js.map +1 -0
  20. package/dist/cjs/set-attributes_2.cjs.entry.js +3 -1
  21. package/dist/cjs/set-attributes_2.cjs.entry.js.map +1 -1
  22. package/dist/cjs/six-alert.cjs.entry.js +17 -22
  23. package/dist/cjs/six-alert.cjs.entry.js.map +1 -1
  24. package/dist/cjs/six-avatar.cjs.entry.js +4 -7
  25. package/dist/cjs/six-avatar.cjs.entry.js.map +1 -1
  26. package/dist/cjs/six-badge.cjs.entry.js +1 -1
  27. package/dist/cjs/six-badge.cjs.entry.js.map +1 -1
  28. package/dist/cjs/six-button.cjs.entry.js +35 -33
  29. package/dist/cjs/six-button.cjs.entry.js.map +1 -1
  30. package/dist/cjs/six-card.cjs.entry.js.map +1 -1
  31. package/dist/cjs/six-checkbox.cjs.entry.js +9 -47
  32. package/dist/cjs/six-checkbox.cjs.entry.js.map +1 -1
  33. package/dist/cjs/six-datepicker.cjs.entry.js +150 -278
  34. package/dist/cjs/six-datepicker.cjs.entry.js.map +1 -1
  35. package/dist/cjs/six-details.cjs.entry.js +47 -46
  36. package/dist/cjs/six-details.cjs.entry.js.map +1 -1
  37. package/dist/cjs/six-dialog.cjs.entry.js +35 -39
  38. package/dist/cjs/six-dialog.cjs.entry.js.map +1 -1
  39. package/dist/cjs/six-drawer.cjs.entry.js +32 -36
  40. package/dist/cjs/six-drawer.cjs.entry.js.map +1 -1
  41. package/dist/cjs/six-dropdown_2.cjs.entry.js +214 -195
  42. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  43. package/dist/cjs/six-error-page.cjs.entry.js +19 -21
  44. package/dist/cjs/six-error-page.cjs.entry.js.map +1 -1
  45. package/dist/cjs/six-file-list-item.cjs.entry.js +1 -1
  46. package/dist/cjs/six-file-list-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/six-file-upload.cjs.entry.js +20 -20
  48. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  49. package/dist/cjs/six-group-label.cjs.entry.js +11 -10
  50. package/dist/cjs/six-group-label.cjs.entry.js.map +1 -1
  51. package/dist/cjs/six-header.cjs.entry.js +65 -43
  52. package/dist/cjs/six-header.cjs.entry.js.map +1 -1
  53. package/dist/cjs/six-icon-button.cjs.entry.js +3 -3
  54. package/dist/cjs/six-icon-button.cjs.entry.js.map +1 -1
  55. package/dist/cjs/six-input.cjs.entry.js +28 -87
  56. package/dist/cjs/six-input.cjs.entry.js.map +1 -1
  57. package/dist/cjs/six-item-picker.cjs.entry.js +58 -77
  58. package/dist/cjs/six-item-picker.cjs.entry.js.map +1 -1
  59. package/dist/cjs/six-language-switcher.cjs.entry.js +1 -1
  60. package/dist/cjs/six-language-switcher.cjs.entry.js.map +1 -1
  61. package/dist/cjs/six-layout-grid.cjs.entry.js +4 -2
  62. package/dist/cjs/six-layout-grid.cjs.entry.js.map +1 -1
  63. package/dist/cjs/six-main-container.cjs.entry.js.map +1 -1
  64. package/dist/cjs/six-menu-item.cjs.entry.js +8 -6
  65. package/dist/cjs/six-menu-item.cjs.entry.js.map +1 -1
  66. package/dist/cjs/six-picto.cjs.entry.js +4 -1
  67. package/dist/cjs/six-picto.cjs.entry.js.map +1 -1
  68. package/dist/cjs/six-progress-ring.cjs.entry.js +3 -3
  69. package/dist/cjs/six-progress-ring.cjs.entry.js.map +1 -1
  70. package/dist/cjs/six-radio.cjs.entry.js +17 -23
  71. package/dist/cjs/six-radio.cjs.entry.js.map +1 -1
  72. package/dist/cjs/six-range.cjs.entry.js +6 -44
  73. package/dist/cjs/six-range.cjs.entry.js.map +1 -1
  74. package/dist/cjs/six-root.cjs.entry.js +1 -1
  75. package/dist/cjs/six-root.cjs.entry.js.map +1 -1
  76. package/dist/cjs/six-search-field.cjs.entry.js +10 -5
  77. package/dist/cjs/six-search-field.cjs.entry.js.map +1 -1
  78. package/dist/cjs/six-select.cjs.entry.js +129 -222
  79. package/dist/cjs/six-select.cjs.entry.js.map +1 -1
  80. package/dist/cjs/six-sidebar-item-group.cjs.entry.js +9 -5
  81. package/dist/cjs/six-sidebar-item-group.cjs.entry.js.map +1 -1
  82. package/dist/cjs/six-sidebar.cjs.entry.js +39 -18
  83. package/dist/cjs/six-sidebar.cjs.entry.js.map +1 -1
  84. package/dist/cjs/six-spinner.cjs.entry.js.map +1 -1
  85. package/dist/cjs/six-switch.cjs.entry.js +54 -62
  86. package/dist/cjs/six-switch.cjs.entry.js.map +1 -1
  87. package/dist/cjs/six-tab-group.cjs.entry.js +130 -112
  88. package/dist/cjs/six-tab-group.cjs.entry.js.map +1 -1
  89. package/dist/cjs/six-tab-panel.cjs.entry.js +1 -1
  90. package/dist/cjs/six-tab-panel.cjs.entry.js.map +1 -1
  91. package/dist/cjs/six-tab.cjs.entry.js +4 -2
  92. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  93. package/dist/cjs/six-tag.cjs.entry.js +4 -7
  94. package/dist/cjs/six-tag.cjs.entry.js.map +1 -1
  95. package/dist/cjs/six-textarea.cjs.entry.js +27 -76
  96. package/dist/cjs/six-textarea.cjs.entry.js.map +1 -1
  97. package/dist/cjs/six-tile.cjs.entry.js +13 -16
  98. package/dist/cjs/six-tile.cjs.entry.js.map +1 -1
  99. package/dist/cjs/six-timepicker.cjs.entry.js +157 -213
  100. package/dist/cjs/six-timepicker.cjs.entry.js.map +1 -1
  101. package/dist/cjs/six-tooltip.cjs.entry.js +53 -56
  102. package/dist/cjs/six-tooltip.cjs.entry.js.map +1 -1
  103. package/dist/cjs/{slot-ad537f24.js → slot-bccbdb59.js} +11 -10
  104. package/dist/cjs/slot-bccbdb59.js.map +1 -0
  105. package/dist/cjs/ui-library.cjs.js +1 -1
  106. package/dist/collection/collection-manifest.json +0 -1
  107. package/dist/collection/components/six-alert/six-alert.js +17 -22
  108. package/dist/collection/components/six-alert/six-alert.js.map +1 -1
  109. package/dist/collection/components/six-avatar/six-avatar.js +4 -7
  110. package/dist/collection/components/six-avatar/six-avatar.js.map +1 -1
  111. package/dist/collection/components/six-badge/six-badge.js +1 -1
  112. package/dist/collection/components/six-badge/six-badge.js.map +1 -1
  113. package/dist/collection/components/six-button/six-button.js +44 -40
  114. package/dist/collection/components/six-button/six-button.js.map +1 -1
  115. package/dist/collection/components/six-card/six-card.js +1 -1
  116. package/dist/collection/components/six-card/six-card.js.map +1 -1
  117. package/dist/collection/components/six-checkbox/six-checkbox.js +20 -128
  118. package/dist/collection/components/six-checkbox/six-checkbox.js.map +1 -1
  119. package/dist/collection/components/six-datepicker/components/day-selection.js +2 -2
  120. package/dist/collection/components/six-datepicker/components/day-selection.js.map +1 -1
  121. package/dist/collection/components/six-datepicker/components/month-selection.js +4 -3
  122. package/dist/collection/components/six-datepicker/components/month-selection.js.map +1 -1
  123. package/dist/collection/components/six-datepicker/components/year-selection.js +9 -6
  124. package/dist/collection/components/six-datepicker/components/year-selection.js.map +1 -1
  125. package/dist/collection/components/six-datepicker/six-datepicker.js +186 -376
  126. package/dist/collection/components/six-datepicker/six-datepicker.js.map +1 -1
  127. package/dist/collection/components/six-details/six-details.js +51 -50
  128. package/dist/collection/components/six-details/six-details.js.map +1 -1
  129. package/dist/collection/components/six-dialog/six-dialog.js +34 -38
  130. package/dist/collection/components/six-dialog/six-dialog.js.map +1 -1
  131. package/dist/collection/components/six-drawer/six-drawer.js +31 -35
  132. package/dist/collection/components/six-drawer/six-drawer.js.map +1 -1
  133. package/dist/collection/components/six-dropdown/six-dropdown.js +185 -173
  134. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  135. package/dist/collection/components/six-error-page/six-error-page.js +25 -27
  136. package/dist/collection/components/six-error-page/six-error-page.js.map +1 -1
  137. package/dist/collection/components/six-file-list-item/six-file-list-item.js +3 -3
  138. package/dist/collection/components/six-file-list-item/six-file-list-item.js.map +1 -1
  139. package/dist/collection/components/six-file-upload/six-file-upload.js +32 -32
  140. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  141. package/dist/collection/components/six-group-label/six-group-label.js +12 -10
  142. package/dist/collection/components/six-group-label/six-group-label.js.map +1 -1
  143. package/dist/collection/components/six-header/six-header.js +64 -42
  144. package/dist/collection/components/six-header/six-header.js.map +1 -1
  145. package/dist/collection/components/six-icon-button/six-icon-button.js +8 -8
  146. package/dist/collection/components/six-icon-button/six-icon-button.js.map +1 -1
  147. package/dist/collection/components/six-input/six-input.js +77 -274
  148. package/dist/collection/components/six-input/six-input.js.map +1 -1
  149. package/dist/collection/components/six-item-picker/six-item-picker.js +65 -84
  150. package/dist/collection/components/six-item-picker/six-item-picker.js.map +1 -1
  151. package/dist/collection/components/six-language-switcher/six-language-switcher.js +2 -2
  152. package/dist/collection/components/six-language-switcher/six-language-switcher.js.map +1 -1
  153. package/dist/collection/components/six-layout-grid/six-layout-grid.js +10 -8
  154. package/dist/collection/components/six-layout-grid/six-layout-grid.js.map +1 -1
  155. package/dist/collection/components/six-main-container/six-main-container.js +1 -1
  156. package/dist/collection/components/six-main-container/six-main-container.js.map +1 -1
  157. package/dist/collection/components/six-menu/six-menu.js +29 -23
  158. package/dist/collection/components/six-menu/six-menu.js.map +1 -1
  159. package/dist/collection/components/six-menu-item/six-menu-item.js +7 -5
  160. package/dist/collection/components/six-menu-item/six-menu-item.js.map +1 -1
  161. package/dist/collection/components/six-picto/six-picto.js +5 -2
  162. package/dist/collection/components/six-picto/six-picto.js.map +1 -1
  163. package/dist/collection/components/six-progress-ring/six-progress-ring.js +5 -4
  164. package/dist/collection/components/six-progress-ring/six-progress-ring.js.map +1 -1
  165. package/dist/collection/components/six-radio/six-radio.js +21 -76
  166. package/dist/collection/components/six-radio/six-radio.js.map +1 -1
  167. package/dist/collection/components/six-range/six-range.js +27 -119
  168. package/dist/collection/components/six-range/six-range.js.map +1 -1
  169. package/dist/collection/components/six-root/six-root.js +4 -4
  170. package/dist/collection/components/six-root/six-root.js.map +1 -1
  171. package/dist/collection/components/six-search-field/six-search-field.js +10 -5
  172. package/dist/collection/components/six-search-field/six-search-field.js.map +1 -1
  173. package/dist/collection/components/six-select/six-select.js +165 -294
  174. package/dist/collection/components/six-select/six-select.js.map +1 -1
  175. package/dist/collection/components/six-select/util.js.map +1 -1
  176. package/dist/collection/components/six-sidebar/six-sidebar.js +40 -19
  177. package/dist/collection/components/six-sidebar/six-sidebar.js.map +1 -1
  178. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js +12 -8
  179. package/dist/collection/components/six-sidebar-item-group/six-sidebar-item-group.js.map +1 -1
  180. package/dist/collection/components/six-spinner/six-spinner.js.map +1 -1
  181. package/dist/collection/components/six-stage-indicator/six-stage-indicator.js +1 -1
  182. package/dist/collection/components/six-switch/six-switch.css +77 -0
  183. package/dist/collection/components/six-switch/six-switch.js +96 -133
  184. package/dist/collection/components/six-switch/six-switch.js.map +1 -1
  185. package/dist/collection/components/six-tab/six-tab.js +5 -3
  186. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  187. package/dist/collection/components/six-tab-group/six-tab-group.js +130 -112
  188. package/dist/collection/components/six-tab-group/six-tab-group.js.map +1 -1
  189. package/dist/collection/components/six-tab-panel/six-tab-panel.js +2 -2
  190. package/dist/collection/components/six-tab-panel/six-tab-panel.js.map +1 -1
  191. package/dist/collection/components/six-tag/six-tag.js +4 -7
  192. package/dist/collection/components/six-tag/six-tag.js.map +1 -1
  193. package/dist/collection/components/six-textarea/six-textarea.js +72 -207
  194. package/dist/collection/components/six-textarea/six-textarea.js.map +1 -1
  195. package/dist/collection/components/six-tile/six-tile.js +17 -20
  196. package/dist/collection/components/six-tile/six-tile.js.map +1 -1
  197. package/dist/collection/components/six-timepicker/six-timepicker.js +153 -254
  198. package/dist/collection/components/six-timepicker/six-timepicker.js.map +1 -1
  199. package/dist/collection/components/six-tooltip/six-tooltip.js +56 -59
  200. package/dist/collection/components/six-tooltip/six-tooltip.js.map +1 -1
  201. package/dist/collection/functional-components/form-control/form-control.js +8 -9
  202. package/dist/collection/functional-components/form-control/form-control.js.map +1 -1
  203. package/dist/collection/index.js +1 -1
  204. package/dist/collection/index.js.map +1 -1
  205. package/dist/collection/testUtil/delay.js.map +1 -1
  206. package/dist/collection/utils/date-util.js +25 -16
  207. package/dist/collection/utils/date-util.js.map +1 -1
  208. package/dist/collection/utils/error-messages.js +91 -0
  209. package/dist/collection/utils/error-messages.js.map +1 -0
  210. package/dist/collection/utils/event-listeners.js +22 -6
  211. package/dist/collection/utils/event-listeners.js.map +1 -1
  212. package/dist/collection/utils/execution-control.js +5 -4
  213. package/dist/collection/utils/execution-control.js.map +1 -1
  214. package/dist/collection/utils/focus-visible.js +2 -2
  215. package/dist/collection/utils/focus-visible.js.map +1 -1
  216. package/dist/collection/utils/form.js +15 -0
  217. package/dist/collection/utils/form.js.map +1 -0
  218. package/dist/collection/utils/modal.js +3 -2
  219. package/dist/collection/utils/modal.js.map +1 -1
  220. package/dist/collection/utils/popover.js +32 -18
  221. package/dist/collection/utils/popover.js.map +1 -1
  222. package/dist/collection/utils/popup.js +95 -0
  223. package/dist/collection/utils/popup.js.map +1 -0
  224. package/dist/collection/utils/slot.js +9 -24
  225. package/dist/collection/utils/slot.js.map +1 -1
  226. package/dist/collection/utils/tabbable.js +6 -6
  227. package/dist/collection/utils/tabbable.js.map +1 -1
  228. package/dist/collection/utils/time.util.js +48 -34
  229. package/dist/collection/utils/time.util.js.map +1 -1
  230. package/dist/collection/utils/type-check.js +0 -1
  231. package/dist/collection/utils/type-check.js.map +1 -1
  232. package/dist/collection/wrappers/set-attributes/set-attributes.js +3 -1
  233. package/dist/collection/wrappers/set-attributes/set-attributes.js.map +1 -1
  234. package/dist/components/event-listeners.js +22 -6
  235. package/dist/components/event-listeners.js.map +1 -1
  236. package/dist/components/execution-control.js +5 -2
  237. package/dist/components/execution-control.js.map +1 -1
  238. package/dist/components/focus-visible.js +2 -2
  239. package/dist/components/focus-visible.js.map +1 -1
  240. package/dist/components/form-control.js +8 -9
  241. package/dist/components/form-control.js.map +1 -1
  242. package/dist/components/form.js +18 -0
  243. package/dist/components/form.js.map +1 -0
  244. package/dist/components/index.js +92 -3
  245. package/dist/components/index.js.map +1 -1
  246. package/dist/components/modal.js +3 -2
  247. package/dist/components/modal.js.map +1 -1
  248. package/dist/components/popover.js +38 -30
  249. package/dist/components/popover.js.map +1 -1
  250. package/dist/components/set-attributes2.js +3 -1
  251. package/dist/components/set-attributes2.js.map +1 -1
  252. package/dist/components/six-alert.js +17 -22
  253. package/dist/components/six-alert.js.map +1 -1
  254. package/dist/components/six-avatar.js +4 -7
  255. package/dist/components/six-avatar.js.map +1 -1
  256. package/dist/components/six-badge.js +1 -1
  257. package/dist/components/six-badge.js.map +1 -1
  258. package/dist/components/six-button.js +34 -32
  259. package/dist/components/six-button.js.map +1 -1
  260. package/dist/components/six-card.js.map +1 -1
  261. package/dist/components/six-checkbox.js +7 -50
  262. package/dist/components/six-checkbox.js.map +1 -1
  263. package/dist/components/six-datepicker.js +150 -281
  264. package/dist/components/six-datepicker.js.map +1 -1
  265. package/dist/components/six-details2.js +46 -45
  266. package/dist/components/six-details2.js.map +1 -1
  267. package/dist/components/six-dialog.js +33 -37
  268. package/dist/components/six-dialog.js.map +1 -1
  269. package/dist/components/six-drawer.js +30 -34
  270. package/dist/components/six-drawer.js.map +1 -1
  271. package/dist/components/six-dropdown2.js +185 -173
  272. package/dist/components/six-dropdown2.js.map +1 -1
  273. package/dist/components/six-error-page.js +19 -21
  274. package/dist/components/six-error-page.js.map +1 -1
  275. package/dist/components/six-file-list-item.js +1 -1
  276. package/dist/components/six-file-list-item.js.map +1 -1
  277. package/dist/components/six-file-upload.js +20 -20
  278. package/dist/components/six-file-upload.js.map +1 -1
  279. package/dist/components/six-group-label.js +10 -9
  280. package/dist/components/six-group-label.js.map +1 -1
  281. package/dist/components/six-header.js +64 -42
  282. package/dist/components/six-header.js.map +1 -1
  283. package/dist/components/six-icon-button2.js +2 -2
  284. package/dist/components/six-icon-button2.js.map +1 -1
  285. package/dist/components/six-input2.js +30 -98
  286. package/dist/components/six-input2.js.map +1 -1
  287. package/dist/components/six-item-picker2.js +56 -75
  288. package/dist/components/six-item-picker2.js.map +1 -1
  289. package/dist/components/six-language-switcher.js +1 -1
  290. package/dist/components/six-language-switcher.js.map +1 -1
  291. package/dist/components/six-layout-grid.js +5 -3
  292. package/dist/components/six-layout-grid.js.map +1 -1
  293. package/dist/components/six-main-container.js.map +1 -1
  294. package/dist/components/six-menu-item2.js +7 -5
  295. package/dist/components/six-menu-item2.js.map +1 -1
  296. package/dist/components/six-menu2.js +25 -18
  297. package/dist/components/six-menu2.js.map +1 -1
  298. package/dist/components/six-picto2.js +4 -1
  299. package/dist/components/six-picto2.js.map +1 -1
  300. package/dist/components/six-progress-ring.js +3 -3
  301. package/dist/components/six-progress-ring.js.map +1 -1
  302. package/dist/components/six-radio.js +19 -28
  303. package/dist/components/six-radio.js.map +1 -1
  304. package/dist/components/six-range.js +8 -50
  305. package/dist/components/six-range.js.map +1 -1
  306. package/dist/components/six-root.js +1 -1
  307. package/dist/components/six-root.js.map +1 -1
  308. package/dist/components/six-search-field.js +8 -3
  309. package/dist/components/six-search-field.js.map +1 -1
  310. package/dist/components/six-select.js +129 -228
  311. package/dist/components/six-select.js.map +1 -1
  312. package/dist/components/six-sidebar-item-group.js +8 -4
  313. package/dist/components/six-sidebar-item-group.js.map +1 -1
  314. package/dist/components/six-sidebar.js +39 -18
  315. package/dist/components/six-sidebar.js.map +1 -1
  316. package/dist/components/six-spinner2.js.map +1 -1
  317. package/dist/components/six-switch.js +58 -68
  318. package/dist/components/six-switch.js.map +1 -1
  319. package/dist/components/six-tab-group.js +129 -111
  320. package/dist/components/six-tab-group.js.map +1 -1
  321. package/dist/components/six-tab-panel.js +1 -1
  322. package/dist/components/six-tab-panel.js.map +1 -1
  323. package/dist/components/six-tab.js +4 -2
  324. package/dist/components/six-tab.js.map +1 -1
  325. package/dist/components/six-tag2.js +4 -7
  326. package/dist/components/six-tag2.js.map +1 -1
  327. package/dist/components/six-textarea.js +29 -84
  328. package/dist/components/six-textarea.js.map +1 -1
  329. package/dist/components/six-tile.js +14 -17
  330. package/dist/components/six-tile.js.map +1 -1
  331. package/dist/components/six-timepicker.js +1 -1
  332. package/dist/components/six-timepicker2.js +247 -258
  333. package/dist/components/six-timepicker2.js.map +1 -1
  334. package/dist/components/six-tooltip2.js +52 -55
  335. package/dist/components/six-tooltip2.js.map +1 -1
  336. package/dist/components/slot.js +10 -9
  337. package/dist/components/slot.js.map +1 -1
  338. package/dist/components.json +494 -891
  339. package/dist/esm/event-listeners-535f3ad1.js +59 -0
  340. package/dist/esm/event-listeners-535f3ad1.js.map +1 -0
  341. package/dist/esm/{execution-control-1a60d709.js → execution-control-72cc50f4.js} +6 -3
  342. package/dist/esm/execution-control-72cc50f4.js.map +1 -0
  343. package/dist/esm/{focus-visible-97933ea9.js → focus-visible-fa7129a0.js} +3 -3
  344. package/dist/esm/focus-visible-fa7129a0.js.map +1 -0
  345. package/dist/esm/form-0b9c11cd.js +18 -0
  346. package/dist/esm/form-0b9c11cd.js.map +1 -0
  347. package/dist/esm/{form-control-3b440ea1.js → form-control-785c5f79.js} +9 -10
  348. package/dist/esm/form-control-785c5f79.js.map +1 -0
  349. package/dist/esm/index.js +91 -0
  350. package/dist/esm/index.js.map +1 -1
  351. package/dist/esm/loader.js +1 -1
  352. package/dist/esm/{modal-5ebdc320.js → modal-b1d96441.js} +4 -3
  353. package/dist/esm/modal-b1d96441.js.map +1 -0
  354. package/dist/esm/{popover-bd2c2fca.js → popover-2e72e7d8.js} +39 -31
  355. package/dist/esm/popover-2e72e7d8.js.map +1 -0
  356. package/dist/esm/popup-678b8592.js +98 -0
  357. package/dist/esm/popup-678b8592.js.map +1 -0
  358. package/dist/esm/set-attributes_2.entry.js +3 -1
  359. package/dist/esm/set-attributes_2.entry.js.map +1 -1
  360. package/dist/esm/six-alert.entry.js +17 -22
  361. package/dist/esm/six-alert.entry.js.map +1 -1
  362. package/dist/esm/six-avatar.entry.js +4 -7
  363. package/dist/esm/six-avatar.entry.js.map +1 -1
  364. package/dist/esm/six-badge.entry.js +1 -1
  365. package/dist/esm/six-badge.entry.js.map +1 -1
  366. package/dist/esm/six-button.entry.js +35 -33
  367. package/dist/esm/six-button.entry.js.map +1 -1
  368. package/dist/esm/six-card.entry.js.map +1 -1
  369. package/dist/esm/six-checkbox.entry.js +9 -47
  370. package/dist/esm/six-checkbox.entry.js.map +1 -1
  371. package/dist/esm/six-datepicker.entry.js +148 -276
  372. package/dist/esm/six-datepicker.entry.js.map +1 -1
  373. package/dist/esm/six-details.entry.js +47 -46
  374. package/dist/esm/six-details.entry.js.map +1 -1
  375. package/dist/esm/six-dialog.entry.js +35 -39
  376. package/dist/esm/six-dialog.entry.js.map +1 -1
  377. package/dist/esm/six-drawer.entry.js +32 -36
  378. package/dist/esm/six-drawer.entry.js.map +1 -1
  379. package/dist/esm/six-dropdown_2.entry.js +214 -195
  380. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  381. package/dist/esm/six-error-page.entry.js +19 -21
  382. package/dist/esm/six-error-page.entry.js.map +1 -1
  383. package/dist/esm/six-file-list-item.entry.js +1 -1
  384. package/dist/esm/six-file-list-item.entry.js.map +1 -1
  385. package/dist/esm/six-file-upload.entry.js +20 -20
  386. package/dist/esm/six-file-upload.entry.js.map +1 -1
  387. package/dist/esm/six-group-label.entry.js +11 -10
  388. package/dist/esm/six-group-label.entry.js.map +1 -1
  389. package/dist/esm/six-header.entry.js +65 -43
  390. package/dist/esm/six-header.entry.js.map +1 -1
  391. package/dist/esm/six-icon-button.entry.js +3 -3
  392. package/dist/esm/six-icon-button.entry.js.map +1 -1
  393. package/dist/esm/six-input.entry.js +28 -87
  394. package/dist/esm/six-input.entry.js.map +1 -1
  395. package/dist/esm/six-item-picker.entry.js +58 -77
  396. package/dist/esm/six-item-picker.entry.js.map +1 -1
  397. package/dist/esm/six-language-switcher.entry.js +1 -1
  398. package/dist/esm/six-language-switcher.entry.js.map +1 -1
  399. package/dist/esm/six-layout-grid.entry.js +4 -2
  400. package/dist/esm/six-layout-grid.entry.js.map +1 -1
  401. package/dist/esm/six-main-container.entry.js.map +1 -1
  402. package/dist/esm/six-menu-item.entry.js +8 -6
  403. package/dist/esm/six-menu-item.entry.js.map +1 -1
  404. package/dist/esm/six-picto.entry.js +4 -1
  405. package/dist/esm/six-picto.entry.js.map +1 -1
  406. package/dist/esm/six-progress-ring.entry.js +3 -3
  407. package/dist/esm/six-progress-ring.entry.js.map +1 -1
  408. package/dist/esm/six-radio.entry.js +17 -23
  409. package/dist/esm/six-radio.entry.js.map +1 -1
  410. package/dist/esm/six-range.entry.js +6 -44
  411. package/dist/esm/six-range.entry.js.map +1 -1
  412. package/dist/esm/six-root.entry.js +1 -1
  413. package/dist/esm/six-root.entry.js.map +1 -1
  414. package/dist/esm/six-search-field.entry.js +10 -5
  415. package/dist/esm/six-search-field.entry.js.map +1 -1
  416. package/dist/esm/six-select.entry.js +129 -222
  417. package/dist/esm/six-select.entry.js.map +1 -1
  418. package/dist/esm/six-sidebar-item-group.entry.js +9 -5
  419. package/dist/esm/six-sidebar-item-group.entry.js.map +1 -1
  420. package/dist/esm/six-sidebar.entry.js +39 -18
  421. package/dist/esm/six-sidebar.entry.js.map +1 -1
  422. package/dist/esm/six-spinner.entry.js.map +1 -1
  423. package/dist/esm/six-switch.entry.js +55 -63
  424. package/dist/esm/six-switch.entry.js.map +1 -1
  425. package/dist/esm/six-tab-group.entry.js +130 -112
  426. package/dist/esm/six-tab-group.entry.js.map +1 -1
  427. package/dist/esm/six-tab-panel.entry.js +1 -1
  428. package/dist/esm/six-tab-panel.entry.js.map +1 -1
  429. package/dist/esm/six-tab.entry.js +4 -2
  430. package/dist/esm/six-tab.entry.js.map +1 -1
  431. package/dist/esm/six-tag.entry.js +4 -7
  432. package/dist/esm/six-tag.entry.js.map +1 -1
  433. package/dist/esm/six-textarea.entry.js +27 -76
  434. package/dist/esm/six-textarea.entry.js.map +1 -1
  435. package/dist/esm/six-tile.entry.js +13 -16
  436. package/dist/esm/six-tile.entry.js.map +1 -1
  437. package/dist/esm/six-timepicker.entry.js +157 -213
  438. package/dist/esm/six-timepicker.entry.js.map +1 -1
  439. package/dist/esm/six-tooltip.entry.js +53 -56
  440. package/dist/esm/six-tooltip.entry.js.map +1 -1
  441. package/dist/esm/{slot-6f3984c7.js → slot-2e64df19.js} +11 -10
  442. package/dist/esm/slot-2e64df19.js.map +1 -0
  443. package/dist/esm/ui-library.js +1 -1
  444. package/dist/types/components/six-alert/six-alert.d.ts +5 -7
  445. package/dist/types/components/six-avatar/six-avatar.d.ts +1 -2
  446. package/dist/types/components/six-badge/six-badge.d.ts +0 -1
  447. package/dist/types/components/six-button/six-button.d.ts +8 -9
  448. package/dist/types/components/six-checkbox/six-checkbox.d.ts +5 -17
  449. package/dist/types/components/six-datepicker/components/day-selection.d.ts +9 -5
  450. package/dist/types/components/six-datepicker/components/month-selection.d.ts +8 -5
  451. package/dist/types/components/six-datepicker/components/year-selection.d.ts +7 -5
  452. package/dist/types/components/six-datepicker/six-datepicker.d.ts +41 -52
  453. package/dist/types/components/six-details/six-details.d.ts +12 -12
  454. package/dist/types/components/six-dialog/six-dialog.d.ts +12 -13
  455. package/dist/types/components/six-drawer/six-drawer.d.ts +12 -13
  456. package/dist/types/components/six-dropdown/six-dropdown.d.ts +28 -32
  457. package/dist/types/components/six-error-page/six-error-page.d.ts +1 -1
  458. package/dist/types/components/six-file-list-item/six-file-list-item.d.ts +3 -3
  459. package/dist/types/components/six-file-upload/six-file-upload.d.ts +11 -11
  460. package/dist/types/components/six-group-label/six-group-label.d.ts +5 -5
  461. package/dist/types/components/six-header/six-header.d.ts +16 -27
  462. package/dist/types/components/six-icon-button/six-icon-button.d.ts +4 -4
  463. package/dist/types/components/six-input/six-input.d.ts +9 -35
  464. package/dist/types/components/six-item-picker/six-item-picker.d.ts +13 -16
  465. package/dist/types/components/six-layout-grid/six-layout-grid.d.ts +1 -1
  466. package/dist/types/components/six-menu/six-menu.d.ts +10 -11
  467. package/dist/types/components/six-menu-item/six-menu-item.d.ts +6 -6
  468. package/dist/types/components/six-progress-ring/six-progress-ring.d.ts +2 -2
  469. package/dist/types/components/six-radio/six-radio.d.ts +5 -10
  470. package/dist/types/components/six-range/six-range.d.ts +6 -21
  471. package/dist/types/components/six-root/six-root.d.ts +3 -3
  472. package/dist/types/components/six-search-field/six-search-field.d.ts +4 -5
  473. package/dist/types/components/six-select/six-select.d.ts +19 -31
  474. package/dist/types/components/six-sidebar/six-sidebar.d.ts +5 -5
  475. package/dist/types/components/six-sidebar-item-group/six-sidebar-item-group.d.ts +7 -6
  476. package/dist/types/components/six-spinner/six-spinner.d.ts +2 -2
  477. package/dist/types/components/six-switch/six-switch.d.ts +18 -21
  478. package/dist/types/components/six-tab/six-tab.d.ts +3 -3
  479. package/dist/types/components/six-tab-group/six-tab-group.d.ts +20 -21
  480. package/dist/types/components/six-tab-panel/six-tab-panel.d.ts +1 -1
  481. package/dist/types/components/six-tag/six-tag.d.ts +1 -3
  482. package/dist/types/components/six-textarea/six-textarea.d.ts +9 -28
  483. package/dist/types/components/six-tile/six-tile.d.ts +2 -3
  484. package/dist/types/components/six-timepicker/six-timepicker.d.ts +26 -43
  485. package/dist/types/components/six-tooltip/six-tooltip.d.ts +19 -21
  486. package/dist/types/components.d.ts +190 -417
  487. package/dist/types/functional-components/form-control/form-control.d.ts +5 -6
  488. package/dist/types/index.d.ts +1 -0
  489. package/dist/types/testUtil/delay.d.ts +1 -1
  490. package/dist/types/types.d.ts +2 -0
  491. package/dist/types/utils/date-util.d.ts +18 -10
  492. package/dist/types/utils/error-messages.d.ts +42 -0
  493. package/dist/types/utils/event-listeners.d.ts +2 -1
  494. package/dist/types/utils/execution-control.d.ts +1 -3
  495. package/dist/types/utils/form.d.ts +1 -0
  496. package/dist/types/utils/modal.d.ts +2 -2
  497. package/dist/types/utils/popover.d.ts +5 -5
  498. package/dist/types/utils/popup.d.ts +9 -0
  499. package/dist/types/utils/slot.d.ts +2 -7
  500. package/dist/types/utils/tabbable.d.ts +1 -1
  501. package/dist/types/utils/time.util.d.ts +18 -9
  502. package/dist/types/utils/type-check.d.ts +3 -4
  503. package/dist/types/wrappers/set-attributes/set-attributes.d.ts +1 -1
  504. package/dist/ui-library/index.esm.js +1 -1
  505. package/dist/ui-library/index.esm.js.map +1 -1
  506. package/dist/ui-library/p-0108fe92.entry.js +2 -0
  507. package/dist/ui-library/p-0108fe92.entry.js.map +1 -0
  508. package/dist/ui-library/p-03a145f5.entry.js +2 -0
  509. package/dist/ui-library/p-03a145f5.entry.js.map +1 -0
  510. package/dist/ui-library/{p-3c635d0a.entry.js → p-087fdd96.entry.js} +2 -2
  511. package/dist/ui-library/p-087fdd96.entry.js.map +1 -0
  512. package/dist/ui-library/p-09779e47.entry.js +2 -0
  513. package/dist/ui-library/p-09779e47.entry.js.map +1 -0
  514. package/dist/ui-library/p-097cced4.entry.js.map +1 -1
  515. package/dist/ui-library/p-0b2c6348.js +2 -0
  516. package/dist/ui-library/p-0b2c6348.js.map +1 -0
  517. package/dist/ui-library/p-0cc08e91.js +2 -0
  518. package/dist/ui-library/p-0cc08e91.js.map +1 -0
  519. package/dist/ui-library/p-0fe78f9b.js +2 -0
  520. package/dist/ui-library/p-0fe78f9b.js.map +1 -0
  521. package/dist/ui-library/p-18e9f8b8.entry.js +2 -0
  522. package/dist/ui-library/p-18e9f8b8.entry.js.map +1 -0
  523. package/dist/ui-library/p-2761f908.js +2 -0
  524. package/dist/ui-library/p-2761f908.js.map +1 -0
  525. package/dist/ui-library/{p-19b50b5a.entry.js → p-28be55f0.entry.js} +2 -2
  526. package/dist/ui-library/p-28be55f0.entry.js.map +1 -0
  527. package/dist/ui-library/{p-c349d1d4.entry.js → p-3929b0af.entry.js} +2 -2
  528. package/dist/ui-library/p-3929b0af.entry.js.map +1 -0
  529. package/dist/ui-library/{p-9328e5bc.entry.js → p-445ba5b8.entry.js} +2 -2
  530. package/dist/ui-library/p-445ba5b8.entry.js.map +1 -0
  531. package/dist/ui-library/p-4d408fb4.js +2 -0
  532. package/dist/ui-library/p-4d408fb4.js.map +1 -0
  533. package/dist/ui-library/p-502ff3d3.entry.js +2 -0
  534. package/dist/ui-library/p-502ff3d3.entry.js.map +1 -0
  535. package/dist/ui-library/p-5a34c93e.entry.js +2 -0
  536. package/dist/ui-library/p-5a34c93e.entry.js.map +1 -0
  537. package/dist/ui-library/p-60621dc6.js +2 -0
  538. package/dist/ui-library/p-60621dc6.js.map +1 -0
  539. package/dist/ui-library/p-63703ba3.entry.js.map +1 -1
  540. package/dist/ui-library/p-66180e89.entry.js +2 -0
  541. package/dist/ui-library/p-66180e89.entry.js.map +1 -0
  542. package/dist/ui-library/p-686b12ec.entry.js +2 -0
  543. package/dist/ui-library/p-686b12ec.entry.js.map +1 -0
  544. package/dist/ui-library/p-71035abf.entry.js +2 -0
  545. package/dist/ui-library/p-71035abf.entry.js.map +1 -0
  546. package/dist/ui-library/{p-8a970a40.entry.js → p-724e154d.entry.js} +2 -2
  547. package/dist/ui-library/p-724e154d.entry.js.map +1 -0
  548. package/dist/ui-library/p-72ca96e1.entry.js +2 -0
  549. package/dist/ui-library/p-72ca96e1.entry.js.map +1 -0
  550. package/dist/ui-library/p-73597d13.entry.js.map +1 -1
  551. package/dist/ui-library/{p-c30f9e0b.entry.js → p-778cf804.entry.js} +2 -2
  552. package/dist/ui-library/p-778cf804.entry.js.map +1 -0
  553. package/dist/ui-library/p-87032e26.entry.js +2 -0
  554. package/dist/ui-library/p-87032e26.entry.js.map +1 -0
  555. package/dist/ui-library/p-8cf72af6.js +2 -0
  556. package/dist/ui-library/p-8cf72af6.js.map +1 -0
  557. package/dist/ui-library/p-8e0b6b7e.entry.js +2 -0
  558. package/dist/ui-library/p-8e0b6b7e.entry.js.map +1 -0
  559. package/dist/ui-library/p-912092c0.entry.js +2 -0
  560. package/dist/ui-library/p-912092c0.entry.js.map +1 -0
  561. package/dist/ui-library/p-92ca6a84.entry.js +2 -0
  562. package/dist/ui-library/p-92ca6a84.entry.js.map +1 -0
  563. package/dist/ui-library/{p-d5633a29.entry.js → p-9337cdd6.entry.js} +2 -2
  564. package/dist/ui-library/p-9337cdd6.entry.js.map +1 -0
  565. package/dist/ui-library/p-9461417e.entry.js +2 -0
  566. package/dist/ui-library/p-9461417e.entry.js.map +1 -0
  567. package/dist/ui-library/p-a1d4f6cf.entry.js.map +1 -1
  568. package/dist/ui-library/p-a49ae60a.entry.js +2 -0
  569. package/dist/ui-library/p-a49ae60a.entry.js.map +1 -0
  570. package/dist/ui-library/{p-611e1978.entry.js → p-a844cb72.entry.js} +2 -2
  571. package/dist/ui-library/{p-611e1978.entry.js.map → p-a844cb72.entry.js.map} +1 -1
  572. package/dist/ui-library/p-afcbe9da.entry.js +2 -0
  573. package/dist/ui-library/p-afcbe9da.entry.js.map +1 -0
  574. package/dist/ui-library/{p-97cc839c.entry.js → p-b3bff992.entry.js} +2 -2
  575. package/dist/ui-library/p-b3bff992.entry.js.map +1 -0
  576. package/dist/ui-library/p-b4547fb5.entry.js +2 -0
  577. package/dist/ui-library/p-b4547fb5.entry.js.map +1 -0
  578. package/dist/ui-library/{p-4f8394d7.js → p-ba74863a.js} +2 -2
  579. package/dist/ui-library/p-ba74863a.js.map +1 -0
  580. package/dist/ui-library/p-bd8f8eef.entry.js +2 -0
  581. package/dist/ui-library/p-bd8f8eef.entry.js.map +1 -0
  582. package/dist/ui-library/p-c57f16af.entry.js +2 -0
  583. package/dist/ui-library/p-c57f16af.entry.js.map +1 -0
  584. package/dist/ui-library/p-c5cdba08.entry.js +2 -0
  585. package/dist/ui-library/p-c5cdba08.entry.js.map +1 -0
  586. package/dist/ui-library/p-c87810b0.entry.js +2 -0
  587. package/dist/ui-library/p-c87810b0.entry.js.map +1 -0
  588. package/dist/ui-library/{p-af793d04.entry.js → p-cdcde4cd.entry.js} +2 -2
  589. package/dist/ui-library/p-cdcde4cd.entry.js.map +1 -0
  590. package/dist/ui-library/p-d6798d35.entry.js +2 -0
  591. package/dist/ui-library/p-d6798d35.entry.js.map +1 -0
  592. package/dist/ui-library/p-d87a6f4d.js +2 -0
  593. package/dist/ui-library/p-d87a6f4d.js.map +1 -0
  594. package/dist/ui-library/p-dc3f5996.entry.js +2 -0
  595. package/dist/ui-library/p-dc3f5996.entry.js.map +1 -0
  596. package/dist/ui-library/p-dcd7c547.entry.js +2 -0
  597. package/dist/ui-library/p-dcd7c547.entry.js.map +1 -0
  598. package/dist/ui-library/p-e07b3f0c.entry.js +2 -0
  599. package/dist/ui-library/p-e07b3f0c.entry.js.map +1 -0
  600. package/dist/ui-library/{p-19364560.entry.js → p-e8feb81f.entry.js} +2 -2
  601. package/dist/ui-library/{p-19364560.entry.js.map → p-e8feb81f.entry.js.map} +1 -1
  602. package/dist/ui-library/p-ef3936e5.entry.js +2 -0
  603. package/dist/ui-library/p-ef3936e5.entry.js.map +1 -0
  604. package/dist/ui-library/p-f0dd77e1.entry.js +2 -0
  605. package/dist/ui-library/p-f0dd77e1.entry.js.map +1 -0
  606. package/dist/ui-library/ui-library.esm.js +1 -1
  607. package/dist/ui-library/ui-library.esm.js.map +1 -1
  608. package/package.json +2 -2
  609. package/dist/cjs/event-listeners-74715e62.js +0 -45
  610. package/dist/cjs/event-listeners-74715e62.js.map +0 -1
  611. package/dist/cjs/execution-control-46f388e0.js.map +0 -1
  612. package/dist/cjs/focus-visible-0b352c74.js.map +0 -1
  613. package/dist/cjs/form-control-2c17c573.js.map +0 -1
  614. package/dist/cjs/modal-48d42228.js.map +0 -1
  615. package/dist/cjs/popover-f743f62b.js.map +0 -1
  616. package/dist/cjs/six-form.cjs.entry.js +0 -231
  617. package/dist/cjs/six-form.cjs.entry.js.map +0 -1
  618. package/dist/cjs/six-timepicker.types-c19ebff3.js +0 -56
  619. package/dist/cjs/six-timepicker.types-c19ebff3.js.map +0 -1
  620. package/dist/cjs/slot-ad537f24.js.map +0 -1
  621. package/dist/collection/components/six-form/six-form.css +0 -11
  622. package/dist/collection/components/six-form/six-form.js +0 -419
  623. package/dist/collection/components/six-form/six-form.js.map +0 -1
  624. package/dist/collection/components/six-timepicker/six-time-format.js +0 -15
  625. package/dist/collection/components/six-timepicker/six-time-format.js.map +0 -1
  626. package/dist/collection/components/six-timepicker/six-timepicker.types.js +0 -41
  627. package/dist/collection/components/six-timepicker/six-timepicker.types.js.map +0 -1
  628. package/dist/collection/utils/as-array.js +0 -2
  629. package/dist/collection/utils/as-array.js.map +0 -1
  630. package/dist/collection/utils/matchers.js +0 -3
  631. package/dist/collection/utils/matchers.js.map +0 -1
  632. package/dist/collection/utils/testing.js +0 -39
  633. package/dist/collection/utils/testing.js.map +0 -1
  634. package/dist/components/six-form.d.ts +0 -11
  635. package/dist/components/six-form.js +0 -252
  636. package/dist/components/six-form.js.map +0 -1
  637. package/dist/esm/event-listeners-570a24ea.js +0 -43
  638. package/dist/esm/event-listeners-570a24ea.js.map +0 -1
  639. package/dist/esm/execution-control-1a60d709.js.map +0 -1
  640. package/dist/esm/focus-visible-97933ea9.js.map +0 -1
  641. package/dist/esm/form-control-3b440ea1.js.map +0 -1
  642. package/dist/esm/modal-5ebdc320.js.map +0 -1
  643. package/dist/esm/popover-bd2c2fca.js.map +0 -1
  644. package/dist/esm/six-form.entry.js +0 -227
  645. package/dist/esm/six-form.entry.js.map +0 -1
  646. package/dist/esm/six-timepicker.types-e161a447.js +0 -50
  647. package/dist/esm/six-timepicker.types-e161a447.js.map +0 -1
  648. package/dist/esm/slot-6f3984c7.js.map +0 -1
  649. package/dist/types/components/six-form/six-form.d.ts +0 -69
  650. package/dist/types/components/six-timepicker/six-time-format.d.ts +0 -13
  651. package/dist/types/components/six-timepicker/six-timepicker.types.d.ts +0 -36
  652. package/dist/types/utils/as-array.d.ts +0 -1
  653. package/dist/types/utils/matchers.d.ts +0 -2
  654. package/dist/types/utils/popper.d.ts +0 -33
  655. package/dist/types/utils/testing.d.ts +0 -2
  656. package/dist/ui-library/p-054e12cc.entry.js +0 -2
  657. package/dist/ui-library/p-054e12cc.entry.js.map +0 -1
  658. package/dist/ui-library/p-0786fa7c.js +0 -2
  659. package/dist/ui-library/p-0786fa7c.js.map +0 -1
  660. package/dist/ui-library/p-163f2bb0.entry.js +0 -2
  661. package/dist/ui-library/p-163f2bb0.entry.js.map +0 -1
  662. package/dist/ui-library/p-18e5f772.entry.js +0 -2
  663. package/dist/ui-library/p-18e5f772.entry.js.map +0 -1
  664. package/dist/ui-library/p-18ea0c56.js +0 -2
  665. package/dist/ui-library/p-18ea0c56.js.map +0 -1
  666. package/dist/ui-library/p-19b50b5a.entry.js.map +0 -1
  667. package/dist/ui-library/p-2e48c8d2.entry.js +0 -2
  668. package/dist/ui-library/p-2e48c8d2.entry.js.map +0 -1
  669. package/dist/ui-library/p-308261c4.entry.js +0 -2
  670. package/dist/ui-library/p-308261c4.entry.js.map +0 -1
  671. package/dist/ui-library/p-33f7e22b.entry.js +0 -2
  672. package/dist/ui-library/p-33f7e22b.entry.js.map +0 -1
  673. package/dist/ui-library/p-394a2a12.entry.js +0 -2
  674. package/dist/ui-library/p-394a2a12.entry.js.map +0 -1
  675. package/dist/ui-library/p-3c635d0a.entry.js.map +0 -1
  676. package/dist/ui-library/p-4ae91795.entry.js +0 -2
  677. package/dist/ui-library/p-4ae91795.entry.js.map +0 -1
  678. package/dist/ui-library/p-4f8394d7.js.map +0 -1
  679. package/dist/ui-library/p-53a13db5.entry.js +0 -2
  680. package/dist/ui-library/p-53a13db5.entry.js.map +0 -1
  681. package/dist/ui-library/p-559c87f0.entry.js +0 -2
  682. package/dist/ui-library/p-559c87f0.entry.js.map +0 -1
  683. package/dist/ui-library/p-5a25d6fb.entry.js +0 -2
  684. package/dist/ui-library/p-5a25d6fb.entry.js.map +0 -1
  685. package/dist/ui-library/p-6403fd87.entry.js +0 -2
  686. package/dist/ui-library/p-6403fd87.entry.js.map +0 -1
  687. package/dist/ui-library/p-6433c0da.entry.js +0 -2
  688. package/dist/ui-library/p-6433c0da.entry.js.map +0 -1
  689. package/dist/ui-library/p-79eee01b.js +0 -2
  690. package/dist/ui-library/p-79eee01b.js.map +0 -1
  691. package/dist/ui-library/p-8a970a40.entry.js.map +0 -1
  692. package/dist/ui-library/p-90824648.entry.js +0 -2
  693. package/dist/ui-library/p-90824648.entry.js.map +0 -1
  694. package/dist/ui-library/p-9328e5bc.entry.js.map +0 -1
  695. package/dist/ui-library/p-97cc839c.entry.js.map +0 -1
  696. package/dist/ui-library/p-9a860acc.js +0 -2
  697. package/dist/ui-library/p-9a860acc.js.map +0 -1
  698. package/dist/ui-library/p-9d1d222f.entry.js +0 -2
  699. package/dist/ui-library/p-9d1d222f.entry.js.map +0 -1
  700. package/dist/ui-library/p-af793d04.entry.js.map +0 -1
  701. package/dist/ui-library/p-b0e5658f.entry.js +0 -2
  702. package/dist/ui-library/p-b0e5658f.entry.js.map +0 -1
  703. package/dist/ui-library/p-b1e66136.js +0 -2
  704. package/dist/ui-library/p-b1e66136.js.map +0 -1
  705. package/dist/ui-library/p-b4dfb7cf.js +0 -2
  706. package/dist/ui-library/p-b4dfb7cf.js.map +0 -1
  707. package/dist/ui-library/p-b997e43c.entry.js +0 -2
  708. package/dist/ui-library/p-b997e43c.entry.js.map +0 -1
  709. package/dist/ui-library/p-c0cb6436.entry.js +0 -2
  710. package/dist/ui-library/p-c0cb6436.entry.js.map +0 -1
  711. package/dist/ui-library/p-c30f9e0b.entry.js.map +0 -1
  712. package/dist/ui-library/p-c349d1d4.entry.js.map +0 -1
  713. package/dist/ui-library/p-c53a63f9.entry.js +0 -2
  714. package/dist/ui-library/p-c53a63f9.entry.js.map +0 -1
  715. package/dist/ui-library/p-c640c2d8.entry.js +0 -2
  716. package/dist/ui-library/p-c640c2d8.entry.js.map +0 -1
  717. package/dist/ui-library/p-c94d0b07.entry.js +0 -2
  718. package/dist/ui-library/p-c94d0b07.entry.js.map +0 -1
  719. package/dist/ui-library/p-d12c6092.js +0 -2
  720. package/dist/ui-library/p-d12c6092.js.map +0 -1
  721. package/dist/ui-library/p-d5633a29.entry.js.map +0 -1
  722. package/dist/ui-library/p-df655bc9.entry.js +0 -2
  723. package/dist/ui-library/p-df655bc9.entry.js.map +0 -1
  724. package/dist/ui-library/p-f18ba86f.entry.js +0 -2
  725. package/dist/ui-library/p-f18ba86f.entry.js.map +0 -1
  726. package/dist/ui-library/p-f4938771.entry.js +0 -2
  727. package/dist/ui-library/p-f4938771.entry.js.map +0 -1
  728. package/dist/ui-library/p-f604e067.entry.js +0 -2
  729. package/dist/ui-library/p-f604e067.entry.js.map +0 -1
  730. package/dist/ui-library/p-f70e2403.entry.js +0 -2
  731. package/dist/ui-library/p-f70e2403.entry.js.map +0 -1
  732. package/dist/ui-library/p-f9d345e0.entry.js +0 -2
  733. package/dist/ui-library/p-f9d345e0.entry.js.map +0 -1
  734. package/dist/ui-library/p-fed07a1f.entry.js +0 -2
  735. package/dist/ui-library/p-fed07a1f.entry.js.map +0 -1
  736. package/dist/ui-library/p-ff0257bf.entry.js +0 -2
  737. package/dist/ui-library/p-ff0257bf.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"six-timepicker.js","sourceRoot":"","sources":["../../../src/components/six-timepicker/six-timepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAW,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACxF,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEhH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAyB/C,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAC/B,MAAM,4BAA4B,GAAG,sBAAsB,CAAC;AAC5D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;;;;GAQG;AAMH,MAAM,OAAO,aAAa;;IACP,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IAuN/C,iBAAY,GAAY,IAAI,CAAC;IA4B7B,sBAAiB,GAAG,CAAC,KAAY,EA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I,CAAC,KAAK,GAAG,EAAE,CAAC,EAC9B,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE;UACL,iBAAiB,EAAE,IAAI;UACvB,0BAA0B,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB;UAC7F,8BAA8B,EAAE,IAAI,CAAC,MAAM;SAC5C;WAEG,IAAI,CAAC,UAAU,EAAE;QACpB,IAAI,CAAC,aAAa,EAAE,CACjB,CACP,CACG,CACP,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport { SixTimeFormat } from './six-time-format';\nimport { SixTime, SixTimePropertyName, TIME_FORMAT_CHAR } from './six-timepicker.types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n TIME_FORMAT_SEPARATOR,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { isNil } from '../../utils/type-check';\n\ninterface SixTimepickerBasePayload {\n value: SixTime;\n valueAsString: string;\n}\n\nexport interface SixTimepickerChange extends SixTimepickerBasePayload {\n changedProperty?: string;\n}\n\nexport interface SixTimepickerInput extends SixTimepickerBasePayload {}\n\nexport interface SixTimepickerBlur extends SixTimepickerBasePayload {}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: string;\n}\n\nconst TAG = `[SIX-TIMEPICKER]`;\nconst DEBOUNCE_TIMEPICKER_LISTENER = 'debounced-timepicker';\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private readonly eventListeners = new EventListeners();\n\n private popup: HTMLElement;\n\n private wrapper: HTMLElement;\n\n private inputElement: HTMLSixInputElement;\n\n @Element() host: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: SixTimeFormat = SixTimeFormat.HHmmss;\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = TIME_FORMAT_SEPARATOR;\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value?: string | null;\n\n /** Indicates whether or not the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether or not the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to make the input a required field. */\n @Prop({ reflect: true }) required: boolean;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string | null;\n\n /** Set to display the error text on blur and not when typing */\n @Prop() errorOnBlur = false;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string | null;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' })\n sixChangeDebounced: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Watch('debounce')\n protected debounceChanged() {\n this.eventListeners.removeByIdentifier(DEBOUNCE_TIMEPICKER_LISTENER);\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce(this.handleSixTimepickerChangeDebounced, this.debounce),\n DEBOUNCE_TIMEPICKER_LISTENER\n );\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged(newValue: string) {\n if (this.value !== newValue) {\n this.value = newValue;\n }\n this.setupInternalTime();\n this.sixChange.emit({\n value: this.internalValue,\n valueAsString: createTimeString(this.internalValue, this.format),\n });\n }\n\n /** Checks for validity and shows the browser's validation message if the control is invalid. */\n @Method()\n async reportValidity() {\n return this.inputElement.reportValidity();\n }\n\n /** Checks for validity. */\n @Method()\n async checkValidity() {\n return this.inputElement.checkValidity();\n }\n\n /** Sets a custom validation message. If `message` is not empty, the field will be considered invalid. */\n @Method()\n async setCustomValidity(message: string) {\n await this.inputElement.setCustomValidity(message);\n }\n\n /** Resets the formcontrol */\n @Method()\n async reset() {\n this.internalValue = this.defaultValue;\n this.inputElement.value = createTimeString(this.internalValue, this.format);\n await this.inputElement.reset();\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State()\n private internalValue: SixTime;\n\n private defaultValue: SixTime = null;\n\n componentWillLoad() {\n this.setupInternalTime();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce(this.handleSixTimepickerChangeDebounced, this.debounce),\n DEBOUNCE_TIMEPICKER_LISTENER\n );\n this.eventListeners.add(this.inputElement, 'six-input-input', debounce(this.handleInputChange, this.debounce));\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private handleInputChange = (event: Event) => {\n event.stopPropagation();\n const inputValue = this.inputElement.value;\n\n if (!isValidTimeString(inputValue, this.format)) {\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n }\n\n this.internalValue = parseTimeString(inputValue, this.format);\n this.sixChange.emit({\n value: this.internalValue,\n valueAsString: createTimeString(this.internalValue, this.format),\n });\n };\n\n private calcIsPopupContentUp() {\n if (!this.inputElement || !this.wrapper) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n /*\n * The position of the hoisted timepicker needs to be correctly calculated since the position changes to fixed.\n * Thus if the user scrolls or adjusts the screen size we need to recalculate the timepicker position.\n */\n private moveOpenHoistedPopup() {\n if (!this.hoist || !this.open) {\n return;\n }\n\n const popupBoundingClientRect = this.popup.getBoundingClientRect();\n const popupHeight = popupBoundingClientRect.height;\n const inputBoundingClientRect = this.inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const inputHeight = inputBoundingClientRect.height;\n\n this.calcIsPopupContentUp();\n\n if (this.isPopupContentUp) {\n this.popup.style.top = `${inputTop - popupHeight}px`;\n } else {\n this.popup.style.top = `${inputTop + inputHeight}px`;\n }\n }\n\n private handleSixTimepickerChangeDebounced = ({ detail }) => {\n this.sixChangeDebounced.emit(detail);\n };\n\n private handleChange = (event: CustomEvent<SixItemPickerChangePayload>, property: string) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n\n // update the internal state\n this.internalValue[property] = event.detail;\n\n const timeString = createTimeString(this.internalValue, this.format);\n\n // fire timepicker's own event\n this.sixChange.emit({\n changedProperty: property,\n value: this.internalValue,\n valueAsString: timeString,\n });\n\n // update the input value\n this.value = timeString;\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n value={this.internalValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handleChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private setupInternalTime() {\n if (this.is12HourClock() && !this.format.includes(TIME_FORMAT_CHAR.PERIOD)) {\n console.error(\n `${TAG} You provided a 12-hour-clock format but are missing the period (am or pm) in the time-format-string!`\n );\n }\n\n if (this.value === null || this.value === undefined) {\n this.internalValue = isNil(this.defaultTime)\n ? getCurrentTime(this.is24HourClock())\n : parseTimeString(this.defaultTime, this.format);\n } else {\n this.internalValue = parseTimeString(this.value, this.format);\n }\n\n this.defaultValue = this.internalValue;\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: SixTimePropertyName.HOURS });\n }\n\n private is24HourClock() {\n return this.format.includes(TIME_FORMAT_CHAR.HOUR_24);\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: SixTimePropertyName.HOURS });\n }\n\n private is12HourClock() {\n return this.format.includes(TIME_FORMAT_CHAR.HOUR_12);\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: SixTimePropertyName.PERIOD,\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes(TIME_FORMAT_CHAR.MINUTE)) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: SixTimePropertyName.MINUTES });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes(TIME_FORMAT_CHAR.SECOND)) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: SixTimePropertyName.SECONDS });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes(TIME_FORMAT_CHAR.MILLISECOND)) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: SixTimePropertyName.MILLISECONDS,\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: MouseEvent) => {\n // Close when clicking outside of the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.value = undefined;\n this.sixClear.emit();\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n private calcIsDropDownContentUp() {\n if (!this.inputElement || !this.wrapper) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isDropDownContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n /*\n * If the popup is hoisted we popup is hoisted its position will change to fix to not be clipped of by a containing container.\n * To render the popup correctly we render it normally, and then assign this screenposition to the fixed popup\n */\n private adjustPopupForHoisting() {\n if (!this.hoist) {\n return;\n }\n\n // execute after dropdown has been rendered to make sure the popup reference is correctly set\n setTimeout(() => {\n if (!this.popup) {\n return;\n }\n\n // take a snapshot of normally rendered popup\n const popupBoundingClientRect = this.popup.getBoundingClientRect();\n\n // apply screen position to fixed popup\n this.popup.style.position = 'fixed';\n ['top', 'left', 'width', 'height'].forEach((property) => {\n this.popup.style[property] = `${popupBoundingClientRect[property]}px`;\n });\n\n const inputBoundingClientRect = this.inputElement.getBoundingClientRect();\n const inputTop = inputBoundingClientRect.top;\n const popupTop = popupBoundingClientRect.top;\n\n this.calcIsDropDownContentUp();\n // check screen position to check whether the popup should be moved above or below the trigger element\n if (this.isDropDownContentUp && inputTop < popupTop) {\n // move popup above input field if timepicker is at bottom of screen\n this.popup.style.top = `${popupTop - popupBoundingClientRect.height - inputBoundingClientRect.height}px`;\n }\n }, 0);\n }\n\n render() {\n this.adjustPopupForHoisting();\n\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n value={this.value}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n error-text={this.errorText}\n error-on-blur={this.errorOnBlur}\n class={{\n 'input--empty': !this.value,\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'error-text') ? (\n <span slot=\"error-text\">\n <slot name=\"error-text\" />\n </span>\n ) : null}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement ? this.placement === 'top' : this.isPopupContentUp,\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()}\n {this.getAmPmPicker()}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-timepicker.js","sourceRoot":"","sources":["../../../src/components/six-timepicker/six-timepicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAIhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAEhH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkBtE,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;;;;GAQG;AAMH,MAAM,OAAO,aAAa;;IAChB,mBAAc,GAAG,IAAI,cAAc,EAAE,CAAC;IA2RtC,uBAAkB,GAAG,CAAC,KAA8C,EAAE,QAAwB,EAAE,EAAE;MACxG,oGAAoG;MACpG,KAAK,CAAC,eAAe,EAAE,CAAC;MACxB,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,EAAE;QAC3B,OAAO;OACR;MAED,4BAA4B;MAC5B,6DAA6D;MAC7D,aAAa;MACb,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { ItemPickerType } from '../six-item-picker/types';\nimport {\n createTimeString,\n getCurrentTime,\n isValidTimeString,\n parseTimeString,\n Time,\n TimeFormat,\n TimeProperties,\n} from '../../utils/time.util';\nimport { debounce, DEFAULT_DEBOUNCE_FAST, DEFAULT_DEBOUNCE_INSANELY_FAST } from '../../utils/execution-control';\nimport { SixItemPickerChangePayload } from '../six-item-picker/six-item-picker';\nimport { EventListeners } from '../../utils/event-listeners';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { adjustPopupForHoisting, movePopup } from '../../utils/popup';\n\nexport interface SixTimepickerChange {\n value?: Time;\n valueAsString: string;\n changedProperty?: string;\n}\n\ninterface SixTimeUnitPickerParams {\n min?: number;\n max?: number;\n items?: string[];\n type?: ItemPickerType;\n class?: string;\n paddingLength?: number;\n propertyName: TimeProperties;\n}\n\nconst MIN_POPUP_HEIGHT = 145;\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @part input - The input field\n * @part container - The container of whole component\n * @part popup - The popup of the timepicker component\n *\n */\n@Component({\n tag: 'six-timepicker',\n styleUrl: 'six-timepicker.scss',\n shadow: true,\n})\nexport class SixTimepicker {\n private eventListeners = new EventListeners();\n private popup?: HTMLElement;\n private wrapper?: HTMLElement;\n private inputElement?: HTMLSixInputElement;\n @Element() host!: HTMLSixTimepickerElement;\n\n /**\n * Define the time format. Valid formats are:\n *\n * HH:mm:ss\n * hh:mm:ss:aa\n * HH:mm:ss:ms\n * hh:mm:ss:ms:aa\n * HH:mm\n * hh:mm:aa\n * HH\n * hh:aa\n * mm\n * ss\n * ms\n *\n * where HH is the 24 hour format\n * and hh is the 12 hour format\n *\n * Please notice that when using the 12-hour-clock (hh)\n * you always need a period indicator (aa). So the time can be parsed as either am or pm\n * */\n @Prop() format: TimeFormat = 'HH:mm:ss';\n\n /**\n * Define the separator to be shown between the time unit pickers.\n * Please be aware that this property will modify the displayed separator only.\n * The separator for a timestring is always expected to be a colon (eg. '13:52:20')\n * */\n @Prop() separator = ':';\n\n /**\n * The value of the timepicker provided as a string. The string mast match the provided format (or default format)\n */\n @Prop({ mutable: true }) value = '';\n\n /** Indicates whether the timepicker dropdown is open on startup. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** Indicates whether the timepicker should be shown as an inline (always open) component */\n @Prop({ reflect: true }) inline = false;\n\n /**\n * If `true` the user can only select a time via the timepicker but not directly edit the input field.\n */\n @Prop() readonly = false;\n\n /**\n * If `true` the component is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * The enforced placement of the dropdown panel.\n */\n @Prop() placement?: 'top' | 'bottom';\n\n /** Timepicker size. */\n @Prop() size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to show an asterisk beneath the label. */\n @Prop() required = false;\n\n /**\n * The placeholder defines what text to be shown on the input element\n */\n @Prop() placeholder?: string;\n\n /** The input's error text. Alternatively, you can use the error-text slot. */\n @Prop() errorText = '';\n\n /** The input's label. Alternatively, you can use the label slot. */\n @Prop() label = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** The input's name attribute. */\n @Prop({ reflect: true }) name = '';\n\n /** Set to true to add a clear button when the input is populated. */\n @Prop() clearable = false;\n\n /** Set the position of the icon */\n @Prop() iconPosition: 'left' | 'right' = 'left';\n\n /**\n * Enable this option to prevent the panel from being clipped when the component is placed inside a container with\n * `overflow: auto|scroll`.\n */\n @Prop() hoist = false;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger faster switching between timeunits (e.g. hours).\n */\n @Prop() timeout = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Set the amount of time, in milliseconds, to wait between switching to next timeunit (e.g. next hour) when mouse button is held pressed.\n */\n @Prop() interval = DEFAULT_DEBOUNCE_INSANELY_FAST;\n\n /**\n * The defaultTime defines the default setting for the timepicker when you open the popup. Default time must match the provided format.\n */\n @Prop() defaultTime?: string;\n\n /**\n * Set the amount of time, in milliseconds, to wait to trigger the `six-timepicker-change-debounced` event.\n * If you want your change debounce event to not trigger when keeping the nav button pressed before, make sure debounce\n * is a bit bigger than timeout, otherwise keeping the button pressed will trigger the event twice: once you click\n * (and keep pressed) and once you release\n */\n @Prop() debounce = DEFAULT_DEBOUNCE_FAST;\n\n /**\n * Emitted when the timepicker's value changes\n */\n @Event({ eventName: 'six-timepicker-change' }) sixChange!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the timepicker's value changes, but debounced\n */\n @Event({ eventName: 'six-timepicker-change-debounced' }) sixChangeDebounced!: EventEmitter<SixTimepickerChange>;\n\n /**\n * Emitted when the clear button is activated.\n */\n @Event({ eventName: 'six-timepicker-clear' }) sixClear!: EventEmitter<EmptyPayload>;\n\n @State() isPopupContentUp = false;\n\n @State() isDropDownContentUp = false;\n\n @Listen('resize', { target: 'window' })\n async resizeHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n @Listen('scroll', { target: 'window' })\n async scrollHandler() {\n this.calcIsPopupContentUp();\n this.moveOpenHoistedPopup();\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n this.updateValue();\n }\n\n @Watch('invalid')\n protected invalidChanged(invalid: boolean) {\n if (this.inputElement) {\n this.inputElement.invalid = invalid;\n }\n }\n\n /** Sets focus on the datepickers input. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.inputElement?.setFocus(options);\n }\n\n /*\n * Internally the six-timepicker uses a standardized representation of time, so we don't have a mess,\n * when switching between formats\n */\n @State() private popupValue: Time = {};\n\n connectedCallback() {\n this.eventListeners.forward('six-timepicker-change', 'change', this.host);\n }\n\n componentWillLoad() {\n this.updateValue();\n\n if (this.inline) {\n this.open = true;\n }\n\n if (this.open) {\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n componentDidLoad() {\n if (this.inputElement == null) return;\n const inputElement = this.inputElement;\n\n // emit debounced change event\n this.eventListeners.add(\n this.host,\n 'six-timepicker-change',\n debounce((event: Event) => this.sixChangeDebounced.emit((event as CustomEvent).detail), this.debounce)\n );\n\n // update value and popup value based on input-element value\n this.eventListeners.add(\n inputElement,\n 'six-input-input',\n debounce((event: Event) => {\n event.stopPropagation();\n\n // emit empty event if time string is invalid\n if (!isValidTimeString(inputElement.value, this.format)) {\n this.value = inputElement.value;\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n return;\n }\n\n // update value and popup value, and emit the new value\n this.value = inputElement.value;\n this.popupValue = parseTimeString(inputElement.value, this.format);\n this.sixChange.emit({\n value: this.popupValue,\n valueAsString: createTimeString(this.popupValue, this.format),\n });\n }, this.debounce)\n );\n }\n\n componentDidRender() {\n adjustPopupForHoisting(\n this.hoist,\n this.popup,\n this.inputElement,\n this.wrapper,\n MIN_POPUP_HEIGHT,\n (isUp) => (this.isDropDownContentUp = isUp)\n );\n }\n\n disconnectedCallback() {\n this.eventListeners.removeAll();\n }\n\n private updateValue() {\n // normalize value\n if (typeof this.value !== 'string' || !isValidTimeString(this.value, this.format)) {\n this.value = '';\n }\n\n // update popup value\n if (this.value === '') {\n if (this.defaultTime == null) {\n this.popupValue = getCurrentTime(this.is24HourClock());\n } else {\n this.popupValue = parseTimeString(this.defaultTime, this.format);\n }\n } else {\n this.popupValue = parseTimeString(this.value, this.format);\n }\n }\n\n private calcIsPopupContentUp() {\n if (this.inputElement == null || this.wrapper == null) {\n return;\n }\n\n const inputBoundingRect = this.inputElement.getBoundingClientRect();\n const wrapperBoundingRect = this.wrapper.getBoundingClientRect();\n const minPopupHeight = Math.max(wrapperBoundingRect.height, MIN_POPUP_HEIGHT);\n\n const moreSpaceInTop = inputBoundingRect.y > window.innerHeight / 2;\n this.isPopupContentUp = moreSpaceInTop && window.innerHeight < inputBoundingRect.bottom + minPopupHeight;\n }\n\n private moveOpenHoistedPopup() {\n movePopup(this.hoist, this.open, this.popup, this.inputElement, this.wrapper, MIN_POPUP_HEIGHT);\n }\n\n private handlePickerChange = (event: CustomEvent<SixItemPickerChangePayload>, property: TimeProperties) => {\n // stop propagation, since the timepicker should not expose the events of the underlying item-picker\n event.stopPropagation();\n if (this.popupValue == null) {\n return;\n }\n\n // update the internal state\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this.popupValue[property] = event.detail;\n\n const timeString = createTimeString(this.popupValue, this.format);\n\n // update the input value\n this.value = timeString;\n\n // emit change event\n this.sixChange.emit({\n changedProperty: property,\n value: this.popupValue,\n valueAsString: timeString,\n });\n };\n\n private getSixTimeUnitPicker(params: SixTimeUnitPickerParams) {\n return (\n <six-item-picker\n class={params.class}\n timeout={this.timeout}\n interval={this.interval}\n padded\n min={params.min}\n max={params.max}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n value={this.popupValue[params.propertyName]}\n items={params.items}\n type={params.type || ItemPickerType.NUMBER}\n padding-length={params.paddingLength}\n onSix-item-picker-change={(event) => this.handlePickerChange(event, params.propertyName)}\n ></six-item-picker>\n );\n }\n\n private getHour24Picker() {\n if (!this.is24HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 23, propertyName: 'hours' });\n }\n\n private is24HourClock() {\n return this.format.includes('HH');\n }\n\n private getHour12Picker() {\n if (!this.is12HourClock()) {\n return;\n }\n return this.getSixTimeUnitPicker({ min: 0, max: 11, propertyName: 'hours' });\n }\n\n private is12HourClock() {\n return this.format.includes('hh');\n }\n\n private getAmPmPicker() {\n if (!this.is12HourClock()) {\n return;\n }\n const items = ['AM', 'PM'];\n return this.getSixTimeUnitPicker({\n items,\n type: ItemPickerType.CUSTOM,\n propertyName: 'period',\n });\n }\n\n private getMinutePicker() {\n if (!this.format.includes('mm')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'minutes' });\n }\n\n private getSecondsPicker() {\n if (!this.format.includes('ss')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({ min: 0, max: 59, propertyName: 'seconds' });\n }\n\n private getMillisecondsPicker() {\n if (!this.format.includes('ms')) {\n return;\n }\n\n return this.getSixTimeUnitPicker({\n min: 0,\n max: 999,\n class: 'timepicker__item--wide',\n paddingLength: 3,\n propertyName: 'milliseconds',\n });\n }\n\n private getSeparator() {\n return (\n <div class=\"timepicker__separator\">\n <span>{this.separator}</span>\n </div>\n );\n }\n\n private getContent() {\n const elementsInOrder = [\n this.getHour24Picker(),\n this.getHour12Picker(),\n this.getMinutePicker(),\n this.getSecondsPicker(),\n this.getMillisecondsPicker(),\n ];\n\n const visibleElements = elementsInOrder.filter((el) => el !== undefined);\n\n return visibleElements.map((el, idx) => {\n if (idx === visibleElements.length - 1) {\n return [el];\n }\n\n return [el, this.getSeparator()];\n });\n }\n\n private openPopup() {\n if (!this.open && !this.disabled) {\n this.open = true;\n this.eventListeners.add(document, 'mousedown', this.handleDocumentMouseDown);\n }\n }\n\n private closePopup() {\n if (this.inline) {\n return;\n }\n\n this.open = false;\n this.eventListeners.remove(document, 'mousedown', this.handleDocumentMouseDown);\n }\n\n private handleDocumentMouseDown = (event: Event) => {\n // Close when clicking outside the containing element\n const path = event.composedPath() as EventTarget[];\n if (!path.includes(this.host)) {\n this.closePopup();\n return;\n }\n };\n\n private handleClearClick = (event: MouseEvent) => {\n event.stopPropagation();\n this.value = '';\n this.sixClear.emit();\n this.sixChange.emit({\n value: {},\n valueAsString: '',\n });\n };\n\n private renderClearable() {\n return (\n this.clearable && (\n <button\n slot=\"suffix\"\n class={{\n timepicker_clear: true,\n 'timepicker_clear--right': this.iconPosition === 'left',\n 'timepicker_clear--left': this.iconPosition === 'right',\n }}\n type=\"button\"\n onClick={this.handleClearClick}\n tabindex=\"-1\"\n >\n <six-icon size=\"small\">clear</six-icon>\n </button>\n )\n );\n }\n\n private renderCustomIcon() {\n const icon = hasSlot(this.host, 'custom-icon') ? (\n <slot name=\"custom-icon\"></slot>\n ) : (\n <six-icon size={this.size === 'large' ? 'medium' : this.size}>watch_later</six-icon>\n );\n\n return (\n <span\n slot=\"prefix\"\n part=\"icon\"\n class={{\n prefix: true,\n 'prefix--right': this.iconPosition === 'right',\n }}\n >\n {icon}\n </span>\n );\n }\n\n render() {\n return (\n <div part=\"container\" ref={(el) => (this.wrapper = el)} class=\"timepicker__container\">\n <six-input\n ref={(el) => (this.inputElement = el)}\n part=\"input\"\n onClick={() => this.openPopup()}\n value={this.value}\n placeholder={this.placeholder}\n readonly={this.readonly}\n disabled={this.disabled}\n size={this.size}\n name={this.name}\n label={this.label}\n required={this.required}\n error-text={this.errorText}\n class={{\n 'input--empty': this.value === '',\n 'input--hide': this.inline,\n }}\n >\n {this.renderCustomIcon()}\n {this.renderClearable()}\n {hasSlot(this.host, 'label') ? (\n <span slot=\"label\">\n <slot name=\"label\" />\n </span>\n ) : null}\n </six-input>\n {this.open && (\n <div\n ref={(el) => (this.popup = el)}\n part=\"popup\"\n class={{\n timepicker__popup: true,\n 'timepicker__popup--is-up': this.placement == null ? this.placement === 'top' : this.isPopupContentUp,\n 'timepicker__popup--is-inline': this.inline,\n }}\n >\n {...this.getContent()}\n {this.getAmPmPicker()}\n </div>\n )}\n </div>\n );\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { Host, h } from '@stencil/core';
1
+ import { h, Host } from '@stencil/core';
2
2
  import Popover from '../../utils/popover';
3
3
  let id = 0;
4
4
  /**
@@ -16,6 +16,48 @@ export class SixTooltip {
16
16
  constructor() {
17
17
  this.componentId = `tooltip-${++id}`;
18
18
  this.isVisible = false;
19
+ this.handleBlur = () => {
20
+ if (this.hasTrigger('focus')) {
21
+ this.hide();
22
+ }
23
+ };
24
+ this.handleClick = () => {
25
+ if (this.hasTrigger('click')) {
26
+ this.open ? this.hide() : this.show();
27
+ }
28
+ };
29
+ this.handleFocus = () => {
30
+ if (this.hasTrigger('focus')) {
31
+ this.show();
32
+ }
33
+ };
34
+ this.handleKeyDown = (event) => {
35
+ // Pressing escape when the target element has focus should dismiss the tooltip
36
+ if (this.open && event.key === 'Escape') {
37
+ event.stopPropagation();
38
+ this.hide();
39
+ }
40
+ };
41
+ this.handleMouseOver = () => {
42
+ if (this.hasTrigger('hover')) {
43
+ this.show();
44
+ }
45
+ };
46
+ this.handleMouseOut = () => {
47
+ if (this.hasTrigger('hover')) {
48
+ this.hide();
49
+ }
50
+ };
51
+ this.handleSlotChange = () => {
52
+ const oldTarget = this.target;
53
+ const newTarget = this.getTarget();
54
+ if (newTarget !== oldTarget) {
55
+ if (oldTarget != null) {
56
+ oldTarget.removeAttribute('aria-describedby');
57
+ }
58
+ newTarget.setAttribute('aria-describedby', this.componentId);
59
+ }
60
+ };
19
61
  this.content = '';
20
62
  this.placement = 'top';
21
63
  this.disabled = false;
@@ -27,16 +69,9 @@ export class SixTooltip {
27
69
  handleOpenChange() {
28
70
  this.open ? this.show() : this.hide();
29
71
  }
30
- connectedCallback() {
31
- this.handleBlur = this.handleBlur.bind(this);
32
- this.handleClick = this.handleClick.bind(this);
33
- this.handleFocus = this.handleFocus.bind(this);
34
- this.handleKeyDown = this.handleKeyDown.bind(this);
35
- this.handleMouseOver = this.handleMouseOver.bind(this);
36
- this.handleMouseOut = this.handleMouseOut.bind(this);
37
- this.handleSlotChange = this.handleSlotChange.bind(this);
38
- }
39
72
  componentDidLoad() {
73
+ if (this.tooltipPositioner == null)
74
+ return;
40
75
  this.target = this.getTarget();
41
76
  this.popover = new Popover(this.target, this.tooltipPositioner);
42
77
  this.syncOptions();
@@ -53,7 +88,7 @@ export class SixTooltip {
53
88
  this.syncOptions();
54
89
  }
55
90
  disconnectedCallback() {
56
- if (this.popover) {
91
+ if (this.popover != null) {
57
92
  this.popover.destroy();
58
93
  }
59
94
  this.host.removeEventListener('blur', this.handleBlur, true);
@@ -62,6 +97,7 @@ export class SixTooltip {
62
97
  }
63
98
  /** Shows the tooltip. */
64
99
  async show() {
100
+ var _a;
65
101
  // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
66
102
  if (this.isVisible || this.disabled) {
67
103
  return;
@@ -73,10 +109,11 @@ export class SixTooltip {
73
109
  }
74
110
  this.isVisible = true;
75
111
  this.open = true;
76
- this.popover.show();
112
+ (_a = this.popover) === null || _a === void 0 ? void 0 : _a.show();
77
113
  }
78
114
  /** Shows the tooltip. */
79
115
  async hide() {
116
+ var _a;
80
117
  // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher
81
118
  if (!this.isVisible || this.disabled) {
82
119
  return;
@@ -88,63 +125,23 @@ export class SixTooltip {
88
125
  }
89
126
  this.isVisible = false;
90
127
  this.open = false;
91
- this.popover.hide();
128
+ (_a = this.popover) === null || _a === void 0 ? void 0 : _a.hide();
92
129
  }
93
130
  getTarget() {
94
131
  // Get the first child that isn't a <style> or content slot
95
132
  const target = [...this.host.children].find((el) => el.tagName.toLowerCase() !== 'style' && el.getAttribute('slot') !== 'content');
96
- if (!target) {
133
+ if (target == null) {
97
134
  throw new Error('Invalid tooltip target: no child element was found.');
98
135
  }
99
136
  return target;
100
137
  }
101
- handleBlur() {
102
- if (this.hasTrigger('focus')) {
103
- this.hide();
104
- }
105
- }
106
- handleClick() {
107
- if (this.hasTrigger('click')) {
108
- this.open ? this.hide() : this.show();
109
- }
110
- }
111
- handleFocus() {
112
- if (this.hasTrigger('focus')) {
113
- this.show();
114
- }
115
- }
116
- handleKeyDown(event) {
117
- // Pressing escape when the target element has focus should dismiss the tooltip
118
- if (this.open && event.key === 'Escape') {
119
- event.stopPropagation();
120
- this.hide();
121
- }
122
- }
123
- handleMouseOver() {
124
- if (this.hasTrigger('hover')) {
125
- this.show();
126
- }
127
- }
128
- handleMouseOut() {
129
- if (this.hasTrigger('hover')) {
130
- this.hide();
131
- }
132
- }
133
- handleSlotChange() {
134
- const oldTarget = this.target;
135
- const newTarget = this.getTarget();
136
- if (newTarget !== oldTarget) {
137
- if (oldTarget) {
138
- oldTarget.removeAttribute('aria-describedby');
139
- }
140
- newTarget.setAttribute('aria-describedby', this.componentId);
141
- }
142
- }
143
138
  hasTrigger(triggerType) {
144
139
  const triggers = this.trigger.split(' ');
145
140
  return triggers.includes(triggerType);
146
141
  }
147
142
  syncOptions() {
143
+ if (this.popover == null)
144
+ return;
148
145
  this.popover.setOptions({
149
146
  placement: this.placement,
150
147
  distance: this.distance,
@@ -204,7 +201,7 @@ export class SixTooltip {
204
201
  "optional": false,
205
202
  "docs": {
206
203
  "tags": [],
207
- "text": "The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside of the viewport."
204
+ "text": "The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\ninside the viewport."
208
205
  },
209
206
  "attribute": "placement",
210
207
  "reflect": false,
@@ -222,7 +219,7 @@ export class SixTooltip {
222
219
  "optional": false,
223
220
  "docs": {
224
221
  "tags": [],
225
- "text": "Set to true to disable the tooltip so it won't show when triggered."
222
+ "text": "Set to true to disable the tooltip, so it won't show when triggered."
226
223
  },
227
224
  "attribute": "disabled",
228
225
  "reflect": false,
@@ -258,7 +255,7 @@ export class SixTooltip {
258
255
  "optional": false,
259
256
  "docs": {
260
257
  "tags": [],
261
- "text": "Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods."
258
+ "text": "Indicates whether the tooltip is open. You can use this in lieu of the show/hide methods."
262
259
  },
263
260
  "attribute": "open",
264
261
  "reflect": true,
@@ -1 +1 @@
1
- {"version":3,"file":"six-tooltip.js","sourceRoot":"","sources":["../../../src/components/six-tooltip/six-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;GAUG;AAOH,MAAM,OAAO,UAAU;;IACrB,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;IAChC,cAAS,GAAG,KAAK,CAAC;mBASA,EAAE;qBAkBH,KAAK;oBAGH,KAAK;oBAGL,EAAE;gBAG0B,KAAK;oBAGjC,CAAC;mBAOF,aAAa;;EAG/B,gBAAgB;IACd,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;EACxC,CAAC;EAcD,iBAAiB;IACf,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC7C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CA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AE,IAAI,CAAC,IAAI;WAC3B,EACD,IAAI,EAAC,SAAS,iBACD,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;UAEzC,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h } from '@stencil/core';\nimport Popover from '../../utils/popover';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tooltip's target element. Only the first element will be used as the target.\n * @slot content - The tooltip's content. Alternatively, you can use the content prop.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-tooltip',\n styleUrl: 'six-tooltip.scss',\n shadow: true,\n})\nexport class SixTooltip {\n componentId = `tooltip-${++id}`;\n isVisible = false;\n popover: Popover;\n tooltipPositioner: HTMLElement;\n target: HTMLElement;\n tooltip: any;\n\n @Element() host: HTMLSixTooltipElement;\n\n /** The tooltip's content. Alternatively, you can use the content slot. */\n @Prop() content = '';\n\n /**\n * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\n * inside of the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** Set to true to disable the tooltip so it won't show when triggered. */\n @Prop() disabled = false;\n\n /** The distance in pixels from which to offset the tooltip away from its target. */\n @Prop() distance = 10;\n\n /** Indicates whether or not the tooltip is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The distance in pixels from which to offset the tooltip along its target. */\n @Prop() skidding = 0;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger = 'hover focus';\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the tooltip begins to show. Calling `event.preventDefault()` will prevent it from being shown. */\n @Event({ eventName: 'six-tooltip-show' }) sixShow: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has shown and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-show' }) sixAfterShow: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tooltip begins to hide. Calling `event.preventDefault()` will prevent it from being hidden. */\n @Event({ eventName: 'six-tooltip-hide' }) sixHide: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has hidden and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-hide' }) sixAfterHide: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleBlur = this.handleBlur.bind(this);\n this.handleClick = this.handleClick.bind(this);\n this.handleFocus = this.handleFocus.bind(this);\n this.handleKeyDown = this.handleKeyDown.bind(this);\n this.handleMouseOver = this.handleMouseOver.bind(this);\n this.handleMouseOut = this.handleMouseOut.bind(this);\n this.handleSlotChange = this.handleSlotChange.bind(this);\n }\n\n componentDidLoad() {\n this.target = this.getTarget();\n this.popover = new Popover(this.target, this.tooltipPositioner);\n this.syncOptions();\n\n this.host.addEventListener('blur', this.handleBlur, true);\n this.host.addEventListener('click', this.handleClick, true);\n this.host.addEventListener('focus', this.handleFocus, true);\n\n // Show on init if open\n this.tooltipPositioner.hidden = !this.open;\n if (this.open) {\n this.show();\n }\n }\n\n componentDidUpdate() {\n this.syncOptions();\n }\n\n disconnectedCallback() {\n if (this.popover) {\n this.popover.destroy();\n }\n\n this.host.removeEventListener('blur', this.handleBlur, true);\n this.host.removeEventListener('click', this.handleClick, true);\n this.host.removeEventListener('focus', this.handleFocus, true);\n }\n\n /** Shows the tooltip. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.disabled) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n this.popover.show();\n }\n\n /** Shows the tooltip. */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.disabled) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.isVisible = false;\n this.open = false;\n this.popover.hide();\n }\n\n getTarget() {\n // Get the first child that isn't a <style> or content slot\n const target = [...this.host.children].find(\n (el) => el.tagName.toLowerCase() !== 'style' && el.getAttribute('slot') !== 'content'\n ) as HTMLElement;\n\n if (!target) {\n throw new Error('Invalid tooltip target: no child element was found.');\n }\n\n return target;\n }\n\n handleBlur() {\n if (this.hasTrigger('focus')) {\n this.hide();\n }\n }\n\n handleClick() {\n if (this.hasTrigger('click')) {\n this.open ? this.hide() : this.show();\n }\n }\n\n handleFocus() {\n if (this.hasTrigger('focus')) {\n this.show();\n }\n }\n\n handleKeyDown(event: KeyboardEvent) {\n // Pressing escape when the target element has focus should dismiss the tooltip\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n }\n\n handleMouseOver() {\n if (this.hasTrigger('hover')) {\n this.show();\n }\n }\n\n handleMouseOut() {\n if (this.hasTrigger('hover')) {\n this.hide();\n }\n }\n\n handleSlotChange() {\n const oldTarget = this.target;\n const newTarget = this.getTarget();\n\n if (newTarget !== oldTarget) {\n if (oldTarget) {\n oldTarget.removeAttribute('aria-describedby');\n }\n newTarget.setAttribute('aria-describedby', this.componentId);\n }\n }\n\n hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n syncOptions() {\n this.popover.setOptions({\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.tooltip,\n onAfterHide: () => this.sixAfterHide.emit(),\n onAfterShow: () => this.sixAfterShow.emit(),\n });\n }\n\n render() {\n return (\n <Host onKeyDown={this.handleKeyDown} onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <slot onSlotchange={this.handleSlotChange} />\n <div ref={(el) => (this.tooltipPositioner = el)} class=\"tooltip-positioner\">\n <div\n part=\"base\"\n ref={(el) => (this.tooltip = el)}\n id={this.componentId}\n class={{\n tooltip: true,\n 'tooltip--open': this.open,\n }}\n role=\"tooltip\"\n aria-hidden={this.open ? 'false' : 'true'}\n >\n <slot name=\"content\">{this.content}</slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"six-tooltip.js","sourceRoot":"","sources":["../../../src/components/six-tooltip/six-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,OAAO,MAAM,qBAAqB,CAAC;AAG1C,IAAI,EAAE,GAAG,CAAC,CAAC;AAEX;;;;;;;;;;GAUG;AAOH,MAAM,OAAO,UAAU;;IACb,gBAAW,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC;IAChC,cAAS,GAAG,KAAK,CAAC;IAmJlB,eAAU,GAAG,GAAG,EAAE;MACxB,IAAI,IAAI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;MAC7C,WAAK,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,EAAE,CAAC,EAAE,KAAK,EAAC,oBAAoB;QACzE,WACE,IAAI,EAAC,MAAM,EACX,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,EAChC,EAAE,EAAE,IAAI,CAAC,WAAW,EACpB,KAAK,EAAE;YACL,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,IAAI,CAAC,IAAI;WAC3B,EACD,IAAI,EAAC,SAAS,iBACD,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;UAEzC,YAAM,IAAI,EAAC,SAAS,IAAE,IAAI,CAAC,OAAO,CAAQ,CACtC,CACF,CACD,CACR,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, Watch } from '@stencil/core';\nimport Popover from '../../utils/popover';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tooltip's target element. Only the first element will be used as the target.\n * @slot content - The tooltip's content. Alternatively, you can use the content prop.\n *\n * @part base - The component's base wrapper.\n */\n\n@Component({\n tag: 'six-tooltip',\n styleUrl: 'six-tooltip.scss',\n shadow: true,\n})\nexport class SixTooltip {\n private componentId = `tooltip-${++id}`;\n private isVisible = false;\n private popover?: Popover;\n private tooltipPositioner?: HTMLElement;\n private target?: HTMLElement;\n private tooltip?: HTMLElement;\n\n @Element() host!: HTMLSixTooltipElement;\n\n /** The tooltip's content. Alternatively, you can use the content slot. */\n @Prop() content = '';\n\n /**\n * The preferred placement of the tooltip. Note that the actual placement may vary as needed to keep the tooltip\n * inside the viewport.\n */\n @Prop() placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end' = 'top';\n\n /** Set to true to disable the tooltip, so it won't show when triggered. */\n @Prop() disabled = false;\n\n /** The distance in pixels from which to offset the tooltip away from its target. */\n @Prop() distance = 10;\n\n /** Indicates whether the tooltip is open. You can use this in lieu of the show/hide methods. */\n @Prop({ mutable: true, reflect: true }) open = false;\n\n /** The distance in pixels from which to offset the tooltip along its target. */\n @Prop() skidding = 0;\n\n /**\n * Controls how the tooltip is activated. Possible options include `click`, `hover`, `focus`, and `manual`. Multiple\n * options can be passed by separating them with a space. When manual is used, the tooltip must be activated\n * programmatically.\n */\n @Prop() trigger = 'hover focus';\n\n @Watch('open')\n handleOpenChange() {\n this.open ? this.show() : this.hide();\n }\n\n /** Emitted when the tooltip begins to show. Calling `event.preventDefault()` will prevent it from being shown. */\n @Event({ eventName: 'six-tooltip-show' }) sixShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has shown and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-show' }) sixAfterShow!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the tooltip begins to hide. Calling `event.preventDefault()` will prevent it from being hidden. */\n @Event({ eventName: 'six-tooltip-hide' }) sixHide!: EventEmitter<EmptyPayload>;\n\n /** Emitted after the tooltip has hidden and all transitions are complete. */\n @Event({ eventName: 'six-tooltip-after-hide' }) sixAfterHide!: EventEmitter<EmptyPayload>;\n\n componentDidLoad() {\n if (this.tooltipPositioner == null) return;\n this.target = this.getTarget();\n this.popover = new Popover(this.target, this.tooltipPositioner);\n this.syncOptions();\n\n this.host.addEventListener('blur', this.handleBlur, true);\n this.host.addEventListener('click', this.handleClick, true);\n this.host.addEventListener('focus', this.handleFocus, true);\n\n // Show on init if open\n this.tooltipPositioner.hidden = !this.open;\n if (this.open) {\n this.show();\n }\n }\n\n componentDidUpdate() {\n this.syncOptions();\n }\n\n disconnectedCallback() {\n if (this.popover != null) {\n this.popover.destroy();\n }\n\n this.host.removeEventListener('blur', this.handleBlur, true);\n this.host.removeEventListener('click', this.handleClick, true);\n this.host.removeEventListener('focus', this.handleFocus, true);\n }\n\n /** Shows the tooltip. */\n @Method()\n async show() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (this.isVisible || this.disabled) {\n return;\n }\n\n const sixShow = this.sixShow.emit();\n if (sixShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n this.isVisible = true;\n this.open = true;\n this.popover?.show();\n }\n\n /** Shows the tooltip. */\n @Method()\n async hide() {\n // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher\n if (!this.isVisible || this.disabled) {\n return;\n }\n\n const sixHide = this.sixHide.emit();\n if (sixHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n this.isVisible = false;\n this.open = false;\n this.popover?.hide();\n }\n\n private getTarget() {\n // Get the first child that isn't a <style> or content slot\n const target = [...this.host.children].find(\n (el) => el.tagName.toLowerCase() !== 'style' && el.getAttribute('slot') !== 'content'\n ) as HTMLElement;\n\n if (target == null) {\n throw new Error('Invalid tooltip target: no child element was found.');\n }\n\n return target;\n }\n\n private handleBlur = () => {\n if (this.hasTrigger('focus')) {\n this.hide();\n }\n };\n\n private handleClick = () => {\n if (this.hasTrigger('click')) {\n this.open ? this.hide() : this.show();\n }\n };\n\n private handleFocus = () => {\n if (this.hasTrigger('focus')) {\n this.show();\n }\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n // Pressing escape when the target element has focus should dismiss the tooltip\n if (this.open && event.key === 'Escape') {\n event.stopPropagation();\n this.hide();\n }\n };\n\n private handleMouseOver = () => {\n if (this.hasTrigger('hover')) {\n this.show();\n }\n };\n\n private handleMouseOut = () => {\n if (this.hasTrigger('hover')) {\n this.hide();\n }\n };\n\n private handleSlotChange = () => {\n const oldTarget = this.target;\n const newTarget = this.getTarget();\n\n if (newTarget !== oldTarget) {\n if (oldTarget != null) {\n oldTarget.removeAttribute('aria-describedby');\n }\n newTarget.setAttribute('aria-describedby', this.componentId);\n }\n };\n\n private hasTrigger(triggerType: string) {\n const triggers = this.trigger.split(' ');\n return triggers.includes(triggerType);\n }\n\n private syncOptions() {\n if (this.popover == null) return;\n\n this.popover.setOptions({\n placement: this.placement,\n distance: this.distance,\n skidding: this.skidding,\n transitionElement: this.tooltip,\n onAfterHide: () => this.sixAfterHide.emit(),\n onAfterShow: () => this.sixAfterShow.emit(),\n });\n }\n\n render() {\n return (\n <Host onKeyDown={this.handleKeyDown} onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut}>\n <slot onSlotchange={this.handleSlotChange} />\n <div ref={(el) => (this.tooltipPositioner = el)} class=\"tooltip-positioner\">\n <div\n part=\"base\"\n ref={(el) => (this.tooltip = el)}\n id={this.componentId}\n class={{\n tooltip: true,\n 'tooltip--open': this.open,\n }}\n role=\"tooltip\"\n aria-hidden={this.open ? 'false' : 'true'}\n >\n <slot name=\"content\">{this.content}</slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -1,9 +1,8 @@
1
1
  import { h } from '@stencil/core';
2
2
  const FormControl = (props, children) => {
3
- const hasLabel = props.label ? true : props.hasLabelSlot;
4
- const hasHelpText = props.helpText ? true : props.hasHelpTextSlot;
5
- /** ErrorTextAttribute has precedence if non empty value is provided or if slot is not set */
6
- const useErrorTextAttribute = (props.errorText && props.errorText !== '') || !props.hasErrorTextSlot;
3
+ var _a, _b, _c, _d, _e, _f;
4
+ const hasLabel = props.label != null && props.label.trim() !== '' ? true : (_a = props.hasLabelSlot) !== null && _a !== void 0 ? _a : false;
5
+ const hasHelpText = props.helpText != null && props.helpText.trim() !== '' ? true : (_b = props.hasHelpTextSlot) !== null && _b !== void 0 ? _b : false;
7
6
  return (h("div", { part: "form-control", class: {
8
7
  'form-control': true,
9
8
  'form-control--small': props.size === 'small',
@@ -11,13 +10,13 @@ const FormControl = (props, children) => {
11
10
  'form-control--large': props.size === 'large',
12
11
  'form-control--has-label': hasLabel,
13
12
  'form-control--has-help-text': hasHelpText,
14
- 'form-control--has-error-text': props.displayError,
15
- 'form-control--disabled': props.disabled,
16
- 'form-control--invalid': props.displayError && !props.disabled,
13
+ 'form-control--has-error-text': (_c = props.displayError) !== null && _c !== void 0 ? _c : false,
14
+ 'form-control--disabled': (_d = props.disabled) !== null && _d !== void 0 ? _d : false,
15
+ 'form-control--invalid': ((_e = props.displayError) !== null && _e !== void 0 ? _e : false) && !props.disabled,
17
16
  } }, h("label", { part: "label", id: props.labelId, class: {
18
17
  'form-control__label': true,
19
- 'form-control__label__required': props.required,
20
- }, htmlFor: props.inputId, "aria-hidden": hasLabel ? 'false' : 'true', onClick: props.onLabelClick }, h("slot", { name: "label" }, props.label)), h("div", { class: "form-control__input" }, children), h("div", { part: "error-text", id: props.errorTextId, class: "form-control__error-text", "aria-hidden": props.displayError ? 'false' : 'true' }, useErrorTextAttribute ? props.errorText : h("slot", { name: "error-text" })), h("div", { part: "help-text", id: props.helpTextId, class: "form-control__help-text", "aria-hidden": hasHelpText ? 'false' : 'true' }, h("slot", { name: "help-text" }, props.helpText))));
18
+ 'form-control__label__required': (_f = props.required) !== null && _f !== void 0 ? _f : false,
19
+ }, htmlFor: props.inputId, "aria-hidden": hasLabel ? 'false' : 'true', onClick: props.onLabelClick }, h("slot", { name: "label" }, props.label)), h("div", { class: "form-control__input" }, children), h("div", { part: "error-text", id: props.errorTextId, class: "form-control__error-text", "aria-hidden": props.displayError ? 'false' : 'true' }, props.errorText), h("div", { part: "help-text", id: props.helpTextId, class: "form-control__help-text", "aria-hidden": hasHelpText ? 'false' : 'true' }, h("slot", { name: "help-text" }, props.helpText))));
21
20
  };
22
21
  export default FormControl;
23
22
  //# sourceMappingURL=form-control.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/functional-components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAiDlC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,QAAQ,EAAE,EAAE;EACxD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC;EACzD,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,eAAe,CAAC;EAClE,6FAA6F;EAC7F,MAAM,qBAAqB,GAAG,CAAC,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC;EAErG,OAAO,CACL,WACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;MACL,cAAc,EAAE,IAAI;MACpB,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,sBAAsB,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ;MAC/C,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,yBAAyB,EAAE,QAAQ;MACnC,6BAA6B,EAAE,WAAW;MAC1C,8BAA8B,EAAE,KAAK,CAAC,YAAY;MAClD,wBAAwB,EAAE,KAAK,CAAC,QAAQ;MACxC,uBAAuB,EAAE,KAAK,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,QAAQ;KAC/D;IAED,aACE,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,KAAK,EAAE;QACL,qBAAqB,EAAE,IAAI;QAC3B,+BAA+B,EAAE,KAAK,CAAC,QAAQ;OAChD,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,iBACT,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EACxC,OAAO,EAAE,KAAK,CAAC,YAAY;MAE3B,YAAM,IAAI,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CACjC;IAER,WAAK,KAAK,EAAC,qBAAqB,IAAE,QAAQ,CAAO;IAEjD,WACE,IAAI,EAAC,YAAY,EACjB,EAAE,EAAE,KAAK,CAAC,WAAW,EACrB,KAAK,EAAC,0BAA0B,iBACnB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAEjD,qBAAqB,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,YAAM,IAAI,EAAC,YAAY,GAAG,CACjE;IAEN,WACE,IAAI,EAAC,WAAW,EAChB,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,KAAK,EAAC,yBAAyB,iBAClB,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;MAE3C,YAAM,IAAI,EAAC,WAAW,IAAE,KAAK,CAAC,QAAQ,CAAQ,CAC1C,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h } from '@stencil/core';\n\nexport interface FormControlProps {\n /** The input id, used to map the input to the label */\n inputId: string;\n\n /** The size of the form control */\n size: 'small' | 'medium' | 'large';\n\n /** The label id, used to map the label to the input */\n labelId?: string;\n\n /** The label text (if the label slot isn't used) */\n label?: string;\n\n /** Whether or not a label slot has been provided. */\n hasLabelSlot?: boolean;\n\n /** The help text id, used to map the input to the help text */\n helpTextId?: string;\n\n /** The help text (if the help-text slot isn't used) */\n helpText?: string;\n\n /** Whether or not a help text slot has been provided. */\n hasHelpTextSlot?: boolean;\n\n /** The error text id, used to map the input to the help text */\n errorTextId?: string;\n\n /** The error text (if the error-text slot isn't used) */\n errorText?: string;\n\n /** Whether or not a error text slot has been provided. */\n hasErrorTextSlot?: boolean;\n\n /** Set to true to disable the input. */\n disabled?: boolean;\n\n /** Set if the value is required. */\n required?: boolean;\n\n /** Set if the error text is displayed. */\n displayError?: boolean;\n\n /** A function that gets called when the label is clicked. */\n onLabelClick?: (event: MouseEvent) => void;\n}\n\nconst FormControl = (props: FormControlProps, children) => {\n const hasLabel = props.label ? true : props.hasLabelSlot;\n const hasHelpText = props.helpText ? true : props.hasHelpTextSlot;\n /** ErrorTextAttribute has precedence if non empty value is provided or if slot is not set */\n const useErrorTextAttribute = (props.errorText && props.errorText !== '') || !props.hasErrorTextSlot;\n\n return (\n <div\n part=\"form-control\"\n class={{\n 'form-control': true,\n 'form-control--small': props.size === 'small',\n 'form-control--medium': props.size === 'medium',\n 'form-control--large': props.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-error-text': props.displayError,\n 'form-control--disabled': props.disabled,\n 'form-control--invalid': props.displayError && !props.disabled,\n }}\n >\n <label\n part=\"label\"\n id={props.labelId}\n class={{\n 'form-control__label': true,\n 'form-control__label__required': props.required,\n }}\n htmlFor={props.inputId}\n aria-hidden={hasLabel ? 'false' : 'true'}\n onClick={props.onLabelClick}\n >\n <slot name=\"label\">{props.label}</slot>\n </label>\n\n <div class=\"form-control__input\">{children}</div>\n\n <div\n part=\"error-text\"\n id={props.errorTextId}\n class=\"form-control__error-text\"\n aria-hidden={props.displayError ? 'false' : 'true'}\n >\n {useErrorTextAttribute ? props.errorText : <slot name=\"error-text\" />}\n </div>\n\n <div\n part=\"help-text\"\n id={props.helpTextId}\n class=\"form-control__help-text\"\n aria-hidden={hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">{props.helpText}</slot>\n </div>\n </div>\n );\n};\n\nexport default FormControl;\n"]}
1
+ {"version":3,"file":"form-control.js","sourceRoot":"","sources":["../../../src/functional-components/form-control/form-control.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAS,MAAM,eAAe,CAAC;AA8CzC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAE,QAAiB,EAAE,EAAE;;EACjE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,CAAC;EACvG,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,IAAI,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,eAAe,mCAAI,KAAK,CAAC;EAEnH,OAAO,CACL,WACE,IAAI,EAAC,cAAc,EACnB,KAAK,EAAE;MACL,cAAc,EAAE,IAAI;MACpB,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,sBAAsB,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ;MAC/C,qBAAqB,EAAE,KAAK,CAAC,IAAI,KAAK,OAAO;MAC7C,yBAAyB,EAAE,QAAQ;MACnC,6BAA6B,EAAE,WAAW;MAC1C,8BAA8B,EAAE,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK;MAC3D,wBAAwB,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK;MACjD,uBAAuB,EAAE,CAAC,MAAA,KAAK,CAAC,YAAY,mCAAI,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ;KAC1E;IAED,aACE,IAAI,EAAC,OAAO,EACZ,EAAE,EAAE,KAAK,CAAC,OAAO,EACjB,KAAK,EAAE;QACL,qBAAqB,EAAE,IAAI;QAC3B,+BAA+B,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK;OACzD,EACD,OAAO,EAAE,KAAK,CAAC,OAAO,iBACT,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EACxC,OAAO,EAAE,KAAK,CAAC,YAAY;MAE3B,YAAM,IAAI,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CACjC;IAER,WAAK,KAAK,EAAC,qBAAqB,IAAE,QAAQ,CAAO;IAEjD,WACE,IAAI,EAAC,YAAY,EACjB,EAAE,EAAE,KAAK,CAAC,WAAW,EACrB,KAAK,EAAC,0BAA0B,iBACnB,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAEjD,KAAK,CAAC,SAAS,CACZ;IAEN,WACE,IAAI,EAAC,WAAW,EAChB,EAAE,EAAE,KAAK,CAAC,UAAU,EACpB,KAAK,EAAC,yBAAyB,iBAClB,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;MAE3C,YAAM,IAAI,EAAC,WAAW,IAAE,KAAK,CAAC,QAAQ,CAAQ,CAC1C,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { h, VNode } from '@stencil/core';\n\nexport interface FormControlProps {\n /** The input id, used to map the input to the label */\n inputId: string;\n\n /** The size of the form control */\n size: 'small' | 'medium' | 'large';\n\n /** The label id, used to map the label to the input */\n labelId?: string;\n\n /** The label text (if the label slot isn't used) */\n label?: string;\n\n /** Whether a label slot has been provided. */\n hasLabelSlot?: boolean;\n\n /** The help text id, used to map the input to the help text */\n helpTextId?: string;\n\n /** The help text (if the help-text slot isn't used) */\n helpText?: string;\n\n /** Whether a help text slot has been provided. */\n hasHelpTextSlot?: boolean;\n\n /** The error text id, used to map the input to the help text */\n errorTextId?: string;\n\n /** The error text */\n errorText?: string;\n\n /** Set to true to disable the input. */\n disabled?: boolean;\n\n /** Set if the value is required. */\n required?: boolean;\n\n /** Set if the error text is displayed. */\n displayError?: boolean;\n\n /** A function that gets called when the label is clicked. */\n onLabelClick?: (event: MouseEvent) => void;\n}\n\nconst FormControl = (props: FormControlProps, children: VNode[]) => {\n const hasLabel = props.label != null && props.label.trim() !== '' ? true : props.hasLabelSlot ?? false;\n const hasHelpText = props.helpText != null && props.helpText.trim() !== '' ? true : props.hasHelpTextSlot ?? false;\n\n return (\n <div\n part=\"form-control\"\n class={{\n 'form-control': true,\n 'form-control--small': props.size === 'small',\n 'form-control--medium': props.size === 'medium',\n 'form-control--large': props.size === 'large',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n 'form-control--has-error-text': props.displayError ?? false,\n 'form-control--disabled': props.disabled ?? false,\n 'form-control--invalid': (props.displayError ?? false) && !props.disabled,\n }}\n >\n <label\n part=\"label\"\n id={props.labelId}\n class={{\n 'form-control__label': true,\n 'form-control__label__required': props.required ?? false,\n }}\n htmlFor={props.inputId}\n aria-hidden={hasLabel ? 'false' : 'true'}\n onClick={props.onLabelClick}\n >\n <slot name=\"label\">{props.label}</slot>\n </label>\n\n <div class=\"form-control__input\">{children}</div>\n\n <div\n part=\"error-text\"\n id={props.errorTextId}\n class=\"form-control__error-text\"\n aria-hidden={props.displayError ? 'false' : 'true'}\n >\n {props.errorText}\n </div>\n\n <div\n part=\"help-text\"\n id={props.helpTextId}\n class=\"form-control__help-text\"\n aria-hidden={hasHelpText ? 'false' : 'true'}\n >\n <slot name=\"help-text\">{props.helpText}</slot>\n </div>\n </div>\n );\n};\n\nexport default FormControl;\n"]}
@@ -1,2 +1,2 @@
1
- export {};
1
+ export * from './utils/error-messages';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"","sourcesContent":["export { Components, JSX } from './components';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC","sourcesContent":["export { Components, JSX } from './components';\nexport * from './utils/error-messages';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/testUtil/delay.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,EAAE,CAC5B,IAAI,OAAO,CAAC,UAAU,OAAO;EAC3B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC","sourcesContent":["export const delay = (time) =>\n new Promise(function (resolve) {\n setTimeout(resolve, time);\n });\n"]}
1
+ {"version":3,"file":"delay.js","sourceRoot":"","sources":["../../src/testUtil/delay.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAY,EAAE,EAAE,CACpC,IAAI,OAAO,CAAC,UAAU,OAAO;EAC3B,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC,CAAC","sourcesContent":["export const delay = (time: number) =>\n new Promise(function (resolve) {\n setTimeout(resolve, time);\n });\n"]}
@@ -1,4 +1,6 @@
1
- import { isDate, isNil, isNumber, isString } from './type-check';
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+ import { isDate, isNil, isString } from './type-check';
2
4
  export const i18nDate = {
3
5
  en: {
4
6
  months: [
@@ -110,21 +112,13 @@ export const i18nDate = {
110
112
  * ```
111
113
  */
112
114
  export const now = () => new Date();
115
+ export const removeTime = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());
113
116
  export const pad = (value) => String(value).padStart(2, '0');
114
117
  /**
115
118
  * Returns `true` if the given date is valid
116
119
  */
117
120
  export const isValidDate = (value) => {
118
- if (isNil(value)) {
119
- return false;
120
- }
121
- if (isNumber(value)) {
122
- return false;
123
- }
124
- if (isDate(value)) {
125
- return !isNaN(value.getTime());
126
- }
127
- return new Date(value).toString() !== 'Invalid Date';
121
+ return value instanceof Date && !isNaN(value.getTime()) && new Date(value).toString() !== 'Invalid Date';
128
122
  };
129
123
  /**
130
124
  * Returns the year number of the given date
@@ -346,7 +340,7 @@ const formatNumber = (value, len) => {
346
340
  return num;
347
341
  };
348
342
  export const formatDate = (date, format) => {
349
- if (!date) {
343
+ if (date == null) {
350
344
  return '';
351
345
  }
352
346
  let output = '';
@@ -669,14 +663,12 @@ export const toDate = (dirtyDateString, format) => {
669
663
  try {
670
664
  const { backupDate = new Date() } = {};
671
665
  const { year, month, day, hour, minute, second, date } = getDateParts(dirtyDateString, format);
672
- if (date) {
666
+ if (date != null) {
673
667
  return date;
674
668
  }
675
669
  const inputArray = [year, month, day, hour, minute, second];
676
- let parsedDate;
677
670
  const result = getFullInputArray(inputArray, backupDate);
678
- parsedDate = createDate(...result);
679
- return parsedDate;
671
+ return createDate(...result);
680
672
  }
681
673
  catch (e) {
682
674
  return new Date(NaN);
@@ -710,4 +702,21 @@ export const createCalendarGrid = (calendarGridArguments) => {
710
702
  } while (isSameMonth(new Date(pointerDate.year, pointerDate.month, pointerDate.day), dayDatePointer));
711
703
  return calendar;
712
704
  };
705
+ /**
706
+ * Returns a range of numbers around the given number grouped into buckets of 5.
707
+ * @param number the given number around which you want to get the other numbers
708
+ * @param range range of numbers to include in the result
709
+ */
710
+ export function rangeAround(number, range) {
711
+ const itemsPerGroup = 5;
712
+ return [...Array(range).keys()]
713
+ .map((n) => n + number - Math.floor(range / 2))
714
+ .reduce((curr, item, index) => {
715
+ if (index % itemsPerGroup === 0) {
716
+ curr.push([]);
717
+ }
718
+ curr[curr.length - 1].push(item);
719
+ return curr;
720
+ }, []);
721
+ }
713
722
  //# sourceMappingURL=date-util.js.map