@dashadmin/dash-components 1.3.72 → 1.3.74-srcfree.1

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 (60) hide show
  1. package/package.json +24 -21
  2. package/src/components/AuditLog/AuditLog.tsx +0 -490
  3. package/src/components/AuditLog/index.ts +0 -2
  4. package/src/components/AutoCompleteArrayInput/AutoCompleteCheckBoxInput.tsx +0 -917
  5. package/src/components/AutoCompleteArrayInput/AutocompleteCheckBoxArrayInput.tsx +0 -39
  6. package/src/components/AutoCompleteArrayInputAutoSearch/AutoCompleteCheckBoxInput.tsx +0 -916
  7. package/src/components/AutoCompleteArrayInputAutoSearch/AutocompleteCheckBoxArrayAutoSearch.tsx.wip +0 -42
  8. package/src/components/AutoCompleteArrayInputAutoSearch/AutocompleteCheckBoxArrayInput.tsx +0 -44
  9. package/src/components/Json/Json.tsx +0 -312
  10. package/src/components/JsonColorSelector/JsonColorSelector.tsx +0 -1443
  11. package/src/components/JsonColorSelector/JsonColorSelector.tsx.bkup +0 -746
  12. package/src/components/JsonColorSelector/JsonColorSelectorEnhanced.tsx +0 -1135
  13. package/src/components/JsonColorSelector/JsonCssVarValues.tsx +0 -867
  14. package/src/components/JsonColorSelector/components/BasicColorSelector.tsx +0 -333
  15. package/src/components/JsonColorSelector/components/ColorEditDialog.tsx +0 -495
  16. package/src/components/JsonColorSelector/components/ColorPaletteItem.tsx +0 -80
  17. package/src/components/JsonColorSelector/components/ImageColorExtractor.tsx +0 -420
  18. package/src/components/JsonColorSelector/helpers/functions.tsx +0 -123
  19. package/src/components/JsonColorSelector/helpers/paletteDerivation.ts +0 -367
  20. package/src/components/JsonColorSelector/interfaces/interfaces.tsx +0 -22
  21. package/src/components/JsonColorSelector/useAsyncColorThief.tsx +0 -97
  22. package/src/components/ListActive/ListActive.tsx +0 -106
  23. package/src/components/ListActive/ListBoolean.tsx +0 -96
  24. package/src/components/NotificationPreferences/NotificationPreferences.tsx +0 -480
  25. package/src/components/NotificationPreferences/index.tsx +0 -2
  26. package/src/components/SearchableSelects/RASearchableSelect.tsx +0 -303
  27. package/src/components/SearchableSelects/RASearchableSelectCheckboxes.tsx +0 -617
  28. package/src/components/SearchableSelects/RASearchableSelectChips.tsx +0 -561
  29. package/src/components/SearchableSelects/RASearchableSelectChipsRecordContext.tsx +0 -366
  30. package/src/components/SearchableSelects/SearchableSelect.tsx +0 -323
  31. package/src/components/SearchableSelects/SearchableSelectCheckboxes.tsx +0 -358
  32. package/src/components/SortableDataGrid/README.md +0 -1
  33. package/src/components/SortableDataGrid/SortableDataGrid.tsx +0 -56
  34. package/src/components/SortableDataGrid/SortableDataGridBody.tsx +0 -175
  35. package/src/components/SortableDataGrid/SortableDataGridHeader.tsx +0 -171
  36. package/src/components/SortableDataGrid/SortableDataGridRow.tsx +0 -247
  37. package/src/components/Upload/SingleImageUploader.tsx +0 -55
  38. package/src/components/custom/PackageCopyMethod.tsx +0 -109
  39. package/src/components/custom/PackageRadioButtonGroup.tsx +0 -49
  40. package/src/components/dialog/Basic.tsx +0 -11
  41. package/src/components/dialog/Correct.tsx +0 -16
  42. package/src/components/dialog/Error.tsx +0 -15
  43. package/src/components/dialog/Info.tsx +0 -15
  44. package/src/components/dialog/InfoV2.tsx +0 -35
  45. package/src/components/dialog/NotFound.tsx +0 -18
  46. package/src/components/dialog/QuickSearch.tsx +0 -115
  47. package/src/components/notifications/NotificationsCenter.tsx +0 -743
  48. package/src/components/notifications/index.ts +0 -42
  49. package/src/components/tables/PaginationComponent.tsx +0 -17
  50. package/src/components/theme/AppLoadingFallback.tsx +0 -42
  51. package/src/components/theme/ErrorBoundary.tsx +0 -57
  52. package/src/components/theme/InitialLoader.tsx +0 -16
  53. package/src/components/theme/NotFound.tsx +0 -124
  54. package/src/components/theme/NotResults.tsx +0 -56
  55. package/src/hooks/useDraggable.ts +0 -11
  56. package/src/hooks/useNotifications.ts +0 -14
  57. package/src/hooks/useQuickSearch.tsx +0 -29
  58. package/src/index.tsx +0 -77
  59. package/src/styles/index.less +0 -0
  60. package/src/utils/setNativeValue.tsx +0 -23
@@ -1,495 +0,0 @@
1
- import {
2
- Box,
3
- Button,
4
- TextField,
5
- Typography,
6
- Drawer,
7
- InputAdornment,
8
- FormControl,
9
- InputLabel,
10
- Select,
11
- MenuItem,
12
- Tabs,
13
- Tab,
14
- Avatar,
15
- IconButton,
16
- } from '@mui/material';
17
- import DeleteIcon from '@mui/icons-material/Delete';
18
- import CloseIcon from '@mui/icons-material/Close';
19
- import { ChromePicker } from 'react-color';
20
- import { useState, useEffect, useRef, useMemo } from 'react';
21
- import { ColorFormat, ColorFormatType, KeyValuePair } from '../interfaces/interfaces';
22
- import { convertColor, getContrastColor, rgbArrayToHex } from '../helpers/functions';
23
-
24
-
25
- // Color edit drawer component (right-side panel)
26
- const ColorEditDialog: React.FC<{
27
- open: boolean;
28
- pair: KeyValuePair | null;
29
- onClose: () => void;
30
- onSave: (pair: KeyValuePair) => void;
31
- onDelete: (id: string) => void;
32
- existingKeys: string[];
33
- updateSingleDomColor: (key: string, color: string) => void;
34
- extractedColors?: number[][]; // Add this prop
35
- }> = ({ open, pair, onClose, onSave, onDelete, existingKeys, updateSingleDomColor, extractedColors = [] }) => {
36
- const [editedPair, setEditedPair] = useState<KeyValuePair | null>(null);
37
- const [colorFormat, setColorFormat] = useState<ColorFormatType>('hex');
38
- const [keyError, setKeyError] = useState<string>('');
39
- const [tabValue, setTabValue] = useState(0);
40
- const lastUpdateRef = useRef<number>(0); // Ref for throttling numeric updates
41
-
42
- // Memoize styles to prevent unnecessary re-renders of ChromePicker
43
- const pickerStyles = useMemo(() => ({
44
- default: {
45
- picker: {
46
- width: '100%',
47
- boxShadow: 'none',
48
- }
49
- }
50
- }), []);
51
- useEffect(() => {
52
- if (pair) {
53
- setEditedPair({ ...pair });
54
- // Detect color format - improved detection
55
- const value = pair.value.toLowerCase().trim();
56
- if (value.startsWith('rgba(')) {
57
- setColorFormat('rgba');
58
- } else if (value.startsWith('rgb(')) {
59
- setColorFormat('rgb');
60
- } else if (value.startsWith('hsla(')) {
61
- setColorFormat('hsla');
62
- } else if (value.startsWith('hsl(')) {
63
- setColorFormat('hsl');
64
- } else if (value.startsWith('#') && value.length === 9) {
65
- // 8-digit hex with alpha
66
- setColorFormat('rgba'); // Treat as rgba for editing
67
- } else {
68
- setColorFormat('hex');
69
- }
70
- }
71
- setKeyError('');
72
- }, [pair]);
73
-
74
- const handleKeyChange = (newKey: string) => {
75
- if (!editedPair) return;
76
-
77
- const isDuplicate = existingKeys.some(key => key === newKey && newKey !== pair?.key);
78
- setKeyError(isDuplicate ? 'Key already exists' : '');
79
-
80
- setEditedPair({ ...editedPair, key: newKey });
81
- };
82
- // Add this helper function to parse color strings into ChromePicker-compatible format
83
- const parseColorForPicker = (colorString: string): any => {
84
- const trimmed = colorString.toLowerCase().trim();
85
-
86
- if (trimmed.startsWith('rgba(')) {
87
- const match = trimmed.match(/rgba?\(([^)]+)\)/);
88
- if (match) {
89
- const values = match[1].split(',').map(v => parseFloat(v.trim()));
90
- const [r, g, b, a = 1] = values;
91
- return {
92
- r: Math.round(r),
93
- g: Math.round(g),
94
- b: Math.round(b),
95
- a: a
96
- };
97
- }
98
- } else if (trimmed.startsWith('rgb(')) {
99
- const match = trimmed.match(/rgb\(([^)]+)\)/);
100
- if (match) {
101
- const values = match[1].split(',').map(v => parseFloat(v.trim()));
102
- const [r, g, b] = values;
103
- return {
104
- r: Math.round(r),
105
- g: Math.round(g),
106
- b: Math.round(b),
107
- a: 1
108
- };
109
- }
110
- } else if (trimmed.startsWith('hsla(')) {
111
- // For HSLA, convert to RGBA first or return the string
112
- return colorString;
113
- } else if (trimmed.startsWith('hsl(')) {
114
- // For HSL, convert to RGB first or return the string
115
- return colorString;
116
- } else if (trimmed.startsWith('#')) {
117
- // Hex color
118
- const hex = trimmed.replace('#', '');
119
- if (hex.length === 8) {
120
- // RGBA hex
121
- const r = parseInt(hex.substr(0, 2), 16);
122
- const g = parseInt(hex.substr(2, 2), 16);
123
- const b = parseInt(hex.substr(4, 2), 16);
124
- const a = parseInt(hex.substr(6, 2), 16) / 255;
125
- return { r, g, b, a };
126
- } else if (hex.length === 6) {
127
- // RGB hex
128
- const r = parseInt(hex.substr(0, 2), 16);
129
- const g = parseInt(hex.substr(2, 2), 16);
130
- const b = parseInt(hex.substr(4, 2), 16);
131
- return { r, g, b, a: 1 };
132
- }
133
- }
134
-
135
- // Fallback
136
- return colorString;
137
- };
138
-
139
- // Update the handleColorChange function in ColorEditDialog
140
- const handleColorChange = (color: any) => {
141
- if (!editedPair) return;
142
-
143
- // The color object from ChromePicker already has the correct structure
144
- // color.rgb = { r, g, b, a }
145
- // color.hsl = { h, s, l, a }
146
- // color.hex = "#rrggbb"
147
-
148
- // Create a proper ColorFormat object with preserved alpha
149
- const colorFormatObj: ColorFormat = {
150
- hex: color.hex,
151
- rgb: {
152
- r: Math.round(color.rgb.r),
153
- g: Math.round(color.rgb.g),
154
- b: Math.round(color.rgb.b),
155
- a: color.rgb.a !== undefined ? color.rgb.a : 1
156
- },
157
- hsl: {
158
- h: Math.round(color.hsl.h || 0),
159
- s: color.hsl.s || 0,
160
- l: color.hsl.l || 0,
161
- a: color.hsl.a !== undefined ? color.hsl.a : (color.rgb.a !== undefined ? color.rgb.a : 1)
162
- }
163
- };
164
-
165
- // Convert to the selected format type
166
- const newValue = convertColor(colorFormatObj, colorFormat);
167
- setEditedPair({ ...editedPair, value: newValue });
168
-
169
- // Throttle DOM updates to prevent layout thrashing (max 60fps)
170
- const now = Date.now();
171
- if (now - lastUpdateRef.current >= 16) {
172
- updateSingleDomColor(editedPair.key, newValue);
173
- lastUpdateRef.current = now;
174
- }
175
- };
176
-
177
-
178
- const handleExtractedColorSelect = (colorRgb: number[]) => {
179
- if (!editedPair) return;
180
-
181
- const hexColor = rgbArrayToHex(colorRgb);
182
- setEditedPair({ ...editedPair, value: hexColor });
183
- updateSingleDomColor(editedPair.key, hexColor);
184
- };
185
-
186
- const handleSave = () => {
187
- if (!editedPair || keyError || !editedPair.key.trim()) return;
188
- onSave(editedPair);
189
- onClose();
190
- };
191
-
192
- const handleDelete = () => {
193
- if (!editedPair) return;
194
- onDelete(editedPair.id);
195
- onClose();
196
- };
197
-
198
- if (!editedPair) return null;
199
-
200
- return (
201
- <Drawer
202
- anchor="right"
203
- open={open}
204
- onClose={onClose}
205
- slotProps={{
206
- backdrop: { invisible: true },
207
-
208
- paper: {
209
- sx: {
210
- width: { xs: '100%', sm: 460 },
211
- maxWidth: '100vw',
212
- display: 'flex',
213
- flexDirection: 'column',
214
- }
215
- }
216
- }}>
217
- {/* Drawer Header */}
218
- <Box sx={{
219
- display: 'flex',
220
- alignItems: 'center',
221
- justifyContent: 'space-between',
222
- px: 2,
223
- py: 1.5,
224
- borderBottom: '1px solid',
225
- borderColor: 'divider',
226
- flexShrink: 0,
227
- }}>
228
- <Typography variant="h6" sx={{ fontWeight: 600 }}>
229
- {pair?.key ? `Edit: ${pair.key}` : 'Add New Color'}
230
- </Typography>
231
- <IconButton onClick={onClose} size="small">
232
- <CloseIcon />
233
- </IconButton>
234
- </Box>
235
-
236
- {/* Drawer Content - Scrollable */}
237
- <Box sx={{
238
- flex: 1,
239
- overflowY: 'auto',
240
- px: 2,
241
- py: 2,
242
- display: 'flex',
243
- flexDirection: 'column',
244
- gap: 3,
245
- }}>
246
- {/* Color Name */}
247
- <TextField
248
- fullWidth
249
- label="Color Name"
250
- value={editedPair.key}
251
- onChange={(e) => handleKeyChange(e.target.value)}
252
- error={!!keyError}
253
- helperText={keyError}
254
- placeholder="e.g., primary-color--light, background-dark--dark"
255
- size="small"
256
- />
257
-
258
- {/* Color Format Selector */}
259
- <FormControl fullWidth size="small">
260
- <InputLabel>Color Format</InputLabel>
261
- <Select
262
- value={colorFormat}
263
- label="Color Format"
264
- onChange={(e) => setColorFormat(e.target.value as ColorFormatType)}
265
- >
266
- <MenuItem value="hex">HEX</MenuItem>
267
- <MenuItem value="rgb">RGB</MenuItem>
268
- <MenuItem value="rgba">RGBA (with alpha)</MenuItem>
269
- <MenuItem value="hsl">HSL</MenuItem>
270
- <MenuItem value="hsla">HSLA (with alpha)</MenuItem>
271
- </Select>
272
- </FormControl>
273
-
274
- {/* Color Picker */}
275
- <Box>
276
- <Typography variant="subtitle2" gutterBottom>
277
- Color Picker
278
- </Typography>
279
-
280
- {/* Color Picker Tabs */}
281
- <Box>
282
- <Tabs value={tabValue} onChange={(_, newValue) => setTabValue(newValue)} variant="fullWidth">
283
- <Tab label="Picker" />
284
- <Tab label="Manual" />
285
- </Tabs>
286
-
287
- {tabValue === 0 && (
288
- <Box sx={{ mt: 2, display: 'flex', justifyContent: 'center' }}>
289
- <ChromePicker
290
- color={editedPair.value}
291
- onChange={handleColorChange}
292
- disableAlpha={false}
293
- styles={pickerStyles}
294
- />
295
- </Box>
296
- )}
297
-
298
- {tabValue === 1 && (
299
- <Box sx={{ mt: 2 }}>
300
- <TextField
301
- fullWidth
302
- size="small"
303
- label={`Color Value (${colorFormat.toUpperCase()})`}
304
- value={editedPair.value}
305
- onChange={(e) => {
306
- const newValue = e.target.value;
307
- setEditedPair({ ...editedPair, value: newValue });
308
- // Also update the DOM color for preview
309
- updateSingleDomColor(editedPair.key, newValue);
310
- }}
311
- placeholder={
312
- colorFormat === 'hex' ? '#ff0000' :
313
- colorFormat === 'rgb' ? 'rgb(255, 0, 0)' :
314
- colorFormat === 'rgba' ? 'rgba(255, 0, 0, 0.5)' :
315
- colorFormat === 'hsl' ? 'hsl(0, 100%, 50%)' :
316
- 'hsla(0, 100%, 50%, 0.5)'
317
- }
318
- helperText={
319
- colorFormat === 'rgba' ? 'Alpha value should be between 0 and 1 (e.g., 0.1, 0.5, 1)' :
320
- colorFormat === 'hsla' ? 'Alpha value should be between 0 and 1 (e.g., 0.1, 0.5, 1)' :
321
- undefined
322
- }
323
- slotProps={{
324
- input: {
325
- startAdornment: (
326
- <InputAdornment position="start">
327
- <Box
328
- sx={{
329
- width: 20,
330
- height: 20,
331
- backgroundColor: editedPair.value,
332
- border: '1px solid #ccc',
333
- borderRadius: 1,
334
- // Add a checkerboard pattern background for transparency preview
335
- backgroundImage: colorFormat === 'rgba' || colorFormat === 'hsla' ?
336
- 'linear-gradient(45deg, #ccc 25%, transparent 25%), linear-gradient(-45deg, #ccc 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #ccc 75%), linear-gradient(-45deg, transparent 75%, #ccc 75%)' :
337
- 'none',
338
- backgroundSize: '4px 4px',
339
- backgroundPosition: '0 0, 0 2px, 2px -2px, -2px 0px',
340
- }}
341
- />
342
- </InputAdornment>
343
- ),
344
- }
345
- }}
346
- />
347
- </Box>
348
- )}
349
- </Box>
350
- </Box>
351
-
352
- {/* Extracted Colors */}
353
- {extractedColors.length > 0 && (
354
- <Box>
355
- <Typography variant="subtitle2" gutterBottom>
356
- Extracted Colors
357
- </Typography>
358
- <Box sx={{
359
- display: 'flex',
360
- flexWrap: 'wrap',
361
- gap: 1,
362
- p: 2,
363
- border: '1px solid',
364
- borderColor: 'divider',
365
- borderRadius: 1,
366
- backgroundColor: 'action.hover',
367
- }}>
368
- {extractedColors.map((color, index) => {
369
- const hexColor = rgbArrayToHex(color);
370
- const isSelected = editedPair.value === hexColor;
371
-
372
- return (
373
- <Avatar
374
- key={index}
375
- sx={{
376
- width: 36,
377
- height: 36,
378
- backgroundColor: hexColor,
379
- border: isSelected ? '3px solid #1976d2' : '2px solid #ccc',
380
- cursor: 'pointer',
381
- transition: 'all 0.2s',
382
- '&:hover': {
383
- transform: 'scale(1.1)',
384
- boxShadow: 2,
385
- },
386
- color: getContrastColor(hexColor),
387
- fontWeight: 'bold',
388
- fontSize: '0.7rem',
389
- }}
390
- onClick={() => handleExtractedColorSelect(color)}
391
- title={`Use extracted color: ${hexColor}`}
392
- >
393
- {index + 1}
394
- </Avatar>
395
- );
396
- })}
397
- </Box>
398
- <Typography variant="caption" color="textSecondary" sx={{ mt: 1, display: 'block' }}>
399
- Click any color to use it
400
- </Typography>
401
- </Box>
402
- )}
403
-
404
- {/* Color Preview */}
405
- <Box>
406
- <Typography variant="subtitle2" gutterBottom>
407
- Preview
408
- </Typography>
409
- <Box
410
- sx={{
411
- width: '100%',
412
- height: 80,
413
- backgroundColor: editedPair.value,
414
- border: '1px solid #ccc',
415
- borderRadius: 1,
416
- display: 'flex',
417
- alignItems: 'center',
418
- justifyContent: 'center',
419
- position: 'relative',
420
- // Add checkerboard background for alpha preview
421
- backgroundImage: (editedPair.value.includes('rgba') || editedPair.value.includes('hsla')) ?
422
- 'linear-gradient(45deg, #f0f0f0 25%, transparent 25%), linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f0f0 75%), linear-gradient(-45deg, transparent 75%, #f0f0f0 75%)' :
423
- 'none',
424
- backgroundSize: '10px 10px',
425
- backgroundPosition: '0 0, 0 5px, 5px -5px, -5px 0px',
426
- }}
427
- >
428
- <Box
429
- sx={{
430
- width: '100%',
431
- height: '100%',
432
- backgroundColor: editedPair.value,
433
- borderRadius: 1,
434
- display: 'flex',
435
- alignItems: 'center',
436
- justifyContent: 'center',
437
- }}
438
- >
439
- <Typography
440
- variant="body2"
441
- sx={{
442
- color: getContrastColor(editedPair.value),
443
- fontWeight: 'bold',
444
- backgroundColor: 'rgba(0,0,0,0.1)',
445
- padding: '4px 8px',
446
- borderRadius: 1,
447
- }}
448
- >
449
- {editedPair.key || 'Color Preview'}
450
- </Typography>
451
- </Box>
452
- </Box>
453
- </Box>
454
- </Box>
455
-
456
- {/* Drawer Footer - Fixed at bottom */}
457
- <Box sx={{
458
- display: 'flex',
459
- alignItems: 'center',
460
- gap: 1,
461
- px: 2,
462
- py: 1.5,
463
- borderTop: '1px solid',
464
- borderColor: 'divider',
465
- flexShrink: 0,
466
- backgroundColor: 'background.paper',
467
- }}>
468
- {pair?.key && (
469
- <Button
470
- onClick={handleDelete}
471
- color="error"
472
- startIcon={<DeleteIcon />}
473
- size="small"
474
- >
475
- Delete
476
- </Button>
477
- )}
478
- <Box sx={{ flexGrow: 1 }} />
479
- <Button onClick={onClose} size="small">
480
- Cancel
481
- </Button>
482
- <Button
483
- onClick={handleSave}
484
- variant="contained"
485
- disabled={!!keyError || !editedPair.key.trim()}
486
- size="small"
487
- >
488
- Save
489
- </Button>
490
- </Box>
491
- </Drawer>
492
- );
493
- };
494
-
495
- export default ColorEditDialog;
@@ -1,80 +0,0 @@
1
- import {
2
- Box,
3
- Chip,
4
- } from '@mui/material';
5
- import { KeyValuePair } from '../interfaces/interfaces';
6
- import { getContrastColor, getModeIcon, parseColorKey } from '../helpers/functions';
7
-
8
- const ColorPaletteItem: React.FC<{
9
- pair: KeyValuePair;
10
- onEdit: (pair: KeyValuePair) => void;
11
- onDelete: (id: string) => void;
12
- }> = ({ pair, onEdit, onDelete }) => {
13
- const textColor = getContrastColor(pair.value);
14
- const { baseChips, mode } = parseColorKey(pair.key);
15
- const modeIcon = getModeIcon(mode);
16
-
17
- return (
18
- <Box
19
- sx={{
20
- aspectRatio: 'unset',
21
- height: '30px',
22
- cursor: 'pointer',
23
- transition: 'all 0.2s ease-in-out',
24
- '&:hover': {
25
- transform: 'translateY(-2px)',
26
- boxShadow: 3,
27
- },
28
- position: 'relative',
29
- overflow: 'hidden',
30
- backgroundColor: pair.value,
31
- display: 'flex',
32
- flexDirection: 'row',
33
- alignItems: 'center',
34
- justifyContent: 'flex-start',
35
- padding: '0 8px',
36
- gap: 0.5,
37
- }}
38
- onClick={() => onEdit(pair)}
39
- >
40
- {/* Base name chips */}
41
- <Box sx={{ display: 'flex', flexWrap: 'wrap', gap: 0.25, justifyContent: 'center' }}>
42
- {baseChips.map((chip, index) => (
43
- <Chip
44
- key={index}
45
- label={chip}
46
- size="small"
47
- sx={{
48
- height: 16,
49
- fontSize: '0.6rem',
50
- backgroundColor: 'rgba(255,255,255,0.9)',
51
- color: '#333',
52
- '& .MuiChip-label': {
53
- padding: '0 4px',
54
- },
55
- }}
56
- />
57
- ))}
58
- </Box>
59
-
60
- {/* Mode chip/icon */}
61
- {mode && (
62
- <Chip
63
- label={modeIcon}
64
- size="small"
65
- sx={{
66
- height: 16,
67
- fontSize: '0.6rem',
68
- backgroundColor: 'rgba(0,0,0,0.7)',
69
- color: '#fff',
70
- '& .MuiChip-label': {
71
- padding: '0 4px',
72
- },
73
- }}
74
- />
75
- )}
76
- </Box>
77
- );
78
- };
79
-
80
- export default ColorPaletteItem;