@byyuurin/ui 0.0.2 → 0.0.4
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 +76 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/nuxt.d.mts +13 -0
- package/dist/nuxt.d.ts +6 -3
- package/dist/nuxt.mjs +6 -3
- package/dist/resolver.d.mts +13 -0
- package/dist/resolver.d.ts +6 -3
- package/dist/resolver.mjs +5 -2
- package/dist/{components → runtime/components}/Accordion.vue +19 -3
- package/dist/{components → runtime/components}/App.vue +5 -1
- package/dist/{components → runtime/components}/Button.vue +92 -94
- package/dist/{components → runtime/components}/Checkbox.vue +101 -104
- package/dist/{components → runtime/components}/Input.vue +5 -1
- package/dist/{components → runtime/components}/ModalProvider.vue +1 -1
- package/dist/{components → runtime/components}/RadioGroup.vue +174 -180
- package/dist/runtime/components/ScrollArea.vue +72 -0
- package/dist/{components → runtime/components}/Select.vue +262 -258
- package/dist/{components → runtime/components}/Switch.vue +98 -99
- package/dist/{components → runtime/components}/Tabs.vue +117 -117
- package/dist/runtime/components/Textarea.vue +173 -0
- package/dist/{components → runtime/components}/Toast.vue +1 -1
- package/dist/{components → runtime/components}/Toaster.vue +35 -1
- package/dist/{components → runtime/components}/index.d.ts +2 -0
- package/dist/{components → runtime/components}/index.mjs +2 -0
- package/dist/runtime/composables/defineInjection.d.ts +11 -0
- package/dist/runtime/composables/defineInjection.mjs +9 -0
- package/dist/{composables → runtime/composables}/index.d.ts +1 -0
- package/dist/{composables → runtime/composables}/index.mjs +1 -0
- package/dist/{composables → runtime/composables}/useModal.d.ts +1 -1
- package/dist/{composables → runtime/composables}/useModal.mjs +3 -2
- package/dist/{composables → runtime/composables}/useTheme.d.ts +3 -2
- package/dist/runtime/composables/useTheme.mjs +26 -0
- package/dist/{composables → runtime/composables}/useToast.d.ts +1 -1
- package/dist/{theme → runtime/theme}/button.d.ts +0 -8
- package/dist/{theme → runtime/theme}/button.mjs +1 -9
- package/dist/{theme → runtime/theme}/checkbox.d.ts +0 -12
- package/dist/{theme → runtime/theme}/checkbox.mjs +4 -9
- package/dist/{theme → runtime/theme}/index.d.ts +2 -0
- package/dist/{theme → runtime/theme}/index.mjs +2 -0
- package/dist/{theme → runtime/theme}/radioGroup.d.ts +0 -24
- package/dist/{theme → runtime/theme}/radioGroup.mjs +8 -20
- package/dist/runtime/theme/scrollArea.d.ts +51 -0
- package/dist/runtime/theme/scrollArea.mjs +30 -0
- package/dist/{theme → runtime/theme}/switch.d.ts +0 -12
- package/dist/{theme → runtime/theme}/switch.mjs +2 -8
- package/dist/{theme → runtime/theme}/tabs.d.ts +32 -11
- package/dist/{theme → runtime/theme}/tabs.mjs +19 -12
- package/dist/runtime/theme/textarea.d.ts +90 -0
- package/dist/runtime/theme/textarea.mjs +100 -0
- package/dist/{theme → runtime/theme}/toast.mjs +1 -1
- package/dist/{types → runtime/types}/components.d.ts +2 -0
- package/dist/{types → runtime/types}/index.d.ts +1 -1
- package/dist/{utils → runtime/utils}/index.d.ts +3 -12
- package/dist/{utils → runtime/utils}/index.mjs +3 -12
- package/dist/{internal → runtime/utils}/styler.d.ts +0 -1
- package/dist/runtime/utils/styler.mjs +10 -0
- package/dist/{internal/constants.mjs → shared/ui.Cmq14xN9.mjs} +6 -2
- package/dist/unocss-preset.d.mts +57 -0
- package/dist/unocss-preset.d.ts +29 -9
- package/dist/unocss-preset.mjs +164 -110
- package/package.json +18 -12
- package/dist/composables/useTheme.mjs +0 -18
- package/dist/internal/constants.d.ts +0 -3
- package/dist/internal/index.d.ts +0 -4
- package/dist/internal/index.mjs +0 -4
- package/dist/internal/styler.mjs +0 -236
- package/dist/utils/unocss.d.ts +0 -3
- package/dist/utils/unocss.mjs +0 -50
- /package/dist/{components → runtime/components}/Card.vue +0 -0
- /package/dist/{components → runtime/components}/Drawer.vue +0 -0
- /package/dist/{components → runtime/components}/Link.vue +0 -0
- /package/dist/{components → runtime/components}/Modal.vue +0 -0
- /package/dist/{components → runtime/components}/Popover.vue +0 -0
- /package/dist/{components → runtime/components}/Tooltip.vue +0 -0
- /package/dist/{composables → runtime/composables}/useComponentIcons.d.ts +0 -0
- /package/dist/{composables → runtime/composables}/useComponentIcons.mjs +0 -0
- /package/dist/{composables → runtime/composables}/useToast.mjs +0 -0
- /package/dist/{theme → runtime/theme}/accordion.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/accordion.mjs +0 -0
- /package/dist/{theme → runtime/theme}/app.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/app.mjs +0 -0
- /package/dist/{theme → runtime/theme}/card.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/card.mjs +0 -0
- /package/dist/{theme → runtime/theme}/drawer.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/drawer.mjs +0 -0
- /package/dist/{theme → runtime/theme}/input.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/input.mjs +0 -0
- /package/dist/{theme → runtime/theme}/link.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/link.mjs +0 -0
- /package/dist/{theme → runtime/theme}/modal.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/modal.mjs +0 -0
- /package/dist/{theme → runtime/theme}/popover.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/popover.mjs +0 -0
- /package/dist/{theme → runtime/theme}/select.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/select.mjs +0 -0
- /package/dist/{theme → runtime/theme}/toast.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/toaster.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/toaster.mjs +0 -0
- /package/dist/{theme → runtime/theme}/tooltip.d.ts +0 -0
- /package/dist/{theme → runtime/theme}/tooltip.mjs +0 -0
- /package/dist/{types → runtime/types}/components.mjs +0 -0
- /package/dist/{types → runtime/types}/index.mjs +0 -0
- /package/dist/{types → runtime/types}/utils.d.ts +0 -0
- /package/dist/{types → runtime/types}/utils.mjs +0 -0
- /package/dist/{internal → runtime/utils}/extend-theme.d.ts +0 -0
- /package/dist/{internal → runtime/utils}/extend-theme.mjs +0 -0
- /package/dist/{internal → runtime/utils}/link.d.ts +0 -0
- /package/dist/{internal → runtime/utils}/link.mjs +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
base: undefined;
|
|
3
|
+
slots: {
|
|
4
|
+
root: string;
|
|
5
|
+
base: string[];
|
|
6
|
+
};
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
xs: {
|
|
10
|
+
root: string;
|
|
11
|
+
};
|
|
12
|
+
sm: {
|
|
13
|
+
root: string;
|
|
14
|
+
};
|
|
15
|
+
md: {
|
|
16
|
+
root: string;
|
|
17
|
+
};
|
|
18
|
+
lg: {
|
|
19
|
+
root: string;
|
|
20
|
+
};
|
|
21
|
+
xl: {
|
|
22
|
+
root: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
variant: {
|
|
26
|
+
outline: {
|
|
27
|
+
root: string[];
|
|
28
|
+
};
|
|
29
|
+
soft: {
|
|
30
|
+
root: string[];
|
|
31
|
+
};
|
|
32
|
+
ghost: {
|
|
33
|
+
root: string[];
|
|
34
|
+
};
|
|
35
|
+
none: {
|
|
36
|
+
root: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
underline: {
|
|
40
|
+
true: "";
|
|
41
|
+
};
|
|
42
|
+
highlight: {
|
|
43
|
+
true: {
|
|
44
|
+
base: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
compoundVariants: ({
|
|
49
|
+
variant: ("soft" | "ghost" | "none")[];
|
|
50
|
+
highlight: false;
|
|
51
|
+
underline: true;
|
|
52
|
+
class: {
|
|
53
|
+
root: string;
|
|
54
|
+
};
|
|
55
|
+
size?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
size: ("xs" | "sm" | "md")[];
|
|
58
|
+
class: {
|
|
59
|
+
root: string;
|
|
60
|
+
};
|
|
61
|
+
variant?: undefined;
|
|
62
|
+
highlight?: undefined;
|
|
63
|
+
underline?: undefined;
|
|
64
|
+
} | {
|
|
65
|
+
size: ("lg" | "xl")[];
|
|
66
|
+
class: {
|
|
67
|
+
root: string;
|
|
68
|
+
};
|
|
69
|
+
variant?: undefined;
|
|
70
|
+
highlight?: undefined;
|
|
71
|
+
underline?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
variant: ("soft" | "ghost" | "none")[];
|
|
74
|
+
highlight: true;
|
|
75
|
+
class: {
|
|
76
|
+
root: string;
|
|
77
|
+
};
|
|
78
|
+
underline?: undefined;
|
|
79
|
+
size?: undefined;
|
|
80
|
+
} | {
|
|
81
|
+
variant: "outline"[];
|
|
82
|
+
highlight: true;
|
|
83
|
+
class: {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
underline?: undefined;
|
|
87
|
+
size?: undefined;
|
|
88
|
+
})[];
|
|
89
|
+
};
|
|
90
|
+
export default _default;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { ct } from "@byyuurin/ui-kit";
|
|
2
|
+
export default ct({
|
|
3
|
+
slots: {
|
|
4
|
+
root: "rounded-ui-base transition-colors aria-disabled:opacity-50",
|
|
5
|
+
base: [
|
|
6
|
+
"w-full color-inherit bg-transparent border-0 resize-none placeholder:color-ui-cb/50",
|
|
7
|
+
"focus:outline-none",
|
|
8
|
+
"disabled:cursor-not-allowed"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
xs: {
|
|
14
|
+
root: "text-xs"
|
|
15
|
+
},
|
|
16
|
+
sm: {
|
|
17
|
+
root: "text-sm"
|
|
18
|
+
},
|
|
19
|
+
md: {
|
|
20
|
+
root: "text-base"
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
root: "text-lg"
|
|
24
|
+
},
|
|
25
|
+
xl: {
|
|
26
|
+
root: "text-xl"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
variant: {
|
|
30
|
+
outline: {
|
|
31
|
+
root: [
|
|
32
|
+
"color-ui-cb/80 bg-ui-c1 ring ring-inset ring-ui-cb/50",
|
|
33
|
+
"focus-within:ring-2 focus-within:ring-ui-cb/50",
|
|
34
|
+
"aria-disabled:ring-ui-cb/80 hover:aria-disabled:ring-ui-cb/80"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
soft: {
|
|
38
|
+
root: [
|
|
39
|
+
"color-ui-cb/80 bg-ui-cb/4",
|
|
40
|
+
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
41
|
+
"aria-disabled:color-ui-content/80 aria-disabled:bg-ui-fill/5 hover:aria-disabled:color-ui-content/80 hover:aria-disabled:bg-ui-fill/5"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
ghost: {
|
|
45
|
+
root: [
|
|
46
|
+
"color-ui-cb/80 bg-transparent",
|
|
47
|
+
"hover:bg-ui-cb/6 hover:color-ui-cb/80 focus-within:bg-ui-cb/8 focus-within:color-ui-cb/85",
|
|
48
|
+
"aria-disabled:color-ui-fill/80 aria-disabled:bg-transparent hover:aria-disabled:color-ui-fill/80 hover:aria-disabled:bg-transparent"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
none: {
|
|
52
|
+
root: "color-ui-cb bg-transparent"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
underline: {
|
|
56
|
+
true: ""
|
|
57
|
+
},
|
|
58
|
+
highlight: {
|
|
59
|
+
true: {
|
|
60
|
+
base: ""
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
compoundVariants: [
|
|
65
|
+
{
|
|
66
|
+
variant: ["soft", "ghost", "none"],
|
|
67
|
+
highlight: false,
|
|
68
|
+
underline: true,
|
|
69
|
+
class: {
|
|
70
|
+
root: "relative after:content-empty after:absolute after:inset-x-0 after:bottom-0 after:h-1px after:bg-ui-cb/40"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
size: ["xs", "sm", "md"],
|
|
75
|
+
class: {
|
|
76
|
+
root: "p-1.5 px-2.5"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
size: ["lg", "xl"],
|
|
81
|
+
class: {
|
|
82
|
+
root: "p-2.5 px-3.5"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
variant: ["soft", "ghost", "none"],
|
|
87
|
+
highlight: true,
|
|
88
|
+
class: {
|
|
89
|
+
root: "ring ring-inset ring-ui-fill/80"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
variant: ["outline"],
|
|
94
|
+
highlight: true,
|
|
95
|
+
class: {
|
|
96
|
+
root: "ring-2 ring-ui-fill/80 focus-within:ring-ui-fill/80"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
});
|
|
@@ -9,7 +9,7 @@ export default ct({
|
|
|
9
9
|
avatar: "shrink-0",
|
|
10
10
|
avatarSize: "2xl",
|
|
11
11
|
actions: "flex flex-wrap gap-1.5 shrink-0",
|
|
12
|
-
progress: "absolute inset-x-
|
|
12
|
+
progress: "absolute inset-x-[var(--ui-radius-box)] bottom-0 h-1 z-[-1] color-ui-base/80 bg-current rounded-ui-base",
|
|
13
13
|
close: "p-0.5"
|
|
14
14
|
},
|
|
15
15
|
variants: {
|
|
@@ -10,9 +10,11 @@ export type * from '../components/Link.vue';
|
|
|
10
10
|
export type * from '../components/Modal.vue';
|
|
11
11
|
export type * from '../components/Popover.vue';
|
|
12
12
|
export type * from '../components/RadioGroup.vue';
|
|
13
|
+
export type * from '../components/ScrollArea.vue';
|
|
13
14
|
export type * from '../components/Select.vue';
|
|
14
15
|
export type * from '../components/Switch.vue';
|
|
15
16
|
export type * from '../components/Tabs.vue';
|
|
17
|
+
export type * from '../components/Textarea.vue';
|
|
16
18
|
export type * from '../components/Toast.vue';
|
|
17
19
|
export type * from '../components/Toaster.vue';
|
|
18
20
|
export type * from '../components/Tooltip.vue';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as _components from '../components';
|
|
2
2
|
import type * as theme from '../theme';
|
|
3
|
-
import type { PartialTheme } from '
|
|
3
|
+
import type { PartialTheme } from '.';
|
|
4
4
|
export * from './components';
|
|
5
5
|
export * from './utils';
|
|
6
6
|
export type ThemeExtension = PartialTheme<typeof theme>;
|
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './
|
|
3
|
-
export
|
|
4
|
-
injectionKey: InjectionKey<T>;
|
|
5
|
-
provide: (value: T) => void;
|
|
6
|
-
inject: () => T | undefined;
|
|
7
|
-
};
|
|
8
|
-
export declare function createInjection<T>(name: string, defaultValue: T): {
|
|
9
|
-
injectionKey: InjectionKey<T>;
|
|
10
|
-
provide: (value: T) => void;
|
|
11
|
-
inject: () => T;
|
|
12
|
-
};
|
|
1
|
+
export * from './extend-theme';
|
|
2
|
+
export * from './link';
|
|
3
|
+
export * from './styler';
|
|
13
4
|
export declare function pick<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Pick<Data, Keys>;
|
|
14
5
|
export declare function omit<Data extends object, Keys extends keyof Data>(data: Data, keys: Keys[]): Omit<Data, Keys>;
|
|
15
6
|
export declare function get(object: Record<string, any> | undefined, path: (string | number)[] | string, defaultValue?: any): any;
|
|
@@ -1,16 +1,7 @@
|
|
|
1
1
|
import { isEqual } from "ohash";
|
|
2
|
-
|
|
3
|
-
export * from "./
|
|
4
|
-
export
|
|
5
|
-
const injectionKey = Symbol(name);
|
|
6
|
-
const provide = (value) => vueProvide(injectionKey, value);
|
|
7
|
-
const inject = () => vueInject(injectionKey, defaultValue);
|
|
8
|
-
return {
|
|
9
|
-
injectionKey,
|
|
10
|
-
provide,
|
|
11
|
-
inject
|
|
12
|
-
};
|
|
13
|
-
}
|
|
2
|
+
export * from "./extend-theme.mjs";
|
|
3
|
+
export * from "./link.mjs";
|
|
4
|
+
export * from "./styler.mjs";
|
|
14
5
|
export function pick(data, keys) {
|
|
15
6
|
const result = {};
|
|
16
7
|
for (const key of keys)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { ClassValue, CRRule, CVCompoundVariants, CVMeta, CVSlots, CVVariants } from '@byyuurin/ui-kit';
|
|
2
|
-
export declare function createMergeRules(): CRRule[];
|
|
3
2
|
export declare function prepareStyler(rules?: CRRule[]): {
|
|
4
3
|
createStyler: <V extends CVVariants<S, B>, CV extends CVCompoundVariants<V, S, B>, B extends ClassValue = undefined, S extends CVSlots = undefined>(theme: CVMeta<V, CV, never, B, S>) => [keyof V] extends string[] ? (props: Required<import("@byyuurin/ui-kit/index").VariantProps<import("@byyuurin/ui-kit/index").CVReturnType<V, S, B>>> & import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; } : (props?: import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; };
|
|
5
4
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { cv } from "@byyuurin/ui-kit";
|
|
2
|
+
export function prepareStyler(rules = []) {
|
|
3
|
+
const createVariants = cv(rules);
|
|
4
|
+
function createStyler(theme) {
|
|
5
|
+
const ui = createVariants(theme);
|
|
6
|
+
const styler = (props) => ui(props);
|
|
7
|
+
return styler;
|
|
8
|
+
}
|
|
9
|
+
return { createStyler };
|
|
10
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const packageName = "@byyuurin/ui";
|
|
2
|
+
const componentNames = [
|
|
3
3
|
"Accordion",
|
|
4
4
|
"App",
|
|
5
5
|
"Button",
|
|
@@ -12,10 +12,14 @@ export const componentNames = [
|
|
|
12
12
|
"ModalProvider",
|
|
13
13
|
"Popover",
|
|
14
14
|
"RadioGroup",
|
|
15
|
+
"ScrollArea",
|
|
15
16
|
"Select",
|
|
16
17
|
"Switch",
|
|
17
18
|
"Tabs",
|
|
19
|
+
"Textarea",
|
|
18
20
|
"Toast",
|
|
19
21
|
"Toaster",
|
|
20
22
|
"Tooltip"
|
|
21
23
|
];
|
|
24
|
+
|
|
25
|
+
export { componentNames as c, packageName as p };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as unocss from 'unocss';
|
|
2
|
+
import { CRRule } from '@byyuurin/ui-kit';
|
|
3
|
+
import { UserConfig, Rule } from '@unocss/core';
|
|
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
|
+
* Base color 1
|
|
33
|
+
* @default "#ffffff"
|
|
34
|
+
*/
|
|
35
|
+
c1?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Base color 2
|
|
38
|
+
* @default "#f2f2f2"
|
|
39
|
+
*/
|
|
40
|
+
c2?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Base color 3
|
|
43
|
+
* @default "#e5e6e6"
|
|
44
|
+
*/
|
|
45
|
+
c3?: string;
|
|
46
|
+
}
|
|
47
|
+
declare const preset: unocss.PresetFactory<object, PresetOptions>;
|
|
48
|
+
|
|
49
|
+
declare function transformUnoRules(userConfig?: UserConfig): CRRule[];
|
|
50
|
+
|
|
51
|
+
declare const rules: Rule[];
|
|
52
|
+
|
|
53
|
+
declare const theme: Theme;
|
|
54
|
+
declare function cssVar(name: string, ...defaultValue: string[]): string;
|
|
55
|
+
declare function cssColor(...rgb: (string | number)[]): string;
|
|
56
|
+
|
|
57
|
+
export { type PresetOptions, cssColor, cssVar, cssVarsAll, cssVarsBase, cssVarsDynamic, cssVarsPrefix, preset as default, preset, rules, theme, transformUnoRules };
|
package/dist/unocss-preset.d.ts
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as unocss from 'unocss';
|
|
2
|
+
import { CRRule } from '@byyuurin/ui-kit';
|
|
3
|
+
import { UserConfig, Rule } from '@unocss/core';
|
|
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 {
|
|
3
12
|
/** @default "0rem" */
|
|
4
13
|
radius?: string;
|
|
5
14
|
/** @default "[radius]" */
|
|
15
|
+
radiusBox?: string;
|
|
16
|
+
/** @default "[radius]" */
|
|
6
17
|
radiusButton?: string;
|
|
7
18
|
/** @default "[radius]" */
|
|
8
|
-
|
|
19
|
+
radiusCheckbox?: string;
|
|
20
|
+
/** @default "[radius]" */
|
|
21
|
+
radiusRadio?: string;
|
|
22
|
+
/** @default "[radius]" */
|
|
23
|
+
radiusSwitch?: string;
|
|
9
24
|
/** @default "[radius]" */
|
|
10
25
|
radiusTabs?: string;
|
|
11
26
|
/**
|
|
@@ -29,9 +44,14 @@ export interface PresetOptions {
|
|
|
29
44
|
*/
|
|
30
45
|
c3?: string;
|
|
31
46
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
declare const
|
|
37
|
-
|
|
47
|
+
declare const preset: unocss.PresetFactory<object, PresetOptions>;
|
|
48
|
+
|
|
49
|
+
declare function transformUnoRules(userConfig?: UserConfig): CRRule[];
|
|
50
|
+
|
|
51
|
+
declare const rules: Rule[];
|
|
52
|
+
|
|
53
|
+
declare const theme: Theme;
|
|
54
|
+
declare function cssVar(name: string, ...defaultValue: string[]): string;
|
|
55
|
+
declare function cssColor(...rgb: (string | number)[]): string;
|
|
56
|
+
|
|
57
|
+
export { type PresetOptions, cssColor, cssVar, cssVarsAll, cssVarsBase, cssVarsDynamic, cssVarsPrefix, preset as default, preset, rules, theme, transformUnoRules };
|