@cloudscape-design/components 3.0.1046 → 3.0.1047
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/internal/base-component/styles.scoped.css +1 -1
- package/internal/environment.js +2 -2
- package/internal/environment.json +2 -2
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +1 -0
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +17 -16
- package/prompt-input/styles.scoped.css +49 -37
- package/prompt-input/styles.selectors.js +17 -16
package/internal/environment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
3
|
-
export var GIT_SHA = "
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (8cda3dab)";
|
|
3
|
+
export var GIT_SHA = "8cda3dab";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"./internal/base-component/index.js",
|
|
151
151
|
"./internal/base-component/styles.css.js"
|
|
152
152
|
],
|
|
153
|
-
"version": "3.0.
|
|
153
|
+
"version": "3.0.1047",
|
|
154
154
|
"repository": {
|
|
155
155
|
"type": "git",
|
|
156
156
|
"url": "https://github.com/cloudscape-design/components.git"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAWxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,UAAU,wBACR,SAAQ,YAAY,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,EAC3D,0BAA0B;CAAG;AAEjC,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAWxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,UAAU,wBACR,SAAQ,YAAY,CAAC,gBAAgB,EAAE,SAAS,GAAG,SAAS,CAAC,EAC3D,0BAA0B;CAAG;AAEjC,QAAA,MAAM,mBAAmB,uGA6NxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/prompt-input/internal.js
CHANGED
|
@@ -130,6 +130,7 @@ const InternalPromptInput = React.forwardRef((_a, ref) => {
|
|
|
130
130
|
}) },
|
|
131
131
|
React.createElement("div", { className: clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {
|
|
132
132
|
[styles['with-paddings']]: !disableSecondaryActionsPaddings,
|
|
133
|
+
[styles['with-paddings-and-actions']]: !disableSecondaryActionsPaddings && hasActionButton,
|
|
133
134
|
[styles.invalid]: invalid,
|
|
134
135
|
[styles.warning]: warning,
|
|
135
136
|
}) }, secondaryActions),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,IAAI,MAAM,MAAM,C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OAAA,MAAA,WAAW,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAA,EAAA,GAAI;YAC7E,eAAe,IAAI,MAAM,CACtB,CACP,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useCallback, useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useDensityMode } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalButton from '../button/internal';\nimport { convertAutoComplete } from '../input/utils';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport * as tokens from '../internal/generated/styles/tokens';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { SomeRequired } from '../internal/types';\nimport { PromptInputProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\ninterface InternalPromptInputProps\n extends SomeRequired<PromptInputProps, 'maxRows' | 'minRows'>,\n InternalBaseComponentProps {}\n\nconst InternalPromptInput = React.forwardRef(\n (\n {\n value,\n actionButtonAriaLabel,\n actionButtonIconName,\n actionButtonIconUrl,\n actionButtonIconSvg,\n actionButtonIconAlt,\n ariaLabel,\n autoComplete,\n autoFocus,\n disableActionButton,\n disableBrowserAutocorrect,\n disabled,\n maxRows,\n minRows,\n name,\n onAction,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n spellcheck,\n customPrimaryAction,\n secondaryActions,\n secondaryContent,\n disableSecondaryActionsPaddings,\n disableSecondaryContentPaddings,\n __internalRootRef = null,\n ...rest\n }: InternalPromptInputProps,\n ref: Ref<PromptInputProps.Ref>\n ) => {\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);\n\n const baseProps = getBaseProps(rest);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const isRefresh = useVisualRefresh();\n const isCompactMode = useDensityMode(textareaRef) === 'compact';\n\n const PADDING = isRefresh ? tokens.spaceXxs : tokens.spaceXxxs;\n const LINE_HEIGHT = tokens.lineHeightBodyM;\n const DEFAULT_MAX_ROWS = 3;\n\n useImperativeHandle(\n ref,\n () => ({\n focus(...args: Parameters<HTMLElement['focus']>) {\n textareaRef.current?.focus(...args);\n },\n select() {\n textareaRef.current?.select();\n },\n setSelectionRange(...args: Parameters<HTMLTextAreaElement['setSelectionRange']>) {\n textareaRef.current?.setSelectionRange(...args);\n },\n }),\n [textareaRef]\n );\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n fireKeyboardEvent(onKeyDown, event);\n\n if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {\n if (event.currentTarget.form && !event.isDefaultPrevented()) {\n event.currentTarget.form.requestSubmit();\n }\n event.preventDefault();\n fireNonCancelableEvent(onAction, { value });\n }\n };\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n fireNonCancelableEvent(onChange, { value: event.target.value });\n adjustTextareaHeight();\n };\n\n const hasActionButton = actionButtonIconName || actionButtonIconSvg || actionButtonIconUrl || customPrimaryAction;\n\n const adjustTextareaHeight = useCallback(() => {\n if (textareaRef.current) {\n // this is required so the scrollHeight becomes dynamic, otherwise it will be locked at the highest value for the size it reached e.g. 500px\n textareaRef.current.style.height = 'auto';\n\n const minTextareaHeight = `calc(${LINE_HEIGHT} + ${tokens.spaceScaledXxs} * 2)`; // the min height of Textarea with 1 row\n\n if (maxRows === -1) {\n const scrollHeight = `calc(${textareaRef.current.scrollHeight}px)`;\n textareaRef.current.style.height = `max(${scrollHeight}, ${minTextareaHeight})`;\n } else {\n const maxRowsHeight = `calc(${maxRows <= 0 ? DEFAULT_MAX_ROWS : maxRows} * (${LINE_HEIGHT} + ${PADDING} / 2) + ${PADDING})`;\n const scrollHeight = `calc(${textareaRef.current.scrollHeight}px)`;\n textareaRef.current.style.height = `min(max(${scrollHeight}, ${minTextareaHeight}), ${maxRowsHeight})`;\n }\n }\n }, [maxRows, LINE_HEIGHT, PADDING]);\n\n useEffect(() => {\n const handleResize = () => {\n adjustTextareaHeight();\n };\n\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [adjustTextareaHeight]);\n\n useEffect(() => {\n adjustTextareaHeight();\n }, [value, adjustTextareaHeight, maxRows, isCompactMode]);\n\n const attributes: React.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': invalid ? 'true' : undefined,\n name,\n placeholder,\n autoFocus,\n className: clsx(styles.textarea, testutilStyles.textarea, {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n }),\n autoComplete: convertAutoComplete(autoComplete),\n spellCheck: spellcheck,\n disabled,\n readOnly: readOnly ? true : undefined,\n rows: minRows,\n onKeyDown: handleKeyDown,\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: handleChange,\n onBlur: onBlur && (() => fireNonCancelableEvent(onBlur)),\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n const action = (\n <div className={clsx(styles['primary-action'], testutilStyles['primary-action'])}>\n {customPrimaryAction ?? (\n <InternalButton\n className={clsx(styles['action-button'], testutilStyles['action-button'])}\n ariaLabel={actionButtonAriaLabel}\n disabled={disabled || readOnly || disableActionButton}\n __focusable={readOnly}\n iconName={actionButtonIconName}\n iconUrl={actionButtonIconUrl}\n iconSvg={actionButtonIconSvg}\n iconAlt={actionButtonIconAlt}\n onClick={() => fireNonCancelableEvent(onAction, { value })}\n variant=\"icon\"\n />\n )}\n </div>\n );\n\n return (\n <div\n {...baseProps}\n aria-label={ariaLabel}\n className={clsx(styles.root, testutilStyles.root, baseProps.className, {\n [styles['textarea-readonly']]: readOnly,\n [styles['textarea-invalid']]: invalid,\n [styles['textarea-warning']]: warning && !invalid,\n [styles.disabled]: disabled,\n })}\n ref={__internalRootRef}\n role=\"region\"\n >\n {secondaryContent && (\n <div\n className={clsx(styles['secondary-content'], testutilStyles['secondary-content'], {\n [styles['with-paddings']]: !disableSecondaryContentPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryContent}\n </div>\n )}\n <div className={styles['textarea-wrapper']}>\n <textarea ref={textareaRef} id={controlId} {...attributes} />\n {hasActionButton && !secondaryActions && action}\n </div>\n {secondaryActions && (\n <div\n className={clsx(styles['action-stripe'], {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n <div\n className={clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {\n [styles['with-paddings']]: !disableSecondaryActionsPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryActions}\n </div>\n <div className={styles.buffer} onClick={() => textareaRef.current?.focus()} />\n {hasActionButton && action}\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default InternalPromptInput;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/prompt-input/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAE/E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE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AAE,KAAK,EAAE,CAAA,EAAA,GAAI;YAC7E,eAAe,IAAI,MAAM,CACtB,CACP,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useCallback, useEffect, useImperativeHandle, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useDensityMode } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalButton from '../button/internal';\nimport { convertAutoComplete } from '../input/utils';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport * as tokens from '../internal/generated/styles/tokens';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useVisualRefresh } from '../internal/hooks/use-visual-mode';\nimport { SomeRequired } from '../internal/types';\nimport { PromptInputProps } from './interfaces';\n\nimport styles from './styles.css.js';\nimport testutilStyles from './test-classes/styles.css.js';\n\ninterface InternalPromptInputProps\n extends SomeRequired<PromptInputProps, 'maxRows' | 'minRows'>,\n InternalBaseComponentProps {}\n\nconst InternalPromptInput = React.forwardRef(\n (\n {\n value,\n actionButtonAriaLabel,\n actionButtonIconName,\n actionButtonIconUrl,\n actionButtonIconSvg,\n actionButtonIconAlt,\n ariaLabel,\n autoComplete,\n autoFocus,\n disableActionButton,\n disableBrowserAutocorrect,\n disabled,\n maxRows,\n minRows,\n name,\n onAction,\n onBlur,\n onChange,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n spellcheck,\n customPrimaryAction,\n secondaryActions,\n secondaryContent,\n disableSecondaryActionsPaddings,\n disableSecondaryContentPaddings,\n __internalRootRef = null,\n ...rest\n }: InternalPromptInputProps,\n ref: Ref<PromptInputProps.Ref>\n ) => {\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);\n\n const baseProps = getBaseProps(rest);\n\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n const isRefresh = useVisualRefresh();\n const isCompactMode = useDensityMode(textareaRef) === 'compact';\n\n const PADDING = isRefresh ? tokens.spaceXxs : tokens.spaceXxxs;\n const LINE_HEIGHT = tokens.lineHeightBodyM;\n const DEFAULT_MAX_ROWS = 3;\n\n useImperativeHandle(\n ref,\n () => ({\n focus(...args: Parameters<HTMLElement['focus']>) {\n textareaRef.current?.focus(...args);\n },\n select() {\n textareaRef.current?.select();\n },\n setSelectionRange(...args: Parameters<HTMLTextAreaElement['setSelectionRange']>) {\n textareaRef.current?.setSelectionRange(...args);\n },\n }),\n [textareaRef]\n );\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n fireKeyboardEvent(onKeyDown, event);\n\n if (event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing) {\n if (event.currentTarget.form && !event.isDefaultPrevented()) {\n event.currentTarget.form.requestSubmit();\n }\n event.preventDefault();\n fireNonCancelableEvent(onAction, { value });\n }\n };\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n fireNonCancelableEvent(onChange, { value: event.target.value });\n adjustTextareaHeight();\n };\n\n const hasActionButton = actionButtonIconName || actionButtonIconSvg || actionButtonIconUrl || customPrimaryAction;\n\n const adjustTextareaHeight = useCallback(() => {\n if (textareaRef.current) {\n // this is required so the scrollHeight becomes dynamic, otherwise it will be locked at the highest value for the size it reached e.g. 500px\n textareaRef.current.style.height = 'auto';\n\n const minTextareaHeight = `calc(${LINE_HEIGHT} + ${tokens.spaceScaledXxs} * 2)`; // the min height of Textarea with 1 row\n\n if (maxRows === -1) {\n const scrollHeight = `calc(${textareaRef.current.scrollHeight}px)`;\n textareaRef.current.style.height = `max(${scrollHeight}, ${minTextareaHeight})`;\n } else {\n const maxRowsHeight = `calc(${maxRows <= 0 ? DEFAULT_MAX_ROWS : maxRows} * (${LINE_HEIGHT} + ${PADDING} / 2) + ${PADDING})`;\n const scrollHeight = `calc(${textareaRef.current.scrollHeight}px)`;\n textareaRef.current.style.height = `min(max(${scrollHeight}, ${minTextareaHeight}), ${maxRowsHeight})`;\n }\n }\n }, [maxRows, LINE_HEIGHT, PADDING]);\n\n useEffect(() => {\n const handleResize = () => {\n adjustTextareaHeight();\n };\n\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, [adjustTextareaHeight]);\n\n useEffect(() => {\n adjustTextareaHeight();\n }, [value, adjustTextareaHeight, maxRows, isCompactMode]);\n\n const attributes: React.TextareaHTMLAttributes<HTMLTextAreaElement> = {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': invalid ? 'true' : undefined,\n name,\n placeholder,\n autoFocus,\n className: clsx(styles.textarea, testutilStyles.textarea, {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n }),\n autoComplete: convertAutoComplete(autoComplete),\n spellCheck: spellcheck,\n disabled,\n readOnly: readOnly ? true : undefined,\n rows: minRows,\n onKeyDown: handleKeyDown,\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: handleChange,\n onBlur: onBlur && (() => fireNonCancelableEvent(onBlur)),\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n const action = (\n <div className={clsx(styles['primary-action'], testutilStyles['primary-action'])}>\n {customPrimaryAction ?? (\n <InternalButton\n className={clsx(styles['action-button'], testutilStyles['action-button'])}\n ariaLabel={actionButtonAriaLabel}\n disabled={disabled || readOnly || disableActionButton}\n __focusable={readOnly}\n iconName={actionButtonIconName}\n iconUrl={actionButtonIconUrl}\n iconSvg={actionButtonIconSvg}\n iconAlt={actionButtonIconAlt}\n onClick={() => fireNonCancelableEvent(onAction, { value })}\n variant=\"icon\"\n />\n )}\n </div>\n );\n\n return (\n <div\n {...baseProps}\n aria-label={ariaLabel}\n className={clsx(styles.root, testutilStyles.root, baseProps.className, {\n [styles['textarea-readonly']]: readOnly,\n [styles['textarea-invalid']]: invalid,\n [styles['textarea-warning']]: warning && !invalid,\n [styles.disabled]: disabled,\n })}\n ref={__internalRootRef}\n role=\"region\"\n >\n {secondaryContent && (\n <div\n className={clsx(styles['secondary-content'], testutilStyles['secondary-content'], {\n [styles['with-paddings']]: !disableSecondaryContentPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryContent}\n </div>\n )}\n <div className={styles['textarea-wrapper']}>\n <textarea ref={textareaRef} id={controlId} {...attributes} />\n {hasActionButton && !secondaryActions && action}\n </div>\n {secondaryActions && (\n <div\n className={clsx(styles['action-stripe'], {\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n <div\n className={clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {\n [styles['with-paddings']]: !disableSecondaryActionsPaddings,\n [styles['with-paddings-and-actions']]: !disableSecondaryActionsPaddings && hasActionButton,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryActions}\n </div>\n <div className={styles.buffer} onClick={() => textareaRef.current?.focus()} />\n {hasActionButton && action}\n </div>\n )}\n </div>\n );\n }\n);\n\nexport default InternalPromptInput;\n"]}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"textarea-readonly": "awsui_textarea-
|
|
6
|
-
"disabled": "
|
|
7
|
-
"textarea-invalid": "awsui_textarea-
|
|
8
|
-
"textarea-warning": "awsui_textarea-
|
|
9
|
-
"textarea": "
|
|
10
|
-
"invalid": "
|
|
11
|
-
"warning": "
|
|
12
|
-
"textarea-wrapper": "awsui_textarea-
|
|
13
|
-
"primary-action": "awsui_primary-
|
|
14
|
-
"action-button": "awsui_action-
|
|
15
|
-
"secondary-content": "awsui_secondary-
|
|
16
|
-
"with-paddings": "awsui_with-
|
|
17
|
-
"action-stripe": "awsui_action-
|
|
18
|
-
"secondary-actions": "awsui_secondary-
|
|
19
|
-
"
|
|
4
|
+
"root": "awsui_root_55fkh_2oftp_146",
|
|
5
|
+
"textarea-readonly": "awsui_textarea-readonly_55fkh_2oftp_185",
|
|
6
|
+
"disabled": "awsui_disabled_55fkh_2oftp_190",
|
|
7
|
+
"textarea-invalid": "awsui_textarea-invalid_55fkh_2oftp_198",
|
|
8
|
+
"textarea-warning": "awsui_textarea-warning_55fkh_2oftp_223",
|
|
9
|
+
"textarea": "awsui_textarea_55fkh_2oftp_185",
|
|
10
|
+
"invalid": "awsui_invalid_55fkh_2oftp_323",
|
|
11
|
+
"warning": "awsui_warning_55fkh_2oftp_323",
|
|
12
|
+
"textarea-wrapper": "awsui_textarea-wrapper_55fkh_2oftp_342",
|
|
13
|
+
"primary-action": "awsui_primary-action_55fkh_2oftp_346",
|
|
14
|
+
"action-button": "awsui_action-button_55fkh_2oftp_354",
|
|
15
|
+
"secondary-content": "awsui_secondary-content_55fkh_2oftp_359",
|
|
16
|
+
"with-paddings": "awsui_with-paddings_55fkh_2oftp_394",
|
|
17
|
+
"action-stripe": "awsui_action-stripe_55fkh_2oftp_404",
|
|
18
|
+
"secondary-actions": "awsui_secondary-actions_55fkh_2oftp_443",
|
|
19
|
+
"with-paddings-and-actions": "awsui_with-paddings-and-actions_55fkh_2oftp_460",
|
|
20
|
+
"buffer": "awsui_buffer_55fkh_2oftp_464"
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
*/
|
|
144
144
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
145
145
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
146
|
-
.
|
|
146
|
+
.awsui_root_55fkh_2oftp_146:not(#\9) {
|
|
147
147
|
border-collapse: separate;
|
|
148
148
|
border-spacing: 0;
|
|
149
149
|
box-sizing: border-box;
|
|
@@ -182,12 +182,12 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
182
182
|
border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-default-317xk5, #8c8c94);
|
|
183
183
|
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-default-317xk5, #8c8c94);
|
|
184
184
|
}
|
|
185
|
-
.
|
|
185
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-readonly_55fkh_2oftp_185:not(#\9) {
|
|
186
186
|
background-color: var(--color-background-input-default-ifz5bb, #ffffff);
|
|
187
187
|
border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
188
188
|
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
189
189
|
}
|
|
190
|
-
.
|
|
190
|
+
.awsui_root_55fkh_2oftp_146.awsui_disabled_55fkh_2oftp_190:not(#\9) {
|
|
191
191
|
background-color: var(--color-background-input-disabled-dihaja, #ebebf0);
|
|
192
192
|
border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
193
193
|
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
@@ -195,57 +195,57 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
195
195
|
cursor: auto;
|
|
196
196
|
cursor: default;
|
|
197
197
|
}
|
|
198
|
-
.
|
|
198
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9) {
|
|
199
199
|
color: var(--color-text-status-error-ksqavh, #db0000);
|
|
200
200
|
border-color: var(--color-text-status-error-ksqavh, #db0000);
|
|
201
201
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
202
202
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
203
203
|
}
|
|
204
|
-
.
|
|
204
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus {
|
|
205
205
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
206
206
|
}
|
|
207
|
-
.
|
|
207
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9) {
|
|
208
208
|
padding-inline-start: 0;
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus-within, .awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus {
|
|
211
211
|
color: var(--color-text-status-error-ksqavh, #db0000);
|
|
212
212
|
border-color: var(--color-text-status-error-ksqavh, #db0000);
|
|
213
213
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
214
214
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
215
215
|
}
|
|
216
|
-
.
|
|
216
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus-within:focus, .awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus:focus {
|
|
217
217
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
218
218
|
}
|
|
219
|
-
.
|
|
219
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus-within, .awsui_root_55fkh_2oftp_146.awsui_textarea-invalid_55fkh_2oftp_198:not(#\9):focus {
|
|
220
220
|
padding-inline-start: 0;
|
|
221
221
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
222
222
|
}
|
|
223
|
-
.
|
|
223
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9) {
|
|
224
224
|
color: var(--color-text-status-warning-6meo06, #855900);
|
|
225
225
|
border-color: var(--color-text-status-warning-6meo06, #855900);
|
|
226
226
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
227
227
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus {
|
|
230
230
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
231
231
|
}
|
|
232
|
-
.
|
|
232
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9) {
|
|
233
233
|
padding-inline-start: 0;
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus-within, .awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus {
|
|
236
236
|
color: var(--color-text-status-warning-6meo06, #855900);
|
|
237
237
|
border-color: var(--color-text-status-warning-6meo06, #855900);
|
|
238
238
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
239
239
|
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus-within:focus, .awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus:focus {
|
|
242
242
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
.awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus-within, .awsui_root_55fkh_2oftp_146.awsui_textarea-warning_55fkh_2oftp_223:not(#\9):focus {
|
|
245
245
|
padding-inline-start: 0;
|
|
246
246
|
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
247
247
|
}
|
|
248
|
-
.
|
|
248
|
+
.awsui_root_55fkh_2oftp_146:not(#\9):focus-within, .awsui_root_55fkh_2oftp_146:not(#\9):focus {
|
|
249
249
|
outline: 2px dotted transparent;
|
|
250
250
|
border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-focused-4z0pgn, #006ce0);
|
|
251
251
|
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-focused-4z0pgn, #006ce0);
|
|
@@ -256,7 +256,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
256
256
|
box-shadow: 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
.
|
|
259
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9) {
|
|
260
260
|
border-collapse: separate;
|
|
261
261
|
border-spacing: 0;
|
|
262
262
|
box-sizing: border-box;
|
|
@@ -305,25 +305,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
305
305
|
box-sizing: border-box;
|
|
306
306
|
border: 0;
|
|
307
307
|
}
|
|
308
|
-
.
|
|
308
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9)::placeholder {
|
|
309
309
|
color: var(--color-text-input-placeholder-dclg8u, #656871);
|
|
310
310
|
font-style: italic;
|
|
311
311
|
opacity: 1;
|
|
312
312
|
}
|
|
313
|
-
.
|
|
313
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):-ms-input-placeholder {
|
|
314
314
|
color: var(--color-text-input-placeholder-dclg8u, #656871);
|
|
315
315
|
font-style: italic;
|
|
316
316
|
}
|
|
317
|
-
.
|
|
317
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):focus {
|
|
318
318
|
outline: none;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):invalid {
|
|
321
321
|
box-shadow: none;
|
|
322
322
|
}
|
|
323
|
-
.
|
|
323
|
+
.awsui_textarea_55fkh_2oftp_185.awsui_invalid_55fkh_2oftp_323:not(#\9), .awsui_textarea_55fkh_2oftp_185.awsui_warning_55fkh_2oftp_323:not(#\9) {
|
|
324
324
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
325
325
|
}
|
|
326
|
-
.
|
|
326
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):disabled {
|
|
327
327
|
background-color: var(--color-background-input-disabled-dihaja, #ebebf0);
|
|
328
328
|
border-block: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
329
329
|
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
@@ -332,31 +332,31 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
332
332
|
border: 0;
|
|
333
333
|
cursor: default;
|
|
334
334
|
}
|
|
335
|
-
.
|
|
335
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):disabled::placeholder {
|
|
336
336
|
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
337
337
|
opacity: 1;
|
|
338
338
|
}
|
|
339
|
-
.
|
|
339
|
+
.awsui_textarea_55fkh_2oftp_185:not(#\9):disabled:-ms-input-placeholder {
|
|
340
340
|
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
341
341
|
}
|
|
342
|
-
.awsui_textarea-
|
|
342
|
+
.awsui_textarea-wrapper_55fkh_2oftp_342:not(#\9) {
|
|
343
343
|
display: flex;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
.awsui_primary-
|
|
346
|
+
.awsui_primary-action_55fkh_2oftp_346:not(#\9) {
|
|
347
347
|
align-self: flex-end;
|
|
348
348
|
flex-shrink: 0;
|
|
349
349
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) / 2);
|
|
350
350
|
}
|
|
351
|
-
.awsui_textarea-
|
|
351
|
+
.awsui_textarea-wrapper_55fkh_2oftp_342 > .awsui_primary-action_55fkh_2oftp_346:not(#\9) {
|
|
352
352
|
padding-inline-end: calc(var(--space-field-horizontal-0aq2ch, 12px) / 2);
|
|
353
353
|
}
|
|
354
|
-
.awsui_textarea-
|
|
354
|
+
.awsui_textarea-wrapper_55fkh_2oftp_342 > .awsui_primary-action_55fkh_2oftp_346 > .awsui_action-button_55fkh_2oftp_354:not(#\9) {
|
|
355
355
|
margin-block-end: var(--space-scaled-xxxs-oo06c7, 2px);
|
|
356
356
|
padding: 0;
|
|
357
357
|
}
|
|
358
358
|
|
|
359
|
-
.awsui_secondary-
|
|
359
|
+
.awsui_secondary-content_55fkh_2oftp_359:not(#\9) {
|
|
360
360
|
border-collapse: separate;
|
|
361
361
|
border-spacing: 0;
|
|
362
362
|
box-sizing: border-box;
|
|
@@ -391,17 +391,17 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
391
391
|
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
392
392
|
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
393
393
|
}
|
|
394
|
-
.awsui_secondary-
|
|
394
|
+
.awsui_secondary-content_55fkh_2oftp_359.awsui_with-paddings_55fkh_2oftp_394:not(#\9) {
|
|
395
395
|
padding-block-start: var(--space-scaled-s-8ozaad, 12px);
|
|
396
396
|
padding-block-end: var(--space-scaled-s-8ozaad, 12px);
|
|
397
397
|
padding-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
|
|
398
398
|
padding-inline-end: var(--space-field-horizontal-0aq2ch, 12px);
|
|
399
399
|
}
|
|
400
|
-
.awsui_secondary-
|
|
400
|
+
.awsui_secondary-content_55fkh_2oftp_359.awsui_with-paddings_55fkh_2oftp_394.awsui_invalid_55fkh_2oftp_323:not(#\9), .awsui_secondary-content_55fkh_2oftp_359.awsui_with-paddings_55fkh_2oftp_394.awsui_warning_55fkh_2oftp_323:not(#\9) {
|
|
401
401
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
-
.awsui_action-
|
|
404
|
+
.awsui_action-stripe_55fkh_2oftp_404:not(#\9) {
|
|
405
405
|
border-collapse: separate;
|
|
406
406
|
border-spacing: 0;
|
|
407
407
|
box-sizing: border-box;
|
|
@@ -440,16 +440,28 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
440
440
|
align-items: flex-end;
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
.awsui_secondary-
|
|
444
|
-
|
|
443
|
+
.awsui_secondary-actions_55fkh_2oftp_443:not(#\9) {
|
|
444
|
+
flex-basis: max-content;
|
|
445
|
+
flex-grow: 0;
|
|
446
|
+
flex-shrink: 1;
|
|
447
|
+
box-sizing: border-box;
|
|
448
|
+
word-wrap: break-word;
|
|
449
|
+
max-inline-size: 100%;
|
|
450
|
+
overflow: hidden;
|
|
451
|
+
}
|
|
452
|
+
.awsui_secondary-actions_55fkh_2oftp_443.awsui_with-paddings_55fkh_2oftp_394:not(#\9) {
|
|
453
|
+
padding-inline: var(--space-field-horizontal-0aq2ch, 12px);
|
|
445
454
|
padding-block-start: var(--space-scaled-s-8ozaad, 12px);
|
|
446
455
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
447
456
|
}
|
|
448
|
-
.awsui_secondary-
|
|
457
|
+
.awsui_secondary-actions_55fkh_2oftp_443.awsui_with-paddings_55fkh_2oftp_394.awsui_invalid_55fkh_2oftp_323:not(#\9), .awsui_secondary-actions_55fkh_2oftp_443.awsui_with-paddings_55fkh_2oftp_394.awsui_warning_55fkh_2oftp_323:not(#\9) {
|
|
449
458
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
450
459
|
}
|
|
460
|
+
.awsui_secondary-actions_55fkh_2oftp_443.awsui_with-paddings-and-actions_55fkh_2oftp_460:not(#\9) {
|
|
461
|
+
padding-inline-end: 0;
|
|
462
|
+
}
|
|
451
463
|
|
|
452
|
-
.
|
|
464
|
+
.awsui_buffer_55fkh_2oftp_464:not(#\9) {
|
|
453
465
|
flex: 1;
|
|
454
466
|
align-self: stretch;
|
|
455
467
|
cursor: text;
|
|
@@ -2,21 +2,22 @@
|
|
|
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
|
-
"textarea-readonly": "awsui_textarea-
|
|
7
|
-
"disabled": "
|
|
8
|
-
"textarea-invalid": "awsui_textarea-
|
|
9
|
-
"textarea-warning": "awsui_textarea-
|
|
10
|
-
"textarea": "
|
|
11
|
-
"invalid": "
|
|
12
|
-
"warning": "
|
|
13
|
-
"textarea-wrapper": "awsui_textarea-
|
|
14
|
-
"primary-action": "awsui_primary-
|
|
15
|
-
"action-button": "awsui_action-
|
|
16
|
-
"secondary-content": "awsui_secondary-
|
|
17
|
-
"with-paddings": "awsui_with-
|
|
18
|
-
"action-stripe": "awsui_action-
|
|
19
|
-
"secondary-actions": "awsui_secondary-
|
|
20
|
-
"
|
|
5
|
+
"root": "awsui_root_55fkh_2oftp_146",
|
|
6
|
+
"textarea-readonly": "awsui_textarea-readonly_55fkh_2oftp_185",
|
|
7
|
+
"disabled": "awsui_disabled_55fkh_2oftp_190",
|
|
8
|
+
"textarea-invalid": "awsui_textarea-invalid_55fkh_2oftp_198",
|
|
9
|
+
"textarea-warning": "awsui_textarea-warning_55fkh_2oftp_223",
|
|
10
|
+
"textarea": "awsui_textarea_55fkh_2oftp_185",
|
|
11
|
+
"invalid": "awsui_invalid_55fkh_2oftp_323",
|
|
12
|
+
"warning": "awsui_warning_55fkh_2oftp_323",
|
|
13
|
+
"textarea-wrapper": "awsui_textarea-wrapper_55fkh_2oftp_342",
|
|
14
|
+
"primary-action": "awsui_primary-action_55fkh_2oftp_346",
|
|
15
|
+
"action-button": "awsui_action-button_55fkh_2oftp_354",
|
|
16
|
+
"secondary-content": "awsui_secondary-content_55fkh_2oftp_359",
|
|
17
|
+
"with-paddings": "awsui_with-paddings_55fkh_2oftp_394",
|
|
18
|
+
"action-stripe": "awsui_action-stripe_55fkh_2oftp_404",
|
|
19
|
+
"secondary-actions": "awsui_secondary-actions_55fkh_2oftp_443",
|
|
20
|
+
"with-paddings-and-actions": "awsui_with-paddings-and-actions_55fkh_2oftp_460",
|
|
21
|
+
"buffer": "awsui_buffer_55fkh_2oftp_464"
|
|
21
22
|
};
|
|
22
23
|
|