@sondor-technology/sondor-components 1.0.8 → 1.0.10

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 (437) hide show
  1. package/dist/components/accordion/accordion.constants.d.ts +5 -0
  2. package/dist/components/accordion/accordion.constants.d.ts.map +1 -0
  3. package/dist/components/accordion/accordion.constants.js +3 -0
  4. package/dist/components/accordion/accordion.constants.js.map +1 -0
  5. package/dist/components/accordion/accordion.d.ts +29 -0
  6. package/dist/components/accordion/accordion.d.ts.map +1 -0
  7. package/dist/components/accordion/accordion.js +226 -0
  8. package/dist/components/accordion/accordion.js.map +1 -0
  9. package/dist/components/alert/alert.constants.d.ts +2 -0
  10. package/dist/components/alert/alert.constants.d.ts.map +1 -1
  11. package/dist/components/alert/alert.d.ts +50 -2
  12. package/dist/components/alert/alert.d.ts.map +1 -1
  13. package/dist/components/alert/alert.js +285 -16
  14. package/dist/components/alert/alert.js.map +1 -1
  15. package/dist/components/avatar/avatar.d.ts +20 -0
  16. package/dist/components/avatar/avatar.d.ts.map +1 -0
  17. package/dist/components/avatar/avatar.js +100 -0
  18. package/dist/components/avatar/avatar.js.map +1 -0
  19. package/dist/components/back-to-top/back-to-top.d.ts +29 -0
  20. package/dist/components/back-to-top/back-to-top.d.ts.map +1 -0
  21. package/dist/components/back-to-top/back-to-top.js +149 -0
  22. package/dist/components/back-to-top/back-to-top.js.map +1 -0
  23. package/dist/components/bar-chart/bar-chart.d.ts +42 -0
  24. package/dist/components/bar-chart/bar-chart.d.ts.map +1 -0
  25. package/dist/components/bar-chart/bar-chart.js +298 -0
  26. package/dist/components/bar-chart/bar-chart.js.map +1 -0
  27. package/dist/components/breadcrumb/breadcrumb.js +2 -2
  28. package/dist/components/button/button.d.ts +1 -0
  29. package/dist/components/button/button.d.ts.map +1 -1
  30. package/dist/components/button/button.js +8 -8
  31. package/dist/components/button/button.js.map +1 -1
  32. package/dist/components/button-group/button-group.js +4 -4
  33. package/dist/components/calendar/calendar.d.ts.map +1 -1
  34. package/dist/components/calendar/calendar.js +21 -9
  35. package/dist/components/calendar/calendar.js.map +1 -1
  36. package/dist/components/chart/chart-base.d.ts +59 -0
  37. package/dist/components/chart/chart-base.d.ts.map +1 -0
  38. package/dist/components/chart/chart-base.js +261 -0
  39. package/dist/components/chart/chart-base.js.map +1 -0
  40. package/dist/components/chart/chart.utils.d.ts +27 -0
  41. package/dist/components/chart/chart.utils.d.ts.map +1 -0
  42. package/dist/components/chart/chart.utils.js +117 -0
  43. package/dist/components/chart/chart.utils.js.map +1 -0
  44. package/dist/components/code-block/code-block.d.ts +5 -0
  45. package/dist/components/code-block/code-block.d.ts.map +1 -1
  46. package/dist/components/code-block/code-block.js +34 -24
  47. package/dist/components/code-block/code-block.js.map +1 -1
  48. package/dist/components/consent/consent.d.ts +63 -0
  49. package/dist/components/consent/consent.d.ts.map +1 -0
  50. package/dist/components/consent/consent.js +327 -0
  51. package/dist/components/consent/consent.js.map +1 -0
  52. package/dist/components/consent/consent.utils.d.ts +36 -0
  53. package/dist/components/consent/consent.utils.d.ts.map +1 -0
  54. package/dist/components/consent/consent.utils.js +82 -0
  55. package/dist/components/consent/consent.utils.js.map +1 -0
  56. package/dist/components/contact/contact.d.ts +22 -0
  57. package/dist/components/contact/contact.d.ts.map +1 -0
  58. package/dist/components/contact/contact.js +83 -0
  59. package/dist/components/contact/contact.js.map +1 -0
  60. package/dist/components/container/container.d.ts +20 -0
  61. package/dist/components/container/container.d.ts.map +1 -0
  62. package/dist/components/container/container.js +68 -0
  63. package/dist/components/container/container.js.map +1 -0
  64. package/dist/components/content-card/content-card.js +4 -4
  65. package/dist/components/context-menu/context-menu.d.ts +89 -0
  66. package/dist/components/context-menu/context-menu.d.ts.map +1 -0
  67. package/dist/components/context-menu/context-menu.js +414 -0
  68. package/dist/components/context-menu/context-menu.js.map +1 -0
  69. package/dist/components/cron-builder/cron-builder.d.ts +5 -2
  70. package/dist/components/cron-builder/cron-builder.d.ts.map +1 -1
  71. package/dist/components/cron-builder/cron-builder.js +83 -15
  72. package/dist/components/cron-builder/cron-builder.js.map +1 -1
  73. package/dist/components/cta/cta.d.ts +20 -0
  74. package/dist/components/cta/cta.d.ts.map +1 -0
  75. package/dist/components/cta/cta.js +64 -0
  76. package/dist/components/cta/cta.js.map +1 -0
  77. package/dist/components/drawer/drawer.js +6 -6
  78. package/dist/components/faq/faq-item.d.ts +22 -0
  79. package/dist/components/faq/faq-item.d.ts.map +1 -0
  80. package/dist/components/faq/faq-item.js +117 -0
  81. package/dist/components/faq/faq-item.js.map +1 -0
  82. package/dist/components/faq/faq.d.ts +18 -0
  83. package/dist/components/faq/faq.d.ts.map +1 -0
  84. package/dist/components/faq/faq.js +38 -0
  85. package/dist/components/faq/faq.js.map +1 -0
  86. package/dist/components/feature-grid/feature-grid.d.ts +22 -0
  87. package/dist/components/feature-grid/feature-grid.d.ts.map +1 -0
  88. package/dist/components/feature-grid/feature-grid.js +55 -0
  89. package/dist/components/feature-grid/feature-grid.js.map +1 -0
  90. package/dist/components/feature-grid/feature.d.ts +18 -0
  91. package/dist/components/feature-grid/feature.d.ts.map +1 -0
  92. package/dist/components/feature-grid/feature.js +91 -0
  93. package/dist/components/feature-grid/feature.js.map +1 -0
  94. package/dist/components/field/field.js +2 -2
  95. package/dist/components/footer/footer.js +4 -4
  96. package/dist/components/form/form-reset.d.ts +7 -0
  97. package/dist/components/form/form-reset.d.ts.map +1 -0
  98. package/dist/components/form/form-reset.js +47 -0
  99. package/dist/components/form/form-reset.js.map +1 -0
  100. package/dist/components/form/form.d.ts +5 -0
  101. package/dist/components/form/form.d.ts.map +1 -1
  102. package/dist/components/form/form.js +17 -3
  103. package/dist/components/form/form.js.map +1 -1
  104. package/dist/components/grid/grid.d.ts +5 -0
  105. package/dist/components/grid/grid.d.ts.map +1 -1
  106. package/dist/components/grid/grid.js +86 -4
  107. package/dist/components/grid/grid.js.map +1 -1
  108. package/dist/components/heat-map/heat-map.d.ts +39 -0
  109. package/dist/components/heat-map/heat-map.d.ts.map +1 -0
  110. package/dist/components/heat-map/heat-map.js +306 -0
  111. package/dist/components/heat-map/heat-map.js.map +1 -0
  112. package/dist/components/hero/hero.d.ts +26 -0
  113. package/dist/components/hero/hero.d.ts.map +1 -0
  114. package/dist/components/hero/hero.js +132 -0
  115. package/dist/components/hero/hero.js.map +1 -0
  116. package/dist/components/icon/icon-paths.d.ts +84 -0
  117. package/dist/components/icon/icon-paths.d.ts.map +1 -1
  118. package/dist/components/icon/icon-paths.js +89 -0
  119. package/dist/components/icon/icon-paths.js.map +1 -1
  120. package/dist/components/icon/icon.d.ts +2 -0
  121. package/dist/components/icon/icon.d.ts.map +1 -1
  122. package/dist/components/icon/icon.js +10 -1
  123. package/dist/components/icon/icon.js.map +1 -1
  124. package/dist/components/image/image.d.ts +31 -0
  125. package/dist/components/image/image.d.ts.map +1 -0
  126. package/dist/components/image/image.js +179 -0
  127. package/dist/components/image/image.js.map +1 -0
  128. package/dist/components/input/input.js +4 -4
  129. package/dist/components/lazy/lazy.d.ts +34 -0
  130. package/dist/components/lazy/lazy.d.ts.map +1 -0
  131. package/dist/components/lazy/lazy.js +104 -0
  132. package/dist/components/lazy/lazy.js.map +1 -0
  133. package/dist/components/line-chart/line-chart.d.ts +37 -0
  134. package/dist/components/line-chart/line-chart.d.ts.map +1 -0
  135. package/dist/components/line-chart/line-chart.js +271 -0
  136. package/dist/components/line-chart/line-chart.js.map +1 -0
  137. package/dist/components/list/list-item.d.ts +45 -0
  138. package/dist/components/list/list-item.d.ts.map +1 -0
  139. package/dist/components/list/list-item.js +263 -0
  140. package/dist/components/list/list-item.js.map +1 -0
  141. package/dist/components/list/list.d.ts +50 -0
  142. package/dist/components/list/list.d.ts.map +1 -0
  143. package/dist/components/list/list.js +161 -0
  144. package/dist/components/list/list.js.map +1 -0
  145. package/dist/components/logo-cloud/logo-cloud.d.ts +19 -0
  146. package/dist/components/logo-cloud/logo-cloud.d.ts.map +1 -0
  147. package/dist/components/logo-cloud/logo-cloud.js +66 -0
  148. package/dist/components/logo-cloud/logo-cloud.js.map +1 -0
  149. package/dist/components/modal/modal.d.ts +12 -0
  150. package/dist/components/modal/modal.d.ts.map +1 -1
  151. package/dist/components/modal/modal.js +40 -11
  152. package/dist/components/modal/modal.js.map +1 -1
  153. package/dist/components/page-layout/page-layout.js +8 -8
  154. package/dist/components/pagination/pagination.d.ts +15 -0
  155. package/dist/components/pagination/pagination.d.ts.map +1 -0
  156. package/dist/components/pagination/pagination.js +126 -0
  157. package/dist/components/pagination/pagination.js.map +1 -0
  158. package/dist/components/pagination/pagination.utils.d.ts +3 -0
  159. package/dist/components/pagination/pagination.utils.d.ts.map +1 -0
  160. package/dist/components/pagination/pagination.utils.js +19 -0
  161. package/dist/components/pagination/pagination.utils.js.map +1 -0
  162. package/dist/components/pie-chart/pie-chart.d.ts +33 -0
  163. package/dist/components/pie-chart/pie-chart.d.ts.map +1 -0
  164. package/dist/components/pie-chart/pie-chart.js +233 -0
  165. package/dist/components/pie-chart/pie-chart.js.map +1 -0
  166. package/dist/components/pin-input/pin-input.js +4 -4
  167. package/dist/components/popover/popover.d.ts.map +1 -1
  168. package/dist/components/popover/popover.js +1 -3
  169. package/dist/components/popover/popover.js.map +1 -1
  170. package/dist/components/post-list/post-card.d.ts +16 -0
  171. package/dist/components/post-list/post-card.d.ts.map +1 -0
  172. package/dist/components/post-list/post-card.js +22 -0
  173. package/dist/components/post-list/post-card.js.map +1 -0
  174. package/dist/components/post-list/post-list.d.ts +17 -0
  175. package/dist/components/post-list/post-list.d.ts.map +1 -0
  176. package/dist/components/post-list/post-list.js +23 -0
  177. package/dist/components/post-list/post-list.js.map +1 -0
  178. package/dist/components/pricing/pricing-tier.d.ts +23 -0
  179. package/dist/components/pricing/pricing-tier.d.ts.map +1 -0
  180. package/dist/components/pricing/pricing-tier.js +144 -0
  181. package/dist/components/pricing/pricing-tier.js.map +1 -0
  182. package/dist/components/pricing/pricing.d.ts +18 -0
  183. package/dist/components/pricing/pricing.d.ts.map +1 -0
  184. package/dist/components/pricing/pricing.js +38 -0
  185. package/dist/components/pricing/pricing.js.map +1 -0
  186. package/dist/components/progress/progress.d.ts +17 -0
  187. package/dist/components/progress/progress.d.ts.map +1 -0
  188. package/dist/components/progress/progress.js +109 -0
  189. package/dist/components/progress/progress.js.map +1 -0
  190. package/dist/components/project-grid/project-card.d.ts +17 -0
  191. package/dist/components/project-grid/project-card.d.ts.map +1 -0
  192. package/dist/components/project-grid/project-card.js +23 -0
  193. package/dist/components/project-grid/project-card.js.map +1 -0
  194. package/dist/components/project-grid/project-grid.d.ts +17 -0
  195. package/dist/components/project-grid/project-grid.d.ts.map +1 -0
  196. package/dist/components/project-grid/project-grid.js +23 -0
  197. package/dist/components/project-grid/project-grid.js.map +1 -0
  198. package/dist/components/radio/radio.js +1 -1
  199. package/dist/components/reveal/reveal.constants.d.ts +10 -0
  200. package/dist/components/reveal/reveal.constants.d.ts.map +1 -0
  201. package/dist/components/reveal/reveal.constants.js +11 -0
  202. package/dist/components/reveal/reveal.constants.js.map +1 -0
  203. package/dist/components/reveal/reveal.d.ts +64 -0
  204. package/dist/components/reveal/reveal.d.ts.map +1 -0
  205. package/dist/components/reveal/reveal.js +352 -0
  206. package/dist/components/reveal/reveal.js.map +1 -0
  207. package/dist/components/scroll-progress/scroll-progress.d.ts +32 -0
  208. package/dist/components/scroll-progress/scroll-progress.d.ts.map +1 -0
  209. package/dist/components/scroll-progress/scroll-progress.js +120 -0
  210. package/dist/components/scroll-progress/scroll-progress.js.map +1 -0
  211. package/dist/components/section/card-row.d.ts +30 -0
  212. package/dist/components/section/card-row.d.ts.map +1 -0
  213. package/dist/components/section/card-row.js +174 -0
  214. package/dist/components/section/card-row.js.map +1 -0
  215. package/dist/components/section/card.d.ts +27 -0
  216. package/dist/components/section/card.d.ts.map +1 -0
  217. package/dist/components/section/card.js +205 -0
  218. package/dist/components/section/card.js.map +1 -0
  219. package/dist/components/section/row-item.d.ts +22 -0
  220. package/dist/components/section/row-item.d.ts.map +1 -0
  221. package/dist/components/section/row-item.js +53 -0
  222. package/dist/components/section/row-item.js.map +1 -0
  223. package/dist/components/section/section.d.ts +70 -0
  224. package/dist/components/section/section.d.ts.map +1 -0
  225. package/dist/components/section/section.js +240 -0
  226. package/dist/components/section/section.js.map +1 -0
  227. package/dist/components/select/select.js +3 -3
  228. package/dist/components/series-nav/series-nav.d.ts +29 -0
  229. package/dist/components/series-nav/series-nav.d.ts.map +1 -0
  230. package/dist/components/series-nav/series-nav.js +178 -0
  231. package/dist/components/series-nav/series-nav.js.map +1 -0
  232. package/dist/components/site-header/site-header.d.ts +51 -0
  233. package/dist/components/site-header/site-header.d.ts.map +1 -0
  234. package/dist/components/site-header/site-header.js +296 -0
  235. package/dist/components/site-header/site-header.js.map +1 -0
  236. package/dist/components/skeleton/skeleton.js +7 -7
  237. package/dist/components/sparkline/sparkline.d.ts +19 -0
  238. package/dist/components/sparkline/sparkline.d.ts.map +1 -0
  239. package/dist/components/sparkline/sparkline.js +99 -0
  240. package/dist/components/sparkline/sparkline.js.map +1 -0
  241. package/dist/components/spinner/spinner.d.ts +13 -0
  242. package/dist/components/spinner/spinner.d.ts.map +1 -0
  243. package/dist/components/spinner/spinner.js +65 -0
  244. package/dist/components/spinner/spinner.js.map +1 -0
  245. package/dist/components/split/split.d.ts +23 -0
  246. package/dist/components/split/split.d.ts.map +1 -0
  247. package/dist/components/split/split.js +104 -0
  248. package/dist/components/split/split.js.map +1 -0
  249. package/dist/components/stack/stack.d.ts +21 -0
  250. package/dist/components/stack/stack.d.ts.map +1 -0
  251. package/dist/components/stack/stack.js +102 -0
  252. package/dist/components/stack/stack.js.map +1 -0
  253. package/dist/components/stat-card/stat-card.d.ts +35 -0
  254. package/dist/components/stat-card/stat-card.d.ts.map +1 -0
  255. package/dist/components/stat-card/stat-card.js +199 -0
  256. package/dist/components/stat-card/stat-card.js.map +1 -0
  257. package/dist/components/stats/stat.d.ts +16 -0
  258. package/dist/components/stats/stat.d.ts.map +1 -0
  259. package/dist/components/stats/stat.js +51 -0
  260. package/dist/components/stats/stat.js.map +1 -0
  261. package/dist/components/stats/stats.d.ts +19 -0
  262. package/dist/components/stats/stats.d.ts.map +1 -0
  263. package/dist/components/stats/stats.js +45 -0
  264. package/dist/components/stats/stats.js.map +1 -0
  265. package/dist/components/switch/switch.js +2 -2
  266. package/dist/components/table/data-table.d.ts +115 -27
  267. package/dist/components/table/data-table.d.ts.map +1 -1
  268. package/dist/components/table/data-table.js +1012 -411
  269. package/dist/components/table/data-table.js.map +1 -1
  270. package/dist/components/table/data-table.utils.d.ts +81 -0
  271. package/dist/components/table/data-table.utils.d.ts.map +1 -0
  272. package/dist/components/table/data-table.utils.js +208 -0
  273. package/dist/components/table/data-table.utils.js.map +1 -0
  274. package/dist/components/table/table.d.ts +28 -0
  275. package/dist/components/table/table.d.ts.map +1 -1
  276. package/dist/components/table/table.js +161 -33
  277. package/dist/components/table/table.js.map +1 -1
  278. package/dist/components/team/person.d.ts +19 -0
  279. package/dist/components/team/person.d.ts.map +1 -0
  280. package/dist/components/team/person.js +123 -0
  281. package/dist/components/team/person.js.map +1 -0
  282. package/dist/components/team/team.d.ts +18 -0
  283. package/dist/components/team/team.d.ts.map +1 -0
  284. package/dist/components/team/team.js +36 -0
  285. package/dist/components/team/team.js.map +1 -0
  286. package/dist/components/testimonials/testimonial.d.ts +18 -0
  287. package/dist/components/testimonials/testimonial.d.ts.map +1 -0
  288. package/dist/components/testimonials/testimonial.js +115 -0
  289. package/dist/components/testimonials/testimonial.js.map +1 -0
  290. package/dist/components/testimonials/testimonials.d.ts +18 -0
  291. package/dist/components/testimonials/testimonials.d.ts.map +1 -0
  292. package/dist/components/testimonials/testimonials.js +36 -0
  293. package/dist/components/testimonials/testimonials.js.map +1 -0
  294. package/dist/components/textarea/textarea.js +3 -3
  295. package/dist/components/theme-toggle/theme-toggle.js +1 -1
  296. package/dist/components/time-picker/time-picker.d.ts.map +1 -1
  297. package/dist/components/time-picker/time-picker.js +13 -3
  298. package/dist/components/time-picker/time-picker.js.map +1 -1
  299. package/dist/components/timeline/timeline-item.d.ts +18 -0
  300. package/dist/components/timeline/timeline-item.d.ts.map +1 -0
  301. package/dist/components/timeline/timeline-item.js +102 -0
  302. package/dist/components/timeline/timeline-item.js.map +1 -0
  303. package/dist/components/timeline/timeline.d.ts +18 -0
  304. package/dist/components/timeline/timeline.d.ts.map +1 -0
  305. package/dist/components/timeline/timeline.js +30 -0
  306. package/dist/components/timeline/timeline.js.map +1 -0
  307. package/dist/components/toast/toast.d.ts +33 -0
  308. package/dist/components/toast/toast.d.ts.map +1 -0
  309. package/dist/components/toast/toast.js +147 -0
  310. package/dist/components/toast/toast.js.map +1 -0
  311. package/dist/components/toggle-group/toggle-button.d.ts +2 -0
  312. package/dist/components/toggle-group/toggle-button.d.ts.map +1 -1
  313. package/dist/components/toggle-group/toggle-button.js +12 -5
  314. package/dist/components/toggle-group/toggle-button.js.map +1 -1
  315. package/dist/components/toggle-group/toggle-group.d.ts +6 -0
  316. package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
  317. package/dist/components/toggle-group/toggle-group.js +141 -21
  318. package/dist/components/toggle-group/toggle-group.js.map +1 -1
  319. package/dist/components/tooltip/tooltip.js +21 -21
  320. package/dist/components/vertical-nav/vertical-nav-group.js +3 -3
  321. package/dist/components/vertical-nav/vertical-nav-item.js +4 -4
  322. package/dist/components/video-embed/video-embed.d.ts +37 -0
  323. package/dist/components/video-embed/video-embed.d.ts.map +1 -0
  324. package/dist/components/video-embed/video-embed.js +183 -0
  325. package/dist/components/video-embed/video-embed.js.map +1 -0
  326. package/dist/index.d.ts +107 -0
  327. package/dist/index.d.ts.map +1 -0
  328. package/dist/index.js +104 -0
  329. package/dist/index.js.map +1 -0
  330. package/dist/styles/index.css +205 -1
  331. package/dist/styles/reset.d.ts.map +1 -1
  332. package/dist/styles/reset.js +5 -0
  333. package/dist/styles/reset.js.map +1 -1
  334. package/package.json +214 -7
  335. package/src/components/accordion/accordion.constants.ts +5 -0
  336. package/src/components/accordion/accordion.ts +209 -0
  337. package/src/components/alert/alert.constants.ts +3 -0
  338. package/src/components/alert/alert.ts +284 -17
  339. package/src/components/avatar/avatar.ts +84 -0
  340. package/src/components/back-to-top/back-to-top.ts +140 -0
  341. package/src/components/bar-chart/bar-chart.ts +295 -0
  342. package/src/components/breadcrumb/breadcrumb.ts +2 -2
  343. package/src/components/button/button.ts +9 -8
  344. package/src/components/button-group/button-group.ts +4 -4
  345. package/src/components/calendar/calendar.ts +26 -9
  346. package/src/components/chart/chart-base.ts +275 -0
  347. package/src/components/chart/chart.utils.ts +140 -0
  348. package/src/components/code-block/code-block.ts +35 -24
  349. package/src/components/consent/consent.ts +312 -0
  350. package/src/components/consent/consent.utils.ts +110 -0
  351. package/src/components/contact/contact.ts +83 -0
  352. package/src/components/container/container.ts +60 -0
  353. package/src/components/content-card/content-card.ts +4 -4
  354. package/src/components/context-menu/context-menu.ts +426 -0
  355. package/src/components/cron-builder/cron-builder.ts +102 -22
  356. package/src/components/cta/cta.ts +64 -0
  357. package/src/components/drawer/drawer.ts +6 -6
  358. package/src/components/faq/faq-item.ts +110 -0
  359. package/src/components/faq/faq.ts +40 -0
  360. package/src/components/feature-grid/feature-grid.ts +52 -0
  361. package/src/components/feature-grid/feature.ts +84 -0
  362. package/src/components/field/field.ts +2 -2
  363. package/src/components/footer/footer.ts +4 -4
  364. package/src/components/form/form-reset.ts +45 -0
  365. package/src/components/form/form.ts +17 -3
  366. package/src/components/grid/grid.ts +73 -4
  367. package/src/components/heat-map/heat-map.ts +292 -0
  368. package/src/components/hero/hero.ts +132 -0
  369. package/src/components/icon/icon-paths.ts +92 -1
  370. package/src/components/icon/icon.ts +8 -1
  371. package/src/components/image/image.ts +165 -0
  372. package/src/components/input/input.ts +4 -4
  373. package/src/components/lazy/lazy.ts +94 -0
  374. package/src/components/line-chart/line-chart.ts +271 -0
  375. package/src/components/list/list-item.ts +225 -0
  376. package/src/components/list/list.ts +157 -0
  377. package/src/components/logo-cloud/logo-cloud.ts +65 -0
  378. package/src/components/modal/modal.ts +37 -11
  379. package/src/components/page-layout/page-layout.ts +8 -8
  380. package/src/components/pagination/pagination.ts +120 -0
  381. package/src/components/pagination/pagination.utils.ts +14 -0
  382. package/src/components/pie-chart/pie-chart.ts +230 -0
  383. package/src/components/pin-input/pin-input.ts +4 -4
  384. package/src/components/popover/popover.ts +1 -3
  385. package/src/components/post-list/post-card.ts +18 -0
  386. package/src/components/post-list/post-list.ts +19 -0
  387. package/src/components/pricing/pricing-tier.ts +132 -0
  388. package/src/components/pricing/pricing.ts +39 -0
  389. package/src/components/progress/progress.ts +95 -0
  390. package/src/components/project-grid/project-card.ts +19 -0
  391. package/src/components/project-grid/project-grid.ts +19 -0
  392. package/src/components/radio/radio.ts +1 -1
  393. package/src/components/reveal/reveal.constants.ts +20 -0
  394. package/src/components/reveal/reveal.ts +344 -0
  395. package/src/components/scroll-progress/scroll-progress.ts +119 -0
  396. package/src/components/section/card-row.ts +152 -0
  397. package/src/components/section/card.ts +197 -0
  398. package/src/components/section/row-item.ts +38 -0
  399. package/src/components/section/section.ts +232 -0
  400. package/src/components/select/select.ts +3 -3
  401. package/src/components/series-nav/series-nav.ts +164 -0
  402. package/src/components/site-header/site-header.ts +276 -0
  403. package/src/components/skeleton/skeleton.ts +7 -7
  404. package/src/components/sparkline/sparkline.ts +83 -0
  405. package/src/components/spinner/spinner.ts +55 -0
  406. package/src/components/split/split.ts +106 -0
  407. package/src/components/stack/stack.ts +88 -0
  408. package/src/components/stat-card/stat-card.ts +179 -0
  409. package/src/components/stats/stat.ts +49 -0
  410. package/src/components/stats/stats.ts +47 -0
  411. package/src/components/switch/switch.ts +2 -2
  412. package/src/components/table/data-table.ts +1015 -425
  413. package/src/components/table/data-table.utils.ts +276 -0
  414. package/src/components/table/table.ts +168 -38
  415. package/src/components/team/person.ts +113 -0
  416. package/src/components/team/team.ts +37 -0
  417. package/src/components/testimonials/testimonial.ts +108 -0
  418. package/src/components/testimonials/testimonials.ts +37 -0
  419. package/src/components/textarea/textarea.ts +3 -3
  420. package/src/components/theme-toggle/theme-toggle.ts +1 -1
  421. package/src/components/time-picker/time-picker.ts +17 -3
  422. package/src/components/timeline/timeline-item.ts +100 -0
  423. package/src/components/timeline/timeline.ts +31 -0
  424. package/src/components/toast/toast.ts +153 -0
  425. package/src/components/toggle-group/toggle-button.ts +9 -5
  426. package/src/components/toggle-group/toggle-group.ts +158 -42
  427. package/src/components/tooltip/tooltip.ts +21 -21
  428. package/src/components/vertical-nav/vertical-nav-group.ts +3 -3
  429. package/src/components/vertical-nav/vertical-nav-item.ts +4 -4
  430. package/src/components/video-embed/video-embed.ts +162 -0
  431. package/src/index.ts +108 -0
  432. package/src/styles/globals.css +63 -0
  433. package/src/styles/index.css +3 -1
  434. package/src/styles/prose.css +154 -0
  435. package/src/styles/reset.ts +5 -0
  436. package/src/styles/theme.css +53 -0
  437. package/src/styles/typography.css +1 -0
@@ -0,0 +1,275 @@
1
+ import {LitElement, html, css, nothing} from "lit";
2
+ import {property, state} from "lit/decorators.js";
3
+ import {formatCompact, formatValue} from "./chart.utils.js";
4
+
5
+ export interface ChartSeries {
6
+ name: string;
7
+ data: (number | null)[];
8
+ color?: string;
9
+ }
10
+
11
+ export interface TooltipRow {
12
+ label: string;
13
+ value: string;
14
+ color?: string;
15
+ }
16
+
17
+ export interface TooltipState {
18
+ x: number;
19
+ y: number;
20
+ title?: string;
21
+ rows: TooltipRow[];
22
+ }
23
+
24
+ export interface LegendItem {
25
+ name: string;
26
+ color: string;
27
+ hidden: boolean;
28
+ }
29
+
30
+ /**
31
+ * Shared behavior for the dashboard charts: responsive width, tooltip, legend toggling,
32
+ * screen-reader announcements and a visually hidden data table fallback.
33
+ *
34
+ * Events (all bubble and are composed):
35
+ * - `st-chart-hover` fires when the pointer or keyboard focus moves to a datum.
36
+ * - `st-chart-leave` fires when the active datum is cleared.
37
+ * - `st-chart-select` fires when a datum is selected/deselected (requires `selectable`).
38
+ * - `st-chart-legend-toggle` fires when a legend entry is shown/hidden.
39
+ */
40
+ export abstract class StChartBase extends LitElement {
41
+ @property({type: Number}) height = 300;
42
+ /** Accessible name describing the chart. */
43
+ @property({type: String}) label = "";
44
+ @property({type: Boolean, reflect: true}) selectable = false;
45
+ @property({type: Boolean, attribute: "hide-legend"}) hideLegend = false;
46
+ /** Formats values in tooltips and on axes. Defaults to locale-aware numbers. */
47
+ @property({attribute: false}) valueFormatter?: (value: number) => string;
48
+
49
+ @state() protected _width = 0;
50
+ @state() protected _tooltip: TooltipState | null = null;
51
+ @state() protected _announce = "";
52
+
53
+ private _resizeObserver?: ResizeObserver;
54
+
55
+ connectedCallback() {
56
+ super.connectedCallback();
57
+ this._resizeObserver = new ResizeObserver((entries) => {
58
+ const width = Math.floor(entries[0].contentRect.width);
59
+ if (width !== this._width) this._width = width;
60
+ });
61
+ this._resizeObserver.observe(this);
62
+ }
63
+
64
+ disconnectedCallback() {
65
+ super.disconnectedCallback();
66
+ this._resizeObserver?.disconnect();
67
+ }
68
+
69
+ protected fmt(value: number) {
70
+ return this.valueFormatter ? this.valueFormatter(value) : formatValue(value);
71
+ }
72
+
73
+ protected fmtAxis(value: number) {
74
+ return this.valueFormatter ? this.valueFormatter(value) : formatCompact(value);
75
+ }
76
+
77
+ protected emit(name: string, detail: unknown) {
78
+ this.dispatchEvent(new CustomEvent(name, {detail, bubbles: true, composed: true}));
79
+ }
80
+
81
+ protected showTooltip(tooltip: TooltipState, announcement: string) {
82
+ this._tooltip = {...tooltip, x: Math.min(Math.max(tooltip.x, 56), this._width - 56)};
83
+ this._announce = announcement;
84
+ }
85
+
86
+ protected hideTooltip() {
87
+ this._tooltip = null;
88
+ this._announce = "";
89
+ }
90
+
91
+ protected renderTooltip() {
92
+ const t = this._tooltip;
93
+ if (!t) return nothing;
94
+ return html`
95
+ <div class="tooltip" aria-hidden="true" style="left:${t.x}px;top:${t.y}px">
96
+ ${t.title ? html`<div class="tooltip-title">${t.title}</div>` : nothing}
97
+ ${t.rows.map(
98
+ (r) => html`
99
+ <div class="tooltip-row">
100
+ ${r.color
101
+ ? html`<span class="swatch" style="background:${r.color}"></span>`
102
+ : nothing}
103
+ <span>${r.label}</span>
104
+ <span class="tooltip-value">${r.value}</span>
105
+ </div>
106
+ `,
107
+ )}
108
+ </div>
109
+ `;
110
+ }
111
+
112
+ protected renderLegend(items: LegendItem[], onToggle: (index: number) => void) {
113
+ if (this.hideLegend || !items.length) return nothing;
114
+ return html`
115
+ <ul class="legend" aria-label="Legend">
116
+ ${items.map(
117
+ (item, i) => html`
118
+ <li>
119
+ <button
120
+ type="button"
121
+ aria-pressed=${item.hidden ? "false" : "true"}
122
+ @click=${() => onToggle(i)}
123
+ >
124
+ <span class="swatch" style="background:${item.color}"></span>${item.name}
125
+ </button>
126
+ </li>
127
+ `,
128
+ )}
129
+ </ul>
130
+ `;
131
+ }
132
+
133
+ /** Visually hidden table so assistive technology can read every value. */
134
+ protected renderDataTable(headers: string[], rows: (string | number)[][]) {
135
+ return html`
136
+ <table class="sr-only">
137
+ <caption>
138
+ ${this.label || "Chart data"}
139
+ </caption>
140
+ <thead>
141
+ <tr>
142
+ ${headers.map((h) => html`<th scope="col">${h}</th>`)}
143
+ </tr>
144
+ </thead>
145
+ <tbody>
146
+ ${rows.map(
147
+ (row) => html`
148
+ <tr>
149
+ ${row.map((cell, i) =>
150
+ i === 0 ? html`<th scope="row">${cell}</th>` : html`<td>${cell}</td>`,
151
+ )}
152
+ </tr>
153
+ `,
154
+ )}
155
+ </tbody>
156
+ </table>
157
+ `;
158
+ }
159
+
160
+ protected renderLiveRegion() {
161
+ return html`<div class="sr-only" aria-live="polite" aria-atomic="true">${this._announce}</div>`;
162
+ }
163
+
164
+ static baseStyles = css`
165
+ :host {
166
+ display: block;
167
+ width: 100%;
168
+ color: var(--st-color-text);
169
+ font-family: var(--st-font-family, inherit);
170
+ }
171
+ .chart {
172
+ position: relative;
173
+ }
174
+ .plot {
175
+ position: relative;
176
+ border-radius: var(--st-radius-sm);
177
+ outline: none;
178
+ }
179
+ .plot:focus-visible {
180
+ outline: 2px solid var(--st-color-primary);
181
+ outline-offset: 2px;
182
+ }
183
+ svg {
184
+ display: block;
185
+ overflow: visible;
186
+ }
187
+ .tick {
188
+ fill: var(--st-color-text-muted);
189
+ font-size: var(--st-font-size-xs);
190
+ }
191
+ .grid {
192
+ stroke: var(--st-color-border);
193
+ stroke-width: 1;
194
+ }
195
+ .axis-line {
196
+ stroke: var(--st-color-text-muted);
197
+ stroke-width: 1;
198
+ }
199
+ .tooltip {
200
+ position: absolute;
201
+ z-index: 2;
202
+ pointer-events: none;
203
+ transform: translate(-50%, calc(-100% - 0.5rem));
204
+ padding: var(--st-spacing-xs) var(--st-spacing-sm);
205
+ border: 1px solid var(--st-color-border);
206
+ border-radius: var(--st-radius-sm);
207
+ background: var(--st-color-surface);
208
+ box-shadow: var(--st-shadow-md);
209
+ font-size: var(--st-font-size-xs);
210
+ white-space: nowrap;
211
+ }
212
+ .tooltip-title {
213
+ margin-bottom: var(--st-spacing-xs);
214
+ font-weight: var(--st-font-weight-medium);
215
+ }
216
+ .tooltip-row {
217
+ display: flex;
218
+ align-items: center;
219
+ gap: var(--st-spacing-xs);
220
+ }
221
+ .tooltip-value {
222
+ margin-left: auto;
223
+ padding-left: var(--st-spacing-md);
224
+ font-weight: var(--st-font-weight-medium);
225
+ }
226
+ .swatch {
227
+ flex-shrink: 0;
228
+ width: 0.625rem;
229
+ height: 0.625rem;
230
+ border-radius: 2px;
231
+ }
232
+ .legend {
233
+ display: flex;
234
+ flex-wrap: wrap;
235
+ gap: var(--st-spacing-xs) var(--st-spacing-md);
236
+ margin-top: var(--st-spacing-sm);
237
+ list-style: none;
238
+ }
239
+ .legend button {
240
+ display: inline-flex;
241
+ align-items: center;
242
+ gap: var(--st-spacing-xs);
243
+ padding: 2px var(--st-spacing-xs);
244
+ border: 0;
245
+ border-radius: var(--st-radius-sm);
246
+ background: none;
247
+ color: var(--st-color-text);
248
+ font: inherit;
249
+ font-size: var(--st-font-size-xs);
250
+ cursor: pointer;
251
+ }
252
+ .legend button[aria-pressed="false"] {
253
+ opacity: 0.55;
254
+ text-decoration: line-through;
255
+ }
256
+ .legend button:focus-visible {
257
+ outline: 2px solid var(--st-color-primary);
258
+ }
259
+ .sr-only {
260
+ position: absolute;
261
+ width: 1px;
262
+ height: 1px;
263
+ overflow: hidden;
264
+ clip: rect(0 0 0 0);
265
+ white-space: nowrap;
266
+ }
267
+ @media (prefers-reduced-motion: no-preference) {
268
+ .animate {
269
+ transition:
270
+ opacity 0.15s ease,
271
+ transform 0.15s ease;
272
+ }
273
+ }
274
+ `;
275
+ }
@@ -0,0 +1,140 @@
1
+ /** Pure helpers shared by the chart components (no DOM or Lit imports so they can be unit tested). */
2
+
3
+ export const CHART_PALETTE_SIZE = 8;
4
+
5
+ /** Resolves a series color: an explicit value wins, otherwise a theme palette token. */
6
+ export const chartColor = (index: number, custom?: string) =>
7
+ custom || `var(--st-chart-${(index % CHART_PALETTE_SIZE) + 1})`;
8
+
9
+ export const formatValue = (v: number) =>
10
+ new Intl.NumberFormat(undefined, {maximumFractionDigits: 2}).format(v);
11
+
12
+ export const formatCompact = (v: number) =>
13
+ new Intl.NumberFormat(undefined, {notation: "compact", maximumFractionDigits: 1}).format(v);
14
+
15
+ export const clamp = (v: number, min: number, max: number) => Math.min(Math.max(v, min), max);
16
+
17
+ /** Maps `v` from [min, max] to [0, 1]; a flat range maps to 0. */
18
+ export const normalize = (v: number, min: number, max: number) =>
19
+ max === min ? 0 : clamp((v - min) / (max - min), 0, 1);
20
+
21
+ function niceNumber(range: number, round: boolean) {
22
+ const exponent = Math.floor(Math.log10(range));
23
+ const fraction = range / 10 ** exponent;
24
+ let nice: number;
25
+ if (round) nice = fraction < 1.5 ? 1 : fraction < 3 ? 2 : fraction < 7 ? 5 : 10;
26
+ else nice = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;
27
+ return nice * 10 ** exponent;
28
+ }
29
+
30
+ export interface NiceScale {
31
+ min: number;
32
+ max: number;
33
+ ticks: number[];
34
+ }
35
+
36
+ /** Computes a "nice" axis range and tick values that enclose [min, max]. */
37
+ export function niceScale(min: number, max: number, tickCount = 5): NiceScale {
38
+ if (!Number.isFinite(min) || !Number.isFinite(max)) return {min: 0, max: 1, ticks: [0, 1]};
39
+ if (min === max) {
40
+ if (min === 0) max = 1;
41
+ else {
42
+ const pad = Math.abs(min) * 0.1;
43
+ min -= pad;
44
+ max += pad;
45
+ }
46
+ }
47
+ const step = niceNumber(niceNumber(max - min, false) / (tickCount - 1), true);
48
+ const niceMin = Math.floor(min / step) * step;
49
+ const niceMax = Math.ceil(max / step) * step;
50
+ const ticks: number[] = [];
51
+ for (let v = niceMin; v <= niceMax + step / 2; v += step) {
52
+ ticks.push(Number(v.toFixed(10)));
53
+ }
54
+ return {min: ticks[0], max: ticks[ticks.length - 1], ticks};
55
+ }
56
+
57
+ /** Angle in radians measured clockwise from 12 o'clock. */
58
+ export function polar(cx: number, cy: number, r: number, angle: number): [number, number] {
59
+ const a = angle - Math.PI / 2;
60
+ return [cx + r * Math.cos(a), cy + r * Math.sin(a)];
61
+ }
62
+
63
+ /** SVG path for a pie slice (inner = 0) or donut segment between two angles. */
64
+ export function arcPath(
65
+ cx: number,
66
+ cy: number,
67
+ r: number,
68
+ inner: number,
69
+ start: number,
70
+ end: number,
71
+ ) {
72
+ const full = Math.PI * 2 - 0.001;
73
+ const sweepEnd = Math.min(end, start + full);
74
+ const large = sweepEnd - start > Math.PI ? 1 : 0;
75
+ const [x1, y1] = polar(cx, cy, r, start);
76
+ const [x2, y2] = polar(cx, cy, r, sweepEnd);
77
+ if (inner <= 0) return `M${cx} ${cy}L${x1} ${y1}A${r} ${r} 0 ${large} 1 ${x2} ${y2}Z`;
78
+ const [x3, y3] = polar(cx, cy, inner, sweepEnd);
79
+ const [x4, y4] = polar(cx, cy, inner, start);
80
+ return `M${x1} ${y1}A${r} ${r} 0 ${large} 1 ${x2} ${y2}L${x3} ${y3}A${inner} ${inner} 0 ${large} 0 ${x4} ${y4}Z`;
81
+ }
82
+
83
+ /** Builds contiguous "M/L" path segments, breaking the line wherever a value is null. */
84
+ export function linePath(points: ([number, number] | null)[]) {
85
+ let d = "";
86
+ let pen = false;
87
+ for (const p of points) {
88
+ if (!p) {
89
+ pen = false;
90
+ continue;
91
+ }
92
+ d += `${pen ? "L" : "M"}${p[0]} ${p[1]}`;
93
+ pen = true;
94
+ }
95
+ return d;
96
+ }
97
+
98
+ /** Closed area paths (one per contiguous segment) down to `baseline`. */
99
+ export function areaPaths(points: ([number, number] | null)[], baseline: number) {
100
+ const paths: string[] = [];
101
+ let segment: [number, number][] = [];
102
+ const flush = () => {
103
+ if (segment.length > 1) {
104
+ const first = segment[0];
105
+ const last = segment[segment.length - 1];
106
+ paths.push(
107
+ `M${first[0]} ${baseline}` +
108
+ segment.map((p) => `L${p[0]} ${p[1]}`).join("") +
109
+ `L${last[0]} ${baseline}Z`,
110
+ );
111
+ }
112
+ segment = [];
113
+ };
114
+ for (const p of points) {
115
+ if (p) segment.push(p);
116
+ else flush();
117
+ }
118
+ flush();
119
+ return paths;
120
+ }
121
+
122
+ /** Moves a roving index for arrow-key navigation, returning null when the key is not handled. */
123
+ export function stepIndex(key: string, current: number | null, length: number): number | null {
124
+ if (length <= 0) return null;
125
+ const at = current ?? -1;
126
+ switch (key) {
127
+ case "ArrowRight":
128
+ case "ArrowDown":
129
+ return Math.min(at + 1, length - 1);
130
+ case "ArrowLeft":
131
+ case "ArrowUp":
132
+ return Math.max(at - 1, 0);
133
+ case "Home":
134
+ return 0;
135
+ case "End":
136
+ return length - 1;
137
+ default:
138
+ return null;
139
+ }
140
+ }
@@ -37,7 +37,7 @@ export class StCodeBlock extends LitElement {
37
37
  margin: var(--st-spacing-md) 0;
38
38
  border-radius: 8px;
39
39
  /* 1. Lock background to a deep dark surface */
40
- background-color: #161b22;
40
+ background-color: var(--st-code-bg);
41
41
  border: 1px solid var(--st-color-border);
42
42
  overflow: hidden;
43
43
  }
@@ -47,8 +47,8 @@ export class StCodeBlock extends LitElement {
47
47
  justify-content: space-between;
48
48
  align-items: center;
49
49
  /* 2. Lock header to a slightly darker shade */
50
- background-color: #0d1117;
51
- border-bottom: 1px solid #30363d;
50
+ background-color: var(--st-code-header-bg);
51
+ border-bottom: 1px solid var(--st-code-border);
52
52
  padding: 0 var(--st-spacing-md);
53
53
  min-height: 2.5rem; /* 40px */
54
54
  }
@@ -56,7 +56,7 @@ export class StCodeBlock extends LitElement {
56
56
  /* Single language label */
57
57
  .language-label {
58
58
  font-size: var(--st-font-size-xs);
59
- color: #8b949e;
59
+ color: var(--st-code-muted);
60
60
  text-transform: uppercase;
61
61
  letter-spacing: 0.05em;
62
62
  font-weight: var(--st-font-weight-bold);
@@ -73,7 +73,7 @@ export class StCodeBlock extends LitElement {
73
73
  background: transparent;
74
74
  border: none;
75
75
  border-bottom: 2px solid transparent;
76
- color: #8b949e;
76
+ color: var(--st-code-muted);
77
77
  font-size: var(--st-font-size-xs);
78
78
  font-weight: var(--st-font-weight-medium);
79
79
  padding: var(--st-spacing-xs) 0;
@@ -82,20 +82,20 @@ export class StCodeBlock extends LitElement {
82
82
  }
83
83
 
84
84
  .tab:hover {
85
- color: #c9d1d9;
85
+ color: var(--st-code-text);
86
86
  }
87
87
 
88
88
  .tab.active {
89
89
  /* 3. Hardcode the active tab to a high-contrast blue instead of dynamic primary */
90
- color: #79c0ff;
91
- border-bottom-color: #79c0ff;
90
+ color: var(--st-code-accent);
91
+ border-bottom-color: var(--st-code-accent);
92
92
  }
93
93
 
94
94
  /* Copy Button */
95
95
  .copy-button {
96
96
  background: transparent;
97
97
  border: 1px solid transparent;
98
- color: #8b949e;
98
+ color: var(--st-code-muted);
99
99
  cursor: pointer;
100
100
  display: flex;
101
101
  align-items: center;
@@ -108,8 +108,8 @@ export class StCodeBlock extends LitElement {
108
108
  }
109
109
 
110
110
  .copy-button:hover {
111
- color: #c9d1d9;
112
- background-color: rgba(255, 255, 255, 0.1);
111
+ color: var(--st-code-text);
112
+ background-color: var(--st-code-hover);
113
113
  }
114
114
 
115
115
  .copy-button svg {
@@ -123,7 +123,7 @@ export class StCodeBlock extends LitElement {
123
123
  }
124
124
 
125
125
  .copy-button.copied {
126
- color: #3fb950; /* High-contrast success green */
126
+ color: var(--st-code-success); /* High-contrast success green */
127
127
  }
128
128
 
129
129
  pre {
@@ -136,7 +136,7 @@ export class StCodeBlock extends LitElement {
136
136
  font-size: 0.875rem;
137
137
  line-height: 1.5;
138
138
  /* 4. Ensure default text stays light */
139
- color: #c9d1d9;
139
+ color: var(--st-code-text);
140
140
  }
141
141
 
142
142
  .raw-content {
@@ -150,11 +150,11 @@ export class StCodeBlock extends LitElement {
150
150
  .token.prolog,
151
151
  .token.doctype,
152
152
  .token.cdata {
153
- color: #8b949e;
153
+ color: var(--st-code-muted);
154
154
  font-style: italic;
155
155
  }
156
156
  .token.punctuation {
157
- color: #8b949e;
157
+ color: var(--st-code-muted);
158
158
  }
159
159
  .token.namespace {
160
160
  opacity: 0.7;
@@ -166,7 +166,7 @@ export class StCodeBlock extends LitElement {
166
166
  .token.constant,
167
167
  .token.symbol,
168
168
  .token.deleted {
169
- color: #79c0ff;
169
+ color: var(--st-code-accent);
170
170
  }
171
171
  .token.selector,
172
172
  .token.attr-name,
@@ -174,33 +174,33 @@ export class StCodeBlock extends LitElement {
174
174
  .token.char,
175
175
  .token.builtin,
176
176
  .token.inserted {
177
- color: #a5d6ff;
177
+ color: var(--st-code-string);
178
178
  }
179
179
 
180
- /* Replaced var(--st-color-text) with #c9d1d9 */
180
+ /* Replaced var(--st-color-text) with var(--st-code-text) */
181
181
  .token.operator,
182
182
  .token.entity,
183
183
  .token.url,
184
184
  .language-css .token.string,
185
185
  .style .token.string {
186
- color: #c9d1d9;
186
+ color: var(--st-code-text);
187
187
  }
188
188
 
189
- /* Replaced var(--st-color-primary) with #ff7b72 (High-contrast pink/red for keywords) */
189
+ /* Replaced var(--st-color-primary) with var(--st-code-keyword) (High-contrast pink/red for keywords) */
190
190
  .token.atrule,
191
191
  .token.attr-value,
192
192
  .token.keyword {
193
- color: #ff7b72;
193
+ color: var(--st-code-keyword);
194
194
  }
195
195
 
196
196
  .token.function,
197
197
  .token.class-name {
198
- color: #d2a8ff;
198
+ color: var(--st-code-function);
199
199
  }
200
200
  .token.regex,
201
201
  .token.important,
202
202
  .token.variable {
203
- color: #ffa657;
203
+ color: var(--st-code-number);
204
204
  }
205
205
  `,
206
206
  ];
@@ -218,7 +218,7 @@ export class StCodeBlock extends LitElement {
218
218
  this._snippets = templates.map((template) => {
219
219
  const lang = template.getAttribute("data-lang") || this.language;
220
220
  const label = template.getAttribute("data-label") || lang; // Fallback to lang if no label provided
221
- const rawCode = this._dedent(template.innerHTML);
221
+ const rawCode = this._dedent(this._sourceOf(template));
222
222
 
223
223
  const grammar = Prism.languages[lang] || Prism.languages.javascript;
224
224
  const highlightedCode = Prism.highlight(rawCode, grammar, lang);
@@ -241,6 +241,17 @@ export class StCodeBlock extends LitElement {
241
241
  this._activeIndex = 0;
242
242
  }
243
243
 
244
+ /**
245
+ * Plain-text templates (JavaScript, JSON, shell) are read as text so characters such as
246
+ * `=>`, `<` and `&` are not HTML-escaped. Templates holding markup are serialized as HTML.
247
+ */
248
+ private _sourceOf(template: HTMLTemplateElement): string {
249
+ const nodes = Array.from(template.content.childNodes);
250
+ return nodes.every((n) => n.nodeType === Node.TEXT_NODE)
251
+ ? (template.content.textContent ?? "")
252
+ : template.innerHTML;
253
+ }
254
+
244
255
  private _dedent(text: string): string {
245
256
  const lines = text.split("\n");
246
257
  const minIndent = lines