@byyuurin/ui 0.0.3 → 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 +4 -2
- package/dist/nuxt.mjs +1 -1
- package/dist/resolver.mjs +1 -1
- package/dist/runtime/components/App.vue +5 -1
- package/dist/runtime/components/Button.vue +0 -1
- package/dist/runtime/components/Checkbox.vue +2 -5
- package/dist/runtime/components/Input.vue +5 -1
- package/dist/runtime/components/ModalProvider.vue +1 -1
- package/dist/runtime/components/RadioGroup.vue +1 -7
- package/dist/runtime/components/ScrollArea.vue +72 -0
- package/dist/runtime/components/Switch.vue +0 -1
- package/dist/runtime/components/Tabs.vue +5 -5
- package/dist/runtime/components/Textarea.vue +173 -0
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/index.d.ts +2 -0
- package/dist/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/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.mjs +1 -0
- package/dist/runtime/composables/useModal.d.ts +1 -1
- package/dist/runtime/composables/useModal.mjs +3 -2
- package/dist/runtime/composables/useTheme.d.ts +3 -1
- package/dist/runtime/composables/useTheme.mjs +14 -6
- package/dist/runtime/theme/button.d.ts +0 -8
- package/dist/runtime/theme/button.mjs +1 -9
- package/dist/runtime/theme/checkbox.d.ts +0 -12
- package/dist/runtime/theme/checkbox.mjs +4 -9
- package/dist/runtime/theme/index.d.ts +2 -0
- package/dist/runtime/theme/index.mjs +2 -0
- package/dist/runtime/theme/radioGroup.d.ts +0 -24
- package/dist/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/runtime/theme/switch.d.ts +0 -12
- package/dist/runtime/theme/switch.mjs +2 -8
- package/dist/runtime/theme/tabs.d.ts +32 -11
- package/dist/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/runtime/theme/toast.mjs +1 -1
- package/dist/runtime/types/components.d.ts +2 -0
- package/dist/runtime/utils/index.d.ts +0 -11
- package/dist/runtime/utils/index.mjs +0 -11
- package/dist/shared/{ui.CPXA9QoM.mjs → ui.Cmq14xN9.mjs} +2 -0
- package/dist/unocss-preset.d.mts +15 -7
- package/dist/unocss-preset.d.ts +15 -7
- package/dist/unocss-preset.mjs +90 -386
- package/package.json +6 -5
- package/dist/index.cjs +0 -38
- package/dist/runtime/components/index.cjs +0 -132
- package/dist/runtime/composables/index.cjs +0 -33
- package/dist/runtime/composables/useComponentIcons.cjs +0 -30
- package/dist/runtime/composables/useModal.cjs +0 -55
- package/dist/runtime/composables/useTheme.cjs +0 -30
- package/dist/runtime/composables/useToast.cjs +0 -51
- package/dist/runtime/theme/accordion.cjs +0 -27
- package/dist/runtime/theme/app.cjs +0 -15
- package/dist/runtime/theme/button.cjs +0 -127
- package/dist/runtime/theme/card.cjs +0 -17
- package/dist/runtime/theme/checkbox.cjs +0 -56
- package/dist/runtime/theme/drawer.cjs +0 -73
- package/dist/runtime/theme/index.cjs +0 -125
- package/dist/runtime/theme/input.cjs +0 -115
- package/dist/runtime/theme/link.cjs +0 -23
- package/dist/runtime/theme/modal.cjs +0 -55
- package/dist/runtime/theme/popover.cjs +0 -13
- package/dist/runtime/theme/radioGroup.cjs +0 -73
- package/dist/runtime/theme/select.cjs +0 -128
- package/dist/runtime/theme/switch.cjs +0 -73
- package/dist/runtime/theme/tabs.cjs +0 -105
- package/dist/runtime/theme/toast.cjs +0 -33
- package/dist/runtime/theme/toaster.cjs +0 -72
- package/dist/runtime/theme/tooltip.cjs +0 -14
- package/dist/runtime/types/components.cjs +0 -1
- package/dist/runtime/types/index.cjs +0 -27
- package/dist/runtime/types/utils.cjs +0 -1
- package/dist/runtime/utils/extend-theme.cjs +0 -24
- package/dist/runtime/utils/index.cjs +0 -119
- package/dist/runtime/utils/link.cjs +0 -10
- package/dist/runtime/utils/styler.cjs +0 -18
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.4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "Yuurin <byyuurin@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"./*": "./dist/*"
|
|
38
38
|
},
|
|
39
|
-
"main": "dist/index.
|
|
39
|
+
"main": "dist/index.mjs",
|
|
40
40
|
"module": "dist/index.mjs",
|
|
41
41
|
"types": "dist/index.d.ts",
|
|
42
42
|
"typesVersions": {
|
|
@@ -62,10 +62,11 @@
|
|
|
62
62
|
}
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@byyuurin/ui-kit": "^0.3.
|
|
65
|
+
"@byyuurin/ui-kit": "^0.3.5",
|
|
66
66
|
"@nuxt/kit": "^3.15.4",
|
|
67
67
|
"@unocss/core": "^65.4.3",
|
|
68
68
|
"@unocss/preset-mini": "^65.4.3",
|
|
69
|
+
"@unocss/preset-uno": "^65.4.3",
|
|
69
70
|
"@vueuse/core": "^12.5.0",
|
|
70
71
|
"defu": "^6.1.4",
|
|
71
72
|
"ohash": "^1.1.4",
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
"@antfu/ni": "^23.3.1",
|
|
78
79
|
"@byyuurin/eslint-config": "^1.7.0",
|
|
79
80
|
"@nuxt/schema": "^3.15.4",
|
|
80
|
-
"@types/node": "^22.13.
|
|
81
|
+
"@types/node": "^22.13.1",
|
|
81
82
|
"bumpp": "^10.0.1",
|
|
82
83
|
"eslint": "^9.19.0",
|
|
83
84
|
"eslint-plugin-format": "1.0.1",
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
"typescript": "^5.7.3",
|
|
88
89
|
"unbuild": "^3.3.1",
|
|
89
90
|
"unplugin-vue-components": "^28.0.0",
|
|
90
|
-
"vitest": "^3.0.
|
|
91
|
+
"vitest": "^3.0.5",
|
|
91
92
|
"vue": "^3.5.13",
|
|
92
93
|
"vue-tsc": "^2.2.0"
|
|
93
94
|
},
|
package/dist/index.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
var _components = require("./runtime/components/index.cjs");
|
|
7
|
-
Object.keys(_components).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _components[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _components[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _composables = require("./runtime/composables/index.cjs");
|
|
18
|
-
Object.keys(_composables).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _composables[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _composables[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _types = require("./runtime/types/index.cjs");
|
|
29
|
-
Object.keys(_types).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _types[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _types[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "Accordion", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _Accordion.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "App", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _App.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "Button", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _Button.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "Card", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _Card.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "Checkbox", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _Checkbox.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "Drawer", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _Drawer.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "Input", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _Input.default;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "Link", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _Link.default;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "Modal", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _Modal.default;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "ModalProvider", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _ModalProvider.default;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "Popover", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _Popover.default;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "RadioGroup", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _RadioGroup.default;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "Select", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _Select.default;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "Switch", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _Switch.default;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
Object.defineProperty(exports, "Tabs", {
|
|
91
|
-
enumerable: true,
|
|
92
|
-
get: function () {
|
|
93
|
-
return _Tabs.default;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
Object.defineProperty(exports, "Toast", {
|
|
97
|
-
enumerable: true,
|
|
98
|
-
get: function () {
|
|
99
|
-
return _Toast.default;
|
|
100
|
-
}
|
|
101
|
-
});
|
|
102
|
-
Object.defineProperty(exports, "Toaster", {
|
|
103
|
-
enumerable: true,
|
|
104
|
-
get: function () {
|
|
105
|
-
return _Toaster.default;
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(exports, "Tooltip", {
|
|
109
|
-
enumerable: true,
|
|
110
|
-
get: function () {
|
|
111
|
-
return _Tooltip.default;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
var _Accordion = _interopRequireDefault(require("./Accordion.vue"));
|
|
115
|
-
var _App = _interopRequireDefault(require("./App.vue"));
|
|
116
|
-
var _Button = _interopRequireDefault(require("./Button.vue"));
|
|
117
|
-
var _Card = _interopRequireDefault(require("./Card.vue"));
|
|
118
|
-
var _Checkbox = _interopRequireDefault(require("./Checkbox.vue"));
|
|
119
|
-
var _Drawer = _interopRequireDefault(require("./Drawer.vue"));
|
|
120
|
-
var _Input = _interopRequireDefault(require("./Input.vue"));
|
|
121
|
-
var _Link = _interopRequireDefault(require("./Link.vue"));
|
|
122
|
-
var _Modal = _interopRequireDefault(require("./Modal.vue"));
|
|
123
|
-
var _ModalProvider = _interopRequireDefault(require("./ModalProvider.vue"));
|
|
124
|
-
var _Popover = _interopRequireDefault(require("./Popover.vue"));
|
|
125
|
-
var _RadioGroup = _interopRequireDefault(require("./RadioGroup.vue"));
|
|
126
|
-
var _Select = _interopRequireDefault(require("./Select.vue"));
|
|
127
|
-
var _Switch = _interopRequireDefault(require("./Switch.vue"));
|
|
128
|
-
var _Tabs = _interopRequireDefault(require("./Tabs.vue"));
|
|
129
|
-
var _Toast = _interopRequireDefault(require("./Toast.vue"));
|
|
130
|
-
var _Toaster = _interopRequireDefault(require("./Toaster.vue"));
|
|
131
|
-
var _Tooltip = _interopRequireDefault(require("./Tooltip.vue"));
|
|
132
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "useComponentIcons", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _useComponentIcons.useComponentIcons;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "useModal", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _useModal.useModal;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "useTheme", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _useTheme.useTheme;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "useToast", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _useToast.useToast;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
var _useComponentIcons = require("./useComponentIcons.cjs");
|
|
31
|
-
var _useModal = require("./useModal.cjs");
|
|
32
|
-
var _useTheme = require("./useTheme.cjs");
|
|
33
|
-
var _useToast = require("./useToast.cjs");
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useComponentIcons = useComponentIcons;
|
|
7
|
-
var _vue = require("vue");
|
|
8
|
-
var _useTheme = require("./useTheme.cjs");
|
|
9
|
-
function useComponentIcons(componentProps) {
|
|
10
|
-
const {
|
|
11
|
-
theme
|
|
12
|
-
} = (0, _useTheme.useTheme)();
|
|
13
|
-
const props = (0, _vue.computed)(() => (0, _vue.toValue)(componentProps));
|
|
14
|
-
const isPrefix = (0, _vue.computed)(() => props.value.icon && props.value.prefix || props.value.icon && !props.value.suffix || props.value.loading && !props.value.suffix || !!props.value.prefixIcon);
|
|
15
|
-
const isSuffix = (0, _vue.computed)(() => props.value.icon && props.value.suffix || props.value.loading && props.value.suffix || !!props.value.suffixIcon);
|
|
16
|
-
const prefixIconName = (0, _vue.computed)(() => {
|
|
17
|
-
if (props.value.loading) return props.value.loadingIcon || theme.value.app.icons.loading;
|
|
18
|
-
return props.value.prefixIcon || props.value.icon;
|
|
19
|
-
});
|
|
20
|
-
const suffixIconName = (0, _vue.computed)(() => {
|
|
21
|
-
if (props.value.loading && !isPrefix.value) return props.value.loadingIcon || theme.value.app.icons.loading;
|
|
22
|
-
return props.value.suffixIcon || props.value.icon;
|
|
23
|
-
});
|
|
24
|
-
return {
|
|
25
|
-
isPrefix,
|
|
26
|
-
isSuffix,
|
|
27
|
-
prefixIconName,
|
|
28
|
-
suffixIconName
|
|
29
|
-
};
|
|
30
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useModal = exports.provideModalState = exports.injectModalState = void 0;
|
|
7
|
-
var _core = require("@vueuse/core");
|
|
8
|
-
var _vue = require("vue");
|
|
9
|
-
var _utils = require("../utils/index.cjs");
|
|
10
|
-
const {
|
|
11
|
-
inject: injectModalState,
|
|
12
|
-
provide: provideModalState
|
|
13
|
-
} = (0, _utils.createInjection)("ui.modal");
|
|
14
|
-
exports.provideModalState = provideModalState;
|
|
15
|
-
exports.injectModalState = injectModalState;
|
|
16
|
-
const useModal = exports.useModal = (0, _core.createSharedComposable)(() => {
|
|
17
|
-
const modalState = injectModalState();
|
|
18
|
-
const isOpen = (0, _vue.ref)(false);
|
|
19
|
-
function open(component, props) {
|
|
20
|
-
if (!modalState) throw new Error("useModal() is called without provider");
|
|
21
|
-
modalState.value = {
|
|
22
|
-
component,
|
|
23
|
-
props: props ?? {}
|
|
24
|
-
};
|
|
25
|
-
isOpen.value = true;
|
|
26
|
-
}
|
|
27
|
-
function close() {
|
|
28
|
-
if (!modalState) return;
|
|
29
|
-
isOpen.value = false;
|
|
30
|
-
}
|
|
31
|
-
function reset() {
|
|
32
|
-
if (!modalState) return;
|
|
33
|
-
modalState.value = {
|
|
34
|
-
component: "div",
|
|
35
|
-
props: {}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
function patch(props) {
|
|
39
|
-
if (!modalState) return;
|
|
40
|
-
modalState.value = {
|
|
41
|
-
...modalState.value,
|
|
42
|
-
props: {
|
|
43
|
-
...modalState.value.props,
|
|
44
|
-
...props
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
open,
|
|
50
|
-
close,
|
|
51
|
-
reset,
|
|
52
|
-
patch,
|
|
53
|
-
isOpen
|
|
54
|
-
};
|
|
55
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useTheme = exports.provideThemeExtension = exports.injectThemeExtension = void 0;
|
|
7
|
-
var _unocssPreset = require("@byyuurin/ui/unocss-preset");
|
|
8
|
-
var _core = require("@vueuse/core");
|
|
9
|
-
var _vue = require("vue");
|
|
10
|
-
var theme = _interopRequireWildcard(require("../theme/index.cjs"));
|
|
11
|
-
var _utils = require("../utils/index.cjs");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const {
|
|
15
|
-
provide: provideThemeExtension,
|
|
16
|
-
inject: injectThemeExtension
|
|
17
|
-
} = (0, _utils.createInjection)("ui.themeExtension", {});
|
|
18
|
-
exports.injectThemeExtension = injectThemeExtension;
|
|
19
|
-
exports.provideThemeExtension = provideThemeExtension;
|
|
20
|
-
const useTheme = exports.useTheme = (0, _core.createSharedComposable)(() => {
|
|
21
|
-
const _theme = injectThemeExtension();
|
|
22
|
-
const mergeRules = (0, _unocssPreset.createMergeRules)();
|
|
23
|
-
const {
|
|
24
|
-
createStyler
|
|
25
|
-
} = (0, _utils.prepareStyler)(mergeRules);
|
|
26
|
-
return {
|
|
27
|
-
theme: (0, _vue.computed)(() => (0, _utils.extendTheme)((0, _vue.toValue)(_theme), theme)),
|
|
28
|
-
createStyler
|
|
29
|
-
};
|
|
30
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useToast = void 0;
|
|
7
|
-
var _core = require("@vueuse/core");
|
|
8
|
-
var _vue = require("vue");
|
|
9
|
-
const useToast = exports.useToast = (0, _core.createSharedComposable)(() => {
|
|
10
|
-
const toasts = (0, _vue.ref)([]);
|
|
11
|
-
function add(toast) {
|
|
12
|
-
const body = {
|
|
13
|
-
id: Date.now().toString(),
|
|
14
|
-
open: true,
|
|
15
|
-
...toast
|
|
16
|
-
};
|
|
17
|
-
const index = toasts.value.findIndex(t => t.id === body.id);
|
|
18
|
-
if (index === -1) toasts.value.push(body);
|
|
19
|
-
toasts.value = toasts.value.slice(-5);
|
|
20
|
-
return body;
|
|
21
|
-
}
|
|
22
|
-
function update(id, toast) {
|
|
23
|
-
const index = toasts.value.findIndex(t => t.id === id);
|
|
24
|
-
if (index === -1) return;
|
|
25
|
-
toasts.value[index] = {
|
|
26
|
-
...toasts.value[index],
|
|
27
|
-
...toast
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
function remove(id) {
|
|
31
|
-
const index = toasts.value.findIndex(t => t.id === id);
|
|
32
|
-
if (index === -1) return;
|
|
33
|
-
toasts.value[index] = {
|
|
34
|
-
...toasts.value[index],
|
|
35
|
-
open: false
|
|
36
|
-
};
|
|
37
|
-
setTimeout(() => {
|
|
38
|
-
toasts.value = toasts.value.filter(t => t.id !== id);
|
|
39
|
-
}, 200);
|
|
40
|
-
}
|
|
41
|
-
function clear() {
|
|
42
|
-
toasts.value = [];
|
|
43
|
-
}
|
|
44
|
-
return {
|
|
45
|
-
toasts,
|
|
46
|
-
add,
|
|
47
|
-
update,
|
|
48
|
-
remove,
|
|
49
|
-
clear
|
|
50
|
-
};
|
|
51
|
-
});
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _uiKit = require("@byyuurin/ui-kit");
|
|
8
|
-
module.exports = (0, _uiKit.ct)({
|
|
9
|
-
slots: {
|
|
10
|
-
root: "w-full color-ui-cb",
|
|
11
|
-
item: "border-b last:border-b-0",
|
|
12
|
-
header: "flex",
|
|
13
|
-
trigger: "group flex-1 flex items-center gap-2 font-medium text-sm py-4 focus-visible:outline-ui-fill min-w-0",
|
|
14
|
-
content: ["overflow-hidden focus:outline-none", "data-[state=open]:animate-[accordion-down_200ms_ease-out]", "data-[state=closed]:animate-[accordion-up_200ms_ease-out]"],
|
|
15
|
-
body: "text-sm pb-4 color-ui-cb/80",
|
|
16
|
-
icon: "shrink-0 size-5",
|
|
17
|
-
trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200",
|
|
18
|
-
label: "text-start break-words"
|
|
19
|
-
},
|
|
20
|
-
variants: {
|
|
21
|
-
disabled: {
|
|
22
|
-
true: {
|
|
23
|
-
trigger: "cursor-not-allowed opacity-50"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
module.exports = {
|
|
8
|
-
icons: {
|
|
9
|
-
close: "i-mdi-close-thick",
|
|
10
|
-
loading: "i-mdi-loading",
|
|
11
|
-
check: "i-mdi-check-bold",
|
|
12
|
-
indeterminate: "i-mdi-minus-thick",
|
|
13
|
-
down: "i-mdi-chevron-down"
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _uiKit = require("@byyuurin/ui-kit");
|
|
8
|
-
module.exports = (0, _uiKit.ct)({
|
|
9
|
-
slots: {
|
|
10
|
-
base: ["inline-flex items-center leading-normal transition-colors", "disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50"],
|
|
11
|
-
label: "color-inherit",
|
|
12
|
-
prefixIcon: "shrink-0 size-1.5em",
|
|
13
|
-
suffixIcon: "shrink-0 size-1.5em"
|
|
14
|
-
},
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
solid: {
|
|
18
|
-
base: ["color-ui-c1 bg-ui-fill/90", "hover:bg-ui-fill/80 active:bg-ui-fill", "disabled:bg-ui-fill/90 aria-disabled:bg-ui-fill/90"]
|
|
19
|
-
},
|
|
20
|
-
outline: {
|
|
21
|
-
base: ["color-ui-fill bg-ui-c1 ring ring-inset ring-ui-fill", "hover:bg-ui-fill/10 active:bg-ui-fill/25", "disabled:bg-ui-c1 aria-disabled:bg-ui-c1"]
|
|
22
|
-
},
|
|
23
|
-
soft: {
|
|
24
|
-
base: ["color-ui-content/80 bg-ui-fill/10", "hover:bg-ui-fill/15 hover:color-ui-content/80 active:bg-ui-fill/20 active:color-ui-content/90", "disabled:bg-ui-fill/10 aria-disabled:bg-ui-fill/10 disabled:color-ui-content/80 aria-disabled:color-ui-content/80"]
|
|
25
|
-
},
|
|
26
|
-
ghost: {
|
|
27
|
-
base: ["color-ui-fill/80 bg-transparent", "hover:bg-ui-fill/10 hover:color-ui-fill/80 active:bg-ui-fill/20 active:color-ui-fill/90", "disabled:bg-transparent aria-disabled:bg-transparent disabled:color-ui-fill/80 aria-disabled:color-ui-fill/80"]
|
|
28
|
-
},
|
|
29
|
-
link: {
|
|
30
|
-
base: ["color-ui-fill bg-transparent", "hover:color-ui-fill/80 active:color-ui-fill/90", "disabled:color-ui-fill aria-disabled:color-ui-fill"]
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
xs: {
|
|
35
|
-
base: "text-xs"
|
|
36
|
-
},
|
|
37
|
-
sm: {
|
|
38
|
-
base: "text-sm"
|
|
39
|
-
},
|
|
40
|
-
md: {
|
|
41
|
-
base: "text-base"
|
|
42
|
-
},
|
|
43
|
-
lg: {
|
|
44
|
-
base: "text-lg"
|
|
45
|
-
},
|
|
46
|
-
xl: {
|
|
47
|
-
base: "text-xl"
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
round: {
|
|
51
|
-
true: {
|
|
52
|
-
base: "rounded-full"
|
|
53
|
-
},
|
|
54
|
-
false: {
|
|
55
|
-
base: "rounded-ui-button"
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
active: {
|
|
59
|
-
true: ""
|
|
60
|
-
},
|
|
61
|
-
prefix: {
|
|
62
|
-
true: ""
|
|
63
|
-
},
|
|
64
|
-
suffix: {
|
|
65
|
-
true: ""
|
|
66
|
-
},
|
|
67
|
-
loading: {
|
|
68
|
-
true: ""
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
compoundVariants: [{
|
|
72
|
-
size: ["xs", "sm", "md"],
|
|
73
|
-
class: {
|
|
74
|
-
base: "p-1.5",
|
|
75
|
-
label: "px-1"
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
78
|
-
size: ["lg", "xl"],
|
|
79
|
-
class: {
|
|
80
|
-
base: "p-2.5",
|
|
81
|
-
label: "px-2"
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
active: true,
|
|
85
|
-
variant: "solid",
|
|
86
|
-
class: {
|
|
87
|
-
base: "bg-ui-fill hover:bg-ui-fill"
|
|
88
|
-
}
|
|
89
|
-
}, {
|
|
90
|
-
active: true,
|
|
91
|
-
variant: "outline",
|
|
92
|
-
class: {
|
|
93
|
-
base: "bg-ui-fill/25 hover:bg-ui-fill/25"
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
active: true,
|
|
97
|
-
variant: "soft",
|
|
98
|
-
class: {
|
|
99
|
-
base: "color-ui-content/90 bg-ui-fill/20 hover:color-ui-content/90 hover:bg-ui-fill/20"
|
|
100
|
-
}
|
|
101
|
-
}, {
|
|
102
|
-
active: true,
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
class: {
|
|
105
|
-
base: "color-ui-fill/90 bg-ui-fill/20 hover:color-ui-fill/90 hover:bg-ui-fill/20"
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
active: true,
|
|
109
|
-
variant: "link",
|
|
110
|
-
class: {
|
|
111
|
-
base: "color-ui-fill/90 hover:color-ui-fill/90"
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
loading: true,
|
|
115
|
-
prefix: true,
|
|
116
|
-
class: {
|
|
117
|
-
prefixIcon: "animate-spin"
|
|
118
|
-
}
|
|
119
|
-
}, {
|
|
120
|
-
loading: true,
|
|
121
|
-
prefix: false,
|
|
122
|
-
suffix: true,
|
|
123
|
-
class: {
|
|
124
|
-
suffixIcon: "animate-spin"
|
|
125
|
-
}
|
|
126
|
-
}]
|
|
127
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _uiKit = require("@byyuurin/ui-kit");
|
|
8
|
-
module.exports = (0, _uiKit.ct)({
|
|
9
|
-
slots: {
|
|
10
|
-
root: "color-ui-cb bg-ui-c1 ring ring-ui-cb/10 divide-y divide-ui-cb/10 rounded-ui-box shadow-sm shadow-ui-cb/10",
|
|
11
|
-
header: "flex flex-wrap items-center gap-1 px-4 py-5 sm:px-6",
|
|
12
|
-
body: "flex-1 overflow-y-auto p-4 sm:p-6 empty:hidden",
|
|
13
|
-
footer: "flex items-center gap-1.5 p-4 sm:px-6",
|
|
14
|
-
title: "flex-grow color-ui-cb text-xl font-semibold",
|
|
15
|
-
description: "w-full color-ui-cb/80"
|
|
16
|
-
}
|
|
17
|
-
});
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var _uiKit = require("@byyuurin/ui-kit");
|
|
8
|
-
module.exports = (0, _uiKit.ct)({
|
|
9
|
-
slots: {
|
|
10
|
-
root: "relative flex items-start",
|
|
11
|
-
base: ["size-1.25em shrink-0 flex items-center justify-center rounded-ui-base color-ui-c1 ring ring-inset ring-ui-cb", "focus-visible:outline-ui-cb focus-visible:outline-2 focus-visible:outline-offset-2"],
|
|
12
|
-
container: "flex items-center h-1.25em",
|
|
13
|
-
wrapper: "text-inherit ms-2",
|
|
14
|
-
icon: "shrink-0 size-1em data-[state=checked]:animate-[scale-in_200ms_ease-out]",
|
|
15
|
-
label: "flex color-ui-cb after:content-empty",
|
|
16
|
-
description: "color-ui-cb/60"
|
|
17
|
-
},
|
|
18
|
-
variants: {
|
|
19
|
-
size: {
|
|
20
|
-
xs: {
|
|
21
|
-
root: "text-xs"
|
|
22
|
-
},
|
|
23
|
-
sm: {
|
|
24
|
-
root: "text-sm"
|
|
25
|
-
},
|
|
26
|
-
md: {
|
|
27
|
-
root: "text-base"
|
|
28
|
-
},
|
|
29
|
-
lg: {
|
|
30
|
-
root: "text-lg"
|
|
31
|
-
},
|
|
32
|
-
xl: {
|
|
33
|
-
root: "text-xl"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
required: {
|
|
37
|
-
true: {
|
|
38
|
-
label: `after:content-['*'] after:ms-0.5`
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
disabled: {
|
|
42
|
-
true: {
|
|
43
|
-
root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
|
|
44
|
-
},
|
|
45
|
-
false: {
|
|
46
|
-
label: "cursor-pointer"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
checked: {
|
|
50
|
-
true: {
|
|
51
|
-
base: "ring-2 ring-ui-content bg-ui-content",
|
|
52
|
-
icon: "color-ui-c1"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|