@kilivi/payloadcms-theme-management 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/fields/ColorPickerField.js +1 -1
  2. package/dist/fields/ColorPickerField.js.map +1 -1
  3. package/dist/fields/ThemeTokenSelectField.d.ts.map +1 -1
  4. package/dist/fields/ThemeTokenSelectField.js +1 -1
  5. package/dist/fields/ThemeTokenSelectField.js.map +1 -1
  6. package/dist/fields/themeConfigurationField.d.ts +3 -2
  7. package/dist/fields/themeConfigurationField.d.ts.map +1 -1
  8. package/dist/fields/themeConfigurationField.js +236 -274
  9. package/dist/fields/themeConfigurationField.js.map +1 -1
  10. package/dist/index.d.ts +1 -0
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +61 -10
  13. package/dist/index.js.map +1 -1
  14. package/package.json +1 -1
  15. package/dist/fields/ExtendedThemeAutoPopulateField.d.ts +0 -12
  16. package/dist/fields/ExtendedThemeAutoPopulateField.d.ts.map +0 -1
  17. package/dist/fields/ExtendedThemeAutoPopulateField.js +0 -176
  18. package/dist/fields/ExtendedThemeAutoPopulateField.js.map +0 -1
  19. package/dist/fields/RadiusField.d.ts +0 -3
  20. package/dist/fields/RadiusField.d.ts.map +0 -1
  21. package/dist/fields/RadiusField.js +0 -174
  22. package/dist/fields/RadiusField.js.map +0 -1
  23. package/dist/fields/ThemeLivePreview.css +0 -190
  24. package/dist/fields/ThemeLivePreview.d.ts +0 -3
  25. package/dist/fields/ThemeLivePreview.d.ts.map +0 -1
  26. package/dist/fields/ThemeLivePreview.js +0 -195
  27. package/dist/fields/ThemeLivePreview.js.map +0 -1
  28. package/dist/fields/VISUAL_EXAMPLES.d.ts +0 -153
  29. package/dist/fields/VISUAL_EXAMPLES.d.ts.map +0 -1
  30. package/dist/fields/VISUAL_EXAMPLES.js +0 -148
  31. package/dist/fields/VISUAL_EXAMPLES.js.map +0 -1
  32. package/dist/fields/extendedThemeFields.d.ts +0 -139
  33. package/dist/fields/extendedThemeFields.d.ts.map +0 -1
  34. package/dist/fields/extendedThemeFields.js +0 -489
  35. package/dist/fields/extendedThemeFields.js.map +0 -1
  36. package/dist/views/ThemePreviewLoader.d.ts +0 -7
  37. package/dist/views/ThemePreviewLoader.d.ts.map +0 -1
  38. package/dist/views/ThemePreviewLoader.js +0 -43
  39. package/dist/views/ThemePreviewLoader.js.map +0 -1
  40. package/dist/views/ThemePreviewView.d.ts +0 -10
  41. package/dist/views/ThemePreviewView.d.ts.map +0 -1
  42. package/dist/views/ThemePreviewView.js +0 -43
  43. package/dist/views/ThemePreviewView.js.map +0 -1
  44. package/dist/views/ThemePreviewViewClient.d.ts +0 -7
  45. package/dist/views/ThemePreviewViewClient.d.ts.map +0 -1
  46. package/dist/views/ThemePreviewViewClient.js +0 -12
  47. package/dist/views/ThemePreviewViewClient.js.map +0 -1
@@ -1,148 +0,0 @@
1
- /**
2
- * Enhanced Font Selector - Visual Examples
3
- *
4
- * This file demonstrates how the font selector appears with actual fonts
5
- */ /**
6
- * BEFORE (Standard Payload Select):
7
- *
8
- * ┌──────────────────────────────┐
9
- * │ Body font ▼ │
10
- * ├──────────────────────────────┤
11
- * │ System │
12
- * │ Inter │
13
- * │ Roboto │
14
- * │ Open Sans │
15
- * │ ... │
16
- * └──────────────────────────────┘
17
- *
18
- * Issues:
19
- * - No visual preview of fonts
20
- * - Can't see how font looks
21
- * - Generic dropdown appearance
22
- * - No distinction between fonts
23
- */ /**
24
- * AFTER (Custom Font Selector):
25
- *
26
- * ┌────────────────────────────────────┐
27
- * │ Body font │
28
- * │ ┌────────────────────────────┐ │
29
- * │ │ Inter ▼ │ │
30
- * │ └────────────────────────────┘ │
31
- * └────────────────────────────────────┘
32
- *
33
- * Opens dropdown:
34
- *
35
- * ┌────────────────────────────────────┐
36
- * │ ✓ Inter │
37
- * │ The quick brown fox jumps... │
38
- * │ (rendered in Inter font) │
39
- * ├────────────────────────────────────┤
40
- * │ Roboto │
41
- * │ The quick brown fox jumps... │
42
- * │ (rendered in Roboto font) │
43
- * ├────────────────────────────────────┤
44
- * │ Playfair Display │
45
- * │ The quick brown fox jumps... │
46
- * │ (rendered in Playfair font) │
47
- * └────────────────────────────────────┘
48
- *
49
- * Features:
50
- * ✅ Live font preview
51
- * ✅ Check mark on selected
52
- * ✅ Hover effects
53
- * ✅ Smooth transitions
54
- * ✅ Font category badges
55
- */ /**
56
- * Color Picker BEFORE (Inline Popover):
57
- *
58
- * ┌────────────────────────────────┐
59
- * │ Primary color │
60
- * │ ┌───┐ #3b82f6 │
61
- * │ │███│ ──────────── │
62
- * │ └───┘ │
63
- * │ ┌──────────────────┐ │
64
- * │ │ Color Picker │ │
65
- * │ │ [Hex Wheel] │ │
66
- * │ │ #3b82f6 │ │
67
- * │ └──────────────────┘ │
68
- * └────────────────────────────────┘
69
- *
70
- * Issues:
71
- * - Takes up inline space
72
- * - Hard to use on mobile
73
- * - No quick color swatches
74
- * - Click-outside handling complex
75
- */ /**
76
- * Color Picker AFTER (Modal Drawer):
77
- *
78
- * Field:
79
- * ┌────────────────────────────────┐
80
- * │ Primary color │
81
- * │ ┌───┐ #3b82f6 │
82
- * │ │███│ ──────────── │
83
- * │ └───┘ │
84
- * └────────────────────────────────┘
85
- *
86
- * Click swatch → Opens Modal:
87
- *
88
- * ╔════════════════════════════════╗
89
- * ║ Choose Primary color [×] ║
90
- * ╠════════════════════════════════╣
91
- * ║ ║
92
- * ║ ┌────────────────────┐ ║
93
- * ║ │ │ ║
94
- * ║ │ [Color Wheel] │ ║
95
- * ║ │ │ ║
96
- * ║ └────────────────────┘ ║
97
- * ║ ║
98
- * ║ #3b82f6 [Done] ║
99
- * ║ ║
100
- * ║ Quick Colors: ║
101
- * ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║
102
- * ║ │██│██│██│██│██│██│██│██│ ║
103
- * ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║
104
- * ║ ║
105
- * ╚════════════════════════════════╝
106
- *
107
- * Features:
108
- * ✅ Full-screen modal (Payload Drawer)
109
- * ✅ Larger color picker (220px)
110
- * ✅ Quick color swatches
111
- * ✅ Better mobile UX
112
- * ✅ Escape key to close
113
- */ /**
114
- * Theme Preset Selector (Already Had Swatches!):
115
- *
116
- * ┌─────────────────────────────────────┐
117
- * │ Cool & Professional ●●●●● │
118
- * │ cool │
119
- * ├─────────────────────────────────────┤
120
- * │ Warm & Inviting ●●●●● │
121
- * │ warm │
122
- * ├─────────────────────────────────────┤
123
- * │ Dark & Modern ●●●●● │
124
- * │ dark │
125
- * └─────────────────────────────────────┘
126
- *
127
- * Legend:
128
- * ● = Color swatch for:
129
- * - Primary
130
- * - Secondary
131
- * - Accent
132
- * - Background
133
- * - Foreground
134
- */ export const examples = {
135
- fontSelector: {
136
- before: 'Standard dropdown with no preview',
137
- after: 'Custom component with live font rendering'
138
- },
139
- colorPicker: {
140
- before: 'Inline popover',
141
- after: 'Modal drawer with quick swatches'
142
- },
143
- themePresets: {
144
- status: 'Already implemented with color swatches!'
145
- }
146
- };
147
-
148
- //# sourceMappingURL=VISUAL_EXAMPLES.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/fields/VISUAL_EXAMPLES.ts"],"sourcesContent":["/**\n * Enhanced Font Selector - Visual Examples\n *\n * This file demonstrates how the font selector appears with actual fonts\n */\n\n/**\n * BEFORE (Standard Payload Select):\n *\n * ┌──────────────────────────────┐\n * │ Body font ▼ │\n * ├──────────────────────────────┤\n * │ System │\n * │ Inter │\n * │ Roboto │\n * │ Open Sans │\n * │ ... │\n * └──────────────────────────────┘\n *\n * Issues:\n * - No visual preview of fonts\n * - Can't see how font looks\n * - Generic dropdown appearance\n * - No distinction between fonts\n */\n\n/**\n * AFTER (Custom Font Selector):\n *\n * ┌────────────────────────────────────┐\n * │ Body font │\n * │ ┌────────────────────────────┐ │\n * │ │ Inter ▼ │ │\n * │ └────────────────────────────┘ │\n * └────────────────────────────────────┘\n *\n * Opens dropdown:\n *\n * ┌────────────────────────────────────┐\n * │ ✓ Inter │\n * │ The quick brown fox jumps... │\n * │ (rendered in Inter font) │\n * ├────────────────────────────────────┤\n * │ Roboto │\n * │ The quick brown fox jumps... │\n * │ (rendered in Roboto font) │\n * ├────────────────────────────────────┤\n * │ Playfair Display │\n * │ The quick brown fox jumps... │\n * │ (rendered in Playfair font) │\n * └────────────────────────────────────┘\n *\n * Features:\n * ✅ Live font preview\n * ✅ Check mark on selected\n * ✅ Hover effects\n * ✅ Smooth transitions\n * ✅ Font category badges\n */\n\n/**\n * Color Picker BEFORE (Inline Popover):\n *\n * ┌────────────────────────────────┐\n * │ Primary color │\n * │ ┌───┐ #3b82f6 │\n * │ │███│ ──────────── │\n * │ └───┘ │\n * │ ┌──────────────────┐ │\n * │ │ Color Picker │ │\n * │ │ [Hex Wheel] │ │\n * │ │ #3b82f6 │ │\n * │ └──────────────────┘ │\n * └────────────────────────────────┘\n *\n * Issues:\n * - Takes up inline space\n * - Hard to use on mobile\n * - No quick color swatches\n * - Click-outside handling complex\n */\n\n/**\n * Color Picker AFTER (Modal Drawer):\n *\n * Field:\n * ┌────────────────────────────────┐\n * │ Primary color │\n * │ ┌───┐ #3b82f6 │\n * │ │███│ ──────────── │\n * │ └───┘ │\n * └────────────────────────────────┘\n *\n * Click swatch → Opens Modal:\n *\n * ╔════════════════════════════════╗\n * ║ Choose Primary color [×] ║\n * ╠════════════════════════════════╣\n * ║ ║\n * ║ ┌────────────────────┐ ║\n * ║ │ │ ║\n * ║ │ [Color Wheel] │ ║\n * ║ │ │ ║\n * ║ └────────────────────┘ ║\n * ║ ║\n * ║ #3b82f6 [Done] ║\n * ║ ║\n * ║ Quick Colors: ║\n * ║ ┌──┬──┬──┬──┬──┬──┬──┬──┐ ║\n * ║ │██│██│██│██│██│██│██│██│ ║\n * ║ └──┴──┴──┴──┴──┴──┴──┴──┘ ║\n * ║ ║\n * ╚════════════════════════════════╝\n *\n * Features:\n * ✅ Full-screen modal (Payload Drawer)\n * ✅ Larger color picker (220px)\n * ✅ Quick color swatches\n * ✅ Better mobile UX\n * ✅ Escape key to close\n */\n\n/**\n * Theme Preset Selector (Already Had Swatches!):\n *\n * ┌─────────────────────────────────────┐\n * │ Cool & Professional ●●●●● │\n * │ cool │\n * ├─────────────────────────────────────┤\n * │ Warm & Inviting ●●●●● │\n * │ warm │\n * ├─────────────────────────────────────┤\n * │ Dark & Modern ●●●●● │\n * │ dark │\n * └─────────────────────────────────────┘\n *\n * Legend:\n * ● = Color swatch for:\n * - Primary\n * - Secondary\n * - Accent\n * - Background\n * - Foreground\n */\n\nexport const examples = {\n fontSelector: {\n before: 'Standard dropdown with no preview',\n after: 'Custom component with live font rendering',\n },\n colorPicker: {\n before: 'Inline popover',\n after: 'Modal drawer with quick swatches',\n },\n themePresets: {\n status: 'Already implemented with color swatches!',\n },\n}\n"],"names":["examples","fontSelector","before","after","colorPicker","themePresets","status"],"mappings":"AAAA;;;;CAIC,GAED;;;;;;;;;;;;;;;;;;CAkBC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCC,GAED;;;;;;;;;;;;;;;;;;;;CAoBC,GAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCC,GAED;;;;;;;;;;;;;;;;;;;;;CAqBC,GAED,OAAO,MAAMA,WAAW;IACtBC,cAAc;QACZC,QAAQ;QACRC,OAAO;IACT;IACAC,aAAa;QACXF,QAAQ;QACRC,OAAO;IACT;IACAE,cAAc;QACZC,QAAQ;IACV;AACF,EAAC"}
@@ -1,139 +0,0 @@
1
- import type { Field } from 'payload';
2
- /**
3
- * Base Color Tokens (19 tokens)
4
- * Required for all themes
5
- */
6
- export declare const baseColorFields: Field[];
7
- /**
8
- * Chart Colors (5 tokens)
9
- * For data visualization
10
- */
11
- export declare const chartColorFields: Field[];
12
- /**
13
- * Shadow Controls (6 properties)
14
- * TweakCN essential feature
15
- */
16
- export declare const shadowFields: Field[];
17
- /**
18
- * Font Family Configuration (3 families)
19
- * TweakCN essential feature
20
- */
21
- export declare const fontFamilyFields: Field[];
22
- /**
23
- * Advanced Typography (2 properties)
24
- */
25
- export declare const advancedTypographyFields: Field[];
26
- /**
27
- * Border Radius Configuration
28
- */
29
- export declare const designSystemFields: Field[];
30
- /**
31
- * Extended Theme Selection Field with Visual Preview and Auto-Population
32
- * Automatically fills all color fields when a theme is selected
33
- */
34
- export declare const extendedThemeSelectionField: Field;
35
- /**
36
- * Unified Light Mode Configuration
37
- * Combines all color tokens in one place
38
- */
39
- export declare const lightModeColorsField: Field;
40
- /**
41
- * Unified Dark Mode Configuration
42
- */
43
- export declare const darkModeColorsField: Field;
44
- /**
45
- * Shadow Configuration Section
46
- */
47
- export declare const shadowConfigField: Field;
48
- /**
49
- * Typography Configuration Section
50
- */
51
- export declare const typographyConfigField: Field;
52
- /**
53
- * Design System Configuration
54
- */
55
- export declare const designSystemConfigField: Field;
56
- export declare const extendedLightModeField: {
57
- fields: Field[];
58
- type: "collapsible";
59
- } & {
60
- admin?: {
61
- components?: {
62
- afterInput?: import("payload").CustomPreviewButton[];
63
- beforeInput?: import("payload").CustomPreviewButton[];
64
- Label?: import("payload").CustomPreviewButton<import("payload").CollapsibleFieldLabelClientComponent | import("payload").CollapsibleFieldLabelServerComponent>;
65
- } & {
66
- Cell?: import("payload").PayloadComponent<import("payload").DefaultServerCellComponentProps, import("payload").DefaultCellComponentProps>;
67
- Description?: import("payload").PayloadComponent<import("payload").FieldDescriptionServerProps, import("payload").FieldDescriptionClientProps>;
68
- Diff?: import("payload").PayloadComponent<import("payload").FieldDiffServerProps, import("payload").FieldDiffClientProps>;
69
- Field?: import("payload").PayloadComponent<import("payload").FieldClientComponent | import("payload").FieldServerComponent>;
70
- Filter?: import("payload").PayloadComponent;
71
- };
72
- initCollapsed?: boolean;
73
- } & {
74
- className?: string;
75
- components?: {
76
- Cell?: import("payload").PayloadComponent<import("payload").DefaultServerCellComponentProps, import("payload").DefaultCellComponentProps>;
77
- Description?: import("payload").PayloadComponent<import("payload").FieldDescriptionServerProps, import("payload").FieldDescriptionClientProps>;
78
- Diff?: import("payload").PayloadComponent<import("payload").FieldDiffServerProps, import("payload").FieldDiffClientProps>;
79
- Field?: import("payload").PayloadComponent<import("payload").FieldClientComponent | import("payload").FieldServerComponent>;
80
- Filter?: import("payload").PayloadComponent;
81
- };
82
- condition?: import("payload").Condition;
83
- custom?: Record<string, any>;
84
- description?: import("payload").Description;
85
- disableBulkEdit?: boolean;
86
- disabled?: boolean;
87
- disableListColumn?: boolean;
88
- disableListFilter?: boolean;
89
- hidden?: boolean;
90
- position?: "sidebar";
91
- readOnly?: boolean;
92
- style?: import("react").CSSProperties;
93
- width?: import("react").CSSProperties["width"];
94
- };
95
- label: Required<import("payload").FieldBase["label"]>;
96
- } & Omit<import("payload").FieldBase, "validate" | "hooks" | "label" | "localized" | "name" | "virtual">;
97
- export declare const extendedDarkModeField: {
98
- fields: Field[];
99
- type: "collapsible";
100
- } & {
101
- admin?: {
102
- components?: {
103
- afterInput?: import("payload").CustomPreviewButton[];
104
- beforeInput?: import("payload").CustomPreviewButton[];
105
- Label?: import("payload").CustomPreviewButton<import("payload").CollapsibleFieldLabelClientComponent | import("payload").CollapsibleFieldLabelServerComponent>;
106
- } & {
107
- Cell?: import("payload").PayloadComponent<import("payload").DefaultServerCellComponentProps, import("payload").DefaultCellComponentProps>;
108
- Description?: import("payload").PayloadComponent<import("payload").FieldDescriptionServerProps, import("payload").FieldDescriptionClientProps>;
109
- Diff?: import("payload").PayloadComponent<import("payload").FieldDiffServerProps, import("payload").FieldDiffClientProps>;
110
- Field?: import("payload").PayloadComponent<import("payload").FieldClientComponent | import("payload").FieldServerComponent>;
111
- Filter?: import("payload").PayloadComponent;
112
- };
113
- initCollapsed?: boolean;
114
- } & {
115
- className?: string;
116
- components?: {
117
- Cell?: import("payload").PayloadComponent<import("payload").DefaultServerCellComponentProps, import("payload").DefaultCellComponentProps>;
118
- Description?: import("payload").PayloadComponent<import("payload").FieldDescriptionServerProps, import("payload").FieldDescriptionClientProps>;
119
- Diff?: import("payload").PayloadComponent<import("payload").FieldDiffServerProps, import("payload").FieldDiffClientProps>;
120
- Field?: import("payload").PayloadComponent<import("payload").FieldClientComponent | import("payload").FieldServerComponent>;
121
- Filter?: import("payload").PayloadComponent;
122
- };
123
- condition?: import("payload").Condition;
124
- custom?: Record<string, any>;
125
- description?: import("payload").Description;
126
- disableBulkEdit?: boolean;
127
- disabled?: boolean;
128
- disableListColumn?: boolean;
129
- disableListFilter?: boolean;
130
- hidden?: boolean;
131
- position?: "sidebar";
132
- readOnly?: boolean;
133
- style?: import("react").CSSProperties;
134
- width?: import("react").CSSProperties["width"];
135
- };
136
- label: Required<import("payload").FieldBase["label"]>;
137
- } & Omit<import("payload").FieldBase, "validate" | "hooks" | "label" | "localized" | "name" | "virtual">;
138
- export declare const chartColorsField: Field;
139
- //# sourceMappingURL=extendedThemeFields.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"extendedThemeFields.d.ts","sourceRoot":"","sources":["../../src/fields/extendedThemeFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAsEpC;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,EAgGlC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,EA0BnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,EA0B/B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,EAiBnC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,EAS3C,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,EAKrC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAkBzC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAoBlC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAoBjC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAoB/B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,KAoBnC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAoBrC,CAAA;AAID,eAAO,MAAM,sBAAsB;;;;;kBAOwhhB,CAAC;sBAA0B,CAAC;uBAA4C,CAAC;iBAAsC,CAAC;;;;;;;;qBAAsJ,CAAC;;;;gBAA9jgB,CAAC;uBAAmG,CAAC;gBAA0F,CAAC;iBAA6E,CAAC;kBAAoK,CAAC;;;;;;;;;;;;;;;;wGAP7nC,CAAA;AAC1D,eAAO,MAAM,qBAAqB;;;;;kBAMyhhB,CAAC;sBAA0B,CAAC;uBAA4C,CAAC;iBAAsC,CAAC;;;;;;;;qBAAsJ,CAAC;;;;gBAA9jgB,CAAC;uBAAmG,CAAC;gBAA0F,CAAC;iBAA6E,CAAC;kBAAoK,CAAC;;;;;;;;;;;;;;;;wGAN/nC,CAAA;AACxD,eAAO,MAAM,gBAAgB,EAIxB,KAAK,CAAA"}