@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.
- package/custom-elements.json +11634 -3153
- package/dist/attention-panel/index.js +2 -2
- package/dist/bar-chart/index.js +2 -2
- package/dist/bento-grid/index.d.ts +33 -1
- package/dist/bento-grid/index.js +4 -3
- package/dist/booking/index.d.ts +309 -0
- package/dist/booking/index.js +20 -0
- package/dist/booking/index.js.map +1 -0
- package/dist/card/index.d.ts +3 -4
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.d.ts +20 -6
- package/dist/carousel/index.js +3 -3
- package/dist/chip/index.js +2 -2
- package/dist/{chunk-JQY2G4QK.js → chunk-2GTR37PU.js} +2 -2
- package/dist/chunk-2GTR37PU.js.map +1 -0
- package/dist/{chunk-FLY7TNRT.js → chunk-2HMOX253.js} +128 -25
- package/dist/chunk-2HMOX253.js.map +1 -0
- package/dist/{chunk-DH53HZPB.js → chunk-37KFBKPD.js} +32 -4
- package/dist/chunk-37KFBKPD.js.map +1 -0
- package/dist/{chunk-ALI26WOB.js → chunk-4XPKKYVZ.js} +54 -15
- package/dist/chunk-4XPKKYVZ.js.map +1 -0
- package/dist/chunk-535QAZ6A.js +236 -0
- package/dist/chunk-535QAZ6A.js.map +1 -0
- package/dist/{chunk-AKJQ345O.js → chunk-5AWGZQWU.js} +2 -2
- package/dist/chunk-6OZKZG5J.js +300 -0
- package/dist/chunk-6OZKZG5J.js.map +1 -0
- package/dist/chunk-AYNT7G3J.js +805 -0
- package/dist/chunk-AYNT7G3J.js.map +1 -0
- package/dist/chunk-BEWX3E6P.js +32 -0
- package/dist/chunk-BEWX3E6P.js.map +1 -0
- package/dist/chunk-CZUGPKXV.js +275 -0
- package/dist/chunk-CZUGPKXV.js.map +1 -0
- package/dist/{chunk-LEXZKGQX.js → chunk-DJFWZOZM.js} +107 -11
- package/dist/chunk-DJFWZOZM.js.map +1 -0
- package/dist/chunk-DPANTC3O.js +1714 -0
- package/dist/chunk-DPANTC3O.js.map +1 -0
- package/dist/chunk-EKZFFY45.js +426 -0
- package/dist/chunk-EKZFFY45.js.map +1 -0
- package/dist/chunk-ER7MCPDV.js +7 -0
- package/dist/chunk-ER7MCPDV.js.map +1 -0
- package/dist/chunk-EW2RK5Y6.js +383 -0
- package/dist/chunk-EW2RK5Y6.js.map +1 -0
- package/dist/{chunk-BLQV2YMO.js → chunk-EZOKT7NJ.js} +2 -2
- package/dist/chunk-FF2LWEF3.js +386 -0
- package/dist/chunk-FF2LWEF3.js.map +1 -0
- package/dist/chunk-FOUK3NHR.js +7 -0
- package/dist/chunk-FOUK3NHR.js.map +1 -0
- package/dist/chunk-GB4NGCZI.js +181 -0
- package/dist/chunk-GB4NGCZI.js.map +1 -0
- package/dist/{chunk-7NLZND6Q.js → chunk-GOFSMD6W.js} +35 -11
- package/dist/chunk-GOFSMD6W.js.map +1 -0
- package/dist/{chunk-6D6ROU7X.js → chunk-IGMVF3KK.js} +2 -2
- package/dist/{chunk-INMSEYT6.js → chunk-IVPVYVWG.js} +2 -2
- package/dist/chunk-JURCF4OD.js +381 -0
- package/dist/chunk-JURCF4OD.js.map +1 -0
- package/dist/{chunk-FZ36KL73.js → chunk-KZ7PMFWS.js} +11 -1
- package/dist/chunk-KZ7PMFWS.js.map +1 -0
- package/dist/{chunk-EMCQBT3S.js → chunk-LO6TZBGD.js} +129 -35
- package/dist/chunk-LO6TZBGD.js.map +1 -0
- package/dist/chunk-MFRGAT6D.js +860 -0
- package/dist/chunk-MFRGAT6D.js.map +1 -0
- package/dist/chunk-MIBVQXRU.js +1098 -0
- package/dist/chunk-MIBVQXRU.js.map +1 -0
- package/dist/{chunk-35TX3AOA.js → chunk-NABSRUXG.js} +2 -2
- package/dist/{chunk-R5G6KFTJ.js → chunk-NXKDZWS7.js} +44 -6
- package/dist/chunk-NXKDZWS7.js.map +1 -0
- package/dist/{chunk-KMU6ABQF.js → chunk-NXUS2CH7.js} +14 -1
- package/dist/chunk-NXUS2CH7.js.map +1 -0
- package/dist/{chunk-GJO3RGOB.js → chunk-OCPGOLVF.js} +56 -11
- package/dist/chunk-OCPGOLVF.js.map +1 -0
- package/dist/chunk-OEOE6IFY.js +628 -0
- package/dist/chunk-OEOE6IFY.js.map +1 -0
- package/dist/{chunk-SMLR736E.js → chunk-PV6OCXXN.js} +2 -2
- package/dist/chunk-PV6OCXXN.js.map +1 -0
- package/dist/chunk-Q66CJO3P.js +534 -0
- package/dist/chunk-Q66CJO3P.js.map +1 -0
- package/dist/{chunk-MG2VTZA4.js → chunk-QS3ANOWN.js} +2 -2
- package/dist/{chunk-ZN4LIKVG.js → chunk-QSJ543V2.js} +2 -2
- package/dist/chunk-QSJ543V2.js.map +1 -0
- package/dist/{chunk-FML6AG2V.js → chunk-RANC3OI6.js} +2 -2
- package/dist/chunk-T4BIN37Q.js +32 -0
- package/dist/chunk-T4BIN37Q.js.map +1 -0
- package/dist/{chunk-YVTFQHVY.js → chunk-TEAZZPDQ.js} +2 -2
- package/dist/chunk-TJK55CJ2.js +49 -0
- package/dist/chunk-TJK55CJ2.js.map +1 -0
- package/dist/chunk-UKIVLF7S.js +32 -0
- package/dist/chunk-UKIVLF7S.js.map +1 -0
- package/dist/chunk-V4R7PYP5.js +905 -0
- package/dist/chunk-V4R7PYP5.js.map +1 -0
- package/dist/{chunk-AG2COC64.js → chunk-VVYQ2DDS.js} +2 -2
- package/dist/chunk-WAMOAAMN.js +16 -0
- package/dist/chunk-WAMOAAMN.js.map +1 -0
- package/dist/chunk-WAYHHL4J.js +1234 -0
- package/dist/chunk-WAYHHL4J.js.map +1 -0
- package/dist/{chunk-YQ42EBK5.js → chunk-WH6HE6SY.js} +10 -4
- package/dist/chunk-WH6HE6SY.js.map +1 -0
- package/dist/chunk-XP6DI3VY.js +180 -0
- package/dist/chunk-XP6DI3VY.js.map +1 -0
- package/dist/{chunk-5EBWMPJS.js → chunk-XS6LNTSH.js} +76 -14
- package/dist/chunk-XS6LNTSH.js.map +1 -0
- package/dist/{chunk-WT4OATGP.js → chunk-ZKFCDVB4.js} +16 -7
- package/dist/chunk-ZKFCDVB4.js.map +1 -0
- package/dist/cms-theme.css +29 -0
- package/dist/contact-form/index.d.ts +220 -0
- package/dist/contact-form/index.js +16 -0
- package/dist/contact-form/index.js.map +1 -0
- package/dist/content-block/index.d.ts +39 -4
- package/dist/content-block/index.js +8 -4
- package/dist/cookie-consent/index.d.ts +60 -12
- package/dist/cookie-consent/index.js +3 -2
- package/dist/date-tile/index.js +2 -2
- package/dist/dropdown/index.d.ts +29 -11
- package/dist/dropdown/index.js +4 -2
- package/dist/feature-split/index.d.ts +6 -1
- package/dist/feature-split/index.js +5 -4
- package/dist/features-section/index.d.ts +53 -9
- package/dist/features-section/index.js +6 -5
- package/dist/flow/index.d.ts +35 -0
- package/dist/flow/index.js +9 -0
- package/dist/flow/index.js.map +1 -0
- package/dist/footer/index.d.ts +13 -0
- package/dist/footer/index.js +2 -2
- package/dist/header/index.d.ts +135 -16
- package/dist/header/index.js +3 -2
- package/dist/hero/index.d.ts +92 -8
- package/dist/hero/index.js +6 -3
- package/dist/icon-button/index.d.ts +7 -7
- package/dist/icon-button/index.js +2 -2
- package/dist/index.d.ts +12 -3
- package/dist/index.js +121 -47
- package/dist/items-accordion/index.d.ts +9 -0
- package/dist/items-accordion/index.js +4 -3
- package/dist/kpi-card/index.js +2 -2
- package/dist/markdown/index.d.ts +19 -2
- package/dist/markdown/index.js +3 -2
- package/dist/mega-menu/index.d.ts +95 -7
- package/dist/mega-menu/index.js +7 -2
- package/dist/menu-grid/index.d.ts +2 -3
- package/dist/menu-grid/index.js +2 -2
- package/dist/menu-grid-item/index.d.ts +6 -8
- package/dist/menu-grid-item/index.js +2 -2
- package/dist/menu-item/index.d.ts +11 -7
- package/dist/menu-item/index.js +3 -2
- package/dist/plan-cards/index.d.ts +69 -0
- package/dist/plan-cards/index.js +13 -0
- package/dist/plan-cards/index.js.map +1 -0
- package/dist/product-nav/index.d.ts +127 -0
- package/dist/product-nav/index.js +11 -0
- package/dist/product-nav/index.js.map +1 -0
- package/dist/promo-banner/index.d.ts +42 -4
- package/dist/promo-banner/index.js +6 -3
- package/dist/quote-dialog/index.d.ts +174 -0
- package/dist/quote-dialog/index.js +22 -0
- package/dist/quote-dialog/index.js.map +1 -0
- package/dist/schema/index.d.ts +11 -0
- package/dist/schema/index.js +9 -0
- package/dist/schema/index.js.map +1 -1
- package/dist/screenshot-tour/index.d.ts +54 -0
- package/dist/screenshot-tour/index.js +9 -0
- package/dist/screenshot-tour/index.js.map +1 -0
- package/dist/section/index.d.ts +3 -0
- package/dist/section/index.js +3 -3
- package/dist/segmented-control/index.js +2 -2
- package/dist/select/index.js +2 -2
- package/dist/shared/styles.d.ts +7 -1
- package/dist/shared/styles.js +3 -1
- package/dist/stats/index.js +2 -2
- package/dist/steps/index.d.ts +45 -0
- package/dist/steps/index.js +11 -0
- package/dist/steps/index.js.map +1 -0
- package/dist/tag-strip/index.d.ts +33 -0
- package/dist/tag-strip/index.js +9 -0
- package/dist/tag-strip/index.js.map +1 -0
- package/dist/testimonials/index.d.ts +9 -1
- package/dist/testimonials/index.js +3 -3
- package/dist/tooltip/index.js +2 -2
- package/package.json +38 -2
- package/dist/chunk-5EBWMPJS.js.map +0 -1
- package/dist/chunk-76AVBQUA.js +0 -252
- package/dist/chunk-76AVBQUA.js.map +0 -1
- package/dist/chunk-7NLZND6Q.js.map +0 -1
- package/dist/chunk-ALI26WOB.js.map +0 -1
- package/dist/chunk-BMHMNXIA.js +0 -158
- package/dist/chunk-BMHMNXIA.js.map +0 -1
- package/dist/chunk-DH53HZPB.js.map +0 -1
- package/dist/chunk-EMCQBT3S.js.map +0 -1
- package/dist/chunk-FLY7TNRT.js.map +0 -1
- package/dist/chunk-FZ36KL73.js.map +0 -1
- package/dist/chunk-GJO3RGOB.js.map +0 -1
- package/dist/chunk-J6EO4R73.js +0 -633
- package/dist/chunk-J6EO4R73.js.map +0 -1
- package/dist/chunk-JKBWZLG4.js +0 -348
- package/dist/chunk-JKBWZLG4.js.map +0 -1
- package/dist/chunk-JQY2G4QK.js.map +0 -1
- package/dist/chunk-KMU6ABQF.js.map +0 -1
- package/dist/chunk-LEXZKGQX.js.map +0 -1
- package/dist/chunk-MSSH3HFK.js +0 -205
- package/dist/chunk-MSSH3HFK.js.map +0 -1
- package/dist/chunk-R5G6KFTJ.js.map +0 -1
- package/dist/chunk-SMLR736E.js.map +0 -1
- package/dist/chunk-VWS53WY4.js +0 -157
- package/dist/chunk-VWS53WY4.js.map +0 -1
- package/dist/chunk-WT4OATGP.js.map +0 -1
- package/dist/chunk-XWB4CKDU.js +0 -708
- package/dist/chunk-XWB4CKDU.js.map +0 -1
- package/dist/chunk-YQ42EBK5.js.map +0 -1
- package/dist/chunk-ZN4LIKVG.js.map +0 -1
- /package/dist/{chunk-AKJQ345O.js.map → chunk-5AWGZQWU.js.map} +0 -0
- /package/dist/{chunk-BLQV2YMO.js.map → chunk-EZOKT7NJ.js.map} +0 -0
- /package/dist/{chunk-6D6ROU7X.js.map → chunk-IGMVF3KK.js.map} +0 -0
- /package/dist/{chunk-INMSEYT6.js.map → chunk-IVPVYVWG.js.map} +0 -0
- /package/dist/{chunk-35TX3AOA.js.map → chunk-NABSRUXG.js.map} +0 -0
- /package/dist/{chunk-MG2VTZA4.js.map → chunk-QS3ANOWN.js.map} +0 -0
- /package/dist/{chunk-FML6AG2V.js.map → chunk-RANC3OI6.js.map} +0 -0
- /package/dist/{chunk-YVTFQHVY.js.map → chunk-TEAZZPDQ.js.map} +0 -0
- /package/dist/{chunk-AG2COC64.js.map → chunk-VVYQ2DDS.js.map} +0 -0
package/dist/chunk-MSSH3HFK.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
buttonResetStyles,
|
|
3
|
-
controlBaseStyles,
|
|
4
|
-
rootFontFamilyStyles
|
|
5
|
-
} from "./chunk-KMU6ABQF.js";
|
|
6
|
-
import {
|
|
7
|
-
__decorateClass
|
|
8
|
-
} from "./chunk-EUXUH3YW.js";
|
|
9
|
-
|
|
10
|
-
// src/cookie-consent/CookieConsent.ts
|
|
11
|
-
import { LitElement, css, html, nothing } from "lit";
|
|
12
|
-
import { customElement, property, state } from "lit/decorators.js";
|
|
13
|
-
var DEFAULT_STORAGE_KEY = "sankhya_ui_cookie_consent";
|
|
14
|
-
var CookieConsent = class extends LitElement {
|
|
15
|
-
constructor() {
|
|
16
|
-
super(...arguments);
|
|
17
|
-
this.message = "";
|
|
18
|
-
this.acceptButtonText = "Accept";
|
|
19
|
-
this.refuseButtonText = "Refuse";
|
|
20
|
-
this.privacyPolicyLink = "";
|
|
21
|
-
this.privacyPolicyText = "Privacy Policy";
|
|
22
|
-
this.storageKey = DEFAULT_STORAGE_KEY;
|
|
23
|
-
this.consent = null;
|
|
24
|
-
}
|
|
25
|
-
connectedCallback() {
|
|
26
|
-
super.connectedCallback();
|
|
27
|
-
this.consent = this.readStored();
|
|
28
|
-
}
|
|
29
|
-
readStored() {
|
|
30
|
-
try {
|
|
31
|
-
const saved = localStorage.getItem(this.storageKey);
|
|
32
|
-
return saved === "accepted" || saved === "refused" ? saved : null;
|
|
33
|
-
} catch {
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
choose(status) {
|
|
38
|
-
this.consent = status;
|
|
39
|
-
try {
|
|
40
|
-
localStorage.setItem(this.storageKey, status);
|
|
41
|
-
} catch {
|
|
42
|
-
}
|
|
43
|
-
this.dispatchEvent(
|
|
44
|
-
new CustomEvent(status === "accepted" ? "cookie-consent-accept" : "cookie-consent-refuse", {
|
|
45
|
-
detail: { status },
|
|
46
|
-
bubbles: true,
|
|
47
|
-
composed: true
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
render() {
|
|
52
|
-
if (this.consent !== null) return nothing;
|
|
53
|
-
return html`
|
|
54
|
-
<div class="content" part="content">
|
|
55
|
-
<p class="message" part="message">
|
|
56
|
-
<slot>
|
|
57
|
-
${this.message || "We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies."}
|
|
58
|
-
${this.privacyPolicyLink ? html`<a class="link" part="link" href=${this.privacyPolicyLink} target="_blank" rel="noopener noreferrer">${this.privacyPolicyText}</a>` : nothing}
|
|
59
|
-
</slot>
|
|
60
|
-
</p>
|
|
61
|
-
</div>
|
|
62
|
-
<div class="actions" part="actions">
|
|
63
|
-
<button class="btn refuse" part="refuse" type="button" @click=${() => this.choose("refused")}>${this.refuseButtonText}</button>
|
|
64
|
-
<button class="btn accept" part="accept" type="button" @click=${() => this.choose("accepted")}>${this.acceptButtonText}</button>
|
|
65
|
-
</div>
|
|
66
|
-
`;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
CookieConsent.styles = css`
|
|
70
|
-
${controlBaseStyles}
|
|
71
|
-
|
|
72
|
-
@keyframes st-cookie-slide-up {
|
|
73
|
-
from {
|
|
74
|
-
transform: translateY(100%);
|
|
75
|
-
}
|
|
76
|
-
to {
|
|
77
|
-
transform: translateY(0);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host {
|
|
82
|
-
position: fixed;
|
|
83
|
-
bottom: 0;
|
|
84
|
-
left: 0;
|
|
85
|
-
width: 100%;
|
|
86
|
-
box-sizing: border-box;
|
|
87
|
-
z-index: 9999;
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-direction: column;
|
|
90
|
-
gap: var(--st-space-16);
|
|
91
|
-
/* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
|
|
92
|
-
padding; override with --st-cookie-consent-padding instead. */
|
|
93
|
-
padding: var(--st-cookie-consent-padding, var(--st-space-24)) !important;
|
|
94
|
-
background: var(--st-color-surface);
|
|
95
|
-
color: var(--st-color-text);
|
|
96
|
-
border-top: 1px solid var(--st-color-border);
|
|
97
|
-
box-shadow: 0 -4px 10px var(--st-shadow-color-sm);
|
|
98
|
-
animation: st-cookie-slide-up 0.3s ease-out;
|
|
99
|
-
${rootFontFamilyStyles}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.content {
|
|
103
|
-
flex: 1;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.message {
|
|
107
|
-
margin: 0;
|
|
108
|
-
font-size: var(--st-text-md);
|
|
109
|
-
line-height: 1.5;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.link {
|
|
113
|
-
color: var(--st-color-accent-text);
|
|
114
|
-
text-decoration: underline;
|
|
115
|
-
margin-left: var(--st-space-4);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.link:hover {
|
|
119
|
-
text-decoration: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.actions {
|
|
123
|
-
display: flex;
|
|
124
|
-
gap: var(--st-space-12);
|
|
125
|
-
flex-shrink: 0;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.btn {
|
|
129
|
-
${buttonResetStyles}
|
|
130
|
-
padding: var(--st-space-8) var(--st-space-16);
|
|
131
|
-
border: 1px solid transparent;
|
|
132
|
-
border-radius: var(--st-radius-xs);
|
|
133
|
-
font-weight: var(--st-font-weight-medium);
|
|
134
|
-
font-size: var(--st-text-md);
|
|
135
|
-
transition:
|
|
136
|
-
background-color 0.2s ease,
|
|
137
|
-
color 0.2s ease;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.accept {
|
|
141
|
-
background: var(--st-button-primary-bg);
|
|
142
|
-
color: var(--st-button-primary-color);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.accept:hover {
|
|
146
|
-
opacity: 0.9;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.refuse {
|
|
150
|
-
border-color: var(--st-color-border);
|
|
151
|
-
color: var(--st-color-text-muted);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.refuse:hover {
|
|
155
|
-
background: var(--st-color-hover);
|
|
156
|
-
color: var(--st-color-text-strong);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
@media (min-width: 768px) {
|
|
160
|
-
:host {
|
|
161
|
-
flex-direction: row;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: space-between;
|
|
164
|
-
padding: var(--st-cookie-consent-padding, var(--st-space-16) var(--st-space-32)) !important;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@media (prefers-reduced-motion: reduce) {
|
|
169
|
-
:host {
|
|
170
|
-
animation: none;
|
|
171
|
-
}
|
|
172
|
-
.btn {
|
|
173
|
-
transition: none;
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
`;
|
|
177
|
-
__decorateClass([
|
|
178
|
-
property({ type: String })
|
|
179
|
-
], CookieConsent.prototype, "message", 2);
|
|
180
|
-
__decorateClass([
|
|
181
|
-
property({ type: String, attribute: "accept-button-text" })
|
|
182
|
-
], CookieConsent.prototype, "acceptButtonText", 2);
|
|
183
|
-
__decorateClass([
|
|
184
|
-
property({ type: String, attribute: "refuse-button-text" })
|
|
185
|
-
], CookieConsent.prototype, "refuseButtonText", 2);
|
|
186
|
-
__decorateClass([
|
|
187
|
-
property({ type: String, attribute: "privacy-policy-link" })
|
|
188
|
-
], CookieConsent.prototype, "privacyPolicyLink", 2);
|
|
189
|
-
__decorateClass([
|
|
190
|
-
property({ type: String, attribute: "privacy-policy-text" })
|
|
191
|
-
], CookieConsent.prototype, "privacyPolicyText", 2);
|
|
192
|
-
__decorateClass([
|
|
193
|
-
property({ type: String, attribute: "storage-key" })
|
|
194
|
-
], CookieConsent.prototype, "storageKey", 2);
|
|
195
|
-
__decorateClass([
|
|
196
|
-
state()
|
|
197
|
-
], CookieConsent.prototype, "consent", 2);
|
|
198
|
-
CookieConsent = __decorateClass([
|
|
199
|
-
customElement("st-cookie-consent")
|
|
200
|
-
], CookieConsent);
|
|
201
|
-
|
|
202
|
-
export {
|
|
203
|
-
CookieConsent
|
|
204
|
-
};
|
|
205
|
-
//# sourceMappingURL=chunk-MSSH3HFK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cookie-consent/CookieConsent.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { buttonResetStyles, controlBaseStyles, rootFontFamilyStyles } from '../shared/styles';\nimport type { CookieConsentEventDetail, CookieConsentStatus } from './CookieConsentEvents';\n\nconst DEFAULT_STORAGE_KEY = 'sankhya_ui_cookie_consent';\n\n/**\n * Fixed bottom consent bar. The source read/wrote consent through a React `UserContext`; here the\n * element persists the choice itself in localStorage (`storage-key`, default the source's\n * `sankhya_ui_cookie_consent`; storage errors are ignored) and renders nothing once a choice\n * exists. Fires `cookie-consent-accept` / `cookie-consent-refuse` (detail `{ status }`). The\n * default slot replaces the message text.\n *\n * @cssprop --st-cookie-consent-padding - Overrides the bar's padding.\n */\n@customElement('st-cookie-consent')\nexport class CookieConsent extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n @keyframes st-cookie-slide-up {\n from {\n transform: translateY(100%);\n }\n to {\n transform: translateY(0);\n }\n }\n\n :host {\n position: fixed;\n bottom: 0;\n left: 0;\n width: 100%;\n box-sizing: border-box;\n z-index: 9999;\n display: flex;\n flex-direction: column;\n gap: var(--st-space-16);\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n padding; override with --st-cookie-consent-padding instead. */\n padding: var(--st-cookie-consent-padding, var(--st-space-24)) !important;\n background: var(--st-color-surface);\n color: var(--st-color-text);\n border-top: 1px solid var(--st-color-border);\n box-shadow: 0 -4px 10px var(--st-shadow-color-sm);\n animation: st-cookie-slide-up 0.3s ease-out;\n ${rootFontFamilyStyles}\n }\n\n .content {\n flex: 1;\n }\n\n .message {\n margin: 0;\n font-size: var(--st-text-md);\n line-height: 1.5;\n }\n\n .link {\n color: var(--st-color-accent-text);\n text-decoration: underline;\n margin-left: var(--st-space-4);\n }\n\n .link:hover {\n text-decoration: none;\n }\n\n .actions {\n display: flex;\n gap: var(--st-space-12);\n flex-shrink: 0;\n }\n\n .btn {\n ${buttonResetStyles}\n padding: var(--st-space-8) var(--st-space-16);\n border: 1px solid transparent;\n border-radius: var(--st-radius-xs);\n font-weight: var(--st-font-weight-medium);\n font-size: var(--st-text-md);\n transition:\n background-color 0.2s ease,\n color 0.2s ease;\n }\n\n .accept {\n background: var(--st-button-primary-bg);\n color: var(--st-button-primary-color);\n }\n\n .accept:hover {\n opacity: 0.9;\n }\n\n .refuse {\n border-color: var(--st-color-border);\n color: var(--st-color-text-muted);\n }\n\n .refuse:hover {\n background: var(--st-color-hover);\n color: var(--st-color-text-strong);\n }\n\n @media (min-width: 768px) {\n :host {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: var(--st-cookie-consent-padding, var(--st-space-16) var(--st-space-32)) !important;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n :host {\n animation: none;\n }\n .btn {\n transition: none;\n }\n }\n `;\n\n @property({ type: String })\n message = '';\n\n @property({ type: String, attribute: 'accept-button-text' })\n acceptButtonText = 'Accept';\n\n @property({ type: String, attribute: 'refuse-button-text' })\n refuseButtonText = 'Refuse';\n\n @property({ type: String, attribute: 'privacy-policy-link' })\n privacyPolicyLink = '';\n\n @property({ type: String, attribute: 'privacy-policy-text' })\n privacyPolicyText = 'Privacy Policy';\n\n @property({ type: String, attribute: 'storage-key' })\n storageKey = DEFAULT_STORAGE_KEY;\n\n /** The stored choice, or `null` while undecided (the bar is only shown then). */\n @state() private consent: CookieConsentStatus | null = null;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.consent = this.readStored();\n }\n\n private readStored(): CookieConsentStatus | null {\n try {\n const saved = localStorage.getItem(this.storageKey);\n return saved === 'accepted' || saved === 'refused' ? saved : null;\n } catch {\n return null;\n }\n }\n\n private choose(status: CookieConsentStatus): void {\n this.consent = status;\n try {\n localStorage.setItem(this.storageKey, status);\n } catch {\n // Storage unavailable (private mode, blocked): the choice just doesn't persist.\n }\n this.dispatchEvent(\n new CustomEvent<CookieConsentEventDetail>(status === 'accepted' ? 'cookie-consent-accept' : 'cookie-consent-refuse', {\n detail: { status },\n bubbles: true,\n composed: true\n })\n );\n }\n\n render() {\n if (this.consent !== null) return nothing;\n return html`\n <div class=\"content\" part=\"content\">\n <p class=\"message\" part=\"message\">\n <slot>\n ${this.message || 'We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.'}\n ${this.privacyPolicyLink\n ? html`<a class=\"link\" part=\"link\" href=${this.privacyPolicyLink} target=\"_blank\" rel=\"noopener noreferrer\">${this.privacyPolicyText}</a>`\n : nothing}\n </slot>\n </p>\n </div>\n <div class=\"actions\" part=\"actions\">\n <button class=\"btn refuse\" part=\"refuse\" type=\"button\" @click=${() => this.choose('refused')}>${this.refuseButtonText}</button>\n <button class=\"btn accept\" part=\"accept\" type=\"button\" @click=${() => this.choose('accepted')}>${this.acceptButtonText}</button>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,UAAU,aAAa;AAK/C,IAAM,sBAAsB;AAYrB,IAAM,gBAAN,cAA4B,WAAW;AAAA,EAAvC;AAAA;AA+GL,mBAAU;AAGV,4BAAmB;AAGnB,4BAAmB;AAGnB,6BAAoB;AAGpB,6BAAoB;AAGpB,sBAAa;AAGJ,SAAQ,UAAsC;AAAA;AAAA,EAEvD,oBAA0B;AACxB,UAAM,kBAAkB;AACxB,SAAK,UAAU,KAAK,WAAW;AAAA,EACjC;AAAA,EAEQ,aAAyC;AAC/C,QAAI;AACF,YAAM,QAAQ,aAAa,QAAQ,KAAK,UAAU;AAClD,aAAO,UAAU,cAAc,UAAU,YAAY,QAAQ;AAAA,IAC/D,QAAQ;AACN,aAAO;AAAA,IACT;AAAA,EACF;AAAA,EAEQ,OAAO,QAAmC;AAChD,SAAK,UAAU;AACf,QAAI;AACF,mBAAa,QAAQ,KA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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDvB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA9Gf,cA+GX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,qBAAqB,CAAC;AAAA,GAjHhD,cAkHX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,qBAAqB,CAAC;AAAA,GApHhD,cAqHX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GAvHjD,cAwHX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,sBAAsB,CAAC;AAAA,GA1HjD,cA2HX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,cAAc,CAAC;AAAA,GA7HzC,cA8HX;AAGiB;AAAA,EAAhB,MAAM;AAAA,GAjII,cAiIM;AAjIN,gBAAN;AAAA,EADN,cAAc,mBAAmB;AAAA,GACrB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menu-item/MenuItem.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\n\nimport { arrowUpRightIcon } from '../shared/icons';\nimport { controlBaseStyles, fontFamilyStyles } from '../shared/styles';\nimport type { MenuItemSelectEventDetail } from './MenuItemEvents';\n\n/**\n * A single flat nav row — icon (`slot=\"icon\"`) + title + badge on one line, an optional\n * description below — as opposed to `st-menu-grid-item`'s card for a multi-column grid. A 1:1\n * port of `SankhyaUI`'s React `MenuItem` (`SankhyaCMS/SankhyaUI/src/components/Menu`): same\n * markup and CSS, with its `motion` effects redone in CSS — nudges right and scales to 1.01 on\n * hover / 0.99 while pressed, the icon tilts on hover, the badge pops in, the description fades\n * in. Colors come from the suite theme rather than per-item utility classes.\n *\n * Renders a real `<a href>` but fires a *cancelable* `menu-item-select` event (detail: `{ href }`)\n * before navigating — a host doing client-side routing calls `event.preventDefault()` on it (the\n * source used react-router's `Link` here; the suite apps have no router).\n *\n * @slot icon - The row's icon, sized to `icon-size` (16px, or 14px when `compact`).\n * @cssprop --st-menu-item-icon-size - Width and height of the slotted icon; `icon-size` sets it.\n */\n@customElement('st-menu-item')\nexport class MenuItem extends LitElement {\n /** `focus()` on the element focuses its link, so `st-dropdown` can arrow-key between items. */\n static shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };\n\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n ${fontFamilyStyles}\n }\n\n @keyframes st-menu-item-badge-pop {\n from {\n transform: scale(0);\n }\n 70% {\n transform: scale(1.12);\n }\n to {\n transform: scale(1);\n }\n }\n\n @keyframes st-menu-item-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n .menu-item {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 12px 16px;\n font-size: 0.875rem;\n text-decoration: none;\n /* --st-nav-*: set by a host bar (st-header's transparent state) to recolour its nav items. */\n color: var(--st-nav-color, var(--st-color-text));\n border-radius: 6px;\n /* The source's 'all 0.15s', minus visibility: animating the visibility this link inherits\n from a dropdown panel kept it unfocusable for a frame after the panel opened. */\n transition-property: background-color, color, padding, transform, border-color;\n transition-duration: 0.15s;\n transition-timing-function: ease;\n box-sizing: border-box;\n }\n\n /* The source's hover nudge (x: 4px) is done with padding, not a transform: a transform would\n spill past a scrolling panel's edge (st-source-bar's menus) and show a horizontal scrollbar.\n Keyboard focus gets the same treatment as hover. */\n .menu-item:hover,\n .menu-item:focus-visible {\n background: var(--st-nav-hover-bg, var(--st-color-hover));\n color: var(--st-nav-color, var(--st-color-text-strong));\n padding-left: 20px;\n transition-duration: 0.1s;\n }\n\n .menu-item.compact:hover,\n .menu-item.compact:focus-visible {\n padding-left: 16px;\n }\n\n .menu-item:active {\n transform: scale(0.99);\n transition-duration: 0.1s;\n }\n\n .menu-item.active {\n background-color: var(--st-color-accent-subtle);\n color: var(--st-color-accent-text);\n border-left: 4px solid var(--st-color-accent);\n }\n\n .menu-item-icon {\n display: flex;\n flex-shrink: 0;\n margin-top: 2px;\n transition: transform 0.2s ease;\n }\n\n .menu-item-icon:hover {\n transform: rotate(5deg);\n }\n\n .menu-item-icon[hidden] {\n display: none;\n }\n\n .menu-item-icon ::slotted(*) {\n width: var(--st-menu-item-icon-size, 16px);\n height: var(--st-menu-item-icon-size, 16px);\n }\n\n .menu-item-content {\n flex: 1;\n min-width: 0;\n }\n\n .menu-item-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n }\n\n .menu-item-title {\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .menu-item-badge {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 9999px;\n flex-shrink: 0;\n background: var(--st-color-accent-subtle);\n color: var(--st-color-accent-text);\n animation: st-menu-item-badge-pop 0.35s ease-out;\n }\n\n .menu-item-description {\n display: -webkit-box;\n margin: 4px 0 0;\n font-size: 0.75rem;\n color: var(--st-color-text-muted);\n -webkit-box-orient: vertical;\n overflow: hidden;\n line-height: 1.4;\n animation: st-menu-item-fade-in 0.2s ease;\n }\n\n .menu-item.compact {\n padding: 8px 12px;\n gap: 8px;\n }\n\n .menu-item.compact .menu-item-icon ::slotted(*) {\n width: var(--st-menu-item-icon-size, 14px);\n height: var(--st-menu-item-icon-size, 14px);\n }\n\n .menu-item.compact .menu-item-title {\n font-size: 0.75rem;\n }\n\n .menu-item.compact .menu-item-description {\n font-size: 0.75rem;\n }\n\n /* link: a plain text link (okta.com mega-menu columns) — no box, no nudge, the badge right\n after the title, long titles wrap. */\n .menu-item.link {\n padding: 7px 0;\n gap: 10px;\n font-size: 0.9375rem;\n color: var(--st-nav-color, var(--st-color-text));\n }\n\n .menu-item.link:hover,\n .menu-item.link:focus-visible {\n padding-left: 0;\n background: transparent;\n color: var(--st-nav-color, var(--st-color-text-strong));\n }\n\n .menu-item.link:hover .menu-item-title,\n .menu-item.link:focus-visible .menu-item-title {\n text-decoration: underline;\n text-underline-offset: 4px;\n }\n\n .menu-item.link:active {\n transform: none;\n }\n\n .menu-item.link.active {\n border-left: 0;\n background: transparent;\n font-weight: 600;\n }\n\n .menu-item.link .menu-item-header {\n justify-content: flex-start;\n }\n\n .menu-item.link .menu-item-title {\n white-space: normal;\n font-weight: 400;\n }\n\n .menu-item.link .menu-item-description {\n margin-top: 2px;\n font-size: 0.8125rem;\n }\n\n /* bar: a top-level item in a header bar next to mega st-dropdowns (e.g. \"Dashboard\" beside\n \"Masters ▼\") — the same pill, size and active look as their triggers, so the row reads as\n one set. Wins over compact (declared after it). */\n .menu-item.bar {\n align-items: center;\n min-height: 40px;\n padding: 12px;\n gap: 8px;\n border-radius: 9999px;\n white-space: nowrap;\n }\n\n /* Hover fills like a mega trigger opening on hover. */\n .menu-item.bar:hover,\n .menu-item.bar:focus-visible {\n padding-left: 12px;\n background: var(--st-color-accent);\n color: var(--st-color-on-solid);\n }\n\n .menu-item.bar.active {\n border-left: 0;\n }\n\n .menu-item.bar .menu-item-icon {\n margin-top: 0;\n }\n\n .menu-item.bar .menu-item-title {\n font-size: 0.875rem;\n font-weight: 400;\n }\n\n .external {\n display: inline-flex;\n margin-left: 3px;\n vertical-align: 0.05em;\n }\n\n .menu-item.no-description {\n align-items: center;\n }\n\n .menu-item.no-description .menu-item-icon {\n margin-top: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .menu-item,\n .menu-item-icon {\n transition: none;\n }\n\n .menu-item:active,\n .menu-item-icon:hover {\n transform: none;\n }\n\n .menu-item-badge,\n .menu-item-description {\n animation: none;\n }\n }\n `;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n href = '';\n\n @property({ type: String })\n description = '';\n\n /** Small trailing label, e.g. a count or \"New\"/\"Beta\" — omit for none. */\n @property({ type: String })\n badge = '';\n\n /** Highlights this row as the current page (source: `isActive`). */\n @property({ type: Boolean, reflect: true })\n active = false;\n\n @property({ type: Boolean, reflect: true })\n compact = false;\n\n /** Suppresses the description even when `description` is set (source: `showDescription`, default `true`). */\n @property({ type: Boolean, attribute: 'show-description' })\n showDescription = true;\n\n /** `target` for the `<a>` (source default `_self`). */\n @property({ type: String })\n target = '_self';\n\n /** `default` (a row with a hover box), `link` (a plain text link, as in `st-mega-menu-column`;\n * marked with an arrow when it opens a new tab) or `bar` (a top-level item in a header bar,\n * shaped like a mega `st-dropdown`'s trigger pill so it lines up with the dropdowns beside it). */\n @property({ type: String, reflect: true })\n variant: 'default' | 'link' | 'bar' = 'default';\n\n /** Size of the slotted icon, any CSS length (e.g. `36px`); empty keeps 16px (14px when `compact`). */\n @property({ type: String, attribute: 'icon-size' })\n iconSize = '';\n\n /** Whether `slot=\"icon\"` has content, so an omitted icon leaves no empty box. */\n @state() private hasIcon = false;\n\n private onIconSlotChange = (event: Event): void => {\n this.hasIcon = (event.target as HTMLSlotElement).assignedNodes({ flatten: true }).length > 0;\n };\n\n private onClick = (event: MouseEvent): void => {\n const selectEvent = new CustomEvent<MenuItemSelectEventDetail>('menu-item-select', {\n detail: { href: this.href },\n bubbles: true,\n composed: true,\n cancelable: true\n });\n this.dispatchEvent(selectEvent);\n if (selectEvent.defaultPrevented) event.preventDefault();\n };\n\n render() {\n const showDescription = !!this.description && this.showDescription;\n const link = this.variant === 'link';\n const classes = [\n 'menu-item',\n link ? 'link' : '',\n this.variant === 'bar' ? 'bar' : '',\n this.active ? 'active' : '',\n this.compact ? 'compact' : '',\n showDescription ? '' : 'no-description'\n ]\n .filter(Boolean)\n .join(' ');\n const external = link && this.target === '_blank';\n return html`\n <a\n part=\"item\"\n class=${classes}\n href=${this.href}\n target=${this.target}\n rel=${this.target === '_blank' ? 'noopener noreferrer' : nothing}\n @click=${this.onClick}\n >\n <span\n class=\"menu-item-icon\"\n part=\"icon\"\n ?hidden=${!this.hasIcon}\n style=${this.iconSize ? `--st-menu-item-icon-size: ${this.iconSize}` : nothing}\n ><slot name=\"icon\" @slotchange=${this.onIconSlotChange}></slot\n ></span>\n <span class=\"menu-item-content\" part=\"content\">\n <span class=\"menu-item-header\" part=\"header\">\n <span part=\"title\" class=\"menu-item-title\"\n >${this.title}${external ? html`<span class=\"external\">${arrowUpRightIcon(11)}</span>` : nothing}</span\n >\n ${this.badge ? html`<span part=\"badge\" class=\"menu-item-badge\">${this.badge}</span>` : nothing}\n </span>\n ${showDescription ? html`<p part=\"description\" class=\"menu-item-description\">${this.description}</p>` : nothing}\n </span>\n </a>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,UAAU,aAAa;AAsBxC,IAAM,WAAN,cAAuB,WAAW;AAAA,EAAlC;AAAA;AAkRL,iBAAQ;AAGR,gBAAO;AAGP,uBAAc;AAId,iBAAQ;AAIR,kBAAS;AAGT,mBAAU;AAIV,2BAAkB;AAIlB,kBAAS;AAMT,mBAAsC;AAItC,oBAAW;AAGF,SAAQ,UAAU;AAE3B,SAAQ,mBAAmB,CAAC,UAAuB;AACjD,WAAK,UAAW,MAAM,OAA2B,cAAc,EAAE,SAAS,KAAK,CAAC,EAAE,SAAS;AAAA,IAC7F;AAEA,SAAQ,UAAU,CAAC,UAA4B;AAC7C,YAAM,cAAc,IAAI,YAAuC,oBAAoB;AAAA,QACjF,QAAQ,EAAE,MAAM,KAAK,KAAK;AAAA,QAC1B,SAAS;AAAA,QACT,UAAU;AAAA,QACV,YAAY;AAAA,MACd,CAAC;AACD,WAAK,cAAc,WAAW;AAC9B,UAAI,YAAY,iBAAkB,OAAM,eAAe;AAAA,IACzD;AAAA;AAAA,EAEA,SAAS;AACP,UAAM,kBAAkB,CAAC,CAAC,KAAK,eAAe,KAAK;AACnD,UAAM,OAAO,KAAK,YAAY;AAC9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AAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyQtB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAjRf,SAkRX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GApRf,SAqRX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAvRf,SAwRX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA3Rf,SA4RX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GA/R/B,SAgSX;AAGA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GAlS/B,SAmSX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,SAAS,WAAW,mBAAmB,CAAC;AAAA,GAtS/C,SAuSX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA1Sf,SA2SX;AAMA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,SAAS,KAAK,CAAC;AAAA,GAhT9B,SAiTX;AAIA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,YAAY,CAAC;AAAA,GApTvC,SAqTX;AAGiB;AAAA,EAAhB,MAAM;AAAA,GAxTI,SAwTM;AAxTN,WAAN;AAAA,EADN,cAAc,cAAc;AAAA,GAChB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/menu-grid/MenuGrid.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { controlBaseStyles } from '../shared/styles';\n\n/**\n * A responsive grid of `st-menu-grid-item`s — the \"rich\" nav-menu layout (icon + title +\n * description per entry, arranged in columns), typically slotted into `st-dropdown`'s default\n * slot. A 1:1 port of `SankhyaUI`'s React `MenuGrid` (`SankhyaCMS/SankhyaUI/src/components/Menu`):\n * same markup (`.menu-grid-container` > `.menu-grid.columns-N`), gap and breakpoints (768px: 2–4\n * columns → 2; 480px: everything → 1; a 1-column grid stays 1).\n */\n@customElement('st-menu-grid')\nexport class MenuGrid extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n }\n\n .menu-grid-container {\n width: 100%;\n }\n\n .menu-grid {\n display: grid;\n gap: 12px;\n }\n\n .menu-grid.columns-1 {\n grid-template-columns: repeat(1, 1fr);\n }\n\n .menu-grid.columns-2 {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .menu-grid.columns-3 {\n grid-template-columns: repeat(3, 1fr);\n }\n\n .menu-grid.columns-4 {\n grid-template-columns: repeat(4, 1fr);\n }\n\n @media (max-width: 768px) {\n .menu-grid.columns-2,\n .menu-grid.columns-3,\n .menu-grid.columns-4 {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n @media (max-width: 480px) {\n .menu-grid.columns-1,\n .menu-grid.columns-2,\n .menu-grid.columns-3,\n .menu-grid.columns-4 {\n grid-template-columns: 1fr;\n }\n }\n `;\n\n /** Number of columns at full width (1–4, same as the source component's `columns-N` classes). */\n @property({ type: Number })\n columns = 3;\n\n /** Extra class(es) appended to the inner grid element — the source component's `gridClassName`.\n * Its outer `className` is the host element itself here: set a `class` attribute on `st-menu-grid`. */\n @property({ type: String, attribute: 'grid-class-name' })\n gridClassName = '';\n\n render() {\n const columns = Math.min(4, Math.max(1, Math.round(this.columns) || 1));\n return html`\n <div class=\"menu-grid-container\" part=\"container\">\n <div part=\"grid\" class=\"menu-grid columns-${columns} ${this.gridClassName}\">\n <slot></slot>\n </div>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,YAAY;AACtC,SAAS,eAAe,gBAAgB;AAYjC,IAAM,WAAN,cAAuB,WAAW;AAAA,EAAlC;AAAA;AAqDL,mBAAU;AAKV,yBAAgB;AAAA;AAAA,EAEhB,SAAS;AACP,UAAM,UAAU,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,OAAO,KAAK,CAAC,CAAC;AACtE,WAAO;AAAA;AAAA,oDAEyC,OAAO,IAAI,KAAK,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA,EAK/E;AACF;AAtEa,SACJ,SAAS;AAAA,MACZ,iBAAiB;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;AAmDrB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GApDf,SAqDX;AAKA;AAAA,EADC,SAAS,EAAE,MAAM,QAAQ,WAAW,kBAAkB,CAAC;AAAA,GAzD7C,SA0DX;AA1DW,WAAN;AAAA,EADN,cAAc,cAAc;AAAA,GAChB;","names":[]}
|
package/dist/chunk-VWS53WY4.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ctaLinkStyles,
|
|
3
|
-
sectionSubtitleStyles,
|
|
4
|
-
sectionTitleStyles
|
|
5
|
-
} from "./chunk-FZ36KL73.js";
|
|
6
|
-
import {
|
|
7
|
-
buttonResetStyles,
|
|
8
|
-
controlBaseStyles,
|
|
9
|
-
rootFontFamilyStyles
|
|
10
|
-
} from "./chunk-KMU6ABQF.js";
|
|
11
|
-
import {
|
|
12
|
-
__decorateClass
|
|
13
|
-
} from "./chunk-EUXUH3YW.js";
|
|
14
|
-
|
|
15
|
-
// src/promo-banner/PromoBanner.ts
|
|
16
|
-
import { LitElement, css, html, nothing } from "lit";
|
|
17
|
-
import { customElement, property } from "lit/decorators.js";
|
|
18
|
-
var PromoBanner = class extends LitElement {
|
|
19
|
-
constructor() {
|
|
20
|
-
super(...arguments);
|
|
21
|
-
this.title = "";
|
|
22
|
-
this.subtitle = "";
|
|
23
|
-
this.actionLabel = "";
|
|
24
|
-
this.href = "";
|
|
25
|
-
this.imageSrc = "";
|
|
26
|
-
this.inverted = false;
|
|
27
|
-
this.onAction = () => {
|
|
28
|
-
this.dispatchEvent(
|
|
29
|
-
new CustomEvent("action", { detail: { href: this.href }, bubbles: true, composed: true })
|
|
30
|
-
);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
willUpdate() {
|
|
34
|
-
this.style.backgroundImage = this.imageSrc ? `url(${JSON.stringify(this.imageSrc)})` : "";
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return html`
|
|
38
|
-
<div class="container" part="container">
|
|
39
|
-
<h2 class="title" part="title">${this.title}</h2>
|
|
40
|
-
${this.subtitle ? html`<p class="subtitle" part="subtitle">${this.subtitle}</p>` : nothing}
|
|
41
|
-
<slot></slot>
|
|
42
|
-
${this.actionLabel ? html`<div class="actions" part="actions">
|
|
43
|
-
<button class="cta" part="action" type="button" @click=${this.onAction}>${this.actionLabel}</button>
|
|
44
|
-
</div>` : nothing}
|
|
45
|
-
</div>
|
|
46
|
-
`;
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
PromoBanner.styles = css`
|
|
50
|
-
${controlBaseStyles}
|
|
51
|
-
|
|
52
|
-
:host {
|
|
53
|
-
display: block;
|
|
54
|
-
box-sizing: border-box;
|
|
55
|
-
width: calc(100% - 48px);
|
|
56
|
-
max-width: var(--st-cms-container-max);
|
|
57
|
-
/* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's
|
|
58
|
-
margin/padding; override with --st-promo-banner-margin/-padding instead. */
|
|
59
|
-
margin: var(--st-promo-banner-margin, var(--st-space-40) auto) !important;
|
|
60
|
-
padding: var(--st-promo-banner-padding, 100px var(--st-space-24)) !important;
|
|
61
|
-
border-radius: var(--st-space-24);
|
|
62
|
-
background-color: var(--st-color-text-strong);
|
|
63
|
-
background-size: cover;
|
|
64
|
-
background-position: center;
|
|
65
|
-
color: var(--st-color-on-solid);
|
|
66
|
-
text-align: center;
|
|
67
|
-
${rootFontFamilyStyles}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
:host([inverted]) {
|
|
71
|
-
background-color: var(--st-color-subtle);
|
|
72
|
-
color: var(--st-color-text-strong);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.container {
|
|
76
|
-
max-width: 800px;
|
|
77
|
-
margin: 0 auto;
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
align-items: center;
|
|
81
|
-
gap: var(--st-space-32);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.title {
|
|
85
|
-
${sectionTitleStyles}
|
|
86
|
-
color: inherit;
|
|
87
|
-
margin: 0;
|
|
88
|
-
letter-spacing: -0.02em;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.subtitle {
|
|
92
|
-
${sectionSubtitleStyles}
|
|
93
|
-
color: inherit;
|
|
94
|
-
opacity: 0.8;
|
|
95
|
-
margin: 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.actions {
|
|
99
|
-
margin-top: var(--st-space-16);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.cta {
|
|
103
|
-
${buttonResetStyles}
|
|
104
|
-
${ctaLinkStyles}
|
|
105
|
-
border: 1px solid currentColor;
|
|
106
|
-
color: inherit;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.cta:hover {
|
|
110
|
-
transform: scale(1.05);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@media (max-width: 768px) {
|
|
114
|
-
:host {
|
|
115
|
-
width: auto;
|
|
116
|
-
margin: var(--st-promo-banner-margin, var(--st-space-24)) !important;
|
|
117
|
-
padding: var(--st-promo-banner-padding, 60px var(--st-space-24)) !important;
|
|
118
|
-
border-radius: var(--st-radius-lg);
|
|
119
|
-
}
|
|
120
|
-
.actions,
|
|
121
|
-
.cta {
|
|
122
|
-
width: 100%;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@media (prefers-reduced-motion: reduce) {
|
|
127
|
-
.cta {
|
|
128
|
-
transition: none;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
`;
|
|
132
|
-
__decorateClass([
|
|
133
|
-
property({ type: String })
|
|
134
|
-
], PromoBanner.prototype, "title", 2);
|
|
135
|
-
__decorateClass([
|
|
136
|
-
property({ type: String })
|
|
137
|
-
], PromoBanner.prototype, "subtitle", 2);
|
|
138
|
-
__decorateClass([
|
|
139
|
-
property({ type: String, attribute: "action-label" })
|
|
140
|
-
], PromoBanner.prototype, "actionLabel", 2);
|
|
141
|
-
__decorateClass([
|
|
142
|
-
property({ type: String })
|
|
143
|
-
], PromoBanner.prototype, "href", 2);
|
|
144
|
-
__decorateClass([
|
|
145
|
-
property({ type: String, attribute: "image-src" })
|
|
146
|
-
], PromoBanner.prototype, "imageSrc", 2);
|
|
147
|
-
__decorateClass([
|
|
148
|
-
property({ type: Boolean, reflect: true })
|
|
149
|
-
], PromoBanner.prototype, "inverted", 2);
|
|
150
|
-
PromoBanner = __decorateClass([
|
|
151
|
-
customElement("st-promo-banner")
|
|
152
|
-
], PromoBanner);
|
|
153
|
-
|
|
154
|
-
export {
|
|
155
|
-
PromoBanner
|
|
156
|
-
};
|
|
157
|
-
//# sourceMappingURL=chunk-VWS53WY4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/promo-banner/PromoBanner.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { buttonResetStyles, controlBaseStyles, rootFontFamilyStyles } from '../shared/styles';\nimport { ctaLinkStyles, sectionSubtitleStyles, sectionTitleStyles } from '../shared/section-styles';\nimport type { HeroActionEventDetail } from '../hero/HeroEvents';\n\n/**\n * Rounded call-to-action banner (title, subtitle, one outlined button) on a dark panel or a\n * background image. Port of `SankhyaUI`'s React `PromoBanner`; the button fires an `action` event\n * (detail `{ href }`, empty unless set) in place of `onAction`.\n *\n * @cssprop --st-promo-banner-margin - Overrides the banner's margin.\n * @cssprop --st-promo-banner-padding - Overrides the banner's padding.\n */\n@customElement('st-promo-banner')\nexport class PromoBanner extends LitElement {\n static styles = css`\n ${controlBaseStyles}\n\n :host {\n display: block;\n box-sizing: border-box;\n width: calc(100% - 48px);\n max-width: var(--st-cms-container-max);\n /* !important: a page-level reset (e.g. Tailwind Preflight) otherwise zeroes a shadow host's\n margin/padding; override with --st-promo-banner-margin/-padding instead. */\n margin: var(--st-promo-banner-margin, var(--st-space-40) auto) !important;\n padding: var(--st-promo-banner-padding, 100px var(--st-space-24)) !important;\n border-radius: var(--st-space-24);\n background-color: var(--st-color-text-strong);\n background-size: cover;\n background-position: center;\n color: var(--st-color-on-solid);\n text-align: center;\n ${rootFontFamilyStyles}\n }\n\n :host([inverted]) {\n background-color: var(--st-color-subtle);\n color: var(--st-color-text-strong);\n }\n\n .container {\n max-width: 800px;\n margin: 0 auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: var(--st-space-32);\n }\n\n .title {\n ${sectionTitleStyles}\n color: inherit;\n margin: 0;\n letter-spacing: -0.02em;\n }\n\n .subtitle {\n ${sectionSubtitleStyles}\n color: inherit;\n opacity: 0.8;\n margin: 0;\n }\n\n .actions {\n margin-top: var(--st-space-16);\n }\n\n .cta {\n ${buttonResetStyles}\n ${ctaLinkStyles}\n border: 1px solid currentColor;\n color: inherit;\n }\n\n .cta:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: 768px) {\n :host {\n width: auto;\n margin: var(--st-promo-banner-margin, var(--st-space-24)) !important;\n padding: var(--st-promo-banner-padding, 60px var(--st-space-24)) !important;\n border-radius: var(--st-radius-lg);\n }\n .actions,\n .cta {\n width: 100%;\n }\n }\n\n @media (prefers-reduced-motion: reduce) {\n .cta {\n transition: none;\n }\n }\n `;\n\n @property({ type: String })\n title = '';\n\n @property({ type: String })\n subtitle = '';\n\n @property({ type: String, attribute: 'action-label' })\n actionLabel = '';\n\n @property({ type: String })\n href = '';\n\n @property({ type: String, attribute: 'image-src' })\n imageSrc = '';\n\n @property({ type: Boolean, reflect: true })\n inverted = false;\n\n protected willUpdate(): void {\n this.style.backgroundImage = this.imageSrc ? `url(${JSON.stringify(this.imageSrc)})` : '';\n }\n\n private onAction = (): void => {\n this.dispatchEvent(\n new CustomEvent<HeroActionEventDetail>('action', { detail: { href: this.href }, bubbles: true, composed: true })\n );\n };\n\n render() {\n return html`\n <div class=\"container\" part=\"container\">\n <h2 class=\"title\" part=\"title\">${this.title}</h2>\n ${this.subtitle ? html`<p class=\"subtitle\" part=\"subtitle\">${this.subtitle}</p>` : nothing}\n <slot></slot>\n ${this.actionLabel\n ? html`<div class=\"actions\" part=\"actions\">\n <button class=\"cta\" part=\"action\" type=\"button\" @click=${this.onAction}>${this.actionLabel}</button>\n </div>`\n : nothing}\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AAejC,IAAM,cAAN,cAA0B,WAAW;AAAA,EAArC;AAAA;AAsFL,iBAAQ;AAGR,oBAAW;AAGX,uBAAc;AAGd,gBAAO;AAGP,oBAAW;AAGX,oBAAW;AAMX,SAAQ,WAAW,MAAY;AAC7B,WAAK;AAAA,QACH,IAAI,YAAmC,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,KAAK,GAAG,SAAS,MAAM,UAAU,KAAK,CAAC;AAAA,MACjH;AAAA,IACF;AAAA;AAAA,EARU,aAAmB;AAC3B,SAAK,MAAM,kBAAkB,KAAK,WAAW,OAAO,KAAK,UAAU,KAAK,QAAQ,CAAC,MAAM;AAAA,EACzF;AAAA,EAQ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AE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GApG/B,YAqGX;AArGW,cAAN;AAAA,EADN,cAAc,iBAAiB;AAAA,GACnB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/feature-split/FeatureSplit.ts"],"sourcesContent":["import { LitElement, css, html, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport 'iconify-icon';\n\nimport { controlBaseStyles, ctaButtonStyles, fontFamilyStyles } from '../shared/styles';\nimport '../markdown';\nimport {\n cardTitleStyles,\n iconTileStyles,\n reducedMotionStyles,\n sectionTitleStyles,\n} from '../shared/section-styles';\nimport type { FeatureSplitActionEventDetail } from './FeatureSplitEvents';\n\nexport interface FeatureSplitItem {\n /** Iconify icon name, e.g. `mdi:check`. */\n icon?: string;\n title: string;\n /** Markdown. */\n description: string;\n}\n\nexport type FeatureSplitImagePosition = 'left' | 'right' | 'top';\n\n/**\n * A title/markdown-subtitle/feature-list block beside (or under) an image.\n *\n * @cssprop --st-feature-split-padding - Overrides the block's padding.\n */\n@customElement('st-feature-split')\nexport class FeatureSplit 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-feature-split-padding instead. */\n padding: var(--st-feature-split-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 display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--st-space-48);\n align-items: center;\n }\n\n :host([image-position='left']) .container {\n direction: rtl;\n }\n\n :host([image-position='left']) .content {\n direction: ltr;\n }\n\n :host([image-position='top']) .container {\n grid-template-columns: 1fr;\n text-align: center;\n }\n\n :host([image-position='top']) .content {\n align-items: center;\n }\n\n :host([image-position='top']) .image-wrapper {\n order: -1;\n max-width: 800px;\n margin: 0 auto;\n }\n\n .content {\n display: flex;\n flex-direction: column;\n gap: var(--st-space-32);\n }\n\n .title {\n ${sectionTitleStyles}\n margin: 0;\n }\n\n .subtitle {\n color: var(--st-color-text-muted);\n font-size: var(--st-text-base);\n line-height: 1.6;\n }\n\n .list {\n display: flex;\n flex-direction: column;\n gap: var(--st-space-24);\n margin-top: var(--st-space-16);\n }\n\n .item {\n display: flex;\n gap: var(--st-space-16);\n align-items: flex-start;\n text-align: left;\n }\n\n .icon {\n ${iconTileStyles}\n width: var(--st-space-48);\n height: var(--st-space-48);\n font-size: 24px;\n }\n\n .item-title {\n ${cardTitleStyles}\n }\n\n .item-description {\n color: var(--st-color-text-muted);\n font-size: var(--st-text-sm);\n line-height: 1.5;\n }\n\n .action {\n ${ctaButtonStyles}\n justify-self: start;\n padding: var(--st-space-16);\n border-radius: var(--st-radius-lg);\n }\n\n .image-wrapper {\n width: 100%;\n height: 100%;\n min-height: 400px;\n border-radius: var(--st-space-24);\n overflow: hidden;\n box-shadow: 0 20px 40px -12px var(--st-shadow-color-md);\n }\n\n .image {\n width: 100%;\n height: 100%;\n object-fit: cover;\n transition: transform 0.5s ease;\n }\n\n .image:hover {\n transform: scale(1.02);\n }\n\n :host([inverted]) .title,\n :host([inverted]) .item-title {\n color: var(--st-color-on-solid);\n }\n\n :host([inverted]) .subtitle,\n :host([inverted]) .item-description {\n color: var(--st-color-border);\n }\n\n :host([inverted]) .icon {\n background: var(--st-color-text);\n color: var(--st-color-border);\n }\n\n @media (max-width: 1024px) {\n .container {\n gap: var(--st-space-40);\n }\n }\n\n @media (max-width: 768px) {\n :host {\n padding: var(--st-feature-split-padding, var(--st-space-48) var(--st-space-24)) !important;\n }\n\n .container {\n grid-template-columns: 1fr;\n direction: ltr !important;\n }\n\n .image-wrapper {\n min-height: 300px;\n order: -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 /** Markdown. */\n @property({ type: String })\n subtitle = '';\n\n @property({ attribute: false })\n items: FeatureSplitItem[] = [];\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-position', reflect: true })\n imagePosition: FeatureSplitImagePosition = 'right';\n\n @property({ type: String, attribute: 'action-label' })\n actionLabel = '';\n\n @property({ type: String })\n href = '';\n\n private onAction() {\n const event = new CustomEvent<FeatureSplitActionEventDetail>('feature-split-action', {\n detail: { href: this.href },\n bubbles: true,\n composed: true,\n cancelable: true,\n });\n if (this.dispatchEvent(event)) window.location.href = this.href;\n }\n\n render() {\n return html`\n <div class=\"container\" part=\"container\">\n <div class=\"content\" part=\"content\">\n <h2 class=\"title\" part=\"title\">${this.title}</h2>\n ${this.subtitle\n ? html`<div class=\"subtitle\" part=\"subtitle\"><st-markdown .content=${this.subtitle}></st-markdown></div>`\n : nothing}\n ${this.items.length > 0\n ? html`<div class=\"list\" part=\"list\">\n ${this.items.map(\n (item) => html`\n <div class=\"item\" part=\"item\">\n ${item.icon\n ? html`<div class=\"icon\" part=\"icon\"><iconify-icon icon=${item.icon}></iconify-icon></div>`\n : nothing}\n <div>\n <h3 class=\"item-title\" part=\"item-title\">${item.title}</h3>\n <div class=\"item-description\" part=\"item-description\">\n <st-markdown .content=${item.description}></st-markdown>\n </div>\n </div>\n </div>\n `,\n )}\n </div>`\n : nothing}\n ${this.actionLabel && this.href\n ? html`<button class=\"action\" part=\"action\" type=\"button\" @click=${this.onAction}>${this.actionLabel}</button>`\n : nothing}\n </div>\n <div class=\"image-wrapper\" part=\"image-wrapper\">\n <img class=\"image\" part=\"image\" src=${this.imageSrc} alt=${this.imageAlt || this.title} />\n </div>\n </div>\n `;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,SAAS,YAAY,KAAK,MAAM,eAAe;AAC/C,SAAS,eAAe,gBAAgB;AACxC,OAAO;AA4BA,IAA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