@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,510 @@
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, svg, css } from "lit";
8
+ import { customElement, property } from "lit/decorators.js";
9
+ /*
10
+ One icon set, drawn on one grid.
11
+
12
+ Most shapes come from Lucide (ISC) and through it Feather (MIT); the
13
+ notices are in THIRD-PARTY-NOTICES.md, which ships with the package.
14
+
15
+ Every icon is 24x24, stroked not filled, 2px wide, round caps and joins.
16
+ That is not decoration: a set drawn to one spec sits at the same optical
17
+ weight beside any other, which is the whole reason to have a set rather
18
+ than collecting shapes as you need them.
19
+
20
+ Only the SHAPES are stored here. The <svg> wrapper used to be repeated
21
+ inside every entry, which is fine for four icons and unmaintainable at
22
+ thirty: the wrapper is now written once in render(), so adding an icon
23
+ means adding its geometry and nothing else.
24
+
25
+ These replaced text glyphs. Components were using characters as icons -
26
+ the arrows on the data table, the chevrons on select, the crosses on
27
+ every close button. Glyphs render in the TEXT font, so they change shape
28
+ with the font stack, sit on the text baseline rather than centred, come
29
+ in wildly different optical sizes from each other, and simply fail to
30
+ render where the font lacks them.
31
+ */
32
+ const shapes = {
33
+ /* ---- navigation ---- */
34
+ "chevron-down": svg `<path d="m6 9 6 6 6-6" />`,
35
+ "chevron-up": svg `<path d="m18 15-6-6-6 6" />`,
36
+ "chevron-left": svg `<path d="m15 18-6-6 6-6" />`,
37
+ "chevron-right": svg `<path d="m9 18 6-6-6-6" />`,
38
+ "arrow-up": svg `<path d="M12 19V5" /><path d="m5 12 7-7 7 7" />`,
39
+ "arrow-down": svg `<path d="M12 5v14" /><path d="m19 12-7 7-7-7" />`,
40
+ "arrow-left": svg `<path d="M19 12H5" /><path d="m12 19-7-7 7-7" />`,
41
+ "arrow-right": svg `<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />`,
42
+ menu: svg `<path d="M4 6h16" /><path d="M4 12h16" /><path d="M4 18h16" />`,
43
+ "more-vertical": svg `
44
+ <circle cx="12" cy="5" r="1" />
45
+ <circle cx="12" cy="12" r="1" />
46
+ <circle cx="12" cy="19" r="1" />
47
+ `,
48
+ "more-horizontal": svg `
49
+ <circle cx="5" cy="12" r="1" />
50
+ <circle cx="12" cy="12" r="1" />
51
+ <circle cx="19" cy="12" r="1" />
52
+ `,
53
+ "external-link": svg `
54
+ <path d="M15 3h6v6" />
55
+ <path d="M10 14 21 3" />
56
+ <path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
57
+ `,
58
+ /* ---- actions ---- */
59
+ x: svg `<path d="M18 6 6 18" /><path d="m6 6 12 12" />`,
60
+ check: svg `<path d="M20 6 9 17l-5-5" />`,
61
+ plus: svg `<path d="M12 5v14" /><path d="M5 12h14" />`,
62
+ minus: svg `<path d="M5 12h14" />`,
63
+ search: svg `<circle cx="11" cy="11" r="8" /><path d="m21 21-4.34-4.34" />`,
64
+ filter: svg `<path d="M3 5h18l-7 8v6l-4 2v-8Z" />`,
65
+ refresh: svg `
66
+ <path d="M21 12a9 9 0 1 1-3-6.7" />
67
+ <path d="M21 4v5h-5" />
68
+ `,
69
+ trash: svg `
70
+ <path d="M3 6h18" />
71
+ <path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2" />
72
+ <path d="M19 6v14a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V6" />
73
+ <path d="M10 11v6" />
74
+ <path d="M14 11v6" />
75
+ `,
76
+ edit: svg `
77
+ <path d="M12 20h9" />
78
+ <path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z" />
79
+ `,
80
+ copy: svg `
81
+ <rect x="9" y="9" width="12" height="12" rx="2" />
82
+ <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
83
+ `,
84
+ download: svg `
85
+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
86
+ <path d="m7 10 5 5 5-5" />
87
+ <path d="M12 15V3" />
88
+ `,
89
+ upload: svg `
90
+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
91
+ <path d="m17 8-5-5-5 5" />
92
+ <path d="M12 3v12" />
93
+ `,
94
+ /* A hook rather than a circle: a curved arrow that closes into a loop
95
+ reads as "refresh", which already has its own icon. */
96
+ undo: svg `
97
+ <path d="m9 14-5-5 5-5" />
98
+ <path d="M4 9h11a5 5 0 0 1 0 10h-4" />
99
+ `,
100
+ redo: svg `
101
+ <path d="m15 14 5-5-5-5" />
102
+ <path d="M20 9H9a5 5 0 0 0 0 10h4" />
103
+ `,
104
+ /* ---- layout and editing ----
105
+
106
+ A shape for each kind of block on a page (rows, columns, a grid, a
107
+ box, text, a heading, a text field, a checkbox, a switch, a tag),
108
+ the tools and handles of an editor, and the three widths a layout
109
+ is previewed at. */
110
+ rows: svg `
111
+ <rect x="3" y="3" width="18" height="18" rx="2" />
112
+ <path d="M3 9h18" />
113
+ <path d="M3 15h18" />
114
+ `,
115
+ /* A box split in two: things joined side by side, a button group. */
116
+ columns: svg `
117
+ <rect x="3" y="3" width="18" height="18" rx="2" />
118
+ <path d="M12 3v18" />
119
+ `,
120
+ grid: svg `
121
+ <rect x="3" y="3" width="7" height="7" rx="1" />
122
+ <rect x="14" y="3" width="7" height="7" rx="1" />
123
+ <rect x="14" y="14" width="7" height="7" rx="1" />
124
+ <rect x="3" y="14" width="7" height="7" rx="1" />
125
+ `,
126
+ square: svg `<rect x="3" y="3" width="18" height="18" rx="2" />`,
127
+ /* ---- more kinds of block (Oct 2026, the builder's second round) ----
128
+
129
+ Tabs, a bento layout, a sidebar layout, a fixed shape, a tooltip, a
130
+ list of facts, a table, charts, keys, loading states, sharing and a
131
+ profile. Same grid and stroke as everything above. */
132
+ "panel-top": svg `
133
+ <rect x="3" y="3" width="18" height="18" rx="2" />
134
+ <path d="M3 9h18" />
135
+ <path d="M9 3v6" />
136
+ `,
137
+ "panel-left": svg `
138
+ <rect x="3" y="3" width="18" height="18" rx="2" />
139
+ <path d="M9 3v18" />
140
+ `,
141
+ "layout-dashboard": svg `
142
+ <rect x="3" y="3" width="7" height="9" rx="1" />
143
+ <rect x="14" y="3" width="7" height="5" rx="1" />
144
+ <rect x="14" y="12" width="7" height="9" rx="1" />
145
+ <rect x="3" y="16" width="7" height="5" rx="1" />
146
+ `,
147
+ /* Two boxes of different shapes over each other: a set proportion. */
148
+ ratio: svg `
149
+ <rect x="6" y="2" width="12" height="20" rx="2" />
150
+ <rect x="2" y="6" width="20" height="12" rx="2" />
151
+ `,
152
+ "message-square": svg `<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2Z" />`,
153
+ list: svg `
154
+ <path d="M3 6h.01" />
155
+ <path d="M3 12h.01" />
156
+ <path d="M3 18h.01" />
157
+ <path d="M8 6h13" />
158
+ <path d="M8 12h13" />
159
+ <path d="M8 18h13" />
160
+ `,
161
+ table: svg `
162
+ <rect x="3" y="3" width="18" height="18" rx="2" />
163
+ <path d="M3 9h18" />
164
+ <path d="M3 15h18" />
165
+ <path d="M12 3v18" />
166
+ `,
167
+ "bar-chart": svg `
168
+ <path d="M3 3v16a2 2 0 0 0 2 2h16" />
169
+ <path d="M18 17V9" />
170
+ <path d="M13 17V5" />
171
+ <path d="M8 17v-3" />
172
+ `,
173
+ "trending-up": svg `
174
+ <path d="M16 7h6v6" />
175
+ <path d="m22 7-8.5 8.5-5-5L2 17" />
176
+ `,
177
+ keyboard: svg `
178
+ <rect x="2" y="4" width="20" height="16" rx="2" />
179
+ <path d="M6 8h.01" />
180
+ <path d="M10 8h.01" />
181
+ <path d="M14 8h.01" />
182
+ <path d="M18 8h.01" />
183
+ <path d="M8 12h.01" />
184
+ <path d="M12 12h.01" />
185
+ <path d="M16 12h.01" />
186
+ <path d="M7 16h10" />
187
+ `,
188
+ /* An open ring: something loading. */
189
+ loader: svg `<path d="M21 12a9 9 0 1 1-6.22-8.56" />`,
190
+ /* A dashed outline: a placeholder for content still to come. */
191
+ "square-dashed": svg `
192
+ <path d="M5 3a2 2 0 0 0-2 2" />
193
+ <path d="M19 3a2 2 0 0 1 2 2" />
194
+ <path d="M21 19a2 2 0 0 1-2 2" />
195
+ <path d="M5 21a2 2 0 0 1-2-2" />
196
+ <path d="M9 3h1" />
197
+ <path d="M9 21h1" />
198
+ <path d="M14 3h1" />
199
+ <path d="M14 21h1" />
200
+ <path d="M3 9v1" />
201
+ <path d="M21 9v1" />
202
+ <path d="M3 14v1" />
203
+ <path d="M21 14v1" />
204
+ `,
205
+ share: svg `
206
+ <circle cx="18" cy="5" r="3" />
207
+ <circle cx="6" cy="12" r="3" />
208
+ <circle cx="18" cy="19" r="3" />
209
+ <path d="m8.59 13.51 6.83 3.98" />
210
+ <path d="m15.41 6.51-6.82 3.98" />
211
+ `,
212
+ hash: svg `
213
+ <path d="M4 9h16" />
214
+ <path d="M4 15h16" />
215
+ <path d="M10 3 8 21" />
216
+ <path d="M16 3l-2 18" />
217
+ `,
218
+ contact: svg `
219
+ <rect x="3" y="4" width="18" height="18" rx="2" />
220
+ <path d="M8 2v2" />
221
+ <path d="M16 2v2" />
222
+ <circle cx="12" cy="11" r="3" />
223
+ <path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" />
224
+ `,
225
+ file: svg `
226
+ <path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" />
227
+ <path d="M14 2v4a2 2 0 0 0 2 2h4" />
228
+ `,
229
+ "eye-off": svg `
230
+ <path d="M10.73 5.08A10.74 10.74 0 0 1 21.94 11.65a1 1 0 0 1 0 .7 10.75 10.75 0 0 1-1.44 2.49" />
231
+ <path d="M14.08 14.16a3 3 0 0 1-4.24-4.24" />
232
+ <path d="M17.48 17.5a10.75 10.75 0 0 1-15.42-5.15 1 1 0 0 1 0-.7 10.75 10.75 0 0 1 4.45-5.14" />
233
+ <path d="m2 2 20 20" />
234
+ `,
235
+ /* Text as such, where heading is a titled block. */
236
+ type: svg `
237
+ <path d="M4 7V4h16v3" />
238
+ <path d="M9 20h6" />
239
+ <path d="M12 4v16" />
240
+ `,
241
+ heading: svg `
242
+ <path d="M6 4v16" />
243
+ <path d="M18 4v16" />
244
+ <path d="M6 12h12" />
245
+ `,
246
+ "align-left": svg `
247
+ <path d="M4 6h16" />
248
+ <path d="M4 12h10" />
249
+ <path d="M4 18h13" />
250
+ `,
251
+ "text-cursor": svg `
252
+ <path d="M8 3h1a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H8" />
253
+ <path d="M16 3h-1a3 3 0 0 0-3 3" />
254
+ <path d="M16 21h-1a3 3 0 0 1-3-3" />
255
+ `,
256
+ "mouse-pointer": svg `
257
+ <path d="M4 4l6.5 16 2.4-7.1 7.1-2.4Z" />
258
+ <path d="m13 13 6 6" />
259
+ `,
260
+ /* The same tick as check-circle, so the two read as one family. */
261
+ "check-square": svg `
262
+ <rect x="3" y="3" width="18" height="18" rx="2" />
263
+ <path d="m8.5 12.5 2.5 2.5 5-5" />
264
+ `,
265
+ "toggle-right": svg `
266
+ <rect x="2" y="6" width="20" height="12" rx="6" />
267
+ <circle cx="16" cy="12" r="2" />
268
+ `,
269
+ tag: svg `
270
+ <path d="M3 3h8l10 10-8 8L3 11Z" />
271
+ <path d="M7.5 7.5h.01" />
272
+ `,
273
+ code: svg `
274
+ <path d="m8 7-5 5 5 5" />
275
+ <path d="m16 7 5 5-5 5" />
276
+ <path d="m14 5-4 14" />
277
+ `,
278
+ layers: svg `
279
+ <path d="m12 3 9 5-9 5-9-5Z" />
280
+ <path d="m3 12 9 5 9-5" />
281
+ <path d="m3 16 9 5 9-5" />
282
+ `,
283
+ /* more-vertical, twice: the same dots on the same rhythm. */
284
+ "grip-vertical": svg `
285
+ <circle cx="9" cy="5" r="1" />
286
+ <circle cx="9" cy="12" r="1" />
287
+ <circle cx="9" cy="19" r="1" />
288
+ <circle cx="15" cy="5" r="1" />
289
+ <circle cx="15" cy="12" r="1" />
290
+ <circle cx="15" cy="19" r="1" />
291
+ `,
292
+ smartphone: svg `
293
+ <rect x="6" y="2" width="12" height="20" rx="2" />
294
+ <path d="M12 18h.01" />
295
+ `,
296
+ tablet: svg `
297
+ <rect x="4" y="2" width="16" height="20" rx="2" />
298
+ <path d="M12 18h.01" />
299
+ `,
300
+ monitor: svg `
301
+ <rect x="2" y="3" width="20" height="14" rx="2" />
302
+ <path d="M12 17v4" />
303
+ <path d="M8 21h8" />
304
+ `,
305
+ /* ---- status ---- */
306
+ info: svg `
307
+ <circle cx="12" cy="12" r="10" />
308
+ <path d="M12 16v-4" />
309
+ <path d="M12 8h.01" />
310
+ `,
311
+ "alert-triangle": svg `
312
+ <path d="M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" />
313
+ <path d="M12 9v4" />
314
+ <path d="M12 17h.01" />
315
+ `,
316
+ "check-circle": svg `
317
+ <circle cx="12" cy="12" r="10" />
318
+ <path d="m8.5 12.5 2.5 2.5 5-5" />
319
+ `,
320
+ "x-circle": svg `
321
+ <circle cx="12" cy="12" r="10" />
322
+ <path d="m15 9-6 6" />
323
+ <path d="m9 9 6 6" />
324
+ `,
325
+ star: svg `
326
+ <path
327
+ d="m12 3 2.7 5.5 6.1.9-4.4 4.3 1 6-5.4-2.9-5.4 2.9 1-6L3.2 9.4l6.1-.9Z"
328
+ />
329
+ `,
330
+ /* ---- objects ---- */
331
+ user: svg `<circle cx="12" cy="8" r="4" /><path d="M4 21c0-4 3.5-7 8-7s8 3 8 7" />`,
332
+ users: svg `
333
+ <circle cx="9" cy="8" r="4" />
334
+ <path d="M2 21c0-3.9 3.1-6 7-6s7 2.1 7 6" />
335
+ <path d="M16 4.5a4 4 0 0 1 0 7" />
336
+ <path d="M18 15.5c2.5.8 4 2.7 4 5.5" />
337
+ `,
338
+ settings: svg `
339
+ <circle cx="12" cy="12" r="3" />
340
+ <path
341
+ d="M19.4 15a1.7 1.7 0 0 0 .3 1.9l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-2.9 1.2 2 2 0 1 1-4 0 1.7 1.7 0 0 0-2.9-1.2l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.7 1.7 0 0 0 3 15a2 2 0 1 1 0-4 1.7 1.7 0 0 0 1.2-2.9l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1A1.7 1.7 0 0 0 10 4.6a2 2 0 1 1 4 0 1.7 1.7 0 0 0 2.9 1.2l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1A1.7 1.7 0 0 0 21 11a2 2 0 1 1 0 4 1.7 1.7 0 0 0-1.6 1Z"
342
+ />
343
+ `,
344
+ mail: svg `
345
+ <rect x="2" y="4" width="20" height="16" rx="2" />
346
+ <path d="m2 7 10 6 10-6" />
347
+ `,
348
+ phone: svg `
349
+ <path
350
+ d="M22 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2 4.2 2 2 0 0 1 4 2h3a2 2 0 0 1 2 1.7c.1 1 .4 1.9.7 2.8a2 2 0 0 1-.5 2.1L8.1 9.9a16 16 0 0 0 6 6l1.3-1.1a2 2 0 0 1 2.1-.5c.9.3 1.8.6 2.8.7a2 2 0 0 1 1.7 2Z"
351
+ />
352
+ `,
353
+ calendar: svg `
354
+ <rect x="3" y="5" width="18" height="16" rx="2" />
355
+ <path d="M16 3v4" />
356
+ <path d="M8 3v4" />
357
+ <path d="M3 11h18" />
358
+ `,
359
+ building: svg `
360
+ <rect x="4" y="3" width="16" height="18" rx="1" />
361
+ <path d="M9 8h.01" /><path d="M15 8h.01" />
362
+ <path d="M9 12h.01" /><path d="M15 12h.01" />
363
+ <path d="M10 21v-4h4v4" />
364
+ `,
365
+ package: svg `
366
+ <path d="M21 8v8a2 2 0 0 1-1 1.7l-7 4a2 2 0 0 1-2 0l-7-4A2 2 0 0 1 3 16V8a2 2 0 0 1 1-1.7l7-4a2 2 0 0 1 2 0l7 4A2 2 0 0 1 21 8Z" />
367
+ <path d="m3.3 7 8.7 5 8.7-5" />
368
+ <path d="M12 22V12" />
369
+ `,
370
+ "shopping-bag": svg `
371
+ <path d="M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z" />
372
+ <path d="M3 6h18" />
373
+ <path d="M16 10a4 4 0 0 1-8 0" />
374
+ `,
375
+ home: svg `
376
+ <path d="m3 10 9-7 9 7v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z" />
377
+ <path d="M9 21v-7h6v7" />
378
+ `,
379
+ eye: svg `
380
+ <path d="M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7-10-7-10-7Z" />
381
+ <circle cx="12" cy="12" r="3" />
382
+ `,
383
+ /* The frame, a sun and a hill. tt-image draws this when there is no
384
+ source or the source failed, so the empty box still reads as "a
385
+ picture belongs here" rather than as a broken layout. */
386
+ image: svg `
387
+ <rect x="3" y="3" width="18" height="18" rx="2" />
388
+ <circle cx="8.5" cy="8.5" r="1.5" />
389
+ <path d="m21 15-4.5-4.5L5 21" />
390
+ `,
391
+ lock: svg `
392
+ <rect x="4" y="10" width="16" height="11" rx="2" />
393
+ <path d="M8 10V7a4 4 0 0 1 8 0v3" />
394
+ `,
395
+ sun: svg `
396
+ <circle cx="12" cy="12" r="4" />
397
+ <path d="M12 2v2" /><path d="M12 20v2" />
398
+ <path d="M4.9 4.9 6.3 6.3" /><path d="M17.7 17.7l1.4 1.4" />
399
+ <path d="M2 12h2" /><path d="M20 12h2" />
400
+ <path d="M6.3 17.7 4.9 19.1" /><path d="M19.1 4.9 17.7 6.3" />
401
+ `,
402
+ moon: svg `<path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z" />`,
403
+ claude: svg `
404
+ <path
405
+ d="M4.7 15.9 9 13.4l.1-.2-.1-.2h-.2l-.7-.1H5.7l-2.1-.1-1.8-.1-1.8-.2-.4-.4.1-.3.3-.2.5.1 1.1.1 1.6.1 1.2.1 1.7.2h.3v-.1l-.1-.1-.2-.1-1.5-1-1.6-1.1-.9-.6-.4-.3-.2-.3-.1-.6.4-.4h.5l.2.1 1.5 1.2 2 1.5.3.2v-.2l-.1-.2-.7-1.3-.8-1.4-.4-.6-.1-.3v-.5l.3-.2.4.1.4.2.6.8 1.3 1.8.2.3.1-.1v-.1L8 6.8l-.5-2.3-.2-1.2v-.9l.2-.3.4-.1.4.2.3.4.5 1.1.8 1.8 1.2 2.4.4.7.2.2h.1V8.5l-.1-1.3-.2-1.6-.1-.7v-1l.2-.3.4-.1.3.1.3.4.2.6.3 1.4.5 2.4.2.7.1.1.1-.1.2-1.4.3-1.7.3-2.2.1-.6.3-.7.7-.2.4.3.1.6-.1.6-.4 2.4-.6 3v.4l.2-.1.7-1 1.2-1.5.5-.6.6-.6.4-.2h.7l.3.5-.1.5-.5.6-.4.5-.6.8-.4.6.1.1.4-.1 2-.4 1.1-.2 1.3-.2.6.3.1.3-.3.6-1.6.4-1.9.4-2.8.6h-.1l.1.1 1.3.1h2l1.6.1.4.3-.2.4-.4.2-.7-.1-2.6-.6-.9-.2h-.1l.5.5 1.6 1.5 2 1.9.1.5-.3.4h-.3l-1-.7-1.8-1.4-1.4-1.1h-.1l.1.2 1 1.5.6 1.9-.1.5-.3.1-.4-.1-.7-1-.8-1.1-.6-1.1-.1.1-.4 3.9-.2.2-.4.2-.4-.3-.2-.5.2-1 .3-1.3.2-1v-.6h-.1l-.6.8-.9 1.2-.7.8-.2.1-.3-.2v-.3l.2-.2.9-1.2.6-.7.4-.4v-.2h-.1l-1.7 1.1-3 1.6-.6.1-.3-.2v-.3l.2-.2 1-.7Z"
406
+ fill="currentColor"
407
+ stroke="none"
408
+ />
409
+ `,
410
+ };
411
+ /** Every icon name, so a docs page can list them without a second list. */
412
+ export const ICON_NAMES = Object.keys(shapes).sort();
413
+ let TTIcon = class TTIcon extends LitElement {
414
+ constructor() {
415
+ super(...arguments);
416
+ this.name = "";
417
+ /*
418
+ Empty by default, NOT "16px".
419
+
420
+ An inline style beats an inherited custom property, so a default of
421
+ "16px" meant every icon always carried an inline --tt-icon-size and a
422
+ container could never size the icons inside it. tt-button wants small
423
+ buttons to get small icons, and that only works if an icon with no
424
+ explicit size stays open to inheritance. The 16px default now lives in
425
+ the CSS fallback instead, so nothing that relied on it changes.
426
+ */
427
+ this.size = "";
428
+ }
429
+ willUpdate(changed) {
430
+ if (!changed.has("size"))
431
+ return;
432
+ if (this.size) {
433
+ this.style.setProperty("--tt-icon-size", this.size);
434
+ }
435
+ else {
436
+ this.style.removeProperty("--tt-icon-size");
437
+ }
438
+ }
439
+ static { this.styles = css `
440
+ /* The browser's own [hidden] rule loses to any :host display, so a
441
+ hidden element would still show. Important, so it always wins. */
442
+ :host([hidden]) {
443
+ display: none !important;
444
+ }
445
+
446
+ :host {
447
+ display: inline-flex;
448
+
449
+ width: var(--tt-icon-size, 16px);
450
+ height: var(--tt-icon-size, 16px);
451
+
452
+ flex: 0 0 auto;
453
+ align-items: center;
454
+ justify-content: center;
455
+
456
+ /* Zero, so an icon beside text does not inherit the line box and
457
+ push the row taller than the text needs. */
458
+ line-height: 0;
459
+ vertical-align: middle;
460
+
461
+ color: currentColor;
462
+
463
+ contain: layout paint;
464
+ }
465
+
466
+ svg {
467
+ display: block;
468
+
469
+ width: 100%;
470
+ height: 100%;
471
+
472
+ color: currentColor;
473
+
474
+ shape-rendering: geometricPrecision;
475
+ }
476
+ `; }
477
+ render() {
478
+ const shape = shapes[this.name];
479
+ // Unknown name renders nothing rather than a broken box. An icon is
480
+ // decoration in almost every case; a missing one should not leave a
481
+ // hole in the layout.
482
+ if (!shape)
483
+ return html ``;
484
+ return html `
485
+ <svg
486
+ viewBox="0 0 24 24"
487
+ fill="none"
488
+ stroke="currentColor"
489
+ stroke-width="2"
490
+ stroke-linecap="round"
491
+ stroke-linejoin="round"
492
+ aria-hidden="true"
493
+ focusable="false"
494
+ >
495
+ ${shape}
496
+ </svg>
497
+ `;
498
+ }
499
+ };
500
+ __decorate([
501
+ property({ type: String })
502
+ ], TTIcon.prototype, "name", void 0);
503
+ __decorate([
504
+ property({ type: String })
505
+ ], TTIcon.prototype, "size", void 0);
506
+ TTIcon = __decorate([
507
+ customElement("tt-icon")
508
+ ], TTIcon);
509
+ export { TTIcon };
510
+ //# sourceMappingURL=tt-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-icon.js","sourceRoot":"","sources":["../src/tt-icon.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;EAsBE;AACF,MAAM,MAAM,GAAsC;IAChD,0BAA0B;IAE1B,cAAc,EAAE,GAAG,CAAA,2BAA2B;IAC9C,YAAY,EAAE,GAAG,CAAA,6BAA6B;IAC9C,cAAc,EAAE,GAAG,CAAA,6BAA6B;IAChD,eAAe,EAAE,GAAG,CAAA,4BAA4B;IAEhD,UAAU,EAAE,GAAG,CAAA,iDAAiD;IAChE,YAAY,EAAE,GAAG,CAAA,kDAAkD;IACnE,YAAY,EAAE,GAAG,CAAA,kDAAkD;IACnE,aAAa,EAAE,GAAG,CAAA,iDAAiD;IAEnE,IAAI,EAAE,GAAG,CAAA,gEAAgE;IAEzE,eAAe,EAAE,GAAG,CAAA;;;;GAInB;IAED,iBAAiB,EAAE,GAAG,CAAA;;;;GAIrB;IAED,eAAe,EAAE,GAAG,CAAA;;;;GAInB;IAED,uBAAuB;IAEvB,CAAC,EAAE,GAAG,CAAA,gDAAgD;IACtD,KAAK,EAAE,GAAG,CAAA,8BAA8B;IACxC,IAAI,EAAE,GAAG,CAAA,4CAA4C;IACrD,KAAK,EAAE,GAAG,CAAA,uBAAuB;IAEjC,MAAM,EAAE,GAAG,CAAA,+DAA+D;IAE1E,MAAM,EAAE,GAAG,CAAA,sCAAsC;IAEjD,OAAO,EAAE,GAAG,CAAA;;;GAGX;IAED,KAAK,EAAE,GAAG,CAAA;;;;;;GAMT;IAED,IAAI,EAAE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AAE,IAAI,EAAE,MAAM,EAAE,CAAC;oCAAW;AAb3B,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CAuFlB"}
@@ -0,0 +1,59 @@
1
+ import { LitElement } from "lit";
2
+ import type { PropertyValues } from "lit";
3
+ import "./tt-icon.js";
4
+ export type ImageFit = "cover" | "contain";
5
+ export type ImageRadius = "none" | "small" | "medium" | "large" | "xlarge" | "2xlarge" | "full";
6
+ /**
7
+ * An image in a box the PARENT sizes.
8
+ *
9
+ * Six properties, and each one answers a question you actually have when
10
+ * you place an image: how big is the box (ratio), what happens to a photo
11
+ * that is not that shape (fit), what are the corners (radius), and is
12
+ * this the one image worth loading early (priority).
13
+ *
14
+ * There is deliberately no size scale. The host is a block that fills its
15
+ * container, so a card wanting a 34px logo says 34px in its own CSS and
16
+ * wins, because rules from the tree that owns an element beat that
17
+ * element's :host. A fixed scale here (icon, profile, small, medium,
18
+ * large) was five pixel values from one app baked into a library meant
19
+ * for apps that do not exist yet, and three consumers ended up reaching
20
+ * through ::part just to undo it.
21
+ *
22
+ * The other half of the job is that real images fail, arrive late, or
23
+ * arrive already cached, so the load is treated as state: a skeleton
24
+ * while it downloads, a fallback if it never arrives.
25
+ *
26
+ * @fires tt-load - When the image has loaded.
27
+ * @fires tt-error - { src } when it failed and the fallback is showing.
28
+ * (Declared here because the analyzer does not see dispatches inside
29
+ * arrow-function fields, so the manifest left both out.)
30
+ */
31
+ export declare class TTImage extends LitElement {
32
+ src: string;
33
+ /** Describe the picture, or pass "" when it is decorative. */
34
+ alt: string;
35
+ /** Any CSS aspect-ratio: "16 / 9", "4 / 5", "1". Empty means intrinsic. */
36
+ ratio: string;
37
+ fit: ImageFit;
38
+ radius: ImageRadius;
39
+ /**
40
+ * Above the fold. Loads eagerly and asks the browser to prioritise the
41
+ * fetch, which a hero image needs and a thumbnail never does.
42
+ */
43
+ priority: boolean;
44
+ private status;
45
+ private img?;
46
+ private get showFallback();
47
+ willUpdate(changed: PropertyValues): void;
48
+ updated(): void;
49
+ private handleLoad;
50
+ private handleError;
51
+ static styles: import("lit").CSSResult;
52
+ render(): import("lit-html").TemplateResult<1>;
53
+ }
54
+ declare global {
55
+ interface HTMLElementTagNameMap {
56
+ "tt-image": TTImage;
57
+ }
58
+ }
59
+ //# sourceMappingURL=tt-image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-image.d.ts","sourceRoot":"","sources":["../src/tt-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAI1C,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAG3C,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,CAAC;AAIX;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,OAAQ,SAAQ,UAAU;IACT,GAAG,SAAM;IAErC,8DAA8D;IAClC,GAAG,SAAM;IAErC,2EAA2E;IAC/C,KAAK,SAAM;IAEI,GAAG,EAAE,QAAQ,CAAW;IAExB,MAAM,EAAE,WAAW,CAAY;IAE1E;;;OAGG;IAC0B,QAAQ,UAAS;IAErC,OAAO,CAAC,MAAM,CAAqB;IAMhB,OAAO,CAAC,GAAG,CAAC,CAAmB;IAE3D,OAAO,KAAK,YAAY,GAEvB;IAED,UAAU,CAAC,OAAO,EAAE,cAAc;IAmBlC,OAAO;IAkBP,OAAO,CAAC,UAAU,CAKhB;IAEF,OAAO,CAAC,WAAW,CASjB;IAEF,MAAM,CAAC,MAAM,0BA2IX;IAEF,MAAM;CAyCP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,OAAO,CAAC;KACrB;CACF"}