@watermarkinsights/ripple 3.6.0 → 3.7.0-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/README.md +3 -3
- package/dist/cjs/{functions-068b9a56.js → functions-f0693632.js} +708 -442
- package/dist/cjs/{global-51e309da.js → global-86d92ce3.js} +65 -65
- package/dist/cjs/{http-service-9e8c4dd5.js → http-service-494d81de.js} +49 -49
- package/dist/cjs/{interfaces-30a74c1f.js → interfaces-a3338581.js} +29 -29
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/priv-chart-popover.cjs.entry.js +78 -78
- package/dist/cjs/priv-datepicker.cjs.entry.js +667 -667
- package/dist/cjs/priv-navigator-button.cjs.entry.js +18 -18
- package/dist/cjs/priv-navigator-item.cjs.entry.js +23 -23
- package/dist/cjs/ripple.cjs.js +1 -1
- package/dist/cjs/wm-action-menu_2.cjs.entry.js +341 -341
- package/dist/cjs/wm-button.cjs.entry.js +237 -219
- package/dist/cjs/wm-chart-slice.cjs.entry.js +13 -13
- package/dist/cjs/wm-chart.cjs.entry.js +474 -474
- package/dist/cjs/wm-datepicker.cjs.entry.js +262 -256
- package/dist/cjs/wm-input.cjs.entry.js +134 -134
- package/dist/cjs/wm-modal-footer.cjs.entry.js +31 -31
- package/dist/cjs/wm-modal-header.cjs.entry.js +34 -34
- package/dist/cjs/wm-modal.cjs.entry.js +161 -161
- package/dist/cjs/wm-navigator.cjs.entry.js +268 -268
- package/dist/cjs/wm-network-uploader.cjs.entry.js +421 -421
- package/dist/cjs/wm-option_2.cjs.entry.js +494 -494
- package/dist/cjs/wm-pagination.cjs.entry.js +167 -167
- package/dist/cjs/wm-search.cjs.entry.js +231 -231
- package/dist/cjs/wm-snackbar.cjs.entry.js +170 -170
- package/dist/cjs/wm-tab-item_3.cjs.entry.js +296 -300
- package/dist/cjs/wm-tag-input.cjs.entry.js +570 -570
- package/dist/cjs/wm-timepicker.cjs.entry.js +380 -380
- package/dist/cjs/wm-toggletip.cjs.entry.js +124 -124
- package/dist/cjs/wm-uploader.cjs.entry.js +347 -347
- package/dist/cjs/wm-wrapper.cjs.entry.js +12 -12
- package/dist/collection/components/wm-action-menu/wm-action-menu.js +460 -460
- package/dist/collection/components/wm-button/wm-button.css +37 -4
- package/dist/collection/components/wm-button/wm-button.js +503 -485
- package/dist/collection/components/wm-chart/priv-chart-popover/priv-chart-popover.js +232 -232
- package/dist/collection/components/wm-chart/wm-chart-slice.js +64 -64
- package/dist/collection/components/wm-chart/wm-chart.js +719 -719
- package/dist/collection/components/wm-datepicker/priv-datepicker/priv-datepicker.js +1015 -1015
- package/dist/collection/components/wm-datepicker/wm-datepicker.js +468 -462
- package/dist/collection/components/wm-input/wm-input.js +424 -424
- package/dist/collection/components/wm-menuitem/wm-menuitem.js +444 -444
- package/dist/collection/components/wm-modal/wm-modal-footer.js +141 -141
- package/dist/collection/components/wm-modal/wm-modal-header.js +92 -92
- package/dist/collection/components/wm-modal/wm-modal.js +459 -459
- package/dist/collection/components/wm-navigator/priv-navigator-button/priv-navigator-button.js +97 -97
- package/dist/collection/components/wm-navigator/priv-navigator-item/priv-navigator-item.js +114 -114
- package/dist/collection/components/wm-navigator/wm-navigator.js +468 -468
- package/dist/collection/components/wm-option/wm-option.js +422 -422
- package/dist/collection/components/wm-pagination/wm-pagination.js +368 -368
- package/dist/collection/components/wm-search/wm-search.js +479 -479
- package/dist/collection/components/wm-select/wm-select.js +720 -720
- package/dist/collection/components/wm-snackbar/wm-snackbar.js +297 -297
- package/dist/collection/components/wm-tabs/wm-tab-item/wm-tab-item.js +216 -219
- package/dist/collection/components/wm-tabs/wm-tab-list/wm-tab-list.js +330 -331
- package/dist/collection/components/wm-tabs/wm-tab-panel/wm-tab-panel.js +104 -104
- package/dist/collection/components/wm-tag-input/wm-tag-input.js +801 -801
- package/dist/collection/components/wm-timepicker/wm-timepicker.js +580 -580
- package/dist/collection/components/wm-toggletip/wm-toggletip.js +241 -241
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.css +37 -4
- package/dist/collection/components/wm-uploader/wm-network-uploader/wm-network-uploader.js +753 -753
- package/dist/collection/components/wm-uploader/wm-uploader.css +37 -4
- package/dist/collection/components/wm-uploader/wm-uploader.js +748 -748
- package/dist/collection/components/wm-wrapper/wm-wrapper.js +27 -27
- package/dist/collection/dev/scripts.js +20 -20
- package/dist/collection/global/__mocks__/functions.js +6 -6
- package/dist/collection/global/functions.js +445 -445
- package/dist/collection/global/global.js +72 -72
- package/dist/collection/global/interfaces.js +49 -49
- package/dist/collection/global/services/__mocks__/http-service.js +130 -130
- package/dist/collection/global/services/http-service.js +50 -50
- package/dist/collection/lang/lang.js +5 -5
- package/dist/collection/lang/missing.js +39 -39
- package/dist/collection/lang/piglatin.js +93 -93
- package/dist/esm/{functions-122ab496.js → functions-cbfc81d1.js} +708 -442
- package/dist/esm/{global-c36ac692.js → global-d2addbde.js} +65 -65
- package/dist/esm/{http-service-5d037e16.js → http-service-3dc3b3e7.js} +49 -49
- package/dist/esm/{interfaces-61c6305b.js → interfaces-2b97fab2.js} +29 -29
- package/dist/esm/loader.js +1 -1
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/priv-chart-popover.entry.js +78 -78
- package/dist/esm/priv-datepicker.entry.js +667 -667
- package/dist/esm/priv-navigator-button.entry.js +18 -18
- package/dist/esm/priv-navigator-item.entry.js +23 -23
- package/dist/esm/ripple.js +1 -1
- package/dist/esm/wm-action-menu_2.entry.js +341 -341
- package/dist/esm/wm-button.entry.js +237 -219
- package/dist/esm/wm-chart-slice.entry.js +13 -13
- package/dist/esm/wm-chart.entry.js +474 -474
- package/dist/esm/wm-datepicker.entry.js +262 -256
- package/dist/esm/wm-input.entry.js +134 -134
- package/dist/esm/wm-modal-footer.entry.js +31 -31
- package/dist/esm/wm-modal-header.entry.js +34 -34
- package/dist/esm/wm-modal.entry.js +161 -161
- package/dist/esm/wm-navigator.entry.js +268 -268
- package/dist/esm/wm-network-uploader.entry.js +421 -421
- package/dist/esm/wm-option_2.entry.js +494 -494
- package/dist/esm/wm-pagination.entry.js +167 -167
- package/dist/esm/wm-search.entry.js +231 -231
- package/dist/esm/wm-snackbar.entry.js +170 -170
- package/dist/esm/wm-tab-item_3.entry.js +296 -300
- package/dist/esm/wm-tag-input.entry.js +570 -570
- package/dist/esm/wm-timepicker.entry.js +380 -380
- package/dist/esm/wm-toggletip.entry.js +124 -124
- package/dist/esm/wm-uploader.entry.js +347 -347
- package/dist/esm/wm-wrapper.entry.js +12 -12
- package/dist/ripple/{p-9a8fbfad.entry.js → p-0c488d9d.entry.js} +1 -1
- package/dist/ripple/{p-54c39a0b.entry.js → p-111f705a.entry.js} +1 -1
- package/dist/ripple/{p-e36853fd.entry.js → p-266e4bc2.entry.js} +1 -1
- package/dist/ripple/p-2caeca6b.entry.js +1 -0
- package/dist/ripple/{p-ecbb441f.entry.js → p-30f13477.entry.js} +1 -1
- package/dist/ripple/{p-888bec42.js → p-43f1298b.js} +0 -0
- package/dist/ripple/p-4414cb64.entry.js +1 -0
- package/dist/ripple/p-5585f23e.entry.js +1 -0
- package/dist/ripple/p-7d9c18b9.entry.js +1 -0
- package/dist/ripple/{p-a61b07de.entry.js → p-8a4bac13.entry.js} +1 -1
- package/dist/ripple/{p-4b72f4eb.entry.js → p-938a5ba4.entry.js} +1 -1
- package/dist/ripple/{p-2b3f75eb.entry.js → p-9d6e4c64.entry.js} +1 -1
- package/dist/ripple/{p-97884327.entry.js → p-ad73d523.entry.js} +1 -1
- package/dist/ripple/{p-08e67884.js → p-b5edcf38.js} +2 -2
- package/dist/ripple/{p-067909ce.entry.js → p-b9656d44.entry.js} +1 -1
- package/dist/ripple/{p-2aa79663.entry.js → p-bd05632b.entry.js} +1 -1
- package/dist/ripple/{p-f6bed262.entry.js → p-c0b0510a.entry.js} +1 -1
- package/dist/ripple/{p-1c23f228.entry.js → p-cd466a5b.entry.js} +1 -1
- package/dist/ripple/p-d9c7e3d6.js +1 -0
- package/dist/ripple/p-da1435f1.entry.js +1 -0
- package/dist/ripple/p-e3765b8e.entry.js +1 -0
- package/dist/ripple/{p-a2b02aec.entry.js → p-f33f3f20.entry.js} +1 -1
- package/dist/ripple/{p-803b19aa.entry.js → p-f3569e91.entry.js} +1 -1
- package/dist/ripple/{p-a6d6eae7.js → p-fd8070fb.js} +0 -0
- package/dist/ripple/ripple.esm.js +1 -1
- package/dist/types/components/wm-action-menu/wm-action-menu.d.ts +48 -48
- package/dist/types/components/wm-button/wm-button.d.ts +44 -44
- package/dist/types/components/wm-chart/priv-chart-popover/priv-chart-popover.d.ts +23 -23
- package/dist/types/components/wm-chart/wm-chart-slice.d.ts +8 -8
- package/dist/types/components/wm-chart/wm-chart.d.ts +82 -82
- package/dist/types/components/wm-datepicker/priv-datepicker/priv-datepicker.d.ts +76 -76
- package/dist/types/components/wm-datepicker/wm-datepicker.d.ts +41 -41
- package/dist/types/components/wm-input/wm-input.d.ts +46 -46
- package/dist/types/components/wm-menuitem/wm-menuitem.d.ts +34 -34
- package/dist/types/components/wm-modal/wm-modal-footer.d.ts +15 -15
- package/dist/types/components/wm-modal/wm-modal-header.d.ts +12 -12
- package/dist/types/components/wm-modal/wm-modal.d.ts +41 -41
- package/dist/types/components/wm-navigator/priv-navigator-button/priv-navigator-button.d.ts +10 -10
- package/dist/types/components/wm-navigator/priv-navigator-item/priv-navigator-item.d.ts +13 -13
- package/dist/types/components/wm-navigator/wm-navigator.d.ts +61 -61
- package/dist/types/components/wm-option/wm-option.d.ts +32 -32
- package/dist/types/components/wm-pagination/wm-pagination.d.ts +32 -32
- package/dist/types/components/wm-search/wm-search.d.ts +86 -86
- package/dist/types/components/wm-select/wm-select.d.ts +66 -66
- package/dist/types/components/wm-snackbar/wm-snackbar.d.ts +35 -35
- package/dist/types/components/wm-tabs/wm-tab-item/wm-tab-item.d.ts +38 -38
- package/dist/types/components/wm-tabs/wm-tab-list/wm-tab-list.d.ts +53 -53
- package/dist/types/components/wm-tabs/wm-tab-panel/wm-tab-panel.d.ts +20 -20
- package/dist/types/components/wm-tag-input/wm-tag-input.d.ts +92 -92
- package/dist/types/components/wm-timepicker/wm-timepicker.d.ts +61 -61
- package/dist/types/components/wm-toggletip/wm-toggletip.d.ts +27 -27
- package/dist/types/components/wm-uploader/wm-network-uploader/wm-network-uploader.d.ts +85 -85
- package/dist/types/components/wm-uploader/wm-uploader.d.ts +80 -80
- package/dist/types/components/wm-wrapper/wm-wrapper.d.ts +7 -7
- package/dist/types/components.d.ts +24 -24
- package/dist/types/global/__mocks__/functions.d.ts +6 -6
- package/dist/types/global/functions.d.ts +40 -40
- package/dist/types/global/global.d.ts +1 -1
- package/dist/types/global/interfaces.d.ts +34 -34
- package/dist/types/global/services/__mocks__/http-service.d.ts +6 -6
- package/dist/types/global/services/http-service.d.ts +4 -4
- package/dist/types/lang/lang.d.ts +5 -5
- package/package.json +47 -47
- package/dist/ripple/p-3ff67fd5.entry.js +0 -1
- package/dist/ripple/p-4629470d.entry.js +0 -1
- package/dist/ripple/p-4b1f14bb.entry.js +0 -1
- package/dist/ripple/p-7da00f33.entry.js +0 -1
- package/dist/ripple/p-888c18c3.entry.js +0 -1
- package/dist/ripple/p-8c93b893.js +0 -1
- package/dist/ripple/p-f95c2283.entry.js +0 -1
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
interface UploadedFile {
|
|
3
|
-
name: string;
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
lastUpdated: string;
|
|
7
|
-
progress?: number;
|
|
8
|
-
}
|
|
9
|
-
interface ErrorFile {
|
|
10
|
-
name: string;
|
|
11
|
-
message: string;
|
|
12
|
-
}
|
|
13
|
-
export declare class Uploader {
|
|
14
|
-
el: HTMLWmUploaderElement;
|
|
15
|
-
private liveRegion?;
|
|
16
|
-
private inputEl?;
|
|
17
|
-
uploaderType: "1" | "2" | null;
|
|
18
|
-
type: "1" | "2" | null;
|
|
19
|
-
get tempUploaderType(): "1" | "2";
|
|
20
|
-
buttonText: string;
|
|
21
|
-
info?: string;
|
|
22
|
-
emptyStateText: string;
|
|
23
|
-
icon: string;
|
|
24
|
-
fileTypes: string;
|
|
25
|
-
maxSize: number;
|
|
26
|
-
maxFiles?: number;
|
|
27
|
-
sortBy: "name" | "date";
|
|
28
|
-
files?: string;
|
|
29
|
-
private fileList;
|
|
30
|
-
filesToUpload: File[];
|
|
31
|
-
isTabbing: boolean;
|
|
32
|
-
rejectedFiles?: string;
|
|
33
|
-
errorList: ErrorFile[];
|
|
34
|
-
notif?: {
|
|
35
|
-
id: number;
|
|
36
|
-
message: string;
|
|
37
|
-
} | null;
|
|
38
|
-
numFilesInProgress?: number | null;
|
|
39
|
-
private srProgress?;
|
|
40
|
-
private inputId;
|
|
41
|
-
wmUploaderFilesSelected: EventEmitter;
|
|
42
|
-
wmFilesSelected: EventEmitter;
|
|
43
|
-
wmUploaderDeleteFile: EventEmitter;
|
|
44
|
-
wmDeleteFile: EventEmitter;
|
|
45
|
-
wmUploaderDownloadFile: EventEmitter;
|
|
46
|
-
wmDownloadFile: EventEmitter;
|
|
47
|
-
toggleTabbingOn(): void;
|
|
48
|
-
toggleTabbingOff(): void;
|
|
49
|
-
handleUploadProgress(ev: CustomEvent): void;
|
|
50
|
-
parseFiles(): void;
|
|
51
|
-
parseRejectedFiles(): void;
|
|
52
|
-
setMaxSize(): void;
|
|
53
|
-
uploadNotifications(newNum: number, oldNum: number): void;
|
|
54
|
-
isValidSize(size: number): boolean;
|
|
55
|
-
isDuplicate(name: string): UploadedFile | undefined;
|
|
56
|
-
isEmpty(): boolean;
|
|
57
|
-
isDisabled(): boolean;
|
|
58
|
-
isItemUploading(item: UploadedFile): boolean;
|
|
59
|
-
clearErrors(): void;
|
|
60
|
-
handleFiles(ev: Event): void;
|
|
61
|
-
downloadFile(file: UploadedFile): void;
|
|
62
|
-
deleteFile(file: UploadedFile): void;
|
|
63
|
-
componentWillLoad(): void;
|
|
64
|
-
componentDidLoad(): void;
|
|
65
|
-
renderUploadSvg(): any;
|
|
66
|
-
renderIcon(): any;
|
|
67
|
-
renderInfo(): any;
|
|
68
|
-
renderNotif(): any;
|
|
69
|
-
renderUploadButton(classes: string): any;
|
|
70
|
-
renderEmptyState(): any;
|
|
71
|
-
renderErrorList(): any;
|
|
72
|
-
renderFileInProgress(item: UploadedFile): any;
|
|
73
|
-
renderFile(item: UploadedFile): any;
|
|
74
|
-
renderFileList(): any;
|
|
75
|
-
renderHeader(): any;
|
|
76
|
-
renderFooter(): any;
|
|
77
|
-
renderWithItems(): any;
|
|
78
|
-
render(): any;
|
|
79
|
-
}
|
|
80
|
-
export {};
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
interface UploadedFile {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
lastUpdated: string;
|
|
7
|
+
progress?: number;
|
|
8
|
+
}
|
|
9
|
+
interface ErrorFile {
|
|
10
|
+
name: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export declare class Uploader {
|
|
14
|
+
el: HTMLWmUploaderElement;
|
|
15
|
+
private liveRegion?;
|
|
16
|
+
private inputEl?;
|
|
17
|
+
uploaderType: "1" | "2" | null;
|
|
18
|
+
type: "1" | "2" | null;
|
|
19
|
+
get tempUploaderType(): "1" | "2";
|
|
20
|
+
buttonText: string;
|
|
21
|
+
info?: string;
|
|
22
|
+
emptyStateText: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
fileTypes: string;
|
|
25
|
+
maxSize: number;
|
|
26
|
+
maxFiles?: number;
|
|
27
|
+
sortBy: "name" | "date";
|
|
28
|
+
files?: string;
|
|
29
|
+
private fileList;
|
|
30
|
+
filesToUpload: File[];
|
|
31
|
+
isTabbing: boolean;
|
|
32
|
+
rejectedFiles?: string;
|
|
33
|
+
errorList: ErrorFile[];
|
|
34
|
+
notif?: {
|
|
35
|
+
id: number;
|
|
36
|
+
message: string;
|
|
37
|
+
} | null;
|
|
38
|
+
numFilesInProgress?: number | null;
|
|
39
|
+
private srProgress?;
|
|
40
|
+
private inputId;
|
|
41
|
+
wmUploaderFilesSelected: EventEmitter;
|
|
42
|
+
wmFilesSelected: EventEmitter;
|
|
43
|
+
wmUploaderDeleteFile: EventEmitter;
|
|
44
|
+
wmDeleteFile: EventEmitter;
|
|
45
|
+
wmUploaderDownloadFile: EventEmitter;
|
|
46
|
+
wmDownloadFile: EventEmitter;
|
|
47
|
+
toggleTabbingOn(): void;
|
|
48
|
+
toggleTabbingOff(): void;
|
|
49
|
+
handleUploadProgress(ev: CustomEvent): void;
|
|
50
|
+
parseFiles(): void;
|
|
51
|
+
parseRejectedFiles(): void;
|
|
52
|
+
setMaxSize(): void;
|
|
53
|
+
uploadNotifications(newNum: number, oldNum: number): void;
|
|
54
|
+
isValidSize(size: number): boolean;
|
|
55
|
+
isDuplicate(name: string): UploadedFile | undefined;
|
|
56
|
+
isEmpty(): boolean;
|
|
57
|
+
isDisabled(): boolean;
|
|
58
|
+
isItemUploading(item: UploadedFile): boolean;
|
|
59
|
+
clearErrors(): void;
|
|
60
|
+
handleFiles(ev: Event): void;
|
|
61
|
+
downloadFile(file: UploadedFile): void;
|
|
62
|
+
deleteFile(file: UploadedFile): void;
|
|
63
|
+
componentWillLoad(): void;
|
|
64
|
+
componentDidLoad(): void;
|
|
65
|
+
renderUploadSvg(): any;
|
|
66
|
+
renderIcon(): any;
|
|
67
|
+
renderInfo(): any;
|
|
68
|
+
renderNotif(): any;
|
|
69
|
+
renderUploadButton(classes: string): any;
|
|
70
|
+
renderEmptyState(): any;
|
|
71
|
+
renderErrorList(): any;
|
|
72
|
+
renderFileInProgress(item: UploadedFile): any;
|
|
73
|
+
renderFile(item: UploadedFile): any;
|
|
74
|
+
renderFileList(): any;
|
|
75
|
+
renderHeader(): any;
|
|
76
|
+
renderFooter(): any;
|
|
77
|
+
renderWithItems(): any;
|
|
78
|
+
render(): any;
|
|
79
|
+
}
|
|
80
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
export declare class Wrapper {
|
|
3
|
-
el: any;
|
|
4
|
-
wmWrapperLoaded: EventEmitter<void>;
|
|
5
|
-
componentDidLoad(): void;
|
|
6
|
-
render(): void;
|
|
7
|
-
}
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export declare class Wrapper {
|
|
3
|
+
el: any;
|
|
4
|
+
wmWrapperLoaded: EventEmitter<void>;
|
|
5
|
+
componentDidLoad(): void;
|
|
6
|
+
render(): void;
|
|
7
|
+
}
|
|
@@ -45,13 +45,13 @@ export namespace Components {
|
|
|
45
45
|
"disabled": boolean;
|
|
46
46
|
"labelForIdenticalButtons"?: string;
|
|
47
47
|
"tooltip"?: string;
|
|
48
|
-
"tooltipPosition"?: | "top"
|
|
49
|
-
| "bottom"
|
|
50
|
-
| "left"
|
|
51
|
-
| "right"
|
|
52
|
-
| "bottom-left"
|
|
53
|
-
| "bottom-right"
|
|
54
|
-
| "top-right"
|
|
48
|
+
"tooltipPosition"?: | "top"
|
|
49
|
+
| "bottom"
|
|
50
|
+
| "left"
|
|
51
|
+
| "right"
|
|
52
|
+
| "bottom-left"
|
|
53
|
+
| "bottom-right"
|
|
54
|
+
| "top-right"
|
|
55
55
|
| "top-left";
|
|
56
56
|
}
|
|
57
57
|
interface WmButton {
|
|
@@ -526,9 +526,9 @@ declare namespace LocalJSX {
|
|
|
526
526
|
interface PrivNavigatorItem {
|
|
527
527
|
"focused"?: boolean;
|
|
528
528
|
"link"?: string;
|
|
529
|
-
"onKeydownOnNavItem"?: (event: CustomEvent<{
|
|
530
|
-
navItem: HTMLPrivNavigatorItemElement;
|
|
531
|
-
key: string;
|
|
529
|
+
"onKeydownOnNavItem"?: (event: CustomEvent<{
|
|
530
|
+
navItem: HTMLPrivNavigatorItemElement;
|
|
531
|
+
key: string;
|
|
532
532
|
}>) => void;
|
|
533
533
|
"selected"?: boolean;
|
|
534
534
|
}
|
|
@@ -541,13 +541,13 @@ declare namespace LocalJSX {
|
|
|
541
541
|
"onMenuLoaded"?: (event: CustomEvent<any>) => void;
|
|
542
542
|
"onWmActionMenuLoaded"?: (event: CustomEvent<any>) => void;
|
|
543
543
|
"tooltip"?: string;
|
|
544
|
-
"tooltipPosition"?: | "top"
|
|
545
|
-
| "bottom"
|
|
546
|
-
| "left"
|
|
547
|
-
| "right"
|
|
548
|
-
| "bottom-left"
|
|
549
|
-
| "bottom-right"
|
|
550
|
-
| "top-right"
|
|
544
|
+
"tooltipPosition"?: | "top"
|
|
545
|
+
| "bottom"
|
|
546
|
+
| "left"
|
|
547
|
+
| "right"
|
|
548
|
+
| "bottom-left"
|
|
549
|
+
| "bottom-right"
|
|
550
|
+
| "top-right"
|
|
551
551
|
| "top-left";
|
|
552
552
|
}
|
|
553
553
|
interface WmButton {
|
|
@@ -753,9 +753,9 @@ declare namespace LocalJSX {
|
|
|
753
753
|
"onWmSnackbarSnackFinished"?: (event: CustomEvent<Object>) => void;
|
|
754
754
|
}
|
|
755
755
|
interface WmTabItem {
|
|
756
|
-
"onKeydownOnTabItem"?: (event: CustomEvent<{
|
|
757
|
-
tabItem: HTMLWmTabItemElement;
|
|
758
|
-
key: string;
|
|
756
|
+
"onKeydownOnTabItem"?: (event: CustomEvent<{
|
|
757
|
+
tabItem: HTMLWmTabItemElement;
|
|
758
|
+
key: string;
|
|
759
759
|
}>) => void;
|
|
760
760
|
"onTabItemLoaded"?: (event: CustomEvent<{ tab: HTMLWmTabItemElement }>) => void;
|
|
761
761
|
"onTabSelected"?: (event: CustomEvent<{ tabId: string }>) => void;
|
|
@@ -813,10 +813,10 @@ declare namespace LocalJSX {
|
|
|
813
813
|
"label"?: string;
|
|
814
814
|
"labelPosition"?: "top" | "left" | "none";
|
|
815
815
|
"onWmTimepickerNewValidValue"?: (event: CustomEvent<{ value: string }>) => void;
|
|
816
|
-
"onWmTimepickerOnChange"?: (event: CustomEvent<{
|
|
817
|
-
// deprecated in favor of wmTimepickerNewValidValue and standard input event
|
|
818
|
-
value: string;
|
|
819
|
-
isValid: boolean;
|
|
816
|
+
"onWmTimepickerOnChange"?: (event: CustomEvent<{
|
|
817
|
+
// deprecated in favor of wmTimepickerNewValidValue and standard input event
|
|
818
|
+
value: string;
|
|
819
|
+
isValid: boolean;
|
|
820
820
|
}>) => void;
|
|
821
821
|
"preventValidation"?: string;
|
|
822
822
|
"requiredField"?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const generateId: () => string;
|
|
2
|
-
export declare const getTextDir: () => string;
|
|
3
|
-
export declare const intl: {
|
|
4
|
-
formatMessage: (_: string) => string;
|
|
5
|
-
};
|
|
6
|
-
export declare const adjustTooltipPosition: () => string;
|
|
1
|
+
export declare const generateId: () => string;
|
|
2
|
+
export declare const getTextDir: () => string;
|
|
3
|
+
export declare const intl: {
|
|
4
|
+
formatMessage: (_: string) => string;
|
|
5
|
+
};
|
|
6
|
+
export declare const adjustTooltipPosition: () => string;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { TooltipPosition } from "./interfaces";
|
|
2
|
-
export declare const intl: import("@formatjs/intl").IntlShape<string>;
|
|
3
|
-
export declare function generateId(): string;
|
|
4
|
-
export declare function debounce(fn: any, wait: number): (this: any) => void;
|
|
5
|
-
export declare function getTextDir(): string;
|
|
6
|
-
export declare function getPosition(el: HTMLElement): {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
};
|
|
10
|
-
export declare function findParentWithScrollbar(el: HTMLElement): HTMLElement | undefined;
|
|
11
|
-
export declare function findParentWithHiddenOverflow(el: HTMLElement): HTMLElement | undefined;
|
|
12
|
-
export declare function getClosableElementMeasurements(fixedEl: HTMLElement, closableEl: HTMLElement): {
|
|
13
|
-
closableElHeight: number;
|
|
14
|
-
closableElWidth: number;
|
|
15
|
-
spaceAbove: number;
|
|
16
|
-
spaceBelow: number;
|
|
17
|
-
spaceLeft: number;
|
|
18
|
-
spaceRight: number;
|
|
19
|
-
};
|
|
20
|
-
export declare function shouldOpenUp(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
21
|
-
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
22
|
-
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
23
|
-
offsetBelow?: number): boolean;
|
|
24
|
-
export declare function shouldOpenDown(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
25
|
-
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
26
|
-
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
27
|
-
offsetBelow?: number): boolean;
|
|
28
|
-
export declare function shouldShiftRight(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
29
|
-
export declare function shouldShiftLeft(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
30
|
-
export declare function adjustTooltipPosition(tPos: TooltipPosition, el: HTMLElement, tooltipEl: HTMLElement): TooltipPosition;
|
|
31
|
-
export declare function hasRoomRight(x: any, spaceNeeded: number): boolean;
|
|
32
|
-
export declare function checkForActiveElInShadow(element: HTMLElement): HTMLElement;
|
|
33
|
-
export declare function checkForFocusableElInShadow(element: HTMLElement): HTMLElement;
|
|
34
|
-
export declare function isFocusable(element: any): boolean;
|
|
35
|
-
export declare function getFirstFocusableDescendant(element: HTMLElement): HTMLElement | undefined;
|
|
36
|
-
export declare function hasValidType(file: File, types: string): any;
|
|
37
|
-
export declare function getAcceptedMimeTypesList(acceptedExtensions: string[]): any;
|
|
38
|
-
export declare function snakeCaseToCamelCase(str: string): string;
|
|
39
|
-
export declare function getNewIndexToFocus(currentIndex: number, direction: string, listLength: number): number;
|
|
40
|
-
export declare function isRelatedTarget(ev: FocusEvent, id: string): boolean | null;
|
|
1
|
+
import { TooltipPosition } from "./interfaces";
|
|
2
|
+
export declare const intl: import("@formatjs/intl").IntlShape<string>;
|
|
3
|
+
export declare function generateId(): string;
|
|
4
|
+
export declare function debounce(fn: any, wait: number): (this: any) => void;
|
|
5
|
+
export declare function getTextDir(): string;
|
|
6
|
+
export declare function getPosition(el: HTMLElement): {
|
|
7
|
+
x: number;
|
|
8
|
+
y: number;
|
|
9
|
+
};
|
|
10
|
+
export declare function findParentWithScrollbar(el: HTMLElement): HTMLElement | undefined;
|
|
11
|
+
export declare function findParentWithHiddenOverflow(el: HTMLElement): HTMLElement | undefined;
|
|
12
|
+
export declare function getClosableElementMeasurements(fixedEl: HTMLElement, closableEl: HTMLElement): {
|
|
13
|
+
closableElHeight: number;
|
|
14
|
+
closableElWidth: number;
|
|
15
|
+
spaceAbove: number;
|
|
16
|
+
spaceBelow: number;
|
|
17
|
+
spaceLeft: number;
|
|
18
|
+
spaceRight: number;
|
|
19
|
+
};
|
|
20
|
+
export declare function shouldOpenUp(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
21
|
+
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
22
|
+
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
23
|
+
offsetBelow?: number): boolean;
|
|
24
|
+
export declare function shouldOpenDown(fixedEl: HTMLElement, //the element visible on the page when the component is closed
|
|
25
|
+
closableEl: HTMLElement, //the dropdown/popup/etc that becomes visible when the component is open
|
|
26
|
+
offsetAbove?: number, // if closableEl covers a part of fixedEl, that part should be offset
|
|
27
|
+
offsetBelow?: number): boolean;
|
|
28
|
+
export declare function shouldShiftRight(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
29
|
+
export declare function shouldShiftLeft(fixedEl: HTMLElement, closableEl: HTMLElement): boolean;
|
|
30
|
+
export declare function adjustTooltipPosition(tPos: TooltipPosition, el: HTMLElement, tooltipEl: HTMLElement): TooltipPosition;
|
|
31
|
+
export declare function hasRoomRight(x: any, spaceNeeded: number): boolean;
|
|
32
|
+
export declare function checkForActiveElInShadow(element: HTMLElement): HTMLElement;
|
|
33
|
+
export declare function checkForFocusableElInShadow(element: HTMLElement): HTMLElement;
|
|
34
|
+
export declare function isFocusable(element: any): boolean;
|
|
35
|
+
export declare function getFirstFocusableDescendant(element: HTMLElement): HTMLElement | undefined;
|
|
36
|
+
export declare function hasValidType(file: File, types: string): any;
|
|
37
|
+
export declare function getAcceptedMimeTypesList(acceptedExtensions: string[]): any;
|
|
38
|
+
export declare function snakeCaseToCamelCase(str: string): string;
|
|
39
|
+
export declare function getNewIndexToFocus(currentIndex: number, direction: string, listLength: number): number;
|
|
40
|
+
export declare function isRelatedTarget(ev: FocusEvent, id: string): boolean | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
export declare type Notification = {
|
|
2
|
-
message: string;
|
|
3
|
-
id: string;
|
|
4
|
-
link: string;
|
|
5
|
-
newWindow: boolean;
|
|
6
|
-
};
|
|
7
|
-
export declare type label = string | undefined;
|
|
8
|
-
export declare type CssClassMap = {
|
|
9
|
-
[className: string]: boolean;
|
|
10
|
-
};
|
|
11
|
-
interface IconLabels {
|
|
12
|
-
[index: string]: string;
|
|
13
|
-
}
|
|
14
|
-
export declare type Product = {
|
|
15
|
-
description?: string;
|
|
16
|
-
samlLinkUrl?: string;
|
|
17
|
-
iconUrl: string;
|
|
18
|
-
id: string;
|
|
19
|
-
linkUrl: string;
|
|
20
|
-
name: string;
|
|
21
|
-
};
|
|
22
|
-
export declare type NavigatorPayload = {
|
|
23
|
-
connection_name?: string;
|
|
24
|
-
current_product_id: string;
|
|
25
|
-
email: string;
|
|
26
|
-
logout_url: string;
|
|
27
|
-
products: Product[];
|
|
28
|
-
};
|
|
29
|
-
export declare const iconLabels: IconLabels;
|
|
30
|
-
export declare function getIconCodeFromName(icon: string): string;
|
|
31
|
-
export declare const defaultMode = "planning";
|
|
32
|
-
export declare const getWmMode: (ref?: any) => any;
|
|
33
|
-
export declare type TooltipPosition = "top" | "bottom" | "left" | "right" | "bottom-left" | "bottom-right" | "top-right" | "top-left";
|
|
34
|
-
export {};
|
|
1
|
+
export declare type Notification = {
|
|
2
|
+
message: string;
|
|
3
|
+
id: string;
|
|
4
|
+
link: string;
|
|
5
|
+
newWindow: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare type label = string | undefined;
|
|
8
|
+
export declare type CssClassMap = {
|
|
9
|
+
[className: string]: boolean;
|
|
10
|
+
};
|
|
11
|
+
interface IconLabels {
|
|
12
|
+
[index: string]: string;
|
|
13
|
+
}
|
|
14
|
+
export declare type Product = {
|
|
15
|
+
description?: string;
|
|
16
|
+
samlLinkUrl?: string;
|
|
17
|
+
iconUrl: string;
|
|
18
|
+
id: string;
|
|
19
|
+
linkUrl: string;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
export declare type NavigatorPayload = {
|
|
23
|
+
connection_name?: string;
|
|
24
|
+
current_product_id: string;
|
|
25
|
+
email: string;
|
|
26
|
+
logout_url: string;
|
|
27
|
+
products: Product[];
|
|
28
|
+
};
|
|
29
|
+
export declare const iconLabels: IconLabels;
|
|
30
|
+
export declare function getIconCodeFromName(icon: string): string;
|
|
31
|
+
export declare const defaultMode = "planning";
|
|
32
|
+
export declare const getWmMode: (ref?: any) => any;
|
|
33
|
+
export declare type TooltipPosition = "top" | "bottom" | "left" | "right" | "bottom-left" | "bottom-right" | "top-right" | "top-left";
|
|
34
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
-
export declare const postRequest: (url: string, payload: any) => Promise<void | {
|
|
3
|
-
url: string;
|
|
4
|
-
}>;
|
|
5
|
-
export declare const deleteRequest: (url: string) => Promise<void>;
|
|
6
|
-
export declare const putRequest: (_url: string, _file: any) => Promise<void>;
|
|
1
|
+
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
+
export declare const postRequest: (url: string, payload: any) => Promise<void | {
|
|
3
|
+
url: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const deleteRequest: (url: string) => Promise<void>;
|
|
6
|
+
export declare const putRequest: (_url: string, _file: any) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
-
export declare const postRequest: (url: string, payload: Object) => Promise<any>;
|
|
3
|
-
export declare const deleteRequest: (url: string) => Promise<any>;
|
|
4
|
-
export declare const putRequest: (url: string, file: File, onProgress: Function) => Promise<unknown>;
|
|
1
|
+
export declare const getRequest: (url: string) => Promise<any>;
|
|
2
|
+
export declare const postRequest: (url: string, payload: Object) => Promise<any>;
|
|
3
|
+
export declare const deleteRequest: (url: string) => Promise<any>;
|
|
4
|
+
export declare const putRequest: (url: string, file: File, onProgress: Function) => Promise<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import en from "./compiled-lang/en.json";
|
|
2
|
-
import fr from "./compiled-lang/fr.json";
|
|
3
|
-
import es from "./compiled-lang/es.json";
|
|
4
|
-
import pig from "./compiled-lang/pig.json";
|
|
5
|
-
export { en, fr, es, pig };
|
|
1
|
+
import en from "./compiled-lang/en.json";
|
|
2
|
+
import fr from "./compiled-lang/fr.json";
|
|
3
|
+
import es from "./compiled-lang/es.json";
|
|
4
|
+
import pig from "./compiled-lang/pig.json";
|
|
5
|
+
export { en, fr, es, pig };
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@watermarkinsights/ripple",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "Ripple Component Library",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"module": "dist/index.js",
|
|
7
|
-
"main": "dist/index.cjs.js",
|
|
8
|
-
"unpkg": "dist/ripple/ripple.js",
|
|
9
|
-
"types": "dist/types/components.d.ts",
|
|
10
|
-
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
-
"files": [
|
|
12
|
-
"dist/"
|
|
13
|
-
],
|
|
14
|
-
"es2017": "dist/esm/index.mjs",
|
|
15
|
-
"es2015": "dist/esm/index.mjs",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"local.pss": "sh ./scripts/build-local-pss.sh",
|
|
18
|
-
"local.aqua": "sh ./scripts/build-local-aqf.sh",
|
|
19
|
-
"local.ripple": "sh ./scripts/build-local-ripple.sh",
|
|
20
|
-
"local.wrappers": "sh ./scripts/build-local-wrappers.sh",
|
|
21
|
-
"build": "stencil build",
|
|
22
|
-
"release": "sh ./scripts/release.sh",
|
|
23
|
-
"start": "stencil build --dev --watch --serve",
|
|
24
|
-
"test": "stencil test --spec --e2e",
|
|
25
|
-
"test.snapshot": "stencil test --spec --e2e -u",
|
|
26
|
-
"test.watch": "stencil test --spec --e2e --watch",
|
|
27
|
-
"test.watchAll": "stencil test --spec --e2e --watchAll",
|
|
28
|
-
"test.coverage": "stencil test --spec --coverage --collectCoverageFrom='src/**/*.{js,jsx,ts,tsx}'",
|
|
29
|
-
"extract": "formatjs extract './src/**/*.tsx' --out-file './src/lang/en.json' && node './src/lang/piglatin.js'",
|
|
30
|
-
"compile": "formatjs compile-folder ./src/lang src/lang/compiled-lang/ --ast",
|
|
31
|
-
"missing": "node './src/lang/missing.js'"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@axe-core/puppeteer": "^4.1.1",
|
|
35
|
-
"@formatjs/cli": "^4.2.11",
|
|
36
|
-
"@stencil/core": "^2.5.2",
|
|
37
|
-
"@stencil/react-output-target": "^0.0.9",
|
|
38
|
-
"@stencil/sass": "^1.4.1",
|
|
39
|
-
"@types/jest": "^26.0.23",
|
|
40
|
-
"@types/puppeteer": "^5.4.3",
|
|
41
|
-
"jest": "^26.6.3",
|
|
42
|
-
"jest-cli": "^26.6.3"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@formatjs/intl": "^1.10.5"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@watermarkinsights/ripple",
|
|
3
|
+
"version": "3.7.0-0",
|
|
4
|
+
"description": "Ripple Component Library",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"main": "dist/index.cjs.js",
|
|
8
|
+
"unpkg": "dist/ripple/ripple.js",
|
|
9
|
+
"types": "dist/types/components.d.ts",
|
|
10
|
+
"collection": "dist/collection/collection-manifest.json",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/"
|
|
13
|
+
],
|
|
14
|
+
"es2017": "dist/esm/index.mjs",
|
|
15
|
+
"es2015": "dist/esm/index.mjs",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"local.pss": "sh ./scripts/build-local-pss.sh",
|
|
18
|
+
"local.aqua": "sh ./scripts/build-local-aqf.sh",
|
|
19
|
+
"local.ripple": "sh ./scripts/build-local-ripple.sh",
|
|
20
|
+
"local.wrappers": "sh ./scripts/build-local-wrappers.sh",
|
|
21
|
+
"build": "stencil build",
|
|
22
|
+
"release": "sh ./scripts/release.sh",
|
|
23
|
+
"start": "stencil build --dev --watch --serve",
|
|
24
|
+
"test": "stencil test --spec --e2e",
|
|
25
|
+
"test.snapshot": "stencil test --spec --e2e -u",
|
|
26
|
+
"test.watch": "stencil test --spec --e2e --watch",
|
|
27
|
+
"test.watchAll": "stencil test --spec --e2e --watchAll",
|
|
28
|
+
"test.coverage": "stencil test --spec --coverage --collectCoverageFrom='src/**/*.{js,jsx,ts,tsx}'",
|
|
29
|
+
"extract": "formatjs extract './src/**/*.tsx' --out-file './src/lang/en.json' && node './src/lang/piglatin.js'",
|
|
30
|
+
"compile": "formatjs compile-folder ./src/lang src/lang/compiled-lang/ --ast",
|
|
31
|
+
"missing": "node './src/lang/missing.js'"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@axe-core/puppeteer": "^4.1.1",
|
|
35
|
+
"@formatjs/cli": "^4.2.11",
|
|
36
|
+
"@stencil/core": "^2.5.2",
|
|
37
|
+
"@stencil/react-output-target": "^0.0.9",
|
|
38
|
+
"@stencil/sass": "^1.4.1",
|
|
39
|
+
"@types/jest": "^26.0.23",
|
|
40
|
+
"@types/puppeteer": "^5.4.3",
|
|
41
|
+
"jest": "^26.6.3",
|
|
42
|
+
"jest-cli": "^26.6.3"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@formatjs/intl": "^1.10.5"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,f as o,h as n,H as e,g as i}from"./p-9baa3039.js";import{g as a}from"./p-888bec42.js";import{g as s,a as r}from"./p-08e67884.js";const b=class{constructor(o){t(this,o),this.disabled=!1,this.buttonType=null,this.buttonStyle=null,this.tooltipPosition="bottom-right",this.adjustedTooltipPosition=this.tooltipPosition,this.permanentlyDelete=!1,this.textWrap=!0,this.tooltipVisible=!1,this.isTabbing=!1,this.id=s(),this.clickFunc=null,this.ariaPopup=!1}get tempButtonType(){return this.buttonType||this.buttonStyle||"secondary"}get isTruncated(){return!!this.buttonEl&&this.buttonEl.offsetWidth<this.buttonEl.scrollWidth}get hasTooltip(){return"icononly"===this.tempButtonType||"navigational"===this.tempButtonType||this.isTruncated}get tooltipEl(){return document.getElementById("wm-tooltip")}toggleTabbingOn(){this.isTabbing=!0}toggleTabbingOff(){this.isTabbing=!1}handleScroll(){this.tooltipVisible&&this.hideTooltip()}handleOnClick(){this.el.onclick=this.disabled?null:this.clickFunc}validateType(t){["primary","secondary","textonly","icononly","navigational","selectoronly"].includes(t)||(this.buttonType="secondary"),this.validateIcon()}validateDeprecatedType(t){["primary","secondary","textonly","icononly","navigational","selectoronly"].includes(t)||(this.buttonStyle="secondary"),this.validateIcon()}updateIcon(){this.icon=a(this.icon)}validateIcon(){"icononly"!==this.tempButtonType&&"navigational"!==this.tempButtonType||(this.icon||console.error("wm-button should have a valid 'icon' property when button-type is set to 'icononly' or 'navigational'."),this.tooltip||console.error("wm-button should have a valid 'tooltip' property when button-type is set to 'icononly' or 'navigational'."))}handleKeydown(t){switch(t.key){case"Enter":t.preventDefault(),this.disabled||this.el.click()}}componentWillLoad(){this.buttonStyle&&console.warn("wm-button: button-style has been deprecated as of v3.1.0. Please use button-type instead."),this.validateType(this.tempButtonType),this.el.focus=function(){this.disabled||(this.shadowRoot.querySelector("button").focus(),requestAnimationFrame((()=>{this.tooltipVisible=!1})))},this.icon&&(this.icon=this.icon=a(this.icon))}componentDidLoad(){this.el.onclick&&(this.clickFunc=this.el.onclick),document.body.classList.contains("wmcl-user-is-tabbing")&&this.toggleTabbingOn(),this.ariaPopup=!!this.el.getAttribute("aria-haspopup"),o(this.el)}showTooltip(){this.hasTooltip&&(this.tooltipEl.textContent=this.isTruncated?this.el.textContent:this.tooltip,this.adjustedTooltipPosition=r(this.tooltipPosition,this.buttonEl,this.tooltipEl),this.positionTooltip(this.adjustedTooltipPosition,this.tooltipEl),this.tooltipEl.style.transitionDelay="500ms",this.tooltipEl.style.opacity="1",setTimeout((()=>{this.tooltipVisible=!0}),500))}positionTooltip(t,o){const n=o.getBoundingClientRect().height,e=o.getBoundingClientRect().width,i=(this.buttonEl.getBoundingClientRect().height-n)/2,a=(this.buttonEl.getBoundingClientRect().width-e)/2;let s=this.buttonEl.getBoundingClientRect().top+i,r=this.buttonEl.getBoundingClientRect().left+a;t.includes("top")&&(s=this.buttonEl.getBoundingClientRect().top-n-8),t.includes("bottom")&&(s=this.buttonEl.getBoundingClientRect().bottom+8),t.includes("left")&&(r=this.buttonEl.getBoundingClientRect().left-e-8),t.includes("right")&&(r=this.buttonEl.getBoundingClientRect().right+8),r=Math.max(r,24),o.style.top=(s/16).toString()+"rem",o.style.left=(r/16).toString()+"rem"}hideTooltip(){this.hasTooltip&&(this.tooltipEl.style.transitionDelay="0s",this.tooltipEl.style.opacity="0",this.tooltipVisible=!1)}showTooltipForKeyboardUsers(){this.isTabbing&&this.showTooltip()}getClasses(){let t="wm-button";return t+=this.permanentlyDelete?" -permanentlydelete":"",t+=this.tempButtonType?" -"+this.tempButtonType:" -secondary",t+=this.textWrap?"":" nowrap",t+=this.isTabbing?" user-is-tabbing":"",t+=this.isTruncated?" -truncated":"",t+="dark"===this.customBackground?" dark":"",t}getAriaLabel(){return"icononly"===this.tempButtonType||"navigational"===this.tempButtonType?this.labelForIdenticalButtons||this.tooltip:this.labelForIdenticalButtons?this.labelForIdenticalButtons:void 0}render(){return n(e,{class:this.disabled?"button-disabled":""},n("button",{id:this.id,class:`${this.getClasses()}`,disabled:this.disabled,ref:t=>this.buttonEl=t,"aria-label":this.getAriaLabel(),"aria-hasPopup":this.ariaPopup?"menu":null,onMouseEnter:()=>this.showTooltip(),onMouseLeave:()=>this.hideTooltip(),onFocus:()=>this.showTooltipForKeyboardUsers(),onBlur:()=>this.hideTooltip(),onClick:()=>this.hideTooltip()},this.icon&&n("span",{class:"mdi",style:this.iconSize?{fontSize:this.iconSize}:{}},String.fromCodePoint(parseInt(`0x${this.icon}`))),n("span",{class:"button-text"},n("slot",null))))}get el(){return i(this)}static get watchers(){return{disabled:["handleOnClick"],buttonType:["validateType"],buttonStyle:["validateDeprecatedType"],icon:["updateIcon"]}}};b.style='@charset "UTF-8";:host .wm-button,wm-button .wm-button{-ms-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-moz-transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);transition:background-color 500ms cubic-bezier(0.4, 0, 0.2, 1), color 500ms cubic-bezier(0.4, 0, 0.2, 1), border 500ms cubic-bezier(0.4, 0, 0.2, 1);-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;border-radius:5px;width:inherit;border:2px solid #575195;color:#575195;font-family:inherit;font-size:0.75rem;font-weight:700;height:2.75rem;padding:0 1.3333333333em;cursor:pointer;position:relative;background:#fff;display:flex;justify-content:center;align-items:center;text-decoration:none;text-transform:uppercase;letter-spacing:0.01875rem;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button,wm-button .wm-button{height:3.3333333333em}}:host .wm-button.nowrap,wm-button .wm-button.nowrap{display:inline-block;width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host .wm-button:focus,wm-button .wm-button:focus{outline:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button::-moz-focus-inner,wm-button .wm-button::-moz-focus-inner{border:0;outline:none}:host .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled):not(.-primary):not(.-secondary):not(.-secondary):not(.-selectoronly) .button-text,wm-button .wm-button.user-is-tabbing:focus:not(:disabled):not(.disabled):not(.-primary):not(.-secondary):not(.-secondary):not(.-selectoronly) .button-text{background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark),wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark){-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner,wm-button .wm-button.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled):not(.dark)::-moz-focus-inner{border:0}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled),wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled){background:transparent;border:2px solid #fff;color:#fff}:host .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover,wm-button .wm-button.dark:not(.-textonly):not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark,wm-button .wm-button.dark.user-is-tabbing:focus:not(.-textonly):not(:disabled):not(.disabled).dark{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #c6b4e3;outline:none}:host .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption),wm-button .wm-button:active:not(:disabled):not(.disabled):not(.-textonly):not(.-actionbutton):not(.displayedoption){-ms-transform:scale(0.9, 0.9);-webkit-transform:scale(0.9, 0.9);-moz-transform:scale(0.9, 0.9);transform:scale(0.9, 0.9)}:host .wm-button:hover,wm-button .wm-button:hover{background:#464177;color:#fff}:host .wm-button .mdi,wm-button .wm-button .mdi{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button:not(.-icononly):not(.-navigational) .mdi,wm-button .wm-button:not(.-icononly):not(.-navigational) .mdi{margin-right:0.3125rem}:host .wm-button[dir=RTL] :not(.-icononly) .mdi,wm-button .wm-button[dir=RTL] :not(.-icononly) .mdi{margin-left:0.3125rem;margin-right:0}:host .wm-button.-primary:not(.-textonly),wm-button .wm-button.-primary:not(.-textonly){background:#575195;color:#fff}:host .wm-button.-primary:not(.-textonly):not(:focus),wm-button .wm-button.-primary:not(.-textonly):not(:focus){-webkit-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2);box-shadow:0 2px 2px 0 rgba(87, 81, 149, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.2)}:host .wm-button.-primary:not(.-textonly):hover,wm-button .wm-button.-primary:not(.-textonly):hover{background:#464177}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled),wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled){color:#575195;background:#fff;border:2px solid #fff}:host .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover,wm-button .wm-button.-primary:not(.-textonly).dark:not(:disabled):not(.disabled):hover{color:#575195;background:#e6e6e6;border:2px solid #e6e6e6}:host .wm-button.-textonly,wm-button .wm-button.-textonly{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;display:inline-block;letter-spacing:0;text-transform:none;text-align:initial;font-size:0.875rem;border:none;background:transparent;padding-left:0;padding-right:0;height:auto;border-radius:0;line-height:1}:host .wm-button.-textonly+.-textonly,wm-button .wm-button.-textonly+.-textonly{margin-left:0.3125rem}:host .wm-button.-textonly:focus,wm-button .wm-button.-textonly:focus{outline:none}:host .wm-button.-textonly::-moz-focus-inner,wm-button .wm-button.-textonly::-moz-focus-inner{border:0;outline:none}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled) .button-text{background:linear-gradient(90deg, #3862e9 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text,wm-button .wm-button.-textonly.user-is-tabbing:focus:not(:disabled):not(.disabled).dark .button-text{background:linear-gradient(90deg, #fff 66%, transparent 0) repeat-x;background-size:6px 3px;background-position:0 1em;border-radius:0;line-height:normal}:host .wm-button.-textonly.small,wm-button .wm-button.-textonly.small{font-size:0.625rem}:host .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete),wm-button .wm-button.-textonly:hover:not(:disabled):not(.disabled):not(.-permanentlydelete){text-decoration:underline;color:#454077}:host .wm-button.-textonly.-permanentlydelete,wm-button .wm-button.-textonly.-permanentlydelete{color:#c0392b}:host .wm-button.-textonly.-permanentlydelete:hover,wm-button .wm-button.-textonly.-permanentlydelete:hover{text-decoration:underline;color:#c0392b !important}:host .wm-button.-textonly.dark,wm-button .wm-button.-textonly.dark{color:#fff}:host .wm-button.-textonly.dark:hover,wm-button .wm-button.-textonly.dark:hover{text-decoration:underline;color:#fff !important}:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%;font-size:1rem;padding:0;height:auto;line-height:1;min-width:2.75rem;min-height:2.75rem;text-align:center;letter-spacing:normal}:host .wm-button.-icononly:not(:focus),wm-button .wm-button.-icononly:not(:focus),:host .wm-button.-navigational:not(:focus),wm-button .wm-button.-navigational:not(:focus){-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}@media screen and (min-width: 48rem){:host .wm-button.-icononly,wm-button .wm-button.-icononly,:host .wm-button.-navigational,wm-button .wm-button.-navigational{min-width:2.5rem;min-height:2.5rem}}:host .wm-button.-icononly,wm-button .wm-button.-icononly{border-width:1px !important}:host .wm-button.-icononly:before,wm-button .wm-button.-icononly:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button.-navigational,wm-button .wm-button.-navigational{border:none !important;background-color:transparent}:host .wm-button.-navigational:not(.dark):not(:disabled),wm-button .wm-button.-navigational:not(.dark):not(:disabled){color:#575195}:host .wm-button.-navigational:not(.dark):not(:disabled):hover,wm-button .wm-button.-navigational:not(.dark):not(:disabled):hover,:host .wm-button.-navigational:not(.dark):not(:disabled).selected,wm-button .wm-button.-navigational:not(.dark):not(:disabled).selected{background-color:#d7d6d9}:host .wm-button.-navigational:before,wm-button .wm-button.-navigational:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:host .wm-button.-permanentlydelete:not(.-textonly),wm-button .wm-button.-permanentlydelete:not(.-textonly){background:#c0392b;border-color:#c0392b;color:#fff}:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{-webkit-border-radius:3px;-moz-border-radius:3px;-ms-border-radius:3px;border-radius:3px;display:block;background:transparent;border:1px solid #575195;border-radius:3px 3px 3px 3px;height:2.75rem;min-width:11.4375rem;padding:0 1.875rem 0 0.9375rem;line-height:normal;font-family:inherit;color:#575195;font-weight:500;font-size:0.875rem;text-transform:none;letter-spacing:0.01875rem;text-align:left}@media screen and (min-width: 48rem){:host .wm-button.-selectoronly,wm-button .wm-button.-selectoronly{height:2.5rem}}:host .wm-button.-selectoronly:before,wm-button .wm-button.-selectoronly:before{display:inline-block;font:normal normal normal 24px/1 "Material Design Icons";font-size:inherit;text-rendering:auto;line-height:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:"";position:absolute;right:0.5625rem;top:50%;transform:translateY(-50%);pointer-events:none}:host .wm-button.-selectoronly:hover:not(:disabled):not(.disabled),wm-button .wm-button.-selectoronly:hover:not(:disabled):not(.disabled){background:transparent;text-decoration:none}:host .wm-button.-selectoronly:active,wm-button .wm-button.-selectoronly:active{-ms-transform:scale(1, 1) !important;transform:scale(1, 1) !important}:host .wm-button.-selectoronly::-moz-focus-inner,wm-button .wm-button.-selectoronly::-moz-focus-inner{border:0}:host .wm-button.-selectoronly .overflowcontrol,wm-button .wm-button.-selectoronly .overflowcontrol{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:visible}:host .wm-button:disabled,wm-button .wm-button:disabled,:host .wm-button.disabled,wm-button .wm-button.disabled{background:inherit;border-color:#737373;color:#737373;cursor:default;pointer-events:none}:host .wm-button:disabled.dark,wm-button .wm-button:disabled.dark,:host .wm-button.disabled.dark,wm-button .wm-button.disabled.dark{color:#a6a6a6;border-color:#a6a6a6}:host .wm-button:disabled.-primary,wm-button .wm-button:disabled.-primary,:host .wm-button:disabled.-permanentlydelete,wm-button .wm-button:disabled.-permanentlydelete,:host .wm-button.disabled.-primary,wm-button .wm-button.disabled.-primary,:host .wm-button.disabled.-permanentlydelete,wm-button .wm-button.disabled.-permanentlydelete{background:#737373;color:#fff;border-color:#737373}:host .wm-button:disabled.-primary.dark,wm-button .wm-button:disabled.-primary.dark,:host .wm-button.disabled.-primary.dark,wm-button .wm-button.disabled.-primary.dark{background:#a6a6a6;border-color:#a6a6a6;color:#353b48}:host .wm-button:disabled.-secondary,wm-button .wm-button:disabled.-secondary,:host .wm-button.disabled.-secondary,wm-button .wm-button.disabled.-secondary{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .wm-button:disabled.-selectoronly,wm-button .wm-button:disabled.-selectoronly,:host .wm-button.disabled.-selectoronly,wm-button .wm-button.disabled.-selectoronly{color:#737373}:host .wm-button:disabled.-textonly,wm-button .wm-button:disabled.-textonly,:host .wm-button.disabled.-textonly,wm-button .wm-button.disabled.-textonly{color:#6b6b6b;background:transparent}:host a.wm-button,wm-button a.wm-button,:host label.wm-button,wm-button label.wm-button{height:auto;padding-top:0.75rem;padding-bottom:0.75rem}:host([disabled]),:host(.button-disabled){pointer-events:none}:host,wm-button{display:inline-block;position:relative;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}:host .sr-only,wm-button .sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;border:0 !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;clip-path:inset(50%) !important;white-space:nowrap !important;margin:-1px !important}';export{b as wm_button}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a,f as n}from"./p-9baa3039.js";import{d as o,g as r}from"./p-08e67884.js";const h=class{constructor(e){t(this,e),this.wmTabSelected=i(this,"wmTabSelected",7),this.tabSelected=i(this,"tabSelected",7),this.keydownOnTabItem=i(this,"keydownOnTabItem",7),this.tabItemLoaded=i(this,"tabItemLoaded",7),this.selected=!1,this.show=!0,this.tabId="",this.tabClicked=t=>{t.preventDefault(),this.wmTabSelected.emit({tabId:this.tabId}),this.tabSelected.emit({tabId:this.tabId})},this.tabPressed=t=>{const i=t.key;"Enter"===i||" "===i?(t.preventDefault(),this.wmTabSelected.emit({tabId:this.tabId}),this.tabSelected.emit({tabId:this.tabId})):("Tab"===i||t.preventDefault(),this.keydownOnTabItem.emit({tabItem:this.el,key:t.key}))}}get parentTabList(){return this.el.parentElement}toggleTabbingOn(){this.linkEl&&this.linkEl.classList.add("user-is-tabbing")}toggleTabbingOff(){this.linkEl&&this.linkEl.classList.remove("user-is-tabbing")}componentWillLoad(){this.el.focus=function(){const t=this.shadowRoot.querySelector("a");t&&t.focus()}}componentDidLoad(){this.tabItemLoaded.emit()}render(){let t=this.show?"":"hide ";t+=this.parentTabList&&"dark"==this.parentTabList.customBackground?"dark":"";let i={};const a=this.parentTabList&&this.parentTabList.customPadding;if(a){const t=2*parseInt(a,10)||0,e=a.split(/([0-9]+)/).pop();i={"padding-left":this.parentTabList.customPadding,"padding-right":this.parentTabList.customPadding,"background-size":`calc(100% - ${t}${e}) 3px`}}return e(s,{role:"presentation"},e("li",{class:"tab-item",role:"presentation"},e("a",{class:`tab ${t}`,style:i,role:"tab",ref:t=>this.linkEl=t,onClick:this.tabClicked,id:`tab-link-${this.tabId}`,onKeyDown:t=>this.tabPressed(t),"aria-selected":this.selected?"true":"false",tabindex:this.selected?0:-1},e("slot",null))))}get el(){return a(this)}};h.style=":host{font-family:inherit;display:inline-block}:host *{box-sizing:border-box}:host .tab-item{list-style-type:none;height:100%;display:inline-block}:host .tab-item .tab{-webkit-border-radius:0;-moz-border-radius:0;-ms-border-radius:0;border-radius:0;color:#575195;text-decoration:none;letter-spacing:0.7px;font-size:0.875rem;font-weight:500;opacity:1;position:relative;text-transform:uppercase;display:inline-block;height:3.3333333333em;line-height:3.3333333333em;padding-right:1.5rem;padding-left:1.5rem}:host .tab-item .tab[aria-selected=true]{font-weight:700;opacity:1;background:linear-gradient(currentColor, currentColor) bottom/0 0 no-repeat;background-size:calc(100% - 50px) 3px}:host .tab-item .tab[aria-selected=true].dark{color:#fff}:host .tab-item .tab,:host .tab-item .tab:hover,:host .tab-item .tab:active{outline:none}:host .tab-item .tab:focus{outline:none}:host .tab-item .tab.dark:not([aria-selected=true]){opacity:0.8;color:#fff}:host .tab-item .tab.user-is-tabbing:focus:not(:active){outline:none;-webkit-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;-moz-box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e;box-shadow:0 2px 2px 0 rgba(244, 243, 246, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 0 4px 3px #61279e}:host .tab-item .tab.user-is-tabbing:focus:not(:active)::-moz-focus-inner{border:0}:host.hide{display:none}";const b=class{constructor(e){t(this,e),this.wmTabSelected=i(this,"wmTabSelected",7),this.tabSelected=i(this,"tabSelected",7),this.controllerEnabled=!1,this.getSelectedTabItem=()=>this.tabItems.filter((t=>t.selected))[0],this.debouncedSetLayout=o((()=>{this.listWidth||this.setListWidth(),n(this.el)}),250)}get menuLayout(){return!!this.listWidth&&this.el.offsetWidth<this.listWidth-24}get tabItems(){return Array.from(this.el.querySelectorAll("wm-tab-item"))}getLinkEl(t){return t.shadowRoot.querySelector("a")}get panels(){const t=Array.from(document.querySelectorAll("wm-tab-panel")),i=this.tabItems.map((t=>t.tabId));return t.filter((t=>i.includes(t.tabId)))}getPanel(t){return this.panels.find((i=>i.tabId===t))}setListWidth(){let t=this.tabItems.reduce(((t,i)=>t+i.offsetWidth),0);this.listWidth=t&&t>0?t:this.listWidth}setSelected(t){if(this.tabItems.map((i=>i.selected=i.tabId===t)),1===this.panels.length&&this.tabItems.length>1){const t=this.getSelectedTabItem();this.setAttributesOnPanel(this.panels[0],t),this.panels[0].active=!0}else this.panels.map((i=>i.active=i.tabId===t))}showItems(){this.tabItems.map((t=>t.show=!0))}hideItems(){this.tabItems.map((t=>t.show=!1))}componentWillLoad(){this.el.focus=function(){const t=Array.from(this.querySelectorAll("wm-tab-item")).filter((t=>t.selected))[0];t&&t.focus()}}componentDidLoad(){this.setLayout(),this.setSelected(this.selectedTab||this.tabItems[0].tabId)}tabItemLoaded(t){this.setAriaOnPanelAndTab(t.target)}setAriaOnPanelAndTab(t){const i=this.getPanel(t.tabId);i?(this.setAttributesOnPanel(i,t),this.setAttributesOnTab(t,i)):1===this.panels.length&&this.setAttributesOnTab(t,this.panels[0])}setAttributesOnTab(t,i){const e=this.getLinkEl(t);e&&(e.setAttribute("aria-controls",i.id),e.setAttribute("href",`#${i.id}`))}removeAttributesOnTab(t){const i=this.getLinkEl(t);i&&(i.removeAttribute("aria-controls"),i.removeAttribute("href"))}setAttributesOnPanel(t,i){const e=this.getLinkEl(i);e&&(t.setAttribute("aria-labelledby",e.id),t.setAttribute("tab-id",i.tabId))}handleTabSelected(t){this.controllerEnabled&&this.setSelected(t.detail.tabId)}handleKeydown(t){const i=t.detail.key,e=this.tabItems.indexOf(t.detail.tabItem);"ArrowLeft"!==i&&"ArrowRight"!==i||this.handleLeftRightArrow(e,i),"ArrowDown"!==i&&"ArrowUp"!==i||this.handleUpDownArrow(i)}handleLeftRightArrow(t,i){i&&(t="ArrowLeft"===i?t-1:t+1),t<0?t=this.tabItems.length-1:t===this.tabItems.length&&(t=0),this.getLinkEl(this.tabItems[t]).focus()}handleUpDownArrow(t){if("ArrowDown"===t&&this.selectedTab){const t=this.getPanel(this.selectedTab);t&&t.focus()}}setLayout(){this.debouncedSetLayout()}renderMenuOrTabs(){if(this.menuLayout)return this.hideItems(),e("wm-select",{label:"Tab Selection","label-position":"none"},this.renderOptions());{this.showItems();let t={};return this.customPadding&&(t={"margin-left":"-"+this.customPadding}),e("ul",{class:`tabcontainer ${this.customBackground||""}`,style:t,role:"tablist"},e("slot",null))}}renderOptions(){return this.tabItems.map((t=>e("wm-option",{id:`tab-link-${t.tabId}`,selected:t.tabId===this.selectedTab,onClick:i=>{i.preventDefault(),this.wmTabSelected.emit({tabId:t.tabId}),this.tabSelected.emit({tabId:t.tabId})}},t.textContent)))}render(){return e(s,{class:this.menuLayout?"menu":""},this.renderMenuOrTabs())}get el(){return a(this)}static get watchers(){return{selectedTab:["setSelected"]}}};b.style=":host,wm-tab-list{position:relative;white-space:nowrap;height:100%;display:block}:host *,wm-tab-list *{box-sizing:border-box}:host .tabcontainer,wm-tab-list .tabcontainer{margin:0;margin-left:-24px;width:100%;height:4.0625rem;display:flex;flex-direction:row;align-items:center;padding:0}:host .tabcontainer.dark,wm-tab-list .tabcontainer.dark{background:#353b48;margin:0}:host wm-select,wm-tab-list wm-select{padding:0.375rem 0}";const l=class{constructor(e){t(this,e),this.tabPanelLoaded=i(this,"tabPanelLoaded",7),this.active=!1,this.tabId=""}componentWillLoad(){!this.el.id&&this.el.setAttribute("id",r())}componentDidLoad(){this.tabPanelLoaded.emit({tabId:this.tabId})}toggleTabbingOn(){this.el.classList.add("user-is-tabbing")}toggleTabbingOff(){this.el.classList.remove("user-is-tabbing")}render(){return e(s,{role:"tabpanel","aria-hidden":this.active?"false":"true",class:{"tab-hidden":!this.active},onBlur:()=>this.el.tabIndex=-1,tabIndex:-1})}get el(){return a(this)}};l.style="wm-tab-panel{visibility:inherit}wm-tab-panel.tab-hidden{display:none}wm-tab-panel:active{outline:none}wm-tab-panel:focus{outline:none}wm-tab-panel.user-is-tabbing:focus{outline:-webkit-focus-ring-color auto 5px}";export{h as wm_tab_item,b as wm_tab_list,l as wm_tab_panel}
|