@itilite/lumina-ui 1.1.4 → 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 (181) 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/Chevron.d.mts +13 -0
  6. package/dist/atom/RangePicker/Chevron.d.ts +13 -0
  7. package/dist/atom/RangePicker/Chevron.js +110 -0
  8. package/dist/atom/RangePicker/Chevron.mjs +7 -0
  9. package/dist/atom/RangePicker/RangePicker.d.mts +26 -0
  10. package/dist/atom/RangePicker/RangePicker.d.ts +26 -0
  11. package/dist/atom/RangePicker/RangePicker.js +1451 -0
  12. package/dist/atom/RangePicker/RangePicker.mjs +13 -0
  13. package/dist/atom/Select/Select.d.mts +43 -0
  14. package/dist/atom/Select/Select.d.ts +43 -0
  15. package/dist/atom/Select/Select.js +800 -0
  16. package/dist/atom/Select/Select.mjs +11 -0
  17. package/dist/chunk-22VF7AVT.mjs +618 -0
  18. package/dist/chunk-2BNAAOBU.mjs +670 -0
  19. package/dist/chunk-2IMRLK6M.mjs +44 -0
  20. package/dist/chunk-2JIINZEK.mjs +618 -0
  21. package/dist/chunk-2LBFKQDZ.mjs +660 -0
  22. package/dist/chunk-2ZJBF5C4.mjs +618 -0
  23. package/dist/chunk-33JITG5Y.mjs +621 -0
  24. package/dist/chunk-3IMCN4K3.mjs +670 -0
  25. package/dist/chunk-3K2RTVMH.mjs +584 -0
  26. package/dist/chunk-3KBQQCET.mjs +674 -0
  27. package/dist/chunk-3KUHXNFH.mjs +678 -0
  28. package/dist/chunk-3PPNOIXN.mjs +618 -0
  29. package/dist/chunk-3XFY3TXJ.mjs +611 -0
  30. package/dist/chunk-3XW7HS5W.mjs +618 -0
  31. package/dist/chunk-3YDCRJYV.mjs +618 -0
  32. package/dist/chunk-447HZYZ4.mjs +612 -0
  33. package/dist/chunk-46F3B4U6.mjs +618 -0
  34. package/dist/chunk-4K5RZHL4.mjs +618 -0
  35. package/dist/chunk-4QHFP4YD.mjs +666 -0
  36. package/dist/chunk-4TFX4DHY.mjs +702 -0
  37. package/dist/chunk-4TWO6JES.mjs +666 -0
  38. package/dist/chunk-4UQVJ3ZU.mjs +666 -0
  39. package/dist/chunk-5247J65D.mjs +670 -0
  40. package/dist/chunk-66H5WSEJ.mjs +618 -0
  41. package/dist/chunk-6NZEDJ2M.mjs +582 -0
  42. package/dist/chunk-6OGEXG5U.mjs +618 -0
  43. package/dist/chunk-6ROQXYVN.mjs +672 -0
  44. package/dist/chunk-6WNI6X5Q.mjs +618 -0
  45. package/dist/chunk-72PPCN6D.mjs +675 -0
  46. package/dist/chunk-74EGXFNN.mjs +618 -0
  47. package/dist/chunk-77NCDGJA.mjs +707 -0
  48. package/dist/chunk-7NGBIPZT.mjs +618 -0
  49. package/dist/chunk-7NM4FNMQ.mjs +666 -0
  50. package/dist/chunk-7YBBSVUA.mjs +672 -0
  51. package/dist/chunk-7Z52UP7P.mjs +618 -0
  52. package/dist/chunk-B3LDL3KD.mjs +670 -0
  53. package/dist/chunk-B65LGQ47.mjs +666 -0
  54. package/dist/chunk-B6MTRO54.mjs +618 -0
  55. package/dist/chunk-BJBP5XYB.mjs +618 -0
  56. package/dist/chunk-BLLSWPCC.mjs +618 -0
  57. package/dist/chunk-BOYB7REJ.mjs +670 -0
  58. package/dist/chunk-BP2D64XI.mjs +618 -0
  59. package/dist/chunk-BP4XS2GF.mjs +585 -0
  60. package/dist/chunk-BRT5IPGQ.mjs +618 -0
  61. package/dist/chunk-BTIIO2CP.mjs +582 -0
  62. package/dist/chunk-C2J3VBFZ.mjs +670 -0
  63. package/dist/chunk-CDOR7GQP.mjs +618 -0
  64. package/dist/chunk-CI2RMA4V.mjs +612 -0
  65. package/dist/chunk-CNUIZOQJ.mjs +669 -0
  66. package/dist/chunk-CPBXPEST.mjs +672 -0
  67. package/dist/chunk-CVOLXLMU.mjs +618 -0
  68. package/dist/chunk-CWUCNC36.mjs +666 -0
  69. package/dist/chunk-CZBGN6GS.mjs +612 -0
  70. package/dist/chunk-D3APB62N.mjs +618 -0
  71. package/dist/chunk-D5B2TUSL.mjs +591 -0
  72. package/dist/chunk-D7TWXVL2.mjs +674 -0
  73. package/dist/chunk-DAZ53AD7.mjs +671 -0
  74. package/dist/chunk-DBY5U6IU.mjs +618 -0
  75. package/dist/chunk-DXTVU4M5.mjs +618 -0
  76. package/dist/chunk-DZBTD6QK.mjs +666 -0
  77. package/dist/chunk-E6UPDTDY.mjs +611 -0
  78. package/dist/chunk-EAK2IMM4.mjs +37 -0
  79. package/dist/chunk-EQT2Q2LW.mjs +610 -0
  80. package/dist/chunk-EWMCELQV.mjs +670 -0
  81. package/dist/chunk-EYKWBEHX.mjs +612 -0
  82. package/dist/chunk-FHLCFUP6.mjs +666 -0
  83. package/dist/chunk-FMPFLQZV.mjs +670 -0
  84. package/dist/chunk-G25YXZ74.mjs +618 -0
  85. package/dist/chunk-G6P5MKL3.mjs +582 -0
  86. package/dist/chunk-GSG6ZC3R.mjs +37 -0
  87. package/dist/chunk-H3MQUFTJ.mjs +618 -0
  88. package/dist/chunk-HKZRLVBX.mjs +618 -0
  89. package/dist/chunk-HQALJGVT.mjs +618 -0
  90. package/dist/chunk-I5GBZ3UX.mjs +676 -0
  91. package/dist/chunk-IUTUCRDD.mjs +611 -0
  92. package/dist/chunk-IV4V55OA.mjs +672 -0
  93. package/dist/chunk-J2RAFKAD.mjs +618 -0
  94. package/dist/chunk-JCMSG75Q.mjs +51 -0
  95. package/dist/chunk-JL34UFI7.mjs +670 -0
  96. package/dist/chunk-JTKSGGQM.mjs +611 -0
  97. package/dist/chunk-JZC2RRDH.mjs +618 -0
  98. package/dist/chunk-JZCHXA6R.mjs +585 -0
  99. package/dist/chunk-K3Y7VKT6.mjs +670 -0
  100. package/dist/chunk-KEVXNUFG.mjs +672 -0
  101. package/dist/chunk-KH7D4ESJ.mjs +584 -0
  102. package/dist/chunk-KQBCWIIM.mjs +618 -0
  103. package/dist/chunk-KRYAP7NG.mjs +670 -0
  104. package/dist/chunk-KU655POK.mjs +657 -0
  105. package/dist/chunk-L55SLVNX.mjs +618 -0
  106. package/dist/chunk-LCRYOZEV.mjs +618 -0
  107. package/dist/chunk-LH7PP6V2.mjs +618 -0
  108. package/dist/chunk-LJMMYKE2.mjs +618 -0
  109. package/dist/chunk-LK5TROLL.mjs +666 -0
  110. package/dist/chunk-MDR7DAKM.mjs +618 -0
  111. package/dist/chunk-MJZLCWZ5.mjs +666 -0
  112. package/dist/chunk-MKZTEJLS.mjs +612 -0
  113. package/dist/chunk-MQCOQHHP.mjs +618 -0
  114. package/dist/chunk-MSM4KUBM.mjs +618 -0
  115. package/dist/chunk-MTIUER63.mjs +676 -0
  116. package/dist/chunk-NBLV3UX5.mjs +618 -0
  117. package/dist/chunk-NLADSOJS.mjs +618 -0
  118. package/dist/chunk-NPMTWR3Y.mjs +618 -0
  119. package/dist/chunk-NQ6GKEO7.mjs +670 -0
  120. package/dist/chunk-NZSFYNUK.mjs +618 -0
  121. package/dist/chunk-OCNF4O5U.mjs +612 -0
  122. package/dist/chunk-OCW5QSWA.mjs +618 -0
  123. package/dist/chunk-OQF7JZFS.mjs +670 -0
  124. package/dist/chunk-OT675HGC.mjs +670 -0
  125. package/dist/chunk-P47TCYKN.mjs +618 -0
  126. package/dist/chunk-P7TOGXPI.mjs +672 -0
  127. package/dist/chunk-PCAXXEEQ.mjs +618 -0
  128. package/dist/chunk-PDHMG7OZ.mjs +672 -0
  129. package/dist/chunk-PFGVOZGM.mjs +618 -0
  130. package/dist/chunk-PGAAFJOG.mjs +576 -0
  131. package/dist/chunk-PQSSDK3E.mjs +618 -0
  132. package/dist/chunk-PST7W3NG.mjs +618 -0
  133. package/dist/chunk-QGPBZ2YV.mjs +664 -0
  134. package/dist/chunk-QKTMWS4J.mjs +43 -0
  135. package/dist/chunk-QOPCJITC.mjs +618 -0
  136. package/dist/chunk-QSE52CRC.mjs +618 -0
  137. package/dist/chunk-QTP2QMPL.mjs +669 -0
  138. package/dist/chunk-QUZAACW5.mjs +585 -0
  139. package/dist/chunk-R47XX6IW.mjs +611 -0
  140. package/dist/chunk-RL6AEU6E.mjs +612 -0
  141. package/dist/chunk-RZ7V2KQZ.mjs +621 -0
  142. package/dist/chunk-S3CUYIE3.mjs +585 -0
  143. package/dist/chunk-T7T4HCHH.mjs +618 -0
  144. package/dist/chunk-TED2WCDG.mjs +618 -0
  145. package/dist/chunk-TENXL4LK.mjs +107 -0
  146. package/dist/chunk-TJLIMMMB.mjs +612 -0
  147. package/dist/chunk-TNOJDLON.mjs +611 -0
  148. package/dist/chunk-TOR67IHH.mjs +672 -0
  149. package/dist/chunk-TOV7NVKM.mjs +618 -0
  150. package/dist/chunk-TSYMIRRN.mjs +618 -0
  151. package/dist/chunk-TTSRI4V7.mjs +708 -0
  152. package/dist/chunk-UBS3DTE5.mjs +672 -0
  153. package/dist/chunk-UBW6RYVF.mjs +670 -0
  154. package/dist/chunk-UFAFA6RV.mjs +585 -0
  155. package/dist/chunk-UJNUFKR5.mjs +43 -0
  156. package/dist/chunk-VAZZJOSJ.mjs +618 -0
  157. package/dist/chunk-VCWXOX2B.mjs +618 -0
  158. package/dist/chunk-VHCLEOHZ.mjs +618 -0
  159. package/dist/chunk-VTZSCGME.mjs +666 -0
  160. package/dist/chunk-W33KZ2XR.mjs +618 -0
  161. package/dist/chunk-WOVMTYDV.mjs +612 -0
  162. package/dist/chunk-WR3USBWK.mjs +672 -0
  163. package/dist/chunk-WXYQARQ6.mjs +618 -0
  164. package/dist/chunk-XE4LPYOW.mjs +581 -0
  165. package/dist/chunk-Y6XKW4NG.mjs +618 -0
  166. package/dist/chunk-YQSNJFZE.mjs +618 -0
  167. package/dist/chunk-Z6VG6AG7.mjs +678 -0
  168. package/dist/chunk-ZAPKQ4C3.mjs +678 -0
  169. package/dist/chunk-ZCWDQNHL.mjs +618 -0
  170. package/dist/chunk-ZF5JBNCI.mjs +618 -0
  171. package/dist/chunk-ZN7BHWOF.mjs +672 -0
  172. package/dist/chunk-ZTRM4HZJ.mjs +53 -0
  173. package/dist/chunk-ZUMHWVMV.mjs +585 -0
  174. package/dist/chunk-ZUQJKA5J.mjs +666 -0
  175. package/dist/chunk-ZWHWIGYQ.mjs +618 -0
  176. package/dist/index.d.mts +4 -0
  177. package/dist/index.d.ts +4 -0
  178. package/dist/index.js +1350 -0
  179. package/dist/index.mjs +22 -9
  180. package/dist/styles.css +845 -228
  181. package/package.json +4 -2
@@ -0,0 +1,1451 @@
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/RangePicker/RangePicker.tsx
60
+ var RangePicker_exports = {};
61
+ __export(RangePicker_exports, {
62
+ RangePicker: () => CustomRangePicker,
63
+ default: () => RangePicker_default
64
+ });
65
+ module.exports = __toCommonJS(RangePicker_exports);
66
+ var import_react3 = require("react");
67
+ var import_clsx2 = __toESM(require("clsx"));
68
+ var import_dayjs = __toESM(require("dayjs"));
69
+
70
+ // src/atom/RangePicker/Chevron.tsx
71
+ var React = __toESM(require("react"));
72
+ var import_jsx_runtime = require("react/jsx-runtime");
73
+ var Chevron = React.memo(
74
+ (_a) => {
75
+ var _b = _a, { size = "normal", color = "black", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
76
+ const getSize = (size2) => {
77
+ switch (size2) {
78
+ case "small":
79
+ return "M9.78 11.78a.75.75 0 000-1.06L7.06 8l2.72-2.72a.75.75 0 00-1.06-1.06L5.47 7.47a.75.75 0 000 1.06l3.25 3.25a.75.75 0 001.06 0z";
80
+ case "normal":
81
+ return "M14.78 17.78a.75.75 0 000-1.06L10.06 12l4.72-4.72a.75.75 0 00-1.06-1.06l-5.25 5.25a.75.75 0 000 1.06l5.25 5.25a.75.75 0 001.06 0z";
82
+ default:
83
+ return "M14.78 17.78a.75.75 0 000-1.06L10.06 12l4.72-4.72a.75.75 0 00-1.06-1.06l-5.25 5.25a.75.75 0 000 1.06l5.25 5.25a.75.75 0 001.06 0z";
84
+ }
85
+ };
86
+ const getContainer = (size2) => {
87
+ switch (size2) {
88
+ case "small":
89
+ return 16;
90
+ case "medium":
91
+ return 20;
92
+ case "normal":
93
+ return 24;
94
+ default:
95
+ return 24;
96
+ }
97
+ };
98
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
99
+ "svg",
100
+ __spreadProps(__spreadValues({
101
+ xmlns: "http://www.w3.org/2000/svg",
102
+ width: getContainer(size),
103
+ height: getContainer(size),
104
+ fill: "none",
105
+ viewBox: `0 0 ${getContainer(size)} ${getContainer(size)}`,
106
+ className
107
+ }, rest), {
108
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: color, d: getSize(size) })
109
+ })
110
+ );
111
+ }
112
+ );
113
+
114
+ // src/atom/RangePicker/RangePicker.module.scss
115
+ var RangePicker_module_default = { "range_start": "RangePicker-module__range_start___hGQp-", "range_end": "RangePicker-module__range_end___JJNib" };
116
+
117
+ // src/atom/Select/Select.tsx
118
+ var import_react2 = require("react");
119
+ var import_clsx = __toESM(require("clsx"));
120
+
121
+ // src/icons/Chevron.tsx
122
+ var React2 = __toESM(require("react"));
123
+ var import_jsx_runtime2 = require("react/jsx-runtime");
124
+ var Chevron2 = React2.memo(
125
+ (_a) => {
126
+ var _b = _a, { size = 16, color = "#6b7280", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
127
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
128
+ "svg",
129
+ __spreadProps(__spreadValues({
130
+ xmlns: "http://www.w3.org/2000/svg",
131
+ width: size,
132
+ height: size,
133
+ fill: "none",
134
+ viewBox: "0 0 16 16",
135
+ className
136
+ }, rest), {
137
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
138
+ "path",
139
+ {
140
+ fill: color,
141
+ 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"
142
+ }
143
+ )
144
+ })
145
+ );
146
+ }
147
+ );
148
+ Chevron2.displayName = "Chevron";
149
+
150
+ // src/icons/CrossV2.tsx
151
+ var React3 = __toESM(require("react"));
152
+ var import_jsx_runtime3 = require("react/jsx-runtime");
153
+ var CrossV2 = React3.memo(
154
+ (_a) => {
155
+ var _b = _a, { size = 16, color = "#111827", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
156
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
157
+ "svg",
158
+ __spreadProps(__spreadValues({
159
+ xmlns: "http://www.w3.org/2000/svg",
160
+ width: size,
161
+ height: size,
162
+ fill: "none",
163
+ viewBox: "0 0 20 20"
164
+ }, rest), {
165
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
166
+ "path",
167
+ {
168
+ fill: color,
169
+ 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"
170
+ }
171
+ )
172
+ })
173
+ );
174
+ }
175
+ );
176
+ CrossV2.displayName = "CrossV2";
177
+
178
+ // src/icons/Lock.tsx
179
+ var import_react = __toESM(require("react"));
180
+ var import_jsx_runtime4 = require("react/jsx-runtime");
181
+ var Lock = import_react.default.memo((_a) => {
182
+ var _b = _a, { size = 16, color = "#000" } = _b, rest = __objRest(_b, ["size", "color"]);
183
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
184
+ "svg",
185
+ __spreadProps(__spreadValues({
186
+ xmlns: "http://www.w3.org/2000/svg",
187
+ width: size,
188
+ height: size,
189
+ fill: "none",
190
+ viewBox: "0 0 16 16"
191
+ }, rest), {
192
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
193
+ "path",
194
+ {
195
+ fill: color,
196
+ 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"
197
+ }
198
+ )
199
+ })
200
+ );
201
+ });
202
+
203
+ // src/atom/Tooltip/Tooltip.tsx
204
+ var import_antd = require("antd");
205
+
206
+ // src/atom/Tooltip/Tooltip.module.scss
207
+ var Tooltip_module_default = { "light": "Tooltip-module__light___H5oCc" };
208
+
209
+ // src/atom/Tooltip/Tooltip.tsx
210
+ var import_jsx_runtime5 = require("react/jsx-runtime");
211
+ var Tooltip = (_a) => {
212
+ var _b = _a, {
213
+ children,
214
+ title = "",
215
+ placement = "top",
216
+ color = "#1F2937",
217
+ className,
218
+ mode = "dark"
219
+ } = _b, rest = __objRest(_b, [
220
+ "children",
221
+ "title",
222
+ "placement",
223
+ "color",
224
+ "className",
225
+ "mode"
226
+ ]);
227
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
228
+ import_antd.Tooltip,
229
+ __spreadProps(__spreadValues({
230
+ className,
231
+ color,
232
+ title,
233
+ placement,
234
+ overlayClassName: mode === "light" ? Tooltip_module_default.light : ""
235
+ }, rest), {
236
+ children
237
+ })
238
+ );
239
+ };
240
+ Tooltip.displayName = "Tooltip";
241
+ var Tooltip_default = Tooltip;
242
+
243
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
244
+ var import_icons = require("@ant-design/icons");
245
+ var import_antd2 = require("antd");
246
+
247
+ // src/atom/LoadingSpinner/LoadingSpinner.module.scss
248
+ var LoadingSpinner_module_default = { "spinnerContainer": "LoadingSpinner-module__spinnerContainer___DiPLf" };
249
+
250
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
251
+ var import_jsx_runtime6 = require("react/jsx-runtime");
252
+ var sizeMapping = {
253
+ xs: 16,
254
+ small: 24,
255
+ medium: 36,
256
+ large: 48
257
+ };
258
+ var LoadingSpinner = (_a) => {
259
+ var _b = _a, { size = "small", color = "#ec5d25" } = _b, rest = __objRest(_b, ["size", "color"]);
260
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", __spreadProps(__spreadValues({ className: LoadingSpinner_module_default.spinnerContainer }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
261
+ import_antd2.Spin,
262
+ {
263
+ indicator: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
264
+ import_icons.LoadingOutlined,
265
+ {
266
+ style: { fontSize: sizeMapping[size], color },
267
+ spin: true
268
+ }
269
+ )
270
+ }
271
+ ) }));
272
+ };
273
+ LoadingSpinner.displayName = "LoadingSpinner";
274
+ var LoadingSpinner_default = LoadingSpinner;
275
+
276
+ // src/atom/Select/Select.tsx
277
+ var import_jsx_runtime7 = require("react/jsx-runtime");
278
+ var Select = ({
279
+ label,
280
+ mandatory = false,
281
+ error = false,
282
+ options = [],
283
+ valueSelected = "",
284
+ // Keep for backward compatibility
285
+ value: _valueProp,
286
+ // Rename to avoid potential conflicts with native value attribute
287
+ onChange,
288
+ onSearch,
289
+ isLoading = false,
290
+ disabled = false,
291
+ disabledTooltip = "",
292
+ className = "",
293
+ dropdownClassName = "",
294
+ optionClassName = "",
295
+ style = {},
296
+ showDisplayValue = false,
297
+ // New prop to show displayValue instead of label
298
+ allowClear = true,
299
+ enableSearch = true,
300
+ doubleCharSearch = false,
301
+ id,
302
+ name,
303
+ tabIndex,
304
+ // Add tabIndex prop
305
+ // Additional styling props
306
+ size = "default",
307
+ // 'small', 'default', 'large'
308
+ variant = "default",
309
+ // 'default', 'filled', 'outlined'
310
+ wrapperClassName = "",
311
+ inputClassName = "",
312
+ // Custom class for input element specifically
313
+ labelClassName = "",
314
+ // Custom class for label element specifically
315
+ height = "tw-h-12",
316
+ // Custom height
317
+ experience = "business"
318
+ }) => {
319
+ const normalizeValue = (0, import_react2.useCallback)(
320
+ (val) => {
321
+ if (val === null || val === void 0) return "";
322
+ return String(val);
323
+ },
324
+ []
325
+ );
326
+ const validatedOptions = (0, import_react2.useMemo)(() => {
327
+ if (!Array.isArray(options)) return [];
328
+ return options.filter(
329
+ (opt) => opt && typeof opt === "object" && opt.value !== void 0 && opt.value !== null && opt.label !== void 0
330
+ );
331
+ }, [options]);
332
+ const [isOpen, setIsOpen] = (0, import_react2.useState)(false);
333
+ const [isFocused, setIsFocused] = (0, import_react2.useState)(false);
334
+ const [searchTerm, setSearchTerm] = (0, import_react2.useState)("");
335
+ const [isHovering, setIsHovering] = (0, import_react2.useState)(false);
336
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react2.useState)(-1);
337
+ const [selectedValue, setSelectedValue] = (0, import_react2.useState)(() => {
338
+ const initialValue = valueSelected;
339
+ if (initialValue === null || initialValue === void 0) return "";
340
+ return String(initialValue);
341
+ });
342
+ const inputRef = (0, import_react2.useRef)(null);
343
+ const inputValueRef = (0, import_react2.useRef)("");
344
+ const dropdownRef = (0, import_react2.useRef)(null);
345
+ const optionRefs = (0, import_react2.useRef)([]);
346
+ const optionListRef = (0, import_react2.useRef)(null);
347
+ const blurTimeoutRef = (0, import_react2.useRef)(null);
348
+ const hoverTimeoutRef = (0, import_react2.useRef)(null);
349
+ const isActive = isFocused || Boolean(selectedValue) || Boolean(valueSelected) || Boolean(searchTerm);
350
+ const sizeClasses = (0, import_react2.useMemo)(() => {
351
+ switch (size) {
352
+ case "small":
353
+ return {
354
+ input: "tw-h-6 tw-px-3 tw-typography-caption1Bold !tw-rounded-lg",
355
+ padding: "tw-px-2 tw-py-1",
356
+ labelActive: "tw-top-0.5 tw-typography-caption2",
357
+ labelInactive: "tw-top-1.5 tw-typography-caption3"
358
+ };
359
+ case "medium":
360
+ return {
361
+ input: "tw-h-10 tw-px-4 tw-typography-body2",
362
+ padding: label ? "tw-pt-4 tw-pb-1" : "tw-py-2",
363
+ labelActive: "tw-top-1 tw-typography-caption3",
364
+ labelInactive: "tw-top-2.5 tw-typography-body2"
365
+ };
366
+ case "large":
367
+ return {
368
+ input: "tw-h-16 tw-px-5 tw-typography-bodyLarge",
369
+ padding: label ? "tw-pt-8 tw-pb-4" : "tw-py-5",
370
+ labelActive: "tw-top-1 tw-typography-caption2",
371
+ labelInactive: "tw-top-5 tw-typography-body1"
372
+ };
373
+ default:
374
+ return {
375
+ input: height + " tw-px-4 tw-typography-bodyLarge",
376
+ padding: label ? "tw-pt-6 tw-pb-3" : "tw-py-3",
377
+ labelActive: "tw-top-1 tw-typography-caption3",
378
+ labelInactive: "tw-top-3.5 tw-typography-body2"
379
+ };
380
+ }
381
+ }, [size, label, height]);
382
+ const variantClasses = (0, import_react2.useMemo)(() => {
383
+ switch (variant) {
384
+ case "filled":
385
+ return "tw-bg-gray-50 tw-border-transparent";
386
+ case "outlined":
387
+ return "tw-bg-transparent tw-border-2";
388
+ default:
389
+ return " tw-border";
390
+ }
391
+ }, [variant]);
392
+ const handleBlur = (0, import_react2.useCallback)(() => {
393
+ blurTimeoutRef.current = setTimeout(() => {
394
+ setIsOpen(false);
395
+ setSearchTerm("");
396
+ setHighlightedIndex(-1);
397
+ blurTimeoutRef.current = null;
398
+ setIsFocused(false);
399
+ }, 150);
400
+ }, []);
401
+ const handleSearchChange = (0, import_react2.useCallback)(
402
+ (e) => {
403
+ var _a;
404
+ const searchValue = doubleCharSearch ? e.target.value.slice(0, 2) || "" : e.target.value;
405
+ if (doubleCharSearch) {
406
+ setSearchTerm(searchValue);
407
+ } else {
408
+ setSearchTerm(searchValue);
409
+ }
410
+ setIsOpen(true);
411
+ setHighlightedIndex(-1);
412
+ if (onSearch && typeof onSearch === "function") {
413
+ onSearch(searchValue);
414
+ }
415
+ (_a = optionListRef == null ? void 0 : optionListRef.current) == null ? void 0 : _a.scrollTo({
416
+ top: 0,
417
+ behavior: "smooth"
418
+ });
419
+ },
420
+ [doubleCharSearch, onSearch]
421
+ );
422
+ const handleOptionSelect = (0, import_react2.useCallback)(
423
+ (option) => {
424
+ var _a;
425
+ if (blurTimeoutRef.current) {
426
+ clearTimeout(blurTimeoutRef.current);
427
+ blurTimeoutRef.current = null;
428
+ }
429
+ inputValueRef.current = option.label;
430
+ const normalizedValue = normalizeValue(option.value);
431
+ setSelectedValue(normalizedValue);
432
+ setSearchTerm("");
433
+ setIsOpen(false);
434
+ if (enableSearch) {
435
+ setIsFocused(false);
436
+ }
437
+ setIsHovering(false);
438
+ if (onChange) onChange(option.value);
439
+ if (enableSearch) (_a = inputRef.current) == null ? void 0 : _a.blur();
440
+ },
441
+ [normalizeValue, onChange, enableSearch]
442
+ );
443
+ const handleClear = (0, import_react2.useCallback)(
444
+ (e) => {
445
+ var _a;
446
+ inputValueRef.current = "";
447
+ e.stopPropagation();
448
+ e.preventDefault();
449
+ setSelectedValue("");
450
+ setSearchTerm("");
451
+ if (enableSearch) {
452
+ setIsOpen(true);
453
+ setIsFocused(true);
454
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
455
+ } else {
456
+ setIsOpen(false);
457
+ setIsFocused(false);
458
+ }
459
+ if (onChange) onChange(null);
460
+ },
461
+ [onChange, enableSearch]
462
+ );
463
+ (0, import_react2.useEffect)(() => {
464
+ if (!validatedOptions.length) {
465
+ setSelectedValue("");
466
+ setSearchTerm("");
467
+ inputValueRef.current = "";
468
+ }
469
+ }, [validatedOptions.length]);
470
+ (0, import_react2.useEffect)(() => {
471
+ const externalValue = _valueProp !== void 0 ? _valueProp : valueSelected;
472
+ const newValue = normalizeValue(externalValue);
473
+ setSelectedValue((prevValue) => {
474
+ const prevNormalized = normalizeValue(prevValue);
475
+ return prevNormalized !== newValue ? newValue : prevValue;
476
+ });
477
+ }, [valueSelected, _valueProp, normalizeValue]);
478
+ (0, import_react2.useEffect)(() => {
479
+ const handleClickOutside = (event) => {
480
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
481
+ if (blurTimeoutRef.current) {
482
+ clearTimeout(blurTimeoutRef.current);
483
+ blurTimeoutRef.current = null;
484
+ }
485
+ setIsOpen(false);
486
+ setIsFocused(false);
487
+ setSearchTerm("");
488
+ setHighlightedIndex(-1);
489
+ }
490
+ };
491
+ document.addEventListener("mousedown", handleClickOutside);
492
+ return () => {
493
+ document.removeEventListener("mousedown", handleClickOutside);
494
+ if (blurTimeoutRef.current) {
495
+ clearTimeout(blurTimeoutRef.current);
496
+ }
497
+ if (hoverTimeoutRef.current) {
498
+ clearTimeout(hoverTimeoutRef.current);
499
+ }
500
+ };
501
+ }, []);
502
+ const getDisplayValue = (0, import_react2.useCallback)(() => {
503
+ if (selectedValue && (validatedOptions == null ? void 0 : validatedOptions.length) > 0) {
504
+ const selected = validatedOptions.find(
505
+ (opt) => normalizeValue(opt.value) === normalizeValue(selectedValue)
506
+ );
507
+ if (selected) {
508
+ return showDisplayValue && selected.displayValue ? selected.displayValue : selected.label;
509
+ }
510
+ }
511
+ if (selectedValue && (!validatedOptions || validatedOptions.length === 0)) {
512
+ return selectedValue;
513
+ }
514
+ return "";
515
+ }, [selectedValue, validatedOptions, showDisplayValue, normalizeValue]);
516
+ const filteredOptions = (0, import_react2.useMemo)(() => {
517
+ var _a;
518
+ if (!enableSearch) {
519
+ return validatedOptions;
520
+ }
521
+ (_a = dropdownRef.current) == null ? void 0 : _a.scrollTo(0, 0);
522
+ const updatedFilteredOptions = validatedOptions.filter((option) => {
523
+ var _a2;
524
+ return (_a2 = option == null ? void 0 : option.label) == null ? void 0 : _a2.toLowerCase().includes(searchTerm == null ? void 0 : searchTerm.toLowerCase());
525
+ });
526
+ return updatedFilteredOptions;
527
+ }, [validatedOptions, searchTerm, enableSearch]);
528
+ const getSelectedOptionIndex = (0, import_react2.useCallback)(() => {
529
+ if (!selectedValue || !filteredOptions.length) {
530
+ return 0;
531
+ }
532
+ const index = filteredOptions.findIndex(
533
+ (option) => normalizeValue(option.value) === normalizeValue(selectedValue)
534
+ );
535
+ return index >= 0 ? index : 0;
536
+ }, [selectedValue, filteredOptions, normalizeValue]);
537
+ const handleInputInteraction = (0, import_react2.useCallback)(
538
+ (_e) => {
539
+ var _a;
540
+ if (blurTimeoutRef.current) {
541
+ clearTimeout(blurTimeoutRef.current);
542
+ blurTimeoutRef.current = null;
543
+ }
544
+ if (isOpen) {
545
+ setIsOpen(false);
546
+ setIsFocused(false);
547
+ setSearchTerm("");
548
+ setHighlightedIndex(-1);
549
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
550
+ return;
551
+ }
552
+ setIsFocused(true);
553
+ setIsOpen(true);
554
+ setHighlightedIndex(getSelectedOptionIndex());
555
+ if (inputRef.current) {
556
+ inputRef.current.focus();
557
+ }
558
+ },
559
+ [isOpen, getSelectedOptionIndex]
560
+ );
561
+ const handleKeyDown = (0, import_react2.useCallback)(
562
+ (e) => {
563
+ var _a;
564
+ if (!isOpen) return;
565
+ switch (e.key) {
566
+ case "ArrowDown":
567
+ e.preventDefault();
568
+ setHighlightedIndex((prev) => {
569
+ const nextIndex = prev < filteredOptions.length - 1 ? prev + 1 : prev;
570
+ return nextIndex;
571
+ });
572
+ break;
573
+ case "ArrowUp":
574
+ e.preventDefault();
575
+ setHighlightedIndex((prev) => {
576
+ const nextIndex = prev > 0 ? prev - 1 : prev;
577
+ return nextIndex;
578
+ });
579
+ break;
580
+ case "Enter":
581
+ e.preventDefault();
582
+ if (highlightedIndex >= 0 && filteredOptions[highlightedIndex]) {
583
+ handleOptionSelect(filteredOptions[highlightedIndex]);
584
+ }
585
+ break;
586
+ case "Escape":
587
+ e.preventDefault();
588
+ setIsOpen(false);
589
+ setIsFocused(false);
590
+ setSearchTerm("");
591
+ setHighlightedIndex(-1);
592
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
593
+ break;
594
+ default:
595
+ break;
596
+ }
597
+ },
598
+ [isOpen, highlightedIndex, filteredOptions, handleOptionSelect]
599
+ );
600
+ (0, import_react2.useEffect)(() => {
601
+ if (highlightedIndex >= 0 && optionRefs.current[highlightedIndex]) {
602
+ optionRefs.current[highlightedIndex].scrollIntoView({
603
+ block: "nearest",
604
+ behavior: "smooth"
605
+ });
606
+ }
607
+ }, [highlightedIndex]);
608
+ (0, import_react2.useEffect)(() => {
609
+ optionRefs.current = [];
610
+ }, [filteredOptions]);
611
+ const handleMouseEnter = (0, import_react2.useCallback)(() => {
612
+ if (hoverTimeoutRef.current) {
613
+ clearTimeout(hoverTimeoutRef.current);
614
+ }
615
+ if (!isHovering) {
616
+ setIsHovering(true);
617
+ }
618
+ }, [isHovering]);
619
+ const handleMouseLeave = (0, import_react2.useCallback)(() => {
620
+ hoverTimeoutRef.current = setTimeout(() => {
621
+ setIsHovering(false);
622
+ }, 50);
623
+ }, []);
624
+ const handleChevronClick = (0, import_react2.useCallback)(
625
+ (e) => {
626
+ var _a;
627
+ e.preventDefault();
628
+ if (blurTimeoutRef.current) {
629
+ clearTimeout(blurTimeoutRef.current);
630
+ blurTimeoutRef.current = null;
631
+ }
632
+ if (isOpen) {
633
+ setIsOpen(false);
634
+ setIsFocused(false);
635
+ setSearchTerm("");
636
+ setHighlightedIndex(-1);
637
+ (_a = inputRef.current) == null ? void 0 : _a.blur();
638
+ } else {
639
+ if (inputRef.current) {
640
+ inputRef.current.focus();
641
+ }
642
+ handleInputInteraction();
643
+ }
644
+ },
645
+ [isOpen, handleInputInteraction]
646
+ );
647
+ const InputWrapper = ({ children }) => {
648
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Tooltip_default, { title: disabledTooltip, children });
649
+ return children;
650
+ };
651
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(InputWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
652
+ "div",
653
+ {
654
+ style,
655
+ className: (0, import_clsx.default)("tw-relative tw-w-full", wrapperClassName, {
656
+ "tw-cursor-not-allowed": disabled
657
+ }),
658
+ ref: dropdownRef,
659
+ onMouseEnter: handleMouseEnter,
660
+ onMouseLeave: handleMouseLeave,
661
+ children: [
662
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "tw-relative", children: [
663
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
664
+ "input",
665
+ {
666
+ ref: inputRef,
667
+ type: "text",
668
+ id,
669
+ name,
670
+ tabIndex,
671
+ autoComplete: "off",
672
+ autoCorrect: "off",
673
+ autoCapitalize: "off",
674
+ spellCheck: "false",
675
+ value: isFocused && enableSearch ? searchTerm : getDisplayValue(),
676
+ onChange: enableSearch ? handleSearchChange : void 0,
677
+ onClick: handleInputInteraction,
678
+ onKeyDown: handleKeyDown,
679
+ className: (0, import_clsx.default)(
680
+ "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",
681
+ sizeClasses.input,
682
+ sizeClasses.padding,
683
+ variantClasses,
684
+ {
685
+ "tw-bg-white": valueSelected || getDisplayValue() || isFocused,
686
+ "tw-bg-color-gray-5": !valueSelected || !getDisplayValue(),
687
+ "!tw-bg-[#F8F7F6] tw-cursor-not-allowed tw-pointer-events-none": disabled
688
+ },
689
+ // Conditional padding based on label presence
690
+ !label && "tw-flex tw-items-center",
691
+ {
692
+ "!tw-border-color-primary": isFocused && experience === "business"
693
+ },
694
+ {
695
+ "!tw-border-[#804D7B]": isFocused && experience === "personal"
696
+ },
697
+ error ? "!tw-border-color-text-critical " : "tw-border-[#EBE3DD] hover:tw-border-[#C5B7AC]",
698
+ // Add focus state styling
699
+ "focus:tw-shadow-sm focus:tw-ring-offset-1",
700
+ className,
701
+ inputClassName
702
+ // Put inputClassName last so it can override default classes
703
+ ),
704
+ readOnly: !isFocused || !enableSearch
705
+ }
706
+ ),
707
+ label && size !== "small" && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
708
+ "label",
709
+ {
710
+ htmlFor: id,
711
+ className: (0, import_clsx.default)(
712
+ "tw-absolute tw-left-[18px] tw-pointer-events-none tw-transition-all tw-duration-200 tw-ease-out tw-text-gray-500",
713
+ isActive ? sizeClasses.labelActive : sizeClasses.labelInactive,
714
+ error && "tw-text-color-text-critical",
715
+ labelClassName
716
+ ),
717
+ children: [
718
+ label,
719
+ mandatory && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "tw-text-color-text-critical tw-ml-1", children: "*" })
720
+ ]
721
+ }
722
+ ),
723
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
724
+ "div",
725
+ {
726
+ className: (0, import_clsx.default)(
727
+ "tw-absolute tw-right-3 tw--translate-y-1/2 tw-flex tw-items-center",
728
+ {
729
+ "!tw-right-[5px]": doubleCharSearch && !(isHovering && selectedValue && allowClear),
730
+ "tw-top-3.5 !tw-right-2": size === "small",
731
+ "tw-top-1/2": size !== "small"
732
+ }
733
+ ),
734
+ children: [
735
+ disabled && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "tw-absolute tw-right-0 -tw-top-2", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Lock, { size: 16 }) }),
736
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LoadingSpinner_default, { size: "xs" }) }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
737
+ "div",
738
+ {
739
+ className: (0, import_clsx.default)(
740
+ "tw-transition-all tw-duration-200 tw-cursor-pointer tw-flex tw-items-center",
741
+ // Only rotate chevron when open and not showing clear icon
742
+ isOpen && !(isHovering && selectedValue && allowClear) && "-tw-rotate-180"
743
+ ),
744
+ onMouseDown: (e) => {
745
+ if (isHovering && selectedValue && allowClear) {
746
+ handleClear(e);
747
+ } else {
748
+ handleChevronClick(e);
749
+ }
750
+ },
751
+ children: disabled ? null : isHovering && selectedValue && allowClear ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
752
+ CrossV2,
753
+ {
754
+ color: "#111827",
755
+ className: (0, import_clsx.default)({ "tw-mr-1": size !== "small" }),
756
+ size: size === "small" ? 12 : 16
757
+ }
758
+ ) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
759
+ Chevron2,
760
+ {
761
+ className: (0, import_clsx.default)("tw-text-gray-400"),
762
+ color: "#6B7280"
763
+ }
764
+ )
765
+ }
766
+ )
767
+ ]
768
+ }
769
+ )
770
+ ] }),
771
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
772
+ "div",
773
+ {
774
+ className: (0, import_clsx.default)(
775
+ "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",
776
+ { "tw-max-h-60": !doubleCharSearch },
777
+ { "tw-max-h-44": doubleCharSearch },
778
+ dropdownClassName
779
+ ),
780
+ ref: optionListRef,
781
+ children: filteredOptions.length > 0 ? filteredOptions.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
782
+ "div",
783
+ {
784
+ ref: (el) => optionRefs.current[index] = el,
785
+ onClick: () => handleOptionSelect(option),
786
+ onMouseEnter: () => setHighlightedIndex(index),
787
+ className: (0, import_clsx.default)(
788
+ "tw-transition-all tw-duration-150 tw-typography-body2",
789
+ // Selected option styling
790
+ optionClassName
791
+ ),
792
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
793
+ "div",
794
+ {
795
+ className: (0, import_clsx.default)(
796
+ "tw-px-4 tw-cursor-pointer tw-py-2 tw-mx-0.5 tw-rounded-xl",
797
+ normalizeValue(selectedValue) === normalizeValue(option.value) ? experience === "personal" ? "tw-bg-[#f1e8fa]" : "tw-bg-[#fff1e1]" : (
798
+ // Highlighted option styling (keyboard navigation)
799
+ index === highlightedIndex ? "tw-bg-[#f3f4f6] tw-text-gray-900" : (
800
+ // Default option styling
801
+ "tw-text-gray-900 hover:tw-bg-[#1118270a]"
802
+ )
803
+ )
804
+ ),
805
+ children: option.label
806
+ }
807
+ )
808
+ },
809
+ doubleCharSearch ? option.label : option.value
810
+ )) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "tw-px-4 tw-py-3 tw-text-gray-500 tw-text-sm", children: "No options found" })
811
+ }
812
+ )
813
+ ]
814
+ }
815
+ ) });
816
+ };
817
+ var arePropsEqual = (prevProps, nextProps) => {
818
+ var _a, _b;
819
+ const criticalProps = [
820
+ "value",
821
+ "valueSelected",
822
+ "options",
823
+ "error",
824
+ "disabled",
825
+ "label",
826
+ "mandatory"
827
+ ];
828
+ for (const prop of criticalProps) {
829
+ if (prevProps[prop] !== nextProps[prop]) {
830
+ return false;
831
+ }
832
+ }
833
+ if (((_a = prevProps.options) == null ? void 0 : _a.length) !== ((_b = nextProps.options) == null ? void 0 : _b.length)) {
834
+ return false;
835
+ }
836
+ if (prevProps.options && nextProps.options) {
837
+ for (let i = 0; i < prevProps.options.length; i++) {
838
+ const prevOpt = prevProps.options[i];
839
+ const nextOpt = nextProps.options[i];
840
+ if ((prevOpt == null ? void 0 : prevOpt.value) !== (nextOpt == null ? void 0 : nextOpt.value) || (prevOpt == null ? void 0 : prevOpt.label) !== (nextOpt == null ? void 0 : nextOpt.label)) {
841
+ return false;
842
+ }
843
+ }
844
+ }
845
+ return true;
846
+ };
847
+ Select.displayName = "Select";
848
+ var Select_default = (0, import_react2.memo)(Select, arePropsEqual);
849
+
850
+ // src/atom/RangePicker/RangePicker.tsx
851
+ var import_jsx_runtime8 = require("react/jsx-runtime");
852
+ function CustomRangePicker(props) {
853
+ var _a, _b;
854
+ const {
855
+ id = "",
856
+ footer,
857
+ onChange = () => {
858
+ },
859
+ dateRange = ["", ""],
860
+ showNightCount = false,
861
+ isRange = true,
862
+ showYearDropdown = false,
863
+ showSingleCalendar = false,
864
+ disablePastDates = false,
865
+ // New prop to control past date restriction
866
+ minDate = null,
867
+ // New prop for minimum allowed date
868
+ maxDate = null,
869
+ // New prop for maximum allowed date
870
+ minYear = 1900,
871
+ // Minimum year for dropdown
872
+ maxYear = (/* @__PURE__ */ new Date()).getFullYear() + 10,
873
+ // Maximum year for dropdown
874
+ experience = "business",
875
+ showToastError = () => {
876
+ }
877
+ } = props;
878
+ const onChangeRef = (0, import_react3.useRef)(onChange);
879
+ (0, import_react3.useEffect)(() => {
880
+ onChangeRef.current = onChange;
881
+ }, [onChange]);
882
+ const getInitialDate = () => {
883
+ if (dateRange[0]) {
884
+ return new Date(dateRange[0]);
885
+ }
886
+ if (!minDate && !maxDate && !minYear && !maxYear) {
887
+ return /* @__PURE__ */ new Date();
888
+ }
889
+ if (maxYear && maxYear !== (/* @__PURE__ */ new Date()).getFullYear()) {
890
+ let targetDate = new Date(maxYear, 7, 1);
891
+ if (maxDate) {
892
+ const maxDateTime = new Date(maxDate);
893
+ if (targetDate > maxDateTime) {
894
+ targetDate = new Date(
895
+ maxDateTime.getFullYear(),
896
+ maxDateTime.getMonth(),
897
+ 1
898
+ );
899
+ }
900
+ }
901
+ return targetDate;
902
+ }
903
+ if (minDate) {
904
+ const minDateTime = new Date(minDate);
905
+ minDateTime.setHours(0, 0, 0, 0);
906
+ return minDateTime;
907
+ }
908
+ return /* @__PURE__ */ new Date();
909
+ };
910
+ const [currentDate, setCurrentDate] = (0, import_react3.useState)(() => getInitialDate());
911
+ const [startDate, setStartDate] = (0, import_react3.useState)(
912
+ dateRange[0] ? new Date(dateRange[0]) : null
913
+ );
914
+ const [endDate, setEndDate] = (0, import_react3.useState)(
915
+ dateRange[0] && dateRange[1] ? new Date(dateRange[1]) : null
916
+ );
917
+ const [hoverDate, setHoverDate] = (0, import_react3.useState)(null);
918
+ const [isSelectingEnd, setIsSelectingEnd] = (0, import_react3.useState)(
919
+ dateRange[0] && !dateRange[1] ? true : false
920
+ );
921
+ const [selectedDate, setSelectedDate] = (0, import_react3.useState)(
922
+ !isRange && dateRange[0] ? new Date(dateRange[0]) : null
923
+ );
924
+ const getDaysBetween = (start, end) => {
925
+ if (!start || !end) return 0;
926
+ const startDay = (0, import_dayjs.default)(start).startOf("day");
927
+ const endDay = (0, import_dayjs.default)(end).startOf("day");
928
+ return endDay.diff(startDay, "day");
929
+ };
930
+ const nightCount = Math.abs(getDaysBetween(startDate || endDate, hoverDate));
931
+ const nightCountText = nightCount > 1 ? `${nightCount} nights` : "1 night";
932
+ const today = /* @__PURE__ */ new Date();
933
+ today.setHours(0, 0, 0, 0);
934
+ const firstMonth = new Date(
935
+ currentDate.getFullYear(),
936
+ currentDate.getMonth(),
937
+ 1
938
+ );
939
+ const secondMonth = new Date(
940
+ currentDate.getFullYear(),
941
+ currentDate.getMonth() + 1,
942
+ 1
943
+ );
944
+ const monthNames = [
945
+ "January",
946
+ "February",
947
+ "March",
948
+ "April",
949
+ "May",
950
+ "June",
951
+ "July",
952
+ "August",
953
+ "September",
954
+ "October",
955
+ "November",
956
+ "December"
957
+ ];
958
+ const dayNames = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
959
+ const generateYearOptions = () => {
960
+ const years = [];
961
+ for (let i = minYear; i <= maxYear; i++) {
962
+ const isYearDisabled = isYearCompletelyDisabled(i);
963
+ years.push({
964
+ label: i.toString(),
965
+ value: i,
966
+ disabled: isYearDisabled
967
+ });
968
+ }
969
+ return years;
970
+ };
971
+ const isYearCompletelyDisabled = (year) => {
972
+ const firstDayOfYear = new Date(year, 0, 1);
973
+ const lastDayOfYear = new Date(year, 11, 31);
974
+ if (minDate) {
975
+ const minDateTime = new Date(minDate);
976
+ minDateTime.setHours(0, 0, 0, 0);
977
+ if (minDateTime > lastDayOfYear) {
978
+ return true;
979
+ }
980
+ }
981
+ if (maxDate) {
982
+ const maxDateTime = new Date(maxDate);
983
+ maxDateTime.setHours(0, 0, 0, 0);
984
+ if (maxDateTime < firstDayOfYear) {
985
+ return true;
986
+ }
987
+ }
988
+ if (disablePastDates) {
989
+ const today2 = /* @__PURE__ */ new Date();
990
+ today2.setHours(0, 0, 0, 0);
991
+ if (lastDayOfYear < today2) {
992
+ return true;
993
+ }
994
+ }
995
+ return false;
996
+ };
997
+ const yearOptions = generateYearOptions();
998
+ const generateCalendarDays = (monthDate) => {
999
+ const year = monthDate.getFullYear();
1000
+ const month = monthDate.getMonth();
1001
+ const firstDay = new Date(year, month, 1);
1002
+ const lastDay = new Date(year, month + 1, 0);
1003
+ const daysInMonth = lastDay.getDate();
1004
+ const startingDayOfWeek = firstDay.getDay();
1005
+ const days = [];
1006
+ for (let i = 0; i < startingDayOfWeek; i++) {
1007
+ days.push(null);
1008
+ }
1009
+ for (let day = 1; day <= daysInMonth; day++) {
1010
+ days.push(new Date(year, month, day));
1011
+ }
1012
+ return days;
1013
+ };
1014
+ const formatDateKey = (date) => {
1015
+ if (!date) return "";
1016
+ return `${date.getFullYear()}-${date.getMonth()}-${date.getDate()}`;
1017
+ };
1018
+ const isSameDate = (date1, date2) => {
1019
+ if (!date1 || !date2) return false;
1020
+ return formatDateKey(date1) === formatDateKey(date2);
1021
+ };
1022
+ const isDateDisabled = (date) => {
1023
+ if (!date) return false;
1024
+ const checkDate = new Date(date);
1025
+ checkDate.setHours(0, 0, 0, 0);
1026
+ if (disablePastDates && checkDate < today) {
1027
+ return true;
1028
+ }
1029
+ if (minDate) {
1030
+ const minDateTime = new Date(minDate);
1031
+ minDateTime.setHours(0, 0, 0, 0);
1032
+ if (checkDate < minDateTime) {
1033
+ return true;
1034
+ }
1035
+ }
1036
+ if (maxDate) {
1037
+ const maxDateTime = new Date(maxDate);
1038
+ maxDateTime.setHours(0, 0, 0, 0);
1039
+ if (checkDate > maxDateTime) {
1040
+ return true;
1041
+ }
1042
+ }
1043
+ return false;
1044
+ };
1045
+ const isDateInRange = (date) => {
1046
+ if (!isRange || !startDate || !date) return false;
1047
+ const compareDate = endDate || hoverDate;
1048
+ if (!compareDate) return false;
1049
+ const start = startDate < compareDate ? startDate : compareDate;
1050
+ const end = startDate < compareDate ? compareDate : startDate;
1051
+ return date >= start && date <= end;
1052
+ };
1053
+ const isDateBetweenRange = (date) => {
1054
+ if (!isRange || !startDate || !date) return false;
1055
+ const compareDate = endDate || hoverDate;
1056
+ if (!compareDate) return false;
1057
+ const start = startDate < compareDate ? startDate : compareDate;
1058
+ const end = startDate < compareDate ? compareDate : startDate;
1059
+ return date > start && date < end;
1060
+ };
1061
+ const handleDateClick = (date) => {
1062
+ if (isDateDisabled(date)) return;
1063
+ if (!isRange) {
1064
+ setSelectedDate(date);
1065
+ return;
1066
+ }
1067
+ const isCheckinCheckoutSame = (0, import_dayjs.default)(date).format("D MMM, YYYY") === (0, import_dayjs.default)(startDate).format("D MMM, YYYY");
1068
+ if (showNightCount && isCheckinCheckoutSame) {
1069
+ setStartDate(null);
1070
+ setEndDate(null);
1071
+ setIsSelectingEnd(false);
1072
+ setHoverDate(null);
1073
+ showToastError("Check-in and check-out dates cannot be the same.");
1074
+ return;
1075
+ }
1076
+ if (!startDate || startDate && endDate) {
1077
+ setStartDate(date);
1078
+ setEndDate(null);
1079
+ setIsSelectingEnd(true);
1080
+ setHoverDate(null);
1081
+ } else if (startDate && !endDate) {
1082
+ if (date < startDate) {
1083
+ setEndDate(startDate);
1084
+ setStartDate(date);
1085
+ } else {
1086
+ setEndDate(date);
1087
+ }
1088
+ setIsSelectingEnd(false);
1089
+ setHoverDate(null);
1090
+ }
1091
+ };
1092
+ (0, import_react3.useEffect)(() => {
1093
+ if (isRange) {
1094
+ sessionStorage.removeItem("rangePickerStartDate");
1095
+ onChangeRef.current(null, [
1096
+ startDate ? (0, import_dayjs.default)(startDate).format("D MMM, YYYY") : "",
1097
+ endDate ? (0, import_dayjs.default)(endDate).format("D MMM, YYYY") : ""
1098
+ ]);
1099
+ }
1100
+ if (isRange && startDate && !endDate) {
1101
+ sessionStorage.setItem(
1102
+ "rangePickerStartDate",
1103
+ (0, import_dayjs.default)(startDate).format("D MMM, YYYY")
1104
+ );
1105
+ }
1106
+ }, [startDate, endDate, isRange]);
1107
+ (0, import_react3.useEffect)(() => {
1108
+ if (!isRange && selectedDate) {
1109
+ onChangeRef.current(null, (0, import_dayjs.default)(selectedDate).format("D MMM, YYYY"));
1110
+ }
1111
+ }, [selectedDate, isRange]);
1112
+ const handleDateHover = (date) => {
1113
+ if (isDateDisabled(date) || !isRange) return;
1114
+ if (isSelectingEnd && startDate && !endDate) {
1115
+ setHoverDate(date);
1116
+ }
1117
+ };
1118
+ const navigateMonth = (direction) => {
1119
+ const newDate = new Date(currentDate);
1120
+ newDate.setMonth(currentDate.getMonth() + direction);
1121
+ setCurrentDate(newDate);
1122
+ };
1123
+ const isPreviousMonthDisabled = () => {
1124
+ const previousMonth = new Date(currentDate);
1125
+ previousMonth.setMonth(currentDate.getMonth() - 1);
1126
+ const lastDayOfPreviousMonth = new Date(
1127
+ previousMonth.getFullYear(),
1128
+ previousMonth.getMonth() + 1,
1129
+ 0
1130
+ );
1131
+ return isDateDisabled(lastDayOfPreviousMonth);
1132
+ };
1133
+ const isNextMonthDisabled = () => {
1134
+ const nextMonth = new Date(currentDate);
1135
+ nextMonth.setMonth(currentDate.getMonth() + 1);
1136
+ const firstDayOfNextMonth = new Date(
1137
+ nextMonth.getFullYear(),
1138
+ nextMonth.getMonth(),
1139
+ 1
1140
+ );
1141
+ return isDateDisabled(firstDayOfNextMonth);
1142
+ };
1143
+ const handleYearChange = (selectedYear) => {
1144
+ const newDate = new Date(currentDate);
1145
+ newDate.setFullYear(selectedYear);
1146
+ const targetMonth = newDate.getMonth();
1147
+ if (!isMonthDisabled(selectedYear, targetMonth)) {
1148
+ setCurrentDate(newDate);
1149
+ } else {
1150
+ const firstAvailableMonth = findFirstAvailableMonth(selectedYear);
1151
+ if (firstAvailableMonth !== -1) {
1152
+ newDate.setMonth(firstAvailableMonth);
1153
+ setCurrentDate(newDate);
1154
+ }
1155
+ }
1156
+ };
1157
+ const isMonthDisabled = (year, month) => {
1158
+ const lastDayOfMonth = new Date(year, month + 1, 0);
1159
+ const firstDayOfMonth = new Date(year, month, 1);
1160
+ return isDateDisabled(lastDayOfMonth) && isDateDisabled(firstDayOfMonth);
1161
+ };
1162
+ const findFirstAvailableMonth = (year) => {
1163
+ for (let month = 0; month < 12; month++) {
1164
+ if (!isMonthDisabled(year, month)) {
1165
+ return month;
1166
+ }
1167
+ }
1168
+ return -1;
1169
+ };
1170
+ const isSameDay = ((_a = (0, import_dayjs.default)(startDate)) == null ? void 0 : _a.format("D MMM, YYYY")) === ((_b = (0, import_dayjs.default)(endDate)) == null ? void 0 : _b.format("D MMM, YYYY"));
1171
+ const NightCountTooltip = () => {
1172
+ const TooltipArrow = (0, import_react3.memo)(() => {
1173
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-w-3 tw-h-3 tw-flex tw-items-center tw-justify-center tw-rounded tw-bg-transparent tw-rotate-90", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1174
+ "div",
1175
+ {
1176
+ style: {
1177
+ borderTop: "5px solid transparent",
1178
+ borderBottom: "5px solid transparent",
1179
+ borderLeft: "8px solid black"
1180
+ }
1181
+ }
1182
+ ) });
1183
+ });
1184
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tw-absolute tw-bottom-11 tw-py-2 tw-bg-black tw-text-white tw-px-2 tw-rounded-lg tw-z-50 tw-text-xs tw-whitespace-nowrap tw-opacity-0 tw-pointer-events-none group-hover:tw-opacity-100 tw-transition-opacity tw-duration-200", children: [
1185
+ nightCountText,
1186
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-absolute tw-right-[42%] tw-bottom-[-7px]", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(TooltipArrow, {}) })
1187
+ ] });
1188
+ };
1189
+ const renderCalendar = (monthDate, isSecondCalendar = false) => {
1190
+ const days = generateCalendarDays(monthDate);
1191
+ const monthName = monthNames[monthDate.getMonth()];
1192
+ const year = monthDate.getFullYear();
1193
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1194
+ "div",
1195
+ {
1196
+ className: (0, import_clsx2.default)("tw-flex-1 tw-max-w-[83vw] tw-mb-2", {
1197
+ "tw-h-[320px]": showYearDropdown || days.length > 35,
1198
+ "tw-h-[290px]": !showYearDropdown || days.length <= 35
1199
+ }),
1200
+ children: [
1201
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-text-center tw-mb-4 sm:tw-mt-0", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: " tw-flex tw-justify-center tw-items-center tw-gap-4 ", children: [
1202
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("h3", { className: "tw-typography-footNoteBold tw-text-color-text-default tw-m-0", children: [
1203
+ monthName,
1204
+ " ",
1205
+ !showYearDropdown && ` ${year}`
1206
+ ] }),
1207
+ showYearDropdown && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1208
+ Select_default,
1209
+ {
1210
+ options: yearOptions,
1211
+ value: currentDate.getFullYear(),
1212
+ valueSelected: currentDate.getFullYear(),
1213
+ onChange: (selectedYear) => {
1214
+ if (typeof selectedYear === "number") {
1215
+ handleYearChange(selectedYear);
1216
+ }
1217
+ },
1218
+ className: "tw-min-w-fit tw-bg-transparent tw-typography-footNoteBold tw-text-color-text-default",
1219
+ size: "small",
1220
+ variant: "filled",
1221
+ style: { width: "80px" },
1222
+ id: `${id}-year-select`,
1223
+ allowClear: false,
1224
+ enableSearch: false,
1225
+ experience
1226
+ }
1227
+ )
1228
+ ] }) }),
1229
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-grid tw-grid-cols-7 tw-mb-2", children: dayNames.map((day) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1230
+ "div",
1231
+ {
1232
+ className: "tw-py-2 tw-px-0 tw-text-center tw-typography-caption2 tw-text-[#6B7280]",
1233
+ children: day
1234
+ },
1235
+ day
1236
+ )) }),
1237
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-grid tw-grid-cols-7", children: days.map((date, index) => {
1238
+ if (!date) {
1239
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-h-10" }, index);
1240
+ }
1241
+ const isStart = isRange ? isSameDate(date, startDate) : false;
1242
+ const isEnd = isRange ? isSameDate(date, endDate) : false;
1243
+ const isSelected = !isRange ? isSameDate(date, selectedDate) : false;
1244
+ const isInRange = isRange ? isDateBetweenRange(date) : false;
1245
+ const isHovering = isRange && isSelectingEnd && hoverDate && isDateInRange(date) && !isStart && !isEnd;
1246
+ const isDisabled = isDateDisabled(date);
1247
+ let className = "tw-relative tw-z-20 tw-h-10 tw-w-10 tw-flex tw-items-center tw-justify-center tw-typography-caption1Bold ";
1248
+ const isFirstInRow = index % 7 === 0;
1249
+ const isLastInRow = index % 7 === 6;
1250
+ let pseudoClass = "";
1251
+ if (isDisabled) {
1252
+ className += "tw-text-gray-300 tw-cursor-not-allowed ";
1253
+ } else {
1254
+ className += "tw-cursor-pointer ";
1255
+ if (isStart || isEnd || isSelected) {
1256
+ className += "tw-bg-black tw-z-[21] tw-text-white tw-font-medium tw-rounded-full ";
1257
+ } else if (isInRange) {
1258
+ className += "tw-text-gray-900";
1259
+ if (window.innerWidth < 640) {
1260
+ className = className.replace(
1261
+ "tw-w-10",
1262
+ "tw-pr-2 tw-w-[50px] sm:tw-w-10 sm:tw-pr-0"
1263
+ );
1264
+ }
1265
+ pseudoClass = (0, import_clsx2.default)(RangePicker_module_default.range_start, RangePicker_module_default.range_end);
1266
+ } else {
1267
+ className += "tw-text-gray-700 hover:tw-border-2 hover:tw-border-black tw-rounded-full hover:tw-border-solid ";
1268
+ }
1269
+ if (isHovering) {
1270
+ className += "tw-border-2 tw-border-gray-400 tw-bg-white tw-z-[22]";
1271
+ }
1272
+ }
1273
+ const titleDate = (0, import_dayjs.default)(date).format("YYYY-MM-DD");
1274
+ const hoverDateFormatted = (0, import_dayjs.default)(hoverDate || null).format(
1275
+ "YYYY-MM-DD"
1276
+ );
1277
+ const isHoveringDate = (0, import_dayjs.default)(hoverDateFormatted).isSame(
1278
+ (0, import_dayjs.default)(date),
1279
+ "day"
1280
+ );
1281
+ const isHoverDateGreater = (0, import_dayjs.default)(hoverDate).isAfter(
1282
+ (0, import_dayjs.default)(startDate),
1283
+ "day"
1284
+ );
1285
+ const isHoverDateLess = (0, import_dayjs.default)(hoverDate).isBefore(
1286
+ (0, import_dayjs.default)(startDate),
1287
+ "day"
1288
+ );
1289
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tw-relative", children: [
1290
+ (isStart || isEnd) && startDate && endDate && !isSameDay && isRange && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1291
+ "div",
1292
+ {
1293
+ className: (0, import_clsx2.default)(
1294
+ "tw-w-9 tw-h-8 tw-bg-[#F2EFEC] tw-rotate-90 tw-absolute tw-z-10 tw-top-1",
1295
+ {
1296
+ "tw-left-5": isStart,
1297
+ "tw-right-5": isEnd,
1298
+ "tw-invisible": isFirstInRow && isEnd || isLastInRow && isStart
1299
+ }
1300
+ )
1301
+ }
1302
+ ),
1303
+ isHoveringDate && isHovering && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1304
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1305
+ "div",
1306
+ {
1307
+ className: (0, import_clsx2.default)(
1308
+ "tw-w-9 tw-h-8 tw-bg-[#F2EFEC] tw-rotate-90 tw-absolute tw-z-10 tw-top-1",
1309
+ {
1310
+ "tw-right-5": isHoverDateGreater,
1311
+ "tw-left-5": isHoverDateLess,
1312
+ "tw-invisible": isFirstInRow && isHoverDateGreater || isLastInRow && isHoverDateLess
1313
+ }
1314
+ )
1315
+ }
1316
+ ),
1317
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1318
+ "div",
1319
+ {
1320
+ className: (0, import_clsx2.default)(
1321
+ "tw-w-[18px] tw-h-[40px] tw-bg-white tw-rounded-r-full tw-absolute tw-z-20",
1322
+ {
1323
+ "tw-left-5": isHoverDateLess,
1324
+ "tw-right-5 tw-rotate-180": isHoverDateGreater
1325
+ }
1326
+ )
1327
+ }
1328
+ )
1329
+ ] }),
1330
+ isStart && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
1331
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1332
+ "div",
1333
+ {
1334
+ className: (0, import_clsx2.default)(
1335
+ "tw-w-9 tw-h-8 tw-bg-[#F2EFEC] tw-rotate-90 tw-absolute tw-z-10 tw-top-1",
1336
+ {
1337
+ "tw-right-5": isHoverDateLess,
1338
+ "tw-left-5": isHoverDateGreater,
1339
+ "tw-invisible": isLastInRow
1340
+ }
1341
+ )
1342
+ }
1343
+ ),
1344
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1345
+ "div",
1346
+ {
1347
+ className: (0, import_clsx2.default)(
1348
+ "tw-w-[18px] tw-h-[40px] tw-bg-white tw-rounded-r-full tw-absolute tw-z-20",
1349
+ {
1350
+ "tw-left-5": isHoverDateGreater,
1351
+ "tw-right-5 tw-rotate-180": isHoverDateLess
1352
+ }
1353
+ )
1354
+ }
1355
+ )
1356
+ ] }),
1357
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1358
+ "div",
1359
+ {
1360
+ className: (0, import_clsx2.default)(className, pseudoClass, "tw-group", {
1361
+ "tw-border-2 !tw-border-black tw-rounded-full tw-border-solid": (0, import_dayjs.default)(date).isSame((0, import_dayjs.default)(hoverDate), "day")
1362
+ }),
1363
+ onClick: () => handleDateClick(date),
1364
+ onMouseEnter: () => handleDateHover(date),
1365
+ "data-date": titleDate,
1366
+ children: [
1367
+ showNightCount && isRange && isHovering && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(NightCountTooltip, {}),
1368
+ date.getDate()
1369
+ ]
1370
+ }
1371
+ )
1372
+ ] }, formatDateKey(date));
1373
+ }) })
1374
+ ]
1375
+ }
1376
+ );
1377
+ };
1378
+ const arrowClasses = "tw-relative tw-top-3 sm:tw-top-0 tw-cursor-pointer tw-rounded-full tw-w-10 tw-h-10 tw-flex tw-justify-center hover:tw-bg-gray-100 tw-items-center";
1379
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1380
+ "div",
1381
+ {
1382
+ className: (0, import_clsx2.default)(
1383
+ "custom-range-picker tw-relative tw-bg-white tw-rounded-xl tw-pt-1 tw-px-0 tw-max-w-4xl tw-mx-auto tw-border tw-border-gray-200 tw-border-solid tw-w-full tw-max-h-[90vh] tw-overflow-y-auto",
1384
+ {
1385
+ "sm:tw-w-[640px]": !showSingleCalendar,
1386
+ "sm:tw-w-[330px]": showSingleCalendar
1387
+ }
1388
+ ),
1389
+ children: [
1390
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "tw-flex tw-items-center tw-px-4 tw-justify-between tw-mb-4 tw-absolute tw-right-0 tw-left-0 tw-top-0.5 sm:tw-top-4 tw-w-auto", children: [
1391
+ !isPreviousMonthDisabled() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1392
+ "div",
1393
+ {
1394
+ className: (0, import_clsx2.default)(arrowClasses, "tw-left-1"),
1395
+ onClick: () => navigateMonth(-1),
1396
+ id: "calendar-previous-month-button",
1397
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1398
+ Chevron,
1399
+ {
1400
+ size: "medium",
1401
+ className: "tw-relative -tw-top-0.5 tw-right-0.5"
1402
+ }
1403
+ )
1404
+ }
1405
+ ),
1406
+ isPreviousMonthDisabled() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-w-10 tw-h-10" }),
1407
+ !isNextMonthDisabled() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1408
+ "div",
1409
+ {
1410
+ className: (0, import_clsx2.default)(arrowClasses, "tw-mt-[1px] tw-right-1"),
1411
+ onClick: () => navigateMonth(1),
1412
+ id: "calendar-next-month-button",
1413
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1414
+ Chevron,
1415
+ {
1416
+ size: "medium",
1417
+ onClick: () => navigateMonth(1),
1418
+ className: "tw-rotate-180 tw-relative tw-top-0.5 tw-left-0.5"
1419
+ }
1420
+ )
1421
+ }
1422
+ ),
1423
+ isNextMonthDisabled() && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-w-10 tw-h-10" })
1424
+ ] }),
1425
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "tw-flex tw-items-center tw-justify-between tw-px-6 tw-border-solid tw-border-color-gray-100 tw-border-b tw-border-t-0 tw-border-l-0 tw-border-r-0 tw-w-auto", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1426
+ "div",
1427
+ {
1428
+ className: (0, import_clsx2.default)("tw-flex tw-w-full", {
1429
+ "tw-flex-col sm:tw-space-x-8 sm:tw-flex-row": isRange || !showSingleCalendar,
1430
+ "tw-justify-center": !isRange || showSingleCalendar,
1431
+ "tw-pt-4": showYearDropdown,
1432
+ // More space when year dropdown is visible
1433
+ "tw-pt-6": !showYearDropdown
1434
+ }),
1435
+ children: [
1436
+ renderCalendar(firstMonth),
1437
+ !showSingleCalendar && renderCalendar(secondMonth, true)
1438
+ ]
1439
+ }
1440
+ ) }),
1441
+ footer
1442
+ ]
1443
+ }
1444
+ );
1445
+ }
1446
+ CustomRangePicker.displayName = "RangePicker";
1447
+ var RangePicker_default = CustomRangePicker;
1448
+ // Annotate the CommonJS export names for ESM import in node:
1449
+ 0 && (module.exports = {
1450
+ RangePicker
1451
+ });