@lilydesignsystem/alpine-headless 0.0.0-stage → 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 (639) hide show
  1. package/LICENSE.md +64 -0
  2. package/README.md +52 -2
  3. package/components/accordion-checkbox.html +37 -0
  4. package/components/accordion-link.html +18 -0
  5. package/components/accordion-list-item.html +19 -0
  6. package/components/accordion-list.html +17 -0
  7. package/components/accordion-nav.html +47 -0
  8. package/components/action-bar-button.html +18 -0
  9. package/components/action-bar.html +28 -0
  10. package/components/action-group.html +55 -0
  11. package/components/action-link.html +18 -0
  12. package/components/address-input.html +18 -0
  13. package/components/addressograph-box.html +18 -0
  14. package/components/affix.html +18 -0
  15. package/components/age-view.html +16 -0
  16. package/components/ai-label.html +18 -0
  17. package/components/alba-community-health-index-input.html +18 -0
  18. package/components/alba-community-health-index-view.html +14 -0
  19. package/components/alert-dialog.html +33 -0
  20. package/components/alert.html +21 -0
  21. package/components/allergy-record-list-item.html +38 -0
  22. package/components/allergy-record-list.html +38 -0
  23. package/components/angle-slider-range-input.html +19 -0
  24. package/components/announcement-banner.html +18 -0
  25. package/components/answer.html +18 -0
  26. package/components/aotearoa-national-health-index-input.html +18 -0
  27. package/components/aotearoa-national-health-index-view.html +14 -0
  28. package/components/area-chart.html +47 -0
  29. package/components/argentina-codigo-unico-de-identificacion-laboral-input.html +18 -0
  30. package/components/argentina-codigo-unico-de-identificacion-laboral-view.html +14 -0
  31. package/components/article-layout.html +17 -0
  32. package/components/as-saudiyah-raqm-al-huwiyah-al-wataniyah-input.html +18 -0
  33. package/components/as-saudiyah-raqm-al-huwiyah-al-wataniyah-view.html +14 -0
  34. package/components/aspect-ratio-container.html +14 -0
  35. package/components/australia-individual-healthcare-identifier-input.html +18 -0
  36. package/components/australia-individual-healthcare-identifier-view.html +14 -0
  37. package/components/australia-tax-file-number-input.html +18 -0
  38. package/components/australia-tax-file-number-view.html +14 -0
  39. package/components/autosuggest.html +32 -0
  40. package/components/avatar-group.html +18 -0
  41. package/components/avatar-image.html +17 -0
  42. package/components/avatar-text.html +17 -0
  43. package/components/avatar.html +18 -0
  44. package/components/back-link.html +18 -0
  45. package/components/badge.html +19 -0
  46. package/components/banner-box.html +18 -0
  47. package/components/banner.html +19 -0
  48. package/components/bar-chart.html +47 -0
  49. package/components/barcode-image.html +16 -0
  50. package/components/beach-ball.html +21 -0
  51. package/components/belgique-numero-de-registre-national-input.html +18 -0
  52. package/components/belgique-numero-de-registre-national-view.html +14 -0
  53. package/components/bharat-aadhaar-input.html +18 -0
  54. package/components/bharat-aadhaar-view.html +12 -0
  55. package/components/blockquote.html +21 -0
  56. package/components/body-map.html +60 -0
  57. package/components/body-text.html +14 -0
  58. package/components/brasil-cartao-nacional-de-saude-input.html +18 -0
  59. package/components/brasil-cartao-nacional-de-saude-view.html +14 -0
  60. package/components/breadcrumb-link.html +18 -0
  61. package/components/breadcrumb-list-item.html +19 -0
  62. package/components/breadcrumb-list.html +17 -0
  63. package/components/breadcrumb-nav.html +17 -0
  64. package/components/bulgaria-edinen-grazhdanski-nomer-input.html +18 -0
  65. package/components/bulgaria-edinen-grazhdanski-nomer-view.html +14 -0
  66. package/components/button-group.html +18 -0
  67. package/components/button-input.html +16 -0
  68. package/components/button.html +17 -0
  69. package/components/byline.html +19 -0
  70. package/components/calendar-day-table.html +30 -0
  71. package/components/calendar-month-table.html +30 -0
  72. package/components/calendar-range-picker.html +18 -0
  73. package/components/calendar-table-body.html +19 -0
  74. package/components/calendar-table-foot.html +19 -0
  75. package/components/calendar-table-head.html +19 -0
  76. package/components/calendar-table-row.html +19 -0
  77. package/components/calendar-table-td.html +22 -0
  78. package/components/calendar-table-th.html +23 -0
  79. package/components/calendar-table.html +19 -0
  80. package/components/calendar-week-table.html +30 -0
  81. package/components/calendar-year-table.html +30 -0
  82. package/components/call-to-action.html +17 -0
  83. package/components/canada-social-insurance-number-input.html +18 -0
  84. package/components/canada-social-insurance-number-view.html +14 -0
  85. package/components/candlestick-chart.html +47 -0
  86. package/components/caption.html +16 -0
  87. package/components/card.html +18 -0
  88. package/components/care-card.html +19 -0
  89. package/components/carousel.html +54 -0
  90. package/components/cascader.html +89 -0
  91. package/components/cesko-cestovni-pas-input.html +18 -0
  92. package/components/cesko-cestovni-pas-view.html +12 -0
  93. package/components/cesko-rodne-cislo-input.html +18 -0
  94. package/components/cesko-rodne-cislo-view.html +14 -0
  95. package/components/character-counter.html +30 -0
  96. package/components/character.html +18 -0
  97. package/components/chat-composer.html +44 -0
  98. package/components/chat-list-item.html +17 -0
  99. package/components/chat-list.html +17 -0
  100. package/components/chat-message.html +17 -0
  101. package/components/chat-nav.html +17 -0
  102. package/components/check-list-item.html +19 -0
  103. package/components/check-list.html +18 -0
  104. package/components/checkbox-group.html +18 -0
  105. package/components/checkbox-input.html +16 -0
  106. package/components/chile-rol-unico-nacional-input.html +18 -0
  107. package/components/chile-rol-unico-nacional-view.html +14 -0
  108. package/components/choropleth-chart.html +47 -0
  109. package/components/citation.html +14 -0
  110. package/components/clamp-text.html +20 -0
  111. package/components/clipboard-copy-button.html +19 -0
  112. package/components/coachmark.html +40 -0
  113. package/components/code-block.html +18 -0
  114. package/components/code.html +14 -0
  115. package/components/collapsible.html +19 -0
  116. package/components/collection-list-item.html +31 -0
  117. package/components/collection-list.html +17 -0
  118. package/components/colombia-cedula-de-ciudadania-input.html +18 -0
  119. package/components/colombia-cedula-de-ciudadania-view.html +14 -0
  120. package/components/color-input.html +16 -0
  121. package/components/color-picker-button.html +19 -0
  122. package/components/color-picker.html +19 -0
  123. package/components/column-chart.html +47 -0
  124. package/components/combobox.html +49 -0
  125. package/components/command.html +51 -0
  126. package/components/comment.html +18 -0
  127. package/components/composed-chart.html +47 -0
  128. package/components/container-with-fixed-width.html +18 -0
  129. package/components/container-with-fluid-width.html +18 -0
  130. package/components/container.html +14 -0
  131. package/components/content-block.html +17 -0
  132. package/components/contents-link.html +29 -0
  133. package/components/contents-list-item.html +19 -0
  134. package/components/contents-list.html +17 -0
  135. package/components/contents-nav.html +17 -0
  136. package/components/context-menu-item.html +19 -0
  137. package/components/context-menu.html +41 -0
  138. package/components/contextual-help.html +43 -0
  139. package/components/convert-div.html +18 -0
  140. package/components/convert-from-div.html +14 -0
  141. package/components/convert-from-unit-div.html +14 -0
  142. package/components/convert-from-value-div.html +14 -0
  143. package/components/convert-into-div.html +14 -0
  144. package/components/convert-into-unit-div.html +14 -0
  145. package/components/convert-into-value-div.html +14 -0
  146. package/components/currency-input.html +18 -0
  147. package/components/cymru-rhif-y-gwasanaeth-iechyd-gwladol-input.html +18 -0
  148. package/components/cymru-rhif-y-gwasanaeth-iechyd-gwladol-view.html +14 -0
  149. package/components/danmark-personnummer-input.html +18 -0
  150. package/components/danmark-personnummer-view.html +14 -0
  151. package/components/data-filter-form.html +26 -0
  152. package/components/data-table-body.html +19 -0
  153. package/components/data-table-foot.html +19 -0
  154. package/components/data-table-head.html +19 -0
  155. package/components/data-table-row.html +19 -0
  156. package/components/data-table-td.html +22 -0
  157. package/components/data-table-th.html +23 -0
  158. package/components/data-table.html +19 -0
  159. package/components/date-field.html +38 -0
  160. package/components/date-input.html +16 -0
  161. package/components/date-range.html +26 -0
  162. package/components/date-time-local-input.html +16 -0
  163. package/components/date-time-now-input.html +37 -0
  164. package/components/date-time-view.html +18 -0
  165. package/components/decision-support-card.html +52 -0
  166. package/components/description-list-item.html +14 -0
  167. package/components/description-list.html +17 -0
  168. package/components/details.html +15 -0
  169. package/components/deutschland-krankenversichertennummer-input.html +18 -0
  170. package/components/deutschland-krankenversichertennummer-view.html +14 -0
  171. package/components/device-record-list-item.html +29 -0
  172. package/components/device-record-list.html +29 -0
  173. package/components/dial-group.html +18 -0
  174. package/components/dial.html +19 -0
  175. package/components/dialog.html +32 -0
  176. package/components/diff.html +18 -0
  177. package/components/digital-object-identifier-link.html +18 -0
  178. package/components/do-list-item.html +20 -0
  179. package/components/do-list.html +18 -0
  180. package/components/document-list-item.html +14 -0
  181. package/components/document-list.html +17 -0
  182. package/components/dont-list-item.html +20 -0
  183. package/components/dont-list.html +18 -0
  184. package/components/download-button.html +21 -0
  185. package/components/draft.html +19 -0
  186. package/components/drawer.html +36 -0
  187. package/components/dropdown-menu.html +56 -0
  188. package/components/early-warning-score-view.html +19 -0
  189. package/components/ecuador-cedula-de-identidad-input.html +18 -0
  190. package/components/ecuador-cedula-de-identidad-view.html +14 -0
  191. package/components/editable-form.html +31 -0
  192. package/components/editable.html +25 -0
  193. package/components/eesti-isikukood-input.html +18 -0
  194. package/components/eesti-isikukood-view.html +14 -0
  195. package/components/eire-individual-health-identifier-input.html +20 -0
  196. package/components/eire-individual-health-identifier-view.html +14 -0
  197. package/components/ellada-dematerialised-securities-system-input.html +18 -0
  198. package/components/ellada-dematerialised-securities-system-view.html +14 -0
  199. package/components/email-input.html +16 -0
  200. package/components/email-link.html +18 -0
  201. package/components/emoji-character-picker.html +18 -0
  202. package/components/emoji.html +18 -0
  203. package/components/empty-state.html +20 -0
  204. package/components/end-notes.html +17 -0
  205. package/components/england-national-health-service-number-input.html +18 -0
  206. package/components/england-national-health-service-number-view.html +14 -0
  207. package/components/error-message.html +18 -0
  208. package/components/error-summary.html +20 -0
  209. package/components/espana-codigo-de-identificacion-fiscal-input.html +18 -0
  210. package/components/espana-codigo-de-identificacion-fiscal-view.html +14 -0
  211. package/components/espana-tarjeta-sanitaria-individual-input.html +18 -0
  212. package/components/espana-tarjeta-sanitaria-individual-view.html +14 -0
  213. package/components/event.html +17 -0
  214. package/components/expander.html +33 -0
  215. package/components/feature-card.html +31 -0
  216. package/components/feature-photo.html +25 -0
  217. package/components/field.html +17 -0
  218. package/components/fieldset.html +18 -0
  219. package/components/figure.html +18 -0
  220. package/components/file-dialog.html +32 -0
  221. package/components/file-input.html +16 -0
  222. package/components/file-manager.html +18 -0
  223. package/components/file-tree.html +93 -0
  224. package/components/file-upload.html +35 -0
  225. package/components/five-face-rating-picker-button.html +20 -0
  226. package/components/five-face-rating-picker.html +69 -0
  227. package/components/five-face-rating-view.html +19 -0
  228. package/components/five-star-rating-picker-button.html +20 -0
  229. package/components/five-star-rating-picker.html +69 -0
  230. package/components/five-star-rating-view.html +19 -0
  231. package/components/flair.html +18 -0
  232. package/components/flex-stack.html +18 -0
  233. package/components/float-button.html +20 -0
  234. package/components/floating-panel.html +19 -0
  235. package/components/footer.html +17 -0
  236. package/components/footnote.html +18 -0
  237. package/components/form.html +17 -0
  238. package/components/framer.html +18 -0
  239. package/components/france-numero-d-identification-au-repertoire-input.html +20 -0
  240. package/components/france-numero-d-identification-au-repertoire-view.html +14 -0
  241. package/components/funnel-chart.html +47 -0
  242. package/components/gantt-table-tbody.html +19 -0
  243. package/components/gantt-table-td.html +22 -0
  244. package/components/gantt-table-tfoot.html +19 -0
  245. package/components/gantt-table-th.html +23 -0
  246. package/components/gantt-table-thead.html +19 -0
  247. package/components/gantt-table-tr.html +19 -0
  248. package/components/gantt-table.html +19 -0
  249. package/components/gauge-chart.html +50 -0
  250. package/components/go-to-next-section.html +16 -0
  251. package/components/go-to-previous-section.html +16 -0
  252. package/components/go-to-top.html +18 -0
  253. package/components/government-banner.html +35 -0
  254. package/components/government-identifier.html +33 -0
  255. package/components/grail-layout-bottom-footer.html +17 -0
  256. package/components/grail-layout-center-main.html +17 -0
  257. package/components/grail-layout-left-aside.html +17 -0
  258. package/components/grail-layout-right-aside.html +17 -0
  259. package/components/grail-layout-top-header.html +17 -0
  260. package/components/grail-layout.html +14 -0
  261. package/components/graphic-block.html +23 -0
  262. package/components/grid.html +22 -0
  263. package/components/hamburger-menu.html +33 -0
  264. package/components/hanguk-jumin-deungnok-beonho-input.html +18 -0
  265. package/components/hanguk-jumin-deungnok-beonho-view.html +14 -0
  266. package/components/header.html +17 -0
  267. package/components/headline.html +22 -0
  268. package/components/heatmap-chart-with-year-of-days.html +55 -0
  269. package/components/heatmap-chart.html +50 -0
  270. package/components/hero-headline.html +23 -0
  271. package/components/hero.html +17 -0
  272. package/components/hidden-input.html +17 -0
  273. package/components/hint.html +14 -0
  274. package/components/hong-kong-identity-card-input.html +18 -0
  275. package/components/hong-kong-identity-card-view.html +14 -0
  276. package/components/horizontal-scroller.html +19 -0
  277. package/components/hover-card.html +30 -0
  278. package/components/hrvatska-osobni-identifikacijski-broj-input.html +18 -0
  279. package/components/hrvatska-osobni-identifikacijski-broj-view.html +14 -0
  280. package/components/iban-input.html +17 -0
  281. package/components/iban-view.html +12 -0
  282. package/components/icon-button.html +18 -0
  283. package/components/icon-list-item.html +22 -0
  284. package/components/icon-list.html +17 -0
  285. package/components/icon.html +18 -0
  286. package/components/image-cropper.html +20 -0
  287. package/components/image-file-input.html +16 -0
  288. package/components/image-input.html +16 -0
  289. package/components/image.html +16 -0
  290. package/components/immunization-record-list-item.html +31 -0
  291. package/components/immunization-record-list.html +31 -0
  292. package/components/indonesia-nomor-induk-kependudukan-input.html +18 -0
  293. package/components/indonesia-nomor-induk-kependudukan-view.html +14 -0
  294. package/components/info-state.html +37 -0
  295. package/components/information-callout.html +18 -0
  296. package/components/input-group.html +28 -0
  297. package/components/input-with-mask.html +28 -0
  298. package/components/input.html +16 -0
  299. package/components/inset-text.html +18 -0
  300. package/components/iran-kod-e-melli-input.html +18 -0
  301. package/components/iran-kod-e-melli-view.html +14 -0
  302. package/components/island-kennitala-input.html +18 -0
  303. package/components/island-kennitala-view.html +14 -0
  304. package/components/italia-codice-fiscale-input.html +18 -0
  305. package/components/italia-codice-fiscale-view.html +14 -0
  306. package/components/kanban-table-body.html +19 -0
  307. package/components/kanban-table-foot.html +19 -0
  308. package/components/kanban-table-head.html +19 -0
  309. package/components/kanban-table-row.html +19 -0
  310. package/components/kanban-table-td.html +22 -0
  311. package/components/kanban-table-th.html +23 -0
  312. package/components/kanban-table.html +19 -0
  313. package/components/kbd-shortcut.html +27 -0
  314. package/components/kbd.html +19 -0
  315. package/components/kypros-national-passport-number-input.html +18 -0
  316. package/components/kypros-national-passport-number-view.html +14 -0
  317. package/components/label.html +17 -0
  318. package/components/latvija-personas-kods-input.html +18 -0
  319. package/components/latvija-personas-kods-view.html +14 -0
  320. package/components/liechtenstein-national-identity-card-number-input.html +18 -0
  321. package/components/liechtenstein-national-identity-card-number-view.html +14 -0
  322. package/components/liechtenstein-passport-number-input.html +18 -0
  323. package/components/liechtenstein-passport-number-view.html +14 -0
  324. package/components/lietuva-asmens-kodas-input.html +18 -0
  325. package/components/lietuva-asmens-kodas-view.html +14 -0
  326. package/components/lietuva-pasas-input.html +18 -0
  327. package/components/lietuva-pasas-view.html +12 -0
  328. package/components/line-chart.html +47 -0
  329. package/components/listbox.html +36 -0
  330. package/components/loading.html +19 -0
  331. package/components/luxembourg-matricule-input.html +18 -0
  332. package/components/luxembourg-matricule-view.html +14 -0
  333. package/components/magyarorszag-taj-szam-input.html +18 -0
  334. package/components/magyarorszag-taj-szam-view.html +14 -0
  335. package/components/malaysia-kad-pengenalan-input.html +18 -0
  336. package/components/malaysia-kad-pengenalan-view.html +14 -0
  337. package/components/malta-national-identification-number-input.html +18 -0
  338. package/components/malta-national-identification-number-view.html +14 -0
  339. package/components/malta-passport-number-input.html +18 -0
  340. package/components/malta-passport-number-view.html +14 -0
  341. package/components/mark.html +12 -0
  342. package/components/masonry.html +18 -0
  343. package/components/measurement-instance-input.html +16 -0
  344. package/components/measurement-instance-view.html +14 -0
  345. package/components/measurement-system-input.html +16 -0
  346. package/components/measurement-system-view.html +14 -0
  347. package/components/measurement-unit-input.html +16 -0
  348. package/components/measurement-unit-view.html +14 -0
  349. package/components/medical-banner-box-for-advice.html +19 -0
  350. package/components/medical-banner-box-for-danger.html +19 -0
  351. package/components/medical-banner-box.html +19 -0
  352. package/components/medical-banner.html +30 -0
  353. package/components/medication-record-list-item.html +29 -0
  354. package/components/medication-record-list.html +29 -0
  355. package/components/medication-view.html +19 -0
  356. package/components/mentions-input.html +54 -0
  357. package/components/menu-bar-button.html +19 -0
  358. package/components/menu-bar.html +37 -0
  359. package/components/menu-group.html +22 -0
  360. package/components/menu-item.html +19 -0
  361. package/components/menu.html +37 -0
  362. package/components/meter.html +20 -0
  363. package/components/mexico-clave-unica-de-registro-de-poblacion-input.html +18 -0
  364. package/components/mexico-clave-unica-de-registro-de-poblacion-view.html +14 -0
  365. package/components/middle-truncation.html +29 -0
  366. package/components/misr-al-raqm-al-qawmi-input.html +18 -0
  367. package/components/misr-al-raqm-al-qawmi-view.html +14 -0
  368. package/components/mockup-browser.html +18 -0
  369. package/components/mockup-laptop.html +18 -0
  370. package/components/mockup-phone-landscape.html +18 -0
  371. package/components/mockup-phone-portrait.html +18 -0
  372. package/components/mockup-shell.html +18 -0
  373. package/components/mockup-tablet-landscape.html +18 -0
  374. package/components/mockup-tablet-portrait.html +18 -0
  375. package/components/mockup-watch.html +18 -0
  376. package/components/mockup-window.html +18 -0
  377. package/components/month-input.html +16 -0
  378. package/components/multi-select-with-extras.html +25 -0
  379. package/components/multi-select.html +22 -0
  380. package/components/navigation-menu.html +37 -0
  381. package/components/nederland-burgerservice-nummer-input.html +18 -0
  382. package/components/nederland-burgerservice-nummer-view.html +14 -0
  383. package/components/nederland-identiteitskaart-nummer-input.html +18 -0
  384. package/components/nederland-identiteitskaart-nummer-view.html +14 -0
  385. package/components/nederland-paspoort-nummer-input.html +18 -0
  386. package/components/nederland-paspoort-nummer-view.html +14 -0
  387. package/components/net-promoter-score-picker-button.html +20 -0
  388. package/components/net-promoter-score-picker.html +129 -0
  389. package/components/net-promoter-score-view.html +14 -0
  390. package/components/newsletter-signup.html +57 -0
  391. package/components/nigeria-national-identification-number-input.html +18 -0
  392. package/components/nigeria-national-identification-number-view.html +14 -0
  393. package/components/nihon-kojin-bango-input.html +18 -0
  394. package/components/nihon-kojin-bango-view.html +14 -0
  395. package/components/norge-fodselsnummer-input.html +18 -0
  396. package/components/norge-fodselsnummer-view.html +14 -0
  397. package/components/notification.html +19 -0
  398. package/components/number-input.html +16 -0
  399. package/components/numeric-rating-scale-picker.html +104 -0
  400. package/components/observation-view.html +22 -0
  401. package/components/one-time-password-input.html +24 -0
  402. package/components/option.html +19 -0
  403. package/components/organization.html +17 -0
  404. package/components/osterreich-sozialversicherungsnummer-input.html +18 -0
  405. package/components/osterreich-sozialversicherungsnummer-view.html +14 -0
  406. package/components/overlay-container.html +18 -0
  407. package/components/padding-reset.html +14 -0
  408. package/components/pagination-link.html +18 -0
  409. package/components/pagination-list-item.html +19 -0
  410. package/components/pagination-list.html +17 -0
  411. package/components/pagination-nav.html +17 -0
  412. package/components/pakistan-computerized-national-identity-card-input.html +18 -0
  413. package/components/pakistan-computerized-national-identity-card-view.html +14 -0
  414. package/components/panel.html +18 -0
  415. package/components/password-input-or-text-input-div.html +29 -0
  416. package/components/password-input.html +16 -0
  417. package/components/person.html +17 -0
  418. package/components/phase-banner.html +18 -0
  419. package/components/photo-pack.html +18 -0
  420. package/components/pictogram.html +31 -0
  421. package/components/picture.html +24 -0
  422. package/components/pie-chart.html +47 -0
  423. package/components/pilipinas-philhealth-identification-number-input.html +18 -0
  424. package/components/pilipinas-philhealth-identification-number-view.html +14 -0
  425. package/components/pin-input-div.html +38 -0
  426. package/components/place.html +17 -0
  427. package/components/polska-numer-identyfikacji-podatkowej-input.html +18 -0
  428. package/components/polska-numer-identyfikacji-podatkowej-view.html +14 -0
  429. package/components/polska-pesel-input.html +18 -0
  430. package/components/polska-pesel-view.html +12 -0
  431. package/components/popconfirm-dialog.html +54 -0
  432. package/components/popover.html +41 -0
  433. package/components/popup.html +46 -0
  434. package/components/portugal-numero-de-identificacao-fiscal-input.html +18 -0
  435. package/components/portugal-numero-de-identificacao-fiscal-view.html +14 -0
  436. package/components/portugal-passaporte-input.html +18 -0
  437. package/components/portugal-passaporte-view.html +14 -0
  438. package/components/postal-code-input.html +16 -0
  439. package/components/postal-code-view.html +14 -0
  440. package/components/prathet-thai-lek-prajam-tua-prachachon-input.html +18 -0
  441. package/components/prathet-thai-lek-prajam-tua-prachachon-view.html +14 -0
  442. package/components/problem-record-list-item.html +37 -0
  443. package/components/problem-record-list.html +37 -0
  444. package/components/procedure-record-list-item.html +29 -0
  445. package/components/procedure-record-list.html +29 -0
  446. package/components/product-card.html +36 -0
  447. package/components/progress-bar.html +19 -0
  448. package/components/progress-circle.html +21 -0
  449. package/components/progress-spinner.html +19 -0
  450. package/components/progress.html +19 -0
  451. package/components/qr-code-image.html +18 -0
  452. package/components/question.html +18 -0
  453. package/components/radar-chart.html +50 -0
  454. package/components/radio-group.html +18 -0
  455. package/components/radio-input.html +16 -0
  456. package/components/range-input.html +16 -0
  457. package/components/record-list-item.html +28 -0
  458. package/components/record-list.html +28 -0
  459. package/components/red-amber-green-picker-button.html +20 -0
  460. package/components/red-amber-green-picker.html +49 -0
  461. package/components/red-amber-green-view.html +17 -0
  462. package/components/red-orange-yellow-green-blue-picker-button.html +20 -0
  463. package/components/red-orange-yellow-green-blue-picker.html +69 -0
  464. package/components/red-orange-yellow-green-blue-view.html +14 -0
  465. package/components/related-content.html +17 -0
  466. package/components/reset-input.html +16 -0
  467. package/components/resizable.html +20 -0
  468. package/components/review-date.html +16 -0
  469. package/components/ring-chart.html +47 -0
  470. package/components/romania-cod-numeric-personal-input.html +18 -0
  471. package/components/romania-cod-numeric-personal-view.html +14 -0
  472. package/components/romania-pasaport-input.html +18 -0
  473. package/components/romania-pasaport-view.html +14 -0
  474. package/components/rossiya-snils-input.html +18 -0
  475. package/components/rossiya-snils-view.html +16 -0
  476. package/components/sankey-chart.html +50 -0
  477. package/components/scatter-chart.html +47 -0
  478. package/components/schweiz-ahv-nummer-input.html +18 -0
  479. package/components/schweiz-ahv-nummer-view.html +14 -0
  480. package/components/screen-reader-span.html +14 -0
  481. package/components/scroll-area.html +19 -0
  482. package/components/scroll-bar.html +20 -0
  483. package/components/scroller-base.html +19 -0
  484. package/components/scroller-video.html +38 -0
  485. package/components/scroller.html +30 -0
  486. package/components/search-input.html +16 -0
  487. package/components/section-heading.html +22 -0
  488. package/components/section-link.html +18 -0
  489. package/components/section-list-item.html +14 -0
  490. package/components/section-list.html +17 -0
  491. package/components/section-nav.html +17 -0
  492. package/components/segment-group-item.html +21 -0
  493. package/components/segment-group.html +37 -0
  494. package/components/select-with-extras.html +14 -0
  495. package/components/select.html +17 -0
  496. package/components/separator.html +16 -0
  497. package/components/share-page.html +18 -0
  498. package/components/sheet.html +36 -0
  499. package/components/show-more.html +31 -0
  500. package/components/sidebar.html +17 -0
  501. package/components/signature-pad.html +18 -0
  502. package/components/singapore-national-registration-identity-card-input.html +18 -0
  503. package/components/singapore-national-registration-identity-card-view.html +16 -0
  504. package/components/skeleton.html +18 -0
  505. package/components/skip-link.html +18 -0
  506. package/components/slide-out-drawer.html +36 -0
  507. package/components/slider-button.html +19 -0
  508. package/components/slider.html +21 -0
  509. package/components/slovenija-emso-input.html +18 -0
  510. package/components/slovenija-emso-view.html +14 -0
  511. package/components/slovensko-pas-input.html +18 -0
  512. package/components/slovensko-pas-view.html +12 -0
  513. package/components/slovensko-rodne-cislo-input.html +18 -0
  514. package/components/slovensko-rodne-cislo-view.html +14 -0
  515. package/components/sonner.html +19 -0
  516. package/components/south-africa-identity-number-input.html +18 -0
  517. package/components/south-africa-identity-number-view.html +14 -0
  518. package/components/sparkline.html +18 -0
  519. package/components/split-button.html +59 -0
  520. package/components/split-view.html +36 -0
  521. package/components/splitter.html +20 -0
  522. package/components/statistic.html +36 -0
  523. package/components/status-light.html +22 -0
  524. package/components/status-tag.html +17 -0
  525. package/components/step-list-item.html +18 -0
  526. package/components/step-list.html +18 -0
  527. package/components/sticky-promo-banner.html +30 -0
  528. package/components/streaming-text.html +32 -0
  529. package/components/submit-input.html +16 -0
  530. package/components/success-panel.html +18 -0
  531. package/components/summary-box.html +22 -0
  532. package/components/summary-list-item.html +17 -0
  533. package/components/summary-list.html +17 -0
  534. package/components/sunburst-chart.html +47 -0
  535. package/components/suomi-henkilotunnus-input.html +18 -0
  536. package/components/suomi-henkilotunnus-view.html +14 -0
  537. package/components/super-banner.html +19 -0
  538. package/components/sverige-personnummer-input.html +18 -0
  539. package/components/sverige-personnummer-view.html +14 -0
  540. package/components/switch-button.html +19 -0
  541. package/components/tab-bar-button.html +27 -0
  542. package/components/tab-bar.html +59 -0
  543. package/components/tab-panel.html +34 -0
  544. package/components/table-body.html +16 -0
  545. package/components/table-foot.html +16 -0
  546. package/components/table-head.html +16 -0
  547. package/components/table-row.html +18 -0
  548. package/components/table-td.html +20 -0
  549. package/components/table-th.html +24 -0
  550. package/components/table.html +17 -0
  551. package/components/tag-group.html +18 -0
  552. package/components/tag-input-div.html +41 -0
  553. package/components/tag.html +15 -0
  554. package/components/taiwan-guomin-shenfenzheng-tongyi-bianhao-input.html +18 -0
  555. package/components/taiwan-guomin-shenfenzheng-tongyi-bianhao-view.html +14 -0
  556. package/components/task-bar-button.html +17 -0
  557. package/components/task-bar.html +19 -0
  558. package/components/task-list-item.html +20 -0
  559. package/components/task-list.html +18 -0
  560. package/components/tel-input.html +16 -0
  561. package/components/tel-link.html +18 -0
  562. package/components/text-area-input-with-character-counter.html +32 -0
  563. package/components/text-area-input.html +17 -0
  564. package/components/text-input-with-search.html +30 -0
  565. package/components/text-input.html +16 -0
  566. package/components/theme-provider.html +18 -0
  567. package/components/theme-select-option.html +19 -0
  568. package/components/theme-select.html +17 -0
  569. package/components/theme-view.html +14 -0
  570. package/components/thinking.html +21 -0
  571. package/components/tile-map.html +21 -0
  572. package/components/tile.html +18 -0
  573. package/components/time-input.html +16 -0
  574. package/components/time-picker-input.html +19 -0
  575. package/components/timeline-list-item.html +19 -0
  576. package/components/timeline-list.html +17 -0
  577. package/components/timeout-dialog.html +18 -0
  578. package/components/timer-button.html +20 -0
  579. package/components/timer.html +19 -0
  580. package/components/toast.html +19 -0
  581. package/components/toggle-button.html +19 -0
  582. package/components/toggle-group.html +30 -0
  583. package/components/tool-bar-button.html +17 -0
  584. package/components/tool-bar.html +19 -0
  585. package/components/tool-call-error.html +17 -0
  586. package/components/tool-call-input.html +18 -0
  587. package/components/tool-call-name.html +12 -0
  588. package/components/tool-call-output.html +18 -0
  589. package/components/tool-call-status.html +16 -0
  590. package/components/tool-call.html +58 -0
  591. package/components/tooltip.html +30 -0
  592. package/components/tour-list-item.html +20 -0
  593. package/components/tour-list.html +19 -0
  594. package/components/tour.html +59 -0
  595. package/components/transfer-list.html +37 -0
  596. package/components/tree-link.html +18 -0
  597. package/components/tree-list-item.html +21 -0
  598. package/components/tree-list.html +71 -0
  599. package/components/tree-menu.html +71 -0
  600. package/components/tree-nav.html +76 -0
  601. package/components/tree-select.html +89 -0
  602. package/components/tuaisceart-eireann-health-and-care-number-input.html +20 -0
  603. package/components/tuaisceart-eireann-health-and-care-number-view.html +14 -0
  604. package/components/turkiye-tc-kimlik-numarasi-input.html +18 -0
  605. package/components/turkiye-tc-kimlik-numarasi-view.html +14 -0
  606. package/components/ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-input.html +18 -0
  607. package/components/ukrayina-reyestratsiyniy-nomer-oblikovoyi-kartky-platnyka-podatkiv-view.html +16 -0
  608. package/components/united-kingdom-national-health-service-number-input.html +18 -0
  609. package/components/united-kingdom-national-health-service-number-view.html +14 -0
  610. package/components/united-kingdom-national-insurance-number-input.html +18 -0
  611. package/components/united-kingdom-national-insurance-number-view.html +14 -0
  612. package/components/united-states-social-security-number-input.html +18 -0
  613. package/components/united-states-social-security-number-view.html +14 -0
  614. package/components/url-input.html +16 -0
  615. package/components/uruguay-cedula-de-identidad-input.html +18 -0
  616. package/components/uruguay-cedula-de-identidad-view.html +14 -0
  617. package/components/validation-list-item.html +18 -0
  618. package/components/validation-list.html +18 -0
  619. package/components/video-player.html +25 -0
  620. package/components/viet-nam-can-cuoc-cong-dan-input.html +18 -0
  621. package/components/viet-nam-can-cuoc-cong-dan-view.html +14 -0
  622. package/components/visible.html +17 -0
  623. package/components/warning-callout.html +18 -0
  624. package/components/warning-text.html +22 -0
  625. package/components/watermark.html +26 -0
  626. package/components/week-input.html +16 -0
  627. package/components/wheel-picker.html +46 -0
  628. package/components/yisrael-teudat-zehut-input.html +18 -0
  629. package/components/yisrael-teudat-zehut-view.html +14 -0
  630. package/components/zhongguo-jumin-shenfenzheng-haoma-input.html +18 -0
  631. package/components/zhongguo-jumin-shenfenzheng-haoma-view.html +14 -0
  632. package/index.js +27 -0
  633. package/index.md +53 -0
  634. package/lily-alpine.js +2979 -0
  635. package/middle-truncation.js +74 -0
  636. package/overflow-navigation.js +141 -0
  637. package/package.json +57 -4
  638. package/page-check.js +102 -0
  639. package/wheel-picker.js +219 -0
@@ -0,0 +1,74 @@
1
+ // Generated from shared/middle-truncation.ts by bin/sync-shared-modules; edit the shared module, never this copy.
2
+ /**
3
+ * Middle truncation: shorten a string to fit a width by cutting out the middle, keeping the start and the end ("report-fi…q3.pdf").
4
+ * Pure and framework-neutral: the caller supplies `measure`, so the module reads no DOM and is tested without a browser.
5
+ *
6
+ * Works on grapheme clusters (Intl.Segmenter, falling back to code points), so it never splits a surrogate pair, a combining
7
+ * sequence or an emoji. The width search is binary, so it measures O(log n) candidate strings.
8
+ *
9
+ * Strategies:
10
+ * "even" the start and the end share what fits, the end taking the extra cluster when the count is odd.
11
+ * "fixed-end" exactly `end` clusters are kept at the end; the start takes all the remaining room.
12
+ * "min-end" an even split, but at least `end` clusters are kept at the end (a file extension, a domain suffix).
13
+ */
14
+
15
+ /** Split into user-perceived characters. */
16
+ export function splitGraphemes(text ) {
17
+ const Segmenter = (
18
+ Intl
19
+
20
+ ).Segmenter;
21
+ if (Segmenter)
22
+ return Array.from(
23
+ new Segmenter(undefined, { granularity: "grapheme" }).segment(text),
24
+ (s) => s.segment,
25
+ );
26
+ return Array.from(text);
27
+ }
28
+
29
+ function clampEnd(end , length ) {
30
+ if (end === undefined || !Number.isFinite(end)) return 0;
31
+ return Math.min(Math.max(Math.floor(end), 0), length);
32
+ }
33
+
34
+ /** The text shortened to fit `maxWidth`, or unchanged when it already fits. */
35
+ export function truncateMiddle(text , options ) {
36
+ const { ellipsis, maxWidth, measure, strategy = "even" } = options;
37
+ if (measure(text) <= maxWidth) return text;
38
+
39
+ const g = splitGraphemes(text);
40
+ const n = g.length;
41
+ const tail = (count ) => (count > 0 ? g.slice(n - count).join("") : "");
42
+ const head = (count ) => g.slice(0, count).join("");
43
+
44
+ if (strategy === "fixed-end") {
45
+ const end = clampEnd(options.end, n);
46
+ const endText = tail(end);
47
+ const room = maxWidth - measure(ellipsis + endText);
48
+ let low = 0;
49
+ let high = n - end;
50
+ while (low < high) {
51
+ const middle = Math.ceil((low + high) / 2);
52
+ if (measure(head(middle)) <= room) low = middle;
53
+ else high = middle - 1;
54
+ }
55
+ return head(low) + ellipsis + endText;
56
+ }
57
+
58
+ const minEnd = strategy === "min-end" ? clampEnd(options.end, n) : 0;
59
+ const split = (kept ) => {
60
+ const endCount = Math.min(n, Math.max(Math.ceil(kept / 2), minEnd));
61
+ return [Math.max(0, kept - endCount), endCount];
62
+ };
63
+ const room = maxWidth - measure(ellipsis);
64
+ let low = 0;
65
+ let high = n;
66
+ while (low < high) {
67
+ const middle = Math.ceil((low + high) / 2);
68
+ const [startCount, endCount] = split(middle);
69
+ if (measure(head(startCount) + tail(endCount)) <= room) low = middle;
70
+ else high = middle - 1;
71
+ }
72
+ const [startCount, endCount] = split(low);
73
+ return head(startCount) + ellipsis + tail(endCount);
74
+ }
@@ -0,0 +1,141 @@
1
+ // Generated from shared/overflow-navigation.ts by bin/sync-shared-modules; edit the shared module, never this copy.
2
+ /**
3
+ * Overflow navigation: measure which items of a navigation list fit on one row and move the rest into a "More" disclosure.
4
+ * Framework-neutral and dependency-free; the component renders the markup, this module only moves nodes and toggles state.
5
+ *
6
+ * Expected markup (rendered by every NavigationMenu in `overflow` mode, nothing here creates it):
7
+ *
8
+ * <nav class="navigation-menu" data-overflow="true">
9
+ * <ul class="navigation-menu-list">
10
+ * <li>…item…</li> …
11
+ * <li class="navigation-menu-more" hidden>
12
+ * <button class="navigation-menu-more-button" type="button" aria-expanded="false">{moreLabel}</button>
13
+ * <ul class="navigation-menu-more-list" hidden></ul>
14
+ * </li>
15
+ * </ul>
16
+ * </nav>
17
+ *
18
+ * Progressive enhancement: without this script the More item stays `hidden` and the list wraps (consumer CSS: flex-wrap).
19
+ * With it, a ResizeObserver on the list (never a window `resize` listener) re-measures; the items that do not fit, in order,
20
+ * are appended to the More list, and moved back, in order, when room returns. The opened More list stays in normal flow, so it
21
+ * pushes the content below it down and never covers it (WCAG 2.4.11). Escape closes it and returns focus to the button, and a
22
+ * click outside closes it. Items keep their links and `aria-current`; the module reads and writes no text.
23
+ */
24
+
25
+ /** How many of `widths` fit in `available` on one row, in the unit the widths use. Pure.
26
+ * If all fit, returns widths.length. Otherwise the most that fit beside the More item (`moreWidth`). `gap` separates items. */
27
+ export function fitCount(widths , available , moreWidth , gap = 0) {
28
+ const total = widths.reduce((sum, w) => sum + w, 0) + gap * Math.max(0, widths.length - 1);
29
+ if (total <= available) return widths.length;
30
+ let used = moreWidth;
31
+ let count = 0;
32
+ for (const w of widths) {
33
+ if (used + w + gap > available) break;
34
+ used += w + gap;
35
+ count += 1;
36
+ }
37
+ return count;
38
+ }
39
+
40
+ let counter = 0;
41
+
42
+ /** Attach overflow behaviour to a `.navigation-menu` root. Returns null when the expected markup is missing. */
43
+ export function setupOverflowNavigation(root ) {
44
+ const list = root.querySelector (".navigation-menu-list");
45
+ const more = list?.querySelector (":scope > .navigation-menu-more") ?? null;
46
+ const button =
47
+ more?.querySelector (":scope > .navigation-menu-more-button") ?? null;
48
+ const moreList =
49
+ more?.querySelector (":scope > .navigation-menu-more-list") ?? null;
50
+ if (!list || !more || !button || !moreList) return null;
51
+ const doc = root.ownerDocument;
52
+
53
+ if (!moreList.id) moreList.id = `navigation-menu-more-list-${++counter}`;
54
+ button.setAttribute("aria-controls", moreList.id);
55
+ if (!button.hasAttribute("aria-expanded")) button.setAttribute("aria-expanded", "false");
56
+
57
+ let lastAvailable = -1;
58
+ let lastCount = -1;
59
+
60
+ const setOpen = (open , refocus = false) => {
61
+ moreList.hidden = !open;
62
+ button.setAttribute("aria-expanded", String(open));
63
+ if (!open && refocus) button.focus();
64
+ };
65
+ const items = () => [
66
+ ...(Array.from(list.children) ).filter((c) => c !== more),
67
+ ...(Array.from(moreList.children) ),
68
+ ];
69
+
70
+ const update = () => {
71
+ const available = list.clientWidth;
72
+ const all = items();
73
+ if (available === lastAvailable && all.length === lastCount) return;
74
+ lastAvailable = available;
75
+ lastCount = all.length;
76
+
77
+ const active = doc.activeElement;
78
+ // Put everything back in order so each item can be measured where it sits on the row.
79
+ for (const item of all) list.insertBefore(item, more);
80
+ more.hidden = true;
81
+ const gap =
82
+ parseFloat(root.ownerDocument.defaultView?.getComputedStyle(list).columnGap ?? "") || 0;
83
+ const widths = all.map((item) => item.offsetWidth);
84
+ let count = fitCount(widths, available, 0, gap);
85
+ if (count < all.length) {
86
+ more.hidden = false;
87
+ count = fitCount(widths, available, more.offsetWidth, gap);
88
+ }
89
+ for (const item of all.slice(count)) moreList.appendChild(item);
90
+ if (count >= all.length) {
91
+ more.hidden = true;
92
+ setOpen(false);
93
+ }
94
+ if (
95
+ active instanceof HTMLElement &&
96
+ active !== doc.body &&
97
+ doc.contains(active) &&
98
+ doc.activeElement !== active
99
+ ) {
100
+ active.focus();
101
+ }
102
+ };
103
+
104
+ const onClick = () => setOpen(Boolean(moreList.hidden));
105
+ const onKeydown = (event ) => {
106
+ if (event.key === "Escape" && !moreList.hidden) {
107
+ event.stopPropagation();
108
+ setOpen(false, true);
109
+ }
110
+ };
111
+ const onOutside = (event ) => {
112
+ if (!moreList.hidden && event.target instanceof Node && !more.contains(event.target))
113
+ setOpen(false);
114
+ };
115
+
116
+ button.addEventListener("click", onClick);
117
+ more.addEventListener("keydown", onKeydown);
118
+ doc.addEventListener("click", onOutside);
119
+ let observer = null;
120
+ if (typeof ResizeObserver !== "undefined") {
121
+ observer = new ResizeObserver(() => update());
122
+ observer.observe(list);
123
+ }
124
+ update();
125
+
126
+ return {
127
+ update,
128
+ dispose() {
129
+ observer?.disconnect();
130
+ button.removeEventListener("click", onClick);
131
+ more.removeEventListener("keydown", onKeydown);
132
+ doc.removeEventListener("click", onOutside);
133
+ for (const item of Array.from(moreList.children)) list.insertBefore(item, more);
134
+ more.hidden = true;
135
+ setOpen(false);
136
+ },
137
+ };
138
+ }
139
+
140
+ /** The name the Blazor JS-interop module and the HTML snippet call. */
141
+ export const attach = setupOverflowNavigation;
package/package.json CHANGED
@@ -1,6 +1,59 @@
1
1
  {
2
2
  "name": "@lilydesignsystem/alpine-headless",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "engines": {
6
+ "node": ">=26"
7
+ },
8
+ "description": "Lily Design System Alpine.js headless components (571 of 571): annotated semantic-HTML snippets with ARIA, class hooks and Alpine directives, plus a small Alpine plugin that owns the keyboard and state behaviour. Zero CSS. Targets WCAG 2.2 AAA.",
9
+ "license": "MIT OR Apache-2.0 OR GPL-2.0-only OR GPL-3.0-only OR BSD-3-Clause",
10
+ "scripts": {
11
+ "test": "vitest run",
12
+ "check": "tsc --noEmit",
13
+ "storybook": "storybook dev -p 6006",
14
+ "build-storybook": "storybook build"
15
+ },
16
+ "peerDependencies": {
17
+ "alpinejs": "^3.14.0"
18
+ },
19
+ "devDependencies": {
20
+ "@storybook/html-vite": "^10.6.5",
21
+ "@testing-library/user-event": "^14.6.8",
22
+ "@types/node": "^26.6.6",
23
+ "alpinejs": "^3.17.5",
24
+ "jsdom": "^30.1.3",
25
+ "storybook": "^10.6.5",
26
+ "typescript": "^7.0.2",
27
+ "vite": "^8.3.5",
28
+ "vitest": "^5.0.5"
29
+ },
30
+ "author": "Joel Parker Henderson <joel@joelparkerhenderson.com>",
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/LilyDesignSystem/lily-design-system.git",
34
+ "directory": "lily-design-system-alpine-headless"
35
+ },
36
+ "homepage": "https://lilydesignsystem.com/",
37
+ "bugs": {
38
+ "url": "https://github.com/LilyDesignSystem/lily-design-system/issues"
39
+ },
40
+ "main": "./index.js",
41
+ "exports": {
42
+ ".": "./index.js",
43
+ "./plugin": "./lily-alpine.js",
44
+ "./page-check": "./page-check.js",
45
+ "./components/*": "./components/*",
46
+ "./package.json": "./package.json"
47
+ },
48
+ "files": [
49
+ "index.js",
50
+ "lily-alpine.js",
51
+ "page-check.js",
52
+ "middle-truncation.js",
53
+ "overflow-navigation.js",
54
+ "wheel-picker.js",
55
+ "components/*.html",
56
+ "index.md",
57
+ "README.md"
58
+ ]
59
+ }
package/page-check.js ADDED
@@ -0,0 +1,102 @@
1
+ // Generated from shared/page-check.js by bin/sync-shared-modules; edit the shared module, never this copy.
2
+ /**
3
+ * The page-level twin of dev-warning.ts, for the catalogs with no component code to hook (HTML, Nunjucks, Alpine): run it
4
+ * on a rendered page in development and it reports each interactive element with no accessible name. Dependency-free
5
+ * and never loaded unless a page asks for it. Messages are English on purpose: they are for the developer.
6
+ *
7
+ * import { checkPage } from "@lilydesignsystem/html-headless/components/page-check.js";
8
+ * checkPage();
9
+ *
10
+ * `globalThis.lilyWarnings = false` turns it off. Spec: spec/testing/index.md#development-warnings.
11
+ */
12
+
13
+ const ROLES = [
14
+ "alertdialog",
15
+ "button",
16
+ "checkbox",
17
+ "combobox",
18
+ "dialog",
19
+ "grid",
20
+ "link",
21
+ "listbox",
22
+ "menu",
23
+ "menubar",
24
+ "menuitem",
25
+ "menuitemcheckbox",
26
+ "menuitemradio",
27
+ "option",
28
+ "radio",
29
+ "searchbox",
30
+ "slider",
31
+ "spinbutton",
32
+ "switch",
33
+ "tab",
34
+ "tablist",
35
+ "textbox",
36
+ "tree",
37
+ "treeitem",
38
+ ];
39
+
40
+ const INTERACTIVE = [
41
+ "a[href]",
42
+ "button",
43
+ "dialog",
44
+ "select",
45
+ "summary",
46
+ "textarea",
47
+ 'input:not([type="hidden"])',
48
+ ...ROLES.map((role) => `[role="${role}"]`),
49
+ ].join(",");
50
+
51
+ /** Text a screen reader would read inside an element, skipping what is hidden from it. */
52
+ function visibleText(node) {
53
+ if (node.nodeType === 3) return node.textContent;
54
+ if (node.nodeType !== 1 || node.getAttribute("aria-hidden") === "true") return "";
55
+ if (node.matches("script, style, template")) return "";
56
+ if (node.matches("img, area")) return node.getAttribute("alt") ?? "";
57
+ if (node.matches("svg"))
58
+ return node.querySelector("title")?.textContent ?? node.getAttribute("aria-label") ?? "";
59
+ if (node.hasAttribute("aria-label")) return node.getAttribute("aria-label");
60
+ return [...node.childNodes].map(visibleText).join("");
61
+ }
62
+
63
+ function hasName(el) {
64
+ const doc = el.ownerDocument;
65
+ const labelledBy = (el.getAttribute("aria-labelledby") ?? "").split(/\s+/).filter(Boolean);
66
+ if (
67
+ labelledBy.some((id) =>
68
+ visibleText(doc.getElementById(id) ?? doc.createTextNode("")).trim(),
69
+ )
70
+ )
71
+ return true;
72
+ if (el.getAttribute("aria-label")?.trim() || el.getAttribute("title")?.trim()) return true;
73
+ if (el.matches('input[type="image"]')) return !!el.getAttribute("alt")?.trim();
74
+ if (el.matches('input[type="submit"], input[type="reset"], input[type="button"]'))
75
+ return !!el.value?.trim() || el.matches('input[type="submit"], input[type="reset"]');
76
+ if (el.labels && [...el.labels].some((label) => visibleText(label).trim())) return true;
77
+ if (
78
+ el.matches(
79
+ "input, select, textarea, dialog, [role=listbox], [role=tablist], [role=tree], [role=menu], [role=menubar], [role=grid], [role=combobox], [role=dialog], [role=alertdialog]",
80
+ )
81
+ )
82
+ return false;
83
+ return !!visibleText(el).trim();
84
+ }
85
+
86
+ /** Each interactive element inside `root` with no accessible name. Hidden and inert content is skipped. */
87
+ export function findUnnamed(root = document) {
88
+ return [...root.querySelectorAll(INTERACTIVE)].filter(
89
+ (el) => !el.closest('[aria-hidden="true"], [inert], template') && !hasName(el),
90
+ );
91
+ }
92
+
93
+ /** Warn about each unnamed element, once per check, and return how many there were. */
94
+ export function checkPage(root = document) {
95
+ if (globalThis.lilyWarnings === false) return 0;
96
+ const unnamed = findUnnamed(root);
97
+ for (const el of unnamed) {
98
+ const start = el.cloneNode(false).outerHTML;
99
+ console.warn(`[Lily] ${start} has no accessible name (WCAG 4.1.2).`);
100
+ }
101
+ return unnamed.length;
102
+ }
@@ -0,0 +1,219 @@
1
+ // Generated from shared/wheel-picker.ts by bin/sync-shared-modules; edit the shared module, never this copy.
2
+ /**
3
+ * Keyboard model for a wheel picker: a single-select listbox where the selection follows the cursor (APG listbox, "selection
4
+ * follows focus"), so moving the cursor IS choosing. Pure and framework-neutral, tested without a browser.
5
+ *
6
+ * Disabled options are skipped by every move. Arrows wrap only when `loop` is set; Home, End, PageUp and PageDown never wrap.
7
+ */
8
+
9
+ export const WHEEL_MOVE_KEYS = [
10
+ "ArrowUp",
11
+ "ArrowDown",
12
+ "Home",
13
+ "End",
14
+ "PageUp",
15
+ "PageDown",
16
+ ];
17
+
18
+ /** The axis the options run along. Vertical (the default) moves with ArrowUp / ArrowDown, horizontal with ArrowLeft / ArrowRight. */
19
+
20
+ /**
21
+ * The move a physical key makes on a wheel of this orientation, or undefined when the key does not move it. Horizontal wheels move
22
+ * with ArrowLeft / ArrowRight, swapped when `rtl`, so the arrow always points the way the cursor goes; their ArrowUp / ArrowDown are
23
+ * left to the page. Home, End, PageUp and PageDown move a wheel of either orientation.
24
+ */
25
+ export function wheelMoveKey(
26
+ key ,
27
+ orientation = "vertical",
28
+ rtl = false,
29
+ ) {
30
+ if (key === "Home" || key === "End" || key === "PageUp" || key === "PageDown") return key;
31
+ if (orientation === "horizontal") {
32
+ if (key === "ArrowRight") return rtl ? "ArrowUp" : "ArrowDown";
33
+ if (key === "ArrowLeft") return rtl ? "ArrowDown" : "ArrowUp";
34
+ return undefined;
35
+ }
36
+ return key === "ArrowDown" || key === "ArrowUp" ? key : undefined;
37
+ }
38
+
39
+ /**
40
+ * The enabled option nearest the middle of the list, for a wheel that has stopped scrolling, or -1 when none is enabled.
41
+ * `middles` holds each option's middle along the scrolling axis and `centre` the list's, in the same coordinates (for
42
+ * example from getBoundingClientRect). A tie goes to the earlier option.
43
+ */
44
+ export function wheelIndexNearest(
45
+ options ,
46
+ middles ,
47
+ centre ,
48
+ ) {
49
+ let best = -1;
50
+ let bestDistance = Infinity;
51
+ options.forEach((option, index) => {
52
+ if (option.disabled || middles[index] === undefined) return;
53
+ const distance = Math.abs(middles[index] - centre);
54
+ if (distance < bestDistance) {
55
+ best = index;
56
+ bestDistance = distance;
57
+ }
58
+ });
59
+ return best;
60
+ }
61
+
62
+ /** How long a wheel waits after its last `scroll` event before it counts as settled, where `scrollend` is missing. */
63
+ export const WHEEL_SCROLL_SETTLE_MS = 150;
64
+
65
+ /**
66
+ * Scrolling chooses (spec/detent-lessons, P26-T1). When the user turns `list` (a wheel, a touch, the scroll bar) and it settles
67
+ * (`scrollend`, or WHEEL_SCROLL_SETTLE_MS after the last `scroll` where that event is missing), choose the enabled option
68
+ * nearest the middle, or re-centre the chosen one if the wheel came to rest elsewhere, such as on a disabled option. A scroll
69
+ * with no gesture before it, such as the component's own centring, chooses nothing, so a list whose ends cannot reach the middle
70
+ * never overrides a key or a click. Returns a function that removes the listeners.
71
+ */
72
+ export function watchWheelScroll(list , watch ) {
73
+ let turned = false;
74
+ let timer ;
75
+ const gesture = () => {
76
+ turned = true;
77
+ };
78
+ const clicked = () => {
79
+ turned = false;
80
+ };
81
+ const settle = () => {
82
+ clearTimeout(timer);
83
+ if (!turned || watch.disabled()) return;
84
+ turned = false;
85
+ const horizontal = watch.orientation() === "horizontal";
86
+ const box = list.getBoundingClientRect();
87
+ const centre = horizontal ? box.left + box.width / 2 : box.top + box.height / 2;
88
+ const middles = Array.from(list.querySelectorAll ('[role="option"]'), (el) => {
89
+ const row = el.getBoundingClientRect();
90
+ return horizontal ? row.left + row.width / 2 : row.top + row.height / 2;
91
+ });
92
+ const index = wheelIndexNearest(watch.options(), middles, centre);
93
+ if (index < 0) return;
94
+ if (index !== watch.selected()) watch.choose(index);
95
+ else if (Math.abs(middles[index] - centre) > 1) watch.recentre();
96
+ };
97
+ const scrolled = () => {
98
+ clearTimeout(timer);
99
+ timer = setTimeout(settle, WHEEL_SCROLL_SETTLE_MS);
100
+ };
101
+ const events = [
102
+ ["wheel", gesture],
103
+ ["touchstart", gesture],
104
+ ["pointerdown", gesture],
105
+ ["click", clicked],
106
+ ["scroll", scrolled],
107
+ ["scrollend", settle],
108
+ ];
109
+ for (const [type, handler] of events) list.addEventListener(type, handler, { passive: true });
110
+ return () => {
111
+ clearTimeout(timer);
112
+ for (const [type, handler] of events) list.removeEventListener(type, handler);
113
+ };
114
+ }
115
+
116
+ /** Whether an element is in right-to-left text: the nearest `dir` attribute says "rtl". */
117
+ export function isWheelRtl(element ) {
118
+ return element.closest("[dir]")?.getAttribute("dir")?.toLowerCase() === "rtl";
119
+ }
120
+
121
+ /** Indexes of the options that can be selected. */
122
+ function enabledIndexes(options ) {
123
+ const out = [];
124
+ options.forEach((o, i) => {
125
+ if (!o.disabled) out.push(i);
126
+ });
127
+ return out;
128
+ }
129
+
130
+ /**
131
+ * The index to select after `key`, or -1 when no option can be selected. `current` is the selected index, or -1 for none.
132
+ * With nothing selected, ArrowDown / PageDown / Home choose the first enabled option and ArrowUp / PageUp / End the last.
133
+ */
134
+ export function nextWheelIndex(
135
+ options ,
136
+ current ,
137
+ key ,
138
+ move = {},
139
+ ) {
140
+ const enabled = enabledIndexes(options);
141
+ if (enabled.length === 0) return -1;
142
+ const first = enabled[0];
143
+ const last = enabled[enabled.length - 1];
144
+ const position = enabled.indexOf(current);
145
+ const pageSize = Math.max(1, Math.floor(move.pageSize ?? 5));
146
+
147
+ if (key === "Home") return first;
148
+ if (key === "End") return last;
149
+ if (position === -1) return key === "ArrowDown" || key === "PageDown" ? first : last;
150
+
151
+ switch (key) {
152
+ case "ArrowDown":
153
+ return position + 1 < enabled.length
154
+ ? enabled[position + 1]
155
+ : move.loop
156
+ ? first
157
+ : current;
158
+ case "ArrowUp":
159
+ return position > 0 ? enabled[position - 1] : move.loop ? last : current;
160
+ case "PageDown":
161
+ return enabled[Math.min(enabled.length - 1, position + pageSize)];
162
+ case "PageUp":
163
+ return enabled[Math.max(0, position - pageSize)];
164
+ }
165
+ }
166
+
167
+ /** Lower-case and strip diacritics so "é" is typed with "e". */
168
+ function fold(text ) {
169
+ return text.normalize("NFD").replace(/\p{M}/gu, "").toLocaleLowerCase();
170
+ }
171
+
172
+ export const WHEEL_TYPEAHEAD_RESET_MS = 700;
173
+
174
+ /** The prefix after `key` at time `now`: it grows while presses are within the reset time, else starts over. */
175
+ export function nextWheelPrefix(
176
+ previous ,
177
+ key ,
178
+ now ,
179
+ resetMs = WHEEL_TYPEAHEAD_RESET_MS,
180
+ ) {
181
+ const continuing = previous.prefix !== "" && now - previous.at <= resetMs;
182
+ return { prefix: (continuing ? previous.prefix : "") + key, at: now };
183
+ }
184
+
185
+ /** Whether a key press is a type-ahead character: one printable character other than space, no Ctrl, Alt or Meta. */
186
+ export function isWheelTypeaheadKey(event
187
+
188
+ ) {
189
+ return (
190
+ event.key.length === 1 &&
191
+ event.key !== " " &&
192
+ !event.ctrlKey &&
193
+ !event.altKey &&
194
+ !event.metaKey
195
+ );
196
+ }
197
+
198
+ /**
199
+ * The enabled option to move to for the typed `prefix`, or -1. Searches from the option after `current` and wraps; a prefix of one
200
+ * repeated letter ("ss") counts as that single letter, so pressing it again steps through the options that start with it.
201
+ */
202
+ export function wheelTypeaheadIndex(
203
+ options ,
204
+ current ,
205
+ prefix ,
206
+ ) {
207
+ const folded = fold(prefix);
208
+ if (folded === "" || options.length === 0) return -1;
209
+ const repeated = folded.length > 1 && [...folded].every((c) => c === folded[0]);
210
+ const needle = repeated ? folded[0] : folded;
211
+ const startOffset = needle.length > 1 ? 0 : 1;
212
+ const from = current < 0 ? -startOffset : current;
213
+ for (let step = 0; step < options.length; step++) {
214
+ const index = (from + startOffset + step + options.length) % options.length;
215
+ const option = options[index];
216
+ if (!option.disabled && fold(option.label).startsWith(needle)) return index;
217
+ }
218
+ return -1;
219
+ }