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

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 (35) hide show
  1. package/dist/components/button/button.vue.d.ts +2 -0
  2. package/dist/components/checkbox/checkbox-group.vue.d.ts +3 -2
  3. package/dist/components/checkbox/checkbox.vue.d.ts +14 -12
  4. package/dist/components/checkbox/props.d.ts +1 -0
  5. package/dist/components/dialog/dialog.vue.d.ts +2 -2
  6. package/dist/components/drawer/drawer.vue.d.ts +2 -1
  7. package/dist/components/expansion/expansion-item.vue.d.ts +36 -0
  8. package/dist/components/expansion/expansion.vue.d.ts +29 -0
  9. package/dist/components/expansion/index.d.ts +3 -0
  10. package/dist/components/expansion/props.d.ts +30 -0
  11. package/dist/components/expansion/test/expansion-item.spec.d.ts +1 -0
  12. package/dist/components/expansion/test/expansion.spec.d.ts +1 -0
  13. package/dist/components/form/form-item.vue.d.ts +7 -0
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/input/input.vue.d.ts +3 -0
  16. package/dist/components/nav/nav-item.vue.d.ts +2 -2
  17. package/dist/components/nav/nav-sub.vue.d.ts +2 -2
  18. package/dist/components/pagination/pagination-props.d.ts +5 -0
  19. package/dist/components/pagination/pagination.vue.d.ts +19 -5
  20. package/dist/components/popper/popper.vue.d.ts +1 -1
  21. package/dist/components/select/option.vue.d.ts +5 -0
  22. package/dist/components/select/select.vue.d.ts +14 -1
  23. package/dist/components/select/types.d.ts +3 -0
  24. package/dist/components/table/table-props.d.ts +12 -0
  25. package/dist/components/table/table.vue.d.ts +31 -7
  26. package/dist/components/tabs/tabs.vue.d.ts +1 -1
  27. package/dist/dao-style.es.js +1051 -450
  28. package/dist/dao-style.umd.js +1 -1
  29. package/dist/style.css +1 -1
  30. package/dist/styles/color/alias.json +4 -4
  31. package/dist/styles/color/alias.scss +4 -4
  32. package/dist/utils/constant.d.ts +8 -4
  33. package/package.json +3 -1
  34. package/volar.d.ts +2 -0
  35. package/dist/components/button/button-icon.vue.d.ts +0 -20
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
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";
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, createTextVNode, toDisplayString, ref, inject, watchEffect, mergeProps, provide, readonly, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withDirectives, vShow, withKeys, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, reactive, renderList, getCurrentScope, onScopeDispose, vModelText, onUnmounted, h } from "vue";
21
21
  import { isArray, isSet, looseIndexOf, looseEqual, isFunction, NOOP } from "@vue/shared";
22
22
  var actionIcon_vue_vue_type_style_index_0_lang = "";
23
23
  var _export_sfc = (sfc, props) => {
@@ -26,7 +26,7 @@ var _export_sfc = (sfc, props) => {
26
26
  }
27
27
  return sfc;
28
28
  };
29
- const _sfc_main$H = defineComponent({
29
+ const _sfc_main$I = defineComponent({
30
30
  name: "DaoActionIcon",
31
31
  props: {
32
32
  name: {
@@ -55,8 +55,8 @@ const _sfc_main$H = defineComponent({
55
55
  };
56
56
  }
57
57
  });
58
- const _hoisted_1$v = ["disabled"];
59
- function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
58
+ const _hoisted_1$w = ["disabled"];
59
+ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
60
60
  return openBlock(), createElementBlock("button", {
61
61
  class: normalizeClass(["dao-action-icon", `dao-action-icon--type-${_ctx.type}`]),
62
62
  disabled: _ctx.realDisabled,
@@ -68,9 +68,9 @@ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
68
68
  class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
69
69
  }, null, 2)) : createCommentVNode("", true)
70
70
  ])
71
- ], 10, _hoisted_1$v);
71
+ ], 10, _hoisted_1$w);
72
72
  }
73
- var actionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$D]]);
73
+ var DaoActionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["render", _sfc_render$F]]);
74
74
  const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
75
75
  var buttonProps = {
76
76
  type: {
@@ -109,7 +109,7 @@ var buttonProps = {
109
109
  }
110
110
  };
111
111
  var icon_scss_vue_type_style_index_0_src_lang = "";
112
- const _sfc_main$G = defineComponent({
112
+ const _sfc_main$H = defineComponent({
113
113
  name: "DaoIcon",
114
114
  props: {
115
115
  name: {
@@ -122,55 +122,31 @@ const _sfc_main$G = defineComponent({
122
122
  }
123
123
  }
124
124
  });
125
- const _hoisted_1$u = {
125
+ const _hoisted_1$v = {
126
126
  key: 1,
127
127
  class: "dao-icon dao-svg-icon"
128
128
  };
129
- const _hoisted_2$k = ["xlink:href"];
130
- function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
129
+ const _hoisted_2$l = ["xlink:href"];
130
+ function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
131
131
  return _ctx.useFont ? (openBlock(), createElementBlock("i", {
132
132
  key: 0,
133
133
  class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
134
- }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$u, [
134
+ }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$v, [
135
135
  createElementVNode("use", {
136
136
  "xlink:href": `#${_ctx.name}`
137
- }, null, 8, _hoisted_2$k)
137
+ }, null, 8, _hoisted_2$l)
138
138
  ]));
139
139
  }
140
- var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$C]]);
141
- const _sfc_main$F = /* @__PURE__ */ defineComponent({
142
- props: {
143
- useFont: {
144
- type: Boolean,
145
- default: false
146
- },
147
- iconName: {
148
- type: String,
149
- default: ""
150
- }
151
- },
152
- setup(__props) {
153
- return (_ctx, _cache) => {
154
- return !__props.useFont ? (openBlock(), createBlock(DaoIcon, {
155
- key: 0,
156
- class: "dao-btn__icon",
157
- name: __props.iconName
158
- }, null, 8, ["name"])) : (openBlock(), createElementBlock("i", {
159
- key: 1,
160
- class: normalizeClass(["dao-btn__iconfont", __props.iconName])
161
- }, null, 2));
162
- };
163
- }
164
- });
140
+ var DaoIcon = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["render", _sfc_render$E]]);
165
141
  var button_vue_vue_type_style_index_0_lang = "";
166
142
  const NO_ICON = Symbol(0);
167
143
  const RIGHT_ICON = Symbol(1);
168
144
  const LEFT_ICON = Symbol(2);
169
145
  const BOTH_ICON = Symbol(3);
170
- const _sfc_main$E = defineComponent({
146
+ const _sfc_main$G = defineComponent({
171
147
  name: "DaoButton",
172
148
  components: {
173
- DaoButtonIcon: _sfc_main$F
149
+ DaoIcon
174
150
  },
175
151
  props: buttonProps,
176
152
  emits: ["click"],
@@ -220,6 +196,8 @@ const _sfc_main$E = defineComponent({
220
196
  }
221
197
  return props.iconRight;
222
198
  });
199
+ const leftIconClassName = computed(() => isIconLeftFont.value ? "dao-btn__iconfont" : "dao-btn__icon");
200
+ const rightIconClassName = computed(() => isIconRightFont.value ? "dao-btn__iconfont" : "dao-btn__icon");
223
201
  const classList = computed(() => {
224
202
  const unrefIconState = unref(iconState);
225
203
  const list = [
@@ -250,53 +228,57 @@ const _sfc_main$E = defineComponent({
250
228
  isIconLeftFont,
251
229
  realIconLeft,
252
230
  isIconRightFont,
253
- realIconRight
231
+ realIconRight,
232
+ leftIconClassName,
233
+ rightIconClassName
254
234
  };
255
235
  }
256
236
  });
257
- const _hoisted_1$t = ["disabled"];
258
- const _hoisted_2$j = {
237
+ const _hoisted_1$u = ["disabled"];
238
+ const _hoisted_2$k = {
259
239
  key: 1,
260
240
  class: "dao-btn__text"
261
241
  };
262
- function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
263
- const _component_dao_button_icon = resolveComponent("dao-button-icon");
242
+ function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
243
+ const _component_dao_icon = resolveComponent("dao-icon");
264
244
  return openBlock(), createElementBlock("button", {
265
245
  class: normalizeClass(_ctx.classList),
266
246
  disabled: _ctx.realDisabled,
267
247
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
268
248
  }, [
269
249
  _ctx.isSimpleButton ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
270
- _ctx.realIconLeft ? (openBlock(), createBlock(_component_dao_button_icon, {
250
+ _ctx.realIconLeft ? (openBlock(), createBlock(_component_dao_icon, {
271
251
  key: 0,
252
+ class: normalizeClass(_ctx.leftIconClassName),
272
253
  "use-font": _ctx.isIconLeftFont,
273
- "icon-name": _ctx.realIconLeft
274
- }, null, 8, ["use-font", "icon-name"])) : createCommentVNode("", true),
275
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$j, [
254
+ name: _ctx.realIconLeft
255
+ }, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true),
256
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_2$k, [
276
257
  renderSlot(_ctx.$slots, "default")
277
258
  ])) : createCommentVNode("", true),
278
- _ctx.realIconRight ? (openBlock(), createBlock(_component_dao_button_icon, {
259
+ _ctx.realIconRight ? (openBlock(), createBlock(_component_dao_icon, {
279
260
  key: 2,
261
+ class: normalizeClass(_ctx.rightIconClassName),
280
262
  "use-font": _ctx.isIconRightFont,
281
- "icon-name": _ctx.realIconRight
282
- }, null, 8, ["use-font", "icon-name"])) : createCommentVNode("", true)
263
+ name: _ctx.realIconRight
264
+ }, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true)
283
265
  ], 64))
284
- ], 10, _hoisted_1$t);
266
+ ], 10, _hoisted_1$u);
285
267
  }
286
- var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$B]]);
268
+ var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["render", _sfc_render$D]]);
287
269
  var buttonGroup_vue_vue_type_style_index_0_lang = "";
288
- const _sfc_main$D = defineComponent({
270
+ const _sfc_main$F = defineComponent({
289
271
  name: "DaoButtonGroup"
290
272
  });
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, [
273
+ const _hoisted_1$t = { class: "dao-btn-group" };
274
+ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
275
+ return openBlock(), createElementBlock("div", _hoisted_1$t, [
294
276
  renderSlot(_ctx.$slots, "default")
295
277
  ]);
296
278
  }
297
- var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$A]]);
279
+ var buttonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["render", _sfc_render$C]]);
298
280
  var card_scss_vue_type_style_index_0_src_lang = "";
299
- const _sfc_main$C = defineComponent({
281
+ const _sfc_main$E = defineComponent({
300
282
  name: "DaoCard",
301
283
  components: {
302
284
  DaoIcon
@@ -324,25 +306,25 @@ const _sfc_main$C = defineComponent({
324
306
  }
325
307
  }
326
308
  });
327
- const _hoisted_1$r = {
309
+ const _hoisted_1$s = {
328
310
  key: 0,
329
311
  class: "dao-card-header"
330
312
  };
331
- const _hoisted_2$i = {
313
+ const _hoisted_2$j = {
332
314
  key: 0,
333
315
  class: "dao-card-header-item"
334
316
  };
335
317
  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) {
318
+ const _hoisted_4$a = { class: "dao-card-header-item dao-card-header-action" };
319
+ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
338
320
  const _component_dao_icon = resolveComponent("dao-icon");
339
321
  return openBlock(), createElementBlock("div", {
340
322
  class: normalizeClass(["dao-card", `dao-card--${_ctx.type}`])
341
323
  }, [
342
- _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$r, [
324
+ _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$s, [
343
325
  renderSlot(_ctx.$slots, "header", {}, () => [
344
326
  renderSlot(_ctx.$slots, "header-prefix"),
345
- _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
327
+ _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$j, [
346
328
  renderSlot(_ctx.$slots, "icon", {}, () => [
347
329
  _ctx.icon ? (openBlock(), createBlock(_component_dao_icon, {
348
330
  key: 0,
@@ -357,7 +339,7 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
357
339
  createTextVNode(toDisplayString(_ctx.title), 1)
358
340
  ])
359
341
  ]),
360
- createElementVNode("div", _hoisted_4$b, [
342
+ createElementVNode("div", _hoisted_4$a, [
361
343
  renderSlot(_ctx.$slots, "action")
362
344
  ]),
363
345
  renderSlot(_ctx.$slots, "header-suffix")
@@ -379,18 +361,18 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
379
361
  ], 2)
380
362
  ], 2);
381
363
  }
382
- var card = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$z]]);
364
+ var card = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$B]]);
383
365
  var cardItem_scss_vue_type_style_index_0_src_lang = "";
384
- const _sfc_main$B = defineComponent({
366
+ const _sfc_main$D = defineComponent({
385
367
  name: "DaoCardItem"
386
368
  });
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, [
369
+ const _hoisted_1$r = { class: "dao-card-item" };
370
+ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
371
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
390
372
  renderSlot(_ctx.$slots, "default")
391
373
  ]);
392
374
  }
393
- var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$y]]);
375
+ var cardItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["render", _sfc_render$A]]);
394
376
  function isNullish(val) {
395
377
  return val === null || val === void 0;
396
378
  }
@@ -422,9 +404,19 @@ const formLabelWidthKey = Symbol("formLabelWidthKey");
422
404
  const navRootKey = Symbol("rootNav");
423
405
  const navSubKey = Symbol("subNav");
424
406
  const breadcrumbKey = Symbol("breadcrumbKey");
407
+ const ToggleItemKey = Symbol("toggleItem");
408
+ const ExpansionStateKey = Symbol("expansionProps");
425
409
  var checkbox_vue_vue_type_style_index_0_lang = "";
426
- const modelValueAny = [String, Number, Boolean, Symbol, Object, Set, Array];
427
- const _sfc_main$A = defineComponent({
410
+ const modelValueAny = [String, Number, Boolean, BigInt, Symbol, Object, Set, Array];
411
+ function getUnrefItem(set, item) {
412
+ const tempArray = Array.from(set);
413
+ const index2 = looseIndexOf(tempArray, item);
414
+ return {
415
+ unrefItem: tempArray[index2],
416
+ index: index2
417
+ };
418
+ }
419
+ const _sfc_main$C = defineComponent({
428
420
  name: "DaoCheckbox",
429
421
  props: {
430
422
  modelValue: {
@@ -478,7 +470,8 @@ const _sfc_main$A = defineComponent({
478
470
  if (isArray(modelValue)) {
479
471
  currentChecked.value = looseIndexOf(modelValue, value) > -1;
480
472
  } else if (isSet(modelValue)) {
481
- currentChecked.value = modelValue.has(value);
473
+ const { index: index2 } = getUnrefItem(modelValue, value);
474
+ currentChecked.value = index2 > -1;
482
475
  } else {
483
476
  currentChecked.value = looseEqual(modelValue, trueValue);
484
477
  }
@@ -533,7 +526,13 @@ const _sfc_main$A = defineComponent({
533
526
  if (checked) {
534
527
  cloned.add(value);
535
528
  } else {
536
- cloned.delete(value);
529
+ const {
530
+ unrefItem,
531
+ index: index2
532
+ } = getUnrefItem(modelValue, value);
533
+ if (index2 > -1) {
534
+ cloned.delete(unrefItem);
535
+ }
537
536
  }
538
537
  emitModelValue(cloned, event);
539
538
  } else {
@@ -557,21 +556,21 @@ const _sfc_main$A = defineComponent({
557
556
  }
558
557
  }
559
558
  });
560
- const _hoisted_1$p = ["disabled", "indeterminate", "checked"];
561
- const _hoisted_2$h = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
559
+ const _hoisted_1$q = ["disabled", "indeterminate", "checked"];
560
+ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
562
561
  const _hoisted_3$b = {
563
562
  key: 0,
564
563
  class: "dao-checkbox__label"
565
564
  };
566
- const _hoisted_4$a = {
565
+ const _hoisted_4$9 = {
567
566
  key: 0,
568
567
  class: "dao-checkbox__label-text"
569
568
  };
570
- const _hoisted_5$6 = {
569
+ const _hoisted_5$7 = {
571
570
  key: 1,
572
571
  class: "dao-checkbox__label-helper"
573
572
  };
574
- function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
573
+ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
575
574
  return openBlock(), createElementBlock("label", {
576
575
  class: normalizeClass(_ctx.wrapClasses)
577
576
  }, [
@@ -586,14 +585,14 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
586
585
  }, _ctx.$attrs, {
587
586
  checked: _ctx.currentChecked,
588
587
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
589
- }), null, 16, _hoisted_1$p),
590
- _hoisted_2$h
588
+ }), null, 16, _hoisted_1$q),
589
+ _hoisted_2$i
591
590
  ], 2),
592
591
  _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
593
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$a, [
592
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$9, [
594
593
  renderSlot(_ctx.$slots, "default")
595
594
  ])) : createCommentVNode("", true),
596
- _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$6, [
595
+ _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$7, [
597
596
  renderSlot(_ctx.$slots, "helper", {}, () => [
598
597
  createTextVNode(toDisplayString(_ctx.helper), 1)
599
598
  ])
@@ -601,9 +600,9 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
601
600
  ])) : createCommentVNode("", true)
602
601
  ], 2);
603
602
  }
604
- var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
603
+ var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$z]]);
605
604
  var checkboxGroup_vue_vue_type_style_index_0_lang = "";
606
- const _sfc_main$z = defineComponent({
605
+ const _sfc_main$B = defineComponent({
607
606
  name: "DaoCheckboxGroup",
608
607
  props: {
609
608
  modelValue: {
@@ -622,7 +621,7 @@ const _sfc_main$z = defineComponent({
622
621
  props.vertical ? "dao-checkbox-group--vertical" : "dao-checkbox-group--horizontal"
623
622
  ]);
624
623
  if (isArray(props.modelValue) || isSet(props.modelValue)) {
625
- provide(checkboxGroupModelValueKey, computed(() => props.modelValue));
624
+ provide(checkboxGroupModelValueKey, readonly(computed(() => props.modelValue)));
626
625
  }
627
626
  const updateGroupModelValueFn = (modelValue) => {
628
627
  emit("update:modelValue", modelValue);
@@ -637,15 +636,15 @@ const _sfc_main$z = defineComponent({
637
636
  };
638
637
  }
639
638
  });
640
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
639
+ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
641
640
  return openBlock(), createElementBlock("div", {
642
641
  class: normalizeClass(_ctx.checkboxGroupClasses)
643
642
  }, [
644
643
  renderSlot(_ctx.$slots, "default")
645
644
  ], 2);
646
645
  }
647
- var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
648
- const _sfc_main$y = defineComponent({
646
+ var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$y]]);
647
+ const _sfc_main$A = defineComponent({
649
648
  name: "DaoDialogHeader",
650
649
  components: {
651
650
  DaoButton
@@ -668,10 +667,10 @@ const _sfc_main$y = defineComponent({
668
667
  };
669
668
  }
670
669
  });
671
- const _hoisted_1$o = { class: "dao-dialog-header" };
672
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
670
+ const _hoisted_1$p = { class: "dao-dialog__header" };
671
+ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
673
672
  const _component_dao_button = resolveComponent("dao-button");
674
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
673
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
675
674
  renderSlot(_ctx.$slots, "default", {}, () => [
676
675
  createElementVNode("span", null, [
677
676
  renderSlot(_ctx.$slots, "title", {}, () => [
@@ -688,8 +687,8 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
688
687
  ])
689
688
  ]);
690
689
  }
691
- var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
692
- const _sfc_main$x = defineComponent({
690
+ var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
691
+ const _sfc_main$z = defineComponent({
693
692
  name: "DaoDialogFooter",
694
693
  components: {
695
694
  DaoButton
@@ -725,14 +724,14 @@ const _sfc_main$x = defineComponent({
725
724
  };
726
725
  }
727
726
  });
728
- const _hoisted_1$n = { class: "dao-dialog-footer" };
729
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
727
+ const _hoisted_1$o = { class: "dao-dialog__footer" };
728
+ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
730
729
  const _component_dao_button = resolveComponent("dao-button");
731
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
730
+ return openBlock(), createElementBlock("div", _hoisted_1$o, [
732
731
  renderSlot(_ctx.$slots, "default", {}, () => [
733
732
  createVNode(_component_dao_button, {
734
733
  type: "ghost",
735
- class: "dao-dialog-footer-cancel-btn",
734
+ class: "dao-dialog__footer__cancel-btn",
736
735
  onClick: _ctx.onCancel
737
736
  }, {
738
737
  default: withCtx(() => [
@@ -753,13 +752,13 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
753
752
  ])
754
753
  ]);
755
754
  }
756
- var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
755
+ var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
757
756
  var dialog_scss_vue_type_style_index_0_src_lang = "";
758
- const DIALOG_NUM_ATTR = "dao-dialog-num";
757
+ const DIALOG_NUM_ATTR = "dao-dialog__num";
759
758
  const DIALOG_MINIMUM_PADDING = "20px";
760
759
  const DIALOG_DEFAULT_PADDING_TOP = "100px";
761
760
  const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
762
- const _sfc_main$w = defineComponent({
761
+ const _sfc_main$y = defineComponent({
763
762
  name: "DaoDialog",
764
763
  components: {
765
764
  DialogHeader,
@@ -854,7 +853,7 @@ const _sfc_main$w = defineComponent({
854
853
  const computedPaddingBottom = computed(() => middle.value ? DIALOG_MINIMUM_PADDING : bottom2.value);
855
854
  const computedContainerClass = computed(() => [
856
855
  containerClass.value,
857
- `dao-dialog__size-${size.value}`
856
+ `dao-dialog--size-${size.value}`
858
857
  ]);
859
858
  const showHeader = computed(() => typeof header2.value === "boolean" ? header2.value : true);
860
859
  const headerTitle = computed(() => typeof header2.value === "string" ? header2.value : "");
@@ -934,8 +933,8 @@ const _sfc_main$w = defineComponent({
934
933
  };
935
934
  }
936
935
  });
937
- const _hoisted_1$m = { class: "dao-dialog-body" };
938
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
936
+ const _hoisted_1$n = { class: "dao-dialog__body" };
937
+ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
939
938
  const _component_dialog_header = resolveComponent("dialog-header");
940
939
  const _component_dialog_footer = resolveComponent("dialog-footer");
941
940
  return openBlock(), createBlock(Transition, {
@@ -949,11 +948,11 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
949
948
  default: withCtx(() => [
950
949
  _ctx.modelValue ? (openBlock(), createElementBlock("div", {
951
950
  key: 0,
952
- class: normalizeClass(["dao-dialog-backdrop", { middle: _ctx.middle }]),
951
+ class: normalizeClass(["dao-dialog__backdrop", { "dao-dialog__backdrop--middle": _ctx.middle }]),
953
952
  onMousedown: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.onWrapperMousedown && _ctx.onWrapperMousedown(...args), ["self"]))
954
953
  }, [
955
954
  createElementVNode("div", {
956
- class: normalizeClass(["dao-dialog-container", _ctx.computedContainerClass]),
955
+ class: normalizeClass(["dao-dialog__container", _ctx.computedContainerClass]),
957
956
  style: normalizeStyle({
958
957
  "margin-top": _ctx.computedPaddingTop,
959
958
  "margin-bottom": _ctx.computedPaddingBottom
@@ -970,7 +969,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
970
969
  ]),
971
970
  _: 3
972
971
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
973
- createElementVNode("div", _hoisted_1$m, [
972
+ createElementVNode("div", _hoisted_1$n, [
974
973
  renderSlot(_ctx.$slots, "default")
975
974
  ]),
976
975
  _ctx.footer ? (openBlock(), createBlock(_component_dialog_footer, {
@@ -992,7 +991,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
992
991
  _: 3
993
992
  }, 8, ["onBeforeEnter", "onAfterEnter", "onBeforeLeave", "onAfterLeave"]);
994
993
  }
995
- var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
994
+ var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
996
995
  const drawerProps = {
997
996
  modelValue: {
998
997
  type: Boolean,
@@ -1062,13 +1061,14 @@ const trapTabKey = (e, firstTab, lastTab) => {
1062
1061
  }
1063
1062
  };
1064
1063
  var drawer_vue_vue_type_style_index_0_lang = "";
1065
- const _sfc_main$v = defineComponent({
1064
+ const _sfc_main$x = defineComponent({
1066
1065
  name: "DaoDrawer",
1067
1066
  components: {
1068
- DaoButton
1067
+ DaoButton,
1068
+ DaoActionIcon
1069
1069
  },
1070
1070
  props: drawerProps,
1071
- emits: ["close", "confirm"],
1071
+ emits: ["update:modelValue", "close", "confirm"],
1072
1072
  setup(props, { emit }) {
1073
1073
  const { modelValue, size } = toRefs(props);
1074
1074
  const visible = ref(false);
@@ -1104,6 +1104,7 @@ const _sfc_main$v = defineComponent({
1104
1104
  };
1105
1105
  const close = () => {
1106
1106
  visible.value = false;
1107
+ emit("update:modelValue", false);
1107
1108
  emit("close");
1108
1109
  };
1109
1110
  const handleWrapClick = (event) => {
@@ -1124,6 +1125,7 @@ const _sfc_main$v = defineComponent({
1124
1125
  };
1125
1126
  const confirm = () => {
1126
1127
  visible.value = false;
1128
+ emit("update:modelValue", false);
1127
1129
  emit("confirm");
1128
1130
  };
1129
1131
  const setLastFocusElement = () => {
@@ -1167,19 +1169,20 @@ const _sfc_main$v = defineComponent({
1167
1169
  };
1168
1170
  }
1169
1171
  });
1170
- const _hoisted_1$l = { class: "dao-drawer__content" };
1171
- const _hoisted_2$g = {
1172
+ const _hoisted_1$m = { class: "dao-drawer__content" };
1173
+ const _hoisted_2$h = {
1172
1174
  key: 0,
1173
1175
  class: "dao-drawer__header"
1174
1176
  };
1175
1177
  const _hoisted_3$a = { class: "dao-drawer__header-group" };
1176
- const _hoisted_4$9 = { class: "dao-drawer__body" };
1177
- const _hoisted_5$5 = {
1178
+ const _hoisted_4$8 = { class: "dao-drawer__body" };
1179
+ const _hoisted_5$6 = {
1178
1180
  key: 1,
1179
1181
  class: "dao-drawer__footer"
1180
1182
  };
1181
- const _hoisted_6$3 = { class: "dao-drawer__footer-group" };
1182
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1183
+ const _hoisted_6$4 = { class: "dao-drawer__footer-group" };
1184
+ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
1185
+ const _component_dao_action_icon = resolveComponent("dao-action-icon");
1183
1186
  const _component_dao_button = resolveComponent("dao-button");
1184
1187
  return openBlock(), createElementBlock(Fragment, null, [
1185
1188
  createVNode(Transition, { name: "fade-in" }, {
@@ -1210,28 +1213,25 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1210
1213
  withDirectives(createElementVNode("div", {
1211
1214
  class: normalizeClass(_ctx.contentClassList)
1212
1215
  }, [
1213
- createElementVNode("div", _hoisted_1$l, [
1214
- !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
1216
+ createElementVNode("div", _hoisted_1$m, [
1217
+ !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
1215
1218
  renderSlot(_ctx.$slots, "header", {}, () => [
1216
1219
  createElementVNode("div", _hoisted_3$a, [
1217
1220
  createElementVNode("span", null, toDisplayString(_ctx.title), 1),
1218
- !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_button, {
1221
+ !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_action_icon, {
1219
1222
  key: 0,
1220
- size: "sm",
1221
- type: "ghost",
1222
- "icon-left": "icon-close",
1223
- "use-font": "",
1223
+ name: "icon-close",
1224
1224
  onClick: _ctx.close
1225
1225
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
1226
1226
  ])
1227
1227
  ])
1228
1228
  ])) : createCommentVNode("", true),
1229
- createElementVNode("div", _hoisted_4$9, [
1229
+ createElementVNode("div", _hoisted_4$8, [
1230
1230
  renderSlot(_ctx.$slots, "default")
1231
1231
  ]),
1232
- !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
1232
+ !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
1233
1233
  renderSlot(_ctx.$slots, "footer", {}, () => [
1234
- createElementVNode("div", _hoisted_6$3, [
1234
+ createElementVNode("div", _hoisted_6$4, [
1235
1235
  createVNode(_component_dao_button, {
1236
1236
  type: "ghost",
1237
1237
  class: "footer-cancel-btn footer-btn",
@@ -1264,7 +1264,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1264
1264
  ], 34)
1265
1265
  ], 64);
1266
1266
  }
1267
- var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
1267
+ var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
1268
1268
  var top = "top";
1269
1269
  var bottom = "bottom";
1270
1270
  var right = "right";
@@ -2463,7 +2463,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
2463
2463
  var createPopper = /* @__PURE__ */ popperGenerator({
2464
2464
  defaultModifiers
2465
2465
  });
2466
- const _sfc_main$u = defineComponent({
2466
+ const _sfc_main$w = defineComponent({
2467
2467
  name: "PopperContent",
2468
2468
  props: {
2469
2469
  popperId: {
@@ -2511,8 +2511,8 @@ const _sfc_main$u = defineComponent({
2511
2511
  };
2512
2512
  }
2513
2513
  });
2514
- const _hoisted_1$k = ["id", "aria-hidden", "tabindex"];
2515
- const _hoisted_2$f = {
2514
+ const _hoisted_1$l = ["id", "aria-hidden", "tabindex"];
2515
+ const _hoisted_2$g = {
2516
2516
  ref: "arrow",
2517
2517
  class: "dao-popper-arrow"
2518
2518
  };
@@ -2530,10 +2530,10 @@ const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
2530
2530
  d: "M6 7.5L15 -1L15 16Z"
2531
2531
  })
2532
2532
  ], -1);
2533
- const _hoisted_4$8 = [
2533
+ const _hoisted_4$7 = [
2534
2534
  _hoisted_3$9
2535
2535
  ];
2536
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
2536
+ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
2537
2537
  return openBlock(), createElementBlock("div", {
2538
2538
  id: _ctx.popperId,
2539
2539
  ref: "popover",
@@ -2552,12 +2552,12 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
2552
2552
  }, [
2553
2553
  renderSlot(_ctx.$slots, "default")
2554
2554
  ], 4),
2555
- withDirectives(createElementVNode("div", _hoisted_2$f, _hoisted_4$8, 512), [
2555
+ withDirectives(createElementVNode("div", _hoisted_2$g, _hoisted_4$7, 512), [
2556
2556
  [vShow, _ctx.visibleArrow]
2557
2557
  ])
2558
- ], 42, _hoisted_1$k);
2558
+ ], 42, _hoisted_1$l);
2559
2559
  }
2560
- var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
2560
+ var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
2561
2561
  var PopperProps = {
2562
2562
  modelValue: {
2563
2563
  type: Boolean,
@@ -2569,7 +2569,7 @@ var PopperProps = {
2569
2569
  },
2570
2570
  appendTo: {
2571
2571
  type: [String, Boolean, Object],
2572
- default: "body"
2572
+ default: "root"
2573
2573
  },
2574
2574
  boundary: {
2575
2575
  type: [String, Object],
@@ -2637,17 +2637,29 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
2637
2637
  _modifiers = [modifiers];
2638
2638
  }
2639
2639
  popperInstance.setOptions((options) => {
2640
- var _a, _b;
2640
+ var _a2, _b2;
2641
2641
  return __spreadProps(__spreadValues(__spreadValues({}, options), popperOptions), {
2642
2642
  modifiers: [
2643
- ...(_a = options.modifiers) != null ? _a : [],
2644
- ...(_b = popperOptions.modifiers) != null ? _b : [],
2643
+ ...(_a2 = options.modifiers) != null ? _a2 : [],
2644
+ ...(_b2 = popperOptions.modifiers) != null ? _b2 : [],
2645
2645
  ..._modifiers
2646
2646
  ]
2647
2647
  });
2648
2648
  });
2649
2649
  }
2650
- const _sfc_main$t = defineComponent({
2650
+ function getActualRoot(app) {
2651
+ var _a2, _b2, _c, _d;
2652
+ let internalRoot = "body";
2653
+ if (!app) {
2654
+ return internalRoot;
2655
+ }
2656
+ const rootNode = (_c = (_b2 = (_a2 = app == null ? void 0 : app.root) == null ? void 0 : _a2.vnode) == null ? void 0 : _b2.el) == null ? void 0 : _c.parentNode.getRootNode();
2657
+ if (rootNode) {
2658
+ internalRoot = (_d = rootNode.body) != null ? _d : rootNode;
2659
+ }
2660
+ return internalRoot;
2661
+ }
2662
+ const _sfc_main$v = defineComponent({
2651
2663
  name: "DaoPopper",
2652
2664
  components: {
2653
2665
  PopperContent
@@ -2672,14 +2684,28 @@ const _sfc_main$t = defineComponent({
2672
2684
  const reference2 = ref(null);
2673
2685
  const popper2 = ref(null);
2674
2686
  const isOpen = ref(false);
2675
- const actualAppendTo = ref("body");
2687
+ const actualAppendTo = ref("root");
2676
2688
  const isTelDisabled = ref(false);
2677
- const unrefAppendTo = unref(appendTo);
2678
- if (unrefAppendTo === false) {
2679
- isTelDisabled.value = true;
2680
- } else {
2681
- actualAppendTo.value = unrefAppendTo;
2682
- }
2689
+ watch(appendTo, () => {
2690
+ const unrefAppendTo = unref(appendTo);
2691
+ if (unrefAppendTo === false) {
2692
+ isTelDisabled.value = true;
2693
+ } else if (unrefAppendTo === "root") {
2694
+ const vm = getCurrentInstance();
2695
+ if (vm == null ? void 0 : vm.root.isMounted) {
2696
+ actualAppendTo.value = getActualRoot(vm);
2697
+ } else {
2698
+ isTelDisabled.value = true;
2699
+ actualAppendTo.value = "body";
2700
+ onMounted(() => {
2701
+ actualAppendTo.value = getActualRoot(vm);
2702
+ isTelDisabled.value = false;
2703
+ });
2704
+ }
2705
+ } else {
2706
+ actualAppendTo.value = unrefAppendTo;
2707
+ }
2708
+ }, { immediate: true });
2683
2709
  const instance = getCurrentInstance();
2684
2710
  let popperInstance;
2685
2711
  let _targetNode;
@@ -2687,8 +2713,8 @@ const _sfc_main$t = defineComponent({
2687
2713
  let _arrowNode;
2688
2714
  let _scheduleTimer;
2689
2715
  const themeClass = computed(() => {
2690
- var _a, _b;
2691
- return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$options.daoPopperTheme) != null ? _b : "";
2716
+ var _a2, _b2;
2717
+ return (_b2 = (_a2 = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a2.$options.daoPopperTheme) != null ? _b2 : "";
2692
2718
  });
2693
2719
  const showDelay = computed(() => {
2694
2720
  const unrefDelay = unref(delay);
@@ -2705,7 +2731,7 @@ const _sfc_main$t = defineComponent({
2705
2731
  return unrefDelay || 0;
2706
2732
  });
2707
2733
  const createPopper$1 = async () => {
2708
- var _a;
2734
+ var _a2;
2709
2735
  if (popperInstance == null ? void 0 : popperInstance.destroy) {
2710
2736
  popperInstance.destroy();
2711
2737
  }
@@ -2746,7 +2772,7 @@ const _sfc_main$t = defineComponent({
2746
2772
  }
2747
2773
  });
2748
2774
  }
2749
- modifiers.push(...((_a = unref(popperOptions)) == null ? void 0 : _a.modifiers) || []);
2775
+ modifiers.push(...((_a2 = unref(popperOptions)) == null ? void 0 : _a2.modifiers) || []);
2750
2776
  const ppOptions = __spreadProps(__spreadValues({
2751
2777
  strategy: "fixed",
2752
2778
  placement: unref(placement)
@@ -2872,10 +2898,10 @@ const _sfc_main$t = defineComponent({
2872
2898
  fn2(_popperNode, "mouseleave", hide);
2873
2899
  break;
2874
2900
  case "focus":
2875
- fn2(_targetNode, "focus", show);
2876
- fn2(_popperNode, "focus", show);
2877
- fn2(_targetNode, "blur", hide);
2878
- fn2(_popperNode, "blur", hide);
2901
+ fn2(_targetNode, "focusin", show);
2902
+ fn2(_popperNode, "focusin", show);
2903
+ fn2(_targetNode, "focusout", hide);
2904
+ fn2(_popperNode, "focusout", hide);
2879
2905
  break;
2880
2906
  }
2881
2907
  });
@@ -2887,12 +2913,12 @@ const _sfc_main$t = defineComponent({
2887
2913
  operateEventListeners(off);
2888
2914
  };
2889
2915
  const init = () => {
2890
- var _a, _b, _c, _d;
2916
+ var _a2, _b2, _c, _d;
2891
2917
  if (!slots.default) {
2892
2918
  throw new Error("Trigger must be provided");
2893
2919
  }
2894
- _targetNode = (_a = unref(reference2)) == null ? void 0 : _a.firstElementChild;
2895
- _popperNode = (_b = unref(popper2)) == null ? void 0 : _b.$el;
2920
+ _targetNode = (_a2 = unref(reference2)) == null ? void 0 : _a2.firstElementChild;
2921
+ _popperNode = (_b2 = unref(popper2)) == null ? void 0 : _b2.$el;
2896
2922
  _arrowNode = (_d = (_c = unref(popper2)) == null ? void 0 : _c.$refs) == null ? void 0 : _d.arrow;
2897
2923
  addEventListeners();
2898
2924
  if (unref(isOpen) || unref(modelValue)) {
@@ -3004,7 +3030,7 @@ const _sfc_main$t = defineComponent({
3004
3030
  };
3005
3031
  }
3006
3032
  });
3007
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3033
+ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
3008
3034
  const _component_popper_content = resolveComponent("popper-content");
3009
3035
  return openBlock(), createElementBlock("div", {
3010
3036
  ref: "reference",
@@ -3046,8 +3072,8 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3046
3072
  ], 8, ["to", "disabled"]))
3047
3073
  ], 2);
3048
3074
  }
3049
- var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
3050
- const _sfc_main$s = defineComponent({
3075
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
3076
+ const _sfc_main$u = defineComponent({
3051
3077
  name: "DaoDropdown",
3052
3078
  components: {
3053
3079
  DaoPopper: Popper
@@ -3060,7 +3086,7 @@ const _sfc_main$s = defineComponent({
3060
3086
  },
3061
3087
  appendTo: {
3062
3088
  type: [String, Boolean, Object],
3063
- default: "body"
3089
+ default: "root"
3064
3090
  },
3065
3091
  placement: {
3066
3092
  type: String,
@@ -3086,11 +3112,11 @@ const _sfc_main$s = defineComponent({
3086
3112
  const realOffset = computed(() => realTrigger.value === "hover" ? 0 : offset2.value);
3087
3113
  const parentHideFn = inject("hide", NOOP);
3088
3114
  const hide = () => {
3089
- var _a;
3115
+ var _a2;
3090
3116
  if (realTrigger.value === "manual") {
3091
3117
  return;
3092
3118
  }
3093
- (_a = popper2.value) == null ? void 0 : _a.hide();
3119
+ (_a2 = popper2.value) == null ? void 0 : _a2.hide();
3094
3120
  parentHideFn == null ? void 0 : parentHideFn();
3095
3121
  };
3096
3122
  provide("hide", hide);
@@ -3103,8 +3129,8 @@ const _sfc_main$s = defineComponent({
3103
3129
  };
3104
3130
  }
3105
3131
  });
3106
- const _hoisted_1$j = { tabindex: "0" };
3107
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3132
+ const _hoisted_1$k = { tabindex: "0" };
3133
+ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
3108
3134
  const _component_dao_popper = resolveComponent("dao-popper");
3109
3135
  return openBlock(), createBlock(_component_dao_popper, {
3110
3136
  ref: "popper",
@@ -3114,33 +3140,34 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3114
3140
  "popper-class": "dao-dropdown-menu-popper",
3115
3141
  "visible-arrow": false,
3116
3142
  offset: _ctx.realOffset,
3117
- "model-value": _ctx.visible
3143
+ "model-value": _ctx.visible,
3144
+ transition: "dao-fade-slide-default"
3118
3145
  }, {
3119
3146
  content: withCtx(() => [
3120
3147
  renderSlot(_ctx.$slots, "menu")
3121
3148
  ]),
3122
3149
  default: withCtx(() => [
3123
- createElementVNode("div", _hoisted_1$j, [
3150
+ createElementVNode("div", _hoisted_1$k, [
3124
3151
  renderSlot(_ctx.$slots, "default")
3125
3152
  ])
3126
3153
  ]),
3127
3154
  _: 3
3128
3155
  }, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
3129
3156
  }
3130
- var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
3157
+ var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
3131
3158
  var dropdownMenu_vue_vue_type_style_index_0_lang = "";
3132
- const _sfc_main$r = defineComponent({
3159
+ const _sfc_main$t = defineComponent({
3133
3160
  name: "DaoDropdownMenu"
3134
3161
  });
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, [
3162
+ const _hoisted_1$j = { class: "dao-dropdown-menu" };
3163
+ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3164
+ return openBlock(), createElementBlock("ul", _hoisted_1$j, [
3138
3165
  renderSlot(_ctx.$slots, "default")
3139
3166
  ]);
3140
3167
  }
3141
- var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
3168
+ var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
3142
3169
  var dropdownItem_vue_vue_type_style_index_0_lang = "";
3143
- const _sfc_main$q = defineComponent({
3170
+ const _sfc_main$s = defineComponent({
3144
3171
  name: "DaoDropdownItem",
3145
3172
  props: {
3146
3173
  type: {
@@ -3189,12 +3216,257 @@ const _sfc_main$q = defineComponent({
3189
3216
  };
3190
3217
  }
3191
3218
  });
3192
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3219
+ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3193
3220
  return openBlock(), createElementBlock("li", mergeProps({ class: _ctx.classList }, _ctx.itemAttrs), [
3194
3221
  _ctx.type !== "divider" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
3195
3222
  ], 16);
3196
3223
  }
3197
- var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
3224
+ var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
3225
+ const expansionProps = {
3226
+ modelValue: {
3227
+ type: [String, Symbol, Array]
3228
+ },
3229
+ accordion: {
3230
+ type: Boolean,
3231
+ default: false
3232
+ }
3233
+ };
3234
+ const expansionItemProps = {
3235
+ name: {
3236
+ type: [String, Symbol],
3237
+ required: true
3238
+ },
3239
+ title: {
3240
+ type: String,
3241
+ default: ""
3242
+ },
3243
+ description: {
3244
+ type: String,
3245
+ default: ""
3246
+ }
3247
+ };
3248
+ var expansion_vue_vue_type_style_index_0_lang = "";
3249
+ const _sfc_main$r = defineComponent({
3250
+ name: "DaoExpansion",
3251
+ props: expansionProps,
3252
+ emits: ["update:modelValue", "change"],
3253
+ setup(props, { emit }) {
3254
+ const { accordion, modelValue } = toRefs(props);
3255
+ const state = reactive({
3256
+ expansionRecord: modelValue.value,
3257
+ accordion: accordion.value
3258
+ });
3259
+ function toggleItem(itemName) {
3260
+ if (props.accordion) {
3261
+ let currentVal = itemName;
3262
+ if (currentVal === state.expansionRecord) {
3263
+ currentVal = void 0;
3264
+ }
3265
+ state.expansionRecord = currentVal;
3266
+ emit("update:modelValue", currentVal);
3267
+ emit("change", currentVal);
3268
+ } else {
3269
+ let rst = [];
3270
+ if (Array.isArray(state.expansionRecord)) {
3271
+ rst = [...state.expansionRecord];
3272
+ }
3273
+ const idx = rst.indexOf(itemName);
3274
+ if (idx > -1) {
3275
+ rst.splice(idx, 1);
3276
+ } else {
3277
+ rst.push(itemName);
3278
+ }
3279
+ state.expansionRecord = rst;
3280
+ emit("update:modelValue", rst);
3281
+ emit("change", rst);
3282
+ }
3283
+ }
3284
+ watch([modelValue, accordion], ([newM, newA]) => {
3285
+ state.expansionRecord = newM;
3286
+ if (newA !== state.accordion) {
3287
+ let nextRecordVal;
3288
+ if (newA) {
3289
+ if (Array.isArray(state.expansionRecord)) {
3290
+ if (state.expansionRecord.length) {
3291
+ [nextRecordVal] = state.expansionRecord;
3292
+ }
3293
+ } else {
3294
+ nextRecordVal = state.expansionRecord;
3295
+ }
3296
+ } else {
3297
+ nextRecordVal = [];
3298
+ if (state.expansionRecord !== void 0) {
3299
+ if (!Array.isArray(state.expansionRecord)) {
3300
+ nextRecordVal[0] = state.expansionRecord;
3301
+ }
3302
+ }
3303
+ }
3304
+ state.expansionRecord = nextRecordVal;
3305
+ debugger;
3306
+ emit("update:modelValue", nextRecordVal);
3307
+ emit("change", nextRecordVal);
3308
+ }
3309
+ state.accordion = newA;
3310
+ });
3311
+ provide(ToggleItemKey, toggleItem);
3312
+ provide(ExpansionStateKey, state);
3313
+ return {
3314
+ toggleItem,
3315
+ state
3316
+ };
3317
+ }
3318
+ });
3319
+ const _hoisted_1$i = { class: "dao-expansion" };
3320
+ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
3321
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
3322
+ renderSlot(_ctx.$slots, "default")
3323
+ ]);
3324
+ }
3325
+ var expansion = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
3326
+ var expansionItem_vue_vue_type_style_index_0_lang = "";
3327
+ const _sfc_main$q = defineComponent({
3328
+ name: "DaoExpansionItem",
3329
+ components: {
3330
+ DaoIcon
3331
+ },
3332
+ props: expansionItemProps,
3333
+ setup(props) {
3334
+ const toggleItem = inject(ToggleItemKey, null);
3335
+ const parentState = inject(ExpansionStateKey, null);
3336
+ function onItemClick() {
3337
+ if (props.name !== void 0) {
3338
+ toggleItem == null ? void 0 : toggleItem(props.name);
3339
+ }
3340
+ }
3341
+ const isExpanded = computed(() => {
3342
+ if (parentState == null ? void 0 : parentState.expansionRecord) {
3343
+ if (parentState == null ? void 0 : parentState.accordion) {
3344
+ return parentState.expansionRecord === props.name;
3345
+ }
3346
+ if (Array.isArray(parentState == null ? void 0 : parentState.expansionRecord) && props.name !== void 0) {
3347
+ return parentState.expansionRecord.includes(props.name);
3348
+ }
3349
+ }
3350
+ return false;
3351
+ });
3352
+ function onBeforeEnter(el) {
3353
+ if (el instanceof HTMLElement) {
3354
+ const { style } = el;
3355
+ style.maxHeight = "0px";
3356
+ }
3357
+ }
3358
+ function onEnter(el) {
3359
+ if (el instanceof HTMLElement) {
3360
+ const { style } = el;
3361
+ style.maxHeight = `${el.scrollHeight || style.maxHeight}px`;
3362
+ }
3363
+ }
3364
+ function onAfterEnter(el) {
3365
+ if (el instanceof HTMLElement) {
3366
+ const { style } = el;
3367
+ style.maxHeight = "";
3368
+ }
3369
+ }
3370
+ function onBeforeLeave(el) {
3371
+ if (el instanceof HTMLElement) {
3372
+ const { style } = el;
3373
+ if (el.scrollHeight !== 0) {
3374
+ style.maxHeight = `${el.scrollHeight}px`;
3375
+ }
3376
+ }
3377
+ }
3378
+ function onLeave(el) {
3379
+ if (el instanceof HTMLElement) {
3380
+ const { style } = el;
3381
+ style.maxHeight = "0px";
3382
+ }
3383
+ }
3384
+ function onAfterLeave(el) {
3385
+ if (el instanceof HTMLElement) {
3386
+ const { style } = el;
3387
+ style.maxHeight = "";
3388
+ }
3389
+ }
3390
+ return {
3391
+ onItemClick,
3392
+ isExpanded,
3393
+ onBeforeEnter,
3394
+ onEnter,
3395
+ onAfterEnter,
3396
+ onBeforeLeave,
3397
+ onLeave,
3398
+ onAfterLeave
3399
+ };
3400
+ }
3401
+ });
3402
+ const _hoisted_1$h = { class: "dao-expansion-item-icon-container" };
3403
+ const _hoisted_2$f = { class: "dao-expansion-item-title-container" };
3404
+ const _hoisted_3$8 = { class: "dao-expansion-item-title dao-exp-ellipsis" };
3405
+ const _hoisted_4$6 = { class: "dao-expansion-item-description dao-exp-ellipsis" };
3406
+ const _hoisted_5$5 = { class: "dao-expansion-item-content-container" };
3407
+ const _hoisted_6$3 = { class: "dao-expansion-item-content" };
3408
+ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3409
+ const _component_dao_icon = resolveComponent("dao-icon");
3410
+ return openBlock(), createElementBlock("div", {
3411
+ class: normalizeClass(["dao-expansion-item", {
3412
+ "dao-expansion-item--expanded": _ctx.isExpanded
3413
+ }])
3414
+ }, [
3415
+ createElementVNode("div", {
3416
+ class: "dao-expansion-item-header",
3417
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
3418
+ }, [
3419
+ createElementVNode("div", _hoisted_1$h, [
3420
+ createVNode(_component_dao_icon, {
3421
+ name: "icon-dropdown-line",
3422
+ class: "dao-expansion-item-icon",
3423
+ "use-font": ""
3424
+ })
3425
+ ]),
3426
+ createElementVNode("div", _hoisted_2$f, [
3427
+ createElementVNode("div", _hoisted_3$8, [
3428
+ renderSlot(_ctx.$slots, "title", {}, () => [
3429
+ createTextVNode(toDisplayString(_ctx.title), 1)
3430
+ ])
3431
+ ]),
3432
+ createElementVNode("div", _hoisted_4$6, [
3433
+ renderSlot(_ctx.$slots, "description", {}, () => [
3434
+ createTextVNode(toDisplayString(_ctx.description), 1)
3435
+ ])
3436
+ ])
3437
+ ]),
3438
+ _ctx.$slots.action ? (openBlock(), createElementBlock("div", {
3439
+ key: 0,
3440
+ class: "dao-expansion-item-action",
3441
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
3442
+ }, ["stop"]))
3443
+ }, [
3444
+ renderSlot(_ctx.$slots, "action")
3445
+ ])) : createCommentVNode("", true)
3446
+ ]),
3447
+ createVNode(Transition, {
3448
+ name: "dao-expansion-item",
3449
+ onBeforeEnter: _ctx.onBeforeEnter,
3450
+ onEnter: _ctx.onEnter,
3451
+ onAfterEnter: _ctx.onAfterEnter,
3452
+ onBeforeLeave: _ctx.onBeforeLeave,
3453
+ onLeave: _ctx.onLeave,
3454
+ onAfterLeave: _ctx.onAfterLeave
3455
+ }, {
3456
+ default: withCtx(() => [
3457
+ withDirectives(createElementVNode("div", _hoisted_5$5, [
3458
+ createElementVNode("div", _hoisted_6$3, [
3459
+ renderSlot(_ctx.$slots, "default")
3460
+ ])
3461
+ ], 512), [
3462
+ [vShow, _ctx.isExpanded]
3463
+ ])
3464
+ ]),
3465
+ _: 3
3466
+ }, 8, ["onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
3467
+ ], 2);
3468
+ }
3469
+ var expansionItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
3198
3470
  var form_vue_vue_type_style_index_0_lang = "";
3199
3471
  const _sfc_main$p = defineComponent({
3200
3472
  name: "DaoForm",
@@ -3227,7 +3499,9 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
3227
3499
  error: "dao-form-item__error-message"
3228
3500
  },
3229
3501
  wrapper: {
3502
+ text: "dao-form-item__text-wrapper",
3230
3503
  radio: "dao-form-item__radio-wrapper",
3504
+ checkbox: "dao-form-item__checkbox-wrapper",
3231
3505
  switch: "dao-form-item__switch-wrapper",
3232
3506
  footer: "dao-form-item__footer-wrapper"
3233
3507
  }
@@ -3258,6 +3532,10 @@ const _sfc_main$n = defineComponent({
3258
3532
  type: String,
3259
3533
  default: ""
3260
3534
  },
3535
+ required: {
3536
+ type: Boolean,
3537
+ default: false
3538
+ },
3261
3539
  paddingTop: {
3262
3540
  type: [Number, String],
3263
3541
  default: 0
@@ -3296,30 +3574,31 @@ const _sfc_main$n = defineComponent({
3296
3574
  };
3297
3575
  }
3298
3576
  });
3299
- const _hoisted_1$h = { class: "dao-form-item" };
3300
- const _hoisted_2$e = {
3577
+ const _hoisted_1$g = {
3301
3578
  key: 0,
3302
3579
  class: "dao-form-item__label-icon-wrapper"
3303
3580
  };
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);
3581
+ const _hoisted_2$e = { class: "dao-form-item__label-icon-label" };
3582
+ const _hoisted_3$7 = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
3306
3583
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
3307
3584
  const _component_dao_tooltip = resolveComponent("dao-tooltip");
3308
- return openBlock(), createElementBlock("div", _hoisted_1$h, [
3585
+ return openBlock(), createElementBlock("div", {
3586
+ class: normalizeClass(["dao-form-item", { "is-required": _ctx.required }])
3587
+ }, [
3309
3588
  createElementVNode("div", {
3310
3589
  class: "dao-form-item__label",
3311
3590
  style: normalizeStyle(_ctx.labelStyle)
3312
3591
  }, [
3313
3592
  renderSlot(_ctx.$slots, "label", {}, () => [
3314
3593
  createTextVNode(toDisplayString(!_ctx.iconMessage ? _ctx.label : ""), 1),
3315
- !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_2$e, [
3316
- createElementVNode("span", _hoisted_3$8, toDisplayString(_ctx.label), 1),
3594
+ !!_ctx.iconMessage ? (openBlock(), createElementBlock("div", _hoisted_1$g, [
3595
+ createElementVNode("span", _hoisted_2$e, toDisplayString(_ctx.label), 1),
3317
3596
  createVNode(_component_dao_tooltip, {
3318
3597
  content: _ctx.iconMessage,
3319
3598
  placement: "top"
3320
3599
  }, {
3321
3600
  default: withCtx(() => [
3322
- _hoisted_4$7
3601
+ _hoisted_3$7
3323
3602
  ]),
3324
3603
  _: 1
3325
3604
  }, 8, ["content"])
@@ -3332,7 +3611,7 @@ function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
3332
3611
  }, [
3333
3612
  renderSlot(_ctx.$slots, "default")
3334
3613
  ], 4)
3335
- ]);
3614
+ ], 2);
3336
3615
  }
3337
3616
  var formItem = /* @__PURE__ */ _export_sfc(_sfc_main$n, [["render", _sfc_render$l]]);
3338
3617
  var formGroup_vue_vue_type_style_index_0_lang = "";
@@ -3345,10 +3624,10 @@ const _sfc_main$m = defineComponent({
3345
3624
  }
3346
3625
  }
3347
3626
  });
3348
- const _hoisted_1$g = { class: "dao-form-group" };
3627
+ const _hoisted_1$f = { class: "dao-form-group" };
3349
3628
  const _hoisted_2$d = { class: "dao-form-group__title" };
3350
3629
  function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
3351
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
3630
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
3352
3631
  createElementVNode("div", _hoisted_2$d, [
3353
3632
  renderSlot(_ctx.$slots, "title", {}, () => [
3354
3633
  createTextVNode(toDisplayString(_ctx.title), 1)
@@ -3454,8 +3733,8 @@ const _sfc_main$k = defineComponent({
3454
3733
  setup(props) {
3455
3734
  const parent = inject(breadcrumbKey, null);
3456
3735
  const separator = computed(() => {
3457
- var _a;
3458
- return (_a = parent == null ? void 0 : parent.props) == null ? void 0 : _a.separator;
3736
+ var _a2;
3737
+ return (_a2 = parent == null ? void 0 : parent.props) == null ? void 0 : _a2.separator;
3459
3738
  });
3460
3739
  const handleClick = () => {
3461
3740
  const to = props == null ? void 0 : props.to;
@@ -3520,7 +3799,7 @@ const _sfc_main$j = defineComponent({
3520
3799
  }
3521
3800
  });
3522
3801
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3523
- var _a;
3802
+ var _a2;
3524
3803
  const _component_dao_icon = resolveComponent("dao-icon");
3525
3804
  const _component_dao_breadcrumb_item = resolveComponent("dao-breadcrumb-item");
3526
3805
  return openBlock(), createElementBlock("div", {
@@ -3540,7 +3819,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
3540
3819
  }, null, 8, ["name"])
3541
3820
  ])
3542
3821
  ], 2)) : createCommentVNode("", true),
3543
- ((_a = _ctx.list) == null ? void 0 : _a.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
3822
+ ((_a2 = _ctx.list) == null ? void 0 : _a2.length) ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.list, (item, index2) => {
3544
3823
  return openBlock(), createBlock(_component_dao_breadcrumb_item, {
3545
3824
  key: index2,
3546
3825
  label: item.label,
@@ -3620,6 +3899,9 @@ var inputProps = {
3620
3899
  var input_vue_vue_type_style_index_0_lang = "";
3621
3900
  const _sfc_main$i = defineComponent({
3622
3901
  name: "DaoInput",
3902
+ components: {
3903
+ DaoIcon
3904
+ },
3623
3905
  inheritAttrs: false,
3624
3906
  props: inputProps,
3625
3907
  emits: ["update:modelValue", "input", "change", "blur", "focus", "after-reset"],
@@ -3664,12 +3946,31 @@ const _sfc_main$i = defineComponent({
3664
3946
  `${prefixCls}--size-${size.value}`,
3665
3947
  {
3666
3948
  [`${prefixCls}--search`]: type.value === "search",
3949
+ [`${prefixCls}--password`]: type.value === "password",
3667
3950
  [`${prefixCls}--${status.value}`]: ["error", "success", "loading"].includes(status.value),
3668
3951
  [`${prefixCls}--borderless`]: borderless.value,
3669
3952
  [`${prefixCls}--block`]: block.value,
3670
3953
  [`${prefixCls}--with-append`]: !!append.value
3671
3954
  }
3672
3955
  ]);
3956
+ const isShowPassword = ref(false);
3957
+ const inputType = computed(() => {
3958
+ if (type.value === "password") {
3959
+ if (isShowPassword.value) {
3960
+ return "text";
3961
+ }
3962
+ }
3963
+ return type.value;
3964
+ });
3965
+ function toggleShowPassword() {
3966
+ isShowPassword.value = !isShowPassword.value;
3967
+ }
3968
+ const passwordIcon = computed(() => {
3969
+ if (isShowPassword.value) {
3970
+ return "icon-eye";
3971
+ }
3972
+ return "icon-eye-slash";
3973
+ });
3673
3974
  const statusClasses = computed(() => statusMap[status.value]);
3674
3975
  const setCurrentValue = (val) => {
3675
3976
  if (val === currentValue.value) {
@@ -3690,17 +3991,17 @@ const _sfc_main$i = defineComponent({
3690
3991
  emit("change", val);
3691
3992
  };
3692
3993
  const resetCurrentVal = () => {
3693
- var _a;
3994
+ var _a2;
3694
3995
  if (disabled.value || type.value !== "search") {
3695
3996
  return;
3696
3997
  }
3697
3998
  updateModel("");
3698
3999
  emit("after-reset");
3699
- (_a = input2.value) == null ? void 0 : _a.focus();
4000
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3700
4001
  };
3701
4002
  const getInputRealNumber = (val, fixedPointNum) => parseFloat(val.toFixed(fixedPointNum));
3702
4003
  const changeNumberValue = (changeType) => {
3703
- var _a;
4004
+ var _a2;
3704
4005
  if (type.value !== "number") {
3705
4006
  return;
3706
4007
  }
@@ -3729,7 +4030,7 @@ const _sfc_main$i = defineComponent({
3729
4030
  setValue = minimum;
3730
4031
  }
3731
4032
  updateModel(getInputRealNumber(setValue, stepPointNum));
3732
- (_a = input2.value) == null ? void 0 : _a.focus();
4033
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3733
4034
  if (!counterTimeout && !counterInterval) {
3734
4035
  counterTimeout = window.setTimeout(() => {
3735
4036
  counterInterval = window.setInterval(() => changeNumberValue(changeType), 100);
@@ -3737,7 +4038,7 @@ const _sfc_main$i = defineComponent({
3737
4038
  }
3738
4039
  };
3739
4040
  const onInputNumberMouseup = (event) => {
3740
- var _a;
4041
+ var _a2;
3741
4042
  if (isChangingNumber.value) {
3742
4043
  event.preventDefault();
3743
4044
  }
@@ -3752,7 +4053,7 @@ const _sfc_main$i = defineComponent({
3752
4053
  counterInterval = null;
3753
4054
  isChangingNumber.value = false;
3754
4055
  if (onEvents) {
3755
- (_a = input2.value) == null ? void 0 : _a.focus();
4056
+ (_a2 = input2.value) == null ? void 0 : _a2.focus();
3756
4057
  }
3757
4058
  };
3758
4059
  const inputAttrs = computed(() => {
@@ -3800,11 +4101,14 @@ const _sfc_main$i = defineComponent({
3800
4101
  changeNumberValue,
3801
4102
  isIncreaseDisabled,
3802
4103
  isDecreaseDisabled,
3803
- isChangingNumber
4104
+ isChangingNumber,
4105
+ inputType,
4106
+ passwordIcon,
4107
+ toggleShowPassword
3804
4108
  };
3805
4109
  }
3806
4110
  });
3807
- const _hoisted_1$f = {
4111
+ const _hoisted_1$e = {
3808
4112
  key: 0,
3809
4113
  class: "dao-input-prepend"
3810
4114
  };
@@ -3812,21 +4116,23 @@ const _hoisted_2$c = {
3812
4116
  key: 0,
3813
4117
  class: "dao-input-prefix"
3814
4118
  };
3815
- const _hoisted_3$7 = ["type", "disabled", "value"];
3816
- const _hoisted_4$6 = {
4119
+ const _hoisted_3$6 = ["type", "disabled", "value"];
4120
+ const _hoisted_4$5 = {
3817
4121
  key: 4,
3818
4122
  class: "dao-input-suffix"
3819
4123
  };
3820
4124
  const _hoisted_5$4 = {
3821
- key: 1,
4125
+ key: 0,
3822
4126
  class: "dao-input-append"
3823
4127
  };
3824
4128
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
4129
+ const _component_dao_icon = resolveComponent("dao-icon");
3825
4130
  return openBlock(), createElementBlock("div", {
3826
4131
  class: normalizeClass(_ctx.wrapClasses)
3827
4132
  }, [
3828
- renderSlot(_ctx.$slots, "prepend"),
3829
- _ctx.prepend && !_ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true),
4133
+ renderSlot(_ctx.$slots, "prepend", {}, () => [
4134
+ _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$e, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4135
+ ]),
3830
4136
  createElementVNode("div", {
3831
4137
  class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
3832
4138
  }, [
@@ -3841,48 +4147,56 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3841
4147
  ref: "input",
3842
4148
  class: _ctx.inputClasses
3843
4149
  }, _ctx.inputAttrs, {
3844
- type: _ctx.type,
4150
+ type: _ctx.inputType,
3845
4151
  disabled: _ctx.disabled,
3846
4152
  value: _ctx.currentValue,
3847
4153
  onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
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", {
4154
+ }), null, 16, _hoisted_3$6),
4155
+ _ctx.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4156
+ createElementVNode("i", {
4157
+ class: normalizeClass([
4158
+ "dao-input-number-icon",
4159
+ "icon-arrow-sharp",
4160
+ "number-icon-up",
4161
+ { "dao-input-number-icon__disabled": _ctx.isIncreaseDisabled }
4162
+ ]),
4163
+ onMousedown: _cache[1] || (_cache[1] = ($event) => _ctx.changeNumberValue("increase"))
4164
+ }, null, 34),
4165
+ createElementVNode("i", {
4166
+ class: normalizeClass([
4167
+ "dao-input-number-icon",
4168
+ "icon-arrow-sharp",
4169
+ "number-icon-down",
4170
+ { "dao-input-number-icon__disabled": _ctx.isDecreaseDisabled }
4171
+ ]),
4172
+ onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
4173
+ }, null, 34)
4174
+ ], 64)) : createCommentVNode("", true),
4175
+ _ctx.type === "password" ? (openBlock(), createBlock(_component_dao_icon, {
3860
4176
  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),
4177
+ "use-font": "",
4178
+ class: "dao-input-password-icon",
4179
+ name: _ctx.passwordIcon,
4180
+ onClick: _ctx.toggleShowPassword
4181
+ }, null, 8, ["name", "onClick"])) : createCommentVNode("", true),
3869
4182
  withDirectives(createElementVNode("i", {
3870
- class: normalizeClass(["dao-input-close-icon", "icon-close", { "dao-input__active": _ctx.isFocus }]),
4183
+ class: normalizeClass(["dao-input-close-icon", "icon-sys-error", { "dao-input__active": _ctx.isFocus }]),
3871
4184
  onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
3872
4185
  }, null, 2), [
3873
4186
  [vShow, _ctx.clearable]
3874
4187
  ]),
3875
4188
  withDirectives(createElementVNode("i", {
3876
- class: normalizeClass(_ctx.statusClasses)
4189
+ class: normalizeClass([_ctx.statusClasses, "dao-input-status-icon"])
3877
4190
  }, null, 2), [
3878
4191
  [vShow, ["error", "success", "loading"].includes(_ctx.status)]
3879
4192
  ]),
3880
- _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$6, [
4193
+ _ctx.slots.suffix ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
3881
4194
  renderSlot(_ctx.$slots, "suffix")
3882
4195
  ])) : createCommentVNode("", true)
3883
4196
  ], 2),
3884
- renderSlot(_ctx.$slots, "append"),
3885
- _ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
4197
+ renderSlot(_ctx.$slots, "append", {}, () => [
4198
+ _ctx.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
4199
+ ])
3886
4200
  ], 2);
3887
4201
  }
3888
4202
  var input = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$g]]);
@@ -3956,13 +4270,13 @@ const _sfc_main$h = defineComponent({
3956
4270
  };
3957
4271
  }
3958
4272
  });
3959
- const _hoisted_1$e = { class: "dao-message-icon" };
4273
+ const _hoisted_1$d = { class: "dao-message-icon" };
3960
4274
  const _hoisted_2$b = { class: "dao-message-section" };
3961
- const _hoisted_3$6 = {
4275
+ const _hoisted_3$5 = {
3962
4276
  key: 0,
3963
4277
  class: "dao-message-title"
3964
4278
  };
3965
- const _hoisted_4$5 = {
4279
+ const _hoisted_4$4 = {
3966
4280
  key: 0,
3967
4281
  class: "dao-message-content"
3968
4282
  };
@@ -3977,7 +4291,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3977
4291
  createElementVNode("div", {
3978
4292
  class: normalizeClass(["dao-message-inner", { "dao-message-inner-without-close": !_ctx.isCloseShow }])
3979
4293
  }, [
3980
- createElementVNode("div", _hoisted_1$e, [
4294
+ createElementVNode("div", _hoisted_1$d, [
3981
4295
  renderSlot(_ctx.$slots, "icon", {}, () => [
3982
4296
  createElementVNode("i", {
3983
4297
  class: normalizeClass(`icon-sys-${_ctx.type} dao-message-icon-general dao-message-icon-${_ctx.type}`)
@@ -3987,10 +4301,10 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3987
4301
  createElementVNode("div", _hoisted_2$b, [
3988
4302
  renderSlot(_ctx.$slots, "section", {}, () => [
3989
4303
  renderSlot(_ctx.$slots, "title", { className: "dao-message-title" }, () => [
3990
- _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$6, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
4304
+ _ctx.title ? (openBlock(), createElementBlock("div", _hoisted_3$5, toDisplayString(_ctx.title), 1)) : createCommentVNode("", true)
3991
4305
  ]),
3992
4306
  renderSlot(_ctx.$slots, "default", { className: "dao-message-content" }, () => [
3993
- _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$5, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
4307
+ _ctx.content ? (openBlock(), createElementBlock("div", _hoisted_4$4, toDisplayString(_ctx.content), 1)) : createCommentVNode("", true)
3994
4308
  ])
3995
4309
  ])
3996
4310
  ]),
@@ -4173,10 +4487,10 @@ const _sfc_main$g = defineComponent({
4173
4487
  });
4174
4488
  }
4175
4489
  });
4176
- const _hoisted_1$d = { class: "dao-nav-bar" };
4490
+ const _hoisted_1$c = { class: "dao-nav-bar" };
4177
4491
  const _hoisted_2$a = { class: "dao-nav" };
4178
4492
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
4179
- return openBlock(), createElementBlock("nav", _hoisted_1$d, [
4493
+ return openBlock(), createElementBlock("nav", _hoisted_1$c, [
4180
4494
  renderSlot(_ctx.$slots, "header"),
4181
4495
  createElementVNode("ul", _hoisted_2$a, [
4182
4496
  renderSlot(_ctx.$slots, "default")
@@ -4219,7 +4533,7 @@ const _sfc_main$f = defineComponent({
4219
4533
  };
4220
4534
  }
4221
4535
  });
4222
- const _hoisted_1$c = { class: "dao-nav__head-text dao-nav-text" };
4536
+ const _hoisted_1$b = { class: "dao-nav__head-text dao-nav-text" };
4223
4537
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
4224
4538
  const _component_dao_icon = resolveComponent("dao-icon");
4225
4539
  return openBlock(), createElementBlock("li", {
@@ -4235,7 +4549,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
4235
4549
  onClick: _ctx.handleClickBack,
4236
4550
  onKeyup: withKeys(withModifiers(_ctx.handleClickBack, ["stop"]), ["esc"])
4237
4551
  }, null, 8, ["name", "use-font", "onClick", "onKeyup"])) : createCommentVNode("", true),
4238
- createElementVNode("span", _hoisted_1$c, toDisplayString(_ctx.title), 1)
4552
+ createElementVNode("span", _hoisted_1$b, toDisplayString(_ctx.title), 1)
4239
4553
  ])
4240
4554
  ], 2);
4241
4555
  }
@@ -4321,7 +4635,7 @@ const _sfc_main$e = defineComponent({
4321
4635
  };
4322
4636
  }
4323
4637
  });
4324
- const _hoisted_1$b = { class: "dao-nav-slot" };
4638
+ const _hoisted_1$a = { class: "dao-nav-slot" };
4325
4639
  const _hoisted_2$9 = { class: "dao-nav__item-text dao-nav-text" };
4326
4640
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
4327
4641
  const _component_dao_icon = resolveComponent("dao-icon");
@@ -4334,7 +4648,7 @@ function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
4334
4648
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4335
4649
  onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4336
4650
  }, [
4337
- createElementVNode("div", _hoisted_1$b, [
4651
+ createElementVNode("div", _hoisted_1$a, [
4338
4652
  renderSlot(_ctx.$slots, "default", {}, () => [
4339
4653
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4340
4654
  key: 0,
@@ -4471,13 +4785,13 @@ const _sfc_main$d = defineComponent({
4471
4785
  };
4472
4786
  }
4473
4787
  });
4474
- const _hoisted_1$a = { class: "dao-nav-slot" };
4788
+ const _hoisted_1$9 = { class: "dao-nav-slot" };
4475
4789
  const _hoisted_2$8 = { class: "dao-nav__sub-text dao-nav-text" };
4476
- const _hoisted_3$5 = {
4790
+ const _hoisted_3$4 = {
4477
4791
  key: 0,
4478
4792
  class: "icon-dropdown-line dao-nav__sub__icon-fold"
4479
4793
  };
4480
- const _hoisted_4$4 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4794
+ const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4481
4795
  const _hoisted_5$3 = { class: "dao-nav dao-nav-inner" };
4482
4796
  const _hoisted_6$2 = /* @__PURE__ */ createElementVNode("span", { class: "dao-nav__sub-gap" }, null, -1);
4483
4797
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
@@ -4491,7 +4805,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
4491
4805
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
4492
4806
  onKeyup: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
4493
4807
  }, [
4494
- createElementVNode("div", _hoisted_1$a, [
4808
+ createElementVNode("div", _hoisted_1$9, [
4495
4809
  renderSlot(_ctx.$slots, "title", {}, () => [
4496
4810
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
4497
4811
  key: 0,
@@ -4502,12 +4816,12 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
4502
4816
  createElementVNode("span", _hoisted_2$8, toDisplayString(_ctx.title), 1)
4503
4817
  ])
4504
4818
  ]),
4505
- _ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$5)) : createCommentVNode("", true)
4819
+ _ctx.fold ? (openBlock(), createElementBlock("i", _hoisted_3$4)) : createCommentVNode("", true)
4506
4820
  ], 34),
4507
4821
  createVNode(Transition, { name: "dao-nav" }, {
4508
4822
  default: withCtx(() => [
4509
4823
  withDirectives(createElementVNode("div", null, [
4510
- _hoisted_4$4,
4824
+ _hoisted_4$3,
4511
4825
  createElementVNode("ul", _hoisted_5$3, [
4512
4826
  renderSlot(_ctx.$slots, "default")
4513
4827
  ]),
@@ -4556,14 +4870,105 @@ const paginationProps = {
4556
4870
  pageSizerWidth: {
4557
4871
  type: Number,
4558
4872
  default: 110
4873
+ },
4874
+ layout: {
4875
+ type: Array,
4876
+ default: ["total", "pager", "sizer"]
4877
+ }
4878
+ };
4879
+ function tryOnScopeDispose(fn2) {
4880
+ if (getCurrentScope()) {
4881
+ onScopeDispose(fn2);
4882
+ return true;
4559
4883
  }
4884
+ return false;
4885
+ }
4886
+ const isClient = typeof window !== "undefined";
4887
+ const isString = (val) => typeof val === "string";
4888
+ const noop = () => {
4560
4889
  };
4890
+ function unrefElement(elRef) {
4891
+ var _a2;
4892
+ const plain = unref(elRef);
4893
+ return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
4894
+ }
4895
+ const defaultWindow = isClient ? window : void 0;
4896
+ isClient ? window.document : void 0;
4897
+ isClient ? window.navigator : void 0;
4898
+ isClient ? window.location : void 0;
4899
+ function useEventListener(...args) {
4900
+ let target;
4901
+ let event;
4902
+ let listener;
4903
+ let options;
4904
+ if (isString(args[0])) {
4905
+ [event, listener, options] = args;
4906
+ target = defaultWindow;
4907
+ } else {
4908
+ [target, event, listener, options] = args;
4909
+ }
4910
+ if (!target)
4911
+ return noop;
4912
+ let cleanup = noop;
4913
+ const stopWatch = watch(() => unrefElement(target), (el) => {
4914
+ cleanup();
4915
+ if (!el)
4916
+ return;
4917
+ el.addEventListener(event, listener, options);
4918
+ cleanup = () => {
4919
+ el.removeEventListener(event, listener, options);
4920
+ cleanup = noop;
4921
+ };
4922
+ }, { immediate: true, flush: "post" });
4923
+ const stop = () => {
4924
+ stopWatch();
4925
+ cleanup();
4926
+ };
4927
+ tryOnScopeDispose(stop);
4928
+ return stop;
4929
+ }
4930
+ function onClickOutside(target, handler, options = {}) {
4931
+ const { window: window2 = defaultWindow, ignore, capture = true } = options;
4932
+ if (!window2)
4933
+ return;
4934
+ const shouldListen = ref(true);
4935
+ const listener = (event) => {
4936
+ const el = unrefElement(target);
4937
+ const composedPath = event.composedPath();
4938
+ if (!el || el === event.target || composedPath.includes(el) || !shouldListen.value)
4939
+ return;
4940
+ if (ignore && ignore.length > 0) {
4941
+ if (ignore.some((target2) => {
4942
+ const el2 = unrefElement(target2);
4943
+ return el2 && (event.target === el2 || composedPath.includes(el2));
4944
+ }))
4945
+ return;
4946
+ }
4947
+ handler(event);
4948
+ };
4949
+ const cleanup = [
4950
+ useEventListener(window2, "click", listener, { passive: true, capture }),
4951
+ useEventListener(window2, "pointerdown", (e) => {
4952
+ const el = unrefElement(target);
4953
+ shouldListen.value = !!el && !e.composedPath().includes(el);
4954
+ }, { passive: true })
4955
+ ];
4956
+ const stop = () => cleanup.forEach((fn2) => fn2());
4957
+ return stop;
4958
+ }
4959
+ const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
4960
+ const globalKey = "__vueuse_ssr_handlers__";
4961
+ _global[globalKey] = _global[globalKey] || {};
4962
+ _global[globalKey];
4963
+ var _a, _b;
4964
+ isClient && (window == null ? void 0 : window.navigator) && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.platform) && /iP(ad|hone|od)/.test((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.platform);
4561
4965
  var select_vue_vue_type_style_index_0_lang = "";
4562
4966
  const _sfc_main$c = defineComponent({
4563
4967
  name: "DaoSelect",
4564
4968
  components: {
4565
4969
  DaoPopper: Popper
4566
4970
  },
4971
+ directives: {},
4567
4972
  props: {
4568
4973
  modelValue: {
4569
4974
  type: [String, Number, Boolean],
@@ -4600,7 +5005,7 @@ const _sfc_main$c = defineComponent({
4600
5005
  },
4601
5006
  appendTo: {
4602
5007
  type: [String, Boolean, Object],
4603
- default: "body"
5008
+ default: "root"
4604
5009
  }
4605
5010
  },
4606
5011
  emits: ["update:modelValue", "change", "search-change", "close", "open"],
@@ -4613,12 +5018,15 @@ const _sfc_main$c = defineComponent({
4613
5018
  search
4614
5019
  } = toRefs(props);
4615
5020
  const state = reactive({
5021
+ optionFocusIndex: -1,
5022
+ visible: false,
4616
5023
  selectedOption: void 0,
4617
5024
  options: [],
4618
5025
  searchText: ""
4619
5026
  });
4620
5027
  const popper2 = ref(null);
4621
5028
  const searchInput = ref(null);
5029
+ const triggerRef = ref(null);
4622
5030
  const instance = getCurrentInstance();
4623
5031
  provide("select", instance);
4624
5032
  const popperOffset = computed(() => {
@@ -4651,8 +5059,8 @@ const _sfc_main$c = defineComponent({
4651
5059
  return classNames.join(" ");
4652
5060
  });
4653
5061
  const isSelected = computed(() => {
4654
- var _a;
4655
- return !isNullish((_a = state.selectedOption) == null ? void 0 : _a.value);
5062
+ var _a2;
5063
+ return !isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value);
4656
5064
  });
4657
5065
  const isNoResult = computed(() => {
4658
5066
  const unrefSearch = unref(search);
@@ -4674,31 +5082,40 @@ const _sfc_main$c = defineComponent({
4674
5082
  }
4675
5083
  ]
4676
5084
  }));
5085
+ const onSearchClear = () => {
5086
+ var _a2;
5087
+ state.searchText = "";
5088
+ state.options.forEach((option) => {
5089
+ option.setVisible(true);
5090
+ });
5091
+ (_a2 = searchInput.value) == null ? void 0 : _a2.focus();
5092
+ };
4677
5093
  const onSelect = (option) => {
4678
5094
  const unrefPopper = unref(popper2);
4679
5095
  state.selectedOption = option;
5096
+ onSearchClear();
4680
5097
  emit("update:modelValue", state.selectedOption.value);
4681
5098
  emit("change", state.selectedOption.value);
4682
5099
  unrefPopper == null ? void 0 : unrefPopper.hide();
4683
5100
  };
4684
5101
  const checkUpdatedOption = () => {
4685
- var _a;
5102
+ var _a2;
4686
5103
  const unrefModelValue = unref(modelValue);
4687
- if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a = state.selectedOption) == null ? void 0 : _a.value)) {
5104
+ if (!isNullish(unrefModelValue) && unrefModelValue !== ((_a2 = state.selectedOption) == null ? void 0 : _a2.value)) {
4688
5105
  const target = state.options.find((o) => o.value === unrefModelValue);
4689
5106
  state.selectedOption = target;
4690
5107
  }
4691
5108
  };
4692
5109
  const checkNewOption = (option) => {
4693
- var _a;
5110
+ var _a2;
4694
5111
  const unrefModelValue = unref(modelValue);
4695
- if (!isNullish(unrefModelValue) && isNullish((_a = state.selectedOption) == null ? void 0 : _a.value) && unrefModelValue === option.value) {
5112
+ if (!isNullish(unrefModelValue) && isNullish((_a2 = state.selectedOption) == null ? void 0 : _a2.value) && unrefModelValue === option.value) {
4696
5113
  state.selectedOption = option;
4697
5114
  }
4698
5115
  };
4699
5116
  const checkRemovedOption = (option) => {
4700
- var _a;
4701
- if (((_a = state.selectedOption) == null ? void 0 : _a.value) === option.value) {
5117
+ var _a2;
5118
+ if (((_a2 = state.selectedOption) == null ? void 0 : _a2.value) === option.value) {
4702
5119
  state.selectedOption = void 0;
4703
5120
  }
4704
5121
  };
@@ -4718,14 +5135,6 @@ const _sfc_main$c = defineComponent({
4718
5135
  });
4719
5136
  emit("search-change", searchContent);
4720
5137
  };
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
5138
  const remove = (index2) => {
4730
5139
  if (index2 > -1) {
4731
5140
  const [removed] = state.options.splice(index2, 1);
@@ -4743,8 +5152,106 @@ const _sfc_main$c = defineComponent({
4743
5152
  provide("remove", remove);
4744
5153
  provide("selectState", state);
4745
5154
  watch(modelValue, () => checkUpdatedOption());
5155
+ const bindTriggerEleOutsideClick = {
5156
+ cleanup: void 0,
5157
+ visible() {
5158
+ if (!this.cleanup) {
5159
+ this.cleanup = onClickOutside(popper2, () => {
5160
+ state.visible = false;
5161
+ }, {
5162
+ ignore: [triggerRef]
5163
+ });
5164
+ }
5165
+ },
5166
+ invisible() {
5167
+ if (typeof this.cleanup === "function") {
5168
+ this.cleanup();
5169
+ this.cleanup = void 0;
5170
+ }
5171
+ }
5172
+ };
5173
+ const bindPopperTrigger = {
5174
+ target: void 0,
5175
+ visible() {
5176
+ this.target = document.activeElement;
5177
+ },
5178
+ invisible() {
5179
+ var _a2;
5180
+ if (document.activeElement && document.activeElement !== this.target) {
5181
+ (_a2 = this.target) == null ? void 0 : _a2.focus();
5182
+ }
5183
+ this.target = void 0;
5184
+ }
5185
+ };
5186
+ watch(() => state.visible, (visible) => {
5187
+ if (visible) {
5188
+ bindTriggerEleOutsideClick.visible();
5189
+ bindPopperTrigger.visible();
5190
+ state.optionFocusIndex = (state == null ? void 0 : state.selectedOption) ? state == null ? void 0 : state.options.indexOf(state.selectedOption) : -1;
5191
+ setTimeout(() => {
5192
+ var _a2;
5193
+ (_a2 = searchInput.value) == null ? void 0 : _a2.focus();
5194
+ }, 0);
5195
+ } else {
5196
+ bindTriggerEleOutsideClick.invisible();
5197
+ bindPopperTrigger.invisible();
5198
+ state.optionFocusIndex = -1;
5199
+ }
5200
+ });
5201
+ const optionsAllDisabled = computed(() => state.options.filter((option) => option.visible).every((option) => option.disabled));
5202
+ const navigateOptions = (direction) => {
5203
+ if (!state.visible) {
5204
+ state.visible = true;
5205
+ return;
5206
+ }
5207
+ const { length } = state.options;
5208
+ if (length === 0) {
5209
+ return;
5210
+ }
5211
+ if (optionsAllDisabled.value) {
5212
+ return;
5213
+ }
5214
+ if (direction === "next") {
5215
+ state.optionFocusIndex += 1;
5216
+ if (state.optionFocusIndex === length) {
5217
+ state.optionFocusIndex = 0;
5218
+ }
5219
+ } else if (direction === "prev") {
5220
+ state.optionFocusIndex -= 1;
5221
+ if (state.optionFocusIndex < 0) {
5222
+ state.optionFocusIndex = length - 1;
5223
+ }
5224
+ }
5225
+ const option = state.options[state.optionFocusIndex];
5226
+ if (option.disabled || !option.visible) {
5227
+ navigateOptions(direction);
5228
+ }
5229
+ };
5230
+ const handleTargetTrigger = () => {
5231
+ if (state.optionFocusIndex > -1) {
5232
+ onSelect(state == null ? void 0 : state.options[state.optionFocusIndex]);
5233
+ return;
5234
+ }
5235
+ state.visible = !state.visible;
5236
+ };
5237
+ const handleEvent = {
5238
+ searchInput: {
5239
+ keydownEnter() {
5240
+ if (state.optionFocusIndex > -1) {
5241
+ handleTargetTrigger();
5242
+ } else if (state.searchText === "") {
5243
+ state.visible = false;
5244
+ }
5245
+ },
5246
+ keydownEsc() {
5247
+ state.searchText ? onSearchClear : state.visible = false;
5248
+ }
5249
+ }
5250
+ };
4746
5251
  return {
4747
5252
  popper: popper2,
5253
+ searchInput,
5254
+ triggerRef,
4748
5255
  state,
4749
5256
  selectClass,
4750
5257
  popperClass,
@@ -4757,31 +5264,22 @@ const _sfc_main$c = defineComponent({
4757
5264
  onSearchClear,
4758
5265
  add,
4759
5266
  remove,
4760
- searchInput
5267
+ handleTargetTrigger,
5268
+ navigateOptions,
5269
+ handleEvent
4761
5270
  };
4762
5271
  }
4763
5272
  });
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 = {
5273
+ const _hoisted_1$8 = { class: "dao-selection-text" };
5274
+ const _hoisted_2$7 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
5275
+ const _hoisted_3$3 = {
4778
5276
  key: 0,
4779
5277
  class: "dao-selection-search"
4780
5278
  };
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 = {
5279
+ const _hoisted_4$2 = ["placeholder"];
5280
+ const _hoisted_5$2 = /* @__PURE__ */ createElementVNode("i", { class: "icon-search dao-selection-search-icon" }, null, -1);
5281
+ const _hoisted_6$1 = { class: "dao-option-list" };
5282
+ const _hoisted_7$1 = {
4785
5283
  key: "dao-option-placeholder",
4786
5284
  class: "dao-option-placeholder"
4787
5285
  };
@@ -4789,6 +5287,8 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
4789
5287
  const _component_dao_popper = resolveComponent("dao-popper");
4790
5288
  return openBlock(), createBlock(_component_dao_popper, {
4791
5289
  ref: "popper",
5290
+ modelValue: _ctx.state.visible,
5291
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => _ctx.state.visible = $event),
4792
5292
  delay: 0,
4793
5293
  disabled: _ctx.disabled,
4794
5294
  offset: _ctx.popperOffset,
@@ -4798,64 +5298,82 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
4798
5298
  class: normalizeClass(_ctx.selectClass),
4799
5299
  "append-to": _ctx.appendTo,
4800
5300
  transition: "dao-select",
4801
- trigger: "click",
5301
+ trigger: "manual",
4802
5302
  placement: "bottom",
4803
- onHide: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("close")),
4804
- onShow: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("open"))
5303
+ onHide: _cache[14] || (_cache[14] = ($event) => _ctx.$emit("close")),
5304
+ onShow: _cache[15] || (_cache[15] = ($event) => _ctx.$emit("open"))
4805
5305
  }, {
4806
5306
  content: withCtx(() => [
4807
5307
  renderSlot(_ctx.$slots, "optionsHeader", {}, () => [
4808
- _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
5308
+ _ctx.search ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
4809
5309
  withDirectives(createElementVNode("input", {
4810
5310
  ref: "searchInput",
4811
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.state.searchText = $event),
5311
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.state.searchText = $event),
4812
5312
  placeholder: _ctx.searchPlaceholder,
4813
- tabindex: "1",
4814
5313
  class: "dao-selection-search-input",
4815
5314
  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), [
5315
+ onInput: _cache[6] || (_cache[6] = (...args) => _ctx.onSearchTextChange && _ctx.onSearchTextChange(...args)),
5316
+ onKeydown: [
5317
+ _cache[7] || (_cache[7] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["tab"])),
5318
+ _cache[8] || (_cache[8] = withKeys((...args) => _ctx.handleEvent.searchInput.keydownEsc && _ctx.handleEvent.searchInput.keydownEsc(...args), ["esc"])),
5319
+ _cache[9] || (_cache[9] = withKeys(withModifiers((...args) => _ctx.handleEvent.searchInput.keydownEnter && _ctx.handleEvent.searchInput.keydownEnter(...args), ["stop", "prevent"]), ["enter"])),
5320
+ _cache[10] || (_cache[10] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
5321
+ _cache[11] || (_cache[11] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
5322
+ ]
5323
+ }, null, 40, _hoisted_4$2), [
4819
5324
  [vModelText, _ctx.state.searchText]
4820
5325
  ]),
4821
- _hoisted_7$1,
5326
+ _hoisted_5$2,
4822
5327
  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), [
5328
+ class: "icon-sys-error dao-selection-search-clear-icon",
5329
+ onClick: _cache[12] || (_cache[12] = withModifiers((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["stop", "prevent"]))
5330
+ }, null, 512), [
4828
5331
  [vShow, _ctx.state.searchText]
4829
5332
  ])
4830
5333
  ])) : createCommentVNode("", true)
4831
5334
  ]),
4832
- createElementVNode("ul", _hoisted_8$1, [
5335
+ createElementVNode("ul", _hoisted_6$1, [
4833
5336
  renderSlot(_ctx.$slots, "default"),
4834
- _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_9$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
5337
+ _ctx.isNoResult ? (openBlock(), createElementBlock("li", _hoisted_7$1, toDisplayString(_ctx.optionsPlaceholder), 1)) : createCommentVNode("", true)
4835
5338
  ])
4836
5339
  ]),
4837
5340
  default: withCtx(() => {
4838
- var _a, _b;
5341
+ var _a2, _b2;
4839
5342
  return [
4840
- createElementVNode("button", _hoisted_1$9, [
4841
- _ctx.isSelected ? (openBlock(), createElementBlock("span", _hoisted_2$7, [
5343
+ createElementVNode("button", {
5344
+ ref: "triggerRef",
5345
+ class: "dao-selection",
5346
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleTargetTrigger && _ctx.handleTargetTrigger(...args)),
5347
+ onKeydown: [
5348
+ _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop"]), ["tab"])),
5349
+ _cache[2] || (_cache[2] = withKeys(withModifiers(($event) => _ctx.state.visible = false, ["stop", "prevent"]), ["esc"])),
5350
+ _cache[3] || (_cache[3] = withKeys(withModifiers(($event) => _ctx.navigateOptions("next"), ["prevent"]), ["down"])),
5351
+ _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.navigateOptions("prev"), ["prevent"]), ["up"]))
5352
+ ]
5353
+ }, [
5354
+ withDirectives(createElementVNode("span", _hoisted_1$8, [
4842
5355
  renderSlot(_ctx.$slots, "selected", {
4843
- selectedLabel: (_a = _ctx.state.selectedOption) == null ? void 0 : _a.label,
5356
+ selectedLabel: (_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.label,
4844
5357
  selectedOption: _ctx.state.selectedOption,
4845
- selectedValue: (_b = _ctx.state.selectedOption) == null ? void 0 : _b.value
5358
+ selectedValue: (_b2 = _ctx.state.selectedOption) == null ? void 0 : _b2.value
4846
5359
  }, () => {
4847
- var _a2;
5360
+ var _a3;
4848
5361
  return [
4849
- createTextVNode(toDisplayString((_a2 = _ctx.state.selectedOption) == null ? void 0 : _a2.labelValue), 1)
5362
+ createTextVNode(toDisplayString((_a3 = _ctx.state.selectedOption) == null ? void 0 : _a3.labelValue), 1)
4850
5363
  ];
4851
5364
  })
4852
- ])) : (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(_ctx.placeholder), 1)),
4853
- _hoisted_4$3
4854
- ])
5365
+ ], 512), [
5366
+ [vShow, _ctx.isSelected]
5367
+ ]),
5368
+ withDirectives(createElementVNode("span", { class: "dao-selection-text--placeholder" }, toDisplayString(_ctx.placeholder), 513), [
5369
+ [vShow, !_ctx.isSelected]
5370
+ ]),
5371
+ _hoisted_2$7
5372
+ ], 544)
4855
5373
  ];
4856
5374
  }),
4857
5375
  _: 3
4858
- }, 8, ["disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
5376
+ }, 8, ["modelValue", "disabled", "offset", "popper-class", "popper-options", "class", "append-to"]);
4859
5377
  }
4860
5378
  var DaoSelect = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$a]]);
4861
5379
  var option_vue_vue_type_style_index_0_lang = "";
@@ -4876,6 +5394,7 @@ const _sfc_main$b = defineComponent({
4876
5394
  }
4877
5395
  },
4878
5396
  setup(props) {
5397
+ const optionRef = ref(null);
4879
5398
  const addFn = inject("add");
4880
5399
  const onSelectFn = inject("onSelect");
4881
5400
  const removeFn = inject("remove");
@@ -4889,6 +5408,7 @@ const _sfc_main$b = defineComponent({
4889
5408
  const instance = reactive({
4890
5409
  label: props.label,
4891
5410
  value: props.value,
5411
+ disabled: props.disabled,
4892
5412
  labelValue: labelValue.value,
4893
5413
  visible: true,
4894
5414
  setVisible(val) {
@@ -4897,8 +5417,21 @@ const _sfc_main$b = defineComponent({
4897
5417
  });
4898
5418
  const visible = computed(() => instance.visible);
4899
5419
  const isSelected = computed(() => {
4900
- var _a;
4901
- return ((_a = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a.value) === instance.value;
5420
+ var _a2;
5421
+ return ((_a2 = selectState == null ? void 0 : selectState.selectedOption) == null ? void 0 : _a2.value) === instance.value;
5422
+ });
5423
+ const isFocus = computed(() => {
5424
+ var _a2;
5425
+ const index2 = (_a2 = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a2 : -1;
5426
+ return index2 === (selectState == null ? void 0 : selectState.optionFocusIndex);
5427
+ });
5428
+ watch(isFocus, (val) => {
5429
+ nextTick(() => {
5430
+ if (val) {
5431
+ const el = optionRef.value;
5432
+ (el == null ? void 0 : el.scrollIntoViewIfNeeded) && (el == null ? void 0 : el.scrollIntoViewIfNeeded(false)) || (el == null ? void 0 : el.scrollIntoView) && el.scrollIntoView(false);
5433
+ }
5434
+ });
4902
5435
  });
4903
5436
  const onClick = () => {
4904
5437
  if (!props.disabled && typeof onSelectFn === "function") {
@@ -4909,31 +5442,35 @@ const _sfc_main$b = defineComponent({
4909
5442
  addFn(instance);
4910
5443
  }
4911
5444
  onBeforeUnmount(() => {
4912
- var _a;
5445
+ var _a2;
4913
5446
  if (typeof removeFn === "function") {
4914
- const index2 = (_a = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a : -1;
5447
+ const index2 = (_a2 = selectState == null ? void 0 : selectState.options.indexOf(instance)) != null ? _a2 : -1;
4915
5448
  removeFn(index2);
4916
5449
  }
4917
5450
  });
4918
5451
  return {
5452
+ optionRef,
4919
5453
  visible,
4920
5454
  labelValue,
4921
5455
  isSelected,
5456
+ isFocus,
4922
5457
  onClick
4923
5458
  };
4924
5459
  }
4925
5460
  });
4926
- const _hoisted_1$8 = ["title"];
5461
+ const _hoisted_1$7 = ["title"];
4927
5462
  const _hoisted_2$6 = {
4928
5463
  key: 0,
4929
5464
  class: "icon-checked dao-option-checkmark"
4930
5465
  };
4931
5466
  function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
4932
5467
  return withDirectives((openBlock(), createElementBlock("li", {
5468
+ ref: "optionRef",
4933
5469
  class: normalizeClass([
4934
5470
  "dao-option",
4935
5471
  {
4936
5472
  "dao-option-active": _ctx.isSelected,
5473
+ "dao-option--focus": _ctx.isFocus,
4937
5474
  "dao-option-disabled": _ctx.disabled
4938
5475
  }
4939
5476
  ]),
@@ -4945,7 +5482,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
4945
5482
  renderSlot(_ctx.$slots, "default", {}, () => [
4946
5483
  createTextVNode(toDisplayString(_ctx.labelValue), 1)
4947
5484
  ])
4948
- ], 8, _hoisted_1$8),
5485
+ ], 8, _hoisted_1$7),
4949
5486
  _ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$6)) : createCommentVNode("", true)
4950
5487
  ], 2)), [
4951
5488
  [vShow, _ctx.visible]
@@ -4987,6 +5524,16 @@ const _sfc_main$a = defineComponent({
4987
5524
  }
4988
5525
  return [...filteredPageSizeOptions, props.pageSize].sort(numberAscSort);
4989
5526
  });
5527
+ const computedLayout = computed(() => {
5528
+ if (!props.layout || props.layout.length === 0) {
5529
+ return { show: false };
5530
+ }
5531
+ const res = { show: true };
5532
+ props.layout.forEach((key) => {
5533
+ res[key] = true;
5534
+ });
5535
+ return res;
5536
+ });
4990
5537
  const prevPage = () => {
4991
5538
  if (currentPage.value === 1) {
4992
5539
  return;
@@ -5041,6 +5588,7 @@ const _sfc_main$a = defineComponent({
5041
5588
  totalText,
5042
5589
  totalPage,
5043
5590
  computedPageSizeOptions,
5591
+ computedLayout,
5044
5592
  prevPage,
5045
5593
  nextPage,
5046
5594
  targetPage,
@@ -5049,18 +5597,21 @@ const _sfc_main$a = defineComponent({
5049
5597
  };
5050
5598
  }
5051
5599
  });
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" };
5600
+ const _hoisted_1$6 = ["disabled"];
5601
+ const _hoisted_2$5 = { class: "dao-pagination__pager-total" };
5056
5602
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5057
5603
  const _component_dao_option = resolveComponent("dao-option");
5058
5604
  const _component_dao_select = resolveComponent("dao-select");
5059
- return openBlock(), createElementBlock("div", {
5605
+ return _ctx.computedLayout.show ? (openBlock(), createElementBlock("div", {
5606
+ key: 0,
5060
5607
  class: normalizeClass(["dao-pagination", { "dao-pagination--compact": _ctx.compact }])
5061
5608
  }, [
5062
- createElementVNode("div", _hoisted_1$7, toDisplayString(_ctx.totalText), 1),
5063
- createElementVNode("div", _hoisted_2$5, [
5609
+ createElementVNode("div", {
5610
+ class: normalizeClass(["dao-pagination__total", { "is-invisible": !_ctx.computedLayout.total }])
5611
+ }, toDisplayString(_ctx.totalText), 3),
5612
+ createElementVNode("div", {
5613
+ class: normalizeClass(["dao-pagination__pager", { "is-invisible": !_ctx.computedLayout.pager }])
5614
+ }, [
5064
5615
  createElementVNode("i", {
5065
5616
  class: normalizeClass([
5066
5617
  "icon-arrow-previous",
@@ -5075,10 +5626,10 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5075
5626
  disabled: _ctx.totalPage === 1,
5076
5627
  onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
5077
5628
  onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
5078
- }, null, 40, _hoisted_3$3), [
5629
+ }, null, 40, _hoisted_1$6), [
5079
5630
  [vModelText, _ctx.currentShowPage]
5080
5631
  ]),
5081
- createElementVNode("span", _hoisted_4$2, " / " + toDisplayString(_ctx.totalPage), 1),
5632
+ createElementVNode("span", _hoisted_2$5, " / " + toDisplayString(_ctx.totalPage), 1),
5082
5633
  createElementVNode("i", {
5083
5634
  class: normalizeClass([
5084
5635
  "icon-arrow-next",
@@ -5087,9 +5638,9 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5087
5638
  ]),
5088
5639
  onClick: _cache[4] || (_cache[4] = (...args) => _ctx.nextPage && _ctx.nextPage(...args))
5089
5640
  }, null, 2)
5090
- ]),
5641
+ ], 2),
5091
5642
  createVNode(_component_dao_select, {
5092
- class: "dao-pagination__sizer",
5643
+ class: normalizeClass(["dao-pagination__sizer", { "is-invisible": !_ctx.computedLayout.sizer }]),
5093
5644
  "model-value": _ctx.pageSize,
5094
5645
  size: "sm",
5095
5646
  style: normalizeStyle({ width: `${_ctx.pageSizerWidth}px` }),
@@ -5106,8 +5657,8 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
5106
5657
  }), 128))
5107
5658
  ]),
5108
5659
  _: 1
5109
- }, 8, ["model-value", "style", "onChange"])
5110
- ], 2);
5660
+ }, 8, ["class", "model-value", "style", "onChange"])
5661
+ ], 2)) : createCommentVNode("", true);
5111
5662
  }
5112
5663
  var DaoPagination = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$8]]);
5113
5664
  var popover_scss_vue_type_style_index_0_src_lang = "";
@@ -5166,7 +5717,7 @@ const _sfc_main$8 = defineComponent({
5166
5717
  };
5167
5718
  }
5168
5719
  });
5169
- const _hoisted_1$6 = { class: "dao-progress" };
5720
+ const _hoisted_1$5 = { class: "dao-progress" };
5170
5721
  const _hoisted_2$4 = {
5171
5722
  key: 1,
5172
5723
  class: "dao-progress__stacked"
@@ -5176,7 +5727,7 @@ const _hoisted_3$2 = {
5176
5727
  class: "dao-progress__text"
5177
5728
  };
5178
5729
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
5179
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
5730
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
5180
5731
  createElementVNode("div", {
5181
5732
  class: "dao-progress__inner",
5182
5733
  style: normalizeStyle({ background: _ctx.bgColor })
@@ -5272,7 +5823,7 @@ const _sfc_main$7 = defineComponent({
5272
5823
  };
5273
5824
  }
5274
5825
  });
5275
- const _hoisted_1$5 = ["disabled", "name", "checked"];
5826
+ const _hoisted_1$4 = ["disabled", "name", "checked"];
5276
5827
  const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
5277
5828
  const _hoisted_3$1 = {
5278
5829
  key: 0,
@@ -5300,7 +5851,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
5300
5851
  name: _ctx.name,
5301
5852
  checked: _ctx.currentValue,
5302
5853
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
5303
- }, null, 40, _hoisted_1$5),
5854
+ }, null, 40, _hoisted_1$4),
5304
5855
  _hoisted_2$3
5305
5856
  ], 2),
5306
5857
  _ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$1, [
@@ -5415,7 +5966,7 @@ const _sfc_main$5 = defineComponent({
5415
5966
  };
5416
5967
  }
5417
5968
  });
5418
- const _hoisted_1$4 = ["value", "name", "disabled"];
5969
+ const _hoisted_1$3 = ["value", "name", "disabled"];
5419
5970
  const _hoisted_2$2 = {
5420
5971
  key: 0,
5421
5972
  class: "dao-switch__label"
@@ -5431,7 +5982,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
5431
5982
  value: _ctx.currentValue,
5432
5983
  name: _ctx.name,
5433
5984
  disabled: _ctx.disabled
5434
- }, null, 8, _hoisted_1$4),
5985
+ }, null, 8, _hoisted_1$3),
5435
5986
  createElementVNode("span", {
5436
5987
  class: normalizeClass(["dao-switch__pill", { "dao-switch-checked": _ctx.currentValue }])
5437
5988
  }, null, 2),
@@ -5487,9 +6038,9 @@ const _sfc_main$4 = defineComponent({
5487
6038
  };
5488
6039
  }
5489
6040
  });
5490
- const _hoisted_1$3 = { class: "dao-table-resizer-separator" };
6041
+ const _hoisted_1$2 = { class: "dao-table-resizer-separator" };
5491
6042
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
5492
- return openBlock(), createElementBlock("span", _hoisted_1$3, [
6043
+ return openBlock(), createElementBlock("span", _hoisted_1$2, [
5493
6044
  !_ctx.disabled ? (openBlock(), createElementBlock("span", {
5494
6045
  key: 0,
5495
6046
  class: "dao-table-resizer-handle",
@@ -5561,7 +6112,16 @@ const tableProps = {
5561
6112
  pageSizerWidth: {
5562
6113
  type: Number,
5563
6114
  default: 110
5564
- }
6115
+ },
6116
+ emptyText: {
6117
+ type: String,
6118
+ default: "\u6682\u65E0\u6570\u636E"
6119
+ },
6120
+ noShadow: {
6121
+ type: Boolean,
6122
+ default: false
6123
+ },
6124
+ pageLayout: paginationProps.layout
5565
6125
  };
5566
6126
  var table_vue_vue_type_style_index_0_lang = "";
5567
6127
  const positiveIntegerNumberReg = /^[1-9]\d*$/;
@@ -5592,7 +6152,8 @@ const _sfc_main$3 = defineComponent({
5592
6152
  "next",
5593
6153
  "prev",
5594
6154
  "pageChange",
5595
- "sizeChange"
6155
+ "sizeChange",
6156
+ "row-click"
5596
6157
  ],
5597
6158
  setup(props, { emit }) {
5598
6159
  const tableId = computed(() => `DAO_TABLE_${props.id}`);
@@ -5603,10 +6164,24 @@ const _sfc_main$3 = defineComponent({
5603
6164
  const expandedRows = reactive(new WeakSet());
5604
6165
  const columnRefs = reactive({});
5605
6166
  const columns = reactive([]);
5606
- const currentPage = ref(props.currentPage);
5607
- const pageSize = ref(props.pageSize);
6167
+ const currentPage = computed({
6168
+ get() {
6169
+ return props.currentPage;
6170
+ },
6171
+ set(value) {
6172
+ emit("update:current-page", value);
6173
+ }
6174
+ });
6175
+ const pageSize = computed({
6176
+ get() {
6177
+ return props.pageSize;
6178
+ },
6179
+ set(value) {
6180
+ emit("update:page-size", value);
6181
+ }
6182
+ });
5608
6183
  const tableScroll = ref();
5609
- const global = reactive({
6184
+ const global2 = reactive({
5610
6185
  checked: false,
5611
6186
  indeterminate: false
5612
6187
  });
@@ -5632,8 +6207,8 @@ const _sfc_main$3 = defineComponent({
5632
6207
  watch(tableSetting, (val) => {
5633
6208
  setTableSetting(val);
5634
6209
  });
5635
- function formatDefaultTableSetting() {
5636
- return columns.reduce((prev, current) => {
6210
+ function formatDefaultTableSetting(tempColumns) {
6211
+ return tempColumns.reduce((prev, current) => {
5637
6212
  const preValue = prev;
5638
6213
  preValue[current.id] = {
5639
6214
  width: current.defaultWidth,
@@ -5643,15 +6218,16 @@ const _sfc_main$3 = defineComponent({
5643
6218
  }, {});
5644
6219
  }
5645
6220
  const init = () => {
6221
+ const tempColumns = [];
5646
6222
  props.columns.forEach((column) => {
5647
- columns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
6223
+ tempColumns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
5648
6224
  });
5649
6225
  const storedTableSetting = getTableSetting();
5650
- const defaultTableSetting = formatDefaultTableSetting();
6226
+ const defaultTableSetting = formatDefaultTableSetting(tempColumns);
5651
6227
  if (!storedTableSetting) {
5652
6228
  Object.assign(tableSetting, defaultTableSetting);
5653
6229
  } else {
5654
- columns.forEach((column) => {
6230
+ tempColumns.forEach((column) => {
5655
6231
  const { id } = column;
5656
6232
  if (!storedTableSetting[id]) {
5657
6233
  tableSetting[id] = {
@@ -5668,8 +6244,8 @@ const _sfc_main$3 = defineComponent({
5668
6244
  }
5669
6245
  });
5670
6246
  }
6247
+ columns.splice(0, columns.length, ...tempColumns);
5671
6248
  };
5672
- init();
5673
6249
  const columnStyle = (id) => {
5674
6250
  const setting = tableSetting[id];
5675
6251
  const { width } = setting;
@@ -5692,6 +6268,7 @@ const _sfc_main$3 = defineComponent({
5692
6268
  }
5693
6269
  return classes;
5694
6270
  });
6271
+ const isEmpty = computed(() => (props.data || []).length === 0);
5695
6272
  const sortColumn = (column) => {
5696
6273
  if (!column.sortable) {
5697
6274
  return;
@@ -5733,7 +6310,7 @@ const _sfc_main$3 = defineComponent({
5733
6310
  }
5734
6311
  };
5735
6312
  const toggleSelectedAll = () => {
5736
- if (global.checked) {
6313
+ if (global2.checked) {
5737
6314
  selectedRows.clear();
5738
6315
  emit("select", []);
5739
6316
  } else {
@@ -5761,12 +6338,9 @@ const _sfc_main$3 = defineComponent({
5761
6338
  clearExpansion();
5762
6339
  clearSelection();
5763
6340
  };
5764
- watch(currentPage, (val) => {
5765
- emit("update:current-page", val);
5766
- });
5767
- watch(pageSize, (val) => {
5768
- emit("update:page-size", val);
5769
- });
6341
+ watch(() => props.columns, () => {
6342
+ init();
6343
+ }, { deep: true, immediate: true });
5770
6344
  watchEffect(() => {
5771
6345
  let have = 0;
5772
6346
  let notHave = 0;
@@ -5782,14 +6356,14 @@ const _sfc_main$3 = defineComponent({
5782
6356
  }
5783
6357
  }
5784
6358
  if (have && notHave) {
5785
- global.checked = false;
5786
- global.indeterminate = true;
6359
+ global2.checked = false;
6360
+ global2.indeterminate = true;
5787
6361
  } else if (have) {
5788
- global.checked = true;
5789
- global.indeterminate = false;
6362
+ global2.checked = true;
6363
+ global2.indeterminate = false;
5790
6364
  } else {
5791
- global.checked = false;
5792
- global.indeterminate = false;
6365
+ global2.checked = false;
6366
+ global2.indeterminate = false;
5793
6367
  }
5794
6368
  });
5795
6369
  const isEllipsis = () => {
@@ -5815,6 +6389,9 @@ const _sfc_main$3 = defineComponent({
5815
6389
  onUnmounted(() => {
5816
6390
  window.removeEventListener("resize", windowResize);
5817
6391
  });
6392
+ function onRowClick(row, rowIndex) {
6393
+ emit("row-click", row, rowIndex);
6394
+ }
5818
6395
  return {
5819
6396
  columns,
5820
6397
  filterColumns,
@@ -5835,30 +6412,32 @@ const _sfc_main$3 = defineComponent({
5835
6412
  currentPage,
5836
6413
  pageSize,
5837
6414
  clearState,
5838
- global,
6415
+ global: global2,
5839
6416
  tableScroll,
5840
- expandedRows
6417
+ expandedRows,
6418
+ onRowClick,
6419
+ isEmpty
5841
6420
  };
5842
6421
  }
5843
6422
  });
5844
- const _hoisted_1$2 = { class: "dao-table-container" };
5845
- const _hoisted_2$1 = { class: "dao-table" };
5846
- const _hoisted_3 = {
6423
+ const _hoisted_1$1 = { class: "dao-table" };
6424
+ const _hoisted_2$1 = {
5847
6425
  key: 0,
5848
6426
  class: "dao-table-thead"
5849
6427
  };
5850
- const _hoisted_4 = { class: "dao-table-tr" };
5851
- const _hoisted_5 = {
6428
+ const _hoisted_3 = { class: "dao-table-tr" };
6429
+ const _hoisted_4 = {
5852
6430
  key: 0,
5853
6431
  class: "dao-table-th"
5854
6432
  };
5855
- const _hoisted_6 = {
6433
+ const _hoisted_5 = {
5856
6434
  key: 1,
5857
6435
  class: "dao-table-th dao-table-th--expandable"
5858
6436
  };
5859
- const _hoisted_7 = ["onClick"];
5860
- const _hoisted_8 = { class: "dao-table-th__content" };
5861
- const _hoisted_9 = { class: "dao-table-tbody" };
6437
+ const _hoisted_6 = ["onClick"];
6438
+ const _hoisted_7 = { class: "dao-table-th__content" };
6439
+ const _hoisted_8 = { class: "dao-table-tbody" };
6440
+ const _hoisted_9 = ["onClick"];
5862
6441
  const _hoisted_10 = {
5863
6442
  key: 0,
5864
6443
  class: "dao-table-td"
@@ -5872,27 +6451,33 @@ const _hoisted_13 = {
5872
6451
  key: 0,
5873
6452
  class: "dao-table-tr-expand"
5874
6453
  };
5875
- const _hoisted_14 = { class: "dao-table-pagination" };
6454
+ const _hoisted_14 = {
6455
+ key: 0,
6456
+ class: "dao-table__empty-block"
6457
+ };
6458
+ const _hoisted_15 = { class: "dao-table-pagination" };
5876
6459
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5877
6460
  const _component_dao_checkbox = resolveComponent("dao-checkbox");
5878
6461
  const _component_dao_resizer = resolveComponent("dao-resizer");
5879
6462
  const _component_dao_pagination = resolveComponent("dao-pagination");
5880
- return openBlock(), createElementBlock("div", _hoisted_1$2, [
6463
+ return openBlock(), createElementBlock("div", {
6464
+ class: normalizeClass(["dao-table-container", { "dao-table-container--with-shadow": !_ctx.noShadow }])
6465
+ }, [
5881
6466
  createElementVNode("div", {
5882
6467
  ref: "tableScroll",
5883
6468
  class: normalizeClass(["dao-table-scroll", _ctx.tableWrapperClasses])
5884
6469
  }, [
5885
- createElementVNode("table", _hoisted_2$1, [
5886
- _ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_3, [
5887
- createElementVNode("tr", _hoisted_4, [
5888
- _ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_5, [
6470
+ createElementVNode("table", _hoisted_1$1, [
6471
+ _ctx.showHeader ? (openBlock(), createElementBlock("thead", _hoisted_2$1, [
6472
+ createElementVNode("tr", _hoisted_3, [
6473
+ _ctx.selectable ? (openBlock(), createElementBlock("th", _hoisted_4, [
5889
6474
  createVNode(_component_dao_checkbox, {
5890
6475
  checked: _ctx.global.checked,
5891
6476
  indeterminate: _ctx.global.indeterminate,
5892
6477
  onChange: _ctx.toggleSelectedAll
5893
6478
  }, null, 8, ["checked", "indeterminate", "onChange"])
5894
6479
  ])) : createCommentVNode("", true),
5895
- _ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_6)) : createCommentVNode("", true),
6480
+ _ctx.expandable ? (openBlock(), createElementBlock("th", _hoisted_5)) : createCommentVNode("", true),
5896
6481
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
5897
6482
  return openBlock(), createElementBlock("th", {
5898
6483
  key: column.id,
@@ -5901,7 +6486,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5901
6486
  style: normalizeStyle(_ctx.columnStyle(column.id)),
5902
6487
  onClick: ($event) => _ctx.sortColumn(column)
5903
6488
  }, [
5904
- createElementVNode("span", _hoisted_8, [
6489
+ createElementVNode("span", _hoisted_7, [
5905
6490
  renderSlot(_ctx.$slots, `th-${column.id}`, {}, () => [
5906
6491
  createTextVNode(toDisplayString(column.header), 1)
5907
6492
  ])
@@ -5920,15 +6505,16 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5920
6505
  onUpdateColumnWidth: ($event) => _ctx.updateColumnWidth($event, column.id),
5921
6506
  onAfterResize: ($event) => _ctx.$emit("afterResize", column.id)
5922
6507
  }, null, 8, ["disabled", "setting", "column", "onFixedColumnWidth", "onUpdateColumnWidth", "onAfterResize"])
5923
- ], 14, _hoisted_7);
6508
+ ], 14, _hoisted_6);
5924
6509
  }), 128))
5925
6510
  ])
5926
6511
  ])) : createCommentVNode("", true),
5927
- createElementVNode("tbody", _hoisted_9, [
6512
+ createElementVNode("tbody", _hoisted_8, [
5928
6513
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
5929
6514
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
5930
6515
  createElementVNode("tr", {
5931
- class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }])
6516
+ class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
6517
+ onClick: ($event) => _ctx.onRowClick(row, index2)
5932
6518
  }, [
5933
6519
  _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_10, [
5934
6520
  createVNode(_component_dao_checkbox, {
@@ -5957,7 +6543,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5957
6543
  ])
5958
6544
  ], 4);
5959
6545
  }), 128))
5960
- ], 2),
6546
+ ], 10, _hoisted_9),
5961
6547
  _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
5962
6548
  renderSlot(_ctx.$slots, "expand", {
5963
6549
  row,
@@ -5967,43 +6553,53 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5967
6553
  [vShow, _ctx.isRowExpanded(row)]
5968
6554
  ]) : createCommentVNode("", true)
5969
6555
  ], 64);
5970
- }), 128))
6556
+ }), 128)),
6557
+ _ctx.isEmpty ? (openBlock(), createElementBlock("div", _hoisted_14, [
6558
+ renderSlot(_ctx.$slots, "empty", {}, () => [
6559
+ createTextVNode(toDisplayString(_ctx.emptyText), 1)
6560
+ ])
6561
+ ])) : createCommentVNode("", true)
5971
6562
  ])
5972
6563
  ])
5973
6564
  ], 2),
5974
- createElementVNode("div", _hoisted_14, [
5975
- renderSlot(_ctx.$slots, "pagination", {}, () => [
5976
- createVNode(_component_dao_pagination, {
5977
- "current-page": _ctx.currentPage,
5978
- "onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
5979
- "page-size": _ctx.pageSize,
5980
- "onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
5981
- "page-size-options": _ctx.pageSizeOptions,
5982
- "page-format": _ctx.pageFormat,
5983
- compact: _ctx.compact,
5984
- total: _ctx.total,
5985
- "total-format": _ctx.totalFormat,
5986
- "page-sizer-width": _ctx.pageSizerWidth,
5987
- onNext: _cache[2] || (_cache[2] = ($event) => {
5988
- _ctx.$emit("next", $event);
5989
- _ctx.clearState();
5990
- }),
5991
- onPrev: _cache[3] || (_cache[3] = ($event) => {
5992
- _ctx.$emit("prev", $event);
5993
- _ctx.clearState();
5994
- }),
5995
- onPageChange: _cache[4] || (_cache[4] = ($event) => {
5996
- _ctx.$emit("pageChange", $event);
5997
- _ctx.clearState();
5998
- }),
5999
- onSizeChange: _cache[5] || (_cache[5] = ($event) => {
6000
- _ctx.$emit("sizeChange", $event);
6001
- _ctx.clearState();
6002
- })
6003
- }, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "page-sizer-width"])
6004
- ])
6565
+ createElementVNode("div", _hoisted_15, [
6566
+ renderSlot(_ctx.$slots, "pagination", {}, () => {
6567
+ var _a2;
6568
+ return [
6569
+ !_ctx.isEmpty && ((_a2 = _ctx.pageLayout) == null ? void 0 : _a2.length) ? (openBlock(), createBlock(_component_dao_pagination, {
6570
+ key: 0,
6571
+ "current-page": _ctx.currentPage,
6572
+ "onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
6573
+ "page-size": _ctx.pageSize,
6574
+ "onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
6575
+ "page-size-options": _ctx.pageSizeOptions,
6576
+ "page-format": _ctx.pageFormat,
6577
+ compact: _ctx.compact,
6578
+ total: _ctx.total,
6579
+ "total-format": _ctx.totalFormat,
6580
+ layout: _ctx.pageLayout,
6581
+ "page-sizer-width": _ctx.pageSizerWidth,
6582
+ onNext: _cache[2] || (_cache[2] = ($event) => {
6583
+ _ctx.$emit("next", $event);
6584
+ _ctx.clearState();
6585
+ }),
6586
+ onPrev: _cache[3] || (_cache[3] = ($event) => {
6587
+ _ctx.$emit("prev", $event);
6588
+ _ctx.clearState();
6589
+ }),
6590
+ onPageChange: _cache[4] || (_cache[4] = ($event) => {
6591
+ _ctx.$emit("pageChange", $event);
6592
+ _ctx.clearState();
6593
+ }),
6594
+ onSizeChange: _cache[5] || (_cache[5] = ($event) => {
6595
+ _ctx.$emit("sizeChange", $event);
6596
+ _ctx.clearState();
6597
+ })
6598
+ }, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "compact", "total", "total-format", "layout", "page-sizer-width"])) : createCommentVNode("", true)
6599
+ ];
6600
+ })
6005
6601
  ])
6006
- ]);
6602
+ ], 2);
6007
6603
  }
6008
6604
  var table = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
6009
6605
  var tabNav_scss_vue_type_style_index_0_src_lang = "";
@@ -6031,6 +6627,7 @@ const _sfc_main$2 = defineComponent({
6031
6627
  const tabNav = ref();
6032
6628
  let lineStyle;
6033
6629
  let setActiveLineStyle;
6630
+ let tabResizeObserver;
6034
6631
  const isLine = computed(() => props.type === "line");
6035
6632
  const renderLines = () => {
6036
6633
  if (!isLine.value) {
@@ -6054,19 +6651,22 @@ const _sfc_main$2 = defineComponent({
6054
6651
  hoverTab.value = void 0;
6055
6652
  }
6056
6653
  };
6057
- const activeLineStyle = ref();
6654
+ const activeLineStyle = ref({});
6058
6655
  setActiveLineStyle = () => {
6059
6656
  const tab = unref(activeTab);
6060
- activeLineStyle.value = tab ? {
6061
- "--active-line-width": `${tab.offsetWidth || 0}px`,
6062
- "--active-line-left": `${tab.offsetLeft || 0}px`
6063
- } : {};
6657
+ if (tab && tab.offsetWidth && tab.offsetLeft) {
6658
+ activeLineStyle.value = {
6659
+ "--active-line-width": `${tab.offsetWidth || 0}px`,
6660
+ "--active-line-left": `${tab.offsetLeft || 0}px`
6661
+ };
6662
+ }
6064
6663
  };
6065
- watch(activeTab, setActiveLineStyle);
6066
- nextTick(() => {
6067
- var _a;
6068
- if (tabNav.value) {
6069
- (_a = tabNav.value) == null ? void 0 : _a.addEventListener("DOMSubtreeModified", setActiveLineStyle);
6664
+ watch(activeTab, (val) => {
6665
+ setActiveLineStyle();
6666
+ tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
6667
+ tabResizeObserver = new ResizeObserver(setActiveLineStyle);
6668
+ if (tabNav.value && val) {
6669
+ tabResizeObserver.observe(val);
6070
6670
  }
6071
6671
  });
6072
6672
  lineStyle = computed(() => __spreadValues(__spreadValues({}, activeLineStyle.value), hoverLineStyle.value));
@@ -6079,9 +6679,8 @@ const _sfc_main$2 = defineComponent({
6079
6679
  });
6080
6680
  onMounted(renderLines);
6081
6681
  onUnmounted(() => {
6082
- var _a;
6083
6682
  if (tabNav.value) {
6084
- (_a = tabNav.value) == null ? void 0 : _a.removeEventListener("DOMSubtreeModified", setActiveLineStyle);
6683
+ tabResizeObserver == null ? void 0 : tabResizeObserver.disconnect();
6085
6684
  }
6086
6685
  });
6087
6686
  const handleClick = (event, tab) => {
@@ -6137,7 +6736,7 @@ const _sfc_main$1 = defineComponent({
6137
6736
  type: {
6138
6737
  type: String,
6139
6738
  default: "card",
6140
- validator: (value) => ["card", "line"].includes(value)
6739
+ validator: (value) => ["card", "line", "pill"].includes(value)
6141
6740
  },
6142
6741
  direction: {
6143
6742
  type: String,
@@ -6175,11 +6774,11 @@ const _sfc_main$1 = defineComponent({
6175
6774
  const tabList = reactive([]);
6176
6775
  const tabBody = ref();
6177
6776
  const addTab = (tab, child) => {
6178
- var _a;
6777
+ var _a2;
6179
6778
  if (!child.value) {
6180
6779
  return;
6181
6780
  }
6182
- const index2 = Array.from(((_a = tabBody.value) == null ? void 0 : _a.children) || []).indexOf(child.value);
6781
+ const index2 = Array.from(((_a2 = tabBody.value) == null ? void 0 : _a2.children) || []).indexOf(child.value);
6183
6782
  if (index2 > -1) {
6184
6783
  tabList.splice(index2, 0, tab);
6185
6784
  }
@@ -6200,14 +6799,14 @@ const _sfc_main$1 = defineComponent({
6200
6799
  };
6201
6800
  }
6202
6801
  });
6203
- const _hoisted_1$1 = { class: "dao-tabs" };
6802
+ const _hoisted_1 = { class: "dao-tabs" };
6204
6803
  const _hoisted_2 = {
6205
6804
  ref: "tabBody",
6206
6805
  class: "dao-tabs-body"
6207
6806
  };
6208
6807
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6209
6808
  const _component_tab_nav = resolveComponent("tab-nav");
6210
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
6809
+ return openBlock(), createElementBlock("div", _hoisted_1, [
6211
6810
  createVNode(_component_tab_nav, {
6212
6811
  type: _ctx.type,
6213
6812
  "tab-list": _ctx.tabList,
@@ -6222,6 +6821,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
6222
6821
  ]);
6223
6822
  }
6224
6823
  var tabs = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
6824
+ var tabItem_scss_vue_type_style_index_0_src_lang = "";
6225
6825
  const _sfc_main = defineComponent({
6226
6826
  name: "DaoTabItem",
6227
6827
  props: {
@@ -6252,22 +6852,21 @@ const _sfc_main = defineComponent({
6252
6852
  };
6253
6853
  }
6254
6854
  });
6255
- const _hoisted_1 = {
6256
- ref: "tabItem",
6257
- class: "dao-tab-item"
6258
- };
6259
6855
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
6260
- return withDirectives((openBlock(), createElementBlock("div", _hoisted_1, [
6856
+ return openBlock(), createElementBlock("div", {
6857
+ ref: "tabItem",
6858
+ class: normalizeClass(["dao-tab-item", {
6859
+ "dao-tab-item--hidden": !_ctx.active
6860
+ }])
6861
+ }, [
6261
6862
  renderSlot(_ctx.$slots, "default")
6262
- ], 512)), [
6263
- [vShow, _ctx.active]
6264
- ]);
6863
+ ], 2);
6265
6864
  }
6266
6865
  var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
6267
6866
  var components = /* @__PURE__ */ Object.freeze({
6268
6867
  __proto__: null,
6269
6868
  [Symbol.toStringTag]: "Module",
6270
- ActionIcon: actionIcon,
6869
+ ActionIcon: DaoActionIcon,
6271
6870
  Button: DaoButton,
6272
6871
  ButtonGroup: buttonGroup,
6273
6872
  Card: card,
@@ -6281,6 +6880,8 @@ var components = /* @__PURE__ */ Object.freeze({
6281
6880
  Dropdown: dropdown,
6282
6881
  DropdownMenu: dropdownMenu,
6283
6882
  DropdownItem: dropdownItem,
6883
+ Expansion: expansion,
6884
+ ExpansionItem: expansionItem,
6284
6885
  Form: form,
6285
6886
  FormItem: formItem,
6286
6887
  FormGroup: formGroup,
@@ -6322,4 +6923,4 @@ const install = (Vue) => {
6322
6923
  var index = {
6323
6924
  install
6324
6925
  };
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 };
6926
+ export { DaoActionIcon 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, expansion as Expansion, expansionItem as ExpansionItem, 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 };