@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,673 @@
1
+ import { LitElement, html, nothing } from 'lit';
2
+ import { ifDefined } from 'lit/directives/if-defined.js';
3
+ import { NativeTextController, report } from '../../primitives/index.js';
4
+ import { AutoHeight } from '../../primitives/auto-height.js';
5
+ import { pressDefaultButton } from '../../primitives/default-button.js';
6
+ import { takeFormDisabled } from '../../primitives/form-disabled.js';
7
+ import { FormSays } from '../../primitives/form-says.js';
8
+ import { hiddenHost } from '../../primitives/hidden.js';
9
+ import { missingValueMessage } from '../../primitives/missing-value.js';
10
+ import { styles } from './embedded-text-input.styles.js';
11
+ import { disabledWaitsWhileFocused } from '../../primitives/disabled-while-focused.js';
12
+ import { focusedAtFirst } from '../../primitives/autofocus.js';
13
+ /**
14
+ * ETI-17: each type as the native element's attributes. A text area has no `type`: there the keyboard is asked for with
15
+ * `inputmode` alone. An address is plain — neither capitalized nor corrected — and, with a telephone number, laid out
16
+ * left to right (ETI-20).
17
+ */
18
+ const TYPES = {
19
+ text: { type: 'text' },
20
+ search: { type: 'search', inputmode: 'search' },
21
+ email: { type: 'text', inputmode: 'email', plain: true, ltr: true },
22
+ url: { type: 'text', inputmode: 'url', plain: true, ltr: true },
23
+ tel: { type: 'tel', inputmode: 'tel', ltr: true },
24
+ };
25
+ const ENTER_KEYS = ['line-break', 'action'];
26
+ /** ETI-20: a letter is what a text's own direction is told by. */
27
+ const STRONG = /\p{L}/u;
28
+ /** ETI-6: an on-screen keyboard cannot be told from a hardware one by any web API. The guess: the primary pointer is coarse and cannot hover. */
29
+ const onScreenKeyboard = () => typeof matchMedia === 'function' && matchMedia('(pointer: coarse) and (hover: none)').matches;
30
+ /** The faces the page has asked for have arrived: the text may wrap otherwise then. One promise for every input of a turn. */
31
+ let faces;
32
+ function facesArrived() {
33
+ if (faces === undefined) {
34
+ faces = typeof document === 'undefined' ? null : (document.fonts?.ready ?? null);
35
+ queueMicrotask(() => (faces = undefined));
36
+ }
37
+ return faces;
38
+ }
39
+ /**
40
+ * The typing alone, for a box that something else draws: the text, a placeholder, the caret and the selection — on one
41
+ * line, or (`multiline`) on lines that wrap, as tall as its lines between `min-rows` and `max-rows` and changing its
42
+ * height with a motion. **It draws no container, fill, edge, padding, label or message, and no focus indication**:
43
+ * whatever holds it — a Tanrei component built from it, or the product's own box — draws the box, shows the focus on
44
+ * the box (`:focus-within`), marks an error, pads the text, names the input (`label`, required: nothing else names it)
45
+ * and decides what its action is. A holder that shows no focus on its box fails WCAG 2.4.7. Where the box is a text
46
+ * field's box, use `<tanrei-text-input>` (or `<tanrei-text-field>`).
47
+ *
48
+ * Contract: specs/embedded-text-input.spec.json.
49
+ *
50
+ * ```html
51
+ * <div class="capsule">
52
+ * <tanrei-embedded-text-input label="Message" placeholder="Write a message" multiline max-rows="6"></tanrei-embedded-text-input>
53
+ * </div>
54
+ * ```
55
+ *
56
+ * Enter: in a single-line input it emits `action`; in a multi-line one it begins a new line, or — `enter-key="action"`
57
+ * — emits `action`, with Shift+Enter for a new line. Ctrl+Enter and Command+Enter emit `action` under both. An input
58
+ * method's Enter never does, and where the primary pointer is coarse and cannot hover Enter is taken for the return
59
+ * key of an on-screen keyboard and begins a new line. `action` carries the value and does nothing more: the input
60
+ * keeps its value, its selection and its focus. Every `keydown` reaches the page before the input reads it, and one
61
+ * whose default was prevented is not read.
62
+ *
63
+ * The height it takes in its layout is the animated one at every frame, so a holder that sizes itself to its content
64
+ * follows without script. `rowschange` says, before the motion, how many lines it is going to show; `rows` reads that
65
+ * number at any time.
66
+ *
67
+ * The name (`label`), the description (`description`), `error`, `required`, `readonly` and `disabled` are plain props
68
+ * written on the native element; it asks no `<tanrei-field>` for any of them. `focusin` and `focusout` are the
69
+ * platform's and leave the element, and the host matches `:focus-within` while it has focus. `focusAt(x, y)` gives it
70
+ * focus with the caret at the point of the text nearest to a point of the window, for a holder that passes a press on
71
+ * its own padding on; `selectionStart`, `selectionEnd`, `setSelectionRange()`, `setRangeText()` and `select()` are the
72
+ * native element's.
73
+ *
74
+ * Form-associated where it stands in a form itself: it submits its value under its `name`, resets to its `value`
75
+ * attribute, is restored, follows a disabled `<fieldset>` and reports a missing value while `required`; a single-line
76
+ * input then submits the form after `action`, unless that was cancelled. In the shadow root of a holder it has no form.
77
+ *
78
+ * Without script, and until the element is defined, a `<textarea>` or an `<input>` the product wrote as its child is
79
+ * the control; when the element is defined it takes that child's text as its first value where `value` was not given,
80
+ * and hides and disables the child.
81
+ *
82
+ * @tag tanrei-embedded-text-input
83
+ * @csspart input - The native text element: an `<input>`, or a `<textarea>` while `multiline`.
84
+ * @attr {string} form - The id of the form the input belongs to, where it stands outside it: the platform's own attribute. The `form` property is read-only and returns the form element.
85
+ * @fires input - The person changed the value: the native element's own `input` event, which leaves the element as it is. Read the new value from `event.target.value`. Never when `value` is set.
86
+ * @fires change - The person committed a changed value: focus left the input, or `action` was emitted. Bubbles.
87
+ * @fires {CustomEvent<TanreiEmbeddedTextInputActionDetail>} action - The person asked for the action of whatever holds the input, by Enter as `enter-key` says or by Ctrl+Enter or Command+Enter. `detail.value` is the value. Bubbles; cancelable — a cancelled one keeps a single-line input from submitting its form.
88
+ * @fires {CustomEvent<TanreiEmbeddedTextInputRowsChangeDetail>} rowschange - The number of lines the input shows is about to change, or it was first drawn: `detail.rows`, and `detail.scrolling` where the text has more lines and scrolls inside. Once per change, before the height moves. Bubbles.
89
+ */
90
+ export class TanreiEmbeddedTextInput extends LitElement {
91
+ static { this.styles = [styles, hiddenHost]; }
92
+ /** ETI-19: a control of the form it stands in. */
93
+ static { this.formAssociated = true; }
94
+ /** Every point of the element is its text: a press anywhere in it, and `focus()`, reach the native element. */
95
+ static { this.shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true }; }
96
+ /**
97
+ * Its documented parts, once: what an element composed around it exports them from (src/primitives/composed.ts, W4).
98
+ *
99
+ * @internal
100
+ */
101
+ static { this.parts = ['input']; }
102
+ static { this.properties = {
103
+ // The default is not reflected, as the text input's is not: nothing reads the attribute, and `type` is a name
104
+ // `:has()` asks about on a page with prose, where a change to it would restyle the subtree.
105
+ type: { type: String, reflect: true, useDefault: true },
106
+ value: { type: String },
107
+ label: { type: String },
108
+ description: { type: String },
109
+ placeholder: { type: String },
110
+ multiline: { type: Boolean, reflect: true },
111
+ minRows: { type: Number, attribute: 'min-rows' },
112
+ maxRows: { type: Number, attribute: 'max-rows' },
113
+ enterKey: { type: String, attribute: 'enter-key' },
114
+ error: { type: Boolean, reflect: true },
115
+ required: { type: Boolean, reflect: true },
116
+ disabled: { type: Boolean, reflect: true },
117
+ readOnly: { type: Boolean, attribute: 'readonly', reflect: true },
118
+ autocomplete: { type: String },
119
+ name: { type: String, reflect: true },
120
+ formDisabled: { state: true },
121
+ }; }
122
+ /** The text. Setting it shows it and fires nothing. The `value` attribute is what a form reset returns to. */
123
+ // An accessor, not a field: the value is the person's at every moment. The native `input` event
124
+ // is composed, and a capturing listener on an ancestor hears it before the element's own listener has run — so what
125
+ // the person has just done to the native element is read from that element.
126
+ get value() {
127
+ const native = this.native_;
128
+ return native && native.value !== this.seen ? native.value : this.held;
129
+ }
130
+ set value(value) {
131
+ // (Lit wraps this accessor and asks for the update itself.)
132
+ this.held = value === null || value === undefined ? '' : String(value);
133
+ }
134
+ constructor() {
135
+ super();
136
+ /** What the value is: chooses the keyboard, autocorrection and autocapitalization, and nothing else. It never validates and never obscures. `search` makes the action key of an on-screen keyboard read as search. A value it does not know behaves as `text`. */
137
+ this.type = 'text';
138
+ /** The value the element holds: what was set, or the person's last edit as the element took it. */
139
+ this.held = '';
140
+ /** The native element, once drawn, and what it held when the element last wrote to it or took from it. */
141
+ this.native_ = null;
142
+ /** The accessible name. Required: the input draws no label and asks no Field for one, so this is the only name it has. Never drawn. */
143
+ this.label = '';
144
+ /** The accessible description, as text: what a help line, an error text or a count that its holder draws says about what is typed. Never drawn. */
145
+ this.description = '';
146
+ /** A hint drawn while the value is empty. Never the name. A multi-line input is as tall as the placeholder's lines, within `min-rows` and `max-rows`. */
147
+ this.placeholder = '';
148
+ /** False: one line that scrolls sideways inside itself. True: lines that wrap, and a height that follows them between `min-rows` and `max-rows`, changed with a motion. */
149
+ this.multiline = false;
150
+ /** The fewest lines a multi-line input is tall (`min-rows`). Anything below 1 is 1. */
151
+ this.minRows = 1;
152
+ /** The most lines a multi-line input is tall (`max-rows`); beyond it the text scrolls inside. 0 is no limit; one below `min-rows` is `min-rows`. */
153
+ this.maxRows = 0;
154
+ /** What Enter does on a hardware keyboard in a multi-line input (`enter-key`). `line-break`: it begins a new line. `action`: it emits `action` and inserts nothing, and Shift+Enter begins a new line. Under both, Ctrl+Enter and Command+Enter emit `action`. A single-line input ignores it: its Enter always emits `action`. A value it does not know behaves as `line-break`. */
155
+ this.enterKey = 'line-break';
156
+ /** Exposes the input as invalid. It draws nothing: marking an error is the drawing of the holder's box. */
157
+ this.error = false;
158
+ /** Exposes the input as required and, in a form of its own, reports a missing value. It draws nothing and validates nothing else. */
159
+ this.required = false;
160
+ /** Not focusable and not editable; the text and the placeholder read as disabled content. The disabled look of the box is its holder's. */
161
+ this.disabled = false;
162
+ /** Focusable, selectable and copyable, not editable (the `readonly` attribute). Drawn as an enabled input. */
163
+ this.readOnly = false;
164
+ /** The browser's autofill hint for the value (an HTML autocomplete token). Empty: the browser decides. */
165
+ this.autocomplete = '';
166
+ /** Web only: the name the value is submitted under, in a form the input stands in itself. */
167
+ this.name = '';
168
+ /** Set by an ancestor `<fieldset disabled>`, or by the element's own attribute (`formDisabledCallback`). */
169
+ this.formDisabled = false;
170
+ this.internals = this.attachInternals();
171
+ /** What it tells its form, said where an element composed around it could hear it (src/primitives/form-says.ts). */
172
+ this.says = new FormSays(this, this.internals);
173
+ /** ETI-2, ETI-4: the value and the native element kept in step around an input method (src/primitives/native-text.ts). */
174
+ this.text = new NativeTextController({
175
+ input: () => this.input,
176
+ value: () => this.shownValue,
177
+ setValue: (text) => this.take(text),
178
+ settled: () => this.height.fit(true),
179
+ });
180
+ /** ETI-7 to ETI-10: the height that follows the lines (src/primitives/auto-height.ts). */
181
+ this.height = new AutoHeight({
182
+ box: () => this.renderRoot?.querySelector('.box') ?? null,
183
+ input: () => this.textarea,
184
+ placeholder: () => this.renderRoot?.querySelector('.hint') ?? null,
185
+ min: () => this.minRows,
186
+ max: () => this.maxRows,
187
+ still: () => this.pressed,
188
+ rows: (rows, scrolling) => {
189
+ this.dispatchEvent(new CustomEvent('rowschange', { bubbles: true, composed: true, detail: { rows, scrolling } }));
190
+ },
191
+ });
192
+ /** ETI-3: the value last committed (when focus arrived, or at the last change). */
193
+ this.committed = '';
194
+ /** ETI-9: a pointer or a touch is held down in the text. */
195
+ this.pressed = false;
196
+ /** ETI-4: a composition ended in this task: the key that is reported after it is still the input method's. */
197
+ this.justComposed = false;
198
+ /** ETI-25: the selection of the native element that `multiline` is about to replace, where it had focus. */
199
+ this.carried = null;
200
+ this.watched = null;
201
+ /** ETI-27: the product's own text element, written as a child for a page without script. */
202
+ this.children$ = typeof MutationObserver === 'undefined' ? null : new MutationObserver(() => this.adopt());
203
+ /** ETI-27: `value` was given — as an attribute or as a property — so a child's text is not taken. */
204
+ this.valueGiven = false;
205
+ this.drawn = false;
206
+ /**
207
+ * ETI-2: the person changed the value. The native `input` event is composed, so it leaves the shadow root by itself,
208
+ * after the element has taken the new value. ETI-4: during a composition the value follows the element and nothing
209
+ * is written back.
210
+ */
211
+ this.onInput = (event) => {
212
+ const input = event.target;
213
+ if (this.text.composingInput(event))
214
+ return;
215
+ this.take(input.value);
216
+ // ETI-8: a height that follows the value moves — at once while a pointer is held down in the text (ETI-9).
217
+ this.height.fit(true);
218
+ this.sync();
219
+ };
220
+ /** The browser's own `change` is not the input's (ETI-3 decides when a value is committed). */
221
+ this.onNativeChange = (event) => event.stopPropagation();
222
+ this.onFocusIn = () => {
223
+ this.committed = this.value;
224
+ this.ownerDocument.defaultView?.addEventListener('keydown', this.onKey);
225
+ };
226
+ /** ETI-3: focus left with a changed value — `change`, once. */
227
+ this.onFocusOut = () => {
228
+ this.ownerDocument.defaultView?.removeEventListener('keydown', this.onKey);
229
+ this.commit();
230
+ };
231
+ this.onCompositionStart = () => this.text.onCompositionStart();
232
+ /** ETI-4: where the platform reports the committing Enter only after the composition has ended, it is still the composition's. */
233
+ this.onCompositionEnd = (event) => {
234
+ this.text.onCompositionEnd(event);
235
+ this.justComposed = true;
236
+ clearTimeout(this.composedTimer);
237
+ this.composedTimer = setTimeout(() => (this.justComposed = false), 0);
238
+ };
239
+ /**
240
+ * ETI-6, ETI-21: a key pressed in the input, read where it has passed every element around it — at the window, the
241
+ * last place it reaches — so that whatever holds the input has seen it first; one a holder cancelled is not read.
242
+ * The input gives a meaning to Enter alone: Tab moves focus as the platform has it, and Escape does nothing.
243
+ */
244
+ this.onKey = (event) => {
245
+ const input = this.input;
246
+ if (event.key !== 'Enter' || event.defaultPrevented || !input || !event.composedPath().includes(input))
247
+ return;
248
+ // ETI-4: an input method's Enter chooses a candidate or commits; it is never a request for the action.
249
+ if (event.isComposing || this.text.composing || event.keyCode === 229 || this.justComposed)
250
+ return;
251
+ // ETI-15, ETI-16: no key of a disabled or a read-only input asks for the action.
252
+ if (this.inert_ || this.readOnly)
253
+ return;
254
+ const chord = event.ctrlKey || event.metaKey;
255
+ if (this.multiline) {
256
+ const acts = chord || (this.enterKey === 'action' && !event.shiftKey && !event.altKey && !onScreenKeyboard());
257
+ if (!acts)
258
+ return;
259
+ // The action inserts nothing.
260
+ event.preventDefault();
261
+ this.act();
262
+ return;
263
+ }
264
+ // A single line: its action key. Then, as a control of a form itself, the form's submission through its default
265
+ // button (BTN-30), unless the action was cancelled. In the shadow root of a holder it has no form.
266
+ const proceed = this.act();
267
+ const form = proceed ? this.internals.form : null;
268
+ if (form) {
269
+ event.preventDefault();
270
+ pressDefaultButton(form);
271
+ }
272
+ };
273
+ // ─── Presses (ETI-9, ETI-12) ──────────────────────────────────────────────────────────────────────────────────
274
+ this.onPointerUp = () => {
275
+ this.pressed = false;
276
+ const view = this.ownerDocument.defaultView;
277
+ view?.removeEventListener('pointerup', this.onPointerUp, true);
278
+ view?.removeEventListener('pointercancel', this.onPointerUp, true);
279
+ };
280
+ /** ETI-9: while a pointer or a touch is held down in the text its height changes at once. */
281
+ this.onHostPointerDown = () => {
282
+ if (this.inert_)
283
+ return;
284
+ this.pressed = true;
285
+ const view = this.ownerDocument.defaultView;
286
+ view?.addEventListener('pointerup', this.onPointerUp, true);
287
+ view?.addEventListener('pointercancel', this.onPointerUp, true);
288
+ };
289
+ /**
290
+ * ETI-12: a press in the hit area beyond the lines — whose target is the host itself — is a press on the text: focus,
291
+ * and the caret at the nearest point. No pressed state and no feedback: a press on a place to type is not an action.
292
+ * The press would give the native element focus by itself (the shadow root delegates it) and leave the caret where
293
+ * it last stood: its default is prevented and the caret is placed here.
294
+ */
295
+ this.onHostMouseDown = (event) => {
296
+ if (this.inert_ || event.button !== 0 || event.composedPath()[0] !== this)
297
+ return;
298
+ event.preventDefault();
299
+ this.focusAt(event.clientX, event.clientY);
300
+ };
301
+ this.addEventListener('pointerdown', this.onHostPointerDown);
302
+ this.addEventListener('mousedown', this.onHostMouseDown);
303
+ this.addEventListener('focusin', this.onFocusIn);
304
+ this.addEventListener('focusout', this.onFocusOut);
305
+ }
306
+ // ─── What it reads ────────────────────────────────────────────────────────────────────────────────────────────
307
+ /** The native text element, once rendered. */
308
+ get input() {
309
+ return this.renderRoot?.querySelector('.input') ?? null;
310
+ }
311
+ get textarea() {
312
+ const input = this.input;
313
+ return input instanceof HTMLTextAreaElement ? input : null;
314
+ }
315
+ /** ETI-15: disabled by its own `disabled` or by its form. */
316
+ get inert_() {
317
+ return this.disabled || this.formDisabled;
318
+ }
319
+ /** ETI-17: the type it behaves as; one it does not know is text. */
320
+ get kind() {
321
+ return TYPES[this.type] ?? TYPES.text;
322
+ }
323
+ /**
324
+ * The value as the native element holds it: a single-line element keeps no line break and a text area writes every
325
+ * line break as one character. The element's own value is not changed for it (ETI-25: the line breaks are there
326
+ * again when `multiline` returns).
327
+ */
328
+ get shownValue() {
329
+ return this.multiline ? this.held.replace(/\r\n?/g, '\n') : this.held.replace(/[\r\n]/g, '');
330
+ }
331
+ /** The number of lines the input shows, or is on its way to show: what the last `rowschange` carried. 1 for a single-line input. Read-only. */
332
+ get rows() {
333
+ return this.height.rows || 1;
334
+ }
335
+ // ─── The selection (ETI-21) ───────────────────────────────────────────────────────────────────────────────────
336
+ /** Where the selection begins, as the native element's `selectionStart`: the caret's place where nothing is selected. */
337
+ get selectionStart() {
338
+ return this.input?.selectionStart ?? null;
339
+ }
340
+ set selectionStart(value) {
341
+ const input = this.input;
342
+ if (input)
343
+ input.selectionStart = value;
344
+ }
345
+ /** Where the selection ends, as the native element's `selectionEnd`. */
346
+ get selectionEnd() {
347
+ return this.input?.selectionEnd ?? null;
348
+ }
349
+ set selectionEnd(value) {
350
+ const input = this.input;
351
+ if (input)
352
+ input.selectionEnd = value;
353
+ }
354
+ /** Sets the selection, as the native element's `setSelectionRange()`. */
355
+ setSelectionRange(start, end, direction) {
356
+ this.input?.setSelectionRange(start, end, direction);
357
+ }
358
+ /**
359
+ * Replaces a range of the text — the selection, where no range is given — as the native element's `setRangeText()`:
360
+ * what an action of the holder's inserts at the caret. The value is then the product's: no `input` is emitted.
361
+ */
362
+ setRangeText(replacement, start, end, selectionMode) {
363
+ const input = this.input;
364
+ if (!input)
365
+ return;
366
+ if (start === undefined || end === undefined)
367
+ input.setRangeText(replacement);
368
+ else
369
+ input.setRangeText(replacement, start, end, selectionMode);
370
+ this.take(input.value);
371
+ this.height.fit(true);
372
+ this.sync();
373
+ }
374
+ /** Selects the whole value, as the native element's `select()`. */
375
+ select() {
376
+ this.input?.select();
377
+ }
378
+ /**
379
+ * ETI-12: gives the input focus and places the caret at the point of its text nearest to a point of the window
380
+ * (`clientX`, `clientY`) — what a holder calls for a press on its own box outside its other controls. Where the
381
+ * browser cannot say which character stands at a point, the caret goes to the start of the text for a point above
382
+ * or before it and to its end otherwise. Does nothing while disabled.
383
+ */
384
+ focusAt(clientX, clientY) {
385
+ const input = this.input;
386
+ if (!input || this.inert_)
387
+ return;
388
+ input.focus();
389
+ const box = input.getBoundingClientRect();
390
+ if (!box.width || !box.height)
391
+ return;
392
+ // The nearest point of the text's own box: for a point above or below it, the middle of its first or its last line.
393
+ const half = Math.min(box.height, Number.parseFloat(getComputedStyle(input).lineHeight) || box.height) / 2;
394
+ const x = Math.min(Math.max(clientX, box.left + 1), box.right - 1);
395
+ const y = Math.min(Math.max(clientY, box.top + half), box.bottom - half);
396
+ let offset = null;
397
+ const doc = this.ownerDocument;
398
+ try {
399
+ const at = this.shadowRoot ? doc.caretPositionFromPoint?.(x, y, { shadowRoots: [this.shadowRoot] }) : null;
400
+ if (at && at.offsetNode === input)
401
+ offset = at.offset;
402
+ }
403
+ catch {
404
+ // A browser that cannot say: the fallback below.
405
+ }
406
+ if (offset === null) {
407
+ const rtl = getComputedStyle(input).direction === 'rtl';
408
+ const before = clientY < box.top || (clientY <= box.bottom && (rtl ? clientX > box.right : clientX < box.left));
409
+ offset = before ? 0 : input.value.length;
410
+ }
411
+ try {
412
+ input.setSelectionRange(offset, offset);
413
+ }
414
+ catch {
415
+ // A type without a selection API: the browser keeps the caret where it can.
416
+ }
417
+ }
418
+ // ─── Form (ETI-19) ────────────────────────────────────────────────────────────────────────────────────────────
419
+ /** The form it belongs to, if any: none in the shadow root of a holder. */
420
+ get form() {
421
+ return this.internals.form;
422
+ }
423
+ /** The native constraint validity: `valueMissing` while it is required and empty. */
424
+ get validity() {
425
+ return this.internals.validity;
426
+ }
427
+ get validationMessage() {
428
+ return this.internals.validationMessage;
429
+ }
430
+ get willValidate() {
431
+ return this.internals.willValidate;
432
+ }
433
+ checkValidity() {
434
+ return this.internals.checkValidity();
435
+ }
436
+ reportValidity() {
437
+ return this.internals.reportValidity();
438
+ }
439
+ formResetCallback() {
440
+ this.value = this.getAttribute('value') ?? '';
441
+ this.committed = this.held;
442
+ }
443
+ formStateRestoreCallback(state) {
444
+ this.value = typeof state === 'string' ? state : '';
445
+ }
446
+ formDisabledCallback(disabled) {
447
+ takeFormDisabled(this, disabled, (value) => (this.formDisabled = value));
448
+ }
449
+ /** ETI-19: what it submits and what it is restored from, and a missing value while it is required and empty. */
450
+ sync() {
451
+ const value = this.value;
452
+ this.says.value(this.inert_ ? null : value, value);
453
+ const input = this.input;
454
+ if (!this.required || value || this.inert_ || this.readOnly)
455
+ this.says.validity();
456
+ else
457
+ this.says.validity({ valueMissing: true }, missingValueMessage('text', { errorText: '', requiredText: '', label: this.label }), input ?? undefined);
458
+ }
459
+ // ─── The native element's events ──────────────────────────────────────────────────────────────────────────────
460
+ /** ETI-2: the person gave the native element this text; it is the value. */
461
+ take(text) {
462
+ this.seen = this.input?.value;
463
+ const before = this.held;
464
+ this.held = text;
465
+ this.requestUpdate('value', before);
466
+ }
467
+ /** ETI-3: `change` when the value differs from the one last committed. Never while disabled or read-only (ETI-15, ETI-16), and never during a composition (ETI-4). */
468
+ commit() {
469
+ if (this.inert_ || this.readOnly || this.text.composing)
470
+ return;
471
+ const value = this.value;
472
+ if (value === this.committed)
473
+ return;
474
+ this.committed = value;
475
+ this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
476
+ }
477
+ /** ETI-6: the change it causes, then `action` with the value — and nothing else: the value, the selection and the focus stay. Answers whether the action was let through. */
478
+ act() {
479
+ this.commit();
480
+ this.sync();
481
+ return this.dispatchEvent(new CustomEvent('action', { bubbles: true, composed: true, cancelable: true, detail: { value: this.value } }));
482
+ }
483
+ // ─── Without script (ETI-27) ──────────────────────────────────────────────────────────────────────────────────
484
+ /**
485
+ * ETI-27: the platform's own text element that the product wrote as a child is the control until the element is
486
+ * defined. Now its text is the first value where `value` was not given, and it is hidden and disabled, so that the
487
+ * form submits the input alone.
488
+ */
489
+ adopt() {
490
+ for (const child of this.children) {
491
+ if (!(child instanceof HTMLTextAreaElement || child instanceof HTMLInputElement) || child.hasAttribute('data-tanrei-adopted'))
492
+ continue;
493
+ child.setAttribute('data-tanrei-adopted', '');
494
+ if (!this.valueGiven && !this.held && child.value) {
495
+ this.value = child.value;
496
+ this.committed = this.held;
497
+ }
498
+ child.hidden = true;
499
+ child.disabled = true;
500
+ }
501
+ }
502
+ // ─── Lifecycle ────────────────────────────────────────────────────────────────────────────────────────────────
503
+ connectedCallback() {
504
+ super.connectedCallback();
505
+ this.valueGiven ||= this.hasAttribute('value');
506
+ this.adopt();
507
+ this.children$?.observe(this, { childList: true });
508
+ // ETI-19: a control of its form from the moment it stands in it, as the platform's own are — before it first draws.
509
+ this.sync();
510
+ // Drawn again after it was taken out: its native element is watched again.
511
+ if (this.hasUpdated)
512
+ this.watch();
513
+ }
514
+ disconnectedCallback() {
515
+ super.disconnectedCallback();
516
+ this.children$?.disconnect();
517
+ this.sizes?.disconnect();
518
+ this.watched = null;
519
+ clearTimeout(this.composedTimer);
520
+ this.justComposed = false;
521
+ this.ownerDocument.defaultView?.removeEventListener('keydown', this.onKey);
522
+ this.onPointerUp();
523
+ }
524
+ /** ETI-9: a width, a text size or a text style that changed is a height that changes at once; so is being shown again. */
525
+ watch() {
526
+ const input = this.textarea;
527
+ if (input === this.watched)
528
+ return;
529
+ this.sizes?.disconnect();
530
+ this.watched = input;
531
+ if (!input || typeof ResizeObserver === 'undefined')
532
+ return;
533
+ this.sizes ??= new ResizeObserver(() => this.height.relaid());
534
+ this.sizes.observe(input);
535
+ }
536
+ willUpdate(changed) {
537
+ if (changed.has('value') && this.hasUpdated)
538
+ this.valueGiven = true;
539
+ // ETI-25: `multiline` replaces the native element; the selection and the focus of the one that leaves go to the next.
540
+ if (changed.has('multiline') && this.hasUpdated) {
541
+ const input = this.input;
542
+ const focused = !!input && this.shadowRoot?.activeElement === input;
543
+ this.carried = focused ? { start: input.selectionStart ?? 0, end: input.selectionEnd ?? 0 } : null;
544
+ }
545
+ }
546
+ updated(changed) {
547
+ const input = this.input;
548
+ const replaced = input !== this.native_;
549
+ // ETI-4: never written into a composition; a value set meanwhile waits for its end.
550
+ const written = this.text.show();
551
+ this.native_ = input;
552
+ this.seen = input?.value;
553
+ if (input && written && !replaced && this.shadowRoot?.activeElement === input) {
554
+ // ETI-2: a value set while it has focus leaves the caret at its end.
555
+ const end = input.value.length;
556
+ try {
557
+ input.setSelectionRange(end, end);
558
+ }
559
+ catch {
560
+ // A type without a selection API.
561
+ }
562
+ }
563
+ if (input && replaced && this.carried) {
564
+ const { start, end } = this.carried;
565
+ input.focus();
566
+ try {
567
+ input.setSelectionRange(Math.min(start, input.value.length), Math.min(end, input.value.length));
568
+ }
569
+ catch {
570
+ // A type without a selection API.
571
+ }
572
+ }
573
+ this.carried = null;
574
+ // ETI-8, ETI-9: a height that follows the value moves; the first one, and one that follows anything else, does not.
575
+ if (!this.textarea)
576
+ this.height.single();
577
+ else if (replaced || !this.drawn || changed.has('minRows') || changed.has('maxRows') || changed.has('multiline') || changed.has('placeholder') || changed.has('type'))
578
+ this.height.fit(false);
579
+ else if (written)
580
+ this.height.fit(true);
581
+ this.watch();
582
+ if (!this.drawn) {
583
+ this.drawn = true;
584
+ // The text may be laid out again when its face arrives: the height follows, at once.
585
+ if (this.textarea)
586
+ void facesArrived()?.then(() => this.isConnected && this.height.fit(false));
587
+ }
588
+ this.sync();
589
+ this.reports(changed);
590
+ }
591
+ reports(changed) {
592
+ if (changed.has('type') && !(this.type in TYPES))
593
+ report(this, 'ETI-17', `type "${String(this.type)}" is not a type of the embedded text input; it behaves as "text"`);
594
+ if (changed.has('enterKey') && !ENTER_KEYS.includes(this.enterKey))
595
+ report(this, 'ETI-6', `enter-key "${String(this.enterKey)}" is not a value of enterKey; Enter begins a new line, as with "line-break"`);
596
+ if (!this.label.trim())
597
+ report(this, 'ETI-13', 'label is empty, so the input has no accessible name: nothing is drawn that could name it and it asks no field; give it a label');
598
+ if (this.hasAttribute('aria-label') || this.hasAttribute('aria-labelledby'))
599
+ report(this, 'ETI-13', 'aria-label and aria-labelledby on the element name nothing: it has no role; name it with label');
600
+ }
601
+ render() {
602
+ const kind = this.kind;
603
+ const inert = this.inert_;
604
+ // ETI-20: typed text is laid out by its own direction once it has a letter to tell it by. Until then the input
605
+ // keeps the layout's direction, so the caret and the placeholder stand at the start edge (an empty dir="auto"
606
+ // element is left to right in every layout). An address and a telephone number are left to right.
607
+ const own = kind.ltr ? 'ltr' : STRONG.test(this.held) ? 'auto' : undefined;
608
+ const label = this.label.trim();
609
+ const description = this.description.trim();
610
+ const multiline = this.multiline;
611
+ // ETI-7: the fewest lines, for the frame before the routine has measured.
612
+ const least = Number.isFinite(Number(this.minRows)) && Number(this.minRows) >= 1 ? Math.floor(Number(this.minRows)) : 1;
613
+ const control = multiline
614
+ ? html `<textarea
615
+ part="input"
616
+ class="input"
617
+ rows="1"
618
+ style=${`--_rows-min: ${least}`}
619
+ inputmode=${ifDefined(kind.inputmode)}
620
+ enterkeyhint="enter"
621
+ autocapitalize=${kind.plain ? 'none' : nothing}
622
+ autocorrect=${kind.plain ? 'off' : nothing}
623
+ spellcheck=${kind.plain ? 'false' : nothing}
624
+ dir=${ifDefined(own)}
625
+ .placeholder=${this.placeholder}
626
+ ?disabled=${inert}
627
+ ?readonly=${this.readOnly}
628
+ aria-label=${label || nothing}
629
+ aria-description=${description || nothing}
630
+ aria-invalid=${this.error ? 'true' : nothing}
631
+ aria-required=${this.required ? 'true' : nothing}
632
+ aria-readonly=${this.readOnly ? 'true' : nothing}
633
+ autocomplete=${this.autocomplete || nothing}
634
+ @input=${this.onInput}
635
+ @change=${this.onNativeChange}
636
+ @compositionstart=${this.onCompositionStart}
637
+ @compositionend=${this.onCompositionEnd}
638
+ ></textarea>`
639
+ : html `<input
640
+ part="input"
641
+ class="input"
642
+ type=${kind.type}
643
+ inputmode=${ifDefined(kind.type === 'text' ? kind.inputmode : undefined)}
644
+ autocapitalize=${kind.plain ? 'none' : nothing}
645
+ autocorrect=${kind.plain ? 'off' : nothing}
646
+ spellcheck=${kind.plain ? 'false' : nothing}
647
+ dir=${ifDefined(own)}
648
+ .placeholder=${this.placeholder}
649
+ ?disabled=${inert}
650
+ ?readonly=${this.readOnly}
651
+ aria-label=${label || nothing}
652
+ aria-description=${description || nothing}
653
+ aria-invalid=${this.error ? 'true' : nothing}
654
+ aria-required=${this.required ? 'true' : nothing}
655
+ aria-readonly=${this.readOnly ? 'true' : nothing}
656
+ autocomplete=${this.autocomplete || nothing}
657
+ @input=${this.onInput}
658
+ @change=${this.onNativeChange}
659
+ @compositionstart=${this.onCompositionStart}
660
+ @compositionend=${this.onCompositionEnd}
661
+ />`;
662
+ // ETI-22: the placeholder's lines are measured on a copy, which is drawn nowhere and read by nothing.
663
+ const hint = multiline && this.placeholder ? html `<div class="hint" aria-hidden="true">${this.placeholder}</div>` : nothing;
664
+ return html `<div class="box" @transitionend=${this.height.ended} @transitioncancel=${this.height.ended}>${control}${hint}</div>`;
665
+ }
666
+ }
667
+ // Its `disabled` attribute, written while it holds focus, waits until focus has left: a frame at most.
668
+ disabledWaitsWhileFocused(TanreiEmbeddedTextInput);
669
+ // `autofocus` on it gives it focus when the page first loads too (src/primitives/autofocus.ts).
670
+ focusedAtFirst(TanreiEmbeddedTextInput);
671
+ if (!customElements.get('tanrei-embedded-text-input'))
672
+ customElements.define('tanrei-embedded-text-input', TanreiEmbeddedTextInput);
673
+ //# sourceMappingURL=embedded-text-input.js.map