@cloudscape-design/components-themeable 3.0.1150 → 3.0.1152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/input/styles.scss +7 -3
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/internal/styles/forms/mixins.scss +12 -4
- package/lib/internal/scss/radio-group/styles.scss +4 -0
- package/lib/internal/scss/tree-view/vertical-connector/styles.scss +4 -3
- package/lib/internal/template/autosuggest/interfaces.d.ts +48 -0
- package/lib/internal/template/autosuggest/interfaces.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/interfaces.js.map +1 -1
- package/lib/internal/template/autosuggest/internal.d.ts.map +1 -1
- package/lib/internal/template/autosuggest/internal.js +2 -2
- package/lib/internal/template/autosuggest/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +13 -13
- package/lib/internal/template/input/styles.scoped.css +34 -34
- package/lib/internal/template/input/styles.selectors.js +13 -13
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts +2 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +2 -2
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/prompt-input/styles.d.ts +38 -1
- package/lib/internal/template/prompt-input/styles.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/styles.js +1 -2
- package/lib/internal/template/prompt-input/styles.js.map +1 -1
- package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.js +1 -1
- package/lib/internal/template/radio-group/internal.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +6 -5
- package/lib/internal/template/radio-group/styles.scoped.css +10 -6
- package/lib/internal/template/radio-group/styles.selectors.js +6 -5
- package/lib/internal/template/test-utils/dom/radio-group/index.d.ts +1 -0
- package/lib/internal/template/test-utils/dom/radio-group/index.js +5 -3
- package/lib/internal/template/test-utils/dom/radio-group/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/radio-group/index.d.ts +1 -0
- package/lib/internal/template/test-utils/selectors/radio-group/index.js +5 -3
- package/lib/internal/template/test-utils/selectors/radio-group/index.js.map +1 -1
- package/lib/internal/template/tree-view/vertical-connector/styles.css.js +3 -3
- package/lib/internal/template/tree-view/vertical-connector/styles.scoped.css +5 -5
- package/lib/internal/template/tree-view/vertical-connector/styles.selectors.js +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AutosuggestProps } from '../../../autosuggest/interfaces';
|
|
3
|
-
import { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents } from '../../../input/interfaces';
|
|
3
|
+
import { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputClearLabel, InputKeyEvents, InputProps } from '../../../input/interfaces';
|
|
4
4
|
import { BaseComponentProps } from '../../base-component';
|
|
5
5
|
import { FormFieldValidationControlProps } from '../../context/form-field-context';
|
|
6
6
|
import { NonCancelableEventHandler } from '../../events';
|
|
@@ -21,6 +21,7 @@ interface AutosuggestInputProps extends BaseComponentProps, BaseInputProps, Inpu
|
|
|
21
21
|
onPressArrowDown?: () => void;
|
|
22
22
|
onPressArrowUp?: () => void;
|
|
23
23
|
onPressEnter?: () => boolean;
|
|
24
|
+
style?: InputProps['style'];
|
|
24
25
|
}
|
|
25
26
|
interface AutosuggestInputFocusOptions {
|
|
26
27
|
preventDropdown?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAgE,MAAM,OAAO,CAAC;AAGrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,UAAU,EACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAgB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,+BAA+B,EAAuB,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAA8D,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACrH,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAK5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D,UAAU,qBACR,SAAQ,kBAAkB,EACxB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,+BAA+B,EAC/B,gBAAgB,EAChB,0BAA0B;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAClC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAClD,cAAc,CAAC,EAAE,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAC7D,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;CAC7B;AAED,UAAU,4BAA4B;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB,CAAC,GAAG;IAC/D,KAAK,CAAC,OAAO,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IACpD,IAAI,IAAI,IAAI,CAAC;IACb,KAAK,IAAI,IAAI,CAAC;CACf;AAED,QAAA,MAAM,gBAAgB,mGAgRrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -11,7 +11,7 @@ import { nodeBelongs } from '../../utils/node-belongs';
|
|
|
11
11
|
import { processAttributes } from '../../utils/with-native-attributes';
|
|
12
12
|
import Dropdown from '../dropdown';
|
|
13
13
|
import styles from './styles.css.js';
|
|
14
|
-
const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, onKeyUp, onKeyDown, name, placeholder, disabled, readOnly, autoFocus, ariaLabel, ariaRequired, disableBrowserAutocorrect = false, expandToViewport, ariaControls, ariaActivedescendant, clearAriaLabel, dropdownExpanded = true, dropdownContentKey, dropdownContentFocusable = false, dropdownContent = null, dropdownFooter = null, dropdownWidth, loopFocus, nativeInputAttributes, onCloseDropdown, onDelayedInput, onPressArrowDown, onPressArrowUp, onPressEnter, __internalRootRef, ...restProps }, ref) => {
|
|
14
|
+
const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, onKeyUp, onKeyDown, name, placeholder, disabled, readOnly, autoFocus, ariaLabel, ariaRequired, disableBrowserAutocorrect = false, expandToViewport, ariaControls, ariaActivedescendant, clearAriaLabel, dropdownExpanded = true, dropdownContentKey, dropdownContentFocusable = false, dropdownContent = null, dropdownFooter = null, dropdownWidth, loopFocus, nativeInputAttributes, onCloseDropdown, onDelayedInput, onPressArrowDown, onPressArrowUp, onPressEnter, style, __internalRootRef, ...restProps }, ref) => {
|
|
15
15
|
const baseProps = getBaseProps(restProps);
|
|
16
16
|
const formFieldContext = useFormFieldContext(restProps);
|
|
17
17
|
const inputRef = useRef(null);
|
|
@@ -174,7 +174,7 @@ const AutosuggestInput = React.forwardRef(({ value, onChange, onBlur, onFocus, o
|
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
176
|
return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root), ref: __internalRootRef },
|
|
177
|
-
React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, stretchBeyondTriggerWidth: true, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
|
|
177
|
+
React.createElement(Dropdown, { minWidth: dropdownWidth, stretchWidth: !dropdownWidth, stretchBeyondTriggerWidth: true, contentKey: dropdownContentKey, onFocus: handleFocus, onBlur: handleBlur, trigger: React.createElement(InternalInput, { type: "visualSearch", value: value, onChange: event => handleChange(event.detail.value), __onDelayedInput: event => handleDelayedInput(event.detail.value), onKeyDown: handleKeyDown, onKeyUp: onKeyUp, disabled: disabled, disableBrowserAutocorrect: disableBrowserAutocorrect, readOnly: readOnly, ariaRequired: ariaRequired, clearAriaLabel: clearAriaLabel, ref: inputRef, autoComplete: false, nativeInputAttributes: processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest'), __skipNativeAttributesWarnings: Object.keys(nativeAttributes), style: style, ...formFieldContext }), onMouseDown: handleDropdownMouseDown, open: open && (!!dropdownContent || !!dropdownFooter), footer: dropdownFooterRef && (React.createElement("div", { ref: dropdownFooterRef, className: styles['dropdown-footer'], onKeyDown: handleDropdownKeyDown }, open && dropdownFooter ? dropdownFooter : null)), expandToViewport: expandToViewport, loopFocus: loopFocus }, open && dropdownContent ? (React.createElement("div", { ref: dropdownContentRef, className: styles['dropdown-content'] }, dropdownContent)) : null)));
|
|
178
178
|
});
|
|
179
179
|
export default AutosuggestInput;
|
|
180
180
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAUxB,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM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AAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,qBAAqB,IAChG,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAC3C,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IAEnB,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACzB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\nimport Dropdown from '../dropdown';\nimport { ExpandToViewport } from '../dropdown/interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n stretchBeyondTriggerWidth={true}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n nativeInputAttributes={processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest')}\n __skipNativeAttributesWarnings={Object.keys(nativeAttributes)}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n {open && dropdownFooter ? dropdownFooter : null}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/autosuggest-input/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,KAAK,EAAE,EAAO,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,IAAI,MAAM,MAAM,CAAC;AAWxB,OAAO,aAAa,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAsB,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAmC,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACxG,OAAO,EAAiB,mBAAmB,EAAE,sBAAsB,EAA6B,MAAM,c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AAC,EACrD,MAAM,EACJ,iBAAiB,IAAI,CACnB,6BAAK,GAAG,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,iBAAiB,CAAC,EAAE,SAAS,EAAE,qBAAqB,IAChG,IAAI,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAC3C,CACP,EAEH,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,IAEnB,IAAI,IAAI,eAAe,CAAC,CAAC,CAAC,CACzB,6BAAK,GAAG,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,IAChE,eAAe,CACZ,CACP,CAAC,CAAC,CAAC,IAAI,CACC,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { Ref, useEffect, useImperativeHandle, useRef, useState } from 'react';\nimport clsx from 'clsx';\n\nimport { AutosuggestProps } from '../../../autosuggest/interfaces';\nimport {\n BaseChangeDetail,\n BaseInputProps,\n InputAutoCorrect,\n InputClearLabel,\n InputKeyEvents,\n InputProps,\n} from '../../../input/interfaces';\nimport InternalInput from '../../../input/internal';\nimport { BaseComponentProps, getBaseProps } from '../../base-component';\nimport { FormFieldValidationControlProps, useFormFieldContext } from '../../context/form-field-context';\nimport { BaseKeyDetail, fireCancelableEvent, fireNonCancelableEvent, NonCancelableEventHandler } from '../../events';\nimport { InternalBaseComponentProps } from '../../hooks/use-base-component';\nimport { KeyCode } from '../../keycode';\nimport { nodeBelongs } from '../../utils/node-belongs';\nimport { processAttributes } from '../../utils/with-native-attributes';\nimport Dropdown from '../dropdown';\nimport { ExpandToViewport } from '../dropdown/interfaces';\n\nimport styles from './styles.css.js';\n\ninterface AutosuggestInputProps\n extends BaseComponentProps,\n BaseInputProps,\n InputAutoCorrect,\n InputKeyEvents,\n InputClearLabel,\n FormFieldValidationControlProps,\n ExpandToViewport,\n InternalBaseComponentProps {\n ariaControls?: string;\n ariaActivedescendant?: string;\n dropdownExpanded?: boolean;\n dropdownContentKey?: string;\n dropdownContentFocusable?: boolean;\n dropdownContent?: React.ReactNode;\n dropdownFooter?: React.ReactNode;\n dropdownWidth?: number;\n loopFocus?: boolean;\n onCloseDropdown?: NonCancelableEventHandler<null>;\n onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n onPressArrowDown?: () => void;\n onPressArrowUp?: () => void;\n onPressEnter?: () => boolean;\n style?: InputProps['style'];\n}\n\ninterface AutosuggestInputFocusOptions {\n preventDropdown?: boolean;\n}\n\nexport interface AutosuggestInputRef extends AutosuggestProps.Ref {\n focus(options?: AutosuggestInputFocusOptions): void;\n open(): void;\n close(): void;\n}\n\nconst AutosuggestInput = React.forwardRef(\n (\n {\n value,\n onChange,\n onBlur,\n onFocus,\n onKeyUp,\n onKeyDown,\n name,\n placeholder,\n disabled,\n readOnly,\n autoFocus,\n ariaLabel,\n ariaRequired,\n disableBrowserAutocorrect = false,\n expandToViewport,\n ariaControls,\n ariaActivedescendant,\n clearAriaLabel,\n dropdownExpanded = true,\n dropdownContentKey,\n dropdownContentFocusable = false,\n dropdownContent = null,\n dropdownFooter = null,\n dropdownWidth,\n loopFocus,\n nativeInputAttributes,\n onCloseDropdown,\n onDelayedInput,\n onPressArrowDown,\n onPressArrowUp,\n onPressEnter,\n style,\n __internalRootRef,\n ...restProps\n }: AutosuggestInputProps,\n ref: Ref<AutosuggestInputRef>\n ) => {\n const baseProps = getBaseProps(restProps);\n const formFieldContext = useFormFieldContext(restProps);\n\n const inputRef = useRef<HTMLInputElement>(null);\n const dropdownContentRef = useRef<HTMLDivElement>(null);\n const dropdownFooterRef = useRef<HTMLDivElement>(null);\n const preventOpenOnFocusRef = useRef(false);\n const preventCloseOnBlurRef = useRef(false);\n\n const [open, setOpen] = useState(false);\n\n const openDropdown = () => !readOnly && setOpen(true);\n\n const closeDropdown = () => {\n setOpen(false);\n fireNonCancelableEvent(onCloseDropdown, null);\n };\n\n useImperativeHandle(ref, () => ({\n focus(options?: AutosuggestInputFocusOptions) {\n if (options?.preventDropdown) {\n preventOpenOnFocusRef.current = true;\n }\n inputRef.current?.focus();\n },\n select() {\n inputRef.current?.select();\n },\n open: openDropdown,\n close: closeDropdown,\n }));\n\n const handleBlur = () => {\n if (!preventCloseOnBlurRef.current) {\n closeDropdown();\n fireNonCancelableEvent(onBlur, null);\n }\n };\n\n const handleFocus = () => {\n if (!preventOpenOnFocusRef.current) {\n openDropdown();\n fireNonCancelableEvent(onFocus, null);\n }\n preventOpenOnFocusRef.current = false;\n };\n\n const fireKeydown = (event: CustomEvent<BaseKeyDetail>) => fireCancelableEvent(onKeyDown, event.detail, event);\n\n // Shared ESC key handler logic for both input and dropdown elements\n // When returnFocus is true (from dropdown elements), focus returns to input after closing\n const handleEscapeKey = (returnFocus: boolean) => {\n if (open) {\n closeDropdown();\n if (returnFocus) {\n // Return focus to input when closing from dropdown elements (e.g., recovery button)\n inputRef.current?.focus();\n }\n } else if (value) {\n fireNonCancelableEvent(onChange, { value: '' });\n }\n };\n\n const handleKeyDown = (event: CustomEvent<BaseKeyDetail>) => {\n switch (event.detail.keyCode) {\n case KeyCode.down: {\n onPressArrowDown?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.up: {\n onPressArrowUp?.();\n openDropdown();\n event.preventDefault();\n break;\n }\n case KeyCode.enter: {\n if (open) {\n if (!onPressEnter?.()) {\n closeDropdown();\n }\n event.preventDefault();\n }\n fireKeydown(event);\n break;\n }\n case KeyCode.escape: {\n // Use shared ESC handler, without focus restoration since ESC came from input\n handleEscapeKey(false);\n if (open || value) {\n event.stopPropagation();\n }\n event.preventDefault();\n fireKeydown(event);\n break;\n }\n default: {\n fireKeydown(event);\n }\n }\n };\n\n const handleChange = (value: string) => {\n openDropdown();\n fireNonCancelableEvent(onChange, { value });\n };\n\n const handleDelayedInput = (value: string) => {\n fireNonCancelableEvent(onDelayedInput, { value });\n };\n\n const handleDropdownMouseDown: React.MouseEventHandler = event => {\n // Prevent currently focused element from losing focus.\n if (!dropdownContentFocusable) {\n event.preventDefault();\n }\n // Prevent closing dropdown on click inside.\n else {\n preventCloseOnBlurRef.current = true;\n requestAnimationFrame(() => {\n preventCloseOnBlurRef.current = false;\n });\n }\n };\n\n const expanded = open && dropdownExpanded;\n const nativeAttributes: BaseInputProps['nativeInputAttributes'] = {\n name,\n placeholder,\n autoFocus,\n onClick: openDropdown,\n role: 'combobox',\n 'aria-autocomplete': 'list',\n 'aria-expanded': expanded,\n 'aria-controls': open ? ariaControls : undefined,\n // 'aria-owns' needed for safari+vo to announce activedescendant content\n 'aria-owns': open ? ariaControls : undefined,\n 'aria-label': ariaLabel,\n 'aria-activedescendant': ariaActivedescendant,\n };\n\n // Closes dropdown when outside click is detected.\n // Similar to the internal dropdown implementation but includes the target as well.\n useEffect(() => {\n if (!open) {\n return;\n }\n\n const clickListener = (event: MouseEvent) => {\n if (\n !nodeBelongs(inputRef.current, event.target) &&\n !nodeBelongs(dropdownContentRef.current, event.target) &&\n !nodeBelongs(dropdownFooterRef.current, event.target)\n ) {\n closeDropdown();\n }\n };\n\n window.addEventListener('mousedown', clickListener);\n\n return () => {\n window.removeEventListener('mousedown', clickListener);\n };\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n const handleDropdownKeyDown: React.KeyboardEventHandler = event => {\n // Handle ESC key from focusable elements inside the dropdown (e.g., recovery button)\n // but NOT from the input itself (that's handled by handleKeyDown)\n const isFromInput = event.target === inputRef.current || nodeBelongs(inputRef.current, event.target);\n\n if (event.key === 'Escape' && !isFromInput) {\n event.stopPropagation();\n event.preventDefault();\n // Use shared ESC handler with focus restoration since ESC came from dropdown element\n handleEscapeKey(true);\n }\n };\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <Dropdown\n minWidth={dropdownWidth}\n stretchWidth={!dropdownWidth}\n stretchBeyondTriggerWidth={true}\n contentKey={dropdownContentKey}\n onFocus={handleFocus}\n onBlur={handleBlur}\n trigger={\n <InternalInput\n type=\"visualSearch\"\n value={value}\n onChange={event => handleChange(event.detail.value)}\n __onDelayedInput={event => handleDelayedInput(event.detail.value)}\n onKeyDown={handleKeyDown}\n onKeyUp={onKeyUp}\n disabled={disabled}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n readOnly={readOnly}\n ariaRequired={ariaRequired}\n clearAriaLabel={clearAriaLabel}\n ref={inputRef}\n autoComplete={false}\n nativeInputAttributes={processAttributes(nativeAttributes, nativeInputAttributes, 'Autosuggest')}\n __skipNativeAttributesWarnings={Object.keys(nativeAttributes)}\n style={style}\n {...formFieldContext}\n />\n }\n onMouseDown={handleDropdownMouseDown}\n open={open && (!!dropdownContent || !!dropdownFooter)}\n footer={\n dropdownFooterRef && (\n <div ref={dropdownFooterRef} className={styles['dropdown-footer']} onKeyDown={handleDropdownKeyDown}>\n {open && dropdownFooter ? dropdownFooter : null}\n </div>\n )\n }\n expandToViewport={expandToViewport}\n loopFocus={loopFocus}\n >\n {open && dropdownContent ? (\n <div ref={dropdownContentRef} className={styles['dropdown-content']}>\n {dropdownContent}\n </div>\n ) : null}\n </Dropdown>\n </div>\n );\n }\n);\n\nexport default AutosuggestInput;\n"]}
|
|
@@ -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 (0c4c33e5)";
|
|
3
|
+
export var GIT_SHA = "0c4c33e5";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -1,5 +1,42 @@
|
|
|
1
|
+
import customCssProps from '../internal/generated/custom-css-properties';
|
|
1
2
|
import { PromptInputProps } from './interfaces';
|
|
2
3
|
export declare function getPromptInputStyles(style: PromptInputProps['style']): {
|
|
3
|
-
|
|
4
|
+
borderRadius?: undefined;
|
|
5
|
+
borderWidth?: undefined;
|
|
6
|
+
fontSize?: undefined;
|
|
7
|
+
fontWeight?: undefined;
|
|
8
|
+
paddingBlock?: undefined;
|
|
9
|
+
paddingInline?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
[customCssProps.promptInputStyleBackgroundDefault]: string | undefined;
|
|
12
|
+
[customCssProps.promptInputStyleBackgroundDisabled]: string | undefined;
|
|
13
|
+
[customCssProps.promptInputStyleBackgroundHover]: string | undefined;
|
|
14
|
+
[customCssProps.promptInputStyleBackgroundFocus]: string | undefined;
|
|
15
|
+
[customCssProps.promptInputStyleBackgroundReadonly]: string | undefined;
|
|
16
|
+
[customCssProps.promptInputStyleBorderColorDefault]: string | undefined;
|
|
17
|
+
[customCssProps.promptInputStyleBorderColorDisabled]: string | undefined;
|
|
18
|
+
[customCssProps.promptInputStyleBorderColorHover]: string | undefined;
|
|
19
|
+
[customCssProps.promptInputStyleBorderColorFocus]: string | undefined;
|
|
20
|
+
[customCssProps.promptInputStyleBorderColorReadonly]: string | undefined;
|
|
21
|
+
[customCssProps.promptInputStyleBoxShadowDefault]: string | undefined;
|
|
22
|
+
[customCssProps.promptInputStyleBoxShadowDisabled]: string | undefined;
|
|
23
|
+
[customCssProps.promptInputStyleBoxShadowHover]: string | undefined;
|
|
24
|
+
[customCssProps.promptInputStyleBoxShadowFocus]: string | undefined;
|
|
25
|
+
[customCssProps.promptInputStyleBoxShadowReadonly]: string | undefined;
|
|
26
|
+
[customCssProps.promptInputStyleColorDefault]: string | undefined;
|
|
27
|
+
[customCssProps.promptInputStyleColorDisabled]: string | undefined;
|
|
28
|
+
[customCssProps.promptInputStyleColorHover]: string | undefined;
|
|
29
|
+
[customCssProps.promptInputStyleColorFocus]: string | undefined;
|
|
30
|
+
[customCssProps.promptInputStyleColorReadonly]: string | undefined;
|
|
31
|
+
[customCssProps.promptInputStylePlaceholderColor]: string | undefined;
|
|
32
|
+
[customCssProps.promptInputStylePlaceholderFontSize]: string | undefined;
|
|
33
|
+
[customCssProps.promptInputStylePlaceholderFontWeight]: string | undefined;
|
|
34
|
+
[customCssProps.promptInputStylePlaceholderFontStyle]: string | undefined;
|
|
35
|
+
borderRadius: string | undefined;
|
|
36
|
+
borderWidth: string | undefined;
|
|
37
|
+
fontSize: string | undefined;
|
|
38
|
+
fontWeight: string | undefined;
|
|
39
|
+
paddingBlock: string | undefined;
|
|
40
|
+
paddingInline: string | undefined;
|
|
4
41
|
};
|
|
5
42
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/styles.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/prompt-input/styles.tsx"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,6CAA6C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC;;;;;;;;IAYjE,CAAC,cAAc,CAAC,iCAAiC,CAAC,qBAAuC;IACzF,CAAC,cAAc,CAAC,kCAAkC,CAAC,qBAAwC;IAC3F,CAAC,cAAc,CAAC,+BAA+B,CAAC,qBAAqC;IACrF,CAAC,cAAc,CAAC,+BAA+B,CAAC,qBAAqC;IACrF,CAAC,cAAc,CAAC,kCAAkC,CAAC,qBAAwC;IAC3F,CAAC,cAAc,CAAC,kCAAkC,CAAC,qBAAmC;IACtF,CAAC,cAAc,CAAC,mCAAmC,CAAC,qBAAoC;IACxF,CAAC,cAAc,CAAC,gCAAgC,CAAC,qBAAiC;IAClF,CAAC,cAAc,CAAC,gCAAgC,CAAC,qBAAiC;IAClF,CAAC,cAAc,CAAC,mCAAmC,CAAC,qBAAoC;IACxF,CAAC,cAAc,CAAC,gCAAgC,CAAC,qBAAiC;IAClF,CAAC,cAAc,CAAC,iCAAiC,CAAC,qBAAkC;IACpF,CAAC,cAAc,CAAC,8BAA8B,CAAC,qBAA+B;IAC9E,CAAC,cAAc,CAAC,8BAA8B,CAAC,qBAA+B;IAC9E,CAAC,cAAc,CAAC,iCAAiC,CAAC,qBAAkC;IACpF,CAAC,cAAc,CAAC,4BAA4B,CAAC,qBAA6B;IAC1E,CAAC,cAAc,CAAC,6BAA6B,CAAC,qBAA8B;IAC5E,CAAC,cAAc,CAAC,0BAA0B,CAAC,qBAA2B;IACtE,CAAC,cAAc,CAAC,0BAA0B,CAAC,qBAA2B;IACtE,CAAC,cAAc,CAAC,6BAA6B,CAAC,qBAA8B;IAC5E,CAAC,cAAc,CAAC,gCAAgC,CAAC,qBAA2B;IAC5E,CAAC,cAAc,CAAC,mCAAmC,CAAC,qBAA8B;IAClF,CAAC,cAAc,CAAC,qCAAqC,CAAC,qBAAgC;IACtF,CAAC,cAAc,CAAC,oCAAoC,CAAC,qBAA+B;;;;;;;EAEvF"}
|
|
@@ -7,7 +7,7 @@ export function getPromptInputStyles(style) {
|
|
|
7
7
|
if (SYSTEM !== 'core') {
|
|
8
8
|
return {};
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
return {
|
|
11
11
|
borderRadius: (_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius,
|
|
12
12
|
borderWidth: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderWidth,
|
|
13
13
|
fontSize: (_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.fontSize,
|
|
@@ -39,6 +39,5 @@ export function getPromptInputStyles(style) {
|
|
|
39
39
|
[customCssProps.promptInputStylePlaceholderFontWeight]: (_24 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _24 === void 0 ? void 0 : _24.fontWeight,
|
|
40
40
|
[customCssProps.promptInputStylePlaceholderFontStyle]: (_25 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _25 === void 0 ? void 0 : _25.fontStyle,
|
|
41
41
|
};
|
|
42
|
-
return Object.fromEntries(Object.entries(properties).filter(([, value]) => value !== undefined));
|
|
43
42
|
}
|
|
44
43
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/prompt-input/styles.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,oBAAoB,CAAC,KAAgC;;IACnE,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/prompt-input/styles.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,cAAc,MAAM,6CAA6C,CAAC;AAGzE,MAAM,UAAU,oBAAoB,CAAC,KAAgC;;IACnE,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO;QACL,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY;QACvC,WAAW,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,WAAW;QACrC,QAAQ,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,QAAQ;QAC/B,UAAU,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,I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AAK;QACtE,CAAC,cAAc,CAAC,0BAA0B,CAAC,EAAE,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,4CAAE,KAAK,4CAAE,KAAK;QACtE,CAAC,cAAc,CAAC,6BAA6B,CAAC,EAAE,OAAA,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,4CAAE,KAAK,4CAAE,QAAQ;QAC5E,CAAC,cAAc,CAAC,gCAAgC,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,KAAK;QAC5E,CAAC,cAAc,CAAC,mCAAmC,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,QAAQ;QAClF,CAAC,cAAc,CAAC,qCAAqC,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,UAAU;QACtF,CAAC,cAAc,CAAC,oCAAoC,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,SAAS;KACrF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport customCssProps from '../internal/generated/custom-css-properties';\nimport { PromptInputProps } from './interfaces';\n\nexport function getPromptInputStyles(style: PromptInputProps['style']) {\n if (SYSTEM !== 'core') {\n return {};\n }\n\n return {\n borderRadius: style?.root?.borderRadius,\n borderWidth: style?.root?.borderWidth,\n fontSize: style?.root?.fontSize,\n fontWeight: style?.root?.fontWeight,\n paddingBlock: style?.root?.paddingBlock,\n paddingInline: style?.root?.paddingInline,\n [customCssProps.promptInputStyleBackgroundDefault]: style?.root?.backgroundColor?.default,\n [customCssProps.promptInputStyleBackgroundDisabled]: style?.root?.backgroundColor?.disabled,\n [customCssProps.promptInputStyleBackgroundHover]: style?.root?.backgroundColor?.hover,\n [customCssProps.promptInputStyleBackgroundFocus]: style?.root?.backgroundColor?.focus,\n [customCssProps.promptInputStyleBackgroundReadonly]: style?.root?.backgroundColor?.readonly,\n [customCssProps.promptInputStyleBorderColorDefault]: style?.root?.borderColor?.default,\n [customCssProps.promptInputStyleBorderColorDisabled]: style?.root?.borderColor?.disabled,\n [customCssProps.promptInputStyleBorderColorHover]: style?.root?.borderColor?.hover,\n [customCssProps.promptInputStyleBorderColorFocus]: style?.root?.borderColor?.focus,\n [customCssProps.promptInputStyleBorderColorReadonly]: style?.root?.borderColor?.readonly,\n [customCssProps.promptInputStyleBoxShadowDefault]: style?.root?.boxShadow?.default,\n [customCssProps.promptInputStyleBoxShadowDisabled]: style?.root?.boxShadow?.disabled,\n [customCssProps.promptInputStyleBoxShadowHover]: style?.root?.boxShadow?.hover,\n [customCssProps.promptInputStyleBoxShadowFocus]: style?.root?.boxShadow?.focus,\n [customCssProps.promptInputStyleBoxShadowReadonly]: style?.root?.boxShadow?.readonly,\n [customCssProps.promptInputStyleColorDefault]: style?.root?.color?.default,\n [customCssProps.promptInputStyleColorDisabled]: style?.root?.color?.disabled,\n [customCssProps.promptInputStyleColorHover]: style?.root?.color?.hover,\n [customCssProps.promptInputStyleColorFocus]: style?.root?.color?.focus,\n [customCssProps.promptInputStyleColorReadonly]: style?.root?.color?.readonly,\n [customCssProps.promptInputStylePlaceholderColor]: style?.placeholder?.color,\n [customCssProps.promptInputStylePlaceholderFontSize]: style?.placeholder?.fontSize,\n [customCssProps.promptInputStylePlaceholderFontWeight]: style?.placeholder?.fontWeight,\n [customCssProps.promptInputStylePlaceholderFontStyle]: style?.placeholder?.fontStyle,\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,QAAA,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,QAAA,MAAM,kBAAkB,0HAgFvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -17,7 +17,7 @@ const InternalRadioGroup = React.forwardRef(({ name, value, items, ariaLabel, ar
|
|
|
17
17
|
const baseProps = getBaseProps(props);
|
|
18
18
|
const generatedName = useUniqueId('awsui-radio-');
|
|
19
19
|
const [radioButtonRef, radioButtonRefIndex] = useRadioGroupForwardFocus(ref, items, value);
|
|
20
|
-
return (React.createElement("div", { role: "radiogroup", "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired, "aria-controls": ariaControls, "aria-readonly": readOnly ? 'true' : undefined, ...baseProps, className: clsx(baseProps.className, testUtilStyles.root, styles['radio-group'], direction === 'horizontal' && styles['horizontal-group']), ref: __internalRootRef }, items &&
|
|
20
|
+
return (React.createElement("div", { role: "radiogroup", "aria-labelledby": ariaLabelledby, "aria-label": ariaLabel, "aria-describedby": ariaDescribedby, "aria-required": ariaRequired, "aria-controls": ariaControls, "aria-readonly": readOnly ? 'true' : undefined, ...baseProps, className: clsx(baseProps.className, testUtilStyles.root, styles.root, styles['radio-group'], direction === 'horizontal' && styles['horizontal-group']), ref: __internalRootRef }, items &&
|
|
21
21
|
items.map((item, index) => (React.createElement(RadioButton, { key: item.value, ref: index === radioButtonRefIndex ? radioButtonRef : undefined, className: clsx(styles.radio, item.description && styles['radio--has-description'], direction === 'horizontal' && styles.horizontal, item.value === value && analyticsSelectors.selected), checked: item.value === value, name: name || generatedName, value: item.value, description: item.description, disabled: item.disabled, onSelect: () => fireNonCancelableEvent(onChange, { value: item.value }), controlId: item.controlId, readOnly: readOnly, style: style, ...getAnalyticsMetadataAttribute(!item.disabled && !readOnly
|
|
22
22
|
? {
|
|
23
23
|
detail: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,yBAAyB,MAAM,6CAA6C,CAAC;AAKpF,OAAO,kBAAkB,MAAM,oCAAoC,CAAC;AACpE,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAI1D,MAAM,kBAAkB,GAAG,KAAK,CAAC,UAAU,CACzC,CACE,EACE,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACgB,EAC1B,GAAmC,EACnC,EAAE;IACF,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACvE,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,C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AAC,QAAQ,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,EACvE,SAAS,EAAE,IAAI,CAAC,SAAS,EACzB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,KACR,6BAA6B,CAC/B,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ;gBACzB,CAAC,CAAC;oBACE,MAAM,EAAE;wBACN,QAAQ,EAAE,GAAG,KAAK,GAAG,CAAC,EAAE;wBACxB,KAAK,EAAE,IAAI,CAAC,KAAK;qBAC+C;iBACnE;gBACH,CAAC,CAAC,EAAE,CACP,IAEA,IAAI,CAAC,KAAK,CACC,CACf,CAAC,CACA,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getBaseProps } from '../internal/base-component';\nimport RadioButton from '../internal/components/radio-button';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useRadioGroupForwardFocus from '../internal/hooks/forward-focus/radio-group';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { GeneratedAnalyticsMetadataRadioGroupSelect } from './analytics-metadata/interfaces';\nimport { RadioGroupProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\ntype InternalRadioGroupProps = RadioGroupProps & InternalBaseComponentProps;\n\nconst InternalRadioGroup = React.forwardRef(\n (\n {\n name,\n value,\n items,\n ariaLabel,\n ariaRequired,\n ariaControls,\n onChange,\n readOnly,\n __internalRootRef,\n style,\n direction,\n ...props\n }: InternalRadioGroupProps,\n ref: React.Ref<RadioGroupProps.Ref>\n ) => {\n const { ariaDescribedby, ariaLabelledby } = useFormFieldContext(props);\n const baseProps = getBaseProps(props);\n const generatedName = useUniqueId('awsui-radio-');\n\n const [radioButtonRef, radioButtonRefIndex] = useRadioGroupForwardFocus(ref, items, value);\n\n return (\n <div\n role=\"radiogroup\"\n aria-labelledby={ariaLabelledby}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-required={ariaRequired}\n aria-controls={ariaControls}\n aria-readonly={readOnly ? 'true' : undefined}\n {...baseProps}\n className={clsx(\n baseProps.className,\n testUtilStyles.root,\n styles['radio-group'],\n direction === 'horizontal' && styles['horizontal-group']\n )}\n ref={__internalRootRef}\n >\n {items &&\n items.map((item, index) => (\n <RadioButton\n key={item.value}\n ref={index === radioButtonRefIndex ? radioButtonRef : undefined}\n className={clsx(\n styles.radio,\n item.description && styles['radio--has-description'],\n direction === 'horizontal' && styles.horizontal,\n item.value === value && analyticsSelectors.selected\n )}\n checked={item.value === value}\n name={name || generatedName}\n value={item.value}\n description={item.description}\n disabled={item.disabled}\n onSelect={() => fireNonCancelableEvent(onChange, { value: item.value })}\n controlId={item.controlId}\n readOnly={readOnly}\n style={style}\n {...getAnalyticsMetadataAttribute(\n !item.disabled && !readOnly\n ? {\n detail: {\n position: `${index + 1}`,\n value: item.value,\n } as Partial<GeneratedAnalyticsMetadataRadioGroupSelect['detail']>,\n }\n : {}\n )}\n >\n {item.label}\n </RadioButton>\n ))}\n </div>\n );\n }\n);\n\nexport default InternalRadioGroup;\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/radio-group/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,O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,CAAC,CACF,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getBaseProps } from '../internal/base-component';\nimport RadioButton from '../internal/components/radio-button';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useRadioGroupForwardFocus from '../internal/hooks/forward-focus/radio-group';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { GeneratedAnalyticsMetadataRadioGroupSelect } from './analytics-metadata/interfaces';\nimport { RadioGroupProps } from './interfaces';\n\nimport analyticsSelectors from './analytics-metadata/styles.css.js';\nimport styles from './styles.css.js';\nimport testUtilStyles from './test-classes/styles.css.js';\n\ntype InternalRadioGroupProps = RadioGroupProps & InternalBaseComponentProps;\n\nconst InternalRadioGroup = React.forwardRef(\n (\n {\n name,\n value,\n items,\n ariaLabel,\n ariaRequired,\n ariaControls,\n onChange,\n readOnly,\n __internalRootRef,\n style,\n direction,\n ...props\n }: InternalRadioGroupProps,\n ref: React.Ref<RadioGroupProps.Ref>\n ) => {\n const { ariaDescribedby, ariaLabelledby } = useFormFieldContext(props);\n const baseProps = getBaseProps(props);\n const generatedName = useUniqueId('awsui-radio-');\n\n const [radioButtonRef, radioButtonRefIndex] = useRadioGroupForwardFocus(ref, items, value);\n\n return (\n <div\n role=\"radiogroup\"\n aria-labelledby={ariaLabelledby}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n aria-required={ariaRequired}\n aria-controls={ariaControls}\n aria-readonly={readOnly ? 'true' : undefined}\n {...baseProps}\n className={clsx(\n baseProps.className,\n testUtilStyles.root,\n styles.root,\n styles['radio-group'],\n direction === 'horizontal' && styles['horizontal-group']\n )}\n ref={__internalRootRef}\n >\n {items &&\n items.map((item, index) => (\n <RadioButton\n key={item.value}\n ref={index === radioButtonRefIndex ? radioButtonRef : undefined}\n className={clsx(\n styles.radio,\n item.description && styles['radio--has-description'],\n direction === 'horizontal' && styles.horizontal,\n item.value === value && analyticsSelectors.selected\n )}\n checked={item.value === value}\n name={name || generatedName}\n value={item.value}\n description={item.description}\n disabled={item.disabled}\n onSelect={() => fireNonCancelableEvent(onChange, { value: item.value })}\n controlId={item.controlId}\n readOnly={readOnly}\n style={style}\n {...getAnalyticsMetadataAttribute(\n !item.disabled && !readOnly\n ? {\n detail: {\n position: `${index + 1}`,\n value: item.value,\n } as Partial<GeneratedAnalyticsMetadataRadioGroupSelect['detail']>,\n }\n : {}\n )}\n >\n {item.label}\n </RadioButton>\n ))}\n </div>\n );\n }\n);\n\nexport default InternalRadioGroup;\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
4
|
+
"root": "awsui_root_1mabk_3hsov_145",
|
|
5
|
+
"radio-group": "awsui_radio-group_1mabk_3hsov_149",
|
|
6
|
+
"horizontal-group": "awsui_horizontal-group_1mabk_3hsov_180",
|
|
7
|
+
"radio": "awsui_radio_1mabk_3hsov_149",
|
|
8
|
+
"horizontal": "awsui_horizontal_1mabk_3hsov_180",
|
|
9
|
+
"radio--has-description": "awsui_radio--has-description_1mabk_3hsov_194"
|
|
9
10
|
};
|
|
10
11
|
|
|
@@ -142,7 +142,11 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_1mabk_3hsov_145:not(#\9) {
|
|
146
|
+
/* used for backwards-compatibility with older versions of test-utils */
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.awsui_radio-group_1mabk_3hsov_149:not(#\9) {
|
|
146
150
|
border-collapse: separate;
|
|
147
151
|
border-spacing: 0;
|
|
148
152
|
box-sizing: border-box;
|
|
@@ -173,24 +177,24 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
173
177
|
-webkit-font-smoothing: auto;
|
|
174
178
|
-moz-osx-font-smoothing: auto;
|
|
175
179
|
}
|
|
176
|
-
.awsui_radio-
|
|
180
|
+
.awsui_radio-group_1mabk_3hsov_149:not(#\9):not(.awsui_horizontal-group_1mabk_3hsov_180) {
|
|
177
181
|
display: block;
|
|
178
182
|
}
|
|
179
|
-
.awsui_radio-
|
|
183
|
+
.awsui_radio-group_1mabk_3hsov_149.awsui_horizontal-group_1mabk_3hsov_180:not(#\9) {
|
|
180
184
|
display: flex;
|
|
181
185
|
align-items: flex-start;
|
|
182
186
|
flex-wrap: wrap;
|
|
183
187
|
gap: var(--space-scaled-l-66n9sr, 20px);
|
|
184
188
|
}
|
|
185
189
|
|
|
186
|
-
.
|
|
190
|
+
.awsui_radio_1mabk_3hsov_149 + .awsui_radio_1mabk_3hsov_149:not(#\9):not(.awsui_horizontal_1mabk_3hsov_180) {
|
|
187
191
|
margin-block-start: var(--space-scaled-xxs-jatbiv, 4px);
|
|
188
192
|
}
|
|
189
193
|
|
|
190
|
-
.awsui_radio--has-
|
|
194
|
+
.awsui_radio--has-description_1mabk_3hsov_194 + .awsui_radio_1mabk_3hsov_149:not(#\9):not(.awsui_horizontal_1mabk_3hsov_180) {
|
|
191
195
|
margin-block-start: var(--space-scaled-xs-sppte9, 8px);
|
|
192
196
|
}
|
|
193
197
|
|
|
194
|
-
.
|
|
198
|
+
.awsui_radio_1mabk_3hsov_149.awsui_horizontal_1mabk_3hsov_180:not(#\9) {
|
|
195
199
|
max-inline-size: calc(16 * var(--space-scaled-xxl-9ur2is, 32px));
|
|
196
200
|
}
|
|
@@ -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
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
5
|
+
"root": "awsui_root_1mabk_3hsov_145",
|
|
6
|
+
"radio-group": "awsui_radio-group_1mabk_3hsov_149",
|
|
7
|
+
"horizontal-group": "awsui_horizontal-group_1mabk_3hsov_180",
|
|
8
|
+
"radio": "awsui_radio_1mabk_3hsov_149",
|
|
9
|
+
"horizontal": "awsui_horizontal_1mabk_3hsov_180",
|
|
10
|
+
"radio--has-description": "awsui_radio--has-description_1mabk_3hsov_194"
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -2,6 +2,7 @@ import { ComponentWrapper, ElementWrapper } from '@cloudscape-design/test-utils-
|
|
|
2
2
|
import RadioButtonWrapper from '../radio-button';
|
|
3
3
|
export default class RadioGroupWrapper extends ComponentWrapper {
|
|
4
4
|
static rootSelector: string;
|
|
5
|
+
static legacyRootSelector: string;
|
|
5
6
|
findButtons(): Array<RadioButtonWrapper>;
|
|
6
7
|
findInputByValue(value: string): ElementWrapper<HTMLInputElement> | null;
|
|
7
8
|
}
|
|
@@ -6,16 +6,18 @@ const dom_1 = require("@cloudscape-design/test-utils-core/dom");
|
|
|
6
6
|
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
7
7
|
const radio_button_1 = require("../radio-button");
|
|
8
8
|
const styles_selectors_js_1 = require("../../../internal/components/radio-button/test-classes/styles.selectors.js");
|
|
9
|
-
const styles_selectors_js_2 = require("../../../radio-group/
|
|
9
|
+
const styles_selectors_js_2 = require("../../../radio-group/styles.selectors.js");
|
|
10
|
+
const styles_selectors_js_3 = require("../../../radio-group/test-classes/styles.selectors.js");
|
|
10
11
|
class RadioGroupWrapper extends dom_1.ComponentWrapper {
|
|
11
12
|
findButtons() {
|
|
12
|
-
return this.
|
|
13
|
+
return this.findAll(`:is(.${styles_selectors_js_1.default.root}, .${styles_selectors_js_2.default.radio})`).map(r => new radio_button_1.default(r.getElement()));
|
|
13
14
|
}
|
|
14
15
|
findInputByValue(value) {
|
|
15
16
|
const safeValue = (0, utils_1.escapeSelector)(value);
|
|
16
17
|
return this.find(`input[value="${safeValue}"]`);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
RadioGroupWrapper.rootSelector =
|
|
20
|
+
RadioGroupWrapper.rootSelector = styles_selectors_js_3.default.root;
|
|
21
|
+
RadioGroupWrapper.legacyRootSelector = styles_selectors_js_2.default.root;
|
|
20
22
|
exports.default = RadioGroupWrapper;
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/radio-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,oEAA0E;AAE1E,kDAAiD;AAEjD,oHAA2G;AAC3G,+FAA2E;AAE3E,MAAqB,iBAAkB,SAAQ,sBAAgB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/dom/radio-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,gEAA0F;AAC1F,oEAA0E;AAE1E,kDAAiD;AAEjD,oHAA2G;AAC3G,kFAAoE;AACpE,+FAA2E;AAE3E,MAAqB,iBAAkB,SAAQ,sBAAgB;IAI7D,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,6BAAiB,CAAC,IAAI,MAAM,6BAAY,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAChF,CAAC,CAAC,EAAE,CAAC,IAAI,sBAAkB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAC5C,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,KAAa;QAC5B,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC,KAAK,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,IAAI,CAAC,CAAC;IAClD,CAAC;;AAZM,8BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC;AACnC,oCAAkB,GAAW,6BAAY,CAAC,IAAI,CAAC;kBAFnC,iBAAiB"}
|
|
@@ -2,6 +2,7 @@ import { ComponentWrapper, ElementWrapper } from "@cloudscape-design/test-utils-
|
|
|
2
2
|
import RadioButtonWrapper from '../radio-button';
|
|
3
3
|
export default class RadioGroupWrapper extends ComponentWrapper {
|
|
4
4
|
static rootSelector: string;
|
|
5
|
+
static legacyRootSelector: string;
|
|
5
6
|
findButtons(): import("@cloudscape-design/test-utils-core/selectors").MultiElementWrapper<RadioButtonWrapper>;
|
|
6
7
|
findInputByValue(value: string): ElementWrapper;
|
|
7
8
|
}
|
|
@@ -6,16 +6,18 @@ const selectors_1 = require("@cloudscape-design/test-utils-core/selectors");
|
|
|
6
6
|
const utils_1 = require("@cloudscape-design/test-utils-core/utils");
|
|
7
7
|
const radio_button_1 = require("../radio-button");
|
|
8
8
|
const styles_selectors_js_1 = require("../../../internal/components/radio-button/test-classes/styles.selectors.js");
|
|
9
|
-
const styles_selectors_js_2 = require("../../../radio-group/
|
|
9
|
+
const styles_selectors_js_2 = require("../../../radio-group/styles.selectors.js");
|
|
10
|
+
const styles_selectors_js_3 = require("../../../radio-group/test-classes/styles.selectors.js");
|
|
10
11
|
class RadioGroupWrapper extends selectors_1.ComponentWrapper {
|
|
11
12
|
findButtons() {
|
|
12
|
-
return this.
|
|
13
|
+
return this.findAll(`:is(.${styles_selectors_js_1.default.root}, .${styles_selectors_js_2.default.radio})`).map(r => new radio_button_1.default(r.getElement()));
|
|
13
14
|
}
|
|
14
15
|
findInputByValue(value) {
|
|
15
16
|
const safeValue = (0, utils_1.escapeSelector)(value);
|
|
16
17
|
return this.find(`input[value="${safeValue}"]`);
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
RadioGroupWrapper.rootSelector =
|
|
20
|
+
RadioGroupWrapper.rootSelector = styles_selectors_js_3.default.root;
|
|
21
|
+
RadioGroupWrapper.legacyRootSelector = styles_selectors_js_2.default.root;
|
|
20
22
|
exports.default = RadioGroupWrapper;
|
|
21
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/radio-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,oEAA0E;AAC1E,kDAAiD;AACjD,oHAA2G;AAC3G,+FAA2E;AAC3E,MAAqB,iBAAkB,SAAQ,4BAAgB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/test-utils/selectors/radio-group/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,4EAAgG;AAChG,oEAA0E;AAC1E,kDAAiD;AACjD,oHAA2G;AAC3G,kFAAoE;AACpE,+FAA2E;AAC3E,MAAqB,iBAAkB,SAAQ,4BAAgB;IAG7D,WAAW;QACT,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,6BAAiB,CAAC,IAAI,MAAM,6BAAY,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,sBAAkB,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;IAClI,CAAC;IACD,gBAAgB,CAAC,KAAa;QAC5B,MAAM,SAAS,GAAG,IAAA,sBAAc,EAAC,KAAK,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,SAAS,IAAI,CAAC,CAAC;IAClD,CAAC;;AARM,8BAAY,GAAW,6BAAM,CAAC,IAAI,CAAC;AACnC,oCAAkB,GAAW,6BAAY,CAAC,IAAI,CAAC;kBAFnC,iBAAiB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"vertical-connector": "awsui_vertical-
|
|
5
|
-
"grid": "
|
|
6
|
-
"absolute": "
|
|
4
|
+
"vertical-connector": "awsui_vertical-connector_1r2pu_5k3hj_9",
|
|
5
|
+
"grid": "awsui_grid_1r2pu_5k3hj_13",
|
|
6
|
+
"absolute": "awsui_absolute_1r2pu_5k3hj_20"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -6,20 +6,20 @@
|
|
|
6
6
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
7
7
|
SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
9
|
-
.awsui_vertical-
|
|
9
|
+
.awsui_vertical-connector_1r2pu_5k3hj_9:not(#\9) {
|
|
10
10
|
background-color: var(--color-tree-view-connector-line-ao4t04, #879596);
|
|
11
11
|
inline-size: var(--border-divider-list-width-8ggz94, 1px);
|
|
12
12
|
}
|
|
13
|
-
.awsui_vertical-
|
|
13
|
+
.awsui_vertical-connector_1r2pu_5k3hj_9.awsui_grid_1r2pu_5k3hj_13:not(#\9) {
|
|
14
14
|
grid-row: 2/span 3;
|
|
15
15
|
grid-column: 1;
|
|
16
16
|
block-size: 100%;
|
|
17
17
|
position: relative;
|
|
18
|
-
inset-inline-start:
|
|
18
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-8ggz94, 1px)) / 2);
|
|
19
19
|
}
|
|
20
|
-
.awsui_vertical-
|
|
20
|
+
.awsui_vertical-connector_1r2pu_5k3hj_9.awsui_absolute_1r2pu_5k3hj_20:not(#\9) {
|
|
21
21
|
position: absolute;
|
|
22
22
|
inset: 0;
|
|
23
23
|
inset-block-end: var(--space-scaled-xs-sppte9, 8px);
|
|
24
|
-
inset-inline-start:
|
|
24
|
+
inset-inline-start: calc((28px - var(--border-divider-list-width-8ggz94, 1px)) / 2);
|
|
25
25
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"vertical-connector": "awsui_vertical-
|
|
6
|
-
"grid": "
|
|
7
|
-
"absolute": "
|
|
5
|
+
"vertical-connector": "awsui_vertical-connector_1r2pu_5k3hj_9",
|
|
6
|
+
"grid": "awsui_grid_1r2pu_5k3hj_13",
|
|
7
|
+
"absolute": "awsui_absolute_1r2pu_5k3hj_20"
|
|
8
8
|
};
|
|
9
9
|
|