@ember-joinery/primitives 0.0.0-stage → 1.0.1

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 (485) hide show
  1. package/CHANGELOG.md +472 -0
  2. package/LICENSE.md +9 -0
  3. package/NOTICE +532 -0
  4. package/README.md +11 -2
  5. package/addon-main.cjs +4 -0
  6. package/declarations/-private/combobox-list.d.ts +59 -0
  7. package/declarations/-private/combobox-list.d.ts.map +1 -0
  8. package/declarations/-private/command-score.d.ts +33 -0
  9. package/declarations/-private/command-score.d.ts.map +1 -0
  10. package/declarations/-private/delay-group.d.ts +47 -0
  11. package/declarations/-private/delay-group.d.ts.map +1 -0
  12. package/declarations/-private/dialog.d.ts +180 -0
  13. package/declarations/-private/dialog.d.ts.map +1 -0
  14. package/declarations/-private/form-control.d.ts +70 -0
  15. package/declarations/-private/form-control.d.ts.map +1 -0
  16. package/declarations/-private/form-data.d.ts +14 -0
  17. package/declarations/-private/form-data.d.ts.map +1 -0
  18. package/declarations/-private/hover-intent.d.ts +48 -0
  19. package/declarations/-private/hover-intent.d.ts.map +1 -0
  20. package/declarations/-private/image-loading.d.ts +77 -0
  21. package/declarations/-private/image-loading.d.ts.map +1 -0
  22. package/declarations/-private/indicator.d.ts +27 -0
  23. package/declarations/-private/indicator.d.ts.map +1 -0
  24. package/declarations/-private/instances.d.ts +11 -0
  25. package/declarations/-private/instances.d.ts.map +1 -0
  26. package/declarations/-private/layout-styles.d.ts +34 -0
  27. package/declarations/-private/layout-styles.d.ts.map +1 -0
  28. package/declarations/-private/menu.d.ts +616 -0
  29. package/declarations/-private/menu.d.ts.map +1 -0
  30. package/declarations/-private/observers.d.ts +35 -0
  31. package/declarations/-private/observers.d.ts.map +1 -0
  32. package/declarations/-private/popper.d.ts +149 -0
  33. package/declarations/-private/popper.d.ts.map +1 -0
  34. package/declarations/-private/presence-chart.d.ts +39 -0
  35. package/declarations/-private/presence-chart.d.ts.map +1 -0
  36. package/declarations/-private/promise-state.d.ts +41 -0
  37. package/declarations/-private/promise-state.d.ts.map +1 -0
  38. package/declarations/-private/scroll-end.d.ts +16 -0
  39. package/declarations/-private/scroll-end.d.ts.map +1 -0
  40. package/declarations/-private/scroll-visibility.d.ts +68 -0
  41. package/declarations/-private/scroll-visibility.d.ts.map +1 -0
  42. package/declarations/-private/toast.d.ts +119 -0
  43. package/declarations/-private/toast.d.ts.map +1 -0
  44. package/declarations/-private/typeahead-search.d.ts +29 -0
  45. package/declarations/-private/typeahead-search.d.ts.map +1 -0
  46. package/declarations/accordion.d.ts +284 -0
  47. package/declarations/accordion.d.ts.map +1 -0
  48. package/declarations/alert-dialog.d.ts +80 -0
  49. package/declarations/alert-dialog.d.ts.map +1 -0
  50. package/declarations/anchor/component.d.ts +63 -0
  51. package/declarations/anchor/component.d.ts.map +1 -0
  52. package/declarations/anchor/index.d.ts +7 -0
  53. package/declarations/anchor/index.d.ts.map +1 -0
  54. package/declarations/anchor/middleware.d.ts +46 -0
  55. package/declarations/anchor/middleware.d.ts.map +1 -0
  56. package/declarations/anchor/modifier.d.ts +34 -0
  57. package/declarations/anchor/modifier.d.ts.map +1 -0
  58. package/declarations/anchor/options.d.ts +112 -0
  59. package/declarations/anchor/options.d.ts.map +1 -0
  60. package/declarations/anchor/position.d.ts +36 -0
  61. package/declarations/anchor/position.d.ts.map +1 -0
  62. package/declarations/anchor.d.ts +2 -0
  63. package/declarations/as.d.ts +33 -0
  64. package/declarations/as.d.ts.map +1 -0
  65. package/declarations/aspect-ratio.d.ts +34 -0
  66. package/declarations/aspect-ratio.d.ts.map +1 -0
  67. package/declarations/avatar.d.ts +178 -0
  68. package/declarations/avatar.d.ts.map +1 -0
  69. package/declarations/body-class.d.ts +30 -0
  70. package/declarations/body-class.d.ts.map +1 -0
  71. package/declarations/breadcrumb.d.ts +64 -0
  72. package/declarations/breadcrumb.d.ts.map +1 -0
  73. package/declarations/calendar/dates.d.ts +142 -0
  74. package/declarations/calendar/dates.d.ts.map +1 -0
  75. package/declarations/calendar/index.d.ts +59 -0
  76. package/declarations/calendar/index.d.ts.map +1 -0
  77. package/declarations/calendar/state.d.ts +415 -0
  78. package/declarations/calendar/state.d.ts.map +1 -0
  79. package/declarations/calendar.d.ts +3 -0
  80. package/declarations/checkbox.d.ts +71 -0
  81. package/declarations/checkbox.d.ts.map +1 -0
  82. package/declarations/collapsible.d.ts +216 -0
  83. package/declarations/collapsible.d.ts.map +1 -0
  84. package/declarations/color-scheme.d.ts +115 -0
  85. package/declarations/color-scheme.d.ts.map +1 -0
  86. package/declarations/combobox.d.ts +569 -0
  87. package/declarations/combobox.d.ts.map +1 -0
  88. package/declarations/command.d.ts +410 -0
  89. package/declarations/command.d.ts.map +1 -0
  90. package/declarations/context-menu.d.ts +155 -0
  91. package/declarations/context-menu.d.ts.map +1 -0
  92. package/declarations/controllable-state.d.ts +85 -0
  93. package/declarations/controllable-state.d.ts.map +1 -0
  94. package/declarations/dialog.d.ts +80 -0
  95. package/declarations/dialog.d.ts.map +1 -0
  96. package/declarations/direction.d.ts +55 -0
  97. package/declarations/direction.d.ts.map +1 -0
  98. package/declarations/dismiss.d.ts +111 -0
  99. package/declarations/dismiss.d.ts.map +1 -0
  100. package/declarations/dom-context.d.ts +74 -0
  101. package/declarations/dom-context.d.ts.map +1 -0
  102. package/declarations/drawer/controller.d.ts +174 -0
  103. package/declarations/drawer/controller.d.ts.map +1 -0
  104. package/declarations/drawer/index.d.ts +105 -0
  105. package/declarations/drawer/index.d.ts.map +1 -0
  106. package/declarations/drawer/machine.d.ts +139 -0
  107. package/declarations/drawer/machine.d.ts.map +1 -0
  108. package/declarations/drawer/parts.d.ts +85 -0
  109. package/declarations/drawer/parts.d.ts.map +1 -0
  110. package/declarations/drawer.d.ts +2 -0
  111. package/declarations/dropdown-menu.d.ts +169 -0
  112. package/declarations/dropdown-menu.d.ts.map +1 -0
  113. package/declarations/external-link.d.ts +26 -0
  114. package/declarations/external-link.d.ts.map +1 -0
  115. package/declarations/file-drop.d.ts +119 -0
  116. package/declarations/file-drop.d.ts.map +1 -0
  117. package/declarations/focus-scope.d.ts +105 -0
  118. package/declarations/focus-scope.d.ts.map +1 -0
  119. package/declarations/focus.d.ts +114 -0
  120. package/declarations/focus.d.ts.map +1 -0
  121. package/declarations/head.d.ts +20 -0
  122. package/declarations/head.d.ts.map +1 -0
  123. package/declarations/heading.d.ts +59 -0
  124. package/declarations/heading.d.ts.map +1 -0
  125. package/declarations/hero.d.ts +32 -0
  126. package/declarations/hero.d.ts.map +1 -0
  127. package/declarations/hide-others.d.ts +35 -0
  128. package/declarations/hide-others.d.ts.map +1 -0
  129. package/declarations/hover-card.d.ts +148 -0
  130. package/declarations/hover-card.d.ts.map +1 -0
  131. package/declarations/i18n.d.ts +47 -0
  132. package/declarations/i18n.d.ts.map +1 -0
  133. package/declarations/id.d.ts +15 -0
  134. package/declarations/id.d.ts.map +1 -0
  135. package/declarations/iframe.d.ts +12 -0
  136. package/declarations/iframe.d.ts.map +1 -0
  137. package/declarations/incremental-each.d.ts +81 -0
  138. package/declarations/incremental-each.d.ts.map +1 -0
  139. package/declarations/index.d.ts +108 -0
  140. package/declarations/index.d.ts.map +1 -0
  141. package/declarations/input-otp.d.ts +201 -0
  142. package/declarations/input-otp.d.ts.map +1 -0
  143. package/declarations/keys.d.ts +50 -0
  144. package/declarations/keys.d.ts.map +1 -0
  145. package/declarations/label.d.ts +36 -0
  146. package/declarations/label.d.ts.map +1 -0
  147. package/declarations/layer.d.ts +56 -0
  148. package/declarations/layer.d.ts.map +1 -0
  149. package/declarations/link-helper.d.ts +73 -0
  150. package/declarations/link-helper.d.ts.map +1 -0
  151. package/declarations/link.d.ts +60 -0
  152. package/declarations/link.d.ts.map +1 -0
  153. package/declarations/load.d.ts +47 -0
  154. package/declarations/load.d.ts.map +1 -0
  155. package/declarations/menubar.d.ts +231 -0
  156. package/declarations/menubar.d.ts.map +1 -0
  157. package/declarations/message-scroller/components.d.ts +229 -0
  158. package/declarations/message-scroller/components.d.ts.map +1 -0
  159. package/declarations/message-scroller/geometry.d.ts +95 -0
  160. package/declarations/message-scroller/geometry.d.ts.map +1 -0
  161. package/declarations/message-scroller/index.d.ts +4 -0
  162. package/declarations/message-scroller/index.d.ts.map +1 -0
  163. package/declarations/message-scroller/state.d.ts +124 -0
  164. package/declarations/message-scroller/state.d.ts.map +1 -0
  165. package/declarations/message-scroller.d.ts +2 -0
  166. package/declarations/messages.d.ts +166 -0
  167. package/declarations/messages.d.ts.map +1 -0
  168. package/declarations/narrowing.d.ts +24 -0
  169. package/declarations/narrowing.d.ts.map +1 -0
  170. package/declarations/native-form.d.ts +56 -0
  171. package/declarations/native-form.d.ts.map +1 -0
  172. package/declarations/native-value.d.ts +47 -0
  173. package/declarations/native-value.d.ts.map +1 -0
  174. package/declarations/navigation-menu.d.ts +406 -0
  175. package/declarations/navigation-menu.d.ts.map +1 -0
  176. package/declarations/on-resize.d.ts +32 -0
  177. package/declarations/on-resize.d.ts.map +1 -0
  178. package/declarations/part.d.ts +99 -0
  179. package/declarations/part.d.ts.map +1 -0
  180. package/declarations/popover.d.ts +236 -0
  181. package/declarations/popover.d.ts.map +1 -0
  182. package/declarations/portal/index.d.ts +3 -0
  183. package/declarations/portal/index.d.ts.map +1 -0
  184. package/declarations/portal/portal.d.ts +46 -0
  185. package/declarations/portal/portal.d.ts.map +1 -0
  186. package/declarations/portal/targets.d.ts +40 -0
  187. package/declarations/portal/targets.d.ts.map +1 -0
  188. package/declarations/portal.d.ts +2 -0
  189. package/declarations/presence.d.ts +80 -0
  190. package/declarations/presence.d.ts.map +1 -0
  191. package/declarations/progress.d.ts +98 -0
  192. package/declarations/progress.d.ts.map +1 -0
  193. package/declarations/proper-links.d.ts +69 -0
  194. package/declarations/proper-links.d.ts.map +1 -0
  195. package/declarations/qp.d.ts +55 -0
  196. package/declarations/qp.d.ts.map +1 -0
  197. package/declarations/questionnaire/components.d.ts +348 -0
  198. package/declarations/questionnaire/components.d.ts.map +1 -0
  199. package/declarations/questionnaire/index.d.ts +4 -0
  200. package/declarations/questionnaire/index.d.ts.map +1 -0
  201. package/declarations/questionnaire/state.d.ts +400 -0
  202. package/declarations/questionnaire/state.d.ts.map +1 -0
  203. package/declarations/questionnaire/utils.d.ts +65 -0
  204. package/declarations/questionnaire/utils.d.ts.map +1 -0
  205. package/declarations/questionnaire.d.ts +2 -0
  206. package/declarations/radio-group.d.ts +115 -0
  207. package/declarations/radio-group.d.ts.map +1 -0
  208. package/declarations/rating.d.ts +214 -0
  209. package/declarations/rating.d.ts.map +1 -0
  210. package/declarations/resizable/components.d.ts +107 -0
  211. package/declarations/resizable/components.d.ts.map +1 -0
  212. package/declarations/resizable/index.d.ts +4 -0
  213. package/declarations/resizable/index.d.ts.map +1 -0
  214. package/declarations/resizable/layout.d.ts +93 -0
  215. package/declarations/resizable/layout.d.ts.map +1 -0
  216. package/declarations/resizable/state.d.ts +211 -0
  217. package/declarations/resizable/state.d.ts.map +1 -0
  218. package/declarations/resizable.d.ts +2 -0
  219. package/declarations/resize-observer.d.ts +40 -0
  220. package/declarations/resize-observer.d.ts.map +1 -0
  221. package/declarations/roving-focus.d.ts +204 -0
  222. package/declarations/roving-focus.d.ts.map +1 -0
  223. package/declarations/scroll-area/components.d.ts +125 -0
  224. package/declarations/scroll-area/components.d.ts.map +1 -0
  225. package/declarations/scroll-area/index.d.ts +3 -0
  226. package/declarations/scroll-area/index.d.ts.map +1 -0
  227. package/declarations/scroll-area/state.d.ts +147 -0
  228. package/declarations/scroll-area/state.d.ts.map +1 -0
  229. package/declarations/scroll-area.d.ts +2 -0
  230. package/declarations/scroll-lock.d.ts +69 -0
  231. package/declarations/scroll-lock.d.ts.map +1 -0
  232. package/declarations/scroller.d.ts +71 -0
  233. package/declarations/scroller.d.ts.map +1 -0
  234. package/declarations/select.d.ts +459 -0
  235. package/declarations/select.d.ts.map +1 -0
  236. package/declarations/separator.d.ts +71 -0
  237. package/declarations/separator.d.ts.map +1 -0
  238. package/declarations/service.d.ts +83 -0
  239. package/declarations/service.d.ts.map +1 -0
  240. package/declarations/shadowed.d.ts +63 -0
  241. package/declarations/shadowed.d.ts.map +1 -0
  242. package/declarations/slider.d.ts +283 -0
  243. package/declarations/slider.d.ts.map +1 -0
  244. package/declarations/sticky-footer.d.ts +43 -0
  245. package/declarations/sticky-footer.d.ts.map +1 -0
  246. package/declarations/store.d.ts +47 -0
  247. package/declarations/store.d.ts.map +1 -0
  248. package/declarations/switch.d.ts +76 -0
  249. package/declarations/switch.d.ts.map +1 -0
  250. package/declarations/tabs.d.ts +250 -0
  251. package/declarations/tabs.d.ts.map +1 -0
  252. package/declarations/toast/icons.d.ts +29 -0
  253. package/declarations/toast/icons.d.ts.map +1 -0
  254. package/declarations/toast/index.d.ts +4 -0
  255. package/declarations/toast/index.d.ts.map +1 -0
  256. package/declarations/toast/item.d.ts +162 -0
  257. package/declarations/toast/item.d.ts.map +1 -0
  258. package/declarations/toast/state.d.ts +276 -0
  259. package/declarations/toast/state.d.ts.map +1 -0
  260. package/declarations/toast/styles.d.ts +20 -0
  261. package/declarations/toast/styles.d.ts.map +1 -0
  262. package/declarations/toast/toaster.d.ts +173 -0
  263. package/declarations/toast/toaster.d.ts.map +1 -0
  264. package/declarations/toast.d.ts +2 -0
  265. package/declarations/toggle-group.d.ts +161 -0
  266. package/declarations/toggle-group.d.ts.map +1 -0
  267. package/declarations/toggle.d.ts +70 -0
  268. package/declarations/toggle.d.ts.map +1 -0
  269. package/declarations/tooltip.d.ts +227 -0
  270. package/declarations/tooltip.d.ts.map +1 -0
  271. package/declarations/typeahead.d.ts +97 -0
  272. package/declarations/typeahead.d.ts.map +1 -0
  273. package/declarations/viewport.d.ts +109 -0
  274. package/declarations/viewport.d.ts.map +1 -0
  275. package/declarations/visually-hidden.d.ts +42 -0
  276. package/declarations/visually-hidden.d.ts.map +1 -0
  277. package/declarations/zoetrope.d.ts +120 -0
  278. package/declarations/zoetrope.d.ts.map +1 -0
  279. package/dist/accordion.js +367 -0
  280. package/dist/accordion.js.map +1 -0
  281. package/dist/alert-dialog.js +122 -0
  282. package/dist/alert-dialog.js.map +1 -0
  283. package/dist/anchor.js +2 -0
  284. package/dist/anchor.js.map +1 -0
  285. package/dist/as.js +60 -0
  286. package/dist/as.js.map +1 -0
  287. package/dist/aspect-ratio.js +59 -0
  288. package/dist/aspect-ratio.js.map +1 -0
  289. package/dist/avatar.js +464 -0
  290. package/dist/avatar.js.map +1 -0
  291. package/dist/body-class.js +57 -0
  292. package/dist/body-class.js.map +1 -0
  293. package/dist/breadcrumb.js +59 -0
  294. package/dist/breadcrumb.js.map +1 -0
  295. package/dist/calendar.js +1494 -0
  296. package/dist/calendar.js.map +1 -0
  297. package/dist/checkbox.js +81 -0
  298. package/dist/checkbox.js.map +1 -0
  299. package/dist/collapsible.js +255 -0
  300. package/dist/collapsible.js.map +1 -0
  301. package/dist/color-scheme.js +306 -0
  302. package/dist/color-scheme.js.map +1 -0
  303. package/dist/combobox.js +1413 -0
  304. package/dist/combobox.js.map +1 -0
  305. package/dist/command.js +1054 -0
  306. package/dist/command.js.map +1 -0
  307. package/dist/component-DqLt83fo.js +886 -0
  308. package/dist/component-DqLt83fo.js.map +1 -0
  309. package/dist/components-CWfg0cFs.js +1745 -0
  310. package/dist/components-CWfg0cFs.js.map +1 -0
  311. package/dist/components-DBWszEI3.js +1285 -0
  312. package/dist/components-DBWszEI3.js.map +1 -0
  313. package/dist/components-DI8Azu05.js +1542 -0
  314. package/dist/components-DI8Azu05.js.map +1 -0
  315. package/dist/components-F0Ini448.js +875 -0
  316. package/dist/components-F0Ini448.js.map +1 -0
  317. package/dist/context-menu.js +207 -0
  318. package/dist/context-menu.js.map +1 -0
  319. package/dist/controllable-state.js +134 -0
  320. package/dist/controllable-state.js.map +1 -0
  321. package/dist/delay-group-B1K03gBL.js +75 -0
  322. package/dist/delay-group-B1K03gBL.js.map +1 -0
  323. package/dist/dialog-3gfz_8NA.js +349 -0
  324. package/dist/dialog-3gfz_8NA.js.map +1 -0
  325. package/dist/dialog.js +57 -0
  326. package/dist/dialog.js.map +1 -0
  327. package/dist/direction.js +75 -0
  328. package/dist/direction.js.map +1 -0
  329. package/dist/dismiss.js +329 -0
  330. package/dist/dismiss.js.map +1 -0
  331. package/dist/dom-context.js +104 -0
  332. package/dist/dom-context.js.map +1 -0
  333. package/dist/drawer.js +1456 -0
  334. package/dist/drawer.js.map +1 -0
  335. package/dist/dropdown-menu.js +201 -0
  336. package/dist/dropdown-menu.js.map +1 -0
  337. package/dist/external-link.js +21 -0
  338. package/dist/external-link.js.map +1 -0
  339. package/dist/file-drop.js +183 -0
  340. package/dist/file-drop.js.map +1 -0
  341. package/dist/focus-scope.js +292 -0
  342. package/dist/focus-scope.js.map +1 -0
  343. package/dist/focus.js +307 -0
  344. package/dist/focus.js.map +1 -0
  345. package/dist/form-control-Ca_KHSKK.js +177 -0
  346. package/dist/form-control-Ca_KHSKK.js.map +1 -0
  347. package/dist/head.js +25 -0
  348. package/dist/head.js.map +1 -0
  349. package/dist/heading.js +152 -0
  350. package/dist/heading.js.map +1 -0
  351. package/dist/hero.js +36 -0
  352. package/dist/hero.js.map +1 -0
  353. package/dist/hide-others.js +108 -0
  354. package/dist/hide-others.js.map +1 -0
  355. package/dist/hover-card.js +246 -0
  356. package/dist/hover-card.js.map +1 -0
  357. package/dist/hover-intent-Bxb83fgX.js +92 -0
  358. package/dist/hover-intent-Bxb83fgX.js.map +1 -0
  359. package/dist/i18n.js +72 -0
  360. package/dist/i18n.js.map +1 -0
  361. package/dist/id.js +24 -0
  362. package/dist/id.js.map +1 -0
  363. package/dist/iframe.js +19 -0
  364. package/dist/iframe.js.map +1 -0
  365. package/dist/incremental-each.js +181 -0
  366. package/dist/incremental-each.js.map +1 -0
  367. package/dist/index.js +87 -0
  368. package/dist/index.js.map +1 -0
  369. package/dist/indicator-sYuRuFJA.js +26 -0
  370. package/dist/indicator-sYuRuFJA.js.map +1 -0
  371. package/dist/input-otp.js +611 -0
  372. package/dist/input-otp.js.map +1 -0
  373. package/dist/keys.js +65 -0
  374. package/dist/keys.js.map +1 -0
  375. package/dist/label.js +41 -0
  376. package/dist/label.js.map +1 -0
  377. package/dist/layer.js +157 -0
  378. package/dist/layer.js.map +1 -0
  379. package/dist/layout-styles-DY86so8a.js +81 -0
  380. package/dist/layout-styles-DY86so8a.js.map +1 -0
  381. package/dist/link-helper.js +122 -0
  382. package/dist/link-helper.js.map +1 -0
  383. package/dist/link.js +39 -0
  384. package/dist/link.js.map +1 -0
  385. package/dist/load.js +54 -0
  386. package/dist/load.js.map +1 -0
  387. package/dist/menu-Da1LFCet.js +1109 -0
  388. package/dist/menu-Da1LFCet.js.map +1 -0
  389. package/dist/menubar.js +357 -0
  390. package/dist/menubar.js.map +1 -0
  391. package/dist/message-scroller.js +2 -0
  392. package/dist/message-scroller.js.map +1 -0
  393. package/dist/messages.js +168 -0
  394. package/dist/messages.js.map +1 -0
  395. package/dist/narrowing.js +29 -0
  396. package/dist/narrowing.js.map +1 -0
  397. package/dist/native-form.js +134 -0
  398. package/dist/native-form.js.map +1 -0
  399. package/dist/native-value.js +125 -0
  400. package/dist/native-value.js.map +1 -0
  401. package/dist/navigation-menu.js +872 -0
  402. package/dist/navigation-menu.js.map +1 -0
  403. package/dist/observers-aItWe029.js +113 -0
  404. package/dist/observers-aItWe029.js.map +1 -0
  405. package/dist/on-resize.js +47 -0
  406. package/dist/on-resize.js.map +1 -0
  407. package/dist/part.js +291 -0
  408. package/dist/part.js.map +1 -0
  409. package/dist/popover.js +419 -0
  410. package/dist/popover.js.map +1 -0
  411. package/dist/popper-BbTzV8dP.js +323 -0
  412. package/dist/popper-BbTzV8dP.js.map +1 -0
  413. package/dist/portal-U554WDI9.js +214 -0
  414. package/dist/portal-U554WDI9.js.map +1 -0
  415. package/dist/portal.js +2 -0
  416. package/dist/portal.js.map +1 -0
  417. package/dist/presence.js +243 -0
  418. package/dist/presence.js.map +1 -0
  419. package/dist/progress.js +106 -0
  420. package/dist/progress.js.map +1 -0
  421. package/dist/promise-state-BMi2zVoT.js +91 -0
  422. package/dist/promise-state-BMi2zVoT.js.map +1 -0
  423. package/dist/proper-links.js +136 -0
  424. package/dist/proper-links.js.map +1 -0
  425. package/dist/qp.js +77 -0
  426. package/dist/qp.js.map +1 -0
  427. package/dist/questionnaire.js +2 -0
  428. package/dist/questionnaire.js.map +1 -0
  429. package/dist/radio-group.js +149 -0
  430. package/dist/radio-group.js.map +1 -0
  431. package/dist/rating.js +261 -0
  432. package/dist/rating.js.map +1 -0
  433. package/dist/resizable.js +2 -0
  434. package/dist/resizable.js.map +1 -0
  435. package/dist/resize-observer.js +85 -0
  436. package/dist/resize-observer.js.map +1 -0
  437. package/dist/roving-focus.js +355 -0
  438. package/dist/roving-focus.js.map +1 -0
  439. package/dist/scroll-area.js +2 -0
  440. package/dist/scroll-area.js.map +1 -0
  441. package/dist/scroll-end-Cer8JSIB.js +87 -0
  442. package/dist/scroll-end-Cer8JSIB.js.map +1 -0
  443. package/dist/scroll-lock.js +267 -0
  444. package/dist/scroll-lock.js.map +1 -0
  445. package/dist/scroller.js +117 -0
  446. package/dist/scroller.js.map +1 -0
  447. package/dist/select.js +1223 -0
  448. package/dist/select.js.map +1 -0
  449. package/dist/separator.js +80 -0
  450. package/dist/separator.js.map +1 -0
  451. package/dist/service.js +160 -0
  452. package/dist/service.js.map +1 -0
  453. package/dist/shadowed.js +70 -0
  454. package/dist/shadowed.js.map +1 -0
  455. package/dist/slider.js +586 -0
  456. package/dist/slider.js.map +1 -0
  457. package/dist/sticky-footer.js +40 -0
  458. package/dist/sticky-footer.js.map +1 -0
  459. package/dist/store-BjiAd-KP.js +93 -0
  460. package/dist/store-BjiAd-KP.js.map +1 -0
  461. package/dist/store.js +4 -0
  462. package/dist/store.js.map +1 -0
  463. package/dist/switch.js +58 -0
  464. package/dist/switch.js.map +1 -0
  465. package/dist/tabs.js +458 -0
  466. package/dist/tabs.js.map +1 -0
  467. package/dist/toast.js +2 -0
  468. package/dist/toast.js.map +1 -0
  469. package/dist/toaster-DwprFZ1J.js +1518 -0
  470. package/dist/toaster-DwprFZ1J.js.map +1 -0
  471. package/dist/toggle-group.js +221 -0
  472. package/dist/toggle-group.js.map +1 -0
  473. package/dist/toggle.js +78 -0
  474. package/dist/toggle.js.map +1 -0
  475. package/dist/tooltip.js +422 -0
  476. package/dist/tooltip.js.map +1 -0
  477. package/dist/typeahead.js +233 -0
  478. package/dist/typeahead.js.map +1 -0
  479. package/dist/viewport.js +138 -0
  480. package/dist/viewport.js.map +1 -0
  481. package/dist/visually-hidden.js +49 -0
  482. package/dist/visually-hidden.js.map +1 -0
  483. package/dist/zoetrope.js +336 -0
  484. package/dist/zoetrope.js.map +1 -0
  485. package/package.json +101 -3
@@ -0,0 +1,83 @@
1
+ import type Owner from '@ember/owner';
2
+ import type { Registry } from '@ember/service';
3
+ import { type LoadState } from './-private/promise-state.ts';
4
+ /**
5
+ * What `service` makes one of per owner: a class, constructed with the owner, or a function
6
+ * that returns the instance. The definition itself is the key, so share one definition.
7
+ */
8
+ export type ServiceDefinition<T extends object> = (new (owner: Owner) => T) | (() => T);
9
+ /** The name of a service registered with the app (`app/services/<name>.ts`), `router` among them. */
10
+ export type ServiceName = keyof Registry & string;
11
+ /**
12
+ * One instance of a class per owner (per app instance, and so per test), made the first time
13
+ * it is asked for and destroyed with its owner. It is for state that a whole app shares but
14
+ * that tests must not: a toaster's queue, the color scheme. Unlike `@service`, nothing is
15
+ * registered by name, and a module that never asks for the class never loads it.
16
+ *
17
+ * In JavaScript, pass anything with an owner (a component, a route) and the class:
18
+ *
19
+ * class Toasts { @tracked queue = [] }
20
+ *
21
+ * class Toaster extends Component {
22
+ * get toasts() { return service(this, Toasts) }
23
+ * }
24
+ *
25
+ * In a template, pass the class alone:
26
+ *
27
+ * {{#let (service Toasts) as |toasts|}}…{{/let}}
28
+ *
29
+ * The class is constructed with the owner, and the instance gets that owner, so `@service`
30
+ * injections work in it (after its constructor). For cleanup, `registerDestructor(this, …)`
31
+ * in the constructor runs when the owner is destroyed. A function in place of the class is
32
+ * called once per owner, to construct the instance yourself: `service(this, makeToasts)`.
33
+ *
34
+ * A name in place of the class looks up a service registered with the app, as `@service`
35
+ * does, so a template can read one without a backing class: `(service "router")`. That is
36
+ * ember-primitives' `service` helper; the class form is its `createService`.
37
+ *
38
+ * @param context anything with an owner, or the owner itself
39
+ * @param definition the class, a function returning the instance, or a registered service's name
40
+ */
41
+ export declare function service<Name extends ServiceName>(name: Name): Registry[Name] & object;
42
+ export declare function service<T extends object>(definition: ServiceDefinition<T>): T;
43
+ export declare function service<Name extends ServiceName>(context: object, name: Name): Registry[Name] & object;
44
+ export declare function service<T extends object>(context: object, definition: ServiceDefinition<T>): T;
45
+ /** What an `asyncService` loader resolves with: the class (or function), or its module. */
46
+ export type AsyncServiceModule<T extends object> = ServiceDefinition<T> | {
47
+ default: ServiceDefinition<T>;
48
+ };
49
+ /** Loads the class an `asyncService` makes its instance of: `() => import('./cart.ts')`. */
50
+ export type AsyncServiceLoader<T extends object> = () => Promise<AsyncServiceModule<T>>;
51
+ /**
52
+ * The state of an `asyncService`: loading, then the instance or why it failed (a `LoadError`,
53
+ * as `@ember-joinery/primitives/load` names it).
54
+ */
55
+ export type AsyncServiceState<T extends object> = LoadState<T>;
56
+ /**
57
+ * A service whose class loads on demand, for one that pulls in a large dependency. The loader
58
+ * runs the first time any part of the app asks, and every caller with the same loader then
59
+ * shares one instance per owner, as with `service`:
60
+ *
61
+ * const loadEditor = () => import('./rich-text-editor.ts') // default export: the class
62
+ *
63
+ * class Toolbar extends Component {
64
+ * get editor() {
65
+ * return asyncService(this, loadEditor)
66
+ * }
67
+ * }
68
+ *
69
+ * {{#if this.editor.isLoading}}Loading…
70
+ * {{else if this.editor.error}}{{this.editor.error.reason}}
71
+ * {{else if this.editor.resolved}}<Bold @editor={{this.editor.resolved}} />{{/if}}
72
+ *
73
+ * It returns a reactive state, not the instance: `isLoading` while the class loads, then
74
+ * `resolved` (the instance) or `error` (`{ reason, original }`). The loader resolves with the
75
+ * class, a function returning the instance, or a module whose default export is either. The
76
+ * loader itself is the key, so share one function between callers. It is ember-primitives'
77
+ * `createAsyncService`, except that each owner (each test) gets its own instance.
78
+ *
79
+ * @param context anything with an owner, or the owner itself
80
+ * @param loader resolves with the class, or its module
81
+ */
82
+ export declare function asyncService<T extends object>(context: object, loader: AsyncServiceLoader<T>): AsyncServiceState<T>;
83
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAE9C,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,6BAA6B,CAAA;AAI1E;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,KAAK,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;AAEvF,qGAAqG;AACrG,MAAM,MAAM,WAAW,GAAG,MAAM,QAAQ,GAAG,MAAM,CAAA;AA4BjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,IAAI,SAAS,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;AACtF,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAC9E,wBAAgB,OAAO,CAAC,IAAI,SAAS,WAAW,EAC9C,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,IAAI,GACT,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;AAC1B,wBAAgB,OAAO,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AA4D/F,2FAA2F;AAC3F,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAC7C,iBAAiB,CAAC,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAA;CAAE,CAAA;AAE1D,4FAA4F;AAC5F,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI,MAAM,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAA;AAEvF;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,CAAA;AAa9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,EAC3C,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAC5B,iBAAiB,CAAC,CAAC,CAAC,CAYtB"}
@@ -0,0 +1,63 @@
1
+ import Component from '@glimmer/component';
2
+ import type Owner from '@ember/owner';
3
+ export interface ShadowedSignature {
4
+ Args: {
5
+ /**
6
+ * Bring the page's style sheets in: a copy of each `<style>` and `<link rel="stylesheet">`
7
+ * in the document's `<head>`, and its adopted style sheets. Default `false`: the content
8
+ * starts from the browser's own styles, untouched by the app's.
9
+ */
10
+ includeStyles?: boolean;
11
+ /** Its name, for its harness (`data-test-jn-name`). */
12
+ name?: string;
13
+ };
14
+ Blocks: {
15
+ /** The content to render in the shadow root. */
16
+ default: [];
17
+ };
18
+ /**
19
+ * The outer `<div>`, which has the attributes. The shadow root's host is the `<div>` inside
20
+ * it, and the content is in a `<div>` in the shadow root.
21
+ */
22
+ Element: HTMLDivElement;
23
+ }
24
+ /**
25
+ * Renders its content in a shadow root, as ember-primitives' `Shadowed`, so the app's styles
26
+ * don't reach it: for content that must look as it would on a page of its own, such as an
27
+ * email preview or a third-party widget. The content is still the component's (its state,
28
+ * actions and destruction); only the styles stop at the shadow boundary.
29
+ *
30
+ * <Shadowed>
31
+ * <p class="card">Not styled by the app's .card</p>
32
+ * </Shadowed>
33
+ *
34
+ * The shadow root is open, so a test can reach it (`ShadowedHarness`). Ember can't render
35
+ * straight into a shadow root on every version Joinery supports, so, as in ember-primitives,
36
+ * the host is a `<div>` inside the outer one, and the content renders in a `<div>` inside the
37
+ * shadow root. Harnesses don't look into shadow roots: drive what's inside through
38
+ * `ShadowedHarness`.
39
+ */
40
+ export declare class Shadowed extends Component<ShadowedSignature> {
41
+ /** The shadow root's host, rendered in the outer `<div>`. */
42
+ readonly host: HTMLDivElement;
43
+ /** The shadow root. */
44
+ readonly shadowRoot: ShadowRoot;
45
+ /** Where the content renders, inside the shadow root. */
46
+ readonly target: HTMLDivElement;
47
+ constructor(owner: Owner, args: ShadowedSignature['Args']);
48
+ /** A copy of each style sheet in the document's `<head>`, in order. */
49
+ copyStyles: () => Node[];
50
+ /**
51
+ * With `@includeStyles`, the document's adopted style sheets too, ahead of the root's own.
52
+ * When `@includeStyles` turns off, or the component goes, it takes out the ones it added
53
+ * (and leaves the root's own, such as a layout primitive's rules, where they are).
54
+ */
55
+ adoptSheets: import("ember-modifier").FunctionBasedModifier<{
56
+ Args: {
57
+ Positional: [boolean | undefined];
58
+ Named: import("ember-modifier/-private/signature").EmptyObject;
59
+ };
60
+ Element: HTMLElement;
61
+ }>;
62
+ }
63
+ //# sourceMappingURL=shadowed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shadowed.d.ts","sourceRoot":"","sources":["../src/shadowed.gts"],"names":[],"mappings":"AAyGA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAGrC,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE;QACJ;;;;WAIG;QACH,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB,uDAAuD;QACvD,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,MAAM,EAAE;QACN,gDAAgD;QAChD,OAAO,EAAE,EAAE,CAAA;KACZ,CAAA;IACD;;;OAGG;IACH,OAAO,EAAE,cAAc,CAAA;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACxD,6DAA6D;IAC7D,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,uBAAuB;IACvB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;gBAEnB,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAQzD,uEAAuE;IACvE,UAAU,QAAO,IAAI,EAAE,CAKtB;IAED;;;;OAIG;IACH,WAAW;;;;;;OAgBT;CAwCH"}
@@ -0,0 +1,283 @@
1
+ import Component from '@glimmer/component';
2
+ import type { TOC } from '@ember/component/template-only';
3
+ import type { WithBoundArgs } from '@glint/template';
4
+ import { type TagName } from './as';
5
+ import { ControllableState } from './controllable-state.ts';
6
+ import { type Direction } from './direction';
7
+ /** Which way a slider runs: left to right (right to left in RTL text), or bottom to top. */
8
+ export type SliderOrientation = 'horizontal' | 'vertical';
9
+ /**
10
+ * A slider's value: an array, one number per thumb (`[25, 75]` is a range), as Radix's, or a
11
+ * number for one thumb, as ember-primitives' also takes. `@onValueChange` hears the same shape.
12
+ */
13
+ export type SliderValue = number | number[];
14
+ /** Names a thumb (its `aria-label`), given its index and how many thumbs there are. */
15
+ export type SliderThumbLabel = (index: number, count: number) => string | undefined;
16
+ /** Where a value sits between `min` and `max`, from 0 to 100. */
17
+ export declare function sliderPercent(value: number, min: number, max: number): number;
18
+ /**
19
+ * A thumb's default name: `Value` for a slider's only thumb (as ember-primitives'), `Minimum` and
20
+ * `Maximum` for a range, and `Value 2 of 3` past two (as Radix's), in the language of `context`'s
21
+ * translator (English without one). Pass `@getThumbLabel` for other words.
22
+ */
23
+ export declare function defaultSliderThumbLabel(index: number, count: number, context?: object): string;
24
+ /** What a slider reads from its arguments. */
25
+ export interface SliderArgs {
26
+ value?: SliderValue;
27
+ defaultValue?: SliderValue;
28
+ onValueChange?: (value: never) => void;
29
+ onValueCommit?: (value: never) => void;
30
+ min?: number;
31
+ max?: number;
32
+ step?: number | number[];
33
+ minStepsBetweenThumbs?: number;
34
+ orientation?: SliderOrientation;
35
+ disabled?: boolean;
36
+ inverted?: boolean;
37
+ dir?: Direction;
38
+ getThumbLabel?: SliderThumbLabel;
39
+ }
40
+ /** One thumb, as a slider yields it in `thumbs`: stable across changes, so `#each` keeps its DOM. */
41
+ export interface SliderThumbState {
42
+ /** Which value it moves. */
43
+ readonly index: number;
44
+ /** Its value. */
45
+ readonly value: number;
46
+ /** Where it sits along the track, from 0 to 100. */
47
+ readonly percent: number;
48
+ }
49
+ /**
50
+ * Which edge a part is placed from: the start of the line (`inset-inline-start`, so right to
51
+ * left flips it with no script), its end when inverted, or the bottom (top when inverted).
52
+ */
53
+ type Edge = 'inset-inline-start' | 'inset-inline-end' | 'bottom' | 'top';
54
+ /**
55
+ * A slider's state and behaviour, shared by its parts: Radix's slider, kept in Radix's terms.
56
+ * With a `@step` array, it works on the ticks' indexes (`internal` values), evenly spaced, as
57
+ * ember-primitives' does, and reports the ticks themselves.
58
+ */
59
+ export declare class SliderStore {
60
+ #private;
61
+ readonly state: ControllableState<SliderValue>;
62
+ constructor(args: () => SliderArgs);
63
+ /** The step array's values, sorted, or `null` when `@step` is a number. */
64
+ get tickValues(): number[] | null;
65
+ /** The lowest value: `@min` (default 0), or the first tick. */
66
+ get min(): number;
67
+ /** The highest value: `@max` (default 100), or the last tick. */
68
+ get max(): number;
69
+ /** The step: `@step` (default 1); with ticks, 1 (from one tick to the next). */
70
+ get step(): number;
71
+ get orientation(): SliderOrientation;
72
+ get isDisabled(): boolean;
73
+ get isInverted(): boolean;
74
+ get internalMin(): number;
75
+ get internalMax(): number;
76
+ get internalStep(): number;
77
+ /** The values, one per thumb, as the caller sees them. */
78
+ get values(): number[];
79
+ /** The values on the internal scale: the nearest tick's index, with ticks. */
80
+ get internalValues(): number[];
81
+ /** Each thumb's state, one per value, the same objects every time. */
82
+ get thumbs(): SliderThumbState[];
83
+ /** The value at a thumb, or `undefined` past the last. */
84
+ valueAt: (index: number) => number | undefined;
85
+ /** Where a thumb sits along the track, from 0 to 100. */
86
+ percentAt: (index: number) => number;
87
+ /** A thumb's `aria-label`; the default's words are `context`'s translator's. */
88
+ labelAt: (index: number, context?: object) => string | undefined;
89
+ /** Where the range starts and ends along the track, from 0 to 100. */
90
+ get rangeOffsets(): {
91
+ start: number;
92
+ end: number;
93
+ };
94
+ /** The edge the values start from, and the one they end at. */
95
+ get edges(): {
96
+ start: Edge;
97
+ end: Edge;
98
+ };
99
+ /**
100
+ * Moves the thumb at `index` to `value` (internal), as Radix's `updateValues`: snapped to the
101
+ * step, kept within bounds and `@minStepsBetweenThumbs` apart, and sorted, so a thumb dragged
102
+ * past another swaps with it. Focus follows the value it moved.
103
+ */
104
+ update(value: number, index: number, { commit }?: {
105
+ commit?: boolean | undefined;
106
+ }): void;
107
+ /** @internal Keeps each thumb's element, to focus it. */
108
+ thumbElement: import("ember-modifier").FunctionBasedModifier<{
109
+ Args: {
110
+ Positional: [number];
111
+ Named: import("ember-modifier/-private/signature").EmptyObject;
112
+ };
113
+ Element: HTMLElement;
114
+ }>;
115
+ /** @internal A thumb took focus: the keys move it now. */
116
+ focusThumb: (index: number) => void;
117
+ /** @internal */
118
+ onPointerDown: (event: PointerEvent) => void;
119
+ /** @internal */
120
+ onPointerMove: (event: PointerEvent) => void;
121
+ /** @internal */
122
+ onPointerUp: (event: PointerEvent) => void;
123
+ /** @internal Home, End, the arrows and Page Up and Down, as Radix's slider takes them. */
124
+ onKeyDown: (event: KeyboardEvent) => void;
125
+ }
126
+ export interface SliderTrackSignature {
127
+ Args: {
128
+ /** The tag to render. Default `span`. */
129
+ as?: TagName;
130
+ /** @internal Bound by the slider. */
131
+ store: SliderStore;
132
+ };
133
+ /** The range, usually. */
134
+ Blocks: {
135
+ default: [];
136
+ };
137
+ Element: HTMLElement;
138
+ }
139
+ /** The rail the thumbs move along: Radix's `Slider.Track`. */
140
+ export declare const SliderTrack: TOC<SliderTrackSignature>;
141
+ export interface SliderRangeSignature {
142
+ Args: {
143
+ /** The tag to render. Default `span`. */
144
+ as?: TagName;
145
+ /** @internal Bound by the slider. */
146
+ store: SliderStore;
147
+ };
148
+ Element: HTMLElement;
149
+ }
150
+ /**
151
+ * The filled part of the track: Radix's `Slider.Range`, from the start to the thumb, or
152
+ * between the outermost thumbs. It places itself (position it `absolute` in your CSS).
153
+ */
154
+ export declare const SliderRange: TOC<SliderRangeSignature>;
155
+ export interface SliderThumbSignature {
156
+ Args: {
157
+ /** Which value it moves, from 0. Default 0. Render one for each of `s.thumbs`. */
158
+ index?: number;
159
+ /** The tag to render. Default `span`. */
160
+ as?: TagName;
161
+ /** Its form field name, when the slider's `@fieldName` isn't the one. */
162
+ fieldName?: string;
163
+ /** @internal Bound by the slider. */
164
+ store: SliderStore;
165
+ /** @internal Bound by the slider. */
166
+ sliderFieldName?: string;
167
+ /** @internal Bound by the slider. */
168
+ form?: string;
169
+ };
170
+ /** What the thumb shows inside it, if anything: a tooltip with its value, say. */
171
+ Blocks: {
172
+ default: [];
173
+ };
174
+ /** The `role="slider"` element: it takes the focus, the keys and the ARIA. */
175
+ Element: HTMLElement;
176
+ }
177
+ /**
178
+ * A thumb: Radix's `Slider.Thumb`, a `role="slider"` element in the tab order with the value in
179
+ * ARIA, inside a span that places it. With a field name, a hidden input beside it puts the value
180
+ * in its form.
181
+ */
182
+ export declare class SliderThumb extends Component<SliderThumbSignature> {
183
+ get index(): number;
184
+ get value(): number | undefined;
185
+ get fieldName(): string | undefined;
186
+ onFocus: () => void;
187
+ }
188
+ /** What `<Slider>` yields. */
189
+ export interface SliderYield {
190
+ /** The rail: `<s.Track><s.Range /></s.Track>`. */
191
+ Track: WithBoundArgs<typeof SliderTrack, 'store'>;
192
+ /** The filled part of the track. */
193
+ Range: WithBoundArgs<typeof SliderRange, 'store'>;
194
+ /** A thumb: `<s.Thumb @index={{thumb.index}} />` for each of `thumbs`. */
195
+ Thumb: WithBoundArgs<typeof SliderThumb, 'store' | 'sliderFieldName' | 'form'>;
196
+ /** One per value, the same objects as they change, for `{{#each s.thumbs as |thumb|}}`. */
197
+ thumbs: SliderThumbState[];
198
+ /** The values, as numbers, one per thumb. */
199
+ values: number[];
200
+ /** The step array's values, sorted, or `null` when `@step` is a number. */
201
+ tickValues: number[] | null;
202
+ /** The lowest value. */
203
+ min: number;
204
+ /** The highest value. */
205
+ max: number;
206
+ /** The step (1 with ticks: one tick to the next). */
207
+ step: number;
208
+ orientation: SliderOrientation;
209
+ isDisabled: boolean;
210
+ }
211
+ export interface SliderSignature<T extends SliderValue = number[]> {
212
+ Args: {
213
+ /** The controlled value: one number per thumb (`[25, 75]`), or a number for one thumb. */
214
+ value?: T;
215
+ /** The first value, when uncontrolled. Default `[min]`. */
216
+ defaultValue?: T;
217
+ /** Called with each new value, in the shape it was given, as it slides and steps. */
218
+ onValueChange?: (value: T) => void;
219
+ /** Called with the value when a slide ends, or a key has moved it. */
220
+ onValueCommit?: (value: T) => void;
221
+ /** The lowest value. Default 0. */
222
+ min?: number;
223
+ /** The highest value. Default 100. */
224
+ max?: number;
225
+ /**
226
+ * How far each step moves. Default 1. An array of values makes the slider snap to them
227
+ * (ticks, as ember-primitives' `@step` array), evenly spaced along the track.
228
+ */
229
+ step?: number | number[];
230
+ /** The fewest steps thumbs keep between them. Default 0: they can meet, and pass. */
231
+ minStepsBetweenThumbs?: number;
232
+ /** Default `horizontal`. */
233
+ orientation?: SliderOrientation;
234
+ /** Whether it can't be moved. */
235
+ disabled?: boolean;
236
+ /** Run the values the other way: from the end of the line, or from the top. */
237
+ inverted?: boolean;
238
+ /** The text direction; by default the document's, from the nearest `dir`. */
239
+ dir?: Direction;
240
+ /**
241
+ * Names each thumb (its `aria-label`). Default `defaultSliderThumbLabel`: `Value`, or
242
+ * `Minimum` and `Maximum`, or `Value 2 of 3`.
243
+ */
244
+ getThumbLabel?: SliderThumbLabel;
245
+ /**
246
+ * The form field each thumb's value submits as (Radix's `name`; `name[]` for several
247
+ * thumbs). Without it, nothing is submitted.
248
+ */
249
+ fieldName?: string;
250
+ /** The `id` of the form the values belong to, when the slider isn't inside it. */
251
+ form?: string;
252
+ /** The tag to render. Default `span`. */
253
+ as?: TagName;
254
+ /** Its name, for `SliderHarness` (`data-test-jn-name`). */
255
+ name?: string;
256
+ };
257
+ Blocks: {
258
+ default: [SliderYield];
259
+ };
260
+ Element: HTMLElement;
261
+ }
262
+ /**
263
+ * A control for choosing a value, or a range, from within bounds: Radix's `Slider`, headless,
264
+ * which also covers ember-primitives' (range and multiple thumbs, discrete values, vertical).
265
+ * It yields its parts, which you render and style:
266
+ *
267
+ * <Slider @defaultValue={{array 25 75}} @step={{5}} as |s|>
268
+ * <s.Track><s.Range /></s.Track>
269
+ * {{#each s.thumbs as |thumb|}}
270
+ * <s.Thumb @index={{thumb.index}} />
271
+ * {{/each}}
272
+ * </Slider>
273
+ *
274
+ * Each thumb is a `role="slider"` element in the tab order: the arrows step it, Shift with an
275
+ * arrow and Page Up and Down step ten times as far, and Home and End go to the bounds. Pressing
276
+ * the track moves the nearest thumb there, and dragging slides it. The range and the thumbs
277
+ * place themselves with logical edges, so right to left flips them, and the keys follow.
278
+ */
279
+ export declare class Slider<T extends SliderValue = number[]> extends Component<SliderSignature<T>> {
280
+ store: SliderStore;
281
+ }
282
+ export default Slider;
283
+ //# sourceMappingURL=slider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../src/slider.gts"],"names":[],"mappings":"AAs0BA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,OAAO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EAA6E;QAC7E,GAAG,CAAC,EAAE,SAAS,CAAA;QACf;;;WAGG;QACH,aAAa,CAAC,EAAE,gBAAgB,CAAA;QAChC;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,kFAAkF;QAClF,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,yCAAyC;QACzC,EAAE,CAAC,EAAE,OAAO,CAAA;QACZ,2DAA2D;QAC3D,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,MAAM,EAAE;QAAE,OAAO,EAAE,CAAC,WAAW,CAAC,CAAA;KAAE,CAAA;IAClC,OAAO,EAAE,WAAW,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,MAAM,CAAC,CAAC,SAAS,WAAW,GAAG,MAAM,EAAE,CAAE,SAAQ,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IACzF,KAAK,cAAiD;CAkDvD;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,43 @@
1
+ import type { TOC } from '@ember/component/template-only';
2
+ export interface StickyFooterSignature {
3
+ Args: {
4
+ /** Its name, for its harness (`data-test-jn-name`). */
5
+ name?: string;
6
+ };
7
+ Blocks: {
8
+ /**
9
+ * The content, which scrolls, in a `<div>` of its own (`data-jn-sticky-footer-content`).
10
+ * On a page's main layout, a `<main>` belongs in here.
11
+ */
12
+ content: [];
13
+ /**
14
+ * The footer, in a `<div>` of its own (`data-jn-sticky-footer-footer`): at the bottom
15
+ * of the wrapper while the content is short, and below the content once it overflows. A
16
+ * `<footer>` belongs in here.
17
+ */
18
+ footer: [];
19
+ };
20
+ /**
21
+ * The wrapper, which scrolls. Its parent needs a height or a max-height for it to fill
22
+ * (`height: 100%`).
23
+ */
24
+ Element: HTMLDivElement;
25
+ }
26
+ /**
27
+ * A footer that sits at the bottom of the window while there is less than a window of content,
28
+ * and below the content, scrolled to like the rest, once there is more, as ember-primitives'
29
+ * `StickyFooter`. It is CSS only: a scrolling wrapper, and inside it a grid at least as tall,
30
+ * whose first row (the content) takes the space the footer doesn't.
31
+ *
32
+ * <StickyFooter>
33
+ * <:content><main>…</main></:content>
34
+ * <:footer><footer>…</footer></:footer>
35
+ * </StickyFooter>
36
+ *
37
+ * Each element has an attribute to style it by: `data-jn-sticky-footer` (the wrapper, which has
38
+ * the attributes), `data-jn-sticky-footer-container`, `-content` and `-footer`.
39
+ * It adds no landmarks. It wraps content, so it is a wrapper for the harnesses
40
+ * (`data-test-jn-wrapper`).
41
+ */
42
+ export declare const StickyFooter: TOC<StickyFooterSignature>;
43
+ //# sourceMappingURL=sticky-footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sticky-footer.d.ts","sourceRoot":"","sources":["../src/sticky-footer.gts"],"names":[],"mappings":"AA8EA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AAsBzD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,uDAAuD;QACvD,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,MAAM,EAAE;QACN;;;WAGG;QACH,OAAO,EAAE,EAAE,CAAA;QACX;;;;WAIG;QACH,MAAM,EAAE,EAAE,CAAA;KACX,CAAA;IACD;;;OAGG;IACH,OAAO,EAAE,cAAc,CAAA;CACxB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,YAAY,EAAE,GAAG,CAAC,qBAAqB,CA+ClD,CAAA"}
@@ -0,0 +1,47 @@
1
+ import type Owner from '@ember/owner';
2
+ import { type InstanceDefinition } from './-private/instances.ts';
3
+ /**
4
+ * What `createStore` makes one of per context: a class, constructed with the context's owner
5
+ * (if it has one), or a function that returns the instance. The definition itself is the key, so share one
6
+ * definition: two arrow functions that do the same thing are two keys.
7
+ */
8
+ export type StoreDefinition<T extends object> = InstanceDefinition<T>;
9
+ /**
10
+ * Whether `value` is an owner. Only `lookup()` is required: the owner's other methods are
11
+ * Ember's business, and any object with `lookup` can stand in for one.
12
+ */
13
+ export declare function isOwner(value: unknown): value is Owner;
14
+ /**
15
+ * The owner of `context`: the context itself when it is an owner, else its `getOwner()`, else
16
+ * an `owner` property (a test's `this.owner`). `undefined` when there is none.
17
+ */
18
+ export declare function findOwner(context: unknown): Owner | undefined;
19
+ /**
20
+ * One instance of a class per context, made the first time it is asked for and destroyed with
21
+ * the context. Ask from a component, and each instance of the component gets its own; ask
22
+ * from the owner, and the whole app shares one (that is `service`). Repeat calls return the
23
+ * same instance, so a getter reads like a `@cached` one:
24
+ *
25
+ * class Draft { @tracked text = '' }
26
+ *
27
+ * class Editor extends Component {
28
+ * get draft() {
29
+ * return createStore(this, Draft) // one Draft per Editor
30
+ * }
31
+ * }
32
+ *
33
+ * The class is constructed with the context's owner, and the instance gets that owner, so
34
+ * `@service` injections work in it (after its constructor). For cleanup,
35
+ * `registerDestructor(this, …)` in the constructor runs when the context is destroyed. A
36
+ * function in place of the class is called once per context, to construct the instance
37
+ * yourself: `createStore(this, () => new Draft('Untitled'))`.
38
+ *
39
+ * Any object can be a context. One with no owner (a plain class of your own) gets an instance
40
+ * all the same, constructed with nothing and given no owner, so it can't inject services.
41
+ * It is ember-primitives' `createStore`.
42
+ *
43
+ * @param context what the instance belongs to: any object, or the owner itself
44
+ * @param definition the class, or a function returning the instance
45
+ */
46
+ export declare function createStore<T extends object>(context: object, definition: StoreDefinition<T>): T;
47
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../src/store.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAe,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAG9E;;;;GAIG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,IAAI,kBAAkB,CAAC,CAAC,CAAC,CAAA;AAErE;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAEtD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,KAAK,GAAG,SAAS,CAO7D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAOhG"}
@@ -0,0 +1,76 @@
1
+ import Component from '@glimmer/component';
2
+ import type { TOC } from '@ember/component/template-only';
3
+ import type { WithBoundArgs } from '@glint/template';
4
+ import { type TagName } from './as';
5
+ import { FormControl } from './-private/form-control.ts';
6
+ export interface SwitchThumbSignature {
7
+ Args: {
8
+ /** The tag to render. Default `span`. */
9
+ as?: TagName;
10
+ /** @internal Bound by the switch. */
11
+ checked: boolean;
12
+ /** @internal Bound by the switch. */
13
+ disabled?: boolean;
14
+ };
15
+ /** What the thumb shows, if anything: an icon, say. */
16
+ Blocks: {
17
+ default: [];
18
+ };
19
+ Element: HTMLElement;
20
+ }
21
+ /** The part of a switch that slides: Radix's `Switch.Thumb`, with the switch's `data-state`. */
22
+ declare const SwitchThumb: TOC<SwitchThumbSignature>;
23
+ export interface SwitchSignature {
24
+ Args: {
25
+ /** The controlled state. */
26
+ checked?: boolean;
27
+ /** The first state, when uncontrolled. Default `false`. */
28
+ defaultChecked?: boolean;
29
+ /** Called with each new state the user asks for. */
30
+ onCheckedChange?: (checked: boolean) => void;
31
+ /** Whether it can't be changed. */
32
+ disabled?: boolean;
33
+ /** Whether a form needs it on to submit. */
34
+ required?: boolean;
35
+ /** The tag to render. Default `button`. */
36
+ as?: TagName;
37
+ /** Its name, for `SwitchHarness` (`data-test-jn-name`). Its form field name is `name`. */
38
+ name?: string;
39
+ };
40
+ Blocks: {
41
+ default: [
42
+ control: {
43
+ /** The part that slides: `<s.Thumb />`, with anything it should show inside it. */
44
+ Thumb: WithBoundArgs<typeof SwitchThumb, 'checked' | 'disabled'>;
45
+ /** Whether it is on. */
46
+ isChecked: boolean;
47
+ }
48
+ ];
49
+ };
50
+ /** A `<button role="switch">`, or the tag `@as` names. */
51
+ Element: HTMLButtonElement;
52
+ }
53
+ /**
54
+ * A control that turns something on and off: Radix's `Switch`, headless, which also covers
55
+ * ember-primitives' `Switch`. It is a `<button role="switch">` with `aria-checked` and
56
+ * `data-state`, which a click, Space or Enter toggles, and it yields its thumb, which you
57
+ * render and style (or fill) yourself. Its state is controlled or not, as in Radix:
58
+ *
59
+ * <Switch @checked={{this.airplane}} @onCheckedChange={{this.setAirplane}} id="airplane" as |s|>
60
+ * <s.Thumb />
61
+ * </Switch>
62
+ * <label for="airplane">Airplane Mode</label>
63
+ *
64
+ * In a form, it renders a hidden native checkbox beside it, as Radix's does (and as
65
+ * ember-primitives' switch is one), which repeats the `name`, `value` (default `on`) and `form`
66
+ * you give the switch, so the form submits it and checks `@required`.
67
+ */
68
+ export declare class Switch extends Component<SwitchSignature> {
69
+ checked: import("./controllable-state.ts").ControllableState<NonNullable<boolean | undefined>>;
70
+ form: FormControl;
71
+ get isChecked(): boolean;
72
+ /** Toggles it, unless a listener of the caller's called `preventDefault()` first. */
73
+ toggle: (event: MouseEvent) => void;
74
+ }
75
+ export default Switch;
76
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../src/switch.gts"],"names":[],"mappings":"AAyIA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAM,KAAK,OAAO,EAAE,MAAM,UAAU,CAAA;AAE3C,OAAO,EAAe,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAErE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,yCAAy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