@xaui/native 0.2.7 → 0.9.1-alpha.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.
Files changed (224) hide show
  1. package/dist/chunk-JDS6KGCM.cjs +791 -0
  2. package/dist/chunk-T3ZI2PZ6.js +791 -0
  3. package/dist/index.cjs +32 -1
  4. package/dist/index.d.cts +2 -2
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +32 -0
  7. package/dist/theme/index.cjs +32 -0
  8. package/dist/theme/index.d.cts +669 -0
  9. package/dist/theme/index.d.ts +669 -0
  10. package/dist/theme/index.js +32 -0
  11. package/package.json +26 -249
  12. package/README.md +0 -178
  13. package/dist/alert/index.cjs +0 -356
  14. package/dist/alert/index.d.cts +0 -90
  15. package/dist/alert/index.d.ts +0 -90
  16. package/dist/alert/index.js +0 -356
  17. package/dist/app-bar/index.cjs +0 -148
  18. package/dist/app-bar/index.d.cts +0 -59
  19. package/dist/app-bar/index.d.ts +0 -59
  20. package/dist/app-bar/index.js +0 -148
  21. package/dist/autocomplete/index.cjs +0 -1122
  22. package/dist/autocomplete/index.d.cts +0 -88
  23. package/dist/autocomplete/index.d.ts +0 -88
  24. package/dist/autocomplete/index.js +0 -1122
  25. package/dist/avatar/index.cjs +0 -281
  26. package/dist/avatar/index.d.cts +0 -123
  27. package/dist/avatar/index.d.ts +0 -123
  28. package/dist/avatar/index.js +0 -281
  29. package/dist/badge/index.cjs +0 -197
  30. package/dist/badge/index.d.cts +0 -94
  31. package/dist/badge/index.d.ts +0 -94
  32. package/dist/badge/index.js +0 -197
  33. package/dist/bottom-sheet/index.cjs +0 -9
  34. package/dist/bottom-sheet/index.d.cts +0 -84
  35. package/dist/bottom-sheet/index.d.ts +0 -84
  36. package/dist/bottom-sheet/index.js +0 -9
  37. package/dist/bottom-tab-bar/index.cjs +0 -497
  38. package/dist/bottom-tab-bar/index.d.cts +0 -211
  39. package/dist/bottom-tab-bar/index.d.ts +0 -211
  40. package/dist/bottom-tab-bar/index.js +0 -497
  41. package/dist/button/index.cjs +0 -392
  42. package/dist/button/index.d.cts +0 -174
  43. package/dist/button/index.d.ts +0 -174
  44. package/dist/button/index.js +0 -392
  45. package/dist/button.type-j1ZdkkSl.d.cts +0 -4
  46. package/dist/button.type-j1ZdkkSl.d.ts +0 -4
  47. package/dist/card/index.cjs +0 -338
  48. package/dist/card/index.d.cts +0 -191
  49. package/dist/card/index.d.ts +0 -191
  50. package/dist/card/index.js +0 -338
  51. package/dist/carousel/index.cjs +0 -381
  52. package/dist/carousel/index.d.cts +0 -147
  53. package/dist/carousel/index.d.ts +0 -147
  54. package/dist/carousel/index.js +0 -381
  55. package/dist/chart/index.cjs +0 -1026
  56. package/dist/chart/index.d.cts +0 -218
  57. package/dist/chart/index.d.ts +0 -218
  58. package/dist/chart/index.js +0 -1026
  59. package/dist/checkbox/index.cjs +0 -443
  60. package/dist/checkbox/index.d.cts +0 -73
  61. package/dist/checkbox/index.d.ts +0 -73
  62. package/dist/checkbox/index.js +0 -443
  63. package/dist/chip/index.cjs +0 -503
  64. package/dist/chip/index.d.cts +0 -195
  65. package/dist/chip/index.d.ts +0 -195
  66. package/dist/chip/index.js +0 -503
  67. package/dist/chunk-4JFWQ5XT.js +0 -368
  68. package/dist/chunk-56RPWZD2.cjs +0 -9
  69. package/dist/chunk-7UFBLUMV.cjs +0 -136
  70. package/dist/chunk-A45TVXU5.js +0 -337
  71. package/dist/chunk-BYWUAPC4.cjs +0 -368
  72. package/dist/chunk-DECMUMCI.js +0 -0
  73. package/dist/chunk-DHSTKO3K.cjs +0 -19
  74. package/dist/chunk-DJ4Q37UT.cjs +0 -75
  75. package/dist/chunk-EUQDGTST.cjs +0 -1
  76. package/dist/chunk-GBHQCAKW.js +0 -19
  77. package/dist/chunk-RBSA4NH4.js +0 -136
  78. package/dist/chunk-SHBDANQN.js +0 -9
  79. package/dist/chunk-UGEINZM7.cjs +0 -290
  80. package/dist/chunk-UU4HHBDN.js +0 -290
  81. package/dist/chunk-VSZEXOUN.js +0 -384
  82. package/dist/chunk-YIEUN3G5.cjs +0 -384
  83. package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
  84. package/dist/chunk-ZY7IUTAT.js +0 -75
  85. package/dist/color-picker/index.cjs +0 -457
  86. package/dist/color-picker/index.d.cts +0 -124
  87. package/dist/color-picker/index.d.ts +0 -124
  88. package/dist/color-picker/index.js +0 -457
  89. package/dist/core/index.cjs +0 -24
  90. package/dist/core/index.d.cts +0 -28
  91. package/dist/core/index.d.ts +0 -28
  92. package/dist/core/index.js +0 -24
  93. package/dist/datepicker/index.cjs +0 -1625
  94. package/dist/datepicker/index.d.cts +0 -45
  95. package/dist/datepicker/index.d.ts +0 -45
  96. package/dist/datepicker/index.js +0 -1625
  97. package/dist/dialog/index.cjs +0 -372
  98. package/dist/dialog/index.d.cts +0 -151
  99. package/dist/dialog/index.d.ts +0 -151
  100. package/dist/dialog/index.js +0 -372
  101. package/dist/divider/index.cjs +0 -8
  102. package/dist/divider/index.d.cts +0 -30
  103. package/dist/divider/index.d.ts +0 -30
  104. package/dist/divider/index.js +0 -8
  105. package/dist/drawer/index.cjs +0 -237
  106. package/dist/drawer/index.d.cts +0 -58
  107. package/dist/drawer/index.d.ts +0 -58
  108. package/dist/drawer/index.js +0 -237
  109. package/dist/expansion-panel/index.cjs +0 -441
  110. package/dist/expansion-panel/index.d.cts +0 -153
  111. package/dist/expansion-panel/index.d.ts +0 -153
  112. package/dist/expansion-panel/index.js +0 -441
  113. package/dist/fab/index.cjs +0 -9
  114. package/dist/fab/index.d.cts +0 -10
  115. package/dist/fab/index.d.ts +0 -10
  116. package/dist/fab/index.js +0 -9
  117. package/dist/fab-menu/index.cjs +0 -330
  118. package/dist/fab-menu/index.d.cts +0 -125
  119. package/dist/fab-menu/index.d.ts +0 -125
  120. package/dist/fab-menu/index.js +0 -330
  121. package/dist/fab.type-CkUHmXU_.d.ts +0 -86
  122. package/dist/fab.type-DN0vtAh6.d.cts +0 -86
  123. package/dist/feature-discovery/index.cjs +0 -464
  124. package/dist/feature-discovery/index.d.cts +0 -82
  125. package/dist/feature-discovery/index.d.ts +0 -82
  126. package/dist/feature-discovery/index.js +0 -464
  127. package/dist/indicator/index.cjs +0 -8
  128. package/dist/indicator/index.d.cts +0 -47
  129. package/dist/indicator/index.d.ts +0 -47
  130. package/dist/indicator/index.js +0 -8
  131. package/dist/input/index.cjs +0 -1462
  132. package/dist/input/index.d.cts +0 -522
  133. package/dist/input/index.d.ts +0 -522
  134. package/dist/input/index.js +0 -1462
  135. package/dist/input-trigger/index.cjs +0 -197
  136. package/dist/input-trigger/index.d.cts +0 -11
  137. package/dist/input-trigger/index.d.ts +0 -11
  138. package/dist/input-trigger/index.js +0 -197
  139. package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
  140. package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
  141. package/dist/list/index.cjs +0 -395
  142. package/dist/list/index.d.cts +0 -188
  143. package/dist/list/index.d.ts +0 -188
  144. package/dist/list/index.js +0 -395
  145. package/dist/menu/index.cjs +0 -316
  146. package/dist/menu/index.d.cts +0 -115
  147. package/dist/menu/index.d.ts +0 -115
  148. package/dist/menu/index.js +0 -316
  149. package/dist/menubox/index.cjs +0 -297
  150. package/dist/menubox/index.d.cts +0 -98
  151. package/dist/menubox/index.d.ts +0 -98
  152. package/dist/menubox/index.js +0 -297
  153. package/dist/pager/index.cjs +0 -205
  154. package/dist/pager/index.d.cts +0 -93
  155. package/dist/pager/index.d.ts +0 -93
  156. package/dist/pager/index.js +0 -205
  157. package/dist/picker/index.cjs +0 -244
  158. package/dist/picker/index.d.cts +0 -121
  159. package/dist/picker/index.d.ts +0 -121
  160. package/dist/picker/index.js +0 -244
  161. package/dist/progress/index.cjs +0 -219
  162. package/dist/progress/index.d.cts +0 -47
  163. package/dist/progress/index.d.ts +0 -47
  164. package/dist/progress/index.js +0 -219
  165. package/dist/radio/index.cjs +0 -465
  166. package/dist/radio/index.d.cts +0 -145
  167. package/dist/radio/index.d.ts +0 -145
  168. package/dist/radio/index.js +0 -465
  169. package/dist/refresh-control/index.cjs +0 -45
  170. package/dist/refresh-control/index.d.cts +0 -55
  171. package/dist/refresh-control/index.d.ts +0 -55
  172. package/dist/refresh-control/index.js +0 -45
  173. package/dist/segment-button/index.cjs +0 -405
  174. package/dist/segment-button/index.d.cts +0 -141
  175. package/dist/segment-button/index.d.ts +0 -141
  176. package/dist/segment-button/index.js +0 -405
  177. package/dist/select/index.cjs +0 -878
  178. package/dist/select/index.d.cts +0 -192
  179. package/dist/select/index.d.ts +0 -192
  180. package/dist/select/index.js +0 -878
  181. package/dist/skeleton/index.cjs +0 -89
  182. package/dist/skeleton/index.d.cts +0 -45
  183. package/dist/skeleton/index.d.ts +0 -45
  184. package/dist/skeleton/index.js +0 -89
  185. package/dist/slider/index.cjs +0 -576
  186. package/dist/slider/index.d.cts +0 -171
  187. package/dist/slider/index.d.ts +0 -171
  188. package/dist/slider/index.js +0 -576
  189. package/dist/snackbar/index.cjs +0 -436
  190. package/dist/snackbar/index.d.cts +0 -174
  191. package/dist/snackbar/index.d.ts +0 -174
  192. package/dist/snackbar/index.js +0 -436
  193. package/dist/snippet/index.cjs +0 -314
  194. package/dist/snippet/index.d.cts +0 -95
  195. package/dist/snippet/index.d.ts +0 -95
  196. package/dist/snippet/index.js +0 -314
  197. package/dist/stepper/index.cjs +0 -550
  198. package/dist/stepper/index.d.cts +0 -137
  199. package/dist/stepper/index.d.ts +0 -137
  200. package/dist/stepper/index.js +0 -550
  201. package/dist/switch/index.cjs +0 -358
  202. package/dist/switch/index.d.cts +0 -28
  203. package/dist/switch/index.d.ts +0 -28
  204. package/dist/switch/index.js +0 -358
  205. package/dist/tabs/index.cjs +0 -440
  206. package/dist/tabs/index.d.cts +0 -180
  207. package/dist/tabs/index.d.ts +0 -180
  208. package/dist/tabs/index.js +0 -440
  209. package/dist/timepicker/index.cjs +0 -823
  210. package/dist/timepicker/index.d.cts +0 -215
  211. package/dist/timepicker/index.d.ts +0 -215
  212. package/dist/timepicker/index.js +0 -823
  213. package/dist/toolbar/index.cjs +0 -333
  214. package/dist/toolbar/index.d.cts +0 -100
  215. package/dist/toolbar/index.d.ts +0 -100
  216. package/dist/toolbar/index.js +0 -333
  217. package/dist/typography/index.cjs +0 -238
  218. package/dist/typography/index.d.cts +0 -113
  219. package/dist/typography/index.d.ts +0 -113
  220. package/dist/typography/index.js +0 -238
  221. package/dist/view/index.cjs +0 -1361
  222. package/dist/view/index.d.cts +0 -833
  223. package/dist/view/index.d.ts +0 -833
  224. package/dist/view/index.js +0 -1361
@@ -1,1625 +0,0 @@
1
- import "../chunk-SHBDANQN.js";
2
- import {
3
- Portal,
4
- useXUITheme
5
- } from "../chunk-RBSA4NH4.js";
6
-
7
- // src/components/datepicker/datepicker.tsx
8
- import React7, { useCallback as useCallback5, useMemo as useMemo6, useRef as useRef6 } from "react";
9
- import { Text as Text7, View as View7 } from "react-native";
10
-
11
- // src/components/datepicker/datepicker.hook.ts
12
- import { useMemo } from "react";
13
- import { getSafeThemeColor, withOpacity } from "@xaui/core";
14
- import { colors } from "@xaui/core/palette";
15
- var useDatePickerColorScheme = (themeColor) => {
16
- const theme = useXUITheme();
17
- const safeThemeColor = getSafeThemeColor(themeColor);
18
- const colorScheme = theme.colors[safeThemeColor];
19
- return { theme, colorScheme };
20
- };
21
- var useDatePickerSizeStyles = (size) => {
22
- const theme = useXUITheme();
23
- return useMemo(() => {
24
- const sizes = {
25
- xs: {
26
- minHeight: theme.componentSizes.xs,
27
- paddingHorizontal: theme.spacing.sm,
28
- paddingVertical: theme.spacing.xs,
29
- fontSize: theme.fontSizes.xs,
30
- labelSize: theme.fontSizes.xs
31
- },
32
- sm: {
33
- minHeight: theme.componentSizes.sm,
34
- paddingHorizontal: theme.spacing.md,
35
- paddingVertical: theme.spacing.xs,
36
- fontSize: theme.fontSizes.sm,
37
- labelSize: theme.fontSizes.xs
38
- },
39
- md: {
40
- minHeight: theme.componentSizes.md,
41
- paddingHorizontal: theme.spacing.md,
42
- paddingVertical: theme.spacing.sm,
43
- fontSize: theme.fontSizes.md,
44
- labelSize: theme.fontSizes.sm
45
- },
46
- lg: {
47
- minHeight: theme.componentSizes.lg,
48
- paddingHorizontal: theme.spacing.lg,
49
- paddingVertical: theme.spacing.md,
50
- fontSize: theme.fontSizes.lg,
51
- labelSize: theme.fontSizes.md
52
- }
53
- };
54
- return sizes[size];
55
- }, [size, theme]);
56
- };
57
- var useDatePickerRadiusStyles = (radius) => {
58
- const theme = useXUITheme();
59
- return useMemo(() => {
60
- const radii = {
61
- none: theme.borderRadius.none,
62
- sm: theme.borderRadius.sm,
63
- md: theme.borderRadius.md,
64
- lg: theme.borderRadius.lg,
65
- full: theme.borderRadius.full
66
- };
67
- return { borderRadius: radii[radius] };
68
- }, [radius, theme]);
69
- };
70
- var useDatePickerVariantStyles = (themeColor, variant, isInvalid) => {
71
- const { theme, colorScheme } = useDatePickerColorScheme(themeColor);
72
- return useMemo(() => {
73
- let borderColor = isInvalid ? theme.colors.danger.main : colorScheme.main;
74
- if (variant === "bordered" && themeColor === "default") {
75
- borderColor = colors.gray[300];
76
- }
77
- const variantStyles = {
78
- bordered: {
79
- backgroundColor: "transparent",
80
- borderWidth: theme.borderWidth.md,
81
- borderColor
82
- },
83
- colored: {
84
- backgroundColor: withOpacity(colorScheme.container, 0.5),
85
- borderWidth: 0
86
- },
87
- light: {
88
- backgroundColor: "transparent",
89
- borderWidth: 0
90
- },
91
- underlined: {
92
- backgroundColor: "transparent",
93
- borderBottomWidth: theme.borderWidth.md,
94
- borderColor
95
- }
96
- };
97
- return variantStyles[variant];
98
- }, [variant, theme, colorScheme, isInvalid, themeColor]);
99
- };
100
- var useDatePickerLabelStyle = (themeColor, isInvalid, labelSize) => {
101
- const { theme, colorScheme } = useDatePickerColorScheme(themeColor);
102
- return useMemo(() => {
103
- let baseColor = theme.colors.foreground;
104
- if (isInvalid) {
105
- baseColor = theme.colors.danger.main;
106
- } else if (themeColor !== "default") {
107
- baseColor = colorScheme.main;
108
- }
109
- return {
110
- fontSize: labelSize,
111
- color: baseColor
112
- };
113
- }, [isInvalid, labelSize, theme, themeColor, colorScheme]);
114
- };
115
- var useDatePickerHelperColor = (isInvalid) => {
116
- const theme = useXUITheme();
117
- return useMemo(() => {
118
- if (isInvalid) {
119
- return theme.colors.danger.main;
120
- }
121
- return colors.gray[600];
122
- }, [isInvalid, theme]);
123
- };
124
-
125
- // src/components/datepicker/datepicker.state.hook.ts
126
- import { useCallback, useState } from "react";
127
- var useDatePickerState = ({
128
- value,
129
- defaultValue,
130
- onChange
131
- }) => {
132
- const [internalValue, setInternalValue] = useState(
133
- defaultValue ?? null
134
- );
135
- const selectedDate = value !== void 0 ? value : internalValue;
136
- const updateDate = useCallback(
137
- (date) => {
138
- if (value === void 0) {
139
- setInternalValue(date);
140
- }
141
- onChange?.(date);
142
- },
143
- [value, onChange]
144
- );
145
- return { selectedDate, updateDate };
146
- };
147
- var useDatePickerOpenState = ({
148
- isDisabled,
149
- onOpenChange,
150
- onOpen,
151
- onClose
152
- }) => {
153
- const [isOpen, setInternalOpen] = useState(false);
154
- const setOpen = useCallback(
155
- (open) => {
156
- if (isDisabled && open) return;
157
- setInternalOpen(open);
158
- onOpenChange?.(open);
159
- if (open) {
160
- onOpen?.();
161
- } else {
162
- onClose?.();
163
- }
164
- },
165
- [isDisabled, onOpenChange, onOpen, onClose]
166
- );
167
- return { isOpen, setOpen };
168
- };
169
- var useDatePickerViewState = (initialDate) => {
170
- const now = /* @__PURE__ */ new Date();
171
- const [viewDate, setViewDate] = useState(initialDate ?? now);
172
- const [viewMode, setViewMode] = useState("calendar");
173
- const goToPreviousMonth = useCallback(() => {
174
- setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() - 1, 1));
175
- }, []);
176
- const goToNextMonth = useCallback(() => {
177
- setViewDate((prev) => new Date(prev.getFullYear(), prev.getMonth() + 1, 1));
178
- }, []);
179
- const goToYear = useCallback((year) => {
180
- setViewDate((prev) => new Date(year, prev.getMonth(), 1));
181
- setViewMode("month");
182
- }, []);
183
- const goToMonth = useCallback((month) => {
184
- setViewDate((prev) => new Date(prev.getFullYear(), month, 1));
185
- setViewMode("calendar");
186
- }, []);
187
- const goToToday = useCallback(() => {
188
- setViewDate(/* @__PURE__ */ new Date());
189
- setViewMode("calendar");
190
- }, []);
191
- const toggleYearPicker = useCallback(() => {
192
- setViewMode((prev) => prev === "year" ? "calendar" : "year");
193
- }, []);
194
- const syncViewToDate = useCallback((date) => {
195
- setViewDate(date);
196
- }, []);
197
- return {
198
- viewDate,
199
- viewMode,
200
- goToPreviousMonth,
201
- goToNextMonth,
202
- goToYear,
203
- goToMonth,
204
- goToToday,
205
- toggleYearPicker,
206
- syncViewToDate
207
- };
208
- };
209
-
210
- // src/components/datepicker/datepicker.utils.ts
211
- var getWeekdayNames = (locale, firstDayOfWeek) => {
212
- const baseDate = new Date(2024, 0, 1);
213
- const dayIndex = baseDate.getDay();
214
- const offset = firstDayOfWeek - dayIndex;
215
- const days = [];
216
- for (let i = 0; i < 7; i++) {
217
- const date = new Date(2024, 0, 1 + offset + i);
218
- days.push(date.toLocaleDateString(locale, { weekday: "short" }).slice(0, 2));
219
- }
220
- return days;
221
- };
222
- var getMonthNames = (locale) => {
223
- const months = [];
224
- for (let i = 0; i < 12; i++) {
225
- const date = new Date(2024, i, 1);
226
- months.push(date.toLocaleDateString(locale, { month: "long" }));
227
- }
228
- return months;
229
- };
230
- var getMonthName = (month, locale) => {
231
- const date = new Date(2024, month, 1);
232
- return date.toLocaleDateString(locale, { month: "long" });
233
- };
234
- var formatDate = (date, locale) => {
235
- return date.toLocaleDateString(locale, {
236
- year: "numeric",
237
- month: "short",
238
- day: "numeric"
239
- });
240
- };
241
- var isSameDay = (a, b) => {
242
- return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
243
- };
244
- var isToday = (date) => {
245
- return isSameDay(date, /* @__PURE__ */ new Date());
246
- };
247
- var isDateInRange = (date, minDate, maxDate) => {
248
- const normalized = new Date(date.getFullYear(), date.getMonth(), date.getDate());
249
- if (minDate) {
250
- const minNormalized = new Date(
251
- minDate.getFullYear(),
252
- minDate.getMonth(),
253
- minDate.getDate()
254
- );
255
- if (normalized < minNormalized) return false;
256
- }
257
- if (maxDate) {
258
- const maxNormalized = new Date(
259
- maxDate.getFullYear(),
260
- maxDate.getMonth(),
261
- maxDate.getDate()
262
- );
263
- if (normalized > maxNormalized) return false;
264
- }
265
- return true;
266
- };
267
- var getCalendarDays = (year, month, firstDayOfWeek, minDate, maxDate) => {
268
- const firstOfMonth = new Date(year, month, 1);
269
- const lastOfMonth = new Date(year, month + 1, 0);
270
- const daysInMonth = lastOfMonth.getDate();
271
- let startDayOfWeek = firstOfMonth.getDay() - firstDayOfWeek;
272
- if (startDayOfWeek < 0) startDayOfWeek += 7;
273
- const days = [];
274
- const prevMonth = new Date(year, month, 0);
275
- const prevMonthDays = prevMonth.getDate();
276
- for (let i = startDayOfWeek - 1; i >= 0; i--) {
277
- const day = prevMonthDays - i;
278
- const date = new Date(year, month - 1, day);
279
- days.push({
280
- date,
281
- day,
282
- isCurrentMonth: false,
283
- isToday: isToday(date),
284
- isDisabled: !isDateInRange(date, minDate, maxDate)
285
- });
286
- }
287
- for (let day = 1; day <= daysInMonth; day++) {
288
- const date = new Date(year, month, day);
289
- days.push({
290
- date,
291
- day,
292
- isCurrentMonth: true,
293
- isToday: isToday(date),
294
- isDisabled: !isDateInRange(date, minDate, maxDate)
295
- });
296
- }
297
- const remainingSlots = 42 - days.length;
298
- for (let day = 1; day <= remainingSlots; day++) {
299
- const date = new Date(year, month + 1, day);
300
- days.push({
301
- date,
302
- day,
303
- isCurrentMonth: false,
304
- isToday: isToday(date),
305
- isDisabled: !isDateInRange(date, minDate, maxDate)
306
- });
307
- }
308
- return days;
309
- };
310
- var getYearRange = (minDate, maxDate) => {
311
- const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
312
- const startYear = minDate ? minDate.getFullYear() : currentYear - 50;
313
- const endYear = maxDate ? maxDate.getFullYear() : currentYear + 50;
314
- const years = [];
315
- for (let year = startYear; year <= endYear; year++) {
316
- years.push(year);
317
- }
318
- return years;
319
- };
320
- var LOCALE_LABELS = {
321
- fr: { selectDate: "Choisir une date", today: "Aujourd'hui", confirm: "OK" },
322
- de: { selectDate: "Datum ausw\xE4hlen", today: "Heute", confirm: "OK" },
323
- es: { selectDate: "Seleccionar fecha", today: "Hoy", confirm: "OK" },
324
- it: { selectDate: "Seleziona data", today: "Oggi", confirm: "OK" },
325
- pt: { selectDate: "Selecionar data", today: "Hoje", confirm: "OK" },
326
- nl: { selectDate: "Datum selecteren", today: "Vandaag", confirm: "OK" },
327
- pl: { selectDate: "Wybierz dat\u0119", today: "Dzisiaj", confirm: "OK" },
328
- ru: { selectDate: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0430\u0442\u0443", today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F", confirm: "OK" },
329
- ja: { selectDate: "\u65E5\u4ED8\u3092\u9078\u629E", today: "\u4ECA\u65E5", confirm: "OK" },
330
- ko: { selectDate: "\uB0A0\uC9DC \uC120\uD0DD", today: "\uC624\uB298", confirm: "\uD655\uC778" },
331
- zh: { selectDate: "\u9009\u62E9\u65E5\u671F", today: "\u4ECA\u5929", confirm: "\u786E\u5B9A" },
332
- ar: { selectDate: "\u0627\u062E\u062A\u0631 \u0627\u0644\u062A\u0627\u0631\u064A\u062E", today: "\u0627\u0644\u064A\u0648\u0645", confirm: "\u0645\u0648\u0627\u0641\u0642" },
333
- tr: { selectDate: "Tarih se\xE7in", today: "Bug\xFCn", confirm: "Tamam" }
334
- };
335
- var DEFAULT_LABELS = {
336
- selectDate: "Select date",
337
- today: "Today",
338
- confirm: "OK"
339
- };
340
- var getDatePickerLabels = (locale) => {
341
- const baseLocale = locale.split("-")[0].toLowerCase();
342
- return LOCALE_LABELS[baseLocale] ?? DEFAULT_LABELS;
343
- };
344
- var getFirstDayOfWeek = (locale) => {
345
- const mondayLocales = [
346
- "fr",
347
- "de",
348
- "es",
349
- "it",
350
- "pt",
351
- "nl",
352
- "pl",
353
- "ru",
354
- "sv",
355
- "da",
356
- "fi",
357
- "nb",
358
- "nn",
359
- "cs",
360
- "sk",
361
- "hu",
362
- "ro",
363
- "bg",
364
- "hr",
365
- "sl",
366
- "uk",
367
- "tr",
368
- "el",
369
- "et",
370
- "lt",
371
- "lv"
372
- ];
373
- const baseLocale = locale.split("-")[0].toLowerCase();
374
- return mondayLocales.includes(baseLocale) ? 1 : 0;
375
- };
376
-
377
- // src/components/datepicker/datepicker.style.ts
378
- import { StyleSheet } from "react-native";
379
- var styles = StyleSheet.create({
380
- container: {
381
- gap: 6,
382
- position: "relative"
383
- },
384
- fullWidth: {
385
- flexShrink: 1,
386
- flexBasis: "auto",
387
- width: "100%"
388
- },
389
- minWidth: {
390
- minWidth: 170
391
- },
392
- label: {
393
- fontWeight: "500"
394
- },
395
- trigger: {
396
- flexDirection: "row",
397
- alignItems: "center",
398
- justifyContent: "space-between",
399
- gap: 8
400
- },
401
- triggerContent: {
402
- flexDirection: "row",
403
- alignItems: "center",
404
- flex: 1,
405
- gap: 8
406
- },
407
- triggerText: {
408
- flex: 1
409
- },
410
- clearButton: {
411
- padding: 2,
412
- paddingLeft: 4,
413
- marginRight: -4
414
- },
415
- helperText: {
416
- fontSize: 12
417
- },
418
- disabled: {
419
- opacity: 0.5
420
- },
421
- outsideLeftRow: {
422
- flexDirection: "row",
423
- alignItems: "center",
424
- gap: 12
425
- }
426
- });
427
-
428
- // src/components/dialogs/datepicker-dialog/datepicker-dialog.tsx
429
- import React5, { useCallback as useCallback4, useEffect as useEffect5, useRef as useRef5 } from "react";
430
- import {
431
- Animated as Animated5,
432
- BackHandler,
433
- Pressable as Pressable5,
434
- Text as Text5,
435
- View as View5,
436
- useWindowDimensions
437
- } from "react-native";
438
- import { GestureHandlerRootView } from "react-native-gesture-handler";
439
-
440
- // src/components/dialogs/datepicker-dialog/datepicker-dialog.animation.ts
441
- import { useCallback as useCallback2, useEffect, useRef, useState as useState2 } from "react";
442
- import { Animated, Easing } from "react-native";
443
- var useDatePickerDialogAnimation = ({
444
- visible,
445
- fadeAnim,
446
- slideAnim,
447
- scaleAnim,
448
- onCloseComplete
449
- }) => {
450
- const [shouldRender, setShouldRender] = useState2(false);
451
- const isClosingRef = useRef(false);
452
- useEffect(() => {
453
- if (visible) {
454
- setShouldRender(true);
455
- isClosingRef.current = false;
456
- Animated.parallel([
457
- Animated.timing(fadeAnim, {
458
- toValue: 1,
459
- duration: 220,
460
- useNativeDriver: true
461
- }),
462
- Animated.spring(slideAnim, {
463
- toValue: 1,
464
- useNativeDriver: true,
465
- damping: 20,
466
- stiffness: 300,
467
- mass: 0.8
468
- }),
469
- Animated.spring(scaleAnim, {
470
- toValue: 1,
471
- useNativeDriver: true,
472
- damping: 18,
473
- stiffness: 280,
474
- mass: 0.8
475
- })
476
- ]).start();
477
- return;
478
- }
479
- if (!shouldRender || isClosingRef.current) return;
480
- isClosingRef.current = true;
481
- Animated.parallel([
482
- Animated.timing(fadeAnim, {
483
- toValue: 0,
484
- duration: 180,
485
- easing: Easing.out(Easing.ease),
486
- useNativeDriver: true
487
- }),
488
- Animated.timing(slideAnim, {
489
- toValue: 0,
490
- duration: 180,
491
- easing: Easing.out(Easing.ease),
492
- useNativeDriver: true
493
- }),
494
- Animated.timing(scaleAnim, {
495
- toValue: 0,
496
- duration: 180,
497
- easing: Easing.out(Easing.ease),
498
- useNativeDriver: true
499
- })
500
- ]).start(() => {
501
- setShouldRender(false);
502
- isClosingRef.current = false;
503
- onCloseComplete();
504
- });
505
- }, [visible, fadeAnim, slideAnim, scaleAnim, shouldRender, onCloseComplete]);
506
- return { shouldRender };
507
- };
508
- var useViewTransitionAnimation = ({
509
- fadeAnim
510
- }) => {
511
- const animate = useCallback2(() => {
512
- fadeAnim.setValue(0);
513
- Animated.timing(fadeAnim, {
514
- toValue: 1,
515
- duration: 200,
516
- useNativeDriver: true
517
- }).start();
518
- }, [fadeAnim]);
519
- return { animate };
520
- };
521
- var useMonthSlideAnimation = ({
522
- slideAnim,
523
- fadeAnim
524
- }) => {
525
- const animate = useCallback2(
526
- (direction) => {
527
- const startX = direction === "right" ? 60 : -60;
528
- slideAnim.setValue(startX);
529
- fadeAnim.setValue(0);
530
- Animated.parallel([
531
- Animated.spring(slideAnim, {
532
- toValue: 0,
533
- useNativeDriver: true,
534
- damping: 22,
535
- stiffness: 280,
536
- mass: 0.7
537
- }),
538
- Animated.timing(fadeAnim, {
539
- toValue: 1,
540
- duration: 180,
541
- useNativeDriver: true
542
- })
543
- ]).start();
544
- },
545
- [slideAnim, fadeAnim]
546
- );
547
- return { animate };
548
- };
549
-
550
- // src/components/dialogs/datepicker-dialog/datepicker-dialog-calendar.tsx
551
- import React, { useEffect as useEffect2, useMemo as useMemo2, useRef as useRef2 } from "react";
552
- import { Animated as Animated2, Pressable, Text, View } from "react-native";
553
- import {
554
- PanGestureHandler,
555
- State
556
- } from "react-native-gesture-handler";
557
-
558
- // src/components/dialogs/datepicker-dialog/datepicker-dialog.style.ts
559
- import { StyleSheet as StyleSheet2 } from "react-native";
560
- var styles2 = StyleSheet2.create({
561
- backdrop: {
562
- ...StyleSheet2.absoluteFillObject,
563
- backgroundColor: "rgba(0, 0, 0, 0.5)"
564
- },
565
- dialogContainer: {
566
- flex: 1,
567
- justifyContent: "center",
568
- alignItems: "center",
569
- zIndex: 1,
570
- paddingHorizontal: 24
571
- },
572
- container: {
573
- width: "100%",
574
- maxWidth: 360,
575
- borderRadius: 16,
576
- overflow: "hidden",
577
- elevation: 6,
578
- shadowColor: "#000",
579
- shadowOffset: { width: 0, height: 2 },
580
- shadowOpacity: 0.25,
581
- shadowRadius: 8
582
- },
583
- header: {
584
- paddingHorizontal: 24,
585
- paddingTop: 16,
586
- paddingBottom: 12
587
- },
588
- headerLabel: {
589
- fontSize: 12,
590
- fontWeight: "500",
591
- textTransform: "uppercase",
592
- letterSpacing: 0.5,
593
- marginBottom: 8
594
- },
595
- headerDateRow: {
596
- flexDirection: "row",
597
- alignItems: "center",
598
- justifyContent: "space-between"
599
- },
600
- headerDate: {
601
- fontSize: 24,
602
- fontWeight: "400"
603
- },
604
- navigationRow: {
605
- flexDirection: "row",
606
- alignItems: "center",
607
- justifyContent: "space-between",
608
- paddingHorizontal: 12,
609
- paddingVertical: 8
610
- },
611
- monthYearButton: {
612
- flexDirection: "row",
613
- alignItems: "center",
614
- gap: 4,
615
- paddingVertical: 8,
616
- paddingHorizontal: 12,
617
- borderRadius: 20
618
- },
619
- monthYearText: {
620
- fontSize: 14,
621
- fontWeight: "600"
622
- },
623
- navButtons: {
624
- flexDirection: "row",
625
- alignItems: "center",
626
- gap: 4
627
- },
628
- navButton: {
629
- padding: 8,
630
- borderRadius: 20
631
- },
632
- calendarGrid: {
633
- paddingHorizontal: 12
634
- },
635
- weekdayRow: {
636
- flexDirection: "row",
637
- justifyContent: "space-around",
638
- marginBottom: 4
639
- },
640
- weekdayCell: {
641
- width: 44,
642
- height: 32,
643
- justifyContent: "center",
644
- alignItems: "center"
645
- },
646
- weekdayText: {
647
- fontSize: 12,
648
- fontWeight: "500"
649
- },
650
- dayRow: {
651
- flexDirection: "row",
652
- justifyContent: "space-around"
653
- },
654
- dayCell: {
655
- width: 44,
656
- height: 44,
657
- justifyContent: "center",
658
- alignItems: "center",
659
- borderRadius: 22
660
- },
661
- dayText: {
662
- fontSize: 14
663
- },
664
- todayCell: {
665
- borderWidth: 1
666
- },
667
- selectedCell: {
668
- borderWidth: 0
669
- },
670
- selectedCellInner: {
671
- width: 44,
672
- height: 44,
673
- justifyContent: "center",
674
- alignItems: "center",
675
- borderRadius: 22
676
- },
677
- disabledText: {
678
- opacity: 0.3
679
- },
680
- otherMonthText: {
681
- opacity: 0.4
682
- },
683
- footer: {
684
- flexDirection: "row",
685
- justifyContent: "flex-end",
686
- alignItems: "center",
687
- gap: 8,
688
- paddingHorizontal: 12,
689
- paddingVertical: 12
690
- },
691
- footerButton: {
692
- paddingVertical: 10,
693
- paddingHorizontal: 16,
694
- borderRadius: 20
695
- },
696
- footerButtonText: {
697
- fontSize: 14,
698
- fontWeight: "600"
699
- },
700
- yearPickerContainer: {
701
- paddingHorizontal: 12,
702
- height: 280
703
- },
704
- yearGrid: {
705
- flexDirection: "row",
706
- flexWrap: "wrap",
707
- justifyContent: "center",
708
- gap: 4
709
- },
710
- yearCell: {
711
- width: 76,
712
- height: 44,
713
- justifyContent: "center",
714
- alignItems: "center",
715
- borderRadius: 22,
716
- margin: 2
717
- },
718
- yearCellInner: {
719
- width: 76,
720
- height: 44,
721
- justifyContent: "center",
722
- alignItems: "center",
723
- borderRadius: 22
724
- },
725
- yearText: {
726
- fontSize: 14
727
- },
728
- monthPickerContainer: {
729
- paddingHorizontal: 24,
730
- paddingVertical: 8
731
- },
732
- monthGrid: {
733
- flexDirection: "row",
734
- flexWrap: "wrap",
735
- justifyContent: "center",
736
- gap: 8
737
- },
738
- monthCell: {
739
- width: 90,
740
- height: 44,
741
- justifyContent: "center",
742
- alignItems: "center",
743
- borderRadius: 22
744
- },
745
- monthCellInner: {
746
- width: 90,
747
- height: 44,
748
- justifyContent: "center",
749
- alignItems: "center",
750
- borderRadius: 22
751
- },
752
- monthText: {
753
- fontSize: 14
754
- }
755
- });
756
-
757
- // src/components/dialogs/datepicker-dialog/datepicker-dialog-calendar.tsx
758
- var AnimatedDayCell = ({
759
- isSelected,
760
- isToday: isToday2,
761
- isCurrentMonth,
762
- isDisabled,
763
- day,
764
- date,
765
- locale,
766
- themeColor,
767
- onSelectDay
768
- }) => {
769
- const theme = useXUITheme();
770
- const colorScheme = theme.colors[themeColor] ?? theme.colors.primary;
771
- const isDefault = themeColor === "default";
772
- const accentColor = isDefault ? theme.colors.foreground : colorScheme.main;
773
- const accentFg = isDefault ? theme.colors.background : colorScheme.onMain;
774
- const scaleAnim = useRef2(new Animated2.Value(isSelected ? 1 : 0)).current;
775
- useEffect2(() => {
776
- if (isSelected) {
777
- scaleAnim.setValue(0.92);
778
- Animated2.spring(scaleAnim, {
779
- toValue: 1,
780
- useNativeDriver: true,
781
- damping: 20,
782
- stiffness: 300,
783
- mass: 0.6
784
- }).start();
785
- } else {
786
- scaleAnim.setValue(0);
787
- }
788
- }, [isSelected, scaleAnim]);
789
- const animatedStyle = isSelected ? { transform: [{ scale: scaleAnim }] } : void 0;
790
- return /* @__PURE__ */ React.createElement(
791
- Pressable,
792
- {
793
- style: [
794
- styles2.dayCell,
795
- isToday2 && !isSelected && {
796
- ...styles2.todayCell,
797
- borderColor: accentColor
798
- }
799
- ],
800
- onPress: () => {
801
- if (!isDisabled) {
802
- onSelectDay(date);
803
- }
804
- },
805
- disabled: isDisabled,
806
- accessibilityLabel: date.toLocaleDateString(locale),
807
- accessibilityRole: "button",
808
- accessibilityState: {
809
- selected: isSelected,
810
- disabled: isDisabled
811
- }
812
- },
813
- isSelected ? /* @__PURE__ */ React.createElement(
814
- Animated2.View,
815
- {
816
- style: [
817
- styles2.selectedCellInner,
818
- { backgroundColor: accentColor },
819
- animatedStyle
820
- ]
821
- },
822
- /* @__PURE__ */ React.createElement(Text, { style: [styles2.dayText, { color: accentFg }] }, day)
823
- ) : /* @__PURE__ */ React.createElement(
824
- Text,
825
- {
826
- style: [
827
- styles2.dayText,
828
- { color: theme.colors.foreground },
829
- !isCurrentMonth && styles2.otherMonthText,
830
- isDisabled && styles2.disabledText,
831
- isToday2 && {
832
- color: accentColor,
833
- fontWeight: "600"
834
- }
835
- ]
836
- },
837
- day
838
- )
839
- );
840
- };
841
- var DatePickerDialogCalendar = ({
842
- viewDate,
843
- selectedDate,
844
- locale,
845
- firstDayOfWeek,
846
- themeColor,
847
- minDate,
848
- maxDate,
849
- onSelectDay,
850
- onPreviousMonth,
851
- onNextMonth
852
- }) => {
853
- const theme = useXUITheme();
854
- const swipeHandledRef = useRef2(false);
855
- const weekdays = useMemo2(
856
- () => getWeekdayNames(locale, firstDayOfWeek),
857
- [locale, firstDayOfWeek]
858
- );
859
- const days = useMemo2(
860
- () => getCalendarDays(
861
- viewDate.getFullYear(),
862
- viewDate.getMonth(),
863
- firstDayOfWeek,
864
- minDate,
865
- maxDate
866
- ),
867
- [viewDate, firstDayOfWeek, minDate, maxDate]
868
- );
869
- const weeks = useMemo2(() => {
870
- const result = [];
871
- for (let i = 0; i < days.length; i += 7) {
872
- result.push(days.slice(i, i + 7));
873
- }
874
- return result;
875
- }, [days]);
876
- const onSwipeEnd = (event) => {
877
- const { state, translationX, velocityX } = event.nativeEvent;
878
- if (state !== State.END || swipeHandledRef.current) return;
879
- const shouldSwipe = Math.abs(translationX) > 40 || Math.abs(velocityX) > 600;
880
- if (!shouldSwipe) return;
881
- swipeHandledRef.current = true;
882
- if (translationX < 0) {
883
- onNextMonth();
884
- } else {
885
- onPreviousMonth();
886
- }
887
- };
888
- const onSwipeStateChange = (event) => {
889
- if (event.nativeEvent.state === State.BEGAN) {
890
- swipeHandledRef.current = false;
891
- }
892
- onSwipeEnd(event);
893
- };
894
- return /* @__PURE__ */ React.createElement(
895
- PanGestureHandler,
896
- {
897
- activeOffsetX: [-12, 12],
898
- failOffsetY: [-12, 12],
899
- onHandlerStateChange: onSwipeStateChange
900
- },
901
- /* @__PURE__ */ React.createElement(View, { style: styles2.calendarGrid }, /* @__PURE__ */ React.createElement(View, { style: styles2.weekdayRow }, weekdays.map((day, index) => /* @__PURE__ */ React.createElement(View, { key: index, style: styles2.weekdayCell }, /* @__PURE__ */ React.createElement(
902
- Text,
903
- {
904
- style: [
905
- styles2.weekdayText,
906
- { color: theme.colors.foreground, opacity: 0.6 }
907
- ]
908
- },
909
- day
910
- )))), weeks.map((week, weekIndex) => /* @__PURE__ */ React.createElement(View, { key: weekIndex, style: styles2.dayRow }, week.map((dayInfo, dayIndex) => /* @__PURE__ */ React.createElement(
911
- AnimatedDayCell,
912
- {
913
- key: dayIndex,
914
- isSelected: !!(selectedDate && isSameDay(dayInfo.date, selectedDate)),
915
- isToday: dayInfo.isToday,
916
- isCurrentMonth: dayInfo.isCurrentMonth,
917
- isDisabled: dayInfo.isDisabled,
918
- day: dayInfo.day,
919
- date: dayInfo.date,
920
- locale,
921
- themeColor,
922
- onSelectDay
923
- }
924
- )))))
925
- );
926
- };
927
-
928
- // src/components/dialogs/datepicker-dialog/datepicker-dialog-header.tsx
929
- import React2, { useMemo as useMemo3 } from "react";
930
- import { Pressable as Pressable2, Text as Text2, View as View2 } from "react-native";
931
- import { ChevronDownIcon } from "@xaui/icons/chevron-down";
932
- import { ChevronLeftIcon } from "@xaui/icons/chevron-left";
933
- import { ChevronRightIcon } from "@xaui/icons/chevron-right";
934
- import { CloseIcon } from "@xaui/icons/close";
935
- var DatePickerDialogHeader = ({
936
- viewDate,
937
- selectedDate,
938
- locale,
939
- themeColor,
940
- selectDateLabel,
941
- onClearValue,
942
- onPreviousMonth,
943
- onNextMonth,
944
- onToggleYearPicker
945
- }) => {
946
- const theme = useXUITheme();
947
- const colorScheme = theme.colors[themeColor] ?? theme.colors.primary;
948
- const dateText = useMemo3(() => {
949
- if (!selectedDate) return "---";
950
- return formatDate(selectedDate, locale);
951
- }, [selectedDate, locale]);
952
- const monthYearLabel = useMemo3(() => {
953
- const month = getMonthName(viewDate.getMonth(), locale);
954
- return `${month} ${viewDate.getFullYear()}`;
955
- }, [viewDate, locale]);
956
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(View2, { style: [styles2.header, { backgroundColor: colorScheme.main }] }, /* @__PURE__ */ React2.createElement(Text2, { style: [styles2.headerLabel, { color: colorScheme.onMain }] }, selectDateLabel), /* @__PURE__ */ React2.createElement(View2, { style: styles2.headerDateRow }, /* @__PURE__ */ React2.createElement(Text2, { style: [styles2.headerDate, { color: colorScheme.onMain }] }, dateText), selectedDate ? /* @__PURE__ */ React2.createElement(
957
- Pressable2,
958
- {
959
- onPress: onClearValue,
960
- hitSlop: { top: 8, right: 8, bottom: 8, left: 8 },
961
- accessibilityLabel: "Clear date",
962
- accessibilityRole: "button"
963
- },
964
- /* @__PURE__ */ React2.createElement(CloseIcon, { size: 20, color: colorScheme.onMain })
965
- ) : null)), /* @__PURE__ */ React2.createElement(View2, { style: styles2.navigationRow }, /* @__PURE__ */ React2.createElement(
966
- Pressable2,
967
- {
968
- style: styles2.monthYearButton,
969
- onPress: onToggleYearPicker,
970
- accessibilityLabel: `${monthYearLabel}, tap to change`,
971
- accessibilityRole: "button"
972
- },
973
- /* @__PURE__ */ React2.createElement(Text2, { style: [styles2.monthYearText, { color: theme.colors.foreground }] }, monthYearLabel),
974
- /* @__PURE__ */ React2.createElement(ChevronDownIcon, { size: 18, color: theme.colors.foreground })
975
- ), /* @__PURE__ */ React2.createElement(View2, { style: styles2.navButtons }, /* @__PURE__ */ React2.createElement(
976
- Pressable2,
977
- {
978
- style: styles2.navButton,
979
- onPress: onPreviousMonth,
980
- accessibilityLabel: "Previous month",
981
- accessibilityRole: "button"
982
- },
983
- /* @__PURE__ */ React2.createElement(ChevronLeftIcon, { size: 20, color: theme.colors.foreground })
984
- ), /* @__PURE__ */ React2.createElement(
985
- Pressable2,
986
- {
987
- style: styles2.navButton,
988
- onPress: onNextMonth,
989
- accessibilityLabel: "Next month",
990
- accessibilityRole: "button"
991
- },
992
- /* @__PURE__ */ React2.createElement(ChevronRightIcon, { size: 20, color: theme.colors.foreground })
993
- ))));
994
- };
995
-
996
- // src/components/dialogs/datepicker-dialog/datepicker-dialog-month-picker.tsx
997
- import React3, { useEffect as useEffect3, useMemo as useMemo4, useRef as useRef3 } from "react";
998
- import { Animated as Animated3, Easing as Easing2, Pressable as Pressable3, Text as Text3, View as View3 } from "react-native";
999
- var DatePickerDialogMonthPicker = ({ viewDate, locale, themeColor, onSelectMonth }) => {
1000
- const theme = useXUITheme();
1001
- const colorScheme = theme.colors[themeColor] ?? theme.colors.primary;
1002
- const isDefault = themeColor === "default";
1003
- const accentColor = isDefault ? theme.colors.foreground : colorScheme.main;
1004
- const accentFg = isDefault ? theme.colors.background : colorScheme.onMain;
1005
- const months = useMemo4(() => getMonthNames(locale), [locale]);
1006
- const currentMonth = viewDate.getMonth();
1007
- const groupAnim = useRef3(new Animated3.Value(0)).current;
1008
- useEffect3(() => {
1009
- groupAnim.setValue(0);
1010
- Animated3.timing(groupAnim, {
1011
- toValue: 1,
1012
- duration: 220,
1013
- easing: Easing2.out(Easing2.cubic),
1014
- useNativeDriver: true
1015
- }).start();
1016
- }, [groupAnim]);
1017
- return /* @__PURE__ */ React3.createElement(View3, { style: styles2.monthPickerContainer }, /* @__PURE__ */ React3.createElement(
1018
- Animated3.View,
1019
- {
1020
- style: {
1021
- opacity: groupAnim,
1022
- transform: [
1023
- {
1024
- translateY: groupAnim.interpolate({
1025
- inputRange: [0, 1],
1026
- outputRange: [12, 0]
1027
- })
1028
- }
1029
- ]
1030
- }
1031
- },
1032
- /* @__PURE__ */ React3.createElement(View3, { style: styles2.monthGrid }, months.map((name, index) => {
1033
- const isCurrentMonth = index === currentMonth;
1034
- return /* @__PURE__ */ React3.createElement(
1035
- Pressable3,
1036
- {
1037
- key: index,
1038
- style: [
1039
- styles2.monthCell,
1040
- isCurrentMonth && { backgroundColor: accentColor }
1041
- ],
1042
- onPress: () => onSelectMonth(index),
1043
- accessibilityLabel: name,
1044
- accessibilityRole: "button",
1045
- accessibilityState: { selected: isCurrentMonth }
1046
- },
1047
- /* @__PURE__ */ React3.createElement(
1048
- Text3,
1049
- {
1050
- style: [
1051
- styles2.monthText,
1052
- { color: theme.colors.foreground },
1053
- isCurrentMonth && {
1054
- color: accentFg,
1055
- fontWeight: "600"
1056
- }
1057
- ]
1058
- },
1059
- name
1060
- )
1061
- );
1062
- }))
1063
- ));
1064
- };
1065
-
1066
- // src/components/dialogs/datepicker-dialog/datepicker-dialog-year-picker.tsx
1067
- import React4, { useCallback as useCallback3, useEffect as useEffect4, useMemo as useMemo5, useRef as useRef4 } from "react";
1068
- import { Animated as Animated4, Easing as Easing3, FlatList, Pressable as Pressable4, Text as Text4, View as View4 } from "react-native";
1069
- var ITEM_HEIGHT = 48;
1070
- var NUM_COLUMNS = 4;
1071
- var DatePickerDialogYearPicker = ({ viewDate, themeColor, minDate, maxDate, onSelectYear }) => {
1072
- const listRef = useRef4(null);
1073
- const groupAnim = useRef4(new Animated4.Value(0)).current;
1074
- const theme = useXUITheme();
1075
- const colorScheme = theme.colors[themeColor] ?? theme.colors.primary;
1076
- const isDefault = themeColor === "default";
1077
- const accentColor = isDefault ? theme.colors.foreground : colorScheme.main;
1078
- const accentFg = isDefault ? theme.colors.background : colorScheme.onMain;
1079
- const years = useMemo5(() => getYearRange(minDate, maxDate), [minDate, maxDate]);
1080
- const currentYear = viewDate.getFullYear();
1081
- const initialIndex = useMemo5(() => {
1082
- const index = years.indexOf(currentYear);
1083
- const rowIndex = Math.floor(index / NUM_COLUMNS);
1084
- return Math.max(0, rowIndex);
1085
- }, [years, currentYear]);
1086
- useEffect4(() => {
1087
- groupAnim.setValue(0);
1088
- Animated4.timing(groupAnim, {
1089
- toValue: 1,
1090
- duration: 220,
1091
- easing: Easing3.out(Easing3.cubic),
1092
- useNativeDriver: true
1093
- }).start();
1094
- }, [groupAnim]);
1095
- const getItemLayout = useCallback3(
1096
- (_, index) => ({
1097
- length: ITEM_HEIGHT,
1098
- offset: ITEM_HEIGHT * index,
1099
- index
1100
- }),
1101
- []
1102
- );
1103
- const renderYear = useCallback3(
1104
- ({ item }) => {
1105
- const isCurrentYear = item === currentYear;
1106
- return /* @__PURE__ */ React4.createElement(
1107
- Pressable4,
1108
- {
1109
- style: [
1110
- styles2.yearCell,
1111
- isCurrentYear && { backgroundColor: accentColor }
1112
- ],
1113
- onPress: () => onSelectYear(item),
1114
- accessibilityLabel: `${item}`,
1115
- accessibilityRole: "button",
1116
- accessibilityState: { selected: isCurrentYear }
1117
- },
1118
- /* @__PURE__ */ React4.createElement(
1119
- Text4,
1120
- {
1121
- style: [
1122
- styles2.yearText,
1123
- { color: theme.colors.foreground },
1124
- isCurrentYear && {
1125
- color: accentFg,
1126
- fontWeight: "600"
1127
- }
1128
- ]
1129
- },
1130
- item
1131
- )
1132
- );
1133
- },
1134
- [currentYear, onSelectYear, accentColor, accentFg, theme.colors.foreground]
1135
- );
1136
- return /* @__PURE__ */ React4.createElement(View4, { style: styles2.yearPickerContainer }, /* @__PURE__ */ React4.createElement(
1137
- Animated4.View,
1138
- {
1139
- style: {
1140
- opacity: groupAnim,
1141
- transform: [
1142
- {
1143
- translateY: groupAnim.interpolate({
1144
- inputRange: [0, 1],
1145
- outputRange: [12, 0]
1146
- })
1147
- }
1148
- ]
1149
- }
1150
- },
1151
- /* @__PURE__ */ React4.createElement(
1152
- FlatList,
1153
- {
1154
- ref: listRef,
1155
- data: years,
1156
- renderItem: renderYear,
1157
- keyExtractor: (item) => String(item),
1158
- numColumns: NUM_COLUMNS,
1159
- getItemLayout,
1160
- initialScrollIndex: initialIndex,
1161
- showsVerticalScrollIndicator: false,
1162
- columnWrapperStyle: { justifyContent: "center" }
1163
- }
1164
- )
1165
- ));
1166
- };
1167
-
1168
- // src/components/dialogs/datepicker-dialog/datepicker-dialog.tsx
1169
- var DatePickerDialog = ({
1170
- visible,
1171
- selectedDate,
1172
- locale,
1173
- firstDayOfWeek,
1174
- themeColor = "primary",
1175
- minDate,
1176
- maxDate,
1177
- style,
1178
- todayLabel,
1179
- confirmLabel,
1180
- onDateSelect,
1181
- onClearValue,
1182
- onClose
1183
- }) => {
1184
- const theme = useXUITheme();
1185
- const { width: screenWidth, height: screenHeight } = useWindowDimensions();
1186
- const fadeAnim = useRef5(new Animated5.Value(0)).current;
1187
- const slideAnim = useRef5(new Animated5.Value(0)).current;
1188
- const scaleAnim = useRef5(new Animated5.Value(0)).current;
1189
- const viewFadeAnim = useRef5(new Animated5.Value(1)).current;
1190
- const monthSlideXAnim = useRef5(new Animated5.Value(0)).current;
1191
- const monthFadeAnim = useRef5(new Animated5.Value(1)).current;
1192
- const colorScheme = theme.colors[themeColor] ?? theme.colors.primary;
1193
- const isDefault = themeColor === "default";
1194
- const accentColor = isDefault ? theme.colors.foreground : colorScheme.main;
1195
- const labels = getDatePickerLabels(locale);
1196
- const resolvedTodayLabel = todayLabel ?? labels.today;
1197
- const resolvedConfirmLabel = confirmLabel ?? labels.confirm;
1198
- const {
1199
- viewDate,
1200
- viewMode,
1201
- goToPreviousMonth,
1202
- goToNextMonth,
1203
- goToYear,
1204
- goToMonth,
1205
- goToToday,
1206
- toggleYearPicker,
1207
- syncViewToDate
1208
- } = useDatePickerViewState(selectedDate);
1209
- const onCloseComplete = useCallback4(() => {
1210
- fadeAnim.setValue(0);
1211
- slideAnim.setValue(0);
1212
- scaleAnim.setValue(0);
1213
- viewFadeAnim.setValue(1);
1214
- monthSlideXAnim.setValue(0);
1215
- monthFadeAnim.setValue(1);
1216
- }, [fadeAnim, slideAnim, scaleAnim, viewFadeAnim, monthSlideXAnim, monthFadeAnim]);
1217
- const { shouldRender } = useDatePickerDialogAnimation({
1218
- visible,
1219
- fadeAnim,
1220
- slideAnim,
1221
- scaleAnim,
1222
- onCloseComplete
1223
- });
1224
- const { animate: animateViewTransition } = useViewTransitionAnimation({
1225
- fadeAnim: viewFadeAnim
1226
- });
1227
- const { animate: animateMonthSlide } = useMonthSlideAnimation({
1228
- slideAnim: monthSlideXAnim,
1229
- fadeAnim: monthFadeAnim
1230
- });
1231
- const prevViewModeRef = useRef5(viewMode);
1232
- useEffect5(() => {
1233
- if (prevViewModeRef.current !== viewMode) {
1234
- prevViewModeRef.current = viewMode;
1235
- animateViewTransition();
1236
- }
1237
- }, [viewMode, animateViewTransition]);
1238
- useEffect5(() => {
1239
- if (visible && selectedDate) {
1240
- syncViewToDate(selectedDate);
1241
- }
1242
- }, [visible, selectedDate, syncViewToDate]);
1243
- useEffect5(() => {
1244
- if (!visible) return;
1245
- const sub = BackHandler.addEventListener("hardwareBackPress", () => {
1246
- onClose();
1247
- return true;
1248
- });
1249
- return () => sub.remove();
1250
- }, [visible, onClose]);
1251
- const handlePreviousMonth = useCallback4(() => {
1252
- goToPreviousMonth();
1253
- animateMonthSlide("left");
1254
- }, [goToPreviousMonth, animateMonthSlide]);
1255
- const handleNextMonth = useCallback4(() => {
1256
- goToNextMonth();
1257
- animateMonthSlide("right");
1258
- }, [goToNextMonth, animateMonthSlide]);
1259
- const handleDaySelect = useCallback4(
1260
- (date) => {
1261
- onDateSelect(date);
1262
- },
1263
- [onDateSelect]
1264
- );
1265
- const handleTodayPress = useCallback4(() => {
1266
- const today = /* @__PURE__ */ new Date();
1267
- if (!isDateInRange(today, minDate, maxDate)) return;
1268
- goToToday();
1269
- onDateSelect(today);
1270
- }, [goToToday, onDateSelect, minDate, maxDate]);
1271
- if (!shouldRender) return null;
1272
- const overlayStyle = {
1273
- position: "absolute",
1274
- top: 0,
1275
- left: 0,
1276
- width: screenWidth,
1277
- height: screenHeight
1278
- };
1279
- const containerAnimatedStyle = {
1280
- opacity: fadeAnim,
1281
- transform: [
1282
- {
1283
- scale: scaleAnim.interpolate({
1284
- inputRange: [0, 1],
1285
- outputRange: [0.92, 1]
1286
- })
1287
- },
1288
- {
1289
- translateY: slideAnim.interpolate({
1290
- inputRange: [0, 1],
1291
- outputRange: [40, 0]
1292
- })
1293
- }
1294
- ]
1295
- };
1296
- const viewTransitionStyle = {
1297
- opacity: viewFadeAnim,
1298
- transform: [
1299
- {
1300
- translateY: viewFadeAnim.interpolate({
1301
- inputRange: [0, 1],
1302
- outputRange: [8, 0]
1303
- })
1304
- }
1305
- ]
1306
- };
1307
- const monthSlideStyle = {
1308
- opacity: monthFadeAnim,
1309
- transform: [{ translateX: monthSlideXAnim }]
1310
- };
1311
- const renderContent = () => {
1312
- switch (viewMode) {
1313
- case "year":
1314
- return /* @__PURE__ */ React5.createElement(
1315
- DatePickerDialogYearPicker,
1316
- {
1317
- viewDate,
1318
- themeColor,
1319
- minDate,
1320
- maxDate,
1321
- onSelectYear: goToYear
1322
- }
1323
- );
1324
- case "month":
1325
- return /* @__PURE__ */ React5.createElement(
1326
- DatePickerDialogMonthPicker,
1327
- {
1328
- viewDate,
1329
- locale,
1330
- themeColor,
1331
- onSelectMonth: goToMonth
1332
- }
1333
- );
1334
- case "calendar":
1335
- default:
1336
- return /* @__PURE__ */ React5.createElement(Animated5.View, { style: [viewTransitionStyle, monthSlideStyle] }, /* @__PURE__ */ React5.createElement(
1337
- DatePickerDialogCalendar,
1338
- {
1339
- viewDate,
1340
- selectedDate,
1341
- locale,
1342
- firstDayOfWeek,
1343
- themeColor,
1344
- minDate,
1345
- maxDate,
1346
- onSelectDay: handleDaySelect,
1347
- onPreviousMonth: handlePreviousMonth,
1348
- onNextMonth: handleNextMonth
1349
- }
1350
- ));
1351
- }
1352
- };
1353
- return /* @__PURE__ */ React5.createElement(Portal, null, /* @__PURE__ */ React5.createElement(GestureHandlerRootView, { style: [overlayStyle, style] }, /* @__PURE__ */ React5.createElement(View5, { style: overlayStyle }, /* @__PURE__ */ React5.createElement(Animated5.View, { style: [styles2.backdrop, { opacity: fadeAnim }] }, /* @__PURE__ */ React5.createElement(
1354
- Pressable5,
1355
- {
1356
- style: { flex: 1 },
1357
- onPress: onClose,
1358
- accessibilityLabel: "Close calendar",
1359
- accessibilityRole: "button"
1360
- }
1361
- )), /* @__PURE__ */ React5.createElement(Animated5.View, { style: [styles2.dialogContainer, containerAnimatedStyle] }, /* @__PURE__ */ React5.createElement(
1362
- View5,
1363
- {
1364
- style: [
1365
- styles2.container,
1366
- { backgroundColor: theme.colors.background }
1367
- ]
1368
- },
1369
- /* @__PURE__ */ React5.createElement(
1370
- DatePickerDialogHeader,
1371
- {
1372
- viewDate,
1373
- selectedDate,
1374
- locale,
1375
- themeColor,
1376
- selectDateLabel: labels.selectDate,
1377
- onClearValue,
1378
- onPreviousMonth: handlePreviousMonth,
1379
- onNextMonth: handleNextMonth,
1380
- onToggleYearPicker: toggleYearPicker
1381
- }
1382
- ),
1383
- renderContent(),
1384
- /* @__PURE__ */ React5.createElement(View5, { style: styles2.footer }, /* @__PURE__ */ React5.createElement(
1385
- Pressable5,
1386
- {
1387
- style: styles2.footerButton,
1388
- onPress: handleTodayPress,
1389
- accessibilityLabel: resolvedTodayLabel,
1390
- accessibilityRole: "button"
1391
- },
1392
- /* @__PURE__ */ React5.createElement(Text5, { style: [styles2.footerButtonText, { color: accentColor }] }, resolvedTodayLabel)
1393
- ), /* @__PURE__ */ React5.createElement(
1394
- Pressable5,
1395
- {
1396
- style: styles2.footerButton,
1397
- onPress: onClose,
1398
- accessibilityLabel: resolvedConfirmLabel,
1399
- accessibilityRole: "button"
1400
- },
1401
- /* @__PURE__ */ React5.createElement(Text5, { style: [styles2.footerButtonText, { color: accentColor }] }, resolvedConfirmLabel)
1402
- ))
1403
- )))));
1404
- };
1405
-
1406
- // src/components/datepicker/datepicker-trigger.tsx
1407
- import React6 from "react";
1408
- import { Pressable as Pressable6, Text as Text6, TouchableOpacity, View as View6 } from "react-native";
1409
- import { CalendarIcon } from "@xaui/icons/calendar";
1410
- import { CloseIcon as CloseIcon2 } from "@xaui/icons/close";
1411
- var DatePickerTrigger = ({
1412
- triggerRef,
1413
- isDisabled,
1414
- hasValue,
1415
- displayValue,
1416
- sizeStyles,
1417
- variant,
1418
- radiusStyles,
1419
- variantStyles,
1420
- theme,
1421
- isClearable,
1422
- label,
1423
- labelText,
1424
- isLabelInside,
1425
- calendarIcon,
1426
- style,
1427
- textStyle,
1428
- onPress: handleTriggerPress,
1429
- onClear: handleClear,
1430
- onLayout: handleTriggerLayout
1431
- }) => {
1432
- const renderLabel = isLabelInside && label;
1433
- const horizontalPadding = variant === "light" || variant === "underlined" ? 0 : sizeStyles.paddingHorizontal;
1434
- return /* @__PURE__ */ React6.createElement(
1435
- Pressable6,
1436
- {
1437
- ref: triggerRef,
1438
- onPress: handleTriggerPress,
1439
- onLayout: handleTriggerLayout,
1440
- disabled: isDisabled,
1441
- style: [
1442
- styles.trigger,
1443
- {
1444
- minHeight: sizeStyles.minHeight,
1445
- paddingHorizontal: horizontalPadding,
1446
- paddingVertical: sizeStyles.paddingVertical
1447
- },
1448
- variant === "underlined" ? { borderRadius: 0 } : radiusStyles,
1449
- variantStyles,
1450
- isDisabled && styles.disabled,
1451
- style
1452
- ],
1453
- accessibilityLabel: labelText ?? (typeof label === "string" ? label : void 0),
1454
- accessibilityRole: "button",
1455
- accessibilityState: { disabled: isDisabled }
1456
- },
1457
- /* @__PURE__ */ React6.createElement(View6, { style: styles.triggerContent }, isLabelInside && renderLabel, /* @__PURE__ */ React6.createElement(
1458
- Text6,
1459
- {
1460
- style: [
1461
- styles.triggerText,
1462
- { fontSize: sizeStyles.fontSize, color: theme.colors.foreground },
1463
- !hasValue && { opacity: 0.5 },
1464
- textStyle
1465
- ],
1466
- numberOfLines: 1,
1467
- ellipsizeMode: "tail"
1468
- },
1469
- displayValue
1470
- )),
1471
- isClearable && hasValue ? /* @__PURE__ */ React6.createElement(
1472
- TouchableOpacity,
1473
- {
1474
- onPress: handleClear,
1475
- style: styles.clearButton,
1476
- hitSlop: { top: 8, right: 8, bottom: 8, left: 8 }
1477
- },
1478
- /* @__PURE__ */ React6.createElement(CloseIcon2, { color: theme.colors.foreground, size: 20 })
1479
- ) : calendarIcon ?? /* @__PURE__ */ React6.createElement(CalendarIcon, { color: theme.colors.foreground, size: 20 })
1480
- );
1481
- };
1482
-
1483
- // src/components/datepicker/datepicker.tsx
1484
- var DatePicker = ({
1485
- value,
1486
- defaultValue,
1487
- onChange,
1488
- locale = "en",
1489
- minDate,
1490
- maxDate,
1491
- firstDayOfWeek: firstDayOfWeekProp,
1492
- variant = "colored",
1493
- themeColor = "default",
1494
- size = "md",
1495
- radius = "md",
1496
- label,
1497
- placeholder = "Select a date",
1498
- description,
1499
- errorMessage,
1500
- labelPlacement = "outside",
1501
- fullWidth = false,
1502
- isDisabled = false,
1503
- isInvalid = false,
1504
- isReadOnly = false,
1505
- isClearable = true,
1506
- customAppearance,
1507
- calendarIcon,
1508
- onOpen,
1509
- onClose,
1510
- onOpenChange
1511
- }) => {
1512
- const theme = useXUITheme();
1513
- const { selectedDate, updateDate } = useDatePickerState({
1514
- value,
1515
- defaultValue,
1516
- onChange
1517
- });
1518
- const { isOpen, setOpen } = useDatePickerOpenState({
1519
- isDisabled: isDisabled || isReadOnly,
1520
- onOpenChange,
1521
- onOpen,
1522
- onClose
1523
- });
1524
- const triggerRef = useRef6(null);
1525
- const handleTriggerLayout = useCallback5(() => {
1526
- }, []);
1527
- const firstDayOfWeek = useMemo6(
1528
- () => firstDayOfWeekProp ?? getFirstDayOfWeek(locale),
1529
- [firstDayOfWeekProp, locale]
1530
- );
1531
- const sizeStyles = useDatePickerSizeStyles(size);
1532
- const radiusStyles = useDatePickerRadiusStyles(radius);
1533
- const variantStyles = useDatePickerVariantStyles(themeColor, variant, isInvalid);
1534
- const labelStyle = useDatePickerLabelStyle(
1535
- themeColor,
1536
- isInvalid,
1537
- sizeStyles.labelSize
1538
- );
1539
- const helperColor = useDatePickerHelperColor(isInvalid);
1540
- const displayValue = useMemo6(() => {
1541
- if (!selectedDate) return placeholder;
1542
- return formatDate(selectedDate, locale);
1543
- }, [selectedDate, locale, placeholder]);
1544
- const handleTriggerPress = useCallback5(() => {
1545
- if (!isDisabled && !isReadOnly) {
1546
- setOpen(true);
1547
- }
1548
- }, [isDisabled, isReadOnly, setOpen]);
1549
- const handleClear = useCallback5(() => {
1550
- if (isDisabled || isReadOnly) return;
1551
- updateDate(null);
1552
- }, [isDisabled, isReadOnly, updateDate]);
1553
- const handleDateSelect = useCallback5(
1554
- (date) => {
1555
- updateDate(date);
1556
- },
1557
- [updateDate]
1558
- );
1559
- const handleClose = useCallback5(() => {
1560
- setOpen(false);
1561
- }, [setOpen]);
1562
- const isLabelInside = labelPlacement === "inside";
1563
- const isLabelOutsideLeft = labelPlacement === "outside-left";
1564
- const isLabelOutside = labelPlacement === "outside" || labelPlacement === "outside-top";
1565
- const renderLabel = label ? typeof label === "string" || typeof label === "number" ? /* @__PURE__ */ React7.createElement(Text7, { style: [styles.label, labelStyle] }, label) : /* @__PURE__ */ React7.createElement(View7, null, label) : null;
1566
- const shouldShowHelper = Boolean(description || errorMessage);
1567
- const helperContent = isInvalid && errorMessage ? errorMessage : description;
1568
- const triggerContent = /* @__PURE__ */ React7.createElement(
1569
- DatePickerTrigger,
1570
- {
1571
- triggerRef,
1572
- isDisabled: isDisabled || isReadOnly,
1573
- hasValue: !!selectedDate,
1574
- displayValue,
1575
- sizeStyles,
1576
- variant,
1577
- radiusStyles,
1578
- variantStyles,
1579
- theme,
1580
- isClearable,
1581
- label: renderLabel,
1582
- labelText: typeof label === "string" ? label : void 0,
1583
- isLabelInside,
1584
- calendarIcon,
1585
- style: customAppearance?.trigger,
1586
- textStyle: customAppearance?.text,
1587
- onPress: handleTriggerPress,
1588
- onClear: handleClear,
1589
- onLayout: handleTriggerLayout
1590
- }
1591
- );
1592
- const labelBlock = isLabelOutside || isLabelInside ? renderLabel : null;
1593
- return /* @__PURE__ */ React7.createElement(
1594
- View7,
1595
- {
1596
- style: [
1597
- styles.container,
1598
- fullWidth ? styles.fullWidth : styles.minWidth,
1599
- customAppearance?.container
1600
- ]
1601
- },
1602
- isLabelOutside && labelBlock,
1603
- isLabelOutsideLeft ? /* @__PURE__ */ React7.createElement(View7, { style: styles.outsideLeftRow }, renderLabel, triggerContent) : triggerContent,
1604
- shouldShowHelper && helperContent ? typeof helperContent === "string" || typeof helperContent === "number" ? /* @__PURE__ */ React7.createElement(Text7, { style: [styles.helperText, { color: helperColor }] }, helperContent) : /* @__PURE__ */ React7.createElement(View7, null, helperContent) : null,
1605
- /* @__PURE__ */ React7.createElement(
1606
- DatePickerDialog,
1607
- {
1608
- visible: isOpen,
1609
- selectedDate,
1610
- locale,
1611
- firstDayOfWeek,
1612
- themeColor,
1613
- minDate,
1614
- maxDate,
1615
- style: customAppearance?.calendar,
1616
- onDateSelect: handleDateSelect,
1617
- onClearValue: handleClear,
1618
- onClose: handleClose
1619
- }
1620
- )
1621
- );
1622
- };
1623
- export {
1624
- DatePicker
1625
- };