@cloudscape-design/components 3.0.336 → 3.0.338
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/app-layout/styles.css.js +17 -17
- package/app-layout/styles.scoped.css +21 -21
- package/app-layout/styles.selectors.js +17 -17
- package/app-layout/visual-refresh/styles.css.js +69 -69
- package/app-layout/visual-refresh/styles.scoped.css +173 -169
- package/app-layout/visual-refresh/styles.selectors.js +69 -69
- package/area-chart/chart-container.d.ts +2 -2
- package/area-chart/chart-container.d.ts.map +1 -1
- package/area-chart/chart-container.js +1 -1
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/interfaces.d.ts +5 -1
- package/area-chart/interfaces.d.ts.map +1 -1
- package/area-chart/interfaces.js.map +1 -1
- package/area-chart/internal.d.ts +1 -1
- package/area-chart/internal.d.ts.map +1 -1
- package/area-chart/internal.js +2 -2
- package/area-chart/internal.js.map +1 -1
- package/attribute-editor/interfaces.d.ts +7 -0
- package/attribute-editor/interfaces.d.ts.map +1 -1
- package/attribute-editor/interfaces.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +2 -2
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.d.ts +3 -2
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js +2 -2
- package/attribute-editor/row.js.map +1 -1
- package/box/styles.css.js +189 -189
- package/box/styles.scoped.css +258 -258
- package/box/styles.selectors.js +189 -189
- package/button/styles.css.js +20 -20
- package/button/styles.scoped.css +154 -154
- package/button/styles.selectors.js +20 -20
- package/button-dropdown/category-elements/styles.css.js +13 -13
- package/button-dropdown/category-elements/styles.scoped.css +25 -25
- package/button-dropdown/category-elements/styles.selectors.js +13 -13
- package/button-dropdown/item-element/styles.css.js +14 -14
- package/button-dropdown/item-element/styles.scoped.css +20 -20
- package/button-dropdown/item-element/styles.selectors.js +14 -14
- package/cards/styles.css.js +38 -38
- package/cards/styles.scoped.css +57 -62
- package/cards/styles.selectors.js +38 -38
- package/container/styles.css.js +28 -28
- package/container/styles.scoped.css +57 -54
- package/container/styles.selectors.js +28 -28
- package/content-layout/styles.css.js +7 -7
- package/content-layout/styles.scoped.css +13 -13
- package/content-layout/styles.selectors.js +7 -7
- package/expandable-section/styles.css.js +29 -29
- package/expandable-section/styles.scoped.css +61 -61
- package/expandable-section/styles.selectors.js +29 -29
- package/flashbar/styles.css.js +46 -46
- package/flashbar/styles.scoped.css +146 -146
- package/flashbar/styles.selectors.js +46 -46
- package/form-field/internal.js +3 -2
- package/form-field/internal.js.map +1 -1
- package/header/internal.d.ts.map +1 -1
- package/header/internal.js +5 -5
- package/header/internal.js.map +1 -1
- package/header/styles.css.js +33 -44
- package/header/styles.scoped.css +85 -91
- package/header/styles.selectors.js +33 -44
- package/help-panel/styles.css.js +4 -4
- package/help-panel/styles.scoped.css +80 -80
- package/help-panel/styles.selectors.js +4 -4
- package/icon/styles.css.js +21 -21
- package/icon/styles.scoped.css +54 -54
- package/icon/styles.selectors.js +21 -21
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +14 -13
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/context/analytics-context.d.ts +6 -7
- package/internal/analytics/context/analytics-context.d.ts.map +1 -1
- package/internal/analytics/context/analytics-context.js +2 -6
- package/internal/analytics/context/analytics-context.js.map +1 -1
- package/internal/analytics/hooks/use-funnel.d.ts +4 -7
- package/internal/analytics/hooks/use-funnel.d.ts.map +1 -1
- package/internal/analytics/hooks/use-funnel.js +9 -7
- package/internal/analytics/hooks/use-funnel.js.map +1 -1
- package/internal/base-component/styles.scoped.css +48 -35
- package/internal/components/button-trigger/index.d.ts +2 -1
- package/internal/components/button-trigger/index.d.ts.map +1 -1
- package/internal/components/button-trigger/index.js +2 -2
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/cartesian-chart/interfaces.d.ts +10 -2
- package/internal/components/cartesian-chart/interfaces.d.ts.map +1 -1
- package/internal/components/cartesian-chart/interfaces.js.map +1 -1
- package/internal/components/dropdown/index.d.ts +1 -1
- package/internal/components/dropdown/index.d.ts.map +1 -1
- package/internal/components/dropdown/index.js +4 -4
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown/interfaces.d.ts +8 -0
- package/internal/components/dropdown/interfaces.d.ts.map +1 -1
- package/internal/components/dropdown/interfaces.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +14 -14
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/environment.js +1 -1
- package/internal/generated/theming/index.cjs +164 -120
- package/internal/generated/theming/index.js +164 -120
- package/internal/manifest.json +1 -1
- package/link/internal.d.ts.map +1 -1
- package/link/internal.js +3 -2
- package/link/internal.js.map +1 -1
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +83 -83
- package/link/styles.selectors.js +20 -20
- package/mixed-line-bar-chart/internal.d.ts +1 -1
- package/mixed-line-bar-chart/internal.d.ts.map +1 -1
- package/mixed-line-bar-chart/internal.js +2 -2
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +40 -40
- package/modal/styles.selectors.js +23 -23
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +24 -24
- package/pagination/styles.selectors.js +9 -9
- package/popover/styles.css.js +50 -50
- package/popover/styles.scoped.css +65 -65
- package/popover/styles.selectors.js +50 -50
- package/property-filter/index.d.ts.map +1 -1
- package/property-filter/index.js +4 -3
- package/property-filter/index.js.map +1 -1
- package/property-filter/interfaces.d.ts +16 -5
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/s3-resource-selector/index.d.ts.map +1 -1
- package/s3-resource-selector/index.js +2 -2
- package/s3-resource-selector/index.js.map +1 -1
- package/s3-resource-selector/interfaces.d.ts +7 -0
- package/s3-resource-selector/interfaces.d.ts.map +1 -1
- package/s3-resource-selector/interfaces.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.d.ts +1 -0
- package/s3-resource-selector/s3-in-context/index.d.ts.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +2 -2
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/segmented-control/styles.css.js +14 -14
- package/segmented-control/styles.scoped.css +35 -35
- package/segmented-control/styles.selectors.js +14 -14
- package/select/utils/use-select.d.ts +5 -7
- package/select/utils/use-select.d.ts.map +1 -1
- package/select/utils/use-select.js +6 -0
- package/select/utils/use-select.js.map +1 -1
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +3 -1
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/styles.css.js +28 -27
- package/side-navigation/styles.scoped.css +52 -48
- package/side-navigation/styles.selectors.js +28 -27
- package/spinner/styles.css.js +13 -13
- package/spinner/styles.scoped.css +22 -22
- package/spinner/styles.selectors.js +13 -13
- package/split-panel/styles.css.js +56 -56
- package/split-panel/styles.scoped.css +80 -80
- package/split-panel/styles.selectors.js +56 -56
- package/table/header-cell/styles.css.js +24 -24
- package/table/header-cell/styles.scoped.css +41 -41
- package/table/header-cell/styles.selectors.js +24 -24
- package/table/styles.css.js +34 -34
- package/table/styles.scoped.css +45 -52
- package/table/styles.selectors.js +34 -34
- package/tabs/styles.css.js +21 -21
- package/tabs/styles.scoped.css +44 -41
- package/tabs/styles.selectors.js +21 -21
- package/tag-editor/styles.css.js +3 -3
- package/tag-editor/styles.scoped.css +11 -11
- package/tag-editor/styles.selectors.js +3 -3
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +71 -71
- package/text-content/styles.selectors.js +1 -1
- package/tiles/styles.css.js +29 -28
- package/tiles/styles.scoped.css +76 -70
- package/tiles/styles.selectors.js +29 -28
- package/tiles/tile.d.ts.map +1 -1
- package/tiles/tile.js +3 -1
- package/tiles/tile.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +45 -45
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +74 -74
- package/top-navigation/styles.selectors.js +47 -47
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +22 -22
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/wizard/interfaces.d.ts +10 -3
- package/wizard/interfaces.d.ts.map +1 -1
- package/wizard/interfaces.js.map +1 -1
- package/wizard/internal.d.ts +1 -1
- package/wizard/internal.d.ts.map +1 -1
- package/wizard/internal.js +5 -5
- package/wizard/internal.js.map +1 -1
- package/wizard/styles.css.js +31 -31
- package/wizard/styles.scoped.css +67 -67
- package/wizard/styles.selectors.js +31 -31
- package/wizard/wizard-form.d.ts +2 -1
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +2 -2
- package/wizard/wizard-form.js.map +1 -1
|
@@ -90,7 +90,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
90
90
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
91
91
|
SPDX-License-Identifier: Apache-2.0
|
|
92
92
|
*/
|
|
93
|
-
.awsui_tutorial-
|
|
93
|
+
.awsui_tutorial-list_1u70p_1p1ln_93:not(#\9) {
|
|
94
94
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
95
95
|
border-collapse: separate;
|
|
96
96
|
border-spacing: 0;
|
|
@@ -131,22 +131,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
131
131
|
margin: 0;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
.awsui_tutorial-
|
|
134
|
+
.awsui_tutorial-title_1u70p_1p1ln_108:not(#\9) {
|
|
135
135
|
display: flex;
|
|
136
136
|
align-items: flex-start;
|
|
137
137
|
margin-left: calc(-1 * var(--space-xxs-ja5cp8, 4px));
|
|
138
138
|
padding-bottom: var(--space-xxxs-j6dpcy, 2px);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.
|
|
141
|
+
.awsui_task_1u70p_1p1ln_115:not(#\9) {
|
|
142
142
|
list-style: none;
|
|
143
143
|
padding-top: 0;
|
|
144
144
|
}
|
|
145
|
-
.
|
|
145
|
+
.awsui_task_1u70p_1p1ln_115:not(#\9):not(:first-child) {
|
|
146
146
|
margin-top: var(--space-xl-gsucfg, 24px);
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
-
.awsui_task-
|
|
149
|
+
.awsui_task-title_1u70p_1p1ln_123:not(#\9) {
|
|
150
150
|
display: flex;
|
|
151
151
|
align-items: flex-start;
|
|
152
152
|
padding-left: var(--border-divider-section-width-orq175, 2px);
|
|
@@ -154,60 +154,60 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
154
154
|
line-height: var(--font-heading-s-line-height-uruujc, 20px);
|
|
155
155
|
letter-spacing: var(--font-heading-s-letter-spacing-j4vcrt, -0.005em);
|
|
156
156
|
}
|
|
157
|
-
.awsui_task-title--
|
|
157
|
+
.awsui_task-title--status_1u70p_1p1ln_131:not(#\9) {
|
|
158
158
|
line-height: inherit;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.awsui_current-
|
|
161
|
+
.awsui_current-task_1u70p_1p1ln_135:not(#\9) {
|
|
162
162
|
font-weight: 700;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
.awsui_successful-
|
|
165
|
+
.awsui_successful-task_1u70p_1p1ln_139:not(#\9) {
|
|
166
166
|
color: var(--color-text-status-success-6id1zv, #037f0c);
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
-
.awsui_congratulation-
|
|
169
|
+
.awsui_congratulation-message_1u70p_1p1ln_143:not(#\9) {
|
|
170
170
|
display: flex;
|
|
171
171
|
font-size: var(--font-heading-s-size-ep2ts9, 16px);
|
|
172
172
|
line-height: var(--font-heading-s-line-height-uruujc, 20px);
|
|
173
173
|
letter-spacing: var(--font-heading-s-letter-spacing-j4vcrt, -0.005em);
|
|
174
|
-
font-weight: var(--font-heading-xs-weight-
|
|
174
|
+
font-weight: var(--font-heading-xs-weight-xog3y8, 700);
|
|
175
175
|
color: var(--color-text-status-success-6id1zv, #037f0c);
|
|
176
176
|
}
|
|
177
|
-
.awsui_congratulation-message--
|
|
177
|
+
.awsui_congratulation-message--status_1u70p_1p1ln_151:not(#\9) {
|
|
178
178
|
line-height: inherit;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
.awsui_plaintext-congratulation-
|
|
181
|
+
.awsui_plaintext-congratulation-description_1u70p_1p1ln_155:not(#\9) {
|
|
182
182
|
white-space: pre-line;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
.
|
|
185
|
+
.awsui_divider_1u70p_1p1ln_159:not(#\9) {
|
|
186
186
|
border-bottom: var(--border-divider-section-width-orq175, 2px) solid var(--color-border-divider-default-9o8zql, #e9ebed);
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
.awsui_step-
|
|
189
|
+
.awsui_step-list_1u70p_1p1ln_163:not(#\9) {
|
|
190
190
|
list-style: none;
|
|
191
191
|
padding: 0 0 0 var(--space-xxxs-j6dpcy, 2px);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
.
|
|
194
|
+
.awsui_step_1u70p_1p1ln_163:not(#\9):not(:first-child) {
|
|
195
195
|
padding-top: var(--space-xxs-ja5cp8, 4px);
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
.awsui_expandable-section-
|
|
198
|
+
.awsui_expandable-section-wrapper_1u70p_1p1ln_172:not(#\9) {
|
|
199
199
|
width: 100%;
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
.awsui_expandable-section-
|
|
202
|
+
.awsui_expandable-section-header_1u70p_1p1ln_176:not(#\9) {
|
|
203
203
|
font-size: var(--font-body-m-size-7dign1, 14px);
|
|
204
204
|
line-height: var(--font-body-m-line-height-ghizru, 20px);
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
.awsui_step-
|
|
208
|
-
.awsui_feedback-
|
|
209
|
-
.awsui_dismiss-
|
|
210
|
-
.awsui_completion-screen-
|
|
211
|
-
.awsui_completion-screen-
|
|
207
|
+
.awsui_step-title_1u70p_1p1ln_181:not(#\9),
|
|
208
|
+
.awsui_feedback-link_1u70p_1p1ln_182:not(#\9),
|
|
209
|
+
.awsui_dismiss-button_1u70p_1p1ln_183:not(#\9),
|
|
210
|
+
.awsui_completion-screen-title_1u70p_1p1ln_184:not(#\9),
|
|
211
|
+
.awsui_completion-screen-description_1u70p_1p1ln_185:not(#\9) {
|
|
212
212
|
/* used in test-utils */
|
|
213
213
|
}
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"tutorial-list": "awsui_tutorial-
|
|
6
|
-
"tutorial-title": "awsui_tutorial-
|
|
7
|
-
"task": "
|
|
8
|
-
"task-title": "awsui_task-
|
|
9
|
-
"task-title--status": "awsui_task-title--
|
|
10
|
-
"current-task": "awsui_current-
|
|
11
|
-
"successful-task": "awsui_successful-
|
|
12
|
-
"congratulation-message": "awsui_congratulation-
|
|
13
|
-
"congratulation-message--status": "awsui_congratulation-message--
|
|
14
|
-
"plaintext-congratulation-description": "awsui_plaintext-congratulation-
|
|
15
|
-
"divider": "
|
|
16
|
-
"step-list": "awsui_step-
|
|
17
|
-
"step": "
|
|
18
|
-
"expandable-section-wrapper": "awsui_expandable-section-
|
|
19
|
-
"expandable-section-header": "awsui_expandable-section-
|
|
20
|
-
"step-title": "awsui_step-
|
|
21
|
-
"feedback-link": "awsui_feedback-
|
|
22
|
-
"dismiss-button": "awsui_dismiss-
|
|
23
|
-
"completion-screen-title": "awsui_completion-screen-
|
|
24
|
-
"completion-screen-description": "awsui_completion-screen-
|
|
5
|
+
"tutorial-list": "awsui_tutorial-list_1u70p_1p1ln_93",
|
|
6
|
+
"tutorial-title": "awsui_tutorial-title_1u70p_1p1ln_108",
|
|
7
|
+
"task": "awsui_task_1u70p_1p1ln_115",
|
|
8
|
+
"task-title": "awsui_task-title_1u70p_1p1ln_123",
|
|
9
|
+
"task-title--status": "awsui_task-title--status_1u70p_1p1ln_131",
|
|
10
|
+
"current-task": "awsui_current-task_1u70p_1p1ln_135",
|
|
11
|
+
"successful-task": "awsui_successful-task_1u70p_1p1ln_139",
|
|
12
|
+
"congratulation-message": "awsui_congratulation-message_1u70p_1p1ln_143",
|
|
13
|
+
"congratulation-message--status": "awsui_congratulation-message--status_1u70p_1p1ln_151",
|
|
14
|
+
"plaintext-congratulation-description": "awsui_plaintext-congratulation-description_1u70p_1p1ln_155",
|
|
15
|
+
"divider": "awsui_divider_1u70p_1p1ln_159",
|
|
16
|
+
"step-list": "awsui_step-list_1u70p_1p1ln_163",
|
|
17
|
+
"step": "awsui_step_1u70p_1p1ln_163",
|
|
18
|
+
"expandable-section-wrapper": "awsui_expandable-section-wrapper_1u70p_1p1ln_172",
|
|
19
|
+
"expandable-section-header": "awsui_expandable-section-header_1u70p_1p1ln_176",
|
|
20
|
+
"step-title": "awsui_step-title_1u70p_1p1ln_181",
|
|
21
|
+
"feedback-link": "awsui_feedback-link_1u70p_1p1ln_182",
|
|
22
|
+
"dismiss-button": "awsui_dismiss-button_1u70p_1p1ln_183",
|
|
23
|
+
"completion-screen-title": "awsui_completion-screen-title_1u70p_1p1ln_184",
|
|
24
|
+
"completion-screen-description": "awsui_completion-screen-description_1u70p_1p1ln_185"
|
|
25
25
|
};
|
|
26
26
|
|
package/wizard/interfaces.d.ts
CHANGED
|
@@ -43,13 +43,17 @@ export interface WizardProps extends BaseComponentProps {
|
|
|
43
43
|
* - `cancelButton` (string) - The text of the button that enables the user to exit the flow.
|
|
44
44
|
* - `previousButton` (string) - The text of the button that enables the user to return to the previous step.
|
|
45
45
|
* - `nextButton` (string) - The text of the button that enables the user to move to the next step.
|
|
46
|
-
* - `submitButton` (string) - The text of the button that enables the user to submit the form.
|
|
46
|
+
* - `submitButton` (string) - The text of the button that enables the user to submit the form. **Deprecated**, replaced by the `submitButtonText` component property.
|
|
47
47
|
* - `optional` (string) - The text displayed next to the step title and form header title when a step is declared optional.
|
|
48
48
|
* - `nextButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *next* button is in a loading state.
|
|
49
49
|
* - `submitButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *submit* button is in a loading state.
|
|
50
50
|
* @i18n
|
|
51
51
|
*/
|
|
52
|
-
i18nStrings
|
|
52
|
+
i18nStrings?: WizardProps.I18nStrings;
|
|
53
|
+
/**
|
|
54
|
+
* The text of the button that enables the user to submit the form.
|
|
55
|
+
*/
|
|
56
|
+
submitButtonText?: string;
|
|
53
57
|
/**
|
|
54
58
|
* Renders the *next* or *submit* button in a loading state.
|
|
55
59
|
*
|
|
@@ -102,6 +106,10 @@ export declare namespace WizardProps {
|
|
|
102
106
|
isOptional?: boolean;
|
|
103
107
|
}
|
|
104
108
|
interface I18nStrings {
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated Use `submitButtonText` on the component instead.
|
|
111
|
+
*/
|
|
112
|
+
submitButton?: string;
|
|
105
113
|
stepNumberLabel?(stepNumber: number): string;
|
|
106
114
|
collapsedStepsLabel?(stepNumber: number, stepsCount: number): string;
|
|
107
115
|
skipToButtonLabel?(targetStep: WizardProps.Step, targetStepNumber: number): string;
|
|
@@ -110,7 +118,6 @@ export declare namespace WizardProps {
|
|
|
110
118
|
cancelButton?: string;
|
|
111
119
|
previousButton?: string;
|
|
112
120
|
nextButton?: string;
|
|
113
|
-
submitButton: string;
|
|
114
121
|
optional?: string;
|
|
115
122
|
nextButtonLoadingAnnouncement?: string;
|
|
116
123
|
submitButtonLoadingAnnouncement?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["wizard/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"lib/default/","sources":["wizard/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD;;;;;;;;;;;;OAYG;IACH,KAAK,EAAE,aAAa,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC;IAEtC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;;OAUG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,gBAAg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AM,EAAE,WAAW,CAAC,gBAAgB,CAAC;KACtC;IAED,KAAY,gBAAgB,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;CACtE"}
|
package/wizard/interfaces.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["wizard/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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface WizardProps extends BaseComponentProps {\n /**\n * Array of step objects. Each object represents a step in the wizard with the following properties:\n *\n * - `title` (string) - Text that's displayed as the title in the navigation pane and form header.\n * - `info` (ReactNode) - (Optional) Area for a page level info link that's displayed in the form header.\n * The page level info link should trigger the default help panel content for the step. Use the [link component](/components/link/) to display the link.\n * - `description` (ReactNode) - (Optional) Area below the form header for a page level description text to further explain the purpose, goal, or main actions of the step.\n * - `content` (ReactNode) - Main content area to display form sections, form fields, and controls.\n * - `errorText` (ReactNode) - (Optional) Error text that's displayed in a page level error alert.\n * Use this for rendering actionable server-side validation failure messages.\n * - `isOptional` (boolean) - Specifies whether the step is optional or required. If set to `true`, the text from `i18nStrings.optional`\n * is rendered next to the `title` in the navigation step label and the form header title.\n */\n steps: ReadonlyArray<WizardProps.Step>;\n\n /**\n * Index of the step that's currently displayed. The first step has an index of zero (0).\n *\n * If you don't set this property, the component starts on the first step and switches step automatically\n * when a user navigates using the buttons or an enabled step link in the navigation pane (that is, uncontrolled behavior).\n *\n * If you provide a value for this property, you must also set an `onNavigate` listener to update the property when\n * a user navigates (that is, controlled behavior).\n *\n * If you set it to a value that exceeds the maximum value (that is, the number of steps minus 1), its value is ignored and the component uses the maximum value.\n */\n activeStepIndex?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * - `stepNumberLabel` ((stepNumber: number) => string) - A function that accepts a number (1-based indexing),\n * and returns a human-readable, localized string displaying the step number in the navigation pane. For example, \"Step 1\" or \"Step 2\".\n * - `collapsedStepsLabel` ((stepNumber: number, stepsCount: number) => string) - A function that accepts two number parameters (1-based indexing),\n * and returns a string responsible for the navigation summary on smaller screens. For example, \"Step 1 of 3\". The parameters are as follows:\n * - `stepNumber` (number) - The step number that the user is currently on.\n * - `stepsCount` (number) - The total number of steps in the wizard.\n * - `skipToButtonLabel`: ((targetStep: WizardProps.Step, targetStepNumber: number) => string) - An optional function that accepts the target step object\n * and the target step number (1-based indexing), and returns a string to be used as the *skip-to* button label. For example, \"Skip to Step 2\" or \"Skip to end\".\n * - `navigationAriaLabel` (string) - The aria label for the navigation pane.\n * - `cancelButton` (string) - The text of the button that enables the user to exit the flow.\n * - `previousButton` (string) - The text of the button that enables the user to return to the previous step.\n * - `nextButton` (string) - The text of the button that enables the user to move to the next step.\n * - `submitButton` (string) - The text of the button that enables the user to submit the form.\n * - `optional` (string) - The text displayed next to the step title and form header title when a step is declared optional.\n * - `nextButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *next* button is in a loading state.\n * - `submitButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *submit* button is in a loading state.\n * @i18n\n */\n i18nStrings
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"lib/default/","sources":["wizard/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';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface WizardProps extends BaseComponentProps {\n /**\n * Array of step objects. Each object represents a step in the wizard with the following properties:\n *\n * - `title` (string) - Text that's displayed as the title in the navigation pane and form header.\n * - `info` (ReactNode) - (Optional) Area for a page level info link that's displayed in the form header.\n * The page level info link should trigger the default help panel content for the step. Use the [link component](/components/link/) to display the link.\n * - `description` (ReactNode) - (Optional) Area below the form header for a page level description text to further explain the purpose, goal, or main actions of the step.\n * - `content` (ReactNode) - Main content area to display form sections, form fields, and controls.\n * - `errorText` (ReactNode) - (Optional) Error text that's displayed in a page level error alert.\n * Use this for rendering actionable server-side validation failure messages.\n * - `isOptional` (boolean) - Specifies whether the step is optional or required. If set to `true`, the text from `i18nStrings.optional`\n * is rendered next to the `title` in the navigation step label and the form header title.\n */\n steps: ReadonlyArray<WizardProps.Step>;\n\n /**\n * Index of the step that's currently displayed. The first step has an index of zero (0).\n *\n * If you don't set this property, the component starts on the first step and switches step automatically\n * when a user navigates using the buttons or an enabled step link in the navigation pane (that is, uncontrolled behavior).\n *\n * If you provide a value for this property, you must also set an `onNavigate` listener to update the property when\n * a user navigates (that is, controlled behavior).\n *\n * If you set it to a value that exceeds the maximum value (that is, the number of steps minus 1), its value is ignored and the component uses the maximum value.\n */\n activeStepIndex?: number;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n *\n * - `stepNumberLabel` ((stepNumber: number) => string) - A function that accepts a number (1-based indexing),\n * and returns a human-readable, localized string displaying the step number in the navigation pane. For example, \"Step 1\" or \"Step 2\".\n * - `collapsedStepsLabel` ((stepNumber: number, stepsCount: number) => string) - A function that accepts two number parameters (1-based indexing),\n * and returns a string responsible for the navigation summary on smaller screens. For example, \"Step 1 of 3\". The parameters are as follows:\n * - `stepNumber` (number) - The step number that the user is currently on.\n * - `stepsCount` (number) - The total number of steps in the wizard.\n * - `skipToButtonLabel`: ((targetStep: WizardProps.Step, targetStepNumber: number) => string) - An optional function that accepts the target step object\n * and the target step number (1-based indexing), and returns a string to be used as the *skip-to* button label. For example, \"Skip to Step 2\" or \"Skip to end\".\n * - `navigationAriaLabel` (string) - The aria label for the navigation pane.\n * - `cancelButton` (string) - The text of the button that enables the user to exit the flow.\n * - `previousButton` (string) - The text of the button that enables the user to return to the previous step.\n * - `nextButton` (string) - The text of the button that enables the user to move to the next step.\n * - `submitButton` (string) - The text of the button that enables the user to submit the form. **Deprecated**, replaced by the `submitButtonText` component property.\n * - `optional` (string) - The text displayed next to the step title and form header title when a step is declared optional.\n * - `nextButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *next* button is in a loading state.\n * - `submitButtonLoadingAnnouncement` (string) - The text that a screen reader announces when the *submit* button is in a loading state.\n * @i18n\n */\n i18nStrings?: WizardProps.I18nStrings;\n\n /**\n * The text of the button that enables the user to submit the form.\n */\n submitButtonText?: string;\n\n /**\n * Renders the *next* or *submit* button in a loading state.\n *\n * Use this if you need to wait for a response from the server before the user can proceed to the next step, such as during server-side validation or retrieving the next step's information.\n */\n isLoadingNextStep?: boolean;\n\n /**\n * When set to `false`, the *skip-to* button is never shown.\n * When set to `true`, the *skip-to* button may appear to offer faster navigation for the user.\n *\n * The *skip-to* button only allows to skip optional steps. It is shown when there is one or more optional\n * steps ahead having no required steps in-between.\n *\n * Note: the *skip-to* button requires the function i18nStrings.skipToButtonLabel to be defined.\n *\n * Defaults to `false`.\n */\n allowSkipTo?: boolean;\n\n /**\n * Specifies left-aligned secondary actions for the wizard. Use a button dropdown if multiple actions are required.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Called when a user clicks the *cancel* button.\n * If a user has entered data in the form, you should prompt the user with a modal before exiting the wizard flow.\n */\n onCancel?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *submit* button.\n */\n onSubmit?: NonCancelableEventHandler;\n\n /**\n * Called when a user clicks the *next* button, the *previous* button, or an enabled step link in the navigation pane.\n *\n * The event `detail` includes the following:\n * - `requestedStepIndex` - The index of the requested step.\n * - `reason` - The user action that triggered the navigation event. It can be `next` (when the user clicks the *next* button),\n * `previous` (when the user clicks the *previous* button), `step` (an enabled step link in the navigation pane),\n * or `skip` (when navigated using navigation pane or the *skip-to* button to the previously unvisited step).\n */\n onNavigate?: NonCancelableEventHandler<WizardProps.NavigateDetail>;\n}\n\nexport namespace WizardProps {\n export interface Step {\n title: string;\n info?: React.ReactNode;\n description?: React.ReactNode;\n content: React.ReactNode;\n errorText?: React.ReactNode;\n isOptional?: boolean;\n }\n\n export interface I18nStrings {\n /**\n * @deprecated Use `submitButtonText` on the component instead.\n */\n submitButton?: string;\n\n stepNumberLabel?(stepNumber: number): string;\n collapsedStepsLabel?(stepNumber: number, stepsCount: number): string;\n skipToButtonLabel?(targetStep: WizardProps.Step, targetStepNumber: number): string;\n navigationAriaLabel?: string;\n errorIconAriaLabel?: string;\n cancelButton?: string;\n previousButton?: string;\n nextButton?: string;\n optional?: string;\n nextButtonLoadingAnnouncement?: string;\n submitButtonLoadingAnnouncement?: string;\n }\n\n export interface NavigateDetail {\n requestedStepIndex: number;\n reason: WizardProps.NavigationReason;\n }\n\n export type NavigationReason = 'next' | 'previous' | 'step' | 'skip';\n}\n"]}
|
package/wizard/internal.d.ts
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
3
3
|
import { WizardProps } from './interfaces';
|
|
4
4
|
type InternalWizardProps = WizardProps & InternalBaseComponentProps;
|
|
5
|
-
export default function InternalWizard({ steps, activeStepIndex: controlledActiveStepIndex, isLoadingNextStep, allowSkipTo, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef, ...rest }: InternalWizardProps): JSX.Element;
|
|
5
|
+
export default function InternalWizard({ steps, activeStepIndex: controlledActiveStepIndex, submitButtonText, isLoadingNextStep, allowSkipTo, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef, ...rest }: InternalWizardProps): JSX.Element;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
package/wizard/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,KAAK,mBAAmB,GAAG,WAAW,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,iBAAyB,EACzB,WAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAWlF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAI3C,KAAK,mBAAmB,GAAG,WAAW,GAAG,0BAA0B,CAAC;AAEpE,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,gBAAgB,EAChB,iBAAyB,EACzB,WAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,mBAAmB,eA8IrB"}
|
package/wizard/internal.js
CHANGED
|
@@ -18,8 +18,8 @@ import WizardForm from './wizard-form';
|
|
|
18
18
|
import WizardNavigation from './wizard-navigation';
|
|
19
19
|
import styles from './styles.css.js';
|
|
20
20
|
export default function InternalWizard(_a) {
|
|
21
|
-
var _b, _c;
|
|
22
|
-
var { steps, activeStepIndex: controlledActiveStepIndex, isLoadingNextStep = false, allowSkipTo = false, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef } = _a, rest = __rest(_a, ["steps", "activeStepIndex", "isLoadingNextStep", "allowSkipTo", "secondaryActions", "onCancel", "onSubmit", "onNavigate", "__internalRootRef"]);
|
|
21
|
+
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
22
|
+
var { steps, activeStepIndex: controlledActiveStepIndex, submitButtonText, isLoadingNextStep = false, allowSkipTo = false, secondaryActions, onCancel, onSubmit, onNavigate, __internalRootRef } = _a, rest = __rest(_a, ["steps", "activeStepIndex", "submitButtonText", "isLoadingNextStep", "allowSkipTo", "secondaryActions", "onCancel", "onSubmit", "onNavigate", "__internalRootRef"]);
|
|
23
23
|
const baseProps = getBaseProps(rest);
|
|
24
24
|
const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);
|
|
25
25
|
const ref = useMergeRefs(breakpointsRef, __internalRootRef);
|
|
@@ -70,8 +70,8 @@ export default function InternalWizard(_a) {
|
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
const i18n = useInternalI18n('wizard');
|
|
73
|
-
const skipToButtonLabel = i18n('i18nStrings.skipToButtonLabel', rest.i18nStrings.skipToButtonLabel, format => task => format({ task__title: task.title }));
|
|
74
|
-
const i18nStrings = Object.assign(Object.assign({}, rest.i18nStrings), { skipToButtonLabel, stepNumberLabel: i18n('i18nStrings.stepNumberLabel', (
|
|
73
|
+
const skipToButtonLabel = i18n('i18nStrings.skipToButtonLabel', (_b = rest.i18nStrings) === null || _b === void 0 ? void 0 : _b.skipToButtonLabel, format => task => format({ task__title: task.title }));
|
|
74
|
+
const i18nStrings = Object.assign(Object.assign({}, rest.i18nStrings), { skipToButtonLabel, stepNumberLabel: i18n('i18nStrings.stepNumberLabel', (_c = rest.i18nStrings) === null || _c === void 0 ? void 0 : _c.stepNumberLabel, format => stepNumber => format({ stepNumber })), collapsedStepsLabel: i18n('i18nStrings.collapsedStepsLabel', (_d = rest.i18nStrings) === null || _d === void 0 ? void 0 : _d.collapsedStepsLabel, format => (stepNumber, stepsCount) => format({ stepNumber, stepsCount })), navigationAriaLabel: i18n('i18nStrings.navigationAriaLabel', (_e = rest.i18nStrings) === null || _e === void 0 ? void 0 : _e.navigationAriaLabel), cancelButton: i18n('i18nStrings.cancelButton', (_f = rest.i18nStrings) === null || _f === void 0 ? void 0 : _f.cancelButton), previousButton: i18n('i18nStrings.previousButton', (_g = rest.i18nStrings) === null || _g === void 0 ? void 0 : _g.previousButton), nextButton: i18n('i18nStrings.nextButton', (_h = rest.i18nStrings) === null || _h === void 0 ? void 0 : _h.nextButton), optional: i18n('i18nStrings.optional', (_j = rest.i18nStrings) === null || _j === void 0 ? void 0 : _j.optional) });
|
|
75
75
|
if (activeStepIndex && activeStepIndex >= steps.length) {
|
|
76
76
|
warnOnce('Wizard', `You have set \`activeStepIndex\` to ${activeStepIndex} but you have provided only ${steps.length} steps. Its value is ignored and the component uses ${steps.length - 1} instead.`);
|
|
77
77
|
}
|
|
@@ -83,6 +83,6 @@ export default function InternalWizard(_a) {
|
|
|
83
83
|
React.createElement(WizardNavigation, { activeStepIndex: actualActiveStepIndex, farthestStepIndex: farthestStepIndex.current, allowSkipTo: allowSkipTo, hidden: smallContainer, i18nStrings: i18nStrings, isVisualRefresh: isVisualRefresh, isLoadingNextStep: isLoadingNextStep, onStepClick: onStepClick, onSkipToClick: onSkipToClick, steps: steps }),
|
|
84
84
|
React.createElement("div", { className: clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container']) },
|
|
85
85
|
isVisualRefresh && React.createElement("div", { className: clsx(styles.background, 'awsui-context-content-header') }),
|
|
86
|
-
React.createElement(WizardForm, { steps: steps, isVisualRefresh: isVisualRefresh, showCollapsedSteps: smallContainer, i18nStrings: i18nStrings, activeStepIndex: actualActiveStepIndex, isPrimaryLoading: isLoadingNextStep, allowSkipTo: allowSkipTo, secondaryActions: secondaryActions, onCancelClick: onCancelClick, onPreviousClick: onPreviousClick, onSkipToClick: onSkipToClick, onPrimaryClick: onPrimaryClick })))));
|
|
86
|
+
React.createElement(WizardForm, { steps: steps, isVisualRefresh: isVisualRefresh, showCollapsedSteps: smallContainer, i18nStrings: i18nStrings, submitButtonText: submitButtonText, activeStepIndex: actualActiveStepIndex, isPrimaryLoading: isLoadingNextStep, allowSkipTo: allowSkipTo, secondaryActions: secondaryActions, onCancelClick: onCancelClick, onPreviousClick: onPreviousClick, onSkipToClick: onSkipToClick, onPrimaryClick: onPrimaryClick })))));
|
|
87
87
|
}
|
|
88
88
|
//# sourceMappingURL=internal.js.map
|
package/wizard/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7F,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAInD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAWjB;;QAXiB,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,iBAAiB,GAAG,KAAK,EACzB,WAAW,GAAG,KAAK,EACnB,gBAAgB,EAChB,QA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CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n isLoadingNextStep = false,\n allowSkipTo = false,\n secondaryActions,\n onCancel,\n onSubmit,\n onNavigate,\n __internalRootRef,\n ...rest\n}: InternalWizardProps) {\n const baseProps = getBaseProps(rest);\n\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n const ref = useMergeRefs(breakpointsRef, __internalRootRef);\n\n const smallContainer = breakpoint === 'default';\n\n const [activeStepIndex, setActiveStepIndex] = useControllable(controlledActiveStepIndex, onNavigate, 0, {\n componentName: 'Wizard',\n controlledProp: 'activeStepIndex',\n changeHandler: 'onNavigate',\n });\n const { funnelInteractionId, funnelSubmit, funnelCancel, funnelProps, funnelNextOrSubmitAttempt } = useFunnel();\n const actualActiveStepIndex = activeStepIndex ? Math.min(activeStepIndex, steps.length - 1) : 0;\n\n const farthestStepIndex = useRef<number>(actualActiveStepIndex);\n farthestStepIndex.current = Math.max(farthestStepIndex.current, actualActiveStepIndex);\n\n const isVisualRefresh = useVisualRefresh();\n const isLastStep = actualActiveStepIndex >= steps.length - 1;\n\n const navigationEvent = (requestedStepIndex: number, reason: WizardProps.NavigationReason) => {\n if (funnelInteractionId) {\n const stepNameSelector = `.${styles['form-header-component-wrapper']}`;\n const stepName = getNameFromSelector(stepNameSelector);\n\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepName,\n stepNameSelector,\n destinationStepNumber: requestedStepIndex + 1,\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n setActiveStepIndex(requestedStepIndex);\n fireNonCancelableEvent(onNavigate, { requestedStepIndex, reason });\n };\n const onStepClick = (stepIndex: number) => navigationEvent(stepIndex, 'step');\n const onSkipToClick = (stepIndex: number) => navigationEvent(stepIndex, 'skip');\n const onCancelClick = () => {\n funnelCancel();\n fireNonCancelableEvent(onCancel);\n };\n const onPreviousClick = () => navigationEvent(actualActiveStepIndex - 1, 'previous');\n const onPrimaryClick = () => {\n funnelNextOrSubmitAttempt();\n\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n const i18n = useInternalI18n('wizard');\n const skipToButtonLabel = i18n(\n 'i18nStrings.skipToButtonLabel',\n rest.i18nStrings.skipToButtonLabel,\n format => task => format({ task__title: task.title })\n );\n\n const i18nStrings: WizardProps.I18nStrings = {\n ...rest.i18nStrings,\n skipToButtonLabel,\n stepNumberLabel: i18n(\n 'i18nStrings.stepNumberLabel',\n rest.i18nStrings?.stepNumberLabel,\n format => stepNumber => format({ stepNumber })\n ),\n collapsedStepsLabel: i18n(\n 'i18nStrings.collapsedStepsLabel',\n rest.i18nStrings?.collapsedStepsLabel,\n format => (stepNumber, stepsCount) => format({ stepNumber, stepsCount })\n ),\n navigationAriaLabel: i18n('i18nStrings.navigationAriaLabel', rest.i18nStrings.navigationAriaLabel),\n cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings.cancelButton),\n previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings.previousButton),\n nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings.nextButton),\n optional: i18n('i18nStrings.optional', rest.i18nStrings.optional),\n };\n\n if (activeStepIndex && activeStepIndex >= steps.length) {\n warnOnce(\n 'Wizard',\n `You have set \\`activeStepIndex\\` to ${activeStepIndex} but you have provided only ${\n steps.length\n } steps. Its value is ignored and the component uses ${steps.length - 1} instead.`\n );\n }\n\n if (allowSkipTo && !skipToButtonLabel) {\n warnOnce(\n 'Wizard',\n `You have set \\`allowSkipTo\\` but you have not provided \\`i18nStrings.skipToButtonLabel\\`. The skip-to button will not be rendered.`\n );\n }\n\n return (\n <div {...baseProps} {...funnelProps} ref={ref} className={clsx(styles.root, baseProps.className)}>\n <div\n className={clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n <WizardNavigation\n activeStepIndex={actualActiveStepIndex}\n farthestStepIndex={farthestStepIndex.current}\n allowSkipTo={allowSkipTo}\n hidden={smallContainer}\n i18nStrings={i18nStrings}\n isVisualRefresh={isVisualRefresh}\n isLoadingNextStep={isLoadingNextStep}\n onStepClick={onStepClick}\n onSkipToClick={onSkipToClick}\n steps={steps}\n />\n <div\n className={clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n {isVisualRefresh && <div className={clsx(styles.background, 'awsui-context-content-header')} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n activeStepIndex={actualActiveStepIndex}\n isPrimaryLoading={isLoadingNextStep}\n allowSkipTo={allowSkipTo}\n secondaryActions={secondaryActions}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onSkipToClick={onSkipToClick}\n onPrimaryClick={onPrimaryClick}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"lib/default/","sources":["wizard/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AAEzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7F,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAInD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAYjB;;QAZiB,EACrC,KAAK,EACL,eAAe,EAAE,yBAAyB,EAC1C,gBAAgB,EAChB,iBAAiB,GAAG,KAAK,EACzB,WAAW,GAAG,KAAK,EACnB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,iBAAiB,OAEG,EADjB,IA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AE,cAAc,GAC9B,CACE,CACF,CACF,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport { warnOnce } from '@cloudscape-design/component-toolkit/internal';\n\nimport { useContainerBreakpoints } from '../internal/hooks/container-queries';\nimport { useControllable } from '../internal/hooks/use-controllable';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\n\nimport { useInternalI18n } from '../internal/i18n/context';\n\nimport { FunnelMetrics } from '../internal/analytics';\nimport { useFunnel } from '../internal/analytics/hooks/use-funnel';\nimport { getNameFromSelector, getSubStepAllSelector } from '../internal/analytics/selectors';\n\nimport WizardForm from './wizard-form';\nimport WizardNavigation from './wizard-navigation';\n\nimport { WizardProps } from './interfaces';\n\nimport styles from './styles.css.js';\n\ntype InternalWizardProps = WizardProps & InternalBaseComponentProps;\n\nexport default function InternalWizard({\n steps,\n activeStepIndex: controlledActiveStepIndex,\n submitButtonText,\n isLoadingNextStep = false,\n allowSkipTo = false,\n secondaryActions,\n onCancel,\n onSubmit,\n onNavigate,\n __internalRootRef,\n ...rest\n}: InternalWizardProps) {\n const baseProps = getBaseProps(rest);\n\n const [breakpoint, breakpointsRef] = useContainerBreakpoints(['xs']);\n const ref = useMergeRefs(breakpointsRef, __internalRootRef);\n\n const smallContainer = breakpoint === 'default';\n\n const [activeStepIndex, setActiveStepIndex] = useControllable(controlledActiveStepIndex, onNavigate, 0, {\n componentName: 'Wizard',\n controlledProp: 'activeStepIndex',\n changeHandler: 'onNavigate',\n });\n const { funnelInteractionId, funnelSubmit, funnelCancel, funnelProps, funnelNextOrSubmitAttempt } = useFunnel();\n const actualActiveStepIndex = activeStepIndex ? Math.min(activeStepIndex, steps.length - 1) : 0;\n\n const farthestStepIndex = useRef<number>(actualActiveStepIndex);\n farthestStepIndex.current = Math.max(farthestStepIndex.current, actualActiveStepIndex);\n\n const isVisualRefresh = useVisualRefresh();\n const isLastStep = actualActiveStepIndex >= steps.length - 1;\n\n const navigationEvent = (requestedStepIndex: number, reason: WizardProps.NavigationReason) => {\n if (funnelInteractionId) {\n const stepNameSelector = `.${styles['form-header-component-wrapper']}`;\n const stepName = getNameFromSelector(stepNameSelector);\n\n FunnelMetrics.funnelStepNavigation({\n navigationType: reason,\n funnelInteractionId,\n stepNumber: actualActiveStepIndex + 1,\n stepName,\n stepNameSelector,\n destinationStepNumber: requestedStepIndex + 1,\n subStepAllSelector: getSubStepAllSelector(),\n });\n }\n\n setActiveStepIndex(requestedStepIndex);\n fireNonCancelableEvent(onNavigate, { requestedStepIndex, reason });\n };\n const onStepClick = (stepIndex: number) => navigationEvent(stepIndex, 'step');\n const onSkipToClick = (stepIndex: number) => navigationEvent(stepIndex, 'skip');\n const onCancelClick = () => {\n funnelCancel();\n fireNonCancelableEvent(onCancel);\n };\n const onPreviousClick = () => navigationEvent(actualActiveStepIndex - 1, 'previous');\n const onPrimaryClick = () => {\n funnelNextOrSubmitAttempt();\n\n if (isLastStep) {\n funnelSubmit();\n fireNonCancelableEvent(onSubmit);\n } else {\n navigationEvent(actualActiveStepIndex + 1, 'next');\n }\n };\n\n const i18n = useInternalI18n('wizard');\n const skipToButtonLabel = i18n(\n 'i18nStrings.skipToButtonLabel',\n rest.i18nStrings?.skipToButtonLabel,\n format => task => format({ task__title: task.title })\n );\n\n const i18nStrings: WizardProps.I18nStrings = {\n ...rest.i18nStrings,\n skipToButtonLabel,\n stepNumberLabel: i18n(\n 'i18nStrings.stepNumberLabel',\n rest.i18nStrings?.stepNumberLabel,\n format => stepNumber => format({ stepNumber })\n ),\n collapsedStepsLabel: i18n(\n 'i18nStrings.collapsedStepsLabel',\n rest.i18nStrings?.collapsedStepsLabel,\n format => (stepNumber, stepsCount) => format({ stepNumber, stepsCount })\n ),\n navigationAriaLabel: i18n('i18nStrings.navigationAriaLabel', rest.i18nStrings?.navigationAriaLabel),\n cancelButton: i18n('i18nStrings.cancelButton', rest.i18nStrings?.cancelButton),\n previousButton: i18n('i18nStrings.previousButton', rest.i18nStrings?.previousButton),\n nextButton: i18n('i18nStrings.nextButton', rest.i18nStrings?.nextButton),\n optional: i18n('i18nStrings.optional', rest.i18nStrings?.optional),\n };\n\n if (activeStepIndex && activeStepIndex >= steps.length) {\n warnOnce(\n 'Wizard',\n `You have set \\`activeStepIndex\\` to ${activeStepIndex} but you have provided only ${\n steps.length\n } steps. Its value is ignored and the component uses ${steps.length - 1} instead.`\n );\n }\n\n if (allowSkipTo && !skipToButtonLabel) {\n warnOnce(\n 'Wizard',\n `You have set \\`allowSkipTo\\` but you have not provided \\`i18nStrings.skipToButtonLabel\\`. The skip-to button will not be rendered.`\n );\n }\n\n return (\n <div {...baseProps} {...funnelProps} ref={ref} className={clsx(styles.root, baseProps.className)}>\n <div\n className={clsx(styles.wizard, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n <WizardNavigation\n activeStepIndex={actualActiveStepIndex}\n farthestStepIndex={farthestStepIndex.current}\n allowSkipTo={allowSkipTo}\n hidden={smallContainer}\n i18nStrings={i18nStrings}\n isVisualRefresh={isVisualRefresh}\n isLoadingNextStep={isLoadingNextStep}\n onStepClick={onStepClick}\n onSkipToClick={onSkipToClick}\n steps={steps}\n />\n <div\n className={clsx(styles.form, isVisualRefresh && styles.refresh, smallContainer && styles['small-container'])}\n >\n {isVisualRefresh && <div className={clsx(styles.background, 'awsui-context-content-header')} />}\n <WizardForm\n steps={steps}\n isVisualRefresh={isVisualRefresh}\n showCollapsedSteps={smallContainer}\n i18nStrings={i18nStrings}\n submitButtonText={submitButtonText}\n activeStepIndex={actualActiveStepIndex}\n isPrimaryLoading={isLoadingNextStep}\n allowSkipTo={allowSkipTo}\n secondaryActions={secondaryActions}\n onCancelClick={onCancelClick}\n onPreviousClick={onPreviousClick}\n onSkipToClick={onSkipToClick}\n onPrimaryClick={onPrimaryClick}\n />\n </div>\n </div>\n </div>\n );\n}\n"]}
|
package/wizard/styles.css.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"wizard": "
|
|
6
|
-
"refresh": "
|
|
7
|
-
"small-container": "awsui_small-
|
|
8
|
-
"navigation": "
|
|
9
|
-
"number": "
|
|
10
|
-
"circle": "
|
|
11
|
-
"title": "
|
|
12
|
-
"active": "
|
|
13
|
-
"disabled": "
|
|
14
|
-
"enabled": "
|
|
15
|
-
"form": "
|
|
16
|
-
"form-header": "awsui_form-
|
|
17
|
-
"background": "
|
|
18
|
-
"form-header-content": "awsui_form-header-
|
|
19
|
-
"form-component": "awsui_form-
|
|
20
|
-
"hidden": "
|
|
21
|
-
"collapsed-steps": "awsui_collapsed-
|
|
22
|
-
"collapsed-steps-hidden": "awsui_collapsed-steps-
|
|
23
|
-
"form-header-component-wrapper": "awsui_form-header-component-
|
|
24
|
-
"form-header-component": "awsui_form-header-
|
|
25
|
-
"navigation-link": "awsui_navigation-
|
|
26
|
-
"navigation-link-item": "awsui_navigation-link-
|
|
27
|
-
"navigation-link-label": "awsui_navigation-link-
|
|
28
|
-
"navigation-link-active": "awsui_navigation-link-
|
|
29
|
-
"navigation-link-disabled": "awsui_navigation-link-
|
|
30
|
-
"cancel-button": "awsui_cancel-
|
|
31
|
-
"previous-button": "awsui_previous-
|
|
32
|
-
"primary-button": "awsui_primary-
|
|
33
|
-
"skip-to-button": "awsui_skip-to-
|
|
34
|
-
"action-buttons": "awsui_action-
|
|
4
|
+
"root": "awsui_root_1xupv_ohoma_94",
|
|
5
|
+
"wizard": "awsui_wizard_1xupv_ohoma_107",
|
|
6
|
+
"refresh": "awsui_refresh_1xupv_ohoma_107",
|
|
7
|
+
"small-container": "awsui_small-container_1xupv_ohoma_114",
|
|
8
|
+
"navigation": "awsui_navigation_1xupv_ohoma_123",
|
|
9
|
+
"number": "awsui_number_1xupv_ohoma_185",
|
|
10
|
+
"circle": "awsui_circle_1xupv_ohoma_201",
|
|
11
|
+
"title": "awsui_title_1xupv_ohoma_209",
|
|
12
|
+
"active": "awsui_active_1xupv_ohoma_238",
|
|
13
|
+
"disabled": "awsui_disabled_1xupv_ohoma_249",
|
|
14
|
+
"enabled": "awsui_enabled_1xupv_ohoma_259",
|
|
15
|
+
"form": "awsui_form_1xupv_ohoma_301",
|
|
16
|
+
"form-header": "awsui_form-header_1xupv_ohoma_307",
|
|
17
|
+
"background": "awsui_background_1xupv_ohoma_318",
|
|
18
|
+
"form-header-content": "awsui_form-header-content_1xupv_ohoma_330",
|
|
19
|
+
"form-component": "awsui_form-component_1xupv_ohoma_334",
|
|
20
|
+
"hidden": "awsui_hidden_1xupv_ohoma_348",
|
|
21
|
+
"collapsed-steps": "awsui_collapsed-steps_1xupv_ohoma_352",
|
|
22
|
+
"collapsed-steps-hidden": "awsui_collapsed-steps-hidden_1xupv_ohoma_357",
|
|
23
|
+
"form-header-component-wrapper": "awsui_form-header-component-wrapper_1xupv_ohoma_361",
|
|
24
|
+
"form-header-component": "awsui_form-header-component_1xupv_ohoma_361",
|
|
25
|
+
"navigation-link": "awsui_navigation-link_1xupv_ohoma_374",
|
|
26
|
+
"navigation-link-item": "awsui_navigation-link-item_1xupv_ohoma_375",
|
|
27
|
+
"navigation-link-label": "awsui_navigation-link-label_1xupv_ohoma_376",
|
|
28
|
+
"navigation-link-active": "awsui_navigation-link-active_1xupv_ohoma_380",
|
|
29
|
+
"navigation-link-disabled": "awsui_navigation-link-disabled_1xupv_ohoma_385",
|
|
30
|
+
"cancel-button": "awsui_cancel-button_1xupv_ohoma_389",
|
|
31
|
+
"previous-button": "awsui_previous-button_1xupv_ohoma_390",
|
|
32
|
+
"primary-button": "awsui_primary-button_1xupv_ohoma_391",
|
|
33
|
+
"skip-to-button": "awsui_skip-to-button_1xupv_ohoma_392",
|
|
34
|
+
"action-buttons": "awsui_action-buttons_1xupv_ohoma_396"
|
|
35
35
|
};
|
|
36
36
|
|