@crystin001/theme-settings-lib 1.0.0 → 1.2.0
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 +402 -368
- package/dist/components/ThemeShowcase.d.ts +10 -0
- package/dist/components/ThemeShowcase.d.ts.map +1 -0
- package/dist/components/ThemeShowcase.js +357 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/settings-context.d.ts.map +1 -1
- package/dist/settings-context.js +5 -3
- package/dist/stories/ThemeStories.d.ts +6 -0
- package/dist/stories/ThemeStories.d.ts.map +1 -0
- package/dist/stories/ThemeStories.js +285 -0
- package/dist/stories/index.d.ts +2 -0
- package/dist/stories/index.d.ts.map +1 -0
- package/dist/stories/index.js +4 -0
- package/dist/theme-validation.d.ts +27 -0
- package/dist/theme-validation.d.ts.map +1 -0
- package/dist/theme-validation.js +114 -0
- package/dist/theme.d.ts +16 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +628 -334
- package/package.json +69 -56
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemeShowcase Component
|
|
3
|
+
*
|
|
4
|
+
* A visual component to showcase all available themes for development purposes.
|
|
5
|
+
* Displays all theme families with their light and dark variants, showing
|
|
6
|
+
* color palettes and sample UI components.
|
|
7
|
+
*/
|
|
8
|
+
import React from 'react';
|
|
9
|
+
export declare function ThemeShowcase(): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ThemeShowcase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeShowcase.d.ts","sourceRoot":"","sources":["../../src/components/ThemeShowcase.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AAmIxC,wBAAgB,aAAa,sBA0E5B"}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* ThemeShowcase Component
|
|
4
|
+
*
|
|
5
|
+
* A visual component to showcase all available themes for development purposes.
|
|
6
|
+
* Displays all theme families with their light and dark variants, showing
|
|
7
|
+
* color palettes and sample UI components.
|
|
8
|
+
*/
|
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
12
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
13
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
14
|
+
}
|
|
15
|
+
Object.defineProperty(o, k2, desc);
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
26
|
+
var ownKeys = function(o) {
|
|
27
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
28
|
+
var ar = [];
|
|
29
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
30
|
+
return ar;
|
|
31
|
+
};
|
|
32
|
+
return ownKeys(o);
|
|
33
|
+
};
|
|
34
|
+
return function (mod) {
|
|
35
|
+
if (mod && mod.__esModule) return mod;
|
|
36
|
+
var result = {};
|
|
37
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
38
|
+
__setModuleDefault(result, mod);
|
|
39
|
+
return result;
|
|
40
|
+
};
|
|
41
|
+
})();
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.ThemeShowcase = ThemeShowcase;
|
|
44
|
+
const react_1 = __importStar(require("react"));
|
|
45
|
+
const react_native_1 = require("react-native");
|
|
46
|
+
const theme_1 = require("../theme");
|
|
47
|
+
const settings_context_1 = require("../settings-context");
|
|
48
|
+
const { width } = react_native_1.Dimensions.get('window');
|
|
49
|
+
const CARD_WIDTH = width > 600 ? (width - 60) / 2 : width - 40;
|
|
50
|
+
function ColorSwatch({ label, color, textColor }) {
|
|
51
|
+
return (<react_native_1.View style={[styles.swatch, { backgroundColor: color }]}>
|
|
52
|
+
<react_native_1.Text style={[styles.swatchLabel, { color: textColor || '#000' }]} numberOfLines={1}>
|
|
53
|
+
{label}
|
|
54
|
+
</react_native_1.Text>
|
|
55
|
+
<react_native_1.Text style={[styles.swatchValue, { color: textColor || '#000' }]} numberOfLines={1}>
|
|
56
|
+
{color}
|
|
57
|
+
</react_native_1.Text>
|
|
58
|
+
</react_native_1.View>);
|
|
59
|
+
}
|
|
60
|
+
function ThemeCard({ themeName, colors, isSelected, onSelect }) {
|
|
61
|
+
const displayName = themeName.replace(/-/g, ' ').replace(/\b\w/g, (l) => l.toUpperCase());
|
|
62
|
+
const isDark = themeName.endsWith('-dark');
|
|
63
|
+
return (<react_native_1.Pressable onPress={onSelect} style={[
|
|
64
|
+
styles.themeCard,
|
|
65
|
+
{
|
|
66
|
+
backgroundColor: colors.card,
|
|
67
|
+
borderColor: isSelected ? colors.primary : colors.border,
|
|
68
|
+
borderWidth: isSelected ? 3 : 1,
|
|
69
|
+
},
|
|
70
|
+
isSelected && styles.selectedCard,
|
|
71
|
+
]}>
|
|
72
|
+
<react_native_1.View style={[styles.themeHeader, { backgroundColor: colors.background }]}>
|
|
73
|
+
<react_native_1.Text style={[styles.themeTitle, { color: colors.text }]}>{displayName}</react_native_1.Text>
|
|
74
|
+
{isSelected && (<react_native_1.View style={[styles.selectedBadge, { backgroundColor: colors.primary }]}>
|
|
75
|
+
<react_native_1.Text style={[styles.selectedBadgeText, { color: colors.buttonText }]}>Active</react_native_1.Text>
|
|
76
|
+
</react_native_1.View>)}
|
|
77
|
+
</react_native_1.View>
|
|
78
|
+
|
|
79
|
+
<react_native_1.View style={styles.colorGrid}>
|
|
80
|
+
<ColorSwatch label="Background" color={colors.background} textColor={colors.text}/>
|
|
81
|
+
<ColorSwatch label="Text" color={colors.text}/>
|
|
82
|
+
<ColorSwatch label="Primary" color={colors.primary}/>
|
|
83
|
+
<ColorSwatch label="Secondary" color={colors.secondary}/>
|
|
84
|
+
<ColorSwatch label="Tint" color={colors.tint}/>
|
|
85
|
+
<ColorSwatch label="Card" color={colors.card} textColor={colors.cardText}/>
|
|
86
|
+
</react_native_1.View>
|
|
87
|
+
|
|
88
|
+
<react_native_1.View style={styles.sampleSection}>
|
|
89
|
+
<react_native_1.Text style={[styles.sampleLabel, { color: colors.text }]}>Sample UI:</react_native_1.Text>
|
|
90
|
+
|
|
91
|
+
<react_native_1.View style={[styles.sampleCard, { backgroundColor: colors.card, borderColor: colors.border }]}>
|
|
92
|
+
<react_native_1.Text style={[styles.sampleText, { color: colors.cardText }]}>
|
|
93
|
+
Sample card content
|
|
94
|
+
</react_native_1.Text>
|
|
95
|
+
</react_native_1.View>
|
|
96
|
+
|
|
97
|
+
<react_native_1.View style={styles.buttonRow}>
|
|
98
|
+
<react_native_1.Pressable style={[styles.sampleButton, { backgroundColor: colors.button }]} onPress={() => { }}>
|
|
99
|
+
<react_native_1.Text style={[styles.sampleButtonText, { color: colors.buttonText }]}>
|
|
100
|
+
Primary
|
|
101
|
+
</react_native_1.Text>
|
|
102
|
+
</react_native_1.Pressable>
|
|
103
|
+
<react_native_1.Pressable style={[styles.sampleButton, styles.sampleButtonSecondary, { backgroundColor: colors.buttonSecondary }]} onPress={() => { }}>
|
|
104
|
+
<react_native_1.Text style={[styles.sampleButtonText, { color: colors.buttonSecondaryText }]}>
|
|
105
|
+
Secondary
|
|
106
|
+
</react_native_1.Text>
|
|
107
|
+
</react_native_1.Pressable>
|
|
108
|
+
</react_native_1.View>
|
|
109
|
+
|
|
110
|
+
<react_native_1.View style={styles.statusRow}>
|
|
111
|
+
<react_native_1.View style={[styles.statusBadge, { backgroundColor: colors.success }]}>
|
|
112
|
+
<react_native_1.Text style={[styles.statusText, { color: '#FFF' }]}>Success</react_native_1.Text>
|
|
113
|
+
</react_native_1.View>
|
|
114
|
+
<react_native_1.View style={[styles.statusBadge, { backgroundColor: colors.warning }]}>
|
|
115
|
+
<react_native_1.Text style={[styles.statusText, { color: '#000' }]}>Warning</react_native_1.Text>
|
|
116
|
+
</react_native_1.View>
|
|
117
|
+
<react_native_1.View style={[styles.statusBadge, { backgroundColor: colors.error }]}>
|
|
118
|
+
<react_native_1.Text style={[styles.statusText, { color: '#FFF' }]}>Error</react_native_1.Text>
|
|
119
|
+
</react_native_1.View>
|
|
120
|
+
<react_native_1.View style={[styles.statusBadge, { backgroundColor: colors.info }]}>
|
|
121
|
+
<react_native_1.Text style={[styles.statusText, { color: '#FFF' }]}>Info</react_native_1.Text>
|
|
122
|
+
</react_native_1.View>
|
|
123
|
+
</react_native_1.View>
|
|
124
|
+
|
|
125
|
+
<react_native_1.View style={[styles.sampleInput, { backgroundColor: colors.input, borderColor: colors.inputBorder }]}>
|
|
126
|
+
<react_native_1.Text style={[styles.sampleInputText, { color: colors.inputText }]}>
|
|
127
|
+
Sample input field
|
|
128
|
+
</react_native_1.Text>
|
|
129
|
+
</react_native_1.View>
|
|
130
|
+
</react_native_1.View>
|
|
131
|
+
</react_native_1.Pressable>);
|
|
132
|
+
}
|
|
133
|
+
function ThemeShowcase() {
|
|
134
|
+
const { currentTheme, setThemeFamily, availableThemeFamilies } = (0, settings_context_1.useSettings)();
|
|
135
|
+
const [filter, setFilter] = (0, react_1.useState)('all');
|
|
136
|
+
const themeEntries = Object.entries(theme_1.Themes);
|
|
137
|
+
const filteredThemes = themeEntries.filter(([name]) => {
|
|
138
|
+
if (filter === 'light')
|
|
139
|
+
return name.endsWith('-light');
|
|
140
|
+
if (filter === 'dark')
|
|
141
|
+
return name.endsWith('-dark');
|
|
142
|
+
return true;
|
|
143
|
+
});
|
|
144
|
+
const handleThemeSelect = (themeName) => {
|
|
145
|
+
// Extract theme family from theme name (e.g., 'neon-surf-light' -> 'neon-surf')
|
|
146
|
+
const family = themeName.replace(/-light$|-dark$/, '');
|
|
147
|
+
setThemeFamily(family);
|
|
148
|
+
};
|
|
149
|
+
return (<react_native_1.View style={styles.container}>
|
|
150
|
+
<react_native_1.View style={styles.header}>
|
|
151
|
+
<react_native_1.Text style={styles.headerTitle}>Theme Showcase</react_native_1.Text>
|
|
152
|
+
<react_native_1.Text style={styles.headerSubtitle}>
|
|
153
|
+
Tap any theme card to apply it
|
|
154
|
+
</react_native_1.Text>
|
|
155
|
+
</react_native_1.View>
|
|
156
|
+
|
|
157
|
+
<react_native_1.View style={styles.filterContainer}>
|
|
158
|
+
<react_native_1.TouchableOpacity style={[styles.filterButton, filter === 'all' && styles.filterButtonActive]} onPress={() => setFilter('all')}>
|
|
159
|
+
<react_native_1.Text style={[styles.filterText, filter === 'all' && styles.filterTextActive]}>
|
|
160
|
+
All
|
|
161
|
+
</react_native_1.Text>
|
|
162
|
+
</react_native_1.TouchableOpacity>
|
|
163
|
+
<react_native_1.TouchableOpacity style={[styles.filterButton, filter === 'light' && styles.filterButtonActive]} onPress={() => setFilter('light')}>
|
|
164
|
+
<react_native_1.Text style={[styles.filterText, filter === 'light' && styles.filterTextActive]}>
|
|
165
|
+
Light
|
|
166
|
+
</react_native_1.Text>
|
|
167
|
+
</react_native_1.TouchableOpacity>
|
|
168
|
+
<react_native_1.TouchableOpacity style={[styles.filterButton, filter === 'dark' && styles.filterButtonActive]} onPress={() => setFilter('dark')}>
|
|
169
|
+
<react_native_1.Text style={[styles.filterText, filter === 'dark' && styles.filterTextActive]}>
|
|
170
|
+
Dark
|
|
171
|
+
</react_native_1.Text>
|
|
172
|
+
</react_native_1.TouchableOpacity>
|
|
173
|
+
</react_native_1.View>
|
|
174
|
+
|
|
175
|
+
<react_native_1.ScrollView style={styles.scrollView} contentContainerStyle={styles.scrollContent} showsVerticalScrollIndicator={true}>
|
|
176
|
+
{filteredThemes.map(([themeName, colors]) => {
|
|
177
|
+
const isSelected = currentTheme === themeName;
|
|
178
|
+
return (<ThemeCard key={themeName} themeName={themeName} colors={colors} isSelected={isSelected} onSelect={() => handleThemeSelect(themeName)}/>);
|
|
179
|
+
})}
|
|
180
|
+
</react_native_1.ScrollView>
|
|
181
|
+
</react_native_1.View>);
|
|
182
|
+
}
|
|
183
|
+
const styles = react_native_1.StyleSheet.create({
|
|
184
|
+
container: {
|
|
185
|
+
flex: 1,
|
|
186
|
+
backgroundColor: '#F5F5F5',
|
|
187
|
+
},
|
|
188
|
+
header: {
|
|
189
|
+
padding: 20,
|
|
190
|
+
paddingTop: 40,
|
|
191
|
+
backgroundColor: '#FFF',
|
|
192
|
+
borderBottomWidth: 1,
|
|
193
|
+
borderBottomColor: '#E0E0E0',
|
|
194
|
+
},
|
|
195
|
+
headerTitle: {
|
|
196
|
+
fontSize: 28,
|
|
197
|
+
fontWeight: 'bold',
|
|
198
|
+
color: '#000',
|
|
199
|
+
marginBottom: 4,
|
|
200
|
+
},
|
|
201
|
+
headerSubtitle: {
|
|
202
|
+
fontSize: 14,
|
|
203
|
+
color: '#666',
|
|
204
|
+
},
|
|
205
|
+
filterContainer: {
|
|
206
|
+
flexDirection: 'row',
|
|
207
|
+
padding: 12,
|
|
208
|
+
backgroundColor: '#FFF',
|
|
209
|
+
borderBottomWidth: 1,
|
|
210
|
+
borderBottomColor: '#E0E0E0',
|
|
211
|
+
gap: 8,
|
|
212
|
+
},
|
|
213
|
+
filterButton: {
|
|
214
|
+
paddingHorizontal: 16,
|
|
215
|
+
paddingVertical: 8,
|
|
216
|
+
borderRadius: 20,
|
|
217
|
+
backgroundColor: '#F0F0F0',
|
|
218
|
+
},
|
|
219
|
+
filterButtonActive: {
|
|
220
|
+
backgroundColor: '#007AFF',
|
|
221
|
+
},
|
|
222
|
+
filterText: {
|
|
223
|
+
fontSize: 14,
|
|
224
|
+
color: '#666',
|
|
225
|
+
fontWeight: '500',
|
|
226
|
+
},
|
|
227
|
+
filterTextActive: {
|
|
228
|
+
color: '#FFF',
|
|
229
|
+
},
|
|
230
|
+
scrollView: {
|
|
231
|
+
flex: 1,
|
|
232
|
+
},
|
|
233
|
+
scrollContent: {
|
|
234
|
+
padding: 20,
|
|
235
|
+
gap: 20,
|
|
236
|
+
},
|
|
237
|
+
themeCard: {
|
|
238
|
+
width: CARD_WIDTH,
|
|
239
|
+
alignSelf: 'center',
|
|
240
|
+
borderRadius: 12,
|
|
241
|
+
padding: 16,
|
|
242
|
+
marginBottom: 8,
|
|
243
|
+
shadowColor: '#000',
|
|
244
|
+
shadowOffset: { width: 0, height: 2 },
|
|
245
|
+
shadowOpacity: 0.1,
|
|
246
|
+
shadowRadius: 4,
|
|
247
|
+
elevation: 3,
|
|
248
|
+
},
|
|
249
|
+
selectedCard: {
|
|
250
|
+
shadowOpacity: 0.2,
|
|
251
|
+
shadowRadius: 8,
|
|
252
|
+
elevation: 6,
|
|
253
|
+
},
|
|
254
|
+
themeHeader: {
|
|
255
|
+
flexDirection: 'row',
|
|
256
|
+
justifyContent: 'space-between',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
marginBottom: 16,
|
|
259
|
+
padding: 12,
|
|
260
|
+
borderRadius: 8,
|
|
261
|
+
},
|
|
262
|
+
themeTitle: {
|
|
263
|
+
fontSize: 18,
|
|
264
|
+
fontWeight: 'bold',
|
|
265
|
+
flex: 1,
|
|
266
|
+
},
|
|
267
|
+
selectedBadge: {
|
|
268
|
+
paddingHorizontal: 8,
|
|
269
|
+
paddingVertical: 4,
|
|
270
|
+
borderRadius: 12,
|
|
271
|
+
},
|
|
272
|
+
selectedBadgeText: {
|
|
273
|
+
fontSize: 12,
|
|
274
|
+
fontWeight: '600',
|
|
275
|
+
},
|
|
276
|
+
colorGrid: {
|
|
277
|
+
flexDirection: 'row',
|
|
278
|
+
flexWrap: 'wrap',
|
|
279
|
+
gap: 8,
|
|
280
|
+
marginBottom: 16,
|
|
281
|
+
},
|
|
282
|
+
swatch: {
|
|
283
|
+
width: (CARD_WIDTH - 48) / 3 - 6,
|
|
284
|
+
height: 60,
|
|
285
|
+
borderRadius: 6,
|
|
286
|
+
padding: 6,
|
|
287
|
+
justifyContent: 'flex-end',
|
|
288
|
+
},
|
|
289
|
+
swatchLabel: {
|
|
290
|
+
fontSize: 10,
|
|
291
|
+
fontWeight: '600',
|
|
292
|
+
marginBottom: 2,
|
|
293
|
+
},
|
|
294
|
+
swatchValue: {
|
|
295
|
+
fontSize: 9,
|
|
296
|
+
opacity: 0.8,
|
|
297
|
+
},
|
|
298
|
+
sampleSection: {
|
|
299
|
+
marginTop: 8,
|
|
300
|
+
},
|
|
301
|
+
sampleLabel: {
|
|
302
|
+
fontSize: 14,
|
|
303
|
+
fontWeight: '600',
|
|
304
|
+
marginBottom: 8,
|
|
305
|
+
},
|
|
306
|
+
sampleCard: {
|
|
307
|
+
padding: 12,
|
|
308
|
+
borderRadius: 8,
|
|
309
|
+
borderWidth: 1,
|
|
310
|
+
marginBottom: 12,
|
|
311
|
+
},
|
|
312
|
+
sampleText: {
|
|
313
|
+
fontSize: 14,
|
|
314
|
+
},
|
|
315
|
+
buttonRow: {
|
|
316
|
+
flexDirection: 'row',
|
|
317
|
+
gap: 8,
|
|
318
|
+
marginBottom: 12,
|
|
319
|
+
},
|
|
320
|
+
sampleButton: {
|
|
321
|
+
flex: 1,
|
|
322
|
+
paddingVertical: 10,
|
|
323
|
+
paddingHorizontal: 16,
|
|
324
|
+
borderRadius: 6,
|
|
325
|
+
alignItems: 'center',
|
|
326
|
+
},
|
|
327
|
+
sampleButtonSecondary: {
|
|
328
|
+
// Additional styles if needed
|
|
329
|
+
},
|
|
330
|
+
sampleButtonText: {
|
|
331
|
+
fontSize: 14,
|
|
332
|
+
fontWeight: '600',
|
|
333
|
+
},
|
|
334
|
+
statusRow: {
|
|
335
|
+
flexDirection: 'row',
|
|
336
|
+
flexWrap: 'wrap',
|
|
337
|
+
gap: 8,
|
|
338
|
+
marginBottom: 12,
|
|
339
|
+
},
|
|
340
|
+
statusBadge: {
|
|
341
|
+
paddingHorizontal: 10,
|
|
342
|
+
paddingVertical: 6,
|
|
343
|
+
borderRadius: 12,
|
|
344
|
+
},
|
|
345
|
+
statusText: {
|
|
346
|
+
fontSize: 11,
|
|
347
|
+
fontWeight: '600',
|
|
348
|
+
},
|
|
349
|
+
sampleInput: {
|
|
350
|
+
padding: 12,
|
|
351
|
+
borderRadius: 6,
|
|
352
|
+
borderWidth: 1,
|
|
353
|
+
},
|
|
354
|
+
sampleInputText: {
|
|
355
|
+
fontSize: 14,
|
|
356
|
+
},
|
|
357
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -23,5 +23,6 @@ export * from './i18n';
|
|
|
23
23
|
export * from './hooks/use-theme-color';
|
|
24
24
|
export * from './hooks/use-translation';
|
|
25
25
|
export * from './color-utils';
|
|
26
|
+
export * from './theme-validation';
|
|
26
27
|
export { default as i18n } from './i18n';
|
|
27
28
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,oBAAoB,CAAC;AAGnC,cAAc,QAAQ,CAAC;AAGvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,cAAc,SAAS,CAAC;AAGxB,cAAc,oBAAoB,CAAC;AAGnC,cAAc,QAAQ,CAAC;AAGvB,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AAGxC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AAGnC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __exportStar(require("./hooks/use-theme-color"), exports);
|
|
|
48
48
|
__exportStar(require("./hooks/use-translation"), exports);
|
|
49
49
|
// Utility exports
|
|
50
50
|
__exportStar(require("./color-utils"), exports);
|
|
51
|
+
__exportStar(require("./theme-validation"), exports);
|
|
51
52
|
// Re-export i18n instance for apps that need direct access
|
|
52
53
|
var i18n_1 = require("./i18n");
|
|
53
54
|
Object.defineProperty(exports, "i18n", { enumerable: true, get: function () { return __importDefault(i18n_1).default; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-context.d.ts","sourceRoot":"","sources":["../src/settings-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkD,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAU,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGhE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AAE1D,UAAU,eAAe;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,mBAAmB;IAC3B,mBAAmB,EAAE,WAAW,CAAC;IACjC,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,kBAAkB,EAAE,OAAO,mBAAmB,CAAC;IAC/C,sBAAsB,EAAE,eAAe,EAAE,CAAC;CAC3C;
|
|
1
|
+
{"version":3,"file":"settings-context.d.ts","sourceRoot":"","sources":["../src/settings-context.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAkD,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAU,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAC;AAGhE,YAAY,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AAE1D,UAAU,eAAe;IACvB,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,mBAAmB;IAC3B,mBAAmB,EAAE,WAAW,CAAC;IACjC,YAAY,EAAE,SAAS,CAAC;IACxB,cAAc,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC9C,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,WAAW,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,kBAAkB,EAAE,OAAO,mBAAmB,CAAC;IAC/C,sBAAsB,EAAE,eAAe,EAAE,CAAC;CAC3C;AAsBD,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,qBAuFrE;AAED,wBAAgB,WAAW,wBAM1B"}
|
package/dist/settings-context.js
CHANGED
|
@@ -51,9 +51,11 @@ const STORAGE_KEYS = {
|
|
|
51
51
|
const THEME_FAMILY_LABELS = {
|
|
52
52
|
system: 'System',
|
|
53
53
|
'neon-surf': 'Neon Surf',
|
|
54
|
-
'
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
'cotton-candy': 'Cotton Candy',
|
|
55
|
+
'midnight-forest': 'Midnight Forest',
|
|
56
|
+
'desert-sunset': 'Desert Sunset',
|
|
57
|
+
'cyber-amethyst': 'Cyber Amethyst',
|
|
58
|
+
'cosmic-orchid': 'Cosmic Orchid',
|
|
57
59
|
'high-contrast': 'High Contrast',
|
|
58
60
|
solarized: 'Solarized',
|
|
59
61
|
'dark-plus': 'Dark Plus',
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const AllThemes: () => React.JSX.Element;
|
|
3
|
+
export declare const LightThemes: () => React.JSX.Element;
|
|
4
|
+
export declare const DarkThemes: () => React.JSX.Element;
|
|
5
|
+
export declare const IndividualThemes: () => React.JSX.Element;
|
|
6
|
+
//# sourceMappingURL=ThemeStories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeStories.d.ts","sourceRoot":"","sources":["../../src/stories/ThemeStories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkG1B,eAAO,MAAM,SAAS,yBAgBrB,CAAC;AAGF,eAAO,MAAM,WAAW,yBAevB,CAAC;AAGF,eAAO,MAAM,UAAU,yBAetB,CAAC;AAGF,eAAO,MAAM,gBAAgB,yBAsB5B,CAAC"}
|