@materializecss/materialize 2.1.1 → 2.2.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,14 +1,14 @@
1
1
  /**
2
2
  * Base options for component initialization.
3
3
  */
4
- interface BaseOptions {
4
+ interface BaseOptions$1 {
5
5
  }
6
6
  type MElement = HTMLElement | Element;
7
7
  type InitElements<T extends MElement> = NodeListOf<T> | HTMLCollectionOf<T>;
8
- type ComponentConstructor<T extends Component<O>, O extends BaseOptions> = {
8
+ type ComponentConstructor<T extends Component<O>, O extends BaseOptions$1> = {
9
9
  new (el: HTMLElement, options: Partial<O>): T;
10
10
  };
11
- type ComponentType<C extends Component<O>, O extends BaseOptions> = ComponentConstructor<C, O> & typeof Component<O>;
11
+ type ComponentType<C extends Component<O>, O extends BaseOptions$1> = ComponentConstructor<C, O> & typeof Component<O>;
12
12
  interface I18nOptions {
13
13
  cancel: string;
14
14
  clear: string;
@@ -22,7 +22,7 @@ interface Openable {
22
22
  /**
23
23
  * Base class implementation for Materialize components.
24
24
  */
25
- declare class Component<O extends BaseOptions> {
25
+ declare class Component<O extends BaseOptions$1> {
26
26
  /**
27
27
  * The DOM element the plugin was initialized with.
28
28
  */
@@ -41,37 +41,37 @@ declare class Component<O extends BaseOptions> {
41
41
  * @param options Component options.
42
42
  * @param classDef Class definition.
43
43
  */
44
- protected static init<I extends HTMLElement, O extends BaseOptions, C extends Component<O>>(el: I, options: O, classDef: ComponentType<C, O>): C;
44
+ protected static init<I extends HTMLElement, O extends BaseOptions$1, C extends Component<O>>(el: I, options: O, classDef: ComponentType<C, O>): C;
45
45
  /**
46
46
  * Initializes component instances.
47
47
  * @param els HTML elements.
48
48
  * @param options Component options.
49
49
  * @param classDef Class definition.
50
50
  */
51
- protected static init<I extends MElement, O extends BaseOptions, C extends Component<O>>(els: InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C[];
51
+ protected static init<I extends MElement, O extends BaseOptions$1, C extends Component<O>>(els: InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C[];
52
52
  /**
53
53
  * Initializes component instances.
54
54
  * @param els HTML elements.
55
55
  * @param options Component options.
56
56
  * @param classDef Class definition.
57
57
  */
58
- protected static init<I extends MElement, O extends BaseOptions, C extends Component<O>>(els: I | InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C | C[];
58
+ protected static init<I extends MElement, O extends BaseOptions$1, C extends Component<O>>(els: I | InitElements<I>, options: Partial<O>, classDef: ComponentType<C, O>): C | C[];
59
59
  /**
60
60
  * @returns default options for component instance.
61
61
  */
62
- static get defaults(): BaseOptions;
62
+ static get defaults(): BaseOptions$1;
63
63
  /**
64
64
  * Retrieves component instance for the given element.
65
65
  * @param el Associated HTML Element.
66
66
  */
67
- static getInstance(el: HTMLElement): Component<BaseOptions>;
67
+ static getInstance(el: HTMLElement): Component<BaseOptions$1>;
68
68
  /**
69
69
  * Destroy plugin instance and teardown.
70
70
  */
71
71
  destroy(): void;
72
72
  }
73
73
 
74
- interface DropdownOptions extends BaseOptions {
74
+ interface DropdownOptions extends BaseOptions$1 {
75
75
  /**
76
76
  * Defines the edge the menu is aligned to.
77
77
  * @default 'left'
@@ -156,8 +156,8 @@ declare class Dropdown extends Component<DropdownOptions> implements Openable {
156
156
  isTouchMoving: boolean;
157
157
  /** The index of the item focused. */
158
158
  focusedIndex: number;
159
- filterQuery: any[];
160
- filterTimeout: NodeJS.Timeout;
159
+ filterQuery: string[];
160
+ filterTimeout: NodeJS.Timeout | number;
161
161
  constructor(el: HTMLElement, options: Partial<DropdownOptions>);
162
162
  static get defaults(): DropdownOptions;
163
163
  /**
@@ -179,16 +179,17 @@ declare class Dropdown extends Component<DropdownOptions> implements Openable {
179
179
  _setupTemporaryEventHandlers(): void;
180
180
  _removeTemporaryEventHandlers(): void;
181
181
  _handleClick: (e: MouseEvent) => void;
182
- _handleMouseEnter: () => void;
182
+ _handleMouseEnter: (e: any) => void;
183
183
  _handleMouseLeave: (e: MouseEvent) => void;
184
184
  _handleDocumentClick: (e: MouseEvent) => void;
185
185
  _handleTriggerKeydown: (e: KeyboardEvent) => void;
186
186
  _handleDocumentTouchmove: (e: TouchEvent) => void;
187
187
  _handleDropdownClick: (e: MouseEvent) => void;
188
188
  _handleDropdownKeydown: (e: KeyboardEvent) => void;
189
- _handleWindowResize: (e: Event) => void;
189
+ _handleWindowResize: () => void;
190
190
  _resetFilterQuery: () => void;
191
191
  _resetDropdownStyles(): void;
192
+ _resetDropdownPositioningStyles(): void;
192
193
  _moveDropdown(containerEl?: HTMLElement): void;
193
194
  _makeDropdownFocusable(): void;
194
195
  _focusFocusedItem(): void;
@@ -238,7 +239,7 @@ interface AutocompleteData {
238
239
  */
239
240
  description?: string;
240
241
  }
241
- interface AutocompleteOptions extends BaseOptions {
242
+ interface AutocompleteOptions extends BaseOptions$1 {
242
243
  /**
243
244
  * Data object defining autocomplete options with
244
245
  * optional icon strings.
@@ -320,7 +321,9 @@ declare class Autocomplete extends Component<AutocompleteOptions> {
320
321
  _setupDropdown(): void;
321
322
  _removeDropdown(): void;
322
323
  _handleInputBlur: () => void;
323
- _handleInputKeyupAndFocus: (e: KeyboardEvent) => void;
324
+ _handleInputKeyup: (e: KeyboardEvent) => void;
325
+ _handleInputFocus: () => void;
326
+ _inputChangeDetection: (value: string) => void;
324
327
  _handleInputKeydown: (e: KeyboardEvent) => void;
325
328
  _handleInputClick: () => void;
326
329
  _handleContainerMousedownAndTouchstart: () => void;
@@ -359,12 +362,12 @@ declare class Autocomplete extends Component<AutocompleteOptions> {
359
362
  selectOption(id: number | string): void;
360
363
  }
361
364
 
362
- interface FloatingActionButtonOptions extends BaseOptions {
365
+ interface FloatingActionButtonOptions extends BaseOptions$1 {
363
366
  /**
364
367
  * Direction FAB menu opens.
365
368
  * @default "top"
366
369
  */
367
- direction: "top" | "right" | "bottom" | "left";
370
+ direction: 'top' | 'right' | 'bottom' | 'left';
368
371
  /**
369
372
  * true: FAB menu appears on hover, false: FAB menu appears on click.
370
373
  * @default true
@@ -423,11 +426,56 @@ declare class FloatingActionButton extends Component<FloatingActionButtonOptions
423
426
  _animateInToolbar(): void;
424
427
  }
425
428
 
426
- declare class Cards {
427
- static Init(): void;
429
+ interface CardsOptions extends BaseOptions$1 {
430
+ onOpen: (el: Element) => void;
431
+ onClose: (el: Element) => void;
432
+ inDuration: number;
433
+ outDuration: number;
434
+ }
435
+ declare class Cards extends Component<CardsOptions> implements Openable {
436
+ isOpen: boolean;
437
+ private readonly cardReveal;
438
+ private readonly initialOverflow;
439
+ private _activators;
440
+ private cardRevealClose;
441
+ constructor(el: HTMLElement, options: Partial<CardsOptions>);
442
+ static get defaults(): CardsOptions;
443
+ /**
444
+ * Initializes instance of Cards.
445
+ * @param el HTML element.
446
+ * @param options Component options.
447
+ */
448
+ static init(el: HTMLElement, options?: Partial<CardsOptions>): Cards;
449
+ /**
450
+ * Initializes instances of Cards.
451
+ * @param els HTML elements.
452
+ * @param options Component options.
453
+ */
454
+ static init(els: InitElements<MElement>, options?: Partial<CardsOptions>): Cards[];
455
+ static getInstance(el: HTMLElement): Cards;
456
+ /**
457
+ * {@inheritDoc}
458
+ */
459
+ destroy(): void;
460
+ _setupEventHandlers: () => void;
461
+ _removeEventHandlers: () => void;
462
+ _handleClickInteraction: () => void;
463
+ _handleKeypressEvent: (e: KeyboardEvent) => void;
464
+ _handleRevealEvent: () => void;
465
+ _setupRevealCloseEventHandlers: () => void;
466
+ _removeRevealCloseEventHandlers: () => void;
467
+ _handleKeypressCloseEvent: (e: KeyboardEvent) => void;
468
+ /**
469
+ * Show card reveal.
470
+ */
471
+ open: () => void;
472
+ /**
473
+ * Hide card reveal.
474
+ */
475
+ close: () => void;
428
476
  }
429
477
 
430
- interface CarouselOptions extends BaseOptions {
478
+ interface CarouselOptions extends BaseOptions$1 {
431
479
  /**
432
480
  * Transition duration in milliseconds.
433
481
  * @default 200
@@ -485,15 +533,15 @@ declare class Carousel extends Component<CarouselOptions> {
485
533
  offset: number;
486
534
  target: number;
487
535
  images: HTMLElement[];
488
- itemWidth: any;
489
- itemHeight: any;
536
+ itemWidth: number;
537
+ itemHeight: number;
490
538
  dim: number;
491
- _indicators: any;
539
+ _indicators: HTMLUListElement;
492
540
  count: number;
493
541
  xform: string;
494
542
  verticalDragged: boolean;
495
- reference: any;
496
- referenceY: any;
543
+ reference: number;
544
+ referenceY: number;
497
545
  velocity: number;
498
546
  frame: number;
499
547
  timestamp: number;
@@ -501,9 +549,9 @@ declare class Carousel extends Component<CarouselOptions> {
501
549
  amplitude: number;
502
550
  /** The index of the center carousel item. */
503
551
  center: number;
504
- imageHeight: any;
505
- scrollingTimeout: any;
506
- oneTimeCallback: any;
552
+ imageHeight: number;
553
+ scrollingTimeout: number | NodeJS.Timeout;
554
+ oneTimeCallback: (current: Element, dragged: boolean) => void | null;
507
555
  constructor(el: HTMLElement, options: Partial<CarouselOptions>);
508
556
  static get defaults(): CarouselOptions;
509
557
  /**
@@ -528,6 +576,8 @@ declare class Carousel extends Component<CarouselOptions> {
528
576
  _handleCarouselRelease: (e: MouseEvent | TouchEvent) => boolean;
529
577
  _handleCarouselClick: (e: MouseEvent | TouchEvent) => boolean;
530
578
  _handleIndicatorClick: (e: Event) => void;
579
+ _handleIndicatorKeyPress: (e: KeyboardEvent) => void;
580
+ _handleIndicatorInteraction: (e: Event) => void;
531
581
  _handleResize: () => void;
532
582
  _setCarouselHeight(imageOnly?: boolean): void;
533
583
  _xpos(e: MouseEvent | TouchEvent): number;
@@ -537,7 +587,7 @@ declare class Carousel extends Component<CarouselOptions> {
537
587
  _autoScroll: () => void;
538
588
  _scroll(x?: number): void;
539
589
  _updateItemStyle(el: HTMLElement, opacity: number, zIndex: number, transform: string): void;
540
- _cycleTo(n: number, callback?: CarouselOptions["onCycleTo"]): void;
590
+ _cycleTo(n: number, callback?: CarouselOptions['onCycleTo']): void;
541
591
  /**
542
592
  * Move carousel to next slide or go forward a given amount of slides.
543
593
  * @param n How many times the carousel slides.
@@ -553,42 +603,7 @@ declare class Carousel extends Component<CarouselOptions> {
553
603
  * @param n Index of slide.
554
604
  * @param callback "onCycleTo" optional callback.
555
605
  */
556
- set(n: number, callback?: CarouselOptions["onCycleTo"]): void;
557
- }
558
-
559
- interface CharacterCounterOptions extends BaseOptions {
560
- }
561
- type InputElement = HTMLInputElement | HTMLTextAreaElement;
562
- declare class CharacterCounter extends Component<{}> {
563
- el: InputElement;
564
- /** Stores the reference to the counter HTML element. */
565
- counterEl: HTMLSpanElement;
566
- /** Specifies whether the input is valid or not. */
567
- isInvalid: boolean;
568
- /** Specifies whether the input text has valid length or not. */
569
- isValidLength: boolean;
570
- constructor(el: HTMLInputElement | HTMLTextAreaElement, options: Partial<CharacterCounterOptions>);
571
- static get defaults(): CharacterCounterOptions;
572
- /**
573
- * Initializes instance of CharacterCounter.
574
- * @param el HTML element.
575
- * @param options Component options.
576
- */
577
- static init(el: InputElement, options?: Partial<CharacterCounterOptions>): CharacterCounter;
578
- /**
579
- * Initializes instances of CharacterCounter.
580
- * @param els HTML elements.
581
- * @param options Component options.
582
- */
583
- static init(els: InitElements<InputElement | MElement>, options?: Partial<CharacterCounterOptions>): CharacterCounter[];
584
- static getInstance(el: InputElement): CharacterCounter;
585
- destroy(): void;
586
- _setupEventHandlers(): void;
587
- _removeEventHandlers(): void;
588
- _setupCounter(): void;
589
- _removeCounter(): void;
590
- updateCounter: () => void;
591
- _validateInput(): void;
606
+ set(n: number, callback?: CarouselOptions['onCycleTo']): void;
592
607
  }
593
608
 
594
609
  interface ChipData {
@@ -605,7 +620,7 @@ interface ChipData {
605
620
  */
606
621
  image?: string;
607
622
  }
608
- interface ChipsOptions extends BaseOptions {
623
+ interface ChipsOptions extends BaseOptions$1 {
609
624
  /**
610
625
  * Set the chip data.
611
626
  * @default []
@@ -641,6 +656,11 @@ interface ChipsOptions extends BaseOptions {
641
656
  * @default 'material-icons'
642
657
  */
643
658
  closeIconClass: string;
659
+ /**
660
+ * Specifies option to render user input field
661
+ * @default false;
662
+ */
663
+ allowUserInput: boolean;
644
664
  /**
645
665
  * Callback for chip add.
646
666
  * @default null
@@ -665,7 +685,7 @@ declare class Chips extends Component<ChipsOptions> {
665
685
  /** Autocomplete instance, if any. */
666
686
  autocomplete: Autocomplete;
667
687
  _input: HTMLInputElement;
668
- _label: any;
688
+ _label: HTMLLabelElement;
669
689
  _chips: HTMLElement[];
670
690
  static _keydown: boolean;
671
691
  private _selectedChip;
@@ -676,7 +696,7 @@ declare class Chips extends Component<ChipsOptions> {
676
696
  * @param el HTML element.
677
697
  * @param options Component options.
678
698
  */
679
- static init(el: InitElements<MElement>, options?: Partial<ChipsOptions>): Chips;
699
+ static init(el: HTMLElement, options?: Partial<ChipsOptions>): Chips;
680
700
  /**
681
701
  * Initializes instances of Chips.
682
702
  * @param els HTML elements.
@@ -690,7 +710,7 @@ declare class Chips extends Component<ChipsOptions> {
690
710
  _removeEventHandlers(): void;
691
711
  _handleChipClick: (e: MouseEvent) => void;
692
712
  static _handleChipsKeydown(e: KeyboardEvent): void;
693
- static _handleChipsKeyup(e: Event): void;
713
+ static _handleChipsKeyup(): void;
694
714
  static _handleChipsBlur(e: Event): void;
695
715
  _handleInputFocus: () => void;
696
716
  _handleInputBlur: () => void;
@@ -720,7 +740,7 @@ declare class Chips extends Component<ChipsOptions> {
720
740
  static Init(): void;
721
741
  }
722
742
 
723
- interface CollapsibleOptions extends BaseOptions {
743
+ interface CollapsibleOptions extends BaseOptions$1 {
724
744
  /**
725
745
  * If accordion versus collapsible.
726
746
  * @default true
@@ -794,127 +814,6 @@ declare class Collapsible extends Component<CollapsibleOptions> {
794
814
  close: (index: number) => void;
795
815
  }
796
816
 
797
- interface ModalOptions extends BaseOptions {
798
- /**
799
- * Opacity of the modal overlay.
800
- * @default 0.5
801
- */
802
- opacity: number;
803
- /**
804
- * Transition in duration in milliseconds.
805
- * @default 250
806
- */
807
- inDuration: number;
808
- /**
809
- * Transition out duration in milliseconds.
810
- * @default 250
811
- */
812
- outDuration: number;
813
- /**
814
- * Prevent page from scrolling while modal is open.
815
- * @default true
816
- */
817
- preventScrolling: boolean;
818
- /**
819
- * Callback function called before modal is opened.
820
- * @default null
821
- */
822
- onOpenStart: (this: Modal, el: HTMLElement) => void;
823
- /**
824
- * Callback function called after modal is opened.
825
- * @default null
826
- */
827
- onOpenEnd: (this: Modal, el: HTMLElement) => void;
828
- /**
829
- * Callback function called before modal is closed.
830
- * @default null
831
- */
832
- onCloseStart: (el: HTMLElement) => void;
833
- /**
834
- * Callback function called after modal is closed.
835
- * @default null
836
- */
837
- onCloseEnd: (el: HTMLElement) => void;
838
- /**
839
- * Allow modal to be dismissed by keyboard or overlay click.
840
- * @default true
841
- */
842
- dismissible: boolean;
843
- /**
844
- * Starting top offset.
845
- * @default '4%'
846
- */
847
- startingTop: string;
848
- /**
849
- * Ending top offset.
850
- * @default '10%'
851
- */
852
- endingTop: string;
853
- }
854
- declare class Modal extends Component<ModalOptions> {
855
- static _modalsOpen: number;
856
- static _count: number;
857
- /**
858
- * ID of the modal element.
859
- */
860
- id: string;
861
- /**
862
- * If the modal is open.
863
- */
864
- isOpen: boolean;
865
- private _openingTrigger;
866
- private _overlay;
867
- private _nthModalOpened;
868
- constructor(el: HTMLElement, options: Partial<ModalOptions>);
869
- static get defaults(): {
870
- opacity: number;
871
- inDuration: number;
872
- outDuration: number;
873
- onOpenStart: any;
874
- onOpenEnd: any;
875
- onCloseStart: any;
876
- onCloseEnd: any;
877
- preventScrolling: boolean;
878
- dismissible: boolean;
879
- startingTop: string;
880
- endingTop: string;
881
- };
882
- /**
883
- * Initializes instance of Modal.
884
- * @param el HTML element.
885
- * @param options Component options.
886
- * @returns {Modal}
887
- */
888
- static init(el: HTMLElement, options?: Partial<ModalOptions>): Modal;
889
- /**
890
- * Initializes instances of Modal.
891
- * @param els HTML elements.
892
- * @param options Component options.
893
- * @returns {Modal[]}
894
- */
895
- static init(els: InitElements<MElement>, options?: Partial<ModalOptions>): Modal[];
896
- static getInstance(el: HTMLElement): Modal;
897
- destroy(): void;
898
- _setupEventHandlers(): void;
899
- _removeEventHandlers(): void;
900
- _handleTriggerClick: (e: MouseEvent) => void;
901
- _handleOverlayClick: () => void;
902
- _handleModalCloseClick: (e: MouseEvent) => void;
903
- _handleKeydown: (e: KeyboardEvent) => void;
904
- _handleFocus: (e: FocusEvent) => void;
905
- _animateIn(): void;
906
- _animateOut(): void;
907
- /**
908
- * Open modal.
909
- */
910
- open: (trigger?: HTMLElement) => Modal;
911
- /**
912
- * Close modal.
913
- */
914
- close: () => this;
915
- static create(children?: string): string;
916
- }
917
-
918
817
  interface DateI18nOptions extends I18nOptions {
919
818
  previousMonth: string;
920
819
  nextMonth: string;
@@ -924,12 +823,7 @@ interface DateI18nOptions extends I18nOptions {
924
823
  weekdaysShort: string[];
925
824
  weekdaysAbbrev: string[];
926
825
  }
927
- interface DatepickerOptions extends BaseOptions {
928
- /**
929
- * Automatically close picker when date is selected.
930
- * @default false
931
- */
932
- autoClose: boolean;
826
+ interface DatepickerOptions extends BaseOptions$1 {
933
827
  /**
934
828
  * The date output format for the input field value
935
829
  * or a function taking the date and outputting the
@@ -942,16 +836,36 @@ interface DatepickerOptions extends BaseOptions {
942
836
  * @default null
943
837
  */
944
838
  parse: ((value: string, format: string) => Date) | null;
839
+ /**
840
+ * The initial condition if the datepicker is based on date range.
841
+ * @default false
842
+ */
843
+ isDateRange: boolean;
844
+ /**
845
+ * The initial condition if the datepicker is based on multiple date selection.
846
+ * @default false
847
+ */
848
+ isMultipleSelection: boolean;
945
849
  /**
946
850
  * The initial date to view when first opened.
947
851
  * @default null
948
852
  */
949
853
  defaultDate: Date | null;
854
+ /**
855
+ * The initial end date to view when first opened.
856
+ * @default null
857
+ */
858
+ defaultEndDate: Date | null;
950
859
  /**
951
860
  * Make the `defaultDate` the initial selected value.
952
861
  * @default false
953
862
  */
954
863
  setDefaultDate: boolean;
864
+ /**
865
+ * Make the `defaultEndDate` the initial selected value.
866
+ * @default false
867
+ */
868
+ setDefaultEndDate: boolean;
955
869
  /**
956
870
  * Prevent selection of any date on the weekend.
957
871
  * @default false
@@ -1030,40 +944,32 @@ interface DatepickerOptions extends BaseOptions {
1030
944
  * @default null
1031
945
  */
1032
946
  onSelect: ((selectedDate: Date) => void) | null;
1033
- /**
1034
- * Callback function when Datepicker is opened.
1035
- * @default null
1036
- */
1037
- onOpen: (() => void) | null;
1038
947
  /**
1039
948
  * Callback function when Datepicker is closed.
1040
949
  * @default null
1041
950
  */
1042
- onClose: (() => void) | null;
1043
951
  /**
1044
952
  * Callback function when Datepicker HTML is refreshed.
1045
953
  * @default null
1046
954
  */
1047
955
  onDraw: (() => void) | null;
1048
956
  /** Field used for internal calculations DO NOT CHANGE IT */
1049
- minYear?: any;
957
+ minYear?: number;
1050
958
  /** Field used for internal calculations DO NOT CHANGE IT */
1051
- maxYear?: any;
959
+ maxYear?: number;
1052
960
  /** Field used for internal calculations DO NOT CHANGE IT */
1053
- minMonth?: any;
961
+ minMonth?: number;
1054
962
  /** Field used for internal calculations DO NOT CHANGE IT */
1055
- maxMonth?: any;
963
+ maxMonth?: number;
1056
964
  /** Field used for internal calculations DO NOT CHANGE IT */
1057
- startRange?: any;
965
+ startRange?: Date;
1058
966
  /** Field used for internal calculations DO NOT CHANGE IT */
1059
- endRange?: any;
967
+ endRange?: Date;
1060
968
  }
1061
969
  declare class Datepicker extends Component<DatepickerOptions> {
1062
970
  el: HTMLInputElement;
1063
971
  id: string;
1064
- /** If the picker is open. */
1065
- isOpen: boolean;
1066
- modal: Modal;
972
+ multiple: boolean;
1067
973
  calendarEl: HTMLElement;
1068
974
  /** CLEAR button instance. */
1069
975
  clearBtn: HTMLElement;
@@ -1073,10 +979,17 @@ declare class Datepicker extends Component<DatepickerOptions> {
1073
979
  modalEl: HTMLElement;
1074
980
  yearTextEl: HTMLElement;
1075
981
  dateTextEl: HTMLElement;
982
+ endDateEl: HTMLInputElement;
983
+ dateEls: HTMLInputElement[];
1076
984
  /** The selected Date. */
1077
985
  date: Date;
1078
- formats: any;
1079
- calendars: any;
986
+ endDate: null | Date;
987
+ dates: Date[];
988
+ formats: object;
989
+ calendars: [{
990
+ month: number;
991
+ year: number;
992
+ }];
1080
993
  private _y;
1081
994
  private _m;
1082
995
  static _template: string;
@@ -1096,30 +1009,68 @@ declare class Datepicker extends Component<DatepickerOptions> {
1096
1009
  static init(els: InitElements<HTMLInputElement | MElement>, options?: Partial<DatepickerOptions>): Datepicker[];
1097
1010
  static _isDate(obj: any): boolean;
1098
1011
  static _isWeekend(date: any): boolean;
1012
+ /**
1013
+ * @deprecated as this function has no effect without any return statement or global parameter setter.
1014
+ */
1099
1015
  static _setToStartOfDay(date: any): void;
1100
1016
  static _getDaysInMonth(year: any, month: any): number;
1101
1017
  static _isLeapYear(year: any): boolean;
1102
1018
  static _compareDates(a: any, b: any): boolean;
1019
+ static _compareWithinRange(day: Date, date: Date, dateEnd: Date): boolean;
1020
+ static _comparePastDate(a: Date, b: Date): boolean;
1103
1021
  static getInstance(el: HTMLElement): Datepicker;
1104
1022
  destroy(): void;
1105
1023
  destroySelects(): void;
1106
1024
  _insertHTMLIntoDOM(): void;
1107
- _setupModal(): void;
1108
1025
  /**
1109
- * Gets a string representation of the selected date.
1026
+ * Gets a string representation of the given date.
1110
1027
  */
1111
- toString(format?: string | ((d: Date) => string)): string;
1028
+ toString(date?: Date, format?: string | ((d: Date) => string)): string;
1029
+ /**
1030
+ * Returns the formatted date.
1031
+ */
1032
+ formatDate(date: Date, format: string): string;
1033
+ /**
1034
+ * Sets date from input field.
1035
+ */
1036
+ setDateFromInput(el: HTMLInputElement): void;
1112
1037
  /**
1113
1038
  * Set a date on the datepicker.
1114
1039
  * @param date Date to set on the datepicker.
1115
1040
  * @param preventOnSelect Undocumented as of 5 March 2018.
1041
+ * @param isEndDate
1042
+ * @param fromUserInput
1043
+ */
1044
+ setDate(date?: Date, preventOnSelect?: boolean, isEndDate?: boolean, fromUserInput?: boolean): void;
1045
+ validateDate(date: Date): void | Date;
1046
+ /**
1047
+ * Set a single date on the datepicker.
1048
+ * @param date Date to set on the datepicker.
1049
+ * @param isEndDate
1050
+ */
1051
+ setSingleDate(date: Date, isEndDate: boolean): void;
1052
+ /**
1053
+ * Set a multi date on the datepicker.
1054
+ * @param date Date to set on the datepicker.
1055
+ */
1056
+ setMultiDate(date: Date): void;
1057
+ /**
1058
+ * Sets the data-date attribute on the date input field
1059
+ */
1060
+ setDataDate(el: any, date: any): void;
1061
+ /**
1062
+ * Sets dates on the input values.
1063
+ */
1064
+ setInputValues(): void;
1065
+ setMultipleSelectionInputValues(): void;
1066
+ /**
1067
+ * Sets given date as the input value on the given element.
1116
1068
  */
1117
- setDate(date?: Date | string, preventOnSelect?: boolean): void;
1069
+ setInputValue(el: any, date: any): void;
1118
1070
  /**
1119
- * Sets current date as the input value.
1071
+ * Renders the date in the modal head section.
1120
1072
  */
1121
- setInputValue(): void;
1122
- _renderDateDisplay(): void;
1073
+ _renderDateDisplay(date: Date, endDate?: Date): void;
1123
1074
  /**
1124
1075
  * Change date view to a specific date on the datepicker.
1125
1076
  * @param date Date to show on the datepicker.
@@ -1136,44 +1087,29 @@ declare class Datepicker extends Component<DatepickerOptions> {
1136
1087
  renderHead(opts: any): string;
1137
1088
  renderBody(rows: any): string;
1138
1089
  renderTitle(instance: any, c: any, year: any, month: any, refYear: any, randId: any): string;
1139
- draw(force?: boolean): void;
1090
+ draw(): void;
1140
1091
  _setupEventHandlers(): void;
1141
1092
  _setupVariables(): void;
1142
1093
  _removeEventHandlers(): void;
1143
- _handleInputClick: () => void;
1094
+ _handleInputClick: (e: any) => void;
1144
1095
  _handleInputKeydown: (e: KeyboardEvent) => void;
1145
1096
  _handleCalendarClick: (e: any) => void;
1097
+ _handleDateRangeCalendarClick: (date: Date) => void;
1146
1098
  _handleClearClick: () => void;
1099
+ _clearDates: () => void;
1147
1100
  _handleMonthChange: (e: any) => void;
1148
1101
  _handleYearChange: (e: any) => void;
1149
1102
  gotoMonth(month: any): void;
1150
1103
  gotoYear(year: any): void;
1151
1104
  _handleInputChange: (e: Event) => void;
1152
1105
  renderDayName(opts: any, day: any, abbr?: boolean): any;
1106
+ createDateInput(): HTMLInputElement;
1153
1107
  _finishSelection: () => void;
1154
- /**
1155
- * Open datepicker.
1156
- */
1157
- open: () => this;
1158
- /**
1159
- * Close datepicker.
1160
- */
1161
- close: () => this;
1162
- }
1163
-
1164
- declare class Forms {
1165
- /**
1166
- * Resizes the given TextArea after updating the
1167
- * value content dynamically.
1168
- * @param textarea TextArea to be resized
1169
- */
1170
- static textareaAutoResize(textarea: HTMLTextAreaElement): void;
1171
- static Init(): void;
1172
- static InitTextarea(textarea: HTMLTextAreaElement): void;
1173
- static InitFileInputPath(fileInput: HTMLInputElement): void;
1108
+ open(): this;
1109
+ close(): this;
1174
1110
  }
1175
1111
 
1176
- interface MaterialboxOptions extends BaseOptions {
1112
+ interface MaterialboxOptions extends BaseOptions$1 {
1177
1113
  /**
1178
1114
  * Transition in duration in milliseconds.
1179
1115
  * @default 275
@@ -1246,6 +1182,8 @@ declare class Materialbox extends Component<MaterialboxOptions> {
1246
1182
  private _setupEventHandlers;
1247
1183
  private _removeEventHandlers;
1248
1184
  private _handleMaterialboxClick;
1185
+ private _handleMaterialboxKeypress;
1186
+ private _handleMaterialboxToggle;
1249
1187
  private _handleWindowScroll;
1250
1188
  private _handleWindowResize;
1251
1189
  private _handleWindowEscape;
@@ -1268,46 +1206,200 @@ declare class Materialbox extends Component<MaterialboxOptions> {
1268
1206
  close: () => void;
1269
1207
  }
1270
1208
 
1271
- interface ParallaxOptions extends BaseOptions {
1272
- /**
1273
- * The minimum width of the screen, in pixels, where the parallax functionality starts working.
1274
- * @default 0
1275
- */
1276
- responsiveThreshold: number;
1209
+ interface ModalOptions extends BaseOptions$1 {
1210
+ opacity: number;
1211
+ inDuration: number;
1212
+ outDuration: number;
1213
+ preventScrolling: boolean;
1214
+ onOpenStart: (this: Modal, el: HTMLElement) => void;
1215
+ onOpenEnd: (this: Modal, el: HTMLElement) => void;
1216
+ onCloseStart: (el: HTMLElement) => void;
1217
+ onCloseEnd: (el: HTMLElement) => void;
1218
+ dismissible: boolean;
1219
+ startingTop: string;
1220
+ endingTop: string;
1277
1221
  }
1278
- declare class Parallax extends Component<ParallaxOptions> {
1279
- private _enabled;
1280
- private _img;
1281
- static _parallaxes: Parallax[];
1282
- static _handleScrollThrottled: () => any;
1283
- static _handleWindowResizeThrottled: () => any;
1284
- constructor(el: HTMLElement, options: Partial<ParallaxOptions>);
1285
- static get defaults(): ParallaxOptions;
1286
- /**
1287
- * Initializes instance of Parallax.
1288
- * @param el HTML element.
1289
- * @param options Component options.
1290
- */
1291
- static init(el: HTMLElement, options?: Partial<ParallaxOptions>): Parallax;
1292
- /**
1293
- * Initializes instances of Parallax.
1294
- * @param els HTML elements.
1295
- * @param options Component options.
1296
- */
1297
- static init(els: InitElements<MElement>, options?: Partial<ParallaxOptions>): Parallax[];
1298
- static getInstance(el: HTMLElement): Parallax;
1222
+ declare class Modal extends Component<ModalOptions> {
1223
+ #private;
1224
+ constructor(el: HTMLElement, options: Partial<ModalOptions>);
1225
+ static get defaults(): {
1226
+ opacity: number;
1227
+ inDuration: number;
1228
+ outDuration: number;
1229
+ onOpenStart: any;
1230
+ onOpenEnd: any;
1231
+ onCloseStart: any;
1232
+ onCloseEnd: any;
1233
+ preventScrolling: boolean;
1234
+ dismissible: boolean;
1235
+ startingTop: string;
1236
+ endingTop: string;
1237
+ };
1238
+ static init(el: HTMLElement, options?: Partial<ModalOptions>): Modal;
1239
+ static init(els: InitElements<MElement>, options?: Partial<ModalOptions>): Modal[];
1240
+ static getInstance(el: HTMLElement): Modal;
1299
1241
  destroy(): void;
1300
- static _handleScroll(): void;
1301
- static _handleWindowResize(): void;
1302
1242
  _setupEventHandlers(): void;
1303
1243
  _removeEventHandlers(): void;
1304
- _setupStyles(): void;
1305
- _handleImageLoad: () => void;
1244
+ _handleTriggerClick(): void;
1245
+ _handleOverlayClick(): void;
1246
+ _handleModalCloseClick(): void;
1247
+ _handleKeydown(): void;
1248
+ _handleFocus(): void;
1249
+ open(): this;
1250
+ close(): this;
1251
+ static create(config: any): string | HTMLDialogElement;
1252
+ }
1253
+
1254
+ declare class Edges {
1255
+ top: boolean;
1256
+ right: boolean;
1257
+ bottom: boolean;
1258
+ left: boolean;
1259
+ }
1260
+
1261
+ declare class Bounding {
1262
+ left: number;
1263
+ top: number;
1264
+ width: number;
1265
+ height: number;
1266
+ }
1267
+
1268
+ /**
1269
+ * Class with utilitary functions for global usage.
1270
+ */
1271
+ declare class Utils {
1272
+ /** Specifies wether tab is pressed or not. */
1273
+ static tabPressed: boolean;
1274
+ /** Specifies wether there is a key pressed. */
1275
+ static keyDown: boolean;
1276
+ /**
1277
+ * Key maps.
1278
+ */
1279
+ static keys: {
1280
+ TAB: string[];
1281
+ ENTER: string[];
1282
+ ESC: string[];
1283
+ BACKSPACE: string[];
1284
+ ARROW_UP: string[];
1285
+ ARROW_DOWN: string[];
1286
+ ARROW_LEFT: string[];
1287
+ ARROW_RIGHT: string[];
1288
+ DELETE: string[];
1289
+ };
1290
+ /**
1291
+ * Detects when a key is pressed.
1292
+ * @param e Event instance.
1293
+ */
1294
+ static docHandleKeydown(e: KeyboardEvent): void;
1295
+ /**
1296
+ * Detects when a key is released.
1297
+ * @param e Event instance.
1298
+ */
1299
+ static docHandleKeyup(e: KeyboardEvent): void;
1300
+ /**
1301
+ * Detects when document is focused.
1302
+ * @param e Event instance.
1303
+ */
1304
+ static docHandleFocus(e: FocusEvent): void;
1305
+ /**
1306
+ * Detects when document is not focused.
1307
+ * @param e Event instance.
1308
+ */
1309
+ static docHandleBlur(e: FocusEvent): void;
1310
+ /**
1311
+ * Generates a unique string identifier.
1312
+ */
1313
+ static guid(): string;
1314
+ /**
1315
+ * Checks for exceeded edges
1316
+ * @param container Container element.
1317
+ * @param bounding Bounding rect.
1318
+ * @param offset Element offset.
1319
+ */
1320
+ static checkWithinContainer(container: HTMLElement, bounding: Bounding, offset: number): Edges;
1321
+ /**
1322
+ * Checks if element can be aligned in multiple directions.
1323
+ * @param el Element to be inspected.
1324
+ * @param container Container element.
1325
+ * @param bounding Bounding rect.
1326
+ * @param offset Element offset.
1327
+ */
1328
+ static checkPossibleAlignments(el: HTMLElement, container: HTMLElement, bounding: Bounding, offset: number): {
1329
+ top: boolean;
1330
+ right: boolean;
1331
+ bottom: boolean;
1332
+ left: boolean;
1333
+ spaceOnTop: number;
1334
+ spaceOnRight: number;
1335
+ spaceOnBottom: number;
1336
+ spaceOnLeft: number;
1337
+ };
1338
+ /**
1339
+ * Retrieves target element id from trigger.
1340
+ * @param trigger Trigger element.
1341
+ */
1342
+ static getIdFromTrigger(trigger: HTMLElement): string;
1343
+ /**
1344
+ * Retrieves document scroll postion from top.
1345
+ */
1346
+ static getDocumentScrollTop(): number;
1347
+ /**
1348
+ * Retrieves document scroll postion from left.
1349
+ */
1350
+ static getDocumentScrollLeft(): number;
1351
+ /**
1352
+ * Fires the given function after a certain ammount of time.
1353
+ * @param func Function to be fired.
1354
+ * @param wait Wait time.
1355
+ * @param options Additional options.
1356
+ */
1357
+ static throttle(func: (Function: object) => void, wait: number, options?: Partial<{
1358
+ leading: boolean;
1359
+ trailing: boolean;
1360
+ }>): (...args: any[]) => any;
1361
+ }
1362
+
1363
+ interface ParallaxOptions extends BaseOptions$1 {
1364
+ /**
1365
+ * The minimum width of the screen, in pixels, where the parallax functionality starts working.
1366
+ * @default 0
1367
+ */
1368
+ responsiveThreshold: number;
1369
+ }
1370
+ declare class Parallax extends Component<ParallaxOptions> {
1371
+ private _enabled;
1372
+ private _img;
1373
+ static _parallaxes: Parallax[];
1374
+ static _handleScrollThrottled: () => Utils;
1375
+ static _handleWindowResizeThrottled: () => Utils;
1376
+ constructor(el: HTMLElement, options: Partial<ParallaxOptions>);
1377
+ static get defaults(): ParallaxOptions;
1378
+ /**
1379
+ * Initializes instance of Parallax.
1380
+ * @param el HTML element.
1381
+ * @param options Component options.
1382
+ */
1383
+ static init(el: HTMLElement, options?: Partial<ParallaxOptions>): Parallax;
1384
+ /**
1385
+ * Initializes instances of Parallax.
1386
+ * @param els HTML elements.
1387
+ * @param options Component options.
1388
+ */
1389
+ static init(els: InitElements<MElement>, options?: Partial<ParallaxOptions>): Parallax[];
1390
+ static getInstance(el: HTMLElement): Parallax;
1391
+ destroy(): void;
1392
+ static _handleScroll(): void;
1393
+ static _handleWindowResize(): void;
1394
+ _setupEventHandlers(): void;
1395
+ _removeEventHandlers(): void;
1396
+ _setupStyles(): void;
1397
+ _handleImageLoad: () => void;
1306
1398
  private _offset;
1307
1399
  _updateParallax(): void;
1308
1400
  }
1309
1401
 
1310
- interface PushpinOptions extends BaseOptions {
1402
+ interface PushpinOptions extends BaseOptions$1 {
1311
1403
  /**
1312
1404
  * The distance in pixels from the top of the page where
1313
1405
  * the element becomes fixed.
@@ -1330,11 +1422,11 @@ interface PushpinOptions extends BaseOptions {
1330
1422
  * You are provided with a position string.
1331
1423
  * @default null
1332
1424
  */
1333
- onPositionChange: (position: "pinned" | "pin-top" | "pin-bottom") => void;
1425
+ onPositionChange: (position: 'pinned' | 'pin-top' | 'pin-bottom') => void;
1334
1426
  }
1335
1427
  declare class Pushpin extends Component<PushpinOptions> {
1336
- static _pushpins: any[];
1337
- originalOffset: any;
1428
+ static _pushpins: Pushpin[];
1429
+ originalOffset: number;
1338
1430
  constructor(el: HTMLElement, options: Partial<PushpinOptions>);
1339
1431
  static get defaults(): PushpinOptions;
1340
1432
  /**
@@ -1358,7 +1450,7 @@ declare class Pushpin extends Component<PushpinOptions> {
1358
1450
  _removePinClasses(): void;
1359
1451
  }
1360
1452
 
1361
- interface ScrollSpyOptions extends BaseOptions {
1453
+ interface ScrollSpyOptions extends BaseOptions$1 {
1362
1454
  /**
1363
1455
  * Throttle of scroll handler.
1364
1456
  * @default 100
@@ -1379,16 +1471,32 @@ interface ScrollSpyOptions extends BaseOptions {
1379
1471
  * @default id => 'a[href="#' + id + '"]'
1380
1472
  */
1381
1473
  getActiveElement: (id: string) => string;
1474
+ /**
1475
+ * Used to keep last top element active even if
1476
+ * scrollbar goes outside of scrollspy elements.
1477
+ *
1478
+ * If there is no last top element,
1479
+ * then the active one will be the first element.
1480
+ *
1481
+ * @default false
1482
+ */
1483
+ keepTopElementActive: boolean;
1484
+ /**
1485
+ * Used to set scroll animation duration in milliseconds.
1486
+ * @default null (browser's native animation implementation/duration)
1487
+ */
1488
+ animationDuration: number | null;
1382
1489
  }
1383
1490
  declare class ScrollSpy extends Component<ScrollSpyOptions> {
1384
1491
  static _elements: ScrollSpy[];
1385
1492
  static _count: number;
1386
1493
  static _increment: number;
1387
- tickId: number;
1388
- id: any;
1389
1494
  static _elementsInView: ScrollSpy[];
1390
- static _visibleElements: any[];
1495
+ static _visibleElements: HTMLElement[];
1391
1496
  static _ticks: number;
1497
+ static _keptTopActiveElement: HTMLElement | null;
1498
+ private tickId;
1499
+ private id;
1392
1500
  constructor(el: HTMLElement, options: Partial<ScrollSpyOptions>);
1393
1501
  static get defaults(): ScrollSpyOptions;
1394
1502
  /**
@@ -1417,9 +1525,12 @@ declare class ScrollSpy extends Component<ScrollSpyOptions> {
1417
1525
  static _findElements(top: number, right: number, bottom: number, left: number): ScrollSpy[];
1418
1526
  _enter(): void;
1419
1527
  _exit(): void;
1528
+ private _resetKeptTopActiveElementIfNeeded;
1529
+ private static _getDistanceToViewport;
1530
+ private static _smoothScrollIntoView;
1420
1531
  }
1421
1532
 
1422
- interface FormSelectOptions extends BaseOptions {
1533
+ interface FormSelectOptions extends BaseOptions$1 {
1423
1534
  /**
1424
1535
  * Classes to be added to the select wrapper element.
1425
1536
  * @default ""
@@ -1493,7 +1604,7 @@ declare class FormSelect extends Component<FormSelectOptions> {
1493
1604
  getSelectedValues(): string[];
1494
1605
  }
1495
1606
 
1496
- interface SidenavOptions extends BaseOptions {
1607
+ interface SidenavOptions extends BaseOptions$1 {
1497
1608
  /**
1498
1609
  * Side of screen on which Sidenav appears.
1499
1610
  * @default 'left'
@@ -1588,12 +1699,14 @@ declare class Sidenav extends Component<SidenavOptions> implements Openable {
1588
1699
  private _handleDragTargetDrag;
1589
1700
  private _handleDragTargetRelease;
1590
1701
  private _handleCloseDrag;
1702
+ private _calculateDelta;
1591
1703
  private _handleCloseRelease;
1592
1704
  private _handleCloseTriggerClick;
1593
1705
  private _handleWindowResize;
1594
1706
  private _setupClasses;
1595
1707
  private _removeClasses;
1596
1708
  private _setupFixed;
1709
+ private _isDraggable;
1597
1710
  private _isCurrentlyFixed;
1598
1711
  private _createDragTarget;
1599
1712
  private _preventBodyScrolling;
@@ -1612,110 +1725,11 @@ declare class Sidenav extends Component<SidenavOptions> implements Openable {
1612
1725
  private _animateSidenavOut;
1613
1726
  private _animateOverlayIn;
1614
1727
  private _animateOverlayOut;
1728
+ private _setAriaHidden;
1729
+ private _setTabIndex;
1615
1730
  }
1616
1731
 
1617
- interface SliderOptions extends BaseOptions {
1618
- /**
1619
- * Set to false to hide slide indicators.
1620
- * @default true
1621
- */
1622
- indicators: boolean;
1623
- /**
1624
- * Set height of slider.
1625
- * @default 400
1626
- */
1627
- height: number;
1628
- /**
1629
- * Set the duration of the transition animation in ms.
1630
- * @default 500
1631
- */
1632
- duration: number;
1633
- /**
1634
- * Set the duration between transitions in ms.
1635
- * @default 6000
1636
- */
1637
- interval: number;
1638
- /**
1639
- * If slider should pause when keyboard focus is received.
1640
- * @default true
1641
- */
1642
- pauseOnFocus: boolean;
1643
- /**
1644
- * If slider should pause when is hovered by a pointer.
1645
- * @default true
1646
- */
1647
- pauseOnHover: boolean;
1648
- /**
1649
- * Optional function used to generate ARIA label to indicators (for accessibility purposes).
1650
- * @param index Current index, starting from "1".
1651
- * @param current A which indicates whether it is the current element or not
1652
- * @returns a string to be used as label indicator.
1653
- * @default null
1654
- */
1655
- indicatorLabelFunc: (index: number, current: boolean) => string;
1656
- }
1657
- declare class Slider extends Component<SliderOptions> {
1658
- /** Index of current slide. */
1659
- activeIndex: number;
1660
- interval: string | number | NodeJS.Timeout;
1661
- eventPause: boolean;
1662
- _slider: HTMLUListElement;
1663
- _slides: HTMLLIElement[];
1664
- _activeSlide: HTMLLIElement;
1665
- _indicators: HTMLLIElement[];
1666
- _hovered: boolean;
1667
- _focused: boolean;
1668
- _focusCurrent: boolean;
1669
- _sliderId: string;
1670
- constructor(el: HTMLElement, options: Partial<SliderOptions>);
1671
- static get defaults(): SliderOptions;
1672
- /**
1673
- * Initializes instance of Slider.
1674
- * @param el HTML element.
1675
- * @param options Component options.
1676
- */
1677
- static init(el: HTMLElement, options?: Partial<SliderOptions>): Slider;
1678
- /**
1679
- * Initializes instances of Slider.
1680
- * @param els HTML elements.
1681
- * @param options Component options.
1682
- */
1683
- static init(els: InitElements<MElement>, options?: Partial<SliderOptions>): Slider[];
1684
- static getInstance(el: HTMLElement): Slider;
1685
- destroy(): void;
1686
- private _setupEventHandlers;
1687
- private _removeEventHandlers;
1688
- private _handleIndicatorClick;
1689
- private _handleAutoPauseHover;
1690
- private _handleAutoPauseFocus;
1691
- private _handleAutoStartHover;
1692
- private _handleAutoStartFocus;
1693
- private _handleInterval;
1694
- private _animateSlide;
1695
- private _setSliderHeight;
1696
- private _setupIndicators;
1697
- private _removeIndicators;
1698
- set(index: number): void;
1699
- _pause(fromEvent: boolean): void;
1700
- /**
1701
- * Pause slider autoslide.
1702
- */
1703
- pause: () => void;
1704
- /**
1705
- * Start slider autoslide.
1706
- */
1707
- start: () => void;
1708
- /**
1709
- * Move to next slider.
1710
- */
1711
- next: () => void;
1712
- /**
1713
- * Move to prev slider.
1714
- */
1715
- prev: () => void;
1716
- }
1717
-
1718
- interface TabsOptions extends BaseOptions {
1732
+ interface TabsOptions extends BaseOptions$1 {
1719
1733
  /**
1720
1734
  * Transition duration in milliseconds.
1721
1735
  * @default 300
@@ -1745,9 +1759,9 @@ declare class Tabs extends Component<TabsOptions> {
1745
1759
  _indicator: HTMLLIElement;
1746
1760
  _tabWidth: number;
1747
1761
  _tabsWidth: number;
1748
- _tabsCarousel: any;
1749
- _activeTabLink: any;
1750
- _content: any;
1762
+ _tabsCarousel: Carousel;
1763
+ _activeTabLink: HTMLAnchorElement;
1764
+ _content: HTMLElement;
1751
1765
  constructor(el: HTMLElement, options: Partial<TabsOptions>);
1752
1766
  static get defaults(): TabsOptions;
1753
1767
  /**
@@ -1794,7 +1808,7 @@ declare class Tabs extends Component<TabsOptions> {
1794
1808
  select(tabId: string): void;
1795
1809
  }
1796
1810
 
1797
- interface TapTargetOptions extends BaseOptions {
1811
+ interface TapTargetOptions extends BaseOptions$1 {
1798
1812
  /**
1799
1813
  * Callback function called when Tap Target is opened.
1800
1814
  * @default null
@@ -1811,8 +1825,8 @@ declare class TapTarget extends Component<TapTargetOptions> implements Openable
1811
1825
  * If the tap target is open.
1812
1826
  */
1813
1827
  isOpen: boolean;
1828
+ static _taptargets: TapTarget[];
1814
1829
  private wrapper;
1815
- private _origin;
1816
1830
  private originEl;
1817
1831
  private waveEl;
1818
1832
  private contentEl;
@@ -1835,10 +1849,10 @@ declare class TapTarget extends Component<TapTargetOptions> implements Openable
1835
1849
  _setupEventHandlers(): void;
1836
1850
  _removeEventHandlers(): void;
1837
1851
  _handleThrottledResize: () => void;
1838
- _handleTargetClick: () => void;
1839
- _handleOriginClick: () => void;
1852
+ _handleKeyboardInteraction: (e: KeyboardEvent) => void;
1853
+ _handleTargetToggle: () => void;
1840
1854
  _handleResize: () => void;
1841
- _handleDocumentClick: (e: MouseEvent | TouchEvent) => void;
1855
+ _handleDocumentClick: (e: MouseEvent | TouchEvent | KeyboardEvent) => void;
1842
1856
  _setup(): void;
1843
1857
  private _offset;
1844
1858
  _calculatePositioning(): void;
@@ -1852,8 +1866,8 @@ declare class TapTarget extends Component<TapTargetOptions> implements Openable
1852
1866
  close: () => void;
1853
1867
  }
1854
1868
 
1855
- type Views = "hours" | "minutes";
1856
- interface TimepickerOptions extends BaseOptions {
1869
+ type Views = 'hours' | 'minutes';
1870
+ interface TimepickerOptions extends BaseOptions$1 {
1857
1871
  /**
1858
1872
  * Dial radius.
1859
1873
  * @default 135
@@ -1904,11 +1918,6 @@ interface TimepickerOptions extends BaseOptions {
1904
1918
  * Internationalization options.
1905
1919
  */
1906
1920
  i18n: Partial<I18nOptions>;
1907
- /**
1908
- * Automatically close picker when minute is selected.
1909
- * @default false;
1910
- */
1911
- autoClose: boolean;
1912
1921
  /**
1913
1922
  * Use 12 hour AM/PM clock instead of 24 hour clock.
1914
1923
  * @default true
@@ -1919,26 +1928,6 @@ interface TimepickerOptions extends BaseOptions {
1919
1928
  * @default true
1920
1929
  */
1921
1930
  vibrate: boolean;
1922
- /**
1923
- * Callback function called before modal is opened.
1924
- * @default null
1925
- */
1926
- onOpenStart: (el: HTMLElement) => void;
1927
- /**
1928
- * Callback function called after modal is opened.
1929
- * @default null
1930
- */
1931
- onOpenEnd: (el: HTMLElement) => void;
1932
- /**
1933
- * Callback function called before modal is closed.
1934
- * @default null
1935
- */
1936
- onCloseStart: (el: HTMLElement) => void;
1937
- /**
1938
- * Callback function called after modal is closed.
1939
- * @default null
1940
- */
1941
- onCloseEnd: (el: HTMLElement) => void;
1942
1931
  /**
1943
1932
  * Callback function when a time is selected.
1944
1933
  * @default null
@@ -1952,10 +1941,9 @@ type Point = {
1952
1941
  declare class Timepicker extends Component<TimepickerOptions> {
1953
1942
  el: HTMLInputElement;
1954
1943
  id: string;
1955
- modal: Modal;
1956
1944
  modalEl: HTMLElement;
1957
- plate: any;
1958
- digitalClock: any;
1945
+ plate: HTMLElement;
1946
+ digitalClock: HTMLElement;
1959
1947
  inputHours: HTMLInputElement;
1960
1948
  inputMinutes: HTMLInputElement;
1961
1949
  x0: number;
@@ -1968,24 +1956,22 @@ declare class Timepicker extends Component<TimepickerOptions> {
1968
1956
  * @default 'hours'
1969
1957
  */
1970
1958
  currentView: Views;
1971
- hand: any;
1959
+ hand: SVGElement;
1972
1960
  minutesView: HTMLElement;
1973
- hours: any;
1974
- minutes: any;
1961
+ hours: number;
1962
+ minutes: number;
1975
1963
  /** The selected time. */
1976
1964
  time: string;
1977
1965
  /**
1978
1966
  * If the time is AM or PM on twelve-hour clock.
1979
1967
  * @default 'PM'
1980
1968
  */
1981
- amOrPm: "AM" | "PM";
1969
+ amOrPm: 'AM' | 'PM';
1982
1970
  static _template: any;
1983
- /** If the picker is open. */
1984
- isOpen: boolean;
1985
1971
  /** Vibrate device when dragging clock hand. */
1986
- vibrate: "vibrate" | "webkitVibrate" | null;
1972
+ vibrate: 'vibrate' | 'webkitVibrate' | null;
1987
1973
  _canvas: HTMLElement;
1988
- hoursView: any;
1974
+ hoursView: HTMLElement;
1989
1975
  spanAmPm: HTMLSpanElement;
1990
1976
  footer: HTMLElement;
1991
1977
  private _amBtn;
@@ -1994,8 +1980,7 @@ declare class Timepicker extends Component<TimepickerOptions> {
1994
1980
  bearing: Element;
1995
1981
  g: Element;
1996
1982
  toggleViewTimer: string | number | NodeJS.Timeout;
1997
- canvas: any;
1998
- vibrateTimer: any;
1983
+ vibrateTimer: NodeJS.Timeout | number;
1999
1984
  constructor(el: HTMLInputElement, options: Partial<TimepickerOptions>);
2000
1985
  static get defaults(): TimepickerOptions;
2001
1986
  /**
@@ -2011,7 +1996,7 @@ declare class Timepicker extends Component<TimepickerOptions> {
2011
1996
  */
2012
1997
  static init(els: InitElements<HTMLInputElement | MElement>, options?: Partial<TimepickerOptions>): Timepicker[];
2013
1998
  static _addLeadingZero(num: number): string;
2014
- static _createSVGEl(name: string): Element;
1999
+ static _createSVGEl(name: string): SVGElement;
2015
2000
  static _Pos(e: TouchEvent | MouseEvent): Point;
2016
2001
  static getInstance(el: HTMLElement): Timepicker;
2017
2002
  destroy(): void;
@@ -2024,13 +2009,13 @@ declare class Timepicker extends Component<TimepickerOptions> {
2024
2009
  _handleDocumentClickMove: (e: any) => void;
2025
2010
  _handleDocumentClickEnd: (e: any) => void;
2026
2011
  _insertHTMLIntoDOM(): void;
2027
- _setupModal(): void;
2028
2012
  _setupVariables(): void;
2029
2013
  private _createButton;
2030
2014
  _pickerSetup(): void;
2031
2015
  _clockSetup(): void;
2032
2016
  _buildSVGClock(): void;
2033
2017
  _buildHoursView(): void;
2018
+ _buildHoursTick(i: number, radian: number, radius: number): void;
2034
2019
  _buildMinutesView(): void;
2035
2020
  _handleAmPmClick: (e: any) => void;
2036
2021
  _updateAmPmView(): void;
@@ -2038,174 +2023,80 @@ declare class Timepicker extends Component<TimepickerOptions> {
2038
2023
  /**
2039
2024
  * Show hours or minutes view on timepicker.
2040
2025
  * @param view The name of the view you want to switch to, 'hours' or 'minutes'.
2026
+ * @param delay
2041
2027
  */
2042
2028
  showView: (view: Views, delay?: number) => void;
2043
2029
  resetClock(delay: any): void;
2044
2030
  _inputFromTextField: () => void;
2045
2031
  drawClockFromTimeInput(value: any, isHours: any): void;
2046
2032
  setHand(x: any, y: any, roundBy5?: boolean): void;
2033
+ setClockAttributes(radian: number, radius: number): void;
2034
+ formatHours(): void;
2035
+ formatMinutes(): void;
2036
+ setHoursDefault(): void;
2037
+ done: (e?: any, clearValue?: any) => any;
2038
+ clear: () => void;
2039
+ open(): this;
2040
+ close(): this;
2041
+ }
2042
+
2043
+ type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
2044
+ interface TooltipOptions extends BaseOptions$1 {
2047
2045
  /**
2048
- * Open timepicker.
2046
+ * Delay time before tooltip disappears.
2047
+ * @default 200
2049
2048
  */
2050
- open: () => void;
2049
+ exitDelay: number;
2051
2050
  /**
2052
- * Close timepicker.
2051
+ * Delay time before tooltip appears.
2052
+ * @default 0
2053
2053
  */
2054
- close: () => void;
2055
- done: (e?: any, clearValue?: any) => void;
2056
- clear: () => void;
2057
- }
2058
-
2059
- interface ToastOptions extends BaseOptions {
2054
+ enterDelay: number;
2060
2055
  /**
2061
- * The content of the Toast.
2056
+ * Element Id for the tooltip.
2062
2057
  * @default ""
2063
2058
  */
2064
- text: string;
2059
+ tooltipId?: string;
2065
2060
  /**
2066
- * Element Id for the tooltip.
2061
+ * Text string for the tooltip.
2067
2062
  * @default ""
2068
2063
  */
2069
- toastId?: string;
2064
+ text: string;
2070
2065
  /**
2071
- * Length in ms the Toast stays before dismissal.
2072
- * @default 4000
2066
+ * Set distance tooltip appears away from its activator
2067
+ * excluding transitionMovement.
2068
+ * @default 5
2073
2069
  */
2074
- displayLength: number;
2070
+ margin: number;
2075
2071
  /**
2076
- * Transition in duration in milliseconds.
2072
+ * Enter transition duration.
2077
2073
  * @default 300
2078
2074
  */
2079
2075
  inDuration: number;
2080
2076
  /**
2081
- * Transition out duration in milliseconds.
2082
- * @default 375
2077
+ * Opacity of the tooltip.
2078
+ * @default 1
2083
2079
  */
2084
- outDuration: number;
2080
+ opacity: number;
2085
2081
  /**
2086
- * Classes to be added to the toast element.
2087
- * @default ""
2082
+ * Exit transition duration.
2083
+ * @default 250
2088
2084
  */
2089
- classes: string;
2085
+ outDuration: number;
2090
2086
  /**
2091
- * Callback function called when toast is dismissed.
2092
- * @default null
2087
+ * Set the direction of the tooltip.
2088
+ * @default 'bottom'
2093
2089
  */
2094
- completeCallback: () => void;
2090
+ position: TooltipPosition;
2095
2091
  /**
2096
- * The percentage of the toast's width it takes fora drag
2097
- * to dismiss a Toast.
2098
- * @default 0.8
2092
+ * Amount in px that the tooltip moves during its transition.
2093
+ * @default 10
2099
2094
  */
2100
- activationPercent: number;
2095
+ transitionMovement: number;
2101
2096
  }
2102
- declare class Toast {
2103
- /** The toast element. */
2104
- el: HTMLElement;
2097
+ declare class Tooltip extends Component<TooltipOptions> {
2105
2098
  /**
2106
- * The remaining amount of time in ms that the toast
2107
- * will stay before dismissal.
2108
- */
2109
- timeRemaining: number;
2110
- /**
2111
- * Describes the current pan state of the Toast.
2112
- */
2113
- panning: boolean;
2114
- options: ToastOptions;
2115
- message: string;
2116
- counterInterval: NodeJS.Timeout;
2117
- wasSwiped: boolean;
2118
- startingXPos: number;
2119
- xPos: number;
2120
- time: number;
2121
- deltaX: number;
2122
- velocityX: number;
2123
- static _toasts: Toast[];
2124
- static _container: any;
2125
- static _draggedToast: Toast;
2126
- constructor(options: Partial<ToastOptions>);
2127
- static get defaults(): ToastOptions;
2128
- static getInstance(el: HTMLElement): Toast;
2129
- static _createContainer(): void;
2130
- static _removeContainer(): void;
2131
- static _onDragStart(e: TouchEvent | MouseEvent): void;
2132
- static _onDragMove(e: TouchEvent | MouseEvent): void;
2133
- static _onDragEnd(): void;
2134
- static _xPos(e: TouchEvent | MouseEvent): number;
2135
- /**
2136
- * dismiss all toasts.
2137
- */
2138
- static dismissAll(): void;
2139
- _createToast(): HTMLElement;
2140
- _animateIn(): void;
2141
- /**
2142
- * Create setInterval which automatically removes toast when timeRemaining >= 0
2143
- * has been reached.
2144
- */
2145
- _setTimer(): void;
2146
- /**
2147
- * Dismiss toast with animation.
2148
- */
2149
- dismiss(): void;
2150
- }
2151
-
2152
- type TooltipPosition = 'top' | 'right' | 'bottom' | 'left';
2153
- interface TooltipOptions extends BaseOptions {
2154
- /**
2155
- * Delay time before tooltip disappears.
2156
- * @default 200
2157
- */
2158
- exitDelay: number;
2159
- /**
2160
- * Delay time before tooltip appears.
2161
- * @default 0
2162
- */
2163
- enterDelay: number;
2164
- /**
2165
- * Element Id for the tooltip.
2166
- * @default ""
2167
- */
2168
- tooltipId?: string;
2169
- /**
2170
- * Text string for the tooltip.
2171
- * @default ""
2172
- */
2173
- text: string;
2174
- /**
2175
- * Set distance tooltip appears away from its activator
2176
- * excluding transitionMovement.
2177
- * @default 5
2178
- */
2179
- margin: number;
2180
- /**
2181
- * Enter transition duration.
2182
- * @default 300
2183
- */
2184
- inDuration: number;
2185
- /**
2186
- * Opacity of the tooltip.
2187
- * @default 1
2188
- */
2189
- opacity: number;
2190
- /**
2191
- * Exit transition duration.
2192
- * @default 250
2193
- */
2194
- outDuration: number;
2195
- /**
2196
- * Set the direction of the tooltip.
2197
- * @default 'bottom'
2198
- */
2199
- position: TooltipPosition;
2200
- /**
2201
- * Amount in px that the tooltip moves during its transition.
2202
- * @default 10
2203
- */
2204
- transitionMovement: number;
2205
- }
2206
- declare class Tooltip extends Component<TooltipOptions> {
2207
- /**
2208
- * If tooltip is open.
2099
+ * If tooltip is open.
2209
2100
  */
2210
2101
  isOpen: boolean;
2211
2102
  /**
@@ -2266,6 +2157,253 @@ declare class Tooltip extends Component<TooltipOptions> {
2266
2157
  _getAttributeOptions(): Partial<TooltipOptions>;
2267
2158
  }
2268
2159
 
2160
+ interface BaseOptions {
2161
+ }
2162
+ type InputElement = HTMLInputElement | HTMLTextAreaElement;
2163
+ declare class CharacterCounter extends Component<object> {
2164
+ el: InputElement;
2165
+ /** Stores the reference to the counter HTML element. */
2166
+ counterEl: HTMLSpanElement;
2167
+ /** Specifies whether the input is valid or not. */
2168
+ isInvalid: boolean;
2169
+ /** Specifies whether the input text has valid length or not. */
2170
+ isValidLength: boolean;
2171
+ constructor(el: HTMLInputElement | HTMLTextAreaElement, options: Partial<BaseOptions>);
2172
+ static get defaults(): BaseOptions;
2173
+ /**
2174
+ * Initializes instance of CharacterCounter.
2175
+ * @param el HTML element.
2176
+ * @param options Component options.
2177
+ */
2178
+ static init(el: InputElement, options?: Partial<BaseOptions>): CharacterCounter;
2179
+ /**
2180
+ * Initializes instances of CharacterCounter.
2181
+ * @param els HTML elements.
2182
+ * @param options Component options.
2183
+ */
2184
+ static init(els: InitElements<InputElement | MElement>, options?: Partial<BaseOptions>): CharacterCounter[];
2185
+ static getInstance(el: InputElement): CharacterCounter;
2186
+ destroy(): void;
2187
+ _setupEventHandlers(): void;
2188
+ _removeEventHandlers(): void;
2189
+ _setupCounter(): void;
2190
+ _removeCounter(): void;
2191
+ updateCounter: () => void;
2192
+ _validateInput(): void;
2193
+ }
2194
+
2195
+ declare class Forms {
2196
+ /**
2197
+ * Checks if the label has validation and apply
2198
+ * the correct class and styles
2199
+ * @param textfield
2200
+ */
2201
+ static validateField(textfield: HTMLInputElement): void;
2202
+ /**
2203
+ * Resizes the given TextArea after updating the
2204
+ * value content dynamically.
2205
+ * @param e EventTarget
2206
+ */
2207
+ static textareaAutoResize(e: EventTarget): void;
2208
+ static Init(): void;
2209
+ static InitTextarea(textarea: HTMLTextAreaElement): void;
2210
+ static InitFileInputPath(fileInput: HTMLInputElement): void;
2211
+ }
2212
+
2213
+ interface SliderOptions extends BaseOptions$1 {
2214
+ /**
2215
+ * Set to false to hide slide indicators.
2216
+ * @default true
2217
+ */
2218
+ indicators: boolean;
2219
+ /**
2220
+ * Set height of slider.
2221
+ * @default 400
2222
+ */
2223
+ height: number;
2224
+ /**
2225
+ * Set the duration of the transition animation in ms.
2226
+ * @default 500
2227
+ */
2228
+ duration: number;
2229
+ /**
2230
+ * Set the duration between transitions in ms.
2231
+ * @default 6000
2232
+ */
2233
+ interval: number;
2234
+ /**
2235
+ * If slider should pause when keyboard focus is received.
2236
+ * @default true
2237
+ */
2238
+ pauseOnFocus: boolean;
2239
+ /**
2240
+ * If slider should pause when is hovered by a pointer.
2241
+ * @default true
2242
+ */
2243
+ pauseOnHover: boolean;
2244
+ /**
2245
+ * Optional function used to generate ARIA label to indicators (for accessibility purposes).
2246
+ * @param index Current index, starting from "1".
2247
+ * @param current A which indicates whether it is the current element or not
2248
+ * @returns a string to be used as label indicator.
2249
+ * @default null
2250
+ */
2251
+ indicatorLabelFunc: (index: number, current: boolean) => string;
2252
+ }
2253
+ declare class Slider extends Component<SliderOptions> {
2254
+ /** Index of current slide. */
2255
+ activeIndex: number;
2256
+ interval: string | number | NodeJS.Timeout;
2257
+ eventPause: boolean;
2258
+ _slider: HTMLUListElement;
2259
+ _slides: HTMLLIElement[];
2260
+ _activeSlide: HTMLLIElement;
2261
+ _indicators: HTMLLIElement[];
2262
+ _hovered: boolean;
2263
+ _focused: boolean;
2264
+ _focusCurrent: boolean;
2265
+ _sliderId: string;
2266
+ constructor(el: HTMLElement, options: Partial<SliderOptions>);
2267
+ static get defaults(): SliderOptions;
2268
+ /**
2269
+ * Initializes instance of Slider.
2270
+ * @param el HTML element.
2271
+ * @param options Component options.
2272
+ */
2273
+ static init(el: HTMLElement, options?: Partial<SliderOptions>): Slider;
2274
+ /**
2275
+ * Initializes instances of Slider.
2276
+ * @param els HTML elements.
2277
+ * @param options Component options.
2278
+ */
2279
+ static init(els: InitElements<MElement>, options?: Partial<SliderOptions>): Slider[];
2280
+ static getInstance(el: HTMLElement): Slider;
2281
+ destroy(): void;
2282
+ private _setupEventHandlers;
2283
+ private _removeEventHandlers;
2284
+ private _handleIndicatorClick;
2285
+ private _handleAutoPauseHover;
2286
+ private _handleAutoPauseFocus;
2287
+ private _handleAutoStartHover;
2288
+ private _handleAutoStartFocus;
2289
+ private _handleInterval;
2290
+ private _animateSlide;
2291
+ private _setSliderHeight;
2292
+ private _setupIndicators;
2293
+ private _removeIndicators;
2294
+ set(index: number): void;
2295
+ _pause(fromEvent: boolean): void;
2296
+ /**
2297
+ * Pause slider autoslide.
2298
+ */
2299
+ pause: () => void;
2300
+ /**
2301
+ * Start slider autoslide.
2302
+ */
2303
+ start: () => void;
2304
+ /**
2305
+ * Move to next slider.
2306
+ */
2307
+ next: () => void;
2308
+ /**
2309
+ * Move to prev slider.
2310
+ */
2311
+ prev: () => void;
2312
+ }
2313
+
2314
+ interface ToastOptions extends BaseOptions$1 {
2315
+ /**
2316
+ * The content of the Toast.
2317
+ * @default ""
2318
+ */
2319
+ text: string;
2320
+ /**
2321
+ * Element Id for the tooltip.
2322
+ * @default ""
2323
+ */
2324
+ toastId?: string;
2325
+ /**
2326
+ * Length in ms the Toast stays before dismissal.
2327
+ * @default 4000
2328
+ */
2329
+ displayLength: number;
2330
+ /**
2331
+ * Transition in duration in milliseconds.
2332
+ * @default 300
2333
+ */
2334
+ inDuration: number;
2335
+ /**
2336
+ * Transition out duration in milliseconds.
2337
+ * @default 375
2338
+ */
2339
+ outDuration: number;
2340
+ /**
2341
+ * Classes to be added to the toast element.
2342
+ * @default ""
2343
+ */
2344
+ classes: string;
2345
+ /**
2346
+ * Callback function called when toast is dismissed.
2347
+ * @default null
2348
+ */
2349
+ completeCallback: () => void;
2350
+ /**
2351
+ * The percentage of the toast's width it takes fora drag
2352
+ * to dismiss a Toast.
2353
+ * @default 0.8
2354
+ */
2355
+ activationPercent: number;
2356
+ }
2357
+ declare class Toast {
2358
+ /** The toast element. */
2359
+ el: HTMLElement;
2360
+ /**
2361
+ * The remaining amount of time in ms that the toast
2362
+ * will stay before dismissal.
2363
+ */
2364
+ timeRemaining: number;
2365
+ /**
2366
+ * Describes the current pan state of the Toast.
2367
+ */
2368
+ panning: boolean;
2369
+ options: ToastOptions;
2370
+ message: string;
2371
+ counterInterval: NodeJS.Timeout | number;
2372
+ wasSwiped: boolean;
2373
+ startingXPos: number;
2374
+ xPos: number;
2375
+ time: number;
2376
+ deltaX: number;
2377
+ velocityX: number;
2378
+ static _toasts: Toast[];
2379
+ static _container: HTMLElement;
2380
+ static _draggedToast: Toast;
2381
+ constructor(options: Partial<ToastOptions>);
2382
+ static get defaults(): ToastOptions;
2383
+ static getInstance(el: HTMLElement): Toast;
2384
+ static _createContainer(): void;
2385
+ static _removeContainer(): void;
2386
+ static _onDragStart(e: TouchEvent | MouseEvent): void;
2387
+ static _onDragMove(e: TouchEvent | MouseEvent): void;
2388
+ static _onDragEnd(): void;
2389
+ static _xPos(e: TouchEvent | MouseEvent): number;
2390
+ /**
2391
+ * dismiss all toasts.
2392
+ */
2393
+ static dismissAll(): void;
2394
+ _createToast(): HTMLElement;
2395
+ _animateIn(): void;
2396
+ /**
2397
+ * Create setInterval which automatically removes toast when timeRemaining >= 0
2398
+ * has been reached.
2399
+ */
2400
+ _setTimer(): void;
2401
+ /**
2402
+ * Dismiss toast with animation.
2403
+ */
2404
+ dismiss(): void;
2405
+ }
2406
+
2269
2407
  type RGBColor = {
2270
2408
  r: number;
2271
2409
  g: number;
@@ -2281,7 +2419,7 @@ declare class Waves {
2281
2419
  static Init(): void;
2282
2420
  }
2283
2421
 
2284
- interface RangeOptions extends BaseOptions {
2422
+ interface RangeOptions extends BaseOptions$1 {
2285
2423
  }
2286
2424
  declare class Range extends Component<RangeOptions> {
2287
2425
  el: HTMLInputElement;
@@ -2321,13 +2459,33 @@ declare class Range extends Component<RangeOptions> {
2321
2459
  static Init(): void;
2322
2460
  }
2323
2461
 
2324
- declare const version = "2.1.1";
2325
- declare const Grid: (children?: any) => string;
2326
- declare function Button(children?: any): string;
2462
+ declare const version = "2.2.1";
2463
+ interface AutoInitOptions {
2464
+ Autocomplete?: Partial<AutocompleteOptions>;
2465
+ Cards?: Partial<CardsOptions>;
2466
+ Carousel?: Partial<CarouselOptions>;
2467
+ Chips?: Partial<ChipsOptions>;
2468
+ Collapsible?: Partial<CollapsibleOptions>;
2469
+ Datepicker?: Partial<DatepickerOptions>;
2470
+ Dropdown?: Partial<DropdownOptions>;
2471
+ Materialbox?: Partial<MaterialboxOptions>;
2472
+ Modal?: Partial<ModalOptions>;
2473
+ Parallax?: Partial<ParallaxOptions>;
2474
+ Pushpin?: Partial<PushpinOptions>;
2475
+ ScrollSpy?: Partial<ScrollSpyOptions>;
2476
+ FormSelect?: Partial<FormSelectOptions>;
2477
+ Sidenav?: Partial<SidenavOptions>;
2478
+ Tabs?: Partial<TabsOptions>;
2479
+ TapTarget?: Partial<TapTargetOptions>;
2480
+ Timepicker?: Partial<TimepickerOptions>;
2481
+ Tooltip?: Partial<TooltipOptions>;
2482
+ FloatingActionButton?: Partial<FloatingActionButtonOptions>;
2483
+ }
2327
2484
  /**
2328
2485
  * Automatically initialize components.
2329
2486
  * @param context Root element to initialize. Defaults to `document.body`.
2487
+ * @param options Options for each component.
2330
2488
  */
2331
- declare function AutoInit(context?: HTMLElement): void;
2489
+ declare function AutoInit(context?: HTMLElement, options?: Partial<AutoInitOptions>): void;
2332
2490
 
2333
- export { AutoInit, Autocomplete, Button, Cards, Carousel, CharacterCounter, Chips, Collapsible, Datepicker, Dropdown, FloatingActionButton, FormSelect, Forms, Grid, Materialbox, Modal, Parallax, Pushpin, Range, ScrollSpy, Sidenav, Slider, Tabs, TapTarget, Timepicker, Toast, Tooltip, Waves, version };
2491
+ export { AutoInit, type AutoInitOptions, Autocomplete, Cards, Carousel, CharacterCounter, Chips, Collapsible, Datepicker, Dropdown, FloatingActionButton, FormSelect, Forms, Materialbox, Modal, Parallax, Pushpin, Range, ScrollSpy, Sidenav, Slider, Tabs, TapTarget, Timepicker, Toast, Tooltip, Waves, version };