@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,917 @@
1
+ import { LitElement, html } from 'lit';
2
+ import { classMap } from 'lit/directives/class-map.js';
3
+ import { AvailabilityController, SHEET_FLING_VELOCITY, SheetDrag, choiceAttribute, compChoice, findInteractive, hostAria, report } from '../../primitives/index.js';
4
+ import { TanreiTabPanel, TanreiTabs } from '../tabs/tabs.js';
5
+ import { tabViewStyles } from './tab-view.styles.js';
6
+ /** `comp.tab-view.motion.transition` (TBV-22): a choice's name. The first is what an unknown name is. */
7
+ const FORMS = ['slide', 'fade', 'none'];
8
+ /** The view's `transition` prop: `auto` takes the component token, and so does a value the view does not define. */
9
+ const TRANSITION_VALUES = ['auto', ...FORMS];
10
+ const FORM_TOKEN = '--tanrei-comp-tab-view-motion-transition';
11
+ /** What a sideways drag belongs to when it starts on it (TBV-8): controls and components that take sideways drags. */
12
+ const TAKES_SIDEWAYS_DRAGS = [
13
+ 'input',
14
+ 'textarea',
15
+ 'select',
16
+ '[contenteditable]:not([contenteditable="false"])',
17
+ '[role="slider"]',
18
+ '[role="scrollbar"]',
19
+ 'tanrei-slider',
20
+ 'tanrei-carousel',
21
+ 'tanrei-text-field',
22
+ 'tanrei-text-input',
23
+ 'tanrei-chip-field',
24
+ 'tanrei-color-field',
25
+ 'tanrei-color-input',
26
+ 'tanrei-search',
27
+ 'tanrei-tab-view',
28
+ 'tanrei-tabs',
29
+ ].join(', ');
30
+ const px = (n) => `${Math.round(n * 100) / 100}px`;
31
+ const clamp01 = (n) => Math.min(1, Math.max(0, n));
32
+ /**
33
+ * Shows the view of the selected tab under its own row of tabs, or linked to a row of `<tanrei-tabs>` placed elsewhere,
34
+ * and lets a person swipe from view to view with the tabs' indicator following the finger.
35
+ *
36
+ * Contract: specs/tab-view.spec.json. The view's `<tanrei-tab-panel>` children are its panels. By default (`tabs` empty)
37
+ * the view draws its own row (TBV-16): a `<tanrei-tabs>` it places as its first light-DOM child, in its `tabs` slot above
38
+ * the panels, with one `<tanrei-tab>` per panel made from the panel's `value`, `label`, `icon`, `label-hidden` and
39
+ * `disabled`; the row's `variant`, `size`, `track`, `full-width` and `label` are the view's. The product does not edit that row. Linked
40
+ * (TBV-17): `tabs` is the id of a `<tanrei-tabs>` in the same tree (as `popovertarget` is), and the `tabsElement` property
41
+ * sets the element itself; either one set means the view draws no row, even while that element is missing. Either way
42
+ * the panels are matched to the tabs by `value` and take the place of the row's own panels (TAB-13), and the selected
43
+ * panel is the view's `value`, kept equal to the tabs' `value` in both directions without an event.
44
+ *
45
+ * Every selection is announced once. With its own row the view fires `change` for a tab and for a swipe; the row's own
46
+ * `change` never fires (TBV-18). Linked, a selection on the tabs is announced by the tabs' `change`, and a swipe by the
47
+ * view's. The view sets its `value` (and the tabs') before `change` fires, as a native control does.
48
+ *
49
+ * A switch — from the tabs, the product, or the rest of a released swipe — runs over `motion.switch-duration`: the old
50
+ * panel moves `transition.distance` (plus `transition.distance-fraction` of the width) toward the edge it leaves by,
51
+ * fading toward `transition.opacity` and blurring toward `transition.blur`, while the new one arrives from the other side.
52
+ * Where motion is reduced only the fade is left, over `motion.fade-duration`. A drag by touch or pen that goes further
53
+ * sideways than up or down holds the switch under the finger and sets the tabs' `indicatorOffset` in every frame; it
54
+ * commits past half the width or on a fling toward the tab. Mouse, trackpad and wheel never swipe: the tabs are the way.
55
+ *
56
+ * `transition` names the form of a switch: `slide` as above, `fade` — the two panels crossfade in place, over
57
+ * `motion.fade-duration` — and `none`, which shows the new panel whole in the frame the selection is made and gives the
58
+ * row the view draws the tabs' `transition="none"`, so that its indicator is on the new tab in that frame too; a swipe
59
+ * is still taken, the panel staying at rest under it while the indicator follows the finger. `auto`, the default, is
60
+ * the design system's answer (`--tanrei-comp-tab-view-motion-transition`).
61
+ *
62
+ * A drag across the row — the view's own, or the linked one — is the tabs' (TAB-28): their indicator follows the pointer
63
+ * and the view takes no drag meanwhile. The shown panel stays at rest for its whole length, because no tab is selected
64
+ * before the release; the release switches to the chosen tab's panel as any selection does, and with its own row the
65
+ * view announces it, once.
66
+ *
67
+ * @tag tanrei-tab-view
68
+ * @slot - `<tanrei-tab-panel>` children: the panels, one per tab, each with the value of its tab.
69
+ * @slot tabs - The view's own row, which it places there itself (a `<tanrei-tabs>`); not for the product.
70
+ * @csspart container - The region that holds the panels and clips them to its corners.
71
+ * @fires {CustomEvent<TanreiTabViewChangeDetail>} change - The user selected another panel — by a tab of the view's own row, or by a swipe: `detail.value` (and the view's and the tabs' `value`) is its value.
72
+ */
73
+ export class TanreiTabView extends LitElement {
74
+ static { this.styles = tabViewStyles; }
75
+ static { this.properties = {
76
+ value: { type: String },
77
+ variant: { type: String, reflect: true },
78
+ size: { type: String, reflect: true },
79
+ track: { reflect: true, converter: choiceAttribute },
80
+ fullWidth: { type: Boolean, attribute: 'full-width', reflect: true },
81
+ label: { type: String },
82
+ tabs: { type: String },
83
+ noSwipe: { type: Boolean, attribute: 'no-swipe', reflect: true },
84
+ transition: { type: String, reflect: true },
85
+ group: { type: String },
86
+ rememberAs: { type: String, attribute: 'remember-as' },
87
+ swipes: { state: true },
88
+ }; }
89
+ constructor() {
90
+ super();
91
+ this.availability = new AvailabilityController(this, 'tab-view');
92
+ /**
93
+ * The value of the selected tab, whose panel is shown — kept equal to the linked tabs' `value`: setting either sets the
94
+ * other, without an event. `null` shows the panel of the tab the tabs select while theirs is `null` (the first enabled
95
+ * tab). A swipe sets it (and the tabs') before `change` fires.
96
+ */
97
+ this.value = null;
98
+ /**
99
+ * The variant of the row the view draws itself, with the tabs' meaning (TBV-16): primary for the main views of a screen,
100
+ * secondary for views within one of them, tonal for the quiet row of a sample or a setting, or a value the system
101
+ * adds to the tabs. Unused while linked (TBV-17).
102
+ */
103
+ this.variant = 'primary';
104
+ /** The size of the row the view draws itself, with the tabs' meaning (TBV-16): `medium`, or `small` for a row in a header. Unused while linked (TBV-17). */
105
+ this.size = 'medium';
106
+ /**
107
+ * Whether the row the view draws itself draws its track, with the tabs' meaning (TBV-16): false draws none, true
108
+ * draws it, and null, the default, takes the system's choice. The attribute: absent is null, `track` is true,
109
+ * `track="false"` is false. Unused while linked (TBV-17).
110
+ */
111
+ this.track = null;
112
+ /**
113
+ * How the view's own row lays out its tabs, with the tabs' meaning: false (hug) sizes each tab to its label and scrolls
114
+ * the row; true (fill) shares the row's width. Unused while linked (TBV-17).
115
+ */
116
+ this.fullWidth = false;
117
+ /** The accessible name of the view's own row: what the views are views of. Unused while linked (TBV-17). */
118
+ this.label = '';
119
+ /**
120
+ * Empty (the default): the view draws its own row of tabs from its panels (TBV-16). Set: the id of the `<tanrei-tabs>`
121
+ * this view is linked to, in the same tree, which names its panels and moves between them; the view draws no row, even
122
+ * while that element is missing (TBV-17).
123
+ */
124
+ this.tabs = '';
125
+ /**
126
+ * The spec's `swipeable`, inverted (an HTML boolean attribute defaults to false): turns the swipe off, leaving the
127
+ * switch to the tabs alone, for panels whose content is itself dragged sideways (a map, a drawing surface).
128
+ */
129
+ this.noSwipe = false;
130
+ /**
131
+ * The form in which the shown panel gives way to the next. `slide`: the panels travel, fading and blurring on the
132
+ * way as the system's transition values say, and follow a swipe. `fade`: the two crossfade in place. `none`: the new
133
+ * panel is shown whole in one frame, and the row the view draws puts its indicator on the new tab in that frame.
134
+ * `auto` (the default, and what any other value is taken as) takes the design system's answer (`motion.transition`,
135
+ * slide in the default system). Where motion is reduced slide is drawn as fade, and nothing is added to fade or none.
136
+ * A row the view is linked to keeps its own `transition`.
137
+ */
138
+ this.transition = 'auto';
139
+ /**
140
+ * The group of the row the view draws itself, with the tabs' meaning (TBV-16): Tab views and rows of tabs in the
141
+ * document that name the same group show the same choice, and a view that has no panel of that value keeps its own. A
142
+ * view that follows shows its panel at once, without a switch, and fires nothing. Empty (the default): the view's
143
+ * choice is its own. Unused while linked (TBV-17): the linked row names its own group.
144
+ */
145
+ this.group = '';
146
+ /**
147
+ * The key of the origin's `localStorage` under which the row the view draws itself keeps a person's choice and from
148
+ * which it restores it before the view is first drawn, with the tabs' meaning. Empty (the default): nothing is read
149
+ * or written. Unused while linked (TBV-17): the linked row names its own key.
150
+ */
151
+ this.rememberAs = '';
152
+ /** Whether a drag can be taken now: linked, swipeable (TBV-8, TBV-14). */
153
+ this.swipes = false;
154
+ /** The tabs set through `tabsElement`, which win over `tabs`. */
155
+ this.explicitTabs = null;
156
+ /** The tabs this view is linked to now: its own row, or the row `tabs` names (TBV-14: null while that is missing). */
157
+ this.link = null;
158
+ /** TBV-16: the row the view draws itself, kept while the view is linked elsewhere so that it can be drawn again. */
159
+ this.ownRow = null;
160
+ /** TBV-16: the tab of the own row that each panel makes, kept while the panel is (TBV-12: nothing is recreated). */
161
+ this.rowTabs = new WeakMap();
162
+ /** The panels and their values at the last sync: a change of either shows the selected panel at once (TBV-6). */
163
+ this.synced = [];
164
+ /** The panel exposed as the selected tab's (TBV-9), which is drawn at rest once a switch ends. */
165
+ this.shown = null;
166
+ /** Whether the view has shown a panel since it appeared or was linked: the first one is shown at once (TBV-6). */
167
+ this.appeared = false;
168
+ /** The switch drawn now, from a selection or the rest of a released drag (TBV-4, TBV-6). */
169
+ this.switching = null;
170
+ this.switchFrame = 0;
171
+ this.drag = null;
172
+ this.children$ = new MutationObserver(() => this.panelsChanged());
173
+ /** While `tabs` names nothing in the tree, the tree is watched for it to appear. */
174
+ this.tree$ = new MutationObserver(() => this.resolve());
175
+ this.reportFrame = 0;
176
+ /** TBV-3, TBV-8: a touch or pen may start a swipe on the shown panel; a mouse, a trackpad or a wheel never does. */
177
+ this.onPointerDown = (event) => {
178
+ if (this.drag || !event.isPrimary || event.button !== 0)
179
+ return;
180
+ if (event.pointerType !== 'touch' && event.pointerType !== 'pen')
181
+ return;
182
+ if (!this.swipes || !this.linked || this.noSwipe || this.handlesSideways(event))
183
+ return;
184
+ // TBV-3, TBV-8: one gesture at a time — while the tabs follow a drag of their own, the view takes none.
185
+ if (this.linked.dragging)
186
+ return;
187
+ this.drag = { gesture: new SheetDrag(event, 'x'), taken: false, rtl: this.rtl, width: 0, target: null, toward: 0, p: 0, switch: null };
188
+ };
189
+ /**
190
+ * TBV-3: past the touch slop, further sideways than up or down, the view takes the drag (a running switch ends at once,
191
+ * TBV-6) and draws the switch toward the tab the drag goes to at p, setting the tabs' indicatorOffset to ±p, in every
192
+ * move. A drag that went up or down first is the browser's scrolling, for its whole length.
193
+ */
194
+ this.onPointerMove = (event) => {
195
+ const drag = this.drag;
196
+ if (!drag || event.pointerId !== drag.gesture.id)
197
+ return;
198
+ const step = drag.gesture.move(event);
199
+ if (drag.gesture.rejected) {
200
+ this.drag = null;
201
+ return;
202
+ }
203
+ // TBV-3, TBV-8: the tabs took a drag of their own before this one passed its slop: it is not the view's.
204
+ if (step === 'start' && this.linked?.dragging) {
205
+ this.drag = null;
206
+ return;
207
+ }
208
+ if (step === 'start') {
209
+ this.endSwitch();
210
+ drag.taken = true;
211
+ drag.width = this.container?.getBoundingClientRect().width || 1;
212
+ try {
213
+ this.setPointerCapture(event.pointerId);
214
+ }
215
+ catch {
216
+ // A pointer the browser does not know (a synthetic one) cannot be captured; its events still come here.
217
+ }
218
+ }
219
+ if (drag.taken) {
220
+ event.preventDefault();
221
+ this.follow(drag, drag.gesture.distance(event));
222
+ }
223
+ };
224
+ /**
225
+ * TBV-4: a release commits past half the width or on a fling toward the tab, and cancels otherwise (a fling away always
226
+ * cancels). A commit sets the view's and the tabs' value, re-expresses the offset from the new tab and fires `change`
227
+ * once, in the same frame; the rest of the switch and the offset then run over the switch's motion from where the
228
+ * release left them — the offset back at once where motion is reduced (TBV-7). A cancel runs both back to 0.
229
+ */
230
+ this.onPointerUp = (event) => {
231
+ const drag = this.drag;
232
+ if (!drag || event.pointerId !== drag.gesture.id)
233
+ return;
234
+ this.drag = null;
235
+ if (!drag.taken)
236
+ return;
237
+ const velocity = drag.gesture.velocity(event);
238
+ const finger = Math.sign(drag.gesture.distance(event));
239
+ const fling = Math.abs(velocity) >= SHEET_FLING_VELOCITY ? (Math.sign(velocity) === finger ? 1 : -1) : 0;
240
+ const commit = !!drag.target && !!drag.switch && (fling === 1 || (fling === 0 && drag.p >= 0.5));
241
+ this.settle(drag, commit);
242
+ };
243
+ /** A drag the browser took back (or that lost its pointer) goes back to rest. */
244
+ this.onPointerCancel = (event) => {
245
+ const drag = this.drag;
246
+ if (!drag || event.pointerId !== drag.gesture.id)
247
+ return;
248
+ this.drag = null;
249
+ if (drag.taken)
250
+ this.settle(drag, false);
251
+ };
252
+ this.addEventListener('tanrei-tab-update', (event) => {
253
+ if (event.target instanceof TanreiTabPanel && event.target.parentElement === this)
254
+ this.panelsChanged();
255
+ });
256
+ // TBV-23: a press on the view — which may become a drag across its row, or a swipe — finds the row's transition as
257
+ // the view's form says now. (A selection made on the row any other way asks first: `rowWillSelect()`.)
258
+ this.addEventListener('pointerdown', () => this.giveRowTransition(), { capture: true });
259
+ this.addEventListener('pointerdown', this.onPointerDown);
260
+ this.addEventListener('pointermove', this.onPointerMove);
261
+ this.addEventListener('pointerup', this.onPointerUp);
262
+ this.addEventListener('pointercancel', this.onPointerCancel);
263
+ }
264
+ /**
265
+ * The `<tanrei-tabs>` this view is linked to — the row `tabs` names, or the view's own row; setting it links that
266
+ * element instead (TBV-17), and `null` gives the view its own row back while `tabs` is empty.
267
+ */
268
+ get tabsElement() {
269
+ return this.link;
270
+ }
271
+ set tabsElement(element) {
272
+ this.explicitTabs = element instanceof TanreiTabs && element !== this.ownRow ? element : null;
273
+ this.resolve();
274
+ }
275
+ /** TBV-17: whether the view is linked to a row placed elsewhere (it then draws none), rather than drawing its own. */
276
+ get linkedElsewhere() {
277
+ return !!this.tabs || !!this.explicitTabs;
278
+ }
279
+ /** The view's panels, in order. */
280
+ get panels() {
281
+ return [...this.children].filter((child) => child instanceof TanreiTabPanel);
282
+ }
283
+ get container() {
284
+ return this.renderRoot?.querySelector('.container') ?? null;
285
+ }
286
+ /** The linked tabs, while they are connected. */
287
+ get linked() {
288
+ return this.link?.isConnected ? this.link : null;
289
+ }
290
+ /** @internal TAB-13, TBV-15: the view's panel of `value` — the first panel with it — or null. */
291
+ panelFor(value) {
292
+ if (!value)
293
+ return null;
294
+ return this.panels.find((panel) => panel.value === value) ?? null;
295
+ }
296
+ connectedCallback() {
297
+ super.connectedCallback();
298
+ this.children$.observe(this, { childList: true });
299
+ this.appeared = false;
300
+ this.resolve();
301
+ }
302
+ disconnectedCallback() {
303
+ super.disconnectedCallback();
304
+ this.children$.disconnect();
305
+ this.tree$.disconnect();
306
+ cancelAnimationFrame(this.reportFrame);
307
+ this.endDrag();
308
+ this.endSwitch();
309
+ const tabs = this.link;
310
+ this.link = null;
311
+ tabs?.unlinkView(this);
312
+ }
313
+ /**
314
+ * Links the view to its tabs (TBV-1, TBV-14, TBV-16, TBV-17): the row `tabsElement` or `tabs` names — drawing none of
315
+ * its own, even while that row is missing — or, while neither is set, the row it draws itself. A new link takes the
316
+ * view's `value` over to the tabs — or, while it is null, takes theirs — and shows its panel at once (TBV-6).
317
+ */
318
+ resolve() {
319
+ if (!this.isConnected)
320
+ return;
321
+ const root = this.getRootNode();
322
+ this.tree$.disconnect();
323
+ let tabs;
324
+ if (this.linkedElsewhere) {
325
+ const named = this.tabs && typeof root.getElementById === 'function' ? root.getElementById(this.tabs) : null;
326
+ const found = this.explicitTabs ?? (named instanceof TanreiTabs ? named : null);
327
+ tabs = found?.isConnected ? found : null;
328
+ // Watch the tree only while the link is missing (the tabs may be added after the view).
329
+ if (!tabs && this.tabs && !this.explicitTabs)
330
+ this.tree$.observe(root, { childList: true, subtree: true, attributes: true, attributeFilter: ['id'] });
331
+ }
332
+ else
333
+ tabs = this.placeOwnRow();
334
+ if (tabs === this.link) {
335
+ if (!tabs)
336
+ this.sync('instant');
337
+ this.reports();
338
+ return;
339
+ }
340
+ const old = this.link;
341
+ this.endDrag();
342
+ this.endSwitch();
343
+ this.link = tabs;
344
+ this.appeared = false;
345
+ old?.unlinkView(this);
346
+ // TBV-17: linked elsewhere, the view's own row is removed at once (after it is unlinked, so that it tells nobody).
347
+ if (tabs !== this.ownRow && this.ownRow?.parentElement === this)
348
+ this.ownRow.remove();
349
+ if (tabs) {
350
+ if (this.value !== null && this.value !== undefined) {
351
+ if (tabs.value !== this.value)
352
+ tabs.value = this.value;
353
+ }
354
+ else if (tabs.value !== null && tabs.value !== undefined)
355
+ this.value = tabs.value;
356
+ // TAB-36, TAB-39, TBV-20: the row's group or its storage may hold a choice, which the row takes before it is
357
+ // drawn — after the view's own selected, so that the view's first frame shows the choice's panel.
358
+ tabs.followGroup();
359
+ if (tabs.value !== null && tabs.value !== undefined && tabs.value !== this.value)
360
+ this.value = tabs.value;
361
+ tabs.linkView(this);
362
+ }
363
+ this.sync('instant');
364
+ }
365
+ /**
366
+ * TBV-16: places the view's own row — created the first time — as its first light-DOM child in its `tabs` slot, drawn
367
+ * from its panels, and returns it.
368
+ */
369
+ placeOwnRow() {
370
+ let row = this.ownRow;
371
+ if (!row) {
372
+ row = this.ownerDocument.createElement('tanrei-tabs');
373
+ row.slot = 'tabs';
374
+ row.setOwnerView(this);
375
+ this.ownRow = row;
376
+ }
377
+ this.drawRow();
378
+ if (row.parentElement !== this)
379
+ this.prepend(row);
380
+ return row;
381
+ }
382
+ /**
383
+ * TBV-16: the own row as the panels and the view say now — its variant, fullWidth and label the view's, and one tab for
384
+ * each panel TBV-15 shows (the first with each non-empty value), in the panels' order, whose value, label, icon,
385
+ * labelHidden and disabled are the panel's. A panel keeps its tab; a tab is moved only when the order changed, so a
386
+ * focused tab keeps its focus.
387
+ */
388
+ drawRow() {
389
+ const row = this.ownRow;
390
+ if (!row || this.linkedElsewhere)
391
+ return;
392
+ row.variant = this.variant;
393
+ row.size = this.size;
394
+ row.track = this.track;
395
+ // TBV-23: a form the view names itself reaches the row with the row; the system's answer is read when it is needed.
396
+ if (this.namedForm)
397
+ this.giveRowTransition();
398
+ row.fullWidth = this.fullWidth;
399
+ row.label = this.label;
400
+ row.group = this.group;
401
+ row.rememberAs = this.rememberAs;
402
+ const panels = this.panels;
403
+ const tabs = panels
404
+ .filter((panel, index) => !!panel.value && panels.findIndex((each) => each.value === panel.value) === index)
405
+ .map((panel) => {
406
+ let tab = this.rowTabs.get(panel);
407
+ if (!tab) {
408
+ tab = this.ownerDocument.createElement('tanrei-tab');
409
+ this.rowTabs.set(panel, tab);
410
+ }
411
+ tab.value = panel.value;
412
+ tab.label = panel.label;
413
+ tab.icon = panel.icon;
414
+ tab.labelHidden = panel.labelHidden;
415
+ tab.disabled = panel.disabled;
416
+ return tab;
417
+ });
418
+ for (const child of [...row.children])
419
+ if (!tabs.includes(child))
420
+ child.remove();
421
+ tabs.forEach((tab, index) => {
422
+ const at = row.children[index] ?? null;
423
+ if (at !== tab)
424
+ row.insertBefore(tab, at);
425
+ });
426
+ }
427
+ /** TBV-22: the form `transition` names itself, or null while it is auto (or a value the view does not define). */
428
+ get namedForm() {
429
+ return FORMS.includes(this.transition) ? this.transition : null;
430
+ }
431
+ /**
432
+ * TBV-22: the form a switch is drawn in right now: the one `transition` names, else the system's choice as the
433
+ * cascade gives it at this moment — never cached, and an unknown name is the first value (slide).
434
+ */
435
+ get form() {
436
+ return this.namedForm ?? compChoice(this, FORM_TOKEN, FORMS);
437
+ }
438
+ /**
439
+ * TBV-23: gives the view's own row the tabs' transition none while the view's form is none, and auto — the tabs' own
440
+ * answer — otherwise. Written as the attribute, so that the row has it in this task. A linked row is never set.
441
+ */
442
+ giveRowTransition() {
443
+ const row = this.ownRow;
444
+ if (!row || this.linkedElsewhere)
445
+ return;
446
+ const transition = this.form === 'none' ? 'none' : 'auto';
447
+ if (row.getAttribute('transition') !== transition && (transition === 'none' || row.hasAttribute('transition')))
448
+ row.setAttribute('transition', transition);
449
+ }
450
+ /** @internal TBV-23: the view's own row is about to draw a person's selection, in the form the view has now. */
451
+ rowWillSelect() {
452
+ this.giveRowTransition();
453
+ }
454
+ /**
455
+ * @internal TBV-18: the user selected `value` on the view's own row, which has set its `value` (and so the view's,
456
+ * TBV-1) and fires nothing: the view announces it, once, in the same task.
457
+ */
458
+ rowSelected(value) {
459
+ if (this.value !== value)
460
+ this.value = value;
461
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, detail: { value } }));
462
+ }
463
+ /**
464
+ * @internal TBV-1, TBV-2: the linked tabs' selection, their tabs or their connection changed. TBV-20: `atOnce` when
465
+ * the tabs took their group's choice, or one restored from storage — the panel is shown at once, with no switch, a
466
+ * swipe in progress ends without committing, and nothing is fired.
467
+ */
468
+ followTabs(atOnce = false) {
469
+ if (this.link && !this.link.isConnected) {
470
+ this.resolve();
471
+ return;
472
+ }
473
+ const tabs = this.linked;
474
+ if (!tabs)
475
+ return;
476
+ // TBV-1: the view's value follows the tabs' without an event (updated() sees them equal and writes nothing back).
477
+ if (tabs.value !== this.value)
478
+ this.value = tabs.value;
479
+ this.sync(atOnce ? 'instant' : 'switch');
480
+ }
481
+ /**
482
+ * TBV-6, TBV-16: panels added, removed or given other values redraw the own row and show the selected tab's panel at
483
+ * once; a panel's other tab props (label, icon, labelHidden, disabled) redraw the row only, in the same frame.
484
+ */
485
+ panelsChanged() {
486
+ const panels = this.panels;
487
+ const moved = panels.length !== this.synced.length || panels.some((panel, index) => this.synced[index][0] !== panel || this.synced[index][1] !== panel.value);
488
+ if (this.link && this.link === this.ownRow)
489
+ this.drawRow();
490
+ if (moved)
491
+ this.sync('instant');
492
+ this.linked?.relink();
493
+ }
494
+ /**
495
+ * The panel to show (TBV-1, TBV-14, TBV-15): linked, the panel of the tabs' selected tab — the first panel with its
496
+ * value — or none when it has none; without tabs, the first panel with `value`, or the first panel while it is null.
497
+ */
498
+ target() {
499
+ const tabs = this.linked;
500
+ if (tabs) {
501
+ const tab = tabs.selectedTab;
502
+ return tab ? this.panelFor(tab.value) : null;
503
+ }
504
+ if (this.value === null || this.value === undefined)
505
+ return this.panels[0] ?? null;
506
+ return this.panelFor(this.value);
507
+ }
508
+ /**
509
+ * Brings what the view shows in line with the selection (TBV-1, TBV-2, TBV-6): `switch` draws a switch to a newly
510
+ * selected panel once the view has appeared; `instant` ends any switch and shows the panel at once. Then exposes the
511
+ * panels (TBV-9) and reports what it should (TBV-14, TBV-15).
512
+ */
513
+ sync(mode) {
514
+ if (!this.isConnected || !this.hasUpdated)
515
+ return;
516
+ const tabs = this.linked;
517
+ const target = this.target();
518
+ if (target !== this.shown) {
519
+ const from = this.shown;
520
+ // TBV-6: a new selection ends a running switch (and a drag) at once, as if it had finished, and starts from its panel.
521
+ this.endDrag();
522
+ this.endSwitch();
523
+ this.releaseFocus(from, target);
524
+ this.shown = target;
525
+ // TBV-22: under none the panel is shown at once, as one a group's choice shows is (TBV-20).
526
+ if (mode === 'switch' && this.appeared && tabs && (from || target) && this.form !== 'none')
527
+ this.startSwitch(from, target);
528
+ }
529
+ else if (mode === 'instant') {
530
+ this.endDrag();
531
+ this.endSwitch();
532
+ }
533
+ this.appeared = true;
534
+ this.synced = this.panels.map((panel) => [panel, panel.value]);
535
+ this.swipes = !!tabs && !this.noSwipe;
536
+ this.expose();
537
+ this.reports();
538
+ }
539
+ /**
540
+ * TBV-9, TBV-14: the shown panel is the tab panel, named by its tab (the tab controls it, TAB-13), a Tab stop itself
541
+ * while it holds nothing focusable; a panel a switch or a drag still draws is inert and hidden from assistive
542
+ * technology; every other panel is `hidden` and `inert`. Without tabs no panel has the tab panel role.
543
+ */
544
+ expose() {
545
+ const tabs = this.linked;
546
+ const drawn = new Set();
547
+ for (const each of [this.switching?.switch, this.drag?.switch]) {
548
+ // TBV-22: under none a swipe draws no second panel.
549
+ if (each && each.look.form !== 'none')
550
+ drawn.add(each.from).add(each.to);
551
+ }
552
+ for (const panel of this.panels) {
553
+ const shown = panel === this.shown;
554
+ const tab = tabs && panel.value ? (tabs.tabs.find((each) => each.value === panel.value) ?? null) : null;
555
+ // Only the shown panel is a Tab stop, so only it is searched (a page of code samples holds thousands of elements).
556
+ const focusable = shown && [...panel.children].some((child) => findInteractive(child));
557
+ hostAria(panel, {
558
+ role: tabs ? 'tabpanel' : null,
559
+ 'aria-labelledby': tabs ? (tab?.id ?? null) : null,
560
+ tabindex: shown && !focusable ? '0' : null,
561
+ hidden: shown || drawn.has(panel) ? null : '',
562
+ inert: shown ? null : '',
563
+ 'aria-hidden': !shown && drawn.has(panel) ? 'true' : null,
564
+ });
565
+ }
566
+ }
567
+ /** TBV-10: a switch that hides the panel holding keyboard focus moves focus to the tabs' selected tab. */
568
+ releaseFocus(from, to) {
569
+ if (!from || from === to || !from.matches(':focus-within'))
570
+ return;
571
+ this.linked?.selectedTab?.focus({ preventScroll: true });
572
+ }
573
+ /** TBV-14, TBV-15, TBV-17: what a debug build tells the developer, once the tree has had a frame to link the tabs. */
574
+ reports() {
575
+ cancelAnimationFrame(this.reportFrame);
576
+ this.reportFrame = requestAnimationFrame(() => {
577
+ if (!this.isConnected)
578
+ return;
579
+ const tabs = this.linked;
580
+ const panels = this.panels;
581
+ const elsewhere = this.linkedElsewhere;
582
+ const hasValue = this.value !== null && this.value !== undefined;
583
+ if (elsewhere) {
584
+ // TBV-17: the row's props are the view's own row's, and a linked view draws none.
585
+ const unused = [this.variant !== 'primary' && 'variant', this.size !== 'medium' && 'size', this.track !== null && 'track', this.fullWidth && 'full-width', this.label && 'label', this.group && 'group', this.rememberAs && 'remember-as'].filter(Boolean);
586
+ if (unused.length)
587
+ report(this, 'TBV-17', `${unused.join(', ')} apply only to a row the view draws itself; linked to other tabs, the view draws none and they are unused`);
588
+ }
589
+ if (!tabs) {
590
+ report(this, 'TBV-14', `tabs="${this.tabs}" names no <tanrei-tabs> in this tree; its panels have no tabs`);
591
+ if (hasValue && !this.panelFor(this.value))
592
+ report(this, 'TBV-14', `no panel has the value "${this.value}"; none is shown`);
593
+ }
594
+ else if (!elsewhere) {
595
+ if (!panels.length)
596
+ report(this, 'TBV-14', 'it holds no <tanrei-tab-panel>, so its own row has no tab');
597
+ else if (hasValue && !tabs.selectedTab)
598
+ report(this, 'TBV-14', `no panel has the value "${this.value}"; none is shown`);
599
+ }
600
+ else {
601
+ const selected = tabs.selectedTab;
602
+ if (selected && !this.panelFor(selected.value))
603
+ report(this, 'TBV-14', `the selected tab "${selected.value}" has no panel; none is shown`);
604
+ if (tabs.ownPanels.length)
605
+ report(this, 'TBV-15', `the linked <tanrei-tabs> hold ${tabs.ownPanels.length} panel(s) of their own; they stay hidden and this view's panels take their place`);
606
+ }
607
+ const values = panels.map((panel) => panel.value);
608
+ const ownRow = tabs && !elsewhere;
609
+ panels.forEach((panel, index) => {
610
+ if (!panel.value)
611
+ report(this, 'TBV-15', `panel ${index + 1} has an empty value; it is never shown${ownRow ? ' and has no tab' : ''}`);
612
+ else if (values.indexOf(panel.value) !== index)
613
+ report(this, 'TBV-15', `the value "${panel.value}" is given to more than one panel; only the first of them is shown${ownRow ? ' and has a tab' : ''}`);
614
+ else if (tabs && elsewhere && !tabs.tabs.some((tab) => tab.value === panel.value))
615
+ report(this, 'TBV-15', `the panel "${panel.value}" has the value of no tab of the linked tabs; it is never shown`);
616
+ });
617
+ });
618
+ }
619
+ /**
620
+ * TBV-4…7: the switch's look and timing, read now through the probe's real properties (never cached, so a change of
621
+ * system or of reduced motion applies to the next switch). TBV-22: under fade the distance, its share, the blur and
622
+ * the opacity's end are 0 and the motion is the fade's, so the two panels crossfade in place; under none there is no
623
+ * motion at all.
624
+ */
625
+ look() {
626
+ const probe = this.renderRoot?.querySelector('.probe');
627
+ const style = probe ? getComputedStyle(probe) : null;
628
+ const number = (value) => {
629
+ const n = Number.parseFloat(value ?? '');
630
+ return Number.isFinite(n) ? n : 0;
631
+ };
632
+ const form = this.form;
633
+ if (form !== 'slide') {
634
+ const fade = form === 'fade';
635
+ return { form, distance: 0, fraction: 0, opacity: fade ? 0 : 1, blur: 0, duration: fade ? number(style?.animationDuration) * 1000 : 0, easing: (fade && style?.animationTimingFunction) || 'linear' };
636
+ }
637
+ return {
638
+ form,
639
+ distance: number(style?.width),
640
+ fraction: number(style?.flexGrow),
641
+ opacity: style ? number(style.opacity) : 1,
642
+ blur: number(style?.height),
643
+ duration: number(style?.transitionDuration) * 1000,
644
+ easing: style?.transitionTimingFunction || 'ease',
645
+ };
646
+ }
647
+ get rtl() {
648
+ return getComputedStyle(this).direction === 'rtl';
649
+ }
650
+ /** The physical direction a panel leaves by when the tab it gives way to comes after its own (TBV-5, TBV-13): the start edge. */
651
+ startSign(rtl) {
652
+ return rtl ? 1 : -1;
653
+ }
654
+ /** The index among the linked tabs of the tab of a panel's value. */
655
+ tabPosition(panel) {
656
+ const tabs = this.linked?.tabs ?? [];
657
+ return panel ? tabs.findIndex((tab) => tab.value === panel.value) : -1;
658
+ }
659
+ /**
660
+ * TBV-5: draws both panels of a switch at progress `p` in the same place, B over A, over a travel D of
661
+ * transition.distance plus transition.distance-fraction of the width: A moved p × D toward the edge it leaves by, faded
662
+ * to 1 − p × (1 − opacity) and blurred by p × blur; B moved (1 − p) × D from the other side, faded and blurred by
663
+ * (1 − p). The travel follows p as eased (an overshoot included); the fade and the blur follow it clamped.
664
+ */
665
+ paint(each, p) {
666
+ each.p = p;
667
+ // TBV-22: under none the shown panel stays at rest for the whole of a swipe, and the other is not drawn.
668
+ if (each.look.form === 'none')
669
+ return;
670
+ const { distance, fraction, opacity, blur } = each.look;
671
+ const travel = distance + fraction * each.width;
672
+ const q = clamp01(p);
673
+ const draw = (panel, x, fade, over) => {
674
+ if (!panel)
675
+ return;
676
+ panel.style.translate = `${px(x)} 0`;
677
+ panel.style.opacity = String(Math.round((1 - fade * (1 - opacity)) * 1000) / 1000);
678
+ panel.style.filter = blur > 0 ? `blur(${px(fade * blur)})` : '';
679
+ panel.style.zIndex = over ? '1' : '';
680
+ };
681
+ draw(each.from, each.sign * p * travel, q, false);
682
+ draw(each.to, -each.sign * (1 - p) * travel, 1 - q, true);
683
+ }
684
+ /** A panel at rest: nothing of a switch is left on it. */
685
+ rest(panel) {
686
+ if (!panel)
687
+ return;
688
+ for (const property of ['translate', 'opacity', 'filter', 'z-index'])
689
+ panel.style.removeProperty(property);
690
+ }
691
+ /** A switch from `from` to `to`: A leaves by the start edge when B's tab comes after A's among the tabs (TBV-5, TBV-13). */
692
+ makeSwitch(from, to, forward, rtl = this.rtl) {
693
+ const start = this.startSign(rtl);
694
+ return { from, to, sign: forward ? start : -start, look: this.look(), width: this.container?.getBoundingClientRect().width ?? 0, p: 0 };
695
+ }
696
+ /** TBV-2, TBV-6: a selection on the tabs (or by the product) runs a switch from 0 to 1 over the switch's motion. */
697
+ startSwitch(from, to) {
698
+ const [a, b] = [this.tabPosition(from), this.tabPosition(to)];
699
+ const each = this.makeSwitch(from, to, a < 0 || b < 0 ? true : b > a);
700
+ this.run(each, 0, 1, 0);
701
+ }
702
+ /**
703
+ * Runs a switch from progress `from` to `to` over the look's motion, and the tabs' indicatorOffset from `offset` to 0
704
+ * with it (TBV-4, TBV-6, TBV-7). The progress of the motion's easing is read from an effect without keyframes on the
705
+ * container (it draws nothing), the view's own animation `tanrei-tab-view-switch` on the document's timeline; every
706
+ * frame draws both panels from it.
707
+ */
708
+ run(each, from, to, offset) {
709
+ this.endSwitch();
710
+ const container = this.container;
711
+ const { duration, easing } = each.look;
712
+ const animation = duration > 0 && container && typeof KeyframeEffect !== 'undefined' ? new Animation(new KeyframeEffect(container, [], { duration, easing })) : null;
713
+ const running = { switch: each, animation, from, to, offset };
714
+ this.switching = running;
715
+ this.expose();
716
+ if (!animation) {
717
+ this.finishSwitch();
718
+ return;
719
+ }
720
+ animation.id = 'tanrei-tab-view-switch';
721
+ animation.play();
722
+ const step = () => {
723
+ if (this.switching !== running)
724
+ return;
725
+ const over = animation.playState === 'finished' || animation.playState === 'idle';
726
+ if (over) {
727
+ this.finishSwitch();
728
+ return;
729
+ }
730
+ const e = animation.effect?.getComputedTiming().progress ?? 1;
731
+ this.paint(each, from + (to - from) * e);
732
+ if (offset && this.linked)
733
+ this.linked.indicatorOffset = offset * (1 - e);
734
+ this.switchFrame = requestAnimationFrame(step);
735
+ };
736
+ // Where frames do not run (a hidden page), the end still comes.
737
+ void animation.finished.then(step, () => { });
738
+ step();
739
+ }
740
+ /**
741
+ * TBV-6: ends the running switch at once, as if it had finished — the panel it goes to at rest, the other hidden, the
742
+ * tabs' indicator on the selected tab.
743
+ */
744
+ endSwitch() {
745
+ if (!this.switching)
746
+ return;
747
+ this.finishSwitch();
748
+ }
749
+ finishSwitch() {
750
+ const running = this.switching;
751
+ if (!running)
752
+ return;
753
+ cancelAnimationFrame(this.switchFrame);
754
+ this.switching = null;
755
+ running.animation?.cancel();
756
+ const { from, to } = running.switch;
757
+ this.rest(from);
758
+ this.rest(to);
759
+ if (running.offset && this.linked)
760
+ this.linked.indicatorOffset = 0;
761
+ this.expose();
762
+ }
763
+ /** The next (1) or previous (−1) enabled tab of the linked tabs from the selected one, in reading order, or null. */
764
+ neighbour(toward) {
765
+ const tabs = this.linked;
766
+ const selected = tabs?.selectedTab;
767
+ if (!tabs || !selected)
768
+ return null;
769
+ const list = tabs.tabs;
770
+ for (let index = list.indexOf(selected) + toward; index >= 0 && index < list.length; index += toward) {
771
+ if (!list[index].disabled)
772
+ return list[index];
773
+ }
774
+ return null;
775
+ }
776
+ /**
777
+ * TBV-8: a drag that starts on content that handles sideways drags itself — a region that scrolls sideways, a slider,
778
+ * a carousel, a text field, a control that sets its own touch-action, selected text — is not the view's.
779
+ */
780
+ handlesSideways(event) {
781
+ for (const node of event.composedPath()) {
782
+ if (node === this)
783
+ break;
784
+ if (!(node instanceof Element))
785
+ continue;
786
+ if (node.matches(TAKES_SIDEWAYS_DRAGS))
787
+ return true;
788
+ const style = getComputedStyle(node);
789
+ if ((style.overflowX === 'auto' || style.overflowX === 'scroll') && node.scrollWidth > node.clientWidth)
790
+ return true;
791
+ if (style.touchAction === 'none' || style.touchAction.includes('pan-x'))
792
+ return true;
793
+ }
794
+ const selection = getSelection();
795
+ const target = event.composedPath()[0];
796
+ return !!selection && !selection.isCollapsed && target instanceof Node && selection.containsNode(target, true);
797
+ }
798
+ /** TBV-3, TBV-13: the drag's distance `dx` (px, rightward) as a progress toward the next or previous enabled tab. */
799
+ follow(drag, dx) {
800
+ const tabs = this.linked;
801
+ if (!tabs)
802
+ return;
803
+ const towardStart = drag.rtl ? dx > 0 : dx < 0;
804
+ const toward = dx === 0 ? 0 : towardStart ? 1 : -1;
805
+ const target = toward ? this.neighbour(toward) : null;
806
+ if (target !== drag.target) {
807
+ // The drag turned to the other side: the panel it was bringing in goes back.
808
+ if (drag.switch && drag.switch.to !== this.shown)
809
+ this.rest(drag.switch.to);
810
+ drag.target = target;
811
+ drag.toward = target ? toward : 0;
812
+ drag.switch = target ? this.makeSwitch(this.shown, this.panelFor(target.value), toward === 1, drag.rtl) : null;
813
+ this.expose();
814
+ }
815
+ drag.p = target ? clamp01(Math.abs(dx) / drag.width) : 0;
816
+ if (drag.switch)
817
+ this.paint(drag.switch, drag.p);
818
+ else
819
+ this.rest(this.shown);
820
+ tabs.indicatorOffset = drag.toward * drag.p;
821
+ }
822
+ settle(drag, commit) {
823
+ const tabs = this.linked;
824
+ const each = drag.switch;
825
+ if (!tabs || !each || !drag.target) {
826
+ if (tabs)
827
+ tabs.indicatorOffset = 0;
828
+ this.rest(this.shown);
829
+ this.expose();
830
+ return;
831
+ }
832
+ // TBV-7: where motion is reduced the offset, which the finger moved, goes back at once.
833
+ // TBV-22: and so it does while the form is none.
834
+ const reduced = matchMedia('(prefers-reduced-motion: reduce)').matches || each.look.form === 'none';
835
+ if (commit) {
836
+ const value = drag.target.value;
837
+ const left = this.shown;
838
+ // The selection moves at the release: both values, the exposure (TBV-9), the focus (TBV-10), the offset from the
839
+ // new tab (TAB-26 places the indicator where it is), then the one `change`. TBV-21: the choice is the person's, so
840
+ // the tabs' group follows it and the view's container stays where it is in the window.
841
+ tabs.personSelected(value, this.container ?? this);
842
+ this.value = value;
843
+ const offset = reduced ? 0 : -drag.toward * (1 - drag.p);
844
+ tabs.indicatorOffset = offset;
845
+ this.releaseFocus(left, each.to);
846
+ this.shown = each.to;
847
+ this.run(each, drag.p, 1, offset);
848
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, detail: { value } }));
849
+ }
850
+ else {
851
+ const offset = reduced ? 0 : drag.toward * drag.p;
852
+ tabs.indicatorOffset = offset;
853
+ this.run(each, drag.p, 0, offset);
854
+ }
855
+ }
856
+ /** Drops a drag in progress: its panels back at rest, the indicator on the selected tab. */
857
+ endDrag() {
858
+ const drag = this.drag;
859
+ if (!drag)
860
+ return;
861
+ this.drag = null;
862
+ if (!drag.taken)
863
+ return;
864
+ if (drag.switch) {
865
+ this.rest(drag.switch.from);
866
+ this.rest(drag.switch.to);
867
+ }
868
+ if (this.linked)
869
+ this.linked.indicatorOffset = 0;
870
+ }
871
+ firstUpdated() {
872
+ this.sync('instant');
873
+ }
874
+ updated(changed) {
875
+ if (changed.has('tabs') && changed.get('tabs') !== undefined)
876
+ this.resolve();
877
+ // TBV-16: the own row's variant, fullWidth and label are the view's; TBV-17 reports them while linked elsewhere.
878
+ if (changed.has('variant') || changed.has('size') || changed.has('track') || changed.has('fullWidth') || changed.has('label') || changed.has('group') || changed.has('rememberAs')) {
879
+ this.drawRow();
880
+ if (this.hasUpdated)
881
+ this.reports();
882
+ }
883
+ if (changed.has('transition')) {
884
+ // TBV-22: a value the view does not define is auto.
885
+ if (this.transition && !TRANSITION_VALUES.includes(this.transition))
886
+ report(this, 'TBV-22', `transition "${this.transition}" is not a transition of the Tab view; it is taken as "auto"`);
887
+ // TBV-23: a switch that is drawn ends at once, as if it had finished; the next one has the new form. The row
888
+ // follows a form the view names; the system's answer is read when something begins.
889
+ if (changed.get('transition') !== undefined) {
890
+ this.endSwitch();
891
+ this.giveRowTransition();
892
+ }
893
+ }
894
+ if (changed.has('noSwipe')) {
895
+ if (this.noSwipe)
896
+ this.endDrag();
897
+ this.swipes = !!this.linked && !this.noSwipe;
898
+ }
899
+ if (changed.has('value')) {
900
+ // TBV-1: the view's value, set by the product, is set on the tabs too (which then switch the view, TBV-2).
901
+ const tabs = this.linked;
902
+ if (tabs && tabs.value !== this.value) {
903
+ // TBV-23: the row draws the product's selection in the form the view has now.
904
+ this.giveRowTransition();
905
+ tabs.value = this.value;
906
+ }
907
+ else if (!tabs)
908
+ this.sync('instant');
909
+ }
910
+ }
911
+ render() {
912
+ return html `<slot name="tabs"></slot><div part="container" class=${classMap({ container: true, swipe: this.swipes })} data-tanrei-shape><slot></slot><span class="probe" aria-hidden="true"></span></div>`;
913
+ }
914
+ }
915
+ if (!customElements.get('tanrei-tab-view'))
916
+ customElements.define('tanrei-tab-view', TanreiTabView);
917
+ //# sourceMappingURL=tab-view.js.map