dlzn-ui 1.0.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/README.md ADDED
@@ -0,0 +1,4 @@
1
+ # monorepo
2
+
3
+ - README.md / LICENSE / global.d.ts
4
+ - 若你希望样式完全打进 JS、磁盘上不出现 .css,可以说一下,我再改成 JS 内联注入方案。
@@ -0,0 +1,8 @@
1
+ //#region \0plugin-vue:export-helper
2
+ var e = (e, t) => {
3
+ let n = e.__vccOpts || e;
4
+ for (let [e, r] of t) n[e] = r;
5
+ return n;
6
+ };
7
+ //#endregion
8
+ export { e as default };
@@ -0,0 +1,2 @@
1
+ export { default as Button } from './src/button.vue';
2
+ export * from './src/button';
@@ -0,0 +1,3 @@
1
+ import { buttonProps as e } from "./src/button.mjs";
2
+ import t from "./src/button2.mjs";
3
+ export { t as Button, e as buttonProps };
@@ -0,0 +1,28 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ export declare const buttonProps: {
3
+ type: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ plain: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ round: {
12
+ type: BooleanConstructor;
13
+ default: boolean;
14
+ };
15
+ circle: {
16
+ type: BooleanConstructor;
17
+ default: boolean;
18
+ };
19
+ disabled: {
20
+ type: BooleanConstructor;
21
+ default: boolean;
22
+ };
23
+ icon: {
24
+ type: StringConstructor;
25
+ default: string;
26
+ };
27
+ };
28
+ export type ButtonProps = ExtractPropTypes<typeof buttonProps>;
@@ -0,0 +1,29 @@
1
+ //#region src/components/button/src/button.ts
2
+ var e = {
3
+ type: {
4
+ type: String,
5
+ default: "default"
6
+ },
7
+ plain: {
8
+ type: Boolean,
9
+ default: !1
10
+ },
11
+ round: {
12
+ type: Boolean,
13
+ default: !1
14
+ },
15
+ circle: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ disabled: {
20
+ type: Boolean,
21
+ default: !1
22
+ },
23
+ icon: {
24
+ type: String,
25
+ default: ""
26
+ }
27
+ };
28
+ //#endregion
29
+ export { e as buttonProps };
@@ -0,0 +1,65 @@
1
+ import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
4
+ declare const __VLS_export: DefineComponent<ExtractPropTypes<{
5
+ type: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
9
+ plain: {
10
+ type: BooleanConstructor;
11
+ default: boolean;
12
+ };
13
+ round: {
14
+ type: BooleanConstructor;
15
+ default: boolean;
16
+ };
17
+ circle: {
18
+ type: BooleanConstructor;
19
+ default: boolean;
20
+ };
21
+ disabled: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ icon: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ };
29
+ }>, {
30
+ clickHandle: (e: Event) => void;
31
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, "click"[], "click", PublicProps, Readonly< ExtractPropTypes<{
32
+ type: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ plain: {
37
+ type: BooleanConstructor;
38
+ default: boolean;
39
+ };
40
+ round: {
41
+ type: BooleanConstructor;
42
+ default: boolean;
43
+ };
44
+ circle: {
45
+ type: BooleanConstructor;
46
+ default: boolean;
47
+ };
48
+ disabled: {
49
+ type: BooleanConstructor;
50
+ default: boolean;
51
+ };
52
+ icon: {
53
+ type: StringConstructor;
54
+ default: string;
55
+ };
56
+ }>> & Readonly<{
57
+ onClick?: ((...args: any[]) => any) | undefined;
58
+ }>, {
59
+ type: string;
60
+ plain: boolean;
61
+ round: boolean;
62
+ circle: boolean;
63
+ disabled: boolean;
64
+ icon: string;
65
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,16 @@
1
+ import { buttonProps as e } from "./button.mjs";
2
+ import { defineComponent as t } from "vue";
3
+ //#region src/components/button/src/button.vue?vue&type=script&lang.ts
4
+ var n = t({
5
+ name: "DuyiButton",
6
+ props: e,
7
+ emits: ["click"],
8
+ setup(e, { emit: t }) {
9
+ function n(e) {
10
+ t("click", e);
11
+ }
12
+ return { clickHandle: n };
13
+ }
14
+ });
15
+ //#endregion
16
+ export { n as default };
@@ -0,0 +1 @@
1
+ .duyi-button[data-v-8194f55b]{color:#606266;cursor:pointer;background-color:#fff;border:1px solid #dcdfe6;border-radius:4px;justify-content:center;align-items:center;padding:8px 16px;font-size:14px;line-height:1;display:inline-flex}.duyi-button[data-v-8194f55b]:hover{color:#409eff;background-color:#ecf5ff;border-color:#c6e2ff}.duyi-button.is-disabled[data-v-8194f55b],.duyi-button[data-v-8194f55b]:disabled{cursor:not-allowed;opacity:.6}.duyi-button.is-round[data-v-8194f55b]{border-radius:20px}.duyi-button.is-circle[data-v-8194f55b]{border-radius:50%;padding:8px}.duyi-button-primary[data-v-8194f55b]{color:#fff;background-color:#409eff;border-color:#409eff}.duyi-button-primary[data-v-8194f55b]:hover{color:#fff;background-color:#66b1ff;border-color:#66b1ff}
@@ -0,0 +1,24 @@
1
+ import e from "./button.vue_vue_type_script_lang.mjs";
2
+ import './button.vue_vue_type_style_index_0_scoped_8194f55b_lang.css';/* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ import { createCommentVNode as n, createElementBlock as r, normalizeClass as i, openBlock as a, renderSlot as o } from "vue";
5
+ //#region src/components/button/src/button.vue
6
+ var s = ["disabled"], c = { key: 1 };
7
+ function l(e, t, l, u, d, f) {
8
+ return a(), r("button", {
9
+ class: i(["duyi-button", [`duyi-button-${e.type}`, {
10
+ "is-plain": e.plain,
11
+ "is-round": e.round,
12
+ "is-circle": e.circle,
13
+ "is-disabled": e.disabled
14
+ }]]),
15
+ disabled: e.disabled,
16
+ onClick: t[0] ||= (...t) => e.clickHandle && e.clickHandle(...t)
17
+ }, [e.icon ? (a(), r("i", {
18
+ key: 0,
19
+ class: i(`duyi-icon-${e.icon}`)
20
+ }, null, 2)) : n("", !0), e.$slots.default ? (a(), r("span", c, [o(e.$slots, "default", {}, void 0, !0)])) : n("", !0)], 10, s);
21
+ }
22
+ var u = /*#__PURE__*/ t(e, [["render", l], ["__scopeId", "data-v-8194f55b"]]);
23
+ //#endregion
24
+ export { u as default };
@@ -0,0 +1 @@
1
+ export * from './button';
@@ -0,0 +1,4 @@
1
+ import { buttonProps as e } from "./button/src/button.mjs";
2
+ import t from "./button/src/button2.mjs";
3
+ import "./button/index.mjs";
4
+ export { t as Button, e as buttonProps };
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './components';
package/index.mjs ADDED
@@ -0,0 +1,4 @@
1
+ import { buttonProps as e } from "./components/button/src/button.mjs";
2
+ import t from "./components/button/src/button2.mjs";
3
+ import "./components/index.mjs";
4
+ export { t as Button, e as buttonProps };
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "dlzn-ui",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "keywords": [],
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./index.d.ts",
11
+ "import": "./index.mjs"
12
+ },
13
+ "./utils": {
14
+ "types": "./utils/index.d.ts",
15
+ "import": "./utils/index.mjs"
16
+ }
17
+ },
18
+ "peerDependencies": {
19
+ "vue": "^3.5.0"
20
+ },
21
+ "sideEffects": [
22
+ "**/*.css"
23
+ ]
24
+ }
@@ -0,0 +1 @@
1
+ export * from './string';
@@ -0,0 +1,2 @@
1
+ import { getFilenameFromUrl as e, queryStringToObject as t } from "./string.mjs";
2
+ export { e as getFilenameFromUrl, t as queryStringToObject };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @description: 从 url 中获取文件名
3
+ * @param {string} url
4
+ * @param {boolean} withExt 是否包含扩展名
5
+ * @return {string}
6
+ */
7
+ declare function getFilenameFromUrl(url: string, withExt?: boolean): string;
8
+ declare function queryStringToObject(queryString: string): Record<string, any>;
9
+ export { getFilenameFromUrl, queryStringToObject };
@@ -0,0 +1,14 @@
1
+ //#region src/utils/string.ts
2
+ function e(e, t = !1) {
3
+ let n = e.split("/").pop().split("?")[0];
4
+ if (t) return n;
5
+ {
6
+ let e = n.split(".");
7
+ return e.pop(), e.join(".");
8
+ }
9
+ }
10
+ function t(e) {
11
+ return Object.fromEntries(new URLSearchParams(e));
12
+ }
13
+ //#endregion
14
+ export { e as getFilenameFromUrl, t as queryStringToObject };