@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,34 @@
1
+ import { type CSSResult } from 'lit';
2
+ import type { StateSelector } from './states.js';
3
+ /**
4
+ * A row of a column of items (a list item, LST-*; a menu item, MNU-*): one box, `.row`, that carries the item's condition
5
+ * (its state variants), hover, focus and press, the ripple and the focus ring drawn inside it.
6
+ * The row answers states only while it is pressable (`.p`) and reads disabled from `.d`, so that a row whose semantics
7
+ * live on its host (an option, a menu item) and a row that is its own button (an interactive list item) share one set of
8
+ * rules. The component supplies its prefix, its parts, which selector draws each condition, where each state is read,
9
+ * and which element paints each colored part.
10
+ */
11
+ export interface ItemRowOptions {
12
+ /** `--tanrei-comp-<name>`. */
13
+ prefix: `--${string}`;
14
+ /** The parts every condition colors in every state: private key → token part (`h: 'headline-color'`). `c` is the container. */
15
+ parts: Record<string, string>;
16
+ /** Each condition and the selector of the row that draws it (`unselected: '.row'`, `selected: '.row.selected'`); later ones win. */
17
+ conditions: Record<string, string>;
18
+ /** Where each state is read (`stateRules()`); every selector it returns must have the same specificity. */
19
+ on: StateSelector;
20
+ /** Each element that is painted in a part's color: selector → key. It recolors over the state motion. */
21
+ paints: Record<string, string>;
22
+ }
23
+ /**
24
+ * The row's styles: the condition blocks, the resting paint, the state rules and their precedence (pressed > focused >
25
+ * hovered, disabled over all; the four `pressed-feedback` answers), the state motion of every color and of the opacity
26
+ * (none where motion is reduced) and the ripple. The pressed state arrives without a transition in, colors included.
27
+ */
28
+ export declare function itemRowStyles({ prefix, parts, conditions, on, paints }: ItemRowOptions): CSSResult;
29
+ /**
30
+ * LST-5, MNU-12: a pressable row is at least `sys.target.pointer` tall for a fine pointer and `sys.target.touch` for a
31
+ * coarse one — rows that touch cannot extend a hit area over each other, so the row itself grows — and at least `height`
32
+ * (its own minimum) whatever the pointer.
33
+ */
34
+ export declare function rowTarget(selector: string, height: string): CSSResult;
@@ -0,0 +1,76 @@
1
+ import { unsafeCSS } from 'lit';
2
+ import { rippleStyles } from './ripple.js';
3
+ import { conditionBlock, conditionStates, selectionContainerShape } from './selection.js';
4
+ /**
5
+ * The row's styles: the condition blocks, the resting paint, the state rules and their precedence (pressed > focused >
6
+ * hovered, disabled over all; the four `pressed-feedback` answers), the state motion of every color and of the opacity
7
+ * (none where motion is reduced) and the ripple. The pressed state arrives without a transition in, colors included.
8
+ */
9
+ export function itemRowStyles({ prefix, parts, conditions, on, paints }) {
10
+ const motion = `var(${prefix}-motion-state-duration) var(${prefix}-motion-state-easing)`;
11
+ const painted = Object.keys(paints).join(', ');
12
+ return unsafeCSS(`
13
+ ${Object.entries(conditions)
14
+ .map(([condition, selector]) => conditionBlock(prefix, condition, parts, selector))
15
+ .join('\n')}
16
+ .row {
17
+ box-sizing: border-box;
18
+ position: relative;
19
+ /* Its own stacking context, so the ripple sits above the container color and below the content. */
20
+ isolation: isolate;
21
+ outline: none;
22
+ ${selectionContainerShape}
23
+ background: var(--_c);
24
+ -webkit-tap-highlight-color: transparent;
25
+ transition-property: background-color, opacity, border-radius;
26
+ transition-duration: var(${prefix}-motion-state-duration);
27
+ transition-timing-function: var(${prefix}-motion-state-easing);
28
+ }
29
+ .row.p {
30
+ cursor: pointer;
31
+ /* A row is pressed, never selected as text (MNU-15). WebKit keeps the text selectable until its own name
32
+ says so: a drag that began on a row selected the rows' text. (A press held on a selection is never the engine's
33
+ drag of the text: PressController refuses it.) */
34
+ -webkit-user-select: none;
35
+ user-select: none;
36
+ }
37
+ ${Object.entries(paints)
38
+ // An icon's fill (`iconGlyph()`) keeps its transition: this declaration replaces that one, so it carries both.
39
+ .map(([selector, key]) => `${selector} {\n color: var(--_${key});\n transition:\n color ${motion},\n font-variation-settings ${motion};\n }`)
40
+ .join('\n ')}
41
+ ${conditionStates(prefix, parts, { container: 'c', root: '.row', on })}
42
+ .row[data-pressed]:not([data-pressed='none']) :is(${painted}) {
43
+ transition-duration: 0s;
44
+ }
45
+ ${rippleStyles({
46
+ color: '--_c-p',
47
+ grow: `${prefix}-motion-feedback-duration`,
48
+ fade: `${prefix}-motion-state-duration`,
49
+ easing: `${prefix}-motion-state-easing`,
50
+ })}
51
+ @media (prefers-reduced-motion: reduce) {
52
+ .row,
53
+ ${painted} {
54
+ transition: none;
55
+ }
56
+ }
57
+ `);
58
+ }
59
+ /**
60
+ * LST-5, MNU-12: a pressable row is at least `sys.target.pointer` tall for a fine pointer and `sys.target.touch` for a
61
+ * coarse one — rows that touch cannot extend a hit area over each other, so the row itself grows — and at least `height`
62
+ * (its own minimum) whatever the pointer.
63
+ */
64
+ export function rowTarget(selector, height) {
65
+ return unsafeCSS(`
66
+ ${selector} {
67
+ min-block-size: max(${height}, var(--tanrei-sys-target-pointer));
68
+ }
69
+ @media (pointer: coarse) {
70
+ ${selector} {
71
+ min-block-size: max(${height}, var(--tanrei-sys-target-touch));
72
+ }
73
+ }
74
+ `);
75
+ }
76
+ //# sourceMappingURL=item-row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-row.js","sourceRoot":"","sources":["../../src/primitives/item-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,SAAS,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAwB1F;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAkB;IACrF,MAAM,MAAM,GAAG,OAAO,MAAM,+BAA+B,MAAM,uBAAuB,CAAC;IACzF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC/C,OAAO,SAAS,CAAC;IACf,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;SACzB,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;SAClF,IAAI,CAAC,IAAI,CAAC;;;;;;;MAOT,uBAAuB;;;;+BAIE,MAAM;sCACC,MAAM;;;;;;;;;;IAUxC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;QACtB,+GAA+G;SAC9G,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,QAAQ,yBAAyB,GAAG,oCAAoC,MAAM,oCAAoC,MAAM,QAAQ,CAAC;SAC7J,IAAI,CAAC,MAAM,CAAC;IACb,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;sDAClB,OAAO;;;IAGzD,YAAY,CAAC;QACb,KAAK,EAAE,QAAQ;QACf,IAAI,EAAE,GAAG,MAAM,2BAA2B;QAC1C,IAAI,EAAE,GAAG,MAAM,wBAAwB;QACvC,MAAM,EAAE,GAAG,MAAM,sBAAsB;KACxC,CAAC;;;MAGE,OAAO;;;;CAIZ,CAAC,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,QAAgB,EAAE,MAAc;IACxD,OAAO,SAAS,CAAC;IACf,QAAQ;0BACc,MAAM;;;MAG1B,QAAQ;4BACc,MAAM;;;CAGjC,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** Tells the item's container, with a bubbling `type` event, that a prop it reads changed. */
2
+ export declare function notifyItemUpdate(item: HTMLElement, type: string): void;
@@ -0,0 +1,12 @@
1
+ // The internal channel from an item to the container that reads it (a segment to its set, a list item to its list, a menu
2
+ // item to its menu, a suggestion to its search, a tab or tab panel to its row): the item says that a prop the container
3
+ // depends on changed, and the container re-reads its items.
4
+ //
5
+ // It is dispatched here, outside `src/components/**` — the files custom-elements.json is made from — so the event never
6
+ // becomes part of an item's public API (the manifest, the generated React wrappers). The navigation destinations do the
7
+ // same through `notifyDestinationUpdate()` (destination.ts).
8
+ /** Tells the item's container, with a bubbling `type` event, that a prop it reads changed. */
9
+ export function notifyItemUpdate(item, type) {
10
+ item.dispatchEvent(new Event(type, { bubbles: true }));
11
+ }
12
+ //# sourceMappingURL=item-update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"item-update.js","sourceRoot":"","sources":["../../src/primitives/item-update.ts"],"names":[],"mappings":"AAAA,0HAA0H;AAC1H,wHAAwH;AACxH,4DAA4D;AAC5D,EAAE;AACF,wHAAwH;AACxH,wHAAwH;AACxH,6DAA6D;AAE7D,8FAA8F;AAC9F,MAAM,UAAU,gBAAgB,CAAC,IAAiB,EAAE,IAAY;IAC9D,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type CSSResult } from 'lit';
2
+ /**
3
+ * The space between an element of the row (`selector`) and the one before it: `gap` (a length expression — the row's
4
+ * gap token), or as much more as the two need to keep their targets apart. Along the inline axis, or — `block` — a
5
+ * column. The first element of the row gets none.
6
+ */
7
+ export declare function keptLength(selector: string, { gap, axis }: {
8
+ gap: string;
9
+ axis?: 'inline' | 'block';
10
+ }): CSSResult;
11
+ /** What a host does once lengths were written: it may read at once and hand back what it then writes. */
12
+ type Changed = () => (() => void) | void;
13
+ /**
14
+ * The measuring half: give it the row — its elements in the order they are laid out — with `set()`, again whenever the
15
+ * row or its axis changes, and `clear()` when the host leaves the page. An element that takes no room (hidden) is no
16
+ * one's neighbour. `changed` is called after lengths were written, for a host that measures what follows from them:
17
+ * it reads there and then, and returns what it writes — the writes of every host follow the reads of them all.
18
+ */
19
+ export declare class KeptLengths {
20
+ readonly changed?: Changed | undefined;
21
+ private row;
22
+ private axis;
23
+ private readonly lengths;
24
+ constructor(changed?: Changed | undefined);
25
+ set(row: readonly HTMLElement[], axis?: 'inline' | 'block'): void;
26
+ /** The observer's report of one element of the row. */
27
+ took(entry: ResizeObserverEntry): void;
28
+ private unobserve;
29
+ clear(): void;
30
+ private forget;
31
+ /** What each element reads, written where it differs; whether anything was written. */
32
+ write(): boolean;
33
+ }
34
+ export {};
@@ -0,0 +1,154 @@
1
+ import { unsafeCSS } from 'lit';
2
+ // A row of controls that stand close together (SRC-34: a search bar's action buttons; TBR-16: a floating toolbar's
3
+ // items). The row lays them a gap apart, measured between their visible bounds, and moves two neighbours further apart
4
+ // only as far as each needs in order to keep, centred on itself, a length of `sys.target.touch` along the row that its
5
+ // neighbour's does not reach into: controls this close cannot extend a hit area over each other (as BGR-3). So the
6
+ // space between two neighbours is
7
+ //
8
+ // max(gap, lack(a) + lack(b)) where lack(x) = max(0, (sys.target.touch − x's length) / 2)
9
+ //
10
+ // — with a gap of 0, two medium Buttons (40) stand 8 apart, a small one (32) and a medium one 12, and two that are at
11
+ // least the target long touch. Nothing is widened, resized or restyled, and it is the touch target for every pointer, so
12
+ // the row does not change with the input type.
13
+ //
14
+ // CSS cannot see a neighbour's length, nor an element's own from a rule of its parent's. So there are two halves:
15
+ //
16
+ // - `KeptLengths` measures (a ResizeObserver, as GroupItemController measures a joined item's height) and writes on
17
+ // each element of the row, as custom properties: its own length along the row (`--tanrei-kept-length`), and — on
18
+ // every element that follows another — a flag (`--tanrei-kept-follows: 1`) and the length of the one before it
19
+ // (`--tanrei-kept-before`). Lengths only: no token is read in script, so nothing can go stale when the design
20
+ // system, the gap or the target changes.
21
+ // - `keptLength()` is the rule that reads them: the space above as the element's margin toward the one before it.
22
+ // The row's own `gap` between these elements is 0 (the gap token is inside the margin). Until the lengths arrive
23
+ // the space is the gap.
24
+ //
25
+ // An internal contract between a Tanrei element and what it lays out, not a styling API.
26
+ const LENGTH = '--tanrei-kept-length';
27
+ const BEFORE = '--tanrei-kept-before';
28
+ const FOLLOWS = '--tanrei-kept-follows';
29
+ const PROPERTIES = [LENGTH, BEFORE, FOLLOWS];
30
+ const TOUCH = 'var(--tanrei-sys-target-touch)';
31
+ /** Half of what a length lacks of the touch target; nothing where it is not known yet. */
32
+ const lack = (length) => `max(0px, calc((${TOUCH} - var(${length}, ${TOUCH})) / 2))`;
33
+ /**
34
+ * The space between an element of the row (`selector`) and the one before it: `gap` (a length expression — the row's
35
+ * gap token), or as much more as the two need to keep their targets apart. Along the inline axis, or — `block` — a
36
+ * column. The first element of the row gets none.
37
+ */
38
+ export function keptLength(selector, { gap, axis = 'inline' }) {
39
+ return unsafeCSS(`
40
+ ${selector} {
41
+ margin-${axis}-start: calc(var(${FOLLOWS}, 0) * max(${gap}, calc(${lack(LENGTH)} + ${lack(BEFORE)})));
42
+ }
43
+ `);
44
+ }
45
+ /** Rounded to a hundredth of a pixel, so that a measurement that did not change writes nothing. */
46
+ const hundredths = (value) => Math.round(value * 100) / 100;
47
+ /**
48
+ * One observer for every row of the page. It is told of all the elements whose length changed after a layout; every
49
+ * row writes its lengths, then every host whose row changed READS what follows from them (`changed`), and only then
50
+ * do the hosts write what they read — so the rows of a page cost one layout between them, not one for each host
51
+ * (fifty number fields drawn at once: fifty layouts, each field measuring its steppers after writing their lengths).
52
+ */
53
+ const rows = new WeakMap();
54
+ const observer = typeof ResizeObserver === 'undefined'
55
+ ? null
56
+ : new ResizeObserver((entries) => {
57
+ const told = new Set();
58
+ for (const entry of entries) {
59
+ const row = rows.get(entry.target);
60
+ if (!row)
61
+ continue;
62
+ row.took(entry);
63
+ told.add(row);
64
+ }
65
+ const writes = [...told].filter((row) => row.write()).map((row) => row.changed?.());
66
+ for (const write of writes)
67
+ write?.();
68
+ });
69
+ /**
70
+ * The measuring half: give it the row — its elements in the order they are laid out — with `set()`, again whenever the
71
+ * row or its axis changes, and `clear()` when the host leaves the page. An element that takes no room (hidden) is no
72
+ * one's neighbour. `changed` is called after lengths were written, for a host that measures what follows from them:
73
+ * it reads there and then, and returns what it writes — the writes of every host follow the reads of them all.
74
+ */
75
+ export class KeptLengths {
76
+ constructor(changed) {
77
+ this.changed = changed;
78
+ this.row = [];
79
+ this.axis = 'inline';
80
+ this.lengths = new Map();
81
+ }
82
+ set(row, axis = 'inline') {
83
+ if (axis === this.axis && row.length === this.row.length && row.every((element, i) => element === this.row[i]))
84
+ return;
85
+ for (const element of this.row)
86
+ if (!row.includes(element))
87
+ this.forget(element);
88
+ const before = this.row;
89
+ this.row = [...row];
90
+ if (axis !== this.axis)
91
+ this.lengths.clear();
92
+ // Every element of the row is reported anew, as a row given to an observer of its own was.
93
+ for (const element of before)
94
+ this.unobserve(element);
95
+ this.axis = axis;
96
+ if (!row.length || !observer)
97
+ return;
98
+ for (const element of this.row) {
99
+ rows.set(element, this);
100
+ observer.observe(element);
101
+ }
102
+ this.write();
103
+ }
104
+ /** The observer's report of one element of the row. */
105
+ took(entry) {
106
+ const box = entry.borderBoxSize?.[0];
107
+ const rect = box ? null : entry.target.getBoundingClientRect();
108
+ const length = this.axis === 'block' ? (box?.blockSize ?? rect?.height ?? 0) : (box?.inlineSize ?? rect?.width ?? 0);
109
+ this.lengths.set(entry.target, hundredths(length));
110
+ }
111
+ unobserve(element) {
112
+ if (rows.get(element) !== this)
113
+ return;
114
+ rows.delete(element);
115
+ observer?.unobserve(element);
116
+ }
117
+ clear() {
118
+ this.set([], this.axis);
119
+ }
120
+ forget(element) {
121
+ this.lengths.delete(element);
122
+ for (const property of PROPERTIES)
123
+ element.style.removeProperty(property);
124
+ }
125
+ /** What each element reads, written where it differs; whether anything was written. */
126
+ write() {
127
+ let wrote = false;
128
+ const put = (element, property, value) => {
129
+ if (element.style.getPropertyValue(property) === (value ?? ''))
130
+ return;
131
+ if (value === null)
132
+ element.style.removeProperty(property);
133
+ else
134
+ element.style.setProperty(property, value);
135
+ wrote = true;
136
+ };
137
+ const px = (element) => (this.lengths.has(element) ? `${this.lengths.get(element)}px` : null);
138
+ let before = null;
139
+ for (const element of this.row) {
140
+ // An element that takes no room is not laid out: it keeps nothing and is no one's neighbour.
141
+ if (this.lengths.get(element) === 0) {
142
+ for (const property of PROPERTIES)
143
+ put(element, property, null);
144
+ continue;
145
+ }
146
+ put(element, LENGTH, px(element));
147
+ put(element, FOLLOWS, before ? '1' : null);
148
+ put(element, BEFORE, before ? px(before) : null);
149
+ before = element;
150
+ }
151
+ return wrote;
152
+ }
153
+ }
154
+ //# sourceMappingURL=kept-length.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kept-length.js","sourceRoot":"","sources":["../../src/primitives/kept-length.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,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAC3G,IAAI,MAAM,GAAuB,IAAI,CAAC;QACtC,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;YAC/B,6FAA6F;YAC7F,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACpC,KAAK,MAAM,QAAQ,IAAI,UAAU;oBAAE,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;gBAChE,SAAS;YACX,CAAC;YACD,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;YAClC,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC3C,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACjD,MAAM,GAAG,OAAO,CAAC;QACnB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,30 @@
1
+ import type { ComplexAttributeConverter } from 'lit';
2
+ /** The two conventions a keyboard is written in (KBS-3, KBS-4). */
3
+ export type KeyboardConvention = 'apple' | 'standard';
4
+ /** The attribute an ancestor sets to choose the convention of every keyboard shortcut under it (`apple` or `standard`). */
5
+ export declare const KEYBOARD_CONVENTION = "data-tanrei-keyboard-convention";
6
+ /** What a keyboard shortcut tells its host, bubbling but not composed, when the keys it writes change without the host. */
7
+ export declare const SHORTCUT_UPDATE = "tanrei-keyboard-shortcut-update";
8
+ /**
9
+ * KBS-2: the convention the nearest ancestor of `element` sets, across shadow roots (a menu item's shortcut is in the
10
+ * item's shadow root; the attribute is on the page), or null. An attribute with another value sets nothing.
11
+ */
12
+ export declare function ambientConvention(element: Element): KeyboardConvention | null;
13
+ /** KBS-2: `apple` where the platform is macOS, iOS, iPadOS or visionOS (which reports itself as a Mac), else `standard`. */
14
+ export declare function platformConvention(): KeyboardConvention;
15
+ /** Something that re-reads its ambient convention. */
16
+ export interface ConventionReader {
17
+ conventionChanged(): void;
18
+ }
19
+ /**
20
+ * KBS-2: `reader` is told whenever the attribute changes on any element of the document or of a shadow root `element`
21
+ * is inside — one observer for the page, each root observed once. Call `unwatchConvention()` when it disconnects.
22
+ */
23
+ export declare function watchConvention(reader: ConventionReader, element: Element): void;
24
+ export declare function unwatchConvention(reader: ConventionReader): void;
25
+ /** Splits an attribute of chords: the chords separated by white space (`mod+k mod+c`), or a JSON array of them. */
26
+ export declare function parseChords(value: string | null): string[];
27
+ /** The attribute converter of a list of chords (a keyboard shortcut's `keys`, a menu item's `shortcut`). */
28
+ export declare const chordsConverter: ComplexAttributeConverter<string[]>;
29
+ /** A list of chords as given to the property: an array, or a string as the attribute writes it. */
30
+ export declare function chordsOf(value: unknown): string[];
@@ -0,0 +1,88 @@
1
+ // Whose keyboard a keyboard shortcut is written for (KBS-2), and the channel between a keyboard shortcut and the
2
+ // component that hosts it (KBS-12, KBS-13: a menu item). It lives here, outside `src/components/**` — the files
3
+ // custom-elements.json is made from — so neither the watcher nor the internal event becomes part of a public API.
4
+ /** The attribute an ancestor sets to choose the convention of every keyboard shortcut under it (`apple` or `standard`). */
5
+ export const KEYBOARD_CONVENTION = 'data-tanrei-keyboard-convention';
6
+ /** What a keyboard shortcut tells its host, bubbling but not composed, when the keys it writes change without the host. */
7
+ export const SHORTCUT_UPDATE = 'tanrei-keyboard-shortcut-update';
8
+ const SETS = `[${KEYBOARD_CONVENTION}='apple'], [${KEYBOARD_CONVENTION}='standard']`;
9
+ /**
10
+ * KBS-2: the convention the nearest ancestor of `element` sets, across shadow roots (a menu item's shortcut is in the
11
+ * item's shadow root; the attribute is on the page), or null. An attribute with another value sets nothing.
12
+ */
13
+ export function ambientConvention(element) {
14
+ let scope = element.parentElement?.closest(SETS) ?? null;
15
+ for (let node = element; !scope;) {
16
+ const root = node.getRootNode();
17
+ if (!(root instanceof ShadowRoot))
18
+ break;
19
+ node = root.host;
20
+ scope = node.closest(SETS);
21
+ }
22
+ return scope?.getAttribute(KEYBOARD_CONVENTION) ?? null;
23
+ }
24
+ /** KBS-2: `apple` where the platform is macOS, iOS, iPadOS or visionOS (which reports itself as a Mac), else `standard`. */
25
+ export function platformConvention() {
26
+ if (typeof navigator === 'undefined')
27
+ return 'standard';
28
+ const nav = navigator;
29
+ const name = nav.userAgentData?.platform || nav.platform || '';
30
+ return /^(mac|iphone|ipad|ipod|ios)/i.test(name) ? 'apple' : 'standard';
31
+ }
32
+ const readers = new Set();
33
+ const watched = new WeakSet();
34
+ let observer;
35
+ /**
36
+ * KBS-2: `reader` is told whenever the attribute changes on any element of the document or of a shadow root `element`
37
+ * is inside — one observer for the page, each root observed once. Call `unwatchConvention()` when it disconnects.
38
+ */
39
+ export function watchConvention(reader, element) {
40
+ if (typeof MutationObserver === 'undefined')
41
+ return;
42
+ readers.add(reader);
43
+ observer ??= new MutationObserver(() => {
44
+ for (const each of readers)
45
+ each.conventionChanged();
46
+ });
47
+ for (let root = element.getRootNode();;) {
48
+ if (!watched.has(root)) {
49
+ observer.observe(root, { attributes: true, attributeFilter: [KEYBOARD_CONVENTION], subtree: true });
50
+ watched.add(root);
51
+ }
52
+ if (!(root instanceof ShadowRoot))
53
+ break;
54
+ root = root.host.getRootNode();
55
+ }
56
+ }
57
+ export function unwatchConvention(reader) {
58
+ readers.delete(reader);
59
+ }
60
+ /** Splits an attribute of chords: the chords separated by white space (`mod+k mod+c`), or a JSON array of them. */
61
+ export function parseChords(value) {
62
+ const text = (value ?? '').trim();
63
+ if (text.startsWith('[')) {
64
+ try {
65
+ const parsed = JSON.parse(text);
66
+ if (Array.isArray(parsed) && parsed.every((chord) => typeof chord === 'string'))
67
+ return parsed;
68
+ }
69
+ catch {
70
+ // Not JSON: a chord that starts with the key [ — read below as white-space separated.
71
+ }
72
+ }
73
+ return text.split(/\s+/).filter(Boolean);
74
+ }
75
+ /** The attribute converter of a list of chords (a keyboard shortcut's `keys`, a menu item's `shortcut`). */
76
+ export const chordsConverter = {
77
+ fromAttribute: (value) => parseChords(value),
78
+ toAttribute: (value) => (Array.isArray(value) ? value.join(' ') : String(value ?? '')),
79
+ };
80
+ /** A list of chords as given to the property: an array, or a string as the attribute writes it. */
81
+ export function chordsOf(value) {
82
+ if (Array.isArray(value))
83
+ return value.map((chord) => String(chord));
84
+ if (typeof value === 'string')
85
+ return parseChords(value);
86
+ return [];
87
+ }
88
+ //# sourceMappingURL=keyboard-convention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keyboard-convention.js","sourceRoot":"","sources":["../../src/primitives/keyboard-convention.ts"],"names":[],"mappings":"AAAA,iHAAiH;AACjH,gHAAgH;AAChH,kHAAkH;AAOlH,2HAA2H;AAC3H,MAAM,CAAC,MAAM,mBAAmB,GAAG,iCAAiC,CAAC;AAErE,2HAA2H;AAC3H,MAAM,CAAC,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAEjE,MAAM,IAAI,GAAG,IAAI,mBAAmB,eAAe,mBAAmB,cAAc,CAAC;AAErF;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAgB;IAChD,IAAI,KAAK,GAAmB,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;IACzE,KAAK,IAAI,IAAI,GAAY,OAAO,EAAE,CAAC,KAAK,GAAI,CAAC;QAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAChC,IAAI,CAAC,CAAC,IAAI,YAAY,UAAU,CAAC;YAAE,MAAM;QACzC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QACjB,KAAK,GAAG,IAAI,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;AACnG,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACrE,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The lines a copy of a floating label is laid out in, and the width of the widest, in the copy's own (untransformed)
3
+ * pixels (TXF-13, SEL-15: a label that does not fit on one line wraps, and the field gives its lines their room). Each
4
+ * line is the run of text fragments that share a vertical band; a copy that is not laid out has one line.
5
+ *
6
+ * The copy is an element the component never draws, laid out as the label is in one of its two positions (resting in
7
+ * the value's line, or floated): the component counts both, and writes the counts where its styles read them.
8
+ */
9
+ export declare function labelLines(copy: HTMLElement | null): {
10
+ count: number;
11
+ widest: number;
12
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The lines a copy of a floating label is laid out in, and the width of the widest, in the copy's own (untransformed)
3
+ * pixels (TXF-13, SEL-15: a label that does not fit on one line wraps, and the field gives its lines their room). Each
4
+ * line is the run of text fragments that share a vertical band; a copy that is not laid out has one line.
5
+ *
6
+ * The copy is an element the component never draws, laid out as the label is in one of its two positions (resting in
7
+ * the value's line, or floated): the component counts both, and writes the counts where its styles read them.
8
+ */
9
+ export function labelLines(copy) {
10
+ if (!copy)
11
+ return { count: 1, widest: 0 };
12
+ const range = document.createRange();
13
+ range.selectNodeContents(copy);
14
+ const lines = [];
15
+ const rects = Array.from(range.getClientRects())
16
+ .filter((rect) => rect.width > 0 && rect.height > 0)
17
+ .sort((a, b) => a.top - b.top);
18
+ for (const rect of rects) {
19
+ const middle = (rect.top + rect.bottom) / 2;
20
+ const line = lines.find((l) => middle >= l.top && middle <= l.bottom);
21
+ if (line) {
22
+ line.left = Math.min(line.left, rect.left);
23
+ line.right = Math.max(line.right, rect.right);
24
+ }
25
+ else
26
+ lines.push({ top: rect.top, bottom: rect.bottom, left: rect.left, right: rect.right });
27
+ }
28
+ // An ancestor may be scaled (a dialog opening): the widths are wanted in the copy's own pixels.
29
+ const box = copy.getBoundingClientRect().width;
30
+ const own = Number.parseFloat(getComputedStyle(copy).width);
31
+ const scale = box > 0 && own > 0 ? box / own : 1;
32
+ return { count: Math.max(1, lines.length), widest: Math.max(0, ...lines.map((l) => (l.right - l.left) / scale)) };
33
+ }
34
+ //# sourceMappingURL=label-lines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"label-lines.js","sourceRoot":"","sources":["../../src/primitives/label-lines.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,IAAwB;IACjD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAmE,EAAE,CAAC;IACjF,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC;SAC7C,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SACnD,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,MAAM,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC5C,M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AC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * How much larger an element is drawn than it is laid out, along each axis: 1 at rest, 0.9 while an ancestor scales it
3
+ * in from 0.9 (a dialog or a popover growing over its open motion), any number under a transformed ancestor.
4
+ *
5
+ * `getBoundingClientRect()` answers in the page's pixels, after every ancestor's transform; what a component writes
6
+ * back — a `clip-path`, a width, an inset — is read in the element's own pixels, before them. A component that measures
7
+ * one and writes the other divides what it measured by this, so that what it draws is right at any scale and needs no
8
+ * second measurement when the transform ends (nothing reports that end: a transform is not a resize).
9
+ *
10
+ * The laid-out size is the used `width` / `height` of the element's border box, so the element must be a box that has
11
+ * them (not an inline one). An element that is not laid out, or has no size, answers 1 — and 0 on an axis it has a
12
+ * size on and is drawn flat (scaled to nothing: the first frame of a surface that grows from an edge): nothing can be
13
+ * measured through it then, and the caller measures again once it is not.
14
+ */
15
+ export declare function layoutScale(element: Element): {
16
+ x: number;
17
+ y: number;
18
+ };
@@ -0,0 +1,35 @@
1
+ /**
2
+ * How much larger an element is drawn than it is laid out, along each axis: 1 at rest, 0.9 while an ancestor scales it
3
+ * in from 0.9 (a dialog or a popover growing over its open motion), any number under a transformed ancestor.
4
+ *
5
+ * `getBoundingClientRect()` answers in the page's pixels, after every ancestor's transform; what a component writes
6
+ * back — a `clip-path`, a width, an inset — is read in the element's own pixels, before them. A component that measures
7
+ * one and writes the other divides what it measured by this, so that what it draws is right at any scale and needs no
8
+ * second measurement when the transform ends (nothing reports that end: a transform is not a resize).
9
+ *
10
+ * The laid-out size is the used `width` / `height` of the element's border box, so the element must be a box that has
11
+ * them (not an inline one). An element that is not laid out, or has no size, answers 1 — and 0 on an axis it has a
12
+ * size on and is drawn flat (scaled to nothing: the first frame of a surface that grows from an edge): nothing can be
13
+ * measured through it then, and the caller measures again once it is not.
14
+ */
15
+ export function layoutScale(element) {
16
+ const drawn = element.getBoundingClientRect();
17
+ const style = getComputedStyle(element);
18
+ const side = (names) => names.reduce((sum, name) => sum + (Number.parseFloat(style.getPropertyValue(name)) || 0), 0);
19
+ const border = style.boxSizing === 'border-box';
20
+ const laid = {
21
+ x: Number.parseFloat(style.width) + (border ? 0 : side(['padding-left', 'padding-right', 'border-left-width', 'border-right-width'])),
22
+ y: Number.parseFloat(style.height) + (border ? 0 : side(['padding-top', 'padding-bottom', 'border-top-width', 'border-bottom-width'])),
23
+ };
24
+ const ratio = (page, own) => {
25
+ if (!(own > 0))
26
+ return 1;
27
+ if (!(page > 0))
28
+ return 0;
29
+ const scale = page / own;
30
+ // What the two readings differ by at rest is their rounding, not a scale.
31
+ return Math.abs(scale - 1) < 1e-4 ? 1 : scale;
32
+ };
33
+ return { x: ratio(drawn.width, laid.x), y: ratio(drawn.height, laid.y) };
34
+ }
35
+ //# sourceMappingURL=layout-scale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-scale.js","sourceRoot":"","sources":["../../src/primitives/layout-scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,OAAgB;IAC1C,MAAM,KAAK,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAC9C,MAAM,KAAK,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,CAAC,KAAe,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/H,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,KAAK,YAAY,CAAC;IAChD,MAAM,IAAI,GAAG;QACX,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC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