x-next 1.10.0 → 1.11.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 (182) hide show
  1. package/AI_CODING.md +97 -0
  2. package/AI_USAGE/catalog.md +111 -0
  3. package/AI_USAGE/components/alert.md +33 -0
  4. package/AI_USAGE/components/bar-chart.md +46 -0
  5. package/AI_USAGE/components/button.md +35 -0
  6. package/AI_USAGE/components/checkbox.md +34 -0
  7. package/AI_USAGE/components/color-picker.md +36 -0
  8. package/AI_USAGE/components/config-provider.md +58 -0
  9. package/AI_USAGE/components/date-picker.md +34 -0
  10. package/AI_USAGE/components/dialog.md +37 -0
  11. package/AI_USAGE/components/dropdown.md +38 -0
  12. package/AI_USAGE/components/empty.md +30 -0
  13. package/AI_USAGE/components/input.md +32 -0
  14. package/AI_USAGE/components/line-chart.md +45 -0
  15. package/AI_USAGE/components/message-box.md +39 -0
  16. package/AI_USAGE/components/message.md +36 -0
  17. package/AI_USAGE/components/notification.md +37 -0
  18. package/AI_USAGE/components/pagination.md +32 -0
  19. package/AI_USAGE/components/pie-chart.md +55 -0
  20. package/AI_USAGE/components/popconfirm.md +33 -0
  21. package/AI_USAGE/components/popover.md +35 -0
  22. package/AI_USAGE/components/progress.md +32 -0
  23. package/AI_USAGE/components/radio.md +35 -0
  24. package/AI_USAGE/components/rate.md +30 -0
  25. package/AI_USAGE/components/select.md +38 -0
  26. package/AI_USAGE/components/slider.md +34 -0
  27. package/AI_USAGE/components/steps.md +33 -0
  28. package/AI_USAGE/components/switch.md +32 -0
  29. package/AI_USAGE/components/tabs.md +33 -0
  30. package/AI_USAGE/components/textarea.md +31 -0
  31. package/AI_USAGE/components/time-picker.md +34 -0
  32. package/AI_USAGE/components/upload.md +60 -0
  33. package/AI_USAGE/core.md +37 -0
  34. package/AI_USAGE/index.md +52 -0
  35. package/AI_USAGE/recipes/form-on-demand.md +42 -0
  36. package/AI_USAGE.md +173 -46
  37. package/CHANGELOG.md +36 -1
  38. package/README.md +15 -2
  39. package/dist/_container/resize-trigger.vue.d.ts +1 -1
  40. package/dist/_hooks/use-dialog-focus.d.ts +7 -0
  41. package/dist/_hooks/use-pointer-drag.d.ts +6 -0
  42. package/dist/_hooks/use-popup-close.d.ts +11 -0
  43. package/dist/_hooks/use-popup-theme.d.ts +5 -0
  44. package/dist/_utils/palette.d.ts +2 -0
  45. package/dist/components/_components/picker/input-range.vue.d.ts +1 -3
  46. package/dist/components/_components/picker/input.vue.d.ts +1 -3
  47. package/dist/components/_components/select-view/select-view.d.ts +9 -0
  48. package/dist/components/alert/Alert.vue.d.ts +1 -1
  49. package/dist/components/alert/index.d.ts +3 -3
  50. package/dist/components/bar-chart/BarChart.d.ts +3 -3
  51. package/dist/components/bar-chart/index.d.ts +9 -9
  52. package/dist/components/color-picker/ColorPicker.d.ts +2 -1
  53. package/dist/components/color-picker/index.d.ts +2 -0
  54. package/dist/components/color-picker/panel.d.ts +6 -0
  55. package/dist/components/config-provider/context.d.ts +7 -1
  56. package/dist/components/date-picker/DatePicker.vue.d.ts +9 -12
  57. package/dist/components/date-picker/index.d.ts +19 -27
  58. package/dist/components/drawer/index.d.ts +51 -9
  59. package/dist/components/drawer/src/Drawer.vue.d.ts +19 -4
  60. package/dist/components/dropdown/Dropdown.vue.d.ts +6 -3
  61. package/dist/components/dropdown/DropdownButton.vue.d.ts +6 -3
  62. package/dist/components/dropdown/DropdownSubmenu.vue.d.ts +6 -3
  63. package/dist/components/dropdown/dropdown-panel.vue.d.ts +6 -3
  64. package/dist/components/dropdown/index.d.ts +36 -18
  65. package/dist/components/form-select/Select.d.ts +18 -5
  66. package/dist/components/form-select/SelectDropdown.vue.d.ts +6 -3
  67. package/dist/components/form-select/SelectOption.vue.d.ts +1 -0
  68. package/dist/components/form-select/SelectOptionGroup.vue.d.ts +1 -0
  69. package/dist/components/form-select/hooks/use-options.d.ts +1 -1
  70. package/dist/components/form-select/hooks/use-select.d.ts +1 -1
  71. package/dist/components/form-select/index.d.ts +57 -17
  72. package/dist/components/form-select/interface.d.ts +8 -0
  73. package/dist/components/form-slider/Slider.vue.d.ts +1 -1
  74. package/dist/components/form-slider/index.d.ts +3 -3
  75. package/dist/components/form-textarea/Textarea.vue.d.ts +2 -4
  76. package/dist/components/form-textarea/index.d.ts +6 -12
  77. package/dist/components/image/Image.vue.d.ts +2 -4
  78. package/dist/components/image/index.d.ts +6 -12
  79. package/dist/components/layout/LayoutSidebar.vue.d.ts +5 -5
  80. package/dist/components/layout/index.d.ts +10 -10
  81. package/dist/components/line-chart/LineChart.d.ts +3 -3
  82. package/dist/components/line-chart/index.d.ts +9 -9
  83. package/dist/components/menu/Menu.d.ts +6 -3
  84. package/dist/components/menu/base-menu.vue.d.ts +6 -3
  85. package/dist/components/menu/index.d.ts +12 -6
  86. package/dist/components/menu/sub-menu-pop.vue.d.ts +6 -3
  87. package/dist/components/network/Network.vue.d.ts +1 -1
  88. package/dist/components/network/index.d.ts +3 -3
  89. package/dist/components/pagination/page-options.vue.d.ts +60 -32
  90. package/dist/components/pie-chart/PieChart.d.ts +1 -1
  91. package/dist/components/pie-chart/index.d.ts +3 -3
  92. package/dist/components/resize-box/ResizeBox.vue.d.ts +2 -2
  93. package/dist/components/resize-box/index.d.ts +5 -5
  94. package/dist/components/scrollbar-v2/Scrollbar.vue.d.ts +2 -1
  95. package/dist/components/scrollbar-v2/index.d.ts +6 -3
  96. package/dist/components/table/Table.d.ts +1 -1
  97. package/dist/components/table/index.d.ts +3 -3
  98. package/dist/components/tabs/Tabs.d.ts +1 -1
  99. package/dist/components/tabs/index.d.ts +3 -3
  100. package/dist/components/time-picker/TimeColumn.vue.d.ts +6 -3
  101. package/dist/components/time-picker/TimePanel.vue.d.ts +6 -3
  102. package/dist/components/time-picker/TimePicker.vue.d.ts +9 -12
  103. package/dist/components/time-picker/index.d.ts +19 -27
  104. package/dist/components/trend-chart/components/TrendChart.d.ts +5 -5
  105. package/dist/components/trend-chart/components/trend-chart-curve.d.ts +1 -1
  106. package/dist/components/trend-chart/index.d.ts +14 -14
  107. package/dist/components/trigger/interface.d.ts +2 -0
  108. package/dist/components/virtual-list-v2/virtual-list.vue.d.ts +7 -4
  109. package/dist/es/_hooks/use-dialog-focus.js +69 -0
  110. package/dist/es/_hooks/use-pointer-drag.js +18 -0
  111. package/dist/es/_hooks/use-popup-close.js +27 -0
  112. package/dist/es/_hooks/use-popup-manager.js +26 -24
  113. package/dist/es/_hooks/use-popup-theme.js +18 -0
  114. package/dist/es/_hooks/use-teleport-container.js +9 -10
  115. package/dist/es/_utils/palette.js +57 -52
  116. package/dist/es/components/_components/select-view/select-view.js +89 -78
  117. package/dist/es/components/button/Button.js +1 -1
  118. package/dist/es/components/color-picker/ColorPicker.js +131 -102
  119. package/dist/es/components/color-picker/gradient-slider.js +38 -40
  120. package/dist/es/components/color-picker/panel.js +221 -192
  121. package/dist/es/components/color-picker/sv-panel.js +51 -50
  122. package/dist/es/components/config-provider/ConfigProvider.js +58 -41
  123. package/dist/es/components/dialog/Dialog.js +133 -186
  124. package/dist/es/components/drawer/src/Drawer.vue.js +59 -51
  125. package/dist/es/components/drawer/src/Drawer.vue2.js +117 -107
  126. package/dist/es/components/form/FormItem.vue.js +12 -12
  127. package/dist/es/components/form-input-tag/InputTag.js +1 -1
  128. package/dist/es/components/form-select/Select.js +348 -300
  129. package/dist/es/components/form-select/SelectDropdown.vue.js +7 -7
  130. package/dist/es/components/form-select/SelectOption.vue.js +22 -17
  131. package/dist/es/components/form-select/SelectOption.vue2.js +59 -51
  132. package/dist/es/components/form-select/SelectOptionGroup.vue.js +17 -13
  133. package/dist/es/components/form-select/SelectOptionGroup.vue2.js +8 -5
  134. package/dist/es/components/form-select/hooks/use-options.js +40 -40
  135. package/dist/es/components/form-select/hooks/use-select.js +76 -71
  136. package/dist/es/components/form-switch/Switch.vue.js +24 -24
  137. package/dist/es/components/image/Image.vue.js +12 -12
  138. package/dist/es/components/link/Link.vue.js +6 -6
  139. package/dist/es/components/menu/sub-menu-inline.vue.js +11 -11
  140. package/dist/es/components/menu/sub-menu-pop.vue.js +12 -12
  141. package/dist/es/components/notification/Notification.js +59 -59
  142. package/dist/es/components/resize-box/ResizeBox.vue.js +19 -22
  143. package/dist/es/components/skeleton/Skeleton.vue.js +9 -9
  144. package/dist/es/components/tag/Tag.vue.js +7 -7
  145. package/dist/es/components/trigger/Trigger.js +171 -163
  146. package/dist/es/style.css +1 -1
  147. package/dist/index.cjs +3 -3
  148. package/dist/index.umd.js +3 -3
  149. package/dist/style/bar-chart.js +1 -0
  150. package/dist/style/base.css +1 -1
  151. package/dist/style/button.css +1 -1
  152. package/dist/style/color-picker.css +1 -1
  153. package/dist/style/color-picker.js +4 -0
  154. package/dist/style/date-picker.js +4 -0
  155. package/dist/style/dependencies.json +296 -0
  156. package/dist/style/dialog.js +2 -0
  157. package/dist/style/drawer.js +3 -0
  158. package/dist/style/dropdown.js +5 -0
  159. package/dist/style/form-checkbox.css +1 -1
  160. package/dist/style/form-input-number.js +2 -0
  161. package/dist/style/form-input.css +1 -1
  162. package/dist/style/form-input.js +1 -0
  163. package/dist/style/form-select.js +5 -0
  164. package/dist/style/form-slider.js +5 -0
  165. package/dist/style/form.js +3 -0
  166. package/dist/style/heatmap.js +1 -0
  167. package/dist/style/image.js +2 -0
  168. package/dist/style/layout.js +1 -0
  169. package/dist/style/line-chart.js +1 -0
  170. package/dist/style/menu.js +3 -0
  171. package/dist/style/message-box.js +3 -0
  172. package/dist/style/pagination.js +9 -0
  173. package/dist/style/pie-chart.js +1 -0
  174. package/dist/style/popconfirm.js +3 -0
  175. package/dist/style/popover.js +1 -0
  176. package/dist/style/popup.js +2 -0
  177. package/dist/style/table.js +12 -0
  178. package/dist/style/time-picker.js +3 -0
  179. package/dist/style/tooltip.js +1 -0
  180. package/dist/style/upload.js +4 -0
  181. package/dist/style.css +1 -1
  182. package/package.json +17 -7
@@ -1,8 +1,8 @@
1
1
  import m from "./SelectDropdown.vue2.js";
2
- import { resolveComponent as p, openBlock as l, createElementBlock as r, normalizeClass as s, renderSlot as o, createCommentVNode as a, createBlock as t, resolveDynamicComponent as i, withDirectives as d, mergeProps as u, withCtx as y, createElementVNode as c, vShow as f } from "vue";
3
- import v from "../../_virtual/_plugin-vue_export-helper.js";
2
+ import { resolveComponent as p, openBlock as l, createElementBlock as r, normalizeClass as s, renderSlot as o, createCommentVNode as a, createBlock as t, resolveDynamicComponent as i, withDirectives as d, mergeProps as u, withCtx as y, createElementVNode as v, vShow as c } from "vue";
3
+ import f from "../../_virtual/_plugin-vue_export-helper.js";
4
4
  const h = ["id", "aria-multiselectable", "aria-busy"];
5
- function $(e, k, b, w, N, S) {
5
+ function $(e, b, k, w, N, S) {
6
6
  const n = p("spin");
7
7
  return l(), r("div", {
8
8
  id: e.id,
@@ -28,14 +28,14 @@ function $(e, k, b, w, N, S) {
28
28
  (l(), t(i("Empty"), { component: "select" }))
29
29
  ])
30
30
  ], 2)) : a("", !0),
31
- e.virtualList && !e.loading && !e.empty ? o(e.$slots, "virtual-list", { key: 3 }) : a("", !0),
31
+ e.virtualList && !e.loading && !e.empty ? o(e.$slots, "virtual-list", {}, void 0, void 0, 3) : a("", !0),
32
32
  e.virtualList ? a("", !0) : d((l(), t(i(e.displayScrollbar ? "ScrollbarComponent" : "div"), u({
33
33
  key: 4,
34
34
  ref: "wrapperComRef",
35
35
  class: e.className.element("list-wrapper")
36
36
  }, e.scrollbarProps, { onScroll: e.handleScroll }), {
37
37
  default: y(() => [
38
- c("ul", {
38
+ v("ul", {
39
39
  class: s(e.className.element("list"))
40
40
  }, [
41
41
  o(e.$slots, "default")
@@ -43,7 +43,7 @@ function $(e, k, b, w, N, S) {
43
43
  ]),
44
44
  _: 3
45
45
  }, 16, ["class", "onScroll"])), [
46
- [f, !e.loading && !e.empty]
46
+ [c, !e.loading && !e.empty]
47
47
  ]),
48
48
  e.$slots.footer && (!e.empty || e.showFooterOnEmpty) ? (l(), r("div", {
49
49
  key: 5,
@@ -53,7 +53,7 @@ function $(e, k, b, w, N, S) {
53
53
  ], 2)) : a("", !0)
54
54
  ], 10, h);
55
55
  }
56
- const B = /* @__PURE__ */ v(m, [["render", $]]);
56
+ const B = /* @__PURE__ */ f(m, [["render", $]]);
57
57
  export {
58
58
  B as default
59
59
  };
@@ -1,9 +1,9 @@
1
- import c from "./SelectOption.vue2.js";
2
- import { resolveComponent as u, withDirectives as f, openBlock as s, createBlock as n, resolveDynamicComponent as p, normalizeClass as o, withCtx as i, createElementBlock as a, renderSlot as l, createCommentVNode as t, createTextVNode as r, toDisplayString as d, vShow as k } from "vue";
1
+ import f from "./SelectOption.vue2.js";
2
+ import { resolveComponent as c, withDirectives as p, openBlock as s, createBlock as i, resolveDynamicComponent as h, normalizeClass as o, withCtx as t, createElementBlock as a, renderSlot as l, createCommentVNode as d, withModifiers as k, createTextVNode as r, toDisplayString as m, vShow as C } from "vue";
3
3
  import b from "../../_virtual/_plugin-vue_export-helper.js";
4
- function h(e, $, v, C, N, y) {
5
- const m = u("checkbox");
6
- return f((s(), n(p(e.component), {
4
+ function $(e, n, v, M, N, y) {
5
+ const u = c("checkbox");
6
+ return p((s(), i(h(e.component), {
7
7
  ref: "itemRef",
8
8
  id: e.optionId,
9
9
  role: "option",
@@ -14,32 +14,37 @@ function h(e, $, v, C, N, y) {
14
14
  onMouseenter: e.handleMouseEnter,
15
15
  onMouseleave: e.handleMouseLeave
16
16
  }, {
17
- default: i(() => [
17
+ default: t(() => [
18
18
  e.$slots.icon ? (s(), a("span", {
19
19
  key: 0,
20
20
  class: o(e.className.element("icon"))
21
21
  }, [
22
22
  l(e.$slots, "icon")
23
- ], 2)) : t("", !0),
24
- e.selectCtx && e.selectCtx.multiple ? (s(), n(m, {
23
+ ], 2)) : d("", !0),
24
+ e.selectCtx && e.selectCtx.multiple ? (s(), i(u, {
25
25
  key: 1,
26
26
  class: o(e.className.element("checkbox")),
27
27
  "model-value": e.isSelected,
28
28
  disabled: e.disabled,
29
- "uninject-group-context": ""
29
+ tabindex: -1,
30
+ "aria-hidden": "true",
31
+ "uninject-group-context": "",
32
+ onClick: n[0] || (n[0] = k(() => {
33
+ }, ["stop"])),
34
+ onChange: e.handleCheckboxChange
30
35
  }, {
31
- default: i(() => [
36
+ default: t(() => [
32
37
  l(e.$slots, "default", {}, () => [
33
- r(d(e.label), 1)
38
+ r(m(e.label), 1)
34
39
  ])
35
40
  ]),
36
41
  _: 3
37
- }, 8, ["class", "model-value", "disabled"])) : (s(), a("span", {
42
+ }, 8, ["class", "model-value", "disabled", "onChange"])) : (s(), a("span", {
38
43
  key: 2,
39
44
  class: o(e.className.element("content"))
40
45
  }, [
41
46
  l(e.$slots, "default", {}, () => [
42
- r(d(e.label), 1)
47
+ r(m(e.label), 1)
43
48
  ])
44
49
  ], 2)),
45
50
  e.$slots.suffix ? (s(), a("span", {
@@ -47,14 +52,14 @@ function h(e, $, v, C, N, y) {
47
52
  class: o(e.className.element("suffix"))
48
53
  }, [
49
54
  l(e.$slots, "suffix")
50
- ], 2)) : t("", !0)
55
+ ], 2)) : d("", !0)
51
56
  ]),
52
57
  _: 3
53
58
  }, 40, ["id", "aria-selected", "aria-disabled", "class", "onClick", "onMouseenter", "onMouseleave"])), [
54
- [k, e.isValid]
59
+ [C, e.isValid]
55
60
  ]);
56
61
  }
57
- const w = /* @__PURE__ */ b(c, [["render", h]]);
62
+ const B = /* @__PURE__ */ b(f, [["render", $]]);
58
63
  export {
59
- w as default
64
+ B as default
60
65
  };
@@ -1,13 +1,14 @@
1
- import { defineComponent as B, toRefs as M, inject as N, getCurrentInstance as P, ref as r, watch as A, computed as i, onMounted as _, onUpdated as w, reactive as E, onBeforeUnmount as R } from "vue";
2
- import U from "../form-checkbox/Checkbox.js";
3
- import { selectInjectionKey as q } from "./context.js";
4
- import { getKeyFromValue as F, isValidOption as L } from "./utils.js";
5
- import { isEqual as T } from "../../_utils/is-equal.js";
6
- import { getClassNameMixin as z } from "../../_utils/config.js";
7
- const X = B({
1
+ import { defineComponent as M, toRefs as N, inject as P, provide as _, getCurrentInstance as A, ref as f, watch as q, computed as i, onMounted as w, onUpdated as E, reactive as R, onBeforeUnmount as U } from "vue";
2
+ import F from "../form-checkbox/Checkbox.js";
3
+ import { selectInjectionKey as L } from "./context.js";
4
+ import { getKeyFromValue as T, isValidOption as z } from "./utils.js";
5
+ import { isEqual as D } from "../../_utils/is-equal.js";
6
+ import { getClassNameMixin as G } from "../../_utils/config.js";
7
+ import { formItemInjectionKey as H } from "../form/context.js";
8
+ const x = M({
8
9
  name: "Option",
9
10
  components: {
10
- Checkbox: U
11
+ Checkbox: F
11
12
  },
12
13
  props: {
13
14
  /**
@@ -55,76 +56,83 @@ const X = B({
55
56
  // private
56
57
  internal: Boolean
57
58
  },
58
- setup(o) {
59
- const { disabled: v, tagProps: s, index: g } = M(o), a = z("select--option"), e = N(q, void 0), l = P(), u = r(), f = r(s.value);
60
- A(s, (n, k) => {
61
- T(n, k) || (f.value = n);
59
+ setup(n) {
60
+ const { disabled: v, tagProps: s, index: h } = N(n), t = G("select--option"), e = P(L, void 0);
61
+ e && _(H, {});
62
+ const d = A(), u = f(), m = f(s.value);
63
+ q(s, (o, l) => {
64
+ D(o, l) || (m.value = o);
62
65
  });
63
- const d = r(""), m = i(() => o.value ?? o.label ?? d.value), c = i(() => o.label ?? d.value), t = i(() => F(m.value, e == null ? void 0 : e.valueKey)), O = i(() => (e == null ? void 0 : e.component) ?? "li"), I = i(() => e == null ? void 0 : e.getOptionId(t.value)), p = () => {
64
- if (!o.label && u.value) {
65
- const n = u.value.textContent ?? "";
66
- d.value !== n && (d.value = n);
66
+ const r = f(""), c = i(() => n.value ?? n.label ?? r.value), b = i(() => n.label ?? r.value), a = i(() => T(c.value, e == null ? void 0 : e.valueKey)), O = i(() => (e == null ? void 0 : e.component) ?? "li"), I = i(() => e == null ? void 0 : e.getOptionId(a.value)), p = () => {
67
+ if (!n.label && u.value) {
68
+ const o = u.value.querySelector(
69
+ ".x-select--option--content, .x-checkbox--label"
70
+ ), l = (o == null ? void 0 : o.textContent) ?? "";
71
+ r.value !== l && (r.value = l);
67
72
  }
68
73
  };
69
- _(() => p()), w(() => p());
70
- const b = i(() => (e == null ? void 0 : e.valueKeys.includes(t.value)) ?? !1), K = i(() => (e == null ? void 0 : e.activeKey) === t.value);
71
- let y = r(!0);
72
- if (!o.internal) {
73
- const n = E({
74
+ w(() => p()), E(() => p());
75
+ const y = i(() => (e == null ? void 0 : e.valueKeys.includes(a.value)) ?? !1), K = i(() => (e == null ? void 0 : e.activeKey) === a.value);
76
+ let g = f(!0);
77
+ if (!n.internal) {
78
+ const o = R({
74
79
  raw: {
75
- value: m,
76
- label: c,
80
+ value: c,
81
+ label: b,
77
82
  disabled: v,
78
- tagProps: f
83
+ tagProps: m
79
84
  },
80
85
  ref: u,
81
- index: g,
82
- key: t,
86
+ index: h,
87
+ key: a,
83
88
  origin: "slot",
84
- value: m,
85
- label: c,
89
+ value: c,
90
+ label: b,
86
91
  disabled: v,
87
- tagProps: f
92
+ tagProps: m
88
93
  });
89
- y = i(
90
- () => L(n, {
94
+ g = i(
95
+ () => z(o, {
91
96
  inputValue: e == null ? void 0 : e.inputValue,
92
97
  filterOption: e == null ? void 0 : e.filterOption
93
98
  })
94
- ), l && (e == null || e.addSlotOptionInfo(l.uid, n)), R(() => {
95
- l && (e == null || e.removeSlotOptionInfo(l.uid));
99
+ ), d && (e == null || e.addSlotOptionInfo(d.uid, o)), U(() => {
100
+ d && (e == null || e.removeSlotOptionInfo(d.uid));
96
101
  });
97
102
  }
98
- const S = (n) => {
99
- o.disabled || e == null || e.onSelect(t.value, n);
100
- }, h = () => {
101
- o.disabled || e == null || e.setActiveKey(t.value);
103
+ const S = (o) => {
104
+ n.disabled || e == null || e.onSelect(a.value, o);
105
+ }, k = (o, l) => {
106
+ n.disabled || e == null || e.onSelect(a.value, l);
102
107
  }, j = () => {
103
- o.disabled || e == null || e.setActiveKey();
104
- }, V = i(() => [
105
- a.block,
108
+ n.disabled || e == null || e.setActiveKey(a.value);
109
+ }, V = () => {
110
+ n.disabled || e == null || e.setActiveKey();
111
+ }, B = i(() => [
112
+ t.block,
106
113
  {
107
- [a.modifier("disabled")]: o.disabled,
108
- [a.modifier("selected")]: b.value,
109
- [a.modifier("active")]: K.value,
110
- [a.modifier("multiple")]: e == null ? void 0 : e.multiple
114
+ [t.modifier("disabled")]: n.disabled,
115
+ [t.modifier("selected")]: y.value,
116
+ [t.modifier("active")]: K.value,
117
+ [t.modifier("multiple")]: e == null ? void 0 : e.multiple
111
118
  }
112
119
  ]);
113
120
  return {
114
- className: a,
115
- cls: V,
121
+ className: t,
122
+ cls: B,
116
123
  selectCtx: e,
117
124
  itemRef: u,
118
125
  component: O,
119
126
  optionId: I,
120
- isSelected: b,
121
- isValid: y,
127
+ isSelected: y,
128
+ isValid: g,
122
129
  handleClick: S,
123
- handleMouseEnter: h,
124
- handleMouseLeave: j
130
+ handleCheckboxChange: k,
131
+ handleMouseEnter: j,
132
+ handleMouseLeave: V
125
133
  };
126
134
  }
127
135
  });
128
136
  export {
129
- X as default
137
+ x as default
130
138
  };
@@ -1,19 +1,23 @@
1
- import o from "./SelectOptionGroup.vue2.js";
2
- import { openBlock as l, createElementBlock as r, Fragment as a, createElementVNode as s, normalizeClass as n, renderSlot as t, createTextVNode as m, toDisplayString as p } from "vue";
3
- import c from "../../_virtual/_plugin-vue_export-helper.js";
4
- function i(e, f, d, u, $, _) {
5
- return l(), r(a, null, [
6
- s("li", {
7
- class: n(e.className.element("title"))
8
- }, [
9
- t(e.$slots, "label", {}, () => [
10
- m(p(e.label), 1)
11
- ])
12
- ], 2),
1
+ import l from "./SelectOptionGroup.vue2.js";
2
+ import { openBlock as o, createElementBlock as r, Fragment as n, createBlock as a, resolveDynamicComponent as s, normalizeClass as p, withCtx as c, renderSlot as t, createTextVNode as m, toDisplayString as i } from "vue";
3
+ import f from "../../_virtual/_plugin-vue_export-helper.js";
4
+ function d(e, u, $, _, k, B) {
5
+ return o(), r(n, null, [
6
+ (o(), a(s(e.component), {
7
+ class: p(e.className.element("title")),
8
+ role: "presentation"
9
+ }, {
10
+ default: c(() => [
11
+ t(e.$slots, "label", {}, () => [
12
+ m(i(e.label), 1)
13
+ ])
14
+ ]),
15
+ _: 3
16
+ }, 8, ["class"])),
13
17
  t(e.$slots, "default")
14
18
  ], 64);
15
19
  }
16
- const g = /* @__PURE__ */ c(o, [["render", i]]);
20
+ const g = /* @__PURE__ */ f(l, [["render", d]]);
17
21
  export {
18
22
  g as default
19
23
  };
@@ -1,6 +1,7 @@
1
- import { defineComponent as e } from "vue";
2
- import { getClassNameMixin as t } from "../../_utils/config.js";
3
- const p = e({
1
+ import { defineComponent as n, inject as p, computed as i } from "vue";
2
+ import { getClassNameMixin as m } from "../../_utils/config.js";
3
+ import { selectInjectionKey as c } from "./context.js";
4
+ const l = n({
4
5
  name: "SelectOptionGroup",
5
6
  props: {
6
7
  /**
@@ -18,11 +19,13 @@ const p = e({
18
19
  * @version 2.10.0
19
20
  */
20
21
  setup() {
22
+ const e = m("select--option--group"), o = p(c, void 0), t = i(() => (o == null ? void 0 : o.component) ?? "li");
21
23
  return {
22
- className: t("select--option--group")
24
+ className: e,
25
+ component: t
23
26
  };
24
27
  }
25
28
  });
26
29
  export {
27
- p as default
30
+ l as default
28
31
  };
@@ -1,95 +1,95 @@
1
- import { computed as s, reactive as g, watch as z, ref as f } from "vue";
2
- import { getOptionInfos as S, getValidOptions as b, isValidOption as F } from "../utils.js";
3
- import { isNumber as k } from "../../../_utils/is.js";
4
- const N = {
1
+ import { computed as r, reactive as u, watch as D } from "vue";
2
+ import { getOptionInfos as g, getValidOptions as S, isValidOption as z } from "../utils.js";
3
+ import { isNumber as b } from "../../../_utils/is.js";
4
+ const F = {
5
5
  value: "value",
6
6
  label: "label",
7
7
  disabled: "disabled",
8
8
  tagProps: "tagProps",
9
9
  render: "render"
10
- }, j = ({
11
- options: c,
12
- extraOptions: v,
10
+ }, T = ({
11
+ options: v,
12
+ extraOptions: I,
13
13
  inputValue: n,
14
14
  filterOption: a,
15
- showExtraOptions: d,
16
- valueKey: r,
15
+ showExtraOptions: s,
16
+ valueKey: d,
17
17
  fieldNames: l
18
18
  }) => {
19
- const p = s(() => ({
20
- ...N,
19
+ const m = r(() => ({
20
+ ...F,
21
21
  ...l == null ? void 0 : l.value
22
- })), I = g(/* @__PURE__ */ new Map()), m = s(
23
- () => Array.from(I.values()).sort((o, t) => k(o.index) && k(t.index) ? o.index - t.index : 0)
24
- ), M = s(() => {
22
+ })), c = u(/* @__PURE__ */ new Map()), M = r(
23
+ () => Array.from(c.values()).sort((o, t) => b(o.index) && b(t.index) ? o.index - t.index : 0)
24
+ ), p = r(() => {
25
25
  const o = /* @__PURE__ */ new Map();
26
26
  return {
27
- optionInfos: S((c == null ? void 0 : c.value) ?? [], {
28
- valueKey: (r == null ? void 0 : r.value) ?? "value",
29
- fieldNames: p.value,
27
+ optionInfos: g((v == null ? void 0 : v.value) ?? [], {
28
+ valueKey: (d == null ? void 0 : d.value) ?? "value",
29
+ fieldNames: m.value,
30
30
  origin: "options",
31
31
  optionInfoMap: o
32
32
  }),
33
33
  optionInfoMap: o
34
34
  };
35
- }), u = s(() => {
35
+ }), f = r(() => {
36
36
  const o = /* @__PURE__ */ new Map();
37
37
  return {
38
- optionInfos: S((v == null ? void 0 : v.value) ?? [], {
39
- valueKey: (r == null ? void 0 : r.value) ?? "value",
40
- fieldNames: p.value,
38
+ optionInfos: g((I == null ? void 0 : I.value) ?? [], {
39
+ valueKey: (d == null ? void 0 : d.value) ?? "value",
40
+ fieldNames: m.value,
41
41
  origin: "extraOptions",
42
42
  optionInfoMap: o
43
43
  }),
44
44
  optionInfoMap: o
45
45
  };
46
- }), e = g(/* @__PURE__ */ new Map());
47
- z(
48
- [m, c ?? f([]), v ?? f([]), r ?? f("value")],
46
+ }), e = u(/* @__PURE__ */ new Map());
47
+ D(
48
+ [M, p, f],
49
49
  () => {
50
- e.clear(), m.value.forEach((o, t) => {
50
+ e.clear(), M.value.forEach((o, t) => {
51
51
  e.set(o.key, { ...o, index: t });
52
- }), M.value.optionInfoMap.forEach((o) => {
52
+ }), p.value.optionInfoMap.forEach((o) => {
53
53
  e.has(o.key) || (o.index = e.size, e.set(o.key, o));
54
- }), u.value.optionInfoMap.forEach((o) => {
54
+ }), f.value.optionInfoMap.forEach((o) => {
55
55
  e.has(o.key) || (o.index = e.size, e.set(o.key, o));
56
56
  });
57
57
  },
58
58
  { immediate: !0, deep: !0 }
59
59
  );
60
- const A = s(() => {
61
- const o = b(M.value.optionInfos, {
60
+ const k = r(() => {
61
+ const o = S(p.value.optionInfos, {
62
62
  inputValue: n == null ? void 0 : n.value,
63
63
  filterOption: a == null ? void 0 : a.value
64
64
  });
65
- return ((d == null ? void 0 : d.value) ?? !0) && o.push(
66
- ...b(u.value.optionInfos, {
65
+ return ((s == null ? void 0 : s.value) ?? !0) && o.push(
66
+ ...S(f.value.optionInfos, {
67
67
  inputValue: n == null ? void 0 : n.value,
68
68
  filterOption: a == null ? void 0 : a.value
69
69
  })
70
70
  ), o;
71
- }), i = s(
72
- () => Array.from(e.values()).filter((o) => o.origin === "extraOptions" && (d == null ? void 0 : d.value) === !1 ? !1 : F(o, {
71
+ }), i = r(
72
+ () => Array.from(e.values()).filter((o) => o.origin === "extraOptions" && (s == null ? void 0 : s.value) === !1 ? !1 : z(o, {
73
73
  inputValue: n == null ? void 0 : n.value,
74
74
  filterOption: a == null ? void 0 : a.value
75
75
  }))
76
- ), D = s(
76
+ ), A = r(
77
77
  () => i.value.filter((o) => !o.disabled).map((o) => o.key)
78
78
  );
79
79
  return {
80
- validOptions: A,
80
+ validOptions: k,
81
81
  optionInfoMap: e,
82
82
  validOptionInfos: i,
83
- enabledOptionKeys: D,
84
- getNextSlotOptionIndex: () => I.size,
83
+ enabledOptionKeys: A,
84
+ getNextSlotOptionIndex: () => c.size,
85
85
  addSlotOptionInfo: (o, t) => {
86
- I.set(o, t);
86
+ c.set(o, t);
87
87
  },
88
88
  removeSlotOptionInfo: (o) => {
89
- I.delete(o);
89
+ c.delete(o);
90
90
  }
91
91
  };
92
92
  };
93
93
  export {
94
- j as useOptions
94
+ T as useOptions
95
95
  };