@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,792 @@
1
+ import { LitElement, html, nothing } from 'lit';
2
+ import { styleMap } from 'lit/directives/style-map.js';
3
+ import { AvailabilityController, DIRECTION_PROBE, DirectionController, FieldControlController, OpenAxesController, PressController, layoutSize, report, syncFocusStyle } from '../../primitives/index.js';
4
+ import { takeFormDisabled } from '../../primitives/form-disabled.js';
5
+ import { FormSays } from '../../primitives/form-says.js';
6
+ import { AXES, styles } from './slider.styles.js';
7
+ import { FocusedStop, disabledWaitsWhileFocused } from '../../primitives/disabled-while-focused.js';
8
+ import { focusedAtFirst } from '../../primitives/autofocus.js';
9
+ const ORIENTATIONS = ['horizontal', 'vertical'];
10
+ const INDICATORS = ['none', 'active', 'always'];
11
+ /**
12
+ * How far a touch travels along the track before it is a drag, or across it before it is left to the page's scroll
13
+ * (SLD-2: "the platform's touch slop"). The web does not expose the platform's value; this is Android's
14
+ * `ViewConfiguration` default, as React Native's slider uses. A behaviour of the platform, not a design value.
15
+ */
16
+ export const TOUCH_SLOP = 8;
17
+ /** Rounds away floating-point noise (0.1 + 0.2), so that a snapped value compares equal to its step. */
18
+ const tidy = (value) => Math.round(value * 1e10) / 1e10;
19
+ const clamp = (value, low, high) => Math.min(high, Math.max(low, value));
20
+ /** Fraction digits of a number, as written (at most 10). */
21
+ const decimals = (value) => {
22
+ const text = String(tidy(Math.abs(value)));
23
+ return text.includes('e-') ? 10 : (text.split('.')[1] ?? '').length;
24
+ };
25
+ /**
26
+ * The slider's numbers (SLD-1, SLD-3, SLD-22): the range, the keyboard step, and the snap of a value — clamped between
27
+ * `low` and `high` (min and max by default), and while step is above 0 on min plus a whole multiple of step, the nearest.
28
+ */
29
+ export function sliderScale(min, max, step) {
30
+ const valid = Number.isFinite(min) && Number.isFinite(max) && max > min;
31
+ const stepping = Number.isFinite(step) && step > 0 ? step : 0;
32
+ const keyStep = stepping > 0 ? stepping : valid ? (max - min) / 100 : 0;
33
+ const snap = (value, low = min, high = max) => {
34
+ if (!valid)
35
+ return Number.isFinite(min) ? min : 0;
36
+ let next = clamp(Number.isFinite(value) ? value : low, low, high);
37
+ if (stepping > 0) {
38
+ next = min + Math.round((next - min) / stepping) * stepping;
39
+ if (next > high + 1e-9)
40
+ next -= stepping;
41
+ if (next < low - 1e-9)
42
+ next += stepping;
43
+ next = clamp(next, low, high);
44
+ }
45
+ return tidy(next);
46
+ };
47
+ const fraction = (value) => (valid ? clamp((value - min) / (max - min), 0, 1) : 0);
48
+ // SLD-18: as many fraction digits as the keyboard step has, at most two.
49
+ const digits = Math.min(2, decimals(keyStep));
50
+ return { valid, step: stepping, keyStep, snap, fraction, digits };
51
+ }
52
+ const TRACK_START = { f: 0, off: 'calc(var(--_th) / -2)', r: 'var(--_ts)' };
53
+ const TRACK_END = { f: 1, off: 'calc(var(--_th) / 2)', r: 'var(--_ts)' };
54
+ /**
55
+ * SLD-8: where a piece stops at a handle (`--_cut-<id>`, from its center: see the styles). With a gap it stops that far
56
+ * beyond the handle's edge, rounded like any end of the tracks; without one the two pieces run under the handle and
57
+ * meet square at its center, hidden by its fill (`gap × 100000` is 0 exactly when the gap is).
58
+ */
59
+ const AT_HANDLE = 'min(var(--_ts), var(--tanrei-comp-slider-track-gap) * 100000)';
60
+ const beforeHandle = (f, id) => ({ f, off: `calc(-1 * var(--_cut-${id}))`, r: AT_HANDLE });
61
+ const afterHandle = (f, id) => ({ f, off: `var(--_cut-${id})`, r: AT_HANDLE });
62
+ /** SLD-6: the origin; at an end of the travel the active track takes the track's rounded end, elsewhere the two meet square. */
63
+ const originPoint = (f) => (f <= 0 ? TRACK_START : f >= 1 ? TRACK_END : { f, off: '0px', r: '0px' });
64
+ /**
65
+ * Lets people choose a value, or a range of values, from a continuous or stepped scale by dragging a handle along a
66
+ * track.
67
+ *
68
+ * Contract: specs/slider.spec.json. Every visual value is a `--tanrei-comp-slider-*` token: per size the track's
69
+ * thickness and corners, the handle's height and the stop dots' size; the round state layer, the handle's width, fill,
70
+ * outline color and elevation, the track, active track and stop-dot colors in each state; the outline's width, the gap,
71
+ * the value indicator and the motion. The handle is its fill with its outline drawn over it, inside its edge (SLD-24).
72
+ *
73
+ * Each handle is an element with `role="slider"` in the shadow root (its own Tab stop, the start handle first), named by
74
+ * `label` (a range's start handle by `start-label`), with `aria-valuemin` / `-max` (bounded by the other handle in a
75
+ * range), `aria-valuenow`, `aria-valuetext` (`value-text`, or what `formatValue` writes, or the value in the page's
76
+ * locale) and `aria-orientation`. `formatValue` is a function the product gives once, as a property, from a value to
77
+ * its words (`slider.formatValue = (value) => percent.format(value / 100)`): it is asked for each handle at every
78
+ * change of a value. `shownValueText` (and `shownStartValueText`) is the value text of a handle as it is spoken now,
79
+ * read-only: what a product that frames the slider by hand gives its Field's `value-text` at each `input`.
80
+ * The whole slider is the hit area: a press moves the nearer handle there and a drag follows it; the arrow keys, Page
81
+ * Up / Down, Home and End move the focused handle. It sets its own `value` (and `startValue`) before it fires `input`
82
+ * (every change) and `change` (a finished change). A value the product sets fires neither and moves over the value
83
+ * motion.
84
+ *
85
+ * Form-associated: it submits `value` under `name` (a range submits `start-value`, then `value`, under the same name),
86
+ * resets to its attributes and follows a disabled `<fieldset>`.
87
+ *
88
+ * @tag tanrei-slider
89
+ * @csspart track - A piece of the track outside the active part (there are two).
90
+ * @csspart active-track - The active part of the track: from the origin to the value, or between a range's handles.
91
+ * @csspart stop-indicator - A stop dot.
92
+ * @csspart container - A handle's round state layer (hover, focus, press).
93
+ * @csspart handle - A handle: the element with role slider. Its background is the fill; its `::before` draws the outline.
94
+ * @csspart value-indicator - A handle's value indicator.
95
+ * @attr {string} form - The id of the form the slider belongs to, where it stands outside it: the platform's own attribute, which then wins over a form around it. The `form` property is read-only and returns the form element.
96
+ * @fires {CustomEvent<TanreiSliderChangeDetail>} input - The person changed a value; the element's `value` (and `startValue`) is already the new one.
97
+ * @fires {CustomEvent<TanreiSliderChangeDetail>} change - The person finished changing a value (the press ended, or a key was pressed); always after its input.
98
+ */
99
+ export class TanreiSlider extends LitElement {
100
+ constructor() {
101
+ super(...arguments);
102
+ this.availability = new AvailabilityController(this, 'slider');
103
+ /** Disabled under the focus it holds, its stop keeps its `tabindex` for one frame, as the platform's own control keeps focus (src/primitives/disabled-while-focused.ts). */
104
+ this.stop = new FocusedStop(this);
105
+ /** The track's weight: small (the default), medium or large, or a size the design system adds. Anything else draws small (SLD-23). */
106
+ this.size = 'small';
107
+ /** `horizontal` (the default) or `vertical`. Anything else draws horizontal (SLD-23). */
108
+ this.orientation = 'horizontal';
109
+ /** The value of the only handle, or of a range's end handle. The `value` attribute is what a form reset returns to. */
110
+ this.value = 0;
111
+ /** The value of a range's start handle (the `start-value` attribute). Ignored while `range` is false. */
112
+ this.startValue = 0;
113
+ /** Two handles, choosing the range from `startValue` to `value`. */
114
+ this.range = false;
115
+ /** The lowest value, at the track's start. */
116
+ this.min = 0;
117
+ /** The highest value, at the track's end. */
118
+ this.max = 100;
119
+ /** 0 is continuous; above 0 the values are `min` plus whole multiples of `step`, up to `max`. */
120
+ this.step = 0;
121
+ /** Where the active track starts: null (no attribute) starts it at `min`; a value inside the range makes a centered slider. Ignored for a range. */
122
+ this.origin = null;
123
+ /** A stop dot at every value a discrete slider can take. Ignored while `step` is 0. */
124
+ this.stops = false;
125
+ /** `none` (the default), `active` (while a handle is pressed or has keyboard focus) or `always` (the `value-indicator` attribute). */
126
+ this.valueIndicator = 'none';
127
+ /** Prevents interaction and removes the handles from the focus order. */
128
+ this.disabled = false;
129
+ /** Names the slider (a range's end handle) for assistive technology. Never drawn: put your visible label beside it, in the same words. Required. */
130
+ this.label = '';
131
+ /** Names a range's start handle ("Minimum price"; the `start-label` attribute). Required while `range` is true. */
132
+ this.startLabel = '';
133
+ /** The value as words ("40 %"), spoken and shown by the value indicator in place of the number (the `value-text` attribute). For a range, the end handle's. */
134
+ this.valueText = '';
135
+ /** The start handle's value text, for a range (the `start-value-text` attribute). */
136
+ this.startValueText = '';
137
+ /** The product's function from a value to its words (`(value) => percent.format(value / 100)`), asked for each handle at every change of a value and when it is set. A property, never an attribute. `valueText` and `startValueText` win over it; an empty answer is no answer, and the value is then written as a number in the page's locale. */
138
+ this.formatValue = null;
139
+ /** Web only: the name it is submitted under. */
140
+ this.name = '';
141
+ /** The handle a fine pointer over the slider would move (SLD-11). */
142
+ this.hovered = null;
143
+ /** A press is dragging a handle: it follows without the value motion (SLD-16). */
144
+ this.dragging = false;
145
+ /** Set by an ancestor `<fieldset disabled>`. */
146
+ this.formDisabled = false;
147
+ this.internals = this.attachInternals();
148
+ /** What it tells its form, said where an element composed around it hears it (src/primitives/form-says.ts). */
149
+ this.says = new FormSays(this, this.internals);
150
+ /** SLD-23: sizes a design system adds, and a size the active system does not have (src/primitives/axes.ts). */
151
+ this.axes = new OpenAxesController(this, { component: 'slider', behavior: 'SLD-23', axes: AXES });
152
+ /** SLD-13 / SLD-14: each handle's pressed state, press-hold and ripple — grown from the handle's center, where the press moves it. */
153
+ this.presses = { start: this.pressOf('start'), end: this.pressOf('end') };
154
+ /** The press being answered: the pointer, the handle it moves, where it began and whether it has become a drag. */
155
+ this.gesture = null;
156
+ this.resize = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(() => this.placeIndicators());
157
+ /**
158
+ * SLD-17, SLD-21, SLD-25: a change of the direction it inherits moves the handles and the tracks to the other side. It
159
+ * is no change of value, so it is drawn at once: the value motion the new insets started (a piece's two ends are
160
+ * physical lengths the browser can interpolate) is ended in the frame it began, before it is painted, and the value
161
+ * indicators are placed again.
162
+ */
163
+ this.direction = new DirectionController(this, () => {
164
+ for (const part of this.renderRoot.querySelectorAll('.piece, .dots, .thumb')) {
165
+ // The state motion (a color) is not the direction's and runs on.
166
+ for (const motion of part.getAnimations())
167
+ if (!(motion instanceof CSSTransition) || motion.transitionProperty !== 'background-color')
168
+ motion.finish();
169
+ }
170
+ this.placeIndicators();
171
+ });
172
+ /**
173
+ * What a field around the slider gives it (src/primitives/field.ts): the name while it has no `label` of its own, the
174
+ * description, the invalid state and `disabled` (FLD-8, FLD-10, FLD-11, FLD-14). The slider's role has no required
175
+ * state, so a required slider says so in its description.
176
+ */
177
+ this.field = new FieldControlController(this, {
178
+ requiredState: false,
179
+ // A range's `label` names its end handle, not the pair: under a field's label the pair is the field's to name.
180
+ named: () => !!this.label.trim() && !(this.range && !!this.field.label),
181
+ });
182
+ this.onPointerDown = (event) => {
183
+ if (!this.interactive || this.gesture)
184
+ return;
185
+ if (event.pointerType === 'mouse' && event.button !== 0)
186
+ return;
187
+ // No text selection, and no focus from the press itself: the pressed handle is focused below.
188
+ event.preventDefault();
189
+ try {
190
+ event.currentTarget.setPointerCapture(event.pointerId);
191
+ }
192
+ catch {
193
+ // A synthetic pointer cannot be captured; the press is still followed while it stays over the slider.
194
+ }
195
+ const target = this.valueAt(event.clientX, event.clientY);
196
+ const handle = this.nearer(target);
197
+ const touch = event.pointerType === 'touch';
198
+ this.gesture = { pointer: event.pointerId, handle, touch, x: event.clientX, y: event.clientY, dragging: false, before: this.values };
199
+ if (!touch)
200
+ this.hovered = handle;
201
+ // SLD-13: the pressed state of the handle the press moves, without delay.
202
+ this.presses[handle].press({ x: event.clientX, y: event.clientY });
203
+ // SLD-2: a pointer moves the handle at once (over the value motion, SLD-16); a touch waits for the slop or its end.
204
+ if (!touch) {
205
+ this.focusHandle(handle);
206
+ if (target !== null)
207
+ this.move(handle, target);
208
+ }
209
+ };
210
+ this.onPointerMove = (event) => {
211
+ const gesture = this.gesture;
212
+ if (!gesture) {
213
+ this.hover(event);
214
+ return;
215
+ }
216
+ if (event.pointerId !== gesture.pointer)
217
+ return;
218
+ if (!gesture.dragging) {
219
+ if (gesture.touch) {
220
+ const vertical = this.axis === 'vertical';
221
+ const [along, across] = vertical ? [event.clientY - gesture.y, event.clientX - gesture.x] : [event.clientX - gesture.x, event.clientY - gesture.y];
222
+ // SLD-2: a touch that first travels across the track is the page's scroll; it changes nothing.
223
+ if (Math.abs(across) >= TOUCH_SLOP && Math.abs(across) > Math.abs(along)) {
224
+ this.endGesture();
225
+ return;
226
+ }
227
+ if (Math.abs(along) < TOUCH_SLOP)
228
+ return;
229
+ this.focusHandle(gesture.handle);
230
+ }
231
+ gesture.dragging = true;
232
+ this.dragging = true;
233
+ }
234
+ const target = this.valueAt(event.clientX, event.clientY);
235
+ if (target !== null)
236
+ this.move(gesture.handle, target);
237
+ };
238
+ this.onPointerUp = (event) => {
239
+ const gesture = this.gesture;
240
+ if (!gesture || event.pointerId !== gesture.pointer)
241
+ return;
242
+ // SLD-2: a touch that did not move moves the handle to where it was pressed when it ends.
243
+ if (gesture.touch && !gesture.dragging) {
244
+ this.focusHandle(gesture.handle);
245
+ const target = this.valueAt(gesture.x, gesture.y);
246
+ if (target !== null)
247
+ this.move(gesture.handle, target);
248
+ }
249
+ this.endGesture();
250
+ };
251
+ this.onPointerCancel = (event) => {
252
+ if (this.gesture && event.pointerId === this.gesture.pointer)
253
+ this.endGesture();
254
+ };
255
+ this.onPointerLeave = (event) => {
256
+ if (!this.gesture && event.pointerType === 'mouse')
257
+ this.hovered = null;
258
+ };
259
+ /** A mouse press never focuses on its own (the pointer's press has already been handled). */
260
+ this.onMouseDown = (event) => {
261
+ event.preventDefault();
262
+ };
263
+ // ─── The value indicator's place (SLD-17) ───────────────────────────────────────────────────────────────────
264
+ /** Shifts each value indicator along the axis so it stays inside the window, from its handle's settled place. */
265
+ this.placeIndicators = () => {
266
+ if (this.indicator === 'none' || !this.isConnected)
267
+ return;
268
+ const rail = this.renderRoot.querySelector('.rail')?.getBoundingClientRect();
269
+ if (!rail)
270
+ return;
271
+ const vertical = this.axis === 'vertical';
272
+ const rtl = !vertical && this.rtl;
273
+ const values = this.values;
274
+ const scale = this.scale;
275
+ const view = document.documentElement;
276
+ for (const id of this.handles) {
277
+ const indicator = this.inThumb(id, '.value-indicator');
278
+ if (!indicator)
279
+ continue;
280
+ // Watch the indicator's own size too: new value text, or a web font that arrives late, changes its width without
281
+ // resizing the slider. (Setting --_shift moves it by `translate`, which is no resize, so this cannot loop.)
282
+ this.resize?.observe(indicator);
283
+ const f = scale.fraction(values[id]);
284
+ // The box's exact, fractional size, in the same viewport pixels as the rail. offsetWidth/offsetHeight round it to
285
+ // whole pixels (and a computed width is serialized to three decimals), while text is rarely a whole number of
286
+ // pixels wide: from a rounded-down size the clamp left the indicator a fraction of a pixel outside the window.
287
+ // Its own `translate` only moves the box, so the shift already applied does not change this size.
288
+ const box = indicator.getBoundingClientRect();
289
+ const size = vertical ? box.height : box.width;
290
+ const center = vertical ? rail.bottom - f * rail.height : rtl ? rail.right - f * rail.width : rail.left + f * rail.width;
291
+ const limit = vertical ? view.clientHeight : view.clientWidth;
292
+ const start = center - size / 2;
293
+ const shift = start < 0 ? -start : start + size > limit ? limit - (start + size) : 0;
294
+ // The shift is measured in the window's pixels and applied by `translate` in the indicator's own: inside a scaled
295
+ // ancestor (a `transform`, a `zoom`) one of its pixels is not one of the window's, so the shift is turned into
296
+ // its own by what the box is drawn at over what it is laid out at.
297
+ const laid = layoutSize(indicator);
298
+ const own = vertical ? laid.height : laid.width;
299
+ // (A laid-out size is serialized to three decimals: a ratio that near 1 is no scale at all.)
300
+ const ratio = own > 0 && size > 0 ? size / own : 1;
301
+ const drawn = Math.abs(ratio - 1) < 0.001 ? 1 : ratio;
302
+ indicator.style.setProperty('--_shift', `${shift / drawn}px`);
303
+ }
304
+ };
305
+ }
306
+ static { this.styles = styles; }
307
+ static { this.formAssociated = true; }
308
+ /**
309
+ * Its documented parts, once: what an element composed around it exports (src/primitives/composed.ts). Held equal to
310
+ * the `@csspart` lines above by src/primitives/composed.test.ts.
311
+ *
312
+ * @internal
313
+ */
314
+ static { this.parts = ['track', 'active-track', 'stop-indicator', 'container', 'handle', 'value-indicator']; }
315
+ static { this.shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }; }
316
+ static { this.properties = {
317
+ size: { type: String, reflect: true },
318
+ orientation: { type: String, reflect: true },
319
+ value: { type: Number },
320
+ startValue: { type: Number, attribute: 'start-value' },
321
+ range: { type: Boolean, reflect: true },
322
+ min: { type: Number },
323
+ max: { type: Number },
324
+ step: { type: Number },
325
+ origin: { type: Number },
326
+ stops: { type: Boolean, reflect: true },
327
+ valueIndicator: { type: String, attribute: 'value-indicator', reflect: true },
328
+ disabled: { type: Boolean, reflect: true },
329
+ label: { type: String },
330
+ startLabel: { type: String, attribute: 'start-label' },
331
+ valueText: { type: String, attribute: 'value-text' },
332
+ startValueText: { type: String, attribute: 'start-value-text' },
333
+ formatValue: { attribute: false },
334
+ name: { type: String, reflect: true },
335
+ hovered: { state: true },
336
+ dragging: { state: true },
337
+ formDisabled: { state: true },
338
+ }; }
339
+ pressOf(id) {
340
+ return new PressController(this, {
341
+ container: () => this.inThumb(id, '.container'),
342
+ holdCarrier: () => this.renderRoot.querySelector('.rail'),
343
+ disabled: () => !this.interactive,
344
+ keys: [],
345
+ origin: () => null,
346
+ });
347
+ }
348
+ inThumb(id, selector) {
349
+ return this.renderRoot.querySelector(`.thumb[data-handle='${id}'] ${selector}`);
350
+ }
351
+ /** The form it belongs to, if any. */
352
+ get form() {
353
+ return this.internals.form;
354
+ }
355
+ /** The element's validity. A slider always has a value on its scale, so it is always valid: the platform's own members of a form control, as an element composed around it has them. */
356
+ get validity() {
357
+ return this.internals.validity;
358
+ }
359
+ get validationMessage() {
360
+ return this.internals.validationMessage;
361
+ }
362
+ get willValidate() {
363
+ return this.internals.willValidate;
364
+ }
365
+ checkValidity() {
366
+ return this.internals.checkValidity();
367
+ }
368
+ reportValidity() {
369
+ return this.internals.reportValidity();
370
+ }
371
+ get scale() {
372
+ return sliderScale(Number(this.min), Number(this.max), Number(this.step));
373
+ }
374
+ get isDisabled() {
375
+ return this.disabled || this.formDisabled || this.field.disabled;
376
+ }
377
+ /** SLD-20, SLD-22: a disabled slider, or one whose max is not above its min, takes no input. */
378
+ get interactive() {
379
+ return !this.isDisabled && this.scale.valid;
380
+ }
381
+ get axis() {
382
+ return ORIENTATIONS.includes(this.orientation) ? this.orientation : 'horizontal';
383
+ }
384
+ get indicator() {
385
+ return INDICATORS.includes(this.valueIndicator) ? this.valueIndicator : 'none';
386
+ }
387
+ get handles() {
388
+ return this.range ? ['start', 'end'] : ['end'];
389
+ }
390
+ /** SLD-1, SLD-22: the values as drawn and exposed — clamped, snapped, and a range's start never past its end. */
391
+ get values() {
392
+ const scale = this.scale;
393
+ const end = scale.snap(Number(this.value));
394
+ return { end, start: this.range ? Math.min(scale.snap(Number(this.startValue)), end) : scale.snap(Number(this.min)) };
395
+ }
396
+ /** SLD-5: in a range each handle stops at the other's value. */
397
+ bounds(values, id) {
398
+ const [min, max] = [Number(this.min), Number(this.max)];
399
+ if (!this.range)
400
+ return [min, max];
401
+ return id === 'start' ? [min, values.end] : [values.start, max];
402
+ }
403
+ get rtl() {
404
+ return this.direction.rtl;
405
+ }
406
+ // ─── Form ─────────────────────────────────────────────────────────────────────────────────────────────────────
407
+ formResetCallback() {
408
+ const read = (name, fallback) => (this.hasAttribute(name) ? Number(this.getAttribute(name)) : fallback);
409
+ this.value = read('value', 0);
410
+ this.startValue = read('start-value', 0);
411
+ }
412
+ formStateRestoreCallback(state) {
413
+ const [start, end] = (typeof state === 'string' ? state : '').split(' ').map(Number);
414
+ if (Number.isFinite(end))
415
+ this.value = end;
416
+ if (Number.isFinite(start))
417
+ this.startValue = start;
418
+ }
419
+ formDisabledCallback(disabled) {
420
+ takeFormDisabled(this, disabled, (value) => (this.formDisabled = value));
421
+ }
422
+ // ─── Lifecycle ────────────────────────────────────────────────────────────────────────────────────────────────
423
+ connectedCallback() {
424
+ super.connectedCallback();
425
+ this.resize?.observe(this);
426
+ window.addEventListener('resize', this.placeIndicators);
427
+ }
428
+ disconnectedCallback() {
429
+ super.disconnectedCallback();
430
+ this.resize?.disconnect();
431
+ window.removeEventListener('resize', this.placeIndicators);
432
+ this.gesture = null;
433
+ this.dragging = false;
434
+ }
435
+ willUpdate(changed) {
436
+ // SLD-23: orientation and valueIndicator are the component's own values; size is an open axis (above).
437
+ if (changed.has('orientation') && !ORIENTATIONS.includes(this.orientation)) {
438
+ report(this, 'SLD-23', `orientation "${this.orientation}" is not a value of the slider; it is drawn as "horizontal"`);
439
+ }
440
+ if (changed.has('valueIndicator') && !INDICATORS.includes(this.valueIndicator)) {
441
+ report(this, 'SLD-23', `valueIndicator "${this.valueIndicator}" is not a value of the slider; it is drawn as "none"`);
442
+ }
443
+ if (['value', 'startValue', 'min', 'max', 'step', 'origin', 'range'].some((key) => changed.has(key)))
444
+ this.reportValues();
445
+ // SLD-19: a slider without a name still renders; a debug build says what is missing.
446
+ if (changed.has('label') && !this.label.trim() && !this.field.label)
447
+ report(this, 'SLD-19', 'label is empty, so the slider has no accessible name; give it a label');
448
+ if ((changed.has('startLabel') || changed.has('range')) && this.range && !this.startLabel.trim()) {
449
+ report(this, 'SLD-19', 'startLabel is empty, so the range’s start handle has no accessible name; give it a start-label');
450
+ }
451
+ // A handle that is no longer drawn is no longer hovered or pressed.
452
+ if (changed.has('range') && !this.range && this.hovered === 'start')
453
+ this.hovered = null;
454
+ if (changed.has('disabled') && this.isDisabled)
455
+ this.hovered = null;
456
+ }
457
+ /** SLD-22: what a value outside the scale is drawn and exposed as, named in debug builds. */
458
+ reportValues() {
459
+ const [min, max, step] = [Number(this.min), Number(this.max), Number(this.step)];
460
+ const scale = this.scale;
461
+ if (step < 0)
462
+ report(this, 'SLD-22', `step ${step} is below 0; it is treated as 0`);
463
+ if (!scale.valid) {
464
+ report(this, 'SLD-22', `max ${max} is not greater than min ${min}; the handles are drawn at the track's start and it takes no input`);
465
+ return;
466
+ }
467
+ const check = (name, value) => {
468
+ const drawn = scale.snap(value);
469
+ if (tidy(value) !== drawn)
470
+ report(this, 'SLD-22', `${name} ${value} is outside ${min}…${max} or off a step; it is drawn and exposed as ${drawn}`);
471
+ };
472
+ check('value', Number(this.value));
473
+ if (this.range) {
474
+ check('startValue', Number(this.startValue));
475
+ if (scale.snap(Number(this.startValue)) > scale.snap(Number(this.value))) {
476
+ report(this, 'SLD-22', `startValue ${this.startValue} is greater than value ${this.value}; both handles are drawn at ${scale.snap(Number(this.value))}`);
477
+ }
478
+ }
479
+ else if (this.origin !== null && this.origin !== undefined) {
480
+ check('origin', Number(this.origin));
481
+ }
482
+ }
483
+ updated() {
484
+ const { start, end } = this.values;
485
+ // A range submits both values under one name; a single value is submitted under the element's name.
486
+ if (this.range) {
487
+ const data = new FormData();
488
+ if (this.name) {
489
+ data.append(this.name, String(start));
490
+ data.append(this.name, String(end));
491
+ }
492
+ // Disabled, it submits nothing: said here too, since its attribute waits a frame where it holds focus.
493
+ this.says.value(this.name && !this.isDisabled ? data : null, `${start} ${end}`);
494
+ }
495
+ else {
496
+ this.says.value(this.isDisabled ? null : String(end), `${start} ${end}`);
497
+ }
498
+ this.placeIndicators();
499
+ }
500
+ // ─── Changes by the person (SLD-2, SLD-3, SLD-4) ────────────────────────────────────────────────────────────
501
+ /** Sets one handle to `target`, snapped within its bounds, and emits input when that changes it. True when it did. */
502
+ move(id, target) {
503
+ const values = this.values;
504
+ const [low, high] = this.bounds(values, id);
505
+ const next = this.scale.snap(target, low, high);
506
+ if (next === values[id])
507
+ return false;
508
+ // The element takes the new value before anyone hears of it, as a native control does.
509
+ if (id === 'start')
510
+ this.startValue = next;
511
+ else
512
+ this.value = next;
513
+ this.emit('input');
514
+ return true;
515
+ }
516
+ emit(type) {
517
+ const { start, end } = this.values;
518
+ const detail = this.range ? { value: end, startValue: start } : { value: end };
519
+ // Each event dispatched under its literal name, so the manifest (and the React wrapper made from it) sees `input` and
520
+ // `change` rather than an event called `type`. Both are composed: they leave the shadow root of an element
521
+ // composed around the slider with that element as their target (src/primitives/composed.ts, W5).
522
+ if (type === 'input')
523
+ this.dispatchEvent(new CustomEvent('input', { bubbles: true, composed: true, detail }));
524
+ else
525
+ this.dispatchEvent(new CustomEvent('change', { bubbles: true, composed: true, detail }));
526
+ }
527
+ /** A position in the viewport → the value under it along the travel (null before layout). */
528
+ valueAt(x, y) {
529
+ const rail = this.renderRoot.querySelector('.rail')?.getBoundingClientRect();
530
+ if (!rail)
531
+ return null;
532
+ const vertical = this.axis === 'vertical';
533
+ const length = vertical ? rail.height : rail.width;
534
+ if (!(length > 0))
535
+ return null;
536
+ // SLD-21: a vertical slider runs from the bottom up; a right-to-left horizontal one from the right.
537
+ const along = vertical ? rail.bottom - y : this.rtl ? rail.right - x : x - rail.left;
538
+ const [min, max] = [Number(this.min), Number(this.max)];
539
+ return min + clamp(along / length, 0, 1) * (max - min);
540
+ }
541
+ /** SLD-2: the handle a press at `target` moves — the nearer one; where the two meet, the one that can move toward it. */
542
+ nearer(target) {
543
+ if (!this.range || target === null)
544
+ return 'end';
545
+ const { start, end } = this.values;
546
+ if (start === end)
547
+ return target < start ? 'start' : 'end';
548
+ return Math.abs(target - start) < Math.abs(target - end) ? 'start' : 'end';
549
+ }
550
+ /** Focus that a press gives a handle is not keyboard focus: no ring, no focused state (SLD-11, SLD-12). */
551
+ focusHandle(id) {
552
+ const handle = this.inThumb(id, '.handle');
553
+ if (!handle)
554
+ return;
555
+ handle.dataset.pointerFocus = '';
556
+ if (this.renderRoot.activeElement !== handle)
557
+ handle.focus({ preventScroll: true });
558
+ }
559
+ /** The press is over: press-hold runs out, the value motion is back, and a change is emitted when the values moved. */
560
+ endGesture() {
561
+ const gesture = this.gesture;
562
+ if (!gesture)
563
+ return;
564
+ this.gesture = null;
565
+ this.presses[gesture.handle].release();
566
+ this.dragging = false;
567
+ const now = this.values;
568
+ if (now.start !== gesture.before.start || now.end !== gesture.before.end)
569
+ this.emit('change');
570
+ }
571
+ /** SLD-11: a fine pointer over the slider hovers the handle a press there would move. */
572
+ hover(event) {
573
+ if (event.pointerType !== 'mouse' || !this.interactive)
574
+ return;
575
+ const next = this.nearer(this.valueAt(event.clientX, event.clientY));
576
+ if (next !== this.hovered)
577
+ this.hovered = next;
578
+ }
579
+ /** SLD-3, SLD-4 (assistive technology on the web adjusts a slider with these keys): one change, input then change. */
580
+ onKeyDown(id, event) {
581
+ const step = this.scale.keyStep;
582
+ // SLD-3 / SLD-21: Right and Left are swapped in a right-to-left horizontal slider; Up always increases.
583
+ const mirrored = this.axis === 'horizontal' && this.rtl;
584
+ const [forward, backward] = mirrored ? ['ArrowLeft', 'ArrowRight'] : ['ArrowRight', 'ArrowLeft'];
585
+ let to = null;
586
+ if (event.key === forward || event.key === 'ArrowUp')
587
+ to = (current) => current + step;
588
+ else if (event.key === backward || event.key === 'ArrowDown')
589
+ to = (current) => current - step;
590
+ else if (event.key === 'PageUp')
591
+ to = (current) => current + 10 * step;
592
+ else if (event.key === 'PageDown')
593
+ to = (current) => current - 10 * step;
594
+ else if (event.key === 'Home')
595
+ to = (_current, low) => low;
596
+ else if (event.key === 'End')
597
+ to = (_current, _low, high) => high;
598
+ if (!to)
599
+ return;
600
+ event.preventDefault();
601
+ // A key that operates the slider makes its focus keyboard focus, as the browser's own heuristic does.
602
+ delete event.currentTarget.dataset.pointerFocus;
603
+ if (!this.interactive)
604
+ return;
605
+ const values = this.values;
606
+ const [low, high] = this.bounds(values, id);
607
+ if (this.move(id, to(values[id], low, high)))
608
+ this.emit('change');
609
+ }
610
+ /** SLD-15: where style queries are missing, the focus style is read when focus arrives. */
611
+ onFocus(event) {
612
+ syncFocusStyle(this, event.currentTarget);
613
+ }
614
+ onBlur(event) {
615
+ delete event.currentTarget.dataset.pointerFocus;
616
+ }
617
+ // ─── Rendering ────────────────────────────────────────────────────────────────────────────────────────────────
618
+ /**
619
+ * SLD-18: the value text of the only handle, or of a range's end handle, as it is spoken and shown now — `valueText`,
620
+ * else what `formatValue` writes, else the value as a number in the page's locale. Read-only, and new with every
621
+ * change of the value: a product that frames the slider by hand gives it to its Field's `valueText` in its own
622
+ * `input` listener, and `<tanrei-slider-field>` does so by itself.
623
+ */
624
+ get shownValueText() {
625
+ return this.words('end', this.values.end);
626
+ }
627
+ /** SLD-18: the value text of a range's start handle, as `shownValueText` is the end handle's; empty while `range` is false. */
628
+ get shownStartValueText() {
629
+ return this.range ? this.words('start', this.values.start) : '';
630
+ }
631
+ /** The language of the place the slider stands in: the nearest `lang`, through the shadow roots it is inside. */
632
+ get language() {
633
+ for (let at = this; at;) {
634
+ const lang = at.closest('[lang]')?.getAttribute('lang');
635
+ if (lang)
636
+ return lang;
637
+ const root = at.getRootNode();
638
+ at = root instanceof ShadowRoot ? root.host : null;
639
+ }
640
+ return undefined;
641
+ }
642
+ /** SLD-18: a handle's value text — the product's words, or what its function writes, or the value in the page's locale. */
643
+ words(id, value) {
644
+ const given = (id === 'start' ? this.startValueText : this.valueText)?.trim();
645
+ if (given)
646
+ return given;
647
+ // An empty answer is no answer; so is one that is no text.
648
+ const written = typeof this.formatValue === 'function' ? this.formatValue(value) : '';
649
+ if (typeof written === 'string' && written.trim())
650
+ return written.trim();
651
+ const digits = this.scale.digits;
652
+ const locale = this.language;
653
+ try {
654
+ return new Intl.NumberFormat(locale, { minimumFractionDigits: digits, maximumFractionDigits: digits }).format(value);
655
+ }
656
+ catch {
657
+ return value.toFixed(digits);
658
+ }
659
+ }
660
+ /** SLD-6, SLD-8: the three pieces of the tracks — the track, the active track, the track — between their ends. */
661
+ pieces(values) {
662
+ const scale = this.scale;
663
+ const f = { start: scale.fraction(values.start), end: scale.fraction(values.end) };
664
+ if (this.range) {
665
+ return [
666
+ [TRACK_START, beforeHandle(f.start, 'start')],
667
+ [afterHandle(f.start, 'start'), beforeHandle(f.end, 'end')],
668
+ [afterHandle(f.end, 'end'), TRACK_END],
669
+ ];
670
+ }
671
+ const origin = this.origin === null || this.origin === undefined || !scale.valid ? 0 : scale.fraction(scale.snap(Number(this.origin)));
672
+ const at = originPoint(origin);
673
+ return f.end >= origin
674
+ ? [
675
+ [TRACK_START, at],
676
+ [at, beforeHandle(f.end, 'end')],
677
+ [afterHandle(f.end, 'end'), TRACK_END],
678
+ ]
679
+ : [
680
+ [TRACK_START, beforeHandle(f.end, 'end')],
681
+ [afterHandle(f.end, 'end'), at],
682
+ [at, TRACK_END],
683
+ ];
684
+ }
685
+ /**
686
+ * SLD-9: the dots each kind of piece holds, as fractions of the travel. The track holds the travel's two ends; with
687
+ * `stops` every piece holds every value. A dot is drawn only where its piece is — so not where it lies on the active
688
+ * track (an end), and not in a handle's gap; while the gap is 0 a dot under a handle lies under its fill (SLD-24).
689
+ */
690
+ dots() {
691
+ const scale = this.scale;
692
+ if (!scale.valid)
693
+ return { track: [], active: [] };
694
+ const every = [];
695
+ if (this.stops && scale.step > 0) {
696
+ const [min, max] = [Number(this.min), Number(this.max)];
697
+ for (let at = min; at <= max + 1e-9; at = tidy(at + scale.step))
698
+ every.push(tidy(scale.fraction(at)));
699
+ }
700
+ return { track: [...new Set([0, 1, ...every])], active: every };
701
+ }
702
+ /** A piece of the tracks, and its stop dots: a layer the travel's size, clipped to the piece. */
703
+ renderPiece([from, to], active, dots) {
704
+ const place = styleMap({
705
+ '--_from': String(from.f),
706
+ '--_from-off': from.off,
707
+ '--_from-r': from.r,
708
+ '--_to': String(to.f),
709
+ '--_to-off': to.off,
710
+ '--_to-r': to.r,
711
+ });
712
+ return html `<div part=${active ? 'active-track' : 'track'} class=${active ? 'piece active' : 'piece'} data-tanrei-shape style=${place}></div>
713
+ ${dots.length
714
+ ? html `<div class=${active ? 'dots active' : 'dots'} style=${place}>
715
+ ${dots.map((at) => html `<span part="stop-indicator" class="dot" style=${styleMap({ '--_at': String(at) })}></span>`)}
716
+ </div>`
717
+ : nothing}`;
718
+ }
719
+ renderHandle(id, values) {
720
+ const scale = this.scale;
721
+ const [low, high] = this.bounds(values, id).map((bound) => scale.snap(bound));
722
+ const words = this.words(id, values[id]);
723
+ const label = this.field.name(id === 'start' ? this.startLabel : this.label);
724
+ const description = this.field.description();
725
+ // Disabled under the focus it holds, a handle stays a stop for one frame (src/primitives/disabled-while-focused.ts).
726
+ const focusable = this.stop.keeps(this.isDisabled) || !this.isDisabled;
727
+ return html `
728
+ <div class="thumb" data-handle=${id} ?data-hovered=${this.hovered === id} style=${styleMap({ '--_f': String(scale.fraction(values[id])) })}>
729
+ <div class="knob">
730
+ <div part="container" class="container" data-tanrei-shape aria-hidden="true"></div>
731
+ <div
732
+ part="handle"
733
+ class="handle"
734
+ data-tanrei-shape
735
+ role="slider"
736
+ tabindex=${focusable ? '0' : nothing}
737
+ aria-label=${label || nothing}
738
+ aria-description=${description || nothing}
739
+ aria-invalid=${this.field.invalid ? 'true' : nothing}
740
+ aria-valuemin=${String(low)}
741
+ aria-valuemax=${String(high)}
742
+ aria-valuenow=${String(values[id])}
743
+ aria-valuetext=${words}
744
+ aria-orientation=${this.axis}
745
+ aria-disabled=${this.isDisabled ? 'true' : nothing}
746
+ @keydown=${(event) => this.onKeyDown(id, event)}
747
+ @focus=${this.onFocus}
748
+ @blur=${this.onBlur}
749
+ ></div>
750
+ <div part="value-indicator" class="value-indicator" data-tanrei-shape aria-hidden="true"><span class="value-text">${words}</span></div>
751
+ </div>
752
+ </div>
753
+ `;
754
+ }
755
+ render() {
756
+ const values = this.values;
757
+ const [before, active, after] = this.pieces(values);
758
+ const dots = this.dots();
759
+ // SLD-17 / SLD-20: a disabled slider (or one that takes no input) shows no value indicator.
760
+ const indicator = this.interactive ? this.indicator : 'none';
761
+ return html `
762
+ <div
763
+ class="root"
764
+ data-orientation=${this.axis}
765
+ data-value-indicator=${indicator}
766
+ ?data-disabled=${this.isDisabled}
767
+ ?data-inert=${!this.interactive}
768
+ ?data-dragging=${this.dragging}
769
+ @pointerdown=${this.onPointerDown}
770
+ @pointermove=${this.onPointerMove}
771
+ @pointerup=${this.onPointerUp}
772
+ @pointercancel=${this.onPointerCancel}
773
+ @lostpointercapture=${this.onPointerCancel}
774
+ @pointerleave=${this.onPointerLeave}
775
+ @mousedown=${this.onMouseDown}
776
+ >
777
+ <div class="travel" aria-hidden="true">
778
+ ${this.renderPiece(before, false, dots.track)} ${this.renderPiece(active, true, dots.active)} ${this.renderPiece(after, false, dots.track)}
779
+ </div>
780
+ <div class="rail">${this.handles.map((id) => this.renderHandle(id, values))}</div>
781
+ </div>
782
+ ${DIRECTION_PROBE}
783
+ `;
784
+ }
785
+ }
786
+ // Its `disabled` attribute, written while it holds focus, waits until focus has left: a frame at most.
787
+ disabledWaitsWhileFocused(TanreiSlider);
788
+ // `autofocus` on it gives it focus when the page first loads too (src/primitives/autofocus.ts).
789
+ focusedAtFirst(TanreiSlider);
790
+ if (!customElements.get('tanrei-slider'))
791
+ customElements.define('tanrei-slider', TanreiSlider);
792
+ //# sourceMappingURL=slider.js.map