@baishuyun/ui-base 6.7.3 → 6.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/Amap/AmapCircle/index.js +1 -1
  2. package/dist/Amap/AmapMarker/index.js +1 -1
  3. package/dist/Amap/AmapMarkerCluster/index.js +1 -1
  4. package/dist/Amap/AmapProvider/index.js +4 -4
  5. package/dist/Amap/{AmapProvider-DSjQj2oA.js → AmapProvider-Cwi6WOe0.js} +1 -1
  6. package/dist/Amap/hooks/index.js +1 -1
  7. package/dist/Amap/index.js +4 -4
  8. package/dist/Calendar/{Calendar-C2iO_3cX.js → Calendar-DnQrN8KB.js} +2 -2
  9. package/dist/Calendar/context/index.js +1 -1
  10. package/dist/Calendar/index.js +5 -5
  11. package/dist/Calendar/subcomponents/AllDaySection/index.js +1 -1
  12. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +1 -1
  13. package/dist/Calendar/subcomponents/EventCard/index.js +1 -1
  14. package/dist/Calendar/subcomponents/TimeAxis/index.js +1 -1
  15. package/dist/Calendar/subcomponents/TimeGrid/index.js +1 -1
  16. package/dist/Calendar/utils/index.js +1 -1
  17. package/dist/Calendar/utils/layout/index.js +1 -1
  18. package/dist/Calendar/utils/theme/index.js +1 -1
  19. package/dist/Card/index.js +1 -1
  20. package/dist/CheckBox/index.js +1 -1
  21. package/dist/ColorPicker/{ColorPicker-BtTIb9tX.js → ColorPicker-CL57cSDG.js} +2 -1
  22. package/dist/ColorPicker/index.js +4 -4
  23. package/dist/ConfigProvider/index.js +3 -3
  24. package/dist/DatePicker/{DatePicker-BMTK0Phw.js → DatePicker-C0XbZmrZ.js} +2 -2
  25. package/dist/DatePicker/{DatePickerPanel-BH_Z4e88.js → DatePickerPanel-BEn16cat.js} +3 -3
  26. package/dist/DatePicker/index.js +4 -4
  27. package/dist/DatePicker/style/index.js +1 -1
  28. package/dist/DropDown/{DropDown-CdTjlySd.js → DropDown-yDH9V_9Y.js} +2 -2
  29. package/dist/DropDown/index.js +5 -5
  30. package/dist/DropDown/style/index.js +1 -1
  31. package/dist/Editor/{Buttons-BcP66z6E.js → Buttons-BivKInBV.js} +144 -124
  32. package/dist/Editor/ToolbarPlugin/Buttons/index.js +7 -7
  33. package/dist/Editor/constants/index.js +1 -1
  34. package/dist/Editor/index.js +274 -164
  35. package/dist/Gantt/GanttChart/index.js +7 -7
  36. package/dist/Gantt/{GanttChart-BYzMKcZ2.js → GanttChart-CDw1IQ4F.js} +2 -2
  37. package/dist/Gantt/GanttTable/index.js +5 -5
  38. package/dist/Gantt/{GanttTable-DqJziqML.js → GanttTable-xbXD_PWI.js} +1 -1
  39. package/dist/Gantt/GanttToolBar/index.js +6 -6
  40. package/dist/Gantt/{GanttToolBar-C50n7PD9.js → GanttToolBar-BTeTsR6Z.js} +2 -2
  41. package/dist/Gantt/index.js +9 -9
  42. package/dist/Gantt/utils/index.js +1 -1
  43. package/dist/Gantt/utils/theme/index.js +1 -1
  44. package/dist/Icon/index.js +1 -1
  45. package/dist/InputTag/InputTag-hzCCJQ1z.js +144 -0
  46. package/dist/InputTag/index.js +4 -2
  47. package/dist/Loading/Loading-DiywS7ex.js +19 -0
  48. package/dist/Loading/index.js +4 -2
  49. package/dist/Modal/index.js +1 -1
  50. package/dist/NotFoundContent/index.js +1 -1
  51. package/dist/Radio/{Radio-DSoZotcs.js → Radio-CX9cUqb7.js} +12 -12
  52. package/dist/Radio/index.js +2 -2
  53. package/dist/ScrollBar/index.js +1 -1
  54. package/dist/Segmented/index.js +1 -1
  55. package/dist/Select/{Select-DujgkkUp.js → Select-D6EK7whJ.js} +195 -194
  56. package/dist/Select/{SelectInputSearch-Bikrj3FI.js → SelectInputSearch-COUzreau.js} +1 -1
  57. package/dist/Select/index.js +7 -7
  58. package/dist/Table/{Table-k9wdWm6V.js → Table-yQXQEk6d.js} +1 -1
  59. package/dist/Table/hooks/index.js +1 -1
  60. package/dist/Table/index.js +4 -4
  61. package/dist/Table/style/index.js +1 -1
  62. package/dist/Table/utils/index.js +1 -1
  63. package/dist/Tabs/Tabs-BiKW70CL.js +398 -0
  64. package/dist/Tabs/index.js +4 -2
  65. package/dist/Tooltip/index.js +1 -1
  66. package/dist/Tree/index.js +3 -3
  67. package/dist/Tree/utils/index.js +1 -1
  68. package/dist/components/DropDown/interface.d.ts +167 -169
  69. package/dist/components/Editor/LengthBadge.d.ts +6 -0
  70. package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +1 -1
  71. package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +5 -1
  72. package/dist/components/Editor/ToolbarPlugin/context/EditorToolbarThemeContext.d.ts +6 -0
  73. package/dist/components/Editor/ToolbarPlugin/interface.d.ts +30 -32
  74. package/dist/components/Editor/index.d.ts +1 -1
  75. package/dist/components/Editor/interface.d.ts +118 -60
  76. package/dist/components/Editor/plugins/MaxLengthPlugin.d.ts +7 -0
  77. package/dist/components/Editor/utils/resolveEditorToolbarThemeVars.d.ts +5 -0
  78. package/dist/components/Editor/utils/textLength.d.ts +4 -0
  79. package/dist/components/InputTag/interface.d.ts +32 -32
  80. package/dist/components/Radio/interface.d.ts +95 -97
  81. package/dist/components/Tabs/TabSelect/interface.d.ts +23 -25
  82. package/dist/components/Tabs/interface.d.ts +58 -60
  83. package/dist/components/Tree/types/node.d.ts +19 -19
  84. package/dist/components/Tree/types/tree.d.ts +81 -83
  85. package/dist/components/index.d.ts +2 -0
  86. package/dist/index.js +18 -18
  87. package/dist/locale/index.d.ts +1 -1
  88. package/dist/locale/lang/en-US.json.d.ts +177 -166
  89. package/dist/locale/lang/zh-CN.json.d.ts +177 -166
  90. package/dist/locale/lang/zh-TW.json.d.ts +177 -166
  91. package/dist/style.css +1 -1
  92. package/dist/vendors/{ConfigProvider-C3Uwzinj.js → ConfigProvider-DxrZpdIb.js} +23 -1
  93. package/dist/vendors/{LocaleContext-B1HuhJc-.js → LocaleContext-Dcw6C1LX.js} +11 -0
  94. package/dist/vendors/{Tree-DQkpLl6f.js → Tree-DXmVRDn0.js} +8 -7
  95. package/dist/vendors/{useLocale-BYtF5pxt.js → useLocale-BKZX2_zw.js} +1 -1
  96. package/dist/vendors/{version-Dkos5Cha.js → version-4HBYLKDL.js} +1 -1
  97. package/dist/vite-env.d.ts +13 -13
  98. package/dist/vitest-matchers.d.ts +0 -1
  99. package/package.json +8 -8
  100. package/dist/InputTag/InputTag-LnUqz0Hz.js +0 -143
  101. package/dist/Loading/Loading-CcTZogVx.js +0 -15
  102. package/dist/Tabs/Tabs-Ctgg45Ox.js +0 -410
@@ -1,9 +1,9 @@
1
1
  import { t as e } from "../Icon/Icon-BBDcb-yw.js";
2
- import { t } from "../vendors/useLocale-BYtF5pxt.js";
2
+ import { t } from "../vendors/useLocale-BKZX2_zw.js";
3
3
  import { n, t as r } from "../vendors/animations-rwUbyoT0.js";
4
4
  import { t as i } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
5
- import { t as a } from "./SelectInputSearch-Bikrj3FI.js";
6
- import { n as o, t as s } from "../vendors/Tree-DQkpLl6f.js";
5
+ import { t as a } from "./SelectInputSearch-COUzreau.js";
6
+ import { n as o, t as s } from "../vendors/Tree-DXmVRDn0.js";
7
7
  import { t as c } from "../CheckBox/CheckBox-nBm0u6zX.js";
8
8
  import { t as l } from "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
9
9
  import { t as u } from "../ScrollBar/ScrollBar-QhXVe8zd.js";
@@ -16,47 +16,47 @@ import A from "clsx";
16
16
  import { useControllableValue as ie, useHover as j, useToggle as ae } from "ahooks";
17
17
  import { AnimatePresence as oe, motion as M } from "motion/react";
18
18
  import { FloatingPortal as se } from "@floating-ui/react";
19
- import ce from "fuse.js";
19
+ import N from "fuse.js";
20
20
  //#region src/components/Select/constants.ts
21
- var N = /* @__PURE__ */ function(e) {
21
+ var P = /* @__PURE__ */ function(e) {
22
22
  return e.SINGLE = "single", e.MULTIPLE = "multiple", e;
23
- }({}), P = /* @__PURE__ */ function(e) {
23
+ }({}), F = /* @__PURE__ */ function(e) {
24
24
  return e[e.SINGLE = 0] = "SINGLE", e[e.MULTIPLE = 1] = "MULTIPLE", e[e.TREE = 2] = "TREE", e[e.TREE_TAGS = 3] = "TREE_TAGS", e[e.MEMBER = 4] = "MEMBER", e[e.DEPARTEMENT = 5] = "DEPARTEMENT", e;
25
- }({}), le = {
26
- [P.SINGLE]: N.SINGLE,
27
- [P.TREE]: N.SINGLE,
28
- [P.MULTIPLE]: N.MULTIPLE,
29
- [P.TREE_TAGS]: N.MULTIPLE,
30
- [P.MEMBER]: N.MULTIPLE,
31
- [P.DEPARTEMENT]: N.MULTIPLE
32
- }, ue = {
25
+ }({}), ce = {
26
+ [F.SINGLE]: P.SINGLE,
27
+ [F.TREE]: P.SINGLE,
28
+ [F.MULTIPLE]: P.MULTIPLE,
29
+ [F.TREE_TAGS]: P.MULTIPLE,
30
+ [F.MEMBER]: P.MULTIPLE,
31
+ [F.DEPARTEMENT]: P.MULTIPLE
32
+ }, le = {
33
33
  label: "label",
34
34
  value: "value",
35
35
  children: "children"
36
- }, de = x({
36
+ }, ue = x({
37
37
  value: void 0,
38
38
  setValue: g,
39
39
  isOpen: !1,
40
40
  setIsOpen: g
41
- }), fe = x({
41
+ }), de = x({
42
42
  fieldNames: {
43
43
  label: "label",
44
44
  value: "value",
45
45
  children: "children"
46
46
  },
47
47
  disabled: !1
48
- }), pe = x({}), F = () => {
49
- let e = T(de);
48
+ }), fe = x({}), I = () => {
49
+ let e = T(ue);
50
50
  if (!e) throw Error("Select.* components must be used within a SelectStateContext provider");
51
51
  return e;
52
- }, I = () => {
53
- let e = T(fe);
52
+ }, L = () => {
53
+ let e = T(de);
54
54
  if (!e) throw Error("Select.* components must be used within a SelectConfigContext provider");
55
55
  return e;
56
- }, L = () => T(pe);
56
+ }, R = () => T(fe);
57
57
  //#endregion
58
58
  //#region src/components/Select/utils/fieldAccessor.ts
59
- function R(e) {
59
+ function z(e) {
60
60
  let t = e;
61
61
  return {
62
62
  getLabel: (e) => e[t.label],
@@ -75,8 +75,8 @@ function R(e) {
75
75
  }
76
76
  //#endregion
77
77
  //#region src/components/Select/SelectInput/SelectSingleInput/SelectSingleInput.tsx
78
- var z = C((e) => {
79
- let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = I(), { isSelectedOtherOption: a, otherOptionValue: o } = L(), s = R(r), c = f(t), l;
78
+ var B = C((e) => {
79
+ let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = L(), { isSelectedOtherOption: a, otherOptionValue: o } = R(), s = z(r), c = f(t), l;
80
80
  return l = a && o && i === "inline" ? o : e.labelRender && c ? e.labelRender(c) : c ? s.getLabel(c) : "", /* @__PURE__ */ v("div", {
81
81
  className: A("bsy-select-input-container__input-value overflow-hidden"),
82
82
  style: n,
@@ -86,38 +86,38 @@ var z = C((e) => {
86
86
  })
87
87
  });
88
88
  });
89
- z.displayName = "BsySelectSingleInput";
89
+ B.displayName = "BsySelectSingleInput";
90
90
  //#endregion
91
91
  //#region src/components/Select/SelectInput/SelectMultipleInput/OptionTag/option-tag.module.scss
92
- var B = {
92
+ var V = {
93
93
  "bsy-input-tag__container": "_bsy-input-tag__container_znvs6_1",
94
94
  "bsy-input-tag__item": "_bsy-input-tag__item_znvs6_7",
95
95
  "bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_znvs6_20",
96
96
  "bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_znvs6_24"
97
- }, V = S(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ v("div", {
97
+ }, H = S(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ v("div", {
98
98
  "data-bsy-input-tag": "true",
99
99
  className: A({
100
- [B["bsy-input-tag__item"]]: !0,
101
- [B["bsy-input-tag__item--disabled"]]: n
100
+ [V["bsy-input-tag__item"]]: !0,
101
+ [V["bsy-input-tag__item--disabled"]]: n
102
102
  }),
103
103
  ref: r,
104
104
  style: t,
105
105
  children: e
106
106
  }));
107
- V.Container = (e) => /* @__PURE__ */ v("div", {
108
- className: A(B["bsy-input-tag__container"]),
107
+ H.Container = (e) => /* @__PURE__ */ v("div", {
108
+ className: A(V["bsy-input-tag__container"]),
109
109
  children: e.children
110
- }), V.displayName = "BsyOptionTag";
110
+ }), H.displayName = "BsyOptionTag";
111
111
  //#endregion
112
112
  //#region src/components/Select/SelectInput/SelectMultipleInput/select-multiple-input.module.scss
113
- var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input__measurement_layer_8pd2n_6", W = "_select_multiple_input__close_btn_8pd2n_14", G = "_select_multiple_input__tag_content_8pd2n_24", K = {
114
- select_multiple_input__container: H,
115
- select_multiple_input__measurement_layer: U,
116
- select_multiple_input__close_btn: W,
113
+ var U = "_select_multiple_input__container_8pd2n_1", W = "_select_multiple_input__measurement_layer_8pd2n_6", G = "_select_multiple_input__close_btn_8pd2n_14", K = "_select_multiple_input__tag_content_8pd2n_24", q = {
114
+ select_multiple_input__container: U,
115
+ select_multiple_input__measurement_layer: W,
116
+ select_multiple_input__close_btn: G,
117
117
  "select_multiple_input__close_btn--disabled": "_select_multiple_input__close_btn--disabled_8pd2n_21",
118
- select_multiple_input__tag_content: G
119
- }, q = 4, J = C((t) => {
120
- let { value: n, labelRender: r, tagStyle: i } = t, { setValue: a } = F(), { fieldNames: o, disabled: s } = I(), c = R(o), l = n?.length ?? 0, [u, d] = k(0), f = O(null), p = O(null);
118
+ select_multiple_input__tag_content: K
119
+ }, J = 4, Y = C((t) => {
120
+ let { value: n, labelRender: r, tagStyle: i } = t, { setValue: a } = I(), { fieldNames: o, disabled: s } = L(), c = z(o), l = n?.length ?? 0, [u, d] = k(0), f = O(null), p = O(null);
121
121
  ne(() => {
122
122
  if (!f.current) return;
123
123
  let e = new ResizeObserver((e) => {
@@ -130,7 +130,7 @@ var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input
130
130
  }
131
131
  let a = p.current?.offsetWidth || 65, o = 0, s = 0;
132
132
  for (let e = 0; e < i.length; e++) {
133
- let t = i[e].clientWidth + q, n = e < l - 1 ? a : 0;
133
+ let t = i[e].clientWidth + J, n = e < l - 1 ? a : 0;
134
134
  if (o + t + n <= r) o += t, s = e + 1;
135
135
  else break;
136
136
  }
@@ -143,25 +143,25 @@ var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input
143
143
  n.length
144
144
  ]);
145
145
  let m = l - u, h = E(m), g = /* @__PURE__ */ v("div", {
146
- className: `${K.select_multiple_input__measurement_layer} measure-list`,
147
- children: /* @__PURE__ */ y(V.Container, { children: [n?.map((t, n) => {
146
+ className: `${q.select_multiple_input__measurement_layer} measure-list`,
147
+ children: /* @__PURE__ */ y(H.Container, { children: [n?.map((t, n) => {
148
148
  let a = (t) => /* @__PURE__ */ v("div", {
149
149
  style: t,
150
- className: A(B["bsy-input-tag__item-icon"], "cursor-pointer"),
150
+ className: A(V["bsy-input-tag__item-icon"], "cursor-pointer"),
151
151
  children: /* @__PURE__ */ v(e, {
152
152
  name: "close",
153
153
  style: { fontSize: 12 },
154
- className: K.select_multiple_input__close_btn
154
+ className: q.select_multiple_input__close_btn
155
155
  })
156
156
  });
157
- return /* @__PURE__ */ y(V, {
157
+ return /* @__PURE__ */ y(H, {
158
158
  style: i,
159
159
  children: [r && r(t, a), !r && /* @__PURE__ */ y("div", {
160
- className: K.select_multiple_input__tag_content,
160
+ className: q.select_multiple_input__tag_content,
161
161
  children: [/* @__PURE__ */ v("span", { children: c.getLabel(t) }), /* @__PURE__ */ v(a, {})]
162
162
  })]
163
163
  }, n);
164
- }), u < l && h > 0 && /* @__PURE__ */ y(V, {
164
+ }), u < l && h > 0 && /* @__PURE__ */ y(H, {
165
165
  ref: p,
166
166
  children: [`+ ${m}`, /* @__PURE__ */ v("span", {
167
167
  className: "text-[#666]",
@@ -175,13 +175,13 @@ var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input
175
175
  };
176
176
  return /* @__PURE__ */ y("div", {
177
177
  ref: f,
178
- className: A("bsy-select-input-container__input-value", K.select_multiple_input__container, "multiple"),
179
- children: [g, /* @__PURE__ */ y(V.Container, { children: [n?.slice(0, u).map((t, n) => {
178
+ className: A("bsy-select-input-container__input-value", q.select_multiple_input__container, "multiple"),
179
+ children: [g, /* @__PURE__ */ y(H.Container, { children: [n?.slice(0, u).map((t, n) => {
180
180
  let a = (n) => /* @__PURE__ */ v("div", {
181
181
  style: n,
182
- className: A(B["bsy-input-tag__item-icon"], {
183
- [K.select_multiple_input__close_btn]: !s,
184
- [K.select_multiple_input__close_btn + "--disabled"]: s
182
+ className: A(V["bsy-input-tag__item-icon"], {
183
+ [q.select_multiple_input__close_btn]: !s,
184
+ [q.select_multiple_input__close_btn + "--disabled"]: s
185
185
  }),
186
186
  onClick: (e) => {
187
187
  e.stopPropagation(), _(t);
@@ -191,21 +191,21 @@ var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input
191
191
  style: { fontSize: 12 }
192
192
  })
193
193
  });
194
- return /* @__PURE__ */ y(V, {
194
+ return /* @__PURE__ */ y(H, {
195
195
  style: {
196
196
  ...i,
197
197
  flexShrink: u === 1 ? 1 : 0
198
198
  },
199
199
  disabled: s,
200
200
  children: [r && r(t, a), !r && /* @__PURE__ */ y("div", {
201
- className: K.select_multiple_input__tag_content,
201
+ className: q.select_multiple_input__tag_content,
202
202
  children: [/* @__PURE__ */ v("span", {
203
203
  className: "truncate",
204
204
  children: c.getLabel(t)
205
205
  }), /* @__PURE__ */ v(a, {})]
206
206
  })]
207
207
  }, n);
208
- }), u < l && h > 0 && /* @__PURE__ */ y(V, {
208
+ }), u < l && h > 0 && /* @__PURE__ */ y(H, {
209
209
  ref: p,
210
210
  children: [`+ ${m} `, /* @__PURE__ */ v("span", {
211
211
  className: "text-[#666]",
@@ -214,10 +214,10 @@ var H = "_select_multiple_input__container_8pd2n_1", U = "_select_multiple_input
214
214
  })] })]
215
215
  });
216
216
  });
217
- J.displayName = "BsySelectMultipleInput";
217
+ Y.displayName = "BsySelectMultipleInput";
218
218
  //#endregion
219
219
  //#region src/components/Select/utils/tree.ts
220
- var Y = (e, t) => {
220
+ var X = (e, t) => {
221
221
  let n = [], r = (e) => {
222
222
  e.forEach((e) => {
223
223
  let { [t.children]: i, ...a } = e;
@@ -225,12 +225,12 @@ var Y = (e, t) => {
225
225
  });
226
226
  };
227
227
  return r(e), n;
228
- }, me = ({ placeholder: t, mode: n, clearable: i, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: d, ghost: f, inputValueStyle: m, tagStyle: g }) => {
229
- let b = O(null), x = j(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = F(), { fieldNames: T } = I(), E = D(() => {
228
+ }, pe = ({ placeholder: t, mode: n, clearable: i, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: d, ghost: f, inputValueStyle: m, tagStyle: g }) => {
229
+ let b = O(null), x = j(o ? null : b), { isOpen: S, value: C, getCachedOptionByValue: w } = I(), { fieldNames: T } = L(), E = D(() => {
230
230
  if (h(C)) return [];
231
231
  let e = p(C) ? C : [C];
232
- if (l === P.TREE) {
233
- let t = R(T), n = Y(c, T);
232
+ if (l === F.TREE) {
233
+ let t = z(T), n = X(c, T);
234
234
  return e.map((e) => n.find((n) => t.getValue(n) === e) || w?.(e)).filter((e) => !!e);
235
235
  }
236
236
  return e.map((e) => c.find((t) => t[T.value] === e) || w?.(e)).filter((e) => !!e);
@@ -244,7 +244,7 @@ var Y = (e, t) => {
244
244
  return /* @__PURE__ */ v("div", {
245
245
  className: A("bsy-select-input-container", {
246
246
  disabled: o,
247
- multiple: n === N.MULTIPLE,
247
+ multiple: n === P.MULTIPLE,
248
248
  active: S,
249
249
  "ghost-style": f
250
250
  }),
@@ -256,11 +256,11 @@ var Y = (e, t) => {
256
256
  className: "bsy-select-input-container-input-prefix",
257
257
  children: u
258
258
  }),
259
- E?.length ? /* @__PURE__ */ y(_, { children: [n === N.SINGLE && /* @__PURE__ */ v(z, {
259
+ E?.length ? /* @__PURE__ */ y(_, { children: [n === P.SINGLE && /* @__PURE__ */ v(B, {
260
260
  value: E,
261
261
  labelRender: s,
262
262
  inputValueStyle: m
263
- }), n === N.MULTIPLE && /* @__PURE__ */ v(J, {
263
+ }), n === P.MULTIPLE && /* @__PURE__ */ v(Y, {
264
264
  value: E,
265
265
  labelRender: s,
266
266
  tagStyle: g
@@ -300,67 +300,68 @@ var Y = (e, t) => {
300
300
  })
301
301
  });
302
302
  };
303
- me.displayName = "BsySelectInput";
303
+ pe.displayName = "BsySelectInput";
304
304
  //#endregion
305
305
  //#region src/components/Select/OptionList/SingleOptionList/SingleOptionList.tsx
306
- var X = C((e) => {
307
- let { options: t, value: n, onSelect: r, searchValue: i = "", fieldNames: a, optionRender: s, optionStyle: c } = e, { otherInputPosition: l } = I(), { otherOptionValue: u, setOtherOptionValue: d, onOtherInputChange: f, isSelectedOtherOption: p = !1 } = L(), m = O(null), h = R(a);
306
+ var Z = C((e) => {
307
+ let { options: n, value: r, onSelect: i, searchValue: a = "", fieldNames: s, optionRender: c, optionStyle: l } = e, { t: u } = t(), { otherInputPosition: d } = L(), { otherOptionValue: f, setOtherOptionValue: p, onOtherInputChange: m, isSelectedOtherOption: h = !1 } = R(), g = O(null), _ = z(s);
308
308
  return /* @__PURE__ */ v("ul", {
309
309
  role: "listbox",
310
- children: t.map((e, t) => {
311
- let a = h.getValue(e), g = h.getLabel(e), _ = e.systemField || !1, b = e.isOther === !0, x = e.disabled === !0, S = b && l === "inline" && g.length > 6 ? g.slice(0, 6) + "..." : g, C = b ? p : a === n;
310
+ children: n.map((e, t) => {
311
+ let n = _.getValue(e), s = _.getLabel(e), b = e.systemField || !1, x = e.isOther === !0, S = e.disabled === !0, C = x && d === "inline" && s.length > 6 ? s.slice(0, 6) + "..." : s, w = x ? h : n === r;
312
312
  return /* @__PURE__ */ y("li", {
313
313
  role: "option",
314
- "aria-selected": C,
315
- "aria-disabled": x,
314
+ "aria-selected": w,
315
+ "aria-disabled": S,
316
316
  className: A("rounded-[4px] py-[7px] px-[10px] min-h-[34px]", {
317
- "cursor-pointer": !x,
318
- "cursor-not-allowed text-[#999] bg-transparent": x,
319
- "hover:bg-[#eff0f6]": !x && !C,
320
- "text-[#4d609f]": !x && _ && !C,
321
- "text-[#0265ff] bg-[#f0f6ff]": !x && C,
322
- "flex items-center": b && l === "inline"
317
+ "cursor-pointer": !S,
318
+ "cursor-not-allowed text-[#999] bg-transparent": S,
319
+ "hover:bg-[#eff0f6]": !S && !w,
320
+ "text-[#4d609f]": !S && b && !w,
321
+ "text-[#0265ff] bg-[#f0f6ff]": !S && w,
322
+ "flex items-center": x && d === "inline"
323
323
  }),
324
- style: c,
324
+ style: l,
325
325
  onClick: () => {
326
- x || r(a, e);
326
+ S || i(n, e);
327
327
  },
328
328
  children: [/* @__PURE__ */ v("div", {
329
- title: g,
330
- children: s ? s(e, { index: t }, C) : /* @__PURE__ */ v(o, {
331
- text: S,
332
- highlight: i
329
+ title: s,
330
+ children: c ? c(e, { index: t }, w) : /* @__PURE__ */ v(o, {
331
+ text: C,
332
+ highlight: a
333
333
  })
334
- }), b && l === "inline" && /* @__PURE__ */ v("div", {
334
+ }), x && d === "inline" && /* @__PURE__ */ v("div", {
335
335
  className: "ml-2 flex-1",
336
336
  onClick: (e) => e.stopPropagation(),
337
337
  style: { minWidth: "146px" },
338
338
  children: /* @__PURE__ */ v(re, {
339
- ref: m,
340
- value: u,
341
- disabled: x,
339
+ ref: g,
340
+ value: f,
341
+ disabled: S,
342
342
  onChange: (e) => {
343
343
  let t = e.target.value;
344
- d?.(t), f?.(t);
344
+ p?.(t), m?.(t);
345
345
  },
346
346
  onPressEnter: () => {
347
- !x && u && r(a, e);
347
+ !S && f && i(n, e);
348
348
  },
349
349
  onBlur: () => {
350
- !x && u && r(a, e);
350
+ !S && f && i(n, e);
351
351
  },
352
- placeholder: "请输入内容"
352
+ placeholder: u("context"),
353
+ "aria-label": u("otherOptionInput")
353
354
  })
354
355
  })]
355
- }, `${a}-${t}`);
356
+ }, `${n}-${t}`);
356
357
  })
357
358
  });
358
359
  });
359
- X.displayName = "BsySingleSelect";
360
+ Z.displayName = "BsySingleSelect";
360
361
  //#endregion
361
362
  //#region src/components/Select/OptionList/MultOptionList/MultOptionList.tsx
362
- var Z = (e) => {
363
- let { t: n } = t(), { options: r, searchValue: i = "", value: a, onSelect: s, fieldNames: l, optionRender: u } = e, d = R(l), f = a || [], p = r.filter((e) => !e.isOther), m = p.filter((e) => !e.disabled), h = m.map((e) => d.getValue(e)), g = m.length > 0 && m.every((e) => f.includes(d.getValue(e)));
363
+ var Q = (e) => {
364
+ let { t: n } = t(), { options: r, searchValue: i = "", value: a, onSelect: s, fieldNames: l, optionRender: u } = e, d = z(l), f = a || [], p = r.filter((e) => !e.isOther), m = p.filter((e) => !e.disabled), h = m.map((e) => d.getValue(e)), g = m.length > 0 && m.every((e) => f.includes(d.getValue(e)));
364
365
  return /* @__PURE__ */ v("div", {
365
366
  className: "bsy-multiple-select",
366
367
  children: /* @__PURE__ */ y("ul", {
@@ -411,10 +412,10 @@ var Z = (e) => {
411
412
  })
412
413
  });
413
414
  };
414
- Z.displayName = "BsyMultipleSelect";
415
+ Q.displayName = "BsyMultipleSelect";
415
416
  //#endregion
416
417
  //#region src/components/Select/OptionList/TreeOptionList/TreeOptionList.tsx
417
- var he = (e) => {
418
+ var me = (e) => {
418
419
  let { options: t, searchValue: n, value: r, onSelect: i, fieldNames: a } = e;
419
420
  return /* @__PURE__ */ v("div", {
420
421
  className: "bsy-tree-select",
@@ -433,13 +434,13 @@ var he = (e) => {
433
434
  })
434
435
  })
435
436
  });
436
- }, ge = (e, t) => {
437
+ }, he = (e, t) => {
437
438
  let n = [], r = (e) => {
438
439
  if (e) for (let i of e) n.push(i), r(i[t.children]);
439
440
  };
440
441
  return r(e), n;
441
- }, Q = (e, t, n) => e.reduce((e, r) => {
442
- let i = r[n.children] ? Q(r[n.children], t, n) : void 0;
442
+ }, $ = (e, t, n) => e.reduce((e, r) => {
443
+ let i = r[n.children] ? $(r[n.children], t, n) : void 0;
443
444
  if (t.has(r[n.value]) || i && i.length > 0) {
444
445
  let a = t.has(r[n.value]) ? r[n.children] : i;
445
446
  e.push({
@@ -448,12 +449,12 @@ var he = (e) => {
448
449
  });
449
450
  }
450
451
  return e;
451
- }, []), $ = (e) => {
452
- let { options: n = [], searchValue: r = "", type: i, filterOption: a, optionRender: o, optionStyle: s, notFoundContent: c } = e, { t: u } = t(), { value: d, setIsOpen: f, setValue: p } = F(), { fieldNames: h } = I(), g = D(() => i === P.TREE ? ge(n, h) : n, [
452
+ }, []), ge = (e) => {
453
+ let { options: n = [], searchValue: r = "", type: i, filterOption: a, optionRender: o, optionStyle: s, notFoundContent: c } = e, { t: u } = t(), { value: d, setIsOpen: f, setValue: p } = I(), { fieldNames: h } = L(), g = D(() => i === F.TREE ? he(n, h) : n, [
453
454
  n,
454
455
  h,
455
456
  i
456
- ]), y = D(() => new ce(g, {
457
+ ]), y = D(() => new N(g, {
457
458
  keys: [h.label],
458
459
  ignoreLocation: !0,
459
460
  threshold: .3
@@ -466,7 +467,7 @@ var he = (e) => {
466
467
  }, [f, p]), C = () => {
467
468
  if (!a || m(r)) return n;
468
469
  let e = y.search(r), t = new Set(e.map((e) => e.item[h.value]));
469
- return i === P.TREE ? Q(n, t, h) : n.filter((e) => t.has(e[h.value]));
470
+ return i === F.TREE ? $(n, t, h) : n.filter((e) => t.has(e[h.value]));
470
471
  };
471
472
  return /* @__PURE__ */ v(_, { children: (() => {
472
473
  let e = {
@@ -476,21 +477,21 @@ var he = (e) => {
476
477
  };
477
478
  if (!m(r) && e.options.length === 0) return c === void 0 ? /* @__PURE__ */ v(l, { text: u("noDataFound") }) : c;
478
479
  switch (i) {
479
- case P.SINGLE: return /* @__PURE__ */ v(X, {
480
+ case F.SINGLE: return /* @__PURE__ */ v(Z, {
480
481
  ...e,
481
482
  value: d,
482
483
  fieldNames: h,
483
484
  onSelect: b,
484
485
  optionRender: o
485
486
  });
486
- case P.MULTIPLE: return /* @__PURE__ */ v(Z, {
487
+ case F.MULTIPLE: return /* @__PURE__ */ v(Q, {
487
488
  ...e,
488
489
  value: d,
489
490
  fieldNames: h,
490
491
  onSelect: x,
491
492
  optionRender: o
492
493
  });
493
- case P.TREE: return /* @__PURE__ */ v(he, {
494
+ case F.TREE: return /* @__PURE__ */ v(me, {
494
495
  ...e,
495
496
  value: d,
496
497
  fieldNames: h,
@@ -500,9 +501,9 @@ var he = (e) => {
500
501
  }
501
502
  })() });
502
503
  }, _e = (e) => {
503
- let { options: n = [], type: r = P.SINGLE, filterOption: i = !0, onSearch: o, showSearch: s, searchPlaceholder: c, onPopupScroll: d, notFoundContent: f } = e, { t: p } = t(), { searchValue: m = "", setSearchValue: h } = F(), g = E(m), _ = (e) => {
504
+ let { options: n = [], type: r = F.SINGLE, filterOption: i = !0, onSearch: o, showSearch: s, searchPlaceholder: c, onPopupScroll: d, notFoundContent: f } = e, { t: p } = t(), { searchValue: m = "", setSearchValue: h } = I(), g = E(m), _ = (e) => {
504
505
  h?.(e), o?.(e);
505
- }, x = () => e.fetching ? /* @__PURE__ */ v(l, { text: p("dataSearching") }) : n.length === 0 && !m ? f === void 0 ? /* @__PURE__ */ v(l, { text: p("noData") }) : f : /* @__PURE__ */ v($, {
506
+ }, x = () => e.fetching ? /* @__PURE__ */ v(l, { text: p("dataSearching") }) : n.length === 0 && !m ? f === void 0 ? /* @__PURE__ */ v(l, { text: p("noData") }) : f : /* @__PURE__ */ v(ge, {
506
507
  searchValue: g,
507
508
  options: n,
508
509
  type: r,
@@ -533,49 +534,49 @@ _e.displayName = "BsySelectPanel";
533
534
  //#endregion
534
535
  //#region src/components/Select/Select.tsx
535
536
  var ve = S((e, r) => {
536
- let { options: a = [], type: o = P.SINGLE, fieldNames: s, clearable: c = !0, disabled: l = !1, placeholder: u, labelRender: f, onOtherInputChange: p, onOpenChange: m, onPopupScroll: h, prefix: g, suffixIcon: _, ghost: b, inputValueStyle: x, tagStyle: S, zIndex: C = 1101, zIndexMask: T = 1100, otherInputPosition: E = "bottom", popupMinWidth: ne, getPopupContainer: re } = e, j = le[o], { t: ce } = t(), F = ee(), { onChange: I } = e, L = s || ue, [R, z] = ie(e, {
537
- defaultValue: j === N.SINGLE ? void 0 : [],
537
+ let { options: a = [], type: o = F.SINGLE, fieldNames: s, clearable: c = !0, disabled: l = !1, placeholder: u, labelRender: f, onOtherInputChange: p, onOpenChange: m, onPopupScroll: h, prefix: g, suffixIcon: _, ghost: b, inputValueStyle: x, tagStyle: S, zIndex: C = 1101, zIndexMask: T = 1100, otherInputPosition: E = "bottom", popupMinWidth: ne, getPopupContainer: re } = e, j = ce[o], { t: N } = t(), I = ee(), { onChange: L } = e, R = s || le, [z, B] = ie(e, {
538
+ defaultValue: j === P.SINGLE ? void 0 : [],
538
539
  defaultValuePropName: "defaultValue",
539
540
  valuePropName: "value",
540
541
  trigger: "__NO_CUSTOM_CHANGE__"
541
- }), [B, V] = k(""), H = O(/* @__PURE__ */ new Map()), [U, W] = k(() => {
542
- if (j === N.SINGLE) {
543
- let e = a.every((e) => e[L.value] !== R), t = a.find((e) => e.isOther === !0);
544
- return e && t ? R : void 0;
542
+ }), [V, H] = k(""), U = O(/* @__PURE__ */ new Map()), [W, G] = k(() => {
543
+ if (j === P.SINGLE) {
544
+ let e = a.every((e) => e[R.value] !== z), t = a.find((e) => e.isOther === !0);
545
+ return e && t ? z : void 0;
545
546
  }
546
- }), G = w((e, t) => {
547
- if (z(e), t) {
547
+ }), K = w((e, t) => {
548
+ if (B(e), t) {
548
549
  let n = /* @__PURE__ */ new Map();
549
550
  if (Array.isArray(e)) {
550
551
  let r = Array.isArray(t) ? t : [];
551
552
  e.forEach((e) => {
552
- let t = r.find((t) => t?.[L.value] === e);
553
+ let t = r.find((t) => t?.[R.value] === e);
553
554
  e !== null && t && n.set(e, t);
554
555
  });
555
556
  } else e !== null && !Array.isArray(t) && n.set(e, t);
556
- H.current = n;
557
+ U.current = n;
557
558
  }
558
- I && I(e, t);
559
+ L && L(e, t);
559
560
  }, [
560
- I,
561
- z,
562
- L
563
- ]), [K, { set: q }] = ae(!1), J = w((e) => {
564
- e !== K && (q(e), m?.(e));
561
+ L,
562
+ B,
563
+ R
564
+ ]), [q, { set: J }] = ae(!1), Y = w((e) => {
565
+ e !== q && (J(e), m?.(e));
565
566
  }, [
566
- q,
567
+ J,
567
568
  m,
568
- K
569
- ]), { isSelectedOtherOption: Y, shouldShowOtherInput: X } = D(() => {
570
- if (j === N.MULTIPLE) return {
569
+ q
570
+ ]), { isSelectedOtherOption: X, shouldShowOtherInput: Z } = D(() => {
571
+ if (j === P.MULTIPLE) return {
571
572
  isSelectedOtherOption: !1,
572
573
  shouldShowOtherInput: !1
573
574
  };
574
- let e = a.find((e) => e[L.value] === R);
575
+ let e = a.find((e) => e[R.value] === z);
575
576
  return e ? {
576
577
  isSelectedOtherOption: e.isOther === !0,
577
578
  shouldShowOtherInput: e.isOther === !0
578
- } : a.find((e) => e.isOther === !0) && R ? {
579
+ } : a.find((e) => e.isOther === !0) && z ? {
579
580
  isSelectedOtherOption: !0,
580
581
  shouldShowOtherInput: !0
581
582
  } : {
@@ -583,59 +584,59 @@ var ve = S((e, r) => {
583
584
  shouldShowOtherInput: !1
584
585
  };
585
586
  }, [
586
- R,
587
+ z,
587
588
  a,
588
- L,
589
+ R,
589
590
  j
590
- ]), Z = w(() => {
591
- if (R) {
592
- if (j === N.SINGLE) {
593
- let e = a.every((e) => e[L.value] !== R), t = a.find((e) => e.isOther === !0);
594
- if (e && t) return t[L.value];
591
+ ]), Q = w(() => {
592
+ if (z) {
593
+ if (j === P.SINGLE) {
594
+ let e = a.every((e) => e[R.value] !== z), t = a.find((e) => e.isOther === !0);
595
+ if (e && t) return t[R.value];
595
596
  }
596
- return R;
597
- } else return R;
597
+ return z;
598
+ } else return z;
598
599
  }, [
599
- R,
600
+ z,
600
601
  a,
601
- L,
602
+ R,
602
603
  j
603
- ]), he = D(() => ({
604
- value: Z(),
605
- setValue: G,
606
- isOpen: K,
607
- setIsOpen: J,
608
- getCachedOptionByValue: (e) => H.current.get(e),
609
- searchValue: B,
610
- setSearchValue: V
604
+ ]), me = D(() => ({
605
+ value: Q(),
606
+ setValue: K,
607
+ isOpen: q,
608
+ setIsOpen: Y,
609
+ getCachedOptionByValue: (e) => U.current.get(e),
610
+ searchValue: V,
611
+ setSearchValue: H
611
612
  }), [
612
- Z,
613
- G,
613
+ Q,
614
614
  K,
615
- J,
616
- B
617
- ]), ge = D(() => ({
618
- fieldNames: s || ue,
615
+ q,
616
+ Y,
617
+ V
618
+ ]), he = D(() => ({
619
+ fieldNames: s || le,
619
620
  disabled: l,
620
621
  otherInputPosition: E
621
622
  }), [
622
623
  s,
623
624
  l,
624
625
  E
625
- ]), Q = D(() => ({
626
- isSelectedOtherOption: Y,
627
- otherOptionValue: U,
628
- setOtherOptionValue: W,
626
+ ]), $ = D(() => ({
627
+ isSelectedOtherOption: X,
628
+ otherOptionValue: W,
629
+ setOtherOptionValue: G,
629
630
  onOtherInputChange: p
630
631
  }), [
631
- Y,
632
- U,
632
+ X,
633
633
  W,
634
+ G,
634
635
  p
635
- ]), { refs: $, floatingStyles: ve, getReferenceProps: ye, getFloatingProps: be, referenceStyle: xe } = d({
636
- isOpen: K,
636
+ ]), { refs: ge, floatingStyles: ve, getReferenceProps: ye, getFloatingProps: be, referenceStyle: xe } = d({
637
+ isOpen: q,
637
638
  close: () => {
638
- J(!1);
639
+ Y(!1);
639
640
  },
640
641
  showMask: e.showMask,
641
642
  zIndex: C,
@@ -645,48 +646,48 @@ var ve = S((e, r) => {
645
646
  x: 0,
646
647
  y: 4
647
648
  }
648
- }), { portalRoot: Se, portalMountKey: Ce, handleExitComplete: we } = i(K, re), Te = w(() => {
649
- Y && (W(""), p?.("")), J(!1), H.current.clear(), G(j === N.SINGLE ? void 0 : []);
649
+ }), { portalRoot: Se, portalMountKey: Ce, handleExitComplete: we } = i(q, re), Te = w(() => {
650
+ X && (G(""), p?.("")), Y(!1), U.current.clear(), K(j === P.SINGLE ? void 0 : []);
650
651
  }, [
651
- Y,
652
+ X,
652
653
  p,
653
- G,
654
+ K,
654
655
  j,
655
- J
656
+ Y
656
657
  ]);
657
658
  return te(r, () => ({
658
- getOtherOptionValue: () => U,
659
+ getOtherOptionValue: () => W,
659
660
  setOtherOptionValue: (e) => {
660
- W(e), p?.(e);
661
+ G(e), p?.(e);
661
662
  }
662
- }), [U, p]), /* @__PURE__ */ v(de.Provider, {
663
- value: he,
664
- children: /* @__PURE__ */ v(fe.Provider, {
665
- value: ge,
666
- children: /* @__PURE__ */ v(pe.Provider, {
667
- value: Q,
663
+ }), [W, p]), /* @__PURE__ */ v(ue.Provider, {
664
+ value: me,
665
+ children: /* @__PURE__ */ v(de.Provider, {
666
+ value: he,
667
+ children: /* @__PURE__ */ v(fe.Provider, {
668
+ value: $,
668
669
  children: /* @__PURE__ */ y("div", {
669
670
  className: A("bsy-select-container text-sm", e.className),
670
671
  style: e.style,
671
672
  children: [
672
673
  /* @__PURE__ */ v("div", {
673
- ref: $.setReference,
674
+ ref: ge.setReference,
674
675
  className: A("bsy-select-input-event", e.inputClassName),
675
676
  ...ye(),
676
677
  style: xe,
677
678
  onClick: () => {
678
- e.disabled || J(!0);
679
+ e.disabled || Y(!q);
679
680
  },
680
681
  role: "combobox",
681
- "aria-expanded": K,
682
+ "aria-expanded": q,
682
683
  "aria-haspopup": "listbox",
683
- "aria-controls": F,
684
+ "aria-controls": I,
684
685
  "aria-disabled": l,
685
- children: /* @__PURE__ */ v(me, {
686
+ children: /* @__PURE__ */ v(pe, {
686
687
  mode: j,
687
688
  clearable: c,
688
689
  disabled: l,
689
- placeholder: u || ce("select"),
690
+ placeholder: u || N("select"),
690
691
  labelRender: f,
691
692
  options: a,
692
693
  type: o,
@@ -700,16 +701,16 @@ var ve = S((e, r) => {
700
701
  }),
701
702
  /* @__PURE__ */ y(se, {
702
703
  root: Se,
703
- children: [K && e.showMask ? /* @__PURE__ */ v("div", {
704
+ children: [q && e.showMask ? /* @__PURE__ */ v("div", {
704
705
  className: "bsy-select-mask",
705
706
  style: { zIndex: T }
706
707
  }) : null, /* @__PURE__ */ v(oe, {
707
708
  onExitComplete: we,
708
- children: K ? /* @__PURE__ */ v(M.div, {
709
- ref: $.setFloating,
709
+ children: q ? /* @__PURE__ */ v(M.div, {
710
+ ref: ge.setFloating,
710
711
  style: ve,
711
712
  ...be(),
712
- id: F,
713
+ id: I,
713
714
  ...n,
714
715
  children: /* @__PURE__ */ v(_e, {
715
716
  ...e,
@@ -719,16 +720,16 @@ var ve = S((e, r) => {
719
720
  }, "bsy-select-panel") : null
720
721
  })]
721
722
  }, Ce),
722
- X && E === "bottom" ? e.otherOptionRender ? e.otherOptionRender(U, a) : /* @__PURE__ */ v("div", {
723
+ Z && E === "bottom" ? e.otherOptionRender ? e.otherOptionRender(W, a) : /* @__PURE__ */ v("div", {
723
724
  className: A("mt-[6px] w-full px-[10px] py-[7px] bg-white rounded-[4px]", "border border-[#e0e0e0]"),
724
725
  children: /* @__PURE__ */ v("input", {
725
- value: U || "",
726
+ value: W || "",
726
727
  onChange: (e) => {
727
- W(e.target.value), p?.(e.target.value);
728
+ G(e.target.value), p?.(e.target.value);
728
729
  },
729
730
  className: "w-full outline-none border-none placeholder:text-[#999]",
730
- placeholder: ce("context"),
731
- "aria-label": "其他选项输入框",
731
+ placeholder: N("context"),
732
+ "aria-label": N("otherOptionInput"),
732
733
  role: "textbox"
733
734
  })
734
735
  }) : null
@@ -740,4 +741,4 @@ var ve = S((e, r) => {
740
741
  });
741
742
  ve.displayName = "BsySelect";
742
743
  //#endregion
743
- export { N as n, P as r, ve as t };
744
+ export { P as n, F as r, ve as t };