@skyscanner/backpack-web 25.1.0 → 25.3.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.
Files changed (57) hide show
  1. package/bpk-component-badge/src/BpkBadge.js +4 -4
  2. package/bpk-component-breakpoint/index.d.ts +21 -0
  3. package/bpk-component-breakpoint/src/BpkBreakpoint.d.ts +39 -0
  4. package/bpk-component-breakpoint/src/BpkBreakpoint.js +18 -24
  5. package/bpk-component-button/src/BpkButtonV2/BpkButton.js +7 -7
  6. package/bpk-component-calendar/index.d.ts +4 -1
  7. package/bpk-component-calendar/src/BpkCalendarContainer.d.ts +15 -7
  8. package/bpk-component-calendar/src/BpkCalendarContainer.js +4 -2
  9. package/bpk-component-calendar/src/BpkCalendarDate.d.ts +12 -12
  10. package/bpk-component-calendar/src/BpkCalendarGrid.d.ts +4 -4
  11. package/bpk-component-calendar/src/BpkCalendarGridHeader.d.ts +1 -1
  12. package/bpk-component-calendar/src/Week.d.ts +9 -9
  13. package/bpk-component-calendar/src/Week.js +2 -2
  14. package/bpk-component-card/src/BpkCardWrapper.module.css +1 -1
  15. package/bpk-component-card/src/BpkDividedCard.js +3 -3
  16. package/bpk-component-chip/src/BpkDismissibleChip.js +3 -3
  17. package/bpk-component-chip/src/BpkSelectableChip.js +7 -7
  18. package/bpk-component-datepicker/index.d.ts +23 -0
  19. package/bpk-component-datepicker/src/BpkDatepicker.d.ts +533 -0
  20. package/bpk-component-datepicker/src/BpkDatepicker.js +9 -46
  21. package/bpk-component-datepicker/src/themeAttributes.js +1 -0
  22. package/bpk-component-image/index.d.ts +27 -0
  23. package/bpk-component-image/src/BpkBackgroundImage.d.ts +50 -0
  24. package/bpk-component-image/src/BpkBackgroundImage.js +4 -16
  25. package/bpk-component-image/src/BpkImage.d.ts +48 -0
  26. package/bpk-component-image/src/BpkImage.js +10 -36
  27. package/bpk-component-image/src/BpkImageBorderRadiusStyles.d.ts +23 -0
  28. package/bpk-component-image/src/BpkImageBorderRadiusStyles.js +3 -1
  29. package/bpk-component-image/src/withLazyLoading.d.ts +73 -0
  30. package/bpk-component-image/src/withLazyLoading.js +18 -28
  31. package/bpk-component-image/src/withLoadingBehavior.d.ts +57 -0
  32. package/bpk-component-image/src/withLoadingBehavior.js +3 -2
  33. package/bpk-component-input/index.d.ts +2 -16
  34. package/bpk-component-input/src/BpkClearButton.d.ts +5 -9
  35. package/bpk-component-input/src/BpkInput.d.ts +16 -21
  36. package/bpk-component-input/src/common-types.d.ts +3 -6
  37. package/bpk-component-input/src/common-types.js +0 -1
  38. package/bpk-component-input/src/withOpenEvents.d.ts +56 -97
  39. package/bpk-component-input/src/withOpenEvents.js +0 -1
  40. package/bpk-component-modal/src/BpkModal.js +13 -13
  41. package/bpk-component-modal/src/BpkModalInner.js +10 -10
  42. package/bpk-component-radio/src/BpkRadio.module.css +1 -1
  43. package/bpk-component-scrollable-calendar/index.d.ts +25 -0
  44. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendar.d.ts +596 -0
  45. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.d.ts +32 -0
  46. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarDate.js +21 -28
  47. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.d.ts +29 -0
  48. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGrid.js +8 -7
  49. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.d.ts +56 -0
  50. package/bpk-component-scrollable-calendar/src/BpkScrollableCalendarGridList.js +8 -15
  51. package/bpk-component-scrollable-calendar/src/utils.d.ts +21 -0
  52. package/bpk-component-scrollable-calendar/src/utils.js +1 -1
  53. package/bpk-component-scrollable-calendar/test-utils.d.ts +52 -0
  54. package/bpk-component-scrollable-calendar/test-utils.js +2 -2
  55. package/bpk-component-text/src/BpkText.js +4 -4
  56. package/bpk-scrim-utils/src/withScrim.js +33 -31
  57. package/package.json +4 -4
@@ -0,0 +1,596 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ /// <reference types="react" />
20
+ declare const _default: {
21
+ new (props: Omit<{
22
+ changeMonthLabel?: string | null | undefined;
23
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
24
+ formatDateFull: (date: Date) => string | Date;
25
+ formatMonth: (date: Date) => string | Date;
26
+ id: string;
27
+ maxDate: Date;
28
+ minDate: Date;
29
+ month: Date;
30
+ nextMonthLabel?: string | null | undefined;
31
+ previousMonthLabel?: string | null | undefined;
32
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
33
+ className?: string | null | undefined;
34
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
35
+ fixedWidth?: boolean | undefined;
36
+ focusedDate?: Date | null | undefined;
37
+ markOutsideDays?: boolean | undefined;
38
+ markToday?: boolean | undefined;
39
+ onMonthChange?: ((event: UIEvent, { month, source }: {
40
+ month: Date;
41
+ source: string;
42
+ }) => void) | null | undefined;
43
+ onDateClick?: ((date: Date) => void) | null | undefined;
44
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
45
+ preventKeyboardFocus?: boolean | undefined;
46
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
47
+ gridClassName?: string | null | undefined;
48
+ weekDayKey?: string | undefined;
49
+ navProps?: {} | null | undefined;
50
+ headerProps?: {} | null | undefined;
51
+ gridProps?: {} | null | undefined;
52
+ dateProps?: {} | null | undefined;
53
+ } & {
54
+ fixedWidth?: boolean | undefined;
55
+ maxDate?: Date | undefined;
56
+ minDate?: Date | undefined;
57
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
58
+ onMonthChange?: ((event: UIEvent, { month, source }: {
59
+ month: Date;
60
+ source: string;
61
+ }) => void) | null | undefined;
62
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
63
+ initiallyFocusedDate?: Date | null | undefined;
64
+ }, keyof {
65
+ onDateClick: ((date: Date) => void) | null;
66
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
67
+ month: Date;
68
+ }> & {
69
+ [rest: string]: any;
70
+ }): {
71
+ UNSAFE_componentWillReceiveProps(nextProps: Omit<{
72
+ changeMonthLabel?: string | null | undefined;
73
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
74
+ formatDateFull: (date: Date) => string | Date;
75
+ formatMonth: (date: Date) => string | Date;
76
+ id: string;
77
+ maxDate: Date;
78
+ minDate: Date;
79
+ month: Date;
80
+ nextMonthLabel?: string | null | undefined;
81
+ previousMonthLabel?: string | null | undefined;
82
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
83
+ className?: string | null | undefined;
84
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
85
+ fixedWidth?: boolean | undefined;
86
+ focusedDate?: Date | null | undefined;
87
+ markOutsideDays?: boolean | undefined;
88
+ markToday?: boolean | undefined;
89
+ onMonthChange?: ((event: UIEvent, { month, source }: {
90
+ month: Date;
91
+ source: string;
92
+ }) => void) | null | undefined;
93
+ onDateClick?: ((date: Date) => void) | null | undefined;
94
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
95
+ preventKeyboardFocus?: boolean | undefined;
96
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
97
+ gridClassName?: string | null | undefined;
98
+ weekDayKey?: string | undefined;
99
+ navProps?: {} | null | undefined;
100
+ headerProps?: {} | null | undefined;
101
+ gridProps?: {} | null | undefined;
102
+ dateProps?: {} | null | undefined;
103
+ } & {
104
+ fixedWidth?: boolean | undefined;
105
+ maxDate?: Date | undefined;
106
+ minDate?: Date | undefined;
107
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
108
+ onMonthChange?: ((event: UIEvent, { month, source }: {
109
+ month: Date;
110
+ source: string;
111
+ }) => void) | null | undefined;
112
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
113
+ initiallyFocusedDate?: Date | null | undefined;
114
+ }, keyof {
115
+ onDateClick: ((date: Date) => void) | null;
116
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
117
+ month: Date;
118
+ }> & {
119
+ [rest: string]: any;
120
+ }): void;
121
+ handleDateFocus: (event: UIEvent, { date, source }: {
122
+ date: Date;
123
+ source: string;
124
+ }) => void;
125
+ handleDateSelect: (date: Date) => void;
126
+ handleMonthChange: (event: UIEvent, { month, source }: {
127
+ month: Date;
128
+ source: string;
129
+ }) => void;
130
+ handleDateKeyDown: (event: KeyboardEvent) => void;
131
+ render(): JSX.Element;
132
+ context: any;
133
+ setState<K extends keyof {
134
+ preventKeyboardFocus: boolean;
135
+ focusedDate: Date;
136
+ }>(state: {
137
+ preventKeyboardFocus: boolean;
138
+ focusedDate: Date;
139
+ } | ((prevState: Readonly<{
140
+ preventKeyboardFocus: boolean;
141
+ focusedDate: Date;
142
+ }>, props: Readonly<Omit<{
143
+ changeMonthLabel?: string | null | undefined;
144
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
145
+ formatDateFull: (date: Date) => string | Date;
146
+ formatMonth: (date: Date) => string | Date;
147
+ id: string;
148
+ maxDate: Date;
149
+ minDate: Date;
150
+ month: Date;
151
+ nextMonthLabel?: string | null | undefined;
152
+ previousMonthLabel?: string | null | undefined;
153
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
154
+ className?: string | null | undefined;
155
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
156
+ fixedWidth?: boolean | undefined;
157
+ focusedDate?: Date | null | undefined;
158
+ markOutsideDays?: boolean | undefined;
159
+ markToday?: boolean | undefined;
160
+ onMonthChange?: ((event: UIEvent, { month, source }: {
161
+ month: Date;
162
+ source: string;
163
+ }) => void) | null | undefined;
164
+ onDateClick?: ((date: Date) => void) | null | undefined;
165
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
166
+ preventKeyboardFocus?: boolean | undefined;
167
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
168
+ gridClassName?: string | null | undefined;
169
+ weekDayKey?: string | undefined;
170
+ navProps?: {} | null | undefined;
171
+ headerProps?: {} | null | undefined;
172
+ gridProps?: {} | null | undefined;
173
+ dateProps?: {} | null | undefined;
174
+ } & {
175
+ fixedWidth?: boolean | undefined;
176
+ maxDate?: Date | undefined;
177
+ minDate?: Date | undefined;
178
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
179
+ onMonthChange?: ((event: UIEvent, { month, source }: {
180
+ month: Date;
181
+ source: string;
182
+ }) => void) | null | undefined;
183
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
184
+ initiallyFocusedDate?: Date | null | undefined;
185
+ }, keyof {
186
+ onDateClick: ((date: Date) => void) | null;
187
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
188
+ month: Date;
189
+ }> & {
190
+ [rest: string]: any;
191
+ }>) => {
192
+ preventKeyboardFocus: boolean;
193
+ focusedDate: Date;
194
+ } | Pick<{
195
+ preventKeyboardFocus: boolean;
196
+ focusedDate: Date;
197
+ }, K> | null) | Pick<{
198
+ preventKeyboardFocus: boolean;
199
+ focusedDate: Date;
200
+ }, K> | null, callback?: (() => void) | undefined): void;
201
+ forceUpdate(callback?: (() => void) | undefined): void;
202
+ readonly props: Readonly<Omit<{
203
+ changeMonthLabel?: string | null | undefined;
204
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
205
+ formatDateFull: (date: Date) => string | Date;
206
+ formatMonth: (date: Date) => string | Date;
207
+ id: string;
208
+ maxDate: Date;
209
+ minDate: Date;
210
+ month: Date;
211
+ nextMonthLabel?: string | null | undefined;
212
+ previousMonthLabel?: string | null | undefined;
213
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
214
+ className?: string | null | undefined;
215
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
216
+ fixedWidth?: boolean | undefined;
217
+ focusedDate?: Date | null | undefined;
218
+ markOutsideDays?: boolean | undefined;
219
+ markToday?: boolean | undefined;
220
+ onMonthChange?: ((event: UIEvent, { month, source }: {
221
+ month: Date;
222
+ source: string;
223
+ }) => void) | null | undefined;
224
+ onDateClick?: ((date: Date) => void) | null | undefined;
225
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
226
+ preventKeyboardFocus?: boolean | undefined;
227
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
228
+ gridClassName?: string | null | undefined;
229
+ weekDayKey?: string | undefined;
230
+ navProps?: {} | null | undefined;
231
+ headerProps?: {} | null | undefined;
232
+ gridProps?: {} | null | undefined;
233
+ dateProps?: {} | null | undefined;
234
+ } & {
235
+ fixedWidth?: boolean | undefined;
236
+ maxDate?: Date | undefined;
237
+ minDate?: Date | undefined;
238
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
239
+ onMonthChange?: ((event: UIEvent, { month, source }: {
240
+ month: Date;
241
+ source: string;
242
+ }) => void) | null | undefined;
243
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
244
+ initiallyFocusedDate?: Date | null | undefined;
245
+ }, keyof {
246
+ onDateClick: ((date: Date) => void) | null;
247
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
248
+ month: Date;
249
+ }> & {
250
+ [rest: string]: any;
251
+ }> & Readonly<{
252
+ children?: import("react").ReactNode;
253
+ }>;
254
+ state: Readonly<{
255
+ preventKeyboardFocus: boolean;
256
+ focusedDate: Date;
257
+ }>;
258
+ refs: {
259
+ [key: string]: import("react").ReactInstance;
260
+ };
261
+ componentDidMount?(): void;
262
+ shouldComponentUpdate?(nextProps: Readonly<Omit<{
263
+ changeMonthLabel?: string | null | undefined;
264
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
265
+ formatDateFull: (date: Date) => string | Date;
266
+ formatMonth: (date: Date) => string | Date;
267
+ id: string;
268
+ maxDate: Date;
269
+ minDate: Date;
270
+ month: Date;
271
+ nextMonthLabel?: string | null | undefined;
272
+ previousMonthLabel?: string | null | undefined;
273
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
274
+ className?: string | null | undefined;
275
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
276
+ fixedWidth?: boolean | undefined;
277
+ focusedDate?: Date | null | undefined;
278
+ markOutsideDays?: boolean | undefined;
279
+ markToday?: boolean | undefined;
280
+ onMonthChange?: ((event: UIEvent, { month, source }: {
281
+ month: Date;
282
+ source: string;
283
+ }) => void) | null | undefined;
284
+ onDateClick?: ((date: Date) => void) | null | undefined;
285
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
286
+ preventKeyboardFocus?: boolean | undefined;
287
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
288
+ gridClassName?: string | null | undefined;
289
+ weekDayKey?: string | undefined;
290
+ navProps?: {} | null | undefined;
291
+ headerProps?: {} | null | undefined;
292
+ gridProps?: {} | null | undefined;
293
+ dateProps?: {} | null | undefined;
294
+ } & {
295
+ fixedWidth?: boolean | undefined;
296
+ maxDate?: Date | undefined;
297
+ minDate?: Date | undefined;
298
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
299
+ onMonthChange?: ((event: UIEvent, { month, source }: {
300
+ month: Date;
301
+ source: string;
302
+ }) => void) | null | undefined;
303
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
304
+ initiallyFocusedDate?: Date | null | undefined;
305
+ }, keyof {
306
+ onDateClick: ((date: Date) => void) | null;
307
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
308
+ month: Date;
309
+ }> & {
310
+ [rest: string]: any;
311
+ }>, nextState: Readonly<{
312
+ preventKeyboardFocus: boolean;
313
+ focusedDate: Date;
314
+ }>, nextContext: any): boolean;
315
+ componentWillUnmount?(): void;
316
+ componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
317
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<{
318
+ changeMonthLabel?: string | null | undefined;
319
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
320
+ formatDateFull: (date: Date) => string | Date;
321
+ formatMonth: (date: Date) => string | Date;
322
+ id: string;
323
+ maxDate: Date;
324
+ minDate: Date;
325
+ month: Date;
326
+ nextMonthLabel?: string | null | undefined;
327
+ previousMonthLabel?: string | null | undefined;
328
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
329
+ className?: string | null | undefined;
330
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
331
+ fixedWidth?: boolean | undefined;
332
+ focusedDate?: Date | null | undefined;
333
+ markOutsideDays?: boolean | undefined;
334
+ markToday?: boolean | undefined;
335
+ onMonthChange?: ((event: UIEvent, { month, source }: {
336
+ month: Date;
337
+ source: string;
338
+ }) => void) | null | undefined;
339
+ onDateClick?: ((date: Date) => void) | null | undefined;
340
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
341
+ preventKeyboardFocus?: boolean | undefined;
342
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
343
+ gridClassName?: string | null | undefined;
344
+ weekDayKey?: string | undefined;
345
+ navProps?: {} | null | undefined;
346
+ headerProps?: {} | null | undefined;
347
+ gridProps?: {} | null | undefined;
348
+ dateProps?: {} | null | undefined;
349
+ } & {
350
+ fixedWidth?: boolean | undefined;
351
+ maxDate?: Date | undefined;
352
+ minDate?: Date | undefined;
353
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
354
+ onMonthChange?: ((event: UIEvent, { month, source }: {
355
+ month: Date;
356
+ source: string;
357
+ }) => void) | null | undefined;
358
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
359
+ initiallyFocusedDate?: Date | null | undefined;
360
+ }, keyof {
361
+ onDateClick: ((date: Date) => void) | null;
362
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
363
+ month: Date;
364
+ }> & {
365
+ [rest: string]: any;
366
+ }>, prevState: Readonly<{
367
+ preventKeyboardFocus: boolean;
368
+ focusedDate: Date;
369
+ }>): any;
370
+ componentDidUpdate?(prevProps: Readonly<Omit<{
371
+ changeMonthLabel?: string | null | undefined;
372
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
373
+ formatDateFull: (date: Date) => string | Date;
374
+ formatMonth: (date: Date) => string | Date;
375
+ id: string;
376
+ maxDate: Date;
377
+ minDate: Date;
378
+ month: Date;
379
+ nextMonthLabel?: string | null | undefined;
380
+ previousMonthLabel?: string | null | undefined;
381
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
382
+ className?: string | null | undefined;
383
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
384
+ fixedWidth?: boolean | undefined;
385
+ focusedDate?: Date | null | undefined;
386
+ markOutsideDays?: boolean | undefined;
387
+ markToday?: boolean | undefined;
388
+ onMonthChange?: ((event: UIEvent, { month, source }: {
389
+ month: Date;
390
+ source: string;
391
+ }) => void) | null | undefined;
392
+ onDateClick?: ((date: Date) => void) | null | undefined;
393
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
394
+ preventKeyboardFocus?: boolean | undefined;
395
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
396
+ gridClassName?: string | null | undefined;
397
+ weekDayKey?: string | undefined;
398
+ navProps?: {} | null | undefined;
399
+ headerProps?: {} | null | undefined;
400
+ gridProps?: {} | null | undefined;
401
+ dateProps?: {} | null | undefined;
402
+ } & {
403
+ fixedWidth?: boolean | undefined;
404
+ maxDate?: Date | undefined;
405
+ minDate?: Date | undefined;
406
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
407
+ onMonthChange?: ((event: UIEvent, { month, source }: {
408
+ month: Date;
409
+ source: string;
410
+ }) => void) | null | undefined;
411
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
412
+ initiallyFocusedDate?: Date | null | undefined;
413
+ }, keyof {
414
+ onDateClick: ((date: Date) => void) | null;
415
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
416
+ month: Date;
417
+ }> & {
418
+ [rest: string]: any;
419
+ }>, prevState: Readonly<{
420
+ preventKeyboardFocus: boolean;
421
+ focusedDate: Date;
422
+ }>, snapshot?: any): void;
423
+ componentWillMount?(): void;
424
+ UNSAFE_componentWillMount?(): void;
425
+ componentWillReceiveProps?(nextProps: Readonly<Omit<{
426
+ changeMonthLabel?: string | null | undefined;
427
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
428
+ formatDateFull: (date: Date) => string | Date;
429
+ formatMonth: (date: Date) => string | Date;
430
+ id: string;
431
+ maxDate: Date;
432
+ minDate: Date;
433
+ month: Date;
434
+ nextMonthLabel?: string | null | undefined;
435
+ previousMonthLabel?: string | null | undefined;
436
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
437
+ className?: string | null | undefined;
438
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
439
+ fixedWidth?: boolean | undefined;
440
+ focusedDate?: Date | null | undefined;
441
+ markOutsideDays?: boolean | undefined;
442
+ markToday?: boolean | undefined;
443
+ onMonthChange?: ((event: UIEvent, { month, source }: {
444
+ month: Date;
445
+ source: string;
446
+ }) => void) | null | undefined;
447
+ onDateClick?: ((date: Date) => void) | null | undefined;
448
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
449
+ preventKeyboardFocus?: boolean | undefined;
450
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
451
+ gridClassName?: string | null | undefined;
452
+ weekDayKey?: string | undefined;
453
+ navProps?: {} | null | undefined;
454
+ headerProps?: {} | null | undefined;
455
+ gridProps?: {} | null | undefined;
456
+ dateProps?: {} | null | undefined;
457
+ } & {
458
+ fixedWidth?: boolean | undefined;
459
+ maxDate?: Date | undefined;
460
+ minDate?: Date | undefined;
461
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
462
+ onMonthChange?: ((event: UIEvent, { month, source }: {
463
+ month: Date;
464
+ source: string;
465
+ }) => void) | null | undefined;
466
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
467
+ initiallyFocusedDate?: Date | null | undefined;
468
+ }, keyof {
469
+ onDateClick: ((date: Date) => void) | null;
470
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
471
+ month: Date;
472
+ }> & {
473
+ [rest: string]: any;
474
+ }>, nextContext: any): void;
475
+ componentWillUpdate?(nextProps: Readonly<Omit<{
476
+ changeMonthLabel?: string | null | undefined;
477
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
478
+ formatDateFull: (date: Date) => string | Date;
479
+ formatMonth: (date: Date) => string | Date;
480
+ id: string;
481
+ maxDate: Date;
482
+ minDate: Date;
483
+ month: Date;
484
+ nextMonthLabel?: string | null | undefined;
485
+ previousMonthLabel?: string | null | undefined;
486
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
487
+ className?: string | null | undefined;
488
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
489
+ fixedWidth?: boolean | undefined;
490
+ focusedDate?: Date | null | undefined;
491
+ markOutsideDays?: boolean | undefined;
492
+ markToday?: boolean | undefined;
493
+ onMonthChange?: ((event: UIEvent, { month, source }: {
494
+ month: Date;
495
+ source: string;
496
+ }) => void) | null | undefined;
497
+ onDateClick?: ((date: Date) => void) | null | undefined;
498
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
499
+ preventKeyboardFocus?: boolean | undefined;
500
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
501
+ gridClassName?: string | null | undefined;
502
+ weekDayKey?: string | undefined;
503
+ navProps?: {} | null | undefined;
504
+ headerProps?: {} | null | undefined;
505
+ gridProps?: {} | null | undefined;
506
+ dateProps?: {} | null | undefined;
507
+ } & {
508
+ fixedWidth?: boolean | undefined;
509
+ maxDate?: Date | undefined;
510
+ minDate?: Date | undefined;
511
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
512
+ onMonthChange?: ((event: UIEvent, { month, source }: {
513
+ month: Date;
514
+ source: string;
515
+ }) => void) | null | undefined;
516
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
517
+ initiallyFocusedDate?: Date | null | undefined;
518
+ }, keyof {
519
+ onDateClick: ((date: Date) => void) | null;
520
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
521
+ month: Date;
522
+ }> & {
523
+ [rest: string]: any;
524
+ }>, nextState: Readonly<{
525
+ preventKeyboardFocus: boolean;
526
+ focusedDate: Date;
527
+ }>, nextContext: any): void;
528
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<{
529
+ changeMonthLabel?: string | null | undefined;
530
+ daysOfWeek: import("../../bpk-component-calendar/src/custom-proptypes").DaysOfWeek;
531
+ formatDateFull: (date: Date) => string | Date;
532
+ formatMonth: (date: Date) => string | Date;
533
+ id: string;
534
+ maxDate: Date;
535
+ minDate: Date;
536
+ month: Date;
537
+ nextMonthLabel?: string | null | undefined;
538
+ previousMonthLabel?: string | null | undefined;
539
+ weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
540
+ className?: string | null | undefined;
541
+ dateModifiers?: import("../../bpk-component-calendar/src/custom-proptypes").DateModifiers | undefined;
542
+ fixedWidth?: boolean | undefined;
543
+ focusedDate?: Date | null | undefined;
544
+ markOutsideDays?: boolean | undefined;
545
+ markToday?: boolean | undefined;
546
+ onMonthChange?: ((event: UIEvent, { month, source }: {
547
+ month: Date;
548
+ source: string;
549
+ }) => void) | null | undefined;
550
+ onDateClick?: ((date: Date) => void) | null | undefined;
551
+ onDateKeyDown?: ((event: KeyboardEvent) => void) | null | undefined;
552
+ preventKeyboardFocus?: boolean | undefined;
553
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
554
+ gridClassName?: string | null | undefined;
555
+ weekDayKey?: string | undefined;
556
+ navProps?: {} | null | undefined;
557
+ headerProps?: {} | null | undefined;
558
+ gridProps?: {} | null | undefined;
559
+ dateProps?: {} | null | undefined;
560
+ } & {
561
+ fixedWidth?: boolean | undefined;
562
+ maxDate?: Date | undefined;
563
+ minDate?: Date | undefined;
564
+ onDateSelect?: ((date: Date, newDate?: Date | undefined) => void) | null | undefined;
565
+ onMonthChange?: ((event: UIEvent, { month, source }: {
566
+ month: Date;
567
+ source: string;
568
+ }) => void) | null | undefined;
569
+ selectionConfiguration?: import("../../bpk-component-calendar/src/custom-proptypes").SelectionConfiguration | undefined;
570
+ initiallyFocusedDate?: Date | null | undefined;
571
+ }, keyof {
572
+ onDateClick: ((date: Date) => void) | null;
573
+ onDateKeyDown: ((event: KeyboardEvent) => void) | null;
574
+ month: Date;
575
+ }> & {
576
+ [rest: string]: any;
577
+ }>, nextState: Readonly<{
578
+ preventKeyboardFocus: boolean;
579
+ focusedDate: Date;
580
+ }>, nextContext: any): void;
581
+ };
582
+ defaultProps: {
583
+ fixedWidth: boolean;
584
+ maxDate: Date;
585
+ minDate: Date;
586
+ onDateSelect: null;
587
+ onMonthChange: null;
588
+ selectionConfiguration: {
589
+ type: "single";
590
+ date: null;
591
+ };
592
+ initiallyFocusedDate: null;
593
+ };
594
+ contextType?: import("react").Context<any> | undefined;
595
+ };
596
+ export default _default;
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { PureComponent } from 'react';
20
+ import type { BpkCalendarDateProps } from '../../bpk-component-calendar';
21
+ type Props = Partial<BpkCalendarDateProps> & {
22
+ date: Date;
23
+ isOutside?: boolean;
24
+ [rest: string]: any;
25
+ };
26
+ declare class BpkScrollableCalendarDate extends PureComponent<Props> {
27
+ static defaultProps: {
28
+ isOutside: boolean;
29
+ };
30
+ render(): JSX.Element | null;
31
+ }
32
+ export default BpkScrollableCalendarDate;