geekplus-digital-ui 0.1.10 → 0.1.12

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.
Files changed (34) hide show
  1. package/components/copy/index.d.ts +3 -3
  2. package/components/copy/src/copy.css +1 -1
  3. package/components/copy/src/copy.vue.d.ts +1 -1
  4. package/components/copy/src/copy.vue.js +55 -45
  5. package/components/fold-text/index.d.ts +41 -0
  6. package/components/fold-text/index.js +6 -0
  7. package/components/fold-text/src/fold-text.css +1 -0
  8. package/components/fold-text/src/fold-text.vue.d.ts +25 -0
  9. package/components/fold-text/src/fold-text.vue.js +85 -0
  10. package/components/icon-tip/index.d.ts +54 -0
  11. package/components/icon-tip/index.js +6 -0
  12. package/components/icon-tip/src/icon-tip.css +1 -0
  13. package/components/icon-tip/src/icon-tip.vue.d.ts +26 -0
  14. package/components/icon-tip/src/icon-tip.vue.js +68 -0
  15. package/components/icons/angle-down-light.vue.js +18 -0
  16. package/components/icons/angle-up-light.vue.d.ts +2 -0
  17. package/components/icons/angle-up-light.vue.js +18 -0
  18. package/components/icons/circle-exclamation-solid.vue.d.ts +2 -0
  19. package/components/icons/circle-exclamation-solid.vue.js +18 -0
  20. package/components/icons/copy-light.vue.d.ts +2 -0
  21. package/components/{copy/src/copy-icon.vue.js → icons/copy-light.vue.js} +5 -5
  22. package/components/index.d.ts +2 -0
  23. package/components/index.js +6 -2
  24. package/config/index.d.ts +6 -0
  25. package/config/index.js +24 -0
  26. package/index.d.ts +1 -0
  27. package/index.js +13 -4
  28. package/install.js +8 -7
  29. package/locale/lang/en.d.ts +4 -0
  30. package/locale/lang/en.js +6 -2
  31. package/locale/lang/zh-cn.d.ts +4 -0
  32. package/locale/lang/zh-cn.js +6 -2
  33. package/package.json +1 -1
  34. /package/components/{copy/src/copy-icon.vue.d.ts → icons/angle-down-light.vue.d.ts} +0 -0
@@ -2,7 +2,7 @@ export const DCopy: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
3
3
  rootRef: import('vue').Ref<any, any>;
4
4
  handleCopy: () => void;
5
- type: string;
5
+ type?: string;
6
6
  text?: string;
7
7
  icon?: string;
8
8
  triggerElement?: string;
@@ -143,7 +143,7 @@ export const DCopy: {
143
143
  }, Readonly<{}> & Readonly<{}>, {
144
144
  rootRef: import('vue').Ref<any, any>;
145
145
  handleCopy: () => void;
146
- type: string;
146
+ type?: string;
147
147
  text?: string;
148
148
  icon?: string;
149
149
  triggerElement?: string;
@@ -160,7 +160,7 @@ export const DCopy: {
160
160
  } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
161
161
  rootRef: import('vue').Ref<any, any>;
162
162
  handleCopy: () => void;
163
- type: string;
163
+ type?: string;
164
164
  text?: string;
165
165
  icon?: string;
166
166
  triggerElement?: string;
@@ -1 +1 @@
1
- .d-copy[data-v-cad5f2ba] .el-link__inner{gap:5px}
1
+ .d-copy[data-v-e2b2e941] .el-link__inner{gap:5px}
@@ -6,7 +6,7 @@ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
6
6
  declare const __VLS_component: import('vue').DefineComponent<{}, {
7
7
  rootRef: import('vue').Ref<any, any>;
8
8
  handleCopy: () => void;
9
- type: string;
9
+ type?: string;
10
10
  text?: string;
11
11
  icon?: string;
12
12
  triggerElement?: string;
@@ -1,8 +1,9 @@
1
- import { ref as p, toRef as d, computed as f, onMounted as x, onBeforeUnmount as L, openBlock as s, createBlock as v, unref as y, withModifiers as S, normalizeStyle as M, withCtx as g, createElementBlock as N, normalizeClass as B, createVNode as b, renderSlot as w, createCommentVNode as I } from "vue";
2
- import { useClipboard as R } from "@vueuse/core";
3
- import { ElMessage as $, ElLink as z, ElIcon as V } from "element-plus";
1
+ import { ref as m, toRef as x, computed as f, onMounted as L, onBeforeUnmount as S, openBlock as u, createBlock as d, unref as y, withModifiers as M, normalizeStyle as N, withCtx as v, createElementBlock as _, normalizeClass as B, createVNode as b, renderSlot as w, createCommentVNode as R } from "vue";
2
+ import { useClipboard as V } from "@vueuse/core";
3
+ import { ElMessage as $, ElLink as z, ElIcon as I } from "element-plus";
4
4
  import "../../../hooks/index.js";
5
- import j from "./copy-icon.vue.js";
5
+ import { getComponentConfigValue as s } from "../../../config/index.js";
6
+ import j from "../../icons/copy-light.vue.js";
6
7
  import './copy.css';/* empty css */
7
8
  import D from "../../../_virtual/_plugin-vue_export-helper.js";
8
9
  import { useLocale as H } from "../../../hooks/use-locale/index.js";
@@ -11,72 +12,81 @@ const O = /* @__PURE__ */ Object.assign({
11
12
  }, {
12
13
  __name: "copy",
13
14
  props: {
14
- text: String,
15
+ text: {
16
+ type: String,
17
+ default: () => s("Copy", "text")
18
+ },
15
19
  type: {
16
20
  type: String,
17
- default: "primary"
21
+ default: () => s("Copy", "type", "primary")
18
22
  },
19
- icon: String,
20
- triggerElement: String
23
+ icon: {
24
+ type: String,
25
+ default: () => s("Copy", "icon")
26
+ },
27
+ triggerElement: {
28
+ type: String,
29
+ default: () => s("Copy", "triggerElement")
30
+ }
21
31
  // 触发元素显示的dom,不设置就一直显示
22
32
  },
23
- setup(a, { expose: E }) {
24
- const o = a, r = p(null), l = p(!1), h = d(o, "text"), u = d(o, "icon"), { copy: k } = R({
25
- source: h
26
- }), { t: C } = H(), e = f(() => {
27
- const n = r.value?.$el ?? r.value;
28
- if (!o.triggerElement || !n)
33
+ setup(n, { expose: g }) {
34
+ const r = n, l = m(null), a = m(!1), C = x(r, "text"), { copy: E } = V({
35
+ source: C
36
+ }), { t: h } = H(), e = f(() => {
37
+ const o = l.value?.$el ?? l.value;
38
+ if (!r.triggerElement || !o)
29
39
  return null;
30
- let t = n.parentNode;
40
+ let t = o.parentNode;
31
41
  for (; t; ) {
32
- if (t.matches(o.triggerElement))
42
+ if (t.matches(r.triggerElement))
33
43
  return t;
34
44
  t = t.parentNode;
35
45
  }
36
46
  return null;
37
- }), _ = f(() => ({
38
- display: o.triggerElement && !l.value ? "none" : ""
39
- })), c = () => {
40
- k().then(() => {
41
- $.success(C("d.copy.success"));
47
+ }), k = f(() => ({
48
+ display: r.triggerElement && !a.value ? "none" : ""
49
+ })), i = () => {
50
+ E().then(() => {
51
+ $.success(h("d.copy.success"));
42
52
  });
43
- }, i = () => {
44
- l.value = !0;
45
- }, m = () => {
46
- l.value = !1;
53
+ }, c = () => {
54
+ a.value = !0;
55
+ }, p = () => {
56
+ a.value = !1;
47
57
  };
48
- return x(() => {
49
- e.value && (e.value.addEventListener("mouseenter", i), e.value.addEventListener("mouseleave", m));
50
- }), L(() => {
51
- e.value && (e.value.removeEventListener("mouseenter", i), e.value.removeEventListener("mouseleave", m));
52
- }), E({
53
- rootRef: r,
54
- handleCopy: c
55
- }), (n, t) => (s(), v(y(z), {
58
+ return L(() => {
59
+ e.value && (e.value.addEventListener("mouseenter", c), e.value.addEventListener("mouseleave", p));
60
+ }), S(() => {
61
+ e.value && (e.value.removeEventListener("mouseenter", c), e.value.removeEventListener("mouseleave", p));
62
+ }), g({
63
+ rootRef: l,
64
+ handleCopy: i
65
+ }), (o, t) => (u(), d(y(z), {
56
66
  ref_key: "rootRef",
57
- ref: r,
67
+ ref: l,
58
68
  class: "d-copy",
59
- type: a.type,
69
+ type: n.type,
60
70
  underline: "never",
61
- style: M(_.value),
62
- onClick: S(c, ["stop"])
71
+ style: N(k.value),
72
+ onClick: M(i, ["stop"])
63
73
  }, {
64
- default: g(() => [
65
- u.value ? (s(), N("i", {
74
+ default: v(() => [
75
+ n.icon ? (u(), _("i", {
66
76
  key: 0,
67
- class: B(u.value)
68
- }, null, 2)) : (s(), v(y(V), { key: 1 }, {
69
- default: g(() => [
77
+ class: B(n.icon)
78
+ }, null, 2)) : (u(), d(y(I), { key: 1 }, {
79
+ default: v(() => [
70
80
  b(j)
71
81
  ]),
72
82
  _: 1
73
83
  })),
74
- n.$slots.default ? w(n.$slots, "default", { key: 2 }, void 0, !0) : I("", !0)
84
+ o.$slots.default ? w(o.$slots, "default", { key: 2 }, void 0, !0) : R("", !0)
75
85
  ]),
76
86
  _: 3
77
87
  }, 8, ["type", "style"]));
78
88
  }
79
- }), Q = /* @__PURE__ */ D(O, [["__scopeId", "data-v-cad5f2ba"]]);
89
+ }), T = /* @__PURE__ */ D(O, [["__scopeId", "data-v-e2b2e941"]]);
80
90
  export {
81
- Q as default
91
+ T as default
82
92
  };
@@ -0,0 +1,41 @@
1
+ export const DFoldText: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
3
+ showFold?: boolean;
4
+ lineClamp?: number;
5
+ $props: {
6
+ readonly showFold?: boolean;
7
+ readonly lineClamp?: number;
8
+ };
9
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
10
+ textRef: HTMLDivElement;
11
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
12
+ P: {};
13
+ B: {};
14
+ D: {};
15
+ C: {};
16
+ M: {};
17
+ Defaults: {};
18
+ }, Readonly<{}> & Readonly<{}>, {
19
+ showFold?: boolean;
20
+ lineClamp?: number;
21
+ $props: {
22
+ readonly showFold?: boolean;
23
+ readonly lineClamp?: number;
24
+ };
25
+ }, {}, {}, {}, {}>;
26
+ __isFragment?: never;
27
+ __isTeleport?: never;
28
+ __isSuspense?: never;
29
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
30
+ showFold?: boolean;
31
+ lineClamp?: number;
32
+ $props: {
33
+ readonly showFold?: boolean;
34
+ readonly lineClamp?: number;
35
+ };
36
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
37
+ $slots: {
38
+ default?(_: {}): any;
39
+ };
40
+ });
41
+ export default DFoldText;
@@ -0,0 +1,6 @@
1
+ import o from "./src/fold-text.vue.js";
2
+ const e = o;
3
+ export {
4
+ e as DFoldText,
5
+ e as default
6
+ };
@@ -0,0 +1 @@
1
+ .d-fold-text[data-v-ca1d8178]{display:flex;flex-direction:column;overflow-wrap:break-word}.d-fold-text .text-content[data-v-ca1d8178]{white-space:pre-wrap}.d-fold-text .text-content.line-clamp[data-v-ca1d8178]{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}.d-fold-text .text-link[data-v-ca1d8178]{display:flex}.d-fold-text .text-link[data-v-ca1d8178] .el-link__inner{gap:5px}
@@ -0,0 +1,25 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ showFold?: boolean;
8
+ lineClamp?: number;
9
+ $props: {
10
+ readonly showFold?: boolean;
11
+ readonly lineClamp?: number;
12
+ };
13
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
14
+ textRef: HTMLDivElement;
15
+ }, HTMLDivElement>;
16
+ type __VLS_TemplateResult = {
17
+ attrs: Partial<{}>;
18
+ slots: {
19
+ default?(_: {}): any;
20
+ };
21
+ refs: {
22
+ textRef: HTMLDivElement;
23
+ };
24
+ rootEl: HTMLDivElement;
25
+ };
@@ -0,0 +1,85 @@
1
+ import { ref as s, computed as F, onMounted as h, openBlock as n, createElementBlock as p, createElementVNode as d, normalizeStyle as w, normalizeClass as T, renderSlot as E, createBlock as f, unref as e, withCtx as a, toDisplayString as c, createVNode as r, createCommentVNode as b } from "vue";
2
+ import { useResizeObserver as B } from "@vueuse/core";
3
+ import { ElLink as v, ElIcon as x } from "element-plus";
4
+ import "../../../hooks/index.js";
5
+ import { getComponentConfigValue as y } from "../../../config/index.js";
6
+ import L from "../../icons/angle-up-light.vue.js";
7
+ import N from "../../icons/angle-down-light.vue.js";
8
+ import './fold-text.css';/* empty css */
9
+ import V from "../../../_virtual/_plugin-vue_export-helper.js";
10
+ import { useLocale as z } from "../../../hooks/use-locale/index.js";
11
+ const D = { class: "d-fold-text" }, R = {
12
+ key: 0,
13
+ class: "text-link"
14
+ }, S = /* @__PURE__ */ Object.assign({
15
+ name: "DFoldText"
16
+ }, {
17
+ __name: "fold-text",
18
+ props: {
19
+ showFold: {
20
+ type: Boolean,
21
+ default: () => y("FoldText", "showFold", !0)
22
+ },
23
+ lineClamp: {
24
+ type: Number,
25
+ default: () => y("FoldText", "lineClamp", 3)
26
+ }
27
+ },
28
+ setup(i) {
29
+ const k = i, t = s(null), u = s(!1), l = s(!1), { t: m } = z(), C = F(() => ({
30
+ "line-clamp": !l.value && k.lineClamp
31
+ }));
32
+ return h(() => {
33
+ B(t, () => {
34
+ !l.value && t.value && (u.value = t.value.scrollHeight > t.value.clientHeight);
35
+ });
36
+ }), (g, o) => (n(), p("div", D, [
37
+ d("div", {
38
+ ref_key: "textRef",
39
+ ref: t,
40
+ class: T(["text-content", C.value]),
41
+ style: w({ "-webkit-line-clamp": i.lineClamp })
42
+ }, [
43
+ E(g.$slots, "default", {}, void 0, !0)
44
+ ], 6),
45
+ i.showFold && u.value ? (n(), p("div", R, [
46
+ l.value ? (n(), f(e(v), {
47
+ key: 0,
48
+ onClick: o[0] || (o[0] = (_) => l.value = !1),
49
+ type: "primary",
50
+ underline: "never"
51
+ }, {
52
+ default: a(() => [
53
+ d("span", null, c(e(m)("d.foldText.collapse")), 1),
54
+ r(e(x), null, {
55
+ default: a(() => [
56
+ r(L)
57
+ ]),
58
+ _: 1
59
+ })
60
+ ]),
61
+ _: 1
62
+ })) : (n(), f(e(v), {
63
+ key: 1,
64
+ onClick: o[1] || (o[1] = (_) => l.value = !0),
65
+ type: "primary",
66
+ underline: "never"
67
+ }, {
68
+ default: a(() => [
69
+ d("span", null, c(e(m)("d.foldText.expand")), 1),
70
+ r(e(x), null, {
71
+ default: a(() => [
72
+ r(N)
73
+ ]),
74
+ _: 1
75
+ })
76
+ ]),
77
+ _: 1
78
+ }))
79
+ ])) : b("", !0)
80
+ ]));
81
+ }
82
+ }), G = /* @__PURE__ */ V(S, [["__scopeId", "data-v-ca1d8178"]]);
83
+ export {
84
+ G as default
85
+ };
@@ -0,0 +1,54 @@
1
+ export const DIconTip: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
3
+ $emit: (event: "click", ...args: any[]) => void;
4
+ type?: string;
5
+ icon?: string;
6
+ content?: string;
7
+ placement?: string;
8
+ $props: {
9
+ readonly type?: string;
10
+ readonly icon?: string;
11
+ readonly content?: string;
12
+ readonly placement?: string;
13
+ };
14
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
15
+ P: {};
16
+ B: {};
17
+ D: {};
18
+ C: {};
19
+ M: {};
20
+ Defaults: {};
21
+ }, Readonly<{}> & Readonly<{}>, {
22
+ $emit: (event: "click", ...args: any[]) => void;
23
+ type?: string;
24
+ icon?: string;
25
+ content?: string;
26
+ placement?: string;
27
+ $props: {
28
+ readonly type?: string;
29
+ readonly icon?: string;
30
+ readonly content?: string;
31
+ readonly placement?: string;
32
+ };
33
+ }, {}, {}, {}, {}>;
34
+ __isFragment?: never;
35
+ __isTeleport?: never;
36
+ __isSuspense?: never;
37
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {
38
+ $emit: (event: "click", ...args: any[]) => void;
39
+ type?: string;
40
+ icon?: string;
41
+ content?: string;
42
+ placement?: string;
43
+ $props: {
44
+ readonly type?: string;
45
+ readonly icon?: string;
46
+ readonly content?: string;
47
+ readonly placement?: string;
48
+ };
49
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
50
+ $slots: {
51
+ content?(_: {}): any;
52
+ };
53
+ });
54
+ export default DIconTip;
@@ -0,0 +1,6 @@
1
+ import o from "./src/icon-tip.vue.js";
2
+ const t = o;
3
+ export {
4
+ t as DIconTip,
5
+ t as default
6
+ };
@@ -0,0 +1 @@
1
+ .d-icon-tip .tip-content[data-v-a3e9d571]{white-space:pre-wrap}
@@ -0,0 +1,26 @@
1
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
2
+ export default _default;
3
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
4
+ $slots: S;
5
+ });
6
+ declare const __VLS_component: import('vue').DefineComponent<{}, {
7
+ $emit: (event: "click", ...args: any[]) => void;
8
+ type?: string;
9
+ icon?: string;
10
+ content?: string;
11
+ placement?: string;
12
+ $props: {
13
+ readonly type?: string;
14
+ readonly icon?: string;
15
+ readonly content?: string;
16
+ readonly placement?: string;
17
+ };
18
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
19
+ type __VLS_TemplateResult = {
20
+ attrs: Partial<{}>;
21
+ slots: {
22
+ content?(_: {}): any;
23
+ };
24
+ refs: {};
25
+ rootEl: any;
26
+ };
@@ -0,0 +1,68 @@
1
+ import { openBlock as o, createBlock as l, unref as c, withCtx as t, createVNode as a, mergeProps as s, createElementBlock as d, normalizeClass as f, createElementVNode as u, renderSlot as y, createTextVNode as k, toDisplayString as g } from "vue";
2
+ import { ElTooltip as I, ElLink as T, ElIcon as C } from "element-plus";
3
+ import { getComponentConfigValue as n } from "../../../config/index.js";
4
+ import S from "../../icons/circle-exclamation-solid.vue.js";
5
+ import './icon-tip.css';/* empty css */
6
+ import E from "../../../_virtual/_plugin-vue_export-helper.js";
7
+ const _ = { class: "tip-content" }, h = /* @__PURE__ */ Object.assign({
8
+ name: "DIconTip"
9
+ }, {
10
+ __name: "icon-tip",
11
+ props: {
12
+ content: {
13
+ type: String,
14
+ default: () => n("IconTip", "content")
15
+ },
16
+ icon: {
17
+ type: String,
18
+ default: () => n("IconTip", "icon")
19
+ },
20
+ placement: {
21
+ type: String,
22
+ default: () => n("IconTip", "placement", "top")
23
+ },
24
+ type: {
25
+ type: String,
26
+ default: () => n("IconTip", "type", "primary")
27
+ }
28
+ },
29
+ emits: ["click"],
30
+ setup(e, { emit: r }) {
31
+ const p = r, m = () => {
32
+ p("click");
33
+ };
34
+ return (i, x) => (o(), l(c(I), { placement: e.placement }, {
35
+ content: t(() => [
36
+ u("div", _, [
37
+ y(i.$slots, "content", {}, () => [
38
+ k(g(e.content), 1)
39
+ ], !0)
40
+ ])
41
+ ]),
42
+ default: t(() => [
43
+ a(c(T), s(i.$attrs, {
44
+ type: e.type,
45
+ underline: "never",
46
+ onClick: m
47
+ }), {
48
+ default: t(() => [
49
+ e.icon ? (o(), d("i", {
50
+ key: 0,
51
+ class: f(["d-icon-tip", e.icon])
52
+ }, null, 2)) : (o(), l(c(C), { key: 1 }, {
53
+ default: t(() => [
54
+ a(S)
55
+ ]),
56
+ _: 1
57
+ }))
58
+ ]),
59
+ _: 1
60
+ }, 16, ["type"])
61
+ ]),
62
+ _: 3
63
+ }, 8, ["placement"]));
64
+ }
65
+ }), b = /* @__PURE__ */ E(h, [["__scopeId", "data-v-a3e9d571"]]);
66
+ export {
67
+ b as default
68
+ };
@@ -0,0 +1,18 @@
1
+ import { openBlock as t, createElementBlock as o, createElementVNode as r } from "vue";
2
+ import n from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, l = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ viewBox: "0 0 384 512"
6
+ };
7
+ function s(f, e) {
8
+ return t(), o("svg", l, [...e[0] || (e[0] = [
9
+ r("path", {
10
+ fill: "currentColor",
11
+ d: "M180.7 363.3c6.2 6.2 16.4 6.2 22.6 0l160-160c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L192 329.4 43.3 180.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6l160 160z"
12
+ }, null, -1)
13
+ ])]);
14
+ }
15
+ const _ = /* @__PURE__ */ n(c, [["render", s]]);
16
+ export {
17
+ _ as default
18
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { openBlock as t, createElementBlock as o, createElementVNode as r } from "vue";
2
+ import n from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const c = {}, l = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ viewBox: "0 0 384 512"
6
+ };
7
+ function s(f, e) {
8
+ return t(), o("svg", l, [...e[0] || (e[0] = [
9
+ r("path", {
10
+ fill: "currentColor",
11
+ d: "M180.7 148.7c6.2-6.2 16.4-6.2 22.6 0l160 160c6.2 6.2 6.2 16.4 0 22.6s-16.4 6.2-22.6 0L192 182.6 43.3 331.3c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6l160-160z"
12
+ }, null, -1)
13
+ ])]);
14
+ }
15
+ const p = /* @__PURE__ */ n(c, [["render", s]]);
16
+ export {
17
+ p as default
18
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { openBlock as o, createElementBlock as t, createElementVNode as r } from "vue";
2
+ import c from "../../_virtual/_plugin-vue_export-helper.js";
3
+ const l = {}, n = {
4
+ xmlns: "http://www.w3.org/2000/svg",
5
+ viewBox: "0 0 512 512"
6
+ };
7
+ function m(s, e) {
8
+ return o(), t("svg", n, [...e[0] || (e[0] = [
9
+ r("path", {
10
+ fill: "currentColor",
11
+ d: "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"
12
+ }, null, -1)
13
+ ])]);
14
+ }
15
+ const f = /* @__PURE__ */ c(l, [["render", m]]);
16
+ export {
17
+ f as default
18
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, SVGSVGElement>;
2
+ export default _default;
@@ -1,18 +1,18 @@
1
- import { openBlock as l, createElementBlock as o, createElementVNode as e } from "vue";
2
- import t from "../../../_virtual/_plugin-vue_export-helper.js";
1
+ import { openBlock as l, createElementBlock as t, createElementVNode as e } from "vue";
2
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
3
3
  const r = {}, n = {
4
4
  xmlns: "http://www.w3.org/2000/svg",
5
5
  viewBox: "0 0 448 512"
6
6
  };
7
7
  function s(f, c) {
8
- return l(), o("svg", n, [...c[0] || (c[0] = [
8
+ return l(), t("svg", n, [...c[0] || (c[0] = [
9
9
  e("path", {
10
10
  fill: "currentColor",
11
11
  d: "M160 64c0-17.7 14.3-32 32-32l132.1 0c8.5 0 16.6 3.4 22.6 9.4l59.9 59.9c6 6 9.4 14.1 9.4 22.6L416 320c0 17.7-14.3 32-32 32l-192 0c-17.7 0-32-14.3-32-32l0-256zM192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-196.1c0-17-6.7-33.3-18.7-45.3L369.4 18.7C357.4 6.7 341.1 0 324.1 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-32 0 0 16c0 17.7-14.3 32-32 32L64 480c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l16 0 0-32-16 0z"
12
12
  }, null, -1)
13
13
  ])]);
14
14
  }
15
- const _ = /* @__PURE__ */ t(r, [["render", s]]);
15
+ const p = /* @__PURE__ */ o(r, [["render", s]]);
16
16
  export {
17
- _ as default
17
+ p as default
18
18
  };
@@ -1 +1,3 @@
1
1
  export * from './copy';
2
+ export * from './fold-text';
3
+ export * from './icon-tip';
@@ -1,4 +1,8 @@
1
- import { DCopy as r } from "./copy/index.js";
1
+ import { DCopy as p } from "./copy/index.js";
2
+ import { DFoldText as t } from "./fold-text/index.js";
3
+ import { DIconTip as f } from "./icon-tip/index.js";
2
4
  export {
3
- r as DCopy
5
+ p as DCopy,
6
+ t as DFoldText,
7
+ f as DIconTip
4
8
  };
@@ -0,0 +1,6 @@
1
+ export function setGlobalConfig(config: any): any;
2
+ export function getGlobalConfig(): {
3
+ components: {};
4
+ };
5
+ export function getComponentConfig(componentName: any): any;
6
+ export function getComponentConfigValue(componentName: any, key: any, fallback: any): any;
@@ -0,0 +1,24 @@
1
+ const e = {
2
+ components: {}
3
+ }, f = (o, n = {}) => {
4
+ if (!n || typeof n != "object")
5
+ return o;
6
+ const { components: t } = n;
7
+ return t && typeof t == "object" && Object.assign(o.components, t), o;
8
+ }, r = (o) => f(e, o), g = () => e, s = (o) => {
9
+ if (!o)
10
+ return {};
11
+ const n = e.components?.[o];
12
+ return !n || typeof n != "object" ? {} : n;
13
+ }, u = (o, n, t) => {
14
+ if (!o || !n)
15
+ return t;
16
+ const c = s(o)?.[n];
17
+ return c === void 0 ? t : c;
18
+ };
19
+ export {
20
+ s as getComponentConfig,
21
+ u as getComponentConfigValue,
22
+ g as getGlobalConfig,
23
+ r as setGlobalConfig
24
+ };
package/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { install } from './install.js';
2
2
  export * from './components/index.js';
3
3
  export * from './hooks/index.js';
4
+ export * from './config/index.js';
4
5
  export { install };
5
6
  declare namespace _default {
6
7
  export { install };
package/index.js CHANGED
@@ -1,12 +1,21 @@
1
1
  import { install as o } from "./install.js";
2
2
  import "./components/index.js";
3
3
  import "./hooks/index.js";
4
- import { DCopy as a } from "./components/copy/index.js";
5
- import { useLocale as l } from "./hooks/use-locale/index.js";
4
+ import { getComponentConfig as m, getComponentConfigValue as i, getGlobalConfig as l, setGlobalConfig as x } from "./config/index.js";
5
+ import { DCopy as g } from "./components/copy/index.js";
6
+ import { DFoldText as s } from "./components/fold-text/index.js";
7
+ import { DIconTip as d } from "./components/icon-tip/index.js";
8
+ import { useLocale as D } from "./hooks/use-locale/index.js";
6
9
  const p = { install: o };
7
10
  export {
8
- a as DCopy,
11
+ g as DCopy,
12
+ s as DFoldText,
13
+ d as DIconTip,
9
14
  p as default,
15
+ m as getComponentConfig,
16
+ i as getComponentConfigValue,
17
+ l as getGlobalConfig,
10
18
  o as install,
11
- l as useLocale
19
+ x as setGlobalConfig,
20
+ D as useLocale
12
21
  };
package/install.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import "./locale/index.js";
2
- import * as r from "./components/index.js";
3
- import { initI18n as s } from "./locale/i18n.js";
4
- const c = (o, t = {}) => {
5
- const { locale: n } = t, e = s(n);
6
- o.use(e), Object.values(r).forEach((i) => {
7
- i?.name && o.component(i.name, i);
2
+ import * as m from "./components/index.js";
3
+ import { setGlobalConfig as s } from "./config/index.js";
4
+ import { initI18n as a } from "./locale/i18n.js";
5
+ const b = (i, t = {}) => {
6
+ const { locale: n, config: r } = t, e = a(n);
7
+ i.use(e), s(r), Object.values(m).forEach((o) => {
8
+ o?.name && i.component(o.name, o);
8
9
  });
9
10
  };
10
11
  export {
11
- c as install
12
+ b as install
12
13
  };
@@ -4,6 +4,10 @@ declare namespace _default {
4
4
  namespace copy {
5
5
  let success: string;
6
6
  }
7
+ namespace foldText {
8
+ let expand: string;
9
+ let collapse: string;
10
+ }
7
11
  }
8
12
  }
9
13
  export default _default;
package/locale/lang/en.js CHANGED
@@ -1,11 +1,15 @@
1
- const s = {
1
+ const e = {
2
2
  name: "en",
3
3
  d: {
4
4
  copy: {
5
5
  success: "Copy successful"
6
+ },
7
+ foldText: {
8
+ expand: "Expand",
9
+ collapse: "Collapse"
6
10
  }
7
11
  }
8
12
  };
9
13
  export {
10
- s as default
14
+ e as default
11
15
  };
@@ -4,6 +4,10 @@ declare namespace _default {
4
4
  namespace copy {
5
5
  let success: string;
6
6
  }
7
+ namespace foldText {
8
+ let expand: string;
9
+ let collapse: string;
10
+ }
7
11
  }
8
12
  }
9
13
  export default _default;
@@ -1,11 +1,15 @@
1
- const c = {
1
+ const e = {
2
2
  name: "zh-cn",
3
3
  d: {
4
4
  copy: {
5
5
  success: "复制成功"
6
+ },
7
+ foldText: {
8
+ expand: "展开",
9
+ collapse: "收起"
6
10
  }
7
11
  }
8
12
  };
9
13
  export {
10
- c as default
14
+ e as default
11
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geekplus-digital-ui",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",