@itilite/lumina-ui 0.0.324 → 1.0.0-alpha

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 (273) hide show
  1. package/README.md +43 -10
  2. package/dist/AdvancedDateRangePicker-CN9WN0rH.d.mts +56 -0
  3. package/dist/AdvancedDateRangePicker-CN9WN0rH.d.ts +56 -0
  4. package/dist/AdvancedDateRangePicker-CzN1HGsC.d.mts +57 -0
  5. package/dist/AdvancedDateRangePicker-CzN1HGsC.d.ts +57 -0
  6. package/dist/AdvancedDateRangePicker-DAPxgRl3.d.mts +54 -0
  7. package/dist/AdvancedDateRangePicker-DAPxgRl3.d.ts +54 -0
  8. package/dist/AdvancedDateRangePicker-DW94285G.d.mts +56 -0
  9. package/dist/AdvancedDateRangePicker-DW94285G.d.ts +56 -0
  10. package/dist/AdvancedDateRangePicker-Eh6n4ne0.d.mts +57 -0
  11. package/dist/AdvancedDateRangePicker-Eh6n4ne0.d.ts +57 -0
  12. package/dist/Avatar-DX2JwvAs.d.mts +17 -0
  13. package/dist/Avatar-DX2JwvAs.d.ts +17 -0
  14. package/dist/Table-BA0D3p1m.d.mts +78 -0
  15. package/dist/Table-BA0D3p1m.d.ts +78 -0
  16. package/dist/Table-BLZ6c46U.d.mts +77 -0
  17. package/dist/Table-BLZ6c46U.d.ts +77 -0
  18. package/dist/Table-BMqYnFi4.d.mts +25 -0
  19. package/dist/Table-BMqYnFi4.d.ts +25 -0
  20. package/dist/Table-BOq-_9Nr.d.mts +121 -0
  21. package/dist/Table-BOq-_9Nr.d.ts +121 -0
  22. package/dist/Table-BRcthrYV.d.mts +98 -0
  23. package/dist/Table-BRcthrYV.d.ts +98 -0
  24. package/dist/Table-BWlFCfBG.d.mts +106 -0
  25. package/dist/Table-BWlFCfBG.d.ts +106 -0
  26. package/dist/Table-CHFmNrme.d.mts +77 -0
  27. package/dist/Table-CHFmNrme.d.ts +77 -0
  28. package/dist/Table-CX6UwQiD.d.mts +116 -0
  29. package/dist/Table-CX6UwQiD.d.ts +116 -0
  30. package/dist/Table-Chud2XSq.d.mts +99 -0
  31. package/dist/Table-Chud2XSq.d.ts +99 -0
  32. package/dist/Table-D5QRe_j3.d.mts +121 -0
  33. package/dist/Table-D5QRe_j3.d.ts +121 -0
  34. package/dist/Table-DAgFGahx.d.mts +39 -0
  35. package/dist/Table-DAgFGahx.d.ts +39 -0
  36. package/dist/Table-DWniK7At.d.mts +87 -0
  37. package/dist/Table-DWniK7At.d.ts +87 -0
  38. package/dist/Table-PyFlnUDu.d.mts +47 -0
  39. package/dist/Table-PyFlnUDu.d.ts +47 -0
  40. package/dist/Table-wqyg13Y9.d.mts +77 -0
  41. package/dist/Table-wqyg13Y9.d.ts +77 -0
  42. package/dist/Tag-l7I5oeyk.d.mts +13 -0
  43. package/dist/Tag-l7I5oeyk.d.ts +13 -0
  44. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.mts +2 -0
  45. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.ts +2 -0
  46. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.js +791 -0
  47. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.mjs +11 -0
  48. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.mts +18 -0
  49. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.ts +18 -0
  50. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.js +370 -0
  51. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.mjs +8 -0
  52. package/dist/atom/Avatar/Avatar.d.mts +9 -0
  53. package/dist/atom/Avatar/Avatar.d.ts +9 -0
  54. package/dist/atom/Avatar/Avatar.js +123 -0
  55. package/dist/atom/Avatar/Avatar.mjs +9 -0
  56. package/dist/{Button.js → atom/Button/Button.js} +4 -4
  57. package/dist/{Button.mjs → atom/Button/Button.mjs} +2 -2
  58. package/dist/{Checkbox.js → atom/Checkbox/Checkbox.js} +4 -4
  59. package/dist/{Checkbox.mjs → atom/Checkbox/Checkbox.mjs} +2 -2
  60. package/dist/atom/LoadingSpinner/LoadingSpinner.d.mts +19 -0
  61. package/dist/atom/LoadingSpinner/LoadingSpinner.d.ts +19 -0
  62. package/dist/atom/LoadingSpinner/LoadingSpinner.js +90 -0
  63. package/dist/atom/LoadingSpinner/LoadingSpinner.mjs +9 -0
  64. package/dist/atom/Modal/Modal.d.mts +25 -0
  65. package/dist/atom/Modal/Modal.d.ts +25 -0
  66. package/dist/atom/Modal/Modal.js +267 -0
  67. package/dist/atom/Modal/Modal.mjs +10 -0
  68. package/dist/atom/Radio/Radio.d.mts +17 -0
  69. package/dist/atom/Radio/Radio.d.ts +17 -0
  70. package/dist/atom/Radio/Radio.js +122 -0
  71. package/dist/atom/Radio/Radio.mjs +9 -0
  72. package/dist/atom/RangePicker/Chevron.d.mts +13 -0
  73. package/dist/atom/RangePicker/Chevron.d.ts +13 -0
  74. package/dist/atom/RangePicker/Chevron.js +110 -0
  75. package/dist/atom/RangePicker/Chevron.mjs +7 -0
  76. package/dist/atom/RangePicker/RangePicker.d.mts +26 -0
  77. package/dist/atom/RangePicker/RangePicker.d.ts +26 -0
  78. package/dist/atom/RangePicker/RangePicker.js +1465 -0
  79. package/dist/atom/RangePicker/RangePicker.mjs +13 -0
  80. package/dist/atom/Select/Select.d.mts +40 -0
  81. package/dist/atom/Select/Select.d.ts +40 -0
  82. package/dist/atom/Select/Select.js +805 -0
  83. package/dist/atom/Select/Select.mjs +11 -0
  84. package/dist/atom/Slider/Slider.d.mts +34 -0
  85. package/dist/atom/Slider/Slider.d.ts +34 -0
  86. package/dist/atom/Slider/Slider.js +107 -0
  87. package/dist/atom/Slider/Slider.mjs +9 -0
  88. package/dist/atom/Switch/Switch.d.mts +13 -0
  89. package/dist/atom/Switch/Switch.d.ts +13 -0
  90. package/dist/atom/Switch/Switch.js +102 -0
  91. package/dist/atom/Switch/Switch.mjs +9 -0
  92. package/dist/atom/Table/LuminaPagination.d.mts +7 -0
  93. package/dist/atom/Table/LuminaPagination.d.ts +7 -0
  94. package/dist/atom/Table/LuminaPagination.js +153 -0
  95. package/dist/atom/Table/LuminaPagination.mjs +9 -0
  96. package/dist/atom/Table/Table.d.mts +3 -0
  97. package/dist/atom/Table/Table.d.ts +3 -0
  98. package/dist/atom/Table/Table.js +306 -0
  99. package/dist/atom/Table/Table.mjs +9 -0
  100. package/dist/atom/Table/TableAccordion.d.mts +9 -0
  101. package/dist/atom/Table/TableAccordion.d.ts +9 -0
  102. package/dist/atom/Table/TableAccordion.js +91 -0
  103. package/dist/atom/Table/TableAccordion.mjs +10 -0
  104. package/dist/atom/Table/TableColumnHeader.d.mts +7 -0
  105. package/dist/atom/Table/TableColumnHeader.d.ts +7 -0
  106. package/dist/atom/Table/TableColumnHeader.js +151 -0
  107. package/dist/atom/Table/TableColumnHeader.mjs +10 -0
  108. package/dist/atom/Table/TableToolbar.d.mts +9 -0
  109. package/dist/atom/Table/TableToolbar.d.ts +9 -0
  110. package/dist/atom/Table/TableToolbar.js +114 -0
  111. package/dist/atom/Table/TableToolbar.mjs +10 -0
  112. package/dist/atom/Table/__tests__/Table.test.d.mts +2 -0
  113. package/dist/atom/Table/__tests__/Table.test.d.ts +2 -0
  114. package/dist/atom/Table/__tests__/Table.test.js +61133 -0
  115. package/dist/atom/Table/__tests__/Table.test.mjs +59522 -0
  116. package/dist/atom/TableAccordion/index.d.mts +17 -0
  117. package/dist/atom/TableAccordion/index.d.ts +17 -0
  118. package/dist/atom/TableAccordion/index.js +91 -0
  119. package/dist/atom/TableAccordion/index.mjs +9 -0
  120. package/dist/atom/TableToolbar/index.d.mts +23 -0
  121. package/dist/atom/TableToolbar/index.d.ts +23 -0
  122. package/dist/atom/TableToolbar/index.js +114 -0
  123. package/dist/atom/TableToolbar/index.mjs +9 -0
  124. package/dist/atom/Tag/Tag.d.mts +6 -0
  125. package/dist/atom/Tag/Tag.d.ts +6 -0
  126. package/dist/atom/Tag/Tag.js +108 -0
  127. package/dist/atom/Tag/Tag.mjs +9 -0
  128. package/dist/atom/Tooltip/Tooltip.d.mts +12 -0
  129. package/dist/atom/Tooltip/Tooltip.d.ts +12 -0
  130. package/dist/atom/Tooltip/Tooltip.js +97 -0
  131. package/dist/atom/Tooltip/Tooltip.mjs +9 -0
  132. package/dist/chunk-2EBPXGRY.mjs +65 -0
  133. package/dist/chunk-2PIFDGVK.mjs +420 -0
  134. package/dist/chunk-35KDS27M.mjs +618 -0
  135. package/dist/chunk-3S4X3YO2.mjs +64 -0
  136. package/dist/chunk-3XUHGVYA.mjs +77 -0
  137. package/dist/chunk-4JX54OKI.mjs +627 -0
  138. package/dist/chunk-4VZB2KR2.mjs +51 -0
  139. package/dist/chunk-5HF6Y37C.mjs +642 -0
  140. package/dist/chunk-5OGQ4YIR.mjs +238 -0
  141. package/dist/chunk-6FCSXN7R.mjs +388 -0
  142. package/dist/chunk-7W72LPSU.mjs +66 -0
  143. package/dist/chunk-A66QDQHK.mjs +627 -0
  144. package/dist/chunk-ABLIL47F.mjs +618 -0
  145. package/dist/chunk-AEPDEUGY.mjs +627 -0
  146. package/dist/chunk-AF2RKLH6.mjs +77 -0
  147. package/dist/chunk-AFLEGUF3.mjs +232 -0
  148. package/dist/chunk-APCEITHQ.mjs +232 -0
  149. package/dist/chunk-AVQBFGBT.mjs +141 -0
  150. package/dist/chunk-B5BOBELW.mjs +213 -0
  151. package/dist/chunk-BQ4PVLJ4.mjs +262 -0
  152. package/dist/chunk-D3N7VFER.mjs +73 -0
  153. package/dist/{chunk-OMYHSSPQ.mjs → chunk-DBNLBCQK.mjs} +5 -5
  154. package/dist/chunk-DLLT6V65.mjs +141 -0
  155. package/dist/chunk-DOQQRYTS.mjs +73 -0
  156. package/dist/chunk-DSVR2DVF.mjs +660 -0
  157. package/dist/chunk-DXUPULDI.mjs +424 -0
  158. package/dist/chunk-E465D6OH.mjs +644 -0
  159. package/dist/chunk-E4FCLHYA.mjs +678 -0
  160. package/dist/chunk-ENQN5BAN.mjs +225 -0
  161. package/dist/chunk-F6VMSH4N.mjs +79 -0
  162. package/dist/chunk-FKGGN3FA.mjs +412 -0
  163. package/dist/chunk-GFTO2N3Q.mjs +432 -0
  164. package/dist/chunk-GM6H6RPJ.mjs +232 -0
  165. package/dist/chunk-GU5F7Z7I.mjs +681 -0
  166. package/dist/chunk-HF3VJBMY.mjs +244 -0
  167. package/dist/{chunk-ME35H7QC.mjs → chunk-HISCHZ5H.mjs} +4 -4
  168. package/dist/chunk-HWQBE6PT.mjs +99 -0
  169. package/dist/chunk-HXM657YW.mjs +115 -0
  170. package/dist/chunk-I5VHKSQR.mjs +64 -0
  171. package/dist/chunk-ICSZZNTY.mjs +384 -0
  172. package/dist/chunk-IWO2Y5QX.mjs +89 -0
  173. package/dist/chunk-IZGLD7U3.mjs +667 -0
  174. package/dist/chunk-J7X2PZG6.mjs +232 -0
  175. package/dist/chunk-JUXBLRMQ.mjs +50 -0
  176. package/dist/chunk-JXFSGADI.mjs +678 -0
  177. package/dist/chunk-KGKRSR6D.mjs +388 -0
  178. package/dist/chunk-KQKNFGWZ.mjs +388 -0
  179. package/dist/chunk-LCH4DXJY.mjs +92 -0
  180. package/dist/chunk-LCXU3K57.mjs +232 -0
  181. package/dist/chunk-LRN4XOIR.mjs +71 -0
  182. package/dist/chunk-LROMXY35.mjs +116 -0
  183. package/dist/chunk-LUNPHYAR.mjs +681 -0
  184. package/dist/chunk-LVOTEPLC.mjs +64 -0
  185. package/dist/chunk-M2ZM3X5Y.mjs +56 -0
  186. package/dist/chunk-M4MIYHAV.mjs +43 -0
  187. package/dist/chunk-M7F7DOC4.mjs +41 -0
  188. package/dist/chunk-MHWFVML4.mjs +115 -0
  189. package/dist/chunk-MLCMZRUC.mjs +50 -0
  190. package/dist/chunk-MNARBWAJ.mjs +47 -0
  191. package/dist/chunk-MPTVYTYS.mjs +0 -0
  192. package/dist/chunk-MQFW3LZR.mjs +111 -0
  193. package/dist/chunk-N2WTNCQU.mjs +66 -0
  194. package/dist/chunk-N355RJGH.mjs +141 -0
  195. package/dist/chunk-N3YFQDW7.mjs +77 -0
  196. package/dist/chunk-N4DPPZVJ.mjs +269 -0
  197. package/dist/chunk-NGCBOOIE.mjs +225 -0
  198. package/dist/chunk-NWQQYJSP.mjs +688 -0
  199. package/dist/chunk-NYQV556V.mjs +667 -0
  200. package/dist/chunk-O5C3355V.mjs +246 -0
  201. package/dist/chunk-OCP43S7U.mjs +241 -0
  202. package/dist/chunk-OHLFRULE.mjs +432 -0
  203. package/dist/chunk-PLO46EKV.mjs +65 -0
  204. package/dist/chunk-PQ3B2FEB.mjs +249 -0
  205. package/dist/chunk-PSBEYGD4.mjs +618 -0
  206. package/dist/chunk-PWIBJI6Z.mjs +115 -0
  207. package/dist/chunk-Q5KPXEH5.mjs +223 -0
  208. package/dist/chunk-QC34HHAY.mjs +57 -0
  209. package/dist/chunk-QKTMWS4J.mjs +43 -0
  210. package/dist/chunk-QVWV36BK.mjs +73 -0
  211. package/dist/chunk-QWK3MYDM.mjs +64 -0
  212. package/dist/chunk-RE44YAMD.mjs +47 -0
  213. package/dist/chunk-RH6DAYBU.mjs +369 -0
  214. package/dist/chunk-RSSEJENT.mjs +269 -0
  215. package/dist/chunk-SJBS5QCJ.mjs +225 -0
  216. package/dist/chunk-SWRFCTJW.mjs +77 -0
  217. package/dist/chunk-T4XNCAIB.mjs +231 -0
  218. package/dist/chunk-TCX5IFQ4.mjs +627 -0
  219. package/dist/chunk-TSAUBT2F.mjs +74 -0
  220. package/dist/chunk-U7Q7ILSE.mjs +690 -0
  221. package/dist/chunk-UHTUJJH7.mjs +112 -0
  222. package/dist/chunk-UOHYCMUS.mjs +53 -0
  223. package/dist/chunk-UQJ3BDM4.mjs +141 -0
  224. package/dist/chunk-UQZBL3F7.mjs +0 -0
  225. package/dist/chunk-UQZNUEZE.mjs +64 -0
  226. package/dist/chunk-URGYNKJM.mjs +229 -0
  227. package/dist/chunk-UTMZY37A.mjs +141 -0
  228. package/dist/chunk-UUEPD2FH.mjs +141 -0
  229. package/dist/chunk-V3CHJHUX.mjs +424 -0
  230. package/dist/chunk-VQOUJQIF.mjs +249 -0
  231. package/dist/chunk-VY3QH43W.mjs +6 -0
  232. package/dist/chunk-W2N3AWY6.mjs +80 -0
  233. package/dist/chunk-WUVS6S7N.mjs +119 -0
  234. package/dist/chunk-WZS2K7X3.mjs +688 -0
  235. package/dist/chunk-X76GNSBB.mjs +87 -0
  236. package/dist/chunk-XG7CZXBW.mjs +244 -0
  237. package/dist/chunk-XXKIBYXD.mjs +109 -0
  238. package/dist/chunk-XXTUVMAY.mjs +51 -0
  239. package/dist/chunk-Y3BIY4DW.mjs +618 -0
  240. package/dist/chunk-Y7FP6ZMW.mjs +225 -0
  241. package/dist/chunk-YELLXCMY.mjs +265 -0
  242. package/dist/chunk-YQEEM26W.mjs +232 -0
  243. package/dist/chunk-ZGFE3OPJ.mjs +678 -0
  244. package/dist/chunk-ZMJ3KDDY.mjs +618 -0
  245. package/dist/chunk-ZTRM4HZJ.mjs +53 -0
  246. package/dist/chunk-ZYPWQ53U.mjs +6 -0
  247. package/dist/dist-U2IPN4FB.mjs +567 -0
  248. package/dist/index.d.mts +20 -2
  249. package/dist/index.d.ts +20 -2
  250. package/dist/index.js +2820 -13
  251. package/dist/index.mjs +59 -5
  252. package/dist/magic-string.es-XOWQCRDO.mjs +1311 -0
  253. package/dist/molecules/UserProfile/UserProfile.d.mts +23 -0
  254. package/dist/molecules/UserProfile/UserProfile.d.ts +23 -0
  255. package/dist/molecules/UserProfile/UserProfile.js +243 -0
  256. package/dist/molecules/UserProfile/UserProfile.mjs +11 -0
  257. package/dist/styles.css +1809 -1366
  258. package/dist/types-CA0Wby2L.d.mts +67 -0
  259. package/dist/types-CA0Wby2L.d.ts +67 -0
  260. package/dist/types-CncMmuJM.d.mts +44 -0
  261. package/dist/types-CncMmuJM.d.ts +44 -0
  262. package/dist/types-D4MD2w3_.d.mts +9 -0
  263. package/dist/types-D4MD2w3_.d.ts +9 -0
  264. package/dist/types-D4fdeMWQ.d.mts +62 -0
  265. package/dist/types-D4fdeMWQ.d.ts +62 -0
  266. package/dist/types-mhQmqhsR.d.mts +10 -0
  267. package/dist/types-mhQmqhsR.d.ts +10 -0
  268. package/package.json +9 -15
  269. /package/dist/{Button.d.mts → atom/Button/Button.d.mts} +0 -0
  270. /package/dist/{Button.d.ts → atom/Button/Button.d.ts} +0 -0
  271. /package/dist/{Checkbox.d.mts → atom/Checkbox/Checkbox.d.mts} +0 -0
  272. /package/dist/{Checkbox.d.ts → atom/Checkbox/Checkbox.d.ts} +0 -0
  273. /package/dist/{chunk-FUJQIYOF.mjs → chunk-FWCSY2DS.mjs} +0 -0
@@ -0,0 +1,805 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
10
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
37
+ var __export = (target, all) => {
38
+ for (var name in all)
39
+ __defProp(target, name, { get: all[name], enumerable: true });
40
+ };
41
+ var __copyProps = (to, from, except, desc) => {
42
+ if (from && typeof from === "object" || typeof from === "function") {
43
+ for (let key of __getOwnPropNames(from))
44
+ if (!__hasOwnProp.call(to, key) && key !== except)
45
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
+ }
47
+ return to;
48
+ };
49
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
+ // If the importer is in node compatibility mode or this is not an ESM
51
+ // file that has been converted to a CommonJS file using a Babel-
52
+ // compatible transform (i.e. "__esModule" has not been set), then set
53
+ // "default" to the CommonJS "module.exports" for node compatibility.
54
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
+ mod
56
+ ));
57
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
+
59
+ // src/atom/Select/Select.tsx
60
+ var Select_exports = {};
61
+ __export(Select_exports, {
62
+ Select: () => Select,
63
+ default: () => Select_default
64
+ });
65
+ module.exports = __toCommonJS(Select_exports);
66
+ var import_react2 = require("react");
67
+ var import_clsx = __toESM(require("clsx"));
68
+
69
+ // src/icons/Chevron.tsx
70
+ var React = __toESM(require("react"));
71
+ var import_jsx_runtime = require("react/jsx-runtime");
72
+ var Chevron = React.memo(
73
+ (_a) => {
74
+ var _b = _a, { size = 16, color = "#6b7280", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
75
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ "svg",
77
+ __spreadProps(__spreadValues({
78
+ xmlns: "http://www.w3.org/2000/svg",
79
+ width: size,
80
+ height: size,
81
+ fill: "none",
82
+ viewBox: "0 0 16 16",
83
+ className
84
+ }, rest), {
85
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
86
+ "path",
87
+ {
88
+ fill: color,
89
+ d: "M11.78 6.22a.75.75 0 00-1.06 0L8 8.94 5.28 6.22a.75.75 0 00-1.06 1.06l3.25 3.25a.75.75 0 001.06 0l3.25-3.25a.75.75 0 000-1.06z"
90
+ }
91
+ )
92
+ })
93
+ );
94
+ }
95
+ );
96
+ Chevron.displayName = "Chevron";
97
+
98
+ // src/icons/CrossV2.tsx
99
+ var React2 = __toESM(require("react"));
100
+ var import_jsx_runtime2 = require("react/jsx-runtime");
101
+ var CrossV2 = React2.memo(
102
+ (_a) => {
103
+ var _b = _a, { size = 16, color = "#111827", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
104
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
105
+ "svg",
106
+ __spreadProps(__spreadValues({
107
+ xmlns: "http://www.w3.org/2000/svg",
108
+ width: size,
109
+ height: size,
110
+ fill: "none",
111
+ viewBox: "0 0 20 20"
112
+ }, rest), {
113
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
114
+ "path",
115
+ {
116
+ fill: color,
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"
118
+ }
119
+ )
120
+ })
121
+ );
122
+ }
123
+ );
124
+ CrossV2.displayName = "CrossV2";
125
+
126
+ // src/icons/Lock.tsx
127
+ var import_react = __toESM(require("react"));
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");
226
+ var InputWrapper = (0, import_react2.memo)(({ children, disabled, disabledTooltip }) => {
227
+ if (disabled && disabledTooltip)
228
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Tooltip_default, { title: disabledTooltip, children });
229
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, { children });
230
+ });
231
+ var OptionItem = (0, import_react2.memo)(({
232
+ option,
233
+ index,
234
+ isSelected,
235
+ isHighlighted,
236
+ experience,
237
+ size,
238
+ optionClassName,
239
+ onSelectHandler,
240
+ onMouseEnterHandler
241
+ }) => {
242
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
243
+ "div",
244
+ {
245
+ onClick: () => onSelectHandler(option),
246
+ onMouseEnter: () => onMouseEnterHandler(index),
247
+ className: (0, import_clsx.default)(
248
+ "tw-transition-all tw-duration-150",
249
+ { "tw-typography-body2": size !== "small" },
250
+ { "tw-typography-caption1": size === "small" },
251
+ optionClassName
252
+ ),
253
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
254
+ "div",
255
+ {
256
+ className: (0, import_clsx.default)(
257
+ "tw-px-4 tw-cursor-pointer tw-py-2 tw-mx-0.5 tw-rounded-xl",
258
+ isSelected ? experience === "personal" ? "tw-bg-[#f1e8fa]" : "tw-bg-[#fff1e1]" : isHighlighted ? "tw-bg-[#f3f4f6] tw-text-gray-900" : "tw-text-gray-900 hover:tw-bg-[#1118270a]"
259
+ ),
260
+ children: option.label
261
+ }
262
+ )
263
+ }
264
+ );
265
+ });
266
+ var Select = ({
267
+ label,
268
+ mandatory = false,
269
+ error = false,
270
+ options = [],
271
+ valueSelected = "",
272
+ // Keep for backward compatibility
273
+ value: _valueProp,
274
+ // Rename to avoid potential conflicts with native value attribute
275
+ onChange,
276
+ onSearch,
277
+ isLoading = false,
278
+ disabled = false,
279
+ disabledTooltip = "",
280
+ className = "",
281
+ dropdownClassName = "",
282
+ optionClassName = "",
283
+ style = {},
284
+ showDisplayValue = false,
285
+ // New prop to show displayValue instead of label
286
+ allowClear = true,
287
+ enableSearch = true,
288
+ doubleCharSearch = false,
289
+ id,
290
+ name,
291
+ tabIndex,
292
+ // Add tabIndex prop
293
+ // Additional styling props
294
+ size = "default",
295
+ // 'small', 'default', 'large'
296
+ variant = "default",
297
+ // 'default', 'filled', 'outlined'
298
+ wrapperClassName = "",
299
+ inputClassName = "",
300
+ // Custom class for input element specifically
301
+ labelClassName = "",
302
+ // Custom class for label element specifically
303
+ height = "tw-h-12",
304
+ // Custom height
305
+ experience = "business"
306
+ }) => {
307
+ const normalizeValue = (0, import_react2.useCallback)(
308
+ (val) => {
309
+ if (val === null || val === void 0) return "";
310
+ return String(val);
311
+ },
312
+ []
313
+ );
314
+ const validatedOptions = (0, import_react2.useMemo)(() => {
315
+ if (!Array.isArray(options)) return [];
316
+ return options.filter(
317
+ (opt) => opt && typeof opt === "object" && opt.value !== void 0 && opt.value !== null && opt.label !== void 0
318
+ );
319
+ }, [options]);
320
+ const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
321
+ const [isFocused, setIsFocused] = (0, import_react2.useState)(false);
322
+ const [searchTerm, setSearchTerm] = (0, import_react2.useState)("");
323
+ const [isHovering, setIsHovering] = (0, import_react2.useState)(false);
324
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react2.useState)(-1);
325
+ const [selectedValue, setSelectedValue] = (0, import_react2.useState)(() => {
326
+ const initialValue = valueSelected;
327
+ if (initialValue === null || initialValue === void 0) return "";
328
+ return String(initialValue);
329
+ });
330
+ const inputRef = (0, import_react2.useRef)(null);
331
+ const inputValueRef = (0, import_react2.useRef)("");
332
+ const dropdownRef = (0, import_react2.useRef)(null);
333
+ const optionRefs = (0, import_react2.useRef)([]);
334
+ const optionListRef = (0, import_react2.useRef)(null);
335
+ const blurTimeoutRef = (0, import_react2.useRef)(null);
336
+ const hoverTimeoutRef = (0, import_react2.useRef)(null);
337
+ const isActive = isFocused || Boolean(selectedValue) || Boolean(valueSelected) || Boolean(searchTerm);
338
+ const sizeClasses = (0, import_react2.useMemo)(() => {
339
+ switch (size) {
340
+ case "small":
341
+ return {
342
+ input: "tw-h-6 tw-typography-caption1Bold !tw-rounded-lg",
343
+ padding: "tw-px-2 tw-py-1",
344
+ labelActive: "tw-top-0.5 tw-typography-caption2",
345
+ labelInactive: "tw-top-1.5 tw-typography-caption3"
346
+ };
347
+ case "medium":
348
+ return {
349
+ input: "tw-h-10 tw-px-4 tw-typography-body2",
350
+ padding: label ? "tw-pt-4 tw-pb-1" : "tw-py-2",
351
+ labelActive: "tw-top-1 tw-typography-caption3",
352
+ labelInactive: "tw-top-2.5 tw-typography-body2"
353
+ };
354
+ case "large":
355
+ return {
356
+ input: "tw-h-16 tw-px-5 tw-typography-bodyLarge",
357
+ padding: label ? "tw-pt-8 tw-pb-4" : "tw-py-5",
358
+ labelActive: "tw-top-1 tw-typography-caption2",
359
+ labelInactive: "tw-top-5 tw-typography-body1"
360
+ };
361
+ default:
362
+ return {
363
+ input: height + " tw-px-4 tw-typography-bodyLarge",
364
+ padding: label ? "tw-pt-6 tw-pb-3" : "tw-py-3",
365
+ labelActive: "tw-top-1 tw-typography-caption3",
366
+ labelInactive: "tw-top-3.5 tw-typography-body2"
367
+ };
368
+ }
369
+ }, [size, label, height]);
370
+ const variantClasses = (0, import_react2.useMemo)(() => {
371
+ switch (variant) {
372
+ case "filled":
373
+ return "tw-bg-gray-50 tw-border-transparent";
374
+ case "outlined":
375
+ return "tw-bg-transparent tw-border-2";
376
+ default:
377
+ return " tw-border";
378
+ }
379
+ }, [variant]);
380
+ const handleBlur = (0, import_react2.useCallback)(() => {
381
+ blurTimeoutRef.current = setTimeout(() => {
382
+ setIsOpen(false);
383
+ setSearchTerm("");
384
+ setHighlightedIndex(-1);
385
+ blurTimeoutRef.current = null;
386
+ setIsFocused(false);
387
+ }, 150);
388
+ }, []);
389
+ const handleSearchChange = (0, import_react2.useCallback)(
390
+ (e) => {
391
+ var _a;
392
+ const searchValue = doubleCharSearch ? e.target.value.slice(0, 2) || "" : e.target.value;
393
+ if (doubleCharSearch) {
394
+ setSearchTerm(searchValue);
395
+ } else {
396
+ setSearchTerm(searchValue);
397
+ }
398
+ setIsOpen(true);
399
+ setHighlightedIndex(-1);
400
+ if (onSearch && typeof onSearch === "function") {
401
+ onSearch(searchValue);
402
+ }
403
+ (_a = optionListRef == null ? void 0 : optionListRef.current) == null ? void 0 : _a.scrollTo({
404
+ top: 0,
405
+ behavior: "smooth"
406
+ });
407
+ },
408
+ [doubleCharSearch, onSearch]
409
+ );
410
+ const handleOptionSelect = (0, import_react2.useCallback)(
411
+ (option) => {
412
+ var _a;
413
+ if (blurTimeoutRef.current) {
414
+ clearTimeout(blurTimeoutRef.current);
415
+ blurTimeoutRef.current = null;
416
+ }
417
+ inputValueRef.current = option.label;
418
+ const normalizedValue = normalizeValue(option.value);
419
+ setSelectedValue(normalizedValue);
420
+ setSearchTerm("");
421
+ setIsOpen(false);
422
+ if (enableSearch) {
423
+ setIsFocused(false);
424
+ }
425
+ setIsHovering(false);
426
+ if (onChange) onChange(option.value);
427
+ if (enableSearch) (_a = inputRef.current) == null ? void 0 : _a.blur();
428
+ },
429
+ [normalizeValue, onChange, enableSearch]
430
+ );
431
+ const handleClear = (0, import_react2.useCallback)(
432
+ (e) => {
433
+ var _a;
434
+ inputValueRef.current = "";
435
+ e.stopPropagation();
436
+ e.preventDefault();
437
+ setSelectedValue("");
438
+ setSearchTerm("");
439
+ if (enableSearch) {
440
+ setIsOpen(true);
441
+ setIsFocused(true);
442
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
443
+ } else {
444
+ setIsOpen(false);
445
+ setIsFocused(false);
446
+ }
447
+ if (onChange) onChange(null);
448
+ },
449
+ [onChange, enableSearch]
450
+ );
451
+ (0, import_react2.useEffect)(() => {
452
+ if (!validatedOptions.length) {
453
+ setSelectedValue("");
454
+ setSearchTerm("");
455
+ inputValueRef.current = "";
456
+ }
457
+ }, [validatedOptions.length]);
458
+ (0, import_react2.useEffect)(() => {
459
+ const externalValue = _valueProp !== void 0 ? _valueProp : valueSelected;
460
+ const newValue = normalizeValue(externalValue);
461
+ setSelectedValue((prevValue) => {
462
+ const prevNormalized = normalizeValue(prevValue);
463
+ return prevNormalized !== newValue ? newValue : prevValue;
464
+ });
465
+ }, [valueSelected, _valueProp, normalizeValue]);
466
+ (0, import_react2.useEffect)(() => {
467
+ const handleClickOutside = (event) => {
468
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
469
+ if (blurTimeoutRef.current) {
470
+ clearTimeout(blurTimeoutRef.current);
471
+ blurTimeoutRef.current = null;
472
+ }
473
+ setIsOpen(false);
474
+ setIsFocused(false);
475
+ setSearchTerm("");
476
+ setHighlightedIndex(-1);
477
+ }
478
+ };
479
+ document.addEventListener("mousedown", handleClickOutside);
480
+ return () => {
481
+ document.removeEventListener("mousedown", handleClickOutside);
482
+ if (blurTimeoutRef.current) {
483
+ clearTimeout(blurTimeoutRef.current);
484
+ }
485
+ if (hoverTimeoutRef.current) {
486
+ clearTimeout(hoverTimeoutRef.current);
487
+ }
488
+ };
489
+ }, []);
490
+ const getDisplayValue = (0, import_react2.useCallback)(() => {
491
+ if (selectedValue && (validatedOptions == null ? void 0 : validatedOptions.length) > 0) {
492
+ const selected = validatedOptions.find(
493
+ (opt) => normalizeValue(opt.value) === normalizeValue(selectedValue)
494
+ );
495
+ if (selected) {
496
+ return showDisplayValue && selected.displayValue ? selected.displayValue : selected.label;
497
+ }
498
+ }
499
+ if (selectedValue && (!validatedOptions || validatedOptions.length === 0)) {
500
+ return selectedValue;
501
+ }
502
+ return "";
503
+ }, [selectedValue, validatedOptions, showDisplayValue, normalizeValue]);
504
+ const displayValue = (0, import_react2.useMemo)(() => getDisplayValue(), [getDisplayValue]);
505
+ const inputClasses = (0, import_react2.useMemo)(() => {
506
+ return (0, import_clsx.default)(
507
+ "tw-w-full tw-rounded-xl tw-outline-none tw-transition-all tw-duration-200 tw-cursor-pointer tw-border-solid tw-text-color-text-default",
508
+ sizeClasses.input,
509
+ sizeClasses.padding,
510
+ variantClasses,
511
+ {
512
+ "tw-bg-white": valueSelected || displayValue || isFocused,
513
+ "tw-bg-color-gray-5": !valueSelected || !displayValue,
514
+ "!tw-bg-[#F8F7F6] tw-cursor-not-allowed tw-pointer-events-none": disabled
515
+ },
516
+ !label && "tw-flex tw-items-center",
517
+ {
518
+ "!tw-border-color-primary": isFocused && experience === "business"
519
+ },
520
+ {
521
+ "!tw-border-[#804D7B]": isFocused && experience === "personal"
522
+ },
523
+ error ? "!tw-border-color-text-critical " : "tw-border-[#EBE3DD] hover:tw-border-[#C5B7AC]",
524
+ "focus:tw-shadow-sm focus:tw-ring-offset-1",
525
+ className,
526
+ inputClassName
527
+ );
528
+ }, [sizeClasses, variantClasses, valueSelected, displayValue, isFocused, disabled, label, experience, error, className, inputClassName]);
529
+ const filteredOptions = (0, import_react2.useMemo)(() => {
530
+ var _a;
531
+ if (!enableSearch) {
532
+ return validatedOptions;
533
+ }
534
+ (_a = dropdownRef.current) == null ? void 0 : _a.scrollTo(0, 0);
535
+ const updatedFilteredOptions = validatedOptions.filter((option) => {
536
+ var _a2;
537
+ return (_a2 = option == null ? void 0 : option.label) == null ? void 0 : _a2.toLowerCase().includes(searchTerm == null ? void 0 : searchTerm.toLowerCase());
538
+ });
539
+ return updatedFilteredOptions;
540
+ }, [validatedOptions, searchTerm, enableSearch]);
541
+ const getSelectedOptionIndex = (0, import_react2.useCallback)(() => {
542
+ if (!selectedValue || !filteredOptions.length) {
543
+ return 0;
544
+ }
545
+ const index = filteredOptions.findIndex(
546
+ (option) => normalizeValue(option.value) === normalizeValue(selectedValue)
547
+ );
548
+ return index >= 0 ? index : 0;
549
+ }, [selectedValue, filteredOptions, normalizeValue]);
550
+ const handleInputInteraction = (0, import_react2.useCallback)(
551
+ (_e) => {
552
+ var _a;
553
+ if (blurTimeoutRef.current) {
554
+ clearTimeout(blurTimeoutRef.current);
555
+ blurTimeoutRef.current = null;
556
+ }
557
+ if (isOpen) {
558
+ setIsOpen(false);
559
+ setIsFocused(false);
560
+ setSearchTerm("");
561
+ setHighlightedIndex(-1);
562
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
563
+ return;
564
+ }
565
+ setIsFocused(true);
566
+ setIsOpen(true);
567
+ setHighlightedIndex(getSelectedOptionIndex());
568
+ if (inputRef.current) {
569
+ inputRef.current.focus();
570
+ }
571
+ },
572
+ [isOpen, getSelectedOptionIndex]
573
+ );
574
+ const handleKeyDown = (0, import_react2.useCallback)(
575
+ (e) => {
576
+ var _a;
577
+ if (!isOpen) return;
578
+ switch (e.key) {
579
+ case "ArrowDown":
580
+ e.preventDefault();
581
+ setHighlightedIndex((prev) => {
582
+ const nextIndex = prev < filteredOptions.length - 1 ? prev + 1 : prev;
583
+ return nextIndex;
584
+ });
585
+ break;
586
+ case "ArrowUp":
587
+ e.preventDefault();
588
+ setHighlightedIndex((prev) => {
589
+ const nextIndex = prev > 0 ? prev - 1 : prev;
590
+ return nextIndex;
591
+ });
592
+ break;
593
+ case "Enter":
594
+ e.preventDefault();
595
+ if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
596
+ handleOptionSelect(filteredOptions[highlightedIndex]);
597
+ }
598
+ break;
599
+ case "Escape":
600
+ e.preventDefault();
601
+ setIsOpen(false);
602
+ setIsFocused(false);
603
+ setSearchTerm("");
604
+ setHighlightedIndex(-1);
605
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
606
+ break;
607
+ default:
608
+ break;
609
+ }
610
+ },
611
+ [isOpen, highlightedIndex, filteredOptions, handleOptionSelect]
612
+ );
613
+ (0, import_react2.useEffect)(() => {
614
+ if (highlightedIndex >= 0 && optionRefs.current[highlightedIndex]) {
615
+ optionRefs.current[highlightedIndex].scrollIntoView({
616
+ block: "nearest",
617
+ behavior: "smooth"
618
+ });
619
+ }
620
+ }, [highlightedIndex]);
621
+ (0, import_react2.useEffect)(() => {
622
+ optionRefs.current = [];
623
+ }, [filteredOptions.length]);
624
+ const handleMouseEnter = (0, import_react2.useCallback)(() => {
625
+ if (hoverTimeoutRef.current) {
626
+ clearTimeout(hoverTimeoutRef.current);
627
+ }
628
+ if (!isHovering) {
629
+ setIsHovering(true);
630
+ }
631
+ }, [isHovering]);
632
+ const handleMouseLeave = (0, import_react2.useCallback)(() => {
633
+ hoverTimeoutRef.current = setTimeout(() => {
634
+ setIsHovering(false);
635
+ }, 50);
636
+ }, []);
637
+ const handleChevronClick = (0, import_react2.useCallback)(
638
+ (e) => {
639
+ var _a;
640
+ e.preventDefault();
641
+ if (blurTimeoutRef.current) {
642
+ clearTimeout(blurTimeoutRef.current);
643
+ blurTimeoutRef.current = null;
644
+ }
645
+ if (isOpen) {
646
+ setIsOpen(false);
647
+ setIsFocused(false);
648
+ setSearchTerm("");
649
+ setHighlightedIndex(-1);
650
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
651
+ } else {
652
+ if (inputRef.current) {
653
+ inputRef.current.focus();
654
+ }
655
+ handleInputInteraction();
656
+ }
657
+ },
658
+ [isOpen, handleInputInteraction]
659
+ );
660
+ const handleChevronMouseDown = (0, import_react2.useCallback)(
661
+ (e) => {
662
+ if (isHovering && selectedValue && allowClear) {
663
+ handleClear(e);
664
+ } else {
665
+ handleChevronClick(e);
666
+ }
667
+ },
668
+ [isHovering, selectedValue, allowClear, handleClear, handleChevronClick]
669
+ );
670
+ const handleOptionClick = (0, import_react2.useCallback)((option) => {
671
+ handleOptionSelect(option);
672
+ }, [handleOptionSelect]);
673
+ const handleOptionMouseEnter = (0, import_react2.useCallback)((index) => {
674
+ setHighlightedIndex(index);
675
+ }, []);
676
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(InputWrapper, { disabled, disabledTooltip, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
677
+ "div",
678
+ {
679
+ style,
680
+ className: (0, import_clsx.default)("tw-relative tw-w-full", wrapperClassName, {
681
+ "tw-cursor-not-allowed": disabled
682
+ }),
683
+ ref: dropdownRef,
684
+ onMouseEnter: handleMouseEnter,
685
+ onMouseLeave: handleMouseLeave,
686
+ children: [
687
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "tw-relative", children: [
688
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
689
+ "input",
690
+ {
691
+ ref: inputRef,
692
+ type: "text",
693
+ id,
694
+ name,
695
+ tabIndex,
696
+ autoComplete: "off",
697
+ autoCorrect: "off",
698
+ autoCapitalize: "off",
699
+ spellCheck: "false",
700
+ value: isFocused && enableSearch ? searchTerm : displayValue,
701
+ onChange: enableSearch ? handleSearchChange : void 0,
702
+ onClick: handleInputInteraction,
703
+ onKeyDown: handleKeyDown,
704
+ className: inputClasses,
705
+ readOnly: !isFocused || !enableSearch
706
+ }
707
+ ),
708
+ label && size !== "small" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
709
+ "label",
710
+ {
711
+ htmlFor: id,
712
+ className: (0, import_clsx.default)(
713
+ "tw-absolute tw-left-[18px] tw-pointer-events-none tw-transition-all tw-duration-200 tw-ease-out tw-text-gray-500",
714
+ isActive ? sizeClasses.labelActive : sizeClasses.labelInactive,
715
+ error && "tw-text-color-text-critical",
716
+ labelClassName
717
+ ),
718
+ children: [
719
+ label,
720
+ mandatory && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "tw-text-color-text-critical tw-ml-1", children: "*" })
721
+ ]
722
+ }
723
+ ),
724
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
725
+ "div",
726
+ {
727
+ className: (0, import_clsx.default)(
728
+ "tw-absolute tw-right-3 tw--translate-y-1/2 tw-flex tw-items-center",
729
+ {
730
+ "!tw-right-[5px]": doubleCharSearch && !(isHovering && selectedValue && allowClear),
731
+ "tw-top-3 !tw-right-2": size === "small",
732
+ "tw-top-1/2": size !== "small"
733
+ }
734
+ ),
735
+ children: [
736
+ 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 }) }),
737
+ 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)(
738
+ "div",
739
+ {
740
+ className: (0, import_clsx.default)(
741
+ "tw-transition-all tw-duration-200 tw-cursor-pointer tw-flex tw-items-center",
742
+ // Only rotate chevron when open and not showing clear icon
743
+ isOpen && !(isHovering && selectedValue && allowClear) && "-tw-rotate-180"
744
+ ),
745
+ onMouseDown: handleChevronMouseDown,
746
+ children: disabled ? null : isHovering && selectedValue && allowClear ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
747
+ CrossV2,
748
+ {
749
+ color: "#111827",
750
+ className: (0, import_clsx.default)({ "tw-mr-1": size !== "small" }),
751
+ size: size === "small" ? 12 : 16
752
+ }
753
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
754
+ Chevron,
755
+ {
756
+ className: (0, import_clsx.default)("tw-text-gray-400"),
757
+ color: "#6B7280"
758
+ }
759
+ )
760
+ }
761
+ )
762
+ ]
763
+ }
764
+ )
765
+ ] }),
766
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
767
+ "div",
768
+ {
769
+ className: (0, import_clsx.default)(
770
+ "tw-absolute tw-z-[100] tw-w-full tw-mt-0 tw-bg-white tw-border tw-border-[#ebe3dd] tw-border-solid tw-rounded-xl tw-shadow-lg tw-overflow-y-auto tw-py-1",
771
+ { "tw-max-h-60": !doubleCharSearch },
772
+ { "tw-max-h-44": doubleCharSearch },
773
+ dropdownClassName
774
+ ),
775
+ ref: optionListRef,
776
+ children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => {
777
+ const isSelected = normalizeValue(selectedValue) === normalizeValue(option.value);
778
+ const isHighlighted = index === highlightedIndex;
779
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { ref: (el) => optionRefs.current[index] = el, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
780
+ OptionItem,
781
+ {
782
+ option,
783
+ index,
784
+ isSelected,
785
+ isHighlighted,
786
+ experience,
787
+ size,
788
+ optionClassName,
789
+ onSelectHandler: handleOptionClick,
790
+ onMouseEnterHandler: handleOptionMouseEnter
791
+ }
792
+ ) }, doubleCharSearch ? option.label : option.value);
793
+ }) : /* @__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" })
794
+ }
795
+ )
796
+ ]
797
+ }
798
+ ) });
799
+ };
800
+ Select.displayName = "Select";
801
+ var Select_default = Select;
802
+ // Annotate the CommonJS export names for ESM import in node:
803
+ 0 && (module.exports = {
804
+ Select
805
+ });