@cloudscape-design/components 3.0.629 → 3.0.631
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/breadcrumb-group/implementation.d.ts +8 -0
- package/breadcrumb-group/implementation.d.ts.map +1 -0
- package/breadcrumb-group/implementation.js +71 -0
- package/breadcrumb-group/implementation.js.map +1 -0
- package/breadcrumb-group/index.js +1 -1
- package/breadcrumb-group/index.js.map +1 -1
- package/breadcrumb-group/internal.d.ts +1 -11
- package/breadcrumb-group/internal.d.ts.map +1 -1
- package/breadcrumb-group/internal.js +2 -70
- package/breadcrumb-group/internal.js.map +1 -1
- package/breadcrumb-group/item/item.js +1 -1
- package/breadcrumb-group/item/item.js.map +1 -1
- package/breadcrumb-group/utils.d.ts +7 -0
- package/breadcrumb-group/utils.d.ts.map +1 -0
- package/breadcrumb-group/utils.js +6 -0
- package/breadcrumb-group/utils.js.map +1 -0
- package/drawer/implementation.d.ts +7 -0
- package/drawer/implementation.d.ts.map +1 -0
- package/drawer/implementation.js +24 -0
- package/drawer/implementation.js.map +1 -0
- package/drawer/index.d.ts +1 -1
- package/drawer/index.d.ts.map +1 -1
- package/drawer/index.js +4 -18
- package/drawer/index.js.map +1 -1
- package/drawer/internal.d.ts +2 -0
- package/drawer/internal.d.ts.map +1 -0
- package/drawer/internal.js +5 -0
- package/drawer/internal.js.map +1 -0
- package/header/styles.css.js +35 -35
- package/header/styles.scoped.css +51 -59
- package/header/styles.selectors.js +35 -35
- package/help-panel/implementation.d.ts +7 -0
- package/help-panel/implementation.d.ts.map +1 -0
- package/help-panel/implementation.js +27 -0
- package/help-panel/implementation.js.map +1 -0
- package/help-panel/index.d.ts +1 -1
- package/help-panel/index.d.ts.map +1 -1
- package/help-panel/index.js +4 -21
- package/help-panel/index.js.map +1 -1
- package/help-panel/internal.d.ts +2 -0
- package/help-panel/internal.d.ts.map +1 -0
- package/help-panel/internal.js +5 -0
- package/help-panel/internal.js.map +1 -0
- package/input/internal.d.ts.map +1 -1
- package/input/internal.js +1 -1
- package/input/internal.js.map +1 -1
- package/internal/base-component/styles.scoped.css +5 -0
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +1 -0
- package/internal/generated/styles/tokens.js +1 -0
- package/internal/generated/theming/index.cjs +31 -0
- package/internal/generated/theming/index.js +31 -0
- package/internal/manifest.json +1 -1
- package/internal/widgets/index.d.ts +4 -0
- package/internal/widgets/index.d.ts.map +1 -0
- package/internal/widgets/index.js +28 -0
- package/internal/widgets/index.js.map +1 -0
- package/package.json +1 -1
- package/s3-resource-selector/s3-modal/index.js +2 -2
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/side-navigation/implementation.d.ts +7 -0
- package/side-navigation/implementation.d.ts.map +1 -0
- package/side-navigation/implementation.js +36 -0
- package/side-navigation/implementation.js.map +1 -0
- package/side-navigation/index.d.ts +1 -1
- package/side-navigation/index.d.ts.map +1 -1
- package/side-navigation/index.js +5 -29
- package/side-navigation/index.js.map +1 -1
- package/side-navigation/internal.d.ts +1 -17
- package/side-navigation/internal.d.ts.map +1 -1
- package/side-navigation/internal.js +2 -182
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/parts.d.ts +18 -0
- package/side-navigation/parts.d.ts.map +1 -0
- package/side-navigation/parts.js +185 -0
- package/side-navigation/parts.js.map +1 -0
- package/slider/internal.d.ts.map +1 -1
- package/slider/internal.js +6 -2
- package/slider/internal.js.map +1 -1
- package/slider/styles.css.js +25 -23
- package/slider/styles.scoped.css +95 -52
- package/slider/styles.selectors.js +25 -23
- package/slider/tick-marks.d.ts +1 -0
- package/slider/tick-marks.d.ts.map +1 -1
- package/slider/tick-marks.js +4 -1
- package/slider/tick-marks.js.map +1 -1
- package/split-panel/implementation.d.ts +1 -0
- package/split-panel/implementation.d.ts.map +1 -1
- package/split-panel/implementation.js +2 -0
- package/split-panel/implementation.js.map +1 -1
- package/split-panel/styles.css.js +57 -57
- package/split-panel/styles.scoped.css +78 -77
- package/split-panel/styles.selectors.js +57 -57
- package/split-panel/widget.d.ts +1 -5
- package/split-panel/widget.d.ts.map +1 -1
- package/split-panel/widget.js +1 -13
- package/split-panel/widget.js.map +1 -1
package/header/styles.scoped.css
CHANGED
|
@@ -96,7 +96,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
96
96
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
97
97
|
SPDX-License-Identifier: Apache-2.0
|
|
98
98
|
*/
|
|
99
|
-
.
|
|
99
|
+
.awsui_root_2qdw9_60h2j_99:not(#\9) {
|
|
100
100
|
border-collapse: separate;
|
|
101
101
|
border-spacing: 0;
|
|
102
102
|
box-sizing: border-box;
|
|
@@ -136,32 +136,32 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
136
136
|
flex-wrap: wrap;
|
|
137
137
|
justify-content: space-between;
|
|
138
138
|
}
|
|
139
|
-
.awsui_root-with-
|
|
139
|
+
.awsui_root-with-toolbar_2qdw9_60h2j_138:not(#\9) {
|
|
140
140
|
padding-block-start: var(--space-scaled-s-aqzyko, 12px);
|
|
141
141
|
}
|
|
142
|
-
.
|
|
142
|
+
.awsui_root_2qdw9_60h2j_99.awsui_refresh_2qdw9_60h2j_141:not(#\9), .awsui_root_2qdw9_60h2j_99:not(#\9):not(.awsui_root-no-actions_2qdw9_60h2j_141) {
|
|
143
143
|
row-gap: var(--space-scaled-xxs-7597g1, 4px);
|
|
144
144
|
}
|
|
145
|
-
.awsui_root-no-
|
|
145
|
+
.awsui_root-no-actions_2qdw9_60h2j_141.awsui_root-variant-h2_2qdw9_60h2j_144:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141), .awsui_root-no-actions_2qdw9_60h2j_141.awsui_root-variant-h3_2qdw9_60h2j_144:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141), .awsui_root-has-description_2qdw9_60h2j_144.awsui_root-variant-h2_2qdw9_60h2j_144:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141), .awsui_root-has-description_2qdw9_60h2j_144.awsui_root-variant-h3_2qdw9_60h2j_144:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
146
146
|
padding-block-end: var(--space-scaled-xxs-7597g1, 4px);
|
|
147
147
|
}
|
|
148
|
-
.awsui_root-no-
|
|
148
|
+
.awsui_root-no-actions_2qdw9_60h2j_141:not(#\9):not(.awsui_root-has-description_2qdw9_60h2j_144):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
149
149
|
padding-block-end: calc(var(--space-scaled-xs-26e2du, 8px) + var(--space-xxxs-zbmxqb, 2px));
|
|
150
150
|
}
|
|
151
|
-
.awsui_root-no-
|
|
151
|
+
.awsui_root-no-actions_2qdw9_60h2j_141.awsui_refresh_2qdw9_60h2j_141.awsui_root-variant-h2_2qdw9_60h2j_144:not(#\9), .awsui_root-no-actions_2qdw9_60h2j_141.awsui_refresh_2qdw9_60h2j_141.awsui_root-variant-h3_2qdw9_60h2j_144:not(#\9) {
|
|
152
152
|
row-gap: var(--space-scaled-xxxs-27y4hv, 2px);
|
|
153
153
|
}
|
|
154
|
-
.
|
|
154
|
+
.awsui_root_2qdw9_60h2j_99.awsui_root-variant-h1_2qdw9_60h2j_153:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
155
155
|
row-gap: var(--space-scaled-xxs-7597g1, 4px);
|
|
156
156
|
}
|
|
157
|
-
.awsui_root-no-
|
|
157
|
+
.awsui_root-no-actions_2qdw9_60h2j_141:not(#\9):not(.awsui_root-has-description_2qdw9_60h2j_144).awsui_refresh_2qdw9_60h2j_141.awsui_root-variant-h3_2qdw9_60h2j_144 {
|
|
158
158
|
padding-block-end: var(--space-scaled-xs-26e2du, 8px);
|
|
159
159
|
}
|
|
160
|
-
.
|
|
160
|
+
.awsui_root_2qdw9_60h2j_99.awsui_root-variant-h1_2qdw9_60h2j_153.awsui_root-has-description_2qdw9_60h2j_144:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
161
161
|
padding-block-end: var(--space-scaled-2x-xxs-7v8ivz, 4px);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.
|
|
164
|
+
.awsui_main_2qdw9_60h2j_163:not(#\9) {
|
|
165
165
|
word-wrap: break-word;
|
|
166
166
|
max-inline-size: 100%;
|
|
167
167
|
display: flex;
|
|
@@ -171,167 +171,159 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
171
171
|
column-gap: var(--space-xs-zb16t3, 8px);
|
|
172
172
|
row-gap: calc(var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxxs-27y4hv, 2px));
|
|
173
173
|
}
|
|
174
|
-
.
|
|
174
|
+
.awsui_main_2qdw9_60h2j_163.awsui_no-wrap_2qdw9_60h2j_173:not(#\9) {
|
|
175
175
|
flex-wrap: nowrap;
|
|
176
176
|
}
|
|
177
|
-
.
|
|
177
|
+
.awsui_main_2qdw9_60h2j_163.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
178
178
|
row-gap: var(--space-xxs-p8yyaw, 4px);
|
|
179
179
|
}
|
|
180
|
-
.awsui_main-variant-
|
|
180
|
+
.awsui_main-variant-h1_2qdw9_60h2j_179:not(#\9) {
|
|
181
181
|
row-gap: var(--space-scaled-2x-xxs-7v8ivz, 4px);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.awsui_root-has-
|
|
184
|
+
.awsui_root-has-description_2qdw9_60h2j_144 > .awsui_main_2qdw9_60h2j_163:not(#\9) {
|
|
185
185
|
row-gap: var(--space-scaled-2x-xxs-7v8ivz, 4px);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
.
|
|
188
|
+
.awsui_actions_2qdw9_60h2j_187:not(#\9) {
|
|
189
189
|
display: flex;
|
|
190
190
|
align-items: flex-start;
|
|
191
191
|
min-block-size: var(--size-vertical-input-v5iwwf, 32px);
|
|
192
192
|
}
|
|
193
|
-
.awsui_actions-
|
|
193
|
+
.awsui_actions-centered_2qdw9_60h2j_192:not(#\9) {
|
|
194
194
|
align-items: center;
|
|
195
195
|
}
|
|
196
|
-
.awsui_actions-variant-
|
|
196
|
+
.awsui_actions-variant-h1_2qdw9_60h2j_195.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
197
197
|
padding-block: calc((var(--line-height-heading-xl-avbttk, 30px) - var(--size-vertical-input-v5iwwf, 32px)) / 2);
|
|
198
198
|
padding-inline: 0;
|
|
199
199
|
}
|
|
200
|
-
.awsui_actions-variant-
|
|
200
|
+
.awsui_actions-variant-h2_2qdw9_60h2j_199.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
201
201
|
padding-block: calc((var(--line-height-heading-l-mmm3my, 24px) - var(--size-vertical-input-v5iwwf, 32px)) / 2);
|
|
202
202
|
padding-inline: 0;
|
|
203
203
|
}
|
|
204
|
-
.awsui_actions-variant-
|
|
204
|
+
.awsui_actions-variant-h3_2qdw9_60h2j_203.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
205
205
|
padding-block: calc((var(--line-height-heading-m-50evfk, 22px) - var(--size-vertical-input-v5iwwf, 32px)) / 2);
|
|
206
206
|
padding-inline: 0;
|
|
207
207
|
}
|
|
208
|
-
.awsui_actions-variant-
|
|
208
|
+
.awsui_actions-variant-h1_2qdw9_60h2j_195:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
209
209
|
padding-block: var(--space-scaled-xs-26e2du, 8px);
|
|
210
210
|
padding-inline: 0;
|
|
211
211
|
}
|
|
212
|
-
.awsui_actions-variant-
|
|
212
|
+
.awsui_actions-variant-h2_2qdw9_60h2j_199:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141), .awsui_actions-variant-h3_2qdw9_60h2j_203:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
213
213
|
padding-block: var(--space-scaled-xxs-7597g1, 4px);
|
|
214
214
|
padding-inline: 0;
|
|
215
215
|
}
|
|
216
|
-
.awsui_root-has-
|
|
216
|
+
.awsui_root-has-description_2qdw9_60h2j_144 > .awsui_main_2qdw9_60h2j_163 > .awsui_actions_2qdw9_60h2j_187:not(#\9) {
|
|
217
217
|
padding-block-end: 0;
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
.
|
|
220
|
+
.awsui_title_2qdw9_60h2j_219:not(#\9) {
|
|
221
221
|
min-inline-size: 0;
|
|
222
222
|
word-break: break-word;
|
|
223
223
|
color: var(--color-text-heading-default-lstrpn, #000716);
|
|
224
224
|
}
|
|
225
|
-
.awsui_title-variant-
|
|
225
|
+
.awsui_title-variant-h1_2qdw9_60h2j_224:not(#\9) {
|
|
226
226
|
font-size: var(--font-size-heading-xl-ypc05a, 24px);
|
|
227
227
|
padding-block-start: var(--space-scaled-2x-xxs-7v8ivz, 4px);
|
|
228
228
|
}
|
|
229
|
-
.awsui_title-variant-
|
|
229
|
+
.awsui_title-variant-h1_2qdw9_60h2j_224.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
230
230
|
padding-block-start: calc((var(--size-vertical-input-v5iwwf, 32px) - var(--line-height-heading-xl-avbttk, 30px)) / 2);
|
|
231
231
|
}
|
|
232
|
-
.awsui_title-variant-
|
|
232
|
+
.awsui_title-variant-h2_2qdw9_60h2j_231:not(#\9) {
|
|
233
233
|
font-size: var(--font-size-heading-l-ou0d0l, 20px);
|
|
234
234
|
}
|
|
235
|
-
.awsui_title-variant-
|
|
235
|
+
.awsui_title-variant-h2_2qdw9_60h2j_231.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
236
236
|
padding-block-start: calc((var(--size-vertical-input-v5iwwf, 32px) - var(--line-height-heading-l-mmm3my, 24px)) / 2);
|
|
237
237
|
}
|
|
238
|
-
.awsui_title-variant-
|
|
238
|
+
.awsui_title-variant-h3_2qdw9_60h2j_237:not(#\9) {
|
|
239
239
|
font-size: var(--font-size-heading-m-sjd256, 18px);
|
|
240
240
|
}
|
|
241
|
-
.awsui_title-variant-
|
|
241
|
+
.awsui_title-variant-h3_2qdw9_60h2j_237.awsui_refresh_2qdw9_60h2j_141:not(#\9) {
|
|
242
242
|
padding-block-start: calc((var(--size-vertical-input-v5iwwf, 32px) - var(--line-height-heading-m-50evfk, 22px)) / 2);
|
|
243
243
|
}
|
|
244
|
-
.awsui_title-variant-
|
|
244
|
+
.awsui_title-variant-h2_2qdw9_60h2j_231:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141), .awsui_title-variant-h3_2qdw9_60h2j_237:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
245
245
|
padding-block-start: var(--space-scaled-xs-26e2du, 8px);
|
|
246
246
|
}
|
|
247
|
-
.awsui_no-
|
|
247
|
+
.awsui_no-wrap_2qdw9_60h2j_173 > .awsui_title_2qdw9_60h2j_219:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
248
248
|
padding-block-end: calc(var(--space-scaled-xxs-7597g1, 4px) + var(--space-scaled-xxxs-27y4hv, 2px));
|
|
249
249
|
}
|
|
250
|
-
.awsui_title_2qdw9_jcalo_219:not(#\9):dir(rtl) {
|
|
251
|
-
align-items: center;
|
|
252
|
-
display: inline-flex;
|
|
253
|
-
}
|
|
254
250
|
|
|
255
|
-
.awsui_root-no-
|
|
251
|
+
.awsui_root-no-actions_2qdw9_60h2j_141.awsui_root-has-description_2qdw9_60h2j_144 > .awsui_main_2qdw9_60h2j_163 > :not(#\9):not(.awsui_refresh_2qdw9_60h2j_141).awsui_title-variant-h2_2qdw9_60h2j_231, .awsui_root-no-actions_2qdw9_60h2j_141.awsui_root-has-description_2qdw9_60h2j_144 > .awsui_main_2qdw9_60h2j_163 > :not(#\9):not(.awsui_refresh_2qdw9_60h2j_141).awsui_title-variant-h3_2qdw9_60h2j_237 {
|
|
256
252
|
padding-block-end: var(--space-scaled-xxs-7597g1, 4px);
|
|
257
253
|
}
|
|
258
254
|
|
|
259
|
-
.awsui_root-variant-
|
|
255
|
+
.awsui_root-variant-h1_2qdw9_60h2j_153.awsui_root-no-actions_2qdw9_60h2j_141:not(#\9):not(.awsui_root-has-description_2qdw9_60h2j_144):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
260
256
|
padding-block-end: var(--space-scaled-2x-xxs-7v8ivz, 4px);
|
|
261
257
|
}
|
|
262
258
|
|
|
263
|
-
.awsui_virtual-
|
|
259
|
+
.awsui_virtual-space_2qdw9_60h2j_258:not(#\9) {
|
|
264
260
|
position: absolute !important;
|
|
265
261
|
inset-block-start: -9999px !important;
|
|
266
262
|
inset-inline-start: -9999px !important;
|
|
267
263
|
}
|
|
268
264
|
|
|
269
|
-
.
|
|
265
|
+
.awsui_info_2qdw9_60h2j_264:not(#\9) {
|
|
270
266
|
padding-inline-end: var(--space-s-34lx8l, 12px);
|
|
271
267
|
}
|
|
272
268
|
|
|
273
|
-
.
|
|
269
|
+
.awsui_description_2qdw9_60h2j_268:not(#\9) {
|
|
274
270
|
margin-block: 0;
|
|
275
271
|
margin-inline: 0;
|
|
276
272
|
padding-block: 0;
|
|
277
273
|
padding-inline: 0;
|
|
278
274
|
color: var(--color-text-heading-secondary-37b2tq, #414d5c);
|
|
279
275
|
}
|
|
280
|
-
.awsui_description-variant-
|
|
276
|
+
.awsui_description-variant-h1_2qdw9_60h2j_275:not(#\9) {
|
|
281
277
|
font-size: var(--font-size-body-m-x4okxb, 14px);
|
|
282
278
|
line-height: var(--line-height-body-m-30ar75, 20px);
|
|
283
279
|
}
|
|
284
|
-
.awsui_description-variant-
|
|
280
|
+
.awsui_description-variant-h2_2qdw9_60h2j_279:not(#\9) {
|
|
285
281
|
font-size: var(--font-header-h2-description-size-2hj97p, 14px);
|
|
286
282
|
line-height: var(--font-header-h2-description-line-height-rtewek, 20px);
|
|
287
283
|
}
|
|
288
|
-
.awsui_description-variant-
|
|
284
|
+
.awsui_description-variant-h2_2qdw9_60h2j_279:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
289
285
|
padding-block-end: var(--space-scaled-xxs-7597g1, 4px);
|
|
290
286
|
}
|
|
291
|
-
.awsui_description-variant-
|
|
287
|
+
.awsui_description-variant-h3_2qdw9_60h2j_286:not(#\9) {
|
|
292
288
|
font-size: var(--font-size-body-s-asqx2i, 12px);
|
|
293
289
|
line-height: var(--line-height-body-s-7zv1j5, 16px);
|
|
294
290
|
letter-spacing: var(--letter-spacing-body-s-z9jkwp, 0.005em);
|
|
295
291
|
}
|
|
296
|
-
.awsui_description-variant-
|
|
292
|
+
.awsui_description-variant-h3_2qdw9_60h2j_286:not(#\9):not(.awsui_refresh_2qdw9_60h2j_141) {
|
|
297
293
|
padding-block-end: var(--space-scaled-xxs-7597g1, 4px);
|
|
298
294
|
}
|
|
299
295
|
|
|
300
|
-
.
|
|
296
|
+
.awsui_heading_2qdw9_60h2j_295:not(#\9) {
|
|
301
297
|
margin-block: 0;
|
|
302
298
|
margin-inline: 0;
|
|
303
299
|
display: inline;
|
|
304
300
|
font-size: inherit;
|
|
305
301
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
306
302
|
}
|
|
307
|
-
.
|
|
303
|
+
.awsui_heading_2qdw9_60h2j_295:not(#\9):only-child {
|
|
308
304
|
margin-block: 0;
|
|
309
305
|
margin-inline: 0;
|
|
310
306
|
}
|
|
311
|
-
.awsui_heading-variant-
|
|
307
|
+
.awsui_heading-variant-h1_2qdw9_60h2j_306:not(#\9) {
|
|
312
308
|
font-size: var(--font-size-heading-xl-ypc05a, 24px);
|
|
313
309
|
line-height: var(--line-height-heading-xl-avbttk, 30px);
|
|
314
310
|
letter-spacing: var(--letter-spacing-heading-xl-sagq9c, -0.02em);
|
|
315
311
|
}
|
|
316
|
-
.awsui_heading-variant-
|
|
312
|
+
.awsui_heading-variant-h2_2qdw9_60h2j_311:not(#\9) {
|
|
317
313
|
font-size: var(--font-size-heading-l-ou0d0l, 20px);
|
|
318
314
|
line-height: var(--line-height-heading-l-mmm3my, 24px);
|
|
319
315
|
letter-spacing: var(--letter-spacing-heading-l-qqjd4y, -0.015em);
|
|
320
316
|
}
|
|
321
|
-
.awsui_heading-variant-
|
|
317
|
+
.awsui_heading-variant-h3_2qdw9_60h2j_316:not(#\9) {
|
|
322
318
|
font-size: var(--font-size-heading-m-sjd256, 18px);
|
|
323
319
|
line-height: var(--line-height-heading-m-50evfk, 22px);
|
|
324
320
|
letter-spacing: var(--letter-spacing-heading-m-0w575i, -0.01em);
|
|
325
321
|
}
|
|
326
|
-
.awsui_heading_2qdw9_jcalo_299:not(#\9):dir(rtl) {
|
|
327
|
-
display: inline-flex;
|
|
328
|
-
gap: var(--space-scaled-xxs-7597g1, 4px);
|
|
329
|
-
}
|
|
330
322
|
|
|
331
|
-
.awsui_heading-
|
|
323
|
+
.awsui_heading-text_2qdw9_60h2j_322:not(#\9) {
|
|
332
324
|
/* used in test-utils */
|
|
333
325
|
}
|
|
334
|
-
.awsui_heading-text-variant-
|
|
326
|
+
.awsui_heading-text-variant-h1_2qdw9_60h2j_325:not(#\9) {
|
|
335
327
|
font-size: var(--font-size-heading-xl-ypc05a, 24px);
|
|
336
328
|
line-height: var(--line-height-heading-xl-avbttk, 30px);
|
|
337
329
|
letter-spacing: var(--letter-spacing-heading-xl-sagq9c, -0.02em);
|
|
@@ -339,7 +331,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
339
331
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
340
332
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
341
333
|
}
|
|
342
|
-
.awsui_heading-text-variant-
|
|
334
|
+
.awsui_heading-text-variant-h2_2qdw9_60h2j_333:not(#\9) {
|
|
343
335
|
font-size: var(--font-size-heading-l-ou0d0l, 20px);
|
|
344
336
|
line-height: var(--line-height-heading-l-mmm3my, 24px);
|
|
345
337
|
letter-spacing: var(--letter-spacing-heading-l-qqjd4y, -0.015em);
|
|
@@ -347,7 +339,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
347
339
|
-webkit-font-smoothing: var(--font-smoothing-webkit-m8nc84, antialiased);
|
|
348
340
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
349
341
|
}
|
|
350
|
-
.awsui_heading-text-variant-
|
|
342
|
+
.awsui_heading-text-variant-h3_2qdw9_60h2j_341:not(#\9) {
|
|
351
343
|
font-size: var(--font-size-heading-m-sjd256, 18px);
|
|
352
344
|
line-height: var(--line-height-heading-m-50evfk, 22px);
|
|
353
345
|
letter-spacing: var(--letter-spacing-heading-m-0w575i, -0.01em);
|
|
@@ -356,7 +348,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
356
348
|
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-foywby, grayscale);
|
|
357
349
|
}
|
|
358
350
|
|
|
359
|
-
.
|
|
351
|
+
.awsui_counter_2qdw9_60h2j_350:not(#\9) {
|
|
360
352
|
color: var(--color-text-counter-zqugin, #5f6b7a);
|
|
361
353
|
font-weight: 400;
|
|
362
354
|
}
|
|
@@ -2,40 +2,40 @@
|
|
|
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
|
-
"root-with-toolbar": "awsui_root-with-
|
|
7
|
-
"refresh": "
|
|
8
|
-
"root-no-actions": "awsui_root-no-
|
|
9
|
-
"root-variant-h2": "awsui_root-variant-
|
|
10
|
-
"root-variant-h3": "awsui_root-variant-
|
|
11
|
-
"root-has-description": "awsui_root-has-
|
|
12
|
-
"root-variant-h1": "awsui_root-variant-
|
|
13
|
-
"main": "
|
|
14
|
-
"no-wrap": "awsui_no-
|
|
15
|
-
"main-variant-h1": "awsui_main-variant-
|
|
16
|
-
"actions": "
|
|
17
|
-
"actions-centered": "awsui_actions-
|
|
18
|
-
"actions-variant-h1": "awsui_actions-variant-
|
|
19
|
-
"actions-variant-h2": "awsui_actions-variant-
|
|
20
|
-
"actions-variant-h3": "awsui_actions-variant-
|
|
21
|
-
"title": "
|
|
22
|
-
"title-variant-h1": "awsui_title-variant-
|
|
23
|
-
"title-variant-h2": "awsui_title-variant-
|
|
24
|
-
"title-variant-h3": "awsui_title-variant-
|
|
25
|
-
"virtual-space": "awsui_virtual-
|
|
26
|
-
"info": "
|
|
27
|
-
"description": "
|
|
28
|
-
"description-variant-h1": "awsui_description-variant-
|
|
29
|
-
"description-variant-h2": "awsui_description-variant-
|
|
30
|
-
"description-variant-h3": "awsui_description-variant-
|
|
31
|
-
"heading": "
|
|
32
|
-
"heading-variant-h1": "awsui_heading-variant-
|
|
33
|
-
"heading-variant-h2": "awsui_heading-variant-
|
|
34
|
-
"heading-variant-h3": "awsui_heading-variant-
|
|
35
|
-
"heading-text": "awsui_heading-
|
|
36
|
-
"heading-text-variant-h1": "awsui_heading-text-variant-
|
|
37
|
-
"heading-text-variant-h2": "awsui_heading-text-variant-
|
|
38
|
-
"heading-text-variant-h3": "awsui_heading-text-variant-
|
|
39
|
-
"counter": "
|
|
5
|
+
"root": "awsui_root_2qdw9_60h2j_99",
|
|
6
|
+
"root-with-toolbar": "awsui_root-with-toolbar_2qdw9_60h2j_138",
|
|
7
|
+
"refresh": "awsui_refresh_2qdw9_60h2j_141",
|
|
8
|
+
"root-no-actions": "awsui_root-no-actions_2qdw9_60h2j_141",
|
|
9
|
+
"root-variant-h2": "awsui_root-variant-h2_2qdw9_60h2j_144",
|
|
10
|
+
"root-variant-h3": "awsui_root-variant-h3_2qdw9_60h2j_144",
|
|
11
|
+
"root-has-description": "awsui_root-has-description_2qdw9_60h2j_144",
|
|
12
|
+
"root-variant-h1": "awsui_root-variant-h1_2qdw9_60h2j_153",
|
|
13
|
+
"main": "awsui_main_2qdw9_60h2j_163",
|
|
14
|
+
"no-wrap": "awsui_no-wrap_2qdw9_60h2j_173",
|
|
15
|
+
"main-variant-h1": "awsui_main-variant-h1_2qdw9_60h2j_179",
|
|
16
|
+
"actions": "awsui_actions_2qdw9_60h2j_187",
|
|
17
|
+
"actions-centered": "awsui_actions-centered_2qdw9_60h2j_192",
|
|
18
|
+
"actions-variant-h1": "awsui_actions-variant-h1_2qdw9_60h2j_195",
|
|
19
|
+
"actions-variant-h2": "awsui_actions-variant-h2_2qdw9_60h2j_199",
|
|
20
|
+
"actions-variant-h3": "awsui_actions-variant-h3_2qdw9_60h2j_203",
|
|
21
|
+
"title": "awsui_title_2qdw9_60h2j_219",
|
|
22
|
+
"title-variant-h1": "awsui_title-variant-h1_2qdw9_60h2j_224",
|
|
23
|
+
"title-variant-h2": "awsui_title-variant-h2_2qdw9_60h2j_231",
|
|
24
|
+
"title-variant-h3": "awsui_title-variant-h3_2qdw9_60h2j_237",
|
|
25
|
+
"virtual-space": "awsui_virtual-space_2qdw9_60h2j_258",
|
|
26
|
+
"info": "awsui_info_2qdw9_60h2j_264",
|
|
27
|
+
"description": "awsui_description_2qdw9_60h2j_268",
|
|
28
|
+
"description-variant-h1": "awsui_description-variant-h1_2qdw9_60h2j_275",
|
|
29
|
+
"description-variant-h2": "awsui_description-variant-h2_2qdw9_60h2j_279",
|
|
30
|
+
"description-variant-h3": "awsui_description-variant-h3_2qdw9_60h2j_286",
|
|
31
|
+
"heading": "awsui_heading_2qdw9_60h2j_295",
|
|
32
|
+
"heading-variant-h1": "awsui_heading-variant-h1_2qdw9_60h2j_306",
|
|
33
|
+
"heading-variant-h2": "awsui_heading-variant-h2_2qdw9_60h2j_311",
|
|
34
|
+
"heading-variant-h3": "awsui_heading-variant-h3_2qdw9_60h2j_316",
|
|
35
|
+
"heading-text": "awsui_heading-text_2qdw9_60h2j_322",
|
|
36
|
+
"heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_60h2j_325",
|
|
37
|
+
"heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_60h2j_333",
|
|
38
|
+
"heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_60h2j_341",
|
|
39
|
+
"counter": "awsui_counter_2qdw9_60h2j_350"
|
|
40
40
|
};
|
|
41
41
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
|
|
3
|
+
import { HelpPanelProps } from './interfaces';
|
|
4
|
+
export type HelpPanelInternalProps = HelpPanelProps & InternalBaseComponentProps;
|
|
5
|
+
export declare function HelpPanelImplementation({ header, footer, children, loading, loadingText, __internalRootRef, ...restProps }: HelpPanelInternalProps): JSX.Element;
|
|
6
|
+
export declare const createWidgetizedHelpPanel: (Loader?: typeof HelpPanelImplementation | undefined) => typeof HelpPanelImplementation;
|
|
7
|
+
//# sourceMappingURL=implementation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation.d.ts","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM9C,MAAM,MAAM,sBAAsB,GAAG,cAAc,GAAG,0BAA0B,CAAC;AAEjF,wBAAgB,uBAAuB,CAAC,EACtC,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,GAAG,SAAS,EACb,EAAE,sBAAsB,eAsBxB;AAED,eAAO,MAAM,yBAAyB,yFAAqD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { getBaseProps } from '../internal/base-component';
|
|
7
|
+
import InternalStatusIndicator from '../status-indicator/internal';
|
|
8
|
+
import styles from './styles.css.js';
|
|
9
|
+
import LiveRegion from '../internal/components/live-region';
|
|
10
|
+
import { useInternalI18n } from '../i18n/context';
|
|
11
|
+
import { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';
|
|
12
|
+
import { createWidgetizedComponent } from '../internal/widgets';
|
|
13
|
+
export function HelpPanelImplementation(_a) {
|
|
14
|
+
var { header, footer, children, loading, loadingText, __internalRootRef } = _a, restProps = __rest(_a, ["header", "footer", "children", "loading", "loadingText", "__internalRootRef"]);
|
|
15
|
+
const baseProps = getBaseProps(restProps);
|
|
16
|
+
const i18n = useInternalI18n('help-panel');
|
|
17
|
+
const containerProps = Object.assign(Object.assign({}, baseProps), { className: clsx(baseProps.className, styles['help-panel']) });
|
|
18
|
+
return loading ? (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
19
|
+
React.createElement(InternalStatusIndicator, { type: "loading" },
|
|
20
|
+
React.createElement(LiveRegion, { visible: true }, i18n('loadingText', loadingText))))) : (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
21
|
+
header && React.createElement("div", { className: clsx(styles.header) }, header),
|
|
22
|
+
React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
|
|
23
|
+
React.createElement("div", { className: clsx(styles.content) }, children)),
|
|
24
|
+
footer && React.createElement("div", { className: styles.footer }, footer)));
|
|
25
|
+
}
|
|
26
|
+
export const createWidgetizedHelpPanel = createWidgetizedComponent(HelpPanelImplementation);
|
|
27
|
+
//# sourceMappingURL=implementation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"implementation.js","sourceRoot":"","sources":["../../../src/help-panel/implementation.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO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C,OAAO,CAAC,IAAG,QAAQ,CAAO,CACnB;QACpC,MAAM,IAAI,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,IAAG,MAAM,CAAO,CACpD,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,yBAAyB,GAAG,yBAAyB,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport clsx from 'clsx';\nimport React from 'react';\nimport { getBaseProps } from '../internal/base-component';\nimport InternalStatusIndicator from '../status-indicator/internal';\nimport styles from './styles.css.js';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { HelpPanelProps } from './interfaces';\nimport LiveRegion from '../internal/components/live-region';\nimport { useInternalI18n } from '../i18n/context';\nimport { LinkDefaultVariantContext } from '../internal/context/link-default-variant-context';\nimport { createWidgetizedComponent } from '../internal/widgets';\n\nexport type HelpPanelInternalProps = HelpPanelProps & InternalBaseComponentProps;\n\nexport function HelpPanelImplementation({\n header,\n footer,\n children,\n loading,\n loadingText,\n __internalRootRef,\n ...restProps\n}: HelpPanelInternalProps) {\n const baseProps = getBaseProps(restProps);\n const i18n = useInternalI18n('help-panel');\n const containerProps = {\n ...baseProps,\n className: clsx(baseProps.className, styles['help-panel']),\n };\n return loading ? (\n <div {...containerProps} ref={__internalRootRef}>\n <InternalStatusIndicator type=\"loading\">\n <LiveRegion visible={true}>{i18n('loadingText', loadingText)}</LiveRegion>\n </InternalStatusIndicator>\n </div>\n ) : (\n <div {...containerProps} ref={__internalRootRef}>\n {header && <div className={clsx(styles.header)}>{header}</div>}\n <LinkDefaultVariantContext.Provider value={{ defaultVariant: 'primary' }}>\n <div className={clsx(styles.content)}>{children}</div>\n </LinkDefaultVariantContext.Provider>\n {footer && <div className={styles.footer}>{footer}</div>}\n </div>\n );\n}\n\nexport const createWidgetizedHelpPanel = createWidgetizedComponent(HelpPanelImplementation);\n"]}
|
package/help-panel/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HelpPanelProps } from './interfaces';
|
|
3
3
|
export { HelpPanelProps };
|
|
4
|
-
export default function HelpPanel(
|
|
4
|
+
export default function HelpPanel(props: HelpPanelProps): JSX.Element;
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/help-panel/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/help-panel/index.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,cAAc,eAGtD"}
|
package/help-panel/index.js
CHANGED
|
@@ -1,29 +1,12 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
import clsx from 'clsx';
|
|
5
3
|
import React from 'react';
|
|
6
|
-
import { getBaseProps } from '../internal/base-component';
|
|
7
|
-
import InternalStatusIndicator from '../status-indicator/internal';
|
|
8
|
-
import styles from './styles.css.js';
|
|
9
4
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
10
5
|
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var { header, footer, children, loading, loadingText } = _a, restProps = __rest(_a, ["header", "footer", "children", "loading", "loadingText"]);
|
|
16
|
-
const { __internalRootRef } = useBaseComponent('HelpPanel');
|
|
17
|
-
const baseProps = getBaseProps(restProps);
|
|
18
|
-
const i18n = useInternalI18n('help-panel');
|
|
19
|
-
const containerProps = Object.assign(Object.assign({}, baseProps), { className: clsx(baseProps.className, styles['help-panel']) });
|
|
20
|
-
return loading ? (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
21
|
-
React.createElement(InternalStatusIndicator, { type: "loading" },
|
|
22
|
-
React.createElement(LiveRegion, { visible: true }, i18n('loadingText', loadingText))))) : (React.createElement("div", Object.assign({}, containerProps, { ref: __internalRootRef }),
|
|
23
|
-
header && React.createElement("div", { className: clsx(styles.header) }, header),
|
|
24
|
-
React.createElement(LinkDefaultVariantContext.Provider, { value: { defaultVariant: 'primary' } },
|
|
25
|
-
React.createElement("div", { className: clsx(styles.content) }, children)),
|
|
26
|
-
footer && React.createElement("div", { className: styles.footer }, footer)));
|
|
6
|
+
import { InternalHelpPanel } from './internal';
|
|
7
|
+
export default function HelpPanel(props) {
|
|
8
|
+
const internalProps = useBaseComponent('HelpPanel');
|
|
9
|
+
return React.createElement(InternalHelpPanel, Object.assign({}, props, internalProps));
|
|
27
10
|
}
|
|
28
11
|
applyDisplayName(HelpPanel, 'HelpPanel');
|
|
29
12
|
//# sourceMappingURL=index.js.map
|
package/help-panel/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/help-panel/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/help-panel/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAI/C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAqB;IACrD,MAAM,aAAa,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IACpD,OAAO,oBAAC,iBAAiB,oBAAK,KAAK,EAAM,aAAa,EAAI,CAAC;AAC7D,CAAC;AAED,gBAAgB,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { HelpPanelProps } from './interfaces';\nimport { InternalHelpPanel } from './internal';\n\nexport { HelpPanelProps };\n\nexport default function HelpPanel(props: HelpPanelProps) {\n const internalProps = useBaseComponent('HelpPanel');\n return <InternalHelpPanel {...props} {...internalProps} />;\n}\n\napplyDisplayName(HelpPanel, 'HelpPanel');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/help-panel/internal.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,2DAA8B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { createWidgetizedHelpPanel } from './implementation';
|
|
4
|
+
export const InternalHelpPanel = createWidgetizedHelpPanel();
|
|
5
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/help-panel/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAE7D,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,EAAE,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { createWidgetizedHelpPanel } from './implementation';\n\nexport const InternalHelpPanel = createWidgetizedHelpPanel();\n"]}
|
package/input/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAG3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,OAAO,EAA6C,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAE,kBAAkB,EAAgB,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAAE,+BAA+B,EAAuB,MAAM,wCAAwC,CAAC;AAC9G,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,MAAM,WAAW,kBACf,SAAQ,kBAAkB,EACxB,cAAc,EACd,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EACxB,gBAAgB,EAChB,+BAA+B,EAC/B,0BAA0B;IAC5B,IAAI,CAAC,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC;IAC3C,UAAU,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAC/B,iBAAiB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACzC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE/B,WAAW,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAEhC,kBAAkB,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,gBAAgB,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC/D,kBAAkB,CAAC,EAAE,yBAAyB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C;IAC/D,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;QAAE,aAAa,EAAE,IAAI,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAE/E,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;;AAsKD,wBAA+C"}
|
package/input/internal.js
CHANGED
|
@@ -74,7 +74,7 @@ function InternalInput(_a, ref) {
|
|
|
74
74
|
if (attributes.type === 'visualSearch') {
|
|
75
75
|
attributes.type = 'text';
|
|
76
76
|
}
|
|
77
|
-
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles['input-container']), ref: __internalRootRef }),
|
|
77
|
+
return (React.createElement("div", Object.assign({}, baseProps, { className: clsx(baseProps.className, styles['input-container']), ref: __internalRootRef, dir: type === 'email' ? 'ltr' : undefined }),
|
|
78
78
|
__leftIcon && (React.createElement("span", { onClick: __onLeftIconClick, className: styles['input-icon-left'] },
|
|
79
79
|
React.createElement(InternalIcon, { name: __leftIcon, variant: disabled || readOnly ? 'disabled' : __leftIconVariant }))),
|
|
80
80
|
React.createElement("input", Object.assign({ ref: mergedRef }, attributes)),
|
package/input/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport InternalButton from '../button/internal';\nimport { fireNonCancelableEvent, fireKeyboardEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport styles from './styles.css.js';\nimport { useInternalI18n } from '../i18n/context';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: React.InputHTMLAttributes<HTMLInputElement>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n [styles['input-warning']]: warning && !invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles['input-container'])} ref={__internalRootRef}>\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span className={styles['input-icon-right']}>\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,iBAAiB,EAA6B,MAAM,oBAAoB,CAAC;AAE1G,OAAO,EAAsB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAmC,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAE9G,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA0BlD,SAAS,aAAa,CACpB,EAqCqB,EACrB,GAA0B;QAtC1B,EACE,IAAI,GAAG,MAAM,EACb,IAAI,EACJ,SAAS,EACT,YAAY,GAAG,IAAI,EACnB,SAAS,EACT,cAAc,EAAE,sBAAsB,EACtC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,yBAAyB,EACzB,UAAU,EACV,gBAAgB,EAEhB,UAAU,EACV,iBAAiB,GAAG,QAAQ,EAC5B,iBAAiB,EAEjB,YAAY,EAEZ,WAAW,EACX,kBAAkB,EAElB,SAAS,EACT,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,iBAAiB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EAAE,QAAQ,IAAI,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,iBAAiB,GAAI,CAC7F,CACR;QACD,6CAAO,GAAG,EAAE,SAAS,IAAM,UAAU,EAAI;QACxC,WAAW,IAAI,CACd,8BAAM,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACzC,oBAAC,cAAc;YACb,sBAAsB;YACtB,wDAAwD;;gBADxD,sBAAsB;gBACtB,wDAAwD;gBACxD,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,aAAa,EACrB,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\nimport { useMergeRefs } from '../internal/hooks/use-merge-refs';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport InternalButton from '../button/internal';\nimport { fireNonCancelableEvent, fireKeyboardEvent, NonCancelableEventHandler } from '../internal/events';\nimport { InputProps, BaseInputProps, InputAutoCorrect, BaseChangeDetail } from './interfaces';\nimport { BaseComponentProps, getBaseProps } from '../internal/base-component';\nimport { useSearchProps, convertAutoComplete } from './utils';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../internal/context/form-field-context';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport styles from './styles.css.js';\nimport { useInternalI18n } from '../i18n/context';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __nativeAttributes?: React.InputHTMLAttributes<HTMLInputElement>;\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n __nativeAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n [styles['input-warning']]: warning && !invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n onBlur && fireNonCancelableEvent(onBlur);\n __onBlurWithDetail && fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n ...__nativeAttributes,\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['input-container'])}\n ref={__internalRootRef}\n dir={type === 'email' ? 'ltr' : undefined}\n >\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n <input ref={mergedRef} {...attributes} />\n {__rightIcon && (\n <span className={styles['input-icon-right']}>\n <InternalButton\n // Used for test utils\n // eslint-disable-next-line react/forbid-component-props\n className={styles['input-button-right']}\n variant=\"inline-icon\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|