@baishuyun/ui-base 6.16.1 → 6.17.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 (139) hide show
  1. package/dist/Amap/Amap-CNsoge6e.js +826 -0
  2. package/dist/Amap/index.js +3 -10
  3. package/dist/Calendar/Calendar-BlsUX2vX.js +1608 -0
  4. package/dist/Calendar/index.js +10 -20
  5. package/dist/Card/index.js +2 -2
  6. package/dist/CheckBox/{CheckBox-B92dxWNo.js → CheckBox-CM24-quL.js} +1 -1
  7. package/dist/CheckBox/index.js +3 -3
  8. package/dist/ColorPicker/{ColorPicker-CPr5j6ZN.js → ColorPicker-B_wLqurt.js} +5 -5
  9. package/dist/ColorPicker/index.js +5 -5
  10. package/dist/ConfigProvider/index.js +1 -1
  11. package/dist/DatePicker/DatePicker-BRwPZeui.js +111 -0
  12. package/dist/DatePicker/{DatePickerPanel-CtLwYPmz.js → DatePickerPanel-UwjSXS-U.js} +3 -4
  13. package/dist/DatePicker/index.js +6 -8
  14. package/dist/DatePicker/pickerLocale-Brf7_Tnd.js +30 -0
  15. package/dist/DropDown/{DropDown-Bi0TsCc_.js → DropDown-B_szM67V.js} +86 -82
  16. package/dist/DropDown/index.js +8 -9
  17. package/dist/Editor/index.js +2825 -871
  18. package/dist/Gantt/index.js +3055 -197
  19. package/dist/Icon/index.js +1 -1
  20. package/dist/InputTag/{InputTag-BfZycXw4.js → InputTag-C_5nm0eo.js} +2 -2
  21. package/dist/InputTag/index.js +4 -4
  22. package/dist/Loading/{Loading-DpbJSRYf.js → Loading-Cherk9Ax.js} +1 -1
  23. package/dist/Loading/index.js +3 -3
  24. package/dist/Modal/index.js +2 -2
  25. package/dist/NotFoundContent/index.js +2 -2
  26. package/dist/Overlay/index.js +1 -1
  27. package/dist/Radio/index.js +2 -2
  28. package/dist/ScrollBar/{ScrollBar-N2pOLv-8.js → ScrollBar-IMTuAOF5.js} +1 -1
  29. package/dist/ScrollBar/index.js +2 -2
  30. package/dist/Segmented/{Segmented-BCQRrc65.js → Segmented-DpmwFerw.js} +1 -1
  31. package/dist/Segmented/index.js +2 -2
  32. package/dist/Select/{Select-CB5FqBui.js → Select-VIy6OKEj.js} +257 -253
  33. package/dist/Select/{SelectInputSearch-DUAv2vE4.js → SelectInputSearch-MApQHnU9.js} +1 -1
  34. package/dist/Select/index.js +12 -13
  35. package/dist/Table/Table-8ac6xLZv.js +808 -0
  36. package/dist/Table/index.js +4 -8
  37. package/dist/Tabs/{Tabs-B9uCGlxM.js → Tabs-DnoZ8BO0.js} +3 -3
  38. package/dist/Tabs/index.js +4 -4
  39. package/dist/Tooltip/{Tooltip-nJU13gX4.js → Tooltip-DBrt3t2r.js} +3 -3
  40. package/dist/Tooltip/index.js +3 -3
  41. package/dist/Tree/index.js +4 -4
  42. package/dist/components/Editor/EditorHtmlPreview.d.ts +3 -0
  43. package/dist/components/Editor/Preview/HtmlPreview.d.ts +2 -3
  44. package/dist/components/Editor/__tests__/createTestEditor.d.ts +1 -0
  45. package/dist/components/Editor/constants/portableEditorStyles.d.ts +2 -0
  46. package/dist/components/Editor/hooks/useEditorFocus.d.ts +1 -0
  47. package/dist/components/Editor/hooks/useTextFormatsState.d.ts +1 -2
  48. package/dist/components/Editor/index.d.ts +1 -0
  49. package/dist/components/Editor/nodes/ExtendedLinkNode.d.ts +9 -0
  50. package/dist/components/Editor/utils/getToolbarItems.d.ts +14 -0
  51. package/dist/components/Editor/utils/placeProgrammaticCaret.d.ts +5 -0
  52. package/dist/components/Editor/utils/readTextFormats.d.ts +6 -0
  53. package/dist/components/Editor/utils/retainCodeSelection.d.ts +3 -0
  54. package/dist/index.js +28 -50
  55. package/dist/style.css +1 -1
  56. package/dist/vendors/Tree-D0Q1IZ2D.js +267 -0
  57. package/dist/vendors/{version-Dzs4mguZ.js → version-CfjNx5v2.js} +1 -1
  58. package/package.json +1 -1
  59. package/dist/Amap/Amap-BLSziesG.js +0 -77
  60. package/dist/Amap/AmapCircle/index.js +0 -5
  61. package/dist/Amap/AmapCircle-2qupysHe.js +0 -55
  62. package/dist/Amap/AmapContext-CJBe6lld.js +0 -11
  63. package/dist/Amap/AmapMarker/index.js +0 -6
  64. package/dist/Amap/AmapMarker-xEqoVnFR.js +0 -153
  65. package/dist/Amap/AmapMarkerCluster/index.js +0 -6
  66. package/dist/Amap/AmapMarkerCluster-CvEQa3o9.js +0 -240
  67. package/dist/Amap/AmapProvider/index.js +0 -7
  68. package/dist/Amap/AmapProvider-B-R2DrkJ.js +0 -107
  69. package/dist/Amap/hooks/index.js +0 -4
  70. package/dist/Amap/hooks-BTcFpdd0.js +0 -121
  71. package/dist/Amap/useMarkerInfoWindowController-Cjx0xQXw.js +0 -94
  72. package/dist/Calendar/AllDaySection-pO7suGJM.js +0 -53
  73. package/dist/Calendar/Calendar-Cjagi7mU.js +0 -795
  74. package/dist/Calendar/CurrentTimeIndicator-BF3_INSL.js +0 -65
  75. package/dist/Calendar/EventCard-DKEZQRTp.js +0 -155
  76. package/dist/Calendar/TimeAxis-DUc6EL-j.js +0 -13
  77. package/dist/Calendar/TimeGrid-BV8x9VnF.js +0 -47
  78. package/dist/Calendar/colorUtils-BbeSMnOs.js +0 -55
  79. package/dist/Calendar/context/index.js +0 -3
  80. package/dist/Calendar/context-CamSpkj3.js +0 -21
  81. package/dist/Calendar/layout-CpOabFQ2.js +0 -300
  82. package/dist/Calendar/subcomponents/AllDaySection/index.js +0 -11
  83. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +0 -8
  84. package/dist/Calendar/subcomponents/EventCard/index.js +0 -9
  85. package/dist/Calendar/subcomponents/TimeAxis/index.js +0 -5
  86. package/dist/Calendar/subcomponents/TimeGrid/index.js +0 -7
  87. package/dist/Calendar/theme-Dc8hjcdo.js +0 -71
  88. package/dist/Calendar/utils/index.js +0 -111
  89. package/dist/Calendar/utils/layout/index.js +0 -4
  90. package/dist/Calendar/utils/theme/index.js +0 -3
  91. package/dist/DatePicker/DatePicker-neAwNSsc.js +0 -101
  92. package/dist/DatePicker/ensureDayjsPlugins-CSqhjLS7.js +0 -15
  93. package/dist/DatePicker/pickerLocale-CcPLUbZO.js +0 -15
  94. package/dist/DatePicker/style/index.js +0 -3
  95. package/dist/DatePicker/style-W7f5wyUb.js +0 -15
  96. package/dist/DropDown/style/index.js +0 -3
  97. package/dist/DropDown/style-DZpkarne.js +0 -9
  98. package/dist/Editor/Buttons-OwLs5bxR.js +0 -1841
  99. package/dist/Editor/ToolbarPlugin/Buttons/index.js +0 -21
  100. package/dist/Editor/constants/index.js +0 -61
  101. package/dist/Gantt/GanttChart/index.js +0 -21
  102. package/dist/Gantt/GanttChart-CDnF5qcc.js +0 -2292
  103. package/dist/Gantt/GanttHighlightContext-dtyoq-oj.js +0 -12
  104. package/dist/Gantt/GanttTable/index.js +0 -13
  105. package/dist/Gantt/GanttTable-fOv1Zn2-.js +0 -84
  106. package/dist/Gantt/GanttToolBar/index.js +0 -17
  107. package/dist/Gantt/GanttToolBar-BAoiWAHI.js +0 -120
  108. package/dist/Gantt/collapseKeys-BV_8sIA-.js +0 -160
  109. package/dist/Gantt/columnResize-Bkenlbab.js +0 -46
  110. package/dist/Gantt/constants-mEGQ1U1Q.js +0 -39
  111. package/dist/Gantt/highlightTarget-D3Nf9_7S.js +0 -25
  112. package/dist/Gantt/theme-B7Iap-tZ.js +0 -31
  113. package/dist/Gantt/timelineViewConfig-DNt7yi83.js +0 -118
  114. package/dist/Gantt/utils/index.js +0 -7
  115. package/dist/Gantt/utils/theme/index.js +0 -3
  116. package/dist/Select/style/index.js +0 -3
  117. package/dist/Select/style-C4A8kUd1.js +0 -9
  118. package/dist/Table/Table-3LSO0xSH.js +0 -545
  119. package/dist/Table/constants-D7wLH8Qy.js +0 -25
  120. package/dist/Table/hooks/index.js +0 -3
  121. package/dist/Table/hooks-DSBl2e4O.js +0 -108
  122. package/dist/Table/processRowspan-B6HMqw0Q.js +0 -144
  123. package/dist/Table/style/index.js +0 -3
  124. package/dist/Table/style-B8Cw8HJe.js +0 -9
  125. package/dist/Table/utils/index.js +0 -3
  126. package/dist/Tree/utils/index.js +0 -26
  127. package/dist/vendors/Tree-DSl4lDjx.js +0 -248
  128. /package/dist/Card/{Card-rJeWgxu5.js → Card-DAz0dvA3.js} +0 -0
  129. /package/dist/CheckBox/{CheckBox-DOK5N7z6.js → CheckBox-CcHskTz_.js} +0 -0
  130. /package/dist/Modal/{Modal-CRKitOOj.js → Modal-eZijJ7CB.js} +0 -0
  131. /package/dist/NotFoundContent/{NotFoundContent-BLmzWNBi.js → NotFoundContent-DJUQ0_2D.js} +0 -0
  132. /package/dist/Radio/{Radio-CX9cUqb7.js → Radio-D9jhW7K6.js} +0 -0
  133. /package/dist/vendors/{animations-Dn_5xJ7B.js → animations-ISccYUE3.js} +0 -0
  134. /package/dist/vendors/{cssVars-l4-kP_14.js → cssVars-UpriQzph.js} +0 -0
  135. /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-mEH9TBYV.js} +0 -0
  136. /package/dist/vendors/{useFloatingOverlay-B3M9k8nj.js → useFloatingOverlay-B66lOL8v.js} +0 -0
  137. /package/dist/vendors/{useFloatingPortal-VpzL-EPh.js → useFloatingPortal-DJ1iKmW-.js} +0 -0
  138. /package/dist/vendors/{useLatchedPopupPortalRoot-4fVhqVT4.js → useLatchedPopupPortalRoot-CC6af8t-.js} +0 -0
  139. /package/dist/vendors/{useLocale-D31qCCff.js → useLocale-Be4e7Xfn.js} +0 -0
@@ -1,64 +1,64 @@
1
1
  import { t as e } from "../Icon/Icon-DrdQOEJE.js";
2
2
  import { a as t, i as n } from "../Overlay/OverlayContext-CVSFoyqN.js";
3
- import { t as r } from "../vendors/useLocale-D31qCCff.js";
4
- import { n as i, r as a } from "../vendors/animations-Dn_5xJ7B.js";
5
- import { t as o } from "../vendors/useLatchedPopupPortalRoot-4fVhqVT4.js";
6
- import { t as s } from "./SelectInputSearch-DUAv2vE4.js";
7
- import { n as c, t as l } from "../vendors/Tree-DSl4lDjx.js";
8
- import { t as u } from "../CheckBox/CheckBox-B92dxWNo.js";
9
- import { t as d } from "../NotFoundContent/NotFoundContent-BLmzWNBi.js";
10
- import { t as f } from "../ScrollBar/ScrollBar-N2pOLv-8.js";
11
- import { t as p } from "../vendors/useFloatingPortal-VpzL-EPh.js";
12
- import { t as m } from "./style-C4A8kUd1.js";
3
+ import { t as r } from "../vendors/useLocale-Be4e7Xfn.js";
4
+ import { n as i, r as a } from "../vendors/animations-ISccYUE3.js";
5
+ import { t as o } from "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
6
+ import { t as s } from "../vendors/cssVars-UpriQzph.js";
7
+ import { t as c } from "./SelectInputSearch-MApQHnU9.js";
8
+ import { n as l, t as u } from "../vendors/Tree-D0Q1IZ2D.js";
9
+ import { t as d } from "../CheckBox/CheckBox-CM24-quL.js";
10
+ import { t as f } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
11
+ import { t as p } from "../ScrollBar/ScrollBar-IMTuAOF5.js";
12
+ import { t as m } from "../vendors/useFloatingPortal-DJ1iKmW-.js";
13
13
  import { first as h, isArray as g, isEmpty as _, isNil as v, noop as y } from "lodash-es";
14
14
  import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
15
- import { Suspense as C, createContext as w, forwardRef as T, memo as E, useCallback as D, useContext as O, useDeferredValue as k, useId as ee, useImperativeHandle as te, useLayoutEffect as ne, useMemo as A, useRef as j, useState as re } from "react";
16
- import { Input as ie } from "antd";
17
- import M from "clsx";
18
- import { useControllableValue as ae, useHover as oe, useToggle as se } from "ahooks";
19
- import { AnimatePresence as ce, motion as N } from "motion/react";
20
- import { FloatingPortal as le } from "@floating-ui/react";
21
- import ue from "fuse.js";
15
+ import { Suspense as C, createContext as w, forwardRef as T, memo as E, useCallback as D, useContext as O, useDeferredValue as k, useId as ee, useImperativeHandle as te, useLayoutEffect as A, useMemo as j, useRef as M, useState as N } from "react";
16
+ import { Input as P } from "antd";
17
+ import F from "clsx";
18
+ import { useControllableValue as ne, useHover as re, useToggle as ie } from "ahooks";
19
+ import { AnimatePresence as ae, motion as I } from "motion/react";
20
+ import { FloatingPortal as oe } from "@floating-ui/react";
21
+ import L from "fuse.js";
22
22
  //#region src/components/Select/constants.ts
23
- var P = /* @__PURE__ */ function(e) {
23
+ var R = /* @__PURE__ */ function(e) {
24
24
  return e.SINGLE = "single", e.MULTIPLE = "multiple", e;
25
- }({}), F = /* @__PURE__ */ function(e) {
25
+ }({}), z = /* @__PURE__ */ function(e) {
26
26
  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;
27
- }({}), de = {
28
- [F.SINGLE]: P.SINGLE,
29
- [F.TREE]: P.SINGLE,
30
- [F.MULTIPLE]: P.MULTIPLE,
31
- [F.TREE_TAGS]: P.MULTIPLE,
32
- [F.MEMBER]: P.MULTIPLE,
33
- [F.DEPARTEMENT]: P.MULTIPLE
34
- }, fe = {
27
+ }({}), se = {
28
+ [z.SINGLE]: R.SINGLE,
29
+ [z.TREE]: R.SINGLE,
30
+ [z.MULTIPLE]: R.MULTIPLE,
31
+ [z.TREE_TAGS]: R.MULTIPLE,
32
+ [z.MEMBER]: R.MULTIPLE,
33
+ [z.DEPARTEMENT]: R.MULTIPLE
34
+ }, ce = {
35
35
  label: "label",
36
36
  value: "value",
37
37
  children: "children"
38
- }, pe = w({
38
+ }, le = w({
39
39
  value: void 0,
40
40
  setValue: y,
41
41
  isOpen: !1,
42
42
  setIsOpen: y
43
- }), me = w({
43
+ }), ue = w({
44
44
  fieldNames: {
45
45
  label: "label",
46
46
  value: "value",
47
47
  children: "children"
48
48
  },
49
49
  disabled: !1
50
- }), he = w({}), I = () => {
51
- let e = O(pe);
50
+ }), de = w({}), B = () => {
51
+ let e = O(le);
52
52
  if (!e) throw Error("Select.* components must be used within a SelectStateContext provider");
53
53
  return e;
54
- }, L = () => {
55
- let e = O(me);
54
+ }, V = () => {
55
+ let e = O(ue);
56
56
  if (!e) throw Error("Select.* components must be used within a SelectConfigContext provider");
57
57
  return e;
58
- }, R = () => O(he);
58
+ }, H = () => O(de);
59
59
  //#endregion
60
60
  //#region src/components/Select/utils/fieldAccessor.ts
61
- function z(e) {
61
+ function U(e) {
62
62
  let t = e;
63
63
  return {
64
64
  getLabel: (e) => e[t.label],
@@ -77,10 +77,10 @@ function z(e) {
77
77
  }
78
78
  //#endregion
79
79
  //#region src/components/Select/SelectInput/SelectSingleInput/SelectSingleInput.tsx
80
- var B = E((e) => {
81
- let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = L(), { isSelectedOtherOption: a, otherOptionValue: o } = R(), s = z(r), c = h(t), l;
80
+ var W = E((e) => {
81
+ let { value: t, inputValueStyle: n } = e, { fieldNames: r, otherInputPosition: i } = V(), { isSelectedOtherOption: a, otherOptionValue: o } = H(), s = U(r), c = h(t), l;
82
82
  return l = a && o && i === "inline" ? o : e.labelRender && c ? e.labelRender(c) : c ? s.getLabel(c) : "", /* @__PURE__ */ x("div", {
83
- className: M("bsy-select-input-container__input-value overflow-hidden"),
83
+ className: F("bsy-select-input-container__input-value overflow-hidden"),
84
84
  style: n,
85
85
  children: /* @__PURE__ */ x("div", {
86
86
  className: "bsy-select-input-container__input-value-text",
@@ -88,40 +88,40 @@ var B = E((e) => {
88
88
  })
89
89
  });
90
90
  });
91
- B.displayName = "BsySelectSingleInput";
91
+ W.displayName = "BsySelectSingleInput";
92
92
  //#endregion
93
93
  //#region src/components/Select/SelectInput/SelectMultipleInput/OptionTag/option-tag.module.scss
94
- var V = {
94
+ var G = {
95
95
  "bsy-input-tag__container": "_bsy-input-tag__container_1bb6m_1",
96
96
  "bsy-input-tag__item": "_bsy-input-tag__item_1bb6m_7",
97
97
  "bsy-input-tag__item--disabled": "_bsy-input-tag__item--disabled_1bb6m_20",
98
98
  "bsy-input-tag__item-icon": "_bsy-input-tag__item-icon_1bb6m_24"
99
- }, H = T(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ x("div", {
99
+ }, K = T(({ children: e, style: t, disabled: n }, r) => /* @__PURE__ */ x("div", {
100
100
  "data-bsy-input-tag": "true",
101
- className: M({
102
- [V["bsy-input-tag__item"]]: !0,
103
- [V["bsy-input-tag__item--disabled"]]: n
101
+ className: F({
102
+ [G["bsy-input-tag__item"]]: !0,
103
+ [G["bsy-input-tag__item--disabled"]]: n
104
104
  }),
105
105
  ref: r,
106
106
  style: t,
107
107
  children: e
108
108
  }));
109
- H.Container = (e) => /* @__PURE__ */ x("div", {
110
- className: M(V["bsy-input-tag__container"]),
109
+ K.Container = (e) => /* @__PURE__ */ x("div", {
110
+ className: F(G["bsy-input-tag__container"]),
111
111
  children: e.children
112
- }), H.displayName = "BsyOptionTag";
112
+ }), K.displayName = "BsyOptionTag";
113
113
  //#endregion
114
114
  //#region src/components/Select/SelectInput/SelectMultipleInput/select-multiple-input.module.scss
115
- var U = "_select_multiple_input__container_15izh_1", ge = "_select_multiple_input__measurement_layer_15izh_6", _e = "_select_multiple_input__close_btn_15izh_14", ve = "_select_multiple_input__ellipsis_15izh_24", W = "_select_multiple_input__tag_content_15izh_27", G = {
116
- select_multiple_input__container: U,
117
- select_multiple_input__measurement_layer: ge,
118
- select_multiple_input__close_btn: _e,
115
+ var fe = "_select_multiple_input__container_15izh_1", pe = "_select_multiple_input__measurement_layer_15izh_6", me = "_select_multiple_input__close_btn_15izh_14", q = "_select_multiple_input__ellipsis_15izh_24", J = "_select_multiple_input__tag_content_15izh_27", Y = {
116
+ select_multiple_input__container: fe,
117
+ select_multiple_input__measurement_layer: pe,
118
+ select_multiple_input__close_btn: me,
119
119
  "select_multiple_input__close_btn--disabled": "_select_multiple_input__close_btn--disabled_15izh_21",
120
- select_multiple_input__ellipsis: ve,
121
- select_multiple_input__tag_content: W
122
- }, K = 4, q = E((t) => {
123
- 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] = re(0), f = j(null), p = j(null);
124
- ne(() => {
120
+ select_multiple_input__ellipsis: q,
121
+ select_multiple_input__tag_content: J
122
+ }, X = 4, Z = E((t) => {
123
+ let { value: n, labelRender: r, tagStyle: i } = t, { setValue: a } = B(), { fieldNames: o, disabled: s } = V(), c = U(o), l = n?.length ?? 0, [u, d] = N(0), f = M(null), p = M(null);
124
+ A(() => {
125
125
  if (!f.current) return;
126
126
  let e = new ResizeObserver((e) => {
127
127
  let t = e[0];
@@ -133,7 +133,7 @@ var U = "_select_multiple_input__container_15izh_1", ge = "_select_multiple_inpu
133
133
  }
134
134
  let a = p.current?.offsetWidth || 65, o = 0, s = 0;
135
135
  for (let e = 0; e < i.length; e++) {
136
- let t = i[e].clientWidth + K, n = e < l - 1 ? a : 0;
136
+ let t = i[e].clientWidth + X, n = e < l - 1 ? a : 0;
137
137
  if (o + t + n <= r) o += t, s = e + 1;
138
138
  else break;
139
139
  }
@@ -146,28 +146,28 @@ var U = "_select_multiple_input__container_15izh_1", ge = "_select_multiple_inpu
146
146
  n.length
147
147
  ]);
148
148
  let m = l - u, h = k(m), g = /* @__PURE__ */ x("div", {
149
- className: `${G.select_multiple_input__measurement_layer} measure-list`,
150
- children: /* @__PURE__ */ S(H.Container, { children: [n?.map((t, n) => {
149
+ className: `${Y.select_multiple_input__measurement_layer} measure-list`,
150
+ children: /* @__PURE__ */ S(K.Container, { children: [n?.map((t, n) => {
151
151
  let a = (t) => /* @__PURE__ */ x("div", {
152
152
  style: t,
153
- className: M(V["bsy-input-tag__item-icon"], "cursor-pointer"),
153
+ className: F(G["bsy-input-tag__item-icon"], "cursor-pointer"),
154
154
  children: /* @__PURE__ */ x(e, {
155
155
  name: "close",
156
156
  style: { fontSize: 12 },
157
- className: G.select_multiple_input__close_btn
157
+ className: Y.select_multiple_input__close_btn
158
158
  })
159
159
  });
160
- return /* @__PURE__ */ S(H, {
160
+ return /* @__PURE__ */ S(K, {
161
161
  style: i,
162
162
  children: [r && r(t, a), !r && /* @__PURE__ */ S("div", {
163
- className: G.select_multiple_input__tag_content,
163
+ className: Y.select_multiple_input__tag_content,
164
164
  children: [/* @__PURE__ */ x("span", { children: c.getLabel(t) }), /* @__PURE__ */ x(a, {})]
165
165
  })]
166
166
  }, n);
167
- }), u < l && h > 0 && /* @__PURE__ */ S(H, {
167
+ }), u < l && h > 0 && /* @__PURE__ */ S(K, {
168
168
  ref: p,
169
169
  children: [`+ ${m}`, /* @__PURE__ */ x("span", {
170
- className: G.select_multiple_input__ellipsis,
170
+ className: Y.select_multiple_input__ellipsis,
171
171
  children: "..."
172
172
  })]
173
173
  })] })
@@ -178,13 +178,13 @@ var U = "_select_multiple_input__container_15izh_1", ge = "_select_multiple_inpu
178
178
  };
179
179
  return /* @__PURE__ */ S("div", {
180
180
  ref: f,
181
- className: M("bsy-select-input-container__input-value", G.select_multiple_input__container, "multiple"),
182
- children: [g, /* @__PURE__ */ S(H.Container, { children: [n?.slice(0, u).map((t, n) => {
181
+ className: F("bsy-select-input-container__input-value", Y.select_multiple_input__container, "multiple"),
182
+ children: [g, /* @__PURE__ */ S(K.Container, { children: [n?.slice(0, u).map((t, n) => {
183
183
  let a = (n) => /* @__PURE__ */ x("div", {
184
184
  style: n,
185
- className: M(V["bsy-input-tag__item-icon"], {
186
- [G.select_multiple_input__close_btn]: !s,
187
- [G.select_multiple_input__close_btn + "--disabled"]: s
185
+ className: F(G["bsy-input-tag__item-icon"], {
186
+ [Y.select_multiple_input__close_btn]: !s,
187
+ [Y.select_multiple_input__close_btn + "--disabled"]: s
188
188
  }),
189
189
  onClick: (e) => {
190
190
  e.stopPropagation(), _(t);
@@ -194,33 +194,33 @@ var U = "_select_multiple_input__container_15izh_1", ge = "_select_multiple_inpu
194
194
  style: { fontSize: 12 }
195
195
  })
196
196
  });
197
- return /* @__PURE__ */ S(H, {
197
+ return /* @__PURE__ */ S(K, {
198
198
  style: {
199
199
  ...i,
200
200
  flexShrink: u === 1 ? 1 : 0
201
201
  },
202
202
  disabled: s,
203
203
  children: [r && r(t, a), !r && /* @__PURE__ */ S("div", {
204
- className: G.select_multiple_input__tag_content,
204
+ className: Y.select_multiple_input__tag_content,
205
205
  children: [/* @__PURE__ */ x("span", {
206
206
  className: "truncate",
207
207
  children: c.getLabel(t)
208
208
  }), /* @__PURE__ */ x(a, {})]
209
209
  })]
210
210
  }, n);
211
- }), u < l && h > 0 && /* @__PURE__ */ S(H, {
211
+ }), u < l && h > 0 && /* @__PURE__ */ S(K, {
212
212
  ref: p,
213
213
  children: [`+ ${m} `, /* @__PURE__ */ x("span", {
214
- className: G.select_multiple_input__ellipsis,
214
+ className: Y.select_multiple_input__ellipsis,
215
215
  children: "..."
216
216
  })]
217
217
  })] })]
218
218
  });
219
219
  });
220
- q.displayName = "BsySelectMultipleInput";
220
+ Z.displayName = "BsySelectMultipleInput";
221
221
  //#endregion
222
222
  //#region src/components/Select/utils/tree.ts
223
- var J = (e, t) => {
223
+ var he = (e, t) => {
224
224
  let n = [], r = (e) => {
225
225
  e.forEach((e) => {
226
226
  let { [t.children]: i, ...a } = e;
@@ -228,12 +228,12 @@ var J = (e, t) => {
228
228
  });
229
229
  };
230
230
  return r(e), n;
231
- }, ye = ({ placeholder: t, mode: n, clearable: r, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: d, ghost: f, inputValueStyle: p, tagStyle: m }) => {
232
- let h = j(null), _ = oe(o ? null : h), { isOpen: y, value: C, getCachedOptionByValue: w } = I(), { fieldNames: T } = L(), E = A(() => {
231
+ }, ge = ({ placeholder: t, mode: n, clearable: r, onClear: a, disabled: o = !1, labelRender: s, options: c = [], type: l, prefix: u, suffixIcon: d, ghost: f, inputValueStyle: p, tagStyle: m }) => {
232
+ let h = M(null), _ = re(o ? null : h), { isOpen: y, value: C, getCachedOptionByValue: w } = B(), { fieldNames: T } = V(), E = j(() => {
233
233
  if (v(C)) return [];
234
234
  let e = g(C) ? C : [C];
235
- if (l === F.TREE) {
236
- let t = z(T), n = J(c, T);
235
+ if (l === z.TREE) {
236
+ let t = U(T), n = he(c, T);
237
237
  return e.map((e) => n.find((n) => t.getValue(n) === e) || w?.(e)).filter((e) => !!e);
238
238
  }
239
239
  return e.map((e) => c.find((t) => t[T.value] === e) || w?.(e)).filter((e) => !!e);
@@ -245,25 +245,25 @@ var J = (e, t) => {
245
245
  w
246
246
  ]);
247
247
  return /* @__PURE__ */ x("div", {
248
- className: M("bsy-select-input-container", {
248
+ className: F("bsy-select-input-container", {
249
249
  disabled: o,
250
- multiple: n === P.MULTIPLE,
250
+ multiple: n === R.MULTIPLE,
251
251
  active: y,
252
252
  "ghost-style": f
253
253
  }),
254
254
  ref: h,
255
255
  children: /* @__PURE__ */ S("div", {
256
- className: M("bsy-select-input-container-input"),
256
+ className: F("bsy-select-input-container-input"),
257
257
  children: [
258
258
  u && /* @__PURE__ */ x("div", {
259
259
  className: "bsy-select-input-container-input-prefix",
260
260
  children: u
261
261
  }),
262
- E?.length ? /* @__PURE__ */ S(b, { children: [n === P.SINGLE && /* @__PURE__ */ x(B, {
262
+ E?.length ? /* @__PURE__ */ S(b, { children: [n === R.SINGLE && /* @__PURE__ */ x(W, {
263
263
  value: E,
264
264
  labelRender: s,
265
265
  inputValueStyle: p
266
- }), n === P.MULTIPLE && /* @__PURE__ */ x(q, {
266
+ }), n === R.MULTIPLE && /* @__PURE__ */ x(Z, {
267
267
  value: E,
268
268
  labelRender: s,
269
269
  tagStyle: m
@@ -272,10 +272,10 @@ var J = (e, t) => {
272
272
  children: t
273
273
  }),
274
274
  /* @__PURE__ */ x("div", {
275
- className: M("bsy-select-input-container__icon"),
276
- children: /* @__PURE__ */ x(ce, {
275
+ className: F("bsy-select-input-container__icon"),
276
+ children: /* @__PURE__ */ x(ae, {
277
277
  mode: "wait",
278
- children: E?.length && r && _ ? /* @__PURE__ */ x(N.div, {
278
+ children: E?.length && r && _ ? /* @__PURE__ */ x(I.div, {
279
279
  className: "bsy-select-input-container__icon-motion",
280
280
  ...i,
281
281
  children: /* @__PURE__ */ x(e, {
@@ -287,12 +287,12 @@ var J = (e, t) => {
287
287
  e.stopPropagation(), a?.();
288
288
  }
289
289
  })
290
- }, "cancel") : /* @__PURE__ */ x(N.div, {
290
+ }, "cancel") : /* @__PURE__ */ x(I.div, {
291
291
  className: "bsy-select-input-container__icon-motion",
292
292
  ...i,
293
293
  children: d ? d(y, o) : /* @__PURE__ */ x(e, {
294
294
  name: "arrow-down",
295
- className: M("icon", { active: y })
295
+ className: F("icon", { active: y })
296
296
  })
297
297
  }, "arrow")
298
298
  })
@@ -301,11 +301,11 @@ var J = (e, t) => {
301
301
  })
302
302
  });
303
303
  };
304
- ye.displayName = "BsySelectInput";
304
+ ge.displayName = "BsySelectInput";
305
305
  //#endregion
306
306
  //#region src/components/Select/OptionList/SingleOptionList/SingleOptionList.tsx
307
- var Y = E((e) => {
308
- let { options: t, value: n, onSelect: i, searchValue: a = "", fieldNames: o, optionRender: s, optionStyle: l } = e, { t: u } = r(), { otherInputPosition: d } = L(), { otherOptionValue: f, setOtherOptionValue: p, onOtherInputChange: m, isSelectedOtherOption: h = !1 } = R(), g = j(null), _ = z(o);
307
+ var Q = E((e) => {
308
+ let { options: t, value: n, onSelect: i, searchValue: a = "", fieldNames: o, optionRender: s, optionStyle: c } = e, { t: u } = r(), { otherInputPosition: d } = V(), { otherOptionValue: f, setOtherOptionValue: p, onOtherInputChange: m, isSelectedOtherOption: h = !1 } = H(), g = M(null), _ = U(o);
309
309
  return /* @__PURE__ */ x("ul", {
310
310
  role: "listbox",
311
311
  children: t.map((e, t) => {
@@ -314,7 +314,7 @@ var Y = E((e) => {
314
314
  role: "option",
315
315
  "aria-selected": w,
316
316
  "aria-disabled": b,
317
- className: M("rounded-[4px] py-[7px] px-[10px] min-h-[34px]", {
317
+ className: F("rounded-[4px] py-[7px] px-[10px] min-h-[34px]", {
318
318
  "cursor-pointer": !b,
319
319
  "cursor-not-allowed bg-transparent": b,
320
320
  "bsy-select-option--disabled": b,
@@ -323,13 +323,13 @@ var Y = E((e) => {
323
323
  "bsy-select-option--selected": !b && w,
324
324
  "flex items-center": y && d === "inline"
325
325
  }),
326
- style: l,
326
+ style: c,
327
327
  onClick: () => {
328
328
  b || i(r, e);
329
329
  },
330
330
  children: [/* @__PURE__ */ x("div", {
331
331
  title: o,
332
- children: s ? s(e, { index: t }, w) : /* @__PURE__ */ x(c, {
332
+ children: s ? s(e, { index: t }, w) : /* @__PURE__ */ x(l, {
333
333
  text: C,
334
334
  highlight: a
335
335
  })
@@ -337,7 +337,7 @@ var Y = E((e) => {
337
337
  className: "ml-2 flex-1",
338
338
  onClick: (e) => e.stopPropagation(),
339
339
  style: { minWidth: "146px" },
340
- children: /* @__PURE__ */ x(ie, {
340
+ children: /* @__PURE__ */ x(P, {
341
341
  ref: g,
342
342
  value: f,
343
343
  disabled: b,
@@ -359,52 +359,52 @@ var Y = E((e) => {
359
359
  })
360
360
  });
361
361
  });
362
- Y.displayName = "BsySingleSelect";
362
+ Q.displayName = "BsySingleSelect";
363
363
  //#endregion
364
364
  //#region src/components/Select/OptionList/MultOptionList/MultOptionList.tsx
365
- var X = (e) => {
366
- let { t } = r(), { options: n, searchValue: i = "", value: a, onSelect: o, fieldNames: s, optionRender: l } = e, d = z(s), f = a || [], p = n.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)));
365
+ var $ = (e) => {
366
+ let { t } = r(), { options: n, searchValue: i = "", value: a, onSelect: o, fieldNames: s, optionRender: c } = e, u = U(s), f = a || [], p = n.filter((e) => !e.isOther), m = p.filter((e) => !e.disabled), h = m.map((e) => u.getValue(e)), g = m.length > 0 && m.every((e) => f.includes(u.getValue(e)));
367
367
  return /* @__PURE__ */ x("div", {
368
368
  className: "bsy-multiple-select",
369
369
  children: /* @__PURE__ */ S("ul", {
370
370
  className: "bsy-multiple-select-list",
371
371
  children: [/* @__PURE__ */ x("li", {
372
- className: M("flex items-center gap-[8px]", "cursor-pointer rounded-[4px] min-h-[34px]", "bsy-select-option--hoverable", "bsy-multiple-select-item"),
373
- children: /* @__PURE__ */ x(u, {
372
+ className: F("flex items-center gap-[8px]", "cursor-pointer rounded-[4px] min-h-[34px]", "bsy-select-option--hoverable", "bsy-multiple-select-item"),
373
+ children: /* @__PURE__ */ x(d, {
374
374
  checked: g,
375
375
  disabled: m.length === 0,
376
376
  onChange: () => {
377
377
  let e = g ? f.filter((e) => !h.includes(e)) : [...f, ...h.filter((e) => !f.includes(e))];
378
- o(e, p.filter((t) => e.includes(d.getValue(t))));
378
+ o(e, p.filter((t) => e.includes(u.getValue(t))));
379
379
  },
380
- indeterminate: m.some((e) => f.includes(d.getValue(e))) && !g,
380
+ indeterminate: m.some((e) => f.includes(u.getValue(e))) && !g,
381
381
  style: { padding: "7px 10px" },
382
382
  children: /* @__PURE__ */ x("span", {
383
383
  className: "font-bold bsy-select-option--all",
384
384
  children: t(i ? "allSelectedBySearch" : "allSelect")
385
385
  })
386
386
  })
387
- }), /* @__PURE__ */ x(u.Group, {
387
+ }), /* @__PURE__ */ x(d.Group, {
388
388
  value: f,
389
389
  onChange: (e) => {
390
- o(e, p.filter((t) => e.includes(d.getValue(t))));
390
+ o(e, p.filter((t) => e.includes(u.getValue(t))));
391
391
  },
392
392
  children: p.map((e, t) => {
393
- let n = d.getValue(e), r = d.getLabel(e), a = f.includes(n), o = e.systemField || !1, s = e.disabled === !0;
393
+ let n = u.getValue(e), r = u.getLabel(e), a = f.includes(n), o = e.systemField || !1, s = e.disabled === !0;
394
394
  return /* @__PURE__ */ x("li", {
395
395
  "aria-disabled": s,
396
- className: M("flex items-center gap-[8px] min-h-[34px]", "rounded-[4px]", "bsy-multiple-select-item", {
396
+ className: F("flex items-center gap-[8px] min-h-[34px]", "rounded-[4px]", "bsy-multiple-select-item", {
397
397
  "cursor-pointer": !s,
398
398
  "cursor-not-allowed bg-transparent": s,
399
399
  "bsy-select-option--disabled": s,
400
400
  "bsy-select-option--hoverable": !s,
401
401
  "bsy-select-option--system": !s && o && !a
402
402
  }),
403
- children: /* @__PURE__ */ x(u, {
403
+ children: /* @__PURE__ */ x(d, {
404
404
  value: n,
405
405
  disabled: s,
406
406
  style: { padding: "7px 10px" },
407
- children: l ? l(e, { index: t }, a) : /* @__PURE__ */ x(c, {
407
+ children: c ? c(e, { index: t }, a) : /* @__PURE__ */ x(l, {
408
408
  text: r,
409
409
  highlight: i
410
410
  })
@@ -415,16 +415,16 @@ var X = (e) => {
415
415
  })
416
416
  });
417
417
  };
418
- X.displayName = "BsyMultipleSelect";
418
+ $.displayName = "BsyMultipleSelect";
419
419
  //#endregion
420
420
  //#region src/components/Select/OptionList/TreeOptionList/TreeOptionList.tsx
421
- var Z = (e) => {
421
+ var _e = (e) => {
422
422
  let { options: t, searchValue: n, value: r, onSelect: i, fieldNames: a } = e;
423
423
  return /* @__PURE__ */ x("div", {
424
424
  className: "bsy-tree-select",
425
425
  children: /* @__PURE__ */ x("div", {
426
426
  className: "bsy-tree-select-nodes",
427
- children: /* @__PURE__ */ x(l, {
427
+ children: /* @__PURE__ */ x(u, {
428
428
  data: t,
429
429
  searchValue: n,
430
430
  fieldNames: a ? {
@@ -437,13 +437,13 @@ var Z = (e) => {
437
437
  })
438
438
  })
439
439
  });
440
- }, be = (e, t) => {
440
+ }, ve = (e, t) => {
441
441
  let n = [], r = (e) => {
442
442
  if (e) for (let i of e) n.push(i), r(i[t.children]);
443
443
  };
444
444
  return r(e), n;
445
- }, Q = (e, t, n) => e.reduce((e, r) => {
446
- let i = r[n.children] ? Q(r[n.children], t, n) : void 0;
445
+ }, ye = (e, t, n) => e.reduce((e, r) => {
446
+ let i = r[n.children] ? ye(r[n.children], t, n) : void 0;
447
447
  if (t.has(r[n.value]) || i && i.length > 0) {
448
448
  let a = t.has(r[n.value]) ? r[n.children] : i;
449
449
  e.push({
@@ -452,25 +452,25 @@ var Z = (e) => {
452
452
  });
453
453
  }
454
454
  return e;
455
- }, []), xe = (e) => {
456
- let { options: t = [], searchValue: n = "", type: i, filterOption: a, optionRender: o, optionStyle: s, notFoundContent: c } = e, { t: l } = r(), { value: u, setIsOpen: f, setValue: p } = I(), { fieldNames: m } = L(), h = A(() => i === F.TREE ? be(t, m) : t, [
455
+ }, []), be = (e) => {
456
+ let { options: t = [], searchValue: n = "", type: i, filterOption: a, optionRender: o, optionStyle: s, notFoundContent: c } = e, { t: l } = r(), { value: u, setIsOpen: d, setValue: p } = B(), { fieldNames: m } = V(), h = j(() => i === z.TREE ? ve(t, m) : t, [
457
457
  t,
458
458
  m,
459
459
  i
460
- ]), g = A(() => new ue(h, {
460
+ ]), g = j(() => new L(h, {
461
461
  keys: [m.label],
462
462
  ignoreLocation: !0,
463
463
  threshold: .3
464
464
  }), [h, m]), v = D((e, t) => {
465
- f?.(!1), p(e, t);
466
- }, [f, p]), y = D((e, t) => {
465
+ d?.(!1), p(e, t);
466
+ }, [d, p]), y = D((e, t) => {
467
467
  p(e, t);
468
468
  }, [p]), S = D((e, t) => {
469
- f?.(!1), p(e, t);
470
- }, [f, p]), C = () => {
469
+ d?.(!1), p(e, t);
470
+ }, [d, p]), C = () => {
471
471
  if (!a || _(n)) return t;
472
472
  let e = g.search(n), r = new Set(e.map((e) => e.item[m.value]));
473
- return i === F.TREE ? Q(t, r, m) : t.filter((e) => r.has(e[m.value]));
473
+ return i === z.TREE ? ye(t, r, m) : t.filter((e) => r.has(e[m.value]));
474
474
  };
475
475
  return /* @__PURE__ */ x(b, { children: (() => {
476
476
  let e = {
@@ -478,26 +478,26 @@ var Z = (e) => {
478
478
  searchValue: n,
479
479
  optionStyle: s
480
480
  };
481
- if (!_(n) && e.options.length === 0) return c === void 0 ? /* @__PURE__ */ x(d, {
481
+ if (!_(n) && e.options.length === 0) return c === void 0 ? /* @__PURE__ */ x(f, {
482
482
  className: "bsy-select-empty",
483
483
  text: l("noDataFound")
484
484
  }) : c;
485
485
  switch (i) {
486
- case F.SINGLE: return /* @__PURE__ */ x(Y, {
486
+ case z.SINGLE: return /* @__PURE__ */ x(Q, {
487
487
  ...e,
488
488
  value: u,
489
489
  fieldNames: m,
490
490
  onSelect: v,
491
491
  optionRender: o
492
492
  });
493
- case F.MULTIPLE: return /* @__PURE__ */ x(X, {
493
+ case z.MULTIPLE: return /* @__PURE__ */ x($, {
494
494
  ...e,
495
495
  value: u,
496
496
  fieldNames: m,
497
497
  onSelect: y,
498
498
  optionRender: o
499
499
  });
500
- case F.TREE: return /* @__PURE__ */ x(Z, {
500
+ case z.TREE: return /* @__PURE__ */ x(_e, {
501
501
  ...e,
502
502
  value: u,
503
503
  fieldNames: m,
@@ -506,14 +506,14 @@ var Z = (e) => {
506
506
  default: return null;
507
507
  }
508
508
  })() });
509
- }, Se = (e) => {
510
- let { options: t = [], type: n = F.SINGLE, filterOption: i = !0, onSearch: a, showSearch: o, searchPlaceholder: c, onPopupScroll: l, notFoundContent: u, themeStyle: p } = e, { t: m } = r(), { searchValue: h = "", setSearchValue: g } = I(), _ = k(h), v = () => e.fetching ? /* @__PURE__ */ x(d, {
509
+ }, xe = (e) => {
510
+ let { options: t = [], type: n = z.SINGLE, filterOption: i = !0, onSearch: a, showSearch: o, searchPlaceholder: s, onPopupScroll: l, notFoundContent: u, themeStyle: d } = e, { t: m } = r(), { searchValue: h = "", setSearchValue: g } = B(), _ = k(h), v = () => e.fetching ? /* @__PURE__ */ x(f, {
511
511
  className: "bsy-select-empty",
512
512
  text: m("dataSearching")
513
- }) : t.length === 0 && !h ? u === void 0 ? /* @__PURE__ */ x(d, {
513
+ }) : t.length === 0 && !h ? u === void 0 ? /* @__PURE__ */ x(f, {
514
514
  className: "bsy-select-empty",
515
515
  text: m("noData")
516
- }) : u : /* @__PURE__ */ x(xe, {
516
+ }) : u : /* @__PURE__ */ x(be, {
517
517
  searchValue: _,
518
518
  options: t,
519
519
  type: n,
@@ -526,15 +526,15 @@ var Z = (e) => {
526
526
  }, [l]);
527
527
  return /* @__PURE__ */ x("div", {
528
528
  className: "bsy-select-panel",
529
- style: p,
530
- children: /* @__PURE__ */ S(C, { children: [o && /* @__PURE__ */ x(s, {
529
+ style: d,
530
+ children: /* @__PURE__ */ S(C, { children: [o && /* @__PURE__ */ x(c, {
531
531
  value: h,
532
532
  onChange: (e) => g?.(e),
533
533
  onSearch: a,
534
- searchPlaceholder: c
534
+ searchPlaceholder: s
535
535
  }), /* @__PURE__ */ x("div", {
536
- className: M({ "pt-[4px]": o }),
537
- children: /* @__PURE__ */ x(f, {
536
+ className: F({ "pt-[4px]": o }),
537
+ children: /* @__PURE__ */ x(p, {
538
538
  style: { maxHeight: 300 },
539
539
  onScroll: y,
540
540
  children: v()
@@ -542,53 +542,57 @@ var Z = (e) => {
542
542
  })] })
543
543
  });
544
544
  };
545
- Se.displayName = "BsySelectPanel";
545
+ xe.displayName = "BsySelectPanel";
546
546
  //#endregion
547
- //#region src/components/Select/Select.tsx
548
- var $ = T((e, i) => {
549
- let { options: s = [], type: c = F.SINGLE, fieldNames: l, clearable: u = !0, disabled: d = !1, placeholder: f, labelRender: h, onOtherInputChange: g, onOpenChange: _, onPopupScroll: v, prefix: y, suffixIcon: b, ghost: C, inputValueStyle: w, tagStyle: T, zIndex: E, zIndexMask: O, otherInputPosition: k = "bottom", getPopupContainer: ne, theme: ie } = e, oe = Number.parseFloat(e.popupMinWidth ?? ""), ue = e.popupMatchSelectWidth ?? (Number.isFinite(oe) ? oe : !0), I = de[c], L = t(E), R = O ?? L - 1, { t: z } = r(), B = ee(), { onChange: V } = e, H = l || fe, [U, ge] = ae(e, {
550
- defaultValue: I === P.SINGLE ? void 0 : [],
547
+ //#region src/components/Select/style/resolveSelectThemeVars.ts
548
+ var Se = (e) => {
549
+ if (!e) return {};
550
+ let t = {}, n = e.colorPrimary;
551
+ return s(t, "--bsy-select-color-bg", e.colorBgContainer), s(t, "--bsy-select-color-bg-elevated", e.colorBgElevated ?? e.colorBgContainer), s(t, "--bsy-select-color-text", e.colorText), s(t, "--bsy-select-color-text-placeholder", e.colorTextPlaceholder), s(t, "--bsy-select-color-icon", e.colorIcon), s(t, "--bsy-select-color-icon-hover", e.colorIconHover ?? n), s(t, "--bsy-select-color-border", e.colorBorder), s(t, "--bsy-select-color-border-hover", e.colorBorderHover ?? n), s(t, "--bsy-select-color-bg-disabled", e.colorBgDisabled), s(t, "--bsy-select-color-text-disabled", e.colorTextDisabled), s(t, "--bsy-select-color-border-disabled", e.colorBorderDisabled), s(t, "--bsy-select-item-hover-bg", e.itemHoverBg), s(t, "--bsy-select-item-active-bg", e.itemActiveBg), s(t, "--bsy-select-item-active-color", e.itemActiveColor ?? n), s(t, "--bsy-select-item-color-disabled", e.itemColorDisabled), s(t, "--bsy-select-item-system-color", e.itemSystemColor), s(t, "--bsy-select-color-highlight", e.colorHighlight ?? n), s(t, "--bsy-select-tag-bg", e.tagBg), s(t, "--bsy-select-tag-color", e.tagColor), s(t, "--bsy-select-tag-bg-disabled", e.tagBgDisabled), s(t, "--bsy-select-tag-color-disabled", e.tagColorDisabled), t;
552
+ }, Ce = T((e, i) => {
553
+ let { options: s = [], type: c = z.SINGLE, fieldNames: l, clearable: u = !0, disabled: d = !1, placeholder: f, labelRender: p, onOtherInputChange: h, onOpenChange: g, onPopupScroll: _, prefix: v, suffixIcon: y, ghost: b, inputValueStyle: C, tagStyle: w, zIndex: T, zIndexMask: E, otherInputPosition: O = "bottom", getPopupContainer: k, theme: A } = e, P = Number.parseFloat(e.popupMinWidth ?? ""), re = e.popupMatchSelectWidth ?? (Number.isFinite(P) ? P : !0), L = se[c], B = t(T), V = E ?? B - 1, { t: H } = r(), U = ee(), { onChange: W } = e, G = l || ce, [K, fe] = ne(e, {
554
+ defaultValue: L === R.SINGLE ? void 0 : [],
551
555
  defaultValuePropName: "defaultValue",
552
556
  valuePropName: "value",
553
557
  trigger: "__NO_CUSTOM_CHANGE__"
554
- }), [_e, ve] = re(""), W = j(/* @__PURE__ */ new Map()), [G, K] = re(() => {
555
- if (I === P.SINGLE) {
556
- let e = s.every((e) => e[H.value] !== U), t = s.find((e) => e.isOther === !0);
557
- return e && t ? U : void 0;
558
+ }), [pe, me] = N(""), q = M(/* @__PURE__ */ new Map()), [J, Y] = N(() => {
559
+ if (L === R.SINGLE) {
560
+ let e = s.every((e) => e[G.value] !== K), t = s.find((e) => e.isOther === !0);
561
+ return e && t ? K : void 0;
558
562
  }
559
- }), q = D((e, t) => {
560
- if (ge(e), t) {
563
+ }), X = D((e, t) => {
564
+ if (fe(e), t) {
561
565
  let n = /* @__PURE__ */ new Map();
562
566
  if (Array.isArray(e)) {
563
567
  let r = Array.isArray(t) ? t : [];
564
568
  e.forEach((e) => {
565
- let t = r.find((t) => t?.[H.value] === e);
569
+ let t = r.find((t) => t?.[G.value] === e);
566
570
  e !== null && t && n.set(e, t);
567
571
  });
568
572
  } else e !== null && !Array.isArray(t) && n.set(e, t);
569
- W.current = n;
573
+ q.current = n;
570
574
  }
571
- V && V(e, t);
575
+ W && W(e, t);
572
576
  }, [
573
- V,
574
- ge,
575
- H
576
- ]), [J, { set: Y }] = se(!1), X = D((e) => {
577
- e !== J && (Y(e), _?.(e));
577
+ W,
578
+ fe,
579
+ G
580
+ ]), [Z, { set: he }] = ie(!1), Q = D((e) => {
581
+ e !== Z && (he(e), g?.(e));
578
582
  }, [
579
- Y,
580
- _,
581
- J
582
- ]), { isSelectedOtherOption: Z, shouldShowOtherInput: be } = A(() => {
583
- if (I === P.MULTIPLE) return {
583
+ he,
584
+ g,
585
+ Z
586
+ ]), { isSelectedOtherOption: $, shouldShowOtherInput: _e } = j(() => {
587
+ if (L === R.MULTIPLE) return {
584
588
  isSelectedOtherOption: !1,
585
589
  shouldShowOtherInput: !1
586
590
  };
587
- let e = s.find((e) => e[H.value] === U);
591
+ let e = s.find((e) => e[G.value] === K);
588
592
  return e ? {
589
593
  isSelectedOtherOption: e.isOther === !0,
590
594
  shouldShowOtherInput: e.isOther === !0
591
- } : s.find((e) => e.isOther === !0) && U ? {
595
+ } : s.find((e) => e.isOther === !0) && K ? {
592
596
  isSelectedOtherOption: !0,
593
597
  shouldShowOtherInput: !0
594
598
  } : {
@@ -596,162 +600,162 @@ var $ = T((e, i) => {
596
600
  shouldShowOtherInput: !1
597
601
  };
598
602
  }, [
599
- U,
603
+ K,
600
604
  s,
601
- H,
602
- I
603
- ]), Q = D(() => {
604
- if (U) {
605
- if (I === P.SINGLE) {
606
- let e = s.every((e) => e[H.value] !== U), t = s.find((e) => e.isOther === !0);
607
- if (e && t) return t[H.value];
605
+ G,
606
+ L
607
+ ]), ve = D(() => {
608
+ if (K) {
609
+ if (L === R.SINGLE) {
610
+ let e = s.every((e) => e[G.value] !== K), t = s.find((e) => e.isOther === !0);
611
+ if (e && t) return t[G.value];
608
612
  }
609
- return U;
610
- } else return U;
613
+ return K;
614
+ } else return K;
611
615
  }, [
612
- U,
616
+ K,
613
617
  s,
614
- H,
615
- I
616
- ]), xe = A(() => ({
617
- value: Q(),
618
- setValue: q,
619
- isOpen: J,
620
- setIsOpen: X,
621
- getCachedOptionByValue: (e) => W.current.get(e),
622
- searchValue: _e,
623
- setSearchValue: ve
618
+ G,
619
+ L
620
+ ]), ye = j(() => ({
621
+ value: ve(),
622
+ setValue: X,
623
+ isOpen: Z,
624
+ setIsOpen: Q,
625
+ getCachedOptionByValue: (e) => q.current.get(e),
626
+ searchValue: pe,
627
+ setSearchValue: me
624
628
  }), [
625
- Q,
626
- q,
627
- J,
629
+ ve,
628
630
  X,
629
- _e
630
- ]), $ = A(() => m(ie), [ie]), Ce = A(() => ({
631
- fieldNames: l || fe,
631
+ Z,
632
+ Q,
633
+ pe
634
+ ]), be = j(() => Se(A), [A]), Ce = j(() => ({
635
+ fieldNames: l || ce,
632
636
  disabled: d,
633
- otherInputPosition: k
637
+ otherInputPosition: O
634
638
  }), [
635
639
  l,
636
640
  d,
637
- k
638
- ]), we = A(() => ({
639
- isSelectedOtherOption: Z,
640
- otherOptionValue: G,
641
- setOtherOptionValue: K,
642
- onOtherInputChange: g
641
+ O
642
+ ]), we = j(() => ({
643
+ isSelectedOtherOption: $,
644
+ otherOptionValue: J,
645
+ setOtherOptionValue: Y,
646
+ onOtherInputChange: h
643
647
  }), [
644
- Z,
645
- G,
646
- K,
647
- g
648
- ]), { refs: Te, floatingStyles: Ee, getReferenceProps: De, getFloatingProps: Oe, referenceStyle: ke } = p({
649
- isOpen: J,
648
+ $,
649
+ J,
650
+ Y,
651
+ h
652
+ ]), { refs: Te, floatingStyles: Ee, getReferenceProps: De, getFloatingProps: Oe, referenceStyle: ke } = m({
653
+ isOpen: Z,
650
654
  close: () => {
651
- X(!1);
655
+ Q(!1);
652
656
  },
653
657
  showMask: e.showMask,
654
- zIndex: L,
655
- zIndexMask: R,
656
- popupMatchSelectWidth: ue,
658
+ zIndex: B,
659
+ zIndexMask: V,
660
+ popupMatchSelectWidth: re,
657
661
  offset: {
658
662
  x: 0,
659
663
  y: 4
660
664
  }
661
- }), { portalRoot: Ae, portalMountKey: je, handleExitComplete: Me } = o(J, ne), Ne = D(() => {
662
- Z && (K(""), g?.("")), X(!1), W.current.clear(), q(I === P.SINGLE ? void 0 : []);
665
+ }), { portalRoot: Ae, portalMountKey: je, handleExitComplete: Me } = o(Z, k), Ne = D(() => {
666
+ $ && (Y(""), h?.("")), Q(!1), q.current.clear(), X(L === R.SINGLE ? void 0 : []);
663
667
  }, [
664
- Z,
665
- g,
666
- q,
667
- I,
668
- X
668
+ $,
669
+ h,
670
+ X,
671
+ L,
672
+ Q
669
673
  ]);
670
674
  return te(i, () => ({
671
- getOtherOptionValue: () => G,
675
+ getOtherOptionValue: () => J,
672
676
  setOtherOptionValue: (e) => {
673
- K(e), g?.(e);
677
+ Y(e), h?.(e);
674
678
  }
675
- }), [G, g]), /* @__PURE__ */ x(pe.Provider, {
676
- value: xe,
677
- children: /* @__PURE__ */ x(me.Provider, {
679
+ }), [J, h]), /* @__PURE__ */ x(le.Provider, {
680
+ value: ye,
681
+ children: /* @__PURE__ */ x(ue.Provider, {
678
682
  value: Ce,
679
- children: /* @__PURE__ */ x(he.Provider, {
683
+ children: /* @__PURE__ */ x(de.Provider, {
680
684
  value: we,
681
685
  children: /* @__PURE__ */ S("div", {
682
- className: M("bsy-select-container text-sm", e.className),
686
+ className: F("bsy-select-container text-sm", e.className),
683
687
  style: {
684
- ...$,
688
+ ...be,
685
689
  ...e.style
686
690
  },
687
691
  children: [
688
692
  /* @__PURE__ */ x("div", {
689
693
  ref: Te.setReference,
690
- className: M("bsy-select-input-event", e.inputClassName),
694
+ className: F("bsy-select-input-event", e.inputClassName),
691
695
  ...De(),
692
696
  style: ke,
693
697
  onClick: () => {
694
- e.disabled || X(!J);
698
+ e.disabled || Q(!Z);
695
699
  },
696
700
  role: "combobox",
697
- "aria-expanded": J,
701
+ "aria-expanded": Z,
698
702
  "aria-haspopup": "listbox",
699
- "aria-controls": B,
703
+ "aria-controls": U,
700
704
  "aria-disabled": d,
701
- children: /* @__PURE__ */ x(ye, {
702
- mode: I,
705
+ children: /* @__PURE__ */ x(ge, {
706
+ mode: L,
703
707
  clearable: u,
704
708
  disabled: d,
705
- placeholder: f || z("select"),
706
- labelRender: h,
709
+ placeholder: f || H("select"),
710
+ labelRender: p,
707
711
  options: s,
708
712
  type: c,
709
- prefix: y,
710
- suffixIcon: b,
711
- ghost: C,
712
- inputValueStyle: w,
713
- tagStyle: T,
713
+ prefix: v,
714
+ suffixIcon: y,
715
+ ghost: b,
716
+ inputValueStyle: C,
717
+ tagStyle: w,
714
718
  onClear: Ne
715
719
  })
716
720
  }),
717
- /* @__PURE__ */ S(le, {
721
+ /* @__PURE__ */ S(oe, {
718
722
  root: Ae,
719
- children: [J && e.showMask ? /* @__PURE__ */ x("div", {
723
+ children: [Z && e.showMask ? /* @__PURE__ */ x("div", {
720
724
  className: "bsy-select-mask",
721
- style: { zIndex: R }
725
+ style: { zIndex: V }
722
726
  }) : null, /* @__PURE__ */ x(n, {
723
- zIndex: L,
724
- children: /* @__PURE__ */ x(ce, {
727
+ zIndex: B,
728
+ children: /* @__PURE__ */ x(ae, {
725
729
  onExitComplete: Me,
726
- children: J ? /* @__PURE__ */ x(N.div, {
730
+ children: Z ? /* @__PURE__ */ x(I.div, {
727
731
  ref: Te.setFloating,
728
732
  style: {
729
733
  ...Ee,
730
- zIndex: L
734
+ zIndex: B
731
735
  },
732
736
  ...Oe(),
733
- id: B,
737
+ id: U,
734
738
  ...a,
735
- children: /* @__PURE__ */ x(Se, {
739
+ children: /* @__PURE__ */ x(xe, {
736
740
  ...e,
737
741
  options: s,
738
- onPopupScroll: v,
739
- themeStyle: $
742
+ onPopupScroll: _,
743
+ themeStyle: be
740
744
  })
741
745
  }, "bsy-select-panel") : null
742
746
  })
743
747
  })]
744
748
  }, je),
745
- be && k === "bottom" ? e.otherOptionRender ? e.otherOptionRender(G, s) : /* @__PURE__ */ x("div", {
749
+ _e && O === "bottom" ? e.otherOptionRender ? e.otherOptionRender(J, s) : /* @__PURE__ */ x("div", {
746
750
  className: "bsy-select-other-input",
747
751
  children: /* @__PURE__ */ x("input", {
748
- value: G || "",
752
+ value: J || "",
749
753
  onChange: (e) => {
750
- K(e.target.value), g?.(e.target.value);
754
+ Y(e.target.value), h?.(e.target.value);
751
755
  },
752
756
  className: "w-full outline-none border-none",
753
- placeholder: z("context"),
754
- "aria-label": z("otherOptionInput"),
757
+ placeholder: H("context"),
758
+ "aria-label": H("otherOptionInput"),
755
759
  role: "textbox"
756
760
  })
757
761
  }) : null
@@ -761,6 +765,6 @@ var $ = T((e, i) => {
761
765
  })
762
766
  });
763
767
  });
764
- $.displayName = "BsySelect";
768
+ Ce.displayName = "BsySelect";
765
769
  //#endregion
766
- export { P as n, F as r, $ as t };
770
+ export { R as n, z as r, Ce as t };