@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,17 @@
1
+ import { LitElement } from "lit";
2
+ import type { TemplateResult } from "lit";
3
+ export interface KeyValue {
4
+ label: string;
5
+ value: string | TemplateResult;
6
+ }
7
+ export declare class TTKeyValues extends LitElement {
8
+ items: KeyValue[];
9
+ static styles: import("lit").CSSResult;
10
+ render(): TemplateResult<1>;
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ "tt-key-values": TTKeyValues;
15
+ }
16
+ }
17
+ //# sourceMappingURL=tt-key-values.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-key-values.d.ts","sourceRoot":"","sources":["../src/tt-key-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC;CAChC;AAED,qBACa,WAAY,SAAQ,UAAU;IAEzC,KAAK,EAAE,QAAQ,EAAE,CAAM;IAEvB,MAAM,CAAC,MAAM,0BA6FX;IAEF,MAAM;CAYP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,eAAe,EAAE,WAAW,CAAC;KAC9B;CACF"}
@@ -0,0 +1,126 @@
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
+ let TTKeyValues = class TTKeyValues extends LitElement {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.items = [];
13
+ }
14
+ static { this.styles = css `
15
+ /* The browser's own [hidden] rule loses to any :host display, so a
16
+ hidden element would still show. Important, so it always wins. */
17
+ :host([hidden]) {
18
+ display: none !important;
19
+ }
20
+
21
+ :host {
22
+ display: block;
23
+ font-family: var(--tt-font-sans);
24
+
25
+ /* Measured against THIS element, not the window. The same list sits
26
+ in a wide profile panel and inside a phone-width card. */
27
+ container-type: inline-size;
28
+ container-name: kv;
29
+ }
30
+
31
+ /*
32
+ Two columns on the list itself, so every row aligns without any
33
+ measuring: auto sizes the label column to the widest label, 1fr
34
+ gives whatever is left to the values.
35
+ */
36
+ dl {
37
+ display: grid;
38
+ grid-template-columns: auto 1fr;
39
+ gap: var(--tt-space-2) var(--tt-space-4);
40
+
41
+ margin: 0;
42
+
43
+ font-size: var(--tt-text-sm);
44
+ line-height: var(--tt-leading-normal);
45
+ }
46
+
47
+ dt {
48
+ color: var(--tt-muted-foreground);
49
+ white-space: nowrap;
50
+ }
51
+
52
+ dd {
53
+ margin: 0;
54
+
55
+ /* Grid items refuse to shrink below their content unless told to,
56
+ and long values have no natural break points. Without both of
57
+ these a VAT number or URL escapes the container. */
58
+ min-width: 0;
59
+ overflow-wrap: anywhere;
60
+
61
+ color: var(--tt-foreground);
62
+ }
63
+
64
+ /*
65
+ Values passed in as templates render inside THIS shadow root, so
66
+ they are styled here, not by whoever built the template. A caller
67
+ trying to style its own <a> from outside would have no effect.
68
+ */
69
+ dd a {
70
+ color: inherit;
71
+ text-decoration: none;
72
+ }
73
+
74
+ dd a:hover {
75
+ text-decoration: underline;
76
+ }
77
+
78
+ /*
79
+ Narrow: label above value, one column.
80
+
81
+ Two columns need a label column AND a value column, and the labels
82
+ are nowrap so the label column always wins the argument. Inside a
83
+ phone-width card that left "2,868만 / $20,700" wrapping after every
84
+ few characters while "Estimated market" sat comfortably beside it.
85
+ Stacking gives the value the whole width, which is the half anyone
86
+ is actually reading.
87
+
88
+ The rules target dl and its children, never :host. A container query
89
+ styles the DESCENDANTS of a container and :host IS the container, so
90
+ a rule on :host here would silently never match.
91
+ */
92
+ @container kv (max-width: 330px) {
93
+ dl {
94
+ grid-template-columns: 1fr;
95
+ gap: 0;
96
+ }
97
+
98
+ dt {
99
+ margin-top: var(--tt-space-3);
100
+ font-size: var(--tt-text-xs);
101
+ }
102
+
103
+ dt:first-of-type {
104
+ margin-top: 0;
105
+ }
106
+ }
107
+ `; }
108
+ render() {
109
+ return html `
110
+ <dl part="list">
111
+ ${this.items.map((item) => html `
112
+ <dt part="label">${item.label}</dt>
113
+ <dd part="value">${item.value}</dd>
114
+ `)}
115
+ </dl>
116
+ `;
117
+ }
118
+ };
119
+ __decorate([
120
+ property({ type: Array })
121
+ ], TTKeyValues.prototype, "items", void 0);
122
+ TTKeyValues = __decorate([
123
+ customElement("tt-key-values")
124
+ ], TTKeyValues);
125
+ export { TTKeyValues };
126
+ //# sourceMappingURL=tt-key-values.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-key-values.js","sourceRoot":"","sources":["../src/tt-key-values.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAUrD,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QAEL,UAAK,GAAe,EAAE,CAAC;IA6GzB,CAAC;aA3GQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FlB,AA7FY,CA6FX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;UAEL,IAAI,CAAC,KAAK,CAAC,GAAG,CACd,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;+BACO,IAAI,CAAC,KAAK;+BACV,IAAI,CAAC,KAAK;WAC9B,CACF;;KAEJ,CAAC;IACJ,CAAC;;AA5GD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;0CACH;AAFZ,WAAW;IADvB,aAAa,CAAC,eAAe,CAAC;GAClB,WAAW,CA+GvB"}
@@ -0,0 +1,24 @@
1
+ import { LitElement } from "lit";
2
+ import "./tt-page.js";
3
+ import "./tt-section.js";
4
+ import "./tt-code-block.js";
5
+ import "./tt-switcher.js";
6
+ import "./tt-example.js";
7
+ import type { SwitcherItem } from "./tt-switcher.js";
8
+ import type { DocExample } from "./tt-component-doc.js";
9
+ export declare class TTKnowledgeDoc extends LitElement {
10
+ heading: string;
11
+ description: string;
12
+ code: string;
13
+ language: string;
14
+ patterns: SwitcherItem[];
15
+ examples: DocExample[];
16
+ static styles: import("lit").CSSResult;
17
+ render(): import("lit-html").TemplateResult<1>;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ "tt-knowledge-doc": TTKnowledgeDoc;
22
+ }
23
+ }
24
+ //# sourceMappingURL=tt-knowledge-doc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-knowledge-doc.d.ts","sourceRoot":"","sources":["../src/tt-knowledge-doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAG5C,OAAO,cAAc,CAAC;AACtB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,qBACa,cAAe,SAAQ,UAAU;IAI5C,OAAO,SAAM;IAGb,WAAW,SAAM;IAGjB,IAAI,SAAM;IAGV,QAAQ,SAAM;IAGd,QAAQ,EAAE,YAAY,EAAE,CAAM;IAc9B,QAAQ,EAAE,UAAU,EAAE,CAAM;IAE5B,MAAM,CAAC,MAAM,0BAgBX;IAEF,MAAM;CA6CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,kBAAkB,EAAE,cAAc,CAAC;KACpC;CACF"}
@@ -0,0 +1,120 @@
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
+ import "./tt-page.js";
10
+ import "./tt-section.js";
11
+ import "./tt-code-block.js";
12
+ import "./tt-switcher.js";
13
+ import "./tt-example.js";
14
+ let TTKnowledgeDoc = class TTKnowledgeDoc extends LitElement {
15
+ constructor() {
16
+ super(...arguments);
17
+ // Named `heading` rather than `title` so it cannot collide with the
18
+ // global HTML title attribute (which renders a native tooltip).
19
+ this.heading = "";
20
+ this.description = "";
21
+ this.code = "";
22
+ this.language = "";
23
+ this.patterns = [];
24
+ /*
25
+ Live examples, the same shape and the same tt-example that component
26
+ docs already use. Optional, so the knowledge pages that predate this
27
+ keep rendering unchanged and a page opts in by filling the array.
28
+
29
+ Worth having on a knowledge page at all because some rules only
30
+ convince you once you watch them work. "Custom properties cross a
31
+ shadow boundary" reads as trivia until one declaration on a wrapper
32
+ visibly changes something inside a component that was never told
33
+ about it.
34
+ */
35
+ this.examples = [];
36
+ }
37
+ static { this.styles = css `
38
+ /* The browser's own [hidden] rule loses to any :host display, so a
39
+ hidden element would still show. Important, so it always wins. */
40
+ :host([hidden]) {
41
+ display: none !important;
42
+ }
43
+
44
+ /*
45
+ Same rhythm as the component docs. Anything tighter and two adjacent
46
+ examples read as a single one with two headings.
47
+ */
48
+ .examples {
49
+ display: flex;
50
+ flex-direction: column;
51
+ gap: var(--tt-space-10);
52
+ }
53
+ `; }
54
+ render() {
55
+ return html `
56
+ <tt-page heading=${this.heading} description=${this.description}>
57
+ <tt-section heading="Code Snippet">
58
+ <tt-code-block show-line-numbers
59
+ .code=${this.code}
60
+ language=${this.language}
61
+ ></tt-code-block>
62
+ </tt-section>
63
+
64
+ ${this.patterns.length
65
+ ? html `
66
+ <tt-section heading="Common Patterns">
67
+ <tt-switcher .items=${this.patterns}></tt-switcher>
68
+ </tt-section>
69
+ `
70
+ : ""}
71
+
72
+ ${this.examples.length
73
+ ? html `
74
+ <tt-section
75
+ heading="Worked examples"
76
+ description="Every one is live. Switch to Code for the markup behind it."
77
+ >
78
+ <div class="examples">
79
+ ${this.examples.map((example) => html `
80
+ <tt-example
81
+ heading=${example.title}
82
+ description=${example.description ?? ""}
83
+ .code=${example.code}
84
+ language=${example.language ?? "html"}
85
+ align=${example.align ?? "stretch"}
86
+ >
87
+ ${example.preview}
88
+ </tt-example>
89
+ `)}
90
+ </div>
91
+ </tt-section>
92
+ `
93
+ : ""}
94
+ </tt-page>
95
+ `;
96
+ }
97
+ };
98
+ __decorate([
99
+ property({ type: String })
100
+ ], TTKnowledgeDoc.prototype, "heading", void 0);
101
+ __decorate([
102
+ property({ type: String })
103
+ ], TTKnowledgeDoc.prototype, "description", void 0);
104
+ __decorate([
105
+ property({ type: String })
106
+ ], TTKnowledgeDoc.prototype, "code", void 0);
107
+ __decorate([
108
+ property({ type: String })
109
+ ], TTKnowledgeDoc.prototype, "language", void 0);
110
+ __decorate([
111
+ property({ type: Array })
112
+ ], TTKnowledgeDoc.prototype, "patterns", void 0);
113
+ __decorate([
114
+ property({ type: Array })
115
+ ], TTKnowledgeDoc.prototype, "examples", void 0);
116
+ TTKnowledgeDoc = __decorate([
117
+ customElement("tt-knowledge-doc")
118
+ ], TTKnowledgeDoc);
119
+ export { TTKnowledgeDoc };
120
+ //# sourceMappingURL=tt-knowledge-doc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-knowledge-doc.js","sourceRoot":"","sources":["../src/tt-knowledge-doc.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;AAE5D,OAAO,cAAc,CAAC;AACtB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAMlB,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,UAAU;IAAvC;;QACL,oEAAoE;QACpE,gEAAgE;QAEhE,YAAO,GAAG,EAAE,CAAC;QAGb,gBAAW,GAAG,EAAE,CAAC;QAGjB,SAAI,GAAG,EAAE,CAAC;QAGV,aAAQ,GAAG,EAAE,CAAC;QAGd,aAAQ,GAAmB,EAAE,CAAC;QAE9B;;;;;;;;;;UAUE;QAEF,aAAQ,GAAiB,EAAE,CAAC;IAiE9B,CAAC;aA/DQ,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;GAgBlB,AAhBY,CAgBX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;yBACU,IAAI,CAAC,OAAO,gBAAgB,IAAI,CAAC,WAAW;;;oBAGjD,IAAI,CAAC,IAAI;uBACN,IAAI,CAAC,QAAQ;;;;UAI1B,IAAI,CAAC,QAAQ,CAAC,MAAM;YACpB,CAAC,CAAC,IAAI,CAAA;;sCAEsB,IAAI,CAAC,QAAQ;;aAEtC;YACH,CAAC,CAAC,EAAE;;UAEJ,IAAI,CAAC,QAAQ,CAAC,MAAM;YACpB,CAAC,CAAC,IAAI,CAAA;;;;;;oBAMI,IAAI,CAAC,QAAQ,CAAC,GAAG,CACjB,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAA;;kCAEH,OAAO,CAAC,KAAK;sCACT,OAAO,CAAC,WAAW,IAAI,EAAE;gCAC/B,OAAO,CAAC,IAAI;mCACT,OAAO,CAAC,QAAQ,IAAI,MAAM;gCAC7B,OAAO,CAAC,KAAK,IAAI,SAAS;;0BAEhC,OAAO,CAAC,OAAO;;qBAEpB,CACF;;;aAGN;YACH,CAAC,CAAC,EAAE;;KAET,CAAC;IACJ,CAAC;;AA1FD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACV;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACjB;AAGV;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDACI;AAc9B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;gDACE;AA9BjB,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA+F1B"}
@@ -0,0 +1,36 @@
1
+ import { LitElement } from "lit";
2
+ /**
3
+ * What tt-layout needs from whatever is slotted into `navbar`.
4
+ *
5
+ * A STRUCTURAL type, deliberately, rather than importing tt-navbar. The
6
+ * shell has to work with any navbar a consumer supplies, and importing
7
+ * one would make the app shell depend on a specific component it does
8
+ * not own. Anything that wants its menu button to stay in step with the
9
+ * sidebar just implements this shape.
10
+ *
11
+ * Optional, because a navbar with no menu button is legitimate and must
12
+ * not become a type error.
13
+ */
14
+ export interface MenuToggleHost extends HTMLElement {
15
+ mobileMenuOpen?: boolean;
16
+ }
17
+ export declare class TTLayout extends LitElement {
18
+ private mobileSidebarOpen;
19
+ private closeSidebar;
20
+ private handleMenuToggle;
21
+ private handleSidebarMenu;
22
+ private handleKeydown;
23
+ connectedCallback(): void;
24
+ private locked;
25
+ private setLock;
26
+ disconnectedCallback(): void;
27
+ updated(): void;
28
+ static styles: import("lit").CSSResult;
29
+ render(): import("lit-html").TemplateResult<1>;
30
+ }
31
+ declare global {
32
+ interface HTMLElementTagNameMap {
33
+ "tt-layout": TTLayout;
34
+ }
35
+ }
36
+ //# sourceMappingURL=tt-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-layout.d.ts","sourceRoot":"","sources":["../src/tt-layout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAK5C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAe,SAAQ,WAAW;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,qBACa,QAAS,SAAQ,UAAU;IAEtC,OAAO,CAAC,iBAAiB,CAAS;IAElC,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,aAAa,CAInB;IAEF,iBAAiB;IAQjB,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,OAAO;IASf,oBAAoB;IAQpB,OAAO;IAaP,MAAM,CAAC,MAAM,0BAiMX;IAEF,MAAM;CA+CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,WAAW,EAAE,QAAQ,CAAC;KACvB;CACF"}
@@ -0,0 +1,318 @@
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, state } from "lit/decorators.js";
9
+ import { lockScroll, unlockScroll } from "./scroll-lock.js";
10
+ let TTLayout = class TTLayout extends LitElement {
11
+ constructor() {
12
+ super(...arguments);
13
+ this.mobileSidebarOpen = false;
14
+ this.handleKeydown = (event) => {
15
+ if (event.key === "Escape" && this.mobileSidebarOpen) {
16
+ this.closeSidebar();
17
+ }
18
+ };
19
+ // Whether this element currently holds a scroll lock. The lock is
20
+ // reference counted, so it has to release exactly what it took.
21
+ this.locked = false;
22
+ }
23
+ closeSidebar() {
24
+ this.mobileSidebarOpen = false;
25
+ }
26
+ /*
27
+ Takes the state FROM the event rather than flipping independently.
28
+
29
+ Both sides used to toggle their own boolean and then get resynced
30
+ below, which is two writers agreeing by luck. Now the navbar's click
31
+ is the single decision and the layout follows it.
32
+ */
33
+ handleMenuToggle(event) {
34
+ this.mobileSidebarOpen = event.detail.open;
35
+ }
36
+ handleSidebarMenu() {
37
+ this.closeSidebar();
38
+ }
39
+ connectedCallback() {
40
+ super.connectedCallback();
41
+ window.addEventListener("keydown", this.handleKeydown);
42
+ }
43
+ setLock(want) {
44
+ if (want === this.locked)
45
+ return;
46
+ this.locked = want;
47
+ if (want)
48
+ lockScroll();
49
+ else
50
+ unlockScroll();
51
+ }
52
+ disconnectedCallback() {
53
+ window.removeEventListener("keydown", this.handleKeydown);
54
+ this.setLock(false);
55
+ super.disconnectedCallback();
56
+ }
57
+ updated() {
58
+ this.setLock(this.mobileSidebarOpen);
59
+ /*
60
+ Escape and the backdrop can also close the sidebar, and the navbar
61
+ hears neither: its own click handler is the only thing that would
62
+ have told it. Without this its button keeps showing an X over a
63
+ sidebar that is already gone.
64
+ */
65
+ const navbar = this.querySelector("tt-navbar");
66
+ if (navbar)
67
+ navbar.mobileMenuOpen = this.mobileSidebarOpen;
68
+ }
69
+ static { this.styles = css `
70
+ /* The browser's own [hidden] rule loses to any :host display, so a
71
+ hidden element would still show. Important, so it always wins. */
72
+ :host([hidden]) {
73
+ display: none !important;
74
+ }
75
+
76
+ :host {
77
+ display: block;
78
+
79
+ height: 100vh;
80
+ height: 100dvh;
81
+
82
+ background: var(--tt-background);
83
+ color: var(--tt-foreground);
84
+
85
+ font-family: var(--tt-font-sans);
86
+ -webkit-font-smoothing: antialiased;
87
+ }
88
+
89
+ .layout {
90
+ display: flex;
91
+ flex-direction: column;
92
+
93
+ height: 100%;
94
+
95
+ background: var(--tt-background);
96
+ color: var(--tt-foreground);
97
+ }
98
+
99
+ /* Navbar */
100
+
101
+ .navbar {
102
+ flex-shrink: 0;
103
+
104
+ position: sticky;
105
+ top: 0;
106
+
107
+ z-index: var(--tt-z-sticky);
108
+ }
109
+
110
+ /* Main body */
111
+
112
+ .body {
113
+ display: flex;
114
+
115
+ flex: 1;
116
+ min-height: 0;
117
+
118
+ overflow: hidden;
119
+ }
120
+
121
+ /* Sidebar */
122
+
123
+ .sidebar {
124
+ flex-shrink: 0;
125
+ min-height: 0;
126
+ }
127
+
128
+ /* Content */
129
+
130
+ .content {
131
+ flex: 1;
132
+
133
+ min-width: 0;
134
+ min-height: 0;
135
+
136
+ padding: var(--tt-space-8);
137
+
138
+ overflow-y: auto;
139
+ overflow-x: hidden;
140
+
141
+ /*
142
+ Reserves the scrollbar's width whether or not one is showing, so
143
+ a page that grows past the viewport does not narrow this box by
144
+ ~15px and shift everything left. Without it, switching between a
145
+ short view and a long one nudges the whole layout sideways.
146
+ */
147
+ scrollbar-gutter: stable;
148
+
149
+ background: var(--tt-background);
150
+ color: var(--tt-foreground);
151
+ }
152
+
153
+ /* Backdrop */
154
+
155
+ .backdrop {
156
+ display: none;
157
+ }
158
+
159
+ /* Mobile */
160
+
161
+ @media (max-width: 768px) {
162
+ :host {
163
+ height: auto;
164
+ min-height: 100dvh;
165
+ }
166
+
167
+ .layout {
168
+ height: auto;
169
+ min-height: 100dvh;
170
+ }
171
+
172
+ .body {
173
+ display: block;
174
+
175
+ min-height: auto;
176
+
177
+ overflow: visible;
178
+ }
179
+
180
+ .content {
181
+ /*
182
+ Vertical only. The horizontal gutter belongs to whatever is
183
+ slotted in - tt-page, tt-component-doc - and every one of them
184
+ already sets it. Setting it here too doubled it, so a phone got
185
+ 32px of inset around content whose own internal gutters were
186
+ half that, and a bento sat further from the screen edge than its
187
+ tiles sat from each other.
188
+
189
+ One owner for the page gutter, and it is the page.
190
+ */
191
+ padding: var(--tt-space-4) 0;
192
+
193
+ overflow: visible;
194
+ }
195
+
196
+ /* Mobile sidebar */
197
+
198
+ .sidebar {
199
+ position: fixed;
200
+
201
+ top: 60px;
202
+ left: 0;
203
+ bottom: 0;
204
+
205
+ width: 220px;
206
+ max-width: 82vw;
207
+
208
+ z-index: var(--tt-z-drawer);
209
+
210
+ transform: translateX(-100%);
211
+
212
+ /*
213
+ Hidden as well as moved. Off screen is not gone: a closed
214
+ sidebar's links stayed in the Tab order, so on a phone a
215
+ keyboard user tabbed through the whole menu, focus invisible
216
+ off the left edge, before reaching the page. The delay keeps it
217
+ visible until the slide-out has finished.
218
+ */
219
+ visibility: hidden;
220
+
221
+ transition:
222
+ transform var(--tt-duration-slow) var(--tt-ease-out),
223
+ visibility 0s linear var(--tt-duration-slow);
224
+
225
+ box-shadow: var(--tt-elevation-3);
226
+
227
+ will-change: transform;
228
+ }
229
+
230
+ .sidebar.open {
231
+ transform: translateX(0);
232
+ visibility: visible;
233
+ transition: transform var(--tt-duration-slow) var(--tt-ease-out);
234
+ }
235
+
236
+ /* Backdrop */
237
+
238
+ .backdrop {
239
+ position: fixed;
240
+
241
+ inset: 0;
242
+
243
+ background: var(--tt-overlay);
244
+
245
+ z-index: var(--tt-z-overlay);
246
+
247
+ opacity: 0;
248
+
249
+ transition: opacity var(--tt-duration-slow) var(--tt-ease);
250
+
251
+ -webkit-backdrop-filter: blur(2px);
252
+ backdrop-filter: blur(2px);
253
+ }
254
+
255
+ .backdrop.show {
256
+ display: block;
257
+
258
+ opacity: 1;
259
+ }
260
+ }
261
+
262
+ `; }
263
+ render() {
264
+ return html `
265
+ <div class="layout" part="layout">
266
+
267
+ <!-- Navbar -->
268
+
269
+ <div class="navbar" part="navbar">
270
+ <slot
271
+ name="navbar"
272
+ @tt-menu-toggle=${this.handleMenuToggle}
273
+ ></slot>
274
+ </div>
275
+
276
+ <!-- Backdrop -->
277
+
278
+ <div
279
+ class="backdrop ${this.mobileSidebarOpen ? "show" : ""}"
280
+ @click=${this.closeSidebar}
281
+ ></div>
282
+
283
+ <!-- Main body -->
284
+
285
+ <div class="body">
286
+
287
+ <!-- Sidebar -->
288
+
289
+ <aside
290
+ part="sidebar"
291
+ class="sidebar ${this.mobileSidebarOpen ? "open" : ""}"
292
+ >
293
+ <slot
294
+ name="sidebar"
295
+ @tt-menu-click=${this.handleSidebarMenu}
296
+ ></slot>
297
+ </aside>
298
+
299
+ <!-- Content -->
300
+
301
+ <main class="content" part="content">
302
+ <slot></slot>
303
+ </main>
304
+
305
+ </div>
306
+
307
+ </div>
308
+ `;
309
+ }
310
+ };
311
+ __decorate([
312
+ state()
313
+ ], TTLayout.prototype, "mobileSidebarOpen", void 0);
314
+ TTLayout = __decorate([
315
+ customElement("tt-layout")
316
+ ], TTLayout);
317
+ export { TTLayout };
318
+ //# sourceMappingURL=tt-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tt-layout.js","sourceRoot":"","sources":["../src/tt-layout.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAmBrD,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,UAAU;IAAjC;;QAEG,sBAAiB,GAAG,KAAK,CAAC;QAqB1B,kBAAa,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC/C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;gBACrD,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,CAAC;QACH,CAAC,CAAC;QAQF,kEAAkE;QAClE,gEAAgE;QACxD,WAAM,GAAG,KAAK,CAAC;IAkRzB,CAAC;IAnTS,YAAY;QAClB,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC;IACjC,CAAC;IAED;;;;;;MAME;IACM,gBAAgB,CAAC,KAAkB;QACzC,IAAI,CAAC,iBAAiB,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAC7C,CAAC;IAEO,iBAAiB;QACvB,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAQD,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;IACzD,CAAC;IAMO,OAAO,CAAC,IAAa;QAC3B,IAAI,IAAI,KAAK,IAAI,CAAC,MAAM;YAAE,OAAO;QAEjC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAI,IAAI;YAAE,UAAU,EAAE,CAAC;;YAClB,YAAY,EAAE,CAAC;IACtB,CAAC;IAED,oBAAoB;QAClB,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAE1D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAEpB,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QAErC;;;;;UAKE;QACF,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,CAAiB,WAAW,CAAC,CAAC;QAC/D,IAAI,MAAM;YAAE,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC;IAC7D,CAAC;aAEM,WAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiMlB,AAjMY,CAiMX;IAEF,MAAM;QACJ,OAAO,IAAI,CAAA;;;;;;;;8BAQe,IAAI,CAAC,gBAAgB;;;;;;;4BAOvB,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;mBAC7C,IAAI,CAAC,YAAY;;;;;;;;;;;6BAWP,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;;;;+BAIlC,IAAI,CAAC,iBAAiB;;;;;;;;;;;;;KAahD,CAAC;IACJ,CAAC;;AApTO;IADP,KAAK,EAAE;mDAC0B;AAFvB,QAAQ;IADpB,aAAa,CAAC,WAAW,CAAC;GACd,QAAQ,CAuTpB"}