@dao-style/core 0.0.1-beta.1 → 0.0.1-beta.10

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 (142) hide show
  1. package/README.md +5 -5
  2. package/dist/components/action-icon/action-icon.vue.d.ts +35 -0
  3. package/dist/components/action-icon/index.d.ts +1 -0
  4. package/dist/components/action-icon/test/action-icon.spec.d.ts +1 -0
  5. package/dist/components/breadcrumb/breadcrumb-item-props.d.ts +16 -0
  6. package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +24 -0
  7. package/dist/components/breadcrumb/breadcrumb-props.d.ts +40 -0
  8. package/dist/components/breadcrumb/breadcrumb.vue.d.ts +64 -0
  9. package/dist/components/breadcrumb/index.d.ts +2 -0
  10. package/dist/components/breadcrumb/test/breadcrumb-item.spec.d.ts +1 -0
  11. package/dist/components/breadcrumb/test/breadcrumb.spec.d.ts +1 -0
  12. package/dist/components/button/button-group.vue.d.ts +2 -0
  13. package/dist/components/button/button-icon.vue.d.ts +20 -0
  14. package/dist/components/button/button.vue.d.ts +75 -0
  15. package/dist/components/button/index.d.ts +2 -0
  16. package/dist/components/button/props.d.ts +40 -0
  17. package/dist/components/button/test/button.spec.d.ts +1 -0
  18. package/dist/components/card/card-item.vue.d.ts +2 -0
  19. package/dist/components/card/card.vue.d.ts +44 -0
  20. package/dist/components/card/index.d.ts +2 -0
  21. package/dist/components/card/test/card.spec.d.ts +1 -0
  22. package/dist/components/card/types.d.ts +1 -0
  23. package/dist/components/checkbox/checkbox-group.vue.d.ts +26 -0
  24. package/dist/components/checkbox/checkbox.vue.d.ts +73 -0
  25. package/dist/components/checkbox/index.d.ts +2 -0
  26. package/dist/components/checkbox/test/checkbox-group.spec.d.ts +1 -0
  27. package/dist/components/checkbox/test/checkbox.spec.d.ts +1 -0
  28. package/dist/components/checkbox/test/utils.d.ts +6 -0
  29. package/dist/components/dialog/dialog-footer.vue.d.ts +33 -0
  30. package/dist/components/dialog/dialog-header.vue.d.ts +24 -0
  31. package/dist/components/dialog/dialog.vue.d.ts +133 -0
  32. package/dist/components/dialog/index.d.ts +3 -0
  33. package/dist/components/dialog/test/dialog-footer.spec.d.ts +1 -0
  34. package/dist/components/dialog/test/dialog-header.spec.d.ts +1 -0
  35. package/dist/components/dialog/test/dialog.spec.d.ts +1 -0
  36. package/dist/components/drawer/drawer.vue.d.ts +84 -0
  37. package/dist/components/drawer/index.d.ts +2 -0
  38. package/dist/components/drawer/props.d.ts +41 -0
  39. package/dist/components/drawer/test/drawer.spec.d.ts +1 -0
  40. package/dist/components/dropdown/dropdown-item.vue.d.ts +36 -0
  41. package/dist/components/dropdown/dropdown-menu.vue.d.ts +2 -0
  42. package/dist/components/dropdown/dropdown.vue.d.ts +51 -0
  43. package/dist/components/dropdown/index.d.ts +3 -0
  44. package/dist/components/dropdown/test/dropdown-item.spec.d.ts +1 -0
  45. package/dist/components/dropdown/test/dropdown-menu.spec.d.ts +1 -0
  46. package/dist/components/dropdown/test/dropdown.spec.d.ts +1 -0
  47. package/dist/components/form/form-group.vue.d.ts +13 -0
  48. package/dist/components/form/form-item.vue.d.ts +51 -0
  49. package/dist/components/form/form.vue.d.ts +22 -0
  50. package/dist/components/form/index.d.ts +3 -0
  51. package/dist/components/form/test/form-group.spec.d.ts +1 -0
  52. package/dist/components/form/test/form-item.spec.d.ts +1 -0
  53. package/dist/components/form/test/form.spec.d.ts +1 -0
  54. package/dist/components/header/header.vue.d.ts +26 -0
  55. package/dist/components/header/index.d.ts +1 -0
  56. package/dist/components/header/props.d.ts +15 -0
  57. package/dist/components/header/test/header.spec.d.ts +1 -0
  58. package/dist/components/icon/icon.vue.d.ts +19 -0
  59. package/dist/components/icon/index.d.ts +2 -0
  60. package/dist/components/icon/svg.d.ts +1 -0
  61. package/dist/components/icon/test/icon.spec.d.ts +1 -0
  62. package/dist/components/index.d.ts +24 -0
  63. package/dist/components/input/index.d.ts +1 -0
  64. package/dist/components/input/input.vue.d.ts +103 -0
  65. package/dist/components/input/props.d.ts +47 -0
  66. package/dist/components/input/test/input.spec.d.ts +1 -0
  67. package/dist/components/message/index.d.ts +1 -0
  68. package/dist/components/message/message.vue.d.ts +53 -0
  69. package/dist/components/message/props.d.ts +25 -0
  70. package/dist/components/message/test/message.spec.d.ts +1 -0
  71. package/dist/components/message/types.d.ts +1 -0
  72. package/dist/components/nav/index.d.ts +4 -0
  73. package/dist/components/nav/nav-head.vue.d.ts +34 -0
  74. package/dist/components/nav/nav-item.vue.d.ts +68 -0
  75. package/dist/components/nav/nav-sub.vue.d.ts +80 -0
  76. package/dist/components/nav/nav.vue.d.ts +33 -0
  77. package/dist/components/nav/props.d.ts +98 -0
  78. package/dist/components/nav/test/nav-head.spec.d.ts +1 -0
  79. package/dist/components/nav/test/nav-item.spec.d.ts +1 -0
  80. package/dist/components/nav/test/nav-sub.spec.d.ts +1 -0
  81. package/dist/components/nav/test/nav.spec.d.ts +1 -0
  82. package/dist/components/nav/types.d.ts +13 -0
  83. package/dist/components/pagination/index.d.ts +1 -0
  84. package/dist/components/pagination/pagination-props.d.ts +39 -0
  85. package/dist/components/pagination/pagination.vue.d.ts +82 -0
  86. package/dist/components/pagination/test/pagination.spec.d.ts +1 -0
  87. package/dist/components/plugin.d.ts +5 -0
  88. package/dist/components/popover/index.d.ts +1 -0
  89. package/dist/components/popover/popover.vue.d.ts +120 -0
  90. package/dist/components/popover/test/popover.spec.d.ts +1 -0
  91. package/dist/components/popper/index.d.ts +1 -0
  92. package/dist/components/popper/popper-content.vue.d.ts +57 -0
  93. package/dist/components/popper/popper-props.d.ts +74 -0
  94. package/dist/components/popper/popper.vue.d.ts +123 -0
  95. package/dist/components/popper/test/popper.spec.d.ts +1 -0
  96. package/dist/components/progress/index.d.ts +1 -0
  97. package/dist/components/progress/progress.vue.d.ts +38 -0
  98. package/dist/components/progress/test/progress.spec.d.ts +1 -0
  99. package/dist/components/radio/index.d.ts +2 -0
  100. package/dist/components/radio/radio-group.vue.d.ts +33 -0
  101. package/dist/components/radio/radio.vue.d.ts +55 -0
  102. package/dist/components/radio/test/radio-group.spec.d.ts +1 -0
  103. package/dist/components/radio/test/radio.spec.d.ts +1 -0
  104. package/dist/components/select/index.d.ts +2 -0
  105. package/dist/components/select/option.vue.d.ts +32 -0
  106. package/dist/components/select/select.vue.d.ts +229 -0
  107. package/dist/components/select/test/option.spec.d.ts +1 -0
  108. package/dist/components/select/test/select.spec.d.ts +1 -0
  109. package/dist/components/select/types.d.ts +22 -0
  110. package/dist/components/switch/index.d.ts +1 -0
  111. package/dist/components/switch/switch.vue.d.ts +62 -0
  112. package/dist/components/switch/test/switch.spec.d.ts +1 -0
  113. package/dist/components/table/index.d.ts +1 -0
  114. package/dist/components/table/resizer.vue.d.ts +33 -0
  115. package/dist/components/table/table-props.d.ts +66 -0
  116. package/dist/components/table/table.vue.d.ts +186 -0
  117. package/dist/components/table/test/table.spec.d.ts +1 -0
  118. package/dist/components/table/type.d.ts +20 -0
  119. package/dist/components/tabs/index.d.ts +3 -0
  120. package/dist/components/tabs/tab-item.vue.d.ts +30 -0
  121. package/dist/components/tabs/tab-nav.vue.d.ts +33 -0
  122. package/dist/components/tabs/tabs.vue.d.ts +43 -0
  123. package/dist/components/tabs/test/tabs.spec.d.ts +1 -0
  124. package/dist/components/tabs/types.d.ts +9 -0
  125. package/dist/components/tooltip/index.d.ts +1 -0
  126. package/dist/components/tooltip/test/tooltip.spec.d.ts +1 -0
  127. package/dist/components/tooltip/tooltip-props.d.ts +60 -0
  128. package/dist/components/tooltip/tooltip.vue.d.ts +120 -0
  129. package/dist/dao-style.es.js +2384 -1068
  130. package/dist/dao-style.umd.js +1 -1
  131. package/dist/index.d.ts +8 -0
  132. package/dist/style.css +1 -1
  133. package/dist/styles/color/alias.json +67 -0
  134. package/dist/styles/color/alias.scss +37 -0
  135. package/dist/styles/color/var.json +146 -0
  136. package/dist/styles/color/var.scss +119 -0
  137. package/dist/utils/assist.d.ts +13 -0
  138. package/dist/utils/constant.d.ts +17 -0
  139. package/dist/utils/copy-content.d.ts +2 -0
  140. package/dist/utils/is-nullish.d.ts +1 -0
  141. package/package.json +17 -16
  142. package/volar.d.ts +48 -0
@@ -17,7 +17,60 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, createBlock, computed, unref, resolveComponent, renderSlot, Fragment, createCommentVNode, ref, inject, watchEffect, mergeProps, createTextVNode, toDisplayString, provide, createVNode, toRefs, withCtx, watch, Transition, withModifiers, normalizeStyle, withKeys, withDirectives, vShow, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, renderList, reactive, vModelText, onUnmounted, h } from "vue";
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, createBlock, unref, resolveComponent, Fragment, createTextVNode, toDisplayString, ref, inject, watchEffect, mergeProps, provide, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withDirectives, vShow, withKeys, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, renderList, reactive, vModelText, onUnmounted, h } from "vue";
21
+ import { isArray, isSet, looseIndexOf, looseEqual, isFunction, NOOP } from "@vue/shared";
22
+ var actionIcon_vue_vue_type_style_index_0_lang = "";
23
+ var _export_sfc = (sfc, props) => {
24
+ for (const [key, val] of props) {
25
+ sfc[key] = val;
26
+ }
27
+ return sfc;
28
+ };
29
+ const _sfc_main$H = defineComponent({
30
+ name: "DaoActionIcon",
31
+ props: {
32
+ name: {
33
+ type: String,
34
+ default: ""
35
+ },
36
+ type: {
37
+ type: String,
38
+ default: "button",
39
+ validator: (value) => ["button", "divider"].includes(value)
40
+ },
41
+ disabled: {
42
+ type: Boolean,
43
+ default: false
44
+ }
45
+ },
46
+ emits: ["click"],
47
+ setup(props, { emit }) {
48
+ const isDivider = props.type === "divider";
49
+ const handleClick = (event) => emit("click", event);
50
+ const realDisabled = computed(() => isDivider || props.disabled);
51
+ return {
52
+ handleClick,
53
+ isDivider,
54
+ realDisabled
55
+ };
56
+ }
57
+ });
58
+ const _hoisted_1$v = ["disabled"];
59
+ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
60
+ return openBlock(), createElementBlock("button", {
61
+ class: normalizeClass(["dao-action-icon", `dao-action-icon--type-${_ctx.type}`]),
62
+ disabled: _ctx.realDisabled,
63
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
64
+ }, [
65
+ renderSlot(_ctx.$slots, "default", {}, () => [
66
+ !_ctx.isDivider ? (openBlock(), createElementBlock("i", {
67
+ key: 0,
68
+ class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
69
+ }, null, 2)) : createCommentVNode("", true)
70
+ ])
71
+ ], 10, _hoisted_1$v);
72
+ }
73
+ var actionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$D]]);
21
74
  const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
22
75
  var buttonProps = {
23
76
  type: {
@@ -56,13 +109,7 @@ var buttonProps = {
56
109
  }
57
110
  };
58
111
  var icon_scss_vue_type_style_index_0_src_lang = "";
59
- var _export_sfc = (sfc, props) => {
60
- for (const [key, val] of props) {
61
- sfc[key] = val;
62
- }
63
- return sfc;
64
- };
65
- const _sfc_main$v = defineComponent({
112
+ const _sfc_main$G = defineComponent({
66
113
  name: "DaoIcon",
67
114
  props: {
68
115
  name: {
@@ -75,23 +122,23 @@ const _sfc_main$v = defineComponent({
75
122
  }
76
123
  }
77
124
  });
78
- const _hoisted_1$m = {
125
+ const _hoisted_1$u = {
79
126
  key: 1,
80
- class: "dao-icon"
127
+ class: "dao-icon dao-svg-icon"
81
128
  };
82
- const _hoisted_2$e = ["xlink:href"];
83
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
129
+ const _hoisted_2$k = ["xlink:href"];
130
+ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
84
131
  return _ctx.useFont ? (openBlock(), createElementBlock("i", {
85
132
  key: 0,
86
133
  class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
87
- }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$m, [
134
+ }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$u, [
88
135
  createElementVNode("use", {
89
136
  "xlink:href": `#${_ctx.name}`
90
- }, null, 8, _hoisted_2$e)
137
+ }, null, 8, _hoisted_2$k)
91
138
  ]));
92
139
  }
93
- var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$r]]);
94
- const _sfc_main$u = /* @__PURE__ */ defineComponent({
140
+ var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$C]]);
141
+ const _sfc_main$F = /* @__PURE__ */ defineComponent({
95
142
  props: {
96
143
  useFont: {
97
144
  type: Boolean,
@@ -120,10 +167,10 @@ const NO_ICON = Symbol(0);
120
167
  const RIGHT_ICON = Symbol(1);
121
168
  const LEFT_ICON = Symbol(2);
122
169
  const BOTH_ICON = Symbol(3);
123
- const _sfc_main$t = defineComponent({
170
+ const _sfc_main$E = defineComponent({
124
171
  name: "DaoButton",
125
172
  components: {
126
- DaoButtonIcon: _sfc_main$u
173
+ DaoButtonIcon: _sfc_main$F
127
174
  },
128
175
  props: buttonProps,
129
176
  emits: ["click"],
@@ -207,12 +254,12 @@ const _sfc_main$t = defineComponent({
207
254
  };
208
255
  }
209
256
  });
210
- const _hoisted_1$l = ["disabled"];
211
- const _hoisted_2$d = {
257
+ const _hoisted_1$t = ["disabled"];
258
+ const _hoisted_2$j = {
212
259
  key: 1,
213
260
  class: "dao-btn__text"
214
261
  };
215
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
262
+ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
216
263
  const _component_dao_button_icon = resolveComponent("dao-button-icon");
217
264
  return openBlock(), createElementBlock("button", {
218
265
  class: normalizeClass(_ctx.classList),
@@ -225,7 +272,7 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
225
272
  "use-font": _ctx.isIconLeftFont,
226
273
  "icon-name": _ctx.realIconLeft
227
274
  }, null, 8, ["use-font", "icon-name"])) : createCommentVNode("", true),
228
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$d, [
275
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$j, [
229
276
  renderSlot(_ctx.$slots, "default")
230
277
  ])) : createCommentVNode("", true),
231
278
  _ctx.realIconRight ? (openBlock(), createBlock(_component_dao_button_icon, {
@@ -234,75 +281,116 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
234
281
  "icon-name": _ctx.realIconRight
235
282
  }, null, 8, ["use-font", "icon-name"])) : createCommentVNode("", true)
236
283
  ], 64))
237
- ], 10, _hoisted_1$l);
284
+ ], 10, _hoisted_1$t);
238
285
  }
239
- var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
286
+ var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$B]]);
240
287
  var buttonGroup_vue_vue_type_style_index_0_lang = "";
241
- const _sfc_main$s = defineComponent({
288
+ const _sfc_main$D = defineComponent({
242
289
  name: "DaoButtonGroup"
243
290
  });
244
- const _hoisted_1$k = { class: "dao-btn-group" };
245
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
246
- return openBlock(), createElementBlock("div", _hoisted_1$k, [
291
+ const _hoisted_1$s = { class: "dao-btn-group" };
292
+ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
293
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
247
294
  renderSlot(_ctx.$slots, "default")
248
295
  ]);
249
296
  }
250
- var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
251
- function looseCompareArrays(a, b) {
252
- if (a.length !== b.length)
253
- return false;
254
- let equal = true;
255
- for (let i = 0; equal && i < a.length; i++) {
256
- equal = looseEqual(a[i], b[i]);
257
- }
258
- return equal;
259
- }
260
- function looseEqual(a, b) {
261
- if (a === b)
262
- return true;
263
- let aValidType = isDate(a);
264
- let bValidType = isDate(b);
265
- if (aValidType || bValidType) {
266
- return aValidType && bValidType ? a.getTime() === b.getTime() : false;
267
- }
268
- aValidType = isArray(a);
269
- bValidType = isArray(b);
270
- if (aValidType || bValidType) {
271
- return aValidType && bValidType ? looseCompareArrays(a, b) : false;
272
- }
273
- aValidType = isObject(a);
274
- bValidType = isObject(b);
275
- if (aValidType || bValidType) {
276
- if (!aValidType || !bValidType) {
277
- return false;
278
- }
279
- const aKeysCount = Object.keys(a).length;
280
- const bKeysCount = Object.keys(b).length;
281
- if (aKeysCount !== bKeysCount) {
282
- return false;
283
- }
284
- for (const key in a) {
285
- const aHasKey = a.hasOwnProperty(key);
286
- const bHasKey = b.hasOwnProperty(key);
287
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
288
- return false;
289
- }
297
+ var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$A]]);
298
+ var card_scss_vue_type_style_index_0_src_lang = "";
299
+ const _sfc_main$C = defineComponent({
300
+ name: "DaoCard",
301
+ components: {
302
+ DaoIcon
303
+ },
304
+ props: {
305
+ type: {
306
+ type: String,
307
+ default: "standard"
308
+ },
309
+ icon: {
310
+ type: String,
311
+ default: void 0
312
+ },
313
+ useFont: {
314
+ type: Boolean,
315
+ default: false
316
+ },
317
+ title: {
318
+ type: String,
319
+ default: void 0
320
+ },
321
+ divider: {
322
+ type: Boolean,
323
+ default: false
290
324
  }
291
325
  }
292
- return String(a) === String(b);
326
+ });
327
+ const _hoisted_1$r = {
328
+ key: 0,
329
+ class: "dao-card-header"
330
+ };
331
+ const _hoisted_2$i = {
332
+ key: 0,
333
+ class: "dao-card-header-item"
334
+ };
335
+ const _hoisted_3$c = { class: "dao-card-header-item dao-card-header-title" };
336
+ const _hoisted_4$b = { class: "dao-card-header-item dao-card-header-action" };
337
+ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
338
+ const _component_dao_icon = resolveComponent("dao-icon");
339
+ return openBlock(), createElementBlock("div", {
340
+ class: normalizeClass(["dao-card", `dao-card--${_ctx.type}`])
341
+ }, [
342
+ _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
343
+ renderSlot(_ctx.$slots, "header", {}, () => [
344
+ renderSlot(_ctx.$slots, "header-prefix"),
345
+ _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
346
+ renderSlot(_ctx.$slots, "icon", {}, () => [
347
+ _ctx.icon ? (openBlock(), createBlock(_component_dao_icon, {
348
+ key: 0,
349
+ class: "dao-card-header-icon",
350
+ name: _ctx.icon,
351
+ "use-font": _ctx.useFont
352
+ }, null, 8, ["name", "use-font"])) : createCommentVNode("", true)
353
+ ])
354
+ ])) : createCommentVNode("", true),
355
+ createElementVNode("div", _hoisted_3$c, [
356
+ renderSlot(_ctx.$slots, "title", {}, () => [
357
+ createTextVNode(toDisplayString(_ctx.title), 1)
358
+ ])
359
+ ]),
360
+ createElementVNode("div", _hoisted_4$b, [
361
+ renderSlot(_ctx.$slots, "action")
362
+ ]),
363
+ renderSlot(_ctx.$slots, "header-suffix")
364
+ ])
365
+ ])) : createCommentVNode("", true),
366
+ createElementVNode("div", {
367
+ class: normalizeClass(["dao-card-container", {
368
+ "dao-card-container-with-footer": !!_ctx.$slots.footer
369
+ }])
370
+ }, [
371
+ createElementVNode("div", {
372
+ class: normalizeClass(["dao-card-item-container", {
373
+ "dao-card-item-container-divider": _ctx.divider
374
+ }])
375
+ }, [
376
+ renderSlot(_ctx.$slots, "default")
377
+ ], 2),
378
+ renderSlot(_ctx.$slots, "footer")
379
+ ], 2)
380
+ ], 2);
293
381
  }
294
- function looseIndexOf(arr, val) {
295
- return arr.findIndex((item) => looseEqual(item, val));
382
+ var card = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$z]]);
383
+ var cardItem_scss_vue_type_style_index_0_src_lang = "";
384
+ const _sfc_main$B = defineComponent({
385
+ name: "DaoCardItem"
386
+ });
387
+ const _hoisted_1$q = { class: "dao-card-item" };
388
+ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
389
+ return openBlock(), createElementBlock("div", _hoisted_1$q, [
390
+ renderSlot(_ctx.$slots, "default")
391
+ ]);
296
392
  }
297
- const NOOP = () => {
298
- };
299
- const isArray = Array.isArray;
300
- const isSet = (val) => toTypeString(val) === "[object Set]";
301
- const isDate = (val) => val instanceof Date;
302
- const isFunction = (val) => typeof val === "function";
303
- const isObject = (val) => val !== null && typeof val === "object";
304
- const objectToString = Object.prototype.toString;
305
- const toTypeString = (value) => objectToString.call(value);
393
+ var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$y]]);
306
394
  function isNullish(val) {
307
395
  return val === null || val === void 0;
308
396
  }
@@ -331,9 +419,12 @@ const checkboxGroupModelValueKey = Symbol("checkboxGroupModelValueKey");
331
419
  const checkboxUpdateGroupModelValueFnKey = Symbol("checkboxUpdateGroupModelValueFnKey");
332
420
  const checkboxGroupChangeFnKey = Symbol("checkboxGroupChangeFnKey");
333
421
  const formLabelWidthKey = Symbol("formLabelWidthKey");
422
+ const navRootKey = Symbol("rootNav");
423
+ const navSubKey = Symbol("subNav");
424
+ const breadcrumbKey = Symbol("breadcrumbKey");
334
425
  var checkbox_vue_vue_type_style_index_0_lang = "";
335
426
  const modelValueAny = [String, Number, Boolean, Symbol, Object, Set, Array];
336
- const _sfc_main$r = defineComponent({
427
+ const _sfc_main$A = defineComponent({
337
428
  name: "DaoCheckbox",
338
429
  props: {
339
430
  modelValue: {
@@ -428,13 +519,13 @@ const _sfc_main$r = defineComponent({
428
519
  const modelValue = currentModelValue.value;
429
520
  const { value } = props;
430
521
  if (isArray(modelValue)) {
431
- const index = looseIndexOf(modelValue, value);
432
- const found = index !== -1;
522
+ const index2 = looseIndexOf(modelValue, value);
523
+ const found = index2 !== -1;
433
524
  if (checked && !found) {
434
525
  emitModelValue(modelValue.concat(value), event);
435
526
  } else if (!checked && found) {
436
527
  const filtered = [...modelValue];
437
- filtered.splice(index, 1);
528
+ filtered.splice(index2, 1);
438
529
  emitModelValue(filtered, event);
439
530
  }
440
531
  } else if (isSet(modelValue)) {
@@ -466,21 +557,21 @@ const _sfc_main$r = defineComponent({
466
557
  }
467
558
  }
468
559
  });
469
- const _hoisted_1$j = ["disabled", "indeterminate", "checked"];
470
- const _hoisted_2$c = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
471
- const _hoisted_3$8 = {
560
+ const _hoisted_1$p = ["disabled", "indeterminate", "checked"];
561
+ const _hoisted_2$h = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
562
+ const _hoisted_3$b = {
472
563
  key: 0,
473
564
  class: "dao-checkbox__label"
474
565
  };
475
- const _hoisted_4$7 = {
566
+ const _hoisted_4$a = {
476
567
  key: 0,
477
568
  class: "dao-checkbox__label-text"
478
569
  };
479
- const _hoisted_5$4 = {
570
+ const _hoisted_5$6 = {
480
571
  key: 1,
481
572
  class: "dao-checkbox__label-helper"
482
573
  };
483
- function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
574
+ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
484
575
  return openBlock(), createElementBlock("label", {
485
576
  class: normalizeClass(_ctx.wrapClasses)
486
577
  }, [
@@ -495,14 +586,14 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
495
586
  }, _ctx.$attrs, {
496
587
  checked: _ctx.currentChecked,
497
588
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
498
- }), null, 16, _hoisted_1$j),
499
- _hoisted_2$c
589
+ }), null, 16, _hoisted_1$p),
590
+ _hoisted_2$h
500
591
  ], 2),
501
- _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$8, [
502
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$7, [
592
+ _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
593
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$a, [
503
594
  renderSlot(_ctx.$slots, "default")
504
595
  ])) : createCommentVNode("", true),
505
- _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$4, [
596
+ _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$6, [
506
597
  renderSlot(_ctx.$slots, "helper", {}, () => [
507
598
  createTextVNode(toDisplayString(_ctx.helper), 1)
508
599
  ])
@@ -510,9 +601,9 @@ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
510
601
  ])) : createCommentVNode("", true)
511
602
  ], 2);
512
603
  }
513
- var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
604
+ var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
514
605
  var checkboxGroup_vue_vue_type_style_index_0_lang = "";
515
- const _sfc_main$q = defineComponent({
606
+ const _sfc_main$z = defineComponent({
516
607
  name: "DaoCheckboxGroup",
517
608
  props: {
518
609
  modelValue: {
@@ -546,18 +637,18 @@ const _sfc_main$q = defineComponent({
546
637
  };
547
638
  }
548
639
  });
549
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
640
+ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
550
641
  return openBlock(), createElementBlock("div", {
551
642
  class: normalizeClass(_ctx.checkboxGroupClasses)
552
643
  }, [
553
644
  renderSlot(_ctx.$slots, "default")
554
645
  ], 2);
555
646
  }
556
- var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
557
- const _sfc_main$p = defineComponent({
647
+ var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
648
+ const _sfc_main$y = defineComponent({
558
649
  name: "DaoDialogHeader",
559
650
  components: {
560
- DaoIcon
651
+ DaoButton
561
652
  },
562
653
  props: {
563
654
  showClose: {
@@ -577,34 +668,28 @@ const _sfc_main$p = defineComponent({
577
668
  };
578
669
  }
579
670
  });
580
- const _hoisted_1$i = { class: "dao-dialog-header" };
581
- function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
582
- const _component_dao_icon = resolveComponent("dao-icon");
583
- return openBlock(), createElementBlock("div", _hoisted_1$i, [
671
+ const _hoisted_1$o = { class: "dao-dialog-header" };
672
+ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
673
+ const _component_dao_button = resolveComponent("dao-button");
674
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
584
675
  renderSlot(_ctx.$slots, "default", {}, () => [
585
- createElementVNode("span", {
586
- class: normalizeClass({ "center": !_ctx.showClose })
587
- }, [
676
+ createElementVNode("span", null, [
588
677
  renderSlot(_ctx.$slots, "title", {}, () => [
589
678
  createTextVNode(toDisplayString(_ctx.title), 1)
590
679
  ])
591
- ], 2),
592
- _ctx.showClose ? (openBlock(), createElementBlock("a", {
680
+ ]),
681
+ _ctx.showClose ? (openBlock(), createBlock(_component_dao_button, {
593
682
  key: 0,
594
- href: "javascript:void(0)",
595
- class: "dao-dialog-header-close-btn",
596
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClose && _ctx.onClose(...args))
597
- }, [
598
- createVNode(_component_dao_icon, {
599
- name: "icon_close-circled",
600
- class: "dao-dialog-header-close-btn__close"
601
- })
602
- ])) : createCommentVNode("", true)
683
+ "use-font": "",
684
+ type: "ghost",
685
+ "icon-left": "icon-close",
686
+ onClick: _ctx.onClose
687
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
603
688
  ])
604
689
  ]);
605
690
  }
606
- var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
607
- const _sfc_main$o = defineComponent({
691
+ var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
692
+ const _sfc_main$x = defineComponent({
608
693
  name: "DaoDialogFooter",
609
694
  components: {
610
695
  DaoButton
@@ -640,13 +725,13 @@ const _sfc_main$o = defineComponent({
640
725
  };
641
726
  }
642
727
  });
643
- const _hoisted_1$h = { class: "dao-dialog-footer" };
644
- function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
728
+ const _hoisted_1$n = { class: "dao-dialog-footer" };
729
+ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
645
730
  const _component_dao_button = resolveComponent("dao-button");
646
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
731
+ return openBlock(), createElementBlock("div", _hoisted_1$n, [
647
732
  renderSlot(_ctx.$slots, "default", {}, () => [
648
733
  createVNode(_component_dao_button, {
649
- type: "secondary",
734
+ type: "ghost",
650
735
  class: "dao-dialog-footer-cancel-btn",
651
736
  onClick: _ctx.onCancel
652
737
  }, {
@@ -668,13 +753,13 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
668
753
  ])
669
754
  ]);
670
755
  }
671
- var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$l]]);
756
+ var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
672
757
  var dialog_scss_vue_type_style_index_0_src_lang = "";
673
758
  const DIALOG_NUM_ATTR = "dao-dialog-num";
674
759
  const DIALOG_MINIMUM_PADDING = "20px";
675
760
  const DIALOG_DEFAULT_PADDING_TOP = "100px";
676
761
  const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
677
- const _sfc_main$n = defineComponent({
762
+ const _sfc_main$w = defineComponent({
678
763
  name: "DaoDialog",
679
764
  components: {
680
765
  DialogHeader,
@@ -752,7 +837,7 @@ const _sfc_main$n = defineComponent({
752
837
  "before-close",
753
838
  "closed"
754
839
  ],
755
- setup(props, { emit, slots }) {
840
+ setup(props, { emit }) {
756
841
  const {
757
842
  modelValue,
758
843
  middle,
@@ -760,7 +845,7 @@ const _sfc_main$n = defineComponent({
760
845
  bottom: bottom2,
761
846
  containerClass,
762
847
  size,
763
- header,
848
+ header: header2,
764
849
  lockScroll,
765
850
  closeOnPressEscape,
766
851
  closeOnClickOutside
@@ -771,8 +856,8 @@ const _sfc_main$n = defineComponent({
771
856
  containerClass.value,
772
857
  `dao-dialog__size-${size.value}`
773
858
  ]);
774
- const showHeader = computed(() => typeof header.value === "boolean" ? header.value : true);
775
- const headerTitle = computed(() => typeof header.value === "string" ? header.value : "");
859
+ const showHeader = computed(() => typeof header2.value === "boolean" ? header2.value : true);
860
+ const headerTitle = computed(() => typeof header2.value === "string" ? header2.value : "");
776
861
  watch(modelValue, (newV) => {
777
862
  emit("change", newV);
778
863
  });
@@ -839,7 +924,6 @@ const _sfc_main$n = defineComponent({
839
924
  computedContainerClass,
840
925
  headerTitle,
841
926
  showHeader,
842
- slots,
843
927
  onBeforeEnter,
844
928
  onAfterEnter,
845
929
  onConfirm,
@@ -850,8 +934,8 @@ const _sfc_main$n = defineComponent({
850
934
  };
851
935
  }
852
936
  });
853
- const _hoisted_1$g = { class: "dao-dialog-body" };
854
- function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
937
+ const _hoisted_1$m = { class: "dao-dialog-body" };
938
+ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
855
939
  const _component_dialog_header = resolveComponent("dialog-header");
856
940
  const _component_dialog_footer = resolveComponent("dialog-footer");
857
941
  return openBlock(), createBlock(Transition, {
@@ -886,7 +970,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
886
970
  ]),
887
971
  _: 3
888
972
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
889
- createElementVNode("div", _hoisted_1$g, [
973
+ createElementVNode("div", _hoisted_1$m, [
890
974
  renderSlot(_ctx.$slots, "default")
891
975
  ]),
892
976
  _ctx.footer ? (openBlock(), createBlock(_component_dialog_footer, {
@@ -908,7 +992,279 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
908
992
  _: 3
909
993
  }, 8, ["onBeforeEnter", "onAfterEnter", "onBeforeLeave", "onAfterLeave"]);
910
994
  }
911
- var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$k]]);
995
+ var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
996
+ const drawerProps = {
997
+ modelValue: {
998
+ type: Boolean,
999
+ default: false
1000
+ },
1001
+ hideHeader: {
1002
+ type: Boolean,
1003
+ default: false
1004
+ },
1005
+ hideFooter: {
1006
+ type: Boolean,
1007
+ default: false
1008
+ },
1009
+ hideMask: {
1010
+ type: Boolean,
1011
+ default: false
1012
+ },
1013
+ hideCloseIcon: {
1014
+ type: Boolean,
1015
+ default: false
1016
+ },
1017
+ title: {
1018
+ type: String,
1019
+ default: ""
1020
+ },
1021
+ size: {
1022
+ type: String,
1023
+ default: "md"
1024
+ },
1025
+ cancelText: {
1026
+ type: String,
1027
+ default: "cancel"
1028
+ },
1029
+ confirmText: {
1030
+ type: String,
1031
+ default: "ok"
1032
+ }
1033
+ };
1034
+ const getFocusElementRange = (elementNode) => {
1035
+ const focusedElementOrigin = document.activeElement;
1036
+ let firstTab = null;
1037
+ let lastTab = null;
1038
+ const focusableElementsString = 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable]';
1039
+ if (elementNode) {
1040
+ const focusableElements = Array.from(elementNode.querySelectorAll(focusableElementsString));
1041
+ firstTab = focusableElements[0];
1042
+ lastTab = focusableElements[focusableElements.length - 1];
1043
+ firstTab == null ? void 0 : firstTab.focus();
1044
+ }
1045
+ return {
1046
+ lastTab,
1047
+ firstTab,
1048
+ focusedElementOrigin
1049
+ };
1050
+ };
1051
+ const trapTabKey = (e, firstTab, lastTab) => {
1052
+ if (e.code === "Tab") {
1053
+ if (e.shiftKey) {
1054
+ if (document.activeElement === firstTab) {
1055
+ e.preventDefault();
1056
+ lastTab.focus();
1057
+ }
1058
+ } else if (document.activeElement === lastTab) {
1059
+ e.preventDefault();
1060
+ firstTab.focus();
1061
+ }
1062
+ }
1063
+ };
1064
+ var drawer_vue_vue_type_style_index_0_lang = "";
1065
+ const _sfc_main$v = defineComponent({
1066
+ name: "DaoDrawer",
1067
+ components: {
1068
+ DaoButton
1069
+ },
1070
+ props: drawerProps,
1071
+ emits: ["close", "confirm"],
1072
+ setup(props, { emit }) {
1073
+ const { modelValue, size } = toRefs(props);
1074
+ const visible = ref(false);
1075
+ const wrapVisible = ref(false);
1076
+ const drawerRef = ref(null);
1077
+ let focusElement = {
1078
+ firstTab: null,
1079
+ lastTab: null,
1080
+ focusedElementOrigin: null
1081
+ };
1082
+ const wrapClassList = computed(() => [
1083
+ "dao-drawer__wrap",
1084
+ {
1085
+ "dao-drawer__wrap--hide": !wrapVisible.value
1086
+ }
1087
+ ]);
1088
+ const contentClassList = computed(() => [
1089
+ "dao-drawer",
1090
+ `dao-drawer-${size.value}`
1091
+ ]);
1092
+ const checkMasksVisible = () => {
1093
+ const masks = document.getElementsByClassName("dao-drawer__mask") || [];
1094
+ return !Array.from(masks).some((v) => v.style.display === "");
1095
+ };
1096
+ const lockWindowScroll = () => {
1097
+ document.body.style.overflow = "hidden";
1098
+ document.body.tabIndex = -1;
1099
+ };
1100
+ const unLockWindowScroll = () => {
1101
+ if (checkMasksVisible()) {
1102
+ document.body.style.overflow = "";
1103
+ }
1104
+ };
1105
+ const close = () => {
1106
+ visible.value = false;
1107
+ emit("close");
1108
+ };
1109
+ const handleWrapClick = (event) => {
1110
+ const { target } = event;
1111
+ const className = target.getAttribute("class");
1112
+ if (className && className.indexOf("dao-drawer__wrap") > -1) {
1113
+ close();
1114
+ }
1115
+ };
1116
+ const handleWrapVisible = (v) => {
1117
+ if (!v) {
1118
+ setTimeout(() => {
1119
+ wrapVisible.value = v;
1120
+ }, 100);
1121
+ } else {
1122
+ wrapVisible.value = v;
1123
+ }
1124
+ };
1125
+ const confirm = () => {
1126
+ visible.value = false;
1127
+ emit("confirm");
1128
+ };
1129
+ const setLastFocusElement = () => {
1130
+ if (focusElement.focusedElementOrigin instanceof HTMLElement) {
1131
+ focusElement.focusedElementOrigin.focus();
1132
+ }
1133
+ };
1134
+ const onHandleKeyDown = (e) => {
1135
+ if (e.code === "Escape") {
1136
+ close();
1137
+ }
1138
+ if (!focusElement.firstTab || !focusElement.lastTab) {
1139
+ return;
1140
+ }
1141
+ trapTabKey(e, focusElement.firstTab, focusElement.lastTab);
1142
+ };
1143
+ const onBeforeEnter = () => {
1144
+ focusElement = getFocusElementRange(drawerRef.value);
1145
+ lockWindowScroll();
1146
+ document.addEventListener("keydown", onHandleKeyDown);
1147
+ };
1148
+ const onAfterLeave = () => {
1149
+ setLastFocusElement();
1150
+ unLockWindowScroll();
1151
+ document.removeEventListener("keydown", onHandleKeyDown);
1152
+ };
1153
+ watch(modelValue, (v) => {
1154
+ visible.value = v;
1155
+ handleWrapVisible(v);
1156
+ }, { immediate: true });
1157
+ return {
1158
+ visible,
1159
+ drawerRef,
1160
+ wrapClassList,
1161
+ contentClassList,
1162
+ close,
1163
+ confirm,
1164
+ handleWrapClick,
1165
+ onBeforeEnter,
1166
+ onAfterLeave
1167
+ };
1168
+ }
1169
+ });
1170
+ const _hoisted_1$l = { class: "dao-drawer__content" };
1171
+ const _hoisted_2$g = {
1172
+ key: 0,
1173
+ class: "dao-drawer__header"
1174
+ };
1175
+ const _hoisted_3$a = { class: "dao-drawer__header-group" };
1176
+ const _hoisted_4$9 = { class: "dao-drawer__body" };
1177
+ const _hoisted_5$5 = {
1178
+ key: 1,
1179
+ class: "dao-drawer__footer"
1180
+ };
1181
+ const _hoisted_6$3 = { class: "dao-drawer__footer-group" };
1182
+ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1183
+ const _component_dao_button = resolveComponent("dao-button");
1184
+ return openBlock(), createElementBlock(Fragment, null, [
1185
+ createVNode(Transition, { name: "fade-in" }, {
1186
+ default: withCtx(() => [
1187
+ !_ctx.hideMask ? withDirectives((openBlock(), createElementBlock("div", {
1188
+ key: 0,
1189
+ class: "dao-drawer__mask",
1190
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.close && _ctx.close(...args)),
1191
+ onKeydown: _cache[1] || (_cache[1] = (...args) => _ctx.close && _ctx.close(...args))
1192
+ }, null, 544)), [
1193
+ [vShow, _ctx.visible]
1194
+ ]) : createCommentVNode("", true)
1195
+ ]),
1196
+ _: 1
1197
+ }),
1198
+ createElementVNode("div", {
1199
+ ref: "drawerRef",
1200
+ class: normalizeClass(_ctx.wrapClassList),
1201
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleWrapClick && _ctx.handleWrapClick(...args)),
1202
+ onKeydown: _cache[3] || (_cache[3] = (...args) => _ctx.handleWrapClick && _ctx.handleWrapClick(...args))
1203
+ }, [
1204
+ createVNode(Transition, {
1205
+ name: "slide-in-right",
1206
+ onAfterEnter: _ctx.onBeforeEnter,
1207
+ onAfterLeave: _ctx.onAfterLeave
1208
+ }, {
1209
+ default: withCtx(() => [
1210
+ withDirectives(createElementVNode("div", {
1211
+ class: normalizeClass(_ctx.contentClassList)
1212
+ }, [
1213
+ createElementVNode("div", _hoisted_1$l, [
1214
+ !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
1215
+ renderSlot(_ctx.$slots, "header", {}, () => [
1216
+ createElementVNode("div", _hoisted_3$a, [
1217
+ createElementVNode("span", null, toDisplayString(_ctx.title), 1),
1218
+ !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_button, {
1219
+ key: 0,
1220
+ size: "sm",
1221
+ type: "ghost",
1222
+ "icon-left": "icon-close",
1223
+ "use-font": "",
1224
+ onClick: _ctx.close
1225
+ }, null, 8, ["onClick"])) : createCommentVNode("", true)
1226
+ ])
1227
+ ])
1228
+ ])) : createCommentVNode("", true),
1229
+ createElementVNode("div", _hoisted_4$9, [
1230
+ renderSlot(_ctx.$slots, "default")
1231
+ ]),
1232
+ !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
1233
+ renderSlot(_ctx.$slots, "footer", {}, () => [
1234
+ createElementVNode("div", _hoisted_6$3, [
1235
+ createVNode(_component_dao_button, {
1236
+ type: "ghost",
1237
+ class: "footer-cancel-btn footer-btn",
1238
+ onClick: _ctx.close
1239
+ }, {
1240
+ default: withCtx(() => [
1241
+ createTextVNode(toDisplayString(_ctx.cancelText), 1)
1242
+ ]),
1243
+ _: 1
1244
+ }, 8, ["onClick"]),
1245
+ createVNode(_component_dao_button, {
1246
+ class: "footer-btn",
1247
+ onClick: _ctx.confirm
1248
+ }, {
1249
+ default: withCtx(() => [
1250
+ createTextVNode(toDisplayString(_ctx.confirmText), 1)
1251
+ ]),
1252
+ _: 1
1253
+ }, 8, ["onClick"])
1254
+ ])
1255
+ ])
1256
+ ])) : createCommentVNode("", true)
1257
+ ])
1258
+ ], 2), [
1259
+ [vShow, _ctx.visible]
1260
+ ])
1261
+ ]),
1262
+ _: 3
1263
+ }, 8, ["onAfterEnter", "onAfterLeave"])
1264
+ ], 34)
1265
+ ], 64);
1266
+ }
1267
+ var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
912
1268
  var top = "top";
913
1269
  var bottom = "bottom";
914
1270
  var right = "right";
@@ -2042,13 +2398,13 @@ function popperGenerator(generatorOptions) {
2042
2398
  state.orderedModifiers.forEach(function(modifier) {
2043
2399
  return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
2044
2400
  });
2045
- for (var index = 0; index < state.orderedModifiers.length; index++) {
2401
+ for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {
2046
2402
  if (state.reset === true) {
2047
2403
  state.reset = false;
2048
- index = -1;
2404
+ index2 = -1;
2049
2405
  continue;
2050
2406
  }
2051
- var _state$orderedModifie = state.orderedModifiers[index], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
2407
+ var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
2052
2408
  if (typeof fn2 === "function") {
2053
2409
  state = fn2({
2054
2410
  state,
@@ -2107,7 +2463,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
2107
2463
  var createPopper = /* @__PURE__ */ popperGenerator({
2108
2464
  defaultModifiers
2109
2465
  });
2110
- const _sfc_main$m = defineComponent({
2466
+ const _sfc_main$u = defineComponent({
2111
2467
  name: "PopperContent",
2112
2468
  props: {
2113
2469
  popperId: {
@@ -2155,29 +2511,29 @@ const _sfc_main$m = defineComponent({
2155
2511
  };
2156
2512
  }
2157
2513
  });
2158
- const _hoisted_1$f = ["id", "aria-hidden", "tabindex"];
2159
- const _hoisted_2$b = {
2514
+ const _hoisted_1$k = ["id", "aria-hidden", "tabindex"];
2515
+ const _hoisted_2$f = {
2160
2516
  ref: "arrow",
2161
2517
  class: "dao-popper-arrow"
2162
2518
  };
2163
- const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("svg", {
2519
+ const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
2164
2520
  class: "dao-popper-arrow-viewbox",
2165
- viewBox: "0 0 30 30"
2521
+ viewBox: "0 0 15 15"
2166
2522
  }, [
2167
2523
  /* @__PURE__ */ createElementVNode("path", {
2168
2524
  class: "pt-popper-arrow-border",
2169
- d: "M8.11 6.302c1.015-.936 1.887-2.922 1.887-4.297v26c0-1.378-.868-3.357-1.888-4.297L.925 17.09c-1.237-1.14-1.233-3.034 0-4.17L8.11 6.302z",
2170
- "fill-opacity": "0.1"
2525
+ d: "M4 7.5L14 -1L14 16Z",
2526
+ opacity: "0.1"
2171
2527
  }),
2172
2528
  /* @__PURE__ */ createElementVNode("path", {
2173
2529
  class: "pt-popper-arrow-fill",
2174
- d: "M9.387 7.036c1.22-1.125 2.21-3.376 2.21-5.03V0v30-2.005c0-1.654-.983-3.9-2.21-5.03l-7.183-6.616c-.81-.746-.802-1.96 0-2.7l7.183-6.614z"
2530
+ d: "M6 7.5L15 -1L15 16Z"
2175
2531
  })
2176
2532
  ], -1);
2177
- const _hoisted_4$6 = [
2178
- _hoisted_3$7
2533
+ const _hoisted_4$8 = [
2534
+ _hoisted_3$9
2179
2535
  ];
2180
- function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
2536
+ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
2181
2537
  return openBlock(), createElementBlock("div", {
2182
2538
  id: _ctx.popperId,
2183
2539
  ref: "popover",
@@ -2196,12 +2552,12 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
2196
2552
  }, [
2197
2553
  renderSlot(_ctx.$slots, "default")
2198
2554
  ], 4),
2199
- withDirectives(createElementVNode("div", _hoisted_2$b, _hoisted_4$6, 512), [
2555
+ withDirectives(createElementVNode("div", _hoisted_2$f, _hoisted_4$8, 512), [
2200
2556
  [vShow, _ctx.visibleArrow]
2201
2557
  ])
2202
- ], 42, _hoisted_1$f);
2558
+ ], 42, _hoisted_1$k);
2203
2559
  }
2204
- var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$j]]);
2560
+ var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
2205
2561
  var PopperProps = {
2206
2562
  modelValue: {
2207
2563
  type: Boolean,
@@ -2291,7 +2647,7 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
2291
2647
  });
2292
2648
  });
2293
2649
  }
2294
- const _sfc_main$l = defineComponent({
2650
+ const _sfc_main$t = defineComponent({
2295
2651
  name: "DaoPopper",
2296
2652
  components: {
2297
2653
  PopperContent
@@ -2481,10 +2837,17 @@ const _sfc_main$l = defineComponent({
2481
2837
  }
2482
2838
  };
2483
2839
  const handleDocumentClick = (e) => {
2840
+ let { target } = e;
2841
+ if (e.composed) {
2842
+ const composedPath = e.composedPath();
2843
+ if (composedPath.length) {
2844
+ [target] = composedPath;
2845
+ }
2846
+ }
2484
2847
  if (!unref(isOpen)) {
2485
2848
  return;
2486
2849
  }
2487
- if (!(_popperNode == null ? void 0 : _popperNode.contains(e.target)) && !(_targetNode == null ? void 0 : _targetNode.contains(e.target))) {
2850
+ if (!(_popperNode == null ? void 0 : _popperNode.contains(target)) && !(_targetNode == null ? void 0 : _targetNode.contains(target))) {
2488
2851
  hide();
2489
2852
  }
2490
2853
  };
@@ -2641,7 +3004,7 @@ const _sfc_main$l = defineComponent({
2641
3004
  };
2642
3005
  }
2643
3006
  });
2644
- function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
3007
+ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
2645
3008
  const _component_popper_content = resolveComponent("popper-content");
2646
3009
  return openBlock(), createElementBlock("div", {
2647
3010
  ref: "reference",
@@ -2683,11 +3046,11 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
2683
3046
  ], 8, ["to", "disabled"]))
2684
3047
  ], 2);
2685
3048
  }
2686
- var DaoPopper = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$i]]);
2687
- const _sfc_main$k = defineComponent({
3049
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
3050
+ const _sfc_main$s = defineComponent({
2688
3051
  name: "DaoDropdown",
2689
3052
  components: {
2690
- DaoPopper
3053
+ DaoPopper: Popper
2691
3054
  },
2692
3055
  props: {
2693
3056
  trigger: {
@@ -2740,8 +3103,8 @@ const _sfc_main$k = defineComponent({
2740
3103
  };
2741
3104
  }
2742
3105
  });
2743
- const _hoisted_1$e = { tabindex: "0" };
2744
- function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3106
+ const _hoisted_1$j = { tabindex: "0" };
3107
+ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
2745
3108
  const _component_dao_popper = resolveComponent("dao-popper");
2746
3109
  return openBlock(), createBlock(_component_dao_popper, {
2747
3110
  ref: "popper",
@@ -2757,27 +3120,27 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
2757
3120
  renderSlot(_ctx.$slots, "menu")
2758
3121
  ]),
2759
3122
  default: withCtx(() => [
2760
- createElementVNode("div", _hoisted_1$e, [
3123
+ createElementVNode("div", _hoisted_1$j, [
2761
3124
  renderSlot(_ctx.$slots, "default")
2762
3125
  ])
2763
3126
  ]),
2764
3127
  _: 3
2765
3128
  }, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
2766
3129
  }
2767
- var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$h]]);
3130
+ var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
2768
3131
  var dropdownMenu_vue_vue_type_style_index_0_lang = "";
2769
- const _sfc_main$j = defineComponent({
3132
+ const _sfc_main$r = defineComponent({
2770
3133
  name: "DaoDropdownMenu"
2771
3134
  });
2772
- const _hoisted_1$d = { class: "dao-dropdown-menu" };
2773
- function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
2774
- return openBlock(), createElementBlock("ul", _hoisted_1$d, [
3135
+ const _hoisted_1$i = { class: "dao-dropdown-menu" };
3136
+ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
3137
+ return openBlock(), createElementBlock("ul", _hoisted_1$i, [
2775
3138
  renderSlot(_ctx.$slots, "default")
2776
3139
  ]);
2777
3140
  }
2778
- var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$g]]);
3141
+ var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
2779
3142
  var dropdownItem_vue_vue_type_style_index_0_lang = "";
2780
- const _sfc_main$i = defineComponent({
3143
+ const _sfc_main$q = defineComponent({
2781
3144
  name: "DaoDropdownItem",
2782
3145
  props: {
2783
3146
  type: {
@@ -2826,14 +3189,14 @@ const _sfc_main$i = defineComponent({
2826
3189
  };
2827
3190
  }
2828
3191
  });
2829
- function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3192
+ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
2830
3193
  return openBlock(), createElementBlock("li", mergeProps({ class: _ctx.classList }, _ctx.itemAttrs), [
2831
3194
  _ctx.type !== "divider" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
2832
3195
  ], 16);
2833
3196
  }
2834
- var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$f]]);
3197
+ var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
2835
3198
  var form_vue_vue_type_style_index_0_lang = "";
2836
- const _sfc_main$h = defineComponent({
3199
+ const _sfc_main$p = defineComponent({
2837
3200
  name: "DaoForm",
2838
3201
  props: {
2839
3202
  type: {
@@ -2851,7 +3214,7 @@ const _sfc_main$h = defineComponent({
2851
3214
  provide(formLabelWidthKey, labelWidth.value);
2852
3215
  }
2853
3216
  });
2854
- function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
3217
+ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
2855
3218
  return openBlock(), createElementBlock("div", {
2856
3219
  class: normalizeClass([
2857
3220
  "dao-form",
@@ -2871,18 +3234,24 @@ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
2871
3234
  } })
2872
3235
  ], 2);
2873
3236
  }
2874
- var form = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$e]]);
3237
+ var form = /* @__PURE__ */ _export_sfc(_sfc_main$p, [["render", _sfc_render$m]]);
3238
+ var tooltipProps = __spreadProps(__spreadValues({}, PopperProps), {
3239
+ offset: {
3240
+ type: [Number, String],
3241
+ default: 10
3242
+ }
3243
+ });
2875
3244
  var tooltip_scss_vue_type_style_index_0_src_lang = "";
2876
- const _sfc_main$g = defineComponent(__spreadProps(__spreadValues({}, DaoPopper), {
3245
+ const _sfc_main$o = defineComponent(__spreadProps(__spreadValues({}, Popper), {
2877
3246
  name: "DaoTooltip",
2878
- props: PopperProps,
3247
+ props: tooltipProps,
2879
3248
  daoPopperTheme: "dao-tooltip"
2880
3249
  }));
2881
3250
  var formItem_vue_vue_type_style_index_0_lang = "";
2882
- const _sfc_main$f = defineComponent({
3251
+ const _sfc_main$n = defineComponent({
2883
3252
  name: "DaoFormItem",
2884
3253
  components: {
2885
- DaoTooltip: _sfc_main$g
3254
+ DaoTooltip: _sfc_main$o
2886
3255
  },
2887
3256
  props: {
2888
3257
  label: {
@@ -2927,30 +3296,30 @@ const _sfc_main$f = defineComponent({
2927
3296
  };
2928
3297
  }
2929
3298
  });
2930
- const _hoisted_1$c = { class: "dao-form-item" };
2931
- const _hoisted_2$a = {
3299
+ const _hoisted_1$h = { class: "dao-form-item" };
3300
+ const _hoisted_2$e = {
2932
3301
  key: 0,
2933
3302
  class: "dao-form-item__label-icon-wrapper"
2934
3303
  };
2935
- const _hoisted_3$6 = { class: "dao-form-item__label-icon-label" };
2936
- const _hoisted_4$5 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
2937
- function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
3304
+ const _hoisted_3$8 = { class: "dao-form-item__label-icon-label" };
3305
+ const _hoisted_4$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
3306
+ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
2938
3307
  const _component_dao_tooltip = resolveComponent("dao-tooltip");
2939
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
3308
+ return openBlock(), createElementBlock("div", _hoisted_1$h, [
2940
3309
  createElementVNode("div", {
2941
3310
  class: "dao-form-item__label",
2942
3311
  style: normalizeStyle(_ctx.labelStyle)
2943
3312
  }, [
2944
3313
  renderSlot(_ctx.$slots, "label", {}, () => [
2945
3314
  createTextVNode(toDisplayString(!_ctx.iconMessage ? _ctx.label : ""), 1),
2946
- !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
2947
- createElementVNode("span", _hoisted_3$6, toDisplayString(_ctx.label), 1),
3315
+ !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
3316
+ createElementVNode("span", _hoisted_3$8, toDisplayString(_ctx.label), 1),
2948
3317
  createVNode(_component_dao_tooltip, {
2949
3318
  content: _ctx.iconMessage,
2950
3319
  placement: "top"
2951
3320
  }, {
2952
3321
  default: withCtx(() => [
2953
- _hoisted_4$5
3322
+ _hoisted_4$7
2954
3323
  ]),
2955
3324
  _: 1
2956
3325
  }, 8, ["content"])
@@ -2965,9 +3334,9 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
2965
3334
  ], 4)
2966
3335
  ]);
2967
3336
  }
2968
- var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$d]]);
3337
+ var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
2969
3338
  var formGroup_vue_vue_type_style_index_0_lang = "";
2970
- const _sfc_main$e = defineComponent({
3339
+ const _sfc_main$m = defineComponent({
2971
3340
  name: "DaoFormGroup",
2972
3341
  props: {
2973
3342
  title: {
@@ -2976,11 +3345,11 @@ const _sfc_main$e = defineComponent({
2976
3345
  }
2977
3346
  }
2978
3347
  });
2979
- const _hoisted_1$b = { class: "dao-form-group" };
2980
- const _hoisted_2$9 = { class: "dao-form-group__title" };
2981
- function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
2982
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
2983
- createElementVNode("div", _hoisted_2$9, [
3348
+ const _hoisted_1$g = { class: "dao-form-group" };
3349
+ const _hoisted_2$d = { class: "dao-form-group__title" };
3350
+ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3351
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
3352
+ createElementVNode("div", _hoisted_2$d, [
2984
3353
  renderSlot(_ctx.$slots, "title", {}, () => [
2985
3354
  createTextVNode(toDisplayString(_ctx.title), 1)
2986
3355
  ])
@@ -2988,20 +3357,216 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
2988
3357
  renderSlot(_ctx.$slots, "default")
2989
3358
  ]);
2990
3359
  }
2991
- var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$c]]);
3360
+ var formGroup = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$k]]);
3361
+ const headerProps = {
3362
+ type: {
3363
+ type: String,
3364
+ default: "2rd"
3365
+ },
3366
+ title: {
3367
+ type: String,
3368
+ default: ""
3369
+ }
3370
+ };
3371
+ var header_vue_vue_type_style_index_0_lang = "";
3372
+ const _sfc_main$l = defineComponent({
3373
+ name: "DaoHeader",
3374
+ props: headerProps,
3375
+ setup(props, { slots }) {
3376
+ const showInfo = computed(() => ({
3377
+ title: props.type === "3rd" ? false : Boolean(props.title || slots.title),
3378
+ breadcrumb: props.type === "2rd" ? false : slots.breadcrumb
3379
+ }));
3380
+ return {
3381
+ ns: "dao-header",
3382
+ showInfo
3383
+ };
3384
+ }
3385
+ });
3386
+ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
3387
+ return openBlock(), createElementBlock("div", {
3388
+ ref: "header",
3389
+ "aria-label": "Header",
3390
+ class: normalizeClass(_ctx.ns)
3391
+ }, [
3392
+ createElementVNode("div", {
3393
+ class: normalizeClass(_ctx.ns + "__left-container")
3394
+ }, [
3395
+ _ctx.showInfo.title ? (openBlock(), createElementBlock("div", {
3396
+ key: 0,
3397
+ class: normalizeClass(_ctx.ns + "__title")
3398
+ }, [
3399
+ renderSlot(_ctx.$slots, "title", {}, () => [
3400
+ createTextVNode(toDisplayString(_ctx.title), 1)
3401
+ ])
3402
+ ], 2)) : createCommentVNode("", true),
3403
+ _ctx.showInfo.breadcrumb ? (openBlock(), createElementBlock("div", {
3404
+ key: 1,
3405
+ class: normalizeClass(_ctx.ns + "__breadcrumb")
3406
+ }, [
3407
+ renderSlot(_ctx.$slots, "breadcrumb")
3408
+ ], 2)) : createCommentVNode("", true)
3409
+ ], 2),
3410
+ _ctx.$slots.action ? (openBlock(), createElementBlock("div", {
3411
+ key: 0,
3412
+ class: normalizeClass(_ctx.ns + "__action")
3413
+ }, [
3414
+ renderSlot(_ctx.$slots, "action")
3415
+ ], 2)) : createCommentVNode("", true)
3416
+ ], 2);
3417
+ }
3418
+ var header = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["render", _sfc_render$j]]);
3419
+ const breadcrumbProps = {
3420
+ type: {
3421
+ type: String,
3422
+ default: "3rd"
3423
+ },
3424
+ list: {
3425
+ type: Array,
3426
+ default: () => []
3427
+ },
3428
+ separator: {
3429
+ type: String,
3430
+ default: "/"
3431
+ },
3432
+ icon: {
3433
+ type: String,
3434
+ default: ""
3435
+ }
3436
+ };
3437
+ const breadcrumbEmits = {
3438
+ navigate: (to) => to
3439
+ };
3440
+ const breadcrumbItemProps = {
3441
+ label: {
3442
+ type: String
3443
+ },
3444
+ value: {
3445
+ type: String
3446
+ },
3447
+ to: {
3448
+ type: [String, Object]
3449
+ }
3450
+ };
3451
+ const _sfc_main$k = defineComponent({
3452
+ name: "DaoBreadcrumbItem",
3453
+ props: breadcrumbItemProps,
3454
+ setup(props) {
3455
+ const parent = inject(breadcrumbKey, null);
3456
+ const separator = computed(() => {
3457
+ var _a;
3458
+ return (_a = parent == null ? void 0 : parent.props) == null ? void 0 : _a.separator;
3459
+ });
3460
+ const handleClick = () => {
3461
+ const to = props == null ? void 0 : props.to;
3462
+ if (to && (parent == null ? void 0 : parent.emit)) {
3463
+ parent.emit("navigate", to);
3464
+ }
3465
+ };
3466
+ return {
3467
+ ns: "dao-breadcrumb",
3468
+ handleClick,
3469
+ separator
3470
+ };
3471
+ }
3472
+ });
3473
+ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
3474
+ return openBlock(), createElementBlock("span", {
3475
+ class: normalizeClass(_ctx.ns + "__item")
3476
+ }, [
3477
+ createElementVNode("span", {
3478
+ role: "link",
3479
+ class: normalizeClass({ [_ctx.ns + "__link"]: !!_ctx.to }),
3480
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
3481
+ }, [
3482
+ _ctx.label ? (openBlock(), createElementBlock("span", {
3483
+ key: 0,
3484
+ role: "label",
3485
+ class: normalizeClass(_ctx.ns + "__label")
3486
+ }, toDisplayString(_ctx.label), 3)) : createCommentVNode("", true),
3487
+ _ctx.value ? (openBlock(), createElementBlock("span", {
3488
+ key: 1,
3489
+ class: normalizeClass(_ctx.ns + "__value"),
3490
+ role: "value"
3491
+ }, toDisplayString(_ctx.value), 3)) : createCommentVNode("", true),
3492
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
3493
+ key: 2,
3494
+ role: "slot",
3495
+ class: normalizeClass(_ctx.ns + "__slot")
3496
+ }, [
3497
+ renderSlot(_ctx.$slots, "default")
3498
+ ], 2)) : createCommentVNode("", true)
3499
+ ], 2),
3500
+ createElementVNode("span", {
3501
+ class: normalizeClass(_ctx.ns + "__separator")
3502
+ }, toDisplayString(_ctx.separator), 3)
3503
+ ], 2);
3504
+ }
3505
+ var DaoBreadcrumbItem = /* @__PURE__ */ _export_sfc(_sfc_main$k, [["render", _sfc_render$i]]);
3506
+ var breadcrumb_vue_vue_type_style_index_0_lang = "";
3507
+ const _sfc_main$j = defineComponent({
3508
+ name: "DaoBreadcrumb",
3509
+ components: {
3510
+ DaoIcon,
3511
+ DaoBreadcrumbItem
3512
+ },
3513
+ props: breadcrumbProps,
3514
+ emits: breadcrumbEmits,
3515
+ setup(props, { emit }) {
3516
+ provide(breadcrumbKey, { props, emit });
3517
+ return {
3518
+ ns: "dao-breadcrumb"
3519
+ };
3520
+ }
3521
+ });
3522
+ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3523
+ var _a;
3524
+ const _component_dao_icon = resolveComponent("dao-icon");
3525
+ const _component_dao_breadcrumb_item = resolveComponent("dao-breadcrumb-item");
3526
+ return openBlock(), createElementBlock("div", {
3527
+ ref: "breadcrumb",
3528
+ "aria-label": "Breadcrumb",
3529
+ role: "navigation",
3530
+ class: normalizeClass(_ctx.ns)
3531
+ }, [
3532
+ _ctx.$slots.icon || _ctx.icon ? (openBlock(), createElementBlock("span", {
3533
+ key: 0,
3534
+ class: normalizeClass(_ctx.ns + "__icon")
3535
+ }, [
3536
+ renderSlot(_ctx.$slots, "icon", {}, () => [
3537
+ createVNode(_component_dao_icon, {
3538
+ "use-font": "",
3539
+ name: _ctx.icon
3540
+ }, null, 8, ["name"])
3541
+ ])
3542
+ ], 2)) : createCommentVNode("", true),
3543
+ ((_a = _ctx.list) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
3544
+ return openBlock(), createBlock(_component_dao_breadcrumb_item, {
3545
+ key: index2,
3546
+ label: item.label,
3547
+ value: item.value,
3548
+ to: item.to
3549
+ }, null, 8, ["label", "value", "to"]);
3550
+ }), 128)) : createCommentVNode("", true),
3551
+ renderSlot(_ctx.$slots, "default")
3552
+ ], 2);
3553
+ }
3554
+ var breadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$h]]);
2992
3555
  if (typeof window !== "undefined") {
2993
3556
  let loadSvg = function() {
2994
- let body = document.body;
2995
- let svgDom = document.getElementById("__svg__icons__dom__1642736420206__");
3557
+ var body = document.body;
3558
+ var svgDom = document.getElementById("__svg__icons__dom__");
2996
3559
  if (!svgDom) {
2997
3560
  svgDom = document.createElementNS("http://www.w3.org/2000/svg", "svg");
2998
3561
  svgDom.style.position = "absolute";
2999
3562
  svgDom.style.width = "0";
3000
3563
  svgDom.style.height = "0";
3001
- svgDom.id = "__svg__icons__dom__1642736420206__";
3564
+ svgDom.id = "__svg__icons__dom__";
3565
+ svgDom.setAttribute("xmlns", "http://www.w3.org/2000/svg");
3566
+ svgDom.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink");
3002
3567
  }
3003
- svgDom.innerHTML = '<symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_arrow-down"><path d="m2.97 10.03 4.5 4.5a.749.749 0 0 0 1.06 0l4.5-4.5a.75.75 0 0 0-1.06-1.06L9 11.939V2a1 1 0 0 0-2 0v9.939L4.03 8.97a.75.75 0 1 0-1.06 1.06Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_arrow-left"><path d="m5.97 2.97-4.5 4.5a.749.749 0 0 0 0 1.06l4.5 4.5a.75.75 0 0 0 1.06-1.06L4.061 9H14a1 1 0 0 0 0-2H4.061L7.03 4.03a.75.75 0 1 0-1.06-1.06Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_arrow-right"><path d="m10.03 13.03 4.5-4.5a.749.749 0 0 0 0-1.06l-4.5-4.5a.75.75 0 1 0-1.06 1.06L11.939 7H2a1 1 0 0 0 0 2h9.939L8.97 11.97a.75.75 0 0 0 1.06 1.06Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_arrow-up"><path d="m13.03 5.97-4.5-4.5a.749.749 0 0 0-1.06 0l-4.5 4.5a.75.75 0 1 0 1.06 1.06L7 4.061V14a1 1 0 0 0 2 0V4.061l2.97 2.969a.75.75 0 0 0 1.06-1.06Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-down"><path d="M8 10.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 8.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-left"><path d="M5.25 8a.747.747 0 0 1 .22-.53l3.5-3.5a.75.75 0 0 1 1.06 1.06L7.061 8l2.97 2.97a.75.75 0 1 1-1.061 1.06l-3.5-3.5A.747.747 0 0 1 5.25 8Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-more"><path d="M13.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L11.939 8 8.97 5.03a.75.75 0 1 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53ZM7.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L5.939 8 2.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-right"><path d="M10.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L8.939 8 5.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-select"><path d="M8 14.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 12.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22ZM8 1.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 3.061 5.03 6.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 1.25Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_caret-up"><path d="M8 5.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 7.061 5.03 10.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 5.25Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_close"><path d="m9.414 8 4.453-4.453a1 1 0 1 0-1.414-1.414L8 6.586 3.547 2.133a1 1 0 0 0-1.414 1.414L6.586 8l-4.453 4.453a1 1 0 1 0 1.414 1.414L8 9.414l4.453 4.453a1 1 0 0 0 1.414-1.414Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_reload"><path d="M15 7V1l-2.055 2.055a7 7 0 1 0 1.649 7.279 1 1 0 0 0-1.885-.668 5 5 0 1 1-1.177-5.2L9 7Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_search"><path d="m15.03 13.97-3.975-3.975a5.772 5.772 0 1 0-1.06 1.06l3.975 3.975a.75.75 0 0 0 1.06-1.06ZM1.75 6.5a4.75 4.75 0 1 1 4.75 4.75A4.75 4.75 0 0 1 1.75 6.5Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_setting"><path d="M15.6 6.75h-2.335a.614.614 0 0 1-.572-.423 4.764 4.764 0 0 0-.192-.461.615.615 0 0 1 .105-.7l1.652-1.656a.4.4 0 0 0 0-.566l-1.2-1.2a.4.4 0 0 0-.566 0l-1.653 1.65a.616.616 0 0 1-.7.1 4.764 4.764 0 0 0-.461-.192.614.614 0 0 1-.423-.572V.4a.4.4 0 0 0-.4-.4H7.15a.4.4 0 0 0-.4.4v2.335a.614.614 0 0 1-.423.572 4.764 4.764 0 0 0-.461.192.616.616 0 0 1-.7-.1L3.51 1.742a.4.4 0 0 0-.566 0l-1.2 1.2a.4.4 0 0 0 0 .566l1.65 1.653a.615.615 0 0 1 .1.705 4.764 4.764 0 0 0-.192.461.614.614 0 0 1-.572.423H.4a.4.4 0 0 0-.4.4v1.7a.4.4 0 0 0 .4.4h2.335a.614.614 0 0 1 .572.423 4.764 4.764 0 0 0 .192.461.615.615 0 0 1-.1.705L1.742 12.49a.4.4 0 0 0 0 .566l1.2 1.2a.4.4 0 0 0 .566 0l1.651-1.652a.615.615 0 0 1 .705-.105 4.764 4.764 0 0 0 .461.192.614.614 0 0 1 .423.572V15.6a.4.4 0 0 0 .4.4h1.7a.4.4 0 0 0 .4-.4v-2.335a.614.614 0 0 1 .423-.572 4.764 4.764 0 0 0 .461-.192.615.615 0 0 1 .705.105l1.651 1.652a.4.4 0 0 0 .566 0l1.2-1.2a.4.4 0 0 0 0-.566l-1.652-1.651a.615.615 0 0 1-.105-.7 4.764 4.764 0 0 0 .192-.461.614.614 0 0 1 .572-.423H15.6a.4.4 0 0 0 .4-.4V7.15a.4.4 0 0 0-.4-.4ZM8 10a2 2 0 1 1 2-2 2 2 0 0 1-2 2Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_trash"><path d="M6 5h1v8H6zM9 5h1v8H9z" /><path d="M13 2h-2V1a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v1H3a1 1 0 0 0-1 1v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3a1 1 0 0 0-1-1ZM6 1h4v1H6Zm6 13H4V4h8Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_triangle-down"><path d="M4 6h8l-4 5-4-5z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_triangle-left"><path d="M10 4v8L5 8l5-4z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_triangle-right"><path d="M6 12V4l5 4-5 4z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_triangle-up"><path d="M12 10H4l4-5 4 5z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_close-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm3.03 9.47a.75.75 0 1 1-1.06 1.06L8 9.061 6.03 11.03a.75.75 0 0 1-1.06-1.06L6.939 8 4.97 6.03a.75.75 0 0 1 1.06-1.06L8 6.939 9.97 4.97a.75.75 0 0 1 1.06 1.06L9.061 8Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_goto"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm0 11V9H4V7h4V4.5L12.4 8Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_info-line"><path d="M9 11V7H6v.7h1V11H6v1h4v-1H9z" /><circle cx="8" cy="5" r="1.1" /><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_minus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H4V7h8Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_more"><circle cx="14" cy="8" r="2" /><circle cx="8" cy="8" r="2" /><circle cx="2" cy="8" r="2" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_plus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H9v3H7V9H4V7h3V4h2v3h3Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_question-line"><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /><path d="M7 11h2v2H7zM8.75 10v-.5c.005-1.335 2.005-1.47 2-3.615A2.719 2.719 0 0 0 8 3.25 2.752 2.752 0 0 0 5.25 6h1.5a1.251 1.251 0 0 1 2.5-.052 1.614 1.614 0 0 1-.727 1.206A2.881 2.881 0 0 0 7.25 9.5v.5Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file-binary"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM4 6v5h3V6Zm2 4H5V7h1ZM11 10V6H9v1h1v3H9v1h3v-1h-1z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file-code"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM6.5 11a.5.5 0 0 1-.354-.146l-2-2a.5.5 0 0 1 0-.708l2-2a.5.5 0 0 1 .708.708L5.207 8.5l1.647 1.646A.5.5 0 0 1 6.5 11ZM9.5 11a.5.5 0 0 1-.354-.854L10.793 8.5 9.146 6.854a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2A.5.5 0 0 1 9.5 11Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file-picture"><circle cx="10" cy="7" r="1" /><path d="M13 14v-2.25l-2-2-1.5 1.5-3-3-3.5 3.5V14h10z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file-text"><path d="M5 6h6v1H5zM5 8h6v1H5zM5 10h6v1H5z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file-zip"><path d="M7 2h1v1H7zM6 3h1v1H6zM7 4h1v1H7zM6 5h1v1H6zM7 6h1v1H7zM8.692 8.692 8 8H7V7H6v1l-.692.692A1.051 1.051 0 0 0 5 9.435V10.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V9.435a1.051 1.051 0 0 0-.308-.743ZM8 10H6V9h2Z" /><path d="M14 4v11H2V1h4v1h1V1h4V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" id="icon_file"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" id="icon_checkmark-symbol"><path d="m2.466 7.29 1.016-1.152 2.515 2.527 5.359-5.634.83.729-6.182 7.734L2.466 7.29z" /></symbol>';
3004
- body.insertBefore(svgDom, body.firstChild);
3568
+ svgDom.innerHTML = '<symbol viewBox="0 0 16 16" id="icon_arrow-down"><path d="m2.97 10.03 4.5 4.5a.749.749 0 0 0 1.06 0l4.5-4.5a.75.75 0 0 0-1.06-1.06L9 11.939V2a1 1 0 0 0-2 0v9.939L4.03 8.97a.75.75 0 1 0-1.06 1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-left"><path d="m5.97 2.97-4.5 4.5a.749.749 0 0 0 0 1.06l4.5 4.5a.75.75 0 0 0 1.06-1.06L4.061 9H14a1 1 0 0 0 0-2H4.061L7.03 4.03a.75.75 0 1 0-1.06-1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-right"><path d="m10.03 13.03 4.5-4.5a.749.749 0 0 0 0-1.06l-4.5-4.5a.75.75 0 1 0-1.06 1.06L11.939 7H2a1 1 0 0 0 0 2h9.939L8.97 11.97a.75.75 0 0 0 1.06 1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_arrow-up"><path d="m13.03 5.97-4.5-4.5a.749.749 0 0 0-1.06 0l-4.5 4.5a.75.75 0 1 0 1.06 1.06L7 4.061V14a1 1 0 0 0 2 0V4.061l2.97 2.969a.75.75 0 0 0 1.06-1.06Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-down"><path d="M8 10.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 8.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-left"><path d="M5.25 8a.747.747 0 0 1 .22-.53l3.5-3.5a.75.75 0 0 1 1.06 1.06L7.061 8l2.97 2.97a.75.75 0 1 1-1.061 1.06l-3.5-3.5A.747.747 0 0 1 5.25 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-more"><path d="M13.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L11.939 8 8.97 5.03a.75.75 0 1 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53ZM7.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L5.939 8 2.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-right"><path d="M10.75 8a.747.747 0 0 1-.22.53l-3.5 3.5a.75.75 0 0 1-1.06-1.06L8.939 8 5.97 5.03a.75.75 0 0 1 1.06-1.06l3.5 3.5a.747.747 0 0 1 .22.53Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-select"><path d="M8 14.75a.747.747 0 0 1-.53-.22l-3.5-3.5a.75.75 0 0 1 1.06-1.06L8 12.939l2.97-2.97a.75.75 0 0 1 1.06 1.061l-3.5 3.5a.747.747 0 0 1-.53.22ZM8 1.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 3.061 5.03 6.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 1.25Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_caret-up"><path d="M8 5.25a.747.747 0 0 1 .53.22l3.5 3.5a.75.75 0 0 1-1.06 1.06L8 7.061 5.03 10.03a.75.75 0 0 1-1.06-1.06l3.5-3.5A.747.747 0 0 1 8 5.25Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_close"><path d="m9.414 8 4.453-4.453a1 1 0 1 0-1.414-1.414L8 6.586 3.547 2.133a1 1 0 0 0-1.414 1.414L6.586 8l-4.453 4.453a1 1 0 1 0 1.414 1.414L8 9.414l4.453 4.453a1 1 0 0 0 1.414-1.414Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_reload"><path d="M15 7V1l-2.055 2.055a7 7 0 1 0 1.649 7.279 1 1 0 0 0-1.885-.668 5 5 0 1 1-1.177-5.2L9 7Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_search"><path d="m15.03 13.97-3.975-3.975a5.772 5.772 0 1 0-1.06 1.06l3.975 3.975a.75.75 0 0 0 1.06-1.06ZM1.75 6.5a4.75 4.75 0 1 1 4.75 4.75A4.75 4.75 0 0 1 1.75 6.5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_setting"><path d="M15.6 6.75h-2.335a.614.614 0 0 1-.572-.423 4.764 4.764 0 0 0-.192-.461.615.615 0 0 1 .105-.7l1.652-1.656a.4.4 0 0 0 0-.566l-1.2-1.2a.4.4 0 0 0-.566 0l-1.653 1.65a.616.616 0 0 1-.7.1 4.764 4.764 0 0 0-.461-.192.614.614 0 0 1-.423-.572V.4a.4.4 0 0 0-.4-.4H7.15a.4.4 0 0 0-.4.4v2.335a.614.614 0 0 1-.423.572 4.764 4.764 0 0 0-.461.192.616.616 0 0 1-.7-.1L3.51 1.742a.4.4 0 0 0-.566 0l-1.2 1.2a.4.4 0 0 0 0 .566l1.65 1.653a.615.615 0 0 1 .1.705 4.764 4.764 0 0 0-.192.461.614.614 0 0 1-.572.423H.4a.4.4 0 0 0-.4.4v1.7a.4.4 0 0 0 .4.4h2.335a.614.614 0 0 1 .572.423 4.764 4.764 0 0 0 .192.461.615.615 0 0 1-.1.705L1.742 12.49a.4.4 0 0 0 0 .566l1.2 1.2a.4.4 0 0 0 .566 0l1.651-1.652a.615.615 0 0 1 .705-.105 4.764 4.764 0 0 0 .461.192.614.614 0 0 1 .423.572V15.6a.4.4 0 0 0 .4.4h1.7a.4.4 0 0 0 .4-.4v-2.335a.614.614 0 0 1 .423-.572 4.764 4.764 0 0 0 .461-.192.615.615 0 0 1 .705.105l1.651 1.652a.4.4 0 0 0 .566 0l1.2-1.2a.4.4 0 0 0 0-.566l-1.652-1.651a.615.615 0 0 1-.105-.7 4.764 4.764 0 0 0 .192-.461.614.614 0 0 1 .572-.423H15.6a.4.4 0 0 0 .4-.4V7.15a.4.4 0 0 0-.4-.4ZM8 10a2 2 0 1 1 2-2 2 2 0 0 1-2 2Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_trash"><path d="M6 5h1v8H6zM9 5h1v8H9z" /><path d="M13 2h-2V1a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v1H3a1 1 0 0 0-1 1v1h1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4h1V3a1 1 0 0 0-1-1ZM6 1h4v1H6Zm6 13H4V4h8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-down"><path d="M4 6h8l-4 5-4-5z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-left"><path d="M10 4v8L5 8l5-4z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-right"><path d="M6 12V4l5 4-5 4z" /></symbol><symbol viewBox="0 0 16 16" id="icon_triangle-up"><path d="M12 10H4l4-5 4 5z" /></symbol><symbol viewBox="0 0 16 16" id="icon_close-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm3.03 9.47a.75.75 0 1 1-1.06 1.06L8 9.061 6.03 11.03a.75.75 0 0 1-1.06-1.06L6.939 8 4.97 6.03a.75.75 0 0 1 1.06-1.06L8 6.939 9.97 4.97a.75.75 0 0 1 1.06 1.06L9.061 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_goto"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Zm0 11V9H4V7h4V4.5L12.4 8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_info-line"><path d="M9 11V7H6v.7h1V11H6v1h4v-1H9z" /><circle cx="8" cy="5" r="1.1" /><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_minus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H4V7h8Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_more"><circle cx="14" cy="8" r="2" /><circle cx="8" cy="8" r="2" /><circle cx="2" cy="8" r="2" /></symbol><symbol viewBox="0 0 16 16" id="icon_plus-circled"><path d="M8 .5A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5ZM12 9H9v3H7V9H4V7h3V4h2v3h3Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_question-line"><path d="M8 1.5A6.5 6.5 0 1 1 1.5 8 6.508 6.508 0 0 1 8 1.5m0-1A7.5 7.5 0 1 0 15.5 8 7.5 7.5 0 0 0 8 .5Z" /><path d="M7 11h2v2H7zM8.75 10v-.5c.005-1.335 2.005-1.47 2-3.615A2.719 2.719 0 0 0 8 3.25 2.752 2.752 0 0 0 5.25 6h1.5a1.251 1.251 0 0 1 2.5-.052 1.614 1.614 0 0 1-.727 1.206A2.881 2.881 0 0 0 7.25 9.5v.5Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-binary"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM4 6v5h3V6Zm2 4H5V7h1ZM11 10V6H9v1h1v3H9v1h3v-1h-1z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-code"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0ZM6.5 11a.5.5 0 0 1-.354-.146l-2-2a.5.5 0 0 1 0-.708l2-2a.5.5 0 0 1 .708.708L5.207 8.5l1.647 1.646A.5.5 0 0 1 6.5 11ZM9.5 11a.5.5 0 0 1-.354-.854L10.793 8.5 9.146 6.854a.5.5 0 0 1 .708-.708l2 2a.5.5 0 0 1 0 .708l-2 2A.5.5 0 0 1 9.5 11Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-picture"><circle cx="10" cy="7" r="1" /><path d="M13 14v-2.25l-2-2-1.5 1.5-3-3-3.5 3.5V14h10z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-text"><path d="M5 6h6v1H5zM5 8h6v1H5zM5 10h6v1H5z" /><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file-zip"><path d="M7 2h1v1H7zM6 3h1v1H6zM7 4h1v1H7zM6 5h1v1H6zM7 6h1v1H7zM8.692 8.692 8 8H7V7H6v1l-.692.692A1.051 1.051 0 0 0 5 9.435V10.5a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5V9.435a1.051 1.051 0 0 0-.308-.743ZM8 10H6V9h2Z" /><path d="M14 4v11H2V1h4v1h1V1h4V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 16 16" id="icon_file"><path d="M14 15H2V1h9V0H2a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4h-1Z" /><path d="M15 3h-2a1 1 0 0 1-1-1V0Z" /></symbol><symbol viewBox="0 0 14 14" id="icon_checkmark-symbol"><path d="m2.466 7.29 1.016-1.152 2.515 2.527 5.359-5.634.83.729-6.182 7.734L2.466 7.29z" /></symbol>';
3569
+ body.insertBefore(svgDom, body.lastChild);
3005
3570
  };
3006
3571
  if (document.readyState === "loading") {
3007
3572
  document.addEventListener("DOMContentLoaded", loadSvg);
@@ -3009,55 +3574,59 @@ if (typeof window !== "undefined") {
3009
3574
  loadSvg();
3010
3575
  }
3011
3576
  }
3577
+ const INPUT_STATUS = ["default", "error", "success", "loading"];
3578
+ const INPUT_TYPES = ["text", "search", "number", "password"];
3579
+ var inputProps = {
3580
+ modelValue: {
3581
+ type: [String, Number],
3582
+ default: ""
3583
+ },
3584
+ type: {
3585
+ type: String,
3586
+ default: "text",
3587
+ validator: (value) => INPUT_TYPES.includes(value)
3588
+ },
3589
+ disabled: {
3590
+ type: Boolean,
3591
+ default: false
3592
+ },
3593
+ size: {
3594
+ type: String,
3595
+ default: "md",
3596
+ validator: (value) => ["md", "sm"].includes(value)
3597
+ },
3598
+ block: {
3599
+ type: Boolean,
3600
+ default: false
3601
+ },
3602
+ status: {
3603
+ type: String,
3604
+ default: "default",
3605
+ validator: (value) => INPUT_STATUS.includes(value)
3606
+ },
3607
+ borderless: {
3608
+ type: Boolean,
3609
+ default: false
3610
+ },
3611
+ append: {
3612
+ type: String,
3613
+ default: ""
3614
+ },
3615
+ prepend: {
3616
+ type: String,
3617
+ default: ""
3618
+ }
3619
+ };
3012
3620
  var input_vue_vue_type_style_index_0_lang = "";
3013
- const _sfc_main$d = defineComponent({
3621
+ const _sfc_main$i = defineComponent({
3014
3622
  name: "DaoInput",
3015
3623
  inheritAttrs: false,
3016
- props: {
3017
- modelValue: {
3018
- type: [String, Number],
3019
- default: ""
3020
- },
3021
- type: {
3022
- type: String,
3023
- default: "text",
3024
- validator: (value) => ["text", "search", "number", "password"].includes(value)
3025
- },
3026
- disabled: {
3027
- type: Boolean,
3028
- default: false
3029
- },
3030
- size: {
3031
- type: String,
3032
- default: "md",
3033
- validator: (value) => ["md", "sm"].includes(value)
3034
- },
3035
- block: {
3036
- type: Boolean,
3037
- default: false
3038
- },
3039
- status: {
3040
- type: String,
3041
- default: "default",
3042
- validator: (value) => ["default", "error", "success", "loading"].includes(value)
3043
- },
3044
- borderless: {
3045
- type: Boolean,
3046
- default: false
3047
- },
3048
- append: {
3049
- type: String,
3050
- default: ""
3051
- },
3052
- prepend: {
3053
- type: String,
3054
- default: ""
3055
- }
3056
- },
3624
+ props: inputProps,
3057
3625
  emits: ["update:modelValue", "input", "change", "blur", "focus", "after-reset"],
3058
3626
  setup(props, { emit, attrs, slots }) {
3059
3627
  const prefixCls = "dao-input";
3060
3628
  const statusMap = {
3629
+ default: "",
3061
3630
  error: "dao-input-error-icon icon-sys-warning",
3062
3631
  success: "dao-input-success-icon icon-sys-success",
3063
3632
  loading: "dao-input-loading-icon icon-input-loading"
@@ -3075,6 +3644,11 @@ const _sfc_main$d = defineComponent({
3075
3644
  const currentValue = ref(modelValue.value);
3076
3645
  const isFocus = ref(false);
3077
3646
  const input2 = ref(null);
3647
+ const isIncreaseDisabled = ref(false);
3648
+ const isDecreaseDisabled = ref(false);
3649
+ const isChangingNumber = ref(false);
3650
+ let counterInterval = null;
3651
+ let counterTimeout = null;
3078
3652
  const clearable = computed(() => type.value === "search" && currentValue.value && !disabled.value);
3079
3653
  const wrapClasses = computed(() => [
3080
3654
  `${prefixCls}-wrapper`,
@@ -3096,10 +3670,18 @@ const _sfc_main$d = defineComponent({
3096
3670
  [`${prefixCls}--with-append`]: !!append.value
3097
3671
  }
3098
3672
  ]);
3673
+ const statusClasses = computed(() => statusMap[status.value]);
3099
3674
  const setCurrentValue = (val) => {
3100
3675
  if (val === currentValue.value) {
3101
3676
  return;
3102
3677
  }
3678
+ if (type.value === "number") {
3679
+ const inputVal = parseFloat(val);
3680
+ const maxVal = parseFloat(attrs.max);
3681
+ const minVal = parseFloat(attrs.min);
3682
+ isIncreaseDisabled.value = inputVal >= maxVal;
3683
+ isDecreaseDisabled.value = inputVal <= minVal;
3684
+ }
3103
3685
  currentValue.value = val;
3104
3686
  };
3105
3687
  const updateModel = (val) => {
@@ -3116,6 +3698,63 @@ const _sfc_main$d = defineComponent({
3116
3698
  emit("after-reset");
3117
3699
  (_a = input2.value) == null ? void 0 : _a.focus();
3118
3700
  };
3701
+ const getInputRealNumber = (val, fixedPointNum) => parseFloat(val.toFixed(fixedPointNum));
3702
+ const changeNumberValue = (changeType) => {
3703
+ var _a;
3704
+ if (type.value !== "number") {
3705
+ return;
3706
+ }
3707
+ const minimum = parseFloat(attrs.min);
3708
+ const maximum = parseFloat(attrs.max);
3709
+ const isMaximum = currentValue.value || currentValue.value === 0 ? maximum <= (currentValue == null ? void 0 : currentValue.value) : false;
3710
+ const isMinimum = currentValue.value || currentValue.value === 0 ? minimum >= (currentValue == null ? void 0 : currentValue.value) : false;
3711
+ if (changeType === "increase" && isMaximum || changeType === "decrease" && isMinimum) {
3712
+ return;
3713
+ }
3714
+ isChangingNumber.value = true;
3715
+ const stepValue = parseFloat(attrs.step) || 1;
3716
+ let stepPointNum = 0;
3717
+ if (stepValue.toString().split(".").length > 1) {
3718
+ stepPointNum = stepValue.toString().split(".")[1].length;
3719
+ }
3720
+ const inputVal = parseFloat(currentValue.value) || 0;
3721
+ const inputStepPointValue = getInputRealNumber(inputVal, stepPointNum);
3722
+ let setValue = inputVal;
3723
+ const changeStepValue = changeType === "increase" ? stepValue : -stepValue;
3724
+ setValue = (inputStepPointValue - inputVal) * changeStepValue > 0 ? inputStepPointValue : inputStepPointValue + changeStepValue;
3725
+ if (setValue >= maximum) {
3726
+ setValue = maximum;
3727
+ }
3728
+ if (setValue <= minimum) {
3729
+ setValue = minimum;
3730
+ }
3731
+ updateModel(getInputRealNumber(setValue, stepPointNum));
3732
+ (_a = input2.value) == null ? void 0 : _a.focus();
3733
+ if (!counterTimeout && !counterInterval) {
3734
+ counterTimeout = window.setTimeout(() => {
3735
+ counterInterval = window.setInterval(() => changeNumberValue(changeType), 100);
3736
+ }, 300);
3737
+ }
3738
+ };
3739
+ const onInputNumberMouseup = (event) => {
3740
+ var _a;
3741
+ if (isChangingNumber.value) {
3742
+ event.preventDefault();
3743
+ }
3744
+ const onEvents = !!counterTimeout || !!counterInterval;
3745
+ if (counterTimeout) {
3746
+ window.clearTimeout(counterTimeout);
3747
+ }
3748
+ if (counterInterval) {
3749
+ window.clearInterval(counterInterval);
3750
+ }
3751
+ counterTimeout = null;
3752
+ counterInterval = null;
3753
+ isChangingNumber.value = false;
3754
+ if (onEvents) {
3755
+ (_a = input2.value) == null ? void 0 : _a.focus();
3756
+ }
3757
+ };
3119
3758
  const inputAttrs = computed(() => {
3120
3759
  const events = {
3121
3760
  onInput(event) {
@@ -3141,6 +3780,12 @@ const _sfc_main$d = defineComponent({
3141
3780
  return __spreadValues(__spreadValues({}, attrs), events);
3142
3781
  });
3143
3782
  watch(modelValue, (newV) => setCurrentValue(newV));
3783
+ onMounted(() => {
3784
+ window.addEventListener("mouseup", onInputNumberMouseup);
3785
+ });
3786
+ onBeforeUnmount(() => {
3787
+ window.removeEventListener("mouseup", onInputNumberMouseup);
3788
+ });
3144
3789
  return {
3145
3790
  currentValue,
3146
3791
  isFocus,
@@ -3151,41 +3796,46 @@ const _sfc_main$d = defineComponent({
3151
3796
  inputAttrs,
3152
3797
  slots,
3153
3798
  resetCurrentVal,
3154
- statusMap
3799
+ statusClasses,
3800
+ changeNumberValue,
3801
+ isIncreaseDisabled,
3802
+ isDecreaseDisabled,
3803
+ isChangingNumber
3155
3804
  };
3156
3805
  }
3157
3806
  });
3158
- const _hoisted_1$a = {
3807
+ const _hoisted_1$f = {
3159
3808
  key: 0,
3160
3809
  class: "dao-input-prepend"
3161
3810
  };
3162
- const _hoisted_2$8 = { class: "dao-input-inner" };
3163
- const _hoisted_3$5 = {
3811
+ const _hoisted_2$c = {
3164
3812
  key: 0,
3165
3813
  class: "dao-input-prefix"
3166
3814
  };
3167
- const _hoisted_4$4 = ["type", "disabled", "value"];
3168
- const _hoisted_5$3 = {
3169
- key: 2,
3815
+ const _hoisted_3$7 = ["type", "disabled", "value"];
3816
+ const _hoisted_4$6 = {
3817
+ key: 4,
3170
3818
  class: "dao-input-suffix"
3171
3819
  };
3172
- const _hoisted_6$2 = {
3820
+ const _hoisted_5$4 = {
3173
3821
  key: 1,
3174
3822
  class: "dao-input-append"
3175
3823
  };
3176
- function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
3824
+ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3177
3825
  return openBlock(), createElementBlock("div", {
3178
3826
  class: normalizeClass(_ctx.wrapClasses)
3179
3827
  }, [
3180
3828
  renderSlot(_ctx.$slots, "prepend"),
3181
- _ctx.prepend && !_ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$a, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true),
3182
- createElementVNode("div", _hoisted_2$8, [
3183
- _ctx.slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
3829
+ _ctx.prepend && !_ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true),
3830
+ createElementVNode("div", {
3831
+ class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
3832
+ }, [
3833
+ _ctx.slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_2$c, [
3184
3834
  renderSlot(_ctx.$slots, "prefix")
3185
3835
  ])) : createCommentVNode("", true),
3186
3836
  _ctx.type === "search" ? (openBlock(), createElementBlock("i", {
3187
3837
  key: 1,
3188
- class: normalizeClass(["dao-input-search-icon", "icon-search", { active: _ctx.isFocus }])
3838
+ class: normalizeClass(["dao-input-search-icon", "icon-search", { "dao-input__active": _ctx.isFocus }])
3189
3839
  }, null, 2)) : createCommentVNode("", true),
3190
3840
  createElementVNode("input", mergeProps({
3191
3841
  ref: "input",
@@ -3195,672 +3845,1522 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
3195
3845
  disabled: _ctx.disabled,
3196
3846
  value: _ctx.currentValue,
3197
3847
  onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
3198
- }), null, 16, _hoisted_4$4),
3848
+ }), null, 16, _hoisted_3$7),
3849
+ _ctx.type === "number" ? (openBlock(), createElementBlock("i", {
3850
+ key: 2,
3851
+ class: normalizeClass([
3852
+ "dao-input-number-icon",
3853
+ "icon-arrow-sharp",
3854
+ "number-icon-up",
3855
+ { "dao-input-number-icon__disabled": _ctx.isIncreaseDisabled }
3856
+ ]),
3857
+ onMousedown: _cache[1] || (_cache[1] = ($event) => _ctx.changeNumberValue("increase"))
3858
+ }, null, 34)) : createCommentVNode("", true),
3859
+ _ctx.type === "number" ? (openBlock(), createElementBlock("i", {
3860
+ key: 3,
3861
+ class: normalizeClass([
3862
+ "dao-input-number-icon",
3863
+ "icon-arrow-sharp",
3864
+ "number-icon-down",
3865
+ { "dao-input-number-icon__disabled": _ctx.isDecreaseDisabled }
3866
+ ]),
3867
+ onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
3868
+ }, null, 34)) : createCommentVNode("", true),
3199
3869
  withDirectives(createElementVNode("i", {
3200
- class: normalizeClass(["dao-input-close-icon", "icon-close", { active: _ctx.isFocus }]),
3201
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.resetCurrentVal())
3870
+ class: normalizeClass(["dao-input-close-icon", "icon-close", { "dao-input__active": _ctx.isFocus }]),
3871
+ onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
3202
3872
  }, null, 2), [
3203
3873
  [vShow, _ctx.clearable]
3204
3874
  ]),
3205
3875
  withDirectives(createElementVNode("i", {
3206
- class: normalizeClass(_ctx.statusMap[_ctx.status])
3876
+ class: normalizeClass(_ctx.statusClasses)
3207
3877
  }, null, 2), [
3208
3878
  [vShow, ["error", "success", "loading"].includes(_ctx.status)]
3209
3879
  ]),
3210
- _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_5$3, [
3880
+ _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
3211
3881
  renderSlot(_ctx.$slots, "suffix")
3212
3882
  ])) : createCommentVNode("", true)
3213
- ]),
3883
+ ], 2),
3214
3884
  renderSlot(_ctx.$slots, "append"),
3215
- _ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_6$2, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
3885
+ _ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
3216
3886
  ], 2);
3217
3887
  }
3218
- var input = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
3219
- var popover_scss_vue_type_style_index_0_src_lang = "";
3220
- const _sfc_main$c = defineComponent(__spreadProps(__spreadValues({}, DaoPopper), {
3221
- name: "DaoPopover",
3222
- props: PopperProps,
3223
- daoPopperTheme: "dao-popover"
3224
- }));
3225
- var progress_vue_vue_type_style_index_0_lang = "";
3226
- const _sfc_main$b = defineComponent({
3227
- name: "DaoProgress",
3228
- props: {
3229
- value: {
3230
- type: Number,
3231
- default: 0,
3232
- validator: (val) => val >= 0 && val <= 100
3233
- },
3234
- bgColor: {
3235
- type: String,
3236
- default: "#ebeef5"
3237
- },
3238
- fill: {
3239
- type: [Array, String],
3240
- default: "#409eff"
3241
- }
3888
+ var input = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$g]]);
3889
+ var MessageProps = {
3890
+ modelValue: {
3891
+ type: Boolean,
3892
+ default: void 0
3242
3893
  },
3243
- setup(props) {
3244
- const { fill } = toRefs(props);
3245
- const type = computed(() => typeof fill.value === "string" ? "line" : "stacked");
3246
- const stackedStyles = computed(() => {
3247
- if (Array.isArray(fill.value)) {
3248
- return fill.value.map((fillColor) => {
3249
- if (typeof fillColor === "string") {
3250
- const stackedLen = fill.value.length;
3251
- return {
3252
- width: `${100 / stackedLen}%`,
3253
- background: fillColor
3254
- };
3255
- }
3256
- if (typeof fillColor === "object") {
3257
- return {
3258
- width: `${fillColor.percent}%`,
3259
- background: fillColor.color
3260
- };
3261
- }
3262
- return {};
3263
- });
3264
- }
3265
- return [];
3266
- });
3267
- const stackedBgColor = computed(() => typeof fill.value === "string" ? fill.value : "");
3268
- return {
3269
- type,
3270
- stackedStyles,
3271
- stackedBgColor
3272
- };
3273
- }
3274
- });
3275
- const _hoisted_1$9 = { class: "dao-progress" };
3276
- const _hoisted_2$7 = {
3277
- key: 1,
3278
- class: "dao-progress__stacked"
3279
- };
3280
- const _hoisted_3$4 = {
3281
- key: 0,
3282
- class: "dao-progress__text"
3283
- };
3284
- function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
3285
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
3286
- createElementVNode("div", {
3287
- class: "dao-progress__inner",
3288
- style: normalizeStyle({ background: _ctx.bgColor })
3289
- }, [
3290
- _ctx.type === "line" ? (openBlock(), createElementBlock("div", {
3291
- key: 0,
3292
- class: "dao-progress__bar",
3293
- style: normalizeStyle({ width: `${_ctx.value}%`, background: _ctx.stackedBgColor })
3294
- }, null, 4)) : (openBlock(), createElementBlock("div", _hoisted_2$7, [
3295
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stackedStyles, (stackedStyle, idx) => {
3296
- return openBlock(), createElementBlock("div", {
3297
- key: idx,
3298
- class: "dao-progress__stacked-item",
3299
- style: normalizeStyle(stackedStyle)
3300
- }, null, 4);
3301
- }), 128))
3302
- ]))
3303
- ], 4),
3304
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$4, [
3305
- renderSlot(_ctx.$slots, "default")
3306
- ])) : createCommentVNode("", true)
3307
- ]);
3308
- }
3309
- var progress = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]]);
3310
- var radio_vue_vue_type_style_index_0_lang = "";
3311
- const _sfc_main$a = defineComponent({
3312
- name: "DaoRadio",
3313
- props: {
3314
- modelValue: {
3315
- type: [String, Number, Boolean],
3316
- default: false
3317
- },
3318
- value: {
3319
- type: [String, Number, Boolean],
3320
- required: true,
3321
- default: ""
3322
- },
3323
- label: {
3324
- type: String,
3325
- default: ""
3326
- },
3327
- disabled: {
3328
- type: Boolean,
3329
- default: false
3330
- },
3331
- name: {
3332
- type: String,
3333
- default: ""
3334
- }
3894
+ type: {
3895
+ type: String,
3896
+ default: "info"
3335
3897
  },
3336
- emits: ["update:modelValue", "change"],
3898
+ title: {
3899
+ type: String,
3900
+ default: ""
3901
+ },
3902
+ content: {
3903
+ type: String,
3904
+ default: ""
3905
+ },
3906
+ isCloseShow: {
3907
+ type: Boolean,
3908
+ default: true
3909
+ }
3910
+ };
3911
+ var message_vue_vue_type_style_index_0_lang = "";
3912
+ const _sfc_main$h = defineComponent({
3913
+ name: "DaoMessage",
3914
+ props: MessageProps,
3915
+ emits: ["update:modelValue", "change", "beforeClose", "closed", "beforeShow", "show"],
3337
3916
  setup(props, { emit }) {
3338
- const { value, disabled } = toRefs(props);
3339
- const radioGroup2 = inject(radioGroupKey, void 0);
3340
- const isGroup = computed(() => !!radioGroup2);
3341
- const modelValue = computed(() => isGroup.value ? radioGroup2 == null ? void 0 : radioGroup2.modelValue : props.modelValue);
3342
- const currentValue = ref(modelValue.value === value.value);
3343
- const wrapClasses = computed(() => [
3344
- "dao-radio-wrapper",
3345
- {
3346
- "dao-radio-wrapper--disabled": disabled.value
3347
- }
3348
- ]);
3349
- const radioClasses = computed(() => [
3350
- "dao-radio",
3351
- {
3352
- "dao-radio--checked": currentValue.value,
3353
- "dao-radio--disabled": disabled.value
3917
+ const typeClass = computed(() => `dao-message--${props.type}`);
3918
+ const _isMessageShow = ref(true);
3919
+ const isMessageShow = computed(() => {
3920
+ if (props.modelValue !== void 0) {
3921
+ return props.modelValue;
3354
3922
  }
3355
- ]);
3356
- const change = (event) => {
3357
- if (disabled.value) {
3923
+ return unref(_isMessageShow);
3924
+ });
3925
+ function closeMessage() {
3926
+ if (!props.isCloseShow) {
3358
3927
  return;
3359
3928
  }
3360
- const { checked } = event.target;
3361
- currentValue.value = checked;
3362
- if (isGroup.value) {
3363
- radioGroup2 == null ? void 0 : radioGroup2.changeEvent(value.value);
3929
+ if (props.modelValue !== void 0) {
3930
+ emit("update:modelValue", false);
3364
3931
  } else {
3365
- emit("update:modelValue", value.value);
3366
- emit("change", value.value);
3932
+ _isMessageShow.value = false;
3367
3933
  }
3368
- };
3369
- const updateValue = () => {
3370
- currentValue.value = modelValue.value === value.value;
3371
- };
3372
- watch(modelValue, () => updateValue());
3934
+ }
3935
+ let isMessageMounted = false;
3936
+ watch(isMessageShow, async (val) => {
3937
+ if (!val && isMessageMounted) {
3938
+ emit("beforeClose");
3939
+ await nextTick();
3940
+ emit("closed");
3941
+ } else if (val) {
3942
+ emit("beforeShow");
3943
+ await nextTick();
3944
+ emit("show");
3945
+ }
3946
+ }, {
3947
+ immediate: true
3948
+ });
3949
+ onMounted(() => {
3950
+ isMessageMounted = true;
3951
+ });
3373
3952
  return {
3374
- currentValue,
3375
- wrapClasses,
3376
- radioClasses,
3377
- change
3953
+ typeClass,
3954
+ closeMessage,
3955
+ isMessageShow
3378
3956
  };
3379
3957
  }
3380
3958
  });
3381
- const _hoisted_1$8 = ["disabled", "name", "checked"];
3382
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
3383
- const _hoisted_3$3 = {
3959
+ const _hoisted_1$e = { class: "dao-message-icon" };
3960
+ const _hoisted_2$b = { class: "dao-message-section" };
3961
+ const _hoisted_3$6 = {
3384
3962
  key: 0,
3385
- class: "dao-radio__label-wrapper"
3963
+ class: "dao-message-title"
3386
3964
  };
3387
- const _hoisted_4$3 = {
3965
+ const _hoisted_4$5 = {
3388
3966
  key: 0,
3389
- class: "dao-radio__label"
3390
- };
3391
- const _hoisted_5$2 = {
3392
- key: 1,
3393
- class: "dao-radio__help"
3967
+ class: "dao-message-content"
3394
3968
  };
3395
- function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
3396
- return openBlock(), createElementBlock("label", {
3397
- class: normalizeClass(_ctx.wrapClasses)
3969
+ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3970
+ return _ctx.isMessageShow ? (openBlock(), createElementBlock("div", {
3971
+ key: 0,
3972
+ class: normalizeClass(["dao-message-outer", _ctx.typeClass]),
3973
+ tabindex: "1",
3974
+ onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers((...args) => _ctx.closeMessage && _ctx.closeMessage(...args), ["self"]), ["esc"]))
3398
3975
  }, [
3399
- createElementVNode("span", {
3400
- class: normalizeClass(_ctx.radioClasses)
3401
- }, [
3402
- createElementVNode("input", {
3403
- type: "radio",
3404
- class: "dao-radio-input",
3405
- disabled: _ctx.disabled,
3406
- name: _ctx.name,
3407
- checked: _ctx.currentValue,
3408
- onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
3409
- }, null, 40, _hoisted_1$8),
3410
- _hoisted_2$6
3411
- ], 2),
3412
- _ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
3413
- _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
3414
- renderSlot(_ctx.$slots, "default", {}, () => [
3415
- createTextVNode(toDisplayString(_ctx.label), 1)
3416
- ])
3417
- ])) : createCommentVNode("", true),
3418
- _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
3419
- renderSlot(_ctx.$slots, "helper")
3420
- ])) : createCommentVNode("", true)
3421
- ])) : createCommentVNode("", true)
3422
- ], 2);
3976
+ renderSlot(_ctx.$slots, "main", {}, () => [
3977
+ createElementVNode("div", {
3978
+ class: normalizeClass(["dao-message-inner", { "dao-message-inner-without-close": !_ctx.isCloseShow }])
3979
+ }, [
3980
+ createElementVNode("div", _hoisted_1$e, [
3981
+ renderSlot(_ctx.$slots, "icon", {}, () => [
3982
+ createElementVNode("i", {
3983
+ class: normalizeClass(`icon-sys-${_ctx.type} dao-message-icon-general dao-message-icon-${_ctx.type}`)
3984
+ }, null, 2)
3985
+ ])
3986
+ ]),
3987
+ createElementVNode("div", _hoisted_2$b, [
3988
+ renderSlot(_ctx.$slots, "section", {}, () => [
3989
+ renderSlot(_ctx.$slots, "title", { className: "dao-message-title" }, () => [
3990
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$6, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
3991
+ ]),
3992
+ renderSlot(_ctx.$slots, "default", { className: "dao-message-content" }, () => [
3993
+ _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$5, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
3994
+ ])
3995
+ ])
3996
+ ]),
3997
+ _ctx.isCloseShow ? (openBlock(), createElementBlock("i", {
3998
+ key: 0,
3999
+ class: "icon-close dao-message-close",
4000
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.closeMessage && _ctx.closeMessage(...args))
4001
+ })) : createCommentVNode("", true)
4002
+ ], 2)
4003
+ ])
4004
+ ], 34)) : createCommentVNode("", true);
3423
4005
  }
3424
- var radio = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]);
3425
- var radioGroup_vue_vue_type_style_index_0_lang = "";
3426
- const _sfc_main$9 = defineComponent({
3427
- name: "DaoRadioGroup",
3428
- props: {
3429
- modelValue: {
3430
- type: [String, Number, Boolean],
3431
- default: false
3432
- },
3433
- vertical: {
3434
- type: Boolean,
3435
- default: true
3436
- }
4006
+ var message = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$f]]);
4007
+ const NAV_TYPES = ["2rd", "3rd"];
4008
+ const navProps = {
4009
+ accordion: {
4010
+ type: Boolean,
4011
+ default: false
3437
4012
  },
3438
- emits: ["update:modelValue", "change"],
3439
- setup(props, { emit }) {
3440
- const { vertical } = toRefs(props);
3441
- const radioGroupClasses = computed(() => [
3442
- "dao-radio-group",
3443
- {
3444
- "dao-radio-group--vertical": vertical.value,
3445
- "dao-radio-group--horizontal": !vertical.value
3446
- }
3447
- ]);
3448
- const changeEvent = (val) => {
3449
- emit("update:modelValue", val);
3450
- emit("change", val);
3451
- };
3452
- provide(radioGroupKey, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
3453
- changeEvent
3454
- })));
3455
- return {
3456
- radioGroupClasses
3457
- };
4013
+ activeOpened: {
4014
+ type: Array,
4015
+ default: () => []
4016
+ },
4017
+ type: {
4018
+ type: String,
4019
+ default: "2rd",
4020
+ validator: (value) => NAV_TYPES.includes(value)
3458
4021
  }
3459
- });
3460
- function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
3461
- return openBlock(), createElementBlock("div", {
3462
- class: normalizeClass(_ctx.radioGroupClasses)
3463
- }, [
3464
- renderSlot(_ctx.$slots, "default")
3465
- ], 2);
3466
- }
3467
- var radioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]);
3468
- var select_vue_vue_type_style_index_0_lang = "";
3469
- const _sfc_main$8 = defineComponent({
3470
- name: "DaoSelect",
3471
- components: {
3472
- DaoPopper
4022
+ };
4023
+ const navHeadProps = {
4024
+ icon: {
4025
+ type: String,
4026
+ default: ""
3473
4027
  },
3474
- props: {
3475
- modelValue: {
3476
- type: [String, Number, Boolean],
3477
- default: void 0
3478
- },
3479
- placeholder: {
3480
- type: String,
3481
- default: ""
3482
- },
3483
- disabled: {
3484
- type: Boolean,
3485
- default: false
3486
- },
3487
- size: {
3488
- type: String,
3489
- default: "md",
3490
- validator: (size) => ["md", "sm"].includes(size)
3491
- },
3492
- optionsPlaceholder: {
3493
- type: String,
3494
- default: "\u65E0\u6570\u636E"
3495
- },
3496
- search: {
3497
- type: [Boolean, Function],
3498
- default: false
3499
- },
3500
- searchPlaceholder: {
3501
- type: String,
3502
- default: "\u641C\u7D22"
3503
- },
3504
- menuClass: {
3505
- type: String,
3506
- default: ""
3507
- },
3508
- appendTo: {
3509
- type: [String, Boolean, Object],
3510
- default: "body"
3511
- }
4028
+ title: {
4029
+ type: String,
4030
+ default: ""
3512
4031
  },
3513
- emits: ["update:modelValue", "change", "search-change", "close", "open"],
3514
- setup(props, { emit }) {
3515
- const {
3516
- modelValue,
3517
- disabled,
3518
- size,
3519
- menuClass,
3520
- search
3521
- } = toRefs(props);
3522
- const state = reactive({
3523
- selectedOption: void 0,
3524
- options: [],
3525
- searchText: ""
3526
- });
3527
- const popper2 = ref(null);
3528
- const searchInput = ref(null);
3529
- const instance = getCurrentInstance();
3530
- provide("select", instance);
3531
- const popperOffset = computed(() => {
3532
- const unrefSize = unref(size);
3533
- if (unrefSize === "sm") {
3534
- return 3;
4032
+ useFont: {
4033
+ type: Boolean,
4034
+ default: false
4035
+ }
4036
+ };
4037
+ const navSubProps = {
4038
+ disabled: {
4039
+ type: Boolean,
4040
+ default: false
4041
+ },
4042
+ fold: {
4043
+ type: Boolean,
4044
+ default: true
4045
+ },
4046
+ isActive: {
4047
+ type: Boolean,
4048
+ default: false
4049
+ },
4050
+ isExactActive: {
4051
+ type: Boolean,
4052
+ default: false
4053
+ },
4054
+ icon: {
4055
+ type: String,
4056
+ default: ""
4057
+ },
4058
+ index: {
4059
+ type: [String, Number],
4060
+ default: ""
4061
+ },
4062
+ title: {
4063
+ type: String,
4064
+ default: ""
4065
+ },
4066
+ useFont: {
4067
+ type: Boolean,
4068
+ default: false
4069
+ }
4070
+ };
4071
+ const navItemProps = {
4072
+ disabled: {
4073
+ type: Boolean,
4074
+ default: false
4075
+ },
4076
+ isActive: {
4077
+ type: Boolean,
4078
+ default: false
4079
+ },
4080
+ isExactActive: {
4081
+ type: Boolean,
4082
+ default: false
4083
+ },
4084
+ icon: {
4085
+ type: String,
4086
+ default: ""
4087
+ },
4088
+ index: {
4089
+ type: [String, Number],
4090
+ default: ""
4091
+ },
4092
+ title: {
4093
+ type: String,
4094
+ default: ""
4095
+ },
4096
+ useFont: {
4097
+ type: Boolean,
4098
+ default: false
4099
+ }
4100
+ };
4101
+ var nav_vue_vue_type_style_index_0_lang = "";
4102
+ const _sfc_main$g = defineComponent({
4103
+ name: "DaoNav",
4104
+ props: navProps,
4105
+ emits: ["back", "select", "toggle"],
4106
+ setup(props, {
4107
+ emit,
4108
+ expose
4109
+ }) {
4110
+ const { type, accordion, activeOpened } = toRefs(props);
4111
+ const openedNav = ref([]);
4112
+ const activeItemIdx = ref();
4113
+ const openNavSub = (index2) => {
4114
+ if (openedNav.value.includes(index2)) {
4115
+ return;
3535
4116
  }
3536
- return 5;
3537
- });
3538
- const selectClass = computed(() => {
3539
- const classNames = ["dao-select"];
3540
- const unrefSize = unref(size);
3541
- if (disabled.value) {
3542
- classNames.push("dao-select--disabled");
4117
+ if (accordion.value) {
4118
+ openedNav.value = [];
3543
4119
  }
3544
- if (unrefSize) {
3545
- classNames.push(`dao-select--size-${unrefSize}`);
4120
+ openedNav.value.push(index2);
4121
+ emit("toggle", {
4122
+ action: "open",
4123
+ index: index2
4124
+ });
4125
+ };
4126
+ const closeNavSub = (index2) => {
4127
+ const idx = openedNav.value.indexOf(index2);
4128
+ if (idx !== -1) {
4129
+ openedNav.value.splice(idx, 1);
4130
+ }
4131
+ emit("toggle", {
4132
+ action: "close",
4133
+ index: index2
4134
+ });
4135
+ };
4136
+ const close = (index2) => closeNavSub(index2);
4137
+ const open = (index2) => openNavSub(index2);
4138
+ const initNav = () => {
4139
+ activeOpened.value.forEach((v) => {
4140
+ openNavSub(v);
4141
+ });
4142
+ };
4143
+ onMounted(() => {
4144
+ initNav();
4145
+ });
4146
+ const handleNavItemClick = (index2) => {
4147
+ activeItemIdx.value = index2;
4148
+ emit("select", index2);
4149
+ };
4150
+ const handleNavSubClick = (index2) => {
4151
+ const isOpened = openedNav.value.includes(index2);
4152
+ if (isOpened) {
4153
+ closeNavSub(index2);
4154
+ } else {
4155
+ openNavSub(index2);
3546
4156
  }
3547
- return classNames;
4157
+ };
4158
+ const handleNavHeadClick = () => {
4159
+ emit("back");
4160
+ };
4161
+ provide(navRootKey, reactive({
4162
+ type,
4163
+ accordion,
4164
+ activeItemIdx,
4165
+ openedNav,
4166
+ handleNavItemClick,
4167
+ handleNavSubClick,
4168
+ handleNavHeadClick
4169
+ }));
4170
+ expose({
4171
+ close,
4172
+ open
3548
4173
  });
3549
- const popperClass = computed(() => {
3550
- const classNames = ["dao-select-popper"];
3551
- const unrefSize = unref(size);
3552
- if (unrefSize) {
3553
- classNames.push(`dao-select-popper--size-${unrefSize}`);
4174
+ }
4175
+ });
4176
+ const _hoisted_1$d = { class: "dao-nav-bar" };
4177
+ const _hoisted_2$a = { class: "dao-nav" };
4178
+ function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
4179
+ return openBlock(), createElementBlock("nav", _hoisted_1$d, [
4180
+ renderSlot(_ctx.$slots, "header"),
4181
+ createElementVNode("ul", _hoisted_2$a, [
4182
+ renderSlot(_ctx.$slots, "default")
4183
+ ])
4184
+ ]);
4185
+ }
4186
+ var nav = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$e]]);
4187
+ const _sfc_main$f = defineComponent({
4188
+ name: "DaoNavHead",
4189
+ components: {
4190
+ DaoIcon
4191
+ },
4192
+ props: navHeadProps,
4193
+ setup(props) {
4194
+ const rootNav = inject(navRootKey);
4195
+ if (!rootNav) {
4196
+ console.warn("use Nav", "can not inject root Nav");
4197
+ }
4198
+ const { icon, title, useFont } = toRefs(props);
4199
+ const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "3rd" || Boolean(unref(icon)));
4200
+ const headIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" ? unref(icon) : "icon-back");
4201
+ const isFontType = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" ? unref(useFont) : true);
4202
+ const classHeadList = computed(() => [
4203
+ "dao-nav__head",
4204
+ `dao-nav__head--${rootNav == null ? void 0 : rootNav.type}`
4205
+ ]);
4206
+ const handleClickBack = () => {
4207
+ if ((rootNav == null ? void 0 : rootNav.type) === "2rd") {
4208
+ return;
3554
4209
  }
3555
- if (menuClass.value) {
3556
- classNames.push(menuClass.value);
4210
+ rootNav == null ? void 0 : rootNav.handleNavHeadClick();
4211
+ };
4212
+ return {
4213
+ classHeadList,
4214
+ headIcon,
4215
+ title,
4216
+ isFontType,
4217
+ showIcon,
4218
+ handleClickBack
4219
+ };
4220
+ }
4221
+ });
4222
+ const _hoisted_1$c = { class: "dao-nav__head-text dao-nav-text" };
4223
+ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
4224
+ const _component_dao_icon = resolveComponent("dao-icon");
4225
+ return openBlock(), createElementBlock("li", {
4226
+ class: normalizeClass(_ctx.classHeadList)
4227
+ }, [
4228
+ renderSlot(_ctx.$slots, "default", {}, () => [
4229
+ _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4230
+ key: 0,
4231
+ class: "dao-nav__head-icon",
4232
+ tabindex: "0",
4233
+ name: _ctx.headIcon,
4234
+ "use-font": _ctx.isFontType,
4235
+ onClick: _ctx.handleClickBack,
4236
+ onKeyup: withKeys(withModifiers(_ctx.handleClickBack, ["stop"]), ["esc"])
4237
+ }, null, 8, ["name", "use-font", "onClick", "onKeyup"])) : createCommentVNode("", true),
4238
+ createElementVNode("span", _hoisted_1$c, toDisplayString(_ctx.title), 1)
4239
+ ])
4240
+ ], 2);
4241
+ }
4242
+ var navHead = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$d]]);
4243
+ const _sfc_main$e = defineComponent({
4244
+ name: "DaoNavItem",
4245
+ components: {
4246
+ DaoIcon
4247
+ },
4248
+ props: navItemProps,
4249
+ setup(props, { slots }) {
4250
+ const rootNav = inject(navRootKey);
4251
+ const subNav = inject(navSubKey);
4252
+ if (!rootNav || !subNav) {
4253
+ console.warn("use Nav", "can not inject root Nav");
4254
+ }
4255
+ const {
4256
+ icon,
4257
+ title,
4258
+ useFont,
4259
+ disabled,
4260
+ isActive,
4261
+ isExactActive,
4262
+ index: index2
4263
+ } = toRefs(props);
4264
+ const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" && Boolean(icon.value));
4265
+ const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
4266
+ const isNavItemActive = computed(() => {
4267
+ const unrefIsActive = unref(isActive);
4268
+ const unrefIsExactActive = unref(isExactActive);
4269
+ if (isSelect.value) {
4270
+ return true;
3557
4271
  }
3558
- return classNames.join(" ");
3559
- });
3560
- const isSelected = computed(() => {
3561
- var _a;
3562
- return !isNullish((_a = state.selectedOption) == null ? void 0 : _a.value);
3563
- });
3564
- const isNoResult = computed(() => {
3565
- const unrefSearch = unref(search);
3566
- return state.options.length === 0 || unrefSearch && !state.options.some((x) => x.visible);
4272
+ if (unrefIsActive && !(rootNav == null ? void 0 : rootNav.activeItemIdx)) {
4273
+ return true;
4274
+ }
4275
+ if (unrefIsExactActive && !(rootNav == null ? void 0 : rootNav.activeItemIdx)) {
4276
+ return true;
4277
+ }
4278
+ return false;
3567
4279
  });
3568
- const popperOptions = computed(() => ({
3569
- modifiers: [
4280
+ const classItemList = computed(() => {
4281
+ const unrefDisabled = unref(disabled);
4282
+ return [
4283
+ "dao-nav__item",
4284
+ `dao-nav__item--${rootNav == null ? void 0 : rootNav.type}`,
3570
4285
  {
3571
- name: "sameWidth",
3572
- enabled: true,
3573
- phase: "beforeWrite",
3574
- requires: ["computeStyles"],
3575
- fn: ({ state: popperState }) => {
3576
- popperState.styles.popper.width = `${popperState.rects.reference.width}px`;
3577
- },
3578
- effect: ({ state: popperState }) => {
3579
- popperState.elements.popper.style.width = `${popperState.elements.reference.offsetWidth}px`;
3580
- }
4286
+ "dao-nav__item-disabled": unrefDisabled
3581
4287
  }
3582
- ]
3583
- }));
3584
- const onSelect = (option) => {
3585
- const unrefPopper = unref(popper2);
3586
- state.selectedOption = option;
3587
- emit("update:modelValue", state.selectedOption.value);
3588
- emit("change", state.selectedOption.value);
3589
- unrefPopper == null ? void 0 : unrefPopper.hide();
3590
- };
3591
- const checkUpdatedOption = () => {
3592
- var _a;
3593
- const unrefModelValue = unref(modelValue);
3594
- if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a = state.selectedOption) == null ? void 0 : _a.value)) {
3595
- const target = state.options.find((o) => o.value === unrefModelValue);
3596
- state.selectedOption = target;
4288
+ ];
4289
+ });
4290
+ const classTitleList = computed(() => [
4291
+ "dao-nav__item-title",
4292
+ {
4293
+ "dao-nav__item-title-active": isNavItemActive.value,
4294
+ "dao-nav__item-title-with-icon": showIcon.value || slots.default
3597
4295
  }
3598
- };
3599
- const checkNewOption = (option) => {
3600
- var _a;
3601
- const unrefModelValue = unref(modelValue);
3602
- if (!isNullish(unrefModelValue) && isNullish((_a = state.selectedOption) == null ? void 0 : _a.value) && unrefModelValue === option.value) {
3603
- state.selectedOption = option;
4296
+ ]);
4297
+ const handleClick = () => {
4298
+ if (disabled.value) {
4299
+ return;
3604
4300
  }
4301
+ rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
3605
4302
  };
3606
- const checkRemovedOption = (option) => {
3607
- var _a;
3608
- if (((_a = state.selectedOption) == null ? void 0 : _a.value) === option.value) {
3609
- state.selectedOption = void 0;
4303
+ watchEffect(() => {
4304
+ if (isActive.value || isExactActive.value) {
4305
+ subNav == null ? void 0 : subNav.handleNavItemActive(isActive.value || isExactActive.value, index2.value);
4306
+ rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
3610
4307
  }
4308
+ });
4309
+ watch(() => rootNav == null ? void 0 : rootNav.activeItemIdx, (val) => {
4310
+ const active = val === index2.value;
4311
+ subNav == null ? void 0 : subNav.handleNavItemActive(active, index2.value);
4312
+ }, { immediate: true });
4313
+ return {
4314
+ classItemList,
4315
+ classTitleList,
4316
+ icon,
4317
+ showIcon,
4318
+ title,
4319
+ useFont,
4320
+ handleClick
3611
4321
  };
3612
- const filterFn = (keyword, value, option) => {
3613
- if (keyword === "") {
4322
+ }
4323
+ });
4324
+ const _hoisted_1$b = { class: "dao-nav-slot" };
4325
+ const _hoisted_2$9 = { class: "dao-nav__item-text dao-nav-text" };
4326
+ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
4327
+ const _component_dao_icon = resolveComponent("dao-icon");
4328
+ return openBlock(), createElementBlock("li", {
4329
+ class: normalizeClass(_ctx.classItemList)
4330
+ }, [
4331
+ createElementVNode("div", {
4332
+ class: normalizeClass(_ctx.classTitleList),
4333
+ tabindex: "0",
4334
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4335
+ onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4336
+ }, [
4337
+ createElementVNode("div", _hoisted_1$b, [
4338
+ renderSlot(_ctx.$slots, "default", {}, () => [
4339
+ _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4340
+ key: 0,
4341
+ class: "dao-nav__item-icon",
4342
+ name: _ctx.icon,
4343
+ "use-font": _ctx.useFont
4344
+ }, null, 8, ["name", "use-font"])) : createCommentVNode("", true),
4345
+ createElementVNode("span", _hoisted_2$9, toDisplayString(_ctx.title), 1)
4346
+ ])
4347
+ ])
4348
+ ], 34)
4349
+ ], 2);
4350
+ }
4351
+ var navItem = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$c]]);
4352
+ const _sfc_main$d = defineComponent({
4353
+ name: "DaoNavSub",
4354
+ components: {
4355
+ DaoIcon
4356
+ },
4357
+ props: navSubProps,
4358
+ setup(props, { slots }) {
4359
+ const {
4360
+ icon,
4361
+ title,
4362
+ useFont,
4363
+ disabled,
4364
+ isActive,
4365
+ isExactActive,
4366
+ index: index2,
4367
+ fold
4368
+ } = toRefs(props);
4369
+ const rootNav = inject(navRootKey);
4370
+ if (!rootNav) {
4371
+ console.warn("use Nav", "can not inject root Nav");
4372
+ }
4373
+ const isChildrenActive = ref(false);
4374
+ const currentActiveIndex = ref(false);
4375
+ const opened = ref(false);
4376
+ const childrenActiveMap = reactive(new Map());
4377
+ const showIcon = computed(() => (rootNav == null ? void 0 : rootNav.type) === "2rd" && Boolean(icon.value));
4378
+ const foldIcon = computed(() => opened.value ? "icon_caret-up" : "icon_caret-down");
4379
+ const isSelect = computed(() => (rootNav == null ? void 0 : rootNav.activeItemIdx) === index2.value);
4380
+ const classSubList = computed(() => {
4381
+ const unrefDisabled = unref(disabled);
4382
+ return [
4383
+ "dao-nav__sub",
4384
+ `dao-nav__sub--${rootNav == null ? void 0 : rootNav.type}`,
4385
+ {
4386
+ "dao-nav__sub-disabled": unrefDisabled && !fold.value
4387
+ }
4388
+ ];
4389
+ });
4390
+ const isNavSubActive = computed(() => {
4391
+ const unrefIsActive = unref(isActive);
4392
+ const unrefIsExactActive = unref(isExactActive);
4393
+ if (disabled.value && !fold.value) {
4394
+ return false;
4395
+ }
4396
+ if (fold.value) {
4397
+ return isChildrenActive.value;
4398
+ }
4399
+ if (isSelect.value) {
3614
4400
  return true;
3615
4401
  }
3616
- return option.labelValue.toString().includes(keyword);
3617
- };
3618
- const onSearchTextChange = () => {
3619
- const searchContent = state.searchText;
3620
- const unrefSearch = unref(search);
3621
- const searchFn = typeof unrefSearch === "function" ? unrefSearch : filterFn;
3622
- state.options.forEach((option) => {
3623
- const searchVal = searchFn(searchContent, option.value, option);
3624
- option.setVisible(searchVal);
3625
- });
3626
- emit("search-change", searchContent);
3627
- };
3628
- const onSearchClear = () => {
3629
- var _a;
3630
- state.searchText = "";
3631
- state.options.forEach((option) => {
3632
- option.setVisible(true);
3633
- });
3634
- (_a = searchInput.value) == null ? void 0 : _a.focus();
3635
- };
3636
- const remove = (index) => {
3637
- if (index > -1) {
3638
- const [removed] = state.options.splice(index, 1);
3639
- if (removed) {
3640
- checkRemovedOption(removed);
3641
- }
4402
+ if (unrefIsActive && !(rootNav == null ? void 0 : rootNav.activeItemIdx)) {
4403
+ return true;
3642
4404
  }
4405
+ if (unrefIsExactActive && !(rootNav == null ? void 0 : rootNav.activeItemIdx)) {
4406
+ return true;
4407
+ }
4408
+ return false;
4409
+ });
4410
+ const classTitleList = computed(() => [
4411
+ "dao-nav__sub-title",
4412
+ {
4413
+ "dao-nav__sub-title-active": isNavSubActive.value,
4414
+ "dao-nav__sub-title-opened": opened.value,
4415
+ "dao-nav__sub-title-fold": fold.value,
4416
+ "dao-nav__sub-title-with-icon": showIcon.value || slots.title
4417
+ }
4418
+ ]);
4419
+ const handleNavItemActive = (active, idx) => {
4420
+ childrenActiveMap.set(idx, active);
3643
4421
  };
3644
- const add = (option) => {
3645
- state.options.push(option);
3646
- checkNewOption(option);
3647
- };
3648
- provide("add", add);
3649
- provide("onSelect", onSelect);
4422
+ provide(navSubKey, {
4423
+ handleNavItemActive
4424
+ });
4425
+ watch(childrenActiveMap, (v) => {
4426
+ if (!fold.value) {
4427
+ return;
4428
+ }
4429
+ const childrenActiveList = Array.from(v.values());
4430
+ if (childrenActiveList.indexOf(true) !== -1) {
4431
+ isChildrenActive.value = true;
4432
+ } else {
4433
+ isChildrenActive.value = false;
4434
+ }
4435
+ });
4436
+ const handleClick = () => {
4437
+ if (disabled.value && !fold.value) {
4438
+ return;
4439
+ }
4440
+ if (fold.value) {
4441
+ rootNav == null ? void 0 : rootNav.handleNavSubClick(index2.value);
4442
+ } else {
4443
+ rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
4444
+ }
4445
+ };
4446
+ watchEffect(() => {
4447
+ if (!fold.value && (isActive.value || isExactActive.value)) {
4448
+ rootNav == null ? void 0 : rootNav.handleNavItemClick(index2.value);
4449
+ }
4450
+ });
4451
+ watch(() => rootNav == null ? void 0 : rootNav.activeItemIdx, (val) => {
4452
+ currentActiveIndex.value = Boolean(val === index2.value);
4453
+ }, { immediate: true });
4454
+ watch(() => rootNav == null ? void 0 : rootNav.openedNav, (val) => {
4455
+ if (disabled.value && !fold.value) {
4456
+ opened.value = false;
4457
+ } else {
4458
+ opened.value = (val == null ? void 0 : val.indexOf(index2.value)) !== -1;
4459
+ }
4460
+ }, { immediate: true, deep: true });
4461
+ return {
4462
+ classSubList,
4463
+ classTitleList,
4464
+ fold,
4465
+ foldIcon,
4466
+ showIcon,
4467
+ title,
4468
+ useFont,
4469
+ opened,
4470
+ handleClick
4471
+ };
4472
+ }
4473
+ });
4474
+ const _hoisted_1$a = { class: "dao-nav-slot" };
4475
+ const _hoisted_2$8 = { class: "dao-nav__sub-text dao-nav-text" };
4476
+ const _hoisted_3$5 = {
4477
+ key: 0,
4478
+ class: "icon-dropdown-line dao-nav__sub__icon-fold"
4479
+ };
4480
+ const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4481
+ const _hoisted_5$3 = { class: "dao-nav dao-nav-inner" };
4482
+ const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4483
+ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
4484
+ const _component_dao_icon = resolveComponent("dao-icon");
4485
+ return openBlock(), createElementBlock("li", {
4486
+ class: normalizeClass(_ctx.classSubList)
4487
+ }, [
4488
+ createElementVNode("div", {
4489
+ class: normalizeClass(_ctx.classTitleList),
4490
+ tabindex: "0",
4491
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4492
+ onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4493
+ }, [
4494
+ createElementVNode("div", _hoisted_1$a, [
4495
+ renderSlot(_ctx.$slots, "title", {}, () => [
4496
+ _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4497
+ key: 0,
4498
+ class: "dao-nav__sub-icon",
4499
+ name: _ctx.icon,
4500
+ "use-font": _ctx.useFont
4501
+ }, null, 8, ["name", "use-font"])) : createCommentVNode("", true),
4502
+ createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.title), 1)
4503
+ ])
4504
+ ]),
4505
+ _ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$5)) : createCommentVNode("", true)
4506
+ ], 34),
4507
+ createVNode(Transition, { name: "dao-nav" }, {
4508
+ default: withCtx(() => [
4509
+ withDirectives(createElementVNode("div", null, [
4510
+ _hoisted_4$4,
4511
+ createElementVNode("ul", _hoisted_5$3, [
4512
+ renderSlot(_ctx.$slots, "default")
4513
+ ]),
4514
+ _hoisted_6$2
4515
+ ], 512), [
4516
+ [vShow, _ctx.opened]
4517
+ ])
4518
+ ]),
4519
+ _: 3
4520
+ })
4521
+ ], 2);
4522
+ }
4523
+ var navSub = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$b]]);
4524
+ const paginationProps = {
4525
+ pageSize: {
4526
+ type: Number,
4527
+ required: true,
4528
+ default: 10,
4529
+ validator: (val) => val > 0 && Math.floor(val) === val
4530
+ },
4531
+ pageSizeOptions: {
4532
+ type: Array,
4533
+ default: () => []
4534
+ },
4535
+ pageFormat: {
4536
+ type: Function,
4537
+ default: (val) => `${val} per page`
4538
+ },
4539
+ compact: {
4540
+ type: Boolean,
4541
+ default: false
4542
+ },
4543
+ total: {
4544
+ type: Number,
4545
+ required: true,
4546
+ default: 0
4547
+ },
4548
+ totalFormat: {
4549
+ type: Function,
4550
+ default: (val) => `Total ${val} ${val === 1 ? "record" : "records"}`
4551
+ },
4552
+ currentPage: {
4553
+ type: Number,
4554
+ default: 1
4555
+ },
4556
+ pageSizerWidth: {
4557
+ type: Number,
4558
+ default: 110
4559
+ }
4560
+ };
4561
+ var select_vue_vue_type_style_index_0_lang = "";
4562
+ const _sfc_main$c = defineComponent({
4563
+ name: "DaoSelect",
4564
+ components: {
4565
+ DaoPopper: Popper
4566
+ },
4567
+ props: {
4568
+ modelValue: {
4569
+ type: [String, Number, Boolean],
4570
+ default: void 0
4571
+ },
4572
+ placeholder: {
4573
+ type: String,
4574
+ default: ""
4575
+ },
4576
+ disabled: {
4577
+ type: Boolean,
4578
+ default: false
4579
+ },
4580
+ size: {
4581
+ type: String,
4582
+ default: "md",
4583
+ validator: (size) => ["md", "sm"].includes(size)
4584
+ },
4585
+ optionsPlaceholder: {
4586
+ type: String,
4587
+ default: "\u65E0\u6570\u636E"
4588
+ },
4589
+ search: {
4590
+ type: [Boolean, Function],
4591
+ default: false
4592
+ },
4593
+ searchPlaceholder: {
4594
+ type: String,
4595
+ default: "\u641C\u7D22"
4596
+ },
4597
+ menuClass: {
4598
+ type: String,
4599
+ default: ""
4600
+ },
4601
+ appendTo: {
4602
+ type: [String, Boolean, Object],
4603
+ default: "body"
4604
+ }
4605
+ },
4606
+ emits: ["update:modelValue", "change", "search-change", "close", "open"],
4607
+ setup(props, { emit }) {
4608
+ const {
4609
+ modelValue,
4610
+ disabled,
4611
+ size,
4612
+ menuClass,
4613
+ search
4614
+ } = toRefs(props);
4615
+ const state = reactive({
4616
+ selectedOption: void 0,
4617
+ options: [],
4618
+ searchText: ""
4619
+ });
4620
+ const popper2 = ref(null);
4621
+ const searchInput = ref(null);
4622
+ const instance = getCurrentInstance();
4623
+ provide("select", instance);
4624
+ const popperOffset = computed(() => {
4625
+ const unrefSize = unref(size);
4626
+ if (unrefSize === "sm") {
4627
+ return 3;
4628
+ }
4629
+ return 5;
4630
+ });
4631
+ const selectClass = computed(() => {
4632
+ const classNames = ["dao-select"];
4633
+ const unrefSize = unref(size);
4634
+ if (disabled.value) {
4635
+ classNames.push("dao-select--disabled");
4636
+ }
4637
+ if (unrefSize) {
4638
+ classNames.push(`dao-select--size-${unrefSize}`);
4639
+ }
4640
+ return classNames;
4641
+ });
4642
+ const popperClass = computed(() => {
4643
+ const classNames = ["dao-select-popper"];
4644
+ const unrefSize = unref(size);
4645
+ if (unrefSize) {
4646
+ classNames.push(`dao-select-popper--size-${unrefSize}`);
4647
+ }
4648
+ if (menuClass.value) {
4649
+ classNames.push(menuClass.value);
4650
+ }
4651
+ return classNames.join(" ");
4652
+ });
4653
+ const isSelected = computed(() => {
4654
+ var _a;
4655
+ return !isNullish((_a = state.selectedOption) == null ? void 0 : _a.value);
4656
+ });
4657
+ const isNoResult = computed(() => {
4658
+ const unrefSearch = unref(search);
4659
+ return state.options.length === 0 || unrefSearch && !state.options.some((x) => x.visible);
4660
+ });
4661
+ const popperOptions = computed(() => ({
4662
+ modifiers: [
4663
+ {
4664
+ name: "sameWidth",
4665
+ enabled: true,
4666
+ phase: "beforeWrite",
4667
+ requires: ["computeStyles"],
4668
+ fn: ({ state: popperState }) => {
4669
+ popperState.styles.popper.width = `${popperState.rects.reference.width}px`;
4670
+ },
4671
+ effect: ({ state: popperState }) => {
4672
+ popperState.elements.popper.style.width = `${popperState.elements.reference.offsetWidth}px`;
4673
+ }
4674
+ }
4675
+ ]
4676
+ }));
4677
+ const onSelect = (option) => {
4678
+ const unrefPopper = unref(popper2);
4679
+ state.selectedOption = option;
4680
+ emit("update:modelValue", state.selectedOption.value);
4681
+ emit("change", state.selectedOption.value);
4682
+ unrefPopper == null ? void 0 : unrefPopper.hide();
4683
+ };
4684
+ const checkUpdatedOption = () => {
4685
+ var _a;
4686
+ const unrefModelValue = unref(modelValue);
4687
+ if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a = state.selectedOption) == null ? void 0 : _a.value)) {
4688
+ const target = state.options.find((o) => o.value === unrefModelValue);
4689
+ state.selectedOption = target;
4690
+ }
4691
+ };
4692
+ const checkNewOption = (option) => {
4693
+ var _a;
4694
+ const unrefModelValue = unref(modelValue);
4695
+ if (!isNullish(unrefModelValue) && isNullish((_a = state.selectedOption) == null ? void 0 : _a.value) && unrefModelValue === option.value) {
4696
+ state.selectedOption = option;
4697
+ }
4698
+ };
4699
+ const checkRemovedOption = (option) => {
4700
+ var _a;
4701
+ if (((_a = state.selectedOption) == null ? void 0 : _a.value) === option.value) {
4702
+ state.selectedOption = void 0;
4703
+ }
4704
+ };
4705
+ const filterFn = (keyword, value, option) => {
4706
+ if (keyword === "") {
4707
+ return true;
4708
+ }
4709
+ return option.labelValue.toString().includes(keyword);
4710
+ };
4711
+ const onSearchTextChange = () => {
4712
+ const searchContent = state.searchText;
4713
+ const unrefSearch = unref(search);
4714
+ const searchFn = typeof unrefSearch === "function" ? unrefSearch : filterFn;
4715
+ state.options.forEach((option) => {
4716
+ const searchVal = searchFn(searchContent, option.value, option);
4717
+ option.setVisible(searchVal);
4718
+ });
4719
+ emit("search-change", searchContent);
4720
+ };
4721
+ const onSearchClear = () => {
4722
+ var _a;
4723
+ state.searchText = "";
4724
+ state.options.forEach((option) => {
4725
+ option.setVisible(true);
4726
+ });
4727
+ (_a = searchInput.value) == null ? void 0 : _a.focus();
4728
+ };
4729
+ const remove = (index2) => {
4730
+ if (index2 > -1) {
4731
+ const [removed] = state.options.splice(index2, 1);
4732
+ if (removed) {
4733
+ checkRemovedOption(removed);
4734
+ }
4735
+ }
4736
+ };
4737
+ const add = (option) => {
4738
+ state.options.push(option);
4739
+ checkNewOption(option);
4740
+ };
4741
+ provide("add", add);
4742
+ provide("onSelect", onSelect);
3650
4743
  provide("remove", remove);
3651
4744
  provide("selectState", state);
3652
4745
  watch(modelValue, () => checkUpdatedOption());
3653
4746
  return {
3654
- popper: popper2,
3655
- state,
3656
- selectClass,
3657
- popperClass,
3658
- popperOffset,
3659
- isSelected,
3660
- isNoResult,
3661
- popperOptions,
3662
- onSelect,
3663
- onSearchTextChange,
3664
- onSearchClear,
3665
- add,
3666
- remove,
3667
- searchInput
4747
+ popper: popper2,
4748
+ state,
4749
+ selectClass,
4750
+ popperClass,
4751
+ popperOffset,
4752
+ isSelected,
4753
+ isNoResult,
4754
+ popperOptions,
4755
+ onSelect,
4756
+ onSearchTextChange,
4757
+ onSearchClear,
4758
+ add,
4759
+ remove,
4760
+ searchInput
4761
+ };
4762
+ }
4763
+ });
4764
+ const _hoisted_1$9 = {
4765
+ class: "dao-selection",
4766
+ tabindex: "1"
4767
+ };
4768
+ const _hoisted_2$7 = {
4769
+ key: 0,
4770
+ class: "dao-selection-text"
4771
+ };
4772
+ const _hoisted_3$4 = {
4773
+ key: 1,
4774
+ class: "dao-selection-text--placeholder"
4775
+ };
4776
+ const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
4777
+ const _hoisted_5$2 = {
4778
+ key: 0,
4779
+ class: "dao-selection-search"
4780
+ };
4781
+ const _hoisted_6$1 = ["placeholder"];
4782
+ const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
4783
+ const _hoisted_8$1 = { class: "dao-option-list" };
4784
+ const _hoisted_9$1 = {
4785
+ key: "dao-option-placeholder",
4786
+ class: "dao-option-placeholder"
4787
+ };
4788
+ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
4789
+ const _component_dao_popper = resolveComponent("dao-popper");
4790
+ return openBlock(), createBlock(_component_dao_popper, {
4791
+ ref: "popper",
4792
+ delay: 0,
4793
+ disabled: _ctx.disabled,
4794
+ offset: _ctx.popperOffset,
4795
+ "popper-class": _ctx.popperClass,
4796
+ "popper-options": _ctx.popperOptions,
4797
+ "visible-arrow": false,
4798
+ class: normalizeClass(_ctx.selectClass),
4799
+ "append-to": _ctx.appendTo,
4800
+ transition: "dao-select",
4801
+ trigger: "click",
4802
+ placement: "bottom",
4803
+ onHide: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close")),
4804
+ onShow: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("open"))
4805
+ }, {
4806
+ content: withCtx(() => [
4807
+ renderSlot(_ctx.$slots, "optionsHeader", {}, () => [
4808
+ _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
4809
+ withDirectives(createElementVNode("input", {
4810
+ ref: "searchInput",
4811
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.state.searchText = $event),
4812
+ placeholder: _ctx.searchPlaceholder,
4813
+ tabindex: "1",
4814
+ class: "dao-selection-search-input",
4815
+ type: "search",
4816
+ onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["esc"])),
4817
+ onInput: _cache[2] || (_cache[2] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args))
4818
+ }, null, 40, _hoisted_6$1), [
4819
+ [vModelText, _ctx.state.searchText]
4820
+ ]),
4821
+ _hoisted_7$1,
4822
+ withDirectives(createElementVNode("i", {
4823
+ class: "icon-close dao-selection-search-clear-icon",
4824
+ tabindex: "1",
4825
+ onKeydown: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["enter"])),
4826
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args))
4827
+ }, null, 544), [
4828
+ [vShow, _ctx.state.searchText]
4829
+ ])
4830
+ ])) : createCommentVNode("", true)
4831
+ ]),
4832
+ createElementVNode("ul", _hoisted_8$1, [
4833
+ renderSlot(_ctx.$slots, "default"),
4834
+ _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_9$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
4835
+ ])
4836
+ ]),
4837
+ default: withCtx(() => {
4838
+ var _a, _b;
4839
+ return [
4840
+ createElementVNode("button", _hoisted_1$9, [
4841
+ _ctx.isSelected ? (openBlock(), createElementBlock("span", _hoisted_2$7, [
4842
+ renderSlot(_ctx.$slots, "selected", {
4843
+ selectedLabel: (_a = _ctx.state.selectedOption) == null ? void 0 : _a.label,
4844
+ selectedOption: _ctx.state.selectedOption,
4845
+ selectedValue: (_b = _ctx.state.selectedOption) == null ? void 0 : _b.value
4846
+ }, () => {
4847
+ var _a2;
4848
+ return [
4849
+ createTextVNode(toDisplayString((_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.labelValue), 1)
4850
+ ];
4851
+ })
4852
+ ])) : (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(_ctx.placeholder), 1)),
4853
+ _hoisted_4$3
4854
+ ])
4855
+ ];
4856
+ }),
4857
+ _: 3
4858
+ }, 8, ["disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
4859
+ }
4860
+ var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$a]]);
4861
+ var option_vue_vue_type_style_index_0_lang = "";
4862
+ const _sfc_main$b = defineComponent({
4863
+ name: "DaoOption",
4864
+ props: {
4865
+ value: {
4866
+ type: [Number, String, Boolean],
4867
+ required: true
4868
+ },
4869
+ label: {
4870
+ type: [Number, String],
4871
+ default: void 0
4872
+ },
4873
+ disabled: {
4874
+ type: Boolean,
4875
+ default: false
4876
+ }
4877
+ },
4878
+ setup(props) {
4879
+ const addFn = inject("add");
4880
+ const onSelectFn = inject("onSelect");
4881
+ const removeFn = inject("remove");
4882
+ const selectState = inject("selectState");
4883
+ const labelValue = computed(() => {
4884
+ if (props.label === null || props.label === void 0) {
4885
+ return props.value;
4886
+ }
4887
+ return props.label;
4888
+ });
4889
+ const instance = reactive({
4890
+ label: props.label,
4891
+ value: props.value,
4892
+ labelValue: labelValue.value,
4893
+ visible: true,
4894
+ setVisible(val) {
4895
+ instance.visible = val;
4896
+ }
4897
+ });
4898
+ const visible = computed(() => instance.visible);
4899
+ const isSelected = computed(() => {
4900
+ var _a;
4901
+ return ((_a = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a.value) === instance.value;
4902
+ });
4903
+ const onClick = () => {
4904
+ if (!props.disabled && typeof onSelectFn === "function") {
4905
+ onSelectFn(instance);
4906
+ }
4907
+ };
4908
+ if (typeof addFn === "function") {
4909
+ addFn(instance);
4910
+ }
4911
+ onBeforeUnmount(() => {
4912
+ var _a;
4913
+ if (typeof removeFn === "function") {
4914
+ const index2 = (_a = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a : -1;
4915
+ removeFn(index2);
4916
+ }
4917
+ });
4918
+ return {
4919
+ visible,
4920
+ labelValue,
4921
+ isSelected,
4922
+ onClick
4923
+ };
4924
+ }
4925
+ });
4926
+ const _hoisted_1$8 = ["title"];
4927
+ const _hoisted_2$6 = {
4928
+ key: 0,
4929
+ class: "icon-checked dao-option-checkmark"
4930
+ };
4931
+ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
4932
+ return withDirectives((openBlock(), createElementBlock("li", {
4933
+ class: normalizeClass([
4934
+ "dao-option",
4935
+ {
4936
+ "dao-option-active": _ctx.isSelected,
4937
+ "dao-option-disabled": _ctx.disabled
4938
+ }
4939
+ ]),
4940
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
4941
+ }, [
4942
+ createElementVNode("span", {
4943
+ title: String(_ctx.labelValue)
4944
+ }, [
4945
+ renderSlot(_ctx.$slots, "default", {}, () => [
4946
+ createTextVNode(toDisplayString(_ctx.labelValue), 1)
4947
+ ])
4948
+ ], 8, _hoisted_1$8),
4949
+ _ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$6)) : createCommentVNode("", true)
4950
+ ], 2)), [
4951
+ [vShow, _ctx.visible]
4952
+ ]);
4953
+ }
4954
+ var DaoOption = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$9]]);
4955
+ var pagination_vue_vue_type_style_index_0_lang = "";
4956
+ const numberAscSort = (a, b) => a - b;
4957
+ const _sfc_main$a = defineComponent({
4958
+ name: "DaoPagination",
4959
+ components: {
4960
+ DaoSelect,
4961
+ DaoOption
4962
+ },
4963
+ props: paginationProps,
4964
+ emits: [
4965
+ "update:page-size",
4966
+ "update:current-page",
4967
+ "next",
4968
+ "prev",
4969
+ "page-change",
4970
+ "size-change"
4971
+ ],
4972
+ setup(props, { emit }) {
4973
+ const { currentPage } = toRefs(props);
4974
+ const currentShowPage = ref(currentPage.value);
4975
+ const totalText = computed(() => props.totalFormat(props.total));
4976
+ const totalPage = computed(() => Math.ceil(props.total / props.pageSize));
4977
+ const computedPageSizeOptions = computed(() => {
4978
+ if (!props.pageSizeOptions.length) {
4979
+ return [props.pageSize];
4980
+ }
4981
+ const filteredPageSizeOptions = props.pageSizeOptions.filter((i) => {
4982
+ const res = i > 0 && Math.floor(i) === i;
4983
+ return res;
4984
+ });
4985
+ if (props.pageSizeOptions.includes(props.pageSize)) {
4986
+ return [...filteredPageSizeOptions].sort(numberAscSort);
4987
+ }
4988
+ return [...filteredPageSizeOptions, props.pageSize].sort(numberAscSort);
4989
+ });
4990
+ const prevPage = () => {
4991
+ if (currentPage.value === 1) {
4992
+ return;
4993
+ }
4994
+ const curPage = currentPage.value - 1;
4995
+ emit("update:current-page", curPage);
4996
+ emit("prev", curPage);
4997
+ };
4998
+ const nextPage = () => {
4999
+ if (currentPage.value === totalPage.value) {
5000
+ return;
5001
+ }
5002
+ const curPage = currentPage.value + 1;
5003
+ emit("update:current-page", curPage);
5004
+ emit("next", curPage);
5005
+ };
5006
+ const targetPage = () => {
5007
+ let { value } = currentShowPage;
5008
+ if (!value) {
5009
+ currentShowPage.value = currentPage.value;
5010
+ return;
5011
+ }
5012
+ if (value > totalPage.value) {
5013
+ value = totalPage.value;
5014
+ }
5015
+ currentShowPage.value = value;
5016
+ emit("update:current-page", value);
5017
+ emit("page-change", value);
5018
+ };
5019
+ watch(currentPage, (val) => {
5020
+ currentShowPage.value = val;
5021
+ });
5022
+ watch(totalPage, (val) => {
5023
+ if (currentShowPage.value > val) {
5024
+ currentShowPage.value = val;
5025
+ emit("update:current-page", val);
5026
+ }
5027
+ });
5028
+ const updatePageSize = (val) => {
5029
+ currentShowPage.value = currentPage.value;
5030
+ emit("update:page-size", val);
5031
+ emit("size-change", val);
5032
+ };
5033
+ const currentShowPageFormat = () => {
5034
+ if (!currentShowPage.value) {
5035
+ return;
5036
+ }
5037
+ currentShowPage.value = parseInt(currentShowPage.value.toString().replace(/[^0-9]/g, ""), 10) || "";
5038
+ };
5039
+ return {
5040
+ currentShowPage,
5041
+ totalText,
5042
+ totalPage,
5043
+ computedPageSizeOptions,
5044
+ prevPage,
5045
+ nextPage,
5046
+ targetPage,
5047
+ updatePageSize,
5048
+ currentShowPageFormat
5049
+ };
5050
+ }
5051
+ });
5052
+ const _hoisted_1$7 = { class: "dao-pagination__total" };
5053
+ const _hoisted_2$5 = { class: "dao-pagination__pager" };
5054
+ const _hoisted_3$3 = ["disabled"];
5055
+ const _hoisted_4$2 = { class: "dao-pagination__pager-total" };
5056
+ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5057
+ const _component_dao_option = resolveComponent("dao-option");
5058
+ const _component_dao_select = resolveComponent("dao-select");
5059
+ return openBlock(), createElementBlock("div", {
5060
+ class: normalizeClass(["dao-pagination", { "dao-pagination--compact": _ctx.compact }])
5061
+ }, [
5062
+ createElementVNode("div", _hoisted_1$7, toDisplayString(_ctx.totalText), 1),
5063
+ createElementVNode("div", _hoisted_2$5, [
5064
+ createElementVNode("i", {
5065
+ class: normalizeClass([
5066
+ "icon-arrow-previous",
5067
+ "dao-pagination__pager-prev",
5068
+ { "dao-pagination__pager-icon--disabled": _ctx.currentPage === 1 }
5069
+ ]),
5070
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.prevPage && _ctx.prevPage(...args))
5071
+ }, null, 2),
5072
+ withDirectives(createElementVNode("input", {
5073
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.currentShowPage = $event),
5074
+ class: "dao-pagination__pager-current",
5075
+ disabled: _ctx.totalPage === 1,
5076
+ onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
5077
+ onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
5078
+ }, null, 40, _hoisted_3$3), [
5079
+ [vModelText, _ctx.currentShowPage]
5080
+ ]),
5081
+ createElementVNode("span", _hoisted_4$2, " / " + toDisplayString(_ctx.totalPage), 1),
5082
+ createElementVNode("i", {
5083
+ class: normalizeClass([
5084
+ "icon-arrow-next",
5085
+ "dao-pagination__pager-next",
5086
+ { "dao-pagination__pager-icon--disabled": _ctx.currentPage === _ctx.totalPage }
5087
+ ]),
5088
+ onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextPage && _ctx.nextPage(...args))
5089
+ }, null, 2)
5090
+ ]),
5091
+ createVNode(_component_dao_select, {
5092
+ class: "dao-pagination__sizer",
5093
+ "model-value": _ctx.pageSize,
5094
+ size: "sm",
5095
+ style: normalizeStyle({ width: `${_ctx.pageSizerWidth}px` }),
5096
+ "menu-class": "dao-pagination__sizer-menu",
5097
+ onChange: _ctx.updatePageSize
5098
+ }, {
5099
+ default: withCtx(() => [
5100
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.computedPageSizeOptions, (size) => {
5101
+ return openBlock(), createBlock(_component_dao_option, {
5102
+ key: size,
5103
+ value: size,
5104
+ label: _ctx.pageFormat(size)
5105
+ }, null, 8, ["value", "label"]);
5106
+ }), 128))
5107
+ ]),
5108
+ _: 1
5109
+ }, 8, ["model-value", "style", "onChange"])
5110
+ ], 2);
5111
+ }
5112
+ var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
5113
+ var popover_scss_vue_type_style_index_0_src_lang = "";
5114
+ const _sfc_main$9 = defineComponent(__spreadProps(__spreadValues({}, Popper), {
5115
+ name: "DaoPopover",
5116
+ props: PopperProps,
5117
+ daoPopperTheme: "dao-popover"
5118
+ }));
5119
+ var progress_vue_vue_type_style_index_0_lang = "";
5120
+ const _sfc_main$8 = defineComponent({
5121
+ name: "DaoProgress",
5122
+ props: {
5123
+ value: {
5124
+ type: Number,
5125
+ default: 0,
5126
+ validator: (val) => val >= 0 && val <= 100
5127
+ },
5128
+ bgColor: {
5129
+ type: String,
5130
+ default: "#ebeef5"
5131
+ },
5132
+ fill: {
5133
+ type: [Array, String],
5134
+ default: "#409eff"
5135
+ }
5136
+ },
5137
+ setup(props) {
5138
+ const { fill } = toRefs(props);
5139
+ const type = computed(() => typeof fill.value === "string" ? "line" : "stacked");
5140
+ const stackedStyles = computed(() => {
5141
+ if (Array.isArray(fill.value)) {
5142
+ return fill.value.map((fillColor) => {
5143
+ if (typeof fillColor === "string") {
5144
+ const stackedLen = fill.value.length;
5145
+ return {
5146
+ width: `${100 / stackedLen}%`,
5147
+ background: fillColor
5148
+ };
5149
+ }
5150
+ if (typeof fillColor === "object") {
5151
+ return {
5152
+ width: `${fillColor.percent}%`,
5153
+ background: fillColor.color
5154
+ };
5155
+ }
5156
+ return {};
5157
+ });
5158
+ }
5159
+ return [];
5160
+ });
5161
+ const stackedBgColor = computed(() => typeof fill.value === "string" ? fill.value : "");
5162
+ return {
5163
+ type,
5164
+ stackedStyles,
5165
+ stackedBgColor
3668
5166
  };
3669
5167
  }
3670
5168
  });
3671
- const _hoisted_1$7 = {
3672
- class: "dao-selection",
3673
- tabindex: "1"
3674
- };
3675
- const _hoisted_2$5 = {
3676
- key: 0,
3677
- class: "dao-selection-text"
3678
- };
3679
- const _hoisted_3$2 = {
5169
+ const _hoisted_1$6 = { class: "dao-progress" };
5170
+ const _hoisted_2$4 = {
3680
5171
  key: 1,
3681
- class: "dao-selection-text--placeholder"
5172
+ class: "dao-progress__stacked"
3682
5173
  };
3683
- const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
3684
- const _hoisted_5$1 = {
5174
+ const _hoisted_3$2 = {
3685
5175
  key: 0,
3686
- class: "dao-selection-search"
3687
- };
3688
- const _hoisted_6$1 = ["placeholder"];
3689
- const _hoisted_7$1 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
3690
- const _hoisted_8$1 = { class: "dao-option-list" };
3691
- const _hoisted_9$1 = {
3692
- key: "dao-option-placeholder",
3693
- class: "dao-option-placeholder"
5176
+ class: "dao-progress__text"
3694
5177
  };
3695
5178
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
3696
- const _component_dao_popper = resolveComponent("dao-popper");
3697
- return openBlock(), createBlock(_component_dao_popper, {
3698
- ref: "popper",
3699
- delay: 0,
3700
- disabled: _ctx.disabled,
3701
- offset: _ctx.popperOffset,
3702
- "popper-class": _ctx.popperClass,
3703
- "popper-options": _ctx.popperOptions,
3704
- "visible-arrow": false,
3705
- class: normalizeClass(_ctx.selectClass),
3706
- "append-to": _ctx.appendTo,
3707
- transition: "dao-select",
3708
- trigger: "click",
3709
- placement: "bottom",
3710
- onHide: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close")),
3711
- onShow: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("open"))
3712
- }, {
3713
- content: withCtx(() => [
3714
- renderSlot(_ctx.$slots, "optionsHeader", {}, () => [
3715
- _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
3716
- withDirectives(createElementVNode("input", {
3717
- ref: "searchInput",
3718
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.state.searchText = $event),
3719
- placeholder: _ctx.searchPlaceholder,
3720
- tabindex: "1",
3721
- class: "dao-selection-search-input",
3722
- type: "search",
3723
- onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["esc"])),
3724
- onInput: _cache[2] || (_cache[2] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args))
3725
- }, null, 40, _hoisted_6$1), [
3726
- [vModelText, _ctx.state.searchText]
3727
- ]),
3728
- _hoisted_7$1,
3729
- withDirectives(createElementVNode("i", {
3730
- class: "icon-close dao-selection-search-clear-icon",
3731
- tabindex: "1",
3732
- onKeydown: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["enter"])),
3733
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args))
3734
- }, null, 544), [
3735
- [vShow, _ctx.state.searchText]
3736
- ])
3737
- ])) : createCommentVNode("", true)
3738
- ]),
3739
- createElementVNode("ul", _hoisted_8$1, [
3740
- renderSlot(_ctx.$slots, "default"),
3741
- _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_9$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
3742
- ])
3743
- ]),
3744
- default: withCtx(() => {
3745
- var _a, _b;
3746
- return [
3747
- createElementVNode("button", _hoisted_1$7, [
3748
- _ctx.isSelected ? (openBlock(), createElementBlock("span", _hoisted_2$5, [
3749
- renderSlot(_ctx.$slots, "selected", {
3750
- selectedLabel: (_a = _ctx.state.selectedOption) == null ? void 0 : _a.label,
3751
- selectedOption: _ctx.state.selectedOption,
3752
- selectedValue: (_b = _ctx.state.selectedOption) == null ? void 0 : _b.value
3753
- }, () => {
3754
- var _a2;
3755
- return [
3756
- createTextVNode(toDisplayString((_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.labelValue), 1)
3757
- ];
3758
- })
3759
- ])) : (openBlock(), createElementBlock("span", _hoisted_3$2, toDisplayString(_ctx.placeholder), 1)),
3760
- _hoisted_4$2
3761
- ])
3762
- ];
3763
- }),
3764
- _: 3
3765
- }, 8, ["disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
5179
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [
5180
+ createElementVNode("div", {
5181
+ class: "dao-progress__inner",
5182
+ style: normalizeStyle({ background: _ctx.bgColor })
5183
+ }, [
5184
+ _ctx.type === "line" ? (openBlock(), createElementBlock("div", {
5185
+ key: 0,
5186
+ class: "dao-progress__bar",
5187
+ style: normalizeStyle({ width: `${_ctx.value}%`, background: _ctx.stackedBgColor })
5188
+ }, null, 4)) : (openBlock(), createElementBlock("div", _hoisted_2$4, [
5189
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.stackedStyles, (stackedStyle, idx) => {
5190
+ return openBlock(), createElementBlock("div", {
5191
+ key: idx,
5192
+ class: "dao-progress__stacked-item",
5193
+ style: normalizeStyle(stackedStyle)
5194
+ }, null, 4);
5195
+ }), 128))
5196
+ ]))
5197
+ ], 4),
5198
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_3$2, [
5199
+ renderSlot(_ctx.$slots, "default")
5200
+ ])) : createCommentVNode("", true)
5201
+ ]);
3766
5202
  }
3767
- var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]);
3768
- var option_vue_vue_type_style_index_0_lang = "";
5203
+ var progress = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7]]);
5204
+ var radio_vue_vue_type_style_index_0_lang = "";
3769
5205
  const _sfc_main$7 = defineComponent({
3770
- name: "DaoOption",
5206
+ name: "DaoRadio",
3771
5207
  props: {
5208
+ modelValue: {
5209
+ type: [String, Number, Boolean],
5210
+ default: false
5211
+ },
3772
5212
  value: {
3773
- type: [Number, String, Boolean],
3774
- required: true
5213
+ type: [String, Number, Boolean],
5214
+ required: true,
5215
+ default: ""
3775
5216
  },
3776
5217
  label: {
3777
- type: [Number, String],
3778
- default: void 0
5218
+ type: String,
5219
+ default: ""
3779
5220
  },
3780
5221
  disabled: {
3781
5222
  type: Boolean,
3782
5223
  default: false
5224
+ },
5225
+ name: {
5226
+ type: String,
5227
+ default: ""
3783
5228
  }
3784
5229
  },
3785
- setup(props) {
3786
- const addFn = inject("add");
3787
- const onSelectFn = inject("onSelect");
3788
- const removeFn = inject("remove");
3789
- const selectState = inject("selectState");
3790
- const labelValue = computed(() => {
3791
- if (props.label === null || props.label === void 0) {
3792
- return props.value;
5230
+ emits: ["update:modelValue", "change"],
5231
+ setup(props, { emit }) {
5232
+ const { value, disabled } = toRefs(props);
5233
+ const radioGroup2 = inject(radioGroupKey, void 0);
5234
+ const isGroup = computed(() => !!radioGroup2);
5235
+ const modelValue = computed(() => isGroup.value ? radioGroup2 == null ? void 0 : radioGroup2.modelValue : props.modelValue);
5236
+ const currentValue = ref(modelValue.value === value.value);
5237
+ const wrapClasses = computed(() => [
5238
+ "dao-radio-wrapper",
5239
+ {
5240
+ "dao-radio-wrapper--disabled": disabled.value
3793
5241
  }
3794
- return props.label;
3795
- });
3796
- const instance = reactive({
3797
- label: props.label,
3798
- value: props.value,
3799
- labelValue: labelValue.value,
3800
- visible: true,
3801
- setVisible(val) {
3802
- instance.visible = val;
5242
+ ]);
5243
+ const radioClasses = computed(() => [
5244
+ "dao-radio",
5245
+ {
5246
+ "dao-radio--checked": currentValue.value,
5247
+ "dao-radio--disabled": disabled.value
3803
5248
  }
3804
- });
3805
- const visible = computed(() => instance.visible);
3806
- const isSelected = computed(() => {
3807
- var _a;
3808
- return ((_a = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a.value) === instance.value;
3809
- });
3810
- const onClick = () => {
3811
- if (!props.disabled && typeof onSelectFn === "function") {
3812
- onSelectFn(instance);
5249
+ ]);
5250
+ const change = (event) => {
5251
+ if (disabled.value) {
5252
+ return;
5253
+ }
5254
+ const { checked } = event.target;
5255
+ currentValue.value = checked;
5256
+ if (isGroup.value) {
5257
+ radioGroup2 == null ? void 0 : radioGroup2.changeEvent(value.value);
5258
+ } else {
5259
+ emit("update:modelValue", value.value);
5260
+ emit("change", value.value);
3813
5261
  }
3814
5262
  };
3815
- if (typeof addFn === "function") {
3816
- addFn(instance);
5263
+ const updateValue = () => {
5264
+ currentValue.value = modelValue.value === value.value;
5265
+ };
5266
+ watch(modelValue, () => updateValue());
5267
+ return {
5268
+ currentValue,
5269
+ wrapClasses,
5270
+ radioClasses,
5271
+ change
5272
+ };
5273
+ }
5274
+ });
5275
+ const _hoisted_1$5 = ["disabled", "name", "checked"];
5276
+ const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
5277
+ const _hoisted_3$1 = {
5278
+ key: 0,
5279
+ class: "dao-radio__label-wrapper"
5280
+ };
5281
+ const _hoisted_4$1 = {
5282
+ key: 0,
5283
+ class: "dao-radio__label"
5284
+ };
5285
+ const _hoisted_5$1 = {
5286
+ key: 1,
5287
+ class: "dao-radio__help"
5288
+ };
5289
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
5290
+ return openBlock(), createElementBlock("label", {
5291
+ class: normalizeClass(_ctx.wrapClasses)
5292
+ }, [
5293
+ createElementVNode("span", {
5294
+ class: normalizeClass(_ctx.radioClasses)
5295
+ }, [
5296
+ createElementVNode("input", {
5297
+ type: "radio",
5298
+ class: "dao-radio-input",
5299
+ disabled: _ctx.disabled,
5300
+ name: _ctx.name,
5301
+ checked: _ctx.currentValue,
5302
+ onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
5303
+ }, null, 40, _hoisted_1$5),
5304
+ _hoisted_2$3
5305
+ ], 2),
5306
+ _ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
5307
+ _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
5308
+ renderSlot(_ctx.$slots, "default", {}, () => [
5309
+ createTextVNode(toDisplayString(_ctx.label), 1)
5310
+ ])
5311
+ ])) : createCommentVNode("", true),
5312
+ _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
5313
+ renderSlot(_ctx.$slots, "helper")
5314
+ ])) : createCommentVNode("", true)
5315
+ ])) : createCommentVNode("", true)
5316
+ ], 2);
5317
+ }
5318
+ var radio = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]);
5319
+ var radioGroup_vue_vue_type_style_index_0_lang = "";
5320
+ const _sfc_main$6 = defineComponent({
5321
+ name: "DaoRadioGroup",
5322
+ props: {
5323
+ modelValue: {
5324
+ type: [String, Number, Boolean],
5325
+ default: false
5326
+ },
5327
+ vertical: {
5328
+ type: Boolean,
5329
+ default: true
3817
5330
  }
3818
- onBeforeUnmount(() => {
3819
- var _a;
3820
- if (typeof removeFn === "function") {
3821
- const index = (_a = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a : -1;
3822
- removeFn(index);
5331
+ },
5332
+ emits: ["update:modelValue", "change"],
5333
+ setup(props, { emit }) {
5334
+ const { vertical } = toRefs(props);
5335
+ const radioGroupClasses = computed(() => [
5336
+ "dao-radio-group",
5337
+ {
5338
+ "dao-radio-group--vertical": vertical.value,
5339
+ "dao-radio-group--horizontal": !vertical.value
3823
5340
  }
3824
- });
5341
+ ]);
5342
+ const changeEvent = (val) => {
5343
+ emit("update:modelValue", val);
5344
+ emit("change", val);
5345
+ };
5346
+ provide(radioGroupKey, reactive(__spreadProps(__spreadValues({}, toRefs(props)), {
5347
+ changeEvent
5348
+ })));
3825
5349
  return {
3826
- visible,
3827
- labelValue,
3828
- isSelected,
3829
- onClick
5350
+ radioGroupClasses
3830
5351
  };
3831
5352
  }
3832
5353
  });
3833
- const _hoisted_1$6 = ["title"];
3834
- const _hoisted_2$4 = {
3835
- key: 0,
3836
- class: "icon-checked dao-option-checkmark"
3837
- };
3838
- function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
3839
- return withDirectives((openBlock(), createElementBlock("li", {
3840
- class: normalizeClass([
3841
- "dao-option",
3842
- {
3843
- "dao-option-active": _ctx.isSelected,
3844
- "dao-option-disabled": _ctx.disabled
3845
- }
3846
- ]),
3847
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.onClick && _ctx.onClick(...args))
5354
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
5355
+ return openBlock(), createElementBlock("div", {
5356
+ class: normalizeClass(_ctx.radioGroupClasses)
3848
5357
  }, [
3849
- createElementVNode("span", {
3850
- title: String(_ctx.labelValue)
3851
- }, [
3852
- renderSlot(_ctx.$slots, "default", {}, () => [
3853
- createTextVNode(toDisplayString(_ctx.labelValue), 1)
3854
- ])
3855
- ], 8, _hoisted_1$6),
3856
- _ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$4)) : createCommentVNode("", true)
3857
- ], 2)), [
3858
- [vShow, _ctx.visible]
3859
- ]);
5358
+ renderSlot(_ctx.$slots, "default")
5359
+ ], 2);
3860
5360
  }
3861
- var DaoOption = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]);
5361
+ var radioGroup = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
3862
5362
  var switch_vue_vue_type_style_index_0_lang = "";
3863
- const _sfc_main$6 = defineComponent({
5363
+ const _sfc_main$5 = defineComponent({
3864
5364
  name: "DaoSwitch",
3865
5365
  props: {
3866
5366
  modelValue: {
@@ -3915,12 +5415,12 @@ const _sfc_main$6 = defineComponent({
3915
5415
  };
3916
5416
  }
3917
5417
  });
3918
- const _hoisted_1$5 = ["value", "name", "disabled"];
3919
- const _hoisted_2$3 = {
5418
+ const _hoisted_1$4 = ["value", "name", "disabled"];
5419
+ const _hoisted_2$2 = {
3920
5420
  key: 0,
3921
5421
  class: "dao-switch__label"
3922
5422
  };
3923
- function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
5423
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3924
5424
  return openBlock(), createElementBlock("div", {
3925
5425
  class: normalizeClass(["dao-switch", { "dao-switch--disabled": _ctx.disabled, "dao-switch--size-sm": _ctx.size === "sm" }]),
3926
5426
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.toggle && _ctx.toggle(...args))
@@ -3931,16 +5431,16 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
3931
5431
  value: _ctx.currentValue,
3932
5432
  name: _ctx.name,
3933
5433
  disabled: _ctx.disabled
3934
- }, null, 8, _hoisted_1$5),
5434
+ }, null, 8, _hoisted_1$4),
3935
5435
  createElementVNode("span", {
3936
5436
  class: normalizeClass(["dao-switch__pill", { "dao-switch-checked": _ctx.currentValue }])
3937
5437
  }, null, 2),
3938
- _ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(_ctx.currentValue ? _ctx.textOn : _ctx.textOff), 1)) : createCommentVNode("", true)
5438
+ _ctx.showText ? (openBlock(), createElementBlock("span", _hoisted_2$2, toDisplayString(_ctx.currentValue ? _ctx.textOn : _ctx.textOff), 1)) : createCommentVNode("", true)
3939
5439
  ], 2);
3940
5440
  }
3941
- var _switch = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
5441
+ var _switch = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4]]);
3942
5442
  var resizer_vue_vue_type_style_index_0_lang = "";
3943
- const _sfc_main$5 = defineComponent({
5443
+ const _sfc_main$4 = defineComponent({
3944
5444
  name: "DaoResizer",
3945
5445
  props: {
3946
5446
  column: {
@@ -3987,9 +5487,9 @@ const _sfc_main$5 = defineComponent({
3987
5487
  };
3988
5488
  }
3989
5489
  });
3990
- const _hoisted_1$4 = { class: "dao-table-resizer-separator" };
3991
- function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3992
- return openBlock(), createElementBlock("span", _hoisted_1$4, [
5490
+ const _hoisted_1$3 = { class: "dao-table-resizer-separator" };
5491
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5492
+ return openBlock(), createElementBlock("span", _hoisted_1$3, [
3993
5493
  !_ctx.disabled ? (openBlock(), createElementBlock("span", {
3994
5494
  key: 0,
3995
5495
  class: "dao-table-resizer-handle",
@@ -3999,202 +5499,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
3999
5499
  }, null, 32)) : createCommentVNode("", true)
4000
5500
  ]);
4001
5501
  }
4002
- var DaoResizer = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4]]);
4003
- const paginationProps = {
4004
- pageSize: {
4005
- type: Number,
4006
- required: true,
4007
- default: 10,
4008
- validator: (val) => val > 0 && Math.floor(val) === val
4009
- },
4010
- pageSizeOptions: {
4011
- type: Array,
4012
- default: () => []
4013
- },
4014
- pageFormat: {
4015
- type: Function,
4016
- default: (val) => `${val} per page`
4017
- },
4018
- compact: {
4019
- type: Boolean,
4020
- default: false
4021
- },
4022
- total: {
4023
- type: Number,
4024
- required: true,
4025
- default: 0
4026
- },
4027
- totalFormat: {
4028
- type: Function,
4029
- default: (val) => `Total ${val} ${val === 1 ? "record" : "records"}`
4030
- },
4031
- currentPage: {
4032
- type: Number,
4033
- default: 1
4034
- },
4035
- pageSizerWidth: {
4036
- type: Number,
4037
- default: 110
4038
- }
4039
- };
4040
- var pagination_vue_vue_type_style_index_0_lang = "";
4041
- const numberAscSort = (a, b) => a - b;
4042
- const _sfc_main$4 = defineComponent({
4043
- name: "DaoPagination",
4044
- components: {
4045
- DaoSelect,
4046
- DaoOption
4047
- },
4048
- props: paginationProps,
4049
- emits: [
4050
- "update:page-size",
4051
- "update:current-page",
4052
- "next",
4053
- "prev",
4054
- "page-change",
4055
- "size-change"
4056
- ],
4057
- setup(props, { emit }) {
4058
- const { currentPage } = toRefs(props);
4059
- const currentShowPage = ref(currentPage.value);
4060
- const totalText = computed(() => props.totalFormat(props.total));
4061
- const totalPage = computed(() => Math.ceil(props.total / props.pageSize));
4062
- const computedPageSizeOptions = computed(() => {
4063
- if (!props.pageSizeOptions.length) {
4064
- return [props.pageSize];
4065
- }
4066
- const filteredPageSizeOptions = props.pageSizeOptions.filter((i) => {
4067
- const res = i > 0 && Math.floor(i) === i;
4068
- return res;
4069
- });
4070
- if (props.pageSizeOptions.includes(props.pageSize)) {
4071
- return [...filteredPageSizeOptions].sort(numberAscSort);
4072
- }
4073
- return [...filteredPageSizeOptions, props.pageSize].sort(numberAscSort);
4074
- });
4075
- const prevPage = () => {
4076
- if (currentPage.value === 1) {
4077
- return;
4078
- }
4079
- const curPage = currentPage.value - 1;
4080
- emit("update:current-page", curPage);
4081
- emit("prev", curPage);
4082
- };
4083
- const nextPage = () => {
4084
- if (currentPage.value === totalPage.value) {
4085
- return;
4086
- }
4087
- const curPage = currentPage.value + 1;
4088
- emit("update:current-page", curPage);
4089
- emit("next", curPage);
4090
- };
4091
- const targetPage = () => {
4092
- let { value } = currentShowPage;
4093
- if (!value) {
4094
- currentShowPage.value = currentPage.value;
4095
- return;
4096
- }
4097
- if (value > totalPage.value) {
4098
- value = totalPage.value;
4099
- }
4100
- currentShowPage.value = value;
4101
- emit("update:current-page", value);
4102
- emit("page-change", value);
4103
- };
4104
- watch(currentPage, (val) => {
4105
- currentShowPage.value = val;
4106
- });
4107
- watch(totalPage, (val) => {
4108
- if (currentShowPage.value > val) {
4109
- currentShowPage.value = val;
4110
- emit("update:current-page", val);
4111
- }
4112
- });
4113
- const updatePageSize = (val) => {
4114
- currentShowPage.value = currentPage.value;
4115
- emit("update:page-size", val);
4116
- emit("size-change", val);
4117
- };
4118
- const currentShowPageFormat = () => {
4119
- if (!currentShowPage.value) {
4120
- return;
4121
- }
4122
- currentShowPage.value = parseInt(currentShowPage.value.toString().replace(/[^0-9]/g, ""), 10) || "";
4123
- };
4124
- return {
4125
- currentShowPage,
4126
- totalText,
4127
- totalPage,
4128
- computedPageSizeOptions,
4129
- prevPage,
4130
- nextPage,
4131
- targetPage,
4132
- updatePageSize,
4133
- currentShowPageFormat
4134
- };
4135
- }
4136
- });
4137
- const _hoisted_1$3 = { class: "dao-pagination__total" };
4138
- const _hoisted_2$2 = { class: "dao-pagination__pager" };
4139
- const _hoisted_3$1 = ["disabled"];
4140
- const _hoisted_4$1 = { class: "dao-pagination__pager-total" };
4141
- function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
4142
- const _component_dao_option = resolveComponent("dao-option");
4143
- const _component_dao_select = resolveComponent("dao-select");
4144
- return openBlock(), createElementBlock("div", {
4145
- class: normalizeClass(["dao-pagination", { "dao-pagination--compact": _ctx.compact }])
4146
- }, [
4147
- createElementVNode("div", _hoisted_1$3, toDisplayString(_ctx.totalText), 1),
4148
- createElementVNode("div", _hoisted_2$2, [
4149
- createElementVNode("i", {
4150
- class: normalizeClass([
4151
- "icon-arrow-previous",
4152
- "dao-pagination__pager-prev",
4153
- { "dao-pagination__pager-icon--disabled": _ctx.currentPage === 1 }
4154
- ]),
4155
- onClick: _cache[0] || (_cache[0] = (...args) => _ctx.prevPage && _ctx.prevPage(...args))
4156
- }, null, 2),
4157
- withDirectives(createElementVNode("input", {
4158
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.currentShowPage = $event),
4159
- class: "dao-pagination__pager-current",
4160
- disabled: _ctx.totalPage === 1,
4161
- onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
4162
- onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
4163
- }, null, 40, _hoisted_3$1), [
4164
- [vModelText, _ctx.currentShowPage]
4165
- ]),
4166
- createElementVNode("span", _hoisted_4$1, " / " + toDisplayString(_ctx.totalPage), 1),
4167
- createElementVNode("i", {
4168
- class: normalizeClass([
4169
- "icon-arrow-next",
4170
- "dao-pagination__pager-next",
4171
- { "dao-pagination__pager-icon--disabled": _ctx.currentPage === _ctx.totalPage }
4172
- ]),
4173
- onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextPage && _ctx.nextPage(...args))
4174
- }, null, 2)
4175
- ]),
4176
- createVNode(_component_dao_select, {
4177
- class: "dao-pagination__sizer",
4178
- "model-value": _ctx.pageSize,
4179
- size: "sm",
4180
- style: normalizeStyle({ width: `${_ctx.pageSizerWidth}px` }),
4181
- "menu-class": "dao-pagination__sizer-menu",
4182
- onChange: _ctx.updatePageSize
4183
- }, {
4184
- default: withCtx(() => [
4185
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.computedPageSizeOptions, (size) => {
4186
- return openBlock(), createBlock(_component_dao_option, {
4187
- key: size,
4188
- value: size,
4189
- label: _ctx.pageFormat(size)
4190
- }, null, 8, ["value", "label"]);
4191
- }), 128))
4192
- ]),
4193
- _: 1
4194
- }, 8, ["model-value", "style", "onChange"])
4195
- ], 2);
4196
- }
4197
- var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
5502
+ var DaoResizer = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
4198
5503
  const tableProps = {
4199
5504
  id: {
4200
5505
  type: String,
@@ -4409,9 +5714,9 @@ const _sfc_main$3 = defineComponent({
4409
5714
  const isRowSelected = (row) => selectedRows.has(row);
4410
5715
  const toggleExpand = (row, rowIndex) => {
4411
5716
  expandedRows.add(row);
4412
- const index = expandRows.indexOf(row);
4413
- if (index > -1) {
4414
- expandRows.splice(index, 1);
5717
+ const index2 = expandRows.indexOf(row);
5718
+ if (index2 > -1) {
5719
+ expandRows.splice(index2, 1);
4415
5720
  emit("expandToggle", row, rowIndex, false);
4416
5721
  } else {
4417
5722
  expandRows.push(row);
@@ -4620,8 +5925,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
4620
5925
  ])
4621
5926
  ])) : createCommentVNode("", true),
4622
5927
  createElementVNode("tbody", _hoisted_9, [
4623
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index) => {
4624
- return openBlock(), createElementBlock(Fragment, { key: index }, [
5928
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
5929
+ return openBlock(), createElementBlock(Fragment, { key: index2 }, [
4625
5930
  createElementVNode("tr", {
4626
5931
  class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }])
4627
5932
  }, [
@@ -4634,7 +5939,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
4634
5939
  _ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
4635
5940
  createElementVNode("i", {
4636
5941
  class: "dao-table-expand-toggle icon-arrow-sharp",
4637
- onClick: ($event) => _ctx.toggleExpand(row, index)
5942
+ onClick: ($event) => _ctx.toggleExpand(row, index2)
4638
5943
  }, null, 8, _hoisted_12)
4639
5944
  ])) : createCommentVNode("", true),
4640
5945
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
@@ -4646,15 +5951,17 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
4646
5951
  renderSlot(_ctx.$slots, `td-${column.id}`, {
4647
5952
  value: row[column.id],
4648
5953
  row,
4649
- rowIndex: index
4650
- })
5954
+ rowIndex: index2
5955
+ }, () => [
5956
+ createElementVNode("span", null, toDisplayString(row[column.id]), 1)
5957
+ ])
4651
5958
  ], 4);
4652
5959
  }), 128))
4653
5960
  ], 2),
4654
5961
  _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
4655
5962
  renderSlot(_ctx.$slots, "expand", {
4656
5963
  row,
4657
- rowIndex: index
5964
+ rowIndex: index2
4658
5965
  })
4659
5966
  ], 512)), [
4660
5967
  [vShow, _ctx.isRowExpanded(row)]
@@ -4790,7 +6097,7 @@ const _sfc_main$2 = defineComponent({
4790
6097
  }
4791
6098
  emit("click", event, value);
4792
6099
  };
4793
- const tabsLi = computed(() => props.tabList.map((tab, index) => {
6100
+ const tabsLi = computed(() => props.tabList.map((tab, index2) => {
4794
6101
  const { label } = tab;
4795
6102
  const isNotString = typeof label !== "string";
4796
6103
  const isActive = tab.value === props.currentTab;
@@ -4804,7 +6111,7 @@ const _sfc_main$2 = defineComponent({
4804
6111
  "dao-tab-nav-item--disabled": tab.disabled
4805
6112
  },
4806
6113
  ref: hasActiveLine ? activeTab : void 0,
4807
- key: index,
6114
+ key: index2,
4808
6115
  onClick: (event) => handleClick(event, tab),
4809
6116
  onMouseenter: hasHoverLine ? onMouseenter : void 0,
4810
6117
  onMouseleave: hasHoverLine ? onMouseleave : void 0
@@ -4872,16 +6179,16 @@ const _sfc_main$1 = defineComponent({
4872
6179
  if (!child.value) {
4873
6180
  return;
4874
6181
  }
4875
- const index = Array.from(((_a = tabBody.value) == null ? void 0 : _a.children) || []).indexOf(child.value);
4876
- if (index > -1) {
4877
- tabList.splice(index, 0, tab);
6182
+ const index2 = Array.from(((_a = tabBody.value) == null ? void 0 : _a.children) || []).indexOf(child.value);
6183
+ if (index2 > -1) {
6184
+ tabList.splice(index2, 0, tab);
4878
6185
  }
4879
6186
  };
4880
6187
  provide(addTabFnKey, addTab);
4881
6188
  const removeTab = (tab) => {
4882
- const index = tabList.indexOf(tab);
4883
- if (index > -1) {
4884
- tabList.splice(index, 1);
6189
+ const index2 = tabList.indexOf(tab);
6190
+ if (index2 > -1) {
6191
+ tabList.splice(index2, 1);
4885
6192
  }
4886
6193
  };
4887
6194
  provide(removeTabFnKey, removeTab);
@@ -4960,23 +6267,36 @@ var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
4960
6267
  var components = /* @__PURE__ */ Object.freeze({
4961
6268
  __proto__: null,
4962
6269
  [Symbol.toStringTag]: "Module",
6270
+ ActionIcon: actionIcon,
4963
6271
  Button: DaoButton,
4964
6272
  ButtonGroup: buttonGroup,
6273
+ Card: card,
6274
+ CardItem: cardItem,
4965
6275
  Checkbox: DaoCheckbox,
4966
6276
  CheckboxGroup: checkboxGroup,
4967
6277
  Dialog: dialog,
4968
6278
  DialogFooter,
4969
6279
  DialogHeader,
6280
+ Drawer: drawer,
4970
6281
  Dropdown: dropdown,
4971
6282
  DropdownMenu: dropdownMenu,
4972
6283
  DropdownItem: dropdownItem,
4973
6284
  Form: form,
4974
6285
  FormItem: formItem,
4975
6286
  FormGroup: formGroup,
6287
+ Header: header,
6288
+ Breadcrumb: breadcrumb,
6289
+ BreadcrumbItem: DaoBreadcrumbItem,
4976
6290
  Icon: DaoIcon,
4977
6291
  Input: input,
4978
- Popover: _sfc_main$c,
4979
- Popper: DaoPopper,
6292
+ Message: message,
6293
+ Nav: nav,
6294
+ NavHead: navHead,
6295
+ NavItem: navItem,
6296
+ NavSub: navSub,
6297
+ Pagination: DaoPagination,
6298
+ Popover: _sfc_main$9,
6299
+ Popper,
4980
6300
  Progress: progress,
4981
6301
  Radio: radio,
4982
6302
  RadioGroup: radioGroup,
@@ -4987,23 +6307,19 @@ var components = /* @__PURE__ */ Object.freeze({
4987
6307
  Tabs: tabs,
4988
6308
  TabNav: _sfc_main$2,
4989
6309
  TabItem: tabItem,
4990
- Tooltip: _sfc_main$g
6310
+ Tooltip: _sfc_main$o
4991
6311
  });
4992
6312
  var common = "";
4993
- const plugin$1 = (app) => {
6313
+ var alias = "";
6314
+ const plugin = (app) => {
4994
6315
  Object.values(components).forEach((c) => {
4995
6316
  app.component(c.name, c);
4996
6317
  });
4997
6318
  };
4998
- let installed = false;
4999
- function install(Vue) {
5000
- if (installed) {
5001
- return;
5002
- }
5003
- Vue.use(plugin$1);
5004
- installed = true;
5005
- }
5006
- var plugin = {
6319
+ const install = (Vue) => {
6320
+ Vue.use(plugin);
6321
+ };
6322
+ var index = {
5007
6323
  install
5008
6324
  };
5009
- export { plugin as default };
6325
+ export { actionIcon as ActionIcon, breadcrumb as Breadcrumb, DaoBreadcrumbItem as BreadcrumbItem, DaoButton as Button, buttonGroup as ButtonGroup, card as Card, cardItem as CardItem, DaoCheckbox as Checkbox, checkboxGroup as CheckboxGroup, dialog as Dialog, DialogFooter, DialogHeader, drawer as Drawer, dropdown as Dropdown, dropdownItem as DropdownItem, dropdownMenu as DropdownMenu, form as Form, formGroup as FormGroup, formItem as FormItem, header as Header, DaoIcon as Icon, input as Input, message as Message, nav as Nav, navHead as NavHead, navItem as NavItem, navSub as NavSub, DaoOption as Option, DaoPagination as Pagination, _sfc_main$9 as Popover, Popper, progress as Progress, radio as Radio, radioGroup as RadioGroup, DaoSelect as Select, _switch as Switch, tabItem as TabItem, _sfc_main$2 as TabNav, table as Table, tabs as Tabs, _sfc_main$o as Tooltip, index as default };