@byyuurin/ui 0.0.11 → 0.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.
Files changed (297) hide show
  1. package/README.md +170 -58
  2. package/dist/module.d.mts +4 -13
  3. package/dist/module.json +4 -4
  4. package/dist/module.mjs +54 -20
  5. package/dist/runtime/components/Accordion.vue +28 -23
  6. package/dist/runtime/components/Accordion.vue.d.ts +51 -29
  7. package/dist/runtime/components/Alert.vue +47 -27
  8. package/dist/runtime/components/Alert.vue.d.ts +37 -25
  9. package/dist/runtime/components/App.vue +9 -8
  10. package/dist/runtime/components/App.vue.d.ts +22 -20
  11. package/dist/runtime/components/Avatar.vue +65 -21
  12. package/dist/runtime/components/Avatar.vue.d.ts +27 -13
  13. package/dist/runtime/components/AvatarGroup.vue +14 -10
  14. package/dist/runtime/components/AvatarGroup.vue.d.ts +12 -9
  15. package/dist/runtime/components/Badge.vue +64 -32
  16. package/dist/runtime/components/Badge.vue.d.ts +30 -29
  17. package/dist/runtime/components/Breadcrumb.vue +40 -22
  18. package/dist/runtime/components/Breadcrumb.vue.d.ts +48 -21
  19. package/dist/runtime/components/Button.vue +113 -52
  20. package/dist/runtime/components/Button.vue.d.ts +36 -20
  21. package/dist/runtime/components/Calendar.vue +50 -43
  22. package/dist/runtime/components/Calendar.vue.d.ts +58 -31
  23. package/dist/runtime/components/Card.vue +18 -14
  24. package/dist/runtime/components/Card.vue.d.ts +18 -14
  25. package/dist/runtime/components/Carousel.vue +99 -46
  26. package/dist/runtime/components/Carousel.vue.d.ts +46 -25
  27. package/dist/runtime/components/Checkbox.vue +60 -35
  28. package/dist/runtime/components/Checkbox.vue.d.ts +35 -28
  29. package/dist/runtime/components/CheckboxGroup.vue +131 -0
  30. package/dist/runtime/components/CheckboxGroup.vue.d.ts +89 -0
  31. package/dist/runtime/components/Chip.vue +35 -32
  32. package/dist/runtime/components/Chip.vue.d.ts +33 -15
  33. package/dist/runtime/components/Collapsible.vue +13 -9
  34. package/dist/runtime/components/Collapsible.vue.d.ts +16 -8
  35. package/dist/runtime/components/Drawer.vue +80 -70
  36. package/dist/runtime/components/Drawer.vue.d.ts +51 -28
  37. package/dist/runtime/components/DropdownMenu.vue +23 -16
  38. package/dist/runtime/components/DropdownMenu.vue.d.ts +77 -36
  39. package/dist/runtime/components/DropdownMenuContent.vue +136 -106
  40. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +38 -26
  41. package/dist/runtime/components/FieldGroup.vue +33 -0
  42. package/dist/runtime/components/FieldGroup.vue.d.ts +33 -0
  43. package/dist/runtime/components/Form.vue +172 -88
  44. package/dist/runtime/components/Form.vue.d.ts +69 -44
  45. package/dist/runtime/components/FormField.vue +108 -0
  46. package/dist/runtime/components/FormField.vue.d.ts +63 -0
  47. package/dist/runtime/components/Icon.vue +20 -0
  48. package/dist/runtime/components/Icon.vue.d.ts +9 -0
  49. package/dist/runtime/components/Input.vue +84 -79
  50. package/dist/runtime/components/Input.vue.d.ts +55 -43
  51. package/dist/runtime/components/InputNumber.vue +66 -52
  52. package/dist/runtime/components/InputNumber.vue.d.ts +50 -109
  53. package/dist/runtime/components/InputTags.vue +155 -0
  54. package/dist/runtime/components/InputTags.vue.d.ts +85 -0
  55. package/dist/runtime/components/Kbd.vue +11 -5
  56. package/dist/runtime/components/Kbd.vue.d.ts +17 -11
  57. package/dist/runtime/components/Link.vue +54 -197
  58. package/dist/runtime/components/Link.vue.d.ts +17 -17
  59. package/dist/runtime/components/LinkBase.vue +11 -33
  60. package/dist/runtime/components/LinkBase.vue.d.ts +8 -3
  61. package/dist/runtime/components/Marquee.vue +38 -0
  62. package/dist/runtime/components/Marquee.vue.d.ts +54 -0
  63. package/dist/runtime/components/Modal.vue +53 -39
  64. package/dist/runtime/components/Modal.vue.d.ts +64 -34
  65. package/dist/runtime/components/NavigationMenu.vue +345 -0
  66. package/dist/runtime/components/NavigationMenu.vue.d.ts +216 -0
  67. package/dist/runtime/components/OverlayProvider.vue +3 -3
  68. package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -1
  69. package/dist/runtime/components/Pagination.vue +39 -47
  70. package/dist/runtime/components/Pagination.vue.d.ts +54 -31
  71. package/dist/runtime/components/PinInput.vue +46 -32
  72. package/dist/runtime/components/PinInput.vue.d.ts +40 -21
  73. package/dist/runtime/components/Popover.vue +33 -19
  74. package/dist/runtime/components/Popover.vue.d.ts +57 -32
  75. package/dist/runtime/components/Progress.vue +31 -26
  76. package/dist/runtime/components/Progress.vue.d.ts +32 -23
  77. package/dist/runtime/components/RadioGroup.vue +75 -48
  78. package/dist/runtime/components/RadioGroup.vue.d.ts +58 -36
  79. package/dist/runtime/components/ScrollArea.vue +33 -31
  80. package/dist/runtime/components/ScrollArea.vue.d.ts +9 -5
  81. package/dist/runtime/components/Select.vue +166 -76
  82. package/dist/runtime/components/Select.vue.d.ts +206 -65
  83. package/dist/runtime/components/Separator.vue +42 -16
  84. package/dist/runtime/components/Separator.vue.d.ts +35 -14
  85. package/dist/runtime/components/Skeleton.vue +18 -6
  86. package/dist/runtime/components/Skeleton.vue.d.ts +4 -4
  87. package/dist/runtime/components/Slider.vue +42 -24
  88. package/dist/runtime/components/Slider.vue.d.ts +43 -27
  89. package/dist/runtime/components/Switch.vue +40 -31
  90. package/dist/runtime/components/Switch.vue.d.ts +36 -27
  91. package/dist/runtime/components/Table.vue +329 -79
  92. package/dist/runtime/components/Table.vue.d.ts +152 -66
  93. package/dist/runtime/components/Tabs.vue +70 -23
  94. package/dist/runtime/components/Tabs.vue.d.ts +61 -29
  95. package/dist/runtime/components/Textarea.vue +102 -54
  96. package/dist/runtime/components/Textarea.vue.d.ts +57 -41
  97. package/dist/runtime/components/Timeline.vue +102 -0
  98. package/dist/runtime/components/Timeline.vue.d.ts +74 -0
  99. package/dist/runtime/components/Toast.vue +84 -38
  100. package/dist/runtime/components/Toast.vue.d.ts +48 -27
  101. package/dist/runtime/components/ToastProvider.vue +31 -22
  102. package/dist/runtime/components/ToastProvider.vue.d.ts +30 -17
  103. package/dist/runtime/components/Tooltip.vue +33 -21
  104. package/dist/runtime/components/Tooltip.vue.d.ts +37 -15
  105. package/dist/runtime/composables/defineShortcuts.d.ts +16 -0
  106. package/dist/runtime/composables/defineShortcuts.js +129 -0
  107. package/dist/runtime/composables/useAvatarGroup.d.ts +8 -3
  108. package/dist/runtime/composables/useAvatarGroup.js +10 -3
  109. package/dist/runtime/composables/useComponentIcons.d.ts +9 -6
  110. package/dist/runtime/composables/useComponentIcons.js +4 -4
  111. package/dist/runtime/composables/useFieldGroup.d.ts +8 -0
  112. package/dist/runtime/composables/useFieldGroup.js +14 -0
  113. package/dist/runtime/composables/useFormField.d.ts +62 -0
  114. package/dist/runtime/composables/useFormField.js +99 -0
  115. package/dist/runtime/composables/useKbd.d.ts +3 -2
  116. package/dist/runtime/composables/useKbd.js +3 -2
  117. package/dist/runtime/composables/useLocale.d.ts +68 -5
  118. package/dist/runtime/composables/useLocale.js +11 -11
  119. package/dist/runtime/composables/useOverlay.d.ts +51 -15
  120. package/dist/runtime/composables/useOverlay.js +44 -30
  121. package/dist/runtime/composables/usePortal.d.ts +6 -0
  122. package/dist/runtime/composables/usePortal.js +17 -0
  123. package/dist/runtime/composables/useToast.d.ts +12 -5
  124. package/dist/runtime/composables/useToast.js +12 -7
  125. package/dist/runtime/locale/en.d.ts +30 -1
  126. package/dist/runtime/locale/en.js +2 -1
  127. package/dist/runtime/locale/index.d.ts +2 -2
  128. package/dist/runtime/locale/index.js +1 -1
  129. package/dist/runtime/locale/zh_tw.d.ts +31 -0
  130. package/dist/runtime/locale/{zh-tw.js → zh_tw.js} +2 -1
  131. package/dist/runtime/plugins/colors.d.ts +2 -0
  132. package/dist/runtime/plugins/colors.js +50 -0
  133. package/dist/runtime/types/app.config.d.ts +6 -0
  134. package/dist/runtime/types/form.d.ts +58 -17
  135. package/dist/runtime/types/form.js +11 -0
  136. package/dist/runtime/types/index.d.ts +56 -8
  137. package/dist/runtime/types/index.js +49 -1
  138. package/dist/runtime/types/input.d.ts +8 -0
  139. package/dist/runtime/types/locale.d.ts +5 -0
  140. package/dist/runtime/types/style.d.ts +33 -0
  141. package/dist/runtime/types/style.js +0 -0
  142. package/dist/runtime/types/unocss.d.ts +4 -0
  143. package/dist/runtime/types/utils.d.ts +41 -37
  144. package/dist/runtime/utils/form.d.ts +5 -1
  145. package/dist/runtime/utils/form.js +49 -0
  146. package/dist/runtime/utils/index.d.ts +10 -13
  147. package/dist/runtime/utils/index.js +41 -48
  148. package/dist/runtime/utils/link.d.ts +3 -2
  149. package/dist/runtime/utils/link.js +16 -2
  150. package/dist/runtime/utils/locale.d.ts +5 -0
  151. package/dist/runtime/utils/locale.js +10 -0
  152. package/dist/runtime/utils/style.d.ts +94 -0
  153. package/dist/runtime/utils/style.js +37 -0
  154. package/dist/runtime/vue/components/Icon.vue +15 -0
  155. package/dist/runtime/vue/components/Icon.vue.d.ts +7 -0
  156. package/dist/runtime/vue/components/Link.vue +163 -0
  157. package/dist/runtime/vue/components/Link.vue.d.ts +95 -0
  158. package/dist/runtime/vue/composables/useAppConfig.d.ts +1 -0
  159. package/dist/runtime/vue/composables/useAppConfig.js +4 -0
  160. package/dist/runtime/vue/plugins/color-mode.d.ts +4 -0
  161. package/dist/runtime/vue/plugins/color-mode.js +6 -0
  162. package/dist/runtime/vue/plugins/head.d.ts +4 -0
  163. package/dist/runtime/vue/plugins/head.js +9 -0
  164. package/dist/runtime/vue/stubs.d.ts +16 -1
  165. package/dist/runtime/vue/stubs.js +32 -1
  166. package/dist/setup.d.mts +13 -0
  167. package/dist/setup.mjs +12 -0
  168. package/dist/shared/ui.CzIlLITK.mjs +51 -0
  169. package/dist/shared/ui.DLOxhmP0.mjs +4242 -0
  170. package/dist/shared/ui.DpbffTXs.d.mts +84 -0
  171. package/dist/shared/ui.IulR-OYx.d.mts +64 -0
  172. package/dist/types.d.mts +3 -1
  173. package/dist/unocss.d.mts +12 -52
  174. package/dist/unocss.mjs +144 -254
  175. package/dist/unplugin.d.mts +13 -26
  176. package/dist/unplugin.mjs +193 -18
  177. package/dist/vite.d.mts +10 -1
  178. package/dist/vite.mjs +12 -3
  179. package/package.json +154 -87
  180. package/vue-plugin.d.ts +5 -0
  181. package/dist/module.d.ts +0 -13
  182. package/dist/module.mjs.map +0 -1
  183. package/dist/runtime/app/injections.d.ts +0 -9331
  184. package/dist/runtime/app/injections.js +0 -61
  185. package/dist/runtime/components/ButtonGroup.vue +0 -26
  186. package/dist/runtime/components/ButtonGroup.vue.d.ts +0 -26
  187. package/dist/runtime/components/FormItem.vue +0 -90
  188. package/dist/runtime/components/FormItem.vue.d.ts +0 -60
  189. package/dist/runtime/composables/useButtonGroup.d.ts +0 -5
  190. package/dist/runtime/composables/useButtonGroup.js +0 -9
  191. package/dist/runtime/composables/useFormItem.d.ts +0 -27
  192. package/dist/runtime/composables/useFormItem.js +0 -64
  193. package/dist/runtime/composables/useTheme.d.ts +0 -9
  194. package/dist/runtime/composables/useTheme.js +0 -23
  195. package/dist/runtime/index.d.ts +0 -44
  196. package/dist/runtime/index.js +0 -44
  197. package/dist/runtime/locale/zh-tw.d.ts +0 -2
  198. package/dist/runtime/theme/accordion.d.ts +0 -50
  199. package/dist/runtime/theme/accordion.js +0 -28
  200. package/dist/runtime/theme/alert.d.ts +0 -119
  201. package/dist/runtime/theme/alert.js +0 -47
  202. package/dist/runtime/theme/app.d.ts +0 -19
  203. package/dist/runtime/theme/app.js +0 -19
  204. package/dist/runtime/theme/avatar-group.d.ts +0 -46
  205. package/dist/runtime/theme/avatar-group.js +0 -32
  206. package/dist/runtime/theme/avatar.d.ts +0 -50
  207. package/dist/runtime/theme/avatar.js +0 -34
  208. package/dist/runtime/theme/badge.d.ts +0 -76
  209. package/dist/runtime/theme/badge.js +0 -92
  210. package/dist/runtime/theme/breadcrumb.d.ts +0 -61
  211. package/dist/runtime/theme/breadcrumb.js +0 -44
  212. package/dist/runtime/theme/button-group.d.ts +0 -60
  213. package/dist/runtime/theme/button-group.js +0 -42
  214. package/dist/runtime/theme/button.d.ts +0 -184
  215. package/dist/runtime/theme/button.js +0 -164
  216. package/dist/runtime/theme/calendar.d.ts +0 -58
  217. package/dist/runtime/theme/calendar.js +0 -86
  218. package/dist/runtime/theme/card.d.ts +0 -56
  219. package/dist/runtime/theme/card.js +0 -37
  220. package/dist/runtime/theme/carousel.d.ts +0 -107
  221. package/dist/runtime/theme/carousel.js +0 -43
  222. package/dist/runtime/theme/checkbox.d.ts +0 -82
  223. package/dist/runtime/theme/checkbox.js +0 -54
  224. package/dist/runtime/theme/chip.d.ts +0 -61
  225. package/dist/runtime/theme/chip.js +0 -66
  226. package/dist/runtime/theme/collapsible.d.ts +0 -32
  227. package/dist/runtime/theme/collapsible.js +0 -10
  228. package/dist/runtime/theme/drawer.d.ts +0 -142
  229. package/dist/runtime/theme/drawer.js +0 -113
  230. package/dist/runtime/theme/dropdown-menu.d.ts +0 -65
  231. package/dist/runtime/theme/dropdown-menu.js +0 -83
  232. package/dist/runtime/theme/form-item.d.ts +0 -70
  233. package/dist/runtime/theme/form-item.js +0 -34
  234. package/dist/runtime/theme/form.d.ts +0 -2
  235. package/dist/runtime/theme/form.js +0 -7
  236. package/dist/runtime/theme/index.d.ts +0 -41
  237. package/dist/runtime/theme/index.js +0 -41
  238. package/dist/runtime/theme/input-number.d.ts +0 -115
  239. package/dist/runtime/theme/input-number.js +0 -95
  240. package/dist/runtime/theme/input.d.ts +0 -172
  241. package/dist/runtime/theme/input.js +0 -151
  242. package/dist/runtime/theme/kbd.d.ts +0 -33
  243. package/dist/runtime/theme/kbd.js +0 -26
  244. package/dist/runtime/theme/link.d.ts +0 -38
  245. package/dist/runtime/theme/link.js +0 -26
  246. package/dist/runtime/theme/modal.d.ts +0 -42
  247. package/dist/runtime/theme/modal.js +0 -55
  248. package/dist/runtime/theme/pagination.d.ts +0 -74
  249. package/dist/runtime/theme/pagination.js +0 -17
  250. package/dist/runtime/theme/pinInput.d.ts +0 -94
  251. package/dist/runtime/theme/pinInput.js +0 -111
  252. package/dist/runtime/theme/popover.d.ts +0 -32
  253. package/dist/runtime/theme/popover.js +0 -13
  254. package/dist/runtime/theme/progress.d.ts +0 -180
  255. package/dist/runtime/theme/progress.js +0 -95
  256. package/dist/runtime/theme/radio-group.d.ts +0 -104
  257. package/dist/runtime/theme/radio-group.js +0 -61
  258. package/dist/runtime/theme/scroll-area.d.ts +0 -67
  259. package/dist/runtime/theme/scroll-area.js +0 -33
  260. package/dist/runtime/theme/select.d.ts +0 -186
  261. package/dist/runtime/theme/select.js +0 -173
  262. package/dist/runtime/theme/separator.d.ts +0 -74
  263. package/dist/runtime/theme/separator.js +0 -53
  264. package/dist/runtime/theme/skeleton.d.ts +0 -2
  265. package/dist/runtime/theme/skeleton.js +0 -7
  266. package/dist/runtime/theme/slider.d.ts +0 -70
  267. package/dist/runtime/theme/slider.js +0 -52
  268. package/dist/runtime/theme/switch.d.ts +0 -116
  269. package/dist/runtime/theme/switch.js +0 -78
  270. package/dist/runtime/theme/table.d.ts +0 -86
  271. package/dist/runtime/theme/table.js +0 -36
  272. package/dist/runtime/theme/tabs.d.ts +0 -129
  273. package/dist/runtime/theme/tabs.js +0 -146
  274. package/dist/runtime/theme/textarea.d.ts +0 -90
  275. package/dist/runtime/theme/textarea.js +0 -116
  276. package/dist/runtime/theme/toast-provider.d.ts +0 -116
  277. package/dist/runtime/theme/toast-provider.js +0 -97
  278. package/dist/runtime/theme/toast.d.ts +0 -83
  279. package/dist/runtime/theme/toast.js +0 -35
  280. package/dist/runtime/theme/tooltip.d.ts +0 -38
  281. package/dist/runtime/theme/tooltip.js +0 -11
  282. package/dist/runtime/types/components.d.ts +0 -42
  283. package/dist/runtime/utils/extend-theme.d.ts +0 -9
  284. package/dist/runtime/utils/extend-theme.js +0 -27
  285. package/dist/runtime/utils/styler.d.ts +0 -4
  286. package/dist/runtime/utils/styler.js +0 -10
  287. package/dist/runtime/utils/translator.d.ts +0 -18
  288. package/dist/runtime/utils/translator.js +0 -8
  289. package/dist/shared/ui.D1BTWZFB.mjs +0 -5
  290. package/dist/shared/ui.D1BTWZFB.mjs.map +0 -1
  291. package/dist/unocss.d.ts +0 -52
  292. package/dist/unocss.mjs.map +0 -1
  293. package/dist/unplugin.d.ts +0 -26
  294. package/dist/unplugin.mjs.map +0 -1
  295. package/dist/vite.d.ts +0 -9
  296. package/dist/vite.mjs.map +0 -1
  297. /package/dist/runtime/types/{components.js → input.js} +0 -0
@@ -0,0 +1,84 @@
1
+ import * as _unplugin from 'unplugin';
2
+ import { Options } from 'unplugin-auto-import/types';
3
+ import { Options as Options$1 } from 'unplugin-vue-components/types';
4
+ import { V as VariantsColor, C as Color, N as NeutralColor, a as VariantsSize, M as ModuleOptions } from './ui.IulR-OYx.mjs';
5
+ import * as ui from '#build/ui';
6
+ import { UIConfig as UIConfig$1 } from '../../dist/runtime/types/style.js';
7
+ import { PresetOptions } from '../unocss.mjs';
8
+
9
+ declare const icons: {
10
+ close: string;
11
+ loading: string;
12
+ check: string;
13
+ chevronUp: string;
14
+ chevronDown: string;
15
+ chevronLeft: string;
16
+ chevronRight: string;
17
+ chevronDoubleLeft: string;
18
+ chevronDoubleRight: string;
19
+ ellipsis: string;
20
+ plus: string;
21
+ minus: string;
22
+ external: string;
23
+ };
24
+
25
+ type AppConfigIcons = Record<keyof typeof icons | (string & {}), string>;
26
+ type AppConfigUI<Colors extends string = VariantsColor> = {
27
+ colors?: {
28
+ [C in Colors extends '' | never ? VariantsColor : Colors]?: Color;
29
+ } & {
30
+ primary?: Color;
31
+ neutral?: NeutralColor | (string & {});
32
+ };
33
+ icons?: Partial<AppConfigIcons>;
34
+ } & UIConfig$1<typeof ui>;
35
+ interface UIConfig<Color extends string = VariantsColor> extends Omit<UIOptions, 'theme' | 'ui'> {
36
+ theme?: {
37
+ /**
38
+ * Define the color aliases available for components
39
+ * @default ["primary", "secondary", "success", "info", "warning", "error"]
40
+ */
41
+ colors?: Color[];
42
+ /**
43
+ * Enable or disable transitions on components
44
+ * @default true
45
+ */
46
+ transitions?: boolean;
47
+ defaultVariants?: {
48
+ /**
49
+ * The default color variant to use for components
50
+ * @default "primary"
51
+ */
52
+ color?: Color;
53
+ /**
54
+ * The default size variant to use for components
55
+ * @default "md"
56
+ */
57
+ size?: VariantsSize | (string & {});
58
+ };
59
+ };
60
+ ui?: AppConfigUI<Color>;
61
+ }
62
+ declare function setup<Color extends string = VariantsColor>(defaults?: UIConfig<Color>): {
63
+ uno: PresetOptions;
64
+ vite: UIOptions;
65
+ };
66
+
67
+ declare const runtimeDir: string;
68
+ interface UIOptions extends Omit<ModuleOptions, 'fonts'> {
69
+ /** Whether to generate declaration files for auto-imported components. */
70
+ dts?: boolean;
71
+ ui?: AppConfigUI;
72
+ /**
73
+ * Override options for `unplugin-auto-import`
74
+ */
75
+ autoImport?: Partial<Options>;
76
+ /**
77
+ * Override options for `unplugin-vue-components`
78
+ */
79
+ components?: Partial<Options$1>;
80
+ }
81
+ declare const unplugin: _unplugin.UnpluginInstance<UIOptions | undefined, boolean>;
82
+
83
+ export { runtimeDir as r, setup as s, unplugin as u };
84
+ export type { AppConfigIcons as A, UIOptions as U, AppConfigUI as a };
@@ -0,0 +1,64 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { colors } from '@unocss/preset-wind4/colors';
3
+ import '../../dist/runtime/types/index.js';
4
+
5
+ declare const themeSizes: readonly ["xs", "sm", "md", "lg", "xl"];
6
+ type VariantsSize = typeof themeSizes[number];
7
+ declare const defaultColors: readonly ["primary", "secondary", "success", "info", "warning", "error"];
8
+ type VariantsColor = typeof defaultColors[number];
9
+ declare const neutralColors: ("slate" | "gray" | "zinc" | "neutral" | "stone" | "light" | "dark")[];
10
+ type NeutralColor = typeof neutralColors[number];
11
+ type Color$1 = keyof Omit<typeof colors, NeutralColor | 'black' | 'white'> | (string & {});
12
+
13
+ type Color = VariantsColor | (string & {});
14
+ type Size = VariantsSize | (string & {});
15
+ interface ModuleOptions {
16
+ /**
17
+ * Prefix for components
18
+ *
19
+ * @default "U"
20
+ */
21
+ prefix?: string;
22
+ /**
23
+ * Enable or disable `@nuxt/fonts` module
24
+ * @default true
25
+ */
26
+ fonts?: boolean;
27
+ /**
28
+ * Enable or disable `@nuxtjs/color-mode` module
29
+ *
30
+ * @default true
31
+ */
32
+ colorMode?: boolean;
33
+ /**
34
+ * Customize how the theme is generated
35
+ */
36
+ theme?: {
37
+ /**
38
+ * Define the color aliases available for components
39
+ * @default ["primary", "secondary", "success", "info", "warning", "error"]
40
+ */
41
+ colors?: Color[];
42
+ /**
43
+ * Enable or disable transitions on components
44
+ * @default true
45
+ */
46
+ transitions?: boolean;
47
+ defaultVariants?: {
48
+ /**
49
+ * The default color variant to use for components
50
+ * @default "primary"
51
+ */
52
+ color?: Color;
53
+ /**
54
+ * The default size variant to use for components
55
+ * @default "md"
56
+ */
57
+ size?: Size;
58
+ };
59
+ };
60
+ }
61
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
62
+
63
+ export { _default as _ };
64
+ export type { Color$1 as C, ModuleOptions as M, NeutralColor as N, VariantsColor as V, VariantsSize as a };
package/dist/types.d.mts CHANGED
@@ -1 +1,3 @@
1
- export { type ModuleOptions, default } from './module.mjs'
1
+ export { type ModuleOptions, default } from './shared/ui.IulR-OYx.mjs'
2
+
3
+ export * from '../dist/runtime/types/index.js'
package/dist/unocss.d.mts CHANGED
@@ -1,52 +1,12 @@
1
- import * as _unocss_core from '@unocss/core';
2
- import { UserConfig, Rule } from '@unocss/core';
3
- import { CRRule } from '@byyuurin/ui-kit';
4
- import { Theme } from '@unocss/preset-mini';
5
-
6
- declare const cssVarsPrefix = "ui";
7
- declare const cssVarsBase: string[];
8
- declare const cssVarsDynamic: string[];
9
- declare const cssVarsAll: string[];
10
-
11
- interface PresetOptions {
12
- /** @default "0rem" */
13
- radius?: string;
14
- /** @default "[radius]" */
15
- radiusBox?: string;
16
- /** @default "[radius]" */
17
- radiusButton?: string;
18
- /** @default "[radius]" */
19
- radiusCheckbox?: string;
20
- /** @default "[radius]" */
21
- radiusRadio?: string;
22
- /** @default "[radius]" */
23
- radiusSwitch?: string;
24
- /** @default "[radius]" */
25
- radiusTabs?: string;
26
- /**
27
- * Base content color
28
- * @default "#1f2937"
29
- */
30
- cb?: string;
31
- /**
32
- * Primary color
33
- * @default "[cb]"
34
- */
35
- cp?: string;
36
- /**
37
- * Base background color
38
- * @default "#ffffff"
39
- */
40
- cx?: string;
41
- }
42
- declare const preset: _unocss_core.PresetFactory<object, PresetOptions>;
43
-
44
- declare function transformUnoRules(userConfig?: UserConfig): CRRule[];
45
-
46
- declare const rules: Rule[];
47
-
48
- declare const theme: Theme;
49
- declare function cssVar(name: string, ...defaultValue: string[]): string;
50
- declare function cssColor(...rgb: (string | number)[]): string;
51
-
52
- export { type PresetOptions, cssColor, cssVar, cssVarsAll, cssVarsBase, cssVarsDynamic, cssVarsPrefix, preset, rules, theme, transformUnoRules };
1
+ import { Preset } from '@unocss/core';
2
+ import { Theme } from '@unocss/preset-wind4/theme';
3
+ import { M as ModuleOptions } from './shared/ui.IulR-OYx.mjs';
4
+ import '@nuxt/schema';
5
+ import '@unocss/preset-wind4/colors';
6
+ import '../dist/runtime/types/index.js';
7
+
8
+ type PresetOptions = Pick<(ModuleOptions['theme'] & {}), 'colors'>;
9
+ declare function createUnoPreset(options?: PresetOptions): () => Preset<Theme>;
10
+
11
+ export { createUnoPreset };
12
+ export type { PresetOptions };
package/dist/unocss.mjs CHANGED
@@ -1,265 +1,155 @@
1
- import { definePreset, mergeConfigs } from '@unocss/core';
2
- import { parseColor, parseCssColor } from '@unocss/preset-mini/utils';
3
- import { kebabCase } from 'scule';
4
- import { presetWind3 } from '@unocss/preset-wind3';
1
+ import { colors } from '@unocss/preset-wind4/colors';
2
+ import { parseColor } from '@unocss/preset-wind4/utils';
3
+ import { r as resolveColors } from './shared/ui.CzIlLITK.mjs';
4
+ import '../dist/runtime/utils/index.js';
5
5
 
6
- const cssVarsPrefix = "ui";
7
- const cssVarsBase = ["cb", "cp", "cx"];
8
- const cssVarsDynamic = ["fill"];
9
- const cssVarsAll = [...cssVarsBase, ...cssVarsDynamic];
6
+ function createUnoPreset(options = {}) {
7
+ const themeShades = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
8
+ const colors$1 = Object.fromEntries(resolveColors(options?.colors).map((color) => {
9
+ const colorValues = Object.fromEntries(themeShades.map((shade) => [shade, `var(--ui-color-${color}-${shade})`]));
10
+ return [color, { ...colorValues, DEFAULT: `var(--ui-${color})` }];
11
+ }));
12
+ const keyframes = {
13
+ "fade-in": "{from {opacity: 0;}to {opacity: 1;}}",
14
+ "fade-out": "{from {opacity: 1;}to {opacity: 0;}}",
15
+ "scale-in": "{from {opacity: 0;scale: 0.95;}to {opacity: 1;scale: 1;}}",
16
+ "scale-out": "{from {opacity: 1;scale: 1;}to {opacity: 0;scale: 0.95;}}",
17
+ "slide-in-from-top": "{from {transform: translateY(-100%);}to {transform: translateY(0);}}",
18
+ "slide-out-to-top": "{from {transform: translateY(0);}to {transform: translateY(-100%);}}",
19
+ "slide-in-from-right": "{from {transform: translateX(100%);}to {transform: translateX(0);}}",
20
+ "slide-out-to-right": "{from {transform: translateX(0);}to {transform: translateX(100%);}}",
21
+ "slide-in-from-bottom": "{from {transform: translateY(100%);}to {transform: translateY(0);}}",
22
+ "slide-out-to-bottom": "{from {transform: translateY(0);}to {transform: translateY(100%);}}",
23
+ "slide-in-from-left": "{from {transform: translateX(-100%);}to {transform: translateX(0);}}",
24
+ "slide-out-to-left": "{from {transform: translateX(0);}to {transform: translateX(-100%);}}",
25
+ "slide-in-from-top-and-fade": "{from {opacity: 0;transform: translateY(-4px);}to {opacity: 1;transform: translateY(0);}}",
26
+ "slide-out-to-top-and-fade": "{from {opacity: 1;transform: translateY(0);}to {opacity: 0;transform: translateY(-4px);}}",
27
+ "slide-in-from-right-and-fade": "{from {opacity: 0;transform: translateX(4px);}to {opacity: 1;transform: translateX(0);}}",
28
+ "slide-out-to-right-and-fade": "{from {opacity: 1;transform: translateX(0);}to {opacity: 0;transform: translateX(4px);}}",
29
+ "slide-in-from-bottom-and-fade": "{from {opacity: 0;transform: translateY(4px);}to {opacity: 1;transform: translateY(0);}}",
30
+ "slide-out-to-bottom-and-fade": "{from {opacity: 1;transform: translateY(0);}to {opacity: 0;transform: translateY(4px);}}",
31
+ "slide-in-from-left-and-fade": "{from {opacity: 0;transform: translateX(-4px);}to {opacity: 1;transform: translateX(0);}}",
32
+ "slide-out-to-left-and-fade": "{from {opacity: 1;transform: translateX(0);}to {opacity: 0;transform: translateX(-4px);}}",
33
+ "enter-from-right": "{from{opacity:0;transform:translateX(200px);}to{opacity:1;transform:translateX(0);}}",
34
+ "enter-from-left": "{from{opacity:0;transform:translateX(-200px);}to{opacity:1;transform:translateX(0);}}",
35
+ "exit-to-right": "{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(200px);}}",
36
+ "exit-to-left": "{from{opacity:1;transform:translateX(0);}to{opacity:0;transform:translateX(-200px);}}",
37
+ "carousel": "{0%,100% {width: 50%}0% {transform: translateX(-100%)}100% {transform: translateX(200%)}}",
38
+ "carousel-rtl": "{0%,100% {width: 50%}0% {transform: translateX(100%)}100% {transform: translateX(-200%)}}",
39
+ "carousel-vertical": "{0%,100% {height: 50%}0% {transform: translateY(-100%)}100% {transform: translateY(200%)}}",
40
+ "carousel-inverse": "{0%,100% {width: 50%}0% {transform: translateX(200%)}100% {transform: translateX(-100%)}}",
41
+ "carousel-inverse-rtl": "{0%,100% {width: 50%}0% {transform: translateX(-200%)}100% {transform: translateX(100%)}}",
42
+ "carousel-inverse-vertical": "{0%,100% {height: 50%}0% {transform: translateY(200%)}100% {transform: translateY(-100%)}}",
43
+ "swing": "{0%,100% {width: 50%}0%,100% {transform: translateX(-25%)}50% {transform: translateX(125%)}}",
44
+ "swing-vertical": "{0%,100% {height: 50%}0%,100% {transform: translateY(-25%)}50% {transform: translateY(125%)}}",
45
+ "elastic": "{0%,100% {width: 50%;margin-left: 25%;}50% {width: 90%;margin-left: 5%;}}",
46
+ "elastic-vertical": "{0%,100% {height: 50%;margin-top: 25%;}50% {height: 90%;margin-top: 5%;}}"
47
+ };
48
+ const preset = {
49
+ name: "@byyuurin/ui/uno-preset",
50
+ theme: {
51
+ font: {
52
+ sans: '"Public Sans",sans-serif'
53
+ },
54
+ colors: {
55
+ // theme colors
56
+ "tw-neutral": colors.neutral,
57
+ ...colors$1
58
+ },
59
+ radius: {
60
+ "DEFAULT": "var(--ui-radius)",
61
+ "xs": "calc(var(--ui-radius) * 0.5)",
62
+ "sm": "var(--ui-radius)",
63
+ "md": "calc(var(--ui-radius) * 1.5)",
64
+ "lg": "calc(var(--ui-radius) * 2)",
65
+ "xl": "calc(var(--ui-radius) * 3)",
66
+ "2xl": "calc(var(--ui-radius) * 4)",
67
+ "3xl": "calc(var(--ui-radius) * 6)",
68
+ "4xl": "calc(var(--ui-radius) * 8)"
69
+ },
70
+ animation: {
71
+ keyframes
72
+ }
73
+ },
74
+ shortcuts: [
75
+ [
76
+ /^(?:(text|bg|border-[rltbsexy]|border|divide|outline|ring-offset|ring|stroke|fill)-)(.+)$/,
77
+ ([, t = "", c = ""], { theme }) => {
78
+ if (/^\[.*\]$/.test(c))
79
+ return;
80
+ const parsed = parseColor(c, theme);
81
+ if (!parsed || !/^(?:default|dimmed|muted|toned|highlighted|inverted|elevated|accented|border|bg)/.test(c))
82
+ return;
83
+ if (t.includes(parsed.name))
84
+ return;
85
+ const result = `${t}-[--ui-${t}-${parsed.name}]/${parsed.opacity ?? 100}`.replace("-default", "").replace("/100", "").replace(/\[--ui-(?:border-[rltbsexy]|border|divide|outline|ring-offset|ring|stroke|fill)(-.+)?\]/, "[--ui-border$1]").replace(/(?:bg-(border)|border-(bg))/, "$1$2");
86
+ return result;
87
+ }
88
+ ]
89
+ ],
90
+ safelist: Object.keys(keyframes).map((s) => `keyframes-${s}`),
91
+ preflights: [
92
+ {
93
+ layer: "base",
94
+ getCSS() {
95
+ return `body {
96
+ accent-color: var(--ui-text);
97
+ background-color: var(--ui-bg);
98
+ color: var(--ui-text);
99
+ scrollbar-color: var(--ui-border-accented) transparent;
10
100
 
11
- const theme = {
12
- colors: {
13
- [cssVarsPrefix]: {
14
- cb: cssColor(cssVar("cb")),
15
- cx: cssColor(cssVar("cx")),
16
- primary: cssColor(cssVar("cp", cssVar("content"), cssVar("cb"))),
17
- fill: cssColor(cssVar("fill", cssVar("cb")))
18
- }
19
- },
20
- backgroundColor: {
21
- [cssVarsPrefix]: {
22
- base: cssColor(cssVar("cx"))
23
- }
24
- },
25
- textColor: {
26
- [cssVarsPrefix]: {
27
- base: cssColor(cssVar("cb"))
28
- }
29
- },
30
- borderColor: {
31
- [cssVarsPrefix]: {
32
- base: cssColor(cssVar("cb"))
33
- }
34
- },
35
- borderRadius: {
36
- ...Object.fromEntries(["base", "box", "button", "checkbox", "radio", "switch", "tabs"].map((name) => [`${cssVarsPrefix}-${name}`, name === "base" ? cssVar("radius") : cssVar(`radius-${name}`, cssVar("radius"))]))
37
- },
38
- ringWidth: {
39
- DEFAULT: "1px"
40
- },
41
- shadowColor: {
42
- [cssVarsPrefix]: {
43
- base: cssColor(cssVar("cb"))
44
- }
45
- },
46
- animation: {
47
- keyframes: {
48
- "fade-in": "{from {opacity: 0;}to {opacity: 1;}}",
49
- "fade-out": "{from {opacity: 1;}to {opacity: 0;}}",
50
- "scale-in": "{from {opacity: 0;scale: 0.95;}to {opacity: 1;scale: 1;}}",
51
- "scale-out": "{from {opacity: 1;scale: 1;}to {opacity: 0;scale: 0.95;}}",
52
- "slide-in-from-top": "{from {transform: translateY(-100%);}to {transform: translateY(0);}}",
53
- "slide-out-to-top": "{from {transform: translateY(0);}to {transform: translateY(-100%);}}",
54
- "slide-in-from-right": "{from {transform: translateX(100%);}to {transform: translateX(0);}}",
55
- "slide-out-to-right": "{from {transform: translateX(0);}to {transform: translateX(100%);}}",
56
- "slide-in-from-bottom": "{from {transform: translateY(100%);}to {transform: translateY(0);}}",
57
- "slide-out-to-bottom": "{from {transform: translateY(0);}to {transform: translateY(100%);}}",
58
- "slide-in-from-left": "{from {transform: translateX(-100%);}to {transform: translateX(0);}}",
59
- "slide-out-to-left": "{from {transform: translateX(0);}to {transform: translateX(-100%);}}",
60
- "slide-in-from-top-and-fade": "{from {opacity: 0;transform: translateY(-4px);}to {opacity: 1;transform: translateY(0);}}",
61
- "slide-out-to-top-and-fade": "{from {opacity: 1;transform: translateY(0);}to {opacity: 0;transform: translateY(-4px);}}",
62
- "slide-in-from-right-and-fade": "{from {opacity: 0;transform: translateX(4px);}to {opacity: 1;transform: translateX(0);}}",
63
- "slide-out-to-right-and-fade": "{from {opacity: 1;transform: translateX(0);}to {opacity: 0;transform: translateX(4px);}}",
64
- "slide-in-from-bottom-and-fade": "{from {opacity: 0;transform: translateY(4px);}to {opacity: 1;transform: translateY(0);}}",
65
- "slide-out-to-bottom-and-fade": "{from {opacity: 1;transform: translateY(0);}to {opacity: 0;transform: translateY(4px);}}",
66
- "slide-in-from-left-and-fade": "{from {opacity: 0;transform: translateX(-4px);}to {opacity: 1;transform: translateX(0);}}",
67
- "slide-out-to-left-and-fade": "{from {opacity: 1;transform: translateX(0);}to {opacity: 0;transform: translateX(-4px);}}"
68
- }
69
- }
70
- };
71
- function cssVar(name, ...defaultValue) {
72
- return `var(${[`--${cssVarsPrefix}-${name}`, ...defaultValue].join(",")})`;
73
- }
74
- function cssColor(...rgb) {
75
- return `rgb(${rgb.join(" ")})`;
101
+ -webkit-font-smoothing: antialiased;
102
+ -moz-osx-font-smoothing: grayscale;
76
103
  }
77
104
 
78
- const rules = [
79
- [
80
- new RegExp(`^${cssVarsPrefix}-([^/]+)$`),
81
- ([_, color], ctx) => {
82
- if (!color)
83
- return;
84
- if (color === "base")
85
- return Object.fromEntries(cssVarsDynamic.map((prop) => [`--${cssVarsPrefix}-${prop}`, cssVar("cb")]));
86
- if (color === "base-reverse")
87
- return Object.fromEntries(cssVarsDynamic.map((prop) => [`--${cssVarsPrefix}-${prop}`, cssVar("cx")]));
88
- if (color === "primary")
89
- return Object.fromEntries(cssVarsDynamic.map((prop) => [`--${cssVarsPrefix}-${prop}`, cssVar("cp", cssVar("cb"))]));
90
- const data = parseColor(color, ctx.theme);
91
- const value = resolveRuleValue(data);
92
- if (value)
93
- return Object.fromEntries(cssVarsDynamic.map((prop) => [`--${cssVarsPrefix}-${prop}`, value]));
94
- },
95
- { autocomplete: `${cssVarsPrefix}-$colors` }
96
- ],
97
- [
98
- new RegExp(`^${cssVarsPrefix}-(?:(${cssVarsAll.join("|")})-)([^/]+)$`),
99
- ([_, prop, color], ctx) => {
100
- if (!color)
101
- return;
102
- if (color === "base")
103
- return { [`--${cssVarsPrefix}-${prop}`]: cssVar("cb") };
104
- if (color === "base-reverse")
105
- return { [`--${cssVarsPrefix}-${prop}`]: cssVar("cx") };
106
- if (color === "primary")
107
- return { [`--${cssVarsPrefix}-${prop}`]: cssVar("cp", cssVar("cb")) };
108
- const data = parseColor(color, ctx.theme);
109
- const value = resolveRuleValue(data);
110
- if (value)
111
- return { [`--${cssVarsPrefix}-${prop}`]: value };
112
- },
113
- { autocomplete: `${cssVarsPrefix}-(${cssVarsAll.join("|")})-$colors` }
114
- ],
115
- [
116
- /^bg-soft-(.+)$/,
117
- ([_, color], { theme }) => {
118
- if (!color)
119
- return;
120
- const parsed = parseColor(color, theme);
121
- if (!parsed || parsed.cssColor?.type !== "rgb")
122
- return;
123
- const rgb = `rgb(${parsed.cssColor.components.join(" ")})`;
124
- const opacity = parsed.opacity || "100";
125
- return {
126
- "background-color": `color-mix(in srgb, ${rgb} ${opacity}%, ${cssColor(cssVar("cx"))})`
127
- };
128
- }
129
- ],
130
- // overrides
131
- [/^rotate-(\d+)$/, ([_, d]) => ({ rotate: `${d}deg` })]
132
- ];
133
- function resolveRuleValue(data) {
134
- if (data?.color && data.cssColor?.components) {
135
- let value = data.cssColor.components.join(" ");
136
- if (!/var\s*\((.+)\)(.*)/.test(data.color))
137
- value += ` /* ${data.color} */`;
138
- return value;
139
- }
140
- return null;
141
- }
105
+ :root, .light {
106
+ --un-default-border-color: var(--ui-border);
142
107
 
143
- const preset = definePreset((options = {}) => {
144
- return {
145
- name: "unocss-preset-ui",
146
- theme,
147
- rules,
148
- preflights: [
149
- { getCSS: () => createRootCSS(mergeOptions(options)) }
150
- ],
151
- safelist: Object.keys(theme.animation.keyframes).map((v) => `keyframes-${v}`)
152
- };
153
- });
154
- function mergeOptions(options) {
155
- const defaults = {
156
- radius: "0rem",
157
- radiusBox: "",
158
- radiusButton: "",
159
- radiusCheckbox: "",
160
- radiusRadio: "",
161
- radiusSwitch: "",
162
- radiusTabs: "",
163
- cb: "#1f2937",
164
- cp: "",
165
- cx: "#ffffff"
166
- };
167
- return {
168
- ...defaults,
169
- ...options
170
- };
171
- }
172
- function createRootCSS(kv) {
173
- const join = (input) => input.map((item) => item.endsWith(";") ? item : `${item};`).join("");
174
- const css = [
175
- // initial
176
- `:root{${join(Object.entries(kv).filter(([_, v]) => Boolean(v)).map(([k, v]) => {
177
- const name = kebabCase(k);
178
- const content = parseCssColor(v)?.components.join(" ") ?? v;
179
- return `--${cssVarsPrefix}-${name}:${content}`;
180
- }))}}`,
181
- // reset
182
- `:root{${join([
183
- `color:${cssColor(cssVar("cb"))}`
184
- ])}}`,
185
- `*,::before,::after{${join([
186
- `--un-default-border-color:color-mix(in srgb,${cssColor(cssVar("cb"))} 10%,transparent)`,
187
- `accent-color:${cssColor(cssVar("fill", cssVar("cb")))}`,
188
- `scrollbar-color:color-mix(in srgb,${cssColor(cssVar("cb"))} 25%,transparent) transparent`
189
- ])}}`,
190
- `*::selection{${join([
191
- `color:${cssColor(cssVar("cx"))}`,
192
- `background-color:${cssColor(cssVar("cp", cssVar("cb")))}`
193
- ])}}`
194
- ];
195
- return css.join("");
108
+ --ui-text: var(--ui-color-neutral-700);
109
+ --ui-text-dimmed: var(--ui-color-neutral-400);
110
+ --ui-text-muted: var(--ui-color-neutral-500);
111
+ --ui-text-toned: var(--ui-color-neutral-600);
112
+ --ui-text-highlighted: var(--ui-color-neutral-900);
113
+ --ui-text-inverted: #fff;
114
+
115
+ --ui-bg: #fff;
116
+ --ui-bg-muted: var(--ui-color-neutral-50);
117
+ --ui-bg-elevated: var(--ui-color-neutral-100);
118
+ --ui-bg-accented: var(--ui-color-neutral-200);
119
+ --ui-bg-inverted: var(--ui-color-neutral-900);
120
+
121
+ --ui-border: var(--ui-color-neutral-200);
122
+ --ui-border-muted: var(--ui-color-neutral-200);
123
+ --ui-border-accented: var(--ui-color-neutral-300);
124
+ --ui-border-inverted: var(--ui-color-neutral-900);
125
+
126
+ --ui-radius: 0.25rem;
196
127
  }
197
128
 
198
- const baseUnoConfig = mergeConfigs([
199
- presetWind3(),
200
- preset()
201
- ]);
202
- function transformUnoRules(userConfig = {}) {
203
- const { rules = [], theme = {} } = mergeConfigs([baseUnoConfig, userConfig]);
204
- const mergeRules = [];
205
- const toString = (values) => {
206
- const variables = /* @__PURE__ */ new Set([]);
207
- const properties = /* @__PURE__ */ new Set([]);
208
- const propertiesIgnores = /* @__PURE__ */ new Set(["transform"]);
209
- let propertiesOnly = true;
210
- values.forEach((value) => {
211
- if (propertiesIgnores.has(value)) {
212
- properties.add(value);
213
- propertiesOnly = false;
214
- return;
215
- }
216
- if (value.startsWith("--")) {
217
- variables.add(value);
218
- return;
129
+ .dark {
130
+ --ui-text-dimmed: var(--ui-color-neutral-500);
131
+ --ui-text-muted: var(--ui-color-neutral-400);
132
+ --ui-text-toned: var(--ui-color-neutral-300);
133
+ --ui-text: var(--ui-color-neutral-200);
134
+ --ui-text-highlighted: #fff;
135
+ --ui-text-inverted: var(--ui-color-neutral-900);
136
+
137
+ --ui-bg: var(--ui-color-neutral-900);
138
+ --ui-bg-muted: var(--ui-color-neutral-800);
139
+ --ui-bg-elevated: var(--ui-color-neutral-800);
140
+ --ui-bg-accented: var(--ui-color-neutral-700);
141
+ --ui-bg-inverted: #fff;
142
+
143
+ --ui-border: var(--ui-color-neutral-800);
144
+ --ui-border-muted: var(--ui-color-neutral-700);
145
+ --ui-border-accented: var(--ui-color-neutral-700);
146
+ --ui-border-inverted: #fff;
147
+ }`;
148
+ }
219
149
  }
220
- properties.add(value);
221
- });
222
- const valueArray = propertiesOnly && properties.size > 0 ? Array.from(properties.values()) : values;
223
- return valueArray.join(",");
150
+ ]
224
151
  };
225
- const resolveCSSValues = (values) => () => toString(values.flatMap((value) => Object.keys(value)));
226
- const resolveCSSObject = (object) => () => {
227
- if (JSON.stringify(object) === "{}")
228
- return null;
229
- return toString(Object.keys(object));
230
- };
231
- for (const rule of rules) {
232
- const [maybeString, maybeResult] = rule;
233
- const ruleRE = typeof maybeString === "string" ? new RegExp(`^(?:${maybeString})$`) : maybeString;
234
- if (Array.isArray(maybeResult)) {
235
- const inputs = maybeResult.filter((item) => typeof item === "object");
236
- mergeRules.push([ruleRE, resolveCSSValues(inputs)]);
237
- continue;
238
- }
239
- if (typeof maybeResult === "object") {
240
- mergeRules.push([ruleRE, resolveCSSObject(maybeResult)]);
241
- continue;
242
- }
243
- const matcher = (matches) => {
244
- try {
245
- const result = maybeResult(["", ...matches], {
246
- theme,
247
- // @ts-expect-error pass
248
- generator: { config: {} }
249
- });
250
- if (Array.isArray(result))
251
- return toString(result.filter((i) => typeof i === "object").map((i) => Array.isArray(i) ? i[0] : Object.keys(i).join(",")));
252
- if (typeof result === "object")
253
- return resolveCSSObject(result)();
254
- } catch (e) {
255
- console.warn(`[Fail Rule]`, ruleRE, e.message);
256
- }
257
- return null;
258
- };
259
- mergeRules.push([ruleRE, matcher]);
260
- }
261
- return mergeRules.sort(([r1], [r2]) => r2.source.length - r1.source.length);
152
+ return () => preset;
262
153
  }
263
154
 
264
- export { cssColor, cssVar, cssVarsAll, cssVarsBase, cssVarsDynamic, cssVarsPrefix, preset, rules, theme, transformUnoRules };
265
- //# sourceMappingURL=unocss.mjs.map
155
+ export { createUnoPreset };
@@ -1,26 +1,13 @@
1
- import * as _unplugin from 'unplugin';
2
- import { Options } from 'unplugin-auto-import/types';
3
- import { Options as Options$1 } from 'unplugin-vue-components/types';
4
-
5
- declare const runtimeDir: string;
6
- interface UIOptions {
7
- /**
8
- * prefix for components used in templates
9
- *
10
- * @default "U"
11
- */
12
- prefix?: string;
13
- /** Whether to generate declaration files for auto-imported components. */
14
- dts?: boolean;
15
- /**
16
- * Override options for `unplugin-auto-import`
17
- */
18
- autoImport?: Partial<Options>;
19
- /**
20
- * Override options for `unplugin-vue-components`
21
- */
22
- components?: Partial<Options$1>;
23
- }
24
- declare const unplugin: _unplugin.UnpluginInstance<UIOptions | undefined, boolean>;
25
-
26
- export { type UIOptions, runtimeDir, unplugin };
1
+ import 'unplugin';
2
+ import 'unplugin-auto-import/types';
3
+ import 'unplugin-vue-components/types';
4
+ import './shared/ui.IulR-OYx.mjs';
5
+ export { U as UIOptions, r as runtimeDir, u as unplugin } from './shared/ui.DpbffTXs.mjs';
6
+ import '@nuxt/schema';
7
+ import '@unocss/preset-wind4/colors';
8
+ import '../dist/runtime/types/index.js';
9
+ import '#build/ui';
10
+ import '../dist/runtime/types/style.js';
11
+ import './unocss.mjs';
12
+ import '@unocss/core';
13
+ import '@unocss/preset-wind4/theme';