@dreamstack-us/kaal 0.0.1
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/lib/module/components/CalendarGrid/CalendarGrid.js +112 -0
- package/lib/module/components/CalendarGrid/CalendarGrid.js.map +1 -0
- package/lib/module/components/CalendarGrid/CalendarGrid.styles.js +46 -0
- package/lib/module/components/CalendarGrid/CalendarGrid.styles.js.map +1 -0
- package/lib/module/components/CalendarGrid/DayCell.js +96 -0
- package/lib/module/components/CalendarGrid/DayCell.js.map +1 -0
- package/lib/module/components/CalendarGrid/index.js +4 -0
- package/lib/module/components/CalendarGrid/index.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.android.js +66 -0
- package/lib/module/components/DatePicker/DatePicker.android.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.ios.js +74 -0
- package/lib/module/components/DatePicker/DatePicker.ios.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.js +9 -0
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.styles.js +35 -0
- package/lib/module/components/DatePicker/DatePicker.styles.js.map +1 -0
- package/lib/module/components/DatePicker/DatePicker.web.js +32 -0
- package/lib/module/components/DatePicker/DatePicker.web.js.map +1 -0
- package/lib/module/components/DatePicker/index.js +4 -0
- package/lib/module/components/DatePicker/index.js.map +1 -0
- package/lib/module/components/TimePicker/ClockFace.js +194 -0
- package/lib/module/components/TimePicker/ClockFace.js.map +1 -0
- package/lib/module/components/TimePicker/MaterialTimePicker.js +122 -0
- package/lib/module/components/TimePicker/MaterialTimePicker.js.map +1 -0
- package/lib/module/components/TimePicker/TimePicker.android.js +77 -0
- package/lib/module/components/TimePicker/TimePicker.android.js.map +1 -0
- package/lib/module/components/TimePicker/TimePicker.ios.js +83 -0
- package/lib/module/components/TimePicker/TimePicker.ios.js.map +1 -0
- package/lib/module/components/TimePicker/TimePicker.js +34 -0
- package/lib/module/components/TimePicker/TimePicker.js.map +1 -0
- package/lib/module/components/TimePicker/TimePicker.styles.js +180 -0
- package/lib/module/components/TimePicker/TimePicker.styles.js.map +1 -0
- package/lib/module/components/TimePicker/TimePicker.web.js +37 -0
- package/lib/module/components/TimePicker/TimePicker.web.js.map +1 -0
- package/lib/module/components/TimePicker/TimeWheelPicker.js +178 -0
- package/lib/module/components/TimePicker/TimeWheelPicker.js.map +1 -0
- package/lib/module/components/TimePicker/index.js +7 -0
- package/lib/module/components/TimePicker/index.js.map +1 -0
- package/lib/module/components/WheelPicker/WheelPicker.js +5 -0
- package/lib/module/components/WheelPicker/WheelPicker.js.map +1 -0
- package/lib/module/components/WheelPicker/WheelPicker.styles.js +41 -0
- package/lib/module/components/WheelPicker/WheelPicker.styles.js.map +1 -0
- package/lib/module/components/WheelPicker/WheelPicker.web.js +190 -0
- package/lib/module/components/WheelPicker/WheelPicker.web.js.map +1 -0
- package/lib/module/components/WheelPicker/index.js +4 -0
- package/lib/module/components/WheelPicker/index.js.map +1 -0
- package/lib/module/components/index.js +7 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/hooks/index.js +6 -0
- package/lib/module/hooks/index.js.map +1 -0
- package/lib/module/hooks/useCalendar.js +44 -0
- package/lib/module/hooks/useCalendar.js.map +1 -0
- package/lib/module/hooks/useDatePicker.js +30 -0
- package/lib/module/hooks/useDatePicker.js.map +1 -0
- package/lib/module/hooks/useTimePicker.js +125 -0
- package/lib/module/hooks/useTimePicker.js.map +1 -0
- package/lib/module/index.js +22 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/types/datepicker.js +2 -0
- package/lib/module/types/datepicker.js.map +1 -0
- package/lib/module/types/index.js +5 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/types/timepicker.js +2 -0
- package/lib/module/types/timepicker.js.map +1 -0
- package/lib/module/unistyles.js +9 -0
- package/lib/module/unistyles.js.map +1 -0
- package/lib/module/utils/date.js +205 -0
- package/lib/module/utils/date.js.map +1 -0
- package/lib/module/utils/index.js +5 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/validation.js +61 -0
- package/lib/module/utils/validation.js.map +1 -0
- package/lib/typescript/components/CalendarGrid/CalendarGrid.d.ts +12 -0
- package/lib/typescript/components/CalendarGrid/CalendarGrid.d.ts.map +1 -0
- package/lib/typescript/components/CalendarGrid/CalendarGrid.styles.d.ts +45 -0
- package/lib/typescript/components/CalendarGrid/CalendarGrid.styles.d.ts.map +1 -0
- package/lib/typescript/components/CalendarGrid/DayCell.d.ts +12 -0
- package/lib/typescript/components/CalendarGrid/DayCell.d.ts.map +1 -0
- package/lib/typescript/components/CalendarGrid/index.d.ts +2 -0
- package/lib/typescript/components/CalendarGrid/index.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/DatePicker.android.d.ts +4 -0
- package/lib/typescript/components/DatePicker/DatePicker.android.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/DatePicker.d.ts +15 -0
- package/lib/typescript/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/DatePicker.ios.d.ts +4 -0
- package/lib/typescript/components/DatePicker/DatePicker.ios.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/DatePicker.styles.d.ts +29 -0
- package/lib/typescript/components/DatePicker/DatePicker.styles.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/DatePicker.web.d.ts +4 -0
- package/lib/typescript/components/DatePicker/DatePicker.web.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/index.d.ts +3 -0
- package/lib/typescript/components/DatePicker/index.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/ClockFace.d.ts +12 -0
- package/lib/typescript/components/TimePicker/ClockFace.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/MaterialTimePicker.d.ts +12 -0
- package/lib/typescript/components/TimePicker/MaterialTimePicker.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimePicker.android.d.ts +4 -0
- package/lib/typescript/components/TimePicker/TimePicker.android.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimePicker.d.ts +29 -0
- package/lib/typescript/components/TimePicker/TimePicker.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimePicker.ios.d.ts +4 -0
- package/lib/typescript/components/TimePicker/TimePicker.ios.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimePicker.styles.d.ts +168 -0
- package/lib/typescript/components/TimePicker/TimePicker.styles.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimePicker.web.d.ts +10 -0
- package/lib/typescript/components/TimePicker/TimePicker.web.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/TimeWheelPicker.d.ts +11 -0
- package/lib/typescript/components/TimePicker/TimeWheelPicker.d.ts.map +1 -0
- package/lib/typescript/components/TimePicker/index.d.ts +6 -0
- package/lib/typescript/components/TimePicker/index.d.ts.map +1 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.d.ts +2 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.d.ts.map +1 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.styles.d.ts +40 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.styles.d.ts.map +1 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.web.d.ts +10 -0
- package/lib/typescript/components/WheelPicker/WheelPicker.web.d.ts.map +1 -0
- package/lib/typescript/components/WheelPicker/index.d.ts +2 -0
- package/lib/typescript/components/WheelPicker/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +5 -0
- package/lib/typescript/components/index.d.ts.map +1 -0
- package/lib/typescript/hooks/index.d.ts +4 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -0
- package/lib/typescript/hooks/useCalendar.d.ts +10 -0
- package/lib/typescript/hooks/useCalendar.d.ts.map +1 -0
- package/lib/typescript/hooks/useDatePicker.d.ts +15 -0
- package/lib/typescript/hooks/useDatePicker.d.ts.map +1 -0
- package/lib/typescript/hooks/useTimePicker.d.ts +52 -0
- package/lib/typescript/hooks/useTimePicker.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +12 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/types/datepicker.d.ts +15 -0
- package/lib/typescript/types/datepicker.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +3 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/types/timepicker.d.ts +54 -0
- package/lib/typescript/types/timepicker.d.ts.map +1 -0
- package/lib/typescript/unistyles.d.ts +3 -0
- package/lib/typescript/unistyles.d.ts.map +1 -0
- package/lib/typescript/utils/date.d.ts +94 -0
- package/lib/typescript/utils/date.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/validation.d.ts +40 -0
- package/lib/typescript/utils/validation.d.ts.map +1 -0
- package/package.json +101 -0
- package/src/components/CalendarGrid/CalendarGrid.styles.ts +44 -0
- package/src/components/CalendarGrid/CalendarGrid.tsx +151 -0
- package/src/components/CalendarGrid/DayCell.tsx +108 -0
- package/src/components/CalendarGrid/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.android.tsx +69 -0
- package/src/components/DatePicker/DatePicker.ios.tsx +78 -0
- package/src/components/DatePicker/DatePicker.styles.ts +35 -0
- package/src/components/DatePicker/DatePicker.tsx +21 -0
- package/src/components/DatePicker/DatePicker.web.tsx +36 -0
- package/src/components/DatePicker/index.ts +2 -0
- package/src/components/TimePicker/ClockFace.tsx +233 -0
- package/src/components/TimePicker/MaterialTimePicker.tsx +169 -0
- package/src/components/TimePicker/TimePicker.android.tsx +80 -0
- package/src/components/TimePicker/TimePicker.ios.tsx +88 -0
- package/src/components/TimePicker/TimePicker.styles.ts +209 -0
- package/src/components/TimePicker/TimePicker.tsx +35 -0
- package/src/components/TimePicker/TimePicker.web.tsx +35 -0
- package/src/components/TimePicker/TimeWheelPicker.tsx +211 -0
- package/src/components/TimePicker/index.ts +5 -0
- package/src/components/WheelPicker/WheelPicker.styles.ts +39 -0
- package/src/components/WheelPicker/WheelPicker.tsx +2 -0
- package/src/components/WheelPicker/WheelPicker.web.tsx +237 -0
- package/src/components/WheelPicker/index.ts +1 -0
- package/src/components/index.ts +11 -0
- package/src/hooks/index.ts +9 -0
- package/src/hooks/useCalendar.ts +59 -0
- package/src/hooks/useDatePicker.ts +40 -0
- package/src/hooks/useTimePicker.ts +152 -0
- package/src/index.ts +77 -0
- package/src/types/datepicker.ts +17 -0
- package/src/types/index.ts +2 -0
- package/src/types/timepicker.ts +59 -0
- package/src/unistyles.ts +6 -0
- package/src/utils/date.ts +217 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/validation.ts +76 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: {
|
|
3
|
+
backgroundColor: "#FAFAFA" | "#1E1E1E";
|
|
4
|
+
borderRadius: 16;
|
|
5
|
+
padding: number;
|
|
6
|
+
};
|
|
7
|
+
wheelContainer: {
|
|
8
|
+
flexDirection: "row";
|
|
9
|
+
height: number;
|
|
10
|
+
backgroundColor: "#FAFAFA" | "#1E1E1E";
|
|
11
|
+
backdropFilter: string;
|
|
12
|
+
borderRadius: 16;
|
|
13
|
+
overflow: "hidden";
|
|
14
|
+
alignItems: "center";
|
|
15
|
+
paddingHorizontal: number;
|
|
16
|
+
};
|
|
17
|
+
wheelColumn: {
|
|
18
|
+
flex: number;
|
|
19
|
+
height: number;
|
|
20
|
+
overflow: "hidden";
|
|
21
|
+
position: "relative";
|
|
22
|
+
};
|
|
23
|
+
wheelSelectionIndicator: {
|
|
24
|
+
position: "absolute";
|
|
25
|
+
top: number;
|
|
26
|
+
left: number;
|
|
27
|
+
right: number;
|
|
28
|
+
height: number;
|
|
29
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)" | "rgba(255, 255, 255, 0.08)";
|
|
30
|
+
borderRadius: 8;
|
|
31
|
+
zIndex: number;
|
|
32
|
+
};
|
|
33
|
+
wheelItemsContainer: {
|
|
34
|
+
zIndex: number;
|
|
35
|
+
};
|
|
36
|
+
wheelItem: {
|
|
37
|
+
height: number;
|
|
38
|
+
justifyContent: "center";
|
|
39
|
+
alignItems: "center";
|
|
40
|
+
};
|
|
41
|
+
wheelItemText: {
|
|
42
|
+
fontSize: number;
|
|
43
|
+
color: "#FFFFFF" | "#212121";
|
|
44
|
+
fontWeight: "400";
|
|
45
|
+
opacity: number;
|
|
46
|
+
};
|
|
47
|
+
wheelItemTextSelected: {
|
|
48
|
+
fontWeight: "500";
|
|
49
|
+
opacity: number;
|
|
50
|
+
};
|
|
51
|
+
wheelSeparator: {
|
|
52
|
+
fontSize: number;
|
|
53
|
+
fontWeight: "500";
|
|
54
|
+
color: "#FFFFFF" | "#212121";
|
|
55
|
+
paddingHorizontal: number;
|
|
56
|
+
};
|
|
57
|
+
materialContainer: {
|
|
58
|
+
backgroundColor: "#F5F5F5" | "#2C2C2C";
|
|
59
|
+
borderRadius: number;
|
|
60
|
+
padding: number;
|
|
61
|
+
width: number;
|
|
62
|
+
};
|
|
63
|
+
materialHeader: {
|
|
64
|
+
fontSize: number;
|
|
65
|
+
fontWeight: "500";
|
|
66
|
+
color: "#616161" | "#E0E0E0";
|
|
67
|
+
letterSpacing: number;
|
|
68
|
+
marginBottom: number;
|
|
69
|
+
textTransform: "uppercase";
|
|
70
|
+
};
|
|
71
|
+
timeInputContainer: {
|
|
72
|
+
flexDirection: "row";
|
|
73
|
+
alignItems: "center";
|
|
74
|
+
justifyContent: "center";
|
|
75
|
+
gap: number;
|
|
76
|
+
marginBottom: number;
|
|
77
|
+
};
|
|
78
|
+
timeFieldsContainer: {
|
|
79
|
+
flexDirection: "row";
|
|
80
|
+
alignItems: "center";
|
|
81
|
+
};
|
|
82
|
+
timeField: {
|
|
83
|
+
backgroundColor: "#FAFAFA" | "#1E1E1E";
|
|
84
|
+
borderRadius: 8;
|
|
85
|
+
paddingVertical: number;
|
|
86
|
+
paddingHorizontal: number;
|
|
87
|
+
minWidth: number;
|
|
88
|
+
alignItems: "center";
|
|
89
|
+
};
|
|
90
|
+
timeFieldActive: {
|
|
91
|
+
backgroundColor: "#1E88E5" | "#4DA6FF";
|
|
92
|
+
};
|
|
93
|
+
timeFieldText: {
|
|
94
|
+
fontSize: number;
|
|
95
|
+
fontWeight: "400";
|
|
96
|
+
color: "#FFFFFF" | "#212121";
|
|
97
|
+
fontVariant: "tabular-nums"[];
|
|
98
|
+
};
|
|
99
|
+
timeFieldTextActive: {
|
|
100
|
+
color: string;
|
|
101
|
+
};
|
|
102
|
+
timeSeparator: {
|
|
103
|
+
fontSize: number;
|
|
104
|
+
fontWeight: "400";
|
|
105
|
+
color: "#FFFFFF" | "#212121";
|
|
106
|
+
marginHorizontal: number;
|
|
107
|
+
};
|
|
108
|
+
periodToggleContainer: {
|
|
109
|
+
borderWidth: number;
|
|
110
|
+
borderColor: "#E0E0E0" | "#444444";
|
|
111
|
+
borderRadius: 8;
|
|
112
|
+
overflow: "hidden";
|
|
113
|
+
};
|
|
114
|
+
periodButton: {
|
|
115
|
+
paddingVertical: number;
|
|
116
|
+
paddingHorizontal: number;
|
|
117
|
+
backgroundColor: string;
|
|
118
|
+
};
|
|
119
|
+
periodButtonActive: {
|
|
120
|
+
backgroundColor: string;
|
|
121
|
+
};
|
|
122
|
+
periodButtonTop: {
|
|
123
|
+
borderBottomWidth: number;
|
|
124
|
+
borderBottomColor: "#E0E0E0" | "#444444";
|
|
125
|
+
};
|
|
126
|
+
periodButtonText: {
|
|
127
|
+
fontSize: number;
|
|
128
|
+
fontWeight: "500";
|
|
129
|
+
color: "#616161" | "#E0E0E0";
|
|
130
|
+
};
|
|
131
|
+
periodButtonTextActive: {
|
|
132
|
+
color: "#1E88E5" | "#4DA6FF";
|
|
133
|
+
};
|
|
134
|
+
clockContainer: {
|
|
135
|
+
alignItems: "center";
|
|
136
|
+
justifyContent: "center";
|
|
137
|
+
marginBottom: number;
|
|
138
|
+
};
|
|
139
|
+
actionsContainer: {
|
|
140
|
+
flexDirection: "row";
|
|
141
|
+
justifyContent: "space-between";
|
|
142
|
+
alignItems: "center";
|
|
143
|
+
};
|
|
144
|
+
keyboardButton: {
|
|
145
|
+
padding: number;
|
|
146
|
+
};
|
|
147
|
+
keyboardButtonText: {
|
|
148
|
+
fontSize: number;
|
|
149
|
+
color: "#616161" | "#E0E0E0";
|
|
150
|
+
};
|
|
151
|
+
actionButtonsContainer: {
|
|
152
|
+
flexDirection: "row";
|
|
153
|
+
gap: number;
|
|
154
|
+
};
|
|
155
|
+
actionButton: {
|
|
156
|
+
paddingVertical: number;
|
|
157
|
+
paddingHorizontal: number;
|
|
158
|
+
borderRadius: number;
|
|
159
|
+
};
|
|
160
|
+
actionButtonText: {
|
|
161
|
+
fontSize: number;
|
|
162
|
+
fontWeight: "500";
|
|
163
|
+
color: "#1E88E5" | "#4DA6FF";
|
|
164
|
+
};
|
|
165
|
+
} & {
|
|
166
|
+
useVariants: (variants: never) => void;
|
|
167
|
+
};
|
|
168
|
+
//# sourceMappingURL=TimePicker.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimePicker.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/TimePicker.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0MhB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TimePickerProps } from '../../types/timepicker';
|
|
3
|
+
/**
|
|
4
|
+
* Web implementation of TimePicker
|
|
5
|
+
*
|
|
6
|
+
* - theme="ios": Uses TimeWheelPicker (iOS-style wheel)
|
|
7
|
+
* - theme="android" or "native": Uses MaterialTimePicker (Material clock face)
|
|
8
|
+
*/
|
|
9
|
+
export declare const TimePicker: React.FC<TimePickerProps>;
|
|
10
|
+
//# sourceMappingURL=TimePicker.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimePicker.web.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/TimePicker.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D;;;;;GAKG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuBhD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { TimeValue } from '../../types/timepicker';
|
|
3
|
+
interface TimeWheelPickerProps {
|
|
4
|
+
value: TimeValue;
|
|
5
|
+
onChange: (time: TimeValue) => void;
|
|
6
|
+
is24Hour?: boolean;
|
|
7
|
+
minuteInterval?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const TimeWheelPicker: React.FC<TimeWheelPickerProps>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=TimeWheelPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeWheelPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/TimeWheelPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAyFpE,UAAU,oBAAoB;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqG1D,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { TimePicker } from './TimePicker';
|
|
2
|
+
export type { TimePickerProps, TimeValue } from './TimePicker';
|
|
3
|
+
export { TimeWheelPicker } from './TimeWheelPicker';
|
|
4
|
+
export { ClockFace } from './ClockFace';
|
|
5
|
+
export { MaterialTimePicker } from './MaterialTimePicker';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/TimePicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WheelPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/WheelPicker/WheelPicker.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const styles: {
|
|
2
|
+
container: {
|
|
3
|
+
flexDirection: "row";
|
|
4
|
+
height: number;
|
|
5
|
+
backgroundColor: "#FAFAFA" | "#1E1E1E";
|
|
6
|
+
borderRadius: 16;
|
|
7
|
+
overflow: "hidden";
|
|
8
|
+
};
|
|
9
|
+
column: {
|
|
10
|
+
flex: number;
|
|
11
|
+
height: number;
|
|
12
|
+
overflow: "hidden";
|
|
13
|
+
};
|
|
14
|
+
selectionHighlight: {
|
|
15
|
+
position: "absolute";
|
|
16
|
+
top: number;
|
|
17
|
+
left: number;
|
|
18
|
+
right: number;
|
|
19
|
+
height: number;
|
|
20
|
+
backgroundColor: "rgba(0, 0, 0, 0.04)" | "rgba(255, 255, 255, 0.08)";
|
|
21
|
+
borderRadius: 8;
|
|
22
|
+
zIndex: number;
|
|
23
|
+
};
|
|
24
|
+
itemsContainer: {
|
|
25
|
+
zIndex: number;
|
|
26
|
+
};
|
|
27
|
+
item: {
|
|
28
|
+
height: number;
|
|
29
|
+
justifyContent: "center";
|
|
30
|
+
alignItems: "center";
|
|
31
|
+
};
|
|
32
|
+
itemText: {
|
|
33
|
+
fontSize: number;
|
|
34
|
+
color: "#FFFFFF" | "#212121";
|
|
35
|
+
fontWeight: "400";
|
|
36
|
+
};
|
|
37
|
+
} & {
|
|
38
|
+
useVariants: (variants: never) => void;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=WheelPicker.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WheelPicker.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/WheelPicker/WheelPicker.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoChB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
interface WheelPickerProps {
|
|
3
|
+
value: Date;
|
|
4
|
+
onChange: (date: Date) => void;
|
|
5
|
+
minDate?: Date;
|
|
6
|
+
maxDate?: Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const WheelPicker: React.FC<WheelPickerProps>;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=WheelPicker.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WheelPicker.web.d.ts","sourceRoot":"","sources":["../../../../src/components/WheelPicker/WheelPicker.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,UAAU,gBAAgB;IACxB,KAAK,EAAE,IAAI,CAAC;IACZ,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC/B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAiGD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAgFlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/WheelPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DatePicker, type KaalDatePickerProps } from './DatePicker';
|
|
2
|
+
export { CalendarGrid } from './CalendarGrid';
|
|
3
|
+
export { WheelPicker } from './WheelPicker';
|
|
4
|
+
export { TimePicker, TimeWheelPicker, ClockFace, MaterialTimePicker, type TimePickerProps, type TimeValue, } from './TimePicker';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,UAAU,EACV,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,cAAc,GACf,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const useCalendar: (initialDate?: Date) => {
|
|
2
|
+
currentMonth: Date;
|
|
3
|
+
daysInMonth: (Date | null)[];
|
|
4
|
+
navigateMonth: (direction: 1 | -1) => void;
|
|
5
|
+
goToMonth: (date: Date) => void;
|
|
6
|
+
goToDate: (date: Date) => void;
|
|
7
|
+
nextMonth: () => void;
|
|
8
|
+
prevMonth: () => void;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=useCalendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCalendar.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCalendar.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,GAAI,cAAc,IAAI;;;+BAME,CAAC,GAAG,CAAC,CAAC;sBAIf,IAAI;qBAIL,IAAI;;;CAmCzC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface UseDatePickerOptions {
|
|
2
|
+
initialDate?: Date;
|
|
3
|
+
minDate?: Date;
|
|
4
|
+
maxDate?: Date;
|
|
5
|
+
onChange?: (date: Date) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const useDatePicker: (options?: UseDatePickerOptions) => {
|
|
8
|
+
selectedDate: Date;
|
|
9
|
+
setSelectedDate: (date: Date) => void;
|
|
10
|
+
isDateDisabled: (date: Date) => boolean;
|
|
11
|
+
minDate: Date | undefined;
|
|
12
|
+
maxDate: Date | undefined;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useDatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDatePicker.d.ts","sourceRoot":"","sources":["../../../src/hooks/useDatePicker.ts"],"names":[],"mappings":"AAGA,UAAU,oBAAoB;IAC5B,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB;;4BAMrD,IAAI;2BAQJ,IAAI;;;CAed,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ClockMode, Time12Hour, TimePeriod, TimeValue } from '../types/timepicker';
|
|
2
|
+
interface UseTimePickerOptions {
|
|
3
|
+
/** Initial hours (0-23) */
|
|
4
|
+
initialHours?: number;
|
|
5
|
+
/** Initial minutes (0-59) */
|
|
6
|
+
initialMinutes?: number;
|
|
7
|
+
/** Callback when time changes */
|
|
8
|
+
onChange?: (time: TimeValue) => void;
|
|
9
|
+
/** Use 24-hour format */
|
|
10
|
+
is24Hour?: boolean;
|
|
11
|
+
/** Minute interval for snapping */
|
|
12
|
+
minuteInterval?: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Converts 24-hour time to 12-hour format
|
|
16
|
+
*/
|
|
17
|
+
export declare const to12Hour: (hours: number) => Time12Hour;
|
|
18
|
+
/**
|
|
19
|
+
* Converts 12-hour time to 24-hour format
|
|
20
|
+
*/
|
|
21
|
+
export declare const to24Hour: (hour: number, period: TimePeriod) => number;
|
|
22
|
+
/**
|
|
23
|
+
* Formats time as HH:MM string
|
|
24
|
+
*/
|
|
25
|
+
export declare const formatTime: (hours: number, minutes: number, is24Hour?: boolean) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Snaps minutes to the nearest interval
|
|
28
|
+
*/
|
|
29
|
+
export declare const snapToInterval: (minutes: number, interval: number) => number;
|
|
30
|
+
/**
|
|
31
|
+
* Hook for managing time picker state
|
|
32
|
+
*/
|
|
33
|
+
export declare const useTimePicker: (options?: UseTimePickerOptions) => {
|
|
34
|
+
hours: number;
|
|
35
|
+
minutes: number;
|
|
36
|
+
clockMode: ClockMode;
|
|
37
|
+
hour12: number;
|
|
38
|
+
period: TimePeriod;
|
|
39
|
+
setHours: (newHours: number) => void;
|
|
40
|
+
setMinutes: (newMinutes: number) => void;
|
|
41
|
+
setTime: (time: TimeValue) => void;
|
|
42
|
+
setHours12: (hour: number, period: TimePeriod) => void;
|
|
43
|
+
setPeriod: (period: TimePeriod) => void;
|
|
44
|
+
setClockMode: import("react").Dispatch<import("react").SetStateAction<ClockMode>>;
|
|
45
|
+
formatted: string;
|
|
46
|
+
formatted12: string;
|
|
47
|
+
formatted24: string;
|
|
48
|
+
is24Hour: boolean;
|
|
49
|
+
minuteInterval: number;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=useTimePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTimePicker.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTimePicker.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,MAAM,qBAAqB,CAAC;AAE7B,UAAU,oBAAoB;IAC5B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,OAAO,MAAM,KAAG,UAKxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,QAAQ,UAAU,KAAG,MAK3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,MAAM,EACb,SAAS,MAAM,EACf,kBAAgB,KACf,MAMF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,EAAE,UAAU,MAAM,KAAG,MAElE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,UAAS,oBAAyB;;;;;;yBAcjD,MAAM;6BASJ,MAAM;oBAUZ,SAAS;uBAYT,MAAM,UAAU,UAAU;wBAQxB,UAAU;;;;;;;CAgCtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { DatePicker, type KaalDatePickerProps } from './components';
|
|
2
|
+
export { CalendarGrid } from './components';
|
|
3
|
+
export { WheelPicker } from './components';
|
|
4
|
+
export { TimePicker, TimeWheelPicker, ClockFace, MaterialTimePicker, type TimePickerProps, type TimeValue, } from './components';
|
|
5
|
+
export { useDatePicker, useCalendar } from './hooks';
|
|
6
|
+
export { useTimePicker, to12Hour, to24Hour, formatTime, snapToInterval, } from './hooks';
|
|
7
|
+
export { toISODateString, toISODateTimeString, parseISODate, parseISODateTime, fromISODateString, fromISODateTimeString, getDateRange, isDateInRange, getUserTimezone, addDays, addMonths, compareDates, isSameDay, isSameMonth, getMonthDays, getFirstDayOfMonth, getLastDayOfMonth, getDayOfWeek, formatMonth, formatWeekday, formatYearMonth, today, } from './utils';
|
|
8
|
+
export { isoDateSchema, isoDateTimeSchema, dateRangeSchema, datePickerValueSchema, dateSchema, temporalDateSchema, } from './utils';
|
|
9
|
+
export type { DatePickerValue, DateRange } from './utils';
|
|
10
|
+
export type { DatePickerMode, DatePickerTheme, DatePickerVariant, DatePickerProps, } from './types';
|
|
11
|
+
export type { TimePeriod, ClockMode, Time12Hour, MinuteInterval, TimePickerTheme, } from './types';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG3C,OAAO,EACL,UAAU,EACV,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EACL,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,cAAc,GACf,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,EACf,KAAK,GACN,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,UAAU,EACV,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EACV,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,eAAe,GAChB,MAAM,SAAS,CAAC;AAGjB,YAAY,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type DatePickerMode = 'date' | 'time' | 'datetime';
|
|
2
|
+
export type DatePickerTheme = 'native' | 'ios' | 'android' | 'custom';
|
|
3
|
+
export type DatePickerVariant = 'wheel' | 'calendar' | 'compact';
|
|
4
|
+
export interface DatePickerProps {
|
|
5
|
+
value: Date;
|
|
6
|
+
onChange: (date: Date) => void;
|
|
7
|
+
mode?: DatePickerMode;
|
|
8
|
+
theme?: DatePickerTheme;
|
|
9
|
+
variant?: DatePickerVariant;
|
|
10
|
+
minDate?: Date;
|
|
11
|
+
maxDate?: Date;
|
|
12
|
+
disabledDates?: Date[];
|
|
13
|
+
locale?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=datepicker.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a time value in 24-hour format
|
|
3
|
+
*/
|
|
4
|
+
export interface TimeValue {
|
|
5
|
+
/** Hours in 24-hour format (0-23) */
|
|
6
|
+
hours: number;
|
|
7
|
+
/** Minutes (0-59) */
|
|
8
|
+
minutes: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Theme options for TimePicker appearance
|
|
12
|
+
*/
|
|
13
|
+
export type TimePickerTheme = 'native' | 'ios' | 'android';
|
|
14
|
+
/**
|
|
15
|
+
* Minute interval options for time selection
|
|
16
|
+
*/
|
|
17
|
+
export type MinuteInterval = 1 | 5 | 10 | 15 | 30;
|
|
18
|
+
/**
|
|
19
|
+
* Props for the TimePicker component
|
|
20
|
+
*/
|
|
21
|
+
export interface TimePickerProps {
|
|
22
|
+
/** Current time value */
|
|
23
|
+
value: TimeValue;
|
|
24
|
+
/** Callback when time changes */
|
|
25
|
+
onChange: (time: TimeValue) => void;
|
|
26
|
+
/** Visual theme - 'native' uses platform defaults */
|
|
27
|
+
theme?: TimePickerTheme;
|
|
28
|
+
/** Interval for minute selection */
|
|
29
|
+
minuteInterval?: MinuteInterval;
|
|
30
|
+
/** Use 24-hour format instead of 12-hour with AM/PM */
|
|
31
|
+
is24Hour?: boolean;
|
|
32
|
+
/** Minimum selectable time */
|
|
33
|
+
minTime?: TimeValue;
|
|
34
|
+
/** Maximum selectable time */
|
|
35
|
+
maxTime?: TimeValue;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Period indicator for 12-hour format
|
|
39
|
+
*/
|
|
40
|
+
export type TimePeriod = 'AM' | 'PM';
|
|
41
|
+
/**
|
|
42
|
+
* Clock mode for Material-style picker
|
|
43
|
+
*/
|
|
44
|
+
export type ClockMode = 'hours' | 'minutes';
|
|
45
|
+
/**
|
|
46
|
+
* 12-hour time representation
|
|
47
|
+
*/
|
|
48
|
+
export interface Time12Hour {
|
|
49
|
+
/** Hour in 12-hour format (1-12) */
|
|
50
|
+
hour: number;
|
|
51
|
+
/** AM or PM */
|
|
52
|
+
period: TimePeriod;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=timepicker.d.ts.map
|
|
@@ -0,0 +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;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAE3D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAElD;;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;CACrB;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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unistyles.d.ts","sourceRoot":"","sources":["../../src/unistyles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,OAAO,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Date utilities using native Date and Intl APIs
|
|
3
|
+
* Replaces @js-temporal/polyfill for lighter bundle size
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Converts a Date to ISO date string (YYYY-MM-DD)
|
|
7
|
+
*/
|
|
8
|
+
export declare const toISODateString: (date: Date) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a Date to ISO datetime string with timezone
|
|
11
|
+
*/
|
|
12
|
+
export declare const toISODateTimeString: (date: Date, timeZone?: string) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Parses an ISO date string (YYYY-MM-DD) to Date
|
|
15
|
+
*/
|
|
16
|
+
export declare const parseISODate: (iso: string) => Date;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated Alias for parseISODate for backward compatibility
|
|
19
|
+
*/
|
|
20
|
+
export declare const fromISODateString: (iso: string) => Date;
|
|
21
|
+
/**
|
|
22
|
+
* Parses an ISO datetime string to Date
|
|
23
|
+
*/
|
|
24
|
+
export declare const parseISODateTime: (iso: string) => Date;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Alias for parseISODateTime for backward compatibility
|
|
27
|
+
*/
|
|
28
|
+
export declare const fromISODateTimeString: (iso: string) => Date;
|
|
29
|
+
/**
|
|
30
|
+
* Gets all dates in a range (inclusive)
|
|
31
|
+
*/
|
|
32
|
+
export declare const getDateRange: (start: Date, end: Date) => Date[];
|
|
33
|
+
/**
|
|
34
|
+
* Checks if a date is within the given range
|
|
35
|
+
*/
|
|
36
|
+
export declare const isDateInRange: (date: Date, minDate?: Date, maxDate?: Date) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Gets the user's timezone
|
|
39
|
+
*/
|
|
40
|
+
export declare const getUserTimezone: () => string;
|
|
41
|
+
/**
|
|
42
|
+
* Adds days to a date
|
|
43
|
+
*/
|
|
44
|
+
export declare const addDays: (date: Date, days: number) => Date;
|
|
45
|
+
/**
|
|
46
|
+
* Adds months to a date, handling month overflow
|
|
47
|
+
*/
|
|
48
|
+
export declare const addMonths: (date: Date, months: number) => Date;
|
|
49
|
+
/**
|
|
50
|
+
* Compares two dates
|
|
51
|
+
* @returns negative if a < b, positive if a > b, 0 if equal
|
|
52
|
+
*/
|
|
53
|
+
export declare const compareDates: (a: Date, b: Date) => number;
|
|
54
|
+
/**
|
|
55
|
+
* Checks if two dates are the same day
|
|
56
|
+
*/
|
|
57
|
+
export declare const isSameDay: (a: Date, b: Date) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Checks if two dates are the same month
|
|
60
|
+
*/
|
|
61
|
+
export declare const isSameMonth: (a: Date, b: Date) => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Gets all days in a month
|
|
64
|
+
*/
|
|
65
|
+
export declare const getMonthDays: (year: number, month: number) => Date[];
|
|
66
|
+
/**
|
|
67
|
+
* Gets the first day of the month
|
|
68
|
+
*/
|
|
69
|
+
export declare const getFirstDayOfMonth: (date: Date) => Date;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the last day of the month
|
|
72
|
+
*/
|
|
73
|
+
export declare const getLastDayOfMonth: (date: Date) => Date;
|
|
74
|
+
/**
|
|
75
|
+
* Gets the day of week (0 = Sunday, 6 = Saturday)
|
|
76
|
+
*/
|
|
77
|
+
export declare const getDayOfWeek: (date: Date) => number;
|
|
78
|
+
/**
|
|
79
|
+
* Formats a month name
|
|
80
|
+
*/
|
|
81
|
+
export declare const formatMonth: (date: Date, locale?: string, style?: "long" | "short" | "narrow") => string;
|
|
82
|
+
/**
|
|
83
|
+
* Formats a weekday name
|
|
84
|
+
*/
|
|
85
|
+
export declare const formatWeekday: (date: Date, locale?: string, style?: "long" | "short" | "narrow") => string;
|
|
86
|
+
/**
|
|
87
|
+
* Formats year and month
|
|
88
|
+
*/
|
|
89
|
+
export declare const formatYearMonth: (date: Date, locale?: string) => string;
|
|
90
|
+
/**
|
|
91
|
+
* Gets today's date at midnight UTC
|
|
92
|
+
*/
|
|
93
|
+
export declare const today: () => Date;
|
|
94
|
+
//# sourceMappingURL=date.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,KAAG,MAK5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,IAAI,EAAE,WAAW,MAAM,KAAG,MAenE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,KAAK,MAAM,KAAG,IAG1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QARI,MAAM,KAAG,IAQE,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,KAAG,IAE9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAPI,MAAM,KAAG,IAOM,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,IAAI,EAAE,KAAK,IAAI,KAAG,IAAI,EAUzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,IAAI,EACV,UAAU,IAAI,EACd,UAAU,IAAI,KACb,OAKF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,QAAO,MAElC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,MAAM,IAAI,EAAE,MAAM,MAAM,KAAG,IAIlD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,EAAE,QAAQ,MAAM,KAAG,IAUtD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAG,MAE/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAG,OAE5C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAG,OAK9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,KAAG,IAAI,EAO9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,IAAI,KAAG,IAE/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,KAAG,IAE9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,MAAM,IAAI,KAAG,MAEzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GACtB,MAAM,IAAI,EACV,eAAgB,EAChB,QAAO,MAAM,GAAG,OAAO,GAAG,QAAiB,KAC1C,MAEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,IAAI,EACV,eAAgB,EAChB,QAAO,MAAM,GAAG,OAAO,GAAG,QAAkB,KAC3C,MAEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,MAAM,IAAI,EAAE,eAAgB,KAAG,MAK9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,QAAO,IAGxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|