@exyconn/common 2.1.0 → 2.3.3
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 +969 -261
- package/dist/client/hooks/index.d.mts +1042 -0
- package/dist/client/hooks/index.d.ts +1042 -0
- package/dist/client/hooks/index.js +2276 -0
- package/dist/client/hooks/index.js.map +1 -0
- package/dist/client/hooks/index.mjs +2217 -0
- package/dist/client/hooks/index.mjs.map +1 -0
- package/dist/client/http/index.d.mts +217 -49
- package/dist/client/http/index.d.ts +217 -49
- package/dist/client/http/index.js +473 -94
- package/dist/client/http/index.js.map +1 -1
- package/dist/client/http/index.mjs +441 -84
- package/dist/client/http/index.mjs.map +1 -1
- package/dist/client/index.d.mts +6 -4
- package/dist/client/index.d.ts +6 -4
- package/dist/client/index.js +481 -319
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +449 -290
- package/dist/client/index.mjs.map +1 -1
- package/dist/client/utils/index.d.mts +3 -279
- package/dist/client/utils/index.d.ts +3 -279
- package/dist/client/web/index.d.mts +1461 -0
- package/dist/client/web/index.d.ts +1461 -0
- package/dist/client/web/index.js +2681 -0
- package/dist/client/web/index.js.map +1 -0
- package/dist/client/web/index.mjs +2618 -0
- package/dist/client/web/index.mjs.map +1 -0
- package/dist/data/brand-identity.d.mts +149 -0
- package/dist/data/brand-identity.d.ts +149 -0
- package/dist/data/brand-identity.js +235 -0
- package/dist/data/brand-identity.js.map +1 -0
- package/dist/data/brand-identity.mjs +220 -0
- package/dist/data/brand-identity.mjs.map +1 -0
- package/dist/data/countries.d.mts +61 -0
- package/dist/data/countries.d.ts +61 -0
- package/dist/data/countries.js +987 -0
- package/dist/data/countries.js.map +1 -0
- package/dist/data/countries.mjs +971 -0
- package/dist/data/countries.mjs.map +1 -0
- package/dist/data/currencies.d.mts +19 -0
- package/dist/data/currencies.d.ts +19 -0
- package/dist/data/currencies.js +162 -0
- package/dist/data/currencies.js.map +1 -0
- package/dist/data/currencies.mjs +153 -0
- package/dist/data/currencies.mjs.map +1 -0
- package/dist/data/index.d.mts +7 -0
- package/dist/data/index.d.ts +7 -0
- package/dist/data/index.js +2087 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/index.mjs +1948 -0
- package/dist/data/index.mjs.map +1 -0
- package/dist/data/phone-codes.d.mts +15 -0
- package/dist/data/phone-codes.d.ts +15 -0
- package/dist/data/phone-codes.js +219 -0
- package/dist/data/phone-codes.js.map +1 -0
- package/dist/data/phone-codes.mjs +211 -0
- package/dist/data/phone-codes.mjs.map +1 -0
- package/dist/data/regex.d.mts +287 -0
- package/dist/data/regex.d.ts +287 -0
- package/dist/data/regex.js +306 -0
- package/dist/data/regex.js.map +1 -0
- package/dist/data/regex.mjs +208 -0
- package/dist/data/regex.mjs.map +1 -0
- package/dist/data/timezones.d.mts +16 -0
- package/dist/data/timezones.d.ts +16 -0
- package/dist/data/timezones.js +98 -0
- package/dist/data/timezones.js.map +1 -0
- package/dist/data/timezones.mjs +89 -0
- package/dist/data/timezones.mjs.map +1 -0
- package/dist/index-BZf42T3R.d.mts +305 -0
- package/dist/index-CF0D8PGE.d.ts +305 -0
- package/dist/index-Ckhm_HaX.d.mts +138 -0
- package/dist/index-DKn4raO7.d.ts +222 -0
- package/dist/index-NS8dS0p9.d.mts +222 -0
- package/dist/index-Nqm5_lwT.d.ts +188 -0
- package/dist/index-br6POSyA.d.ts +138 -0
- package/dist/index-jBi3V6e5.d.mts +188 -0
- package/dist/index.d.mts +21 -580
- package/dist/index.d.ts +21 -580
- package/dist/index.js +1839 -347
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1850 -359
- package/dist/index.mjs.map +1 -1
- package/dist/packageCheck-B_qfsD6R.d.ts +280 -0
- package/dist/packageCheck-C2_FT_Rl.d.mts +280 -0
- package/dist/server/configs/index.d.mts +602 -0
- package/dist/server/configs/index.d.ts +602 -0
- package/dist/server/configs/index.js +707 -0
- package/dist/server/configs/index.js.map +1 -0
- package/dist/server/configs/index.mjs +665 -0
- package/dist/server/configs/index.mjs.map +1 -0
- package/dist/server/index.d.mts +4 -1
- package/dist/server/index.d.ts +4 -1
- package/dist/server/index.js +1330 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +1286 -2
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/middleware/index.d.mts +283 -2
- package/dist/server/middleware/index.d.ts +283 -2
- package/dist/server/middleware/index.js +761 -0
- package/dist/server/middleware/index.js.map +1 -1
- package/dist/server/middleware/index.mjs +751 -1
- package/dist/server/middleware/index.mjs.map +1 -1
- package/dist/shared/config/index.d.mts +40 -0
- package/dist/shared/config/index.d.ts +40 -0
- package/dist/shared/config/index.js +58 -0
- package/dist/shared/config/index.js.map +1 -0
- package/dist/shared/config/index.mjs +51 -0
- package/dist/shared/config/index.mjs.map +1 -0
- package/dist/shared/constants/index.d.mts +593 -0
- package/dist/shared/constants/index.d.ts +593 -0
- package/dist/shared/constants/index.js +391 -0
- package/dist/shared/constants/index.js.map +1 -0
- package/dist/shared/constants/index.mjs +360 -0
- package/dist/shared/constants/index.mjs.map +1 -0
- package/dist/shared/index.d.mts +5 -1
- package/dist/shared/index.d.ts +5 -1
- package/dist/shared/types/index.d.mts +140 -0
- package/dist/shared/types/index.d.ts +140 -0
- package/dist/shared/types/index.js +4 -0
- package/dist/shared/types/index.js.map +1 -0
- package/dist/shared/types/index.mjs +3 -0
- package/dist/shared/types/index.mjs.map +1 -0
- package/dist/shared/utils/index.d.mts +255 -0
- package/dist/shared/utils/index.d.ts +255 -0
- package/dist/shared/utils/index.js +623 -0
- package/dist/shared/utils/index.js.map +1 -0
- package/dist/shared/utils/index.mjs +324 -0
- package/dist/shared/utils/index.mjs.map +1 -0
- package/dist/shared/validation/index.d.mts +258 -0
- package/dist/shared/validation/index.d.ts +258 -0
- package/dist/shared/validation/index.js +185 -0
- package/dist/shared/validation/index.js.map +1 -0
- package/dist/shared/validation/index.mjs +172 -0
- package/dist/shared/validation/index.mjs.map +1 -0
- package/package.json +127 -62
- package/dist/index-BcxL4_V4.d.ts +0 -2946
- package/dist/index-DEzgM15j.d.ts +0 -67
- package/dist/index-DNFVgQx8.d.ts +0 -1375
- package/dist/index-DbV04Dx8.d.mts +0 -67
- package/dist/index-DfqEP6Oe.d.mts +0 -1375
- package/dist/index-bvvCev9Q.d.mts +0 -2946
|
@@ -0,0 +1,1461 @@
|
|
|
1
|
+
import { BrandIdentity, BrandColors } from '../../data/brand-identity.mjs';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as Yup from 'yup';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Theme System Types
|
|
7
|
+
* Deep-level theming with micro-level customization
|
|
8
|
+
* Supports light/dark themes with fallback options
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
interface ColorPalette {
|
|
12
|
+
50: string;
|
|
13
|
+
100: string;
|
|
14
|
+
200: string;
|
|
15
|
+
300: string;
|
|
16
|
+
400: string;
|
|
17
|
+
500: string;
|
|
18
|
+
600: string;
|
|
19
|
+
700: string;
|
|
20
|
+
800: string;
|
|
21
|
+
900: string;
|
|
22
|
+
950: string;
|
|
23
|
+
}
|
|
24
|
+
interface SemanticColors {
|
|
25
|
+
primary: string;
|
|
26
|
+
primaryHover: string;
|
|
27
|
+
primaryActive: string;
|
|
28
|
+
primaryDisabled: string;
|
|
29
|
+
secondary: string;
|
|
30
|
+
secondaryHover: string;
|
|
31
|
+
secondaryActive: string;
|
|
32
|
+
secondaryDisabled: string;
|
|
33
|
+
accent: string;
|
|
34
|
+
accentHover: string;
|
|
35
|
+
success: string;
|
|
36
|
+
successHover: string;
|
|
37
|
+
warning: string;
|
|
38
|
+
warningHover: string;
|
|
39
|
+
error: string;
|
|
40
|
+
errorHover: string;
|
|
41
|
+
info: string;
|
|
42
|
+
infoHover: string;
|
|
43
|
+
}
|
|
44
|
+
interface BackgroundColors {
|
|
45
|
+
/** Main page background */
|
|
46
|
+
default: string;
|
|
47
|
+
/** Alternate background for sections */
|
|
48
|
+
paper: string;
|
|
49
|
+
/** Card backgrounds */
|
|
50
|
+
card: string;
|
|
51
|
+
/** Modal/overlay backgrounds */
|
|
52
|
+
overlay: string;
|
|
53
|
+
/** Input field backgrounds */
|
|
54
|
+
input: string;
|
|
55
|
+
/** Disabled element backgrounds */
|
|
56
|
+
disabled: string;
|
|
57
|
+
/** Hover state background */
|
|
58
|
+
hover: string;
|
|
59
|
+
/** Selected state background */
|
|
60
|
+
selected: string;
|
|
61
|
+
}
|
|
62
|
+
interface SurfaceColors {
|
|
63
|
+
light: string;
|
|
64
|
+
main: string;
|
|
65
|
+
dark: string;
|
|
66
|
+
}
|
|
67
|
+
interface TextColors {
|
|
68
|
+
/** Primary text color */
|
|
69
|
+
primary: string;
|
|
70
|
+
/** Secondary/muted text */
|
|
71
|
+
secondary: string;
|
|
72
|
+
/** Disabled text */
|
|
73
|
+
disabled: string;
|
|
74
|
+
/** Placeholder text */
|
|
75
|
+
placeholder: string;
|
|
76
|
+
/** Link text */
|
|
77
|
+
link: string;
|
|
78
|
+
/** Link hover */
|
|
79
|
+
linkHover: string;
|
|
80
|
+
/** Inverted text (for dark backgrounds) */
|
|
81
|
+
inverse: string;
|
|
82
|
+
/** On primary color background */
|
|
83
|
+
onPrimary: string;
|
|
84
|
+
/** On secondary color background */
|
|
85
|
+
onSecondary: string;
|
|
86
|
+
}
|
|
87
|
+
interface BorderColors {
|
|
88
|
+
default: string;
|
|
89
|
+
light: string;
|
|
90
|
+
dark: string;
|
|
91
|
+
focus: string;
|
|
92
|
+
error: string;
|
|
93
|
+
success: string;
|
|
94
|
+
disabled: string;
|
|
95
|
+
}
|
|
96
|
+
interface Shadows {
|
|
97
|
+
none: string;
|
|
98
|
+
xs: string;
|
|
99
|
+
sm: string;
|
|
100
|
+
md: string;
|
|
101
|
+
lg: string;
|
|
102
|
+
xl: string;
|
|
103
|
+
'2xl': string;
|
|
104
|
+
inner: string;
|
|
105
|
+
/** Button specific shadows */
|
|
106
|
+
button: string;
|
|
107
|
+
buttonHover: string;
|
|
108
|
+
/** Card shadows */
|
|
109
|
+
card: string;
|
|
110
|
+
cardHover: string;
|
|
111
|
+
/** Modal/dropdown shadows */
|
|
112
|
+
modal: string;
|
|
113
|
+
dropdown: string;
|
|
114
|
+
}
|
|
115
|
+
interface FontFamily {
|
|
116
|
+
sans: string;
|
|
117
|
+
serif: string;
|
|
118
|
+
mono: string;
|
|
119
|
+
heading: string;
|
|
120
|
+
body: string;
|
|
121
|
+
}
|
|
122
|
+
interface FontSize {
|
|
123
|
+
xs: string;
|
|
124
|
+
sm: string;
|
|
125
|
+
base: string;
|
|
126
|
+
lg: string;
|
|
127
|
+
xl: string;
|
|
128
|
+
'2xl': string;
|
|
129
|
+
'3xl': string;
|
|
130
|
+
'4xl': string;
|
|
131
|
+
'5xl': string;
|
|
132
|
+
'6xl': string;
|
|
133
|
+
}
|
|
134
|
+
interface FontWeight {
|
|
135
|
+
light: number;
|
|
136
|
+
normal: number;
|
|
137
|
+
medium: number;
|
|
138
|
+
semibold: number;
|
|
139
|
+
bold: number;
|
|
140
|
+
extrabold: number;
|
|
141
|
+
}
|
|
142
|
+
interface LineHeight {
|
|
143
|
+
none: number;
|
|
144
|
+
tight: number;
|
|
145
|
+
snug: number;
|
|
146
|
+
normal: number;
|
|
147
|
+
relaxed: number;
|
|
148
|
+
loose: number;
|
|
149
|
+
}
|
|
150
|
+
interface Typography {
|
|
151
|
+
fontFamily: FontFamily;
|
|
152
|
+
fontSize: FontSize;
|
|
153
|
+
fontWeight: FontWeight;
|
|
154
|
+
lineHeight: LineHeight;
|
|
155
|
+
}
|
|
156
|
+
interface Spacing {
|
|
157
|
+
0: string;
|
|
158
|
+
px: string;
|
|
159
|
+
0.5: string;
|
|
160
|
+
1: string;
|
|
161
|
+
1.5: string;
|
|
162
|
+
2: string;
|
|
163
|
+
2.5: string;
|
|
164
|
+
3: string;
|
|
165
|
+
3.5: string;
|
|
166
|
+
4: string;
|
|
167
|
+
5: string;
|
|
168
|
+
6: string;
|
|
169
|
+
7: string;
|
|
170
|
+
8: string;
|
|
171
|
+
9: string;
|
|
172
|
+
10: string;
|
|
173
|
+
11: string;
|
|
174
|
+
12: string;
|
|
175
|
+
14: string;
|
|
176
|
+
16: string;
|
|
177
|
+
20: string;
|
|
178
|
+
24: string;
|
|
179
|
+
28: string;
|
|
180
|
+
32: string;
|
|
181
|
+
36: string;
|
|
182
|
+
40: string;
|
|
183
|
+
44: string;
|
|
184
|
+
48: string;
|
|
185
|
+
52: string;
|
|
186
|
+
56: string;
|
|
187
|
+
60: string;
|
|
188
|
+
64: string;
|
|
189
|
+
72: string;
|
|
190
|
+
80: string;
|
|
191
|
+
96: string;
|
|
192
|
+
}
|
|
193
|
+
interface BorderRadius {
|
|
194
|
+
none: string;
|
|
195
|
+
sm: string;
|
|
196
|
+
default: string;
|
|
197
|
+
md: string;
|
|
198
|
+
lg: string;
|
|
199
|
+
xl: string;
|
|
200
|
+
'2xl': string;
|
|
201
|
+
'3xl': string;
|
|
202
|
+
full: string;
|
|
203
|
+
}
|
|
204
|
+
interface Breakpoints {
|
|
205
|
+
xs: string;
|
|
206
|
+
sm: string;
|
|
207
|
+
md: string;
|
|
208
|
+
lg: string;
|
|
209
|
+
xl: string;
|
|
210
|
+
'2xl': string;
|
|
211
|
+
}
|
|
212
|
+
interface ZIndex {
|
|
213
|
+
hide: number;
|
|
214
|
+
auto: string;
|
|
215
|
+
base: number;
|
|
216
|
+
dropdown: number;
|
|
217
|
+
sticky: number;
|
|
218
|
+
fixed: number;
|
|
219
|
+
modalBackdrop: number;
|
|
220
|
+
modal: number;
|
|
221
|
+
popover: number;
|
|
222
|
+
tooltip: number;
|
|
223
|
+
toast: number;
|
|
224
|
+
}
|
|
225
|
+
interface Transitions {
|
|
226
|
+
none: string;
|
|
227
|
+
fast: string;
|
|
228
|
+
normal: string;
|
|
229
|
+
slow: string;
|
|
230
|
+
slower: string;
|
|
231
|
+
/** Specific transitions */
|
|
232
|
+
colors: string;
|
|
233
|
+
transform: string;
|
|
234
|
+
opacity: string;
|
|
235
|
+
shadow: string;
|
|
236
|
+
all: string;
|
|
237
|
+
}
|
|
238
|
+
interface ButtonTheme {
|
|
239
|
+
/** Background colors */
|
|
240
|
+
bg: string;
|
|
241
|
+
bgHover: string;
|
|
242
|
+
bgActive: string;
|
|
243
|
+
bgDisabled: string;
|
|
244
|
+
/** Text colors */
|
|
245
|
+
color: string;
|
|
246
|
+
colorHover: string;
|
|
247
|
+
colorDisabled: string;
|
|
248
|
+
/** Border */
|
|
249
|
+
border: string;
|
|
250
|
+
borderHover: string;
|
|
251
|
+
borderWidth: string;
|
|
252
|
+
borderRadius: string;
|
|
253
|
+
/** Shadow */
|
|
254
|
+
shadow: string;
|
|
255
|
+
shadowHover: string;
|
|
256
|
+
/** Sizes */
|
|
257
|
+
paddingX: string;
|
|
258
|
+
paddingY: string;
|
|
259
|
+
fontSize: string;
|
|
260
|
+
fontWeight: number;
|
|
261
|
+
/** Variants */
|
|
262
|
+
variants: {
|
|
263
|
+
primary: Partial<ButtonTheme>;
|
|
264
|
+
secondary: Partial<ButtonTheme>;
|
|
265
|
+
outline: Partial<ButtonTheme>;
|
|
266
|
+
ghost: Partial<ButtonTheme>;
|
|
267
|
+
link: Partial<ButtonTheme>;
|
|
268
|
+
danger: Partial<ButtonTheme>;
|
|
269
|
+
success: Partial<ButtonTheme>;
|
|
270
|
+
};
|
|
271
|
+
/** Sizes */
|
|
272
|
+
sizes: {
|
|
273
|
+
xs: Partial<ButtonTheme>;
|
|
274
|
+
sm: Partial<ButtonTheme>;
|
|
275
|
+
md: Partial<ButtonTheme>;
|
|
276
|
+
lg: Partial<ButtonTheme>;
|
|
277
|
+
xl: Partial<ButtonTheme>;
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
interface InputTheme {
|
|
281
|
+
bg: string;
|
|
282
|
+
bgFocus: string;
|
|
283
|
+
bgDisabled: string;
|
|
284
|
+
bgError: string;
|
|
285
|
+
color: string;
|
|
286
|
+
colorPlaceholder: string;
|
|
287
|
+
colorDisabled: string;
|
|
288
|
+
border: string;
|
|
289
|
+
borderFocus: string;
|
|
290
|
+
borderError: string;
|
|
291
|
+
borderWidth: string;
|
|
292
|
+
borderRadius: string;
|
|
293
|
+
shadow: string;
|
|
294
|
+
shadowFocus: string;
|
|
295
|
+
paddingX: string;
|
|
296
|
+
paddingY: string;
|
|
297
|
+
fontSize: string;
|
|
298
|
+
/** Label styles */
|
|
299
|
+
labelColor: string;
|
|
300
|
+
labelFontSize: string;
|
|
301
|
+
labelFontWeight: number;
|
|
302
|
+
/** Helper/Error text */
|
|
303
|
+
helperColor: string;
|
|
304
|
+
errorColor: string;
|
|
305
|
+
/** Sizes */
|
|
306
|
+
sizes: {
|
|
307
|
+
sm: Partial<InputTheme>;
|
|
308
|
+
md: Partial<InputTheme>;
|
|
309
|
+
lg: Partial<InputTheme>;
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
interface CardTheme {
|
|
313
|
+
bg: string;
|
|
314
|
+
bgHover: string;
|
|
315
|
+
border: string;
|
|
316
|
+
borderWidth: string;
|
|
317
|
+
borderRadius: string;
|
|
318
|
+
shadow: string;
|
|
319
|
+
shadowHover: string;
|
|
320
|
+
padding: string;
|
|
321
|
+
/** Header */
|
|
322
|
+
headerBg: string;
|
|
323
|
+
headerBorder: string;
|
|
324
|
+
headerPadding: string;
|
|
325
|
+
/** Footer */
|
|
326
|
+
footerBg: string;
|
|
327
|
+
footerBorder: string;
|
|
328
|
+
footerPadding: string;
|
|
329
|
+
}
|
|
330
|
+
interface HeaderTheme {
|
|
331
|
+
bg: string;
|
|
332
|
+
bgScrolled: string;
|
|
333
|
+
color: string;
|
|
334
|
+
border: string;
|
|
335
|
+
shadow: string;
|
|
336
|
+
shadowScrolled: string;
|
|
337
|
+
height: string;
|
|
338
|
+
paddingX: string;
|
|
339
|
+
/** Logo */
|
|
340
|
+
logoHeight: string;
|
|
341
|
+
/** Nav links */
|
|
342
|
+
navColor: string;
|
|
343
|
+
navColorHover: string;
|
|
344
|
+
navColorActive: string;
|
|
345
|
+
navFontSize: string;
|
|
346
|
+
navFontWeight: number;
|
|
347
|
+
/** Mobile menu */
|
|
348
|
+
mobileMenuBg: string;
|
|
349
|
+
mobileMenuShadow: string;
|
|
350
|
+
}
|
|
351
|
+
interface FooterTheme {
|
|
352
|
+
bg: string;
|
|
353
|
+
color: string;
|
|
354
|
+
colorMuted: string;
|
|
355
|
+
border: string;
|
|
356
|
+
padding: string;
|
|
357
|
+
/** Links */
|
|
358
|
+
linkColor: string;
|
|
359
|
+
linkColorHover: string;
|
|
360
|
+
/** Headings */
|
|
361
|
+
headingColor: string;
|
|
362
|
+
headingFontSize: string;
|
|
363
|
+
headingFontWeight: number;
|
|
364
|
+
/** Copyright */
|
|
365
|
+
copyrightBg: string;
|
|
366
|
+
copyrightColor: string;
|
|
367
|
+
}
|
|
368
|
+
interface BannerTheme {
|
|
369
|
+
bg: string;
|
|
370
|
+
color: string;
|
|
371
|
+
border: string;
|
|
372
|
+
borderRadius: string;
|
|
373
|
+
padding: string;
|
|
374
|
+
shadow: string;
|
|
375
|
+
/** Close button */
|
|
376
|
+
closeBg: string;
|
|
377
|
+
closeColor: string;
|
|
378
|
+
/** Variants */
|
|
379
|
+
variants: {
|
|
380
|
+
info: Partial<BannerTheme>;
|
|
381
|
+
success: Partial<BannerTheme>;
|
|
382
|
+
warning: Partial<BannerTheme>;
|
|
383
|
+
error: Partial<BannerTheme>;
|
|
384
|
+
promo: Partial<BannerTheme>;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
interface LoaderTheme {
|
|
388
|
+
color: string;
|
|
389
|
+
colorSecondary: string;
|
|
390
|
+
size: string;
|
|
391
|
+
borderWidth: string;
|
|
392
|
+
/** Overlay */
|
|
393
|
+
overlayBg: string;
|
|
394
|
+
overlayOpacity: number;
|
|
395
|
+
/** Sizes */
|
|
396
|
+
sizes: {
|
|
397
|
+
xs: string;
|
|
398
|
+
sm: string;
|
|
399
|
+
md: string;
|
|
400
|
+
lg: string;
|
|
401
|
+
xl: string;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
interface ModalTheme {
|
|
405
|
+
bg: string;
|
|
406
|
+
color: string;
|
|
407
|
+
border: string;
|
|
408
|
+
borderRadius: string;
|
|
409
|
+
shadow: string;
|
|
410
|
+
padding: string;
|
|
411
|
+
/** Overlay */
|
|
412
|
+
overlayBg: string;
|
|
413
|
+
overlayOpacity: number;
|
|
414
|
+
/** Header */
|
|
415
|
+
headerBg: string;
|
|
416
|
+
headerBorder: string;
|
|
417
|
+
headerPadding: string;
|
|
418
|
+
/** Footer */
|
|
419
|
+
footerBg: string;
|
|
420
|
+
footerBorder: string;
|
|
421
|
+
footerPadding: string;
|
|
422
|
+
/** Close button */
|
|
423
|
+
closeBg: string;
|
|
424
|
+
closeColor: string;
|
|
425
|
+
closeHoverBg: string;
|
|
426
|
+
/** Sizes */
|
|
427
|
+
sizes: {
|
|
428
|
+
sm: string;
|
|
429
|
+
md: string;
|
|
430
|
+
lg: string;
|
|
431
|
+
xl: string;
|
|
432
|
+
full: string;
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
interface ToastTheme {
|
|
436
|
+
bg: string;
|
|
437
|
+
color: string;
|
|
438
|
+
border: string;
|
|
439
|
+
borderRadius: string;
|
|
440
|
+
shadow: string;
|
|
441
|
+
padding: string;
|
|
442
|
+
/** Variants */
|
|
443
|
+
variants: {
|
|
444
|
+
success: Partial<ToastTheme>;
|
|
445
|
+
error: Partial<ToastTheme>;
|
|
446
|
+
warning: Partial<ToastTheme>;
|
|
447
|
+
info: Partial<ToastTheme>;
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
interface NewsletterTheme {
|
|
451
|
+
bg: string;
|
|
452
|
+
color: string;
|
|
453
|
+
border: string;
|
|
454
|
+
borderRadius: string;
|
|
455
|
+
padding: string;
|
|
456
|
+
/** Title */
|
|
457
|
+
titleColor: string;
|
|
458
|
+
titleFontSize: string;
|
|
459
|
+
/** Description */
|
|
460
|
+
descColor: string;
|
|
461
|
+
descFontSize: string;
|
|
462
|
+
/** Input override */
|
|
463
|
+
inputBg: string;
|
|
464
|
+
inputBorder: string;
|
|
465
|
+
/** Button override */
|
|
466
|
+
buttonBg: string;
|
|
467
|
+
buttonColor: string;
|
|
468
|
+
}
|
|
469
|
+
interface ComponentThemes {
|
|
470
|
+
button: ButtonTheme;
|
|
471
|
+
input: InputTheme;
|
|
472
|
+
card: CardTheme;
|
|
473
|
+
header: HeaderTheme;
|
|
474
|
+
footer: FooterTheme;
|
|
475
|
+
banner: BannerTheme;
|
|
476
|
+
loader: LoaderTheme;
|
|
477
|
+
modal: ModalTheme;
|
|
478
|
+
toast: ToastTheme;
|
|
479
|
+
newsletter: NewsletterTheme;
|
|
480
|
+
}
|
|
481
|
+
type ThemeMode = 'light' | 'dark' | 'system';
|
|
482
|
+
interface Theme {
|
|
483
|
+
/** Theme identifier */
|
|
484
|
+
name: string;
|
|
485
|
+
/** Light or dark mode */
|
|
486
|
+
mode: ThemeMode;
|
|
487
|
+
/** Brand identity reference */
|
|
488
|
+
brand?: Partial<BrandIdentity>;
|
|
489
|
+
/** Color system */
|
|
490
|
+
colors: {
|
|
491
|
+
brand: BrandColors;
|
|
492
|
+
semantic: SemanticColors;
|
|
493
|
+
background: BackgroundColors;
|
|
494
|
+
surface: SurfaceColors;
|
|
495
|
+
text: TextColors;
|
|
496
|
+
border: BorderColors;
|
|
497
|
+
};
|
|
498
|
+
/** Shadow system */
|
|
499
|
+
shadows: Shadows;
|
|
500
|
+
/** Typography */
|
|
501
|
+
typography: Typography;
|
|
502
|
+
/** Spacing */
|
|
503
|
+
spacing: Spacing;
|
|
504
|
+
/** Border radius */
|
|
505
|
+
borderRadius: BorderRadius;
|
|
506
|
+
/** Breakpoints */
|
|
507
|
+
breakpoints: Breakpoints;
|
|
508
|
+
/** Z-index */
|
|
509
|
+
zIndex: ZIndex;
|
|
510
|
+
/** Transitions */
|
|
511
|
+
transitions: Transitions;
|
|
512
|
+
/** Component-specific themes */
|
|
513
|
+
components: ComponentThemes;
|
|
514
|
+
}
|
|
515
|
+
interface ThemeConfig {
|
|
516
|
+
/** Default theme mode */
|
|
517
|
+
defaultMode?: ThemeMode;
|
|
518
|
+
/** URL to load theme from */
|
|
519
|
+
themeUrl?: string;
|
|
520
|
+
/** Custom light theme overrides */
|
|
521
|
+
light?: DeepPartial<Theme>;
|
|
522
|
+
/** Custom dark theme overrides */
|
|
523
|
+
dark?: DeepPartial<Theme>;
|
|
524
|
+
/** Brand identity to apply */
|
|
525
|
+
brandIdentity?: BrandIdentity;
|
|
526
|
+
/** Enable system theme detection */
|
|
527
|
+
enableSystemTheme?: boolean;
|
|
528
|
+
/** Persist theme preference */
|
|
529
|
+
persistTheme?: boolean;
|
|
530
|
+
/** Storage key for persistence */
|
|
531
|
+
storageKey?: string;
|
|
532
|
+
/** CSS variable prefix */
|
|
533
|
+
cssVarPrefix?: string;
|
|
534
|
+
}
|
|
535
|
+
interface ThemeContextValue {
|
|
536
|
+
/** Current theme */
|
|
537
|
+
theme: Theme;
|
|
538
|
+
/** Current mode */
|
|
539
|
+
mode: ThemeMode;
|
|
540
|
+
/** Set theme mode */
|
|
541
|
+
setMode: (mode: ThemeMode) => void;
|
|
542
|
+
/** Toggle between light/dark */
|
|
543
|
+
toggleMode: () => void;
|
|
544
|
+
/** Update theme */
|
|
545
|
+
updateTheme: (updates: DeepPartial<Theme>) => void;
|
|
546
|
+
/** Reset to default theme */
|
|
547
|
+
resetTheme: () => void;
|
|
548
|
+
/** Check if dark mode */
|
|
549
|
+
isDark: boolean;
|
|
550
|
+
/** Check if light mode */
|
|
551
|
+
isLight: boolean;
|
|
552
|
+
/** Loading state (for URL themes) */
|
|
553
|
+
isLoading: boolean;
|
|
554
|
+
/** Error state */
|
|
555
|
+
error: string | null;
|
|
556
|
+
}
|
|
557
|
+
type DeepPartial<T> = {
|
|
558
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* Default Light Theme
|
|
563
|
+
* Complete theme definition with all micro-level customizations
|
|
564
|
+
*/
|
|
565
|
+
|
|
566
|
+
declare const defaultLightTheme: Theme;
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* Default Dark Theme
|
|
570
|
+
* Complete dark theme with all micro-level customizations
|
|
571
|
+
*/
|
|
572
|
+
|
|
573
|
+
declare const defaultDarkTheme: Theme;
|
|
574
|
+
|
|
575
|
+
/**
|
|
576
|
+
* Theme Utilities
|
|
577
|
+
* Functions for theme manipulation, loading, and CSS variable generation
|
|
578
|
+
*/
|
|
579
|
+
|
|
580
|
+
/**
|
|
581
|
+
* Deep merge two objects
|
|
582
|
+
*/
|
|
583
|
+
declare function deepMerge<T extends object>(target: T, source: DeepPartial<T>): T;
|
|
584
|
+
/**
|
|
585
|
+
* Generate theme colors from brand identity
|
|
586
|
+
*/
|
|
587
|
+
declare function createThemeFromBrand(brand: BrandIdentity, baseTheme?: Theme): Theme;
|
|
588
|
+
/**
|
|
589
|
+
* Adjust color brightness
|
|
590
|
+
* @param hex - Hex color
|
|
591
|
+
* @param percent - Positive to lighten, negative to darken
|
|
592
|
+
*/
|
|
593
|
+
declare function adjustColor(hex: string, percent: number): string;
|
|
594
|
+
/**
|
|
595
|
+
* Convert hex to rgba
|
|
596
|
+
*/
|
|
597
|
+
declare function hexToRgba(hex: string, alpha?: number): string;
|
|
598
|
+
/**
|
|
599
|
+
* Get contrasting text color (black or white)
|
|
600
|
+
*/
|
|
601
|
+
declare function getContrastColor(hex: string): string;
|
|
602
|
+
/**
|
|
603
|
+
* Flatten nested object to CSS variables
|
|
604
|
+
*/
|
|
605
|
+
declare function flattenToCssVars(obj: Record<string, unknown>, prefix?: string): Record<string, string>;
|
|
606
|
+
/**
|
|
607
|
+
* Generate CSS variables string from theme
|
|
608
|
+
*/
|
|
609
|
+
declare function generateCssVars(theme: Theme, prefix?: string): string;
|
|
610
|
+
/**
|
|
611
|
+
* Inject CSS variables into document
|
|
612
|
+
*/
|
|
613
|
+
declare function injectCssVars(theme: Theme, prefix?: string): void;
|
|
614
|
+
/**
|
|
615
|
+
* Remove CSS variables from document
|
|
616
|
+
*/
|
|
617
|
+
declare function removeCssVars(prefix?: string): void;
|
|
618
|
+
/**
|
|
619
|
+
* Load theme from URL
|
|
620
|
+
*/
|
|
621
|
+
declare function loadThemeFromUrl(url: string): Promise<DeepPartial<Theme> | null>;
|
|
622
|
+
/**
|
|
623
|
+
* Create theme with config
|
|
624
|
+
*/
|
|
625
|
+
declare function createTheme(config?: ThemeConfig): Promise<{
|
|
626
|
+
light: Theme;
|
|
627
|
+
dark: Theme;
|
|
628
|
+
}>;
|
|
629
|
+
/**
|
|
630
|
+
* Save theme mode to storage
|
|
631
|
+
*/
|
|
632
|
+
declare function saveThemeMode(mode: ThemeMode, storageKey?: string): void;
|
|
633
|
+
/**
|
|
634
|
+
* Load theme mode from storage
|
|
635
|
+
*/
|
|
636
|
+
declare function loadThemeMode(storageKey?: string): ThemeMode | null;
|
|
637
|
+
/**
|
|
638
|
+
* Get system preferred color scheme
|
|
639
|
+
*/
|
|
640
|
+
declare function getSystemColorScheme(): 'light' | 'dark';
|
|
641
|
+
/**
|
|
642
|
+
* Resolve theme mode (handle 'system')
|
|
643
|
+
*/
|
|
644
|
+
declare function resolveThemeMode(mode: ThemeMode): 'light' | 'dark';
|
|
645
|
+
|
|
646
|
+
/**
|
|
647
|
+
* ThemeProvider Component
|
|
648
|
+
* Global theme provider with light/dark mode support and brand identity integration
|
|
649
|
+
*/
|
|
650
|
+
|
|
651
|
+
declare const ThemeContext: React.Context<ThemeContextValue | null>;
|
|
652
|
+
/**
|
|
653
|
+
* Hook to access theme context
|
|
654
|
+
*/
|
|
655
|
+
declare function useTheme(): ThemeContextValue;
|
|
656
|
+
interface ThemeProviderProps {
|
|
657
|
+
children: React.ReactNode;
|
|
658
|
+
config?: ThemeConfig;
|
|
659
|
+
/** Initial theme (overrides config) */
|
|
660
|
+
initialTheme?: Theme;
|
|
661
|
+
}
|
|
662
|
+
declare function ThemeProvider({ children, config, initialTheme, }: ThemeProviderProps): React.ReactElement;
|
|
663
|
+
/**
|
|
664
|
+
* Get CSS variable value from theme path
|
|
665
|
+
* @example cssVar('colors.brand.primary') => 'var(--ec-colors-brand-primary)'
|
|
666
|
+
*/
|
|
667
|
+
declare function cssVar(path: string, prefix?: string): string;
|
|
668
|
+
/**
|
|
669
|
+
* Get theme value directly
|
|
670
|
+
*/
|
|
671
|
+
declare function useThemeValue<T>(selector: (theme: Theme) => T): T;
|
|
672
|
+
interface ThemeToggleProps {
|
|
673
|
+
className?: string;
|
|
674
|
+
size?: number;
|
|
675
|
+
showLabel?: boolean;
|
|
676
|
+
lightLabel?: string;
|
|
677
|
+
darkLabel?: string;
|
|
678
|
+
}
|
|
679
|
+
declare function ThemeToggle({ className, size, showLabel, lightLabel, darkLabel, }: ThemeToggleProps): React.ReactElement;
|
|
680
|
+
|
|
681
|
+
/**
|
|
682
|
+
* Astro Component Types
|
|
683
|
+
* Highly typed props for all Astro components with Tailwind class support
|
|
684
|
+
*/
|
|
685
|
+
/** Common Tailwind text colors */
|
|
686
|
+
type TailwindTextColor = 'text-white' | 'text-black' | 'text-gray-50' | 'text-gray-100' | 'text-gray-200' | 'text-gray-300' | 'text-gray-400' | 'text-gray-500' | 'text-gray-600' | 'text-gray-700' | 'text-gray-800' | 'text-gray-900' | 'text-slate-50' | 'text-slate-100' | 'text-slate-200' | 'text-slate-300' | 'text-slate-400' | 'text-slate-500' | 'text-slate-600' | 'text-slate-700' | 'text-slate-800' | 'text-slate-900' | 'text-blue-500' | 'text-blue-600' | 'text-blue-700' | 'text-green-500' | 'text-green-600' | 'text-green-700' | 'text-red-500' | 'text-red-600' | 'text-red-700' | 'text-yellow-500' | 'text-yellow-600' | 'text-yellow-700' | 'text-purple-500' | 'text-purple-600' | 'text-purple-700' | 'text-pink-500' | 'text-pink-600' | 'text-pink-700' | 'text-indigo-500' | 'text-indigo-600' | 'text-indigo-700' | string;
|
|
687
|
+
/** Common Tailwind background colors */
|
|
688
|
+
type TailwindBgColor = 'bg-white' | 'bg-black' | 'bg-transparent' | 'bg-gray-50' | 'bg-gray-100' | 'bg-gray-200' | 'bg-gray-300' | 'bg-gray-400' | 'bg-gray-500' | 'bg-gray-600' | 'bg-gray-700' | 'bg-gray-800' | 'bg-gray-900' | 'bg-slate-50' | 'bg-slate-100' | 'bg-slate-200' | 'bg-slate-300' | 'bg-slate-400' | 'bg-slate-500' | 'bg-slate-600' | 'bg-slate-700' | 'bg-slate-800' | 'bg-slate-900' | 'bg-blue-500' | 'bg-blue-600' | 'bg-blue-700' | 'bg-green-500' | 'bg-green-600' | 'bg-green-700' | 'bg-red-500' | 'bg-red-600' | 'bg-red-700' | 'bg-yellow-500' | 'bg-yellow-600' | 'bg-yellow-700' | 'bg-purple-500' | 'bg-purple-600' | 'bg-purple-700' | 'bg-gradient-to-r' | 'bg-gradient-to-l' | 'bg-gradient-to-t' | 'bg-gradient-to-b' | 'bg-gradient-to-br' | 'bg-gradient-to-bl' | 'bg-gradient-to-tr' | 'bg-gradient-to-tl' | string;
|
|
689
|
+
/** Common Tailwind padding */
|
|
690
|
+
type TailwindPadding = 'p-0' | 'p-1' | 'p-2' | 'p-3' | 'p-4' | 'p-5' | 'p-6' | 'p-8' | 'p-10' | 'p-12' | 'p-16' | 'p-20' | 'p-24' | 'px-0' | 'px-1' | 'px-2' | 'px-3' | 'px-4' | 'px-5' | 'px-6' | 'px-8' | 'px-10' | 'px-12' | 'px-16' | 'py-0' | 'py-1' | 'py-2' | 'py-3' | 'py-4' | 'py-5' | 'py-6' | 'py-8' | 'py-10' | 'py-12' | 'py-16' | 'py-20' | 'py-24' | 'pt-0' | 'pt-4' | 'pt-8' | 'pt-12' | 'pt-16' | 'pt-20' | 'pt-24' | 'pb-0' | 'pb-4' | 'pb-8' | 'pb-12' | 'pb-16' | 'pb-20' | 'pb-24' | string;
|
|
691
|
+
/** Common Tailwind margin */
|
|
692
|
+
type TailwindMargin = 'm-0' | 'm-1' | 'm-2' | 'm-3' | 'm-4' | 'm-5' | 'm-6' | 'm-8' | 'm-auto' | 'mx-auto' | 'mx-0' | 'mx-4' | 'mx-6' | 'mx-8' | 'my-0' | 'my-4' | 'my-6' | 'my-8' | 'my-10' | 'my-12' | 'my-16' | 'mt-0' | 'mt-2' | 'mt-4' | 'mt-6' | 'mt-8' | 'mt-10' | 'mt-12' | 'mt-16' | 'mb-0' | 'mb-2' | 'mb-4' | 'mb-6' | 'mb-8' | 'mb-10' | 'mb-12' | 'mb-16' | 'ml-auto' | 'mr-auto' | string;
|
|
693
|
+
/** Common Tailwind font sizes */
|
|
694
|
+
type TailwindFontSize = 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'text-2xl' | 'text-3xl' | 'text-4xl' | 'text-5xl' | 'text-6xl' | 'text-7xl' | 'text-8xl' | 'text-9xl' | string;
|
|
695
|
+
/** Common Tailwind font weights */
|
|
696
|
+
type TailwindFontWeight = 'font-thin' | 'font-extralight' | 'font-light' | 'font-normal' | 'font-medium' | 'font-semibold' | 'font-bold' | 'font-extrabold' | 'font-black' | string;
|
|
697
|
+
/** Common Tailwind border radius */
|
|
698
|
+
type TailwindBorderRadius = 'rounded-none' | 'rounded-sm' | 'rounded' | 'rounded-md' | 'rounded-lg' | 'rounded-xl' | 'rounded-2xl' | 'rounded-3xl' | 'rounded-full' | string;
|
|
699
|
+
/** Common Tailwind shadow */
|
|
700
|
+
type TailwindShadow = 'shadow-none' | 'shadow-sm' | 'shadow' | 'shadow-md' | 'shadow-lg' | 'shadow-xl' | 'shadow-2xl' | 'shadow-inner' | string;
|
|
701
|
+
/** Common Tailwind width */
|
|
702
|
+
type TailwindWidth = 'w-full' | 'w-screen' | 'w-auto' | 'w-fit' | 'w-max' | 'w-min' | 'w-1/2' | 'w-1/3' | 'w-2/3' | 'w-1/4' | 'w-3/4' | 'w-1/5' | 'w-2/5' | 'w-3/5' | 'w-4/5' | 'w-8' | 'w-10' | 'w-12' | 'w-16' | 'w-20' | 'w-24' | 'w-32' | 'w-40' | 'w-48' | 'w-56' | 'w-64' | 'max-w-sm' | 'max-w-md' | 'max-w-lg' | 'max-w-xl' | 'max-w-2xl' | 'max-w-3xl' | 'max-w-4xl' | 'max-w-5xl' | 'max-w-6xl' | 'max-w-7xl' | 'max-w-full' | string;
|
|
703
|
+
/** Common Tailwind height */
|
|
704
|
+
type TailwindHeight = 'h-full' | 'h-screen' | 'h-auto' | 'h-fit' | 'h-max' | 'h-min' | 'h-8' | 'h-10' | 'h-12' | 'h-16' | 'h-20' | 'h-24' | 'h-32' | 'h-40' | 'h-48' | 'h-56' | 'h-64' | 'min-h-screen' | 'min-h-full' | string;
|
|
705
|
+
/** Common Tailwind gap */
|
|
706
|
+
type TailwindGap = 'gap-0' | 'gap-1' | 'gap-2' | 'gap-3' | 'gap-4' | 'gap-5' | 'gap-6' | 'gap-8' | 'gap-10' | 'gap-12' | 'gap-x-0' | 'gap-x-2' | 'gap-x-4' | 'gap-x-6' | 'gap-x-8' | 'gap-y-0' | 'gap-y-2' | 'gap-y-4' | 'gap-y-6' | 'gap-y-8' | string;
|
|
707
|
+
/** Custom class string */
|
|
708
|
+
type TailwindClasses$1 = string;
|
|
709
|
+
type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'danger' | 'success';
|
|
710
|
+
type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
711
|
+
interface ButtonProps {
|
|
712
|
+
/** Button text content */
|
|
713
|
+
text: string;
|
|
714
|
+
/** Button variant */
|
|
715
|
+
variant?: ButtonVariant;
|
|
716
|
+
/** Button size */
|
|
717
|
+
size?: ButtonSize;
|
|
718
|
+
/** Full width button */
|
|
719
|
+
fullWidth?: boolean;
|
|
720
|
+
/** Disabled state */
|
|
721
|
+
disabled?: boolean;
|
|
722
|
+
/** Button type */
|
|
723
|
+
type?: 'button' | 'submit' | 'reset';
|
|
724
|
+
/** Link href (renders as anchor) */
|
|
725
|
+
href?: string;
|
|
726
|
+
/** Open in new tab */
|
|
727
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
728
|
+
/** Left icon (SVG string or component) */
|
|
729
|
+
leftIcon?: string;
|
|
730
|
+
/** Right icon (SVG string or component) */
|
|
731
|
+
rightIcon?: string;
|
|
732
|
+
/** Additional class override */
|
|
733
|
+
class?: TailwindClasses$1;
|
|
734
|
+
/** Container class */
|
|
735
|
+
containerClass?: TailwindClasses$1;
|
|
736
|
+
/** ID attribute */
|
|
737
|
+
id?: string;
|
|
738
|
+
/** Aria label */
|
|
739
|
+
ariaLabel?: string;
|
|
740
|
+
}
|
|
741
|
+
type LoaderVariant = 'spinner' | 'dots' | 'pulse' | 'bars';
|
|
742
|
+
type LoaderSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
743
|
+
interface LoaderProps {
|
|
744
|
+
/** Loader variant */
|
|
745
|
+
variant?: LoaderVariant;
|
|
746
|
+
/** Loader size */
|
|
747
|
+
size?: LoaderSize;
|
|
748
|
+
/** Custom color */
|
|
749
|
+
color?: TailwindTextColor;
|
|
750
|
+
/** Label text */
|
|
751
|
+
label?: string;
|
|
752
|
+
/** Show label */
|
|
753
|
+
showLabel?: boolean;
|
|
754
|
+
/** Additional classes */
|
|
755
|
+
class?: TailwindClasses$1;
|
|
756
|
+
}
|
|
757
|
+
interface ContainerProps {
|
|
758
|
+
/** Max width */
|
|
759
|
+
maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | 'full';
|
|
760
|
+
/** Padding */
|
|
761
|
+
padding?: TailwindPadding;
|
|
762
|
+
/** Center content */
|
|
763
|
+
centered?: boolean;
|
|
764
|
+
/** Additional classes */
|
|
765
|
+
class?: TailwindClasses$1;
|
|
766
|
+
}
|
|
767
|
+
interface RowProps {
|
|
768
|
+
/** Gap between columns */
|
|
769
|
+
gap?: TailwindGap;
|
|
770
|
+
/** Vertical alignment */
|
|
771
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
|
|
772
|
+
/** Horizontal alignment */
|
|
773
|
+
justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
|
|
774
|
+
/** Wrap behavior */
|
|
775
|
+
wrap?: boolean;
|
|
776
|
+
/** Reverse order */
|
|
777
|
+
reverse?: boolean;
|
|
778
|
+
/** Additional classes */
|
|
779
|
+
class?: TailwindClasses$1;
|
|
780
|
+
}
|
|
781
|
+
interface ColProps {
|
|
782
|
+
/** Column span (1-12) */
|
|
783
|
+
span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
|
|
784
|
+
/** Span on sm screens */
|
|
785
|
+
sm?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
|
|
786
|
+
/** Span on md screens */
|
|
787
|
+
md?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
|
|
788
|
+
/** Span on lg screens */
|
|
789
|
+
lg?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
|
|
790
|
+
/** Span on xl screens */
|
|
791
|
+
xl?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 'auto' | 'full';
|
|
792
|
+
/** Additional classes */
|
|
793
|
+
class?: TailwindClasses$1;
|
|
794
|
+
}
|
|
795
|
+
interface TwoColumnProps {
|
|
796
|
+
/** Left column content ratio */
|
|
797
|
+
leftRatio?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
|
|
798
|
+
/** Gap between columns */
|
|
799
|
+
gap?: TailwindGap;
|
|
800
|
+
/** Reverse on mobile */
|
|
801
|
+
reverseMobile?: boolean;
|
|
802
|
+
/** Vertical alignment */
|
|
803
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch';
|
|
804
|
+
/** Additional classes */
|
|
805
|
+
class?: TailwindClasses$1;
|
|
806
|
+
/** Left column class */
|
|
807
|
+
leftClass?: TailwindClasses$1;
|
|
808
|
+
/** Right column class */
|
|
809
|
+
rightClass?: TailwindClasses$1;
|
|
810
|
+
}
|
|
811
|
+
interface ThreeColumnProps {
|
|
812
|
+
/** Gap between columns */
|
|
813
|
+
gap?: TailwindGap;
|
|
814
|
+
/** Vertical alignment */
|
|
815
|
+
alignItems?: 'start' | 'center' | 'end' | 'stretch';
|
|
816
|
+
/** Additional classes */
|
|
817
|
+
class?: TailwindClasses$1;
|
|
818
|
+
/** Column 1 class */
|
|
819
|
+
col1Class?: TailwindClasses$1;
|
|
820
|
+
/** Column 2 class */
|
|
821
|
+
col2Class?: TailwindClasses$1;
|
|
822
|
+
/** Column 3 class */
|
|
823
|
+
col3Class?: TailwindClasses$1;
|
|
824
|
+
}
|
|
825
|
+
interface NavLink {
|
|
826
|
+
/** Link text */
|
|
827
|
+
text: string;
|
|
828
|
+
/** Link URL */
|
|
829
|
+
href: string;
|
|
830
|
+
/** Active state */
|
|
831
|
+
active?: boolean;
|
|
832
|
+
/** Open in new tab */
|
|
833
|
+
external?: boolean;
|
|
834
|
+
/** Dropdown items */
|
|
835
|
+
children?: NavLink[];
|
|
836
|
+
/** Icon SVG string */
|
|
837
|
+
icon?: string;
|
|
838
|
+
}
|
|
839
|
+
interface HeaderProps {
|
|
840
|
+
/** Logo image URL */
|
|
841
|
+
logo?: string;
|
|
842
|
+
/** Logo alt text */
|
|
843
|
+
logoAlt?: string;
|
|
844
|
+
/** Logo text (if no image) */
|
|
845
|
+
logoText?: string;
|
|
846
|
+
/** Navigation links */
|
|
847
|
+
navLinks?: NavLink[];
|
|
848
|
+
/** CTA button */
|
|
849
|
+
cta?: {
|
|
850
|
+
text: string;
|
|
851
|
+
href: string;
|
|
852
|
+
variant?: ButtonVariant;
|
|
853
|
+
};
|
|
854
|
+
/** Sticky header */
|
|
855
|
+
sticky?: boolean;
|
|
856
|
+
/** Transparent background */
|
|
857
|
+
transparent?: boolean;
|
|
858
|
+
/** Background class */
|
|
859
|
+
bgClass?: TailwindBgColor;
|
|
860
|
+
/** Text color class */
|
|
861
|
+
textClass?: TailwindTextColor;
|
|
862
|
+
/** Additional classes */
|
|
863
|
+
class?: TailwindClasses$1;
|
|
864
|
+
/** Logo class */
|
|
865
|
+
logoClass?: TailwindClasses$1;
|
|
866
|
+
/** Nav class */
|
|
867
|
+
navClass?: TailwindClasses$1;
|
|
868
|
+
/** Container max width */
|
|
869
|
+
maxWidth?: ContainerProps['maxWidth'];
|
|
870
|
+
}
|
|
871
|
+
interface FooterColumn {
|
|
872
|
+
/** Column title */
|
|
873
|
+
title: string;
|
|
874
|
+
/** Column links */
|
|
875
|
+
links: NavLink[];
|
|
876
|
+
}
|
|
877
|
+
interface SocialLink {
|
|
878
|
+
/** Platform name */
|
|
879
|
+
platform: 'facebook' | 'twitter' | 'instagram' | 'linkedin' | 'youtube' | 'github' | 'discord' | 'tiktok';
|
|
880
|
+
/** Profile URL */
|
|
881
|
+
href: string;
|
|
882
|
+
/** Icon SVG (optional, defaults based on platform) */
|
|
883
|
+
icon?: string;
|
|
884
|
+
}
|
|
885
|
+
interface FooterProps {
|
|
886
|
+
/** Logo image URL */
|
|
887
|
+
logo?: string;
|
|
888
|
+
/** Logo alt text */
|
|
889
|
+
logoAlt?: string;
|
|
890
|
+
/** Logo text */
|
|
891
|
+
logoText?: string;
|
|
892
|
+
/** Company description */
|
|
893
|
+
description?: string;
|
|
894
|
+
/** Footer columns */
|
|
895
|
+
columns?: FooterColumn[];
|
|
896
|
+
/** Social links */
|
|
897
|
+
socialLinks?: SocialLink[];
|
|
898
|
+
/** Copyright text */
|
|
899
|
+
copyright?: string;
|
|
900
|
+
/** Background class */
|
|
901
|
+
bgClass?: TailwindBgColor;
|
|
902
|
+
/** Text color class */
|
|
903
|
+
textClass?: TailwindTextColor;
|
|
904
|
+
/** Additional classes */
|
|
905
|
+
class?: TailwindClasses$1;
|
|
906
|
+
/** Container max width */
|
|
907
|
+
maxWidth?: ContainerProps['maxWidth'];
|
|
908
|
+
/** Show newsletter signup */
|
|
909
|
+
showNewsletter?: boolean;
|
|
910
|
+
/** Newsletter title */
|
|
911
|
+
newsletterTitle?: string;
|
|
912
|
+
/** Newsletter description */
|
|
913
|
+
newsletterDescription?: string;
|
|
914
|
+
}
|
|
915
|
+
interface BannerProps {
|
|
916
|
+
/** Main heading */
|
|
917
|
+
title: string;
|
|
918
|
+
/** Subtitle/description */
|
|
919
|
+
subtitle?: string;
|
|
920
|
+
/** Background image URL */
|
|
921
|
+
backgroundImage?: string;
|
|
922
|
+
/** Background gradient/color */
|
|
923
|
+
bgClass?: TailwindBgColor;
|
|
924
|
+
/** Text color */
|
|
925
|
+
textClass?: TailwindTextColor;
|
|
926
|
+
/** Overlay opacity (0-100) */
|
|
927
|
+
overlayOpacity?: number;
|
|
928
|
+
/** Overlay color class */
|
|
929
|
+
overlayClass?: string;
|
|
930
|
+
/** Primary CTA */
|
|
931
|
+
primaryCta?: {
|
|
932
|
+
text: string;
|
|
933
|
+
href: string;
|
|
934
|
+
variant?: ButtonVariant;
|
|
935
|
+
};
|
|
936
|
+
/** Secondary CTA */
|
|
937
|
+
secondaryCta?: {
|
|
938
|
+
text: string;
|
|
939
|
+
href: string;
|
|
940
|
+
variant?: ButtonVariant;
|
|
941
|
+
};
|
|
942
|
+
/** Banner height */
|
|
943
|
+
height?: 'sm' | 'md' | 'lg' | 'xl' | 'screen';
|
|
944
|
+
/** Content alignment */
|
|
945
|
+
align?: 'left' | 'center' | 'right';
|
|
946
|
+
/** Additional classes */
|
|
947
|
+
class?: TailwindClasses$1;
|
|
948
|
+
/** Title class */
|
|
949
|
+
titleClass?: TailwindClasses$1;
|
|
950
|
+
/** Subtitle class */
|
|
951
|
+
subtitleClass?: TailwindClasses$1;
|
|
952
|
+
/** Content container class */
|
|
953
|
+
contentClass?: TailwindClasses$1;
|
|
954
|
+
}
|
|
955
|
+
interface CtaSectionProps {
|
|
956
|
+
/** Main heading */
|
|
957
|
+
title: string;
|
|
958
|
+
/** Description text */
|
|
959
|
+
description?: string;
|
|
960
|
+
/** Primary button */
|
|
961
|
+
primaryButton?: {
|
|
962
|
+
text: string;
|
|
963
|
+
href: string;
|
|
964
|
+
variant?: ButtonVariant;
|
|
965
|
+
};
|
|
966
|
+
/** Secondary button */
|
|
967
|
+
secondaryButton?: {
|
|
968
|
+
text: string;
|
|
969
|
+
href: string;
|
|
970
|
+
variant?: ButtonVariant;
|
|
971
|
+
};
|
|
972
|
+
/** Background class */
|
|
973
|
+
bgClass?: TailwindBgColor;
|
|
974
|
+
/** Text color */
|
|
975
|
+
textClass?: TailwindTextColor;
|
|
976
|
+
/** Content alignment */
|
|
977
|
+
align?: 'left' | 'center' | 'right';
|
|
978
|
+
/** Additional classes */
|
|
979
|
+
class?: TailwindClasses$1;
|
|
980
|
+
/** Padding */
|
|
981
|
+
padding?: TailwindPadding;
|
|
982
|
+
}
|
|
983
|
+
interface NewsletterSectionProps {
|
|
984
|
+
/** Main heading */
|
|
985
|
+
title?: string;
|
|
986
|
+
/** Description text */
|
|
987
|
+
description?: string;
|
|
988
|
+
/** Placeholder text */
|
|
989
|
+
placeholder?: string;
|
|
990
|
+
/** Submit button text */
|
|
991
|
+
buttonText?: string;
|
|
992
|
+
/** Success message */
|
|
993
|
+
successMessage?: string;
|
|
994
|
+
/** Error message */
|
|
995
|
+
errorMessage?: string;
|
|
996
|
+
/** Form action URL */
|
|
997
|
+
actionUrl?: string;
|
|
998
|
+
/** Background class */
|
|
999
|
+
bgClass?: TailwindBgColor;
|
|
1000
|
+
/** Text color */
|
|
1001
|
+
textClass?: TailwindTextColor;
|
|
1002
|
+
/** Additional classes */
|
|
1003
|
+
class?: TailwindClasses$1;
|
|
1004
|
+
/** Input class */
|
|
1005
|
+
inputClass?: TailwindClasses$1;
|
|
1006
|
+
/** Button class */
|
|
1007
|
+
buttonClass?: TailwindClasses$1;
|
|
1008
|
+
/** Show privacy note */
|
|
1009
|
+
showPrivacyNote?: boolean;
|
|
1010
|
+
/** Privacy note text */
|
|
1011
|
+
privacyNote?: string;
|
|
1012
|
+
}
|
|
1013
|
+
interface CardProps {
|
|
1014
|
+
/** Card title */
|
|
1015
|
+
title?: string;
|
|
1016
|
+
/** Card description */
|
|
1017
|
+
description?: string;
|
|
1018
|
+
/** Card image URL */
|
|
1019
|
+
image?: string;
|
|
1020
|
+
/** Image alt text */
|
|
1021
|
+
imageAlt?: string;
|
|
1022
|
+
/** Image position */
|
|
1023
|
+
imagePosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
1024
|
+
/** Card link */
|
|
1025
|
+
href?: string;
|
|
1026
|
+
/** Background class */
|
|
1027
|
+
bgClass?: TailwindBgColor;
|
|
1028
|
+
/** Text color */
|
|
1029
|
+
textClass?: TailwindTextColor;
|
|
1030
|
+
/** Border radius */
|
|
1031
|
+
rounded?: TailwindBorderRadius;
|
|
1032
|
+
/** Shadow */
|
|
1033
|
+
shadow?: TailwindShadow;
|
|
1034
|
+
/** Hover effect */
|
|
1035
|
+
hoverEffect?: boolean;
|
|
1036
|
+
/** Additional classes */
|
|
1037
|
+
class?: TailwindClasses$1;
|
|
1038
|
+
/** Image class */
|
|
1039
|
+
imageClass?: TailwindClasses$1;
|
|
1040
|
+
/** Content class */
|
|
1041
|
+
contentClass?: TailwindClasses$1;
|
|
1042
|
+
/** Title class */
|
|
1043
|
+
titleClass?: TailwindClasses$1;
|
|
1044
|
+
/** Description class */
|
|
1045
|
+
descriptionClass?: TailwindClasses$1;
|
|
1046
|
+
/** Padding */
|
|
1047
|
+
padding?: TailwindPadding;
|
|
1048
|
+
}
|
|
1049
|
+
interface Feature {
|
|
1050
|
+
/** Feature title */
|
|
1051
|
+
title: string;
|
|
1052
|
+
/** Feature description */
|
|
1053
|
+
description: string;
|
|
1054
|
+
/** Feature icon (SVG string) */
|
|
1055
|
+
icon?: string;
|
|
1056
|
+
/** Feature image */
|
|
1057
|
+
image?: string;
|
|
1058
|
+
/** Feature link */
|
|
1059
|
+
href?: string;
|
|
1060
|
+
}
|
|
1061
|
+
interface FeatureSectionProps {
|
|
1062
|
+
/** Section title */
|
|
1063
|
+
title?: string;
|
|
1064
|
+
/** Section subtitle */
|
|
1065
|
+
subtitle?: string;
|
|
1066
|
+
/** Features array */
|
|
1067
|
+
features: Feature[];
|
|
1068
|
+
/** Layout columns */
|
|
1069
|
+
columns?: 2 | 3 | 4;
|
|
1070
|
+
/** Background class */
|
|
1071
|
+
bgClass?: TailwindBgColor;
|
|
1072
|
+
/** Text color */
|
|
1073
|
+
textClass?: TailwindTextColor;
|
|
1074
|
+
/** Additional classes */
|
|
1075
|
+
class?: TailwindClasses$1;
|
|
1076
|
+
/** Feature card class */
|
|
1077
|
+
featureClass?: TailwindClasses$1;
|
|
1078
|
+
/** Icon class */
|
|
1079
|
+
iconClass?: TailwindClasses$1;
|
|
1080
|
+
}
|
|
1081
|
+
interface Testimonial {
|
|
1082
|
+
/** Author name */
|
|
1083
|
+
name: string;
|
|
1084
|
+
/** Author role/title */
|
|
1085
|
+
role?: string;
|
|
1086
|
+
/** Author company */
|
|
1087
|
+
company?: string;
|
|
1088
|
+
/** Author avatar URL */
|
|
1089
|
+
avatar?: string;
|
|
1090
|
+
/** Testimonial text */
|
|
1091
|
+
text: string;
|
|
1092
|
+
/** Rating (1-5) */
|
|
1093
|
+
rating?: 1 | 2 | 3 | 4 | 5;
|
|
1094
|
+
}
|
|
1095
|
+
interface TestimonialSectionProps {
|
|
1096
|
+
/** Section title */
|
|
1097
|
+
title?: string;
|
|
1098
|
+
/** Section subtitle */
|
|
1099
|
+
subtitle?: string;
|
|
1100
|
+
/** Testimonials array */
|
|
1101
|
+
testimonials: Testimonial[];
|
|
1102
|
+
/** Layout style */
|
|
1103
|
+
layout?: 'grid' | 'carousel' | 'single';
|
|
1104
|
+
/** Background class */
|
|
1105
|
+
bgClass?: TailwindBgColor;
|
|
1106
|
+
/** Text color */
|
|
1107
|
+
textClass?: TailwindTextColor;
|
|
1108
|
+
/** Additional classes */
|
|
1109
|
+
class?: TailwindClasses$1;
|
|
1110
|
+
/** Testimonial card class */
|
|
1111
|
+
cardClass?: TailwindClasses$1;
|
|
1112
|
+
}
|
|
1113
|
+
interface PricingFeature {
|
|
1114
|
+
/** Feature text */
|
|
1115
|
+
text: string;
|
|
1116
|
+
/** Included or not */
|
|
1117
|
+
included: boolean;
|
|
1118
|
+
}
|
|
1119
|
+
interface PricingPlan {
|
|
1120
|
+
/** Plan name */
|
|
1121
|
+
name: string;
|
|
1122
|
+
/** Plan description */
|
|
1123
|
+
description?: string;
|
|
1124
|
+
/** Price */
|
|
1125
|
+
price: string;
|
|
1126
|
+
/** Price period */
|
|
1127
|
+
period?: string;
|
|
1128
|
+
/** Features list */
|
|
1129
|
+
features: PricingFeature[];
|
|
1130
|
+
/** CTA button text */
|
|
1131
|
+
ctaText: string;
|
|
1132
|
+
/** CTA button href */
|
|
1133
|
+
ctaHref: string;
|
|
1134
|
+
/** Highlighted/popular plan */
|
|
1135
|
+
popular?: boolean;
|
|
1136
|
+
/** Badge text */
|
|
1137
|
+
badge?: string;
|
|
1138
|
+
}
|
|
1139
|
+
interface PricingSectionProps {
|
|
1140
|
+
/** Section title */
|
|
1141
|
+
title?: string;
|
|
1142
|
+
/** Section subtitle */
|
|
1143
|
+
subtitle?: string;
|
|
1144
|
+
/** Pricing plans */
|
|
1145
|
+
plans: PricingPlan[];
|
|
1146
|
+
/** Background class */
|
|
1147
|
+
bgClass?: TailwindBgColor;
|
|
1148
|
+
/** Text color */
|
|
1149
|
+
textClass?: TailwindTextColor;
|
|
1150
|
+
/** Additional classes */
|
|
1151
|
+
class?: TailwindClasses$1;
|
|
1152
|
+
/** Plan card class */
|
|
1153
|
+
planClass?: TailwindClasses$1;
|
|
1154
|
+
}
|
|
1155
|
+
interface FaqItem {
|
|
1156
|
+
/** Question */
|
|
1157
|
+
question: string;
|
|
1158
|
+
/** Answer */
|
|
1159
|
+
answer: string;
|
|
1160
|
+
}
|
|
1161
|
+
interface FaqSectionProps {
|
|
1162
|
+
/** Section title */
|
|
1163
|
+
title?: string;
|
|
1164
|
+
/** Section subtitle */
|
|
1165
|
+
subtitle?: string;
|
|
1166
|
+
/** FAQ items */
|
|
1167
|
+
items: FaqItem[];
|
|
1168
|
+
/** Layout style */
|
|
1169
|
+
layout?: 'accordion' | 'grid' | 'list';
|
|
1170
|
+
/** Background class */
|
|
1171
|
+
bgClass?: TailwindBgColor;
|
|
1172
|
+
/** Text color */
|
|
1173
|
+
textClass?: TailwindTextColor;
|
|
1174
|
+
/** Additional classes */
|
|
1175
|
+
class?: TailwindClasses$1;
|
|
1176
|
+
}
|
|
1177
|
+
/** Generate dummy image URL */
|
|
1178
|
+
declare function dummyImage(width: number, height: number, text?: string, bgColor?: string, textColor?: string): string;
|
|
1179
|
+
/** Lorem ipsum generator */
|
|
1180
|
+
declare function loremIpsum(type?: 'word' | 'sentence' | 'paragraph', count?: number): string;
|
|
1181
|
+
declare const dummyHeaderData: HeaderProps;
|
|
1182
|
+
declare const dummyFooterData: FooterProps;
|
|
1183
|
+
declare const dummyBannerData: BannerProps;
|
|
1184
|
+
declare const dummyFeatures: Feature[];
|
|
1185
|
+
declare const dummyTestimonials: Testimonial[];
|
|
1186
|
+
declare const dummyPricingPlans: PricingPlan[];
|
|
1187
|
+
declare const dummyFaqItems: FaqItem[];
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Form Types
|
|
1191
|
+
* Types for all form components
|
|
1192
|
+
*/
|
|
1193
|
+
type TailwindClasses = string;
|
|
1194
|
+
interface FormFieldError {
|
|
1195
|
+
field: string;
|
|
1196
|
+
message: string;
|
|
1197
|
+
}
|
|
1198
|
+
interface FormSubmitResult {
|
|
1199
|
+
success: boolean;
|
|
1200
|
+
message?: string;
|
|
1201
|
+
errors?: FormFieldError[];
|
|
1202
|
+
data?: Record<string, unknown>;
|
|
1203
|
+
}
|
|
1204
|
+
interface ContactFormValues {
|
|
1205
|
+
name: string;
|
|
1206
|
+
email: string;
|
|
1207
|
+
phone?: string;
|
|
1208
|
+
subject?: string;
|
|
1209
|
+
message: string;
|
|
1210
|
+
}
|
|
1211
|
+
interface ContactFormProps {
|
|
1212
|
+
/** Form action URL */
|
|
1213
|
+
actionUrl?: string;
|
|
1214
|
+
/** Submit handler */
|
|
1215
|
+
onSubmit?: (values: ContactFormValues) => Promise<FormSubmitResult>;
|
|
1216
|
+
/** Initial values */
|
|
1217
|
+
initialValues?: Partial<ContactFormValues>;
|
|
1218
|
+
/** Show phone field */
|
|
1219
|
+
showPhone?: boolean;
|
|
1220
|
+
/** Show subject field */
|
|
1221
|
+
showSubject?: boolean;
|
|
1222
|
+
/** Subject options (if select) */
|
|
1223
|
+
subjectOptions?: string[];
|
|
1224
|
+
/** Submit button text */
|
|
1225
|
+
submitText?: string;
|
|
1226
|
+
/** Success message */
|
|
1227
|
+
successMessage?: string;
|
|
1228
|
+
/** Container class */
|
|
1229
|
+
className?: TailwindClasses;
|
|
1230
|
+
/** Form class */
|
|
1231
|
+
formClass?: TailwindClasses;
|
|
1232
|
+
/** Input class */
|
|
1233
|
+
inputClass?: TailwindClasses;
|
|
1234
|
+
/** Label class */
|
|
1235
|
+
labelClass?: TailwindClasses;
|
|
1236
|
+
/** Button class */
|
|
1237
|
+
buttonClass?: TailwindClasses;
|
|
1238
|
+
/** Error class */
|
|
1239
|
+
errorClass?: TailwindClasses;
|
|
1240
|
+
}
|
|
1241
|
+
interface NewsletterFormValues {
|
|
1242
|
+
email: string;
|
|
1243
|
+
firstName?: string;
|
|
1244
|
+
lastName?: string;
|
|
1245
|
+
}
|
|
1246
|
+
interface NewsletterFormProps {
|
|
1247
|
+
/** Form action URL */
|
|
1248
|
+
actionUrl?: string;
|
|
1249
|
+
/** Submit handler */
|
|
1250
|
+
onSubmit?: (values: NewsletterFormValues) => Promise<FormSubmitResult>;
|
|
1251
|
+
/** Initial values */
|
|
1252
|
+
initialValues?: Partial<NewsletterFormValues>;
|
|
1253
|
+
/** Show name fields */
|
|
1254
|
+
showName?: boolean;
|
|
1255
|
+
/** Placeholder */
|
|
1256
|
+
placeholder?: string;
|
|
1257
|
+
/** Submit button text */
|
|
1258
|
+
submitText?: string;
|
|
1259
|
+
/** Success message */
|
|
1260
|
+
successMessage?: string;
|
|
1261
|
+
/** Layout */
|
|
1262
|
+
layout?: 'inline' | 'stacked';
|
|
1263
|
+
/** Container class */
|
|
1264
|
+
className?: TailwindClasses;
|
|
1265
|
+
/** Form class */
|
|
1266
|
+
formClass?: TailwindClasses;
|
|
1267
|
+
/** Input class */
|
|
1268
|
+
inputClass?: TailwindClasses;
|
|
1269
|
+
/** Button class */
|
|
1270
|
+
buttonClass?: TailwindClasses;
|
|
1271
|
+
}
|
|
1272
|
+
interface LoginFormValues {
|
|
1273
|
+
email: string;
|
|
1274
|
+
password: string;
|
|
1275
|
+
rememberMe?: boolean;
|
|
1276
|
+
}
|
|
1277
|
+
interface LoginFormProps {
|
|
1278
|
+
/** Form action URL */
|
|
1279
|
+
actionUrl?: string;
|
|
1280
|
+
/** Submit handler */
|
|
1281
|
+
onSubmit?: (values: LoginFormValues) => Promise<FormSubmitResult>;
|
|
1282
|
+
/** Initial values */
|
|
1283
|
+
initialValues?: Partial<LoginFormValues>;
|
|
1284
|
+
/** Show remember me */
|
|
1285
|
+
showRememberMe?: boolean;
|
|
1286
|
+
/** Forgot password link */
|
|
1287
|
+
forgotPasswordLink?: string;
|
|
1288
|
+
/** Register link */
|
|
1289
|
+
registerLink?: string;
|
|
1290
|
+
/** Submit button text */
|
|
1291
|
+
submitText?: string;
|
|
1292
|
+
/** Success redirect URL */
|
|
1293
|
+
successRedirect?: string;
|
|
1294
|
+
/** Container class */
|
|
1295
|
+
className?: TailwindClasses;
|
|
1296
|
+
/** Form class */
|
|
1297
|
+
formClass?: TailwindClasses;
|
|
1298
|
+
/** Input class */
|
|
1299
|
+
inputClass?: TailwindClasses;
|
|
1300
|
+
/** Button class */
|
|
1301
|
+
buttonClass?: TailwindClasses;
|
|
1302
|
+
}
|
|
1303
|
+
interface RegisterFormValues {
|
|
1304
|
+
firstName: string;
|
|
1305
|
+
lastName: string;
|
|
1306
|
+
email: string;
|
|
1307
|
+
password: string;
|
|
1308
|
+
confirmPassword: string;
|
|
1309
|
+
acceptTerms: boolean;
|
|
1310
|
+
}
|
|
1311
|
+
interface RegisterFormProps {
|
|
1312
|
+
/** Form action URL */
|
|
1313
|
+
actionUrl?: string;
|
|
1314
|
+
/** Submit handler */
|
|
1315
|
+
onSubmit?: (values: RegisterFormValues) => Promise<FormSubmitResult>;
|
|
1316
|
+
/** Initial values */
|
|
1317
|
+
initialValues?: Partial<RegisterFormValues>;
|
|
1318
|
+
/** Terms link */
|
|
1319
|
+
termsLink?: string;
|
|
1320
|
+
/** Privacy link */
|
|
1321
|
+
privacyLink?: string;
|
|
1322
|
+
/** Login link */
|
|
1323
|
+
loginLink?: string;
|
|
1324
|
+
/** Submit button text */
|
|
1325
|
+
submitText?: string;
|
|
1326
|
+
/** Success redirect URL */
|
|
1327
|
+
successRedirect?: string;
|
|
1328
|
+
/** Password requirements */
|
|
1329
|
+
passwordRequirements?: {
|
|
1330
|
+
minLength?: number;
|
|
1331
|
+
requireUppercase?: boolean;
|
|
1332
|
+
requireLowercase?: boolean;
|
|
1333
|
+
requireNumber?: boolean;
|
|
1334
|
+
requireSpecial?: boolean;
|
|
1335
|
+
};
|
|
1336
|
+
/** Container class */
|
|
1337
|
+
className?: TailwindClasses;
|
|
1338
|
+
/** Form class */
|
|
1339
|
+
formClass?: TailwindClasses;
|
|
1340
|
+
/** Input class */
|
|
1341
|
+
inputClass?: TailwindClasses;
|
|
1342
|
+
/** Button class */
|
|
1343
|
+
buttonClass?: TailwindClasses;
|
|
1344
|
+
}
|
|
1345
|
+
declare const VALIDATION_MESSAGES: {
|
|
1346
|
+
readonly required: "This field is required";
|
|
1347
|
+
readonly email: "Please enter a valid email address";
|
|
1348
|
+
readonly phone: "Please enter a valid phone number";
|
|
1349
|
+
readonly minLength: (min: number) => string;
|
|
1350
|
+
readonly maxLength: (max: number) => string;
|
|
1351
|
+
readonly passwordMatch: "Passwords must match";
|
|
1352
|
+
readonly acceptTerms: "You must accept the terms and conditions";
|
|
1353
|
+
readonly passwordUppercase: "Password must contain at least one uppercase letter";
|
|
1354
|
+
readonly passwordLowercase: "Password must contain at least one lowercase letter";
|
|
1355
|
+
readonly passwordNumber: "Password must contain at least one number";
|
|
1356
|
+
readonly passwordSpecial: "Password must contain at least one special character";
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
/**
|
|
1360
|
+
* Form Validation Schemas
|
|
1361
|
+
* Yup validation schemas for all forms
|
|
1362
|
+
*/
|
|
1363
|
+
|
|
1364
|
+
declare const contactFormSchema: Yup.ObjectSchema<{
|
|
1365
|
+
name: string;
|
|
1366
|
+
email: string;
|
|
1367
|
+
phone: string | null | undefined;
|
|
1368
|
+
subject: string | null | undefined;
|
|
1369
|
+
message: string;
|
|
1370
|
+
}, Yup.AnyObject, {
|
|
1371
|
+
name: undefined;
|
|
1372
|
+
email: undefined;
|
|
1373
|
+
phone: undefined;
|
|
1374
|
+
subject: undefined;
|
|
1375
|
+
message: undefined;
|
|
1376
|
+
}, "">;
|
|
1377
|
+
declare const newsletterFormSchema: Yup.ObjectSchema<{
|
|
1378
|
+
email: string;
|
|
1379
|
+
firstName: string | null | undefined;
|
|
1380
|
+
lastName: string | null | undefined;
|
|
1381
|
+
}, Yup.AnyObject, {
|
|
1382
|
+
email: undefined;
|
|
1383
|
+
firstName: undefined;
|
|
1384
|
+
lastName: undefined;
|
|
1385
|
+
}, "">;
|
|
1386
|
+
declare const loginFormSchema: Yup.ObjectSchema<{
|
|
1387
|
+
email: string;
|
|
1388
|
+
password: string;
|
|
1389
|
+
rememberMe: boolean | undefined;
|
|
1390
|
+
}, Yup.AnyObject, {
|
|
1391
|
+
email: undefined;
|
|
1392
|
+
password: undefined;
|
|
1393
|
+
rememberMe: undefined;
|
|
1394
|
+
}, "">;
|
|
1395
|
+
interface PasswordRequirements {
|
|
1396
|
+
minLength?: number;
|
|
1397
|
+
requireUppercase?: boolean;
|
|
1398
|
+
requireLowercase?: boolean;
|
|
1399
|
+
requireNumber?: boolean;
|
|
1400
|
+
requireSpecial?: boolean;
|
|
1401
|
+
}
|
|
1402
|
+
declare function createRegisterFormSchema(requirements?: PasswordRequirements): Yup.ObjectSchema<{
|
|
1403
|
+
firstName: string;
|
|
1404
|
+
lastName: string;
|
|
1405
|
+
email: string;
|
|
1406
|
+
password: string;
|
|
1407
|
+
confirmPassword: string;
|
|
1408
|
+
acceptTerms: boolean | undefined;
|
|
1409
|
+
}, Yup.AnyObject, {
|
|
1410
|
+
firstName: undefined;
|
|
1411
|
+
lastName: undefined;
|
|
1412
|
+
email: undefined;
|
|
1413
|
+
password: undefined;
|
|
1414
|
+
confirmPassword: undefined;
|
|
1415
|
+
acceptTerms: undefined;
|
|
1416
|
+
}, "">;
|
|
1417
|
+
declare const registerFormSchema: Yup.ObjectSchema<{
|
|
1418
|
+
firstName: string;
|
|
1419
|
+
lastName: string;
|
|
1420
|
+
email: string;
|
|
1421
|
+
password: string;
|
|
1422
|
+
confirmPassword: string;
|
|
1423
|
+
acceptTerms: boolean | undefined;
|
|
1424
|
+
}, Yup.AnyObject, {
|
|
1425
|
+
firstName: undefined;
|
|
1426
|
+
lastName: undefined;
|
|
1427
|
+
email: undefined;
|
|
1428
|
+
password: undefined;
|
|
1429
|
+
confirmPassword: undefined;
|
|
1430
|
+
acceptTerms: undefined;
|
|
1431
|
+
}, "">;
|
|
1432
|
+
|
|
1433
|
+
/**
|
|
1434
|
+
* Contact Form Component
|
|
1435
|
+
* React form with Formik and Yup validation
|
|
1436
|
+
*/
|
|
1437
|
+
|
|
1438
|
+
declare function ContactForm({ actionUrl, onSubmit, initialValues, showPhone, showSubject, subjectOptions, submitText, successMessage, className, formClass, inputClass, labelClass, buttonClass, errorClass, }: ContactFormProps): React.ReactElement;
|
|
1439
|
+
|
|
1440
|
+
/**
|
|
1441
|
+
* Newsletter Form Component
|
|
1442
|
+
* React form with Formik and Yup validation
|
|
1443
|
+
*/
|
|
1444
|
+
|
|
1445
|
+
declare function NewsletterForm({ actionUrl, onSubmit, initialValues, showName, placeholder, submitText, successMessage, layout, className, formClass, inputClass, buttonClass, }: NewsletterFormProps): React.ReactElement;
|
|
1446
|
+
|
|
1447
|
+
/**
|
|
1448
|
+
* Login Form Component
|
|
1449
|
+
* React form with Formik and Yup validation
|
|
1450
|
+
*/
|
|
1451
|
+
|
|
1452
|
+
declare function LoginForm({ actionUrl, onSubmit, initialValues, showRememberMe, forgotPasswordLink, registerLink, submitText, successRedirect, className, formClass, inputClass, buttonClass, }: LoginFormProps): React.ReactElement;
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* Register Form Component
|
|
1456
|
+
* React form with Formik and Yup validation
|
|
1457
|
+
*/
|
|
1458
|
+
|
|
1459
|
+
declare function RegisterForm({ actionUrl, onSubmit, initialValues, termsLink, privacyLink, loginLink, submitText, successRedirect, passwordRequirements, className, formClass, inputClass, buttonClass, }: RegisterFormProps): React.ReactElement;
|
|
1460
|
+
|
|
1461
|
+
export { type BannerProps, type BorderRadius, type Breakpoints, type ButtonProps, type ButtonSize, type ButtonVariant, type CardProps, type ColProps, type ColorPalette, type ComponentThemes, ContactForm, type ContactFormProps, type ContactFormValues, type ContainerProps, type CtaSectionProps, type FaqItem, type FaqSectionProps, type Feature, type FeatureSectionProps, type FooterColumn, type FooterProps, type FormFieldError, type FormSubmitResult, type HeaderProps, type LoaderProps, type LoaderSize, type LoaderVariant, LoginForm, type LoginFormProps, type LoginFormValues, type NavLink, NewsletterForm, type NewsletterFormProps, type NewsletterFormValues, type NewsletterSectionProps, type PasswordRequirements, type PricingFeature, type PricingPlan, type PricingSectionProps, RegisterForm, type RegisterFormProps, type RegisterFormValues, type RowProps, type SemanticColors, type Shadows, type SocialLink, type Spacing, type TailwindBgColor, type TailwindBorderRadius, type TailwindClasses$1 as TailwindClasses, type TailwindFontSize, type TailwindFontWeight, type TailwindGap, type TailwindHeight, type TailwindMargin, type TailwindPadding, type TailwindShadow, type TailwindTextColor, type TailwindWidth, type Testimonial, type TestimonialSectionProps, type Theme, type ThemeConfig, ThemeContext, type ThemeContextValue, ThemeProvider, type ThemeProviderProps, ThemeToggle, type ThemeToggleProps, type ThreeColumnProps, type TwoColumnProps, type Typography, VALIDATION_MESSAGES, type ThemeMode as WebThemeMode, adjustColor, contactFormSchema, createRegisterFormSchema, createTheme, createThemeFromBrand, cssVar, deepMerge, defaultDarkTheme, defaultLightTheme, dummyBannerData, dummyFaqItems, dummyFeatures, dummyFooterData, dummyHeaderData, dummyImage, dummyPricingPlans, dummyTestimonials, flattenToCssVars, generateCssVars, getContrastColor, getSystemColorScheme, hexToRgba, injectCssVars, loadThemeFromUrl, loadThemeMode, loginFormSchema, loremIpsum, newsletterFormSchema, registerFormSchema, removeCssVars, resolveThemeMode, saveThemeMode, useTheme, useThemeValue };
|