wj-elements 0.6.0 → 0.7.0
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/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +1 -1
- package/dist/packages/wje-dropdown/dropdown.element.d.ts +18 -0
- package/dist/packages/wje-orgchart/orgchart.element.d.ts +15 -0
- package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +3 -1
- package/dist/packages/wje-popup/popup.element.d.ts +48 -1
- package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +360 -3
- package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +11 -0
- package/dist/{popup.element-C8-g3WLs.js → popup.element-CwXvVFK7.js} +275 -43
- package/dist/popup.element-CwXvVFK7.js.map +1 -0
- package/dist/styles.css +0 -38
- 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-dropdown.js +28 -4
- package/dist/wje-dropdown.js.map +1 -1
- package/dist/wje-master.js +1 -1
- package/dist/wje-orgchart-group.js +1 -1
- package/dist/wje-orgchart-item.js +13 -4
- package/dist/wje-orgchart-item.js.map +1 -1
- package/dist/wje-orgchart.js +27 -0
- package/dist/wje-orgchart.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 +865 -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 +2 -1
- package/dist/popup.element-C8-g3WLs.js.map +0 -1
|
@@ -7,7 +7,7 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
7
7
|
* @slot - The container for breadcrumb elements.
|
|
8
8
|
* @slot breakpoint-collapse-trigger - Custom trigger used when breakpoint-collapse="menu" moves the full trail into a dropdown.
|
|
9
9
|
* @csspart container - The component's container wrapper.
|
|
10
|
-
* @property {Array<{id: string|number, label: string, href?: string, icon?: string, disabled?: boolean, data?: any}>} items - Data-driven breadcrumb items.
|
|
10
|
+
* @property {Array<{id: string|number, label: string, href?: string, icon?: string, title?: string, disabled?: boolean, data?: any}>} items - Data-driven breadcrumb items.
|
|
11
11
|
* @attribute {number} max-items - The maximum number of visible breadcrumbs before collapsing.
|
|
12
12
|
* @attribute {number} items-before-collapse - The number of breadcrumbs to show before the collapsed indicator.
|
|
13
13
|
* @attribute {number} items-after-collapse - The number of breadcrumbs to show after the collapsed indicator.
|
|
@@ -7,10 +7,24 @@ import { default as Popup } from '../wje-popup/popup.element.js';
|
|
|
7
7
|
* @status stable
|
|
8
8
|
* @augments {WJElement}
|
|
9
9
|
* @csspart native - The native part of the dropdown.
|
|
10
|
+
* @csspart popup-native - The exported native popup panel part.
|
|
11
|
+
* @csspart backdrop - The exported mobile bottom sheet backdrop part.
|
|
10
12
|
* @slot trigger - The slot for the trigger of the dropdown.
|
|
11
13
|
* @slot - The default slot for the dropdown.
|
|
14
|
+
* @property {string} mobilePresentation - Enables a responsive presentation, currently "bottom-sheet".
|
|
15
|
+
* @property {string} mobileBreakPoint - Viewport width where the mobile presentation becomes active. Defaults to "768".
|
|
16
|
+
* @attribute {string} mobile-presentation - Enables a responsive presentation, currently "bottom-sheet".
|
|
17
|
+
* @attribute {string} mobile-break-point - Viewport width where the mobile presentation becomes active. Defaults to "768".
|
|
12
18
|
* // @fires wje-dropdown:open - Event fired when the dropdown is opened.
|
|
13
19
|
* // @fires wje-dropdown:close - Event fired when the dropdown is closed.
|
|
20
|
+
* @cssproperty [--wje-popup-backdrop-background=var(--wje-backdrop)] - Backdrop background used by mobile bottom sheet dropdowns.
|
|
21
|
+
* @cssproperty [--wje-popup-backdrop-opacity=1] - Backdrop opacity used by mobile bottom sheet dropdowns.
|
|
22
|
+
* @cssproperty [--wje-popup-mobile-background=var(--wje-select-options-background-color)] - Background of the mobile bottom sheet panel.
|
|
23
|
+
* @cssproperty [--wje-popup-mobile-border-radius=var(--wje-border-radius-large) var(--wje-border-radius-large) 0 0] - Border radius of the mobile bottom sheet panel.
|
|
24
|
+
* @cssproperty [--wje-popup-mobile-box-shadow=0 -8px 32px rgba(0, 0, 0, 0.16)] - Shadow of the mobile bottom sheet panel.
|
|
25
|
+
* @cssproperty [--wje-popup-mobile-max-height=90vh] - Maximum height of the mobile bottom sheet panel.
|
|
26
|
+
* @cssproperty [--wje-popup-mobile-transition-duration=250ms] - Transition duration for the mobile bottom sheet and backdrop.
|
|
27
|
+
* @cssproperty [--wje-popup-mobile-transition-easing=ease] - Transition easing for the mobile bottom sheet and backdrop.
|
|
14
28
|
* @tag wje-dropdown
|
|
15
29
|
*/
|
|
16
30
|
export default class Dropdown extends WJElement {
|
|
@@ -56,6 +70,10 @@ export default class Dropdown extends WJElement {
|
|
|
56
70
|
* @returns {string|string}
|
|
57
71
|
*/
|
|
58
72
|
get trigger(): string | string;
|
|
73
|
+
set mobilePresentation(value: string);
|
|
74
|
+
get mobilePresentation(): string;
|
|
75
|
+
set mobileBreakPoint(value: string);
|
|
76
|
+
get mobileBreakPoint(): string;
|
|
59
77
|
/**
|
|
60
78
|
* Callback function to handle other dropdowns being opened. Close the dropdown if it is not the target and collapse is enabled.
|
|
61
79
|
* @param {Event} e The event object.
|
|
@@ -17,6 +17,11 @@ export default class Orgchart extends WJElement {
|
|
|
17
17
|
* @returns {CSSStyleSheet}
|
|
18
18
|
*/
|
|
19
19
|
static get cssStyleSheet(): CSSStyleSheet;
|
|
20
|
+
/**
|
|
21
|
+
* Returns attributes that trigger a redraw when they change.
|
|
22
|
+
* @returns {Array<string>} Attribute names that require a new template render.
|
|
23
|
+
*/
|
|
24
|
+
static get observedAttributes(): Array<string>;
|
|
20
25
|
/**
|
|
21
26
|
* Sets whether the chart should omit its incoming connector spacing.
|
|
22
27
|
* @param {boolean} value True when the chart should render without top connector spacing.
|
|
@@ -33,6 +38,16 @@ export default class Orgchart extends WJElement {
|
|
|
33
38
|
*/
|
|
34
39
|
draw(): DocumentFragment;
|
|
35
40
|
native: HTMLDivElement;
|
|
41
|
+
defaultSlot: HTMLSlotElement;
|
|
42
|
+
/**
|
|
43
|
+
* Syncs flat chart state to direct slotted children.
|
|
44
|
+
*/
|
|
45
|
+
afterDraw(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Marks direct children that are rendered inside a flat chart.
|
|
48
|
+
*/
|
|
49
|
+
syncFlatChildren: () => void;
|
|
50
|
+
flatChildren: Set<Element>;
|
|
36
51
|
/**
|
|
37
52
|
* Sync ARIA attributes on host.
|
|
38
53
|
*/
|
|
@@ -11,6 +11,7 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
11
11
|
* @csspart - Styles the element.
|
|
12
12
|
* @csspart native - Styles the native element.
|
|
13
13
|
* @csspart expander - Styles the expander element.
|
|
14
|
+
* // @fires wje-orgchart-item:click - Emitted when the item card is clicked.
|
|
14
15
|
* @tag wje-orgchart-item
|
|
15
16
|
*/
|
|
16
17
|
export default class OrgchartItem extends WJElement {
|
|
@@ -52,14 +53,15 @@ export default class OrgchartItem extends WJElement {
|
|
|
52
53
|
*/
|
|
53
54
|
draw(): DocumentFragment;
|
|
54
55
|
expander: HTMLDivElement;
|
|
56
|
+
card: HTMLElement;
|
|
55
57
|
/**
|
|
56
58
|
* After Draws the component for the org chart item.
|
|
57
59
|
*/
|
|
58
60
|
afterDraw(): void;
|
|
61
|
+
handleItemClick: (e: any) => void;
|
|
59
62
|
/**
|
|
60
63
|
* Toggles the children of the orgchart item.
|
|
61
64
|
* @param e The event object.
|
|
62
65
|
*/
|
|
63
66
|
toggleChildren: (e: any) => void;
|
|
64
|
-
dispatchEvent(e: any): boolean;
|
|
65
67
|
}
|
|
@@ -6,12 +6,27 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
6
6
|
* @status stable
|
|
7
7
|
* @augments {WJElement}
|
|
8
8
|
* @csspart native - The native part of the popup.
|
|
9
|
+
* @csspart backdrop - The backdrop used by mobile bottom sheet presentation.
|
|
9
10
|
* @slot anchor - The slot for the anchor of the popup.
|
|
10
11
|
* @slot arrow - The slot for the arrow of the popup.
|
|
11
12
|
* @slot - The default slot for the popup.
|
|
13
|
+
* @property {boolean} contentAwareSize - Allows a size popup to grow to its content instead of locking to the anchor width.
|
|
14
|
+
* @property {string} mobilePresentation - Enables a responsive presentation, currently "bottom-sheet".
|
|
15
|
+
* @property {string} mobileBreakPoint - Viewport width where the mobile presentation becomes active. Defaults to "768".
|
|
16
|
+
* @attribute {string} mobile-presentation - Enables a responsive presentation, currently "bottom-sheet".
|
|
17
|
+
* @attribute {string} mobile-break-point - Viewport width where the mobile presentation becomes active. Defaults to "768".
|
|
12
18
|
* // @fires wje-popup:reposition - Event fired when the popup is repositioned.
|
|
13
19
|
* // @fires wje-popup:show - Event fired when the popup is shown.
|
|
14
20
|
* // @fires wje-popup:hide - Event fired when the popup is hidden.
|
|
21
|
+
* @cssproperty [--wje-popup-backdrop-background=var(--wje-backdrop)] - Backdrop background used by mobile bottom sheet popups.
|
|
22
|
+
* @cssproperty [--wje-popup-backdrop-opacity=1] - Backdrop opacity used by mobile bottom sheet popups.
|
|
23
|
+
* @cssproperty [--wje-popup-mobile-background=var(--wje-select-options-background-color)] - Background of the mobile bottom sheet panel.
|
|
24
|
+
* @cssproperty [--wje-popup-mobile-border-radius=var(--wje-border-radius-large) var(--wje-border-radius-large) 0 0] - Border radius of the mobile bottom sheet panel.
|
|
25
|
+
* @cssproperty [--wje-popup-mobile-box-shadow=0 -8px 32px rgba(0, 0, 0, 0.16)] - Shadow of the mobile bottom sheet panel.
|
|
26
|
+
* @cssproperty [--wje-popup-mobile-max-height=90vh] - Maximum height of the mobile bottom sheet panel.
|
|
27
|
+
* @cssproperty [--wje-popup-mobile-transition-duration=250ms] - Transition duration for the mobile bottom sheet and backdrop.
|
|
28
|
+
* @cssproperty [--wje-popup-mobile-transition-easing=ease] - Transition easing for the mobile bottom sheet and backdrop.
|
|
29
|
+
* @cssproperty [--wje-popup-loader-inset=0] - Inset used by the popup loader overlay.
|
|
15
30
|
* @tag wje-popup
|
|
16
31
|
*/
|
|
17
32
|
export default class Popup extends WJElement {
|
|
@@ -28,8 +43,13 @@ export default class Popup extends WJElement {
|
|
|
28
43
|
*/
|
|
29
44
|
static get observedAttributes(): Array<string>;
|
|
30
45
|
_manual: boolean;
|
|
46
|
+
_contentAwareSize: boolean;
|
|
47
|
+
_contentReadyHandler: () => void;
|
|
48
|
+
_bottomSheetRestoreTimeout: any;
|
|
31
49
|
set loader(value: boolean);
|
|
32
50
|
get loader(): boolean;
|
|
51
|
+
set contentAwareSize(value: boolean);
|
|
52
|
+
get contentAwareSize(): boolean;
|
|
33
53
|
/**
|
|
34
54
|
* Sets the manual property of the popup.
|
|
35
55
|
* @param {boolean} value The value to set.
|
|
@@ -52,7 +72,20 @@ export default class Popup extends WJElement {
|
|
|
52
72
|
* @returns {boolean} True if the 'portal' attribute exists, otherwise false.
|
|
53
73
|
*/
|
|
54
74
|
get portal(): boolean;
|
|
75
|
+
set mobilePresentation(value: string);
|
|
76
|
+
get mobilePresentation(): string;
|
|
77
|
+
set mobileBreakPoint(value: string);
|
|
78
|
+
get mobileBreakPoint(): string;
|
|
55
79
|
get floatingEl(): HTMLDivElement;
|
|
80
|
+
get backdropEl(): HTMLDivElement;
|
|
81
|
+
_hideFloatingLightDomContentBeforeRender(): void;
|
|
82
|
+
_hiddenFloatingLightDomContent: {
|
|
83
|
+
el: Element;
|
|
84
|
+
display: any;
|
|
85
|
+
priority: any;
|
|
86
|
+
}[];
|
|
87
|
+
_restoreFloatingLightDomContentAfterRender(): void;
|
|
88
|
+
_contentReadyListenerAttached: boolean;
|
|
56
89
|
beforeDraw(context: any, store: any, params: any): void;
|
|
57
90
|
/**
|
|
58
91
|
* Draws the component for the popup.
|
|
@@ -61,6 +94,8 @@ export default class Popup extends WJElement {
|
|
|
61
94
|
draw(): DocumentFragment;
|
|
62
95
|
slotAnchor: HTMLSlotElement;
|
|
63
96
|
slotArrow: HTMLSlotElement;
|
|
97
|
+
defaultSlot: HTMLSlotElement;
|
|
98
|
+
backdrop: HTMLDivElement;
|
|
64
99
|
native: HTMLDivElement;
|
|
65
100
|
loaderEl: HTMLDivElement;
|
|
66
101
|
/**
|
|
@@ -75,6 +110,16 @@ export default class Popup extends WJElement {
|
|
|
75
110
|
anchorEl: any;
|
|
76
111
|
manualCallback: (e: any) => void;
|
|
77
112
|
clickHandler: (e: any) => void;
|
|
113
|
+
handleBackdropClick: (e: any) => void;
|
|
114
|
+
clearBottomSheetRestoreTimeout(): void;
|
|
115
|
+
handleViewportResize: () => void;
|
|
116
|
+
isBottomSheetActive(): boolean;
|
|
117
|
+
setBottomSheetState(isActive: any): void;
|
|
118
|
+
clearBottomSheetState(): void;
|
|
119
|
+
rebindPortaledRouter(): void;
|
|
120
|
+
syncResponsivePresentation(): void;
|
|
121
|
+
cleanup: any;
|
|
122
|
+
getBottomSheetTransitionDurationMs(): number;
|
|
78
123
|
/**
|
|
79
124
|
* Toggles the active attribute of the popup.
|
|
80
125
|
*/
|
|
@@ -94,6 +139,7 @@ export default class Popup extends WJElement {
|
|
|
94
139
|
* @returns {void} Does not return a value.
|
|
95
140
|
*/
|
|
96
141
|
_mountContentToPortal(): void;
|
|
142
|
+
_portalBackdrop: HTMLDivElement;
|
|
97
143
|
_portalNative: HTMLDivElement;
|
|
98
144
|
_portalSlot: HTMLSlotElement;
|
|
99
145
|
_portalArrowSlot: HTMLSlotElement;
|
|
@@ -130,7 +176,6 @@ export default class Popup extends WJElement {
|
|
|
130
176
|
* @returns {void} Does not return any value.
|
|
131
177
|
*/
|
|
132
178
|
show(dispatchEvent?: boolean): void;
|
|
133
|
-
cleanup: any;
|
|
134
179
|
/**
|
|
135
180
|
* Hides the popup.
|
|
136
181
|
* Removes the popup-active class from the floating element.
|
|
@@ -141,5 +186,7 @@ export default class Popup extends WJElement {
|
|
|
141
186
|
* Removes the active attribute when the popup is hidden.
|
|
142
187
|
*/
|
|
143
188
|
handleHide: () => void;
|
|
189
|
+
_showLoader(): void;
|
|
190
|
+
_hideLoader(): void;
|
|
144
191
|
markContentReady(): void;
|
|
145
192
|
}
|
|
@@ -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,34 @@ 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 is scoped to the container or viewport.
|
|
28
|
+
* @property {string} sheetBoundary - CSS selector for the composed ancestor that bounds the mobile bottom sheet.
|
|
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 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.
|
|
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-backdrop-background=var(--wje-backdrop)] - Background of the mobile bottom sheet backdrop.
|
|
43
|
+
* @cssproperty [--wje-sliding-container-backdrop-opacity=1] - Backdrop opacity while the mobile bottom sheet is open.
|
|
44
|
+
* @cssproperty [--wje-sliding-container-box-shadow=var(--wje-sliding-container-shadow)] - Shadow of the mobile bottom sheet panel.
|
|
45
|
+
* @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.
|
|
46
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-area-height=24px] - Height of the resize handle hit area.
|
|
47
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-width=36px] - Width of the visible resize handle.
|
|
48
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-height=2px] - Height of the visible resize handle.
|
|
49
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-background=var(--wje-border-color)] - Background of the visible resize handle.
|
|
50
|
+
* @cssproperty [--wje-sliding-container-sheet-handle-radius=999px] - Border radius of the visible resize handle.
|
|
19
51
|
* @tag wje-sliding-container
|
|
20
52
|
* @example
|
|
21
53
|
* <wje-sliding-container trigger="test-resize-container-event-right" id="left-in-place" direction="left" max-width="100px" max-height="100%">
|
|
@@ -44,6 +76,31 @@ export default class SlidingContainer extends WJElement {
|
|
|
44
76
|
static get cssStyleSheet(): CSSStyleSheet;
|
|
45
77
|
_isOpen: boolean;
|
|
46
78
|
_lastCaller: EventTarget;
|
|
79
|
+
_sheetDrag: {
|
|
80
|
+
pointerId: string | number;
|
|
81
|
+
startY: number;
|
|
82
|
+
startHeight: number;
|
|
83
|
+
minHeight: number;
|
|
84
|
+
maxHeight: number;
|
|
85
|
+
hasMoved: boolean;
|
|
86
|
+
};
|
|
87
|
+
_sheetIgnoreDismissUntil: number;
|
|
88
|
+
_sheetBackdropGesture: {
|
|
89
|
+
pointerId: number;
|
|
90
|
+
startX: number;
|
|
91
|
+
startY: number;
|
|
92
|
+
hasMoved: boolean;
|
|
93
|
+
};
|
|
94
|
+
_sheetBackdropHandledUntil: number;
|
|
95
|
+
_hasLockedDocumentScroll: boolean;
|
|
96
|
+
_bottomSheetScopeFrame: {
|
|
97
|
+
top: number;
|
|
98
|
+
left: number;
|
|
99
|
+
right: number;
|
|
100
|
+
bottom: number;
|
|
101
|
+
width: number;
|
|
102
|
+
height: number;
|
|
103
|
+
};
|
|
47
104
|
_resizeObserver: ResizeObserver;
|
|
48
105
|
/**
|
|
49
106
|
* Sets the 'variant' attribute to the specified value.
|
|
@@ -122,6 +179,26 @@ export default class SlidingContainer extends WJElement {
|
|
|
122
179
|
* @returns {string} The value of the 'screen-break-point' attribute.
|
|
123
180
|
*/
|
|
124
181
|
get screenBreakPoint(): string;
|
|
182
|
+
/**
|
|
183
|
+
* Sets mobile presentation mode.
|
|
184
|
+
* @param {string} value The mobile presentation mode.
|
|
185
|
+
*/
|
|
186
|
+
set mobilePresentation(value: string);
|
|
187
|
+
/**
|
|
188
|
+
* Gets mobile presentation mode.
|
|
189
|
+
* @returns {string|null} The mobile presentation mode.
|
|
190
|
+
*/
|
|
191
|
+
get mobilePresentation(): string | null;
|
|
192
|
+
/**
|
|
193
|
+
* Sets the breakpoint for mobile presentation.
|
|
194
|
+
* @param {string} value The mobile breakpoint.
|
|
195
|
+
*/
|
|
196
|
+
set mobileBreakPoint(value: string);
|
|
197
|
+
/**
|
|
198
|
+
* Gets the breakpoint for mobile presentation.
|
|
199
|
+
* @returns {string} The mobile breakpoint.
|
|
200
|
+
*/
|
|
201
|
+
get mobileBreakPoint(): string;
|
|
125
202
|
/**
|
|
126
203
|
* Sets the duration of the animation by updating the `animation-duration` attribute.
|
|
127
204
|
* @param {string} value The duration value for the animation, specified in a format
|
|
@@ -149,6 +226,71 @@ export default class SlidingContainer extends WJElement {
|
|
|
149
226
|
* @returns {boolean} True if the element has the 'has-opacity' attribute, otherwise false.
|
|
150
227
|
*/
|
|
151
228
|
get hasOpacity(): boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Determines if the bottom sheet should close when the backdrop is clicked.
|
|
231
|
+
* @returns {boolean} True if backdrop dismiss is enabled.
|
|
232
|
+
*/
|
|
233
|
+
get backdropDismiss(): boolean;
|
|
234
|
+
/**
|
|
235
|
+
* Sets resizing for the mobile bottom sheet.
|
|
236
|
+
* @param {boolean|string} value The value to set.
|
|
237
|
+
*/
|
|
238
|
+
set sheetResizable(value: boolean | string);
|
|
239
|
+
/**
|
|
240
|
+
* Enables resizing for the mobile bottom sheet.
|
|
241
|
+
* @returns {boolean} True if the sheet can be resized.
|
|
242
|
+
*/
|
|
243
|
+
get sheetResizable(): boolean;
|
|
244
|
+
/**
|
|
245
|
+
* Sets the mobile bottom sheet scope.
|
|
246
|
+
* @param {string} value The new boundary mode for the mobile sheet.
|
|
247
|
+
*/
|
|
248
|
+
set sheetScope(value: string);
|
|
249
|
+
/**
|
|
250
|
+
* Gets the mobile bottom sheet scope.
|
|
251
|
+
* @returns {string} Either 'viewport', 'container', or 'parent'.
|
|
252
|
+
*/
|
|
253
|
+
get sheetScope(): string;
|
|
254
|
+
/**
|
|
255
|
+
* Sets the selector used for container-scoped mobile bottom sheets.
|
|
256
|
+
* @param {string} value Selector for the boundary element.
|
|
257
|
+
*/
|
|
258
|
+
set sheetBoundary(value: string);
|
|
259
|
+
/**
|
|
260
|
+
* Gets the selector used for container-scoped mobile bottom sheets.
|
|
261
|
+
* @returns {string|null} A CSS selector used to find the composed boundary ancestor.
|
|
262
|
+
*/
|
|
263
|
+
get sheetBoundary(): string | null;
|
|
264
|
+
/**
|
|
265
|
+
* Sets the mobile bottom sheet opening height.
|
|
266
|
+
* @param {string} value The opening height.
|
|
267
|
+
*/
|
|
268
|
+
set sheetHeight(value: string);
|
|
269
|
+
/**
|
|
270
|
+
* Gets the mobile bottom sheet opening height.
|
|
271
|
+
* @returns {string|null} The opening height.
|
|
272
|
+
*/
|
|
273
|
+
get sheetHeight(): string | null;
|
|
274
|
+
/**
|
|
275
|
+
* Sets the minimum mobile bottom sheet height while resizing.
|
|
276
|
+
* @param {string} value The minimum height.
|
|
277
|
+
*/
|
|
278
|
+
set sheetMinHeight(value: string);
|
|
279
|
+
/**
|
|
280
|
+
* Gets the minimum mobile bottom sheet height while resizing.
|
|
281
|
+
* @returns {string|null} The minimum height.
|
|
282
|
+
*/
|
|
283
|
+
get sheetMinHeight(): string | null;
|
|
284
|
+
/**
|
|
285
|
+
* Sets the maximum mobile bottom sheet height while resizing.
|
|
286
|
+
* @param {string} value The maximum height.
|
|
287
|
+
*/
|
|
288
|
+
set sheetMaxHeight(value: string);
|
|
289
|
+
/**
|
|
290
|
+
* Gets the maximum mobile bottom sheet height while resizing.
|
|
291
|
+
* @returns {string|null} The maximum height.
|
|
292
|
+
*/
|
|
293
|
+
get sheetMaxHeight(): string | null;
|
|
152
294
|
/**
|
|
153
295
|
* Sets the value of the 'add-to-height' attribute.
|
|
154
296
|
* This attribute is used to modify or adjust the height dynamically.
|
|
@@ -178,9 +320,12 @@ export default class SlidingContainer extends WJElement {
|
|
|
178
320
|
* @returns {DocumentFragment}
|
|
179
321
|
*/
|
|
180
322
|
draw(context: object, store: object, params: object): DocumentFragment;
|
|
323
|
+
sheetHandleArea: HTMLDivElement;
|
|
324
|
+
backdropElement: HTMLDivElement;
|
|
181
325
|
transparentDiv: HTMLDivElement;
|
|
182
326
|
wrapperDiv: HTMLDivElement;
|
|
183
327
|
nativeElement: HTMLDivElement;
|
|
328
|
+
nativeInner: HTMLDivElement;
|
|
184
329
|
/**
|
|
185
330
|
* Performs actions after the element is drawn on the screen.
|
|
186
331
|
* Attaches an event listener to the document based on the specified trigger.
|
|
@@ -188,6 +333,11 @@ export default class SlidingContainer extends WJElement {
|
|
|
188
333
|
* Calls the checkForVariant method with the current variant.
|
|
189
334
|
*/
|
|
190
335
|
afterDraw(): void;
|
|
336
|
+
/**
|
|
337
|
+
* Returns whether the mobile bottom sheet presentation is active.
|
|
338
|
+
* @returns {boolean}
|
|
339
|
+
*/
|
|
340
|
+
isBottomSheet(): boolean;
|
|
191
341
|
/**
|
|
192
342
|
* Sync ARIA attributes on host.
|
|
193
343
|
*/
|
|
@@ -198,12 +348,63 @@ export default class SlidingContainer extends WJElement {
|
|
|
198
348
|
* @returns {HTMLElement} The close button element configured with styles, an icon, and event listener.
|
|
199
349
|
*/
|
|
200
350
|
htmlCloseButton(): HTMLElement;
|
|
351
|
+
/**
|
|
352
|
+
* Creates the mobile bottom sheet resize handle.
|
|
353
|
+
* @returns {HTMLElement} The resize handle element.
|
|
354
|
+
*/
|
|
355
|
+
htmlSheetHandle(): HTMLElement;
|
|
201
356
|
/**
|
|
202
357
|
* Retrieves the parent element of the current element.
|
|
203
358
|
* If the parent element is not found, it attempts to find the root host element.
|
|
204
359
|
* @returns {Element|null} The parent element or the root host element if no parent exists. Returns null if neither is found.
|
|
205
360
|
*/
|
|
206
361
|
getParentElement(): Element | null;
|
|
362
|
+
/**
|
|
363
|
+
* Finds the closest element across shadow DOM boundaries.
|
|
364
|
+
* @param {string} selector The selector to match.
|
|
365
|
+
* @returns {Element|null} The matched composed ancestor.
|
|
366
|
+
*/
|
|
367
|
+
getClosestComposedElement(selector: string): Element | null;
|
|
368
|
+
/**
|
|
369
|
+
* Returns the viewport frame.
|
|
370
|
+
* @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}
|
|
371
|
+
*/
|
|
372
|
+
getViewportFrame(): {
|
|
373
|
+
top: number;
|
|
374
|
+
left: number;
|
|
375
|
+
right: number;
|
|
376
|
+
bottom: number;
|
|
377
|
+
width: number;
|
|
378
|
+
height: number;
|
|
379
|
+
};
|
|
380
|
+
/**
|
|
381
|
+
* Returns the element that bounds the mobile bottom sheet.
|
|
382
|
+
* @returns {Element|null} The scope element, or null for viewport scope.
|
|
383
|
+
*/
|
|
384
|
+
getBottomSheetScopeElement(): Element | null;
|
|
385
|
+
/**
|
|
386
|
+
* Returns the frame used by the mobile bottom sheet.
|
|
387
|
+
* @returns {{top: number, left: number, right: number, bottom: number, width: number, height: number}}
|
|
388
|
+
*/
|
|
389
|
+
getBottomSheetScopeFrame(): {
|
|
390
|
+
top: number;
|
|
391
|
+
left: number;
|
|
392
|
+
right: number;
|
|
393
|
+
bottom: number;
|
|
394
|
+
width: number;
|
|
395
|
+
height: number;
|
|
396
|
+
};
|
|
397
|
+
/**
|
|
398
|
+
* Applies a fixed frame to a bottom sheet layer.
|
|
399
|
+
* @param {HTMLElement|SlidingContainer} element The element to update.
|
|
400
|
+
* @param {object} frame The frame to apply.
|
|
401
|
+
*/
|
|
402
|
+
setBottomSheetLayerFrame(element: HTMLElement | SlidingContainer, frame: object): void;
|
|
403
|
+
/**
|
|
404
|
+
* Removes fixed frame styles from a bottom sheet layer.
|
|
405
|
+
* @param {HTMLElement|SlidingContainer} element The element to reset.
|
|
406
|
+
*/
|
|
407
|
+
resetBottomSheetLayerFrame(element: HTMLElement | SlidingContainer): void;
|
|
207
408
|
/**
|
|
208
409
|
* Adjusts the position and dimensions of the current element based on the specified variant.
|
|
209
410
|
*
|
|
@@ -213,6 +414,154 @@ export default class SlidingContainer extends WJElement {
|
|
|
213
414
|
* @returns {void} No value is returned, the method modifies the element's style properties directly.
|
|
214
415
|
*/
|
|
215
416
|
checkForVariant(variant: string): void;
|
|
417
|
+
/**
|
|
418
|
+
* Applies the mobile bottom sheet layout.
|
|
419
|
+
*/
|
|
420
|
+
setBottomSheetVariant(): void;
|
|
421
|
+
/**
|
|
422
|
+
* Removes layout styles managed by the mobile bottom sheet mode.
|
|
423
|
+
*/
|
|
424
|
+
resetBottomSheetVariant(): void;
|
|
425
|
+
/**
|
|
426
|
+
* Applies the current visual open or closed state to the mobile bottom sheet.
|
|
427
|
+
* @param {boolean} isOpen True when the sheet should be visible.
|
|
428
|
+
*/
|
|
429
|
+
setBottomSheetVisualState(isOpen: boolean): void;
|
|
430
|
+
/**
|
|
431
|
+
* Gets the CSS height limit used for the mobile bottom sheet.
|
|
432
|
+
* @returns {string} The CSS max height.
|
|
433
|
+
*/
|
|
434
|
+
getSheetMaxHeight(): string;
|
|
435
|
+
/**
|
|
436
|
+
* Applies the configured bottom sheet opening height.
|
|
437
|
+
*/
|
|
438
|
+
setSheetHeight(): void;
|
|
439
|
+
/**
|
|
440
|
+
* Resolves the sheet minimum height in pixels.
|
|
441
|
+
* @returns {number} The minimum height.
|
|
442
|
+
*/
|
|
443
|
+
getSheetMinHeightInPixels(): number;
|
|
444
|
+
/**
|
|
445
|
+
* Resolves the sheet maximum height in pixels.
|
|
446
|
+
* @returns {number} The maximum height.
|
|
447
|
+
*/
|
|
448
|
+
getSheetMaxHeightInPixels(): number;
|
|
449
|
+
/**
|
|
450
|
+
* Returns available height for the bottom sheet scope.
|
|
451
|
+
* @returns {number} Pixel height that can be used inside the current sheet frame.
|
|
452
|
+
*/
|
|
453
|
+
getBottomSheetAvailableHeight(): number;
|
|
454
|
+
/**
|
|
455
|
+
* Resolves a CSS height value against the viewport.
|
|
456
|
+
* @param {string} value The configured sheet height.
|
|
457
|
+
* @param {number} fallback The fallback height in pixels.
|
|
458
|
+
* @returns {number} The resolved height.
|
|
459
|
+
*/
|
|
460
|
+
resolveCssHeight(value: string, fallback: number): number;
|
|
461
|
+
/**
|
|
462
|
+
* Clamps a number between min and max.
|
|
463
|
+
* @param {number} value The measured height.
|
|
464
|
+
* @param {number} min The minimum.
|
|
465
|
+
* @param {number} max The maximum.
|
|
466
|
+
* @returns {number} The clamped value.
|
|
467
|
+
*/
|
|
468
|
+
clamp(value: number, min: number, max: number): number;
|
|
469
|
+
/**
|
|
470
|
+
* Stops a handle interaction from dismissing the bottom sheet.
|
|
471
|
+
* @param {Event} e The interaction emitted by the resize handle.
|
|
472
|
+
*/
|
|
473
|
+
stopSheetHandleEvent: (e: Event) => void;
|
|
474
|
+
/**
|
|
475
|
+
* Checks whether an event came from the resize handle.
|
|
476
|
+
* @param {Event} e The event to check.
|
|
477
|
+
* @returns {boolean} True when the event belongs to the resize handle.
|
|
478
|
+
*/
|
|
479
|
+
isSheetHandleEvent(e: Event): boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Checks whether an event happened inside the visible bottom sheet.
|
|
482
|
+
* @param {Event} e The event to check.
|
|
483
|
+
* @returns {boolean} True when the event coordinates are inside the sheet.
|
|
484
|
+
*/
|
|
485
|
+
isEventInsideSheet(e: Event): boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Prevents scroll events from reaching the page behind the bottom sheet.
|
|
488
|
+
* @param {Event} e The scroll event.
|
|
489
|
+
*/
|
|
490
|
+
preventBottomSheetScroll: (e: Event) => void;
|
|
491
|
+
/**
|
|
492
|
+
* Prevents the page behind the mobile bottom sheet from scrolling.
|
|
493
|
+
*/
|
|
494
|
+
lockDocumentScroll(): void;
|
|
495
|
+
/**
|
|
496
|
+
* Restores page scrolling after the mobile bottom sheet is closed.
|
|
497
|
+
*/
|
|
498
|
+
unlockDocumentScroll(): void;
|
|
499
|
+
/**
|
|
500
|
+
* Stores the initial drag state for the mobile bottom sheet.
|
|
501
|
+
* @param {number|string} pointerId The pointer identifier.
|
|
502
|
+
* @param {number} startY The starting Y coordinate.
|
|
503
|
+
*/
|
|
504
|
+
startSheetDrag(pointerId: number | string, startY: number): void;
|
|
505
|
+
animation: any;
|
|
506
|
+
nativeAnimation: any;
|
|
507
|
+
/**
|
|
508
|
+
* Applies a new height while the bottom sheet is being dragged.
|
|
509
|
+
* @param {number} clientY The current Y coordinate.
|
|
510
|
+
*/
|
|
511
|
+
updateSheetDrag(clientY: number): void;
|
|
512
|
+
/**
|
|
513
|
+
* Starts mobile bottom sheet resizing.
|
|
514
|
+
* @param {PointerEvent} e The pointer event.
|
|
515
|
+
*/
|
|
516
|
+
handleSheetDragStart: (e: PointerEvent) => void;
|
|
517
|
+
/**
|
|
518
|
+
* Starts mobile bottom sheet resizing from a touch event.
|
|
519
|
+
* @param {TouchEvent} e The touch event.
|
|
520
|
+
*/
|
|
521
|
+
handleSheetTouchStart: (e: TouchEvent) => void;
|
|
522
|
+
/**
|
|
523
|
+
* Starts tracking a possible backdrop dismiss tap.
|
|
524
|
+
* @param {PointerEvent} e The pointer event.
|
|
525
|
+
*/
|
|
526
|
+
handleBackdropPointerStart: (e: PointerEvent) => void;
|
|
527
|
+
/**
|
|
528
|
+
* Tracks movement during a possible backdrop dismiss tap.
|
|
529
|
+
* @param {PointerEvent} e The pointer event.
|
|
530
|
+
*/
|
|
531
|
+
handleBackdropPointerMove: (e: PointerEvent) => void;
|
|
532
|
+
/**
|
|
533
|
+
* Finishes a possible backdrop dismiss tap.
|
|
534
|
+
* @param {PointerEvent} e The pointer event.
|
|
535
|
+
*/
|
|
536
|
+
handleBackdropPointerEnd: (e: PointerEvent) => void;
|
|
537
|
+
/**
|
|
538
|
+
* Cancels a possible backdrop dismiss tap.
|
|
539
|
+
*/
|
|
540
|
+
handleBackdropPointerCancel: () => void;
|
|
541
|
+
/**
|
|
542
|
+
* Resizes the mobile bottom sheet during dragging.
|
|
543
|
+
* @param {PointerEvent} e The pointer event.
|
|
544
|
+
*/
|
|
545
|
+
handleSheetDragMove: (e: PointerEvent) => void;
|
|
546
|
+
/**
|
|
547
|
+
* Resizes the mobile bottom sheet during touch dragging.
|
|
548
|
+
* @param {TouchEvent} e The touch event.
|
|
549
|
+
*/
|
|
550
|
+
handleSheetTouchMove: (e: TouchEvent) => void;
|
|
551
|
+
/**
|
|
552
|
+
* Ends mobile bottom sheet resizing.
|
|
553
|
+
* @param {PointerEvent} e The pointer event.
|
|
554
|
+
*/
|
|
555
|
+
handleSheetDragEnd: (e: PointerEvent) => void;
|
|
556
|
+
/**
|
|
557
|
+
* Ends mobile bottom sheet resizing from a touch event.
|
|
558
|
+
* @param {TouchEvent} e The touch event.
|
|
559
|
+
*/
|
|
560
|
+
handleSheetTouchEnd: (e: TouchEvent) => void;
|
|
561
|
+
/**
|
|
562
|
+
* Cleans up mobile bottom sheet resizing listeners.
|
|
563
|
+
*/
|
|
564
|
+
endSheetDrag(): void;
|
|
216
565
|
/**
|
|
217
566
|
* Triggers the event based on the target element.
|
|
218
567
|
* If the target element is different from the last caller, it refreshes the children by calling the `open` method.
|
|
@@ -246,8 +595,12 @@ export default class SlidingContainer extends WJElement {
|
|
|
246
595
|
* @returns {Promise<void>} A promise that resolves when the transition animation is completed.
|
|
247
596
|
*/
|
|
248
597
|
doAnimateTransition(): Promise<void>;
|
|
249
|
-
|
|
250
|
-
|
|
598
|
+
/**
|
|
599
|
+
* Animates the mobile bottom sheet and its backdrop.
|
|
600
|
+
* @param {object} options Web Animation options.
|
|
601
|
+
* @returns {Promise<void>}
|
|
602
|
+
*/
|
|
603
|
+
doAnimateBottomSheetTransition(options: object): Promise<void>;
|
|
251
604
|
/**
|
|
252
605
|
* Opens the sliding container by performing necessary preparatory and transitional operations.
|
|
253
606
|
* @param {Event} e The event that triggered the open operation.
|
|
@@ -260,6 +613,10 @@ export default class SlidingContainer extends WJElement {
|
|
|
260
613
|
* @returns {Promise<void>} A promise that resolves when the closing operation, including animations and child element removal, is completed.
|
|
261
614
|
*/
|
|
262
615
|
close(e: Event): Promise<void>;
|
|
616
|
+
/**
|
|
617
|
+
* Forces the closed visual state for the mobile bottom sheet.
|
|
618
|
+
*/
|
|
619
|
+
setBottomSheetClosedState(): void;
|
|
263
620
|
/**
|
|
264
621
|
* Toggles the state between open and closed.
|
|
265
622
|
* @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.
|