@superdispatch/dates 0.16.0-alpha.0 → 0.16.0-alpha.1

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.
@@ -1,9 +1,9 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["id", "api", "onClear", "onClick", "onClose", "onKeyDown", "disabled", "children", "enableClearable", "inputRef", "InputProps"];
4
- import { IconButton, InputAdornment, Popover, SvgIcon, TextField } from '@material-ui/core';
5
- import { Clear } from '@material-ui/icons';
6
4
  import { mdiCalendarMonth } from '@mdi/js';
5
+ import { Clear } from '@mui/icons-material';
6
+ import { IconButton, InputAdornment, Popover, SvgIcon, TextField } from '@mui/material';
7
7
  import { useValueObserver } from '@superdispatch/hooks';
8
8
  import { mergeRefs, useUID } from '@superdispatch/ui';
9
9
  import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
@@ -1,8 +1,8 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["footer", "classes", "direction", "quickSelection", "selectedDays", "disabledDays", "onDayClick", "onDayKeyDown", "onDayMouseEnter", "onDayMouseLeave", "onDayMouseDown", "onDayMouseUp", "onDayTouchEnd", "onDayTouchStart", "modifiers", "highlightedDays", "format", "initialTime", "initialMonth"];
4
- import { Divider, Grid, Hidden } from '@material-ui/core';
5
- import { makeStyles } from '@material-ui/styles';
4
+ import { Divider, Grid, Hidden } from '@mui/material';
5
+ import { makeStyles } from '@mui/styles';
6
6
  import { Color } from '@superdispatch/ui';
7
7
  import { DateTime } from 'luxon';
8
8
  import { forwardRef, useMemo } from 'react';
@@ -33,12 +33,12 @@ var useStyles = /*#__PURE__*/makeStyles(theme => ({
33
33
  interactionDisabled: {},
34
34
  navBar: {},
35
35
  navButtonPrev: {
36
- position: 'absolute',
36
+ position: 'absolute !important',
37
37
  top: theme.spacing(1.5),
38
38
  left: theme.spacing(1.5)
39
39
  },
40
40
  navButtonNext: {
41
- position: 'absolute',
41
+ position: 'absolute !important',
42
42
  top: theme.spacing(1.5),
43
43
  right: theme.spacing(1.5)
44
44
  },
@@ -1,4 +1,4 @@
1
- import { List, ListItem, Typography } from '@material-ui/core';
1
+ import { List, ListItem, Typography } from '@mui/material';
2
2
  import { forwardRef } from 'react';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
- import { IconButton, Typography } from '@material-ui/core';
2
- import { ChevronLeft, ChevronRight } from '@material-ui/icons';
1
+ import { ChevronLeft, ChevronRight } from '@mui/icons-material';
2
+ import { IconButton, Typography } from '@mui/material';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["modifiers", "onDayClick", "onDayMouseEnter"],
4
4
  _excluded2 = ["onBlur", "onFocus", "onChange", "renderFooter", "renderQuickSelection", "value", "format", "fallback", "enableClearable", "disableCloseOnSelect", "CalendarProps"],
5
5
  _excluded3 = ["rangeStart", "rangeFinish"];
6
- import { makeStyles } from '@material-ui/styles';
6
+ import { makeStyles } from '@mui/styles';
7
7
  import { Color } from '@superdispatch/ui';
8
8
  import { forwardRef, useMemo, useRef, useState } from 'react';
9
9
  import { BaseDatePicker } from "../base-date-picker/BaseDatePicker.js";
package/dist-src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import * as v5 from "./v5/index.js";
2
1
  export * from "./calendar/Calendar.js";
3
2
  export * from "./calendar/CalendarQuickSelection.js";
4
3
  export * from "./date-config/DateConfig.js";
@@ -10,5 +9,4 @@ export * from "./formatted-date/FormattedDate.js";
10
9
  export * from "./formatted-relative-time/FormattedRelativeTime.js";
11
10
  export * from "./time-field/TimeField.js";
12
11
  export * from "./use-date-time-range/useDateTimeRange.js";
13
- export * from "./use-date-time/useDateTime.js";
14
- export { v5 };
12
+ export * from "./use-date-time/useDateTime.js";
@@ -1,8 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["disabled", "onChange", "value", "format"];
4
- import { TextField } from '@material-ui/core';
5
- import { Autocomplete } from '@material-ui/lab';
4
+ import { Autocomplete, TextField } from '@mui/material';
6
5
  import { DateTime } from 'luxon';
7
6
  import { forwardRef, useEffect, useMemo, useState } from 'react';
8
7
  import { useDateConfig } from "../date-config/DateConfig.js";
@@ -5,8 +5,6 @@ import { ClassNameMap } from '@mui/styles';
5
5
  import { ColorVariant } from '@superdispatch/ui';
6
6
  import { DayPickerProps } from 'react-day-picker';
7
7
  import { DateTime, ToRelativeOptions, ToRelativeUnit } from 'luxon';
8
- import { GridDirection as GridDirection$1, BaseTextFieldProps as BaseTextFieldProps$1, InputBaseProps as InputBaseProps$1 } from '@material-ui/core';
9
- import { ClassNameMap as ClassNameMap$1 } from '@material-ui/styles';
10
8
 
11
9
  declare function setDefaultTimeZone(offset: number | 'local'): string;
12
10
  declare function useDefaultTimeZone(offset: number | 'local'): string;
@@ -269,449 +267,4 @@ declare function useDateTimeRange(input: NullableDateRangeInput, options?: Parti
269
267
 
270
268
  declare function useDateTime(input: NullableDateInput, options?: Partial<DateConfig>): DateTime;
271
269
 
272
-
273
-
274
- type index_d_CalendarDayHighlightColor = CalendarDayHighlightColor;
275
- type index_d_CalendarClassNames = CalendarClassNames;
276
- type index_d_CalendarClassNameMap = CalendarClassNameMap;
277
- type index_d_CalendarModifier = CalendarModifier;
278
- type index_d_CalendarDateEvent = CalendarDateEvent;
279
- type index_d_CalendarDayEventHandler = CalendarDayEventHandler;
280
- type index_d_CalendarModifiers = CalendarModifiers;
281
- type index_d_CalendarHighlightedDays = CalendarHighlightedDays;
282
- type index_d_CalendarProps = CalendarProps;
283
- declare const index_d_Calendar: typeof Calendar;
284
- type index_d_CalendarQuickSelectionItemProps = CalendarQuickSelectionItemProps;
285
- declare const index_d_CalendarQuickSelectionItem: typeof CalendarQuickSelectionItem;
286
- type index_d_CalendarQuickSelectionProps = CalendarQuickSelectionProps;
287
- declare const index_d_CalendarQuickSelection: typeof CalendarQuickSelection;
288
- declare const index_d_setDefaultTimeZone: typeof setDefaultTimeZone;
289
- declare const index_d_useDefaultTimeZone: typeof useDefaultTimeZone;
290
- type index_d_DateFormat = DateFormat;
291
- type index_d_DateConfig = DateConfig;
292
- declare const index_d_defaultDateConfig: typeof defaultDateConfig;
293
- declare const index_d_useDateConfig: typeof useDateConfig;
294
- type index_d_DateConfigProviderProps = DateConfigProviderProps;
295
- declare const index_d_DateConfigProvider: typeof DateConfigProvider;
296
- type index_d_DateFieldAPI = DateFieldAPI;
297
- type index_d_DateFieldProps = DateFieldProps;
298
- declare const index_d_DateField: typeof DateField;
299
- type index_d_DateRangeFieldProps = DateRangeFieldProps;
300
- declare const index_d_DateRangeField: typeof DateRangeField;
301
- type index_d_DateDisplayVariant = DateDisplayVariant;
302
- type index_d_DateString = DateString;
303
- type index_d_NullableDateString = NullableDateString;
304
- type index_d_PrimitiveDateInput = PrimitiveDateInput;
305
- type index_d_NullableDateInput = NullableDateInput;
306
- declare const index_d_toPrimitiveDateInput: typeof toPrimitiveDateInput;
307
- declare const index_d_parseDate: typeof parseDate;
308
- declare const index_d_stringifyDate: typeof stringifyDate;
309
- type index_d_FormatDateConfig = FormatDateConfig;
310
- declare const index_d_formatDate: typeof formatDate;
311
- type index_d_FormatRelativeTimeOptions = FormatRelativeTimeOptions;
312
- declare const index_d_formatRelativeTime: typeof formatRelativeTime;
313
- type index_d_DatePayload = DatePayload;
314
- declare const index_d_toDatePayload: typeof toDatePayload;
315
- type index_d_DateTimeRange = DateTimeRange;
316
- type index_d_DateStringRange = DateStringRange;
317
- type index_d_NullableDateRangeInput = NullableDateRangeInput;
318
- type index_d_PrimitiveDateRangeInput = PrimitiveDateRangeInput;
319
- declare const index_d_toPrimitiveDateRangeInput: typeof toPrimitiveDateRangeInput;
320
- declare const index_d_parseDateRange: typeof parseDateRange;
321
- declare const index_d_stringifyDateRange: typeof stringifyDateRange;
322
- type index_d_FormatDateRangeOptions = FormatDateRangeOptions;
323
- declare const index_d_formatDateRange: typeof formatDateRange;
324
- type index_d_DateRangePayload = DateRangePayload;
325
- declare const index_d_toDateRangePayload: typeof toDateRangePayload;
326
- type index_d_DateUnit = DateUnit;
327
- type index_d_DateDurationUnit = DateDurationUnit;
328
- type index_d_DateObject = DateObject;
329
- type index_d_NullableDate = NullableDate;
330
- type index_d_DateLike = DateLike;
331
- type index_d_NullableDateLike = NullableDateLike;
332
- type index_d_DateRange = DateRange;
333
- type index_d_DateRangeLike = DateRangeLike;
334
- type index_d_NullableDateRange = NullableDateRange;
335
- type index_d_NullableDateRangeLike = NullableDateRangeLike;
336
- declare const index_d_isDate: typeof isDate;
337
- declare const index_d_isDateLike: typeof isDateLike;
338
- declare const index_d_isValidDate: typeof isValidDate;
339
- declare const index_d_isDateRange: typeof isDateRange;
340
- declare const index_d_isDateRangeLike: typeof isDateRangeLike;
341
- declare const index_d_isValidDateRange: typeof isValidDateRange;
342
- declare const index_d_toDate: typeof toDate;
343
- declare const index_d_toDateRange: typeof toDateRange;
344
- type index_d_DateFormatVariant = DateFormatVariant;
345
- type index_d_DateFormatOptions = DateFormatOptions;
346
- type index_d_RelativeTimeFormatStyle = RelativeTimeFormatStyle;
347
- type index_d_RelativeTimeFormatOptions = RelativeTimeFormatOptions;
348
- type index_d_DateUtils = DateUtils;
349
- declare const index_d_DateUtils: typeof DateUtils;
350
- declare const index_d_useDateUtils: typeof useDateUtils;
351
- type index_d_FormattedDateConfig = FormattedDateConfig;
352
- declare const index_d_useFormattedDate: typeof useFormattedDate;
353
- type index_d_FormattedDateProps = FormattedDateProps;
354
- declare const index_d_FormattedDate: typeof FormattedDate;
355
- type index_d_FormattedRelativeTimeOptions = FormattedRelativeTimeOptions;
356
- declare const index_d_useFormattedRelativeTime: typeof useFormattedRelativeTime;
357
- type index_d_FormattedRelativeTimeProps = FormattedRelativeTimeProps;
358
- declare const index_d_FormattedRelativeTime: typeof FormattedRelativeTime;
359
- type index_d_TimeFieldProps = TimeFieldProps;
360
- declare const index_d_TimeField: typeof TimeField;
361
- declare const index_d_useDateTimeRange: typeof useDateTimeRange;
362
- declare const index_d_useDateTime: typeof useDateTime;
363
- declare namespace index_d {
364
- export {
365
- index_d_CalendarDayHighlightColor as CalendarDayHighlightColor,
366
- index_d_CalendarClassNames as CalendarClassNames,
367
- index_d_CalendarClassNameMap as CalendarClassNameMap,
368
- index_d_CalendarModifier as CalendarModifier,
369
- index_d_CalendarDateEvent as CalendarDateEvent,
370
- index_d_CalendarDayEventHandler as CalendarDayEventHandler,
371
- index_d_CalendarModifiers as CalendarModifiers,
372
- index_d_CalendarHighlightedDays as CalendarHighlightedDays,
373
- index_d_CalendarProps as CalendarProps,
374
- index_d_Calendar as Calendar,
375
- index_d_CalendarQuickSelectionItemProps as CalendarQuickSelectionItemProps,
376
- index_d_CalendarQuickSelectionItem as CalendarQuickSelectionItem,
377
- index_d_CalendarQuickSelectionProps as CalendarQuickSelectionProps,
378
- index_d_CalendarQuickSelection as CalendarQuickSelection,
379
- index_d_setDefaultTimeZone as setDefaultTimeZone,
380
- index_d_useDefaultTimeZone as useDefaultTimeZone,
381
- index_d_DateFormat as DateFormat,
382
- index_d_DateConfig as DateConfig,
383
- index_d_defaultDateConfig as defaultDateConfig,
384
- index_d_useDateConfig as useDateConfig,
385
- index_d_DateConfigProviderProps as DateConfigProviderProps,
386
- index_d_DateConfigProvider as DateConfigProvider,
387
- index_d_DateFieldAPI as DateFieldAPI,
388
- index_d_DateFieldProps as DateFieldProps,
389
- index_d_DateField as DateField,
390
- index_d_DateRangeFieldProps as DateRangeFieldProps,
391
- index_d_DateRangeField as DateRangeField,
392
- index_d_DateDisplayVariant as DateDisplayVariant,
393
- index_d_DateString as DateString,
394
- index_d_NullableDateString as NullableDateString,
395
- index_d_PrimitiveDateInput as PrimitiveDateInput,
396
- index_d_NullableDateInput as NullableDateInput,
397
- index_d_toPrimitiveDateInput as toPrimitiveDateInput,
398
- index_d_parseDate as parseDate,
399
- index_d_stringifyDate as stringifyDate,
400
- index_d_FormatDateConfig as FormatDateConfig,
401
- index_d_formatDate as formatDate,
402
- index_d_FormatRelativeTimeOptions as FormatRelativeTimeOptions,
403
- index_d_formatRelativeTime as formatRelativeTime,
404
- index_d_DatePayload as DatePayload,
405
- index_d_toDatePayload as toDatePayload,
406
- index_d_DateTimeRange as DateTimeRange,
407
- index_d_DateStringRange as DateStringRange,
408
- index_d_NullableDateRangeInput as NullableDateRangeInput,
409
- index_d_PrimitiveDateRangeInput as PrimitiveDateRangeInput,
410
- index_d_toPrimitiveDateRangeInput as toPrimitiveDateRangeInput,
411
- index_d_parseDateRange as parseDateRange,
412
- index_d_stringifyDateRange as stringifyDateRange,
413
- index_d_FormatDateRangeOptions as FormatDateRangeOptions,
414
- index_d_formatDateRange as formatDateRange,
415
- index_d_DateRangePayload as DateRangePayload,
416
- index_d_toDateRangePayload as toDateRangePayload,
417
- index_d_DateUnit as DateUnit,
418
- index_d_DateDurationUnit as DateDurationUnit,
419
- index_d_DateObject as DateObject,
420
- index_d_NullableDate as NullableDate,
421
- index_d_DateLike as DateLike,
422
- index_d_NullableDateLike as NullableDateLike,
423
- index_d_DateRange as DateRange,
424
- index_d_DateRangeLike as DateRangeLike,
425
- index_d_NullableDateRange as NullableDateRange,
426
- index_d_NullableDateRangeLike as NullableDateRangeLike,
427
- index_d_isDate as isDate,
428
- index_d_isDateLike as isDateLike,
429
- index_d_isValidDate as isValidDate,
430
- index_d_isDateRange as isDateRange,
431
- index_d_isDateRangeLike as isDateRangeLike,
432
- index_d_isValidDateRange as isValidDateRange,
433
- index_d_toDate as toDate,
434
- index_d_toDateRange as toDateRange,
435
- index_d_DateFormatVariant as DateFormatVariant,
436
- index_d_DateFormatOptions as DateFormatOptions,
437
- index_d_RelativeTimeFormatStyle as RelativeTimeFormatStyle,
438
- index_d_RelativeTimeFormatOptions as RelativeTimeFormatOptions,
439
- index_d_DateUtils as DateUtils,
440
- index_d_useDateUtils as useDateUtils,
441
- index_d_FormattedDateConfig as FormattedDateConfig,
442
- index_d_useFormattedDate as useFormattedDate,
443
- index_d_FormattedDateProps as FormattedDateProps,
444
- index_d_FormattedDate as FormattedDate,
445
- index_d_FormattedRelativeTimeOptions as FormattedRelativeTimeOptions,
446
- index_d_useFormattedRelativeTime as useFormattedRelativeTime,
447
- index_d_FormattedRelativeTimeProps as FormattedRelativeTimeProps,
448
- index_d_FormattedRelativeTime as FormattedRelativeTime,
449
- index_d_TimeFieldProps as TimeFieldProps,
450
- index_d_TimeField as TimeField,
451
- index_d_useDateTimeRange as useDateTimeRange,
452
- index_d_useDateTime as useDateTime,
453
- };
454
- }
455
-
456
- declare function setDefaultTimeZone$1(offset: number | 'local'): string;
457
- declare function useDefaultTimeZone$1(offset: number | 'local'): string;
458
- declare type DateFormat$1 = 'DateISO' | 'DateTimeISO' | 'JodaISO';
459
- interface DateConfig$1 {
460
- readonly format: DateFormat$1;
461
- }
462
- declare const defaultDateConfig$1: DateConfig$1;
463
- declare function useDateConfig$1(options?: Partial<DateConfig$1>): DateConfig$1;
464
- interface DateConfigProviderProps$1 extends Partial<DateConfig$1> {
465
- children?: ReactNode;
466
- }
467
- declare function DateConfigProvider$1({ format, children, }: DateConfigProviderProps$1): ReactElement;
468
-
469
- declare type DateDisplayVariant$1 = 'Date' | 'ShortDate' | 'Time' | 'DateTime';
470
- declare type DateString$1 = string;
471
- declare type NullableDateString$1 = null | undefined | DateString$1;
472
- declare type PrimitiveDateInput$1 = number | DateString$1;
473
- declare type NullableDateInput$1 = null | undefined | Date | DateTime | PrimitiveDateInput$1;
474
- declare function toPrimitiveDateInput$1(input: NullableDateInput$1): PrimitiveDateInput$1;
475
- declare function parseDate$1(input: NullableDateInput$1, { format }?: DateConfig$1): DateTime;
476
- declare function stringifyDate$1(input: NullableDateInput$1, config?: DateConfig$1): string | null;
477
- interface FormatDateConfig$1 {
478
- fallback?: string;
479
- variant: DateDisplayVariant$1;
480
- }
481
- declare function formatDate$1(input: NullableDateInput$1, { variant, fallback }: FormatDateConfig$1, config?: DateConfig$1): string;
482
- interface FormatRelativeTimeOptions$1 extends Pick<ToRelativeOptions, 'round' | 'padding'> {
483
- fallback?: string;
484
- unit?: ToRelativeUnit;
485
- base?: NullableDateInput$1;
486
- }
487
- declare function formatRelativeTime$1(input: NullableDateInput$1, { round, unit: unitOption, base: baseOption, padding: paddingOption, fallback, }?: FormatRelativeTimeOptions$1, config?: DateConfig$1): string;
488
- interface DatePayload$1 {
489
- readonly config: DateConfig$1;
490
- readonly dateValue: DateTime;
491
- readonly stringValue: null | DateString$1;
492
- }
493
- declare function toDatePayload$1(input: NullableDateInput$1, config?: DateConfig$1): DatePayload$1;
494
- declare type DateTimeRange$1 = [null | DateTime, null | DateTime];
495
- declare type DateStringRange$1 = [null | DateString$1, null | DateString$1];
496
- declare type NullableDateRangeInput$1 = null | undefined | [NullableDateInput$1?, NullableDateInput$1?];
497
- declare type PrimitiveDateRangeInput$1 = [
498
- undefined | PrimitiveDateInput$1,
499
- undefined | PrimitiveDateInput$1
500
- ];
501
- declare function toPrimitiveDateRangeInput$1(input: NullableDateRangeInput$1): PrimitiveDateRangeInput$1;
502
- declare function parseDateRange$1(input: NullableDateRangeInput$1, config?: DateConfig$1): DateTimeRange$1;
503
- declare function stringifyDateRange$1(input: NullableDateRangeInput$1, config?: DateConfig$1): DateStringRange$1;
504
- interface FormatDateRangeOptions$1 {
505
- fallback?: string;
506
- }
507
- declare function formatDateRange$1(input: NullableDateRangeInput$1, { fallback }: FormatDateRangeOptions$1, config?: DateConfig$1): string;
508
- interface DateRangePayload$1 {
509
- config: DateConfig$1;
510
- dateValue: DateTimeRange$1;
511
- stringValue: DateStringRange$1;
512
- }
513
- declare function toDateRangePayload$1(input: NullableDateRangeInput$1, config?: DateConfig$1): DateRangePayload$1;
514
-
515
- declare type CalendarDayHighlightColor$1 = Exclude<ColorVariant, 'grey' | 'silver'>;
516
- declare type CalendarClassNames$1 = keyof NonNullable<DayPickerProps['classNames']> | CalendarDayHighlightColor$1 | 'firstDayOfMonth' | 'lastDayOfMonth';
517
- declare type CalendarClassNameMap$1 = ClassNameMap$1<CalendarClassNames$1>;
518
- declare type CalendarModifier$1 = (info: DatePayload$1) => boolean;
519
- interface CalendarDateEvent$1 extends DatePayload$1 {
520
- disabled: boolean;
521
- selected: boolean;
522
- }
523
- declare type CalendarDayEventHandler$1 = (event: CalendarDateEvent$1) => void;
524
- interface CalendarModifiers$1 {
525
- today?: CalendarModifier$1;
526
- outside?: CalendarModifier$1;
527
- [other: string]: undefined | CalendarModifier$1;
528
- }
529
- declare type CalendarHighlightedDays$1 = Partial<Record<CalendarDayHighlightColor$1, CalendarModifier$1>>;
530
- interface CalendarProps$1 extends Pick<DayPickerProps, 'numberOfMonths'> {
531
- direction?: GridDirection$1;
532
- classes?: Partial<CalendarClassNameMap$1>;
533
- footer?: ReactNode;
534
- quickSelection?: ReactNode;
535
- format?: DateFormat$1;
536
- initialTime?: NullableDateInput$1;
537
- initialMonth?: NullableDateInput$1;
538
- modifiers?: CalendarModifiers$1;
539
- selectedDays?: CalendarModifier$1;
540
- disabledDays?: CalendarModifier$1;
541
- highlightedDays?: CalendarHighlightedDays$1;
542
- onDayClick?: CalendarDayEventHandler$1;
543
- onDayKeyDown?: CalendarDayEventHandler$1;
544
- onDayMouseEnter?: CalendarDayEventHandler$1;
545
- onDayMouseLeave?: CalendarDayEventHandler$1;
546
- onDayMouseDown?: CalendarDayEventHandler$1;
547
- onDayMouseUp?: CalendarDayEventHandler$1;
548
- onDayTouchEnd?: CalendarDayEventHandler$1;
549
- onDayTouchStart?: CalendarDayEventHandler$1;
550
- }
551
- declare const Calendar$1: ForwardRefExoticComponent<CalendarProps$1 & RefAttributes<HTMLDivElement>>;
552
-
553
- interface CalendarQuickSelectionItemProps$1 {
554
- children?: ReactNode;
555
- selected?: boolean;
556
- onClick?: () => void;
557
- }
558
- declare const CalendarQuickSelectionItem$1: ForwardRefExoticComponent<CalendarQuickSelectionItemProps$1 & RefAttributes<HTMLDivElement>>;
559
- interface CalendarQuickSelectionProps$1 {
560
- children?: ReactNode;
561
- }
562
- declare const CalendarQuickSelection$1: ForwardRefExoticComponent<CalendarQuickSelectionProps$1 & RefAttributes<HTMLUListElement>>;
563
-
564
- interface DateFieldAPI$1 extends DatePayload$1 {
565
- close: () => void;
566
- change: (value: NullableDateInput$1) => void;
567
- }
568
- interface DateFieldProps$1 extends Pick<BaseTextFieldProps$1, 'disabled' | 'error' | 'fullWidth' | 'helperText' | 'id' | 'label' | 'name' | 'onClick' | 'onKeyDown' | 'placeholder' | 'required'> {
569
- format?: DateFormat$1;
570
- value?: NullableDateInput$1;
571
- onBlur?: () => void;
572
- onFocus?: () => void;
573
- onChange?: (event: DatePayload$1) => void;
574
- fallback?: string;
575
- variant?: DateDisplayVariant$1;
576
- enableClearable?: boolean;
577
- disableCloseOnSelect?: boolean;
578
- renderFooter?: (api: DateFieldAPI$1) => ReactNode;
579
- renderQuickSelection?: (api: DateFieldAPI$1) => ReactNode;
580
- InputProps?: Pick<InputBaseProps$1, 'aria-label' | 'aria-labelledby' | 'startAdornment'>;
581
- CalendarProps?: Omit<CalendarProps$1, 'classes' | 'footer' | 'initialMonth' | 'numberOfMonths' | 'quickSelection' | 'selectedDays'>;
582
- }
583
- declare const DateField$1: ForwardRefExoticComponent<DateFieldProps$1 & RefAttributes<HTMLDivElement>>;
584
-
585
- interface DateRangeFieldAPI$1 extends DateRangePayload$1 {
586
- close: () => void;
587
- change: (value: NullableDateRangeInput$1) => void;
588
- }
589
- interface DateRangeFieldProps$1 extends Pick<BaseTextFieldProps$1, 'disabled' | 'error' | 'fullWidth' | 'helperText' | 'id' | 'label' | 'name' | 'required' | 'placeholder'> {
590
- fallback?: string;
591
- enableClearable?: boolean;
592
- disableCloseOnSelect?: boolean;
593
- format?: DateFormat$1;
594
- value?: NullableDateRangeInput$1;
595
- onBlur?: () => void;
596
- onFocus?: () => void;
597
- onChange?: (value: DateRangePayload$1) => void;
598
- renderFooter?: (api: DateRangeFieldAPI$1) => ReactNode;
599
- renderQuickSelection?: (api: DateRangeFieldAPI$1) => ReactNode;
600
- InputProps?: Pick<InputBaseProps$1, 'aria-label' | 'aria-labelledby' | 'startAdornment'>;
601
- CalendarProps?: Omit<CalendarProps$1, 'footer' | 'classes' | 'selectedDays' | 'quickSelection' | 'numberOfMonths'>;
602
- }
603
- declare const DateRangeField$1: ForwardRefExoticComponent<DateRangeFieldProps$1 & RefAttributes<HTMLDivElement>>;
604
-
605
- /** @deprecated */
606
- declare type DateUnit$1 = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second' | 'millisecond';
607
- /** @deprecated */
608
- declare type DateDurationUnit$1 = DateUnit$1 | 'quarter' | 'week';
609
- /** @deprecated */
610
- declare type DateObject$1 = Record<DateUnit$1, number>;
611
- /** @deprecated */
612
- declare type NullableDate$1 = null | undefined | Date;
613
- /** @deprecated */
614
- declare type DateLike$1 = number | Date;
615
- /** @deprecated */
616
- declare type NullableDateLike$1 = null | undefined | DateLike$1;
617
- /** @deprecated */
618
- declare type DateRange$1 = [Date?, Date?];
619
- /** @deprecated */
620
- declare type DateRangeLike$1 = [DateLike$1?, DateLike$1?];
621
- /** @deprecated */
622
- declare type NullableDateRange$1 = null | undefined | [NullableDate$1?, NullableDate$1?];
623
- /** @deprecated */
624
- declare type NullableDateRangeLike$1 = null | undefined | [NullableDateLike$1?, NullableDateLike$1?];
625
- /** @deprecated */
626
- declare function isDate$1(value: unknown): value is Date;
627
- /** @deprecated */
628
- declare function isDateLike$1(value: unknown): value is DateLike$1;
629
- /** @deprecated */
630
- declare function isValidDate$1(value: unknown): value is Date;
631
- /** @deprecated */
632
- declare function isDateRange$1(range: unknown): range is DateRange$1;
633
- /** @deprecated */
634
- declare function isDateRangeLike$1(range: unknown): range is DateRangeLike$1;
635
- /** @deprecated */
636
- declare function isValidDateRange$1(range: unknown): range is DateRange$1;
637
- /** @deprecated */
638
- declare function toDate$1(value: NullableDateLike$1): Date;
639
- /** @deprecated */
640
- declare function toDateRange$1(range: NullableDateRangeLike$1): DateRange$1;
641
- /** @deprecated */
642
- declare type DateFormatVariant$1 = 'date' | 'shortDate' | 'time' | 'dateTime';
643
- /** @deprecated */
644
- declare type DateFormatOptions$1 = Omit<Intl.DateTimeFormatOptions, 'timeZone' | 'timeZoneName'>;
645
- /** @deprecated */
646
- declare type RelativeTimeFormatStyle$1 = 'narrow' | 'short' | 'long';
647
- /** @deprecated */
648
- interface RelativeTimeFormatOptions$1 {
649
- style?: RelativeTimeFormatStyle$1;
650
- compare?: DateLike$1;
651
- }
652
- /** @deprecated */
653
- declare class DateUtils$1 {
654
- /** @deprecated */
655
- toObject(value: DateLike$1): DateObject$1;
656
- /** @deprecated */
657
- fromObject({ year, month, day, hour, minute, second, millisecond, }: Partial<DateObject$1>): Date;
658
- /** @deprecated */
659
- update(value: DateLike$1, values: Partial<DateObject$1>): Date;
660
- /** @deprecated */
661
- mergeDateAndTime(date: DateLike$1, time: DateLike$1): Date;
662
- /** @deprecated */
663
- startOf(value: DateLike$1, unit: DateDurationUnit$1): Date;
664
- /** @deprecated */
665
- endOf(value: DateLike$1, unit: DateDurationUnit$1): Date;
666
- /** @deprecated */
667
- plus(value: DateLike$1, values: Partial<DateObject$1>): Date;
668
- /** @deprecated */
669
- minus(value: DateLike$1, values: Partial<DateObject$1>): Date;
670
- /** @deprecated */
671
- isSameDate(value: NullableDateLike$1, compare: NullableDateLike$1, unit?: DateUnit$1): boolean;
672
- /** @deprecated */
673
- isSameDateRange(value: NullableDateRangeLike$1, compare: NullableDateRangeLike$1, unit?: DateUnit$1): boolean;
674
- /** @deprecated */
675
- diff(value: DateLike$1, compare: DateLike$1, unit: DateUnit$1): number;
676
- /** @deprecated */
677
- toLocaleString(value: DateLike$1, options?: DateFormatOptions$1): string;
678
- /** @deprecated */
679
- format(value: DateLike$1, variant: DateFormatVariant$1): string;
680
- /** @deprecated */
681
- formatRange(value: NullableDateRangeLike$1, emptyText?: string): string;
682
- /** @deprecated */
683
- formatRelativeTime(value: DateLike$1, { style, compare }?: RelativeTimeFormatOptions$1): string;
684
- }
685
- declare function useDateUtils$1(): DateUtils$1;
686
-
687
- interface FormattedDateConfig$1 extends Partial<DateConfig$1>, FormatDateConfig$1 {
688
- }
689
- declare function useFormattedDate$1(input: NullableDateInput$1, { variant, fallback, ...dateConfig }: FormattedDateConfig$1): string;
690
- interface FormattedDateProps$1 extends Omit<FormattedDateConfig$1, 'fallback'> {
691
- fallback?: ReactNode;
692
- date: NullableDateInput$1;
693
- }
694
- declare function FormattedDate$1({ date, fallback, ...options }: FormattedDateProps$1): null | ReactElement;
695
-
696
- interface FormattedRelativeTimeOptions$1 extends Partial<DateConfig$1>, FormatRelativeTimeOptions$1 {
697
- }
698
- declare function useFormattedRelativeTime$1(input: NullableDateInput$1, { unit, round, padding, fallback, base: baseOption, ...dateConfig }?: FormattedRelativeTimeOptions$1): string;
699
- interface FormattedRelativeTimeProps$1 extends Omit<FormattedRelativeTimeOptions$1, 'fallback'> {
700
- date: NullableDateInput$1;
701
- fallback?: ReactNode;
702
- }
703
- declare function FormattedRelativeTime$1({ date, fallback, ...options }: FormattedRelativeTimeProps$1): null | ReactElement;
704
-
705
- interface TimeFieldProps$1 extends Pick<BaseTextFieldProps$1, 'disabled' | 'error' | 'fullWidth' | 'helperText' | 'id' | 'label' | 'name' | 'placeholder' | 'required'> {
706
- format?: DateFormat$1;
707
- value?: NullableDateInput$1;
708
- onChange?: (value: DatePayload$1) => void;
709
- InputProps?: Pick<InputBaseProps$1, 'startAdornment'>;
710
- }
711
- declare const TimeField$1: ForwardRefExoticComponent<TimeFieldProps$1 & RefAttributes<HTMLDivElement>>;
712
-
713
- declare function useDateTimeRange$1(input: NullableDateRangeInput$1, options?: Partial<DateConfig$1>): DateTimeRange$1;
714
-
715
- declare function useDateTime$1(input: NullableDateInput$1, options?: Partial<DateConfig$1>): DateTime;
716
-
717
- export { Calendar$1 as Calendar, CalendarClassNameMap$1 as CalendarClassNameMap, CalendarClassNames$1 as CalendarClassNames, CalendarDateEvent$1 as CalendarDateEvent, CalendarDayEventHandler$1 as CalendarDayEventHandler, CalendarDayHighlightColor$1 as CalendarDayHighlightColor, CalendarHighlightedDays$1 as CalendarHighlightedDays, CalendarModifier$1 as CalendarModifier, CalendarModifiers$1 as CalendarModifiers, CalendarProps$1 as CalendarProps, CalendarQuickSelection$1 as CalendarQuickSelection, CalendarQuickSelectionItem$1 as CalendarQuickSelectionItem, CalendarQuickSelectionItemProps$1 as CalendarQuickSelectionItemProps, CalendarQuickSelectionProps$1 as CalendarQuickSelectionProps, DateConfig$1 as DateConfig, DateConfigProvider$1 as DateConfigProvider, DateConfigProviderProps$1 as DateConfigProviderProps, DateDisplayVariant$1 as DateDisplayVariant, DateDurationUnit$1 as DateDurationUnit, DateField$1 as DateField, DateFieldAPI$1 as DateFieldAPI, DateFieldProps$1 as DateFieldProps, DateFormat$1 as DateFormat, DateFormatOptions$1 as DateFormatOptions, DateFormatVariant$1 as DateFormatVariant, DateLike$1 as DateLike, DateObject$1 as DateObject, DatePayload$1 as DatePayload, DateRange$1 as DateRange, DateRangeField$1 as DateRangeField, DateRangeFieldProps$1 as DateRangeFieldProps, DateRangeLike$1 as DateRangeLike, DateRangePayload$1 as DateRangePayload, DateString$1 as DateString, DateStringRange$1 as DateStringRange, DateTimeRange$1 as DateTimeRange, DateUnit$1 as DateUnit, DateUtils$1 as DateUtils, FormatDateConfig$1 as FormatDateConfig, FormatDateRangeOptions$1 as FormatDateRangeOptions, FormatRelativeTimeOptions$1 as FormatRelativeTimeOptions, FormattedDate$1 as FormattedDate, FormattedDateConfig$1 as FormattedDateConfig, FormattedDateProps$1 as FormattedDateProps, FormattedRelativeTime$1 as FormattedRelativeTime, FormattedRelativeTimeOptions$1 as FormattedRelativeTimeOptions, FormattedRelativeTimeProps$1 as FormattedRelativeTimeProps, NullableDate$1 as NullableDate, NullableDateInput$1 as NullableDateInput, NullableDateLike$1 as NullableDateLike, NullableDateRange$1 as NullableDateRange, NullableDateRangeInput$1 as NullableDateRangeInput, NullableDateRangeLike$1 as NullableDateRangeLike, NullableDateString$1 as NullableDateString, PrimitiveDateInput$1 as PrimitiveDateInput, PrimitiveDateRangeInput$1 as PrimitiveDateRangeInput, RelativeTimeFormatOptions$1 as RelativeTimeFormatOptions, RelativeTimeFormatStyle$1 as RelativeTimeFormatStyle, TimeField$1 as TimeField, TimeFieldProps$1 as TimeFieldProps, defaultDateConfig$1 as defaultDateConfig, formatDate$1 as formatDate, formatDateRange$1 as formatDateRange, formatRelativeTime$1 as formatRelativeTime, isDate$1 as isDate, isDateLike$1 as isDateLike, isDateRange$1 as isDateRange, isDateRangeLike$1 as isDateRangeLike, isValidDate$1 as isValidDate, isValidDateRange$1 as isValidDateRange, parseDate$1 as parseDate, parseDateRange$1 as parseDateRange, setDefaultTimeZone$1 as setDefaultTimeZone, stringifyDate$1 as stringifyDate, stringifyDateRange$1 as stringifyDateRange, toDate$1 as toDate, toDatePayload$1 as toDatePayload, toDateRange$1 as toDateRange, toDateRangePayload$1 as toDateRangePayload, toPrimitiveDateInput$1 as toPrimitiveDateInput, toPrimitiveDateRangeInput$1 as toPrimitiveDateRangeInput, useDateConfig$1 as useDateConfig, useDateTime$1 as useDateTime, useDateTimeRange$1 as useDateTimeRange, useDateUtils$1 as useDateUtils, useDefaultTimeZone$1 as useDefaultTimeZone, useFormattedDate$1 as useFormattedDate, useFormattedRelativeTime$1 as useFormattedRelativeTime, index_d as v5 };
270
+ export { Calendar, CalendarClassNameMap, CalendarClassNames, CalendarDateEvent, CalendarDayEventHandler, CalendarDayHighlightColor, CalendarHighlightedDays, CalendarModifier, CalendarModifiers, CalendarProps, CalendarQuickSelection, CalendarQuickSelectionItem, CalendarQuickSelectionItemProps, CalendarQuickSelectionProps, DateConfig, DateConfigProvider, DateConfigProviderProps, DateDisplayVariant, DateDurationUnit, DateField, DateFieldAPI, DateFieldProps, DateFormat, DateFormatOptions, DateFormatVariant, DateLike, DateObject, DatePayload, DateRange, DateRangeField, DateRangeFieldProps, DateRangeLike, DateRangePayload, DateString, DateStringRange, DateTimeRange, DateUnit, DateUtils, FormatDateConfig, FormatDateRangeOptions, FormatRelativeTimeOptions, FormattedDate, FormattedDateConfig, FormattedDateProps, FormattedRelativeTime, FormattedRelativeTimeOptions, FormattedRelativeTimeProps, NullableDate, NullableDateInput, NullableDateLike, NullableDateRange, NullableDateRangeInput, NullableDateRangeLike, NullableDateString, PrimitiveDateInput, PrimitiveDateRangeInput, RelativeTimeFormatOptions, RelativeTimeFormatStyle, TimeField, TimeFieldProps, defaultDateConfig, formatDate, formatDateRange, formatRelativeTime, isDate, isDateLike, isDateRange, isDateRangeLike, isValidDate, isValidDateRange, parseDate, parseDateRange, setDefaultTimeZone, stringifyDate, stringifyDateRange, toDate, toDatePayload, toDateRange, toDateRangePayload, toPrimitiveDateInput, toPrimitiveDateRangeInput, useDateConfig, useDateTime, useDateTimeRange, useDateUtils, useDefaultTimeZone, useFormattedDate, useFormattedRelativeTime };