@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,532 @@
1
+ import "./calendar.css"
2
+ import Component from '@glimmer/component';
3
+ import { tracked } from '@glimmer/tracking';
4
+ import { guidFor } from '@ember/object/internals';
5
+ import { on } from '@ember/modifier';
6
+ import { fn } from '@ember/helper';
7
+ import { not } from 'ember-truth-helpers';
8
+ import { modifier } from 'ember-modifier';
9
+ import { format, endOfMonth, addMonths, isBefore, startOfMonth, isAfter, startOfWeek, endOfWeek, eachDayOfInterval, getDay, isSameDay, isSameMonth, isToday, addWeeks, addDays } from 'date-fns';
10
+ import { precompileTemplate } from '@ember/template-compilation';
11
+ import { setComponentTemplate } from '@ember/component';
12
+ import { g, i } from 'decorator-transforms/runtime';
13
+
14
+ ;
15
+
16
+ // ============================================================================
17
+ // Main Component
18
+ // ============================================================================
19
+ class Calendar extends Component {
20
+ static {
21
+ g(this.prototype, "internalMonth", [tracked], function () {
22
+ return new Date();
23
+ });
24
+ }
25
+ #internalMonth = (i(this, "internalMonth"), void 0);
26
+ static {
27
+ g(this.prototype, "focusedDate", [tracked], function () {
28
+ return null;
29
+ });
30
+ }
31
+ #focusedDate = (i(this, "focusedDate"), void 0);
32
+ static {
33
+ g(this.prototype, "internalValue", [tracked], function () {
34
+ return null;
35
+ });
36
+ }
37
+ #internalValue = (i(this, "internalValue"), void 0);
38
+ static {
39
+ g(this.prototype, "internalMultiValue", [tracked], function () {
40
+ return [];
41
+ });
42
+ }
43
+ #internalMultiValue = (i(this, "internalMultiValue"), void 0);
44
+ static {
45
+ g(this.prototype, "internalRangeValue", [tracked], function () {
46
+ return null;
47
+ });
48
+ }
49
+ #internalRangeValue = (i(this, "internalRangeValue"), void 0);
50
+ static {
51
+ g(this.prototype, "rangeSelectionStart", [tracked], function () {
52
+ return null;
53
+ });
54
+ }
55
+ #rangeSelectionStart = (i(this, "rangeSelectionStart"), void 0);
56
+ static {
57
+ g(this.prototype, "hoveredDate", [tracked], function () {
58
+ return null;
59
+ });
60
+ }
61
+ #hoveredDate = (i(this, "hoveredDate"), void 0);
62
+ elementRef = null;
63
+ // ============================================================================
64
+ // Computed Properties
65
+ // ============================================================================
66
+ get componentId() {
67
+ return guidFor(this);
68
+ }
69
+ get mode() {
70
+ return this.args.mode ?? 'single';
71
+ }
72
+ get weekStartsOn() {
73
+ return this.args.weekStartsOn ?? 0;
74
+ }
75
+ get showOutsideDays() {
76
+ return this.args.showOutsideDays ?? true;
77
+ }
78
+ get showToday() {
79
+ return this.args.showToday ?? true;
80
+ }
81
+ /** Current displayed month (controlled or uncontrolled) */
82
+ get currentMonth() {
83
+ if (this.args.month !== undefined) {
84
+ return this.args.month;
85
+ }
86
+ if (this.args.defaultMonth !== undefined && !this.hasInternalMonthChanged) {
87
+ return this.args.defaultMonth;
88
+ }
89
+ return this.internalMonth;
90
+ }
91
+ hasInternalMonthChanged = false;
92
+ hasInternalValueChanged = false;
93
+ set currentMonth(value) {
94
+ this.hasInternalMonthChanged = true;
95
+ this.internalMonth = value;
96
+ this.args.onMonthChange?.(value);
97
+ }
98
+ /** Selected value for single mode (controlled or uncontrolled) */
99
+ get selectedValue() {
100
+ if (this.args.value !== undefined) {
101
+ return this.args.value;
102
+ }
103
+ if (this.args.defaultValue !== undefined && !this.hasInternalValueChanged) {
104
+ return this.args.defaultValue;
105
+ }
106
+ return this.internalValue;
107
+ }
108
+ /** Selected values for multiple mode */
109
+ get selectedMultiValue() {
110
+ if (this.args.multiValue !== undefined) {
111
+ return this.args.multiValue;
112
+ }
113
+ return this.internalMultiValue;
114
+ }
115
+ /** Selected range for range mode */
116
+ get selectedRange() {
117
+ if (this.args.rangeValue !== undefined) {
118
+ return this.args.rangeValue;
119
+ }
120
+ return this.internalRangeValue;
121
+ }
122
+ /** Weekday labels starting from weekStartsOn */
123
+ get weekdayLabels() {
124
+ const labels = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
125
+ const startDay = this.weekStartsOn;
126
+ return [...labels.slice(startDay), ...labels.slice(0, startDay)];
127
+ }
128
+ /** Month and year display text */
129
+ get monthYearLabel() {
130
+ return format(this.currentMonth, 'MMMM yyyy');
131
+ }
132
+ /** Can navigate to previous month (respects minDate) */
133
+ get canGoToPreviousMonth() {
134
+ if (!this.args.minDate) return true;
135
+ const prevMonthEnd = endOfMonth(addMonths(this.currentMonth, -1));
136
+ return !isBefore(prevMonthEnd, this.args.minDate);
137
+ }
138
+ /** Can navigate to next month (respects maxDate) */
139
+ get canGoToNextMonth() {
140
+ if (!this.args.maxDate) return true;
141
+ const nextMonthStart = startOfMonth(addMonths(this.currentMonth, 1));
142
+ return !isAfter(nextMonthStart, this.args.maxDate);
143
+ }
144
+ /** Generate weeks array for the current month view */
145
+ get weeks() {
146
+ const monthStart = startOfMonth(this.currentMonth);
147
+ const monthEnd = endOfMonth(this.currentMonth);
148
+ const calendarStart = startOfWeek(monthStart, {
149
+ weekStartsOn: this.weekStartsOn
150
+ });
151
+ const calendarEnd = endOfWeek(monthEnd, {
152
+ weekStartsOn: this.weekStartsOn
153
+ });
154
+ const days = eachDayOfInterval({
155
+ start: calendarStart,
156
+ end: calendarEnd
157
+ });
158
+ const weeks = [];
159
+ for (let i = 0; i < days.length; i += 7) {
160
+ weeks.push(days.slice(i, i + 7));
161
+ }
162
+ return weeks;
163
+ }
164
+ get tabIndex() {
165
+ return this.args.isDisabled ? -1 : 0;
166
+ }
167
+ get activedescendant() {
168
+ if (this.focusedDate) {
169
+ return this.getDayId(this.focusedDate);
170
+ }
171
+ return undefined;
172
+ }
173
+ // ============================================================================
174
+ // Day State Methods
175
+ // ============================================================================
176
+ getDayId = date => {
177
+ const dateStr = format(date, 'yyyy-MM-dd');
178
+ return `${this.componentId}-day-${dateStr}`;
179
+ };
180
+ isDateDisabled = date => {
181
+ if (this.args.isDisabled) return true;
182
+ // Check min/max bounds
183
+ if (this.args.minDate && isBefore(date, this.args.minDate)) {
184
+ return true;
185
+ }
186
+ if (this.args.maxDate && isAfter(date, this.args.maxDate)) {
187
+ return true;
188
+ }
189
+ // Check disabled days of week
190
+ if (this.args.disabledDaysOfWeek?.includes(getDay(date))) {
191
+ return true;
192
+ }
193
+ // Check disabled dates
194
+ if (this.args.disabledDates) {
195
+ if (Array.isArray(this.args.disabledDates)) {
196
+ return this.args.disabledDates.some(d => isSameDay(d, date));
197
+ }
198
+ return this.args.disabledDates(date);
199
+ }
200
+ return false;
201
+ };
202
+ isDateSelected = date => {
203
+ if (this.mode === 'single') {
204
+ return this.selectedValue ? isSameDay(date, this.selectedValue) : false;
205
+ }
206
+ if (this.mode === 'multiple') {
207
+ return this.selectedMultiValue.some(d => isSameDay(d, date));
208
+ }
209
+ if (this.mode === 'range') {
210
+ const range = this.selectedRange;
211
+ if (range) {
212
+ return isSameDay(date, range.start) || isSameDay(date, range.end);
213
+ }
214
+ // Check if it's the start of a pending range selection
215
+ if (this.rangeSelectionStart) {
216
+ return isSameDay(date, this.rangeSelectionStart);
217
+ }
218
+ }
219
+ return false;
220
+ };
221
+ isDateFocused = date => {
222
+ return this.focusedDate ? isSameDay(date, this.focusedDate) : false;
223
+ };
224
+ isDateOutsideMonth = date => {
225
+ return !isSameMonth(date, this.currentMonth);
226
+ };
227
+ isDateRangeStart = date => {
228
+ if (this.mode !== 'range') return false;
229
+ const range = this.selectedRange;
230
+ if (range) {
231
+ return isSameDay(date, range.start);
232
+ }
233
+ if (this.rangeSelectionStart) {
234
+ return isSameDay(date, this.rangeSelectionStart);
235
+ }
236
+ return false;
237
+ };
238
+ isDateRangeEnd = date => {
239
+ if (this.mode !== 'range') return false;
240
+ const range = this.selectedRange;
241
+ return range ? isSameDay(date, range.end) : false;
242
+ };
243
+ isDateInRange = date => {
244
+ if (this.mode !== 'range') return false;
245
+ // Check confirmed range
246
+ const range = this.selectedRange;
247
+ if (range) {
248
+ return isAfter(date, range.start) && isBefore(date, range.end);
249
+ }
250
+ // Check hover preview during range selection
251
+ if (this.rangeSelectionStart && this.hoveredDate) {
252
+ const start = this.rangeSelectionStart;
253
+ const end = this.hoveredDate;
254
+ if (isBefore(start, end)) {
255
+ return isAfter(date, start) && isBefore(date, end);
256
+ } else {
257
+ return isAfter(date, end) && isBefore(date, start);
258
+ }
259
+ }
260
+ return false;
261
+ };
262
+ getDayState = date => {
263
+ return {
264
+ date,
265
+ isToday: this.showToday && isToday(date),
266
+ isSelected: this.isDateSelected(date),
267
+ isFocused: this.isDateFocused(date),
268
+ isDisabled: this.isDateDisabled(date),
269
+ isOutsideMonth: this.isDateOutsideMonth(date),
270
+ isRangeStart: this.isDateRangeStart(date),
271
+ isRangeEnd: this.isDateRangeEnd(date),
272
+ isInRange: this.isDateInRange(date)
273
+ };
274
+ };
275
+ // ============================================================================
276
+ // Selection Methods
277
+ // ============================================================================
278
+ selectDate = date => {
279
+ if (this.isDateDisabled(date)) return;
280
+ if (this.mode === 'single') {
281
+ this.hasInternalValueChanged = true;
282
+ this.internalValue = date;
283
+ this.args.onChange?.(date);
284
+ } else if (this.mode === 'multiple') {
285
+ const current = [...this.selectedMultiValue];
286
+ const index = current.findIndex(d => isSameDay(d, date));
287
+ if (index >= 0) {
288
+ // Deselecting - remove from array and clear focus
289
+ current.splice(index, 1);
290
+ this.focusedDate = null;
291
+ } else {
292
+ current.push(date);
293
+ }
294
+ this.internalMultiValue = current;
295
+ this.args.onMultiChange?.(current);
296
+ } else if (this.mode === 'range') {
297
+ if (!this.rangeSelectionStart) {
298
+ // First click: set range start and clear any existing range
299
+ this.rangeSelectionStart = date;
300
+ this.internalRangeValue = null;
301
+ this.args.onRangeChange?.(null);
302
+ } else {
303
+ // Second click: complete range
304
+ const start = this.rangeSelectionStart;
305
+ const end = date;
306
+ const range = isBefore(start, end) ? {
307
+ start,
308
+ end
309
+ } : {
310
+ start: end,
311
+ end: start
312
+ };
313
+ this.rangeSelectionStart = null;
314
+ this.hoveredDate = null;
315
+ this.internalRangeValue = range;
316
+ this.args.onRangeChange?.(range);
317
+ }
318
+ }
319
+ };
320
+ // ============================================================================
321
+ // Navigation Methods
322
+ // ============================================================================
323
+ goToPreviousMonth = () => {
324
+ this.currentMonth = addMonths(this.currentMonth, -1);
325
+ };
326
+ goToNextMonth = () => {
327
+ this.currentMonth = addMonths(this.currentMonth, 1);
328
+ };
329
+ setFocusedDate(date) {
330
+ this.focusedDate = date;
331
+ // If focused date is outside current month, navigate to that month
332
+ if (!isSameMonth(date, this.currentMonth)) {
333
+ this.currentMonth = startOfMonth(date);
334
+ }
335
+ // Scroll the focused day into view
336
+ const dayId = this.getDayId(date);
337
+ const dayElement = document.getElementById(dayId);
338
+ dayElement?.scrollIntoView({
339
+ block: 'nearest'
340
+ });
341
+ }
342
+ moveFocus(direction) {
343
+ const current = this.focusedDate ?? this.selectedValue ?? new Date();
344
+ let newDate;
345
+ switch (direction) {
346
+ case 'prev':
347
+ newDate = addDays(current, -1);
348
+ break;
349
+ case 'next':
350
+ newDate = addDays(current, 1);
351
+ break;
352
+ case 'up':
353
+ newDate = addWeeks(current, -1);
354
+ break;
355
+ case 'down':
356
+ newDate = addWeeks(current, 1);
357
+ break;
358
+ case 'home':
359
+ newDate = startOfWeek(current, {
360
+ weekStartsOn: this.weekStartsOn
361
+ });
362
+ break;
363
+ case 'end':
364
+ newDate = endOfWeek(current, {
365
+ weekStartsOn: this.weekStartsOn
366
+ });
367
+ break;
368
+ case 'prevMonth':
369
+ newDate = addMonths(current, -1);
370
+ break;
371
+ case 'nextMonth':
372
+ newDate = addMonths(current, 1);
373
+ break;
374
+ }
375
+ // Skip disabled dates when navigating (with safety limit)
376
+ const maxIterations = 365; // Prevent infinite loop
377
+ let iterations = 0;
378
+ while (this.isDateDisabled(newDate) && iterations < maxIterations) {
379
+ // Stop if we've gone beyond min/max bounds
380
+ if (this.args.minDate && isBefore(newDate, this.args.minDate)) {
381
+ newDate = current; // Revert to current date
382
+ break;
383
+ }
384
+ if (this.args.maxDate && isAfter(newDate, this.args.maxDate)) {
385
+ newDate = current; // Revert to current date
386
+ break;
387
+ }
388
+ if (direction === 'prev' || direction === 'up') {
389
+ newDate = addDays(newDate, -1);
390
+ } else if (direction === 'next' || direction === 'down') {
391
+ newDate = addDays(newDate, 1);
392
+ } else if (direction === 'home') {
393
+ // For Home, look forward to find enabled date within the week
394
+ newDate = addDays(newDate, 1);
395
+ } else if (direction === 'end') {
396
+ // For End, look backward to find enabled date within the week
397
+ newDate = addDays(newDate, -1);
398
+ } else {
399
+ break;
400
+ }
401
+ iterations++;
402
+ }
403
+ this.setFocusedDate(newDate);
404
+ }
405
+ // ============================================================================
406
+ // Event Handlers
407
+ // ============================================================================
408
+ handleKeyDown = event => {
409
+ if (this.args.isDisabled) return;
410
+ switch (event.key) {
411
+ case 'ArrowLeft':
412
+ event.preventDefault();
413
+ this.moveFocus('prev');
414
+ break;
415
+ case 'ArrowRight':
416
+ event.preventDefault();
417
+ this.moveFocus('next');
418
+ break;
419
+ case 'ArrowUp':
420
+ event.preventDefault();
421
+ this.moveFocus('up');
422
+ break;
423
+ case 'ArrowDown':
424
+ event.preventDefault();
425
+ this.moveFocus('down');
426
+ break;
427
+ case 'Home':
428
+ event.preventDefault();
429
+ this.moveFocus('home');
430
+ break;
431
+ case 'End':
432
+ event.preventDefault();
433
+ this.moveFocus('end');
434
+ break;
435
+ case 'PageUp':
436
+ event.preventDefault();
437
+ this.moveFocus('prevMonth');
438
+ break;
439
+ case 'PageDown':
440
+ event.preventDefault();
441
+ this.moveFocus('nextMonth');
442
+ break;
443
+ case 'Enter':
444
+ case ' ':
445
+ event.preventDefault();
446
+ if (this.focusedDate) {
447
+ this.selectDate(this.focusedDate);
448
+ }
449
+ break;
450
+ }
451
+ };
452
+ handleFocus = () => {
453
+ // Focus selected date, or today, or first of month
454
+ if (!this.focusedDate) {
455
+ if (this.selectedValue) {
456
+ this.focusedDate = this.selectedValue;
457
+ } else if (this.selectedMultiValue.length > 0) {
458
+ this.focusedDate = this.selectedMultiValue[0] ?? startOfMonth(this.currentMonth);
459
+ } else if (this.selectedRange) {
460
+ this.focusedDate = this.selectedRange.start;
461
+ } else {
462
+ const today = new Date();
463
+ if (isSameMonth(today, this.currentMonth)) {
464
+ this.focusedDate = today;
465
+ } else {
466
+ this.focusedDate = startOfMonth(this.currentMonth);
467
+ }
468
+ }
469
+ }
470
+ };
471
+ handleBlur = () => {
472
+ this.focusedDate = null;
473
+ };
474
+ handleDayClick = date => {
475
+ if (!this.isDateDisabled(date)) {
476
+ this.focusedDate = date;
477
+ this.selectDate(date);
478
+ }
479
+ };
480
+ handleDayMouseEnter = date => {
481
+ if (this.mode === 'range' && this.rangeSelectionStart && !this.isDateDisabled(date)) {
482
+ this.hoveredDate = date;
483
+ }
484
+ };
485
+ handlePrevMonthClick = event => {
486
+ event.stopPropagation();
487
+ if (this.canGoToPreviousMonth) {
488
+ this.goToPreviousMonth();
489
+ }
490
+ };
491
+ handleNextMonthClick = event => {
492
+ event.stopPropagation();
493
+ if (this.canGoToNextMonth) {
494
+ this.goToNextMonth();
495
+ }
496
+ };
497
+ // ============================================================================
498
+ // Modifiers
499
+ // ============================================================================
500
+ setupRef = modifier(element => {
501
+ this.elementRef = element;
502
+ return () => {
503
+ this.elementRef = null;
504
+ };
505
+ });
506
+ // ============================================================================
507
+ // Template Helpers
508
+ // ============================================================================
509
+ getDayNumber = date => {
510
+ return date.getDate();
511
+ };
512
+ shouldShowDay = date => {
513
+ if (this.showOutsideDays) return true;
514
+ return isSameMonth(date, this.currentMonth);
515
+ };
516
+ // ============================================================================
517
+ // Template
518
+ // ============================================================================
519
+ static {
520
+ setComponentTemplate(precompileTemplate("{{!-- template-lint-disable no-positive-tabindex require-aria-activedescendant-tabindex --}}\n<div role=\"grid\" tabindex={{this.tabIndex}} class=\"calendar_e7aa819da\" aria-label=\"Calendar\" aria-activedescendant={{this.activedescendant}} aria-disabled={{if @isDisabled \"true\"}} data-disabled={{if @isDisabled \"true\" \"false\"}} data-mode={{this.mode}} data-test-calendar {{this.setupRef}} {{on \"keydown\" this.handleKeyDown}} {{on \"focus\" this.handleFocus}} {{on \"blur\" this.handleBlur}} ...attributes>\n {{!-- Header with month navigation --}}\n <div class=\"calendar-header_e7aa819da\" data-test-calendar-header>\n <button type=\"button\" class=\"calendar-nav-button_e7aa819da\" aria-label=\"Previous month\" disabled={{not this.canGoToPreviousMonth}} data-test-calendar-prev {{on \"click\" this.handlePrevMonthClick}}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\" />\n </svg>\n </button>\n\n <div class=\"calendar-title_e7aa819da\" aria-live=\"polite\" data-test-calendar-title>\n {{this.monthYearLabel}}\n </div>\n\n <button type=\"button\" class=\"calendar-nav-button_e7aa819da\" aria-label=\"Next month\" disabled={{not this.canGoToNextMonth}} data-test-calendar-next {{on \"click\" this.handleNextMonthClick}}>\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </button>\n </div>\n\n {{!-- Weekday headers --}}\n <div class=\"calendar-weekdays_e7aa819da\" role=\"row\" data-test-calendar-weekdays>\n {{#each this.weekdayLabels as |label|}}\n <div class=\"calendar-weekday_e7aa819da\" role=\"columnheader\">\n {{label}}\n </div>\n {{/each}}\n </div>\n\n {{!-- Day grid --}}\n {{!-- template-lint-disable no-nested-interactive require-valid-alt-text --}}\n <div class=\"calendar-grid_e7aa819da\" role=\"rowgroup\" data-test-calendar-grid>\n {{#each this.weeks as |week|}}\n <div class=\"calendar-week_e7aa819da\" role=\"row\">\n {{#each week as |day|}}\n {{#if (this.shouldShowDay day)}}\n {{#let (this.getDayState day) as |state|}}\n {{!-- template-lint-disable no-invalid-interactive --}}\n <div role=\"gridcell\" id={{this.getDayId day}} class=\"calendar-day_e7aa819da\" aria-selected={{if state.isSelected \"true\" \"false\"}} aria-disabled={{if state.isDisabled \"true\"}} aria-current={{if state.isToday \"date\"}} data-today={{if state.isToday \"true\" \"false\"}} data-selected={{if state.isSelected \"true\" \"false\"}} data-focused={{if state.isFocused \"true\" \"false\"}} data-disabled={{if state.isDisabled \"true\" \"false\"}} data-outside={{if state.isOutsideMonth \"true\" \"false\"}} data-range-start={{if state.isRangeStart \"true\" \"false\"}} data-range-end={{if state.isRangeEnd \"true\" \"false\"}} data-in-range={{if state.isInRange \"true\" \"false\"}} data-test-calendar-day data-test-calendar-day-value={{this.getDayId day}} {{on \"click\" (fn this.handleDayClick day)}} {{on \"mouseenter\" (fn this.handleDayMouseEnter day)}}>\n {{this.getDayNumber day}}\n </div>\n {{/let}}\n {{else}}\n <div class=\"calendar-day_e7aa819da calendar-day-empty_e7aa819da\" role=\"presentation\"></div>\n {{/if}}\n {{/each}}\n </div>\n {{/each}}\n </div>\n</div>", {
521
+ strictMode: true,
522
+ scope: () => ({
523
+ on,
524
+ not,
525
+ fn
526
+ })
527
+ }), this);
528
+ }
529
+ }
530
+
531
+ export { Calendar as default };
532
+ //# sourceMappingURL=calendar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ /* src/form/checkbox-group.css */
2
+ .fieldset_e634e725a {
3
+ border: none;
4
+ margin: 0;
5
+ padding: 0;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: var(--spacing-1-5);
9
+ }
10
+
11
+ .legend_e634e725a {
12
+ display: block;
13
+ font-size: var(--font-size-sm);
14
+ font-weight: var(--font-weight-medium);
15
+ color: var(--color-text);
16
+ line-height: var(--line-height-normal);
17
+ margin-bottom: var(--spacing-1-5);
18
+ padding: 0;
19
+ }
20
+
21
+ .required_e634e725a {
22
+ color: var(--color-text-critical);
23
+ margin-left: var(--spacing-0-5);
24
+ }
25
+
26
+ .description_e634e725a {
27
+ margin: 0;
28
+ font-size: var(--font-size-sm);
29
+ line-height: var(--line-height-normal);
30
+ color: var(--color-text-secondary);
31
+ margin-bottom: var(--spacing-1);
32
+ }
33
+
34
+ .options_e634e725a {
35
+ display: flex;
36
+ gap: var(--spacing-4);
37
+ }
38
+
39
+ .options_e634e725a[data-orientation="vertical"] {
40
+ flex-direction: column;
41
+ gap: var(--spacing-3);
42
+ }
43
+
44
+ .options_e634e725a[data-orientation="horizontal"] {
45
+ flex-flow: row wrap;
46
+ gap: var(--spacing-6);
47
+ }
@@ -0,0 +1,102 @@
1
+ import "./checkbox-group.css"
2
+ import Component from '@glimmer/component';
3
+ import { tracked } from '@glimmer/tracking';
4
+ import { action } from '@ember/object';
5
+ import { on } from '@ember/modifier';
6
+ import { hash } from '@ember/helper';
7
+ import { guidFor } from '@ember/object/internals';
8
+ import Checkbox from './checkbox.js';
9
+ import ErrorMessage from './error-message.js';
10
+ import { precompileTemplate } from '@ember/template-compilation';
11
+ import { setComponentTemplate } from '@ember/component';
12
+ import { g, i, n } from 'decorator-transforms/runtime';
13
+
14
+ ;
15
+
16
+ class CheckboxGroup extends Component {
17
+ static {
18
+ g(this.prototype, "internalValues", [tracked]);
19
+ }
20
+ #internalValues = (i(this, "internalValues"), void 0);
21
+ constructor(owner, args) {
22
+ super(owner, args);
23
+ this.internalValues = [...(args.defaultValue ?? [])];
24
+ }
25
+ guid = guidFor(this);
26
+ get isControlled() {
27
+ return this.args.value !== undefined;
28
+ }
29
+ get selectedValues() {
30
+ return this.isControlled ? this.args.value ?? [] : this.internalValues;
31
+ }
32
+ get orientation() {
33
+ return this.args.orientation ?? 'vertical';
34
+ }
35
+ get size() {
36
+ return this.args.size ?? 'md';
37
+ }
38
+ get errorMessageId() {
39
+ return `${this.guid}-error`;
40
+ }
41
+ get ariaDescribedBy() {
42
+ if (this.args.isInvalid) {
43
+ return this.errorMessageId;
44
+ }
45
+ return undefined;
46
+ }
47
+ isValueSelected = value => {
48
+ return this.selectedValues.includes(value);
49
+ };
50
+ handleCheckboxChange(value, isChecked) {
51
+ let newValues;
52
+ if (isChecked) {
53
+ newValues = [...this.selectedValues, value];
54
+ } else {
55
+ newValues = this.selectedValues.filter(v => v !== value);
56
+ }
57
+ if (!this.isControlled) {
58
+ this.internalValues = newValues;
59
+ }
60
+ this.args.onChange?.(newValues);
61
+ }
62
+ static {
63
+ n(this.prototype, "handleCheckboxChange", [action]);
64
+ }
65
+ static {
66
+ setComponentTemplate(precompileTemplate("<fieldset class=\"fieldset_e634e725a\" aria-describedby={{this.ariaDescribedBy}} data-test-checkbox-group ...attributes>\n {{#if @label}}\n <legend class=\"legend_e634e725a\" data-test-checkbox-group-legend>\n {{@label}}\n {{#if @isRequired}}\n <span class=\"required_e634e725a\">*</span>\n {{/if}}\n </legend>\n {{/if}}\n\n {{#if @description}}\n <p class=\"description_e634e725a\" data-test-checkbox-group-description>\n {{@description}}\n </p>\n {{/if}}\n\n <div class=\"options_e634e725a\" data-orientation={{this.orientation}} data-test-checkbox-group-options>\n {{yield (hash Checkbox=(component ContextualCheckbox groupName=@name groupDisabled=@isDisabled groupInvalid=@isInvalid groupSize=this.size isValueSelected=this.isValueSelected onCheckboxChange=this.handleCheckboxChange) ErrorMessage=(component ErrorMessage id=this.errorMessageId isInvalid=@isInvalid))}}\n </div>\n</fieldset>", {
67
+ strictMode: true,
68
+ scope: () => ({
69
+ hash,
70
+ ContextualCheckbox,
71
+ ErrorMessage
72
+ })
73
+ }), this);
74
+ }
75
+ }
76
+ class ContextualCheckbox extends Component {
77
+ get isChecked() {
78
+ return this.args.isValueSelected(this.args.value);
79
+ }
80
+ get isDisabled() {
81
+ return this.args.isDisabled ?? this.args.groupDisabled ?? false;
82
+ }
83
+ handleChange(event) {
84
+ const target = event.target;
85
+ this.args.onCheckboxChange(this.args.value, target.checked);
86
+ }
87
+ static {
88
+ n(this.prototype, "handleChange", [action]);
89
+ }
90
+ static {
91
+ setComponentTemplate(precompileTemplate("{{!-- Wrapper captures bubbling change event from checkbox input --}}\n<span {{on \"change\" this.handleChange}} data-test-checkbox-group-item>\n {{#if (has-block)}}\n <Checkbox @isChecked={{this.isChecked}} @value={{@value}} @name={{@groupName}} @label={{@label}} @description={{@description}} @isDisabled={{this.isDisabled}} @isInvalid={{@groupInvalid}} @size={{@groupSize}} ...attributes>\n {{yield}}\n </Checkbox>\n {{else}}\n <Checkbox @isChecked={{this.isChecked}} @value={{@value}} @name={{@groupName}} @label={{@label}} @description={{@description}} @isDisabled={{this.isDisabled}} @isInvalid={{@groupInvalid}} @size={{@groupSize}} ...attributes />\n {{/if}}\n</span>", {
92
+ strictMode: true,
93
+ scope: () => ({
94
+ on,
95
+ Checkbox
96
+ })
97
+ }), this);
98
+ }
99
+ }
100
+
101
+ export { CheckboxGroup as default };
102
+ //# sourceMappingURL=checkbox-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}