@tu-design/vue 0.4.3 → 0.5.1

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 +175 -139
  2. package/dist/index.mjs +177 -222
  3. package/dist/registry/vue/alert-dialog.json +1 -1
  4. package/dist/registry/vue/alert.json +4 -4
  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 +2 -2
  8. package/dist/registry/vue/button.json +2 -2
  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 +1 -1
  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 +2 -2
  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
@@ -197,7 +197,7 @@ const buttonVariants = cva("inline-flex select-none items-center justify-center
197
197
  variants: {
198
198
  variant: {
199
199
  default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90 hover:shadow-sm",
200
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90",
200
+ destructive: "bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",
201
201
  outline: "border border-input bg-background hover:border-muted-foreground/25 hover:bg-muted",
202
202
  secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
203
203
  ghost: "hover:bg-muted",
@@ -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)
@@ -5308,7 +5307,7 @@ const badgeVariants = cva("inline-flex items-center justify-center rounded-md bo
5308
5307
  variants: { variant: {
5309
5308
  default: "bg-primary text-primary-foreground",
5310
5309
  secondary: "bg-secondary text-secondary-foreground",
5311
- destructive: "bg-destructive text-white",
5310
+ destructive: "bg-destructive text-destructive-foreground",
5312
5311
  outline: "text-foreground border border-input"
5313
5312
  } },
5314
5313
  defaultVariants: { variant: "default" }
@@ -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
@@ -6284,17 +6275,7 @@ const _sfc_main$53 = /*@__PURE__*/ defineComponent({
6284
6275
  "aria-expanded": props.line.row.getIsExpanded(),
6285
6276
  "aria-label": props.line.row.getIsExpanded() ? "收起" : "展开",
6286
6277
  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),
6278
+ }, [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
6279
  createCommentVNode(" VNode 必须走子节点渲染;文本插值会序列化 vnode 导致循环引用 "),
6299
6280
  isVNode(value) ? (openBlock(), createBlock(resolveDynamicComponent(value), { key: 1 })) : (openBlock(), createElementBlock("span", _hoisted_4$3, toDisplayString(value), 1))
6300
6281
  ], 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 +7752,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
7771
7752
  "aria-label": "关闭",
7772
7753
  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
7754
  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)])
7755
+ }, [createVNode(CloseIcon_default, { class: "size-4" })])) : createCommentVNode("v-if", true)])
7785
7756
  ], 10, _hoisted_1$6)) : createCommentVNode("v-if", true);
7786
7757
  };
7787
7758
  }
@@ -7791,10 +7762,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
7791
7762
  const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm flex gap-3 items-start", {
7792
7763
  variants: { variant: {
7793
7764
  default: "border-border bg-card text-card-foreground",
7794
- info: "border-[color-mix(in_oklab,var(--color-info)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-info)_10%,transparent)] text-foreground",
7795
- success: "border-[color-mix(in_oklab,var(--color-success)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-success)_10%,transparent)] text-foreground",
7796
- warning: "border-[color-mix(in_oklab,var(--color-warning)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-warning)_10%,transparent)] text-foreground",
7797
- error: "border-[color-mix(in_oklab,var(--color-destructive)_35%,transparent)] bg-[color-mix(in_oklab,var(--color-destructive)_10%,transparent)] text-foreground"
7765
+ info: "border-[color-mix(in_oklab,var(--color-info)_35%,transparent)] bg-info-soft text-foreground",
7766
+ success: "border-[color-mix(in_oklab,var(--color-success)_35%,transparent)] bg-success-soft text-foreground",
7767
+ warning: "border-[color-mix(in_oklab,var(--color-warning)_35%,transparent)] bg-warning-soft text-foreground",
7768
+ error: "border-[color-mix(in_oklab,var(--color-destructive)_35%,transparent)] bg-destructive-soft text-foreground"
7798
7769
  } },
7799
7770
  defaultVariants: { variant: "default" }
7800
7771
  });
@@ -7961,7 +7932,7 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
7961
7932
  "aria-busy": __props.spinning,
7962
7933
  "aria-label": __props.label,
7963
7934
  class: normalizeClass(hasContent.value ? "absolute inset-0 z-10 flex items-center justify-center rounded-[inherit] bg-background/60" : "flex")
7964
- }, [(openBlock(), createElementBlock("svg", {
7935
+ }, [renderSlot(_ctx.$slots, "icon", {}, () => [(openBlock(), createElementBlock("svg", {
7965
7936
  class: normalizeClass(unref(cn)("animate-spin", unref(spinVariants)({ size: __props.size }))),
7966
7937
  viewBox: "0 0 24 24",
7967
7938
  fill: "none",
@@ -7978,7 +7949,7 @@ const _sfc_main$41 = /*@__PURE__*/ defineComponent({
7978
7949
  stroke: "currentColor",
7979
7950
  "stroke-width": "3",
7980
7951
  "stroke-linecap": "round"
7981
- }, null, -1)])], 2))], 10, _hoisted_2$4)) : createCommentVNode("v-if", true)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
7952
+ }, null, -1)])], 2))])], 10, _hoisted_2$4)) : createCommentVNode("v-if", true)], 10, _hoisted_1$4)) : createCommentVNode("v-if", true);
7982
7953
  };
7983
7954
  }
7984
7955
  });
@@ -8160,7 +8131,7 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8160
8131
  /** 语义 type → token 样式(tokens.css 的 success/warning/info/destructive) */
8161
8132
  const typeClass = {
8162
8133
  success: "bg-success text-success-foreground",
8163
- error: "bg-destructive text-white",
8134
+ error: "bg-destructive text-destructive-foreground",
8164
8135
  warning: "bg-warning text-warning-foreground",
8165
8136
  info: "bg-info text-info-foreground",
8166
8137
  loading: "bg-primary text-primary-foreground",
@@ -8175,7 +8146,7 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8175
8146
  t.type ? (openBlock(), createElementBlock("span", {
8176
8147
  key: 0,
8177
8148
  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] = [
8149
+ }, [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
8150
  createElementVNode("circle", {
8180
8151
  cx: "12",
8181
8152
  cy: "12",
@@ -8195,7 +8166,7 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8195
8166
  }, null, -1),
8196
8167
  createElementVNode("path", { d: "M12 16v-4" }, null, -1),
8197
8168
  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),
8169
+ ])])) : (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
8170
  createElementVNode("div", _hoisted_6, [createVNode(unref(Toast).Title, { class: "text-sm font-semibold" }, {
8200
8171
  default: withCtx(() => [createTextVNode(toDisplayString(t.title), 1)]),
8201
8172
  _: 2
@@ -8213,21 +8184,13 @@ const _sfc_main$47 = /*@__PURE__*/ defineComponent({
8213
8184
  "aria-label": "关闭",
8214
8185
  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
8186
  }, {
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)])]),
8187
+ default: withCtx(() => [createVNode(CloseIcon_default, { class: "size-4" }), _cache[5] || (_cache[5] = createElementVNode("span", { class: "sr-only" }, "关闭", -1))]),
8225
8188
  _: 1
8226
8189
  })])
8227
8190
  ]),
8228
8191
  _: 2
8229
8192
  }, 1032, ["class"])]),
8230
- _: 1
8193
+ _: 3
8231
8194
  }, 8, ["toaster"]);
8232
8195
  };
8233
8196
  }
@@ -8603,16 +8566,8 @@ const _sfc_main$15 = /*@__PURE__*/ defineComponent({
8603
8566
  "aria-label": "关闭",
8604
8567
  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
8568
  }, {
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
8569
+ default: withCtx(() => [renderSlot(_ctx.$slots, "close", {}, () => [createVNode(CloseIcon_default, { class: "size-4" }), _cache[0] || (_cache[0] = createElementVNode("span", { class: "sr-only" }, "关闭", -1))])]),
8570
+ _: 3
8616
8571
  })) : createCommentVNode("v-if", true)
8617
8572
  ]),
8618
8573
  _: 3