@dreamstack-us/kaal 0.0.1 → 0.0.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.
Files changed (136) hide show
  1. package/README.md +165 -0
  2. package/lib/module/components/CalendarGrid/CalendarGrid.js +125 -29
  3. package/lib/module/components/CalendarGrid/CalendarGrid.js.map +1 -1
  4. package/lib/module/components/CalendarGrid/CalendarGrid.styles.js +22 -17
  5. package/lib/module/components/CalendarGrid/CalendarGrid.styles.js.map +1 -1
  6. package/lib/module/components/CalendarGrid/CalendarGrid.web.js +265 -0
  7. package/lib/module/components/CalendarGrid/CalendarGrid.web.js.map +1 -0
  8. package/lib/module/components/CalendarGrid/DayCell.js +77 -53
  9. package/lib/module/components/CalendarGrid/DayCell.js.map +1 -1
  10. package/lib/module/components/CalendarGrid/DayCell.web.js +124 -0
  11. package/lib/module/components/CalendarGrid/DayCell.web.js.map +1 -0
  12. package/lib/module/components/CalendarGrid/index.js +1 -1
  13. package/lib/module/components/CalendarGrid/index.js.map +1 -1
  14. package/lib/module/components/DatePicker/DatePicker.android.js +53 -21
  15. package/lib/module/components/DatePicker/DatePicker.android.js.map +1 -1
  16. package/lib/module/components/DatePicker/DatePicker.ios.js +55 -23
  17. package/lib/module/components/DatePicker/DatePicker.ios.js.map +1 -1
  18. package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
  19. package/lib/module/components/DatePicker/DatePicker.styles.js +19 -20
  20. package/lib/module/components/DatePicker/DatePicker.styles.js.map +1 -1
  21. package/lib/module/components/DatePicker/DatePicker.web.js +59 -21
  22. package/lib/module/components/DatePicker/DatePicker.web.js.map +1 -1
  23. package/lib/module/components/TimePicker/ClockFace.js +27 -7
  24. package/lib/module/components/TimePicker/ClockFace.js.map +1 -1
  25. package/lib/module/components/TimePicker/ClockFace.web.js +253 -0
  26. package/lib/module/components/TimePicker/ClockFace.web.js.map +1 -0
  27. package/lib/module/components/TimePicker/MaterialTimePicker.js +68 -16
  28. package/lib/module/components/TimePicker/MaterialTimePicker.js.map +1 -1
  29. package/lib/module/components/TimePicker/MaterialTimePicker.web.js +231 -0
  30. package/lib/module/components/TimePicker/MaterialTimePicker.web.js.map +1 -0
  31. package/lib/module/components/TimePicker/TimePicker.android.js +13 -6
  32. package/lib/module/components/TimePicker/TimePicker.android.js.map +1 -1
  33. package/lib/module/components/TimePicker/TimePicker.ios.js +14 -7
  34. package/lib/module/components/TimePicker/TimePicker.ios.js.map +1 -1
  35. package/lib/module/components/TimePicker/TimePicker.styles.js +53 -45
  36. package/lib/module/components/TimePicker/TimePicker.styles.js.map +1 -1
  37. package/lib/module/components/TimePicker/TimePicker.web.js +24 -12
  38. package/lib/module/components/TimePicker/TimePicker.web.js.map +1 -1
  39. package/lib/module/components/TimePicker/TimeWheelPicker.js +45 -10
  40. package/lib/module/components/TimePicker/TimeWheelPicker.js.map +1 -1
  41. package/lib/module/components/TimePicker/TimeWheelPicker.web.js +339 -0
  42. package/lib/module/components/TimePicker/TimeWheelPicker.web.js.map +1 -0
  43. package/lib/module/components/TimePicker/index.js +3 -3
  44. package/lib/module/components/TimePicker/index.js.map +1 -1
  45. package/lib/module/components/WheelPicker/WheelPicker.js +21 -2
  46. package/lib/module/components/WheelPicker/WheelPicker.js.map +1 -1
  47. package/lib/module/components/WheelPicker/WheelPicker.styles.js +13 -8
  48. package/lib/module/components/WheelPicker/WheelPicker.styles.js.map +1 -1
  49. package/lib/module/components/WheelPicker/WheelPicker.web.js +146 -57
  50. package/lib/module/components/WheelPicker/WheelPicker.web.js.map +1 -1
  51. package/lib/module/context/ThemeOverrideContext.js +34 -0
  52. package/lib/module/context/ThemeOverrideContext.js.map +1 -0
  53. package/lib/module/index.js +3 -0
  54. package/lib/module/index.js.map +1 -1
  55. package/lib/module/utils/validation.js +74 -34
  56. package/lib/module/utils/validation.js.map +1 -1
  57. package/lib/typescript/components/CalendarGrid/CalendarGrid.d.ts +24 -3
  58. package/lib/typescript/components/CalendarGrid/CalendarGrid.d.ts.map +1 -1
  59. package/lib/typescript/components/CalendarGrid/CalendarGrid.styles.d.ts +12 -10
  60. package/lib/typescript/components/CalendarGrid/CalendarGrid.styles.d.ts.map +1 -1
  61. package/lib/typescript/components/CalendarGrid/CalendarGrid.web.d.ts +33 -0
  62. package/lib/typescript/components/CalendarGrid/CalendarGrid.web.d.ts.map +1 -0
  63. package/lib/typescript/components/CalendarGrid/DayCell.d.ts +3 -0
  64. package/lib/typescript/components/CalendarGrid/DayCell.d.ts.map +1 -1
  65. package/lib/typescript/components/CalendarGrid/DayCell.web.d.ts +15 -0
  66. package/lib/typescript/components/CalendarGrid/DayCell.web.d.ts.map +1 -0
  67. package/lib/typescript/components/DatePicker/DatePicker.android.d.ts.map +1 -1
  68. package/lib/typescript/components/DatePicker/DatePicker.d.ts +27 -4
  69. package/lib/typescript/components/DatePicker/DatePicker.d.ts.map +1 -1
  70. package/lib/typescript/components/DatePicker/DatePicker.ios.d.ts.map +1 -1
  71. package/lib/typescript/components/DatePicker/DatePicker.styles.d.ts +12 -13
  72. package/lib/typescript/components/DatePicker/DatePicker.styles.d.ts.map +1 -1
  73. package/lib/typescript/components/DatePicker/DatePicker.web.d.ts.map +1 -1
  74. package/lib/typescript/components/TimePicker/ClockFace.d.ts.map +1 -1
  75. package/lib/typescript/components/TimePicker/ClockFace.web.d.ts +12 -0
  76. package/lib/typescript/components/TimePicker/ClockFace.web.d.ts.map +1 -0
  77. package/lib/typescript/components/TimePicker/MaterialTimePicker.d.ts.map +1 -1
  78. package/lib/typescript/components/TimePicker/MaterialTimePicker.web.d.ts +12 -0
  79. package/lib/typescript/components/TimePicker/MaterialTimePicker.web.d.ts.map +1 -0
  80. package/lib/typescript/components/TimePicker/TimePicker.android.d.ts.map +1 -1
  81. package/lib/typescript/components/TimePicker/TimePicker.ios.d.ts.map +1 -1
  82. package/lib/typescript/components/TimePicker/TimePicker.styles.d.ts +29 -25
  83. package/lib/typescript/components/TimePicker/TimePicker.styles.d.ts.map +1 -1
  84. package/lib/typescript/components/TimePicker/TimePicker.web.d.ts.map +1 -1
  85. package/lib/typescript/components/TimePicker/TimeWheelPicker.d.ts.map +1 -1
  86. package/lib/typescript/components/TimePicker/TimeWheelPicker.web.d.ts +11 -0
  87. package/lib/typescript/components/TimePicker/TimeWheelPicker.web.d.ts.map +1 -0
  88. package/lib/typescript/components/WheelPicker/WheelPicker.d.ts +14 -1
  89. package/lib/typescript/components/WheelPicker/WheelPicker.d.ts.map +1 -1
  90. package/lib/typescript/components/WheelPicker/WheelPicker.styles.d.ts +9 -7
  91. package/lib/typescript/components/WheelPicker/WheelPicker.styles.d.ts.map +1 -1
  92. package/lib/typescript/components/WheelPicker/WheelPicker.web.d.ts.map +1 -1
  93. package/lib/typescript/context/ThemeOverrideContext.d.ts +23 -0
  94. package/lib/typescript/context/ThemeOverrideContext.d.ts.map +1 -0
  95. package/lib/typescript/index.d.ts +4 -2
  96. package/lib/typescript/index.d.ts.map +1 -1
  97. package/lib/typescript/types/datepicker.d.ts +78 -3
  98. package/lib/typescript/types/datepicker.d.ts.map +1 -1
  99. package/lib/typescript/types/timepicker.d.ts +62 -0
  100. package/lib/typescript/types/timepicker.d.ts.map +1 -1
  101. package/lib/typescript/utils/validation.d.ts +47 -27
  102. package/lib/typescript/utils/validation.d.ts.map +1 -1
  103. package/package.json +8 -8
  104. package/src/components/CalendarGrid/CalendarGrid.styles.ts +21 -17
  105. package/src/components/CalendarGrid/CalendarGrid.tsx +265 -85
  106. package/src/components/CalendarGrid/CalendarGrid.web.tsx +396 -0
  107. package/src/components/CalendarGrid/DayCell.tsx +122 -61
  108. package/src/components/CalendarGrid/DayCell.web.tsx +171 -0
  109. package/src/components/DatePicker/DatePicker.android.tsx +48 -24
  110. package/src/components/DatePicker/DatePicker.ios.tsx +51 -27
  111. package/src/components/DatePicker/DatePicker.styles.ts +18 -22
  112. package/src/components/DatePicker/DatePicker.tsx +35 -4
  113. package/src/components/DatePicker/DatePicker.web.tsx +55 -23
  114. package/src/components/TimePicker/ClockFace.tsx +34 -8
  115. package/src/components/TimePicker/ClockFace.web.tsx +303 -0
  116. package/src/components/TimePicker/MaterialTimePicker.tsx +144 -13
  117. package/src/components/TimePicker/MaterialTimePicker.web.tsx +271 -0
  118. package/src/components/TimePicker/TimePicker.android.tsx +9 -1
  119. package/src/components/TimePicker/TimePicker.ios.tsx +10 -6
  120. package/src/components/TimePicker/TimePicker.styles.ts +52 -45
  121. package/src/components/TimePicker/TimePicker.web.tsx +17 -7
  122. package/src/components/TimePicker/TimeWheelPicker.tsx +60 -6
  123. package/src/components/TimePicker/TimeWheelPicker.web.tsx +401 -0
  124. package/src/components/WheelPicker/WheelPicker.styles.ts +12 -8
  125. package/src/components/WheelPicker/WheelPicker.tsx +24 -2
  126. package/src/components/WheelPicker/WheelPicker.web.tsx +153 -57
  127. package/src/context/ThemeOverrideContext.tsx +38 -0
  128. package/src/index.ts +13 -0
  129. package/src/types/datepicker.ts +87 -3
  130. package/src/types/timepicker.ts +74 -0
  131. package/src/utils/validation.ts +111 -55
  132. package/lib/module/unistyles.js +0 -9
  133. package/lib/module/unistyles.js.map +0 -1
  134. package/lib/typescript/unistyles.d.ts +0 -3
  135. package/lib/typescript/unistyles.d.ts.map +0 -1
  136. package/src/unistyles.ts +0 -6
@@ -1,9 +1,49 @@
1
1
  export type DatePickerMode = 'date' | 'time' | 'datetime';
2
2
  export type DatePickerTheme = 'native' | 'ios' | 'android' | 'custom';
3
3
  export type DatePickerVariant = 'wheel' | 'calendar' | 'compact';
4
- export interface DatePickerProps {
5
- value: Date;
6
- onChange: (date: Date) => void;
4
+ export type DatePickerSelectionMode = 'single' | 'range';
5
+ export interface DateRange {
6
+ startDate: Date;
7
+ endDate: Date | null;
8
+ }
9
+ /**
10
+ * Theme overrides for DatePicker components.
11
+ * These allow customizing colors without matching Kaal's internal theme structure.
12
+ */
13
+ export interface DatePickerThemeOverrides {
14
+ /** Background color of selected date cell */
15
+ cellSelectedColor?: string;
16
+ /** Background color of today's date cell */
17
+ cellTodayColor?: string;
18
+ /** Default text color for dates */
19
+ textColor?: string;
20
+ /** Text color for selected date */
21
+ textSelectedColor?: string;
22
+ /** Text color for disabled dates */
23
+ textDisabledColor?: string;
24
+ /** Text color for weekend dates */
25
+ textWeekendColor?: string;
26
+ /** Primary accent color (navigation arrows, today border) */
27
+ primaryColor?: string;
28
+ /** Header background color */
29
+ headerBackground?: string;
30
+ /** Container background color */
31
+ backgroundColor?: string;
32
+ /** Border radius for calendar container */
33
+ borderRadius?: number;
34
+ /** Border radius for date cells */
35
+ cellBorderRadius?: number;
36
+ /** Padding for calendar container */
37
+ padding?: number;
38
+ /** Background color for dates in range (between start and end) */
39
+ cellInRangeColor?: string;
40
+ /** Text color for dates in range */
41
+ textInRangeColor?: string;
42
+ }
43
+ /**
44
+ * Base props shared between single and range selection modes
45
+ */
46
+ interface DatePickerBaseProps {
7
47
  mode?: DatePickerMode;
8
48
  theme?: DatePickerTheme;
9
49
  variant?: DatePickerVariant;
@@ -11,5 +51,40 @@ export interface DatePickerProps {
11
51
  maxDate?: Date;
12
52
  disabledDates?: Date[];
13
53
  locale?: string;
54
+ /**
55
+ * First day of the week: 0 = Sunday, 1 = Monday
56
+ * @default 0 (Sunday)
57
+ *
58
+ * TODO: This is a temporary solution. In the future, we need to add full
59
+ * locale support to handle different calendar formats, layouts, and
60
+ * localized day/month names across different regions.
61
+ */
62
+ weekStartsOn?: 0 | 1;
63
+ /** Custom theme overrides for styling without matching Kaal's theme structure */
64
+ themeOverrides?: DatePickerThemeOverrides;
65
+ }
66
+ /**
67
+ * Props for single date selection mode (default)
68
+ */
69
+ interface DatePickerSingleProps extends DatePickerBaseProps {
70
+ selectionMode?: 'single';
71
+ value: Date;
72
+ onChange: (date: Date) => void;
73
+ startDate?: never;
74
+ endDate?: never;
75
+ onRangeChange?: never;
76
+ }
77
+ /**
78
+ * Props for range selection mode
79
+ */
80
+ interface DatePickerRangeProps extends DatePickerBaseProps {
81
+ selectionMode: 'range';
82
+ startDate: Date | null;
83
+ endDate: Date | null;
84
+ onRangeChange: (range: DateRange) => void;
85
+ value?: never;
86
+ onChange?: never;
14
87
  }
88
+ export type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
89
+ export {};
15
90
  //# sourceMappingURL=datepicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../src/types/datepicker.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,aAAa,CAAC,EAAE,IAAI,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
1
+ {"version":3,"file":"datepicker.d.ts","sourceRoot":"","sources":["../../../src/types/datepicker.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1D,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEtE,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;AAEjE,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAA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C,CAAC;IACrB,iFAAiF;IACjF,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C;AAED;;GAEG;AACH,UAAU,qBAAsB,SAAQ,mBAAmB;IACzD,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAE/B,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB;AAED;;GAEG;AACH,UAAU,oBAAqB,SAAQ,mBAAmB;IACxD,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;IAE1C,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,oBAAoB,CAAC"}
@@ -15,6 +15,66 @@ export type TimePickerTheme = 'native' | 'ios' | 'android';
15
15
  * Minute interval options for time selection
16
16
  */
17
17
  export type MinuteInterval = 1 | 5 | 10 | 15 | 30;
18
+ /**
19
+ * Theme overrides for TimePicker components.
20
+ * These allow customizing colors without matching Kaal's internal theme structure.
21
+ */
22
+ export interface TimePickerThemeOverrides {
23
+ /** Background color of the clock face */
24
+ clockBackground?: string;
25
+ /** Color of the clock hand */
26
+ clockHandColor?: string;
27
+ /** Color of clock numbers */
28
+ clockTextColor?: string;
29
+ /** Color of selected clock number */
30
+ clockTextSelectedColor?: string;
31
+ /** Color of the center dot */
32
+ clockCenterColor?: string;
33
+ /** Color of the selection dot on clock edge */
34
+ clockSelectionColor?: string;
35
+ /** Background color of period buttons */
36
+ periodBackground?: string;
37
+ /** Background color of active period button */
38
+ periodActiveBackground?: string;
39
+ /** Border color of period buttons */
40
+ periodBorderColor?: string;
41
+ /** Text color of period buttons */
42
+ periodTextColor?: string;
43
+ /** Text color of active period button */
44
+ periodTextActiveColor?: string;
45
+ /** Background color of time fields */
46
+ timeFieldBackground?: string;
47
+ /** Background color of active time field */
48
+ timeFieldActiveBackground?: string;
49
+ /** Text color of time fields */
50
+ textColor?: string;
51
+ /** Text color of active time field */
52
+ textActiveColor?: string;
53
+ /** Color of the colon separator */
54
+ separatorColor?: string;
55
+ /** Background color of wheel picker */
56
+ wheelContainerBackground?: string;
57
+ /** Color of wheel selection highlight */
58
+ wheelSelectionHighlight?: string;
59
+ /** Color of wheel separator */
60
+ wheelSeparatorColor?: string;
61
+ /** Text color in wheel */
62
+ wheelTextColor?: string;
63
+ /** Text color of selected wheel item */
64
+ wheelTextSelectedColor?: string;
65
+ /** Container background color */
66
+ containerBackground?: string;
67
+ /** Header text color */
68
+ headerColor?: string;
69
+ /** Action button text color */
70
+ actionButtonColor?: string;
71
+ /** Primary accent color */
72
+ primaryColor?: string;
73
+ /** Border radius for container */
74
+ borderRadius?: number;
75
+ /** Generic background color (fallback for all container backgrounds) */
76
+ backgroundColor?: string;
77
+ }
18
78
  /**
19
79
  * Props for the TimePicker component
20
80
  */
@@ -33,6 +93,8 @@ export interface TimePickerProps {
33
93
  minTime?: TimeValue;
34
94
  /** Maximum selectable time */
35
95
  maxTime?: TimeValue;
96
+ /** Custom theme overrides for styling without matching Kaal's theme structure */
97
+ themeOverrides?: TimePickerThemeOverrides;
36
98
  }
37
99
  /**
38
100
  * Period indicator for 12-hour format
@@ -1 +1 @@
1
- {"version":3,"file":"timepicker.d.ts","sourceRoot":"","sources":["../../../src/types/timepicker.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,qCAAqC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG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ACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAG3B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,yBAAyB;IACzB,KAAK,EAAE,SAAS,CAAC;IACjB,iCAAiC;IACjC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,qDAAqD;IACrD,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,oCAAoC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,iFAAiF;IACjF,cAAc,CAAC,EAAE,wBAAwB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,eAAe;IACf,MAAM,EAAE,UAAU,CAAC;CACpB"}
@@ -1,40 +1,60 @@
1
- import * as v from 'valibot';
2
1
  /**
3
- * Validates an ISO 8601 date string (YYYY-MM-DD)
2
+ * Simple validation utilities for date/time pickers
3
+ * No external dependencies - just inline checks
4
4
  */
5
- export declare const isoDateSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>;
6
5
  /**
7
- * Validates an ISO 8601 datetime string with timezone offset
6
+ * Validates an ISO 8601 date string (YYYY-MM-DD)
8
7
  */
9
- export declare const isoDateTimeSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
8
+ export declare function isValidISODate(value: string): boolean;
10
9
  /**
11
- * Validates a date range where start <= end
10
+ * Validates an ISO 8601 datetime string
12
11
  */
13
- export declare const dateRangeSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
14
- readonly start: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>;
15
- readonly end: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>;
16
- }, undefined>, v.CheckAction<{
17
- start: string;
18
- end: string;
19
- }, "Start date must be before or equal to end date">]>;
12
+ export declare function isValidISODateTime(value: string): boolean;
20
13
  /**
21
- * Validates date picker configuration
14
+ * Validates a time value (24-hour format)
22
15
  */
23
- export declare const datePickerValueSchema: v.ObjectSchema<{
24
- readonly selectedDate: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>;
25
- readonly minDate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>, undefined>;
26
- readonly maxDate: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>, undefined>;
27
- readonly disabledDates: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.CheckAction<string, "Invalid ISO 8601 date format">]>, undefined>, undefined>;
28
- }, undefined>;
16
+ export declare function isValidTime(hours: number, minutes: number): boolean;
29
17
  /**
30
- * Parses an ISO date string to a Date object
31
- * @deprecated Use parseISODate from date utils instead. Kept for backward compatibility.
18
+ * Validates a date range where start <= end
32
19
  */
33
- export declare const dateSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.TransformAction<string, Date>]>;
20
+ export declare function isValidDateRange(start: string, end: string): boolean;
34
21
  /**
35
- * @deprecated Alias for dateSchema for backward compatibility
22
+ * Parses an ISO date string to a Date object
23
+ * Returns null if invalid
36
24
  */
37
- export declare const temporalDateSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, "Must be in YYYY-MM-DD format">, v.TransformAction<string, Date>]>;
38
- export type DatePickerValue = v.InferOutput<typeof datePickerValueSchema>;
39
- export type DateRange = v.InferOutput<typeof dateRangeSchema>;
25
+ export declare function parseISODateSafe(value: string): Date | null;
26
+ export interface DatePickerValue {
27
+ selectedDate: string;
28
+ minDate?: string;
29
+ maxDate?: string;
30
+ disabledDates?: string[];
31
+ }
32
+ export interface DateRange {
33
+ start: string;
34
+ end: string;
35
+ }
36
+ /** @deprecated Use isValidISODate() instead */
37
+ export declare const isoDateSchema: {
38
+ parse: (value: string) => string;
39
+ };
40
+ /** @deprecated Use isValidISODateTime() instead */
41
+ export declare const isoDateTimeSchema: {
42
+ parse: (value: string) => string;
43
+ };
44
+ /** @deprecated Use isValidDateRange() instead */
45
+ export declare const dateRangeSchema: {
46
+ parse: (value: DateRange) => DateRange;
47
+ };
48
+ /** @deprecated Use DatePickerValue type instead */
49
+ export declare const datePickerValueSchema: {
50
+ parse: (value: DatePickerValue) => DatePickerValue;
51
+ };
52
+ /** @deprecated Use parseISODateSafe() instead */
53
+ export declare const dateSchema: {
54
+ parse: (value: string) => Date;
55
+ };
56
+ /** @deprecated Alias for dateSchema */
57
+ export declare const temporalDateSchema: {
58
+ parse: (value: string) => Date;
59
+ };
40
60
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAW7B;;GAEG;AACH,eAAO,MAAM,aAAa,sKAYzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,iGAAuC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;sDAQ3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;aAKhC,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU,gJAOtB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,gJAAa,CAAC;AAE7C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAerD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAIzD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CASnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAGpE;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAQ3D;AAGD,MAAM,WAAW,eAAe;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAKD,+CAA+C;AAC/C,eAAO,MAAM,aAAa;mBACT,MAAM;CAItB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,iBAAiB;mBACb,MAAM;CAItB,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,eAAe;mBACX,SAAS;CAKzB,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,qBAAqB;mBACjB,eAAe;CAC/B,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,UAAU;mBACN,MAAM;CAKtB,CAAC;AAEF,uCAAuC;AACvC,eAAO,MAAM,kBAAkB;mBARd,MAAM;CAQqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamstack-us/kaal",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "High-performance React Native DatePicker with Unistyles v3",
5
5
  "type": "module",
6
6
  "main": "./lib/module/index.js",
@@ -29,9 +29,7 @@
29
29
  "clean": "rm -rf lib",
30
30
  "size": "size-limit"
31
31
  },
32
- "dependencies": {
33
- "valibot": "^1.0.0"
34
- },
32
+ "dependencies": {},
35
33
  "peerDependencies": {
36
34
  "react": ">=18.2.0",
37
35
  "react-native": ">=0.78.0",
@@ -39,15 +37,18 @@
39
37
  "react-native-nitro-modules": "0.31.4",
40
38
  "react-native-reanimated": ">=3.17.0",
41
39
  "react-native-gesture-handler": ">=2.20.0",
42
- "react-native-svg": ">=13.0.0"
40
+ "react-native-svg": ">=13.0.0",
41
+ "@dreamstack-us/kaal-themes": ">=1.0.0"
43
42
  },
44
43
  "peerDependenciesMeta": {
45
44
  "@expo/ui": {
46
45
  "optional": true
46
+ },
47
+ "@dreamstack-us/kaal-themes": {
48
+ "optional": true
47
49
  }
48
50
  },
49
51
  "devDependencies": {
50
- "@dreamstack-us/kaal-themes": "workspace:*",
51
52
  "@types/react": "^18.3.0",
52
53
  "react": "18.3.1",
53
54
  "react-native": "0.78.0",
@@ -57,8 +58,7 @@
57
58
  "react-native-reanimated": "^3.17.0",
58
59
  "react-native-svg": "^15.15.1",
59
60
  "react-native-unistyles": "^3.0.0",
60
- "typescript": "^5.7.0",
61
- "typescript-config": "workspace:*"
61
+ "typescript": "^5.7.0"
62
62
  },
63
63
  "react-native-builder-bob": {
64
64
  "source": "src",
@@ -1,44 +1,48 @@
1
- import { StyleSheet } from 'react-native-unistyles';
1
+ import { StyleSheet } from 'react-native';
2
2
 
3
- export const styles = StyleSheet.create((theme) => ({
3
+ /**
4
+ * Default styles for CalendarGrid using plain React Native StyleSheet.
5
+ * Colors use dark theme defaults - consumers override via themeOverrides prop.
6
+ */
7
+ export const styles = StyleSheet.create({
4
8
  container: {
5
- backgroundColor: theme.colors.background.default,
6
- borderRadius: theme.radii.card,
7
- padding: theme.spacing(4),
9
+ backgroundColor: '#1E1E1E',
10
+ borderRadius: 16,
11
+ padding: 16,
8
12
  },
9
13
  header: {
10
14
  flexDirection: 'row',
11
15
  justifyContent: 'space-between',
12
16
  alignItems: 'center',
13
- marginBottom: theme.spacing(4),
14
- paddingHorizontal: theme.spacing(2),
17
+ marginBottom: 16,
18
+ paddingHorizontal: 8,
15
19
  },
16
20
  navButton: {
17
21
  width: 40,
18
22
  height: 40,
19
23
  justifyContent: 'center',
20
24
  alignItems: 'center',
21
- borderRadius: theme.radii.button,
25
+ borderRadius: 8,
22
26
  },
23
27
  navText: {
24
28
  fontSize: 24,
25
- color: theme.colors.primary.default,
29
+ color: '#4DA6FF',
26
30
  fontWeight: '600',
27
31
  },
28
32
  monthTitle: {
29
- fontSize: theme.typography.monthHeader.fontSize,
30
- fontWeight: theme.typography.monthHeader.fontWeight,
31
- color: theme.colors.foreground.default,
33
+ fontSize: 17,
34
+ fontWeight: '600',
35
+ color: '#FFFFFF',
32
36
  },
33
37
  weekDays: {
34
38
  flexDirection: 'row',
35
- marginBottom: theme.spacing(2),
39
+ marginBottom: 8,
36
40
  },
37
41
  weekDayText: {
38
42
  flex: 1,
39
43
  textAlign: 'center',
40
- fontSize: theme.typography.dayHeader.fontSize,
41
- fontWeight: theme.typography.dayHeader.fontWeight,
42
- color: theme.colors.foreground.muted,
44
+ fontSize: 13,
45
+ fontWeight: '500',
46
+ color: '#8E8E93',
43
47
  },
44
- }));
48
+ });