@tartaguti/ui-components 0.0.0-stage → 0.2.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 (392) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +192 -2
  4. package/THIRD-PARTY-NOTICES.md +29 -0
  5. package/custom-elements.json +16899 -0
  6. package/dist/accordion/tt-accordion-item.d.ts +32 -0
  7. package/dist/accordion/tt-accordion-item.d.ts.map +1 -0
  8. package/dist/accordion/tt-accordion-item.js +247 -0
  9. package/dist/accordion/tt-accordion-item.js.map +1 -0
  10. package/dist/accordion/tt-accordion.d.ts +28 -0
  11. package/dist/accordion/tt-accordion.d.ts.map +1 -0
  12. package/dist/accordion/tt-accordion.js +148 -0
  13. package/dist/accordion/tt-accordion.js.map +1 -0
  14. package/dist/bento/tt-bento-item.d.ts +35 -0
  15. package/dist/bento/tt-bento-item.d.ts.map +1 -0
  16. package/dist/bento/tt-bento-item.js +201 -0
  17. package/dist/bento/tt-bento-item.js.map +1 -0
  18. package/dist/bento/tt-bento.d.ts +25 -0
  19. package/dist/bento/tt-bento.d.ts.map +1 -0
  20. package/dist/bento/tt-bento.js +314 -0
  21. package/dist/bento/tt-bento.js.map +1 -0
  22. package/dist/floating.d.ts +61 -0
  23. package/dist/floating.d.ts.map +1 -0
  24. package/dist/floating.js +120 -0
  25. package/dist/floating.js.map +1 -0
  26. package/dist/index.d.ts +92 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +96 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/interaction/tt-draggable.d.ts +29 -0
  31. package/dist/interaction/tt-draggable.d.ts.map +1 -0
  32. package/dist/interaction/tt-draggable.js +66 -0
  33. package/dist/interaction/tt-draggable.js.map +1 -0
  34. package/dist/interaction/tt-droppable.d.ts +37 -0
  35. package/dist/interaction/tt-droppable.d.ts.map +1 -0
  36. package/dist/interaction/tt-droppable.js +108 -0
  37. package/dist/interaction/tt-droppable.js.map +1 -0
  38. package/dist/interaction/tt-resizable.d.ts +45 -0
  39. package/dist/interaction/tt-resizable.d.ts.map +1 -0
  40. package/dist/interaction/tt-resizable.js +210 -0
  41. package/dist/interaction/tt-resizable.js.map +1 -0
  42. package/dist/interaction/tt-reveal.d.ts +54 -0
  43. package/dist/interaction/tt-reveal.d.ts.map +1 -0
  44. package/dist/interaction/tt-reveal.js +302 -0
  45. package/dist/interaction/tt-reveal.js.map +1 -0
  46. package/dist/motion.d.ts +8 -0
  47. package/dist/motion.d.ts.map +1 -0
  48. package/dist/motion.js +49 -0
  49. package/dist/motion.js.map +1 -0
  50. package/dist/overlay.d.ts +7 -0
  51. package/dist/overlay.d.ts.map +1 -0
  52. package/dist/overlay.js +121 -0
  53. package/dist/overlay.js.map +1 -0
  54. package/dist/safe-url.d.ts +14 -0
  55. package/dist/safe-url.d.ts.map +1 -0
  56. package/dist/safe-url.js +46 -0
  57. package/dist/safe-url.js.map +1 -0
  58. package/dist/scroll-lock.d.ts +22 -0
  59. package/dist/scroll-lock.d.ts.map +1 -0
  60. package/dist/scroll-lock.js +56 -0
  61. package/dist/scroll-lock.js.map +1 -0
  62. package/dist/sidebar/tt-menu-group.d.ts +69 -0
  63. package/dist/sidebar/tt-menu-group.d.ts.map +1 -0
  64. package/dist/sidebar/tt-menu-group.js +358 -0
  65. package/dist/sidebar/tt-menu-group.js.map +1 -0
  66. package/dist/sidebar/tt-menu-item.d.ts +70 -0
  67. package/dist/sidebar/tt-menu-item.d.ts.map +1 -0
  68. package/dist/sidebar/tt-menu-item.js +502 -0
  69. package/dist/sidebar/tt-menu-item.js.map +1 -0
  70. package/dist/sidebar/tt-sidebar-footer.d.ts +39 -0
  71. package/dist/sidebar/tt-sidebar-footer.d.ts.map +1 -0
  72. package/dist/sidebar/tt-sidebar-footer.js +205 -0
  73. package/dist/sidebar/tt-sidebar-footer.js.map +1 -0
  74. package/dist/sidebar/tt-sidebar-header.d.ts +31 -0
  75. package/dist/sidebar/tt-sidebar-header.d.ts.map +1 -0
  76. package/dist/sidebar/tt-sidebar-header.js +150 -0
  77. package/dist/sidebar/tt-sidebar-header.js.map +1 -0
  78. package/dist/sidebar/tt-sidebar.d.ts +72 -0
  79. package/dist/sidebar/tt-sidebar.d.ts.map +1 -0
  80. package/dist/sidebar/tt-sidebar.js +539 -0
  81. package/dist/sidebar/tt-sidebar.js.map +1 -0
  82. package/dist/sr-only.d.ts +15 -0
  83. package/dist/sr-only.d.ts.map +1 -0
  84. package/dist/sr-only.js +27 -0
  85. package/dist/sr-only.js.map +1 -0
  86. package/dist/tokens.css +1124 -0
  87. package/dist/tt-alert.d.ts +26 -0
  88. package/dist/tt-alert.d.ts.map +1 -0
  89. package/dist/tt-alert.js +165 -0
  90. package/dist/tt-alert.js.map +1 -0
  91. package/dist/tt-aspect-ratio.d.ts +40 -0
  92. package/dist/tt-aspect-ratio.d.ts.map +1 -0
  93. package/dist/tt-aspect-ratio.js +98 -0
  94. package/dist/tt-aspect-ratio.js.map +1 -0
  95. package/dist/tt-auth.d.ts +75 -0
  96. package/dist/tt-auth.d.ts.map +1 -0
  97. package/dist/tt-auth.js +520 -0
  98. package/dist/tt-auth.js.map +1 -0
  99. package/dist/tt-avatar.d.ts +26 -0
  100. package/dist/tt-avatar.d.ts.map +1 -0
  101. package/dist/tt-avatar.js +169 -0
  102. package/dist/tt-avatar.js.map +1 -0
  103. package/dist/tt-badge.d.ts +36 -0
  104. package/dist/tt-badge.d.ts.map +1 -0
  105. package/dist/tt-badge.js +135 -0
  106. package/dist/tt-badge.js.map +1 -0
  107. package/dist/tt-breadcrumbs.d.ts +22 -0
  108. package/dist/tt-breadcrumbs.d.ts.map +1 -0
  109. package/dist/tt-breadcrumbs.js +144 -0
  110. package/dist/tt-breadcrumbs.js.map +1 -0
  111. package/dist/tt-button-group.d.ts +32 -0
  112. package/dist/tt-button-group.d.ts.map +1 -0
  113. package/dist/tt-button-group.js +132 -0
  114. package/dist/tt-button-group.js.map +1 -0
  115. package/dist/tt-button.d.ts +31 -0
  116. package/dist/tt-button.d.ts.map +1 -0
  117. package/dist/tt-button.js +483 -0
  118. package/dist/tt-button.js.map +1 -0
  119. package/dist/tt-card.d.ts +26 -0
  120. package/dist/tt-card.d.ts.map +1 -0
  121. package/dist/tt-card.js +429 -0
  122. package/dist/tt-card.js.map +1 -0
  123. package/dist/tt-chart.d.ts +36 -0
  124. package/dist/tt-chart.d.ts.map +1 -0
  125. package/dist/tt-chart.js +332 -0
  126. package/dist/tt-chart.js.map +1 -0
  127. package/dist/tt-checkbox-group.d.ts +38 -0
  128. package/dist/tt-checkbox-group.d.ts.map +1 -0
  129. package/dist/tt-checkbox-group.js +243 -0
  130. package/dist/tt-checkbox-group.js.map +1 -0
  131. package/dist/tt-checkbox.d.ts +35 -0
  132. package/dist/tt-checkbox.d.ts.map +1 -0
  133. package/dist/tt-checkbox.js +354 -0
  134. package/dist/tt-checkbox.js.map +1 -0
  135. package/dist/tt-code-block.d.ts +37 -0
  136. package/dist/tt-code-block.d.ts.map +1 -0
  137. package/dist/tt-code-block.js +409 -0
  138. package/dist/tt-code-block.js.map +1 -0
  139. package/dist/tt-collapsible.d.ts +71 -0
  140. package/dist/tt-collapsible.d.ts.map +1 -0
  141. package/dist/tt-collapsible.js +206 -0
  142. package/dist/tt-collapsible.js.map +1 -0
  143. package/dist/tt-combobox.d.ts +107 -0
  144. package/dist/tt-combobox.d.ts.map +1 -0
  145. package/dist/tt-combobox.js +816 -0
  146. package/dist/tt-combobox.js.map +1 -0
  147. package/dist/tt-company-card.d.ts +30 -0
  148. package/dist/tt-company-card.d.ts.map +1 -0
  149. package/dist/tt-company-card.js +382 -0
  150. package/dist/tt-company-card.js.map +1 -0
  151. package/dist/tt-comparison-table.d.ts +59 -0
  152. package/dist/tt-comparison-table.d.ts.map +1 -0
  153. package/dist/tt-comparison-table.js +441 -0
  154. package/dist/tt-comparison-table.js.map +1 -0
  155. package/dist/tt-component-doc.d.ts +63 -0
  156. package/dist/tt-component-doc.d.ts.map +1 -0
  157. package/dist/tt-component-doc.js +585 -0
  158. package/dist/tt-component-doc.js.map +1 -0
  159. package/dist/tt-confirm.d.ts +45 -0
  160. package/dist/tt-confirm.d.ts.map +1 -0
  161. package/dist/tt-confirm.js +151 -0
  162. package/dist/tt-confirm.js.map +1 -0
  163. package/dist/tt-contact-list.d.ts +18 -0
  164. package/dist/tt-contact-list.d.ts.map +1 -0
  165. package/dist/tt-contact-list.js +101 -0
  166. package/dist/tt-contact-list.js.map +1 -0
  167. package/dist/tt-copy-button.d.ts +25 -0
  168. package/dist/tt-copy-button.d.ts.map +1 -0
  169. package/dist/tt-copy-button.js +194 -0
  170. package/dist/tt-copy-button.js.map +1 -0
  171. package/dist/tt-data-table.d.ts +96 -0
  172. package/dist/tt-data-table.d.ts.map +1 -0
  173. package/dist/tt-data-table.js +812 -0
  174. package/dist/tt-data-table.js.map +1 -0
  175. package/dist/tt-divider.d.ts +19 -0
  176. package/dist/tt-divider.d.ts.map +1 -0
  177. package/dist/tt-divider.js +104 -0
  178. package/dist/tt-divider.js.map +1 -0
  179. package/dist/tt-drawer.d.ts +38 -0
  180. package/dist/tt-drawer.d.ts.map +1 -0
  181. package/dist/tt-drawer.js +433 -0
  182. package/dist/tt-drawer.js.map +1 -0
  183. package/dist/tt-dropdown-menu.d.ts +57 -0
  184. package/dist/tt-dropdown-menu.d.ts.map +1 -0
  185. package/dist/tt-dropdown-menu.js +631 -0
  186. package/dist/tt-dropdown-menu.js.map +1 -0
  187. package/dist/tt-empty-state.d.ts +13 -0
  188. package/dist/tt-empty-state.d.ts.map +1 -0
  189. package/dist/tt-empty-state.js +94 -0
  190. package/dist/tt-empty-state.js.map +1 -0
  191. package/dist/tt-example.d.ts +33 -0
  192. package/dist/tt-example.d.ts.map +1 -0
  193. package/dist/tt-example.js +250 -0
  194. package/dist/tt-example.js.map +1 -0
  195. package/dist/tt-file-upload.d.ts +85 -0
  196. package/dist/tt-file-upload.d.ts.map +1 -0
  197. package/dist/tt-file-upload.js +662 -0
  198. package/dist/tt-file-upload.js.map +1 -0
  199. package/dist/tt-filter.d.ts +62 -0
  200. package/dist/tt-filter.d.ts.map +1 -0
  201. package/dist/tt-filter.js +393 -0
  202. package/dist/tt-filter.js.map +1 -0
  203. package/dist/tt-form.d.ts +33 -0
  204. package/dist/tt-form.d.ts.map +1 -0
  205. package/dist/tt-form.js +202 -0
  206. package/dist/tt-form.js.map +1 -0
  207. package/dist/tt-grid.d.ts +22 -0
  208. package/dist/tt-grid.d.ts.map +1 -0
  209. package/dist/tt-grid.js +106 -0
  210. package/dist/tt-grid.js.map +1 -0
  211. package/dist/tt-icon.d.ts +20 -0
  212. package/dist/tt-icon.d.ts.map +1 -0
  213. package/dist/tt-icon.js +510 -0
  214. package/dist/tt-icon.js.map +1 -0
  215. package/dist/tt-image.d.ts +59 -0
  216. package/dist/tt-image.d.ts.map +1 -0
  217. package/dist/tt-image.js +314 -0
  218. package/dist/tt-image.js.map +1 -0
  219. package/dist/tt-inbox.d.ts +45 -0
  220. package/dist/tt-inbox.d.ts.map +1 -0
  221. package/dist/tt-inbox.js +275 -0
  222. package/dist/tt-inbox.js.map +1 -0
  223. package/dist/tt-input.d.ts +43 -0
  224. package/dist/tt-input.d.ts.map +1 -0
  225. package/dist/tt-input.js +476 -0
  226. package/dist/tt-input.js.map +1 -0
  227. package/dist/tt-kbd.d.ts +39 -0
  228. package/dist/tt-kbd.d.ts.map +1 -0
  229. package/dist/tt-kbd.js +145 -0
  230. package/dist/tt-kbd.js.map +1 -0
  231. package/dist/tt-key-values.d.ts +17 -0
  232. package/dist/tt-key-values.d.ts.map +1 -0
  233. package/dist/tt-key-values.js +126 -0
  234. package/dist/tt-key-values.js.map +1 -0
  235. package/dist/tt-knowledge-doc.d.ts +24 -0
  236. package/dist/tt-knowledge-doc.d.ts.map +1 -0
  237. package/dist/tt-knowledge-doc.js +120 -0
  238. package/dist/tt-knowledge-doc.js.map +1 -0
  239. package/dist/tt-layout.d.ts +36 -0
  240. package/dist/tt-layout.d.ts.map +1 -0
  241. package/dist/tt-layout.js +318 -0
  242. package/dist/tt-layout.js.map +1 -0
  243. package/dist/tt-modal.d.ts +32 -0
  244. package/dist/tt-modal.d.ts.map +1 -0
  245. package/dist/tt-modal.js +553 -0
  246. package/dist/tt-modal.js.map +1 -0
  247. package/dist/tt-navbar.d.ts +33 -0
  248. package/dist/tt-navbar.d.ts.map +1 -0
  249. package/dist/tt-navbar.js +390 -0
  250. package/dist/tt-navbar.js.map +1 -0
  251. package/dist/tt-page-header.d.ts +28 -0
  252. package/dist/tt-page-header.d.ts.map +1 -0
  253. package/dist/tt-page-header.js +166 -0
  254. package/dist/tt-page-header.js.map +1 -0
  255. package/dist/tt-page.d.ts +14 -0
  256. package/dist/tt-page.d.ts.map +1 -0
  257. package/dist/tt-page.js +163 -0
  258. package/dist/tt-page.js.map +1 -0
  259. package/dist/tt-pagination.d.ts +27 -0
  260. package/dist/tt-pagination.d.ts.map +1 -0
  261. package/dist/tt-pagination.js +194 -0
  262. package/dist/tt-pagination.js.map +1 -0
  263. package/dist/tt-preview.d.ts +11 -0
  264. package/dist/tt-preview.d.ts.map +1 -0
  265. package/dist/tt-preview.js +68 -0
  266. package/dist/tt-preview.js.map +1 -0
  267. package/dist/tt-product.d.ts +40 -0
  268. package/dist/tt-product.d.ts.map +1 -0
  269. package/dist/tt-product.js +590 -0
  270. package/dist/tt-product.js.map +1 -0
  271. package/dist/tt-profile-card.d.ts +23 -0
  272. package/dist/tt-profile-card.d.ts.map +1 -0
  273. package/dist/tt-profile-card.js +199 -0
  274. package/dist/tt-profile-card.js.map +1 -0
  275. package/dist/tt-progress.d.ts +26 -0
  276. package/dist/tt-progress.d.ts.map +1 -0
  277. package/dist/tt-progress.js +156 -0
  278. package/dist/tt-progress.js.map +1 -0
  279. package/dist/tt-quantity.d.ts +36 -0
  280. package/dist/tt-quantity.d.ts.map +1 -0
  281. package/dist/tt-quantity.js +396 -0
  282. package/dist/tt-quantity.js.map +1 -0
  283. package/dist/tt-radio-group.d.ts +50 -0
  284. package/dist/tt-radio-group.d.ts.map +1 -0
  285. package/dist/tt-radio-group.js +372 -0
  286. package/dist/tt-radio-group.js.map +1 -0
  287. package/dist/tt-rating.d.ts +54 -0
  288. package/dist/tt-rating.d.ts.map +1 -0
  289. package/dist/tt-rating.js +312 -0
  290. package/dist/tt-rating.js.map +1 -0
  291. package/dist/tt-search.d.ts +47 -0
  292. package/dist/tt-search.d.ts.map +1 -0
  293. package/dist/tt-search.js +360 -0
  294. package/dist/tt-search.js.map +1 -0
  295. package/dist/tt-section.d.ts +13 -0
  296. package/dist/tt-section.d.ts.map +1 -0
  297. package/dist/tt-section.js +98 -0
  298. package/dist/tt-section.js.map +1 -0
  299. package/dist/tt-select.d.ts +62 -0
  300. package/dist/tt-select.d.ts.map +1 -0
  301. package/dist/tt-select.js +662 -0
  302. package/dist/tt-select.js.map +1 -0
  303. package/dist/tt-skeleton.d.ts +20 -0
  304. package/dist/tt-skeleton.d.ts.map +1 -0
  305. package/dist/tt-skeleton.js +143 -0
  306. package/dist/tt-skeleton.js.map +1 -0
  307. package/dist/tt-slider.d.ts +74 -0
  308. package/dist/tt-slider.d.ts.map +1 -0
  309. package/dist/tt-slider.js +426 -0
  310. package/dist/tt-slider.js.map +1 -0
  311. package/dist/tt-social-links.d.ts +34 -0
  312. package/dist/tt-social-links.d.ts.map +1 -0
  313. package/dist/tt-social-links.js +242 -0
  314. package/dist/tt-social-links.js.map +1 -0
  315. package/dist/tt-sparkline.d.ts +19 -0
  316. package/dist/tt-sparkline.d.ts.map +1 -0
  317. package/dist/tt-sparkline.js +191 -0
  318. package/dist/tt-sparkline.js.map +1 -0
  319. package/dist/tt-spinner.d.ts +19 -0
  320. package/dist/tt-spinner.d.ts.map +1 -0
  321. package/dist/tt-spinner.js +93 -0
  322. package/dist/tt-spinner.js.map +1 -0
  323. package/dist/tt-stack.d.ts +42 -0
  324. package/dist/tt-stack.d.ts.map +1 -0
  325. package/dist/tt-stack.js +158 -0
  326. package/dist/tt-stack.js.map +1 -0
  327. package/dist/tt-stat.d.ts +17 -0
  328. package/dist/tt-stat.d.ts.map +1 -0
  329. package/dist/tt-stat.js +134 -0
  330. package/dist/tt-stat.js.map +1 -0
  331. package/dist/tt-switch.d.ts +39 -0
  332. package/dist/tt-switch.d.ts.map +1 -0
  333. package/dist/tt-switch.js +254 -0
  334. package/dist/tt-switch.js.map +1 -0
  335. package/dist/tt-switcher.d.ts +23 -0
  336. package/dist/tt-switcher.d.ts.map +1 -0
  337. package/dist/tt-switcher.js +203 -0
  338. package/dist/tt-switcher.js.map +1 -0
  339. package/dist/tt-table-cell.d.ts +26 -0
  340. package/dist/tt-table-cell.d.ts.map +1 -0
  341. package/dist/tt-table-cell.js +121 -0
  342. package/dist/tt-table-cell.js.map +1 -0
  343. package/dist/tt-table-row.d.ts +31 -0
  344. package/dist/tt-table-row.d.ts.map +1 -0
  345. package/dist/tt-table-row.js +72 -0
  346. package/dist/tt-table-row.js.map +1 -0
  347. package/dist/tt-table.d.ts +44 -0
  348. package/dist/tt-table.d.ts.map +1 -0
  349. package/dist/tt-table.js +270 -0
  350. package/dist/tt-table.js.map +1 -0
  351. package/dist/tt-tabs.d.ts +31 -0
  352. package/dist/tt-tabs.d.ts.map +1 -0
  353. package/dist/tt-tabs.js +223 -0
  354. package/dist/tt-tabs.js.map +1 -0
  355. package/dist/tt-tag-list.d.ts +19 -0
  356. package/dist/tt-tag-list.d.ts.map +1 -0
  357. package/dist/tt-tag-list.js +136 -0
  358. package/dist/tt-tag-list.js.map +1 -0
  359. package/dist/tt-text.d.ts +52 -0
  360. package/dist/tt-text.d.ts.map +1 -0
  361. package/dist/tt-text.js +337 -0
  362. package/dist/tt-text.js.map +1 -0
  363. package/dist/tt-textarea.d.ts +43 -0
  364. package/dist/tt-textarea.d.ts.map +1 -0
  365. package/dist/tt-textarea.js +356 -0
  366. package/dist/tt-textarea.js.map +1 -0
  367. package/dist/tt-thread.d.ts +62 -0
  368. package/dist/tt-thread.d.ts.map +1 -0
  369. package/dist/tt-thread.js +374 -0
  370. package/dist/tt-thread.js.map +1 -0
  371. package/dist/tt-toast.d.ts +49 -0
  372. package/dist/tt-toast.d.ts.map +1 -0
  373. package/dist/tt-toast.js +440 -0
  374. package/dist/tt-toast.js.map +1 -0
  375. package/dist/tt-toggle-group.d.ts +73 -0
  376. package/dist/tt-toggle-group.d.ts.map +1 -0
  377. package/dist/tt-toggle-group.js +273 -0
  378. package/dist/tt-toggle-group.js.map +1 -0
  379. package/dist/tt-toggle.d.ts +54 -0
  380. package/dist/tt-toggle.d.ts.map +1 -0
  381. package/dist/tt-toggle.js +232 -0
  382. package/dist/tt-toggle.js.map +1 -0
  383. package/dist/tt-toolbar.d.ts +26 -0
  384. package/dist/tt-toolbar.d.ts.map +1 -0
  385. package/dist/tt-toolbar.js +164 -0
  386. package/dist/tt-toolbar.js.map +1 -0
  387. package/dist/tt-tooltip.d.ts +42 -0
  388. package/dist/tt-tooltip.d.ts.map +1 -0
  389. package/dist/tt-tooltip.js +299 -0
  390. package/dist/tt-tooltip.js.map +1 -0
  391. package/package.json +84 -4
  392. package/vscode.html-custom-data.json +2911 -0
@@ -0,0 +1,539 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { LitElement, html, css, nothing } from "lit";
8
+ import { property, state, customElement } from "lit/decorators.js";
9
+ import "../tt-icon.js";
10
+ /**
11
+ * The navigation column of an app shell.
12
+ *
13
+ * ---------------------------------------------------------------------
14
+ * HOW COLLAPSING WORKS, AND WHY IT NEEDS NO PROPS.
15
+ *
16
+ * With `collapsible`, the sidebar can shrink to an icon rail. Everything
17
+ * inside it has to change at once: labels disappear, rows centre, group
18
+ * headings go, badges go, the indent goes. Passing that down would mean a
19
+ * `collapsed` prop on every child, kept in sync by hand, at every depth.
20
+ *
21
+ * Instead the collapsed state is published as ordinary CSS custom
22
+ * properties on the host, and each child reads the ones it cares about
23
+ * through var() with the expanded value as the fallback:
24
+ *
25
+ * --tt-menu-label-cols 1fr -> 0fr label track collapses
26
+ * --tt-menu-gap sp-2 -> 0px no gap beside nothing
27
+ * --tt-menu-justify start-> center icons centre in the rail
28
+ * --tt-menu-trail-display flex -> none badges and dots go
29
+ * --tt-menu-heading-display flex -> none group headings go
30
+ * --tt-menu-rail-rows unset-> 1fr every group forced open
31
+ * --tt-menu-rail-visibility unset-> visible ...and its items reachable
32
+ * --tt-menu-indent sp-2 -> 0px no nesting indent
33
+ *
34
+ * Custom properties inherit and they cross shadow boundaries, so this
35
+ * reaches a menu item nested three groups deep with no wiring, and a menu
36
+ * item used outside a sidebar simply gets the fallbacks. Same mechanism
37
+ * as --tt-radius-nested in tokens.css.
38
+ *
39
+ * They are declared in the stylesheet under :host([collapsed]) rather
40
+ * than written from JavaScript, and that matters: a media query can
41
+ * override a stylesheet rule, and cannot override an inline style. It is
42
+ * what lets the block at the bottom of this file switch the whole rail
43
+ * off on a phone, where the sidebar is a drawer and a rail would be an
44
+ * unusable 64px strip sliding over the page.
45
+ *
46
+ * ---------------------------------------------------------------------
47
+ * WHO OWNS `collapsed`.
48
+ *
49
+ * The component toggles itself and announces it with tt-sidebar-toggle,
50
+ * the same shape tt-menu-group uses for open/close. An app that wants to
51
+ * remember the choice listens for the event and writes the property back;
52
+ * one that does not gets working behaviour for free.
53
+ */
54
+ let TTSidebar = class TTSidebar extends LitElement {
55
+ constructor() {
56
+ super(...arguments);
57
+ this.variant = "default";
58
+ this.width = 240;
59
+ // The width of the icon rail when collapsed.
60
+ this.railWidth = 64;
61
+ // Shows the collapse control. Without it the sidebar cannot be shrunk.
62
+ this.collapsible = false;
63
+ this.collapsed = false;
64
+ /*
65
+ The name of the navigation landmark. A screen reader lists landmarks,
66
+ and "navigation" repeated twice on a page with a navbar tells the
67
+ listener nothing about which is which.
68
+ */
69
+ this.label = "Main";
70
+ this.collapseLabel = "Collapse sidebar";
71
+ this.expandLabel = "Expand sidebar";
72
+ this.hasHeader = false;
73
+ this.hasFooter = false;
74
+ }
75
+ /** Flips the rail open or shut, and announces it. */
76
+ toggle() {
77
+ this.collapsed = !this.collapsed;
78
+ this.dispatchEvent(new CustomEvent("tt-sidebar-toggle", {
79
+ detail: { collapsed: this.collapsed },
80
+ bubbles: true,
81
+ composed: true,
82
+ }));
83
+ }
84
+ willUpdate(changed) {
85
+ if (changed.has("width")) {
86
+ this.style.setProperty("--tt-sidebar-width", `${this.width}px`);
87
+ }
88
+ if (changed.has("railWidth")) {
89
+ this.style.setProperty("--tt-sidebar-rail-width", `${this.railWidth}px`);
90
+ }
91
+ }
92
+ updateSlot(prop, event) {
93
+ const slot = event.target;
94
+ this[prop] = slot
95
+ .assignedNodes({ flatten: true })
96
+ .some((node) => node.nodeType === Node.ELEMENT_NODE ||
97
+ (node.textContent ?? "").trim() !== "");
98
+ }
99
+ static { this.styles = css `
100
+ /* The browser's own [hidden] rule loses to any :host display, so a
101
+ hidden element would still show. Important, so it always wins. */
102
+ :host([hidden]) {
103
+ display: none !important;
104
+ }
105
+
106
+ :host {
107
+ display: block;
108
+
109
+ width: var(--tt-sidebar-width, 240px);
110
+ max-width: 100%;
111
+ height: 100%;
112
+ box-sizing: border-box;
113
+ overflow: hidden;
114
+
115
+ font-family: var(--tt-font-sans);
116
+ -webkit-font-smoothing: antialiased;
117
+
118
+ color: var(--tt-sidebar-foreground);
119
+
120
+ /* The one animation the shell itself performs. Everything inside
121
+ reacts to the width rather than being animated separately, which
122
+ is why they all land together. */
123
+ transition: width var(--tt-duration-normal) var(--tt-ease-out);
124
+ }
125
+
126
+ /* ---- the collapsed channel ----
127
+
128
+ See the note at the top of this file. Values here, fallbacks in the
129
+ children, so nothing has to be told anything. */
130
+
131
+ :host([collapsed]) {
132
+ width: var(--tt-sidebar-rail-width, 64px);
133
+
134
+ --tt-menu-label-cols: 0fr;
135
+ --tt-menu-gap: 0px;
136
+ --tt-menu-justify: center;
137
+ --tt-menu-trail-display: none;
138
+ --tt-menu-heading-display: none;
139
+ --tt-menu-rail-rows: 1fr;
140
+ --tt-menu-rail-visibility: visible;
141
+ --tt-menu-indent: 0px;
142
+
143
+ /* The arrow has nothing to sit beside any more. */
144
+ --tt-rail-justify: center;
145
+ }
146
+
147
+ nav {
148
+ width: 100%;
149
+ max-width: 100%;
150
+ height: 100%;
151
+ box-sizing: border-box;
152
+
153
+ background: var(--tt-sidebar);
154
+ color: var(--tt-sidebar-foreground);
155
+
156
+ border: 1px solid var(--tt-sidebar-border);
157
+ border-radius: var(--tt-radius);
158
+
159
+ padding: var(--tt-space-4);
160
+
161
+ display: flex;
162
+ flex-direction: column;
163
+ gap: var(--tt-space-4);
164
+
165
+ overflow: hidden;
166
+
167
+ transition:
168
+ padding var(--tt-duration-normal) var(--tt-ease-out),
169
+ box-shadow var(--tt-duration-normal) var(--tt-ease-out);
170
+ }
171
+
172
+ /*
173
+ THE PANEL ANIMATES. THE TEXT DOES NOT.
174
+
175
+ Nothing inside a menu item transitions its label any more, so a word
176
+ is either there or it is not. That is the whole behaviour, and this
177
+ one rule is what makes it look right.
178
+
179
+ Without it, opening would re-lay-out every row at every width
180
+ between 64px and 240px, and a label that is present the whole time
181
+ has to ellipsis its way in: D..., Dash..., Dashboa..., Dashboard.
182
+ Same chewing as before, just at full opacity.
183
+
184
+ So while a collapsible sidebar is open, the content is pinned to the
185
+ width it will end at, and the host's overflow:hidden clips it. The
186
+ text is laid out ONCE, at its real size, and the panel slides off it
187
+ rather than squeezing it.
188
+
189
+ Only on a collapsible sidebar, and only while it is open, so a
190
+ sidebar in a container narrower than its own width is unaffected.
191
+ */
192
+ :host([collapsible]:not([collapsed])) nav {
193
+ min-width: var(--tt-sidebar-width, 240px);
194
+ }
195
+
196
+ /* A rail is mostly padding if it keeps the full gutter, and the icons
197
+ stop looking centred. */
198
+ :host([collapsed]) nav {
199
+ padding: var(--tt-space-4) var(--tt-space-2);
200
+ }
201
+
202
+ .borderless {
203
+ border: none;
204
+ border-radius: 0;
205
+ }
206
+
207
+ /*
208
+ Floating: the column reads as a card sitting ON the page rather than
209
+ as a wall beside it. Useful when the shell has a coloured background
210
+ worth seeing around the navigation.
211
+ */
212
+ .floating {
213
+ /* The inset is what makes it float. Without a gap on all four
214
+ sides it is still a wall, just a rounded one. The height and
215
+ width are reduced by the same amount so the margin does not
216
+ push the column past the shell. */
217
+ margin: var(--tt-space-2);
218
+ width: calc(100% - var(--tt-space-4));
219
+ height: calc(100% - var(--tt-space-4));
220
+
221
+ border-radius: var(--tt-radius-xl);
222
+
223
+ /* Level 1: a sidebar sits on the page, it does not hover over it
224
+ the way a modal does. See the elevation table in tokens.css. */
225
+ box-shadow: var(--tt-elevation-1);
226
+ }
227
+
228
+ .header {
229
+ padding-bottom: var(--tt-space-3);
230
+ border-bottom: 1px solid var(--tt-sidebar-border);
231
+ }
232
+
233
+ .content {
234
+ flex: 1;
235
+ min-height: 0;
236
+
237
+ display: flex;
238
+ flex-direction: column;
239
+ gap: var(--tt-space-1);
240
+
241
+ overflow-y: auto;
242
+
243
+ /* A rail is narrower than a scrollbar is wide in some browsers, and
244
+ a horizontal bar appearing under a column of icons looks broken. */
245
+ overflow-x: hidden;
246
+
247
+ /* Invisible at rest, there when you reach for it.
248
+
249
+ A navigation list is read, not scrubbed, so a permanent grey bar
250
+ down the side is decoration that competes with the items. But
251
+ the list CAN overflow, so the scroller has to stay real: this
252
+ hides the thumb rather than removing the scrollbar.
253
+
254
+ The track keeps its width in both states. Toggling
255
+ scrollbar-width instead would reflow every row by 6px the moment
256
+ the pointer entered the column, which is a worse problem than
257
+ the one being solved. */
258
+ scrollbar-width: thin;
259
+ scrollbar-color: transparent transparent;
260
+ }
261
+
262
+ :host(:hover) .content,
263
+ .content:focus-within {
264
+ scrollbar-color: color-mix(
265
+ in oklab,
266
+ var(--tt-sidebar-foreground) 25%,
267
+ transparent
268
+ )
269
+ transparent;
270
+ }
271
+
272
+ .content::-webkit-scrollbar {
273
+ width: 6px;
274
+ }
275
+
276
+ .content::-webkit-scrollbar-thumb {
277
+ background: transparent;
278
+ border-radius: var(--tt-radius-full);
279
+
280
+ transition: background var(--tt-duration-fast) var(--tt-ease-out);
281
+ }
282
+
283
+ :host(:hover) .content::-webkit-scrollbar-thumb,
284
+ .content:focus-within::-webkit-scrollbar-thumb {
285
+ background: color-mix(
286
+ in oklab,
287
+ var(--tt-sidebar-foreground) 22%,
288
+ transparent
289
+ );
290
+ }
291
+
292
+ .content::-webkit-scrollbar-track {
293
+ background: transparent;
294
+ }
295
+
296
+ .footer {
297
+ padding-top: var(--tt-space-3);
298
+ border-top: 1px solid var(--tt-sidebar-border);
299
+ }
300
+
301
+ /* ---- the collapse control ----
302
+
303
+ An arrow, not a labelled row. A full-width "Collapse sidebar"
304
+ button read as a navigation destination, which is exactly what it
305
+ is not: it changes how the sidebar is drawn, it does not take you
306
+ anywhere. Something that small and that permanent should be a
307
+ handle, and a handle carries its meaning in its shape.
308
+
309
+ It sits in FLOW at the bottom rather than floating on the trailing
310
+ edge. An absolutely positioned handle looks better right up until
311
+ the rail, where 26px of button lands on top of a 64px column of
312
+ icons. In flow it can never overlap anything at either width. */
313
+
314
+ .rail-row {
315
+ display: flex;
316
+ justify-content: var(--tt-rail-justify, flex-end);
317
+
318
+ flex-shrink: 0;
319
+ padding: 0 var(--tt-space-1);
320
+ }
321
+
322
+ .rail {
323
+ display: flex;
324
+ align-items: center;
325
+ justify-content: center;
326
+
327
+ width: 26px;
328
+ height: 26px;
329
+ padding: 0;
330
+
331
+ border: 1px solid transparent;
332
+ border-radius: var(--tt-radius-full);
333
+ background: transparent;
334
+
335
+ color: var(--tt-muted-foreground);
336
+ cursor: pointer;
337
+
338
+ /* Out of the way until wanted. The sidebar is read far more often
339
+ than it is resized. */
340
+ opacity: 0;
341
+
342
+ transition:
343
+ opacity var(--tt-duration-fast) var(--tt-ease-out),
344
+ background var(--tt-duration-fast) var(--tt-ease-out),
345
+ border-color var(--tt-duration-fast) var(--tt-ease-out),
346
+ color var(--tt-duration-fast) var(--tt-ease-out);
347
+ }
348
+
349
+ /*
350
+ Three ways in, because hover alone is not a way in for everyone.
351
+ Collapsed is unconditional: once the labels are gone this button is
352
+ the only route back, so hiding it would be a trap.
353
+ */
354
+ :host(:hover) .rail,
355
+ :host(:focus-within) .rail,
356
+ :host([collapsed]) .rail {
357
+ opacity: 1;
358
+ }
359
+
360
+ @media (hover: none) {
361
+ .rail {
362
+ opacity: 1;
363
+ }
364
+ }
365
+
366
+ .rail:hover {
367
+ border-color: var(--tt-sidebar-border);
368
+ background: var(--tt-sidebar-accent);
369
+ color: var(--tt-sidebar-accent-foreground);
370
+ }
371
+
372
+ .rail:focus-visible {
373
+ opacity: 1;
374
+
375
+ outline: var(--tt-ring-width) solid var(--tt-ring);
376
+ outline-offset: var(--tt-ring-offset);
377
+ }
378
+
379
+ .rail tt-icon {
380
+ flex-shrink: 0;
381
+
382
+ /* One icon, turned over, rather than two icons swapped. Swapping
383
+ the name would replace the node and there would be nothing to
384
+ animate between. */
385
+ transition: transform var(--tt-duration-normal) var(--tt-ease-spring);
386
+ }
387
+
388
+ :host([collapsed]) .rail tt-icon {
389
+ transform: rotate(180deg);
390
+ }
391
+
392
+ [hidden] {
393
+ display: none;
394
+ }
395
+
396
+ /* ---- mobile ----
397
+
398
+ On a phone this element is not a column beside the page, it is a
399
+ drawer sliding over it (see tt-layout). A rail there would be a
400
+ 64px strip covering the screen with no labels, so the whole
401
+ collapsed state is switched off and the drawer is always full
402
+ width. This works only because the channel above is declared in a
403
+ stylesheet: an inline style written from JavaScript could not be
404
+ overridden here. */
405
+
406
+ @media (max-width: 768px) {
407
+ :host([collapsed]) {
408
+ width: var(--tt-sidebar-width, 240px);
409
+
410
+ --tt-menu-label-cols: 1fr;
411
+ --tt-menu-gap: var(--tt-space-2);
412
+ --tt-menu-justify: flex-start;
413
+ --tt-menu-trail-display: flex;
414
+ --tt-menu-heading-display: flex;
415
+ --tt-menu-indent: var(--tt-space-2);
416
+
417
+ /* initial is the guaranteed-invalid value for a custom property,
418
+ so every var(--tt-menu-rail-rows, X) below falls back to X and
419
+ groups go back to obeying their own open state. Same for the
420
+ arrow's alignment. */
421
+ --tt-menu-rail-rows: initial;
422
+ --tt-menu-rail-visibility: initial;
423
+ --tt-rail-justify: initial;
424
+ }
425
+
426
+ /*
427
+ The pin above exists to stop the content reflowing DURING a width
428
+ animation, and on a phone there is no width animation: the drawer
429
+ is always full width. Left in, it would push the content past a
430
+ drawer narrower than 240px and clip the right-hand side of every
431
+ row.
432
+ */
433
+ :host([collapsible]:not([collapsed])) nav {
434
+ min-width: 0;
435
+ }
436
+
437
+ :host([collapsed]) nav {
438
+ padding: var(--tt-space-4);
439
+ }
440
+
441
+ :host([collapsed]) .rail tt-icon {
442
+ transform: none;
443
+ }
444
+
445
+ /* The drawer is already the full width it can be, so there is
446
+ nothing for this button to do. */
447
+ .rail {
448
+ display: none;
449
+ }
450
+ }
451
+ `; }
452
+ render() {
453
+ const variant = this.variant === "borderless"
454
+ ? "borderless"
455
+ : this.variant === "floating"
456
+ ? "floating"
457
+ : "";
458
+ /*
459
+ The name is the whole control now that the text is gone, so it does
460
+ double duty: the accessible name AND the tooltip. An arrow with no
461
+ name is a mystery button.
462
+ */
463
+ const railName = this.collapsed ? this.expandLabel : this.collapseLabel;
464
+ return html `
465
+ <nav class=${variant} aria-label=${this.label}>
466
+ <div class="header" ?hidden=${!this.hasHeader}>
467
+ <slot
468
+ name="header"
469
+ @slotchange=${(e) => this.updateSlot("hasHeader", e)}
470
+ ></slot>
471
+ </div>
472
+
473
+ <div class="content">
474
+ <slot></slot>
475
+ </div>
476
+
477
+ ${this.collapsible
478
+ ? html `
479
+ <div class="rail-row">
480
+ <button
481
+ class="rail"
482
+ part="rail"
483
+ type="button"
484
+ aria-expanded=${!this.collapsed}
485
+ aria-label=${railName}
486
+ title=${railName}
487
+ @click=${this.toggle}
488
+ >
489
+ <tt-icon name="chevron-left" size="16px"></tt-icon>
490
+ </button>
491
+ </div>
492
+ `
493
+ : nothing}
494
+
495
+ <div class="footer" ?hidden=${!this.hasFooter}>
496
+ <slot
497
+ name="footer"
498
+ @slotchange=${(e) => this.updateSlot("hasFooter", e)}
499
+ ></slot>
500
+ </div>
501
+ </nav>
502
+ `;
503
+ }
504
+ };
505
+ __decorate([
506
+ property({ type: String })
507
+ ], TTSidebar.prototype, "variant", void 0);
508
+ __decorate([
509
+ property({ type: Number })
510
+ ], TTSidebar.prototype, "width", void 0);
511
+ __decorate([
512
+ property({ type: Number, attribute: "rail-width" })
513
+ ], TTSidebar.prototype, "railWidth", void 0);
514
+ __decorate([
515
+ property({ type: Boolean, reflect: true })
516
+ ], TTSidebar.prototype, "collapsible", void 0);
517
+ __decorate([
518
+ property({ type: Boolean, reflect: true })
519
+ ], TTSidebar.prototype, "collapsed", void 0);
520
+ __decorate([
521
+ property({ type: String })
522
+ ], TTSidebar.prototype, "label", void 0);
523
+ __decorate([
524
+ property({ type: String, attribute: "collapse-label" })
525
+ ], TTSidebar.prototype, "collapseLabel", void 0);
526
+ __decorate([
527
+ property({ type: String, attribute: "expand-label" })
528
+ ], TTSidebar.prototype, "expandLabel", void 0);
529
+ __decorate([
530
+ state()
531
+ ], TTSidebar.prototype, "hasHeader", void 0);
532
+ __decorate([
533
+ state()
534
+ ], TTSidebar.prototype, "hasFooter", void 0);
535
+ TTSidebar = __decorate([
536
+ customElement("tt-sidebar")
537
+ ], TTSidebar);
538
+ export { TTSidebar };
539
+ //# sourceMappingURL=tt-sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-sidebar.js","sourceR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IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;8CACvB;AAGvB;IADP,KAAK,EAAE;4CACkB;AAGlB;IADP,KAAK,EAAE;4CACkB;AApCf,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAoerB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `.sr-only`: present for screen readers, invisible on screen.
3
+ *
4
+ * Shared rather than copied, because a shadow root inherits no page
5
+ * styles, so every component that needs the class has to carry it, and
6
+ * hand-copied versions drift. Use it as the first entry of a styles array:
7
+ *
8
+ * static styles = [srOnly, css`...`];
9
+ *
10
+ * clip-path rather than the older clip, which is deprecated. Not
11
+ * display:none or visibility:hidden: both remove the text from the
12
+ * accessibility tree too, which defeats the point.
13
+ */
14
+ export declare const srOnly: import("lit").CSSResult;
15
+ //# sourceMappingURL=sr-only.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sr-only.d.ts","sourceRoot":"","sources":["../src/sr-only.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM,yBAWlB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { css } from "lit";
2
+ /**
3
+ * `.sr-only`: present for screen readers, invisible on screen.
4
+ *
5
+ * Shared rather than copied, because a shadow root inherits no page
6
+ * styles, so every component that needs the class has to carry it, and
7
+ * hand-copied versions drift. Use it as the first entry of a styles array:
8
+ *
9
+ * static styles = [srOnly, css`...`];
10
+ *
11
+ * clip-path rather than the older clip, which is deprecated. Not
12
+ * display:none or visibility:hidden: both remove the text from the
13
+ * accessibility tree too, which defeats the point.
14
+ */
15
+ export const srOnly = css `
16
+ .sr-only {
17
+ position: absolute;
18
+ width: 1px;
19
+ height: 1px;
20
+ padding: 0;
21
+ margin: -1px;
22
+ overflow: hidden;
23
+ clip-path: inset(50%);
24
+ white-space: nowrap;
25
+ }
26
+ `;
27
+ //# sourceMappingURL=sr-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sr-only.js","sourceRoot":"","sources":["../src/sr-only.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;CAWxB,CAAC"}