@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,163 @@
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
+ let TTPage = class TTPage extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ // Named `heading` rather than `title` so it cannot collide with the
13
+ // global HTML title attribute (which renders a native tooltip).
14
+ this.heading = "";
15
+ this.description = "";
16
+ // How wide the content column may grow. Documentation wants a narrow,
17
+ // readable measure; an app dashboard usually wants the full width.
18
+ // Reflected so the :host([width=...]) rules below can match.
19
+ this.width = "default";
20
+ }
21
+ static { this.styles = css `
22
+ /* The browser's own [hidden] rule loses to any :host display, so a
23
+ hidden element would still show. Important, so it always wins. */
24
+ :host([hidden]) {
25
+ display: none !important;
26
+ }
27
+
28
+ :host {
29
+ display: block;
30
+
31
+ /* One variable drives the column; each width overrides just this. */
32
+ --_max: 1000px;
33
+
34
+ font-family: var(--tt-font-sans);
35
+
36
+ -webkit-font-smoothing: antialiased;
37
+ text-rendering: optimizeLegibility;
38
+
39
+ color: var(--tt-foreground);
40
+ }
41
+
42
+ /* Reading measure, for prose and documentation. */
43
+ :host([width="narrow"]) {
44
+ --_max: 720px;
45
+ }
46
+
47
+ :host([width="wide"]) {
48
+ --_max: 1400px;
49
+ }
50
+
51
+ /* Edge to edge: dashboards, tables, anything data-dense. */
52
+ :host([width="full"]) {
53
+ --_max: none;
54
+ }
55
+
56
+ .page {
57
+ max-width: var(--_max);
58
+ margin: 0 auto;
59
+ padding: var(--tt-space-12) var(--tt-space-8);
60
+ box-sizing: border-box;
61
+ }
62
+
63
+ h1 {
64
+ margin: 0;
65
+
66
+ font-family: var(--tt-font-display);
67
+ font-size: var(--tt-text-3xl);
68
+ font-weight: var(--tt-weight-bold);
69
+ line-height: var(--tt-leading-tight);
70
+ letter-spacing: -0.02em;
71
+
72
+ color: var(--tt-foreground);
73
+ }
74
+
75
+ p {
76
+ margin: var(--tt-space-2) 0 0;
77
+ max-width: 62ch;
78
+
79
+ color: var(--tt-muted-foreground);
80
+
81
+ font-size: var(--tt-text-md);
82
+ line-height: var(--tt-leading-relaxed);
83
+ }
84
+
85
+ /*
86
+ The page owns the spacing between its children. Children never set
87
+ their own outer margins, so any mix of sections, grids and tables
88
+ spaces evenly without knowing about each other.
89
+ */
90
+ .content {
91
+ margin-top: var(--tt-space-10);
92
+
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: var(--tt-space-10);
96
+ }
97
+
98
+ @media (max-width: 768px) {
99
+ .page {
100
+ padding: var(--tt-space-8) var(--tt-space-5);
101
+ }
102
+
103
+ h1 {
104
+ font-size: var(--tt-text-2xl);
105
+ }
106
+
107
+ .content {
108
+ margin-top: var(--tt-space-8);
109
+ }
110
+ }
111
+
112
+ @media (max-width: 480px) {
113
+ .page {
114
+ /*
115
+ space-3 horizontally, matching --tt-bento-gap.
116
+
117
+ The inset around a grid should equal the gutter inside it, or the
118
+ first tile reads as further from the screen edge than it is from
119
+ its neighbour and the whole block looks off-centre. On a phone
120
+ this is the difference between a mosaic and a list of boxes with
121
+ a margin.
122
+
123
+ It is also simply more screen: 12px a side on a 390px phone is
124
+ worth about 10% of the width back.
125
+ */
126
+ padding: var(--tt-space-6) var(--tt-space-3);
127
+ }
128
+
129
+ h1 {
130
+ font-size: var(--tt-text-xl);
131
+ }
132
+ }
133
+ `; }
134
+ render() {
135
+ return html `
136
+ <div class="page" part="page">
137
+ <h1 part="heading">${this.heading}</h1>
138
+
139
+ ${this.description
140
+ ? html `<p part="description">${this.description}</p>`
141
+ : ""}
142
+
143
+ <div class="content" part="content">
144
+ <slot></slot>
145
+ </div>
146
+ </div>
147
+ `;
148
+ }
149
+ };
150
+ __decorate([
151
+ property({ type: String })
152
+ ], TTPage.prototype, "heading", void 0);
153
+ __decorate([
154
+ property({ type: String })
155
+ ], TTPage.prototype, "description", void 0);
156
+ __decorate([
157
+ property({ type: String, reflect: true })
158
+ ], TTPage.prototype, "width", void 0);
159
+ TTPage = __decorate([
160
+ customElement("tt-page")
161
+ ], TTPage);
162
+ export { TTPage };
163
+ //# sourceMappingURL=tt-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-page.js","sourceRoot":"","sources":["../src/tt-page.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGrD,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,UAAU;IAA/B;;QACL,oEAAoE;QACpE,gEAAgE;QAEhE,YAAO,GAAG,EAAE,CAAC;QAGb,gBAAW,GAAG,EAAE,CAAC;QAEjB,sEAAsE;QACtE,mEAAmE;QACnE,6DAA6D;QAE7D,UAAK,GAA2C,SAAS,CAAC;IAmI5D,CAAC;aAjIQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHlB,AAhHY,CAgHX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;6BAEc,IAAI,CAAC,OAAO;;UAE/B,IAAI,CAAC,WAAW;YAChB,CAAC,CAAC,IAAI,CAAA,yBAAyB,IAAI,CAAC,WAAW,MAAM;YACrD,CAAC,CAAC,EAAE;;;;;;KAMT,CAAC;IACJ,CAAC;;AA3ID;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uCACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACV;AAMjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCACgB;AAb/C,MAAM;IADlB,aAAa,CAAC,SAAS,CAAC;GACZ,MAAM,CAgJlB"}
@@ -0,0 +1,27 @@
1
+ import { LitElement } from "lit";
2
+ import "./tt-button.js";
3
+ import "./tt-icon.js";
4
+ /**
5
+ * Page navigation. Owns nothing: the current page comes in, and a click
6
+ * emits the page you asked for. The parent decides what that means and
7
+ * passes the new page back down.
8
+ */
9
+ export declare class TTPagination extends LitElement {
10
+ page: number;
11
+ total: number;
12
+ pageSize: number;
13
+ siblings: number;
14
+ private get pageCount();
15
+ private get current();
16
+ private get pages();
17
+ private go;
18
+ private get range();
19
+ static styles: import("lit").CSSResult;
20
+ render(): import("lit-html").TemplateResult<1>;
21
+ }
22
+ declare global {
23
+ interface HTMLElementTagNameMap {
24
+ "tt-pagination": TTPagination;
25
+ }
26
+ }
27
+ //# sourceMappingURL=tt-pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-pagination.d.ts","sourceRoot":"","sources":["../src/tt-pagination.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AACH,qBACa,YAAa,SAAQ,UAAU;IACd,IAAI,SAAK;IAET,KAAK,SAAK;IAEc,QAAQ,SAAM;IAItC,QAAQ,SAAK;IAIzC,OAAO,KAAK,SAAS,GAEpB;IAED,OAAO,KAAK,OAAO,GAIlB;IAQD,OAAO,KAAK,KAAK,GAwBhB;IAED,OAAO,CAAC,EAAE;IAYV,OAAO,KAAK,KAAK,GAIhB;IAED,MAAM,CAAC,MAAM,0BAkDX;IAEF,MAAM;CAqDP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
@@ -0,0 +1,194 @@
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 "./tt-button.js";
10
+ import "./tt-icon.js";
11
+ /**
12
+ * Page navigation. Owns nothing: the current page comes in, and a click
13
+ * emits the page you asked for. The parent decides what that means and
14
+ * passes the new page back down.
15
+ */
16
+ let TTPagination = class TTPagination extends LitElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.page = 1;
20
+ this.total = 0;
21
+ this.pageSize = 10;
22
+ // How many numbered buttons to show around the current page before
23
+ // collapsing the rest into an ellipsis.
24
+ this.siblings = 1;
25
+ }
26
+ // Derived, never stored: total pages is a function of two properties
27
+ // that already exist, so it cannot go stale.
28
+ get pageCount() {
29
+ return Math.max(1, Math.ceil(this.total / this.pageSize));
30
+ }
31
+ get current() {
32
+ // Clamp, so a page number left over from a longer list cannot point
33
+ // past the end after the results shrink.
34
+ return Math.min(Math.max(1, this.page), this.pageCount);
35
+ }
36
+ /*
37
+ Which numbers to show. Always the first and last page, plus a window
38
+ around the current one, with -1 standing in for an ellipsis.
39
+
40
+ 1 ... 4 [5] 6 ... 20
41
+ */
42
+ get pages() {
43
+ const count = this.pageCount;
44
+ const current = this.current;
45
+ const span = this.siblings;
46
+ // Few enough to show them all.
47
+ if (count <= span * 2 + 5) {
48
+ return Array.from({ length: count }, (_, i) => i + 1);
49
+ }
50
+ const result = [1];
51
+ const start = Math.max(2, current - span);
52
+ const end = Math.min(count - 1, current + span);
53
+ if (start > 2)
54
+ result.push(-1);
55
+ for (let i = start; i <= end; i++)
56
+ result.push(i);
57
+ if (end < count - 1)
58
+ result.push(-1);
59
+ result.push(count);
60
+ return result;
61
+ }
62
+ go(page) {
63
+ if (page === this.current || page < 1 || page > this.pageCount)
64
+ return;
65
+ this.dispatchEvent(new CustomEvent("tt-page-change", {
66
+ detail: { page },
67
+ bubbles: true,
68
+ composed: true,
69
+ }));
70
+ }
71
+ get range() {
72
+ const from = (this.current - 1) * this.pageSize + 1;
73
+ const to = Math.min(this.current * this.pageSize, this.total);
74
+ return { from, to };
75
+ }
76
+ static { this.styles = css `
77
+ /* The browser's own [hidden] rule loses to any :host display, so a
78
+ hidden element would still show. Important, so it always wins. */
79
+ :host([hidden]) {
80
+ display: none !important;
81
+ }
82
+
83
+ :host {
84
+ display: block;
85
+ font-family: var(--tt-font-sans);
86
+ }
87
+
88
+ .bar {
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: space-between;
92
+ flex-wrap: wrap;
93
+ gap: var(--tt-space-3);
94
+ }
95
+
96
+ .summary {
97
+ font-size: var(--tt-text-sm);
98
+ color: var(--tt-muted-foreground);
99
+ font-variant-numeric: tabular-nums;
100
+ }
101
+
102
+ /*
103
+ Wraps, so the row fits any container. A middle page draws the most
104
+ buttons (previous, 1, ..., 9, 10, 11, ..., 20, next), and at touch
105
+ size that row is wider than a phone. Without wrap its min-content
106
+ width was the whole row, so it could only stick out.
107
+ */
108
+ .pages {
109
+ display: flex;
110
+ flex-wrap: wrap;
111
+ align-items: center;
112
+ gap: var(--tt-space-1);
113
+ }
114
+
115
+ .ellipsis {
116
+ padding: 0 var(--tt-space-1);
117
+ color: var(--tt-muted-foreground);
118
+ user-select: none;
119
+ }
120
+
121
+ /* Square at minimum, from the same token as the button's height, so
122
+ the number buttons grow with the touch and density modes too. */
123
+ tt-button {
124
+ min-width: var(--tt-control-sm);
125
+ }
126
+ `; }
127
+ render() {
128
+ // One page of results needs no controls at all.
129
+ if (this.pageCount <= 1)
130
+ return html ``;
131
+ const current = this.current;
132
+ const { from, to } = this.range;
133
+ return html `
134
+ <nav class="bar" part="bar" aria-label="Pagination">
135
+ <span class="summary">
136
+ ${from}-${to} of ${this.total}
137
+ </span>
138
+
139
+ <div class="pages">
140
+ <tt-button
141
+ variant="secondary"
142
+ size="small"
143
+ ?disabled=${current === 1}
144
+ label="Previous page"
145
+ @tt-button-click=${() => this.go(current - 1)}
146
+ >
147
+ <tt-icon name="chevron-left" size="16px"></tt-icon>
148
+ </tt-button>
149
+
150
+ ${this.pages.map((page) => page === -1
151
+ ? html `<span class="ellipsis" aria-hidden="true">…</span>`
152
+ : html `
153
+ <tt-button
154
+ variant=${page === current ? "primary" : "secondary"}
155
+ size="small"
156
+ label=${`Page ${page}`}
157
+ current=${page === current ? "page" : ""}
158
+ @tt-button-click=${() => this.go(page)}
159
+ >
160
+ ${page}
161
+ </tt-button>
162
+ `)}
163
+
164
+ <tt-button
165
+ variant="secondary"
166
+ size="small"
167
+ ?disabled=${current === this.pageCount}
168
+ label="Next page"
169
+ @tt-button-click=${() => this.go(current + 1)}
170
+ >
171
+ <tt-icon name="chevron-right" size="16px"></tt-icon>
172
+ </tt-button>
173
+ </div>
174
+ </nav>
175
+ `;
176
+ }
177
+ };
178
+ __decorate([
179
+ property({ type: Number })
180
+ ], TTPagination.prototype, "page", void 0);
181
+ __decorate([
182
+ property({ type: Number })
183
+ ], TTPagination.prototype, "total", void 0);
184
+ __decorate([
185
+ property({ type: Number, attribute: "page-size" })
186
+ ], TTPagination.prototype, "pageSize", void 0);
187
+ __decorate([
188
+ property({ type: Number })
189
+ ], TTPagination.prototype, "siblings", void 0);
190
+ TTPagination = __decorate([
191
+ customElement("tt-pagination")
192
+ ], TTPagination);
193
+ export { TTPagination };
194
+ //# sourceMappingURL=tt-pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-pagination.js","sourceRoot":"","sources":["../src/tt-pagination.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AAEI,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,UAAU;IAArC;;QACuB,SAAI,GAAG,CAAC,CAAC;QAET,UAAK,GAAG,CAAC,CAAC;QAEc,aAAQ,GAAG,EAAE,C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itElement {
3
+ static styles: import("lit").CSSResult;
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
6
+ declare global {
7
+ interface HTMLElementTagNameMap {
8
+ "tt-preview": TTPreview;
9
+ }
10
+ }
11
+ //# sourceMappingURL=tt-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-preview.d.ts","sourceRoot":"","sources":["../src/tt-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,qBACa,SAAU,SAAQ,UAAU;IACvC,MAAM,CAAC,MAAM,0BA6CX;IAEF,MAAM;CAOP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
@@ -0,0 +1,68 @@
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 } from "lit/decorators.js";
9
+ let TTPreview = class TTPreview extends LitElement {
10
+ static { this.styles = css `
11
+ /* The browser's own [hidden] rule loses to any :host display, so a
12
+ hidden element would still show. Important, so it always wins. */
13
+ :host([hidden]) {
14
+ display: none !important;
15
+ }
16
+
17
+ :host {
18
+ display: block;
19
+
20
+ /* Private alias - derived from the theme so the dot grid follows
21
+ light/dark automatically. */
22
+ --_dot: color-mix(in srgb, var(--tt-foreground) 8%, transparent);
23
+ }
24
+
25
+ .preview {
26
+ min-height: 140px;
27
+ max-height: 500px;
28
+ overflow: auto;
29
+
30
+ width: 100%;
31
+ box-sizing: border-box;
32
+
33
+ border: 1px solid var(--tt-border);
34
+ border-radius: var(--tt-radius-lg);
35
+
36
+ background-color: var(--tt-card);
37
+ background-image: radial-gradient(var(--_dot) 1px, transparent 1px);
38
+ background-size: 16px 16px;
39
+ background-position: -8px -8px;
40
+
41
+ padding: var(--tt-space-8);
42
+
43
+ display: flex;
44
+ align-items: center;
45
+ justify-content: center;
46
+ gap: var(--tt-space-3);
47
+ flex-wrap: wrap;
48
+ }
49
+
50
+ @media (max-width: 480px) {
51
+ .preview {
52
+ padding: var(--tt-space-5);
53
+ }
54
+ }
55
+ `; }
56
+ render() {
57
+ return html `
58
+ <div class="preview" part="preview">
59
+ <slot></slot>
60
+ </div>
61
+ `;
62
+ }
63
+ };
64
+ TTPreview = __decorate([
65
+ customElement("tt-preview")
66
+ ], TTPreview);
67
+ export { TTPreview };
68
+ //# sourceMappingURL=tt-preview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-preview.js","sourceRoot":"","sources":["../src/tt-preview.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAG3C,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,UAAU;aAChC,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6ClB,AA7CY,CA6CX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;;KAIV,CAAC;IACJ,CAAC;;AAtDU,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CAuDrB"}
@@ -0,0 +1,40 @@
1
+ import { LitElement } from "lit";
2
+ import "./tt-card.js";
3
+ import "./tt-image.js";
4
+ import "./tt-button.js";
5
+ import "./tt-icon.js";
6
+ export type ProductOrientation = "vertical" | "horizontal";
7
+ export type ProductVariant = "default" | "minimal" | "elevated" | "featured";
8
+ export type ProductLayout = "standard" | "overlay" | "compact";
9
+ export declare class TTProduct extends LitElement {
10
+ src: string;
11
+ ratio: string;
12
+ orientation: ProductOrientation;
13
+ variant: ProductVariant;
14
+ layout: ProductLayout;
15
+ heading: string;
16
+ description: string;
17
+ descriptionLines: number;
18
+ price: string;
19
+ wasPrice: string;
20
+ rating: string;
21
+ value: string;
22
+ buttonLink: string;
23
+ buttonLabel: string;
24
+ disabled: boolean;
25
+ private handleClick;
26
+ static styles: import("lit").CSSResult[];
27
+ private renderMedia;
28
+ private renderRating;
29
+ private renderBody;
30
+ private get actionName();
31
+ private renderQuickAdd;
32
+ private renderButton;
33
+ render(): import("lit-html").TemplateResult<1>;
34
+ }
35
+ declare global {
36
+ interface HTMLElementTagNameMap {
37
+ "tt-product": TTProduct;
38
+ }
39
+ }
40
+ //# sourceMappingURL=tt-product.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-product.d.ts","sourceRoot":"","sources":["../src/tt-product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAQrD,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AAEtB,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,YAAY,CAAC;AAC3D,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAC7E,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;AAE/D,qBACa,SAAU,SAAQ,UAAU;IACX,GAAG,SAAM;IACT,KAAK,SAAO;IAGxC,WAAW,EAAE,kBAAkB,CAAc;IAG7C,OAAO,EAAE,cAAc,CAAa;IAGpC,MAAM,EAAE,aAAa,CAAc;IAEP,OAAO,SAAM;IACb,WAAW,SAAM;IACe,gBAAgB,SAAK;IAErD,KAAK,SAAM;IACa,QAAQ,SAAM;IACtC,MAAM,SAAM;IAEZ,KAAK,SAAM;IACe,UAAU,SAAM;IACf,WAAW,SAAmB;IAEzC,QAAQ,UAAS;IAE7D,OAAO,CAAC,WAAW;IAcnB,MAAM,CAAC,MAAM,4BA4WV;IAEH,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,UAAU;IA8ClB,OAAO,KAAK,UAAU,GAErB;IAED,OAAO,CAAC,cAAc;IAgBtB,OAAO,CAAC,YAAY;IAcpB,MAAM;CAyBP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}