@tartaguti/ui-components 0.0.0-stage → 0.1.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 +7 -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 +16731 -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 +69 -0
  172. package/dist/tt-data-table.d.ts.map +1 -0
  173. package/dist/tt-data-table.js +542 -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 +2907 -0
@@ -0,0 +1,502 @@
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 { ifDefined } from "lit/directives/if-defined.js";
9
+ import { property, state, customElement } from "lit/decorators.js";
10
+ import { safeUrl } from "../safe-url.js";
11
+ import "../tt-icon.js";
12
+ /**
13
+ * One row of sidebar navigation.
14
+ *
15
+ * ---------------------------------------------------------------------
16
+ * WHY THE ROW IS NOT ONE ELEMENT.
17
+ *
18
+ * A menu item can carry a trailing control: a count, or the three dots
19
+ * that open a per-item menu. A button inside a button is invalid HTML and
20
+ * breaks keyboard and screen-reader behaviour in every browser, so the
21
+ * two cannot nest.
22
+ *
23
+ * So the row is a plain container, and the two controls are SIBLINGS
24
+ * inside it:
25
+ *
26
+ * .row the hover surface, the corner, the active bar
27
+ * .main a real <button> or <a>, holds the padding, flex: 1
28
+ * .trail the badge and the actions, only when there are any
29
+ *
30
+ * The padding lives on .main rather than on .row so that clicking the
31
+ * blank space beside the label still activates the item. If the row
32
+ * carried the padding, that space would belong to nothing.
33
+ *
34
+ * ---------------------------------------------------------------------
35
+ * WHY IT IS NO LONGER role="menuitem".
36
+ *
37
+ * menuitem is for application menus, and it is only valid inside a
38
+ * role="menu" parent. This is site navigation inside a landmark, so the
39
+ * honest markup is a link or a button, which also brings Enter, Space,
40
+ * middle-click and "open in new tab" for free instead of reimplementing
41
+ * them. The custom keydown handler this component used to carry is gone
42
+ * with it.
43
+ *
44
+ * ---------------------------------------------------------------------
45
+ * RAIL MODE.
46
+ *
47
+ * Nothing here knows whether the sidebar is collapsed. tt-sidebar sets a
48
+ * handful of custom properties when it is, and every one of them is read
49
+ * below through var() with the expanded value as the fallback. Custom
50
+ * properties inherit and cross shadow boundaries, so this works at any
51
+ * depth with no props and no coordination, and an item used outside a
52
+ * sidebar simply gets the fallbacks.
53
+ */
54
+ let TTMenuItem = class TTMenuItem extends LitElement {
55
+ constructor() {
56
+ super(...arguments);
57
+ this.variant = "default";
58
+ // Selection state, independent of the style variant.
59
+ this.active = false;
60
+ this.disabled = false;
61
+ this.href = "";
62
+ /*
63
+ Kept at _blank because that is what this component has always done:
64
+ it used to call openSafely(), which opens a new tab. Set target="_self"
65
+ for an in-app link.
66
+ */
67
+ this.target = "_blank";
68
+ this.value = "";
69
+ /*
70
+ The accessible name, used for the tooltip when the sidebar is a rail
71
+ and the label is not readable. Optional: without it a collapsed item
72
+ still works, it just has no hover hint.
73
+ */
74
+ this.label = "";
75
+ // Renders the built-in three-dot button at the end of the row.
76
+ this.more = false;
77
+ this.moreLabel = "More actions";
78
+ this.hasBadge = false;
79
+ this.hasActions = false;
80
+ }
81
+ activate() {
82
+ if (this.disabled)
83
+ return;
84
+ this.dispatchEvent(new CustomEvent("tt-menu-click", {
85
+ detail: { value: this.value },
86
+ bubbles: true,
87
+ composed: true,
88
+ }));
89
+ }
90
+ openMore(event) {
91
+ /*
92
+ The dots sit beside the main control rather than inside it, so this
93
+ click cannot reach it. What it CAN do is bubble on as a plain click
94
+ to whatever wraps the sidebar, which would look like a navigation
95
+ that never happened. Stopping it keeps the two intents separate.
96
+ */
97
+ event.stopPropagation();
98
+ if (this.disabled)
99
+ return;
100
+ this.dispatchEvent(new CustomEvent("tt-menu-more", {
101
+ detail: { value: this.value },
102
+ bubbles: true,
103
+ composed: true,
104
+ }));
105
+ }
106
+ updateSlot(prop, event) {
107
+ const slot = event.target;
108
+ this[prop] = slot
109
+ .assignedNodes({ flatten: true })
110
+ .some((node) => node.nodeType === Node.ELEMENT_NODE ||
111
+ (node.textContent ?? "").trim() !== "");
112
+ }
113
+ static { this.styles = css `
114
+ /* The browser's own [hidden] rule loses to any :host display, so a
115
+ hidden element would still show. Important, so it always wins. */
116
+ :host([hidden]) {
117
+ display: none !important;
118
+ }
119
+
120
+ :host {
121
+ display: block;
122
+
123
+ font-family: var(--tt-font-sans);
124
+ -webkit-font-smoothing: antialiased;
125
+
126
+ color: var(--tt-sidebar-foreground);
127
+ }
128
+
129
+ .row {
130
+ position: relative;
131
+
132
+ display: flex;
133
+ align-items: center;
134
+
135
+ width: 100%;
136
+ box-sizing: border-box;
137
+
138
+ border-radius: var(--tt-radius);
139
+
140
+ /* Fast on purpose. A navigation row is pointed at, not admired:
141
+ anything slower than this reads as lag rather than as polish. */
142
+ transition:
143
+ background var(--tt-duration-fast) var(--tt-ease-out),
144
+ color var(--tt-duration-fast) var(--tt-ease-out);
145
+ }
146
+
147
+ .row:hover {
148
+ background: var(--tt-sidebar-accent);
149
+ color: var(--tt-sidebar-accent-foreground);
150
+ }
151
+
152
+ .row.active {
153
+ background: var(--tt-sidebar-accent);
154
+ color: var(--tt-sidebar-accent-foreground);
155
+ }
156
+
157
+ /*
158
+ The active marker. Drawn on the row rather than as a border so it
159
+ cannot change the item's size, and scaled from nothing rather than
160
+ faded in, which is what gives it the small vertical spring.
161
+ */
162
+ .row::before {
163
+ content: "";
164
+
165
+ position: absolute;
166
+ left: 0;
167
+ top: 50%;
168
+
169
+ width: 3px;
170
+ height: 60%;
171
+
172
+ border-radius: var(--tt-radius-full);
173
+ background: var(--tt-sidebar-primary);
174
+
175
+ transform: translateY(-50%) scaleY(0);
176
+ opacity: 0;
177
+
178
+ transition:
179
+ transform var(--tt-duration-normal) var(--tt-ease-spring),
180
+ opacity var(--tt-duration-fast) var(--tt-ease-out);
181
+ }
182
+
183
+ .row.active::before {
184
+ transform: translateY(-50%) scaleY(1);
185
+ opacity: 1;
186
+ }
187
+
188
+ /* ---- the main control ---- */
189
+
190
+ .main {
191
+ flex: 1;
192
+ min-width: 0;
193
+
194
+ display: flex;
195
+ align-items: center;
196
+ justify-content: var(--tt-menu-justify, flex-start);
197
+
198
+ /* Zero in rail mode: the label is gone, and a gap next to nothing
199
+ reads as a mis-centred icon. */
200
+ gap: var(--tt-menu-gap, var(--tt-space-2));
201
+
202
+ box-sizing: border-box;
203
+ padding: var(--tt-space-2) var(--tt-space-3);
204
+
205
+ border: none;
206
+ background: none;
207
+
208
+ font: inherit;
209
+ font-size: var(--tt-text-sm);
210
+ font-weight: var(--tt-weight-medium);
211
+ text-align: left;
212
+ text-decoration: none;
213
+ color: inherit;
214
+
215
+ border-radius: inherit;
216
+ cursor: pointer;
217
+ user-select: none;
218
+
219
+ transition: font-weight var(--tt-duration-fast) var(--tt-ease-out);
220
+ }
221
+
222
+ .row.active .main {
223
+ font-weight: var(--tt-weight-semibold);
224
+ }
225
+
226
+ /* The token file's one focus recipe: an outline, never a box-shadow.
227
+ This component used to draw an inset ring, so focus looked
228
+ different here than everywhere else in the system. */
229
+ .main:focus-visible,
230
+ .dots:focus-visible {
231
+ outline: var(--tt-ring-width) solid var(--tt-ring);
232
+ outline-offset: calc(var(--tt-ring-width) * -1);
233
+ }
234
+
235
+ .icon {
236
+ display: flex;
237
+ flex-shrink: 0;
238
+ }
239
+
240
+ /* Quieter than the leading icon on purpose. A trailing arrow is a
241
+ hint about where the link goes, not a thing to look at first. */
242
+ .icon-end {
243
+ display: var(--tt-menu-trail-display, flex);
244
+
245
+ color: var(--tt-muted-foreground);
246
+ }
247
+
248
+ /*
249
+ The label is on a grid track so a rail can take it to zero width
250
+ without a magic pixel number that would be wrong at some font size.
251
+
252
+ NOT animated, deliberately. The panel animates; the word is either
253
+ there or it is not. Anything that shrinks a label while it is on
254
+ screen has to show its own truncation on the way past, and no
255
+ easing fixes that because the text really is being squeezed. See
256
+ the note on the nav pin in tt-sidebar for the other half of this.
257
+ */
258
+ .label {
259
+ display: grid;
260
+ grid-template-columns: var(--tt-menu-label-cols, 1fr);
261
+
262
+ min-width: 0;
263
+ }
264
+
265
+ .label > span {
266
+ overflow: hidden;
267
+ white-space: nowrap;
268
+ text-overflow: ellipsis;
269
+ }
270
+
271
+ /* ---- the trailing controls ---- */
272
+
273
+ .trail {
274
+ display: var(--tt-menu-trail-display, flex);
275
+ align-items: center;
276
+ gap: var(--tt-space-1);
277
+
278
+ flex-shrink: 0;
279
+ padding-right: var(--tt-space-2);
280
+ }
281
+
282
+ /* The rule above sets display, so it beats the browser's own
283
+ [hidden] { display: none }. Without this line the attribute does
284
+ nothing and an empty trail still takes its padding. */
285
+ .trail[hidden] {
286
+ display: none;
287
+ }
288
+
289
+ /*
290
+ A count is information, so it stays. The actions are an affordance,
291
+ so they arrive on hover and keep the resting row quiet.
292
+ */
293
+ .actions {
294
+ display: flex;
295
+ align-items: center;
296
+
297
+ opacity: 0;
298
+ transform: translateX(4px);
299
+
300
+ transition:
301
+ opacity var(--tt-duration-fast) var(--tt-ease-out),
302
+ transform var(--tt-duration-fast) var(--tt-ease-out);
303
+ }
304
+
305
+ .row:hover .actions,
306
+ .row:focus-within .actions,
307
+ .row.active .actions {
308
+ opacity: 1;
309
+ transform: none;
310
+ }
311
+
312
+ /*
313
+ A touch screen has no hover, so a control that appears on hover is a
314
+ control that never appears. On those devices it is simply always
315
+ there.
316
+ */
317
+ @media (hover: none) {
318
+ .actions {
319
+ opacity: 1;
320
+ transform: none;
321
+ }
322
+ }
323
+
324
+ .dots {
325
+ display: flex;
326
+ align-items: center;
327
+ justify-content: center;
328
+
329
+ width: 22px;
330
+ height: 22px;
331
+ padding: 0;
332
+
333
+ border: none;
334
+ border-radius: var(--tt-radius-sm);
335
+ background: none;
336
+
337
+ color: var(--tt-muted-foreground);
338
+ cursor: pointer;
339
+
340
+ transition:
341
+ background var(--tt-duration-fast) var(--tt-ease-out),
342
+ color var(--tt-duration-fast) var(--tt-ease-out);
343
+ }
344
+
345
+ .dots:hover {
346
+ background: color-mix(
347
+ in oklab,
348
+ var(--tt-sidebar-foreground) 12%,
349
+ transparent
350
+ );
351
+ color: var(--tt-sidebar-foreground);
352
+ }
353
+
354
+ /* ---- disabled ---- */
355
+
356
+ .row.disabled {
357
+ opacity: var(--tt-opacity-disabled);
358
+ }
359
+
360
+ .row.disabled .main,
361
+ .row.disabled .dots {
362
+ cursor: not-allowed;
363
+ pointer-events: none;
364
+ }
365
+
366
+ ::slotted(tt-icon) {
367
+ flex-shrink: 0;
368
+ }
369
+ `; }
370
+ renderMain() {
371
+ /*
372
+ icon-end sits INSIDE the main control rather than in the trail,
373
+ because it is part of the link: the little arrow that says this one
374
+ leaves the app. The trail is for things that are not the link, like
375
+ a count or the dots menu.
376
+ */
377
+ const inner = html `
378
+ <span class="icon"><slot name="icon"></slot></span>
379
+ <span class="label"
380
+ ><span><slot></slot></span
381
+ ></span>
382
+ <span class="icon icon-end"><slot name="icon-end"></slot></span>
383
+ `;
384
+ if (this.variant === "link") {
385
+ /*
386
+ href arrives as data, so it can be a javascript: URL. Sanitising
387
+ it here rather than at click time means an unsafe value never
388
+ reaches the DOM at all, and the row degrades to an inert span
389
+ instead of pretending to be a link that does nothing.
390
+ */
391
+ const safe = this.disabled ? null : safeUrl(this.href);
392
+ return html `
393
+ <a
394
+ class="main"
395
+ part="main"
396
+ href=${ifDefined(safe ?? undefined)}
397
+ target=${this.target}
398
+ rel="noopener noreferrer"
399
+ title=${ifDefined(this.label || undefined)}
400
+ aria-disabled=${ifDefined(this.disabled ? "true" : undefined)}
401
+ aria-current=${ifDefined(this.active ? "page" : undefined)}
402
+ >${inner}</a
403
+ >
404
+ `;
405
+ }
406
+ return html `
407
+ <button
408
+ class="main"
409
+ part="main"
410
+ type="button"
411
+ ?disabled=${this.disabled}
412
+ title=${ifDefined(this.label || undefined)}
413
+ aria-current=${ifDefined(this.active ? "page" : undefined)}
414
+ @click=${this.activate}
415
+ >
416
+ ${inner}
417
+ </button>
418
+ `;
419
+ }
420
+ render() {
421
+ const showTrail = this.more || this.hasBadge || this.hasActions;
422
+ return html `
423
+ <div
424
+ part="item"
425
+ class="row ${this.active ? "active" : ""} ${this.disabled ? "disabled" : ""}"
426
+ >
427
+ ${this.renderMain()}
428
+
429
+ <!--
430
+ Always rendered so slotchange can fire and tell us whether there
431
+ is anything in it. Hidden rather than absent, because a slot that
432
+ is never in the DOM never reports its content.
433
+ -->
434
+ <span class="trail" part="trail" ?hidden=${!showTrail}>
435
+ <slot
436
+ name="badge"
437
+ @slotchange=${(e) => this.updateSlot("hasBadge", e)}
438
+ ></slot>
439
+
440
+ <span class="actions">
441
+ <slot
442
+ name="actions"
443
+ @slotchange=${(e) => this.updateSlot("hasActions", e)}
444
+ ></slot>
445
+
446
+ ${this.more
447
+ ? html `
448
+ <button
449
+ class="dots"
450
+ part="more"
451
+ type="button"
452
+ aria-label=${this.moreLabel}
453
+ @click=${this.openMore}
454
+ >
455
+ <tt-icon name="more-horizontal" size="16px"></tt-icon>
456
+ </button>
457
+ `
458
+ : nothing}
459
+ </span>
460
+ </span>
461
+ </div>
462
+ `;
463
+ }
464
+ };
465
+ __decorate([
466
+ property({ type: String })
467
+ ], TTMenuItem.prototype, "variant", void 0);
468
+ __decorate([
469
+ property({ type: Boolean, reflect: true })
470
+ ], TTMenuItem.prototype, "active", void 0);
471
+ __decorate([
472
+ property({ type: Boolean, reflect: true })
473
+ ], TTMenuItem.prototype, "disabled", void 0);
474
+ __decorate([
475
+ property({ type: String })
476
+ ], TTMenuItem.prototype, "href", void 0);
477
+ __decorate([
478
+ property({ type: String })
479
+ ], TTMenuItem.prototype, "target", void 0);
480
+ __decorate([
481
+ property({ type: String })
482
+ ], TTMenuItem.prototype, "value", void 0);
483
+ __decorate([
484
+ property({ type: String })
485
+ ], TTMenuItem.prototype, "label", void 0);
486
+ __decorate([
487
+ property({ type: Boolean })
488
+ ], TTMenuItem.prototype, "more", void 0);
489
+ __decorate([
490
+ property({ type: String, attribute: "more-label" })
491
+ ], TTMenuItem.prototype, "moreLabel", void 0);
492
+ __decorate([
493
+ state()
494
+ ], TTMenuItem.prototype, "hasBadge", void 0);
495
+ __decorate([
496
+ state()
497
+ ], TTMenuItem.prototype, "hasActions", void 0);
498
+ TTMenuItem = __decorate([
499
+ customElement("tt-menu-item")
500
+ ], TTMenuItem);
501
+ export { TTMenuItem };
502
+ //# sourceMappingURL=tt-menu-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-menu-item.js","sourceRoot":"","sources":["../../src/sidebar/tt-menu-item.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,E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AAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC5B;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACjB;AAQV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACT;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAQX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCAChB;AAIX;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wCACf;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CACzB;AAGnB;IADP,KAAK,EAAE;4CACiB;AAGjB;IADP,KAAK,EAAE;8CACmB;AA5ChB,UAAU;IADtB,aAAa,CAAC,cAAc,CAAC;GACjB,UAAU,CAmctB"}
@@ -0,0 +1,39 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * The account row at the bottom of a sidebar.
4
+ *
5
+ * Goes in tt-sidebar's `footer` slot. Same shape as tt-sidebar-header on
6
+ * purpose: leading mark, two lines of text, trailing actions. Two rows
7
+ * that look alike should be built alike, or they drift apart the first
8
+ * time one of them is edited.
9
+ *
10
+ * <tt-sidebar-footer slot="footer" heading="Alex Rana" description="alex@x.com">
11
+ * <tt-avatar slot="leading" name="Alex Rana"></tt-avatar>
12
+ * <tt-button slot="actions" variant="ghost" size="small">...</tt-button>
13
+ * </tt-sidebar-footer>
14
+ *
15
+ * With `clickable` the whole row becomes one button and emits
16
+ * tt-sidebar-account, for the common case where clicking the account
17
+ * opens a menu. It is off by default because a row that looks clickable
18
+ * and is not is worse than a plain row, and most footers are plain.
19
+ *
20
+ * `clickable` and the `actions` slot work together, because the actions
21
+ * sit BESIDE the button rather than inside it. A button inside a button
22
+ * is invalid HTML, so the row is a container holding two siblings. Same
23
+ * arrangement as tt-menu-item, for the same reason.
24
+ */
25
+ export declare class TTSidebarFooter extends LitElement {
26
+ heading: string;
27
+ description: string;
28
+ clickable: boolean;
29
+ private activate;
30
+ static styles: import("lit").CSSResult;
31
+ private renderInner;
32
+ render(): import("lit-html").TemplateResult<1>;
33
+ }
34
+ declare global {
35
+ interface HTMLElementTagNameMap {
36
+ "tt-sidebar-footer": TTSidebarFooter;
37
+ }
38
+ }
39
+ //# sourceMappingURL=tt-sidebar-footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-sidebar-footer.d.ts","sourceRoot":"","sources":["../../src/sidebar/tt-sidebar-footer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAGrD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAE7C,OAAO,SAAM;IAGb,WAAW,SAAM;IAGjB,SAAS,UAAS;IAElB,OAAO,CAAC,QAAQ;IAShB,MAAM,CAAC,MAAM,0BA4GX;IAEF,OAAO,CAAC,WAAW;IAmBnB,MAAM;CAwBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,mBAAmB,EAAE,eAAe,CAAC;KACtC;CACF"}