@studiotoolkit/color-palette 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/style.css +108 -1
- package/package.json +7 -8
package/dist/style.css
CHANGED
|
@@ -1 +1,108 @@
|
|
|
1
|
-
.color-palette-container
|
|
1
|
+
.color-palette-container {
|
|
2
|
+
padding: 5px;
|
|
3
|
+
background-color: #ffffff;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[data-theme="dark"] .color-palette-container {
|
|
7
|
+
background-color: #1a1a1a !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.palette-section {
|
|
11
|
+
margin-bottom: 8px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.palette-section-header {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
align-items: center;
|
|
18
|
+
margin-bottom: 8px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.palette-section h3 {
|
|
22
|
+
margin: 0;
|
|
23
|
+
font-size: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.copy-section-button {
|
|
27
|
+
padding: 4px 10px;
|
|
28
|
+
background: #27ae60;
|
|
29
|
+
color: white;
|
|
30
|
+
border: none;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.copy-section-button:hover {
|
|
37
|
+
background: #1e8449;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.colors {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-wrap: wrap;
|
|
43
|
+
gap: 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.swatchBox {
|
|
47
|
+
text-align: center;
|
|
48
|
+
font-size: 12px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ─── Table display ───────────────────────────────────── */
|
|
52
|
+
.palette-table {
|
|
53
|
+
border-collapse: collapse;
|
|
54
|
+
border: 1px solid #ddd;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.palette-table .color-cell {
|
|
58
|
+
padding: 0;
|
|
59
|
+
border: 1px solid #ddd;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.palette-table .hex-cell {
|
|
63
|
+
text-align: center;
|
|
64
|
+
font-family: monospace;
|
|
65
|
+
font-size: 11px;
|
|
66
|
+
color: #333;
|
|
67
|
+
padding: 4px 2px;
|
|
68
|
+
border: 1px solid #ddd;
|
|
69
|
+
background: white;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.hex-label {
|
|
73
|
+
display: block;
|
|
74
|
+
font-family: monospace;
|
|
75
|
+
font-size: 11px;
|
|
76
|
+
color: #333;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* ─── Dark theme support ───────────────────────────────── */
|
|
80
|
+
[data-theme="dark"] .palette-section h3 {
|
|
81
|
+
color: #e0e0e0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-theme="dark"] .copy-section-button {
|
|
85
|
+
background: #2ecc71;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-theme="dark"] .copy-section-button:hover {
|
|
89
|
+
background: #27ae60;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-theme="dark"] .palette-table {
|
|
93
|
+
border-color: #444;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-theme="dark"] .palette-table .color-cell {
|
|
97
|
+
border-color: #444;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-theme="dark"] .palette-table .hex-cell {
|
|
101
|
+
color: #e0e0e0;
|
|
102
|
+
border-color: #444;
|
|
103
|
+
background: #2a2a2a;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-theme="dark"] .hex-label {
|
|
107
|
+
color: #e0e0e0;
|
|
108
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@studiotoolkit/color-palette",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React component for displaying and managing color palettes with multiple display modes and customization options",
|
|
6
6
|
"author": "StudioToolkit",
|
|
@@ -36,8 +36,7 @@
|
|
|
36
36
|
"require": "./dist/index.js",
|
|
37
37
|
"default": "./dist/index.js"
|
|
38
38
|
},
|
|
39
|
-
"./style.css": "./dist/
|
|
40
|
-
"./src/ColorPalette.css": "./src/ColorPalette.css",
|
|
39
|
+
"./style.css": "./dist/style.css",
|
|
41
40
|
"./package.json": "./package.json"
|
|
42
41
|
},
|
|
43
42
|
"files": [
|
|
@@ -52,18 +51,18 @@
|
|
|
52
51
|
"node": ">=16.0.0"
|
|
53
52
|
},
|
|
54
53
|
"peerDependencies": {
|
|
55
|
-
"react": "^18.0.0",
|
|
56
|
-
"react-dom": "^18.0.0"
|
|
54
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
55
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
59
|
-
"@types/react": "^18.2.0",
|
|
60
|
-
"@types/react-dom": "^18.2.0",
|
|
58
|
+
"@types/react": "^18.2.0 || ^19.0.0",
|
|
59
|
+
"@types/react-dom": "^18.2.0 || ^19.0.0",
|
|
61
60
|
"@vitejs/plugin-react": "^4.2.0",
|
|
62
61
|
"typescript": "^5.3.3",
|
|
63
62
|
"vite": "^5.0.0"
|
|
64
63
|
},
|
|
65
64
|
"scripts": {
|
|
66
|
-
"build": "npx tsc --project tsconfig.json && vite build",
|
|
65
|
+
"build": "npx tsc --project tsconfig.json && vite build && cp src/ColorPalette.css dist/style.css",
|
|
67
66
|
"dev": "vite build --watch",
|
|
68
67
|
"clean": "rm -rf dist",
|
|
69
68
|
"lint": "eslint src --ext .ts,.tsx",
|