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

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.
@@ -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, toRefs, createVNode, withCtx, watch, Transition, withModifiers, normalizeStyle, withDirectives, vShow, withKeys, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, nextTick, reactive, renderList, vModelText, toRef, 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$x = ["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$x);
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$w = {
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$w, [
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$v = ["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$v);
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$u = { class: "dao-btn-group" };
274
+ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
275
+ return openBlock(), createElementBlock("div", _hoisted_1$u, [
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$t = {
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
- 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) {
317
+ const _hoisted_3$d = { class: "dao-card-header-item dao-card-header-title" };
318
+ const _hoisted_4$c = { 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$t, [
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,
@@ -352,12 +334,12 @@ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
352
334
  }, null, 8, ["name", "use-font"])) : createCommentVNode("", true)
353
335
  ])
354
336
  ])) : createCommentVNode("", true),
355
- createElementVNode("div", _hoisted_3$c, [
337
+ createElementVNode("div", _hoisted_3$d, [
356
338
  renderSlot(_ctx.$slots, "title", {}, () => [
357
339
  createTextVNode(toDisplayString(_ctx.title), 1)
358
340
  ])
359
341
  ]),
360
- createElementVNode("div", _hoisted_4$b, [
342
+ createElementVNode("div", _hoisted_4$c, [
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$s = { class: "dao-card-item" };
370
+ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
371
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
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,11 @@ 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
410
  const modelValueAny = [String, Number, Boolean, Symbol, Object, Set, Array];
427
- const _sfc_main$A = defineComponent({
411
+ const _sfc_main$C = defineComponent({
428
412
  name: "DaoCheckbox",
429
413
  props: {
430
414
  modelValue: {
@@ -557,21 +541,21 @@ const _sfc_main$A = defineComponent({
557
541
  }
558
542
  }
559
543
  });
560
- const _hoisted_1$p = ["disabled", "indeterminate", "checked"];
561
- const _hoisted_2$h = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
562
- const _hoisted_3$b = {
544
+ const _hoisted_1$r = ["disabled", "indeterminate", "checked"];
545
+ const _hoisted_2$i = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
546
+ const _hoisted_3$c = {
563
547
  key: 0,
564
548
  class: "dao-checkbox__label"
565
549
  };
566
- const _hoisted_4$a = {
550
+ const _hoisted_4$b = {
567
551
  key: 0,
568
552
  class: "dao-checkbox__label-text"
569
553
  };
570
- const _hoisted_5$6 = {
554
+ const _hoisted_5$7 = {
571
555
  key: 1,
572
556
  class: "dao-checkbox__label-helper"
573
557
  };
574
- function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
558
+ function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
575
559
  return openBlock(), createElementBlock("label", {
576
560
  class: normalizeClass(_ctx.wrapClasses)
577
561
  }, [
@@ -586,14 +570,14 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
586
570
  }, _ctx.$attrs, {
587
571
  checked: _ctx.currentChecked,
588
572
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
589
- }), null, 16, _hoisted_1$p),
590
- _hoisted_2$h
573
+ }), null, 16, _hoisted_1$r),
574
+ _hoisted_2$i
591
575
  ], 2),
592
- _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$b, [
593
- _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$a, [
576
+ _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$c, [
577
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", _hoisted_4$b, [
594
578
  renderSlot(_ctx.$slots, "default")
595
579
  ])) : createCommentVNode("", true),
596
- _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$6, [
580
+ _ctx.hasHelper ? (openBlock(), createElementBlock("span", _hoisted_5$7, [
597
581
  renderSlot(_ctx.$slots, "helper", {}, () => [
598
582
  createTextVNode(toDisplayString(_ctx.helper), 1)
599
583
  ])
@@ -601,9 +585,9 @@ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
601
585
  ])) : createCommentVNode("", true)
602
586
  ], 2);
603
587
  }
604
- var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
588
+ var DaoCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$z]]);
605
589
  var checkboxGroup_vue_vue_type_style_index_0_lang = "";
606
- const _sfc_main$z = defineComponent({
590
+ const _sfc_main$B = defineComponent({
607
591
  name: "DaoCheckboxGroup",
608
592
  props: {
609
593
  modelValue: {
@@ -637,15 +621,15 @@ const _sfc_main$z = defineComponent({
637
621
  };
638
622
  }
639
623
  });
640
- function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
624
+ function _sfc_render$y(_ctx, _cache, $props, $setup, $data, $options) {
641
625
  return openBlock(), createElementBlock("div", {
642
626
  class: normalizeClass(_ctx.checkboxGroupClasses)
643
627
  }, [
644
628
  renderSlot(_ctx.$slots, "default")
645
629
  ], 2);
646
630
  }
647
- var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
648
- const _sfc_main$y = defineComponent({
631
+ var checkboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$y]]);
632
+ const _sfc_main$A = defineComponent({
649
633
  name: "DaoDialogHeader",
650
634
  components: {
651
635
  DaoButton
@@ -668,10 +652,10 @@ const _sfc_main$y = defineComponent({
668
652
  };
669
653
  }
670
654
  });
671
- const _hoisted_1$o = { class: "dao-dialog-header" };
672
- function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
655
+ const _hoisted_1$q = { class: "dao-dialog-header" };
656
+ function _sfc_render$x(_ctx, _cache, $props, $setup, $data, $options) {
673
657
  const _component_dao_button = resolveComponent("dao-button");
674
- return openBlock(), createElementBlock("div", _hoisted_1$o, [
658
+ return openBlock(), createElementBlock("div", _hoisted_1$q, [
675
659
  renderSlot(_ctx.$slots, "default", {}, () => [
676
660
  createElementVNode("span", null, [
677
661
  renderSlot(_ctx.$slots, "title", {}, () => [
@@ -688,8 +672,8 @@ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
688
672
  ])
689
673
  ]);
690
674
  }
691
- var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
692
- const _sfc_main$x = defineComponent({
675
+ var DialogHeader = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$x]]);
676
+ const _sfc_main$z = defineComponent({
693
677
  name: "DaoDialogFooter",
694
678
  components: {
695
679
  DaoButton
@@ -725,10 +709,10 @@ const _sfc_main$x = defineComponent({
725
709
  };
726
710
  }
727
711
  });
728
- const _hoisted_1$n = { class: "dao-dialog-footer" };
729
- function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
712
+ const _hoisted_1$p = { class: "dao-dialog-footer" };
713
+ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
730
714
  const _component_dao_button = resolveComponent("dao-button");
731
- return openBlock(), createElementBlock("div", _hoisted_1$n, [
715
+ return openBlock(), createElementBlock("div", _hoisted_1$p, [
732
716
  renderSlot(_ctx.$slots, "default", {}, () => [
733
717
  createVNode(_component_dao_button, {
734
718
  type: "ghost",
@@ -753,13 +737,13 @@ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
753
737
  ])
754
738
  ]);
755
739
  }
756
- var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
740
+ var DialogFooter = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$w]]);
757
741
  var dialog_scss_vue_type_style_index_0_src_lang = "";
758
742
  const DIALOG_NUM_ATTR = "dao-dialog-num";
759
743
  const DIALOG_MINIMUM_PADDING = "20px";
760
744
  const DIALOG_DEFAULT_PADDING_TOP = "100px";
761
745
  const DIALOG_DEFAULT_PADDING_BOTTOM = "20px";
762
- const _sfc_main$w = defineComponent({
746
+ const _sfc_main$y = defineComponent({
763
747
  name: "DaoDialog",
764
748
  components: {
765
749
  DialogHeader,
@@ -934,8 +918,8 @@ const _sfc_main$w = defineComponent({
934
918
  };
935
919
  }
936
920
  });
937
- const _hoisted_1$m = { class: "dao-dialog-body" };
938
- function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
921
+ const _hoisted_1$o = { class: "dao-dialog-body" };
922
+ function _sfc_render$v(_ctx, _cache, $props, $setup, $data, $options) {
939
923
  const _component_dialog_header = resolveComponent("dialog-header");
940
924
  const _component_dialog_footer = resolveComponent("dialog-footer");
941
925
  return openBlock(), createBlock(Transition, {
@@ -970,7 +954,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
970
954
  ]),
971
955
  _: 3
972
956
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
973
- createElementVNode("div", _hoisted_1$m, [
957
+ createElementVNode("div", _hoisted_1$o, [
974
958
  renderSlot(_ctx.$slots, "default")
975
959
  ]),
976
960
  _ctx.footer ? (openBlock(), createBlock(_component_dialog_footer, {
@@ -992,7 +976,7 @@ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
992
976
  _: 3
993
977
  }, 8, ["onBeforeEnter", "onAfterEnter", "onBeforeLeave", "onAfterLeave"]);
994
978
  }
995
- var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
979
+ var dialog = /* @__PURE__ */ _export_sfc(_sfc_main$y, [["render", _sfc_render$v]]);
996
980
  const drawerProps = {
997
981
  modelValue: {
998
982
  type: Boolean,
@@ -1062,10 +1046,11 @@ const trapTabKey = (e, firstTab, lastTab) => {
1062
1046
  }
1063
1047
  };
1064
1048
  var drawer_vue_vue_type_style_index_0_lang = "";
1065
- const _sfc_main$v = defineComponent({
1049
+ const _sfc_main$x = defineComponent({
1066
1050
  name: "DaoDrawer",
1067
1051
  components: {
1068
- DaoButton
1052
+ DaoButton,
1053
+ DaoActionIcon
1069
1054
  },
1070
1055
  props: drawerProps,
1071
1056
  emits: ["close", "confirm"],
@@ -1167,19 +1152,20 @@ const _sfc_main$v = defineComponent({
1167
1152
  };
1168
1153
  }
1169
1154
  });
1170
- const _hoisted_1$l = { class: "dao-drawer__content" };
1171
- const _hoisted_2$g = {
1155
+ const _hoisted_1$n = { class: "dao-drawer__content" };
1156
+ const _hoisted_2$h = {
1172
1157
  key: 0,
1173
1158
  class: "dao-drawer__header"
1174
1159
  };
1175
- const _hoisted_3$a = { class: "dao-drawer__header-group" };
1176
- const _hoisted_4$9 = { class: "dao-drawer__body" };
1177
- const _hoisted_5$5 = {
1160
+ const _hoisted_3$b = { class: "dao-drawer__header-group" };
1161
+ const _hoisted_4$a = { class: "dao-drawer__body" };
1162
+ const _hoisted_5$6 = {
1178
1163
  key: 1,
1179
1164
  class: "dao-drawer__footer"
1180
1165
  };
1181
- const _hoisted_6$3 = { class: "dao-drawer__footer-group" };
1182
- function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1166
+ const _hoisted_6$4 = { class: "dao-drawer__footer-group" };
1167
+ function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
1168
+ const _component_dao_action_icon = resolveComponent("dao-action-icon");
1183
1169
  const _component_dao_button = resolveComponent("dao-button");
1184
1170
  return openBlock(), createElementBlock(Fragment, null, [
1185
1171
  createVNode(Transition, { name: "fade-in" }, {
@@ -1210,28 +1196,25 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1210
1196
  withDirectives(createElementVNode("div", {
1211
1197
  class: normalizeClass(_ctx.contentClassList)
1212
1198
  }, [
1213
- createElementVNode("div", _hoisted_1$l, [
1214
- !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$g, [
1199
+ createElementVNode("div", _hoisted_1$n, [
1200
+ !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
1215
1201
  renderSlot(_ctx.$slots, "header", {}, () => [
1216
- createElementVNode("div", _hoisted_3$a, [
1202
+ createElementVNode("div", _hoisted_3$b, [
1217
1203
  createElementVNode("span", null, toDisplayString(_ctx.title), 1),
1218
- !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_button, {
1204
+ !_ctx.hideCloseIcon ? (openBlock(), createBlock(_component_dao_action_icon, {
1219
1205
  key: 0,
1220
- size: "sm",
1221
- type: "ghost",
1222
- "icon-left": "icon-close",
1223
- "use-font": "",
1206
+ name: "icon-close",
1224
1207
  onClick: _ctx.close
1225
1208
  }, null, 8, ["onClick"])) : createCommentVNode("", true)
1226
1209
  ])
1227
1210
  ])
1228
1211
  ])) : createCommentVNode("", true),
1229
- createElementVNode("div", _hoisted_4$9, [
1212
+ createElementVNode("div", _hoisted_4$a, [
1230
1213
  renderSlot(_ctx.$slots, "default")
1231
1214
  ]),
1232
- !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$5, [
1215
+ !_ctx.hideFooter ? (openBlock(), createElementBlock("div", _hoisted_5$6, [
1233
1216
  renderSlot(_ctx.$slots, "footer", {}, () => [
1234
- createElementVNode("div", _hoisted_6$3, [
1217
+ createElementVNode("div", _hoisted_6$4, [
1235
1218
  createVNode(_component_dao_button, {
1236
1219
  type: "ghost",
1237
1220
  class: "footer-cancel-btn footer-btn",
@@ -1264,7 +1247,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
1264
1247
  ], 34)
1265
1248
  ], 64);
1266
1249
  }
1267
- var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
1250
+ var drawer = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["render", _sfc_render$u]]);
1268
1251
  var top = "top";
1269
1252
  var bottom = "bottom";
1270
1253
  var right = "right";
@@ -2463,7 +2446,7 @@ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyS
2463
2446
  var createPopper = /* @__PURE__ */ popperGenerator({
2464
2447
  defaultModifiers
2465
2448
  });
2466
- const _sfc_main$u = defineComponent({
2449
+ const _sfc_main$w = defineComponent({
2467
2450
  name: "PopperContent",
2468
2451
  props: {
2469
2452
  popperId: {
@@ -2511,12 +2494,12 @@ const _sfc_main$u = defineComponent({
2511
2494
  };
2512
2495
  }
2513
2496
  });
2514
- const _hoisted_1$k = ["id", "aria-hidden", "tabindex"];
2515
- const _hoisted_2$f = {
2497
+ const _hoisted_1$m = ["id", "aria-hidden", "tabindex"];
2498
+ const _hoisted_2$g = {
2516
2499
  ref: "arrow",
2517
2500
  class: "dao-popper-arrow"
2518
2501
  };
2519
- const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
2502
+ const _hoisted_3$a = /* @__PURE__ */ createElementVNode("svg", {
2520
2503
  class: "dao-popper-arrow-viewbox",
2521
2504
  viewBox: "0 0 15 15"
2522
2505
  }, [
@@ -2530,10 +2513,10 @@ const _hoisted_3$9 = /* @__PURE__ */ createElementVNode("svg", {
2530
2513
  d: "M6 7.5L15 -1L15 16Z"
2531
2514
  })
2532
2515
  ], -1);
2533
- const _hoisted_4$8 = [
2534
- _hoisted_3$9
2516
+ const _hoisted_4$9 = [
2517
+ _hoisted_3$a
2535
2518
  ];
2536
- function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
2519
+ function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
2537
2520
  return openBlock(), createElementBlock("div", {
2538
2521
  id: _ctx.popperId,
2539
2522
  ref: "popover",
@@ -2552,12 +2535,12 @@ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
2552
2535
  }, [
2553
2536
  renderSlot(_ctx.$slots, "default")
2554
2537
  ], 4),
2555
- withDirectives(createElementVNode("div", _hoisted_2$f, _hoisted_4$8, 512), [
2538
+ withDirectives(createElementVNode("div", _hoisted_2$g, _hoisted_4$9, 512), [
2556
2539
  [vShow, _ctx.visibleArrow]
2557
2540
  ])
2558
- ], 42, _hoisted_1$k);
2541
+ ], 42, _hoisted_1$m);
2559
2542
  }
2560
- var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
2543
+ var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$t]]);
2561
2544
  var PopperProps = {
2562
2545
  modelValue: {
2563
2546
  type: Boolean,
@@ -2647,7 +2630,7 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
2647
2630
  });
2648
2631
  });
2649
2632
  }
2650
- const _sfc_main$t = defineComponent({
2633
+ const _sfc_main$v = defineComponent({
2651
2634
  name: "DaoPopper",
2652
2635
  components: {
2653
2636
  PopperContent
@@ -3004,7 +2987,7 @@ const _sfc_main$t = defineComponent({
3004
2987
  };
3005
2988
  }
3006
2989
  });
3007
- function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
2990
+ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
3008
2991
  const _component_popper_content = resolveComponent("popper-content");
3009
2992
  return openBlock(), createElementBlock("div", {
3010
2993
  ref: "reference",
@@ -3046,8 +3029,8 @@ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3046
3029
  ], 8, ["to", "disabled"]))
3047
3030
  ], 2);
3048
3031
  }
3049
- var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
3050
- const _sfc_main$s = defineComponent({
3032
+ var Popper = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$s]]);
3033
+ const _sfc_main$u = defineComponent({
3051
3034
  name: "DaoDropdown",
3052
3035
  components: {
3053
3036
  DaoPopper: Popper
@@ -3103,8 +3086,8 @@ const _sfc_main$s = defineComponent({
3103
3086
  };
3104
3087
  }
3105
3088
  });
3106
- const _hoisted_1$j = { tabindex: "0" };
3107
- function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3089
+ const _hoisted_1$l = { tabindex: "0" };
3090
+ function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
3108
3091
  const _component_dao_popper = resolveComponent("dao-popper");
3109
3092
  return openBlock(), createBlock(_component_dao_popper, {
3110
3093
  ref: "popper",
@@ -3120,27 +3103,27 @@ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3120
3103
  renderSlot(_ctx.$slots, "menu")
3121
3104
  ]),
3122
3105
  default: withCtx(() => [
3123
- createElementVNode("div", _hoisted_1$j, [
3106
+ createElementVNode("div", _hoisted_1$l, [
3124
3107
  renderSlot(_ctx.$slots, "default")
3125
3108
  ])
3126
3109
  ]),
3127
3110
  _: 3
3128
3111
  }, 8, ["placement", "append-to", "trigger", "offset", "model-value"]);
3129
3112
  }
3130
- var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
3113
+ var dropdown = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["render", _sfc_render$r]]);
3131
3114
  var dropdownMenu_vue_vue_type_style_index_0_lang = "";
3132
- const _sfc_main$r = defineComponent({
3115
+ const _sfc_main$t = defineComponent({
3133
3116
  name: "DaoDropdownMenu"
3134
3117
  });
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, [
3118
+ const _hoisted_1$k = { class: "dao-dropdown-menu" };
3119
+ function _sfc_render$q(_ctx, _cache, $props, $setup, $data, $options) {
3120
+ return openBlock(), createElementBlock("ul", _hoisted_1$k, [
3138
3121
  renderSlot(_ctx.$slots, "default")
3139
3122
  ]);
3140
3123
  }
3141
- var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
3124
+ var dropdownMenu = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["render", _sfc_render$q]]);
3142
3125
  var dropdownItem_vue_vue_type_style_index_0_lang = "";
3143
- const _sfc_main$q = defineComponent({
3126
+ const _sfc_main$s = defineComponent({
3144
3127
  name: "DaoDropdownItem",
3145
3128
  props: {
3146
3129
  type: {
@@ -3189,12 +3172,257 @@ const _sfc_main$q = defineComponent({
3189
3172
  };
3190
3173
  }
3191
3174
  });
3192
- function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3175
+ function _sfc_render$p(_ctx, _cache, $props, $setup, $data, $options) {
3193
3176
  return openBlock(), createElementBlock("li", mergeProps({ class: _ctx.classList }, _ctx.itemAttrs), [
3194
3177
  _ctx.type !== "divider" ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("", true)
3195
3178
  ], 16);
3196
3179
  }
3197
- var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
3180
+ var dropdownItem = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["render", _sfc_render$p]]);
3181
+ const expansionProps = {
3182
+ modelValue: {
3183
+ type: [String, Symbol, Array]
3184
+ },
3185
+ accordion: {
3186
+ type: Boolean,
3187
+ default: false
3188
+ }
3189
+ };
3190
+ const expansionItemProps = {
3191
+ name: {
3192
+ type: [String, Symbol],
3193
+ required: true
3194
+ },
3195
+ title: {
3196
+ type: String,
3197
+ default: ""
3198
+ },
3199
+ description: {
3200
+ type: String,
3201
+ default: ""
3202
+ }
3203
+ };
3204
+ var expansion_vue_vue_type_style_index_0_lang = "";
3205
+ const _sfc_main$r = defineComponent({
3206
+ name: "DaoExpansion",
3207
+ props: expansionProps,
3208
+ emits: ["update:modelValue", "change"],
3209
+ setup(props, { emit }) {
3210
+ const { accordion, modelValue } = toRefs(props);
3211
+ const state = reactive({
3212
+ expansionRecord: modelValue.value,
3213
+ accordion: accordion.value
3214
+ });
3215
+ function toggleItem(itemName) {
3216
+ if (props.accordion) {
3217
+ let currentVal = itemName;
3218
+ if (currentVal === state.expansionRecord) {
3219
+ currentVal = void 0;
3220
+ }
3221
+ state.expansionRecord = currentVal;
3222
+ emit("update:modelValue", currentVal);
3223
+ emit("change", currentVal);
3224
+ } else {
3225
+ let rst = [];
3226
+ if (Array.isArray(state.expansionRecord)) {
3227
+ rst = [...state.expansionRecord];
3228
+ }
3229
+ const idx = rst.indexOf(itemName);
3230
+ if (idx > -1) {
3231
+ rst.splice(idx, 1);
3232
+ } else {
3233
+ rst.push(itemName);
3234
+ }
3235
+ state.expansionRecord = rst;
3236
+ emit("update:modelValue", rst);
3237
+ emit("change", rst);
3238
+ }
3239
+ }
3240
+ watch([modelValue, accordion], ([newM, newA]) => {
3241
+ state.expansionRecord = newM;
3242
+ if (newA !== state.accordion) {
3243
+ let nextRecordVal;
3244
+ if (newA) {
3245
+ if (Array.isArray(state.expansionRecord)) {
3246
+ if (state.expansionRecord.length) {
3247
+ [nextRecordVal] = state.expansionRecord;
3248
+ }
3249
+ } else {
3250
+ nextRecordVal = state.expansionRecord;
3251
+ }
3252
+ } else {
3253
+ nextRecordVal = [];
3254
+ if (state.expansionRecord !== void 0) {
3255
+ if (!Array.isArray(state.expansionRecord)) {
3256
+ nextRecordVal[0] = state.expansionRecord;
3257
+ }
3258
+ }
3259
+ }
3260
+ state.expansionRecord = nextRecordVal;
3261
+ debugger;
3262
+ emit("update:modelValue", nextRecordVal);
3263
+ emit("change", nextRecordVal);
3264
+ }
3265
+ state.accordion = newA;
3266
+ });
3267
+ provide(ToggleItemKey, toggleItem);
3268
+ provide(ExpansionStateKey, state);
3269
+ return {
3270
+ toggleItem,
3271
+ state
3272
+ };
3273
+ }
3274
+ });
3275
+ const _hoisted_1$j = { class: "dao-expansion" };
3276
+ function _sfc_render$o(_ctx, _cache, $props, $setup, $data, $options) {
3277
+ return openBlock(), createElementBlock("div", _hoisted_1$j, [
3278
+ renderSlot(_ctx.$slots, "default")
3279
+ ]);
3280
+ }
3281
+ var expansion = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["render", _sfc_render$o]]);
3282
+ var expansionItem_vue_vue_type_style_index_0_lang = "";
3283
+ const _sfc_main$q = defineComponent({
3284
+ name: "DaoExpansionItem",
3285
+ components: {
3286
+ DaoIcon
3287
+ },
3288
+ props: expansionItemProps,
3289
+ setup(props) {
3290
+ const toggleItem = inject(ToggleItemKey, null);
3291
+ const parentState = inject(ExpansionStateKey, null);
3292
+ function onItemClick() {
3293
+ if (props.name !== void 0) {
3294
+ toggleItem == null ? void 0 : toggleItem(props.name);
3295
+ }
3296
+ }
3297
+ const isExpanded = computed(() => {
3298
+ if (parentState == null ? void 0 : parentState.expansionRecord) {
3299
+ if (parentState == null ? void 0 : parentState.accordion) {
3300
+ return parentState.expansionRecord === props.name;
3301
+ }
3302
+ if (Array.isArray(parentState == null ? void 0 : parentState.expansionRecord) && props.name !== void 0) {
3303
+ return parentState.expansionRecord.includes(props.name);
3304
+ }
3305
+ }
3306
+ return false;
3307
+ });
3308
+ function onBeforeEnter(el) {
3309
+ if (el instanceof HTMLElement) {
3310
+ const { style } = el;
3311
+ style.maxHeight = "0px";
3312
+ }
3313
+ }
3314
+ function onEnter(el) {
3315
+ if (el instanceof HTMLElement) {
3316
+ const { style } = el;
3317
+ style.maxHeight = `${el.scrollHeight || style.maxHeight}px`;
3318
+ }
3319
+ }
3320
+ function onAfterEnter(el) {
3321
+ if (el instanceof HTMLElement) {
3322
+ const { style } = el;
3323
+ style.maxHeight = "";
3324
+ }
3325
+ }
3326
+ function onBeforeLeave(el) {
3327
+ if (el instanceof HTMLElement) {
3328
+ const { style } = el;
3329
+ if (el.scrollHeight !== 0) {
3330
+ style.maxHeight = `${el.scrollHeight}px`;
3331
+ }
3332
+ }
3333
+ }
3334
+ function onLeave(el) {
3335
+ if (el instanceof HTMLElement) {
3336
+ const { style } = el;
3337
+ style.maxHeight = "0px";
3338
+ }
3339
+ }
3340
+ function onAfterLeave(el) {
3341
+ if (el instanceof HTMLElement) {
3342
+ const { style } = el;
3343
+ style.maxHeight = "";
3344
+ }
3345
+ }
3346
+ return {
3347
+ onItemClick,
3348
+ isExpanded,
3349
+ onBeforeEnter,
3350
+ onEnter,
3351
+ onAfterEnter,
3352
+ onBeforeLeave,
3353
+ onLeave,
3354
+ onAfterLeave
3355
+ };
3356
+ }
3357
+ });
3358
+ const _hoisted_1$i = { class: "dao-expansion-item-icon-container" };
3359
+ const _hoisted_2$f = { class: "dao-expansion-item-title-container" };
3360
+ const _hoisted_3$9 = { class: "dao-expansion-item-title dao-exp-ellipsis" };
3361
+ const _hoisted_4$8 = { class: "dao-expansion-item-description dao-exp-ellipsis" };
3362
+ const _hoisted_5$5 = { class: "dao-expansion-item-content-container" };
3363
+ const _hoisted_6$3 = { class: "dao-expansion-item-content" };
3364
+ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
3365
+ const _component_dao_icon = resolveComponent("dao-icon");
3366
+ return openBlock(), createElementBlock("div", {
3367
+ class: normalizeClass(["dao-expansion-item", {
3368
+ "dao-expansion-item--expanded": _ctx.isExpanded
3369
+ }])
3370
+ }, [
3371
+ createElementVNode("div", {
3372
+ class: "dao-expansion-item-header",
3373
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
3374
+ }, [
3375
+ createElementVNode("div", _hoisted_1$i, [
3376
+ createVNode(_component_dao_icon, {
3377
+ name: "icon-dropdown-line",
3378
+ class: "dao-expansion-item-icon",
3379
+ "use-font": ""
3380
+ })
3381
+ ]),
3382
+ createElementVNode("div", _hoisted_2$f, [
3383
+ createElementVNode("div", _hoisted_3$9, [
3384
+ renderSlot(_ctx.$slots, "title", {}, () => [
3385
+ createTextVNode(toDisplayString(_ctx.title), 1)
3386
+ ])
3387
+ ]),
3388
+ createElementVNode("div", _hoisted_4$8, [
3389
+ renderSlot(_ctx.$slots, "description", {}, () => [
3390
+ createTextVNode(toDisplayString(_ctx.description), 1)
3391
+ ])
3392
+ ])
3393
+ ]),
3394
+ _ctx.$slots.action ? (openBlock(), createElementBlock("div", {
3395
+ key: 0,
3396
+ class: "dao-expansion-item-action",
3397
+ onClick: _cache[0] || (_cache[0] = withModifiers(() => {
3398
+ }, ["stop"]))
3399
+ }, [
3400
+ renderSlot(_ctx.$slots, "action")
3401
+ ])) : createCommentVNode("", true)
3402
+ ]),
3403
+ createVNode(Transition, {
3404
+ name: "dao-expansion-item",
3405
+ onBeforeEnter: _ctx.onBeforeEnter,
3406
+ onEnter: _ctx.onEnter,
3407
+ onAfterEnter: _ctx.onAfterEnter,
3408
+ onBeforeLeave: _ctx.onBeforeLeave,
3409
+ onLeave: _ctx.onLeave,
3410
+ onAfterLeave: _ctx.onAfterLeave
3411
+ }, {
3412
+ default: withCtx(() => [
3413
+ withDirectives(createElementVNode("div", _hoisted_5$5, [
3414
+ createElementVNode("div", _hoisted_6$3, [
3415
+ renderSlot(_ctx.$slots, "default")
3416
+ ])
3417
+ ], 512), [
3418
+ [vShow, _ctx.isExpanded]
3419
+ ])
3420
+ ]),
3421
+ _: 3
3422
+ }, 8, ["onBeforeEnter", "onEnter", "onAfterEnter", "onBeforeLeave", "onLeave", "onAfterLeave"])
3423
+ ], 2);
3424
+ }
3425
+ var expansionItem = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["render", _sfc_render$n]]);
3198
3426
  var form_vue_vue_type_style_index_0_lang = "";
3199
3427
  const _sfc_main$p = defineComponent({
3200
3428
  name: "DaoForm",
@@ -3814,19 +4042,20 @@ const _hoisted_2$c = {
3814
4042
  };
3815
4043
  const _hoisted_3$7 = ["type", "disabled", "value"];
3816
4044
  const _hoisted_4$6 = {
3817
- key: 4,
4045
+ key: 3,
3818
4046
  class: "dao-input-suffix"
3819
4047
  };
3820
4048
  const _hoisted_5$4 = {
3821
- key: 1,
4049
+ key: 0,
3822
4050
  class: "dao-input-append"
3823
4051
  };
3824
4052
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3825
4053
  return openBlock(), createElementBlock("div", {
3826
4054
  class: normalizeClass(_ctx.wrapClasses)
3827
4055
  }, [
3828
- renderSlot(_ctx.$slots, "prepend"),
3829
- _ctx.prepend && !_ctx.slots.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true),
4056
+ renderSlot(_ctx.$slots, "prepend", {}, () => [
4057
+ _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$f, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4058
+ ]),
3830
4059
  createElementVNode("div", {
3831
4060
  class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
3832
4061
  }, [
@@ -3846,28 +4075,28 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3846
4075
  value: _ctx.currentValue,
3847
4076
  onKeyup: _cache[0] || (_cache[0] = withKeys((...args) => _ctx.resetCurrentVal && _ctx.resetCurrentVal(...args), ["esc"]))
3848
4077
  }), null, 16, _hoisted_3$7),
3849
- _ctx.type === "number" ? (openBlock(), createElementBlock("i", {
3850
- key: 2,
3851
- class: normalizeClass([
3852
- "dao-input-number-icon",
3853
- "icon-arrow-sharp",
3854
- "number-icon-up",
3855
- { "dao-input-number-icon__disabled": _ctx.isIncreaseDisabled }
3856
- ]),
3857
- onMousedown: _cache[1] || (_cache[1] = ($event) => _ctx.changeNumberValue("increase"))
3858
- }, null, 34)) : createCommentVNode("", true),
3859
- _ctx.type === "number" ? (openBlock(), createElementBlock("i", {
3860
- key: 3,
3861
- class: normalizeClass([
3862
- "dao-input-number-icon",
3863
- "icon-arrow-sharp",
3864
- "number-icon-down",
3865
- { "dao-input-number-icon__disabled": _ctx.isDecreaseDisabled }
3866
- ]),
3867
- onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
3868
- }, null, 34)) : createCommentVNode("", true),
4078
+ _ctx.type === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
4079
+ createElementVNode("i", {
4080
+ class: normalizeClass([
4081
+ "dao-input-number-icon",
4082
+ "icon-arrow-sharp",
4083
+ "number-icon-up",
4084
+ { "dao-input-number-icon__disabled": _ctx.isIncreaseDisabled }
4085
+ ]),
4086
+ onMousedown: _cache[1] || (_cache[1] = ($event) => _ctx.changeNumberValue("increase"))
4087
+ }, null, 34),
4088
+ createElementVNode("i", {
4089
+ class: normalizeClass([
4090
+ "dao-input-number-icon",
4091
+ "icon-arrow-sharp",
4092
+ "number-icon-down",
4093
+ { "dao-input-number-icon__disabled": _ctx.isDecreaseDisabled }
4094
+ ]),
4095
+ onMousedown: _cache[2] || (_cache[2] = ($event) => _ctx.changeNumberValue("decrease"))
4096
+ }, null, 34)
4097
+ ], 64)) : createCommentVNode("", true),
3869
4098
  withDirectives(createElementVNode("i", {
3870
- class: normalizeClass(["dao-input-close-icon", "icon-close", { "dao-input__active": _ctx.isFocus }]),
4099
+ class: normalizeClass(["dao-input-close-icon", "icon-sys-error", { "dao-input__active": _ctx.isFocus }]),
3871
4100
  onClick: _cache[3] || (_cache[3] = ($event) => _ctx.resetCurrentVal())
3872
4101
  }, null, 2), [
3873
4102
  [vShow, _ctx.clearable]
@@ -3881,8 +4110,9 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
3881
4110
  renderSlot(_ctx.$slots, "suffix")
3882
4111
  ])) : createCommentVNode("", true)
3883
4112
  ], 2),
3884
- renderSlot(_ctx.$slots, "append"),
3885
- _ctx.append && !_ctx.slots.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
4113
+ renderSlot(_ctx.$slots, "append", {}, () => [
4114
+ _ctx.append ? (openBlock(), createElementBlock("div", _hoisted_5$4, toDisplayString(_ctx.append), 1)) : createCommentVNode("", true)
4115
+ ])
3886
4116
  ], 2);
3887
4117
  }
3888
4118
  var input = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$g]]);
@@ -4820,7 +5050,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
4820
5050
  ]),
4821
5051
  _hoisted_7$1,
4822
5052
  withDirectives(createElementVNode("i", {
4823
- class: "icon-close dao-selection-search-clear-icon",
5053
+ class: "icon-sys-error dao-selection-search-clear-icon",
4824
5054
  tabindex: "1",
4825
5055
  onKeydown: _cache[3] || (_cache[3] = withKeys((...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args), ["enter"])),
4826
5056
  onClick: _cache[4] || (_cache[4] = (...args) => _ctx.onSearchClear && _ctx.onSearchClear(...args))
@@ -5592,7 +5822,8 @@ const _sfc_main$3 = defineComponent({
5592
5822
  "next",
5593
5823
  "prev",
5594
5824
  "pageChange",
5595
- "sizeChange"
5825
+ "sizeChange",
5826
+ "row-click"
5596
5827
  ],
5597
5828
  setup(props, { emit }) {
5598
5829
  const tableId = computed(() => `DAO_TABLE_${props.id}`);
@@ -5603,8 +5834,8 @@ const _sfc_main$3 = defineComponent({
5603
5834
  const expandedRows = reactive(new WeakSet());
5604
5835
  const columnRefs = reactive({});
5605
5836
  const columns = reactive([]);
5606
- const currentPage = ref(props.currentPage);
5607
- const pageSize = ref(props.pageSize);
5837
+ const currentPage = toRef(props, "currentPage");
5838
+ const pageSize = toRef(props, "pageSize");
5608
5839
  const tableScroll = ref();
5609
5840
  const global = reactive({
5610
5841
  checked: false,
@@ -5643,6 +5874,7 @@ const _sfc_main$3 = defineComponent({
5643
5874
  }, {});
5644
5875
  }
5645
5876
  const init = () => {
5877
+ columns.length = 0;
5646
5878
  props.columns.forEach((column) => {
5647
5879
  columns.push(__spreadValues(__spreadValues({}, defaultColumnConfig), column));
5648
5880
  });
@@ -5669,7 +5901,6 @@ const _sfc_main$3 = defineComponent({
5669
5901
  });
5670
5902
  }
5671
5903
  };
5672
- init();
5673
5904
  const columnStyle = (id) => {
5674
5905
  const setting = tableSetting[id];
5675
5906
  const { width } = setting;
@@ -5761,6 +5992,10 @@ const _sfc_main$3 = defineComponent({
5761
5992
  clearExpansion();
5762
5993
  clearSelection();
5763
5994
  };
5995
+ init();
5996
+ watch(() => props.columns, () => {
5997
+ init();
5998
+ }, { deep: true });
5764
5999
  watch(currentPage, (val) => {
5765
6000
  emit("update:current-page", val);
5766
6001
  });
@@ -5815,6 +6050,9 @@ const _sfc_main$3 = defineComponent({
5815
6050
  onUnmounted(() => {
5816
6051
  window.removeEventListener("resize", windowResize);
5817
6052
  });
6053
+ function onRowClick(row, rowIndex) {
6054
+ emit("row-click", row, rowIndex);
6055
+ }
5818
6056
  return {
5819
6057
  columns,
5820
6058
  filterColumns,
@@ -5837,7 +6075,8 @@ const _sfc_main$3 = defineComponent({
5837
6075
  clearState,
5838
6076
  global,
5839
6077
  tableScroll,
5840
- expandedRows
6078
+ expandedRows,
6079
+ onRowClick
5841
6080
  };
5842
6081
  }
5843
6082
  });
@@ -5859,20 +6098,21 @@ const _hoisted_6 = {
5859
6098
  const _hoisted_7 = ["onClick"];
5860
6099
  const _hoisted_8 = { class: "dao-table-th__content" };
5861
6100
  const _hoisted_9 = { class: "dao-table-tbody" };
5862
- const _hoisted_10 = {
6101
+ const _hoisted_10 = ["onClick"];
6102
+ const _hoisted_11 = {
5863
6103
  key: 0,
5864
6104
  class: "dao-table-td"
5865
6105
  };
5866
- const _hoisted_11 = {
6106
+ const _hoisted_12 = {
5867
6107
  key: 1,
5868
6108
  class: "dao-table-td"
5869
6109
  };
5870
- const _hoisted_12 = ["onClick"];
5871
- const _hoisted_13 = {
6110
+ const _hoisted_13 = ["onClick"];
6111
+ const _hoisted_14 = {
5872
6112
  key: 0,
5873
6113
  class: "dao-table-tr-expand"
5874
6114
  };
5875
- const _hoisted_14 = { class: "dao-table-pagination" };
6115
+ const _hoisted_15 = { class: "dao-table-pagination" };
5876
6116
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5877
6117
  const _component_dao_checkbox = resolveComponent("dao-checkbox");
5878
6118
  const _component_dao_resizer = resolveComponent("dao-resizer");
@@ -5928,19 +6168,20 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5928
6168
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (row, index2) => {
5929
6169
  return openBlock(), createElementBlock(Fragment, { key: index2 }, [
5930
6170
  createElementVNode("tr", {
5931
- class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }])
6171
+ class: normalizeClass(["dao-table-tr", { "dao-table-tr--expandable-open": _ctx.expandable && _ctx.isRowExpanded(row) }]),
6172
+ onClick: ($event) => _ctx.onRowClick(row, index2)
5932
6173
  }, [
5933
- _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_10, [
6174
+ _ctx.selectable ? (openBlock(), createElementBlock("td", _hoisted_11, [
5934
6175
  createVNode(_component_dao_checkbox, {
5935
6176
  checked: _ctx.isRowSelected(row),
5936
6177
  onChange: ($event) => _ctx.toggleSelected(row)
5937
6178
  }, null, 8, ["checked", "onChange"])
5938
6179
  ])) : createCommentVNode("", true),
5939
- _ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_11, [
6180
+ _ctx.expandable ? (openBlock(), createElementBlock("td", _hoisted_12, [
5940
6181
  createElementVNode("i", {
5941
6182
  class: "dao-table-expand-toggle icon-arrow-sharp",
5942
6183
  onClick: ($event) => _ctx.toggleExpand(row, index2)
5943
- }, null, 8, _hoisted_12)
6184
+ }, null, 8, _hoisted_13)
5944
6185
  ])) : createCommentVNode("", true),
5945
6186
  (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.filterColumns, (column) => {
5946
6187
  return openBlock(), createElementBlock("td", {
@@ -5957,8 +6198,8 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5957
6198
  ])
5958
6199
  ], 4);
5959
6200
  }), 128))
5960
- ], 2),
5961
- _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_13, [
6201
+ ], 10, _hoisted_10),
6202
+ _ctx.expandable && _ctx.expandedRows.has(row) ? withDirectives((openBlock(), createElementBlock("tr", _hoisted_14, [
5962
6203
  renderSlot(_ctx.$slots, "expand", {
5963
6204
  row,
5964
6205
  rowIndex: index2
@@ -5971,7 +6212,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
5971
6212
  ])
5972
6213
  ])
5973
6214
  ], 2),
5974
- createElementVNode("div", _hoisted_14, [
6215
+ createElementVNode("div", _hoisted_15, [
5975
6216
  renderSlot(_ctx.$slots, "pagination", {}, () => [
5976
6217
  createVNode(_component_dao_pagination, {
5977
6218
  "current-page": _ctx.currentPage,
@@ -6137,7 +6378,7 @@ const _sfc_main$1 = defineComponent({
6137
6378
  type: {
6138
6379
  type: String,
6139
6380
  default: "card",
6140
- validator: (value) => ["card", "line"].includes(value)
6381
+ validator: (value) => ["card", "line", "pill"].includes(value)
6141
6382
  },
6142
6383
  direction: {
6143
6384
  type: String,
@@ -6267,7 +6508,7 @@ var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
6267
6508
  var components = /* @__PURE__ */ Object.freeze({
6268
6509
  __proto__: null,
6269
6510
  [Symbol.toStringTag]: "Module",
6270
- ActionIcon: actionIcon,
6511
+ ActionIcon: DaoActionIcon,
6271
6512
  Button: DaoButton,
6272
6513
  ButtonGroup: buttonGroup,
6273
6514
  Card: card,
@@ -6281,6 +6522,8 @@ var components = /* @__PURE__ */ Object.freeze({
6281
6522
  Dropdown: dropdown,
6282
6523
  DropdownMenu: dropdownMenu,
6283
6524
  DropdownItem: dropdownItem,
6525
+ Expansion: expansion,
6526
+ ExpansionItem: expansionItem,
6284
6527
  Form: form,
6285
6528
  FormItem: formItem,
6286
6529
  FormGroup: formGroup,
@@ -6322,4 +6565,4 @@ const install = (Vue) => {
6322
6565
  var index = {
6323
6566
  install
6324
6567
  };
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 };
6568
+ 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 };