@kilivi/payloadcms-theme-management 0.1.6 → 0.1.8

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 (89) hide show
  1. package/dist/components/ServerThemeInjector.d.ts +1 -1
  2. package/dist/components/ServerThemeInjector.d.ts.map +1 -1
  3. package/dist/components/{ServerThemeInjector.jsx → ServerThemeInjector.js} +47 -34
  4. package/dist/components/ServerThemeInjector.js.map +1 -0
  5. package/dist/components/ThemePreview.js +318 -0
  6. package/dist/components/ThemePreview.js.map +1 -0
  7. package/dist/components/typographyPreviewUtils.js +12 -17
  8. package/dist/components/typographyPreviewUtils.js.map +1 -1
  9. package/dist/constants/themeFonts.js +94 -24
  10. package/dist/constants/themeFonts.js.map +1 -1
  11. package/dist/fields/ColorPickerField.js +332 -0
  12. package/dist/fields/ColorPickerField.js.map +1 -0
  13. package/dist/fields/RadiusField.js +174 -0
  14. package/dist/fields/RadiusField.js.map +1 -0
  15. package/dist/fields/ThemeColorPickerField.js +163 -0
  16. package/dist/fields/ThemeColorPickerField.js.map +1 -0
  17. package/dist/fields/ThemePreviewField.js +558 -0
  18. package/dist/fields/ThemePreviewField.js.map +1 -0
  19. package/dist/fields/ThemeTokenSelectField.js +209 -0
  20. package/dist/fields/ThemeTokenSelectField.js.map +1 -0
  21. package/dist/fields/colorModeFields.js +167 -73
  22. package/dist/fields/colorModeFields.js.map +1 -1
  23. package/dist/fields/themeConfigurationField.d.ts +1 -1
  24. package/dist/fields/themeConfigurationField.d.ts.map +1 -1
  25. package/dist/fields/themeConfigurationField.js +224 -131
  26. package/dist/fields/themeConfigurationField.js.map +1 -1
  27. package/dist/index.d.ts +17 -16
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +52 -52
  30. package/dist/index.js.map +1 -1
  31. package/dist/payload-types.js +2 -2
  32. package/dist/payload-types.js.map +1 -1
  33. package/dist/plugin.d.ts +1 -2
  34. package/dist/plugin.d.ts.map +1 -1
  35. package/dist/plugin.js +2 -1
  36. package/dist/plugin.js.map +1 -1
  37. package/dist/presets.js +66 -65
  38. package/dist/presets.js.map +1 -1
  39. package/dist/providers/Theme/index.d.ts +1 -1
  40. package/dist/providers/Theme/index.d.ts.map +1 -1
  41. package/dist/providers/Theme/{index.jsx → index.js} +61 -31
  42. package/dist/providers/Theme/index.js.map +1 -0
  43. package/dist/providers/Theme/shared.d.ts +1 -1
  44. package/dist/providers/Theme/shared.d.ts.map +1 -1
  45. package/dist/providers/Theme/shared.js +34 -9
  46. package/dist/providers/Theme/shared.js.map +1 -1
  47. package/dist/providers/Theme/themeConfig.d.ts +1 -1
  48. package/dist/providers/Theme/themeConfig.d.ts.map +1 -1
  49. package/dist/providers/Theme/themeConfig.js +37 -36
  50. package/dist/providers/Theme/themeConfig.js.map +1 -1
  51. package/dist/providers/Theme/types.js +15 -13
  52. package/dist/providers/Theme/types.js.map +1 -1
  53. package/dist/server.d.ts +2 -2
  54. package/dist/server.d.ts.map +1 -1
  55. package/dist/server.js +3 -2
  56. package/dist/server.js.map +1 -1
  57. package/dist/types.d.ts +2 -2
  58. package/dist/types.d.ts.map +1 -1
  59. package/dist/types.js +2 -1
  60. package/dist/types.js.map +1 -1
  61. package/dist/utils/resolveThemeConfiguration.d.ts +3 -3
  62. package/dist/utils/resolveThemeConfiguration.d.ts.map +1 -1
  63. package/dist/utils/resolveThemeConfiguration.js +53 -34
  64. package/dist/utils/resolveThemeConfiguration.js.map +1 -1
  65. package/dist/utils/themeAssets.d.ts +1 -1
  66. package/dist/utils/themeAssets.d.ts.map +1 -1
  67. package/dist/utils/themeAssets.js +4 -4
  68. package/dist/utils/themeAssets.js.map +1 -1
  69. package/dist/utils/themeColors.js +95 -41
  70. package/dist/utils/themeColors.js.map +1 -1
  71. package/dist/utils/themeUtils.d.ts +2 -2
  72. package/dist/utils/themeUtils.d.ts.map +1 -1
  73. package/dist/utils/themeUtils.js +32 -47
  74. package/dist/utils/themeUtils.js.map +1 -1
  75. package/package.json +13 -5
  76. package/dist/components/ServerThemeInjector.jsx.map +0 -1
  77. package/dist/components/ThemePreview.jsx +0 -231
  78. package/dist/components/ThemePreview.jsx.map +0 -1
  79. package/dist/fields/ColorPickerField.jsx +0 -205
  80. package/dist/fields/ColorPickerField.jsx.map +0 -1
  81. package/dist/fields/RadiusField.jsx +0 -123
  82. package/dist/fields/RadiusField.jsx.map +0 -1
  83. package/dist/fields/ThemeColorPickerField.jsx +0 -110
  84. package/dist/fields/ThemeColorPickerField.jsx.map +0 -1
  85. package/dist/fields/ThemePreviewField.jsx +0 -420
  86. package/dist/fields/ThemePreviewField.jsx.map +0 -1
  87. package/dist/fields/ThemeTokenSelectField.jsx +0 -151
  88. package/dist/fields/ThemeTokenSelectField.jsx.map +0 -1
  89. package/dist/providers/Theme/index.jsx.map +0 -1
@@ -1,34 +1,103 @@
1
1
  // Theme font constants for the plugin
2
2
  export const BODY_FONT_OPTIONS = [
3
- { label: 'System', value: 'system-ui' },
4
- { label: 'Inter', value: 'Inter' },
5
- { label: 'Roboto', value: 'Roboto' },
6
- { label: 'Open Sans', value: 'Open Sans' },
7
- { label: 'Lato', value: 'Lato' },
8
- { label: 'Montserrat', value: 'Montserrat' },
9
- { label: 'Poppins', value: 'Poppins' },
3
+ {
4
+ label: 'System',
5
+ value: 'system-ui'
6
+ },
7
+ {
8
+ label: 'Inter',
9
+ value: 'Inter'
10
+ },
11
+ {
12
+ label: 'Roboto',
13
+ value: 'Roboto'
14
+ },
15
+ {
16
+ label: 'Open Sans',
17
+ value: 'Open Sans'
18
+ },
19
+ {
20
+ label: 'Lato',
21
+ value: 'Lato'
22
+ },
23
+ {
24
+ label: 'Montserrat',
25
+ value: 'Montserrat'
26
+ },
27
+ {
28
+ label: 'Poppins',
29
+ value: 'Poppins'
30
+ }
10
31
  ];
11
32
  export const HEADING_FONT_OPTIONS = [
12
- { label: 'System', value: 'system-ui' },
13
- { label: 'Inter', value: 'Inter' },
14
- { label: 'Playfair Display', value: 'Playfair Display' },
15
- { label: 'Merriweather', value: 'Merriweather' },
16
- { label: 'Montserrat', value: 'Montserrat' },
17
- { label: 'Raleway', value: 'Raleway' },
33
+ {
34
+ label: 'System',
35
+ value: 'system-ui'
36
+ },
37
+ {
38
+ label: 'Inter',
39
+ value: 'Inter'
40
+ },
41
+ {
42
+ label: 'Playfair Display',
43
+ value: 'Playfair Display'
44
+ },
45
+ {
46
+ label: 'Merriweather',
47
+ value: 'Merriweather'
48
+ },
49
+ {
50
+ label: 'Montserrat',
51
+ value: 'Montserrat'
52
+ },
53
+ {
54
+ label: 'Raleway',
55
+ value: 'Raleway'
56
+ }
18
57
  ];
19
58
  export const BASE_FONT_SIZE_OPTIONS = [
20
- { label: '14px', value: '14' },
21
- { label: '15px', value: '15' },
22
- { label: '16px', value: '16' },
23
- { label: '17px', value: '17' },
24
- { label: '18px', value: '18' },
59
+ {
60
+ label: '14px',
61
+ value: '14'
62
+ },
63
+ {
64
+ label: '15px',
65
+ value: '15'
66
+ },
67
+ {
68
+ label: '16px',
69
+ value: '16'
70
+ },
71
+ {
72
+ label: '17px',
73
+ value: '17'
74
+ },
75
+ {
76
+ label: '18px',
77
+ value: '18'
78
+ }
25
79
  ];
26
80
  export const LINE_HEIGHT_OPTIONS = [
27
- { label: '1.4', value: '1.4' },
28
- { label: '1.5', value: '1.5' },
29
- { label: '1.6', value: '1.6' },
30
- { label: '1.7', value: '1.7' },
31
- { label: '1.8', value: '1.8' },
81
+ {
82
+ label: '1.4',
83
+ value: '1.4'
84
+ },
85
+ {
86
+ label: '1.5',
87
+ value: '1.5'
88
+ },
89
+ {
90
+ label: '1.6',
91
+ value: '1.6'
92
+ },
93
+ {
94
+ label: '1.7',
95
+ value: '1.7'
96
+ },
97
+ {
98
+ label: '1.8',
99
+ value: '1.8'
100
+ }
32
101
  ];
33
102
  export const FONT_VALUE_TO_CSS = {
34
103
  'system-ui': 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',
@@ -40,6 +109,7 @@ export const FONT_VALUE_TO_CSS = {
40
109
  'Poppins': '"Poppins", sans-serif',
41
110
  'Playfair Display': '"Playfair Display", serif',
42
111
  'Merriweather': '"Merriweather", serif',
43
- 'Raleway': '"Raleway", sans-serif',
112
+ 'Raleway': '"Raleway", sans-serif'
44
113
  };
114
+
45
115
  //# sourceMappingURL=themeFonts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeFonts.js","sourceRoot":"","sources":["../../src/constants/themeFonts.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;IACvC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;IACpC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;IAC1C,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CAC9B,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE;IACvC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAE;IACxD,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE;IAChD,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;IAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;CAC9B,CAAC;AAEX,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;IAC9B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;CACtB,CAAC;AAEX,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9B,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9B,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9B,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAC9B,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;CACtB,CAAC;AAEX,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,WAAW,EAAE,sEAAsE;IACnF,OAAO,EAAE,qBAAqB;IAC9B,QAAQ,EAAE,sBAAsB;IAChC,WAAW,EAAE,yBAAyB;IACtC,MAAM,EAAE,oBAAoB;IAC5B,YAAY,EAAE,0BAA0B;IACxC,SAAS,EAAE,uBAAuB;IAClC,kBAAkB,EAAE,2BAA2B;IAC/C,cAAc,EAAE,uBAAuB;IACvC,SAAS,EAAE,uBAAuB;CACnC,CAAC"}
1
+ {"version":3,"sources":["../../src/constants/themeFonts.ts"],"sourcesContent":["// Theme font constants for the plugin\nexport const BODY_FONT_OPTIONS = [\n { label: 'System', value: 'system-ui' },\n { label: 'Inter', value: 'Inter' },\n { label: 'Roboto', value: 'Roboto' },\n { label: 'Open Sans', value: 'Open Sans' },\n { label: 'Lato', value: 'Lato' },\n { label: 'Montserrat', value: 'Montserrat' },\n { label: 'Poppins', value: 'Poppins' },\n] as const;\n\nexport const HEADING_FONT_OPTIONS = [\n { label: 'System', value: 'system-ui' },\n { label: 'Inter', value: 'Inter' },\n { label: 'Playfair Display', value: 'Playfair Display' },\n { label: 'Merriweather', value: 'Merriweather' },\n { label: 'Montserrat', value: 'Montserrat' },\n { label: 'Raleway', value: 'Raleway' },\n] as const;\n\nexport const BASE_FONT_SIZE_OPTIONS = [\n { label: '14px', value: '14' },\n { label: '15px', value: '15' },\n { label: '16px', value: '16' },\n { label: '17px', value: '17' },\n { label: '18px', value: '18' },\n] as const;\n\nexport const LINE_HEIGHT_OPTIONS = [\n { label: '1.4', value: '1.4' },\n { label: '1.5', value: '1.5' },\n { label: '1.6', value: '1.6' },\n { label: '1.7', value: '1.7' },\n { label: '1.8', value: '1.8' },\n] as const;\n\nexport const FONT_VALUE_TO_CSS: Record<string, string> = {\n 'system-ui': 'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif',\n 'Inter': '\"Inter\", sans-serif',\n 'Roboto': '\"Roboto\", sans-serif',\n 'Open Sans': '\"Open Sans\", sans-serif',\n 'Lato': '\"Lato\", sans-serif',\n 'Montserrat': '\"Montserrat\", sans-serif',\n 'Poppins': '\"Poppins\", sans-serif',\n 'Playfair Display': '\"Playfair Display\", serif',\n 'Merriweather': '\"Merriweather\", serif',\n 'Raleway': '\"Raleway\", sans-serif',\n};\n"],"names":["BODY_FONT_OPTIONS","label","value","HEADING_FONT_OPTIONS","BASE_FONT_SIZE_OPTIONS","LINE_HEIGHT_OPTIONS","FONT_VALUE_TO_CSS"],"mappings":"AAAA,sCAAsC;AACtC,OAAO,MAAMA,oBAAoB;IAC/B;QAAEC,OAAO;QAAUC,OAAO;IAAY;IACtC;QAAED,OAAO;QAASC,OAAO;IAAQ;IACjC;QAAED,OAAO;QAAUC,OAAO;IAAS;IACnC;QAAED,OAAO;QAAaC,OAAO;IAAY;IACzC;QAAED,OAAO;QAAQC,OAAO;IAAO;IAC/B;QAAED,OAAO;QAAcC,OAAO;IAAa;IAC3C;QAAED,OAAO;QAAWC,OAAO;IAAU;CACtC,CAAU;AAEX,OAAO,MAAMC,uBAAuB;IAClC;QAAEF,OAAO;QAAUC,OAAO;IAAY;IACtC;QAAED,OAAO;QAASC,OAAO;IAAQ;IACjC;QAAED,OAAO;QAAoBC,OAAO;IAAmB;IACvD;QAAED,OAAO;QAAgBC,OAAO;IAAe;IAC/C;QAAED,OAAO;QAAcC,OAAO;IAAa;IAC3C;QAAED,OAAO;QAAWC,OAAO;IAAU;CACtC,CAAU;AAEX,OAAO,MAAME,yBAAyB;IACpC;QAAEH,OAAO;QAAQC,OAAO;IAAK;IAC7B;QAAED,OAAO;QAAQC,OAAO;IAAK;IAC7B;QAAED,OAAO;QAAQC,OAAO;IAAK;IAC7B;QAAED,OAAO;QAAQC,OAAO;IAAK;IAC7B;QAAED,OAAO;QAAQC,OAAO;IAAK;CAC9B,CAAU;AAEX,OAAO,MAAMG,sBAAsB;IACjC;QAAEJ,OAAO;QAAOC,OAAO;IAAM;IAC7B;QAAED,OAAO;QAAOC,OAAO;IAAM;IAC7B;QAAED,OAAO;QAAOC,OAAO;IAAM;IAC7B;QAAED,OAAO;QAAOC,OAAO;IAAM;IAC7B;QAAED,OAAO;QAAOC,OAAO;IAAM;CAC9B,CAAU;AAEX,OAAO,MAAMI,oBAA4C;IACvD,aAAa;IACb,SAAS;IACT,UAAU;IACV,aAAa;IACb,QAAQ;IACR,cAAc;IACd,WAAW;IACX,oBAAoB;IACpB,gBAAgB;IAChB,WAAW;AACb,EAAE"}
@@ -0,0 +1,332 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useField } from '@payloadcms/ui';
4
+ import { useCallback, useEffect, useRef, useState } from 'react';
5
+ const colorPresets = {
6
+ 'Theme Colors': [
7
+ '#3b82f6',
8
+ '#1e40af',
9
+ '#b45309',
10
+ '#78716c',
11
+ '#8b5cf6',
12
+ '#f97316'
13
+ ],
14
+ 'Common Colors': [
15
+ '#ef4444',
16
+ '#10b981',
17
+ '#f59e0b',
18
+ '#06b6d4',
19
+ '#ec4899',
20
+ '#6b7280'
21
+ ],
22
+ 'Neutral Tones': [
23
+ '#000000',
24
+ '#1f2937',
25
+ '#6b7280',
26
+ '#d1d5db',
27
+ '#f3f4f6',
28
+ '#ffffff'
29
+ ]
30
+ };
31
+ function resolveLocalizedValue(value) {
32
+ if (typeof value === 'string') {
33
+ return value;
34
+ }
35
+ if (typeof value === 'object' && value !== null) {
36
+ const localized = value;
37
+ const fallback = localized.en ?? localized.cs ?? localized[''];
38
+ return typeof fallback === 'string' ? fallback : '';
39
+ }
40
+ return '';
41
+ }
42
+ export default function ColorPickerField(props) {
43
+ const { field, path } = props;
44
+ const { value = '#000000', setValue } = useField({
45
+ path
46
+ });
47
+ const [isPickerOpen, setIsPickerOpen] = useState(false);
48
+ const pickerRef = useRef(null);
49
+ const fieldLabel = resolveLocalizedValue(field.label);
50
+ const fieldDescription = resolveLocalizedValue(field.admin?.description);
51
+ const placeholder = resolveLocalizedValue(field.admin?.placeholder) || 'e.g., #3b82f6, hsl(...)';
52
+ const handleColorChange = useCallback((color)=>{
53
+ setValue(color);
54
+ }, [
55
+ setValue
56
+ ]);
57
+ const handleInputChange = useCallback((event)=>{
58
+ handleColorChange(event.target.value);
59
+ }, [
60
+ handleColorChange
61
+ ]);
62
+ const togglePicker = useCallback(()=>{
63
+ setIsPickerOpen((previous)=>!previous);
64
+ }, []);
65
+ useEffect(()=>{
66
+ if (!isPickerOpen) {
67
+ return;
68
+ }
69
+ function handleClickOutside(event) {
70
+ if (!pickerRef.current) {
71
+ return;
72
+ }
73
+ if (!pickerRef.current.contains(event.target)) {
74
+ setIsPickerOpen(false);
75
+ }
76
+ }
77
+ document.addEventListener('mousedown', handleClickOutside);
78
+ return ()=>{
79
+ document.removeEventListener('mousedown', handleClickOutside);
80
+ };
81
+ }, [
82
+ isPickerOpen
83
+ ]);
84
+ return /*#__PURE__*/ _jsxs("div", {
85
+ className: "field-type color-picker-field",
86
+ style: {
87
+ position: 'relative'
88
+ },
89
+ children: [
90
+ fieldLabel && /*#__PURE__*/ _jsxs("label", {
91
+ htmlFor: path,
92
+ className: "field-label",
93
+ style: {
94
+ display: 'block',
95
+ marginBottom: '8px',
96
+ fontSize: '13px',
97
+ fontWeight: 600
98
+ },
99
+ children: [
100
+ fieldLabel,
101
+ field.required && /*#__PURE__*/ _jsx("span", {
102
+ className: "required",
103
+ style: {
104
+ color: 'var(--theme-error-500)',
105
+ marginLeft: '4px'
106
+ },
107
+ children: "*"
108
+ })
109
+ ]
110
+ }),
111
+ fieldDescription && /*#__PURE__*/ _jsx("div", {
112
+ className: "field-description",
113
+ style: {
114
+ marginBottom: '8px',
115
+ fontSize: '13px',
116
+ color: 'var(--theme-elevation-500)',
117
+ lineHeight: 1.5
118
+ },
119
+ children: fieldDescription
120
+ }),
121
+ /*#__PURE__*/ _jsxs("div", {
122
+ className: "color-picker-input-group",
123
+ style: {
124
+ display: 'flex',
125
+ alignItems: 'center',
126
+ gap: '8px'
127
+ },
128
+ children: [
129
+ /*#__PURE__*/ _jsx("button", {
130
+ type: "button",
131
+ onClick: togglePicker,
132
+ className: "color-preview-button",
133
+ style: {
134
+ width: '40px',
135
+ height: '40px',
136
+ borderRadius: '6px',
137
+ border: '2px solid #e5e7eb',
138
+ backgroundColor: value || '#ffffff',
139
+ cursor: 'pointer',
140
+ position: 'relative',
141
+ display: 'flex',
142
+ alignItems: 'center',
143
+ justifyContent: 'center'
144
+ },
145
+ title: value ? `Current color: ${value}` : 'Select a color',
146
+ children: !value && /*#__PURE__*/ _jsx("span", {
147
+ style: {
148
+ fontSize: '20px',
149
+ color: '#9ca3af'
150
+ },
151
+ children: "?"
152
+ })
153
+ }),
154
+ /*#__PURE__*/ _jsx("input", {
155
+ id: path,
156
+ type: "text",
157
+ value: value || '',
158
+ onChange: handleInputChange,
159
+ placeholder: placeholder,
160
+ style: {
161
+ flex: 1,
162
+ padding: '8px 12px',
163
+ border: '1px solid var(--theme-elevation-150)',
164
+ borderRadius: '6px',
165
+ fontSize: '14px',
166
+ fontFamily: 'monospace',
167
+ backgroundColor: 'var(--theme-elevation-0)',
168
+ color: 'var(--theme-elevation-1000)'
169
+ }
170
+ }),
171
+ /*#__PURE__*/ _jsx("input", {
172
+ type: "color",
173
+ value: value?.startsWith('#') ? value : '#3b82f6',
174
+ onChange: handleInputChange,
175
+ title: "Pick a color",
176
+ style: {
177
+ width: '40px',
178
+ height: '40px',
179
+ border: 'none',
180
+ borderRadius: '6px',
181
+ cursor: 'pointer'
182
+ }
183
+ })
184
+ ]
185
+ }),
186
+ isPickerOpen && /*#__PURE__*/ _jsxs("div", {
187
+ ref: pickerRef,
188
+ className: "color-presets",
189
+ style: {
190
+ position: 'absolute',
191
+ top: '100%',
192
+ left: 0,
193
+ right: 0,
194
+ zIndex: 1000,
195
+ marginTop: '4px',
196
+ padding: '16px',
197
+ border: '1px solid var(--theme-elevation-150)',
198
+ borderRadius: '8px',
199
+ backgroundColor: 'var(--theme-elevation-0)',
200
+ boxShadow: '0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
201
+ maxHeight: '300px',
202
+ overflowY: 'auto'
203
+ },
204
+ children: [
205
+ /*#__PURE__*/ _jsx("div", {
206
+ style: {
207
+ marginBottom: '16px',
208
+ fontSize: '14px',
209
+ fontWeight: 600,
210
+ color: 'var(--theme-elevation-800)'
211
+ },
212
+ children: "🎨 Professional Color Picker"
213
+ }),
214
+ Object.entries(colorPresets).map(([groupName, colors])=>/*#__PURE__*/ _jsxs("div", {
215
+ style: {
216
+ marginBottom: '16px'
217
+ },
218
+ children: [
219
+ /*#__PURE__*/ _jsx("div", {
220
+ style: {
221
+ marginBottom: '8px',
222
+ fontSize: '12px',
223
+ fontWeight: 500,
224
+ color: 'var(--theme-elevation-600)',
225
+ textTransform: 'uppercase',
226
+ letterSpacing: '0.05em'
227
+ },
228
+ children: groupName
229
+ }),
230
+ /*#__PURE__*/ _jsx("div", {
231
+ style: {
232
+ display: 'grid',
233
+ gridTemplateColumns: 'repeat(6, 1fr)',
234
+ gap: '6px'
235
+ },
236
+ children: colors.map((color)=>/*#__PURE__*/ _jsx("button", {
237
+ type: "button",
238
+ onClick: ()=>handleColorChange(color),
239
+ style: {
240
+ width: '36px',
241
+ height: '36px',
242
+ borderRadius: '6px',
243
+ border: value === color ? '3px solid var(--theme-primary-500)' : '1px solid var(--theme-elevation-150)',
244
+ backgroundColor: color,
245
+ cursor: 'pointer',
246
+ transition: 'all 0.2s ease',
247
+ position: 'relative',
248
+ overflow: 'hidden',
249
+ boxShadow: value === color ? '0 0 0 2px var(--theme-primary-200)' : '0 1px 3px rgba(0, 0, 0, 0.1)'
250
+ },
251
+ title: `${color} - Click to select`,
252
+ onMouseEnter: (event)=>{
253
+ event.currentTarget.style.transform = 'scale(1.1)';
254
+ },
255
+ onMouseLeave: (event)=>{
256
+ event.currentTarget.style.transform = 'scale(1)';
257
+ },
258
+ children: color === '#ffffff' && /*#__PURE__*/ _jsx("div", {
259
+ style: {
260
+ position: 'absolute',
261
+ inset: 0,
262
+ border: '1px solid var(--theme-elevation-150)',
263
+ borderRadius: 'inherit'
264
+ }
265
+ })
266
+ }, color))
267
+ })
268
+ ]
269
+ }, groupName)),
270
+ /*#__PURE__*/ _jsxs("div", {
271
+ style: {
272
+ marginTop: '16px',
273
+ paddingTop: '16px',
274
+ borderTop: '1px solid var(--theme-elevation-100)'
275
+ },
276
+ children: [
277
+ /*#__PURE__*/ _jsx("div", {
278
+ style: {
279
+ marginBottom: '8px',
280
+ fontSize: '12px',
281
+ fontWeight: 500,
282
+ color: 'var(--theme-elevation-600)'
283
+ },
284
+ children: "CUSTOM COLOR"
285
+ }),
286
+ /*#__PURE__*/ _jsxs("div", {
287
+ style: {
288
+ display: 'flex',
289
+ gap: '8px',
290
+ alignItems: 'center'
291
+ },
292
+ children: [
293
+ /*#__PURE__*/ _jsx("input", {
294
+ type: "color",
295
+ value: value?.startsWith('#') ? value : '#3b82f6',
296
+ onChange: handleInputChange,
297
+ style: {
298
+ width: '36px',
299
+ height: '36px',
300
+ border: 'none',
301
+ borderRadius: '6px',
302
+ cursor: 'pointer'
303
+ }
304
+ }),
305
+ /*#__PURE__*/ _jsxs("div", {
306
+ style: {
307
+ fontSize: '11px',
308
+ color: '#9ca3af',
309
+ lineHeight: 1.3
310
+ },
311
+ children: [
312
+ /*#__PURE__*/ _jsx("div", {
313
+ children: /*#__PURE__*/ _jsx("strong", {
314
+ children: "Formats:"
315
+ })
316
+ }),
317
+ /*#__PURE__*/ _jsx("div", {
318
+ children: "Hex, RGB, HSL, CSS vars"
319
+ })
320
+ ]
321
+ })
322
+ ]
323
+ })
324
+ ]
325
+ })
326
+ ]
327
+ })
328
+ ]
329
+ });
330
+ }
331
+
332
+ //# sourceMappingURL=ColorPickerField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/fields/ColorPickerField.tsx"],"sourcesContent":["'use client'\n\nimport { useField } from '@payloadcms/ui'\nimport type { TextFieldClientProps } from 'payload'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nconst colorPresets: Record<string, string[]> = {\n 'Theme Colors': ['#3b82f6', '#1e40af', '#b45309', '#78716c', '#8b5cf6', '#f97316'],\n 'Common Colors': ['#ef4444', '#10b981', '#f59e0b', '#06b6d4', '#ec4899', '#6b7280'],\n 'Neutral Tones': ['#000000', '#1f2937', '#6b7280', '#d1d5db', '#f3f4f6', '#ffffff'],\n}\n\nfunction resolveLocalizedValue(value: unknown): string {\n if (typeof value === 'string') {\n return value\n }\n\n if (typeof value === 'object' && value !== null) {\n const localized = value as Record<string, unknown>\n const fallback = localized.en ?? localized.cs ?? localized['']\n return typeof fallback === 'string' ? fallback : ''\n }\n\n return ''\n}\n\nexport default function ColorPickerField(props: TextFieldClientProps) {\n const { field, path } = props\n const { value = '#000000', setValue } = useField<string>({ path })\n const [isPickerOpen, setIsPickerOpen] = useState(false)\n const pickerRef = useRef<HTMLDivElement>(null)\n\n const fieldLabel = resolveLocalizedValue(field.label)\n const fieldDescription = resolveLocalizedValue(field.admin?.description)\n const placeholder = resolveLocalizedValue(field.admin?.placeholder) || 'e.g., #3b82f6, hsl(...)'\n\n const handleColorChange = useCallback(\n (color: string) => {\n setValue(color)\n },\n [setValue],\n )\n\n const handleInputChange = useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n handleColorChange(event.target.value)\n },\n [handleColorChange],\n )\n\n const togglePicker = useCallback(() => {\n setIsPickerOpen((previous) => !previous)\n }, [])\n\n useEffect(() => {\n if (!isPickerOpen) {\n return\n }\n\n function handleClickOutside(event: MouseEvent) {\n if (!pickerRef.current) {\n return\n }\n\n if (!pickerRef.current.contains(event.target as Node)) {\n setIsPickerOpen(false)\n }\n }\n\n document.addEventListener('mousedown', handleClickOutside)\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside)\n }\n }, [isPickerOpen])\n\n return (\n <div className=\"field-type color-picker-field\" style={{ position: 'relative' }}>\n {fieldLabel && (\n <label\n htmlFor={path}\n className=\"field-label\"\n style={{ display: 'block', marginBottom: '8px', fontSize: '13px', fontWeight: 600 }}\n >\n {fieldLabel}\n {field.required && (\n <span\n className=\"required\"\n style={{ color: 'var(--theme-error-500)', marginLeft: '4px' }}\n >\n *\n </span>\n )}\n </label>\n )}\n\n {fieldDescription && (\n <div\n className=\"field-description\"\n style={{\n marginBottom: '8px',\n fontSize: '13px',\n color: 'var(--theme-elevation-500)',\n lineHeight: 1.5,\n }}\n >\n {fieldDescription}\n </div>\n )}\n\n <div\n className=\"color-picker-input-group\"\n style={{ display: 'flex', alignItems: 'center', gap: '8px' }}\n >\n <button\n type=\"button\"\n onClick={togglePicker}\n className=\"color-preview-button\"\n style={{\n width: '40px',\n height: '40px',\n borderRadius: '6px',\n border: '2px solid #e5e7eb',\n backgroundColor: value || '#ffffff',\n cursor: 'pointer',\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n }}\n title={value ? `Current color: ${value}` : 'Select a color'}\n >\n {!value && <span style={{ fontSize: '20px', color: '#9ca3af' }}>?</span>}\n </button>\n\n <input\n id={path}\n type=\"text\"\n value={value || ''}\n onChange={handleInputChange}\n placeholder={placeholder}\n style={{\n flex: 1,\n padding: '8px 12px',\n border: '1px solid var(--theme-elevation-150)',\n borderRadius: '6px',\n fontSize: '14px',\n fontFamily: 'monospace',\n backgroundColor: 'var(--theme-elevation-0)',\n color: 'var(--theme-elevation-1000)',\n }}\n />\n\n <input\n type=\"color\"\n value={value?.startsWith('#') ? value : '#3b82f6'}\n onChange={handleInputChange}\n title=\"Pick a color\"\n style={{\n width: '40px',\n height: '40px',\n border: 'none',\n borderRadius: '6px',\n cursor: 'pointer',\n }}\n />\n </div>\n\n {isPickerOpen && (\n <div\n ref={pickerRef}\n className=\"color-presets\"\n style={{\n position: 'absolute',\n top: '100%',\n left: 0,\n right: 0,\n zIndex: 1000,\n marginTop: '4px',\n padding: '16px',\n border: '1px solid var(--theme-elevation-150)',\n borderRadius: '8px',\n backgroundColor: 'var(--theme-elevation-0)',\n boxShadow: '0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',\n maxHeight: '300px',\n overflowY: 'auto',\n }}\n >\n <div\n style={{\n marginBottom: '16px',\n fontSize: '14px',\n fontWeight: 600,\n color: 'var(--theme-elevation-800)',\n }}\n >\n 🎨 Professional Color Picker\n </div>\n\n {Object.entries(colorPresets).map(([groupName, colors]) => (\n <div key={groupName} style={{ marginBottom: '16px' }}>\n <div\n style={{\n marginBottom: '8px',\n fontSize: '12px',\n fontWeight: 500,\n color: 'var(--theme-elevation-600)',\n textTransform: 'uppercase',\n letterSpacing: '0.05em',\n }}\n >\n {groupName}\n </div>\n <div style={{ display: 'grid', gridTemplateColumns: 'repeat(6, 1fr)', gap: '6px' }}>\n {colors.map((color) => (\n <button\n key={color}\n type=\"button\"\n onClick={() => handleColorChange(color)}\n style={{\n width: '36px',\n height: '36px',\n borderRadius: '6px',\n border:\n value === color\n ? '3px solid var(--theme-primary-500)'\n : '1px solid var(--theme-elevation-150)',\n backgroundColor: color,\n cursor: 'pointer',\n transition: 'all 0.2s ease',\n position: 'relative',\n overflow: 'hidden',\n boxShadow:\n value === color\n ? '0 0 0 2px var(--theme-primary-200)'\n : '0 1px 3px rgba(0, 0, 0, 0.1)',\n }}\n title={`${color} - Click to select`}\n onMouseEnter={(event) => {\n event.currentTarget.style.transform = 'scale(1.1)'\n }}\n onMouseLeave={(event) => {\n event.currentTarget.style.transform = 'scale(1)'\n }}\n >\n {color === '#ffffff' && (\n <div\n style={{\n position: 'absolute',\n inset: 0,\n border: '1px solid var(--theme-elevation-150)',\n borderRadius: 'inherit',\n }}\n />\n )}\n </button>\n ))}\n </div>\n </div>\n ))}\n\n <div\n style={{\n marginTop: '16px',\n paddingTop: '16px',\n borderTop: '1px solid var(--theme-elevation-100)',\n }}\n >\n <div\n style={{\n marginBottom: '8px',\n fontSize: '12px',\n fontWeight: 500,\n color: 'var(--theme-elevation-600)',\n }}\n >\n CUSTOM COLOR\n </div>\n <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>\n <input\n type=\"color\"\n value={value?.startsWith('#') ? value : '#3b82f6'}\n onChange={handleInputChange}\n style={{\n width: '36px',\n height: '36px',\n border: 'none',\n borderRadius: '6px',\n cursor: 'pointer',\n }}\n />\n <div style={{ fontSize: '11px', color: '#9ca3af', lineHeight: 1.3 }}>\n <div>\n <strong>Formats:</strong>\n </div>\n <div>Hex, RGB, HSL, CSS vars</div>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n )\n}\n"],"names":["useField","useCallback","useEffect","useRef","useState","colorPresets","resolveLocalizedValue","value","localized","fallback","en","cs","ColorPickerField","props","field","path","setValue","isPickerOpen","setIsPickerOpen","pickerRef","fieldLabel","label","fieldDescription","admin","description","placeholder","handleColorChange","color","handleInputChange","event","target","togglePicker","previous","handleClickOutside","current","contains","document","addEventListener","removeEventListener","div","className","style","position","htmlFor","display","marginBottom","fontSize","fontWeight","required","span","marginLeft","lineHeight","alignItems","gap","button","type","onClick","width","height","borderRadius","border","backgroundColor","cursor","justifyContent","title","input","id","onChange","flex","padding","fontFamily","startsWith","ref","top","left","right","zIndex","marginTop","boxShadow","maxHeight","overflowY","Object","entries","map","groupName","colors","textTransform","letterSpacing","gridTemplateColumns","transition","overflow","onMouseEnter","currentTarget","transform","onMouseLeave","inset","paddingTop","borderTop","strong"],"mappings":"AAAA;;AAEA,SAASA,QAAQ,QAAQ,iBAAgB;AAEzC,SAASC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,QAAO;AAEhE,MAAMC,eAAyC;IAC7C,gBAAgB;QAAC;QAAW;QAAW;QAAW;QAAW;QAAW;KAAU;IAClF,iBAAiB;QAAC;QAAW;QAAW;QAAW;QAAW;QAAW;KAAU;IACnF,iBAAiB;QAAC;QAAW;QAAW;QAAW;QAAW;QAAW;KAAU;AACrF;AAEA,SAASC,sBAAsBC,KAAc;IAC3C,IAAI,OAAOA,UAAU,UAAU;QAC7B,OAAOA;IACT;IAEA,IAAI,OAAOA,UAAU,YAAYA,UAAU,MAAM;QAC/C,MAAMC,YAAYD;QAClB,MAAME,WAAWD,UAAUE,EAAE,IAAIF,UAAUG,EAAE,IAAIH,SAAS,CAAC,GAAG;QAC9D,OAAO,OAAOC,aAAa,WAAWA,WAAW;IACnD;IAEA,OAAO;AACT;AAEA,eAAe,SAASG,iBAAiBC,KAA2B;IAClE,MAAM,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGF;IACxB,MAAM,EAAEN,QAAQ,SAAS,EAAES,QAAQ,EAAE,GAAGhB,SAAiB;QAAEe;IAAK;IAChE,MAAM,CAACE,cAAcC,gBAAgB,GAAGd,SAAS;IACjD,MAAMe,YAAYhB,OAA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