@duxweb/dvha-pro 1.0.23 → 1.0.24

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 (152) hide show
  1. package/dist/cjs/components/card/card.cjs +1 -1
  2. package/dist/cjs/components/card/store.cjs +1 -1
  3. package/dist/cjs/components/carousel/carousel.cjs +1 -1
  4. package/dist/cjs/components/crop/imageCrop.cjs +1 -1
  5. package/dist/cjs/components/crop/imageCropModal.cjs +1 -1
  6. package/dist/cjs/components/dashboard/hello.cjs +1 -1
  7. package/dist/cjs/components/dashboard/helloBig.cjs +1 -1
  8. package/dist/cjs/components/dashboard/quick.cjs +1 -1
  9. package/dist/cjs/components/data/dynamicData.cjs +1 -1
  10. package/dist/cjs/components/data/dynamicSelect.cjs +1 -1
  11. package/dist/cjs/components/data/selectModal.cjs +1 -1
  12. package/dist/cjs/components/dialog/dialog.cjs +1 -1
  13. package/dist/cjs/components/drawer/drawer.cjs +1 -1
  14. package/dist/cjs/components/drawer/drawerPage.cjs +1 -1
  15. package/dist/cjs/components/editor/aiEditor.cjs +1 -1
  16. package/dist/cjs/components/form/drawerForm.cjs +1 -1
  17. package/dist/cjs/components/form/formItem.cjs +1 -1
  18. package/dist/cjs/components/form/formLayout.cjs +1 -1
  19. package/dist/cjs/components/form/modalForm.cjs +1 -1
  20. package/dist/cjs/components/form/pageForm.cjs +1 -1
  21. package/dist/cjs/components/form/settingForm.cjs +1 -1
  22. package/dist/cjs/components/icon/iconPicker.cjs +1 -1
  23. package/dist/cjs/components/layout/filter.cjs +1 -1
  24. package/dist/cjs/components/layout/filterLayout.cjs +1 -1
  25. package/dist/cjs/components/layout/list.cjs +1 -1
  26. package/dist/cjs/components/layout/table.cjs +1 -1
  27. package/dist/cjs/components/layout/tools.cjs +1 -1
  28. package/dist/cjs/components/list/card.cjs +1 -1
  29. package/dist/cjs/components/list/list.cjs +1 -1
  30. package/dist/cjs/components/media/media.cjs +1 -1
  31. package/dist/cjs/components/modal/modal.cjs +1 -1
  32. package/dist/cjs/components/modal/modalPage.cjs +1 -1
  33. package/dist/cjs/components/modal/modalTab.cjs +1 -1
  34. package/dist/cjs/components/panel/alert.cjs +1 -1
  35. package/dist/cjs/components/panel/collapse.cjs +1 -1
  36. package/dist/cjs/components/panel/setting.cjs +1 -1
  37. package/dist/cjs/components/select/cardSelect.cjs +1 -1
  38. package/dist/cjs/components/status/listEmpty.cjs +1 -1
  39. package/dist/cjs/components/table/tablePage.cjs +1 -1
  40. package/dist/cjs/components/tree/treeFilter.cjs +1 -1
  41. package/dist/cjs/components/upload/config.cjs +1 -1
  42. package/dist/cjs/components/upload/file.cjs +1 -1
  43. package/dist/cjs/components/upload/image.cjs +1 -1
  44. package/dist/cjs/components/upload/manage/item.cjs +1 -1
  45. package/dist/cjs/components/upload/manager.cjs +1 -1
  46. package/dist/cjs/components/widget/connect.cjs +1 -1
  47. package/dist/cjs/dvha-pro.css +1 -1
  48. package/dist/cjs/hooks/action.cjs +1 -1
  49. package/dist/cjs/hooks/download.cjs +1 -1
  50. package/dist/cjs/hooks/echart.cjs +1 -1
  51. package/dist/cjs/hooks/image.cjs +1 -1
  52. package/dist/cjs/hooks/level.cjs +1 -1
  53. package/dist/cjs/hooks/table/color.cjs +1 -0
  54. package/dist/cjs/hooks/table/column.cjs +1 -1
  55. package/dist/cjs/hooks/table/image.cjs +1 -1
  56. package/dist/cjs/hooks/table/input.cjs +1 -1
  57. package/dist/cjs/hooks/table/map.cjs +1 -1
  58. package/dist/cjs/hooks/table/status.cjs +1 -1
  59. package/dist/cjs/hooks/table/switch.cjs +1 -1
  60. package/dist/cjs/hooks/table.cjs +1 -1
  61. package/dist/cjs/index.cjs +1 -1
  62. package/dist/cjs/pages/layout/global.cjs +1 -1
  63. package/dist/cjs/pages/layout/tab.cjs +1 -1
  64. package/dist/cjs/pages/login.cjs +1 -1
  65. package/dist/cjs/pages/menu/avatar.cjs +1 -1
  66. package/dist/cjs/pages/menu/button.cjs +1 -1
  67. package/dist/cjs/pages/menu/cmd.cjs +1 -1
  68. package/dist/cjs/pages/page.cjs +1 -1
  69. package/dist/cjs/pages/pageStatus.cjs +1 -1
  70. package/dist/cjs/stores/ui.cjs +1 -1
  71. package/dist/cjs/theme/uno.css.cjs +2 -1
  72. package/dist/esm/components/card/card.js +24 -27
  73. package/dist/esm/components/card/store.js +33 -39
  74. package/dist/esm/components/carousel/carousel.js +16 -19
  75. package/dist/esm/components/crop/imageCrop.js +32 -35
  76. package/dist/esm/components/crop/imageCropModal.js +36 -37
  77. package/dist/esm/components/dashboard/hello.js +27 -30
  78. package/dist/esm/components/dashboard/helloBig.js +328 -331
  79. package/dist/esm/components/dashboard/quick.js +30 -33
  80. package/dist/esm/components/data/dynamicData.js +86 -98
  81. package/dist/esm/components/data/dynamicSelect.js +29 -31
  82. package/dist/esm/components/data/selectModal.js +45 -49
  83. package/dist/esm/components/dialog/dialog.js +54 -55
  84. package/dist/esm/components/drawer/drawer.js +23 -23
  85. package/dist/esm/components/drawer/drawerPage.js +39 -49
  86. package/dist/esm/components/editor/aiEditor.js +64 -70
  87. package/dist/esm/components/form/drawerForm.js +48 -48
  88. package/dist/esm/components/form/formItem.js +45 -51
  89. package/dist/esm/components/form/formLayout.js +7 -10
  90. package/dist/esm/components/form/modalForm.js +50 -50
  91. package/dist/esm/components/form/pageForm.js +47 -50
  92. package/dist/esm/components/form/settingForm.js +34 -37
  93. package/dist/esm/components/icon/iconPicker.js +54 -58
  94. package/dist/esm/components/layout/filter.js +13 -16
  95. package/dist/esm/components/layout/filterLayout.js +7 -10
  96. package/dist/esm/components/layout/list.js +299 -326
  97. package/dist/esm/components/layout/table.js +268 -283
  98. package/dist/esm/components/layout/tools.js +38 -41
  99. package/dist/esm/components/list/card.js +35 -38
  100. package/dist/esm/components/list/list.js +15 -18
  101. package/dist/esm/components/media/media.js +35 -36
  102. package/dist/esm/components/modal/modal.js +10 -10
  103. package/dist/esm/components/modal/modalPage.js +32 -36
  104. package/dist/esm/components/modal/modalTab.js +39 -45
  105. package/dist/esm/components/panel/alert.js +19 -22
  106. package/dist/esm/components/panel/collapse.js +33 -36
  107. package/dist/esm/components/panel/setting.js +25 -31
  108. package/dist/esm/components/select/cardSelect.js +27 -28
  109. package/dist/esm/components/status/listEmpty.js +13 -13
  110. package/dist/esm/components/table/tablePage.js +25 -25
  111. package/dist/esm/components/tree/treeFilter.js +137 -147
  112. package/dist/esm/components/upload/config.js +15 -27
  113. package/dist/esm/components/upload/file.js +90 -94
  114. package/dist/esm/components/upload/image.js +116 -123
  115. package/dist/esm/components/upload/manage/item.js +44 -47
  116. package/dist/esm/components/upload/manager.js +190 -207
  117. package/dist/esm/components/widget/connect.js +103 -106
  118. package/dist/esm/dvha-pro.css +1 -1
  119. package/dist/esm/hooks/action.js +115 -131
  120. package/dist/esm/hooks/download.js +55 -56
  121. package/dist/esm/hooks/echart.js +156 -179
  122. package/dist/esm/hooks/image.js +14 -15
  123. package/dist/esm/hooks/level.js +7 -7
  124. package/dist/esm/hooks/table/color.js +19 -0
  125. package/dist/esm/hooks/table/column.js +25 -23
  126. package/dist/esm/hooks/table/image.js +2 -2
  127. package/dist/esm/hooks/table/input.js +28 -28
  128. package/dist/esm/hooks/table/map.js +7 -7
  129. package/dist/esm/hooks/table/status.js +8 -9
  130. package/dist/esm/hooks/table/switch.js +19 -19
  131. package/dist/esm/hooks/table.js +27 -31
  132. package/dist/esm/index.js +167 -165
  133. package/dist/esm/pages/layout/global.js +12 -15
  134. package/dist/esm/pages/layout/tab.js +58 -71
  135. package/dist/esm/pages/login.js +81 -85
  136. package/dist/esm/pages/menu/avatar.js +136 -149
  137. package/dist/esm/pages/menu/button.js +16 -20
  138. package/dist/esm/pages/menu/cmd.js +68 -74
  139. package/dist/esm/pages/page.js +21 -25
  140. package/dist/esm/pages/pageStatus.js +21 -24
  141. package/dist/esm/stores/ui.js +15 -15
  142. package/dist/esm/theme/uno.css.js +2 -1
  143. package/dist/types/components/form/drawerForm.d.ts +6 -0
  144. package/dist/types/components/form/modalForm.d.ts +6 -0
  145. package/dist/types/components/form/pageForm.d.ts +6 -0
  146. package/dist/types/components/form/settingForm.d.ts +6 -0
  147. package/dist/types/components/layout/table.d.ts +9 -0
  148. package/dist/types/components/table/tablePage.d.ts +9 -0
  149. package/dist/types/hooks/table/color.d.ts +13 -0
  150. package/dist/types/hooks/table/column.d.ts +1 -0
  151. package/dist/types/hooks/table/index.d.ts +1 -0
  152. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
- import { defineComponent as c, computed as s, createVNode as e, Transition as p, Fragment as m } from "vue";
2
- import { useI18n as y } from "@duxweb/dvha-core";
3
- import { NButton as u, NDropdown as g } from "naive-ui";
4
- const x = /* @__PURE__ */ c({
1
+ import { defineComponent as d, computed as o, createVNode as e, Transition as c, Fragment as p } from "vue";
2
+ import { useI18n as m } from "@duxweb/dvha-core";
3
+ import { NButton as r, NDropdown as y } from "naive-ui";
4
+ const v = /* @__PURE__ */ d({
5
5
  name: "DuxTableTools",
6
6
  props: {
7
7
  number: {
@@ -19,11 +19,11 @@ const x = /* @__PURE__ */ c({
19
19
  },
20
20
  setup(t) {
21
21
  const {
22
- t: i
23
- } = y(), l = s(() => t.group ? t.group : [t.options]), d = s(() => t.number && t.number > 0);
22
+ t: s
23
+ } = m(), n = o(() => t.group ? t.group : [t.options]), u = o(() => t.number && t.number > 0);
24
24
  return () => e("div", {
25
25
  class: "absolute bottom-0 left-0 right-0 pointer-events-none"
26
- }, [e(p, {
26
+ }, [e(c, {
27
27
  name: "slide-up",
28
28
  appear: !0,
29
29
  enterActiveClass: "transition-all duration-200 ease-out",
@@ -33,46 +33,43 @@ const x = /* @__PURE__ */ c({
33
33
  leaveFromClass: "transform translate-y-0 opacity-100",
34
34
  leaveToClass: "transform translate-y-full opacity-0"
35
35
  }, {
36
- default: () => {
37
- var r;
38
- return [d.value ? e("div", {
39
- class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
40
- }, [(r = l.value) == null ? void 0 : r.map((n, o) => e("div", {
41
- class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
42
- }, [o === l.value.length - 1 && e(m, null, [e("span", {
43
- class: "text-gray-300"
44
- }, [i("components.list.selectedItems", {
45
- num: t.number || 0
46
- })]), e("div", {
47
- class: "w-px h-4 bg-gray-600"
48
- }, null)]), n == null ? void 0 : n.map((a) => e(u, {
36
+ default: () => [u.value ? e("div", {
37
+ class: "flex h-12 px-1 justify-between lg:justify-center gap-2 pointer-events-auto backdrop-blur"
38
+ }, [n.value?.map((i, l) => e("div", {
39
+ class: "h-10 mt-1 bg-gray-800 rounded px-4 py-1 shadow-lg flex items-center gap-4"
40
+ }, [l === n.value.length - 1 && e(p, null, [e("span", {
41
+ class: "text-gray-300"
42
+ }, [s("components.list.selectedItems", {
43
+ num: t.number || 0
44
+ })]), e("div", {
45
+ class: "w-px h-4 bg-gray-600"
46
+ }, null)]), i?.map((a) => e(r, {
47
+ text: !0,
48
+ onClick: a.onClick,
49
+ class: "text-gray-300",
50
+ loading: a.loading,
51
+ disabled: a.disabled,
52
+ type: a.type
53
+ }, {
54
+ default: () => a.label,
55
+ icon: () => e("div", {
56
+ class: a.icon
57
+ }, null)
58
+ })), l === n.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(y, {
59
+ options: t.dropdown
60
+ }, {
61
+ default: () => [e(r, {
49
62
  text: !0,
50
- onClick: a.onClick,
51
- class: "text-gray-300",
52
- loading: a.loading,
53
- disabled: a.disabled,
54
- type: a.type
63
+ class: "text-gray-300"
55
64
  }, {
56
- default: () => a.label,
57
65
  icon: () => e("div", {
58
- class: a.icon
66
+ class: "i-tabler:dots-vertical size-4"
59
67
  }, null)
60
- })), o === l.value.length - 1 && t.dropdown && t.dropdown.length > 0 && e(g, {
61
- options: t.dropdown
62
- }, {
63
- default: () => [e(u, {
64
- text: !0,
65
- class: "text-gray-300"
66
- }, {
67
- icon: () => e("div", {
68
- class: "i-tabler:dots-vertical size-4"
69
- }, null)
70
- })]
71
- })]))]) : null];
72
- }
68
+ })]
69
+ })]))]) : null]
73
70
  })]);
74
71
  }
75
72
  });
76
73
  export {
77
- x as DuxTableTools
74
+ v as DuxTableTools
78
75
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as v, ref as W, computed as l, toRef as S, createVNode as g } from "vue";
1
+ import { defineComponent as v, ref as W, computed as r, toRef as S, createVNode as m } from "vue";
2
2
  import { useElementSize as y, useWindowSize as z, watchDebounced as M } from "@vueuse/core";
3
- import { DuxListLayout as s } from "../layout/list.js";
3
+ import { DuxListLayout as g } from "../layout/list.js";
4
4
  const j = /* @__PURE__ */ v({
5
5
  name: "DuxCardPage",
6
6
  props: {
@@ -25,61 +25,58 @@ const j = /* @__PURE__ */ v({
25
25
  default: ""
26
26
  }
27
27
  },
28
- extends: s,
28
+ extends: g,
29
29
  slots: Object,
30
- setup(e, {
31
- slots: t
30
+ setup(t, {
31
+ slots: a
32
32
  }) {
33
33
  const f = W(), {
34
- width: u
34
+ width: s
35
35
  } = y(f), {
36
36
  width: h
37
- } = z(), p = l(() => e.colWidth || 320), r = (a = 0) => {
38
- const o = a || h.value || 1024, i = e.colWidth || 320, d = e.rows || 4, b = e.maxRows || 10, c = 0.25 * 16 * 3, m = Math.max(1, Math.floor((o + c) / (i + c))), x = Math.floor((1920 + c) / (i + c)) * d, C = Math.ceil(x / m), R = Math.min(Math.max(C, d), b);
39
- return m * R;
40
- }, n = S(e.pagination && typeof e.pagination == "object" ? e.pagination : {
37
+ } = z(), p = r(() => t.colWidth || 320), u = (e = 0) => {
38
+ const i = e || h.value || 1024, c = t.colWidth || 320, n = t.rows || 4, b = t.maxRows || 10, d = 0.25 * 16 * 3, l = Math.max(1, Math.floor((i + d) / (c + d))), x = Math.floor((1920 + d) / (c + d)) * n, C = Math.ceil(x / l), R = Math.min(Math.max(C, n), b);
39
+ return l * R;
40
+ }, o = S(t.pagination && typeof t.pagination == "object" ? t.pagination : {
41
41
  page: 1,
42
- pageSize: r()
42
+ pageSize: u()
43
43
  });
44
- M([u], () => {
45
- if (e.pagination && typeof e.pagination == "object")
44
+ M([s], () => {
45
+ if (t.pagination && typeof t.pagination == "object")
46
46
  return;
47
- const a = r(u.value);
48
- a !== n.value.pageSize && (n.value.pageSize = a, n.value.page = 1);
47
+ const e = u(s.value);
48
+ e !== o.value.pageSize && (o.value.pageSize = e, o.value.page = 1);
49
49
  }, {
50
50
  debounce: 300
51
51
  });
52
- const w = l(() => {
52
+ const w = r(() => {
53
53
  const {
54
- maxRows: a,
55
- rows: o,
56
- colWidth: i,
57
- ...d
58
- } = e;
54
+ maxRows: e,
55
+ rows: i,
56
+ colWidth: c,
57
+ ...n
58
+ } = t;
59
59
  return {
60
- ...d,
61
- pagination: n.value
60
+ ...n,
61
+ pagination: o.value
62
62
  };
63
63
  });
64
- return () => g(s, w.value, {
65
- default: (a) => g("div", {
64
+ return () => m(g, w.value, {
65
+ default: (e) => m("div", {
66
66
  class: "grid gap-3",
67
67
  style: {
68
68
  "grid-template-columns": `repeat(auto-fit, minmax(${p.value}px, 1fr))`
69
69
  }
70
- }, [a.list.value.map((o) => {
71
- var i;
72
- return (i = t == null ? void 0 : t.default) == null ? void 0 : i.call(t, {
73
- item: o,
74
- isChecked: a.isChecked,
75
- toggleChecked: a.toggleChecked
76
- });
77
- })]),
78
- actions: t.actions,
79
- tools: t.tools,
80
- bottom: t.bottom,
81
- sideLeft: t.sideLeft,
82
- sideRight: t.sideRight
70
+ }, [e.list.value.map((i) => a?.default?.({
71
+ item: i,
72
+ isChecked: e.isChecked,
73
+ toggleChecked: e.toggleChecked
74
+ }))]),
75
+ actions: a.actions,
76
+ tools: a.tools,
77
+ bottom: a.bottom,
78
+ sideLeft: a.sideLeft,
79
+ sideRight: a.sideRight
83
80
  });
84
81
  }
85
82
  });
@@ -1,6 +1,6 @@
1
- import { defineComponent as p, computed as r, createVNode as d } from "vue";
2
- import { DuxListLayout as a } from "../layout/list.js";
3
- const u = /* @__PURE__ */ p({
1
+ import { defineComponent as c, computed as n, createVNode as i } from "vue";
2
+ import { DuxListLayout as o } from "../layout/list.js";
3
+ const f = /* @__PURE__ */ c({
4
4
  name: "DuxListPage",
5
5
  props: {
6
6
  sideLeftTitle: {
@@ -12,30 +12,27 @@ const u = /* @__PURE__ */ p({
12
12
  default: ""
13
13
  }
14
14
  },
15
- extends: a,
15
+ extends: o,
16
16
  slots: Object,
17
- setup(o, {
17
+ setup(d, {
18
18
  slots: e
19
19
  }) {
20
- const c = r(() => {
20
+ const s = n(() => {
21
21
  const {
22
22
  ...t
23
- } = o;
23
+ } = d;
24
24
  return {
25
25
  ...t
26
26
  };
27
27
  });
28
- return () => d(a, c.value, {
29
- default: (t) => d("div", {
28
+ return () => i(o, s.value, {
29
+ default: (t) => i("div", {
30
30
  class: "flex flex-col gap-3"
31
- }, [t.list.value.map((n) => {
32
- var i;
33
- return (i = e == null ? void 0 : e.default) == null ? void 0 : i.call(e, {
34
- item: n,
35
- isChecked: t.isChecked,
36
- toggleChecked: t.toggleChecked
37
- });
38
- })]),
31
+ }, [t.list.value.map((a) => e?.default?.({
32
+ item: a,
33
+ isChecked: t.isChecked,
34
+ toggleChecked: t.toggleChecked
35
+ }))]),
39
36
  actions: e.actions,
40
37
  tools: e.tools,
41
38
  bottom: e.bottom,
@@ -45,5 +42,5 @@ const u = /* @__PURE__ */ p({
45
42
  }
46
43
  });
47
44
  export {
48
- u as DuxListPage
45
+ f as DuxListPage
49
46
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as h, computed as y, createVNode as i, Fragment as k, isVNode as A } from "vue";
2
- import b from "clsx";
3
- import { NImageGroup as S } from "naive-ui";
4
- import { DuxAvatar as C } from "../widget/avatar.js";
5
- import { DuxImage as N } from "../widget/image.js";
6
- function j(e) {
7
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !A(e);
1
+ import { defineComponent as u, computed as m, createVNode as t, Fragment as g, isVNode as x } from "vue";
2
+ import f from "clsx";
3
+ import { NImageGroup as o } from "naive-ui";
4
+ import { DuxAvatar as d } from "../widget/avatar.js";
5
+ import { DuxImage as v } from "../widget/image.js";
6
+ function s(e) {
7
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !x(e);
8
8
  }
9
- const I = /* @__PURE__ */ h({
9
+ const S = /* @__PURE__ */ u({
10
10
  name: "DuxMedia",
11
11
  props: {
12
12
  title: String,
@@ -17,63 +17,62 @@ const I = /* @__PURE__ */ h({
17
17
  onClick: Function,
18
18
  imageWidth: {
19
19
  type: Number,
20
- default: 48
20
+ default: 42
21
21
  },
22
22
  imageHeight: {
23
23
  type: Number,
24
- default: 48
24
+ default: 42
25
25
  }
26
26
  },
27
27
  setup(e, {
28
28
  slots: a
29
29
  }) {
30
- const c = y(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), t = y(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
30
+ const l = m(() => Array.isArray(e.image) ? e.image : e.image ? [e.image] : []), c = m(() => Array.isArray(e.desc) ? e.desc : e.desc ? [e.desc] : []);
31
31
  return () => {
32
- var u, d, g, x, f, v, l;
33
32
  let r;
34
- return i("div", {
33
+ return t("div", {
35
34
  class: "flex gap-2 items-center"
36
- }, [(a == null ? void 0 : a.image) && i("div", {
35
+ }, [a?.image && t("div", {
37
36
  class: "flex-none flex items-center gap-2"
38
- }, [(u = a == null ? void 0 : a.image) == null ? void 0 : u.call(a)]), (c == null ? void 0 : c.value.length) > 0 && i("div", {
37
+ }, [a?.image?.()]), (e.avatar || l?.value.length > 0) && t("div", {
39
38
  class: "flex-none flex items-center gap-2"
40
- }, [e.avatar ? i(k, null, [c.value.map((n, m) => i(C, {
41
- key: m,
42
- src: n,
39
+ }, [e.avatar ? t(g, null, [l.value.length > 0 ? l.value.map((i, n) => t(d, {
40
+ key: n,
41
+ src: i,
43
42
  round: !0,
44
43
  size: e.imageWidth
45
- }, null))]) : i(S, null, j(r = c.value.map((n, m) => i(N, {
46
- key: m,
47
- src: n,
44
+ }, null)) : t(d, {
45
+ round: !0,
46
+ size: e.imageWidth
47
+ }, null)]) : t(o, null, s(r = l.value.map((i, n) => t(v, {
48
+ key: n,
49
+ src: i,
48
50
  class: "rounded",
49
51
  objectFit: "cover",
50
52
  width: e.imageWidth,
51
53
  height: e.imageHeight
52
54
  }, null))) ? r : {
53
55
  default: () => [r]
54
- })]), i("div", {
56
+ })]), t("div", {
55
57
  class: "flex-1 flex-col gap-2 min-w-0 truncate items-center"
56
- }, [i("div", {
58
+ }, [t("div", {
57
59
  class: "flex gap-2 items-center"
58
- }, [(d = a.prefix) == null ? void 0 : d.call(a), (e.title || a.default) && i("div", {
59
- onClick: () => {
60
- var n;
61
- return (n = e.onClick) == null ? void 0 : n.call(e);
62
- },
63
- class: b(["transition-all truncate", (e == null ? void 0 : e.onClick) && "hover:text-primary cursor-pointer"])
64
- }, [e.title || ((g = a.default) == null ? void 0 : g.call(a))])]), ((t == null ? void 0 : t.value.length) > 0 || a.desc) && i("div", {
60
+ }, [a.prefix?.(), (e.title || a.default) && t("div", {
61
+ onClick: () => e.onClick?.(),
62
+ class: f(["transition-all truncate", e?.onClick && "hover:text-primary cursor-pointer"])
63
+ }, [e.title || a.default?.()])]), (c?.value.length > 0 || a.desc) && t("div", {
65
64
  class: "text-sm text-muted flex flex-col gap-0"
66
- }, [(f = t == null ? void 0 : (x = t.value).map) == null ? void 0 : f.call(x, (n, m) => i("div", {
67
- key: m,
65
+ }, [c?.value.map?.((i, n) => t("div", {
66
+ key: n,
68
67
  class: "truncate"
69
- }, [n])), (v = a.desc) == null ? void 0 : v.call(a)])]), (e == null ? void 0 : e.extend) && i("div", {
68
+ }, [i])), a.desc?.()])]), e?.extend && t("div", {
70
69
  class: "flex-none flex items-center gap-2 text-gray-7"
71
- }, [e == null ? void 0 : e.extend]), (a == null ? void 0 : a.extend) && i("div", {
70
+ }, [e?.extend]), a?.extend && t("div", {
72
71
  class: "flex-none flex items-center gap-2 text-gray-7"
73
- }, [(l = a == null ? void 0 : a.extend) == null ? void 0 : l.call(a)])]);
72
+ }, [a?.extend?.()])]);
74
73
  };
75
74
  }
76
75
  });
77
76
  export {
78
- I as DuxMedia
77
+ S as DuxMedia
79
78
  };
@@ -1,7 +1,7 @@
1
- import { defineComponent as c, defineAsyncComponent as m, createVNode as t, mergeProps as n, Suspense as s } from "vue";
1
+ import { defineComponent as s, defineAsyncComponent as c, createVNode as t, mergeProps as n, Suspense as m } from "vue";
2
2
  import { useExtendOverlay as f } from "@overlastic/vue";
3
3
  import { NModal as g, NSpin as b } from "naive-ui";
4
- const v = /* @__PURE__ */ c({
4
+ const w = /* @__PURE__ */ s({
5
5
  name: "DuxModal",
6
6
  props: {
7
7
  title: {
@@ -28,17 +28,17 @@ const v = /* @__PURE__ */ c({
28
28
  visible: l,
29
29
  resolve: d,
30
30
  reject: a,
31
- vanish: i
31
+ vanish: r
32
32
  } = f({
33
33
  duration: 1e3
34
- }), o = (e == null ? void 0 : e.componentProps) || {};
34
+ }), o = e?.componentProps || {};
35
35
  o.title = e.title, o.onConfirm = d, o.onClose = a;
36
- const r = typeof e.component == "function" ? m(e.component) : e.component;
36
+ const i = typeof e.component == "function" ? c(e.component) : e.component;
37
37
  return () => t(g, n({
38
38
  displayDirective: "show",
39
39
  show: l.value,
40
40
  onAfterLeave: () => {
41
- i();
41
+ r();
42
42
  },
43
43
  onClose: () => {
44
44
  a();
@@ -60,8 +60,8 @@ const v = /* @__PURE__ */ c({
60
60
  style: {
61
61
  width: typeof e.width == "number" ? `${e.width}px` : e.width
62
62
  }
63
- }, [t(s, null, {
64
- default: () => t(r, n(o, {
63
+ }, [t(m, null, {
64
+ default: () => t(i, n(o, {
65
65
  title: e.title,
66
66
  handle: u
67
67
  }), null),
@@ -77,6 +77,6 @@ const v = /* @__PURE__ */ c({
77
77
  }
78
78
  });
79
79
  export {
80
- v as DuxModal,
81
- v as default
80
+ w as DuxModal,
81
+ w as default
82
82
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as f, ref as l, watch as o, nextTick as u, createVNode as a } from "vue";
2
- import { NButton as c } from "naive-ui";
3
- const x = /* @__PURE__ */ f({
1
+ import { defineComponent as o, ref as r, watch as n, nextTick as i, createVNode as e } from "vue";
2
+ import { NButton as f } from "naive-ui";
3
+ const c = /* @__PURE__ */ o({
4
4
  name: "DuxModalPage",
5
5
  props: {
6
6
  title: {
@@ -20,42 +20,38 @@ const x = /* @__PURE__ */ f({
20
20
  }
21
21
  }
22
22
  },
23
- setup(n, {
24
- slots: e
23
+ setup(t, {
24
+ slots: a
25
25
  }) {
26
- const i = l();
27
- return o(i, (t) => {
28
- t && u(() => {
29
- var d, r;
30
- (r = (d = t.$el) == null ? void 0 : d.focus) == null || r.call(d);
26
+ const l = r();
27
+ return n(l, (d) => {
28
+ d && i(() => {
29
+ d.$el?.focus?.();
31
30
  });
32
- }), () => {
33
- var t, d, r;
34
- return a("div", {
35
- class: "flex flex-col"
36
- }, [a("div", {
37
- class: ["px-4 py-3 border-b border-muted rounded-t flex justify-between items-center bg-white dark:bg-gray-800/50", n.draggable && "cursor-move", n.handle]
38
- }, [a("div", {
39
- class: "text-base font-bold"
40
- }, [n.title]), a("div", {
41
- class: "flex justify-end gap-2"
42
- }, [a(c, {
43
- text: !0,
44
- onClick: n.onClose,
45
- "aria-label": "close",
46
- ref: i
47
- }, {
48
- icon: () => a("div", {
49
- class: "i-tabler:x"
50
- }, null)
51
- })])]), a("div", {
52
- class: "p-4"
53
- }, [(t = e.default) == null ? void 0 : t.call(e)]), ((d = e.footer) == null ? void 0 : d.call(e)) && a("div", {
54
- class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
55
- }, [(r = e.footer) == null ? void 0 : r.call(e)])]);
56
- };
31
+ }), () => e("div", {
32
+ class: "flex flex-col"
33
+ }, [e("div", {
34
+ class: ["px-4 py-3 border-b border-muted rounded-t flex justify-between items-center bg-white dark:bg-gray-800/50", t.draggable && "cursor-move", t.handle]
35
+ }, [e("div", {
36
+ class: "text-base font-bold"
37
+ }, [t.title]), e("div", {
38
+ class: "flex justify-end gap-2"
39
+ }, [e(f, {
40
+ text: !0,
41
+ onClick: t.onClose,
42
+ "aria-label": "close",
43
+ ref: l
44
+ }, {
45
+ icon: () => e("div", {
46
+ class: "i-tabler:x"
47
+ }, null)
48
+ })])]), e("div", {
49
+ class: "p-4"
50
+ }, [a.default?.()]), a.footer?.() && e("div", {
51
+ class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
52
+ }, [a.footer?.()])]);
57
53
  }
58
54
  });
59
55
  export {
60
- x as default
56
+ c as default
61
57
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as n, ref as i, createVNode as a } from "vue";
2
- import { NTabs as f, NButton as u } from "naive-ui";
3
- const o = /* @__PURE__ */ n({
1
+ import { defineComponent as t, ref as d, createVNode as e } from "vue";
2
+ import { NTabs as r, NButton as n } from "naive-ui";
3
+ const f = /* @__PURE__ */ t({
4
4
  name: "ModalTab",
5
5
  props: {
6
6
  draggable: {
@@ -13,7 +13,7 @@ const o = /* @__PURE__ */ n({
13
13
  },
14
14
  handle: {
15
15
  type: Object,
16
- default: () => i()
16
+ default: () => d()
17
17
  },
18
18
  onClose: {
19
19
  type: Function,
@@ -21,50 +21,44 @@ const o = /* @__PURE__ */ n({
21
21
  }
22
22
  }
23
23
  },
24
- setup(d, {
25
- slots: e
24
+ setup(a, {
25
+ slots: l
26
26
  }) {
27
- return () => {
28
- var l, t;
29
- return a("div", {
30
- class: "flex flex-col"
31
- }, [a(f, {
32
- type: "line",
33
- defaultValue: d.defaultTab,
34
- class: "app-modal-tabs",
35
- size: "large",
36
- style: {
37
- "--n-pane-padding-right": "16px",
38
- "--n-pane-padding-left": "16px"
39
- }
27
+ return () => e("div", {
28
+ class: "flex flex-col"
29
+ }, [e(r, {
30
+ type: "line",
31
+ defaultValue: a.defaultTab,
32
+ class: "app-modal-tabs",
33
+ size: "large",
34
+ style: {
35
+ "--n-pane-padding-right": "16px",
36
+ "--n-pane-padding-left": "16px"
37
+ }
38
+ }, {
39
+ default: () => l.default?.(),
40
+ prefix: () => a.draggable ? e("div", {
41
+ class: "pl-4 cursor-move flex items-center",
42
+ ref: a.handle
43
+ }, [e("div", {
44
+ class: "i-tabler:grid-dots size-4"
45
+ }, null)]) : null,
46
+ suffix: () => e("div", {
47
+ class: "pr-4 flex items-center"
48
+ }, [e(n, {
49
+ text: !0,
50
+ onClick: a.onClose,
51
+ "aria-label": "close"
40
52
  }, {
41
- default: () => {
42
- var r;
43
- return (r = e.default) == null ? void 0 : r.call(e);
44
- },
45
- prefix: () => d.draggable ? a("div", {
46
- class: "pl-4 cursor-move flex items-center",
47
- ref: d.handle
48
- }, [a("div", {
49
- class: "i-tabler:grid-dots size-4"
50
- }, null)]) : null,
51
- suffix: () => a("div", {
52
- class: "pr-4 flex items-center"
53
- }, [a(u, {
54
- text: !0,
55
- onClick: d.onClose,
56
- "aria-label": "close"
57
- }, {
58
- icon: () => a("div", {
59
- class: "i-tabler:x size-4"
60
- }, null)
61
- })])
62
- }), ((l = e.footer) == null ? void 0 : l.call(e)) && a("div", {
63
- class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
64
- }, [(t = e.footer) == null ? void 0 : t.call(e)])]);
65
- };
53
+ icon: () => e("div", {
54
+ class: "i-tabler:x size-4"
55
+ }, null)
56
+ })])
57
+ }), l.footer?.() && e("div", {
58
+ class: "flex justify-end gap-2 p-3 rounded-b border-t border-muted bg-muted dark:bg-gray-800/50"
59
+ }, [l.footer?.()])]);
66
60
  }
67
61
  });
68
62
  export {
69
- o as default
63
+ f as default
70
64
  };