wj-elements 0.6.1 → 0.7.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.
- package/dist/custom-elements.json +24552 -0
- package/dist/light.css +1 -0
- package/dist/packages/translations/en-gb.d.ts +4 -0
- package/dist/packages/translations/sk-sk.d.ts +4 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +1 -1
- package/dist/packages/wje-chip/chip.element.d.ts +3 -0
- package/dist/packages/wje-dropdown/dropdown.element.d.ts +18 -0
- package/dist/packages/wje-file-upload/file-upload.element.d.ts +16 -0
- package/dist/packages/wje-header/header.element.d.ts +1 -0
- package/dist/packages/wje-popup/popup.element.d.ts +41 -1
- package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +410 -3
- package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +11 -0
- package/dist/{popup.element-B1HZhDZJ.js → popup.element-CwXvVFK7.js} +251 -43
- package/dist/popup.element-CwXvVFK7.js.map +1 -0
- package/dist/styles.css +0 -38
- package/dist/web-types.json +4176 -0
- package/dist/wje-animation.js +1 -1
- package/dist/wje-breadcrumbs.js +4 -0
- package/dist/wje-breadcrumbs.js.map +1 -1
- package/dist/wje-chip.js +11 -2
- package/dist/wje-chip.js.map +1 -1
- package/dist/wje-dropdown.js +28 -4
- package/dist/wje-dropdown.js.map +1 -1
- package/dist/wje-file-upload.js +64 -2
- package/dist/wje-file-upload.js.map +1 -1
- package/dist/wje-header.js +1 -1
- package/dist/wje-header.js.map +1 -1
- package/dist/wje-master.js +9 -1
- package/dist/wje-master.js.map +1 -1
- package/dist/wje-popup.js +1 -1
- package/dist/wje-select.js +28 -5
- package/dist/wje-select.js.map +1 -1
- package/dist/wje-sliding-container.js +936 -14
- package/dist/wje-sliding-container.js.map +1 -1
- package/dist/wje-toolbar-action.js +25 -1
- package/dist/wje-toolbar-action.js.map +1 -1
- package/dist/wje-toolbar.js +1 -1
- package/dist/wje-tooltip.js +1 -1
- package/package.json +3 -2
- package/dist/popup.element-B1HZhDZJ.js.map +0 -1
|
@@ -4,7 +4,11 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
4
4
|
* @documentation https://elements.webjet.sk/components/SlidingContainer
|
|
5
5
|
* @status stable
|
|
6
6
|
* @augments WJElement
|
|
7
|
-
* @csspart - Styles the
|
|
7
|
+
* @csspart backdrop - Styles the mobile bottom sheet backdrop.
|
|
8
|
+
* @csspart sliding-container - Styles the native sliding panel.
|
|
9
|
+
* @csspart close-button - Styles the generated close button.
|
|
10
|
+
* @csspart sheet-handle-area - Styles the draggable resize handle hit area.
|
|
11
|
+
* @csspart sheet-handle - Styles the visible draggable resize handle.
|
|
8
12
|
* @slot - The default slot for the SlidingContainer.
|
|
9
13
|
* @property {string} maxWidth - The maximum width of the SlidingContainer.
|
|
10
14
|
* @property {string} maxHeight - The maximum height of the SlidingContainer.
|
|
@@ -16,6 +20,39 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
16
20
|
* @property {string} animationDuration - Specifies the duration (in milliseconds) of the sliding animation.
|
|
17
21
|
* @property {string} animationEasing - Specifies the easing function used for the sliding animation (e.g., 'linear', 'ease-in', 'ease-out').
|
|
18
22
|
* @property {boolean} hasOpacity - Sets the opacity of the SlidingContainer.
|
|
23
|
+
* @property {string} mobilePresentation - Enables mobile presentation, for example 'bottom-sheet'.
|
|
24
|
+
* @property {string} mobileBreakPoint - The viewport width where mobile presentation becomes active.
|
|
25
|
+
* @property {boolean} backdropDismiss - Closes the mobile bottom sheet when the backdrop is clicked.
|
|
26
|
+
* @property {boolean} sheetResizable - Enables mobile bottom sheet resizing.
|
|
27
|
+
* @property {string} sheetScope - Defines whether the mobile bottom sheet panel is scoped to the container or viewport.
|
|
28
|
+
* @property {string} sheetBoundary - CSS selector for the composed ancestor that bounds the mobile bottom sheet panel.
|
|
29
|
+
* @property {string} sheetHeight - The mobile bottom sheet height after opening.
|
|
30
|
+
* @property {string} sheetMinHeight - The minimum mobile bottom sheet height while resizing.
|
|
31
|
+
* @property {string} sheetMaxHeight - The maximum mobile bottom sheet height while resizing.
|
|
32
|
+
* @attribute {string} mobile-presentation - Enables responsive mobile presentation. Use "bottom-sheet".
|
|
33
|
+
* @attribute {string} mobile-break-point - Viewport width where mobile presentation becomes active. Defaults to "768".
|
|
34
|
+
* @attribute {boolean} backdrop-dismiss - Closes the mobile bottom sheet when the backdrop is clicked.
|
|
35
|
+
* @attribute {boolean} sheet-resizable - Enables resizing the mobile bottom sheet with a handle.
|
|
36
|
+
* @attribute {string} sheet-scope - Defines whether the sheet panel is scoped to "viewport", "parent", or a bounded container.
|
|
37
|
+
* @attribute {string} sheet-boundary - CSS selector for the composed ancestor that bounds the mobile bottom sheet panel.
|
|
38
|
+
* @attribute {string} sheet-height - The mobile bottom sheet height after opening.
|
|
39
|
+
* @attribute {string} sheet-min-height - The minimum mobile bottom sheet height while resizing.
|
|
40
|
+
* @attribute {string} sheet-max-height - The maximum mobile bottom sheet height while resizing.
|
|
41
|
+
* @cssproperty [--wje-sliding-container-background=var(--wje-background)] - Background of the sliding panel.
|
|
42
|
+
* @cssproperty [--wje-sliding-container-z-index=1000] - z-index of the side sliding container.
|
|
43
|
+
* @cssproperty [--wje-sliding-container-bottom-sheet-z-index=var(--wje-sliding-container-z-index, 1000)] - z-index of the mobile bottom sheet host.
|
|
44
|
+
* @cssproperty [--wje-sliding-container-bottom-sheet-backdrop-z-index=0] - z-index of the mobile bottom sheet backdrop inside the host layer.
|
|
45
|
+
* @cssproperty [--wje-sliding-container-bottom-sheet-panel-z-index=1] - z-index of the mobile bottom sheet panel inside the host layer.
|
|
46
|
+
* @cssproperty [--wje-sliding-container-portal-backdrop-z-index] - z-index of the body-level mobile bottom sheet backdrop.
|
|
47
|
+
* @cssproperty [--wje-sliding-container-backdrop-background=var(--wje-backdrop)] - Background of the mobile bottom sheet backdrop.
|
|
48
|
+
* @cssproperty [--wje-sliding-container-backdrop-opacity=1] - Backdrop opacity while the mobile bottom sheet is open.
|
|
49
|
+
* @cssproperty [--wje-sliding-container-box-shadow=var(--wje-sliding-container-shadow)] - Shadow of the mobile bottom sheet panel.
|
|
50
|
+
* @cssproperty [--wje-sliding-container-sheet-border-radius=var(--wje-sliding-container-border-radius) var(--wje-sliding-container-border-radius) 0 0] - Border radius of the mobile bottom sheet panel.
|
|
51
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-area-height=24px] - Height of the resize handle hit area.
|
|
52
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-width=36px] - Width of the visible resize handle.
|
|
53
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-height=2px] - Height of the visible resize handle.
|
|
54
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-background=var(--wje-border-color)] - Background of the visible resize handle.
|
|
55
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-radius=999px] - Border radius of the visible resize handle.
|
|
19
56
|
* @tag wje-sliding-container
|
|
20
57
|
* @example
|
|
21
58
|
* <wje-sliding-container trigger="test-resize-container-event-right" id="left-in-place" direction="left" max-width="100px" max-height="100%">
|
|
@@ -44,6 +81,30 @@ export default class SlidingContainer extends WJElement {
|
|
|
44
81
|
static get cssStyleSheet(): CSSStyleSheet;
|
|
45
82
|
_isOpen: boolean;
|
|
46
83
|
_lastCaller: EventTarget;
|
|
84
|
+
_sheetDrag: {
|
|
85
|
+
pointerId: string | number;
|
|
86
|
+
startY: number;
|
|
87
|
+
startHeight: number;
|
|
88
|
+
minHeight: number;
|
|
89
|
+
maxHeight: number;
|
|
90
|
+
hasMoved: boolean;
|
|
91
|
+
};
|
|
92
|
+
_sheetIgnoreDismissUntil: number;
|
|
93
|
+
_sheetBackdropGesture: {
|
|
94
|
+
pointerId: number;
|
|
95
|
+
startX: number;
|
|
96
|
+
startY: number;
|
|
97
|
+
hasMoved: boolean;
|
|
98
|
+
};
|
|
99
|
+
_sheetBackdropHandledUntil: number;
|
|
100
|
+
_bottomSheetScopeFrame: {
|
|
101
|
+
top: number;
|
|
102
|
+
left: number;
|
|
103
|
+
right: number;
|
|
104
|
+
bottom: number;
|
|
105
|
+
width: number;
|
|
106
|
+
height: number;
|
|
107
|
+
};
|
|
47
108
|
_resizeObserver: ResizeObserver;
|
|
48
109
|
/**
|
|
49
110
|
* Sets the 'variant' attribute to the specified value.
|
|
@@ -122,6 +183,26 @@ export default class SlidingContainer extends WJElement {
|
|
|
122
183
|
* @returns {string} The value of the 'screen-break-point' attribute.
|
|
123
184
|
*/
|
|
124
185
|
get screenBreakPoint(): string;
|
|
186
|
+
/**
|
|
187
|
+
* Sets mobile presentation mode.
|
|
188
|
+
* @param {string} value The mobile presentation mode.
|
|
189
|
+
*/
|
|
190
|
+
set mobilePresentation(value: string);
|
|
191
|
+
/**
|
|
192
|
+
* Gets mobile presentation mode.
|
|
193
|
+
* @returns {string|null} The mobile presentation mode.
|
|
194
|
+
*/
|
|
195
|
+
get mobilePresentation(): string | null;
|
|
196
|
+
/**
|
|
197
|
+
* Sets the breakpoint for mobile presentation.
|
|
198
|
+
* @param {string} value The mobile breakpoint.
|
|
199
|
+
*/
|
|
200
|
+
set mobileBreakPoint(value: string);
|
|
201
|
+
/**
|
|
202
|
+
* Gets the breakpoint for mobile presentation.
|
|
203
|
+
* @returns {string} The mobile breakpoint.
|
|
204
|
+
*/
|
|
205
|
+
get mobileBreakPoint(): string;
|
|
125
206
|
/**
|
|
126
207
|
* Sets the duration of the animation by updating the `animation-duration` attribute.
|
|
127
208
|
* @param {string} value The duration value for the animation, specified in a format
|
|
@@ -149,6 +230,71 @@ export default class SlidingContainer extends WJElement {
|
|
|
149
230
|
* @returns {boolean} True if the element has the 'has-opacity' attribute, otherwise false.
|
|
150
231
|
*/
|
|
151
232
|
get hasOpacity(): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* Determines if the bottom sheet should close when the backdrop is clicked.
|
|
235
|
+
* @returns {boolean} True if backdrop dismiss is enabled.
|
|
236
|
+
*/
|
|
237
|
+
get backdropDismiss(): boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Sets resizing for the mobile bottom sheet.
|
|
240
|
+
* @param {boolean|string} value The value to set.
|
|
241
|
+
*/
|
|
242
|
+
set sheetResizable(value: boolean | string);
|
|
243
|
+
/**
|
|
244
|
+
* Enables resizing for the mobile bottom sheet.
|
|
245
|
+
* @returns {boolean} True if the sheet can be resized.
|
|
246
|
+
*/
|
|
247
|
+
get sheetResizable(): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Sets the mobile bottom sheet panel scope.
|
|
250
|
+
* @param {string} value The new boundary mode for the mobile sheet.
|
|
251
|
+
*/
|
|
252
|
+
set sheetScope(value: string);
|
|
253
|
+
/**
|
|
254
|
+
* Gets the mobile bottom sheet panel scope. The backdrop always covers the viewport.
|
|
255
|
+
* @returns {string} Either 'viewport', 'container', or 'parent'.
|
|
256
|
+
*/
|
|
257
|
+
get sheetScope(): string;
|
|
258
|
+
/**
|
|
259
|
+
* Sets the selector used for container-scoped mobile bottom sheet panels.
|
|
260
|
+
* @param {string} value Selector for the boundary element.
|
|
261
|
+
*/
|
|
262
|
+
set sheetBoundary(value: string);
|
|
263
|
+
/**
|
|
264
|
+
* Gets the selector used for container-scoped mobile bottom sheet panels.
|
|
265
|
+
* @returns {string|null} A CSS selector used to find the composed boundary ancestor.
|
|
266
|
+
*/
|
|
267
|
+
get sheetBoundary(): string | null;
|
|
268
|
+
/**
|
|
269
|
+
* Sets the mobile bottom sheet opening height.
|
|
270
|
+
* @param {string} value The opening height.
|
|
271
|
+
*/
|
|
272
|
+
set sheetHeight(value: string);
|
|
273
|
+
/**
|
|
274
|
+
* Gets the mobile bottom sheet opening height.
|
|
275
|
+
* @returns {string|null} The opening height.
|
|
276
|
+
*/
|
|
277
|
+
get sheetHeight(): string | null;
|
|
278
|
+
/**
|
|
279
|
+
* Sets the minimum mobile bottom sheet height while resizing.
|
|
280
|
+
* @param {string} value The minimum height.
|
|
281
|
+
*/
|
|
282
|
+
set sheetMinHeight(value: string);
|
|
283
|
+
/**
|
|
284
|
+
* Gets the minimum mobile bottom sheet height while resizing.
|
|
285
|
+
* @returns {string|null} The minimum height.
|
|
286
|
+
*/
|
|
287
|
+
get sheetMinHeight(): string | null;
|
|
288
|
+
/**
|
|
289
|
+
* Sets the maximum mobile bottom sheet height while resizing.
|
|
290
|
+
* @param {string} value The maximum height.
|
|
291
|
+
*/
|
|
292
|
+
set sheetMaxHeight(value: string);
|
|
293
|
+
/**
|
|
294
|
+
* Gets the maximum mobile bottom sheet height while resizing.
|
|
295
|
+
* @returns {string|null} The maximum height.
|
|
296
|
+
*/
|
|
297
|
+
get sheetMaxHeight(): string | null;
|
|
152
298
|
/**
|
|
153
299
|
* Sets the value of the 'add-to-height' attribute.
|
|
154
300
|
* This attribute is used to modify or adjust the height dynamically.
|
|
@@ -178,9 +324,12 @@ export default class SlidingContainer extends WJElement {
|
|
|
178
324
|
* @returns {DocumentFragment}
|
|
179
325
|
*/
|
|
180
326
|
draw(context: object, store: object, params: object): DocumentFragment;
|
|
327
|
+
sheetHandleArea: HTMLDivElement;
|
|
328
|
+
backdropElement: HTMLDivElement;
|
|
181
329
|
transparentDiv: HTMLDivElement;
|
|
182
330
|
wrapperDiv: HTMLDivElement;
|
|
183
331
|
nativeElement: HTMLDivElement;
|
|
332
|
+
nativeInner: HTMLDivElement;
|
|
184
333
|
/**
|
|
185
334
|
* Performs actions after the element is drawn on the screen.
|
|
186
335
|
* Attaches an event listener to the document based on the specified trigger.
|
|
@@ -188,6 +337,65 @@ export default class SlidingContainer extends WJElement {
|
|
|
188
337
|
* Calls the checkForVariant method with the current variant.
|
|
189
338
|
*/
|
|
190
339
|
afterDraw(): void;
|
|
340
|
+
/**
|
|
341
|
+
* Returns whether the mobile bottom sheet presentation is active.
|
|
342
|
+
* @returns {boolean}
|
|
343
|
+
*/
|
|
344
|
+
isBottomSheet(): boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Adds interaction listeners to a backdrop element.
|
|
347
|
+
* @param {HTMLElement} backdrop The backdrop element.
|
|
348
|
+
*/
|
|
349
|
+
addBackdropListeners(backdrop: HTMLElement): void;
|
|
350
|
+
/**
|
|
351
|
+
* Removes interaction listeners from a backdrop element.
|
|
352
|
+
* @param {HTMLElement} backdrop The backdrop element.
|
|
353
|
+
*/
|
|
354
|
+
removeBackdropListeners(backdrop: HTMLElement): void;
|
|
355
|
+
/**
|
|
356
|
+
* Checks whether an element is one of this component's backdrop layers.
|
|
357
|
+
* @param {EventTarget|null} element The event target.
|
|
358
|
+
* @returns {boolean}
|
|
359
|
+
*/
|
|
360
|
+
isBackdropElement(element: EventTarget | null): boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Gets the backdrop element that is active for the current presentation.
|
|
363
|
+
* @param {object} options Options for resolving the backdrop.
|
|
364
|
+
* @param {boolean} options.createPortal Creates the body-level mobile backdrop when needed.
|
|
365
|
+
* @returns {HTMLElement|null}
|
|
366
|
+
*/
|
|
367
|
+
getBackdropElement({ createPortal }?: {
|
|
368
|
+
createPortal: boolean;
|
|
369
|
+
}): HTMLElement | null;
|
|
370
|
+
/**
|
|
371
|
+
* Creates the body-level backdrop used by mobile bottom sheets.
|
|
372
|
+
* @returns {HTMLElement} Element appended to document.body for page-level dimming.
|
|
373
|
+
*/
|
|
374
|
+
ensurePortalBackdrop(): HTMLElement;
|
|
375
|
+
_portalBackdropElement: HTMLDivElement;
|
|
376
|
+
/**
|
|
377
|
+
* Removes the body-level mobile backdrop.
|
|
378
|
+
*/
|
|
379
|
+
removePortalBackdrop(): void;
|
|
380
|
+
/**
|
|
381
|
+
* Gets the full-page z-index for the body-level mobile backdrop.
|
|
382
|
+
* @returns {string}
|
|
383
|
+
*/
|
|
384
|
+
getPortalBackdropZIndex(): string;
|
|
385
|
+
/**
|
|
386
|
+
* Gets the target opacity for the active mobile backdrop.
|
|
387
|
+
* @returns {string}
|
|
388
|
+
*/
|
|
389
|
+
getBackdropOpenOpacity(): string;
|
|
390
|
+
/**
|
|
391
|
+
* Syncs visual styles from the component to the body-level backdrop.
|
|
392
|
+
*/
|
|
393
|
+
syncPortalBackdropStyles(): void;
|
|
394
|
+
/**
|
|
395
|
+
* Handles backdrop click dismissal.
|
|
396
|
+
* @param {MouseEvent} e The click event.
|
|
397
|
+
*/
|
|
398
|
+
handleBackdropClick: (e: MouseEvent) => void;
|
|
191
399
|
/**
|
|
192
400
|
* Sync ARIA attributes on host.
|
|
193
401
|
*/
|
|
@@ -198,12 +406,63 @@ export default class SlidingContainer extends WJElement {
|
|
|
198
406
|
* @returns {HTMLElement} The close button element configured with styles, an icon, and event listener.
|
|
199
407
|
*/
|
|
200
408
|
htmlCloseButton(): HTMLElement;
|
|
409
|
+
/**
|
|
410
|
+
* Creates the mobile bottom sheet resize handle.
|
|
411
|
+
* @returns {HTMLElement} The resize handle element.
|
|
412
|
+
*/
|
|
413
|
+
htmlSheetHandle(): HTMLElement;
|
|
201
414
|
/**
|
|
202
415
|
* Retrieves the parent element of the current element.
|
|
203
416
|
* If the parent element is not found, it attempts to find the root host element.
|
|
204
417
|
* @returns {Element|null} The parent element or the root host element if no parent exists. Returns null if neither is found.
|
|
205
418
|
*/
|
|
206
419
|
getParentElement(): Element | null;
|
|
420
|
+
/**
|
|
421
|
+
* Finds the closest element across shadow DOM boundaries.
|
|
422
|
+
* @param {string} selector The selector to match.
|
|
423
|
+
* @returns {Element|null} The matched composed ancestor.
|
|
424
|
+
*/
|
|
425
|
+
getClosestComposedElement(selector: string): Element | null;
|
|
426
|
+
/**
|
|
427
|
+
* Returns the viewport frame.
|
|
428
|
+
* @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}
|
|
429
|
+
*/
|
|
430
|
+
getViewportFrame(): {
|
|
431
|
+
top: number;
|
|
432
|
+
left: number;
|
|
433
|
+
right: number;
|
|
434
|
+
bottom: number;
|
|
435
|
+
width: number;
|
|
436
|
+
height: number;
|
|
437
|
+
};
|
|
438
|
+
/**
|
|
439
|
+
* Returns the element that bounds the mobile bottom sheet panel.
|
|
440
|
+
* @returns {Element|null} The scope element, or null for viewport scope.
|
|
441
|
+
*/
|
|
442
|
+
getBottomSheetScopeElement(): Element | null;
|
|
443
|
+
/**
|
|
444
|
+
* Returns the frame used by the mobile bottom sheet panel.
|
|
445
|
+
* @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}
|
|
446
|
+
*/
|
|
447
|
+
getBottomSheetScopeFrame(): {
|
|
448
|
+
top: number;
|
|
449
|
+
left: number;
|
|
450
|
+
right: number;
|
|
451
|
+
bottom: number;
|
|
452
|
+
width: number;
|
|
453
|
+
height: number;
|
|
454
|
+
};
|
|
455
|
+
/**
|
|
456
|
+
* Applies a fixed frame to a bottom sheet layer.
|
|
457
|
+
* @param {HTMLElement|SlidingContainer} element The element to update.
|
|
458
|
+
* @param {object} frame The frame to apply.
|
|
459
|
+
*/
|
|
460
|
+
setBottomSheetLayerFrame(element: HTMLElement | SlidingContainer, frame: object): void;
|
|
461
|
+
/**
|
|
462
|
+
* Removes fixed frame styles from a bottom sheet layer.
|
|
463
|
+
* @param {HTMLElement|SlidingContainer} element The element to reset.
|
|
464
|
+
*/
|
|
465
|
+
resetBottomSheetLayerFrame(element: HTMLElement | SlidingContainer): void;
|
|
207
466
|
/**
|
|
208
467
|
* Adjusts the position and dimensions of the current element based on the specified variant.
|
|
209
468
|
*
|
|
@@ -213,6 +472,146 @@ export default class SlidingContainer extends WJElement {
|
|
|
213
472
|
* @returns {void} No value is returned, the method modifies the element's style properties directly.
|
|
214
473
|
*/
|
|
215
474
|
checkForVariant(variant: string): void;
|
|
475
|
+
/**
|
|
476
|
+
* Applies the mobile bottom sheet layout.
|
|
477
|
+
*/
|
|
478
|
+
setBottomSheetVariant(): void;
|
|
479
|
+
/**
|
|
480
|
+
* Removes layout styles managed by the mobile bottom sheet mode.
|
|
481
|
+
*/
|
|
482
|
+
resetBottomSheetVariant(): void;
|
|
483
|
+
/**
|
|
484
|
+
* Applies the current visual open or closed state to the mobile bottom sheet.
|
|
485
|
+
* @param {boolean} isOpen True when the sheet should be visible.
|
|
486
|
+
*/
|
|
487
|
+
setBottomSheetVisualState(isOpen: boolean): void;
|
|
488
|
+
/**
|
|
489
|
+
* Gets the CSS height limit used for the mobile bottom sheet.
|
|
490
|
+
* @returns {string} The CSS max height.
|
|
491
|
+
*/
|
|
492
|
+
getSheetMaxHeight(): string;
|
|
493
|
+
/**
|
|
494
|
+
* Applies the configured bottom sheet opening height.
|
|
495
|
+
*/
|
|
496
|
+
setSheetHeight(): void;
|
|
497
|
+
/**
|
|
498
|
+
* Resolves the sheet minimum height in pixels.
|
|
499
|
+
* @returns {number} The minimum height.
|
|
500
|
+
*/
|
|
501
|
+
getSheetMinHeightInPixels(): number;
|
|
502
|
+
/**
|
|
503
|
+
* Resolves the sheet maximum height in pixels.
|
|
504
|
+
* @returns {number} The maximum height.
|
|
505
|
+
*/
|
|
506
|
+
getSheetMaxHeightInPixels(): number;
|
|
507
|
+
/**
|
|
508
|
+
* Returns available height for the bottom sheet scope.
|
|
509
|
+
* @returns {number} Pixel height that can be used inside the current sheet frame.
|
|
510
|
+
*/
|
|
511
|
+
getBottomSheetAvailableHeight(): number;
|
|
512
|
+
/**
|
|
513
|
+
* Resolves a CSS height value against the viewport.
|
|
514
|
+
* @param {string} value The configured sheet height.
|
|
515
|
+
* @param {number} fallback The fallback height in pixels.
|
|
516
|
+
* @returns {number} The resolved height.
|
|
517
|
+
*/
|
|
518
|
+
resolveCssHeight(value: string, fallback: number): number;
|
|
519
|
+
/**
|
|
520
|
+
* Clamps a number between min and max.
|
|
521
|
+
* @param {number} value The measured height.
|
|
522
|
+
* @param {number} min The minimum.
|
|
523
|
+
* @param {number} max The maximum.
|
|
524
|
+
* @returns {number} The clamped value.
|
|
525
|
+
*/
|
|
526
|
+
clamp(value: number, min: number, max: number): number;
|
|
527
|
+
/**
|
|
528
|
+
* Stops a handle interaction from dismissing the bottom sheet.
|
|
529
|
+
* @param {Event} e The interaction emitted by the resize handle.
|
|
530
|
+
*/
|
|
531
|
+
stopSheetHandleEvent: (e: Event) => void;
|
|
532
|
+
/**
|
|
533
|
+
* Checks whether an event came from the resize handle.
|
|
534
|
+
* @param {Event} e The event to check.
|
|
535
|
+
* @returns {boolean} True when the event belongs to the resize handle.
|
|
536
|
+
*/
|
|
537
|
+
isSheetHandleEvent(e: Event): boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Checks whether an event happened inside the visible bottom sheet.
|
|
540
|
+
* @param {Event} e The event to check.
|
|
541
|
+
* @returns {boolean} True when the event coordinates are inside the sheet.
|
|
542
|
+
*/
|
|
543
|
+
isEventInsideSheet(e: Event): boolean;
|
|
544
|
+
/**
|
|
545
|
+
* Prevents scroll events from reaching the page behind the bottom sheet.
|
|
546
|
+
* @param {Event} e The scroll event.
|
|
547
|
+
*/
|
|
548
|
+
preventBottomSheetScroll: (e: Event) => void;
|
|
549
|
+
/**
|
|
550
|
+
* Stores the initial drag state for the mobile bottom sheet.
|
|
551
|
+
* @param {number|string} pointerId The pointer identifier.
|
|
552
|
+
* @param {number} startY The starting Y coordinate.
|
|
553
|
+
*/
|
|
554
|
+
startSheetDrag(pointerId: number | string, startY: number): void;
|
|
555
|
+
animation: any;
|
|
556
|
+
nativeAnimation: any;
|
|
557
|
+
/**
|
|
558
|
+
* Applies a new height while the bottom sheet is being dragged.
|
|
559
|
+
* @param {number} clientY The current Y coordinate.
|
|
560
|
+
*/
|
|
561
|
+
updateSheetDrag(clientY: number): void;
|
|
562
|
+
/**
|
|
563
|
+
* Starts mobile bottom sheet resizing.
|
|
564
|
+
* @param {PointerEvent} e The pointer event.
|
|
565
|
+
*/
|
|
566
|
+
handleSheetDragStart: (e: PointerEvent) => void;
|
|
567
|
+
/**
|
|
568
|
+
* Starts mobile bottom sheet resizing from a touch event.
|
|
569
|
+
* @param {TouchEvent} e The touch event.
|
|
570
|
+
*/
|
|
571
|
+
handleSheetTouchStart: (e: TouchEvent) => void;
|
|
572
|
+
/**
|
|
573
|
+
* Starts tracking a possible backdrop dismiss tap.
|
|
574
|
+
* @param {PointerEvent} e The pointer event.
|
|
575
|
+
*/
|
|
576
|
+
handleBackdropPointerStart: (e: PointerEvent) => void;
|
|
577
|
+
/**
|
|
578
|
+
* Tracks movement during a possible backdrop dismiss tap.
|
|
579
|
+
* @param {PointerEvent} e The pointer event.
|
|
580
|
+
*/
|
|
581
|
+
handleBackdropPointerMove: (e: PointerEvent) => void;
|
|
582
|
+
/**
|
|
583
|
+
* Finishes a possible backdrop dismiss tap.
|
|
584
|
+
* @param {PointerEvent} e The pointer event.
|
|
585
|
+
*/
|
|
586
|
+
handleBackdropPointerEnd: (e: PointerEvent) => void;
|
|
587
|
+
/**
|
|
588
|
+
* Cancels a possible backdrop dismiss tap.
|
|
589
|
+
*/
|
|
590
|
+
handleBackdropPointerCancel: () => void;
|
|
591
|
+
/**
|
|
592
|
+
* Resizes the mobile bottom sheet during dragging.
|
|
593
|
+
* @param {PointerEvent} e The pointer event.
|
|
594
|
+
*/
|
|
595
|
+
handleSheetDragMove: (e: PointerEvent) => void;
|
|
596
|
+
/**
|
|
597
|
+
* Resizes the mobile bottom sheet during touch dragging.
|
|
598
|
+
* @param {TouchEvent} e The touch event.
|
|
599
|
+
*/
|
|
600
|
+
handleSheetTouchMove: (e: TouchEvent) => void;
|
|
601
|
+
/**
|
|
602
|
+
* Ends mobile bottom sheet resizing.
|
|
603
|
+
* @param {PointerEvent} e The pointer event.
|
|
604
|
+
*/
|
|
605
|
+
handleSheetDragEnd: (e: PointerEvent) => void;
|
|
606
|
+
/**
|
|
607
|
+
* Ends mobile bottom sheet resizing from a touch event.
|
|
608
|
+
* @param {TouchEvent} e The touch event.
|
|
609
|
+
*/
|
|
610
|
+
handleSheetTouchEnd: (e: TouchEvent) => void;
|
|
611
|
+
/**
|
|
612
|
+
* Cleans up mobile bottom sheet resizing listeners.
|
|
613
|
+
*/
|
|
614
|
+
endSheetDrag(): void;
|
|
216
615
|
/**
|
|
217
616
|
* Triggers the event based on the target element.
|
|
218
617
|
* If the target element is different from the last caller, it refreshes the children by calling the `open` method.
|
|
@@ -246,8 +645,12 @@ export default class SlidingContainer extends WJElement {
|
|
|
246
645
|
* @returns {Promise<void>} A promise that resolves when the transition animation is completed.
|
|
247
646
|
*/
|
|
248
647
|
doAnimateTransition(): Promise<void>;
|
|
249
|
-
|
|
250
|
-
|
|
648
|
+
/**
|
|
649
|
+
* Animates the mobile bottom sheet and its backdrop.
|
|
650
|
+
* @param {object} options Web Animation options.
|
|
651
|
+
* @returns {Promise<void>}
|
|
652
|
+
*/
|
|
653
|
+
doAnimateBottomSheetTransition(options: object): Promise<void>;
|
|
251
654
|
/**
|
|
252
655
|
* Opens the sliding container by performing necessary preparatory and transitional operations.
|
|
253
656
|
* @param {Event} e The event that triggered the open operation.
|
|
@@ -260,6 +663,10 @@ export default class SlidingContainer extends WJElement {
|
|
|
260
663
|
* @returns {Promise<void>} A promise that resolves when the closing operation, including animations and child element removal, is completed.
|
|
261
664
|
*/
|
|
262
665
|
close(e: Event): Promise<void>;
|
|
666
|
+
/**
|
|
667
|
+
* Forces the closed visual state for the mobile bottom sheet.
|
|
668
|
+
*/
|
|
669
|
+
setBottomSheetClosedState(): void;
|
|
263
670
|
/**
|
|
264
671
|
* Toggles the state between open and closed.
|
|
265
672
|
* @param {Event} e The event object triggering the toggle.
|
|
@@ -161,6 +161,17 @@ export default class ToolbarAction extends WJElement {
|
|
|
161
161
|
* @returns {HTMLElement}
|
|
162
162
|
*/
|
|
163
163
|
createMenuItem(action: HTMLElement): HTMLElement;
|
|
164
|
+
/**
|
|
165
|
+
* Clones action content for menu usage and normalizes button icon slots.
|
|
166
|
+
* @param {Node} node The source action child node.
|
|
167
|
+
* @returns {Node}
|
|
168
|
+
*/
|
|
169
|
+
cloneActionMenuNode(node: Node): Node;
|
|
170
|
+
/**
|
|
171
|
+
* Moves button-only icon slots to the menu item start slot.
|
|
172
|
+
* @param {Element} element The cloned action content node.
|
|
173
|
+
*/
|
|
174
|
+
normalizeActionMenuIconSlot(element: Element): void;
|
|
164
175
|
/**
|
|
165
176
|
* Resolves readable text for a toolbar action copied into an overflow menu.
|
|
166
177
|
* @param {HTMLElement} action The original action element.
|