@itilite/lumina-ui 1.0.1 → 1.0.2-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 (102) hide show
  1. package/README.md +43 -10
  2. package/dist/AdvancedDateRangePicker-ozItnkhp.d.mts +57 -0
  3. package/dist/AdvancedDateRangePicker-ozItnkhp.d.ts +57 -0
  4. package/dist/Table-BOq-_9Nr.d.mts +121 -0
  5. package/dist/Table-BOq-_9Nr.d.ts +121 -0
  6. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.mts +2 -0
  7. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.d.ts +2 -0
  8. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.js +791 -0
  9. package/dist/atom/AdvancedDateRangePicker/AdvancedDateRangePicker.mjs +11 -0
  10. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.mts +17 -0
  11. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.d.ts +17 -0
  12. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.js +370 -0
  13. package/dist/atom/AdvancedDateRangePicker/InternalCalendar.mjs +8 -0
  14. package/dist/{Avatar.d.mts → atom/Avatar/Avatar.d.mts} +1 -9
  15. package/dist/{Avatar.d.ts → atom/Avatar/Avatar.d.ts} +1 -9
  16. package/dist/{Avatar.js → atom/Avatar/Avatar.js} +4 -2
  17. package/dist/{Avatar.mjs → atom/Avatar/Avatar.mjs} +2 -2
  18. package/dist/{Button.js → atom/Button/Button.js} +1 -1
  19. package/dist/{Button.mjs → atom/Button/Button.mjs} +2 -2
  20. package/dist/{Checkbox.mjs → atom/Checkbox/Checkbox.mjs} +2 -2
  21. package/dist/atom/LoadingSpinner/LoadingSpinner.d.mts +19 -0
  22. package/dist/atom/LoadingSpinner/LoadingSpinner.d.ts +19 -0
  23. package/dist/atom/LoadingSpinner/LoadingSpinner.js +90 -0
  24. package/dist/atom/LoadingSpinner/LoadingSpinner.mjs +9 -0
  25. package/dist/{Modal.d.mts → atom/Modal/Modal.d.mts} +1 -1
  26. package/dist/{Modal.d.ts → atom/Modal/Modal.d.ts} +1 -1
  27. package/dist/{Modal.js → atom/Modal/Modal.js} +1 -1
  28. package/dist/atom/Modal/Modal.mjs +10 -0
  29. package/dist/{Radio.mjs → atom/Radio/Radio.mjs} +2 -2
  30. package/dist/atom/RangePicker/Chevron.d.mts +13 -0
  31. package/dist/atom/RangePicker/Chevron.d.ts +13 -0
  32. package/dist/atom/RangePicker/Chevron.js +110 -0
  33. package/dist/atom/RangePicker/Chevron.mjs +7 -0
  34. package/dist/atom/RangePicker/RangePicker.d.mts +26 -0
  35. package/dist/atom/RangePicker/RangePicker.d.ts +26 -0
  36. package/dist/atom/RangePicker/RangePicker.js +1465 -0
  37. package/dist/atom/RangePicker/RangePicker.mjs +13 -0
  38. package/dist/atom/Select/Select.d.mts +40 -0
  39. package/dist/atom/Select/Select.d.ts +40 -0
  40. package/dist/atom/Select/Select.js +805 -0
  41. package/dist/atom/Select/Select.mjs +11 -0
  42. package/dist/atom/Slider/Slider.d.mts +34 -0
  43. package/dist/atom/Slider/Slider.d.ts +34 -0
  44. package/dist/atom/Slider/Slider.js +107 -0
  45. package/dist/atom/Slider/Slider.mjs +9 -0
  46. package/dist/{Switch.mjs → atom/Switch/Switch.mjs} +2 -2
  47. package/dist/atom/Table/Table.d.mts +3 -0
  48. package/dist/atom/Table/Table.d.ts +3 -0
  49. package/dist/atom/Table/Table.js +306 -0
  50. package/dist/atom/Table/Table.mjs +9 -0
  51. package/dist/atom/Tag/Tag.d.mts +6 -0
  52. package/dist/atom/Tag/Tag.d.ts +6 -0
  53. package/dist/atom/Tag/Tag.js +108 -0
  54. package/dist/atom/Tag/Tag.mjs +9 -0
  55. package/dist/{Tooltip.mjs → atom/Tooltip/Tooltip.mjs} +2 -2
  56. package/dist/chunk-4JX54OKI.mjs +627 -0
  57. package/dist/chunk-4VZB2KR2.mjs +51 -0
  58. package/dist/chunk-53O7JM5I.mjs +424 -0
  59. package/dist/{chunk-HISCHZ5H.mjs → chunk-AF2RKLH6.mjs} +1 -1
  60. package/dist/chunk-D3N7VFER.mjs +73 -0
  61. package/dist/chunk-GU5F7Z7I.mjs +681 -0
  62. package/dist/{chunk-X76GNSBB.mjs → chunk-IWO2Y5QX.mjs} +4 -2
  63. package/dist/chunk-J4YYP4IZ.mjs +0 -0
  64. package/dist/chunk-N2WTNCQU.mjs +66 -0
  65. package/dist/chunk-N4DPPZVJ.mjs +269 -0
  66. package/dist/chunk-PQ3B2FEB.mjs +249 -0
  67. package/dist/chunk-QKTMWS4J.mjs +43 -0
  68. package/dist/{chunk-N355RJGH.mjs → chunk-UQJ3BDM4.mjs} +1 -1
  69. package/dist/chunk-V3CHJHUX.mjs +424 -0
  70. package/dist/chunk-ZTRM4HZJ.mjs +53 -0
  71. package/dist/index.d.mts +18 -7
  72. package/dist/index.d.ts +18 -7
  73. package/dist/index.js +2461 -8
  74. package/dist/index.mjs +46 -12
  75. package/dist/molecules/UserProfile/UserProfile.d.mts +23 -0
  76. package/dist/molecules/UserProfile/UserProfile.d.ts +23 -0
  77. package/dist/molecules/UserProfile/UserProfile.js +243 -0
  78. package/dist/molecules/UserProfile/UserProfile.mjs +11 -0
  79. package/dist/styles.css +1740 -891
  80. package/dist/types-D4MD2w3_.d.mts +9 -0
  81. package/dist/types-D4MD2w3_.d.ts +9 -0
  82. package/dist/types-mhQmqhsR.d.mts +10 -0
  83. package/dist/types-mhQmqhsR.d.ts +10 -0
  84. package/package.json +9 -32
  85. package/dist/Modal.mjs +0 -10
  86. package/dist/chunk-2O2IH2FG.mjs +0 -83
  87. package/dist/styles.d.mts +0 -2
  88. package/dist/styles.d.ts +0 -2
  89. /package/dist/{Button.d.mts → atom/Button/Button.d.mts} +0 -0
  90. /package/dist/{Button.d.ts → atom/Button/Button.d.ts} +0 -0
  91. /package/dist/{Checkbox.d.mts → atom/Checkbox/Checkbox.d.mts} +0 -0
  92. /package/dist/{Checkbox.d.ts → atom/Checkbox/Checkbox.d.ts} +0 -0
  93. /package/dist/{Checkbox.js → atom/Checkbox/Checkbox.js} +0 -0
  94. /package/dist/{Radio.d.mts → atom/Radio/Radio.d.mts} +0 -0
  95. /package/dist/{Radio.d.ts → atom/Radio/Radio.d.ts} +0 -0
  96. /package/dist/{Radio.js → atom/Radio/Radio.js} +0 -0
  97. /package/dist/{Switch.d.mts → atom/Switch/Switch.d.mts} +0 -0
  98. /package/dist/{Switch.d.ts → atom/Switch/Switch.d.ts} +0 -0
  99. /package/dist/{Switch.js → atom/Switch/Switch.js} +0 -0
  100. /package/dist/{Tooltip.d.mts → atom/Tooltip/Tooltip.d.mts} +0 -0
  101. /package/dist/{Tooltip.d.ts → atom/Tooltip/Tooltip.d.ts} +0 -0
  102. /package/dist/{Tooltip.js → atom/Tooltip/Tooltip.js} +0 -0
@@ -0,0 +1,11 @@
1
+ import {
2
+ AdvancedDateRangePicker,
3
+ AdvancedDateRangePicker_default
4
+ } from "../../chunk-53O7JM5I.mjs";
5
+ import "../../chunk-N4DPPZVJ.mjs";
6
+ import "../../chunk-ZTRM4HZJ.mjs";
7
+ import "../../chunk-FWCSY2DS.mjs";
8
+ export {
9
+ AdvancedDateRangePicker,
10
+ AdvancedDateRangePicker_default as default
11
+ };
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+
3
+ interface InternalCalendarProps {
4
+ id?: string;
5
+ onChange?: (val: [string, string]) => void;
6
+ dateRange?: [string, string];
7
+ showSingleCalendar?: boolean;
8
+ disablePastDates?: boolean;
9
+ minDate?: Date | string | null;
10
+ maxDate?: Date | string | null;
11
+ minYear?: number;
12
+ maxYear?: number;
13
+ allowSameDates?: boolean;
14
+ }
15
+ declare const _default: React.MemoExoticComponent<({ id, onChange, dateRange, showSingleCalendar: showSingleCalendarProp, disablePastDates, minDate, maxDate, minYear, maxYear, allowSameDates, }: InternalCalendarProps) => React.JSX.Element>;
16
+
17
+ export { _default as default };
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+
3
+ interface InternalCalendarProps {
4
+ id?: string;
5
+ onChange?: (val: [string, string]) => void;
6
+ dateRange?: [string, string];
7
+ showSingleCalendar?: boolean;
8
+ disablePastDates?: boolean;
9
+ minDate?: Date | string | null;
10
+ maxDate?: Date | string | null;
11
+ minYear?: number;
12
+ maxYear?: number;
13
+ allowSameDates?: boolean;
14
+ }
15
+ declare const _default: React.MemoExoticComponent<({ id, onChange, dateRange, showSingleCalendar: showSingleCalendarProp, disablePastDates, minDate, maxDate, minYear, maxYear, allowSameDates, }: InternalCalendarProps) => React.JSX.Element>;
16
+
17
+ export { _default as default };
@@ -0,0 +1,370 @@
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/AdvancedDateRangePicker/InternalCalendar.tsx
60
+ var InternalCalendar_exports = {};
61
+ __export(InternalCalendar_exports, {
62
+ default: () => InternalCalendar_default
63
+ });
64
+ module.exports = __toCommonJS(InternalCalendar_exports);
65
+ var import_react = require("react");
66
+ var import_dayjs = __toESM(require("dayjs"));
67
+
68
+ // src/atom/RangePicker/Chevron.tsx
69
+ var React = __toESM(require("react"));
70
+ var import_jsx_runtime = require("react/jsx-runtime");
71
+ var Chevron = React.memo(
72
+ (_a) => {
73
+ var _b = _a, { size = "normal", color = "black", className } = _b, rest = __objRest(_b, ["size", "color", "className"]);
74
+ const getSize = (size2) => {
75
+ switch (size2) {
76
+ case "small":
77
+ 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";
78
+ case "normal":
79
+ 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";
80
+ default:
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
+ }
83
+ };
84
+ const getContainer = (size2) => {
85
+ switch (size2) {
86
+ case "small":
87
+ return 16;
88
+ case "medium":
89
+ return 20;
90
+ case "normal":
91
+ return 24;
92
+ default:
93
+ return 24;
94
+ }
95
+ };
96
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
97
+ "svg",
98
+ __spreadProps(__spreadValues({
99
+ xmlns: "http://www.w3.org/2000/svg",
100
+ width: getContainer(size),
101
+ height: getContainer(size),
102
+ fill: "none",
103
+ viewBox: `0 0 ${getContainer(size)} ${getContainer(size)}`,
104
+ className
105
+ }, rest), {
106
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { fill: color, d: getSize(size) })
107
+ })
108
+ );
109
+ }
110
+ );
111
+
112
+ // src/atom/AdvancedDateRangePicker/InternalCalendar.tsx
113
+ var import_jsx_runtime2 = require("react/jsx-runtime");
114
+ var InternalCalendar = ({
115
+ id = "",
116
+ onChange = () => {
117
+ },
118
+ dateRange = ["", ""],
119
+ showSingleCalendar: showSingleCalendarProp = false,
120
+ disablePastDates = false,
121
+ minDate = null,
122
+ maxDate = null,
123
+ minYear = 1900,
124
+ maxYear = (/* @__PURE__ */ new Date()).getFullYear() + 10,
125
+ allowSameDates = false
126
+ }) => {
127
+ const onChangeRef = (0, import_react.useRef)(onChange);
128
+ (0, import_react.useEffect)(() => {
129
+ onChangeRef.current = onChange;
130
+ }, [onChange]);
131
+ const getInitialDate = () => {
132
+ const today2 = /* @__PURE__ */ new Date();
133
+ today2.setHours(0, 0, 0, 0);
134
+ if (dateRange[0]) return new Date(dateRange[0]);
135
+ if (today2.getFullYear() >= minYear && today2.getFullYear() <= maxYear) {
136
+ return today2;
137
+ }
138
+ if (minDate) {
139
+ const minDateTime = new Date(minDate);
140
+ minDateTime.setHours(0, 0, 0, 0);
141
+ return minDateTime;
142
+ }
143
+ return today2;
144
+ };
145
+ const [currentDate, setCurrentDate] = (0, import_react.useState)(() => getInitialDate());
146
+ const [startDate, setStartDate] = (0, import_react.useState)(
147
+ dateRange[0] ? new Date(dateRange[0]) : null
148
+ );
149
+ const [endDate, setEndDate] = (0, import_react.useState)(
150
+ dateRange[0] && dateRange[1] ? new Date(dateRange[1]) : null
151
+ );
152
+ const [hoverDate, setHoverDate] = (0, import_react.useState)(null);
153
+ const [isSelectingEnd, setIsSelectingEnd] = (0, import_react.useState)(
154
+ dateRange[0] && !dateRange[1] ? true : false
155
+ );
156
+ const [isMobile, setIsMobile] = (0, import_react.useState)(false);
157
+ (0, import_react.useEffect)(() => {
158
+ const checkMobile = () => {
159
+ setIsMobile(window.innerWidth < 1024);
160
+ };
161
+ checkMobile();
162
+ window.addEventListener("resize", checkMobile);
163
+ return () => window.removeEventListener("resize", checkMobile);
164
+ }, []);
165
+ const showSingle = showSingleCalendarProp || isMobile;
166
+ const prevRangeRef = (0, import_react.useRef)(dateRange);
167
+ (0, import_react.useEffect)(() => {
168
+ const isSameRange = dateRange[0] === prevRangeRef.current[0] && dateRange[1] === prevRangeRef.current[1];
169
+ if (isSameRange) return;
170
+ prevRangeRef.current = dateRange;
171
+ const nextStart = dateRange[0] ? new Date(dateRange[0]) : null;
172
+ const nextEnd = dateRange[1] ? new Date(dateRange[1]) : null;
173
+ setStartDate(nextStart);
174
+ setEndDate(nextEnd);
175
+ if (nextStart) {
176
+ const startMonth = nextStart.getFullYear() * 12 + nextStart.getMonth();
177
+ const currentMonthVal = currentDate.getFullYear() * 12 + currentDate.getMonth();
178
+ const isVisibleInFirst = startMonth === currentMonthVal;
179
+ const isVisibleInSecond = !showSingle && startMonth === currentMonthVal + 1;
180
+ if (!isVisibleInFirst && !isVisibleInSecond) {
181
+ setCurrentDate(new Date(nextStart.getFullYear(), nextStart.getMonth(), 1));
182
+ }
183
+ }
184
+ }, [dateRange, showSingle]);
185
+ const today = /* @__PURE__ */ new Date();
186
+ today.setHours(0, 0, 0, 0);
187
+ const firstMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 1);
188
+ const secondMonth = new Date(currentDate.getFullYear(), currentDate.getMonth() + 1, 1);
189
+ const monthNames = [
190
+ "January",
191
+ "February",
192
+ "March",
193
+ "April",
194
+ "May",
195
+ "June",
196
+ "July",
197
+ "August",
198
+ "September",
199
+ "October",
200
+ "November",
201
+ "December"
202
+ ];
203
+ const dayNames = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
204
+ const generateCalendarDays = (monthDate) => {
205
+ const year = monthDate.getFullYear();
206
+ const month = monthDate.getMonth();
207
+ const firstDay = new Date(year, month, 1);
208
+ const lastDay = new Date(year, month + 1, 0);
209
+ const daysInMonth = lastDay.getDate();
210
+ const startingDayOfWeek = firstDay.getDay();
211
+ const days = [];
212
+ for (let i = 0; i < startingDayOfWeek; i++) days.push(null);
213
+ for (let day = 1; day <= daysInMonth; day++) days.push(new Date(year, month, day));
214
+ return days;
215
+ };
216
+ const isSameDate = (d1, d2) => {
217
+ if (!d1 || !d2) return false;
218
+ return d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate();
219
+ };
220
+ const isDateDisabled = (date) => {
221
+ if (!date) return false;
222
+ const checkDate = new Date(date);
223
+ checkDate.setHours(0, 0, 0, 0);
224
+ if (disablePastDates && checkDate < today) return true;
225
+ if (minDate) {
226
+ const m = new Date(minDate);
227
+ m.setHours(0, 0, 0, 0);
228
+ if (checkDate < m) return true;
229
+ }
230
+ if (maxDate) {
231
+ const m = new Date(maxDate);
232
+ m.setHours(0, 0, 0, 0);
233
+ if (checkDate > m) return true;
234
+ }
235
+ return false;
236
+ };
237
+ const isDateBetweenRange = (date) => {
238
+ if (!startDate || !date) return false;
239
+ const comp = endDate || hoverDate;
240
+ if (!comp) return false;
241
+ const s = startDate < comp ? startDate : comp;
242
+ const e = startDate < comp ? comp : startDate;
243
+ return date > s && date < e;
244
+ };
245
+ const isDateInRange = (date) => {
246
+ if (!startDate || !date) return false;
247
+ const comp = endDate || hoverDate;
248
+ if (!comp) return false;
249
+ const s = startDate < comp ? startDate : comp;
250
+ const e = startDate < comp ? comp : startDate;
251
+ return date >= s && date <= e;
252
+ };
253
+ const handleDateClick = (date) => {
254
+ if (isDateDisabled(date)) return;
255
+ let nextStart = startDate;
256
+ let nextEnd = endDate;
257
+ const isSame = startDate && (0, import_dayjs.default)(date).isSame(startDate, "day");
258
+ if (!allowSameDates && isSame) {
259
+ setStartDate(null);
260
+ setEndDate(null);
261
+ setIsSelectingEnd(false);
262
+ onChangeRef.current(["", ""]);
263
+ return;
264
+ }
265
+ if (!startDate || startDate && endDate) {
266
+ nextStart = date;
267
+ nextEnd = null;
268
+ setStartDate(nextStart);
269
+ setEndDate(nextEnd);
270
+ setIsSelectingEnd(true);
271
+ } else {
272
+ if (date < startDate) {
273
+ nextEnd = startDate;
274
+ nextStart = date;
275
+ } else {
276
+ nextEnd = date;
277
+ }
278
+ setStartDate(nextStart);
279
+ setEndDate(nextEnd);
280
+ setIsSelectingEnd(false);
281
+ }
282
+ onChangeRef.current([
283
+ nextStart ? (0, import_dayjs.default)(nextStart).format("D MMM, YYYY") : "",
284
+ nextEnd ? (0, import_dayjs.default)(nextEnd).format("D MMM, YYYY") : ""
285
+ ]);
286
+ };
287
+ const handleDateHover = (date) => {
288
+ if (isDateDisabled(date)) return;
289
+ if (isSelectingEnd && startDate && !endDate) setHoverDate(date);
290
+ };
291
+ const navigateMonth = (direction) => {
292
+ const newDate = new Date(currentDate);
293
+ newDate.setMonth(currentDate.getMonth() + direction);
294
+ setCurrentDate(newDate);
295
+ };
296
+ const renderCalendar = (monthDate) => {
297
+ const days = generateCalendarDays(monthDate);
298
+ const monthName = monthNames[monthDate.getMonth()];
299
+ const year = monthDate.getFullYear();
300
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tw-flex-1 tw-mb-2", children: [
301
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-text-center tw-mb-4", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("h3", { className: "tw-typography-footNoteBold tw-text-gray-900 tw-m-0", children: [
302
+ monthName,
303
+ " ",
304
+ year
305
+ ] }) }),
306
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-grid tw-grid-cols-7 tw-mb-2", children: dayNames.map((day) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-py-2 tw-text-center tw-typography-caption2 tw-text-gray-500", children: day }, day)) }),
307
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-grid tw-grid-cols-7", children: days.map((date, index) => {
308
+ if (!date) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-h-10" }, index);
309
+ const isStart = isSameDate(date, startDate);
310
+ const isEnd = isSameDate(date, endDate);
311
+ const isInRange = isDateBetweenRange(date);
312
+ const isSelected = isDateInRange(date);
313
+ const isDisabled = isDateDisabled(date);
314
+ const isHovering = isSelectingEnd && hoverDate && isSameDate(date, hoverDate);
315
+ let cellClasses = "tw-relative tw-z-20 tw-h-10 tw-w-10 tw-flex tw-items-center tw-justify-center tw-typography-caption1Bold tw-cursor-pointer tw-transition-all ";
316
+ if (isDisabled) {
317
+ cellClasses += "tw-text-gray-300 tw-cursor-not-allowed ";
318
+ } else if (isStart || isEnd) {
319
+ cellClasses += "tw-bg-black tw-text-white tw-rounded-full ";
320
+ } else if (isInRange) {
321
+ cellClasses += "tw-text-gray-900 ";
322
+ } else {
323
+ cellClasses += "tw-text-gray-700 hover:tw-bg-gray-100 tw-rounded-full ";
324
+ }
325
+ if (isHovering && !isEnd) {
326
+ cellClasses += "tw-border-2 tw-border-gray-400 tw-border-dashed ";
327
+ }
328
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tw-relative tw-flex tw-justify-center", children: [
329
+ isInRange && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-absolute tw-inset-y-1 tw-inset-x-0 tw-bg-[#f2efec] tw-z-10" }),
330
+ isStart && endDate && !isSameDate(startDate, endDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-absolute tw-inset-y-1 tw-right-0 tw-left-1/2 tw-bg-[#f2efec] tw-z-10" }),
331
+ isEnd && startDate && !isSameDate(startDate, endDate) && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "tw-absolute tw-inset-y-1 tw-left-0 tw-right-1/2 tw-bg-[#f2efec] tw-z-10" }),
332
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
333
+ "div",
334
+ {
335
+ className: cellClasses,
336
+ onClick: () => handleDateClick(date),
337
+ onMouseEnter: () => handleDateHover(date),
338
+ children: date.getDate()
339
+ }
340
+ )
341
+ ] }, date.toISOString());
342
+ }) })
343
+ ] });
344
+ };
345
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tw-relative tw-bg-white tw-w-full", children: [
346
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tw-flex tw-items-center tw-justify-between tw-absolute tw-inset-x-0 tw-top-0 tw-z-30 tw-px-4", children: [
347
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
348
+ "div",
349
+ {
350
+ className: "tw-cursor-pointer tw-p-2 tw-rounded-full hover:tw-bg-gray-100",
351
+ onClick: () => navigateMonth(-1),
352
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Chevron, { size: "medium" })
353
+ }
354
+ ),
355
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
356
+ "div",
357
+ {
358
+ className: "tw-cursor-pointer tw-p-2 tw-rounded-full hover:tw-bg-gray-100",
359
+ onClick: () => navigateMonth(1),
360
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Chevron, { size: "medium", className: "tw-rotate-180" })
361
+ }
362
+ )
363
+ ] }),
364
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "tw-flex tw-gap-8 tw-pt-2", children: [
365
+ renderCalendar(firstMonth),
366
+ !showSingle && renderCalendar(secondMonth)
367
+ ] })
368
+ ] });
369
+ };
370
+ var InternalCalendar_default = (0, import_react.memo)(InternalCalendar);
@@ -0,0 +1,8 @@
1
+ import {
2
+ InternalCalendar_default
3
+ } from "../../chunk-N4DPPZVJ.mjs";
4
+ import "../../chunk-ZTRM4HZJ.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
+ export {
7
+ InternalCalendar_default as default
8
+ };
@@ -1,13 +1,5 @@
1
1
  import * as React from 'react';
2
-
3
- interface AvatarProps {
4
- img?: string;
5
- className?: string;
6
- name: string;
7
- height?: number;
8
- width?: number;
9
- size?: "small" | "normal";
10
- }
2
+ import { A as AvatarProps } from '../../types-mhQmqhsR.mjs';
11
3
 
12
4
  declare function Avatar({ img, className, name, height, width, size, }: AvatarProps): React.JSX.Element;
13
5
  declare namespace Avatar {
@@ -1,13 +1,5 @@
1
1
  import * as React from 'react';
2
-
3
- interface AvatarProps {
4
- img?: string;
5
- className?: string;
6
- name: string;
7
- height?: number;
8
- width?: number;
9
- size?: "small" | "normal";
10
- }
2
+ import { A as AvatarProps } from '../../types-mhQmqhsR.js';
11
3
 
12
4
  declare function Avatar({ img, className, name, height, width, size, }: AvatarProps): React.JSX.Element;
13
5
  declare namespace Avatar {
@@ -81,6 +81,8 @@ function Avatar({
81
81
  width = 28,
82
82
  size = "normal"
83
83
  }) {
84
+ var _a;
85
+ const firstChar = (_a = name == null ? void 0 : name[0]) == null ? void 0 : _a.toUpperCase();
84
86
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
85
87
  "div",
86
88
  {
@@ -90,7 +92,7 @@ function Avatar({
90
92
  "div",
91
93
  {
92
94
  style: {
93
- backgroundColor: COLOR_MAP[name[0]],
95
+ backgroundColor: COLOR_MAP[firstChar],
94
96
  height,
95
97
  width
96
98
  },
@@ -99,7 +101,7 @@ function Avatar({
99
101
  `tw-text-white tw-font-medium tw-rounded-full tw-flex tw-items-center tw-justify-center`,
100
102
  className
101
103
  ),
102
- children: name[0]
104
+ children: firstChar
103
105
  }
104
106
  ) : img ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
105
107
  "img",
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Avatar,
3
3
  Avatar_default
4
- } from "./chunk-X76GNSBB.mjs";
5
- import "./chunk-FWCSY2DS.mjs";
4
+ } from "../../chunk-IWO2Y5QX.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
6
  export {
7
7
  Avatar,
8
8
  Avatar_default as default
@@ -38,7 +38,7 @@ var import_antd = require("antd");
38
38
  var import_clsx = __toESM(require("clsx"));
39
39
 
40
40
  // src/atom/Button/Button.module.scss
41
- var Button_module_default = { "button": "Button-module__button___cLCyl", "size_large": "Button-module__size_large___S-mbU", "shape_circle": "Button-module__shape_circle___sPUS5", "size_normal": "Button-module__size_normal___qJUMj", "size_small": "Button-module__size_small___IUeei", "type_primary": "Button-module__type_primary___Tauz-", "variant_subtle": "Button-module__variant_subtle___BMbbd", "variant_text": "Button-module__variant_text___Pc5Ia", "variant_link": "Button-module__variant_link___Cj1O9", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
41
+ var Button_module_default = { "button": "Button-module__button___cLCyl", "size_large": "Button-module__size_large___S-mbU", "shape_circle": "Button-module__shape_circle___sPUS5", "size_normal": "Button-module__size_normal___qJUMj", "size_small": "Button-module__size_small___IUeei", "type_primary": "Button-module__type_primary___Tauz-", "variant_subtle": "Button-module__variant_subtle___BMbbd", "variant_text": "Button-module__variant_text___Pc5Ia", "variant_link": "Button-module__variant_link___Cj1O9", "disabled": "Button-module__disabled___nwPn4", "type_secondary": "Button-module__type_secondary___CLmrA", "type_critical": "Button-module__type_critical___6ILOp", "onHoverUnderline": "Button-module__onHoverUnderline___LOfXo" };
42
42
 
43
43
  // src/atom/Button/Button.tsx
44
44
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Button,
3
3
  Button_default
4
- } from "./chunk-HISCHZ5H.mjs";
5
- import "./chunk-FWCSY2DS.mjs";
4
+ } from "../../chunk-AF2RKLH6.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
6
  export {
7
7
  Button,
8
8
  Button_default as default
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Checkbox,
3
3
  Checkbox_default
4
- } from "./chunk-UQZNUEZE.mjs";
5
- import "./chunk-FWCSY2DS.mjs";
4
+ } from "../../chunk-UQZNUEZE.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
6
  export {
7
7
  Checkbox,
8
8
  Checkbox_default as default
@@ -0,0 +1,19 @@
1
+ import * as React$1 from 'react';
2
+
3
+ declare const sizeMapping: {
4
+ readonly xs: 16;
5
+ readonly small: 24;
6
+ readonly medium: 36;
7
+ readonly large: 48;
8
+ };
9
+ type SpinnerSize = keyof typeof sizeMapping;
10
+ interface LoadingSpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ size?: SpinnerSize;
12
+ color?: string;
13
+ }
14
+ declare const LoadingSpinner: {
15
+ ({ size, color, ...rest }: LoadingSpinnerProps): React$1.JSX.Element;
16
+ displayName: string;
17
+ };
18
+
19
+ export { LoadingSpinner, LoadingSpinner as default };
@@ -0,0 +1,19 @@
1
+ import * as React$1 from 'react';
2
+
3
+ declare const sizeMapping: {
4
+ readonly xs: 16;
5
+ readonly small: 24;
6
+ readonly medium: 36;
7
+ readonly large: 48;
8
+ };
9
+ type SpinnerSize = keyof typeof sizeMapping;
10
+ interface LoadingSpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
11
+ size?: SpinnerSize;
12
+ color?: string;
13
+ }
14
+ declare const LoadingSpinner: {
15
+ ({ size, color, ...rest }: LoadingSpinnerProps): React$1.JSX.Element;
16
+ displayName: string;
17
+ };
18
+
19
+ export { LoadingSpinner, LoadingSpinner as default };
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ var __export = (target, all) => {
36
+ for (var name in all)
37
+ __defProp(target, name, { get: all[name], enumerable: true });
38
+ };
39
+ var __copyProps = (to, from, except, desc) => {
40
+ if (from && typeof from === "object" || typeof from === "function") {
41
+ for (let key of __getOwnPropNames(from))
42
+ if (!__hasOwnProp.call(to, key) && key !== except)
43
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
44
+ }
45
+ return to;
46
+ };
47
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
48
+
49
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
50
+ var LoadingSpinner_exports = {};
51
+ __export(LoadingSpinner_exports, {
52
+ LoadingSpinner: () => LoadingSpinner,
53
+ default: () => LoadingSpinner_default
54
+ });
55
+ module.exports = __toCommonJS(LoadingSpinner_exports);
56
+ var import_icons = require("@ant-design/icons");
57
+ var import_antd = require("antd");
58
+
59
+ // src/atom/LoadingSpinner/LoadingSpinner.module.scss
60
+ var LoadingSpinner_module_default = { "spinnerContainer": "LoadingSpinner-module__spinnerContainer___DiPLf" };
61
+
62
+ // src/atom/LoadingSpinner/LoadingSpinner.tsx
63
+ var import_jsx_runtime = require("react/jsx-runtime");
64
+ var sizeMapping = {
65
+ xs: 16,
66
+ small: 24,
67
+ medium: 36,
68
+ large: 48
69
+ };
70
+ var LoadingSpinner = (_a) => {
71
+ var _b = _a, { size = "small", color = "#ec5d25" } = _b, rest = __objRest(_b, ["size", "color"]);
72
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", __spreadProps(__spreadValues({ className: LoadingSpinner_module_default.spinnerContainer }, rest), { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
73
+ import_antd.Spin,
74
+ {
75
+ indicator: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
76
+ import_icons.LoadingOutlined,
77
+ {
78
+ style: { fontSize: sizeMapping[size], color },
79
+ spin: true
80
+ }
81
+ )
82
+ }
83
+ ) }));
84
+ };
85
+ LoadingSpinner.displayName = "LoadingSpinner";
86
+ var LoadingSpinner_default = LoadingSpinner;
87
+ // Annotate the CommonJS export names for ESM import in node:
88
+ 0 && (module.exports = {
89
+ LoadingSpinner
90
+ });
@@ -0,0 +1,9 @@
1
+ import {
2
+ LoadingSpinner,
3
+ LoadingSpinner_default
4
+ } from "../../chunk-QKTMWS4J.mjs";
5
+ import "../../chunk-FWCSY2DS.mjs";
6
+ export {
7
+ LoadingSpinner,
8
+ LoadingSpinner_default as default
9
+ };