@byyuurin/ui 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -20
- package/README.md +5 -3
- package/dist/module.json +1 -1
- package/dist/module.mjs +2 -2
- package/dist/runtime/components/Accordion.vue +41 -41
- package/dist/runtime/components/Accordion.vue.d.ts +11 -7
- package/dist/runtime/components/Alert.vue +63 -63
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/App.vue +11 -10
- package/dist/runtime/components/App.vue.d.ts +11 -7
- package/dist/runtime/components/Avatar.vue +29 -29
- package/dist/runtime/components/Avatar.vue.d.ts +4 -3
- package/dist/runtime/components/AvatarGroup.vue +4 -4
- package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
- package/dist/runtime/components/Badge.vue +32 -32
- package/dist/runtime/components/Badge.vue.d.ts +2 -2
- package/dist/runtime/components/Breadcrumb.vue +49 -49
- package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
- package/dist/runtime/components/Button.vue +52 -51
- package/dist/runtime/components/Button.vue.d.ts +1 -1
- package/dist/runtime/components/Calendar.vue +75 -77
- package/dist/runtime/components/Calendar.vue.d.ts +16 -12
- package/dist/runtime/components/Card.vue +41 -41
- package/dist/runtime/components/Card.vue.d.ts +1 -1
- package/dist/runtime/components/Carousel.vue +85 -66
- package/dist/runtime/components/Carousel.vue.d.ts +14 -10
- package/dist/runtime/components/Checkbox.vue +46 -46
- package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
- package/dist/runtime/components/CheckboxGroup.vue +131 -0
- package/dist/runtime/components/CheckboxGroup.vue.d.ts +93 -0
- package/dist/runtime/components/Chip.vue +15 -15
- package/dist/runtime/components/Chip.vue.d.ts +2 -2
- package/dist/runtime/components/Collapsible.vue +14 -14
- package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/Drawer.vue +76 -76
- package/dist/runtime/components/Drawer.vue.d.ts +6 -6
- package/dist/runtime/components/DropdownMenu.vue +28 -28
- package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
- package/dist/runtime/components/DropdownMenuContent.vue +152 -153
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
- package/dist/runtime/components/FieldGroup.vue +3 -3
- package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
- package/dist/runtime/components/Form.vue +9 -9
- package/dist/runtime/components/Form.vue.d.ts +13 -8
- package/dist/runtime/components/FormField.vue +39 -38
- package/dist/runtime/components/FormField.vue.d.ts +7 -2
- package/dist/runtime/components/Icon.vue +2 -2
- package/dist/runtime/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/components/Input.vue +48 -48
- package/dist/runtime/components/Input.vue.d.ts +16 -12
- package/dist/runtime/components/InputNumber.vue +48 -50
- package/dist/runtime/components/InputNumber.vue.d.ts +128 -129
- package/dist/runtime/components/InputTags.vue +156 -0
- package/dist/runtime/components/InputTags.vue.d.ts +90 -0
- package/dist/runtime/components/Kbd.vue +3 -3
- package/dist/runtime/components/Kbd.vue.d.ts +2 -2
- package/dist/runtime/components/Link.vue +26 -25
- package/dist/runtime/components/Link.vue.d.ts +16 -6
- package/dist/runtime/components/LinkBase.vue +3 -3
- package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
- package/dist/runtime/components/Marquee.vue +38 -0
- package/dist/runtime/components/Marquee.vue.d.ts +54 -0
- package/dist/runtime/components/Modal.vue +74 -74
- package/dist/runtime/components/Modal.vue.d.ts +6 -6
- package/dist/runtime/components/NavigationMenu.vue +243 -234
- package/dist/runtime/components/NavigationMenu.vue.d.ts +53 -14
- package/dist/runtime/components/OverlayProvider.vue +9 -9
- package/dist/runtime/components/Pagination.vue +47 -47
- package/dist/runtime/components/Pagination.vue.d.ts +4 -4
- package/dist/runtime/components/PinInput.vue +23 -23
- package/dist/runtime/components/PinInput.vue.d.ts +14 -10
- package/dist/runtime/components/Popover.vue +22 -22
- package/dist/runtime/components/Popover.vue.d.ts +11 -7
- package/dist/runtime/components/Progress.vue +25 -25
- package/dist/runtime/components/Progress.vue.d.ts +2 -2
- package/dist/runtime/components/RadioGroup.vue +50 -50
- package/dist/runtime/components/RadioGroup.vue.d.ts +13 -9
- package/dist/runtime/components/ScrollArea.vue +32 -32
- package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
- package/dist/runtime/components/Select.vue +299 -148
- package/dist/runtime/components/Select.vue.d.ts +103 -123
- package/dist/runtime/components/Separator.vue +30 -30
- package/dist/runtime/components/Separator.vue.d.ts +2 -2
- package/dist/runtime/components/Skeleton.vue +11 -11
- package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
- package/dist/runtime/components/Slider.vue +25 -25
- package/dist/runtime/components/Slider.vue.d.ts +11 -7
- package/dist/runtime/components/Stepper.vue +116 -0
- package/dist/runtime/components/Stepper.vue.d.ts +83 -0
- package/dist/runtime/components/Switch.vue +30 -30
- package/dist/runtime/components/Switch.vue.d.ts +4 -3
- package/dist/runtime/components/Table.vue +188 -166
- package/dist/runtime/components/Table.vue.d.ts +27 -22
- package/dist/runtime/components/Tabs.vue +74 -74
- package/dist/runtime/components/Tabs.vue.d.ts +12 -8
- package/dist/runtime/components/Textarea.vue +47 -47
- package/dist/runtime/components/Textarea.vue.d.ts +16 -11
- package/dist/runtime/components/Timeline.vue +102 -0
- package/dist/runtime/components/Timeline.vue.d.ts +78 -0
- package/dist/runtime/components/Toast.vue +93 -93
- package/dist/runtime/components/Toast.vue.d.ts +5 -5
- package/dist/runtime/components/ToastProvider.vue +29 -29
- package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
- package/dist/runtime/components/Tooltip.vue +24 -25
- package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
- package/dist/runtime/components/Tree.vue +241 -0
- package/dist/runtime/components/Tree.vue.d.ts +121 -0
- package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
- package/dist/runtime/composables/defineShortcuts.js +44 -8
- package/dist/runtime/composables/useLocale.d.ts +12 -0
- package/dist/runtime/locale/en.d.ts +6 -0
- package/dist/runtime/locale/en.js +6 -0
- package/dist/runtime/locale/zh_tw.d.ts +6 -0
- package/dist/runtime/locale/zh_tw.js +6 -0
- package/dist/runtime/types/html.d.ts +8 -0
- package/dist/runtime/types/html.js +0 -0
- package/dist/runtime/types/index.d.ts +7 -0
- package/dist/runtime/types/index.js +7 -0
- package/dist/runtime/types/input.d.ts +5 -5
- package/dist/runtime/types/locale.d.ts +6 -0
- package/dist/runtime/types/unocss.d.ts +4 -4
- package/dist/runtime/types/utils.d.ts +9 -6
- package/dist/runtime/utils/index.d.ts +3 -3
- package/dist/runtime/utils/link.d.ts +2 -1
- package/dist/runtime/utils/link.js +40 -29
- package/dist/runtime/vue/components/Icon.vue +2 -2
- package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
- package/dist/runtime/vue/components/Link.vue +7 -12
- package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
- package/dist/setup.d.mts +1 -1
- package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
- package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
- package/dist/shared/{ui.DSyJHSTk.mjs → ui.DpkP12cX.mjs} +784 -84
- package/dist/unocss.mjs +1 -1
- package/dist/unplugin.d.mts +1 -1
- package/dist/unplugin.mjs +2 -2
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +2 -2
- package/package.json +29 -29
- package/vue-plugin.d.ts +5 -5
|
@@ -57,78 +57,78 @@ const ui = computed(() => {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
|
-
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
61
|
-
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
62
|
-
<slot :open="open"></slot>
|
|
63
|
-
</DialogTrigger>
|
|
64
|
-
|
|
65
|
-
<DialogPortal v-bind="portalProps">
|
|
66
|
-
<DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
|
|
67
|
-
|
|
68
|
-
<DialogContent
|
|
69
|
-
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
70
|
-
v-bind="contentProps"
|
|
71
|
-
data-part="content"
|
|
72
|
-
@after-enter="emit('after-enter')"
|
|
73
|
-
@after-leave="emit('after-leave')"
|
|
74
|
-
v-on="contentEvents"
|
|
75
|
-
>
|
|
76
|
-
<VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
|
|
77
|
-
<DialogTitle />
|
|
78
|
-
</VisuallyHidden>
|
|
79
|
-
|
|
80
|
-
<slot name="content" :close="close">
|
|
81
|
-
<div
|
|
82
|
-
v-if="slots.header || props.title || slots.title || props.description || slots.description || props.close || slots.close"
|
|
83
|
-
:class="ui.header({ class: props.ui?.header })"
|
|
84
|
-
data-part="header"
|
|
85
|
-
>
|
|
86
|
-
<slot name="header" :close="close">
|
|
87
|
-
<DialogTitle
|
|
88
|
-
v-if="props.title || slots.title"
|
|
89
|
-
:class="ui.title({ class: props.ui?.title })"
|
|
90
|
-
data-part="title"
|
|
91
|
-
>
|
|
92
|
-
<slot name="title">
|
|
93
|
-
{{ props.title }}
|
|
94
|
-
</slot>
|
|
95
|
-
</DialogTitle>
|
|
96
|
-
|
|
97
|
-
<DialogClose v-if="props.close || slots.close" as-child>
|
|
98
|
-
<slot name="close" :close="close" :ui="ui">
|
|
99
|
-
<Button
|
|
100
|
-
variant="ghost"
|
|
101
|
-
color="neutral"
|
|
102
|
-
:icon="props.closeIcon || appConfig.ui.icons.close"
|
|
103
|
-
v-bind="typeof props.close === '
|
|
104
|
-
:aria-label="t('modal.close')"
|
|
105
|
-
:class="ui.close({ class: props.ui?.close })"
|
|
106
|
-
data-part="close"
|
|
107
|
-
/>
|
|
108
|
-
</slot>
|
|
109
|
-
</DialogClose>
|
|
110
|
-
|
|
111
|
-
<DialogDescription
|
|
112
|
-
v-if="props.description || slots.description"
|
|
113
|
-
:class="ui.description({ class: props.ui?.description })"
|
|
114
|
-
data-part="description"
|
|
115
|
-
>
|
|
116
|
-
<slot name="description">
|
|
117
|
-
{{ props.description }}
|
|
118
|
-
</slot>
|
|
119
|
-
</DialogDescription>
|
|
120
|
-
</slot>
|
|
121
|
-
</div>
|
|
122
|
-
|
|
123
|
-
<div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
|
|
124
|
-
<slot name="body" :close="close"></slot>
|
|
125
|
-
</div>
|
|
126
|
-
|
|
127
|
-
<div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
|
|
128
|
-
<slot name="footer" :close="close"></slot>
|
|
129
|
-
</div>
|
|
130
|
-
</slot>
|
|
131
|
-
</DialogContent>
|
|
132
|
-
</DialogPortal>
|
|
133
|
-
</DialogRoot>
|
|
60
|
+
<DialogRoot v-slot="{ open, close }" v-bind="rootProps">
|
|
61
|
+
<DialogTrigger v-if="!!slots.default" as-child :class="props.class">
|
|
62
|
+
<slot :open="open"></slot>
|
|
63
|
+
</DialogTrigger>
|
|
64
|
+
|
|
65
|
+
<DialogPortal v-bind="portalProps">
|
|
66
|
+
<DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
|
|
67
|
+
|
|
68
|
+
<DialogContent
|
|
69
|
+
:class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
|
|
70
|
+
v-bind="contentProps"
|
|
71
|
+
data-part="content"
|
|
72
|
+
@after-enter="emit('after-enter')"
|
|
73
|
+
@after-leave="emit('after-leave')"
|
|
74
|
+
v-on="contentEvents"
|
|
75
|
+
>
|
|
76
|
+
<VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
|
|
77
|
+
<DialogTitle />
|
|
78
|
+
</VisuallyHidden>
|
|
79
|
+
|
|
80
|
+
<slot name="content" :close="close">
|
|
81
|
+
<div
|
|
82
|
+
v-if="slots.header || props.title || slots.title || props.description || slots.description || props.close || slots.close"
|
|
83
|
+
:class="ui.header({ class: props.ui?.header })"
|
|
84
|
+
data-part="header"
|
|
85
|
+
>
|
|
86
|
+
<slot name="header" :close="close">
|
|
87
|
+
<DialogTitle
|
|
88
|
+
v-if="props.title || slots.title"
|
|
89
|
+
:class="ui.title({ class: props.ui?.title })"
|
|
90
|
+
data-part="title"
|
|
91
|
+
>
|
|
92
|
+
<slot name="title">
|
|
93
|
+
{{ props.title }}
|
|
94
|
+
</slot>
|
|
95
|
+
</DialogTitle>
|
|
96
|
+
|
|
97
|
+
<DialogClose v-if="props.close || slots.close" as-child>
|
|
98
|
+
<slot name="close" :close="close" :ui="ui">
|
|
99
|
+
<Button
|
|
100
|
+
variant="ghost"
|
|
101
|
+
color="neutral"
|
|
102
|
+
:icon="props.closeIcon || appConfig.ui.icons.close"
|
|
103
|
+
v-bind="typeof props.close === 'object' ? props.close : {}"
|
|
104
|
+
:aria-label="t('modal.close')"
|
|
105
|
+
:class="ui.close({ class: props.ui?.close })"
|
|
106
|
+
data-part="close"
|
|
107
|
+
/>
|
|
108
|
+
</slot>
|
|
109
|
+
</DialogClose>
|
|
110
|
+
|
|
111
|
+
<DialogDescription
|
|
112
|
+
v-if="props.description || slots.description"
|
|
113
|
+
:class="ui.description({ class: props.ui?.description })"
|
|
114
|
+
data-part="description"
|
|
115
|
+
>
|
|
116
|
+
<slot name="description">
|
|
117
|
+
{{ props.description }}
|
|
118
|
+
</slot>
|
|
119
|
+
</DialogDescription>
|
|
120
|
+
</slot>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
|
|
124
|
+
<slot name="body" :close="close"></slot>
|
|
125
|
+
</div>
|
|
126
|
+
|
|
127
|
+
<div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
|
|
128
|
+
<slot name="footer" :close="close"></slot>
|
|
129
|
+
</div>
|
|
130
|
+
</slot>
|
|
131
|
+
</DialogContent>
|
|
132
|
+
</DialogPortal>
|
|
133
|
+
</DialogRoot>
|
|
134
134
|
</template>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DialogContentEmits, DialogContentProps, DialogRootEmits, DialogRootProps } from 'reka-ui';
|
|
2
2
|
import theme from '#build/ui/modal';
|
|
3
|
-
import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
|
|
3
|
+
import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, LinkPropsKeys } from '../types';
|
|
4
4
|
import type { EmitsToProps, StaticSlot } from '../types/utils';
|
|
5
5
|
export interface ModalProps extends ComponentBaseProps, DialogRootProps {
|
|
6
6
|
title?: string;
|
|
@@ -31,7 +31,7 @@ export interface ModalProps extends ComponentBaseProps, DialogRootProps {
|
|
|
31
31
|
* Display a close button to dismiss the modal.
|
|
32
32
|
* @default true
|
|
33
33
|
*/
|
|
34
|
-
close?: boolean |
|
|
34
|
+
close?: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
35
35
|
/** @default app.icons.close */
|
|
36
36
|
closeIcon?: IconProps['name'];
|
|
37
37
|
/**
|
|
@@ -69,6 +69,8 @@ export interface ModalSlots {
|
|
|
69
69
|
close: () => void;
|
|
70
70
|
}>;
|
|
71
71
|
}
|
|
72
|
+
declare const _default: typeof __VLS_export;
|
|
73
|
+
export default _default;
|
|
72
74
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
73
75
|
"update:open": (value: boolean) => any;
|
|
74
76
|
"after-leave": () => any;
|
|
@@ -80,15 +82,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ModalP
|
|
|
80
82
|
"onAfter-enter"?: (() => any) | undefined;
|
|
81
83
|
"onClose-prevent"?: (() => any) | undefined;
|
|
82
84
|
}>, {
|
|
83
|
-
|
|
84
|
-
close: boolean | Partial<ButtonProps>;
|
|
85
|
+
close: boolean | Omit<ButtonProps, LinkPropsKeys>;
|
|
85
86
|
transition: boolean;
|
|
87
|
+
overlay: boolean;
|
|
86
88
|
modal: boolean;
|
|
87
89
|
portal: boolean | string | HTMLElement;
|
|
88
90
|
dismissible: boolean;
|
|
89
91
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ModalSlots>;
|
|
90
|
-
declare const _default: typeof __VLS_export;
|
|
91
|
-
export default _default;
|
|
92
92
|
type __VLS_WithSlots<T, S> = T & {
|
|
93
93
|
new (): {
|
|
94
94
|
$slots: S;
|