@helsenorge/datepicker 13.4.0 → 13.6.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/lib/CHANGELOG.md +40 -0
- package/lib/DayPicker.js +2188 -0
- package/lib/DayPicker.js.map +1 -0
- package/lib/components/DatePicker/DatePicker.d.ts +1 -1
- package/lib/components/DatePicker/index.js +5 -1976
- package/lib/components/DatePicker/index.js.map +1 -1
- package/lib/components/Unsafe_DatePicker/BaseDayPicker/BaseDayPicker.d.ts +31 -0
- package/lib/components/Unsafe_DatePicker/BaseDayPicker/BaseDayPicker.module.scss +446 -0
- package/lib/components/Unsafe_DatePicker/BaseDayPicker/BaseDayPicker.module.scss.d.ts +31 -0
- package/lib/components/Unsafe_DatePicker/BaseDayPicker/CustomComponents.d.ts +6 -0
- package/lib/components/Unsafe_DatePicker/BaseDayPicker/utils.d.ts +1 -0
- package/lib/components/Unsafe_DatePicker/DateInputInternal.d.ts +28 -0
- package/lib/components/Unsafe_DatePicker/DatePicker.module.scss +277 -0
- package/lib/components/Unsafe_DatePicker/DatePicker.module.scss.d.ts +24 -0
- package/lib/components/Unsafe_DatePicker/RangeDatePickers.module.scss +9 -0
- package/lib/components/Unsafe_DatePicker/RangeDatePickers.module.scss.d.ts +9 -0
- package/lib/components/Unsafe_DatePicker/TimeInput/TimeInputInternal.d.ts +23 -0
- package/lib/components/Unsafe_DatePicker/TimeInput/Unsafe_TimeInput.d.ts +25 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_DateAndTime.d.ts +16 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_DateAndTime.module.scss +18 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_DateAndTime.module.scss.d.ts +10 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_DatePicker.d.ts +26 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_ISODatePicker.d.ts +9 -0
- package/lib/components/Unsafe_DatePicker/Unsafe_RangeDatePickers.d.ts +12 -0
- package/lib/components/Unsafe_DatePicker/index.d.ts +11 -0
- package/lib/components/Unsafe_DatePicker/index.js +3702 -0
- package/lib/components/Unsafe_DatePicker/index.js.map +1 -0
- package/lib/components/Unsafe_DatePicker/resourceHelper.d.ts +3 -0
- package/lib/components/Unsafe_DatePicker/validate.d.ts +1 -0
- package/lib/resources/HN.Designsystem.DatePicker.en-GB.json.d.ts +1 -4
- package/lib/resources/HN.Designsystem.DatePicker.nb-NO.json.d.ts +1 -6
- package/lib/resources/HN.Designsystem.Unsafe_DatePicker.nb-NO.json.d.ts +32 -0
- package/package.json +2 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@helsenorge/designsystem-react/scss/font-mixins' as fonts;
|
|
3
|
+
@use '@helsenorge/designsystem-react/scss/breakpoints' as breakpoints;
|
|
4
|
+
@import '@helsenorge/designsystem-react/scss/supernova/styles/colors';
|
|
5
|
+
|
|
6
|
+
.date-picker {
|
|
7
|
+
--input-height: 2.75rem;
|
|
8
|
+
|
|
9
|
+
padding-right: 0.25rem;
|
|
10
|
+
border: 2px solid var(--color-base-border-onlight-emphasized);
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
vertical-align: top;
|
|
13
|
+
height: var(--input-height);
|
|
14
|
+
box-sizing: content-box;
|
|
15
|
+
width: 7rem;
|
|
16
|
+
cursor: text;
|
|
17
|
+
|
|
18
|
+
@supports not (field-sizing: content) {
|
|
19
|
+
width: 8rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&--with-clear-button {
|
|
23
|
+
width: 9rem;
|
|
24
|
+
|
|
25
|
+
@supports not (field-sizing: content) {
|
|
26
|
+
width: 10rem;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--time {
|
|
31
|
+
width: 4.5rem;
|
|
32
|
+
|
|
33
|
+
@supports not (field-sizing: content) {
|
|
34
|
+
width: 5.5rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--with-clear-button {
|
|
38
|
+
width: 6rem;
|
|
39
|
+
|
|
40
|
+
@supports not (field-sizing: content) {
|
|
41
|
+
width: 7rem;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__inputs {
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
justify-content: flex-start;
|
|
49
|
+
flex-wrap: nowrap;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 0.1rem;
|
|
52
|
+
padding: 0.6rem;
|
|
53
|
+
|
|
54
|
+
@include breakpoints.tiny-screens-media-query {
|
|
55
|
+
padding: 0.2rem;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:has(:hover) {
|
|
60
|
+
box-shadow: 0 0 0 1px var(--color-base-border-onlight-emphasized);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:has(:focus-visible):not(.date-picker--clear-button-focused) {
|
|
64
|
+
border-color: black;
|
|
65
|
+
box-shadow: 0 0 0 2px black;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
69
|
+
// Same as Input component
|
|
70
|
+
--input-height: 3rem;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.date-field {
|
|
75
|
+
all: unset;
|
|
76
|
+
|
|
77
|
+
&__soft-error-text {
|
|
78
|
+
color: var(--color-notification-text-error);
|
|
79
|
+
|
|
80
|
+
@include fonts.sublabel-subdued;
|
|
81
|
+
|
|
82
|
+
margin-top: 0.75rem;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.legend {
|
|
87
|
+
@include fonts.label;
|
|
88
|
+
|
|
89
|
+
margin-bottom: 8px;
|
|
90
|
+
|
|
91
|
+
&__sublabel {
|
|
92
|
+
@include fonts.sublabel-subdued;
|
|
93
|
+
|
|
94
|
+
color: var(--color-base-text-onlight-subdued);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.date-segment {
|
|
99
|
+
border: none;
|
|
100
|
+
outline: none;
|
|
101
|
+
font-size: 1rem;
|
|
102
|
+
text-align: left;
|
|
103
|
+
min-width: 0.5em;
|
|
104
|
+
max-width: 3em;
|
|
105
|
+
field-sizing: content;
|
|
106
|
+
padding: 1px;
|
|
107
|
+
padding-top: 2px;
|
|
108
|
+
|
|
109
|
+
@supports not (field-sizing: content) {
|
|
110
|
+
width: 3.4ch;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&--year {
|
|
114
|
+
@supports not (field-sizing: content) {
|
|
115
|
+
width: 5ch;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&--error {
|
|
120
|
+
text-decoration: underline;
|
|
121
|
+
color: var(--color-notification-text-error);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:hover {
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
background-color: var(--core-color-neutral-50);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&:focus {
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
background-color: var(--core-color-blueberry-100);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&::placeholder {
|
|
135
|
+
color: var(--color-placeholder-text-onlight);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.calendar-button {
|
|
140
|
+
// Same as Input component
|
|
141
|
+
--button-size: 2.75rem;
|
|
142
|
+
|
|
143
|
+
width: var(--button-size);
|
|
144
|
+
height: var(--button-size);
|
|
145
|
+
background: transparent;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
border: 2px solid var(--color-base-border-onlight-emphasized);
|
|
149
|
+
border-left: none;
|
|
150
|
+
padding: 0;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
display: inline-flex;
|
|
153
|
+
|
|
154
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
155
|
+
// Same as Input component
|
|
156
|
+
--button-size: 3rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:disabled {
|
|
160
|
+
border: 2px dashed var(--color-disabled-border);
|
|
161
|
+
border-left: none;
|
|
162
|
+
|
|
163
|
+
svg {
|
|
164
|
+
fill: var(--color-disabled-graphics);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:hover:not(:disabled) {
|
|
169
|
+
background: var(--core-color-neutral-50);
|
|
170
|
+
|
|
171
|
+
svg {
|
|
172
|
+
fill: var(--color-action-graphics-onlight-hover);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
&:active:not(:disabled) {
|
|
177
|
+
background: var(--core-color-neutral-100);
|
|
178
|
+
|
|
179
|
+
svg {
|
|
180
|
+
fill: var(--color-action-graphics-emphasized-onlight);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&:focus-visible:not(:disabled) {
|
|
185
|
+
outline: 2px solid var(--color-action-border-onlight-focus);
|
|
186
|
+
border-color: var(--color-action-border-onlight-focus);
|
|
187
|
+
|
|
188
|
+
// hack to make focus border on left without moving icon
|
|
189
|
+
box-shadow: -2px 0 0 2px var(--color-action-border-onlight-focus);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
193
|
+
svg {
|
|
194
|
+
fill: var(--color-action-graphics-onlight);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.clear-button {
|
|
199
|
+
--button-size: 2.75rem;
|
|
200
|
+
|
|
201
|
+
width: var(--button-size);
|
|
202
|
+
height: var(--button-size);
|
|
203
|
+
border: none;
|
|
204
|
+
background: transparent;
|
|
205
|
+
align-items: center;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
padding: 0;
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
position: relative;
|
|
210
|
+
right: 4px;
|
|
211
|
+
|
|
212
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
213
|
+
--button-size: 3rem;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
&__placeholder {
|
|
217
|
+
--button-size: 2.75rem;
|
|
218
|
+
|
|
219
|
+
width: var(--button-size);
|
|
220
|
+
height: var(--button-size);
|
|
221
|
+
display: inline-flex;
|
|
222
|
+
|
|
223
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
224
|
+
--button-size: 3rem;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&:hover {
|
|
229
|
+
&::after {
|
|
230
|
+
content: '';
|
|
231
|
+
position: absolute;
|
|
232
|
+
border-radius: 100%;
|
|
233
|
+
background: var(--core-color-neutral-50);
|
|
234
|
+
width: 2rem;
|
|
235
|
+
height: 2rem;
|
|
236
|
+
z-index: 1;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
240
|
+
svg {
|
|
241
|
+
fill: var(--color-action-graphics-onlight-hover);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&:active {
|
|
246
|
+
&::after {
|
|
247
|
+
content: '';
|
|
248
|
+
position: absolute;
|
|
249
|
+
border-radius: 100%;
|
|
250
|
+
background: var(--core-color-neutral-100);
|
|
251
|
+
width: 2rem;
|
|
252
|
+
height: 2rem;
|
|
253
|
+
z-index: 1;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
&:focus-visible {
|
|
258
|
+
border: none;
|
|
259
|
+
outline: none;
|
|
260
|
+
|
|
261
|
+
&::after {
|
|
262
|
+
content: '';
|
|
263
|
+
position: absolute;
|
|
264
|
+
border-radius: 100%;
|
|
265
|
+
outline: 2px solid var(--color-action-border-onlight-focus);
|
|
266
|
+
width: 2rem;
|
|
267
|
+
height: 2rem;
|
|
268
|
+
z-index: 1;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* stylelint-disable-next-line no-descending-specificity */
|
|
273
|
+
svg {
|
|
274
|
+
fill: var(--color-action-graphics-onlight);
|
|
275
|
+
z-index: 2;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
'calendar-button': string;
|
|
3
|
+
'clear-button': string;
|
|
4
|
+
'clear-button__placeholder': string;
|
|
5
|
+
'date-field': string;
|
|
6
|
+
'date-field__soft-error-text': string;
|
|
7
|
+
'date-picker': string;
|
|
8
|
+
'date-picker__inputs': string;
|
|
9
|
+
'date-picker--clear-button-focused': string;
|
|
10
|
+
'date-picker--time': string;
|
|
11
|
+
'date-picker--time--with-clear-button': string;
|
|
12
|
+
'date-picker--with-clear-button': string;
|
|
13
|
+
'date-segment': string;
|
|
14
|
+
'date-segment--error': string;
|
|
15
|
+
'date-segment--year': string;
|
|
16
|
+
legend: string;
|
|
17
|
+
legend__sublabel: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ClassNames = keyof Styles;
|
|
21
|
+
|
|
22
|
+
declare const styles: Styles;
|
|
23
|
+
|
|
24
|
+
export default styles;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HNDesignsystemUnsafe_DatePicker } from '../../../resources/Resources';
|
|
2
|
+
export interface TimeInputInternalProps {
|
|
3
|
+
/** Currently given date, in format hh:mm */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Callback for change in date */
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
/** Callback for blur on input field */
|
|
8
|
+
onBlur?: (value: string) => void;
|
|
9
|
+
/** Callback for setting error text when validating */
|
|
10
|
+
setErrorText?: (text: string) => void;
|
|
11
|
+
/** Wether or not to shw a clear button when there is content in the input */
|
|
12
|
+
withClearButton?: boolean;
|
|
13
|
+
/** Resources for component */
|
|
14
|
+
resources?: Partial<HNDesignsystemUnsafe_DatePicker>;
|
|
15
|
+
/** Sets aria-describedby on the input, for connecting labels */
|
|
16
|
+
['aria-describedby']?: string;
|
|
17
|
+
/** Sets aria-labelledby on the input, for connecting labels */
|
|
18
|
+
['aria-labelledby']?: string;
|
|
19
|
+
/** Id of the input field, for connecting labels */
|
|
20
|
+
id?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const TimeInputInternal: ({ value, onChange, onBlur, id, setErrorText, resources, withClearButton, ["aria-describedby"]: ariaDescribedBy, ["aria-labelledby"]: ariaLabelledBy, }: TimeInputInternalProps) => React.ReactNode;
|
|
23
|
+
export default TimeInputInternal;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { HNDesignsystemDatePicker } from '../../../resources/Resources';
|
|
2
|
+
export interface Unsafe_TimeInputProps {
|
|
3
|
+
/** Currently given time, in format hh:mm */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Label of the input */
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
/** Id of the input field, for connecting labels */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Callback for change in date */
|
|
10
|
+
onChange?: (value: string) => void;
|
|
11
|
+
/** Callback for blur on input field */
|
|
12
|
+
onBlur?: (value: string) => void;
|
|
13
|
+
/** Callback for setting error text when validating */
|
|
14
|
+
errorText?: string;
|
|
15
|
+
/** Wether or not to shw a clear button when there is content in the input */
|
|
16
|
+
withClearButton?: boolean;
|
|
17
|
+
/** Resources for component */
|
|
18
|
+
resources?: Partial<HNDesignsystemDatePicker>;
|
|
19
|
+
/** Sets aria-describedby on the input, for connecting labels */
|
|
20
|
+
['aria-describedby']?: string;
|
|
21
|
+
/** Sets aria-labelledby on the input, for connecting labels */
|
|
22
|
+
['aria-labelledby']?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const Unsafe_TimeInput: ({ value, onChange, onBlur, errorText, id, label, resources, withClearButton, ["aria-describedby"]: ariaDescribedBy, ["aria-labelledby"]: ariaLabelledBy, }: Unsafe_TimeInputProps) => React.ReactNode;
|
|
25
|
+
export default Unsafe_TimeInput;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Unsafe_TimeInputProps } from './TimeInput/Unsafe_TimeInput';
|
|
2
|
+
import { Unsafe_DatePickerProps } from './Unsafe_DatePicker';
|
|
3
|
+
export interface Unsafe_DateAndTimeProps {
|
|
4
|
+
/** Currently given date */
|
|
5
|
+
value?: Date;
|
|
6
|
+
/** Callback for change on the given date */
|
|
7
|
+
onChange?: (value: Date | undefined) => void;
|
|
8
|
+
/** Legend for labelling both fields */
|
|
9
|
+
legend?: React.ReactNode;
|
|
10
|
+
/** Errortext for validation errors */
|
|
11
|
+
errorText?: string;
|
|
12
|
+
datepickerProps?: Unsafe_DatePickerProps;
|
|
13
|
+
timeInputProps?: Unsafe_TimeInputProps;
|
|
14
|
+
}
|
|
15
|
+
declare const Unsafe_DateAndTime: ({ value, onChange, legend, errorText, datepickerProps, timeInputProps, }: Unsafe_DateAndTimeProps) => React.ReactNode;
|
|
16
|
+
export default Unsafe_DateAndTime;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.date-and-time {
|
|
2
|
+
&--fieldset {
|
|
3
|
+
// overstyr fieldset styling fra browser
|
|
4
|
+
all: unset;
|
|
5
|
+
|
|
6
|
+
// styling med legend
|
|
7
|
+
// @todo: trengs dette?
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-flow: column;
|
|
10
|
+
gap: 1.5rem;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__fields {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
gap: 0.75rem;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaseDayPickerProps } from './BaseDayPicker/BaseDayPicker';
|
|
2
|
+
export interface Unsafe_DatePickerProps extends Omit<BaseDayPickerProps, 'selectedDate' | 'onDateChange'> {
|
|
3
|
+
/** Currently given date with type Date */
|
|
4
|
+
value?: Date;
|
|
5
|
+
/** Callback for change on the given date */
|
|
6
|
+
onChange?: (value: Date | undefined) => void;
|
|
7
|
+
/** Callback for bluring the input field */
|
|
8
|
+
onBlur?: (value: Date | undefined) => void;
|
|
9
|
+
/** Label of the input */
|
|
10
|
+
label?: React.ReactNode;
|
|
11
|
+
/** Id of the input field, for connecting labels */
|
|
12
|
+
id?: string;
|
|
13
|
+
/** Error text for the input field */
|
|
14
|
+
errorText?: string;
|
|
15
|
+
/** Wether or not to shw a clear button when there is content in the input */
|
|
16
|
+
withClearButton?: boolean;
|
|
17
|
+
/** Sets aria-describedby on the input, for connecting labels */
|
|
18
|
+
['aria-describedby']?: string;
|
|
19
|
+
/** Sets aria-labelledby on the input, for connecting labels */
|
|
20
|
+
['aria-labelledby']?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const Unsafe_DatePicker: {
|
|
23
|
+
({ value, onChange, onBlur, label, id, errorText, withClearButton, ["aria-describedby"]: ariaDescribedBy, ["aria-labelledby"]: ariaLabelledBy, resources, ...baseDayPickerProps }: Unsafe_DatePickerProps): JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
export default Unsafe_DatePicker;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Unsafe_DatePickerProps } from './Unsafe_DatePicker';
|
|
2
|
+
export interface ISODateInputProps extends Omit<Unsafe_DatePickerProps, 'value' | 'onChange'> {
|
|
3
|
+
/** Currently given date, given as ISO string */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Callback for change in the given date as ISO string */
|
|
6
|
+
onChange?: (dateValue: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const Unsafe_ISODatePicker: ({ value, onChange, ...baseDateInputProps }: ISODateInputProps) => JSX.Element;
|
|
9
|
+
export default Unsafe_ISODatePicker;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Unsafe_DatePickerProps } from './Unsafe_DatePicker';
|
|
3
|
+
export interface RangeDateInputsProps {
|
|
4
|
+
/** The 'from' date. Must be DateInput */
|
|
5
|
+
from: React.ReactElement<Unsafe_DatePickerProps>;
|
|
6
|
+
/** The 'to' date. Must be DateInput */
|
|
7
|
+
to: React.ReactElement<Unsafe_DatePickerProps>;
|
|
8
|
+
/** Callback when the date range changes with validation result */
|
|
9
|
+
onRangeChange?: (from: Date | undefined, to: Date | undefined, isValid: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const Unsafe_RangeDatePickers: React.FC<RangeDateInputsProps>;
|
|
12
|
+
export default Unsafe_RangeDatePickers;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Modifiers, Matcher } from 'react-day-picker';
|
|
2
|
+
import { default as BaseDayPicker, BaseDayPickerProps } from './BaseDayPicker/BaseDayPicker';
|
|
3
|
+
import { default as Unsafe_TimeInput } from './TimeInput/Unsafe_TimeInput';
|
|
4
|
+
import { default as Unsafe_DateAndTime } from './Unsafe_DateAndTime';
|
|
5
|
+
import { default as Unsafe_DatePicker } from './Unsafe_DatePicker';
|
|
6
|
+
import { default as Unsafe_ISODatePicker } from './Unsafe_ISODatePicker';
|
|
7
|
+
export { BaseDayPicker as Unsafe_DatePickerStandalone };
|
|
8
|
+
export type { Modifiers, Matcher };
|
|
9
|
+
export type { BaseDayPickerProps as Unsafe_DatePickerStandaloneProps };
|
|
10
|
+
export { Unsafe_DatePicker, Unsafe_ISODatePicker, Unsafe_TimeInput, Unsafe_DateAndTime };
|
|
11
|
+
export default Unsafe_DatePicker;
|