@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
|
@@ -16,6 +16,10 @@ import { cv, merge } from "../../utils/style";
|
|
|
16
16
|
defineOptions({ inheritAttrs: false });
|
|
17
17
|
const props = defineProps({
|
|
18
18
|
as: { type: null, required: false, default: "button" },
|
|
19
|
+
href: { type: null, required: false },
|
|
20
|
+
external: { type: Boolean, required: false },
|
|
21
|
+
target: { type: [String, Object, null], required: false },
|
|
22
|
+
rel: { type: [String, Object, null], required: false },
|
|
19
23
|
type: { type: null, required: false, default: "button" },
|
|
20
24
|
label: { type: String, required: false },
|
|
21
25
|
disabled: { type: Boolean, required: false },
|
|
@@ -27,20 +31,11 @@ const props = defineProps({
|
|
|
27
31
|
custom: { type: Boolean, required: false },
|
|
28
32
|
raw: { type: Boolean, required: false },
|
|
29
33
|
class: { type: [Object, String, Number, Boolean, null, Array], required: false, skipCheck: true },
|
|
30
|
-
to: { type: null, required: false },
|
|
31
|
-
href: { type: null, required: false },
|
|
32
|
-
external: { type: Boolean, required: false },
|
|
33
|
-
target: { type: [String, Object], required: false },
|
|
34
|
-
rel: { type: [String, Object], required: false },
|
|
35
|
-
noRel: { type: Boolean, required: false },
|
|
36
|
-
prefetchedClass: { type: String, required: false },
|
|
37
|
-
prefetch: { type: Boolean, required: false },
|
|
38
|
-
prefetchOn: { type: [String, Object], required: false },
|
|
39
|
-
noPrefetch: { type: Boolean, required: false },
|
|
40
34
|
activeClass: { type: String, required: false },
|
|
41
35
|
exactActiveClass: { type: String, required: false },
|
|
42
36
|
ariaCurrentValue: { type: String, required: false, default: "page" },
|
|
43
37
|
viewTransition: { type: Boolean, required: false },
|
|
38
|
+
to: { type: null, required: true },
|
|
44
39
|
replace: { type: Boolean, required: false }
|
|
45
40
|
});
|
|
46
41
|
defineSlots();
|
|
@@ -137,7 +132,7 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
137
132
|
...inheritProps,
|
|
138
133
|
href: to,
|
|
139
134
|
target: isExternal ? '_blank' : void 0,
|
|
140
|
-
active,
|
|
135
|
+
active: active ?? false,
|
|
141
136
|
isExternal
|
|
142
137
|
}"
|
|
143
138
|
>
|
|
@@ -155,7 +150,7 @@ function resolveLinkClass({ route: route2, isActive, isExactActive } = {}) {
|
|
|
155
150
|
}"
|
|
156
151
|
:class="resolveLinkClass()"
|
|
157
152
|
>
|
|
158
|
-
<slot :active="active">
|
|
153
|
+
<slot :active="active ?? false">
|
|
159
154
|
{{ props.label }}
|
|
160
155
|
</slot>
|
|
161
156
|
</LinkBase>
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import type { PrimitiveProps } from 'reka-ui';
|
|
2
|
-
import type {
|
|
3
|
-
import type { RouteLocationRaw, RouterLinkProps } from 'vue-router';
|
|
2
|
+
import type { RouterLinkProps } from 'vue-router';
|
|
4
3
|
import type { ComponentBaseProps } from '../../types';
|
|
4
|
+
import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from '../../types/html';
|
|
5
5
|
import type { StaticSlot } from '../../types/utils';
|
|
6
6
|
export interface LinkSlots {
|
|
7
7
|
default: StaticSlot<{
|
|
8
8
|
active: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
|
-
interface
|
|
11
|
+
export interface LinkProps extends ComponentBaseProps, Omit<RouterLinkProps, 'custom'>, /** @vue-ignore */ Omit<ButtonHTMLAttributes, 'type' | 'disabled'>, /** @vue-ignore */ Omit<AnchorHTMLAttributes, 'href' | 'target' | 'rel' | 'type'> {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The element or component this component should render as when not a link.
|
|
14
|
+
* @default "button"
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
as?: PrimitiveProps['as'];
|
|
16
17
|
/**
|
|
17
18
|
* An alias for `to`. If used with `to`, `href` will be ignored
|
|
18
19
|
*/
|
|
19
|
-
href?:
|
|
20
|
+
href?: LinkProps['to'];
|
|
20
21
|
/**
|
|
21
22
|
* Forces the link to be considered as external (true) or internal (false). This is helpful to handle edge-cases
|
|
22
23
|
*/
|
|
@@ -24,41 +25,11 @@ interface NuxtLinkProps extends Omit<RouterLinkProps, 'to'> {
|
|
|
24
25
|
/**
|
|
25
26
|
* Where to display the linked URL, as the name for a browsing context.
|
|
26
27
|
*/
|
|
27
|
-
target?: '_blank' | '_parent' | '_self' | '_top' | (string & {});
|
|
28
|
+
target?: '_blank' | '_parent' | '_self' | '_top' | (string & {}) | null;
|
|
28
29
|
/**
|
|
29
30
|
* A rel attribute value to apply on the link. Defaults to "noopener noreferrer" for external links.
|
|
30
31
|
*/
|
|
31
|
-
rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {});
|
|
32
|
-
/**
|
|
33
|
-
* If set to true, no rel attribute will be added to the link
|
|
34
|
-
*/
|
|
35
|
-
noRel?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* A class to apply to links that have been prefetched.
|
|
38
|
-
*/
|
|
39
|
-
prefetchedClass?: string;
|
|
40
|
-
/**
|
|
41
|
-
* When enabled will prefetch middleware, layouts and payloads of links in the viewport.
|
|
42
|
-
*/
|
|
43
|
-
prefetch?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Allows controlling when to prefetch links. By default, prefetch is triggered only on visibility.
|
|
46
|
-
*/
|
|
47
|
-
prefetchOn?: 'visibility' | 'interaction' | Partial<{
|
|
48
|
-
visibility: boolean;
|
|
49
|
-
interaction: boolean;
|
|
50
|
-
}>;
|
|
51
|
-
/**
|
|
52
|
-
* Escape hatch to disable `prefetch` attribute.
|
|
53
|
-
*/
|
|
54
|
-
noPrefetch?: boolean;
|
|
55
|
-
}
|
|
56
|
-
export interface LinkProps extends ComponentBaseProps, NuxtLinkProps {
|
|
57
|
-
/**
|
|
58
|
-
* The element or component this component should render as when not a link.
|
|
59
|
-
* @default "button"
|
|
60
|
-
*/
|
|
61
|
-
as?: PrimitiveProps['as'];
|
|
32
|
+
rel?: 'noopener' | 'noreferrer' | 'nofollow' | 'sponsored' | 'ugc' | (string & {}) | null;
|
|
62
33
|
/**
|
|
63
34
|
* The type of the button when not a link.
|
|
64
35
|
* @default "button"
|
|
@@ -80,14 +51,14 @@ export interface LinkProps extends ComponentBaseProps, NuxtLinkProps {
|
|
|
80
51
|
/** When `true`, only styles from `class`, `activeClass`, and `inactiveClass` will be applied. */
|
|
81
52
|
raw?: boolean;
|
|
82
53
|
}
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
83
56
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
84
57
|
active: boolean;
|
|
85
58
|
type: "reset" | "submit" | "button";
|
|
86
59
|
ariaCurrentValue: "page" | "step" | "location" | "date" | "time" | "true" | "false";
|
|
87
60
|
as: import("reka-ui").AsTag | import("vue").Component;
|
|
88
61
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, LinkSlots>;
|
|
89
|
-
declare const _default: typeof __VLS_export;
|
|
90
|
-
export default _default;
|
|
91
62
|
type __VLS_WithSlots<T, S> = T & {
|
|
92
63
|
new (): {
|
|
93
64
|
$slots: S;
|
package/dist/setup.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import '#build/ui';
|
|
2
2
|
import './shared/ui.IulR-OYx.mjs';
|
|
3
3
|
import '../dist/runtime/types/style.js';
|
|
4
|
-
export { A as AppConfigIcons, a as AppConfigUI, s as setup } from './shared/ui.
|
|
4
|
+
export { A as AppConfigIcons, a as AppConfigUI, s as setup } from './shared/ui.D8Bg1HWt.mjs';
|
|
5
5
|
import './unocss.mjs';
|
|
6
6
|
import '@nuxt/schema';
|
|
7
7
|
import '@unocss/preset-wind4/colors';
|
|
@@ -11,6 +11,8 @@ const icons = {
|
|
|
11
11
|
chevronDoubleLeft: "i-lucide-chevrons-left",
|
|
12
12
|
chevronDoubleRight: "i-lucide-chevrons-right",
|
|
13
13
|
ellipsis: "i-lucide-ellipsis",
|
|
14
|
+
folder: "i-lucide-folder",
|
|
15
|
+
folderOpen: "i-lucide-folder-open",
|
|
14
16
|
plus: "i-lucide-plus",
|
|
15
17
|
minus: "i-lucide-minus",
|
|
16
18
|
external: "i-lucide-arrow-up-right"
|
|
@@ -19,13 +21,13 @@ const icons = {
|
|
|
19
21
|
function getDefaultUIConfig(colors) {
|
|
20
22
|
return {
|
|
21
23
|
colors: pick({
|
|
22
|
-
primary: "
|
|
23
|
-
secondary: "
|
|
24
|
+
primary: "orange",
|
|
25
|
+
secondary: "teal",
|
|
24
26
|
success: "green",
|
|
25
27
|
info: "blue",
|
|
26
28
|
warning: "yellow",
|
|
27
29
|
error: "red",
|
|
28
|
-
neutral: "
|
|
30
|
+
neutral: "stone"
|
|
29
31
|
}, [...colors || [], "neutral"]),
|
|
30
32
|
icons
|
|
31
33
|
};
|