@idealyst/datepicker 1.2.117 → 1.2.119

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idealyst/datepicker",
3
- "version": "1.2.117",
3
+ "version": "1.2.119",
4
4
  "description": "Cross-platform date and time picker components for React and React Native",
5
5
  "documentation": "https://github.com/IdealystIO/idealyst-framework/tree/main/packages/datepicker#readme",
6
6
  "readme": "README.md",
@@ -36,7 +36,7 @@
36
36
  "publish:npm": "npm publish"
37
37
  },
38
38
  "peerDependencies": {
39
- "@idealyst/theme": "^1.2.117",
39
+ "@idealyst/theme": "^1.2.119",
40
40
  "@mdi/js": ">=7.0.0",
41
41
  "@mdi/react": ">=1.6.0",
42
42
  "react": ">=16.8.0",
@@ -69,7 +69,7 @@
69
69
  }
70
70
  },
71
71
  "devDependencies": {
72
- "@idealyst/theme": "^1.2.117",
72
+ "@idealyst/theme": "^1.2.119",
73
73
  "@mdi/js": "^7.4.47",
74
74
  "@mdi/react": "^1.6.1",
75
75
  "@types/react": "^19.1.0",
@@ -19,12 +19,12 @@ export type DatePickerDynamicProps = {
19
19
  * DatePicker calendar styles with theme reactivity.
20
20
  */
21
21
  export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme: Theme) => ({
22
- // Calendar container - compact
22
+ // Calendar container
23
23
  calendar: (_props: DatePickerDynamicProps) => ({
24
- padding: 8,
24
+ padding: 12,
25
25
  backgroundColor: theme.colors.surface.primary,
26
26
  borderRadius: 6,
27
- width: 220,
27
+ width: 280,
28
28
  variants: {
29
29
  disabled: {
30
30
  true: { opacity: 0.6 },
@@ -38,7 +38,7 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
38
38
  flexDirection: 'row' as const,
39
39
  alignItems: 'center' as const,
40
40
  justifyContent: 'space-between' as const,
41
- marginBottom: 4,
41
+ marginBottom: 8,
42
42
  paddingHorizontal: 2,
43
43
  _web: {
44
44
  display: 'flex',
@@ -57,15 +57,15 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
57
57
  // Weekday header row
58
58
  weekdayRow: (_props: DatePickerDynamicProps) => ({
59
59
  flexDirection: 'row' as const,
60
- marginBottom: 2,
60
+ marginBottom: 4,
61
61
  _web: {
62
62
  display: 'flex',
63
63
  },
64
64
  }),
65
65
 
66
66
  weekdayCell: (_props: DatePickerDynamicProps) => ({
67
- width: 28,
68
- height: 20,
67
+ width: 36,
68
+ height: 24,
69
69
  alignItems: 'center' as const,
70
70
  justifyContent: 'center' as const,
71
71
  _web: {
@@ -104,12 +104,13 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
104
104
  },
105
105
  }),
106
106
 
107
- // Individual day cell - compact
107
+ // Individual day cell - contains button + indicator row
108
108
  dayCell: (_props: DatePickerDynamicProps) => ({
109
- width: 28,
110
- height: 28,
109
+ width: 36,
110
+ height: 42,
111
111
  alignItems: 'center' as const,
112
- justifyContent: 'center' as const,
112
+ justifyContent: 'flex-start' as const,
113
+ paddingTop: 2,
113
114
  _web: {
114
115
  display: 'flex',
115
116
  },
@@ -117,8 +118,8 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
117
118
 
118
119
  // Navigation button
119
120
  navButton: (_props: DatePickerDynamicProps) => ({
120
- width: 28,
121
- height: 28,
121
+ width: 32,
122
+ height: 32,
122
123
  alignItems: 'center' as const,
123
124
  justifyContent: 'center' as const,
124
125
  borderRadius: 4,
@@ -158,18 +159,18 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
158
159
  }),
159
160
 
160
161
  titleText: (_props: DatePickerDynamicProps) => ({
161
- fontSize: 14,
162
+ fontSize: 15,
162
163
  fontWeight: '600' as const,
163
164
  color: theme.colors.text.primary,
164
165
  }),
165
166
 
166
- // Day button - fills entire cell for better click handling
167
+ // Day button - fills cell for better click handling
167
168
  dayButton: (_props: DatePickerDynamicProps) => ({
168
- width: 28,
169
- height: 28,
169
+ width: 32,
170
+ height: 32,
170
171
  alignItems: 'center' as const,
171
172
  justifyContent: 'center' as const,
172
- borderRadius: 14,
173
+ borderRadius: 16,
173
174
  backgroundColor: 'transparent',
174
175
  borderWidth: 0,
175
176
  _web: {
@@ -188,7 +189,7 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
188
189
  }),
189
190
 
190
191
  dayText: (_props: DatePickerDynamicProps) => ({
191
- fontSize: 12,
192
+ fontSize: 14,
192
193
  color: theme.colors.text.primary,
193
194
  _web: {
194
195
  pointerEvents: 'none',
@@ -196,7 +197,7 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
196
197
  }),
197
198
 
198
199
  weekdayText: (_props: DatePickerDynamicProps) => ({
199
- fontSize: 11,
200
+ fontSize: 12,
200
201
  color: theme.colors.text.secondary,
201
202
  }),
202
203
 
@@ -232,7 +233,7 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
232
233
  }),
233
234
 
234
235
  selectorItemText: (_props: DatePickerDynamicProps) => ({
235
- fontSize: 12,
236
+ fontSize: 13,
236
237
  color: theme.colors.text.primary,
237
238
  _web: {
238
239
  pointerEvents: 'none',
@@ -249,7 +250,7 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
249
250
  // Selected day styling
250
251
  selectedDay: (_props: DatePickerDynamicProps) => ({
251
252
  backgroundColor: theme.intents.primary.primary,
252
- borderRadius: 6,
253
+ borderRadius: 16,
253
254
  _web: {
254
255
  background: theme.intents.primary.primary,
255
256
  },
@@ -265,12 +266,31 @@ export const datePickerCalendarStyles = defineStyle('DatePickerCalendar', (theme
265
266
  // Today styling - subtle background highlight
266
267
  todayDay: (_props: DatePickerDynamicProps) => ({
267
268
  backgroundColor: theme.intents.primary.light,
268
- borderRadius: 6,
269
+ borderRadius: 16,
269
270
  _web: {
270
271
  background: theme.intents.primary.light,
271
272
  },
272
273
  }),
273
274
 
275
+ // Indicator row below the day number
276
+ indicatorRow: (_props: DatePickerDynamicProps) => ({
277
+ flexDirection: 'row' as const,
278
+ alignItems: 'center' as const,
279
+ justifyContent: 'center' as const,
280
+ height: 6,
281
+ gap: 2,
282
+ _web: {
283
+ display: 'flex',
284
+ },
285
+ }),
286
+
287
+ // Individual indicator dot
288
+ indicator: (_props: DatePickerDynamicProps) => ({
289
+ width: 4,
290
+ height: 4,
291
+ borderRadius: 2,
292
+ }),
293
+
274
294
  // Icon color helper
275
295
  iconColor: (_props: DatePickerDynamicProps) => ({
276
296
  color: theme.colors.text.primary,
package/src/types.ts CHANGED
@@ -1,12 +1,19 @@
1
1
  import type { ViewStyle } from 'react-native';
2
2
  import type { Size } from '@idealyst/theme';
3
3
 
4
+ export interface DayIndicator {
5
+ color: string;
6
+ key?: string;
7
+ }
8
+
4
9
  export interface DatePickerProps {
5
10
  value?: Date;
6
11
  onChange: (date: Date) => void;
7
12
  minDate?: Date;
8
13
  maxDate?: Date;
9
14
  disabled?: boolean;
15
+ /** Indicators to render below specific dates. Key format: "YYYY-MM-DD" */
16
+ indicators?: Record<string, DayIndicator[]>;
10
17
  style?: ViewStyle;
11
18
  }
12
19