@cloudscape-design/components 3.0.1400 → 3.0.1402
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/autosuggest/i18n-utils.d.ts +11 -0
- package/autosuggest/i18n-utils.d.ts.map +1 -0
- package/autosuggest/i18n-utils.js +15 -0
- package/autosuggest/i18n-utils.js.map +1 -0
- package/autosuggest/index.d.ts.map +1 -1
- package/autosuggest/index.js +3 -0
- package/autosuggest/index.js.map +1 -1
- package/autosuggest/interfaces.d.ts +94 -1
- package/autosuggest/interfaces.d.ts.map +1 -1
- package/autosuggest/interfaces.js.map +1 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js +21 -12
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/options-controller.d.ts +3 -1
- package/autosuggest/options-controller.d.ts.map +1 -1
- package/autosuggest/options-controller.js +3 -6
- package/autosuggest/options-controller.js.map +1 -1
- package/box/interfaces.d.ts +4 -1
- package/box/interfaces.d.ts.map +1 -1
- package/box/interfaces.js.map +1 -1
- package/box/styles.css.js +214 -220
- package/box/styles.scoped.css +259 -289
- package/box/styles.selectors.js +214 -220
- package/button/interfaces.d.ts +3 -1
- package/button/interfaces.d.ts.map +1 -1
- package/button/interfaces.js.map +1 -1
- package/button/internal.d.ts +2 -2
- package/button/internal.d.ts.map +1 -1
- package/button/internal.js +9 -1
- package/button/internal.js.map +1 -1
- package/button/styles.css.js +24 -23
- package/button/styles.scoped.css +116 -70
- package/button/styles.selectors.js +24 -23
- package/button-dropdown/filter.d.ts +1 -1
- package/button-dropdown/filter.d.ts.map +1 -1
- package/button-dropdown/interfaces.d.ts +6 -3
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-group/interfaces.d.ts +22 -13
- package/button-group/interfaces.d.ts.map +1 -1
- package/button-group/interfaces.js.map +1 -1
- package/calendar/grid/index.js.map +1 -1
- package/calendar/interfaces.d.ts +3 -1
- package/calendar/interfaces.d.ts.map +1 -1
- package/calendar/interfaces.js.map +1 -1
- package/copy-to-clipboard/interfaces.d.ts +3 -1
- package/copy-to-clipboard/interfaces.d.ts.map +1 -1
- package/copy-to-clipboard/interfaces.js.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.d.ts +1 -1
- package/date-range-picker/calendar/grids/grid-cell.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/grid-cell.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +3 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/drawer/interfaces.d.ts +3 -1
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/i18n/messages/all.all.js +1 -1
- package/i18n/messages/all.all.json +1 -1
- package/i18n/messages/all.de.js +1 -1
- package/i18n/messages/all.de.json +1 -1
- package/i18n/messages/all.en-GB.js +1 -1
- package/i18n/messages/all.en-GB.json +1 -1
- package/i18n/messages/all.en.js +1 -1
- package/i18n/messages/all.en.json +1 -1
- package/i18n/messages/all.es.js +1 -1
- package/i18n/messages/all.es.json +1 -1
- package/i18n/messages/all.fr.js +1 -1
- package/i18n/messages/all.fr.json +1 -1
- package/i18n/messages/all.id.js +1 -1
- package/i18n/messages/all.id.json +1 -1
- package/i18n/messages/all.it.js +1 -1
- package/i18n/messages/all.it.json +1 -1
- package/i18n/messages/all.ja.js +1 -1
- package/i18n/messages/all.ja.json +1 -1
- package/i18n/messages/all.ko.js +1 -1
- package/i18n/messages/all.ko.json +1 -1
- package/i18n/messages/all.pt-BR.js +1 -1
- package/i18n/messages/all.pt-BR.json +1 -1
- package/i18n/messages/all.tr.js +1 -1
- package/i18n/messages/all.tr.json +1 -1
- package/i18n/messages/all.zh-CN.js +1 -1
- package/i18n/messages/all.zh-CN.json +1 -1
- package/i18n/messages/all.zh-TW.js +1 -1
- package/i18n/messages/all.zh-TW.json +1 -1
- package/i18n/messages-types.d.ts +13 -0
- package/i18n/messages-types.d.ts.map +1 -1
- package/i18n/messages-types.js.map +1 -1
- package/input/internal.d.ts +1 -0
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +15 -19
- package/input/internal.js.map +1 -1
- package/input/styles.css.js +37 -36
- package/input/styles.scoped.css +180 -243
- package/input/styles.selectors.js +37 -36
- package/internal/base-component/styles.scoped.css +1 -1
- package/internal/base-theme/styles.scoped.css +0 -61
- package/internal/components/autosuggest-input/index.d.ts +5 -0
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js +158 -12
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/autosuggest-input/inline-tokens.d.ts +20 -0
- package/internal/components/autosuggest-input/inline-tokens.d.ts.map +1 -0
- package/internal/components/autosuggest-input/inline-tokens.js +95 -0
- package/internal/components/autosuggest-input/inline-tokens.js.map +1 -0
- package/internal/components/autosuggest-input/overflow-dropdown.d.ts +26 -0
- package/internal/components/autosuggest-input/overflow-dropdown.d.ts.map +1 -0
- package/internal/components/autosuggest-input/overflow-dropdown.js +94 -0
- package/internal/components/autosuggest-input/overflow-dropdown.js.map +1 -0
- package/internal/components/autosuggest-input/styles.css.js +27 -2
- package/internal/components/autosuggest-input/styles.scoped.css +195 -2
- package/internal/components/autosuggest-input/styles.selectors.js +27 -2
- package/internal/components/autosuggest-input/test-classes/styles.css.js +9 -0
- package/internal/components/autosuggest-input/test-classes/styles.scoped.css +19 -0
- package/internal/components/autosuggest-input/test-classes/styles.selectors.js +10 -0
- package/internal/components/autosuggest-input/use-token-overflow.d.ts +30 -0
- package/internal/components/autosuggest-input/use-token-overflow.d.ts.map +1 -0
- package/internal/components/autosuggest-input/use-token-overflow.js +63 -0
- package/internal/components/autosuggest-input/use-token-overflow.js.map +1 -0
- package/internal/components/button-trigger/index.d.ts +4 -1
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +5 -3
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +23 -21
- package/internal/components/button-trigger/styles.scoped.css +79 -36
- package/internal/components/button-trigger/styles.selectors.js +23 -21
- package/internal/components/control-group/grouped-control-styles.d.ts +2 -1
- package/internal/components/control-group/grouped-control-styles.d.ts.map +1 -1
- package/internal/components/control-group/grouped-control-styles.js +3 -2
- package/internal/components/control-group/grouped-control-styles.js.map +1 -1
- package/internal/components/control-group/index.d.ts +5 -10
- package/internal/components/control-group/index.d.ts.map +1 -1
- package/internal/components/control-group/index.js +16 -10
- package/internal/components/control-group/index.js.map +1 -1
- package/internal/components/control-group/interfaces.d.ts +42 -0
- package/internal/components/control-group/interfaces.d.ts.map +1 -0
- package/internal/components/control-group/interfaces.js +2 -0
- package/internal/components/control-group/interfaces.js.map +1 -0
- package/internal/components/control-group/styles.css.js +16 -11
- package/internal/components/control-group/styles.scoped.css +34 -14
- package/internal/components/control-group/styles.selectors.js +16 -11
- package/internal/components/control-group/test-classes/styles.css.js +8 -0
- package/internal/components/control-group/test-classes/styles.scoped.css +15 -0
- package/internal/components/control-group/test-classes/styles.selectors.js +9 -0
- package/internal/components/option/interfaces.d.ts +1 -1
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/context/control-group-context.d.ts +5 -0
- package/internal/context/control-group-context.d.ts.map +1 -1
- package/internal/context/control-group-context.js +1 -0
- package/internal/context/control-group-context.js.map +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/hooks/use-hidden-description/index.d.ts +2 -1
- package/internal/hooks/use-hidden-description/index.d.ts.map +1 -1
- package/internal/hooks/use-hidden-description/index.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/manifest.json +2 -2
- package/package.json +1 -1
- package/segmented-control/interfaces.d.ts +2 -2
- package/segmented-control/interfaces.d.ts.map +1 -1
- package/segmented-control/interfaces.js.map +1 -1
- package/segmented-control/styles.css.js +27 -26
- package/segmented-control/styles.scoped.css +51 -47
- package/segmented-control/styles.selectors.js +27 -26
- package/select/interfaces.d.ts +1 -1
- package/select/interfaces.js.map +1 -1
- package/select/parts/filter.d.ts +1 -1
- package/select/parts/filter.d.ts.map +1 -1
- package/table/body-cell/disabled-inline-editor.d.ts +2 -1
- package/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
- package/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/table/interfaces.d.ts +5 -3
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/tabs/interfaces.d.ts +4 -2
- package/tabs/interfaces.d.ts.map +1 -1
- package/tabs/interfaces.js.map +1 -1
- package/test-utils/dom/autosuggest/index.d.ts +39 -0
- package/test-utils/dom/autosuggest/index.js +68 -16
- package/test-utils/dom/autosuggest/index.js.map +1 -1
- package/test-utils/dom/internal/control-group.d.ts +5 -0
- package/test-utils/dom/internal/control-group.js +9 -2
- package/test-utils/dom/internal/control-group.js.map +1 -1
- package/test-utils/selectors/autosuggest/index.d.ts +53 -0
- package/test-utils/selectors/autosuggest/index.js +84 -16
- package/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/test-utils/selectors/internal/control-group.d.ts +5 -0
- package/test-utils/selectors/internal/control-group.js +9 -2
- package/test-utils/selectors/internal/control-group.js.map +1 -1
- package/toggle-button/interfaces.d.ts +3 -1
- package/toggle-button/interfaces.d.ts.map +1 -1
- package/toggle-button/interfaces.js.map +1 -1
- package/token/dismiss-button.d.ts.map +1 -1
- package/token/dismiss-button.js +6 -3
- package/token/dismiss-button.js.map +1 -1
- package/types/option.d.ts +1 -1
- package/types/option.d.ts.map +1 -1
- package/types/option.js.map +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
|
|
2
2
|
import InputWrapper from '../input';
|
|
3
3
|
import OptionWrapper from '../internal/option';
|
|
4
|
+
import TokenWrapper from '../token';
|
|
4
5
|
export declare class AutosuggestDropdownWrapper extends ComponentWrapper {
|
|
5
6
|
findOptions(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<OptionWrapper>;
|
|
6
7
|
/**
|
|
@@ -70,4 +71,56 @@ export default class AutosuggestWrapper extends InputWrapper {
|
|
|
70
71
|
findEnteredTextOption(options?: {
|
|
71
72
|
expandToViewport: boolean;
|
|
72
73
|
}): ElementWrapper;
|
|
74
|
+
/**
|
|
75
|
+
* Selects a suggestion from the dropdown by simulating mouse events.
|
|
76
|
+
*
|
|
77
|
+
* @param index 1-based index of the suggestion to select.
|
|
78
|
+
* @param options
|
|
79
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
80
|
+
*/
|
|
81
|
+
/**
|
|
82
|
+
* Selects a suggestion from the dropdown by simulating mouse events.
|
|
83
|
+
*
|
|
84
|
+
* @param value value of suggestion to select
|
|
85
|
+
* @param options
|
|
86
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
87
|
+
*/
|
|
88
|
+
/**
|
|
89
|
+
* Returns the tokens shown inline in the input (tokens collapsed into the overflow dropdown are excluded).
|
|
90
|
+
* Applies only when the `tokens` property is set.
|
|
91
|
+
*/
|
|
92
|
+
findVisibleTokens(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<TokenWrapper>;
|
|
93
|
+
/**
|
|
94
|
+
* Returns an inline token. Applies only when the `tokens` property is set.
|
|
95
|
+
*
|
|
96
|
+
* @param index 1-based index among the visible tokens.
|
|
97
|
+
*/
|
|
98
|
+
findVisibleToken(index: number): TokenWrapper;
|
|
99
|
+
/**
|
|
100
|
+
* Returns the `+N` button that opens the overflow dropdown, or `null` when all tokens fit.
|
|
101
|
+
* Applies only when the `tokens` property is set.
|
|
102
|
+
*/
|
|
103
|
+
findOverflowTrigger(): ElementWrapper;
|
|
104
|
+
/**
|
|
105
|
+
* Returns the open overflow dropdown that lists the tokens collapsed behind the `+N` button.
|
|
106
|
+
*
|
|
107
|
+
* @param options
|
|
108
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
109
|
+
*/
|
|
110
|
+
findOverflowDropdown(options?: {
|
|
111
|
+
expandToViewport: boolean;
|
|
112
|
+
}): AutosuggestOverflowDropdownWrapper;
|
|
113
|
+
}
|
|
114
|
+
export declare class AutosuggestOverflowDropdownWrapper extends ComponentWrapper {
|
|
115
|
+
static rootSelector: string;
|
|
116
|
+
/**
|
|
117
|
+
* Returns the tokens listed in the overflow dropdown.
|
|
118
|
+
*/
|
|
119
|
+
findTokens(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<TokenWrapper>;
|
|
120
|
+
/**
|
|
121
|
+
* Returns a token from the overflow dropdown.
|
|
122
|
+
*
|
|
123
|
+
* @param index 1-based index of the token.
|
|
124
|
+
*/
|
|
125
|
+
findToken(index: number): TokenWrapper;
|
|
73
126
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AutosuggestDropdownWrapper = void 0;
|
|
3
|
+
exports.AutosuggestOverflowDropdownWrapper = exports.AutosuggestDropdownWrapper = void 0;
|
|
4
4
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
5
5
|
// SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
@@ -9,15 +9,17 @@ const input_1 = require("../input");
|
|
|
9
9
|
const dropdown_1 = require("../internal/dropdown");
|
|
10
10
|
const option_1 = require("../internal/option");
|
|
11
11
|
const options_list_1 = require("../internal/options-list");
|
|
12
|
+
const token_1 = require("../token");
|
|
12
13
|
const styles_selectors_js_1 = require("../../../autosuggest/styles.selectors.js");
|
|
13
14
|
const styles_selectors_js_2 = require("../../../dropdown/styles.selectors.js");
|
|
14
|
-
const styles_selectors_js_3 = require("../../../internal/components/
|
|
15
|
+
const styles_selectors_js_3 = require("../../../internal/components/autosuggest-input/test-classes/styles.selectors.js");
|
|
15
16
|
const styles_selectors_js_4 = require("../../../internal/components/dropdown-status/styles.selectors.js");
|
|
16
|
-
const styles_selectors_js_5 = require("../../../internal/components/
|
|
17
|
-
const styles_selectors_js_6 = require("../../../internal/components/
|
|
17
|
+
const styles_selectors_js_5 = require("../../../internal/components/dropdown-status/styles.selectors.js");
|
|
18
|
+
const styles_selectors_js_6 = require("../../../internal/components/option/styles.selectors.js");
|
|
19
|
+
const styles_selectors_js_7 = require("../../../internal/components/selectable-item/styles.selectors.js");
|
|
18
20
|
class AutosuggestDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
19
21
|
findOptions() {
|
|
20
|
-
return this.findAll(`.${
|
|
22
|
+
return this.findAll(`.${styles_selectors_js_7.default['selectable-item']}[data-test-index] .${option_1.default.rootSelector}`).map((elementWrapper) => new option_1.default(elementWrapper.getElement()));
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Returns an option from the dropdown.
|
|
@@ -25,7 +27,7 @@ class AutosuggestDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
25
27
|
* @param optionIndex 1-based index of the option to select.
|
|
26
28
|
*/
|
|
27
29
|
findOption(optionIndex) {
|
|
28
|
-
return this.findComponent(`.${
|
|
30
|
+
return this.findComponent(`.${styles_selectors_js_7.default['selectable-item']}[data-test-index="${optionIndex}"] .${option_1.default.rootSelector}`, option_1.default);
|
|
29
31
|
}
|
|
30
32
|
/**
|
|
31
33
|
* Returns an option from the autosuggest by it's value
|
|
@@ -34,7 +36,7 @@ class AutosuggestDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
34
36
|
*/
|
|
35
37
|
findOptionByValue(value) {
|
|
36
38
|
const toReplace = (0, utils_1.escapeSelector)(value);
|
|
37
|
-
return this.findComponent(`.${
|
|
39
|
+
return this.findComponent(`.${styles_selectors_js_7.default['selectable-item']} .${option_1.default.rootSelector}[data-value="${toReplace}"]`, option_1.default);
|
|
38
40
|
}
|
|
39
41
|
/**
|
|
40
42
|
* Returns an option from the dropdown.
|
|
@@ -43,7 +45,7 @@ class AutosuggestDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
43
45
|
* @param optionIndex 1-based index of the option to select.
|
|
44
46
|
*/
|
|
45
47
|
findOptionInGroup(groupIndex, optionIndex) {
|
|
46
|
-
return this.findComponent(`.${
|
|
48
|
+
return this.findComponent(`.${styles_selectors_js_7.default['selectable-item']}[data-group-index="${groupIndex}"][data-in-group-index="${optionIndex}"] .${option_1.default.rootSelector}`, option_1.default);
|
|
47
49
|
}
|
|
48
50
|
/**
|
|
49
51
|
* Use this element to scroll through the list of options
|
|
@@ -52,31 +54,31 @@ class AutosuggestDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
52
54
|
return this.findByClassName(options_list_1.default.rootSelector);
|
|
53
55
|
}
|
|
54
56
|
findFooterRegion() {
|
|
55
|
-
return this.findByClassName(
|
|
57
|
+
return this.findByClassName(styles_selectors_js_5.default.root);
|
|
56
58
|
}
|
|
57
59
|
findOpenDropdown() {
|
|
58
60
|
const dropdown = new dropdown_1.default(this.getElement());
|
|
59
61
|
return dropdown.findOpenDropdown();
|
|
60
62
|
}
|
|
61
63
|
findHighlightedOption() {
|
|
62
|
-
return this.findComponent(`.${
|
|
64
|
+
return this.findComponent(`.${styles_selectors_js_7.default.highlighted}`, option_1.default);
|
|
63
65
|
}
|
|
64
66
|
/**
|
|
65
67
|
* Returns all the selected options.
|
|
66
68
|
*/
|
|
67
69
|
findDisabledOptions() {
|
|
68
|
-
return this.findAllByClassName(
|
|
70
|
+
return this.findAllByClassName(styles_selectors_js_7.default.disabled).map((elementWrapper) => new option_1.default(elementWrapper.getElement()));
|
|
69
71
|
}
|
|
70
72
|
/**
|
|
71
73
|
* Returns highlighted text fragments from all of the options.
|
|
72
74
|
* Options get highlighted when they match the value of the input field.
|
|
73
75
|
*/
|
|
74
76
|
findHighlightedMatches() {
|
|
75
|
-
return this.findAllByClassName(
|
|
77
|
+
return this.findAllByClassName(styles_selectors_js_6.default['filtering-match-highlight']);
|
|
76
78
|
}
|
|
77
79
|
findHighlightedAriaLiveRegion() {
|
|
78
80
|
var _a, _b;
|
|
79
|
-
return (_b = (_a = this.findHighlightedOption()) === null || _a === void 0 ? void 0 : _a.findByClassName(
|
|
81
|
+
return (_b = (_a = this.findHighlightedOption()) === null || _a === void 0 ? void 0 : _a.findByClassName(styles_selectors_js_7.default['screenreader-content'])) !== null && _b !== void 0 ? _b : null;
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
exports.AutosuggestDropdownWrapper = AutosuggestDropdownWrapper;
|
|
@@ -102,7 +104,7 @@ class AutosuggestWrapper extends input_1.default {
|
|
|
102
104
|
findStatusIndicator(options = {
|
|
103
105
|
expandToViewport: false
|
|
104
106
|
}) {
|
|
105
|
-
return this.findDropdown(options).findByClassName(
|
|
107
|
+
return this.findDropdown(options).findByClassName(styles_selectors_js_4.default.root);
|
|
106
108
|
}
|
|
107
109
|
/**
|
|
108
110
|
* @param options
|
|
@@ -111,7 +113,7 @@ class AutosuggestWrapper extends input_1.default {
|
|
|
111
113
|
findErrorRecoveryButton(options = {
|
|
112
114
|
expandToViewport: false
|
|
113
115
|
}) {
|
|
114
|
-
return this.findDropdown(options).findByClassName(
|
|
116
|
+
return this.findDropdown(options).findByClassName(styles_selectors_js_5.default.recovery);
|
|
115
117
|
}
|
|
116
118
|
/**
|
|
117
119
|
* @param options
|
|
@@ -120,9 +122,75 @@ class AutosuggestWrapper extends input_1.default {
|
|
|
120
122
|
findEnteredTextOption(options = {
|
|
121
123
|
expandToViewport: false
|
|
122
124
|
}) {
|
|
123
|
-
return this.findDropdown(options).findByClassName(
|
|
125
|
+
return this.findDropdown(options).findByClassName(styles_selectors_js_7.default['has-background']);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Selects a suggestion from the dropdown by simulating mouse events.
|
|
129
|
+
*
|
|
130
|
+
* @param index 1-based index of the suggestion to select.
|
|
131
|
+
* @param options
|
|
132
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
133
|
+
*/
|
|
134
|
+
/**
|
|
135
|
+
* Selects a suggestion from the dropdown by simulating mouse events.
|
|
136
|
+
*
|
|
137
|
+
* @param value value of suggestion to select
|
|
138
|
+
* @param options
|
|
139
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
140
|
+
*/
|
|
141
|
+
/**
|
|
142
|
+
* Returns the tokens shown inline in the input (tokens collapsed into the overflow dropdown are excluded).
|
|
143
|
+
* Applies only when the `tokens` property is set.
|
|
144
|
+
*/
|
|
145
|
+
findVisibleTokens() {
|
|
146
|
+
return this.findAll(`.${styles_selectors_js_3.default['token-list-item']} > .${token_1.default.rootSelector}`).map((elementWrapper) => new token_1.default(elementWrapper.getElement()));
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Returns an inline token. Applies only when the `tokens` property is set.
|
|
150
|
+
*
|
|
151
|
+
* @param index 1-based index among the visible tokens.
|
|
152
|
+
*/
|
|
153
|
+
findVisibleToken(index) {
|
|
154
|
+
return this.findComponent(`.${styles_selectors_js_3.default['token-list']} > li:nth-child(${index}) > .${token_1.default.rootSelector}`, token_1.default);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Returns the `+N` button that opens the overflow dropdown, or `null` when all tokens fit.
|
|
158
|
+
* Applies only when the `tokens` property is set.
|
|
159
|
+
*/
|
|
160
|
+
findOverflowTrigger() {
|
|
161
|
+
return this.findByClassName(styles_selectors_js_3.default['token-overflow-trigger']);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Returns the open overflow dropdown that lists the tokens collapsed behind the `+N` button.
|
|
165
|
+
*
|
|
166
|
+
* @param options
|
|
167
|
+
* * expandToViewport (boolean) - Use this when the component under test is rendered with an `expandToViewport` flag.
|
|
168
|
+
*/
|
|
169
|
+
findOverflowDropdown(options = {
|
|
170
|
+
expandToViewport: false
|
|
171
|
+
}) {
|
|
172
|
+
const root = options.expandToViewport ? (0, selectors_1.createWrapper)() : this;
|
|
173
|
+
return root.findComponent(`.${styles_selectors_js_2.default.dropdown}[data-open=true] .${AutosuggestOverflowDropdownWrapper.rootSelector}`, AutosuggestOverflowDropdownWrapper);
|
|
124
174
|
}
|
|
125
175
|
}
|
|
126
176
|
AutosuggestWrapper.rootSelector = styles_selectors_js_1.default.root;
|
|
127
177
|
exports.default = AutosuggestWrapper;
|
|
178
|
+
class AutosuggestOverflowDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
179
|
+
/**
|
|
180
|
+
* Returns the tokens listed in the overflow dropdown.
|
|
181
|
+
*/
|
|
182
|
+
findTokens() {
|
|
183
|
+
return this.findAll(`li > .${token_1.default.rootSelector}`).map((elementWrapper) => new token_1.default(elementWrapper.getElement()));
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Returns a token from the overflow dropdown.
|
|
187
|
+
*
|
|
188
|
+
* @param index 1-based index of the token.
|
|
189
|
+
*/
|
|
190
|
+
findToken(index) {
|
|
191
|
+
return this.findComponent(`li:nth-child(${index}) > .${token_1.default.rootSelector}`, token_1.default);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
exports.AutosuggestOverflowDropdownWrapper = AutosuggestOverflowDropdownWrapper;
|
|
195
|
+
AutosuggestOverflowDropdownWrapper.rootSelector = styles_selectors_js_3.default['overflow-dropdown'];
|
|
128
196
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/autosuggest/index.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,oEAA0E;AAC1E,oCAAoC;AACpC,mDAAmD;AACnD,+CAA+C;AAC/C,2DAA0D;AAC1D,kFAAkE;AAClE,+EAAmE;AACnE,0GAAoG;AACpG,0GAA4F;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AED;;;OAGG;IACH,mBAAmB,CAAC,OAAO,GAAG;QAC5B,gBAAgB,EAAE,KAAK;KACxB;QACC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,6BAAoB,CAAC,IAAI,CAAC,CAAC;IAC/E,CAAC;IAED;;;OAGG;IACH,uBAAuB,CAAC,OAAO,GAAG;QAChC,gBAAgB,EAAE,KAAK;KACxB;QACC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,6BAAY,CAAC,QAAQ,CAAC,CAAC;IAC3E,CAAC;IAED;;;OAGG;IACH,qBAAqB,CAAC,OAAO,GAAG;QAC9B,gBAAgB,EAAE,KAAK;KACxB;QACC,OAAO,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,eAAe,CAAC,6BAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxF,CAAC;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/autosuggest/index.ts"],"names":[],"mappings":";;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,oEAA0E;AAC1E,oCAAoC;AACpC,mDAAmD;AACnD,+CAA+C;AAC/C,2DAA0D;AAC1D,oCAAoC;AACpC,kFAAkE;AAClE,+EAAmE;AACnE,yHAA6H;AAC7H,0GAAoG;AACpG,0GAA4F;AAC5F,iGAAmF;AACnF,0GAAgG;AAChG,MAAa,0BAA2B,SAAQ,4BAAgB;IAC9D,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,6BAAgB,CAAC,iBAAiB,CAAC,sBAAsB,gBAAa,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,IAAI,gBAAa,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACzM,CAAC;IAED;;;;OAIG;IACH,UAAU,CAAC,WAAmB;QAC5B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Q,4BAAgB;IAGtE;;OAEG;IACH,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,SAAS,eAAY,CAAC,YAAY,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,cAA8B,EAAE,EAAE,CAAC,IAAI,eAAY,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IACnJ,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC,gBAAgB,KAAK,QAAQ,eAAY,CAAC,YAAY,EAAE,EAAE,eAAY,CAAC,CAAC;IACpG,CAAC;;AAjBH,gFAkBC;AAjBQ,+CAAY,GAAW,6BAA8B,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-core/selectors";
|
|
2
|
+
import ButtonWrapper from '../button';
|
|
2
3
|
export default class ControlGroupWrapper extends ComponentWrapper {
|
|
3
4
|
static rootSelector: string;
|
|
4
5
|
/**
|
|
5
6
|
* Returns the visible inline label element, or null if no label is set.
|
|
6
7
|
*/
|
|
7
8
|
findInlineLabel(): ElementWrapper;
|
|
9
|
+
/**
|
|
10
|
+
* Returns the action button, or null if no action is set.
|
|
11
|
+
*/
|
|
12
|
+
findActionButton(): ButtonWrapper;
|
|
8
13
|
}
|
|
@@ -3,7 +3,8 @@ 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
|
|
6
|
+
const button_1 = require("../button");
|
|
7
|
+
const styles_selectors_js_1 = require("../../../internal/components/control-group/test-classes/styles.selectors.js");
|
|
7
8
|
class ControlGroupWrapper extends selectors_1.ComponentWrapper {
|
|
8
9
|
/**
|
|
9
10
|
* Returns the visible inline label element, or null if no label is set.
|
|
@@ -11,7 +12,13 @@ class ControlGroupWrapper extends selectors_1.ComponentWrapper {
|
|
|
11
12
|
findInlineLabel() {
|
|
12
13
|
return this.findByClassName(styles_selectors_js_1.default['inline-label']);
|
|
13
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns the action button, or null if no action is set.
|
|
17
|
+
*/
|
|
18
|
+
findActionButton() {
|
|
19
|
+
return this.findComponent(`.${styles_selectors_js_1.default['action-button']}`, button_1.default);
|
|
20
|
+
}
|
|
14
21
|
}
|
|
15
|
-
ControlGroupWrapper.rootSelector = styles_selectors_js_1.default
|
|
22
|
+
ControlGroupWrapper.rootSelector = styles_selectors_js_1.default.root;
|
|
16
23
|
exports.default = ControlGroupWrapper;
|
|
17
24
|
//# sourceMappingURL=control-group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-group.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/internal/control-group.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,
|
|
1
|
+
{"version":3,"file":"control-group.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/internal/control-group.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,sCAAsC;AACtC,qHAAyG;AACzG,MAAqB,mBAAoB,SAAQ,4BAAgB;IAG/D;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,6BAAc,CAAC,eAAe,CAAC,EAAE,EAAE,gBAAa,CAAC,CAAC;IAClF,CAAC;;AAdM,gCAAY,GAAW,6BAAc,CAAC,IAAI,CAAC;kBAD/B,mBAAmB"}
|
|
@@ -55,8 +55,10 @@ export interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonPr
|
|
|
55
55
|
* Provides a reason why the button is disabled (only when `disabled` is `true`).
|
|
56
56
|
* If provided, the button becomes focusable.
|
|
57
57
|
* Applicable only for the normal variant.
|
|
58
|
+
*
|
|
59
|
+
* Do not place interactive elements like links or buttons.
|
|
58
60
|
*/
|
|
59
|
-
disabledReason?:
|
|
61
|
+
disabledReason?: React.ReactNode;
|
|
60
62
|
/**
|
|
61
63
|
* Called when the user changes their selection.
|
|
62
64
|
* The event `detail` contains the current value for the `pressed` property.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle-button/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,wBAAwB,CAAC;IAC5G;;;;;OAKG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle-button/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,wBAAwB,CAAC;IAC5G;;;;;OAKG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAEjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;CACtE;AAED,yBAAiB,iBAAiB,CAAC;IACjC,KAAY,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAExC,UAAiB,YAAY;QAC3B,OAAO,EAAE,OAAO,CAAC;KAClB;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;KACrC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle-button/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonProps, 'nativeAnchorAttributes'> {\n /** Determines the general styling of the toggle button as follows:\n * * `normal` for secondary buttons.\n * * `icon` to display an icon only (no text).\n *\n * Defaults to `normal` if not specified.\n */\n variant?: ToggleButtonProps.Variant;\n\n /**\n * Displays an icon next to the text.\n */\n iconName?: IconProps.Name;\n\n /**\n * Displays an icon next to the text in pressed state.\n */\n pressedIconName?: IconProps.Name;\n\n /**\n * Specifies the URL of a custom icon in pressed state. Use this property if the icon needed for your use case isn't available.\n *\n * `pressedIconSvg` will take precedence if you set both `pressedIconUrl` and `pressedIconSvg`.\n */\n pressedIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon in pressed state.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`\n * - has `viewBox=\"0 0 16 16\"`\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically:\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `pressedIconUrl` and `pressedIconSvg`, `pressedIconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n pressedIconSvg?: React.ReactNode;\n\n /**\n * Sets the toggle button to pressed state.\n */\n pressed: boolean;\n\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable only for the normal variant.\n */\n disabledReason?:
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle-button/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseButtonProps } from '../button/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\n\nexport interface ToggleButtonProps extends BaseComponentProps, Omit<BaseButtonProps, 'nativeAnchorAttributes'> {\n /** Determines the general styling of the toggle button as follows:\n * * `normal` for secondary buttons.\n * * `icon` to display an icon only (no text).\n *\n * Defaults to `normal` if not specified.\n */\n variant?: ToggleButtonProps.Variant;\n\n /**\n * Displays an icon next to the text.\n */\n iconName?: IconProps.Name;\n\n /**\n * Displays an icon next to the text in pressed state.\n */\n pressedIconName?: IconProps.Name;\n\n /**\n * Specifies the URL of a custom icon in pressed state. Use this property if the icon needed for your use case isn't available.\n *\n * `pressedIconSvg` will take precedence if you set both `pressedIconUrl` and `pressedIconSvg`.\n */\n pressedIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon in pressed state.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`\n * - has `viewBox=\"0 0 16 16\"`\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically:\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `pressedIconUrl` and `pressedIconSvg`, `pressedIconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n pressedIconSvg?: React.ReactNode;\n\n /**\n * Sets the toggle button to pressed state.\n */\n pressed: boolean;\n\n /**\n * Provides a reason why the button is disabled (only when `disabled` is `true`).\n * If provided, the button becomes focusable.\n * Applicable only for the normal variant.\n *\n * Do not place interactive elements like links or buttons.\n */\n disabledReason?: React.ReactNode;\n\n /**\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `pressed` property.\n */\n onChange?: NonCancelableEventHandler<ToggleButtonProps.ChangeDetail>;\n}\n\nexport namespace ToggleButtonProps {\n export type Variant = 'normal' | 'icon';\n\n export interface ChangeDetail {\n pressed: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button.\n */\n focus(options?: FocusOptions): void;\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dismiss-button.d.ts","sourceRoot":"","sources":["../../../src/token/dismiss-button.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"dismiss-button.d.ts","sourceRoot":"","sources":["../../../src/token/dismiss-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAavD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAO5D,UAAU,kBAAkB;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,yBAAyB,CAAC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;;AAED,wBAAyC"}
|
package/token/dismiss-button.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import React, { forwardRef } from 'react';
|
|
3
|
+
import React, { forwardRef, useRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { isThemeActive, Theme } from '@cloudscape-design/component-toolkit/internal';
|
|
5
|
+
import { isThemeActive, Theme, useMergeRefs, useSingleTabStopNavigation, } from '@cloudscape-design/component-toolkit/internal';
|
|
6
6
|
import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
|
|
7
7
|
import InternalIcon from '../icon/internal';
|
|
8
8
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
@@ -12,13 +12,16 @@ import testUtilStyles from './test-classes/styles.css.js';
|
|
|
12
12
|
export default forwardRef(DismissButton);
|
|
13
13
|
function DismissButton({ disabled, dismissLabel, onDismiss, readOnly, inline }, ref) {
|
|
14
14
|
const isOneTheme = isThemeActive(Theme.OneTheme);
|
|
15
|
+
const buttonRef = useRef(null);
|
|
16
|
+
const mergedRef = useMergeRefs(ref, buttonRef);
|
|
17
|
+
const { tabIndex } = useSingleTabStopNavigation(buttonRef);
|
|
15
18
|
const analyticsMetadata = {
|
|
16
19
|
action: 'dismiss',
|
|
17
20
|
detail: {
|
|
18
21
|
label: { root: 'self' },
|
|
19
22
|
},
|
|
20
23
|
};
|
|
21
|
-
return (React.createElement("button", { ref:
|
|
24
|
+
return (React.createElement("button", { ref: mergedRef, type: "button", tabIndex: tabIndex, className: clsx(styles['dismiss-button'], legacyTestingStyles['dismiss-button'], testUtilStyles['dismiss-button'], inline && styles['dismiss-button-inline']), "aria-disabled": disabled || readOnly ? true : undefined, onClick: () => {
|
|
22
25
|
if (disabled || readOnly || !onDismiss) {
|
|
23
26
|
return;
|
|
24
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dismiss-button.js","sourceRoot":"","sources":["../../../src/token/dismiss-button.tsx"],"names":[],"mappings":"AAAA,qEAA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,EAAE,SAAS,EACd,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,gBAAgB,CAAC,EACxB,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,cAAc,CAAC,gBAAgB,CAAC,EAChC,MAAM,IAAI,MAAM,CAAC,uBAAuB,CAAC,CAC1C,mBACc,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACtD,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,QAAQ,IAAI,QAAQ,IAAI,CAAC,SAAS,EAAE,CAAC;gBACvC,OAAO;YACT,CAAC;YAED,sBAAsB,CAAC,SAAS,CAAC,CAAC;QACpC,CAAC,gBACW,YAAY,+BACE,OAAO,KAC7B,CAAC,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,CAAC;QAElF,oBAAC,YAAY,IACX,IAAI,EAAC,OAAO,EACZ,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACxC,gBAAgB,EAAE,EAAE,0BAA0B,EAAE,EAAE,EAAE,GACpD,CACK,CACV,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef, Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport {\n isThemeActive,\n Theme,\n useMergeRefs,\n useSingleTabStopNavigation,\n} from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalIcon from '../icon/internal';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { GeneratedAnalyticsMetadataTokenDismiss } from './analytics-metadata/interfaces';\n\nimport legacyTestingStyles from '../token-group/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\ninterface DismissButtonProps {\n disabled?: boolean;\n readOnly?: boolean;\n onDismiss?: NonCancelableEventHandler;\n dismissLabel?: string;\n inline?: boolean;\n}\n\nexport default forwardRef(DismissButton);\n\nfunction DismissButton(\n { disabled, dismissLabel, onDismiss, readOnly, inline }: DismissButtonProps,\n ref: Ref<HTMLButtonElement>\n) {\n const isOneTheme = isThemeActive(Theme.OneTheme);\n const buttonRef = useRef<HTMLButtonElement>(null);\n const mergedRef = useMergeRefs(ref, buttonRef);\n const { tabIndex } = useSingleTabStopNavigation(buttonRef);\n const analyticsMetadata: GeneratedAnalyticsMetadataTokenDismiss = {\n action: 'dismiss',\n detail: {\n label: { root: 'self' },\n },\n };\n return (\n <button\n ref={mergedRef}\n type=\"button\"\n tabIndex={tabIndex}\n className={clsx(\n styles['dismiss-button'],\n legacyTestingStyles['dismiss-button'],\n testUtilStyles['dismiss-button'],\n inline && styles['dismiss-button-inline']\n )}\n aria-disabled={disabled || readOnly ? true : undefined}\n onClick={() => {\n if (disabled || readOnly || !onDismiss) {\n return;\n }\n\n fireNonCancelableEvent(onDismiss);\n }}\n aria-label={dismissLabel}\n data-awsui-motion-trigger=\"hover\"\n {...(disabled || readOnly ? {} : getAnalyticsMetadataAttribute(analyticsMetadata))}\n >\n <InternalIcon\n name=\"close\"\n size={isOneTheme ? 'x-small' : undefined}\n nativeAttributes={{ 'data-awsui-motion-target': '' }}\n />\n </button>\n );\n}\n"]}
|
package/types/option.d.ts
CHANGED
package/types/option.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.d.ts","sourceRoot":"","sources":["../../../src/types/option.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE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/types/option.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"option.js","sourceRoot":"","sources":["../../../src/types/option.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../icon/interfaces';\n\ninterface BaseOption {\n value?: string;\n label?: string;\n labelContent?: React.ReactNode;\n lang?: string;\n description?: string;\n disabled?: boolean;\n disabledReason?:
|
|
1
|
+
{"version":3,"file":"option.js","sourceRoot":"","sources":["../../../src/types/option.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../icon/interfaces';\n\ninterface BaseOption {\n value?: string;\n label?: string;\n labelContent?: React.ReactNode;\n lang?: string;\n description?: string;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n labelTag?: string;\n tags?: ReadonlyArray<string>;\n filteringTags?: ReadonlyArray<string>;\n iconAlt?: string;\n iconAriaLabel?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n}\n\nexport interface OptionDefinition extends BaseOption {\n __labelPrefix?: string;\n}\n\nexport interface OptionGroup extends BaseOption {\n options: ReadonlyArray<OptionDefinition>;\n}\n"]}
|