@sankhyatronics/sankhya-cms 0.0.0-stage → 0.0.9

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 (135) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -3
  3. package/custom-elements.json +4008 -0
  4. package/dist/bento-grid/index.d.ts +27 -0
  5. package/dist/bento-grid/index.js +10 -0
  6. package/dist/bento-grid/index.js.map +1 -0
  7. package/dist/card/index.d.ts +20 -0
  8. package/dist/card/index.js +9 -0
  9. package/dist/card/index.js.map +1 -0
  10. package/dist/carousel/index.d.ts +44 -0
  11. package/dist/carousel/index.js +10 -0
  12. package/dist/carousel/index.js.map +1 -0
  13. package/dist/chunk-23IHTBAB.js +557 -0
  14. package/dist/chunk-23IHTBAB.js.map +1 -0
  15. package/dist/chunk-2VZFHTBC.js +203 -0
  16. package/dist/chunk-2VZFHTBC.js.map +1 -0
  17. package/dist/chunk-3ERKQNZT.js +155 -0
  18. package/dist/chunk-3ERKQNZT.js.map +1 -0
  19. package/dist/chunk-3JU3R22O.js +193 -0
  20. package/dist/chunk-3JU3R22O.js.map +1 -0
  21. package/dist/chunk-3TCP25JG.js +347 -0
  22. package/dist/chunk-3TCP25JG.js.map +1 -0
  23. package/dist/chunk-3VE6VFJ4.js +87 -0
  24. package/dist/chunk-3VE6VFJ4.js.map +1 -0
  25. package/dist/chunk-4HKSA5UT.js +312 -0
  26. package/dist/chunk-4HKSA5UT.js.map +1 -0
  27. package/dist/chunk-5REZSZCK.js +266 -0
  28. package/dist/chunk-5REZSZCK.js.map +1 -0
  29. package/dist/chunk-5UFRGZWG.js +268 -0
  30. package/dist/chunk-5UFRGZWG.js.map +1 -0
  31. package/dist/chunk-74MILER4.js +215 -0
  32. package/dist/chunk-74MILER4.js.map +1 -0
  33. package/dist/chunk-7PSYCTEN.js +118 -0
  34. package/dist/chunk-7PSYCTEN.js.map +1 -0
  35. package/dist/chunk-E52WO7R7.js +279 -0
  36. package/dist/chunk-E52WO7R7.js.map +1 -0
  37. package/dist/chunk-EUXUH3YW.js +15 -0
  38. package/dist/chunk-EUXUH3YW.js.map +1 -0
  39. package/dist/chunk-IMACP7HN.js +156 -0
  40. package/dist/chunk-IMACP7HN.js.map +1 -0
  41. package/dist/chunk-LHU23TF6.js +273 -0
  42. package/dist/chunk-LHU23TF6.js.map +1 -0
  43. package/dist/chunk-OEX5FDMR.js +250 -0
  44. package/dist/chunk-OEX5FDMR.js.map +1 -0
  45. package/dist/chunk-RHAOQ6K4.js +138 -0
  46. package/dist/chunk-RHAOQ6K4.js.map +1 -0
  47. package/dist/chunk-RMIJVTFS.js +397 -0
  48. package/dist/chunk-RMIJVTFS.js.map +1 -0
  49. package/dist/chunk-TIU73O7I.js +221 -0
  50. package/dist/chunk-TIU73O7I.js.map +1 -0
  51. package/dist/chunk-USNFT4DU.js +125 -0
  52. package/dist/chunk-USNFT4DU.js.map +1 -0
  53. package/dist/chunk-VYON56QO.js +90 -0
  54. package/dist/chunk-VYON56QO.js.map +1 -0
  55. package/dist/chunk-WCO7JAIK.js +195 -0
  56. package/dist/chunk-WCO7JAIK.js.map +1 -0
  57. package/dist/chunk-XHBC23TV.js +254 -0
  58. package/dist/chunk-XHBC23TV.js.map +1 -0
  59. package/dist/chunk-XXPBFHWR.js +70 -0
  60. package/dist/chunk-XXPBFHWR.js.map +1 -0
  61. package/dist/chunk-YYK4GQUW.js +299 -0
  62. package/dist/chunk-YYK4GQUW.js.map +1 -0
  63. package/dist/cms-theme.css +15 -0
  64. package/dist/content-block/index.d.ts +25 -0
  65. package/dist/content-block/index.js +11 -0
  66. package/dist/content-block/index.js.map +1 -0
  67. package/dist/cookie-consent/index.d.ts +33 -0
  68. package/dist/cookie-consent/index.js +9 -0
  69. package/dist/cookie-consent/index.js.map +1 -0
  70. package/dist/dropdown/index.d.ts +89 -0
  71. package/dist/dropdown/index.js +9 -0
  72. package/dist/dropdown/index.js.map +1 -0
  73. package/dist/feature-split/index.d.ts +38 -0
  74. package/dist/feature-split/index.js +11 -0
  75. package/dist/feature-split/index.js.map +1 -0
  76. package/dist/features-section/index.d.ts +50 -0
  77. package/dist/features-section/index.js +14 -0
  78. package/dist/features-section/index.js.map +1 -0
  79. package/dist/footer/index.d.ts +64 -0
  80. package/dist/footer/index.js +9 -0
  81. package/dist/footer/index.js.map +1 -0
  82. package/dist/header/index.d.ts +112 -0
  83. package/dist/header/index.js +10 -0
  84. package/dist/header/index.js.map +1 -0
  85. package/dist/hero/index.d.ts +32 -0
  86. package/dist/hero/index.js +10 -0
  87. package/dist/hero/index.js.map +1 -0
  88. package/dist/icon-button/index.d.ts +23 -0
  89. package/dist/icon-button/index.js +9 -0
  90. package/dist/icon-button/index.js.map +1 -0
  91. package/dist/index.d.ts +22 -0
  92. package/dist/index.js +93 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/items-accordion/index.d.ts +31 -0
  95. package/dist/items-accordion/index.js +10 -0
  96. package/dist/items-accordion/index.js.map +1 -0
  97. package/dist/markdown/index.d.ts +33 -0
  98. package/dist/markdown/index.js +9 -0
  99. package/dist/markdown/index.js.map +1 -0
  100. package/dist/menu-grid/index.d.ts +21 -0
  101. package/dist/menu-grid/index.js +9 -0
  102. package/dist/menu-grid/index.js.map +1 -0
  103. package/dist/menu-grid-item/index.d.ts +53 -0
  104. package/dist/menu-grid-item/index.js +9 -0
  105. package/dist/menu-grid-item/index.js.map +1 -0
  106. package/dist/menu-item/index.d.ts +50 -0
  107. package/dist/menu-item/index.js +9 -0
  108. package/dist/menu-item/index.js.map +1 -0
  109. package/dist/promo-banner/index.d.ts +22 -0
  110. package/dist/promo-banner/index.js +10 -0
  111. package/dist/promo-banner/index.js.map +1 -0
  112. package/dist/schema/index.d.ts +72 -0
  113. package/dist/schema/index.js +75 -0
  114. package/dist/schema/index.js.map +1 -0
  115. package/dist/select/index.d.ts +77 -0
  116. package/dist/select/index.js +10 -0
  117. package/dist/select/index.js.map +1 -0
  118. package/dist/shared/icons.d.ts +77 -0
  119. package/dist/shared/icons.js +64 -0
  120. package/dist/shared/icons.js.map +1 -0
  121. package/dist/shared/styles.d.ts +90 -0
  122. package/dist/shared/styles.js +48 -0
  123. package/dist/shared/styles.js.map +1 -0
  124. package/dist/stats/index.d.ts +17 -0
  125. package/dist/stats/index.js +9 -0
  126. package/dist/stats/index.js.map +1 -0
  127. package/dist/testimonials/index.d.ts +25 -0
  128. package/dist/testimonials/index.js +10 -0
  129. package/dist/testimonials/index.js.map +1 -0
  130. package/dist/theme.css +292 -0
  131. package/dist/themes.css +65 -0
  132. package/dist/theming/index.d.ts +28 -0
  133. package/dist/theming/index.js +53 -0
  134. package/dist/theming/index.js.map +1 -0
  135. package/package.json +160 -3
@@ -0,0 +1,279 @@
1
+ import {
2
+ cardDescriptionStyles,
3
+ cardTitleStyles,
4
+ sectionHeaderStyles,
5
+ sectionSubtitleStyles,
6
+ sectionTitleStyles
7
+ } from "./chunk-3VE6VFJ4.js";
8
+ import {
9
+ controlBaseStyles,
10
+ fontFamilyStyles
11
+ } from "./chunk-RHAOQ6K4.js";
12
+ import {
13
+ __decorateClass
14
+ } from "./chunk-EUXUH3YW.js";
15
+
16
+ // src/features-section/FeaturesSection.ts
17
+ import { LitElement as LitElement2, css as css2, html as html2, nothing as nothing2 } from "lit";
18
+ import { customElement as customElement2, property as property2 } from "lit/decorators.js";
19
+
20
+ // src/features-section/FeatureItem.ts
21
+ import { LitElement, css, html, nothing } from "lit";
22
+ import { customElement, property } from "lit/decorators.js";
23
+ import "iconify-icon";
24
+ var FeatureItem = class extends LitElement {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.icon = "";
28
+ this.title = "";
29
+ this.description = "";
30
+ this.href = "";
31
+ this.actionLabel = "Learn more";
32
+ this.inverted = false;
33
+ }
34
+ render() {
35
+ const external = this.href.startsWith("http");
36
+ return html`
37
+ <st-card hoverable elevation="sm" ?inverted=${this.inverted} part="card">
38
+ <div class="content" part="content">
39
+ ${this.icon ? html`<div class="icon" part="icon"><iconify-icon icon=${this.icon}></iconify-icon></div>` : nothing}
40
+ <h3 class="title" part="title">${this.title}</h3>
41
+ <st-markdown class="description" part="description" .content=${this.description}></st-markdown>
42
+ ${this.href ? html`
43
+ <a
44
+ class="link"
45
+ part="link"
46
+ href=${this.href}
47
+ target=${external ? "_blank" : "_self"}
48
+ rel=${external ? "noopener noreferrer" : nothing}
49
+ >
50
+ ${this.actionLabel} <span>&rarr;</span>
51
+ </a>
52
+ ` : nothing}
53
+ </div>
54
+ </st-card>
55
+ `;
56
+ }
57
+ };
58
+ FeatureItem.styles = css`
59
+ ${controlBaseStyles}
60
+
61
+ :host {
62
+ display: block;
63
+ ${fontFamilyStyles}
64
+ }
65
+
66
+ st-card {
67
+ height: 100%;
68
+ }
69
+
70
+ .content {
71
+ display: flex;
72
+ flex-direction: column;
73
+ align-items: flex-start;
74
+ gap: var(--st-space-16);
75
+ height: 100%;
76
+ }
77
+
78
+ .icon {
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ width: 48px;
83
+ height: 48px;
84
+ border-radius: var(--st-radius-lg);
85
+ background: var(--st-color-subtle);
86
+ color: var(--st-color-text-strong);
87
+ margin-bottom: var(--st-space-8);
88
+ font-size: 24px;
89
+ }
90
+
91
+ :host([inverted]) .icon {
92
+ background: var(--st-color-text-muted);
93
+ color: var(--st-color-on-solid);
94
+ }
95
+
96
+ .title {
97
+ ${cardTitleStyles}
98
+ margin: 0;
99
+ }
100
+
101
+ .description {
102
+ ${cardDescriptionStyles}
103
+ margin: 0;
104
+ }
105
+
106
+ :host([inverted]) .title,
107
+ :host([inverted]) .description {
108
+ color: inherit;
109
+ }
110
+
111
+ .link {
112
+ display: flex;
113
+ align-items: center;
114
+ gap: var(--st-space-4);
115
+ margin-top: auto;
116
+ color: var(--st-color-text-muted);
117
+ font-weight: var(--st-font-weight-medium);
118
+ font-size: var(--st-text-md);
119
+ text-decoration: none;
120
+ transition: color 0.2s ease;
121
+ }
122
+
123
+ .link:hover {
124
+ color: var(--st-color-text-strong);
125
+ text-decoration: underline;
126
+ }
127
+
128
+ :host([inverted]) .link,
129
+ :host([inverted]) .link:hover {
130
+ color: inherit;
131
+ }
132
+
133
+ @media (prefers-reduced-motion: reduce) {
134
+ .link {
135
+ transition: none;
136
+ }
137
+ }
138
+ `;
139
+ __decorateClass([
140
+ property({ type: String })
141
+ ], FeatureItem.prototype, "icon", 2);
142
+ __decorateClass([
143
+ property({ type: String })
144
+ ], FeatureItem.prototype, "title", 2);
145
+ __decorateClass([
146
+ property({ type: String })
147
+ ], FeatureItem.prototype, "description", 2);
148
+ __decorateClass([
149
+ property({ type: String })
150
+ ], FeatureItem.prototype, "href", 2);
151
+ __decorateClass([
152
+ property({ type: String, attribute: "action-label" })
153
+ ], FeatureItem.prototype, "actionLabel", 2);
154
+ __decorateClass([
155
+ property({ type: Boolean, reflect: true })
156
+ ], FeatureItem.prototype, "inverted", 2);
157
+ FeatureItem = __decorateClass([
158
+ customElement("st-feature-item")
159
+ ], FeatureItem);
160
+
161
+ // src/features-section/FeaturesSection.ts
162
+ var FeaturesSection = class extends LitElement2 {
163
+ constructor() {
164
+ super(...arguments);
165
+ this.title = "";
166
+ this.subtitle = "";
167
+ this.actionLabel = "Learn more";
168
+ this.columns = 0;
169
+ this.inverted = false;
170
+ this.items = [];
171
+ }
172
+ render() {
173
+ const gridStyle = this.columns ? `--features-columns: ${this.columns}` : nothing2;
174
+ return html2`
175
+ <section class="container" part="container">
176
+ <div class="header" part="header">
177
+ <div class="title" part="title">${this.title}</div>
178
+ ${this.subtitle ? html2`<div class="subtitle" part="subtitle">${this.subtitle}</div>` : nothing2}
179
+ </div>
180
+ <div class="grid" part="grid" style=${gridStyle}>
181
+ <slot></slot>
182
+ ${this.items.map(
183
+ (item) => html2`
184
+ <st-feature-item
185
+ .icon=${item.icon ?? ""}
186
+ .title=${item.title}
187
+ .description=${item.description}
188
+ .href=${item.href ?? ""}
189
+ .actionLabel=${this.actionLabel}
190
+ ?inverted=${this.inverted}
191
+ ></st-feature-item>
192
+ `
193
+ )}
194
+ </div>
195
+ </section>
196
+ `;
197
+ }
198
+ };
199
+ FeaturesSection.styles = css2`
200
+ ${controlBaseStyles}
201
+
202
+ :host {
203
+ display: block;
204
+ ${fontFamilyStyles}
205
+ padding: var(--st-cms-section-padding) var(--st-space-24);
206
+ background: var(--st-color-surface);
207
+ }
208
+
209
+ :host([inverted]) {
210
+ background: var(--st-color-text-strong);
211
+ }
212
+
213
+ .container {
214
+ max-width: var(--st-cms-container-max);
215
+ margin: 0 auto;
216
+ }
217
+
218
+ .header {
219
+ ${sectionHeaderStyles}
220
+ }
221
+
222
+ .title {
223
+ ${sectionTitleStyles}
224
+ margin: 0;
225
+ }
226
+
227
+ .subtitle {
228
+ ${sectionSubtitleStyles}
229
+ margin: 0 auto;
230
+ }
231
+
232
+ :host([inverted]) .title,
233
+ :host([inverted]) .subtitle {
234
+ color: var(--st-color-on-solid);
235
+ }
236
+
237
+ .grid {
238
+ display: grid;
239
+ grid-template-columns: repeat(var(--features-columns, 2), 1fr);
240
+ gap: var(--st-space-32);
241
+ }
242
+
243
+ @media (max-width: 768px) {
244
+ :host {
245
+ padding: var(--st-space-48) var(--st-space-16);
246
+ }
247
+
248
+ .grid {
249
+ grid-template-columns: 1fr;
250
+ }
251
+ }
252
+ `;
253
+ __decorateClass([
254
+ property2({ type: String })
255
+ ], FeaturesSection.prototype, "title", 2);
256
+ __decorateClass([
257
+ property2({ type: String })
258
+ ], FeaturesSection.prototype, "subtitle", 2);
259
+ __decorateClass([
260
+ property2({ type: String, attribute: "action-label" })
261
+ ], FeaturesSection.prototype, "actionLabel", 2);
262
+ __decorateClass([
263
+ property2({ type: Number })
264
+ ], FeaturesSection.prototype, "columns", 2);
265
+ __decorateClass([
266
+ property2({ type: Boolean, reflect: true })
267
+ ], FeaturesSection.prototype, "inverted", 2);
268
+ __decorateClass([
269
+ property2({ attribute: false })
270
+ ], FeaturesSection.prototype, "items", 2);
271
+ FeaturesSection = __decorateClass([
272
+ customElement2("st-features-section")
273
+ ], FeaturesSection);
274
+
275
+ export {
276
+ FeatureItem,
277
+ FeaturesSection
278
+ };
279
+ //# sourceMappingURL=chunk-E52WO7R7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/features-section/FeaturesSection.ts","../src/features-section/FeatureItem.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\r\nimport { sectionSubtitleStyles, sectionTitleStyles, sectionHeaderStyles } from '../shared/section-styles';\r\nimport './FeatureItem';\r\n\r\n/** Data for one tile when using the `items` property (mirrors `st-feature-item`'s properties). */\r\nexport interface FeatureItemData {\r\n icon?: string;\r\n title: string;\r\n description: string;\r\n href?: string;\r\n}\r\n\r\n/**\r\n * A titled grid of feature tiles. Ports `SankhyaUI`'s React `FeaturesSection`: tiles come from the\r\n * `items` property, from slotted `st-feature-item` elements (the source's `children`), or both\r\n * (slotted first). `columns` sets the grid width (default 2; one column below 768px). `inverted`\r\n * is passed on to the `items` tiles; slotted tiles need their own `inverted` attribute.\r\n */\r\n@customElement('st-features-section')\r\nexport class FeaturesSection extends LitElement {\r\n static styles = css`\r\n ${controlBaseStyles}\r\n\r\n :host {\r\n display: block;\r\n ${fontFamilyStyles}\r\n padding: var(--st-cms-section-padding) var(--st-space-24);\r\n background: var(--st-color-surface);\r\n }\r\n\r\n :host([inverted]) {\r\n background: var(--st-color-text-strong);\r\n }\r\n\r\n .container {\r\n max-width: var(--st-cms-container-max);\r\n margin: 0 auto;\r\n }\r\n\r\n .header {\r\n ${sectionHeaderStyles}\r\n }\r\n\r\n .title {\r\n ${sectionTitleStyles}\r\n margin: 0;\r\n }\r\n\r\n .subtitle {\r\n ${sectionSubtitleStyles}\r\n margin: 0 auto;\r\n }\r\n\r\n :host([inverted]) .title,\r\n :host([inverted]) .subtitle {\r\n color: var(--st-color-on-solid);\r\n }\r\n\r\n .grid {\r\n display: grid;\r\n grid-template-columns: repeat(var(--features-columns, 2), 1fr);\r\n gap: var(--st-space-32);\r\n }\r\n\r\n @media (max-width: 768px) {\r\n :host {\r\n padding: var(--st-space-48) var(--st-space-16);\r\n }\r\n\r\n .grid {\r\n grid-template-columns: 1fr;\r\n }\r\n }\r\n `;\r\n\r\n @property({ type: String })\r\n title = '';\r\n\r\n @property({ type: String })\r\n subtitle = '';\r\n\r\n /** Applied to every tile built from `items`. */\r\n @property({ type: String, attribute: 'action-label' })\r\n actionLabel = 'Learn more';\r\n\r\n @property({ type: Number })\r\n columns = 0;\r\n\r\n @property({ type: Boolean, reflect: true })\r\n inverted = false;\r\n\r\n /** Tiles to render (property only). */\r\n @property({ attribute: false })\r\n items: FeatureItemData[] = [];\r\n\r\n render() {\r\n const gridStyle = this.columns ? `--features-columns: ${this.columns}` : nothing;\r\n return html`\r\n <section class=\"container\" part=\"container\">\r\n <div class=\"header\" part=\"header\">\r\n <div class=\"title\" part=\"title\">${this.title}</div>\r\n ${this.subtitle ? html`<div class=\"subtitle\" part=\"subtitle\">${this.subtitle}</div>` : nothing}\r\n </div>\r\n <div class=\"grid\" part=\"grid\" style=${gridStyle}>\r\n <slot></slot>\r\n ${this.items.map(\r\n (item) => html`\r\n <st-feature-item\r\n .icon=${item.icon ?? ''}\r\n .title=${item.title}\r\n .description=${item.description}\r\n .href=${item.href ?? ''}\r\n .actionLabel=${this.actionLabel}\r\n ?inverted=${this.inverted}\r\n ></st-feature-item>\r\n `\r\n )}\r\n </div>\r\n </section>\r\n `;\r\n }\r\n}\r\n","import { LitElement, css, html, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\nimport 'iconify-icon';\r\n\r\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\r\nimport { cardDescriptionStyles, cardTitleStyles } from '../shared/section-styles';\r\nimport '../card';\r\nimport '../markdown';\r\n\r\n/**\r\n * One feature tile for `st-features-section`: optional icon, title, Markdown description and an\r\n * optional \"Learn more\" link, rendered on an `st-card`. `icon` is an Iconify name (e.g.\r\n * `mdi:rocket`). The link is a plain `<a>` (the source used react-router's `Link` for non-http\r\n * hrefs; there is no Lit equivalent). The click is composed, so an SPA router can intercept it\r\n * (e.g. via `event.composedPath()`) and navigate client-side; `http(s)` links open in a new tab.\r\n */\r\n@customElement('st-feature-item')\r\nexport class FeatureItem extends LitElement {\r\n static styles = css`\r\n ${controlBaseStyles}\r\n\r\n :host {\r\n display: block;\r\n ${fontFamilyStyles}\r\n }\r\n\r\n st-card {\r\n height: 100%;\r\n }\r\n\r\n .content {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: flex-start;\r\n gap: var(--st-space-16);\r\n height: 100%;\r\n }\r\n\r\n .icon {\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n width: 48px;\r\n height: 48px;\r\n border-radius: var(--st-radius-lg);\r\n background: var(--st-color-subtle);\r\n color: var(--st-color-text-strong);\r\n margin-bottom: var(--st-space-8);\r\n font-size: 24px;\r\n }\r\n\r\n :host([inverted]) .icon {\r\n background: var(--st-color-text-muted);\r\n color: var(--st-color-on-solid);\r\n }\r\n\r\n .title {\r\n ${cardTitleStyles}\r\n margin: 0;\r\n }\r\n\r\n .description {\r\n ${cardDescriptionStyles}\r\n margin: 0;\r\n }\r\n\r\n :host([inverted]) .title,\r\n :host([inverted]) .description {\r\n color: inherit;\r\n }\r\n\r\n .link {\r\n display: flex;\r\n align-items: center;\r\n gap: var(--st-space-4);\r\n margin-top: auto;\r\n color: var(--st-color-text-muted);\r\n font-weight: var(--st-font-weight-medium);\r\n font-size: var(--st-text-md);\r\n text-decoration: none;\r\n transition: color 0.2s ease;\r\n }\r\n\r\n .link:hover {\r\n color: var(--st-color-text-strong);\r\n text-decoration: underline;\r\n }\r\n\r\n :host([inverted]) .link,\r\n :host([inverted]) .link:hover {\r\n color: inherit;\r\n }\r\n\r\n @media (prefers-reduced-motion: reduce) {\r\n .link {\r\n transition: none;\r\n }\r\n }\r\n `;\r\n\r\n /** Iconify icon name, e.g. `mdi:rocket`. */\r\n @property({ type: String })\r\n icon = '';\r\n\r\n @property({ type: String })\r\n title = '';\r\n\r\n /** Markdown. */\r\n @property({ type: String })\r\n description = '';\r\n\r\n @property({ type: String })\r\n href = '';\r\n\r\n @property({ type: String, attribute: 'action-label' })\r\n actionLabel = 'Learn more';\r\n\r\n @property({ type: Boolean, reflect: true })\r\n inverted = false;\r\n\r\n render() {\r\n const external = this.href.startsWith('http');\r\n return html`\r\n <st-card hoverable elevation=\"sm\" ?inverted=${this.inverted} part=\"card\">\r\n <div class=\"content\" part=\"content\">\r\n ${this.icon\r\n ? html`<div class=\"icon\" part=\"icon\"><iconify-icon icon=${this.icon}></iconify-icon></div>`\r\n : nothing}\r\n <h3 class=\"title\" part=\"title\">${this.title}</h3>\r\n <st-markdown class=\"description\" part=\"description\" .content=${this.description}></st-markdown>\r\n ${this.href\r\n ? html`\r\n <a\r\n class=\"link\"\r\n part=\"link\"\r\n href=${this.href}\r\n target=${external ? '_blank' : '_self'}\r\n rel=${external ? 'noopener noreferrer' : nothing}\r\n >\r\n ${this.actionLabel} <span>&rarr;</span>\r\n </a>\r\n `\r\n : nothing}\r\n </div>\r\n </st-card>\r\n `;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,cAAAA,aAAY,OAAAC,MAAK,QAAAC,OAAM,WAAAC,gBAAe;AAC/C,SAAS,iBAAAC,gBAAe,YAAAC,iBAAgB;;;ACDxC,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AACxC,OAAO;AAeA,IAAM,cAAN,cAA0B,WAAW;AAAA,EAArC;AAAA;AAqFL,gBAAO;AAGP,iBAAQ;AAIR,uBAAc;AAGd,gBAAO;AAGP,uBAAc;AAGd,oBAAW;AAAA;AAAA,EAEX,SAAS;AACP,UAAM,WAAW,KAAK,KAAK,WAAW,MAAM;AAC5C,WAAO;AAAA,oDACyC,K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B3B;AAAA,EADCC,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAxDf,gBAyDX;AAGA;AAAA,EADCA,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA3Df,gBA4DX;AAIA;AAAA,EADCA,UAAS,EAAE,MAAM,QAAQ,WAAW,eAAe,CAAC;AAAA,GA/D1C,gBAgEX;AAGA;AAAA,EADCA,UAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAlEf,gBAmEX;AAGA;AAAA,EADCA,UAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GArE/B,gBAsEX;AAIA;AAAA,EADCA,UAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GAzEnB,gBA0EX;AA1EW,kBAAN;AAAA,EADNC,eAAc,qBAAqB;AAAA,GACvB;","names":["LitElement","css","html","nothing","customElement","property","LitElement","nothing","html","css","property","customElement"]}
@@ -0,0 +1,15 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __decorateClass = (decorators, target, key, kind) => {
4
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
5
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
6
+ if (decorator = decorators[i])
7
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
8
+ if (kind && result) __defProp(target, key, result);
9
+ return result;
10
+ };
11
+
12
+ export {
13
+ __decorateClass
14
+ };
15
+ //# sourceMappingURL=chunk-EUXUH3YW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,156 @@
1
+ import {
2
+ sectionHeaderStyles,
3
+ sectionSubtitleStyles,
4
+ sectionTitleStyles
5
+ } from "./chunk-3VE6VFJ4.js";
6
+ import {
7
+ controlBaseStyles,
8
+ fontFamilyStyles
9
+ } from "./chunk-RHAOQ6K4.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
+ padding: var(--st-space-24);
54
+ background: var(--st-color-surface);
55
+ color: var(--st-color-text-strong);
56
+ }
57
+
58
+ :host([inverted]) {
59
+ background: var(--st-color-text-strong);
60
+ color: var(--st-color-on-solid);
61
+ }
62
+
63
+ .container {
64
+ max-width: var(--st-cms-container-max);
65
+ padding: 0 var(--st-space-48);
66
+ margin: 0 auto;
67
+ }
68
+
69
+ .header {
70
+ ${sectionHeaderStyles}
71
+ }
72
+
73
+ .title {
74
+ ${sectionTitleStyles}
75
+ line-height: 1.1;
76
+ }
77
+
78
+ .subtitle {
79
+ ${sectionSubtitleStyles}
80
+ }
81
+
82
+ :host([inverted]) .title,
83
+ :host([inverted]) .subtitle {
84
+ color: inherit;
85
+ }
86
+
87
+ .featured-image {
88
+ margin: 0 0 var(--st-space-48);
89
+ border-radius: var(--st-radius-lg);
90
+ overflow: hidden;
91
+ }
92
+
93
+ .featured-image img {
94
+ width: 100%;
95
+ height: auto;
96
+ display: block;
97
+ }
98
+
99
+ figcaption {
100
+ padding: var(--st-space-12);
101
+ text-align: center;
102
+ color: var(--st-color-text-muted);
103
+ font-size: var(--st-text-xs);
104
+ }
105
+
106
+ st-markdown {
107
+ color: var(--st-color-text);
108
+ font-size: var(--st-text-xl);
109
+ }
110
+
111
+ :host([inverted]) st-markdown {
112
+ color: inherit;
113
+ }
114
+
115
+ @media (max-width: 768px) {
116
+ :host {
117
+ padding: var(--st-space-48) var(--st-space-24);
118
+ }
119
+
120
+ .container {
121
+ padding: 0;
122
+ }
123
+ }
124
+ `;
125
+ __decorateClass([
126
+ property({ type: String })
127
+ ], ContentBlock.prototype, "title", 2);
128
+ __decorateClass([
129
+ property({ type: String })
130
+ ], ContentBlock.prototype, "subtitle", 2);
131
+ __decorateClass([
132
+ property({ type: String, attribute: "content-src" })
133
+ ], ContentBlock.prototype, "contentSrc", 2);
134
+ __decorateClass([
135
+ property({ type: String })
136
+ ], ContentBlock.prototype, "content", 2);
137
+ __decorateClass([
138
+ property({ type: String, attribute: "image-src" })
139
+ ], ContentBlock.prototype, "imageSrc", 2);
140
+ __decorateClass([
141
+ property({ type: String, attribute: "image-alt" })
142
+ ], ContentBlock.prototype, "imageAlt", 2);
143
+ __decorateClass([
144
+ property({ type: String, attribute: "image-caption" })
145
+ ], ContentBlock.prototype, "imageCaption", 2);
146
+ __decorateClass([
147
+ property({ type: Boolean, reflect: true })
148
+ ], ContentBlock.prototype, "inverted", 2);
149
+ ContentBlock = __decorateClass([
150
+ customElement("st-content-block")
151
+ ], ContentBlock);
152
+
153
+ export {
154
+ ContentBlock
155
+ };
156
+ //# sourceMappingURL=chunk-IMACP7HN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/content-block/ContentBlock.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\r\nimport { customElement, property } from 'lit/decorators.js';\r\n\r\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\r\nimport { sectionSubtitleStyles, sectionTitleStyles, sectionHeaderStyles } from '../shared/section-styles';\r\nimport '../markdown';\r\n\r\n/**\r\n * A long-form article section: centered title/subtitle, an optional featured image with caption,\r\n * then Markdown body text. Ports `SankhyaUI`'s React `ContentBlock`. The body comes from\r\n * `content-src` (a Markdown URL, as in the source) or an inline `content` string (added so the\r\n * block works without a fetch); `content-src` wins when both are set.\r\n */\r\n@customElement('st-content-block')\r\nexport class ContentBlock extends LitElement {\r\n static styles = css`\r\n ${controlBaseStyles}\r\n\r\n :host {\r\n display: block;\r\n ${fontFamilyStyles}\r\n padding: var(--st-space-24);\r\n background: var(--st-color-surface);\r\n color: var(--st-color-text-strong);\r\n }\r\n\r\n :host([inverted]) {\r\n background: var(--st-color-text-strong);\r\n color: var(--st-color-on-solid);\r\n }\r\n\r\n .container {\r\n max-width: var(--st-cms-container-max);\r\n padding: 0 var(--st-space-48);\r\n margin: 0 auto;\r\n }\r\n\r\n .header {\r\n ${sectionHeaderStyles}\r\n }\r\n\r\n .title {\r\n ${sectionTitleStyles}\r\n line-height: 1.1;\r\n }\r\n\r\n .subtitle {\r\n ${sectionSubtitleStyles}\r\n }\r\n\r\n :host([inverted]) .title,\r\n :host([inverted]) .subtitle {\r\n color: inherit;\r\n }\r\n\r\n .featured-image {\r\n margin: 0 0 var(--st-space-48);\r\n border-radius: var(--st-radius-lg);\r\n overflow: hidden;\r\n }\r\n\r\n .featured-image img {\r\n width: 100%;\r\n height: auto;\r\n display: block;\r\n }\r\n\r\n figcaption {\r\n padding: var(--st-space-12);\r\n text-align: center;\r\n color: var(--st-color-text-muted);\r\n font-size: var(--st-text-xs);\r\n }\r\n\r\n st-markdown {\r\n color: var(--st-color-text);\r\n font-size: var(--st-text-xl);\r\n }\r\n\r\n :host([inverted]) st-markdown {\r\n color: inherit;\r\n }\r\n\r\n @media (max-width: 768px) {\r\n :host {\r\n padding: var(--st-space-48) var(--st-space-24);\r\n }\r\n\r\n .container {\r\n padding: 0;\r\n }\r\n }\r\n `;\r\n\r\n @property({ type: String })\r\n title = '';\r\n\r\n @property({ type: String })\r\n subtitle = '';\r\n\r\n /** URL of a Markdown file. */\r\n @property({ type: String, attribute: 'content-src' })\r\n contentSrc = '';\r\n\r\n /** Inline Markdown, used when `content-src` is not set. */\r\n @property({ type: String })\r\n content = '';\r\n\r\n @property({ type: String, attribute: 'image-src' })\r\n imageSrc = '';\r\n\r\n @property({ type: String, attribute: 'image-alt' })\r\n imageAlt = '';\r\n\r\n @property({ type: String, attribute: 'image-caption' })\r\n imageCaption = '';\r\n\r\n @property({ type: Boolean, reflect: true })\r\n inverted = false;\r\n\r\n render() {\r\n return html`\r\n <section class=\"container\" part=\"container\">\r\n <div class=\"header\" part=\"header\">\r\n ${this.title ? html`<div class=\"title\" part=\"title\">${this.title}</div>` : nothing}\r\n ${this.subtitle ? html`<div class=\"subtitle\" part=\"subtitle\">${this.subtitle}</div>` : nothing}\r\n </div>\r\n ${this.imageSrc\r\n ? html`\r\n <figure class=\"featured-image\" part=\"image\">\r\n <img src=${this.imageSrc} alt=${this.imageAlt || this.title} />\r\n ${this.imageCaption ? html`<figcaption>${this.imageCaption}</figcaption>` : nothing}\r\n </figure>\r\n `\r\n : nothing}\r\n <st-markdown part=\"body\" .src=${this.contentSrc} .content=${this.content}></st-markdown>\r\n </section>\r\n `;\r\n }\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAajC,IAAM,eAAN,cAA2B,WAAW;AAAA,EAAtC;AAAA;AAiFL,iBAAQ;AAGR,oBAAW;AAIX,sBAAa;AAIb,mBAAU;AAGV,oBAAW;AAGX,oBAAW;AAGX,wBAAe;AAGf,oBAAW;AAAA;AAAA,EAEX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