@byyuurin/ui 0.0.7 → 0.0.9
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/dist/module.json +1 -1
- package/dist/module.mjs +8 -7
- package/dist/module.mjs.map +1 -1
- package/dist/runtime/app/injections.d.ts +11 -0
- package/dist/runtime/app/injections.js +26 -0
- package/dist/runtime/components/Accordion.vue +28 -26
- package/dist/runtime/components/Alert.vue +27 -23
- package/dist/runtime/components/App.vue +21 -26
- package/dist/runtime/components/Avatar.vue +70 -0
- package/dist/runtime/components/AvatarGroup.vue +87 -0
- package/dist/runtime/components/Badge.vue +17 -15
- package/dist/runtime/components/Breadcrumb.vue +108 -0
- package/dist/runtime/components/Button.vue +15 -16
- package/dist/runtime/components/ButtonGroup.vue +14 -15
- package/dist/runtime/components/Calendar.vue +176 -0
- package/dist/runtime/components/Card.vue +9 -7
- package/dist/runtime/components/Carousel.vue +22 -22
- package/dist/runtime/components/Checkbox.vue +15 -14
- package/dist/runtime/components/Chip.vue +23 -21
- package/dist/runtime/components/Collapsible.vue +5 -8
- package/dist/runtime/components/Drawer.vue +91 -49
- package/dist/runtime/components/Input.vue +33 -36
- package/dist/runtime/components/InputNumber.vue +9 -10
- package/dist/runtime/components/Kbd.vue +47 -0
- package/dist/runtime/components/Link.vue +15 -12
- package/dist/runtime/components/LinkBase.vue +1 -1
- package/dist/runtime/components/Modal.vue +31 -19
- package/dist/runtime/components/OverlayProvider.vue +29 -0
- package/dist/runtime/components/Pagination.vue +60 -53
- package/dist/runtime/components/PinInput.vue +9 -12
- package/dist/runtime/components/Popover.vue +9 -12
- package/dist/runtime/components/Progress.vue +162 -0
- package/dist/runtime/components/RadioGroup.vue +38 -35
- package/dist/runtime/components/ScrollArea.vue +2 -6
- package/dist/runtime/components/Select.vue +48 -51
- package/dist/runtime/components/Separator.vue +2 -6
- package/dist/runtime/components/Skeleton.vue +30 -0
- package/dist/runtime/components/Slider.vue +8 -11
- package/dist/runtime/components/Switch.vue +17 -17
- package/dist/runtime/components/Table.vue +21 -16
- package/dist/runtime/components/Tabs.vue +24 -23
- package/dist/runtime/components/Textarea.vue +13 -16
- package/dist/runtime/components/Toast.vue +21 -24
- package/dist/runtime/components/{Toaster.vue → ToastProvider.vue} +22 -20
- package/dist/runtime/components/Tooltip.vue +9 -12
- package/dist/runtime/composables/useAvatarGroup.d.ts +4 -0
- package/dist/runtime/composables/useAvatarGroup.js +8 -0
- package/dist/runtime/composables/useButtonGroup.d.ts +4 -12
- package/dist/runtime/composables/useButtonGroup.js +1 -6
- package/dist/runtime/composables/useComponentIcons.d.ts +9 -9
- package/dist/runtime/composables/useComponentIcons.js +11 -11
- package/dist/runtime/composables/useKbd.d.ts +35 -0
- package/dist/runtime/composables/useKbd.js +49 -0
- package/dist/runtime/composables/useLocale.d.ts +8 -0
- package/dist/runtime/composables/useLocale.js +22 -0
- package/dist/runtime/composables/useOverlay.d.ts +29 -0
- package/dist/runtime/composables/useOverlay.js +69 -0
- package/dist/runtime/composables/useTheme.d.ts +6 -6
- package/dist/runtime/composables/useTheme.js +11 -15
- package/dist/runtime/composables/useToast.d.ts +4 -20
- package/dist/runtime/composables/useToast.js +6 -5
- package/dist/runtime/index.d.ts +9 -2
- package/dist/runtime/index.js +9 -2
- package/dist/runtime/locale/en.d.ts +2 -0
- package/dist/runtime/locale/en.js +34 -0
- package/dist/runtime/locale/index.d.ts +2 -0
- package/dist/runtime/locale/index.js +2 -0
- package/dist/runtime/locale/zh-tw.d.ts +2 -0
- package/dist/runtime/locale/zh-tw.js +34 -0
- package/dist/runtime/theme/accordion.d.ts +6 -6
- package/dist/runtime/theme/accordion.js +5 -5
- package/dist/runtime/theme/alert.js +3 -3
- package/dist/runtime/theme/app.d.ts +6 -6
- package/dist/runtime/theme/app.js +7 -7
- package/dist/runtime/theme/avatar-group.d.ts +52 -0
- package/dist/runtime/theme/avatar-group.js +32 -0
- package/dist/runtime/theme/avatar.d.ts +56 -0
- package/dist/runtime/theme/avatar.js +34 -0
- package/dist/runtime/theme/breadcrumb.d.ts +67 -0
- package/dist/runtime/theme/breadcrumb.js +44 -0
- package/dist/runtime/theme/button.d.ts +8 -8
- package/dist/runtime/theme/button.js +22 -22
- package/dist/runtime/theme/calendar.d.ts +56 -0
- package/dist/runtime/theme/calendar.js +69 -0
- package/dist/runtime/theme/card.js +6 -6
- package/dist/runtime/theme/carousel.js +1 -1
- package/dist/runtime/theme/checkbox.js +5 -5
- package/dist/runtime/theme/chip.d.ts +4 -4
- package/dist/runtime/theme/chip.js +5 -5
- package/dist/runtime/theme/drawer.d.ts +24 -21
- package/dist/runtime/theme/drawer.js +47 -20
- package/dist/runtime/theme/index.d.ts +8 -1
- package/dist/runtime/theme/index.js +8 -1
- package/dist/runtime/theme/input-number.d.ts +6 -0
- package/dist/runtime/theme/input-number.js +6 -3
- package/dist/runtime/theme/input.d.ts +12 -12
- package/dist/runtime/theme/input.js +26 -26
- package/dist/runtime/theme/kbd.d.ts +39 -0
- package/dist/runtime/theme/kbd.js +26 -0
- package/dist/runtime/theme/link.d.ts +1 -1
- package/dist/runtime/theme/link.js +3 -3
- package/dist/runtime/theme/modal.js +5 -5
- package/dist/runtime/theme/pagination.d.ts +27 -3
- package/dist/runtime/theme/pagination.js +6 -2
- package/dist/runtime/theme/pinInput.js +13 -13
- package/dist/runtime/theme/popover.js +1 -1
- package/dist/runtime/theme/progress.d.ts +122 -0
- package/dist/runtime/theme/progress.js +95 -0
- package/dist/runtime/theme/radio-group.d.ts +2 -2
- package/dist/runtime/theme/radio-group.js +7 -7
- package/dist/runtime/theme/select.d.ts +18 -18
- package/dist/runtime/theme/select.js +34 -34
- package/dist/runtime/theme/separator.js +1 -1
- package/dist/runtime/theme/skeleton.d.ts +8 -0
- package/dist/runtime/theme/skeleton.js +7 -0
- package/dist/runtime/theme/slider.js +1 -1
- package/dist/runtime/theme/switch.js +6 -6
- package/dist/runtime/theme/table.js +7 -7
- package/dist/runtime/theme/tabs.d.ts +2 -2
- package/dist/runtime/theme/tabs.js +11 -11
- package/dist/runtime/theme/textarea.js +13 -13
- package/dist/runtime/theme/toast.js +6 -6
- package/dist/runtime/theme/tooltip.js +1 -1
- package/dist/runtime/types/components.d.ts +9 -1
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/locale.d.ts +29 -0
- package/dist/runtime/types/locale.js +0 -0
- package/dist/runtime/types/utils.d.ts +5 -3
- package/dist/runtime/utils/index.d.ts +6 -1
- package/dist/runtime/utils/index.js +6 -4
- package/dist/runtime/utils/link.d.ts +1 -1
- package/dist/runtime/utils/translator.d.ts +18 -0
- package/dist/runtime/utils/translator.js +8 -0
- package/dist/shared/ui.1a1f119c.mjs +5 -0
- package/dist/shared/ui.1a1f119c.mjs.map +1 -0
- package/dist/unocss.mjs +19 -14
- package/dist/unocss.mjs.map +1 -1
- package/dist/unplugin.mjs +3 -12
- package/dist/unplugin.mjs.map +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +30 -19
- package/dist/runtime/components/ModalProvider.vue +0 -10
- package/dist/runtime/composables/useModal.d.ts +0 -15
- package/dist/runtime/composables/useModal.js +0 -52
- package/dist/shared/ui.d1728164.mjs +0 -4
- package/dist/shared/ui.d1728164.mjs.map +0 -1
- /package/dist/runtime/theme/{toaster.d.ts → toast-provider.d.ts} +0 -0
- /package/dist/runtime/theme/{toaster.js → toast-provider.js} +0 -0
- /package/dist/runtime/{composables/defineInjection.d.ts → utils/vue.d.ts} +0 -0
- /package/dist/runtime/{composables/defineInjection.js → utils/vue.js} +0 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@byyuurin/ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "Yuurin <byyuurin@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -38,7 +38,15 @@
|
|
|
38
38
|
"types": "./dist/runtime/index.d.ts",
|
|
39
39
|
"default": "./dist/runtime/index.js"
|
|
40
40
|
},
|
|
41
|
-
"./runtime/*": "./dist/runtime/*"
|
|
41
|
+
"./runtime/*": "./dist/runtime/*",
|
|
42
|
+
"./utils/*": {
|
|
43
|
+
"types": "./dist/runtime/utils/*.d.ts",
|
|
44
|
+
"default": "./dist/runtime/utils/*.js"
|
|
45
|
+
},
|
|
46
|
+
"./locale": {
|
|
47
|
+
"types": "./dist/runtime/locale/index.d.ts",
|
|
48
|
+
"default": "./dist/runtime/locale/index.js"
|
|
49
|
+
}
|
|
42
50
|
},
|
|
43
51
|
"main": "dist/runtime/index.js",
|
|
44
52
|
"module": "dist/runtime/index.js",
|
|
@@ -58,13 +66,15 @@
|
|
|
58
66
|
}
|
|
59
67
|
},
|
|
60
68
|
"dependencies": {
|
|
61
|
-
"@byyuurin/ui-kit": "^0.
|
|
69
|
+
"@byyuurin/ui-kit": "^0.5.0",
|
|
70
|
+
"@internationalized/date": "^3.7.0",
|
|
62
71
|
"@nuxt/kit": "^3.15.4",
|
|
63
72
|
"@tanstack/vue-table": "^8.21.2",
|
|
64
73
|
"@unocss/core": "^65.5.0",
|
|
65
74
|
"@unocss/preset-mini": "^65.5.0",
|
|
66
75
|
"@unocss/preset-uno": "^65.5.0",
|
|
67
|
-
"@
|
|
76
|
+
"@vue/shared": "^3.5.13",
|
|
77
|
+
"@vueuse/core": "^13.0.0",
|
|
68
78
|
"defu": "^6.1.4",
|
|
69
79
|
"embla-carousel": "^8.5.2",
|
|
70
80
|
"embla-carousel-auto-height": "^8.5.2",
|
|
@@ -78,43 +88,44 @@
|
|
|
78
88
|
"mlly": "^1.7.4",
|
|
79
89
|
"ohash": "^1.1.6",
|
|
80
90
|
"pathe": "^2.0.3",
|
|
81
|
-
"reka-ui": "^2.0
|
|
91
|
+
"reka-ui": "^2.1.0",
|
|
82
92
|
"scule": "^1.3.0",
|
|
83
93
|
"tinyglobby": "^0.2.12",
|
|
84
94
|
"ufo": "^1.5.4",
|
|
85
95
|
"unplugin": "^2.2.0",
|
|
86
96
|
"unplugin-auto-import": "^19.1.1",
|
|
87
97
|
"unplugin-vue-components": "^28.4.1",
|
|
88
|
-
"
|
|
89
|
-
"vue-
|
|
98
|
+
"vue-component-type-helpers": "^2.2.8",
|
|
99
|
+
"vue-router": "^4.5.0"
|
|
90
100
|
},
|
|
91
101
|
"devDependencies": {
|
|
92
|
-
"@antfu/ni": "^
|
|
93
|
-
"@byyuurin/eslint-config": "^1.
|
|
94
|
-
"@nuxt/eslint-config": "^1.
|
|
102
|
+
"@antfu/ni": "^24.2.0",
|
|
103
|
+
"@byyuurin/eslint-config": "^1.8.0",
|
|
104
|
+
"@nuxt/eslint-config": "^1.2.0",
|
|
95
105
|
"@nuxt/module-builder": "^0.8.4",
|
|
96
106
|
"@nuxt/schema": "^3.15.4",
|
|
97
|
-
"@nuxt/test-utils": "^3.17.
|
|
98
|
-
"@types/node": "^22.13.
|
|
107
|
+
"@nuxt/test-utils": "^3.17.2",
|
|
108
|
+
"@types/node": "^22.13.10",
|
|
99
109
|
"@unocss/reset": "^65.5.0",
|
|
100
110
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
101
|
-
"bumpp": "^10.0
|
|
102
|
-
"eslint": "^9.
|
|
111
|
+
"bumpp": "^10.1.0",
|
|
112
|
+
"eslint": "^9.22.0",
|
|
103
113
|
"eslint-plugin-format": "1.0.1",
|
|
104
114
|
"esno": "^4.8.0",
|
|
105
|
-
"lint-staged": "^15.
|
|
115
|
+
"lint-staged": "^15.5.0",
|
|
106
116
|
"nuxt": "^3.15.4",
|
|
107
117
|
"simple-git-hooks": "^2.11.1",
|
|
108
118
|
"typescript": "~5.6.3",
|
|
109
119
|
"unocss": "^65.5.0",
|
|
110
|
-
"vite": "^6.2.
|
|
111
|
-
"vite-plugin-inspect": "^
|
|
120
|
+
"vite": "^6.2.2",
|
|
121
|
+
"vite-plugin-inspect": "^11.0.0",
|
|
112
122
|
"vitest": "^3.0.8",
|
|
113
123
|
"vue": "^3.5.13",
|
|
114
124
|
"vue-tsc": "^2.2.8"
|
|
115
125
|
},
|
|
116
126
|
"resolutions": {
|
|
117
|
-
"@byyuurin/ui": "workspace:*"
|
|
127
|
+
"@byyuurin/ui": "workspace:*",
|
|
128
|
+
"vue-tsc": "2.2.0"
|
|
118
129
|
},
|
|
119
130
|
"simple-git-hooks": {
|
|
120
131
|
"pre-commit": "pnpm lint-staged"
|
|
@@ -131,6 +142,6 @@
|
|
|
131
142
|
"release": "bumpp && pnpm publish",
|
|
132
143
|
"start": "esno src/index.ts",
|
|
133
144
|
"test": "vitest",
|
|
134
|
-
"test:types": "vue-tsc --noEmit &&
|
|
145
|
+
"test:types": "vue-tsc --noEmit && nuxi typecheck playground/nuxt"
|
|
135
146
|
}
|
|
136
147
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { injectModalState, useModal } from '../composables/useModal'
|
|
3
|
-
|
|
4
|
-
const modalState = injectModalState()
|
|
5
|
-
const { isOpen } = useModal()
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<template>
|
|
9
|
-
<component :is="modalState.component" v-if="modalState" v-bind="modalState.props" v-model:open="isOpen" />
|
|
10
|
-
</template>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { Component, ShallowRef } from 'vue';
|
|
2
|
-
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
3
|
-
import type { ModalProps } from '../types/index.js';
|
|
4
|
-
export interface ModalState {
|
|
5
|
-
component: Component | string;
|
|
6
|
-
props: ModalProps;
|
|
7
|
-
}
|
|
8
|
-
export declare const InjectionKeyModalState: import("vue").InjectionKey<ShallowRef<ModalState>>, injectModalState: () => ShallowRef<ModalState> | undefined, provideModalState: (value: ShallowRef<ModalState>) => void;
|
|
9
|
-
export declare const useModal: () => {
|
|
10
|
-
open: <T extends Component>(component: T, props?: ModalProps & ComponentProps<T>) => void;
|
|
11
|
-
close: () => void;
|
|
12
|
-
reset: () => void;
|
|
13
|
-
patch: <T extends Component = Record<string, never>>(props: Partial<ModalProps & ComponentProps<T>>) => void;
|
|
14
|
-
isOpen: import("vue").Ref<boolean, boolean>;
|
|
15
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { createSharedComposable } from "@vueuse/core";
|
|
2
|
-
import { ref } from "vue";
|
|
3
|
-
import { defineInjection } from "./defineInjection.js";
|
|
4
|
-
export const {
|
|
5
|
-
InjectionKey: InjectionKeyModalState,
|
|
6
|
-
inject: injectModalState,
|
|
7
|
-
provide: provideModalState
|
|
8
|
-
} = defineInjection("ui.modal");
|
|
9
|
-
export const useModal = createSharedComposable(() => {
|
|
10
|
-
const modalState = injectModalState();
|
|
11
|
-
const isOpen = ref(false);
|
|
12
|
-
function open(component, props) {
|
|
13
|
-
if (!modalState)
|
|
14
|
-
throw new Error("useModal() is called without provider");
|
|
15
|
-
modalState.value = {
|
|
16
|
-
component,
|
|
17
|
-
props: props ?? {}
|
|
18
|
-
};
|
|
19
|
-
isOpen.value = true;
|
|
20
|
-
}
|
|
21
|
-
function close() {
|
|
22
|
-
if (!modalState)
|
|
23
|
-
return;
|
|
24
|
-
isOpen.value = false;
|
|
25
|
-
}
|
|
26
|
-
function reset() {
|
|
27
|
-
if (!modalState)
|
|
28
|
-
return;
|
|
29
|
-
modalState.value = {
|
|
30
|
-
component: "div",
|
|
31
|
-
props: {}
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function patch(props) {
|
|
35
|
-
if (!modalState)
|
|
36
|
-
return;
|
|
37
|
-
modalState.value = {
|
|
38
|
-
...modalState.value,
|
|
39
|
-
props: {
|
|
40
|
-
...modalState.value.props,
|
|
41
|
-
...props
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
open,
|
|
47
|
-
close,
|
|
48
|
-
reset,
|
|
49
|
-
patch,
|
|
50
|
-
isOpen
|
|
51
|
-
};
|
|
52
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.d1728164.mjs","sources":["../../src/shared.ts"],"sourcesContent":["export const packageName = '@byyuurin/ui'\n"],"names":[],"mappings":"AAAO,MAAM,WAAc,GAAA;;;;"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|