czero 0.2.0 → 0.2.5
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 +209 -209
- package/dist/cli/index.js +970 -72
- package/dist/components.css +2158 -1913
- package/dist/react/core/component-defaults.d.ts.map +1 -1
- package/dist/react/core/types/config.d.ts +161 -2
- package/dist/react/core/types/config.d.ts.map +1 -1
- package/dist/react/index.cjs +695 -12
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +138 -11
- package/dist/react/index.js +693 -13
- package/dist/react/index.js.map +1 -1
- package/dist/react/react/components/button.d.ts +1 -0
- package/dist/react/react/components/button.d.ts.map +1 -1
- package/dist/react/react/components/data-table.d.ts +39 -0
- package/dist/react/react/components/data-table.d.ts.map +1 -0
- package/dist/react/react/components/input.d.ts +5 -2
- package/dist/react/react/components/input.d.ts.map +1 -1
- package/dist/react/react/components/modal.d.ts +44 -0
- package/dist/react/react/components/modal.d.ts.map +1 -0
- package/dist/react/react/components/search-input.d.ts +13 -0
- package/dist/react/react/components/search-input.d.ts.map +1 -0
- package/dist/react/react/components/status-badge.d.ts +11 -0
- package/dist/react/react/components/status-badge.d.ts.map +1 -0
- package/dist/react/react/components/tabs.d.ts +42 -7
- package/dist/react/react/components/tabs.d.ts.map +1 -1
- package/dist/react/react/index.d.ts +4 -1
- package/dist/react/react/index.d.ts.map +1 -1
- package/dist/reset.css +6 -15
- package/dist/styles.css +2244 -2008
- package/package.json +93 -92
- package/dist/cli-new/cli/build-css.d.ts +0 -19
- package/dist/cli-new/cli/build-css.js +0 -88
- package/dist/cli-new/cli/generators/button.d.ts +0 -9
- package/dist/cli-new/cli/generators/button.js +0 -224
- package/dist/cli-new/cli/generators/card.d.ts +0 -9
- package/dist/cli-new/cli/generators/card.js +0 -104
- package/dist/cli-new/cli/generators/checkbox.d.ts +0 -6
- package/dist/cli-new/cli/generators/checkbox.js +0 -163
- package/dist/cli-new/cli/generators/index.d.ts +0 -10
- package/dist/cli-new/cli/generators/index.js +0 -40
- package/dist/cli-new/cli/generators/input.d.ts +0 -9
- package/dist/cli-new/cli/generators/input.js +0 -231
- package/dist/cli-new/cli/generators/switch.d.ts +0 -6
- package/dist/cli-new/cli/generators/switch.js +0 -156
- package/dist/cli-new/cli/generators/utilities.d.ts +0 -9
- package/dist/cli-new/cli/generators/utilities.js +0 -150
- package/dist/cli-new/cli/index.d.ts +0 -8
- package/dist/cli-new/cli/index.js +0 -288
- package/dist/cli-new/cli/token-resolver.d.ts +0 -44
- package/dist/cli-new/cli/token-resolver.js +0 -137
- package/dist/cli-new/cli/utils/deep-merge.d.ts +0 -15
- package/dist/cli-new/cli/utils/deep-merge.js +0 -41
- package/dist/cli-new/cli/validate-config.d.ts +0 -19
- package/dist/cli-new/cli/validate-config.js +0 -151
- package/dist/cli-new/src/core/component-defaults.d.ts +0 -7
- package/dist/cli-new/src/core/component-defaults.js +0 -467
- package/dist/cli-new/src/core/types/config.d.ts +0 -489
- package/dist/cli-new/src/core/types/config.js +0 -5
- package/dist/cli-new/src/presets/index.d.ts +0 -44
- package/dist/cli-new/src/presets/index.js +0 -194
- package/dist/react/react/lib/cn.d.ts +0 -7
- package/dist/react/react/lib/cn.d.ts.map +0 -1
package/dist/cli/index.js
CHANGED
|
@@ -69,6 +69,7 @@ var componentDefaults = {
|
|
|
69
69
|
input: {
|
|
70
70
|
height: { sm: "2rem", md: "2.5rem", lg: "3rem" },
|
|
71
71
|
paddingX: { sm: "0.5rem", md: "0.75rem", lg: "1rem" },
|
|
72
|
+
paddingY: { sm: "0", md: "0", lg: "0" },
|
|
72
73
|
fontSize: { sm: "$font-sm", md: "$font-md", lg: "$font-lg" },
|
|
73
74
|
borderRadius: "$radius-md",
|
|
74
75
|
borderWidth: "1px",
|
|
@@ -76,19 +77,35 @@ var componentDefaults = {
|
|
|
76
77
|
bg: "$color-bg",
|
|
77
78
|
color: "$color-fg",
|
|
78
79
|
placeholderColor: "$color-mutedFg",
|
|
79
|
-
iconSize: "1rem",
|
|
80
|
+
iconSize: { sm: "0.875rem", md: "1rem", lg: "1.125rem" },
|
|
80
81
|
iconColor: "$color-mutedFg",
|
|
81
|
-
|
|
82
|
+
iconColorFocus: "$color-primary",
|
|
83
|
+
iconColorError: "$color-danger",
|
|
84
|
+
iconSpacing: { sm: "2rem", md: "2.5rem", lg: "3rem" },
|
|
85
|
+
clearHoverBg: "$color-muted",
|
|
86
|
+
clearHoverColor: "$color-fg",
|
|
87
|
+
clearBorderRadius: "$radius-sm",
|
|
88
|
+
clearIconSize: { sm: "0.875rem", md: "1rem", lg: "1.125rem" },
|
|
82
89
|
states: {
|
|
83
90
|
focus: {
|
|
84
91
|
borderColor: "$color-ring",
|
|
85
|
-
shadow: "0 0 0 2px
|
|
92
|
+
shadow: "0 0 0 2px hsl(var(--cz-color-ring) / 0.2)"
|
|
86
93
|
},
|
|
87
94
|
error: {
|
|
88
95
|
borderColor: "$color-danger",
|
|
89
|
-
focusShadow: "0 0 0 2px
|
|
96
|
+
focusShadow: "0 0 0 2px hsl(var(--cz-color-danger) / 0.2)"
|
|
97
|
+
},
|
|
98
|
+
disabled: {
|
|
99
|
+
opacity: "0.5",
|
|
100
|
+
cursor: "not-allowed",
|
|
101
|
+
bg: "$color-muted",
|
|
102
|
+
color: "$color-mutedFg"
|
|
90
103
|
},
|
|
91
|
-
|
|
104
|
+
readOnly: {
|
|
105
|
+
bg: "$color-muted",
|
|
106
|
+
color: "$color-mutedFg",
|
|
107
|
+
cursor: "default"
|
|
108
|
+
}
|
|
92
109
|
}
|
|
93
110
|
},
|
|
94
111
|
// ===== TEXTAREA =====
|
|
@@ -156,6 +173,29 @@ var componentDefaults = {
|
|
|
156
173
|
outline: { bg: "transparent", color: "$color-fg", borderColor: "$color-border" }
|
|
157
174
|
}
|
|
158
175
|
},
|
|
176
|
+
// ===== STATUS BADGE =====
|
|
177
|
+
statusBadge: {
|
|
178
|
+
paddingX: "0.625rem",
|
|
179
|
+
paddingY: "0.25rem",
|
|
180
|
+
fontSize: "$font-xs",
|
|
181
|
+
fontWeight: "$font-medium",
|
|
182
|
+
lineHeight: "1rem",
|
|
183
|
+
borderRadius: "$radius-full",
|
|
184
|
+
dotSize: "0.5rem",
|
|
185
|
+
dotGap: "0.375rem",
|
|
186
|
+
successBg: "$color-success / 0.12",
|
|
187
|
+
successText: "$color-success",
|
|
188
|
+
successDot: "$color-success",
|
|
189
|
+
dangerBg: "$color-danger / 0.12",
|
|
190
|
+
dangerText: "$color-danger",
|
|
191
|
+
dangerDot: "$color-danger",
|
|
192
|
+
warningBg: "$color-warning / 0.12",
|
|
193
|
+
warningText: "$color-warning",
|
|
194
|
+
warningDot: "$color-warning",
|
|
195
|
+
primaryBg: "$color-primary / 0.12",
|
|
196
|
+
primaryText: "$color-primary",
|
|
197
|
+
primaryDot: "$color-primary"
|
|
198
|
+
},
|
|
159
199
|
// ===== SWITCH =====
|
|
160
200
|
switch: {
|
|
161
201
|
width: { sm: "2rem", md: "2.75rem", lg: "3.5rem" },
|
|
@@ -302,13 +342,53 @@ var componentDefaults = {
|
|
|
302
342
|
tabs: {
|
|
303
343
|
listBorderWidth: "1px",
|
|
304
344
|
listBorderColor: "$color-border",
|
|
345
|
+
listGap: "0.5rem",
|
|
305
346
|
triggerPaddingX: "1rem",
|
|
306
347
|
triggerPaddingY: "0.5rem",
|
|
348
|
+
triggerPaddingXSm: "0.75rem",
|
|
349
|
+
triggerPaddingYSm: "0.375rem",
|
|
350
|
+
triggerPaddingXLg: "1.25rem",
|
|
351
|
+
triggerPaddingYLg: "0.625rem",
|
|
307
352
|
triggerFontSize: "$font-sm",
|
|
353
|
+
triggerFontSizeSm: "$font-xs",
|
|
354
|
+
triggerFontSizeLg: "$font-md",
|
|
308
355
|
triggerFontWeight: "$font-medium",
|
|
309
356
|
triggerColor: "$color-mutedFg",
|
|
310
357
|
triggerActiveColor: "$color-primary",
|
|
311
358
|
triggerActiveBorderColor: "$color-primary",
|
|
359
|
+
triggerGap: "$spacing-sm",
|
|
360
|
+
triggerRadius: "$radius-sm",
|
|
361
|
+
triggerBorderWidth: "2px",
|
|
362
|
+
triggerTransition: "$transition-fast",
|
|
363
|
+
iconSize: "0.875rem",
|
|
364
|
+
countPaddingX: "0.375rem",
|
|
365
|
+
countMinWidth: "1.25rem",
|
|
366
|
+
countHeight: "1.125rem",
|
|
367
|
+
countFontSize: "$font-xs",
|
|
368
|
+
countFontWeight: "$font-semibold",
|
|
369
|
+
countRadius: "$radius-sm",
|
|
370
|
+
countBg: "$color-muted",
|
|
371
|
+
countColor: "$color-mutedFg",
|
|
372
|
+
countActiveBg: "$color-primary / 0.15",
|
|
373
|
+
countActiveColor: "$color-primary",
|
|
374
|
+
pillsListGap: "$spacing-sm",
|
|
375
|
+
pillsTriggerBg: "$color-bg",
|
|
376
|
+
pillsTriggerColor: "$color-mutedFg",
|
|
377
|
+
pillsTriggerBorderColor: "$color-border",
|
|
378
|
+
pillsTriggerHoverBg: "$color-muted / 0.35",
|
|
379
|
+
pillsTriggerHoverColor: "$color-primary",
|
|
380
|
+
pillsTriggerActiveBg: "$color-primary",
|
|
381
|
+
pillsTriggerActiveColor: "$color-primaryFg",
|
|
382
|
+
pillsTriggerActiveBorderColor: "$color-primary",
|
|
383
|
+
pillsTriggerRadius: "$radius-md",
|
|
384
|
+
enclosedListBg: "$color-muted / 0.3",
|
|
385
|
+
enclosedListPadding: "0.25rem",
|
|
386
|
+
enclosedListRadius: "$radius-md",
|
|
387
|
+
enclosedTriggerColor: "$color-mutedFg",
|
|
388
|
+
enclosedTriggerActiveBg: "$color-bg",
|
|
389
|
+
enclosedTriggerActiveColor: "$color-fg",
|
|
390
|
+
enclosedTriggerRadius: "$radius-sm",
|
|
391
|
+
enclosedTriggerActiveShadow: "$shadow-sm",
|
|
312
392
|
contentPadding: "$spacing-lg",
|
|
313
393
|
states: {
|
|
314
394
|
hover: { color: "$color-fg" },
|
|
@@ -329,6 +409,32 @@ var componentDefaults = {
|
|
|
329
409
|
descriptionFontSize: "$font-sm",
|
|
330
410
|
descriptionColor: "$color-mutedFg"
|
|
331
411
|
},
|
|
412
|
+
// ===== MODAL =====
|
|
413
|
+
modal: {
|
|
414
|
+
overlayBg: "rgba(15, 23, 42, 0.55)",
|
|
415
|
+
contentBg: "$color-bg",
|
|
416
|
+
contentBorderRadius: "$radius-lg",
|
|
417
|
+
contentBorderColor: "$color-border",
|
|
418
|
+
contentShadow: "$shadow-lg",
|
|
419
|
+
headerPadding: "1rem 1rem 0.75rem",
|
|
420
|
+
bodyPadding: "0.75rem 1rem 1rem",
|
|
421
|
+
footerPadding: "0.75rem 1rem",
|
|
422
|
+
footerGap: "$spacing-md",
|
|
423
|
+
closeIconSize: "2rem",
|
|
424
|
+
closeIconPadding: "0.5rem",
|
|
425
|
+
closeIconRadius: "$radius-md",
|
|
426
|
+
closeIconBg: "transparent",
|
|
427
|
+
closeIconColor: "$color-mutedFg",
|
|
428
|
+
closeIconHoverBg: "$color-muted",
|
|
429
|
+
closeIconHoverColor: "$color-primary",
|
|
430
|
+
closeIconTransition: "$transition-fast",
|
|
431
|
+
closeIconFocusRing: "none",
|
|
432
|
+
tabFontSize: "13px",
|
|
433
|
+
tabFontWeight: "$font-medium",
|
|
434
|
+
tabColor: "$color-mutedFg",
|
|
435
|
+
tabActiveColor: "$color-primary",
|
|
436
|
+
tabActiveBorderColor: "$color-primary"
|
|
437
|
+
},
|
|
332
438
|
// ===== DROPDOWN MENU =====
|
|
333
439
|
dropdownMenu: {
|
|
334
440
|
contentBg: "$color-bg",
|
|
@@ -371,6 +477,45 @@ var componentDefaults = {
|
|
|
371
477
|
rowHoverBg: "$color-muted / 0.5",
|
|
372
478
|
stripedBg: "$color-muted / 0.3"
|
|
373
479
|
},
|
|
480
|
+
// ===== DATA TABLE =====
|
|
481
|
+
dataTable: {
|
|
482
|
+
containerBg: "$color-bg",
|
|
483
|
+
containerBorderRadius: "$radius-lg",
|
|
484
|
+
containerBorderColor: "$color-border",
|
|
485
|
+
containerShadow: "$shadow-sm",
|
|
486
|
+
headerCellPadding: "0.75rem 1rem",
|
|
487
|
+
headerFontSize: "$font-xs",
|
|
488
|
+
headerFontWeight: "$font-medium",
|
|
489
|
+
headerColor: "$color-mutedFg",
|
|
490
|
+
headerTextTransform: "uppercase",
|
|
491
|
+
headerLetterSpacing: "0.02em",
|
|
492
|
+
bodyCellPadding: "0.875rem 1rem",
|
|
493
|
+
bodyFontSize: "$font-sm",
|
|
494
|
+
bodyColor: "$color-fg",
|
|
495
|
+
rowBorderColor: "$color-border",
|
|
496
|
+
rowHoverBg: "$color-muted / 0.5",
|
|
497
|
+
stripedRowBg: "$color-muted / 0.3",
|
|
498
|
+
selectedRowBg: "$color-primary / 0.12",
|
|
499
|
+
sortIconOpacity: "0.3",
|
|
500
|
+
sortActiveColor: "$color-primary",
|
|
501
|
+
paginationPadding: "0.75rem 1rem",
|
|
502
|
+
paginationGap: "0.5rem",
|
|
503
|
+
paginationBorderColor: "$color-border",
|
|
504
|
+
paginationTextColor: "$color-mutedFg",
|
|
505
|
+
paginationTextStrongColor: "$color-fg",
|
|
506
|
+
paginationButtonSize: "32px",
|
|
507
|
+
paginationButtonRadius: "$radius-md",
|
|
508
|
+
paginationButtonHoverBg: "$color-muted / 0.4",
|
|
509
|
+
paginationButtonBorderColor: "transparent",
|
|
510
|
+
paginationButtonColor: "$color-fg",
|
|
511
|
+
paginationButtonDisabledColor: "$color-mutedFg",
|
|
512
|
+
emptyStateColor: "$color-mutedFg",
|
|
513
|
+
emptyStateTitleColor: "$color-fg",
|
|
514
|
+
emptyStateIconBg: "$color-muted",
|
|
515
|
+
emptyStateIconColor: "$color-mutedFg",
|
|
516
|
+
loadingShimmerBase: "$color-muted",
|
|
517
|
+
loadingShimmerHighlight: "$color-muted / 0.5"
|
|
518
|
+
},
|
|
374
519
|
// ===== AVATAR =====
|
|
375
520
|
avatar: {
|
|
376
521
|
size: { sm: "2rem", md: "2.5rem", lg: "3.5rem" },
|
|
@@ -583,6 +728,11 @@ function generateButtonVariables(config) {
|
|
|
583
728
|
vars.push(` ${componentVarName("button", "paddingX", size)}: ${resolveToken(value)};`);
|
|
584
729
|
}
|
|
585
730
|
}
|
|
731
|
+
if (config.paddingY) {
|
|
732
|
+
for (const [size, value] of Object.entries(config.paddingY)) {
|
|
733
|
+
vars.push(` ${componentVarName("button", "paddingY", size)}: ${resolveToken(value)};`);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
586
736
|
if (config.fontSize && typeof config.fontSize === "object") {
|
|
587
737
|
for (const [size, value] of Object.entries(config.fontSize)) {
|
|
588
738
|
vars.push(` ${componentVarName("button", "fontSize", size)}: ${resolveToken(value)};`);
|
|
@@ -637,9 +787,18 @@ function generateButtonVariables(config) {
|
|
|
637
787
|
if (variant.color) {
|
|
638
788
|
vars.push(` --cz-btn-${name}-color: ${resolveToken(variant.color)};`);
|
|
639
789
|
}
|
|
790
|
+
if (variant.border) {
|
|
791
|
+
vars.push(` --cz-btn-${name}-border: ${resolveToken(variant.border)};`);
|
|
792
|
+
}
|
|
640
793
|
if (variant.borderColor) {
|
|
641
794
|
vars.push(` --cz-btn-${name}-border-color: ${resolveToken(variant.borderColor)};`);
|
|
642
795
|
}
|
|
796
|
+
if (variant.hover?.color) {
|
|
797
|
+
vars.push(` --cz-btn-${name}-hover-color: ${resolveToken(variant.hover.color)};`);
|
|
798
|
+
}
|
|
799
|
+
if (variant.hover?.bg) {
|
|
800
|
+
vars.push(` --cz-btn-${name}-hover-bg: ${resolveToken(variant.hover.bg)};`);
|
|
801
|
+
}
|
|
643
802
|
}
|
|
644
803
|
}
|
|
645
804
|
return `:root {
|
|
@@ -657,7 +816,7 @@ function generateButtonBase() {
|
|
|
657
816
|
font-weight: var(--cz-btn-font-weight);
|
|
658
817
|
transition: all var(--cz-btn-transition);
|
|
659
818
|
cursor: pointer;
|
|
660
|
-
border:
|
|
819
|
+
border: none;
|
|
661
820
|
}
|
|
662
821
|
|
|
663
822
|
.cz-btn:focus-visible {
|
|
@@ -675,12 +834,22 @@ function generateButtonBase() {
|
|
|
675
834
|
function generateButtonSizes(config) {
|
|
676
835
|
const sizes = ["sm", "md", "lg"];
|
|
677
836
|
let css = "/* Button Sizes */\n";
|
|
837
|
+
const usePaddingY = config.paddingY && Object.keys(config.paddingY).length > 0;
|
|
678
838
|
for (const size of sizes) {
|
|
679
839
|
css += `.cz-btn-${size} {
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
840
|
+
`;
|
|
841
|
+
if (usePaddingY) {
|
|
842
|
+
css += ` padding: var(--cz-btn-padding-y-${size}) var(--cz-btn-padding-x-${size});
|
|
843
|
+
`;
|
|
844
|
+
} else {
|
|
845
|
+
css += ` height: var(--cz-btn-height-${size});
|
|
846
|
+
`;
|
|
847
|
+
css += ` padding: 0 var(--cz-btn-padding-x-${size});
|
|
848
|
+
`;
|
|
849
|
+
}
|
|
850
|
+
css += ` font-size: var(--cz-btn-font-size-${size});
|
|
851
|
+
`;
|
|
852
|
+
css += `}
|
|
684
853
|
`;
|
|
685
854
|
}
|
|
686
855
|
return css;
|
|
@@ -694,7 +863,10 @@ function generateButtonVariants(variants) {
|
|
|
694
863
|
`;
|
|
695
864
|
css += ` color: var(--cz-btn-${name}-color);
|
|
696
865
|
`;
|
|
697
|
-
if (variant.
|
|
866
|
+
if (variant.border) {
|
|
867
|
+
css += ` border: var(--cz-btn-${name}-border);
|
|
868
|
+
`;
|
|
869
|
+
} else if (variant.borderColor && variant.borderColor !== "transparent") {
|
|
698
870
|
css += ` border-color: var(--cz-btn-${name}-border-color);
|
|
699
871
|
`;
|
|
700
872
|
}
|
|
@@ -709,12 +881,16 @@ function generateButtonVariants(variants) {
|
|
|
709
881
|
if (variant.hover) {
|
|
710
882
|
css += `.cz-btn-${name}:hover {
|
|
711
883
|
`;
|
|
712
|
-
if (variant.hover.opacity) {
|
|
884
|
+
if (variant.hover.opacity && !variant.hover.bg) {
|
|
713
885
|
css += ` opacity: ${variant.hover.opacity};
|
|
714
886
|
`;
|
|
715
887
|
}
|
|
716
888
|
if (variant.hover.bg) {
|
|
717
|
-
css += ` background:
|
|
889
|
+
css += ` background: var(--cz-btn-${name}-hover-bg);
|
|
890
|
+
`;
|
|
891
|
+
}
|
|
892
|
+
if (variant.hover.color) {
|
|
893
|
+
css += ` color: var(--cz-btn-${name}-hover-color);
|
|
718
894
|
`;
|
|
719
895
|
}
|
|
720
896
|
if (variant.textDecoration) {
|
|
@@ -735,6 +911,11 @@ function generateButtonIcon(config) {
|
|
|
735
911
|
.cz-btn-icon.cz-btn-sm { width: var(--cz-btn-icon-size-sm); height: var(--cz-btn-icon-size-sm); }
|
|
736
912
|
.cz-btn-icon.cz-btn-md { width: var(--cz-btn-icon-size-md); height: var(--cz-btn-icon-size-md); }
|
|
737
913
|
.cz-btn-icon.cz-btn-lg { width: var(--cz-btn-icon-size-lg); height: var(--cz-btn-icon-size-lg); }
|
|
914
|
+
|
|
915
|
+
/* Full Width Button */
|
|
916
|
+
.cz-btn-full {
|
|
917
|
+
width: 100%;
|
|
918
|
+
}
|
|
738
919
|
`;
|
|
739
920
|
}
|
|
740
921
|
function generateButtonLoading(config) {
|
|
@@ -751,6 +932,20 @@ function generateButtonLoading(config) {
|
|
|
751
932
|
}
|
|
752
933
|
|
|
753
934
|
// cli/generators/input.ts
|
|
935
|
+
var isSizeMap = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
936
|
+
function pushSizeOrSingleVar(vars, component, key, value) {
|
|
937
|
+
if (!value) return;
|
|
938
|
+
if (typeof value === "string") {
|
|
939
|
+
vars.push(` ${componentVarName(component, key)}: ${resolveToken(value)};`);
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
for (const [size, tokenValue] of Object.entries(value)) {
|
|
943
|
+
if (!tokenValue) continue;
|
|
944
|
+
vars.push(
|
|
945
|
+
` ${componentVarName(component, key, size)}: ${resolveToken(tokenValue)};`
|
|
946
|
+
);
|
|
947
|
+
}
|
|
948
|
+
}
|
|
754
949
|
function generateInputCSS(config) {
|
|
755
950
|
let css = "";
|
|
756
951
|
css += "/* ===== INPUT ===== */\n\n";
|
|
@@ -758,14 +953,18 @@ function generateInputCSS(config) {
|
|
|
758
953
|
css += "\n";
|
|
759
954
|
css += generateInputBase();
|
|
760
955
|
css += "\n";
|
|
956
|
+
css += generateInputVariants(config);
|
|
957
|
+
css += "\n";
|
|
761
958
|
css += generateInputSizes();
|
|
762
959
|
css += "\n";
|
|
763
|
-
css += generateInputStates(
|
|
960
|
+
css += generateInputStates();
|
|
764
961
|
css += "\n";
|
|
765
|
-
css += generateInputIcons(
|
|
962
|
+
css += generateInputIcons();
|
|
766
963
|
css += "\n";
|
|
767
964
|
css += generateInputClear();
|
|
768
965
|
css += "\n";
|
|
966
|
+
css += generateInputPasswordToggle();
|
|
967
|
+
css += "\n";
|
|
769
968
|
if (config.customCSS) {
|
|
770
969
|
css += `/* Custom Input CSS */
|
|
771
970
|
${config.customCSS}
|
|
@@ -775,29 +974,26 @@ ${config.customCSS}
|
|
|
775
974
|
}
|
|
776
975
|
function generateInputVariables(config) {
|
|
777
976
|
const vars = [];
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
if (config.paddingX) {
|
|
784
|
-
for (const [size, value] of Object.entries(config.paddingX)) {
|
|
785
|
-
vars.push(` ${componentVarName("input", "paddingX", size)}: ${resolveToken(value)};`);
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
if (config.fontSize && typeof config.fontSize === "object") {
|
|
789
|
-
for (const [size, value] of Object.entries(config.fontSize)) {
|
|
790
|
-
vars.push(` ${componentVarName("input", "fontSize", size)}: ${resolveToken(value)};`);
|
|
791
|
-
}
|
|
977
|
+
pushSizeOrSingleVar(vars, "input", "height", config.height);
|
|
978
|
+
pushSizeOrSingleVar(vars, "input", "paddingX", config.paddingX);
|
|
979
|
+
pushSizeOrSingleVar(vars, "input", "paddingY", config.paddingY);
|
|
980
|
+
if (config.fontSize && isSizeMap(config.fontSize)) {
|
|
981
|
+
pushSizeOrSingleVar(vars, "input", "fontSize", config.fontSize);
|
|
792
982
|
}
|
|
793
983
|
if (config.borderRadius) {
|
|
794
|
-
vars.push(
|
|
984
|
+
vars.push(
|
|
985
|
+
` ${componentVarName("input", "borderRadius")}: ${resolveToken(config.borderRadius)};`
|
|
986
|
+
);
|
|
795
987
|
}
|
|
796
988
|
if (config.borderWidth) {
|
|
797
|
-
vars.push(
|
|
989
|
+
vars.push(
|
|
990
|
+
` ${componentVarName("input", "borderWidth")}: ${resolveToken(config.borderWidth)};`
|
|
991
|
+
);
|
|
798
992
|
}
|
|
799
993
|
if (config.borderColor) {
|
|
800
|
-
vars.push(
|
|
994
|
+
vars.push(
|
|
995
|
+
` ${componentVarName("input", "borderColor")}: ${resolveToken(config.borderColor)};`
|
|
996
|
+
);
|
|
801
997
|
}
|
|
802
998
|
if (config.bg) {
|
|
803
999
|
vars.push(` ${componentVarName("input", "bg")}: ${resolveToken(config.bg)};`);
|
|
@@ -806,31 +1002,107 @@ function generateInputVariables(config) {
|
|
|
806
1002
|
vars.push(` ${componentVarName("input", "color")}: ${resolveToken(config.color)};`);
|
|
807
1003
|
}
|
|
808
1004
|
if (config.placeholderColor) {
|
|
809
|
-
vars.push(
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
vars.push(` ${componentVarName("input", "iconSize")}: ${resolveToken(config.iconSize)};`);
|
|
1005
|
+
vars.push(
|
|
1006
|
+
` ${componentVarName("input", "placeholderColor")}: ${resolveToken(config.placeholderColor)};`
|
|
1007
|
+
);
|
|
813
1008
|
}
|
|
1009
|
+
pushSizeOrSingleVar(vars, "input", "iconSize", config.iconSize);
|
|
814
1010
|
if (config.iconColor) {
|
|
815
|
-
vars.push(
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
|
|
1011
|
+
vars.push(
|
|
1012
|
+
` ${componentVarName("input", "iconColor")}: ${resolveToken(config.iconColor)};`
|
|
1013
|
+
);
|
|
1014
|
+
}
|
|
1015
|
+
if (config.iconColorFocus) {
|
|
1016
|
+
vars.push(
|
|
1017
|
+
` ${componentVarName("input", "iconColorFocus")}: ${resolveToken(config.iconColorFocus)};`
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
if (config.iconColorError) {
|
|
1021
|
+
vars.push(
|
|
1022
|
+
` ${componentVarName("input", "iconColorError")}: ${resolveToken(config.iconColorError)};`
|
|
1023
|
+
);
|
|
1024
|
+
}
|
|
1025
|
+
pushSizeOrSingleVar(
|
|
1026
|
+
vars,
|
|
1027
|
+
"input",
|
|
1028
|
+
"iconSpacing",
|
|
1029
|
+
config.iconSpacing
|
|
1030
|
+
);
|
|
1031
|
+
pushSizeOrSingleVar(
|
|
1032
|
+
vars,
|
|
1033
|
+
"input",
|
|
1034
|
+
"clearIconSize",
|
|
1035
|
+
config.clearIconSize
|
|
1036
|
+
);
|
|
1037
|
+
if (config.clearHoverBg) {
|
|
1038
|
+
vars.push(
|
|
1039
|
+
` ${componentVarName("input", "clearHoverBg")}: ${resolveToken(config.clearHoverBg)};`
|
|
1040
|
+
);
|
|
1041
|
+
}
|
|
1042
|
+
if (config.clearHoverColor) {
|
|
1043
|
+
vars.push(
|
|
1044
|
+
` ${componentVarName("input", "clearHoverColor")}: ${resolveToken(config.clearHoverColor)};`
|
|
1045
|
+
);
|
|
1046
|
+
}
|
|
1047
|
+
if (config.clearBorderRadius) {
|
|
1048
|
+
vars.push(
|
|
1049
|
+
` ${componentVarName("input", "clearBorderRadius")}: ${resolveToken(config.clearBorderRadius)};`
|
|
1050
|
+
);
|
|
819
1051
|
}
|
|
820
1052
|
if (config.states?.focus?.borderColor) {
|
|
821
|
-
vars.push(
|
|
1053
|
+
vars.push(
|
|
1054
|
+
` ${componentVarName("input", "focusBorderColor")}: ${resolveToken(config.states.focus.borderColor)};`
|
|
1055
|
+
);
|
|
822
1056
|
}
|
|
823
1057
|
if (config.states?.focus?.shadow) {
|
|
824
|
-
vars.push(
|
|
1058
|
+
vars.push(
|
|
1059
|
+
` ${componentVarName("input", "focusShadow")}: ${resolveToken(config.states.focus.shadow)};`
|
|
1060
|
+
);
|
|
825
1061
|
}
|
|
826
1062
|
if (config.states?.error?.borderColor) {
|
|
827
|
-
vars.push(
|
|
1063
|
+
vars.push(
|
|
1064
|
+
` ${componentVarName("input", "errorBorderColor")}: ${resolveToken(config.states.error.borderColor)};`
|
|
1065
|
+
);
|
|
828
1066
|
}
|
|
829
1067
|
if (config.states?.error?.focusShadow) {
|
|
830
|
-
vars.push(
|
|
1068
|
+
vars.push(
|
|
1069
|
+
` ${componentVarName("input", "errorFocusShadow")}: ${resolveToken(config.states.error.focusShadow)};`
|
|
1070
|
+
);
|
|
831
1071
|
}
|
|
832
1072
|
if (config.states?.disabled?.opacity) {
|
|
833
|
-
vars.push(
|
|
1073
|
+
vars.push(
|
|
1074
|
+
` ${componentVarName("input", "disabledOpacity")}: ${config.states.disabled.opacity};`
|
|
1075
|
+
);
|
|
1076
|
+
}
|
|
1077
|
+
if (config.states?.disabled?.cursor) {
|
|
1078
|
+
vars.push(
|
|
1079
|
+
` ${componentVarName("input", "disabledCursor")}: ${config.states.disabled.cursor};`
|
|
1080
|
+
);
|
|
1081
|
+
}
|
|
1082
|
+
if (config.states?.disabled?.bg) {
|
|
1083
|
+
vars.push(
|
|
1084
|
+
` ${componentVarName("input", "disabledBg")}: ${resolveToken(config.states.disabled.bg)};`
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
if (config.states?.disabled?.color) {
|
|
1088
|
+
vars.push(
|
|
1089
|
+
` ${componentVarName("input", "disabledColor")}: ${resolveToken(config.states.disabled.color)};`
|
|
1090
|
+
);
|
|
1091
|
+
}
|
|
1092
|
+
if (config.states?.readOnly?.bg) {
|
|
1093
|
+
vars.push(
|
|
1094
|
+
` ${componentVarName("input", "readOnlyBg")}: ${resolveToken(config.states.readOnly.bg)};`
|
|
1095
|
+
);
|
|
1096
|
+
}
|
|
1097
|
+
if (config.states?.readOnly?.color) {
|
|
1098
|
+
vars.push(
|
|
1099
|
+
` ${componentVarName("input", "readOnlyColor")}: ${resolveToken(config.states.readOnly.color)};`
|
|
1100
|
+
);
|
|
1101
|
+
}
|
|
1102
|
+
if (config.states?.readOnly?.cursor) {
|
|
1103
|
+
vars.push(
|
|
1104
|
+
` ${componentVarName("input", "readOnlyCursor")}: ${config.states.readOnly.cursor};`
|
|
1105
|
+
);
|
|
834
1106
|
}
|
|
835
1107
|
return `:root {
|
|
836
1108
|
${vars.join("\n")}
|
|
@@ -849,6 +1121,27 @@ function generateInputBase() {
|
|
|
849
1121
|
display: flex;
|
|
850
1122
|
align-items: center;
|
|
851
1123
|
width: 100%;
|
|
1124
|
+
--cz-input-icon-spacing-current: var(--cz-input-icon-spacing, 2.5rem);
|
|
1125
|
+
--cz-input-icon-size-current: var(--cz-input-icon-size, 1rem);
|
|
1126
|
+
--cz-input-clear-icon-size-current: var(--cz-input-clear-icon-size, var(--cz-input-icon-size-current));
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
.cz-input-wrapper-sm {
|
|
1130
|
+
--cz-input-icon-spacing-current: var(--cz-input-icon-spacing-sm, var(--cz-input-icon-spacing-current));
|
|
1131
|
+
--cz-input-icon-size-current: var(--cz-input-icon-size-sm, var(--cz-input-icon-size-current));
|
|
1132
|
+
--cz-input-clear-icon-size-current: var(--cz-input-clear-icon-size-sm, var(--cz-input-icon-size-current));
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
.cz-input-wrapper-md {
|
|
1136
|
+
--cz-input-icon-spacing-current: var(--cz-input-icon-spacing-md, var(--cz-input-icon-spacing-current));
|
|
1137
|
+
--cz-input-icon-size-current: var(--cz-input-icon-size-md, var(--cz-input-icon-size-current));
|
|
1138
|
+
--cz-input-clear-icon-size-current: var(--cz-input-clear-icon-size-md, var(--cz-input-icon-size-current));
|
|
1139
|
+
}
|
|
1140
|
+
|
|
1141
|
+
.cz-input-wrapper-lg {
|
|
1142
|
+
--cz-input-icon-spacing-current: var(--cz-input-icon-spacing-lg, var(--cz-input-icon-spacing-current));
|
|
1143
|
+
--cz-input-icon-size-current: var(--cz-input-icon-size-lg, var(--cz-input-icon-size-current));
|
|
1144
|
+
--cz-input-clear-icon-size-current: var(--cz-input-clear-icon-size-lg, var(--cz-input-icon-size-current));
|
|
852
1145
|
}
|
|
853
1146
|
|
|
854
1147
|
.cz-input {
|
|
@@ -865,26 +1158,87 @@ function generateInputBase() {
|
|
|
865
1158
|
}
|
|
866
1159
|
`;
|
|
867
1160
|
}
|
|
1161
|
+
function generateInputVariants(config) {
|
|
1162
|
+
if (!config.variants || Object.keys(config.variants).length === 0) {
|
|
1163
|
+
return "";
|
|
1164
|
+
}
|
|
1165
|
+
const blocks = [];
|
|
1166
|
+
for (const [name, variant] of Object.entries(config.variants)) {
|
|
1167
|
+
const lines = [];
|
|
1168
|
+
if (variant.bg) {
|
|
1169
|
+
lines.push(` --cz-input-bg: ${resolveToken(variant.bg)};`);
|
|
1170
|
+
}
|
|
1171
|
+
if (variant.color) {
|
|
1172
|
+
lines.push(` --cz-input-color: ${resolveToken(variant.color)};`);
|
|
1173
|
+
}
|
|
1174
|
+
if (variant.borderColor) {
|
|
1175
|
+
lines.push(` --cz-input-border-color: ${resolveToken(variant.borderColor)};`);
|
|
1176
|
+
}
|
|
1177
|
+
if (variant.placeholderColor) {
|
|
1178
|
+
lines.push(
|
|
1179
|
+
` --cz-input-placeholder-color: ${resolveToken(variant.placeholderColor)};`
|
|
1180
|
+
);
|
|
1181
|
+
}
|
|
1182
|
+
if (variant.iconColor) {
|
|
1183
|
+
lines.push(` --cz-input-icon-color: ${resolveToken(variant.iconColor)};`);
|
|
1184
|
+
}
|
|
1185
|
+
if (variant.iconColorFocus) {
|
|
1186
|
+
lines.push(
|
|
1187
|
+
` --cz-input-icon-color-focus: ${resolveToken(variant.iconColorFocus)};`
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
if (variant.iconColorError) {
|
|
1191
|
+
lines.push(
|
|
1192
|
+
` --cz-input-icon-color-error: ${resolveToken(variant.iconColorError)};`
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
if (variant.focusBorderColor) {
|
|
1196
|
+
lines.push(
|
|
1197
|
+
` --cz-input-focus-border-color: ${resolveToken(variant.focusBorderColor)};`
|
|
1198
|
+
);
|
|
1199
|
+
}
|
|
1200
|
+
if (variant.focusShadow) {
|
|
1201
|
+
lines.push(` --cz-input-focus-shadow: ${resolveToken(variant.focusShadow)};`);
|
|
1202
|
+
}
|
|
1203
|
+
if (variant.clearHoverBg) {
|
|
1204
|
+
lines.push(
|
|
1205
|
+
` --cz-input-clear-hover-bg: ${resolveToken(variant.clearHoverBg)};`
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
if (variant.clearHoverColor) {
|
|
1209
|
+
lines.push(
|
|
1210
|
+
` --cz-input-clear-hover-color: ${resolveToken(variant.clearHoverColor)};`
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
if (lines.length === 0) continue;
|
|
1214
|
+
blocks.push(
|
|
1215
|
+
`.cz-input-wrapper-variant-${name} {
|
|
1216
|
+
${lines.join("\n")}
|
|
1217
|
+
}`
|
|
1218
|
+
);
|
|
1219
|
+
}
|
|
1220
|
+
return blocks.join("\n\n");
|
|
1221
|
+
}
|
|
868
1222
|
function generateInputSizes() {
|
|
869
1223
|
return `/* Input Sizes */
|
|
870
1224
|
.cz-input-sm {
|
|
871
1225
|
height: var(--cz-input-height-sm);
|
|
872
|
-
padding: 0 var(--cz-input-padding-x-sm);
|
|
1226
|
+
padding: var(--cz-input-padding-y-sm, 0) var(--cz-input-padding-x-sm);
|
|
873
1227
|
font-size: var(--cz-input-font-size-sm);
|
|
874
1228
|
}
|
|
875
1229
|
.cz-input-md {
|
|
876
1230
|
height: var(--cz-input-height-md);
|
|
877
|
-
padding: 0 var(--cz-input-padding-x-md);
|
|
1231
|
+
padding: var(--cz-input-padding-y-md, 0) var(--cz-input-padding-x-md);
|
|
878
1232
|
font-size: var(--cz-input-font-size-md);
|
|
879
1233
|
}
|
|
880
1234
|
.cz-input-lg {
|
|
881
1235
|
height: var(--cz-input-height-lg);
|
|
882
|
-
padding: 0 var(--cz-input-padding-x-lg);
|
|
1236
|
+
padding: var(--cz-input-padding-y-lg, 0) var(--cz-input-padding-x-lg);
|
|
883
1237
|
font-size: var(--cz-input-font-size-lg);
|
|
884
1238
|
}
|
|
885
1239
|
`;
|
|
886
1240
|
}
|
|
887
|
-
function generateInputStates(
|
|
1241
|
+
function generateInputStates() {
|
|
888
1242
|
return `.cz-input:focus {
|
|
889
1243
|
outline: none;
|
|
890
1244
|
border-color: var(--cz-input-focus-border-color);
|
|
@@ -892,8 +1246,16 @@ function generateInputStates(config) {
|
|
|
892
1246
|
}
|
|
893
1247
|
|
|
894
1248
|
.cz-input:disabled {
|
|
895
|
-
cursor: not-allowed;
|
|
896
|
-
opacity: var(--cz-input-disabled-opacity);
|
|
1249
|
+
cursor: var(--cz-input-disabled-cursor, not-allowed);
|
|
1250
|
+
opacity: var(--cz-input-disabled-opacity, 0.5);
|
|
1251
|
+
background-color: var(--cz-input-disabled-bg, var(--cz-input-bg));
|
|
1252
|
+
color: var(--cz-input-disabled-color, var(--cz-input-color));
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
.cz-input:read-only {
|
|
1256
|
+
cursor: var(--cz-input-read-only-cursor, default);
|
|
1257
|
+
background-color: var(--cz-input-read-only-bg, var(--cz-input-bg));
|
|
1258
|
+
color: var(--cz-input-read-only-color, var(--cz-input-color));
|
|
897
1259
|
}
|
|
898
1260
|
|
|
899
1261
|
.cz-input-error {
|
|
@@ -910,24 +1272,36 @@ function generateInputStates(config) {
|
|
|
910
1272
|
}
|
|
911
1273
|
`;
|
|
912
1274
|
}
|
|
913
|
-
function generateInputIcons(
|
|
1275
|
+
function generateInputIcons() {
|
|
914
1276
|
return `/* Input with Icons */
|
|
915
|
-
.cz-input-has-left-icon .cz-input { padding-left: var(--cz-input-icon-spacing); }
|
|
916
|
-
.cz-input-has-right-icon .cz-input { padding-right: var(--cz-input-icon-spacing); }
|
|
1277
|
+
.cz-input-has-left-icon .cz-input { padding-left: var(--cz-input-icon-spacing-current); }
|
|
1278
|
+
.cz-input-has-right-icon .cz-input { padding-right: var(--cz-input-icon-spacing-current); }
|
|
917
1279
|
|
|
918
1280
|
.cz-input-icon {
|
|
919
1281
|
position: absolute;
|
|
920
1282
|
display: flex;
|
|
921
1283
|
align-items: center;
|
|
922
1284
|
justify-content: center;
|
|
923
|
-
width: var(--cz-input-icon-spacing);
|
|
1285
|
+
width: var(--cz-input-icon-spacing-current);
|
|
924
1286
|
height: 100%;
|
|
925
1287
|
color: var(--cz-input-icon-color);
|
|
926
1288
|
pointer-events: none;
|
|
1289
|
+
transition: color var(--cz-transition-fast);
|
|
1290
|
+
}
|
|
1291
|
+
.cz-input-icon svg {
|
|
1292
|
+
width: var(--cz-input-icon-size-current);
|
|
1293
|
+
height: var(--cz-input-icon-size-current);
|
|
927
1294
|
}
|
|
928
|
-
.cz-input-icon svg { width: var(--cz-input-icon-size); height: var(--cz-input-icon-size); }
|
|
929
1295
|
.cz-input-icon-left { left: 0; }
|
|
930
1296
|
.cz-input-icon-right { right: 0; }
|
|
1297
|
+
|
|
1298
|
+
.cz-input-wrapper:focus-within .cz-input-icon {
|
|
1299
|
+
color: var(--cz-input-icon-color-focus, var(--cz-input-icon-color));
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
.cz-input-wrapper-error .cz-input-icon {
|
|
1303
|
+
color: var(--cz-input-icon-color-error, var(--cz-input-icon-color));
|
|
1304
|
+
}
|
|
931
1305
|
`;
|
|
932
1306
|
}
|
|
933
1307
|
function generateInputClear() {
|
|
@@ -938,16 +1312,52 @@ function generateInputClear() {
|
|
|
938
1312
|
display: flex;
|
|
939
1313
|
align-items: center;
|
|
940
1314
|
justify-content: center;
|
|
941
|
-
width: var(--cz-input-icon-spacing);
|
|
1315
|
+
width: var(--cz-input-icon-spacing-current);
|
|
942
1316
|
height: 100%;
|
|
943
1317
|
color: var(--cz-input-icon-color);
|
|
944
1318
|
background: transparent;
|
|
945
1319
|
border: none;
|
|
1320
|
+
border-radius: var(--cz-input-clear-border-radius, var(--cz-radius-sm));
|
|
946
1321
|
cursor: pointer;
|
|
947
|
-
transition: color var(--cz-transition-fast);
|
|
1322
|
+
transition: color var(--cz-transition-fast), background-color var(--cz-transition-fast);
|
|
1323
|
+
}
|
|
1324
|
+
.cz-input-clear:hover {
|
|
1325
|
+
background-color: var(--cz-input-clear-hover-bg, transparent);
|
|
1326
|
+
color: var(--cz-input-clear-hover-color, var(--cz-input-color));
|
|
1327
|
+
}
|
|
1328
|
+
.cz-input-clear svg {
|
|
1329
|
+
width: var(--cz-input-clear-icon-size-current);
|
|
1330
|
+
height: var(--cz-input-clear-icon-size-current);
|
|
1331
|
+
}
|
|
1332
|
+
`;
|
|
1333
|
+
}
|
|
1334
|
+
function generateInputPasswordToggle() {
|
|
1335
|
+
return `/* Input Password Toggle */
|
|
1336
|
+
.cz-input-password-toggle {
|
|
1337
|
+
position: absolute;
|
|
1338
|
+
right: 0;
|
|
1339
|
+
display: flex;
|
|
1340
|
+
align-items: center;
|
|
1341
|
+
justify-content: center;
|
|
1342
|
+
width: var(--cz-input-icon-spacing-current);
|
|
1343
|
+
height: 100%;
|
|
1344
|
+
color: var(--cz-input-icon-color);
|
|
1345
|
+
background: transparent;
|
|
1346
|
+
border: none;
|
|
1347
|
+
border-radius: var(--cz-input-clear-border-radius, var(--cz-radius-sm));
|
|
1348
|
+
cursor: pointer;
|
|
1349
|
+
transition: color var(--cz-transition-fast), background-color var(--cz-transition-fast);
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
.cz-input-password-toggle:hover {
|
|
1353
|
+
background-color: var(--cz-input-clear-hover-bg, transparent);
|
|
1354
|
+
color: var(--cz-input-icon-color-focus, var(--cz-input-icon-color));
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
.cz-input-password-toggle svg {
|
|
1358
|
+
width: var(--cz-input-clear-icon-size-current);
|
|
1359
|
+
height: var(--cz-input-clear-icon-size-current);
|
|
948
1360
|
}
|
|
949
|
-
.cz-input-clear:hover { color: var(--cz-input-color); }
|
|
950
|
-
.cz-input-clear svg { width: 0.875rem; height: 0.875rem; }
|
|
951
1361
|
`;
|
|
952
1362
|
}
|
|
953
1363
|
|
|
@@ -1900,6 +2310,65 @@ function generateBadgeVariants(config) {
|
|
|
1900
2310
|
return css;
|
|
1901
2311
|
}
|
|
1902
2312
|
|
|
2313
|
+
// cli/generators/status-badge.ts
|
|
2314
|
+
function generateStatusBadgeCSS(config) {
|
|
2315
|
+
let css = "/* ===== STATUS BADGE ===== */\n\n";
|
|
2316
|
+
css += generateStatusBadgeVariables(config);
|
|
2317
|
+
css += "\n";
|
|
2318
|
+
if (config.customCSS) css += `/* Custom StatusBadge CSS */
|
|
2319
|
+
${config.customCSS}
|
|
2320
|
+
`;
|
|
2321
|
+
return css;
|
|
2322
|
+
}
|
|
2323
|
+
function generateStatusBadgeVariables(config) {
|
|
2324
|
+
const vars = [];
|
|
2325
|
+
if (config.paddingX) vars.push(` --cz-status-badge-padding-x: ${resolveValue(config.paddingX)};`);
|
|
2326
|
+
if (config.paddingY) vars.push(` --cz-status-badge-padding-y: ${resolveValue(config.paddingY)};`);
|
|
2327
|
+
if (config.fontSize) vars.push(` --cz-status-badge-font-size: ${resolveValue(config.fontSize)};`);
|
|
2328
|
+
if (config.fontWeight) vars.push(` --cz-status-badge-font-weight: ${resolveValue(config.fontWeight)};`);
|
|
2329
|
+
if (config.lineHeight) vars.push(` --cz-status-badge-line-height: ${resolveValue(config.lineHeight)};`);
|
|
2330
|
+
if (config.borderRadius) {
|
|
2331
|
+
vars.push(` --cz-status-badge-border-radius: ${resolveValue(config.borderRadius)};`);
|
|
2332
|
+
}
|
|
2333
|
+
if (config.dotSize) vars.push(` --cz-status-badge-dot-size: ${resolveValue(config.dotSize)};`);
|
|
2334
|
+
if (config.dotGap) vars.push(` --cz-status-badge-dot-gap: ${resolveValue(config.dotGap)};`);
|
|
2335
|
+
if (config.successBg) vars.push(` --cz-status-badge-success-bg: ${resolveValue(config.successBg)};`);
|
|
2336
|
+
if (config.successText) {
|
|
2337
|
+
vars.push(` --cz-status-badge-success-text: ${resolveValue(config.successText)};`);
|
|
2338
|
+
}
|
|
2339
|
+
if (config.successDot) vars.push(` --cz-status-badge-success-dot: ${resolveValue(config.successDot)};`);
|
|
2340
|
+
if (config.dangerBg) vars.push(` --cz-status-badge-danger-bg: ${resolveValue(config.dangerBg)};`);
|
|
2341
|
+
if (config.dangerText) vars.push(` --cz-status-badge-danger-text: ${resolveValue(config.dangerText)};`);
|
|
2342
|
+
if (config.dangerDot) vars.push(` --cz-status-badge-danger-dot: ${resolveValue(config.dangerDot)};`);
|
|
2343
|
+
if (config.warningBg) {
|
|
2344
|
+
vars.push(` --cz-status-badge-warning-bg: ${resolveValue(config.warningBg)};`);
|
|
2345
|
+
}
|
|
2346
|
+
if (config.warningText) {
|
|
2347
|
+
vars.push(` --cz-status-badge-warning-text: ${resolveValue(config.warningText)};`);
|
|
2348
|
+
}
|
|
2349
|
+
if (config.warningDot) {
|
|
2350
|
+
vars.push(` --cz-status-badge-warning-dot: ${resolveValue(config.warningDot)};`);
|
|
2351
|
+
}
|
|
2352
|
+
if (config.primaryBg) {
|
|
2353
|
+
vars.push(` --cz-status-badge-primary-bg: ${resolveValue(config.primaryBg)};`);
|
|
2354
|
+
}
|
|
2355
|
+
if (config.primaryText) {
|
|
2356
|
+
vars.push(` --cz-status-badge-primary-text: ${resolveValue(config.primaryText)};`);
|
|
2357
|
+
}
|
|
2358
|
+
if (config.primaryDot) {
|
|
2359
|
+
vars.push(` --cz-status-badge-primary-dot: ${resolveValue(config.primaryDot)};`);
|
|
2360
|
+
}
|
|
2361
|
+
return `:root {
|
|
2362
|
+
${vars.join("\n")}
|
|
2363
|
+
}
|
|
2364
|
+
`;
|
|
2365
|
+
}
|
|
2366
|
+
function resolveValue(value) {
|
|
2367
|
+
if (!value.startsWith("$")) return value;
|
|
2368
|
+
if (/\s+\$/.test(value)) return value;
|
|
2369
|
+
return resolveToken(value);
|
|
2370
|
+
}
|
|
2371
|
+
|
|
1903
2372
|
// cli/generators/avatar.ts
|
|
1904
2373
|
function generateAvatarCSS(config) {
|
|
1905
2374
|
let css = "/* ===== AVATAR ===== */\n\n";
|
|
@@ -2013,9 +2482,12 @@ ${config.customCSS}
|
|
|
2013
2482
|
}
|
|
2014
2483
|
function generateTableVariables(config) {
|
|
2015
2484
|
const vars = [];
|
|
2485
|
+
if (config.borderRadius) vars.push(` --cz-table-border-radius: ${config.borderRadius};`);
|
|
2486
|
+
if (config.borderWidth) vars.push(` --cz-table-border-width: ${config.borderWidth};`);
|
|
2016
2487
|
if (config.borderColor) vars.push(` --cz-table-border-color: ${resolveToken(config.borderColor)};`);
|
|
2017
2488
|
if (config.headerBg) vars.push(` --cz-table-header-bg: ${resolveToken(config.headerBg)};`);
|
|
2018
2489
|
if (config.headerFontWeight) vars.push(` --cz-table-header-font-weight: ${resolveToken(config.headerFontWeight)};`);
|
|
2490
|
+
if (config.cellPadding) vars.push(` --cz-table-cell-padding: ${config.cellPadding};`);
|
|
2019
2491
|
if (config.cellPaddingX) vars.push(` --cz-table-cell-padding-x: ${config.cellPaddingX};`);
|
|
2020
2492
|
if (config.cellPaddingY) vars.push(` --cz-table-cell-padding-y: ${config.cellPaddingY};`);
|
|
2021
2493
|
if (config.rowHoverBg) vars.push(` --cz-table-row-hover-bg: ${resolveToken(config.rowHoverBg)};`);
|
|
@@ -2028,7 +2500,8 @@ ${vars.join("\n")}
|
|
|
2028
2500
|
function generateTableBase() {
|
|
2029
2501
|
return `.cz-table-wrapper {
|
|
2030
2502
|
width: 100%;
|
|
2031
|
-
overflow: auto;
|
|
2503
|
+
overflow-x: auto;
|
|
2504
|
+
border-radius: var(--cz-table-border-radius);
|
|
2032
2505
|
}
|
|
2033
2506
|
|
|
2034
2507
|
.cz-table {
|
|
@@ -2042,11 +2515,11 @@ function generateTableBase() {
|
|
|
2042
2515
|
}
|
|
2043
2516
|
|
|
2044
2517
|
.cz-table-head {
|
|
2045
|
-
padding: var(--cz-table-cell-padding-y) var(--cz-table-cell-padding-x);
|
|
2518
|
+
padding: var(--cz-table-cell-padding, var(--cz-table-cell-padding-y) var(--cz-table-cell-padding-x));
|
|
2046
2519
|
text-align: left;
|
|
2047
2520
|
font-weight: var(--cz-table-header-font-weight);
|
|
2048
2521
|
color: hsl(var(--cz-color-mutedFg));
|
|
2049
|
-
border-bottom:
|
|
2522
|
+
border-bottom: var(--cz-table-border-width) solid var(--cz-table-border-color);
|
|
2050
2523
|
white-space: nowrap;
|
|
2051
2524
|
}
|
|
2052
2525
|
|
|
@@ -2063,8 +2536,8 @@ function generateTableBase() {
|
|
|
2063
2536
|
}
|
|
2064
2537
|
|
|
2065
2538
|
.cz-table-cell {
|
|
2066
|
-
padding: var(--cz-table-cell-padding-y) var(--cz-table-cell-padding-x);
|
|
2067
|
-
border-bottom:
|
|
2539
|
+
padding: var(--cz-table-cell-padding, var(--cz-table-cell-padding-y) var(--cz-table-cell-padding-x));
|
|
2540
|
+
border-bottom: var(--cz-table-border-width) solid var(--cz-table-border-color);
|
|
2068
2541
|
}
|
|
2069
2542
|
|
|
2070
2543
|
.cz-table-footer {
|
|
@@ -2074,7 +2547,7 @@ function generateTableBase() {
|
|
|
2074
2547
|
|
|
2075
2548
|
.cz-table-footer .cz-table-cell {
|
|
2076
2549
|
border-bottom: none;
|
|
2077
|
-
border-top:
|
|
2550
|
+
border-top: var(--cz-table-border-width) solid var(--cz-table-border-color);
|
|
2078
2551
|
}
|
|
2079
2552
|
|
|
2080
2553
|
/* Table Striped */
|
|
@@ -2092,6 +2565,150 @@ function generateTableBase() {
|
|
|
2092
2565
|
`;
|
|
2093
2566
|
}
|
|
2094
2567
|
|
|
2568
|
+
// cli/generators/data-table.ts
|
|
2569
|
+
function generateDataTableCSS(config) {
|
|
2570
|
+
let css = "/* ===== DATA TABLE ===== */\n\n";
|
|
2571
|
+
css += generateDataTableVariables(config);
|
|
2572
|
+
css += "\n";
|
|
2573
|
+
css += generateDataTableBase();
|
|
2574
|
+
css += "\n";
|
|
2575
|
+
if (config.customCSS) css += `/* Custom DataTable CSS */
|
|
2576
|
+
${config.customCSS}
|
|
2577
|
+
`;
|
|
2578
|
+
return css;
|
|
2579
|
+
}
|
|
2580
|
+
function generateDataTableVariables(config) {
|
|
2581
|
+
const vars = [];
|
|
2582
|
+
if (config.containerBg) vars.push(` --cz-data-table-container-bg: ${resolveValue2(config.containerBg)};`);
|
|
2583
|
+
if (config.containerBorderRadius) {
|
|
2584
|
+
vars.push(` --cz-data-table-container-border-radius: ${resolveValue2(config.containerBorderRadius)};`);
|
|
2585
|
+
}
|
|
2586
|
+
if (config.containerBorderColor) {
|
|
2587
|
+
vars.push(` --cz-data-table-container-border-color: ${resolveValue2(config.containerBorderColor)};`);
|
|
2588
|
+
}
|
|
2589
|
+
if (config.containerShadow) {
|
|
2590
|
+
vars.push(` --cz-data-table-container-shadow: ${resolveValue2(config.containerShadow)};`);
|
|
2591
|
+
}
|
|
2592
|
+
if (config.headerCellPadding) {
|
|
2593
|
+
vars.push(` --cz-data-table-header-cell-padding: ${resolveValue2(config.headerCellPadding)};`);
|
|
2594
|
+
}
|
|
2595
|
+
if (config.headerFontSize) {
|
|
2596
|
+
vars.push(` --cz-data-table-header-font-size: ${resolveValue2(config.headerFontSize)};`);
|
|
2597
|
+
}
|
|
2598
|
+
if (config.headerFontWeight) {
|
|
2599
|
+
vars.push(` --cz-data-table-header-font-weight: ${resolveValue2(config.headerFontWeight)};`);
|
|
2600
|
+
}
|
|
2601
|
+
if (config.headerColor) vars.push(` --cz-data-table-header-color: ${resolveValue2(config.headerColor)};`);
|
|
2602
|
+
if (config.headerTextTransform) {
|
|
2603
|
+
vars.push(` --cz-data-table-header-text-transform: ${resolveValue2(config.headerTextTransform)};`);
|
|
2604
|
+
}
|
|
2605
|
+
if (config.headerLetterSpacing) {
|
|
2606
|
+
vars.push(` --cz-data-table-header-letter-spacing: ${resolveValue2(config.headerLetterSpacing)};`);
|
|
2607
|
+
}
|
|
2608
|
+
if (config.bodyCellPadding) {
|
|
2609
|
+
vars.push(` --cz-data-table-body-cell-padding: ${resolveValue2(config.bodyCellPadding)};`);
|
|
2610
|
+
}
|
|
2611
|
+
if (config.bodyFontSize) {
|
|
2612
|
+
vars.push(` --cz-data-table-body-font-size: ${resolveValue2(config.bodyFontSize)};`);
|
|
2613
|
+
}
|
|
2614
|
+
if (config.bodyColor) vars.push(` --cz-data-table-body-color: ${resolveValue2(config.bodyColor)};`);
|
|
2615
|
+
if (config.rowBorderColor) {
|
|
2616
|
+
vars.push(` --cz-data-table-row-border-color: ${resolveValue2(config.rowBorderColor)};`);
|
|
2617
|
+
}
|
|
2618
|
+
if (config.rowHoverBg) vars.push(` --cz-data-table-row-hover-bg: ${resolveValue2(config.rowHoverBg)};`);
|
|
2619
|
+
if (config.stripedRowBg) {
|
|
2620
|
+
vars.push(` --cz-data-table-striped-row-bg: ${resolveValue2(config.stripedRowBg)};`);
|
|
2621
|
+
}
|
|
2622
|
+
if (config.selectedRowBg) {
|
|
2623
|
+
vars.push(` --cz-data-table-selected-row-bg: ${resolveValue2(config.selectedRowBg)};`);
|
|
2624
|
+
}
|
|
2625
|
+
if (config.sortIconOpacity) {
|
|
2626
|
+
vars.push(` --cz-data-table-sort-icon-opacity: ${resolveValue2(config.sortIconOpacity)};`);
|
|
2627
|
+
}
|
|
2628
|
+
if (config.sortActiveColor) {
|
|
2629
|
+
vars.push(` --cz-data-table-sort-active-color: ${resolveValue2(config.sortActiveColor)};`);
|
|
2630
|
+
}
|
|
2631
|
+
if (config.paginationPadding) {
|
|
2632
|
+
vars.push(` --cz-data-table-pagination-padding: ${resolveValue2(config.paginationPadding)};`);
|
|
2633
|
+
}
|
|
2634
|
+
if (config.paginationGap) vars.push(` --cz-data-table-pagination-gap: ${resolveValue2(config.paginationGap)};`);
|
|
2635
|
+
if (config.paginationBorderColor) {
|
|
2636
|
+
vars.push(` --cz-data-table-pagination-border-color: ${resolveValue2(config.paginationBorderColor)};`);
|
|
2637
|
+
}
|
|
2638
|
+
if (config.paginationTextColor) {
|
|
2639
|
+
vars.push(` --cz-data-table-pagination-text-color: ${resolveValue2(config.paginationTextColor)};`);
|
|
2640
|
+
}
|
|
2641
|
+
if (config.paginationTextStrongColor) {
|
|
2642
|
+
vars.push(` --cz-data-table-pagination-text-strong-color: ${resolveValue2(config.paginationTextStrongColor)};`);
|
|
2643
|
+
}
|
|
2644
|
+
if (config.paginationButtonSize) {
|
|
2645
|
+
vars.push(` --cz-data-table-pagination-button-size: ${resolveValue2(config.paginationButtonSize)};`);
|
|
2646
|
+
}
|
|
2647
|
+
if (config.paginationButtonRadius) {
|
|
2648
|
+
vars.push(` --cz-data-table-pagination-button-radius: ${resolveValue2(config.paginationButtonRadius)};`);
|
|
2649
|
+
}
|
|
2650
|
+
if (config.paginationButtonHoverBg) {
|
|
2651
|
+
vars.push(` --cz-data-table-pagination-button-hover-bg: ${resolveValue2(config.paginationButtonHoverBg)};`);
|
|
2652
|
+
}
|
|
2653
|
+
if (config.paginationButtonBorderColor) {
|
|
2654
|
+
vars.push(` --cz-data-table-pagination-button-border-color: ${resolveValue2(config.paginationButtonBorderColor)};`);
|
|
2655
|
+
}
|
|
2656
|
+
if (config.paginationButtonColor) {
|
|
2657
|
+
vars.push(` --cz-data-table-pagination-button-color: ${resolveValue2(config.paginationButtonColor)};`);
|
|
2658
|
+
}
|
|
2659
|
+
if (config.paginationButtonDisabledColor) {
|
|
2660
|
+
vars.push(` --cz-data-table-pagination-button-disabled-color: ${resolveValue2(config.paginationButtonDisabledColor)};`);
|
|
2661
|
+
}
|
|
2662
|
+
if (config.emptyStateColor) {
|
|
2663
|
+
vars.push(` --cz-data-table-empty-state-color: ${resolveValue2(config.emptyStateColor)};`);
|
|
2664
|
+
}
|
|
2665
|
+
if (config.emptyStateTitleColor) {
|
|
2666
|
+
vars.push(` --cz-data-table-empty-state-title-color: ${resolveValue2(config.emptyStateTitleColor)};`);
|
|
2667
|
+
}
|
|
2668
|
+
if (config.emptyStateIconBg) {
|
|
2669
|
+
vars.push(` --cz-data-table-empty-state-icon-bg: ${resolveValue2(config.emptyStateIconBg)};`);
|
|
2670
|
+
}
|
|
2671
|
+
if (config.emptyStateIconColor) {
|
|
2672
|
+
vars.push(` --cz-data-table-empty-state-icon-color: ${resolveValue2(config.emptyStateIconColor)};`);
|
|
2673
|
+
}
|
|
2674
|
+
if (config.loadingShimmerBase) {
|
|
2675
|
+
vars.push(` --cz-data-table-loading-shimmer-base: ${resolveValue2(config.loadingShimmerBase)};`);
|
|
2676
|
+
}
|
|
2677
|
+
if (config.loadingShimmerHighlight) {
|
|
2678
|
+
vars.push(` --cz-data-table-loading-shimmer-highlight: ${resolveValue2(config.loadingShimmerHighlight)};`);
|
|
2679
|
+
}
|
|
2680
|
+
return `:root {
|
|
2681
|
+
${vars.join("\n")}
|
|
2682
|
+
}
|
|
2683
|
+
`;
|
|
2684
|
+
}
|
|
2685
|
+
function resolveValue2(value) {
|
|
2686
|
+
if (!value.startsWith("$")) return value;
|
|
2687
|
+
if (/\s+\$/.test(value)) return value;
|
|
2688
|
+
return resolveToken(value);
|
|
2689
|
+
}
|
|
2690
|
+
function generateDataTableBase() {
|
|
2691
|
+
return `.cz-data-table-page-btn {
|
|
2692
|
+
transition: all var(--transition-fast, var(--cz-transition-fast));
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
.cz-data-table-page-btn:hover:not(:disabled) {
|
|
2696
|
+
background: var(--cz-data-table-pagination-button-hover-bg, transparent);
|
|
2697
|
+
border-color: var(--cz-data-table-pagination-button-border-color, transparent);
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
.cz-data-table-shimmer {
|
|
2701
|
+
background-size: 200% 100%;
|
|
2702
|
+
animation: cz-data-table-shimmer 1.5s infinite;
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
@keyframes cz-data-table-shimmer {
|
|
2706
|
+
0% { background-position: 200% 0; }
|
|
2707
|
+
100% { background-position: -200% 0; }
|
|
2708
|
+
}
|
|
2709
|
+
`;
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2095
2712
|
// cli/generators/code.ts
|
|
2096
2713
|
function generateCodeCSS(config) {
|
|
2097
2714
|
let css = "/* ===== CODE ===== */\n\n";
|
|
@@ -2747,13 +3364,53 @@ function generateTabsVariables(config) {
|
|
|
2747
3364
|
const vars = [];
|
|
2748
3365
|
if (config.listBorderWidth) vars.push(` --cz-tabs-list-border-width: ${config.listBorderWidth};`);
|
|
2749
3366
|
if (config.listBorderColor) vars.push(` --cz-tabs-list-border-color: ${resolveToken(config.listBorderColor)};`);
|
|
2750
|
-
if (config.
|
|
2751
|
-
if (config.
|
|
3367
|
+
if (config.listGap) vars.push(` --cz-tabs-list-gap: ${resolveToken(config.listGap)};`);
|
|
3368
|
+
if (config.triggerPaddingX) vars.push(` --cz-tabs-trigger-padding-x: ${resolveToken(config.triggerPaddingX)};`);
|
|
3369
|
+
if (config.triggerPaddingY) vars.push(` --cz-tabs-trigger-padding-y: ${resolveToken(config.triggerPaddingY)};`);
|
|
3370
|
+
if (config.triggerPaddingXSm) vars.push(` --cz-tabs-trigger-padding-x-sm: ${resolveToken(config.triggerPaddingXSm)};`);
|
|
3371
|
+
if (config.triggerPaddingYSm) vars.push(` --cz-tabs-trigger-padding-y-sm: ${resolveToken(config.triggerPaddingYSm)};`);
|
|
3372
|
+
if (config.triggerPaddingXLg) vars.push(` --cz-tabs-trigger-padding-x-lg: ${resolveToken(config.triggerPaddingXLg)};`);
|
|
3373
|
+
if (config.triggerPaddingYLg) vars.push(` --cz-tabs-trigger-padding-y-lg: ${resolveToken(config.triggerPaddingYLg)};`);
|
|
2752
3374
|
if (config.triggerFontSize) vars.push(` --cz-tabs-trigger-font-size: ${resolveToken(config.triggerFontSize)};`);
|
|
3375
|
+
if (config.triggerFontSizeSm) vars.push(` --cz-tabs-trigger-font-size-sm: ${resolveToken(config.triggerFontSizeSm)};`);
|
|
3376
|
+
if (config.triggerFontSizeLg) vars.push(` --cz-tabs-trigger-font-size-lg: ${resolveToken(config.triggerFontSizeLg)};`);
|
|
2753
3377
|
if (config.triggerFontWeight) vars.push(` --cz-tabs-trigger-font-weight: ${resolveToken(config.triggerFontWeight)};`);
|
|
2754
3378
|
if (config.triggerColor) vars.push(` --cz-tabs-trigger-color: ${resolveToken(config.triggerColor)};`);
|
|
2755
3379
|
if (config.triggerActiveColor) vars.push(` --cz-tabs-trigger-active-color: ${resolveToken(config.triggerActiveColor)};`);
|
|
2756
3380
|
if (config.triggerActiveBorderColor) vars.push(` --cz-tabs-trigger-active-border-color: ${resolveToken(config.triggerActiveBorderColor)};`);
|
|
3381
|
+
if (config.triggerGap) vars.push(` --cz-tabs-trigger-gap: ${resolveToken(config.triggerGap)};`);
|
|
3382
|
+
if (config.triggerRadius) vars.push(` --cz-tabs-trigger-radius: ${resolveToken(config.triggerRadius)};`);
|
|
3383
|
+
if (config.triggerBorderWidth) vars.push(` --cz-tabs-trigger-border-width: ${config.triggerBorderWidth};`);
|
|
3384
|
+
if (config.triggerTransition) vars.push(` --cz-tabs-trigger-transition: ${resolveToken(config.triggerTransition)};`);
|
|
3385
|
+
if (config.iconSize) vars.push(` --cz-tabs-icon-size: ${resolveToken(config.iconSize)};`);
|
|
3386
|
+
if (config.countPaddingX) vars.push(` --cz-tabs-count-padding-x: ${resolveToken(config.countPaddingX)};`);
|
|
3387
|
+
if (config.countMinWidth) vars.push(` --cz-tabs-count-min-width: ${resolveToken(config.countMinWidth)};`);
|
|
3388
|
+
if (config.countHeight) vars.push(` --cz-tabs-count-height: ${resolveToken(config.countHeight)};`);
|
|
3389
|
+
if (config.countFontSize) vars.push(` --cz-tabs-count-font-size: ${resolveToken(config.countFontSize)};`);
|
|
3390
|
+
if (config.countFontWeight) vars.push(` --cz-tabs-count-font-weight: ${resolveToken(config.countFontWeight)};`);
|
|
3391
|
+
if (config.countRadius) vars.push(` --cz-tabs-count-radius: ${resolveToken(config.countRadius)};`);
|
|
3392
|
+
if (config.countBg) vars.push(` --cz-tabs-count-bg: ${resolveToken(config.countBg)};`);
|
|
3393
|
+
if (config.countColor) vars.push(` --cz-tabs-count-color: ${resolveToken(config.countColor)};`);
|
|
3394
|
+
if (config.countActiveBg) vars.push(` --cz-tabs-count-active-bg: ${resolveToken(config.countActiveBg)};`);
|
|
3395
|
+
if (config.countActiveColor) vars.push(` --cz-tabs-count-active-color: ${resolveToken(config.countActiveColor)};`);
|
|
3396
|
+
if (config.pillsListGap) vars.push(` --cz-tabs-pills-list-gap: ${resolveToken(config.pillsListGap)};`);
|
|
3397
|
+
if (config.pillsTriggerBg) vars.push(` --cz-tabs-pills-trigger-bg: ${resolveToken(config.pillsTriggerBg)};`);
|
|
3398
|
+
if (config.pillsTriggerColor) vars.push(` --cz-tabs-pills-trigger-color: ${resolveToken(config.pillsTriggerColor)};`);
|
|
3399
|
+
if (config.pillsTriggerBorderColor) vars.push(` --cz-tabs-pills-trigger-border-color: ${resolveToken(config.pillsTriggerBorderColor)};`);
|
|
3400
|
+
if (config.pillsTriggerHoverBg) vars.push(` --cz-tabs-pills-trigger-hover-bg: ${resolveToken(config.pillsTriggerHoverBg)};`);
|
|
3401
|
+
if (config.pillsTriggerHoverColor) vars.push(` --cz-tabs-pills-trigger-hover-color: ${resolveToken(config.pillsTriggerHoverColor)};`);
|
|
3402
|
+
if (config.pillsTriggerActiveBg) vars.push(` --cz-tabs-pills-trigger-active-bg: ${resolveToken(config.pillsTriggerActiveBg)};`);
|
|
3403
|
+
if (config.pillsTriggerActiveColor) vars.push(` --cz-tabs-pills-trigger-active-color: ${resolveToken(config.pillsTriggerActiveColor)};`);
|
|
3404
|
+
if (config.pillsTriggerActiveBorderColor) vars.push(` --cz-tabs-pills-trigger-active-border-color: ${resolveToken(config.pillsTriggerActiveBorderColor)};`);
|
|
3405
|
+
if (config.pillsTriggerRadius) vars.push(` --cz-tabs-pills-trigger-radius: ${resolveToken(config.pillsTriggerRadius)};`);
|
|
3406
|
+
if (config.enclosedListBg) vars.push(` --cz-tabs-enclosed-list-bg: ${resolveToken(config.enclosedListBg)};`);
|
|
3407
|
+
if (config.enclosedListPadding) vars.push(` --cz-tabs-enclosed-list-padding: ${resolveToken(config.enclosedListPadding)};`);
|
|
3408
|
+
if (config.enclosedListRadius) vars.push(` --cz-tabs-enclosed-list-radius: ${resolveToken(config.enclosedListRadius)};`);
|
|
3409
|
+
if (config.enclosedTriggerColor) vars.push(` --cz-tabs-enclosed-trigger-color: ${resolveToken(config.enclosedTriggerColor)};`);
|
|
3410
|
+
if (config.enclosedTriggerActiveBg) vars.push(` --cz-tabs-enclosed-trigger-active-bg: ${resolveToken(config.enclosedTriggerActiveBg)};`);
|
|
3411
|
+
if (config.enclosedTriggerActiveColor) vars.push(` --cz-tabs-enclosed-trigger-active-color: ${resolveToken(config.enclosedTriggerActiveColor)};`);
|
|
3412
|
+
if (config.enclosedTriggerRadius) vars.push(` --cz-tabs-enclosed-trigger-radius: ${resolveToken(config.enclosedTriggerRadius)};`);
|
|
3413
|
+
if (config.enclosedTriggerActiveShadow) vars.push(` --cz-tabs-enclosed-trigger-active-shadow: ${resolveToken(config.enclosedTriggerActiveShadow)};`);
|
|
2757
3414
|
if (config.contentPadding) vars.push(` --cz-tabs-content-padding: ${resolveToken(config.contentPadding)};`);
|
|
2758
3415
|
if (config.states?.hover?.color) vars.push(` --cz-tabs-trigger-hover-color: ${resolveToken(config.states.hover.color)};`);
|
|
2759
3416
|
if (config.states?.focus?.ringWidth) vars.push(` --cz-tabs-trigger-focus-ring-width: ${config.states.focus.ringWidth};`);
|
|
@@ -2767,28 +3424,45 @@ function generateTabsBase() {
|
|
|
2767
3424
|
return `.cz-tabs {
|
|
2768
3425
|
display: flex;
|
|
2769
3426
|
flex-direction: column;
|
|
3427
|
+
width: 100%;
|
|
2770
3428
|
}
|
|
2771
3429
|
|
|
2772
3430
|
.cz-tabs-list {
|
|
2773
3431
|
display: flex;
|
|
3432
|
+
align-items: center;
|
|
2774
3433
|
border-bottom: var(--cz-tabs-list-border-width) solid var(--cz-tabs-list-border-color);
|
|
2775
|
-
gap:
|
|
3434
|
+
gap: var(--cz-tabs-list-gap);
|
|
3435
|
+
padding-bottom: 0;
|
|
3436
|
+
}
|
|
3437
|
+
|
|
3438
|
+
.cz-tabs--full-width .cz-tabs-list {
|
|
3439
|
+
width: 100%;
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
.cz-tabs--full-width .cz-tabs-trigger {
|
|
3443
|
+
flex: 1;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
.cz-tabs--no-border .cz-tabs-list {
|
|
3447
|
+
border-bottom: none;
|
|
2776
3448
|
}
|
|
2777
3449
|
|
|
2778
3450
|
.cz-tabs-trigger {
|
|
2779
3451
|
display: inline-flex;
|
|
2780
3452
|
align-items: center;
|
|
2781
3453
|
justify-content: center;
|
|
3454
|
+
gap: var(--cz-tabs-trigger-gap);
|
|
2782
3455
|
padding: var(--cz-tabs-trigger-padding-y) var(--cz-tabs-trigger-padding-x);
|
|
2783
3456
|
font-size: var(--cz-tabs-trigger-font-size);
|
|
2784
3457
|
font-weight: var(--cz-tabs-trigger-font-weight);
|
|
2785
3458
|
color: var(--cz-tabs-trigger-color);
|
|
2786
3459
|
background: transparent;
|
|
2787
3460
|
border: none;
|
|
2788
|
-
border-bottom:
|
|
3461
|
+
border-bottom: var(--cz-tabs-trigger-border-width) solid transparent;
|
|
2789
3462
|
margin-bottom: calc(var(--cz-tabs-list-border-width) * -1);
|
|
3463
|
+
border-radius: var(--cz-tabs-trigger-radius);
|
|
2790
3464
|
cursor: pointer;
|
|
2791
|
-
transition: all var(--cz-transition
|
|
3465
|
+
transition: all var(--cz-tabs-trigger-transition);
|
|
2792
3466
|
white-space: nowrap;
|
|
2793
3467
|
}
|
|
2794
3468
|
|
|
@@ -2799,7 +3473,6 @@ function generateTabsBase() {
|
|
|
2799
3473
|
.cz-tabs-trigger:focus-visible {
|
|
2800
3474
|
outline: none;
|
|
2801
3475
|
box-shadow: 0 0 0 var(--cz-tabs-trigger-focus-ring-width) var(--cz-tabs-trigger-focus-ring-color);
|
|
2802
|
-
border-radius: var(--cz-radius-sm);
|
|
2803
3476
|
}
|
|
2804
3477
|
|
|
2805
3478
|
.cz-tabs-trigger[data-state="active"],
|
|
@@ -2813,6 +3486,107 @@ function generateTabsBase() {
|
|
|
2813
3486
|
cursor: not-allowed;
|
|
2814
3487
|
}
|
|
2815
3488
|
|
|
3489
|
+
.cz-tabs-trigger-icon {
|
|
3490
|
+
display: inline-flex;
|
|
3491
|
+
align-items: center;
|
|
3492
|
+
justify-content: center;
|
|
3493
|
+
font-size: var(--cz-tabs-icon-size);
|
|
3494
|
+
line-height: 1;
|
|
3495
|
+
}
|
|
3496
|
+
|
|
3497
|
+
.cz-tabs-trigger-count {
|
|
3498
|
+
display: inline-flex;
|
|
3499
|
+
align-items: center;
|
|
3500
|
+
justify-content: center;
|
|
3501
|
+
padding: 0 var(--cz-tabs-count-padding-x);
|
|
3502
|
+
min-width: var(--cz-tabs-count-min-width);
|
|
3503
|
+
height: var(--cz-tabs-count-height);
|
|
3504
|
+
border-radius: var(--cz-tabs-count-radius);
|
|
3505
|
+
font-size: var(--cz-tabs-count-font-size);
|
|
3506
|
+
font-weight: var(--cz-tabs-count-font-weight);
|
|
3507
|
+
background: var(--cz-tabs-count-bg);
|
|
3508
|
+
color: var(--cz-tabs-count-color);
|
|
3509
|
+
}
|
|
3510
|
+
|
|
3511
|
+
.cz-tabs-trigger[data-state="active"] .cz-tabs-trigger-count,
|
|
3512
|
+
.cz-tabs-trigger.cz-tabs-trigger-active .cz-tabs-trigger-count {
|
|
3513
|
+
background: var(--cz-tabs-count-active-bg);
|
|
3514
|
+
color: var(--cz-tabs-count-active-color);
|
|
3515
|
+
}
|
|
3516
|
+
|
|
3517
|
+
.cz-tabs--size-sm .cz-tabs-trigger {
|
|
3518
|
+
padding: var(--cz-tabs-trigger-padding-y-sm) var(--cz-tabs-trigger-padding-x-sm);
|
|
3519
|
+
font-size: var(--cz-tabs-trigger-font-size-sm);
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
.cz-tabs--size-md .cz-tabs-trigger {
|
|
3523
|
+
padding: var(--cz-tabs-trigger-padding-y) var(--cz-tabs-trigger-padding-x);
|
|
3524
|
+
font-size: var(--cz-tabs-trigger-font-size);
|
|
3525
|
+
}
|
|
3526
|
+
|
|
3527
|
+
.cz-tabs--size-lg .cz-tabs-trigger {
|
|
3528
|
+
padding: var(--cz-tabs-trigger-padding-y-lg) var(--cz-tabs-trigger-padding-x-lg);
|
|
3529
|
+
font-size: var(--cz-tabs-trigger-font-size-lg);
|
|
3530
|
+
}
|
|
3531
|
+
|
|
3532
|
+
.cz-tabs--variant-underline .cz-tabs-list {
|
|
3533
|
+
background: transparent;
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
.cz-tabs--variant-pills .cz-tabs-list {
|
|
3537
|
+
border-bottom: none;
|
|
3538
|
+
gap: var(--cz-tabs-pills-list-gap);
|
|
3539
|
+
}
|
|
3540
|
+
|
|
3541
|
+
.cz-tabs--variant-pills .cz-tabs-trigger {
|
|
3542
|
+
color: var(--cz-tabs-pills-trigger-color);
|
|
3543
|
+
background: var(--cz-tabs-pills-trigger-bg);
|
|
3544
|
+
border: 1px solid var(--cz-tabs-pills-trigger-border-color);
|
|
3545
|
+
margin-bottom: 0;
|
|
3546
|
+
border-radius: var(--cz-tabs-pills-trigger-radius);
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
.cz-tabs--variant-pills .cz-tabs-trigger:hover {
|
|
3550
|
+
background: var(--cz-tabs-pills-trigger-hover-bg);
|
|
3551
|
+
color: var(--cz-tabs-pills-trigger-hover-color);
|
|
3552
|
+
}
|
|
3553
|
+
|
|
3554
|
+
.cz-tabs--variant-pills .cz-tabs-trigger[data-state="active"],
|
|
3555
|
+
.cz-tabs--variant-pills .cz-tabs-trigger.cz-tabs-trigger-active {
|
|
3556
|
+
background: var(--cz-tabs-pills-trigger-active-bg);
|
|
3557
|
+
color: var(--cz-tabs-pills-trigger-active-color);
|
|
3558
|
+
border-color: var(--cz-tabs-pills-trigger-active-border-color);
|
|
3559
|
+
}
|
|
3560
|
+
|
|
3561
|
+
.cz-tabs--variant-pills .cz-tabs-trigger[data-state="active"] .cz-tabs-trigger-count,
|
|
3562
|
+
.cz-tabs--variant-pills .cz-tabs-trigger.cz-tabs-trigger-active .cz-tabs-trigger-count {
|
|
3563
|
+
background: var(--cz-tabs-count-active-bg);
|
|
3564
|
+
color: var(--cz-tabs-count-active-color);
|
|
3565
|
+
}
|
|
3566
|
+
|
|
3567
|
+
.cz-tabs--variant-enclosed .cz-tabs-list {
|
|
3568
|
+
border-bottom: none;
|
|
3569
|
+
background: var(--cz-tabs-enclosed-list-bg);
|
|
3570
|
+
padding: var(--cz-tabs-enclosed-list-padding);
|
|
3571
|
+
border-radius: var(--cz-tabs-enclosed-list-radius);
|
|
3572
|
+
gap: var(--cz-tabs-list-gap);
|
|
3573
|
+
}
|
|
3574
|
+
|
|
3575
|
+
.cz-tabs--variant-enclosed .cz-tabs-trigger {
|
|
3576
|
+
color: var(--cz-tabs-enclosed-trigger-color);
|
|
3577
|
+
margin-bottom: 0;
|
|
3578
|
+
border: none;
|
|
3579
|
+
border-radius: var(--cz-tabs-enclosed-trigger-radius);
|
|
3580
|
+
}
|
|
3581
|
+
|
|
3582
|
+
.cz-tabs--variant-enclosed .cz-tabs-trigger[data-state="active"],
|
|
3583
|
+
.cz-tabs--variant-enclosed .cz-tabs-trigger.cz-tabs-trigger-active {
|
|
3584
|
+
color: var(--cz-tabs-enclosed-trigger-active-color);
|
|
3585
|
+
background: var(--cz-tabs-enclosed-trigger-active-bg);
|
|
3586
|
+
border-bottom-color: transparent;
|
|
3587
|
+
box-shadow: var(--cz-tabs-enclosed-trigger-active-shadow);
|
|
3588
|
+
}
|
|
3589
|
+
|
|
2816
3590
|
.cz-tabs-content {
|
|
2817
3591
|
padding: var(--cz-tabs-content-padding);
|
|
2818
3592
|
}
|
|
@@ -3103,6 +3877,121 @@ function generateDialogBase() {
|
|
|
3103
3877
|
`;
|
|
3104
3878
|
}
|
|
3105
3879
|
|
|
3880
|
+
// cli/generators/modal.ts
|
|
3881
|
+
function generateModalCSS(config) {
|
|
3882
|
+
let css = "/* ===== MODAL ===== */\n\n";
|
|
3883
|
+
css += generateModalVariables(config);
|
|
3884
|
+
css += "\n";
|
|
3885
|
+
css += generateModalBase();
|
|
3886
|
+
css += "\n";
|
|
3887
|
+
if (config.customCSS) css += `/* Custom Modal CSS */
|
|
3888
|
+
${config.customCSS}
|
|
3889
|
+
`;
|
|
3890
|
+
return css;
|
|
3891
|
+
}
|
|
3892
|
+
function generateModalVariables(config) {
|
|
3893
|
+
const vars = [];
|
|
3894
|
+
if (config.overlayBg) vars.push(` --cz-modal-overlay-bg: ${resolveValue3(config.overlayBg)};`);
|
|
3895
|
+
if (config.contentBg) vars.push(` --cz-modal-content-bg: ${resolveValue3(config.contentBg)};`);
|
|
3896
|
+
if (config.contentBorderRadius) {
|
|
3897
|
+
vars.push(` --cz-modal-content-border-radius: ${resolveValue3(config.contentBorderRadius)};`);
|
|
3898
|
+
}
|
|
3899
|
+
if (config.contentBorderColor) {
|
|
3900
|
+
vars.push(` --cz-modal-content-border-color: ${resolveValue3(config.contentBorderColor)};`);
|
|
3901
|
+
}
|
|
3902
|
+
if (config.contentShadow) vars.push(` --cz-modal-content-shadow: ${resolveValue3(config.contentShadow)};`);
|
|
3903
|
+
if (config.headerPadding) vars.push(` --cz-modal-header-padding: ${resolveValue3(config.headerPadding)};`);
|
|
3904
|
+
if (config.bodyPadding) vars.push(` --cz-modal-body-padding: ${resolveValue3(config.bodyPadding)};`);
|
|
3905
|
+
if (config.footerPadding) vars.push(` --cz-modal-footer-padding: ${resolveValue3(config.footerPadding)};`);
|
|
3906
|
+
if (config.footerGap) vars.push(` --cz-modal-footer-gap: ${resolveValue3(config.footerGap)};`);
|
|
3907
|
+
if (config.closeIconSize) vars.push(` --cz-modal-close-icon-size: ${resolveValue3(config.closeIconSize)};`);
|
|
3908
|
+
if (config.closeIconPadding) {
|
|
3909
|
+
vars.push(` --cz-modal-close-icon-padding: ${resolveValue3(config.closeIconPadding)};`);
|
|
3910
|
+
}
|
|
3911
|
+
if (config.closeIconRadius) vars.push(` --cz-modal-close-icon-radius: ${resolveValue3(config.closeIconRadius)};`);
|
|
3912
|
+
if (config.closeIconBg) vars.push(` --cz-modal-close-icon-bg: ${resolveValue3(config.closeIconBg)};`);
|
|
3913
|
+
if (config.closeIconColor) {
|
|
3914
|
+
vars.push(` --cz-modal-close-icon-color: ${resolveValue3(config.closeIconColor)};`);
|
|
3915
|
+
}
|
|
3916
|
+
if (config.closeIconHoverBg) {
|
|
3917
|
+
vars.push(` --cz-modal-close-icon-hover-bg: ${resolveValue3(config.closeIconHoverBg)};`);
|
|
3918
|
+
}
|
|
3919
|
+
if (config.closeIconHoverColor) {
|
|
3920
|
+
vars.push(` --cz-modal-close-icon-hover-color: ${resolveValue3(config.closeIconHoverColor)};`);
|
|
3921
|
+
}
|
|
3922
|
+
if (config.closeIconTransition) {
|
|
3923
|
+
vars.push(` --cz-modal-close-icon-transition: ${resolveValue3(config.closeIconTransition)};`);
|
|
3924
|
+
}
|
|
3925
|
+
if (config.closeIconFocusRing) {
|
|
3926
|
+
vars.push(` --cz-modal-close-icon-focus-ring: ${resolveValue3(config.closeIconFocusRing)};`);
|
|
3927
|
+
}
|
|
3928
|
+
if (config.tabFontSize) vars.push(` --cz-modal-tab-font-size: ${resolveValue3(config.tabFontSize)};`);
|
|
3929
|
+
if (config.tabFontWeight) {
|
|
3930
|
+
vars.push(` --cz-modal-tab-font-weight: ${resolveValue3(config.tabFontWeight)};`);
|
|
3931
|
+
}
|
|
3932
|
+
if (config.tabColor) vars.push(` --cz-modal-tab-color: ${resolveValue3(config.tabColor)};`);
|
|
3933
|
+
if (config.tabActiveColor) {
|
|
3934
|
+
vars.push(` --cz-modal-tab-active-color: ${resolveValue3(config.tabActiveColor)};`);
|
|
3935
|
+
}
|
|
3936
|
+
if (config.tabActiveBorderColor) {
|
|
3937
|
+
vars.push(` --cz-modal-tab-active-border-color: ${resolveValue3(config.tabActiveBorderColor)};`);
|
|
3938
|
+
}
|
|
3939
|
+
return `:root {
|
|
3940
|
+
${vars.join("\n")}
|
|
3941
|
+
}
|
|
3942
|
+
`;
|
|
3943
|
+
}
|
|
3944
|
+
function resolveValue3(value) {
|
|
3945
|
+
if (!value.startsWith("$")) return value;
|
|
3946
|
+
if (/\s+\$/.test(value)) return value;
|
|
3947
|
+
return resolveToken(value);
|
|
3948
|
+
}
|
|
3949
|
+
function generateModalBase() {
|
|
3950
|
+
return `.cz-modal-close-icon {
|
|
3951
|
+
display: inline-flex;
|
|
3952
|
+
align-items: center;
|
|
3953
|
+
justify-content: center;
|
|
3954
|
+
width: var(--cz-modal-close-icon-size, 2rem);
|
|
3955
|
+
height: var(--cz-modal-close-icon-size, 2rem);
|
|
3956
|
+
padding: var(--cz-modal-close-icon-padding, 0.5rem);
|
|
3957
|
+
flex-shrink: 0;
|
|
3958
|
+
border: 0;
|
|
3959
|
+
border-radius: var(--cz-modal-close-icon-radius, var(--cz-radius-md));
|
|
3960
|
+
background: var(--cz-modal-close-icon-bg, transparent);
|
|
3961
|
+
color: var(--cz-modal-close-icon-color, hsl(var(--cz-color-mutedFg)));
|
|
3962
|
+
cursor: pointer;
|
|
3963
|
+
transition: all var(--cz-modal-close-icon-transition, var(--cz-transition-fast));
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
.cz-modal-close-icon:hover {
|
|
3967
|
+
background: var(--cz-modal-close-icon-hover-bg, hsl(var(--cz-color-muted)));
|
|
3968
|
+
color: var(--cz-modal-close-icon-hover-color, hsl(var(--cz-color-primary)));
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
.cz-modal-close-icon:focus,
|
|
3972
|
+
.cz-modal-close-icon:focus-visible {
|
|
3973
|
+
outline: none;
|
|
3974
|
+
box-shadow: var(--cz-modal-close-icon-focus-ring, none);
|
|
3975
|
+
}
|
|
3976
|
+
|
|
3977
|
+
.cz-modal-close-btn {
|
|
3978
|
+
flex-shrink: 0;
|
|
3979
|
+
}
|
|
3980
|
+
|
|
3981
|
+
.cz-modal-tab-btn:focus,
|
|
3982
|
+
.cz-modal-tab-btn:focus-visible {
|
|
3983
|
+
outline: none;
|
|
3984
|
+
box-shadow: none;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3987
|
+
@supports not (gap: 0.75rem) {
|
|
3988
|
+
.cz-modal-footer > * + * {
|
|
3989
|
+
margin-left: var(--cz-modal-footer-gap, var(--cz-spacing-md, 0.75rem));
|
|
3990
|
+
}
|
|
3991
|
+
}
|
|
3992
|
+
`;
|
|
3993
|
+
}
|
|
3994
|
+
|
|
3106
3995
|
// cli/generators/dropdown-menu.ts
|
|
3107
3996
|
function generateDropdownMenuCSS(config) {
|
|
3108
3997
|
let css = "/* ===== DROPDOWN MENU ===== */\n\n";
|
|
@@ -3526,12 +4415,18 @@ ${config.customCSS.before}
|
|
|
3526
4415
|
if (components.badge) {
|
|
3527
4416
|
css += generateBadgeCSS(components.badge) + "\n";
|
|
3528
4417
|
}
|
|
4418
|
+
if (components.statusBadge) {
|
|
4419
|
+
css += generateStatusBadgeCSS(components.statusBadge) + "\n";
|
|
4420
|
+
}
|
|
3529
4421
|
if (components.avatar) {
|
|
3530
4422
|
css += generateAvatarCSS(components.avatar) + "\n";
|
|
3531
4423
|
}
|
|
3532
4424
|
if (components.table) {
|
|
3533
4425
|
css += generateTableCSS(components.table) + "\n";
|
|
3534
4426
|
}
|
|
4427
|
+
if (components.dataTable) {
|
|
4428
|
+
css += generateDataTableCSS(components.dataTable) + "\n";
|
|
4429
|
+
}
|
|
3535
4430
|
if (components.code) {
|
|
3536
4431
|
css += generateCodeCSS(components.code) + "\n";
|
|
3537
4432
|
}
|
|
@@ -3571,6 +4466,9 @@ ${config.customCSS.before}
|
|
|
3571
4466
|
if (components.dialog) {
|
|
3572
4467
|
css += generateDialogCSS(components.dialog) + "\n";
|
|
3573
4468
|
}
|
|
4469
|
+
if (components.modal) {
|
|
4470
|
+
css += generateModalCSS(components.modal) + "\n";
|
|
4471
|
+
}
|
|
3574
4472
|
if (components.dropdownMenu) {
|
|
3575
4473
|
css += generateDropdownMenuCSS(components.dropdownMenu) + "\n";
|
|
3576
4474
|
}
|