@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,169 @@
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 } from "lit";
8
+ import { customElement, property, state } from "lit/decorators.js";
9
+ /**
10
+ * Image with an initials fallback. The fallback is the entire point:
11
+ * logos and profile photos fail to load constantly, and a broken image
12
+ * icon is the difference between a product that looks maintained and one
13
+ * that does not.
14
+ */
15
+ let TTAvatar = class TTAvatar extends LitElement {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.src = "";
19
+ // Used for the initials and for the alt text.
20
+ this.name = "";
21
+ this.size = "medium";
22
+ this.square = false;
23
+ this.failed = false;
24
+ }
25
+ // Reset the failure flag when a new src arrives, or a broken image
26
+ // would poison every later one.
27
+ updated(changed) {
28
+ if (changed.has("src"))
29
+ this.failed = false;
30
+ }
31
+ /*
32
+ First letters of the first and last words: "Adriatik Logistics" -> AL,
33
+ "Ana" -> A. Two letters is the most that fits legibly at small sizes.
34
+ */
35
+ get initials() {
36
+ const words = this.name.trim().split(/\s+/).filter(Boolean);
37
+ if (words.length === 0)
38
+ return "?";
39
+ const first = words[0][0];
40
+ const last = words.length > 1 ? words[words.length - 1][0] : "";
41
+ return (first + last).toUpperCase();
42
+ }
43
+ /*
44
+ A stable colour per name, so the same company is always the same
45
+ shade. Hashing the string means no state and no lookup table, and it
46
+ stays consistent across reloads and machines.
47
+ */
48
+ get tone() {
49
+ let hash = 0;
50
+ for (const char of this.name) {
51
+ hash = (hash * 31 + char.charCodeAt(0)) % 360;
52
+ }
53
+ return hash;
54
+ }
55
+ static { this.styles = css `
56
+ /* The browser's own [hidden] rule loses to any :host display, so a
57
+ hidden element would still show. Important, so it always wins. */
58
+ :host([hidden]) {
59
+ display: none !important;
60
+ }
61
+
62
+ :host {
63
+ display: inline-flex;
64
+ flex: 0 0 auto;
65
+
66
+ --_size: 40px;
67
+ --_text: var(--tt-text-sm);
68
+ }
69
+
70
+ :host([size="small"]) {
71
+ --_size: 28px;
72
+ --_text: var(--tt-text-xs);
73
+ }
74
+
75
+ :host([size="large"]) {
76
+ --_size: 64px;
77
+ --_text: var(--tt-text-lg);
78
+ }
79
+
80
+ .avatar {
81
+ position: relative;
82
+ overflow: hidden;
83
+
84
+ width: var(--_size);
85
+ height: var(--_size);
86
+
87
+ border-radius: var(--tt-radius-full);
88
+ background: var(--tt-muted);
89
+ }
90
+
91
+ :host([square]) .avatar {
92
+ border-radius: var(--tt-radius);
93
+ }
94
+
95
+ img {
96
+ display: block;
97
+ width: 100%;
98
+ height: 100%;
99
+ object-fit: cover;
100
+ }
101
+
102
+ .initials {
103
+ display: grid;
104
+ place-content: center;
105
+
106
+ width: 100%;
107
+ height: 100%;
108
+
109
+ /* oklch from a hashed hue: consistent lightness and chroma across
110
+ every name, so no avatar is unreadably dark or washed out. */
111
+ background: oklch(0.72 0.11 var(--_hue));
112
+ color: oklch(0.25 0.06 var(--_hue));
113
+
114
+ font-size: var(--_text);
115
+ font-weight: var(--tt-weight-semibold);
116
+ letter-spacing: 0.02em;
117
+ user-select: none;
118
+ }
119
+ `; }
120
+ render() {
121
+ const showImage = this.src && !this.failed;
122
+ return html `
123
+ <div class="avatar" part="avatar">
124
+ ${showImage
125
+ ? html `
126
+ <img
127
+ part="image"
128
+ src=${this.src}
129
+ alt=${this.name}
130
+ loading="lazy"
131
+ decoding="async"
132
+ @error=${() => (this.failed = true)}
133
+ />
134
+ `
135
+ : html `
136
+ <div
137
+ class="initials"
138
+ part="initials"
139
+ style=${`--_hue:${this.tone}`}
140
+ role="img"
141
+ aria-label=${this.name || "Unknown"}
142
+ >
143
+ ${this.initials}
144
+ </div>
145
+ `}
146
+ </div>
147
+ `;
148
+ }
149
+ };
150
+ __decorate([
151
+ property({ type: String })
152
+ ], TTAvatar.prototype, "src", void 0);
153
+ __decorate([
154
+ property({ type: String })
155
+ ], TTAvatar.prototype, "name", void 0);
156
+ __decorate([
157
+ property({ type: String, reflect: true })
158
+ ], TTAvatar.prototype, "size", void 0);
159
+ __decorate([
160
+ property({ type: Boolean, reflect: true })
161
+ ], TTAvatar.prototype, "square", void 0);
162
+ __decorate([
163
+ state()
164
+ ], TTAvatar.prototype, "failed", void 0);
165
+ TTAvatar = __decorate([
166
+ customElement("tt-avatar")
167
+ ], TTAvatar);
168
+ export { TTAvatar };
169
+ //# sourceMappingURL=tt-avatar.js.map
@@ -0,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,CAAC,WAAW,CAAC;GACd,QAAQ,CA6IpB"}
@@ -0,0 +1,36 @@
1
+ import { LitElement } from "lit";
2
+ export type BadgeVariant = "neutral" | "success" | "warning" | "danger";
3
+ export type BadgeSize = "small" | "medium";
4
+ /**
5
+ * A small status label. Presentational only: it displays state, it never
6
+ * owns it.
7
+ *
8
+ * THREE THINGS THAT WERE WRONG AND ARE WORTH KNOWING.
9
+ *
10
+ * line-height was 1.5. On a pill that is not a paragraph, an inherited
11
+ * body line-height adds invisible space above and below the text, so the
12
+ * badge came out taller than it looked and sat off-centre next to a name.
13
+ * A pill sets line-height: 1 and gets its height from padding, which is
14
+ * the only way the height is predictable.
15
+ *
16
+ * neutral was --tt-muted-foreground mixed 14% into transparent, which is
17
+ * a grey wash of a grey. Neutral is the most common variant and it looked
18
+ * like a rendering mistake. It now uses the real muted surface.
19
+ *
20
+ * white-space: nowrap with no escape meant a long label pushed its way
21
+ * out of whatever contained it. It still refuses to wrap, because a badge
22
+ * that wraps stops being a badge, but it now truncates instead of
23
+ * overflowing.
24
+ */
25
+ export declare class TTBadge extends LitElement {
26
+ variant: BadgeVariant;
27
+ size: BadgeSize;
28
+ static styles: import("lit").CSSResult;
29
+ render(): import("lit-html").TemplateResult<1>;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ "tt-badge": TTBadge;
34
+ }
35
+ }
36
+ //# sourceMappingURL=tt-badge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-badge.d.ts","sourceRoot":"","sources":["../src/tt-badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxE,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE3C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACM,OAAO,EAAE,YAAY,CAAa;IAElC,IAAI,EAAE,SAAS,CAAY;IAEtE,MAAM,CAAC,MAAM,0BAgFX;IAEF,MAAM;CAOP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}
@@ -0,0 +1,135 @@
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 } from "lit";
8
+ import { property, customElement } from "lit/decorators.js";
9
+ /**
10
+ * A small status label. Presentational only: it displays state, it never
11
+ * owns it.
12
+ *
13
+ * THREE THINGS THAT WERE WRONG AND ARE WORTH KNOWING.
14
+ *
15
+ * line-height was 1.5. On a pill that is not a paragraph, an inherited
16
+ * body line-height adds invisible space above and below the text, so the
17
+ * badge came out taller than it looked and sat off-centre next to a name.
18
+ * A pill sets line-height: 1 and gets its height from padding, which is
19
+ * the only way the height is predictable.
20
+ *
21
+ * neutral was --tt-muted-foreground mixed 14% into transparent, which is
22
+ * a grey wash of a grey. Neutral is the most common variant and it looked
23
+ * like a rendering mistake. It now uses the real muted surface.
24
+ *
25
+ * white-space: nowrap with no escape meant a long label pushed its way
26
+ * out of whatever contained it. It still refuses to wrap, because a badge
27
+ * that wraps stops being a badge, but it now truncates instead of
28
+ * overflowing.
29
+ */
30
+ let TTBadge = class TTBadge extends LitElement {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.variant = "neutral";
34
+ this.size = "medium";
35
+ }
36
+ static { this.styles = css `
37
+ /* The browser's own [hidden] rule loses to any :host display, so a
38
+ hidden element would still show. Important, so it always wins. */
39
+ :host([hidden]) {
40
+ display: none !important;
41
+ }
42
+
43
+ :host {
44
+ display: inline-flex;
45
+ /* So a badge in a tight row shrinks and truncates rather than
46
+ forcing its container wider. */
47
+ min-width: 0;
48
+ max-width: 100%;
49
+ }
50
+
51
+ .badge {
52
+ --_color: var(--tt-muted-foreground);
53
+ --_surface: color-mix(in srgb, var(--_color) 13%, transparent);
54
+
55
+ display: inline-flex;
56
+ align-items: center;
57
+ gap: var(--tt-space-1);
58
+
59
+ min-width: 0;
60
+ max-width: 100%;
61
+
62
+ padding: 4px var(--tt-space-2);
63
+ border-radius: var(--tt-radius-full);
64
+
65
+ background: var(--_surface);
66
+ color: var(--_color);
67
+
68
+ font-family: var(--tt-font-sans);
69
+ font-size: var(--tt-text-xs);
70
+ font-weight: var(--tt-weight-semibold);
71
+ letter-spacing: 0.005em;
72
+
73
+ /* 1, not the body leading. See the note above: a pill gets its
74
+ height from padding, or the height is unpredictable. */
75
+ line-height: 1;
76
+
77
+ white-space: nowrap;
78
+ overflow: hidden;
79
+ text-overflow: ellipsis;
80
+ }
81
+
82
+ :host([size="small"]) .badge {
83
+ padding: 3px 7px;
84
+ font-size: 0.6875rem;
85
+ }
86
+
87
+ /*
88
+ Neutral gets a real surface rather than a mix of grey into nothing.
89
+ It is the default and by far the most used, so it has to look
90
+ deliberate rather than washed out.
91
+ */
92
+ .neutral {
93
+ --_surface: var(--tt-muted);
94
+ color: var(--tt-muted-foreground);
95
+ }
96
+
97
+ .success {
98
+ --_color: var(--tt-success);
99
+ }
100
+ .warning {
101
+ --_color: var(--tt-warning);
102
+ }
103
+ .danger {
104
+ --_color: var(--tt-destructive);
105
+ }
106
+
107
+ /* An icon inside a badge sizes to the badge, not to the 16px default,
108
+ because --tt-icon-size inherits through the boundary. */
109
+ :host {
110
+ --tt-icon-size: 12px;
111
+ }
112
+
113
+ ::slotted(tt-icon) {
114
+ flex: 0 0 auto;
115
+ }
116
+ `; }
117
+ render() {
118
+ return html `
119
+ <span class="badge ${this.variant}" part="badge">
120
+ <slot></slot>
121
+ </span>
122
+ `;
123
+ }
124
+ };
125
+ __decorate([
126
+ property({ type: String, reflect: true })
127
+ ], TTBadge.prototype, "variant", void 0);
128
+ __decorate([
129
+ property({ type: String, reflect: true })
130
+ ], TTBadge.prototype, "size", void 0);
131
+ TTBadge = __decorate([
132
+ customElement("tt-badge")
133
+ ], TTBadge);
134
+ export { TTBadge };
135
+ //# sourceMappingURL=tt-badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-badge.js","sourceRoot":"","sources":["../src/tt-badge.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAK5D;;;;;;;;;;;;;;;;;;;;GAoBG;AAEI,IAAM,OAAO,GAAb,MAAM,OAAQ,SAAQ,UAAU;IAAhC;;QACsC,YAAO,GAAiB,SAAS,CAAC;QAElC,SAAI,GAAc,QAAQ,CAAC;IA2FxE,CAAC;aAzFQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFlB,AAhFY,CAgFX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;2BACY,IAAI,CAAC,OAAO;;;KAGlC,CAAC;IACJ,CAAC;;AA5F0C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAAmC;AAElC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAA4B;AAH3D,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CA8FnB"}
@@ -0,0 +1,22 @@
1
+ import { LitElement } from "lit";
2
+ export interface Crumb {
3
+ label: string;
4
+ href?: string;
5
+ }
6
+ /**
7
+ * Trail showing where the current page sits. Emits a navigation event
8
+ * rather than following links itself, so it works with a client router,
9
+ * a server one, or neither.
10
+ */
11
+ export declare class TTBreadcrumbs extends LitElement {
12
+ items: Crumb[];
13
+ private navigate;
14
+ static styles: import("lit").CSSResult;
15
+ render(): import("lit-html").TemplateResult<1>;
16
+ }
17
+ declare global {
18
+ interface HTMLElementTagNameMap {
19
+ "tt-breadcrumbs": TTBreadcrumbs;
20
+ }
21
+ }
22
+ //# sourceMappingURL=tt-breadcrumbs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-breadcrumbs.d.ts","sourceRoot":"","sources":["../src/tt-breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAM5C,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IAEd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;GAIG;AACH,qBACa,aAAc,SAAQ,UAAU;IAChB,KAAK,EAAE,KAAK,EAAE,CAAM;IAE/C,OAAO,CAAC,QAAQ;IAkBhB,MAAM,CAAC,MAAM,0BA2DX;IAEF,MAAM;CA0CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,aAAa,CAAC;KACjC;CACF"}
@@ -0,0 +1,144 @@
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 } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ import { ifDefined } from "lit/directives/if-defined.js";
10
+ import { safeUrl } from "./safe-url.js";
11
+ /**
12
+ * Trail showing where the current page sits. Emits a navigation event
13
+ * rather than following links itself, so it works with a client router,
14
+ * a server one, or neither.
15
+ */
16
+ let TTBreadcrumbs = class TTBreadcrumbs extends LitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.items = [];
20
+ }
21
+ navigate(crumb, event) {
22
+ if (!crumb.href)
23
+ return;
24
+ // Let modified clicks through: ctrl, cmd and middle-click should open
25
+ // a new tab, which is what the browser already does with a real href.
26
+ if (event.metaKey || event.ctrlKey || event.shiftKey)
27
+ return;
28
+ event.preventDefault();
29
+ this.dispatchEvent(new CustomEvent("tt-navigate", {
30
+ detail: { href: crumb.href, label: crumb.label },
31
+ bubbles: true,
32
+ composed: true,
33
+ }));
34
+ }
35
+ static { this.styles = css `
36
+ /* The browser's own [hidden] rule loses to any :host display, so a
37
+ hidden element would still show. Important, so it always wins. */
38
+ :host([hidden]) {
39
+ display: none !important;
40
+ }
41
+
42
+ :host {
43
+ display: block;
44
+ font-family: var(--tt-font-sans);
45
+ }
46
+
47
+ ol {
48
+ display: flex;
49
+ align-items: center;
50
+ flex-wrap: wrap;
51
+ gap: var(--tt-space-2);
52
+
53
+ margin: 0;
54
+ padding: 0;
55
+ list-style: none;
56
+
57
+ font-size: var(--tt-text-xs);
58
+ color: var(--tt-muted-foreground);
59
+ }
60
+
61
+ li {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: var(--tt-space-2);
65
+ min-width: 0;
66
+ }
67
+
68
+ a {
69
+ color: inherit;
70
+ text-decoration: none;
71
+ overflow-wrap: anywhere;
72
+ }
73
+
74
+ a:hover {
75
+ color: var(--tt-foreground);
76
+ text-decoration: underline;
77
+ }
78
+
79
+ a:focus-visible {
80
+ outline: var(--tt-ring-width) solid var(--tt-ring);
81
+ outline-offset: var(--tt-ring-offset);
82
+ border-radius: var(--tt-radius-sm);
83
+ }
84
+
85
+ .current {
86
+ color: var(--tt-foreground);
87
+ font-weight: var(--tt-weight-medium);
88
+ }
89
+
90
+ .sep {
91
+ color: var(--tt-border);
92
+ user-select: none;
93
+ }
94
+ `; }
95
+ render() {
96
+ return html `
97
+ <nav aria-label="Breadcrumb" part="nav">
98
+ <ol part="list">
99
+ ${this.items.map((crumb, index) => {
100
+ const isLast = index === this.items.length - 1;
101
+ const href = crumb.href ? safeUrl(crumb.href) : null;
102
+ return html `
103
+ <li>
104
+ ${index > 0
105
+ ? html `<span class="sep" aria-hidden="true">/</span>`
106
+ : ""}
107
+
108
+ ${isLast || !href
109
+ ? html `
110
+ <!-- aria-current tells a screen reader which one is
111
+ the page you are actually on. Only the LAST: a
112
+ middle crumb with no link is just a label, and
113
+ marking it too announced two current pages. -->
114
+ <span
115
+ class="current"
116
+ aria-current=${ifDefined(isLast ? "page" : undefined)}
117
+ >
118
+ ${crumb.label}
119
+ </span>
120
+ `
121
+ : html `
122
+ <a
123
+ href=${href}
124
+ @click=${(e) => this.navigate(crumb, e)}
125
+ >
126
+ ${crumb.label}
127
+ </a>
128
+ `}
129
+ </li>
130
+ `;
131
+ })}
132
+ </ol>
133
+ </nav>
134
+ `;
135
+ }
136
+ };
137
+ __decorate([
138
+ property({ type: Array })
139
+ ], TTBreadcrumbs.prototype, "items", void 0);
140
+ TTBreadcrumbs = __decorate([
141
+ customElement("tt-breadcrumbs")
142
+ ], TTBreadcrumbs);
143
+ export { TTBreadcrumbs };
144
+ //# sourceMappingURL=tt-breadcrumbs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-breadcrumbs.js","sourceRoot":"","sources":["../src/tt-breadcrumbs.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EA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K,GAAG,CAAC;gBACT,CAAC,CAAC,IAAI,CAAA,+CAA+C;gBACrD,CAAC,CAAC,EAAE;;kBAEJ,MAAM,IAAI,CAAC,IAAI;gBACf,CAAC,CAAC,IAAI,CAAA;;;;;;;uCAOe,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;;0BAEnD,KAAK,CAAC,KAAK;;qBAEhB;gBACH,CAAC,CAAC,IAAI,CAAA;;+BAEO,IAAI;iCACF,CAAC,CAAa,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;;0BAEjD,KAAK,CAAC,KAAK;;qBAEhB;;aAER,CAAC;QACJ,CAAC,CAAC;;;KAGP,CAAC;IACJ,CAAC;;AA1H0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;4CAAqB;AADpC,aAAa;IADzB,aAAa,CAAC,gBAAgB,CAAC;GACnB,aAAa,CA4HzB"}
@@ -0,0 +1,32 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * Attaches controls into one unit: the corners where they meet flatten,
4
+ * and their borders collapse onto a single shared edge.
5
+ *
6
+ * Use it when the buttons are alternatives to each other, or steps in one
7
+ * decision. Do NOT use it as a way to save space between unrelated
8
+ * actions: joining "Reload" to "Checkout" tells the reader they belong
9
+ * together, and they do not. A plain flex row with a gap is right for
10
+ * those, which is what tt-toolbar already does.
11
+ *
12
+ * HOW IT REACHES INSIDE ITS CHILDREN. Each control's radius lives on an
13
+ * element in its own shadow root, and ::slotted() only ever matches the
14
+ * host, never anything within it. So a group cannot restyle a button's
15
+ * corners directly. What it can do is set a CUSTOM PROPERTY on the host,
16
+ * because custom properties inherit through the shadow boundary, and each
17
+ * groupable control reads `--tt-group-radius` for its own radius. The
18
+ * group sets that per position, and the child applies it.
19
+ *
20
+ * Works with tt-button, tt-dropdown-menu, tt-select and tt-input.
21
+ */
22
+ export declare class TTButtonGroup extends LitElement {
23
+ orientation: "horizontal" | "vertical";
24
+ static styles: import("lit").CSSResult;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ "tt-button-group": TTButtonGroup;
30
+ }
31
+ }
32
+ //# sourceMappingURL=tt-button-group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-button-group.d.ts","sourceRoot":"","sources":["../src/tt-button-group.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBACa,aAAc,SAAQ,UAAU;IAE3C,WAAW,EAAE,YAAY,GAAG,UAAU,CAAgB;IAEtD,MAAM,CAAC,MAAM,0BAkFX;IAEF,MAAM;CAOP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}