@visitwonders/assembly 0.1.0

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 (564) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +26 -0
  3. package/addon-main.cjs +4 -0
  4. package/declarations/action/button.d.ts +50 -0
  5. package/declarations/action/button.d.ts.map +1 -0
  6. package/declarations/action/index.d.ts +3 -0
  7. package/declarations/action/index.d.ts.map +1 -0
  8. package/declarations/action/link.d.ts +16 -0
  9. package/declarations/action/link.d.ts.map +1 -0
  10. package/declarations/components/form/checkbox.d.ts +65 -0
  11. package/declarations/components/form/checkbox.d.ts.map +1 -0
  12. package/declarations/components/form/control.d.ts +36 -0
  13. package/declarations/components/form/control.d.ts.map +1 -0
  14. package/declarations/components/form/error-message.d.ts +22 -0
  15. package/declarations/components/form/error-message.d.ts.map +1 -0
  16. package/declarations/components/form/field.d.ts +21 -0
  17. package/declarations/components/form/field.d.ts.map +1 -0
  18. package/declarations/components/form/form.d.ts +14 -0
  19. package/declarations/components/form/form.d.ts.map +1 -0
  20. package/declarations/components/form/help-text.d.ts +14 -0
  21. package/declarations/components/form/help-text.d.ts.map +1 -0
  22. package/declarations/components/form/index.d.ts +15 -0
  23. package/declarations/components/form/index.d.ts.map +1 -0
  24. package/declarations/components/form/input.d.ts +80 -0
  25. package/declarations/components/form/input.d.ts.map +1 -0
  26. package/declarations/components/form/label.d.ts +34 -0
  27. package/declarations/components/form/label.d.ts.map +1 -0
  28. package/declarations/components/form/radio-group.d.ts +43 -0
  29. package/declarations/components/form/radio-group.d.ts.map +1 -0
  30. package/declarations/components/form/radio.d.ts +54 -0
  31. package/declarations/components/form/radio.d.ts.map +1 -0
  32. package/declarations/components/form/search-input.d.ts +35 -0
  33. package/declarations/components/form/search-input.d.ts.map +1 -0
  34. package/declarations/components/form/select.d.ts +36 -0
  35. package/declarations/components/form/select.d.ts.map +1 -0
  36. package/declarations/components/form/test.d.ts +11 -0
  37. package/declarations/components/form/test.d.ts.map +1 -0
  38. package/declarations/components/form/textarea.d.ts +79 -0
  39. package/declarations/components/form/textarea.d.ts.map +1 -0
  40. package/declarations/components/form/toggle.d.ts +23 -0
  41. package/declarations/components/form/toggle.d.ts.map +1 -0
  42. package/declarations/components/primitives/grid-item.d.ts +21 -0
  43. package/declarations/components/primitives/grid-item.d.ts.map +1 -0
  44. package/declarations/components/primitives/grid.d.ts +49 -0
  45. package/declarations/components/primitives/grid.d.ts.map +1 -0
  46. package/declarations/components/primitives/h-stack.d.ts +17 -0
  47. package/declarations/components/primitives/h-stack.d.ts.map +1 -0
  48. package/declarations/components/primitives/heading.d.ts +52 -0
  49. package/declarations/components/primitives/heading.d.ts.map +1 -0
  50. package/declarations/components/primitives/image.d.ts +24 -0
  51. package/declarations/components/primitives/image.d.ts.map +1 -0
  52. package/declarations/components/primitives/index.d.ts +8 -0
  53. package/declarations/components/primitives/index.d.ts.map +1 -0
  54. package/declarations/components/primitives/link.d.ts +16 -0
  55. package/declarations/components/primitives/link.d.ts.map +1 -0
  56. package/declarations/components/primitives/stack.d.ts +23 -0
  57. package/declarations/components/primitives/stack.d.ts.map +1 -0
  58. package/declarations/components/primitives/text.d.ts +50 -0
  59. package/declarations/components/primitives/text.d.ts.map +1 -0
  60. package/declarations/components/primitives/v-stack.d.ts +16 -0
  61. package/declarations/components/primitives/v-stack.d.ts.map +1 -0
  62. package/declarations/components/ui/badge.d.ts +14 -0
  63. package/declarations/components/ui/badge.d.ts.map +1 -0
  64. package/declarations/components/ui/button.d.ts +32 -0
  65. package/declarations/components/ui/button.d.ts.map +1 -0
  66. package/declarations/components/ui/card.d.ts +27 -0
  67. package/declarations/components/ui/card.d.ts.map +1 -0
  68. package/declarations/components/ui/description-list.d.ts +22 -0
  69. package/declarations/components/ui/description-list.d.ts.map +1 -0
  70. package/declarations/components/ui/drawer.d.ts +14 -0
  71. package/declarations/components/ui/drawer.d.ts.map +1 -0
  72. package/declarations/components/ui/icon-button.d.ts +21 -0
  73. package/declarations/components/ui/icon-button.d.ts.map +1 -0
  74. package/declarations/components/ui/icon.d.ts +21 -0
  75. package/declarations/components/ui/icon.d.ts.map +1 -0
  76. package/declarations/components/ui/index.d.ts +17 -0
  77. package/declarations/components/ui/index.d.ts.map +1 -0
  78. package/declarations/components/ui/modal.d.ts +14 -0
  79. package/declarations/components/ui/modal.d.ts.map +1 -0
  80. package/declarations/components/ui/page-header.d.ts +16 -0
  81. package/declarations/components/ui/page-header.d.ts.map +1 -0
  82. package/declarations/components/ui/skeleton-card.d.ts +17 -0
  83. package/declarations/components/ui/skeleton-card.d.ts.map +1 -0
  84. package/declarations/components/ui/skeleton-text.d.ts +16 -0
  85. package/declarations/components/ui/skeleton-text.d.ts.map +1 -0
  86. package/declarations/components/ui/skeleton.d.ts +20 -0
  87. package/declarations/components/ui/skeleton.d.ts.map +1 -0
  88. package/declarations/components/ui/spinner.d.ts +11 -0
  89. package/declarations/components/ui/spinner.d.ts.map +1 -0
  90. package/declarations/components/ui/tab-nav/index.d.ts +36 -0
  91. package/declarations/components/ui/tab-nav/index.d.ts.map +1 -0
  92. package/declarations/components/ui/table/body.d.ts +11 -0
  93. package/declarations/components/ui/table/body.d.ts.map +1 -0
  94. package/declarations/components/ui/table/caption.d.ts +18 -0
  95. package/declarations/components/ui/table/caption.d.ts.map +1 -0
  96. package/declarations/components/ui/table/cell.d.ts +31 -0
  97. package/declarations/components/ui/table/cell.d.ts.map +1 -0
  98. package/declarations/components/ui/table/footer.d.ts +11 -0
  99. package/declarations/components/ui/table/footer.d.ts.map +1 -0
  100. package/declarations/components/ui/table/header-cell.d.ts +35 -0
  101. package/declarations/components/ui/table/header-cell.d.ts.map +1 -0
  102. package/declarations/components/ui/table/header.d.ts +11 -0
  103. package/declarations/components/ui/table/header.d.ts.map +1 -0
  104. package/declarations/components/ui/table/index.d.ts +0 -0
  105. package/declarations/components/ui/table/index.d.ts.map +1 -0
  106. package/declarations/components/ui/table/row.d.ts +21 -0
  107. package/declarations/components/ui/table/row.d.ts.map +1 -0
  108. package/declarations/components/ui/table_old.d.ts +29 -0
  109. package/declarations/components/ui/table_old.d.ts.map +1 -0
  110. package/declarations/data/index.d.ts +2 -0
  111. package/declarations/data/index.d.ts.map +1 -0
  112. package/declarations/data/table.d.ts +147 -0
  113. package/declarations/data/table.d.ts.map +1 -0
  114. package/declarations/form/calendar.d.ts +113 -0
  115. package/declarations/form/calendar.d.ts.map +1 -0
  116. package/declarations/form/checkbox-group.d.ts +84 -0
  117. package/declarations/form/checkbox-group.d.ts.map +1 -0
  118. package/declarations/form/checkbox.d.ts +65 -0
  119. package/declarations/form/checkbox.d.ts.map +1 -0
  120. package/declarations/form/control.d.ts +53 -0
  121. package/declarations/form/control.d.ts.map +1 -0
  122. package/declarations/form/country-data.d.ts +42 -0
  123. package/declarations/form/country-data.d.ts.map +1 -0
  124. package/declarations/form/country-select-field.d.ts +52 -0
  125. package/declarations/form/country-select-field.d.ts.map +1 -0
  126. package/declarations/form/country-select.d.ts +117 -0
  127. package/declarations/form/country-select.d.ts.map +1 -0
  128. package/declarations/form/date-picker-field.d.ts +69 -0
  129. package/declarations/form/date-picker-field.d.ts.map +1 -0
  130. package/declarations/form/date-picker.d.ts +128 -0
  131. package/declarations/form/date-picker.d.ts.map +1 -0
  132. package/declarations/form/date-range-picker-field.d.ts +71 -0
  133. package/declarations/form/date-range-picker-field.d.ts.map +1 -0
  134. package/declarations/form/date-range-picker.d.ts +146 -0
  135. package/declarations/form/date-range-picker.d.ts.map +1 -0
  136. package/declarations/form/error-message.d.ts +22 -0
  137. package/declarations/form/error-message.d.ts.map +1 -0
  138. package/declarations/form/field.d.ts +21 -0
  139. package/declarations/form/field.d.ts.map +1 -0
  140. package/declarations/form/form.d.ts +61 -0
  141. package/declarations/form/form.d.ts.map +1 -0
  142. package/declarations/form/help-text.d.ts +14 -0
  143. package/declarations/form/help-text.d.ts.map +1 -0
  144. package/declarations/form/index.d.ts +35 -0
  145. package/declarations/form/index.d.ts.map +1 -0
  146. package/declarations/form/input.d.ts +78 -0
  147. package/declarations/form/input.d.ts.map +1 -0
  148. package/declarations/form/label.d.ts +34 -0
  149. package/declarations/form/label.d.ts.map +1 -0
  150. package/declarations/form/listbox.d.ts +181 -0
  151. package/declarations/form/listbox.d.ts.map +1 -0
  152. package/declarations/form/money-field.d.ts +74 -0
  153. package/declarations/form/money-field.d.ts.map +1 -0
  154. package/declarations/form/multi-select.d.ts +121 -0
  155. package/declarations/form/multi-select.d.ts.map +1 -0
  156. package/declarations/form/number-field.d.ts +86 -0
  157. package/declarations/form/number-field.d.ts.map +1 -0
  158. package/declarations/form/option-group.d.ts +2 -0
  159. package/declarations/form/option-group.d.ts.map +1 -0
  160. package/declarations/form/option.d.ts +2 -0
  161. package/declarations/form/option.d.ts.map +1 -0
  162. package/declarations/form/radio-group.d.ts +43 -0
  163. package/declarations/form/radio-group.d.ts.map +1 -0
  164. package/declarations/form/radio.d.ts +54 -0
  165. package/declarations/form/radio.d.ts.map +1 -0
  166. package/declarations/form/search-input.d.ts +35 -0
  167. package/declarations/form/search-input.d.ts.map +1 -0
  168. package/declarations/form/select-field.d.ts +49 -0
  169. package/declarations/form/select-field.d.ts.map +1 -0
  170. package/declarations/form/select.d.ts +145 -0
  171. package/declarations/form/select.d.ts.map +1 -0
  172. package/declarations/form/test.d.ts +11 -0
  173. package/declarations/form/test.d.ts.map +1 -0
  174. package/declarations/form/text-field.d.ts +95 -0
  175. package/declarations/form/text-field.d.ts.map +1 -0
  176. package/declarations/form/textarea.d.ts +81 -0
  177. package/declarations/form/textarea.d.ts.map +1 -0
  178. package/declarations/form/time-picker-field.d.ts +61 -0
  179. package/declarations/form/time-picker-field.d.ts.map +1 -0
  180. package/declarations/form/time-picker.d.ts +151 -0
  181. package/declarations/form/time-picker.d.ts.map +1 -0
  182. package/declarations/form/toggle-field.d.ts +45 -0
  183. package/declarations/form/toggle-field.d.ts.map +1 -0
  184. package/declarations/form/toggle-group.d.ts +21 -0
  185. package/declarations/form/toggle-group.d.ts.map +1 -0
  186. package/declarations/form/toggle.d.ts +59 -0
  187. package/declarations/form/toggle.d.ts.map +1 -0
  188. package/declarations/index.d.ts +1 -0
  189. package/declarations/index.d.ts.map +1 -0
  190. package/declarations/layout/divider.d.ts +21 -0
  191. package/declarations/layout/divider.d.ts.map +1 -0
  192. package/declarations/layout/grid-item.d.ts +21 -0
  193. package/declarations/layout/grid-item.d.ts.map +1 -0
  194. package/declarations/layout/grid.d.ts +49 -0
  195. package/declarations/layout/grid.d.ts.map +1 -0
  196. package/declarations/layout/h-stack.d.ts +17 -0
  197. package/declarations/layout/h-stack.d.ts.map +1 -0
  198. package/declarations/layout/index.d.ts +7 -0
  199. package/declarations/layout/index.d.ts.map +1 -0
  200. package/declarations/layout/stack.d.ts +23 -0
  201. package/declarations/layout/stack.d.ts.map +1 -0
  202. package/declarations/layout/v-stack.d.ts +16 -0
  203. package/declarations/layout/v-stack.d.ts.map +1 -0
  204. package/declarations/media/icon.d.ts +34 -0
  205. package/declarations/media/icon.d.ts.map +1 -0
  206. package/declarations/media/image.d.ts +24 -0
  207. package/declarations/media/image.d.ts.map +1 -0
  208. package/declarations/media/index.d.ts +3 -0
  209. package/declarations/media/index.d.ts.map +1 -0
  210. package/declarations/overlay/blanket.d.ts +78 -0
  211. package/declarations/overlay/blanket.d.ts.map +1 -0
  212. package/declarations/overlay/drawer.d.ts +140 -0
  213. package/declarations/overlay/drawer.d.ts.map +1 -0
  214. package/declarations/overlay/index.d.ts +7 -0
  215. package/declarations/overlay/index.d.ts.map +1 -0
  216. package/declarations/overlay/modal.d.ts +138 -0
  217. package/declarations/overlay/modal.d.ts.map +1 -0
  218. package/declarations/overlay/popover.d.ts +205 -0
  219. package/declarations/overlay/popover.d.ts.map +1 -0
  220. package/declarations/overlay/toast.d.ts +58 -0
  221. package/declarations/overlay/toast.d.ts.map +1 -0
  222. package/declarations/overlay/tooltip.d.ts +154 -0
  223. package/declarations/overlay/tooltip.d.ts.map +1 -0
  224. package/declarations/primitives/grid-item.d.ts +21 -0
  225. package/declarations/primitives/grid-item.d.ts.map +1 -0
  226. package/declarations/primitives/grid.d.ts +49 -0
  227. package/declarations/primitives/grid.d.ts.map +1 -0
  228. package/declarations/primitives/h-stack.d.ts +17 -0
  229. package/declarations/primitives/h-stack.d.ts.map +1 -0
  230. package/declarations/primitives/heading.d.ts +52 -0
  231. package/declarations/primitives/heading.d.ts.map +1 -0
  232. package/declarations/primitives/image.d.ts +24 -0
  233. package/declarations/primitives/image.d.ts.map +1 -0
  234. package/declarations/primitives/index.d.ts +4 -0
  235. package/declarations/primitives/index.d.ts.map +1 -0
  236. package/declarations/primitives/link.d.ts +16 -0
  237. package/declarations/primitives/link.d.ts.map +1 -0
  238. package/declarations/primitives/stack.d.ts +23 -0
  239. package/declarations/primitives/stack.d.ts.map +1 -0
  240. package/declarations/primitives/text.d.ts +50 -0
  241. package/declarations/primitives/text.d.ts.map +1 -0
  242. package/declarations/primitives/v-stack.d.ts +16 -0
  243. package/declarations/primitives/v-stack.d.ts.map +1 -0
  244. package/declarations/services/index.d.ts +3 -0
  245. package/declarations/services/index.d.ts.map +1 -0
  246. package/declarations/services/toast.d.ts +81 -0
  247. package/declarations/services/toast.d.ts.map +1 -0
  248. package/declarations/status/badge.d.ts +38 -0
  249. package/declarations/status/badge.d.ts.map +1 -0
  250. package/declarations/status/index.d.ts +8 -0
  251. package/declarations/status/index.d.ts.map +1 -0
  252. package/declarations/status/skeleton-avatar.d.ts +22 -0
  253. package/declarations/status/skeleton-avatar.d.ts.map +1 -0
  254. package/declarations/status/skeleton-button.d.ts +21 -0
  255. package/declarations/status/skeleton-button.d.ts.map +1 -0
  256. package/declarations/status/skeleton-image.d.ts +21 -0
  257. package/declarations/status/skeleton-image.d.ts.map +1 -0
  258. package/declarations/status/skeleton-text.d.ts +24 -0
  259. package/declarations/status/skeleton-text.d.ts.map +1 -0
  260. package/declarations/status/skeleton.d.ts +33 -0
  261. package/declarations/status/skeleton.d.ts.map +1 -0
  262. package/declarations/status/tag.d.ts +48 -0
  263. package/declarations/status/tag.d.ts.map +1 -0
  264. package/declarations/template-registry.d.ts +1 -0
  265. package/declarations/template-registry.d.ts.map +1 -0
  266. package/declarations/types/design-system.d.ts +42 -0
  267. package/declarations/types/design-system.d.ts.map +1 -0
  268. package/declarations/typography/heading.d.ts +52 -0
  269. package/declarations/typography/heading.d.ts.map +1 -0
  270. package/declarations/typography/index.d.ts +3 -0
  271. package/declarations/typography/index.d.ts.map +1 -0
  272. package/declarations/typography/link.d.ts +16 -0
  273. package/declarations/typography/link.d.ts.map +1 -0
  274. package/declarations/typography/text.d.ts +50 -0
  275. package/declarations/typography/text.d.ts.map +1 -0
  276. package/declarations/ui/button.d.ts +50 -0
  277. package/declarations/ui/button.d.ts.map +1 -0
  278. package/declarations/ui/icon.d.ts +21 -0
  279. package/declarations/ui/icon.d.ts.map +1 -0
  280. package/declarations/ui/index.d.ts +2 -0
  281. package/declarations/ui/index.d.ts.map +1 -0
  282. package/dist/_app_/action/button.js +1 -0
  283. package/dist/_app_/action/link.js +1 -0
  284. package/dist/_app_/data/table.js +1 -0
  285. package/dist/_app_/form/calendar.js +1 -0
  286. package/dist/_app_/form/checkbox-group.js +1 -0
  287. package/dist/_app_/form/checkbox.js +1 -0
  288. package/dist/_app_/form/control.js +1 -0
  289. package/dist/_app_/form/country-data.js +1 -0
  290. package/dist/_app_/form/country-select-field.js +1 -0
  291. package/dist/_app_/form/country-select.js +1 -0
  292. package/dist/_app_/form/date-picker-field.js +1 -0
  293. package/dist/_app_/form/date-picker.js +1 -0
  294. package/dist/_app_/form/date-range-picker-field.js +1 -0
  295. package/dist/_app_/form/date-range-picker.js +1 -0
  296. package/dist/_app_/form/error-message.js +1 -0
  297. package/dist/_app_/form/field.js +1 -0
  298. package/dist/_app_/form/form.js +1 -0
  299. package/dist/_app_/form/help-text.js +1 -0
  300. package/dist/_app_/form/input.js +1 -0
  301. package/dist/_app_/form/label.js +1 -0
  302. package/dist/_app_/form/listbox.js +1 -0
  303. package/dist/_app_/form/money-field.js +1 -0
  304. package/dist/_app_/form/multi-select.js +1 -0
  305. package/dist/_app_/form/number-field.js +1 -0
  306. package/dist/_app_/form/option-group.js +1 -0
  307. package/dist/_app_/form/option.js +1 -0
  308. package/dist/_app_/form/radio-group.js +1 -0
  309. package/dist/_app_/form/radio.js +1 -0
  310. package/dist/_app_/form/search-input.js +1 -0
  311. package/dist/_app_/form/select-field.js +1 -0
  312. package/dist/_app_/form/select.js +1 -0
  313. package/dist/_app_/form/text-field.js +1 -0
  314. package/dist/_app_/form/textarea.js +1 -0
  315. package/dist/_app_/form/time-picker-field.js +1 -0
  316. package/dist/_app_/form/time-picker.js +1 -0
  317. package/dist/_app_/form/toggle-field.js +1 -0
  318. package/dist/_app_/form/toggle-group.js +1 -0
  319. package/dist/_app_/form/toggle.js +1 -0
  320. package/dist/_app_/layout/divider.js +1 -0
  321. package/dist/_app_/layout/grid-item.js +1 -0
  322. package/dist/_app_/layout/grid.js +1 -0
  323. package/dist/_app_/layout/h-stack.js +1 -0
  324. package/dist/_app_/layout/stack.js +1 -0
  325. package/dist/_app_/layout/v-stack.js +1 -0
  326. package/dist/_app_/media/icon.js +1 -0
  327. package/dist/_app_/media/image.js +1 -0
  328. package/dist/_app_/overlay/blanket.js +1 -0
  329. package/dist/_app_/overlay/drawer.js +1 -0
  330. package/dist/_app_/overlay/modal.js +1 -0
  331. package/dist/_app_/overlay/popover.js +1 -0
  332. package/dist/_app_/overlay/toast.js +1 -0
  333. package/dist/_app_/overlay/tooltip.js +1 -0
  334. package/dist/_app_/services/toast.js +1 -0
  335. package/dist/_app_/status/badge.js +1 -0
  336. package/dist/_app_/status/skeleton-avatar.js +1 -0
  337. package/dist/_app_/status/skeleton-button.js +1 -0
  338. package/dist/_app_/status/skeleton-image.js +1 -0
  339. package/dist/_app_/status/skeleton-text.js +1 -0
  340. package/dist/_app_/status/skeleton.js +1 -0
  341. package/dist/_app_/status/tag.js +1 -0
  342. package/dist/_app_/typography/heading.js +1 -0
  343. package/dist/_app_/typography/text.js +1 -0
  344. package/dist/action/button.css +360 -0
  345. package/dist/action/button.js +50 -0
  346. package/dist/action/button.js.map +1 -0
  347. package/dist/action/index.js +3 -0
  348. package/dist/action/index.js.map +1 -0
  349. package/dist/action/link-css-2b7265326c02ebb264835b3680b7e81e.css +19 -0
  350. package/dist/action/link.js +17 -0
  351. package/dist/action/link.js.map +1 -0
  352. package/dist/data/index.js +2 -0
  353. package/dist/data/index.js.map +1 -0
  354. package/dist/data/table.css +270 -0
  355. package/dist/data/table.js +478 -0
  356. package/dist/data/table.js.map +1 -0
  357. package/dist/form/calendar.css +239 -0
  358. package/dist/form/calendar.js +532 -0
  359. package/dist/form/calendar.js.map +1 -0
  360. package/dist/form/checkbox-group.css +47 -0
  361. package/dist/form/checkbox-group.js +102 -0
  362. package/dist/form/checkbox-group.js.map +1 -0
  363. package/dist/form/checkbox.css +193 -0
  364. package/dist/form/checkbox.js +70 -0
  365. package/dist/form/checkbox.js.map +1 -0
  366. package/dist/form/control-css-6c81caf37fd813b36033091d5340bc70.css +20 -0
  367. package/dist/form/control.js +57 -0
  368. package/dist/form/control.js.map +1 -0
  369. package/dist/form/country-data.js +1075 -0
  370. package/dist/form/country-data.js.map +1 -0
  371. package/dist/form/country-select-field.js +37 -0
  372. package/dist/form/country-select-field.js.map +1 -0
  373. package/dist/form/country-select.css +299 -0
  374. package/dist/form/country-select.js +336 -0
  375. package/dist/form/country-select.js.map +1 -0
  376. package/dist/form/date-picker-field.js +37 -0
  377. package/dist/form/date-picker-field.js.map +1 -0
  378. package/dist/form/date-picker.css +177 -0
  379. package/dist/form/date-picker.js +366 -0
  380. package/dist/form/date-picker.js.map +1 -0
  381. package/dist/form/date-range-picker-field.js +37 -0
  382. package/dist/form/date-range-picker-field.js.map +1 -0
  383. package/dist/form/date-range-picker.css +259 -0
  384. package/dist/form/date-range-picker.js +451 -0
  385. package/dist/form/date-range-picker.js.map +1 -0
  386. package/dist/form/error-message.css +27 -0
  387. package/dist/form/error-message.js +27 -0
  388. package/dist/form/error-message.js.map +1 -0
  389. package/dist/form/field.css +45 -0
  390. package/dist/form/field.js +28 -0
  391. package/dist/form/field.js.map +1 -0
  392. package/dist/form/form.css +6 -0
  393. package/dist/form/form.js +120 -0
  394. package/dist/form/form.js.map +1 -0
  395. package/dist/form/help-text.css +7 -0
  396. package/dist/form/help-text.js +13 -0
  397. package/dist/form/help-text.js.map +1 -0
  398. package/dist/form/index.js +33 -0
  399. package/dist/form/index.js.map +1 -0
  400. package/dist/form/input.css +176 -0
  401. package/dist/form/input.js +43 -0
  402. package/dist/form/input.js.map +1 -0
  403. package/dist/form/label.css +59 -0
  404. package/dist/form/label.js +54 -0
  405. package/dist/form/label.js.map +1 -0
  406. package/dist/form/listbox.css +125 -0
  407. package/dist/form/listbox.js +388 -0
  408. package/dist/form/listbox.js.map +1 -0
  409. package/dist/form/money-field.css +9 -0
  410. package/dist/form/money-field.js +203 -0
  411. package/dist/form/money-field.js.map +1 -0
  412. package/dist/form/multi-select.css +343 -0
  413. package/dist/form/multi-select.js +429 -0
  414. package/dist/form/multi-select.js.map +1 -0
  415. package/dist/form/number-field.css +170 -0
  416. package/dist/form/number-field.js +184 -0
  417. package/dist/form/number-field.js.map +1 -0
  418. package/dist/form/option-group.js +2 -0
  419. package/dist/form/option-group.js.map +1 -0
  420. package/dist/form/option.js +2 -0
  421. package/dist/form/option.js.map +1 -0
  422. package/dist/form/radio-group.css +54 -0
  423. package/dist/form/radio-group.js +53 -0
  424. package/dist/form/radio-group.js.map +1 -0
  425. package/dist/form/radio.css +183 -0
  426. package/dist/form/radio.js +65 -0
  427. package/dist/form/radio.js.map +1 -0
  428. package/dist/form/search-input.css +118 -0
  429. package/dist/form/search-input.js +87 -0
  430. package/dist/form/search-input.js.map +1 -0
  431. package/dist/form/select-field.js +39 -0
  432. package/dist/form/select-field.js.map +1 -0
  433. package/dist/form/select.css +201 -0
  434. package/dist/form/select.js +394 -0
  435. package/dist/form/select.js.map +1 -0
  436. package/dist/form/text-field-css-f60360f3f8aaf4da664eaccd1bcc9f8f.css +31 -0
  437. package/dist/form/text-field.js +141 -0
  438. package/dist/form/text-field.js.map +1 -0
  439. package/dist/form/textarea.css +139 -0
  440. package/dist/form/textarea.js +140 -0
  441. package/dist/form/textarea.js.map +1 -0
  442. package/dist/form/time-picker-field.js +37 -0
  443. package/dist/form/time-picker-field.js.map +1 -0
  444. package/dist/form/time-picker.css +239 -0
  445. package/dist/form/time-picker.js +618 -0
  446. package/dist/form/time-picker.js.map +1 -0
  447. package/dist/form/toggle-field.css +6 -0
  448. package/dist/form/toggle-field.js +40 -0
  449. package/dist/form/toggle-field.js.map +1 -0
  450. package/dist/form/toggle-group.css +46 -0
  451. package/dist/form/toggle-group.js +20 -0
  452. package/dist/form/toggle-group.js.map +1 -0
  453. package/dist/form/toggle.css +206 -0
  454. package/dist/form/toggle.js +103 -0
  455. package/dist/form/toggle.js.map +1 -0
  456. package/dist/index.js +2 -0
  457. package/dist/index.js.map +1 -0
  458. package/dist/layout/divider-css-1ba104b9c606cbd1f542b45640fb5f2b.css +122 -0
  459. package/dist/layout/divider.js +35 -0
  460. package/dist/layout/divider.js.map +1 -0
  461. package/dist/layout/grid-css-086976eb41686e3714554f56c098d3d5.css +155 -0
  462. package/dist/layout/grid-item-css-8d0f842568d1e8345ac709bdf2ed6745.css +122 -0
  463. package/dist/layout/grid-item.js +13 -0
  464. package/dist/layout/grid-item.js.map +1 -0
  465. package/dist/layout/grid.js +96 -0
  466. package/dist/layout/grid.js.map +1 -0
  467. package/dist/layout/h-stack.js +14 -0
  468. package/dist/layout/h-stack.js.map +1 -0
  469. package/dist/layout/index.js +7 -0
  470. package/dist/layout/index.js.map +1 -0
  471. package/dist/layout/stack-css-f094dc4a0a45b6af2acedca81dcce289.css +77 -0
  472. package/dist/layout/stack.js +32 -0
  473. package/dist/layout/stack.js.map +1 -0
  474. package/dist/layout/v-stack.js +14 -0
  475. package/dist/layout/v-stack.js.map +1 -0
  476. package/dist/media/icon.css +43 -0
  477. package/dist/media/icon.js +71 -0
  478. package/dist/media/icon.js.map +1 -0
  479. package/dist/media/image-css-6bc4899d3a8b992c3d4d2f1a796ce0fc.css +78 -0
  480. package/dist/media/image.js +47 -0
  481. package/dist/media/image.js.map +1 -0
  482. package/dist/media/index.js +3 -0
  483. package/dist/media/index.js.map +1 -0
  484. package/dist/overlay/blanket.css +67 -0
  485. package/dist/overlay/blanket.js +139 -0
  486. package/dist/overlay/blanket.js.map +1 -0
  487. package/dist/overlay/drawer.css +369 -0
  488. package/dist/overlay/drawer.js +275 -0
  489. package/dist/overlay/drawer.js.map +1 -0
  490. package/dist/overlay/index.js +7 -0
  491. package/dist/overlay/index.js.map +1 -0
  492. package/dist/overlay/modal.css +209 -0
  493. package/dist/overlay/modal.js +269 -0
  494. package/dist/overlay/modal.js.map +1 -0
  495. package/dist/overlay/popover.css +210 -0
  496. package/dist/overlay/popover.js +396 -0
  497. package/dist/overlay/popover.js.map +1 -0
  498. package/dist/overlay/toast.css +300 -0
  499. package/dist/overlay/toast.js +123 -0
  500. package/dist/overlay/toast.js.map +1 -0
  501. package/dist/overlay/tooltip.css +246 -0
  502. package/dist/overlay/tooltip.js +368 -0
  503. package/dist/overlay/tooltip.js.map +1 -0
  504. package/dist/services/index.js +2 -0
  505. package/dist/services/index.js.map +1 -0
  506. package/dist/services/toast.js +162 -0
  507. package/dist/services/toast.js.map +1 -0
  508. package/dist/skeleton-CL5Pcwrk.js +3 -0
  509. package/dist/skeleton-CL5Pcwrk.js.map +1 -0
  510. package/dist/status/badge.css +218 -0
  511. package/dist/status/badge.js +38 -0
  512. package/dist/status/badge.js.map +1 -0
  513. package/dist/status/index.js +8 -0
  514. package/dist/status/index.js.map +1 -0
  515. package/dist/status/skeleton-avatar.js +29 -0
  516. package/dist/status/skeleton-avatar.js.map +1 -0
  517. package/dist/status/skeleton-button.js +25 -0
  518. package/dist/status/skeleton-button.js.map +1 -0
  519. package/dist/status/skeleton-image.js +31 -0
  520. package/dist/status/skeleton-image.js.map +1 -0
  521. package/dist/status/skeleton-text.js +41 -0
  522. package/dist/status/skeleton-text.js.map +1 -0
  523. package/dist/status/skeleton.css +185 -0
  524. package/dist/status/skeleton.js +44 -0
  525. package/dist/status/skeleton.js.map +1 -0
  526. package/dist/status/tag.css +352 -0
  527. package/dist/status/tag.js +81 -0
  528. package/dist/status/tag.js.map +1 -0
  529. package/dist/styles/animations.css +11 -0
  530. package/dist/styles/base/typography.css +47 -0
  531. package/dist/styles/ember-promise-modals.css +43 -0
  532. package/dist/styles/primitive/colors.css +86 -0
  533. package/dist/styles/primitive/effects.css +29 -0
  534. package/dist/styles/primitive/fonts.css +19 -0
  535. package/dist/styles/primitive/motion.css +18 -0
  536. package/dist/styles/primitive/shape.css +17 -0
  537. package/dist/styles/primitive/spacing.css +29 -0
  538. package/dist/styles/primitive/typography.css +45 -0
  539. package/dist/styles/primitive/z-index.css +14 -0
  540. package/dist/styles/semantic/colors.css +155 -0
  541. package/dist/styles/semantic/component.css +0 -0
  542. package/dist/styles/semantic/effects.css +17 -0
  543. package/dist/styles/semantic/motion.css +10 -0
  544. package/dist/styles/semantic/shape.css +20 -0
  545. package/dist/styles/semantic/sizing.css +53 -0
  546. package/dist/styles/semantic/spacing.css +32 -0
  547. package/dist/styles/semantic/typography.css +32 -0
  548. package/dist/styles/tokens.css +31 -0
  549. package/dist/styles.css +710 -0
  550. package/dist/template-registry.js +2 -0
  551. package/dist/template-registry.js.map +1 -0
  552. package/dist/types/design-system.js +2 -0
  553. package/dist/types/design-system.js.map +1 -0
  554. package/dist/typography/heading-css-8850735eabc2efb34f15240b852c99e7.css +99 -0
  555. package/dist/typography/heading.js +80 -0
  556. package/dist/typography/heading.js.map +1 -0
  557. package/dist/typography/index.js +3 -0
  558. package/dist/typography/index.js.map +1 -0
  559. package/dist/typography/text-css-73e03f1b750b32d7064d4ef87562289c.css +143 -0
  560. package/dist/typography/text.js +76 -0
  561. package/dist/typography/text.js.map +1 -0
  562. package/dist/ui/index.js +3 -0
  563. package/dist/ui/index.js.map +1 -0
  564. package/package.json +218 -0
@@ -0,0 +1,618 @@
1
+ import "./time-picker.css"
2
+ import Component from '@glimmer/component';
3
+ import { tracked } from '@glimmer/tracking';
4
+ import { on } from '@ember/modifier';
5
+ import { fn } from '@ember/helper';
6
+ import { modifier } from 'ember-modifier';
7
+ import { guidFor } from '@ember/object/internals';
8
+ import Popover from '../overlay/popover.js';
9
+ import Icon from '../media/icon.js';
10
+ import { ChevronDown, Clock } from 'lucide';
11
+ import { precompileTemplate } from '@ember/template-compilation';
12
+ import { setComponentTemplate } from '@ember/component';
13
+ import { g, i } from 'decorator-transforms/runtime';
14
+
15
+ ;
16
+
17
+ // ============================================================================
18
+ // Time Utilities
19
+ // ============================================================================
20
+ /**
21
+ * Parse a time string into hours and minutes
22
+ * Supports formats: HH:mm, H:mm, HHmm, Hmm, Ham, H:mmam, etc.
23
+ */
24
+ function parseTimeString(input) {
25
+ if (!input) return null;
26
+ const trimmed = input.trim().toLowerCase();
27
+ // Check for am/pm
28
+ const isPM = trimmed.includes('pm');
29
+ const isAM = trimmed.includes('am');
30
+ const timeStr = trimmed.replace(/[ap]m/g, '').trim();
31
+ // Try HH:mm or H:mm format
32
+ const colonMatch = timeStr.match(/^(\d{1,2}):(\d{2})$/);
33
+ if (colonMatch) {
34
+ let hours = parseInt(colonMatch[1], 10);
35
+ const minutes = parseInt(colonMatch[2], 10);
36
+ if (isPM && hours < 12) hours += 12;
37
+ if (isAM && hours === 12) hours = 0;
38
+ if (hours >= 0 && hours < 24 && minutes >= 0 && minutes < 60) {
39
+ return {
40
+ hours,
41
+ minutes
42
+ };
43
+ }
44
+ return null;
45
+ }
46
+ // Try HHmm or Hmm format (without colon)
47
+ const noColonMatch = timeStr.match(/^(\d{1,2})(\d{2})$/);
48
+ if (noColonMatch) {
49
+ let hours = parseInt(noColonMatch[1], 10);
50
+ const minutes = parseInt(noColonMatch[2], 10);
51
+ if (isPM && hours < 12) hours += 12;
52
+ if (isAM && hours === 12) hours = 0;
53
+ if (hours >= 0 && hours < 24 && minutes >= 0 && minutes < 60) {
54
+ return {
55
+ hours,
56
+ minutes
57
+ };
58
+ }
59
+ return null;
60
+ }
61
+ // Try just hours (e.g., "9", "9am", "14")
62
+ const hoursOnlyMatch = timeStr.match(/^(\d{1,2})$/);
63
+ if (hoursOnlyMatch) {
64
+ let hours = parseInt(hoursOnlyMatch[1], 10);
65
+ if (isPM && hours < 12) hours += 12;
66
+ if (isAM && hours === 12) hours = 0;
67
+ if (hours >= 0 && hours < 24) {
68
+ return {
69
+ hours,
70
+ minutes: 0
71
+ };
72
+ }
73
+ return null;
74
+ }
75
+ return null;
76
+ }
77
+ /**
78
+ * Format hours and minutes to HH:mm string (24h format)
79
+ */
80
+ function formatTime24h(hours, minutes) {
81
+ return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
82
+ }
83
+ /**
84
+ * Format time for display based on format preference
85
+ */
86
+ function formatTimeDisplay(value, format) {
87
+ const parsed = parseTimeString(value);
88
+ if (!parsed) return value;
89
+ const {
90
+ hours,
91
+ minutes
92
+ } = parsed;
93
+ if (format === '12h') {
94
+ const period = hours >= 12 ? 'PM' : 'AM';
95
+ const displayHours = hours % 12 || 12;
96
+ return `${displayHours}:${minutes.toString().padStart(2, '0')} ${period}`;
97
+ }
98
+ return formatTime24h(hours, minutes);
99
+ }
100
+ /**
101
+ * Compare two time strings
102
+ * Returns negative if a < b, positive if a > b, 0 if equal
103
+ */
104
+ function compareTime(a, b) {
105
+ const parsedA = parseTimeString(a);
106
+ const parsedB = parseTimeString(b);
107
+ if (!parsedA || !parsedB) return 0;
108
+ const minutesA = parsedA.hours * 60 + parsedA.minutes;
109
+ const minutesB = parsedB.hours * 60 + parsedB.minutes;
110
+ return minutesA - minutesB;
111
+ }
112
+ /**
113
+ * Generate time options based on interval and constraints
114
+ */
115
+ function generateTimeOptions(interval, format, minTime, maxTime) {
116
+ const options = [];
117
+ const minutesInDay = 24 * 60;
118
+ for (let totalMinutes = 0; totalMinutes < minutesInDay; totalMinutes += interval) {
119
+ const hours = Math.floor(totalMinutes / 60);
120
+ const minutes = totalMinutes % 60;
121
+ const value = formatTime24h(hours, minutes);
122
+ // Check constraints
123
+ let isDisabled = false;
124
+ if (minTime && compareTime(value, minTime) < 0) {
125
+ isDisabled = true;
126
+ }
127
+ if (maxTime && compareTime(value, maxTime) > 0) {
128
+ isDisabled = true;
129
+ }
130
+ options.push({
131
+ value,
132
+ label: formatTimeDisplay(value, format),
133
+ isDisabled
134
+ });
135
+ }
136
+ return options;
137
+ }
138
+ /**
139
+ * Get current time as HH:mm string
140
+ */
141
+ function getCurrentTime() {
142
+ const now = new Date();
143
+ return formatTime24h(now.getHours(), now.getMinutes());
144
+ }
145
+ /**
146
+ * Round time to nearest interval
147
+ */
148
+ function roundToInterval(time, interval) {
149
+ const parsed = parseTimeString(time);
150
+ if (!parsed) return time;
151
+ const totalMinutes = parsed.hours * 60 + parsed.minutes;
152
+ const rounded = Math.round(totalMinutes / interval) * interval;
153
+ const hours = Math.floor(rounded / 60) % 24;
154
+ const minutes = rounded % 60;
155
+ return formatTime24h(hours, minutes);
156
+ }
157
+ // ============================================================================
158
+ // Main Component
159
+ // ============================================================================
160
+ let timePickerIdCounter = 0;
161
+ class TimePicker extends Component {
162
+ static {
163
+ g(this.prototype, "isOpen", [tracked], function () {
164
+ return false;
165
+ });
166
+ }
167
+ #isOpen = (i(this, "isOpen"), void 0);
168
+ static {
169
+ g(this.prototype, "activeIndex", [tracked], function () {
170
+ return -1;
171
+ });
172
+ }
173
+ #activeIndex = (i(this, "activeIndex"), void 0);
174
+ static {
175
+ g(this.prototype, "inputValue", [tracked], function () {
176
+ return '';
177
+ });
178
+ }
179
+ #inputValue = (i(this, "inputValue"), void 0);
180
+ static {
181
+ g(this.prototype, "skipInputReset", [tracked], function () {
182
+ return false;
183
+ });
184
+ }
185
+ #skipInputReset = (i(this, "skipInputReset"), void 0);
186
+ /** Flag to prevent closeDropdown from resetting inputValue after a successful typed submission */
187
+ listboxId = `time-picker-listbox-${++timePickerIdCounter}`;
188
+ inputElement = null;
189
+ listboxElement = null;
190
+ get componentId() {
191
+ return this.args.id || guidFor(this);
192
+ }
193
+ get format() {
194
+ return this.args.format ?? '24h';
195
+ }
196
+ get interval() {
197
+ return this.args.interval ?? 15;
198
+ }
199
+ get closeOnSelect() {
200
+ return this.args.closeOnSelect ?? true;
201
+ }
202
+ get allowTextInput() {
203
+ return this.args.allowTextInput ?? true;
204
+ }
205
+ get showIcon() {
206
+ return this.args.showIcon ?? true;
207
+ }
208
+ get showNow() {
209
+ return this.args.showNow ?? false;
210
+ }
211
+ get hideDisabledOptions() {
212
+ return this.args.hideDisabledOptions ?? false;
213
+ }
214
+ get snapToInterval() {
215
+ return this.args.snapToInterval ?? false;
216
+ }
217
+ get selectedValue() {
218
+ return this.args.value ?? null;
219
+ }
220
+ get displayValue() {
221
+ if (this.selectedValue) {
222
+ return formatTimeDisplay(this.selectedValue, this.format);
223
+ }
224
+ return '';
225
+ }
226
+ /** The value to show in the input field */
227
+ get inputDisplayValue() {
228
+ // When dropdown is open, show what user is typing
229
+ if (this.isOpen) {
230
+ return this.inputValue;
231
+ }
232
+ // After submitting a typed value, show the submitted value until args.value syncs
233
+ if (this.skipInputReset) {
234
+ return this.inputValue;
235
+ }
236
+ // Otherwise show the current selected value
237
+ return this.displayValue;
238
+ }
239
+ get placeholder() {
240
+ return this.args.placeholder ?? (this.format === '12h' ? 'Select time' : 'HH:mm');
241
+ }
242
+ get timeOptions() {
243
+ const options = generateTimeOptions(this.interval, this.format, this.args.minTime, this.args.maxTime);
244
+ if (this.showNow) {
245
+ const now = getCurrentTime();
246
+ const roundedNow = roundToInterval(now, this.interval);
247
+ const nowOption = {
248
+ value: roundedNow,
249
+ label: `Now (${formatTimeDisplay(roundedNow, this.format)})`,
250
+ isNow: true
251
+ };
252
+ // Check if now is within constraints
253
+ if (this.args.minTime && compareTime(roundedNow, this.args.minTime) < 0) {
254
+ nowOption.isDisabled = true;
255
+ }
256
+ if (this.args.maxTime && compareTime(roundedNow, this.args.maxTime) > 0) {
257
+ nowOption.isDisabled = true;
258
+ }
259
+ return [nowOption, ...options];
260
+ }
261
+ return options;
262
+ }
263
+ get enabledOptions() {
264
+ return this.timeOptions.filter(o => !o.isDisabled);
265
+ }
266
+ get selectedIndex() {
267
+ if (!this.selectedValue) return -1;
268
+ return this.timeOptions.findIndex(o => o.value === this.selectedValue);
269
+ }
270
+ get activeOptionId() {
271
+ if (this.activeIndex >= 0 && this.activeIndex < this.timeOptions.length) {
272
+ return this.getOptionId(this.activeIndex);
273
+ }
274
+ return undefined;
275
+ }
276
+ get ariaExpanded() {
277
+ return this.isOpen ? 'true' : 'false';
278
+ }
279
+ get ariaRequired() {
280
+ return this.args.isRequired ? 'true' : undefined;
281
+ }
282
+ get ariaInvalid() {
283
+ return this.args.isInvalid ? 'true' : undefined;
284
+ }
285
+ getOptionId = index => {
286
+ return `${this.componentId}-option-${index}`;
287
+ };
288
+ // ============================================================================
289
+ // Modifiers
290
+ // ============================================================================
291
+ setupInput = modifier(element => {
292
+ this.inputElement = element;
293
+ return () => {
294
+ this.inputElement = null;
295
+ };
296
+ });
297
+ setupListbox = modifier(element => {
298
+ this.listboxElement = element;
299
+ // Scroll to selected or current time on mount
300
+ if (this.isOpen) {
301
+ this.scrollToSelected();
302
+ }
303
+ return () => {
304
+ this.listboxElement = null;
305
+ };
306
+ });
307
+ // ============================================================================
308
+ // Event Handlers
309
+ // ============================================================================
310
+ handleInputClick = event => {
311
+ // Stop propagation to prevent the Popover trigger from toggling
312
+ event.stopPropagation();
313
+ if (!this.args.isDisabled && !this.args.isReadOnly) {
314
+ this.openDropdown();
315
+ }
316
+ };
317
+ handleInputFocus = event => {
318
+ this.args.onFocus?.(event);
319
+ };
320
+ handleInputBlur = event => {
321
+ // Parse and validate text input on blur
322
+ if (this.allowTextInput && this.inputValue !== this.displayValue) {
323
+ this.parseAndSubmitTypedValue();
324
+ }
325
+ this.args.onBlur?.(event);
326
+ };
327
+ /** Parse the typed input value, apply snapping if enabled, validate, and submit */
328
+ parseAndSubmitTypedValue() {
329
+ const parsed = parseTimeString(this.inputValue);
330
+ if (parsed) {
331
+ let value = formatTime24h(parsed.hours, parsed.minutes);
332
+ // Round to nearest interval if snapToInterval is enabled
333
+ if (this.snapToInterval) {
334
+ value = roundToInterval(value, this.interval);
335
+ }
336
+ // Check constraints
337
+ let isValid = true;
338
+ if (this.args.minTime && compareTime(value, this.args.minTime) < 0) {
339
+ isValid = false;
340
+ }
341
+ if (this.args.maxTime && compareTime(value, this.args.maxTime) > 0) {
342
+ isValid = false;
343
+ }
344
+ if (isValid) {
345
+ this.args.onChange?.(value);
346
+ // Update inputValue to the formatted new value immediately
347
+ // (don't wait for displayValue to update via args.value)
348
+ this.inputValue = formatTimeDisplay(value, this.format);
349
+ // Prevent closeDropdown from resetting inputValue
350
+ this.skipInputReset = true;
351
+ return true;
352
+ }
353
+ }
354
+ // Reset input to display value on invalid input
355
+ this.inputValue = this.displayValue;
356
+ return false;
357
+ }
358
+ handleInputChange = event => {
359
+ const target = event.target;
360
+ this.inputValue = target.value;
361
+ };
362
+ handleKeyDown = event => {
363
+ if (this.args.isDisabled) return;
364
+ switch (event.key) {
365
+ case 'ArrowDown':
366
+ event.preventDefault();
367
+ event.stopPropagation();
368
+ if (!this.isOpen) {
369
+ this.openDropdown();
370
+ } else {
371
+ this.moveActive(1);
372
+ }
373
+ break;
374
+ case 'ArrowUp':
375
+ event.preventDefault();
376
+ event.stopPropagation();
377
+ if (!this.isOpen) {
378
+ this.openDropdown();
379
+ } else {
380
+ this.moveActive(-1);
381
+ }
382
+ break;
383
+ case 'Enter':
384
+ event.preventDefault();
385
+ event.stopPropagation();
386
+ // If user typed a custom value, parse and submit it
387
+ if (this.allowTextInput && this.inputValue !== this.displayValue) {
388
+ this.parseAndSubmitTypedValue();
389
+ this.closeDropdown();
390
+ } else if (this.isOpen && this.activeIndex >= 0) {
391
+ const option = this.timeOptions[this.activeIndex];
392
+ if (option && !option.isDisabled) {
393
+ this.selectOption(option.value);
394
+ }
395
+ } else if (!this.isOpen) {
396
+ this.openDropdown();
397
+ }
398
+ break;
399
+ case 'Escape':
400
+ if (this.isOpen) {
401
+ event.preventDefault();
402
+ event.stopPropagation();
403
+ this.closeDropdown();
404
+ }
405
+ break;
406
+ case 'Home':
407
+ if (this.isOpen) {
408
+ event.preventDefault();
409
+ event.stopPropagation();
410
+ this.moveToFirst();
411
+ }
412
+ break;
413
+ case 'End':
414
+ if (this.isOpen) {
415
+ event.preventDefault();
416
+ event.stopPropagation();
417
+ this.moveToLast();
418
+ }
419
+ break;
420
+ case 'Tab':
421
+ // Parse typed value before closing (blur will also fire, but closeDropdown
422
+ // would reset inputValue before blur has a chance to parse it)
423
+ if (this.allowTextInput && this.inputValue !== this.displayValue) {
424
+ this.parseAndSubmitTypedValue();
425
+ }
426
+ if (this.isOpen) {
427
+ this.closeDropdown();
428
+ }
429
+ break;
430
+ }
431
+ };
432
+ handleOptionClick = (value, isDisabled) => {
433
+ if (!isDisabled) {
434
+ this.selectOption(value);
435
+ }
436
+ };
437
+ handleOptionMouseEnter = (index, isDisabled) => {
438
+ if (!isDisabled) {
439
+ this.activeIndex = index;
440
+ }
441
+ };
442
+ // ============================================================================
443
+ // Methods
444
+ // ============================================================================
445
+ openDropdown = () => {
446
+ if (this.args.isDisabled || this.args.isReadOnly) return;
447
+ this.isOpen = true;
448
+ this.skipInputReset = false;
449
+ this.inputValue = this.displayValue;
450
+ // Set active to selected or find closest to current time
451
+ if (this.selectedIndex >= 0) {
452
+ this.activeIndex = this.selectedIndex;
453
+ } else {
454
+ const currentTime = getCurrentTime();
455
+ const closestIndex = this.findClosestEnabledIndex(currentTime);
456
+ this.activeIndex = closestIndex;
457
+ }
458
+ // Scroll after DOM updates
459
+ setTimeout(() => {
460
+ this.scrollToActive();
461
+ }, 0);
462
+ };
463
+ closeDropdown = () => {
464
+ this.isOpen = false;
465
+ this.activeIndex = -1;
466
+ // Only reset inputValue if we didn't just submit a typed value
467
+ // Don't reset skipInputReset here - it's needed for the template to show
468
+ // the correct value until the next render. It gets reset in openDropdown.
469
+ if (!this.skipInputReset) {
470
+ this.inputValue = this.displayValue;
471
+ }
472
+ };
473
+ toggleDropdown = () => {
474
+ if (this.isOpen) {
475
+ this.closeDropdown();
476
+ } else {
477
+ this.openDropdown();
478
+ }
479
+ };
480
+ handleOpenChange = open => {
481
+ if (open) {
482
+ this.openDropdown();
483
+ } else {
484
+ this.closeDropdown();
485
+ }
486
+ };
487
+ selectOption(value) {
488
+ this.args.onChange?.(value);
489
+ this.inputValue = formatTimeDisplay(value, this.format);
490
+ if (this.closeOnSelect) {
491
+ this.closeDropdown();
492
+ this.inputElement?.focus();
493
+ }
494
+ }
495
+ moveActive(direction) {
496
+ if (this.enabledOptions.length === 0) return;
497
+ // Find current position in enabled options
498
+ let newIndex = this.activeIndex;
499
+ do {
500
+ newIndex += direction;
501
+ // Wrap around
502
+ if (newIndex < 0) {
503
+ newIndex = this.timeOptions.length - 1;
504
+ } else if (newIndex >= this.timeOptions.length) {
505
+ newIndex = 0;
506
+ }
507
+ // Prevent infinite loop
508
+ if (newIndex === this.activeIndex) break;
509
+ } while (this.timeOptions[newIndex]?.isDisabled);
510
+ this.activeIndex = newIndex;
511
+ this.scrollToActive();
512
+ }
513
+ moveToFirst() {
514
+ const firstEnabledIndex = this.timeOptions.findIndex(o => !o.isDisabled);
515
+ if (firstEnabledIndex >= 0) {
516
+ this.activeIndex = firstEnabledIndex;
517
+ this.scrollToActive();
518
+ }
519
+ }
520
+ moveToLast() {
521
+ for (let i = this.timeOptions.length - 1; i >= 0; i--) {
522
+ if (!this.timeOptions[i]?.isDisabled) {
523
+ this.activeIndex = i;
524
+ this.scrollToActive();
525
+ break;
526
+ }
527
+ }
528
+ }
529
+ findClosestEnabledIndex(time) {
530
+ let closestIndex = -1;
531
+ let closestDiff = Infinity;
532
+ const parsed = parseTimeString(time);
533
+ if (!parsed) return 0;
534
+ const targetMinutes = parsed.hours * 60 + parsed.minutes;
535
+ for (let i = 0; i < this.timeOptions.length; i++) {
536
+ const option = this.timeOptions[i];
537
+ if (option.isDisabled) continue;
538
+ const optionParsed = parseTimeString(option.value);
539
+ if (!optionParsed) continue;
540
+ const optionMinutes = optionParsed.hours * 60 + optionParsed.minutes;
541
+ const diff = Math.abs(optionMinutes - targetMinutes);
542
+ if (diff < closestDiff) {
543
+ closestDiff = diff;
544
+ closestIndex = i;
545
+ }
546
+ }
547
+ return closestIndex >= 0 ? closestIndex : 0;
548
+ }
549
+ scrollToActive() {
550
+ if (this.activeIndex < 0 || !this.listboxElement) return;
551
+ const optionId = this.getOptionId(this.activeIndex);
552
+ const optionElement = document.getElementById(optionId);
553
+ if (optionElement && this.listboxElement) {
554
+ this.scrollIntoViewWithinContainer(optionElement, this.listboxElement);
555
+ }
556
+ }
557
+ scrollToSelected() {
558
+ if (this.selectedIndex < 0 || !this.listboxElement) return;
559
+ const optionId = this.getOptionId(this.selectedIndex);
560
+ const optionElement = document.getElementById(optionId);
561
+ if (optionElement && this.listboxElement) {
562
+ this.scrollIntoViewWithinContainer(optionElement, this.listboxElement, true);
563
+ }
564
+ }
565
+ /** Scroll element into view within a scrollable container without affecting page scroll */
566
+ scrollIntoViewWithinContainer(element, container, center = false) {
567
+ const elementRect = element.getBoundingClientRect();
568
+ const containerRect = container.getBoundingClientRect();
569
+ if (center) {
570
+ // Center the element in the container
571
+ const elementTop = element.offsetTop;
572
+ const elementHeight = element.offsetHeight;
573
+ const containerHeight = container.clientHeight;
574
+ container.scrollTop = elementTop - containerHeight / 2 + elementHeight / 2;
575
+ } else {
576
+ // Only scroll if element is not fully visible
577
+ if (elementRect.top < containerRect.top) {
578
+ // Element is above visible area
579
+ container.scrollTop -= containerRect.top - elementRect.top;
580
+ } else if (elementRect.bottom > containerRect.bottom) {
581
+ // Element is below visible area
582
+ container.scrollTop += elementRect.bottom - containerRect.bottom;
583
+ }
584
+ }
585
+ }
586
+ // ============================================================================
587
+ // Template
588
+ // ============================================================================
589
+ static {
590
+ setComponentTemplate(precompileTemplate("<Popover @trigger=\"click\" @open={{this.isOpen}} @onOpenChange={{this.handleOpenChange}} @dismissOnClickOutside={{true}} @dismissOnEscape={{true}} class=\"time-picker_eb934fd65\" data-invalid={{if @isInvalid \"true\"}} data-disabled={{if @isDisabled \"true\"}} data-readonly={{if @isReadOnly \"true\"}} data-open={{if this.isOpen \"true\"}} data-test-time-picker ...attributes as |popover|>\n {{!-- Hidden input for form submission --}}\n {{#if @name}}\n <input type=\"hidden\" name={{@name}} value={{this.selectedValue}} data-test-time-picker-hidden-input />\n {{/if}}\n\n <popover.Trigger class=\"time-picker-trigger-wrapper_eb934fd65\" disabled={{@isDisabled}} data-test-time-picker-trigger-wrapper>\n <div class=\"time-picker-input-wrapper_eb934fd65\">\n {{#if this.showIcon}}\n <span class=\"time-picker-icon_eb934fd65\" aria-hidden=\"true\" data-test-time-picker-icon>\n <Icon @icon={{Clock}} @size=\"sm\" />\n </span>\n {{/if}}\n\n {{!-- template-lint-disable no-redundant-role --}}\n <input id={{this.componentId}} type=\"text\" role=\"combobox\" class=\"time-picker-input_eb934fd65\" aria-haspopup=\"listbox\" aria-expanded={{this.ariaExpanded}} aria-controls={{this.listboxId}} aria-activedescendant={{this.activeOptionId}} aria-required={{this.ariaRequired}} aria-invalid={{this.ariaInvalid}} aria-describedby={{@aria-describedby}} placeholder={{this.placeholder}} value={{this.inputDisplayValue}} disabled={{@isDisabled}} readonly={{if this.allowTextInput @isReadOnly true}} autocomplete=\"off\" {{this.setupInput}} {{on \"click\" this.handleInputClick}} {{on \"focus\" this.handleInputFocus}} {{on \"blur\" this.handleInputBlur}} {{on \"input\" this.handleInputChange}} {{on \"keydown\" this.handleKeyDown}} data-test-time-picker-input />\n\n <span class=\"time-picker-trigger_eb934fd65\" aria-hidden=\"true\" data-test-time-picker-trigger>\n <Icon @icon={{ChevronDown}} @size=\"sm\" />\n </span>\n </div>\n </popover.Trigger>\n\n <popover.Content @side=\"bottom\" @align=\"start\" @sideOffset={{4}} @animation=\"scale\" class=\"time-picker-popover-content_eb934fd65\">\n <div id={{this.listboxId}} role=\"listbox\" class=\"time-picker-listbox_eb934fd65\" tabindex=\"-1\" {{this.setupListbox}} data-test-time-picker-listbox>\n {{#each this.timeOptions as |option index|}}\n {{#if (this.shouldShowOption option)}}\n <div id={{this.getOptionId index}} role=\"option\" class=\"time-picker-option_eb934fd65\" aria-selected={{if (this.isOptionSelected option.value) \"true\" \"false\"}} aria-disabled={{if option.isDisabled \"true\"}} data-selected={{if (this.isOptionSelected option.value) \"true\"}} data-active={{if (this.isOptionActive index) \"true\"}} data-disabled={{if option.isDisabled \"true\"}} data-now={{if option.isNow \"true\"}} {{on \"click\" (fn this.handleOptionClick option.value option.isDisabled)}} {{on \"mouseenter\" (fn this.handleOptionMouseEnter index option.isDisabled)}} data-test-time-picker-option data-test-time-picker-option-value={{option.value}}>\n {{option.label}}\n </div>\n {{/if}}\n {{/each}}\n </div>\n </popover.Content>\n</Popover>", {
591
+ strictMode: true,
592
+ scope: () => ({
593
+ Popover,
594
+ Icon,
595
+ Clock,
596
+ on,
597
+ ChevronDown,
598
+ fn
599
+ })
600
+ }), this);
601
+ }
602
+ // Helper methods for template
603
+ isOptionSelected = value => {
604
+ return this.selectedValue === value;
605
+ };
606
+ isOptionActive = index => {
607
+ return this.activeIndex === index;
608
+ };
609
+ shouldShowOption = option => {
610
+ if (this.hideDisabledOptions && option.isDisabled) {
611
+ return false;
612
+ }
613
+ return true;
614
+ };
615
+ }
616
+
617
+ export { TimePicker as default, formatTime24h, formatTimeDisplay, generateTimeOptions, parseTimeString };
618
+ //# sourceMappingURL=time-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ /* src/form/toggle-field.css */
2
+ .toggle-field_e5c1644c4 {
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: var(--spacing-1-5);
6
+ }
@@ -0,0 +1,40 @@
1
+ import "./toggle-field.css"
2
+ import Component from '@glimmer/component';
3
+ import { guidFor } from '@ember/object/internals';
4
+ import Toggle from './toggle.js';
5
+ import ErrorMessage from './error-message.js';
6
+ import { precompileTemplate } from '@ember/template-compilation';
7
+ import { setComponentTemplate } from '@ember/component';
8
+
9
+ ;
10
+
11
+ class ToggleField extends Component {
12
+ guid = guidFor(this);
13
+ get fieldId() {
14
+ return this.args.id ?? this.guid;
15
+ }
16
+ get errorMessageId() {
17
+ return `${this.guid}-error`;
18
+ }
19
+ get isInvalid() {
20
+ return !!this.args.error;
21
+ }
22
+ get ariaDescribedBy() {
23
+ if (this.isInvalid) {
24
+ return this.errorMessageId;
25
+ }
26
+ return undefined;
27
+ }
28
+ static {
29
+ setComponentTemplate(precompileTemplate("<div class=\"toggle-field_e5c1644c4\" data-invalid={{if this.isInvalid \"true\"}} data-test-toggle-field ...attributes>\n <Toggle @id={{this.fieldId}} @label={{@label}} @description={{@description}} @checked={{@checked}} @defaultChecked={{@defaultChecked}} @onChange={{@onChange}} @labelPosition={{@labelPosition}} @size={{@size}} @isDisabled={{@isDisabled}} @name={{@name}} @value={{@value}} @isRequired={{@isRequired}} @onBlur={{@onBlur}} @onFocus={{@onFocus}} @aria-describedby={{this.ariaDescribedBy}} />\n\n {{#if @error}}\n <ErrorMessage id={{this.errorMessageId}} @isInvalid={{this.isInvalid}}>\n {{@error}}\n </ErrorMessage>\n {{/if}}\n</div>", {
30
+ strictMode: true,
31
+ scope: () => ({
32
+ Toggle,
33
+ ErrorMessage
34
+ })
35
+ }), this);
36
+ }
37
+ }
38
+
39
+ export { ToggleField as default };
40
+ //# sourceMappingURL=toggle-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle-field.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}