@una-ui/nuxt-edge 0.61.0-29182246.bc2c328 → 1.0.0-alpha.0-29173950.b6a8c03

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 (49) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +2 -2
  3. package/dist/runtime/components/alert-dialog/AlertDialogCancel.vue +1 -1
  4. package/dist/runtime/components/combobox/Combobox.vue +2 -1
  5. package/dist/runtime/components/combobox/ComboboxTrigger.vue +1 -1
  6. package/dist/runtime/components/data/table/Table.vue +0 -1
  7. package/dist/runtime/components/elements/Skeleton.vue +1 -1
  8. package/dist/runtime/components/elements/Skeleton.vue.d.ts +3 -1
  9. package/dist/runtime/components/elements/tabs/TabsTrigger.vue +1 -1
  10. package/dist/runtime/components/forms/Checkbox.vue +2 -2
  11. package/dist/runtime/components/forms/Checkbox.vue.d.ts +2 -0
  12. package/dist/runtime/components/forms/FormGroup.vue +1 -1
  13. package/dist/runtime/components/forms/Slider.vue +13 -11
  14. package/dist/runtime/components/forms/Slider.vue.d.ts +1 -0
  15. package/dist/runtime/components/forms/form/FormField.vue +1 -1
  16. package/dist/runtime/components/forms/select/SelectTrigger.vue +1 -1
  17. package/dist/runtime/components/misc/ThemeSwitcher.vue +75 -17
  18. package/dist/runtime/components/navigation/breadcrumb/BreadcrumbPage.vue +1 -1
  19. package/dist/runtime/components/sidebar/SidebarMenuSubButton.vue +2 -1
  20. package/dist/runtime/composables/useUnaSettings.js +11 -7
  21. package/dist/runtime/composables/useUnaThemes.d.ts +77 -5
  22. package/dist/runtime/composables/useUnaThemes.js +414 -98
  23. package/dist/runtime/plugins/theme.client.js +12 -0
  24. package/dist/runtime/plugins/theme.server.js +9 -0
  25. package/dist/runtime/types/index.d.ts +7 -2
  26. package/dist/runtime/types/index.js +0 -2
  27. package/package.json +10 -10
  28. package/dist/runtime/components/number-field/NumberField.vue +0 -73
  29. package/dist/runtime/components/number-field/NumberField.vue.d.ts +0 -28
  30. package/dist/runtime/components/number-field/NumberFieldContent.vue +0 -20
  31. package/dist/runtime/components/number-field/NumberFieldContent.vue.d.ts +0 -13
  32. package/dist/runtime/components/number-field/NumberFieldDecrement.vue +0 -33
  33. package/dist/runtime/components/number-field/NumberFieldDecrement.vue.d.ts +0 -16
  34. package/dist/runtime/components/number-field/NumberFieldIncrement.vue +0 -33
  35. package/dist/runtime/components/number-field/NumberFieldIncrement.vue.d.ts +0 -16
  36. package/dist/runtime/components/number-field/NumberFieldInput.vue +0 -24
  37. package/dist/runtime/components/number-field/NumberFieldInput.vue.d.ts +0 -5
  38. package/dist/runtime/components/pin-input/PinInput.vue +0 -139
  39. package/dist/runtime/components/pin-input/PinInput.vue.d.ts +0 -33
  40. package/dist/runtime/components/pin-input/PinInputGroup.vue +0 -28
  41. package/dist/runtime/components/pin-input/PinInputGroup.vue.d.ts +0 -13
  42. package/dist/runtime/components/pin-input/PinInputSeparator.vue +0 -30
  43. package/dist/runtime/components/pin-input/PinInputSeparator.vue.d.ts +0 -15
  44. package/dist/runtime/components/pin-input/PinInputSlot.vue +0 -46
  45. package/dist/runtime/components/pin-input/PinInputSlot.vue.d.ts +0 -5
  46. package/dist/runtime/types/number-field.d.ts +0 -48
  47. package/dist/runtime/types/number-field.js +0 -0
  48. package/dist/runtime/types/pin-input.d.ts +0 -88
  49. package/dist/runtime/types/pin-input.js +0 -0
@@ -1,100 +1,39 @@
1
- import { colors } from "@unocss/preset-mini/colors";
2
- import { hexToRgb } from "../utils/index.js";
3
- const filteredPrimaryColors = Object.fromEntries(
4
- Object.entries(colors).filter(([key]) => [
5
- "blue",
6
- "cyan",
7
- "sky",
8
- "amber",
9
- "yellow",
10
- "emerald",
11
- "lime",
12
- "orange",
13
- "purple",
14
- "indigo",
15
- "pink",
16
- "tomato",
17
- "green",
18
- "fuchsia",
19
- "violet",
20
- "rose",
21
- "amber",
22
- "red",
23
- "teal"
24
- ].includes(key)).map(([key, value]) => [key, Object.fromEntries(
25
- Object.entries(value).filter(([key2]) => ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"].includes(key2))
26
- )])
27
- );
28
- filteredPrimaryColors.tomato = {
29
- 50: "#fdf2f2",
30
- 100: "#fde8e8",
31
- 200: "#fbd5d5",
32
- 300: "#f8b4b4",
33
- 400: "#f98080",
34
- 500: "#f05252",
35
- 600: "#e02424",
36
- 700: "#c81e1e",
37
- 800: "#9b1c1c",
38
- 900: "#771d1d",
39
- 950: "#3f0708"
40
- };
1
+ import { colors } from "@unocss/preset-wind4/colors";
2
+ const filteredPrimaryColors = (() => {
3
+ const primaryColors = Object.fromEntries(
4
+ Object.entries(colors).filter(([key]) => [
5
+ "blue",
6
+ "cyan",
7
+ "sky",
8
+ "amber",
9
+ "yellow",
10
+ "emerald",
11
+ "lime",
12
+ "orange",
13
+ "purple",
14
+ "indigo",
15
+ "pink",
16
+ "tomato",
17
+ "green",
18
+ "fuchsia",
19
+ "violet",
20
+ "rose",
21
+ "red",
22
+ "teal"
23
+ ].includes(key)).map(([key, value]) => [
24
+ key,
25
+ Object.fromEntries(
26
+ Object.entries(value).filter(([key2]) => ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"].includes(key2))
27
+ )
28
+ ])
29
+ );
30
+ return primaryColors;
31
+ })();
41
32
  const filteredGrayColors = Object.fromEntries(
42
33
  Object.entries(colors).filter(([key]) => ["slate", "gray", "zinc", "neutral", "stone"].includes(key)).map(([key, value]) => [key, Object.fromEntries(
43
34
  Object.entries(value).filter(([key2]) => ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "950"].includes(key2))
44
35
  )])
45
36
  );
46
- filteredGrayColors.sage = {
47
- 50: "#f2f2f2",
48
- 100: "#e6e6e6",
49
- 200: "#d9d9d9",
50
- 300: "#b8b8b8",
51
- 400: "#939393",
52
- 500: "#6f6f6f",
53
- 600: "#4b4b4b",
54
- 700: "#323232",
55
- 800: "#1f1f1f",
56
- 900: "#0b0b0b",
57
- 950: "#000000"
58
- };
59
- filteredGrayColors.ash = {
60
- 50: "#f9f9f8",
61
- 100: "#f1f0ee",
62
- 200: "#dad7d3",
63
- 300: "#c3beb8",
64
- 400: "#a9a49e",
65
- 500: "#908c84",
66
- 600: "#777168",
67
- 700: "#5e5950",
68
- 800: "#45403a",
69
- 900: "#2c2823",
70
- 950: "#161511"
71
- };
72
- filteredGrayColors.olive = {
73
- 50: "#fafaf2",
74
- 100: "#f5f5e6",
75
- 200: "#ebebd9",
76
- 300: "#d6d6b8",
77
- 400: "#b3b393",
78
- 500: "#8f8f6f",
79
- 600: "#6b6b4b",
80
- 700: "#4a4a32",
81
- 800: "#2a2a1f",
82
- 900: "#0e0e0b",
83
- 950: "#000000"
84
- };
85
- filteredGrayColors.leaf = {
86
- 50: "#f2faf2",
87
- 100: "#e6f5e6",
88
- 200: "#d9ebd9",
89
- 300: "#b8d6b8",
90
- 400: "#93b393",
91
- 500: "#6f8f6f",
92
- 600: "#4b6b4b",
93
- 700: "#326432",
94
- 800: "#1f2a1f",
95
- 900: "#0b0e0b",
96
- 950: "#000000"
97
- };
98
37
  const filteredColors = {
99
38
  ...filteredPrimaryColors,
100
39
  ...filteredGrayColors
@@ -113,20 +52,397 @@ export function useUnaThemes() {
113
52
  if (!colorPalette)
114
53
  throw new Error(`Invalid primary color: ${color}`);
115
54
  const colors2 = {};
55
+ for (const shade of Object.keys(colorPalette)) {
56
+ const value = colorPalette[shade];
57
+ if (value.startsWith("oklch("))
58
+ colors2[`--una-${prefix}-${shade}`] = value.replace("oklch(", "").replace(")", "");
59
+ }
116
60
  colors2[`--una-${prefix}-hex`] = colorPalette[600];
117
- for (const shade of Object.keys(colorPalette))
118
- colors2[`--una-${prefix}-${shade}`] = hexToRgb(colorPalette[shade]).join(", ");
119
61
  return colors2;
120
62
  }
121
- function getPrimaryColors(color) {
122
- return primaryThemes.filter(([colorName, _]) => colorName === color)[0][1];
63
+ function getPrimaryColors(color, defaultColor = "yellow") {
64
+ const theme = primaryThemes.find(([colorName, _]) => colorName === color);
65
+ if (!theme)
66
+ return getPrimaryColors(defaultColor);
67
+ return theme[1];
123
68
  }
124
- function getGrayColors(color) {
125
- return grayThemes.filter(([colorName, _]) => colorName === color)[0][1];
69
+ function getGrayColors(color, defaultColor = "stone") {
70
+ const theme = grayThemes.find(([colorName, _]) => colorName === color);
71
+ if (!theme)
72
+ return getGrayColors(defaultColor);
73
+ return theme[1];
126
74
  }
75
+ const predefinedThemes = [
76
+ {
77
+ name: "T3-Chat",
78
+ cssVars: {
79
+ light: {
80
+ "--una-background": "0.9754 0.0084 325.6414",
81
+ "--una-foreground": "0.3257 0.1161 325.0372",
82
+ "--una-card": "0.9754 0.0084 325.6414",
83
+ "--una-card-foreground": "0.3257 0.1161 325.0372",
84
+ "--una-popover": "1.0000 0 0",
85
+ "--una-popover-foreground": "0.3257 0.1161 325.0372",
86
+ "--una-primary": "0.5316 0.1409 355.1999",
87
+ "--una-primary-foreground": "1.0000 0 0",
88
+ "--una-secondary": "0.8696 0.0675 334.8991",
89
+ "--una-secondary-foreground": "0.4448 0.1341 324.7991",
90
+ "--una-muted": "0.9395 0.0260 331.5454",
91
+ "--una-muted-foreground": "0.4924 0.1244 324.4523",
92
+ "--una-accent": "0.8696 0.0675 334.8991",
93
+ "--una-accent-foreground": "0.4448 0.1341 324.7991",
94
+ "--una-destructive": "0.5248 0.1368 20.8317",
95
+ "--una-destructive-foreground": "1.0000 0 0",
96
+ "--una-border": "0.8568 0.0829 328.9110",
97
+ "--una-input": "0.8517 0.0558 336.6002",
98
+ "--una-ring": "0.5916 0.2180 0.5844",
99
+ "--una-chart-1": "0.6038 0.2363 344.4657",
100
+ "--una-chart-2": "0.4445 0.2251 300.6246",
101
+ "--una-chart-3": "0.3790 0.0438 226.1538",
102
+ "--una-chart-4": "0.8330 0.1185 88.3461",
103
+ "--una-chart-5": "0.7843 0.1256 58.9964",
104
+ "--una-sidebar": "0.9360 0.0288 320.5788",
105
+ "--una-sidebar-foreground": "0.4948 0.1909 354.5435",
106
+ "--una-sidebar-primary": "0.3963 0.0251 285.1962",
107
+ "--una-sidebar-primary-foreground": "0.9668 0.0124 337.5228",
108
+ "--una-sidebar-accent": "0.9789 0.0013 106.4235",
109
+ "--una-sidebar-accent-foreground": "0.3963 0.0251 285.1962",
110
+ "--una-sidebar-border": "0.8568 0.0829 328.9110",
111
+ "--una-sidebar-ring": "0.5916 0.2180 0.5844"
112
+ },
113
+ dark: {
114
+ "--una-background": "0.2409 0.0201 307.5346",
115
+ "--una-foreground": "0.8398 0.0387 309.5391",
116
+ "--una-card": "0.2803 0.0232 307.5413",
117
+ "--una-card-foreground": "0.8456 0.0302 341.4597",
118
+ "--una-popover": "0.1548 0.0132 338.9015",
119
+ "--una-popover-foreground": "0.9647 0.0091 341.8035",
120
+ "--una-primary": "0.4607 0.1853 4.0994",
121
+ "--una-primary-foreground": "0.8560 0.0618 346.3684",
122
+ "--una-secondary": "0.3137 0.0306 310.0610",
123
+ "--una-secondary-foreground": "0.8483 0.0382 307.9613",
124
+ "--una-muted": "0.2634 0.0219 309.4748",
125
+ "--una-muted-foreground": "0.7940 0.0372 307.1032",
126
+ "--una-accent": "0.3649 0.0508 308.4911",
127
+ "--una-accent-foreground": "0.9647 0.0091 341.8035",
128
+ "--una-destructive": "0.2258 0.0524 12.6119",
129
+ "--una-destructive-foreground": "1.0000 0 0",
130
+ "--una-border": "0.3286 0.0154 343.4461",
131
+ "--una-input": "0.3387 0.0195 332.8347",
132
+ "--una-ring": "0.5916 0.2180 0.5844",
133
+ "--una-chart-1": "0.5316 0.1409 355.1999",
134
+ "--una-chart-2": "0.5633 0.1912 306.8561",
135
+ "--una-chart-3": "0.7227 0.1502 60.5799",
136
+ "--una-chart-4": "0.6193 0.2029 312.7422",
137
+ "--una-chart-5": "0.6118 0.2093 6.1387",
138
+ "--una-sidebar": "0.1893 0.0163 331.0475",
139
+ "--una-sidebar-foreground": "0.8607 0.0293 343.6612",
140
+ "--una-sidebar-primary": "0.4882 0.2172 264.3763",
141
+ "--una-sidebar-primary-foreground": "1.0000 0 0",
142
+ "--una-sidebar-accent": "0.2337 0.0261 338.1961",
143
+ "--una-sidebar-accent-foreground": "0.9674 0.0013 286.3752",
144
+ "--una-sidebar-border": "0.3286 0.0154 343.4461",
145
+ "--una-sidebar-ring": "0.5916 0.2180 0.5844"
146
+ }
147
+ }
148
+ },
149
+ {
150
+ name: "Vercel",
151
+ cssVars: {
152
+ light: {
153
+ "--una-background": "0.9900 0 0",
154
+ "--una-foreground": "0 0 0",
155
+ "--una-card": "1 0 0",
156
+ "--una-card-foreground": "0 0 0",
157
+ "--una-popover": "0.9900 0 0",
158
+ "--una-popover-foreground": "0 0 0",
159
+ "--una-primary": "0 0 0",
160
+ "--una-primary-foreground": "1 0 0",
161
+ "--una-secondary": "0.9400 0 0",
162
+ "--una-secondary-foreground": "0 0 0",
163
+ "--una-muted": "0.9700 0 0",
164
+ "--una-muted-foreground": "0.4400 0 0",
165
+ "--una-accent": "0.9400 0 0",
166
+ "--una-accent-foreground": "0 0 0",
167
+ "--una-destructive": "0.6300 0.1900 23.0300",
168
+ "--una-destructive-foreground": "1 0 0",
169
+ "--una-border": "0.9200 0 0",
170
+ "--una-input": "0.9400 0 0",
171
+ "--una-ring": "0 0 0",
172
+ "--una-chart-1": "0.8100 0.1700 75.3500",
173
+ "--una-chart-2": "0.5500 0.2200 264.5300",
174
+ "--una-chart-3": "0.7200 0 0",
175
+ "--una-chart-4": "0.9200 0 0",
176
+ "--una-chart-5": "0.5600 0 0",
177
+ "--una-sidebar": "0.9900 0 0",
178
+ "--una-sidebar-foreground": "0 0 0",
179
+ "--una-sidebar-primary": "0 0 0",
180
+ "--una-sidebar-primary-foreground": "1 0 0",
181
+ "--una-sidebar-accent": "0.9400 0 0",
182
+ "--una-sidebar-accent-foreground": "0 0 0",
183
+ "--una-sidebar-border": "0.9400 0 0",
184
+ "--una-sidebar-ring": "0 0 0"
185
+ },
186
+ dark: {
187
+ "--una-background": "0 0 0",
188
+ "--una-foreground": "1 0 0",
189
+ "--una-card": "0.1400 0 0",
190
+ "--una-card-foreground": "1 0 0",
191
+ "--una-popover": "0.1800 0 0",
192
+ "--una-popover-foreground": "1 0 0",
193
+ "--una-primary": "1 0 0",
194
+ "--una-primary-foreground": "0 0 0",
195
+ "--una-secondary": "0.2500 0 0",
196
+ "--una-secondary-foreground": "1 0 0",
197
+ "--una-muted": "0.2300 0 0",
198
+ "--una-muted-foreground": "0.7200 0 0",
199
+ "--una-accent": "0.3200 0 0",
200
+ "--una-accent-foreground": "1 0 0",
201
+ "--una-destructive": "0.6900 0.2000 23.9100",
202
+ "--una-destructive-foreground": "0 0 0",
203
+ "--una-border": "0.2600 0 0",
204
+ "--una-input": "0.3200 0 0",
205
+ "--una-ring": "0.7200 0 0",
206
+ "--una-chart-1": "0.8100 0.1700 75.3500",
207
+ "--una-chart-2": "0.5800 0.2100 260.8400",
208
+ "--una-chart-3": "0.5600 0 0",
209
+ "--una-chart-4": "0.4400 0 0",
210
+ "--una-chart-5": "0.9200 0 0",
211
+ "--una-sidebar": "0.1800 0 0",
212
+ "--una-sidebar-foreground": "1 0 0",
213
+ "--una-sidebar-primary": "1 0 0",
214
+ "--una-sidebar-primary-foreground": "0 0 0",
215
+ "--una-sidebar-accent": "0.3200 0 0",
216
+ "--una-sidebar-accent-foreground": "1 0 0",
217
+ "--una-sidebar-border": "0.3200 0 0",
218
+ "--una-sidebar-ring": "0.7200 0 0"
219
+ }
220
+ }
221
+ },
222
+ {
223
+ name: "Notebook",
224
+ cssVars: {
225
+ light: {
226
+ "--una-background": "0.9821 0 0",
227
+ "--una-foreground": "0.3485 0 0",
228
+ "--una-card": "1.0000 0 0",
229
+ "--una-card-foreground": "0.3485 0 0",
230
+ "--una-popover": "1.0000 0 0",
231
+ "--una-popover-foreground": "0.3485 0 0",
232
+ "--una-primary": "0.4891 0 0",
233
+ "--una-primary-foreground": "0.9551 0 0",
234
+ "--una-secondary": "0.9006 0 0",
235
+ "--una-secondary-foreground": "0.3485 0 0",
236
+ "--una-muted": "0.9158 0 0",
237
+ "--una-muted-foreground": "0.4313 0 0",
238
+ "--una-accent": "0.9354 0.0456 94.8549",
239
+ "--una-accent-foreground": "0.4015 0.0436 37.9587",
240
+ "--una-destructive": "0.6627 0.0978 20.0041",
241
+ "--una-destructive-foreground": "1.0000 0 0",
242
+ "--una-border": "0.5538 0.0025 17.2320",
243
+ "--una-input": "1.0000 0 0",
244
+ "--una-ring": "0.7058 0 0",
245
+ "--una-chart-1": "0.3211 0 0",
246
+ "--una-chart-2": "0.4495 0 0",
247
+ "--una-chart-3": "0.5693 0 0",
248
+ "--una-chart-4": "0.6830 0 0",
249
+ "--una-chart-5": "0.7921 0 0",
250
+ "--una-sidebar": "0.9551 0 0",
251
+ "--una-sidebar-foreground": "0.3485 0 0",
252
+ "--una-sidebar-primary": "0.4891 0 0",
253
+ "--una-sidebar-primary-foreground": "0.9551 0 0",
254
+ "--una-sidebar-accent": "0.9354 0.0456 94.8549",
255
+ "--una-sidebar-accent-foreground": "0.4015 0.0436 37.9587",
256
+ "--una-sidebar-border": "0.8078 0 0",
257
+ "--una-sidebar-ring": "0.7058 0 0"
258
+ },
259
+ dark: {
260
+ "--una-background": "0.2891 0 0",
261
+ "--una-foreground": "0.8945 0 0",
262
+ "--una-card": "0.3211 0 0",
263
+ "--una-card-foreground": "0.8945 0 0",
264
+ "--una-popover": "0.3211 0 0",
265
+ "--una-popover-foreground": "0.8945 0 0",
266
+ "--una-primary": "0.7572 0 0",
267
+ "--una-primary-foreground": "0.2891 0 0",
268
+ "--una-secondary": "0.4676 0 0",
269
+ "--una-secondary-foreground": "0.8078 0 0",
270
+ "--una-muted": "0.3904 0 0",
271
+ "--una-muted-foreground": "0.7058 0 0",
272
+ "--una-accent": "0.9067 0 0",
273
+ "--una-accent-foreground": "0.3211 0 0",
274
+ "--una-destructive": "0.7915 0.0491 18.2410",
275
+ "--una-destructive-foreground": "0.2891 0 0",
276
+ "--una-border": "0.4276 0 0",
277
+ "--una-input": "0.3211 0 0",
278
+ "--una-ring": "0.8078 0 0",
279
+ "--una-chart-1": "0.9521 0 0",
280
+ "--una-chart-2": "0.8576 0 0",
281
+ "--una-chart-3": "0.7572 0 0",
282
+ "--una-chart-4": "0.6534 0 0",
283
+ "--una-chart-5": "0.5452 0 0",
284
+ "--una-sidebar": "0.2478 0 0",
285
+ "--una-sidebar-foreground": "0.8945 0 0",
286
+ "--una-sidebar-primary": "0.7572 0 0",
287
+ "--una-sidebar-primary-foreground": "0.2478 0 0",
288
+ "--una-sidebar-accent": "0.9067 0 0",
289
+ "--una-sidebar-accent-foreground": "0.3211 0 0",
290
+ "--una-sidebar-border": "0.4276 0 0",
291
+ "--una-sidebar-ring": "0.8078 0 0"
292
+ }
293
+ }
294
+ },
295
+ {
296
+ name: "Sunset Horizon",
297
+ cssVars: {
298
+ light: {
299
+ "--una-background": "0.9856 0.0084 56.3169",
300
+ "--una-foreground": "0.3353 0.0132 2.7676",
301
+ "--una-card": "1.0000 0 0",
302
+ "--una-card-foreground": "0.3353 0.0132 2.7676",
303
+ "--una-popover": "1.0000 0 0",
304
+ "--una-popover-foreground": "0.3353 0.0132 2.7676",
305
+ "--una-primary": "0.7357 0.1641 34.7091",
306
+ "--una-primary-foreground": "1.0000 0 0",
307
+ "--una-secondary": "0.9596 0.0200 28.9029",
308
+ "--una-secondary-foreground": "0.5587 0.1294 32.7364",
309
+ "--una-muted": "0.9656 0.0176 39.4009",
310
+ "--una-muted-foreground": "0.5534 0.0116 58.0708",
311
+ "--una-accent": "0.8278 0.1131 57.9984",
312
+ "--una-accent-foreground": "0.3353 0.0132 2.7676",
313
+ "--una-destructive": "0.6122 0.2082 22.2410",
314
+ "--una-destructive-foreground": "1.0000 0 0",
315
+ "--una-border": "0.9296 0.0370 38.6868",
316
+ "--una-input": "0.9296 0.0370 38.6868",
317
+ "--una-ring": "0.7357 0.1641 34.7091",
318
+ "--una-chart-1": "0.7357 0.1641 34.7091",
319
+ "--una-chart-2": "0.8278 0.1131 57.9984",
320
+ "--una-chart-3": "0.8773 0.0763 54.9314",
321
+ "--una-chart-4": "0.8200 0.1054 40.8859",
322
+ "--una-chart-5": "0.6368 0.1306 32.0721",
323
+ "--una-sidebar": "0.9656 0.0176 39.4009",
324
+ "--una-sidebar-foreground": "0.3353 0.0132 2.7676",
325
+ "--una-sidebar-primary": "0.7357 0.1641 34.7091",
326
+ "--una-sidebar-primary-foreground": "1.0000 0 0",
327
+ "--una-sidebar-accent": "0.8278 0.1131 57.9984",
328
+ "--una-sidebar-accent-foreground": "0.3353 0.0132 2.7676",
329
+ "--una-sidebar-border": "0.9296 0.0370 38.6868",
330
+ "--una-sidebar-ring": "0.7357 0.1641 34.7091"
331
+ },
332
+ dark: {
333
+ "--una-background": "0.2569 0.0169 352.4042",
334
+ "--una-foreground": "0.9397 0.0119 51.3156",
335
+ "--una-card": "0.3184 0.0176 341.4465",
336
+ "--una-card-foreground": "0.9397 0.0119 51.3156",
337
+ "--una-popover": "0.3184 0.0176 341.4465",
338
+ "--una-popover-foreground": "0.9397 0.0119 51.3156",
339
+ "--una-primary": "0.7357 0.1641 34.7091",
340
+ "--una-primary-foreground": "1.0000 0 0",
341
+ "--una-secondary": "0.3637 0.0203 342.2664",
342
+ "--una-secondary-foreground": "0.9397 0.0119 51.3156",
343
+ "--una-muted": "0.3184 0.0176 341.4465",
344
+ "--una-muted-foreground": "0.8378 0.0237 52.6346",
345
+ "--una-accent": "0.8278 0.1131 57.9984",
346
+ "--una-accent-foreground": "0.2569 0.0169 352.4042",
347
+ "--una-destructive": "0.6122 0.2082 22.2410",
348
+ "--una-destructive-foreground": "1.0000 0 0",
349
+ "--una-border": "0.3637 0.0203 342.2664",
350
+ "--una-input": "0.3637 0.0203 342.2664",
351
+ "--una-ring": "0.7357 0.1641 34.7091",
352
+ "--una-chart-1": "0.7357 0.1641 34.7091",
353
+ "--una-chart-2": "0.8278 0.1131 57.9984",
354
+ "--una-chart-3": "0.8773 0.0763 54.9314",
355
+ "--una-chart-4": "0.8200 0.1054 40.8859",
356
+ "--una-chart-5": "0.6368 0.1306 32.0721",
357
+ "--una-sidebar": "0.2569 0.0169 352.4042",
358
+ "--una-sidebar-foreground": "0.9397 0.0119 51.3156",
359
+ "--una-sidebar-primary": "0.7357 0.1641 34.7091",
360
+ "--una-sidebar-primary-foreground": "1.0000 0 0",
361
+ "--una-sidebar-accent": "0.8278 0.1131 57.9984",
362
+ "--una-sidebar-accent-foreground": "0.2569 0.0169 352.4042",
363
+ "--una-sidebar-border": "0.3637 0.0203 342.2664",
364
+ "--una-sidebar-ring": "0.7357 0.1641 34.7091"
365
+ }
366
+ }
367
+ },
368
+ {
369
+ name: "Claude",
370
+ cssVars: {
371
+ light: {
372
+ "--una-background": "0.9818 0.0054 95.0986",
373
+ "--una-foreground": "0.3438 0.0269 95.7226",
374
+ "--una-card": "0.9818 0.0054 95.0986",
375
+ "--una-card-foreground": "0.1908 0.0020 106.5859",
376
+ "--una-popover": "1.0000 0 0",
377
+ "--una-popover-foreground": "0.2671 0.0196 98.9390",
378
+ "--una-primary": "0.6171 0.1375 39.0427",
379
+ "--una-primary-foreground": "1.0000 0 0",
380
+ "--una-secondary": "0.9245 0.0138 92.9892",
381
+ "--una-secondary-foreground": "0.4334 0.0177 98.6048",
382
+ "--una-muted": "0.9341 0.0153 90.2390",
383
+ "--una-muted-foreground": "0.6059 0.0075 97.4233",
384
+ "--una-accent": "0.9245 0.0138 92.9892",
385
+ "--una-accent-foreground": "0.2671 0.0196 98.9390",
386
+ "--una-destructive": "0.1908 0.0020 106.5859",
387
+ "--una-destructive-foreground": "1.0000 0 0",
388
+ "--una-border": "0.8847 0.0069 97.3627",
389
+ "--una-input": "0.7621 0.0156 98.3528",
390
+ "--una-ring": "0.5937 0.1673 253.0630",
391
+ "--una-chart-1": "0.5583 0.1276 42.9956",
392
+ "--una-chart-2": "0.6898 0.1581 290.4107",
393
+ "--una-chart-3": "0.8816 0.0276 93.1280",
394
+ "--una-chart-4": "0.8822 0.0403 298.1792",
395
+ "--una-chart-5": "0.5608 0.1348 42.0584",
396
+ "--una-sidebar": "0.9663 0.0080 98.8792",
397
+ "--una-sidebar-foreground": "0.3590 0.0051 106.6524",
398
+ "--una-sidebar-primary": "0.6171 0.1375 39.0427",
399
+ "--una-sidebar-primary-foreground": "0.9881 0 0",
400
+ "--una-sidebar-accent": "0.9245 0.0138 92.9892",
401
+ "--una-sidebar-accent-foreground": "0.3250 0 0",
402
+ "--una-sidebar-border": "0.9401 0 0",
403
+ "--una-sidebar-ring": "0.7731 0 0"
404
+ },
405
+ dark: {
406
+ "--una-background": "0.2679 0.0036 106.6427",
407
+ "--una-foreground": "0.8074 0.0142 93.0137",
408
+ "--una-card": "0.2679 0.0036 106.6427",
409
+ "--una-card-foreground": "0.9818 0.0054 95.0986",
410
+ "--una-popover": "0.3085 0.0035 106.6039",
411
+ "--una-popover-foreground": "0.9211 0.0040 106.4781",
412
+ "--una-primary": "0.6724 0.1308 38.7559",
413
+ "--una-primary-foreground": "1.0000 0 0",
414
+ "--una-secondary": "0.9818 0.0054 95.0986",
415
+ "--una-secondary-foreground": "0.3085 0.0035 106.6039",
416
+ "--una-muted": "0.2213 0.0038 106.7070",
417
+ "--una-muted-foreground": "0.7713 0.0169 99.0657",
418
+ "--una-accent": "0.2130 0.0078 95.4245",
419
+ "--una-accent-foreground": "0.9663 0.0080 98.8792",
420
+ "--una-destructive": "0.6368 0.2078 25.3313",
421
+ "--una-destructive-foreground": "1.0000 0 0",
422
+ "--una-border": "0.3618 0.0101 106.8928",
423
+ "--una-input": "0.4336 0.0113 100.2195",
424
+ "--una-ring": "0.5937 0.1673 253.0630",
425
+ "--una-chart-1": "0.5583 0.1276 42.9956",
426
+ "--una-chart-2": "0.6898 0.1581 290.4107",
427
+ "--una-chart-3": "0.2130 0.0078 95.4245",
428
+ "--una-chart-4": "0.3074 0.0516 289.3230",
429
+ "--una-chart-5": "0.5608 0.1348 42.0584",
430
+ "--una-sidebar": "0.2357 0.0024 67.7077",
431
+ "--una-sidebar-foreground": "0.8074 0.0142 93.0137",
432
+ "--una-sidebar-primary": "0.3250 0 0",
433
+ "--una-sidebar-primary-foreground": "0.9881 0 0",
434
+ "--una-sidebar-accent": "0.1680 0.0020 106.6177",
435
+ "--una-sidebar-accent-foreground": "0.8074 0.0142 93.0137",
436
+ "--una-sidebar-border": "0.3618 0.0101 106.8928",
437
+ "--una-sidebar-ring": "0.7731 0 0"
438
+ }
439
+ }
440
+ }
441
+ ];
127
442
  return {
128
443
  primaryThemes,
129
444
  grayThemes,
445
+ predefinedThemes,
130
446
  getPrimaryColors,
131
447
  getGrayColors
132
448
  };
@@ -10,6 +10,18 @@ export default defineNuxtPlugin(() => {
10
10
  const html = document.documentElement;
11
11
  html.removeAttribute("style");
12
12
  const computedStyles = computed(() => {
13
+ if (settings.value.theme) {
14
+ return `
15
+ :root {
16
+ ${Object.entries(settings.value.theme.cssVars.light).map(([k, v]) => `${k}: ${v};`).join("\n")}
17
+ --una-radius: ${settings.value.radius}rem;
18
+ --una-font-size: ${settings.value.fontSize}px;
19
+ }
20
+ .dark {
21
+ ${Object.entries(settings.value.theme.cssVars.dark).map(([k, v]) => `${k}: ${v};`).join("\n")}
22
+ }
23
+ `;
24
+ }
13
25
  return `
14
26
  :root {
15
27
  ${Object.entries(settings.value.primaryColors).map(([k, v]) => `${k}: ${v};`).join("\n")}
@@ -16,6 +16,15 @@ export default defineNuxtPlugin(() => {
16
16
  const html = document.documentElement
17
17
  ${process.dev ? "console.log({ settings })" : ""}
18
18
 
19
+ if (settings.theme) {
20
+ Object.entries(settings.theme.cssVars.light).map(i => html.style.setProperty(i[0], i[1]))
21
+ Object.entries(settings.theme.cssVars.dark).map(i => html.style.setProperty(i[0], i[1]))
22
+
23
+ html.style.setProperty('--una-radius', settings.radius + 'rem')
24
+ html.style.setProperty('--una-font-size', settings.fontSize + 'px')
25
+ return
26
+ }
27
+
19
28
  if (settings.primary)
20
29
  Object.entries(settings.primaryColors).map(i => html.style.setProperty(i[0], i[1]))
21
30
  if (settings.gray)
@@ -24,9 +24,7 @@ export * from './kbd.js';
24
24
  export * from './label.js';
25
25
  export * from './link.js';
26
26
  export * from './navigation-menu.js';
27
- export * from './number-field.js';
28
27
  export * from './pagination.js';
29
- export * from './pin-input.js';
30
28
  export * from './popover.js';
31
29
  export * from './progress.js';
32
30
  export * from './radio-group.js';
@@ -63,6 +61,13 @@ export interface ColorPalette {
63
61
  export interface UnaSettings {
64
62
  primaryColors: Colors;
65
63
  grayColors: Colors;
64
+ theme: {
65
+ name: string;
66
+ cssVars: {
67
+ light: Colors;
68
+ dark: Colors;
69
+ };
70
+ } | null | false | undefined;
66
71
  primary: string;
67
72
  gray: string;
68
73
  fontSize: number;
@@ -24,9 +24,7 @@ export * from "./kbd.js";
24
24
  export * from "./label.js";
25
25
  export * from "./link.js";
26
26
  export * from "./navigation-menu.js";
27
- export * from "./number-field.js";
28
27
  export * from "./pagination.js";
29
- export * from "./pin-input.js";
30
28
  export * from "./popover.js";
31
29
  export * from "./progress.js";
32
30
  export * from "./radio-group.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@una-ui/nuxt-edge",
3
3
  "type": "module",
4
- "version": "0.61.0-29182246.bc2c328",
4
+ "version": "1.0.0-alpha.0-29173950.b6a8c03",
5
5
  "description": "Nuxt module for @una-ui",
6
6
  "author": "Phojie Rengel <phojrengel@gmail.com>",
7
7
  "license": "MIT",
@@ -41,12 +41,12 @@
41
41
  "@nuxt/kit": "^3.17.5",
42
42
  "@nuxtjs/color-mode": "^3.5.2",
43
43
  "@tanstack/vue-table": "^8.21.3",
44
- "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@0.61.0-29182246.bc2c328",
45
- "@una-ui/preset": "npm:@una-ui/preset-edge@0.61.0-29182246.bc2c328",
46
- "@unocss/core": "^66.0.0",
47
- "@unocss/nuxt": "^66.0.0",
48
- "@unocss/preset-attributify": "^66.0.0",
49
- "@unocss/preset-icons": "^66.0.0",
44
+ "@una-ui/extractor-vue-script": "npm:@una-ui/extractor-vue-script-edge@1.0.0-alpha.0-29173950.b6a8c03",
45
+ "@una-ui/preset": "npm:@una-ui/preset-edge@1.0.0-alpha.0-29173950.b6a8c03",
46
+ "@unocss/core": "^66.2.0",
47
+ "@unocss/nuxt": "^66.2.0",
48
+ "@unocss/preset-attributify": "^66.2.0",
49
+ "@unocss/preset-icons": "^66.2.0",
50
50
  "@vee-validate/nuxt": "^4.15.1",
51
51
  "@vee-validate/zod": "^4.15.1",
52
52
  "@vueuse/core": "^12.8.2",
@@ -57,12 +57,12 @@
57
57
  "ohash": "^1.1.6",
58
58
  "reka-ui": "^2.3.1",
59
59
  "tailwind-merge": "^3.3.1",
60
- "unocss": "^66.0.0",
60
+ "unocss": "^66.2.0",
61
61
  "unocss-preset-animations": "^1.2.1",
62
62
  "vaul-vue": "^0.4.1"
63
63
  },
64
64
  "devDependencies": {
65
- "@iconify-json/lucide": "^1.2.51",
65
+ "@iconify-json/lucide": "^1.2.49",
66
66
  "@iconify-json/radix-icons": "^1.2.2",
67
67
  "@iconify-json/tabler": "^1.2.19",
68
68
  "@nuxt/module-builder": "^1.0.1",
@@ -77,7 +77,7 @@
77
77
  "build": "nuxt-build-module build",
78
78
  "stub": "nuxt-build-module build --stub && pnpm nuxt-module-build prepare",
79
79
  "dev": "nuxi dev playground",
80
- "playground:build": "nuxi generate playground",
80
+ "playground:build": "nuxi build playground",
81
81
  "playground:preview": "nuxi preview playground"
82
82
  }
83
83
  }