@starasia/date 1.0.5 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/date.es.js CHANGED
@@ -1,6 +1,6 @@
1
- import { jsxs as $, jsx as l, Fragment as R } from "react/jsx-runtime";
2
- import { useState as F, useRef as E, useEffect as D, forwardRef as W } from "react";
3
- const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
1
+ import { jsxs as $, jsx as l, Fragment as G } from "react/jsx-runtime";
2
+ import { useState as F, useRef as E, useEffect as D, forwardRef as j } from "react";
3
+ const S = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
4
4
 
5
5
  * {
6
6
  margin: 0;
@@ -10,105 +10,36 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
10
10
  /* box-sizing: border-box; */
11
11
  }
12
12
  :root {
13
- /* border radius */
14
- --starasia-ui-date-border-radius: var(--starasia-ui-radii-md, 8px);
15
- --starasia-ui-date-border-radius-sm: var(--starasia-ui-radii-md, 8px);
16
- --starasia-ui-date-border-radius-md: var(--starasia-ui-radii-md, 8px);
17
- --starasia-ui-date-border-radius-lg: var(--starasia-ui-radii-lg, 12px);
18
-
19
- /* color */
20
- --starasia-ui-date-color-black-secondary: var(
21
- --starasia-ui-color-gray-50,
22
- rgba(249, 250, 251, 1)
23
- );
24
- --starasia-ui-date-color-white: var(--starasia-ui-color-gray-50, rgba(255, 254, 255, 1));
25
- --starasia-ui-date-color-border: rgba(120, 134, 127, 0.2);
26
- --starasia-ui-date-color-disabled-border: rgba(120, 134, 127, 0.2);
27
- --starasia-ui-date-color-disabled-bg: rgba(120, 134, 127, 0.1);
28
-
29
- /* box shadow */
30
- --starasia-ui-date-box-shadow: var(
31
- --starasia-ui-shadow-md,
32
- 0 4px 6px -1px rgb(0 0 0 / 0.1),
33
- 0 2px 4px -2px rgb(0 0 0 / 0.1)
34
- );
35
-
36
- /* color */
37
- /* gray / black */
38
- --starasia-ui-date-color-primary-black: var(
39
- --starasia-ui-color-gray-700,
40
- rgba(55, 65, 81, 1)
41
- );
42
- --starasia-ui-date-color-secondary-black: var(
43
- --starasia-ui-color-gray-500,
44
- rgba(107, 114, 128, 1)
45
- );
46
- --starasia-ui-date-color-tertiary-black: var(
47
- --starasia-ui-color-gray-300,
48
- rgba(209, 213, 219, 1)
49
- );
50
- --starasia-ui-date-color-quaternary-black: var(
51
- --starasia-ui-color-gray-50,
52
- rgba(249, 250, 251, 1)
53
- );
54
-
55
- /* brand */
56
- --starasia-ui-date-color-primary-blue: var(--starasia-ui-brand-primary-default, rgba(74, 106, 148, 1));
57
- --starasia-ui-date-color-secondary-blue: var(--starasia-ui-brand-primary-default, rgba(74, 106, 148, 1));
58
- --starasia-ui-date-color-tertiary-blue: var(--starasia-ui-brand-primary-secondary, rgba(144, 176, 218, 1));
59
- --starasia-ui-date-color-quaternary-blue: var(--starasia-ui-brand-primary-tertiary, rgba(227, 237, 248, 1));
60
-
61
- /* spacing */
62
- --starasia-ui-date-spacing-xs: var(--starasia-ui-spacing-xs, 4px);
63
- --starasia-ui-date-spacing-sm: var(--starasia-ui-spacing-sm, 8px);
64
- --starasia-ui-date-spacing-ms: var(--starasia-ui-spacing-3, 12px);
65
- --starasia-ui-date-spacing-md: var(--starasia-ui-spacing-md, 16);
66
- --starasia-ui-date-spacing-lg: var(--starasia-ui-spacing-lg, 24px);
67
-
68
- /* height */
69
- --starasia-ui-date-input-height: var(--starasia-ui-h-10, 40px);
70
- --starasia-ui-date-height-sm: var(--starasia-ui-h-8, 32px);
71
- --starasia-ui-date-height-md: 38px;
72
- --starasia-ui-date-height-lg: var(--starasia-ui-h-12, 48px);
73
-
74
- /* color */
75
- --starasia-ui-input-color-tertiary-gray: var(
76
- --starasia-ui-color-gray-300,
77
- rgba(209, 213, 219, 1)
78
- );
79
-
80
- --starasia-ui-date-placholder-color: var(
81
- --starasia-ui-color-gray-200,
82
- rgba(201, 206, 204, 1)
83
- );
84
- --starasia-ui-date-placholder-fontWeight: var(
85
- --starasia-ui-fontWeights-normal,
86
- 300
87
- );
88
-
89
- --starasia-ui-input-color-secondary-red: var(
90
- --starasia-ui-color-red-500,
91
- rgba(239, 68, 68, 1)
92
- );
93
- --starasia-ui-input-color-secondary-yellow: var(
94
- --starasia-ui-color-yellow-500,
95
- rgba(234, 179, 8, 1)
96
- );
13
+ --sa-date-radius: var(--sa-radii-md, 0.5rem);
14
+ --sa-date-radius-lg: var(--sa-radii-lg, 0.75rem);
15
+ --sa-date-bg: var(--sa-background-primary, #ffffff);
16
+ --sa-date-border-color: rgba(120, 134, 127, 0.2);
17
+ --sa-date-border-disabled: rgba(120, 134, 127, 0.2);
18
+ --sa-date-bg-disabled: rgba(120, 134, 127, 0.1);
19
+ --sa-date-shadow: var(--sa-shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1));
20
+ --sa-date-text-primary: var(--sa-color-gray-700, #6b6e76);
21
+ --sa-date-text-subtle: var(--sa-color-gray-500, #8c8f97);
22
+ --sa-date-text-muted: var(--sa-color-gray-300, #dddee1);
23
+ --sa-date-brand: var(--sa-background-brand, #04254f);
24
+ --sa-date-brand-secondary: var(--sa-color-brand-200, #99b3db);
25
+ --sa-date-brand-subtle: var(--sa-color-brand-50, #e6edf6);
26
+ --sa-date-placeholder: var(--sa-color-gray-400, #b7b9be);
27
+ --sa-date-border-error: var(--sa-color-error-500, #ff4d6d);
28
+ --sa-date-border-warning: var(--sa-color-warning-400, #ed9f30);
97
29
  }
98
30
  .starasia-calendar-wrapper {
99
31
  position: relative;
100
32
  }
101
33
 
102
34
  .starasia-calendar {
103
- border-radius: var(--starasia-ui-date-border-radius);
104
- border: var(--starasia-ui-border, 1px) solid
105
- var(--starasia-ui-date-color-black-secondary);
106
- background: var(--starasia-ui-date-color-black-secondary);
107
- box-shadow: var(--starasia-ui-date-box-shadow);
108
- padding: var(--starasia-ui-date-spacing-lg) var(--starasia-ui-date-spacing-md);
35
+ border-radius: var(--sa-date-radius);
36
+ border: var(--sa-border, 1px) solid var(--sa-date-bg);
37
+ background: var(--sa-date-bg);
38
+ box-shadow: var(--sa-date-shadow);
39
+ padding: var(--sa-spacing-lg, 24px) var(--sa-spacing-md, 16px);
109
40
  width: max-content;
110
41
  display: flex;
111
- gap: var(--starasia-ui-date-spacing-ms);
42
+ gap: var(--sa-spacing-3, 12px);
112
43
  flex-direction: column;
113
44
  position: fixed;
114
45
  z-index: 999;
@@ -122,7 +53,7 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
122
53
  width: 100%;
123
54
  box-shadow: unset;
124
55
  border: none;
125
- background-color: var(--starasia-ui-date-color-white);
56
+ background-color: var(--sa-date-bg);
126
57
  /* background-color: white; */
127
58
  height: 100%;
128
59
  border-radius: 0;
@@ -133,17 +64,17 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
133
64
  flex-direction: row;
134
65
  align-items: center;
135
66
  justify-content: space-between;
136
- gap: var(--starasia-ui-date-spacing-xs);
67
+ gap: var(--sa-spacing-xs, 4px);
137
68
  }
138
69
 
139
70
  .starasia-calendar-days-name-preivew {
140
71
  display: flex;
141
- gap: var(--starasia-ui-date-spacing-sm);
72
+ gap: var(--sa-spacing-sm, 8px);
142
73
  }
143
74
 
144
75
  .starasia-calendar-days-name-preivew p {
145
- color: var(--starasia-ui-date-color-secondary-black);
146
- font-size: var(--starasia-ui-fontSizes-md, 14px);
76
+ color: var(--sa-date-text-subtle);
77
+ font-size: var(--sa-font-size-md, 14px);
147
78
  flex: 1;
148
79
  display: grid;
149
80
  place-content: center;
@@ -151,11 +82,11 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
151
82
  .starasia-calendar-days-number-preivew {
152
83
  display: grid;
153
84
  grid-template-columns: repeat(7, 1fr);
154
- gap: var(--starasia-ui-date-spacing-sm);
85
+ gap: var(--sa-spacing-sm, 8px);
155
86
  }
156
87
 
157
88
  .starasia-calendar-days-number-preivew p {
158
- font-size: var(--starasia-ui-fontSizes-md, 14px);
89
+ font-size: var(--sa-font-size-md, 14px);
159
90
  text-align: center;
160
91
  width: 35px;
161
92
  height: 32px;
@@ -164,31 +95,31 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
164
95
  place-content: center;
165
96
  cursor: pointer;
166
97
  font-weight: 500;
167
- border-radius: var(--starasia-ui-date-border-radius);
98
+ border-radius: var(--sa-date-radius);
168
99
  }
169
100
 
170
101
  .starasia-calendar-days {
171
- color: var(--starasia-ui-date-color-tertiary-black);
102
+ color: var(--sa-date-text-muted);
172
103
  }
173
104
  .starasia-calendar-days-current {
174
- color: var(--starasia-ui-date-color-primary-black);
105
+ color: var(--sa-date-text-primary);
175
106
  }
176
107
 
177
108
  .starasia-calendar-days-number-preivew p:hover {
178
- background: var(--starasia-ui-date-color-quaternary-blue);
179
- color: var(--starasia-ui-date-color-tertiary-blue);
109
+ background: var(--sa-date-brand-subtle);
110
+ color: var(--sa-date-brand-secondary);
180
111
  }
181
112
 
182
113
  .starasia-calendar-days-active {
183
- background: var(--starasia-ui-date-color-tertiary-blue);
184
- color: var(--starasia-ui-date-color-primary-blue);
114
+ background: var(--sa-date-brand-secondary);
115
+ color: var(--sa-date-brand);
185
116
  }
186
117
 
187
118
  /* MONTH STYLING */
188
119
  .starasia-calendar-months-preview {
189
120
  display: grid;
190
121
  grid-template-columns: repeat(3, 1fr);
191
- row-gap: var(--starasia-ui-date-spacing-xs);
122
+ row-gap: var(--sa-spacing-xs, 4px);
192
123
  }
193
124
 
194
125
  .starasia-calendar-months-preview p {
@@ -197,23 +128,23 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
197
128
  display: grid;
198
129
  place-content: center;
199
130
  cursor: pointer;
200
- border-radius: var(--starasia-ui-date-border-radius);
131
+ border-radius: var(--sa-date-radius);
201
132
  }
202
133
 
203
134
  .starasia-calendar-months-preview p:hover {
204
- background: var(--starasia-ui-date-color-quaternary-blue);
205
- color: var(--starasia-ui-date-color-tertiary-blue);
135
+ background: var(--sa-date-brand-subtle);
136
+ color: var(--sa-date-brand-secondary);
206
137
  }
207
138
 
208
139
  .starasia-calendar-months-active {
209
- background: var(--starasia-ui-date-color-tertiary-blue);
210
- color: var(--starasia-ui-date-color-primary-blue);
140
+ background: var(--sa-date-brand-secondary);
141
+ color: var(--sa-date-brand);
211
142
  }
212
143
  /* Year STYLING */
213
144
  .starasia-calendar-years-preview {
214
145
  display: grid;
215
146
  grid-template-columns: repeat(3, 1fr);
216
- row-gap: var(--starasia-ui-date-spacing-xs);
147
+ row-gap: var(--sa-spacing-xs, 4px);
217
148
  }
218
149
 
219
150
  .starasia-calendar-years-preview p {
@@ -222,17 +153,17 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
222
153
  display: grid;
223
154
  place-content: center;
224
155
  cursor: pointer;
225
- border-radius: var(--starasia-ui-date-border-radius);
156
+ border-radius: var(--sa-date-radius);
226
157
  }
227
158
 
228
159
  .starasia-calendar-years-preview p:hover {
229
- background: var(--starasia-ui-date-color-quaternary-blue);
230
- color: var(--starasia-ui-date-color-tertiary-blue);
160
+ background: var(--sa-date-brand-subtle);
161
+ color: var(--sa-date-brand-secondary);
231
162
  }
232
163
 
233
164
  .starasia-calendar-years-active {
234
- background: var(--starasia-ui-date-color-tertiary-blue);
235
- color: var(--starasia-ui-date-color-primary-blue);
165
+ background: var(--sa-date-brand-secondary);
166
+ color: var(--sa-date-brand);
236
167
  }
237
168
 
238
169
  /* INPUT */
@@ -242,50 +173,48 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
242
173
  overflow: hidden;
243
174
  display: flex;
244
175
  align-items: center;
245
- gap: var(--starasia-ui-date-spacing-sm);
176
+ gap: var(--sa-spacing-sm, 8px);
246
177
  cursor: pointer;
247
178
  }
248
179
 
249
180
  .starasia-calendar-input-container:has(input:focus) {
250
- border-color: var(--starasia-ui-date-color-primary-blue);
251
- box-shadow: 0px 0px 0px 2px rgba(var(--starasia-ui-raw-color-brand-secondary, 144, 176, 218), 0.2);
181
+ border-color: var(--sa-date-brand);
182
+ box-shadow: 0px 0px 0px 2px var(--sa-date-brand-subtle);
252
183
  }
253
184
  .starasia-calendar-input-container:has(input:disabled) {
254
- /* border-color: var(--starasia-ui-input-color-tertiary-gray); */
255
- /* background-color: var(--starasia-ui-input-color-tertiary-gray); */
256
- border-color: var(--starasia-ui-date-color-disabled-border);
257
- background-color: var(--starasia-ui-date-color-disabled-bg);
185
+ border-color: var(--sa-date-border-disabled);
186
+ background-color: var(--sa-date-bg-disabled);
258
187
  pointer-events: none;
259
188
  }
260
189
 
261
190
  .starasia-calendar-input-outline {
262
- border-color: var(--starasia-ui-date-color-border);
263
- /* border-color: var(--starasia-ui-date-color-tertiary-black); */
191
+ border-color: var(--sa-date-border-color);
192
+ /* border-color: var(--sa-date-text-muted); */
264
193
  background-color: transparent;
265
- border-width: var(--starasia-ui-border, 1px);
194
+ border-width: var(--sa-border, 1px);
266
195
  border-style: solid;
267
- /* height: var(--starasia-ui-date-input-height); */
268
- /* border-radius: var(--starasia-ui-date-border-radius); */
269
- /* padding-inline: var(--starasia-ui-date-spacing-ms); */
196
+ /* height: var(--sa-h-10, 40px); */
197
+ /* border-radius: var(--sa-date-radius); */
198
+ /* padding-inline: var(--sa-spacing-3, 12px); */
270
199
  }
271
200
 
272
201
  .starasia-calendar-input-container.sm {
273
- height: var(--starasia-ui-date-height-sm);
274
- border-radius: var(--starasia-ui-date-border-radius-sm);
275
- font-size: var(--starasia-ui-fontSizes-sm, 12px);
276
- padding-inline: var(--starasia-ui-date-spacing-sm);
202
+ height: var(--sa-h-8, 32px);
203
+ border-radius: var(--sa-date-radius);
204
+ font-size: var(--sa-font-size-sm, 12px);
205
+ padding-inline: var(--sa-spacing-sm, 8px);
277
206
  }
278
207
  .starasia-calendar-input-container.md {
279
- height: var(--starasia-ui-date-height-md);
280
- border-radius: var(--starasia-ui-date-border-radius-md);
281
- font-size: var(--starasia-ui-fontSizes-md, 14px);
282
- padding-inline: var(--starasia-ui-date-spacing-ms);
208
+ height: 38px;
209
+ border-radius: var(--sa-date-radius);
210
+ font-size: var(--sa-font-size-md, 14px);
211
+ padding-inline: var(--sa-spacing-3, 12px);
283
212
  }
284
213
  .starasia-calendar-input-container.lg {
285
- height: var(--starasia-ui-date-height-lg);
286
- border-radius: var(--starasia-ui-date-border-radius-lg);
287
- font-size: var(--starasia-ui-fontSizes-lg, 16px);
288
- padding-inline: var(--starasia-ui-date-spacing-ms);
214
+ height: var(--sa-h-12, 48px);
215
+ border-radius: var(--sa-date-radius-lg);
216
+ font-size: var(--sa-font-size-lg, 16px);
217
+ padding-inline: var(--sa-spacing-3, 12px);
289
218
  }
290
219
 
291
220
  .starasia-calendar-input-preview-container {
@@ -306,8 +235,8 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
306
235
  }
307
236
 
308
237
  .starasia-calendar-input::placeholder {
309
- color: var(--starasia-ui-date-placholder-color);
310
- font-weight: var(--starasia-ui-date-placholder-fontWeight);
238
+ color: var(--sa-date-placeholder);
239
+ font-weight: var(--sa-font-weight-normal, 300);
311
240
  }
312
241
 
313
242
  /* INPUT ICON */
@@ -319,11 +248,11 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
319
248
  }
320
249
 
321
250
  .starasia-calendar-input-container-error {
322
- border-color: var(--starasia-ui-input-color-secondary-red) !important;
251
+ border-color: var(--sa-date-border-error) !important;
323
252
  }
324
253
 
325
254
  .starasia-calendar-input-container-warning {
326
- border-color: var(--starasia-ui-input-color-secondary-yellow) !important;
255
+ border-color: var(--sa-date-border-warning) !important;
327
256
  }
328
257
  `, A = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], N = [
329
258
  "January",
@@ -338,7 +267,7 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
338
267
  "October",
339
268
  "November",
340
269
  "December"
341
- ], G = [
270
+ ], U = [
342
271
  "Jan",
343
272
  "Feb",
344
273
  "Mar",
@@ -352,44 +281,44 @@ const I = `@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wg
352
281
  "Nov",
353
282
  "Dec"
354
283
  ];
355
- function J(e) {
356
- const [a, t] = F(e), s = E(null), i = (g) => {
284
+ function J(a) {
285
+ const [e, t] = F(a), s = E(null), o = (g) => {
357
286
  s.current && !s.current.contains(g.target) && t(!1);
358
287
  };
359
- return D(() => (document.addEventListener("click", i, !0), () => {
360
- document.removeEventListener("click", i, !0);
361
- }), []), { ref: s, isComponentVisible: a, setIsComponentVisible: t };
288
+ return D(() => (document.addEventListener("click", o, !0), () => {
289
+ document.removeEventListener("click", o, !0);
290
+ }), []), { ref: s, isComponentVisible: e, setIsComponentVisible: t };
362
291
  }
363
- const j = "starasia-calendar-input-styles", U = (e) => {
364
- if (!document.getElementById(j)) {
365
- const a = document.createElement("style");
366
- a.id = j, a.textContent = e, document.head.appendChild(a);
292
+ const z = "starasia-calendar-input-styles", q = (a) => {
293
+ if (!document.getElementById(z)) {
294
+ const e = document.createElement("style");
295
+ e.id = z, e.textContent = a, document.head.appendChild(e);
367
296
  }
368
297
  };
369
- U(I);
370
- const T = (e) => {
371
- if (e === "sm")
298
+ q(S);
299
+ const T = (a) => {
300
+ if (a === "sm")
372
301
  return 16;
373
- if (e === "md")
302
+ if (a === "md")
374
303
  return 16;
375
- if (e === "lg")
304
+ if (a === "lg")
376
305
  return 20;
377
- }, K = (e) => {
378
- const { size: a = "md", status: t = "default", variant: s = "outline", ...i } = e, g = E(null), y = () => {
379
- g.current && i.onClick && (g.current.focus(), i.onClick(""));
306
+ }, K = (a) => {
307
+ const { size: e = "md", status: t = "default", variant: s = "outline", ...o } = a, g = E(null), f = () => {
308
+ g.current && o.onClick && (g.current.focus(), o.onClick(""));
380
309
  };
381
310
  return /* @__PURE__ */ $(
382
311
  "div",
383
312
  {
384
- className: `starasia-calendar-input-container starasia-calendar-input-${s} starasia-calendar-input-container-${t} ${a} `,
385
- onClick: y,
313
+ className: `starasia-calendar-input-container starasia-calendar-input-${s} starasia-calendar-input-container-${t} ${e} `,
314
+ onClick: f,
386
315
  children: [
387
316
  /* @__PURE__ */ l("div", { className: "starasia-calendar-input-container-icon-left", children: /* @__PURE__ */ l(
388
317
  "svg",
389
318
  {
390
319
  xmlns: "http://www.w3.org/2000/svg",
391
- width: T(a),
392
- height: T(a),
320
+ width: T(e),
321
+ height: T(e),
393
322
  viewBox: "0 0 20 20",
394
323
  fill: "none",
395
324
  children: /* @__PURE__ */ l(
@@ -408,9 +337,9 @@ const T = (e) => {
408
337
  "input",
409
338
  {
410
339
  className: "starasia-calendar-input",
411
- ...i,
412
- disabled: t === "disable" ? !0 : i.disabled,
413
- value: i.value,
340
+ ...o,
341
+ disabled: t === "disable" ? !0 : o.disabled,
342
+ value: o.value,
414
343
  ref: g
415
344
  }
416
345
  ) }),
@@ -418,8 +347,8 @@ const T = (e) => {
418
347
  "svg",
419
348
  {
420
349
  xmlns: "http://www.w3.org/2000/svg",
421
- width: T(a),
422
- height: T(a),
350
+ width: T(e),
351
+ height: T(e),
423
352
  viewBox: "0 0 20 20",
424
353
  fill: "none",
425
354
  children: /* @__PURE__ */ l(
@@ -438,177 +367,177 @@ const T = (e) => {
438
367
  }
439
368
  );
440
369
  }, Q = ({
441
- date: e,
442
- setDate: a,
370
+ date: a,
371
+ setDate: e,
443
372
  dateRange: t,
444
373
  setDateRange: s,
445
- onChange: i,
374
+ onChange: o,
446
375
  minDate: g,
447
- maxDate: y,
376
+ maxDate: f,
448
377
  input: v
449
378
  }) => {
450
- var u, n, c;
451
- let h = new Date(e.getFullYear(), e.getMonth(), 1), r = h.getDay(), w = [];
452
- const b = e.getMonth();
453
- for (let d = 0; d < 42; d++) {
454
- d === 0 && r === 0 ? h.setDate(h.getDate() - 7) : d === 0 ? h.setDate(
455
- h.getDate() + (d - r)
379
+ var u, r, d;
380
+ let h = new Date(a.getFullYear(), a.getMonth(), 1), n = h.getDay(), w = [];
381
+ const b = a.getMonth();
382
+ for (let c = 0; c < 42; c++) {
383
+ c === 0 && n === 0 ? h.setDate(h.getDate() - 7) : c === 0 ? h.setDate(
384
+ h.getDate() + (c - n)
456
385
  ) : h.setDate(h.getDate() + 1);
457
- let f = {
386
+ let m = {
458
387
  currentMonth: h.getMonth() === b,
459
388
  date: new Date(h),
460
389
  month: h.getMonth(),
461
390
  number: h.getDate(),
462
- selected: h.toDateString() === ((u = t.from) == null ? void 0 : u.toDateString()) || h.toDateString() === (((n = t.to) == null ? void 0 : n.toDateString()) || ((c = t.from) == null ? void 0 : c.toDateString())),
391
+ selected: h.toDateString() === ((u = t.from) == null ? void 0 : u.toDateString()) || h.toDateString() === (((r = t.to) == null ? void 0 : r.toDateString()) || ((d = t.from) == null ? void 0 : d.toDateString())),
463
392
  year: h.getFullYear(),
464
- isDisabled: g && h < g || y && h > y
393
+ isDisabled: g && h < g || f && h > f
465
394
  };
466
- w.push(f);
395
+ w.push(m);
467
396
  }
468
- const k = (d) => {
469
- a(d);
470
- }, M = (d) => {
471
- var o;
472
- let f = { ...t };
473
- if (f.from && f.to)
474
- f = { from: d, to: null };
397
+ const x = (c) => {
398
+ e(c);
399
+ }, M = (c) => {
400
+ var i;
401
+ let m = { ...t };
402
+ if (m.from && m.to)
403
+ m = { from: c, to: null };
475
404
  else {
476
- const p = ((o = f.from) == null ? void 0 : o.getTime()) || 0;
477
- d.getTime() > p ? f = { from: f.from, to: d } : f = { from: d, to: f.from };
405
+ const p = ((i = m.from) == null ? void 0 : i.getTime()) || 0;
406
+ c.getTime() > p ? m = { from: m.from, to: c } : m = { from: c, to: m.from };
478
407
  }
479
- s(f), i(f);
408
+ s(m), o(m);
480
409
  };
481
410
  return /* @__PURE__ */ $("div", { className: "starasia-calendar-days-preivew", children: [
482
- /* @__PURE__ */ l("div", { className: "starasia-calendar-days-name-preivew", children: A.map((d, f) => /* @__PURE__ */ l("p", { children: d }, f)) }),
483
- /* @__PURE__ */ l("div", { className: "starasia-calendar-days-number-preivew", children: w.map((d, f) => {
411
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-days-name-preivew", children: A.map((c, m) => /* @__PURE__ */ l("p", { children: c }, m)) }),
412
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-days-number-preivew", children: w.map((c, m) => {
484
413
  var C;
485
- const o = d.date.getTime() > t.from.getTime() && d.date.getTime() < (((C = t.to) == null ? void 0 : C.getTime()) || t.from.getTime()), p = d.isDisabled;
414
+ const i = c.date.getTime() > t.from.getTime() && c.date.getTime() < (((C = t.to) == null ? void 0 : C.getTime()) || t.from.getTime()), p = c.isDisabled;
486
415
  return /* @__PURE__ */ l(
487
416
  "p",
488
417
  {
489
- className: `${d.currentMonth ? "starasia-calendar-days-current" : "starasia-calendar-days"} ${d.selected ? "starasia-calendar-days-active" : ""}`,
418
+ className: `${c.currentMonth ? "starasia-calendar-days-current" : "starasia-calendar-days"} ${c.selected ? "starasia-calendar-days-active" : ""}`,
490
419
  style: {
491
- backgroundColor: o ? "rgba(100, 181, 246, 0.1)" : "",
420
+ backgroundColor: i ? "rgba(100, 181, 246, 0.1)" : "",
492
421
  pointerEvents: p ? "none" : void 0,
493
422
  cursor: p ? "not-allowed" : "pointer",
494
- color: p ? "#ccc" : o ? "#b0b0b0" : "",
423
+ color: p ? "#ccc" : i ? "#b0b0b0" : "",
495
424
  ...v ? {} : { width: "100%" }
496
425
  },
497
426
  onClick: () => {
498
- p || (k(d.date), M(d.date));
427
+ p || (x(c.date), M(c.date));
499
428
  },
500
- children: d.number
429
+ children: c.number
501
430
  },
502
- f
431
+ m
503
432
  );
504
433
  }) })
505
434
  ] });
506
435
  }, X = ({
507
- date: e,
508
- setDate: a,
436
+ date: a,
437
+ setDate: e,
509
438
  filter: t,
510
439
  setViews: s,
511
- dateRange: i,
440
+ dateRange: o,
512
441
  setDateRange: g,
513
- onChange: y,
442
+ onChange: f,
514
443
  minDate: v,
515
444
  maxDate: h,
516
- input: r
445
+ input: n
517
446
  }) => {
518
- const w = i.from.getFullYear(), b = e.getFullYear(), k = (u) => {
519
- t ? (M(u), a(u)) : (s("days"), a(u));
447
+ const w = o.from.getFullYear(), b = a.getFullYear(), x = (u) => {
448
+ t ? (M(u), e(u)) : (s("days"), e(u));
520
449
  }, M = (u) => {
521
- var c;
522
- let n = { ...i };
523
- if (n.from && n.to)
524
- n = { from: u, to: null };
450
+ var d;
451
+ let r = { ...o };
452
+ if (r.from && r.to)
453
+ r = { from: u, to: null };
525
454
  else {
526
- const d = ((c = n.from) == null ? void 0 : c.getTime()) || 0;
527
- u.getTime() > d ? n = { from: n.from, to: u } : n = { from: u, to: n.from };
455
+ const c = ((d = r.from) == null ? void 0 : d.getTime()) || 0;
456
+ u.getTime() > c ? r = { from: r.from, to: u } : r = { from: u, to: r.from };
528
457
  }
529
- g(n), y(n);
458
+ g(r), f(r);
530
459
  };
531
- return /* @__PURE__ */ l("div", { className: "starasia-calendar-months-preview", children: N.map((u, n) => {
532
- var f, o, p;
533
- const c = new Date(b, n).getTime() > i.from.getTime() && new Date(b, n).getTime() < (((f = i.to) == null ? void 0 : f.getTime()) || i.from.getTime()), d = v && new Date(b, n) < v || h && new Date(b, n) > h;
460
+ return /* @__PURE__ */ l("div", { className: "starasia-calendar-months-preview", children: N.map((u, r) => {
461
+ var m, i, p;
462
+ const d = new Date(b, r).getTime() > o.from.getTime() && new Date(b, r).getTime() < (((m = o.to) == null ? void 0 : m.getTime()) || o.from.getTime()), c = v && new Date(b, r) < v || h && new Date(b, r) > h;
534
463
  return /* @__PURE__ */ l(
535
464
  "p",
536
465
  {
537
- className: w === b && (n === ((o = i.from) == null ? void 0 : o.getMonth()) || n === ((p = i.to) == null ? void 0 : p.getMonth())) ? "starasia-calendar-months-active" : "",
466
+ className: w === b && (r === ((i = o.from) == null ? void 0 : i.getMonth()) || r === ((p = o.to) == null ? void 0 : p.getMonth())) ? "starasia-calendar-months-active" : "",
538
467
  style: {
539
- backgroundColor: c ? "rgba(100, 181, 246, 0.1)" : "",
540
- pointerEvents: d ? "none" : void 0,
541
- cursor: d ? "not-allowed" : "pointer",
542
- color: d ? "#ccc" : c ? "#b0b0b0" : "",
543
- ...r ? {} : { width: "100%" }
468
+ backgroundColor: d ? "rgba(100, 181, 246, 0.1)" : "",
469
+ pointerEvents: c ? "none" : void 0,
470
+ cursor: c ? "not-allowed" : "pointer",
471
+ color: c ? "#ccc" : d ? "#b0b0b0" : "",
472
+ ...n ? {} : { width: "100%" }
544
473
  },
545
474
  onClick: () => {
546
- d || k(new Date(b, n));
475
+ c || x(new Date(b, r));
547
476
  },
548
477
  children: u.slice(0, 3)
549
478
  },
550
- n
479
+ r
551
480
  );
552
481
  }) });
553
- }, B = (e) => {
554
- const a = Math.floor(e / 10) * 10, t = a + 10;
555
- return { start: a, end: t };
482
+ }, B = (a) => {
483
+ const e = Math.floor(a / 10) * 10, t = e + 10;
484
+ return { start: e, end: t };
556
485
  }, Z = ({
557
- date: e,
558
- filter: a,
486
+ date: a,
487
+ filter: e,
559
488
  setViews: t,
560
489
  setDate: s,
561
- dateRange: i,
490
+ dateRange: o,
562
491
  setDateRange: g,
563
- onChange: y,
492
+ onChange: f,
564
493
  minDate: v,
565
494
  maxDate: h,
566
- input: r
495
+ input: n
567
496
  }) => {
568
- var f;
497
+ var m;
569
498
  let w = [];
570
- const b = e.getFullYear(), { start: k, end: M } = B(b), u = i.from.getFullYear(), n = (f = i.to) == null ? void 0 : f.getFullYear();
571
- for (let o = k; o < M; o++) {
572
- const p = new Date(o, 0), C = (!v || p >= v) && (!h || p <= h), x = o === u || o === n, m = p > i.from && p < i.to;
499
+ const b = a.getFullYear(), { start: x, end: M } = B(b), u = o.from.getFullYear(), r = (m = o.to) == null ? void 0 : m.getFullYear();
500
+ for (let i = x; i < M; i++) {
501
+ const p = new Date(i, 0), C = (!v || p >= v) && (!h || p <= h), k = i === u || i === r, y = p > o.from && p < o.to;
573
502
  w.push({
574
- year: o,
575
- active: x && C,
576
- highlight: m && C,
503
+ year: i,
504
+ active: k && C,
505
+ highlight: y && C,
577
506
  disabled: !C
578
507
  });
579
508
  }
580
- const c = (o) => {
581
- a ? (d(o), s(o)) : (s(o), t("months"));
582
- }, d = (o) => {
509
+ const d = (i) => {
510
+ e ? (c(i), s(i)) : (s(i), t("months"));
511
+ }, c = (i) => {
583
512
  var C;
584
- let p = { ...i };
513
+ let p = { ...o };
585
514
  if (p.from && p.to)
586
- p = { from: o, to: null };
515
+ p = { from: i, to: null };
587
516
  else {
588
- const x = ((C = p.from) == null ? void 0 : C.getTime()) || 0;
589
- o.getTime() > x ? p = { from: p.from, to: o } : p = { from: o, to: p.from };
517
+ const k = ((C = p.from) == null ? void 0 : C.getTime()) || 0;
518
+ i.getTime() > k ? p = { from: p.from, to: i } : p = { from: i, to: p.from };
590
519
  }
591
- g(p), y(p);
520
+ g(p), f(p);
592
521
  };
593
- return /* @__PURE__ */ l("div", { className: "starasia-calendar-years-preview", children: w.map((o, p) => /* @__PURE__ */ l(
522
+ return /* @__PURE__ */ l("div", { className: "starasia-calendar-years-preview", children: w.map((i, p) => /* @__PURE__ */ l(
594
523
  "p",
595
524
  {
596
- className: `${o.active ? "starasia-calendar-months-active" : ""} ${o.highlight ? "starasia-calendar-months-highlight" : ""} ${o.disabled ? "starasia-calendar-disabled" : ""}`,
525
+ className: `${i.active ? "starasia-calendar-months-active" : ""} ${i.highlight ? "starasia-calendar-months-highlight" : ""} ${i.disabled ? "starasia-calendar-disabled" : ""}`,
597
526
  onClick: () => {
598
- o.disabled || c(new Date(o.year, 0));
527
+ i.disabled || d(new Date(i.year, 0));
599
528
  },
600
529
  style: {
601
- backgroundColor: o.highlight ? "rgba(100, 181, 246, 0.1)" : "",
602
- color: o.highlight ? "#b0b0b0" : o.active ? "" : o.disabled ? "#ccc" : "",
603
- cursor: o.disabled ? "not-allowed" : "pointer",
604
- pointerEvents: o.disbled ? "none" : "all",
605
- ...r ? {} : { width: "100%" }
530
+ backgroundColor: i.highlight ? "rgba(100, 181, 246, 0.1)" : "",
531
+ color: i.highlight ? "#b0b0b0" : i.active ? "" : i.disabled ? "#ccc" : "",
532
+ cursor: i.disabled ? "not-allowed" : "pointer",
533
+ pointerEvents: i.disbled ? "none" : "all",
534
+ ...n ? {} : { width: "100%" }
606
535
  },
607
- children: o.year
536
+ children: i.year
608
537
  },
609
538
  p
610
539
  )) });
611
- }, q = ({ ...e }) => /* @__PURE__ */ l(
540
+ }, P = ({ ...a }) => /* @__PURE__ */ l(
612
541
  "svg",
613
542
  {
614
543
  xmlns: "http://www.w3.org/2000/svg",
@@ -616,7 +545,7 @@ const T = (e) => {
616
545
  height: "20",
617
546
  viewBox: "0 0 20 20",
618
547
  fill: "none",
619
- ...e,
548
+ ...a,
620
549
  children: /* @__PURE__ */ l(
621
550
  "path",
622
551
  {
@@ -628,7 +557,7 @@ const T = (e) => {
628
557
  }
629
558
  )
630
559
  }
631
- ), P = ({ ...e }) => /* @__PURE__ */ l(
560
+ ), R = ({ ...a }) => /* @__PURE__ */ l(
632
561
  "svg",
633
562
  {
634
563
  xmlns: "http://www.w3.org/2000/svg",
@@ -636,7 +565,7 @@ const T = (e) => {
636
565
  height: "20",
637
566
  viewBox: "0 0 20 20",
638
567
  fill: "none",
639
- ...e,
568
+ ...a,
640
569
  children: /* @__PURE__ */ l(
641
570
  "path",
642
571
  {
@@ -649,118 +578,118 @@ const T = (e) => {
649
578
  )
650
579
  }
651
580
  ), _ = ({
652
- setViews: e,
653
- views: a,
581
+ setViews: a,
582
+ views: e,
654
583
  filter: t,
655
584
  date: s,
656
- setDate: i
585
+ setDate: o
657
586
  }) => {
658
587
  const g = () => {
659
- t || e((r) => r === "days" ? "months" : r === "months" ? "years" : "days");
660
- }, y = () => {
661
- if (a === "years") {
662
- i((r) => new Date(r.getFullYear() + 10, 0));
588
+ t || a((n) => n === "days" ? "months" : n === "months" ? "years" : "days");
589
+ }, f = () => {
590
+ if (e === "years") {
591
+ o((n) => new Date(n.getFullYear() + 10, 0));
663
592
  return;
664
593
  }
665
- if (a === "months") {
666
- i((r) => new Date(r.getFullYear() + 1, r.getMonth()));
594
+ if (e === "months") {
595
+ o((n) => new Date(n.getFullYear() + 1, n.getMonth()));
667
596
  return;
668
597
  }
669
- i((r) => new Date(r.getFullYear(), r.getMonth() + 1));
598
+ o((n) => new Date(n.getFullYear(), n.getMonth() + 1));
670
599
  }, v = () => {
671
- if (a === "years") {
672
- i((r) => new Date(r.getFullYear() - 10, 0));
600
+ if (e === "years") {
601
+ o((n) => new Date(n.getFullYear() - 10, 0));
673
602
  return;
674
603
  }
675
- if (a === "months") {
676
- i((r) => new Date(r.getFullYear() - 1, r.getMonth()));
604
+ if (e === "months") {
605
+ o((n) => new Date(n.getFullYear() - 1, n.getMonth()));
677
606
  return;
678
607
  }
679
- i(
680
- (r) => new Date(
681
- r.getMonth() === 0 ? r.getFullYear() - 1 : r.getFullYear(),
682
- r.getMonth() === 0 ? 11 : r.getMonth() - 1
608
+ o(
609
+ (n) => new Date(
610
+ n.getMonth() === 0 ? n.getFullYear() - 1 : n.getFullYear(),
611
+ n.getMonth() === 0 ? 11 : n.getMonth() - 1
683
612
  )
684
613
  );
685
614
  };
686
615
  return /* @__PURE__ */ $("div", { className: "starasia-calendar-header", children: [
687
- /* @__PURE__ */ l(q, { onClick: () => v() }),
616
+ /* @__PURE__ */ l(P, { onClick: () => v() }),
688
617
  /* @__PURE__ */ l("div", { style: { cursor: "pointer" }, onClick: g, children: (() => {
689
- if (a === "days")
618
+ if (e === "days")
690
619
  return `${N[s.getMonth()]} ${s.getFullYear()}`;
691
- if (a === "months")
620
+ if (e === "months")
692
621
  return `${s.getFullYear()}`;
693
- if (a === "years")
622
+ if (e === "years")
694
623
  return `${B(s.getFullYear()).start} ~ ${B(s.getFullYear()).end}`;
695
624
  })() }),
696
- /* @__PURE__ */ l(P, { onClick: () => y() })
625
+ /* @__PURE__ */ l(R, { onClick: () => f() })
697
626
  ] });
698
627
  };
699
- function L(e) {
700
- const a = new Date(e), t = a.getFullYear(), s = a.getMonth();
701
- return `${a.getDate().toString().padStart(2, "0")} ${G[s]} ${t}`;
628
+ function L(a) {
629
+ const e = new Date(a), t = e.getFullYear(), s = e.getMonth();
630
+ return `${e.getDate().toString().padStart(2, "0")} ${U[s]} ${t}`;
702
631
  }
703
- const z = "starasia-calendar-styles", aa = (e) => {
704
- if (!document.getElementById(z)) {
705
- const a = document.createElement("style");
706
- a.id = z, a.textContent = e, document.head.appendChild(a);
632
+ const W = "starasia-calendar-styles", ee = (a) => {
633
+ if (!document.getElementById(W)) {
634
+ const e = document.createElement("style");
635
+ e.id = W, e.textContent = a, document.head.appendChild(e);
707
636
  }
708
637
  };
709
- aa(I);
710
- const ra = W(
638
+ ee(S);
639
+ const ne = j(
711
640
  ({
712
- value: e,
713
- onChange: a,
641
+ value: a,
642
+ onChange: e,
714
643
  filter: t,
715
644
  input: s = !0,
716
- disabled: i,
645
+ disabled: o,
717
646
  minDate: g,
718
- maxDate: y,
647
+ maxDate: f,
719
648
  placeholder: v,
720
649
  size: h,
721
- status: r
650
+ status: n
722
651
  }, w) => {
723
- const { ref: b, isComponentVisible: k, setIsComponentVisible: M } = J(!1), u = E(null), [n, c] = F("days"), [d, f] = F(/* @__PURE__ */ new Date()), [o, p] = F({
724
- from: (e == null ? void 0 : e.from) || /* @__PURE__ */ new Date(),
725
- to: (e == null ? void 0 : e.to) || /* @__PURE__ */ new Date()
652
+ const { ref: b, isComponentVisible: x, setIsComponentVisible: M } = J(!1), u = E(null), [r, d] = F("days"), [c, m] = F(/* @__PURE__ */ new Date()), [i, p] = F({
653
+ from: (a == null ? void 0 : a.from) || /* @__PURE__ */ new Date(),
654
+ to: (a == null ? void 0 : a.to) || /* @__PURE__ */ new Date()
726
655
  });
727
656
  D(() => {
728
- e ? (f(e.from), p(e)) : (f(/* @__PURE__ */ new Date()), p({
657
+ a ? (m(a.from), p(a)) : (m(/* @__PURE__ */ new Date()), p({
729
658
  from: /* @__PURE__ */ new Date(),
730
659
  to: /* @__PURE__ */ new Date()
731
660
  }));
732
- }, [e]), D(() => {
733
- t && c(t);
661
+ }, [a]), D(() => {
662
+ t && d(t);
734
663
  }, [t]), D(() => {
735
- t || c("days");
736
- }, [k]), D(() => {
664
+ t || d("days");
665
+ }, [x]), D(() => {
737
666
  s || M(!0);
738
667
  }, [s]);
739
668
  const C = () => {
740
- var m, Y;
741
- if (!e)
669
+ var y, Y;
670
+ if (!a)
742
671
  return "";
743
672
  if (t) {
744
- if (n === "days")
745
- return `${L(o.from)} ~ ${L(o.to || o.from) || "-"}`;
746
- if (n === "months")
747
- return `${N[o.from.getMonth()]} ~ ${o.to ? N[o.to.getMonth()] : "-"}`;
748
- if (n === "years")
749
- return `${(m = o.from) == null ? void 0 : m.getFullYear()} ~ ${((Y = o.to) == null ? void 0 : Y.getFullYear()) || "-"}`;
673
+ if (r === "days")
674
+ return `${L(i.from)} ~ ${L(i.to || i.from) || "-"}`;
675
+ if (r === "months")
676
+ return `${N[i.from.getMonth()]} ~ ${i.to ? N[i.to.getMonth()] : "-"}`;
677
+ if (r === "years")
678
+ return `${(y = i.from) == null ? void 0 : y.getFullYear()} ~ ${((Y = i.to) == null ? void 0 : Y.getFullYear()) || "-"}`;
750
679
  } else
751
- return `${L(o.from)} ~ ${L(o.to || o.from) || "-"}`;
752
- }, x = () => {
680
+ return `${L(i.from)} ~ ${L(i.to || i.from) || "-"}`;
681
+ }, k = () => {
753
682
  if (u.current && b.current && s) {
754
- const m = b.current.getBoundingClientRect(), Y = u.current.getBoundingClientRect();
755
- window.innerWidth < m.left + Y.width ? u.current.style.left = `${m.left - Y.width + m.width}px` : u.current.style.left = `${m.left}px`, m.top + Y.height > window.innerHeight ? u.current.style.top = `${m.y - (m.height + Y.height - 28)}px` : u.current.style.top = `${m.y + m.height}px`;
683
+ const y = b.current.getBoundingClientRect(), Y = u.current.getBoundingClientRect();
684
+ window.innerWidth < y.left + Y.width ? u.current.style.left = `${y.left - Y.width + y.width}px` : u.current.style.left = `${y.left}px`, y.top + Y.height > window.innerHeight ? u.current.style.top = `${y.y - (y.height + Y.height - 28)}px` : u.current.style.top = `${y.y + y.height}px`;
756
685
  }
757
686
  };
758
687
  return D(() => {
759
- u.current && b.current && s && x();
760
- }, [u, b, k]), D(() => {
761
- const m = w == null ? void 0 : w.current;
762
- return m && m.addEventListener("scroll", x), window.addEventListener("scroll", x), () => {
763
- m && m.removeEventListener("scroll", x), window.removeEventListener("scroll", x);
688
+ u.current && b.current && s && k();
689
+ }, [u, b, x]), D(() => {
690
+ const y = w == null ? void 0 : w.current;
691
+ return y && y.addEventListener("scroll", k), window.addEventListener("scroll", k), () => {
692
+ y && y.removeEventListener("scroll", k), window.removeEventListener("scroll", k);
764
693
  };
765
694
  }, []), /* @__PURE__ */ $(
766
695
  "div",
@@ -779,13 +708,13 @@ const ra = W(
779
708
  },
780
709
  onChange: () => {
781
710
  },
782
- disabled: i,
711
+ disabled: o,
783
712
  placeholder: v,
784
713
  size: h,
785
- status: r
714
+ status: n
786
715
  }
787
716
  ) : null,
788
- k ? /* @__PURE__ */ $(
717
+ x ? /* @__PURE__ */ $(
789
718
  "div",
790
719
  {
791
720
  className: `starasia-calendar ${s ? "" : "starasia-calendar-no-input"}`,
@@ -794,55 +723,55 @@ const ra = W(
794
723
  /* @__PURE__ */ l(
795
724
  _,
796
725
  {
797
- setViews: c,
798
- views: n,
726
+ setViews: d,
727
+ views: r,
799
728
  filter: t,
800
- date: d,
801
- setDate: f
729
+ date: c,
730
+ setDate: m
802
731
  }
803
732
  ),
804
- /* @__PURE__ */ l("div", { className: "starasia-calendar-body", children: n === "days" ? /* @__PURE__ */ l(
733
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-body", children: r === "days" ? /* @__PURE__ */ l(
805
734
  Q,
806
735
  {
807
- date: d,
808
- setDate: f,
736
+ date: c,
737
+ setDate: m,
809
738
  setIsComponentVisible: M,
810
- dateRange: o,
739
+ dateRange: i,
811
740
  setDateRange: p,
812
741
  input: s,
813
- onChange: a,
742
+ onChange: e,
814
743
  minDate: g,
815
- maxDate: y
744
+ maxDate: f
816
745
  }
817
- ) : n === "months" ? /* @__PURE__ */ l(
746
+ ) : r === "months" ? /* @__PURE__ */ l(
818
747
  X,
819
748
  {
820
- date: d,
821
- setDate: f,
749
+ date: c,
750
+ setDate: m,
822
751
  filter: t,
823
- setViews: c,
824
- dateRange: o,
752
+ setViews: d,
753
+ dateRange: i,
825
754
  setDateRange: p,
826
755
  setIsComponentVisible: M,
827
756
  input: s,
828
- onChange: a,
757
+ onChange: e,
829
758
  minDate: g,
830
- maxDate: y
759
+ maxDate: f
831
760
  }
832
761
  ) : /* @__PURE__ */ l(
833
762
  Z,
834
763
  {
835
- date: d,
836
- setDate: f,
764
+ date: c,
765
+ setDate: m,
837
766
  filter: t,
838
- setViews: c,
839
- dateRange: o,
767
+ setViews: d,
768
+ dateRange: i,
840
769
  setDateRange: p,
841
770
  setIsComponentVisible: M,
842
771
  input: s,
843
- onChange: a,
772
+ onChange: e,
844
773
  minDate: g,
845
- maxDate: y
774
+ maxDate: f
846
775
  }
847
776
  ) })
848
777
  ]
@@ -852,36 +781,36 @@ const ra = W(
852
781
  }
853
782
  );
854
783
  }
855
- ), O = "starasia-calendar-input-styles", ea = (e) => {
784
+ ), O = "starasia-calendar-input-styles", ae = (a) => {
856
785
  if (!document.getElementById(O)) {
857
- const a = document.createElement("style");
858
- a.id = O, a.textContent = e, document.head.appendChild(a);
786
+ const e = document.createElement("style");
787
+ e.id = O, e.textContent = a, document.head.appendChild(e);
859
788
  }
860
789
  };
861
- ea(I);
862
- const S = (e) => {
863
- if (e === "sm")
790
+ ae(S);
791
+ const I = (a) => {
792
+ if (a === "sm")
864
793
  return 16;
865
- if (e === "md")
794
+ if (a === "md")
866
795
  return 16;
867
- if (e === "lg")
796
+ if (a === "lg")
868
797
  return 20;
869
- }, na = (e) => {
870
- const { size: a = "md", status: t = "default", variant: s = "outline", ...i } = e, g = E(null), y = () => {
871
- g.current && i.onClick && (g.current.focus(), i.onClick(""));
798
+ }, re = (a) => {
799
+ const { size: e = "md", status: t = "default", variant: s = "outline", ...o } = a, g = E(null), f = () => {
800
+ g.current && o.onClick && (g.current.focus(), o.onClick(""));
872
801
  };
873
802
  return /* @__PURE__ */ $(
874
803
  "div",
875
804
  {
876
- className: `starasia-calendar-input-container starasia-calendar-input-${s} starasia-calendar-input-container-${t} ${a} `,
877
- onClick: y,
805
+ className: `starasia-calendar-input-container starasia-calendar-input-${s} starasia-calendar-input-container-${t} ${e} `,
806
+ onClick: f,
878
807
  children: [
879
808
  /* @__PURE__ */ l("div", { className: "starasia-calendar-input-container-icon-left", children: /* @__PURE__ */ l(
880
809
  "svg",
881
810
  {
882
811
  xmlns: "http://www.w3.org/2000/svg",
883
- width: S(a),
884
- height: S(a),
812
+ width: I(e),
813
+ height: I(e),
885
814
  viewBox: "0 0 20 20",
886
815
  fill: "none",
887
816
  children: /* @__PURE__ */ l(
@@ -900,9 +829,9 @@ const S = (e) => {
900
829
  "input",
901
830
  {
902
831
  className: "starasia-calendar-input",
903
- ...i,
904
- disabled: t === "disable" ? !0 : i.disabled,
905
- value: i.value,
832
+ ...o,
833
+ disabled: t === "disable" ? !0 : o.disabled,
834
+ value: o.value,
906
835
  ref: g
907
836
  }
908
837
  ) }),
@@ -910,8 +839,8 @@ const S = (e) => {
910
839
  "svg",
911
840
  {
912
841
  xmlns: "http://www.w3.org/2000/svg",
913
- width: S(a),
914
- height: S(a),
842
+ width: I(e),
843
+ height: I(e),
915
844
  viewBox: "0 0 20 20",
916
845
  fill: "none",
917
846
  children: /* @__PURE__ */ l(
@@ -929,233 +858,233 @@ const S = (e) => {
929
858
  ]
930
859
  }
931
860
  );
932
- }, ta = ({
933
- date: e,
934
- setDate: a,
861
+ }, te = ({
862
+ date: a,
863
+ setDate: e,
935
864
  previewDate: t,
936
865
  setPreviewDate: s,
937
- setIsComponentVisible: i,
866
+ setIsComponentVisible: o,
938
867
  minDate: g,
939
- maxDate: y,
868
+ maxDate: f,
940
869
  input: v,
941
870
  onChange: h
942
871
  }) => {
943
- let r = new Date(
872
+ let n = new Date(
944
873
  t.getFullYear(),
945
874
  t.getMonth(),
946
875
  1
947
- ), w = r.getDay(), b = [];
948
- const k = e.toDateString(), M = t.getMonth();
949
- for (let n = 0; n < 42; n++) {
950
- n === 0 && w === 0 ? r.setDate(r.getDate() - 7) : n === 0 ? r.setDate(
951
- r.getDate() + (n - w)
952
- ) : r.setDate(r.getDate() + 1);
953
- let c = {
954
- currentMonth: r.getMonth() === M,
955
- date: new Date(r),
956
- month: r.getMonth(),
957
- number: r.getDate(),
958
- selected: r.toDateString() === k,
959
- year: r.getFullYear(),
960
- isDisabled: g && r < g || y && r > y
876
+ ), w = n.getDay(), b = [];
877
+ const x = a.toDateString(), M = t.getMonth();
878
+ for (let r = 0; r < 42; r++) {
879
+ r === 0 && w === 0 ? n.setDate(n.getDate() - 7) : r === 0 ? n.setDate(
880
+ n.getDate() + (r - w)
881
+ ) : n.setDate(n.getDate() + 1);
882
+ let d = {
883
+ currentMonth: n.getMonth() === M,
884
+ date: new Date(n),
885
+ month: n.getMonth(),
886
+ number: n.getDate(),
887
+ selected: n.toDateString() === x,
888
+ year: n.getFullYear(),
889
+ isDisabled: g && n < g || f && n > f
961
890
  };
962
- b.push(c);
891
+ b.push(d);
963
892
  }
964
- const u = (n) => {
965
- (!g || n >= g) && (!y || n <= y) && (a(n), h(n), s(n), v && i(!1));
893
+ const u = (r) => {
894
+ (!g || r >= g) && (!f || r <= f) && (e(r), h(r), s(r), v && o(!1));
966
895
  };
967
896
  return /* @__PURE__ */ $("div", { className: "starasia-calendar-days-preivew", children: [
968
- /* @__PURE__ */ l("div", { className: "starasia-calendar-days-name-preivew", children: A.map((n, c) => /* @__PURE__ */ l("p", { children: n }, c)) }),
969
- /* @__PURE__ */ l("div", { className: "starasia-calendar-days-number-preivew", children: b.map((n, c) => {
970
- const d = n.isDisabled;
897
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-days-name-preivew", children: A.map((r, d) => /* @__PURE__ */ l("p", { children: r }, d)) }),
898
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-days-number-preivew", children: b.map((r, d) => {
899
+ const c = r.isDisabled;
971
900
  return /* @__PURE__ */ l(
972
901
  "p",
973
902
  {
974
- className: `${n.currentMonth ? "starasia-calendar-days-current" : "starasia-calendar-days"} ${n.selected ? "starasia-calendar-days-active" : ""}`,
903
+ className: `${r.currentMonth ? "starasia-calendar-days-current" : "starasia-calendar-days"} ${r.selected ? "starasia-calendar-days-active" : ""}`,
975
904
  style: {
976
- color: d ? "#ccc" : void 0,
977
- pointerEvents: d ? "none" : void 0,
978
- cursor: d ? "not-allowed" : "pointer",
905
+ color: c ? "#ccc" : void 0,
906
+ pointerEvents: c ? "none" : void 0,
907
+ cursor: c ? "not-allowed" : "pointer",
979
908
  ...v ? {} : { width: "100%" }
980
909
  },
981
910
  onClick: () => {
982
- d || u(n.date);
911
+ c || u(r.date);
983
912
  },
984
- children: n.number
913
+ children: r.number
985
914
  },
986
- c
915
+ d
987
916
  );
988
917
  }) })
989
918
  ] });
990
- }, sa = ({
991
- date: e,
992
- setDate: a,
919
+ }, se = ({
920
+ date: a,
921
+ setDate: e,
993
922
  filter: t,
994
923
  setViews: s,
995
- onChange: i,
924
+ onChange: o,
996
925
  previewDate: g,
997
- setPreviewDate: y,
926
+ setPreviewDate: f,
998
927
  minDate: v,
999
928
  maxDate: h,
1000
- input: r
929
+ input: n
1001
930
  }) => {
1002
- const w = e.getMonth(), b = e.getFullYear(), k = g.getFullYear(), M = (u) => {
1003
- (!v || u >= v) && (!h || u <= h) && (t ? (i(u), a(u), y(u)) : (s("days"), y(u)));
931
+ const w = a.getMonth(), b = a.getFullYear(), x = g.getFullYear(), M = (u) => {
932
+ (!v || u >= v) && (!h || u <= h) && (t ? (o(u), e(u), f(u)) : (s("days"), f(u)));
1004
933
  };
1005
- return /* @__PURE__ */ l("div", { className: "starasia-calendar-months-preview", children: N.map((u, n) => {
1006
- const c = v && new Date(k, n, 1) < v || h && new Date(k, n + 1, 0) > h;
934
+ return /* @__PURE__ */ l("div", { className: "starasia-calendar-months-preview", children: N.map((u, r) => {
935
+ const d = v && new Date(x, r, 1) < v || h && new Date(x, r + 1, 0) > h;
1007
936
  return /* @__PURE__ */ l(
1008
937
  "p",
1009
938
  {
1010
- className: n === w && k === b ? "starasia-calendar-months-active" : "",
939
+ className: r === w && x === b ? "starasia-calendar-months-active" : "",
1011
940
  style: {
1012
- color: c ? "#ccc" : void 0,
1013
- pointerEvents: c ? "none" : void 0,
1014
- cursor: c ? "not-allowed" : "pointer",
1015
- ...r ? {} : { width: "100%" }
941
+ color: d ? "#ccc" : void 0,
942
+ pointerEvents: d ? "none" : void 0,
943
+ cursor: d ? "not-allowed" : "pointer",
944
+ ...n ? {} : { width: "100%" }
1016
945
  },
1017
946
  onClick: () => {
1018
- c || M(new Date(k, n));
947
+ d || M(new Date(x, r));
1019
948
  },
1020
949
  children: u.slice(0, 3)
1021
950
  },
1022
- n
951
+ r
1023
952
  );
1024
953
  }) });
1025
- }, V = (e) => {
1026
- const a = Math.floor(e / 10) * 10, t = a + 10;
1027
- return { start: a, end: t };
1028
- }, ia = ({
1029
- date: e,
1030
- filter: a,
954
+ }, V = (a) => {
955
+ const e = Math.floor(a / 10) * 10, t = e + 10;
956
+ return { start: e, end: t };
957
+ }, oe = ({
958
+ date: a,
959
+ filter: e,
1031
960
  setViews: t,
1032
961
  setDate: s,
1033
- onChange: i,
962
+ onChange: o,
1034
963
  previewDate: g,
1035
- setPreviewDate: y,
964
+ setPreviewDate: f,
1036
965
  minDate: v,
1037
966
  maxDate: h,
1038
- input: r
967
+ input: n
1039
968
  }) => {
1040
969
  let w = [];
1041
- const b = g.getFullYear(), { start: k, end: M } = V(b), u = e.getFullYear();
1042
- for (let c = k; c < M; c++) {
1043
- let d = v && new Date(c, 0, 1) < v || h && new Date(c, 11, 31) > h;
1044
- w.push({ year: c, active: c === u, isDisabled: d });
970
+ const b = g.getFullYear(), { start: x, end: M } = V(b), u = a.getFullYear();
971
+ for (let d = x; d < M; d++) {
972
+ let c = v && new Date(d, 0, 1) < v || h && new Date(d, 11, 31) > h;
973
+ w.push({ year: d, active: d === u, isDisabled: c });
1045
974
  }
1046
- const n = (c) => {
1047
- (!v || c >= v) && (!h || c <= h) && (a ? (i(c), s(c), y(c)) : (t("months"), y(c)));
975
+ const r = (d) => {
976
+ (!v || d >= v) && (!h || d <= h) && (e ? (o(d), s(d), f(d)) : (t("months"), f(d)));
1048
977
  };
1049
- return /* @__PURE__ */ l("div", { className: "starasia-calendar-years-preview", children: w.map((c, d) => /* @__PURE__ */ l(
978
+ return /* @__PURE__ */ l("div", { className: "starasia-calendar-years-preview", children: w.map((d, c) => /* @__PURE__ */ l(
1050
979
  "p",
1051
980
  {
1052
- className: c.active ? "starasia-calendar-months-active" : "",
981
+ className: d.active ? "starasia-calendar-months-active" : "",
1053
982
  style: {
1054
- color: c.isDisabled ? "#ccc" : void 0,
1055
- pointerEvents: c.isDisabled ? "none" : void 0,
1056
- cursor: c.isDisabled ? "not-allowed" : "pointer",
1057
- ...r ? {} : { width: "100%" }
983
+ color: d.isDisabled ? "#ccc" : void 0,
984
+ pointerEvents: d.isDisabled ? "none" : void 0,
985
+ cursor: d.isDisabled ? "not-allowed" : "pointer",
986
+ ...n ? {} : { width: "100%" }
1058
987
  },
1059
988
  onClick: () => {
1060
- c.isDisabled || n(new Date(c.year, 0));
989
+ d.isDisabled || r(new Date(d.year, 0));
1061
990
  },
1062
- children: c.year
991
+ children: d.year
1063
992
  },
1064
- d
993
+ c
1065
994
  )) });
1066
- }, oa = ({
1067
- setViews: e,
1068
- views: a,
995
+ }, ie = ({
996
+ setViews: a,
997
+ views: e,
1069
998
  filter: t,
1070
999
  previewDate: s,
1071
- setPreviewDate: i
1000
+ setPreviewDate: o
1072
1001
  }) => {
1073
1002
  const g = () => {
1074
- t || e((r) => r === "days" ? "months" : r === "months" ? "years" : "days");
1075
- }, y = () => {
1076
- if (a === "years") {
1077
- i((r) => new Date(r.getFullYear() + 10, 0));
1003
+ t || a((n) => n === "days" ? "months" : n === "months" ? "years" : "days");
1004
+ }, f = () => {
1005
+ if (e === "years") {
1006
+ o((n) => new Date(n.getFullYear() + 10, 0));
1078
1007
  return;
1079
1008
  }
1080
- if (a === "months") {
1081
- i(
1082
- (r) => new Date(r.getFullYear() + 1, r.getMonth())
1009
+ if (e === "months") {
1010
+ o(
1011
+ (n) => new Date(n.getFullYear() + 1, n.getMonth())
1083
1012
  );
1084
1013
  return;
1085
1014
  }
1086
- i((r) => new Date(r.getFullYear(), r.getMonth() + 1));
1015
+ o((n) => new Date(n.getFullYear(), n.getMonth() + 1));
1087
1016
  }, v = () => {
1088
- if (a === "years") {
1089
- i((r) => new Date(r.getFullYear() - 10, 0));
1017
+ if (e === "years") {
1018
+ o((n) => new Date(n.getFullYear() - 10, 0));
1090
1019
  return;
1091
1020
  }
1092
- if (a === "months") {
1093
- i(
1094
- (r) => new Date(r.getFullYear() - 1, r.getMonth())
1021
+ if (e === "months") {
1022
+ o(
1023
+ (n) => new Date(n.getFullYear() - 1, n.getMonth())
1095
1024
  );
1096
1025
  return;
1097
1026
  }
1098
- i(
1099
- (r) => new Date(
1100
- r.getMonth() === 0 ? r.getFullYear() - 1 : r.getFullYear(),
1101
- r.getMonth() === 0 ? 11 : r.getMonth() - 1
1027
+ o(
1028
+ (n) => new Date(
1029
+ n.getMonth() === 0 ? n.getFullYear() - 1 : n.getFullYear(),
1030
+ n.getMonth() === 0 ? 11 : n.getMonth() - 1
1102
1031
  )
1103
1032
  );
1104
1033
  };
1105
1034
  return /* @__PURE__ */ $("div", { className: "starasia-calendar-header", children: [
1106
- /* @__PURE__ */ l(q, { onClick: () => v() }),
1035
+ /* @__PURE__ */ l(P, { onClick: () => v() }),
1107
1036
  /* @__PURE__ */ l("div", { style: { cursor: "pointer" }, onClick: g, children: (() => {
1108
- if (a === "days")
1037
+ if (e === "days")
1109
1038
  return `${N[s.getMonth()]} ${s.getFullYear()}`;
1110
- if (a === "months")
1039
+ if (e === "months")
1111
1040
  return `${s.getFullYear()}`;
1112
- if (a === "years")
1041
+ if (e === "years")
1113
1042
  return `${V(s.getFullYear()).start} ~ ${V(s.getFullYear()).end}`;
1114
1043
  })() }),
1115
- /* @__PURE__ */ l(P, { onClick: () => y() })
1044
+ /* @__PURE__ */ l(R, { onClick: () => f() })
1116
1045
  ] });
1117
- }, H = "starasia-calendar-styles", la = (e) => {
1046
+ }, H = "starasia-calendar-styles", le = (a) => {
1118
1047
  if (!document.getElementById(H)) {
1119
- const a = document.createElement("style");
1120
- a.id = H, a.textContent = e, document.head.appendChild(a);
1048
+ const e = document.createElement("style");
1049
+ e.id = H, e.textContent = a, document.head.appendChild(e);
1121
1050
  }
1122
1051
  };
1123
- la(I);
1124
- const ca = W(
1052
+ le(S);
1053
+ const de = j(
1125
1054
  ({
1126
- value: e,
1127
- onChange: a,
1055
+ value: a,
1056
+ onChange: e,
1128
1057
  filter: t,
1129
1058
  input: s = !0,
1130
- disabled: i,
1059
+ disabled: o,
1131
1060
  minDate: g,
1132
- maxDate: y,
1061
+ maxDate: f,
1133
1062
  placeholder: v,
1134
1063
  size: h,
1135
- status: r
1064
+ status: n
1136
1065
  }, w) => {
1137
- const { ref: b, isComponentVisible: k, setIsComponentVisible: M } = J(!1), u = E(null), [n, c] = F("days"), [d, f] = F(/* @__PURE__ */ new Date()), [o, p] = F(/* @__PURE__ */ new Date());
1066
+ const { ref: b, isComponentVisible: x, setIsComponentVisible: M } = J(!1), u = E(null), [r, d] = F("days"), [c, m] = F(/* @__PURE__ */ new Date()), [i, p] = F(/* @__PURE__ */ new Date());
1138
1067
  D(() => {
1139
- e ? (f(e), p(e)) : (f(/* @__PURE__ */ new Date()), p(/* @__PURE__ */ new Date()));
1140
- }, [e]), D(() => {
1141
- t && c(t);
1068
+ a ? (m(a), p(a)) : (m(/* @__PURE__ */ new Date()), p(/* @__PURE__ */ new Date()));
1069
+ }, [a]), D(() => {
1070
+ t && d(t);
1142
1071
  }, [t]), D(() => {
1143
- t || c("days");
1144
- }, [k]), D(() => {
1072
+ t || d("days");
1073
+ }, [x]), D(() => {
1145
1074
  s || M(!0);
1146
1075
  }, [s]);
1147
- const C = () => e ? t === "days" ? L(d) : t === "months" ? `${N[d.getMonth()]} ${d.getFullYear()}` : t === "years" ? d.getFullYear() : L(d) : "", x = () => {
1076
+ const C = () => a ? t === "days" ? L(c) : t === "months" ? `${N[c.getMonth()]} ${c.getFullYear()}` : t === "years" ? c.getFullYear() : L(c) : "", k = () => {
1148
1077
  if (u.current && b.current && s) {
1149
- const m = b.current.getBoundingClientRect(), Y = u.current.getBoundingClientRect();
1150
- window.innerWidth < m.left + Y.width ? u.current.style.left = `${m.left - Y.width + m.width}px` : u.current.style.left = `${m.left}px`, m.top + Y.height > window.innerHeight ? u.current.style.top = `${m.y - (m.height + Y.height - 28)}px` : u.current.style.top = `${m.y + m.height}px`;
1078
+ const y = b.current.getBoundingClientRect(), Y = u.current.getBoundingClientRect();
1079
+ window.innerWidth < y.left + Y.width ? u.current.style.left = `${y.left - Y.width + y.width}px` : u.current.style.left = `${y.left}px`, y.top + Y.height > window.innerHeight ? u.current.style.top = `${y.y - (y.height + Y.height - 28)}px` : u.current.style.top = `${y.y + y.height}px`;
1151
1080
  }
1152
1081
  };
1153
1082
  return D(() => {
1154
- u.current && b.current && s && x();
1155
- }, [u, b, k]), D(() => {
1156
- const m = w == null ? void 0 : w.current;
1157
- return m && m.addEventListener("scroll", x), window.addEventListener("scroll", x), () => {
1158
- m && m.removeEventListener("scroll", x), window.removeEventListener("scroll", x);
1083
+ u.current && b.current && s && k();
1084
+ }, [u, b, x]), D(() => {
1085
+ const y = w == null ? void 0 : w.current;
1086
+ return y && y.addEventListener("scroll", k), window.addEventListener("scroll", k), () => {
1087
+ y && y.removeEventListener("scroll", k), window.removeEventListener("scroll", k);
1159
1088
  };
1160
1089
  }, []), /* @__PURE__ */ $(
1161
1090
  "div",
@@ -1165,75 +1094,75 @@ const ca = W(
1165
1094
  ref: s ? b : null,
1166
1095
  children: [
1167
1096
  s ? /* @__PURE__ */ l(
1168
- na,
1097
+ re,
1169
1098
  {
1170
1099
  value: C(),
1171
1100
  onClick: () => M(!0),
1172
1101
  onChange: () => {
1173
1102
  },
1174
1103
  placeholder: v,
1175
- disabled: i,
1104
+ disabled: o,
1176
1105
  size: h,
1177
- status: r,
1106
+ status: n,
1178
1107
  inputMode: "none"
1179
1108
  }
1180
1109
  ) : null,
1181
- k ? /* @__PURE__ */ $(
1110
+ x ? /* @__PURE__ */ $(
1182
1111
  "div",
1183
1112
  {
1184
1113
  className: `starasia-calendar ${s ? "" : "starasia-calendar-no-input"}`,
1185
1114
  ref: u,
1186
1115
  children: [
1187
1116
  /* @__PURE__ */ l(
1188
- oa,
1117
+ ie,
1189
1118
  {
1190
- setViews: c,
1191
- views: n,
1119
+ setViews: d,
1120
+ views: r,
1192
1121
  filter: t,
1193
- previewDate: o,
1122
+ previewDate: i,
1194
1123
  setPreviewDate: p,
1195
- isComponentVisible: k
1124
+ isComponentVisible: x
1196
1125
  }
1197
1126
  ),
1198
- /* @__PURE__ */ l("div", { className: "starasia-calendar-body", children: n === "days" ? /* @__PURE__ */ l(
1199
- ta,
1127
+ /* @__PURE__ */ l("div", { className: "starasia-calendar-body", children: r === "days" ? /* @__PURE__ */ l(
1128
+ te,
1200
1129
  {
1201
- date: d,
1202
- setDate: f,
1203
- previewDate: o,
1130
+ date: c,
1131
+ setDate: m,
1132
+ previewDate: i,
1204
1133
  setPreviewDate: p,
1205
1134
  setIsComponentVisible: M,
1206
1135
  input: s,
1207
1136
  minDate: g,
1208
- maxDate: y,
1209
- onChange: a
1137
+ maxDate: f,
1138
+ onChange: e
1210
1139
  }
1211
- ) : n === "months" ? /* @__PURE__ */ l(
1212
- sa,
1140
+ ) : r === "months" ? /* @__PURE__ */ l(
1141
+ se,
1213
1142
  {
1214
- date: d,
1215
- setDate: f,
1216
- previewDate: o,
1143
+ date: c,
1144
+ setDate: m,
1145
+ previewDate: i,
1217
1146
  setPreviewDate: p,
1218
1147
  filter: t,
1219
- setViews: c,
1220
- onChange: a,
1148
+ setViews: d,
1149
+ onChange: e,
1221
1150
  minDate: g,
1222
- maxDate: y,
1151
+ maxDate: f,
1223
1152
  input: s
1224
1153
  }
1225
1154
  ) : /* @__PURE__ */ l(
1226
- ia,
1155
+ oe,
1227
1156
  {
1228
- date: d,
1229
- setDate: f,
1230
- previewDate: o,
1157
+ date: c,
1158
+ setDate: m,
1159
+ previewDate: i,
1231
1160
  setPreviewDate: p,
1232
1161
  filter: t,
1233
- setViews: c,
1234
- onChange: a,
1162
+ setViews: d,
1163
+ onChange: e,
1235
1164
  minDate: g,
1236
- maxDate: y,
1165
+ maxDate: f,
1237
1166
  input: s
1238
1167
  }
1239
1168
  ) })
@@ -1244,51 +1173,51 @@ const ca = W(
1244
1173
  }
1245
1174
  );
1246
1175
  }
1247
- ), ha = W(
1176
+ ), he = j(
1248
1177
  ({
1249
- value: e,
1250
- onChange: a,
1178
+ value: a,
1179
+ onChange: e,
1251
1180
  filter: t,
1252
1181
  input: s = !0,
1253
- rangedDate: i,
1182
+ rangedDate: o,
1254
1183
  disabled: g,
1255
- minDate: y,
1184
+ minDate: f,
1256
1185
  maxDate: v,
1257
1186
  placeholder: h,
1258
- size: r,
1187
+ size: n,
1259
1188
  status: w
1260
- }, b) => /* @__PURE__ */ l(R, { children: i ? /* @__PURE__ */ l(
1261
- ra,
1189
+ }, b) => /* @__PURE__ */ l(G, { children: o ? /* @__PURE__ */ l(
1190
+ ne,
1262
1191
  {
1263
- onChange: a,
1264
- value: e,
1192
+ onChange: e,
1193
+ value: a,
1265
1194
  input: s,
1266
1195
  filter: t,
1267
1196
  disabled: g,
1268
1197
  ref: b,
1269
- minDate: y,
1198
+ minDate: f,
1270
1199
  maxDate: v,
1271
1200
  placeholder: h,
1272
- size: r,
1201
+ size: n,
1273
1202
  status: w
1274
1203
  }
1275
1204
  ) : /* @__PURE__ */ l(
1276
- ca,
1205
+ de,
1277
1206
  {
1278
- onChange: a,
1279
- value: e,
1207
+ onChange: e,
1208
+ value: a,
1280
1209
  input: s,
1281
1210
  filter: t,
1282
1211
  disabled: g,
1283
1212
  ref: b,
1284
- minDate: y,
1213
+ minDate: f,
1285
1214
  maxDate: v,
1286
1215
  placeholder: h,
1287
- size: r,
1216
+ size: n,
1288
1217
  status: w
1289
1218
  }
1290
1219
  ) })
1291
1220
  );
1292
1221
  export {
1293
- ha as StarasiaDate
1222
+ he as StarasiaDate
1294
1223
  };