@itilite/lumina-ui 1.1.5 → 1.1.6

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 (152) hide show
  1. package/dist/atom/LoadingSpinner/LoadingSpinner.d.mts +19 -0
  2. package/dist/atom/LoadingSpinner/LoadingSpinner.d.ts +19 -0
  3. package/dist/atom/LoadingSpinner/LoadingSpinner.js +90 -0
  4. package/dist/atom/LoadingSpinner/LoadingSpinner.mjs +9 -0
  5. package/dist/atom/RangePicker/RangePicker.js +265 -136
  6. package/dist/atom/RangePicker/RangePicker.mjs +4 -2
  7. package/dist/atom/Select/Select.d.mts +6 -3
  8. package/dist/atom/Select/Select.d.ts +6 -3
  9. package/dist/atom/Select/Select.js +213 -91
  10. package/dist/atom/Select/Select.mjs +3 -1
  11. package/dist/chunk-22VF7AVT.mjs +618 -0
  12. package/dist/chunk-2BNAAOBU.mjs +670 -0
  13. package/dist/chunk-2IMRLK6M.mjs +44 -0
  14. package/dist/chunk-2JIINZEK.mjs +618 -0
  15. package/dist/chunk-2LBFKQDZ.mjs +660 -0
  16. package/dist/chunk-2ZJBF5C4.mjs +618 -0
  17. package/dist/chunk-3IMCN4K3.mjs +670 -0
  18. package/dist/chunk-3KBQQCET.mjs +674 -0
  19. package/dist/chunk-3KUHXNFH.mjs +678 -0
  20. package/dist/chunk-3PPNOIXN.mjs +618 -0
  21. package/dist/chunk-3XFY3TXJ.mjs +611 -0
  22. package/dist/chunk-3XW7HS5W.mjs +618 -0
  23. package/dist/chunk-447HZYZ4.mjs +612 -0
  24. package/dist/chunk-46F3B4U6.mjs +618 -0
  25. package/dist/chunk-4K5RZHL4.mjs +618 -0
  26. package/dist/chunk-4QHFP4YD.mjs +666 -0
  27. package/dist/chunk-4TFX4DHY.mjs +702 -0
  28. package/dist/chunk-4TWO6JES.mjs +666 -0
  29. package/dist/chunk-4UQVJ3ZU.mjs +666 -0
  30. package/dist/chunk-5247J65D.mjs +670 -0
  31. package/dist/chunk-66H5WSEJ.mjs +618 -0
  32. package/dist/chunk-6OGEXG5U.mjs +618 -0
  33. package/dist/chunk-6ROQXYVN.mjs +672 -0
  34. package/dist/chunk-6WNI6X5Q.mjs +618 -0
  35. package/dist/chunk-72PPCN6D.mjs +675 -0
  36. package/dist/chunk-74EGXFNN.mjs +618 -0
  37. package/dist/chunk-77NCDGJA.mjs +707 -0
  38. package/dist/chunk-7NGBIPZT.mjs +618 -0
  39. package/dist/chunk-7NM4FNMQ.mjs +666 -0
  40. package/dist/chunk-7YBBSVUA.mjs +672 -0
  41. package/dist/chunk-7Z52UP7P.mjs +618 -0
  42. package/dist/chunk-B3LDL3KD.mjs +670 -0
  43. package/dist/chunk-B65LGQ47.mjs +666 -0
  44. package/dist/chunk-B6MTRO54.mjs +618 -0
  45. package/dist/chunk-BJBP5XYB.mjs +618 -0
  46. package/dist/chunk-BLLSWPCC.mjs +618 -0
  47. package/dist/chunk-BOYB7REJ.mjs +670 -0
  48. package/dist/chunk-BP2D64XI.mjs +618 -0
  49. package/dist/chunk-BRT5IPGQ.mjs +618 -0
  50. package/dist/chunk-C2J3VBFZ.mjs +670 -0
  51. package/dist/chunk-CDOR7GQP.mjs +618 -0
  52. package/dist/chunk-CI2RMA4V.mjs +612 -0
  53. package/dist/chunk-CNUIZOQJ.mjs +669 -0
  54. package/dist/chunk-CPBXPEST.mjs +672 -0
  55. package/dist/chunk-CVOLXLMU.mjs +618 -0
  56. package/dist/chunk-CWUCNC36.mjs +666 -0
  57. package/dist/chunk-CZBGN6GS.mjs +612 -0
  58. package/dist/chunk-D3APB62N.mjs +618 -0
  59. package/dist/chunk-D7TWXVL2.mjs +674 -0
  60. package/dist/chunk-DAZ53AD7.mjs +671 -0
  61. package/dist/chunk-DBY5U6IU.mjs +618 -0
  62. package/dist/chunk-DXTVU4M5.mjs +618 -0
  63. package/dist/chunk-DZBTD6QK.mjs +666 -0
  64. package/dist/chunk-EAK2IMM4.mjs +37 -0
  65. package/dist/chunk-EQT2Q2LW.mjs +610 -0
  66. package/dist/chunk-EWMCELQV.mjs +670 -0
  67. package/dist/chunk-EYKWBEHX.mjs +612 -0
  68. package/dist/chunk-FHLCFUP6.mjs +666 -0
  69. package/dist/chunk-FMPFLQZV.mjs +670 -0
  70. package/dist/chunk-G25YXZ74.mjs +618 -0
  71. package/dist/chunk-GSG6ZC3R.mjs +37 -0
  72. package/dist/chunk-H3MQUFTJ.mjs +618 -0
  73. package/dist/chunk-HKZRLVBX.mjs +618 -0
  74. package/dist/chunk-HQALJGVT.mjs +618 -0
  75. package/dist/chunk-I5GBZ3UX.mjs +676 -0
  76. package/dist/chunk-IV4V55OA.mjs +672 -0
  77. package/dist/chunk-J2RAFKAD.mjs +618 -0
  78. package/dist/chunk-JL34UFI7.mjs +670 -0
  79. package/dist/chunk-JTKSGGQM.mjs +611 -0
  80. package/dist/chunk-JZC2RRDH.mjs +618 -0
  81. package/dist/chunk-K3Y7VKT6.mjs +670 -0
  82. package/dist/chunk-KEVXNUFG.mjs +672 -0
  83. package/dist/chunk-KRYAP7NG.mjs +670 -0
  84. package/dist/chunk-KU655POK.mjs +657 -0
  85. package/dist/chunk-L55SLVNX.mjs +618 -0
  86. package/dist/chunk-LCRYOZEV.mjs +618 -0
  87. package/dist/chunk-LH7PP6V2.mjs +618 -0
  88. package/dist/chunk-LJMMYKE2.mjs +618 -0
  89. package/dist/chunk-LK5TROLL.mjs +666 -0
  90. package/dist/chunk-MDR7DAKM.mjs +618 -0
  91. package/dist/chunk-MJZLCWZ5.mjs +666 -0
  92. package/dist/chunk-MKZTEJLS.mjs +612 -0
  93. package/dist/chunk-MQCOQHHP.mjs +618 -0
  94. package/dist/chunk-MSM4KUBM.mjs +618 -0
  95. package/dist/chunk-MTIUER63.mjs +676 -0
  96. package/dist/chunk-NBLV3UX5.mjs +618 -0
  97. package/dist/chunk-NLADSOJS.mjs +618 -0
  98. package/dist/chunk-NPMTWR3Y.mjs +618 -0
  99. package/dist/chunk-NQ6GKEO7.mjs +670 -0
  100. package/dist/chunk-NZSFYNUK.mjs +618 -0
  101. package/dist/chunk-OCNF4O5U.mjs +612 -0
  102. package/dist/chunk-OCW5QSWA.mjs +618 -0
  103. package/dist/chunk-OQF7JZFS.mjs +670 -0
  104. package/dist/chunk-OT675HGC.mjs +670 -0
  105. package/dist/chunk-P47TCYKN.mjs +618 -0
  106. package/dist/chunk-P7TOGXPI.mjs +672 -0
  107. package/dist/chunk-PCAXXEEQ.mjs +618 -0
  108. package/dist/chunk-PDHMG7OZ.mjs +672 -0
  109. package/dist/chunk-PFGVOZGM.mjs +618 -0
  110. package/dist/chunk-PQSSDK3E.mjs +618 -0
  111. package/dist/chunk-PST7W3NG.mjs +618 -0
  112. package/dist/chunk-QGPBZ2YV.mjs +664 -0
  113. package/dist/chunk-QKTMWS4J.mjs +43 -0
  114. package/dist/chunk-QOPCJITC.mjs +618 -0
  115. package/dist/chunk-QSE52CRC.mjs +618 -0
  116. package/dist/chunk-QTP2QMPL.mjs +669 -0
  117. package/dist/chunk-R47XX6IW.mjs +611 -0
  118. package/dist/chunk-RL6AEU6E.mjs +612 -0
  119. package/dist/chunk-T7T4HCHH.mjs +618 -0
  120. package/dist/chunk-TED2WCDG.mjs +618 -0
  121. package/dist/chunk-TJLIMMMB.mjs +612 -0
  122. package/dist/chunk-TNOJDLON.mjs +611 -0
  123. package/dist/chunk-TOR67IHH.mjs +672 -0
  124. package/dist/chunk-TOV7NVKM.mjs +618 -0
  125. package/dist/chunk-TSYMIRRN.mjs +618 -0
  126. package/dist/chunk-TTSRI4V7.mjs +708 -0
  127. package/dist/chunk-UBS3DTE5.mjs +672 -0
  128. package/dist/chunk-UBW6RYVF.mjs +670 -0
  129. package/dist/chunk-UJNUFKR5.mjs +43 -0
  130. package/dist/chunk-VAZZJOSJ.mjs +618 -0
  131. package/dist/chunk-VCWXOX2B.mjs +618 -0
  132. package/dist/chunk-VHCLEOHZ.mjs +618 -0
  133. package/dist/chunk-VTZSCGME.mjs +666 -0
  134. package/dist/chunk-W33KZ2XR.mjs +618 -0
  135. package/dist/chunk-WOVMTYDV.mjs +612 -0
  136. package/dist/chunk-WR3USBWK.mjs +672 -0
  137. package/dist/chunk-WXYQARQ6.mjs +618 -0
  138. package/dist/chunk-Y6XKW4NG.mjs +618 -0
  139. package/dist/chunk-YQSNJFZE.mjs +618 -0
  140. package/dist/chunk-Z6VG6AG7.mjs +678 -0
  141. package/dist/chunk-ZAPKQ4C3.mjs +678 -0
  142. package/dist/chunk-ZCWDQNHL.mjs +618 -0
  143. package/dist/chunk-ZF5JBNCI.mjs +618 -0
  144. package/dist/chunk-ZN7BHWOF.mjs +672 -0
  145. package/dist/chunk-ZUQJKA5J.mjs +666 -0
  146. package/dist/chunk-ZWHWIGYQ.mjs +618 -0
  147. package/dist/index.d.mts +2 -0
  148. package/dist/index.d.ts +2 -0
  149. package/dist/index.js +227 -136
  150. package/dist/index.mjs +18 -14
  151. package/dist/styles.css +128 -87
  152. package/package.json +3 -2
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  CustomRangePicker,
3
3
  RangePicker_default
4
- } from "../../chunk-E6UPDTDY.mjs";
5
- import "../../chunk-RZ7V2KQZ.mjs";
4
+ } from "../../chunk-TED2WCDG.mjs";
6
5
  import "../../chunk-ZTRM4HZJ.mjs";
6
+ import "../../chunk-I5GBZ3UX.mjs";
7
+ import "../../chunk-MLCMZRUC.mjs";
8
+ import "../../chunk-QKTMWS4J.mjs";
7
9
  import "../../chunk-FWCSY2DS.mjs";
8
10
  export {
9
11
  CustomRangePicker as RangePicker,
@@ -13,6 +13,9 @@ interface SelectProps {
13
13
  valueSelected?: string | number | null;
14
14
  value?: string | number | null;
15
15
  onChange?: (value: string | number | null) => void;
16
+ onSearch?: (searchTerm: string) => void;
17
+ isLoading?: boolean;
18
+ disabledTooltip?: string;
16
19
  className?: string;
17
20
  dropdownClassName?: string;
18
21
  optionClassName?: string;
@@ -24,13 +27,13 @@ interface SelectProps {
24
27
  id?: string;
25
28
  name?: string;
26
29
  tabIndex?: number;
27
- size?: 'small' | 'default' | 'medium' | 'large';
28
- variant?: 'default' | 'filled' | 'outlined';
30
+ size?: "small" | "default" | "medium" | "large";
31
+ variant?: "default" | "filled" | "outlined";
29
32
  wrapperClassName?: string;
30
33
  inputClassName?: string;
31
34
  labelClassName?: string;
32
35
  height?: string;
33
- experience?: 'business' | 'personal';
36
+ experience?: "business" | "personal";
34
37
  disabled?: boolean;
35
38
  }
36
39
 
@@ -13,6 +13,9 @@ interface SelectProps {
13
13
  valueSelected?: string | number | null;
14
14
  value?: string | number | null;
15
15
  onChange?: (value: string | number | null) => void;
16
+ onSearch?: (searchTerm: string) => void;
17
+ isLoading?: boolean;
18
+ disabledTooltip?: string;
16
19
  className?: string;
17
20
  dropdownClassName?: string;
18
21
  optionClassName?: string;
@@ -24,13 +27,13 @@ interface SelectProps {
24
27
  id?: string;
25
28
  name?: string;
26
29
  tabIndex?: number;
27
- size?: 'small' | 'default' | 'medium' | 'large';
28
- variant?: 'default' | 'filled' | 'outlined';
30
+ size?: "small" | "default" | "medium" | "large";
31
+ variant?: "default" | "filled" | "outlined";
29
32
  wrapperClassName?: string;
30
33
  inputClassName?: string;
31
34
  labelClassName?: string;
32
35
  height?: string;
33
- experience?: 'business' | 'personal';
36
+ experience?: "business" | "personal";
34
37
  disabled?: boolean;
35
38
  }
36
39
 
@@ -63,7 +63,7 @@ __export(Select_exports, {
63
63
  default: () => Select_default
64
64
  });
65
65
  module.exports = __toCommonJS(Select_exports);
66
- var import_react = require("react");
66
+ var import_react2 = require("react");
67
67
  var import_clsx = __toESM(require("clsx"));
68
68
 
69
69
  // src/icons/Chevron.tsx
@@ -108,16 +108,13 @@ var CrossV2 = React2.memo(
108
108
  width: size,
109
109
  height: size,
110
110
  fill: "none",
111
- viewBox: "0 0 16 16",
112
- className
111
+ viewBox: "0 0 20 20"
113
112
  }, rest), {
114
113
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
115
114
  "path",
116
115
  {
117
116
  fill: color,
118
- fillRule: "evenodd",
119
- d: "M4.293 4.293a1 1 0 011.414 0L8 6.586l2.293-2.293a1 1 0 111.414 1.414L9.414 8l2.293 2.293a1 1 0 01-1.414 1.414L8 9.414l-2.293 2.293a1 1 0 01-1.414-1.414L6.586 8 4.293 5.707a1 1 0 010-1.414z",
120
- clipRule: "evenodd"
117
+ d: "M4.411 4.41a.833.833 0 0 1 1.179 0L10 8.822l4.411-4.41a.833.833 0 1 1 1.179 1.178L11.179 10l4.41 4.41a.833.833 0 0 1-1.178 1.18l-4.41-4.411-4.411 4.41a.833.833 0 1 1-1.179-1.178L8.821 10l-4.41-4.41a.833.833 0 0 1 0-1.18"
121
118
  }
122
119
  )
123
120
  })
@@ -126,8 +123,106 @@ var CrossV2 = React2.memo(
126
123
  );
127
124
  CrossV2.displayName = "CrossV2";
128
125
 
129
- // src/atom/Select/Select.tsx
126
+ // src/icons/Lock.tsx
127
+ var import_react = __toESM(require("react"));
130
128
  var import_jsx_runtime3 = require("react/jsx-runtime");
129
+ var Lock = import_react.default.memo((_a) => {
130
+ var _b = _a, { size = 16, color = "#000" } = _b, rest = __objRest(_b, ["size", "color"]);
131
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
132
+ "svg",
133
+ __spreadProps(__spreadValues({
134
+ xmlns: "http://www.w3.org/2000/svg",
135
+ width: size,
136
+ height: size,
137
+ fill: "none",
138
+ viewBox: "0 0 16 16"
139
+ }, rest), {
140
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
141
+ "path",
142
+ {
143
+ fill: color,
144
+ d: "M9 9a1 1 0 11-2 0 1 1 0 012 0zM5 4h-.5A2.5 2.5 0 002 6.5v5A2.5 2.5 0 004.5 14h7a2.5 2.5 0 002.5-2.5v-5A2.5 2.5 0 0011.5 4H11v-.5a3 3 0 00-6 0V4zm1-.5a2 2 0 114 0V4H6v-.5zM11.5 5A1.5 1.5 0 0113 6.5v5a1.5 1.5 0 01-1.5 1.5h-7A1.5 1.5 0 013 11.5v-5A1.5 1.5 0 014.5 5h7z"
145
+ }
146
+ )
147
+ })
148
+ );
149
+ });
150
+
151
+ // src/atom/Tooltip/Tooltip.tsx
152
+ var import_antd = require("antd");
153
+
154
+ // src/atom/Tooltip/Tooltip.module.scss
155
+ var Tooltip_module_default = { "light": "Tooltip-module__light___H5oCc" };
156
+
157
+ // src/atom/Tooltip/Tooltip.tsx
158
+ var import_jsx_runtime4 = require("react/jsx-runtime");
159
+ var Tooltip = (_a) => {
160
+ var _b = _a, {
161
+ children,
162
+ title = "",
163
+ placement = "top",
164
+ color = "#1F2937",
165
+ className,
166
+ mode = "dark"
167
+ } = _b, rest = __objRest(_b, [
168
+ "children",
169
+ "title",
170
+ "placement",
171
+ "color",
172
+ "className",
173
+ "mode"
174
+ ]);
175
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
176
+ import_antd.Tooltip,
177
+ __spreadProps(__spreadValues({
178
+ className,
179
+ color,
180
+ title,
181
+ placement,
182
+ overlayClassName: mode === "light" ? Tooltip_module_default.light : ""
183
+ }, rest), {
184
+ children
185
+ })
186
+ );
187
+ };
188
+ Tooltip.displayName = "Tooltip";
189
+ var Tooltip_default = Tooltip;
190
+
191
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
192
+ var import_icons = require("@ant-design/icons");
193
+ var import_antd2 = require("antd");
194
+
195
+ // src/atom/LoadingSpinner/LoadingSpinner.module.scss
196
+ var LoadingSpinner_module_default = { "spinnerContainer": "LoadingSpinner-module__spinnerContainer___DiPLf" };
197
+
198
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
199
+ var import_jsx_runtime5 = require("react/jsx-runtime");
200
+ var sizeMapping = {
201
+ xs: 16,
202
+ small: 24,
203
+ medium: 36,
204
+ large: 48
205
+ };
206
+ var LoadingSpinner = (_a) => {
207
+ var _b = _a, { size = "small", color = "#ec5d25" } = _b, rest = __objRest(_b, ["size", "color"]);
208
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", __spreadProps(__spreadValues({ className: LoadingSpinner_module_default.spinnerContainer }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
209
+ import_antd2.Spin,
210
+ {
211
+ indicator: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
212
+ import_icons.LoadingOutlined,
213
+ {
214
+ style: { fontSize: sizeMapping[size], color },
215
+ spin: true
216
+ }
217
+ )
218
+ }
219
+ ) }));
220
+ };
221
+ LoadingSpinner.displayName = "LoadingSpinner";
222
+ var LoadingSpinner_default = LoadingSpinner;
223
+
224
+ // src/atom/Select/Select.tsx
225
+ var import_jsx_runtime6 = require("react/jsx-runtime");
131
226
  var Select = ({
132
227
  label,
133
228
  mandatory = false,
@@ -138,6 +233,10 @@ var Select = ({
138
233
  value: _valueProp,
139
234
  // Rename to avoid potential conflicts with native value attribute
140
235
  onChange,
236
+ onSearch,
237
+ isLoading = false,
238
+ disabled = false,
239
+ disabledTooltip = "",
141
240
  className = "",
142
241
  dropdownClassName = "",
143
242
  optionClassName = "",
@@ -146,7 +245,6 @@ var Select = ({
146
245
  // New prop to show displayValue instead of label
147
246
  allowClear = true,
148
247
  enableSearch = true,
149
- // New prop to control search functionality, default true
150
248
  doubleCharSearch = false,
151
249
  id,
152
250
  name,
@@ -166,45 +264,45 @@ var Select = ({
166
264
  // Custom height
167
265
  experience = "business"
168
266
  }) => {
169
- const normalizeValue = (0, import_react.useCallback)(
267
+ const normalizeValue = (0, import_react2.useCallback)(
170
268
  (val) => {
171
269
  if (val === null || val === void 0) return "";
172
270
  return String(val);
173
271
  },
174
272
  []
175
273
  );
176
- const validatedOptions = (0, import_react.useMemo)(() => {
274
+ const validatedOptions = (0, import_react2.useMemo)(() => {
177
275
  if (!Array.isArray(options)) return [];
178
276
  return options.filter(
179
277
  (opt) => opt && typeof opt === "object" && opt.value !== void 0 && opt.value !== null && opt.label !== void 0
180
278
  );
181
279
  }, [options]);
182
- const [isOpen, setIsOpen] = (0, import_react.useState)(false);
183
- const [isFocused, setIsFocused] = (0, import_react.useState)(false);
184
- const [searchTerm, setSearchTerm] = (0, import_react.useState)("");
185
- const [isHovering, setIsHovering] = (0, import_react.useState)(false);
186
- const [highlightedIndex, setHighlightedIndex] = (0, import_react.useState)(-1);
187
- const [selectedValue, setSelectedValue] = (0, import_react.useState)(() => {
280
+ const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
281
+ const [isFocused, setIsFocused] = (0, import_react2.useState)(false);
282
+ const [searchTerm, setSearchTerm] = (0, import_react2.useState)("");
283
+ const [isHovering, setIsHovering] = (0, import_react2.useState)(false);
284
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react2.useState)(-1);
285
+ const [selectedValue, setSelectedValue] = (0, import_react2.useState)(() => {
188
286
  const initialValue = valueSelected;
189
287
  if (initialValue === null || initialValue === void 0) return "";
190
288
  return String(initialValue);
191
289
  });
192
- const inputRef = (0, import_react.useRef)(null);
193
- const inputValueRef = (0, import_react.useRef)("");
194
- const dropdownRef = (0, import_react.useRef)(null);
195
- const optionRefs = (0, import_react.useRef)([]);
196
- const optionListRef = (0, import_react.useRef)(null);
197
- const blurTimeoutRef = (0, import_react.useRef)(null);
198
- const hoverTimeoutRef = (0, import_react.useRef)(null);
290
+ const inputRef = (0, import_react2.useRef)(null);
291
+ const inputValueRef = (0, import_react2.useRef)("");
292
+ const dropdownRef = (0, import_react2.useRef)(null);
293
+ const optionRefs = (0, import_react2.useRef)([]);
294
+ const optionListRef = (0, import_react2.useRef)(null);
295
+ const blurTimeoutRef = (0, import_react2.useRef)(null);
296
+ const hoverTimeoutRef = (0, import_react2.useRef)(null);
199
297
  const isActive = isFocused || Boolean(selectedValue) || Boolean(valueSelected) || Boolean(searchTerm);
200
- const sizeClasses = (0, import_react.useMemo)(() => {
298
+ const sizeClasses = (0, import_react2.useMemo)(() => {
201
299
  switch (size) {
202
300
  case "small":
203
301
  return {
204
- input: "tw-h-8 tw-px-3 tw-typography-body2",
205
- padding: label ? "tw-pt-4 tw-pb-1" : "tw-py-2",
206
- labelActive: "tw-top-0 tw-typography-caption4",
207
- labelInactive: "tw-top-2 tw-typography-caption3"
302
+ input: "tw-h-6 tw-px-3 tw-typography-caption1Bold !tw-rounded-lg",
303
+ padding: "tw-px-2 tw-py-1",
304
+ labelActive: "tw-top-0.5 tw-typography-caption2",
305
+ labelInactive: "tw-top-1.5 tw-typography-caption3"
208
306
  };
209
307
  case "medium":
210
308
  return {
@@ -229,7 +327,7 @@ var Select = ({
229
327
  };
230
328
  }
231
329
  }, [size, label, height]);
232
- const variantClasses = (0, import_react.useMemo)(() => {
330
+ const variantClasses = (0, import_react2.useMemo)(() => {
233
331
  switch (variant) {
234
332
  case "filled":
235
333
  return "tw-bg-gray-50 tw-border-transparent";
@@ -239,7 +337,7 @@ var Select = ({
239
337
  return " tw-border";
240
338
  }
241
339
  }, [variant]);
242
- const handleBlur = (0, import_react.useCallback)(() => {
340
+ const handleBlur = (0, import_react2.useCallback)(() => {
243
341
  blurTimeoutRef.current = setTimeout(() => {
244
342
  setIsOpen(false);
245
343
  setSearchTerm("");
@@ -248,24 +346,28 @@ var Select = ({
248
346
  setIsFocused(false);
249
347
  }, 150);
250
348
  }, []);
251
- const handleSearchChange = (0, import_react.useCallback)(
349
+ const handleSearchChange = (0, import_react2.useCallback)(
252
350
  (e) => {
253
351
  var _a;
352
+ const searchValue = doubleCharSearch ? e.target.value.slice(0, 2) || "" : e.target.value;
254
353
  if (doubleCharSearch) {
255
- setSearchTerm(e.target.value.slice(0, 2) || "");
354
+ setSearchTerm(searchValue);
256
355
  } else {
257
- setSearchTerm(e.target.value);
356
+ setSearchTerm(searchValue);
258
357
  }
259
358
  setIsOpen(true);
260
359
  setHighlightedIndex(-1);
360
+ if (onSearch && typeof onSearch === "function") {
361
+ onSearch(searchValue);
362
+ }
261
363
  (_a = optionListRef == null ? void 0 : optionListRef.current) == null ? void 0 : _a.scrollTo({
262
364
  top: 0,
263
365
  behavior: "smooth"
264
366
  });
265
367
  },
266
- [doubleCharSearch]
368
+ [doubleCharSearch, onSearch]
267
369
  );
268
- const handleOptionSelect = (0, import_react.useCallback)(
370
+ const handleOptionSelect = (0, import_react2.useCallback)(
269
371
  (option) => {
270
372
  var _a;
271
373
  if (blurTimeoutRef.current) {
@@ -286,7 +388,7 @@ var Select = ({
286
388
  },
287
389
  [normalizeValue, onChange, enableSearch]
288
390
  );
289
- const handleClear = (0, import_react.useCallback)(
391
+ const handleClear = (0, import_react2.useCallback)(
290
392
  (e) => {
291
393
  var _a;
292
394
  inputValueRef.current = "";
@@ -306,21 +408,22 @@ var Select = ({
306
408
  },
307
409
  [onChange, enableSearch]
308
410
  );
309
- (0, import_react.useEffect)(() => {
411
+ (0, import_react2.useEffect)(() => {
310
412
  if (!validatedOptions.length) {
311
413
  setSelectedValue("");
312
414
  setSearchTerm("");
313
415
  inputValueRef.current = "";
314
416
  }
315
417
  }, [validatedOptions.length]);
316
- (0, import_react.useEffect)(() => {
317
- const newValue = normalizeValue(valueSelected);
418
+ (0, import_react2.useEffect)(() => {
419
+ const externalValue = _valueProp !== void 0 ? _valueProp : valueSelected;
420
+ const newValue = normalizeValue(externalValue);
318
421
  setSelectedValue((prevValue) => {
319
422
  const prevNormalized = normalizeValue(prevValue);
320
423
  return prevNormalized !== newValue ? newValue : prevValue;
321
424
  });
322
- }, [valueSelected, normalizeValue]);
323
- (0, import_react.useEffect)(() => {
425
+ }, [valueSelected, _valueProp, normalizeValue]);
426
+ (0, import_react2.useEffect)(() => {
324
427
  const handleClickOutside = (event) => {
325
428
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
326
429
  if (blurTimeoutRef.current) {
@@ -344,7 +447,7 @@ var Select = ({
344
447
  }
345
448
  };
346
449
  }, []);
347
- const getDisplayValue = (0, import_react.useCallback)(() => {
450
+ const getDisplayValue = (0, import_react2.useCallback)(() => {
348
451
  if (selectedValue && (validatedOptions == null ? void 0 : validatedOptions.length) > 0) {
349
452
  const selected = validatedOptions.find(
350
453
  (opt) => normalizeValue(opt.value) === normalizeValue(selectedValue)
@@ -358,7 +461,7 @@ var Select = ({
358
461
  }
359
462
  return "";
360
463
  }, [selectedValue, validatedOptions, showDisplayValue, normalizeValue]);
361
- const filteredOptions = (0, import_react.useMemo)(() => {
464
+ const filteredOptions = (0, import_react2.useMemo)(() => {
362
465
  var _a;
363
466
  if (!enableSearch) {
364
467
  return validatedOptions;
@@ -370,7 +473,7 @@ var Select = ({
370
473
  });
371
474
  return updatedFilteredOptions;
372
475
  }, [validatedOptions, searchTerm, enableSearch]);
373
- const getSelectedOptionIndex = (0, import_react.useCallback)(() => {
476
+ const getSelectedOptionIndex = (0, import_react2.useCallback)(() => {
374
477
  if (!selectedValue || !filteredOptions.length) {
375
478
  return 0;
376
479
  }
@@ -379,7 +482,7 @@ var Select = ({
379
482
  );
380
483
  return index >= 0 ? index : 0;
381
484
  }, [selectedValue, filteredOptions, normalizeValue]);
382
- const handleInputInteraction = (0, import_react.useCallback)(
485
+ const handleInputInteraction = (0, import_react2.useCallback)(
383
486
  (_e) => {
384
487
  var _a;
385
488
  if (blurTimeoutRef.current) {
@@ -403,7 +506,7 @@ var Select = ({
403
506
  },
404
507
  [isOpen, getSelectedOptionIndex]
405
508
  );
406
- const handleKeyDown = (0, import_react.useCallback)(
509
+ const handleKeyDown = (0, import_react2.useCallback)(
407
510
  (e) => {
408
511
  var _a;
409
512
  if (!isOpen) return;
@@ -442,7 +545,7 @@ var Select = ({
442
545
  },
443
546
  [isOpen, highlightedIndex, filteredOptions, handleOptionSelect]
444
547
  );
445
- (0, import_react.useEffect)(() => {
548
+ (0, import_react2.useEffect)(() => {
446
549
  if (highlightedIndex >= 0 && optionRefs.current[highlightedIndex]) {
447
550
  optionRefs.current[highlightedIndex].scrollIntoView({
448
551
  block: "nearest",
@@ -450,10 +553,10 @@ var Select = ({
450
553
  });
451
554
  }
452
555
  }, [highlightedIndex]);
453
- (0, import_react.useEffect)(() => {
556
+ (0, import_react2.useEffect)(() => {
454
557
  optionRefs.current = [];
455
558
  }, [filteredOptions]);
456
- const handleMouseEnter = (0, import_react.useCallback)(() => {
559
+ const handleMouseEnter = (0, import_react2.useCallback)(() => {
457
560
  if (hoverTimeoutRef.current) {
458
561
  clearTimeout(hoverTimeoutRef.current);
459
562
  }
@@ -461,12 +564,12 @@ var Select = ({
461
564
  setIsHovering(true);
462
565
  }
463
566
  }, [isHovering]);
464
- const handleMouseLeave = (0, import_react.useCallback)(() => {
567
+ const handleMouseLeave = (0, import_react2.useCallback)(() => {
465
568
  hoverTimeoutRef.current = setTimeout(() => {
466
569
  setIsHovering(false);
467
570
  }, 50);
468
571
  }, []);
469
- const handleChevronClick = (0, import_react.useCallback)(
572
+ const handleChevronClick = (0, import_react2.useCallback)(
470
573
  (e) => {
471
574
  var _a;
472
575
  e.preventDefault();
@@ -489,17 +592,23 @@ var Select = ({
489
592
  },
490
593
  [isOpen, handleInputInteraction]
491
594
  );
492
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
595
+ const InputWrapper = ({ children }) => {
596
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Tooltip_default, { title: disabledTooltip, children });
597
+ return children;
598
+ };
599
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
493
600
  "div",
494
601
  {
495
602
  style,
496
- className: (0, import_clsx.default)("tw-relative tw-w-full", wrapperClassName),
603
+ className: (0, import_clsx.default)("tw-relative tw-w-full", wrapperClassName, {
604
+ "tw-cursor-not-allowed": disabled
605
+ }),
497
606
  ref: dropdownRef,
498
607
  onMouseEnter: handleMouseEnter,
499
608
  onMouseLeave: handleMouseLeave,
500
609
  children: [
501
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "tw-relative", children: [
502
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
610
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "tw-relative", children: [
611
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
503
612
  "input",
504
613
  {
505
614
  ref: inputRef,
@@ -522,7 +631,8 @@ var Select = ({
522
631
  variantClasses,
523
632
  {
524
633
  "tw-bg-white": valueSelected || getDisplayValue() || isFocused,
525
- "tw-bg-color-gray-5": !valueSelected || !getDisplayValue()
634
+ "tw-bg-color-gray-5": !valueSelected || !getDisplayValue(),
635
+ "!tw-bg-[#F8F7F6] tw-cursor-not-allowed tw-pointer-events-none": disabled
526
636
  },
527
637
  // Conditional padding based on label presence
528
638
  !label && "tw-flex tw-items-center",
@@ -542,7 +652,7 @@ var Select = ({
542
652
  readOnly: !isFocused || !enableSearch
543
653
  }
544
654
  ),
545
- label && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
655
+ label && size !== "small" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
546
656
  "label",
547
657
  {
548
658
  htmlFor: id,
@@ -554,47 +664,59 @@ var Select = ({
554
664
  ),
555
665
  children: [
556
666
  label,
557
- mandatory && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "tw-text-color-text-critical tw-ml-1", children: "*" })
667
+ mandatory && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "tw-text-color-text-critical tw-ml-1", children: "*" })
558
668
  ]
559
669
  }
560
670
  ),
561
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
671
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
562
672
  "div",
563
673
  {
564
674
  className: (0, import_clsx.default)(
565
- "tw-absolute tw-right-3 tw-top-1/2 tw--translate-y-1/2 tw-flex tw-items-center",
675
+ "tw-absolute tw-right-3 tw--translate-y-1/2 tw-flex tw-items-center",
566
676
  {
567
- "!tw-right-[5px]": doubleCharSearch && !(isHovering && selectedValue && allowClear)
677
+ "!tw-right-[5px]": doubleCharSearch && !(isHovering && selectedValue && allowClear),
678
+ "tw-top-3.5 !tw-right-2": size === "small",
679
+ "tw-top-1/2": size !== "small"
568
680
  }
569
681
  ),
570
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
571
- "div",
572
- {
573
- className: (0, import_clsx.default)(
574
- "tw-transition-all tw-duration-200 tw-cursor-pointer tw-flex tw-items-center",
575
- // Only rotate chevron when open and not showing clear icon
576
- isOpen && !(isHovering && selectedValue && allowClear) && "-tw-rotate-180"
577
- ),
578
- onMouseDown: (e) => {
579
- if (isHovering && selectedValue && allowClear) {
580
- handleClear(e);
581
- } else {
582
- handleChevronClick(e);
583
- }
584
- },
585
- children: isHovering && selectedValue && allowClear ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CrossV2, { color: "#111827", className: "tw-mr-1" }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
586
- Chevron,
587
- {
588
- className: (0, import_clsx.default)("tw-text-gray-400"),
589
- color: "#6B7280"
590
- }
591
- )
592
- }
593
- )
682
+ children: [
683
+ disabled && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "tw-absolute tw-right-0 -tw-top-2", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Lock, { size: 16 }) }),
684
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LoadingSpinner_default, { size: "xs" }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
685
+ "div",
686
+ {
687
+ className: (0, import_clsx.default)(
688
+ "tw-transition-all tw-duration-200 tw-cursor-pointer tw-flex tw-items-center",
689
+ // Only rotate chevron when open and not showing clear icon
690
+ isOpen && !(isHovering && selectedValue && allowClear) && "-tw-rotate-180"
691
+ ),
692
+ onMouseDown: (e) => {
693
+ if (isHovering && selectedValue && allowClear) {
694
+ handleClear(e);
695
+ } else {
696
+ handleChevronClick(e);
697
+ }
698
+ },
699
+ children: disabled ? null : isHovering && selectedValue && allowClear ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
700
+ CrossV2,
701
+ {
702
+ color: "#111827",
703
+ className: (0, import_clsx.default)({ "tw-mr-1": size !== "small" }),
704
+ size: size === "small" ? 12 : 16
705
+ }
706
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
707
+ Chevron,
708
+ {
709
+ className: (0, import_clsx.default)("tw-text-gray-400"),
710
+ color: "#6B7280"
711
+ }
712
+ )
713
+ }
714
+ )
715
+ ]
594
716
  }
595
717
  )
596
718
  ] }),
597
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
719
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
598
720
  "div",
599
721
  {
600
722
  className: (0, import_clsx.default)(
@@ -604,7 +726,7 @@ var Select = ({
604
726
  dropdownClassName
605
727
  ),
606
728
  ref: optionListRef,
607
- children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
729
+ children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
608
730
  "div",
609
731
  {
610
732
  ref: (el) => optionRefs.current[index] = el,
@@ -615,7 +737,7 @@ var Select = ({
615
737
  // Selected option styling
616
738
  optionClassName
617
739
  ),
618
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
740
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
619
741
  "div",
620
742
  {
621
743
  className: (0, import_clsx.default)(
@@ -633,12 +755,12 @@ var Select = ({
633
755
  )
634
756
  },
635
757
  doubleCharSearch ? option.label : option.value
636
- )) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "tw-px-4 tw-py-3 tw-text-gray-500 tw-text-sm", children: "No options found" })
758
+ )) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "tw-px-4 tw-py-3 tw-text-gray-500 tw-text-sm", children: "No options found" })
637
759
  }
638
760
  )
639
761
  ]
640
762
  }
641
- );
763
+ ) });
642
764
  };
643
765
  var arePropsEqual = (prevProps, nextProps) => {
644
766
  var _a, _b;
@@ -671,7 +793,7 @@ var arePropsEqual = (prevProps, nextProps) => {
671
793
  return true;
672
794
  };
673
795
  Select.displayName = "Select";
674
- var Select_default = (0, import_react.memo)(Select, arePropsEqual);
796
+ var Select_default = (0, import_react2.memo)(Select, arePropsEqual);
675
797
  // Annotate the CommonJS export names for ESM import in node:
676
798
  0 && (module.exports = {
677
799
  Select
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  Select,
3
3
  Select_default
4
- } from "../../chunk-RZ7V2KQZ.mjs";
4
+ } from "../../chunk-I5GBZ3UX.mjs";
5
+ import "../../chunk-MLCMZRUC.mjs";
6
+ import "../../chunk-QKTMWS4J.mjs";
5
7
  import "../../chunk-FWCSY2DS.mjs";
6
8
  export {
7
9
  Select,