react-native-hilal 0.1.0 → 0.2.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.
- package/README.md +119 -40
- package/lib/module/calendar/Appear.js +75 -0
- package/lib/module/calendar/Appear.js.map +1 -0
- package/lib/module/calendar/DayCell.js +4 -1
- package/lib/module/calendar/DayCell.js.map +1 -1
- package/lib/module/calendar/HilalCalendar.js +341 -64
- package/lib/module/calendar/HilalCalendar.js.map +1 -1
- package/lib/module/calendar/PickerGrid.js +66 -0
- package/lib/module/calendar/PickerGrid.js.map +1 -0
- package/lib/module/calendar/month.js +135 -22
- package/lib/module/calendar/month.js.map +1 -1
- package/lib/module/calendar/styles.js +219 -6
- package/lib/module/calendar/styles.js.map +1 -1
- package/lib/module/calendar/theme.js +3 -3
- package/lib/module/calendar/theme.js.map +1 -1
- package/lib/module/core/convert.js +52 -21
- package/lib/module/core/convert.js.map +1 -1
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/locale.js +5 -2
- package/lib/module/core/locale.js.map +1 -1
- package/lib/typescript/src/calendar/Appear.d.ts +22 -0
- package/lib/typescript/src/calendar/Appear.d.ts.map +1 -0
- package/lib/typescript/src/calendar/DayCell.d.ts +3 -1
- package/lib/typescript/src/calendar/DayCell.d.ts.map +1 -1
- package/lib/typescript/src/calendar/HilalCalendar.d.ts +1 -1
- package/lib/typescript/src/calendar/HilalCalendar.d.ts.map +1 -1
- package/lib/typescript/src/calendar/PickerGrid.d.ts +28 -0
- package/lib/typescript/src/calendar/PickerGrid.d.ts.map +1 -0
- package/lib/typescript/src/calendar/index.d.ts +1 -1
- package/lib/typescript/src/calendar/index.d.ts.map +1 -1
- package/lib/typescript/src/calendar/month.d.ts +30 -7
- package/lib/typescript/src/calendar/month.d.ts.map +1 -1
- package/lib/typescript/src/calendar/styles.d.ts +200 -113
- package/lib/typescript/src/calendar/styles.d.ts.map +1 -1
- package/lib/typescript/src/calendar/theme.d.ts +21 -1
- package/lib/typescript/src/calendar/theme.d.ts.map +1 -1
- package/lib/typescript/src/calendar/types.d.ts +106 -2
- package/lib/typescript/src/calendar/types.d.ts.map +1 -1
- package/lib/typescript/src/core/convert.d.ts +38 -15
- package/lib/typescript/src/core/convert.d.ts.map +1 -1
- package/lib/typescript/src/core/index.d.ts +1 -1
- package/lib/typescript/src/core/index.d.ts.map +1 -1
- package/lib/typescript/src/core/locale.d.ts +1 -1
- package/lib/typescript/src/core/locale.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/calendar/Appear.tsx +94 -0
- package/src/calendar/DayCell.tsx +6 -0
- package/src/calendar/HilalCalendar.tsx +406 -77
- package/src/calendar/PickerGrid.tsx +99 -0
- package/src/calendar/index.ts +6 -1
- package/src/calendar/month.ts +174 -23
- package/src/calendar/styles.ts +235 -5
- package/src/calendar/theme.ts +23 -3
- package/src/calendar/types.ts +109 -2
- package/src/core/convert.ts +87 -23
- package/src/core/index.ts +1 -0
- package/src/core/locale.ts +4 -1
|
@@ -1,119 +1,206 @@
|
|
|
1
1
|
import type { HilalTheme } from './theme.js';
|
|
2
|
+
import type { HilalStyles } from './types.js';
|
|
2
3
|
export type CalendarStyles = ReturnType<typeof createStyles>;
|
|
4
|
+
/**
|
|
5
|
+
* How far the phone's text size setting may grow the text of day cells,
|
|
6
|
+
* weekday names and picker buttons, which have a fixed size: up to 1.3 a
|
|
7
|
+
* day number and the date under it still fit a 48 pt cell.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MAX_CELL_FONT_SCALE = 1.3;
|
|
10
|
+
/** The same for the header and the toggle, which have room to grow. */
|
|
11
|
+
export declare const MAX_HEADER_FONT_SCALE = 2;
|
|
3
12
|
export declare function createStyles(theme: HilalTheme): Readonly<{
|
|
4
|
-
container: {
|
|
5
|
-
backgroundColor: string;
|
|
6
|
-
borderRadius:
|
|
7
|
-
padding:
|
|
8
|
-
};
|
|
9
|
-
toggle: {
|
|
10
|
-
alignSelf: "center";
|
|
11
|
-
borderColor: string;
|
|
12
|
-
borderRadius:
|
|
13
|
-
borderWidth:
|
|
14
|
-
marginBottom:
|
|
15
|
-
padding:
|
|
16
|
-
};
|
|
17
|
-
toggleOption: {
|
|
18
|
-
borderRadius:
|
|
19
|
-
paddingHorizontal:
|
|
20
|
-
paddingVertical:
|
|
21
|
-
};
|
|
22
|
-
toggleOptionActive: {
|
|
23
|
-
backgroundColor: string;
|
|
24
|
-
};
|
|
25
|
-
toggleText: {
|
|
26
|
-
color: string;
|
|
27
|
-
fontSize:
|
|
28
|
-
fontWeight: "600";
|
|
29
|
-
};
|
|
30
|
-
toggleTextActive: {
|
|
31
|
-
color: string;
|
|
32
|
-
};
|
|
33
|
-
header: {
|
|
34
|
-
alignItems: "center";
|
|
35
|
-
marginBottom:
|
|
36
|
-
};
|
|
37
|
-
titles: {
|
|
38
|
-
alignItems: "center";
|
|
39
|
-
flex:
|
|
40
|
-
};
|
|
41
|
-
title: {
|
|
42
|
-
color: string;
|
|
43
|
-
fontSize:
|
|
44
|
-
fontWeight: "700";
|
|
45
|
-
};
|
|
46
|
-
subtitle: {
|
|
47
|
-
color: string;
|
|
48
|
-
fontSize:
|
|
49
|
-
marginTop:
|
|
50
|
-
};
|
|
51
|
-
arrow: {
|
|
52
|
-
alignItems: "center";
|
|
53
|
-
borderRadius:
|
|
54
|
-
height:
|
|
55
|
-
justifyContent: "center";
|
|
56
|
-
width:
|
|
57
|
-
};
|
|
58
|
-
arrowPressed: {
|
|
59
|
-
backgroundColor: string;
|
|
60
|
-
};
|
|
61
|
-
weekdays: {
|
|
62
|
-
marginBottom:
|
|
63
|
-
};
|
|
64
|
-
weekday: {
|
|
65
|
-
color: string;
|
|
66
|
-
flex:
|
|
67
|
-
fontSize:
|
|
68
|
-
fontWeight: "600";
|
|
69
|
-
textAlign: "center";
|
|
70
|
-
};
|
|
71
|
-
week: {};
|
|
72
|
-
slot: {
|
|
73
|
-
alignItems: "center";
|
|
74
|
-
flex:
|
|
75
|
-
paddingHorizontal:
|
|
76
|
-
paddingVertical:
|
|
77
|
-
};
|
|
78
|
-
day: {
|
|
79
|
-
alignItems: "center";
|
|
80
|
-
borderColor:
|
|
81
|
-
borderRadius: number;
|
|
82
|
-
borderWidth:
|
|
83
|
-
height:
|
|
84
|
-
justifyContent: "center";
|
|
85
|
-
maxWidth:
|
|
86
|
-
width:
|
|
87
|
-
};
|
|
88
|
-
today: {
|
|
89
|
-
borderColor: string;
|
|
90
|
-
};
|
|
91
|
-
selected: {
|
|
92
|
-
backgroundColor: string;
|
|
93
|
-
borderColor: string;
|
|
94
|
-
};
|
|
95
|
-
pressed: {
|
|
96
|
-
backgroundColor: string;
|
|
97
|
-
};
|
|
98
|
-
dayText: {
|
|
99
|
-
color: string;
|
|
100
|
-
fontSize:
|
|
101
|
-
fontWeight: "
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
13
|
+
readonly container: {
|
|
14
|
+
readonly backgroundColor: string;
|
|
15
|
+
readonly borderRadius: 20;
|
|
16
|
+
readonly padding: 12;
|
|
17
|
+
};
|
|
18
|
+
readonly toggle: {
|
|
19
|
+
readonly alignSelf: "center";
|
|
20
|
+
readonly borderColor: string;
|
|
21
|
+
readonly borderRadius: 999;
|
|
22
|
+
readonly borderWidth: 1;
|
|
23
|
+
readonly marginBottom: 12;
|
|
24
|
+
readonly padding: 3;
|
|
25
|
+
};
|
|
26
|
+
readonly toggleOption: {
|
|
27
|
+
readonly borderRadius: 999;
|
|
28
|
+
readonly paddingHorizontal: 16;
|
|
29
|
+
readonly paddingVertical: 6;
|
|
30
|
+
};
|
|
31
|
+
readonly toggleOptionActive: {
|
|
32
|
+
readonly backgroundColor: string;
|
|
33
|
+
};
|
|
34
|
+
readonly toggleText: {
|
|
35
|
+
readonly color: string;
|
|
36
|
+
readonly fontSize: 14;
|
|
37
|
+
readonly fontWeight: "600";
|
|
38
|
+
};
|
|
39
|
+
readonly toggleTextActive: {
|
|
40
|
+
readonly color: string;
|
|
41
|
+
};
|
|
42
|
+
readonly header: {
|
|
43
|
+
readonly alignItems: "center";
|
|
44
|
+
readonly marginBottom: 8;
|
|
45
|
+
};
|
|
46
|
+
readonly titles: {
|
|
47
|
+
readonly alignItems: "center";
|
|
48
|
+
readonly flex: 1;
|
|
49
|
+
};
|
|
50
|
+
readonly title: {
|
|
51
|
+
readonly color: string;
|
|
52
|
+
readonly fontSize: 18;
|
|
53
|
+
readonly fontWeight: "700";
|
|
54
|
+
};
|
|
55
|
+
readonly subtitle: {
|
|
56
|
+
readonly color: string;
|
|
57
|
+
readonly fontSize: 13;
|
|
58
|
+
readonly marginTop: 2;
|
|
59
|
+
};
|
|
60
|
+
readonly arrow: {
|
|
61
|
+
readonly alignItems: "center";
|
|
62
|
+
readonly borderRadius: 999;
|
|
63
|
+
readonly height: 40;
|
|
64
|
+
readonly justifyContent: "center";
|
|
65
|
+
readonly width: 40;
|
|
66
|
+
};
|
|
67
|
+
readonly arrowPressed: {
|
|
68
|
+
readonly backgroundColor: string;
|
|
69
|
+
};
|
|
70
|
+
readonly weekdays: {
|
|
71
|
+
readonly marginBottom: 8;
|
|
72
|
+
};
|
|
73
|
+
readonly weekday: {
|
|
74
|
+
readonly color: string;
|
|
75
|
+
readonly flex: 1;
|
|
76
|
+
readonly fontSize: 12;
|
|
77
|
+
readonly fontWeight: "600";
|
|
78
|
+
readonly textAlign: "center";
|
|
79
|
+
};
|
|
80
|
+
readonly week: {};
|
|
81
|
+
readonly slot: {
|
|
82
|
+
readonly alignItems: "center";
|
|
83
|
+
readonly flex: 1;
|
|
84
|
+
readonly paddingHorizontal: 3;
|
|
85
|
+
readonly paddingVertical: 2;
|
|
86
|
+
};
|
|
87
|
+
readonly day: {
|
|
88
|
+
readonly alignItems: "center";
|
|
89
|
+
readonly borderColor: "transparent";
|
|
90
|
+
readonly borderRadius: number;
|
|
91
|
+
readonly borderWidth: 1.5;
|
|
92
|
+
readonly height: 48;
|
|
93
|
+
readonly justifyContent: "center";
|
|
94
|
+
readonly maxWidth: 48;
|
|
95
|
+
readonly width: "100%";
|
|
96
|
+
};
|
|
97
|
+
readonly today: {
|
|
98
|
+
readonly borderColor: string;
|
|
99
|
+
};
|
|
100
|
+
readonly selected: {
|
|
101
|
+
readonly backgroundColor: string;
|
|
102
|
+
readonly borderColor: string;
|
|
103
|
+
};
|
|
104
|
+
readonly pressed: {
|
|
105
|
+
readonly backgroundColor: string;
|
|
106
|
+
};
|
|
107
|
+
readonly dayText: {
|
|
108
|
+
readonly color: string;
|
|
109
|
+
readonly fontSize: 16;
|
|
110
|
+
readonly fontWeight: "500";
|
|
111
|
+
readonly lineHeight: 20;
|
|
112
|
+
};
|
|
113
|
+
readonly secondaryText: {
|
|
114
|
+
readonly color: string;
|
|
115
|
+
readonly fontSize: 11;
|
|
116
|
+
readonly lineHeight: 14;
|
|
117
|
+
readonly marginTop: 1;
|
|
118
|
+
};
|
|
119
|
+
readonly selectedText: {
|
|
120
|
+
readonly color: string;
|
|
121
|
+
readonly fontWeight: "700";
|
|
122
|
+
};
|
|
123
|
+
readonly todayText: {
|
|
124
|
+
readonly fontWeight: "700";
|
|
125
|
+
};
|
|
126
|
+
readonly selectedSecondaryText: {
|
|
127
|
+
readonly color: string;
|
|
128
|
+
readonly opacity: 0.8;
|
|
129
|
+
};
|
|
130
|
+
readonly disabledText: {
|
|
131
|
+
readonly color: string;
|
|
132
|
+
};
|
|
133
|
+
readonly titleButton: {
|
|
134
|
+
readonly alignItems: "center";
|
|
135
|
+
readonly borderRadius: 10;
|
|
136
|
+
readonly overflow: "hidden";
|
|
137
|
+
readonly paddingHorizontal: 10;
|
|
138
|
+
readonly paddingVertical: 2;
|
|
139
|
+
};
|
|
140
|
+
readonly titleInButton: {
|
|
141
|
+
readonly flexShrink: 1;
|
|
142
|
+
readonly textAlign: "center";
|
|
143
|
+
};
|
|
144
|
+
readonly titleStatic: {
|
|
145
|
+
readonly paddingVertical: 2;
|
|
146
|
+
};
|
|
147
|
+
readonly titleButtonPressed: {
|
|
148
|
+
readonly backgroundColor: string;
|
|
149
|
+
};
|
|
150
|
+
readonly titleTint: {
|
|
151
|
+
readonly backgroundColor: string;
|
|
152
|
+
readonly opacity: 0.1;
|
|
153
|
+
readonly bottom: 0;
|
|
154
|
+
readonly left: 0;
|
|
155
|
+
readonly position: "absolute";
|
|
156
|
+
readonly right: 0;
|
|
157
|
+
readonly top: 0;
|
|
158
|
+
};
|
|
159
|
+
readonly picker: {
|
|
160
|
+
readonly marginTop: 4;
|
|
161
|
+
};
|
|
162
|
+
readonly pickerSlot: {
|
|
163
|
+
readonly flex: 1;
|
|
164
|
+
readonly padding: 3;
|
|
165
|
+
};
|
|
166
|
+
readonly pickerItem: {
|
|
167
|
+
readonly alignItems: "center";
|
|
168
|
+
readonly borderColor: "transparent";
|
|
169
|
+
readonly borderRadius: number;
|
|
170
|
+
readonly borderWidth: 1.5;
|
|
171
|
+
readonly justifyContent: "center";
|
|
172
|
+
readonly minHeight: 52;
|
|
173
|
+
readonly overflow: "hidden";
|
|
174
|
+
readonly paddingHorizontal: 4;
|
|
175
|
+
readonly paddingVertical: 6;
|
|
176
|
+
};
|
|
177
|
+
readonly grow: {
|
|
178
|
+
readonly flexGrow: 1;
|
|
179
|
+
};
|
|
180
|
+
readonly pickerItemTint: {
|
|
181
|
+
readonly backgroundColor: string;
|
|
182
|
+
readonly opacity: 0.05;
|
|
183
|
+
readonly bottom: 0;
|
|
184
|
+
readonly left: 0;
|
|
185
|
+
readonly position: "absolute";
|
|
186
|
+
readonly right: 0;
|
|
187
|
+
readonly top: 0;
|
|
188
|
+
};
|
|
189
|
+
readonly pickerText: {
|
|
190
|
+
readonly color: string;
|
|
191
|
+
readonly fontSize: 14;
|
|
192
|
+
readonly fontWeight: "600";
|
|
193
|
+
readonly lineHeight: 18;
|
|
194
|
+
readonly textAlign: "center";
|
|
117
195
|
};
|
|
118
196
|
}>;
|
|
197
|
+
/**
|
|
198
|
+
* Merges the `styles` prop over the calendar styles: `styles` for the
|
|
199
|
+
* calendar and the picker, `dayStyles` for the day cells. Slots that are
|
|
200
|
+
* not set leave the calendar styles as they are.
|
|
201
|
+
*/
|
|
202
|
+
export declare function withSlots(styles: CalendarStyles, slots: HilalStyles | undefined): {
|
|
203
|
+
styles: CalendarStyles;
|
|
204
|
+
dayStyles: CalendarStyles;
|
|
205
|
+
};
|
|
119
206
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/calendar/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/calendar/styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAS,CAAC;AAW3C,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;AAE7D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,uEAAuE;AACvE,eAAO,MAAM,qBAAqB,IAAI,CAAC;AA0BvC,wBAAgB,YAAY,CAAC,KAAK,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAE7C;AAsFD;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,WAAW,GAAG,SAAS,GAC7B;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,CAmBvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Colors and shape of the calendar. */
|
|
1
|
+
/** Colors, fonts and shape of the calendar. */
|
|
2
2
|
export type HilalTheme = {
|
|
3
3
|
/** Calendar background. */
|
|
4
4
|
background: string;
|
|
@@ -18,6 +18,26 @@ export type HilalTheme = {
|
|
|
18
18
|
border: string;
|
|
19
19
|
/** Corner radius of a day cell. */
|
|
20
20
|
radius: number;
|
|
21
|
+
/** Month arrows. Default: `text`. */
|
|
22
|
+
arrow?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Font of all text, for example 'Cairo-Regular'. Default: the system
|
|
25
|
+
* font.
|
|
26
|
+
*/
|
|
27
|
+
fontFamily?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Font of the bold text (month title, selected day and today, toggle,
|
|
30
|
+
* weekdays, picker), for example 'Cairo-Bold'. When set, it is used as is,
|
|
31
|
+
* without a fontWeight on top. Default: `fontFamily` with a bold weight.
|
|
32
|
+
*/
|
|
33
|
+
fontFamilyBold?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Multiplies every font size, for example 1.15 for larger text. Day
|
|
36
|
+
* cells grow with it. Weekday names and the picker's month and year
|
|
37
|
+
* names shrink with it but never grow, so they still fit their columns
|
|
38
|
+
* on small phones. Default 1.
|
|
39
|
+
*/
|
|
40
|
+
fontScale?: number;
|
|
21
41
|
};
|
|
22
42
|
export type ThemeProp = 'light' | 'dark' | 'auto' | Partial<HilalTheme>;
|
|
23
43
|
export declare const lightTheme: HilalTheme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/calendar/theme.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../src/calendar/theme.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GAAG;IACvB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAExE,eAAO,MAAM,UAAU,EAAE,UAUxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,UAUvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACrC,UAAU,CAYZ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
|
+
import type { StyleProp, TextStyle, ViewStyle } from 'react-native';
|
|
2
2
|
import type { CalendarType, Digits, Locale } from '../core/locale.js';
|
|
3
3
|
import type { HijriDate } from '../core/types.js';
|
|
4
4
|
import type { ThemeProp } from './theme.js';
|
|
@@ -13,6 +13,77 @@ export type SelectedDate = {
|
|
|
13
13
|
hijri: string;
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
|
+
type ViewSlot = StyleProp<ViewStyle>;
|
|
17
|
+
type TextSlot = StyleProp<TextStyle>;
|
|
18
|
+
/**
|
|
19
|
+
* Styles for parts of the calendar, merged over the theme's styles. Each
|
|
20
|
+
* is optional.
|
|
21
|
+
*/
|
|
22
|
+
export type HilalStyles = {
|
|
23
|
+
/** The outer container (the same as the `style` prop). */
|
|
24
|
+
container?: ViewSlot;
|
|
25
|
+
/** The Hijri / Gregorian toggle. */
|
|
26
|
+
toggle?: ViewSlot;
|
|
27
|
+
/** Each option of the toggle. */
|
|
28
|
+
toggleOption?: ViewSlot;
|
|
29
|
+
toggleText?: TextSlot;
|
|
30
|
+
/** The row of arrows and titles. */
|
|
31
|
+
header?: ViewSlot;
|
|
32
|
+
/** The month title. */
|
|
33
|
+
title?: TextSlot;
|
|
34
|
+
/** The other calendar's months under the title. */
|
|
35
|
+
subtitle?: TextSlot;
|
|
36
|
+
/** Each arrow button. */
|
|
37
|
+
arrow?: ViewSlot;
|
|
38
|
+
/** Each weekday name. */
|
|
39
|
+
weekdayText?: TextSlot;
|
|
40
|
+
/** Each day cell (the pressable circle). */
|
|
41
|
+
day?: ViewSlot;
|
|
42
|
+
/** The day number. */
|
|
43
|
+
dayText?: TextSlot;
|
|
44
|
+
/** The other calendar's day under the day number. */
|
|
45
|
+
secondaryDayText?: TextSlot;
|
|
46
|
+
/** The selected day cell. */
|
|
47
|
+
selectedDay?: ViewSlot;
|
|
48
|
+
/** The selected day's number. */
|
|
49
|
+
selectedDayText?: TextSlot;
|
|
50
|
+
/** Today's day cell. */
|
|
51
|
+
today?: ViewSlot;
|
|
52
|
+
/** Today's day number, bold by default. */
|
|
53
|
+
todayDayText?: TextSlot;
|
|
54
|
+
/** Both texts of a disabled day. */
|
|
55
|
+
disabledDayText?: TextSlot;
|
|
56
|
+
/** Each month or year in the month and year picker. */
|
|
57
|
+
pickerItem?: ViewSlot;
|
|
58
|
+
pickerText?: TextSlot;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Texts of the calendar's buttons, read by screen readers too. Each is
|
|
62
|
+
* optional; the rest come from the locale.
|
|
63
|
+
*/
|
|
64
|
+
export type HilalLabels = {
|
|
65
|
+
/** The toggle's Hijri option. */
|
|
66
|
+
hijri?: string;
|
|
67
|
+
/** The toggle's Gregorian option. */
|
|
68
|
+
gregorian?: string;
|
|
69
|
+
/** Read by screen readers after today's date. */
|
|
70
|
+
today?: string;
|
|
71
|
+
/** Read after the current month in the month picker. */
|
|
72
|
+
thisMonth?: string;
|
|
73
|
+
/** Read after the current year in the year picker. */
|
|
74
|
+
thisYear?: string;
|
|
75
|
+
/** Arrows, read by screen readers. */
|
|
76
|
+
previousMonth?: string;
|
|
77
|
+
nextMonth?: string;
|
|
78
|
+
previousYear?: string;
|
|
79
|
+
nextYear?: string;
|
|
80
|
+
previousYears?: string;
|
|
81
|
+
nextYears?: string;
|
|
82
|
+
/** The month title button, read by screen readers before the title. */
|
|
83
|
+
chooseMonth?: string;
|
|
84
|
+
/** The year title button in the month picker. */
|
|
85
|
+
chooseYear?: string;
|
|
86
|
+
};
|
|
16
87
|
export type HilalCalendarProps = {
|
|
17
88
|
/** Selected day (controlled). Only the local calendar day is used. */
|
|
18
89
|
value?: Date;
|
|
@@ -39,20 +110,53 @@ export type HilalCalendarProps = {
|
|
|
39
110
|
direction?: 'rtl' | 'ltr' | 'auto';
|
|
40
111
|
/** 0 = Sunday (default), 1 = Monday, 6 = Saturday. */
|
|
41
112
|
firstDayOfWeek?: 0 | 1 | 6;
|
|
113
|
+
/**
|
|
114
|
+
* Weekday names above the days: 'short' (default, أحد / Sun) or
|
|
115
|
+
* 'narrow' (ح / S). Full names don't fit seven columns on a phone.
|
|
116
|
+
*/
|
|
117
|
+
weekdayFormat?: 'short' | 'narrow';
|
|
42
118
|
/** Earliest selectable day. */
|
|
43
119
|
minDate?: Date;
|
|
44
120
|
/** Latest selectable day. */
|
|
45
121
|
maxDate?: Date;
|
|
46
122
|
/** Return true to disable a day. */
|
|
47
123
|
isDateDisabled?: (date: SelectedDate) => boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Shift the Hijri calendar by whole days, from -2 to 2, for places where
|
|
126
|
+
* the month started before or after Umm al-Qura. `1` makes every Hijri
|
|
127
|
+
* date one day later. Gregorian dates never change. Default 0.
|
|
128
|
+
*/
|
|
129
|
+
hijriAdjustment?: number;
|
|
130
|
+
/**
|
|
131
|
+
* Pressing the month title opens a grid of months, and from there a
|
|
132
|
+
* grid of years, to jump far without paging month by month. Default
|
|
133
|
+
* true.
|
|
134
|
+
*/
|
|
135
|
+
showMonthYearPicker?: boolean;
|
|
48
136
|
/**
|
|
49
137
|
* 'light', 'dark', 'auto' (default, follows the system color scheme),
|
|
50
138
|
* or a partial theme merged over the 'auto' theme.
|
|
51
139
|
*/
|
|
52
140
|
theme?: ThemeProp;
|
|
141
|
+
/** Texts of the toggle and buttons, see `HilalLabels`. */
|
|
142
|
+
labels?: HilalLabels;
|
|
143
|
+
/** Styles for parts of the calendar, see `HilalStyles`. */
|
|
144
|
+
styles?: HilalStyles;
|
|
53
145
|
/** Style of the outer container. */
|
|
54
146
|
style?: StyleProp<ViewStyle>;
|
|
55
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Style of every day cell (the pressable circle). Unlike `styles.day`,
|
|
149
|
+
* it also wins over the selected and today styles.
|
|
150
|
+
*/
|
|
56
151
|
dayStyle?: StyleProp<ViewStyle>;
|
|
152
|
+
/**
|
|
153
|
+
* How far the phone's text size setting may grow the calendar's text,
|
|
154
|
+
* like React Native's prop of the same name: `1` turns it off, `0`
|
|
155
|
+
* removes the limit. By default, text in day cells, weekday names and
|
|
156
|
+
* picker buttons grows up to 1.3 times (as far as it fits a cell), and
|
|
157
|
+
* the header and toggle up to 2 times.
|
|
158
|
+
*/
|
|
159
|
+
maxFontSizeMultiplier?: number;
|
|
57
160
|
};
|
|
161
|
+
export {};
|
|
58
162
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/calendar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/calendar/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,33 @@
|
|
|
1
1
|
import type { HijriDate } from './types.js';
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* First and last epoch day of the Umm al-Qura table (both inclusive). With
|
|
4
|
+
* a Hijri adjustment of `n` days, the supported Gregorian days move by
|
|
5
|
+
* `-n`: see `supportedEpochDays`.
|
|
6
|
+
*/
|
|
3
7
|
export declare const FIRST_DAY: number;
|
|
4
8
|
export declare const LAST_DAY: number;
|
|
9
|
+
/** The largest Hijri adjustment accepted, in days, in either direction. */
|
|
10
|
+
export declare const MAX_HIJRI_ADJUSTMENT = 2;
|
|
11
|
+
export type HijriConversionOptions = {
|
|
12
|
+
/**
|
|
13
|
+
* Days to shift the Hijri calendar by, from -2 to 2. `1` makes every
|
|
14
|
+
* Hijri date one day later than Umm al-Qura (Umm al-Qura's 29 Sha'ban
|
|
15
|
+
* becomes 30 Sha'ban), for places where the month started a day
|
|
16
|
+
* earlier. Default 0.
|
|
17
|
+
*/
|
|
18
|
+
adjustment?: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Checks a Hijri adjustment and returns it.
|
|
22
|
+
*
|
|
23
|
+
* @throws {RangeError} unless it is an integer from -2 to 2.
|
|
24
|
+
*/
|
|
25
|
+
export declare function checkAdjustment(adjustment: number, caller: string): number;
|
|
26
|
+
/** First and last epoch day that have a Hijri date, for an adjustment. */
|
|
27
|
+
export declare function supportedEpochDays(adjustment?: number): {
|
|
28
|
+
min: number;
|
|
29
|
+
max: number;
|
|
30
|
+
};
|
|
5
31
|
/** First and last Hijri dates the table covers. */
|
|
6
32
|
export declare function getSupportedRange(): {
|
|
7
33
|
min: HijriDate;
|
|
@@ -17,38 +43,35 @@ export declare function getHijriMonthLength(year: number, month: number): 29 | 3
|
|
|
17
43
|
/** Whether `hijri` is a real day within the supported range. */
|
|
18
44
|
export declare function isValidHijri(hijri: HijriDate): boolean;
|
|
19
45
|
/**
|
|
20
|
-
* Hijri date of an epoch day. Internal: the
|
|
21
|
-
* `toHijri`.
|
|
46
|
+
* Hijri date of an epoch day, shifted by `adjustment` days. Internal: the
|
|
47
|
+
* public entry point is `toHijri`.
|
|
22
48
|
*
|
|
23
49
|
* @throws {RangeError} if the day is outside the supported range.
|
|
24
50
|
*/
|
|
25
|
-
export declare function hijriOfEpochDay(epochDay: number, caller?: string):
|
|
26
|
-
year: number;
|
|
27
|
-
month: number;
|
|
28
|
-
day: number;
|
|
29
|
-
};
|
|
51
|
+
export declare function hijriOfEpochDay(epochDay: number, caller?: string, adjustment?: number): HijriDate;
|
|
30
52
|
/**
|
|
31
|
-
* Epoch day of a Hijri date. Internal: the
|
|
32
|
-
* `toGregorian`.
|
|
53
|
+
* Epoch day of a Hijri date, shifted by `adjustment` days. Internal: the
|
|
54
|
+
* public entry point is `toGregorian`.
|
|
33
55
|
*
|
|
34
56
|
* @throws {RangeError} if `hijri` is not a valid date in the supported
|
|
35
57
|
* range.
|
|
36
58
|
*/
|
|
37
|
-
export declare function epochDayOfHijri(hijri: HijriDate, caller?: string): number;
|
|
59
|
+
export declare function epochDayOfHijri(hijri: HijriDate, caller?: string, adjustment?: number): number;
|
|
38
60
|
/**
|
|
39
61
|
* Converts the local calendar day of `date` to a Hijri date. The time of
|
|
40
62
|
* day and the time zone offset are ignored: 23:59 and 00:00 on the same
|
|
41
63
|
* local day give the same result.
|
|
42
64
|
*
|
|
43
|
-
* @throws {RangeError} if `date` is invalid or outside the supported
|
|
65
|
+
* @throws {RangeError} if `date` is invalid or outside the supported
|
|
66
|
+
* range, or the adjustment is not an integer from -2 to 2.
|
|
44
67
|
*/
|
|
45
|
-
export declare function toHijri(date: Date): HijriDate;
|
|
68
|
+
export declare function toHijri(date: Date, options?: HijriConversionOptions): HijriDate;
|
|
46
69
|
/**
|
|
47
70
|
* Converts a Hijri date to a `Date` at local midnight of the matching
|
|
48
71
|
* Gregorian day.
|
|
49
72
|
*
|
|
50
73
|
* @throws {RangeError} if `hijri` is not a valid date in the supported
|
|
51
|
-
* range.
|
|
74
|
+
* range, or the adjustment is not an integer from -2 to 2.
|
|
52
75
|
*/
|
|
53
|
-
export declare function toGregorian(hijri: HijriDate): Date;
|
|
76
|
+
export declare function toGregorian(hijri: HijriDate, options?: HijriConversionOptions): Date;
|
|
54
77
|
//# sourceMappingURL=convert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/core/convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC;AA0BzC
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../src/core/convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC;AA0BzC;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAmB,CAAC;AAC1C,eAAO,MAAM,QAAQ,QAA6C,CAAC;AAEnE,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,UAWjE;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,UAAU,SAAI;;;EAEhD;AAqBD,mDAAmD;AACnD,wBAAgB,iBAAiB,IAAI;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,GAAG,EAAE,SAAS,CAAA;CAAE,CAStE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,EAAE,GAAG,EAAE,CAgBxE;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAkBtD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,SAAY,EAClB,UAAU,SAAI,GACb,SAAS,CA8BX;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,SAAS,EAChB,MAAM,SAAgB,EACtB,UAAU,SAAI,UAkBf;AAED;;;;;;;GAOG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,sBAA2B,GACnC,SAAS,CAMX;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,SAAS,EAChB,OAAO,GAAE,sBAA2B,GACnC,IAAI,CAGN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getHijriMonthLength, getSupportedRange, isValidHijri, toGregorian, toHijri, } from './convert.js';
|
|
1
|
+
export { getHijriMonthLength, getSupportedRange, isValidHijri, toGregorian, toHijri, type HijriConversionOptions, } from './convert.js';
|
|
2
2
|
export { formatHijri, type FormatHijriOptions } from './format.js';
|
|
3
3
|
export { getMonthNames, getWeekdayNames, toArabicDigits, type CalendarType, type Digits, type Locale, type WeekdayFormat, } from './locale.js';
|
|
4
4
|
export type { HijriDate } from './types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,OAAO,EACP,KAAK,sBAAsB,GAC5B,MAAM,cAAW,CAAC;AACnB,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAU,CAAC;AAChE,OAAO,EACL,aAAa,EACb,eAAe,EACf,cAAc,EACd,KAAK,YAAY,EACjB,KAAK,MAAM,EACX,KAAK,MAAM,EACX,KAAK,aAAa,GACnB,MAAM,aAAU,CAAC;AAClB,YAAY,EAAE,SAAS,EAAE,MAAM,YAAS,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type Locale = 'ar' | 'en';
|
|
2
2
|
export type Digits = 'arabic' | 'latin';
|
|
3
3
|
export type CalendarType = 'hijri' | 'gregorian';
|
|
4
|
-
export type WeekdayFormat = 'short' | 'long';
|
|
4
|
+
export type WeekdayFormat = 'short' | 'long' | 'narrow';
|
|
5
5
|
/**
|
|
6
6
|
* The 12 month names of a calendar, January / Muharram first. Returns a
|
|
7
7
|
* new array on every call.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../src/core/locale.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AACjC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../src/core/locale.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;AACjC,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,WAAW,CAAC;AACjD,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;AAiGxD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE,MAAM,GACb,MAAM,EAAE,CAGV;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,aAAsB,GAC7B,MAAM,EAAE,CAEV;AAID,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAI7D;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,kDAAkD;AAClD,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAElE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-hilal",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Hijri (Umm al-Qura) and Gregorian date picker for React Native. Cross-platform, Expo Go ready, zero dependencies.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|