@tanrei/web 0.0.0-stage → 0.1.0-next.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 (781) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +58 -0
  3. package/README.md +9743 -2
  4. package/custom-elements.json +86072 -0
  5. package/dist/THIRD_PARTY_LICENSES.md +136 -0
  6. package/dist/accordion.css +812 -0
  7. package/dist/app-shell.css +493 -0
  8. package/dist/avatar.css +80 -0
  9. package/dist/breadcrumbs.css +511 -0
  10. package/dist/callout.css +65 -0
  11. package/dist/code.css +595 -0
  12. package/dist/components/accordion/accordion.d.ts +197 -0
  13. package/dist/components/accordion/accordion.js +763 -0
  14. package/dist/components/accordion/accordion.js.map +1 -0
  15. package/dist/components/app-bar/app-bar.d.ts +107 -0
  16. package/dist/components/app-bar/app-bar.js +295 -0
  17. package/dist/components/app-bar/app-bar.js.map +1 -0
  18. package/dist/components/app-bar/app-bar.styles.d.ts +12 -0
  19. package/dist/components/app-bar/app-bar.styles.js +223 -0
  20. package/dist/components/app-bar/app-bar.styles.js.map +1 -0
  21. package/dist/components/app-shell/app-shell.d.ts +220 -0
  22. package/dist/components/app-shell/app-shell.js +677 -0
  23. package/dist/components/app-shell/app-shell.js.map +1 -0
  24. package/dist/components/avatar/avatar.d.ts +162 -0
  25. package/dist/components/avatar/avatar.js +390 -0
  26. package/dist/components/avatar/avatar.js.map +1 -0
  27. package/dist/components/avatar/avatar.styles.d.ts +9 -0
  28. package/dist/components/avatar/avatar.styles.js +258 -0
  29. package/dist/components/avatar/avatar.styles.js.map +1 -0
  30. package/dist/components/badge/badge.d.ts +59 -0
  31. package/dist/components/badge/badge.js +176 -0
  32. package/dist/components/badge/badge.js.map +1 -0
  33. package/dist/components/badge/badge.styles.d.ts +1 -0
  34. package/dist/components/badge/badge.styles.js +106 -0
  35. package/dist/components/badge/badge.styles.js.map +1 -0
  36. package/dist/components/bottom-sheet/bottom-sheet.d.ts +207 -0
  37. package/dist/components/bottom-sheet/bottom-sheet.js +724 -0
  38. package/dist/components/bottom-sheet/bottom-sheet.js.map +1 -0
  39. package/dist/components/bottom-sheet/bottom-sheet.styles.d.ts +1 -0
  40. package/dist/components/bottom-sheet/bottom-sheet.styles.js +393 -0
  41. package/dist/components/bottom-sheet/bottom-sheet.styles.js.map +1 -0
  42. package/dist/components/breadcrumbs/breadcrumbs.d.ts +176 -0
  43. package/dist/components/breadcrumbs/breadcrumbs.js +638 -0
  44. package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -0
  45. package/dist/components/breadcrumbs/breadcrumbs.styles.d.ts +1 -0
  46. package/dist/components/breadcrumbs/breadcrumbs.styles.js +225 -0
  47. package/dist/components/breadcrumbs/breadcrumbs.styles.js.map +1 -0
  48. package/dist/components/button/button.d.ts +280 -0
  49. package/dist/components/button/button.js +530 -0
  50. package/dist/components/button/button.js.map +1 -0
  51. package/dist/components/button/button.styles.d.ts +20 -0
  52. package/dist/components/button/button.styles.js +328 -0
  53. package/dist/components/button/button.styles.js.map +1 -0
  54. package/dist/components/button-group/button-group.d.ts +124 -0
  55. package/dist/components/button-group/button-group.js +287 -0
  56. package/dist/components/button-group/button-group.js.map +1 -0
  57. package/dist/components/button-group/button-group.styles.d.ts +1 -0
  58. package/dist/components/button-group/button-group.styles.js +220 -0
  59. package/dist/components/button-group/button-group.styles.js.map +1 -0
  60. package/dist/components/button-with-menu/button-with-menu.d.ts +224 -0
  61. package/dist/components/button-with-menu/button-with-menu.js +635 -0
  62. package/dist/components/button-with-menu/button-with-menu.js.map +1 -0
  63. package/dist/components/button-with-menu/button-with-menu.styles.d.ts +15 -0
  64. package/dist/components/button-with-menu/button-with-menu.styles.js +418 -0
  65. package/dist/components/button-with-menu/button-with-menu.styles.js.map +1 -0
  66. package/dist/components/calendar/calendar.d.ts +380 -0
  67. package/dist/components/calendar/calendar.js +1619 -0
  68. package/dist/components/calendar/calendar.js.map +1 -0
  69. package/dist/components/calendar/calendar.styles.d.ts +11 -0
  70. package/dist/components/calendar/calendar.styles.js +412 -0
  71. package/dist/components/calendar/calendar.styles.js.map +1 -0
  72. package/dist/components/callout/callout.d.ts +157 -0
  73. package/dist/components/callout/callout.js +436 -0
  74. package/dist/components/callout/callout.js.map +1 -0
  75. package/dist/components/callout/callout.styles.d.ts +13 -0
  76. package/dist/components/callout/callout.styles.js +383 -0
  77. package/dist/components/callout/callout.styles.js.map +1 -0
  78. package/dist/components/card/card.d.ts +108 -0
  79. package/dist/components/card/card.js +235 -0
  80. package/dist/components/card/card.js.map +1 -0
  81. package/dist/components/card/card.styles.d.ts +9 -0
  82. package/dist/components/card/card.styles.js +170 -0
  83. package/dist/components/card/card.styles.js.map +1 -0
  84. package/dist/components/carousel/carousel-geometry.d.ts +178 -0
  85. package/dist/components/carousel/carousel-geometry.js +356 -0
  86. package/dist/components/carousel/carousel-geometry.js.map +1 -0
  87. package/dist/components/carousel/carousel.d.ts +401 -0
  88. package/dist/components/carousel/carousel.js +1352 -0
  89. package/dist/components/carousel/carousel.js.map +1 -0
  90. package/dist/components/carousel/carousel.styles.d.ts +4 -0
  91. package/dist/components/carousel/carousel.styles.js +475 -0
  92. package/dist/components/carousel/carousel.styles.js.map +1 -0
  93. package/dist/components/chat-composer/chat-composer.d.ts +482 -0
  94. package/dist/components/chat-composer/chat-composer.js +1374 -0
  95. package/dist/components/chat-composer/chat-composer.js.map +1 -0
  96. package/dist/components/chat-composer/chat-composer.styles.d.ts +9 -0
  97. package/dist/components/chat-composer/chat-composer.styles.js +308 -0
  98. package/dist/components/chat-composer/chat-composer.styles.js.map +1 -0
  99. package/dist/components/checkbox/checkbox.d.ts +135 -0
  100. package/dist/components/checkbox/checkbox.js +296 -0
  101. package/dist/components/checkbox/checkbox.js.map +1 -0
  102. package/dist/components/checkbox/checkbox.styles.d.ts +13 -0
  103. package/dist/components/checkbox/checkbox.styles.js +226 -0
  104. package/dist/components/checkbox/checkbox.styles.js.map +1 -0
  105. package/dist/components/checkbox-group/checkbox-group.d.ts +199 -0
  106. package/dist/components/checkbox-group/checkbox-group.js +500 -0
  107. package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
  108. package/dist/components/chip/chip.d.ts +176 -0
  109. package/dist/components/chip/chip.js +376 -0
  110. package/dist/components/chip/chip.js.map +1 -0
  111. package/dist/components/chip/chip.styles.d.ts +10 -0
  112. package/dist/components/chip/chip.styles.js +465 -0
  113. package/dist/components/chip/chip.styles.js.map +1 -0
  114. package/dist/components/chip-field/chip-field.d.ts +315 -0
  115. package/dist/components/chip-field/chip-field.js +887 -0
  116. package/dist/components/chip-field/chip-field.js.map +1 -0
  117. package/dist/components/code-block/code-block.before.d.ts +2 -0
  118. package/dist/components/code-block/code-block.before.js +193 -0
  119. package/dist/components/code-block/code-block.before.js.map +1 -0
  120. package/dist/components/code-block/code-block.d.ts +268 -0
  121. package/dist/components/code-block/code-block.js +1009 -0
  122. package/dist/components/code-block/code-block.js.map +1 -0
  123. package/dist/components/code-block/code-block.light.d.ts +50 -0
  124. package/dist/components/code-block/code-block.light.js +287 -0
  125. package/dist/components/code-block/code-block.light.js.map +1 -0
  126. package/dist/components/code-block/code-block.lines.d.ts +49 -0
  127. package/dist/components/code-block/code-block.lines.js +75 -0
  128. package/dist/components/code-block/code-block.lines.js.map +1 -0
  129. package/dist/components/code-block/code-block.styles.d.ts +8 -0
  130. package/dist/components/code-block/code-block.styles.js +212 -0
  131. package/dist/components/code-block/code-block.styles.js.map +1 -0
  132. package/dist/components/color-field/color-field.d.ts +120 -0
  133. package/dist/components/color-field/color-field.js +182 -0
  134. package/dist/components/color-field/color-field.js.map +1 -0
  135. package/dist/components/color-input/color-input.d.ts +302 -0
  136. package/dist/components/color-input/color-input.js +748 -0
  137. package/dist/components/color-input/color-input.js.map +1 -0
  138. package/dist/components/color-input/color-input.styles.d.ts +22 -0
  139. package/dist/components/color-input/color-input.styles.js +373 -0
  140. package/dist/components/color-input/color-input.styles.js.map +1 -0
  141. package/dist/components/color-input/color-text.d.ts +48 -0
  142. package/dist/components/color-input/color-text.js +77 -0
  143. package/dist/components/color-input/color-text.js.map +1 -0
  144. package/dist/components/combobox/combobox.d.ts +387 -0
  145. package/dist/components/combobox/combobox.js +1108 -0
  146. package/dist/components/combobox/combobox.js.map +1 -0
  147. package/dist/components/combobox/combobox.styles.d.ts +26 -0
  148. package/dist/components/combobox/combobox.styles.js +497 -0
  149. package/dist/components/combobox/combobox.styles.js.map +1 -0
  150. package/dist/components/combobox-field/combobox-field.d.ts +159 -0
  151. package/dist/components/combobox-field/combobox-field.js +280 -0
  152. package/dist/components/combobox-field/combobox-field.js.map +1 -0
  153. package/dist/components/copy-button/copy-button.d.ts +112 -0
  154. package/dist/components/copy-button/copy-button.js +237 -0
  155. package/dist/components/copy-button/copy-button.js.map +1 -0
  156. package/dist/components/copy-button/copy-button.styles.d.ts +1 -0
  157. package/dist/components/copy-button/copy-button.styles.js +62 -0
  158. package/dist/components/copy-button/copy-button.styles.js.map +1 -0
  159. package/dist/components/date-time-picker/date-time-picker.d.ts +603 -0
  160. package/dist/components/date-time-picker/date-time-picker.js +2537 -0
  161. package/dist/components/date-time-picker/date-time-picker.js.map +1 -0
  162. package/dist/components/date-time-picker/date-time-picker.styles.d.ts +1 -0
  163. package/dist/components/date-time-picker/date-time-picker.styles.js +842 -0
  164. package/dist/components/date-time-picker/date-time-picker.styles.js.map +1 -0
  165. package/dist/components/description-list/description-list.d.ts +133 -0
  166. package/dist/components/description-list/description-list.js +395 -0
  167. package/dist/components/description-list/description-list.js.map +1 -0
  168. package/dist/components/dialog/dialog.d.ts +140 -0
  169. package/dist/components/dialog/dialog.js +440 -0
  170. package/dist/components/dialog/dialog.js.map +1 -0
  171. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  172. package/dist/components/dialog/dialog.styles.js +306 -0
  173. package/dist/components/dialog/dialog.styles.js.map +1 -0
  174. package/dist/components/divider/divider.d.ts +112 -0
  175. package/dist/components/divider/divider.js +331 -0
  176. package/dist/components/divider/divider.js.map +1 -0
  177. package/dist/components/divider/divider.styles.d.ts +6 -0
  178. package/dist/components/divider/divider.styles.js +183 -0
  179. package/dist/components/divider/divider.styles.js.map +1 -0
  180. package/dist/components/embedded-text-input/embedded-text-input.d.ts +246 -0
  181. package/dist/components/embedded-text-input/embedded-text-input.js +673 -0
  182. package/dist/components/embedded-text-input/embedded-text-input.js.map +1 -0
  183. package/dist/components/embedded-text-input/embedded-text-input.styles.d.ts +1 -0
  184. package/dist/components/embedded-text-input/embedded-text-input.styles.js +204 -0
  185. package/dist/components/embedded-text-input/embedded-text-input.styles.js.map +1 -0
  186. package/dist/components/empty-state/empty-state.d.ts +132 -0
  187. package/dist/components/empty-state/empty-state.js +333 -0
  188. package/dist/components/empty-state/empty-state.js.map +1 -0
  189. package/dist/components/empty-state/empty-state.styles.d.ts +11 -0
  190. package/dist/components/empty-state/empty-state.styles.js +218 -0
  191. package/dist/components/empty-state/empty-state.styles.js.map +1 -0
  192. package/dist/components/fab-menu/fab-menu.d.ts +240 -0
  193. package/dist/components/fab-menu/fab-menu.js +605 -0
  194. package/dist/components/fab-menu/fab-menu.js.map +1 -0
  195. package/dist/components/fab-menu/fab-menu.styles.d.ts +21 -0
  196. package/dist/components/fab-menu/fab-menu.styles.js +427 -0
  197. package/dist/components/fab-menu/fab-menu.styles.js.map +1 -0
  198. package/dist/components/field/field.d.ts +165 -0
  199. package/dist/components/field/field.js +399 -0
  200. package/dist/components/field/field.js.map +1 -0
  201. package/dist/components/field/field.styles.d.ts +2 -0
  202. package/dist/components/field/field.styles.js +177 -0
  203. package/dist/components/field/field.styles.js.map +1 -0
  204. package/dist/components/field-group/field-group.d.ts +122 -0
  205. package/dist/components/field-group/field-group.js +246 -0
  206. package/dist/components/field-group/field-group.js.map +1 -0
  207. package/dist/components/field-group/field-group.styles.d.ts +7 -0
  208. package/dist/components/field-group/field-group.styles.js +28 -0
  209. package/dist/components/field-group/field-group.styles.js.map +1 -0
  210. package/dist/components/figure/figure.d.ts +152 -0
  211. package/dist/components/figure/figure.js +435 -0
  212. package/dist/components/figure/figure.js.map +1 -0
  213. package/dist/components/file-item/file-item.d.ts +232 -0
  214. package/dist/components/file-item/file-item.js +665 -0
  215. package/dist/components/file-item/file-item.js.map +1 -0
  216. package/dist/components/file-item/file-item.styles.d.ts +2 -0
  217. package/dist/components/file-item/file-item.styles.js +582 -0
  218. package/dist/components/file-item/file-item.styles.js.map +1 -0
  219. package/dist/components/file-picker/file-picker.d.ts +221 -0
  220. package/dist/components/file-picker/file-picker.js +588 -0
  221. package/dist/components/file-picker/file-picker.js.map +1 -0
  222. package/dist/components/file-picker/file-picker.styles.d.ts +2 -0
  223. package/dist/components/file-picker/file-picker.styles.js +303 -0
  224. package/dist/components/file-picker/file-picker.styles.js.map +1 -0
  225. package/dist/components/file-upload/file-upload.d.ts +353 -0
  226. package/dist/components/file-upload/file-upload.js +939 -0
  227. package/dist/components/file-upload/file-upload.js.map +1 -0
  228. package/dist/components/file-upload/file-upload.styles.d.ts +1 -0
  229. package/dist/components/file-upload/file-upload.styles.js +91 -0
  230. package/dist/components/file-upload/file-upload.styles.js.map +1 -0
  231. package/dist/components/image-preview/image-preview.d.ts +336 -0
  232. package/dist/components/image-preview/image-preview.js +1510 -0
  233. package/dist/components/image-preview/image-preview.js.map +1 -0
  234. package/dist/components/image-preview/image-preview.styles.d.ts +1 -0
  235. package/dist/components/image-preview/image-preview.styles.js +418 -0
  236. package/dist/components/image-preview/image-preview.styles.js.map +1 -0
  237. package/dist/components/keyboard-shortcut/keyboard-shortcut.d.ts +94 -0
  238. package/dist/components/keyboard-shortcut/keyboard-shortcut.js +285 -0
  239. package/dist/components/keyboard-shortcut/keyboard-shortcut.js.map +1 -0
  240. package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.d.ts +11 -0
  241. package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js +155 -0
  242. package/dist/components/keyboard-shortcut/keyboard-shortcut.styles.js.map +1 -0
  243. package/dist/components/link-card/link-card.d.ts +156 -0
  244. package/dist/components/link-card/link-card.js +713 -0
  245. package/dist/components/link-card/link-card.js.map +1 -0
  246. package/dist/components/list/list.d.ts +430 -0
  247. package/dist/components/list/list.js +1230 -0
  248. package/dist/components/list/list.js.map +1 -0
  249. package/dist/components/list/list.styles.d.ts +3 -0
  250. package/dist/components/list/list.styles.js +334 -0
  251. package/dist/components/list/list.styles.js.map +1 -0
  252. package/dist/components/loading-indicator/loading-indicator.d.ts +83 -0
  253. package/dist/components/loading-indicator/loading-indicator.js +195 -0
  254. package/dist/components/loading-indicator/loading-indicator.js.map +1 -0
  255. package/dist/components/loading-indicator/loading-indicator.styles.d.ts +6 -0
  256. package/dist/components/loading-indicator/loading-indicator.styles.js +124 -0
  257. package/dist/components/loading-indicator/loading-indicator.styles.js.map +1 -0
  258. package/dist/components/main-action-button/main-action-button.d.ts +95 -0
  259. package/dist/components/main-action-button/main-action-button.js +202 -0
  260. package/dist/components/main-action-button/main-action-button.js.map +1 -0
  261. package/dist/components/main-action-button/main-action-button.styles.d.ts +10 -0
  262. package/dist/components/main-action-button/main-action-button.styles.js +285 -0
  263. package/dist/components/main-action-button/main-action-button.styles.js.map +1 -0
  264. package/dist/components/menu/menu.d.ts +813 -0
  265. package/dist/components/menu/menu.js +2061 -0
  266. package/dist/components/menu/menu.js.map +1 -0
  267. package/dist/components/menu/menu.styles.d.ts +18 -0
  268. package/dist/components/menu/menu.styles.js +587 -0
  269. package/dist/components/menu/menu.styles.js.map +1 -0
  270. package/dist/components/menubar/menubar.d.ts +477 -0
  271. package/dist/components/menubar/menubar.js +1677 -0
  272. package/dist/components/menubar/menubar.js.map +1 -0
  273. package/dist/components/menubar/menubar.styles.d.ts +43 -0
  274. package/dist/components/menubar/menubar.styles.js +379 -0
  275. package/dist/components/menubar/menubar.styles.js.map +1 -0
  276. package/dist/components/navigation-bar/navigation-bar.d.ts +239 -0
  277. package/dist/components/navigation-bar/navigation-bar.js +544 -0
  278. package/dist/components/navigation-bar/navigation-bar.js.map +1 -0
  279. package/dist/components/navigation-bar/navigation-bar.styles.d.ts +21 -0
  280. package/dist/components/navigation-bar/navigation-bar.styles.js +320 -0
  281. package/dist/components/navigation-bar/navigation-bar.styles.js.map +1 -0
  282. package/dist/components/navigation-drawer/navigation-drawer.d.ts +627 -0
  283. package/dist/components/navigation-drawer/navigation-drawer.js +1917 -0
  284. package/dist/components/navigation-drawer/navigation-drawer.js.map +1 -0
  285. package/dist/components/navigation-drawer/navigation-drawer.styles.d.ts +40 -0
  286. package/dist/components/navigation-drawer/navigation-drawer.styles.js +934 -0
  287. package/dist/components/navigation-drawer/navigation-drawer.styles.js.map +1 -0
  288. package/dist/components/number-field/number-field.d.ts +147 -0
  289. package/dist/components/number-field/number-field.js +252 -0
  290. package/dist/components/number-field/number-field.js.map +1 -0
  291. package/dist/components/number-input/number-input.d.ts +347 -0
  292. package/dist/components/number-input/number-input.js +929 -0
  293. package/dist/components/number-input/number-input.js.map +1 -0
  294. package/dist/components/number-input/number-input.styles.d.ts +22 -0
  295. package/dist/components/number-input/number-input.styles.js +395 -0
  296. package/dist/components/number-input/number-input.styles.js.map +1 -0
  297. package/dist/components/number-input/number-text.d.ts +74 -0
  298. package/dist/components/number-input/number-text.js +230 -0
  299. package/dist/components/number-input/number-text.js.map +1 -0
  300. package/dist/components/one-time-code-field/one-time-code-field.d.ts +94 -0
  301. package/dist/components/one-time-code-field/one-time-code-field.js +135 -0
  302. package/dist/components/one-time-code-field/one-time-code-field.js.map +1 -0
  303. package/dist/components/one-time-code-input/code-text.d.ts +51 -0
  304. package/dist/components/one-time-code-input/code-text.js +145 -0
  305. package/dist/components/one-time-code-input/code-text.js.map +1 -0
  306. package/dist/components/one-time-code-input/one-time-code-input.d.ts +219 -0
  307. package/dist/components/one-time-code-input/one-time-code-input.js +710 -0
  308. package/dist/components/one-time-code-input/one-time-code-input.js.map +1 -0
  309. package/dist/components/one-time-code-input/one-time-code-input.styles.d.ts +8 -0
  310. package/dist/components/one-time-code-input/one-time-code-input.styles.js +323 -0
  311. package/dist/components/one-time-code-input/one-time-code-input.styles.js.map +1 -0
  312. package/dist/components/option/option.d.ts +51 -0
  313. package/dist/components/option/option.js +75 -0
  314. package/dist/components/option/option.js.map +1 -0
  315. package/dist/components/page-header/page-header.d.ts +97 -0
  316. package/dist/components/page-header/page-header.js +258 -0
  317. package/dist/components/page-header/page-header.js.map +1 -0
  318. package/dist/components/popover/popover.d.ts +217 -0
  319. package/dist/components/popover/popover.js +616 -0
  320. package/dist/components/popover/popover.js.map +1 -0
  321. package/dist/components/popover/popover.styles.d.ts +8 -0
  322. package/dist/components/popover/popover.styles.js +299 -0
  323. package/dist/components/popover/popover.styles.js.map +1 -0
  324. package/dist/components/progress-indicator/progress-indicator.d.ts +76 -0
  325. package/dist/components/progress-indicator/progress-indicator.js +165 -0
  326. package/dist/components/progress-indicator/progress-indicator.js.map +1 -0
  327. package/dist/components/progress-indicator/progress-indicator.styles.d.ts +7 -0
  328. package/dist/components/progress-indicator/progress-indicator.styles.js +271 -0
  329. package/dist/components/progress-indicator/progress-indicator.styles.js.map +1 -0
  330. package/dist/components/radio-button/radio-button.d.ts +149 -0
  331. package/dist/components/radio-button/radio-button.js +370 -0
  332. package/dist/components/radio-button/radio-button.js.map +1 -0
  333. package/dist/components/radio-button/radio-button.styles.d.ts +8 -0
  334. package/dist/components/radio-button/radio-button.styles.js +190 -0
  335. package/dist/components/radio-button/radio-button.styles.js.map +1 -0
  336. package/dist/components/radio-group/radio-group.d.ts +188 -0
  337. package/dist/components/radio-group/radio-group.js +380 -0
  338. package/dist/components/radio-group/radio-group.js.map +1 -0
  339. package/dist/components/search/search.d.ts +569 -0
  340. package/dist/components/search/search.js +1801 -0
  341. package/dist/components/search/search.js.map +1 -0
  342. package/dist/components/search/search.styles.d.ts +15 -0
  343. package/dist/components/search/search.styles.js +967 -0
  344. package/dist/components/search/search.styles.js.map +1 -0
  345. package/dist/components/segmented-button/segmented-button.d.ts +183 -0
  346. package/dist/components/segmented-button/segmented-button.js +483 -0
  347. package/dist/components/segmented-button/segmented-button.js.map +1 -0
  348. package/dist/components/segmented-button/segmented-button.styles.d.ts +19 -0
  349. package/dist/components/segmented-button/segmented-button.styles.js +400 -0
  350. package/dist/components/segmented-button/segmented-button.styles.js.map +1 -0
  351. package/dist/components/select/select.d.ts +259 -0
  352. package/dist/components/select/select.js +702 -0
  353. package/dist/components/select/select.js.map +1 -0
  354. package/dist/components/select/select.styles.d.ts +27 -0
  355. package/dist/components/select/select.styles.js +359 -0
  356. package/dist/components/select/select.styles.js.map +1 -0
  357. package/dist/components/select-field/select-field.d.ts +141 -0
  358. package/dist/components/select-field/select-field.js +234 -0
  359. package/dist/components/select-field/select-field.js.map +1 -0
  360. package/dist/components/side-sheet/side-sheet.d.ts +190 -0
  361. package/dist/components/side-sheet/side-sheet.js +592 -0
  362. package/dist/components/side-sheet/side-sheet.js.map +1 -0
  363. package/dist/components/side-sheet/side-sheet.styles.d.ts +9 -0
  364. package/dist/components/side-sheet/side-sheet.styles.js +352 -0
  365. package/dist/components/side-sheet/side-sheet.styles.js.map +1 -0
  366. package/dist/components/skeleton/skeleton.d.ts +157 -0
  367. package/dist/components/skeleton/skeleton.js +550 -0
  368. package/dist/components/skeleton/skeleton.js.map +1 -0
  369. package/dist/components/slider/slider.d.ts +235 -0
  370. package/dist/components/slider/slider.js +792 -0
  371. package/dist/components/slider/slider.js.map +1 -0
  372. package/dist/components/slider/slider.styles.d.ts +6 -0
  373. package/dist/components/slider/slider.styles.js +492 -0
  374. package/dist/components/slider/slider.styles.js.map +1 -0
  375. package/dist/components/slider-field/slider-field.d.ts +150 -0
  376. package/dist/components/slider-field/slider-field.js +269 -0
  377. package/dist/components/slider-field/slider-field.js.map +1 -0
  378. package/dist/components/snackbar/snackbar.d.ts +237 -0
  379. package/dist/components/snackbar/snackbar.js +607 -0
  380. package/dist/components/snackbar/snackbar.js.map +1 -0
  381. package/dist/components/snackbar/snackbar.styles.d.ts +10 -0
  382. package/dist/components/snackbar/snackbar.styles.js +510 -0
  383. package/dist/components/snackbar/snackbar.styles.js.map +1 -0
  384. package/dist/components/switch/switch.d.ts +161 -0
  385. package/dist/components/switch/switch.js +470 -0
  386. package/dist/components/switch/switch.js.map +1 -0
  387. package/dist/components/switch/switch.styles.d.ts +3 -0
  388. package/dist/components/switch/switch.styles.js +440 -0
  389. package/dist/components/switch/switch.styles.js.map +1 -0
  390. package/dist/components/tab-view/tab-view.d.ts +303 -0
  391. package/dist/components/tab-view/tab-view.js +917 -0
  392. package/dist/components/tab-view/tab-view.js.map +1 -0
  393. package/dist/components/tab-view/tab-view.styles.d.ts +19 -0
  394. package/dist/components/tab-view/tab-view.styles.js +85 -0
  395. package/dist/components/tab-view/tab-view.styles.js.map +1 -0
  396. package/dist/components/table/table.d.ts +386 -0
  397. package/dist/components/table/table.js +1320 -0
  398. package/dist/components/table/table.js.map +1 -0
  399. package/dist/components/table-of-contents/table-of-contents.d.ts +227 -0
  400. package/dist/components/table-of-contents/table-of-contents.js +963 -0
  401. package/dist/components/table-of-contents/table-of-contents.js.map +1 -0
  402. package/dist/components/table-of-contents/table-of-contents.styles.d.ts +1 -0
  403. package/dist/components/table-of-contents/table-of-contents.styles.js +243 -0
  404. package/dist/components/table-of-contents/table-of-contents.styles.js.map +1 -0
  405. package/dist/components/tabs/tabs.d.ts +800 -0
  406. package/dist/components/tabs/tabs.js +2183 -0
  407. package/dist/components/tabs/tabs.js.map +1 -0
  408. package/dist/components/tabs/tabs.styles.d.ts +47 -0
  409. package/dist/components/tabs/tabs.styles.js +595 -0
  410. package/dist/components/tabs/tabs.styles.js.map +1 -0
  411. package/dist/components/tag/tag.d.ts +77 -0
  412. package/dist/components/tag/tag.js +143 -0
  413. package/dist/components/tag/tag.js.map +1 -0
  414. package/dist/components/tag/tag.styles.d.ts +13 -0
  415. package/dist/components/tag/tag.styles.js +215 -0
  416. package/dist/components/tag/tag.styles.js.map +1 -0
  417. package/dist/components/tag-group/tag-group.d.ts +110 -0
  418. package/dist/components/tag-group/tag-group.js +298 -0
  419. package/dist/components/tag-group/tag-group.js.map +1 -0
  420. package/dist/components/tag-group/tag-group.styles.d.ts +8 -0
  421. package/dist/components/tag-group/tag-group.styles.js +66 -0
  422. package/dist/components/tag-group/tag-group.styles.js.map +1 -0
  423. package/dist/components/text-field/text-field.d.ts +159 -0
  424. package/dist/components/text-field/text-field.js +272 -0
  425. package/dist/components/text-field/text-field.js.map +1 -0
  426. package/dist/components/text-input/text-input-segments.d.ts +93 -0
  427. package/dist/components/text-input/text-input-segments.js +233 -0
  428. package/dist/components/text-input/text-input-segments.js.map +1 -0
  429. package/dist/components/text-input/text-input.d.ts +683 -0
  430. package/dist/components/text-input/text-input.js +2120 -0
  431. package/dist/components/text-input/text-input.js.map +1 -0
  432. package/dist/components/text-input/text-input.styles.d.ts +27 -0
  433. package/dist/components/text-input/text-input.styles.js +1071 -0
  434. package/dist/components/text-input/text-input.styles.js.map +1 -0
  435. package/dist/components/toolbar/toolbar.d.ts +123 -0
  436. package/dist/components/toolbar/toolbar.js +336 -0
  437. package/dist/components/toolbar/toolbar.js.map +1 -0
  438. package/dist/components/toolbar/toolbar.styles.d.ts +10 -0
  439. package/dist/components/toolbar/toolbar.styles.js +156 -0
  440. package/dist/components/toolbar/toolbar.styles.js.map +1 -0
  441. package/dist/components/tooltip/tooltip-placement.d.ts +22 -0
  442. package/dist/components/tooltip/tooltip-placement.js +15 -0
  443. package/dist/components/tooltip/tooltip-placement.js.map +1 -0
  444. package/dist/components/tooltip/tooltip.d.ts +267 -0
  445. package/dist/components/tooltip/tooltip.js +902 -0
  446. package/dist/components/tooltip/tooltip.js.map +1 -0
  447. package/dist/components/tooltip/tooltip.styles.d.ts +7 -0
  448. package/dist/components/tooltip/tooltip.styles.js +240 -0
  449. package/dist/components/tooltip/tooltip.styles.js.map +1 -0
  450. package/dist/components/tree-view/tree-view.d.ts +264 -0
  451. package/dist/components/tree-view/tree-view.js +1228 -0
  452. package/dist/components/tree-view/tree-view.js.map +1 -0
  453. package/dist/description-list.css +337 -0
  454. package/dist/empty-state.css +70 -0
  455. package/dist/figure.css +381 -0
  456. package/dist/generated/icon-sets.d.ts +9 -0
  457. package/dist/generated/icon-sets.js +18 -0
  458. package/dist/generated/icon-sets.js.map +1 -0
  459. package/dist/generated/words.d.ts +161 -0
  460. package/dist/generated/words.js +91 -0
  461. package/dist/generated/words.js.map +1 -0
  462. package/dist/highlight/grammars/css.d.ts +3 -0
  463. package/dist/highlight/grammars/css.js +56 -0
  464. package/dist/highlight/grammars/css.js.map +1 -0
  465. package/dist/highlight/grammars/dart.d.ts +3 -0
  466. package/dist/highlight/grammars/dart.js +53 -0
  467. package/dist/highlight/grammars/dart.js.map +1 -0
  468. package/dist/highlight/grammars/javascript.d.ts +4 -0
  469. package/dist/highlight/grammars/javascript.js +119 -0
  470. package/dist/highlight/grammars/javascript.js.map +1 -0
  471. package/dist/highlight/grammars/json.d.ts +3 -0
  472. package/dist/highlight/grammars/json.js +19 -0
  473. package/dist/highlight/grammars/json.js.map +1 -0
  474. package/dist/highlight/grammars/kotlin.d.ts +3 -0
  475. package/dist/highlight/grammars/kotlin.js +46 -0
  476. package/dist/highlight/grammars/kotlin.js.map +1 -0
  477. package/dist/highlight/grammars/markup.d.ts +3 -0
  478. package/dist/highlight/grammars/markup.js +45 -0
  479. package/dist/highlight/grammars/markup.js.map +1 -0
  480. package/dist/highlight/grammars/shared.d.ts +25 -0
  481. package/dist/highlight/grammars/shared.js +37 -0
  482. package/dist/highlight/grammars/shared.js.map +1 -0
  483. package/dist/highlight/grammars/shell.d.ts +3 -0
  484. package/dist/highlight/grammars/shell.js +48 -0
  485. package/dist/highlight/grammars/shell.js.map +1 -0
  486. package/dist/highlight/grammars/swift.d.ts +3 -0
  487. package/dist/highlight/grammars/swift.js +46 -0
  488. package/dist/highlight/grammars/swift.js.map +1 -0
  489. package/dist/highlight/grammars/typescript.d.ts +2 -0
  490. package/dist/highlight/grammars/typescript.js +5 -0
  491. package/dist/highlight/grammars/typescript.js.map +1 -0
  492. package/dist/highlight/index.d.ts +104 -0
  493. package/dist/highlight/index.js +331 -0
  494. package/dist/highlight/index.js.map +1 -0
  495. package/dist/icons.css +107 -0
  496. package/dist/icons.d.ts +2 -0
  497. package/dist/icons.js +10 -0
  498. package/dist/icons.js.map +1 -0
  499. package/dist/index.d.ts +85 -0
  500. package/dist/index.js +100 -0
  501. package/dist/index.js.map +1 -0
  502. package/dist/link-card.css +678 -0
  503. package/dist/link.css +728 -0
  504. package/dist/link.d.ts +21 -0
  505. package/dist/link.js +594 -0
  506. package/dist/link.js.map +1 -0
  507. package/dist/links/index.d.ts +136 -0
  508. package/dist/links/index.js +404 -0
  509. package/dist/links/index.js.map +1 -0
  510. package/dist/links/node/address.js +154 -0
  511. package/dist/links/node/cli.js +102 -0
  512. package/dist/links/node/fetcher.js +267 -0
  513. package/dist/links/node/head.js +278 -0
  514. package/dist/links/node/index.d.ts +164 -0
  515. package/dist/links/node/index.js +26 -0
  516. package/dist/links/node/links.js +275 -0
  517. package/dist/links/node/lock.js +86 -0
  518. package/dist/links/node/mark.js +71 -0
  519. package/dist/links/node/options.js +120 -0
  520. package/dist/links/node/pictures.js +265 -0
  521. package/dist/links/node/refresh.js +28 -0
  522. package/dist/menu.css +97 -0
  523. package/dist/menubar.css +69 -0
  524. package/dist/page-header.css +324 -0
  525. package/dist/pagination.css +410 -0
  526. package/dist/pagination.d.ts +6 -0
  527. package/dist/pagination.js +256 -0
  528. package/dist/pagination.js.map +1 -0
  529. package/dist/primitives/actions.d.ts +75 -0
  530. package/dist/primitives/actions.js +142 -0
  531. package/dist/primitives/actions.js.map +1 -0
  532. package/dist/primitives/after-click.d.ts +8 -0
  533. package/dist/primitives/after-click.js +21 -0
  534. package/dist/primitives/after-click.js.map +1 -0
  535. package/dist/primitives/anchored.d.ts +134 -0
  536. package/dist/primitives/anchored.js +425 -0
  537. package/dist/primitives/anchored.js.map +1 -0
  538. package/dist/primitives/arc.d.ts +13 -0
  539. package/dist/primitives/arc.js +49 -0
  540. package/dist/primitives/arc.js.map +1 -0
  541. package/dist/primitives/arrow.d.ts +47 -0
  542. package/dist/primitives/arrow.js +159 -0
  543. package/dist/primitives/arrow.js.map +1 -0
  544. package/dist/primitives/auto-height.d.ts +56 -0
  545. package/dist/primitives/auto-height.js +150 -0
  546. package/dist/primitives/auto-height.js.map +1 -0
  547. package/dist/primitives/autofocus.d.ts +11 -0
  548. package/dist/primitives/autofocus.js +26 -0
  549. package/dist/primitives/autofocus.js.map +1 -0
  550. package/dist/primitives/availability.d.ts +32 -0
  551. package/dist/primitives/availability.js +122 -0
  552. package/dist/primitives/availability.js.map +1 -0
  553. package/dist/primitives/axes.d.ts +45 -0
  554. package/dist/primitives/axes.js +72 -0
  555. package/dist/primitives/axes.js.map +1 -0
  556. package/dist/primitives/behavior.d.ts +14 -0
  557. package/dist/primitives/behavior.js +19 -0
  558. package/dist/primitives/behavior.js.map +1 -0
  559. package/dist/primitives/calendar-date.d.ts +79 -0
  560. package/dist/primitives/calendar-date.js +135 -0
  561. package/dist/primitives/calendar-date.js.map +1 -0
  562. package/dist/primitives/composed.d.ts +144 -0
  563. package/dist/primitives/composed.js +303 -0
  564. package/dist/primitives/composed.js.map +1 -0
  565. package/dist/primitives/default-button.d.ts +49 -0
  566. package/dist/primitives/default-button.js +270 -0
  567. package/dist/primitives/default-button.js.map +1 -0
  568. package/dist/primitives/description.d.ts +18 -0
  569. package/dist/primitives/description.js +18 -0
  570. package/dist/primitives/description.js.map +1 -0
  571. package/dist/primitives/destination.d.ts +259 -0
  572. package/dist/primitives/destination.js +651 -0
  573. package/dist/primitives/destination.js.map +1 -0
  574. package/dist/primitives/direction.d.ts +23 -0
  575. package/dist/primitives/direction.js +90 -0
  576. package/dist/primitives/direction.js.map +1 -0
  577. package/dist/primitives/disabled-while-focused.d.ts +46 -0
  578. package/dist/primitives/disabled-while-focused.js +126 -0
  579. package/dist/primitives/disabled-while-focused.js.map +1 -0
  580. package/dist/primitives/disclosure.d.ts +9 -0
  581. package/dist/primitives/disclosure.js +15 -0
  582. package/dist/primitives/disclosure.js.map +1 -0
  583. package/dist/primitives/dismiss.d.ts +88 -0
  584. package/dist/primitives/dismiss.js +232 -0
  585. package/dist/primitives/dismiss.js.map +1 -0
  586. package/dist/primitives/field-frame.d.ts +166 -0
  587. package/dist/primitives/field-frame.js +358 -0
  588. package/dist/primitives/field-frame.js.map +1 -0
  589. package/dist/primitives/field-group-frame.d.ts +59 -0
  590. package/dist/primitives/field-group-frame.js +174 -0
  591. package/dist/primitives/field-group-frame.js.map +1 -0
  592. package/dist/primitives/field-trigger.d.ts +117 -0
  593. package/dist/primitives/field-trigger.js +387 -0
  594. package/dist/primitives/field-trigger.js.map +1 -0
  595. package/dist/primitives/field.d.ts +186 -0
  596. package/dist/primitives/field.js +349 -0
  597. package/dist/primitives/field.js.map +1 -0
  598. package/dist/primitives/file-format.d.ts +23 -0
  599. package/dist/primitives/file-format.js +185 -0
  600. package/dist/primitives/file-format.js.map +1 -0
  601. package/dist/primitives/file-item-holder.d.ts +45 -0
  602. package/dist/primitives/file-item-holder.js +39 -0
  603. package/dist/primitives/file-item-holder.js.map +1 -0
  604. package/dist/primitives/focus-order.d.ts +11 -0
  605. package/dist/primitives/focus-order.js +11 -0
  606. package/dist/primitives/focus-order.js.map +1 -0
  607. package/dist/primitives/focus-ring.d.ts +76 -0
  608. package/dist/primitives/focus-ring.js +230 -0
  609. package/dist/primitives/focus-ring.js.map +1 -0
  610. package/dist/primitives/follow.d.ts +65 -0
  611. package/dist/primitives/follow.js +283 -0
  612. package/dist/primitives/follow.js.map +1 -0
  613. package/dist/primitives/form-disabled.d.ts +20 -0
  614. package/dist/primitives/form-disabled.js +46 -0
  615. package/dist/primitives/form-disabled.js.map +1 -0
  616. package/dist/primitives/form-says.d.ts +33 -0
  617. package/dist/primitives/form-says.js +45 -0
  618. package/dist/primitives/form-says.js.map +1 -0
  619. package/dist/primitives/forward.d.ts +13 -0
  620. package/dist/primitives/forward.js +28 -0
  621. package/dist/primitives/forward.js.map +1 -0
  622. package/dist/primitives/glyph-mirror.d.ts +77 -0
  623. package/dist/primitives/glyph-mirror.js +211 -0
  624. package/dist/primitives/glyph-mirror.js.map +1 -0
  625. package/dist/primitives/glyph-pending.d.ts +17 -0
  626. package/dist/primitives/glyph-pending.js +91 -0
  627. package/dist/primitives/glyph-pending.js.map +1 -0
  628. package/dist/primitives/glyph.d.ts +53 -0
  629. package/dist/primitives/glyph.js +161 -0
  630. package/dist/primitives/glyph.js.map +1 -0
  631. package/dist/primitives/group-item.d.ts +128 -0
  632. package/dist/primitives/group-item.js +334 -0
  633. package/dist/primitives/group-item.js.map +1 -0
  634. package/dist/primitives/hidden.d.ts +2 -0
  635. package/dist/primitives/hidden.js +23 -0
  636. package/dist/primitives/hidden.js.map +1 -0
  637. package/dist/primitives/host-aria.d.ts +8 -0
  638. package/dist/primitives/host-aria.js +18 -0
  639. package/dist/primitives/host-aria.js.map +1 -0
  640. package/dist/primitives/index.d.ts +59 -0
  641. package/dist/primitives/index.js +189 -0
  642. package/dist/primitives/index.js.map +1 -0
  643. package/dist/primitives/indicator-drag.d.ts +90 -0
  644. package/dist/primitives/indicator-drag.js +207 -0
  645. package/dist/primitives/indicator-drag.js.map +1 -0
  646. package/dist/primitives/interactive.d.ts +13 -0
  647. package/dist/primitives/interactive.js +67 -0
  648. package/dist/primitives/interactive.js.map +1 -0
  649. package/dist/primitives/item-row.d.ts +34 -0
  650. package/dist/primitives/item-row.js +76 -0
  651. package/dist/primitives/item-row.js.map +1 -0
  652. package/dist/primitives/item-update.d.ts +2 -0
  653. package/dist/primitives/item-update.js +12 -0
  654. package/dist/primitives/item-update.js.map +1 -0
  655. package/dist/primitives/kept-length.d.ts +34 -0
  656. package/dist/primitives/kept-length.js +154 -0
  657. package/dist/primitives/kept-length.js.map +1 -0
  658. package/dist/primitives/keyboard-convention.d.ts +30 -0
  659. package/dist/primitives/keyboard-convention.js +88 -0
  660. package/dist/primitives/keyboard-convention.js.map +1 -0
  661. package/dist/primitives/label-lines.d.ts +12 -0
  662. package/dist/primitives/label-lines.js +34 -0
  663. package/dist/primitives/label-lines.js.map +1 -0
  664. package/dist/primitives/layout-scale.d.ts +18 -0
  665. package/dist/primitives/layout-scale.js +35 -0
  666. package/dist/primitives/layout-scale.js.map +1 -0
  667. package/dist/primitives/link.d.ts +147 -0
  668. package/dist/primitives/link.js +204 -0
  669. package/dist/primitives/link.js.map +1 -0
  670. package/dist/primitives/locale-date.d.ts +132 -0
  671. package/dist/primitives/locale-date.js +508 -0
  672. package/dist/primitives/locale-date.js.map +1 -0
  673. package/dist/primitives/missing-value.d.ts +16 -0
  674. package/dist/primitives/missing-value.js +31 -0
  675. package/dist/primitives/missing-value.js.map +1 -0
  676. package/dist/primitives/modal.d.ts +38 -0
  677. package/dist/primitives/modal.js +175 -0
  678. package/dist/primitives/modal.js.map +1 -0
  679. package/dist/primitives/native-text.d.ts +51 -0
  680. package/dist/primitives/native-text.js +77 -0
  681. package/dist/primitives/native-text.js.map +1 -0
  682. package/dist/primitives/natural-height.d.ts +21 -0
  683. package/dist/primitives/natural-height.js +36 -0
  684. package/dist/primitives/natural-height.js.map +1 -0
  685. package/dist/primitives/option-list.d.ts +314 -0
  686. package/dist/primitives/option-list.js +1098 -0
  687. package/dist/primitives/option-list.js.map +1 -0
  688. package/dist/primitives/overlay-focus.d.ts +48 -0
  689. package/dist/primitives/overlay-focus.js +152 -0
  690. package/dist/primitives/overlay-focus.js.map +1 -0
  691. package/dist/primitives/placement.d.ts +131 -0
  692. package/dist/primitives/placement.js +144 -0
  693. package/dist/primitives/placement.js.map +1 -0
  694. package/dist/primitives/places.d.ts +44 -0
  695. package/dist/primitives/places.js +98 -0
  696. package/dist/primitives/places.js.map +1 -0
  697. package/dist/primitives/press.d.ts +90 -0
  698. package/dist/primitives/press.js +153 -0
  699. package/dist/primitives/press.js.map +1 -0
  700. package/dist/primitives/report.d.ts +17 -0
  701. package/dist/primitives/report.js +34 -0
  702. package/dist/primitives/report.js.map +1 -0
  703. package/dist/primitives/ripple.d.ts +40 -0
  704. package/dist/primitives/ripple.js +70 -0
  705. package/dist/primitives/ripple.js.map +1 -0
  706. package/dist/primitives/roving.d.ts +41 -0
  707. package/dist/primitives/roving.js +71 -0
  708. package/dist/primitives/roving.js.map +1 -0
  709. package/dist/primitives/selection.d.ts +134 -0
  710. package/dist/primitives/selection.js +287 -0
  711. package/dist/primitives/selection.js.map +1 -0
  712. package/dist/primitives/separation.d.ts +28 -0
  713. package/dist/primitives/separation.js +96 -0
  714. package/dist/primitives/separation.js.map +1 -0
  715. package/dist/primitives/shared-choice.d.ts +33 -0
  716. package/dist/primitives/shared-choice.js +110 -0
  717. package/dist/primitives/shared-choice.js.map +1 -0
  718. package/dist/primitives/sheet.d.ts +63 -0
  719. package/dist/primitives/sheet.js +139 -0
  720. package/dist/primitives/sheet.js.map +1 -0
  721. package/dist/primitives/sheets.d.ts +8 -0
  722. package/dist/primitives/sheets.js +96 -0
  723. package/dist/primitives/sheets.js.map +1 -0
  724. package/dist/primitives/states.d.ts +33 -0
  725. package/dist/primitives/states.js +30 -0
  726. package/dist/primitives/states.js.map +1 -0
  727. package/dist/primitives/system-watch.d.ts +9 -0
  728. package/dist/primitives/system-watch.js +29 -0
  729. package/dist/primitives/system-watch.js.map +1 -0
  730. package/dist/primitives/target.d.ts +21 -0
  731. package/dist/primitives/target.js +79 -0
  732. package/dist/primitives/target.js.map +1 -0
  733. package/dist/primitives/values.d.ts +6 -0
  734. package/dist/primitives/values.js +22 -0
  735. package/dist/primitives/values.js.map +1 -0
  736. package/dist/primitives/visibility.d.ts +12 -0
  737. package/dist/primitives/visibility.js +50 -0
  738. package/dist/primitives/visibility.js.map +1 -0
  739. package/dist/primitives/words.d.ts +81 -0
  740. package/dist/primitives/words.js +236 -0
  741. package/dist/primitives/words.js.map +1 -0
  742. package/dist/prose.css +1917 -0
  743. package/dist/registry.d.ts +182 -0
  744. package/dist/registry.js +2 -0
  745. package/dist/registry.js.map +1 -0
  746. package/dist/shape.css +21 -0
  747. package/dist/skeleton.css +428 -0
  748. package/dist/steps.css +231 -0
  749. package/dist/steps.d.ts +6 -0
  750. package/dist/steps.js +156 -0
  751. package/dist/steps.js.map +1 -0
  752. package/dist/styles/icons.d.ts +62 -0
  753. package/dist/styles/icons.js +237 -0
  754. package/dist/styles/icons.js.map +1 -0
  755. package/dist/styles/product-text.d.ts +66 -0
  756. package/dist/styles/product-text.js +114 -0
  757. package/dist/styles/product-text.js.map +1 -0
  758. package/dist/styles/registered-properties.d.ts +6 -0
  759. package/dist/styles/registered-properties.js +68 -0
  760. package/dist/styles/registered-properties.js.map +1 -0
  761. package/dist/styles/shape.d.ts +59 -0
  762. package/dist/styles/shape.js +95 -0
  763. package/dist/styles/shape.js.map +1 -0
  764. package/dist/systems/cupertino.css +8793 -0
  765. package/dist/systems/m3-expressive-like.css +8786 -0
  766. package/dist/systems/m3-like.css +8748 -0
  767. package/dist/table-of-contents.css +482 -0
  768. package/dist/table.css +902 -0
  769. package/dist/tanrei.bundle.js +26644 -0
  770. package/dist/tanrei.bundle.js.map +7 -0
  771. package/dist/text.css +104 -0
  772. package/dist/timeline.css +410 -0
  773. package/dist/timeline.d.ts +6 -0
  774. package/dist/timeline.js +176 -0
  775. package/dist/timeline.js.map +1 -0
  776. package/dist/tokens.css +8801 -0
  777. package/dist/tree-view.css +797 -0
  778. package/dist/words.d.ts +2 -0
  779. package/dist/words.js +6 -0
  780. package/dist/words.js.map +1 -0
  781. package/package.json +132 -3
@@ -0,0 +1,763 @@
1
+ import { ReactiveElement } from 'lit';
2
+ import { AvailabilityController, PressController, SEPARATIONS, SEPARATION_VALUES, compChoice, findInteractive, lineArrow, report, styleQueries, syncFocusStyle, } from '../../primitives/index.js';
3
+ import { DRAWN_WIDTH } from '../../primitives/glyph.js';
4
+ import { debugBuild } from '../../primitives/report.js';
5
+ import { adopt, adoptUnlessDrawn } from '../../primitives/sheets.js';
6
+ const ACCORDION_CSS = (() => {
7
+ try {
8
+ return "@layer tanrei.components {\n:where(tanrei-accordion) > :where(details),\n:where(tanrei-accordion) > :where(details) > :where(summary) {\n& {\n--tanrei-corner-pill: 0;\n}\n& {\n--_corner-scale: 1;\nborder-radius: calc(var(--tanrei-corner-radius) * var(--_corner-scale));\n}\n@supports (corner-shape: superellipse(log(2, 2))) {\n& {\n--_corner-smoothing: calc(var(--tanrei-sys-shape-corner-smoothing, 0) * (1 - var(--tanrei-corner-pill, 0)));\n--_corner-scale: calc(1 + 0.4 * var(--_corner-smoothing));\ncorner-shape: superellipse(log(calc(2 + var(--_corner-smoothing)), 2));\n}\n}\n&::before,\n&::after {\ncorner-shape: inherit;\n}\n}\n:where(tanrei-accordion) {\n--_acc-container: var(--tanrei-comp-accordion-plain-container-color);\n--_acc-label: var(--tanrei-comp-accordion-plain-label-color);\n--_acc-supporting: var(--tanrei-comp-accordion-plain-supporting-text-color);\n--_acc-trailing: var(--tanrei-comp-accordion-plain-trailing-text-color);\n--_acc-icon: var(--tanrei-comp-accordion-plain-icon-color);\n--_acc-chevron: var(--tanrei-comp-accordion-plain-chevron-color);\n--_acc-hovered-container: var(--tanrei-comp-accordion-plain-hovered-container-color);\n--_acc-hovered-label: var(--tanrei-comp-accordion-plain-hovered-label-color);\n--_acc-hovered-supporting: var(--tanrei-comp-accordion-plain-hovered-supporting-text-color);\n--_acc-hovered-trailing: var(--tanrei-comp-accordion-plain-hovered-trailing-text-color);\n--_acc-hovered-icon: var(--tanrei-comp-accordion-plain-hovered-icon-color);\n--_acc-hovered-chevron: var(--tanrei-comp-accordion-plain-hovered-chevron-color);\n--_acc-focused-container: var(--tanrei-comp-accordion-plain-focused-container-color);\n--_acc-focused-label: var(--tanrei-comp-accordion-plain-focused-label-color);\n--_acc-focused-supporting: var(--tanrei-comp-accordion-plain-focused-supporting-text-color);\n--_acc-focused-trailing: var(--tanrei-comp-accordion-plain-focused-trailing-text-color);\n--_acc-focused-icon: var(--tanrei-comp-accordion-plain-focused-icon-color);\n--_acc-focused-chevron: var(--tanrei-comp-accordion-plain-focused-chevron-color);\n--_acc-pressed-container: var(--tanrei-comp-accordion-plain-pressed-container-color);\n--_acc-pressed-label: var(--tanrei-comp-accordion-plain-pressed-label-color);\n--_acc-pressed-supporting: var(--tanrei-comp-accordion-plain-pressed-supporting-text-color);\n--_acc-pressed-trailing: var(--tanrei-comp-accordion-plain-pressed-trailing-text-color);\n--_acc-pressed-icon: var(--tanrei-comp-accordion-plain-pressed-icon-color);\n--_acc-pressed-chevron: var(--tanrei-comp-accordion-plain-pressed-chevron-color);\n--_acc-disabled-container: var(--tanrei-comp-accordion-plain-disabled-container-color);\n--_acc-disabled-label: var(--tanrei-comp-accordion-plain-disabled-label-color);\n--_acc-disabled-supporting: var(--tanrei-comp-accordion-plain-disabled-supporting-text-color);\n--_acc-disabled-trailing: var(--tanrei-comp-accordion-plain-disabled-trailing-text-color);\n--_acc-disabled-icon: var(--tanrei-comp-accordion-plain-disabled-icon-color);\n--_acc-disabled-chevron: var(--tanrei-comp-accordion-plain-disabled-chevron-color);\n--_acc-height: var(--tanrei-comp-accordion-container-height-regular);\n--_acc-pad-block: var(--tanrei-comp-accordion-container-padding-block-regular);\n--_acc-pad-inline: var(--tanrei-comp-accordion-container-padding-inline-regular);\n--_acc-label-font: var(--tanrei-comp-accordion-label-typescale-regular-font);\n--_acc-label-tracking: var(--tanrei-comp-accordion-label-typescale-regular-letter-spacing);\n--_acc-supporting-font: var(--tanrei-comp-accordion-supporting-text-typescale-regular-font);\n--_acc-supporting-tracking: var(--tanrei-comp-accordion-supporting-text-typescale-regular-letter-spacing);\n--_acc-trailing-font: var(--tanrei-comp-accordion-trailing-text-typescale-regular-font);\n--_acc-trailing-tracking: var(--tanrei-comp-accordion-trailing-text-typescale-regular-letter-spacing);\n--_acc-icon-size: var(--tanrei-comp-accordion-icon-size-regular);\n--_acc-chevron-size: var(--tanrei-comp-accordion-chevron-size-regular);\n--_acc-content-end: var(--tanrei-comp-accordion-content-padding-block-end-regular);\n--_acc-separation: var(--tanrei-comp-accordion-separation);\n--_acc-line-color: var(--tanrei-comp-accordion-divider-color);\n--_acc-edge-color: var(--tanrei-comp-accordion-outline-color);\n--_acc-start: left;\ndisplay: grid;\ngrid-template-columns: minmax(0, 1fr);\nbox-sizing: border-box;\nmargin: 0;\npadding: 0;\n}\n:where(tanrei-accordion[hidden], tanrei-accordion:not(:has(> details))) {\ndisplay: none;\n}\n:where(tanrei-accordion):dir(rtl) {\n--_acc-start: right;\n}\n:where(tanrei-accordion[density='compact']) {\n--_acc-height: var(--tanrei-comp-accordion-container-height-compact);\n--_acc-pad-block: var(--tanrei-comp-accordion-container-padding-block-compact);\n--_acc-pad-inline: var(--tanrei-comp-accordion-container-padding-inline-compact);\n--_acc-label-font: var(--tanrei-comp-accordion-label-typescale-compact-font);\n--_acc-label-tracking: var(--tanrei-comp-accordion-label-typescale-compact-letter-spacing);\n--_acc-supporting-font: var(--tanrei-comp-accordion-supporting-text-typescale-compact-font);\n--_acc-supporting-tracking: var(--tanrei-comp-accordion-supporting-text-typescale-compact-letter-spacing);\n--_acc-trailing-font: var(--tanrei-comp-accordion-trailing-text-typescale-compact-font);\n--_acc-trailing-tracking: var(--tanrei-comp-accordion-trailing-text-typescale-compact-letter-spacing);\n--_acc-icon-size: var(--tanrei-comp-accordion-icon-size-compact);\n--_acc-chevron-size: var(--tanrei-comp-accordion-chevron-size-compact);\n--_acc-content-end: var(--tanrei-comp-accordion-content-padding-block-end-compact);\n}\n:where(tanrei-accordion[separation='divider']) {\n--_acc-separation: divider;\n}\n:where(tanrei-accordion[separation='gap']) {\n--_acc-separation: gap;\n}\n:where(tanrei-accordion[variant='outlined']) {\n--_acc-container: var(--tanrei-comp-accordion-outlined-container-color);\n--_acc-label: var(--tanrei-comp-accordion-outlined-label-color);\n--_acc-supporting: var(--tanrei-comp-accordion-outlined-supporting-text-color);\n--_acc-trailing: var(--tanrei-comp-accordion-outlined-trailing-text-color);\n--_acc-icon: var(--tanrei-comp-accordion-outlined-icon-color);\n--_acc-chevron: var(--tanrei-comp-accordion-outlined-chevron-color);\n--_acc-hovered-container: var(--tanrei-comp-accordion-outlined-hovered-container-color);\n--_acc-hovered-label: var(--tanrei-comp-accordion-outlined-hovered-label-color);\n--_acc-hovered-supporting: var(--tanrei-comp-accordion-outlined-hovered-supporting-text-color);\n--_acc-hovered-trailing: var(--tanrei-comp-accordion-outlined-hovered-trailing-text-color);\n--_acc-hovered-icon: var(--tanrei-comp-accordion-outlined-hovered-icon-color);\n--_acc-hovered-chevron: var(--tanrei-comp-accordion-outlined-hovered-chevron-color);\n--_acc-focused-container: var(--tanrei-comp-accordion-outlined-focused-container-color);\n--_acc-focused-label: var(--tanrei-comp-accordion-outlined-focused-label-color);\n--_acc-focused-supporting: var(--tanrei-comp-accordion-outlined-focused-supporting-text-color);\n--_acc-focused-trailing: var(--tanrei-comp-accordion-outlined-focused-trailing-text-color);\n--_acc-focused-icon: var(--tanrei-comp-accordion-outlined-focused-icon-color);\n--_acc-focused-chevron: var(--tanrei-comp-accordion-outlined-focused-chevron-color);\n--_acc-pressed-container: var(--tanrei-comp-accordion-outlined-pressed-container-color);\n--_acc-pressed-label: var(--tanrei-comp-accordion-outlined-pressed-label-color);\n--_acc-pressed-supporting: var(--tanrei-comp-accordion-outlined-pressed-supporting-text-color);\n--_acc-pressed-trailing: var(--tanrei-comp-accordion-outlined-pressed-trailing-text-color);\n--_acc-pressed-icon: var(--tanrei-comp-accordion-outlined-pressed-icon-color);\n--_acc-pressed-chevron: var(--tanrei-comp-accordion-outlined-pressed-chevron-color);\n--_acc-disabled-container: var(--tanrei-comp-accordion-outlined-disabled-container-color);\n--_acc-disabled-label: var(--tanrei-comp-accordion-outlined-disabled-label-color);\n--_acc-disabled-supporting: var(--tanrei-comp-accordion-outlined-disabled-supporting-text-color);\n--_acc-disabled-trailing: var(--tanrei-comp-accordion-outlined-disabled-trailing-text-color);\n--_acc-disabled-icon: var(--tanrei-comp-accordion-outlined-disabled-icon-color);\n--_acc-disabled-chevron: var(--tanrei-comp-accordion-outlined-disabled-chevron-color);\n}\n:where(tanrei-accordion) > :where(details) {\n--tanrei-corner-radius: 0px;\n--tanrei-corner-pill: 0;\n--_acc-open: 0;\n--_acc-line-width: 0px;\nposition: relative;\nisolation: isolate;\nbox-sizing: border-box;\nmin-inline-size: 0;\nmargin: 0;\npadding: 0;\nborder: 0;\ntransition: --_acc-open var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing) allow-discrete;\n}\n:where(tanrei-accordion) > :where(details[open]) {\n--_acc-open: 1;\n}\n:where(tanrei-accordion) > :where(details ~ details) {\n--_acc-line-width: var(--tanrei-comp-accordion-divider-thickness);\n}\n:where(tanrei-accordion) > :where(details)::before {\ncontent: '';\nposition: absolute;\nz-index: -1;\ninset-inline: 0;\ninset-block-start: 0;\nborder-block-start: var(--_acc-line-width) solid var(--_acc-line-color);\npointer-events: none;\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details) {\n--tanrei-corner-radius: var(--tanrei-comp-accordion-outline-shape);\n--tanrei-corner-pill: var(--tanrei-comp-accordion-outline-shape-pill, 0);\n--_acc-edge: var(--tanrei-comp-accordion-outline-width);\n--_acc-edge-start: 0px;\n--_acc-edge-end: 0px;\n--_acc-corner: calc(var(--tanrei-corner-radius) * var(--_corner-scale));\n--_acc-corner-start: 0px;\n--_acc-corner-end: 0px;\noverflow: clip;\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details:first-of-type) {\n--_acc-edge-start: var(--_acc-edge);\n--_acc-corner-start: var(--_acc-corner);\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details:last-of-type) {\n--_acc-edge-end: var(--_acc-edge);\n--_acc-corner-end: var(--_acc-corner);\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details:not(:first-of-type)) {\nborder-start-start-radius: 0;\nborder-start-end-radius: 0;\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details:not(:last-of-type)) {\nborder-end-start-radius: 0;\nborder-end-end-radius: 0;\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details)::after {\ncontent: '';\nposition: absolute;\nz-index: -1;\ninset: 0;\nborder: 0 solid var(--_acc-edge-color);\nborder-inline-width: var(--_acc-edge);\nborder-block-start-width: var(--_acc-edge-start);\nborder-block-end-width: var(--_acc-edge-end);\nborder-radius: inherit;\npointer-events: none;\n}\n@container style(--_acc-separation: gap) {\n:where(tanrei-accordion) > :where(details ~ details) {\n--_acc-line-width: 0px;\nmargin-block-start: var(--tanrei-comp-accordion-item-gap);\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details) {\n--_acc-edge-start: var(--_acc-edge);\n--_acc-edge-end: var(--_acc-edge);\n--_acc-corner-start: var(--_acc-corner);\n--_acc-corner-end: var(--_acc-corner);\nborder-radius: calc(var(--tanrei-corner-radius) * var(--_corner-scale));\n}\n}\n:where(tanrei-accordion[data-separation='gap']) > :where(details ~ details) {\n--_acc-line-width: 0px;\nmargin-block-start: var(--tanrei-comp-accordion-item-gap);\n}\n:where(tanrei-accordion[data-separation='gap'][variant='outlined']) > :where(details) {\n--_acc-edge-start: var(--_acc-edge);\n--_acc-edge-end: var(--_acc-edge);\n--_acc-corner-start: var(--_acc-corner);\n--_acc-corner-end: var(--_acc-corner);\nborder-radius: calc(var(--tanrei-corner-radius) * var(--_corner-scale));\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) {\n--_acc-now-container: var(--_acc-container);\n--_acc-now-label: var(--_acc-label);\n--_acc-now-supporting: var(--_acc-supporting);\n--_acc-now-trailing: var(--_acc-trailing);\n--_acc-now-icon: var(--_acc-icon);\n--_acc-now-chevron: var(--_acc-chevron);\n--_acc-target: var(--tanrei-sys-target-pointer);\n--tanrei-corner-radius: var(--tanrei-comp-accordion-container-shape);\n--tanrei-corner-pill: var(--tanrei-comp-accordion-container-shape-pill, 0);\nposition: relative;\nisolation: isolate;\ndisplay: grid;\ngrid-template-columns: [text] minmax(0, 1fr) [chevron] auto;\ncolumn-gap: var(--tanrei-comp-accordion-container-gap);\nalign-content: center;\nalign-items: start;\nbox-sizing: border-box;\nmin-block-size: max(var(--_acc-height), var(--_acc-target));\nmargin: 0;\npadding-block: var(--_acc-pad-block);\npadding-inline: var(--_acc-pad-inline);\nlist-style: none;\nfont: var(--_acc-label-font);\nletter-spacing: var(--_acc-label-tracking);\ncolor: var(--_acc-now-label);\ntext-align: var(--_acc-start);\noverflow-wrap: break-word;\nbackground-color: var(--_acc-now-container);\n--_acc-held-image: none;\n--_acc-held-clip: border-box;\nbackground-image: var(--_acc-held-image);\nbackground-clip: var(--_acc-held-clip);\ncursor: pointer;\n-webkit-user-select: none;\nuser-select: none;\n-webkit-tap-highlight-color: transparent;\ntransition:\n--_acc-held-image 0s linear var(--tanrei-sys-motion-duration-press-hold),\n--_acc-held-clip 0s linear var(--tanrei-sys-motion-duration-press-hold),\nbackground-color var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing),\ncolor var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing),\nopacity var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing);\ntransition-behavior: allow-discrete;\n}\n@media (pointer: coarse) {\n:where(tanrei-accordion) > :where(details) > :where(summary) {\n--_acc-target: var(--tanrei-sys-target-touch);\n}\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details) > :where(summary) {\nborder-start-start-radius: max(calc(var(--tanrei-corner-radius) * var(--_corner-scale)), var(--_acc-corner-start));\nborder-start-end-radius: max(calc(var(--tanrei-corner-radius) * var(--_corner-scale)), var(--_acc-corner-start));\n}\n:where(tanrei-accordion[variant='outlined']) > :where(details:not([open])) > :where(summary) {\nborder-end-start-radius: max(calc(var(--tanrei-corner-radius) * var(--_corner-scale)), var(--_acc-corner-end));\nborder-end-end-radius: max(calc(var(--tanrei-corner-radius) * var(--_corner-scale)), var(--_acc-corner-end));\n}\n:where(tanrei-accordion) > :where(details) > :where(summary)::-webkit-details-marker {\ndisplay: none;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary)::marker {\ncontent: '';\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:has(> .tanrei-icon)) {\ngrid-template-columns: [icon] auto [text] minmax(0, 1fr) [chevron] auto;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:has(> [data-trailing-text])) {\ngrid-template-columns: [text] minmax(0, 1fr) [trailing] fit-content(calc((100% - var(--_acc-chevron-size) - var(--tanrei-comp-accordion-container-gap) * 2) / 2)) [chevron] auto;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:has(> .tanrei-icon):has(> [data-trailing-text])) {\ngrid-template-columns:\n[icon] auto [text] minmax(0, 1fr) [trailing] fit-content(calc((100% - var(--_acc-icon-size) - var(--_acc-chevron-size) - var(--tanrei-comp-accordion-container-gap) * 3) / 2))\n[chevron] auto;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where(:not(.tanrei-icon, [data-supporting-text], [data-trailing-text], .ripple)) {\ngrid-column: text;\ngrid-row: 1;\nmin-inline-size: 0;\nmargin: 0;\npadding: 0;\nfont: inherit;\nletter-spacing: inherit;\ncolor: inherit;\ntext-align: inherit;\nunicode-bidi: plaintext;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where([data-supporting-text]) {\ngrid-column: text;\ngrid-row: 2;\nmin-inline-size: 0;\nfont: var(--_acc-supporting-font);\nletter-spacing: var(--_acc-supporting-tracking);\ncolor: var(--_acc-now-supporting);\ntext-align: var(--_acc-start);\nunicode-bidi: plaintext;\ntransition: color var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where([data-trailing-text]) {\ngrid-column: trailing;\ngrid-row: 1;\nmin-inline-size: 0;\noverflow: hidden;\nfont: var(--_acc-trailing-font);\nline-height: 1lh;\nletter-spacing: var(--_acc-trailing-tracking);\ncolor: var(--_acc-now-trailing);\ntext-align: var(--_acc-start);\ntext-overflow: ellipsis;\nwhite-space: nowrap;\nunicode-bidi: plaintext;\ntransition: color var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > .tanrei-icon.tanrei-icon {\n--_size: var(--_acc-icon-size);\n--_fill: var(--tanrei-sys-icon-fill-unselected);\n--_family: var(--tanrei-sys-icon-family-unselected);\ngrid-column: icon;\ngrid-row: 1;\ndisplay: flex;\nalign-items: center;\nline-height: 1lh;\nmargin-block-start: calc((1lh - var(--_acc-icon-size)) / 2);\ncolor: var(--_acc-now-icon);\nvertical-align: baseline;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary)::after {\ncontent: 'expand_more';\ncontent: 'expand_more' / '';\ngrid-column: chevron;\ngrid-row: 1;\ndisplay: flex;\nalign-items: center;\noverflow: hidden;\ninline-size: var(--_acc-chevron-size);\nblock-size: var(--_acc-chevron-size);\nmargin-block-start: calc((1lh - var(--_acc-chevron-size)) / 2);\nfont-family: var(--tanrei-sys-icon-family-unselected);\nfont-size: var(--_acc-chevron-size);\nfont-style: normal;\nfont-weight: normal;\nline-height: 1lh;\nletter-spacing: normal;\ntext-transform: none;\nwhite-space: nowrap;\nword-wrap: normal;\ndirection: ltr;\ncolor: var(--_acc-now-chevron);\npointer-events: none;\nfont-feature-settings: 'liga';\n-webkit-font-smoothing: antialiased;\nfont-optical-sizing: auto;\nfont-variation-settings:\n'FILL' var(--tanrei-sys-icon-fill-unselected),\n'wght' var(--tanrei-sys-icon-weight),\n'GRAD' 0;\nopacity: var(--tanrei-icons, 0);\ntransition:\nrotate var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\ncolor var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing);\n}\n@supports (font-variation-settings: 'opsz' tan(atan2(1em, 1px))) {\n:where(tanrei-accordion) > :where(details) > :where(summary)::after {\nfont-variation-settings: 'FILL' var(--tanrei-sys-icon-fill-unselected), 'wght' var(--tanrei-sys-icon-weight), 'GRAD' 0, 'opsz' clamp(var(--tanrei-sys-icon-optical-size-min), tan(atan2(var(--_acc-chevron-size), 1px)), var(--tanrei-sys-icon-optical-size-max));\n}\n}\n:where(tanrei-accordion) > :where(details[open]) > :where(summary)::after {\nrotate: 0.5turn;\n}\n:where(tanrei-accordion[data-glyphs='pending']) > :where(details) > :where(summary)::after,\n:where(tanrei-accordion[data-glyphs='pending']) > :where(details) > :where(summary) > :where(.tanrei-icon) {\nvisibility: hidden;\n}\n@supports selector(::details-content) {\n:where(tanrei-accordion) > :where(details)::details-content {\nbox-sizing: border-box;\nblock-size: 0;\npadding-inline: var(--_acc-pad-inline);\npadding-block-end: 0;\ninteractivity: inert;\noverflow: clip;\n}\n:where(tanrei-accordion) > :where(details[open])::details-content {\nblock-size: var(--_acc-size, calc-size(auto, size));\npadding-block-end: var(--_acc-content-end);\ninteractivity: auto;\noverflow: visible;\n}\n@supports (block-size: calc-size(auto, size)) {\n:where(tanrei-accordion) > :where(details)::details-content {\ntransition:\nblock-size var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\npadding-block-end var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\ncontent-visibility var(--tanrei-comp-accordion-motion-disclosure-duration) allow-discrete,\noverflow var(--tanrei-comp-accordion-motion-disclosure-duration) step-start allow-discrete;\n}\n:where(tanrei-accordion) > :where(details[open])::details-content {\ntransition:\nblock-size var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\npadding-block-end var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\ncontent-visibility var(--tanrei-comp-accordion-motion-disclosure-duration) allow-discrete,\noverflow var(--tanrei-comp-accordion-motion-disclosure-duration) step-end allow-discrete;\n}\n}\n:where(tanrei-accordion) > :where(details[data-tanrei-moving='measure'])::details-content {\nblock-size: var(--_acc-size, auto);\npadding-block-end: var(--_acc-content-end);\ncontent-visibility: visible;\noverflow: clip;\n}\n:where(tanrei-accordion) > :where(details[data-tanrei-moving='opening-from'])::details-content {\nblock-size: 0;\npadding-block-end: 0;\noverflow: clip;\n}\n:where(tanrei-accordion) > :where(details[data-tanrei-moving='opening'])::details-content,\n:where(tanrei-accordion) > :where(details[data-tanrei-moving='closing'])::details-content {\ncontent-visibility: visible;\noverflow: clip;\ntransition:\nblock-size var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing),\npadding-block-end var(--tanrei-comp-accordion-motion-disclosure-duration) var(--tanrei-comp-accordion-motion-disclosure-easing);\n}\n}\n@supports not selector(::details-content) {\n:where(tanrei-accordion) > :where(details) {\npadding-inline: var(--_acc-pad-inline);\n}\n:where(tanrei-accordion) > :where(details[open]) {\npadding-block-end: var(--_acc-content-end);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) {\nmargin-inline: calc(var(--_acc-pad-inline) * -1);\n}\n}\n@media (hover: hover) {\n:where(tanrei-accordion) > :where(details) > :where(summary:hover) {\n--_acc-now-container: var(--_acc-hovered-container);\n--_acc-now-label: var(--_acc-hovered-label);\n--_acc-now-supporting: var(--_acc-hovered-supporting);\n--_acc-now-trailing: var(--_acc-hovered-trailing);\n--_acc-now-icon: var(--_acc-hovered-icon);\n--_acc-now-chevron: var(--_acc-hovered-chevron);\nopacity: var(--tanrei-comp-accordion-hovered-opacity);\n}\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:focus-visible) {\n--_acc-now-container: var(--_acc-focused-container);\n--_acc-now-label: var(--_acc-focused-label);\n--_acc-now-supporting: var(--_acc-focused-supporting);\n--_acc-now-trailing: var(--_acc-focused-trailing);\n--_acc-now-icon: var(--_acc-focused-icon);\n--_acc-now-chevron: var(--_acc-focused-chevron);\nopacity: var(--tanrei-comp-accordion-focused-opacity);\noutline: var(--tanrei-sys-focus-outer-width) solid var(--tanrei-sys-color-focus-ring);\noutline-offset: calc(var(--tanrei-sys-focus-outer-width) * -1);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:focus-visible)::before {\ncontent: '';\nposition: absolute;\ninset: var(--tanrei-sys-focus-outer-width);\nborder: var(--tanrei-sys-focus-inner-width) solid var(--tanrei-sys-color-focus-ring-inner);\nborder-radius: max(0px, calc(var(--tanrei-corner-radius) * var(--_corner-scale) - var(--tanrei-sys-focus-outer-width)));\npointer-events: none;\n}\n@container style(--tanrei-sys-behavior-focus-style: glow) {\n:where(tanrei-accordion) > :where(details) > :where(summary:focus-visible) {\noutline-color: transparent;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:focus-visible)::before {\n--_acc-glow-inset: calc((var(--tanrei-sys-focus-inner-width) + var(--tanrei-sys-focus-outer-width)) * 2);\ninset: var(--_acc-glow-inset);\nborder: 0;\nborder-radius: max(0px, calc(var(--tanrei-corner-radius) * var(--_corner-scale) - var(--_acc-glow-inset)));\nbox-shadow:\n0 0 var(--tanrei-sys-focus-inner-width) var(--tanrei-sys-focus-inner-width) var(--tanrei-sys-color-focus-ring-inner),\n0 0 var(--tanrei-sys-focus-outer-width) calc(var(--tanrei-sys-focus-inner-width) + var(--tanrei-sys-focus-outer-width)) var(--tanrei-sys-color-focus-ring);\n}\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[data-focus-style='glow']:focus-visible) {\noutline-color: transparent;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[data-focus-style='glow']:focus-visible)::before {\n--_acc-glow-inset: calc((var(--tanrei-sys-focus-inner-width) + var(--tanrei-sys-focus-outer-width)) * 2);\ninset: var(--_acc-glow-inset);\nborder: 0;\nborder-radius: max(0px, calc(var(--tanrei-corner-radius) * var(--_corner-scale) - var(--_acc-glow-inset)));\nbox-shadow:\n0 0 var(--tanrei-sys-focus-inner-width) var(--tanrei-sys-focus-inner-width) var(--tanrei-sys-color-focus-ring-inner),\n0 0 var(--tanrei-sys-focus-outer-width) calc(var(--tanrei-sys-focus-inner-width) + var(--tanrei-sys-focus-outer-width)) var(--tanrei-sys-color-focus-ring);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:active:not([data-pressed])) {\n--_acc-held-image: linear-gradient(var(--_acc-pressed-container), var(--_acc-pressed-container)), none;\n--_acc-held-clip: border-box, text;\n--_acc-now-label: var(--_acc-pressed-label);\n--_acc-now-supporting: var(--_acc-pressed-supporting);\n--_acc-now-trailing: var(--_acc-pressed-trailing);\n--_acc-now-icon: var(--_acc-pressed-icon);\n--_acc-now-chevron: var(--_acc-pressed-chevron);\nopacity: var(--tanrei-comp-accordion-pressed-opacity);\ntransition-duration: 0s;\ntransition-delay: 0s;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[data-pressed]:not([data-pressed='none'])) {\ntransition-duration: 0s;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[data-pressed='overlay']) {\n--_acc-now-container: var(--_acc-pressed-container);\n--_acc-now-label: var(--_acc-pressed-label);\n--_acc-now-supporting: var(--_acc-pressed-supporting);\n--_acc-now-trailing: var(--_acc-pressed-trailing);\n--_acc-now-icon: var(--_acc-pressed-icon);\n--_acc-now-chevron: var(--_acc-pressed-chevron);\nopacity: var(--tanrei-comp-accordion-pressed-opacity);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[data-pressed='ripple'], summary[data-pressed='dim']) {\n--_acc-now-label: var(--_acc-pressed-label);\n--_acc-now-supporting: var(--_acc-pressed-supporting);\n--_acc-now-trailing: var(--_acc-pressed-trailing);\n--_acc-now-icon: var(--_acc-pressed-icon);\n--_acc-now-chevron: var(--_acc-pressed-chevron);\nopacity: var(--tanrei-comp-accordion-pressed-opacity);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where(.ripple) {\nposition: absolute;\nz-index: -1;\ninset: 0;\nborder-radius: inherit;\ncorner-shape: inherit;\nbackground: var(--_acc-pressed-container);\npointer-events: none;\nclip-path: circle(var(--_r) at var(--_x) var(--_y));\nanimation: tanrei-accordion-ripple var(--tanrei-comp-accordion-motion-feedback-duration) var(--tanrei-comp-accordion-motion-state-easing) both;\ntransition: opacity var(--tanrei-comp-accordion-motion-state-duration) var(--tanrei-comp-accordion-motion-state-easing);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where(.ripple.leaving) {\nopacity: 0;\n}\n@keyframes tanrei-accordion-ripple {\nfrom {\nclip-path: circle(0 at var(--_x) var(--_y));\n}\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[aria-disabled='true']) {\n--_acc-now-container: var(--_acc-disabled-container);\n--_acc-now-label: var(--_acc-disabled-label);\n--_acc-now-supporting: var(--_acc-disabled-supporting);\n--_acc-now-trailing: var(--_acc-disabled-trailing);\n--_acc-now-icon: var(--_acc-disabled-icon);\n--_acc-now-chevron: var(--_acc-disabled-chevron);\nopacity: var(--tanrei-comp-accordion-disabled-opacity);\ncursor: default;\npointer-events: none;\n}\n:where(tanrei-accordion) > :where(details[data-tanrei-at-once]),\n:where(tanrei-accordion) > :where(details[data-tanrei-at-once])::details-content,\n:where(tanrei-accordion) > :where(details[data-tanrei-at-once]) > :where(summary)::after {\ntransition: none;\n}\n@media (prefers-reduced-motion: reduce) {\n:where(tanrei-accordion) > :where(details),\n:where(tanrei-accordion) > :where(details)::details-content,\n:where(tanrei-accordion) > :where(details[data-tanrei-moving])::details-content,\n:where(tanrei-accordion) > :where(details) > :where(summary)::after {\ntransition: none;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) {\ntransition:\n--_acc-held-image 0s linear var(--tanrei-sys-motion-duration-press-hold),\n--_acc-held-clip 0s linear var(--tanrei-sys-motion-duration-press-hold);\ntransition-behavior: allow-discrete;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where([data-supporting-text], [data-trailing-text]) {\ntransition: none;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where(.ripple) {\nanimation: none;\ntransition: none;\n}\n}\n@media (forced-colors: active) {\n:where(tanrei-accordion) {\n--_acc-line-color: CanvasText;\n--_acc-edge-color: CanvasText;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) {\n--_acc-forced: CanvasText;\ncolor: var(--_acc-forced);\nbackground-image: none;\nbackground-clip: border-box;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary) > :where([data-supporting-text], [data-trailing-text]),\n:where(tanrei-accordion) > :where(details) > :where(summary) > .tanrei-icon.tanrei-icon,\n:where(tanrei-accordion) > :where(details) > :where(summary)::after {\ncolor: var(--_acc-forced);\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:hover),\n:where(tanrei-accordion) > :where(details) > :where(summary:active),\n:where(tanrei-accordion) > :where(details) > :where(summary[data-pressed]:not([data-pressed='none'])) {\n--_acc-forced: ButtonText;\nbackground-color: ButtonFace;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary[aria-disabled='true']) {\n--_acc-forced: GrayText;\n}\n:where(tanrei-accordion) > :where(details) > :where(summary:focus-visible) {\noutline-color: Highlight;\n}\n}\n}";
9
+ }
10
+ catch {
11
+ return '';
12
+ }
13
+ })();
14
+ const TAG = 'tanrei-accordion';
15
+ const PREFIX = '--tanrei-comp-accordion';
16
+ const CORE_VARIANTS = ['plain', 'outlined'];
17
+ const CORE_DENSITIES = ['regular', 'compact'];
18
+ const DEFAULT_VARIANT = 'plain';
19
+ const DEFAULT_DENSITY = 'regular';
20
+ /** The members of the density axis (`dev.tanrei.axes.density.members`) as accordion.css names them. */
21
+ const DENSITY_MEMBERS = [
22
+ ['--_acc-height', 'container-height-*'],
23
+ ['--_acc-pad-block', 'container-padding-block-*'],
24
+ ['--_acc-pad-inline', 'container-padding-inline-*'],
25
+ ['--_acc-label-font', 'label-typescale-*-font'],
26
+ ['--_acc-label-tracking', 'label-typescale-*-letter-spacing'],
27
+ ['--_acc-supporting-font', 'supporting-text-typescale-*-font'],
28
+ ['--_acc-supporting-tracking', 'supporting-text-typescale-*-letter-spacing'],
29
+ ['--_acc-trailing-font', 'trailing-text-typescale-*-font'],
30
+ ['--_acc-trailing-tracking', 'trailing-text-typescale-*-letter-spacing'],
31
+ ['--_acc-icon-size', 'icon-size-*'],
32
+ ['--_acc-chevron-size', 'chevron-size-*'],
33
+ ['--_acc-content-end', 'content-padding-block-end-*'],
34
+ ];
35
+ /** The per-variant parts (`dev.tanrei.states.perVariant`) and the states, as accordion.css names them. */
36
+ const VARIANT_PARTS = [
37
+ ['container', 'container-color'],
38
+ ['label', 'label-color'],
39
+ ['supporting', 'supporting-text-color'],
40
+ ['trailing', 'trailing-text-color'],
41
+ ['icon', 'icon-color'],
42
+ ['chevron', 'chevron-color'],
43
+ ];
44
+ const STATES = ['', 'hovered-', 'focused-', 'pressed-', 'disabled-'];
45
+ /** Attribute values are interpolated into CSS: only token-name characters are accepted. */
46
+ const KEY = /^[a-z0-9][a-z0-9-]*$/;
47
+ /** The pose of the height motion, where the element moves it (accordion.css). */
48
+ const MOVING = 'data-tanrei-moving';
49
+ const AT_ONCE = 'data-tanrei-at-once';
50
+ const SIZE = '--_acc-size';
51
+ /** The item's clock (accordion.css): an unregistered custom property whose one step, over the disclosure motion, is the transition this element hears. */
52
+ const CLOCK = '--_acc-open';
53
+ /** A header moved by less than this has not moved: boxes are laid out on fractions of a pixel. */
54
+ const SLACK = 0.5;
55
+ /** ACC-32: deeper than this is reported. */
56
+ const MAX_DEPTH = 3;
57
+ const sheets = new Map();
58
+ /** A stylesheet of the page, made once and shared by every root that needs it. */
59
+ function sheet(id, text) {
60
+ if (typeof CSSStyleSheet === 'undefined')
61
+ return null;
62
+ let made = sheets.get(id);
63
+ if (!made) {
64
+ made = new CSSStyleSheet();
65
+ try {
66
+ made.replaceSync(text());
67
+ }
68
+ catch {
69
+ // A browser that cannot construct it: the page's own copy of accordion.css draws the accordion.
70
+ }
71
+ sheets.set(id, made);
72
+ }
73
+ return made;
74
+ }
75
+ /** ACC-34: a density a design system added — the default's rules, read from that density's tokens. */
76
+ const densityRules = (density) => `@layer tanrei.components { :where(${TAG}[density='${density}']) { ${DENSITY_MEMBERS.map(([name, token]) => `${name}: var(${PREFIX}-${token.replace('*', density)}, var(${PREFIX}-${token.replace('*', DEFAULT_DENSITY)}));`).join(' ')} } }`;
77
+ /** ACC-34: a variant a design system added — its colors in each state, the default's where it has none. */
78
+ const variantRules = (variant) => `@layer tanrei.components { :where(${TAG}[variant='${variant}']) { ${STATES.flatMap((state) => VARIANT_PARTS.map(([part, token]) => `--_acc-${state}${part}: var(${PREFIX}-${variant}-${state}${token}, var(${PREFIX}-${DEFAULT_VARIANT}-${state}${token}));`)).join(' ')} } }`;
79
+ /** Writes an attribute only when it differs: what is written here may be observed, and must settle. */
80
+ function mark(element, name, value) {
81
+ if (value === null) {
82
+ if (element.hasAttribute(name))
83
+ element.removeAttribute(name);
84
+ }
85
+ else if (element.getAttribute(name) !== value)
86
+ element.setAttribute(name, value);
87
+ }
88
+ const supports = (condition) => {
89
+ try {
90
+ return CSS.supports(condition);
91
+ }
92
+ catch {
93
+ return false;
94
+ }
95
+ };
96
+ /** Whether the browser moves a height to `auto` in CSS: accordion.css then moves the content alone (ACC-13). */
97
+ const CSS_MOTION = supports('block-size: calc-size(auto, size)');
98
+ /** Whether the content's own box can be styled at all: where it cannot, an item opens and closes at once. */
99
+ const CONTENT_BOX = supports('selector(::details-content)');
100
+ /** Whether closed content leaves the focus order by a style: where it does not, the element says it while it closes. */
101
+ const CSS_INERT = supports('interactivity: inert');
102
+ const summaryOf = (details) => details.querySelector(':scope > summary');
103
+ const disabled = (summary) => summary.getAttribute('aria-disabled') === 'true';
104
+ const isClock = (animation) => typeof CSSTransition !== 'undefined' && animation instanceof CSSTransition && animation.transitionProperty === CLOCK;
105
+ /** ACC-13: whether the item's own clock is running — its disclosure motion, as the cascade gives it now. */
106
+ const clockRuns = (details) => typeof details.getAnimations === 'function' && details.getAnimations().some(isClock);
107
+ /** Computes the style of an item and of its content's box, so that what is written next is a change from it. */
108
+ function flush(details) {
109
+ void getComputedStyle(details).getPropertyValue(CLOCK);
110
+ if (CONTENT_BOX)
111
+ void getComputedStyle(details, '::details-content').blockSize;
112
+ }
113
+ /**
114
+ * ACC-33: whether the icon set can draw a glyph now. A glyph is a ligature — one glyph, about one em wide — and its
115
+ * name spelled in a text face is several (src/primitives/glyph.ts): the name is measured in the icon family, in a box
116
+ * that is not drawn. A family that draws is remembered until the fonts of the page change.
117
+ */
118
+ const drawable = new Set();
119
+ const EM = 24;
120
+ function glyphProbe() {
121
+ const probe = document.createElement('span');
122
+ probe.setAttribute('aria-hidden', 'true');
123
+ probe.setAttribute('data-tanrei-glyph-probe', '');
124
+ probe.style.cssText = `position: absolute; visibility: hidden; pointer-events: none; white-space: nowrap; font: normal ${EM}px/1 var(--tanrei-sys-icon-family-unselected); letter-spacing: normal; font-feature-settings: 'liga'; text-transform: none`;
125
+ probe.textContent = 'expand_more';
126
+ return probe;
127
+ }
128
+ /** The accordions on the page, told when the set of fonts says a load is over. */
129
+ const connected = new Set();
130
+ const fontsChanged = () => {
131
+ drawable.clear();
132
+ for (const accordion of connected)
133
+ accordion.readGlyphs();
134
+ };
135
+ let groups = 0;
136
+ let descriptions = 0;
137
+ /**
138
+ * Content that a row shows and hides in place. One item is a single disclosure; several are a set whose items open by
139
+ * themselves or, with `exclusive`, one at a time. A help page's questions, the sections of a settings screen, the
140
+ * advanced part of a form.
141
+ *
142
+ * Contract: specs/accordion.spec.json. The element has **no shadow root**: its items are the product's own native
143
+ * `<details>` elements, which stay in the document. They open and close, are focusable, carry the expanded state, keep
144
+ * their closed content in the page (a field in it keeps its value and is sent with its form) and are opened by a link
145
+ * to a fragment and by the browser's find-in-page, before any script runs and without it.
146
+ *
147
+ * ```html
148
+ * <tanrei-accordion variant="outlined">
149
+ * <details open>
150
+ * <summary>
151
+ * <span class="tanrei-icon" aria-hidden="true">palette</span>
152
+ * Colors
153
+ * <span data-supporting-text>Roles, palettes and the six schemes</span>
154
+ * <span data-trailing-text>48 roles</span>
155
+ * </summary>
156
+ * <p>Every color a component reads is a role.</p>
157
+ * </details>
158
+ * <details>
159
+ * <summary><h3>A label that is a heading</h3></summary>
160
+ * <p>…</p>
161
+ * </details>
162
+ * <details>
163
+ * <summary aria-disabled="true" tabindex="-1">A disabled item</summary>
164
+ * <p>…</p>
165
+ * </details>
166
+ * </tanrei-accordion>
167
+ * ```
168
+ *
169
+ * An item is a `<details>` whose first child is its `<summary>`: the header. The summary's text is the label, or ONE
170
+ * element in its place — a heading of the level the page's outline needs, or a `<span>` around text with inline
171
+ * content; an element with `data-supporting-text` is the line under the label, one with `data-trailing-text` the short
172
+ * value before the chevron, a `.tanrei-icon` the glyph at the start. `open` is the item's own attribute and property
173
+ * and `toggle` its own event (it does not bubble; `event.newState` is `open` or `closed`) — the browser also sends it
174
+ * when the product sets `open`. A disabled item is `<summary aria-disabled="true" tabindex="-1">`.
175
+ *
176
+ * Everything drawn is `@tanrei/web/accordion.css` — every value a `--tanrei-comp-accordion-*` token — which draws the
177
+ * whole look and every state before and without this script; the element adds the same sheet to the root it is
178
+ * connected to, so it also works inside another component's shadow root. The script adds what a stylesheet cannot:
179
+ * the system's answer to a press (ripple, dim), the arrow keys, `exclusive` (the `name` it writes on its items), the
180
+ * height motion where the browser cannot move a height to `auto` in CSS, the pressed header kept in place while an
181
+ * item above it closes, focus given to the header when its item closes around it, the supporting and trailing text
182
+ * read as the header's description instead of as part of its name, a disabled header refused, and the debug reports.
183
+ *
184
+ * An accordion in an item's content is content like any other, drawn by its own attributes.
185
+ *
186
+ * @tag tanrei-accordion
187
+ * @slot - The items: native `<details>` elements, each with a `<summary>` first. They are children in the document, not slotted nodes: the element has no shadow root.
188
+ */
189
+ export class TanreiAccordion extends ReactiveElement {
190
+ constructor() {
191
+ super(...arguments);
192
+ this.availability = new AvailabilityController(this, 'accordion');
193
+ /** How the accordion stands on its surface: plain is rows on the surface, outlined is bounded by one hairline with rounded corners. A design system may add values. */
194
+ this.variant = 'plain';
195
+ /** How much room a header takes: regular for a page a person reads, compact for a panel among controls. A design system may add values. */
196
+ this.density = 'regular';
197
+ /** How an item is told from the item next to it: `divider` is one hairline (in the outlined look the items share one edge), `gap` empty space and no line (each item has an edge of its own); `auto` takes `comp.accordion.separation`, the design system's answer. */
198
+ this.separation = 'auto';
199
+ /** Whether opening an item closes the one that was open. The element writes a `name` of its own on its items, which the browser keeps to one open; markup that must be exclusive without script writes `name` itself. */
200
+ this.exclusive = false;
201
+ this.mutations = typeof MutationObserver === 'undefined' ? null : new MutationObserver((records) => this.mutated(records));
202
+ /** What is observed already: an item for its `open` and its children, a header for its parts and `aria-disabled`. */
203
+ this.observed = new WeakSet();
204
+ /** Each item's `open` as it was last drawn: a change from it is what opens and closes. */
205
+ this.states = new WeakMap();
206
+ /** The items whose next change of `open` is drawn at once (ACC-12's first frame). */
207
+ this.quiet = new WeakSet();
208
+ /** What this element wrote on the product's elements: only that is taken off again. */
209
+ this.named = new WeakSet();
210
+ this.unfocusable = new WeakSet();
211
+ this.described = new WeakSet();
212
+ this.hiddenParts = new WeakSet();
213
+ this.inerted = new WeakSet();
214
+ this.presses = new WeakMap();
215
+ this.pressControllers = new Set();
216
+ this.held = null;
217
+ this.heldSummary = null;
218
+ /** The header the user acted on, and where it was in the view, until the task of that act is over (ACC-14). */
219
+ this.acted = null;
220
+ /** The header that is being kept in place, and the frame that keeps it. */
221
+ this.holding = null;
222
+ this.holdFrame = 0;
223
+ this.group = `tanrei-accordion-${++groups}`;
224
+ /** The box the glyph's name is measured in, kept only while the icon set cannot draw it (ACC-33). */
225
+ this.glyphProbe = null;
226
+ this.holdStep = () => {
227
+ const holding = this.holding;
228
+ if (!holding || !holding.summary.isConnected) {
229
+ this.release();
230
+ return;
231
+ }
232
+ let lost = holding.summary.getBoundingClientRect().top - holding.top;
233
+ for (let parent = holding.summary.parentElement; parent && Math.abs(lost) >= SLACK; parent = parent.parentElement) {
234
+ const scroller = parent === document.documentElement || parent === document.body ? document.scrollingElement : parent;
235
+ if (!scroller || scroller.scrollHeight - scroller.clientHeight < 1)
236
+ continue;
237
+ if (scroller !== document.scrollingElement && !/auto|scroll/.test(getComputedStyle(scroller).overflowY))
238
+ continue;
239
+ const before = scroller.scrollTop;
240
+ scroller.scrollTop = before + lost;
241
+ lost -= scroller.scrollTop - before;
242
+ if (scroller === document.scrollingElement)
243
+ break;
244
+ }
245
+ if (holding.above.some(clockRuns))
246
+ this.holdFrame = requestAnimationFrame(this.holdStep);
247
+ else
248
+ this.release();
249
+ };
250
+ this.releasePress = () => {
251
+ this.held?.release();
252
+ this.held = null;
253
+ this.heldSummary = null;
254
+ };
255
+ this.onPointerDown = (event) => {
256
+ const header = this.headerOf(event.target);
257
+ if (!header || disabled(header.summary))
258
+ return;
259
+ const pointer = event;
260
+ if (pointer.button !== 0 && pointer.pointerType === 'mouse')
261
+ return;
262
+ this.answered(header.summary);
263
+ this.held = this.pressOf(header.summary);
264
+ this.heldSummary = header.summary;
265
+ this.held.onPointerDown(pointer);
266
+ };
267
+ // `pointerleave` is not seen from here: the press ends when the pointer goes out of the header it holds.
268
+ this.onPointerOut = (event) => {
269
+ const to = event.relatedTarget;
270
+ if (this.heldSummary && !(to instanceof Node && this.heldSummary.contains(to)))
271
+ this.releasePress();
272
+ };
273
+ this.onKeyDown = (event) => {
274
+ const header = this.headerOf(event.target);
275
+ const key = event;
276
+ if (!header || event.target !== header.summary || disabled(header.summary))
277
+ return;
278
+ if (!key.repeat && (key.key === 'Enter' || key.key === ' ')) {
279
+ this.answered(header.summary);
280
+ this.pressOf(header.summary).onKeyDown(key);
281
+ }
282
+ // ACC-11: the arrow toward the end of the line opens a closed item, the one toward its start closes an open one.
283
+ // The arrow that would do neither, and every other key, is the browser's.
284
+ if (key.altKey || key.ctrlKey || key.metaKey || key.shiftKey)
285
+ return;
286
+ const arrow = lineArrow(key.key, header.summary);
287
+ if ((arrow === 'end' && !header.details.open) || (arrow === 'start' && header.details.open)) {
288
+ event.preventDefault();
289
+ this.act(header.summary);
290
+ header.details.open = !header.details.open;
291
+ }
292
+ };
293
+ this.onKeyUp = (event) => {
294
+ const header = this.headerOf(event.target);
295
+ if (header)
296
+ this.presses.get(header.summary)?.onKeyUp(event);
297
+ };
298
+ // ACC-23: where the browser has no style queries, the focus style is read when focus arrives.
299
+ this.onFocusIn = (event) => {
300
+ const header = this.headerOf(event.target);
301
+ if (header && event.target === header.summary && !styleQueries())
302
+ syncFocusStyle(header.summary, header.summary);
303
+ };
304
+ this.onFocusOut = (event) => {
305
+ const header = this.headerOf(event.target);
306
+ if (header)
307
+ this.presses.get(header.summary)?.onBlur();
308
+ };
309
+ // ACC-20: a disabled header is not toggled, whatever reaches it. ACC-14: an act on a header is where its place is read.
310
+ this.onClick = (event) => {
311
+ const header = this.headerOf(event.target);
312
+ if (!header)
313
+ return;
314
+ if (disabled(header.summary)) {
315
+ event.preventDefault();
316
+ event.stopPropagation();
317
+ }
318
+ else if (!event.defaultPrevented)
319
+ this.act(header.summary);
320
+ };
321
+ // ACC-13: the item's clock has run out, or was cancelled and no other runs: its motion is over.
322
+ this.onMotionEnd = (event) => {
323
+ const details = event.target;
324
+ if (!(details instanceof HTMLDetailsElement) || details.parentElement !== this || event.propertyName !== CLOCK)
325
+ return;
326
+ if (event.type === 'transitioncancel' && clockRuns(details))
327
+ return;
328
+ this.settle(details);
329
+ };
330
+ this.listeners = [
331
+ ['pointerdown', this.onPointerDown],
332
+ ['pointerup', this.releasePress],
333
+ ['pointercancel', this.releasePress],
334
+ ['pointerout', this.onPointerOut],
335
+ ['dragstart', this.releasePress],
336
+ ['keydown', this.onKeyDown],
337
+ ['keyup', this.onKeyUp],
338
+ ['focusin', this.onFocusIn],
339
+ ['focusout', this.onFocusOut],
340
+ ['click', this.onClick],
341
+ ['transitionend', this.onMotionEnd],
342
+ ['transitioncancel', this.onMotionEnd],
343
+ ];
344
+ }
345
+ static { this.properties = {
346
+ // The defaults are not reflected: an accordion that is defined is the accordion that was written.
347
+ variant: { type: String, reflect: true, useDefault: true },
348
+ density: { type: String, reflect: true, useDefault: true },
349
+ separation: { type: String, reflect: true, useDefault: true },
350
+ exclusive: { type: Boolean, reflect: true },
351
+ }; }
352
+ /** No shadow root: the items are the document's. */
353
+ createRenderRoot() {
354
+ return this;
355
+ }
356
+ connectedCallback() {
357
+ super.connectedCallback();
358
+ adoptUnlessDrawn(this, sheet('accordion', () => ACCORDION_CSS), '--_acc-container');
359
+ for (const [type, listener] of this.listeners)
360
+ this.addEventListener(type, listener, true);
361
+ this.observed = new WeakSet();
362
+ this.mutations?.observe(this, { childList: true });
363
+ if (!connected.size) {
364
+ document.fonts?.addEventListener('loadingdone', fontsChanged);
365
+ document.fonts?.addEventListener('loadingerror', fontsChanged);
366
+ }
367
+ connected.add(this);
368
+ if (this.hasUpdated)
369
+ this.read();
370
+ }
371
+ disconnectedCallback() {
372
+ super.disconnectedCallback();
373
+ for (const [type, listener] of this.listeners)
374
+ this.removeEventListener(type, listener, true);
375
+ this.mutations?.disconnect();
376
+ connected.delete(this);
377
+ if (!connected.size) {
378
+ document.fonts?.removeEventListener('loadingdone', fontsChanged);
379
+ document.fonts?.removeEventListener('loadingerror', fontsChanged);
380
+ }
381
+ this.glyphSizes?.disconnect();
382
+ this.glyphProbe?.remove();
383
+ this.glyphProbe = null;
384
+ for (const press of this.pressControllers)
385
+ press.hostDisconnected();
386
+ this.held = null;
387
+ this.heldSummary = null;
388
+ clearTimeout(this.actedTimer);
389
+ this.acted = null;
390
+ this.release();
391
+ }
392
+ updated(changed) {
393
+ // ACC-10: a separation the accordion does not define is auto (no rule matches the attribute); a debug build says so.
394
+ if (changed.has('separation') && !SEPARATION_VALUES.includes(this.separation)) {
395
+ report(this, 'ACC-10', `separation "${this.separation}" is not a value the accordion defines; it is drawn as "auto"`);
396
+ }
397
+ if (changed.has('variant'))
398
+ this.readAxis('variant', String(this.variant ?? ''), CORE_VARIANTS, DEFAULT_VARIANT, variantRules, (value) => `${PREFIX}-${value}-label-color`);
399
+ if (changed.has('density'))
400
+ this.readAxis('density', String(this.density ?? ''), CORE_DENSITIES, DEFAULT_DENSITY, densityRules, (value) => `${PREFIX}-container-height-${value}`);
401
+ this.read();
402
+ }
403
+ /** The accordion's own items: the `<details>` elements that are its children, in order. */
404
+ items() {
405
+ return [...this.children].filter((child) => child instanceof HTMLDetailsElement);
406
+ }
407
+ /** The item a node of an event belongs to as its header: this accordion's own, never a nested accordion's. */
408
+ headerOf(node) {
409
+ const summary = node instanceof Element ? node.closest('summary') : null;
410
+ const details = summary?.parentElement;
411
+ return summary && details instanceof HTMLDetailsElement && details.parentElement === this && summaryOf(details) === summary ? { details, summary } : null;
412
+ }
413
+ /**
414
+ * ACC-34: a value of an open axis the core does not have was added by a design system — its rules are added to the
415
+ * root, falling back to the default's tokens — or is unknown to the active one, which a debug build says.
416
+ */
417
+ readAxis(axis, value, core, fallback, rules, probe) {
418
+ if (core.includes(value))
419
+ return;
420
+ const known = KEY.test(value);
421
+ if (known)
422
+ adopt(this.getRootNode(), sheet(`${axis}:${value}`, () => rules(value)));
423
+ if (!known || getComputedStyle(this).getPropertyValue(probe(value)).trim() === '') {
424
+ report(this, 'ACC-34', `${axis} "${value}" is not a value of the active design system; it is drawn as "${fallback}"`);
425
+ }
426
+ }
427
+ /**
428
+ * Reads the items the accordion holds and writes what follows from them: `exclusive` as their `name`, a disabled
429
+ * header out of the focus order, the supporting and trailing text as the header's description, the separation and
430
+ * the glyphs where a stylesheet cannot tell. Called when a property changes and when the items or a header's parts
431
+ * do; it writes only what differs, so it settles.
432
+ */
433
+ read() {
434
+ if (!this.isConnected)
435
+ return;
436
+ const items = this.items();
437
+ for (const details of items) {
438
+ const summary = summaryOf(details);
439
+ if (!this.observed.has(details)) {
440
+ this.observed.add(details);
441
+ this.mutations?.observe(details, { attributes: true, attributeFilter: ['open'], childList: true });
442
+ }
443
+ if (summary && !this.observed.has(summary)) {
444
+ this.observed.add(summary);
445
+ this.mutations?.observe(summary, { attributes: true, attributeFilter: ['aria-disabled'], childList: true });
446
+ }
447
+ // ACC-7: an item is first drawn as its `open` says, without motion and without an event of this element's.
448
+ if (!this.states.has(details))
449
+ this.states.set(details, details.open);
450
+ if (summary)
451
+ this.readHeader(summary);
452
+ }
453
+ this.readExclusive(items);
454
+ // ACC-10: where the browser answers style queries the stylesheet reads the choice itself, and nothing is written.
455
+ mark(this, 'data-separation', styleQueries() ? null : compChoice(this, '--_acc-separation', SEPARATIONS));
456
+ this.readGlyphs();
457
+ if (debugBuild()) {
458
+ // An accordion that is still being parsed is read again when it is whole: an item may not have its content yet.
459
+ if (document.readyState === 'loading')
460
+ document.addEventListener('DOMContentLoaded', () => this.read(), { once: true });
461
+ else
462
+ this.check(items);
463
+ }
464
+ }
465
+ /**
466
+ * ACC-12: `exclusive` is the items' `name` — a name of this accordion's own, so an accordion inside an item keeps its
467
+ * own — which the browser holds to one open item. Given several open, the first in order stays; the others are closed
468
+ * here, at once. A `name` the product wrote is left as it is.
469
+ */
470
+ readExclusive(items) {
471
+ if (this.exclusive) {
472
+ const open = items.filter((details) => details.open);
473
+ if (open.length > 1) {
474
+ report(this, 'ACC-12', `an exclusive accordion was given ${open.length} open items; the first is drawn open and the others closed`, { once: false });
475
+ for (const details of open.slice(1))
476
+ this.closeAtOnce(details);
477
+ }
478
+ for (const details of items) {
479
+ if (details.hasAttribute('name') && !this.named.has(details))
480
+ continue;
481
+ this.named.add(details);
482
+ mark(details, 'name', this.group);
483
+ }
484
+ }
485
+ else {
486
+ for (const details of items) {
487
+ if (!this.named.has(details))
488
+ continue;
489
+ this.named.delete(details);
490
+ details.removeAttribute('name');
491
+ }
492
+ }
493
+ }
494
+ /** Closes an item without the motion of ACC-13: the styles are computed once with their transitions off. */
495
+ closeAtOnce(details) {
496
+ this.quiet.add(details);
497
+ details.setAttribute(AT_ONCE, '');
498
+ details.open = false;
499
+ flush(details);
500
+ details.removeAttribute(AT_ONCE);
501
+ }
502
+ /**
503
+ * A header's parts (ACC-20, ACC-24). A disabled header leaves the focus order. The supporting and the trailing text
504
+ * are the header's description, in that order, and not part of its name: each is hidden from the name and named by
505
+ * `aria-describedby`, which reads what it points to even where that is hidden. Each is text of its own direction
506
+ * (ACC-31): `dir="auto"`, unless the product named one.
507
+ */
508
+ readHeader(summary) {
509
+ if (disabled(summary)) {
510
+ if (!summary.hasAttribute('tabindex')) {
511
+ summary.setAttribute('tabindex', '-1');
512
+ this.unfocusable.add(summary);
513
+ }
514
+ }
515
+ else if (this.unfocusable.has(summary)) {
516
+ this.unfocusable.delete(summary);
517
+ summary.removeAttribute('tabindex');
518
+ }
519
+ const parts = [...summary.querySelectorAll(':scope > [data-supporting-text]'), ...summary.querySelectorAll(':scope > [data-trailing-text]')];
520
+ for (const part of parts) {
521
+ if (!part.id)
522
+ part.id = `tanrei-accordion-description-${++descriptions}`;
523
+ if (!part.hasAttribute('aria-hidden')) {
524
+ part.setAttribute('aria-hidden', 'true');
525
+ this.hiddenParts.add(part);
526
+ }
527
+ if (!part.hasAttribute('dir'))
528
+ part.setAttribute('dir', 'auto');
529
+ }
530
+ const ids = parts.filter((part) => this.hiddenParts.has(part)).map((part) => part.id).join(' ');
531
+ if (ids && (!summary.hasAttribute('aria-describedby') || this.described.has(summary))) {
532
+ this.described.add(summary);
533
+ mark(summary, 'aria-describedby', ids);
534
+ }
535
+ else if (!ids && this.described.has(summary)) {
536
+ this.described.delete(summary);
537
+ summary.removeAttribute('aria-describedby');
538
+ }
539
+ }
540
+ /**
541
+ * ACC-33: while the icon set cannot draw a glyph, the stylesheet draws none and keeps every box. The glyph's name is
542
+ * measured once; only while it cannot be drawn does the box it was measured in stay, as a child that is not drawn,
543
+ * so that the font's arrival is heard as a change of that box's size in the frame it happens — whatever the engine
544
+ * says of its fonts.
545
+ *
546
+ * @internal
547
+ */
548
+ readGlyphs() {
549
+ if (!this.isConnected)
550
+ return;
551
+ const family = getComputedStyle(this).getPropertyValue('--tanrei-sys-icon-family-unselected').trim();
552
+ let drawn = !family || drawable.has(family);
553
+ if (!drawn) {
554
+ const probe = this.glyphProbe ?? this.appendChild(glyphProbe());
555
+ // (An accordion that is not drawn measures nothing: it is asked again when it is.)
556
+ const width = probe.getBoundingClientRect().width;
557
+ drawn = width <= EM * DRAWN_WIDTH;
558
+ if (drawn && width > 0)
559
+ drawable.add(family);
560
+ else if (!this.glyphProbe) {
561
+ this.glyphProbe = probe;
562
+ this.glyphSizes ??= typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(() => this.readGlyphs());
563
+ this.glyphSizes?.observe(probe);
564
+ }
565
+ }
566
+ if (drawn && this.glyphProbe) {
567
+ this.glyphSizes?.disconnect();
568
+ this.glyphProbe = null;
569
+ }
570
+ if (drawn)
571
+ this.querySelector(':scope > [data-tanrei-glyph-probe]')?.remove();
572
+ mark(this, 'data-glyphs', drawn ? null : 'pending');
573
+ }
574
+ /** What a debug build says about an accordion it still draws (ACC-3, ACC-24, ACC-32, ACC-35). */
575
+ check(items) {
576
+ let depth = 1;
577
+ for (let outer = this.parentElement?.closest(TAG); outer; outer = outer.parentElement?.closest(TAG))
578
+ depth++;
579
+ if (depth > MAX_DEPTH)
580
+ report(this, 'ACC-32', `accordions are nested ${depth} levels deep; more than ${MAX_DEPTH} is hard to follow`);
581
+ for (const details of items) {
582
+ const summary = summaryOf(details);
583
+ if (!summary) {
584
+ report(details, 'ACC-24', 'the item has no <summary>: its header has no accessible name, and the browser draws one of its own');
585
+ continue;
586
+ }
587
+ const label = [...summary.childNodes].filter((node) => !(node instanceof Element && node.matches('.tanrei-icon, [data-supporting-text], [data-trailing-text], .ripple')) && (node instanceof Element || !!node.textContent?.trim()));
588
+ const named = label.some((node) => !!node.textContent?.trim()) || !!summary.getAttribute('aria-label')?.trim() || summary.hasAttribute('aria-labelledby');
589
+ if (!named)
590
+ report(details, 'ACC-24', 'the header has no accessible name; give the summary its label');
591
+ // ACC-3: a header is one button and holds no other control.
592
+ const control = label.map((node) => (node instanceof Element ? findInteractive(node) : null)).find(Boolean);
593
+ if (control)
594
+ report(details, 'ACC-3', `the label holds a control (<${control.localName}>): a header is one button and holds no other; put the action in the item's content`);
595
+ if (label.length > 1)
596
+ report(details, 'ACC-3', 'the label is several nodes, and each is laid out as a part of the header; put text with inline content in one <span>');
597
+ // ACC-35: a header that opens onto nothing.
598
+ const content = [...details.childNodes].some((node) => node !== summary && (node instanceof Element || !!node.textContent?.trim()));
599
+ if (!content)
600
+ report(details, 'ACC-35', 'the item has no content: its header shows and hides nothing');
601
+ }
602
+ }
603
+ /** What the observer saw: a change of an item's `open` opens or closes it; anything else is read again. */
604
+ mutated(records) {
605
+ const toggled = new Set();
606
+ let structure = false;
607
+ // The box the glyph's name is measured in is this element's own: its coming and going is not a change of the items.
608
+ const probe = (node) => node instanceof Element && node.hasAttribute('data-tanrei-glyph-probe');
609
+ for (const record of records) {
610
+ if (record.type === 'attributes' && record.attributeName === 'open' && record.target instanceof HTMLDetailsElement) {
611
+ if (record.target.parentElement === this)
612
+ toggled.add(record.target);
613
+ }
614
+ else if (record.type !== 'childList' || ![...record.addedNodes, ...record.removedNodes].every(probe))
615
+ structure = true;
616
+ }
617
+ if (structure)
618
+ this.read();
619
+ if (toggled.size)
620
+ this.toggled([...toggled]);
621
+ }
622
+ /**
623
+ * Items opened or closed — by the user, by the browser for another (`name`), for a search or a fragment, or by the
624
+ * product. Called before the change is drawn.
625
+ */
626
+ toggled(candidates) {
627
+ const changed = candidates.filter((details) => this.states.get(details) !== details.open);
628
+ if (!changed.length)
629
+ return;
630
+ for (const details of changed)
631
+ this.states.set(details, details.open);
632
+ // ACC-12, for a browser that does not hold a `name` to one open item: the item that opened closes the others.
633
+ if (this.exclusive) {
634
+ const opened = changed.find((details) => details.open);
635
+ if (opened)
636
+ for (const other of this.items())
637
+ if (other !== opened && other.open && other.getAttribute('name') === this.group)
638
+ other.open = false;
639
+ }
640
+ for (const details of changed) {
641
+ const summary = summaryOf(details);
642
+ // ACC-15: an item that closes around the focus gives it to its header; a disabled one leaves it to the browser.
643
+ if (!details.open && summary && !disabled(summary) && details.matches(':focus-within') && !summary.matches(':focus'))
644
+ summary.focus({ preventScroll: true });
645
+ // ACC-16: a link to a place inside a closed item opens it at once; so does ACC-12's first frame.
646
+ const atOnce = this.quiet.delete(details) || (details.open && !!details.querySelector(':target') && !this.acted);
647
+ if (atOnce) {
648
+ this.settle(details);
649
+ details.setAttribute(AT_ONCE, '');
650
+ flush(details);
651
+ details.removeAttribute(AT_ONCE);
652
+ }
653
+ else
654
+ this.move(details);
655
+ }
656
+ this.keep(changed);
657
+ }
658
+ /**
659
+ * ACC-13, where the browser cannot move a height to `auto` in CSS: the content's height is measured once, before the
660
+ * first frame, and the stylesheet moves its box between 0 and that height. An item whose `open` changes again on the
661
+ * way goes on from where it is: the pose is turned, and the transition reverses by itself. Where the stylesheet
662
+ * moves the content alone, or the item's clock does not run (reduced motion, a duration of zero), nothing is done.
663
+ */
664
+ move(details) {
665
+ if (CSS_MOTION || !CONTENT_BOX)
666
+ return;
667
+ const opening = details.open;
668
+ const pose = details.getAttribute(MOVING);
669
+ if (pose !== 'opening' && pose !== 'closing') {
670
+ if (!clockRuns(details))
671
+ return;
672
+ details.setAttribute(MOVING, 'measure');
673
+ const size = details.getBoundingClientRect().height - (summaryOf(details)?.getBoundingClientRect().height ?? 0);
674
+ details.style.setProperty(SIZE, `${Math.max(0, size)}px`);
675
+ if (opening)
676
+ details.setAttribute(MOVING, 'opening-from');
677
+ flush(details);
678
+ }
679
+ details.setAttribute(MOVING, opening ? 'opening' : 'closing');
680
+ // Content that is being hidden leaves the focus order and assistive technology when the motion begins.
681
+ this.setInert(details, !opening);
682
+ }
683
+ /** The motion of an item is over, or was never begun: its pose, its measured height and what it made inert are taken off. */
684
+ settle(details) {
685
+ if (details.hasAttribute(MOVING))
686
+ details.removeAttribute(MOVING);
687
+ details.style.removeProperty(SIZE);
688
+ this.setInert(details, false);
689
+ }
690
+ /** The content of a closing item, out of the focus order while it is still drawn (where no style says so). */
691
+ setInert(details, on) {
692
+ if (CSS_INERT)
693
+ return;
694
+ const summary = summaryOf(details);
695
+ for (const child of details.children) {
696
+ if (child === summary || !(child instanceof HTMLElement))
697
+ continue;
698
+ if (on && !child.inert) {
699
+ child.inert = true;
700
+ this.inerted.add(child);
701
+ }
702
+ else if (!on && this.inerted.has(child)) {
703
+ this.inerted.delete(child);
704
+ child.inert = false;
705
+ }
706
+ }
707
+ }
708
+ /**
709
+ * ACC-14: the header the user acted on stays where it is in the view while an item above it closes. Its place is
710
+ * read when the change begins and, only while such an item is still closing, once a frame, and the scrolling of what
711
+ * holds it is moved by what it lost. Nothing is scrolled for any other reason.
712
+ */
713
+ keep(changed) {
714
+ const acted = this.acted;
715
+ if (!acted)
716
+ return;
717
+ const items = this.items();
718
+ const at = items.indexOf(acted.summary.parentElement);
719
+ const above = changed.filter((details) => !details.open && items.indexOf(details) > -1 && items.indexOf(details) < at);
720
+ if (!above.length)
721
+ return;
722
+ this.release();
723
+ this.holding = { ...acted, above };
724
+ this.holdStep();
725
+ }
726
+ release() {
727
+ cancelAnimationFrame(this.holdFrame);
728
+ this.holdFrame = 0;
729
+ this.holding = null;
730
+ }
731
+ /** The user acts on a header: where it is in the view is remembered until the task of the act is over (ACC-14). */
732
+ act(summary) {
733
+ clearTimeout(this.actedTimer);
734
+ this.acted = { summary, top: summary.getBoundingClientRect().top };
735
+ this.actedTimer = setTimeout(() => (this.acted = null));
736
+ }
737
+ /** The press of one header (the shared primitive), made when it is first pressed. */
738
+ pressOf(summary) {
739
+ let press = this.presses.get(summary);
740
+ if (!press) {
741
+ press = new PressController(summary, {
742
+ container: () => summary,
743
+ // The summary's first transition is the hold (accordion.css), so its delay is press-hold as a time.
744
+ holdCarrier: () => summary,
745
+ disabled: () => disabled(summary),
746
+ });
747
+ this.presses.set(summary, press);
748
+ this.pressControllers.add(press);
749
+ }
750
+ return press;
751
+ }
752
+ /**
753
+ * The press is this script's from here: the stylesheet's own answer to `:active` stands down for a summary that
754
+ * carries `data-pressed`, so the attribute is written before anything reads a style.
755
+ */
756
+ answered(summary) {
757
+ if (!summary.hasAttribute('data-pressed'))
758
+ summary.dataset.pressed = 'none';
759
+ }
760
+ }
761
+ if (!customElements.get('tanrei-accordion'))
762
+ customElements.define('tanrei-accordion', TanreiAccordion);
763
+ //# sourceMappingURL=accordion.js.map