mtrl 0.10.5 → 0.10.7
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 +7 -3
- package/dist/README.md +7 -3
- package/dist/components/bottom-app-bar/index.d.ts +1 -1
- package/dist/components/bottom-sheet/types.d.ts +2 -0
- package/dist/components/button/constants.d.ts +2 -2
- package/dist/components/button-group/button-group.js +22 -6
- package/dist/components/button-group/constants.d.ts +2 -2
- package/dist/components/button-group/types.d.ts +3 -1
- package/dist/components/card/features.d.ts +1 -1
- package/dist/components/card/index.d.ts +9 -9
- package/dist/components/card/types.d.ts +4 -4
- package/dist/components/carousel/types.d.ts +1 -0
- package/dist/components/checkbox/types.d.ts +1 -1
- package/dist/components/chips/features/controller.js +0 -2
- package/dist/components/chips/types.d.ts +16 -4
- package/dist/components/datepicker/index.d.ts +1 -1
- package/dist/components/datepicker/types.d.ts +3 -0
- package/dist/components/dialog/types.d.ts +14 -1
- package/dist/components/drawer/types.d.ts +2 -0
- package/dist/components/fab/constants.d.ts +2 -2
- package/dist/components/fab-menu/types.d.ts +12 -2
- package/dist/components/icon-button/constants.d.ts +2 -2
- package/dist/components/icon-button/types.d.ts +3 -0
- package/dist/components/index.d.ts +6 -6
- package/dist/components/list/types.d.ts +1 -1
- package/dist/components/menu/types.d.ts +11 -2
- package/dist/components/navigation-rail/types.d.ts +2 -0
- package/dist/components/progress/types.d.ts +27 -5
- package/dist/components/radios/constants.d.ts +3 -3
- package/dist/components/radios/types.d.ts +8 -3
- package/dist/components/search/features/suggestions.js +1 -4
- package/dist/components/search/types.d.ts +13 -7
- package/dist/components/select/constants.d.ts +1 -1
- package/dist/components/select/types.d.ts +6 -2
- package/dist/components/side-sheet/types.d.ts +2 -0
- package/dist/components/slider/types.d.ts +7 -0
- package/dist/components/snackbar/types.d.ts +18 -3
- package/dist/components/split-button/types.d.ts +6 -1
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/tabs/index.d.ts +16 -16
- package/dist/components/tabs/scroll-indicators.js +2 -8
- package/dist/components/tabs/types.d.ts +6 -2
- package/dist/components/textfield/constants.d.ts +10 -7
- package/dist/components/textfield/index.d.ts +7 -7
- package/dist/components/textfield/types.d.ts +1 -0
- package/dist/components/timepicker/constants.d.ts +1 -1
- package/dist/components/timepicker/types.d.ts +5 -2
- package/dist/components/tooltip/api.js +20 -18
- package/dist/components/tooltip/constants.d.ts +1 -1
- package/dist/components/tooltip/types.d.ts +1 -1
- package/dist/components/top-app-bar/index.d.ts +1 -1
- package/dist/core/compose/features/index.d.ts +11 -0
- package/dist/core/compose/features/input.d.ts +9 -2
- package/dist/core/config/component.d.ts +1 -1
- package/dist/core/dom/create.d.ts +1 -1
- package/dist/core/utils/theme.d.ts +1 -1
- package/dist/elements/css/search.js +1 -1
- package/dist/elements/css/tabs.js +1 -1
- package/dist/elements/define.d.ts +8 -0
- package/dist/elements/define.js +2 -1
- package/dist/elements/icon-button.d.ts +3 -2
- package/dist/elements/index.d.ts +6 -5
- package/dist/elements/preupgrade.css +1 -1
- package/dist/elements/search.d.ts +4 -1
- package/dist/elements/textfield.d.ts +5 -1
- package/dist/elements/timepicker.d.ts +1 -0
- package/dist/index.cjs +0 -0
- package/dist/index.d.ts +139 -139
- package/dist/package.json +17 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/solid/index.d.ts +1 -1
- package/dist/styles/badge.css +1 -1
- package/dist/styles/base.css +1 -1
- package/dist/styles/bottom-app-bar.css +1 -1
- package/dist/styles/bottom-sheet.css +1 -1
- package/dist/styles/button-group.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/card.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chips.css +1 -1
- package/dist/styles/datepicker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/divider.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/extended-fab.css +1 -1
- package/dist/styles/fab-menu.css +1 -1
- package/dist/styles/fab.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/loading-indicator.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/navigation-rail.css +1 -1
- package/dist/styles/progress.css +1 -1
- package/dist/styles/radios.css +1 -1
- package/dist/styles/search.css +2 -2
- package/dist/styles/segmented-button.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/side-sheet.css +1 -1
- package/dist/styles/slider.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/split-button.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +2 -2
- package/dist/styles/textfield.css +1 -1
- package/dist/styles/timepicker.css +1 -1
- package/dist/styles/toolbar.css +1 -1
- package/dist/styles/tooltip.css +1 -1
- package/dist/styles/top-app-bar.css +1 -1
- package/dist/styles/utilities.css +1 -1
- package/dist/styles.css +2 -2
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/themes/autumn.css +1 -1
- package/dist/themes/baseline.css +1 -1
- package/dist/themes/brownbeige.css +1 -1
- package/dist/themes/browngreen.css +1 -1
- package/dist/themes/content.css +1 -1
- package/dist/themes/desert.css +1 -1
- package/dist/themes/expressive.css +1 -1
- package/dist/themes/fidelity.css +1 -1
- package/dist/themes/forest.css +1 -1
- package/dist/themes/fruit-salad.css +1 -1
- package/dist/themes/highcontrast.css +1 -1
- package/dist/themes/legacy.css +1 -1
- package/dist/themes/material.css +1 -1
- package/dist/themes/monochrome.css +1 -1
- package/dist/themes/neutral.css +1 -1
- package/dist/themes/ocean.css +1 -1
- package/dist/themes/rainbow.css +1 -1
- package/dist/themes/sageivory.css +1 -1
- package/dist/themes/spring.css +1 -1
- package/dist/themes/summer.css +1 -1
- package/dist/themes/sunset.css +1 -1
- package/dist/themes/tealcaramel.css +1 -1
- package/dist/themes/vibrant.css +1 -1
- package/dist/themes/winter.css +1 -1
- package/dist/vue/index.d.ts +1 -1
- package/package.json +17 -1
- package/src/styles/abstract/_theme.scss +1 -1
- package/src/styles/abstract/_variables.scss +4 -4
- package/src/styles/components/_search.scss +2 -0
- package/src/styles/components/_tabs.scss +2 -0
- package/src/styles/components/_text-field.scss +6 -0
- package/src/styles/themes/_browngreen.scss +1 -1
- package/src/styles/themes/_legacy.scss +1 -1
- package/src/styles/themes/_material.scss +1 -1
- package/src/styles/themes/_winter.scss +1 -1
|
@@ -135,15 +135,37 @@ export interface ProgressEvents {
|
|
|
135
135
|
export interface ProgressComponent {
|
|
136
136
|
/** The component's root DOM element */
|
|
137
137
|
element: HTMLElement;
|
|
138
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* The track element (unfilled part) - always an SVG element
|
|
140
|
+
* @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: it
|
|
141
|
+
* was never meant to be driven from outside. It named a part of the SVG the canvas
|
|
142
|
+
* replaced.
|
|
143
|
+
*/
|
|
139
144
|
track: SVGElement;
|
|
140
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* The indicator element (filled part) - always an SVG element
|
|
147
|
+
* @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: it
|
|
148
|
+
* was never meant to be driven from outside. It named a part of the SVG the canvas
|
|
149
|
+
* replaced.
|
|
150
|
+
*/
|
|
141
151
|
indicator: SVGElement;
|
|
142
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* The canvas the indicator is drawn on
|
|
154
|
+
* @deprecated Internal in `material` 3.0.0 and off the public type; the canvas is the
|
|
155
|
+
* element's own: `progress.element.querySelector('canvas')`.
|
|
156
|
+
*/
|
|
143
157
|
canvas?: HTMLCanvasElement;
|
|
144
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* Re-measures the canvas and redraws; the component does this on resize
|
|
160
|
+
* @deprecated Internal in `material` 3.0.0 and off the public type; no replacement: the
|
|
161
|
+
* component observes its own size and redraws itself.
|
|
162
|
+
*/
|
|
145
163
|
resize?: () => void;
|
|
146
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* The buffer element for linear variant (pre-loaded state) - always an SVG element
|
|
166
|
+
* @deprecated Internal in `material` 3.0.0 and off the public type; the buffer's value
|
|
167
|
+
* is set with `setBuffer()` and read with `getBuffer()`.
|
|
168
|
+
*/
|
|
147
169
|
buffer?: SVGElement;
|
|
148
170
|
/**
|
|
149
171
|
* Gets a class name with the component's prefix
|
|
@@ -69,13 +69,13 @@ export declare const RADIO_EVENTS: {
|
|
|
69
69
|
* Default configuration values
|
|
70
70
|
*/
|
|
71
71
|
export declare const RADIO_DEFAULTS: {
|
|
72
|
-
/**
|
|
72
|
+
/** @deprecated The radios have no variant option; nothing reads this. Removed in `material` 3.0.0. */
|
|
73
73
|
readonly VARIANT: "standard";
|
|
74
74
|
/** Default radio direction */
|
|
75
75
|
readonly DIRECTION: "vertical";
|
|
76
|
-
/**
|
|
76
|
+
/** @deprecated The radios have no label position option; nothing reads this. Removed in `material` 3.0.0. */
|
|
77
77
|
readonly LABEL_POSITION: "right";
|
|
78
|
-
/**
|
|
78
|
+
/** @deprecated The radios have no size option; nothing reads this. Removed in `material` 3.0.0. */
|
|
79
79
|
readonly SIZE: "medium";
|
|
80
80
|
};
|
|
81
81
|
/**
|
|
@@ -101,7 +101,10 @@ export interface RadioItem {
|
|
|
101
101
|
}
|
|
102
102
|
/** Selection or unknown-value clearing reported by the radio group. */
|
|
103
103
|
export interface RadiosChangePayload {
|
|
104
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Selected value, or an empty string when an unknown value clears selection.
|
|
106
|
+
* In `material` 3.0.0 that is `null`, as the select and `<m-radios>` report it.
|
|
107
|
+
*/
|
|
105
108
|
value: string;
|
|
106
109
|
/** Native input change event; undefined for programmatic clearing. */
|
|
107
110
|
originalEvent: Event | undefined;
|
|
@@ -133,12 +136,14 @@ export interface RadiosComponent {
|
|
|
133
136
|
*/
|
|
134
137
|
getClass: (name: string) => string;
|
|
135
138
|
/**
|
|
136
|
-
* Gets the radios component name
|
|
139
|
+
* Gets the radios component name.
|
|
140
|
+
* In `material` 3.0.0 it returns `null`, not an empty string, when nothing is selected.
|
|
137
141
|
* @returns Selected radio value or empty string if none selected
|
|
138
142
|
*/
|
|
139
143
|
getValue: () => string;
|
|
140
144
|
/**
|
|
141
|
-
* Sets the radios component value (selects a radio)
|
|
145
|
+
* Sets the radios component value (selects a radio).
|
|
146
|
+
* In `material` 3.0.0 it also accepts `null`, which clears the selection.
|
|
142
147
|
* @param value - Value to select
|
|
143
148
|
* @returns The radios component for chaining
|
|
144
149
|
*/
|
|
@@ -154,10 +154,7 @@ export const withSuggestions = () => (component) => {
|
|
|
154
154
|
if (newItem) {
|
|
155
155
|
newItem.classList.add(getClass(SEARCH_CLASSES.SUGGESTION_ITEM_SELECTED));
|
|
156
156
|
newItem.setAttribute("aria-selected", "true");
|
|
157
|
-
newItem.scrollIntoView({
|
|
158
|
-
block: "nearest",
|
|
159
|
-
behavior: "smooth",
|
|
160
|
-
});
|
|
157
|
+
newItem.scrollIntoView({ block: "nearest" });
|
|
161
158
|
}
|
|
162
159
|
}
|
|
163
160
|
};
|
|
@@ -116,17 +116,17 @@ export interface SearchConfig {
|
|
|
116
116
|
class?: string;
|
|
117
117
|
/** Component prefix for class names */
|
|
118
118
|
prefix?: string;
|
|
119
|
-
/** Called when search is submitted */
|
|
119
|
+
/** Called when search is submitted. In `material` 3.0.0 it receives the `SearchEvent` a `submit` listener receives: read `event.value`. */
|
|
120
120
|
onSubmit?: (value: string) => void;
|
|
121
|
-
/** Called when input value changes */
|
|
121
|
+
/** Called when input value changes. In `material` 3.0.0 it receives the `SearchEvent` an `input` listener receives: read `event.value`. */
|
|
122
122
|
onInput?: (value: string) => void;
|
|
123
|
-
/** Called when search is cleared */
|
|
123
|
+
/** Called when search is cleared. In `material` 3.0.0 it receives the `SearchEvent` a `clear` listener receives. */
|
|
124
124
|
onClear?: () => void;
|
|
125
|
-
/** Called when view expands */
|
|
125
|
+
/** Called when view expands. In `material` 3.0.0 it receives the object an `expand` listener receives. */
|
|
126
126
|
onExpand?: () => void;
|
|
127
|
-
/** Called when view collapses */
|
|
127
|
+
/** Called when view collapses. In `material` 3.0.0 it receives the object a `collapse` listener receives. */
|
|
128
128
|
onCollapse?: () => void;
|
|
129
|
-
/** Called when a suggestion is selected */
|
|
129
|
+
/** Called when a suggestion is selected. In `material` 3.0.0 it receives the `SearchEvent`: the suggestion is `event.suggestion`. */
|
|
130
130
|
onSuggestionSelect?: (suggestion: SearchSuggestion) => void;
|
|
131
131
|
/** Event handlers map */
|
|
132
132
|
on?: Partial<Record<SearchEventType, (event: SearchEvent) => void>>;
|
|
@@ -190,7 +190,13 @@ export interface SearchComponent {
|
|
|
190
190
|
disable: () => SearchComponent;
|
|
191
191
|
/** Checks if the component is disabled */
|
|
192
192
|
isDisabled: () => boolean;
|
|
193
|
-
/**
|
|
193
|
+
/**
|
|
194
|
+
* Adds an event listener
|
|
195
|
+
* In `material` 3.0.0 an `expand` or `collapse` listener is typed with what those events
|
|
196
|
+
* carry, `{ component, state, viewMode }` (`SearchStateEvent`): `event.value`
|
|
197
|
+
* and `event.preventDefault()` there become type errors (they are
|
|
198
|
+
* `undefined` and not a function at run time today).
|
|
199
|
+
*/
|
|
194
200
|
on: (event: SearchEventType, handler: (event: SearchEvent) => void) => SearchComponent;
|
|
195
201
|
/** Removes an event listener */
|
|
196
202
|
off: (event: SearchEventType, handler: (event: SearchEvent) => void) => SearchComponent;
|
|
@@ -80,7 +80,7 @@ export declare const SELECT_DEFAULTS: {
|
|
|
80
80
|
export declare const SELECT_CLASSES: {
|
|
81
81
|
/** Container element */
|
|
82
82
|
readonly CONTAINER: "select";
|
|
83
|
-
/** @deprecated Renamed `TEXT_FIELD` in
|
|
83
|
+
/** @deprecated Renamed `TEXT_FIELD` in `material` 3.0.0 (FLO-383), and its class becomes `select__text-field`. */
|
|
84
84
|
readonly TEXTFIELD: "select__textfield";
|
|
85
85
|
/** Dropdown icon */
|
|
86
86
|
readonly DROPDOWN_ICON: "select__dropdown-icon";
|
|
@@ -160,12 +160,14 @@ export interface SelectComponent {
|
|
|
160
160
|
element: HTMLElement;
|
|
161
161
|
/**
|
|
162
162
|
* The textfield component
|
|
163
|
-
* @deprecated Renamed `textField` in
|
|
164
|
-
*
|
|
163
|
+
* @deprecated Renamed `textField` in `material` 3.0.0 (FLO-383), where `select.textfield` is `undefined`.
|
|
164
|
+
* 0.10.x has no `textField`, so rename it when you upgrade.
|
|
165
165
|
*/
|
|
166
166
|
textfield: TextfieldComponent;
|
|
167
167
|
/**
|
|
168
168
|
* The menu component
|
|
169
|
+
* @deprecated Removed in `material` 3.0.0. Use the select's own methods and events: `open()`,
|
|
170
|
+
* `close()`, `isOpen()`, `getOptions()`, `setOptions()`, and `open`, `close` and `change`.
|
|
169
171
|
*/
|
|
170
172
|
menu: MenuComponent;
|
|
171
173
|
/**
|
|
@@ -284,6 +286,8 @@ export interface SelectEvent {
|
|
|
284
286
|
originalEvent?: Event;
|
|
285
287
|
/**
|
|
286
288
|
* Function to prevent default behavior
|
|
289
|
+
* In `material` 3.0.0 the select's `open`, `close` and `change` payloads have no
|
|
290
|
+
* `preventDefault` and no `defaultPrevented`: these events cannot be cancelled.
|
|
287
291
|
*/
|
|
288
292
|
preventDefault: () => void;
|
|
289
293
|
/**
|
|
@@ -55,6 +55,8 @@ export interface SideSheetConfig {
|
|
|
55
55
|
closeOnScrimClick?: boolean;
|
|
56
56
|
/**
|
|
57
57
|
* Whether Escape closes it.
|
|
58
|
+
* A limit on 0.10.x, fixed in `material` 3.0.0: with `layer: "top"` and this option
|
|
59
|
+
* `false`, the third Escape still closes a modal sheet.
|
|
58
60
|
* @default true
|
|
59
61
|
*/
|
|
60
62
|
closeOnEscape?: boolean;
|
|
@@ -167,6 +167,13 @@ export interface SliderStateComponent {
|
|
|
167
167
|
valueBubble?: HTMLElement | null;
|
|
168
168
|
secondHandle?: HTMLElement | null;
|
|
169
169
|
secondValueBubble?: HTMLElement | null;
|
|
170
|
+
/**
|
|
171
|
+
* The older bag the same elements were kept in
|
|
172
|
+
* @deprecated Internal in `material` 3.0.0 and outside the public contract: nothing in
|
|
173
|
+
* the library fills it, it may go in any release, and `SliderComponent` has no
|
|
174
|
+
* `components`. Use the slider's own API (`setValue()`, `getValue()` and the rest of
|
|
175
|
+
* `SliderComponent`) and `slider.element`.
|
|
176
|
+
*/
|
|
170
177
|
components?: Record<string, HTMLElement | null | undefined>;
|
|
171
178
|
getClass: (name: string) => string;
|
|
172
179
|
emit: (event: string, data: unknown) => unknown;
|
|
@@ -129,7 +129,12 @@ export interface SnackbarConfig {
|
|
|
129
129
|
export interface SnackbarComponent {
|
|
130
130
|
/** The root element of the snackbar */
|
|
131
131
|
element: HTMLElement;
|
|
132
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Current state of the snackbar
|
|
134
|
+
* In `material` 3.0.0 a snackbar shown behind another is `"queued"` until its turn, then
|
|
135
|
+
* `"visible"` with `open` (today it says `"visible"` while it waits). `material` 3.0.0
|
|
136
|
+
* adds `isOpen()`, true only while it is on screen.
|
|
137
|
+
*/
|
|
133
138
|
state: SnackbarState;
|
|
134
139
|
/** The action button element (if present) */
|
|
135
140
|
actionButton?: HTMLElement;
|
|
@@ -137,9 +142,19 @@ export interface SnackbarComponent {
|
|
|
137
142
|
closeButton?: HTMLElement;
|
|
138
143
|
/** Timer for auto-dismissal */
|
|
139
144
|
timer?: SnackbarTimer;
|
|
140
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* Displays the snackbar
|
|
147
|
+
* A limit on 0.10.x, fixed in `material` 3.0.0: a snackbar still waiting behind another
|
|
148
|
+
* when a `queueBehavior: 'replace'` snackbar or `clearSnackbars()` drops it
|
|
149
|
+
* keeps `state` `"visible"`, and `show()` on it does nothing from then on.
|
|
150
|
+
* Create a new snackbar instead of showing that one again.
|
|
151
|
+
*/
|
|
141
152
|
show: () => SnackbarComponent;
|
|
142
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* Hides the snackbar
|
|
155
|
+
* In `material` 3.0.0 `hide()` on a snackbar still waiting behind another takes it out of
|
|
156
|
+
* the queue and emits nothing (today it emits `close` and `dismiss`).
|
|
157
|
+
*/
|
|
143
158
|
hide: () => SnackbarComponent;
|
|
144
159
|
/** Sets the message text */
|
|
145
160
|
setMessage: (message: string) => SnackbarComponent;
|
|
@@ -84,7 +84,12 @@ export interface SplitButtonComponent {
|
|
|
84
84
|
leadingElement: HTMLButtonElement;
|
|
85
85
|
/** The trailing button's element */
|
|
86
86
|
trailingElement: HTMLButtonElement;
|
|
87
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* The menu, when the component was given items
|
|
89
|
+
* @deprecated Removed in `material` 3.0.0. Use the split button's own methods and events: `expand()`,
|
|
90
|
+
* `collapse()`, `isExpanded()`, and `expand`, `collapse` and `select`. `material` 3.0.0 adds
|
|
91
|
+
* `setItems()` and `getItems()` for what `menu.setItems()` does today.
|
|
92
|
+
*/
|
|
88
93
|
menu?: MenuComponent;
|
|
89
94
|
/** Sets the leading button's label */
|
|
90
95
|
setText: (text: string) => SplitButtonComponent;
|
|
@@ -2,8 +2,8 @@ export { default } from "./switch.js";
|
|
|
2
2
|
export { SWITCH_LABEL_POSITIONS, SWITCH_STATES, SWITCH_EVENTS, SWITCH_DEFAULTS, SWITCH_CLASSES } from "./constants.js";
|
|
3
3
|
export type { SwitchConfig, SwitchComponent, SwitchEvents, SwitchChangePayload } from "./types.js";
|
|
4
4
|
export {
|
|
5
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in
|
|
5
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in `material` 3.0.0 (FLO-381). */
|
|
6
6
|
withSupportingText, } from "./features.js";
|
|
7
7
|
export type {
|
|
8
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in
|
|
8
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/switch in `material` 3.0.0 (FLO-381). */
|
|
9
9
|
SupportingTextComponent, } from "./features.js";
|
|
@@ -7,39 +7,39 @@ import { updateTabPanels, setupKeyboardNavigation } from "./utils.js";
|
|
|
7
7
|
export { TAB_VARIANTS, TAB_STATES, TAB_INDICATOR_WIDTH_STRATEGIES, TAB_EVENTS, TABS_EVENTS, TABS_DEFAULTS, TABS_CLASSES, TAB_CLASSES, } from "./constants.js";
|
|
8
8
|
export type { TabsConfig, TabsComponent, TabComponent, TabConfig, TabChangeEventData, IndicatorConfig, } from "./types.js";
|
|
9
9
|
export {
|
|
10
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
10
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
11
11
|
addScrollIndicators, setupResponsiveBehavior,
|
|
12
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
12
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
13
13
|
createTabsState,
|
|
14
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
14
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
15
15
|
createTabIndicator,
|
|
16
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
16
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
17
17
|
updateTabPanels,
|
|
18
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
18
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
19
19
|
setupKeyboardNavigation, };
|
|
20
20
|
export {
|
|
21
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
21
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
22
22
|
withTabsManagement,
|
|
23
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
23
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
24
24
|
withScrollable,
|
|
25
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
25
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
26
26
|
withDivider,
|
|
27
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
27
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
28
28
|
withIndicator, } from "./features.js";
|
|
29
29
|
export type {
|
|
30
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
30
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
31
31
|
TabsManagementConfig,
|
|
32
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
32
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
33
33
|
TabsManagementComponent,
|
|
34
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
34
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
35
35
|
ScrollableConfig,
|
|
36
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
36
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
37
37
|
ScrollableComponent,
|
|
38
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
38
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
39
39
|
DividerConfig,
|
|
40
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
40
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
41
41
|
IndicatorFeatureConfig,
|
|
42
|
-
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in
|
|
42
|
+
/** @deprecated Internal, no replacement: removed from mtrl/components/tabs in `material` 3.0.0 (FLO-381). */
|
|
43
43
|
IndicatorComponent, } from "./features.js";
|
|
44
44
|
export default createTabs;
|
|
45
45
|
export { createTab } from "./tab.js";
|
|
@@ -26,16 +26,10 @@ export const addScrollIndicators = (tabs, config = {}) => {
|
|
|
26
26
|
tabs.element.appendChild(leftButton);
|
|
27
27
|
tabs.element.appendChild(rightButton);
|
|
28
28
|
leftButton.addEventListener('click', () => {
|
|
29
|
-
scrollContainer.scrollBy({
|
|
30
|
-
left: -100,
|
|
31
|
-
behavior: 'smooth'
|
|
32
|
-
});
|
|
29
|
+
scrollContainer.scrollBy({ left: -100 });
|
|
33
30
|
});
|
|
34
31
|
rightButton.addEventListener('click', () => {
|
|
35
|
-
scrollContainer.scrollBy({
|
|
36
|
-
left: 100,
|
|
37
|
-
behavior: 'smooth'
|
|
38
|
-
});
|
|
32
|
+
scrollContainer.scrollBy({ left: 100 });
|
|
39
33
|
});
|
|
40
34
|
}
|
|
41
35
|
const updateIndicators = () => {
|
|
@@ -281,7 +281,11 @@ export interface TabComponent {
|
|
|
281
281
|
element: HTMLElement;
|
|
282
282
|
/** The button the tab is built on */
|
|
283
283
|
button?: TabButton;
|
|
284
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* The tab's badge component (if any). In `material` 3.0.0 it may be `undefined` until
|
|
286
|
+
* the badge is shown: read it with a guard, or use `setBadge()`, `getBadge()`,
|
|
287
|
+
* `showBadge()` and `hideBadge()`, which work whether it exists yet or not.
|
|
288
|
+
*/
|
|
285
289
|
badge?: BadgeComponent;
|
|
286
290
|
/** Gets a class name with the component's prefix */
|
|
287
291
|
getClass: (name: string) => string;
|
|
@@ -407,7 +411,7 @@ export interface TabsComponent {
|
|
|
407
411
|
*/
|
|
408
412
|
off(event: string, handler: Function): this;
|
|
409
413
|
/**
|
|
410
|
-
* Emit an event
|
|
414
|
+
* Emit an event. In `material` 3.0.0, `emit` accepts only the tabs' own events.
|
|
411
415
|
* @param event - Event name
|
|
412
416
|
* @param data - Event data
|
|
413
417
|
* @returns Tabs component for chaining
|
|
@@ -98,6 +98,9 @@ declare const TEXTFIELD_DEFAULTS: {
|
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
100
|
* CSS class names used by the textfield component
|
|
101
|
+
* In `material` 3.0.0 the classes are written `text-field` (`mtrl-text-field`,
|
|
102
|
+
* `mtrl-text-field__input`, …): page CSS and `classList` calls that keep
|
|
103
|
+
* `mtrl-textfield` then match nothing, and nothing warns.
|
|
101
104
|
* @category Components
|
|
102
105
|
*/
|
|
103
106
|
declare const TEXTFIELD_CLASSES: {
|
|
@@ -155,17 +158,17 @@ declare const TEXTFIELD_CLASSES: {
|
|
|
155
158
|
readonly MULTILINE: "textfield--multiline";
|
|
156
159
|
};
|
|
157
160
|
export { TEXTFIELD_VARIANTS as TEXT_FIELD_VARIANTS, TEXTFIELD_STATES as TEXT_FIELD_STATES, TEXTFIELD_TYPES as TEXT_FIELD_TYPES, TEXTFIELD_EVENTS as TEXT_FIELD_EVENTS, TEXTFIELD_DENSITY as TEXT_FIELD_DENSITY, TEXTFIELD_DEFAULTS as TEXT_FIELD_DEFAULTS, TEXTFIELD_CLASSES as TEXT_FIELD_CLASSES,
|
|
158
|
-
/** @deprecated Use TEXT_FIELD_VARIANTS: M3 writes "text field" as two words. Removed in
|
|
161
|
+
/** @deprecated Use TEXT_FIELD_VARIANTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
159
162
|
TEXTFIELD_VARIANTS,
|
|
160
|
-
/** @deprecated Use TEXT_FIELD_STATES: M3 writes "text field" as two words. Removed in
|
|
163
|
+
/** @deprecated Use TEXT_FIELD_STATES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
161
164
|
TEXTFIELD_STATES,
|
|
162
|
-
/** @deprecated Use TEXT_FIELD_TYPES: M3 writes "text field" as two words. Removed in
|
|
165
|
+
/** @deprecated Use TEXT_FIELD_TYPES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
163
166
|
TEXTFIELD_TYPES,
|
|
164
|
-
/** @deprecated Use TEXT_FIELD_EVENTS: M3 writes "text field" as two words. Removed in
|
|
167
|
+
/** @deprecated Use TEXT_FIELD_EVENTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
165
168
|
TEXTFIELD_EVENTS,
|
|
166
|
-
/** @deprecated Use TEXT_FIELD_DENSITY: M3 writes "text field" as two words. Removed in
|
|
169
|
+
/** @deprecated Use TEXT_FIELD_DENSITY: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
167
170
|
TEXTFIELD_DENSITY,
|
|
168
|
-
/** @deprecated Use TEXT_FIELD_DEFAULTS: M3 writes "text field" as two words. Removed in
|
|
171
|
+
/** @deprecated Use TEXT_FIELD_DEFAULTS: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
169
172
|
TEXTFIELD_DEFAULTS,
|
|
170
|
-
/** @deprecated Use TEXT_FIELD_CLASSES: M3 writes "text field" as two words. Removed in
|
|
173
|
+
/** @deprecated Use TEXT_FIELD_CLASSES: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
171
174
|
TEXTFIELD_CLASSES, };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { default } from "./textfield.js";
|
|
2
2
|
export { default as createTextField } from "./textfield.js";
|
|
3
3
|
export type { TextfieldConfig as TextFieldConfig, TextfieldComponent as TextFieldComponent,
|
|
4
|
-
/** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in
|
|
4
|
+
/** @deprecated Use TextFieldConfig: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
5
5
|
TextfieldConfig,
|
|
6
|
-
/** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in
|
|
6
|
+
/** @deprecated Use TextFieldComponent: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
7
7
|
TextfieldComponent, TextfieldDensity as TextFieldDensity, TextfieldEvents as TextFieldEvents, TextfieldValuePayload as TextFieldValuePayload, TextfieldFocusPayload as TextFieldFocusPayload, TextfieldTrailingPayload as TextFieldTrailingPayload,
|
|
8
|
-
/** @deprecated Use TextFieldDensity: M3 writes "text field" as two words. Removed in
|
|
8
|
+
/** @deprecated Use TextFieldDensity: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
9
9
|
TextfieldDensity,
|
|
10
|
-
/** @deprecated Use TextFieldEvents: M3 writes "text field" as two words. Removed in
|
|
10
|
+
/** @deprecated Use TextFieldEvents: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
11
11
|
TextfieldEvents,
|
|
12
|
-
/** @deprecated Use TextFieldValuePayload: M3 writes "text field" as two words. Removed in
|
|
12
|
+
/** @deprecated Use TextFieldValuePayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
13
13
|
TextfieldValuePayload,
|
|
14
|
-
/** @deprecated Use TextFieldFocusPayload: M3 writes "text field" as two words. Removed in
|
|
14
|
+
/** @deprecated Use TextFieldFocusPayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
15
15
|
TextfieldFocusPayload,
|
|
16
|
-
/** @deprecated Use TextFieldTrailingPayload: M3 writes "text field" as two words. Removed in
|
|
16
|
+
/** @deprecated Use TextFieldTrailingPayload: M3 writes "text field" as two words. Removed in `material` 3.0.0 (FLO-383). */
|
|
17
17
|
TextfieldTrailingPayload, } from "./types.js";
|
|
@@ -289,6 +289,7 @@ export interface BaseComponent {
|
|
|
289
289
|
*/
|
|
290
290
|
declare module "../../core/config/global" {
|
|
291
291
|
interface ComponentConfigMap {
|
|
292
|
+
/** In `material` 3.0.0 this defaults key is `'text-field'`: `setComponentDefaults('text-field', …)`. */
|
|
292
293
|
textfield?: Partial<TextfieldConfig>;
|
|
293
294
|
}
|
|
294
295
|
}
|
|
@@ -192,7 +192,7 @@ export declare const TIMEPICKER_DEFAULTS: {
|
|
|
192
192
|
readonly CANCEL_TEXT: "Cancel";
|
|
193
193
|
/** Default confirm button text */
|
|
194
194
|
readonly CONFIRM_TEXT: "OK";
|
|
195
|
-
/** Whether picker is initially open */
|
|
195
|
+
/** Whether picker is initially open. In `material` 3.0.0 this key is `OPEN`, with the option renamed `open`. */
|
|
196
196
|
readonly IS_OPEN: false;
|
|
197
197
|
/** Default clock icon */
|
|
198
198
|
readonly CLOCK_ICON: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <polyline points=\"12 6 12 12 16 14\"></polyline>\n </svg>";
|
|
@@ -182,6 +182,8 @@ export interface TimePickerConfig {
|
|
|
182
182
|
confirmText?: string;
|
|
183
183
|
/**
|
|
184
184
|
* Whether the time picker is initially visible (for inline mode)
|
|
185
|
+
* In `material` 3.0.0 this option is named `open`, and the picker is open when its
|
|
186
|
+
* factory returns (today it opens on a 0 ms timer).
|
|
185
187
|
* @default false
|
|
186
188
|
*/
|
|
187
189
|
isOpen?: boolean;
|
|
@@ -222,7 +224,8 @@ export interface TimePickerConfig {
|
|
|
222
224
|
*/
|
|
223
225
|
onClose?: () => void;
|
|
224
226
|
/**
|
|
225
|
-
* Callback when time is confirmed; receives the same 24-hour value as getValue()
|
|
227
|
+
* Callback when time is confirmed; receives the same 24-hour value as getValue().
|
|
228
|
+
* In `material` 3.0.0 it receives `{ value }`, the object a `confirm` listener receives.
|
|
226
229
|
*/
|
|
227
230
|
onConfirm?: (time: string) => void;
|
|
228
231
|
/**
|
|
@@ -269,7 +272,7 @@ export interface TimePickerComponent {
|
|
|
269
272
|
modalElement: HTMLElement;
|
|
270
273
|
/** Dialog container element */
|
|
271
274
|
dialogElement: HTMLElement;
|
|
272
|
-
/** Whether the time picker is currently open */
|
|
275
|
+
/** Whether the time picker is currently open. In `material` 3.0.0 it is a method: `isOpen()`. */
|
|
273
276
|
isOpen: boolean;
|
|
274
277
|
/**
|
|
275
278
|
* Opens the time picker
|
|
@@ -39,7 +39,9 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
39
39
|
const calculatePosition = () => {
|
|
40
40
|
if (!target)
|
|
41
41
|
return { top: 0, left: 0 };
|
|
42
|
-
|
|
42
|
+
component.element.style.left = "0px";
|
|
43
|
+
const tooltipWidth = component.element.offsetWidth;
|
|
44
|
+
const tooltipHeight = component.element.offsetHeight;
|
|
43
45
|
const targetRect = target.getBoundingClientRect();
|
|
44
46
|
const scrollY = topLayer ? 0 : window.scrollY || window.pageYOffset;
|
|
45
47
|
const scrollX = topLayer ? 0 : window.scrollX || window.pageXOffset;
|
|
@@ -49,23 +51,23 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
49
51
|
let arrowPosition;
|
|
50
52
|
switch (position) {
|
|
51
53
|
case TOOLTIP_POSITIONS.TOP:
|
|
52
|
-
top = targetRect.top + scrollY -
|
|
54
|
+
top = targetRect.top + scrollY - tooltipHeight - offset;
|
|
53
55
|
left =
|
|
54
56
|
targetRect.left +
|
|
55
57
|
scrollX +
|
|
56
58
|
targetRect.width / 2 -
|
|
57
|
-
|
|
59
|
+
tooltipWidth / 2;
|
|
58
60
|
arrowPosition = "bottom";
|
|
59
61
|
break;
|
|
60
62
|
case TOOLTIP_POSITIONS.TOP_START:
|
|
61
|
-
top = targetRect.top + scrollY -
|
|
63
|
+
top = targetRect.top + scrollY - tooltipHeight - offset;
|
|
62
64
|
left = targetRect.left + scrollX;
|
|
63
65
|
arrowPosition = "bottom-start";
|
|
64
66
|
break;
|
|
65
67
|
case TOOLTIP_POSITIONS.TOP_END:
|
|
66
|
-
top = targetRect.top + scrollY -
|
|
68
|
+
top = targetRect.top + scrollY - tooltipHeight - offset;
|
|
67
69
|
left =
|
|
68
|
-
targetRect.left + scrollX + targetRect.width -
|
|
70
|
+
targetRect.left + scrollX + targetRect.width - tooltipWidth;
|
|
69
71
|
arrowPosition = "bottom-end";
|
|
70
72
|
break;
|
|
71
73
|
case TOOLTIP_POSITIONS.RIGHT:
|
|
@@ -73,7 +75,7 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
73
75
|
targetRect.top +
|
|
74
76
|
scrollY +
|
|
75
77
|
targetRect.height / 2 -
|
|
76
|
-
|
|
78
|
+
tooltipHeight / 2;
|
|
77
79
|
left = targetRect.left + scrollX + targetRect.width + offset;
|
|
78
80
|
arrowPosition = "left";
|
|
79
81
|
break;
|
|
@@ -84,7 +86,7 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
84
86
|
break;
|
|
85
87
|
case TOOLTIP_POSITIONS.RIGHT_END:
|
|
86
88
|
top =
|
|
87
|
-
targetRect.top + scrollY + targetRect.height -
|
|
89
|
+
targetRect.top + scrollY + targetRect.height - tooltipHeight;
|
|
88
90
|
left = targetRect.left + scrollX + targetRect.width + offset;
|
|
89
91
|
arrowPosition = "left-end";
|
|
90
92
|
break;
|
|
@@ -94,7 +96,7 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
94
96
|
targetRect.left +
|
|
95
97
|
scrollX +
|
|
96
98
|
targetRect.width / 2 -
|
|
97
|
-
|
|
99
|
+
tooltipWidth / 2;
|
|
98
100
|
arrowPosition = "top";
|
|
99
101
|
break;
|
|
100
102
|
case TOOLTIP_POSITIONS.BOTTOM_START:
|
|
@@ -105,7 +107,7 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
105
107
|
case TOOLTIP_POSITIONS.BOTTOM_END:
|
|
106
108
|
top = targetRect.top + scrollY + targetRect.height + offset;
|
|
107
109
|
left =
|
|
108
|
-
targetRect.left + scrollX + targetRect.width -
|
|
110
|
+
targetRect.left + scrollX + targetRect.width - tooltipWidth;
|
|
109
111
|
arrowPosition = "top-end";
|
|
110
112
|
break;
|
|
111
113
|
case TOOLTIP_POSITIONS.LEFT:
|
|
@@ -113,19 +115,19 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
113
115
|
targetRect.top +
|
|
114
116
|
scrollY +
|
|
115
117
|
targetRect.height / 2 -
|
|
116
|
-
|
|
117
|
-
left = targetRect.left + scrollX -
|
|
118
|
+
tooltipHeight / 2;
|
|
119
|
+
left = targetRect.left + scrollX - tooltipWidth - offset;
|
|
118
120
|
arrowPosition = "right";
|
|
119
121
|
break;
|
|
120
122
|
case TOOLTIP_POSITIONS.LEFT_START:
|
|
121
123
|
top = targetRect.top + scrollY;
|
|
122
|
-
left = targetRect.left + scrollX -
|
|
124
|
+
left = targetRect.left + scrollX - tooltipWidth - offset;
|
|
123
125
|
arrowPosition = "right-start";
|
|
124
126
|
break;
|
|
125
127
|
case TOOLTIP_POSITIONS.LEFT_END:
|
|
126
128
|
top =
|
|
127
|
-
targetRect.top + scrollY + targetRect.height -
|
|
128
|
-
left = targetRect.left + scrollX -
|
|
129
|
+
targetRect.top + scrollY + targetRect.height - tooltipHeight;
|
|
130
|
+
left = targetRect.left + scrollX - tooltipWidth - offset;
|
|
129
131
|
arrowPosition = "right-end";
|
|
130
132
|
break;
|
|
131
133
|
default:
|
|
@@ -134,15 +136,15 @@ export const withAPI = ({ lifecycle }) => (component) => {
|
|
|
134
136
|
targetRect.left +
|
|
135
137
|
scrollX +
|
|
136
138
|
targetRect.width / 2 -
|
|
137
|
-
|
|
139
|
+
tooltipWidth / 2;
|
|
138
140
|
arrowPosition = "top";
|
|
139
141
|
}
|
|
140
142
|
const windowWidth = window.innerWidth;
|
|
141
143
|
if (left < 0) {
|
|
142
144
|
left = 0;
|
|
143
145
|
}
|
|
144
|
-
else if (left +
|
|
145
|
-
left = windowWidth -
|
|
146
|
+
else if (left + tooltipWidth > windowWidth) {
|
|
147
|
+
left = windowWidth - tooltipWidth;
|
|
146
148
|
}
|
|
147
149
|
return { top, left, arrowPosition };
|
|
148
150
|
};
|
|
@@ -79,7 +79,7 @@ export declare const TOOLTIP_DEFAULTS: {
|
|
|
79
79
|
readonly SHOW_ON_HOVER: true;
|
|
80
80
|
/**
|
|
81
81
|
* Whether to allow rich HTML content by default
|
|
82
|
-
* @deprecated The `rich` option has no effect and is removed in
|
|
82
|
+
* @deprecated The `rich` option has no effect and is removed in `material` 3.0.0, and this default with it.
|
|
83
83
|
*/
|
|
84
84
|
readonly RICH: false;
|
|
85
85
|
};
|
|
@@ -120,7 +120,7 @@ export interface TooltipConfig {
|
|
|
120
120
|
/**
|
|
121
121
|
* Never read, so it has no effect: a rich tooltip is `variant: 'rich'`, and
|
|
122
122
|
* the content is always text.
|
|
123
|
-
* @deprecated Since 0.10 (FLO-324); removed in
|
|
123
|
+
* @deprecated Since 0.10 (FLO-324); removed in `material` 3.0.0.
|
|
124
124
|
*/
|
|
125
125
|
rich?: boolean;
|
|
126
126
|
}
|
|
@@ -7,5 +7,5 @@ export { TOP_APP_BAR_TYPES, TOP_APP_BAR_STATES, TOP_APP_BAR_DEFAULTS, TOP_APP_BA
|
|
|
7
7
|
export default createTopAppBar;
|
|
8
8
|
export { createTopAppBar };
|
|
9
9
|
export type { TopAppBarConfig, TopAppBar as TopAppBarComponent,
|
|
10
|
-
/** @deprecated Use TopAppBarComponent, the name every component type has. Removed in
|
|
10
|
+
/** @deprecated Use TopAppBarComponent, the name every component type has. Removed in `material` 3.0.0 (FLO-383). */
|
|
11
11
|
TopAppBar, } from "./types.js";
|