@cloudscape-design/components 3.0.1039 → 3.0.1040
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/index.js +11 -21
- package/prompt-input/interfaces.d.ts +8 -0
- package/prompt-input/interfaces.d.ts.map +1 -1
- package/prompt-input/interfaces.js.map +1 -1
- package/prompt-input/internal-do-not-use-core.js +28 -0
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js +9 -7
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +16 -15
- package/prompt-input/styles.scoped.css +42 -64
- package/prompt-input/styles.selectors.js +16 -15
- package/prompt-input/test-classes/styles.css.js +6 -5
- package/prompt-input/test-classes/styles.scoped.css +9 -5
- package/prompt-input/test-classes/styles.selectors.js +6 -5
- package/test-utils/dom/prompt-input/index.d.ts +8 -1
- package/test-utils/dom/prompt-input/index.js +9 -0
- package/test-utils/dom/prompt-input/index.js.map +1 -1
- package/test-utils/selectors/prompt-input/index.d.ts +7 -0
- package/test-utils/selectors/prompt-input/index.js +9 -0
- package/test-utils/selectors/prompt-input/index.js.map +1 -1
- /package/prompt-input/{index.js.map → internal-do-not-use-core.js.map} +0 -0
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 (fbfdb122)";
|
|
3
|
+
export var GIT_SHA = "fbfdb122";
|
|
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
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
"./internal/base-component/index.js",
|
|
152
152
|
"./internal/base-component/styles.css.js"
|
|
153
153
|
],
|
|
154
|
-
"version": "3.0.
|
|
154
|
+
"version": "3.0.1040",
|
|
155
155
|
"repository": {
|
|
156
156
|
"type": "git",
|
|
157
157
|
"url": "https://github.com/cloudscape-design/components.git"
|
package/prompt-input/index.js
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
'use client';
|
|
4
|
-
import { __rest } from "tslib";
|
|
5
3
|
import React from 'react';
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
import CoreComponent from './internal-do-not-use-core';
|
|
7
6
|
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
autoFocus,
|
|
16
|
-
disableBrowserAutocorrect,
|
|
17
|
-
disableActionButton,
|
|
18
|
-
spellcheck,
|
|
19
|
-
actionButtonIconName,
|
|
20
|
-
minRows,
|
|
21
|
-
maxRows,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
return (React.createElement(InternalPromptInput, Object.assign({ readOnly: readOnly, autoComplete: autoComplete, autoFocus: autoFocus, disableBrowserAutocorrect: disableBrowserAutocorrect, disableActionButton: disableActionButton, spellcheck: spellcheck, actionButtonIconName: actionButtonIconName, minRows: minRows, maxRows: maxRows }, props, baseComponentProps, { ref: ref })));
|
|
7
|
+
import { validateProps } from '../internal/base-component';
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
const PromptInput = React.forwardRef((props, ref) => {
|
|
12
|
+
validateProps('PromptInput', props, ["customPrimaryAction"], {});
|
|
13
|
+
return React.createElement(CoreComponent, {ref,...props});
|
|
25
14
|
});
|
|
15
|
+
|
|
16
|
+
|
|
26
17
|
applyDisplayName(PromptInput, 'PromptInput');
|
|
27
18
|
export default PromptInput;
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -65,6 +65,14 @@ export interface PromptInputProps extends BaseInputProps, InputKeyEvents, InputA
|
|
|
65
65
|
* Defaults to 3. Use -1 for infinite rows.
|
|
66
66
|
*/
|
|
67
67
|
maxRows?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Use this to replace the primary action.
|
|
70
|
+
* If this is provided then any other `actionButton*` properties will be ignored.
|
|
71
|
+
* Note that you should still provide an `onAction` function in order to handle keyboard submission.
|
|
72
|
+
*
|
|
73
|
+
* @awsuiSystem core
|
|
74
|
+
*/
|
|
75
|
+
|
|
68
76
|
/**
|
|
69
77
|
* Use this slot to add secondary actions to the prompt input.
|
|
70
78
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/interfaces.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE9E,MAAM,WAAW,gBACf,SAAQ,cAAc,EACpB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,+BAA+B;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACpE;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC,I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IAChC,KAAY,SAAS,GAAG,aAAa,CAAC;IACtC,KAAY,YAAY,GAAG,gBAAgB,CAAC;IAE5C,UAAiB,GAAG;QAClB;;WAEG;QACH,KAAK,IAAI,IAAI,CAAC;QAEd;;WAEG;QACH,MAAM,IAAI,IAAI,CAAC;QAEf;;;;;;WAMG;QACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,IAAI,CAAC;KAChH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/prompt-input/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { IconProps } from '../icon/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoComplete,\n InputAutoCorrect,\n InputKeyEvents,\n InputSpellcheck,\n} from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { BaseKeyDetail, NonCancelableEventHandler } from '../internal/events';\n\nexport interface PromptInputProps\n extends BaseInputProps,\n InputKeyEvents,\n InputAutoCorrect,\n InputAutoComplete,\n InputSpellcheck,\n BaseComponentProps,\n FormFieldValidationControlProps {\n /**\n * Called whenever a user clicks the action button or presses the \"Enter\" key.\n * The event `detail` contains the current value of the field.\n */\n onAction?: NonCancelableEventHandler<PromptInputProps.ActionDetail>;\n /**\n * Determines what icon to display in the action button.\n */\n actionButtonIconName?: IconProps.Name;\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available.\n *\n * If you set both `actionButtonIconUrl` and `actionButtonIconSvg`, `actionButtonIconSvg` will take precedence.\n */\n actionButtonIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `actionButtonIconUrl` and `actionButtonIconSvg`, `iconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n actionButtonIconSvg?: React.ReactNode;\n /**\n * Specifies alternate text for a custom icon. We recommend that you provide this for accessibility.\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `iconSvg` slot.\n */\n actionButtonIconAlt?: string;\n /**\n * Adds an aria-label to the action button.\n * @i18n\n */\n actionButtonAriaLabel?: string;\n\n /**\n * Specifies whether to disable the action button.\n */\n disableActionButton?: boolean;\n\n /**\n * Specifies the minimum number of lines of text to set the height to.\n */\n minRows?: number;\n\n /**\n * Specifies the maximum number of lines of text the textarea will expand to.\n * Defaults to 3. Use -1 for infinite rows.\n */\n maxRows?: number;\n\n /**\n * Use this slot to add secondary actions to the prompt input.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Use this slot to add secondary content, such as file attachments, to the prompt input.\n */\n secondaryContent?: React.ReactNode;\n\n /**\n * Determines whether the secondary actions area of the input has padding. If true, removes the default padding from the secondary actions area.\n */\n disableSecondaryActionsPaddings?: boolean;\n\n /**\n * Determines whether the secondary content area of the input has padding. If true, removes the default padding from the secondary content area.\n */\n disableSecondaryContentPaddings?: boolean;\n}\n\nexport namespace PromptInputProps {\n export type KeyDetail = BaseKeyDetail;\n export type ActionDetail = BaseChangeDetail;\n\n export interface Ref {\n /**\n * Sets input focus on the textarea control.\n */\n focus(): void;\n\n /**\n * Selects all text in the textarea control.\n */\n select(): void;\n\n /**\n * Selects a range of text in the textarea control.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/setSelectionRange\n * for more details on this method. Be aware that using this method in React has some\n * common pitfalls: https://stackoverflow.com/questions/60129605/is-javascripts-setselectionrange-incompatible-with-react-hooks\n */\n setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/prompt-input/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { IconProps } from '../icon/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoComplete,\n InputAutoCorrect,\n InputKeyEvents,\n InputSpellcheck,\n} from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldValidationControlProps } from '../internal/context/form-field-context';\nimport { BaseKeyDetail, NonCancelableEventHandler } from '../internal/events';\n\nexport interface PromptInputProps\n extends BaseInputProps,\n InputKeyEvents,\n InputAutoCorrect,\n InputAutoComplete,\n InputSpellcheck,\n BaseComponentProps,\n FormFieldValidationControlProps {\n /**\n * Called whenever a user clicks the action button or presses the \"Enter\" key.\n * The event `detail` contains the current value of the field.\n */\n onAction?: NonCancelableEventHandler<PromptInputProps.ActionDetail>;\n /**\n * Determines what icon to display in the action button.\n */\n actionButtonIconName?: IconProps.Name;\n /**\n * Specifies the URL of a custom icon. Use this property if the icon you want isn't available.\n *\n * If you set both `actionButtonIconUrl` and `actionButtonIconSvg`, `actionButtonIconSvg` will take precedence.\n */\n actionButtonIconUrl?: string;\n /**\n * Specifies the SVG of a custom icon.\n *\n * Use this property if you want your custom icon to inherit colors dictated by variant or hover states.\n * When this property is set, the component will be decorated with `aria-hidden=\"true\"`. Ensure that the `svg` element:\n * - has attribute `focusable=\"false\"`.\n * - has `viewBox=\"0 0 16 16\"`.\n *\n * If you set the `svg` element as the root node of the slot, the component will automatically\n * - set `stroke=\"currentColor\"`, `fill=\"none\"`, and `vertical-align=\"top\"`.\n * - set the stroke width based on the size of the icon.\n * - set the width and height of the SVG element based on the size of the icon.\n *\n * If you don't want these styles to be automatically set, wrap the `svg` element into a `span`.\n * You can still set the stroke to `currentColor` to inherit the color of the surrounding elements.\n *\n * If you set both `actionButtonIconUrl` and `actionButtonIconSvg`, `iconSvg` will take precedence.\n *\n * *Note:* Remember to remove any additional elements (for example: `defs`) and related CSS classes from SVG files exported from design software.\n * In most cases, they aren't needed, as the `svg` element inherits styles from the icon component.\n */\n actionButtonIconSvg?: React.ReactNode;\n /**\n * Specifies alternate text for a custom icon. We recommend that you provide this for accessibility.\n * This property is ignored if you use a predefined icon or if you set your custom icon using the `iconSvg` slot.\n */\n actionButtonIconAlt?: string;\n /**\n * Adds an aria-label to the action button.\n * @i18n\n */\n actionButtonAriaLabel?: string;\n\n /**\n * Specifies whether to disable the action button.\n */\n disableActionButton?: boolean;\n\n /**\n * Specifies the minimum number of lines of text to set the height to.\n */\n minRows?: number;\n\n /**\n * Specifies the maximum number of lines of text the textarea will expand to.\n * Defaults to 3. Use -1 for infinite rows.\n */\n maxRows?: number;\n\n /**\n * Use this to replace the primary action.\n * If this is provided then any other `actionButton*` properties will be ignored.\n * Note that you should still provide an `onAction` function in order to handle keyboard submission.\n *\n * @awsuiSystem core\n */\n customPrimaryAction?: React.ReactNode;\n\n /**\n * Use this slot to add secondary actions to the prompt input.\n */\n secondaryActions?: React.ReactNode;\n\n /**\n * Use this slot to add secondary content, such as file attachments, to the prompt input.\n */\n secondaryContent?: React.ReactNode;\n\n /**\n * Determines whether the secondary actions area of the input has padding. If true, removes the default padding from the secondary actions area.\n */\n disableSecondaryActionsPaddings?: boolean;\n\n /**\n * Determines whether the secondary content area of the input has padding. If true, removes the default padding from the secondary content area.\n */\n disableSecondaryContentPaddings?: boolean;\n}\n\nexport namespace PromptInputProps {\n export type KeyDetail = BaseKeyDetail;\n export type ActionDetail = BaseChangeDetail;\n\n export interface Ref {\n /**\n * Sets input focus on the textarea control.\n */\n focus(): void;\n\n /**\n * Selects all text in the textarea control.\n */\n select(): void;\n\n /**\n * Selects a range of text in the textarea control.\n *\n * See https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/setSelectionRange\n * for more details on this method. Be aware that using this method in React has some\n * common pitfalls: https://stackoverflow.com/questions/60129605/is-javascripts-setselectionrange-incompatible-with-react-hooks\n */\n setSelectionRange(start: number | null, end: number | null, direction?: 'forward' | 'backward' | 'none'): void;\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
'use client';
|
|
4
|
+
import { __rest } from "tslib";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import useBaseComponent from '../internal/hooks/use-base-component';
|
|
7
|
+
import { applyDisplayName } from '../internal/utils/apply-display-name';
|
|
8
|
+
import InternalPromptInput from './internal';
|
|
9
|
+
const PromptInput = React.forwardRef((_a, ref) => {
|
|
10
|
+
var { autoComplete, autoFocus, disableBrowserAutocorrect, disableActionButton, spellcheck, readOnly, actionButtonIconName, minRows = 1, maxRows = 3 } = _a, props = __rest(_a, ["autoComplete", "autoFocus", "disableBrowserAutocorrect", "disableActionButton", "spellcheck", "readOnly", "actionButtonIconName", "minRows", "maxRows"]);
|
|
11
|
+
const baseComponentProps = useBaseComponent('PromptInput', {
|
|
12
|
+
props: {
|
|
13
|
+
readOnly,
|
|
14
|
+
autoComplete,
|
|
15
|
+
autoFocus,
|
|
16
|
+
disableBrowserAutocorrect,
|
|
17
|
+
disableActionButton,
|
|
18
|
+
spellcheck,
|
|
19
|
+
actionButtonIconName,
|
|
20
|
+
minRows,
|
|
21
|
+
maxRows,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return (React.createElement(InternalPromptInput, Object.assign({ readOnly: readOnly, autoComplete: autoComplete, autoFocus: autoFocus, disableBrowserAutocorrect: disableBrowserAutocorrect, disableActionButton: disableActionButton, spellcheck: spellcheck, actionButtonIconName: actionButtonIconName, minRows: minRows, maxRows: maxRows }, props, baseComponentProps, { ref: ref })));
|
|
25
|
+
});
|
|
26
|
+
applyDisplayName(PromptInput, 'PromptInput');
|
|
27
|
+
export default PromptInput;
|
|
28
|
+
//# sourceMappingURL=internal-do-not-use-core.js.map
|
|
@@ -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,uGA4NxB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/prompt-input/internal.js
CHANGED
|
@@ -14,7 +14,7 @@ import { useVisualRefresh } from '../internal/hooks/use-visual-mode';
|
|
|
14
14
|
import styles from './styles.css.js';
|
|
15
15
|
import testutilStyles from './test-classes/styles.css.js';
|
|
16
16
|
const InternalPromptInput = React.forwardRef((_a, ref) => {
|
|
17
|
-
var { value, actionButtonAriaLabel, actionButtonIconName, actionButtonIconUrl, actionButtonIconSvg, actionButtonIconAlt, ariaLabel, autoComplete, autoFocus, disableActionButton, disableBrowserAutocorrect, disabled, maxRows, minRows, name, onAction, onBlur, onChange, onFocus, onKeyDown, onKeyUp, placeholder, readOnly, spellcheck, secondaryActions, secondaryContent, disableSecondaryActionsPaddings, disableSecondaryContentPaddings, __internalRootRef = null } = _a, rest = __rest(_a, ["value", "actionButtonAriaLabel", "actionButtonIconName", "actionButtonIconUrl", "actionButtonIconSvg", "actionButtonIconAlt", "ariaLabel", "autoComplete", "autoFocus", "disableActionButton", "disableBrowserAutocorrect", "disabled", "maxRows", "minRows", "name", "onAction", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "spellcheck", "secondaryActions", "secondaryContent", "disableSecondaryActionsPaddings", "disableSecondaryContentPaddings", "__internalRootRef"]);
|
|
17
|
+
var { value, actionButtonAriaLabel, actionButtonIconName, actionButtonIconUrl, actionButtonIconSvg, actionButtonIconAlt, ariaLabel, autoComplete, autoFocus, disableActionButton, disableBrowserAutocorrect, disabled, maxRows, minRows, name, onAction, onBlur, onChange, onFocus, onKeyDown, onKeyUp, placeholder, readOnly, spellcheck, customPrimaryAction, secondaryActions, secondaryContent, disableSecondaryActionsPaddings, disableSecondaryContentPaddings, __internalRootRef = null } = _a, rest = __rest(_a, ["value", "actionButtonAriaLabel", "actionButtonIconName", "actionButtonIconUrl", "actionButtonIconSvg", "actionButtonIconAlt", "ariaLabel", "autoComplete", "autoFocus", "disableActionButton", "disableBrowserAutocorrect", "disabled", "maxRows", "minRows", "name", "onAction", "onBlur", "onChange", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "spellcheck", "customPrimaryAction", "secondaryActions", "secondaryContent", "disableSecondaryActionsPaddings", "disableSecondaryContentPaddings", "__internalRootRef"]);
|
|
18
18
|
const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = useFormFieldContext(rest);
|
|
19
19
|
const baseProps = getBaseProps(rest);
|
|
20
20
|
const textareaRef = useRef(null);
|
|
@@ -51,7 +51,7 @@ const InternalPromptInput = React.forwardRef((_a, ref) => {
|
|
|
51
51
|
fireNonCancelableEvent(onChange, { value: event.target.value });
|
|
52
52
|
adjustTextareaHeight();
|
|
53
53
|
};
|
|
54
|
-
const hasActionButton = actionButtonIconName || actionButtonIconSvg || actionButtonIconUrl;
|
|
54
|
+
const hasActionButton = actionButtonIconName || actionButtonIconSvg || actionButtonIconUrl || customPrimaryAction;
|
|
55
55
|
const adjustTextareaHeight = useCallback(() => {
|
|
56
56
|
if (textareaRef.current) {
|
|
57
57
|
// 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
|
|
@@ -109,8 +109,7 @@ const InternalPromptInput = React.forwardRef((_a, ref) => {
|
|
|
109
109
|
attributes.autoCorrect = 'off';
|
|
110
110
|
attributes.autoCapitalize = 'off';
|
|
111
111
|
}
|
|
112
|
-
const action = (React.createElement("div", { className: styles.button },
|
|
113
|
-
React.createElement(InternalButton, { className: clsx(styles['action-button'], testutilStyles['action-button']), ariaLabel: actionButtonAriaLabel, disabled: disabled || readOnly || disableActionButton, __focusable: readOnly, iconName: actionButtonIconName, iconUrl: actionButtonIconUrl, iconSvg: actionButtonIconSvg, iconAlt: actionButtonIconAlt, onClick: () => fireNonCancelableEvent(onAction, { value }), variant: "icon" })));
|
|
112
|
+
const action = (React.createElement("div", { className: clsx(styles['primary-action'], testutilStyles['primary-action']) }, customPrimaryAction !== null && customPrimaryAction !== void 0 ? customPrimaryAction : (React.createElement(InternalButton, { className: clsx(styles['action-button'], testutilStyles['action-button']), ariaLabel: actionButtonAriaLabel, disabled: disabled || readOnly || disableActionButton, __focusable: readOnly, iconName: actionButtonIconName, iconUrl: actionButtonIconUrl, iconSvg: actionButtonIconSvg, iconAlt: actionButtonIconAlt, onClick: () => fireNonCancelableEvent(onAction, { value }), variant: "icon" }))));
|
|
114
113
|
return (React.createElement("div", Object.assign({}, baseProps, { "aria-label": ariaLabel, className: clsx(styles.root, testutilStyles.root, baseProps.className, {
|
|
115
114
|
[styles['textarea-readonly']]: readOnly,
|
|
116
115
|
[styles['textarea-invalid']]: invalid,
|
|
@@ -125,12 +124,15 @@ const InternalPromptInput = React.forwardRef((_a, ref) => {
|
|
|
125
124
|
React.createElement("div", { className: styles['textarea-wrapper'] },
|
|
126
125
|
React.createElement("textarea", Object.assign({ ref: textareaRef, id: controlId }, attributes)),
|
|
127
126
|
hasActionButton && !secondaryActions && action),
|
|
128
|
-
secondaryActions && (React.createElement("div", { className: clsx(styles['
|
|
129
|
-
[styles['with-paddings']]: !disableSecondaryActionsPaddings,
|
|
127
|
+
secondaryActions && (React.createElement("div", { className: clsx(styles['action-stripe'], {
|
|
130
128
|
[styles.invalid]: invalid,
|
|
131
129
|
[styles.warning]: warning,
|
|
132
130
|
}) },
|
|
133
|
-
|
|
131
|
+
React.createElement("div", { className: clsx(styles['secondary-actions'], testutilStyles['secondary-actions'], {
|
|
132
|
+
[styles['with-paddings']]: !disableSecondaryActionsPaddings,
|
|
133
|
+
[styles.invalid]: invalid,
|
|
134
|
+
[styles.warning]: warning,
|
|
135
|
+
}) }, secondaryActions),
|
|
134
136
|
React.createElement("div", { className: styles.buffer, onClick: () => { var _a; return (_a = textareaRef.current) === null || _a === void 0 ? void 0 : _a.focus(); } }),
|
|
135
137
|
hasActionButton && action))));
|
|
136
138
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRo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,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 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;\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={styles.button}>\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 </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['secondary-actions'], testutilStyles['secondary-actions'], {\n [styles['with-paddings']]: !disableSecondaryActionsPaddings,\n [styles.invalid]: invalid,\n [styles.warning]: warning,\n })}\n >\n {secondaryActions}\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,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC/E,OAAO,KAAK,MAAM,MAAM,qCAAqC,CAAC;AAE9D,OAAO,EAA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,EAAE,OAAO;gBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;aAC1B,CAAC,IAED,gBAAgB,CACb,CACP;QACD,6BAAK,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC;YACxC,gDAAU,GAAG,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,IAAM,UAAU,EAAI;YAC5D,eAAe,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAC3C;QACL,gBAAgB,IAAI,CACnB,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACvC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;gBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;aAC1B,CAAC;YAEF,6BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,mBAAmB,CAAC,EAAE,cAAc,CAAC,mBAAmB,CAAC,EAAE;oBAChF,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,+BAA+B;oBAC3D,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;oBACzB,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,OAAO;iBAC1B,CAAC,IAED,gBAAgB,CACb;YACN,6BAAK,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,WAAC,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,20 +1,21 @@
|
|
|
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
|
-
"
|
|
14
|
-
"action-button": "awsui_action-
|
|
15
|
-
"secondary-content": "awsui_secondary-
|
|
16
|
-
"with-paddings": "awsui_with-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
4
|
+
"root": "awsui_root_55fkh_19qc8_146",
|
|
5
|
+
"textarea-readonly": "awsui_textarea-readonly_55fkh_19qc8_185",
|
|
6
|
+
"disabled": "awsui_disabled_55fkh_19qc8_190",
|
|
7
|
+
"textarea-invalid": "awsui_textarea-invalid_55fkh_19qc8_198",
|
|
8
|
+
"textarea-warning": "awsui_textarea-warning_55fkh_19qc8_223",
|
|
9
|
+
"textarea": "awsui_textarea_55fkh_19qc8_185",
|
|
10
|
+
"invalid": "awsui_invalid_55fkh_19qc8_323",
|
|
11
|
+
"warning": "awsui_warning_55fkh_19qc8_323",
|
|
12
|
+
"textarea-wrapper": "awsui_textarea-wrapper_55fkh_19qc8_342",
|
|
13
|
+
"primary-action": "awsui_primary-action_55fkh_19qc8_346",
|
|
14
|
+
"action-button": "awsui_action-button_55fkh_19qc8_354",
|
|
15
|
+
"secondary-content": "awsui_secondary-content_55fkh_19qc8_359",
|
|
16
|
+
"with-paddings": "awsui_with-paddings_55fkh_19qc8_394",
|
|
17
|
+
"action-stripe": "awsui_action-stripe_55fkh_19qc8_404",
|
|
18
|
+
"secondary-actions": "awsui_secondary-actions_55fkh_19qc8_443",
|
|
19
|
+
"buffer": "awsui_buffer_55fkh_19qc8_452"
|
|
19
20
|
};
|
|
20
21
|
|
|
@@ -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_19qc8_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_19qc8_146.awsui_textarea-readonly_55fkh_19qc8_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_19qc8_146.awsui_disabled_55fkh_19qc8_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_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_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_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_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_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_198:not(#\9) {
|
|
208
208
|
padding-inline-start: 0;
|
|
209
209
|
}
|
|
210
|
-
.
|
|
210
|
+
.awsui_root_55fkh_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_198:not(#\9):focus-within, .awsui_root_55fkh_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_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_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_198:not(#\9):focus-within:focus, .awsui_root_55fkh_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_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_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_198:not(#\9):focus-within, .awsui_root_55fkh_19qc8_146.awsui_textarea-invalid_55fkh_19qc8_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_19qc8_146.awsui_textarea-warning_55fkh_19qc8_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_19qc8_146.awsui_textarea-warning_55fkh_19qc8_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_19qc8_146.awsui_textarea-warning_55fkh_19qc8_223:not(#\9) {
|
|
233
233
|
padding-inline-start: 0;
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
.awsui_root_55fkh_19qc8_146.awsui_textarea-warning_55fkh_19qc8_223:not(#\9):focus-within, .awsui_root_55fkh_19qc8_146.awsui_textarea-warning_55fkh_19qc8_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_19qc8_146.awsui_textarea-warning_55fkh_19qc8_223:not(#\9):focus-within:focus, .awsui_root_55fkh_19qc8_146.awsui_textarea-warning_55fkh_19qc8_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_19qc8_146.awsui_textarea-warning_55fkh_19qc8_223:not(#\9):focus-within, .awsui_root_55fkh_19qc8_146.awsui_textarea-warning_55fkh_19qc8_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_19qc8_146:not(#\9):focus-within, .awsui_root_55fkh_19qc8_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_19qc8_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_19qc8_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_19qc8_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_19qc8_185:not(#\9):focus {
|
|
318
318
|
outline: none;
|
|
319
319
|
}
|
|
320
|
-
.
|
|
320
|
+
.awsui_textarea_55fkh_19qc8_185:not(#\9):invalid {
|
|
321
321
|
box-shadow: none;
|
|
322
322
|
}
|
|
323
|
-
.
|
|
323
|
+
.awsui_textarea_55fkh_19qc8_185.awsui_invalid_55fkh_19qc8_323:not(#\9), .awsui_textarea_55fkh_19qc8_185.awsui_warning_55fkh_19qc8_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_19qc8_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,48 +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_19qc8_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_19qc8_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_19qc8_342:not(#\9) {
|
|
343
343
|
display: flex;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
-
.
|
|
346
|
+
.awsui_primary-action_55fkh_19qc8_346:not(#\9) {
|
|
347
347
|
align-self: flex-end;
|
|
348
|
-
|
|
349
|
-
padding-
|
|
348
|
+
flex-shrink: 0;
|
|
349
|
+
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) / 2);
|
|
350
350
|
}
|
|
351
|
-
.
|
|
352
|
-
padding:
|
|
353
|
-
}
|
|
354
|
-
body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_action-button_55fkh_25oqf_351:not(#\9):focus {
|
|
355
|
-
position: relative;
|
|
351
|
+
.awsui_textarea-wrapper_55fkh_19qc8_342 > .awsui_primary-action_55fkh_19qc8_346:not(#\9) {
|
|
352
|
+
padding-inline-end: calc(var(--space-field-horizontal-0aq2ch, 12px) / 2);
|
|
356
353
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_action-button_55fkh_25oqf_351:not(#\9):focus::before {
|
|
362
|
-
content: " ";
|
|
363
|
-
display: block;
|
|
364
|
-
position: absolute;
|
|
365
|
-
inset-inline-start: calc(-1 * calc((var(--space-xxxs-pajhad, 2px)) - 1px));
|
|
366
|
-
inset-block-start: calc(-1 * calc(-1 * var(--space-xxxs-pajhad, 2px) - 1px));
|
|
367
|
-
inline-size: calc(100% + calc((var(--space-xxxs-pajhad, 2px)) - 1px) + calc((var(--space-xxxs-pajhad, 2px)) - 1px));
|
|
368
|
-
block-size: calc(100% + calc(-1 * var(--space-xxxs-pajhad, 2px) - 1px) + calc(-1 * var(--space-xxxs-pajhad, 2px) - 1px));
|
|
369
|
-
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
370
|
-
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
371
|
-
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
372
|
-
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
373
|
-
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
354
|
+
.awsui_textarea-wrapper_55fkh_19qc8_342 > .awsui_primary-action_55fkh_19qc8_346 > .awsui_action-button_55fkh_19qc8_354:not(#\9) {
|
|
355
|
+
margin-block-end: var(--space-scaled-xxxs-oo06c7, 2px);
|
|
356
|
+
padding: 0;
|
|
374
357
|
}
|
|
375
358
|
|
|
376
|
-
.awsui_secondary-
|
|
359
|
+
.awsui_secondary-content_55fkh_19qc8_359:not(#\9) {
|
|
377
360
|
border-collapse: separate;
|
|
378
361
|
border-spacing: 0;
|
|
379
362
|
box-sizing: border-box;
|
|
@@ -408,17 +391,17 @@ body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_actio
|
|
|
408
391
|
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
409
392
|
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
410
393
|
}
|
|
411
|
-
.awsui_secondary-
|
|
394
|
+
.awsui_secondary-content_55fkh_19qc8_359.awsui_with-paddings_55fkh_19qc8_394:not(#\9) {
|
|
412
395
|
padding-block-start: var(--space-scaled-s-8ozaad, 12px);
|
|
413
396
|
padding-block-end: var(--space-scaled-s-8ozaad, 12px);
|
|
414
397
|
padding-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
|
|
415
398
|
padding-inline-end: var(--space-field-horizontal-0aq2ch, 12px);
|
|
416
399
|
}
|
|
417
|
-
.awsui_secondary-
|
|
400
|
+
.awsui_secondary-content_55fkh_19qc8_359.awsui_with-paddings_55fkh_19qc8_394.awsui_invalid_55fkh_19qc8_323:not(#\9), .awsui_secondary-content_55fkh_19qc8_359.awsui_with-paddings_55fkh_19qc8_394.awsui_warning_55fkh_19qc8_323:not(#\9) {
|
|
418
401
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
419
402
|
}
|
|
420
403
|
|
|
421
|
-
.
|
|
404
|
+
.awsui_action-stripe_55fkh_19qc8_404:not(#\9) {
|
|
422
405
|
border-collapse: separate;
|
|
423
406
|
border-spacing: 0;
|
|
424
407
|
box-sizing: border-box;
|
|
@@ -456,22 +439,17 @@ body[data-awsui-focus-visible=true] .awsui_button_55fkh_25oqf_346 > .awsui_actio
|
|
|
456
439
|
justify-content: space-between;
|
|
457
440
|
align-items: flex-end;
|
|
458
441
|
}
|
|
459
|
-
|
|
442
|
+
|
|
443
|
+
.awsui_secondary-actions_55fkh_19qc8_443.awsui_with-paddings_55fkh_19qc8_394:not(#\9) {
|
|
460
444
|
padding-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
|
|
461
445
|
padding-block-start: var(--space-scaled-s-8ozaad, 12px);
|
|
462
446
|
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
463
447
|
}
|
|
464
|
-
.awsui_secondary-
|
|
448
|
+
.awsui_secondary-actions_55fkh_19qc8_443.awsui_with-paddings_55fkh_19qc8_394.awsui_invalid_55fkh_19qc8_323:not(#\9), .awsui_secondary-actions_55fkh_19qc8_443.awsui_with-paddings_55fkh_19qc8_394.awsui_warning_55fkh_19qc8_323:not(#\9) {
|
|
465
449
|
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
466
450
|
}
|
|
467
|
-
.awsui_secondary-actions_55fkh_25oqf_421.awsui_with-paddings_55fkh_25oqf_411 > .awsui_button_55fkh_25oqf_346:not(#\9) {
|
|
468
|
-
padding-block-end: 0;
|
|
469
|
-
}
|
|
470
|
-
.awsui_secondary-actions_55fkh_25oqf_421 > .awsui_button_55fkh_25oqf_346:not(#\9) {
|
|
471
|
-
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
472
|
-
}
|
|
473
451
|
|
|
474
|
-
.
|
|
452
|
+
.awsui_buffer_55fkh_19qc8_452:not(#\9) {
|
|
475
453
|
flex: 1;
|
|
476
454
|
align-self: stretch;
|
|
477
455
|
cursor: text;
|
|
@@ -2,20 +2,21 @@
|
|
|
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
|
-
"
|
|
15
|
-
"action-button": "awsui_action-
|
|
16
|
-
"secondary-content": "awsui_secondary-
|
|
17
|
-
"with-paddings": "awsui_with-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
5
|
+
"root": "awsui_root_55fkh_19qc8_146",
|
|
6
|
+
"textarea-readonly": "awsui_textarea-readonly_55fkh_19qc8_185",
|
|
7
|
+
"disabled": "awsui_disabled_55fkh_19qc8_190",
|
|
8
|
+
"textarea-invalid": "awsui_textarea-invalid_55fkh_19qc8_198",
|
|
9
|
+
"textarea-warning": "awsui_textarea-warning_55fkh_19qc8_223",
|
|
10
|
+
"textarea": "awsui_textarea_55fkh_19qc8_185",
|
|
11
|
+
"invalid": "awsui_invalid_55fkh_19qc8_323",
|
|
12
|
+
"warning": "awsui_warning_55fkh_19qc8_323",
|
|
13
|
+
"textarea-wrapper": "awsui_textarea-wrapper_55fkh_19qc8_342",
|
|
14
|
+
"primary-action": "awsui_primary-action_55fkh_19qc8_346",
|
|
15
|
+
"action-button": "awsui_action-button_55fkh_19qc8_354",
|
|
16
|
+
"secondary-content": "awsui_secondary-content_55fkh_19qc8_359",
|
|
17
|
+
"with-paddings": "awsui_with-paddings_55fkh_19qc8_394",
|
|
18
|
+
"action-stripe": "awsui_action-stripe_55fkh_19qc8_404",
|
|
19
|
+
"secondary-actions": "awsui_secondary-actions_55fkh_19qc8_443",
|
|
20
|
+
"buffer": "awsui_buffer_55fkh_19qc8_452"
|
|
20
21
|
};
|
|
21
22
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"textarea": "
|
|
6
|
-
"action-button": "awsui_action-
|
|
7
|
-
"
|
|
8
|
-
"secondary-
|
|
4
|
+
"root": "awsui_root_nr3gs_151v0_5",
|
|
5
|
+
"textarea": "awsui_textarea_nr3gs_151v0_9",
|
|
6
|
+
"action-button": "awsui_action-button_nr3gs_151v0_13",
|
|
7
|
+
"primary-action": "awsui_primary-action_nr3gs_151v0_17",
|
|
8
|
+
"secondary-actions": "awsui_secondary-actions_nr3gs_151v0_21",
|
|
9
|
+
"secondary-content": "awsui_secondary-content_nr3gs_151v0_25"
|
|
9
10
|
};
|
|
10
11
|
|
|
@@ -2,22 +2,26 @@
|
|
|
2
2
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
.
|
|
5
|
+
.awsui_root_nr3gs_151v0_5:not(#\9) {
|
|
6
6
|
/* used in test-utils */
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.
|
|
9
|
+
.awsui_textarea_nr3gs_151v0_9:not(#\9) {
|
|
10
10
|
/* used in test-utils */
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.awsui_action-
|
|
13
|
+
.awsui_action-button_nr3gs_151v0_13:not(#\9) {
|
|
14
14
|
/* used in test-utils */
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
.
|
|
17
|
+
.awsui_primary-action_nr3gs_151v0_17:not(#\9) {
|
|
18
18
|
/* used in test-utils */
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.awsui_secondary-
|
|
21
|
+
.awsui_secondary-actions_nr3gs_151v0_21:not(#\9) {
|
|
22
|
+
/* used in test-utils */
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.awsui_secondary-content_nr3gs_151v0_25:not(#\9) {
|
|
22
26
|
/* used in test-utils */
|
|
23
27
|
}
|
|
@@ -2,10 +2,11 @@
|
|
|
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": "
|
|
7
|
-
"action-button": "awsui_action-
|
|
8
|
-
"
|
|
9
|
-
"secondary-
|
|
5
|
+
"root": "awsui_root_nr3gs_151v0_5",
|
|
6
|
+
"textarea": "awsui_textarea_nr3gs_151v0_9",
|
|
7
|
+
"action-button": "awsui_action-button_nr3gs_151v0_13",
|
|
8
|
+
"primary-action": "awsui_primary-action_nr3gs_151v0_17",
|
|
9
|
+
"secondary-actions": "awsui_secondary-actions_nr3gs_151v0_21",
|
|
10
|
+
"secondary-content": "awsui_secondary-content_nr3gs_151v0_25"
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -2,9 +2,16 @@ import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-
|
|
|
2
2
|
export default class PromptInputWrapper extends ComponentWrapper {
|
|
3
3
|
static rootSelector: string;
|
|
4
4
|
findNativeTextarea(): ElementWrapper<HTMLTextAreaElement>;
|
|
5
|
+
/**
|
|
6
|
+
* Finds the action button. Note that, despite its typings, this may return null.
|
|
7
|
+
*/
|
|
5
8
|
findActionButton(): ElementWrapper<HTMLButtonElement>;
|
|
9
|
+
/**
|
|
10
|
+
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
11
|
+
*/
|
|
6
12
|
findSecondaryActions(): ElementWrapper<HTMLDivElement>;
|
|
7
|
-
findSecondaryContent(): ElementWrapper<HTMLDivElement
|
|
13
|
+
findSecondaryContent(): ElementWrapper<HTMLDivElement> | null;
|
|
14
|
+
findCustomPrimaryAction(): ElementWrapper<HTMLDivElement> | null;
|
|
8
15
|
/**
|
|
9
16
|
* Gets the value of the component.
|
|
10
17
|
*
|
|
@@ -15,15 +15,24 @@ class PromptInputWrapper extends dom_1.ComponentWrapper {
|
|
|
15
15
|
findNativeTextarea() {
|
|
16
16
|
return this.findByClassName(styles_selectors_js_1.default.textarea);
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Finds the action button. Note that, despite its typings, this may return null.
|
|
20
|
+
*/
|
|
18
21
|
findActionButton() {
|
|
19
22
|
return this.findByClassName(styles_selectors_js_1.default['action-button']);
|
|
20
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
26
|
+
*/
|
|
21
27
|
findSecondaryActions() {
|
|
22
28
|
return this.findByClassName(styles_selectors_js_1.default['secondary-actions']);
|
|
23
29
|
}
|
|
24
30
|
findSecondaryContent() {
|
|
25
31
|
return this.findByClassName(styles_selectors_js_1.default['secondary-content']);
|
|
26
32
|
}
|
|
33
|
+
findCustomPrimaryAction() {
|
|
34
|
+
return this.findByClassName(styles_selectors_js_1.default['primary-action']);
|
|
35
|
+
}
|
|
27
36
|
/**
|
|
28
37
|
* Gets the value of the component.
|
|
29
38
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;;;;;;AAEtC,gEAAmG;AACnG,4EAAmF;AAEnF,gGAAoF;AAEpF,MAAqB,kBAAmB,SAAQ,sBAAgB;IAG9D,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAsB,6BAAc,CAAC,QAAQ,CAAE,CAAC;IAC7E,CAAC;IAED,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,eAAe,CAAC,CAAE,CAAC;IACnF,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAiB,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACpF,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAiB,6BAAc,CAAC,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;;;;;;AAEtC,gEAAmG;AACnG,4EAAmF;AAEnF,gGAAoF;AAEpF,MAAqB,kBAAmB,SAAQ,sBAAgB;IAG9D,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAsB,6BAAc,CAAC,QAAQ,CAAE,CAAC;IAC7E,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAoB,6BAAc,CAAC,eAAe,CAAC,CAAE,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAiB,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACpF,CAAC;IAED,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAiB,6BAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACnF,CAAC;IAED,uBAAuB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAiB,6BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChF,CAAC;IAED;;;;OAIG;IACM,gBAAgB;QACvB,OAAO,IAAI,CAAC,kBAAkB,EAAE,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACM,gBAAgB,CAAC,KAAa;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC,UAAU,EAAE,CAAC;QACvD,IAAA,eAAG,EAAC,GAAG,EAAE;YACP,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;YACxE,IAAA,0BAAc,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;YAC/B,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC;;AAjDM,+BAAY,GAAG,6BAAc,CAAC,IAAI,CAAC;AAiCjC;IAAR,aAAO;0DAEP;AAOQ;IAAR,aAAO;0DAOP;AAlDH,qCAmDC"}
|
|
@@ -2,7 +2,14 @@ import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-
|
|
|
2
2
|
export default class PromptInputWrapper extends ComponentWrapper {
|
|
3
3
|
static rootSelector: string;
|
|
4
4
|
findNativeTextarea(): ElementWrapper;
|
|
5
|
+
/**
|
|
6
|
+
* Finds the action button. Note that, despite its typings, this may return null.
|
|
7
|
+
*/
|
|
5
8
|
findActionButton(): ElementWrapper;
|
|
9
|
+
/**
|
|
10
|
+
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
11
|
+
*/
|
|
6
12
|
findSecondaryActions(): ElementWrapper;
|
|
7
13
|
findSecondaryContent(): ElementWrapper;
|
|
14
|
+
findCustomPrimaryAction(): ElementWrapper;
|
|
8
15
|
}
|
|
@@ -8,15 +8,24 @@ class PromptInputWrapper extends selectors_1.ComponentWrapper {
|
|
|
8
8
|
findNativeTextarea() {
|
|
9
9
|
return this.findByClassName(styles_selectors_js_1.default.textarea);
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Finds the action button. Note that, despite its typings, this may return null.
|
|
13
|
+
*/
|
|
11
14
|
findActionButton() {
|
|
12
15
|
return this.findByClassName(styles_selectors_js_1.default['action-button']);
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Finds the secondary actions slot. Note that, despite its typings, this may return null.
|
|
19
|
+
*/
|
|
14
20
|
findSecondaryActions() {
|
|
15
21
|
return this.findByClassName(styles_selectors_js_1.default['secondary-actions']);
|
|
16
22
|
}
|
|
17
23
|
findSecondaryContent() {
|
|
18
24
|
return this.findByClassName(styles_selectors_js_1.default['secondary-content']);
|
|
19
25
|
}
|
|
26
|
+
findCustomPrimaryAction() {
|
|
27
|
+
return this.findByClassName(styles_selectors_js_1.default['primary-action']);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
30
|
exports.default = PromptInputWrapper;
|
|
22
31
|
PromptInputWrapper.rootSelector = styles_selectors_js_1.default.root;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,4EAAgG;AAChG,gGAAoF;AACpF,MAAqB,kBAAmB,SAAQ,4BAAgB;IAE9D,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,QAAQ,CAAE,CAAC;IACxD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/prompt-input/index.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,4EAAgG;AAChG,gGAAoF;AACpF,MAAqB,kBAAmB,SAAQ,4BAAgB;IAE9D,kBAAkB;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,QAAQ,CAAE,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,eAAe,CAAC,CAAE,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mBAAmB,CAAC,CAAE,CAAC;IACpE,CAAC;IACD,oBAAoB;QAClB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,uBAAuB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC,6BAAc,CAAC,gBAAgB,CAAC,CAAC,CAAC;IAChE,CAAC;;AAxBH,qCAqCC;AApCQ,+BAAY,GAAG,6BAAc,CAAC,IAAI,CAAC"}
|
|
File without changes
|