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