@cloudscape-design/components-themeable 3.0.1206 → 3.0.1208
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/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/steps/styles.scss +2 -0
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/interfaces.js.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js +20 -5
- package/lib/internal/template/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.d.ts +21 -0
- package/lib/internal/template/date-range-picker/interfaces.d.ts.map +1 -1
- package/lib/internal/template/date-range-picker/interfaces.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.ar.js +1 -1
- package/lib/internal/template/i18n/messages/all.ar.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 +3 -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/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/steps/interfaces.d.ts +0 -2
- package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
- package/lib/internal/template/steps/interfaces.js.map +1 -1
- package/lib/internal/template/steps/styles.css.js +9 -9
- package/lib/internal/template/steps/styles.scoped.css +17 -15
- package/lib/internal/template/steps/styles.selectors.js +9 -9
- package/lib/internal/template/test-utils/dom/button-dropdown/index.d.ts +12 -2
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js +21 -4
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.d.ts +12 -2
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js +21 -4
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;;;;;;;OAQG;IACH,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,MAAM,WAAW,UAAW,SAAQ,kBAAkB;IACpD;;;;;;;;OAQG;IACH,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACtC;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC;IACrC;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,KAAK;QACtC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;QAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KACxB,CAAC;IACF;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,yBAAiB,UAAU,CAAC;IAC1B,KAAY,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC;IAE/C,UAAiB,IAAI;QACnB,MAAM,EAAE,MAAM,CAAC;QACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC;QACxB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;KAC3B;IAED,KAAY,WAAW,GAAG,UAAU,GAAG,YAAY,CAAC;CACrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { StatusIndicatorProps } from '../status-indicator/interfaces';\n\nexport interface StepsProps extends BaseComponentProps {\n /**\n * An array of individual steps\n *\n * Each step definition has the following properties:\n * * `status` (string) - Status of the step corresponding to a status indicator.\n * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.\n * * `header` (ReactNode) - Summary corresponding to the step.\n * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.\n */\n steps: ReadonlyArray<StepsProps.Step>;\n /**\n * The visual orientation of the steps (vertical or horizontal).\n * By default the orientation is vertical.\n
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/steps/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { BaseComponentProps } from '../internal/base-component';\nimport { StatusIndicatorProps } from '../status-indicator/interfaces';\n\nexport interface StepsProps extends BaseComponentProps {\n /**\n * An array of individual steps\n *\n * Each step definition has the following properties:\n * * `status` (string) - Status of the step corresponding to a status indicator.\n * * `statusIconAriaLabel` - (string) - (Optional) Alternative text for the status icon.\n * * `header` (ReactNode) - Summary corresponding to the step.\n * * `details` (ReactNode) - (Optional) Additional information corresponding to the step.\n */\n steps: ReadonlyArray<StepsProps.Step>;\n /**\n * The visual orientation of the steps (vertical or horizontal).\n * By default the orientation is vertical.\n */\n orientation?: StepsProps.Orientation;\n /**\n * Render a step. This overrides the default icon, header, and details provided by the component.\n * The function is called for each step and should return an object with the following keys:\n * * `header` (React.ReactNode) - Summary corresponding to the step.\n * * `details` (React.ReactNode) - (Optional) Additional information corresponding to the step.\n * * `icon` (React.ReactNode) - (Optional) Replaces the standard step icon from the status indicator.\n *\n * @awsuiSystem core\n */\n renderStep?: (step: StepsProps.Step) => {\n header: React.ReactNode;\n details?: React.ReactNode;\n icon?: React.ReactNode;\n };\n /**\n * Provides an `aria-label` to the progress steps container.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabel?: string;\n /**\n * Sets the `aria-labelledby` property on the progress steps container.\n * If there's a visible label element that you can reference, use this instead of `ariaLabel`.\n * Don't use `ariaLabel` and `ariaLabelledby` at the same time.\n */\n ariaLabelledby?: string;\n /**\n * Sets the `aria-describedby` property on the progress steps container.\n */\n ariaDescribedby?: string;\n}\n\nexport namespace StepsProps {\n export type Status = StatusIndicatorProps.Type;\n\n export interface Step {\n status: Status;\n statusIconAriaLabel?: string;\n header: React.ReactNode;\n details?: React.ReactNode;\n }\n\n export type Orientation = 'vertical' | 'horizontal';\n}\n"]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"list": "
|
|
6
|
-
"container": "
|
|
7
|
-
"header": "
|
|
8
|
-
"details": "
|
|
9
|
-
"connector": "
|
|
10
|
-
"custom": "
|
|
11
|
-
"horizontal": "
|
|
12
|
-
"horizontal-header": "awsui_horizontal-
|
|
4
|
+
"root": "awsui_root_gxp9y_16job_181",
|
|
5
|
+
"list": "awsui_list_gxp9y_16job_214",
|
|
6
|
+
"container": "awsui_container_gxp9y_16job_219",
|
|
7
|
+
"header": "awsui_header_gxp9y_16job_224",
|
|
8
|
+
"details": "awsui_details_gxp9y_16job_230",
|
|
9
|
+
"connector": "awsui_connector_gxp9y_16job_236",
|
|
10
|
+
"custom": "awsui_custom_gxp9y_16job_252",
|
|
11
|
+
"horizontal": "awsui_horizontal_gxp9y_16job_256",
|
|
12
|
+
"horizontal-header": "awsui_horizontal-header_gxp9y_16job_288"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
*/
|
|
179
179
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
180
180
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
181
|
-
.
|
|
181
|
+
.awsui_root_gxp9y_16job_181:not(#\9) {
|
|
182
182
|
border-collapse: separate;
|
|
183
183
|
border-spacing: 0;
|
|
184
184
|
box-sizing: border-box;
|
|
@@ -211,29 +211,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
211
211
|
min-inline-size: 0;
|
|
212
212
|
word-break: break-word;
|
|
213
213
|
}
|
|
214
|
-
.
|
|
214
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214:not(#\9) {
|
|
215
215
|
list-style: none;
|
|
216
216
|
padding-inline-start: 0;
|
|
217
217
|
margin-block: 0;
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219:not(#\9) {
|
|
220
220
|
display: grid;
|
|
221
221
|
grid-template-columns: var(--space-static-l-ig026c, 20px) 1fr;
|
|
222
222
|
grid-template-rows: minmax(var(--space-static-l-ig026c, 20px), auto);
|
|
223
223
|
}
|
|
224
|
-
.
|
|
224
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_header_gxp9y_16job_224:not(#\9) {
|
|
225
225
|
display: flex;
|
|
226
226
|
gap: var(--space-xxs-jnczic, 4px);
|
|
227
227
|
grid-row: 1;
|
|
228
228
|
grid-column: 1/span 2;
|
|
229
229
|
}
|
|
230
|
-
.
|
|
230
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_details_gxp9y_16job_230:not(#\9) {
|
|
231
231
|
align-items: center;
|
|
232
232
|
grid-row: 2;
|
|
233
233
|
grid-column: 2;
|
|
234
234
|
margin-block-end: var(--space-static-xs-4gq40t, 8px);
|
|
235
235
|
}
|
|
236
|
-
.
|
|
236
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_connector_gxp9y_16job_236:not(#\9) {
|
|
237
237
|
grid-row: 2;
|
|
238
238
|
grid-column: 1;
|
|
239
239
|
background-color: var(--color-border-divider-default-ipvpev, #eaeded);
|
|
@@ -246,32 +246,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
246
246
|
position: relative;
|
|
247
247
|
inset-inline-end: var(--space-static-xxxs-zckw10, 2px);
|
|
248
248
|
}
|
|
249
|
-
.
|
|
249
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214 > :not(#\9):last-of-type > .awsui_connector_gxp9y_16job_236 {
|
|
250
250
|
display: none;
|
|
251
251
|
}
|
|
252
|
-
.
|
|
252
|
+
.awsui_root_gxp9y_16job_181 > .awsui_list_gxp9y_16job_214.awsui_custom_gxp9y_16job_252 > .awsui_details_gxp9y_16job_230:not(#\9) {
|
|
253
253
|
margin-block-end: 0;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
.
|
|
256
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214:not(#\9) {
|
|
257
257
|
display: grid;
|
|
258
258
|
align-items: flex-start;
|
|
259
259
|
grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
|
|
260
260
|
grid-auto-flow: column;
|
|
261
261
|
}
|
|
262
|
-
.
|
|
262
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219:not(#\9) {
|
|
263
263
|
display: grid;
|
|
264
264
|
grid-template-columns: var(--space-static-l-ig026c, 20px) 1fr;
|
|
265
265
|
grid-template-rows: minmax(var(--space-static-l-ig026c, 20px), auto);
|
|
266
266
|
align-items: center;
|
|
267
267
|
}
|
|
268
|
-
.
|
|
268
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_header_gxp9y_16job_224:not(#\9) {
|
|
269
269
|
display: flex;
|
|
270
270
|
grid-row: 1;
|
|
271
271
|
grid-column: 1/span 2;
|
|
272
272
|
align-items: center;
|
|
273
273
|
}
|
|
274
|
-
.
|
|
274
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_header_gxp9y_16job_224 > .awsui_connector_gxp9y_16job_236:not(#\9) {
|
|
275
275
|
display: block;
|
|
276
276
|
flex: 1;
|
|
277
277
|
background-color: var(--color-border-divider-default-ipvpev, #eaeded);
|
|
@@ -285,14 +285,16 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
285
285
|
min-inline-size: var(--space-static-xs-4gq40t, 8px);
|
|
286
286
|
margin-inline-end: var(--space-static-xxs-0cgyf1, 4px);
|
|
287
287
|
}
|
|
288
|
-
.
|
|
288
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_horizontal-header_gxp9y_16job_288:not(#\9) {
|
|
289
289
|
grid-row: 2;
|
|
290
290
|
grid-column: 1/span 3;
|
|
291
|
+
padding-inline-end: var(--space-xs-kw7k3v, 8px);
|
|
291
292
|
}
|
|
292
|
-
.
|
|
293
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219 > .awsui_details_gxp9y_16job_230:not(#\9) {
|
|
293
294
|
grid-row: 3;
|
|
294
295
|
grid-column: 1/span 3;
|
|
296
|
+
padding-inline-end: var(--space-xs-kw7k3v, 8px);
|
|
295
297
|
}
|
|
296
|
-
.
|
|
298
|
+
.awsui_horizontal_gxp9y_16job_256 > .awsui_list_gxp9y_16job_214 > .awsui_container_gxp9y_16job_219:not(#\9):last-child > .awsui_header_gxp9y_16job_224 > .awsui_connector_gxp9y_16job_236 {
|
|
297
299
|
display: none;
|
|
298
300
|
}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"list": "
|
|
7
|
-
"container": "
|
|
8
|
-
"header": "
|
|
9
|
-
"details": "
|
|
10
|
-
"connector": "
|
|
11
|
-
"custom": "
|
|
12
|
-
"horizontal": "
|
|
13
|
-
"horizontal-header": "awsui_horizontal-
|
|
5
|
+
"root": "awsui_root_gxp9y_16job_181",
|
|
6
|
+
"list": "awsui_list_gxp9y_16job_214",
|
|
7
|
+
"container": "awsui_container_gxp9y_16job_219",
|
|
8
|
+
"header": "awsui_header_gxp9y_16job_224",
|
|
9
|
+
"details": "awsui_details_gxp9y_16job_230",
|
|
10
|
+
"connector": "awsui_connector_gxp9y_16job_236",
|
|
11
|
+
"custom": "awsui_custom_gxp9y_16job_252",
|
|
12
|
+
"horizontal": "awsui_horizontal_gxp9y_16job_256",
|
|
13
|
+
"horizontal-header": "awsui_horizontal-header_gxp9y_16job_288"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -10,8 +10,13 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
10
10
|
* Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
|
|
11
11
|
*
|
|
12
12
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
13
|
+
*
|
|
14
|
+
* Supported options:
|
|
15
|
+
* * `disabled` (boolean) - Use it to find the disabled or non-disabled item.
|
|
13
16
|
*/
|
|
14
|
-
findItemById(id: string
|
|
17
|
+
findItemById(id: string, options?: {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}): ElementWrapper | null;
|
|
15
20
|
/**
|
|
16
21
|
* Finds `checked` value of item in the open dropdown by item id. Returns null if there is no open dropdown or the item is not a checkbox item.
|
|
17
22
|
*
|
|
@@ -34,8 +39,13 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
34
39
|
* Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
|
|
35
40
|
*
|
|
36
41
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
42
|
+
*
|
|
43
|
+
* Supported options:
|
|
44
|
+
* * `disabled` (boolean) - Use it to find all disabled or non-disabled items.
|
|
37
45
|
*/
|
|
38
|
-
findItems(
|
|
46
|
+
findItems(options?: {
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
}): Array<ElementWrapper>;
|
|
39
49
|
/**
|
|
40
50
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
41
51
|
*/
|
|
@@ -16,6 +16,16 @@ const styles_selectors_js_2 = require("../../../button-dropdown/category-element
|
|
|
16
16
|
const styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
|
|
17
17
|
const styles_selectors_js_4 = require("../../../button-dropdown/styles.selectors.js");
|
|
18
18
|
const styles_selectors_js_5 = require("../../../internal/components/dropdown/styles.selectors.js");
|
|
19
|
+
function getItemSelector({ disabled }) {
|
|
20
|
+
let selector = `.${styles_selectors_js_3.default['item-element']}`;
|
|
21
|
+
if (disabled === true) {
|
|
22
|
+
selector += `.${styles_selectors_js_3.default.disabled}`;
|
|
23
|
+
}
|
|
24
|
+
else if (disabled === false) {
|
|
25
|
+
selector += `:not(.${styles_selectors_js_3.default.disabled})`;
|
|
26
|
+
}
|
|
27
|
+
return selector;
|
|
28
|
+
}
|
|
19
29
|
class ButtonDropdownWrapper extends dom_1.ComponentWrapper {
|
|
20
30
|
findNativeButton() {
|
|
21
31
|
return this.findByClassName(styles_selectors_js_4.default['dropdown-trigger']).findByClassName(styles_selectors_js_4.default['test-utils-button-trigger']);
|
|
@@ -35,10 +45,13 @@ class ButtonDropdownWrapper extends dom_1.ComponentWrapper {
|
|
|
35
45
|
* Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
|
|
36
46
|
*
|
|
37
47
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
48
|
+
*
|
|
49
|
+
* Supported options:
|
|
50
|
+
* * `disabled` (boolean) - Use it to find the disabled or non-disabled item.
|
|
38
51
|
*/
|
|
39
|
-
findItemById(id) {
|
|
52
|
+
findItemById(id, options = {}) {
|
|
40
53
|
var _a;
|
|
41
|
-
const itemSelector =
|
|
54
|
+
const itemSelector = `${getItemSelector(options)}[data-testid="${id}"]`;
|
|
42
55
|
return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.find(itemSelector)) || this.find(itemSelector);
|
|
43
56
|
}
|
|
44
57
|
/**
|
|
@@ -83,10 +96,14 @@ class ButtonDropdownWrapper extends dom_1.ComponentWrapper {
|
|
|
83
96
|
* Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
|
|
84
97
|
*
|
|
85
98
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
99
|
+
*
|
|
100
|
+
* Supported options:
|
|
101
|
+
* * `disabled` (boolean) - Use it to find all disabled or non-disabled items.
|
|
86
102
|
*/
|
|
87
|
-
findItems() {
|
|
103
|
+
findItems(options = {}) {
|
|
88
104
|
var _a;
|
|
89
|
-
|
|
105
|
+
const selector = getItemSelector(options);
|
|
106
|
+
return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findAll(selector)) || [];
|
|
90
107
|
}
|
|
91
108
|
/**
|
|
92
109
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAClH,4EAAmE;AAEnE,iDAA+C;AAE/C,6EAA+D;AAC/D,wGAA4F;AAC5F,mGAAmF;AACnF,sFAAkE;AAClE,mGAAuF;AAEvF,MAAqB,qBAAsB,SAAQ,sBAAgB;IAGjE,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,kBAAkB,CAAC,CAAE,CAAC,eAAe,CACtE,6BAAM,CAAC,2BAA2B,CAAC,CACnC,CAAC;IACL,CAAC;IAED,iBAAiB;;QACf,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,kBAAkB,CAAC,CAAC,0CAAE,aAAa,CAAC,IAAI,6BAAY,CAAC,MAAM,EAAE,EAAE,kBAAa,CAAC,mCAAI,IAAI,CAClH,CAAC;IACJ,CAAC;IAED,cAAc;;QACZ,OAAO,CACL,MAAA,MAAA,IAAI,CAAC,eAAe,CAAC,6BAAM,CAAC,eAAe,CAAC,CAAC,0CAAE,aAAa,CAAC,IAAI,6BAAY,CAAC,MAAM,EAAE,EAAE,kBAAa,CAAC,mCAAI,IAAI,CAC/G,CAAC;IACJ,CAAC;IAED,gBAAgB;QACd,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,IAAI,6BAAc,CAAC,QAAQ,kBAAkB,CAAC,CAAC;IAC7E,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/button-dropdown/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAAkH;AAClH,4EAAmE;AAEnE,iDAA+C;AAE/C,6EAA+D;AAC/D,wGAA4F;AAC5F,mGAAmF;AACnF,sFAAkE;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CAAC,uBAAuB,CAAC,CAAC;IACtG,CAAC;IAED;;;;;;;OAOG;IACH,SAAS,CAAC,UAAkC,EAAE;;QAC5C,MAAM,QAAQ,GAAG,eAAe,CAAC,OAAO,CAAC,CAAC;QAC1C,OAAO,CAAA,MAAA,IAAI,CAAC,gBAAgB,EAAE,0CAAE,OAAO,CAAC,QAAQ,CAAC,KAAI,EAAE,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,OAAO,IAAA,mBAAa,GAAE,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IACjF,CAAC;IAGD,YAAY;QACV,IAAA,eAAG,EAAC,GAAG,EAAE;YACP,IAAI,CAAC,gBAAgB,EAAE,CAAC,KAAK,EAAE,CAAC;QAClC,CAAC,CAAC,CAAC;IACL,CAAC;;AApGM,kCAAY,GAAW,6BAAM,CAAC,iBAAiB,CAAC,CAAC;kBADrC,qBAAqB;AA2C/B;IAAR,aAAO;gEAWP;AA2CD;IADC,aAAO;yDAKP"}
|
|
@@ -10,8 +10,13 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
10
10
|
* Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
|
|
11
11
|
*
|
|
12
12
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
13
|
+
*
|
|
14
|
+
* Supported options:
|
|
15
|
+
* * `disabled` (boolean) - Use it to find the disabled or non-disabled item.
|
|
13
16
|
*/
|
|
14
|
-
findItemById(id: string
|
|
17
|
+
findItemById(id: string, options?: {
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}): ElementWrapper;
|
|
15
20
|
/**
|
|
16
21
|
* Finds `checked` value of item in the open dropdown by item id. Returns null if there is no open dropdown or the item is not a checkbox item.
|
|
17
22
|
*
|
|
@@ -33,8 +38,13 @@ export default class ButtonDropdownWrapper extends ComponentWrapper {
|
|
|
33
38
|
* Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
|
|
34
39
|
*
|
|
35
40
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
41
|
+
*
|
|
42
|
+
* Supported options:
|
|
43
|
+
* * `disabled` (boolean) - Use it to find all disabled or non-disabled items.
|
|
36
44
|
*/
|
|
37
|
-
findItems(
|
|
45
|
+
findItems(options?: {
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
}): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<ElementWrapper>;
|
|
38
48
|
/**
|
|
39
49
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
40
50
|
*/
|
|
@@ -9,6 +9,16 @@ const styles_selectors_js_2 = require("../../../button-dropdown/category-element
|
|
|
9
9
|
const styles_selectors_js_3 = require("../../../button-dropdown/item-element/styles.selectors.js");
|
|
10
10
|
const styles_selectors_js_4 = require("../../../button-dropdown/styles.selectors.js");
|
|
11
11
|
const styles_selectors_js_5 = require("../../../internal/components/dropdown/styles.selectors.js");
|
|
12
|
+
function getItemSelector({ disabled }) {
|
|
13
|
+
let selector = `.${styles_selectors_js_3.default['item-element']}`;
|
|
14
|
+
if (disabled === true) {
|
|
15
|
+
selector += `.${styles_selectors_js_3.default.disabled}`;
|
|
16
|
+
}
|
|
17
|
+
else if (disabled === false) {
|
|
18
|
+
selector += `:not(.${styles_selectors_js_3.default.disabled})`;
|
|
19
|
+
}
|
|
20
|
+
return selector;
|
|
21
|
+
}
|
|
12
22
|
class ButtonDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
13
23
|
findNativeButton() {
|
|
14
24
|
return this.findByClassName(styles_selectors_js_4.default['dropdown-trigger']).findByClassName(styles_selectors_js_4.default['test-utils-button-trigger']);
|
|
@@ -28,10 +38,13 @@ class ButtonDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
28
38
|
* Finds an item in the open dropdown by item id. Returns null if there is no open dropdown.
|
|
29
39
|
*
|
|
30
40
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
41
|
+
*
|
|
42
|
+
* Supported options:
|
|
43
|
+
* * `disabled` (boolean) - Use it to find the disabled or non-disabled item.
|
|
31
44
|
*/
|
|
32
|
-
findItemById(id) {
|
|
45
|
+
findItemById(id, options = {}) {
|
|
33
46
|
var _a;
|
|
34
|
-
const itemSelector =
|
|
47
|
+
const itemSelector = `${getItemSelector(options)}[data-testid="${id}"]`;
|
|
35
48
|
return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.find(itemSelector)) || this.find(itemSelector);
|
|
36
49
|
}
|
|
37
50
|
/**
|
|
@@ -63,10 +76,14 @@ class ButtonDropdownWrapper extends selectors_1.ComponentWrapper {
|
|
|
63
76
|
* Finds all the items in the open dropdown. Returns empty array if there is no open dropdown.
|
|
64
77
|
*
|
|
65
78
|
* This utility does not open the dropdown. To find dropdown items, call `openDropdown()` first.
|
|
79
|
+
*
|
|
80
|
+
* Supported options:
|
|
81
|
+
* * `disabled` (boolean) - Use it to find all disabled or non-disabled items.
|
|
66
82
|
*/
|
|
67
|
-
findItems() {
|
|
83
|
+
findItems(options = {}) {
|
|
68
84
|
var _a;
|
|
69
|
-
|
|
85
|
+
const selector = getItemSelector(options);
|
|
86
|
+
return ((_a = this.findOpenDropdown()) === null || _a === void 0 ? void 0 : _a.findAll(selector)) || [];
|
|
70
87
|
}
|
|
71
88
|
/**
|
|
72
89
|
* Finds the disabled reason tooltip for a dropdown item. Returns null if no disabled item with `disabledReason` is highlighted.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/button-dropdown/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAA+G;AAC/G,iDAA+C;AAC/C,6EAA+D;AAC/D,wGAA4F;AAC5F,mGAAmF;AACnF,sFAAkE;AAClE,mGAAuF;AACvF,MAAqB,qBAAsB,SAAQ,4BAAgB;IAEjE,gBAAgB;QACd,OAAO,IAAI,CA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