x-next 1.14.0 → 1.16.0

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 (178) hide show
  1. package/AI_USAGE/catalog.md +4 -2
  2. package/AI_USAGE/components/alert-api.md +1 -1
  3. package/AI_USAGE/components/alert.md +1 -1
  4. package/AI_USAGE/components/bar-chart-api.md +1 -1
  5. package/AI_USAGE/components/bar-chart.md +1 -1
  6. package/AI_USAGE/components/boxicons.md +1 -1
  7. package/AI_USAGE/components/button-api.md +1 -1
  8. package/AI_USAGE/components/button.md +1 -1
  9. package/AI_USAGE/components/charts.md +1 -1
  10. package/AI_USAGE/components/checkbox-api.md +1 -1
  11. package/AI_USAGE/components/checkbox.md +1 -1
  12. package/AI_USAGE/components/color-picker-api.md +1 -1
  13. package/AI_USAGE/components/color-picker.md +1 -1
  14. package/AI_USAGE/components/config-provider-api.md +1 -1
  15. package/AI_USAGE/components/config-provider.md +1 -1
  16. package/AI_USAGE/components/date-picker-api.md +1 -1
  17. package/AI_USAGE/components/date-picker.md +1 -1
  18. package/AI_USAGE/components/dialog-api.md +1 -1
  19. package/AI_USAGE/components/dialog.md +1 -1
  20. package/AI_USAGE/components/draggable-api.md +1 -1
  21. package/AI_USAGE/components/draggable.md +1 -1
  22. package/AI_USAGE/components/drawer-api.md +1 -1
  23. package/AI_USAGE/components/drawer.md +30 -1
  24. package/AI_USAGE/components/dropdown-api.md +1 -1
  25. package/AI_USAGE/components/dropdown.md +1 -1
  26. package/AI_USAGE/components/empty-api.md +1 -1
  27. package/AI_USAGE/components/empty.md +1 -1
  28. package/AI_USAGE/components/finicon.md +1 -1
  29. package/AI_USAGE/components/form-api.md +1 -1
  30. package/AI_USAGE/components/form.md +1 -1
  31. package/AI_USAGE/components/grid-api.md +1 -1
  32. package/AI_USAGE/components/grid.md +1 -1
  33. package/AI_USAGE/components/heatmap-api.md +1 -1
  34. package/AI_USAGE/components/heatmap.md +1 -1
  35. package/AI_USAGE/components/icon-api.md +1 -1
  36. package/AI_USAGE/components/icon.md +1 -1
  37. package/AI_USAGE/components/image-api.md +1 -1
  38. package/AI_USAGE/components/image.md +1 -1
  39. package/AI_USAGE/components/input-api.md +1 -1
  40. package/AI_USAGE/components/input-number-api.md +1 -1
  41. package/AI_USAGE/components/input-number.md +1 -1
  42. package/AI_USAGE/components/input-tag-api.md +1 -1
  43. package/AI_USAGE/components/input-tag.md +1 -1
  44. package/AI_USAGE/components/input.md +1 -1
  45. package/AI_USAGE/components/layout-api.md +1 -1
  46. package/AI_USAGE/components/layout.md +1 -1
  47. package/AI_USAGE/components/line-chart-api.md +3 -3
  48. package/AI_USAGE/components/line-chart.md +28 -1
  49. package/AI_USAGE/components/link-api.md +1 -1
  50. package/AI_USAGE/components/link.md +1 -1
  51. package/AI_USAGE/components/menu-api.md +1 -1
  52. package/AI_USAGE/components/menu.md +1 -1
  53. package/AI_USAGE/components/message-api.md +1 -1
  54. package/AI_USAGE/components/message-box-api.md +1 -1
  55. package/AI_USAGE/components/message-box.md +1 -1
  56. package/AI_USAGE/components/message.md +1 -1
  57. package/AI_USAGE/components/network-api.md +1 -1
  58. package/AI_USAGE/components/network.md +1 -1
  59. package/AI_USAGE/components/notification-api.md +1 -1
  60. package/AI_USAGE/components/notification.md +1 -1
  61. package/AI_USAGE/components/pagination-api.md +1 -1
  62. package/AI_USAGE/components/pagination.md +1 -1
  63. package/AI_USAGE/components/pie-chart-api.md +1 -1
  64. package/AI_USAGE/components/pie-chart.md +1 -1
  65. package/AI_USAGE/components/popconfirm-api.md +1 -1
  66. package/AI_USAGE/components/popconfirm.md +1 -1
  67. package/AI_USAGE/components/popover-api.md +1 -1
  68. package/AI_USAGE/components/popover.md +1 -1
  69. package/AI_USAGE/components/popup-api.md +1 -1
  70. package/AI_USAGE/components/popup.md +1 -1
  71. package/AI_USAGE/components/progress-api.md +1 -1
  72. package/AI_USAGE/components/progress.md +1 -1
  73. package/AI_USAGE/components/radio-api.md +1 -1
  74. package/AI_USAGE/components/radio.md +1 -1
  75. package/AI_USAGE/components/rate-api.md +1 -1
  76. package/AI_USAGE/components/rate.md +1 -1
  77. package/AI_USAGE/components/resize-box-api.md +1 -1
  78. package/AI_USAGE/components/resize-box.md +1 -1
  79. package/AI_USAGE/components/scrollbar-api.md +1 -1
  80. package/AI_USAGE/components/scrollbar.md +1 -1
  81. package/AI_USAGE/components/select-api.md +1 -1
  82. package/AI_USAGE/components/select.md +1 -1
  83. package/AI_USAGE/components/skeleton-api.md +1 -1
  84. package/AI_USAGE/components/skeleton.md +1 -1
  85. package/AI_USAGE/components/slider-api.md +1 -1
  86. package/AI_USAGE/components/slider.md +1 -1
  87. package/AI_USAGE/components/space-api.md +1 -1
  88. package/AI_USAGE/components/space.md +1 -1
  89. package/AI_USAGE/components/spin-api.md +1 -1
  90. package/AI_USAGE/components/spin.md +1 -1
  91. package/AI_USAGE/components/steps-api.md +1 -1
  92. package/AI_USAGE/components/steps.md +1 -1
  93. package/AI_USAGE/components/switch-api.md +1 -1
  94. package/AI_USAGE/components/switch.md +1 -1
  95. package/AI_USAGE/components/table-api.md +1 -1
  96. package/AI_USAGE/components/table.md +44 -1
  97. package/AI_USAGE/components/tabs-api.md +1 -1
  98. package/AI_USAGE/components/tabs.md +1 -1
  99. package/AI_USAGE/components/tag-api.md +1 -1
  100. package/AI_USAGE/components/tag.md +1 -1
  101. package/AI_USAGE/components/textarea-api.md +1 -1
  102. package/AI_USAGE/components/textarea.md +1 -1
  103. package/AI_USAGE/components/time-picker-api.md +1 -1
  104. package/AI_USAGE/components/time-picker.md +1 -1
  105. package/AI_USAGE/components/time-range-selector-api.md +1 -1
  106. package/AI_USAGE/components/time-range-selector.md +1 -1
  107. package/AI_USAGE/components/timeline-api.md +1 -1
  108. package/AI_USAGE/components/timeline.md +1 -1
  109. package/AI_USAGE/components/tooltip-api.md +1 -1
  110. package/AI_USAGE/components/tooltip.md +1 -1
  111. package/AI_USAGE/components/tree-select-api.md +498 -0
  112. package/AI_USAGE/components/tree-select.md +744 -0
  113. package/AI_USAGE/components/trend-chart-api.md +1 -1
  114. package/AI_USAGE/components/trend-chart.md +1 -1
  115. package/AI_USAGE/components/trigger-api.md +1 -1
  116. package/AI_USAGE/components/trigger.md +1 -1
  117. package/AI_USAGE/components/upload-api.md +1 -1
  118. package/AI_USAGE/components/upload.md +1 -1
  119. package/AI_USAGE/components/watermark-api.md +1 -1
  120. package/AI_USAGE/components/watermark.md +1 -1
  121. package/AI_USAGE/core.md +1 -1
  122. package/AI_USAGE/index.md +3 -2
  123. package/AI_USAGE/recipes/form-on-demand.md +1 -1
  124. package/AI_USAGE.md +1326 -5
  125. package/CHANGELOG.md +32 -0
  126. package/dist/_props/css.d.ts +2 -1
  127. package/dist/components/_components/input-label/input-label.d.ts +3 -0
  128. package/dist/components/bar-chart/BarChart.d.ts +1 -1
  129. package/dist/components/bar-chart/index.d.ts +3 -3
  130. package/dist/components/index.d.ts +1 -0
  131. package/dist/components/line-chart/LineChart.d.ts +1 -1
  132. package/dist/components/line-chart/index.d.ts +3 -3
  133. package/dist/components/line-chart/interface.d.ts +2 -2
  134. package/dist/components/tree-select/TreeNode.vue.d.ts +478 -0
  135. package/dist/components/tree-select/TreeSelect.d.ts +1549 -0
  136. package/dist/components/tree-select/TreeSelectDropdown.vue.d.ts +569 -0
  137. package/dist/components/tree-select/hooks/use-tree-select.d.ts +92 -0
  138. package/dist/components/tree-select/index.d.ts +3321 -0
  139. package/dist/components/tree-select/interface.d.ts +203 -0
  140. package/dist/components/tree-select/utils.d.ts +64 -0
  141. package/dist/es/_styles/palette-aliases.js +3 -0
  142. package/dist/es/components/_components/feedback-icon/index.vue2.js +10 -10
  143. package/dist/es/components/_components/input-label/input-label.js +69 -65
  144. package/dist/es/components/_components/select-view/select-view.js +1 -0
  145. package/dist/es/components/button/Button.js +9 -9
  146. package/dist/es/components/drawer/src/Drawer.vue.js +26 -26
  147. package/dist/es/components/form-switch/Switch.vue2.js +18 -18
  148. package/dist/es/components/image/Image.vue2.js +13 -13
  149. package/dist/es/components/image/ImagePreview.vue2.js +33 -33
  150. package/dist/es/components/index.js +55 -52
  151. package/dist/es/components/link/Link.vue2.js +12 -12
  152. package/dist/es/components/message/message.vue2.js +13 -13
  153. package/dist/es/components/spin/Spin.js +28 -28
  154. package/dist/es/components/tag/Tag.vue2.js +22 -22
  155. package/dist/es/components/timeline/src/Timeline.js +7 -7
  156. package/dist/es/components/tree-select/TreeNode.vue.js +91 -0
  157. package/dist/es/components/tree-select/TreeNode.vue2.js +162 -0
  158. package/dist/es/components/tree-select/TreeSelect.js +865 -0
  159. package/dist/es/components/tree-select/TreeSelectDropdown.vue.js +57 -0
  160. package/dist/es/components/tree-select/TreeSelectDropdown.vue2.js +79 -0
  161. package/dist/es/components/tree-select/hooks/use-tree-select.js +376 -0
  162. package/dist/es/components/tree-select/index.js +13 -0
  163. package/dist/es/components/tree-select/utils.js +181 -0
  164. package/dist/es/icons/animation/animation-loading.js +2 -2
  165. package/dist/es/index.js +71 -68
  166. package/dist/es/style.css +1 -1
  167. package/dist/index.cjs +3 -3
  168. package/dist/index.umd.js +3 -3
  169. package/dist/style/base.css +1 -1
  170. package/dist/style/dependencies.json +10 -0
  171. package/dist/style/drawer.css +1 -1
  172. package/dist/style/table.css +1 -1
  173. package/dist/style/tree-select.css +1 -0
  174. package/dist/style/tree-select.js +8 -0
  175. package/dist/style.css +1 -1
  176. package/dist/types.d.ts +2 -0
  177. package/package.json +2 -1
  178. package/volar.d.ts +2 -0
@@ -0,0 +1,91 @@
1
+ import C from "./TreeNode.vue2.js";
2
+ import { resolveComponent as d, openBlock as a, createElementBlock as o, normalizeStyle as b, normalizeClass as l, createElementVNode as m, withModifiers as v, renderSlot as r, createBlock as i, createCommentVNode as h, resolveDynamicComponent as y, normalizeProps as f, guardReactiveProps as N, Fragment as t, renderList as w, toDisplayString as p, createTextVNode as z } from "vue";
3
+ import M from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const $ = ["id", "aria-level", "aria-setsize", "aria-posinset", "aria-selected", "aria-checked", "aria-disabled", "aria-expanded"];
5
+ function E(e, s, S, D, I, T) {
6
+ const c = d("icon-loading"), k = d("icon-right"), u = d("checkbox");
7
+ return a(), o("li", {
8
+ id: e.nodeId,
9
+ role: "treeitem",
10
+ "aria-level": e.node.level + 1,
11
+ "aria-setsize": e.siblingCount,
12
+ "aria-posinset": e.siblingIndex + 1,
13
+ "aria-selected": e.selected || void 0,
14
+ "aria-checked": e.checkable ? e.halfChecked ? "mixed" : e.checked : void 0,
15
+ "aria-disabled": e.mergedDisabled || void 0,
16
+ "aria-expanded": e.hasChildren ? e.expanded : void 0,
17
+ class: l(e.cls),
18
+ style: b(e.indentStyle),
19
+ onClick: s[1] || (s[1] = (...n) => e.handleClick && e.handleClick(...n)),
20
+ onMouseenter: s[2] || (s[2] = (...n) => e.handleMouseEnter && e.handleMouseEnter(...n)),
21
+ onMouseleave: s[3] || (s[3] = (...n) => e.handleMouseLeave && e.handleMouseLeave(...n))
22
+ }, [
23
+ m("div", {
24
+ class: l(e.contentCls)
25
+ }, [
26
+ e.showSwitcher ? (a(), o("span", {
27
+ key: 0,
28
+ class: l(e.className.element("switcher")),
29
+ "aria-hidden": "true",
30
+ onClick: s[0] || (s[0] = v((...n) => e.handleToggleExpand && e.handleToggleExpand(...n), ["stop"]))
31
+ }, [
32
+ r(e.$slots, "switcher-icon", {
33
+ node: e.node.raw,
34
+ expanded: e.expanded,
35
+ loading: e.loading
36
+ }, () => [
37
+ e.loading ? (a(), i(c, {
38
+ key: 0,
39
+ class: l(e.className.element("switcher-loading"))
40
+ }, null, 8, ["class"])) : (a(), i(k, {
41
+ key: 1,
42
+ class: l(e.className.element("switcher-icon"))
43
+ }, null, 8, ["class"]))
44
+ ])
45
+ ], 2)) : (a(), o("span", {
46
+ key: 1,
47
+ class: l(e.className.element("switcher-placeholder")),
48
+ "aria-hidden": "true"
49
+ }, null, 2)),
50
+ e.showCheckbox ? (a(), i(u, {
51
+ key: 2,
52
+ class: l(e.className.element("checkbox")),
53
+ "model-value": e.checked,
54
+ indeterminate: e.halfChecked,
55
+ disabled: e.checkboxDisabled,
56
+ size: e.size,
57
+ tabindex: -1,
58
+ "uninject-group-context": "",
59
+ onChange: e.handleCheckboxChange
60
+ }, null, 8, ["class", "model-value", "indeterminate", "disabled", "size", "onChange"])) : h("", !0),
61
+ e.nodeIcon ? (a(), o("span", {
62
+ key: 3,
63
+ class: l(e.className.element("icon"))
64
+ }, [
65
+ r(e.$slots, "node-icon", {
66
+ node: e.node.raw
67
+ }, () => [
68
+ (a(), i(y(e.nodeIcon)))
69
+ ])
70
+ ], 2)) : h("", !0),
71
+ m("span", {
72
+ class: l(e.className.element("title"))
73
+ }, [
74
+ r(e.$slots, "default", f(N(e.slotProps)), () => [
75
+ (a(!0), o(t, null, w(e.titleSegments, (n, g) => (a(), o(t, { key: g }, [
76
+ n.match ? (a(), o("mark", {
77
+ key: 0,
78
+ class: l(e.className.element("highlight"))
79
+ }, p(n.text), 3)) : (a(), o(t, { key: 1 }, [
80
+ z(p(n.text), 1)
81
+ ], 64))
82
+ ], 64))), 128))
83
+ ])
84
+ ], 2)
85
+ ], 2)
86
+ ], 46, $);
87
+ }
88
+ const V = /* @__PURE__ */ M(C, [["render", E]]);
89
+ export {
90
+ V as default
91
+ };
@@ -0,0 +1,162 @@
1
+ import { defineComponent as v, provide as C, computed as n } from "vue";
2
+ import { getClassNameMixin as y } from "../../_utils/config.js";
3
+ import B from "../form-checkbox/Checkbox.js";
4
+ import I from "../../icons/default/right.js";
5
+ import L from "../../icons/animation/animation-loading.js";
6
+ import { formItemInjectionKey as w } from "../form/context.js";
7
+ import { splitHighlightText as N } from "./utils.js";
8
+ const a = 24, S = 8, O = v({
9
+ name: "TreeNode",
10
+ components: {
11
+ Checkbox: B,
12
+ IconRight: I,
13
+ IconLoading: L
14
+ },
15
+ props: {
16
+ node: {
17
+ type: Object,
18
+ required: !0
19
+ },
20
+ nodeId: String,
21
+ selected: {
22
+ type: Boolean,
23
+ default: !1
24
+ },
25
+ checked: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ halfChecked: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ expanded: {
34
+ type: Boolean,
35
+ default: !1
36
+ },
37
+ active: {
38
+ type: Boolean,
39
+ default: !1
40
+ },
41
+ loading: {
42
+ type: Boolean,
43
+ default: !1
44
+ },
45
+ checkable: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ multiple: {
50
+ type: Boolean,
51
+ default: !1
52
+ },
53
+ disabled: {
54
+ type: Boolean,
55
+ default: !1
56
+ },
57
+ showLine: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ blockNode: {
62
+ type: Boolean,
63
+ default: !1
64
+ },
65
+ size: {
66
+ type: String,
67
+ default: "medium"
68
+ },
69
+ highlight: {
70
+ type: String,
71
+ default: ""
72
+ }
73
+ },
74
+ emits: {
75
+ select: () => !0,
76
+ check: () => !0,
77
+ "toggle-expand": (e) => !0,
78
+ hover: () => !0,
79
+ leave: () => !0
80
+ },
81
+ setup(e, { emit: d, slots: E }) {
82
+ const l = y("tree-select--node");
83
+ C(w, {});
84
+ const i = n(() => e.checkable || e.multiple), c = n(
85
+ () => !e.node.isLeaf || e.loading
86
+ ), s = n(() => !e.node.isLeaf), t = n(() => e.disabled || e.node.disabled), f = n(
87
+ () => t.value || e.node.disableCheckbox
88
+ ), h = n(() => ({
89
+ paddingLeft: `${e.node.level * a}px`,
90
+ // 连接线对齐父级展开图标的水平中心
91
+ "--x-tree-select-node-line-left": `${(e.node.level - 1) * a + S}px`
92
+ })), u = n(() => e.node.siblingCount), m = n(() => e.node.siblingIndex), g = n(() => {
93
+ var o;
94
+ return (o = e.node.raw) == null ? void 0 : o.icon;
95
+ }), b = n(
96
+ () => N(e.node.title, e.highlight)
97
+ ), x = n(() => ({
98
+ node: e.node.raw,
99
+ value: e.node.value,
100
+ title: e.node.title,
101
+ level: e.node.level,
102
+ checked: e.checked,
103
+ halfChecked: e.halfChecked,
104
+ selected: e.selected,
105
+ expanded: e.expanded,
106
+ disabled: t.value,
107
+ isLeaf: e.node.isLeaf
108
+ })), k = n(() => [
109
+ l.block,
110
+ l.modifier(`size-${e.size}`),
111
+ {
112
+ [l.modifier("last")]: e.node.lastChild,
113
+ [l.modifier("root")]: e.node.level === 0,
114
+ [l.modifier("is-expanded")]: e.expanded,
115
+ [l.modifier("active")]: e.active,
116
+ [l.modifier("selected")]: e.selected,
117
+ [l.modifier("disabled")]: t.value,
118
+ [l.modifier("with-line")]: e.showLine,
119
+ [l.modifier("block")]: e.blockNode
120
+ }
121
+ ]), r = n(() => [
122
+ l.element("content"),
123
+ {
124
+ [l.element("content-block")]: e.blockNode
125
+ }
126
+ ]);
127
+ return {
128
+ className: l,
129
+ cls: k,
130
+ contentCls: r,
131
+ indentStyle: h,
132
+ showCheckbox: i,
133
+ showSwitcher: c,
134
+ hasChildren: s,
135
+ mergedDisabled: t,
136
+ checkboxDisabled: f,
137
+ siblingCount: u,
138
+ siblingIndex: m,
139
+ nodeIcon: g,
140
+ titleSegments: b,
141
+ slotProps: x,
142
+ handleClick: () => {
143
+ t.value || d("select");
144
+ },
145
+ handleCheckboxChange: () => {
146
+ t.value || e.node.disableCheckbox || d("check");
147
+ },
148
+ handleToggleExpand: () => {
149
+ e.loading || d("toggle-expand", !e.expanded);
150
+ },
151
+ handleMouseEnter: () => {
152
+ d("hover");
153
+ },
154
+ handleMouseLeave: () => {
155
+ d("leave");
156
+ }
157
+ };
158
+ }
159
+ });
160
+ export {
161
+ O as default
162
+ };