@tu-design/vue 0.5.0 → 0.5.2

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 (56) hide show
  1. package/dist/index.d.mts +358 -178
  2. package/dist/index.mjs +344 -226
  3. package/dist/registry/vue/alert-dialog.json +1 -1
  4. package/dist/registry/vue/alert.json +3 -3
  5. package/dist/registry/vue/avatar-group.json +1 -1
  6. package/dist/registry/vue/avatar.json +1 -1
  7. package/dist/registry/vue/badge.json +1 -1
  8. package/dist/registry/vue/button.json +1 -1
  9. package/dist/registry/vue/calendar.json +5 -5
  10. package/dist/registry/vue/card.json +1 -1
  11. package/dist/registry/vue/cascader.json +4 -4
  12. package/dist/registry/vue/checkbox.json +1 -1
  13. package/dist/registry/vue/context-menu.json +1 -1
  14. package/dist/registry/vue/currency-input.json +1 -1
  15. package/dist/registry/vue/date-picker.json +1 -1
  16. package/dist/registry/vue/date-range-picker.json +3 -3
  17. package/dist/registry/vue/date-shared.json +3 -15
  18. package/dist/registry/vue/dialog.json +3 -3
  19. package/dist/registry/vue/drawer.json +3 -3
  20. package/dist/registry/vue/dropdown-menu.json +1 -1
  21. package/dist/registry/vue/empty.json +1 -1
  22. package/dist/registry/vue/form-render.json +1 -1
  23. package/dist/registry/vue/form.json +1 -1
  24. package/dist/registry/vue/icon-shared.json +27 -0
  25. package/dist/registry/vue/input.json +1 -1
  26. package/dist/registry/vue/label.json +1 -1
  27. package/dist/registry/vue/month-picker.json +1 -1
  28. package/dist/registry/vue/number-input.json +1 -1
  29. package/dist/registry/vue/overlay-shared.json +1 -1
  30. package/dist/registry/vue/password-input.json +1 -1
  31. package/dist/registry/vue/pin-input.json +1 -1
  32. package/dist/registry/vue/popconfirm.json +1 -1
  33. package/dist/registry/vue/popover.json +2 -2
  34. package/dist/registry/vue/progress.json +1 -1
  35. package/dist/registry/vue/radio-group.json +1 -1
  36. package/dist/registry/vue/registry.json +58 -51
  37. package/dist/registry/vue/select.json +3 -3
  38. package/dist/registry/vue/separator.json +1 -1
  39. package/dist/registry/vue/skeleton.json +1 -1
  40. package/dist/registry/vue/slider.json +1 -1
  41. package/dist/registry/vue/slot.json +1 -1
  42. package/dist/registry/vue/spin.json +2 -2
  43. package/dist/registry/vue/switch.json +1 -1
  44. package/dist/registry/vue/table-render.json +3 -2
  45. package/dist/registry/vue/tabs.json +1 -1
  46. package/dist/registry/vue/textarea.json +1 -1
  47. package/dist/registry/vue/timeline.json +1 -1
  48. package/dist/registry/vue/toast.json +3 -3
  49. package/dist/registry/vue/tokens.json +1 -1
  50. package/dist/registry/vue/tooltip.json +1 -1
  51. package/dist/registry/vue/tree-select.json +4 -4
  52. package/dist/registry/vue/tree-shared.json +3 -15
  53. package/dist/registry/vue/utils.json +1 -1
  54. package/dist/registry/vue/week-picker.json +1 -1
  55. package/dist/registry/vue/year-picker.json +1 -1
  56. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -278,7 +278,7 @@ const _sfc_main$19 = defineComponent({
278
278
  });
279
279
  //#endregion
280
280
  //#region src/components/form/FormDescription.vue
281
- const _hoisted_1$32 = ["id"];
281
+ const _hoisted_1$31 = ["id"];
282
282
  const _sfc_main$20 = /*@__PURE__*/ defineComponent({
283
283
  __name: "FormDescription",
284
284
  props: { class: {} },
@@ -292,7 +292,7 @@ const _sfc_main$20 = /*@__PURE__*/ defineComponent({
292
292
  return openBlock(), createElementBlock("p", {
293
293
  id: unref(itemCtx)?.descriptionId,
294
294
  class: normalizeClass(unref(cn)("text-muted-foreground text-sm", props.class))
295
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$32);
295
+ }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$31);
296
296
  };
297
297
  }
298
298
  });
@@ -343,7 +343,7 @@ const _sfc_main$21 = defineComponent({
343
343
  });
344
344
  //#endregion
345
345
  //#region src/components/form/FormItem.vue
346
- const _hoisted_1$31 = ["data-invalid"];
346
+ const _hoisted_1$30 = ["data-invalid"];
347
347
  const _sfc_main$22 = /*@__PURE__*/ defineComponent({
348
348
  __name: "FormItem",
349
349
  setup(__props) {
@@ -368,13 +368,13 @@ const _sfc_main$22 = /*@__PURE__*/ defineComponent({
368
368
  return openBlock(), createElementBlock("div", {
369
369
  class: normalizeClass(unref(cn)("group flex flex-col gap-1.5")),
370
370
  "data-invalid": isInvalid.value ? "" : void 0
371
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$31);
371
+ }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$30);
372
372
  };
373
373
  }
374
374
  });
375
375
  //#endregion
376
376
  //#region src/components/form/FormLabel.vue
377
- const _hoisted_1$30 = ["for", "data-invalid"];
377
+ const _hoisted_1$29 = ["for", "data-invalid"];
378
378
  const _sfc_main$23 = /*@__PURE__*/ defineComponent({
379
379
  __name: "FormLabel",
380
380
  props: { class: {} },
@@ -388,13 +388,13 @@ const _sfc_main$23 = /*@__PURE__*/ defineComponent({
388
388
  for: unref(itemCtx)?.controlId,
389
389
  "data-invalid": isInvalid.value ? "" : void 0,
390
390
  class: normalizeClass(unref(cn)("text-sm font-medium leading-none data-invalid:text-destructive", props.class))
391
- }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$30);
391
+ }, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$29);
392
392
  };
393
393
  }
394
394
  });
395
395
  //#endregion
396
396
  //#region src/components/form/FormMessage.vue
397
- const _hoisted_1$29 = ["id"];
397
+ const _hoisted_1$28 = ["id"];
398
398
  const _sfc_main$24 = /*@__PURE__*/ defineComponent({
399
399
  __name: "FormMessage",
400
400
  props: {
@@ -419,7 +419,7 @@ const _sfc_main$24 = /*@__PURE__*/ defineComponent({
419
419
  key: 0,
420
420
  id: unref(itemCtx)?.messageId,
421
421
  class: normalizeClass(unref(cn)("text-destructive text-sm", props.class))
422
- }, toDisplayString(errorText.value), 11, _hoisted_1$29)) : createCommentVNode("v-if", true);
422
+ }, toDisplayString(errorText.value), 11, _hoisted_1$28)) : createCommentVNode("v-if", true);
423
423
  };
424
424
  }
425
425
  });
@@ -449,7 +449,7 @@ const _sfc_main$26 = /*@__PURE__*/ defineComponent({
449
449
  * aria 接线(id/aria-invalid/aria-describedby)由 FormControl 的 cloneVNode 机制继承。
450
450
  * widget 调用发生在 FormField 插槽期,拿到 field 实例后组装 WidgetContext。
451
451
  */
452
- const _sfc_main$65 = defineComponent({
452
+ const _sfc_main$64 = defineComponent({
453
453
  name: "TuFormRenderField",
454
454
  props: {
455
455
  item: {
@@ -491,7 +491,7 @@ const _sfc_main$65 = defineComponent({
491
491
  });
492
492
  //#endregion
493
493
  //#region src/components/checkbox/Checkbox.vue
494
- const _hoisted_1$28 = {
494
+ const _hoisted_1$27 = {
495
495
  key: 0,
496
496
  viewBox: "0 0 24 24",
497
497
  fill: "none",
@@ -564,7 +564,7 @@ const _sfc_main$9 = /*@__PURE__*/ defineComponent({
564
564
  createVNode(unref(Checkbox).HiddenInput),
565
565
  createVNode(unref(Checkbox).Control, { class: "border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 peer size-4 shrink-0 rounded-[4px] border bg-transparent shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50" }, {
566
566
  default: withCtx(() => [createVNode(unref(Checkbox).Indicator, { class: "flex items-center justify-center text-current" }, {
567
- default: withCtx(() => [createCommentVNode(" 半选态(data-state=indeterminate)显示短横线,选中态显示对勾 "), isChecked.value === "indeterminate" ? (openBlock(), createElementBlock("svg", _hoisted_1$28, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M5 12h14" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_2$18, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M20 6 9 17l-5-5" }, null, -1)])]))]),
567
+ default: withCtx(() => [createCommentVNode(" 半选态(data-state=indeterminate)显示短横线,选中态显示对勾 "), isChecked.value === "indeterminate" ? (openBlock(), createElementBlock("svg", _hoisted_1$27, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M5 12h14" }, null, -1)])])) : (openBlock(), createElementBlock("svg", _hoisted_2$18, [..._cache[1] || (_cache[1] = [createElementVNode("path", { d: "M20 6 9 17l-5-5" }, null, -1)])]))]),
568
568
  _: 1
569
569
  })]),
570
570
  _: 1
@@ -749,7 +749,7 @@ function formatCurrency(value, valueUnit, labelUnit) {
749
749
  }
750
750
  //#endregion
751
751
  //#region src/components/currency-input/CurrencyInput.vue
752
- const _hoisted_1$27 = ["data-invalid"];
752
+ const _hoisted_1$26 = ["data-invalid"];
753
753
  const _hoisted_2$17 = [
754
754
  "value",
755
755
  "placeholder",
@@ -828,7 +828,7 @@ const _sfc_main$11 = /*@__PURE__*/ defineComponent({
828
828
  }), null, 16, _hoisted_2$17), createElementVNode("div", {
829
829
  "aria-hidden": "true",
830
830
  class: normalizeClass(unref(cn)("border-input text-muted-foreground flex h-full shrink-0 items-center border-l bg-muted/40 px-3 text-sm", props.disabled && "opacity-50"))
831
- }, toDisplayString(props.labelUnit), 3)], 10, _hoisted_1$27);
831
+ }, toDisplayString(props.labelUnit), 3)], 10, _hoisted_1$26);
832
832
  };
833
833
  }
834
834
  });
@@ -933,6 +933,29 @@ function parseIsoRange(raw) {
933
933
  const controlCls = "border-input flex h-9 w-full items-center overflow-hidden rounded-md border bg-transparent shadow-xs transition-[color,box-shadow] outline-none focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px] data-invalid:border-destructive data-invalid:ring-destructive/20 data-invalid:ring-[3px]";
934
934
  const iconBtnCls = "text-muted-foreground/70 hover:text-foreground flex h-full w-8 shrink-0 items-center justify-center outline-none disabled:cursor-not-allowed disabled:opacity-30";
935
935
  //#endregion
936
+ //#region \0/plugin-vue/export-helper
937
+ var export_helper_default = (sfc, props) => {
938
+ const target = sfc.__vccOpts || sfc;
939
+ for (const [key, val] of props) target[key] = val;
940
+ return target;
941
+ };
942
+ //#endregion
943
+ //#region src/components/icon-shared/ChevronIcon.vue
944
+ const _sfc_main$63 = {};
945
+ const _hoisted_1$25 = {
946
+ viewBox: "0 0 24 24",
947
+ fill: "none",
948
+ stroke: "currentColor",
949
+ "stroke-width": "2",
950
+ "stroke-linecap": "round",
951
+ "stroke-linejoin": "round",
952
+ "aria-hidden": "true"
953
+ };
954
+ function _sfc_render$2(_ctx, _cache) {
955
+ return openBlock(), createElementBlock("svg", _hoisted_1$25, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "m9 18 6-6-6-6" }, null, -1)])]);
956
+ }
957
+ var ChevronIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$63, [["render", _sfc_render$2]]);
958
+ //#endregion
936
959
  //#region src/components/calendar/CalendarNav.vue
937
960
  /**
938
961
  * 视图导航条(内部件)。必须渲染在 <ArkDatePicker.View> 子树内:
@@ -945,7 +968,7 @@ const navBtnCls = "text-muted-foreground inline-flex size-8 items-center justify
945
968
  const viewTriggerCls = "hover:bg-accent inline-flex items-center gap-1 rounded-[3px] px-3 py-1.5 text-sm font-semibold text-foreground outline-none transition-colors disabled:pointer-events-none";
946
969
  const viewTitleCls = "text-sm font-semibold text-foreground";
947
970
  /** 年代范围文本(zag 无现成 part,由 focusedValue.year 推算):2026 → "2020 - 2029" */
948
- const _sfc_main$64 = /*@__PURE__*/ defineComponent({
971
+ const _sfc_main$62 = /*@__PURE__*/ defineComponent({
949
972
  __name: "CalendarNav",
950
973
  props: {
951
974
  /** 导航条服务的视图,决定中间内容形态:day=ViewTrigger(上钻)/ month=年份 / year=年代 */
@@ -963,23 +986,15 @@ view: {
963
986
  return openBlock(), createBlock(unref(DatePicker).ViewControl, { class: normalizeClass(unref(cn)(viewControlCls, _ctx.$attrs.class)) }, {
964
987
  default: withCtx(() => [
965
988
  createVNode(unref(DatePicker).PrevTrigger, { class: normalizeClass(navBtnCls) }, {
966
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
967
- viewBox: "0 0 24 24",
968
- fill: "none",
969
- stroke: "currentColor",
970
- "stroke-width": "2",
971
- "stroke-linecap": "round",
972
- "stroke-linejoin": "round",
973
- class: "size-4"
974
- }, [createElementVNode("path", { d: "m15 18-6-6 6-6" })], -1)])]),
975
- _: 1
989
+ default: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon", {}, () => [createVNode(ChevronIcon_default, { class: "size-4 rotate-180" })])]),
990
+ _: 3
976
991
  }),
977
992
  createVNode(unref(DatePicker).Context, null, {
978
993
  default: withCtx((context) => [createCommentVNode(" day:ViewTrigger 上钻钮(内容原样自 CalendarBody 迁入,视觉零回归) "), props.view === "day" ? (openBlock(), createBlock(unref(DatePicker).ViewTrigger, {
979
994
  key: 0,
980
995
  class: normalizeClass(viewTriggerCls)
981
996
  }, {
982
- default: withCtx(() => [createVNode(unref(DatePicker).RangeText), _cache[1] || (_cache[1] = createElementVNode("svg", {
997
+ default: withCtx(() => [createVNode(unref(DatePicker).RangeText), _cache[0] || (_cache[0] = createElementVNode("svg", {
983
998
  viewBox: "0 0 24 24",
984
999
  fill: "none",
985
1000
  stroke: "currentColor",
@@ -996,26 +1011,18 @@ view: {
996
1011
  _: 1
997
1012
  }),
998
1013
  createVNode(unref(DatePicker).NextTrigger, { class: normalizeClass(navBtnCls) }, {
999
- default: withCtx(() => [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
1000
- viewBox: "0 0 24 24",
1001
- fill: "none",
1002
- stroke: "currentColor",
1003
- "stroke-width": "2",
1004
- "stroke-linecap": "round",
1005
- "stroke-linejoin": "round",
1006
- class: "size-4"
1007
- }, [createElementVNode("path", { d: "m9 18 6-6-6-6" })], -1)])]),
1008
- _: 1
1014
+ default: withCtx(() => [renderSlot(_ctx.$slots, "next-icon", {}, () => [createVNode(ChevronIcon_default, { class: "size-4" })])]),
1015
+ _: 3
1009
1016
  })
1010
1017
  ]),
1011
- _: 1
1018
+ _: 3
1012
1019
  }, 8, ["class"]);
1013
1020
  };
1014
1021
  }
1015
1022
  });
1016
1023
  //#endregion
1017
1024
  //#region src/components/calendar/CalendarBody.vue
1018
- const _hoisted_1$26 = { class: "flex gap-6" };
1025
+ const _hoisted_1$24 = { class: "flex gap-6" };
1019
1026
  const dayTriggerCls = "group relative flex h-8 w-full cursor-pointer items-center justify-center outline-none data-[outside-view]:pointer-events-none data-[disabled]:pointer-events-none data-[in-range]:not-data-[outside-view]:not-data-[range-start]:not-data-[range-end]:bg-primary/10 data-[range-start]:rounded-l-[3px] data-[range-end]:rounded-r-[3px] data-[week-selected]:bg-primary data-[week-selected]:data-[outside-view]:bg-primary/40 data-[week-selected]:hover:data-[outside-view]:bg-primary/40 group-hover/week-row:not-data-[week-selected]:not-data-[outside-view]:bg-primary/10 group-hover/week-row:data-[outside-view]:not-data-[week-selected]:bg-primary/5";
1020
1027
  const dayDotCls = "flex size-6 items-center justify-center rounded-[3px] text-sm transition-colors group-hover:not-group-data-[week-selected]:bg-accent group-data-[focus]:not-group-data-[outside-view]:not-group-data-[week-selected]:bg-accent group-data-[selected]:not-group-data-[week-selected]:not-group-data-[outside-view]:bg-primary group-data-[selected]:not-group-data-[week-selected]:not-group-data-[outside-view]:font-medium group-data-[selected]:not-group-data-[week-selected]:not-group-data-[outside-view]:text-primary-foreground group-data-[week-selected]:bg-transparent group-data-[week-selected]:font-medium group-data-[week-selected]:text-primary-foreground group-data-[week-selected]:hover:bg-white/20 group-data-[today]:not-group-data-[selected]:text-primary group-data-[today]:not-group-data-[selected]:font-semibold group-data-[unavailable]:line-through group-data-[unavailable]:opacity-30 group-data-[disabled]:opacity-40 group-data-[outside-view]:opacity-30";
1021
1028
  const cellCls = "flex h-9 w-full items-center justify-center rounded-[3px] text-sm outline-none hover:bg-accent data-[selected]:bg-primary data-[selected]:font-medium data-[selected]:text-primary-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-40";
@@ -1024,7 +1031,7 @@ const headCellCls = "text-muted-foreground h-8 border-x-0! border-t-0! border-b
1024
1031
  const bodyCellCls = "border-0! p-0! text-center";
1025
1032
  const rowCls = "bg-transparent!";
1026
1033
  /** 表 i 的锚点月起点(zag getOffset({months: i-1}).visibleRange.start) */
1027
- const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1034
+ const _sfc_main$61 = /*@__PURE__*/ defineComponent({
1028
1035
  __name: "CalendarBody",
1029
1036
  props: {
1030
1037
  mode: { default: "day" },
@@ -1065,9 +1072,17 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1065
1072
  createVNode(unref(DatePicker).View, { view: "day" }, {
1066
1073
  default: withCtx(() => [
1067
1074
  createCommentVNode(" day 视图导航条在 View 内:viewProps=day → GOTO.NEXT=focusNextPage(翻月) "),
1068
- createVNode(_sfc_main$64, { view: "day" }),
1075
+ createVNode(_sfc_main$62, { view: "day" }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1076
+ name: "prev-icon",
1077
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1078
+ key: "0"
1079
+ } : void 0, _ctx.$slots["next-icon"] ? {
1080
+ name: "next-icon",
1081
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1082
+ key: "1"
1083
+ } : void 0]), 1024),
1069
1084
  createVNode(unref(DatePicker).Context, null, {
1070
- default: withCtx((context) => [createElementVNode("div", _hoisted_1$26, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.numOfMonths, (i) => {
1085
+ default: withCtx((context) => [createElementVNode("div", _hoisted_1$24, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.numOfMonths, (i) => {
1071
1086
  return openBlock(), createBlock(unref(DatePicker).Table, {
1072
1087
  key: i,
1073
1088
  class: normalizeClass(tableCls)
@@ -1119,12 +1134,20 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1119
1134
  _: 1
1120
1135
  })
1121
1136
  ]),
1122
- _: 1
1137
+ _: 3
1123
1138
  }),
1124
1139
  createVNode(unref(DatePicker).View, { view: "month" }, {
1125
1140
  default: withCtx(() => [
1126
1141
  createCommentVNode(" 切换视图导航条也在 View 内:DatePicker 切月视图后 GOTO.NEXT=focusNextYear(修复 backlog) "),
1127
- createVNode(_sfc_main$64, { view: "month" }),
1142
+ createVNode(_sfc_main$62, { view: "month" }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1143
+ name: "prev-icon",
1144
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1145
+ key: "0"
1146
+ } : void 0, _ctx.$slots["next-icon"] ? {
1147
+ name: "next-icon",
1148
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1149
+ key: "1"
1150
+ } : void 0]), 1024),
1128
1151
  createVNode(unref(DatePicker).Context, null, {
1129
1152
  default: withCtx((context) => [createVNode(unref(DatePicker).Table, { class: normalizeClass(tableCls) }, {
1130
1153
  default: withCtx(() => [createVNode(unref(DatePicker).TableBody, null, {
@@ -1159,10 +1182,18 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1159
1182
  _: 1
1160
1183
  })
1161
1184
  ]),
1162
- _: 1
1185
+ _: 3
1163
1186
  }),
1164
1187
  createVNode(unref(DatePicker).View, { view: "year" }, {
1165
- default: withCtx(() => [createVNode(_sfc_main$64, { view: "year" }), createVNode(unref(DatePicker).Context, null, {
1188
+ default: withCtx(() => [createVNode(_sfc_main$62, { view: "year" }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1189
+ name: "prev-icon",
1190
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1191
+ key: "0"
1192
+ } : void 0, _ctx.$slots["next-icon"] ? {
1193
+ name: "next-icon",
1194
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1195
+ key: "1"
1196
+ } : void 0]), 1024), createVNode(unref(DatePicker).Context, null, {
1166
1197
  default: withCtx((context) => [createVNode(unref(DatePicker).Table, { class: normalizeClass(tableCls) }, {
1167
1198
  default: withCtx(() => [createVNode(unref(DatePicker).TableBody, null, {
1168
1199
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(context.getYearsGrid({ columns: 4 }), (yearsRow, id) => {
@@ -1192,7 +1223,7 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1192
1223
  }, 1024)]),
1193
1224
  _: 1
1194
1225
  })]),
1195
- _: 1
1226
+ _: 3
1196
1227
  })
1197
1228
  ], 64)) : __props.mode === "month" ? (openBlock(), createBlock(unref(DatePicker).View, {
1198
1229
  key: 1,
@@ -1200,7 +1231,15 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1200
1231
  }, {
1201
1232
  default: withCtx(() => [
1202
1233
  createCommentVNode(" 导航条必须在 View 子树内:Prev/NextTrigger 才能拿到 view=\"month\"(GOTO.NEXT=focusNextYear) "),
1203
- createVNode(_sfc_main$64, { view: "month" }),
1234
+ createVNode(_sfc_main$62, { view: "month" }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1235
+ name: "prev-icon",
1236
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1237
+ key: "0"
1238
+ } : void 0, _ctx.$slots["next-icon"] ? {
1239
+ name: "next-icon",
1240
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1241
+ key: "1"
1242
+ } : void 0]), 1024),
1204
1243
  createVNode(unref(DatePicker).Context, null, {
1205
1244
  default: withCtx((context) => [createVNode(unref(DatePicker).Table, { class: normalizeClass(tableCls) }, {
1206
1245
  default: withCtx(() => [createVNode(unref(DatePicker).TableBody, null, {
@@ -1235,14 +1274,22 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1235
1274
  _: 1
1236
1275
  })
1237
1276
  ]),
1238
- _: 1
1277
+ _: 3
1239
1278
  })) : (openBlock(), createBlock(unref(DatePicker).View, {
1240
1279
  key: 2,
1241
1280
  view: "year"
1242
1281
  }, {
1243
1282
  default: withCtx(() => [
1244
1283
  createCommentVNode(" 导航条必须在 View 子树内:Prev/NextTrigger 才能拿到 view=\"year\"(GOTO.NEXT=focusNextDecade) "),
1245
- createVNode(_sfc_main$64, { view: "year" }),
1284
+ createVNode(_sfc_main$62, { view: "year" }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1285
+ name: "prev-icon",
1286
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1287
+ key: "0"
1288
+ } : void 0, _ctx.$slots["next-icon"] ? {
1289
+ name: "next-icon",
1290
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1291
+ key: "1"
1292
+ } : void 0]), 1024),
1246
1293
  createVNode(unref(DatePicker).Context, null, {
1247
1294
  default: withCtx((context) => [createVNode(unref(DatePicker).Table, { class: normalizeClass(tableCls) }, {
1248
1295
  default: withCtx(() => [createVNode(unref(DatePicker).TableBody, null, {
@@ -1274,7 +1321,7 @@ const _sfc_main$63 = /*@__PURE__*/ defineComponent({
1274
1321
  _: 1
1275
1322
  })
1276
1323
  ]),
1277
- _: 1
1324
+ _: 3
1278
1325
  }))], 2);
1279
1326
  };
1280
1327
  }
@@ -1365,20 +1412,28 @@ const _sfc_main$6 = /*@__PURE__*/ defineComponent({
1365
1412
  "onUpdate:modelValue": handleValueUpdate
1366
1413
  }, {
1367
1414
  default: withCtx(() => [createVNode(unref(DatePicker).Content, null, {
1368
- default: withCtx(() => [createVNode(_sfc_main$63, {
1415
+ default: withCtx(() => [createVNode(_sfc_main$61, {
1369
1416
  mode: props.mode,
1370
1417
  "num-of-months": props.numOfMonths,
1371
1418
  week: props.week,
1372
1419
  locale: props.locale
1373
- }, null, 8, [
1420
+ }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1421
+ name: "prev-icon",
1422
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1423
+ key: "0"
1424
+ } : void 0, _ctx.$slots["next-icon"] ? {
1425
+ name: "next-icon",
1426
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1427
+ key: "1"
1428
+ } : void 0]), 1032, [
1374
1429
  "mode",
1375
1430
  "num-of-months",
1376
1431
  "week",
1377
1432
  "locale"
1378
1433
  ])]),
1379
- _: 1
1434
+ _: 3
1380
1435
  })]),
1381
- _: 1
1436
+ _: 3
1382
1437
  }, 8, [
1383
1438
  "model-value",
1384
1439
  "num-of-months",
@@ -1388,12 +1443,20 @@ const _sfc_main$6 = /*@__PURE__*/ defineComponent({
1388
1443
  "max",
1389
1444
  "is-date-unavailable",
1390
1445
  "locale"
1391
- ])], 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" embedded 内嵌形态:宿主 Picker 的 Root 供能,纯卡片内核 "), createVNode(_sfc_main$63, {
1446
+ ])], 2)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" embedded 内嵌形态:宿主 Picker 的 Root 供能,纯卡片内核 "), createVNode(_sfc_main$61, {
1392
1447
  mode: props.mode,
1393
1448
  "num-of-months": props.numOfMonths,
1394
1449
  week: props.week,
1395
1450
  locale: props.locale
1396
- }, null, 8, [
1451
+ }, createSlots({ _: 2 }, [_ctx.$slots["prev-icon"] ? {
1452
+ name: "prev-icon",
1453
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "prev-icon")]),
1454
+ key: "0"
1455
+ } : void 0, _ctx.$slots["next-icon"] ? {
1456
+ name: "next-icon",
1457
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "next-icon")]),
1458
+ key: "1"
1459
+ } : void 0]), 1032, [
1397
1460
  "mode",
1398
1461
  "num-of-months",
1399
1462
  "week",
@@ -1403,26 +1466,19 @@ const _sfc_main$6 = /*@__PURE__*/ defineComponent({
1403
1466
  }
1404
1467
  });
1405
1468
  //#endregion
1406
- //#region \0/plugin-vue/export-helper
1407
- var export_helper_default = (sfc, props) => {
1408
- const target = sfc.__vccOpts || sfc;
1409
- for (const [key, val] of props) target[key] = val;
1410
- return target;
1411
- };
1412
- //#endregion
1413
- //#region src/components/date-shared/CalendarIcon.vue
1414
- const _sfc_main$62 = {};
1415
- const _hoisted_1$25 = {
1469
+ //#region src/components/icon-shared/CalendarIcon.vue
1470
+ const _sfc_main$60 = {};
1471
+ const _hoisted_1$23 = {
1416
1472
  viewBox: "0 0 24 24",
1417
1473
  fill: "none",
1418
1474
  stroke: "currentColor",
1419
1475
  "stroke-width": "2",
1420
1476
  "stroke-linecap": "round",
1421
1477
  "stroke-linejoin": "round",
1422
- class: "size-4"
1478
+ "aria-hidden": "true"
1423
1479
  };
1424
- function _sfc_render$3(_ctx, _cache) {
1425
- return openBlock(), createElementBlock("svg", _hoisted_1$25, [..._cache[0] || (_cache[0] = [
1480
+ function _sfc_render$1(_ctx, _cache) {
1481
+ return openBlock(), createElementBlock("svg", _hoisted_1$23, [..._cache[0] || (_cache[0] = [
1426
1482
  createElementVNode("rect", {
1427
1483
  width: "18",
1428
1484
  height: "18",
@@ -1435,27 +1491,27 @@ function _sfc_render$3(_ctx, _cache) {
1435
1491
  createElementVNode("path", { d: "M3 10h18" }, null, -1)
1436
1492
  ])]);
1437
1493
  }
1438
- var CalendarIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$62, [["render", _sfc_render$3]]);
1494
+ var CalendarIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$60, [["render", _sfc_render$1]]);
1439
1495
  //#endregion
1440
- //#region src/components/date-shared/ClearIcon.vue
1441
- const _sfc_main$61 = {};
1442
- const _hoisted_1$24 = {
1496
+ //#region src/components/icon-shared/CloseIcon.vue
1497
+ const _sfc_main$59 = {};
1498
+ const _hoisted_1$22 = {
1443
1499
  viewBox: "0 0 24 24",
1444
1500
  fill: "none",
1445
1501
  stroke: "currentColor",
1446
1502
  "stroke-width": "2",
1447
1503
  "stroke-linecap": "round",
1448
1504
  "stroke-linejoin": "round",
1449
- class: "size-4"
1505
+ "aria-hidden": "true"
1450
1506
  };
1451
- function _sfc_render$2(_ctx, _cache) {
1452
- return openBlock(), createElementBlock("svg", _hoisted_1$24, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6 6 18" }, null, -1), createElementVNode("path", { d: "m6 6 12 12" }, null, -1)])]);
1507
+ function _sfc_render(_ctx, _cache) {
1508
+ return openBlock(), createElementBlock("svg", _hoisted_1$22, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6 6 18" }, null, -1), createElementVNode("path", { d: "m6 6 12 12" }, null, -1)])]);
1453
1509
  }
1454
- var ClearIcon_default$1 = /*#__PURE__*/ export_helper_default(_sfc_main$61, [["render", _sfc_render$2]]);
1510
+ var CloseIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$59, [["render", _sfc_render]]);
1455
1511
  //#endregion
1456
1512
  //#region src/components/date-shared/PickerShell.vue
1457
1513
  /** 单值日期族(Date/Month/Year/Week)共用外壳:触发器 + 清空/日历按钮 + 弹层容器。 */
1458
- const _sfc_main$60 = /*@__PURE__*/ defineComponent({
1514
+ const _sfc_main$58 = /*@__PURE__*/ defineComponent({
1459
1515
  inheritAttrs: false,
1460
1516
  __name: "PickerShell",
1461
1517
  props: {
@@ -1571,11 +1627,11 @@ const _sfc_main$60 = /*@__PURE__*/ defineComponent({
1571
1627
  "onKeydown"
1572
1628
  ]),
1573
1629
  createVNode(unref(DatePicker).ClearTrigger, { class: normalizeClass(unref(iconBtnCls)) }, {
1574
- default: withCtx(() => [createVNode(ClearIcon_default$1)]),
1630
+ default: withCtx(() => [createVNode(CloseIcon_default, { class: "size-4" })]),
1575
1631
  _: 1
1576
1632
  }, 8, ["class"]),
1577
1633
  createVNode(unref(DatePicker).Trigger, { class: normalizeClass(unref(iconBtnCls)) }, {
1578
- default: withCtx(() => [createVNode(CalendarIcon_default)]),
1634
+ default: withCtx(() => [createVNode(CalendarIcon_default, { class: "size-4" })]),
1579
1635
  _: 1
1580
1636
  }, 8, ["class"])
1581
1637
  ]),
@@ -1753,7 +1809,7 @@ const _sfc_main$12 = /*@__PURE__*/ defineComponent({
1753
1809
  const minDate = computed(() => parseIsoDate(props.min ?? ""));
1754
1810
  const maxDate = computed(() => parseIsoDate(props.max ?? ""));
1755
1811
  return (_ctx, _cache) => {
1756
- return openBlock(), createBlock(_sfc_main$60, mergeProps(_ctx.$attrs, {
1812
+ return openBlock(), createBlock(_sfc_main$58, mergeProps(_ctx.$attrs, {
1757
1813
  "model-value": unref(rootValue),
1758
1814
  open: unref(isOpen),
1759
1815
  locale: props.locale,
@@ -1963,11 +2019,11 @@ const _sfc_main$13 = /*@__PURE__*/ defineComponent({
1963
2019
  "onKeydown"
1964
2020
  ]),
1965
2021
  createVNode(unref(DatePicker).ClearTrigger, { class: normalizeClass(unref(iconBtnCls)) }, {
1966
- default: withCtx(() => [createVNode(ClearIcon_default$1)]),
2022
+ default: withCtx(() => [createVNode(CloseIcon_default, { class: "size-4" })]),
1967
2023
  _: 1
1968
2024
  }, 8, ["class"]),
1969
2025
  createVNode(unref(DatePicker).Trigger, { class: normalizeClass(unref(iconBtnCls)) }, {
1970
- default: withCtx(() => [createVNode(CalendarIcon_default)]),
2026
+ default: withCtx(() => [createVNode(CalendarIcon_default, { class: "size-4" })]),
1971
2027
  _: 1
1972
2028
  }, 8, ["class"])
1973
2029
  ]),
@@ -2090,7 +2146,7 @@ const _sfc_main$29 = /*@__PURE__*/ defineComponent({
2090
2146
  return anchor ? anchor.set({ day: 31 }) : void 0;
2091
2147
  });
2092
2148
  return (_ctx, _cache) => {
2093
- return openBlock(), createBlock(_sfc_main$60, mergeProps(_ctx.$attrs, {
2149
+ return openBlock(), createBlock(_sfc_main$58, mergeProps(_ctx.$attrs, {
2094
2150
  "model-value": unref(rootValue),
2095
2151
  open: unref(isOpen),
2096
2152
  locale: props.locale,
@@ -2248,7 +2304,7 @@ const _sfc_main$30 = /*@__PURE__*/ defineComponent({
2248
2304
  });
2249
2305
  //#endregion
2250
2306
  //#region src/components/password-input/PasswordInput.vue
2251
- const _hoisted_1$23 = ["data-invalid"];
2307
+ const _hoisted_1$21 = ["data-invalid"];
2252
2308
  const _hoisted_2$16 = [
2253
2309
  "type",
2254
2310
  "value",
@@ -2371,13 +2427,13 @@ const _sfc_main$31 = /*@__PURE__*/ defineComponent({
2371
2427
  cx: "12",
2372
2428
  cy: "12",
2373
2429
  r: "3"
2374
- }, null, -1)])]))])], 8, _hoisted_3$12)], 10, _hoisted_1$23);
2430
+ }, null, -1)])]))])], 8, _hoisted_3$12)], 10, _hoisted_1$21);
2375
2431
  };
2376
2432
  }
2377
2433
  });
2378
2434
  //#endregion
2379
2435
  //#region src/components/textarea/Textarea.vue
2380
- const _hoisted_1$22 = ["aria-invalid"];
2436
+ const _hoisted_1$20 = ["aria-invalid"];
2381
2437
  const _sfc_main$45 = /*@__PURE__*/ defineComponent({
2382
2438
  __name: "Textarea",
2383
2439
  props: /*@__PURE__*/ mergeModels({
@@ -2396,7 +2452,7 @@ const _sfc_main$45 = /*@__PURE__*/ defineComponent({
2396
2452
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2397
2453
  "aria-invalid": props.invalid ? "true" : void 0,
2398
2454
  class: normalizeClass(unref(cn)("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive md:text-sm", props.class))
2399
- }, null, 10, _hoisted_1$22)), [[vModelText, modelValue.value]]);
2455
+ }, null, 10, _hoisted_1$20)), [[vModelText, modelValue.value]]);
2400
2456
  };
2401
2457
  }
2402
2458
  });
@@ -2504,7 +2560,7 @@ const _sfc_main$50 = /*@__PURE__*/ defineComponent({
2504
2560
  return date ? weekStartOf(date, props.locale) : void 0;
2505
2561
  }
2506
2562
  return (_ctx, _cache) => {
2507
- return openBlock(), createBlock(_sfc_main$60, mergeProps(_ctx.$attrs, {
2563
+ return openBlock(), createBlock(_sfc_main$58, mergeProps(_ctx.$attrs, {
2508
2564
  "model-value": unref(rootValue),
2509
2565
  open: unref(isOpen),
2510
2566
  locale: props.locale,
@@ -2632,7 +2688,7 @@ const _sfc_main$51 = /*@__PURE__*/ defineComponent({
2632
2688
  const minDate = computed(() => parseIsoYear(props.min ?? ""));
2633
2689
  const maxDate = computed(() => parseIsoYear(props.max ?? ""));
2634
2690
  return (_ctx, _cache) => {
2635
- return openBlock(), createBlock(_sfc_main$60, mergeProps(_ctx.$attrs, {
2691
+ return openBlock(), createBlock(_sfc_main$58, mergeProps(_ctx.$attrs, {
2636
2692
  "model-value": unref(rootValue),
2637
2693
  open: unref(isOpen),
2638
2694
  locale: props.locale,
@@ -2745,7 +2801,7 @@ function renderWeekPickerItem(options = {}) {
2745
2801
  }
2746
2802
  //#endregion
2747
2803
  //#region src/components/input/Input.vue
2748
- const _hoisted_1$21 = ["aria-invalid"];
2804
+ const _hoisted_1$19 = ["aria-invalid"];
2749
2805
  const _sfc_main$27 = /*@__PURE__*/ defineComponent({
2750
2806
  __name: "Input",
2751
2807
  props: /*@__PURE__*/ mergeModels({
@@ -2764,7 +2820,7 @@ const _sfc_main$27 = /*@__PURE__*/ defineComponent({
2764
2820
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
2765
2821
  "aria-invalid": props.invalid ? "true" : void 0,
2766
2822
  class: normalizeClass(unref(cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-destructive/20 aria-invalid:border-destructive", props.class))
2767
- }, null, 10, _hoisted_1$21)), [[vModelText, modelValue.value]]);
2823
+ }, null, 10, _hoisted_1$19)), [[vModelText, modelValue.value]]);
2768
2824
  };
2769
2825
  }
2770
2826
  });
@@ -2871,19 +2927,11 @@ const _sfc_main$37 = /*@__PURE__*/ defineComponent({
2871
2927
  default: withCtx(() => [
2872
2928
  createCommentVNode(" 注意:不能向 ValueText 传插槽内容,其内部会对默认插槽做字符串化渲染 "),
2873
2929
  createVNode(unref(Select).ValueText, { placeholder: props.placeholder }, null, 8, ["placeholder"]),
2874
- _cache[0] || (_cache[0] = createElementVNode("svg", {
2875
- viewBox: "0 0 24 24",
2876
- fill: "none",
2877
- stroke: "currentColor",
2878
- "stroke-width": "2",
2879
- "stroke-linecap": "round",
2880
- "stroke-linejoin": "round",
2881
- class: "size-4 opacity-50"
2882
- }, [createElementVNode("path", { d: "m6 9 6 6 6-6" })], -1))
2930
+ renderSlot(_ctx.$slots, "trigger-icon", {}, () => [createVNode(ChevronIcon_default, { class: "size-4 rotate-90 opacity-50" })])
2883
2931
  ]),
2884
- _: 1
2932
+ _: 3
2885
2933
  }, 8, ["class"])]),
2886
- _: 1
2934
+ _: 3
2887
2935
  }),
2888
2936
  createVNode(unref(Select).Positioner, { class: "z-[var(--z-overlay)]" }, {
2889
2937
  default: withCtx(() => [createVNode(unref(Select).Content, { class: normalizeClass(unref(cn)("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 relative z-[var(--z-overlay)] max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md", props.contentClass)) }, {
@@ -2901,7 +2949,7 @@ const _sfc_main$37 = /*@__PURE__*/ defineComponent({
2901
2949
  default: withCtx(() => [createTextVNode(toDisplayString(entry.item.label), 1)]),
2902
2950
  _: 2
2903
2951
  }, 1024), createVNode(unref(Select).ItemIndicator, { class: "absolute right-2" }, {
2904
- default: withCtx(() => [..._cache[1] || (_cache[1] = [createElementVNode("svg", {
2952
+ default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
2905
2953
  viewBox: "0 0 24 24",
2906
2954
  fill: "none",
2907
2955
  stroke: "currentColor",
@@ -3117,39 +3165,6 @@ function renderSliderItem(options = {}) {
3117
3165
  });
3118
3166
  }
3119
3167
  //#endregion
3120
- //#region src/components/tree-shared/ChevronIcon.vue
3121
- const _sfc_main$59 = {};
3122
- const _hoisted_1$20 = {
3123
- viewBox: "0 0 24 24",
3124
- fill: "none",
3125
- stroke: "currentColor",
3126
- "stroke-width": "2",
3127
- "stroke-linecap": "round",
3128
- "stroke-linejoin": "round",
3129
- "aria-hidden": "true",
3130
- class: "size-4 shrink-0 transition-transform"
3131
- };
3132
- function _sfc_render$1(_ctx, _cache) {
3133
- return openBlock(), createElementBlock("svg", _hoisted_1$20, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "m9 18 6-6-6-6" }, null, -1)])]);
3134
- }
3135
- var ChevronIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$59, [["render", _sfc_render$1]]);
3136
- //#endregion
3137
- //#region src/components/tree-shared/ClearIcon.vue
3138
- const _sfc_main$58 = {};
3139
- const _hoisted_1$19 = {
3140
- viewBox: "0 0 24 24",
3141
- fill: "none",
3142
- stroke: "currentColor",
3143
- "stroke-width": "2",
3144
- "stroke-linecap": "round",
3145
- "aria-hidden": "true",
3146
- class: "size-4 shrink-0"
3147
- };
3148
- function _sfc_render(_ctx, _cache) {
3149
- return openBlock(), createElementBlock("svg", _hoisted_1$19, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M18 6 6 18" }, null, -1), createElementVNode("path", { d: "m6 6 12 12" }, null, -1)])]);
3150
- }
3151
- var ClearIcon_default = /*#__PURE__*/ export_helper_default(_sfc_main$58, [["render", _sfc_render]]);
3152
- //#endregion
3153
3168
  //#region src/components/tree-shared/ValueTags.vue
3154
3169
  const _hoisted_1$18 = ["data-key"];
3155
3170
  const _hoisted_2$15 = { class: "truncate" };
@@ -3203,15 +3218,7 @@ const _sfc_main$57 = /*@__PURE__*/ defineComponent({
3203
3218
  class: "text-muted-foreground hover:text-foreground",
3204
3219
  "aria-label": `移除 ${v.label}`,
3205
3220
  onClick: withModifiers(($event) => emit("remove", v.key), ["stop"])
3206
- }, [..._cache[1] || (_cache[1] = [createElementVNode("svg", {
3207
- viewBox: "0 0 24 24",
3208
- fill: "none",
3209
- stroke: "currentColor",
3210
- "stroke-width": "2",
3211
- "stroke-linecap": "round",
3212
- class: "size-3",
3213
- "aria-hidden": "true"
3214
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])], 8, _hoisted_3$11)) : createCommentVNode("v-if", true)], 8, _hoisted_1$18);
3221
+ }, [createVNode(CloseIcon_default, { class: "size-3" })], 8, _hoisted_3$11)) : createCommentVNode("v-if", true)], 8, _hoisted_1$18);
3215
3222
  }), 128)),
3216
3223
  overflow.value > 0 ? (openBlock(), createElementBlock("span", _hoisted_4$8, "+" + toDisplayString(overflow.value), 1)) : createCommentVNode("v-if", true),
3217
3224
  __props.clearable && !__props.disabled ? (openBlock(), createElementBlock("button", {
@@ -3221,15 +3228,7 @@ const _sfc_main$57 = /*@__PURE__*/ defineComponent({
3221
3228
  class: "ml-auto shrink-0 text-muted-foreground hover:text-foreground",
3222
3229
  "aria-label": "清空",
3223
3230
  onClick: _cache[0] || (_cache[0] = withModifiers(($event) => emit("clear"), ["stop"]))
3224
- }, [..._cache[2] || (_cache[2] = [createElementVNode("svg", {
3225
- viewBox: "0 0 24 24",
3226
- fill: "none",
3227
- stroke: "currentColor",
3228
- "stroke-width": "2",
3229
- "stroke-linecap": "round",
3230
- class: "size-4",
3231
- "aria-hidden": "true"
3232
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1)])])) : createCommentVNode("v-if", true)
3231
+ }, [createVNode(CloseIcon_default, { class: "size-4" })])) : createCommentVNode("v-if", true)
3233
3232
  ], 2);
3234
3233
  };
3235
3234
  }
@@ -3960,7 +3959,7 @@ const _sfc_main$56 = /*@__PURE__*/ defineComponent({
3960
3959
  createElementVNode("span", _hoisted_6$4, toDisplayString(labelOf(node)), 1),
3961
3960
  node.children?.length ? (openBlock(), createBlock(ChevronIcon_default, {
3962
3961
  key: 1,
3963
- class: normalizeClass(unref(cn)("size-3.5 shrink-0 text-muted-foreground", props.isExpanded(node) && "rotate-90"))
3962
+ class: normalizeClass(unref(cn)("size-3.5 shrink-0 text-muted-foreground transition-transform", props.isExpanded(node) && "rotate-90"))
3964
3963
  }, null, 8, ["class"])) : createCommentVNode("v-if", true)
3965
3964
  ], 40, _hoisted_2$14);
3966
3965
  }), 128)), !column.length ? (openBlock(), createElementBlock("div", _hoisted_7$4, "无数据")) : createCommentVNode("v-if", true)], 8, _hoisted_1$17);
@@ -4311,7 +4310,7 @@ const _sfc_main$8 = /*@__PURE__*/ defineComponent({
4311
4310
  class: "text-muted-foreground hover:text-foreground",
4312
4311
  "aria-label": "清空",
4313
4312
  onClick: withModifiers(handleClear, ["stop"])
4314
- }, [createVNode(ClearIcon_default)])) : createCommentVNode("v-if", true), createVNode(ChevronIcon_default, { class: normalizeClass(unref(cn)("text-muted-foreground transition-transform", unref(isOpen) ? "-rotate-90" : "rotate-90")) }, null, 8, ["class"])])], 16, _hoisted_1$16)]),
4313
+ }, [createVNode(CloseIcon_default, { class: "size-4 shrink-0" })])) : createCommentVNode("v-if", true), createVNode(ChevronIcon_default, { class: normalizeClass(unref(cn)("size-4 shrink-0 text-muted-foreground transition-transform", unref(isOpen) ? "-rotate-90" : "rotate-90")) }, null, 8, ["class"])])], 16, _hoisted_1$16)]),
4315
4314
  _: 1
4316
4315
  }), (openBlock(), createBlock(Teleport, { to: "body" }, [createVNode(unref(Popover).Positioner, null, {
4317
4316
  default: withCtx(() => [createVNode(unref(Popover).Content, {
@@ -4487,7 +4486,7 @@ const _sfc_main$55 = /*@__PURE__*/ defineComponent({
4487
4486
  class: "flex size-4 shrink-0 items-center justify-center text-muted-foreground",
4488
4487
  "aria-label": isExpanded(node) ? "折叠" : "展开",
4489
4488
  onClick: withModifiers(($event) => emit("toggle", node), ["stop"])
4490
- }, [createVNode(ChevronIcon_default, { class: normalizeClass(isExpanded(node) ? "rotate-90" : "") }, null, 8, ["class"])], 8, _hoisted_2$12)) : (openBlock(), createElementBlock("span", _hoisted_3$8)),
4489
+ }, [createVNode(ChevronIcon_default, { class: normalizeClass(["size-4 shrink-0 transition-transform", isExpanded(node) ? "rotate-90" : ""]) }, null, 8, ["class"])], 8, _hoisted_2$12)) : (openBlock(), createElementBlock("span", _hoisted_3$8)),
4491
4490
  props.checkable ? (openBlock(), createElementBlock("span", {
4492
4491
  key: 2,
4493
4492
  "data-part": "checkbox",
@@ -4881,7 +4880,7 @@ const _sfc_main$49 = /*@__PURE__*/ defineComponent({
4881
4880
  class: "text-muted-foreground hover:text-foreground",
4882
4881
  "aria-label": "清空",
4883
4882
  onClick: withModifiers(handleClear, ["stop"])
4884
- }, [createVNode(ClearIcon_default)])) : createCommentVNode("v-if", true), createVNode(ChevronIcon_default, { class: normalizeClass(unref(cn)("text-muted-foreground transition-transform", unref(isOpen) ? "-rotate-90" : "rotate-90")) }, null, 8, ["class"])])], 16, _hoisted_1$14)]),
4883
+ }, [createVNode(CloseIcon_default, { class: "size-4 shrink-0" })])) : createCommentVNode("v-if", true), createVNode(ChevronIcon_default, { class: normalizeClass(unref(cn)("size-4 shrink-0 text-muted-foreground transition-transform", unref(isOpen) ? "-rotate-90" : "rotate-90")) }, null, 8, ["class"])])], 16, _hoisted_1$14)]),
4885
4884
  _: 1
4886
4885
  }),
4887
4886
  createCommentVNode(" 弹层 Teleport 到 body:脱离表单 DOM,消除 overflow 容器裁剪隐患(DatePicker 同款) "),
@@ -5061,7 +5060,7 @@ const _sfc_main$25 = /*@__PURE__*/ defineComponent({
5061
5060
  return openBlock(), createElementBlock("div", {
5062
5061
  key: String(item.key),
5063
5062
  style: normalizeStyle(spanStyle(item.span))
5064
- }, [createVNode(_sfc_main$65, {
5063
+ }, [createVNode(_sfc_main$64, {
5065
5064
  item,
5066
5065
  widget: widgetOf(item),
5067
5066
  values: unref(valuesRef)
@@ -5556,16 +5555,8 @@ const _sfc_main$14 = /*@__PURE__*/ defineComponent({
5556
5555
  key: 2,
5557
5556
  class: "absolute right-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none"
5558
5557
  }, {
5559
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
5560
- viewBox: "0 0 24 24",
5561
- fill: "none",
5562
- stroke: "currentColor",
5563
- "stroke-width": "2",
5564
- "stroke-linecap": "round",
5565
- "stroke-linejoin": "round",
5566
- class: "size-4"
5567
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1), createElementVNode("span", { class: "sr-only" }, "关闭", -1)])]),
5568
- _: 1
5558
+ default: withCtx(() => [renderSlot(_ctx.$slots, "close", {}, () => [createVNode(CloseIcon_default, { class: "size-4" }), _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "关闭", -1))])]),
5559
+ _: 3
5569
5560
  })) : createCommentVNode("v-if", true)
5570
5561
  ]),
5571
5562
  _: 3
@@ -5866,11 +5857,72 @@ const _sfc_main$34 = /*@__PURE__*/ defineComponent({
5866
5857
  type: Boolean,
5867
5858
  default: false
5868
5859
  },
5869
- /** 面板相对触发器的对齐方向(默认居中);attrs.positioning.placement 显式给出时以其为准 */
5860
+ /** 触发方式:click(默认,内建切换+完整 aria) / hover / focus(带延迟,Anchor+手动 aria) / manual(纯受控,仅定位锚点) */
5861
+ trigger: {
5862
+ type: String,
5863
+ default: "click"
5864
+ },
5865
+ /** hover/focus 打开延迟(毫秒) */
5866
+ openDelay: {
5867
+ type: Number,
5868
+ default: 100
5869
+ },
5870
+ /** hover/focus 关闭延迟(毫秒) */
5871
+ closeDelay: {
5872
+ type: Number,
5873
+ default: 100
5874
+ },
5875
+ /** hover/focus 时悬浮/聚焦面板保持打开 */
5876
+ keepAliveOnHover: {
5877
+ type: Boolean,
5878
+ default: true
5879
+ },
5880
+ /** 面板主轴方向(与 align 组合定位);attrs.positioning.placement 显式给出时以其为准 */
5881
+ side: {
5882
+ type: String,
5883
+ default: "bottom"
5884
+ },
5885
+ /** 面板相对触发器的对齐方向(默认居中) */
5870
5886
  align: {
5871
5887
  type: String,
5872
5888
  default: "center"
5873
5889
  },
5890
+ /** 显示箭头(shadcn 风格默认无箭头) */
5891
+ arrow: {
5892
+ type: Boolean,
5893
+ default: false
5894
+ },
5895
+ /** 追加/覆盖箭头样式类 */
5896
+ arrowClass: {
5897
+ type: String,
5898
+ default: void 0
5899
+ },
5900
+ /** 禁用触发(不响应任何触发事件;已打开状态不受影响) */
5901
+ disabled: {
5902
+ type: Boolean,
5903
+ default: false
5904
+ },
5905
+ /** 是否 Teleport(浮层定位不受嵌套裁剪影响);false 时面板留在原地 */
5906
+ portal: {
5907
+ type: Boolean,
5908
+ default: true
5909
+ },
5910
+ /** Teleport 目标(选择器或元素),仅 portal=true 时生效;
5911
+ 缺省时若应用挂载容器处于 shadow DOM(微前端沙箱)自动降级为该容器,否则 body */
5912
+ to: {
5913
+ type: [String, Object],
5914
+ default: void 0
5915
+ },
5916
+ /** 面板宽度与触发元素一致 */
5917
+ matchTriggerWidth: {
5918
+ type: Boolean,
5919
+ default: false
5920
+ },
5921
+ /** 覆盖面板/定位层级(默认走 --z-overlay) */
5922
+ zIndex: {
5923
+ type: Number,
5924
+ default: void 0
5925
+ },
5874
5926
  /** 追加/覆盖面板样式类(默认 w-72 可由此覆盖,如 "w-56 p-0") */
5875
5927
  contentClass: {
5876
5928
  type: String,
@@ -5886,48 +5938,150 @@ const _sfc_main$34 = /*@__PURE__*/ defineComponent({
5886
5938
  setup(__props, { emit: __emit }) {
5887
5939
  const props = __props;
5888
5940
  const emit = __emit;
5941
+ const slots = useSlots();
5889
5942
  const attrs = useAttrs();
5943
+ const instance = getCurrentInstance();
5944
+ const detectedTarget = ref("body");
5945
+ onMounted(() => {
5946
+ queueMicrotask(() => {
5947
+ if (props.to) return;
5948
+ const container = (instance?.appContext.app)?._container;
5949
+ if (container && container.getRootNode() instanceof ShadowRoot) detectedTarget.value = container;
5950
+ });
5951
+ });
5952
+ const teleportTarget = computed(() => props.to ?? detectedTarget.value);
5890
5953
  const { isOpen, setOpen } = useControlledBoolean({
5891
5954
  controlled: () => props.open,
5892
5955
  defaultValue: () => props.defaultOpen,
5893
5956
  onChange: (open) => emit("update:open", open)
5894
5957
  });
5958
+ const useNativeTrigger = computed(() => props.trigger === "click" && !props.disabled);
5959
+ const contentId = useId();
5960
+ const rootIds = computed(() => {
5961
+ if (useNativeTrigger.value) return void 0;
5962
+ return {
5963
+ ...attrs.ids ?? {},
5964
+ content: contentId
5965
+ };
5966
+ });
5967
+ const anchorAria = computed(() => useNativeTrigger.value ? {} : {
5968
+ "aria-haspopup": "dialog",
5969
+ "aria-expanded": isOpen.value,
5970
+ "aria-controls": contentId
5971
+ });
5972
+ let timer = null;
5973
+ const clearTimer = () => {
5974
+ if (timer !== null) {
5975
+ clearTimeout(timer);
5976
+ timer = null;
5977
+ }
5978
+ };
5979
+ const schedule = (next, delay) => {
5980
+ if (props.disabled) return;
5981
+ clearTimer();
5982
+ if (delay <= 0) {
5983
+ setOpen(next);
5984
+ return;
5985
+ }
5986
+ timer = setTimeout(() => {
5987
+ timer = null;
5988
+ if (!props.disabled) setOpen(next);
5989
+ }, delay);
5990
+ };
5991
+ const isHoverFocus = () => props.trigger === "hover" || props.trigger === "focus";
5992
+ const onTriggerEnter = () => {
5993
+ if (!isHoverFocus()) return;
5994
+ schedule(true, props.openDelay);
5995
+ };
5996
+ const onTriggerLeave = () => {
5997
+ if (!isHoverFocus()) return;
5998
+ schedule(false, props.closeDelay);
5999
+ };
6000
+ const onPanelEnter = () => {
6001
+ if (!isHoverFocus() || !props.keepAliveOnHover) return;
6002
+ clearTimer();
6003
+ };
6004
+ const onPanelLeave = () => {
6005
+ if (!isHoverFocus()) return;
6006
+ schedule(false, props.closeDelay);
6007
+ };
6008
+ onBeforeUnmount(clearTimer);
5895
6009
  const rootPositioning = computed(() => {
5896
6010
  const user = attrs.positioning ?? {};
5897
- if (user.placement) return user;
5898
- const placement = props.align === "center" ? "bottom" : `bottom-${props.align}`;
6011
+ const placement = props.align === "center" ? props.side : `${props.side}-${props.align}`;
5899
6012
  return {
5900
6013
  ...user,
5901
- placement
6014
+ placement,
6015
+ sameWidth: props.matchTriggerWidth || user.sameWidth
5902
6016
  };
5903
6017
  });
5904
6018
  const contentClass = computed(() => cn("bg-popover text-popover-foreground z-[var(--z-overlay)] w-72 rounded-md border p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", props.contentClass, props.contentProps?.["class"]));
6019
+ const arrowClass = computed(() => cn("[--arrow-size:10px] [--arrow-background:var(--popover)]", props.arrowClass));
6020
+ const positionerClass = computed(() => props.zIndex != null ? "" : "z-[var(--z-overlay)]");
6021
+ const positionerStyle = computed(() => props.zIndex != null ? { zIndex: props.zIndex } : void 0);
5905
6022
  return (_ctx, _cache) => {
5906
6023
  return openBlock(), createBlock(unref(Popover).Root, mergeProps(unref(attrs), {
5907
6024
  open: unref(isOpen),
5908
6025
  positioning: rootPositioning.value,
6026
+ ids: rootIds.value,
5909
6027
  "lazy-mount": props.lazyMount,
5910
6028
  "unmount-on-exit": props.unmountOnExit,
5911
6029
  "onUpdate:open": unref(setOpen)
5912
6030
  }), {
5913
6031
  default: withCtx(() => [
5914
- createCommentVNode(" 默认插槽即触发元素本体(asChild 语义合并到子元素,不额外包裹,原 PopoverTrigger 同款实现) "),
5915
- createVNode(unref(Popover).Trigger, { "as-child": "" }, {
6032
+ createCommentVNode(" click 且未禁用:内建 Trigger,行为/aria 与旧版完全一致 "),
6033
+ useNativeTrigger.value ? (openBlock(), createBlock(unref(Popover).Trigger, {
6034
+ key: 0,
6035
+ "as-child": ""
6036
+ }, {
5916
6037
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
5917
6038
  _: 3
5918
- }),
5919
- createVNode(unref(Popover).Positioner, { class: "z-[var(--z-overlay)]" }, {
5920
- default: withCtx(() => [createVNode(unref(Popover).Content, mergeProps(props.contentProps, { class: contentClass.value }), {
5921
- default: withCtx(() => [renderSlot(_ctx.$slots, "content")]),
6039
+ })) : unref(slots).default ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" hover/focus/manual 或 disabled:Anchor + 自绑监听 + 手动 aria "), createVNode(unref(Popover).Anchor, mergeProps({ "as-child": "" }, anchorAria.value, {
6040
+ onMouseenter: onTriggerEnter,
6041
+ onMouseleave: onTriggerLeave,
6042
+ onFocusin: onTriggerEnter,
6043
+ onFocusout: onTriggerLeave
6044
+ }), {
6045
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
6046
+ _: 3
6047
+ }, 16)], 2112)) : createCommentVNode("v-if", true),
6048
+ createCommentVNode(" portal:Teleport(Ark Vue 原语不自带传送,浮层定位不受嵌套 overflow 裁剪影响);\n portal=false 时 disabled Teleport 面板留在原地;to 显式指定目标,\n 缺省时在 shadow DOM 沙箱(wujie 等)自动降级为应用挂载容器,避免传送出 shadow root "),
6049
+ (openBlock(), createBlock(Teleport, {
6050
+ to: teleportTarget.value,
6051
+ disabled: !props.portal
6052
+ }, [createVNode(unref(Popover).Positioner, {
6053
+ class: normalizeClass(positionerClass.value),
6054
+ style: normalizeStyle(positionerStyle.value)
6055
+ }, {
6056
+ default: withCtx(() => [createVNode(unref(Popover).Content, mergeProps(props.contentProps, {
6057
+ class: contentClass.value,
6058
+ onMouseenter: onPanelEnter,
6059
+ onMouseleave: onPanelLeave,
6060
+ onFocusin: onPanelEnter,
6061
+ onFocusout: onPanelLeave
6062
+ }), {
6063
+ default: withCtx(() => [
6064
+ props.arrow ? (openBlock(), createBlock(unref(Popover).Arrow, {
6065
+ key: 0,
6066
+ class: normalizeClass(arrowClass.value)
6067
+ }, {
6068
+ default: withCtx(() => [createVNode(unref(Popover).ArrowTip)]),
6069
+ _: 1
6070
+ }, 8, ["class"])) : createCommentVNode("v-if", true),
6071
+ renderSlot(_ctx.$slots, "header"),
6072
+ renderSlot(_ctx.$slots, "content"),
6073
+ renderSlot(_ctx.$slots, "footer")
6074
+ ]),
5922
6075
  _: 3
5923
6076
  }, 16, ["class"])]),
5924
6077
  _: 3
5925
- })
6078
+ }, 8, ["class", "style"])], 8, ["to", "disabled"]))
5926
6079
  ]),
5927
6080
  _: 3
5928
6081
  }, 16, [
5929
6082
  "open",
5930
6083
  "positioning",
6084
+ "ids",
5931
6085
  "lazy-mount",
5932
6086
  "unmount-on-exit",
5933
6087
  "onUpdate:open"
@@ -6284,17 +6438,7 @@ const _sfc_main$53 = /*@__PURE__*/ defineComponent({
6284
6438
  "aria-expanded": props.line.row.getIsExpanded(),
6285
6439
  "aria-label": props.line.row.getIsExpanded() ? "收起" : "展开",
6286
6440
  onClick: _cache[3] || (_cache[3] = withModifiers(($event) => props.line.row.toggleExpanded(), ["stop"]))
6287
- }, [(openBlock(), createElementBlock("svg", {
6288
- xmlns: "http://www.w3.org/2000/svg",
6289
- viewBox: "0 0 24 24",
6290
- fill: "none",
6291
- stroke: "currentColor",
6292
- "stroke-width": "2",
6293
- "stroke-linecap": "round",
6294
- "stroke-linejoin": "round",
6295
- class: normalizeClass(["size-3.5 transition-transform", { "rotate-90": props.line.row.getIsExpanded() }]),
6296
- "aria-hidden": "true"
6297
- }, [..._cache[7] || (_cache[7] = [createElementVNode("path", { d: "m9 18 6-6-6-6" }, null, -1)])], 2))], 8, _hoisted_3$6)) : createCommentVNode("v-if", true),
6441
+ }, [createVNode(ChevronIcon_default, { class: normalizeClass(["size-3.5 transition-transform", { "rotate-90": props.line.row.getIsExpanded() }]) }, null, 8, ["class"])], 8, _hoisted_3$6)) : createCommentVNode("v-if", true),
6298
6442
  createCommentVNode(" VNode 必须走子节点渲染;文本插值会序列化 vnode 导致循环引用 "),
6299
6443
  isVNode(value) ? (openBlock(), createBlock(resolveDynamicComponent(value), { key: 1 })) : (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(value), 1))
6300
6444
  ], 4)) : props.columns[index].ellipsis === "tooltip" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [createCommentVNode(" ellipsis: \"tooltip\":Tooltip 包装(VNode 经 cloneVNode 复制,避免二次挂载) "), (openBlock(), createBlock(resolveDynamicComponent(tooltipCell(value, cellText(props.line, index)))))], 2112)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createCommentVNode(" VNode 必须走子节点渲染;文本插值会序列化 vnode 导致循环引用 "), isVNode(value) ? (openBlock(), createBlock(resolveDynamicComponent(value), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [createTextVNode(toDisplayString(value), 1)], 64))], 64))], 14, _hoisted_2$9);
@@ -7771,17 +7915,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
7771
7915
  "aria-label": "关闭",
7772
7916
  class: "shrink-0 rounded-sm opacity-60 transition-opacity hover:opacity-100 focus-visible:outline-2 focus-visible:outline-ring -m-1 p-1",
7773
7917
  onClick: onClose
7774
- }, [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
7775
- xmlns: "http://www.w3.org/2000/svg",
7776
- viewBox: "0 0 24 24",
7777
- fill: "none",
7778
- stroke: "currentColor",
7779
- "stroke-width": "2",
7780
- "stroke-linecap": "round",
7781
- "stroke-linejoin": "round",
7782
- "aria-hidden": "true",
7783
- class: "size-4"
7784
- }, [createElementVNode("path", { d: "M18 6 6 18M6 6l12 12" })], -1)])])) : createCommentVNode("v-if", true)])
7918
+ }, [createVNode(CloseIcon_default, { class: "size-4" })])) : createCommentVNode("v-if", true)])
7785
7919
  ], 10, _hoisted_1$6)) : createCommentVNode("v-if", true);
7786
7920
  };
7787
7921
  }
@@ -7961,7 +8095,7 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
7961
8095
  "aria-busy": __props.spinning,
7962
8096
  "aria-label": __props.label,
7963
8097
  class: normalizeClass(hasContent.value ? "absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] bg-background/60" : "flex")
7964
- }, [(openBlock(), createElementBlock("svg", {
8098
+ }, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createElementBlock("svg", {
7965
8099
  class: normalizeClass(unref(cn)("animate-spin", unref(spinVariants)({ size: __props.size }))),
7966
8100
  viewBox: "0 0 24 24",
7967
8101
  fill: "none",
@@ -7978,7 +8112,7 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
7978
8112
  stroke: "currentColor",
7979
8113
  "stroke-width": "3",
7980
8114
  "stroke-linecap": "round"
7981
- }, null, -1)])], 2))], 10, _hoisted_2$4)) : createCommentVNode("v-if", true)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
8115
+ }, null, -1)])], 2))])], 10, _hoisted_2$4)) : createCommentVNode("v-if", true)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
7982
8116
  };
7983
8117
  }
7984
8118
  });
@@ -8175,7 +8309,7 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8175
8309
  t.type ? (openBlock(), createElementBlock("span", {
8176
8310
  key: 0,
8177
8311
  class: normalizeClass(["mt-0.5 shrink-0", { "animate-spin": t.type === "loading" }])
8178
- }, [t.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }, null, -1), createElementVNode("path", { d: "m9 11 3 3L22 4" }, null, -1)])])) : t.type === "error" ? (openBlock(), createElementBlock("svg", _hoisted_2$3, [..._cache[1] || (_cache[1] = [
8312
+ }, [renderSlot(_ctx.$slots, "icon", { type: t.type }, () => [t.type === "success" ? (openBlock(), createElementBlock("svg", _hoisted_1$3, [..._cache[0] || (_cache[0] = [createElementVNode("path", { d: "M21.801 10A10 10 0 1 1 17 3.335" }, null, -1), createElementVNode("path", { d: "m9 11 3 3L22 4" }, null, -1)])])) : t.type === "error" ? (openBlock(), createElementBlock("svg", _hoisted_2$3, [..._cache[1] || (_cache[1] = [
8179
8313
  createElementVNode("circle", {
8180
8314
  cx: "12",
8181
8315
  cy: "12",
@@ -8195,7 +8329,7 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8195
8329
  }, null, -1),
8196
8330
  createElementVNode("path", { d: "M12 16v-4" }, null, -1),
8197
8331
  createElementVNode("path", { d: "M12 8h.01" }, null, -1)
8198
- ])])) : (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[4] || (_cache[4] = [createElementVNode("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }, null, -1)])]))], 2)) : createCommentVNode("v-if", true),
8332
+ ])])) : (openBlock(), createElementBlock("svg", _hoisted_5, [..._cache[4] || (_cache[4] = [createElementVNode("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }, null, -1)])]))])], 2)) : createCommentVNode("v-if", true),
8199
8333
  createElementVNode("div", _hoisted_6, [createVNode(unref(Toast).Title, { class: "text-sm font-semibold" }, {
8200
8334
  default: withCtx(() => [createTextVNode(toDisplayString(t.title), 1)]),
8201
8335
  _: 2
@@ -8213,21 +8347,13 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8213
8347
  "aria-label": "关闭",
8214
8348
  class: "inline-flex size-6 items-center justify-center rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/50"
8215
8349
  }, {
8216
- default: withCtx(() => [..._cache[5] || (_cache[5] = [createElementVNode("svg", {
8217
- viewBox: "0 0 24 24",
8218
- fill: "none",
8219
- stroke: "currentColor",
8220
- "stroke-width": "2",
8221
- "stroke-linecap": "round",
8222
- "stroke-linejoin": "round",
8223
- class: "size-4"
8224
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1), createElementVNode("span", { class: "sr-only" }, "关闭", -1)])]),
8350
+ default: withCtx(() => [createVNode(CloseIcon_default, { class: "size-4" }), _cache[5] || (_cache[5] = createElementVNode("span", { class: "sr-only" }, "关闭", -1))]),
8225
8351
  _: 1
8226
8352
  })])
8227
8353
  ]),
8228
8354
  _: 2
8229
8355
  }, 1032, ["class"])]),
8230
- _: 1
8356
+ _: 3
8231
8357
  }, 8, ["toaster"]);
8232
8358
  };
8233
8359
  }
@@ -8603,16 +8729,8 @@ const _sfc_main$15 = /*@__PURE__*/ defineComponent({
8603
8729
  "aria-label": "关闭",
8604
8730
  class: "absolute right-4 top-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none"
8605
8731
  }, {
8606
- default: withCtx(() => [..._cache[0] || (_cache[0] = [createElementVNode("svg", {
8607
- viewBox: "0 0 24 24",
8608
- fill: "none",
8609
- stroke: "currentColor",
8610
- "stroke-width": "2",
8611
- "stroke-linecap": "round",
8612
- "stroke-linejoin": "round",
8613
- class: "size-4"
8614
- }, [createElementVNode("path", { d: "M18 6 6 18" }), createElementVNode("path", { d: "m6 6 12 12" })], -1), createElementVNode("span", { class: "sr-only" }, "关闭", -1)])]),
8615
- _: 1
8732
+ default: withCtx(() => [renderSlot(_ctx.$slots, "close", {}, () => [createVNode(CloseIcon_default, { class: "size-4" }), _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "关闭", -1))])]),
8733
+ _: 3
8616
8734
  })) : createCommentVNode("v-if", true)
8617
8735
  ]),
8618
8736
  _: 3