@materializecss/materialize 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -11
- package/dist/css/materialize.css +2790 -2140
- package/dist/css/materialize.min.css +3 -5
- package/dist/css/materialize.min.css.map +1 -1
- package/dist/js/materialize.cjs.js +528 -215
- package/dist/js/materialize.d.ts +115 -13
- package/dist/js/materialize.js +528 -215
- package/dist/js/materialize.min.js +3 -3
- package/dist/js/materialize.mjs +528 -215
- package/package.json +5 -3
- package/sass/components/_badges.scss +1 -1
- package/sass/components/_breadcrumb.scss +27 -0
- package/sass/components/_buttons.scss +60 -167
- package/sass/components/_cards.scss +36 -17
- package/sass/components/_carousel.scss +16 -18
- package/sass/components/_chips.scss +6 -14
- package/sass/components/_collapsible.scss +8 -5
- package/sass/components/_collection.scss +2 -3
- package/sass/components/_color-variables.scss +35 -3
- package/sass/components/_datepicker.scss +95 -48
- package/sass/components/_dropdown.scss +11 -7
- package/sass/components/_global.scss +22 -111
- package/sass/components/_grid.scss +3 -1
- package/sass/components/_materialbox.scss +5 -6
- package/sass/components/_modal.scss +11 -4
- package/sass/components/_navbar.scss +17 -16
- package/sass/components/_pagination.scss +47 -0
- package/sass/components/_preloader.scss +3 -1
- package/sass/components/_pulse.scss +3 -3
- package/sass/components/_sidenav.scss +15 -17
- package/sass/components/_slider.scss +2 -4
- package/sass/components/_tabs.scss +45 -33
- package/sass/components/_tapTarget.scss +10 -11
- package/sass/components/_timepicker.scss +62 -47
- package/sass/components/_toast.scss +3 -0
- package/sass/components/_tooltip.scss +0 -8
- package/sass/components/_transitions.scss +2 -3
- package/sass/components/_typography.scss +5 -5
- package/sass/components/_variables.scss +3 -2
- package/sass/components/forms/_checkboxes.scss +1 -2
- package/sass/components/forms/_file-input.scss +7 -9
- package/sass/components/forms/_forms.scss +8 -14
- package/sass/components/forms/_input-fields.scss +17 -11
- package/sass/components/forms/_range.scss +6 -1
- package/sass/components/forms/_select.scss +11 -103
- package/sass/components/forms/_switches.scss +2 -0
- package/sass/components/mixins.module.scss +159 -0
- package/sass/materialize.scss +39 -43
- package/sass/components/_color-classes.scss +0 -32
package/dist/js/materialize.d.ts
CHANGED
|
@@ -179,7 +179,7 @@ declare class Dropdown extends Component<DropdownOptions> implements Openable {
|
|
|
179
179
|
_setupTemporaryEventHandlers(): void;
|
|
180
180
|
_removeTemporaryEventHandlers(): void;
|
|
181
181
|
_handleClick: (e: MouseEvent) => void;
|
|
182
|
-
_handleMouseEnter: (
|
|
182
|
+
_handleMouseEnter: () => void;
|
|
183
183
|
_handleMouseLeave: (e: MouseEvent) => void;
|
|
184
184
|
_handleDocumentClick: (e: MouseEvent) => void;
|
|
185
185
|
_handleTriggerKeydown: (e: KeyboardEvent) => void;
|
|
@@ -190,7 +190,7 @@ declare class Dropdown extends Component<DropdownOptions> implements Openable {
|
|
|
190
190
|
_resetFilterQuery: () => void;
|
|
191
191
|
_resetDropdownStyles(): void;
|
|
192
192
|
_resetDropdownPositioningStyles(): void;
|
|
193
|
-
|
|
193
|
+
_moveDropdownToElement(containerEl?: HTMLElement): void;
|
|
194
194
|
_makeDropdownFocusable(): void;
|
|
195
195
|
_focusFocusedItem(): void;
|
|
196
196
|
_getDropdownPosition(closestOverflowParent: HTMLElement): {
|
|
@@ -282,6 +282,10 @@ interface AutocompleteOptions extends BaseOptions$1 {
|
|
|
282
282
|
* @default {}
|
|
283
283
|
*/
|
|
284
284
|
dropdownOptions: Partial<DropdownOptions>;
|
|
285
|
+
/**
|
|
286
|
+
* Predefined selected values
|
|
287
|
+
*/
|
|
288
|
+
selected: number[] | string[];
|
|
285
289
|
}
|
|
286
290
|
declare class Autocomplete extends Component<AutocompleteOptions> {
|
|
287
291
|
el: HTMLInputElement;
|
|
@@ -348,10 +352,13 @@ declare class Autocomplete extends Component<AutocompleteOptions> {
|
|
|
348
352
|
/**
|
|
349
353
|
* Updates the visible or selectable items shown in the menu.
|
|
350
354
|
* @param menuItems Items to be available.
|
|
355
|
+
* @param selected Selected item ids
|
|
356
|
+
* @param open Option to conditionally open dropdown
|
|
351
357
|
*/
|
|
352
|
-
setMenuItems(menuItems: AutocompleteData[]): void;
|
|
358
|
+
setMenuItems(menuItems: AutocompleteData[], selected?: number[] | string[], open?: boolean): void;
|
|
353
359
|
/**
|
|
354
360
|
* Sets selected values.
|
|
361
|
+
* @deprecated @see https://github.com/materializecss/materialize/issues/552
|
|
355
362
|
* @param entries
|
|
356
363
|
*/
|
|
357
364
|
setValues(entries: AutocompleteData[]): void;
|
|
@@ -360,6 +367,7 @@ declare class Autocomplete extends Component<AutocompleteOptions> {
|
|
|
360
367
|
* @param id The id of a data-entry.
|
|
361
368
|
*/
|
|
362
369
|
selectOption(id: number | string): void;
|
|
370
|
+
selectOptions(ids: []): void;
|
|
363
371
|
}
|
|
364
372
|
|
|
365
373
|
interface FloatingActionButtonOptions extends BaseOptions$1 {
|
|
@@ -412,6 +420,8 @@ declare class FloatingActionButton extends Component<FloatingActionButtonOptions
|
|
|
412
420
|
_setupEventHandlers(): void;
|
|
413
421
|
_removeEventHandlers(): void;
|
|
414
422
|
_handleFABClick: () => void;
|
|
423
|
+
_handleFABKeyPress: (e: any) => void;
|
|
424
|
+
_handleFABToggle: () => void;
|
|
415
425
|
_handleDocumentClick: (e: MouseEvent) => void;
|
|
416
426
|
/**
|
|
417
427
|
* Open FAB.
|
|
@@ -473,6 +483,7 @@ declare class Cards extends Component<CardsOptions> implements Openable {
|
|
|
473
483
|
* Hide card reveal.
|
|
474
484
|
*/
|
|
475
485
|
close: () => void;
|
|
486
|
+
static Init(): void;
|
|
476
487
|
}
|
|
477
488
|
|
|
478
489
|
interface CarouselOptions extends BaseOptions$1 {
|
|
@@ -841,6 +852,10 @@ interface DatepickerOptions extends BaseOptions$1 {
|
|
|
841
852
|
* @default false
|
|
842
853
|
*/
|
|
843
854
|
isDateRange: boolean;
|
|
855
|
+
/**
|
|
856
|
+
* The selector of the user specified date range end element
|
|
857
|
+
*/
|
|
858
|
+
dateRangeEndEl: string | null;
|
|
844
859
|
/**
|
|
845
860
|
* The initial condition if the datepicker is based on multiple date selection.
|
|
846
861
|
* @default false
|
|
@@ -917,6 +932,10 @@ interface DatepickerOptions extends BaseOptions$1 {
|
|
|
917
932
|
* @default false
|
|
918
933
|
*/
|
|
919
934
|
showDaysInNextAndPreviousMonths: boolean;
|
|
935
|
+
/**
|
|
936
|
+
* Specify if the docked datepicker is in open state by default
|
|
937
|
+
*/
|
|
938
|
+
openByDefault: boolean;
|
|
920
939
|
/**
|
|
921
940
|
* Specify a DOM element OR selector for a DOM element to render
|
|
922
941
|
* the calendar in, by default it will be placed before the input.
|
|
@@ -928,6 +947,11 @@ interface DatepickerOptions extends BaseOptions$1 {
|
|
|
928
947
|
* @default false
|
|
929
948
|
*/
|
|
930
949
|
showClearBtn: boolean;
|
|
950
|
+
/**
|
|
951
|
+
* Autosubmit calendar day select to input field
|
|
952
|
+
* @default false
|
|
953
|
+
*/
|
|
954
|
+
autoSubmit: true;
|
|
931
955
|
/**
|
|
932
956
|
* Internationalization options.
|
|
933
957
|
*/
|
|
@@ -953,6 +977,21 @@ interface DatepickerOptions extends BaseOptions$1 {
|
|
|
953
977
|
* @default null
|
|
954
978
|
*/
|
|
955
979
|
onDraw: (() => void) | null;
|
|
980
|
+
/**
|
|
981
|
+
* Callback function for interaction with input field.
|
|
982
|
+
* @default null
|
|
983
|
+
*/
|
|
984
|
+
onInputInteraction: (() => void) | null;
|
|
985
|
+
/**
|
|
986
|
+
* Callback function for interaction with confirm button.
|
|
987
|
+
* @default null
|
|
988
|
+
*/
|
|
989
|
+
onConfirm: (() => void) | null;
|
|
990
|
+
/**
|
|
991
|
+
* Callback function for interaction with close button.
|
|
992
|
+
* @default null
|
|
993
|
+
*/
|
|
994
|
+
onCancel: (() => void) | null;
|
|
956
995
|
/** Field used for internal calculations DO NOT CHANGE IT */
|
|
957
996
|
minYear?: number;
|
|
958
997
|
/** Field used for internal calculations DO NOT CHANGE IT */
|
|
@@ -965,6 +1004,14 @@ interface DatepickerOptions extends BaseOptions$1 {
|
|
|
965
1004
|
startRange?: Date;
|
|
966
1005
|
/** Field used for internal calculations DO NOT CHANGE IT */
|
|
967
1006
|
endRange?: Date;
|
|
1007
|
+
/**
|
|
1008
|
+
* Display plugin
|
|
1009
|
+
*/
|
|
1010
|
+
displayPlugin: string;
|
|
1011
|
+
/**
|
|
1012
|
+
* Configurable display plugin options
|
|
1013
|
+
*/
|
|
1014
|
+
displayPluginOptions: object;
|
|
968
1015
|
}
|
|
969
1016
|
declare class Datepicker extends Component<DatepickerOptions> {
|
|
970
1017
|
el: HTMLInputElement;
|
|
@@ -972,11 +1019,8 @@ declare class Datepicker extends Component<DatepickerOptions> {
|
|
|
972
1019
|
multiple: boolean;
|
|
973
1020
|
calendarEl: HTMLElement;
|
|
974
1021
|
/** CLEAR button instance. */
|
|
975
|
-
clearBtn: HTMLElement;
|
|
976
1022
|
/** DONE button instance */
|
|
977
|
-
|
|
978
|
-
cancelBtn: HTMLElement;
|
|
979
|
-
modalEl: HTMLElement;
|
|
1023
|
+
containerEl: HTMLElement;
|
|
980
1024
|
yearTextEl: HTMLElement;
|
|
981
1025
|
dateTextEl: HTMLElement;
|
|
982
1026
|
endDateEl: HTMLInputElement;
|
|
@@ -992,6 +1036,8 @@ declare class Datepicker extends Component<DatepickerOptions> {
|
|
|
992
1036
|
}];
|
|
993
1037
|
private _y;
|
|
994
1038
|
private _m;
|
|
1039
|
+
private displayPlugin;
|
|
1040
|
+
private footer;
|
|
995
1041
|
static _template: string;
|
|
996
1042
|
constructor(el: HTMLInputElement, options: Partial<DatepickerOptions>);
|
|
997
1043
|
static get defaults(): DatepickerOptions;
|
|
@@ -1022,6 +1068,10 @@ declare class Datepicker extends Component<DatepickerOptions> {
|
|
|
1022
1068
|
destroy(): void;
|
|
1023
1069
|
destroySelects(): void;
|
|
1024
1070
|
_insertHTMLIntoDOM(): void;
|
|
1071
|
+
/**
|
|
1072
|
+
* Renders the date input format
|
|
1073
|
+
*/
|
|
1074
|
+
_renderDateInputFormat(el: HTMLInputElement): void;
|
|
1025
1075
|
/**
|
|
1026
1076
|
* Gets a string representation of the given date.
|
|
1027
1077
|
*/
|
|
@@ -1105,6 +1155,8 @@ declare class Datepicker extends Component<DatepickerOptions> {
|
|
|
1105
1155
|
renderDayName(opts: any, day: any, abbr?: boolean): any;
|
|
1106
1156
|
createDateInput(): HTMLInputElement;
|
|
1107
1157
|
_finishSelection: () => void;
|
|
1158
|
+
_confirm: () => void;
|
|
1159
|
+
_cancel: () => void;
|
|
1108
1160
|
open(): this;
|
|
1109
1161
|
close(): this;
|
|
1110
1162
|
}
|
|
@@ -1358,6 +1410,22 @@ declare class Utils {
|
|
|
1358
1410
|
leading: boolean;
|
|
1359
1411
|
trailing: boolean;
|
|
1360
1412
|
}>): (...args: any[]) => any;
|
|
1413
|
+
/**
|
|
1414
|
+
* Renders confirm/close buttons with callback function
|
|
1415
|
+
*/
|
|
1416
|
+
static createConfirmationContainer(container: HTMLElement, confirmText: string, cancelText: string, onConfirm: (Function: object) => void, onCancel: (Function: object) => void): void;
|
|
1417
|
+
/**
|
|
1418
|
+
* Renders a button with optional callback function
|
|
1419
|
+
*/
|
|
1420
|
+
static createButton(container: HTMLElement, text: string, className?: string[], visibility?: boolean, callback?: (Function: object) => void): void;
|
|
1421
|
+
static _setAbsolutePosition(origin: HTMLElement, container: HTMLElement, position: string, margin: number, transitionMovement: number, align?: string): {
|
|
1422
|
+
x: number;
|
|
1423
|
+
y: number;
|
|
1424
|
+
};
|
|
1425
|
+
static _repositionWithinScreen(x: number, y: number, width: number, height: number, margin: number, transitionMovement: number, align: string): {
|
|
1426
|
+
x: number;
|
|
1427
|
+
y: number;
|
|
1428
|
+
};
|
|
1361
1429
|
}
|
|
1362
1430
|
|
|
1363
1431
|
interface ParallaxOptions extends BaseOptions$1 {
|
|
@@ -1565,6 +1633,7 @@ declare class FormSelect extends Component<FormSelectOptions> {
|
|
|
1565
1633
|
wrapper: HTMLDivElement;
|
|
1566
1634
|
selectOptions: (HTMLOptionElement | HTMLOptGroupElement)[];
|
|
1567
1635
|
private _values;
|
|
1636
|
+
nativeTabIndex: number;
|
|
1568
1637
|
constructor(el: HTMLSelectElement, options: FormSelectOptions);
|
|
1569
1638
|
static get defaults(): FormSelectOptions;
|
|
1570
1639
|
/**
|
|
@@ -1904,6 +1973,11 @@ interface TimepickerOptions extends BaseOptions$1 {
|
|
|
1904
1973
|
* @default false
|
|
1905
1974
|
*/
|
|
1906
1975
|
showClearBtn: boolean;
|
|
1976
|
+
/**
|
|
1977
|
+
* Autosubmit timepicker selection to input field
|
|
1978
|
+
* @default true
|
|
1979
|
+
*/
|
|
1980
|
+
autoSubmit: true;
|
|
1907
1981
|
/**
|
|
1908
1982
|
* Default time to set on the timepicker 'now' or '13:14'.
|
|
1909
1983
|
* @default 'now';
|
|
@@ -1933,6 +2007,29 @@ interface TimepickerOptions extends BaseOptions$1 {
|
|
|
1933
2007
|
* @default null
|
|
1934
2008
|
*/
|
|
1935
2009
|
onSelect: (hour: number, minute: number) => void;
|
|
2010
|
+
/**
|
|
2011
|
+
* Callback function for interaction with input field.
|
|
2012
|
+
* @default null
|
|
2013
|
+
*/
|
|
2014
|
+
onInputInteraction: (() => void) | null;
|
|
2015
|
+
/**
|
|
2016
|
+
* Callback function for done.
|
|
2017
|
+
* @default null
|
|
2018
|
+
*/
|
|
2019
|
+
onDone: (() => void) | null;
|
|
2020
|
+
/**
|
|
2021
|
+
* Callback function for cancel.
|
|
2022
|
+
* @default null
|
|
2023
|
+
*/
|
|
2024
|
+
onCancel: (() => void) | null;
|
|
2025
|
+
/**
|
|
2026
|
+
* Display plugin
|
|
2027
|
+
*/
|
|
2028
|
+
displayPlugin: string;
|
|
2029
|
+
/**
|
|
2030
|
+
* Configurable display plugin options
|
|
2031
|
+
*/
|
|
2032
|
+
displayPluginOptions: object;
|
|
1936
2033
|
}
|
|
1937
2034
|
type Point = {
|
|
1938
2035
|
x: number;
|
|
@@ -1941,7 +2038,7 @@ type Point = {
|
|
|
1941
2038
|
declare class Timepicker extends Component<TimepickerOptions> {
|
|
1942
2039
|
el: HTMLInputElement;
|
|
1943
2040
|
id: string;
|
|
1944
|
-
|
|
2041
|
+
containerEl: HTMLElement;
|
|
1945
2042
|
plate: HTMLElement;
|
|
1946
2043
|
digitalClock: HTMLElement;
|
|
1947
2044
|
inputHours: HTMLInputElement;
|
|
@@ -1981,6 +2078,7 @@ declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
1981
2078
|
g: Element;
|
|
1982
2079
|
toggleViewTimer: string | number | NodeJS.Timeout;
|
|
1983
2080
|
vibrateTimer: NodeJS.Timeout | number;
|
|
2081
|
+
private displayPlugin;
|
|
1984
2082
|
constructor(el: HTMLInputElement, options: Partial<TimepickerOptions>);
|
|
1985
2083
|
static get defaults(): TimepickerOptions;
|
|
1986
2084
|
/**
|
|
@@ -2010,14 +2108,15 @@ declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
2010
2108
|
_handleDocumentClickEnd: (e: any) => void;
|
|
2011
2109
|
_insertHTMLIntoDOM(): void;
|
|
2012
2110
|
_setupVariables(): void;
|
|
2013
|
-
private _createButton;
|
|
2014
2111
|
_pickerSetup(): void;
|
|
2015
2112
|
_clockSetup(): void;
|
|
2016
2113
|
_buildSVGClock(): void;
|
|
2017
2114
|
_buildHoursView(): void;
|
|
2018
2115
|
_buildHoursTick(i: number, radian: number, radius: number): void;
|
|
2019
2116
|
_buildMinutesView(): void;
|
|
2020
|
-
_handleAmPmClick: (e:
|
|
2117
|
+
_handleAmPmClick: (e: MouseEvent) => void;
|
|
2118
|
+
_handleAmPmKeypress: (e: KeyboardEvent) => void;
|
|
2119
|
+
_handleAmPmInteraction: (e: HTMLElement) => void;
|
|
2021
2120
|
_updateAmPmView(): void;
|
|
2022
2121
|
_updateTimeFromInput(): void;
|
|
2023
2122
|
/**
|
|
@@ -2034,7 +2133,9 @@ declare class Timepicker extends Component<TimepickerOptions> {
|
|
|
2034
2133
|
formatHours(): void;
|
|
2035
2134
|
formatMinutes(): void;
|
|
2036
2135
|
setHoursDefault(): void;
|
|
2037
|
-
done: (
|
|
2136
|
+
done: (clearValue?: any) => void;
|
|
2137
|
+
confirm: () => void;
|
|
2138
|
+
cancel: () => void;
|
|
2038
2139
|
clear: () => void;
|
|
2039
2140
|
open(): this;
|
|
2040
2141
|
close(): this;
|
|
@@ -2459,7 +2560,7 @@ declare class Range extends Component<RangeOptions> {
|
|
|
2459
2560
|
static Init(): void;
|
|
2460
2561
|
}
|
|
2461
2562
|
|
|
2462
|
-
declare const version = "2.2.
|
|
2563
|
+
declare const version = "2.2.2";
|
|
2463
2564
|
interface AutoInitOptions {
|
|
2464
2565
|
Autocomplete?: Partial<AutocompleteOptions>;
|
|
2465
2566
|
Cards?: Partial<CardsOptions>;
|
|
@@ -2488,4 +2589,5 @@ interface AutoInitOptions {
|
|
|
2488
2589
|
*/
|
|
2489
2590
|
declare function AutoInit(context?: HTMLElement, options?: Partial<AutoInitOptions>): void;
|
|
2490
2591
|
|
|
2491
|
-
export { AutoInit,
|
|
2592
|
+
export { AutoInit, 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 };
|
|
2593
|
+
export type { AutoInitOptions };
|