@baishuyun/ui-base 6.16.0 → 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 (140) 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-CRnLvIwc.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-CvG9IFVk.js → DropDown-B_szM67V.js} +86 -82
  16. package/dist/DropDown/index.js +8 -9
  17. package/dist/Editor/index.js +2839 -880
  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-Bla1mQ8v.js → Select-VIy6OKEj.js} +262 -259
  33. package/dist/Select/{SelectInputSearch-CRgBcsq2.js → SelectInputSearch-MApQHnU9.js} +21 -10
  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/components/Select/SelectInputSearch/SelectInputSearch.d.ts +2 -0
  55. package/dist/index.js +28 -50
  56. package/dist/style.css +1 -1
  57. package/dist/vendors/Tree-D0Q1IZ2D.js +267 -0
  58. package/dist/vendors/{version-CFii9VTt.js → version-CfjNx5v2.js} +1 -1
  59. package/package.json +1 -1
  60. package/dist/Amap/Amap-BLSziesG.js +0 -77
  61. package/dist/Amap/AmapCircle/index.js +0 -5
  62. package/dist/Amap/AmapCircle-2qupysHe.js +0 -55
  63. package/dist/Amap/AmapContext-CJBe6lld.js +0 -11
  64. package/dist/Amap/AmapMarker/index.js +0 -6
  65. package/dist/Amap/AmapMarker-xEqoVnFR.js +0 -153
  66. package/dist/Amap/AmapMarkerCluster/index.js +0 -6
  67. package/dist/Amap/AmapMarkerCluster-CvEQa3o9.js +0 -240
  68. package/dist/Amap/AmapProvider/index.js +0 -7
  69. package/dist/Amap/AmapProvider-B-R2DrkJ.js +0 -107
  70. package/dist/Amap/hooks/index.js +0 -4
  71. package/dist/Amap/hooks-BTcFpdd0.js +0 -121
  72. package/dist/Amap/useMarkerInfoWindowController-Cjx0xQXw.js +0 -94
  73. package/dist/Calendar/AllDaySection-pO7suGJM.js +0 -53
  74. package/dist/Calendar/Calendar-DUD4iffO.js +0 -795
  75. package/dist/Calendar/CurrentTimeIndicator-BF3_INSL.js +0 -65
  76. package/dist/Calendar/EventCard-DKEZQRTp.js +0 -155
  77. package/dist/Calendar/TimeAxis-DUc6EL-j.js +0 -13
  78. package/dist/Calendar/TimeGrid-BV8x9VnF.js +0 -47
  79. package/dist/Calendar/colorUtils-BbeSMnOs.js +0 -55
  80. package/dist/Calendar/context/index.js +0 -3
  81. package/dist/Calendar/context-CamSpkj3.js +0 -21
  82. package/dist/Calendar/layout-CpOabFQ2.js +0 -300
  83. package/dist/Calendar/subcomponents/AllDaySection/index.js +0 -11
  84. package/dist/Calendar/subcomponents/CurrentTimeIndicator/index.js +0 -8
  85. package/dist/Calendar/subcomponents/EventCard/index.js +0 -9
  86. package/dist/Calendar/subcomponents/TimeAxis/index.js +0 -5
  87. package/dist/Calendar/subcomponents/TimeGrid/index.js +0 -7
  88. package/dist/Calendar/theme-Dc8hjcdo.js +0 -71
  89. package/dist/Calendar/utils/index.js +0 -111
  90. package/dist/Calendar/utils/layout/index.js +0 -4
  91. package/dist/Calendar/utils/theme/index.js +0 -3
  92. package/dist/DatePicker/DatePicker-BWMmI6rl.js +0 -101
  93. package/dist/DatePicker/ensureDayjsPlugins-CSqhjLS7.js +0 -15
  94. package/dist/DatePicker/pickerLocale-CcPLUbZO.js +0 -15
  95. package/dist/DatePicker/style/index.js +0 -3
  96. package/dist/DatePicker/style-W7f5wyUb.js +0 -15
  97. package/dist/DropDown/style/index.js +0 -3
  98. package/dist/DropDown/style-DZpkarne.js +0 -9
  99. package/dist/Editor/Buttons-vt3gwedu.js +0 -1841
  100. package/dist/Editor/ToolbarPlugin/Buttons/index.js +0 -21
  101. package/dist/Editor/constants/index.js +0 -61
  102. package/dist/Gantt/GanttChart/index.js +0 -21
  103. package/dist/Gantt/GanttChart-DRzJdEm-.js +0 -2292
  104. package/dist/Gantt/GanttHighlightContext-dtyoq-oj.js +0 -12
  105. package/dist/Gantt/GanttTable/index.js +0 -13
  106. package/dist/Gantt/GanttTable-fOv1Zn2-.js +0 -84
  107. package/dist/Gantt/GanttToolBar/index.js +0 -17
  108. package/dist/Gantt/GanttToolBar-4kxZP6oS.js +0 -120
  109. package/dist/Gantt/collapseKeys-BV_8sIA-.js +0 -160
  110. package/dist/Gantt/columnResize-Bkenlbab.js +0 -46
  111. package/dist/Gantt/constants-mEGQ1U1Q.js +0 -39
  112. package/dist/Gantt/highlightTarget-D3Nf9_7S.js +0 -25
  113. package/dist/Gantt/theme-B7Iap-tZ.js +0 -31
  114. package/dist/Gantt/timelineViewConfig-DNt7yi83.js +0 -118
  115. package/dist/Gantt/utils/index.js +0 -7
  116. package/dist/Gantt/utils/theme/index.js +0 -3
  117. package/dist/Select/style/index.js +0 -3
  118. package/dist/Select/style-C4A8kUd1.js +0 -9
  119. package/dist/Table/Table-3LSO0xSH.js +0 -545
  120. package/dist/Table/constants-D7wLH8Qy.js +0 -25
  121. package/dist/Table/hooks/index.js +0 -3
  122. package/dist/Table/hooks-DSBl2e4O.js +0 -108
  123. package/dist/Table/processRowspan-B6HMqw0Q.js +0 -144
  124. package/dist/Table/style/index.js +0 -3
  125. package/dist/Table/style-B8Cw8HJe.js +0 -9
  126. package/dist/Table/utils/index.js +0 -3
  127. package/dist/Tree/utils/index.js +0 -26
  128. package/dist/vendors/Tree-DSl4lDjx.js +0 -248
  129. /package/dist/Card/{Card-rJeWgxu5.js → Card-DAz0dvA3.js} +0 -0
  130. /package/dist/CheckBox/{CheckBox-DOK5N7z6.js → CheckBox-CcHskTz_.js} +0 -0
  131. /package/dist/Modal/{Modal-CRKitOOj.js → Modal-eZijJ7CB.js} +0 -0
  132. /package/dist/NotFoundContent/{NotFoundContent-BLmzWNBi.js → NotFoundContent-DJUQ0_2D.js} +0 -0
  133. /package/dist/Radio/{Radio-CX9cUqb7.js → Radio-D9jhW7K6.js} +0 -0
  134. /package/dist/vendors/{animations-Dn_5xJ7B.js → animations-ISccYUE3.js} +0 -0
  135. /package/dist/vendors/{cssVars-l4-kP_14.js → cssVars-UpriQzph.js} +0 -0
  136. /package/dist/vendors/{mergeRefs-TiJ0xjUN.js → mergeRefs-mEH9TBYV.js} +0 -0
  137. /package/dist/vendors/{useFloatingOverlay-B3M9k8nj.js → useFloatingOverlay-B66lOL8v.js} +0 -0
  138. /package/dist/vendors/{useFloatingPortal-VpzL-EPh.js → useFloatingPortal-DJ1iKmW-.js} +0 -0
  139. /package/dist/vendors/{useLatchedPopupPortalRoot-4fVhqVT4.js → useLatchedPopupPortalRoot-CC6af8t-.js} +0 -0
  140. /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-CRgBcsq2.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,16 +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) => {
511
- g?.(e), a?.(e);
512
- }, y = () => 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, {
513
511
  className: "bsy-select-empty",
514
512
  text: m("dataSearching")
515
- }) : t.length === 0 && !h ? u === void 0 ? /* @__PURE__ */ x(d, {
513
+ }) : t.length === 0 && !h ? u === void 0 ? /* @__PURE__ */ x(f, {
516
514
  className: "bsy-select-empty",
517
515
  text: m("noData")
518
- }) : u : /* @__PURE__ */ x(xe, {
516
+ }) : u : /* @__PURE__ */ x(be, {
519
517
  searchValue: _,
520
518
  options: t,
521
519
  type: n,
@@ -523,73 +521,78 @@ var Z = (e) => {
523
521
  optionRender: e.optionRender,
524
522
  optionStyle: e.optionStyle,
525
523
  notFoundContent: u
526
- }), b = D((e) => {
524
+ }), y = D((e) => {
527
525
  l?.(e);
528
526
  }, [l]);
529
527
  return /* @__PURE__ */ x("div", {
530
528
  className: "bsy-select-panel",
531
- style: p,
532
- children: /* @__PURE__ */ S(C, { children: [o && /* @__PURE__ */ x(s, {
529
+ style: d,
530
+ children: /* @__PURE__ */ S(C, { children: [o && /* @__PURE__ */ x(c, {
533
531
  value: h,
534
- onChange: v,
535
- searchPlaceholder: c
532
+ onChange: (e) => g?.(e),
533
+ onSearch: a,
534
+ searchPlaceholder: s
536
535
  }), /* @__PURE__ */ x("div", {
537
- className: M({ "pt-[4px]": o }),
538
- children: /* @__PURE__ */ x(f, {
536
+ className: F({ "pt-[4px]": o }),
537
+ children: /* @__PURE__ */ x(p, {
539
538
  style: { maxHeight: 300 },
540
- onScroll: b,
541
- children: y()
539
+ onScroll: y,
540
+ children: v()
542
541
  })
543
542
  })] })
544
543
  });
545
544
  };
546
- Se.displayName = "BsySelectPanel";
545
+ xe.displayName = "BsySelectPanel";
547
546
  //#endregion
548
- //#region src/components/Select/Select.tsx
549
- var $ = T((e, i) => {
550
- 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, {
551
- 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 : [],
552
555
  defaultValuePropName: "defaultValue",
553
556
  valuePropName: "value",
554
557
  trigger: "__NO_CUSTOM_CHANGE__"
555
- }), [_e, ve] = re(""), W = j(/* @__PURE__ */ new Map()), [G, K] = re(() => {
556
- if (I === P.SINGLE) {
557
- let e = s.every((e) => e[H.value] !== U), t = s.find((e) => e.isOther === !0);
558
- 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;
559
562
  }
560
- }), q = D((e, t) => {
561
- if (ge(e), t) {
563
+ }), X = D((e, t) => {
564
+ if (fe(e), t) {
562
565
  let n = /* @__PURE__ */ new Map();
563
566
  if (Array.isArray(e)) {
564
567
  let r = Array.isArray(t) ? t : [];
565
568
  e.forEach((e) => {
566
- let t = r.find((t) => t?.[H.value] === e);
569
+ let t = r.find((t) => t?.[G.value] === e);
567
570
  e !== null && t && n.set(e, t);
568
571
  });
569
572
  } else e !== null && !Array.isArray(t) && n.set(e, t);
570
- W.current = n;
573
+ q.current = n;
571
574
  }
572
- V && V(e, t);
575
+ W && W(e, t);
573
576
  }, [
574
- V,
575
- ge,
576
- H
577
- ]), [J, { set: Y }] = se(!1), X = D((e) => {
578
- 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));
579
582
  }, [
580
- Y,
581
- _,
582
- J
583
- ]), { isSelectedOtherOption: Z, shouldShowOtherInput: be } = A(() => {
584
- if (I === P.MULTIPLE) return {
583
+ he,
584
+ g,
585
+ Z
586
+ ]), { isSelectedOtherOption: $, shouldShowOtherInput: _e } = j(() => {
587
+ if (L === R.MULTIPLE) return {
585
588
  isSelectedOtherOption: !1,
586
589
  shouldShowOtherInput: !1
587
590
  };
588
- let e = s.find((e) => e[H.value] === U);
591
+ let e = s.find((e) => e[G.value] === K);
589
592
  return e ? {
590
593
  isSelectedOtherOption: e.isOther === !0,
591
594
  shouldShowOtherInput: e.isOther === !0
592
- } : s.find((e) => e.isOther === !0) && U ? {
595
+ } : s.find((e) => e.isOther === !0) && K ? {
593
596
  isSelectedOtherOption: !0,
594
597
  shouldShowOtherInput: !0
595
598
  } : {
@@ -597,162 +600,162 @@ var $ = T((e, i) => {
597
600
  shouldShowOtherInput: !1
598
601
  };
599
602
  }, [
600
- U,
603
+ K,
601
604
  s,
602
- H,
603
- I
604
- ]), Q = D(() => {
605
- if (U) {
606
- if (I === P.SINGLE) {
607
- let e = s.every((e) => e[H.value] !== U), t = s.find((e) => e.isOther === !0);
608
- 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];
609
612
  }
610
- return U;
611
- } else return U;
613
+ return K;
614
+ } else return K;
612
615
  }, [
613
- U,
616
+ K,
614
617
  s,
615
- H,
616
- I
617
- ]), xe = A(() => ({
618
- value: Q(),
619
- setValue: q,
620
- isOpen: J,
621
- setIsOpen: X,
622
- getCachedOptionByValue: (e) => W.current.get(e),
623
- searchValue: _e,
624
- 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
625
628
  }), [
626
- Q,
627
- q,
628
- J,
629
+ ve,
629
630
  X,
630
- _e
631
- ]), $ = A(() => m(ie), [ie]), Ce = A(() => ({
632
- fieldNames: l || fe,
631
+ Z,
632
+ Q,
633
+ pe
634
+ ]), be = j(() => Se(A), [A]), Ce = j(() => ({
635
+ fieldNames: l || ce,
633
636
  disabled: d,
634
- otherInputPosition: k
637
+ otherInputPosition: O
635
638
  }), [
636
639
  l,
637
640
  d,
638
- k
639
- ]), we = A(() => ({
640
- isSelectedOtherOption: Z,
641
- otherOptionValue: G,
642
- setOtherOptionValue: K,
643
- onOtherInputChange: g
641
+ O
642
+ ]), we = j(() => ({
643
+ isSelectedOtherOption: $,
644
+ otherOptionValue: J,
645
+ setOtherOptionValue: Y,
646
+ onOtherInputChange: h
644
647
  }), [
645
- Z,
646
- G,
647
- K,
648
- g
649
- ]), { refs: Te, floatingStyles: Ee, getReferenceProps: De, getFloatingProps: Oe, referenceStyle: ke } = p({
650
- isOpen: J,
648
+ $,
649
+ J,
650
+ Y,
651
+ h
652
+ ]), { refs: Te, floatingStyles: Ee, getReferenceProps: De, getFloatingProps: Oe, referenceStyle: ke } = m({
653
+ isOpen: Z,
651
654
  close: () => {
652
- X(!1);
655
+ Q(!1);
653
656
  },
654
657
  showMask: e.showMask,
655
- zIndex: L,
656
- zIndexMask: R,
657
- popupMatchSelectWidth: ue,
658
+ zIndex: B,
659
+ zIndexMask: V,
660
+ popupMatchSelectWidth: re,
658
661
  offset: {
659
662
  x: 0,
660
663
  y: 4
661
664
  }
662
- }), { portalRoot: Ae, portalMountKey: je, handleExitComplete: Me } = o(J, ne), Ne = D(() => {
663
- 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 : []);
664
667
  }, [
665
- Z,
666
- g,
667
- q,
668
- I,
669
- X
668
+ $,
669
+ h,
670
+ X,
671
+ L,
672
+ Q
670
673
  ]);
671
674
  return te(i, () => ({
672
- getOtherOptionValue: () => G,
675
+ getOtherOptionValue: () => J,
673
676
  setOtherOptionValue: (e) => {
674
- K(e), g?.(e);
677
+ Y(e), h?.(e);
675
678
  }
676
- }), [G, g]), /* @__PURE__ */ x(pe.Provider, {
677
- value: xe,
678
- children: /* @__PURE__ */ x(me.Provider, {
679
+ }), [J, h]), /* @__PURE__ */ x(le.Provider, {
680
+ value: ye,
681
+ children: /* @__PURE__ */ x(ue.Provider, {
679
682
  value: Ce,
680
- children: /* @__PURE__ */ x(he.Provider, {
683
+ children: /* @__PURE__ */ x(de.Provider, {
681
684
  value: we,
682
685
  children: /* @__PURE__ */ S("div", {
683
- className: M("bsy-select-container text-sm", e.className),
686
+ className: F("bsy-select-container text-sm", e.className),
684
687
  style: {
685
- ...$,
688
+ ...be,
686
689
  ...e.style
687
690
  },
688
691
  children: [
689
692
  /* @__PURE__ */ x("div", {
690
693
  ref: Te.setReference,
691
- className: M("bsy-select-input-event", e.inputClassName),
694
+ className: F("bsy-select-input-event", e.inputClassName),
692
695
  ...De(),
693
696
  style: ke,
694
697
  onClick: () => {
695
- e.disabled || X(!J);
698
+ e.disabled || Q(!Z);
696
699
  },
697
700
  role: "combobox",
698
- "aria-expanded": J,
701
+ "aria-expanded": Z,
699
702
  "aria-haspopup": "listbox",
700
- "aria-controls": B,
703
+ "aria-controls": U,
701
704
  "aria-disabled": d,
702
- children: /* @__PURE__ */ x(ye, {
703
- mode: I,
705
+ children: /* @__PURE__ */ x(ge, {
706
+ mode: L,
704
707
  clearable: u,
705
708
  disabled: d,
706
- placeholder: f || z("select"),
707
- labelRender: h,
709
+ placeholder: f || H("select"),
710
+ labelRender: p,
708
711
  options: s,
709
712
  type: c,
710
- prefix: y,
711
- suffixIcon: b,
712
- ghost: C,
713
- inputValueStyle: w,
714
- tagStyle: T,
713
+ prefix: v,
714
+ suffixIcon: y,
715
+ ghost: b,
716
+ inputValueStyle: C,
717
+ tagStyle: w,
715
718
  onClear: Ne
716
719
  })
717
720
  }),
718
- /* @__PURE__ */ S(le, {
721
+ /* @__PURE__ */ S(oe, {
719
722
  root: Ae,
720
- children: [J && e.showMask ? /* @__PURE__ */ x("div", {
723
+ children: [Z && e.showMask ? /* @__PURE__ */ x("div", {
721
724
  className: "bsy-select-mask",
722
- style: { zIndex: R }
725
+ style: { zIndex: V }
723
726
  }) : null, /* @__PURE__ */ x(n, {
724
- zIndex: L,
725
- children: /* @__PURE__ */ x(ce, {
727
+ zIndex: B,
728
+ children: /* @__PURE__ */ x(ae, {
726
729
  onExitComplete: Me,
727
- children: J ? /* @__PURE__ */ x(N.div, {
730
+ children: Z ? /* @__PURE__ */ x(I.div, {
728
731
  ref: Te.setFloating,
729
732
  style: {
730
733
  ...Ee,
731
- zIndex: L
734
+ zIndex: B
732
735
  },
733
736
  ...Oe(),
734
- id: B,
737
+ id: U,
735
738
  ...a,
736
- children: /* @__PURE__ */ x(Se, {
739
+ children: /* @__PURE__ */ x(xe, {
737
740
  ...e,
738
741
  options: s,
739
- onPopupScroll: v,
740
- themeStyle: $
742
+ onPopupScroll: _,
743
+ themeStyle: be
741
744
  })
742
745
  }, "bsy-select-panel") : null
743
746
  })
744
747
  })]
745
748
  }, je),
746
- 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", {
747
750
  className: "bsy-select-other-input",
748
751
  children: /* @__PURE__ */ x("input", {
749
- value: G || "",
752
+ value: J || "",
750
753
  onChange: (e) => {
751
- K(e.target.value), g?.(e.target.value);
754
+ Y(e.target.value), h?.(e.target.value);
752
755
  },
753
756
  className: "w-full outline-none border-none",
754
- placeholder: z("context"),
755
- "aria-label": z("otherOptionInput"),
757
+ placeholder: H("context"),
758
+ "aria-label": H("otherOptionInput"),
756
759
  role: "textbox"
757
760
  })
758
761
  }) : null
@@ -762,6 +765,6 @@ var $ = T((e, i) => {
762
765
  })
763
766
  });
764
767
  });
765
- $.displayName = "BsySelect";
768
+ Ce.displayName = "BsySelect";
766
769
  //#endregion
767
- export { P as n, F as r, $ as t };
770
+ export { R as n, z as r, Ce as t };