@salesmind-ai/design-system 0.2.1 → 0.3.1
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/README.md +32 -2
- package/dist/AppearancePanel-UT57J69V.d.cts +51 -0
- package/dist/AppearancePanel-UT57J69V.d.ts +51 -0
- package/dist/AppearanceProvider-C36a8-eb.d.cts +45 -0
- package/dist/AppearanceProvider-C36a8-eb.d.ts +45 -0
- package/dist/Breadcrumb-RX-B_gDV.d.cts +44 -0
- package/dist/Breadcrumb-RX-B_gDV.d.ts +44 -0
- package/dist/ExportMenu-A2TLFiVv.d.cts +311 -0
- package/dist/ExportMenu-C8qck5AT.d.ts +311 -0
- package/dist/SectionShell-BfBw5q0Y.d.cts +18 -0
- package/dist/SectionShell-BfBw5q0Y.d.ts +18 -0
- package/dist/Select-BdZmK0Lt.d.cts +66 -0
- package/dist/Select-BdZmK0Lt.d.ts +66 -0
- package/dist/admin/index.cjs +2941 -0
- package/dist/admin/index.cjs.map +1 -0
- package/dist/admin/index.css +4145 -0
- package/dist/admin/index.css.map +1 -0
- package/dist/admin/index.d.cts +491 -0
- package/dist/admin/index.d.ts +491 -0
- package/dist/admin/index.js +2918 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/{audit-CiyPkxk1.d.cts → audit-BS2fn7M4.d.ts} +2 -51
- package/dist/{audit-CiyPkxk1.d.ts → audit-DwCmg32J.d.cts} +2 -51
- package/dist/blog/index.cjs +1074 -0
- package/dist/blog/index.cjs.map +1 -0
- package/dist/blog/index.css +1422 -0
- package/dist/blog/index.css.map +1 -0
- package/dist/blog/index.d.cts +233 -0
- package/dist/blog/index.d.ts +233 -0
- package/dist/blog/index.js +1056 -0
- package/dist/blog/index.js.map +1 -0
- package/dist/chart-types-BGVVO-zl.d.cts +208 -0
- package/dist/chart-types-BGVVO-zl.d.ts +208 -0
- package/dist/charts/index.cjs +2698 -0
- package/dist/charts/index.cjs.map +1 -0
- package/dist/charts/index.css +1167 -0
- package/dist/charts/index.css.map +1 -0
- package/dist/charts/index.d.cts +453 -0
- package/dist/charts/index.d.ts +453 -0
- package/dist/charts/index.js +2682 -0
- package/dist/charts/index.js.map +1 -0
- package/dist/core/index.cjs +526 -395
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.css +294 -0
- package/dist/core/index.css.map +1 -1
- package/dist/core/index.d.cts +7 -982
- package/dist/core/index.d.ts +7 -982
- package/dist/core/index.js +476 -351
- package/dist/core/index.js.map +1 -1
- package/dist/i18n/index.cjs +585 -0
- package/dist/i18n/index.cjs.map +1 -0
- package/dist/i18n/index.d.cts +855 -0
- package/dist/i18n/index.d.ts +855 -0
- package/dist/i18n/index.js +547 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +11 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +22 -1290
- package/dist/index.d.ts +22 -1290
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/marketing/index.cjs +2144 -3023
- package/dist/marketing/index.cjs.map +1 -1
- package/dist/marketing/index.css +3729 -4824
- package/dist/marketing/index.css.map +1 -1
- package/dist/marketing/index.d.cts +1351 -4
- package/dist/marketing/index.d.ts +1351 -4
- package/dist/marketing/index.js +2190 -3054
- package/dist/marketing/index.js.map +1 -1
- package/dist/motion/index.cjs +1230 -0
- package/dist/motion/index.cjs.map +1 -0
- package/dist/motion/index.css +699 -0
- package/dist/motion/index.css.map +1 -0
- package/dist/motion/index.d.cts +68 -0
- package/dist/motion/index.d.ts +68 -0
- package/dist/motion/index.js +1218 -0
- package/dist/motion/index.js.map +1 -0
- package/dist/nav/index.cjs +1533 -0
- package/dist/nav/index.cjs.map +1 -0
- package/dist/nav/index.css +1984 -0
- package/dist/nav/index.css.map +1 -0
- package/dist/nav/index.d.cts +279 -0
- package/dist/nav/index.d.ts +279 -0
- package/dist/nav/index.js +1501 -0
- package/dist/nav/index.js.map +1 -0
- package/dist/report/index.cjs +26 -1649
- package/dist/report/index.cjs.map +1 -1
- package/dist/report/index.css +0 -963
- package/dist/report/index.css.map +1 -1
- package/dist/report/index.d.cts +4 -2
- package/dist/report/index.d.ts +4 -2
- package/dist/report/index.js +27 -1640
- package/dist/report/index.js.map +1 -1
- package/dist/sections/index.cjs +385 -0
- package/dist/sections/index.cjs.map +1 -0
- package/dist/sections/index.css +815 -0
- package/dist/sections/index.css.map +1 -0
- package/dist/sections/index.d.cts +69 -0
- package/dist/sections/index.d.ts +69 -0
- package/dist/sections/index.js +374 -0
- package/dist/sections/index.js.map +1 -0
- package/dist/social-proof/index.cjs +1255 -0
- package/dist/social-proof/index.cjs.map +1 -0
- package/dist/social-proof/index.css +1423 -0
- package/dist/social-proof/index.css.map +1 -0
- package/dist/social-proof/index.d.cts +258 -0
- package/dist/social-proof/index.d.ts +258 -0
- package/dist/social-proof/index.js +1238 -0
- package/dist/social-proof/index.js.map +1 -0
- package/dist/theme/index.cjs +573 -0
- package/dist/theme/index.cjs.map +1 -0
- package/dist/theme/index.css +464 -0
- package/dist/theme/index.css.map +1 -0
- package/dist/theme/index.d.cts +48 -0
- package/dist/theme/index.d.ts +48 -0
- package/dist/theme/index.js +558 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/types-DAlgDGzw.d.cts +52 -0
- package/dist/types-DAlgDGzw.d.ts +52 -0
- package/dist/web/client/index.cjs +501 -0
- package/dist/web/client/index.cjs.map +1 -0
- package/dist/web/client/index.css +456 -0
- package/dist/web/client/index.css.map +1 -0
- package/dist/web/client/index.d.cts +172 -0
- package/dist/web/client/index.d.ts +172 -0
- package/dist/web/client/index.js +486 -0
- package/dist/web/client/index.js.map +1 -0
- package/dist/web/index.d.cts +6 -893
- package/dist/web/index.d.ts +6 -893
- package/dist/web/server/index.cjs +569 -0
- package/dist/web/server/index.cjs.map +1 -0
- package/dist/web/server/index.d.cts +725 -0
- package/dist/web/server/index.d.ts +725 -0
- package/dist/web/server/index.js +562 -0
- package/dist/web/server/index.js.map +1 -0
- package/package.json +81 -9
- package/dist/ExportMenu-hEe5MhLq.d.cts +0 -1027
- package/dist/ExportMenu-hEe5MhLq.d.ts +0 -1027
- package/dist/index-B64suAAc.d.cts +0 -1498
- package/dist/index-B64suAAc.d.ts +0 -1498
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
/* src/components/Button/Button.css */
|
|
2
|
+
.ds-button {
|
|
3
|
+
position: relative;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
gap: var(--space-2);
|
|
8
|
+
border: none;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
font-family: var(--font-family);
|
|
11
|
+
font-weight: var(--font-weight-medium);
|
|
12
|
+
border-radius: var(--radius-button);
|
|
13
|
+
color: var(--text-primary);
|
|
14
|
+
outline: none;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
hyphens: none;
|
|
17
|
+
word-break: normal;
|
|
18
|
+
overflow-wrap: normal;
|
|
19
|
+
backdrop-filter: blur(12px) saturate(140%);
|
|
20
|
+
-webkit-backdrop-filter: blur(12px) saturate(140%);
|
|
21
|
+
transition:
|
|
22
|
+
background var(--transition-glass),
|
|
23
|
+
box-shadow var(--transition-glass),
|
|
24
|
+
transform var(--transition-glass);
|
|
25
|
+
}
|
|
26
|
+
.ds-button::before {
|
|
27
|
+
content: "";
|
|
28
|
+
position: absolute;
|
|
29
|
+
inset: 0;
|
|
30
|
+
border-radius: inherit;
|
|
31
|
+
padding: var(--space-px);
|
|
32
|
+
background:
|
|
33
|
+
linear-gradient(
|
|
34
|
+
180deg,
|
|
35
|
+
var(--rim-light-top) 0%,
|
|
36
|
+
var(--rim-light-bottom) 100%);
|
|
37
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
38
|
+
mask-composite: exclude;
|
|
39
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
40
|
+
-webkit-mask-composite: xor;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
transition: background var(--transition-glass);
|
|
43
|
+
}
|
|
44
|
+
.ds-button:focus-visible {
|
|
45
|
+
box-shadow: var(--focus-ring);
|
|
46
|
+
}
|
|
47
|
+
.ds-button:disabled {
|
|
48
|
+
opacity: 0.4;
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
transform: none !important;
|
|
51
|
+
}
|
|
52
|
+
.ds-button--primary {
|
|
53
|
+
background: var(--btn-primary-bg);
|
|
54
|
+
color: var(--btn-primary-text, #ffffff);
|
|
55
|
+
box-shadow:
|
|
56
|
+
var(--shadow-interactive-rest),
|
|
57
|
+
var(--glass-shadow-inner),
|
|
58
|
+
var(--btn-primary-glow);
|
|
59
|
+
backdrop-filter: none;
|
|
60
|
+
-webkit-backdrop-filter: none;
|
|
61
|
+
}
|
|
62
|
+
.ds-button--primary::before {
|
|
63
|
+
background:
|
|
64
|
+
linear-gradient(
|
|
65
|
+
180deg,
|
|
66
|
+
var(--glass-highlight-strong) 0%,
|
|
67
|
+
rgba(var(--brand-pink-rgb), 0.2) 100%);
|
|
68
|
+
}
|
|
69
|
+
.ds-button--primary:hover:not(:disabled) {
|
|
70
|
+
background: var(--btn-primary-bg-hover);
|
|
71
|
+
box-shadow:
|
|
72
|
+
var(--shadow-interactive-hover),
|
|
73
|
+
var(--glass-shadow-inner),
|
|
74
|
+
var(--btn-primary-glow-hover);
|
|
75
|
+
transform: translateY(-1px);
|
|
76
|
+
}
|
|
77
|
+
.ds-button--primary:hover:not(:disabled)::before {
|
|
78
|
+
background:
|
|
79
|
+
linear-gradient(
|
|
80
|
+
180deg,
|
|
81
|
+
var(--glass-highlight-bright) 0%,
|
|
82
|
+
rgba(var(--brand-pink-rgb), 0.25) 100%);
|
|
83
|
+
}
|
|
84
|
+
.ds-button--primary:active:not(:disabled) {
|
|
85
|
+
transform: translateY(0);
|
|
86
|
+
box-shadow:
|
|
87
|
+
var(--shadow-interactive-active),
|
|
88
|
+
var(--glass-shadow-inner),
|
|
89
|
+
var(--btn-primary-glow);
|
|
90
|
+
}
|
|
91
|
+
.ds-button--secondary {
|
|
92
|
+
background: var(--btn-secondary-bg);
|
|
93
|
+
box-shadow: var(--shadow-interactive-rest-subtle), var(--glass-shadow-inner);
|
|
94
|
+
}
|
|
95
|
+
.ds-button--secondary:hover:not(:disabled) {
|
|
96
|
+
background: var(--btn-secondary-bg-hover);
|
|
97
|
+
box-shadow: var(--shadow-interactive-hover-subtle), var(--glass-shadow-inner);
|
|
98
|
+
transform: translateY(-1px);
|
|
99
|
+
}
|
|
100
|
+
.ds-button--secondary:hover:not(:disabled)::before {
|
|
101
|
+
background:
|
|
102
|
+
linear-gradient(
|
|
103
|
+
180deg,
|
|
104
|
+
var(--rim-light-hover-top) 0%,
|
|
105
|
+
var(--rim-light-hover-bottom) 100%);
|
|
106
|
+
}
|
|
107
|
+
.ds-button--secondary:active:not(:disabled) {
|
|
108
|
+
transform: translateY(0);
|
|
109
|
+
background: var(--glass-base-active);
|
|
110
|
+
}
|
|
111
|
+
.ds-button--outline {
|
|
112
|
+
background: transparent;
|
|
113
|
+
box-shadow: none;
|
|
114
|
+
backdrop-filter: none;
|
|
115
|
+
-webkit-backdrop-filter: none;
|
|
116
|
+
color: var(--text-secondary);
|
|
117
|
+
transition:
|
|
118
|
+
background var(--transition-glass),
|
|
119
|
+
color var(--transition-glass),
|
|
120
|
+
box-shadow var(--transition-glass),
|
|
121
|
+
transform var(--transition-glass);
|
|
122
|
+
}
|
|
123
|
+
.ds-button--outline::before {
|
|
124
|
+
background:
|
|
125
|
+
linear-gradient(
|
|
126
|
+
180deg,
|
|
127
|
+
var(--outline-rim-top) 0%,
|
|
128
|
+
var(--outline-rim-bottom) 100%);
|
|
129
|
+
}
|
|
130
|
+
.ds-button--outline:hover:not(:disabled) {
|
|
131
|
+
background: rgba(var(--brand-pink-rgb), 0.05);
|
|
132
|
+
color: var(--text-primary);
|
|
133
|
+
backdrop-filter: blur(12px) saturate(140%);
|
|
134
|
+
-webkit-backdrop-filter: blur(12px) saturate(140%);
|
|
135
|
+
box-shadow:
|
|
136
|
+
var(--shadow-interactive-rest-light),
|
|
137
|
+
var(--glass-shadow-inner),
|
|
138
|
+
0 0 16px rgba(var(--brand-pink-rgb), 0.1);
|
|
139
|
+
transform: translateY(-1px);
|
|
140
|
+
}
|
|
141
|
+
.ds-button--outline:hover:not(:disabled)::before {
|
|
142
|
+
background:
|
|
143
|
+
linear-gradient(
|
|
144
|
+
180deg,
|
|
145
|
+
rgba(var(--brand-pink-rgb), 0.3) 0%,
|
|
146
|
+
rgba(var(--brand-pink-rgb), 0.1) 100%);
|
|
147
|
+
}
|
|
148
|
+
.ds-button--outline:active:not(:disabled) {
|
|
149
|
+
transform: translateY(0);
|
|
150
|
+
background: rgba(var(--brand-pink-rgb), 0.1);
|
|
151
|
+
}
|
|
152
|
+
.ds-button--ghost {
|
|
153
|
+
background: transparent;
|
|
154
|
+
box-shadow: none;
|
|
155
|
+
backdrop-filter: none;
|
|
156
|
+
-webkit-backdrop-filter: none;
|
|
157
|
+
color: var(--text-secondary);
|
|
158
|
+
}
|
|
159
|
+
.ds-button--ghost::before {
|
|
160
|
+
display: none;
|
|
161
|
+
}
|
|
162
|
+
.ds-button--ghost:hover:not(:disabled) {
|
|
163
|
+
background: var(--interactive-hover-bg);
|
|
164
|
+
color: var(--text-primary);
|
|
165
|
+
}
|
|
166
|
+
.ds-button--ghost:active:not(:disabled) {
|
|
167
|
+
background: var(--interactive-active-bg);
|
|
168
|
+
}
|
|
169
|
+
.ds-button--link {
|
|
170
|
+
background: transparent;
|
|
171
|
+
box-shadow: none;
|
|
172
|
+
backdrop-filter: none;
|
|
173
|
+
-webkit-backdrop-filter: none;
|
|
174
|
+
color: var(--brand-pink);
|
|
175
|
+
text-underline-offset: 4px;
|
|
176
|
+
height: auto;
|
|
177
|
+
padding: 0;
|
|
178
|
+
}
|
|
179
|
+
.ds-button--link::before {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
.ds-button--link:hover:not(:disabled) {
|
|
183
|
+
text-decoration: underline;
|
|
184
|
+
}
|
|
185
|
+
.ds-button--link:active:not(:disabled) {
|
|
186
|
+
opacity: 0.8;
|
|
187
|
+
}
|
|
188
|
+
.ds-button--destructive {
|
|
189
|
+
background: var(--btn-destructive-bg, rgba(var(--status-error-rgb, 239, 68, 68), 0.6));
|
|
190
|
+
color: var(--btn-destructive-text, #ffffff);
|
|
191
|
+
box-shadow:
|
|
192
|
+
var(--shadow-interactive-rest),
|
|
193
|
+
var(--glass-shadow-inner),
|
|
194
|
+
0 0 20px rgba(var(--status-error-rgb, 239, 68, 68), 0.15);
|
|
195
|
+
backdrop-filter: none;
|
|
196
|
+
-webkit-backdrop-filter: none;
|
|
197
|
+
}
|
|
198
|
+
.ds-button--destructive::before {
|
|
199
|
+
background:
|
|
200
|
+
linear-gradient(
|
|
201
|
+
180deg,
|
|
202
|
+
var(--glass-highlight-medium) 0%,
|
|
203
|
+
rgba(var(--status-error-rgb, 239, 68, 68), 0.15) 100%);
|
|
204
|
+
}
|
|
205
|
+
.ds-button--destructive:hover:not(:disabled) {
|
|
206
|
+
background: var(--btn-destructive-bg-hover, rgba(var(--status-error-rgb, 239, 68, 68), 0.75));
|
|
207
|
+
box-shadow:
|
|
208
|
+
var(--shadow-interactive-hover),
|
|
209
|
+
var(--glass-shadow-inner),
|
|
210
|
+
0 0 24px rgba(var(--status-error-rgb, 239, 68, 68), 0.25);
|
|
211
|
+
transform: translateY(-1px);
|
|
212
|
+
}
|
|
213
|
+
.ds-button--destructive:hover:not(:disabled)::before {
|
|
214
|
+
background:
|
|
215
|
+
linear-gradient(
|
|
216
|
+
180deg,
|
|
217
|
+
var(--glass-highlight-strong) 0%,
|
|
218
|
+
rgba(var(--status-error-rgb, 239, 68, 68), 0.2) 100%);
|
|
219
|
+
}
|
|
220
|
+
.ds-button--destructive:active:not(:disabled) {
|
|
221
|
+
transform: translateY(0);
|
|
222
|
+
background: var(--btn-destructive-bg-active, rgba(var(--status-error-rgb, 239, 68, 68), 0.85));
|
|
223
|
+
}
|
|
224
|
+
.ds-button--sm {
|
|
225
|
+
font-size: var(--font-size-sm);
|
|
226
|
+
padding: var(--space-2) var(--space-4);
|
|
227
|
+
height: 2rem;
|
|
228
|
+
}
|
|
229
|
+
.ds-button--md {
|
|
230
|
+
font-size: var(--font-size-base);
|
|
231
|
+
padding: var(--space-2) var(--space-5);
|
|
232
|
+
height: 2.5rem;
|
|
233
|
+
}
|
|
234
|
+
.ds-button--lg {
|
|
235
|
+
font-size: var(--font-size-lg);
|
|
236
|
+
padding: var(--space-3) var(--space-6);
|
|
237
|
+
height: 3rem;
|
|
238
|
+
}
|
|
239
|
+
.ds-button--icon {
|
|
240
|
+
padding: 0;
|
|
241
|
+
aspect-ratio: 1;
|
|
242
|
+
}
|
|
243
|
+
.ds-button--icon.ds-button--sm {
|
|
244
|
+
width: 2rem;
|
|
245
|
+
}
|
|
246
|
+
.ds-button--icon.ds-button--md {
|
|
247
|
+
width: 2.5rem;
|
|
248
|
+
}
|
|
249
|
+
.ds-button--icon.ds-button--lg {
|
|
250
|
+
width: 3rem;
|
|
251
|
+
}
|
|
252
|
+
@media (prefers-contrast: more) {
|
|
253
|
+
.ds-button {
|
|
254
|
+
border: 1px solid var(--hc-border);
|
|
255
|
+
}
|
|
256
|
+
.ds-button::before {
|
|
257
|
+
display: none;
|
|
258
|
+
}
|
|
259
|
+
.ds-button--primary {
|
|
260
|
+
background: rgba(var(--brand-pink-rgb), 0.8);
|
|
261
|
+
}
|
|
262
|
+
.ds-button--secondary {
|
|
263
|
+
background: var(--hc-surface-subtle);
|
|
264
|
+
}
|
|
265
|
+
.ds-button--ghost {
|
|
266
|
+
border-color: transparent;
|
|
267
|
+
}
|
|
268
|
+
.ds-button--ghost:hover:not(:disabled) {
|
|
269
|
+
border-color: var(--hc-border-subtle);
|
|
270
|
+
}
|
|
271
|
+
.ds-button--link {
|
|
272
|
+
border: none;
|
|
273
|
+
text-decoration: underline;
|
|
274
|
+
}
|
|
275
|
+
.ds-button--destructive {
|
|
276
|
+
background: rgba(var(--status-error-rgb, 239, 68, 68), 0.85);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
@supports not (backdrop-filter: blur(1px)) {
|
|
280
|
+
.ds-button--primary {
|
|
281
|
+
background: rgba(var(--brand-pink-rgb), 0.85);
|
|
282
|
+
}
|
|
283
|
+
.ds-button--secondary {
|
|
284
|
+
background: var(--fallback-surface);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
:root[data-theme=light] .ds-button--primary::before,
|
|
288
|
+
:root[data-theme=light-contrast] .ds-button--primary::before {
|
|
289
|
+
background:
|
|
290
|
+
linear-gradient(
|
|
291
|
+
180deg,
|
|
292
|
+
var(--glass-highlight-light) 0%,
|
|
293
|
+
rgba(var(--brand-pink-rgb), 0.08) 100%);
|
|
294
|
+
}
|
|
295
|
+
:root[data-theme=light] .ds-button--primary:hover:not(:disabled)::before,
|
|
296
|
+
:root[data-theme=light-contrast] .ds-button--primary:hover:not(:disabled)::before {
|
|
297
|
+
background:
|
|
298
|
+
linear-gradient(
|
|
299
|
+
180deg,
|
|
300
|
+
var(--glass-highlight-medium) 0%,
|
|
301
|
+
rgba(var(--brand-pink-rgb), 0.1) 100%);
|
|
302
|
+
}
|
|
303
|
+
:root[data-theme=light] .ds-button--destructive::before,
|
|
304
|
+
:root[data-theme=light-contrast] .ds-button--destructive::before {
|
|
305
|
+
background:
|
|
306
|
+
linear-gradient(
|
|
307
|
+
180deg,
|
|
308
|
+
var(--glass-highlight-light) 0%,
|
|
309
|
+
rgba(var(--status-error-rgb, 239, 68, 68), 0.06) 100%);
|
|
310
|
+
}
|
|
311
|
+
:root[data-theme=light] .ds-button--destructive:hover:not(:disabled)::before,
|
|
312
|
+
:root[data-theme=light-contrast] .ds-button--destructive:hover:not(:disabled)::before {
|
|
313
|
+
background:
|
|
314
|
+
linear-gradient(
|
|
315
|
+
180deg,
|
|
316
|
+
var(--glass-highlight-light) 0%,
|
|
317
|
+
rgba(var(--status-error-rgb, 239, 68, 68), 0.08) 100%);
|
|
318
|
+
}
|
|
319
|
+
.ds-button--loading {
|
|
320
|
+
position: relative;
|
|
321
|
+
cursor: not-allowed;
|
|
322
|
+
opacity: 0.8;
|
|
323
|
+
}
|
|
324
|
+
.ds-button__spinner {
|
|
325
|
+
position: absolute;
|
|
326
|
+
top: 50%;
|
|
327
|
+
left: 50%;
|
|
328
|
+
transform: translate(-50%, -50%);
|
|
329
|
+
animation: ds-button-spin 1s linear infinite;
|
|
330
|
+
}
|
|
331
|
+
.ds-button__content {
|
|
332
|
+
display: inline-flex;
|
|
333
|
+
align-items: center;
|
|
334
|
+
justify-content: center;
|
|
335
|
+
gap: inherit;
|
|
336
|
+
visibility: visible;
|
|
337
|
+
}
|
|
338
|
+
.ds-button__content--hidden {
|
|
339
|
+
visibility: hidden;
|
|
340
|
+
}
|
|
341
|
+
@keyframes ds-button-spin {
|
|
342
|
+
from {
|
|
343
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
|
344
|
+
}
|
|
345
|
+
to {
|
|
346
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* src/web/CookieConsent/CookieConsent.css */
|
|
351
|
+
.ds-cookie-consent {
|
|
352
|
+
position: fixed;
|
|
353
|
+
bottom: var(--spacing-4, 1rem);
|
|
354
|
+
left: var(--spacing-4, 1rem);
|
|
355
|
+
right: var(--spacing-4, 1rem);
|
|
356
|
+
z-index: 50;
|
|
357
|
+
margin-inline: auto;
|
|
358
|
+
max-width: 56rem;
|
|
359
|
+
opacity: 0;
|
|
360
|
+
transform: translateY(100px);
|
|
361
|
+
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
362
|
+
}
|
|
363
|
+
.ds-cookie-consent[data-state=open] {
|
|
364
|
+
opacity: 1;
|
|
365
|
+
transform: translateY(0);
|
|
366
|
+
}
|
|
367
|
+
.ds-cookie-consent[data-state=closed] {
|
|
368
|
+
opacity: 0;
|
|
369
|
+
transform: translateY(100px);
|
|
370
|
+
pointer-events: none;
|
|
371
|
+
}
|
|
372
|
+
.ds-cookie-consent__inner {
|
|
373
|
+
position: relative;
|
|
374
|
+
display: flex;
|
|
375
|
+
flex-direction: column;
|
|
376
|
+
align-items: flex-start;
|
|
377
|
+
gap: var(--spacing-4, 1rem);
|
|
378
|
+
border-radius: var(--radius-xl, 0.75rem);
|
|
379
|
+
border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));
|
|
380
|
+
background: var(--bg-surface, rgba(10, 10, 10, 0.95));
|
|
381
|
+
padding: var(--spacing-6, 1.5rem);
|
|
382
|
+
box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));
|
|
383
|
+
backdrop-filter: blur(24px);
|
|
384
|
+
}
|
|
385
|
+
@media (min-width: 768px) {
|
|
386
|
+
.ds-cookie-consent__inner {
|
|
387
|
+
flex-direction: row;
|
|
388
|
+
align-items: center;
|
|
389
|
+
justify-content: space-between;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
.ds-cookie-consent__content {
|
|
393
|
+
display: flex;
|
|
394
|
+
flex-direction: column;
|
|
395
|
+
gap: var(--spacing-1, 0.25rem);
|
|
396
|
+
}
|
|
397
|
+
.ds-cookie-consent__title {
|
|
398
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
399
|
+
font-weight: 600;
|
|
400
|
+
color: var(--text-primary, #fff);
|
|
401
|
+
margin: 0;
|
|
402
|
+
}
|
|
403
|
+
.ds-cookie-consent__description {
|
|
404
|
+
font-size: var(--font-size-sm, 0.875rem);
|
|
405
|
+
color: var(--text-secondary, rgba(255, 255, 255, 0.5));
|
|
406
|
+
margin: 0;
|
|
407
|
+
}
|
|
408
|
+
.ds-cookie-consent__link {
|
|
409
|
+
margin-left: var(--spacing-1, 0.25rem);
|
|
410
|
+
color: var(--brand-primary, #ff005a);
|
|
411
|
+
text-decoration: none;
|
|
412
|
+
}
|
|
413
|
+
.ds-cookie-consent__link:hover {
|
|
414
|
+
text-decoration: underline;
|
|
415
|
+
}
|
|
416
|
+
.ds-cookie-consent__actions {
|
|
417
|
+
display: flex;
|
|
418
|
+
flex-direction: column;
|
|
419
|
+
gap: var(--spacing-2, 0.5rem);
|
|
420
|
+
width: 100%;
|
|
421
|
+
}
|
|
422
|
+
@media (min-width: 768px) {
|
|
423
|
+
.ds-cookie-consent__actions {
|
|
424
|
+
flex-direction: row;
|
|
425
|
+
width: auto;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
.ds-cookie-consent__close {
|
|
429
|
+
position: absolute;
|
|
430
|
+
top: var(--spacing-2, 0.5rem);
|
|
431
|
+
right: var(--spacing-2, 0.5rem);
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: center;
|
|
434
|
+
justify-content: center;
|
|
435
|
+
background: none;
|
|
436
|
+
border: none;
|
|
437
|
+
color: var(--text-muted, rgba(255, 255, 255, 0.3));
|
|
438
|
+
cursor: pointer;
|
|
439
|
+
padding: var(--spacing-1, 0.25rem);
|
|
440
|
+
border-radius: var(--radius-sm, 0.25rem);
|
|
441
|
+
transition: color 0.15s;
|
|
442
|
+
}
|
|
443
|
+
.ds-cookie-consent__close:hover {
|
|
444
|
+
color: var(--text-primary, #fff);
|
|
445
|
+
}
|
|
446
|
+
@media (min-width: 768px) {
|
|
447
|
+
.ds-cookie-consent__close {
|
|
448
|
+
display: none;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
@media (prefers-reduced-motion: reduce) {
|
|
452
|
+
.ds-cookie-consent {
|
|
453
|
+
transition: none;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Button/Button.css","../../../src/web/CookieConsent/CookieConsent.css"],"sourcesContent":["/* ============================================================================\n BUTTON — SIGNATURE GLASS TREATMENT\n ============================================================================ */\n\n.ds-button {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--space-2);\n border: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-weight: var(--font-weight-medium);\n border-radius: var(--radius-button);\n color: var(--text-primary);\n outline: none;\n white-space: nowrap;\n hyphens: none;\n word-break: normal;\n overflow-wrap: normal;\n\n /* Base glass optical treatment */\n backdrop-filter: blur(12px) saturate(140%);\n -webkit-backdrop-filter: blur(12px) saturate(140%);\n\n /* Smooth Z-interaction transitions */\n transition:\n background var(--transition-glass),\n box-shadow var(--transition-glass),\n transform var(--transition-glass);\n}\n\n/* Rim light via pseudo-element */\n.ds-button::before {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n padding: var(--space-px);\n background: linear-gradient(180deg, var(--rim-light-top) 0%, var(--rim-light-bottom) 100%);\n mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n mask-composite: exclude;\n -webkit-mask:\n linear-gradient(#fff 0 0) content-box,\n linear-gradient(#fff 0 0);\n -webkit-mask-composite: xor;\n pointer-events: none;\n transition: background var(--transition-glass);\n}\n\n/* Focus state */\n.ds-button:focus-visible {\n box-shadow: var(--focus-ring);\n}\n\n/* Disabled state */\n.ds-button:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n transform: none !important;\n}\n\n/* ==========================================================================\n Primary Variant — Brand Pink @ 60% opacity + glow\n ========================================================================== */\n\n.ds-button--primary {\n background: var(--btn-primary-bg);\n color: var(--btn-primary-text, #ffffff);\n box-shadow: var(--shadow-interactive-rest), var(--glass-shadow-inner), var(--btn-primary-glow);\n\n /* Primary is a solid accent button — disable glass bleed-through\n to prevent dark backgrounds showing through when nested inside\n glass cards or other backdrop-filter containers */\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n}\n\n.ds-button--primary::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-strong) 0%,\n rgba(var(--brand-pink-rgb), 0.2) 100%\n );\n}\n\n.ds-button--primary:hover:not(:disabled) {\n background: var(--btn-primary-bg-hover);\n box-shadow:\n var(--shadow-interactive-hover), var(--glass-shadow-inner), var(--btn-primary-glow-hover);\n transform: translateY(-1px);\n}\n\n.ds-button--primary:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-bright) 0%,\n rgba(var(--brand-pink-rgb), 0.25) 100%\n );\n}\n\n.ds-button--primary:active:not(:disabled) {\n transform: translateY(0);\n box-shadow: var(--shadow-interactive-active), var(--glass-shadow-inner), var(--btn-primary-glow);\n}\n\n/* ==========================================================================\n Secondary Variant — White @ 5% opacity + glass rim\n ========================================================================== */\n\n.ds-button--secondary {\n background: var(--btn-secondary-bg);\n box-shadow: var(--shadow-interactive-rest-subtle), var(--glass-shadow-inner);\n}\n\n.ds-button--secondary:hover:not(:disabled) {\n background: var(--btn-secondary-bg-hover);\n box-shadow: var(--shadow-interactive-hover-subtle), var(--glass-shadow-inner);\n transform: translateY(-1px);\n}\n\n.ds-button--secondary:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n var(--rim-light-hover-top) 0%,\n var(--rim-light-hover-bottom) 100%\n );\n}\n\n.ds-button--secondary:active:not(:disabled) {\n transform: translateY(0);\n background: var(--glass-base-active);\n}\n\n/* ==========================================================================\n Outline/Ghost Variant — Minimal glass, strong rim\n ========================================================================== */\n\n.ds-button--outline {\n background: transparent;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n color: var(--text-secondary);\n transition:\n background var(--transition-glass),\n color var(--transition-glass),\n box-shadow var(--transition-glass),\n transform var(--transition-glass);\n}\n\n.ds-button--outline::before {\n background: linear-gradient(180deg, var(--outline-rim-top) 0%, var(--outline-rim-bottom) 100%);\n}\n\n.ds-button--outline:hover:not(:disabled) {\n background: rgba(var(--brand-pink-rgb), 0.05);\n color: var(--text-primary);\n backdrop-filter: blur(12px) saturate(140%);\n -webkit-backdrop-filter: blur(12px) saturate(140%);\n box-shadow:\n var(--shadow-interactive-rest-light),\n var(--glass-shadow-inner),\n 0 0 16px rgba(var(--brand-pink-rgb), 0.1);\n transform: translateY(-1px);\n}\n\n.ds-button--outline:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n rgba(var(--brand-pink-rgb), 0.3) 0%,\n rgba(var(--brand-pink-rgb), 0.1) 100%\n );\n}\n\n.ds-button--outline:active:not(:disabled) {\n transform: translateY(0);\n background: rgba(var(--brand-pink-rgb), 0.1);\n}\n\n/* ==========================================================================\n Ghost Variant — No background, no rim, hover reveals subtle glass\n ========================================================================== */\n\n.ds-button--ghost {\n background: transparent;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n color: var(--text-secondary);\n}\n\n.ds-button--ghost::before {\n display: none;\n}\n\n.ds-button--ghost:hover:not(:disabled) {\n background: var(--interactive-hover-bg);\n color: var(--text-primary);\n}\n\n.ds-button--ghost:active:not(:disabled) {\n background: var(--interactive-active-bg);\n}\n\n/* ==========================================================================\n Link Variant — Text only, underline on hover\n ========================================================================== */\n\n.ds-button--link {\n background: transparent;\n box-shadow: none;\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n color: var(--brand-pink);\n text-underline-offset: 4px;\n height: auto;\n padding: 0;\n}\n\n.ds-button--link::before {\n display: none;\n}\n\n.ds-button--link:hover:not(:disabled) {\n text-decoration: underline;\n}\n\n.ds-button--link:active:not(:disabled) {\n opacity: 0.8;\n}\n\n/* ==========================================================================\n Destructive Variant — Danger/error action with red tones\n ========================================================================== */\n\n.ds-button--destructive {\n background: var(--btn-destructive-bg, rgba(var(--status-error-rgb, 239, 68, 68), 0.6));\n color: var(--btn-destructive-text, #ffffff);\n box-shadow: var(--shadow-interactive-rest), var(--glass-shadow-inner),\n 0 0 20px rgba(var(--status-error-rgb, 239, 68, 68), 0.15);\n\n /* Destructive is a solid accent button — disable glass bleed-through */\n backdrop-filter: none;\n -webkit-backdrop-filter: none;\n}\n\n.ds-button--destructive::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-medium) 0%,\n rgba(var(--status-error-rgb, 239, 68, 68), 0.15) 100%\n );\n}\n\n.ds-button--destructive:hover:not(:disabled) {\n background: var(--btn-destructive-bg-hover, rgba(var(--status-error-rgb, 239, 68, 68), 0.75));\n box-shadow: var(--shadow-interactive-hover), var(--glass-shadow-inner),\n 0 0 24px rgba(var(--status-error-rgb, 239, 68, 68), 0.25);\n transform: translateY(-1px);\n}\n\n.ds-button--destructive:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-strong) 0%,\n rgba(var(--status-error-rgb, 239, 68, 68), 0.2) 100%\n );\n}\n\n.ds-button--destructive:active:not(:disabled) {\n transform: translateY(0);\n background: var(--btn-destructive-bg-active, rgba(var(--status-error-rgb, 239, 68, 68), 0.85));\n}\n\n/* ==========================================================================\n Sizes\n ========================================================================== */\n\n.ds-button--sm {\n font-size: var(--font-size-sm);\n padding: var(--space-2) var(--space-4);\n height: 2rem;\n}\n\n.ds-button--md {\n font-size: var(--font-size-base);\n padding: var(--space-2) var(--space-5);\n height: 2.5rem;\n}\n\n.ds-button--lg {\n font-size: var(--font-size-lg);\n padding: var(--space-3) var(--space-6);\n height: 3rem;\n}\n\n/* ==========================================================================\n Icon Button (square aspect ratio)\n ========================================================================== */\n\n.ds-button--icon {\n padding: 0;\n aspect-ratio: 1;\n}\n\n.ds-button--icon.ds-button--sm {\n width: 2rem;\n}\n\n.ds-button--icon.ds-button--md {\n width: 2.5rem;\n}\n\n.ds-button--icon.ds-button--lg {\n width: 3rem;\n}\n\n/* ==========================================================================\n High Contrast Mode\n ========================================================================== */\n\n@media (prefers-contrast: more) {\n .ds-button {\n border: 1px solid var(--hc-border);\n }\n\n .ds-button::before {\n display: none;\n }\n\n .ds-button--primary {\n background: rgba(var(--brand-pink-rgb), 0.8);\n }\n\n .ds-button--secondary {\n background: var(--hc-surface-subtle);\n }\n\n .ds-button--ghost {\n border-color: transparent;\n }\n\n .ds-button--ghost:hover:not(:disabled) {\n border-color: var(--hc-border-subtle);\n }\n\n .ds-button--link {\n border: none;\n text-decoration: underline;\n }\n\n .ds-button--destructive {\n background: rgba(var(--status-error-rgb, 239, 68, 68), 0.85);\n }\n}\n\n/* ==========================================================================\n Fallback for browsers without backdrop-filter\n ========================================================================== */\n\n@supports not (backdrop-filter: blur(1px)) {\n .ds-button--primary {\n background: rgba(var(--brand-pink-rgb), 0.85);\n }\n\n .ds-button--secondary {\n background: var(--fallback-surface);\n }\n}\n\n/* ==========================================================================\n Light Mode — Reduced glass optics for light backgrounds\n ========================================================================== */\n\n:root[data-theme='light'] .ds-button--primary::before,\n:root[data-theme='light-contrast'] .ds-button--primary::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-light) 0%,\n rgba(var(--brand-pink-rgb), 0.08) 100%\n );\n}\n\n:root[data-theme='light'] .ds-button--primary:hover:not(:disabled)::before,\n:root[data-theme='light-contrast'] .ds-button--primary:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-medium) 0%,\n rgba(var(--brand-pink-rgb), 0.1) 100%\n );\n}\n\n:root[data-theme='light'] .ds-button--destructive::before,\n:root[data-theme='light-contrast'] .ds-button--destructive::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-light) 0%,\n rgba(var(--status-error-rgb, 239, 68, 68), 0.06) 100%\n );\n}\n\n:root[data-theme='light'] .ds-button--destructive:hover:not(:disabled)::before,\n:root[data-theme='light-contrast'] .ds-button--destructive:hover:not(:disabled)::before {\n background: linear-gradient(\n 180deg,\n var(--glass-highlight-light) 0%,\n rgba(var(--status-error-rgb, 239, 68, 68), 0.08) 100%\n );\n}\n\n.ds-button--loading {\n position: relative;\n cursor: not-allowed;\n opacity: 0.8;\n}\n\n.ds-button__spinner {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n animation: ds-button-spin 1s linear infinite;\n}\n\n.ds-button__content {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: inherit;\n visibility: visible;\n}\n\n.ds-button__content--hidden {\n visibility: hidden;\n}\n\n@keyframes ds-button-spin {\n from {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n to {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n}\n","/* CookieConsent — GDPR banner styles */\n\n.ds-cookie-consent {\n position: fixed;\n bottom: var(--spacing-4, 1rem);\n left: var(--spacing-4, 1rem);\n right: var(--spacing-4, 1rem);\n z-index: 50;\n margin-inline: auto;\n max-width: 56rem;\n\n /* CSS transition — replaces framer-motion */\n opacity: 0;\n transform: translateY(100px);\n transition:\n opacity 0.3s ease,\n transform 0.3s ease;\n}\n\n/* Enter state — visible */\n.ds-cookie-consent[data-state='open'] {\n opacity: 1;\n transform: translateY(0);\n}\n\n/* Exit state — slide down and fade out */\n.ds-cookie-consent[data-state='closed'] {\n opacity: 0;\n transform: translateY(100px);\n pointer-events: none;\n}\n\n.ds-cookie-consent__inner {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: var(--spacing-4, 1rem);\n border-radius: var(--radius-xl, 0.75rem);\n border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.1));\n background: var(--bg-surface, rgba(10, 10, 10, 0.95));\n padding: var(--spacing-6, 1.5rem);\n box-shadow: var(--shadow-2xl, 0 25px 50px -12px rgba(0, 0, 0, 0.25));\n backdrop-filter: blur(24px);\n}\n\n@media (min-width: 768px) {\n .ds-cookie-consent__inner {\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n }\n}\n\n.ds-cookie-consent__content {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-1, 0.25rem);\n}\n\n.ds-cookie-consent__title {\n font-size: var(--font-size-sm, 0.875rem);\n font-weight: 600;\n color: var(--text-primary, #fff);\n margin: 0;\n}\n\n.ds-cookie-consent__description {\n font-size: var(--font-size-sm, 0.875rem);\n color: var(--text-secondary, rgba(255, 255, 255, 0.5));\n margin: 0;\n}\n\n.ds-cookie-consent__link {\n margin-left: var(--spacing-1, 0.25rem);\n color: var(--brand-primary, #ff005a);\n text-decoration: none;\n}\n\n.ds-cookie-consent__link:hover {\n text-decoration: underline;\n}\n\n.ds-cookie-consent__actions {\n display: flex;\n flex-direction: column;\n gap: var(--spacing-2, 0.5rem);\n width: 100%;\n}\n\n@media (min-width: 768px) {\n .ds-cookie-consent__actions {\n flex-direction: row;\n width: auto;\n }\n}\n\n.ds-cookie-consent__close {\n position: absolute;\n top: var(--spacing-2, 0.5rem);\n right: var(--spacing-2, 0.5rem);\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n color: var(--text-muted, rgba(255, 255, 255, 0.3));\n cursor: pointer;\n padding: var(--spacing-1, 0.25rem);\n border-radius: var(--radius-sm, 0.25rem);\n transition: color 0.15s;\n}\n\n.ds-cookie-consent__close:hover {\n color: var(--text-primary, #fff);\n}\n\n@media (min-width: 768px) {\n .ds-cookie-consent__close {\n display: none;\n }\n}\n\n/* ==========================================================================\n Reduced Motion\n ========================================================================== */\n\n@media (prefers-reduced-motion: reduce) {\n .ds-cookie-consent {\n transition: none;\n }\n}\n"],"mappings":";AAIA,CAAC;AACC,YAAU;AACV,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK,IAAI;AACT,UAAQ;AACR,UAAQ;AACR,eAAa,IAAI;AACjB,eAAa,IAAI;AACjB,iBAAe,IAAI;AACnB,SAAO,IAAI;AACX,WAAS;AACT,eAAa;AACb,WAAS;AACT,cAAY;AACZ,iBAAe;AAGf,mBAAiB,KAAK,MAAM,SAAS;AACrC,2BAAyB,KAAK,MAAM,SAAS;AAG7C;AAAA,IACE,WAAW,IAAI,mBAAmB;AAAA,IAClC,WAAW,IAAI,mBAAmB;AAAA,IAClC,UAAU,IAAI;AAClB;AAGA,CA9BC,SA8BS;AACR,WAAS;AACT,YAAU;AACV,SAAO;AACP,iBAAe;AACf,WAAS,IAAI;AACb;AAAA,IAAY;AAAA,MAAgB,MAAM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3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generic analytics script loader.
|
|
6
|
+
*
|
|
7
|
+
* Framework-agnostic: injects a `<script>` tag into `<head>` once,
|
|
8
|
+
* guards against double-loading, and respects cookie consent.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { createAnalyticsLoader } from '@salesmind-ai/design-system/web';
|
|
13
|
+
*
|
|
14
|
+
* const loadGA = createAnalyticsLoader({
|
|
15
|
+
* id: 'ga-script',
|
|
16
|
+
* src: (gaId) => `https://www.googletagmanager.com/gtag/js?id=${gaId}`,
|
|
17
|
+
* onLoad: (gaId) => {
|
|
18
|
+
* window.dataLayer = window.dataLayer || [];
|
|
19
|
+
* function gtag(...args: unknown[]) { window.dataLayer.push(args); }
|
|
20
|
+
* gtag('js', new Date());
|
|
21
|
+
* gtag('config', gaId);
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* // Later, after consent:
|
|
26
|
+
* loadGA('G-XXXXXX');
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
interface AnalyticsLoaderConfig<TId extends string = string> {
|
|
30
|
+
/** Unique DOM id for the script element (prevents double-loading) */
|
|
31
|
+
id: string;
|
|
32
|
+
/** Build the script src URL from the tracking ID */
|
|
33
|
+
src: (trackingId: TId) => string;
|
|
34
|
+
/** Async attribute on the script tag (default: true) */
|
|
35
|
+
async?: boolean;
|
|
36
|
+
/** Called after the script is appended to the DOM */
|
|
37
|
+
onLoad?: (trackingId: TId) => void;
|
|
38
|
+
/** Custom inline script content instead of an external src */
|
|
39
|
+
inlineScript?: (trackingId: TId) => string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Create a reusable analytics loader function.
|
|
43
|
+
* The returned function injects the script once and is safe to call multiple times.
|
|
44
|
+
*/
|
|
45
|
+
declare function createAnalyticsLoader<TId extends string = string>(config: AnalyticsLoaderConfig<TId>): (trackingId: TId) => void;
|
|
46
|
+
declare global {
|
|
47
|
+
interface Window {
|
|
48
|
+
dataLayer: unknown[];
|
|
49
|
+
clarity?: (...args: unknown[]) => void;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Load Google Analytics (gtag.js).
|
|
54
|
+
* Call with your GA measurement ID after cookie consent.
|
|
55
|
+
*/
|
|
56
|
+
declare const loadGoogleAnalytics: (trackingId: string) => void;
|
|
57
|
+
/**
|
|
58
|
+
* Load Microsoft Clarity.
|
|
59
|
+
* Call with your Clarity project ID after cookie consent.
|
|
60
|
+
*/
|
|
61
|
+
declare const loadClarity: (trackingId: string) => void;
|
|
62
|
+
|
|
63
|
+
/** Cookie consent state */
|
|
64
|
+
type ConsentStatus = 'granted' | 'denied' | null;
|
|
65
|
+
/** Event name dispatched on window when consent changes */
|
|
66
|
+
declare const COOKIE_CONSENT_EVENT = "cookie_consent_granted";
|
|
67
|
+
/** localStorage key for cookie consent */
|
|
68
|
+
declare const COOKIE_CONSENT_KEY = "cookie_consent";
|
|
69
|
+
/** Labels for i18n support */
|
|
70
|
+
interface CookieConsentLabels {
|
|
71
|
+
title?: string;
|
|
72
|
+
description?: string;
|
|
73
|
+
privacyLinkText?: string;
|
|
74
|
+
acceptLabel?: string;
|
|
75
|
+
declineLabel?: string;
|
|
76
|
+
}
|
|
77
|
+
interface CookieConsentProps {
|
|
78
|
+
/** Delay in ms before showing the banner (default: 1000) */
|
|
79
|
+
delay?: number;
|
|
80
|
+
/** URL to the privacy policy page (default: "/legal/privacy") */
|
|
81
|
+
privacyUrl?: string;
|
|
82
|
+
/** Called when the user accepts cookies */
|
|
83
|
+
onAccept?: () => void;
|
|
84
|
+
/** Called when the user declines cookies */
|
|
85
|
+
onDecline?: () => void;
|
|
86
|
+
/** Override default labels for i18n */
|
|
87
|
+
labels?: CookieConsentLabels;
|
|
88
|
+
/** Custom className for the container */
|
|
89
|
+
className?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* CookieConsent — GDPR-compliant cookie consent banner.
|
|
93
|
+
*
|
|
94
|
+
* - Animated entrance/exit via CSS transitions (no framer-motion)
|
|
95
|
+
* - Respects prior consent stored in localStorage
|
|
96
|
+
* - Dispatches a `cookie_consent_granted` event on the window for analytics loaders
|
|
97
|
+
* - Uses DS Button component
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```tsx
|
|
101
|
+
* import { CookieConsent } from '@salesmind-ai/design-system/web';
|
|
102
|
+
*
|
|
103
|
+
* <CookieConsent
|
|
104
|
+
* privacyUrl="/legal/privacy"
|
|
105
|
+
* onAccept={() => loadGoogleAnalytics('G-XXXX')}
|
|
106
|
+
* />
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
declare function CookieConsent({ delay, privacyUrl, onAccept, onDecline, labels, className, }: CookieConsentProps): react_jsx_runtime.JSX.Element | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* React hook that tracks cookie consent status.
|
|
113
|
+
*
|
|
114
|
+
* Returns `true` once the user has granted cookie consent,
|
|
115
|
+
* `false` if denied, `null` if not yet decided.
|
|
116
|
+
*
|
|
117
|
+
* Listens for the `cookie_consent_granted` window event dispatched
|
|
118
|
+
* by the CookieConsent component.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```tsx
|
|
122
|
+
* const hasConsent = useCookieConsent();
|
|
123
|
+
*
|
|
124
|
+
* useEffect(() => {
|
|
125
|
+
* if (hasConsent) loadGoogleAnalytics('G-XXXX');
|
|
126
|
+
* }, [hasConsent]);
|
|
127
|
+
* ```
|
|
128
|
+
*/
|
|
129
|
+
declare function useCookieConsent(): ConsentStatus;
|
|
130
|
+
|
|
131
|
+
/** Arbitrary properties bag attached to every analytics event. */
|
|
132
|
+
type AnalyticsEventProps = Record<string, string | number | boolean | undefined>;
|
|
133
|
+
/** Signature for the track function provided by AnalyticsProvider. */
|
|
134
|
+
type TrackFn = (event: string, props?: AnalyticsEventProps) => void;
|
|
135
|
+
/** Value exposed by the AnalyticsContext. */
|
|
136
|
+
interface AnalyticsContextValue {
|
|
137
|
+
track: TrackFn;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Props for the AnalyticsProvider component */
|
|
141
|
+
interface AnalyticsProviderProps {
|
|
142
|
+
/** Callback invoked on every track() call. Wire this to your analytics backend. */
|
|
143
|
+
onTrack: TrackFn;
|
|
144
|
+
/** Enable console logging in development (default: false) */
|
|
145
|
+
debug?: boolean;
|
|
146
|
+
children: ReactNode;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Provides analytics event tracking to all descendant DS components.
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```tsx
|
|
153
|
+
* <AnalyticsProvider
|
|
154
|
+
* onTrack={(event, props) => {
|
|
155
|
+
* window.gtag?.('event', event, props);
|
|
156
|
+
* }}
|
|
157
|
+
* >
|
|
158
|
+
* <App />
|
|
159
|
+
* </AnalyticsProvider>
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
declare function AnalyticsProvider({ onTrack, debug, children }: AnalyticsProviderProps): react_jsx_runtime.JSX.Element;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Hook that returns the analytics `track` function.
|
|
166
|
+
*
|
|
167
|
+
* Safe to call without a wrapping `<AnalyticsProvider>` — all calls
|
|
168
|
+
* become no-ops in that case (Storybook, tests, SSR).
|
|
169
|
+
*/
|
|
170
|
+
declare function useAnalytics(): AnalyticsContextValue;
|
|
171
|
+
|
|
172
|
+
export { type AnalyticsContextValue, type AnalyticsEventProps, type AnalyticsLoaderConfig, AnalyticsProvider, type AnalyticsProviderProps, COOKIE_CONSENT_EVENT, COOKIE_CONSENT_KEY, type ConsentStatus, CookieConsent, type CookieConsentLabels, type CookieConsentProps, type TrackFn, createAnalyticsLoader, loadClarity, loadGoogleAnalytics, useAnalytics, useCookieConsent };
|