@ukic/canary-web-components 3.0.0-canary.32 → 3.0.0-canary.33

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 (307) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-6f4b406b.js → helpers-f81fed28.js} +37 -1
  3. package/dist/cjs/helpers-f81fed28.js.map +1 -0
  4. package/dist/cjs/ic-calendar_2.cjs.entry.js +2 -2
  5. package/dist/cjs/ic-calendar_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-card-horizontal.cjs.entry.js +1 -1
  7. package/dist/cjs/ic-checkbox_3.cjs.entry.js +11 -7
  8. package/dist/cjs/ic-checkbox_3.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-data-table-title-bar.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-data-table.cjs.entry.js +11 -8
  11. package/dist/cjs/ic-data-table.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-date-picker.cjs.entry.js +1 -1
  13. package/dist/cjs/ic-pagination_4.cjs.entry.js +8 -4
  14. package/dist/cjs/ic-pagination_4.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-table-of-contents.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-time-input.cjs.entry.js +401 -99
  17. package/dist/cjs/ic-time-input.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-time-selector.cjs.entry.js +842 -0
  19. package/dist/cjs/ic-time-selector.cjs.entry.js.map +1 -0
  20. package/dist/cjs/{ic-toggle-button.cjs.entry.js → ic-toggle-button_2.cjs.entry.js} +274 -1
  21. package/dist/cjs/ic-toggle-button_2.cjs.entry.js.map +1 -0
  22. package/dist/cjs/ic-tree-item.cjs.entry.js +3 -3
  23. package/dist/cjs/ic-tree-view.cjs.entry.js +4 -4
  24. package/dist/cjs/index-d337cd8a.js +8 -8
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/ic-calendar/ic-calendar.css +8 -6
  28. package/dist/collection/components/ic-calendar/ic-calendar.stories.js +13 -0
  29. package/dist/collection/components/ic-calendar/ic-calendar.stories.js.map +1 -1
  30. package/dist/collection/components/ic-data-table/ic-data-table.js +10 -7
  31. package/dist/collection/components/ic-data-table/ic-data-table.js.map +1 -1
  32. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js +30 -6
  33. package/dist/collection/components/ic-pagination-bar/ic-pagination-bar.js.map +1 -1
  34. package/dist/collection/components/ic-time-input/ic-time-input.css +21 -3
  35. package/dist/collection/components/ic-time-input/ic-time-input.js +434 -106
  36. package/dist/collection/components/ic-time-input/ic-time-input.js.map +1 -1
  37. package/dist/collection/components/ic-time-input/ic-time-input.stories.js +58 -9
  38. package/dist/collection/components/ic-time-input/ic-time-input.stories.js.map +1 -1
  39. package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js +2 -0
  40. package/dist/collection/components/ic-time-input/test/helpers/ic-time-input.js.map +1 -1
  41. package/dist/collection/components/ic-time-selector/ic-time-selector.css +293 -0
  42. package/dist/collection/components/ic-time-selector/ic-time-selector.js +1075 -0
  43. package/dist/collection/components/ic-time-selector/ic-time-selector.js.map +1 -0
  44. package/dist/collection/components/ic-time-selector/ic-time-selector.stories.js +166 -0
  45. package/dist/collection/components/ic-time-selector/ic-time-selector.stories.js.map +1 -0
  46. package/dist/collection/components/ic-time-selector/ic-time-selector.types.js +2 -0
  47. package/dist/collection/components/ic-time-selector/ic-time-selector.types.js.map +1 -0
  48. package/dist/collection/components/ic-tree-item/ic-tree-item.js +2 -2
  49. package/dist/collection/components/ic-tree-view/ic-tree-view.js +3 -3
  50. package/dist/collection/utils/helpers.js +35 -0
  51. package/dist/collection/utils/helpers.js.map +1 -1
  52. package/dist/collection/utils/types.js.map +1 -1
  53. package/dist/components/helpers2.js +36 -1
  54. package/dist/components/helpers2.js.map +1 -1
  55. package/dist/components/ic-calendar2.js +1 -1
  56. package/dist/components/ic-calendar2.js.map +1 -1
  57. package/dist/components/ic-data-table.js +10 -7
  58. package/dist/components/ic-data-table.js.map +1 -1
  59. package/dist/components/ic-pagination-bar2.js +11 -6
  60. package/dist/components/ic-pagination-bar2.js.map +1 -1
  61. package/dist/components/ic-pagination2.js +9 -4
  62. package/dist/components/ic-pagination2.js.map +1 -1
  63. package/dist/components/ic-time-input.js +431 -112
  64. package/dist/components/ic-time-input.js.map +1 -1
  65. package/dist/components/ic-time-selector.d.ts +11 -0
  66. package/dist/components/ic-time-selector.js +898 -0
  67. package/dist/components/ic-time-selector.js.map +1 -0
  68. package/dist/components/ic-toggle-button-group.js +1 -299
  69. package/dist/components/ic-toggle-button-group.js.map +1 -1
  70. package/dist/{esm/ic-toggle-button-group.entry.js → components/ic-toggle-button-group2.js} +70 -13
  71. package/dist/components/ic-toggle-button-group2.js.map +1 -0
  72. package/dist/components/ic-toggle-button.js +1 -228
  73. package/dist/components/ic-toggle-button.js.map +1 -1
  74. package/dist/{esm/ic-toggle-button.entry.js → components/ic-toggle-button2.js} +65 -10
  75. package/dist/components/ic-toggle-button2.js.map +1 -0
  76. package/dist/components/ic-tree-item.js +2 -2
  77. package/dist/components/ic-tree-view.js +4 -4
  78. package/dist/core/core.css +28 -6
  79. package/dist/core/core.esm.js +1 -1
  80. package/dist/core/core.esm.js.map +1 -1
  81. package/dist/core/{p-b80b08ae.entry.js → p-08f24329.entry.js} +2 -2
  82. package/dist/core/{p-615d474e.entry.js → p-14b8bf37.entry.js} +2 -2
  83. package/dist/core/{p-81f12581.entry.js → p-169ad948.entry.js} +2 -2
  84. package/dist/core/{p-847cbb16.entry.js → p-1d166343.entry.js} +2 -2
  85. package/dist/core/{p-b4bfaf8f.entry.js → p-201b41c7.entry.js} +2 -2
  86. package/dist/core/{p-24bac55f.entry.js → p-33509a89.entry.js} +2 -2
  87. package/dist/core/{p-e1920777.entry.js → p-3389625c.entry.js} +2 -2
  88. package/dist/core/{p-5a1cfb3c.entry.js → p-344752cb.entry.js} +2 -2
  89. package/dist/core/{p-6c238418.entry.js → p-348d7080.entry.js} +2 -2
  90. package/dist/core/{p-3ef2e98d.entry.js → p-39cdf5db.entry.js} +2 -2
  91. package/dist/core/{p-fd20470e.entry.js → p-496b314f.entry.js} +2 -2
  92. package/dist/core/{p-bd9a76d8.entry.js → p-508b6da3.entry.js} +2 -2
  93. package/dist/core/p-551a0fc1.entry.js +2 -0
  94. package/dist/core/p-551a0fc1.entry.js.map +1 -0
  95. package/dist/core/{p-f5cea10d.entry.js → p-5e6687a8.entry.js} +2 -2
  96. package/dist/core/{p-72171192.entry.js → p-60f4fe3a.entry.js} +2 -2
  97. package/dist/core/p-61c92598.entry.js +2 -0
  98. package/dist/core/p-61c92598.entry.js.map +1 -0
  99. package/dist/core/{p-e00e67ff.entry.js → p-6323da7a.entry.js} +2 -2
  100. package/dist/core/p-691dd972.entry.js +2 -0
  101. package/dist/core/p-691dd972.entry.js.map +1 -0
  102. package/dist/core/{p-c6c87e58.entry.js → p-6dfe0922.entry.js} +2 -2
  103. package/dist/core/p-71cc5909.entry.js +2 -0
  104. package/dist/core/p-71cc5909.entry.js.map +1 -0
  105. package/dist/core/{p-fd7f3b58.entry.js → p-770e92cd.entry.js} +2 -2
  106. package/dist/core/{p-7cf6b428.entry.js → p-79ead0e7.entry.js} +2 -2
  107. package/dist/core/{p-285892ef.entry.js → p-7b4b45cf.entry.js} +2 -2
  108. package/dist/core/{p-afedcfdb.entry.js → p-7efdbab8.entry.js} +2 -2
  109. package/dist/core/{p-96177a74.entry.js → p-802a4bd3.entry.js} +2 -2
  110. package/dist/core/p-829b34f9.js +2 -0
  111. package/dist/core/p-829b34f9.js.map +1 -0
  112. package/dist/core/{p-9a9605c3.entry.js → p-879c180d.entry.js} +2 -2
  113. package/dist/core/{p-3891ce53.entry.js → p-8830011c.entry.js} +2 -2
  114. package/dist/core/{p-444cd8d3.entry.js → p-8ab37b4d.entry.js} +2 -2
  115. package/dist/core/{p-c87cc0d1.entry.js → p-939025af.entry.js} +2 -2
  116. package/dist/core/{p-4992e9ac.entry.js → p-939b168a.entry.js} +2 -2
  117. package/dist/core/{p-5a4344cb.entry.js → p-9dea5764.entry.js} +2 -2
  118. package/dist/core/{p-af821831.entry.js → p-a88e61b2.entry.js} +2 -2
  119. package/dist/core/p-a88e61b2.entry.js.map +1 -0
  120. package/dist/core/{p-90611726.entry.js → p-a8a92e54.entry.js} +2 -2
  121. package/dist/core/{p-31f3fb15.entry.js → p-a94a7b71.entry.js} +2 -2
  122. package/dist/core/p-ad551a0c.entry.js +2 -0
  123. package/dist/core/p-ad551a0c.entry.js.map +1 -0
  124. package/dist/core/{p-ba75ed34.entry.js → p-b434bd7c.entry.js} +2 -2
  125. package/dist/core/{p-2188b483.entry.js → p-c0a7eed7.entry.js} +2 -2
  126. package/dist/core/{p-2bd2f38b.entry.js → p-c0b227d2.entry.js} +2 -2
  127. package/dist/core/{p-2646a629.entry.js → p-c32f043e.entry.js} +2 -2
  128. package/dist/core/{p-7a0f62c2.entry.js → p-c4b2774d.entry.js} +2 -2
  129. package/dist/core/{p-775b8dba.entry.js → p-c9525aac.entry.js} +2 -2
  130. package/dist/core/{p-7026afad.entry.js → p-ca05573a.entry.js} +2 -2
  131. package/dist/core/{p-8c580d88.entry.js → p-d0607a70.entry.js} +2 -2
  132. package/dist/core/{p-15c05eb8.entry.js → p-d528d856.entry.js} +2 -2
  133. package/dist/core/{p-0043b019.entry.js → p-da1c2883.entry.js} +2 -2
  134. package/dist/core/{p-ffc1cea6.entry.js → p-e2e556ec.entry.js} +2 -2
  135. package/dist/core/{p-e4ef4263.js → p-e519f607.js} +2 -2
  136. package/dist/core/{p-3f0bce15.entry.js → p-e5c6d01a.entry.js} +2 -2
  137. package/dist/core/{p-04a9f82f.entry.js → p-e8db8772.entry.js} +2 -2
  138. package/dist/core/{p-e4b82731.entry.js → p-ea04103e.entry.js} +2 -2
  139. package/dist/core/{p-9a95f428.entry.js → p-eaeb473e.entry.js} +2 -2
  140. package/dist/core/{p-8e592393.entry.js → p-ecc7fd71.entry.js} +2 -2
  141. package/dist/core/{p-6cfba272.entry.js → p-efe260f0.entry.js} +2 -2
  142. package/dist/core/{p-b6d6b26e.entry.js → p-f1b57f91.entry.js} +2 -2
  143. package/dist/core/{p-e4551a38.entry.js → p-f5dc04f7.entry.js} +2 -2
  144. package/dist/core/{p-25280383.entry.js → p-fb07921b.entry.js} +2 -2
  145. package/dist/core/p-fb07921b.entry.js.map +1 -0
  146. package/dist/core/{p-1900c7c7.entry.js → p-fd08156a.entry.js} +2 -2
  147. package/dist/core/{p-3594922d.entry.js → p-fe5b51bb.entry.js} +2 -2
  148. package/dist/core/{p-ef5b6622.entry.js → p-ff618439.entry.js} +2 -2
  149. package/dist/esm/core.js +1 -1
  150. package/dist/esm/{helpers-5419eb6c.js → helpers-063369f4.js} +2 -2
  151. package/dist/esm/{helpers-5419eb6c.js.map → helpers-063369f4.js.map} +1 -1
  152. package/dist/esm/{helpers-9f228880.js → helpers-a08b3f32.js} +37 -2
  153. package/dist/esm/helpers-a08b3f32.js.map +1 -0
  154. package/dist/esm/ic-accordion-group.entry.js +1 -1
  155. package/dist/esm/ic-accordion.entry.js +1 -1
  156. package/dist/esm/ic-action-chip.entry.js +1 -1
  157. package/dist/esm/ic-alert.entry.js +1 -1
  158. package/dist/esm/ic-back-to-top.entry.js +1 -1
  159. package/dist/esm/ic-badge.entry.js +1 -1
  160. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  161. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  162. package/dist/esm/ic-button_3.entry.js +1 -1
  163. package/dist/esm/ic-calendar_2.entry.js +2 -2
  164. package/dist/esm/ic-calendar_2.entry.js.map +1 -1
  165. package/dist/esm/ic-card-horizontal.entry.js +1 -1
  166. package/dist/esm/ic-card-vertical.entry.js +1 -1
  167. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  168. package/dist/esm/ic-checkbox_3.entry.js +12 -8
  169. package/dist/esm/ic-checkbox_3.entry.js.map +1 -1
  170. package/dist/esm/ic-chip.entry.js +1 -1
  171. package/dist/esm/ic-data-row.entry.js +1 -1
  172. package/dist/esm/ic-data-table-title-bar.entry.js +1 -1
  173. package/dist/esm/ic-data-table.entry.js +11 -8
  174. package/dist/esm/ic-data-table.entry.js.map +1 -1
  175. package/dist/esm/ic-date-picker.entry.js +1 -1
  176. package/dist/esm/ic-dialog.entry.js +1 -1
  177. package/dist/esm/ic-divider.entry.js +1 -1
  178. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  179. package/dist/esm/ic-footer-link.entry.js +1 -1
  180. package/dist/esm/ic-footer.entry.js +1 -1
  181. package/dist/esm/ic-hero.entry.js +1 -1
  182. package/dist/esm/ic-horizontal-scroll.entry.js +1 -1
  183. package/dist/esm/ic-input-component-container_4.entry.js +1 -1
  184. package/dist/esm/ic-link.entry.js +1 -1
  185. package/dist/esm/ic-menu-group.entry.js +1 -1
  186. package/dist/esm/ic-menu-item.entry.js +1 -1
  187. package/dist/esm/ic-menu.entry.js +1 -1
  188. package/dist/esm/ic-navigation-button.entry.js +1 -1
  189. package/dist/esm/ic-navigation-group.entry.js +1 -1
  190. package/dist/esm/ic-navigation-item.entry.js +1 -1
  191. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  192. package/dist/esm/ic-page-header.entry.js +1 -1
  193. package/dist/esm/ic-pagination_4.entry.js +9 -5
  194. package/dist/esm/ic-pagination_4.entry.js.map +1 -1
  195. package/dist/esm/ic-popover-menu.entry.js +1 -1
  196. package/dist/esm/ic-radio-group.entry.js +1 -1
  197. package/dist/esm/ic-radio-option.entry.js +1 -1
  198. package/dist/esm/ic-search-bar.entry.js +1 -1
  199. package/dist/esm/ic-side-navigation.entry.js +1 -1
  200. package/dist/esm/ic-status-tag.entry.js +1 -1
  201. package/dist/esm/ic-step.entry.js +1 -1
  202. package/dist/esm/ic-stepper.entry.js +1 -1
  203. package/dist/esm/ic-switch.entry.js +1 -1
  204. package/dist/esm/ic-tab-group.entry.js +1 -1
  205. package/dist/esm/ic-tab.entry.js +1 -1
  206. package/dist/esm/ic-table-of-contents.entry.js +1 -1
  207. package/dist/esm/ic-theme.entry.js +1 -1
  208. package/dist/esm/ic-time-input.entry.js +401 -99
  209. package/dist/esm/ic-time-input.entry.js.map +1 -1
  210. package/dist/esm/ic-time-selector.entry.js +838 -0
  211. package/dist/esm/ic-time-selector.entry.js.map +1 -0
  212. package/dist/esm/ic-toast.entry.js +1 -1
  213. package/dist/esm/ic-toggle-button_2.entry.js +449 -0
  214. package/dist/esm/ic-toggle-button_2.entry.js.map +1 -0
  215. package/dist/esm/ic-top-navigation.entry.js +1 -1
  216. package/dist/esm/ic-tree-item.entry.js +3 -3
  217. package/dist/esm/ic-tree-view.entry.js +4 -4
  218. package/dist/esm/ic-typography.entry.js +1 -1
  219. package/dist/esm/index-a7a720e7.js +8 -8
  220. package/dist/esm/loader.js +1 -1
  221. package/dist/types/components/ic-calendar/ic-calendar.stories.d.ts +20 -14
  222. package/dist/types/components/ic-pagination-bar/ic-pagination-bar.d.ts +4 -0
  223. package/dist/types/components/ic-time-input/ic-time-input.d.ts +26 -6
  224. package/dist/types/components/ic-time-input/ic-time-input.stories.d.ts +31 -7
  225. package/dist/types/components/ic-time-input/test/helpers/ic-time-input.d.ts +1 -0
  226. package/dist/types/components/ic-time-selector/ic-time-selector.d.ts +88 -0
  227. package/dist/types/components/ic-time-selector/ic-time-selector.stories.d.ts +99 -0
  228. package/dist/types/components/ic-time-selector/ic-time-selector.types.d.ts +1 -0
  229. package/dist/types/components.d.ts +147 -11
  230. package/dist/types/utils/helpers.d.ts +14 -0
  231. package/dist/types/utils/types.d.ts +2 -1
  232. package/hydrate/index.js +1356 -131
  233. package/hydrate/index.mjs +1356 -131
  234. package/package.json +30 -30
  235. package/dist/cjs/helpers-6f4b406b.js.map +0 -1
  236. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +0 -267
  237. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +0 -1
  238. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +0 -1
  239. package/dist/core/p-25280383.entry.js.map +0 -1
  240. package/dist/core/p-2c86ce4b.entry.js +0 -2
  241. package/dist/core/p-2c86ce4b.entry.js.map +0 -1
  242. package/dist/core/p-5b32aaf3.entry.js +0 -2
  243. package/dist/core/p-5b32aaf3.entry.js.map +0 -1
  244. package/dist/core/p-80111272.entry.js +0 -2
  245. package/dist/core/p-80111272.entry.js.map +0 -1
  246. package/dist/core/p-9044539c.entry.js +0 -2
  247. package/dist/core/p-9044539c.entry.js.map +0 -1
  248. package/dist/core/p-af821831.entry.js.map +0 -1
  249. package/dist/core/p-c3eddb99.entry.js +0 -2
  250. package/dist/core/p-c3eddb99.entry.js.map +0 -1
  251. package/dist/core/p-f48ce5f6.js +0 -2
  252. package/dist/core/p-f48ce5f6.js.map +0 -1
  253. package/dist/esm/helpers-9f228880.js.map +0 -1
  254. package/dist/esm/ic-toggle-button-group.entry.js.map +0 -1
  255. package/dist/esm/ic-toggle-button.entry.js.map +0 -1
  256. /package/dist/core/{p-b80b08ae.entry.js.map → p-08f24329.entry.js.map} +0 -0
  257. /package/dist/core/{p-615d474e.entry.js.map → p-14b8bf37.entry.js.map} +0 -0
  258. /package/dist/core/{p-81f12581.entry.js.map → p-169ad948.entry.js.map} +0 -0
  259. /package/dist/core/{p-847cbb16.entry.js.map → p-1d166343.entry.js.map} +0 -0
  260. /package/dist/core/{p-b4bfaf8f.entry.js.map → p-201b41c7.entry.js.map} +0 -0
  261. /package/dist/core/{p-24bac55f.entry.js.map → p-33509a89.entry.js.map} +0 -0
  262. /package/dist/core/{p-e1920777.entry.js.map → p-3389625c.entry.js.map} +0 -0
  263. /package/dist/core/{p-5a1cfb3c.entry.js.map → p-344752cb.entry.js.map} +0 -0
  264. /package/dist/core/{p-6c238418.entry.js.map → p-348d7080.entry.js.map} +0 -0
  265. /package/dist/core/{p-3ef2e98d.entry.js.map → p-39cdf5db.entry.js.map} +0 -0
  266. /package/dist/core/{p-fd20470e.entry.js.map → p-496b314f.entry.js.map} +0 -0
  267. /package/dist/core/{p-bd9a76d8.entry.js.map → p-508b6da3.entry.js.map} +0 -0
  268. /package/dist/core/{p-f5cea10d.entry.js.map → p-5e6687a8.entry.js.map} +0 -0
  269. /package/dist/core/{p-72171192.entry.js.map → p-60f4fe3a.entry.js.map} +0 -0
  270. /package/dist/core/{p-e00e67ff.entry.js.map → p-6323da7a.entry.js.map} +0 -0
  271. /package/dist/core/{p-c6c87e58.entry.js.map → p-6dfe0922.entry.js.map} +0 -0
  272. /package/dist/core/{p-fd7f3b58.entry.js.map → p-770e92cd.entry.js.map} +0 -0
  273. /package/dist/core/{p-7cf6b428.entry.js.map → p-79ead0e7.entry.js.map} +0 -0
  274. /package/dist/core/{p-285892ef.entry.js.map → p-7b4b45cf.entry.js.map} +0 -0
  275. /package/dist/core/{p-afedcfdb.entry.js.map → p-7efdbab8.entry.js.map} +0 -0
  276. /package/dist/core/{p-96177a74.entry.js.map → p-802a4bd3.entry.js.map} +0 -0
  277. /package/dist/core/{p-9a9605c3.entry.js.map → p-879c180d.entry.js.map} +0 -0
  278. /package/dist/core/{p-3891ce53.entry.js.map → p-8830011c.entry.js.map} +0 -0
  279. /package/dist/core/{p-444cd8d3.entry.js.map → p-8ab37b4d.entry.js.map} +0 -0
  280. /package/dist/core/{p-c87cc0d1.entry.js.map → p-939025af.entry.js.map} +0 -0
  281. /package/dist/core/{p-4992e9ac.entry.js.map → p-939b168a.entry.js.map} +0 -0
  282. /package/dist/core/{p-5a4344cb.entry.js.map → p-9dea5764.entry.js.map} +0 -0
  283. /package/dist/core/{p-90611726.entry.js.map → p-a8a92e54.entry.js.map} +0 -0
  284. /package/dist/core/{p-31f3fb15.entry.js.map → p-a94a7b71.entry.js.map} +0 -0
  285. /package/dist/core/{p-ba75ed34.entry.js.map → p-b434bd7c.entry.js.map} +0 -0
  286. /package/dist/core/{p-2188b483.entry.js.map → p-c0a7eed7.entry.js.map} +0 -0
  287. /package/dist/core/{p-2bd2f38b.entry.js.map → p-c0b227d2.entry.js.map} +0 -0
  288. /package/dist/core/{p-2646a629.entry.js.map → p-c32f043e.entry.js.map} +0 -0
  289. /package/dist/core/{p-7a0f62c2.entry.js.map → p-c4b2774d.entry.js.map} +0 -0
  290. /package/dist/core/{p-775b8dba.entry.js.map → p-c9525aac.entry.js.map} +0 -0
  291. /package/dist/core/{p-7026afad.entry.js.map → p-ca05573a.entry.js.map} +0 -0
  292. /package/dist/core/{p-8c580d88.entry.js.map → p-d0607a70.entry.js.map} +0 -0
  293. /package/dist/core/{p-15c05eb8.entry.js.map → p-d528d856.entry.js.map} +0 -0
  294. /package/dist/core/{p-0043b019.entry.js.map → p-da1c2883.entry.js.map} +0 -0
  295. /package/dist/core/{p-ffc1cea6.entry.js.map → p-e2e556ec.entry.js.map} +0 -0
  296. /package/dist/core/{p-e4ef4263.js.map → p-e519f607.js.map} +0 -0
  297. /package/dist/core/{p-3f0bce15.entry.js.map → p-e5c6d01a.entry.js.map} +0 -0
  298. /package/dist/core/{p-04a9f82f.entry.js.map → p-e8db8772.entry.js.map} +0 -0
  299. /package/dist/core/{p-e4b82731.entry.js.map → p-ea04103e.entry.js.map} +0 -0
  300. /package/dist/core/{p-9a95f428.entry.js.map → p-eaeb473e.entry.js.map} +0 -0
  301. /package/dist/core/{p-8e592393.entry.js.map → p-ecc7fd71.entry.js.map} +0 -0
  302. /package/dist/core/{p-6cfba272.entry.js.map → p-efe260f0.entry.js.map} +0 -0
  303. /package/dist/core/{p-b6d6b26e.entry.js.map → p-f1b57f91.entry.js.map} +0 -0
  304. /package/dist/core/{p-e4551a38.entry.js.map → p-f5dc04f7.entry.js.map} +0 -0
  305. /package/dist/core/{p-1900c7c7.entry.js.map → p-fd08156a.entry.js.map} +0 -0
  306. /package/dist/core/{p-3594922d.entry.js.map → p-fe5b51bb.entry.js.map} +0 -0
  307. /package/dist/core/{p-ef5b6622.entry.js.map → p-ff618439.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ic-time-input.stories.js","sourceRoot":"","sources":["../../../../../src/components/ic-time-input/ic-time-input.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;oBAEA;IAClB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;cAQN;IACZ,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;oBAKA;IAClB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cASN;IACZ,IAAI,EAAE,aAAa;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;cAWN;IACZ,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF;;G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AI,EAAE,kCAAkC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;GAEjB;IACD,IAAI,EAAE,aAAa;CACpB,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,mBAAmB;CAC1B,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;cAWN;IACZ,IAAI,EAAE,eAAe;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BN;IACZ,IAAI,EAAE,qBAAqB;CAC5B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { html } from \"lit-html\";\nimport readme from \"./readme.md\";\n\nexport default {\n title: \"Web Components/Time Input\",\n component: \"ic-time-input\",\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the time input component to manually type in a time in different formats.\n *\n * The input `label` is the only required attribute for time input.\n *\n * Click the 'Component API' tab to view all the available attributes, events and slots for time input.\n *\n * To use the time input component, import `@ukic/canary-web-components` into your application.\n *\n * Times can be added by manually typing into the input or using the up and down arrow keys.\n *\n * To move between hour, minute and second using the keyboard, provide the required values based on the placeholders or use `:`.\n *\n * By default, the helper text displays the time format.\n */\nexport const Default = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>`,\n name: \"Default\",\n};\n\n/**\n * Retrieving the time input value via `icChange` returns the time as a Date object.\n *\n * The event returns the Date object once hour, minute and second have been entered.\n */\nexport const IcChangeEvent = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icChange\", function (event) {\n console.log(event.detail.value, event.detail.utcValue);\n });\n </script>`,\n name: \"icChange event\",\n};\n\n/**\n * To set a value to the time input, pass the time value in the relevant time format.\n */\nexport const WithValue = {\n render: () => html`<ic-time-input\n id=\"time-input-default-time-with-value\"\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM:SS\"\n value=\"13:45:00\"\n ></ic-time-input>`,\n name: \"With value\",\n};\n\n/**\n * The time input also accepts a number of different time formats within the value attribute:\n * - [Date object](#date-object)\n * - [Zulu time](#zulu-time)\n */\nexport const DateObject = {\n render: () => html`<ic-time-input\n id=\"time-input-default-time-date\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-time-date\"\n );\n timeInputDate.value = new Date(\"2025-07-14T15:30:45\");\n </script>`,\n name: \"Date object\",\n};\n\nexport const ZuluTime = {\n render: () => html`<div>\n <ic-time-input\n id=\"time-input-default-zulu-time\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n </div>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-zulu-time\"\n );\n timeInputDate.value = \"15:30:45Z\";\n </script>`,\n name: \"Zulu time\",\n};\n\n/**\n * To set the time input as a required field, set the `required` attribute to `true`. This will add an asterisk at the end of the time input label.\n */\nexport const Required = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n required=\"true\"\n ></ic-time-input>`,\n name: \"Required\",\n};\n\n/**\n * To hide the label, set the `hide-label` attribute to `true`. The required `label` will still be read out by screen readers.\n */\nexport const HideLabel = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n hide-label=\"true\"\n ></ic-time-input>`,\n name: \"Hide label\",\n};\n\n/**\n * Set the `disabled` attribute to `true` to prevent interaction with the time input.\n */\nexport const Disabled = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n disabled=\"true\"\n ></ic-time-input>`,\n};\n\n/**\n * The time input is available in three different sizes:\n * - `small`\n * - `medium` (default)\n * - `large`\n */\nexport const Sizes = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n size=\"small\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n size=\"large\"\n ></ic-time-input>`,\n name: \"Sizes\",\n};\n\n/**\n * Use the helper text to add additional detail for the time input. Display custom content using the `helper-text` slot.\n */\nexport const CustomHelperText = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"We will have your order ready for you at this time\"\n ></ic-time-input>\n <br />\n <ic-time-input label=\"What time would you like to collect your coffee?\"\n ><ic-typography variant=\"caption\" slot=\"helper-text\">\n <span>\n For special requests,\n <ic-link href=\"#\">contact us</ic-link> before choosing a time\n </span>\n </ic-typography></ic-time-input\n >`,\n name: \"Custom helper text\",\n};\n\nexport const HideHelperText = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"You cannot see me, but you can hear me\"\n hide-helper-text=\"true\"\n ></ic-time-input>`,\n name: \"Hide helper text\",\n};\n\n/**\n * Validation on time input is set via `validation-status` and `validation-text`.\n *\n * `validation-status` will set the style of the validation message. `validation-status` accepts:\n * - `error`\n * - `warning`\n * - `success`\n *\n * `validation-status` is required for the `validation-text` to appear.\n */\nexport const Validation = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"error\"\n validation-text=\"There is a coffee shortage forecast for that time. Please choose a different time.\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"warning\"\n validation-text=\"Please be aware that there may be a coffee shortage at that time.\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"success\"\n validation-text=\"Your coffee will be available for you to collect at this time.\"\n ></ic-time-input>`,\n name: \"Custom validation\",\n};\n\nexport const AriaLiveBehaviour = {\n render: (args) =>\n html`<ic-time-input\n id=\"field-1\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Error already set on page load and aria-live overridden as 'assertive'\"\n validation-status=\"error\"\n validation-text=\"First error message\"\n validation-aria-live=\"assertive\"\n ></ic-time-input>\n <br />\n <ic-time-input\n id=\"field-2\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Error set after page load and aria-live overridden as 'assertive'\"\n validation-aria-live=\"assertive\"\n ></ic-time-input>\n <br />\n <ic-button id=\"toggle-btn-1\">Toggle errors</ic-button>\n <script>\n let showErrors1 = false;\n const btn1 = document.getElementById(\"toggle-btn-1\");\n const field1 = document.getElementById(\"field-1\");\n const field2 = document.getElementById(\"field-2\");\n\n btn1.addEventListener(\"click\", () => {\n showErrors1 = !showErrors1;\n\n field1.setAttribute(\"validation-status\", showErrors1 ? \"\" : \"error\");\n field1.setAttribute(\n \"validation-text\",\n showErrors1 ? \"\" : \"First error message\"\n );\n\n field2.setAttribute(\"validation-status\", showErrors1 ? \"error\" : \"\");\n field2.setAttribute(\n \"validation-text\",\n showErrors1 ? \"Second error message\" : \"\"\n );\n });\n </script>\n <br />\n <br />\n <br />\n <br />\n <ic-time-input\n id=\"field-3\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-time-input>\n <br />\n <ic-time-input\n id=\"field-4\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-time-input>\n <br />\n <ic-button id=\"toggle-btn-2\">Toggle errors</ic-button>\n <script>\n let showErrors2 = false;\n const btn2 = document.getElementById(\"toggle-btn-2\");\n const field3 = document.getElementById(\"field-3\");\n const field4 = document.getElementById(\"field-4\");\n\n btn2.addEventListener(\"click\", () => {\n showErrors2 = !showErrors2;\n\n field3.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field3.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Third error message\" : \"\"\n );\n\n field4.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field4.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Fourth error message\" : \"\"\n );\n });\n </script>`,\n\n name: \"Aria-live behaviour\",\n};\n\n/**\n * The `IcChange` event is emitted by the time input every time an input field is changed.\n */\nexport const IcChangeEmitTimePartChanges = {\n render: () => html`<ic-time-input\n emit-time-part-change=\"true\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icChange\", function (event) {\n console.log(\"icChange\", event.detail);\n });\n </script>`,\n name: \"IcChange with emitTimePartChange\",\n};\n\n/**\n * Demonstrates the `time-period` prop for 12-hour and 24-hour time selection.\n */\nexport const TimePeriod = {\n render: () => html`\n <ic-time-input label=\"12-hour time\" time-period=\"12\"></ic-time-input>\n `,\n name: \"Time period\",\n};\n\n/**\n * Demonstrates the time format HH:MM.\n */\nexport const HHMM = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM\"\n ></ic-time-input>`,\n name: \"Time format HH:MM\",\n};\n\n/**\n * Setting min time allows you to restrict the earliest time that can be selected.\n * The value can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const MinTime = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n min=\"08:00:00\"\n ></ic-time-input>`,\n name: \"Min time\",\n};\n\n/**\n * Setting max time allows you to restrict the latest time that can be selected.\n * The value can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const MaxTime = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n max=\"16:00:00\"\n ></ic-time-input>`,\n name: \"Max time\",\n};\n\n/**\n * To disable specific times in the time input, set the `disable-times` prop.\n * The `disable-times` prop accepts an array of time objects or strings.\n * Each time object can have a `start` and `end` property to define a range of disabled times, or it can be a single time string to disable that specific time.\n * The time can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const DisableTimes = {\n render: () => html`<div>\n <ic-time-input\n id=\"time-input-default-disable-time\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n </div>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-disable-time\"\n );\n timeInputDate.disableTimes = [{ start: \"08:00\", end: \"10:00\" }, \"13:20\"];\n </script>`,\n name: \"Disable times\",\n};\n\n/**\n * The time input can be cleared by setting the the value attribute to one of the following:\n * - empty string\n * - `null`\n * - `undefined`\n */\nexport const WithClearingValue = {\n render: () => html`<ic-time-input\n id=\"time-input-clear-value\"\n label=\"What time you like to collect your coffee?\"\n value=\"08:30:00\"\n ></ic-time-input>\n <br />\n <ic-button id=\"update\">Update time</ic-button>\n <ic-button id=\"null-btn\">set null</ic-button>\n <ic-button id=\"empty-btn\">set empty string</ic-button>\n <ic-button id=\"undef-btn\">set undefined</ic-button>\n <script>\n var input = document.querySelector(\"#time-input-clear-value\");\n var btn = document.querySelector(\"#update\");\n btn.addEventListener(\"click\", () => {\n input.value = \"08:30:00\";\n });\n var btn2 = document.querySelector(\"#null-btn\");\n btn2.addEventListener(\"click\", () => {\n input.value = null;\n });\n var btn3 = document.querySelector(\"#empty-btn\");\n btn3.addEventListener(\"click\", () => {\n input.value = \"\";\n });\n var btn4 = document.querySelector(\"#undef-btn\");\n btn4.addEventListener(\"click\", () => {\n input.value = undefined;\n });\n </script>`,\n name: \"With clearing value\",\n};\n"]}
1
+ {"version":3,"file":"ic-time-input.stories.js","sourceRoot":"","sources":["../../../../../src/components/ic-time-input/ic-time-input.stories.js"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,eAAe;IACb,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,eAAe;IAC1B,UAAU,EAAE;QACV,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;oBAEA;IAClB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;cAQN;IACZ,IAAI,EAAE,oBAAoB;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;oBAKA;IAClB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;cASN;IACZ,IAAI,EAAE,aAAa;CACpB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;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AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;oBAGA;IAClB,IAAI,EAAE,UAAU;CACjB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;cAWN;IACZ,IAAI,EAAE,eAAe;CACtB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA4BN;IACZ,IAAI,EAAE,qBAAqB;CAC5B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { html } from \"lit-html\";\nimport readme from \"./readme.md\";\n\nexport default {\n title: \"Web Components/Time Input\",\n component: \"ic-time-input\",\n parameters: {\n componentAPI: {\n data: readme,\n },\n },\n};\n\n/**\n * Use the time input component to manually type in a time in different formats.\n *\n * The input `label` is the only required attribute for time input.\n *\n * Click the 'Component API' tab to view all the available attributes, events and slots for time input.\n *\n * To use the time input component, import `@ukic/canary-web-components` into your application.\n *\n * Times can be added by manually typing into the input or using the up and down arrow keys.\n *\n * To move between hour, minute and second using the keyboard, provide the required values based on the placeholders or use `:`.\n *\n * By default, the helper text displays the time format.\n */\nexport const Default = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>`,\n name: \"Default\",\n};\n\n/**\n * Retrieving the time input value via `icTimeChange` returns the time as a Date object.\n *\n * The event returns the Date object once hour, minute and second have been entered.\n */\nexport const IcTimeChangeEvent = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icTimeChange\", function (event) {\n console.log(event.detail.value, event.detail.utcValue);\n });\n </script>`,\n name: \"icTimeChange event\",\n};\n\n/**\n * To set a value to the time input, pass the time value in the relevant time format.\n */\nexport const WithValue = {\n render: () => html`<ic-time-input\n id=\"time-input-default-time-with-value\"\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM:SS\"\n value=\"13:45:00\"\n ></ic-time-input>`,\n name: \"With value\",\n};\n\n/**\n * The time input also accepts a number of different time formats within the value attribute:\n * - [Date object](#date-object)\n * - [Zulu time](#zulu-time)\n */\nexport const DateObject = {\n render: () => html`<ic-time-input\n id=\"time-input-default-time-date\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-time-date\"\n );\n timeInputDate.value = new Date(\"2025-07-14T15:30:45\");\n </script>`,\n name: \"Date object\",\n};\n\nexport const ZuluTime = {\n render: () => html`<div>\n <ic-time-input\n id=\"time-input-default-zulu-time\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n </div>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-zulu-time\"\n );\n timeInputDate.value = \"15:30:45Z\";\n </script>`,\n name: \"Zulu time\",\n};\n\n/**\n * To set the time input as a required field, set the `required` attribute to `true`. This will add an asterisk at the end of the time input label.\n */\nexport const Required = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n required=\"true\"\n ></ic-time-input>`,\n name: \"Required\",\n};\n\n/**\n * To hide the label, set the `hide-label` attribute to `true`. The required `label` will still be read out by screen readers.\n */\nexport const HideLabel = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n hide-label=\"true\"\n ></ic-time-input>`,\n name: \"Hide label\",\n};\n\n/**\n * Set the `disabled` attribute to `true` to prevent interaction with the time input.\n */\nexport const Disabled = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n disabled=\"true\"\n ></ic-time-input>`,\n};\n\n/**\n * The time input is available in three different sizes:\n * - `small`\n * - `medium` (default)\n * - `large`\n */\nexport const Sizes = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n size=\"small\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n size=\"large\"\n ></ic-time-input>`,\n name: \"Sizes\",\n};\n\n/**\n * Use the helper text to add additional detail for the time input. Display custom content using the `helper-text` slot.\n */\nexport const CustomHelperText = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"We will have your order ready for you at this time\"\n ></ic-time-input>\n <br />\n <ic-time-input label=\"What time would you like to collect your coffee?\"\n ><ic-typography variant=\"caption\" slot=\"helper-text\">\n <span>\n For special requests,\n <ic-link href=\"#\">contact us</ic-link> before choosing a time\n </span>\n </ic-typography></ic-time-input\n >`,\n name: \"Custom helper text\",\n};\n\nexport const HideHelperText = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"You cannot see me, but you can hear me\"\n hide-helper-text=\"true\"\n ></ic-time-input>`,\n name: \"Hide helper text\",\n};\n\n/**\n * Validation on time input is set via `validation-status` and `validation-text`.\n *\n * `validation-status` will set the style of the validation message. `validation-status` accepts:\n * - `error`\n * - `warning`\n * - `success`\n *\n * `validation-status` is required for the `validation-text` to appear.\n */\nexport const Validation = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"error\"\n validation-text=\"There is a coffee shortage forecast for that time. Please choose a different time.\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"warning\"\n validation-text=\"Please be aware that there may be a coffee shortage at that time.\"\n ></ic-time-input>\n <br />\n <ic-time-input\n label=\"What time would you like to collect your coffee?\"\n validation-status=\"success\"\n validation-text=\"Your coffee will be available for you to collect at this time.\"\n ></ic-time-input>`,\n name: \"Custom validation\",\n};\n\nexport const AriaLiveBehaviour = {\n render: (args) =>\n html`<ic-time-input\n id=\"field-1\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Error already set on page load and aria-live overridden as 'assertive'\"\n validation-status=\"error\"\n validation-text=\"First error message\"\n validation-aria-live=\"assertive\"\n ></ic-time-input>\n <br />\n <ic-time-input\n id=\"field-2\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Error set after page load and aria-live overridden as 'assertive'\"\n validation-aria-live=\"assertive\"\n ></ic-time-input>\n <br />\n <ic-button id=\"toggle-btn-1\">Toggle errors</ic-button>\n <script>\n let showErrors1 = false;\n const btn1 = document.getElementById(\"toggle-btn-1\");\n const field1 = document.getElementById(\"field-1\");\n const field2 = document.getElementById(\"field-2\");\n\n btn1.addEventListener(\"click\", () => {\n showErrors1 = !showErrors1;\n\n field1.setAttribute(\"validation-status\", showErrors1 ? \"\" : \"error\");\n field1.setAttribute(\n \"validation-text\",\n showErrors1 ? \"\" : \"First error message\"\n );\n\n field2.setAttribute(\"validation-status\", showErrors1 ? \"error\" : \"\");\n field2.setAttribute(\n \"validation-text\",\n showErrors1 ? \"Second error message\" : \"\"\n );\n });\n </script>\n <br />\n <br />\n <br />\n <br />\n <ic-time-input\n id=\"field-3\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-time-input>\n <br />\n <ic-time-input\n id=\"field-4\"\n label=\"What time would you like to collect your coffee?\"\n helper-text=\"Default aria-live behaviour (i.e. 'polite')\"\n ></ic-time-input>\n <br />\n <ic-button id=\"toggle-btn-2\">Toggle errors</ic-button>\n <script>\n let showErrors2 = false;\n const btn2 = document.getElementById(\"toggle-btn-2\");\n const field3 = document.getElementById(\"field-3\");\n const field4 = document.getElementById(\"field-4\");\n\n btn2.addEventListener(\"click\", () => {\n showErrors2 = !showErrors2;\n\n field3.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field3.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Third error message\" : \"\"\n );\n\n field4.setAttribute(\"validation-status\", showErrors2 ? \"error\" : \"\");\n field4.setAttribute(\n \"validation-text\",\n showErrors2 ? \"Fourth error message\" : \"\"\n );\n });\n </script>`,\n\n name: \"Aria-live behaviour\",\n};\n\n/**\n * The `IcTimeChange` event is emitted by the time input every time an input field is changed.\n */\nexport const IcTimeChangeEmitTimePartChanges = {\n render: () => html`<ic-time-input\n emit-time-part-change=\"true\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icTimeChange\", function (event) {\n console.log(\"icTimeChange\", event.detail);\n });\n </script>`,\n name: \"IcTimeChange with emitTimePartChange\",\n};\n\n/**\n * Demonstrates the `time-period` prop for 12-hour and 24-hour time selection.\n */\nexport const TimePeriod = {\n render: () => html`\n <ic-time-input label=\"12-hour time\" time-period=\"12\"></ic-time-input>\n `,\n name: \"Time period\",\n};\n\nexport const TimePeriodAMPMToggle = {\n render: () => html`\n <ic-time-input\n label=\"12-hour time\"\n time-period=\"12\"\n show-am-pm-toggle=\"true\"\n ></ic-time-input>\n `,\n name: \"Time period - with AM/PM toggle\",\n};\n\nexport const IcTimeChangeTimeParts12Hour = {\n render: () => html`<ic-time-input\n emit-time-part-change=\"true\"\n label=\"What time would you like to collect your coffee?\"\n time-period=\"12\"\n show-am-pm-toggle=\"true\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icTimeChange\", function (event) {\n console.log(\"icTimeChange\", event.detail);\n });\n </script>`,\n name: \"IcTimeChange with emitTimePartChange - 12 hour\",\n};\n\n/**\n * Demonstrates the time format HH:MM.\n */\nexport const HHMM = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM\"\n ></ic-time-input>`,\n name: \"Time format HH:MM\",\n};\n\n/**\n * Demonstrates the time format HH:MM:SS.SSS.\n */\nexport const Milliseconds = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM:SS.SSS\"\n ></ic-time-input>`,\n name: \"Time format HH:MM:SS.SSS\",\n};\n\nexport const IcTimeChangeTimePartsMilliseconds = {\n render: () => html`<ic-time-input\n emit-time-part-change=\"true\"\n label=\"What time would you like to collect your coffee?\"\n time-format=\"HH:MM:SS.SSS\"\n ></ic-time-input>\n <script>\n var timeInput = document.querySelector(\"ic-time-input\");\n timeInput.addEventListener(\"icTimeChange\", function (event) {\n console.log(\"icTimeChange\", event.detail);\n });\n </script>`,\n name: \"IcTimeChange with emitTimePartChange - Milliseconds\",\n};\n\n/**\n * Setting min time allows you to restrict the earliest time that can be selected.\n * The value can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const MinTime = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n min=\"08:00:00\"\n ></ic-time-input>`,\n name: \"Min time\",\n};\n\n/**\n * Setting max time allows you to restrict the latest time that can be selected.\n * The value can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const MaxTime = {\n render: () => html`<ic-time-input\n label=\"What time would you like to collect your coffee?\"\n max=\"16:00:00\"\n ></ic-time-input>`,\n name: \"Max time\",\n};\n\n/**\n * To disable specific times in the time input, set the `disable-times` prop.\n * The `disable-times` prop accepts an array of time objects or strings.\n * Each time object can have a `start` and `end` property to define a range of disabled times, or it can be a single time string to disable that specific time.\n * The time can be in any format supported as `time-format`, in ISO 8601 time string format (`HH:MM:SS`) or as a JavaScript `Date` object.\n */\nexport const DisableTimes = {\n render: () => html`<div>\n <ic-time-input\n id=\"time-input-default-disable-time\"\n label=\"What time would you like to collect your coffee?\"\n ></ic-time-input>\n </div>\n <script>\n var timeInputDate = document.querySelector(\n \"#time-input-default-disable-time\"\n );\n timeInputDate.disableTimes = [{ start: \"08:00\", end: \"10:00\" }, \"13:20\"];\n </script>`,\n name: \"Disable times\",\n};\n\n/**\n * The time input can be cleared by setting the the value attribute to one of the following:\n * - empty string\n * - `null`\n * - `undefined`\n */\nexport const WithClearingValue = {\n render: () => html`<ic-time-input\n id=\"time-input-clear-value\"\n label=\"What time you like to collect your coffee?\"\n value=\"08:30:00\"\n ></ic-time-input>\n <br />\n <ic-button id=\"update\">Update time</ic-button>\n <ic-button id=\"null-btn\">set null</ic-button>\n <ic-button id=\"empty-btn\">set empty string</ic-button>\n <ic-button id=\"undef-btn\">set undefined</ic-button>\n <script>\n var input = document.querySelector(\"#time-input-clear-value\");\n var btn = document.querySelector(\"#update\");\n btn.addEventListener(\"click\", () => {\n input.value = \"08:30:00\";\n });\n var btn2 = document.querySelector(\"#null-btn\");\n btn2.addEventListener(\"click\", () => {\n input.value = null;\n });\n var btn3 = document.querySelector(\"#empty-btn\");\n btn3.addEventListener(\"click\", () => {\n input.value = \"\";\n });\n var btn4 = document.querySelector(\"#undef-btn\");\n btn4.addEventListener(\"click\", () => {\n input.value = undefined;\n });\n </script>`,\n name: \"With clearing value\",\n};\n"]}
@@ -26,6 +26,7 @@ export const createTimeInputEnv = async (format) => {
26
26
  const hourInput = component.shadowRoot.querySelector(".hour-input");
27
27
  const minuteInput = component.shadowRoot.querySelector(".minute-input");
28
28
  const secondInput = component.shadowRoot.querySelector(".second-input");
29
+ const millisecondInput = component.shadowRoot.querySelector(".millisecond-input");
29
30
  const mockSelect = jest.fn();
30
31
  if (hourInput)
31
32
  hourInput.select = mockSelect;
@@ -40,6 +41,7 @@ export const createTimeInputEnv = async (format) => {
40
41
  hourInput,
41
42
  minuteInput,
42
43
  secondInput,
44
+ millisecondInput,
43
45
  };
44
46
  };
45
47
  //# sourceMappingURL=ic-time-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ic-time-input.js","sourceRoot":"","sources":["../../../../../../../src/components/ic-time-input/test/helpers/ic-time-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CA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,CAAC;IAE1E,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAE7B,IAAI,SAAS;QAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC;IAC7C,IAAI,WAAW;QAAE,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC;IACjD,IAAI,WAAW;QAAE,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC;IAEjD,OAAO;QACL,IAAI;QACJ,SAAS;QACT,iBAAiB;QACjB,SAAS;QACT,WAAW;QACX,WAAW;KACZ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from \"@stencil/core/testing\";\nimport { TimeInput } from \"../../ic-time-input\";\nimport { h } from \"@stencil/core\";\nimport { IcInputLabel } from \"@ukic/web-components/dist/components/ic-input-label\";\n\ninterface EventType {\n inputType: string;\n target: HTMLInputElement;\n data: string;\n}\n\ninterface KeyboardEvent {\n key: string;\n preventDefault: () => void;\n}\n\ninterface TimeInputType {\n page: SpecPage;\n component: HTMLIcTimeInputElement;\n componentInstance: any;\n hourInput: HTMLInputElement;\n minuteInput: HTMLInputElement;\n secondInput: HTMLInputElement;\n}\n\nexport const createTimeInput = (format = \"HH:MM:SS\"): Promise<SpecPage> =>\n newSpecPage({\n components: [TimeInput, IcInputLabel],\n template: () => (\n <ic-time-input label=\"Test label\" time-format={format}></ic-time-input>\n ),\n });\n\nexport const handleEvent = (input: HTMLInputElement): EventType => {\n return {\n inputType: \"insertText\",\n target: input,\n data: input.value,\n };\n};\n\nexport const keyboardEvent = (keyboardKey: string): KeyboardEvent => {\n return {\n key: `${keyboardKey}`,\n preventDefault: (): null => null,\n };\n};\n\nexport const createTimeInputEnv = async (\n format?: string\n): Promise<TimeInputType> => {\n const page = await createTimeInput(format);\n\n const component = page.root as HTMLIcTimeInputElement;\n const componentInstance = page.rootInstance;\n\n const hourInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".hour-input\")!;\n const minuteInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".minute-input\")!;\n const secondInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".second-input\")!;\n\n const mockSelect = jest.fn();\n\n if (hourInput) hourInput.select = mockSelect;\n if (minuteInput) minuteInput.select = mockSelect;\n if (secondInput) secondInput.select = mockSelect;\n\n return {\n page,\n component,\n componentInstance,\n hourInput,\n minuteInput,\n secondInput,\n };\n};\n"]}
1
+ {"version":3,"file":"ic-time-input.js","sourceRoot":"","sources":["../../../../../../../src/components/ic-time-input/test/helpers/ic-time-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAuBnF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,GAAG,UAAU,EAAqB,EAAE,CACxE,WAAW,CAAC;IACV,UAAU,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;IACrC,QAAQ,EAAE,GAAG,EAAE,CAAC,CACd,qBAAe,KAAK,EAAC,YAAY,iBAAc,MAAM,GAAkB,CACxE;CACF,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAuB,EAAa,EAAE;IAChE,OAAO;QACL,SAAS,EAAE,YAAY;QACvB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,KAAK,CAAC,KAAK;KAClB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,WAAmB,EAAiB,EAAE;IAClE,OAAO;QACL,GAAG,EAAE,GAAG,WAAW,EAAE;QACrB,cAAc,EAAE,GAAS,EAAE,CAAC,IAAI;KACjC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EACrC,MAAe,EACS,EAAE;IAC1B,MAAM,IAAI,GAAG,MAAM,eAAe,CAAC,MAAM,CAAC,CAAC;IAE3C,MAAM,SAAS,GAAG,IAAI,CAAC,IAA8B,CAAC;IACtD,MAAM,iBAAiB,GAAG,IAAI,CAAC,YAAY,CAAC;IAE5C,MAAM,SAAS,GACb,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,aAAa,CAAE,CAAC;IACxE,MAAM,WAAW,GACf,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,eAAe,CAAE,CAAC;IAC1E,MAAM,WAAW,GACf,SAAS,CAAC,UAAW,CAAC,aAAa,CAAmB,eAAe,CAAE,CAAC;IAC1E,MAAM,gBAAgB,GACpB,SAAS,CAAC,UAAW,CAAC,aAAa,CACjC,oBAAoB,CACpB,CAAC;IAEL,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAE7B,IAAI,SAAS;QAAE,SAAS,CAAC,MAAM,GAAG,UAAU,CAAC;IAC7C,IAAI,WAAW;QAAE,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC;IACjD,IAAI,WAAW;QAAE,WAAW,CAAC,MAAM,GAAG,UAAU,CAAC;IAEjD,OAAO;QACL,IAAI;QACJ,SAAS;QACT,iBAAiB;QACjB,SAAS;QACT,WAAW;QACX,WAAW;QACX,gBAAgB;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { SpecPage, newSpecPage } from \"@stencil/core/testing\";\nimport { TimeInput } from \"../../ic-time-input\";\nimport { h } from \"@stencil/core\";\nimport { IcInputLabel } from \"@ukic/web-components/dist/components/ic-input-label\";\n\ninterface EventType {\n inputType: string;\n target: HTMLInputElement;\n data: string;\n}\n\ninterface KeyboardEvent {\n key: string;\n preventDefault: () => void;\n}\n\ninterface TimeInputType {\n page: SpecPage;\n component: HTMLIcTimeInputElement;\n componentInstance: any;\n hourInput: HTMLInputElement;\n minuteInput: HTMLInputElement;\n secondInput: HTMLInputElement;\n millisecondInput: HTMLInputElement;\n}\n\nexport const createTimeInput = (format = \"HH:MM:SS\"): Promise<SpecPage> =>\n newSpecPage({\n components: [TimeInput, IcInputLabel],\n template: () => (\n <ic-time-input label=\"Test label\" time-format={format}></ic-time-input>\n ),\n });\n\nexport const handleEvent = (input: HTMLInputElement): EventType => {\n return {\n inputType: \"insertText\",\n target: input,\n data: input.value,\n };\n};\n\nexport const keyboardEvent = (keyboardKey: string): KeyboardEvent => {\n return {\n key: `${keyboardKey}`,\n preventDefault: (): null => null,\n };\n};\n\nexport const createTimeInputEnv = async (\n format?: string\n): Promise<TimeInputType> => {\n const page = await createTimeInput(format);\n\n const component = page.root as HTMLIcTimeInputElement;\n const componentInstance = page.rootInstance;\n\n const hourInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".hour-input\")!;\n const minuteInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".minute-input\")!;\n const secondInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\".second-input\")!;\n const millisecondInput =\n component.shadowRoot!.querySelector<HTMLInputElement>(\n \".millisecond-input\"\n )!;\n\n const mockSelect = jest.fn();\n\n if (hourInput) hourInput.select = mockSelect;\n if (minuteInput) minuteInput.select = mockSelect;\n if (secondInput) secondInput.select = mockSelect;\n\n return {\n page,\n component,\n componentInstance,\n hourInput,\n minuteInput,\n secondInput,\n millisecondInput,\n };\n};\n"]}
@@ -0,0 +1,293 @@
1
+ :host(.ic-time-selector-small) {
2
+ --time-selector-padded-item-height: var(--ic-space-lg);
3
+ }
4
+
5
+ :host(.ic-time-selector-medium) {
6
+ --time-selector-padded-item-height: calc(
7
+ var(--ic-space-lg) + var(--ic-space-xxs)
8
+ );
9
+ }
10
+
11
+ :host(.ic-time-selector-large) {
12
+ --time-selector-padded-item-height: var(--ic-space-xl);
13
+ }
14
+
15
+ .ic-time-selector-dialog-container {
16
+ background-color: var(--ic-time-picker-time-selector-bg);
17
+ border: var(--ic-space-1px) solid var(--ic-time-picker-time-selector-border);
18
+ border-radius: var(--ic-space-xxs);
19
+ padding: var(--ic-space-xs);
20
+ max-width: calc(
21
+ 3 * var(--ic-space-xxl) + var(--ic-space-xl) + var(--ic-space-xxs)
22
+ );
23
+ width: -moz-fit-content;
24
+ width: fit-content;
25
+ }
26
+
27
+ :host(.ic-time-selector-small) .ic-time-selector-dialog-container {
28
+ padding: var(--ic-space-xxs);
29
+ max-width: calc(
30
+ 3 * var(--ic-space-xxl) + var(--ic-space-lg) + var(--ic-space-xxs)
31
+ );
32
+ }
33
+
34
+ :host(.ic-time-selector-large) .ic-time-selector-dialog-container {
35
+ padding: var(--ic-space-md);
36
+ max-width: calc(
37
+ 3 * var(--ic-space-xxl) + var(--ic-space-xl) + var(--ic-space-xs) +
38
+ var(--ic-space-xxs)
39
+ );
40
+ }
41
+
42
+ .ic-time-selector-item {
43
+ height: var(--ic-space-lg);
44
+ padding: var(--ic-space-xxxs);
45
+ text-align: center;
46
+ cursor: pointer;
47
+ scroll-snap-align: start;
48
+ transition: background 0.2s, color 0.2s;
49
+ }
50
+
51
+ :host(.ic-time-selector-small) .ic-time-selector-item {
52
+ padding: 0;
53
+ }
54
+
55
+ :host(.ic-time-selector-large) .ic-time-selector-item {
56
+ padding: var(--ic-space-xxs);
57
+ }
58
+
59
+ .ic-time-selector-item:hover:not(.disabled):not(.selected) {
60
+ background-color: var(--ic-time-picker-time-bg-hover);
61
+ }
62
+
63
+ .ic-time-selector-item:active:not(.disabled):not(.selected) {
64
+ background-color: var(--ic-time-picker-time-bg-pressed);
65
+ }
66
+
67
+ .ic-time-selector-item.selected {
68
+ background-color: var(--ic-time-picker-time-bg-selected);
69
+
70
+ --ic-typography-color: var(--ic-time-picker-time-text-selected);
71
+
72
+ position: relative;
73
+ }
74
+
75
+ .ic-time-selector-item.selected:hover {
76
+ background-color: var(--ic-time-picker-time-active-bg-hover);
77
+ }
78
+
79
+ .ic-time-selector-item.selected:active {
80
+ background-color: var(--ic-time-picker-time-active-bg-pressed);
81
+ }
82
+
83
+ .ic-time-selector-colon-selected {
84
+ background-color: var(--ic-time-picker-colon-bg-selected);
85
+ color: var(--ic-time-picker-colon-selected) !important;
86
+ }
87
+
88
+ .ic-time-selector-item.selected::before,
89
+ .ic-time-selector-item.selected::after,
90
+ .ic-time-selector-colon-selected::before,
91
+ .ic-time-selector-colon-selected::after {
92
+ content: "";
93
+ position: absolute;
94
+ left: 0;
95
+ right: 0;
96
+ height: var(--ic-space-1px);
97
+ background: var(--ic-time-picker-time-selector-bg);
98
+ }
99
+
100
+ .ic-time-selector-item.selected::before,
101
+ .ic-time-selector-colon-selected::before {
102
+ top: 0;
103
+ }
104
+
105
+ .ic-time-selector-item.selected::after,
106
+ .ic-time-selector-colon-selected::after {
107
+ bottom: 0;
108
+ }
109
+
110
+ .ic-time-selector-item.disabled {
111
+ --ic-typography-color: var(--ic-time-picker-time-text-disabled);
112
+
113
+ cursor: not-allowed;
114
+ }
115
+
116
+ .ic-time-selector-column-wrapper {
117
+ display: flex;
118
+ flex-direction: column;
119
+ }
120
+
121
+ .ic-time-selector-scroll-row {
122
+ height: var(--time-selector-padded-item-height) !important;
123
+ background: transparent !important;
124
+ pointer-events: none;
125
+ -webkit-user-select: none;
126
+ -moz-user-select: none;
127
+ user-select: none;
128
+ cursor: default !important;
129
+ box-sizing: border-box;
130
+ }
131
+
132
+ :host(.ic-time-selector-small) .ic-time-selector-scroll-row-last {
133
+ height: calc(var(--ic-space-1px) + var(--ic-space-xxxs)) !important;
134
+ }
135
+
136
+ :host(.ic-time-selector-medium) .ic-time-selector-scroll-row-last,
137
+ :host(.ic-time-selector-large) .ic-time-selector-scroll-row-last {
138
+ height: calc(
139
+ var(--ic-space-1px) + var(--ic-space-xxxs) + var(--ic-space-md)
140
+ ) !important;
141
+ }
142
+
143
+ .ic-time-selector-scroll-row:hover,
144
+ .ic-time-selector-scroll-row:active {
145
+ background: transparent !important;
146
+ }
147
+
148
+ .ic-time-selector-header-row {
149
+ color: var(--ic-time-picker-hh-label);
150
+
151
+ --ic-typography-color: var(--ic-time-picker-hh-label) !important;
152
+
153
+ background: transparent !important;
154
+ text-align: center;
155
+ height: var(--time-selector-padded-item-height);
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: center;
159
+ }
160
+
161
+ .ic-time-selector-header-border {
162
+ position: absolute;
163
+ left: 0;
164
+ right: 0;
165
+ top: var(--time-selector-padded-item-height);
166
+ height: var(--ic-space-1px);
167
+ background: var(--ic-time-picker-header-border);
168
+ pointer-events: none;
169
+ }
170
+
171
+ .ic-time-selector-colon {
172
+ display: flex;
173
+ align-items: center;
174
+ justify-content: center;
175
+ color: var(--ic-time-picker-colon-default);
176
+ height: var(--time-selector-padded-item-height);
177
+ margin-top: calc(3 * var(--time-selector-padded-item-height));
178
+ }
179
+
180
+ .ic-time-selector-columns {
181
+ display: flex;
182
+ flex-direction: row;
183
+ border-bottom: var(--ic-space-1px) solid var(--ic-time-picker-lower-border);
184
+ margin: 0 var(--ic-space-xxs);
185
+ position: relative;
186
+ z-index: 1;
187
+ }
188
+
189
+ .ic-time-selector-highlight-lines {
190
+ position: relative;
191
+ width: 100%;
192
+ }
193
+
194
+ .ic-time-selector-highlight {
195
+ position: absolute;
196
+ left: 0;
197
+ right: 0;
198
+ width: 100%;
199
+ height: var(--ic-space-1px);
200
+ background: var(--ic-time-picker-selection-border);
201
+ pointer-events: none;
202
+ z-index: 1;
203
+ }
204
+
205
+ .ic-time-selector-highlight-top {
206
+ top: calc(3 * var(--time-selector-padded-item-height) - var(--ic-space-1px));
207
+ }
208
+
209
+ .ic-time-selector-highlight-bottom {
210
+ top: calc(4 * var(--time-selector-padded-item-height));
211
+ }
212
+
213
+ .ic-time-selector-column {
214
+ height: calc((5 * var(--ic-space-xxl)) + (3 * var(--ic-space-1px)));
215
+ overflow-y: auto;
216
+ width: calc(var(--ic-space-xl) + var(--ic-space-xs));
217
+ position: relative;
218
+ scroll-snap-type: y mandatory;
219
+ scrollbar-width: none;
220
+ -ms-overflow-style: none;
221
+ }
222
+
223
+ :host(.ic-time-selector-small) .ic-time-selector-column {
224
+ width: calc(var(--ic-space-xl) + var(--ic-space-xxs) + var(--ic-space-xxxs));
225
+ }
226
+
227
+ :host(.ic-time-selector-large) .ic-time-selector-column {
228
+ width: calc(var(--ic-space-xl) + var(--ic-space-xs) + var(--ic-space-xxxs));
229
+ }
230
+
231
+ .ic-time-selector-column-period {
232
+ margin-left: var(--ic-space-xxs);
233
+ }
234
+
235
+ .ic-time-selector-column::-webkit-scrollbar {
236
+ display: none;
237
+ }
238
+
239
+ .ic-time-selector-column:focus-visible,
240
+ .ic-time-selector-item:focus-visible {
241
+ outline: none;
242
+ background-color: transparent;
243
+ }
244
+
245
+ .ic-time-selector-column:focus {
246
+ box-shadow: var(--ic-border-focus);
247
+ border-radius: var(--ic-border-radius);
248
+ transition: var(--ic-easing-transition-fast);
249
+ z-index: 3;
250
+ }
251
+
252
+ .ic-time-selector-list {
253
+ list-style: none;
254
+ margin: 0;
255
+ padding: 0;
256
+ }
257
+
258
+ .ic-time-selector-actions {
259
+ display: flex;
260
+ flex-direction: row;
261
+ justify-content: flex-end;
262
+ align-items: center;
263
+ width: 100%;
264
+ margin-top: var(--ic-space-xs);
265
+ margin-left: auto;
266
+ }
267
+
268
+ .ic-time-selector-check-btn {
269
+ margin-left: calc(var(--ic-space-xs) + var(--ic-space-xxxs));
270
+ }
271
+
272
+ .sr-only {
273
+ position: absolute;
274
+ left: -9999px;
275
+ }
276
+
277
+ @media (forced-colors: active) {
278
+ .ic-time-selector-item.selected {
279
+ background-color: highlight !important;
280
+ }
281
+
282
+ .ic-time-selector-item.disabled {
283
+ --ic-typography-color: GrayText !important;
284
+ }
285
+
286
+ .ic-time-selector-column:focus {
287
+ border: var(--ic-border-hc);
288
+ }
289
+
290
+ .ic-time-selector-highlight {
291
+ background: Highlight !important;
292
+ }
293
+ }