react-day-picker 9.13.0 → 9.13.2
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 +1 -1
- package/dist/cjs/UI.d.ts +33 -33
- package/dist/cjs/UI.js +2 -2
- package/dist/cjs/locale/ja-Hira.js +1 -1
- package/dist/cjs/locale/se.js +2 -2
- package/dist/cjs/persian.js +9 -1
- package/dist/esm/UI.d.ts +33 -33
- package/dist/esm/UI.js +2 -2
- package/dist/esm/locale/ja-Hira.js +1 -1
- package/dist/esm/locale/se.js +2 -2
- package/dist/esm/persian.js +9 -1
- package/package.json +3 -3
- package/src/style.css.d.ts +3 -0
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ See **[daypicker.dev](https://daypicker.dev)** for guides, examples and API refe
|
|
|
18
18
|
- 🎨 Minimal design that can be [easily styled](https://daypicker.dev/docs/styling) with CSS or any CSS framework.
|
|
19
19
|
- 📅 Supports [selections](https://daypicker.dev/docs/selection-modes) of single days, multiple days, ranges of days, or [custom selections](https://daypicker.dev/guides/custom-selections).
|
|
20
20
|
- 🌍 Can be [localized](https://daypicker.dev/docs/localization) into any language and [time zones](https://daypicker.dev/docs/time-zone).
|
|
21
|
-
- 🌐 Support for [ISO 8601](
|
|
21
|
+
- 🌐 Support for [ISO 8601](http://daypicker.dev/localization/iso-and-broadcast#iso-8601-calendar), [Persian](http://daypicker.dev/localization/persian), [Buddhist (Thai)](http://daypicker.dev/localization/buddhist), [Ethiopic](http://daypicker.dev/localization/ethiopic), [Hebrew](http://daypicker.dev/localization/hebrew) and [broadcast](http://daypicker.dev/localization/iso-and-broadcast#broadcast-calendar) calendar.
|
|
22
22
|
- 🦮 Complies with WCAG 2.1 AA requirements for [accessibility](https://daypicker.dev/guides/accessibility).
|
|
23
23
|
- ⚙️ [Customizable components](https://daypicker.dev/guides/custom-components) to extend the rendered elements.
|
|
24
24
|
- 🔤 Easy integration [with input fields](https://daypicker.dev/guides/input-fields).
|
package/dist/cjs/UI.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export declare enum UI {
|
|
|
66
66
|
/** The dropdown with the years. */
|
|
67
67
|
YearsDropdown = "years_dropdown"
|
|
68
68
|
}
|
|
69
|
-
/** Enum representing flags for the {@link UI.Day} element. */
|
|
69
|
+
/** Enum representing flags for the {@link UI | UI.Day} element. */
|
|
70
70
|
export declare enum DayFlag {
|
|
71
71
|
/** The day is disabled. */
|
|
72
72
|
disabled = "disabled",
|
|
@@ -80,7 +80,7 @@ export declare enum DayFlag {
|
|
|
80
80
|
today = "today"
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
83
|
+
* Enum representing selection states that can be applied to the {@link UI | UI.Day}
|
|
84
84
|
* element in selection mode.
|
|
85
85
|
*/
|
|
86
86
|
export declare enum SelectionState {
|
|
@@ -131,40 +131,40 @@ export declare enum Animation {
|
|
|
131
131
|
export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
132
132
|
/**
|
|
133
133
|
* This element was applied to the style of any button in DayPicker and it is
|
|
134
|
-
* replaced by {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
134
|
+
* replaced by {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
135
135
|
*
|
|
136
136
|
* @deprecated
|
|
137
137
|
*/
|
|
138
138
|
button: T;
|
|
139
139
|
/**
|
|
140
140
|
* This element was resetting the style of any button in DayPicker and it is
|
|
141
|
-
* replaced by {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
141
|
+
* replaced by {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
142
142
|
*
|
|
143
143
|
* @deprecated
|
|
144
144
|
*/
|
|
145
145
|
button_reset: T;
|
|
146
146
|
/**
|
|
147
|
-
* This element has been renamed to {@link UI.MonthCaption}.
|
|
147
|
+
* This element has been renamed to {@link UI | UI.MonthCaption}.
|
|
148
148
|
*
|
|
149
149
|
* @deprecated
|
|
150
150
|
*/
|
|
151
151
|
caption: T;
|
|
152
152
|
/**
|
|
153
153
|
* This element has been removed. Captions are styled via
|
|
154
|
-
* {@link UI.MonthCaption}.
|
|
154
|
+
* {@link UI | UI.MonthCaption}.
|
|
155
155
|
*
|
|
156
156
|
* @deprecated
|
|
157
157
|
*/
|
|
158
158
|
caption_between: T;
|
|
159
159
|
/**
|
|
160
|
-
* This element has been renamed to {@link UI.Dropdowns}.
|
|
160
|
+
* This element has been renamed to {@link UI | UI.Dropdowns}.
|
|
161
161
|
*
|
|
162
162
|
* @deprecated
|
|
163
163
|
*/
|
|
164
164
|
caption_dropdowns: T;
|
|
165
165
|
/**
|
|
166
166
|
* This element has been removed. Captions are styled via
|
|
167
|
-
* {@link UI.MonthCaption}.
|
|
167
|
+
* {@link UI | UI.MonthCaption}.
|
|
168
168
|
*
|
|
169
169
|
* @deprecated
|
|
170
170
|
*/
|
|
@@ -176,74 +176,74 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
176
176
|
*/
|
|
177
177
|
caption_start: T;
|
|
178
178
|
/**
|
|
179
|
-
* This element has been renamed to {@link UI.Day}.
|
|
179
|
+
* This element has been renamed to {@link UI | UI.Day}.
|
|
180
180
|
*
|
|
181
181
|
* @deprecated
|
|
182
182
|
*/
|
|
183
183
|
cell: T;
|
|
184
184
|
/**
|
|
185
|
-
* This element has been renamed to {@link DayFlag.disabled}.
|
|
185
|
+
* This element has been renamed to {@link DayFlag | DayFlag.disabled}.
|
|
186
186
|
*
|
|
187
187
|
* @deprecated
|
|
188
188
|
*/
|
|
189
189
|
day_disabled: T;
|
|
190
190
|
/**
|
|
191
|
-
* This element has been renamed to {@link DayFlag.hidden}.
|
|
191
|
+
* This element has been renamed to {@link DayFlag | DayFlag.hidden}.
|
|
192
192
|
*
|
|
193
193
|
* @deprecated
|
|
194
194
|
*/
|
|
195
195
|
day_hidden: T;
|
|
196
196
|
/**
|
|
197
|
-
* This element has been renamed to {@link DayFlag.outside}.
|
|
197
|
+
* This element has been renamed to {@link DayFlag | DayFlag.outside}.
|
|
198
198
|
*
|
|
199
199
|
* @deprecated
|
|
200
200
|
*/
|
|
201
201
|
day_outside: T;
|
|
202
202
|
/**
|
|
203
|
-
* This element has been renamed to {@link SelectionState.range_end}.
|
|
203
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_end}.
|
|
204
204
|
*
|
|
205
205
|
* @deprecated
|
|
206
206
|
*/
|
|
207
207
|
day_range_end: T;
|
|
208
208
|
/**
|
|
209
|
-
* This element has been renamed to {@link SelectionState.range_middle}.
|
|
209
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_middle}.
|
|
210
210
|
*
|
|
211
211
|
* @deprecated
|
|
212
212
|
*/
|
|
213
213
|
day_range_middle: T;
|
|
214
214
|
/**
|
|
215
|
-
* This element has been renamed to {@link SelectionState.range_start}.
|
|
215
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_start}.
|
|
216
216
|
*
|
|
217
217
|
* @deprecated
|
|
218
218
|
*/
|
|
219
219
|
day_range_start: T;
|
|
220
220
|
/**
|
|
221
|
-
* This element has been renamed to {@link SelectionState.selected}.
|
|
221
|
+
* This element has been renamed to {@link SelectionState | SelectionState.selected}.
|
|
222
222
|
*
|
|
223
223
|
* @deprecated
|
|
224
224
|
*/
|
|
225
225
|
day_selected: T;
|
|
226
226
|
/**
|
|
227
|
-
* This element has been renamed to {@link DayFlag.today}.
|
|
227
|
+
* This element has been renamed to {@link DayFlag | DayFlag.today}.
|
|
228
228
|
*
|
|
229
229
|
* @deprecated
|
|
230
230
|
*/
|
|
231
231
|
day_today: T;
|
|
232
232
|
/**
|
|
233
|
-
* This element has been removed. The dropdown icon is now {@link UI.Chevron}
|
|
234
|
-
* inside a {@link UI.CaptionLabel}.
|
|
233
|
+
* This element has been removed. The dropdown icon is now {@link UI | UI.Chevron}
|
|
234
|
+
* inside a {@link UI | UI.CaptionLabel}.
|
|
235
235
|
*
|
|
236
236
|
* @deprecated
|
|
237
237
|
*/
|
|
238
238
|
dropdown_icon: T;
|
|
239
239
|
/**
|
|
240
|
-
* This element has been renamed to {@link UI.MonthsDropdown}.
|
|
240
|
+
* This element has been renamed to {@link UI | UI.MonthsDropdown}.
|
|
241
241
|
*
|
|
242
242
|
* @deprecated
|
|
243
243
|
*/
|
|
244
244
|
dropdown_month: T;
|
|
245
245
|
/**
|
|
246
|
-
* This element has been renamed to {@link UI.YearsDropdown}.
|
|
246
|
+
* This element has been renamed to {@link UI | UI.YearsDropdown}.
|
|
247
247
|
*
|
|
248
248
|
* @deprecated
|
|
249
249
|
*/
|
|
@@ -255,13 +255,13 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
255
255
|
*/
|
|
256
256
|
head: T;
|
|
257
257
|
/**
|
|
258
|
-
* This element has been renamed to {@link UI.Weekday}.
|
|
258
|
+
* This element has been renamed to {@link UI | UI.Weekday}.
|
|
259
259
|
*
|
|
260
260
|
* @deprecated
|
|
261
261
|
*/
|
|
262
262
|
head_cell: T;
|
|
263
263
|
/**
|
|
264
|
-
* This element has been renamed to {@link UI.Weekdays}.
|
|
264
|
+
* This element has been renamed to {@link UI | UI.Weekdays}.
|
|
265
265
|
*
|
|
266
266
|
* @deprecated
|
|
267
267
|
*/
|
|
@@ -275,50 +275,50 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
275
275
|
multiple_months: T;
|
|
276
276
|
/**
|
|
277
277
|
* This element has been removed. To style the navigation buttons, use
|
|
278
|
-
* {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
278
|
+
* {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
279
279
|
*
|
|
280
280
|
* @deprecated
|
|
281
281
|
*/
|
|
282
282
|
nav_button: T;
|
|
283
283
|
/**
|
|
284
|
-
* This element has been renamed to {@link UI.NextMonthButton}.
|
|
284
|
+
* This element has been renamed to {@link UI | UI.NextMonthButton}.
|
|
285
285
|
*
|
|
286
286
|
* @deprecated
|
|
287
287
|
*/
|
|
288
288
|
nav_button_next: T;
|
|
289
289
|
/**
|
|
290
|
-
* This element has been renamed to {@link UI.PreviousMonthButton}.
|
|
290
|
+
* This element has been renamed to {@link UI | UI.PreviousMonthButton}.
|
|
291
291
|
*
|
|
292
292
|
* @deprecated
|
|
293
293
|
*/
|
|
294
294
|
nav_button_previous: T;
|
|
295
295
|
/**
|
|
296
|
-
* This element has been removed. The dropdown icon is now {@link UI.Chevron}
|
|
297
|
-
* inside a {@link UI.NextMonthButton} or a {@link UI.PreviousMonthButton}.
|
|
296
|
+
* This element has been removed. The dropdown icon is now {@link UI | UI.Chevron}
|
|
297
|
+
* inside a {@link UI | UI.NextMonthButton} or a {@link UI | UI.PreviousMonthButton}.
|
|
298
298
|
*
|
|
299
299
|
* @deprecated
|
|
300
300
|
*/
|
|
301
301
|
nav_icon: T;
|
|
302
302
|
/**
|
|
303
|
-
* This element has been renamed to {@link UI.Week}.
|
|
303
|
+
* This element has been renamed to {@link UI | UI.Week}.
|
|
304
304
|
*
|
|
305
305
|
* @deprecated
|
|
306
306
|
*/
|
|
307
307
|
row: T;
|
|
308
308
|
/**
|
|
309
|
-
* This element has been renamed to {@link UI.MonthGrid}.
|
|
309
|
+
* This element has been renamed to {@link UI | UI.MonthGrid}.
|
|
310
310
|
*
|
|
311
311
|
* @deprecated
|
|
312
312
|
*/
|
|
313
313
|
table: T;
|
|
314
314
|
/**
|
|
315
|
-
* This element has been renamed to {@link UI.Weeks}.
|
|
315
|
+
* This element has been renamed to {@link UI | UI.Weeks}.
|
|
316
316
|
*
|
|
317
317
|
* @deprecated
|
|
318
318
|
*/
|
|
319
319
|
tbody: T;
|
|
320
320
|
/**
|
|
321
|
-
* This element has been removed. The {@link UI.Footer} is now a single element
|
|
321
|
+
* This element has been removed. The {@link UI | UI.Footer} is now a single element
|
|
322
322
|
* below the months.
|
|
323
323
|
*
|
|
324
324
|
* @deprecated
|
|
@@ -332,7 +332,7 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
332
332
|
*/
|
|
333
333
|
vhidden: T;
|
|
334
334
|
/**
|
|
335
|
-
* This element has been renamed. Use {@link UI.WeekNumber} instead.
|
|
335
|
+
* This element has been renamed. Use {@link UI | UI.WeekNumber} instead.
|
|
336
336
|
*
|
|
337
337
|
* @deprecated
|
|
338
338
|
*/
|
package/dist/cjs/UI.js
CHANGED
|
@@ -69,7 +69,7 @@ var UI;
|
|
|
69
69
|
/** The dropdown with the years. */
|
|
70
70
|
UI["YearsDropdown"] = "years_dropdown";
|
|
71
71
|
})(UI || (exports.UI = UI = {}));
|
|
72
|
-
/** Enum representing flags for the {@link UI.Day} element. */
|
|
72
|
+
/** Enum representing flags for the {@link UI | UI.Day} element. */
|
|
73
73
|
var DayFlag;
|
|
74
74
|
(function (DayFlag) {
|
|
75
75
|
/** The day is disabled. */
|
|
@@ -84,7 +84,7 @@ var DayFlag;
|
|
|
84
84
|
DayFlag["today"] = "today";
|
|
85
85
|
})(DayFlag || (exports.DayFlag = DayFlag = {}));
|
|
86
86
|
/**
|
|
87
|
-
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
87
|
+
* Enum representing selection states that can be applied to the {@link UI | UI.Day}
|
|
88
88
|
* element in selection mode.
|
|
89
89
|
*/
|
|
90
90
|
var SelectionState;
|
package/dist/cjs/locale/se.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.se = {
|
|
|
11
11
|
const lib = dateLib ?? new DateLib_js_1.DateLib(options);
|
|
12
12
|
let label = lib.format(date, "PPPP");
|
|
13
13
|
if (modifiers.today)
|
|
14
|
-
label = `
|
|
14
|
+
label = `Odne, ${label}`;
|
|
15
15
|
if (modifiers.selected)
|
|
16
16
|
label = `${label}, válljejuvvon`;
|
|
17
17
|
return label;
|
|
@@ -26,7 +26,7 @@ exports.se = {
|
|
|
26
26
|
const lib = dateLib ?? new DateLib_js_1.DateLib(options);
|
|
27
27
|
let label = lib.format(date, "PPPP");
|
|
28
28
|
if (modifiers?.today) {
|
|
29
|
-
label = `
|
|
29
|
+
label = `Odne, ${label}`;
|
|
30
30
|
}
|
|
31
31
|
return label;
|
|
32
32
|
},
|
package/dist/cjs/persian.js
CHANGED
|
@@ -74,7 +74,15 @@ function DayPicker(props) {
|
|
|
74
74
|
noonSafe,
|
|
75
75
|
overrides: dateLibProp,
|
|
76
76
|
});
|
|
77
|
-
|
|
77
|
+
const locale = localeProp ?? exports.faIR;
|
|
78
|
+
return (react_1.default.createElement(index_js_1.DayPicker, { ...restProps, locale: locale, numerals: numerals ?? "arabext", dir: dir ?? "rtl", dateLib: dateLib, formatters: {
|
|
79
|
+
formatWeekdayName: (date, _options, lib) => {
|
|
80
|
+
const activeLib = lib ?? dateLib;
|
|
81
|
+
const isPersian = activeLib.options.locale?.code?.startsWith("fa");
|
|
82
|
+
return activeLib.format(date, isPersian ? "ccccc" : "cccccc");
|
|
83
|
+
},
|
|
84
|
+
...props.formatters,
|
|
85
|
+
} }));
|
|
78
86
|
}
|
|
79
87
|
/**
|
|
80
88
|
* Returns the date library used in the Persian calendar.
|
package/dist/esm/UI.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export declare enum UI {
|
|
|
66
66
|
/** The dropdown with the years. */
|
|
67
67
|
YearsDropdown = "years_dropdown"
|
|
68
68
|
}
|
|
69
|
-
/** Enum representing flags for the {@link UI.Day} element. */
|
|
69
|
+
/** Enum representing flags for the {@link UI | UI.Day} element. */
|
|
70
70
|
export declare enum DayFlag {
|
|
71
71
|
/** The day is disabled. */
|
|
72
72
|
disabled = "disabled",
|
|
@@ -80,7 +80,7 @@ export declare enum DayFlag {
|
|
|
80
80
|
today = "today"
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
|
-
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
83
|
+
* Enum representing selection states that can be applied to the {@link UI | UI.Day}
|
|
84
84
|
* element in selection mode.
|
|
85
85
|
*/
|
|
86
86
|
export declare enum SelectionState {
|
|
@@ -131,40 +131,40 @@ export declare enum Animation {
|
|
|
131
131
|
export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
132
132
|
/**
|
|
133
133
|
* This element was applied to the style of any button in DayPicker and it is
|
|
134
|
-
* replaced by {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
134
|
+
* replaced by {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
135
135
|
*
|
|
136
136
|
* @deprecated
|
|
137
137
|
*/
|
|
138
138
|
button: T;
|
|
139
139
|
/**
|
|
140
140
|
* This element was resetting the style of any button in DayPicker and it is
|
|
141
|
-
* replaced by {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
141
|
+
* replaced by {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
142
142
|
*
|
|
143
143
|
* @deprecated
|
|
144
144
|
*/
|
|
145
145
|
button_reset: T;
|
|
146
146
|
/**
|
|
147
|
-
* This element has been renamed to {@link UI.MonthCaption}.
|
|
147
|
+
* This element has been renamed to {@link UI | UI.MonthCaption}.
|
|
148
148
|
*
|
|
149
149
|
* @deprecated
|
|
150
150
|
*/
|
|
151
151
|
caption: T;
|
|
152
152
|
/**
|
|
153
153
|
* This element has been removed. Captions are styled via
|
|
154
|
-
* {@link UI.MonthCaption}.
|
|
154
|
+
* {@link UI | UI.MonthCaption}.
|
|
155
155
|
*
|
|
156
156
|
* @deprecated
|
|
157
157
|
*/
|
|
158
158
|
caption_between: T;
|
|
159
159
|
/**
|
|
160
|
-
* This element has been renamed to {@link UI.Dropdowns}.
|
|
160
|
+
* This element has been renamed to {@link UI | UI.Dropdowns}.
|
|
161
161
|
*
|
|
162
162
|
* @deprecated
|
|
163
163
|
*/
|
|
164
164
|
caption_dropdowns: T;
|
|
165
165
|
/**
|
|
166
166
|
* This element has been removed. Captions are styled via
|
|
167
|
-
* {@link UI.MonthCaption}.
|
|
167
|
+
* {@link UI | UI.MonthCaption}.
|
|
168
168
|
*
|
|
169
169
|
* @deprecated
|
|
170
170
|
*/
|
|
@@ -176,74 +176,74 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
176
176
|
*/
|
|
177
177
|
caption_start: T;
|
|
178
178
|
/**
|
|
179
|
-
* This element has been renamed to {@link UI.Day}.
|
|
179
|
+
* This element has been renamed to {@link UI | UI.Day}.
|
|
180
180
|
*
|
|
181
181
|
* @deprecated
|
|
182
182
|
*/
|
|
183
183
|
cell: T;
|
|
184
184
|
/**
|
|
185
|
-
* This element has been renamed to {@link DayFlag.disabled}.
|
|
185
|
+
* This element has been renamed to {@link DayFlag | DayFlag.disabled}.
|
|
186
186
|
*
|
|
187
187
|
* @deprecated
|
|
188
188
|
*/
|
|
189
189
|
day_disabled: T;
|
|
190
190
|
/**
|
|
191
|
-
* This element has been renamed to {@link DayFlag.hidden}.
|
|
191
|
+
* This element has been renamed to {@link DayFlag | DayFlag.hidden}.
|
|
192
192
|
*
|
|
193
193
|
* @deprecated
|
|
194
194
|
*/
|
|
195
195
|
day_hidden: T;
|
|
196
196
|
/**
|
|
197
|
-
* This element has been renamed to {@link DayFlag.outside}.
|
|
197
|
+
* This element has been renamed to {@link DayFlag | DayFlag.outside}.
|
|
198
198
|
*
|
|
199
199
|
* @deprecated
|
|
200
200
|
*/
|
|
201
201
|
day_outside: T;
|
|
202
202
|
/**
|
|
203
|
-
* This element has been renamed to {@link SelectionState.range_end}.
|
|
203
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_end}.
|
|
204
204
|
*
|
|
205
205
|
* @deprecated
|
|
206
206
|
*/
|
|
207
207
|
day_range_end: T;
|
|
208
208
|
/**
|
|
209
|
-
* This element has been renamed to {@link SelectionState.range_middle}.
|
|
209
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_middle}.
|
|
210
210
|
*
|
|
211
211
|
* @deprecated
|
|
212
212
|
*/
|
|
213
213
|
day_range_middle: T;
|
|
214
214
|
/**
|
|
215
|
-
* This element has been renamed to {@link SelectionState.range_start}.
|
|
215
|
+
* This element has been renamed to {@link SelectionState | SelectionState.range_start}.
|
|
216
216
|
*
|
|
217
217
|
* @deprecated
|
|
218
218
|
*/
|
|
219
219
|
day_range_start: T;
|
|
220
220
|
/**
|
|
221
|
-
* This element has been renamed to {@link SelectionState.selected}.
|
|
221
|
+
* This element has been renamed to {@link SelectionState | SelectionState.selected}.
|
|
222
222
|
*
|
|
223
223
|
* @deprecated
|
|
224
224
|
*/
|
|
225
225
|
day_selected: T;
|
|
226
226
|
/**
|
|
227
|
-
* This element has been renamed to {@link DayFlag.today}.
|
|
227
|
+
* This element has been renamed to {@link DayFlag | DayFlag.today}.
|
|
228
228
|
*
|
|
229
229
|
* @deprecated
|
|
230
230
|
*/
|
|
231
231
|
day_today: T;
|
|
232
232
|
/**
|
|
233
|
-
* This element has been removed. The dropdown icon is now {@link UI.Chevron}
|
|
234
|
-
* inside a {@link UI.CaptionLabel}.
|
|
233
|
+
* This element has been removed. The dropdown icon is now {@link UI | UI.Chevron}
|
|
234
|
+
* inside a {@link UI | UI.CaptionLabel}.
|
|
235
235
|
*
|
|
236
236
|
* @deprecated
|
|
237
237
|
*/
|
|
238
238
|
dropdown_icon: T;
|
|
239
239
|
/**
|
|
240
|
-
* This element has been renamed to {@link UI.MonthsDropdown}.
|
|
240
|
+
* This element has been renamed to {@link UI | UI.MonthsDropdown}.
|
|
241
241
|
*
|
|
242
242
|
* @deprecated
|
|
243
243
|
*/
|
|
244
244
|
dropdown_month: T;
|
|
245
245
|
/**
|
|
246
|
-
* This element has been renamed to {@link UI.YearsDropdown}.
|
|
246
|
+
* This element has been renamed to {@link UI | UI.YearsDropdown}.
|
|
247
247
|
*
|
|
248
248
|
* @deprecated
|
|
249
249
|
*/
|
|
@@ -255,13 +255,13 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
255
255
|
*/
|
|
256
256
|
head: T;
|
|
257
257
|
/**
|
|
258
|
-
* This element has been renamed to {@link UI.Weekday}.
|
|
258
|
+
* This element has been renamed to {@link UI | UI.Weekday}.
|
|
259
259
|
*
|
|
260
260
|
* @deprecated
|
|
261
261
|
*/
|
|
262
262
|
head_cell: T;
|
|
263
263
|
/**
|
|
264
|
-
* This element has been renamed to {@link UI.Weekdays}.
|
|
264
|
+
* This element has been renamed to {@link UI | UI.Weekdays}.
|
|
265
265
|
*
|
|
266
266
|
* @deprecated
|
|
267
267
|
*/
|
|
@@ -275,50 +275,50 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
275
275
|
multiple_months: T;
|
|
276
276
|
/**
|
|
277
277
|
* This element has been removed. To style the navigation buttons, use
|
|
278
|
-
* {@link UI.PreviousMonthButton} and {@link UI.NextMonthButton}.
|
|
278
|
+
* {@link UI | UI.PreviousMonthButton} and {@link UI | UI.NextMonthButton}.
|
|
279
279
|
*
|
|
280
280
|
* @deprecated
|
|
281
281
|
*/
|
|
282
282
|
nav_button: T;
|
|
283
283
|
/**
|
|
284
|
-
* This element has been renamed to {@link UI.NextMonthButton}.
|
|
284
|
+
* This element has been renamed to {@link UI | UI.NextMonthButton}.
|
|
285
285
|
*
|
|
286
286
|
* @deprecated
|
|
287
287
|
*/
|
|
288
288
|
nav_button_next: T;
|
|
289
289
|
/**
|
|
290
|
-
* This element has been renamed to {@link UI.PreviousMonthButton}.
|
|
290
|
+
* This element has been renamed to {@link UI | UI.PreviousMonthButton}.
|
|
291
291
|
*
|
|
292
292
|
* @deprecated
|
|
293
293
|
*/
|
|
294
294
|
nav_button_previous: T;
|
|
295
295
|
/**
|
|
296
|
-
* This element has been removed. The dropdown icon is now {@link UI.Chevron}
|
|
297
|
-
* inside a {@link UI.NextMonthButton} or a {@link UI.PreviousMonthButton}.
|
|
296
|
+
* This element has been removed. The dropdown icon is now {@link UI | UI.Chevron}
|
|
297
|
+
* inside a {@link UI | UI.NextMonthButton} or a {@link UI | UI.PreviousMonthButton}.
|
|
298
298
|
*
|
|
299
299
|
* @deprecated
|
|
300
300
|
*/
|
|
301
301
|
nav_icon: T;
|
|
302
302
|
/**
|
|
303
|
-
* This element has been renamed to {@link UI.Week}.
|
|
303
|
+
* This element has been renamed to {@link UI | UI.Week}.
|
|
304
304
|
*
|
|
305
305
|
* @deprecated
|
|
306
306
|
*/
|
|
307
307
|
row: T;
|
|
308
308
|
/**
|
|
309
|
-
* This element has been renamed to {@link UI.MonthGrid}.
|
|
309
|
+
* This element has been renamed to {@link UI | UI.MonthGrid}.
|
|
310
310
|
*
|
|
311
311
|
* @deprecated
|
|
312
312
|
*/
|
|
313
313
|
table: T;
|
|
314
314
|
/**
|
|
315
|
-
* This element has been renamed to {@link UI.Weeks}.
|
|
315
|
+
* This element has been renamed to {@link UI | UI.Weeks}.
|
|
316
316
|
*
|
|
317
317
|
* @deprecated
|
|
318
318
|
*/
|
|
319
319
|
tbody: T;
|
|
320
320
|
/**
|
|
321
|
-
* This element has been removed. The {@link UI.Footer} is now a single element
|
|
321
|
+
* This element has been removed. The {@link UI | UI.Footer} is now a single element
|
|
322
322
|
* below the months.
|
|
323
323
|
*
|
|
324
324
|
* @deprecated
|
|
@@ -332,7 +332,7 @@ export type DeprecatedUI<T extends CSSProperties | string> = {
|
|
|
332
332
|
*/
|
|
333
333
|
vhidden: T;
|
|
334
334
|
/**
|
|
335
|
-
* This element has been renamed. Use {@link UI.WeekNumber} instead.
|
|
335
|
+
* This element has been renamed. Use {@link UI | UI.WeekNumber} instead.
|
|
336
336
|
*
|
|
337
337
|
* @deprecated
|
|
338
338
|
*/
|
package/dist/esm/UI.js
CHANGED
|
@@ -66,7 +66,7 @@ export var UI;
|
|
|
66
66
|
/** The dropdown with the years. */
|
|
67
67
|
UI["YearsDropdown"] = "years_dropdown";
|
|
68
68
|
})(UI || (UI = {}));
|
|
69
|
-
/** Enum representing flags for the {@link UI.Day} element. */
|
|
69
|
+
/** Enum representing flags for the {@link UI | UI.Day} element. */
|
|
70
70
|
export var DayFlag;
|
|
71
71
|
(function (DayFlag) {
|
|
72
72
|
/** The day is disabled. */
|
|
@@ -81,7 +81,7 @@ export var DayFlag;
|
|
|
81
81
|
DayFlag["today"] = "today";
|
|
82
82
|
})(DayFlag || (DayFlag = {}));
|
|
83
83
|
/**
|
|
84
|
-
* Enum representing selection states that can be applied to the {@link UI.Day}
|
|
84
|
+
* Enum representing selection states that can be applied to the {@link UI | UI.Day}
|
|
85
85
|
* element in selection mode.
|
|
86
86
|
*/
|
|
87
87
|
export var SelectionState;
|
package/dist/esm/locale/se.js
CHANGED
|
@@ -8,7 +8,7 @@ export const se = {
|
|
|
8
8
|
const lib = dateLib ?? new DateLib(options);
|
|
9
9
|
let label = lib.format(date, "PPPP");
|
|
10
10
|
if (modifiers.today)
|
|
11
|
-
label = `
|
|
11
|
+
label = `Odne, ${label}`;
|
|
12
12
|
if (modifiers.selected)
|
|
13
13
|
label = `${label}, válljejuvvon`;
|
|
14
14
|
return label;
|
|
@@ -23,7 +23,7 @@ export const se = {
|
|
|
23
23
|
const lib = dateLib ?? new DateLib(options);
|
|
24
24
|
let label = lib.format(date, "PPPP");
|
|
25
25
|
if (modifiers?.today) {
|
|
26
|
-
label = `
|
|
26
|
+
label = `Odne, ${label}`;
|
|
27
27
|
}
|
|
28
28
|
return label;
|
|
29
29
|
},
|
package/dist/esm/persian.js
CHANGED
|
@@ -34,7 +34,15 @@ export function DayPicker(props) {
|
|
|
34
34
|
noonSafe,
|
|
35
35
|
overrides: dateLibProp,
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
const locale = localeProp ?? faIR;
|
|
38
|
+
return (React.createElement(DayPickerComponent, { ...restProps, locale: locale, numerals: numerals ?? "arabext", dir: dir ?? "rtl", dateLib: dateLib, formatters: {
|
|
39
|
+
formatWeekdayName: (date, _options, lib) => {
|
|
40
|
+
const activeLib = lib ?? dateLib;
|
|
41
|
+
const isPersian = activeLib.options.locale?.code?.startsWith("fa");
|
|
42
|
+
return activeLib.format(date, isPersian ? "ccccc" : "cccccc");
|
|
43
|
+
},
|
|
44
|
+
...props.formatters,
|
|
45
|
+
} }));
|
|
38
46
|
}
|
|
39
47
|
/**
|
|
40
48
|
* Returns the date library used in the Persian calendar.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-day-picker",
|
|
3
|
-
"version": "9.13.
|
|
3
|
+
"version": "9.13.2",
|
|
4
4
|
"description": "Customizable Date Picker for React",
|
|
5
5
|
"author": "Giampaolo Bellavite <io@gpbl.dev>",
|
|
6
6
|
"homepage": "https://daypicker.dev",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
"default": "./src/style.css"
|
|
94
94
|
},
|
|
95
95
|
"import": {
|
|
96
|
-
"types": "./src/style.
|
|
96
|
+
"types": "./src/style.css.d.ts",
|
|
97
97
|
"default": "./src/style.css"
|
|
98
98
|
},
|
|
99
99
|
"require": {
|
|
100
|
-
"types": "./src/style.
|
|
100
|
+
"types": "./src/style.css.d.ts",
|
|
101
101
|
"default": "./src/style.css"
|
|
102
102
|
}
|
|
103
103
|
},
|