@cloudscape-design/components-themeable 3.0.1328 → 3.0.1329
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/anchor-navigation/styles.scss +3 -0
- package/lib/internal/scss/expandable-section/styles.scss +1 -1
- package/lib/internal/scss/header/styles.scss +11 -0
- package/lib/internal/scss/internal/components/option/styles.scss +6 -2
- package/lib/internal/scss/internal/components/selectable-item/styles.scss +9 -8
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +173 -160
- package/lib/internal/scss/tree-view/tree-item/styles.scss +9 -4
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +50 -50
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/anchor-navigation/anchor-item/index.js +1 -1
- package/lib/internal/template/anchor-navigation/anchor-item/index.js.map +1 -1
- package/lib/internal/template/anchor-navigation/styles.css.js +8 -8
- package/lib/internal/template/anchor-navigation/styles.scoped.css +20 -18
- package/lib/internal/template/anchor-navigation/styles.selectors.js +8 -8
- package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +262 -262
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +4 -4
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +29 -29
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +66 -66
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +29 -29
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +29 -29
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +30 -30
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/styles.css.js +22 -22
- package/lib/internal/template/button/styles.scoped.css +256 -256
- package/lib/internal/template/button/styles.selectors.js +22 -22
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +11 -11
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/dropdown/styles.css.js +20 -20
- package/lib/internal/template/dropdown/styles.scoped.css +49 -49
- package/lib/internal/template/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +35 -35
- package/lib/internal/template/expandable-section/styles.scoped.css +70 -70
- package/lib/internal/template/expandable-section/styles.selectors.js +35 -35
- package/lib/internal/template/file-token-group/styles.css.js +23 -23
- package/lib/internal/template/file-token-group/styles.scoped.css +36 -36
- package/lib/internal/template/file-token-group/styles.selectors.js +23 -23
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +192 -192
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/header/internal.d.ts +2 -1
- package/lib/internal/template/header/internal.d.ts.map +1 -1
- package/lib/internal/template/header/internal.js +2 -2
- package/lib/internal/template/header/internal.js.map +1 -1
- package/lib/internal/template/header/styles.css.js +35 -34
- package/lib/internal/template/header/styles.scoped.css +60 -52
- package/lib/internal/template/header/styles.selectors.js +35 -34
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +72 -72
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/icon/generated/icons.d.ts +1 -0
- package/lib/internal/template/icon/generated/icons.d.ts.map +1 -1
- package/lib/internal/template/icon/generated/icons.js +3 -0
- package/lib/internal/template/icon/generated/icons.js.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts +1 -1
- package/lib/internal/template/icon-provider/interfaces.d.ts.map +1 -1
- package/lib/internal/template/icon-provider/interfaces.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +18 -18
- package/lib/internal/template/input/styles.scoped.css +82 -82
- package/lib/internal/template/input/styles.selectors.js +18 -18
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/lib/internal/template/internal/components/option/styles.css.js +17 -17
- package/lib/internal/template/internal/components/option/styles.scoped.css +31 -31
- package/lib/internal/template/internal/components/option/styles.selectors.js +17 -17
- package/lib/internal/template/internal/components/options-list/index.d.ts +2 -0
- package/lib/internal/template/internal/components/options-list/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/options-list/index.js +2 -2
- package/lib/internal/template/internal/components/options-list/index.js.map +1 -1
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +18 -18
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +22 -22
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +57 -57
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +22 -22
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +13 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +172 -159
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/item-card/styles.css.js +14 -14
- package/lib/internal/template/item-card/styles.scoped.css +63 -63
- package/lib/internal/template/item-card/styles.selectors.js +14 -14
- package/lib/internal/template/link/styles.css.js +21 -21
- package/lib/internal/template/link/styles.scoped.css +117 -117
- package/lib/internal/template/link/styles.selectors.js +21 -21
- package/lib/internal/template/modal/styles.css.js +31 -31
- package/lib/internal/template/modal/styles.scoped.css +48 -48
- package/lib/internal/template/modal/styles.selectors.js +31 -31
- package/lib/internal/template/multiselect/use-multiselect.d.ts +1 -0
- package/lib/internal/template/multiselect/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/styles.css.js +18 -18
- package/lib/internal/template/progress-bar/styles.scoped.css +48 -48
- package/lib/internal/template/progress-bar/styles.selectors.js +18 -18
- package/lib/internal/template/prompt-input/components/menu-dropdown.d.ts +3 -1
- package/lib/internal/template/prompt-input/components/menu-dropdown.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/components/menu-dropdown.js +2 -1
- package/lib/internal/template/prompt-input/components/menu-dropdown.js.map +1 -1
- package/lib/internal/template/prompt-input/components/token-mode.d.ts +3 -1
- package/lib/internal/template/prompt-input/components/token-mode.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/components/token-mode.js +14 -3
- package/lib/internal/template/prompt-input/components/token-mode.js.map +1 -1
- package/lib/internal/template/prompt-input/internal-interfaces.d.ts +41 -0
- package/lib/internal/template/prompt-input/internal-interfaces.d.ts.map +1 -0
- package/lib/internal/template/prompt-input/internal-interfaces.js +2 -0
- package/lib/internal/template/prompt-input/internal-interfaces.js.map +1 -0
- package/lib/internal/template/prompt-input/internal.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/internal.js +1 -1
- package/lib/internal/template/prompt-input/internal.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.d.ts +11 -0
- package/lib/internal/template/prompt-input/styles.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/styles.js +27 -2
- package/lib/internal/template/prompt-input/styles.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.scoped.css +105 -105
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/property-filter/controller.d.ts.map +1 -1
- package/lib/internal/template/property-filter/controller.js +10 -6
- package/lib/internal/template/property-filter/controller.js.map +1 -1
- package/lib/internal/template/property-filter/i18n-utils.d.ts +2 -2
- package/lib/internal/template/property-filter/i18n-utils.d.ts.map +1 -1
- package/lib/internal/template/property-filter/i18n-utils.js +11 -4
- package/lib/internal/template/property-filter/i18n-utils.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +8 -2
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/internal-interfaces.d.ts +1 -0
- package/lib/internal/template/property-filter/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/internal-interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/property-filter/internal.js +1 -0
- package/lib/internal/template/property-filter/internal.js.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.d.ts +2 -1
- package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.js +18 -8
- package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
- package/lib/internal/template/property-filter/token-editor.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor.js +1 -1
- package/lib/internal/template/property-filter/token-editor.js.map +1 -1
- package/lib/internal/template/property-filter/utils.d.ts.map +1 -1
- package/lib/internal/template/property-filter/utils.js +12 -3
- package/lib/internal/template/property-filter/utils.js.map +1 -1
- package/lib/internal/template/segmented-control/styles.css.js +16 -16
- package/lib/internal/template/segmented-control/styles.scoped.css +46 -46
- package/lib/internal/template/segmented-control/styles.selectors.js +16 -16
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +165 -165
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +13 -13
- package/lib/internal/template/spinner/styles.scoped.css +39 -39
- package/lib/internal/template/spinner/styles.selectors.js +13 -13
- package/lib/internal/template/tabs/styles.css.js +30 -30
- package/lib/internal/template/tabs/styles.scoped.css +76 -76
- package/lib/internal/template/tabs/styles.selectors.js +30 -30
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/textarea/styles.css.js +5 -5
- package/lib/internal/template/textarea/styles.scoped.css +45 -45
- package/lib/internal/template/textarea/styles.selectors.js +5 -5
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +23 -23
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/token/internal.d.ts.map +1 -1
- package/lib/internal/template/token/internal.js +4 -1
- package/lib/internal/template/token/internal.js.map +1 -1
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.scoped.css +47 -47
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/lib/internal/template/tree-view/tree-item/index.js +1 -1
- package/lib/internal/template/tree-view/tree-item/index.js.map +1 -1
- package/lib/internal/template/tree-view/tree-item/styles.css.js +10 -9
- package/lib/internal/template/tree-view/tree-item/styles.scoped.css +20 -14
- package/lib/internal/template/tree-view/tree-item/styles.selectors.js +10 -9
- package/package.json +1 -1
|
@@ -186,27 +186,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
186
186
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
187
187
|
SPDX-License-Identifier: Apache-2.0
|
|
188
188
|
*/
|
|
189
|
-
.
|
|
189
|
+
.awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-value {
|
|
190
190
|
-webkit-transition: width var(--motion-duration-moderate-24bai8, 135ms) linear;
|
|
191
191
|
transition: width var(--motion-duration-moderate-24bai8, 135ms) linear;
|
|
192
192
|
}
|
|
193
193
|
@media (prefers-reduced-motion: reduce) {
|
|
194
|
-
.
|
|
194
|
+
.awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-value {
|
|
195
195
|
animation: none;
|
|
196
196
|
-webkit-transition: none;
|
|
197
197
|
transition: none;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
.awsui-motion-disabled .
|
|
200
|
+
.awsui-motion-disabled .awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-value, .awsui-mode-entering .awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-value {
|
|
201
201
|
animation: none;
|
|
202
202
|
-webkit-transition: none;
|
|
203
203
|
transition: none;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
.awsui_result-
|
|
207
|
-
animation: awsui_awsui-motion-fade-
|
|
206
|
+
.awsui_result-state_11huc_15aqv_203:not(#\9) {
|
|
207
|
+
animation: awsui_awsui-motion-fade-in_11huc_15aqv_1 var(--motion-duration-transition-show-paced-0w35xp, 180ms) var(--motion-easing-transition-show-paced-ufdgkj, ease-out);
|
|
208
208
|
}
|
|
209
|
-
@keyframes awsui_awsui-motion-fade-
|
|
209
|
+
@keyframes awsui_awsui-motion-fade-in_11huc_15aqv_1 {
|
|
210
210
|
from {
|
|
211
211
|
opacity: 0.2;
|
|
212
212
|
}
|
|
@@ -215,17 +215,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
@media (prefers-reduced-motion: reduce) {
|
|
218
|
-
.awsui_result-
|
|
218
|
+
.awsui_result-state_11huc_15aqv_203:not(#\9) {
|
|
219
219
|
animation: none;
|
|
220
220
|
transition: none;
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
|
-
.awsui-motion-disabled .awsui_result-
|
|
223
|
+
.awsui-motion-disabled .awsui_result-state_11huc_15aqv_203:not(#\9), .awsui-mode-entering .awsui_result-state_11huc_15aqv_203:not(#\9) {
|
|
224
224
|
animation: none;
|
|
225
225
|
transition: none;
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
.
|
|
228
|
+
.awsui_root_11huc_15aqv_225:not(#\9) {
|
|
229
229
|
border-collapse: separate;
|
|
230
230
|
border-spacing: 0;
|
|
231
231
|
box-sizing: border-box;
|
|
@@ -257,34 +257,34 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
257
257
|
-moz-osx-font-smoothing: auto;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
.awsui_with-result-
|
|
260
|
+
.awsui_with-result-button_11huc_15aqv_257:not(#\9) {
|
|
261
261
|
padding-inline-end: var(--space-m-n2lypl, 16px);
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
.awsui_result-
|
|
264
|
+
.awsui_result-text_11huc_15aqv_261:not(#\9) {
|
|
265
265
|
/* used in test-utils */
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
.awsui_result-container-
|
|
268
|
+
.awsui_result-container-error_11huc_15aqv_265:not(#\9), .awsui_result-container-success_11huc_15aqv_265:not(#\9) {
|
|
269
269
|
/* used in test-utils */
|
|
270
270
|
}
|
|
271
271
|
|
|
272
|
-
.awsui_result-
|
|
272
|
+
.awsui_result-button_11huc_15aqv_269:not(#\9) {
|
|
273
273
|
display: inline-block;
|
|
274
274
|
margin-block: var(--space-scaled-xxs-jatbiv, 4px);
|
|
275
275
|
margin-inline: 0;
|
|
276
276
|
}
|
|
277
277
|
|
|
278
|
-
.awsui_word-
|
|
278
|
+
.awsui_word-wrap_11huc_15aqv_275:not(#\9) {
|
|
279
279
|
min-inline-size: 0;
|
|
280
280
|
word-break: break-word;
|
|
281
281
|
}
|
|
282
282
|
|
|
283
|
-
.awsui_label-
|
|
283
|
+
.awsui_label-flash_11huc_15aqv_280:not(#\9) {
|
|
284
284
|
color: inherit;
|
|
285
285
|
font-weight: var(--font-weight-bold-p16d06, 700);
|
|
286
286
|
}
|
|
287
|
-
.awsui_label-key-
|
|
287
|
+
.awsui_label-key-value_11huc_15aqv_284:not(#\9) {
|
|
288
288
|
font-size: var(--font-size-body-m-vv54cm, 14px);
|
|
289
289
|
line-height: var(--line-height-body-m-bedeoh, 22px);
|
|
290
290
|
font-weight: var(--font-display-label-weight-ise9n2, 400);
|
|
@@ -292,18 +292,18 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
292
292
|
margin-block-end: var(--space-scaled-xxxs-prgw5k, 2px);
|
|
293
293
|
}
|
|
294
294
|
|
|
295
|
-
.
|
|
295
|
+
.awsui_flash_11huc_15aqv_292:not(#\9) {
|
|
296
296
|
color: inherit;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
-
.awsui_progress-
|
|
299
|
+
.awsui_progress-container_11huc_15aqv_296:not(#\9) {
|
|
300
300
|
display: flex;
|
|
301
301
|
align-items: center;
|
|
302
302
|
max-inline-size: 800px;
|
|
303
303
|
block-size: var(--line-height-body-m-bedeoh, 22px);
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.awsui_percentage-
|
|
306
|
+
.awsui_percentage-container_11huc_15aqv_303:not(#\9) {
|
|
307
307
|
inline-size: 33px;
|
|
308
308
|
flex-shrink: 0;
|
|
309
309
|
white-space: nowrap;
|
|
@@ -313,56 +313,56 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
313
313
|
letter-spacing: var(--letter-spacing-body-s-egrcsd, normal);
|
|
314
314
|
}
|
|
315
315
|
|
|
316
|
-
.
|
|
316
|
+
.awsui_percentage_11huc_15aqv_303:not(#\9) {
|
|
317
317
|
/* used in test-utils */
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
.
|
|
320
|
+
.awsui_progress_11huc_15aqv_189:not(#\9) {
|
|
321
321
|
inline-size: 100%;
|
|
322
322
|
margin-inline-end: var(--space-s-4a5hs8, 12px);
|
|
323
323
|
min-inline-size: 0;
|
|
324
|
-
block-size: var(--awsui-progress-bar-height-
|
|
324
|
+
block-size: var(--awsui-progress-bar-height-z17rmd, 4px);
|
|
325
325
|
border-block: 0;
|
|
326
326
|
border-inline: none;
|
|
327
327
|
box-sizing: border-box;
|
|
328
|
-
border-start-start-radius: var(--awsui-progress-bar-border-radius-
|
|
329
|
-
border-start-end-radius: var(--awsui-progress-bar-border-radius-
|
|
330
|
-
border-end-start-radius: var(--awsui-progress-bar-border-radius-
|
|
331
|
-
border-end-end-radius: var(--awsui-progress-bar-border-radius-
|
|
332
|
-
background-color: var(--awsui-progress-bar-background-color-
|
|
328
|
+
border-start-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
329
|
+
border-start-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
330
|
+
border-end-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
331
|
+
border-end-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
332
|
+
background-color: var(--awsui-progress-bar-background-color-z17rmd, var(--color-background-progress-bar-default-kw9ow4, #eaeded));
|
|
333
333
|
}
|
|
334
|
-
.
|
|
335
|
-
block-size: var(--awsui-progress-bar-height-
|
|
334
|
+
.awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-bar {
|
|
335
|
+
block-size: var(--awsui-progress-bar-height-z17rmd, 4px);
|
|
336
336
|
border-block: 0;
|
|
337
337
|
border-inline: none;
|
|
338
338
|
box-sizing: border-box;
|
|
339
|
-
border-start-start-radius: var(--awsui-progress-bar-border-radius-
|
|
340
|
-
border-start-end-radius: var(--awsui-progress-bar-border-radius-
|
|
341
|
-
border-end-start-radius: var(--awsui-progress-bar-border-radius-
|
|
342
|
-
border-end-end-radius: var(--awsui-progress-bar-border-radius-
|
|
343
|
-
background-color: var(--awsui-progress-bar-background-color-
|
|
339
|
+
border-start-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
340
|
+
border-start-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
341
|
+
border-end-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
342
|
+
border-end-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
343
|
+
background-color: var(--awsui-progress-bar-background-color-z17rmd, var(--color-background-progress-bar-default-kw9ow4, #eaeded));
|
|
344
344
|
}
|
|
345
|
-
.
|
|
346
|
-
border-start-start-radius: var(--awsui-progress-bar-border-radius-
|
|
345
|
+
.awsui_progress_11huc_15aqv_189:not(#\9)::-webkit-progress-value {
|
|
346
|
+
border-start-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
347
347
|
border-start-end-radius: 0;
|
|
348
|
-
border-end-start-radius: var(--awsui-progress-bar-border-radius-
|
|
348
|
+
border-end-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
349
349
|
border-end-end-radius: 0;
|
|
350
|
-
background-color: var(--awsui-progress-value-background-color-
|
|
350
|
+
background-color: var(--awsui-progress-value-background-color-z17rmd, var(--color-background-progress-bar-value-default-1bekh3, #0073bb));
|
|
351
351
|
}
|
|
352
|
-
.
|
|
353
|
-
border-start-start-radius: var(--awsui-progress-bar-border-radius-
|
|
354
|
-
border-start-end-radius: var(--awsui-progress-bar-border-radius-
|
|
355
|
-
border-end-start-radius: var(--awsui-progress-bar-border-radius-
|
|
356
|
-
border-end-end-radius: var(--awsui-progress-bar-border-radius-
|
|
352
|
+
.awsui_progress_11huc_15aqv_189.awsui_complete_11huc_15aqv_349:not(#\9)::-webkit-progress-value {
|
|
353
|
+
border-start-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
354
|
+
border-start-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
355
|
+
border-end-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
356
|
+
border-end-end-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
357
357
|
}
|
|
358
|
-
.
|
|
359
|
-
border-start-start-radius: var(--awsui-progress-bar-border-radius-
|
|
358
|
+
.awsui_progress_11huc_15aqv_189:not(#\9)::-moz-progress-bar {
|
|
359
|
+
border-start-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
360
360
|
border-start-end-radius: 0;
|
|
361
|
-
border-end-start-radius: var(--awsui-progress-bar-border-radius-
|
|
361
|
+
border-end-start-radius: var(--awsui-progress-bar-border-radius-z17rmd, 10px);
|
|
362
362
|
border-end-end-radius: 0;
|
|
363
|
-
background-color: var(--awsui-progress-value-background-color-
|
|
363
|
+
background-color: var(--awsui-progress-value-background-color-z17rmd, var(--color-background-progress-bar-value-default-1bekh3, #0073bb));
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
.awsui_additional-
|
|
366
|
+
.awsui_additional-info_11huc_15aqv_363:not(#\9) {
|
|
367
367
|
/* used in test-utils */
|
|
368
368
|
}
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"progress": "
|
|
6
|
-
"result-state": "awsui_result-
|
|
7
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
8
|
-
"root": "
|
|
9
|
-
"with-result-button": "awsui_with-result-
|
|
10
|
-
"result-text": "awsui_result-
|
|
11
|
-
"result-container-error": "awsui_result-container-
|
|
12
|
-
"result-container-success": "awsui_result-container-
|
|
13
|
-
"result-button": "awsui_result-
|
|
14
|
-
"word-wrap": "awsui_word-
|
|
15
|
-
"label-flash": "awsui_label-
|
|
16
|
-
"label-key-value": "awsui_label-key-
|
|
17
|
-
"flash": "
|
|
18
|
-
"progress-container": "awsui_progress-
|
|
19
|
-
"percentage-container": "awsui_percentage-
|
|
20
|
-
"percentage": "
|
|
21
|
-
"complete": "
|
|
22
|
-
"additional-info": "awsui_additional-
|
|
5
|
+
"progress": "awsui_progress_11huc_15aqv_189",
|
|
6
|
+
"result-state": "awsui_result-state_11huc_15aqv_203",
|
|
7
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_11huc_15aqv_1",
|
|
8
|
+
"root": "awsui_root_11huc_15aqv_225",
|
|
9
|
+
"with-result-button": "awsui_with-result-button_11huc_15aqv_257",
|
|
10
|
+
"result-text": "awsui_result-text_11huc_15aqv_261",
|
|
11
|
+
"result-container-error": "awsui_result-container-error_11huc_15aqv_265",
|
|
12
|
+
"result-container-success": "awsui_result-container-success_11huc_15aqv_265",
|
|
13
|
+
"result-button": "awsui_result-button_11huc_15aqv_269",
|
|
14
|
+
"word-wrap": "awsui_word-wrap_11huc_15aqv_275",
|
|
15
|
+
"label-flash": "awsui_label-flash_11huc_15aqv_280",
|
|
16
|
+
"label-key-value": "awsui_label-key-value_11huc_15aqv_284",
|
|
17
|
+
"flash": "awsui_flash_11huc_15aqv_292",
|
|
18
|
+
"progress-container": "awsui_progress-container_11huc_15aqv_296",
|
|
19
|
+
"percentage-container": "awsui_percentage-container_11huc_15aqv_303",
|
|
20
|
+
"percentage": "awsui_percentage_11huc_15aqv_303",
|
|
21
|
+
"complete": "awsui_complete_11huc_15aqv_349",
|
|
22
|
+
"additional-info": "awsui_additional-info_11huc_15aqv_363"
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -15,7 +15,9 @@ interface MenuDropdownProps {
|
|
|
15
15
|
hasDropdownStatus?: boolean;
|
|
16
16
|
listBottom?: React.ReactNode;
|
|
17
17
|
ariaDescribedby?: string;
|
|
18
|
+
/** Custom CSS properties applied to the options list root to theme option rows. */
|
|
19
|
+
optionsListCustomProperties?: React.CSSProperties;
|
|
18
20
|
}
|
|
19
|
-
export default function MenuDropdown({ menu, statusType, menuItemsState, menuItemsHandlers, highlightedOptionId, highlightText, listId, controlId, handleLoadMore, hasDropdownStatus, listBottom, ariaDescribedby, }: MenuDropdownProps): JSX.Element;
|
|
21
|
+
export default function MenuDropdown({ menu, statusType, menuItemsState, menuItemsHandlers, highlightedOptionId, highlightText, listId, controlId, handleLoadMore, hasDropdownStatus, listBottom, ariaDescribedby, optionsListCustomProperties, }: MenuDropdownProps): JSX.Element;
|
|
20
22
|
export {};
|
|
21
23
|
//# sourceMappingURL=menu-dropdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-dropdown.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/components/menu-dropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,4EAA4E;AAC5E,UAAU,iBAAiB;IACzB,IAAI,EAAE,gBAAgB,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1D,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"menu-dropdown.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/components/menu-dropdown.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAMjD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,4EAA4E;AAC5E,UAAU,iBAAiB;IACzB,IAAI,EAAE,gBAAgB,CAAC,cAAc,CAAC;IACtC,UAAU,EAAE,gBAAgB,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC1D,cAAc,EAAE,cAAc,CAAC;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mFAAmF;IACnF,2BAA2B,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CACnD;AAQD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,IAAI,EACJ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,aAAa,EACb,MAAM,EACN,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,2BAA2B,GAC5B,EAAE,iBAAiB,eAoDnB"}
|
|
@@ -10,7 +10,7 @@ const createMouseEventHandler = (handler) => (itemIndex) => {
|
|
|
10
10
|
handler(itemIndex);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
export default function MenuDropdown({ menu, statusType, menuItemsState, menuItemsHandlers, highlightedOptionId, highlightText, listId, controlId, handleLoadMore, hasDropdownStatus, listBottom, ariaDescribedby, }) {
|
|
13
|
+
export default function MenuDropdown({ menu, statusType, menuItemsState, menuItemsHandlers, highlightedOptionId, highlightText, listId, controlId, handleLoadMore, hasDropdownStatus, listBottom, ariaDescribedby, optionsListCustomProperties, }) {
|
|
14
14
|
const handleMouseUp = createMouseEventHandler(menuItemsHandlers.selectVisibleOptionWithMouse);
|
|
15
15
|
const handleMouseMove = createMouseEventHandler(menuItemsHandlers.highlightVisibleOptionWithMouse);
|
|
16
16
|
const ListComponent = menu.virtualScroll ? VirtualList : PlainList;
|
|
@@ -43,6 +43,7 @@ export default function MenuDropdown({ menu, statusType, menuItemsState, menuIte
|
|
|
43
43
|
onMouseMove: handleMouseMove,
|
|
44
44
|
ariaDescribedby,
|
|
45
45
|
statusType: statusType !== null && statusType !== void 0 ? statusType : 'finished',
|
|
46
|
+
customProperties: optionsListCustomProperties,
|
|
46
47
|
}, screenReaderContent: announcement })));
|
|
47
48
|
}
|
|
48
49
|
//# sourceMappingURL=menu-dropdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-dropdown.js","sourceRoot":"","sources":["../../../../src/prompt-input/components/menu-dropdown.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,SAAS,MAAM,8BAA8B,CAAC;AACrD,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,kBAA6C,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"menu-dropdown.js","sourceRoot":"","sources":["../../../../src/prompt-input/components/menu-dropdown.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,SAAS,MAAM,8BAA8B,CAAC;AACrD,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,kBAA6C,MAAM,4BAA4B,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAsBtE,MAAM,uBAAuB,GAAG,CAAC,OAAgC,EAAE,EAAE,CAAC,CAAC,SAAiB,EAAE,EAAE;IAC1F,IAAI,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;QACnB,OAAO,CAAC,SAAS,CAAC,CAAC;IACrB,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,E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Aa,EAAE,OAAO,EAAC,MAAM,EAAC,MAAM,EAAE,IAAI,IAChE,YAAY,CACM;QACrB,oBAAC,aAAa,IACZ,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,qBAAqB,EAAE,cAAc,EACrC,aAAa,EAAE,aAAa,EAC5B,oBAAoB,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,EAC5E,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE;gBACT,EAAE,EAAE,MAAM;gBACV,cAAc,EAAE,SAAS;gBACzB,SAAS,EAAE,aAAa;gBACxB,WAAW,EAAE,eAAe;gBAC5B,eAAe;gBACf,UAAU,EAAE,UAAU,aAAV,UAAU,cAAV,UAAU,GAAI,UAAU;gBACpC,gBAAgB,EAAE,2BAA2B;aAC9C,EACD,mBAAmB,EAAE,YAAY,GACjC,CACD,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useEffect, useRef } from 'react';\n\nimport PlainList from '../../autosuggest/plain-list';\nimport VirtualList from '../../autosuggest/virtual-list';\nimport InternalLiveRegion, { InternalLiveRegionRef } from '../../live-region/internal';\nimport { useAnnouncement } from '../../select/utils/use-announcement';\nimport { MenuItemsHandlers, MenuItemsState } from '../core/menu-state';\nimport { PromptInputProps } from '../interfaces';\n\n/** Props for the menu options list rendered inside the trigger dropdown. */\ninterface MenuDropdownProps {\n menu: PromptInputProps.MenuDefinition;\n statusType: PromptInputProps.MenuDefinition['statusType'];\n menuItemsState: MenuItemsState;\n menuItemsHandlers: MenuItemsHandlers;\n highlightedOptionId?: string;\n highlightText: string;\n listId: string;\n controlId: string;\n handleLoadMore: () => void;\n hasDropdownStatus?: boolean;\n listBottom?: React.ReactNode;\n ariaDescribedby?: string;\n /** Custom CSS properties applied to the options list root to theme option rows. */\n optionsListCustomProperties?: React.CSSProperties;\n}\n\nconst createMouseEventHandler = (handler: (index: number) => void) => (itemIndex: number) => {\n if (itemIndex > -1) {\n handler(itemIndex);\n }\n};\n\nexport default function MenuDropdown({\n menu,\n statusType,\n menuItemsState,\n menuItemsHandlers,\n highlightedOptionId,\n highlightText,\n listId,\n controlId,\n handleLoadMore,\n hasDropdownStatus,\n listBottom,\n ariaDescribedby,\n optionsListCustomProperties,\n}: MenuDropdownProps) {\n const handleMouseUp = createMouseEventHandler(menuItemsHandlers.selectVisibleOptionWithMouse);\n const handleMouseMove = createMouseEventHandler(menuItemsHandlers.highlightVisibleOptionWithMouse);\n\n const ListComponent = menu.virtualScroll ? VirtualList : PlainList;\n\n const announcement = useAnnouncement({\n highlightText,\n announceSelected: false,\n highlightedOption: menuItemsState.highlightedOption,\n getParent: option => menuItemsState.getItemGroup(option),\n });\n\n // Force re-announcement when the filtered items list changes.\n // The screenReaderContent on SelectableItem only works for keyboard\n // navigation (highlight moving between existing items). When filtering\n // replaces the entire list, new items mount already highlighted and\n // the SR doesn't pick up the initial textContent set.\n const liveRegionRef = useRef<InternalLiveRegionRef>(null);\n const prevItemsLengthRef = useRef(menuItemsState.items.length);\n useEffect(() => {\n if (menuItemsState.items.length !== prevItemsLengthRef.current && announcement) {\n liveRegionRef.current?.reannounce();\n }\n prevItemsLengthRef.current = menuItemsState.items.length;\n }, [menuItemsState.items.length, announcement]);\n\n return (\n <>\n <InternalLiveRegion ref={liveRegionRef} tagName=\"span\" hidden={true}>\n {announcement}\n </InternalLiveRegion>\n <ListComponent\n listBottom={listBottom}\n handleLoadMore={handleLoadMore}\n autosuggestItemsState={menuItemsState}\n highlightText={highlightText}\n highlightedA11yProps={highlightedOptionId ? { id: highlightedOptionId } : {}}\n hasDropdownStatus={hasDropdownStatus}\n menuProps={{\n id: listId,\n ariaLabelledby: controlId,\n onMouseUp: handleMouseUp,\n onMouseMove: handleMouseMove,\n ariaDescribedby,\n statusType: statusType ?? 'finished',\n customProperties: optionsListCustomProperties,\n }}\n screenReaderContent={announcement}\n />\n </>\n );\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { DropdownStatusResult } from '../../internal/components/dropdown-status';
|
|
3
3
|
import { MenuItemsHandlers, MenuItemsState } from '../core/menu-state';
|
|
4
4
|
import { PromptInputProps } from '../interfaces';
|
|
5
|
+
import { PromptInputMenuStyle } from '../internal-interfaces';
|
|
5
6
|
/** Props for the token-mode contentEditable input and its associated menu dropdown. */
|
|
6
7
|
interface TokenModeProps {
|
|
7
8
|
/** Ref to the contentEditable div */
|
|
@@ -34,7 +35,8 @@ interface TokenModeProps {
|
|
|
34
35
|
};
|
|
35
36
|
i18nStrings?: PromptInputProps['i18nStrings'];
|
|
36
37
|
maxMenuHeight?: number;
|
|
38
|
+
menuStyle?: PromptInputMenuStyle;
|
|
37
39
|
}
|
|
38
|
-
export default function TokenMode({ editableElementRef, triggerWrapperRef, controlId, menuListId, menuFooterControlId, highlightedMenuOptionId, name, plainTextValue, menuIsOpen, triggerWrapperReady, shouldRenderMenuDropdown, activeMenu, activeTriggerToken, menuFilterText, menuItemsState, menuItemsHandlers, menuDropdownStatus, maxMenuHeight, handleInput, handleLoadMore, editableElementAttributes, }: TokenModeProps): JSX.Element;
|
|
40
|
+
export default function TokenMode({ editableElementRef, triggerWrapperRef, controlId, menuListId, menuFooterControlId, highlightedMenuOptionId, name, plainTextValue, menuIsOpen, triggerWrapperReady, shouldRenderMenuDropdown, activeMenu, activeTriggerToken, menuFilterText, menuItemsState, menuItemsHandlers, menuDropdownStatus, maxMenuHeight, menuStyle, handleInput, handleLoadMore, editableElementAttributes, }: TokenModeProps): JSX.Element;
|
|
39
41
|
export {};
|
|
40
42
|
//# sourceMappingURL=token-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-mode.d.ts","sourceRoot":"","sources":["../../../../src/prompt-input/components/token-mode.tsx"],"names":[],"mappings":"AAGA,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,MAAM,IAAI,CAAC;IACxB,cAAc,EAAE,MAAM,IAAI,CAAC;IAE3B,+FAA+F;IAC/F,yBAAyB,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;QAChE,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IAEF,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAE9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAID,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,IAAI,EACJ,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,WAAW,EACX,cAAc,EACd,yBAAyB,GAC1B,EAAE,cAAc,eAgHhB"}
|
|
@@ -4,11 +4,12 @@ import React from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import Dropdown from '../../dropdown/internal';
|
|
6
6
|
import DropdownFooter from '../../internal/components/dropdown-footer';
|
|
7
|
+
import { getMenuOptionsListStyles } from '../styles';
|
|
7
8
|
import MenuDropdown from './menu-dropdown';
|
|
8
9
|
import styles from '../styles.css.js';
|
|
9
10
|
import testutilStyles from '../test-classes/styles.css.js';
|
|
10
11
|
const MENU_MIN_WIDTH = 300;
|
|
11
|
-
export default function TokenMode({ editableElementRef, triggerWrapperRef, controlId, menuListId, menuFooterControlId, highlightedMenuOptionId, name, plainTextValue, menuIsOpen, triggerWrapperReady, shouldRenderMenuDropdown, activeMenu, activeTriggerToken, menuFilterText, menuItemsState, menuItemsHandlers, menuDropdownStatus, maxMenuHeight, handleInput, handleLoadMore, editableElementAttributes, }) {
|
|
12
|
+
export default function TokenMode({ editableElementRef, triggerWrapperRef, controlId, menuListId, menuFooterControlId, highlightedMenuOptionId, name, plainTextValue, menuIsOpen, triggerWrapperReady, shouldRenderMenuDropdown, activeMenu, activeTriggerToken, menuFilterText, menuItemsState, menuItemsHandlers, menuDropdownStatus, maxMenuHeight, menuStyle, handleInput, handleLoadMore, editableElementAttributes, }) {
|
|
12
13
|
var _a;
|
|
13
14
|
return (React.createElement(React.Fragment, null,
|
|
14
15
|
name && React.createElement("input", { type: "hidden", name: name, value: plainTextValue }),
|
|
@@ -20,7 +21,17 @@ export default function TokenMode({ editableElementRef, triggerWrapperRef, contr
|
|
|
20
21
|
// We suppress this because we intentionally manage the DOM directly via token-renderer
|
|
21
22
|
// to avoid React's reconciliation conflicting with browser-native editing behavior.
|
|
22
23
|
suppressContentEditableWarning: true, "aria-controls": menuIsOpen ? menuListId : undefined, "aria-owns": menuIsOpen ? menuListId : undefined, "aria-activedescendant": highlightedMenuOptionId, onInput: handleInput, ...editableElementAttributes, className: clsx(editableElementAttributes.className, testutilStyles['content-editable'], styles['editable-element']) }),
|
|
23
|
-
React.createElement(Dropdown, { minWidth: MENU_MIN_WIDTH, maxHeight: maxMenuHeight, expandToViewport: true,
|
|
24
|
+
React.createElement(Dropdown, { minWidth: MENU_MIN_WIDTH, maxHeight: maxMenuHeight, expandToViewport: true, style: menuStyle
|
|
25
|
+
? {
|
|
26
|
+
// DropdownProps.Style names the fill `background`; PromptInput exposes it as `backgroundColor`.
|
|
27
|
+
dropdown: {
|
|
28
|
+
background: menuStyle.backgroundColor,
|
|
29
|
+
borderColor: menuStyle.borderColor,
|
|
30
|
+
borderRadius: menuStyle.borderRadius,
|
|
31
|
+
borderWidth: menuStyle.borderWidth,
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
: undefined, open: !!(shouldRenderMenuDropdown &&
|
|
24
35
|
triggerWrapperReady &&
|
|
25
36
|
menuIsOpen &&
|
|
26
37
|
menuItemsState &&
|
|
@@ -32,6 +43,6 @@ export default function TokenMode({ editableElementRef, triggerWrapperRef, contr
|
|
|
32
43
|
// Prevent default to stop the dropdown from stealing focus from the contentEditable.
|
|
33
44
|
// Without this, clicking a menu option would blur the input before the selection handler fires.
|
|
34
45
|
event.preventDefault();
|
|
35
|
-
}, footer: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.isSticky) && menuDropdownStatus.content ? (React.createElement(DropdownFooter, { id: menuFooterControlId, content: menuDropdownStatus.content, hasItems: menuItemsState ? menuItemsState.items.length >= 1 : false })) : null, content: React.createElement(React.Fragment, null, shouldRenderMenuDropdown && menuItemsState && menuItemsHandlers && activeMenu && (React.createElement(MenuDropdown, { menu: activeMenu, statusType: (_a = activeMenu.statusType) !== null && _a !== void 0 ? _a : 'finished', menuItemsState: menuItemsState, menuItemsHandlers: menuItemsHandlers, highlightedOptionId: highlightedMenuOptionId, highlightText: menuFilterText, listId: menuListId, controlId: controlId !== null && controlId !== void 0 ? controlId : '', handleLoadMore: handleLoadMore, hasDropdownStatus: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) !== null, listBottom: !(menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.isSticky) && (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) ? (React.createElement(DropdownFooter, { content: menuDropdownStatus.content, id: menuFooterControlId })) : null, ariaDescribedby: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) ? menuFooterControlId : undefined }))) }))));
|
|
46
|
+
}, footer: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.isSticky) && menuDropdownStatus.content ? (React.createElement(DropdownFooter, { id: menuFooterControlId, content: menuDropdownStatus.content, hasItems: menuItemsState ? menuItemsState.items.length >= 1 : false })) : null, content: React.createElement(React.Fragment, null, shouldRenderMenuDropdown && menuItemsState && menuItemsHandlers && activeMenu && (React.createElement(MenuDropdown, { menu: activeMenu, statusType: (_a = activeMenu.statusType) !== null && _a !== void 0 ? _a : 'finished', menuItemsState: menuItemsState, menuItemsHandlers: menuItemsHandlers, optionsListCustomProperties: getMenuOptionsListStyles(menuStyle), highlightedOptionId: highlightedMenuOptionId, highlightText: menuFilterText, listId: menuListId, controlId: controlId !== null && controlId !== void 0 ? controlId : '', handleLoadMore: handleLoadMore, hasDropdownStatus: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) !== null, listBottom: !(menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.isSticky) && (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) ? (React.createElement(DropdownFooter, { content: menuDropdownStatus.content, id: menuFooterControlId })) : null, ariaDescribedby: (menuDropdownStatus === null || menuDropdownStatus === void 0 ? void 0 : menuDropdownStatus.content) ? menuFooterControlId : undefined }))) }))));
|
|
36
47
|
}
|
|
37
48
|
//# sourceMappingURL=token-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-mode.js","sourceRoot":"","sources":["../../../../src/prompt-input/components/token-mode.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,cAAc,MAAM,2CAA2C,CAAC;AAIvE,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AA2C3D,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,IAAI,EAC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a,EAAE,cAAc,EAC7B,MAAM,EAAE,UAAU,EAClB,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,EAC1B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,MAAK,IAAI,EACvD,UAAU,EACR,CAAC,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,QAAQ,CAAA,KAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAA,CAAC,CAAC,CAAC,CAC7D,oBAAC,cAAc,IAAC,OAAO,EAAE,kBAAkB,CAAC,OAAO,EAAE,EAAE,EAAE,mBAAmB,GAAI,CACjF,CAAC,CAAC,CAAC,IAAI,EAEV,eAAe,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,EAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,GAC9E,CACH,CACA,GAEL,CACE,CACL,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport Dropdown from '../../dropdown/internal';\nimport DropdownFooter from '../../internal/components/dropdown-footer';\nimport { DropdownStatusResult } from '../../internal/components/dropdown-status';\nimport { MenuItemsHandlers, MenuItemsState } from '../core/menu-state';\nimport { PromptInputProps } from '../interfaces';\nimport MenuDropdown from './menu-dropdown';\n\nimport styles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\n/** Props for the token-mode contentEditable input and its associated menu dropdown. */\ninterface TokenModeProps {\n /** Ref to the contentEditable div */\n editableElementRef: React.RefObject<HTMLDivElement>;\n /** Ref to the active trigger element, used to anchor the dropdown */\n triggerWrapperRef: React.MutableRefObject<HTMLElement | null>;\n\n controlId?: string;\n menuListId: string;\n menuFooterControlId: string;\n highlightedMenuOptionId?: string;\n\n /** When set, renders a hidden input for native form submission */\n name?: string;\n /** Plain text representation of the current tokens */\n plainTextValue: string;\n menuIsOpen: boolean;\n /** True once the trigger element is mounted and ready for dropdown positioning */\n triggerWrapperReady: boolean;\n shouldRenderMenuDropdown: boolean;\n\n activeMenu: PromptInputProps.MenuDefinition | null;\n activeTriggerToken: PromptInputProps.TriggerToken | null;\n menuFilterText: string;\n menuItemsState: MenuItemsState | null;\n menuItemsHandlers: MenuItemsHandlers | null;\n menuDropdownStatus: DropdownStatusResult | null;\n\n handleInput: () => void;\n handleLoadMore: () => void;\n\n /** Spread onto the contentEditable div — includes aria attrs, className, and event handlers */\n editableElementAttributes: React.HTMLAttributes<HTMLDivElement> & {\n 'data-placeholder'?: string;\n };\n\n i18nStrings?: PromptInputProps['i18nStrings'];\n\n maxMenuHeight?: number;\n}\n\nconst MENU_MIN_WIDTH = 300;\n\nexport default function TokenMode({\n editableElementRef,\n triggerWrapperRef,\n controlId,\n menuListId,\n menuFooterControlId,\n highlightedMenuOptionId,\n name,\n plainTextValue,\n menuIsOpen,\n triggerWrapperReady,\n shouldRenderMenuDropdown,\n activeMenu,\n activeTriggerToken,\n menuFilterText,\n menuItemsState,\n menuItemsHandlers,\n menuDropdownStatus,\n maxMenuHeight,\n handleInput,\n handleLoadMore,\n editableElementAttributes,\n}: TokenModeProps) {\n return (\n <>\n {/* Hidden input enables native form submission with the plain text value when a name is provided */}\n {name && <input type=\"hidden\" name={name} value={plainTextValue} />}\n <div className={styles['editable-wrapper']}>\n <div\n id={controlId}\n ref={editableElementRef}\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-haspopup=\"listbox\"\n aria-expanded={menuIsOpen && shouldRenderMenuDropdown}\n contentEditable={\n !editableElementAttributes['aria-disabled'] && !editableElementAttributes['aria-readonly']\n ? 'true'\n : 'false'\n }\n // React warns when children of a contentEditable element are managed by React.\n // We suppress this because we intentionally manage the DOM directly via token-renderer\n // to avoid React's reconciliation conflicting with browser-native editing behavior.\n suppressContentEditableWarning={true}\n aria-controls={menuIsOpen ? menuListId : undefined}\n // aria-owns needed for Safari+VoiceOver to announce activedescendant content\n aria-owns={menuIsOpen ? menuListId : undefined}\n aria-activedescendant={highlightedMenuOptionId}\n onInput={handleInput}\n {...editableElementAttributes}\n className={clsx(\n editableElementAttributes.className,\n testutilStyles['content-editable'],\n styles['editable-element']\n )}\n />\n <Dropdown\n minWidth={MENU_MIN_WIDTH}\n maxHeight={maxMenuHeight}\n expandToViewport={true}\n open={\n !!(\n shouldRenderMenuDropdown &&\n triggerWrapperReady &&\n menuIsOpen &&\n menuItemsState &&\n (menuItemsState.items.length > 0 || menuDropdownStatus?.content)\n )\n }\n trigger={null}\n triggerRef={triggerWrapperRef}\n triggerId={activeTriggerToken?.id}\n contentKey={\n triggerWrapperReady\n ? `trigger-${activeTriggerToken?.id}-${activeTriggerToken?.triggerChar}-${menuItemsState ? menuItemsState.items.length > 0 : false}`\n : undefined\n }\n /* istanbul ignore next -- integ test: src/prompt-input/__integ__/prompt-input-token-mode.test.ts > \"clicking a menu option inserts reference and retains focus\" */\n onMouseDown={event => {\n // Prevent default to stop the dropdown from stealing focus from the contentEditable.\n // Without this, clicking a menu option would blur the input before the selection handler fires.\n event.preventDefault();\n }}\n footer={\n menuDropdownStatus?.isSticky && menuDropdownStatus.content ? (\n <DropdownFooter\n id={menuFooterControlId}\n content={menuDropdownStatus.content}\n hasItems={menuItemsState ? menuItemsState.items.length >= 1 : false}\n />\n ) : null\n }\n content={\n <>\n {shouldRenderMenuDropdown && menuItemsState && menuItemsHandlers && activeMenu && (\n <MenuDropdown\n menu={activeMenu}\n statusType={activeMenu.statusType ?? 'finished'}\n menuItemsState={menuItemsState}\n menuItemsHandlers={menuItemsHandlers}\n highlightedOptionId={highlightedMenuOptionId}\n highlightText={menuFilterText}\n listId={menuListId}\n controlId={controlId ?? ''}\n handleLoadMore={handleLoadMore}\n hasDropdownStatus={menuDropdownStatus?.content !== null}\n listBottom={\n !menuDropdownStatus?.isSticky && menuDropdownStatus?.content ? (\n <DropdownFooter content={menuDropdownStatus.content} id={menuFooterControlId} />\n ) : null\n }\n ariaDescribedby={menuDropdownStatus?.content ? menuFooterControlId : undefined}\n />\n )}\n </>\n }\n />\n </div>\n </>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"token-mode.js","sourceRoot":"","sources":["../../../../src/prompt-input/components/token-mode.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,cAAc,MAAM,2CAA2C,CAAC;AAKvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAE3C,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,cAAc,MAAM,+BAA+B,CAAC;AA4C3D,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,IAAI,EACJ,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,WAAW,EACX,cAAc,EACd,yBAAyB,GACV;;IACf,OAAO,CACL;QAEG,IAAI,IAAI,+BAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,cAAc,GAAI;QACnE,6BAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACxC,6BACE,EAAE,EAAE,SAAS,EACb,GAAG,EAAE,kB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,SAAS,GAAI,EAAE,EAC1B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,MAAK,IAAI,EACvD,UAAU,EACR,CAAC,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,QAAQ,CAAA,KAAI,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,CAAA,CAAC,CAAC,CAAC,CAC7D,oBAAC,cAAc,IAAC,OAAO,EAAE,kBAAkB,CAAC,OAAO,EAAE,EAAE,EAAE,mBAAmB,GAAI,CACjF,CAAC,CAAC,CAAC,IAAI,EAEV,eAAe,EAAE,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,OAAO,EAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,SAAS,GAC9E,CACH,CACA,GAEL,CACE,CACL,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { DropdownProps } from '../../dropdown/interfaces';\nimport Dropdown from '../../dropdown/internal';\nimport DropdownFooter from '../../internal/components/dropdown-footer';\nimport { DropdownStatusResult } from '../../internal/components/dropdown-status';\nimport { MenuItemsHandlers, MenuItemsState } from '../core/menu-state';\nimport { PromptInputProps } from '../interfaces';\nimport { PromptInputMenuStyle } from '../internal-interfaces';\nimport { getMenuOptionsListStyles } from '../styles';\nimport MenuDropdown from './menu-dropdown';\n\nimport styles from '../styles.css.js';\nimport testutilStyles from '../test-classes/styles.css.js';\n\n/** Props for the token-mode contentEditable input and its associated menu dropdown. */\ninterface TokenModeProps {\n /** Ref to the contentEditable div */\n editableElementRef: React.RefObject<HTMLDivElement>;\n /** Ref to the active trigger element, used to anchor the dropdown */\n triggerWrapperRef: React.MutableRefObject<HTMLElement | null>;\n\n controlId?: string;\n menuListId: string;\n menuFooterControlId: string;\n highlightedMenuOptionId?: string;\n\n /** When set, renders a hidden input for native form submission */\n name?: string;\n /** Plain text representation of the current tokens */\n plainTextValue: string;\n menuIsOpen: boolean;\n /** True once the trigger element is mounted and ready for dropdown positioning */\n triggerWrapperReady: boolean;\n shouldRenderMenuDropdown: boolean;\n\n activeMenu: PromptInputProps.MenuDefinition | null;\n activeTriggerToken: PromptInputProps.TriggerToken | null;\n menuFilterText: string;\n menuItemsState: MenuItemsState | null;\n menuItemsHandlers: MenuItemsHandlers | null;\n menuDropdownStatus: DropdownStatusResult | null;\n\n handleInput: () => void;\n handleLoadMore: () => void;\n\n /** Spread onto the contentEditable div — includes aria attrs, className, and event handlers */\n editableElementAttributes: React.HTMLAttributes<HTMLDivElement> & {\n 'data-placeholder'?: string;\n };\n\n i18nStrings?: PromptInputProps['i18nStrings'];\n\n maxMenuHeight?: number;\n menuStyle?: PromptInputMenuStyle;\n}\n\nconst MENU_MIN_WIDTH = 300;\n\nexport default function TokenMode({\n editableElementRef,\n triggerWrapperRef,\n controlId,\n menuListId,\n menuFooterControlId,\n highlightedMenuOptionId,\n name,\n plainTextValue,\n menuIsOpen,\n triggerWrapperReady,\n shouldRenderMenuDropdown,\n activeMenu,\n activeTriggerToken,\n menuFilterText,\n menuItemsState,\n menuItemsHandlers,\n menuDropdownStatus,\n maxMenuHeight,\n menuStyle,\n handleInput,\n handleLoadMore,\n editableElementAttributes,\n}: TokenModeProps) {\n return (\n <>\n {/* Hidden input enables native form submission with the plain text value when a name is provided */}\n {name && <input type=\"hidden\" name={name} value={plainTextValue} />}\n <div className={styles['editable-wrapper']}>\n <div\n id={controlId}\n ref={editableElementRef}\n role=\"textbox\"\n aria-multiline=\"true\"\n aria-haspopup=\"listbox\"\n aria-expanded={menuIsOpen && shouldRenderMenuDropdown}\n contentEditable={\n !editableElementAttributes['aria-disabled'] && !editableElementAttributes['aria-readonly']\n ? 'true'\n : 'false'\n }\n // React warns when children of a contentEditable element are managed by React.\n // We suppress this because we intentionally manage the DOM directly via token-renderer\n // to avoid React's reconciliation conflicting with browser-native editing behavior.\n suppressContentEditableWarning={true}\n aria-controls={menuIsOpen ? menuListId : undefined}\n // aria-owns needed for Safari+VoiceOver to announce activedescendant content\n aria-owns={menuIsOpen ? menuListId : undefined}\n aria-activedescendant={highlightedMenuOptionId}\n onInput={handleInput}\n {...editableElementAttributes}\n className={clsx(\n editableElementAttributes.className,\n testutilStyles['content-editable'],\n styles['editable-element']\n )}\n />\n <Dropdown\n minWidth={MENU_MIN_WIDTH}\n maxHeight={maxMenuHeight}\n expandToViewport={true}\n style={\n menuStyle\n ? ({\n // DropdownProps.Style names the fill `background`; PromptInput exposes it as `backgroundColor`.\n dropdown: {\n background: menuStyle.backgroundColor,\n borderColor: menuStyle.borderColor,\n borderRadius: menuStyle.borderRadius,\n borderWidth: menuStyle.borderWidth,\n },\n } satisfies DropdownProps.Style)\n : undefined\n }\n open={\n !!(\n shouldRenderMenuDropdown &&\n triggerWrapperReady &&\n menuIsOpen &&\n menuItemsState &&\n (menuItemsState.items.length > 0 || menuDropdownStatus?.content)\n )\n }\n trigger={null}\n triggerRef={triggerWrapperRef}\n triggerId={activeTriggerToken?.id}\n contentKey={\n triggerWrapperReady\n ? `trigger-${activeTriggerToken?.id}-${activeTriggerToken?.triggerChar}-${menuItemsState ? menuItemsState.items.length > 0 : false}`\n : undefined\n }\n /* istanbul ignore next -- integ test: src/prompt-input/__integ__/prompt-input-token-mode.test.ts > \"clicking a menu option inserts reference and retains focus\" */\n onMouseDown={event => {\n // Prevent default to stop the dropdown from stealing focus from the contentEditable.\n // Without this, clicking a menu option would blur the input before the selection handler fires.\n event.preventDefault();\n }}\n footer={\n menuDropdownStatus?.isSticky && menuDropdownStatus.content ? (\n <DropdownFooter\n id={menuFooterControlId}\n content={menuDropdownStatus.content}\n hasItems={menuItemsState ? menuItemsState.items.length >= 1 : false}\n />\n ) : null\n }\n content={\n <>\n {shouldRenderMenuDropdown && menuItemsState && menuItemsHandlers && activeMenu && (\n <MenuDropdown\n menu={activeMenu}\n statusType={activeMenu.statusType ?? 'finished'}\n menuItemsState={menuItemsState}\n menuItemsHandlers={menuItemsHandlers}\n optionsListCustomProperties={getMenuOptionsListStyles(menuStyle)}\n highlightedOptionId={highlightedMenuOptionId}\n highlightText={menuFilterText}\n listId={menuListId}\n controlId={controlId ?? ''}\n handleLoadMore={handleLoadMore}\n hasDropdownStatus={menuDropdownStatus?.content !== null}\n listBottom={\n !menuDropdownStatus?.isSticky && menuDropdownStatus?.content ? (\n <DropdownFooter content={menuDropdownStatus.content} id={menuFooterControlId} />\n ) : null\n }\n ariaDescribedby={menuDropdownStatus?.content ? menuFooterControlId : undefined}\n />\n )}\n </>\n }\n />\n </div>\n </>\n );\n}\n"]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { PromptInputProps } from './interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Internal style overrides for the trigger menu dropdown. Not part of the public
|
|
4
|
+
* `PromptInputProps.Style`; passed via the `_menu` key (see `PromptInputInternalStyle`).
|
|
5
|
+
*/
|
|
6
|
+
export interface PromptInputMenuStyle {
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
borderColor?: string;
|
|
9
|
+
borderRadius?: string;
|
|
10
|
+
borderWidth?: string;
|
|
11
|
+
/** Themes the option rows, which are opaque and cover the surface `backgroundColor`. */
|
|
12
|
+
options?: {
|
|
13
|
+
backgroundColor?: {
|
|
14
|
+
default?: string;
|
|
15
|
+
/** Applied to the hovered/keyboard-highlighted option. */
|
|
16
|
+
highlighted?: string;
|
|
17
|
+
selected?: string;
|
|
18
|
+
};
|
|
19
|
+
color?: {
|
|
20
|
+
default?: string;
|
|
21
|
+
/** Applied to the hovered/keyboard-highlighted option. */
|
|
22
|
+
highlighted?: string;
|
|
23
|
+
disabled?: string;
|
|
24
|
+
/** Applied to non-interactive option group labels. */
|
|
25
|
+
groupLabel?: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
/** Themes the substring highlight on options matching the filtering text. */
|
|
29
|
+
filterMatch?: {
|
|
30
|
+
backgroundColor?: string;
|
|
31
|
+
color?: string;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* `PromptInputProps.Style` plus the internal `_menu` escape hatch. Consumers pass
|
|
36
|
+
* menu styling by casting the `style` value to this type.
|
|
37
|
+
*/
|
|
38
|
+
export type PromptInputInternalStyle = PromptInputProps.Style & {
|
|
39
|
+
_menu?: PromptInputMenuStyle;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=internal-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-interfaces.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/internal-interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,wFAAwF;IACxF,OAAO,CAAC,EAAE;QACR,eAAe,CAAC,EAAE;YAChB,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,0DAA0D;YAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,CAAC,EAAE;YACN,OAAO,CAAC,EAAE,MAAM,CAAC;YACjB,0DAA0D;YAC1D,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,sDAAsD;YACtD,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH,CAAC;IAEF,6EAA6E;IAC7E,WAAW,CAAC,EAAE;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,gBAAgB,CAAC,KAAK,GAAG;IAC9D,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/prompt-input/internal-interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { PromptInputProps } from './interfaces';\n\n/**\n * Internal style overrides for the trigger menu dropdown. Not part of the public\n * `PromptInputProps.Style`; passed via the `_menu` key (see `PromptInputInternalStyle`).\n */\nexport interface PromptInputMenuStyle {\n backgroundColor?: string;\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n\n /** Themes the option rows, which are opaque and cover the surface `backgroundColor`. */\n options?: {\n backgroundColor?: {\n default?: string;\n /** Applied to the hovered/keyboard-highlighted option. */\n highlighted?: string;\n selected?: string;\n };\n color?: {\n default?: string;\n /** Applied to the hovered/keyboard-highlighted option. */\n highlighted?: string;\n disabled?: string;\n /** Applied to non-interactive option group labels. */\n groupLabel?: string;\n };\n };\n\n /** Themes the substring highlight on options matching the filtering text. */\n filterMatch?: {\n backgroundColor?: string;\n color?: string;\n };\n}\n\n/**\n * `PromptInputProps.Style` plus the internal `_menu` escape hatch. Consumers pass\n * menu styling by casting the `style` value to this type.\n */\nexport type PromptInputInternalStyle = PromptInputProps.Style & {\n _menu?: PromptInputMenuStyle;\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAiB3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AASjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAiB3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AASjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAShD,UAAU,wBACR,SAAQ,YAAY,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,EAC3D,0BAA0B;CAAG;AAEjC,QAAA,MAAM,mBAAmB,gJA8bxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -269,7 +269,7 @@ const InternalPromptInput = React.forwardRef(({ value: valueProp, actionButtonAr
|
|
|
269
269
|
[styles.warning]: warning,
|
|
270
270
|
}) }, secondaryContent)),
|
|
271
271
|
React.createElement("div", { className: styles['textarea-wrapper'] },
|
|
272
|
-
isTokenMode ? (React.createElement(TokenMode, { editableElementRef: editableElementRef, triggerWrapperRef: tokenMode.triggerWrapperRef, controlId: controlId, menuListId: tokenMode.menuListId, menuFooterControlId: tokenMode.menuFooterControlId, highlightedMenuOptionId: tokenMode.highlightedMenuOptionId, name: name, plainTextValue: plainTextValue, menuIsOpen: tokenMode.menuIsOpen, triggerWrapperReady: tokenMode.triggerWrapperReady, shouldRenderMenuDropdown: tokenMode.shouldRenderMenuDropdown, activeMenu: tokenMode.activeMenu, activeTriggerToken: tokenMode.activeTriggerToken, menuFilterText: tokenMode.menuFilterText, menuItemsState: tokenMode.menuItemsState, menuItemsHandlers: tokenMode.menuItemsHandlers, menuDropdownStatus: tokenMode.menuDropdownStatus, maxMenuHeight: maxMenuHeight, handleInput: tokenMode.handleInput, handleLoadMore: tokenMode.handleLoadMore, editableElementAttributes: tokenMode.editableElementAttributes, i18nStrings: effectiveI18nStrings })) : (React.createElement(TextareaMode, { textareaRef: textareaRef, controlId: controlId, textareaAttributes: textareaAttributes, nativeTextareaAttributes: nativeTextareaAttributes })),
|
|
272
|
+
isTokenMode ? (React.createElement(TokenMode, { editableElementRef: editableElementRef, triggerWrapperRef: tokenMode.triggerWrapperRef, controlId: controlId, menuListId: tokenMode.menuListId, menuFooterControlId: tokenMode.menuFooterControlId, highlightedMenuOptionId: tokenMode.highlightedMenuOptionId, name: name, plainTextValue: plainTextValue, menuIsOpen: tokenMode.menuIsOpen, triggerWrapperReady: tokenMode.triggerWrapperReady, shouldRenderMenuDropdown: tokenMode.shouldRenderMenuDropdown, activeMenu: tokenMode.activeMenu, activeTriggerToken: tokenMode.activeTriggerToken, menuFilterText: tokenMode.menuFilterText, menuItemsState: tokenMode.menuItemsState, menuItemsHandlers: tokenMode.menuItemsHandlers, menuDropdownStatus: tokenMode.menuDropdownStatus, maxMenuHeight: maxMenuHeight, menuStyle: style === null || style === void 0 ? void 0 : style._menu, handleInput: tokenMode.handleInput, handleLoadMore: tokenMode.handleLoadMore, editableElementAttributes: tokenMode.editableElementAttributes, i18nStrings: effectiveI18nStrings })) : (React.createElement(TextareaMode, { textareaRef: textareaRef, controlId: controlId, textareaAttributes: textareaAttributes, nativeTextareaAttributes: nativeTextareaAttributes })),
|
|
273
273
|
hasActionButton && !secondaryActions && actionButton),
|
|
274
274
|
isTokenMode && tokenMode.portals,
|
|
275
275
|
secondaryActions && (React.createElement("div", { className: clsx(styles['action-stripe'], {
|