@sankhyatronics/sankhya-cms 0.1.18 → 0.3.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 (216) hide show
  1. package/custom-elements.json +11634 -3153
  2. package/dist/attention-panel/index.js +2 -2
  3. package/dist/bar-chart/index.js +2 -2
  4. package/dist/bento-grid/index.d.ts +33 -1
  5. package/dist/bento-grid/index.js +4 -3
  6. package/dist/booking/index.d.ts +309 -0
  7. package/dist/booking/index.js +20 -0
  8. package/dist/booking/index.js.map +1 -0
  9. package/dist/card/index.d.ts +3 -4
  10. package/dist/card/index.js +2 -2
  11. package/dist/carousel/index.d.ts +20 -6
  12. package/dist/carousel/index.js +3 -3
  13. package/dist/chip/index.js +2 -2
  14. package/dist/{chunk-JQY2G4QK.js → chunk-2GTR37PU.js} +2 -2
  15. package/dist/chunk-2GTR37PU.js.map +1 -0
  16. package/dist/{chunk-FLY7TNRT.js → chunk-2HMOX253.js} +128 -25
  17. package/dist/chunk-2HMOX253.js.map +1 -0
  18. package/dist/{chunk-DH53HZPB.js → chunk-37KFBKPD.js} +32 -4
  19. package/dist/chunk-37KFBKPD.js.map +1 -0
  20. package/dist/{chunk-ALI26WOB.js → chunk-4XPKKYVZ.js} +54 -15
  21. package/dist/chunk-4XPKKYVZ.js.map +1 -0
  22. package/dist/chunk-535QAZ6A.js +236 -0
  23. package/dist/chunk-535QAZ6A.js.map +1 -0
  24. package/dist/{chunk-AKJQ345O.js → chunk-5AWGZQWU.js} +2 -2
  25. package/dist/chunk-6OZKZG5J.js +300 -0
  26. package/dist/chunk-6OZKZG5J.js.map +1 -0
  27. package/dist/chunk-AYNT7G3J.js +805 -0
  28. package/dist/chunk-AYNT7G3J.js.map +1 -0
  29. package/dist/chunk-BEWX3E6P.js +32 -0
  30. package/dist/chunk-BEWX3E6P.js.map +1 -0
  31. package/dist/chunk-CZUGPKXV.js +275 -0
  32. package/dist/chunk-CZUGPKXV.js.map +1 -0
  33. package/dist/{chunk-LEXZKGQX.js → chunk-DJFWZOZM.js} +107 -11
  34. package/dist/chunk-DJFWZOZM.js.map +1 -0
  35. package/dist/chunk-DPANTC3O.js +1714 -0
  36. package/dist/chunk-DPANTC3O.js.map +1 -0
  37. package/dist/chunk-EKZFFY45.js +426 -0
  38. package/dist/chunk-EKZFFY45.js.map +1 -0
  39. package/dist/chunk-ER7MCPDV.js +7 -0
  40. package/dist/chunk-ER7MCPDV.js.map +1 -0
  41. package/dist/chunk-EW2RK5Y6.js +383 -0
  42. package/dist/chunk-EW2RK5Y6.js.map +1 -0
  43. package/dist/{chunk-BLQV2YMO.js → chunk-EZOKT7NJ.js} +2 -2
  44. package/dist/chunk-FF2LWEF3.js +386 -0
  45. package/dist/chunk-FF2LWEF3.js.map +1 -0
  46. package/dist/chunk-FOUK3NHR.js +7 -0
  47. package/dist/chunk-FOUK3NHR.js.map +1 -0
  48. package/dist/chunk-GB4NGCZI.js +181 -0
  49. package/dist/chunk-GB4NGCZI.js.map +1 -0
  50. package/dist/{chunk-7NLZND6Q.js → chunk-GOFSMD6W.js} +35 -11
  51. package/dist/chunk-GOFSMD6W.js.map +1 -0
  52. package/dist/{chunk-6D6ROU7X.js → chunk-IGMVF3KK.js} +2 -2
  53. package/dist/{chunk-INMSEYT6.js → chunk-IVPVYVWG.js} +2 -2
  54. package/dist/chunk-JURCF4OD.js +381 -0
  55. package/dist/chunk-JURCF4OD.js.map +1 -0
  56. package/dist/{chunk-FZ36KL73.js → chunk-KZ7PMFWS.js} +11 -1
  57. package/dist/chunk-KZ7PMFWS.js.map +1 -0
  58. package/dist/{chunk-EMCQBT3S.js → chunk-LO6TZBGD.js} +129 -35
  59. package/dist/chunk-LO6TZBGD.js.map +1 -0
  60. package/dist/chunk-MFRGAT6D.js +860 -0
  61. package/dist/chunk-MFRGAT6D.js.map +1 -0
  62. package/dist/chunk-MIBVQXRU.js +1098 -0
  63. package/dist/chunk-MIBVQXRU.js.map +1 -0
  64. package/dist/{chunk-35TX3AOA.js → chunk-NABSRUXG.js} +2 -2
  65. package/dist/{chunk-R5G6KFTJ.js → chunk-NXKDZWS7.js} +44 -6
  66. package/dist/chunk-NXKDZWS7.js.map +1 -0
  67. package/dist/{chunk-KMU6ABQF.js → chunk-NXUS2CH7.js} +14 -1
  68. package/dist/chunk-NXUS2CH7.js.map +1 -0
  69. package/dist/{chunk-GJO3RGOB.js → chunk-OCPGOLVF.js} +56 -11
  70. package/dist/chunk-OCPGOLVF.js.map +1 -0
  71. package/dist/chunk-OEOE6IFY.js +628 -0
  72. package/dist/chunk-OEOE6IFY.js.map +1 -0
  73. package/dist/{chunk-SMLR736E.js → chunk-PV6OCXXN.js} +2 -2
  74. package/dist/chunk-PV6OCXXN.js.map +1 -0
  75. package/dist/chunk-Q66CJO3P.js +534 -0
  76. package/dist/chunk-Q66CJO3P.js.map +1 -0
  77. package/dist/{chunk-MG2VTZA4.js → chunk-QS3ANOWN.js} +2 -2
  78. package/dist/{chunk-ZN4LIKVG.js → chunk-QSJ543V2.js} +2 -2
  79. package/dist/chunk-QSJ543V2.js.map +1 -0
  80. package/dist/{chunk-FML6AG2V.js → chunk-RANC3OI6.js} +2 -2
  81. package/dist/chunk-T4BIN37Q.js +32 -0
  82. package/dist/chunk-T4BIN37Q.js.map +1 -0
  83. package/dist/{chunk-YVTFQHVY.js → chunk-TEAZZPDQ.js} +2 -2
  84. package/dist/chunk-TJK55CJ2.js +49 -0
  85. package/dist/chunk-TJK55CJ2.js.map +1 -0
  86. package/dist/chunk-UKIVLF7S.js +32 -0
  87. package/dist/chunk-UKIVLF7S.js.map +1 -0
  88. package/dist/chunk-V4R7PYP5.js +905 -0
  89. package/dist/chunk-V4R7PYP5.js.map +1 -0
  90. package/dist/{chunk-AG2COC64.js → chunk-VVYQ2DDS.js} +2 -2
  91. package/dist/chunk-WAMOAAMN.js +16 -0
  92. package/dist/chunk-WAMOAAMN.js.map +1 -0
  93. package/dist/chunk-WAYHHL4J.js +1234 -0
  94. package/dist/chunk-WAYHHL4J.js.map +1 -0
  95. package/dist/{chunk-YQ42EBK5.js → chunk-WH6HE6SY.js} +10 -4
  96. package/dist/chunk-WH6HE6SY.js.map +1 -0
  97. package/dist/chunk-XP6DI3VY.js +180 -0
  98. package/dist/chunk-XP6DI3VY.js.map +1 -0
  99. package/dist/{chunk-5EBWMPJS.js → chunk-XS6LNTSH.js} +76 -14
  100. package/dist/chunk-XS6LNTSH.js.map +1 -0
  101. package/dist/{chunk-WT4OATGP.js → chunk-ZKFCDVB4.js} +16 -7
  102. package/dist/chunk-ZKFCDVB4.js.map +1 -0
  103. package/dist/cms-theme.css +29 -0
  104. package/dist/contact-form/index.d.ts +220 -0
  105. package/dist/contact-form/index.js +16 -0
  106. package/dist/contact-form/index.js.map +1 -0
  107. package/dist/content-block/index.d.ts +39 -4
  108. package/dist/content-block/index.js +8 -4
  109. package/dist/cookie-consent/index.d.ts +60 -12
  110. package/dist/cookie-consent/index.js +3 -2
  111. package/dist/date-tile/index.js +2 -2
  112. package/dist/dropdown/index.d.ts +29 -11
  113. package/dist/dropdown/index.js +4 -2
  114. package/dist/feature-split/index.d.ts +6 -1
  115. package/dist/feature-split/index.js +5 -4
  116. package/dist/features-section/index.d.ts +53 -9
  117. package/dist/features-section/index.js +6 -5
  118. package/dist/flow/index.d.ts +35 -0
  119. package/dist/flow/index.js +9 -0
  120. package/dist/flow/index.js.map +1 -0
  121. package/dist/footer/index.d.ts +13 -0
  122. package/dist/footer/index.js +2 -2
  123. package/dist/header/index.d.ts +135 -16
  124. package/dist/header/index.js +3 -2
  125. package/dist/hero/index.d.ts +92 -8
  126. package/dist/hero/index.js +6 -3
  127. package/dist/icon-button/index.d.ts +7 -7
  128. package/dist/icon-button/index.js +2 -2
  129. package/dist/index.d.ts +12 -3
  130. package/dist/index.js +121 -47
  131. package/dist/items-accordion/index.d.ts +9 -0
  132. package/dist/items-accordion/index.js +4 -3
  133. package/dist/kpi-card/index.js +2 -2
  134. package/dist/markdown/index.d.ts +19 -2
  135. package/dist/markdown/index.js +3 -2
  136. package/dist/mega-menu/index.d.ts +95 -7
  137. package/dist/mega-menu/index.js +7 -2
  138. package/dist/menu-grid/index.d.ts +2 -3
  139. package/dist/menu-grid/index.js +2 -2
  140. package/dist/menu-grid-item/index.d.ts +6 -8
  141. package/dist/menu-grid-item/index.js +2 -2
  142. package/dist/menu-item/index.d.ts +11 -7
  143. package/dist/menu-item/index.js +3 -2
  144. package/dist/plan-cards/index.d.ts +69 -0
  145. package/dist/plan-cards/index.js +13 -0
  146. package/dist/plan-cards/index.js.map +1 -0
  147. package/dist/product-nav/index.d.ts +127 -0
  148. package/dist/product-nav/index.js +11 -0
  149. package/dist/product-nav/index.js.map +1 -0
  150. package/dist/promo-banner/index.d.ts +42 -4
  151. package/dist/promo-banner/index.js +6 -3
  152. package/dist/quote-dialog/index.d.ts +174 -0
  153. package/dist/quote-dialog/index.js +22 -0
  154. package/dist/quote-dialog/index.js.map +1 -0
  155. package/dist/schema/index.d.ts +11 -0
  156. package/dist/schema/index.js +9 -0
  157. package/dist/schema/index.js.map +1 -1
  158. package/dist/screenshot-tour/index.d.ts +54 -0
  159. package/dist/screenshot-tour/index.js +9 -0
  160. package/dist/screenshot-tour/index.js.map +1 -0
  161. package/dist/section/index.d.ts +3 -0
  162. package/dist/section/index.js +3 -3
  163. package/dist/segmented-control/index.js +2 -2
  164. package/dist/select/index.js +2 -2
  165. package/dist/shared/styles.d.ts +7 -1
  166. package/dist/shared/styles.js +3 -1
  167. package/dist/stats/index.js +2 -2
  168. package/dist/steps/index.d.ts +45 -0
  169. package/dist/steps/index.js +11 -0
  170. package/dist/steps/index.js.map +1 -0
  171. package/dist/tag-strip/index.d.ts +33 -0
  172. package/dist/tag-strip/index.js +9 -0
  173. package/dist/tag-strip/index.js.map +1 -0
  174. package/dist/testimonials/index.d.ts +9 -1
  175. package/dist/testimonials/index.js +3 -3
  176. package/dist/tooltip/index.js +2 -2
  177. package/package.json +38 -2
  178. package/dist/chunk-5EBWMPJS.js.map +0 -1
  179. package/dist/chunk-76AVBQUA.js +0 -252
  180. package/dist/chunk-76AVBQUA.js.map +0 -1
  181. package/dist/chunk-7NLZND6Q.js.map +0 -1
  182. package/dist/chunk-ALI26WOB.js.map +0 -1
  183. package/dist/chunk-BMHMNXIA.js +0 -158
  184. package/dist/chunk-BMHMNXIA.js.map +0 -1
  185. package/dist/chunk-DH53HZPB.js.map +0 -1
  186. package/dist/chunk-EMCQBT3S.js.map +0 -1
  187. package/dist/chunk-FLY7TNRT.js.map +0 -1
  188. package/dist/chunk-FZ36KL73.js.map +0 -1
  189. package/dist/chunk-GJO3RGOB.js.map +0 -1
  190. package/dist/chunk-J6EO4R73.js +0 -633
  191. package/dist/chunk-J6EO4R73.js.map +0 -1
  192. package/dist/chunk-JKBWZLG4.js +0 -348
  193. package/dist/chunk-JKBWZLG4.js.map +0 -1
  194. package/dist/chunk-JQY2G4QK.js.map +0 -1
  195. package/dist/chunk-KMU6ABQF.js.map +0 -1
  196. package/dist/chunk-LEXZKGQX.js.map +0 -1
  197. package/dist/chunk-MSSH3HFK.js +0 -205
  198. package/dist/chunk-MSSH3HFK.js.map +0 -1
  199. package/dist/chunk-R5G6KFTJ.js.map +0 -1
  200. package/dist/chunk-SMLR736E.js.map +0 -1
  201. package/dist/chunk-VWS53WY4.js +0 -157
  202. package/dist/chunk-VWS53WY4.js.map +0 -1
  203. package/dist/chunk-WT4OATGP.js.map +0 -1
  204. package/dist/chunk-XWB4CKDU.js +0 -708
  205. package/dist/chunk-XWB4CKDU.js.map +0 -1
  206. package/dist/chunk-YQ42EBK5.js.map +0 -1
  207. package/dist/chunk-ZN4LIKVG.js.map +0 -1
  208. /package/dist/{chunk-AKJQ345O.js.map → chunk-5AWGZQWU.js.map} +0 -0
  209. /package/dist/{chunk-BLQV2YMO.js.map → chunk-EZOKT7NJ.js.map} +0 -0
  210. /package/dist/{chunk-6D6ROU7X.js.map → chunk-IGMVF3KK.js.map} +0 -0
  211. /package/dist/{chunk-INMSEYT6.js.map → chunk-IVPVYVWG.js.map} +0 -0
  212. /package/dist/{chunk-35TX3AOA.js.map → chunk-NABSRUXG.js.map} +0 -0
  213. /package/dist/{chunk-MG2VTZA4.js.map → chunk-QS3ANOWN.js.map} +0 -0
  214. /package/dist/{chunk-FML6AG2V.js.map → chunk-RANC3OI6.js.map} +0 -0
  215. /package/dist/{chunk-YVTFQHVY.js.map → chunk-TEAZZPDQ.js.map} +0 -0
  216. /package/dist/{chunk-AG2COC64.js.map → chunk-VVYQ2DDS.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Tooltip
3
- } from "../chunk-FML6AG2V.js";
4
- import "../chunk-KMU6ABQF.js";
3
+ } from "../chunk-RANC3OI6.js";
4
+ import "../chunk-NXUS2CH7.js";
5
5
  import "../chunk-EUXUH3YW.js";
6
6
  export {
7
7
  Tooltip
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyatronics/sankhya-cms",
3
- "version": "0.1.18",
3
+ "version": "0.3.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sankhyatronics/SankhyaCMS.git",
@@ -56,10 +56,18 @@
56
56
  "types": "./dist/segmented-control/index.d.ts",
57
57
  "import": "./dist/segmented-control/index.js"
58
58
  },
59
+ "./booking": {
60
+ "types": "./dist/booking/index.d.ts",
61
+ "import": "./dist/booking/index.js"
62
+ },
59
63
  "./carousel": {
60
64
  "types": "./dist/carousel/index.d.ts",
61
65
  "import": "./dist/carousel/index.js"
62
66
  },
67
+ "./contact-form": {
68
+ "types": "./dist/contact-form/index.d.ts",
69
+ "import": "./dist/contact-form/index.js"
70
+ },
63
71
  "./content-block": {
64
72
  "types": "./dist/content-block/index.d.ts",
65
73
  "import": "./dist/content-block/index.js"
@@ -120,10 +128,26 @@
120
128
  "types": "./dist/menu-item/index.d.ts",
121
129
  "import": "./dist/menu-item/index.js"
122
130
  },
131
+ "./plan-cards": {
132
+ "types": "./dist/plan-cards/index.d.ts",
133
+ "import": "./dist/plan-cards/index.js"
134
+ },
135
+ "./product-nav": {
136
+ "types": "./dist/product-nav/index.d.ts",
137
+ "import": "./dist/product-nav/index.js"
138
+ },
123
139
  "./promo-banner": {
124
140
  "types": "./dist/promo-banner/index.d.ts",
125
141
  "import": "./dist/promo-banner/index.js"
126
142
  },
143
+ "./quote-dialog": {
144
+ "types": "./dist/quote-dialog/index.d.ts",
145
+ "import": "./dist/quote-dialog/index.js"
146
+ },
147
+ "./screenshot-tour": {
148
+ "types": "./dist/screenshot-tour/index.d.ts",
149
+ "import": "./dist/screenshot-tour/index.js"
150
+ },
127
151
  "./section": {
128
152
  "types": "./dist/section/index.d.ts",
129
153
  "import": "./dist/section/index.js"
@@ -136,6 +160,18 @@
136
160
  "types": "./dist/stats/index.d.ts",
137
161
  "import": "./dist/stats/index.js"
138
162
  },
163
+ "./steps": {
164
+ "types": "./dist/steps/index.d.ts",
165
+ "import": "./dist/steps/index.js"
166
+ },
167
+ "./tag-strip": {
168
+ "types": "./dist/tag-strip/index.d.ts",
169
+ "import": "./dist/tag-strip/index.js"
170
+ },
171
+ "./flow": {
172
+ "types": "./dist/flow/index.d.ts",
173
+ "import": "./dist/flow/index.js"
174
+ },
139
175
  "./testimonials": {
140
176
  "types": "./dist/testimonials/index.d.ts",
141
177
  "import": "./dist/testimonials/index.js"
@@ -181,7 +217,7 @@
181
217
  "access": "public"
182
218
  },
183
219
  "scripts": {
184
- "build": "tsup src/index.ts src/schema/index.ts src/theming/index.ts src/shared/styles.ts src/shared/icons.ts src/attention-panel/index.ts src/bar-chart/index.ts src/chip/index.ts src/date-tile/index.ts src/kpi-card/index.ts src/segmented-control/index.ts src/tooltip/index.ts src/bento-grid/index.ts src/card/index.ts src/carousel/index.ts src/content-block/index.ts src/cookie-consent/index.ts src/dropdown/index.ts src/feature-split/index.ts src/features-section/index.ts src/footer/index.ts src/header/index.ts src/hero/index.ts src/icon-button/index.ts src/items-accordion/index.ts src/markdown/index.ts src/mega-menu/index.ts src/menu-grid/index.ts src/menu-grid-item/index.ts src/menu-item/index.ts src/promo-banner/index.ts src/section/index.ts src/select/index.ts src/stats/index.ts src/testimonials/index.ts --format esm --dts --sourcemap --clean && node scripts/copy-theme.mjs && node scripts/copy-fonts.mjs && cem analyze",
220
+ "build": "tsup src/index.ts src/schema/index.ts src/theming/index.ts src/shared/styles.ts src/shared/icons.ts src/attention-panel/index.ts src/bar-chart/index.ts src/chip/index.ts src/date-tile/index.ts src/kpi-card/index.ts src/segmented-control/index.ts src/tooltip/index.ts src/bento-grid/index.ts src/card/index.ts src/booking/index.ts src/carousel/index.ts src/contact-form/index.ts src/content-block/index.ts src/cookie-consent/index.ts src/dropdown/index.ts src/feature-split/index.ts src/features-section/index.ts src/footer/index.ts src/header/index.ts src/hero/index.ts src/icon-button/index.ts src/items-accordion/index.ts src/markdown/index.ts src/mega-menu/index.ts src/menu-grid/index.ts src/menu-grid-item/index.ts src/menu-item/index.ts src/plan-cards/index.ts src/product-nav/index.ts src/promo-banner/index.ts src/quote-dialog/index.ts src/screenshot-tour/index.ts src/section/index.ts src/select/index.ts src/stats/index.ts src/steps/index.ts src/tag-strip/index.ts src/flow/index.ts src/testimonials/index.ts --format esm --dts --sourcemap --clean && node scripts/copy-theme.mjs && node scripts/copy-fonts.mjs && cem analyze",
185
221
  "dev": "tsup src/index.ts --watch --format esm --dts",
186
222
  "typecheck": "tsc --noEmit",
187
223
  "lint": "oxlint",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/markdown/Markdown.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\nimport DOMPurify from 'dompurify';\nimport { marked } from 'marked';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport type { MarkdownErrorEventDetail } from './MarkdownEvents';\n\n/**\n * Renders Markdown (GFM, single newlines become `<br>`) from either an inline `content` string or\n * a `src` URL it fetches. Ports `SankhyaUI`'s `useMarkdown` hook + `react-markdown` (remark-gfm,\n * remark-breaks); output is sanitized with DOMPurify. `src` wins over `content` when both are set.\n * While a fetch is pending it shows \"Loading content...\"; on failure \"Error loading content.\" and\n * a `markdown-error` event (detail: `{ error }`).\n *\n * Text color is inherited from the parent so inverted containers just work.\n */\n@customElement('st-markdown')\nexport class Markdown extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n ${fontFamilyStyles}\n line-height: 1.7;\n }\n\n :host > div > :first-child {\n margin-top: 0;\n }\n\n h1,\n h2,\n h3,\n h4 {\n color: inherit;\n font-weight: var(--st-font-weight-bold);\n line-height: 1.3;\n }\n\n h2 {\n font-size: var(--st-text-2xl);\n margin: var(--st-space-48) 0 var(--st-space-24);\n }\n\n h3 {\n font-size: var(--st-text-xl);\n font-weight: var(--st-font-weight-semibold);\n margin: var(--st-space-32) 0 var(--st-space-16);\n }\n\n p {\n margin: 0 0 var(--st-space-24);\n }\n\n ul,\n ol {\n margin: 0 0 var(--st-space-24);\n padding-left: var(--st-space-24);\n }\n\n li {\n margin-bottom: var(--st-space-8);\n }\n\n a {\n color: inherit;\n text-decoration: underline;\n text-underline-offset: 4px;\n }\n\n a:hover {\n color: var(--st-color-text-strong);\n }\n\n img {\n max-width: 100%;\n height: auto;\n border-radius: var(--st-radius-sm);\n margin: var(--st-space-32) 0;\n }\n\n blockquote {\n border-left: 4px solid var(--st-color-border);\n margin: var(--st-space-32) 0;\n padding-left: var(--st-space-24);\n font-style: italic;\n }\n\n table {\n border-collapse: collapse;\n margin: 0 0 var(--st-space-24);\n }\n\n th,\n td {\n border: 1px solid var(--st-color-border);\n padding: var(--st-space-8) var(--st-space-12);\n }\n\n pre,\n code {\n background: var(--st-color-subtle);\n border-radius: var(--st-radius-xs);\n }\n\n code {\n padding: 0 var(--st-space-4);\n }\n\n pre {\n padding: var(--st-space-16);\n overflow-x: auto;\n }\n\n pre code {\n padding: 0;\n }\n `;\n\n /** Inline Markdown source. Ignored when `src` is set. */\n @property({ type: String })\n content = '';\n\n /** URL of a Markdown file to fetch. */\n @property({ type: String })\n src = '';\n\n @state() private fetched = '';\n @state() private loading = false;\n @state() private error: Error | null = null;\n\n private abort?: AbortController;\n\n willUpdate(changed: Map<string, unknown>): void {\n if (changed.has('src')) void this.load();\n }\n\n disconnectedCallback(): void {\n this.abort?.abort();\n super.disconnectedCallback();\n }\n\n private async load(): Promise<void> {\n this.abort?.abort();\n this.fetched = '';\n this.error = null;\n if (!this.src) {\n this.loading = false;\n return;\n }\n const controller = new AbortController();\n this.abort = controller;\n this.loading = true;\n try {\n const response = await fetch(this.src, { signal: controller.signal });\n if (!response.ok) throw new Error(`Failed to fetch markdown: ${response.statusText}`);\n const text = await response.text();\n if (controller.signal.aborted) return;\n this.fetched = text;\n } catch (err) {\n if (controller.signal.aborted) return;\n this.error = err instanceof Error ? err : new Error('Unknown error fetching markdown');\n this.dispatchEvent(\n new CustomEvent<MarkdownErrorEventDetail>('markdown-error', {\n detail: { error: this.error },\n bubbles: true,\n composed: true\n })\n );\n }\n this.loading = false;\n }\n\n render() {\n if (this.loading) return html`<div part=\"loading\">Loading content...</div>`;\n if (this.error) return html`<div part=\"error\">Error loading content.</div>`;\n const source = this.src ? this.fetched : this.content;\n if (!source) return nothing;\n const rendered = DOMPurify.sanitize(marked.parse(source, { gfm: true, breaks: true, async: false }));\n return html`<div part=\"body\">${unsafeHTML(rendered)}</div>`;\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,UAAU,aAAa;AAC/C,SAAS,kBAAkB;AAC3B,OAAO,eAAe;AACtB,SAAS,cAAc;AAehB,IAAM,WAAN,cAAuB,WAAW;AAAA,EAAlC;AAAA;AAyGL,mBAAU;AAIV,eAAM;AAEG,SAAQ,UAAU;AAClB,SAAQ,UAAU;AAClB,SAAQ,QAAsB;AAAA;AAAA,EAIvC,WAAW,SAA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ACF;AArKa,SACJ,SAAS;AAAA,MACZ,iBAAiB;AAAA;AAAA;AAAA;AAAA,QAIf,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAmGtB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAxGf,SAyGX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA5Gf,SA6GX;AAEiB;AAAA,EAAhB,MAAM;AAAA,GA/GI,SA+GM;AACA;AAAA,EAAhB,MAAM;AAAA,GAhHI,SAgHM;AACA;AAAA,EAAhB,MAAM;AAAA,GAjHI,SAiHM;AAjHN,WAAN;AAAA,EADN,cAAc,aAAa;AAAA,GACf;","names":[]}
@@ -1,252 +0,0 @@
1
- import {
2
- cardTitleStyles,
3
- iconTileStyles,
4
- invertedSectionTextStyles,
5
- reducedMotionStyles,
6
- sectionHeaderStyles,
7
- sectionSubtitleStyles,
8
- sectionTitleStyles
9
- } from "./chunk-FZ36KL73.js";
10
- import {
11
- controlBaseStyles,
12
- fontFamilyStyles
13
- } from "./chunk-KMU6ABQF.js";
14
- import {
15
- __decorateClass
16
- } from "./chunk-EUXUH3YW.js";
17
-
18
- // src/bento-grid/BentoGrid.ts
19
- import { LitElement, css, html, nothing } from "lit";
20
- import { customElement, property } from "lit/decorators.js";
21
- import "iconify-icon";
22
- var BentoGrid = class extends LitElement {
23
- constructor() {
24
- super(...arguments);
25
- this.inverted = false;
26
- this.title = "";
27
- this.subtitle = "";
28
- this.items = [];
29
- }
30
- renderCard(item) {
31
- const classes = `card col-${item.colSpan ?? 1} row-${item.rowSpan ?? 1} ${item.imageSrc ? "has-image" : ""}`;
32
- const body = html`
33
- ${item.imageSrc ? html`<div class="image-wrapper" part="image-wrapper">
34
- <img class="image" part="image" src=${item.imageSrc} alt=${item.imageAlt ?? item.title} />
35
- </div>` : nothing}
36
- <div class="content" part="content">
37
- ${item.icon ? html`<div class="icon" part="icon"><iconify-icon icon=${item.icon}></iconify-icon></div>` : nothing}
38
- <div class="text">
39
- <h3 class="card-title" part="card-title">${item.title}</h3>
40
- ${item.description ? html`<p class="card-description" part="card-description">${item.description}</p>` : nothing}
41
- </div>
42
- </div>
43
- `;
44
- return item.href ? html`<a part="card" class=${classes} href=${item.href}>${body}</a>` : html`<div part="card" class=${classes}>${body}</div>`;
45
- }
46
- render() {
47
- return html`
48
- <div class="container" part="container">
49
- ${this.title || this.subtitle ? html`<div class="header" part="header">
50
- ${this.title ? html`<h2 class="title" part="title">${this.title}</h2>` : nothing}
51
- ${this.subtitle ? html`<p class="subtitle" part="subtitle">${this.subtitle}</p>` : nothing}
52
- </div>` : nothing}
53
- <div class="grid" part="grid">${this.items.map((item) => this.renderCard(item))}</div>
54
- </div>
55
- `;
56
- }
57
- };
58
- BentoGrid.styles = css`
59
- ${controlBaseStyles}
60
-
61
- :host {
62
- display: block;
63
- /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
64
- padding; override with --st-bento-grid-padding instead. */
65
- padding: var(--st-bento-grid-padding, var(--st-cms-section-padding) var(--st-space-24)) !important;
66
- background: var(--st-color-page);
67
- ${fontFamilyStyles}
68
- }
69
-
70
- :host([inverted]) {
71
- background: var(--st-color-text-strong);
72
- }
73
-
74
- .container {
75
- max-width: var(--st-cms-container-max);
76
- margin: 0 auto;
77
- }
78
-
79
- .header {
80
- ${sectionHeaderStyles}
81
- }
82
-
83
- .title {
84
- ${sectionTitleStyles}
85
- }
86
-
87
- .subtitle {
88
- ${sectionSubtitleStyles}
89
- margin-bottom: 0;
90
- }
91
-
92
- ${invertedSectionTextStyles}
93
-
94
- .grid {
95
- display: grid;
96
- grid-template-columns: repeat(4, 1fr);
97
- grid-auto-rows: minmax(240px, auto);
98
- gap: var(--st-space-24);
99
- }
100
-
101
- .card {
102
- position: relative;
103
- display: flex;
104
- flex-direction: column;
105
- overflow: hidden;
106
- border: 1px solid var(--st-color-border);
107
- border-radius: var(--st-space-24);
108
- background: var(--st-color-surface);
109
- color: inherit;
110
- text-decoration: none;
111
- transition:
112
- transform 0.3s ease,
113
- box-shadow 0.3s ease;
114
- }
115
-
116
- :host([inverted]) .card {
117
- background: var(--st-color-text-strong);
118
- border-color: var(--st-color-text);
119
- }
120
-
121
- .card:hover {
122
- transform: translateY(-4px);
123
- box-shadow: 0 12px 24px -10px var(--st-shadow-color-lg);
124
- z-index: 1;
125
- }
126
-
127
- .image-wrapper {
128
- position: absolute;
129
- inset: 0;
130
- }
131
-
132
- .image-wrapper::after {
133
- content: '';
134
- position: absolute;
135
- inset: 0;
136
- background: linear-gradient(to bottom, transparent 0%, var(--st-shadow-color-xl) 100%);
137
- }
138
-
139
- .image {
140
- width: 100%;
141
- height: 100%;
142
- object-fit: cover;
143
- transition: transform 0.5s ease;
144
- }
145
-
146
- .card:hover .image {
147
- transform: scale(1.05);
148
- }
149
-
150
- .content {
151
- position: relative;
152
- z-index: 1;
153
- margin-top: auto;
154
- padding: var(--st-space-24);
155
- display: flex;
156
- flex-direction: column;
157
- gap: var(--st-space-16);
158
- }
159
-
160
- .icon {
161
- ${iconTileStyles}
162
- width: var(--st-size-40);
163
- height: var(--st-size-40);
164
- font-size: 24px;
165
- }
166
-
167
- .text {
168
- padding: var(--st-space-16);
169
- border-radius: var(--st-radius-md);
170
- }
171
-
172
- .card-title {
173
- ${cardTitleStyles}
174
- font-size: var(--st-text-lg);
175
- }
176
-
177
- .card-description {
178
- margin: 0;
179
- font-size: var(--st-text-md);
180
- color: var(--st-color-text-muted);
181
- }
182
-
183
- :host([inverted]) .card-title {
184
- color: var(--st-color-on-solid);
185
- }
186
-
187
- :host([inverted]) .card-description {
188
- color: var(--st-color-border);
189
- }
190
-
191
- .card.has-image .card-title,
192
- .card.has-image .card-description {
193
- color: var(--st-color-on-solid);
194
- }
195
-
196
- .card.has-image .icon {
197
- background: var(--st-shadow-color-lg);
198
- color: var(--st-color-on-solid);
199
- backdrop-filter: blur(4px);
200
- }
201
-
202
- .col-1 { grid-column: span 1; }
203
- .col-2 { grid-column: span 2; }
204
- .col-3 { grid-column: span 3; }
205
- .col-4 { grid-column: span 4; }
206
- .row-1 { grid-row: span 1; }
207
- .row-2 { grid-row: span 2; }
208
-
209
- @media (max-width: 1024px) {
210
- .grid {
211
- grid-template-columns: repeat(2, 1fr);
212
- }
213
- .col-3,
214
- .col-4 {
215
- grid-column: span 2;
216
- }
217
- }
218
-
219
- @media (max-width: 640px) {
220
- .grid {
221
- grid-template-columns: 1fr;
222
- }
223
- .col-1,
224
- .col-2,
225
- .col-3,
226
- .col-4 {
227
- grid-column: span 1;
228
- }
229
- }
230
-
231
- ${reducedMotionStyles}
232
- `;
233
- __decorateClass([
234
- property({ type: Boolean, reflect: true })
235
- ], BentoGrid.prototype, "inverted", 2);
236
- __decorateClass([
237
- property({ type: String })
238
- ], BentoGrid.prototype, "title", 2);
239
- __decorateClass([
240
- property({ type: String })
241
- ], BentoGrid.prototype, "subtitle", 2);
242
- __decorateClass([
243
- property({ attribute: false })
244
- ], BentoGrid.prototype, "items", 2);
245
- BentoGrid = __decorateClass([
246
- customElement("st-bento-grid")
247
- ], BentoGrid);
248
-
249
- export {
250
- BentoGrid
251
- };
252
- //# sourceMappingURL=chunk-76AVBQUA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/bento-grid/BentoGrid.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport 'iconify-icon';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport {\n cardTitleStyles,\n iconTileStyles,\n reducedMotionStyles,\n sectionHeaderStyles,\n sectionSubtitleStyles,\n sectionTitleStyles, invertedSectionTextStyles } from '../shared/section-styles';\n\nexport interface BentoGridItem {\n title: string;\n description?: string;\n /** Iconify icon name, e.g. `mdi:home`. */\n icon?: string;\n imageSrc?: string;\n imageAlt?: string;\n colSpan?: 1 | 2 | 3 | 4;\n rowSpan?: 1 | 2;\n /** Turns the card into a link. */\n href?: string;\n}\n\n/**\n * A responsive 4-column bento grid of icon/image cards. Items are set via the `items` property.\n *\n * @cssprop --st-bento-grid-padding - Overrides the block's padding.\n */\n@customElement('st-bento-grid')\nexport class BentoGrid extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-bento-grid-padding instead. */\n padding: var(--st-bento-grid-padding, var(--st-cms-section-padding) var(--st-space-24)) !important;\n background: var(--st-color-page);\n ${fontFamilyStyles}\n }\n\n :host([inverted]) {\n background: var(--st-color-text-strong);\n }\n\n .container {\n max-width: var(--st-cms-container-max);\n margin: 0 auto;\n }\n\n .header {\n ${sectionHeaderStyles}\n }\n\n .title {\n ${sectionTitleStyles}\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n margin-bottom: 0;\n }\n\n ${invertedSectionTextStyles}\n\n .grid {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-auto-rows: minmax(240px, auto);\n gap: var(--st-space-24);\n }\n\n .card {\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n border: 1px solid var(--st-color-border);\n border-radius: var(--st-space-24);\n background: var(--st-color-surface);\n color: inherit;\n text-decoration: none;\n transition:\n transform 0.3s ease,\n box-shadow 0.3s ease;\n }\n\n :host([inverted]) .card {\n background: var(--st-color-text-strong);\n border-color: var(--st-color-text);\n }\n\n .card:hover {\n transform: translateY(-4px);\n box-shadow: 0 12px 24px -10px var(--st-shadow-color-lg);\n z-index: 1;\n }\n\n .image-wrapper {\n position: absolute;\n inset: 0;\n }\n\n .image-wrapper::after {\n content: '';\n position: absolute;\n inset: 0;\n background: linear-gradient(to bottom, transparent 0%, var(--st-shadow-color-xl) 100%);\n }\n\n .image {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.5s ease;\n }\n\n .card:hover .image {\n transform: scale(1.05);\n }\n\n .content {\n position: relative;\n z-index: 1;\n margin-top: auto;\n padding: var(--st-space-24);\n display: flex;\n flex-direction: column;\n gap: var(--st-space-16);\n }\n\n .icon {\n ${iconTileStyles}\n width: var(--st-size-40);\n height: var(--st-size-40);\n font-size: 24px;\n }\n\n .text {\n padding: var(--st-space-16);\n border-radius: var(--st-radius-md);\n }\n\n .card-title {\n ${cardTitleStyles}\n font-size: var(--st-text-lg);\n }\n\n .card-description {\n margin: 0;\n font-size: var(--st-text-md);\n color: var(--st-color-text-muted);\n }\n\n :host([inverted]) .card-title {\n color: var(--st-color-on-solid);\n }\n\n :host([inverted]) .card-description {\n color: var(--st-color-border);\n }\n\n .card.has-image .card-title,\n .card.has-image .card-description {\n color: var(--st-color-on-solid);\n }\n\n .card.has-image .icon {\n background: var(--st-shadow-color-lg);\n color: var(--st-color-on-solid);\n backdrop-filter: blur(4px);\n }\n\n .col-1 { grid-column: span 1; }\n .col-2 { grid-column: span 2; }\n .col-3 { grid-column: span 3; }\n .col-4 { grid-column: span 4; }\n .row-1 { grid-row: span 1; }\n .row-2 { grid-row: span 2; }\n\n @media (max-width: 1024px) {\n .grid {\n grid-template-columns: repeat(2, 1fr);\n }\n .col-3,\n .col-4 {\n grid-column: span 2;\n }\n }\n\n @media (max-width: 640px) {\n .grid {\n grid-template-columns: 1fr;\n }\n .col-1,\n .col-2,\n .col-3,\n .col-4 {\n grid-column: span 1;\n }\n }\n\n ${reducedMotionStyles}\n `;\n\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n @property({ attribute: false })\n items: BentoGridItem[] = [];\n\n private renderCard(item: BentoGridItem) {\n const classes = `card col-${item.colSpan ?? 1} row-${item.rowSpan ?? 1} ${item.imageSrc ? 'has-image' : ''}`;\n const body = html`\n ${item.imageSrc\n ? html`<div class=\"image-wrapper\" part=\"image-wrapper\">\n <img class=\"image\" part=\"image\" src=${item.imageSrc} alt=${item.imageAlt ?? item.title} />\n </div>`\n : nothing}\n <div class=\"content\" part=\"content\">\n ${item.icon ? html`<div class=\"icon\" part=\"icon\"><iconify-icon icon=${item.icon}></iconify-icon></div>` : nothing}\n <div class=\"text\">\n <h3 class=\"card-title\" part=\"card-title\">${item.title}</h3>\n ${item.description ? html`<p class=\"card-description\" part=\"card-description\">${item.description}</p>` : nothing}\n </div>\n </div>\n `;\n return item.href\n ? html`<a part=\"card\" class=${classes} href=${item.href}>${body}</a>`\n : html`<div part=\"card\" class=${classes}>${body}</div>`;\n }\n\n render() {\n return html`\n <div class=\"container\" part=\"container\">\n ${this.title || this.subtitle\n ? html`<div class=\"header\" part=\"header\">\n ${this.title ? html`<h2 class=\"title\" part=\"title\">${this.title}</h2>` : nothing}\n ${this.subtitle ? html`<p class=\"subtitle\" part=\"subtitle\">${this.subtitle}</p>` : nothing}\n </div>`\n : nothing}\n <div class=\"grid\" part=\"grid\">${this.items.map((item) => this.renderCard(item))}</div>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AACxC,OAAO;AA8BA,IAAM,YAAN,c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jB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/section/Section.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { controlBaseStyles, rootFontFamilyStyles } from '../shared/styles';\nimport { sectionSubtitleStyles, sectionTitleStyles } from '../shared/section-styles';\n\n/**\n * A page band that holds other content: sets the background, the spacing above and below, and\n * the content width, with an optional eyebrow/title/subtitle heading over its slotted children.\n * Use it to give a run of components one dark or tinted backdrop and a consistent vertical rhythm,\n * the way enterprise marketing pages stack full-width sections.\n *\n * @slot - The section's content.\n * @cssprop --st-section-bg - Overrides the background colour picked by `background`.\n * @cssprop --st-section-padding-inline - Overrides the left/right padding (not with `width=\"full\"`).\n * @csspart inner - The width-limited content box.\n * @csspart header - The heading block.\n */\n@customElement('st-section')\nexport class Section extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n --st-section-space-none: 0;\n --st-section-space-s: var(--st-space-24);\n --st-section-space-m: var(--st-space-48);\n --st-section-space-l: 4.5rem;\n --st-section-space-xl: 6rem;\n --st-section-space-xxl: 8rem;\n\n display: block;\n box-sizing: border-box;\n width: 100%;\n /* !important on every padding rule: a page-level reset (e.g. Tailwind Preflight) otherwise\n zeroes a shadow host's padding. Rescale it with the --st-section-space-* tokens. */\n padding: var(--st-section-space-m) var(--st-section-padding-inline, var(--st-space-24)) !important;\n background: var(--st-section-bg, var(--st-color-surface));\n color: var(--st-color-text-strong);\n ${rootFontFamilyStyles}\n }\n\n :host([background='subtle']) {\n background: var(--st-section-bg, var(--st-color-subtle));\n }\n\n :host([background='dark']) {\n background: var(--st-section-bg, var(--st-cms-band-dark-bg));\n color: var(--st-cms-band-dark-color);\n }\n\n :host([background='accent']) {\n background: var(--st-section-bg, var(--st-color-accent));\n color: var(--st-color-on-solid);\n }\n\n :host([background='transparent']) {\n background: var(--st-section-bg, transparent);\n }\n\n :host([spacing-above='none']) { padding-top: var(--st-section-space-none) !important; }\n :host([spacing-above='s']) { padding-top: var(--st-section-space-s) !important; }\n :host([spacing-above='l']) { padding-top: var(--st-section-space-l) !important; }\n :host([spacing-above='xl']) { padding-top: var(--st-section-space-xl) !important; }\n :host([spacing-above='xxl']) { padding-top: var(--st-section-space-xxl) !important; }\n\n :host([spacing-below='none']) { padding-bottom: var(--st-section-space-none) !important; }\n :host([spacing-below='s']) { padding-bottom: var(--st-section-space-s) !important; }\n :host([spacing-below='l']) { padding-bottom: var(--st-section-space-l) !important; }\n :host([spacing-below='xl']) { padding-bottom: var(--st-section-space-xl) !important; }\n :host([spacing-below='xxl']) { padding-bottom: var(--st-section-space-xxl) !important; }\n\n :host([width='full']) {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .inner {\n max-width: var(--st-cms-container-max);\n margin: 0 auto;\n }\n\n :host([width='narrow']) .inner {\n max-width: 800px;\n }\n\n :host([width='full']) .inner {\n max-width: none;\n }\n\n .header {\n margin-bottom: var(--st-space-48);\n }\n\n :host([text-alignment='center']) .header {\n text-align: center;\n }\n\n :host([text-alignment='center']) .subtitle {\n margin-inline: auto;\n }\n\n :host([width='full']) .header {\n max-width: var(--st-cms-container-max);\n margin-inline: auto;\n padding-inline: var(--st-space-24);\n box-sizing: border-box;\n }\n\n .eyebrow {\n margin: 0 0 var(--st-space-12);\n font-size: var(--st-text-sm);\n font-weight: var(--st-font-weight-bold);\n letter-spacing: 0.12em;\n text-transform: uppercase;\n color: var(--st-color-text-muted);\n }\n\n .title {\n ${sectionTitleStyles}\n color: inherit;\n letter-spacing: -0.02em;\n max-width: 24ch;\n }\n\n :host([text-alignment='center']) .title {\n margin-inline: auto;\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n max-width: 60ch;\n margin-bottom: 0;\n }\n\n :host([background='dark']) .eyebrow,\n :host([background='dark']) .subtitle {\n color: color-mix(in oklch, var(--st-cms-band-dark-color) 80%, transparent);\n }\n\n :host([background='accent']) .eyebrow,\n :host([background='accent']) .subtitle {\n color: color-mix(in oklch, var(--st-color-on-solid) 80%, transparent);\n }\n\n @media (max-width: 768px) {\n :host {\n --st-section-space-l: 3.5rem;\n --st-section-space-xl: 4.5rem;\n --st-section-space-xxl: 5.5rem;\n --st-section-padding-inline: var(--st-space-20);\n }\n }\n `;\n\n @property({ type: String })\n eyebrow = '';\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n /** `default` (page surface), `subtle`, `dark`, `accent` or `transparent`. */\n @property({ type: String, reflect: true })\n background: 'default' | 'subtle' | 'dark' | 'accent' | 'transparent' = 'default';\n\n /** Space above the content: `none`, `s`, `m` (default), `l`, `xl` or `xxl`. */\n @property({ type: String, reflect: true, attribute: 'spacing-above' })\n spacingAbove: 'none' | 's' | 'm' | 'l' | 'xl' | 'xxl' = 'm';\n\n /** Space below the content: `none`, `s`, `m` (default), `l`, `xl` or `xxl`. */\n @property({ type: String, reflect: true, attribute: 'spacing-below' })\n spacingBelow: 'none' | 's' | 'm' | 'l' | 'xl' | 'xxl' = 'm';\n\n /** `contained` (default, the page container width), `narrow` (reading width) or `full` (edge to edge). */\n @property({ type: String, reflect: true })\n width: 'contained' | 'narrow' | 'full' = 'contained';\n\n /** Alignment of the heading. */\n @property({ type: String, reflect: true, attribute: 'text-alignment' })\n textAlignment: 'left' | 'center' = 'left';\n\n render() {\n const heading = this.eyebrow || this.title || this.subtitle;\n return html`\n <div class=\"inner\" part=\"inner\">\n ${heading\n ? html`<div class=\"header\" part=\"header\">\n ${this.eyebrow ? html`<p class=\"eyebrow\" part=\"eyebrow\">${this.eyebrow}</p>` : nothing}\n ${this.title ? html`<h2 class=\"title\" part=\"title\">${this.title}</h2>` : nothing}\n ${this.subtitle ? html`<p class=\"subtitle\" part=\"subtitle\">${this.subtitle}</p>` : nothing}\n </div>`\n : nothing}\n <slot></slot>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAA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A;AAAA,QAWlB,qBAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0B3B;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAxIf,QAyIX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA3If,QA4IX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA9If,QA+IX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAlJ9B,QAmJX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,gBAAgB,CAAC;AAAA,GAtJ1D,QAuJX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,gBAAgB,CAAC;AAAA,GA1J1D,QA2JX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GA9J9B,QA+JX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,MAAM,WAAW,iBAAiB,CAAC;AAAA,GAlK3D,QAmKX;AAnKW,UAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/items-accordion/ItemsAccordion.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport 'iconify-icon';\n\nimport { buttonResetStyles, controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport {\n reducedMotionStyles,\n sectionHeaderStyles,\n sectionSubtitleStyles,\n sectionTitleStyles,\n} from '../shared/section-styles';\nimport type { AccordionToggleEventDetail } from './ItemsAccordionEvents';\n\nexport interface AccordionItem {\n id: string;\n title: string;\n content: string;\n}\n\n/**\n * A vertical list of collapsible title/content rows; one open at a time unless `allow-multiple`.\n *\n * @cssprop --st-items-accordion-padding - Overrides the block's padding.\n */\n@customElement('st-items-accordion')\nexport class ItemsAccordion extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-items-accordion-padding instead. */\n padding: var(--st-items-accordion-padding, var(--st-cms-section-padding) var(--st-space-24)) !important;\n background: var(--st-color-page);\n ${fontFamilyStyles}\n }\n\n .container {\n max-width: 800px;\n margin: 0 auto;\n }\n\n .header {\n ${sectionHeaderStyles}\n }\n\n .title {\n ${sectionTitleStyles}\n font-size: var(--st-text-2xl);\n margin-bottom: var(--st-space-12);\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n font-size: var(--st-text-base);\n margin: 0;\n }\n\n .list {\n display: flex;\n flex-direction: column;\n gap: var(--st-space-16);\n }\n\n .item {\n border: 1px solid var(--st-color-border);\n border-radius: var(--st-radius-lg);\n background: var(--st-color-surface);\n overflow: hidden;\n transition:\n border-color 0.2s ease,\n box-shadow 0.2s ease;\n }\n\n .item.open {\n border-color: var(--st-color-border-strong);\n box-shadow: 0 4px 6px -1px var(--st-shadow-color-sm);\n }\n\n .trigger {\n ${buttonResetStyles}\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--st-space-24);\n text-align: left;\n font-size: var(--st-text-lg);\n font-weight: var(--st-font-weight-semibold);\n color: var(--st-color-text-strong);\n }\n\n .trigger:hover {\n background: var(--st-color-hover);\n }\n\n .chevron {\n flex-shrink: 0;\n margin-left: var(--st-space-16);\n font-size: 24px;\n color: var(--st-color-text-faint);\n transition: transform 0.3s ease;\n }\n\n .open .chevron {\n transform: rotate(180deg);\n }\n\n .content {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.3s ease;\n }\n\n .open .content {\n grid-template-rows: 1fr;\n }\n\n .content-clip {\n overflow: hidden;\n min-height: 0;\n }\n\n .content-inner {\n padding: 0 var(--st-space-24) var(--st-space-24);\n color: var(--st-color-text);\n line-height: 1.6;\n }\n\n @media (max-width: 768px) {\n :host {\n padding: var(--st-items-accordion-padding, var(--st-space-48) var(--st-space-20)) !important;\n }\n\n .title {\n font-size: var(--st-text-xl);\n }\n }\n\n ${reducedMotionStyles}\n `;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n @property({ attribute: false })\n items: AccordionItem[] = [];\n\n @property({ type: Boolean, attribute: 'allow-multiple' })\n allowMultiple = false;\n\n @state() private openIds = new Set<string>();\n\n private toggle(id: string) {\n const wasOpen = this.openIds.has(id);\n const next = new Set(this.allowMultiple ? this.openIds : []);\n if (wasOpen) next.delete(id);\n else next.add(id);\n this.openIds = next;\n this.dispatchEvent(\n new CustomEvent<AccordionToggleEventDetail>('accordion-toggle', {\n detail: { id, open: !wasOpen },\n bubbles: true,\n composed: true,\n }),\n );\n }\n\n render() {\n return html`\n <div class=\"container\" part=\"container\">\n ${this.title || this.subtitle\n ? html`<div class=\"header\" part=\"header\">\n ${this.title ? html`<h2 class=\"title\" part=\"title\">${this.title}</h2>` : nothing}\n ${this.subtitle ? html`<p class=\"subtitle\" part=\"subtitle\">${this.subtitle}</p>` : nothing}\n </div>`\n : nothing}\n <div class=\"list\" part=\"list\">\n ${this.items.map((item) => {\n const open = this.openIds.has(item.id);\n return html`\n <div class=\"item ${open ? 'open' : ''}\" part=\"item\">\n <button\n class=\"trigger\"\n part=\"trigger\"\n type=\"button\"\n aria-expanded=${open ? 'true' : 'false'}\n aria-controls=\"content-${item.id}\"\n @click=${() => this.toggle(item.id)}\n >\n <span>${item.title}</span>\n <iconify-icon class=\"chevron\" icon=\"mdi:chevron-down\"></iconify-icon>\n </button>\n <div class=\"content\" id=\"content-${item.id}\" part=\"content\" role=\"region\" ?inert=${!open}>\n <div class=\"content-clip\">\n <div class=\"content-inner\">${item.content}</div>\n </div>\n </div>\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AC;AAAA,GA/H7C,eAgIX;AAEiB;AAAA,EAAhB,MAAM;AAAA,GAlII,eAkIM;AAlIN,iBAAN;AAAA,EADN,cAAc,oBAAoB;AAAA,GACtB;","names":[]}
@@ -1,158 +0,0 @@
1
- import {
2
- sectionHeaderStyles,
3
- sectionSubtitleStyles,
4
- sectionTitleStyles
5
- } from "./chunk-FZ36KL73.js";
6
- import {
7
- controlBaseStyles,
8
- fontFamilyStyles
9
- } from "./chunk-KMU6ABQF.js";
10
- import {
11
- __decorateClass
12
- } from "./chunk-EUXUH3YW.js";
13
-
14
- // src/content-block/ContentBlock.ts
15
- import { LitElement, css, html, nothing } from "lit";
16
- import { customElement, property } from "lit/decorators.js";
17
- var ContentBlock = class extends LitElement {
18
- constructor() {
19
- super(...arguments);
20
- this.title = "";
21
- this.subtitle = "";
22
- this.contentSrc = "";
23
- this.content = "";
24
- this.imageSrc = "";
25
- this.imageAlt = "";
26
- this.imageCaption = "";
27
- this.inverted = false;
28
- }
29
- render() {
30
- return html`
31
- <section class="container" part="container">
32
- <div class="header" part="header">
33
- ${this.title ? html`<div class="title" part="title">${this.title}</div>` : nothing}
34
- ${this.subtitle ? html`<div class="subtitle" part="subtitle">${this.subtitle}</div>` : nothing}
35
- </div>
36
- ${this.imageSrc ? html`
37
- <figure class="featured-image" part="image">
38
- <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />
39
- ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}
40
- </figure>
41
- ` : nothing}
42
- <st-markdown part="body" .src=${this.contentSrc} .content=${this.content}></st-markdown>
43
- </section>
44
- `;
45
- }
46
- };
47
- ContentBlock.styles = css`
48
- ${controlBaseStyles}
49
-
50
- :host {
51
- display: block;
52
- ${fontFamilyStyles}
53
- /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
54
- padding; override with --st-content-block-padding instead. */
55
- padding: var(--st-content-block-padding, var(--st-space-24)) !important;
56
- background: var(--st-color-surface);
57
- color: var(--st-color-text-strong);
58
- }
59
-
60
- :host([inverted]) {
61
- background: var(--st-color-text-strong);
62
- color: var(--st-color-on-solid);
63
- }
64
-
65
- .container {
66
- max-width: var(--st-cms-container-max);
67
- padding: 0 var(--st-space-48);
68
- margin: 0 auto;
69
- }
70
-
71
- .header {
72
- ${sectionHeaderStyles}
73
- }
74
-
75
- .title {
76
- ${sectionTitleStyles}
77
- line-height: 1.1;
78
- }
79
-
80
- .subtitle {
81
- ${sectionSubtitleStyles}
82
- }
83
-
84
- :host([inverted]) .title,
85
- :host([inverted]) .subtitle {
86
- color: inherit;
87
- }
88
-
89
- .featured-image {
90
- margin: 0 0 var(--st-space-48);
91
- border-radius: var(--st-radius-lg);
92
- overflow: hidden;
93
- }
94
-
95
- .featured-image img {
96
- width: 100%;
97
- height: auto;
98
- display: block;
99
- }
100
-
101
- figcaption {
102
- padding: var(--st-space-12);
103
- text-align: center;
104
- color: var(--st-color-text-muted);
105
- font-size: var(--st-text-xs);
106
- }
107
-
108
- st-markdown {
109
- color: var(--st-color-text);
110
- font-size: var(--st-text-xl);
111
- }
112
-
113
- :host([inverted]) st-markdown {
114
- color: inherit;
115
- }
116
-
117
- @media (max-width: 768px) {
118
- :host {
119
- padding: var(--st-content-block-padding, var(--st-space-48) var(--st-space-24)) !important;
120
- }
121
-
122
- .container {
123
- padding: 0;
124
- }
125
- }
126
- `;
127
- __decorateClass([
128
- property({ type: String })
129
- ], ContentBlock.prototype, "title", 2);
130
- __decorateClass([
131
- property({ type: String })
132
- ], ContentBlock.prototype, "subtitle", 2);
133
- __decorateClass([
134
- property({ type: String, attribute: "content-src" })
135
- ], ContentBlock.prototype, "contentSrc", 2);
136
- __decorateClass([
137
- property({ type: String })
138
- ], ContentBlock.prototype, "content", 2);
139
- __decorateClass([
140
- property({ type: String, attribute: "image-src" })
141
- ], ContentBlock.prototype, "imageSrc", 2);
142
- __decorateClass([
143
- property({ type: String, attribute: "image-alt" })
144
- ], ContentBlock.prototype, "imageAlt", 2);
145
- __decorateClass([
146
- property({ type: String, attribute: "image-caption" })
147
- ], ContentBlock.prototype, "imageCaption", 2);
148
- __decorateClass([
149
- property({ type: Boolean, reflect: true })
150
- ], ContentBlock.prototype, "inverted", 2);
151
- ContentBlock = __decorateClass([
152
- customElement("st-content-block")
153
- ], ContentBlock);
154
-
155
- export {
156
- ContentBlock
157
- };
158
- //# sourceMappingURL=chunk-BMHMNXIA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/content-block/ContentBlock.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport { sectionSubtitleStyles, sectionTitleStyles, sectionHeaderStyles } from '../shared/section-styles';\nimport '../markdown';\n\n/**\n * A long-form article section: centered title/subtitle, an optional featured image with caption,\n * then Markdown body text. Ports `SankhyaUI`'s React `ContentBlock`. The body comes from\n * `content-src` (a Markdown URL, as in the source) or an inline `content` string (added so the\n * block works without a fetch); `content-src` wins when both are set.\n *\n * @cssprop --st-content-block-padding - Overrides the block's padding.\n */\n@customElement('st-content-block')\nexport class ContentBlock extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n ${fontFamilyStyles}\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-content-block-padding instead. */\n padding: var(--st-content-block-padding, var(--st-space-24)) !important;\n background: var(--st-color-surface);\n color: var(--st-color-text-strong);\n }\n\n :host([inverted]) {\n background: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n }\n\n .container {\n max-width: var(--st-cms-container-max);\n padding: 0 var(--st-space-48);\n margin: 0 auto;\n }\n\n .header {\n ${sectionHeaderStyles}\n }\n\n .title {\n ${sectionTitleStyles}\n line-height: 1.1;\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n }\n\n :host([inverted]) .title,\n :host([inverted]) .subtitle {\n color: inherit;\n }\n\n .featured-image {\n margin: 0 0 var(--st-space-48);\n border-radius: var(--st-radius-lg);\n overflow: hidden;\n }\n\n .featured-image img {\n width: 100%;\n height: auto;\n display: block;\n }\n\n figcaption {\n padding: var(--st-space-12);\n text-align: center;\n color: var(--st-color-text-muted);\n font-size: var(--st-text-xs);\n }\n\n st-markdown {\n color: var(--st-color-text);\n font-size: var(--st-text-xl);\n }\n\n :host([inverted]) st-markdown {\n color: inherit;\n }\n\n @media (max-width: 768px) {\n :host {\n padding: var(--st-content-block-padding, var(--st-space-48) var(--st-space-24)) !important;\n }\n\n .container {\n padding: 0;\n }\n }\n `;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n /** URL of a Markdown file. */\n @property({ type: String, attribute: 'content-src' })\n contentSrc = '';\n\n /** Inline Markdown, used when `content-src` is not set. */\n @property({ type: String })\n content = '';\n\n @property({ type: String, attribute: 'image-src' })\n imageSrc = '';\n\n @property({ type: String, attribute: 'image-alt' })\n imageAlt = '';\n\n @property({ type: String, attribute: 'image-caption' })\n imageCaption = '';\n\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n render() {\n return html`\n <section class=\"container\" part=\"container\">\n <div class=\"header\" part=\"header\">\n ${this.title ? html`<div class=\"title\" part=\"title\">${this.title}</div>` : nothing}\n ${this.subtitle ? html`<div class=\"subtitle\" part=\"subtitle\">${this.subtitle}</div>` : nothing}\n </div>\n ${this.imageSrc\n ? html`\n <figure class=\"featured-image\" part=\"image\">\n <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />\n ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}\n </figure>\n `\n : nothing}\n <st-markdown part=\"body\" .src=${this.contentSrc} .content=${this.content}></st-markdown>\n </section>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAejC,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AA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