@byyuurin/ui 0.0.9 → 0.0.11
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 +2 -5
- package/dist/module.json +3 -3
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/runtime/app/injections.d.ts +9323 -3
- package/dist/runtime/app/injections.js +35 -0
- package/dist/runtime/components/Accordion.vue +36 -69
- package/dist/runtime/components/Accordion.vue.d.ts +52 -0
- package/dist/runtime/components/Alert.vue +37 -75
- package/dist/runtime/components/Alert.vue.d.ts +59 -0
- package/dist/runtime/components/App.vue +25 -40
- package/dist/runtime/components/App.vue.d.ts +24 -0
- package/dist/runtime/components/Avatar.vue +31 -51
- package/dist/runtime/components/Avatar.vue.d.ts +25 -0
- package/dist/runtime/components/AvatarGroup.vue +38 -69
- package/dist/runtime/components/AvatarGroup.vue.d.ts +27 -0
- package/dist/runtime/components/Badge.vue +25 -51
- package/dist/runtime/components/Badge.vue.d.ts +44 -0
- package/dist/runtime/components/Breadcrumb.vue +35 -77
- package/dist/runtime/components/Breadcrumb.vue.d.ts +52 -0
- package/dist/runtime/components/Button.vue +62 -51
- package/dist/runtime/components/Button.vue.d.ts +29 -0
- package/dist/runtime/components/ButtonGroup.vue +17 -37
- package/dist/runtime/components/ButtonGroup.vue.d.ts +26 -0
- package/dist/runtime/components/Calendar.vue +75 -101
- package/dist/runtime/components/Calendar.vue.d.ts +75 -0
- package/dist/runtime/components/Card.vue +25 -42
- package/dist/runtime/components/Card.vue.d.ts +30 -0
- package/dist/runtime/components/Carousel.vue +118 -223
- package/dist/runtime/components/Carousel.vue.d.ts +104 -0
- package/dist/runtime/components/Checkbox.vue +49 -71
- package/dist/runtime/components/Checkbox.vue.d.ts +56 -0
- package/dist/runtime/components/Chip.vue +31 -48
- package/dist/runtime/components/Chip.vue.d.ts +30 -0
- package/dist/runtime/components/Collapsible.vue +22 -30
- package/dist/runtime/components/Collapsible.vue.d.ts +26 -0
- package/dist/runtime/components/Drawer.vue +52 -102
- package/dist/runtime/components/Drawer.vue.d.ts +80 -0
- package/dist/runtime/components/DropdownMenu.vue +65 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +99 -0
- package/dist/runtime/components/DropdownMenuContent.vue +192 -0
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +39 -0
- package/dist/runtime/components/Form.vue +197 -0
- package/dist/runtime/components/Form.vue.d.ts +78 -0
- package/dist/runtime/components/FormItem.vue +90 -0
- package/dist/runtime/components/FormItem.vue.d.ts +60 -0
- package/dist/runtime/components/Input.vue +93 -115
- package/dist/runtime/components/Input.vue.d.ts +64 -0
- package/dist/runtime/components/InputNumber.vue +81 -116
- package/dist/runtime/components/InputNumber.vue.d.ts +245 -0
- package/dist/runtime/components/Kbd.vue +18 -39
- package/dist/runtime/components/Kbd.vue.d.ts +28 -0
- package/dist/runtime/components/Link.vue +170 -244
- package/dist/runtime/components/Link.vue.d.ts +95 -0
- package/dist/runtime/components/LinkBase.vue +36 -54
- package/dist/runtime/components/LinkBase.vue.d.ts +28 -0
- package/dist/runtime/components/Modal.vue +50 -85
- package/dist/runtime/components/Modal.vue.d.ts +66 -0
- package/dist/runtime/components/OverlayProvider.vue +10 -14
- package/dist/runtime/components/OverlayProvider.vue.d.ts +2 -0
- package/dist/runtime/components/Pagination.vue +55 -121
- package/dist/runtime/components/Pagination.vue.d.ts +93 -0
- package/dist/runtime/components/PinInput.vue +57 -57
- package/dist/runtime/components/PinInput.vue.d.ts +35 -0
- package/dist/runtime/components/Popover.vue +39 -68
- package/dist/runtime/components/Popover.vue.d.ts +45 -0
- package/dist/runtime/components/Progress.vue +68 -120
- package/dist/runtime/components/Progress.vue.d.ts +54 -0
- package/dist/runtime/components/RadioGroup.vue +75 -129
- package/dist/runtime/components/RadioGroup.vue.d.ts +74 -0
- package/dist/runtime/components/ScrollArea.vue +31 -31
- package/dist/runtime/components/ScrollArea.vue.d.ts +17 -0
- package/dist/runtime/components/Select.vue +119 -199
- package/dist/runtime/components/Select.vue.d.ts +119 -0
- package/dist/runtime/components/Separator.vue +26 -44
- package/dist/runtime/components/Separator.vue.d.ts +27 -0
- package/dist/runtime/components/Skeleton.vue +12 -21
- package/dist/runtime/components/Skeleton.vue.d.ts +19 -0
- package/dist/runtime/components/Slider.vue +54 -71
- package/dist/runtime/components/Slider.vue.d.ts +36 -0
- package/dist/runtime/components/Switch.vue +54 -68
- package/dist/runtime/components/Switch.vue.d.ts +49 -0
- package/dist/runtime/components/Table.vue +113 -186
- package/dist/runtime/components/Table.vue.d.ts +148 -0
- package/dist/runtime/components/Tabs.vue +35 -79
- package/dist/runtime/components/Tabs.vue.d.ts +65 -0
- package/dist/runtime/components/Textarea.vue +82 -123
- package/dist/runtime/components/Textarea.vue.d.ts +60 -0
- package/dist/runtime/components/Toast.vue +51 -76
- package/dist/runtime/components/Toast.vue.d.ts +131 -0
- package/dist/runtime/components/ToastProvider.vue +65 -101
- package/dist/runtime/components/ToastProvider.vue.d.ts +38 -0
- package/dist/runtime/components/Tooltip.vue +36 -47
- package/dist/runtime/components/Tooltip.vue.d.ts +31 -0
- package/dist/runtime/composables/useAvatarGroup.d.ts +1 -1
- package/dist/runtime/composables/useButtonGroup.d.ts +2 -2
- package/dist/runtime/composables/useFormItem.d.ts +27 -0
- package/dist/runtime/composables/useFormItem.js +64 -0
- package/dist/runtime/composables/useKbd.d.ts +1 -1
- package/dist/runtime/composables/useLocale.d.ts +3 -3
- package/dist/runtime/composables/useTheme.d.ts +1 -1
- package/dist/runtime/composables/useTheme.js +2 -1
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +3 -0
- package/dist/runtime/locale/en.d.ts +1 -1
- package/dist/runtime/locale/zh-tw.d.ts +1 -1
- package/dist/runtime/theme/accordion.d.ts +45 -51
- package/dist/runtime/theme/accordion.js +1 -1
- package/dist/runtime/theme/alert.d.ts +115 -121
- package/dist/runtime/theme/alert.js +1 -1
- package/dist/runtime/theme/app.d.ts +1 -0
- package/dist/runtime/theme/app.js +2 -1
- package/dist/runtime/theme/avatar-group.d.ts +42 -48
- package/dist/runtime/theme/avatar-group.js +1 -1
- package/dist/runtime/theme/avatar.d.ts +46 -52
- package/dist/runtime/theme/avatar.js +1 -1
- package/dist/runtime/theme/badge.d.ts +63 -93
- package/dist/runtime/theme/badge.js +1 -1
- package/dist/runtime/theme/breadcrumb.d.ts +52 -58
- package/dist/runtime/theme/breadcrumb.js +1 -1
- package/dist/runtime/theme/button-group.d.ts +36 -42
- package/dist/runtime/theme/button.d.ts +165 -117
- package/dist/runtime/theme/button.js +1 -1
- package/dist/runtime/theme/calendar.d.ts +52 -50
- package/dist/runtime/theme/calendar.js +20 -3
- package/dist/runtime/theme/card.d.ts +52 -58
- package/dist/runtime/theme/card.js +1 -1
- package/dist/runtime/theme/carousel.d.ts +98 -104
- package/dist/runtime/theme/carousel.js +1 -1
- package/dist/runtime/theme/checkbox.d.ts +77 -83
- package/dist/runtime/theme/checkbox.js +1 -1
- package/dist/runtime/theme/chip.d.ts +50 -89
- package/dist/runtime/theme/chip.js +1 -1
- package/dist/runtime/theme/collapsible.d.ts +29 -35
- package/dist/runtime/theme/collapsible.js +1 -1
- package/dist/runtime/theme/drawer.d.ts +131 -102
- package/dist/runtime/theme/drawer.js +1 -1
- package/dist/runtime/theme/dropdown-menu.d.ts +65 -0
- package/dist/runtime/theme/dropdown-menu.js +83 -0
- package/dist/runtime/theme/form-item.d.ts +70 -0
- package/dist/runtime/theme/form-item.js +34 -0
- package/dist/runtime/theme/form.d.ts +2 -0
- package/dist/runtime/theme/form.js +7 -0
- package/dist/runtime/theme/index.d.ts +3 -0
- package/dist/runtime/theme/index.js +3 -0
- package/dist/runtime/theme/input-number.d.ts +100 -126
- package/dist/runtime/theme/input-number.js +1 -1
- package/dist/runtime/theme/input.d.ts +153 -131
- package/dist/runtime/theme/input.js +3 -3
- package/dist/runtime/theme/kbd.d.ts +30 -36
- package/dist/runtime/theme/link.d.ts +37 -43
- package/dist/runtime/theme/modal.d.ts +35 -69
- package/dist/runtime/theme/modal.js +1 -1
- package/dist/runtime/theme/pagination.d.ts +71 -77
- package/dist/runtime/theme/pagination.js +1 -1
- package/dist/runtime/theme/pinInput.d.ts +82 -88
- package/dist/runtime/theme/pinInput.js +2 -2
- package/dist/runtime/theme/popover.d.ts +29 -35
- package/dist/runtime/theme/popover.js +1 -1
- package/dist/runtime/theme/progress.d.ts +167 -109
- package/dist/runtime/theme/progress.js +1 -1
- package/dist/runtime/theme/radio-group.d.ts +99 -105
- package/dist/runtime/theme/radio-group.js +1 -1
- package/dist/runtime/theme/scroll-area.d.ts +62 -68
- package/dist/runtime/theme/scroll-area.js +1 -1
- package/dist/runtime/theme/select.d.ts +168 -158
- package/dist/runtime/theme/select.js +3 -2
- package/dist/runtime/theme/separator.d.ts +64 -85
- package/dist/runtime/theme/separator.js +1 -1
- package/dist/runtime/theme/skeleton.d.ts +1 -7
- package/dist/runtime/theme/slider.d.ts +62 -68
- package/dist/runtime/theme/slider.js +1 -1
- package/dist/runtime/theme/switch.d.ts +111 -117
- package/dist/runtime/theme/switch.js +1 -1
- package/dist/runtime/theme/table.d.ts +75 -78
- package/dist/runtime/theme/table.js +3 -2
- package/dist/runtime/theme/tabs.d.ts +116 -139
- package/dist/runtime/theme/tabs.js +1 -1
- package/dist/runtime/theme/textarea.d.ts +78 -90
- package/dist/runtime/theme/textarea.js +2 -2
- package/dist/runtime/theme/toast-provider.d.ts +110 -131
- package/dist/runtime/theme/toast-provider.js +1 -1
- package/dist/runtime/theme/toast.d.ts +74 -80
- package/dist/runtime/theme/toast.js +1 -1
- package/dist/runtime/theme/tooltip.d.ts +35 -41
- package/dist/runtime/theme/tooltip.js +1 -1
- package/dist/runtime/types/components.d.ts +3 -0
- package/dist/runtime/types/form.d.ts +45 -0
- package/dist/runtime/types/form.js +0 -0
- package/dist/runtime/types/index.d.ts +5 -2
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/utils.d.ts +37 -16
- package/dist/runtime/utils/extend-theme.js +15 -4
- package/dist/runtime/utils/form.d.ts +5 -0
- package/dist/runtime/utils/form.js +24 -0
- package/dist/runtime/utils/index.d.ts +2 -0
- package/dist/runtime/utils/index.js +4 -0
- package/dist/runtime/utils/link.d.ts +4 -28
- package/dist/runtime/utils/link.js +10 -3
- package/dist/runtime/utils/styler.d.ts +2 -2
- package/dist/runtime/utils/styler.js +2 -2
- package/dist/shared/ui.D1BTWZFB.mjs +5 -0
- package/dist/shared/ui.D1BTWZFB.mjs.map +1 -0
- package/dist/types.d.mts +1 -1
- package/dist/unocss.mjs +7 -6
- package/dist/unocss.mjs.map +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/unplugin.mjs.map +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +78 -74
- package/dist/module.cjs +0 -5
- package/dist/shared/ui.1a1f119c.mjs +0 -5
- package/dist/shared/ui.1a1f119c.mjs.map +0 -1
- package/dist/types.d.ts +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TooltipArrowProps, TooltipContentEmits, TooltipContentProps, TooltipRootEmits, TooltipRootProps } from 'reka-ui';
|
|
2
|
+
import type { tooltip } from '../theme/index.js';
|
|
3
|
+
import type { ComponentAttrs, EmitsToProps } from '../types/index.js';
|
|
4
|
+
export interface TooltipEmits extends TooltipRootEmits {
|
|
5
|
+
}
|
|
6
|
+
export interface TooltipSlots {
|
|
7
|
+
default?: (props: {
|
|
8
|
+
open: boolean;
|
|
9
|
+
}) => any;
|
|
10
|
+
content?: (props: {}) => any;
|
|
11
|
+
}
|
|
12
|
+
export interface TooltipProps extends ComponentAttrs<typeof tooltip>, TooltipRootProps {
|
|
13
|
+
text?: string;
|
|
14
|
+
content?: Omit<TooltipContentProps, 'as' | 'asChild'> & Partial<EmitsToProps<TooltipContentEmits>>;
|
|
15
|
+
arrow?: boolean | Omit<TooltipArrowProps, 'as' | 'asChild'>;
|
|
16
|
+
/** @default true */
|
|
17
|
+
portal?: boolean;
|
|
18
|
+
}
|
|
19
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<TooltipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
|
+
"update:open": (value: boolean) => any;
|
|
21
|
+
}, string, import("vue").PublicProps, Readonly<TooltipProps> & Readonly<{
|
|
22
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
portal: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, TooltipSlots>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonProps } from '../types/index.js';
|
|
2
2
|
export declare function useButtonGroup(props?: Pick<ButtonProps, 'size'>): {
|
|
3
|
-
size: import("vue").ComputedRef<
|
|
4
|
-
orientation: import("vue").ComputedRef<
|
|
3
|
+
size: import("vue").ComputedRef<"xs" | "sm" | "md" | "lg" | "xl" | undefined>;
|
|
4
|
+
orientation: import("vue").ComputedRef<"horizontal" | "vertical" | undefined>;
|
|
5
5
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { GetObjectField } from '../types/index.js';
|
|
2
|
+
interface Props<T> {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
size?: GetObjectField<T, 'size'>;
|
|
6
|
+
highlight?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function useFormItem<T>(props?: Props<T>, options?: {
|
|
10
|
+
bind?: boolean;
|
|
11
|
+
deferInputValidation?: boolean;
|
|
12
|
+
}): {
|
|
13
|
+
id: import("vue").ComputedRef<string | undefined>;
|
|
14
|
+
name: import("vue").ComputedRef<string | undefined>;
|
|
15
|
+
size: import("vue").ComputedRef<"xs" | "sm" | "md" | "lg" | "xl" | NonNullable<GetObjectField<T, "size">> | undefined>;
|
|
16
|
+
highlight: import("vue").ComputedRef<boolean | undefined>;
|
|
17
|
+
disabled: import("vue").ComputedRef<boolean | undefined>;
|
|
18
|
+
emitFormBlur: () => void;
|
|
19
|
+
emitFormInput: import("@vueuse/core").UseDebounceFnReturn<() => void>;
|
|
20
|
+
emitFormChange: () => void;
|
|
21
|
+
emitFormFocus: () => void;
|
|
22
|
+
ariaAttrs: import("vue").ComputedRef<{
|
|
23
|
+
'aria-describedby': string;
|
|
24
|
+
'aria-invalid': boolean;
|
|
25
|
+
} | undefined>;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { useDebounceFn } from "@vueuse/core";
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import {
|
|
4
|
+
injectFormBus,
|
|
5
|
+
injectFormInputId,
|
|
6
|
+
injectFormInputs,
|
|
7
|
+
injectFormItem,
|
|
8
|
+
injectFormOptions
|
|
9
|
+
} from "../app/injections.js";
|
|
10
|
+
export function useFormItem(props, options) {
|
|
11
|
+
const formOptions = injectFormOptions();
|
|
12
|
+
const formBus = injectFormBus();
|
|
13
|
+
const formItem = injectFormItem();
|
|
14
|
+
const formInputs = injectFormInputs();
|
|
15
|
+
const inputId = injectFormInputId();
|
|
16
|
+
if (formItem && inputId) {
|
|
17
|
+
if (options?.bind === false) {
|
|
18
|
+
inputId.value = void 0;
|
|
19
|
+
} else if (props?.id) {
|
|
20
|
+
inputId.value = props?.id;
|
|
21
|
+
}
|
|
22
|
+
if (formInputs && formItem.value.name && inputId.value)
|
|
23
|
+
formInputs.value[formItem.value.name] = { id: inputId.value, pattern: formItem.value.errorPattern };
|
|
24
|
+
}
|
|
25
|
+
function emitFormEvent(type, name, eager) {
|
|
26
|
+
if (formBus && formItem && name)
|
|
27
|
+
formBus.emit({ type, name, eager });
|
|
28
|
+
}
|
|
29
|
+
function emitFormBlur() {
|
|
30
|
+
emitFormEvent("blur", formItem?.value.name);
|
|
31
|
+
}
|
|
32
|
+
function emitFormFocus() {
|
|
33
|
+
emitFormEvent("focus", formItem?.value.name);
|
|
34
|
+
}
|
|
35
|
+
function emitFormChange() {
|
|
36
|
+
emitFormEvent("change", formItem?.value.name);
|
|
37
|
+
}
|
|
38
|
+
const emitFormInput = useDebounceFn(
|
|
39
|
+
() => {
|
|
40
|
+
emitFormEvent("input", formItem?.value.name, !options?.deferInputValidation || formItem?.value.eagerValidation);
|
|
41
|
+
},
|
|
42
|
+
formItem?.value.validateOnInputDelay ?? formOptions?.value.validateOnInputDelay ?? 0
|
|
43
|
+
);
|
|
44
|
+
return {
|
|
45
|
+
id: computed(() => props?.id ?? inputId?.value),
|
|
46
|
+
name: computed(() => props?.name ?? formItem?.value.name),
|
|
47
|
+
size: computed(() => props?.size ?? formItem?.value.size),
|
|
48
|
+
highlight: computed(() => formItem?.value.error ? true : props?.highlight),
|
|
49
|
+
disabled: computed(() => formOptions?.value.disabled || props?.disabled),
|
|
50
|
+
emitFormBlur,
|
|
51
|
+
emitFormInput,
|
|
52
|
+
emitFormChange,
|
|
53
|
+
emitFormFocus,
|
|
54
|
+
ariaAttrs: computed(() => {
|
|
55
|
+
if (!formItem?.value)
|
|
56
|
+
return;
|
|
57
|
+
const descriptiveAttrs = ["error", "hint", "help", "description"].filter((type) => formItem?.value?.[type]).map((type) => `${formItem?.value.ariaId}-${type}`) || [];
|
|
58
|
+
return {
|
|
59
|
+
"aria-describedby": descriptiveAttrs.join(" "),
|
|
60
|
+
"aria-invalid": !!formItem?.value.error
|
|
61
|
+
};
|
|
62
|
+
})
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -29,7 +29,7 @@ export declare const kbdKeysMap: {
|
|
|
29
29
|
export type KbdKey = keyof typeof kbdKeysMap;
|
|
30
30
|
export type KbdKeySpecific = keyof KbdKeysSpecificMap;
|
|
31
31
|
export declare const useKbd: () => {
|
|
32
|
-
macOS: import("vue").ComputedRef<
|
|
32
|
+
macOS: import("vue").ComputedRef<any>;
|
|
33
33
|
getKbdKey: (value?: KbdKey | (string & {})) => string | undefined;
|
|
34
34
|
};
|
|
35
35
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Translator } from '../utils/translator.js';
|
|
2
2
|
export declare const useLocale: () => {
|
|
3
|
-
locale: import("vue").ComputedRef<import("../utils").Locale<import("
|
|
3
|
+
locale: import("vue").ComputedRef<import("../utils/index.js").Locale<import("../types/index.js").Messages>>;
|
|
4
4
|
lang: import("vue").ComputedRef<string>;
|
|
5
5
|
code: import("vue").ComputedRef<string>;
|
|
6
|
-
dir: import("vue").ComputedRef<import("../utils").Direction>;
|
|
7
|
-
t: Translator<import("
|
|
6
|
+
dir: import("vue").ComputedRef<import("../utils/index.js").Direction>;
|
|
7
|
+
t: Translator<import("../types/index.js").Messages>;
|
|
8
8
|
};
|
|
@@ -3,7 +3,7 @@ import type { StylerProps, StylerReturnType, StylerTheme } from '../types/index.
|
|
|
3
3
|
type UITheme = typeof uiTheme;
|
|
4
4
|
export declare const useTheme: () => {
|
|
5
5
|
theme: import("vue").ComputedRef<typeof uiTheme>;
|
|
6
|
-
createStyler: <V extends import("@byyuurin/ui-kit").CVVariants<
|
|
6
|
+
createStyler: <V extends import("@byyuurin/ui-kit").CVVariants<P, B>, CV extends import("@byyuurin/ui-kit").CVCompoundVariants<V, P, B>, DV extends import("@byyuurin/ui-kit").CVDefaultVariants<V, P>, B extends import("@byyuurin/ui-kit").ClassValue = undefined, P extends import("@byyuurin/ui-kit").CVParts = undefined>(scope: import("@byyuurin/ui-kit").CVScope<V, CV, DV, B, P>) => [keyof V] extends string[] ? (props: import("@byyuurin/ui-kit").VariantProps<import("@byyuurin/ui-kit").CVReturnType<V, P, B>> & import("../types/index.js").StylerBaseProps) => P extends undefined ? { [K in B extends undefined ? never : "base"]: import("@byyuurin/ui-kit").CVHandler<V, P, string>; } : { [K_1 in (B extends undefined ? never : "base") | keyof P]: import("@byyuurin/ui-kit").CVHandler<V, P, string>; } : (props?: import("../types/index.js").StylerBaseProps) => P extends undefined ? { [K in B extends undefined ? never : "base"]: import("@byyuurin/ui-kit").CVHandler<V, P, string>; } : { [K_1 in (B extends undefined ? never : "base") | keyof P]: import("@byyuurin/ui-kit").CVHandler<V, P, string>; };
|
|
7
7
|
generateStyle: <T extends keyof UITheme>(name: T, props?: StylerProps<UITheme[T]>) => StylerReturnType<StylerTheme<UITheme[T]>>;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -9,7 +9,8 @@ export const useTheme = createSharedComposable(() => {
|
|
|
9
9
|
const unoConfig = injectUnoConfig();
|
|
10
10
|
const mergeRules = transformUnoRules(toValue(unoConfig));
|
|
11
11
|
const { createStyler } = prepareStyler(mergeRules);
|
|
12
|
-
const
|
|
12
|
+
const themeDefaults = JSON.parse(JSON.stringify(uiTheme));
|
|
13
|
+
const theme = computed(() => extendTheme(toValue(themeExtension), themeDefaults));
|
|
13
14
|
function generateStyle(name, props) {
|
|
14
15
|
const styler = createStyler(theme.value[name]);
|
|
15
16
|
return styler(props);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ToastState } from '../types/index.js';
|
|
2
2
|
export declare const useToast: () => {
|
|
3
|
-
toasts:
|
|
3
|
+
toasts: any;
|
|
4
4
|
add: (toast: Partial<ToastState>) => ToastState;
|
|
5
5
|
update: (id: string | number, toast: Partial<Omit<ToastState, "id">>) => void;
|
|
6
6
|
remove: (id: string | number) => void;
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export { default as Checkbox } from './components/Checkbox.vue.js';
|
|
|
14
14
|
export { default as Chip } from './components/Chip.vue.js';
|
|
15
15
|
export { default as Collapsible } from './components/Collapsible.vue.js';
|
|
16
16
|
export { default as Drawer } from './components/Drawer.vue.js';
|
|
17
|
+
export { default as DropdownMenu } from './components/DropdownMenu.vue.js';
|
|
18
|
+
export { default as Form } from './components/Form.vue.js';
|
|
19
|
+
export { default as FormItem } from './components/FormItem.vue.js';
|
|
17
20
|
export { default as Input } from './components/Input.vue.js';
|
|
18
21
|
export { default as InputNumber } from './components/InputNumber.vue.js';
|
|
19
22
|
export { default as Kbd } from './components/Kbd.vue.js';
|
package/dist/runtime/index.js
CHANGED
|
@@ -14,6 +14,9 @@ export { default as Checkbox } from "./components/Checkbox.vue";
|
|
|
14
14
|
export { default as Chip } from "./components/Chip.vue";
|
|
15
15
|
export { default as Collapsible } from "./components/Collapsible.vue";
|
|
16
16
|
export { default as Drawer } from "./components/Drawer.vue";
|
|
17
|
+
export { default as DropdownMenu } from "./components/DropdownMenu.vue";
|
|
18
|
+
export { default as Form } from "./components/Form.vue";
|
|
19
|
+
export { default as FormItem } from "./components/FormItem.vue";
|
|
17
20
|
export { default as Input } from "./components/Input.vue";
|
|
18
21
|
export { default as InputNumber } from "./components/InputNumber.vue";
|
|
19
22
|
export { default as Kbd } from "./components/Kbd.vue";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../utils").Locale<import("
|
|
1
|
+
declare const _default: import("../utils/index.js").Locale<import("../types/index.js").Messages>;
|
|
2
2
|
export default _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("../utils").Locale<import("..").Messages>;
|
|
1
|
+
declare const _default: import("../utils/index.js").Locale<import("..").Messages>;
|
|
2
2
|
export default _default;
|
|
@@ -1,56 +1,50 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
item: string;
|
|
6
|
-
header: string;
|
|
7
|
-
trigger: string;
|
|
8
|
-
content: string[];
|
|
9
|
-
body: string;
|
|
10
|
-
leadingIcon: string;
|
|
11
|
-
trailingIcon: string;
|
|
12
|
-
label: string;
|
|
13
|
-
};
|
|
14
|
-
variants: {
|
|
15
|
-
disabled: {
|
|
16
|
-
true: {
|
|
17
|
-
trigger: string;
|
|
18
|
-
};
|
|
1
|
+
declare const _default: import("@byyuurin/ui-kit").CVScopeMeta<{
|
|
2
|
+
disabled: {
|
|
3
|
+
true: {
|
|
4
|
+
trigger: string;
|
|
19
5
|
};
|
|
20
6
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
7
|
+
}, import("@byyuurin/ui-kit").CVCompoundVariants<{
|
|
8
|
+
disabled: {
|
|
9
|
+
true: {
|
|
10
|
+
trigger: string;
|
|
26
11
|
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
};
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
root: string;
|
|
15
|
+
item: string;
|
|
16
|
+
header: string;
|
|
17
|
+
trigger: string;
|
|
18
|
+
content: string[];
|
|
19
|
+
body: string;
|
|
20
|
+
leadingIcon: string;
|
|
21
|
+
trailingIcon: string;
|
|
22
|
+
label: string;
|
|
23
|
+
}, undefined>, import("@byyuurin/ui-kit").CVDefaultVariants<{
|
|
24
|
+
disabled: {
|
|
25
|
+
true: {
|
|
26
|
+
trigger: string;
|
|
43
27
|
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
root: string;
|
|
31
|
+
item: string;
|
|
32
|
+
header: string;
|
|
33
|
+
trigger: string;
|
|
34
|
+
content: string[];
|
|
35
|
+
body: string;
|
|
36
|
+
leadingIcon: string;
|
|
37
|
+
trailingIcon: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}>, undefined, {
|
|
40
|
+
root: string;
|
|
41
|
+
item: string;
|
|
42
|
+
header: string;
|
|
43
|
+
trigger: string;
|
|
44
|
+
content: string[];
|
|
45
|
+
body: string;
|
|
46
|
+
leadingIcon: string;
|
|
47
|
+
trailingIcon: string;
|
|
48
|
+
label: string;
|
|
49
|
+
}>;
|
|
56
50
|
export default _default;
|
|
@@ -1,125 +1,119 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
declare const _default: import("@byyuurin/ui-kit").CVScopeMeta<{
|
|
2
|
+
variant: {
|
|
3
|
+
solid: {
|
|
4
|
+
root: string;
|
|
5
|
+
close: string;
|
|
6
|
+
};
|
|
7
|
+
outline: {
|
|
8
|
+
root: string;
|
|
9
|
+
};
|
|
10
|
+
soft: {
|
|
11
|
+
root: string;
|
|
12
|
+
};
|
|
13
|
+
'soft-outline': {
|
|
14
|
+
root: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
orientation: {
|
|
18
|
+
horizontal: {
|
|
19
|
+
root: string;
|
|
20
|
+
actions: string;
|
|
21
|
+
};
|
|
22
|
+
vertical: {
|
|
23
|
+
root: string;
|
|
24
|
+
actions: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
title: {
|
|
28
|
+
true: {
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
}, import("@byyuurin/ui-kit").CVCompoundVariants<{
|
|
33
|
+
variant: {
|
|
34
|
+
solid: {
|
|
35
|
+
root: string;
|
|
36
|
+
close: string;
|
|
37
|
+
};
|
|
38
|
+
outline: {
|
|
39
|
+
root: string;
|
|
40
|
+
};
|
|
41
|
+
soft: {
|
|
42
|
+
root: string;
|
|
43
|
+
};
|
|
44
|
+
'soft-outline': {
|
|
45
|
+
root: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
orientation: {
|
|
49
|
+
horizontal: {
|
|
50
|
+
root: string;
|
|
51
|
+
actions: string;
|
|
52
|
+
};
|
|
53
|
+
vertical: {
|
|
54
|
+
root: string;
|
|
55
|
+
actions: string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
title: {
|
|
59
|
+
true: {
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
root: string;
|
|
65
|
+
wrapper: string;
|
|
66
|
+
title: string;
|
|
67
|
+
description: string;
|
|
68
|
+
icon: string;
|
|
69
|
+
actions: string;
|
|
70
|
+
close: string;
|
|
71
|
+
}, undefined>, import("@byyuurin/ui-kit").CVDefaultVariants<{
|
|
72
|
+
variant: {
|
|
73
|
+
solid: {
|
|
74
|
+
root: string;
|
|
75
|
+
close: string;
|
|
76
|
+
};
|
|
77
|
+
outline: {
|
|
78
|
+
root: string;
|
|
79
|
+
};
|
|
80
|
+
soft: {
|
|
81
|
+
root: string;
|
|
82
|
+
};
|
|
83
|
+
'soft-outline': {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
orientation: {
|
|
88
|
+
horizontal: {
|
|
89
|
+
root: string;
|
|
90
|
+
actions: string;
|
|
91
|
+
};
|
|
92
|
+
vertical: {
|
|
93
|
+
root: string;
|
|
94
|
+
actions: string;
|
|
95
|
+
};
|
|
11
96
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
root: string;
|
|
16
|
-
close: string;
|
|
17
|
-
};
|
|
18
|
-
outline: {
|
|
19
|
-
root: string;
|
|
20
|
-
};
|
|
21
|
-
soft: {
|
|
22
|
-
root: string;
|
|
23
|
-
};
|
|
24
|
-
'soft-outline': {
|
|
25
|
-
root: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
orientation: {
|
|
29
|
-
horizontal: {
|
|
30
|
-
root: string;
|
|
31
|
-
actions: string;
|
|
32
|
-
};
|
|
33
|
-
vertical: {
|
|
34
|
-
root: string;
|
|
35
|
-
actions: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
title: {
|
|
39
|
-
true: {
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
97
|
+
title: {
|
|
98
|
+
true: {
|
|
99
|
+
description: string;
|
|
42
100
|
};
|
|
43
101
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
horizontal: {
|
|
62
|
-
root: string;
|
|
63
|
-
actions: string;
|
|
64
|
-
};
|
|
65
|
-
vertical: {
|
|
66
|
-
root: string;
|
|
67
|
-
actions: string;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
title: {
|
|
71
|
-
true: {
|
|
72
|
-
description: string;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
|
-
}, {
|
|
76
|
-
root: string;
|
|
77
|
-
wrapper: string;
|
|
78
|
-
title: string;
|
|
79
|
-
description: string;
|
|
80
|
-
icon: string;
|
|
81
|
-
actions: string;
|
|
82
|
-
close: string;
|
|
83
|
-
}, undefined>;
|
|
84
|
-
defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
|
|
85
|
-
variant: {
|
|
86
|
-
solid: {
|
|
87
|
-
root: string;
|
|
88
|
-
close: string;
|
|
89
|
-
};
|
|
90
|
-
outline: {
|
|
91
|
-
root: string;
|
|
92
|
-
};
|
|
93
|
-
soft: {
|
|
94
|
-
root: string;
|
|
95
|
-
};
|
|
96
|
-
'soft-outline': {
|
|
97
|
-
root: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
orientation: {
|
|
101
|
-
horizontal: {
|
|
102
|
-
root: string;
|
|
103
|
-
actions: string;
|
|
104
|
-
};
|
|
105
|
-
vertical: {
|
|
106
|
-
root: string;
|
|
107
|
-
actions: string;
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
title: {
|
|
111
|
-
true: {
|
|
112
|
-
description: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
}, {
|
|
116
|
-
root: string;
|
|
117
|
-
wrapper: string;
|
|
118
|
-
title: string;
|
|
119
|
-
description: string;
|
|
120
|
-
icon: string;
|
|
121
|
-
actions: string;
|
|
122
|
-
close: string;
|
|
123
|
-
}>;
|
|
124
|
-
};
|
|
102
|
+
}, {
|
|
103
|
+
root: string;
|
|
104
|
+
wrapper: string;
|
|
105
|
+
title: string;
|
|
106
|
+
description: string;
|
|
107
|
+
icon: string;
|
|
108
|
+
actions: string;
|
|
109
|
+
close: string;
|
|
110
|
+
}>, undefined, {
|
|
111
|
+
root: string;
|
|
112
|
+
wrapper: string;
|
|
113
|
+
title: string;
|
|
114
|
+
description: string;
|
|
115
|
+
icon: string;
|
|
116
|
+
actions: string;
|
|
117
|
+
close: string;
|
|
118
|
+
}>;
|
|
125
119
|
export default _default;
|