react-day-picker 8.8.2 → 8.9.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 +3 -3
- package/dist/index.d.ts +125 -55
- package/dist/index.esm.js +1481 -101
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1505 -142
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +10 -1
- package/dist/index.min.js.map +1 -1
- package/dist/style.css +8 -7
- package/dist/style.css.map +1 -1
- package/dist/style.module.css +8 -7
- package/package.json +27 -27
- package/src/DayPicker.tsx +0 -2
- package/src/components/Button/Button.test.tsx +0 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/Caption/Caption.test.tsx +0 -2
- package/src/components/Caption/Caption.tsx +0 -2
- package/src/components/CaptionDropdowns/CaptionDropdowns.test.tsx +0 -2
- package/src/components/CaptionDropdowns/CaptionDropdowns.tsx +0 -2
- package/src/components/CaptionLabel/CaptionLabel.test.tsx +0 -2
- package/src/components/CaptionLabel/CaptionLabel.tsx +0 -2
- package/src/components/CaptionNavigation/CaptionNavigation.test.tsx +0 -2
- package/src/components/CaptionNavigation/CaptionNavigation.tsx +3 -3
- package/src/components/Day/Day.test.tsx +0 -2
- package/src/components/Day/Day.tsx +1 -1
- package/src/components/DayContent/DayContent.test.tsx +0 -2
- package/src/components/DayContent/DayContent.tsx +0 -2
- package/src/components/Dropdown/Dropdown.test.tsx +0 -2
- package/src/components/Dropdown/Dropdown.tsx +10 -5
- package/src/components/Footer/Footer.test.tsx +0 -2
- package/src/components/Footer/Footer.tsx +0 -2
- package/src/components/Head/Head.test.tsx +0 -2
- package/src/components/Head/Head.tsx +0 -2
- package/src/components/HeadRow/HeadRow.test.tsx +0 -2
- package/src/components/HeadRow/HeadRow.tsx +0 -2
- package/src/components/IconDropdown/IconDropdown.test.tsx +0 -2
- package/src/components/IconDropdown/IconDropdown.tsx +0 -2
- package/src/components/IconLeft/IconLeft.test.tsx +0 -2
- package/src/components/IconLeft/IconLeft.tsx +0 -2
- package/src/components/IconRight/IconRight.test.tsx +0 -2
- package/src/components/IconRight/IconRight.tsx +0 -2
- package/src/components/Month/Month.test.tsx +0 -2
- package/src/components/Month/Month.tsx +0 -2
- package/src/components/Months/Months.test.tsx +27 -0
- package/src/components/Months/Months.tsx +19 -0
- package/src/components/Months/index.ts +1 -0
- package/src/components/MonthsDropdown/MonthsDropdown.test.tsx +0 -2
- package/src/components/MonthsDropdown/MonthsDropdown.tsx +2 -2
- package/src/components/Navigation/Navigation.test.tsx +0 -2
- package/src/components/Navigation/Navigation.tsx +3 -3
- package/src/components/Root/Root.test.tsx +58 -15
- package/src/components/Root/Root.tsx +9 -6
- package/src/components/Row/Row.test.tsx +0 -2
- package/src/components/Row/Row.tsx +0 -2
- package/src/components/Table/Table.test.tsx +0 -2
- package/src/components/Table/Table.tsx +0 -2
- package/src/components/WeekNumber/WeekNumber.test.tsx +1 -3
- package/src/components/WeekNumber/WeekNumber.tsx +2 -2
- package/src/components/YearsDropdown/YearsDropdown.test.tsx +0 -2
- package/src/components/YearsDropdown/YearsDropdown.tsx +2 -2
- package/src/contexts/DayPicker/DayPickerContext.tsx +1 -1
- package/src/contexts/Focus/FocusContext.tsx +4 -2
- package/src/contexts/Modifiers/ModifiersContext.tsx +2 -4
- package/src/contexts/Navigation/NavigationContext.tsx +1 -1
- package/src/contexts/RootProvider.tsx +2 -4
- package/src/contexts/SelectMultiple/SelectMultipleContext.test.ts +6 -4
- package/src/contexts/SelectMultiple/SelectMultipleContext.tsx +1 -1
- package/src/contexts/SelectRange/SelectRangeContext.test.ts +3 -1
- package/src/contexts/SelectRange/SelectRangeContext.tsx +3 -5
- package/src/contexts/SelectSingle/SelectSingleContext.test.ts +3 -3
- package/src/contexts/SelectSingle/SelectSingleContext.tsx +3 -3
- package/src/hooks/useControlledValue/useControlledValue.ts +2 -2
- package/src/hooks/useDayRender/useDayRender.tsx +2 -2
- package/src/hooks/useDayRender/utils/getDayStyle.ts +4 -2
- package/src/hooks/useId/useId.ts +5 -7
- package/src/hooks/useId/useIsomorphicLayoutEffect.ts +31 -0
- package/src/hooks/useInput/useInput.ts +13 -8
- package/src/index.ts +1 -0
- package/src/style.css +8 -7
- package/src/types/DayPickerBase.ts +84 -10
- package/src/types/EventHandlers.ts +18 -10
- package/src/types/Formatters.ts +3 -3
- package/src/types/Modifiers.ts +4 -2
- package/src/types/Styles.ts +5 -5
- package/tsconfig.json +5 -3
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from 'components/HeadRow';
|
|
|
15
15
|
export * from 'components/IconDropdown';
|
|
16
16
|
export * from 'components/IconRight';
|
|
17
17
|
export * from 'components/IconLeft';
|
|
18
|
+
export * from 'components/Months';
|
|
18
19
|
export * from 'components/Row';
|
|
19
20
|
export * from 'components/WeekNumber';
|
|
20
21
|
|
package/src/style.css
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
.rdp {
|
|
2
|
-
--rdp-cell-size: 40px;
|
|
3
|
-
--rdp-caption-font-size: 18px;
|
|
4
|
-
--rdp-accent-color: #0000ff;
|
|
5
|
-
--rdp-background-color: #e7edff;
|
|
6
|
-
--rdp-accent-color-dark: #3003e1;
|
|
7
|
-
--rdp-background-color-dark: #180270;
|
|
2
|
+
--rdp-cell-size: 40px; /* Size of the day cells. */
|
|
3
|
+
--rdp-caption-font-size: 18px; /* Font size for the caption labels. */
|
|
4
|
+
--rdp-accent-color: #0000ff; /* Accent color for the background of selected days. */
|
|
5
|
+
--rdp-background-color: #e7edff; /* Background color for the hovered/focused elements. */
|
|
6
|
+
--rdp-accent-color-dark: #3003e1; /* Accent color for the background of selected days (to use in dark-mode). */
|
|
7
|
+
--rdp-background-color-dark: #180270; /* Background color for the hovered/focused elements (to use in dark-mode). */
|
|
8
8
|
--rdp-outline: 2px solid var(--rdp-accent-color); /* Outline border for focused elements */
|
|
9
9
|
--rdp-outline-selected: 3px solid var(--rdp-accent-color); /* Outline border for focused _and_ selected elements */
|
|
10
|
+
--rdp-selected-color: #fff; /* Color of selected day text */
|
|
10
11
|
|
|
11
12
|
margin: 1em;
|
|
12
13
|
}
|
|
@@ -270,7 +271,7 @@
|
|
|
270
271
|
.rdp-day_selected,
|
|
271
272
|
.rdp-day_selected:focus-visible,
|
|
272
273
|
.rdp-day_selected:hover {
|
|
273
|
-
color:
|
|
274
|
+
color: var(--rdp-selected-color);
|
|
274
275
|
opacity: 1;
|
|
275
276
|
background-color: var(--rdp-accent-color);
|
|
276
277
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import type { Locale } from 'date-fns';
|
|
2
2
|
|
|
3
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
4
|
+
|
|
3
5
|
import { CaptionLayout, CaptionProps } from 'components/Caption';
|
|
4
6
|
import { CaptionLabelProps } from 'components/CaptionLabel';
|
|
5
7
|
import { DayProps } from 'components/Day';
|
|
6
8
|
import { DayContentProps } from 'components/DayContent';
|
|
7
9
|
import { DropdownProps } from 'components/Dropdown';
|
|
8
10
|
import { FooterProps } from 'components/Footer';
|
|
11
|
+
import { MonthsProps } from 'components/Months';
|
|
9
12
|
import { RowProps } from 'components/Row';
|
|
10
13
|
import { WeekNumberProps } from 'components/WeekNumber';
|
|
11
14
|
|
|
@@ -64,7 +67,7 @@ export interface DayPickerBase {
|
|
|
64
67
|
/**
|
|
65
68
|
* Style to apply to the container element.
|
|
66
69
|
*/
|
|
67
|
-
style?:
|
|
70
|
+
style?: CSSProperties;
|
|
68
71
|
/**
|
|
69
72
|
* Change the inline styles of the HTML elements.
|
|
70
73
|
*/
|
|
@@ -226,7 +229,7 @@ export interface DayPickerBase {
|
|
|
226
229
|
/**
|
|
227
230
|
* Content to add to the table footer element.
|
|
228
231
|
*/
|
|
229
|
-
footer?:
|
|
232
|
+
footer?: ReactNode;
|
|
230
233
|
|
|
231
234
|
/**
|
|
232
235
|
* When a selection mode is set, DayPicker will focus the first selected day
|
|
@@ -275,35 +278,104 @@ export interface DayPickerBase {
|
|
|
275
278
|
*/
|
|
276
279
|
labels?: Partial<Labels>;
|
|
277
280
|
|
|
281
|
+
/**
|
|
282
|
+
* A map of formatters. Use the formatters to override the default formatting
|
|
283
|
+
* functions.
|
|
284
|
+
*/
|
|
285
|
+
formatters?: Partial<Formatters>;
|
|
286
|
+
|
|
278
287
|
/**
|
|
279
288
|
* The text direction of the calendar. Use `ltr` for left-to-right (default)
|
|
280
289
|
* or `rtl` for right-to-left.
|
|
281
290
|
*/
|
|
282
|
-
dir?:
|
|
291
|
+
dir?: HTMLDivElement['dir'];
|
|
283
292
|
|
|
284
293
|
/**
|
|
285
|
-
* A
|
|
286
|
-
*
|
|
294
|
+
* A cryptographic nonce ("number used once") which can be used by Content
|
|
295
|
+
* Security Policy for the inline `style` attributes.
|
|
296
|
+
**/
|
|
297
|
+
nonce?: HTMLDivElement['nonce'];
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Add a `title` attribute to the container element.
|
|
301
|
+
**/
|
|
302
|
+
title?: HTMLDivElement['title'];
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Add the language tag to the container element.
|
|
306
|
+
**/
|
|
307
|
+
lang?: HTMLDivElement['lang'];
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Event callback fired when the next month button is clicked.
|
|
287
311
|
*/
|
|
288
|
-
|
|
312
|
+
onNextClick?: MonthChangeEventHandler;
|
|
313
|
+
/**
|
|
314
|
+
* Event callback fired when the previous month button is clicked.
|
|
315
|
+
*/
|
|
316
|
+
onPrevClick?: MonthChangeEventHandler;
|
|
317
|
+
/**
|
|
318
|
+
* Event callback fired when the week number is clicked. Requires
|
|
319
|
+
* `showWeekNumbers` set.
|
|
320
|
+
*/
|
|
321
|
+
onWeekNumberClick?: WeekNumberClickEventHandler;
|
|
289
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Event callback fired when the user clicks on a day.
|
|
325
|
+
*/
|
|
290
326
|
onDayClick?: DayClickEventHandler;
|
|
327
|
+
/**
|
|
328
|
+
* Event callback fired when the user focuses on a day.
|
|
329
|
+
*/
|
|
291
330
|
onDayFocus?: DayFocusEventHandler;
|
|
331
|
+
/**
|
|
332
|
+
* Event callback fired when the user blurs from a day.
|
|
333
|
+
*/
|
|
292
334
|
onDayBlur?: DayFocusEventHandler;
|
|
335
|
+
/**
|
|
336
|
+
* Event callback fired when the user hovers on a day.
|
|
337
|
+
*/
|
|
293
338
|
onDayMouseEnter?: DayMouseEventHandler;
|
|
339
|
+
/**
|
|
340
|
+
* Event callback fired when the user hovers away from a day.
|
|
341
|
+
*/
|
|
294
342
|
onDayMouseLeave?: DayMouseEventHandler;
|
|
343
|
+
/**
|
|
344
|
+
* Event callback fired when the user presses a key on a day.
|
|
345
|
+
*/
|
|
295
346
|
onDayKeyDown?: DayKeyboardEventHandler;
|
|
347
|
+
/**
|
|
348
|
+
* Event callback fired when the user presses a key on a day.
|
|
349
|
+
*/
|
|
296
350
|
onDayKeyUp?: DayKeyboardEventHandler;
|
|
351
|
+
/**
|
|
352
|
+
* Event callback fired when the user presses a key on a day.
|
|
353
|
+
*/
|
|
297
354
|
onDayKeyPress?: DayKeyboardEventHandler;
|
|
355
|
+
/**
|
|
356
|
+
* Event callback fired when the pointer enters a day.
|
|
357
|
+
*/
|
|
298
358
|
onDayPointerEnter?: DayPointerEventHandler;
|
|
359
|
+
/**
|
|
360
|
+
* Event callback fired when the pointer leaves a day.
|
|
361
|
+
*/
|
|
299
362
|
onDayPointerLeave?: DayPointerEventHandler;
|
|
363
|
+
/**
|
|
364
|
+
* Event callback when a day touch event is canceled.
|
|
365
|
+
*/
|
|
300
366
|
onDayTouchCancel?: DayTouchEventHandler;
|
|
367
|
+
/**
|
|
368
|
+
* Event callback when a day touch event ends.
|
|
369
|
+
*/
|
|
301
370
|
onDayTouchEnd?: DayTouchEventHandler;
|
|
371
|
+
/**
|
|
372
|
+
* Event callback when a day touch event moves.
|
|
373
|
+
*/
|
|
302
374
|
onDayTouchMove?: DayTouchEventHandler;
|
|
375
|
+
/**
|
|
376
|
+
* Event callback when a day touch event starts.
|
|
377
|
+
*/
|
|
303
378
|
onDayTouchStart?: DayTouchEventHandler;
|
|
304
|
-
onNextClick?: MonthChangeEventHandler;
|
|
305
|
-
onPrevClick?: MonthChangeEventHandler;
|
|
306
|
-
onWeekNumberClick?: WeekNumberClickEventHandler;
|
|
307
379
|
}
|
|
308
380
|
|
|
309
381
|
/**
|
|
@@ -324,7 +396,7 @@ export interface CustomComponents {
|
|
|
324
396
|
* Each `Day` in DayPicker should render one of the following, according to
|
|
325
397
|
* the return value of {@link useDayRender}.
|
|
326
398
|
*
|
|
327
|
-
* - an empty `
|
|
399
|
+
* - an empty `Fragment`, to render if `isHidden` is true
|
|
328
400
|
* - a `button` element, when the day is interactive, e.g. is selectable
|
|
329
401
|
* - a `div` or a `span` element, when the day is not interactive
|
|
330
402
|
*
|
|
@@ -346,6 +418,8 @@ export interface CustomComponents {
|
|
|
346
418
|
IconRight?: (props: StyledComponent) => JSX.Element | null;
|
|
347
419
|
/** The arrow left icon (used for the Navigation buttons). */
|
|
348
420
|
IconLeft?: (props: StyledComponent) => JSX.Element | null;
|
|
421
|
+
/** The component wrapping the month grids. */
|
|
422
|
+
Months?: (props: MonthsProps) => JSX.Element | null;
|
|
349
423
|
/** The component for the table rows. */
|
|
350
424
|
Row?: (props: RowProps) => JSX.Element | null;
|
|
351
425
|
/** The component for the week number in the table rows. */
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FocusEvent,
|
|
3
|
+
KeyboardEvent,
|
|
4
|
+
MouseEvent,
|
|
5
|
+
PointerEvent,
|
|
6
|
+
TouchEvent
|
|
7
|
+
} from 'react';
|
|
8
|
+
|
|
1
9
|
import { DateRange } from 'types/Matchers';
|
|
2
10
|
|
|
3
11
|
import { ActiveModifiers } from './Modifiers';
|
|
@@ -6,35 +14,35 @@ import { ActiveModifiers } from './Modifiers';
|
|
|
6
14
|
export type DayClickEventHandler = (
|
|
7
15
|
day: Date,
|
|
8
16
|
activeModifiers: ActiveModifiers,
|
|
9
|
-
e:
|
|
17
|
+
e: MouseEvent
|
|
10
18
|
) => void;
|
|
11
19
|
|
|
12
20
|
/** The event handler when a day is focused. */
|
|
13
21
|
export type DayFocusEventHandler = (
|
|
14
22
|
day: Date,
|
|
15
23
|
activeModifiers: ActiveModifiers,
|
|
16
|
-
e:
|
|
24
|
+
e: FocusEvent | KeyboardEvent
|
|
17
25
|
) => void;
|
|
18
26
|
|
|
19
27
|
/** The event handler when a day gets a keyboard event. */
|
|
20
28
|
export type DayKeyboardEventHandler = (
|
|
21
29
|
day: Date,
|
|
22
30
|
activeModifiers: ActiveModifiers,
|
|
23
|
-
e:
|
|
31
|
+
e: KeyboardEvent
|
|
24
32
|
) => void;
|
|
25
33
|
|
|
26
34
|
/** The event handler when a day gets a mouse event. */
|
|
27
35
|
export type DayMouseEventHandler = (
|
|
28
36
|
day: Date,
|
|
29
37
|
activeModifiers: ActiveModifiers,
|
|
30
|
-
e:
|
|
38
|
+
e: MouseEvent
|
|
31
39
|
) => void;
|
|
32
40
|
|
|
33
41
|
/** The event handler when a day gets a pointer event. */
|
|
34
42
|
export type DayPointerEventHandler = (
|
|
35
43
|
day: Date,
|
|
36
44
|
activeModifiers: ActiveModifiers,
|
|
37
|
-
e:
|
|
45
|
+
e: PointerEvent
|
|
38
46
|
) => void;
|
|
39
47
|
|
|
40
48
|
/** The event handler when a month is changed in the calendar. */
|
|
@@ -49,7 +57,7 @@ export type SelectMultipleEventHandler = (
|
|
|
49
57
|
/** The day that was clicked */
|
|
50
58
|
activeModifiers: ActiveModifiers,
|
|
51
59
|
/** The mouse event that triggered this event. */
|
|
52
|
-
e:
|
|
60
|
+
e: MouseEvent
|
|
53
61
|
) => void;
|
|
54
62
|
|
|
55
63
|
/** The event handler when selecting a range of days. */
|
|
@@ -60,7 +68,7 @@ export type SelectRangeEventHandler = (
|
|
|
60
68
|
selectedDay: Date,
|
|
61
69
|
/** The modifiers of the selected day. */
|
|
62
70
|
activeModifiers: ActiveModifiers,
|
|
63
|
-
e:
|
|
71
|
+
e: MouseEvent
|
|
64
72
|
) => void;
|
|
65
73
|
|
|
66
74
|
/** The event handler when selecting a single day. */
|
|
@@ -71,7 +79,7 @@ export type SelectSingleEventHandler = (
|
|
|
71
79
|
selectedDay: Date,
|
|
72
80
|
/** The modifiers of the selected day. */
|
|
73
81
|
activeModifiers: ActiveModifiers,
|
|
74
|
-
e:
|
|
82
|
+
e: MouseEvent
|
|
75
83
|
) => void;
|
|
76
84
|
|
|
77
85
|
/**The event handler when the week number is clicked. */
|
|
@@ -81,12 +89,12 @@ export type WeekNumberClickEventHandler = (
|
|
|
81
89
|
/** The dates in the clicked week. */
|
|
82
90
|
dates: Date[],
|
|
83
91
|
/** The mouse event that triggered this event. */
|
|
84
|
-
e:
|
|
92
|
+
e: MouseEvent
|
|
85
93
|
) => void;
|
|
86
94
|
|
|
87
95
|
/** The event handler when a day gets a touch event. */
|
|
88
96
|
export type DayTouchEventHandler = (
|
|
89
97
|
day: Date,
|
|
90
98
|
activeModifiers: ActiveModifiers,
|
|
91
|
-
e:
|
|
99
|
+
e: TouchEvent
|
|
92
100
|
) => void;
|
package/src/types/Formatters.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
/** Represents a function to format a date. */
|
|
4
4
|
export type DateFormatter = (
|
|
5
5
|
date: Date,
|
|
6
6
|
options?: { locale?: Locale }
|
|
7
|
-
) =>
|
|
7
|
+
) => ReactNode;
|
|
8
8
|
|
|
9
9
|
/** Represent a map of formatters used to render localized content. */
|
|
10
10
|
export type Formatters = {
|
|
@@ -26,4 +26,4 @@ export type Formatters = {
|
|
|
26
26
|
export type WeekNumberFormatter = (
|
|
27
27
|
weekNumber: number,
|
|
28
28
|
options?: { locale?: Locale }
|
|
29
|
-
) =>
|
|
29
|
+
) => ReactNode;
|
package/src/types/Modifiers.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
1
3
|
import { Matcher } from './Matchers';
|
|
2
4
|
|
|
3
5
|
/** A _modifier_ represents different styles or states of a day displayed in the calendar. */
|
|
@@ -43,8 +45,8 @@ export type ActiveModifiers = Record<Modifier, true> &
|
|
|
43
45
|
Partial<Record<InternalModifier, true>>;
|
|
44
46
|
|
|
45
47
|
/** The style to apply to each day element matching a modifier. */
|
|
46
|
-
export type ModifiersStyles = Record<Modifier,
|
|
47
|
-
Partial<Record<InternalModifier,
|
|
48
|
+
export type ModifiersStyles = Record<Modifier, CSSProperties> &
|
|
49
|
+
Partial<Record<InternalModifier, CSSProperties>>;
|
|
48
50
|
|
|
49
51
|
/** The classnames to assign to each day element matching a modifier. */
|
|
50
52
|
export type ModifiersClassNames = Record<Modifier, string> &
|
package/src/types/Styles.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
|
|
3
3
|
/** The style (either via class names or via in-line styles) of an element. */
|
|
4
|
-
export type StyledElement<T = string |
|
|
4
|
+
export type StyledElement<T = string | CSSProperties> = {
|
|
5
5
|
/** The root element. */
|
|
6
6
|
readonly root: T;
|
|
7
7
|
/** The root element when `numberOfMonths > 1`. */
|
|
@@ -114,12 +114,12 @@ export type ClassNames = Partial<StyledElement<string>>;
|
|
|
114
114
|
* `modifiersStyles` prop.
|
|
115
115
|
*/
|
|
116
116
|
export type Styles = Partial<
|
|
117
|
-
Omit<StyledElement<
|
|
117
|
+
Omit<StyledElement<CSSProperties>, InternalModifiersElement>
|
|
118
118
|
>;
|
|
119
119
|
|
|
120
120
|
/** Props of a component that can be styled via classNames or inline-styles. */
|
|
121
121
|
export type StyledComponent = {
|
|
122
122
|
className?: string;
|
|
123
|
-
style?:
|
|
124
|
-
children?:
|
|
123
|
+
style?: CSSProperties;
|
|
124
|
+
children?: ReactNode;
|
|
125
125
|
};
|
package/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
3
|
"target": "es5",
|
|
4
|
-
"jsx": "react",
|
|
4
|
+
"jsx": "react-jsx",
|
|
5
5
|
"module": "es6",
|
|
6
6
|
"moduleResolution": "node",
|
|
7
7
|
"rootDir": "./",
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
"sourceMap": true,
|
|
15
15
|
"outDir": "./dist",
|
|
16
16
|
"importHelpers": true,
|
|
17
|
-
"esModuleInterop":
|
|
17
|
+
"esModuleInterop": false,
|
|
18
|
+
"allowSyntheticDefaultImports": false,
|
|
18
19
|
"forceConsistentCasingInFileNames": true,
|
|
19
20
|
"strict": true,
|
|
20
21
|
"skipLibCheck": true,
|
|
21
|
-
"resolveJsonModule": true
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
"isolatedModules": false
|
|
22
24
|
},
|
|
23
25
|
"include": ["test", "src"]
|
|
24
26
|
}
|