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
package/dist/light.css
CHANGED
|
@@ -6,6 +6,10 @@ export const enGb: {
|
|
|
6
6
|
'wj.file.upload.button': string;
|
|
7
7
|
'wj.file.upload.uploaded': string;
|
|
8
8
|
'wj.file.upload.from': string;
|
|
9
|
+
'wj.file.upload.error.invalid.type': string;
|
|
10
|
+
'wj.file.upload.error.file.too.large': string;
|
|
11
|
+
'wj.file.upload.error.max.files': string;
|
|
12
|
+
'wj.file.upload.error.generic': string;
|
|
9
13
|
'wj.stepper.button.next': string;
|
|
10
14
|
'wj.stepper.button.finish': string;
|
|
11
15
|
'wj.stepper.button.previous': string;
|
|
@@ -6,6 +6,10 @@ export const skSk: {
|
|
|
6
6
|
'wj.file.upload.button': string;
|
|
7
7
|
'wj.file.upload.uploaded': string;
|
|
8
8
|
'wj.file.upload.from': string;
|
|
9
|
+
'wj.file.upload.error.invalid.type': string;
|
|
10
|
+
'wj.file.upload.error.file.too.large': string;
|
|
11
|
+
'wj.file.upload.error.max.files': string;
|
|
12
|
+
'wj.file.upload.error.generic': string;
|
|
9
13
|
'wj.stepper.button.next': string;
|
|
10
14
|
'wj.stepper.button.finish': string;
|
|
11
15
|
'wj.stepper.button.previous': string;
|
|
@@ -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.
|
|
@@ -6,7 +6,9 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
6
6
|
* @documentation https://elements.webjet.sk/components/chip
|
|
7
7
|
* @status stable
|
|
8
8
|
* @augments WJElement
|
|
9
|
+
* @slot start - The chip leading content.
|
|
9
10
|
* @slot - The chip main content.
|
|
11
|
+
* @slot end - The chip trailing content.
|
|
10
12
|
* @csspart native - The component's native wrapper.
|
|
11
13
|
* //@fires wje-chip:remove - Dispatched when the chip is removed;
|
|
12
14
|
*/
|
|
@@ -70,6 +72,7 @@ export default class Chip extends WJElement {
|
|
|
70
72
|
*/
|
|
71
73
|
draw(): DocumentFragment;
|
|
72
74
|
removeElement: HTMLElement;
|
|
75
|
+
slotStart: HTMLSlotElement;
|
|
73
76
|
slotEnd: HTMLSlotElement;
|
|
74
77
|
/**
|
|
75
78
|
* Syncs ARIA attributes on the host element.
|
|
@@ -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.
|
|
@@ -153,6 +153,7 @@ export default class FileUpload extends WJElement {
|
|
|
153
153
|
native: HTMLDivElement;
|
|
154
154
|
fileList: HTMLSlotElement;
|
|
155
155
|
fileInput: HTMLInputElement;
|
|
156
|
+
errorMessage: HTMLDivElement;
|
|
156
157
|
/**
|
|
157
158
|
* Method to perform actions after the component is drawn.
|
|
158
159
|
*/
|
|
@@ -211,4 +212,19 @@ export default class FileUpload extends WJElement {
|
|
|
211
212
|
* Method to reset the form state.
|
|
212
213
|
*/
|
|
213
214
|
resetFormState(): void;
|
|
215
|
+
/**
|
|
216
|
+
* Shows a user-facing validation error inside the dropzone.
|
|
217
|
+
* @param {object|Error} error Error payload to display inside the dropzone.
|
|
218
|
+
*/
|
|
219
|
+
showError(error: object | Error): void;
|
|
220
|
+
/**
|
|
221
|
+
* Clears the currently displayed validation error.
|
|
222
|
+
*/
|
|
223
|
+
clearError(): void;
|
|
224
|
+
/**
|
|
225
|
+
* Resolves a readable upload error message.
|
|
226
|
+
* @param {object|Error} error Error payload used to resolve the translated message.
|
|
227
|
+
* @returns {string}
|
|
228
|
+
*/
|
|
229
|
+
getErrorMessage(error?: object | Error): string;
|
|
214
230
|
}
|
|
@@ -12,6 +12,7 @@ import { default as WJElement } from '../wje-element/element.js';
|
|
|
12
12
|
* @cssproperty [--wje-header-border-style=solid] - The border styles of the header
|
|
13
13
|
* @cssproperty [--wje-header-top=0] - The position top of the header
|
|
14
14
|
* @cssproperty [--wje-header-height=60px] - The height of the header element.
|
|
15
|
+
* @cssproperty [--wje-header-z-index=100] - The z-index used when the header is sticky.
|
|
15
16
|
* @tag wje-header
|
|
16
17
|
*/
|
|
17
18
|
export default class Header extends WJElement {
|
|
@@ -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,12 @@ 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;
|
|
56
81
|
_hideFloatingLightDomContentBeforeRender(): void;
|
|
57
82
|
_hiddenFloatingLightDomContent: {
|
|
58
83
|
el: Element;
|
|
@@ -60,6 +85,7 @@ export default class Popup extends WJElement {
|
|
|
60
85
|
priority: any;
|
|
61
86
|
}[];
|
|
62
87
|
_restoreFloatingLightDomContentAfterRender(): void;
|
|
88
|
+
_contentReadyListenerAttached: boolean;
|
|
63
89
|
beforeDraw(context: any, store: any, params: any): void;
|
|
64
90
|
/**
|
|
65
91
|
* Draws the component for the popup.
|
|
@@ -68,6 +94,8 @@ export default class Popup extends WJElement {
|
|
|
68
94
|
draw(): DocumentFragment;
|
|
69
95
|
slotAnchor: HTMLSlotElement;
|
|
70
96
|
slotArrow: HTMLSlotElement;
|
|
97
|
+
defaultSlot: HTMLSlotElement;
|
|
98
|
+
backdrop: HTMLDivElement;
|
|
71
99
|
native: HTMLDivElement;
|
|
72
100
|
loaderEl: HTMLDivElement;
|
|
73
101
|
/**
|
|
@@ -82,6 +110,16 @@ export default class Popup extends WJElement {
|
|
|
82
110
|
anchorEl: any;
|
|
83
111
|
manualCallback: (e: any) => void;
|
|
84
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;
|
|
85
123
|
/**
|
|
86
124
|
* Toggles the active attribute of the popup.
|
|
87
125
|
*/
|
|
@@ -101,6 +139,7 @@ export default class Popup extends WJElement {
|
|
|
101
139
|
* @returns {void} Does not return a value.
|
|
102
140
|
*/
|
|
103
141
|
_mountContentToPortal(): void;
|
|
142
|
+
_portalBackdrop: HTMLDivElement;
|
|
104
143
|
_portalNative: HTMLDivElement;
|
|
105
144
|
_portalSlot: HTMLSlotElement;
|
|
106
145
|
_portalArrowSlot: HTMLSlotElement;
|
|
@@ -137,7 +176,6 @@ export default class Popup extends WJElement {
|
|
|
137
176
|
* @returns {void} Does not return any value.
|
|
138
177
|
*/
|
|
139
178
|
show(dispatchEvent?: boolean): void;
|
|
140
|
-
cleanup: any;
|
|
141
179
|
/**
|
|
142
180
|
* Hides the popup.
|
|
143
181
|
* Removes the popup-active class from the floating element.
|
|
@@ -148,5 +186,7 @@ export default class Popup extends WJElement {
|
|
|
148
186
|
* Removes the active attribute when the popup is hidden.
|
|
149
187
|
*/
|
|
150
188
|
handleHide: () => void;
|
|
189
|
+
_showLoader(): void;
|
|
190
|
+
_hideLoader(): void;
|
|
151
191
|
markContentReady(): void;
|
|
152
192
|
}
|