@shohojdhara/atomix 0.2.1 → 0.2.3
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/README.md +1 -28
- package/dist/atomix.css +1500 -241
- package/dist/atomix.min.css +6 -6
- package/dist/index.d.ts +1052 -194
- package/dist/index.esm.js +12201 -6066
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5481 -2827
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/boomdevs.css +1500 -301
- package/dist/themes/boomdevs.min.css +60 -8
- package/dist/themes/esrar.css +1500 -241
- package/dist/themes/esrar.min.css +6 -6
- package/dist/themes/mashroom.css +1496 -237
- package/dist/themes/mashroom.min.css +8 -8
- package/dist/themes/shaj-default.css +1451 -192
- package/dist/themes/shaj-default.min.css +6 -6
- package/package.json +66 -15
- package/src/components/Accordion/Accordion.stories.tsx +137 -0
- package/src/components/Accordion/Accordion.tsx +33 -3
- package/src/components/AtomixGlass/AtomixGlass.stories.tsx +3011 -0
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +199 -0
- package/src/components/AtomixGlass/AtomixGlass.tsx +1281 -0
- package/src/components/AtomixGlass/AtomixGlassComprehensivePreview.stories.tsx +1369 -0
- package/src/components/AtomixGlass/README.md +134 -0
- package/src/components/AtomixGlass/index.ts +10 -0
- package/src/components/AtomixGlass/shader-utils.ts +140 -0
- package/src/components/AtomixGlass/utils.ts +8 -0
- package/src/components/Badge/Badge.stories.tsx +169 -0
- package/src/components/Badge/Badge.tsx +27 -2
- package/src/components/Button/Button.stories.tsx +345 -0
- package/src/components/Button/Button.tsx +35 -3
- package/src/components/Button/README.md +216 -0
- package/src/components/Callout/Callout.stories.tsx +813 -78
- package/src/components/Callout/Callout.test.tsx +368 -0
- package/src/components/Callout/Callout.tsx +26 -7
- package/src/components/Callout/README.md +409 -0
- package/src/components/Card/Card.stories.tsx +140 -0
- package/src/components/Card/Card.tsx +19 -3
- package/src/components/DatePicker/DatePicker copy.tsx +551 -0
- package/src/components/DatePicker/DatePicker.stories.tsx +188 -0
- package/src/components/DatePicker/DatePicker.tsx +379 -332
- package/src/components/DatePicker/readme.md +110 -1
- package/src/components/DatePicker/types.ts +8 -0
- package/src/components/Dropdown/Dropdown.stories.tsx +145 -0
- package/src/components/Dropdown/Dropdown.tsx +34 -5
- package/src/components/Footer/Footer.stories.tsx +388 -0
- package/src/components/Footer/Footer.tsx +197 -0
- package/src/components/Footer/FooterLink.tsx +72 -0
- package/src/components/Footer/FooterSection.tsx +87 -0
- package/src/components/Footer/FooterSocialLink.tsx +117 -0
- package/src/components/Footer/README.md +261 -0
- package/src/components/Footer/index.ts +13 -0
- package/src/components/Form/Checkbox.stories.tsx +101 -0
- package/src/components/Form/Checkbox.tsx +26 -2
- package/src/components/Form/Input.stories.tsx +124 -0
- package/src/components/Form/Input.tsx +36 -7
- package/src/components/Form/Radio.stories.tsx +139 -0
- package/src/components/Form/Radio.tsx +26 -2
- package/src/components/Form/Select.stories.tsx +110 -0
- package/src/components/Form/Select.tsx +26 -2
- package/src/components/Form/Textarea.stories.tsx +104 -0
- package/src/components/Form/Textarea.tsx +36 -7
- package/src/components/Hero/Hero.stories.tsx +54 -1
- package/src/components/Hero/Hero.tsx +70 -11
- package/src/components/Modal/Modal.stories.tsx +235 -0
- package/src/components/Modal/Modal.tsx +64 -35
- package/src/components/Pagination/Pagination.stories.tsx +101 -0
- package/src/components/Pagination/Pagination.tsx +25 -1
- package/src/components/Popover/Popover.stories.tsx +94 -0
- package/src/components/Popover/Popover.tsx +30 -4
- package/src/components/Rating/Rating.stories.tsx +112 -0
- package/src/components/Rating/Rating.tsx +25 -1
- package/src/components/SectionIntro/SectionIntro.tsx +9 -11
- package/src/components/Slider/Slider.stories.tsx +634 -50
- package/src/components/Slider/Slider.tsx +5 -3
- package/src/components/Steps/Steps.stories.tsx +119 -0
- package/src/components/Steps/Steps.tsx +32 -1
- package/src/components/Tab/Tab.stories.tsx +88 -0
- package/src/components/Tab/Tab.tsx +32 -1
- package/src/components/Toggle/Toggle.stories.tsx +92 -0
- package/src/components/Toggle/Toggle.tsx +32 -1
- package/src/components/Tooltip/Tooltip.stories.tsx +131 -0
- package/src/components/Tooltip/Tooltip.tsx +43 -7
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +1002 -196
- package/src/components/VideoPlayer/VideoPlayer.tsx +161 -4
- package/src/components/index.ts +14 -0
- package/src/layouts/Grid/Grid.stories.tsx +226 -159
- package/src/lib/composables/index.ts +4 -0
- package/src/lib/composables/useAtomixGlass.ts +71 -0
- package/src/lib/composables/useButton.ts +3 -1
- package/src/lib/composables/useCallout.ts +4 -1
- package/src/lib/composables/useFooter.ts +85 -0
- package/src/lib/composables/useGlassContainer.ts +168 -0
- package/src/lib/composables/useSlider.ts +191 -4
- package/src/lib/constants/components.ts +173 -0
- package/src/lib/types/components.ts +622 -0
- package/src/lib/utils/displacement-generator.ts +86 -0
- package/src/styles/01-settings/_index.scss +1 -0
- package/src/styles/01-settings/_settings.accordion.scss +20 -19
- package/src/styles/01-settings/_settings.animations.scss +5 -5
- package/src/styles/01-settings/_settings.avatar-group.scss +1 -1
- package/src/styles/01-settings/_settings.avatar.scss +17 -18
- package/src/styles/01-settings/_settings.background.scss +10 -0
- package/src/styles/01-settings/_settings.badge.scss +1 -1
- package/src/styles/01-settings/_settings.breadcrumb.scss +8 -2
- package/src/styles/01-settings/_settings.callout.scss +7 -7
- package/src/styles/01-settings/_settings.card.scss +2 -2
- package/src/styles/01-settings/_settings.chart.scss +7 -7
- package/src/styles/01-settings/_settings.checkbox-group.scss +5 -2
- package/src/styles/01-settings/_settings.checkbox.scss +10 -4
- package/src/styles/01-settings/_settings.countdown.scss +6 -4
- package/src/styles/01-settings/_settings.dropdown.scss +9 -7
- package/src/styles/01-settings/_settings.edge-panel.scss +3 -2
- package/src/styles/01-settings/_settings.footer.scss +125 -0
- package/src/styles/01-settings/_settings.form-group.scss +3 -1
- package/src/styles/01-settings/_settings.form.scss +4 -2
- package/src/styles/01-settings/_settings.hero.scss +9 -7
- package/src/styles/01-settings/_settings.input.scss +9 -7
- package/src/styles/01-settings/_settings.list-group.scss +4 -2
- package/src/styles/01-settings/_settings.list.scss +4 -2
- package/src/styles/01-settings/_settings.menu.scss +10 -8
- package/src/styles/01-settings/_settings.messages.scss +19 -17
- package/src/styles/01-settings/_settings.modal.scss +6 -4
- package/src/styles/01-settings/_settings.nav.scss +6 -4
- package/src/styles/01-settings/_settings.navbar.scss +8 -5
- package/src/styles/01-settings/_settings.pagination.scss +5 -3
- package/src/styles/01-settings/_settings.popover.scss +6 -4
- package/src/styles/01-settings/_settings.rating.scss +5 -3
- package/src/styles/01-settings/_settings.river.scss +8 -6
- package/src/styles/01-settings/_settings.sectionintro.scss +8 -6
- package/src/styles/01-settings/_settings.select.scss +7 -5
- package/src/styles/01-settings/_settings.side-menu.scss +15 -13
- package/src/styles/01-settings/_settings.spacing.scss +4 -0
- package/src/styles/01-settings/_settings.steps.scss +7 -5
- package/src/styles/01-settings/_settings.tabs.scss +7 -5
- package/src/styles/01-settings/_settings.testimonials.scss +6 -4
- package/src/styles/01-settings/_settings.toggle.scss +3 -1
- package/src/styles/01-settings/_settings.tooltip.scss +5 -3
- package/src/styles/01-settings/_settings.upload.scss +22 -20
- package/src/styles/02-tools/_tools.animations.scss +19 -0
- package/src/styles/02-tools/_tools.background.scss +87 -0
- package/src/styles/02-tools/_tools.glass.scss +1 -0
- package/src/styles/02-tools/_tools.rem.scss +18 -5
- package/src/styles/02-tools/_tools.utility-api.scss +32 -26
- package/src/styles/03-generic/_generic.root.scss +15 -2
- package/src/styles/04-elements/_elements.body.scss +6 -0
- package/src/styles/06-components/_components.accordion.scss +24 -4
- package/src/styles/06-components/_components.atomix-glass.scss +0 -0
- package/src/styles/06-components/_components.avatar-group.scss +2 -1
- package/src/styles/06-components/_components.avatar.scss +2 -1
- package/src/styles/06-components/_components.badge.scss +36 -1
- package/src/styles/06-components/_components.breadcrumb.scss +2 -1
- package/src/styles/06-components/_components.button.scss +14 -3
- package/src/styles/06-components/_components.callout.scss +44 -4
- package/src/styles/06-components/_components.card.scss +21 -2
- package/src/styles/06-components/_components.chart.scss +3 -2
- package/src/styles/06-components/_components.checkbox.scss +2 -1
- package/src/styles/06-components/_components.color-mode-toggle.scss +3 -2
- package/src/styles/06-components/_components.countdown.scss +2 -1
- package/src/styles/06-components/_components.data-table.scss +7 -6
- package/src/styles/06-components/_components.datepicker.scss +20 -1
- package/src/styles/06-components/_components.dropdown.scss +11 -4
- package/src/styles/06-components/_components.edge-panel.scss +4 -3
- package/src/styles/06-components/_components.footer.scss +825 -0
- package/src/styles/06-components/_components.form-group.scss +1 -0
- package/src/styles/06-components/_components.hero.scss +4 -4
- package/src/styles/06-components/_components.image-gallery.scss +1 -0
- package/src/styles/06-components/_components.input.scss +33 -2
- package/src/styles/06-components/_components.list-group.scss +3 -2
- package/src/styles/06-components/_components.list.scss +2 -1
- package/src/styles/06-components/_components.menu.scss +5 -4
- package/src/styles/06-components/_components.messages.scss +8 -7
- package/src/styles/06-components/_components.modal.scss +3 -2
- package/src/styles/06-components/_components.nav.scss +6 -5
- package/src/styles/06-components/_components.navbar.scss +4 -3
- package/src/styles/06-components/_components.pagination.scss +2 -1
- package/src/styles/06-components/_components.photoviewer.scss +4 -3
- package/src/styles/06-components/_components.popover.scss +3 -2
- package/src/styles/06-components/_components.product-review.scss +3 -2
- package/src/styles/06-components/_components.progress.scss +3 -2
- package/src/styles/06-components/_components.river.scss +3 -2
- package/src/styles/06-components/_components.sectionintro.scss +2 -1
- package/src/styles/06-components/_components.select.scss +5 -4
- package/src/styles/06-components/_components.side-menu.scss +8 -7
- package/src/styles/06-components/_components.skeleton.scss +3 -2
- package/src/styles/06-components/_components.slider.scss +7 -6
- package/src/styles/06-components/_components.spinner.scss +1 -0
- package/src/styles/06-components/_components.steps.scss +3 -2
- package/src/styles/06-components/_components.tabs.scss +4 -3
- package/src/styles/06-components/_components.testimonials.scss +2 -1
- package/src/styles/06-components/_components.todo.scss +3 -2
- package/src/styles/06-components/_components.toggle.scss +5 -4
- package/src/styles/06-components/_components.tooltip.scss +3 -2
- package/src/styles/06-components/_components.upload.scss +4 -3
- package/src/styles/06-components/_components.video-player.scss +50 -27
- package/src/styles/06-components/_index.scss +2 -0
- package/src/styles/99-utilities/_utilities.glass-fixes.scss +48 -0
- package/dist/themes/yabai.css +0 -13711
- package/dist/themes/yabai.min.css +0 -189
|
@@ -3,6 +3,7 @@ import { DatePickerProps, DatePickerRef } from './types';
|
|
|
3
3
|
import { useDatePicker } from '../../lib/composables/useDatePicker';
|
|
4
4
|
import { formatDate } from './utils';
|
|
5
5
|
import { Icon } from '../Icon/Icon';
|
|
6
|
+
import { AtomixGlass } from '../AtomixGlass/AtomixGlass';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* DatePicker component for selecting dates from a calendar interface.
|
|
@@ -33,6 +34,7 @@ export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
|
33
34
|
placement = 'bottom-start',
|
|
34
35
|
inputClassName = '',
|
|
35
36
|
size = 'md',
|
|
37
|
+
glass,
|
|
36
38
|
...props
|
|
37
39
|
},
|
|
38
40
|
ref
|
|
@@ -56,30 +58,27 @@ export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
|
56
58
|
startDate: rangeStartDate,
|
|
57
59
|
endDate: rangeEndDate,
|
|
58
60
|
|
|
59
|
-
//
|
|
61
|
+
// Methods
|
|
60
62
|
setIsOpen,
|
|
63
|
+
handleInputChange,
|
|
64
|
+
handleInputFocus,
|
|
65
|
+
handleClear,
|
|
61
66
|
handleDateSelect,
|
|
67
|
+
handleTodayClick,
|
|
62
68
|
handlePrevMonth,
|
|
63
69
|
handleNextMonth,
|
|
64
70
|
handlePrevYear,
|
|
65
71
|
handleNextYear,
|
|
66
|
-
handleTodayClick,
|
|
67
|
-
handleClear,
|
|
68
|
-
handleInputChange,
|
|
69
|
-
handleInputFocus,
|
|
70
|
-
|
|
71
72
|
// View mode handlers
|
|
72
73
|
switchToMonthView,
|
|
73
74
|
switchToYearView,
|
|
74
75
|
selectMonth,
|
|
75
76
|
selectYear,
|
|
76
77
|
|
|
77
|
-
//
|
|
78
|
+
// Utility methods
|
|
78
79
|
generateDays,
|
|
79
80
|
generateMonths,
|
|
80
81
|
generateYears,
|
|
81
|
-
|
|
82
|
-
// State checkers
|
|
83
82
|
isDateSelectable,
|
|
84
83
|
isDateSelected,
|
|
85
84
|
isDateInSelectedRange,
|
|
@@ -92,9 +91,9 @@ export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
|
92
91
|
startDate,
|
|
93
92
|
endDate,
|
|
94
93
|
onRangeChange,
|
|
95
|
-
format,
|
|
96
94
|
minDate,
|
|
97
95
|
maxDate,
|
|
96
|
+
format,
|
|
98
97
|
inline,
|
|
99
98
|
});
|
|
100
99
|
|
|
@@ -131,6 +130,339 @@ export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
132
|
|
|
133
|
+
// Utility functions
|
|
134
|
+
const getMonthName = (monthIndex: number): string => {
|
|
135
|
+
const months = [
|
|
136
|
+
'January',
|
|
137
|
+
'February',
|
|
138
|
+
'March',
|
|
139
|
+
'April',
|
|
140
|
+
'May',
|
|
141
|
+
'June',
|
|
142
|
+
'July',
|
|
143
|
+
'August',
|
|
144
|
+
'September',
|
|
145
|
+
'October',
|
|
146
|
+
'November',
|
|
147
|
+
'December',
|
|
148
|
+
];
|
|
149
|
+
return months[monthIndex] || '';
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
const getDaysOfWeek = (): string[] => {
|
|
153
|
+
return ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
const isDateDisabled = (date: Date): boolean => {
|
|
157
|
+
if (minDate && date < minDate) return true;
|
|
158
|
+
if (maxDate && date > maxDate) return true;
|
|
159
|
+
return false;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const isDateToday = (date: Date): boolean => {
|
|
163
|
+
const today = new Date();
|
|
164
|
+
return (
|
|
165
|
+
date.getDate() === today.getDate() &&
|
|
166
|
+
date.getMonth() === today.getMonth() &&
|
|
167
|
+
date.getFullYear() === today.getFullYear()
|
|
168
|
+
);
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const isSameDate = (date1: Date, date2: Date): boolean => {
|
|
172
|
+
return (
|
|
173
|
+
date1.getDate() === date2.getDate() &&
|
|
174
|
+
date1.getMonth() === date2.getMonth() &&
|
|
175
|
+
date1.getFullYear() === date2.getFullYear()
|
|
176
|
+
);
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const generateCalendar = () => {
|
|
180
|
+
const days = generateDays();
|
|
181
|
+
const weeks = [];
|
|
182
|
+
for (let i = 0; i < days.length; i += 7) {
|
|
183
|
+
weeks.push(days.slice(i, i + 7));
|
|
184
|
+
}
|
|
185
|
+
return weeks;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
const handlePrevDecade = () => {
|
|
189
|
+
// This would need to be implemented in the hook or handled differently
|
|
190
|
+
// For now, we'll work with what we have
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
const handleNextDecade = () => {
|
|
194
|
+
// This would need to be implemented in the hook or handled differently
|
|
195
|
+
// For now, we'll work with what we have
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const switchToDayView = () => {
|
|
199
|
+
// This would need to be implemented in the hook or handled differently
|
|
200
|
+
// For now, we'll work with what we have
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
// Helper function to render calendar content
|
|
204
|
+
const renderCalendarContent = () => (
|
|
205
|
+
<>
|
|
206
|
+
<div className="c-datepicker__header">
|
|
207
|
+
{viewMode === 'days' && (
|
|
208
|
+
<>
|
|
209
|
+
<button
|
|
210
|
+
type="button"
|
|
211
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--prev-year"
|
|
212
|
+
onClick={handlePrevYear}
|
|
213
|
+
aria-label="Previous year"
|
|
214
|
+
>
|
|
215
|
+
<Icon name="CaretDoubleLeft" size="sm" />
|
|
216
|
+
</button>
|
|
217
|
+
<button
|
|
218
|
+
type="button"
|
|
219
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--prev-month"
|
|
220
|
+
onClick={handlePrevMonth}
|
|
221
|
+
aria-label="Previous month"
|
|
222
|
+
>
|
|
223
|
+
<Icon name="CaretLeft" size="sm" />
|
|
224
|
+
</button>
|
|
225
|
+
<button
|
|
226
|
+
type="button"
|
|
227
|
+
className="c-datepicker__view-switch"
|
|
228
|
+
onClick={switchToMonthView}
|
|
229
|
+
aria-label={`${getMonthName(currentMonth)} ${currentYear}`}
|
|
230
|
+
>
|
|
231
|
+
{getMonthName(currentMonth)} {currentYear}
|
|
232
|
+
</button>
|
|
233
|
+
<button
|
|
234
|
+
type="button"
|
|
235
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--next-month"
|
|
236
|
+
onClick={handleNextMonth}
|
|
237
|
+
aria-label="Next month"
|
|
238
|
+
>
|
|
239
|
+
<Icon name="CaretRight" size="sm" />
|
|
240
|
+
</button>
|
|
241
|
+
<button
|
|
242
|
+
type="button"
|
|
243
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--next-year"
|
|
244
|
+
onClick={handleNextYear}
|
|
245
|
+
aria-label="Next year"
|
|
246
|
+
>
|
|
247
|
+
<Icon name="CaretDoubleRight" size="sm" />
|
|
248
|
+
</button>
|
|
249
|
+
</>
|
|
250
|
+
)}
|
|
251
|
+
|
|
252
|
+
{viewMode === 'months' && (
|
|
253
|
+
<>
|
|
254
|
+
<button
|
|
255
|
+
type="button"
|
|
256
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--prev-year"
|
|
257
|
+
onClick={handlePrevYear}
|
|
258
|
+
aria-label="Previous year"
|
|
259
|
+
>
|
|
260
|
+
<Icon name="CaretDoubleLeft" size="sm" />
|
|
261
|
+
</button>
|
|
262
|
+
<button
|
|
263
|
+
type="button"
|
|
264
|
+
className="c-datepicker__view-switch"
|
|
265
|
+
onClick={switchToYearView}
|
|
266
|
+
aria-label={`Year ${currentYear}`}
|
|
267
|
+
>
|
|
268
|
+
{currentYear}
|
|
269
|
+
</button>
|
|
270
|
+
<button
|
|
271
|
+
type="button"
|
|
272
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--next-year"
|
|
273
|
+
onClick={handleNextYear}
|
|
274
|
+
aria-label="Next year"
|
|
275
|
+
>
|
|
276
|
+
<Icon name="CaretDoubleRight" size="sm" />
|
|
277
|
+
</button>
|
|
278
|
+
</>
|
|
279
|
+
)}
|
|
280
|
+
|
|
281
|
+
{viewMode === 'years' && (
|
|
282
|
+
<>
|
|
283
|
+
<button
|
|
284
|
+
type="button"
|
|
285
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--prev-decade"
|
|
286
|
+
onClick={handlePrevDecade}
|
|
287
|
+
aria-label="Previous decade"
|
|
288
|
+
>
|
|
289
|
+
<Icon name="CaretDoubleLeft" size="sm" />
|
|
290
|
+
</button>
|
|
291
|
+
<button type="button" className="c-datepicker__view-switch" onClick={switchToDayView}>
|
|
292
|
+
{generateYears()[0]} - {generateYears()[generateYears().length - 1]}
|
|
293
|
+
</button>
|
|
294
|
+
<button
|
|
295
|
+
type="button"
|
|
296
|
+
className="c-datepicker__nav-button c-datepicker__nav-button--next-decade"
|
|
297
|
+
onClick={handleNextDecade}
|
|
298
|
+
aria-label="Next decade"
|
|
299
|
+
>
|
|
300
|
+
<Icon name="CaretDoubleRight" size="sm" />
|
|
301
|
+
</button>
|
|
302
|
+
</>
|
|
303
|
+
)}
|
|
304
|
+
</div>
|
|
305
|
+
|
|
306
|
+
<div className="c-datepicker__body">
|
|
307
|
+
{viewMode === 'days' && (
|
|
308
|
+
<>
|
|
309
|
+
<div
|
|
310
|
+
className={`c-datepicker__weekdays${showWeekNumbers ? ' c-datepicker__weekdays--has-weeknumber' : ''}`}
|
|
311
|
+
role="row"
|
|
312
|
+
>
|
|
313
|
+
{showWeekNumbers && <div className="c-datepicker__weekday">Wk</div>}
|
|
314
|
+
{getDaysOfWeek().map(day => (
|
|
315
|
+
<div key={day} className="c-datepicker__weekday" role="columnheader">
|
|
316
|
+
{day}
|
|
317
|
+
</div>
|
|
318
|
+
))}
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div
|
|
322
|
+
className={`c-datepicker__days${showWeekNumbers ? ' c-datepicker__days--has-weeknumber' : ''}`}
|
|
323
|
+
role="grid"
|
|
324
|
+
>
|
|
325
|
+
{(() => {
|
|
326
|
+
const allElements = [];
|
|
327
|
+
const days = generateDays();
|
|
328
|
+
|
|
329
|
+
for (let i = 0; i < days.length; i++) {
|
|
330
|
+
const dateObj = days[i];
|
|
331
|
+
if (!dateObj) continue;
|
|
332
|
+
|
|
333
|
+
const dateValue = new Date(dateObj.year, dateObj.month, dateObj.day);
|
|
334
|
+
const isSelectable = isDateSelectable(dateObj.year, dateObj.month, dateObj.day);
|
|
335
|
+
const isSelected = isDateSelected(dateObj.year, dateObj.month, dateObj.day);
|
|
336
|
+
const isTodayDate = isToday(dateObj.year, dateObj.month, dateObj.day);
|
|
337
|
+
const isInRange = isDateInSelectedRange(
|
|
338
|
+
dateObj.year,
|
|
339
|
+
dateObj.month,
|
|
340
|
+
dateObj.day
|
|
341
|
+
);
|
|
342
|
+
|
|
343
|
+
// Add week number at the start of each week
|
|
344
|
+
if (showWeekNumbers && i % 7 === 0) {
|
|
345
|
+
const weekNum = getWeekNumber(dateValue);
|
|
346
|
+
allElements.push(
|
|
347
|
+
<div
|
|
348
|
+
key={`weeknumber-${Math.floor(i / 7)}`}
|
|
349
|
+
className="c-datepicker__weeknumber"
|
|
350
|
+
role="rowheader"
|
|
351
|
+
>
|
|
352
|
+
{weekNum}
|
|
353
|
+
</div>
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
// Add the day button
|
|
358
|
+
allElements.push(
|
|
359
|
+
<button
|
|
360
|
+
key={`day-${i}`}
|
|
361
|
+
type="button"
|
|
362
|
+
className={`c-datepicker__day
|
|
363
|
+
${!dateObj.isCurrentMonth ? 'c-datepicker__day--outside' : ''}
|
|
364
|
+
${isSelected ? 'c-datepicker__day--selected' : ''}
|
|
365
|
+
${isInRange ? 'c-datepicker__day--in-range' : ''}
|
|
366
|
+
${isTodayDate ? 'c-datepicker__day--today' : ''}
|
|
367
|
+
${!isSelectable ? 'c-datepicker__day--disabled' : ''}`}
|
|
368
|
+
onClick={() => isSelectable && handleDateSelect(dateObj.day)}
|
|
369
|
+
disabled={!isSelectable}
|
|
370
|
+
tabIndex={dateObj.isCurrentMonth ? 0 : -1}
|
|
371
|
+
aria-label={dateValue.toLocaleDateString()}
|
|
372
|
+
aria-selected={isSelected ? 'true' : 'false'}
|
|
373
|
+
role="gridcell"
|
|
374
|
+
>
|
|
375
|
+
{dateObj.day}
|
|
376
|
+
</button>
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return allElements;
|
|
381
|
+
})()}
|
|
382
|
+
</div>
|
|
383
|
+
</>
|
|
384
|
+
)}
|
|
385
|
+
|
|
386
|
+
{viewMode === 'months' && (
|
|
387
|
+
<div className="c-datepicker__months" role="grid">
|
|
388
|
+
{generateMonths().map((monthObj, index) => {
|
|
389
|
+
const isSelected =
|
|
390
|
+
value &&
|
|
391
|
+
value.getMonth() === monthObj.month &&
|
|
392
|
+
value.getFullYear() === currentYear;
|
|
393
|
+
|
|
394
|
+
return (
|
|
395
|
+
<button
|
|
396
|
+
key={`month-${index}`}
|
|
397
|
+
type="button"
|
|
398
|
+
className={`c-datepicker__month ${isSelected ? 'c-datepicker__month--selected' : ''}`}
|
|
399
|
+
onClick={() => selectMonth(monthObj.month)}
|
|
400
|
+
aria-selected={isSelected ? 'true' : 'false'}
|
|
401
|
+
role="gridcell"
|
|
402
|
+
>
|
|
403
|
+
{monthObj.name.substring(0, 3)}
|
|
404
|
+
</button>
|
|
405
|
+
);
|
|
406
|
+
})}
|
|
407
|
+
</div>
|
|
408
|
+
)}
|
|
409
|
+
|
|
410
|
+
{viewMode === 'years' && (
|
|
411
|
+
<div className="c-datepicker__years" role="grid">
|
|
412
|
+
{generateYears().map((year, index) => {
|
|
413
|
+
const isSelected = value && value.getFullYear() === year;
|
|
414
|
+
|
|
415
|
+
return (
|
|
416
|
+
<button
|
|
417
|
+
key={`year-${index}`}
|
|
418
|
+
type="button"
|
|
419
|
+
className={`c-datepicker__year ${isSelected ? 'c-datepicker__year--selected' : ''}`}
|
|
420
|
+
onClick={() => selectYear(year)}
|
|
421
|
+
aria-selected={isSelected ? 'true' : 'false'}
|
|
422
|
+
role="gridcell"
|
|
423
|
+
>
|
|
424
|
+
{year}
|
|
425
|
+
</button>
|
|
426
|
+
);
|
|
427
|
+
})}
|
|
428
|
+
</div>
|
|
429
|
+
)}
|
|
430
|
+
</div>
|
|
431
|
+
|
|
432
|
+
{viewMode === 'days' && (
|
|
433
|
+
<div className="c-datepicker__footer">
|
|
434
|
+
{selectionMode === 'range' && (
|
|
435
|
+
<div className="c-datepicker__range-status c-badge c-badge--sm c-badge--info u-w-100">
|
|
436
|
+
Selecting {rangeSelectionState === 'start' ? 'start' : 'end'} date
|
|
437
|
+
</div>
|
|
438
|
+
)}
|
|
439
|
+
|
|
440
|
+
{showTodayButton && (
|
|
441
|
+
<button
|
|
442
|
+
type="button"
|
|
443
|
+
className="c-datepicker__today-button c-btn c-btn--sm c-btn--outline-primary"
|
|
444
|
+
onClick={handleTodayClick}
|
|
445
|
+
aria-label="Go to today"
|
|
446
|
+
>
|
|
447
|
+
Today
|
|
448
|
+
</button>
|
|
449
|
+
)}
|
|
450
|
+
|
|
451
|
+
{!inline && (
|
|
452
|
+
<button
|
|
453
|
+
type="button"
|
|
454
|
+
className="c-datepicker__close-button c-btn c-btn--sm c-btn--outline-error"
|
|
455
|
+
onClick={() => setIsOpen(false)}
|
|
456
|
+
aria-label="Close calendar"
|
|
457
|
+
>
|
|
458
|
+
Close
|
|
459
|
+
</button>
|
|
460
|
+
)}
|
|
461
|
+
</div>
|
|
462
|
+
)}
|
|
463
|
+
</>
|
|
464
|
+
);
|
|
465
|
+
|
|
134
466
|
return (
|
|
135
467
|
<div className={datepickerClassName} ref={datePickerRef} {...props}>
|
|
136
468
|
{!inline && (
|
|
@@ -168,337 +500,52 @@ export const DatePicker = forwardRef<DatePickerRef, DatePickerProps>(
|
|
|
168
500
|
)}
|
|
169
501
|
|
|
170
502
|
{(isOpen || inline) && (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--prev-month"
|
|
192
|
-
onClick={handlePrevMonth}
|
|
193
|
-
aria-label="Previous month"
|
|
194
|
-
>
|
|
195
|
-
<Icon name="CaretLeft" size="sm" />
|
|
196
|
-
</button>
|
|
197
|
-
<button
|
|
198
|
-
type="button"
|
|
199
|
-
className="c-datepicker__view-switch"
|
|
200
|
-
onClick={switchToMonthView}
|
|
201
|
-
aria-label="Switch to month view"
|
|
202
|
-
>
|
|
203
|
-
{`${currentMonth + 1}/${currentYear}`}
|
|
204
|
-
</button>
|
|
205
|
-
<button
|
|
206
|
-
type="button"
|
|
207
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--next-month"
|
|
208
|
-
onClick={handleNextMonth}
|
|
209
|
-
aria-label="Next month"
|
|
210
|
-
>
|
|
211
|
-
<Icon name="CaretRight" size="sm" />
|
|
212
|
-
</button>
|
|
213
|
-
<button
|
|
214
|
-
type="button"
|
|
215
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--next-year"
|
|
216
|
-
onClick={handleNextYear}
|
|
217
|
-
aria-label="Next year"
|
|
218
|
-
>
|
|
219
|
-
<Icon name="CaretDoubleRight" size="sm" />
|
|
220
|
-
</button>
|
|
221
|
-
</>
|
|
222
|
-
)}
|
|
223
|
-
|
|
224
|
-
{viewMode === 'months' && (
|
|
225
|
-
<>
|
|
226
|
-
<button
|
|
227
|
-
type="button"
|
|
228
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--prev-year"
|
|
229
|
-
onClick={handlePrevYear}
|
|
230
|
-
aria-label="Previous year"
|
|
231
|
-
>
|
|
232
|
-
<Icon name="CaretLeft" size="sm" />
|
|
233
|
-
</button>
|
|
234
|
-
<button
|
|
235
|
-
type="button"
|
|
236
|
-
className="c-datepicker__view-switch"
|
|
237
|
-
onClick={switchToYearView}
|
|
238
|
-
aria-label="Switch to year view"
|
|
239
|
-
>
|
|
240
|
-
{currentYear}
|
|
241
|
-
</button>
|
|
242
|
-
<button
|
|
243
|
-
type="button"
|
|
244
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--next-year"
|
|
245
|
-
onClick={handleNextYear}
|
|
246
|
-
aria-label="Next year"
|
|
247
|
-
>
|
|
248
|
-
<Icon name="CaretRight" size="sm" />
|
|
249
|
-
</button>
|
|
250
|
-
</>
|
|
251
|
-
)}
|
|
252
|
-
|
|
253
|
-
{viewMode === 'years' && (
|
|
254
|
-
<>
|
|
255
|
-
<button
|
|
256
|
-
type="button"
|
|
257
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--prev-year"
|
|
258
|
-
onClick={() => handlePrevYear()}
|
|
259
|
-
aria-label="Previous year range"
|
|
260
|
-
>
|
|
261
|
-
<Icon name="CaretLeft" size="sm" />
|
|
262
|
-
</button>
|
|
263
|
-
<button
|
|
264
|
-
type="button"
|
|
265
|
-
className="c-datepicker__view-switch"
|
|
266
|
-
aria-label="Current year range"
|
|
267
|
-
>
|
|
268
|
-
{currentYear - 6} - {currentYear + 5}
|
|
269
|
-
</button>
|
|
270
|
-
<button
|
|
271
|
-
type="button"
|
|
272
|
-
className="c-datepicker__nav-button c-datepicker__nav-button--next-year"
|
|
273
|
-
onClick={() => handleNextYear()}
|
|
274
|
-
aria-label="Next year range"
|
|
275
|
-
>
|
|
276
|
-
<Icon name="CaretRight" size="sm" />
|
|
277
|
-
</button>
|
|
278
|
-
</>
|
|
279
|
-
)}
|
|
280
|
-
</div>
|
|
281
|
-
|
|
282
|
-
<div className="c-datepicker__body">
|
|
283
|
-
{viewMode === 'days' && (
|
|
284
|
-
<>
|
|
285
|
-
<div className="c-datepicker__weekdays" role="row">
|
|
286
|
-
{showWeekNumbers && (
|
|
287
|
-
<div
|
|
288
|
-
className="c-datepicker__weekday c-datepicker__weeknumber"
|
|
289
|
-
role="columnheader"
|
|
290
|
-
>
|
|
291
|
-
#
|
|
292
|
-
</div>
|
|
293
|
-
)}
|
|
294
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
295
|
-
Su
|
|
296
|
-
</div>
|
|
297
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
298
|
-
Mo
|
|
299
|
-
</div>
|
|
300
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
301
|
-
Tu
|
|
302
|
-
</div>
|
|
303
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
304
|
-
We
|
|
305
|
-
</div>
|
|
306
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
307
|
-
Th
|
|
308
|
-
</div>
|
|
309
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
310
|
-
Fr
|
|
311
|
-
</div>
|
|
312
|
-
<div className="c-datepicker__weekday" role="columnheader">
|
|
313
|
-
Sa
|
|
314
|
-
</div>
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
<div
|
|
318
|
-
className="c-datepicker__days"
|
|
319
|
-
role="grid"
|
|
320
|
-
aria-labelledby={`${datepickerId}-month-year`}
|
|
321
|
-
>
|
|
322
|
-
{generateDays().map((dateObj, index) => {
|
|
323
|
-
const isSelectable = isDateSelectable(
|
|
324
|
-
dateObj.year,
|
|
325
|
-
dateObj.month,
|
|
326
|
-
dateObj.day
|
|
327
|
-
);
|
|
328
|
-
const isSelected = isDateSelected(dateObj.year, dateObj.month, dateObj.day);
|
|
329
|
-
const isTodayDate = isToday(dateObj.year, dateObj.month, dateObj.day);
|
|
330
|
-
const dateValue = new Date(dateObj.year, dateObj.month, dateObj.day);
|
|
331
|
-
|
|
332
|
-
// Check if date is in range (for range selection)
|
|
333
|
-
const isInRange = isDateInSelectedRange(
|
|
334
|
-
dateObj.year,
|
|
335
|
-
dateObj.month,
|
|
336
|
-
dateObj.day
|
|
337
|
-
);
|
|
338
|
-
|
|
339
|
-
// Determine if the day is start or end of range
|
|
340
|
-
const isStartOfRange =
|
|
341
|
-
selectionMode === 'range' &&
|
|
342
|
-
startDate &&
|
|
343
|
-
dateObj.day === startDate.getDate() &&
|
|
344
|
-
dateObj.month === startDate.getMonth() &&
|
|
345
|
-
dateObj.year === startDate.getFullYear();
|
|
346
|
-
|
|
347
|
-
const isEndOfRange =
|
|
348
|
-
selectionMode === 'range' &&
|
|
349
|
-
endDate &&
|
|
350
|
-
dateObj.day === endDate.getDate() &&
|
|
351
|
-
dateObj.month === endDate.getMonth() &&
|
|
352
|
-
dateObj.year === endDate.getFullYear();
|
|
353
|
-
|
|
354
|
-
// Add week number if enabled
|
|
355
|
-
if (showWeekNumbers && index % 7 === 0) {
|
|
356
|
-
const weekNum = getWeekNumber(dateValue);
|
|
357
|
-
|
|
358
|
-
return (
|
|
359
|
-
<React.Fragment key={`week-${index}`}>
|
|
360
|
-
<div
|
|
361
|
-
className="c-datepicker__weeknumber"
|
|
362
|
-
aria-label={`Week ${weekNum}`}
|
|
363
|
-
>
|
|
364
|
-
{weekNum}
|
|
365
|
-
</div>
|
|
366
|
-
<button
|
|
367
|
-
type="button"
|
|
368
|
-
className={`c-datepicker__day
|
|
369
|
-
${!dateObj.isCurrentMonth ? 'c-datepicker__day--outside' : ''}
|
|
370
|
-
${isSelected ? 'c-datepicker__day--selected' : ''}
|
|
371
|
-
${isStartOfRange ? 'c-datepicker__day--start-range' : ''}
|
|
372
|
-
${isEndOfRange ? 'c-datepicker__day--end-range' : ''}
|
|
373
|
-
${isInRange ? 'c-datepicker__day--in-range' : ''}
|
|
374
|
-
${isTodayDate ? 'c-datepicker__day--today' : ''}
|
|
375
|
-
${!isSelectable ? 'c-datepicker__day--disabled' : ''}`}
|
|
376
|
-
onClick={() => isSelectable && handleDateSelect(dateObj.day)}
|
|
377
|
-
disabled={!isSelectable}
|
|
378
|
-
tabIndex={dateObj.isCurrentMonth ? 0 : -1}
|
|
379
|
-
aria-label={dateValue.toLocaleDateString()}
|
|
380
|
-
aria-selected={isSelected ? 'true' : 'false'}
|
|
381
|
-
role="gridcell"
|
|
382
|
-
>
|
|
383
|
-
{dateObj.day}
|
|
384
|
-
</button>
|
|
385
|
-
</React.Fragment>
|
|
386
|
-
);
|
|
503
|
+
<>
|
|
504
|
+
{glass ? (
|
|
505
|
+
<div
|
|
506
|
+
id={calendarId}
|
|
507
|
+
className={`c-datepicker__calendar c-datepicker__calendar--${placement} c-datepicker__calendar--glass`}
|
|
508
|
+
role="dialog"
|
|
509
|
+
aria-modal={!inline ? 'true' : undefined}
|
|
510
|
+
aria-label="Date picker"
|
|
511
|
+
>
|
|
512
|
+
<AtomixGlass
|
|
513
|
+
{...(glass === true
|
|
514
|
+
? {
|
|
515
|
+
displacementScale: 50,
|
|
516
|
+
blurAmount: 3,
|
|
517
|
+
saturation: 160,
|
|
518
|
+
aberrationIntensity: 0,
|
|
519
|
+
cornerRadius: 12,
|
|
520
|
+
overLight: false,
|
|
521
|
+
elasticity: 0,
|
|
522
|
+
mode: 'standard' as const,
|
|
387
523
|
}
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
disabled={!isSelectable}
|
|
403
|
-
tabIndex={dateObj.isCurrentMonth ? 0 : -1}
|
|
404
|
-
aria-label={dateValue.toLocaleDateString()}
|
|
405
|
-
aria-selected={isSelected ? 'true' : 'false'}
|
|
406
|
-
role="gridcell"
|
|
407
|
-
>
|
|
408
|
-
{dateObj.day}
|
|
409
|
-
</button>
|
|
410
|
-
);
|
|
411
|
-
})}
|
|
412
|
-
</div>
|
|
413
|
-
</>
|
|
414
|
-
)}
|
|
415
|
-
|
|
416
|
-
{viewMode === 'months' && (
|
|
417
|
-
<div className="c-datepicker__months" role="grid">
|
|
418
|
-
{generateMonths().map((monthObj, index) => {
|
|
419
|
-
const isSelected =
|
|
420
|
-
value &&
|
|
421
|
-
value.getMonth() === monthObj.month &&
|
|
422
|
-
value.getFullYear() === currentYear;
|
|
423
|
-
|
|
424
|
-
return (
|
|
425
|
-
<button
|
|
426
|
-
key={`month-${index}`}
|
|
427
|
-
type="button"
|
|
428
|
-
className={`c-datepicker__month ${isSelected ? 'c-datepicker__month--selected' : ''}`}
|
|
429
|
-
onClick={() => selectMonth(monthObj.month)}
|
|
430
|
-
aria-selected={isSelected ? 'true' : 'false'}
|
|
431
|
-
role="gridcell"
|
|
432
|
-
>
|
|
433
|
-
{monthObj.name.substring(0, 3)}
|
|
434
|
-
</button>
|
|
435
|
-
);
|
|
436
|
-
})}
|
|
437
|
-
</div>
|
|
438
|
-
)}
|
|
439
|
-
|
|
440
|
-
{viewMode === 'years' && (
|
|
441
|
-
<div className="c-datepicker__years" role="grid">
|
|
442
|
-
{generateYears().map((year, index) => {
|
|
443
|
-
const isSelected = value && value.getFullYear() === year;
|
|
444
|
-
|
|
445
|
-
return (
|
|
446
|
-
<button
|
|
447
|
-
key={`year-${index}`}
|
|
448
|
-
type="button"
|
|
449
|
-
className={`c-datepicker__year ${isSelected ? 'c-datepicker__year--selected' : ''}`}
|
|
450
|
-
onClick={() => selectYear(year)}
|
|
451
|
-
aria-selected={isSelected ? 'true' : 'false'}
|
|
452
|
-
role="gridcell"
|
|
453
|
-
>
|
|
454
|
-
{year}
|
|
455
|
-
</button>
|
|
456
|
-
);
|
|
457
|
-
})}
|
|
458
|
-
</div>
|
|
459
|
-
)}
|
|
460
|
-
</div>
|
|
461
|
-
|
|
462
|
-
{viewMode === 'days' && (
|
|
463
|
-
<div className="c-datepicker__footer">
|
|
464
|
-
{selectionMode === 'range' && (
|
|
465
|
-
<div className="c-datepicker__range-status c-badge c-badge--sm c-badge--info u-w-100">
|
|
466
|
-
Selecting {rangeSelectionState === 'start' ? 'start' : 'end'} date
|
|
467
|
-
</div>
|
|
468
|
-
)}
|
|
469
|
-
|
|
470
|
-
{showTodayButton && (
|
|
471
|
-
<button
|
|
472
|
-
type="button"
|
|
473
|
-
className="c-datepicker__today-button c-btn c-btn--sm c-btn--outline-primary"
|
|
474
|
-
onClick={handleTodayClick}
|
|
475
|
-
aria-label="Go to today"
|
|
476
|
-
>
|
|
477
|
-
Today
|
|
478
|
-
</button>
|
|
479
|
-
)}
|
|
480
|
-
|
|
481
|
-
{!inline && (
|
|
482
|
-
<button
|
|
483
|
-
type="button"
|
|
484
|
-
className="c-datepicker__close-button c-btn c-btn--sm c-btn--outline-error"
|
|
485
|
-
onClick={() => setIsOpen(false)}
|
|
486
|
-
aria-label="Close calendar"
|
|
487
|
-
>
|
|
488
|
-
Close
|
|
489
|
-
</button>
|
|
490
|
-
)}
|
|
524
|
+
: glass)}
|
|
525
|
+
>
|
|
526
|
+
<div className="c-datepicker__glass-content">{renderCalendarContent()}</div>
|
|
527
|
+
</AtomixGlass>
|
|
528
|
+
</div>
|
|
529
|
+
) : (
|
|
530
|
+
<div
|
|
531
|
+
id={calendarId}
|
|
532
|
+
className={`c-datepicker__calendar c-datepicker__calendar--${placement}`}
|
|
533
|
+
role="dialog"
|
|
534
|
+
aria-modal={!inline ? 'true' : undefined}
|
|
535
|
+
aria-label="Date picker"
|
|
536
|
+
>
|
|
537
|
+
{renderCalendarContent()}
|
|
491
538
|
</div>
|
|
492
539
|
)}
|
|
493
|
-
|
|
540
|
+
</>
|
|
494
541
|
)}
|
|
495
542
|
</div>
|
|
496
543
|
);
|
|
497
544
|
}
|
|
498
545
|
);
|
|
499
546
|
|
|
500
|
-
|
|
547
|
+
export type { DatePickerProps };
|
|
501
548
|
|
|
502
|
-
|
|
549
|
+
DatePicker.displayName = 'DatePicker';
|
|
503
550
|
|
|
504
551
|
export default DatePicker;
|