@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,45 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ /**
3
+ * One open axis of a component: a size or a variant, whose core values have static styles and whose other
4
+ * values — added by a design system's layer — get theirs on demand.
5
+ */
6
+ export interface OpenAxis {
7
+ /** The property that names the value; it must reflect to the attribute of the same name. */
8
+ name: string;
9
+ /** The values every design system has (the component's static styles cover them). */
10
+ core: readonly string[];
11
+ /** What a value the active design system does not have is drawn as. */
12
+ default: string;
13
+ /**
14
+ * The rules for a value the core does not have, under `selector` (`:host([<name>='<value>'])`), built by the same
15
+ * function as the core blocks and falling back to the default's tokens where the active system lacks the value.
16
+ */
17
+ rules: (value: string, selector: string) => string;
18
+ /** A custom property that a design system which HAS the value defines: how the value is known to be missing. */
19
+ probe: (value: string) => `--${string}`;
20
+ }
21
+ export interface OpenAxesOptions {
22
+ /** A key for the page-wide sheet cache: the component's name. */
23
+ component: string;
24
+ /** The behaviour that says an unknown value is drawn as the default and reported in debug builds (BTN-7…). */
25
+ behavior: string;
26
+ axes: readonly OpenAxis[];
27
+ }
28
+ /**
29
+ * Open axes as a Lit controller (BTN-7 and every component with a size or variant axis). A value the core
30
+ * does not have was added by a design system: its sheet is adopted before the host renders. After the render, a value
31
+ * the ACTIVE system does not define — its probe property is empty — is reported in debug builds; it already draws as
32
+ * the default through the sheet's fallbacks (or, for a value that is not a token name, through the host's own rules).
33
+ */
34
+ export declare class OpenAxesController implements ReactiveController {
35
+ private readonly host;
36
+ private readonly options;
37
+ private readonly seen;
38
+ private readonly pending;
39
+ constructor(host: ReactiveControllerHost & HTMLElement & {
40
+ renderRoot: HTMLElement | DocumentFragment;
41
+ }, options: OpenAxesOptions);
42
+ private value;
43
+ hostUpdate(): void;
44
+ hostUpdated(): void;
45
+ }
@@ -0,0 +1,72 @@
1
+ import { report } from './report.js';
2
+ /** Attribute values are interpolated into CSS: only token-name characters are accepted. */
3
+ const KEY = /^[a-z0-9][a-z0-9-]*$/;
4
+ const sheets = new Map();
5
+ /** The stylesheet of one value, built once per page and shared by every shadow root that needs it. */
6
+ function sheetFor(component, axis, value) {
7
+ if (!KEY.test(value) || typeof CSSStyleSheet === 'undefined')
8
+ return null;
9
+ const id = `${component}:${axis.name}:${value}`;
10
+ let sheet = sheets.get(id);
11
+ if (!sheet) {
12
+ sheet = new CSSStyleSheet();
13
+ sheet.replaceSync(axis.rules(value, `:host([${axis.name}='${value}'])`));
14
+ sheets.set(id, sheet);
15
+ }
16
+ return sheet;
17
+ }
18
+ /**
19
+ * Open axes as a Lit controller (BTN-7 and every component with a size or variant axis). A value the core
20
+ * does not have was added by a design system: its sheet is adopted before the host renders. After the render, a value
21
+ * the ACTIVE system does not define — its probe property is empty — is reported in debug builds; it already draws as
22
+ * the default through the sheet's fallbacks (or, for a value that is not a token name, through the host's own rules).
23
+ */
24
+ export class OpenAxesController {
25
+ constructor(host, options) {
26
+ this.host = host;
27
+ this.options = options;
28
+ this.seen = new Map();
29
+ this.pending = new Set();
30
+ host.addController(this);
31
+ }
32
+ value(axis) {
33
+ return String(this.host[axis.name] ?? '');
34
+ }
35
+ hostUpdate() {
36
+ for (const axis of this.options.axes) {
37
+ const value = this.value(axis);
38
+ if (this.seen.get(axis.name) === value)
39
+ continue;
40
+ this.seen.set(axis.name, value);
41
+ if (axis.core.includes(value)) {
42
+ // A value that was waiting to be asked about has been replaced by one every system has.
43
+ this.pending.delete(axis);
44
+ continue;
45
+ }
46
+ this.pending.add(axis);
47
+ const sheet = sheetFor(this.options.component, axis, value);
48
+ const root = this.host.renderRoot;
49
+ if (sheet && !root.adoptedStyleSheets.includes(sheet))
50
+ root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
51
+ }
52
+ }
53
+ hostUpdated() {
54
+ if (!this.pending.size)
55
+ return;
56
+ const style = getComputedStyle(this.host);
57
+ // An element outside the flat tree — the child of a shadow host that no slot takes (a member an avatar group does
58
+ // not draw) — has no computed style: every property reads empty, the probe of a value the system HAS among them.
59
+ // It is asked at the next update in which it has one; until then nothing of it is drawn, rightly or wrongly.
60
+ // (Chromium and Firefox say so by an empty style; WebKit computes one all the same, so the tree is asked too.)
61
+ if (style.display === '' || (!!this.host.parentElement?.shadowRoot && !this.host.assignedSlot))
62
+ return;
63
+ for (const axis of this.pending) {
64
+ const value = this.value(axis);
65
+ if (!KEY.test(value) || style.getPropertyValue(axis.probe(value)).trim() === '') {
66
+ report(this.host, this.options.behavior, `${axis.name} "${value}" is not a value of the active design system; it is drawn as "${axis.default}"`);
67
+ }
68
+ }
69
+ this.pending.clear();
70
+ }
71
+ }
72
+ //# sourceMappingURL=axes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"axes.js","sourceRoot":"","sources":["../../src/primitives/axes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA8BrC,2FAA2F;AAC3F,MAAM,GAAG,GAAG,sBAAsB,CAAC;AACnC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAyB,CAAC;AAEhD,sGAAsG;AACtG,SAAS,QAAQ,CAAC,SAAiB,EAAE,IAAc,EAAE,KAAa;IAChE,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,OAAO,aAAa,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC1E,MAAM,EAAE,GAAG,GAAG,SAAS,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,EAAE,CAAC;IAChD,IAAI,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;QAC5B,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,UAAU,IAAI,CAAC,IAAI,KAAK,KAAK,KAAK,CAAC,CAAC,CAAC;QACzE,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IACxB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,kBAAkB;IAI7B,YACmB,IAA2F,EAC3F,OAAwB;QADxB,SAAI,GAAJ,IAAI,CAAuF;QAC3F,YAAO,GAAP,OAAO,CAAiB;QAL1B,SAAI,GAAG,IAAI,GAAG,EAAkB,CAAC;QACjC,YAAO,GAAG,IAAI,GAAG,EAAY,CAAC;QAM7C,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,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AkH;QAClH,iHAAiH;QACjH,6GAA6G;QAC7G,+GAA+G;QAC/G,IAAI,KAAK,CAAC,OAAO,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;YAAE,OAAO;QACvG,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAChC,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;gBAChF,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,KAAK,KAAK,iEAAiE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;YACnJ,CAAC;QACH,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Choices of kind. The value of `--tanrei-sys-behavior-*` is the choice's NAME, inherited into the shadow
3
+ * tree from whatever ancestor carries the active system — so a style container query reads it with no script, follows
4
+ * a runtime switch of `data-tanrei-system`, and never leaks between two systems on one page. Script reads it with
5
+ * `choice()` at the moment of the interaction, never cached.
6
+ */
7
+ export declare const BEHAVIOR = "--tanrei-sys-behavior";
8
+ /** A choice of kind, by name, as the cascade gives it to `host` — never cached, so a system switch is seen. */
9
+ export declare function choice(host: Element, name: string): string;
10
+ /** `sys.behavior.pressed-feedback`. The first value is the default, and what an unknown value falls back to. */
11
+ export declare const PRESSED_FEEDBACK: readonly ['overlay', 'ripple', 'dim', 'none'];
12
+ export type PressedFeedback = (typeof PRESSED_FEEDBACK)[number];
13
+ /** How a press on `host` is answered right now. */
14
+ export declare function pressedFeedback(host: Element): PressedFeedback;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Choices of kind. The value of `--tanrei-sys-behavior-*` is the choice's NAME, inherited into the shadow
3
+ * tree from whatever ancestor carries the active system — so a style container query reads it with no script, follows
4
+ * a runtime switch of `data-tanrei-system`, and never leaks between two systems on one page. Script reads it with
5
+ * `choice()` at the moment of the interaction, never cached.
6
+ */
7
+ export const BEHAVIOR = '--tanrei-sys-behavior';
8
+ /** A choice of kind, by name, as the cascade gives it to `host` — never cached, so a system switch is seen. */
9
+ export function choice(host, name) {
10
+ return getComputedStyle(host).getPropertyValue(`${BEHAVIOR}-${name}`).trim();
11
+ }
12
+ /** `sys.behavior.pressed-feedback`. The first value is the default, and what an unknown value falls back to. */
13
+ export const PRESSED_FEEDBACK = ['overlay', 'ripple', 'dim', 'none'];
14
+ /** How a press on `host` is answered right now. */
15
+ export function pressedFeedback(host) {
16
+ const named = choice(host, 'pressed-feedback');
17
+ return PRESSED_FEEDBACK.includes(named) ? named : PRESSED_FEEDBACK[0];
18
+ }
19
+ //# sourceMappingURL=behavior.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"behavior.js","sourceRoot":"","sources":["../../src/primitives/behavior.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,uBAAuB,CAAC;AAEhD,+GAA+G;AAC/G,MAAM,UAAU,MAAM,CAAC,IAAa,EAAE,IAAY;IAChD,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AAC/E,CAAC;AAED,gHAAgH;AAChH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC;AAG9E,mDAAmD;AACnD,MAAM,UAAU,eAAe,CAAC,IAAa;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,kBAAkB,CAAoB,CAAC;IAClE,OAAO,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC"}
@@ -0,0 +1,79 @@
1
+ export interface CalendarDate {
2
+ year: number;
3
+ /** 1 (January) … 12. */
4
+ month: number;
5
+ day: number;
6
+ }
7
+ /** A displayed month. */
8
+ export interface CalendarMonth {
9
+ year: number;
10
+ month: number;
11
+ }
12
+ /** Sunday … Saturday, as `Date.getUTCDay()` counts them. */
13
+ export type Weekday = 0 | 1 | 2 | 3 | 4 | 5 | 6;
14
+ export declare const WEEKDAY_NAMES: readonly ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
15
+ export declare const isLeapYear: (year: number) => boolean;
16
+ export declare const daysInMonth: (year: number, month: number) => number;
17
+ /** A date from its parts, or null when that day does not exist (February 30). */
18
+ export declare function calendarDate(year: number, month: number, day: number): CalendarDate | null;
19
+ /** An ISO 8601 calendar date ("2026-09-17"); anything else (a time, a zone, a day that does not exist) is null. */
20
+ export declare function parseIsoDate(text: string | null | undefined): CalendarDate | null;
21
+ export declare const isoOf: (date: CalendarDate) => string;
22
+ export declare const compareDates: (a: CalendarDate, b: CalendarDate) => number;
23
+ export declare const sameDate: (a: CalendarDate | null | undefined, b: CalendarDate | null | undefined) => boolean;
24
+ export declare const compareMonths: (a: CalendarMonth, b: CalendarMonth) => number;
25
+ export declare const monthOf: (date: CalendarDate) => CalendarMonth;
26
+ export declare const inMonth: (date: CalendarDate | null | undefined, month: CalendarMonth) => boolean;
27
+ export declare const addDays: (date: CalendarDate, days: number) => CalendarDate;
28
+ /** The month `months` after `of`. */
29
+ export declare function addMonthsTo(of: CalendarMonth, months: number): CalendarMonth;
30
+ /** The same day number `months` later — the last day of that month when it is shorter (CAL-11, CAL-13). */
31
+ export declare function addMonths(date: CalendarDate, months: number): CalendarDate;
32
+ /** 0 = Sunday. 0001-01-01 was a Monday. */
33
+ export declare const weekdayOf: (date: CalendarDate) => Weekday;
34
+ export declare function clampDate(date: CalendarDate, min: CalendarDate | null, max: CalendarDate | null): CalendarDate;
35
+ export declare function clampMonth(month: CalendarMonth, min: CalendarDate | null, max: CalendarDate | null): CalendarMonth;
36
+ /** One cell of a month's grid: a day, and whether it belongs to the previous or next month. */
37
+ export interface GridDay {
38
+ date: CalendarDate;
39
+ adjacent: boolean;
40
+ }
41
+ /**
42
+ * The 42 cells of a month (CAL-1, CAL-15): six rows of seven from `firstDay`, the first day of the month in its weekday's
43
+ * column. The cells before the first day and after the last hold the neighbouring months' days while `adjacent` is
44
+ * true, and are null otherwise. Always six rows, so the grid keeps its height.
45
+ */
46
+ export declare function monthGrid(month: CalendarMonth, firstDay: Weekday, adjacent?: boolean): (GridDay | null)[];
47
+ /** The weekdays in column order from `firstDay`. */
48
+ export declare const weekdayColumns: (firstDay: Weekday) => Weekday[];
49
+ /** The device's current date in its own time zone (CAL-24, while `today` is empty). */
50
+ export declare function deviceToday(): CalendarDate;
51
+ /** Milliseconds until the device's next local midnight: when a calendar showing the device's date reads it again (CAL-24). */
52
+ export declare function untilMidnight(): number;
53
+ export interface ClockTime {
54
+ /** 0–23. */
55
+ hour: number;
56
+ /** 0–59. */
57
+ minute: number;
58
+ }
59
+ /** The clock in use: 1–12 with a period, or 00–23. */
60
+ export type HourCycle = 'h12' | 'h23';
61
+ /** A 24-hour "HH:MM" time ("19:30"); anything else (seconds, "7:30", "24:00") is null. */
62
+ export declare function parseClockTime(text: string | null | undefined): ClockTime | null;
63
+ /** "HH:MM", 24-hour. */
64
+ export declare const clockText: ({ hour, minute }: ClockTime) => string;
65
+ export declare const compareTimes: (a: ClockTime, b: ClockTime) => number;
66
+ /** The device's current local time to the minute (DTM-8, while a time is empty). */
67
+ export declare function deviceTime(): ClockTime;
68
+ /** The 12-hour clock's hour (1–12) of a 24-hour hour. */
69
+ export declare const shownHour12: (hour: number) => number;
70
+ /** The period of a 24-hour hour: 0 before noon, 1 after. */
71
+ export declare const periodOf: (hour: number) => 0 | 1;
72
+ /** A 12-hour clock's hour (1–12) in a period as a 24-hour hour. */
73
+ export declare const hourOf12: (shown: number, period: 0 | 1) => number;
74
+ /** The minute steps a picker offers (DTM-17). */
75
+ export declare const MINUTE_STEPS: readonly [1, 5, 10, 15, 30];
76
+ /** The minutes a step offers, from 00 (DTM-17). */
77
+ export declare const stepMinutes: (step: number) => number[];
78
+ /** A time with its minute rounded down to the step (DTM-8). */
79
+ export declare const roundDown: (time: ClockTime, step: number) => ClockTime;
@@ -0,0 +1,135 @@
1
+ // Gregorian calendar dates without a time or a time zone (CAL-24, DTM-38), and times of day without a date (DTM-8). A date
2
+ // is `{ year, month, day }` (month 1–12) and travels as an ISO 8601 string ("2026-09-17"), never as a `Date`: a `Date` is
3
+ // an instant, and a time zone would move it by a day. A time is `{ hour, minute }` (hour 0–23) and travels as "HH:MM".
4
+ // Pure arithmetic: the locale's names and forms are src/primitives/locale-date.ts. Shared by <tanrei-calendar>,
5
+ // <tanrei-date-time-picker> and the text field's reading of typed dates.
6
+ export const WEEKDAY_NAMES = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
7
+ export const isLeapYear = (year) => (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
8
+ export const daysInMonth = (year, month) => [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1];
9
+ /** A date from its parts, or null when that day does not exist (February 30). */
10
+ export function calendarDate(year, month, day) {
11
+ if (![year, month, day].every(Number.isInteger))
12
+ return null;
13
+ if (year < 1 || year > 9999 || month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month))
14
+ return null;
15
+ return { year, month, day };
16
+ }
17
+ /** An ISO 8601 calendar date ("2026-09-17"); anything else (a time, a zone, a day that does not exist) is null. */
18
+ export function parseIsoDate(text) {
19
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(text ?? '');
20
+ return match ? calendarDate(Number(match[1]), Number(match[2]), Number(match[3])) : null;
21
+ }
22
+ export const isoOf = (date) => `${String(date.year).padStart(4, '0')}-${String(date.month).padStart(2, '0')}-${String(date.day).padStart(2, '0')}`;
23
+ export const compareDates = (a, b) => a.year - b.year || a.month - b.month || a.day - b.day;
24
+ export const sameDate = (a, b) => !!a && !!b && compareDates(a, b) === 0;
25
+ export const compareMonths = (a, b) => a.year - b.year || a.month - b.month;
26
+ export const monthOf = (date) => ({ year: date.year, month: date.month });
27
+ export const inMonth = (date, month) => !!date && date.year === month.year && date.month === month.month;
28
+ /** Days since 0001-01-01, for adding days without a `Date`. */
29
+ function ordinal({ year, month, day }) {
30
+ const y = year - 1;
31
+ let days = y * 365 + Math.floor(y / 4) - Math.floor(y / 100) + Math.floor(y / 400);
32
+ for (let m = 1; m < month; m += 1)
33
+ days += daysInMonth(year, m);
34
+ return days + day - 1;
35
+ }
36
+ function fromOrdinal(count) {
37
+ let year = Math.floor(count / 365.2425) + 1;
38
+ while (ordinal({ year, month: 1, day: 1 }) > count)
39
+ year -= 1;
40
+ while (ordinal({ year: year + 1, month: 1, day: 1 }) <= count)
41
+ year += 1;
42
+ let rest = count - ordinal({ year, month: 1, day: 1 });
43
+ let month = 1;
44
+ while (rest >= daysInMonth(year, month)) {
45
+ rest -= daysInMonth(year, month);
46
+ month += 1;
47
+ }
48
+ return { year, month, day: rest + 1 };
49
+ }
50
+ export const addDays = (date, days) => fromOrdinal(ordinal(date) + days);
51
+ /** The month `months` after `of`. */
52
+ export function addMonthsTo(of, months) {
53
+ const index = of.year * 12 + (of.month - 1) + months;
54
+ return { year: Math.floor(index / 12), month: (index % 12) + 1 };
55
+ }
56
+ /** The same day number `months` later — the last day of that month when it is shorter (CAL-11, CAL-13). */
57
+ export function addMonths(date, months) {
58
+ const target = addMonthsTo(date, months);
59
+ return { ...target, day: Math.min(date.day, daysInMonth(target.year, target.month)) };
60
+ }
61
+ /** 0 = Sunday. 0001-01-01 was a Monday. */
62
+ export const weekdayOf = (date) => ((ordinal(date) + 1) % 7);
63
+ export function clampDate(date, min, max) {
64
+ if (min && compareDates(date, min) < 0)
65
+ return min;
66
+ if (max && compareDates(date, max) > 0)
67
+ return max;
68
+ return date;
69
+ }
70
+ export function clampMonth(month, min, max) {
71
+ if (min && compareMonths(month, min) < 0)
72
+ return monthOf(min);
73
+ if (max && compareMonths(month, max) > 0)
74
+ return monthOf(max);
75
+ return month;
76
+ }
77
+ /**
78
+ * The 42 cells of a month (CAL-1, CAL-15): six rows of seven from `firstDay`, the first day of the month in its weekday's
79
+ * column. The cells before the first day and after the last hold the neighbouring months' days while `adjacent` is
80
+ * true, and are null otherwise. Always six rows, so the grid keeps its height.
81
+ */
82
+ export function monthGrid(month, firstDay, adjacent = false) {
83
+ const first = { ...month, day: 1 };
84
+ const lead = (weekdayOf(first) - firstDay + 7) % 7;
85
+ const length = daysInMonth(month.year, month.month);
86
+ return Array.from({ length: 42 }, (_, index) => {
87
+ const day = index - lead + 1;
88
+ if (day >= 1 && day <= length)
89
+ return { date: { ...month, day }, adjacent: false };
90
+ return adjacent ? { date: addDays(first, index - lead), adjacent: true } : null;
91
+ });
92
+ }
93
+ /** The weekdays in column order from `firstDay`. */
94
+ export const weekdayColumns = (firstDay) => Array.from({ length: 7 }, (_, index) => ((firstDay + index) % 7));
95
+ /** The device's current date in its own time zone (CAL-24, while `today` is empty). */
96
+ export function deviceToday() {
97
+ const now = new Date();
98
+ return { year: now.getFullYear(), month: now.getMonth() + 1, day: now.getDate() };
99
+ }
100
+ /** Milliseconds until the device's next local midnight: when a calendar showing the device's date reads it again (CAL-24). */
101
+ export function untilMidnight() {
102
+ const now = new Date();
103
+ const next = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1);
104
+ return Math.max(1000, next.getTime() - now.getTime());
105
+ }
106
+ /** A 24-hour "HH:MM" time ("19:30"); anything else (seconds, "7:30", "24:00") is null. */
107
+ export function parseClockTime(text) {
108
+ const match = /^(\d{2}):(\d{2})$/.exec(text ?? '');
109
+ if (!match)
110
+ return null;
111
+ const hour = Number(match[1]);
112
+ const minute = Number(match[2]);
113
+ return hour <= 23 && minute <= 59 ? { hour, minute } : null;
114
+ }
115
+ /** "HH:MM", 24-hour. */
116
+ export const clockText = ({ hour, minute }) => `${String(hour).padStart(2, '0')}:${String(minute).padStart(2, '0')}`;
117
+ export const compareTimes = (a, b) => a.hour - b.hour || a.minute - b.minute;
118
+ /** The device's current local time to the minute (DTM-8, while a time is empty). */
119
+ export function deviceTime() {
120
+ const now = new Date();
121
+ return { hour: now.getHours(), minute: now.getMinutes() };
122
+ }
123
+ /** The 12-hour clock's hour (1–12) of a 24-hour hour. */
124
+ export const shownHour12 = (hour) => ((hour + 11) % 12) + 1;
125
+ /** The period of a 24-hour hour: 0 before noon, 1 after. */
126
+ export const periodOf = (hour) => (hour >= 12 ? 1 : 0);
127
+ /** A 12-hour clock's hour (1–12) in a period as a 24-hour hour. */
128
+ export const hourOf12 = (shown, period) => (shown % 12) + 12 * period;
129
+ /** The minute steps a picker offers (DTM-17). */
130
+ export const MINUTE_STEPS = [1, 5, 10, 15, 30];
131
+ /** The minutes a step offers, from 00 (DTM-17). */
132
+ export const stepMinutes = (step) => Array.from({ length: Math.ceil(60 / step) }, (_, index) => index * step);
133
+ /** A time with its minute rounded down to the step (DTM-8). */
134
+ export const roundDown = (time, step) => ({ ...time, minute: time.minute - (time.minute % step) });
135
+ //# sourceMappingURL=calendar-date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calendar-date.js","sourceRoot":"","sources":["../../src/primitives/calendar-date.ts"],"names":[],"mappings":"AAAA,2HAA2H;AAC3H,0HAA0H;AAC1H,uHAAuH;AACvH,gHAAgH;AAChH,yEAAyE;AAkBzE,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,Q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,yDAAyD;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC;AACpE,4DAA4D;AAC5D,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAS,EAAE,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,mEAAmE;AACnE,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,MAAa,EAAE,EAAE,CAAC,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;AAErF,iDAAiD;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAU,CAAC;AAExD,mDAAmD;AACnD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;AAEtH,+DAA+D;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAe,EAAE,IAAY,EAAa,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,144 @@
1
+ import { type CSSResultGroup, LitElement, type PropertyDeclarations, type PropertyValues, type TemplateResult, nothing } from 'lit';
2
+ import { type FormEntry } from './form-says.js';
3
+ export { forward } from './forward.js';
4
+ /** What a class that can be a member offers for W4: its documented parts, once (`static readonly parts`). */
5
+ export interface WithParts {
6
+ readonly parts: readonly string[];
7
+ }
8
+ /** A part of a member whose name another member has too: the name it is exported under, and whether the bare name is kept. */
9
+ export interface Collision {
10
+ /** The name it is always exported under: the member's name before the part's (`field-label`). */
11
+ as: string;
12
+ /** Also under the bare name: only where the two parts are one thing to a person and never drawn at once (W4, item 2). */
13
+ bare?: boolean;
14
+ }
15
+ /**
16
+ * W4: a member's documented parts for the composed element — `attribute` is the member's `exportparts`, `names` what
17
+ * `::part()` on the composed element can then name. Made from the member's own list, never written by hand. `collisions`
18
+ * says, for a part whose name two members share, the prefixed name it is always exported under and whether the bare
19
+ * name is exported too (`exportparts="label, label: field-label"`). `omit` names the parts of the member that the
20
+ * composed element never draws and so does not export — a Field's `counter`, in a field that gives its Field no count.
21
+ */
22
+ export declare function exported(member: WithParts, collisions?: Record<string, Collision>, omit?: readonly string[]): {
23
+ attribute: string;
24
+ names: string[];
25
+ };
26
+ /** W1: a composed element's own stylesheet where it has no part and no arrangement of its own — the host is a block. */
27
+ export declare const composedHost: import("lit").CSSResult;
28
+ type Updating = Element & {
29
+ updateComplete?: Promise<unknown>;
30
+ };
31
+ /**
32
+ * The base of a composed element (W1, W7, W8, W9). A subclass renders its members' own elements —
33
+ * `<tanrei-field part="field" exportparts=${FIELD_PARTS.attribute} ${forward(this, FIELD)}>` — and says which of them
34
+ * focus goes to (`control`).
35
+ *
36
+ * The shadow root does not delegate focus (W7): a press on text that is not a control must move no focus. The host is
37
+ * never focusable; `focus()` and `blur()` are the control's, a click that arrives on the host itself — a page's own
38
+ * `<label for>` — moves focus to the control, and `autofocus` on the host reaches the control when the element first
39
+ * renders.
40
+ */
41
+ export declare abstract class ComposedElement extends LitElement {
42
+ static styles: CSSResultGroup;
43
+ /** W7: the member focus goes to, once rendered. */
44
+ protected abstract get control(): HTMLElement | null;
45
+ /**
46
+ * W8: the sentence a debug build names when the host is given an ARIA name. The host has no role: its name is the
47
+ * frame's `label`. Empty: nothing is reported.
48
+ */
49
+ protected readonly hostNameSentence: string;
50
+ /** W9: the names of the slots it has passed on, and the watch on its own children for them. */
51
+ private readonly passing;
52
+ private children_;
53
+ private focusedAtFirst;
54
+ constructor();
55
+ /** The members it has rendered: the custom elements of its own shadow tree. */
56
+ protected get members(): Updating[];
57
+ /** W7, item 2: focus is the control's. */
58
+ focus(options?: FocusOptions): void;
59
+ /** W7, item 2: what has focus inside the control loses it (an engine does not take it from inside a host it blurs). */
60
+ blur(): void;
61
+ /**
62
+ * W9: a slot of a member, passed on — `${this.pass('label-icon')}` among that member's children. Rendered only while
63
+ * the element has a child for it: a member that draws room for a filled slot would take a passing slot that is
64
+ * always there for content.
65
+ */
66
+ protected pass(name: string): TemplateResult | typeof nothing;
67
+ private watchChildren;
68
+ connectedCallback(): void;
69
+ disconnectedCallback(): void;
70
+ /** The element has updated when its members have: what it gave them, they have taken. */
71
+ protected getUpdateComplete(): Promise<boolean>;
72
+ protected updated(changed: PropertyValues): void;
73
+ /** The control has rendered what takes focus only after its own first update. */
74
+ private focusWhenReady;
75
+ }
76
+ /** What a value member is: a control with a `value`, which a form restores by the platform's own callback. */
77
+ export interface ValueMember<V> extends HTMLElement {
78
+ value: V;
79
+ formStateRestoreCallback?: (state: FormEntry, mode: 'restore' | 'autocomplete') => void;
80
+ }
81
+ /**
82
+ * A composed element with a value member (W5, W6). The subclass names the member (`valueMember`) and writes the
83
+ * `value` accessor in place, on these two:
84
+ *
85
+ * get value(): string { return this.memberValue(''); }
86
+ * set value(value: string) { this.giveValue(value); }
87
+ *
88
+ * **The value is the member's at every moment** (W5): what was last set on the element until the member has taken it
89
+ * — the element's next render — and from then on what the member holds. So in every listener of a member's event,
90
+ * capturing or bubbling, `event.target.value` is the new value, and a value the member changed is read back changed.
91
+ *
92
+ * **The element is the form's control** (W6): its class says `static formAssociated = true`; it takes `name` and `form`, and repeats on its own
93
+ * internals what its value member tells its own through `FormSays` (src/primitives/form-says.ts) — the value and the
94
+ * state as they are, the validity flags, the message and the member's own anchor. It resets to its `value` attribute
95
+ * (`firstValue()`), passes a restore on to the member, and joins a disabled `<fieldset>` with its own `disabled` for
96
+ * its frame (`formDisabled`). Enter is the member's: it asks for the element's form (`formOf`).
97
+ */
98
+ export declare abstract class ComposedControl<V = string> extends ComposedElement {
99
+ static properties: PropertyDeclarations;
100
+ /** Web only: the name the value is submitted under. */
101
+ name: string;
102
+ /** W6, item 6: a disabled `<fieldset>` around the element, or its own `disabled` attribute, as the platform says it. */
103
+ protected formDisabled: boolean;
104
+ /** W5: the member that holds the value, once rendered. */
105
+ protected abstract get valueMember(): ValueMember<V> | null;
106
+ abstract get value(): V;
107
+ abstract set value(value: V);
108
+ protected get control(): HTMLElement | null;
109
+ protected readonly internals: ElementInternals;
110
+ /** W5: the value last set on the element, while the member has not taken it. */
111
+ private given;
112
+ private pending;
113
+ private heard;
114
+ private unhear;
115
+ private restored;
116
+ /** W5: what `value` returns — `initial` is the member's own default, for an element that has not rendered and was given nothing. */
117
+ protected memberValue(initial: V): V;
118
+ /** W5: what `value` is set with. The member takes it at the element's next render; what the member holds already changes nothing. */
119
+ protected giveValue(value: V): void;
120
+ /** W6, item 4: the value a form's reset returns to — the `value` attribute, where the first value is written. */
121
+ protected firstValue(): V;
122
+ /** The form it belongs to, if any. */
123
+ get form(): HTMLFormElement | null;
124
+ /** The element's validity: its value member's (W6, item 3). */
125
+ get validity(): ValidityState;
126
+ get validationMessage(): string;
127
+ get willValidate(): boolean;
128
+ checkValidity(): boolean;
129
+ reportValidity(): boolean;
130
+ formResetCallback(): void;
131
+ formStateRestoreCallback(state: FormEntry, mode: 'restore' | 'autocomplete'): void;
132
+ formDisabledCallback(disabled: boolean): void;
133
+ /** W6, items 2 and 3: the same value and state, the same flags and message, and the member's own anchor. */
134
+ private repeat;
135
+ /**
136
+ * W14 (`fills`): called after each word the value member tells its form — when the element first hears it, and after
137
+ * each of the member's updates, which is when a member speaks. An element whose spec names a member's prop it fills
138
+ * itself from state the value member holds (a text field: its Field's count text, from its input's count) sets it
139
+ * here; it reads the member and writes the other member's property, and computes nothing of its own. Does nothing
140
+ * otherwise.
141
+ */
142
+ protected memberUpdated(): void;
143
+ protected updated(changed: PropertyValues): void;
144
+ }