@julseb-lib/react 1.0.74 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Image-YPZDN7Z5.js +14 -0
- package/dist/Image-YPZDN7Z5.js.map +1 -0
- package/dist/chunk-C3H53CDF.js +1 -0
- package/dist/chunk-TN4HZFI3.js +2071 -0
- package/dist/chunk-TN4HZFI3.js.map +1 -0
- package/dist/index.cjs +2603 -2073
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.js +16989 -18930
- package/dist/index.js.map +1 -1
- package/dist/types/components-props.cjs.map +1 -1
- package/dist/types/components-props.d.cts +6 -1
- package/dist/types/components-props.d.ts +6 -1
- package/dist/types/components-props.js +1 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-LDLZTDYA.js +0 -1
- /package/dist/{chunk-LDLZTDYA.js.map → chunk-C3H53CDF.js.map} +0 -0
|
@@ -0,0 +1,2071 @@
|
|
|
1
|
+
// src/lib/utils/design-tokens.ts
|
|
2
|
+
var libTextDisplayTags = {
|
|
3
|
+
h1: "h1",
|
|
4
|
+
h2: "h2",
|
|
5
|
+
h3: "h3",
|
|
6
|
+
h4: "h4",
|
|
7
|
+
h5: "h5"
|
|
8
|
+
};
|
|
9
|
+
var designTokens = {
|
|
10
|
+
libColors: {
|
|
11
|
+
"primary-50": "#eff6ff",
|
|
12
|
+
"primary-100": "#dbeafe",
|
|
13
|
+
"primary-200": "#bfdbfe",
|
|
14
|
+
"primary-300": "#93c5fd",
|
|
15
|
+
"primary-400": "#60a5fa",
|
|
16
|
+
"primary-500": "#3b82f6",
|
|
17
|
+
"primary-600": "#2563eb",
|
|
18
|
+
"primary-700": "#1d4ed8",
|
|
19
|
+
"primary-800": "#1e40af",
|
|
20
|
+
"primary-900": "#1e3a8a",
|
|
21
|
+
"primary-950": "#172554",
|
|
22
|
+
"secondary-50": "#ecfeff",
|
|
23
|
+
"secondary-100": "#cffafe",
|
|
24
|
+
"secondary-200": "#a5f3fc",
|
|
25
|
+
"secondary-300": "#67e8f9",
|
|
26
|
+
"secondary-400": "#22d3ee",
|
|
27
|
+
"secondary-500": "#06b6d4",
|
|
28
|
+
"secondary-600": "#0891b2",
|
|
29
|
+
"secondary-700": "#0e7490",
|
|
30
|
+
"secondary-800": "#155e75",
|
|
31
|
+
"secondary-900": "#164e63",
|
|
32
|
+
"secondary-950": "#083344",
|
|
33
|
+
"success-50": "#f0fdf4",
|
|
34
|
+
"success-100": "#dcfce7",
|
|
35
|
+
"success-200": "#bbf7d0",
|
|
36
|
+
"success-300": "#86efac",
|
|
37
|
+
"success-400": "#4ade80",
|
|
38
|
+
"success-500": "#22c55e",
|
|
39
|
+
"success-600": "#16a34a",
|
|
40
|
+
"success-700": "#15803d",
|
|
41
|
+
"success-800": "#166534",
|
|
42
|
+
"success-900": "#14532d",
|
|
43
|
+
"success-950": "#052e16",
|
|
44
|
+
"danger-50": "#fef2f2",
|
|
45
|
+
"danger-100": "#fee2e2",
|
|
46
|
+
"danger-200": "#fecaca",
|
|
47
|
+
"danger-300": "#fca5a5",
|
|
48
|
+
"danger-400": "#f87171",
|
|
49
|
+
"danger-500": "#ef4444",
|
|
50
|
+
"danger-600": "#dc2626",
|
|
51
|
+
"danger-700": "#b91c1c",
|
|
52
|
+
"danger-800": "#991b1b",
|
|
53
|
+
"danger-900": "#7f1d1d",
|
|
54
|
+
"danger-950": "#450a0a",
|
|
55
|
+
"warning-50": "#fffbeb",
|
|
56
|
+
"warning-100": "#fef3c7",
|
|
57
|
+
"warning-200": "#fde68a",
|
|
58
|
+
"warning-300": "#fcd34d",
|
|
59
|
+
"warning-400": "#fbbf24",
|
|
60
|
+
"warning-500": "#f59e42",
|
|
61
|
+
"warning-600": "#d97706",
|
|
62
|
+
"warning-700": "#b45309",
|
|
63
|
+
"warning-800": "#92400e",
|
|
64
|
+
"warning-900": "#78350f",
|
|
65
|
+
"warning-950": "#451a03",
|
|
66
|
+
"gray-50": "#f9fafb",
|
|
67
|
+
"gray-100": "#f3f4f6",
|
|
68
|
+
"gray-200": "#e5e7eb",
|
|
69
|
+
"gray-300": "#d1d5db",
|
|
70
|
+
"gray-400": "#9ca3af",
|
|
71
|
+
"gray-500": "#6b7280",
|
|
72
|
+
"gray-600": "#4b5563",
|
|
73
|
+
"gray-700": "#374151",
|
|
74
|
+
"gray-800": "#1f2937",
|
|
75
|
+
"gray-900": "#111827",
|
|
76
|
+
"gray-950": "#030712",
|
|
77
|
+
black: "#000000",
|
|
78
|
+
white: "#ffffff",
|
|
79
|
+
current: "currentColor",
|
|
80
|
+
transparent: "transparent",
|
|
81
|
+
background: "background",
|
|
82
|
+
font: "font"
|
|
83
|
+
},
|
|
84
|
+
libColorsShort: {
|
|
85
|
+
primary: "primary",
|
|
86
|
+
secondary: "secondary",
|
|
87
|
+
success: "success",
|
|
88
|
+
danger: "danger",
|
|
89
|
+
warning: "warning",
|
|
90
|
+
gray: "gray",
|
|
91
|
+
black: "black",
|
|
92
|
+
white: "white",
|
|
93
|
+
current: "current",
|
|
94
|
+
transparent: "transparent",
|
|
95
|
+
background: "background"
|
|
96
|
+
},
|
|
97
|
+
libColorsHover: {
|
|
98
|
+
primary: "primary",
|
|
99
|
+
secondary: "secondary",
|
|
100
|
+
success: "success",
|
|
101
|
+
danger: "danger",
|
|
102
|
+
warning: "warning",
|
|
103
|
+
gray: "gray",
|
|
104
|
+
white: "white"
|
|
105
|
+
},
|
|
106
|
+
libOverlays: {
|
|
107
|
+
"black-50": "black-50",
|
|
108
|
+
"black-80": "black-80",
|
|
109
|
+
"white-50": "white-50",
|
|
110
|
+
"white-80": "white-80",
|
|
111
|
+
"gradient-black": "gradient-black",
|
|
112
|
+
"gradient-white": "gradient-white"
|
|
113
|
+
},
|
|
114
|
+
libFontFamilies: {
|
|
115
|
+
body: "body",
|
|
116
|
+
code: "code"
|
|
117
|
+
},
|
|
118
|
+
libSpacers: {
|
|
119
|
+
/** 4px */
|
|
120
|
+
"2xs": "2xs",
|
|
121
|
+
/** 8px */
|
|
122
|
+
xs: "xs",
|
|
123
|
+
/** 12px */
|
|
124
|
+
sm: "sm",
|
|
125
|
+
/** 16px */
|
|
126
|
+
md: "md",
|
|
127
|
+
/** 24px */
|
|
128
|
+
lg: "lg",
|
|
129
|
+
/** 32px */
|
|
130
|
+
xl: "xl",
|
|
131
|
+
/** 48px */
|
|
132
|
+
"2xl": "2xl"
|
|
133
|
+
},
|
|
134
|
+
libBreakpoints: {
|
|
135
|
+
sm: "sm",
|
|
136
|
+
md: "md",
|
|
137
|
+
lg: "lg",
|
|
138
|
+
xl: "xl",
|
|
139
|
+
"2xl": "2xl"
|
|
140
|
+
},
|
|
141
|
+
libContainer: {
|
|
142
|
+
"3xs": "3xs",
|
|
143
|
+
"2xs": "2xs",
|
|
144
|
+
xs: "xs",
|
|
145
|
+
sm: "sm",
|
|
146
|
+
md: "md",
|
|
147
|
+
lg: "lg",
|
|
148
|
+
xl: "xl",
|
|
149
|
+
"2xl": "2xl",
|
|
150
|
+
"3xl": "3xl",
|
|
151
|
+
"4xl": "4xl",
|
|
152
|
+
"5xl": "5xl",
|
|
153
|
+
"6xl": "6xl",
|
|
154
|
+
"7xl": "7xl"
|
|
155
|
+
},
|
|
156
|
+
libFontSizes: {
|
|
157
|
+
xs: "xs",
|
|
158
|
+
sm: "sm",
|
|
159
|
+
base: "base",
|
|
160
|
+
lg: "lg",
|
|
161
|
+
xl: "xl",
|
|
162
|
+
"2xl": "2xl",
|
|
163
|
+
"3xl": "3xl",
|
|
164
|
+
"4xl": "4xl",
|
|
165
|
+
"5xl": "5xl",
|
|
166
|
+
"6xl": "6xl",
|
|
167
|
+
"7xl": "7xl",
|
|
168
|
+
"8xl": "8xl",
|
|
169
|
+
"9xl": "9xl"
|
|
170
|
+
},
|
|
171
|
+
libLineHeights: {
|
|
172
|
+
xs: "xs--line-height",
|
|
173
|
+
sm: "sm--line-height",
|
|
174
|
+
base: "base--line-height",
|
|
175
|
+
lg: "lg--line-height",
|
|
176
|
+
xl: "xl--line-height",
|
|
177
|
+
"2xl": "2xl--line-height",
|
|
178
|
+
"3xl": "3xl--line-height",
|
|
179
|
+
"4xl": "4xl--line-height",
|
|
180
|
+
"5xl": "5xl--line-height",
|
|
181
|
+
"6xl": "6xl--line-height",
|
|
182
|
+
"7xl": "7xl--line-height",
|
|
183
|
+
"8xl": "8xl--line-height",
|
|
184
|
+
"9xl": "9xl--line-height"
|
|
185
|
+
},
|
|
186
|
+
libFontWeights: {
|
|
187
|
+
thin: "thin",
|
|
188
|
+
extralight: "extralight",
|
|
189
|
+
light: "light",
|
|
190
|
+
normal: "normal",
|
|
191
|
+
medium: "medium",
|
|
192
|
+
semibold: "semibold",
|
|
193
|
+
bold: "bold",
|
|
194
|
+
extrabold: "extrabold",
|
|
195
|
+
black: "black"
|
|
196
|
+
},
|
|
197
|
+
libTracking: {
|
|
198
|
+
tighter: "tighter",
|
|
199
|
+
tight: "tight",
|
|
200
|
+
normal: "normal",
|
|
201
|
+
wide: "wide",
|
|
202
|
+
wider: "wider",
|
|
203
|
+
widest: "widest"
|
|
204
|
+
},
|
|
205
|
+
libLeading: {
|
|
206
|
+
tight: "tight",
|
|
207
|
+
snug: "snug",
|
|
208
|
+
normal: "normal",
|
|
209
|
+
relaxed: "relaxed",
|
|
210
|
+
loose: "loose",
|
|
211
|
+
none: "none"
|
|
212
|
+
},
|
|
213
|
+
libRadius: {
|
|
214
|
+
xs: "xs",
|
|
215
|
+
sm: "sm",
|
|
216
|
+
md: "md",
|
|
217
|
+
lg: "lg",
|
|
218
|
+
xl: "xl",
|
|
219
|
+
"2xl": "2xl",
|
|
220
|
+
"3xl": "3xl",
|
|
221
|
+
"4xl": "4xl",
|
|
222
|
+
full: "full"
|
|
223
|
+
},
|
|
224
|
+
libShadows: {
|
|
225
|
+
"2xs": "2xs",
|
|
226
|
+
xs: "xs",
|
|
227
|
+
sm: "sm",
|
|
228
|
+
md: "md",
|
|
229
|
+
lg: "lg",
|
|
230
|
+
xl: "xl",
|
|
231
|
+
"2xl": "2xl",
|
|
232
|
+
none: "none"
|
|
233
|
+
},
|
|
234
|
+
libInsetShadows: {
|
|
235
|
+
"2xs": "2xs",
|
|
236
|
+
xs: "xs",
|
|
237
|
+
sm: "sm"
|
|
238
|
+
},
|
|
239
|
+
libDropShadows: {
|
|
240
|
+
xs: "xs",
|
|
241
|
+
sm: "sm",
|
|
242
|
+
md: "md",
|
|
243
|
+
lg: "lg",
|
|
244
|
+
xl: "xl",
|
|
245
|
+
"2xl": "2xl"
|
|
246
|
+
},
|
|
247
|
+
libTextShadow: {
|
|
248
|
+
"2xs": "2xs",
|
|
249
|
+
xs: "xs",
|
|
250
|
+
sm: "sm",
|
|
251
|
+
md: "md",
|
|
252
|
+
lg: "lg"
|
|
253
|
+
},
|
|
254
|
+
libTransitionTimingFunctions: {
|
|
255
|
+
"--ease-in": "--ease-in",
|
|
256
|
+
"--ease-out": "--ease-out",
|
|
257
|
+
"--ease-in-out": "--ease-in-out"
|
|
258
|
+
},
|
|
259
|
+
libAnimate: {
|
|
260
|
+
spin: "spin",
|
|
261
|
+
ping: "ping",
|
|
262
|
+
pulse: "pulse",
|
|
263
|
+
bounce: "bounce"
|
|
264
|
+
},
|
|
265
|
+
libBlur: {
|
|
266
|
+
xs: "xs",
|
|
267
|
+
sm: "sm",
|
|
268
|
+
md: "md",
|
|
269
|
+
lg: "lg",
|
|
270
|
+
xl: "xl",
|
|
271
|
+
"2xl": "2xl",
|
|
272
|
+
"3xl": "3xl"
|
|
273
|
+
},
|
|
274
|
+
libPerspective: {
|
|
275
|
+
dramatic: "dramatic",
|
|
276
|
+
near: "near",
|
|
277
|
+
normal: "normal",
|
|
278
|
+
midrange: "midrange",
|
|
279
|
+
distant: "distant"
|
|
280
|
+
},
|
|
281
|
+
libAspectVideo: {},
|
|
282
|
+
libTextDisplayTags,
|
|
283
|
+
libTextTags: {
|
|
284
|
+
h6: "h6",
|
|
285
|
+
p: "p",
|
|
286
|
+
strong: "strong",
|
|
287
|
+
em: "em",
|
|
288
|
+
small: "small",
|
|
289
|
+
blockquote: "blockquote",
|
|
290
|
+
ul: "ul",
|
|
291
|
+
ol: "ol",
|
|
292
|
+
dl: "dl"
|
|
293
|
+
},
|
|
294
|
+
libTransitions: {
|
|
295
|
+
none: "none",
|
|
296
|
+
all: "all",
|
|
297
|
+
default: "default",
|
|
298
|
+
colors: "colors",
|
|
299
|
+
opacity: "opacity",
|
|
300
|
+
shadow: "shadow",
|
|
301
|
+
transform: "transform"
|
|
302
|
+
},
|
|
303
|
+
libThemes: {
|
|
304
|
+
light: "light",
|
|
305
|
+
dark: "dark"
|
|
306
|
+
},
|
|
307
|
+
libInputVariants: {
|
|
308
|
+
rounded: "rounded",
|
|
309
|
+
pill: "pill"
|
|
310
|
+
},
|
|
311
|
+
libInputBackgrounds: {
|
|
312
|
+
light: "light",
|
|
313
|
+
dark: "dark"
|
|
314
|
+
},
|
|
315
|
+
libMainSizes: {
|
|
316
|
+
default: "default",
|
|
317
|
+
large: "large",
|
|
318
|
+
form: "form"
|
|
319
|
+
},
|
|
320
|
+
libAsideSizes: {
|
|
321
|
+
default: "default",
|
|
322
|
+
small: "small"
|
|
323
|
+
},
|
|
324
|
+
libZIndex: {
|
|
325
|
+
"0": "0",
|
|
326
|
+
"10": "10",
|
|
327
|
+
"20": "20",
|
|
328
|
+
"30": "30",
|
|
329
|
+
"40": "40",
|
|
330
|
+
"50": "50",
|
|
331
|
+
"-0": "-0",
|
|
332
|
+
"-10": "-10",
|
|
333
|
+
"-20": "-20",
|
|
334
|
+
"-30": "-30",
|
|
335
|
+
"-40": "-40",
|
|
336
|
+
"-50": "-50"
|
|
337
|
+
},
|
|
338
|
+
libPosition: {
|
|
339
|
+
relative: "relative",
|
|
340
|
+
absolute: "absolute",
|
|
341
|
+
fixed: "fixed"
|
|
342
|
+
},
|
|
343
|
+
libMinHeights: {
|
|
344
|
+
px: "px",
|
|
345
|
+
full: "full",
|
|
346
|
+
screen: "screen",
|
|
347
|
+
dvh: "dvh",
|
|
348
|
+
dvw: "dvw",
|
|
349
|
+
lvh: "lvh",
|
|
350
|
+
lvw: "lvw",
|
|
351
|
+
svw: "svw",
|
|
352
|
+
svh: "svh",
|
|
353
|
+
auto: "auto",
|
|
354
|
+
min: "min",
|
|
355
|
+
max: "max",
|
|
356
|
+
fit: "fit",
|
|
357
|
+
lh: "lh"
|
|
358
|
+
},
|
|
359
|
+
libKeySizes: { large: "large", small: "small" },
|
|
360
|
+
libMaxWidths: {
|
|
361
|
+
"3xs": "3xs",
|
|
362
|
+
"2xs": "2xs",
|
|
363
|
+
xs: "xs",
|
|
364
|
+
sm: "sm",
|
|
365
|
+
md: "md",
|
|
366
|
+
lg: "lg",
|
|
367
|
+
xl: "xl",
|
|
368
|
+
"2xl": "2xl",
|
|
369
|
+
"3xl": "3xl",
|
|
370
|
+
"4xl": "4xl",
|
|
371
|
+
"5xl": "5xl",
|
|
372
|
+
"6xl": "6xl",
|
|
373
|
+
"7xl": "7xl",
|
|
374
|
+
none: "none",
|
|
375
|
+
px: "px",
|
|
376
|
+
full: "full",
|
|
377
|
+
dvw: "dvw",
|
|
378
|
+
dvh: "dvh",
|
|
379
|
+
lvw: "lvw",
|
|
380
|
+
lvh: "lvh",
|
|
381
|
+
svw: "svw",
|
|
382
|
+
svh: "svh",
|
|
383
|
+
screen: "screen",
|
|
384
|
+
min: "min",
|
|
385
|
+
max: "max",
|
|
386
|
+
fit: "fit"
|
|
387
|
+
},
|
|
388
|
+
libSkeletonAnimations: { pulse: "pulse", shine: "shine", none: "none" },
|
|
389
|
+
libTooltipPositions: {
|
|
390
|
+
top: "top",
|
|
391
|
+
bottom: "bottom",
|
|
392
|
+
left: "left",
|
|
393
|
+
right: "right"
|
|
394
|
+
},
|
|
395
|
+
libTooltipTriggers: { hover: "hover", click: "click" },
|
|
396
|
+
libLoaderVariants: { 1: 1, 2: 2, 3: 3 },
|
|
397
|
+
libButtonVariants: {
|
|
398
|
+
plain: "plain",
|
|
399
|
+
ghost: "ghost",
|
|
400
|
+
transparent: "transparent"
|
|
401
|
+
},
|
|
402
|
+
libButtonSize: { default: "default", small: "small" },
|
|
403
|
+
libButtonGroupToggle: { single: "single", multi: "multi" },
|
|
404
|
+
libTagVariant: { plain: "plain", outline: "outline" },
|
|
405
|
+
libInputTypes: {
|
|
406
|
+
color: "color",
|
|
407
|
+
date: "date",
|
|
408
|
+
"datetime-local": "datetime-local",
|
|
409
|
+
month: "month",
|
|
410
|
+
week: "week",
|
|
411
|
+
file: "file",
|
|
412
|
+
password: "password",
|
|
413
|
+
search: "search",
|
|
414
|
+
email: "email",
|
|
415
|
+
number: "number",
|
|
416
|
+
tel: "tel",
|
|
417
|
+
text: "text",
|
|
418
|
+
url: "url",
|
|
419
|
+
time: "time",
|
|
420
|
+
select: "select",
|
|
421
|
+
textarea: "textarea"
|
|
422
|
+
},
|
|
423
|
+
libCheckInputVariants: {
|
|
424
|
+
tile: "tile",
|
|
425
|
+
toggle: "toggle",
|
|
426
|
+
selector: "selector"
|
|
427
|
+
},
|
|
428
|
+
libListInputDirections: { up: "up", down: "down" },
|
|
429
|
+
libAccordionVariant: { basic: "basic", rounded: "rounded" },
|
|
430
|
+
libAccordionIcon: { plus: "plus", chevron: "chevron" },
|
|
431
|
+
libToastStatus: {
|
|
432
|
+
success: "success",
|
|
433
|
+
error: "error",
|
|
434
|
+
warning: "warning",
|
|
435
|
+
info: "info",
|
|
436
|
+
loading: "loading"
|
|
437
|
+
},
|
|
438
|
+
libTabsJustify: { start: "start", stretch: "stretch" },
|
|
439
|
+
libTabsVariant: { basic: "basic", rounded: "rounded" },
|
|
440
|
+
libSlideshowPagination: {
|
|
441
|
+
dots: "dots",
|
|
442
|
+
"dots-outline": "dots-outline",
|
|
443
|
+
bars: "bars",
|
|
444
|
+
thumbnails: "thumbnails"
|
|
445
|
+
},
|
|
446
|
+
libSlideshowPaginationPosition: { inside: "inside", outside: "outside" },
|
|
447
|
+
libSlideshowButtonsPositions: { left: "left", right: "right" },
|
|
448
|
+
libSlideshowButtonsSizes: { small: "small", large: "large" },
|
|
449
|
+
libTableVariants: {
|
|
450
|
+
bordered: "bordered",
|
|
451
|
+
stripped: "stripped",
|
|
452
|
+
"border-bottom": "border-bottom"
|
|
453
|
+
},
|
|
454
|
+
libMdEditorViews: {
|
|
455
|
+
viewCode: "viewCode",
|
|
456
|
+
viewLive: "viewLive",
|
|
457
|
+
viewPreview: "viewPreview"
|
|
458
|
+
},
|
|
459
|
+
libMdEditorButtons: {
|
|
460
|
+
bold: "bold",
|
|
461
|
+
italic: "italic",
|
|
462
|
+
strikethrough: "strikethrough",
|
|
463
|
+
underline: "underline",
|
|
464
|
+
ul: "ul",
|
|
465
|
+
ol: "ol",
|
|
466
|
+
link: "link",
|
|
467
|
+
quote: "quote",
|
|
468
|
+
hr: "hr",
|
|
469
|
+
code: "code",
|
|
470
|
+
codeBlock: "codeBlock",
|
|
471
|
+
comment: "comment",
|
|
472
|
+
image: "image"
|
|
473
|
+
},
|
|
474
|
+
libMdEditorTitles: { ...libTextDisplayTags, h6: "h6" },
|
|
475
|
+
libDrawerPositions: { left: "left", right: "right" },
|
|
476
|
+
libNavBurgerPositions: { left: "left", right: "right" },
|
|
477
|
+
libNavMobileVariants: { full: "full", top: "top", drawer: "drawer" },
|
|
478
|
+
libFooterDirection: { horizontal: "horizontal", vertical: "vertical" },
|
|
479
|
+
libFooterLinksSeparator: { dot: "dot", dash: "dash" },
|
|
480
|
+
libCountryCodes: {
|
|
481
|
+
af: "af",
|
|
482
|
+
ax: "ax",
|
|
483
|
+
al: "al",
|
|
484
|
+
dz: "dz",
|
|
485
|
+
as: "as",
|
|
486
|
+
ad: "ad",
|
|
487
|
+
ao: "ao",
|
|
488
|
+
ai: "ai",
|
|
489
|
+
aq: "aq",
|
|
490
|
+
ag: "ag",
|
|
491
|
+
ar: "ar",
|
|
492
|
+
am: "am",
|
|
493
|
+
aw: "aw",
|
|
494
|
+
au: "au",
|
|
495
|
+
at: "at",
|
|
496
|
+
az: "az",
|
|
497
|
+
bs: "bs",
|
|
498
|
+
bh: "bh",
|
|
499
|
+
bd: "bd",
|
|
500
|
+
bb: "bb",
|
|
501
|
+
by: "by",
|
|
502
|
+
be: "be",
|
|
503
|
+
bz: "bz",
|
|
504
|
+
bj: "bj",
|
|
505
|
+
bm: "bm",
|
|
506
|
+
bt: "bt",
|
|
507
|
+
bo: "bo",
|
|
508
|
+
ba: "ba",
|
|
509
|
+
bw: "bw",
|
|
510
|
+
br: "br",
|
|
511
|
+
io: "io",
|
|
512
|
+
bn: "bn",
|
|
513
|
+
bg: "bg",
|
|
514
|
+
bf: "bf",
|
|
515
|
+
bi: "bi",
|
|
516
|
+
kh: "kh",
|
|
517
|
+
cm: "cm",
|
|
518
|
+
ca: "ca",
|
|
519
|
+
cv: "cv",
|
|
520
|
+
ky: "ky",
|
|
521
|
+
cf: "cf",
|
|
522
|
+
td: "td",
|
|
523
|
+
cl: "cl",
|
|
524
|
+
cn: "cn",
|
|
525
|
+
cx: "cx",
|
|
526
|
+
cc: "cc",
|
|
527
|
+
co: "co",
|
|
528
|
+
km: "km",
|
|
529
|
+
cg: "cg",
|
|
530
|
+
cd: "cd",
|
|
531
|
+
ck: "ck",
|
|
532
|
+
cr: "cr",
|
|
533
|
+
ci: "ci",
|
|
534
|
+
hr: "hr",
|
|
535
|
+
cu: "cu",
|
|
536
|
+
cy: "cy",
|
|
537
|
+
cz: "cz",
|
|
538
|
+
dk: "dk",
|
|
539
|
+
dj: "dj",
|
|
540
|
+
dm: "dm",
|
|
541
|
+
do: "do",
|
|
542
|
+
ec: "ec",
|
|
543
|
+
eg: "eg",
|
|
544
|
+
sv: "sv",
|
|
545
|
+
gq: "gq",
|
|
546
|
+
er: "er",
|
|
547
|
+
ee: "ee",
|
|
548
|
+
et: "et",
|
|
549
|
+
fk: "fk",
|
|
550
|
+
fo: "fo",
|
|
551
|
+
fj: "fj",
|
|
552
|
+
fi: "fi",
|
|
553
|
+
fr: "fr",
|
|
554
|
+
gf: "gf",
|
|
555
|
+
pf: "pf",
|
|
556
|
+
ga: "ga",
|
|
557
|
+
gm: "gm",
|
|
558
|
+
ge: "ge",
|
|
559
|
+
de: "de",
|
|
560
|
+
gh: "gh",
|
|
561
|
+
gi: "gi",
|
|
562
|
+
gr: "gr",
|
|
563
|
+
gl: "gl",
|
|
564
|
+
gd: "gd",
|
|
565
|
+
gp: "gp",
|
|
566
|
+
gu: "gu",
|
|
567
|
+
gt: "gt",
|
|
568
|
+
gg: "gg",
|
|
569
|
+
gn: "gn",
|
|
570
|
+
gw: "gw",
|
|
571
|
+
gy: "gy",
|
|
572
|
+
ht: "ht",
|
|
573
|
+
va: "va",
|
|
574
|
+
hn: "hn",
|
|
575
|
+
hk: "hk",
|
|
576
|
+
hu: "hu",
|
|
577
|
+
is: "is",
|
|
578
|
+
in: "in",
|
|
579
|
+
id: "id",
|
|
580
|
+
ir: "ir",
|
|
581
|
+
iq: "iq",
|
|
582
|
+
ie: "ie",
|
|
583
|
+
im: "im",
|
|
584
|
+
il: "il",
|
|
585
|
+
it: "it",
|
|
586
|
+
jm: "jm",
|
|
587
|
+
jp: "jp",
|
|
588
|
+
je: "je",
|
|
589
|
+
jo: "jo",
|
|
590
|
+
kz: "kz",
|
|
591
|
+
ke: "ke",
|
|
592
|
+
ki: "ki",
|
|
593
|
+
kp: "kp",
|
|
594
|
+
kr: "kr",
|
|
595
|
+
kw: "kw",
|
|
596
|
+
kg: "kg",
|
|
597
|
+
la: "la",
|
|
598
|
+
lv: "lv",
|
|
599
|
+
lb: "lb",
|
|
600
|
+
ls: "ls",
|
|
601
|
+
lr: "lr",
|
|
602
|
+
ly: "ly",
|
|
603
|
+
li: "li",
|
|
604
|
+
lt: "lt",
|
|
605
|
+
lu: "lu",
|
|
606
|
+
mo: "mo",
|
|
607
|
+
mk: "mk",
|
|
608
|
+
mg: "mg",
|
|
609
|
+
mw: "mw",
|
|
610
|
+
my: "my",
|
|
611
|
+
mv: "mv",
|
|
612
|
+
ml: "ml",
|
|
613
|
+
mt: "mt",
|
|
614
|
+
mh: "mh",
|
|
615
|
+
mq: "mq",
|
|
616
|
+
mr: "mr",
|
|
617
|
+
mu: "mu",
|
|
618
|
+
yt: "yt",
|
|
619
|
+
mx: "mx",
|
|
620
|
+
fm: "fm",
|
|
621
|
+
md: "md",
|
|
622
|
+
mc: "mc",
|
|
623
|
+
mn: "mn",
|
|
624
|
+
me: "me",
|
|
625
|
+
ms: "ms",
|
|
626
|
+
ma: "ma",
|
|
627
|
+
mz: "mz",
|
|
628
|
+
mm: "mm",
|
|
629
|
+
na: "na",
|
|
630
|
+
nr: "nr",
|
|
631
|
+
np: "np",
|
|
632
|
+
nl: "nl",
|
|
633
|
+
nc: "nc",
|
|
634
|
+
nz: "nz",
|
|
635
|
+
ni: "ni",
|
|
636
|
+
ne: "ne",
|
|
637
|
+
ng: "ng",
|
|
638
|
+
nu: "nu",
|
|
639
|
+
nf: "nf",
|
|
640
|
+
mp: "mp",
|
|
641
|
+
no: "no",
|
|
642
|
+
om: "om",
|
|
643
|
+
pk: "pk",
|
|
644
|
+
pw: "pw",
|
|
645
|
+
ps: "ps",
|
|
646
|
+
pa: "pa",
|
|
647
|
+
pg: "pg",
|
|
648
|
+
py: "py",
|
|
649
|
+
pe: "pe",
|
|
650
|
+
ph: "ph",
|
|
651
|
+
pn: "pn",
|
|
652
|
+
pl: "pl",
|
|
653
|
+
pt: "pt",
|
|
654
|
+
pr: "pr",
|
|
655
|
+
qa: "qa",
|
|
656
|
+
ro: "ro",
|
|
657
|
+
ru: "ru",
|
|
658
|
+
rw: "rw",
|
|
659
|
+
re: "re",
|
|
660
|
+
bl: "bl",
|
|
661
|
+
sh: "sh",
|
|
662
|
+
kn: "kn",
|
|
663
|
+
lc: "lc",
|
|
664
|
+
mf: "mf",
|
|
665
|
+
pm: "pm",
|
|
666
|
+
vc: "vc",
|
|
667
|
+
ws: "ws",
|
|
668
|
+
sm: "sm",
|
|
669
|
+
st: "st",
|
|
670
|
+
sa: "sa",
|
|
671
|
+
sn: "sn",
|
|
672
|
+
rs: "rs",
|
|
673
|
+
sc: "sc",
|
|
674
|
+
sl: "sl",
|
|
675
|
+
sg: "sg",
|
|
676
|
+
sk: "sk",
|
|
677
|
+
si: "si",
|
|
678
|
+
sb: "sb",
|
|
679
|
+
so: "so",
|
|
680
|
+
za: "za",
|
|
681
|
+
ss: "ss",
|
|
682
|
+
gs: "gs",
|
|
683
|
+
es: "es",
|
|
684
|
+
lk: "lk",
|
|
685
|
+
sd: "sd",
|
|
686
|
+
sr: "sr",
|
|
687
|
+
sj: "sj",
|
|
688
|
+
sz: "sz",
|
|
689
|
+
se: "se",
|
|
690
|
+
ch: "ch",
|
|
691
|
+
sy: "sy",
|
|
692
|
+
tw: "tw",
|
|
693
|
+
tj: "tj",
|
|
694
|
+
tz: "tz",
|
|
695
|
+
th: "th",
|
|
696
|
+
tl: "tl",
|
|
697
|
+
tg: "tg",
|
|
698
|
+
tk: "tk",
|
|
699
|
+
to: "to",
|
|
700
|
+
tt: "tt",
|
|
701
|
+
tn: "tn",
|
|
702
|
+
tr: "tr",
|
|
703
|
+
tm: "tm",
|
|
704
|
+
tc: "tc",
|
|
705
|
+
tv: "tv",
|
|
706
|
+
ug: "ug",
|
|
707
|
+
ua: "ua",
|
|
708
|
+
ae: "ae",
|
|
709
|
+
gb: "gb",
|
|
710
|
+
us: "us",
|
|
711
|
+
uy: "uy",
|
|
712
|
+
uz: "uz",
|
|
713
|
+
vu: "vu",
|
|
714
|
+
ve: "ve",
|
|
715
|
+
vn: "vn",
|
|
716
|
+
vg: "vg",
|
|
717
|
+
vi: "vi",
|
|
718
|
+
wf: "wf",
|
|
719
|
+
ye: "ye",
|
|
720
|
+
zm: "zm",
|
|
721
|
+
zw: "zw"
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
|
|
725
|
+
// src/lib/utils/linkify-text.tsx
|
|
726
|
+
import { Fragment } from "react";
|
|
727
|
+
import { uuid } from "@julseb-lib/utils";
|
|
728
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
729
|
+
var URL_REGEX = /^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gm;
|
|
730
|
+
var linkifyText = (text, blank) => {
|
|
731
|
+
const words = text?.split(" ");
|
|
732
|
+
return words?.map(
|
|
733
|
+
(word) => word.match(URL_REGEX) ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
734
|
+
/* @__PURE__ */ jsx(
|
|
735
|
+
"a",
|
|
736
|
+
{
|
|
737
|
+
href: word,
|
|
738
|
+
target: blank ? "_blank" : void 0,
|
|
739
|
+
rel: blank ? "noreferrer noopener" : void 0,
|
|
740
|
+
className: "font-black",
|
|
741
|
+
children: word
|
|
742
|
+
}
|
|
743
|
+
),
|
|
744
|
+
" "
|
|
745
|
+
] }, uuid()) : word + " "
|
|
746
|
+
);
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
// src/lib/utils/gen-link-color.ts
|
|
750
|
+
var genLinkColor = {
|
|
751
|
+
primary: "[&_a]:font-black [&_a]:text-primary-500 [&_a]:hover:text-primary-300 [&_a]:active:text-primary-600",
|
|
752
|
+
secondary: "[&_a]:font-black [&_a]:text-secondary-500 [&_a]:hover:text-secondary-300 [&_a]:active:text-secondary-600",
|
|
753
|
+
success: "[&_a]:font-black [&_a]:text-success-500 [&_a]:hover:text-success-300 [&_a]:active:text-success-600",
|
|
754
|
+
danger: "[&_a]:font-black [&_a]:text-danger-500 [&_a]:hover:text-danger-300 [&_a]:active:text-danger-600",
|
|
755
|
+
warning: "[&_a]:font-black [&_a]:text-warning-500 [&_a]:hover:text-warning-300 [&_a]:active:text-warning-600",
|
|
756
|
+
gray: "[&_a]:font-black [&_a]:text-gray-500 [&_a]:hover:text-gray-300 [&_a]:active:text-gray-600",
|
|
757
|
+
white: "[&_a]:font-black [&_a]:text-white [&_a]:hover:text-gray-300 [&_a]:active:text-gray-100"
|
|
758
|
+
};
|
|
759
|
+
var genButtonColor = {
|
|
760
|
+
primary: "[&_button]:font-black [&_button]:text-primary-500 [&_button]:hover:text-primary-300 [&_button]:active:text-primary-600",
|
|
761
|
+
secondary: "[&_button]:font-black [&_button]:text-secondary-500 [&_button]:hover:text-secondary-300 [&_button]:active:text-secondary-600",
|
|
762
|
+
success: "[&_button]:font-black [&_button]:text-success-500 [&_button]:hover:text-success-300 [&_button]:active:text-success-600",
|
|
763
|
+
danger: "[&_button]:font-black [&_button]:text-danger-500 [&_button]:hover:text-danger-300 [&_button]:active:text-danger-600",
|
|
764
|
+
warning: "[&_button]:font-black [&_button]:text-warning-500 [&_button]:hover:text-warning-300 [&_button]:active:text-warning-600",
|
|
765
|
+
gray: "[&_button]:font-black [&_button]:text-gray-500 [&_button]:hover:text-gray-300 [&_button]:active:text-gray-600",
|
|
766
|
+
white: "[&_button]:font-black [&_button]:text-white [&_button]:hover:text-gray-300 [&_button]:active:text-gray-100"
|
|
767
|
+
};
|
|
768
|
+
|
|
769
|
+
// src/lib/utils/gen-text-align.ts
|
|
770
|
+
var genTextAlign = {
|
|
771
|
+
left: "text-left",
|
|
772
|
+
center: "text-center",
|
|
773
|
+
right: "text-right",
|
|
774
|
+
justify: "text-justify",
|
|
775
|
+
start: "text-start",
|
|
776
|
+
end: "text-end"
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
// src/lib/utils/gen-text-color.ts
|
|
780
|
+
var genTextColor = {
|
|
781
|
+
black: "text-black",
|
|
782
|
+
white: "text-white",
|
|
783
|
+
"primary-50": "text-primary-50",
|
|
784
|
+
"primary-100": "text-primary-100",
|
|
785
|
+
"primary-200": "text-primary-200",
|
|
786
|
+
"primary-300": "text-primary-300",
|
|
787
|
+
"primary-400": "text-primary-400",
|
|
788
|
+
"primary-500": "text-primary-500",
|
|
789
|
+
"primary-600": "text-primary-600",
|
|
790
|
+
"primary-700": "text-primary-700",
|
|
791
|
+
"primary-800": "text-primary-800",
|
|
792
|
+
"primary-900": "text-primary-900",
|
|
793
|
+
"primary-950": "text-primary-950",
|
|
794
|
+
"secondary-50": "text-secondary-50",
|
|
795
|
+
"secondary-100": "text-secondary-100",
|
|
796
|
+
"secondary-200": "text-secondary-200",
|
|
797
|
+
"secondary-300": "text-secondary-300",
|
|
798
|
+
"secondary-400": "text-secondary-400",
|
|
799
|
+
"secondary-500": "text-secondary-500",
|
|
800
|
+
"secondary-600": "text-secondary-600",
|
|
801
|
+
"secondary-700": "text-secondary-700",
|
|
802
|
+
"secondary-800": "text-secondary-800",
|
|
803
|
+
"secondary-900": "text-secondary-900",
|
|
804
|
+
"secondary-950": "text-secondary-950",
|
|
805
|
+
"success-50": "text-success-50",
|
|
806
|
+
"success-100": "text-success-100",
|
|
807
|
+
"success-200": "text-success-200",
|
|
808
|
+
"success-300": "text-success-300",
|
|
809
|
+
"success-400": "text-success-400",
|
|
810
|
+
"success-500": "text-success-500",
|
|
811
|
+
"success-600": "text-success-600",
|
|
812
|
+
"success-700": "text-success-700",
|
|
813
|
+
"success-800": "text-success-800",
|
|
814
|
+
"success-900": "text-success-900",
|
|
815
|
+
"success-950": "text-success-950",
|
|
816
|
+
"danger-50": "text-danger-50",
|
|
817
|
+
"danger-100": "text-danger-100",
|
|
818
|
+
"danger-200": "text-danger-200",
|
|
819
|
+
"danger-300": "text-danger-300",
|
|
820
|
+
"danger-400": "text-danger-400",
|
|
821
|
+
"danger-500": "text-danger-500",
|
|
822
|
+
"danger-600": "text-danger-600",
|
|
823
|
+
"danger-700": "text-danger-700",
|
|
824
|
+
"danger-800": "text-danger-800",
|
|
825
|
+
"danger-900": "text-danger-900",
|
|
826
|
+
"danger-950": "text-danger-950",
|
|
827
|
+
"warning-50": "text-warning-50",
|
|
828
|
+
"warning-100": "text-warning-100",
|
|
829
|
+
"warning-200": "text-warning-200",
|
|
830
|
+
"warning-300": "text-warning-300",
|
|
831
|
+
"warning-400": "text-warning-400",
|
|
832
|
+
"warning-500": "text-warning-500",
|
|
833
|
+
"warning-600": "text-warning-600",
|
|
834
|
+
"warning-700": "text-warning-700",
|
|
835
|
+
"warning-800": "text-warning-800",
|
|
836
|
+
"warning-900": "text-warning-900",
|
|
837
|
+
"warning-950": "text-warning-950",
|
|
838
|
+
"gray-50": "text-gray-50",
|
|
839
|
+
"gray-100": "text-gray-100",
|
|
840
|
+
"gray-200": "text-gray-200",
|
|
841
|
+
"gray-300": "text-gray-300",
|
|
842
|
+
"gray-400": "text-gray-400",
|
|
843
|
+
"gray-500": "text-gray-500",
|
|
844
|
+
"gray-600": "text-gray-600",
|
|
845
|
+
"gray-700": "text-gray-700",
|
|
846
|
+
"gray-800": "text-gray-800",
|
|
847
|
+
"gray-900": "text-gray-900",
|
|
848
|
+
"gray-950": "text-gray-950",
|
|
849
|
+
current: "text-current",
|
|
850
|
+
transparent: "text-transparent",
|
|
851
|
+
background: "text-background",
|
|
852
|
+
font: "text-font"
|
|
853
|
+
};
|
|
854
|
+
var genTextColorShort = {
|
|
855
|
+
primary: "text-primary-500",
|
|
856
|
+
secondary: "text-secondary-500",
|
|
857
|
+
success: "text-success-500",
|
|
858
|
+
danger: "text-danger-500",
|
|
859
|
+
warning: "text-warning-500",
|
|
860
|
+
gray: "text-gray-500",
|
|
861
|
+
black: "text-black",
|
|
862
|
+
white: "text-white",
|
|
863
|
+
current: "text-current",
|
|
864
|
+
transparent: "text-transparent",
|
|
865
|
+
background: "text-background"
|
|
866
|
+
};
|
|
867
|
+
var genTextColorHover = {
|
|
868
|
+
primary: "text-primary-500 hover:text-primary-300 active:text-primary-600",
|
|
869
|
+
secondary: "text-secondary-500 hover:text-secondary-300 active:text-secondary-600",
|
|
870
|
+
success: "text-success-500 hover:text-success-300 active:text-success-600",
|
|
871
|
+
danger: "text-danger-500 hover:text-danger-300 active:text-danger-600",
|
|
872
|
+
warning: "text-warning-500 hover:text-warning-300 active:text-warning-600",
|
|
873
|
+
gray: "text-gray-500 hover:text-gray-300 active:text-gray-600",
|
|
874
|
+
white: "text-white hover:text-gray-300! active:text-gray-100!"
|
|
875
|
+
};
|
|
876
|
+
var genTextAllColor = {
|
|
877
|
+
...genTextColor,
|
|
878
|
+
...genTextColorShort
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
// src/lib/utils/gen-bg-color.ts
|
|
882
|
+
var genBgColor = {
|
|
883
|
+
black: "bg-black",
|
|
884
|
+
white: "bg-white",
|
|
885
|
+
"primary-50": "bg-primary-50",
|
|
886
|
+
"primary-100": "bg-primary-100",
|
|
887
|
+
"primary-200": "bg-primary-200",
|
|
888
|
+
"primary-300": "bg-primary-300",
|
|
889
|
+
"primary-400": "bg-primary-400",
|
|
890
|
+
"primary-500": "bg-primary-500",
|
|
891
|
+
"primary-600": "bg-primary-600",
|
|
892
|
+
"primary-700": "bg-primary-700",
|
|
893
|
+
"primary-800": "bg-primary-800",
|
|
894
|
+
"primary-900": "bg-primary-900",
|
|
895
|
+
"primary-950": "bg-primary-950",
|
|
896
|
+
"secondary-50": "bg-secondary-50",
|
|
897
|
+
"secondary-100": "bg-secondary-100",
|
|
898
|
+
"secondary-200": "bg-secondary-200",
|
|
899
|
+
"secondary-300": "bg-secondary-300",
|
|
900
|
+
"secondary-400": "bg-secondary-400",
|
|
901
|
+
"secondary-500": "bg-secondary-500",
|
|
902
|
+
"secondary-600": "bg-secondary-600",
|
|
903
|
+
"secondary-700": "bg-secondary-700",
|
|
904
|
+
"secondary-800": "bg-secondary-800",
|
|
905
|
+
"secondary-900": "bg-secondary-900",
|
|
906
|
+
"secondary-950": "bg-secondary-950",
|
|
907
|
+
"success-50": "bg-success-50",
|
|
908
|
+
"success-100": "bg-success-100",
|
|
909
|
+
"success-200": "bg-success-200",
|
|
910
|
+
"success-300": "bg-success-300",
|
|
911
|
+
"success-400": "bg-success-400",
|
|
912
|
+
"success-500": "bg-success-500",
|
|
913
|
+
"success-600": "bg-success-600",
|
|
914
|
+
"success-700": "bg-success-700",
|
|
915
|
+
"success-800": "bg-success-800",
|
|
916
|
+
"success-900": "bg-success-900",
|
|
917
|
+
"success-950": "bg-success-950",
|
|
918
|
+
"danger-50": "bg-danger-50",
|
|
919
|
+
"danger-100": "bg-danger-100",
|
|
920
|
+
"danger-200": "bg-danger-200",
|
|
921
|
+
"danger-300": "bg-danger-300",
|
|
922
|
+
"danger-400": "bg-danger-400",
|
|
923
|
+
"danger-500": "bg-danger-500",
|
|
924
|
+
"danger-600": "bg-danger-600",
|
|
925
|
+
"danger-700": "bg-danger-700",
|
|
926
|
+
"danger-800": "bg-danger-800",
|
|
927
|
+
"danger-900": "bg-danger-900",
|
|
928
|
+
"danger-950": "bg-danger-950",
|
|
929
|
+
"warning-50": "bg-warning-50",
|
|
930
|
+
"warning-100": "bg-warning-100",
|
|
931
|
+
"warning-200": "bg-warning-200",
|
|
932
|
+
"warning-300": "bg-warning-300",
|
|
933
|
+
"warning-400": "bg-warning-400",
|
|
934
|
+
"warning-500": "bg-warning-500",
|
|
935
|
+
"warning-600": "bg-warning-600",
|
|
936
|
+
"warning-700": "bg-warning-700",
|
|
937
|
+
"warning-800": "bg-warning-800",
|
|
938
|
+
"warning-900": "bg-warning-900",
|
|
939
|
+
"warning-950": "bg-warning-950",
|
|
940
|
+
"gray-50": "bg-gray-50",
|
|
941
|
+
"gray-100": "bg-gray-100",
|
|
942
|
+
"gray-200": "bg-gray-200",
|
|
943
|
+
"gray-300": "bg-gray-300",
|
|
944
|
+
"gray-400": "bg-gray-400",
|
|
945
|
+
"gray-500": "bg-gray-500",
|
|
946
|
+
"gray-600": "bg-gray-600",
|
|
947
|
+
"gray-700": "bg-gray-700",
|
|
948
|
+
"gray-800": "bg-gray-800",
|
|
949
|
+
"gray-900": "bg-gray-900",
|
|
950
|
+
"gray-950": "bg-gray-950",
|
|
951
|
+
current: "bg-current",
|
|
952
|
+
transparent: "bg-transparent",
|
|
953
|
+
background: "bg-background",
|
|
954
|
+
font: "bg-font"
|
|
955
|
+
};
|
|
956
|
+
var genBgColorShort = {
|
|
957
|
+
primary: "bg-primary-500",
|
|
958
|
+
secondary: "bg-secondary-500",
|
|
959
|
+
success: "bg-success-500",
|
|
960
|
+
danger: "bg-danger-500",
|
|
961
|
+
warning: "bg-warning-500",
|
|
962
|
+
gray: "bg-gray-500",
|
|
963
|
+
black: "bg-black",
|
|
964
|
+
white: "bg-white",
|
|
965
|
+
current: "bg-current",
|
|
966
|
+
transparent: "bg-transparent",
|
|
967
|
+
background: "bg-background"
|
|
968
|
+
};
|
|
969
|
+
var genBgColor50 = (theme) => {
|
|
970
|
+
const colors = {
|
|
971
|
+
primary: theme === "dark" ? "bg-primary-950" : "bg-primary-50",
|
|
972
|
+
secondary: theme === "dark" ? "bg-secondary-950" : "bg-secondary-50",
|
|
973
|
+
success: theme === "dark" ? "bg-success-950" : "bg-success-50",
|
|
974
|
+
danger: theme === "dark" ? "bg-danger-950" : "bg-danger-50",
|
|
975
|
+
warning: theme === "dark" ? "bg-warning-950" : "bg-warning-50",
|
|
976
|
+
gray: theme === "dark" ? "bg-gray-950" : "bg-gray-50",
|
|
977
|
+
white: theme === "dark" ? "bg-gray-950" : "bg-white"
|
|
978
|
+
};
|
|
979
|
+
return colors;
|
|
980
|
+
};
|
|
981
|
+
var genBgColorHover = {
|
|
982
|
+
primary: "bg-primary-500 hover:bg-primary-300 active:bg-primary-600",
|
|
983
|
+
secondary: "bg-secondary-500 hover:bg-secondary-300 active:bg-secondary-600",
|
|
984
|
+
success: "bg-success-500 hover:bg-success-300 active:bg-success-600",
|
|
985
|
+
danger: "bg-danger-500 hover:bg-danger-300 active:bg-danger-600",
|
|
986
|
+
warning: "bg-warning-500 hover:bg-warning-300 active:bg-warning-600",
|
|
987
|
+
gray: "bg-gray-500 hover:bg-gray-300 active:bg-gray-600",
|
|
988
|
+
white: "bg-white hover:bg-gray-300! active:bg-gray-100!"
|
|
989
|
+
};
|
|
990
|
+
var genBgColorGhostHover = {
|
|
991
|
+
primary: "bg-primary-50 hover:bg-primary-300 active:bg-primary-100",
|
|
992
|
+
secondary: "bg-secondary-50 hover:bg-secondary-300 active:bg-secondary-100",
|
|
993
|
+
success: "bg-success-50 hover:bg-success-300 active:bg-success-100",
|
|
994
|
+
danger: "bg-danger-50 hover:bg-danger-300 active:bg-danger-100",
|
|
995
|
+
warning: "bg-warning-50 hover:bg-warning-300 active:bg-warning-100",
|
|
996
|
+
gray: "bg-gray-50 hover:bg-gray-300 active:bg-gray-100",
|
|
997
|
+
white: "bg-white hover:bg-gray-300! active:bg-gray-100!"
|
|
998
|
+
};
|
|
999
|
+
var genBgOverlay = {
|
|
1000
|
+
"black-50": "bg-overlay-black-50",
|
|
1001
|
+
"black-80": "bg-overlay-black-80",
|
|
1002
|
+
"white-50": "bg-overlay-white-50",
|
|
1003
|
+
"white-80": "bg-overlay-white-80",
|
|
1004
|
+
"gradient-black": "bg-overlay-gradient-black",
|
|
1005
|
+
"gradient-white": "bg-overlay-gradient-white"
|
|
1006
|
+
};
|
|
1007
|
+
var genBgAllColors = {
|
|
1008
|
+
...genBgColor,
|
|
1009
|
+
...genBgColorShort
|
|
1010
|
+
};
|
|
1011
|
+
var genBgAllColorsAndOverlays = {
|
|
1012
|
+
...genBgAllColors,
|
|
1013
|
+
...genBgOverlay
|
|
1014
|
+
};
|
|
1015
|
+
|
|
1016
|
+
// src/lib/utils/gen-border-color.ts
|
|
1017
|
+
var genBorderColor = {
|
|
1018
|
+
black: "border-black",
|
|
1019
|
+
white: "border-white",
|
|
1020
|
+
"primary-50": "border-primary-50",
|
|
1021
|
+
"primary-100": "border-primary-100",
|
|
1022
|
+
"primary-200": "border-primary-200",
|
|
1023
|
+
"primary-300": "border-primary-300",
|
|
1024
|
+
"primary-400": "border-primary-400",
|
|
1025
|
+
"primary-500": "border-primary-500",
|
|
1026
|
+
"primary-600": "border-primary-600",
|
|
1027
|
+
"primary-700": "border-primary-700",
|
|
1028
|
+
"primary-800": "border-primary-800",
|
|
1029
|
+
"primary-900": "border-primary-900",
|
|
1030
|
+
"primary-950": "border-primary-950",
|
|
1031
|
+
"secondary-50": "border-secondary-50",
|
|
1032
|
+
"secondary-100": "border-secondary-100",
|
|
1033
|
+
"secondary-200": "border-secondary-200",
|
|
1034
|
+
"secondary-300": "border-secondary-300",
|
|
1035
|
+
"secondary-400": "border-secondary-400",
|
|
1036
|
+
"secondary-500": "border-secondary-500",
|
|
1037
|
+
"secondary-600": "border-secondary-600",
|
|
1038
|
+
"secondary-700": "border-secondary-700",
|
|
1039
|
+
"secondary-800": "border-secondary-800",
|
|
1040
|
+
"secondary-900": "border-secondary-900",
|
|
1041
|
+
"secondary-950": "border-secondary-950",
|
|
1042
|
+
"success-50": "border-success-50",
|
|
1043
|
+
"success-100": "border-success-100",
|
|
1044
|
+
"success-200": "border-success-200",
|
|
1045
|
+
"success-300": "border-success-300",
|
|
1046
|
+
"success-400": "border-success-400",
|
|
1047
|
+
"success-500": "border-success-500",
|
|
1048
|
+
"success-600": "border-success-600",
|
|
1049
|
+
"success-700": "border-success-700",
|
|
1050
|
+
"success-800": "border-success-800",
|
|
1051
|
+
"success-900": "border-success-900",
|
|
1052
|
+
"success-950": "border-success-950",
|
|
1053
|
+
"danger-50": "border-danger-50",
|
|
1054
|
+
"danger-100": "border-danger-100",
|
|
1055
|
+
"danger-200": "border-danger-200",
|
|
1056
|
+
"danger-300": "border-danger-300",
|
|
1057
|
+
"danger-400": "border-danger-400",
|
|
1058
|
+
"danger-500": "border-danger-500",
|
|
1059
|
+
"danger-600": "border-danger-600",
|
|
1060
|
+
"danger-700": "border-danger-700",
|
|
1061
|
+
"danger-800": "border-danger-800",
|
|
1062
|
+
"danger-900": "border-danger-900",
|
|
1063
|
+
"danger-950": "border-danger-950",
|
|
1064
|
+
"warning-50": "border-warning-50",
|
|
1065
|
+
"warning-100": "border-warning-100",
|
|
1066
|
+
"warning-200": "border-warning-200",
|
|
1067
|
+
"warning-300": "border-warning-300",
|
|
1068
|
+
"warning-400": "border-warning-400",
|
|
1069
|
+
"warning-500": "border-warning-500",
|
|
1070
|
+
"warning-600": "border-warning-600",
|
|
1071
|
+
"warning-700": "border-warning-700",
|
|
1072
|
+
"warning-800": "border-warning-800",
|
|
1073
|
+
"warning-900": "border-warning-900",
|
|
1074
|
+
"warning-950": "border-warning-950",
|
|
1075
|
+
"gray-50": "border-gray-50",
|
|
1076
|
+
"gray-100": "border-gray-100",
|
|
1077
|
+
"gray-200": "border-gray-200",
|
|
1078
|
+
"gray-300": "border-gray-300",
|
|
1079
|
+
"gray-400": "border-gray-400",
|
|
1080
|
+
"gray-500": "border-gray-500",
|
|
1081
|
+
"gray-600": "border-gray-600",
|
|
1082
|
+
"gray-700": "border-gray-700",
|
|
1083
|
+
"gray-800": "border-gray-800",
|
|
1084
|
+
"gray-900": "border-gray-900",
|
|
1085
|
+
"gray-950": "border-gray-950",
|
|
1086
|
+
current: "border-current",
|
|
1087
|
+
transparent: "border-transparent",
|
|
1088
|
+
background: "border-background",
|
|
1089
|
+
font: "border-font"
|
|
1090
|
+
};
|
|
1091
|
+
var genBorderColorShort = {
|
|
1092
|
+
primary: "border-primary-500",
|
|
1093
|
+
secondary: "border-secondary-500",
|
|
1094
|
+
success: "border-success-500",
|
|
1095
|
+
danger: "border-danger-500",
|
|
1096
|
+
warning: "border-warning-500",
|
|
1097
|
+
gray: "border-gray-500",
|
|
1098
|
+
black: "border-black",
|
|
1099
|
+
white: "border-white",
|
|
1100
|
+
current: "border-current",
|
|
1101
|
+
transparent: "border-transparent",
|
|
1102
|
+
background: "border-background"
|
|
1103
|
+
};
|
|
1104
|
+
var genBorderColorHover = {
|
|
1105
|
+
primary: "border-primary-500 hover:border-primary-300 active:border-primary-600",
|
|
1106
|
+
secondary: "border-secondary-500 hover:border-secondary-300 active:border-secondary-600",
|
|
1107
|
+
success: "border-success-500 hover:border-success-300 active:border-success-600",
|
|
1108
|
+
danger: "border-danger-500 hover:border-danger-300 active:border-danger-600",
|
|
1109
|
+
warning: "border-warning-500 hover:border-warning-300 active:border-warning-600",
|
|
1110
|
+
gray: "border-gray-500 hover:border-gray-300 active:border-gray-600",
|
|
1111
|
+
white: "border-white hover:border-gray-300 active:border-gray-100"
|
|
1112
|
+
};
|
|
1113
|
+
var genBorderAllColors = {
|
|
1114
|
+
...genBorderColor,
|
|
1115
|
+
...genBorderColorShort
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
// src/lib/utils/gen-gap.ts
|
|
1119
|
+
var genGap = {
|
|
1120
|
+
"2xl": "gap-12",
|
|
1121
|
+
xl: "gap-8",
|
|
1122
|
+
lg: "gap-6",
|
|
1123
|
+
md: "gap-4",
|
|
1124
|
+
sm: "gap-3",
|
|
1125
|
+
xs: "gap-2",
|
|
1126
|
+
"2xs": "gap-1",
|
|
1127
|
+
"0px": "0px"
|
|
1128
|
+
};
|
|
1129
|
+
var genRowGap = {
|
|
1130
|
+
"2xl": "gap-y-12",
|
|
1131
|
+
xl: "gap-y-8",
|
|
1132
|
+
lg: "gap-y-6",
|
|
1133
|
+
md: "gap-y-4",
|
|
1134
|
+
sm: "gap-y-3",
|
|
1135
|
+
xs: "gap-y-2",
|
|
1136
|
+
"2xs": "gap-y-1",
|
|
1137
|
+
"0px": "0px"
|
|
1138
|
+
};
|
|
1139
|
+
var genColGap = {
|
|
1140
|
+
"2xl": "gap-x-12",
|
|
1141
|
+
xl: "gap-x-8",
|
|
1142
|
+
lg: "gap-x-6",
|
|
1143
|
+
md: "gap-x-4",
|
|
1144
|
+
sm: "gap-x-3",
|
|
1145
|
+
xs: "gap-x-2",
|
|
1146
|
+
"2xs": "gap-x-1",
|
|
1147
|
+
"0px": "0px"
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1150
|
+
// src/lib/utils/clsx.tsx
|
|
1151
|
+
import classNameX from "clsx";
|
|
1152
|
+
|
|
1153
|
+
// src/lib/utils/tools.ts
|
|
1154
|
+
import { createTools } from "tailwindest";
|
|
1155
|
+
import { twMerge } from "tailwind-merge";
|
|
1156
|
+
var tw = createTools({
|
|
1157
|
+
merger: twMerge
|
|
1158
|
+
// set tailwind-merge as merger, [optional]
|
|
1159
|
+
});
|
|
1160
|
+
|
|
1161
|
+
// src/lib/utils/clsx.tsx
|
|
1162
|
+
var clsx = (...classes) => classNameX(tw.def(classes));
|
|
1163
|
+
|
|
1164
|
+
// src/lib/utils/gen-align.ts
|
|
1165
|
+
var genAlignContent = {
|
|
1166
|
+
normal: "content-normal",
|
|
1167
|
+
center: "content-center",
|
|
1168
|
+
start: "content-start",
|
|
1169
|
+
end: "content-end",
|
|
1170
|
+
"space-between": "content-between",
|
|
1171
|
+
"space-around": "content-around",
|
|
1172
|
+
"space-evenly": "content-evenly",
|
|
1173
|
+
baseline: "content-baseline",
|
|
1174
|
+
stretch: "content-stretch"
|
|
1175
|
+
};
|
|
1176
|
+
var genAlignItems = {
|
|
1177
|
+
start: "items-start",
|
|
1178
|
+
end: "items-end",
|
|
1179
|
+
"end-safe": "items-end-safe",
|
|
1180
|
+
center: "items-center",
|
|
1181
|
+
"center-safe": "items-center-safe",
|
|
1182
|
+
baseline: "items-baseline",
|
|
1183
|
+
"baseline-start": "items-baseline-last",
|
|
1184
|
+
stretch: "items-stretch"
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
// src/lib/utils/gen-justify.ts
|
|
1188
|
+
var genJustifyContent = {
|
|
1189
|
+
start: "justify-start",
|
|
1190
|
+
end: "justify-end",
|
|
1191
|
+
"end-safe": "justify-end-safe",
|
|
1192
|
+
center: "justify-center",
|
|
1193
|
+
"center-safe": "justify-center-safe",
|
|
1194
|
+
"space-between": "justify-between",
|
|
1195
|
+
"space-around": "justify-around",
|
|
1196
|
+
"space-evenly": "justify-evenly",
|
|
1197
|
+
stretch: "justify-stretch",
|
|
1198
|
+
baseline: "justify-baseline",
|
|
1199
|
+
normal: "justify-normal"
|
|
1200
|
+
};
|
|
1201
|
+
var genJustifyItems = {
|
|
1202
|
+
start: "justify-items-start",
|
|
1203
|
+
end: "justify-items-end",
|
|
1204
|
+
"end-safe": "justify-items-end-safe",
|
|
1205
|
+
center: "justify-items-center",
|
|
1206
|
+
"center-safe": "justify-items-center-safe",
|
|
1207
|
+
stretch: "justify-items-stretch",
|
|
1208
|
+
normal: "justify-items-normal"
|
|
1209
|
+
};
|
|
1210
|
+
|
|
1211
|
+
// src/lib/utils/gen-max-width.ts
|
|
1212
|
+
var genMaxWidth = {
|
|
1213
|
+
"3xs": "max-w-3xs",
|
|
1214
|
+
"2xs": "max-w-2xs",
|
|
1215
|
+
xs: "max-w-xs",
|
|
1216
|
+
sm: "max-w-sm",
|
|
1217
|
+
md: "max-w-md",
|
|
1218
|
+
lg: "max-w-lg",
|
|
1219
|
+
xl: "max-w-xl",
|
|
1220
|
+
"2xl": "max-w-2xl",
|
|
1221
|
+
"3xl": "max-w-3xl",
|
|
1222
|
+
"4xl": "max-w-4xl",
|
|
1223
|
+
"5xl": "max-w-5xl",
|
|
1224
|
+
"6xl": "max-w-6xl",
|
|
1225
|
+
"7xl": "max-w-7xl",
|
|
1226
|
+
none: "max-w-none",
|
|
1227
|
+
px: "max-w-px",
|
|
1228
|
+
full: "max-w-full",
|
|
1229
|
+
dvw: "max-w-dvw",
|
|
1230
|
+
dvh: "max-w-dvh",
|
|
1231
|
+
lvw: "max-w-lvw",
|
|
1232
|
+
lvh: "max-w-lvh",
|
|
1233
|
+
svw: "max-w-svw",
|
|
1234
|
+
svh: "max-w-svh",
|
|
1235
|
+
screen: "max-w-screen",
|
|
1236
|
+
min: "max-w-min",
|
|
1237
|
+
max: "max-w-max",
|
|
1238
|
+
fit: "max-w-fit"
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
// src/lib/utils/gen-border-radius.ts
|
|
1242
|
+
var genBorderRadius = {
|
|
1243
|
+
xs: "rounded-xs",
|
|
1244
|
+
sm: "rounded-sm",
|
|
1245
|
+
md: "rounded-md",
|
|
1246
|
+
lg: "rounded-lg",
|
|
1247
|
+
xl: "rounded-xl",
|
|
1248
|
+
"2xl": "rounded-2xl",
|
|
1249
|
+
"3xl": "rounded-3xl",
|
|
1250
|
+
"4xl": "rounded-4xl",
|
|
1251
|
+
full: "rounded-full"
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
// src/lib/utils/gen-object-fit.ts
|
|
1255
|
+
var genObjectFit = {
|
|
1256
|
+
contain: "object-contain",
|
|
1257
|
+
cover: "object-cover",
|
|
1258
|
+
fill: "object-fill",
|
|
1259
|
+
none: "object-none",
|
|
1260
|
+
"scale-down": "object-scale-down"
|
|
1261
|
+
};
|
|
1262
|
+
|
|
1263
|
+
// src/lib/utils/gen-button-color.ts
|
|
1264
|
+
var genButtonDisabled = {
|
|
1265
|
+
plain: "disabled:bg-gray-200 disabled:hover:bg-gray-200 disabled:text-gray-500!",
|
|
1266
|
+
ghost: "disabled:bg-gray-200 disabled:hover:bg-gray-200 disabled:text-gray-500",
|
|
1267
|
+
outline: "disabled:border-gray-500 disabled:text-gray-500 disabled:hover:border-gray-500 disabled:hover:text-gray-500",
|
|
1268
|
+
transparent: "disabled:text-gray-500 disabled:hover:text-gray-500"
|
|
1269
|
+
};
|
|
1270
|
+
|
|
1271
|
+
// src/lib/utils/gen-box-shadow.ts
|
|
1272
|
+
var genBoxShadow = {
|
|
1273
|
+
"2xs": "shadow-2xs",
|
|
1274
|
+
xs: "shadow-xs",
|
|
1275
|
+
sm: "shadow-sm",
|
|
1276
|
+
md: "shadow-md",
|
|
1277
|
+
lg: "shadow-lg",
|
|
1278
|
+
xl: "shadow-xl",
|
|
1279
|
+
"2xl": "shadow-2xl",
|
|
1280
|
+
none: "shadow-none"
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
// src/lib/utils/gen-vertical-align.ts
|
|
1284
|
+
var genVAlign = {
|
|
1285
|
+
"align-baseline": "align-baseline",
|
|
1286
|
+
"align-top": "align-top",
|
|
1287
|
+
"align-middle": "align-middle",
|
|
1288
|
+
"align-bottom": "align-bottom",
|
|
1289
|
+
"align-text-top": "align-text-top",
|
|
1290
|
+
"align-text-bottom": "align-text-bottom",
|
|
1291
|
+
"align-sub": "align-sub",
|
|
1292
|
+
"align-super": "align-super"
|
|
1293
|
+
};
|
|
1294
|
+
|
|
1295
|
+
// src/lib/components/Text/Text.tsx
|
|
1296
|
+
import "react";
|
|
1297
|
+
|
|
1298
|
+
// src/lib/components/Table/Table.tsx
|
|
1299
|
+
import "react";
|
|
1300
|
+
import { uuid as uuid2 } from "@julseb-lib/utils";
|
|
1301
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1302
|
+
var Table = ({
|
|
1303
|
+
className,
|
|
1304
|
+
ref,
|
|
1305
|
+
children,
|
|
1306
|
+
variant = "bordered",
|
|
1307
|
+
vAlign = "align-top",
|
|
1308
|
+
textAlign = "left",
|
|
1309
|
+
linkify,
|
|
1310
|
+
blank,
|
|
1311
|
+
headers,
|
|
1312
|
+
footers,
|
|
1313
|
+
data,
|
|
1314
|
+
...rest
|
|
1315
|
+
}) => {
|
|
1316
|
+
return /* @__PURE__ */ jsxs2(
|
|
1317
|
+
"table",
|
|
1318
|
+
{
|
|
1319
|
+
ref,
|
|
1320
|
+
className: clsx(
|
|
1321
|
+
"table bg-background w-full h-[1px] border-collapse border-spacing-0 table-fixed",
|
|
1322
|
+
TEXT_BASE_CLASSES,
|
|
1323
|
+
"text-(length:--font-size-small)",
|
|
1324
|
+
genLinkColor["primary"],
|
|
1325
|
+
genButtonColor["primary"],
|
|
1326
|
+
"[&_thead]:bg-primary-500 [&_thead]:text-white [&_thead]:font-bold",
|
|
1327
|
+
"[&_td]:overflow-x-scroll [&_td]:px-2 [&_td]:py-1 [&_th]:overflow-x-scroll [&_th]:px-2 [&_th]:py-1",
|
|
1328
|
+
"md:[&_td]:table-cell md:[&_th]:table-cell [&_td]:block [&_th]:block",
|
|
1329
|
+
variant === "bordered" && [
|
|
1330
|
+
"border border-gray-200",
|
|
1331
|
+
"[&_thead_th:not(:last-child)]:border-r [&_thead_th:not(:last-child)]:border-background [&_td]:border [&_td]:border-gray-200"
|
|
1332
|
+
],
|
|
1333
|
+
variant === "stripped" && [
|
|
1334
|
+
"[&_tbody_tr:nth-child(even)]:bg-gray-100"
|
|
1335
|
+
],
|
|
1336
|
+
variant === "border-bottom" && [
|
|
1337
|
+
"[&_tbody_tr]:border-b [&_tbody_tr]:border-b-gray-200"
|
|
1338
|
+
],
|
|
1339
|
+
genVAlign[vAlign],
|
|
1340
|
+
genTextAlign[textAlign],
|
|
1341
|
+
"table",
|
|
1342
|
+
className
|
|
1343
|
+
),
|
|
1344
|
+
...rest,
|
|
1345
|
+
children: [
|
|
1346
|
+
headers && /* @__PURE__ */ jsx2("thead", { className: clsx(genVAlign[vAlign]), children: /* @__PURE__ */ jsx2("tr", { className: clsx(genVAlign[vAlign]), children: headers.map((header) => /* @__PURE__ */ jsx2(
|
|
1347
|
+
"th",
|
|
1348
|
+
{
|
|
1349
|
+
className: clsx(
|
|
1350
|
+
genVAlign[vAlign],
|
|
1351
|
+
"no-scrollbar"
|
|
1352
|
+
),
|
|
1353
|
+
children: linkify && typeof header === "string" ? linkifyText(header, blank) : header
|
|
1354
|
+
},
|
|
1355
|
+
uuid2()
|
|
1356
|
+
)) }) }),
|
|
1357
|
+
data ? /* @__PURE__ */ jsx2("tbody", { className: clsx(genVAlign[vAlign]), children: data.map((row) => /* @__PURE__ */ jsx2("tr", { children: row.map((col) => /* @__PURE__ */ jsx2("td", { className: "no-scrollbar", children: linkify && typeof col === "string" ? linkifyText(col, blank) : col }, uuid2())) }, uuid2())) }) : /* @__PURE__ */ jsx2("tbody", { children }),
|
|
1358
|
+
footers && /* @__PURE__ */ jsx2("tfoot", { children: /* @__PURE__ */ jsx2("tr", { children: footers.map((footer) => /* @__PURE__ */ jsx2("td", { className: "no-scrollbar", children: linkify && typeof footer === "string" ? linkifyText(footer, blank) : footer }, uuid2())) }) })
|
|
1359
|
+
]
|
|
1360
|
+
}
|
|
1361
|
+
);
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
// src/lib/utils/options-markdown.ts
|
|
1365
|
+
var libOptionsMarkdown = {
|
|
1366
|
+
forceBlock: true,
|
|
1367
|
+
wrapper: "div",
|
|
1368
|
+
overrides: {
|
|
1369
|
+
h1: { component: Text, props: { tag: "h1" } },
|
|
1370
|
+
h2: { component: Text, props: { tag: "h2" } },
|
|
1371
|
+
h3: { component: Text, props: { tag: "h3" } },
|
|
1372
|
+
h4: { component: Text, props: { tag: "h4" } },
|
|
1373
|
+
h5: { component: Text, props: { tag: "h5" } },
|
|
1374
|
+
h6: { component: Text, props: { tag: "h6" } },
|
|
1375
|
+
p: { component: Text, props: { tag: "p" } },
|
|
1376
|
+
strong: { component: Text, props: { tag: "strong" } },
|
|
1377
|
+
em: { component: Text, props: { tag: "em" } },
|
|
1378
|
+
ul: { component: Text, props: { tag: "ul" } },
|
|
1379
|
+
ol: { component: Text, props: { tag: "ol" } },
|
|
1380
|
+
dl: { component: Text, props: { tag: "dl" } },
|
|
1381
|
+
small: { component: Text, props: { tag: "small" } },
|
|
1382
|
+
blockquote: { component: Text, props: { tag: "blockquote" } },
|
|
1383
|
+
table: { component: Table }
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
var libMarkdownEditorOptions = {
|
|
1387
|
+
bold: true,
|
|
1388
|
+
italic: true,
|
|
1389
|
+
strikethrough: true,
|
|
1390
|
+
underline: true,
|
|
1391
|
+
ul: true,
|
|
1392
|
+
ol: true,
|
|
1393
|
+
link: true,
|
|
1394
|
+
quote: true,
|
|
1395
|
+
hr: true,
|
|
1396
|
+
code: true,
|
|
1397
|
+
codeBlock: true,
|
|
1398
|
+
comment: true,
|
|
1399
|
+
image: true,
|
|
1400
|
+
viewCode: true,
|
|
1401
|
+
viewLive: true,
|
|
1402
|
+
viewPreview: true,
|
|
1403
|
+
titles: true
|
|
1404
|
+
};
|
|
1405
|
+
|
|
1406
|
+
// src/lib/utils/gen-ring-color.ts
|
|
1407
|
+
var genRingColor = {
|
|
1408
|
+
primary: "focus:ring-1 focus:ring-primary-800",
|
|
1409
|
+
secondary: "focus:ring-1 focus:ring-secondary-800",
|
|
1410
|
+
success: "focus:ring-1 focus:ring-success-800",
|
|
1411
|
+
danger: "focus:ring-1 focus:ring-danger-800",
|
|
1412
|
+
warning: "focus:ring-1 focus:ring-warning-800",
|
|
1413
|
+
gray: "focus:ring-1 focus:ring-gray-800",
|
|
1414
|
+
white: "focus:ring-1 focus:ring-gray-500"
|
|
1415
|
+
};
|
|
1416
|
+
var genRingColorChildren = {
|
|
1417
|
+
primary: "[&>*]:focus:ring-1 [&>*]:focus:ring-primary-800",
|
|
1418
|
+
secondary: "[&>*]:focus:ring-1 [&>*]:focus:ring-secondary-800",
|
|
1419
|
+
success: "[&>*]:focus:ring-1 [&>*]:focus:ring-success-800",
|
|
1420
|
+
danger: "[&>*]:focus:ring-1 [&>*]:focus:ring-danger-800",
|
|
1421
|
+
warning: "[&>*]:focus:ring-1 [&>*]:focus:ring-warning-800",
|
|
1422
|
+
gray: "[&>*]:focus:ring-1 [&>*]:focus:ring-gray-800",
|
|
1423
|
+
white: "[&>*]:focus:ring-1 [&>*]:focus:ring-gray-500"
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
// src/lib/utils/detect-language.ts
|
|
1427
|
+
function detectLanguage() {
|
|
1428
|
+
if (window && typeof window !== "undefined") {
|
|
1429
|
+
if (localStorage.getItem("language") !== null) {
|
|
1430
|
+
return localStorage.getItem("language");
|
|
1431
|
+
} else if (localStorage.getItem("lang") !== null) {
|
|
1432
|
+
return localStorage.getItem("lang");
|
|
1433
|
+
} else {
|
|
1434
|
+
if (navigator && typeof navigator !== "undefined") {
|
|
1435
|
+
return navigator.language;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
// src/lib/utils/disable-scroll.ts
|
|
1442
|
+
function disableScroll() {
|
|
1443
|
+
const body = document.body;
|
|
1444
|
+
body.style.height = "100vh";
|
|
1445
|
+
body.style.overflow = "hidden";
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
// src/lib/utils/enable-scroll.ts
|
|
1450
|
+
function enableScroll() {
|
|
1451
|
+
const body = document.body;
|
|
1452
|
+
body.style.height = "";
|
|
1453
|
+
body.style.overflow = "";
|
|
1454
|
+
return;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
// src/lib/utils/scroll-to-top.ts
|
|
1458
|
+
function scrollToTop() {
|
|
1459
|
+
if (typeof window !== "undefined") {
|
|
1460
|
+
return window.scrollTo(0, 0);
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
// src/lib/components/Text/templates/H1.tsx
|
|
1465
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
1466
|
+
var H1 = ({
|
|
1467
|
+
element = "h1",
|
|
1468
|
+
className,
|
|
1469
|
+
children,
|
|
1470
|
+
color = "currentColor",
|
|
1471
|
+
linkColor = "primary",
|
|
1472
|
+
textAlign = "left",
|
|
1473
|
+
display,
|
|
1474
|
+
...rest
|
|
1475
|
+
}) => {
|
|
1476
|
+
const Element = element;
|
|
1477
|
+
return /* @__PURE__ */ jsx3(
|
|
1478
|
+
Element,
|
|
1479
|
+
{
|
|
1480
|
+
className: clsx(
|
|
1481
|
+
display ? "text-display-h1" : "text-h1",
|
|
1482
|
+
TEXT_BASE_CLASSES,
|
|
1483
|
+
"font-black",
|
|
1484
|
+
genTextAlign[textAlign],
|
|
1485
|
+
genTextAllColor[color],
|
|
1486
|
+
genLinkColor[linkColor],
|
|
1487
|
+
genButtonColor[linkColor],
|
|
1488
|
+
"h1",
|
|
1489
|
+
className
|
|
1490
|
+
),
|
|
1491
|
+
...rest,
|
|
1492
|
+
children
|
|
1493
|
+
}
|
|
1494
|
+
);
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
// src/lib/components/Text/templates/H2.tsx
|
|
1498
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1499
|
+
var H2 = ({
|
|
1500
|
+
element = "h2",
|
|
1501
|
+
className,
|
|
1502
|
+
children,
|
|
1503
|
+
color = "currentColor",
|
|
1504
|
+
linkColor = "primary",
|
|
1505
|
+
textAlign = "left",
|
|
1506
|
+
display,
|
|
1507
|
+
...rest
|
|
1508
|
+
}) => {
|
|
1509
|
+
const Element = element;
|
|
1510
|
+
return /* @__PURE__ */ jsx4(
|
|
1511
|
+
Element,
|
|
1512
|
+
{
|
|
1513
|
+
className: clsx(
|
|
1514
|
+
TEXT_BASE_CLASSES,
|
|
1515
|
+
"font-black",
|
|
1516
|
+
display ? "text-display-h2" : "text-h2",
|
|
1517
|
+
genTextAlign[textAlign],
|
|
1518
|
+
genTextAllColor[color],
|
|
1519
|
+
genLinkColor[linkColor],
|
|
1520
|
+
genButtonColor[linkColor],
|
|
1521
|
+
"h2",
|
|
1522
|
+
className
|
|
1523
|
+
),
|
|
1524
|
+
...rest,
|
|
1525
|
+
children
|
|
1526
|
+
}
|
|
1527
|
+
);
|
|
1528
|
+
};
|
|
1529
|
+
|
|
1530
|
+
// src/lib/components/Text/templates/H3.tsx
|
|
1531
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1532
|
+
var H3 = ({
|
|
1533
|
+
element = "h3",
|
|
1534
|
+
className,
|
|
1535
|
+
children,
|
|
1536
|
+
color = "currentColor",
|
|
1537
|
+
linkColor = "primary",
|
|
1538
|
+
textAlign = "left",
|
|
1539
|
+
display,
|
|
1540
|
+
...rest
|
|
1541
|
+
}) => {
|
|
1542
|
+
const Element = element;
|
|
1543
|
+
return /* @__PURE__ */ jsx5(
|
|
1544
|
+
Element,
|
|
1545
|
+
{
|
|
1546
|
+
className: clsx(
|
|
1547
|
+
TEXT_BASE_CLASSES,
|
|
1548
|
+
"font-black",
|
|
1549
|
+
display ? "text-display-h3" : "text-h3",
|
|
1550
|
+
genTextAlign[textAlign],
|
|
1551
|
+
genTextAllColor[color],
|
|
1552
|
+
genLinkColor[linkColor],
|
|
1553
|
+
genButtonColor[linkColor],
|
|
1554
|
+
"h3",
|
|
1555
|
+
className
|
|
1556
|
+
),
|
|
1557
|
+
...rest,
|
|
1558
|
+
children
|
|
1559
|
+
}
|
|
1560
|
+
);
|
|
1561
|
+
};
|
|
1562
|
+
|
|
1563
|
+
// src/lib/components/Text/templates/H4.tsx
|
|
1564
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
1565
|
+
var H4 = ({
|
|
1566
|
+
element = "h4",
|
|
1567
|
+
className,
|
|
1568
|
+
children,
|
|
1569
|
+
color = "currentColor",
|
|
1570
|
+
linkColor = "primary",
|
|
1571
|
+
textAlign = "left",
|
|
1572
|
+
display,
|
|
1573
|
+
...rest
|
|
1574
|
+
}) => {
|
|
1575
|
+
const Element = element;
|
|
1576
|
+
return /* @__PURE__ */ jsx6(
|
|
1577
|
+
Element,
|
|
1578
|
+
{
|
|
1579
|
+
className: clsx(
|
|
1580
|
+
TEXT_BASE_CLASSES,
|
|
1581
|
+
"font-black",
|
|
1582
|
+
display ? "text-display-h4" : "text-h4",
|
|
1583
|
+
genTextAlign[textAlign],
|
|
1584
|
+
genTextAllColor[color],
|
|
1585
|
+
genLinkColor[linkColor],
|
|
1586
|
+
genButtonColor[linkColor],
|
|
1587
|
+
"h4",
|
|
1588
|
+
className
|
|
1589
|
+
),
|
|
1590
|
+
...rest,
|
|
1591
|
+
children
|
|
1592
|
+
}
|
|
1593
|
+
);
|
|
1594
|
+
};
|
|
1595
|
+
|
|
1596
|
+
// src/lib/components/Text/templates/H5.tsx
|
|
1597
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1598
|
+
var H5 = ({
|
|
1599
|
+
element = "h5",
|
|
1600
|
+
className,
|
|
1601
|
+
children,
|
|
1602
|
+
color = "currentColor",
|
|
1603
|
+
linkColor = "primary",
|
|
1604
|
+
textAlign = "left",
|
|
1605
|
+
display,
|
|
1606
|
+
...rest
|
|
1607
|
+
}) => {
|
|
1608
|
+
const Element = element;
|
|
1609
|
+
return /* @__PURE__ */ jsx7(
|
|
1610
|
+
Element,
|
|
1611
|
+
{
|
|
1612
|
+
className: clsx(
|
|
1613
|
+
TEXT_BASE_CLASSES,
|
|
1614
|
+
"font-black",
|
|
1615
|
+
display ? "text-display-h5" : "text-h5",
|
|
1616
|
+
genTextAlign[textAlign],
|
|
1617
|
+
genTextAllColor[color],
|
|
1618
|
+
genLinkColor[linkColor],
|
|
1619
|
+
genButtonColor[linkColor],
|
|
1620
|
+
"h5",
|
|
1621
|
+
className
|
|
1622
|
+
),
|
|
1623
|
+
...rest,
|
|
1624
|
+
children
|
|
1625
|
+
}
|
|
1626
|
+
);
|
|
1627
|
+
};
|
|
1628
|
+
|
|
1629
|
+
// src/lib/components/Text/templates/H6.tsx
|
|
1630
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1631
|
+
var H6 = ({
|
|
1632
|
+
element = "h6",
|
|
1633
|
+
className,
|
|
1634
|
+
children,
|
|
1635
|
+
color = "currentColor",
|
|
1636
|
+
linkColor = "primary",
|
|
1637
|
+
textAlign = "left",
|
|
1638
|
+
...rest
|
|
1639
|
+
}) => {
|
|
1640
|
+
const Element = element;
|
|
1641
|
+
return /* @__PURE__ */ jsx8(
|
|
1642
|
+
Element,
|
|
1643
|
+
{
|
|
1644
|
+
className: clsx(
|
|
1645
|
+
TEXT_BASE_CLASSES,
|
|
1646
|
+
"text-h6",
|
|
1647
|
+
"font-black",
|
|
1648
|
+
genTextAlign[textAlign],
|
|
1649
|
+
genTextAllColor[color],
|
|
1650
|
+
genLinkColor[linkColor],
|
|
1651
|
+
genButtonColor[linkColor],
|
|
1652
|
+
"h6",
|
|
1653
|
+
className
|
|
1654
|
+
),
|
|
1655
|
+
...rest,
|
|
1656
|
+
children
|
|
1657
|
+
}
|
|
1658
|
+
);
|
|
1659
|
+
};
|
|
1660
|
+
|
|
1661
|
+
// src/lib/components/Text/templates/P.tsx
|
|
1662
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1663
|
+
var P = ({
|
|
1664
|
+
element = "p",
|
|
1665
|
+
className,
|
|
1666
|
+
children,
|
|
1667
|
+
color = "currentColor",
|
|
1668
|
+
linkColor = "primary",
|
|
1669
|
+
textAlign = "left",
|
|
1670
|
+
...rest
|
|
1671
|
+
}) => {
|
|
1672
|
+
const Element = element;
|
|
1673
|
+
return /* @__PURE__ */ jsx9(
|
|
1674
|
+
Element,
|
|
1675
|
+
{
|
|
1676
|
+
className: clsx(
|
|
1677
|
+
TEXT_BASE_CLASSES,
|
|
1678
|
+
"text-body",
|
|
1679
|
+
genTextAlign[textAlign],
|
|
1680
|
+
genTextAllColor[color],
|
|
1681
|
+
genLinkColor[linkColor],
|
|
1682
|
+
genButtonColor[linkColor],
|
|
1683
|
+
"p",
|
|
1684
|
+
className
|
|
1685
|
+
),
|
|
1686
|
+
...rest,
|
|
1687
|
+
children
|
|
1688
|
+
}
|
|
1689
|
+
);
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
// src/lib/components/Text/templates/Small.tsx
|
|
1693
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1694
|
+
var Small = ({
|
|
1695
|
+
element = "small",
|
|
1696
|
+
className,
|
|
1697
|
+
children,
|
|
1698
|
+
color = "currentColor",
|
|
1699
|
+
linkColor = "primary",
|
|
1700
|
+
textAlign = "left",
|
|
1701
|
+
...rest
|
|
1702
|
+
}) => {
|
|
1703
|
+
const Element = element;
|
|
1704
|
+
return /* @__PURE__ */ jsx10(
|
|
1705
|
+
Element,
|
|
1706
|
+
{
|
|
1707
|
+
className: clsx(
|
|
1708
|
+
TEXT_BASE_CLASSES,
|
|
1709
|
+
"text-small",
|
|
1710
|
+
genTextAlign[textAlign],
|
|
1711
|
+
genTextAllColor[color],
|
|
1712
|
+
genLinkColor[linkColor],
|
|
1713
|
+
genButtonColor[linkColor],
|
|
1714
|
+
"small",
|
|
1715
|
+
className
|
|
1716
|
+
),
|
|
1717
|
+
...rest,
|
|
1718
|
+
children
|
|
1719
|
+
}
|
|
1720
|
+
);
|
|
1721
|
+
};
|
|
1722
|
+
|
|
1723
|
+
// src/lib/components/Text/templates/Strong.tsx
|
|
1724
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1725
|
+
var Strong = ({
|
|
1726
|
+
element = "strong",
|
|
1727
|
+
className,
|
|
1728
|
+
children,
|
|
1729
|
+
color = "currentColor",
|
|
1730
|
+
linkColor = "primary",
|
|
1731
|
+
textAlign = "left",
|
|
1732
|
+
...rest
|
|
1733
|
+
}) => {
|
|
1734
|
+
const Element = element;
|
|
1735
|
+
return /* @__PURE__ */ jsx11(
|
|
1736
|
+
Element,
|
|
1737
|
+
{
|
|
1738
|
+
className: clsx(
|
|
1739
|
+
TEXT_BASE_CLASSES,
|
|
1740
|
+
"font-black",
|
|
1741
|
+
genTextAlign[textAlign],
|
|
1742
|
+
genTextAllColor[color],
|
|
1743
|
+
genLinkColor[linkColor],
|
|
1744
|
+
genButtonColor[linkColor],
|
|
1745
|
+
"strong",
|
|
1746
|
+
className
|
|
1747
|
+
),
|
|
1748
|
+
...rest,
|
|
1749
|
+
children
|
|
1750
|
+
}
|
|
1751
|
+
);
|
|
1752
|
+
};
|
|
1753
|
+
|
|
1754
|
+
// src/lib/components/Text/templates/Em.tsx
|
|
1755
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1756
|
+
var Em = ({
|
|
1757
|
+
element = "em",
|
|
1758
|
+
className,
|
|
1759
|
+
children,
|
|
1760
|
+
color = "currentColor",
|
|
1761
|
+
linkColor = "primary",
|
|
1762
|
+
textAlign = "left",
|
|
1763
|
+
...rest
|
|
1764
|
+
}) => {
|
|
1765
|
+
const Element = element;
|
|
1766
|
+
return /* @__PURE__ */ jsx12(
|
|
1767
|
+
Element,
|
|
1768
|
+
{
|
|
1769
|
+
className: clsx(
|
|
1770
|
+
TEXT_BASE_CLASSES,
|
|
1771
|
+
"italic",
|
|
1772
|
+
genTextAlign[textAlign],
|
|
1773
|
+
genTextAllColor[color],
|
|
1774
|
+
genLinkColor[linkColor],
|
|
1775
|
+
genButtonColor[linkColor],
|
|
1776
|
+
"em",
|
|
1777
|
+
className
|
|
1778
|
+
),
|
|
1779
|
+
...rest,
|
|
1780
|
+
children
|
|
1781
|
+
}
|
|
1782
|
+
);
|
|
1783
|
+
};
|
|
1784
|
+
|
|
1785
|
+
// src/lib/components/Text/templates/Blockquote.tsx
|
|
1786
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1787
|
+
var Blockquote = ({
|
|
1788
|
+
element = "blockquote",
|
|
1789
|
+
className,
|
|
1790
|
+
children,
|
|
1791
|
+
color = "currentColor",
|
|
1792
|
+
linkColor = "primary",
|
|
1793
|
+
textAlign = "left",
|
|
1794
|
+
...rest
|
|
1795
|
+
}) => {
|
|
1796
|
+
const Element = element;
|
|
1797
|
+
return /* @__PURE__ */ jsx13(
|
|
1798
|
+
Element,
|
|
1799
|
+
{
|
|
1800
|
+
className: clsx(
|
|
1801
|
+
TEXT_BASE_CLASSES,
|
|
1802
|
+
"text-h6",
|
|
1803
|
+
"italic ps-4",
|
|
1804
|
+
genTextAlign[textAlign],
|
|
1805
|
+
genTextAllColor[color],
|
|
1806
|
+
genLinkColor[linkColor],
|
|
1807
|
+
genButtonColor[linkColor],
|
|
1808
|
+
"blockquote",
|
|
1809
|
+
className
|
|
1810
|
+
),
|
|
1811
|
+
...rest,
|
|
1812
|
+
children
|
|
1813
|
+
}
|
|
1814
|
+
);
|
|
1815
|
+
};
|
|
1816
|
+
|
|
1817
|
+
// src/lib/components/Text/templates/Ul.tsx
|
|
1818
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1819
|
+
var Ul = ({
|
|
1820
|
+
element = "ul",
|
|
1821
|
+
className,
|
|
1822
|
+
children,
|
|
1823
|
+
color = "currentColor",
|
|
1824
|
+
linkColor = "primary",
|
|
1825
|
+
textAlign = "left",
|
|
1826
|
+
...rest
|
|
1827
|
+
}) => {
|
|
1828
|
+
const Element = element;
|
|
1829
|
+
return /* @__PURE__ */ jsx14(
|
|
1830
|
+
Element,
|
|
1831
|
+
{
|
|
1832
|
+
className: clsx(
|
|
1833
|
+
TEXT_BASE_CLASSES,
|
|
1834
|
+
"text-body",
|
|
1835
|
+
"list-disc ps-8",
|
|
1836
|
+
genTextAlign[textAlign],
|
|
1837
|
+
genTextAllColor[color],
|
|
1838
|
+
genLinkColor[linkColor],
|
|
1839
|
+
genButtonColor[linkColor],
|
|
1840
|
+
"ul",
|
|
1841
|
+
className
|
|
1842
|
+
),
|
|
1843
|
+
...rest,
|
|
1844
|
+
children
|
|
1845
|
+
}
|
|
1846
|
+
);
|
|
1847
|
+
};
|
|
1848
|
+
|
|
1849
|
+
// src/lib/components/Text/templates/Ol.tsx
|
|
1850
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1851
|
+
var Ol = ({
|
|
1852
|
+
element = "ol",
|
|
1853
|
+
className,
|
|
1854
|
+
children,
|
|
1855
|
+
color = "currentColor",
|
|
1856
|
+
linkColor = "primary",
|
|
1857
|
+
textAlign = "left",
|
|
1858
|
+
...rest
|
|
1859
|
+
}) => {
|
|
1860
|
+
const Element = element;
|
|
1861
|
+
return /* @__PURE__ */ jsx15(
|
|
1862
|
+
Element,
|
|
1863
|
+
{
|
|
1864
|
+
className: clsx(
|
|
1865
|
+
TEXT_BASE_CLASSES,
|
|
1866
|
+
"text-body",
|
|
1867
|
+
"list-decimal ps-8",
|
|
1868
|
+
genTextAlign[textAlign],
|
|
1869
|
+
genTextAllColor[color],
|
|
1870
|
+
genLinkColor[linkColor],
|
|
1871
|
+
genButtonColor[linkColor],
|
|
1872
|
+
"ol",
|
|
1873
|
+
className
|
|
1874
|
+
),
|
|
1875
|
+
...rest,
|
|
1876
|
+
children
|
|
1877
|
+
}
|
|
1878
|
+
);
|
|
1879
|
+
};
|
|
1880
|
+
|
|
1881
|
+
// src/lib/components/Text/templates/Dl.tsx
|
|
1882
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1883
|
+
var Dl = ({
|
|
1884
|
+
element = "dl",
|
|
1885
|
+
className,
|
|
1886
|
+
children,
|
|
1887
|
+
color = "currentColor",
|
|
1888
|
+
linkColor = "primary",
|
|
1889
|
+
textAlign = "left",
|
|
1890
|
+
...rest
|
|
1891
|
+
}) => {
|
|
1892
|
+
const Element = element;
|
|
1893
|
+
return /* @__PURE__ */ jsx16(
|
|
1894
|
+
Element,
|
|
1895
|
+
{
|
|
1896
|
+
className: clsx(
|
|
1897
|
+
TEXT_BASE_CLASSES,
|
|
1898
|
+
"text-body",
|
|
1899
|
+
"[&>dt]:font-bold",
|
|
1900
|
+
"[&>dd]:font-normal [&>dd]:ps-4",
|
|
1901
|
+
genTextAlign[textAlign],
|
|
1902
|
+
genTextAllColor[color],
|
|
1903
|
+
genLinkColor[linkColor],
|
|
1904
|
+
genButtonColor[linkColor],
|
|
1905
|
+
"dl",
|
|
1906
|
+
className
|
|
1907
|
+
),
|
|
1908
|
+
...rest,
|
|
1909
|
+
children
|
|
1910
|
+
}
|
|
1911
|
+
);
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
// src/lib/components/Text/Text.tsx
|
|
1915
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1916
|
+
var TEXT_BASE_CLASSES = clsx(
|
|
1917
|
+
"font-family-body",
|
|
1918
|
+
"[&_code]:font-family-code [&_code]:leading-8 [&_code]:p-1 [&_code]:text-primary-500 [&_code]:bg-gray-50 [&_code]:rounded-xs"
|
|
1919
|
+
);
|
|
1920
|
+
var Text = ({ tag = "p", ...rest }) => {
|
|
1921
|
+
switch (tag) {
|
|
1922
|
+
case "h1":
|
|
1923
|
+
return /* @__PURE__ */ jsx17(H1, { ...rest });
|
|
1924
|
+
case "h2":
|
|
1925
|
+
return /* @__PURE__ */ jsx17(H2, { ...rest });
|
|
1926
|
+
case "h3":
|
|
1927
|
+
return /* @__PURE__ */ jsx17(H3, { ...rest });
|
|
1928
|
+
case "h4":
|
|
1929
|
+
return /* @__PURE__ */ jsx17(H4, { ...rest });
|
|
1930
|
+
case "h5":
|
|
1931
|
+
return /* @__PURE__ */ jsx17(H5, { ...rest });
|
|
1932
|
+
case "h6":
|
|
1933
|
+
return /* @__PURE__ */ jsx17(H6, { ...rest });
|
|
1934
|
+
case "small":
|
|
1935
|
+
return /* @__PURE__ */ jsx17(Small, { ...rest });
|
|
1936
|
+
case "strong":
|
|
1937
|
+
return /* @__PURE__ */ jsx17(Strong, { ...rest });
|
|
1938
|
+
case "em":
|
|
1939
|
+
return /* @__PURE__ */ jsx17(Em, { ...rest });
|
|
1940
|
+
case "blockquote":
|
|
1941
|
+
return /* @__PURE__ */ jsx17(Blockquote, { ...rest });
|
|
1942
|
+
case "ul":
|
|
1943
|
+
return /* @__PURE__ */ jsx17(Ul, { ...rest });
|
|
1944
|
+
case "ol":
|
|
1945
|
+
return /* @__PURE__ */ jsx17(Ol, { ...rest });
|
|
1946
|
+
case "dl":
|
|
1947
|
+
return /* @__PURE__ */ jsx17(Dl, { ...rest });
|
|
1948
|
+
case "p":
|
|
1949
|
+
default:
|
|
1950
|
+
return /* @__PURE__ */ jsx17(P, { ...rest });
|
|
1951
|
+
}
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
// src/lib/components/Image/Image.tsx
|
|
1955
|
+
import "react";
|
|
1956
|
+
import { jsx as jsx18, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1957
|
+
var Image = ({
|
|
1958
|
+
className,
|
|
1959
|
+
ref,
|
|
1960
|
+
caption,
|
|
1961
|
+
borderRadius,
|
|
1962
|
+
fit,
|
|
1963
|
+
...rest
|
|
1964
|
+
}) => {
|
|
1965
|
+
const Element = caption ? "figure" : "img";
|
|
1966
|
+
if (caption) {
|
|
1967
|
+
return /* @__PURE__ */ jsxs3(
|
|
1968
|
+
Element,
|
|
1969
|
+
{
|
|
1970
|
+
ref,
|
|
1971
|
+
className: clsx(
|
|
1972
|
+
"relative overflow-hidden image-container",
|
|
1973
|
+
borderRadius && genBorderRadius[borderRadius],
|
|
1974
|
+
className
|
|
1975
|
+
),
|
|
1976
|
+
children: [
|
|
1977
|
+
/* @__PURE__ */ jsx18(
|
|
1978
|
+
"img",
|
|
1979
|
+
{
|
|
1980
|
+
className: clsx(
|
|
1981
|
+
"z-0 relative",
|
|
1982
|
+
fit && genObjectFit[fit],
|
|
1983
|
+
typeof caption === "object" && caption.imgClasses,
|
|
1984
|
+
"image"
|
|
1985
|
+
),
|
|
1986
|
+
...rest
|
|
1987
|
+
}
|
|
1988
|
+
),
|
|
1989
|
+
/* @__PURE__ */ jsx18(
|
|
1990
|
+
"figcaption",
|
|
1991
|
+
{
|
|
1992
|
+
className: clsx(
|
|
1993
|
+
"bottom-0 left-0 z-10 absolute bg-overlay-black-80 px-4 py-2 w-full text-white",
|
|
1994
|
+
typeof caption === "object" && caption.backgroundColor && genBgAllColorsAndOverlays[caption.backgroundColor],
|
|
1995
|
+
typeof caption === "object" && caption.textColor && genTextAllColor[caption.textColor],
|
|
1996
|
+
typeof caption === "object" && caption.captionClasses,
|
|
1997
|
+
"figcaption"
|
|
1998
|
+
),
|
|
1999
|
+
children: typeof caption === "object" ? caption.text : caption
|
|
2000
|
+
}
|
|
2001
|
+
)
|
|
2002
|
+
]
|
|
2003
|
+
}
|
|
2004
|
+
);
|
|
2005
|
+
}
|
|
2006
|
+
return /* @__PURE__ */ jsx18(
|
|
2007
|
+
Element,
|
|
2008
|
+
{
|
|
2009
|
+
ref,
|
|
2010
|
+
className: clsx(
|
|
2011
|
+
borderRadius && genBorderRadius[borderRadius],
|
|
2012
|
+
fit && genObjectFit[fit],
|
|
2013
|
+
className,
|
|
2014
|
+
"image"
|
|
2015
|
+
),
|
|
2016
|
+
...rest
|
|
2017
|
+
}
|
|
2018
|
+
);
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
export {
|
|
2022
|
+
designTokens,
|
|
2023
|
+
URL_REGEX,
|
|
2024
|
+
linkifyText,
|
|
2025
|
+
genLinkColor,
|
|
2026
|
+
genButtonColor,
|
|
2027
|
+
genTextAlign,
|
|
2028
|
+
genTextColor,
|
|
2029
|
+
genTextColorShort,
|
|
2030
|
+
genTextColorHover,
|
|
2031
|
+
genTextAllColor,
|
|
2032
|
+
genBgColor,
|
|
2033
|
+
genBgColorShort,
|
|
2034
|
+
genBgColor50,
|
|
2035
|
+
genBgColorHover,
|
|
2036
|
+
genBgColorGhostHover,
|
|
2037
|
+
genBgOverlay,
|
|
2038
|
+
genBgAllColors,
|
|
2039
|
+
genBgAllColorsAndOverlays,
|
|
2040
|
+
genBorderColor,
|
|
2041
|
+
genBorderColorShort,
|
|
2042
|
+
genBorderColorHover,
|
|
2043
|
+
genBorderAllColors,
|
|
2044
|
+
genGap,
|
|
2045
|
+
genRowGap,
|
|
2046
|
+
genColGap,
|
|
2047
|
+
clsx,
|
|
2048
|
+
genAlignContent,
|
|
2049
|
+
genAlignItems,
|
|
2050
|
+
genJustifyContent,
|
|
2051
|
+
genJustifyItems,
|
|
2052
|
+
genMaxWidth,
|
|
2053
|
+
genBorderRadius,
|
|
2054
|
+
genObjectFit,
|
|
2055
|
+
genButtonDisabled,
|
|
2056
|
+
genBoxShadow,
|
|
2057
|
+
genVAlign,
|
|
2058
|
+
TEXT_BASE_CLASSES,
|
|
2059
|
+
Text,
|
|
2060
|
+
Table,
|
|
2061
|
+
libOptionsMarkdown,
|
|
2062
|
+
libMarkdownEditorOptions,
|
|
2063
|
+
genRingColor,
|
|
2064
|
+
genRingColorChildren,
|
|
2065
|
+
detectLanguage,
|
|
2066
|
+
disableScroll,
|
|
2067
|
+
enableScroll,
|
|
2068
|
+
scrollToTop,
|
|
2069
|
+
Image
|
|
2070
|
+
};
|
|
2071
|
+
//# sourceMappingURL=chunk-TN4HZFI3.js.map
|