@cloudscape-design/components-themeable 3.0.690 → 3.0.692
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/tabs/tab-header-bar.scss +86 -48
- package/lib/internal/template/button-dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/index.js +5 -0
- package/lib/internal/template/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/create-items-tree.d.ts +1 -0
- package/lib/internal/template/button-dropdown/utils/create-items-tree.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/create-items-tree.js +1 -1
- package/lib/internal/template/button-dropdown/utils/create-items-tree.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/utils.d.ts +1 -0
- package/lib/internal/template/button-dropdown/utils/utils.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/utils.js +10 -0
- package/lib/internal/template/button-dropdown/utils/utils.js.map +1 -1
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +1 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/internal/environment.js +1 -1
- package/lib/internal/template/internal/environment.json +1 -1
- package/lib/internal/template/tabs/interfaces.d.ts +36 -0
- package/lib/internal/template/tabs/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tabs/interfaces.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +25 -22
- package/lib/internal/template/tabs/styles.scoped.css +107 -77
- package/lib/internal/template/tabs/styles.selectors.js +25 -22
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +106 -17
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/test-utils/dom/tabs/index.d.ts +38 -1
- package/lib/internal/template/test-utils/dom/tabs/index.js +53 -2
- package/lib/internal/template/test-utils/dom/tabs/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/tabs/index.d.ts +38 -1
- package/lib/internal/template/test-utils/selectors/tabs/index.js +53 -2
- package/lib/internal/template/test-utils/selectors/tabs/index.js.map +1 -1
- package/lib/internal/template/test-utils/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
|
|
2
|
+
import ButtonWrapper from '../button';
|
|
2
3
|
export default class TabsWrapper extends ComponentWrapper {
|
|
3
4
|
static rootSelector: string;
|
|
4
5
|
/**
|
|
@@ -11,12 +12,40 @@ export default class TabsWrapper extends ComponentWrapper {
|
|
|
11
12
|
* @param index 1-based index of the clickable element to return
|
|
12
13
|
*/
|
|
13
14
|
findTabLinkByIndex(index: number): ElementWrapper;
|
|
15
|
+
/**
|
|
16
|
+
* Finds the tab header container at the given position (1-based) and returns the element.
|
|
17
|
+
*
|
|
18
|
+
* @param index 1-based index of the clickable element to return
|
|
19
|
+
*/
|
|
20
|
+
findTabHeaderContentByIndex(index: number): ElementWrapper;
|
|
14
21
|
/**
|
|
15
22
|
* Finds the tab with the given ID and returns the clickable element from its tab label.
|
|
16
23
|
*
|
|
17
|
-
* @param
|
|
24
|
+
* @param id ID of the clickable element to return
|
|
18
25
|
*/
|
|
19
26
|
findTabLinkById(id: string): ElementWrapper;
|
|
27
|
+
/**
|
|
28
|
+
* Finds the dismissible button by using the tab index.
|
|
29
|
+
*
|
|
30
|
+
* @param index 1-based index of the clickable element to return
|
|
31
|
+
*/
|
|
32
|
+
findDismissibleButtonByTabIndex(index: number): ButtonWrapper;
|
|
33
|
+
/**
|
|
34
|
+
* Finds the dismissible button by using the tab id
|
|
35
|
+
*
|
|
36
|
+
* @param id ID of the clickable element to return
|
|
37
|
+
*/
|
|
38
|
+
findDismissibleButtonByTabId(id: string): ButtonWrapper;
|
|
39
|
+
/**
|
|
40
|
+
* Finds the tab action by using the tab id
|
|
41
|
+
* @param id ID of the clickable element to return
|
|
42
|
+
*/
|
|
43
|
+
findActionByTabId(id: string): ElementWrapper;
|
|
44
|
+
/**
|
|
45
|
+
* Finds the tab action by using the tab index
|
|
46
|
+
* @param index 1-based index of the clickable element to return
|
|
47
|
+
*/
|
|
48
|
+
findActionByTabIndex(index: number): ElementWrapper;
|
|
20
49
|
/**
|
|
21
50
|
* Finds the currently active tab and returns the clickable element from its tab label.
|
|
22
51
|
*/
|
|
@@ -25,4 +54,12 @@ export default class TabsWrapper extends ComponentWrapper {
|
|
|
25
54
|
* Finds the currently displayed tab content and returns it.
|
|
26
55
|
*/
|
|
27
56
|
findTabContent(): ElementWrapper;
|
|
57
|
+
/**
|
|
58
|
+
* Finds the dismissible button for the active tab
|
|
59
|
+
*/
|
|
60
|
+
findActiveTabDismissibleButton(): ButtonWrapper;
|
|
61
|
+
/**
|
|
62
|
+
* Finds the tab action for the active tab
|
|
63
|
+
*/
|
|
64
|
+
findActiveTabAction(): ElementWrapper;
|
|
28
65
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
6
|
+
const button_1 = require("../button");
|
|
6
7
|
const styles_selectors_js_1 = require("../../../tabs/styles.selectors.js");
|
|
7
8
|
class TabsWrapper extends selectors_1.ComponentWrapper {
|
|
8
9
|
/**
|
|
@@ -19,19 +20,57 @@ class TabsWrapper extends selectors_1.ComponentWrapper {
|
|
|
19
20
|
findTabLinkByIndex(index) {
|
|
20
21
|
return this.find(`.${styles_selectors_js_1.default['tabs-tab']}:nth-child(${index}) .${styles_selectors_js_1.default['tabs-tab-link']}`);
|
|
21
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Finds the tab header container at the given position (1-based) and returns the element.
|
|
25
|
+
*
|
|
26
|
+
* @param index 1-based index of the clickable element to return
|
|
27
|
+
*/
|
|
28
|
+
findTabHeaderContentByIndex(index) {
|
|
29
|
+
return this.find(`.${styles_selectors_js_1.default['tabs-tab']}:nth-child(${index}) .${styles_selectors_js_1.default['tabs-tab-header-container']}`);
|
|
30
|
+
}
|
|
22
31
|
/**
|
|
23
32
|
* Finds the tab with the given ID and returns the clickable element from its tab label.
|
|
24
33
|
*
|
|
25
|
-
* @param
|
|
34
|
+
* @param id ID of the clickable element to return
|
|
26
35
|
*/
|
|
27
36
|
findTabLinkById(id) {
|
|
28
37
|
return this.find(`.${styles_selectors_js_1.default['tabs-tab-link']}[data-testid="${id}"]`);
|
|
29
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Finds the dismissible button by using the tab index.
|
|
41
|
+
*
|
|
42
|
+
* @param index 1-based index of the clickable element to return
|
|
43
|
+
*/
|
|
44
|
+
findDismissibleButtonByTabIndex(index) {
|
|
45
|
+
return this.findComponent(`.${styles_selectors_js_1.default['tabs-tab']}:nth-child(${index}) .${styles_selectors_js_1.default['tabs-tab-dismiss']}`, button_1.default);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Finds the dismissible button by using the tab id
|
|
49
|
+
*
|
|
50
|
+
* @param id ID of the clickable element to return
|
|
51
|
+
*/
|
|
52
|
+
findDismissibleButtonByTabId(id) {
|
|
53
|
+
return this.findComponent(`.${styles_selectors_js_1.default['tabs-tab-link']}[data-testid="${id}"] ~ .${styles_selectors_js_1.default['tabs-tab-dismiss']}`, button_1.default);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Finds the tab action by using the tab id
|
|
57
|
+
* @param id ID of the clickable element to return
|
|
58
|
+
*/
|
|
59
|
+
findActionByTabId(id) {
|
|
60
|
+
return this.find(`.${styles_selectors_js_1.default['tabs-tab-link']}[data-testid="${id}"] ~ .${styles_selectors_js_1.default['tabs-tab-action']}`);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Finds the tab action by using the tab index
|
|
64
|
+
* @param index 1-based index of the clickable element to return
|
|
65
|
+
*/
|
|
66
|
+
findActionByTabIndex(index) {
|
|
67
|
+
return this.find(`.${styles_selectors_js_1.default['tabs-tab']}:nth-child(${index}) .${styles_selectors_js_1.default['tabs-tab-action']}`);
|
|
68
|
+
}
|
|
30
69
|
/**
|
|
31
70
|
* Finds the currently active tab and returns the clickable element from its tab label.
|
|
32
71
|
*/
|
|
33
72
|
findActiveTab() {
|
|
34
|
-
return this.find(`.${styles_selectors_js_1.default['tabs-tab-active']}`);
|
|
73
|
+
return this.find(`.${styles_selectors_js_1.default['tabs-tab-active']} .${styles_selectors_js_1.default['tabs-tab-link']}`);
|
|
35
74
|
}
|
|
36
75
|
/**
|
|
37
76
|
* Finds the currently displayed tab content and returns it.
|
|
@@ -39,6 +78,18 @@ class TabsWrapper extends selectors_1.ComponentWrapper {
|
|
|
39
78
|
findTabContent() {
|
|
40
79
|
return this.find(`.${styles_selectors_js_1.default['tabs-content-active']}`);
|
|
41
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Finds the dismissible button for the active tab
|
|
83
|
+
*/
|
|
84
|
+
findActiveTabDismissibleButton() {
|
|
85
|
+
return this.findComponent(`.${styles_selectors_js_1.default['tabs-tab-active']} .${styles_selectors_js_1.default['tabs-tab-dismiss']}`, button_1.default);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Finds the tab action for the active tab
|
|
89
|
+
*/
|
|
90
|
+
findActiveTabAction() {
|
|
91
|
+
return this.find(`.${styles_selectors_js_1.default['tabs-tab-active']} .${styles_selectors_js_1.default['tabs-tab-action']}`);
|
|
92
|
+
}
|
|
42
93
|
}
|
|
43
94
|
exports.default = TabsWrapper;
|
|
44
95
|
TabsWrapper.rootSelector = styles_selectors_js_1.default.root;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/tabs/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,2EAAuD;AACvD,MAAqB,WAAY,SAAQ,4BAAgB;IAGvD;;OAEG;IACH,YAAY;QACV,OAAO,IAAI,CAAC,kBAAkB,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAC,CA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