@cloudscape-design/components-themeable 3.0.1340 → 3.0.1341
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 +231 -37
- package/lib/internal/scss/internal/components/chart-legend/styles.scss +1 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts +1 -1
- package/lib/internal/template/button-dropdown/filter.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal.js +2 -2
- package/lib/internal/template/button-dropdown/internal.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts +1 -0
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js +9 -0
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/lib/internal/template/i18n/context.d.ts +16 -4
- package/lib/internal/template/i18n/context.d.ts.map +1 -1
- package/lib/internal/template/i18n/context.js +10 -4
- package/lib/internal/template/i18n/context.js.map +1 -1
- package/lib/internal/template/i18n/index.d.ts +2 -0
- package/lib/internal/template/i18n/index.d.ts.map +1 -1
- package/lib/internal/template/i18n/index.js +1 -0
- package/lib/internal/template/i18n/index.js.map +1 -1
- package/lib/internal/template/input/index.d.ts.map +1 -1
- package/lib/internal/template/input/index.js +4 -2
- package/lib/internal/template/input/index.js.map +1 -1
- package/lib/internal/template/input/interfaces.d.ts +9 -0
- package/lib/internal/template/input/interfaces.d.ts.map +1 -1
- package/lib/internal/template/input/interfaces.js.map +1 -1
- package/lib/internal/template/input/internal.d.ts +5 -5
- package/lib/internal/template/input/internal.d.ts.map +1 -1
- package/lib/internal/template/input/internal.js +60 -24
- package/lib/internal/template/input/internal.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +28 -18
- package/lib/internal/template/input/styles.scoped.css +213 -52
- package/lib/internal/template/input/styles.selectors.js +28 -18
- package/lib/internal/template/input/utils.js +3 -3
- package/lib/internal/template/input/utils.js.map +1 -1
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/chart-legend/styles.css.js +6 -6
- package/lib/internal/template/internal/components/chart-legend/styles.scoped.css +16 -14
- package/lib/internal/template/internal/components/chart-legend/styles.selectors.js +6 -6
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/multiselect/embedded.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts +1 -1
- package/lib/internal/template/select/parts/filter.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/interfaces.d.ts +1 -1
- package/lib/internal/template/status-indicator/interfaces.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/interfaces.js.map +1 -1
- package/lib/internal/template/status-indicator/internal.d.ts +2 -6
- package/lib/internal/template/status-indicator/internal.d.ts.map +1 -1
- package/lib/internal/template/status-indicator/internal.js.map +1 -1
- package/lib/internal/template/steps/interfaces.d.ts +2 -2
- package/lib/internal/template/steps/interfaces.d.ts.map +1 -1
- package/lib/internal/template/steps/interfaces.js.map +1 -1
- package/lib/internal/template/test-utils/dom/input/index.d.ts +2 -0
- package/lib/internal/template/test-utils/dom/input/index.js +6 -0
- package/lib/internal/template/test-utils/dom/input/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/input/index.d.ts +2 -0
- package/lib/internal/template/test-utils/selectors/input/index.js +6 -0
- package/lib/internal/template/test-utils/selectors/input/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/status-indicator/internal-interfaces.d.ts +0 -3
- package/lib/internal/template/status-indicator/internal-interfaces.d.ts.map +0 -1
- package/lib/internal/template/status-indicator/internal-interfaces.js +0 -2
- package/lib/internal/template/status-indicator/internal-interfaces.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
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d,8BACE,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,KACjC,CAAC,WAAW,KAAK,OAAO;gBAC1B,CAAC,CAAC,6BAA6B,CAAC;oBAC5B,MAAM,EAAE,YAAY;iBACiC,CAAC;gBAC1D,CAAC,CAAC,EAAE,CAAC;YAEP,oBAAC,cAAc;YACb,sBAAsB;;gBAAtB,sBAAsB;gBACtB,SAAS,EAAE,MAAM,CAAC,oBAAoB,CAAC,EACvC,OAAO,EAAC,4BAA4B,EACpC,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,WAAW,EACrB,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,EACzD,QAAQ,EAAE,QAAQ,GAClB,CACG,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs } from '@cloudscape-design/component-toolkit/internal';\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport WithNativeAttributes, { SkipWarnings } from '../internal/utils/with-native-attributes';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport {\n GeneratedAnalyticsMetadataInputClearInput,\n GeneratedAnalyticsMetadataInputComponent,\n} from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { getInputStyles } from './styles';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __leftIcon?: IconProps['name'];\n __leftIconVariant?: IconProps['variant'];\n __onLeftIconClick?: () => void;\n\n __rightIcon?: IconProps['name'];\n __onRightIconClick?: () => void;\n\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __skipNativeAttributesWarnings?: SkipWarnings;\n __inlineLabelText?: string;\n __fullWidth?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __leftIcon,\n __leftIconVariant = 'subtle',\n __onLeftIconClick,\n\n ariaRequired,\n\n __rightIcon,\n __onRightIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n nativeInputAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n __injectAnalyticsComponentMetadata,\n __skipNativeAttributesWarnings,\n __inlineLabelText,\n __fullWidth,\n style,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __leftIcon = __leftIcon ?? searchProps.__leftIcon;\n __rightIcon = __rightIcon ?? searchProps.__rightIcon;\n __onRightIconClick = __onRightIconClick ?? searchProps.__onRightIconClick;\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __rightIcon && styles['input-has-icon-right'],\n __leftIcon && styles['input-has-icon-left'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid,\n [styles['input-warning']]: warning && !invalid,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n fireNonCancelableEvent(onBlur);\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataInputComponent = {\n name: 'awsui.Input',\n label: 'input',\n properties: {\n value: value || '',\n },\n };\n\n const mainInput = (\n <WithNativeAttributes\n {...attributes}\n tag=\"input\"\n componentName=\"Input\"\n nativeAttributes={nativeInputAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n ref={mergedRef}\n style={getInputStyles(style)}\n />\n );\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['input-container'])}\n ref={__internalRootRef}\n dir={type === 'email' ? 'ltr' : undefined}\n {...(__injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })\n : copyAnalyticsMetadataAttribute(rest))}\n >\n {__leftIcon && (\n <span onClick={__onLeftIconClick} className={styles['input-icon-left']}>\n <InternalIcon name={__leftIcon} variant={disabled || readOnly ? 'disabled' : __leftIconVariant} />\n </span>\n )}\n {__inlineLabelText ? (\n <div className={clsx(styles['inline-label-wrapper'], __fullWidth && styles['inline-label-wrapper-full-width'])}>\n <label htmlFor={controlId} className={styles['inline-label']}>\n {__inlineLabelText}\n </label>\n <div\n className={clsx(\n styles['inline-label-trigger-wrapper'],\n __fullWidth && styles['inline-label-trigger-wrapper-full-width']\n )}\n >\n {mainInput}\n </div>\n </div>\n ) : (\n mainInput\n )}\n {__rightIcon && (\n <span\n className={styles['input-icon-right']}\n {...(__rightIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__rightIcon}\n onClick={__onRightIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n )}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/input/internal.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,cAAc,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,YAAY,MAAM,kBAAkB,CAAC;AAC5C,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;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,oBAAsC,MA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,QAAQ,IAAI,SAAS,EACpC,KAAK,EAAE,sBAAsB;YAE5B,SAAS,IAAI,CACZ;gBACE,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,iBAAc,MAAM;oBACzD,8BAAM,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,IAAG,MAAM,CAAQ,CAC9D;gBACP,8BAAM,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,GAAI,CACrD,CACJ;YACA,cAAc;YACd,SAAS,IAAI,CACZ;gBACE,8BAAM,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,GAAI;gBACtD,8BAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,iBAAc,MAAM;oBACzD,8BAAM,SAAS,EAAE,MAAM,CAAC,yBAAyB,CAAC,IAAG,MAAM,CAAQ,CAC9D,CACN,CACJ;YACA,OAAO,CACJ,CACP,CAAC,CAAC,CAAC,CACF,cAAc,CACf;QACA,CAAC,iBAAiB,IAAI,OAAO,CAC1B,CACP,CAAC;AACJ,CAAC;AAED,eAAe,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useMergeRefs, warnOnce } from '@cloudscape-design/component-toolkit/internal';\nimport {\n copyAnalyticsMetadataAttribute,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport InternalButton from '../button/internal';\nimport { useInternalI18n } from '../i18n/context';\nimport { IconProps } from '../icon/interfaces';\nimport InternalIcon from '../icon/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireKeyboardEvent, fireNonCancelableEvent } from '../internal/events';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { useDebounceCallback } from '../internal/hooks/use-debounce-callback';\nimport { isDevelopment } from '../internal/is-development';\nimport WithNativeAttributes, { SkipWarnings } from '../internal/utils/with-native-attributes';\nimport { BaseComponentProps } from '../types/base-component';\nimport { NonCancelableEventHandler } from '../types/events';\nimport { FormFieldValidationControlProps } from '../types/form-field';\nimport {\n GeneratedAnalyticsMetadataInputClearInput,\n GeneratedAnalyticsMetadataInputComponent,\n} from './analytics-metadata/interfaces';\nimport { BaseChangeDetail, BaseInputProps, InputAutoCorrect, InputProps } from './interfaces';\nimport { getInputStyles } from './styles';\nimport { convertAutoComplete, useSearchProps } from './utils';\n\nimport styles from './styles.css.js';\n\nexport interface InternalInputProps\n extends BaseComponentProps,\n BaseInputProps,\n Omit<InputProps, 'type'>,\n InputAutoCorrect,\n FormFieldValidationControlProps,\n InternalBaseComponentProps {\n type?: InputProps['type'] | 'visualSearch';\n __startIcon?: IconProps['name'];\n __startIconVariant?: IconProps['variant'];\n __onStartIconClick?: () => void;\n\n __endIcon?: IconProps['name'];\n __onEndIconClick?: () => void;\n\n __noBorderRadius?: boolean;\n\n __onDelayedInput?: NonCancelableEventHandler<BaseChangeDetail>;\n __onBlurWithDetail?: NonCancelableEventHandler<{ relatedTarget: Node | null }>;\n\n __inheritFormFieldProps?: boolean;\n __injectAnalyticsComponentMetadata?: boolean;\n __skipNativeAttributesWarnings?: SkipWarnings;\n __inlineLabelText?: string;\n __fullWidth?: boolean;\n}\n\nfunction InternalInput(\n {\n type = 'text',\n step,\n inputMode,\n autoComplete = true,\n ariaLabel,\n clearAriaLabel: clearAriaLabelOverride,\n name,\n value,\n placeholder,\n autoFocus,\n disabled,\n readOnly,\n disableBrowserAutocorrect,\n spellcheck,\n __noBorderRadius,\n\n __startIcon,\n __startIconVariant = 'subtle',\n __onStartIconClick,\n\n ariaRequired,\n\n __endIcon,\n __onEndIconClick,\n\n onKeyDown,\n onKeyUp,\n onChange,\n __onDelayedInput,\n __onBlurWithDetail,\n onBlur,\n onFocus,\n nativeInputAttributes,\n __internalRootRef,\n __inheritFormFieldProps,\n __injectAnalyticsComponentMetadata,\n __skipNativeAttributesWarnings,\n __inlineLabelText,\n __fullWidth,\n style,\n prefix,\n suffix,\n ...rest\n }: InternalInputProps,\n ref: Ref<HTMLInputElement>\n) {\n const baseProps = getBaseProps(rest);\n const i18n = useInternalI18n('input');\n const fireDelayedInput = useDebounceCallback((value: string) => fireNonCancelableEvent(__onDelayedInput, { value }));\n\n const handleChange = (value: string) => {\n fireDelayedInput(value);\n fireNonCancelableEvent(onChange, { value });\n };\n\n const inputRef = useRef<HTMLInputElement>(null);\n const searchProps = useSearchProps(type, disabled, readOnly, value, inputRef, handleChange);\n __startIcon = __startIcon ?? searchProps.__startIcon;\n __endIcon = __endIcon ?? searchProps.__endIcon;\n __onEndIconClick = __onEndIconClick ?? searchProps.__onEndIconClick;\n\n // Search inputs use built-in search and clear icons that would overlap adornments.\n const isSearch = type === 'search' || type === 'visualSearch';\n if (isDevelopment) {\n if (isSearch && (prefix !== undefined || suffix !== undefined)) {\n warnOnce('Input', 'prefix and suffix are ignored when type is search.');\n }\n }\n if (isSearch) {\n prefix = undefined;\n suffix = undefined;\n }\n\n const formFieldContext = useFormFieldContext(rest);\n const { ariaLabelledby, ariaDescribedby, controlId, invalid, warning } = __inheritFormFieldProps\n ? formFieldContext\n : rest;\n\n const hasPrefix = !!prefix;\n const hasSuffix = !!suffix;\n const hasPrefixOrSuffix = hasPrefix || hasSuffix;\n const inputStyles = getInputStyles(style);\n const nativeInputStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, borderRadius: undefined, borderWidth: undefined }\n : inputStyles;\n const adornedContainerStyles =\n hasPrefixOrSuffix && inputStyles\n ? { ...inputStyles, paddingBlock: undefined, paddingInline: undefined }\n : undefined;\n\n const attributes: React.InputHTMLAttributes<HTMLInputElement> = {\n 'aria-label': ariaLabel,\n // aria-labelledby has precedence over aria-label in accessible name calculation.\n // When aria-label is provided for Input, it should override aria-labelledBy from form-field context.\n // If both aria-label and aria-labelledby come from Input props, aria-labelledby will be used in accessible name\n 'aria-labelledby': ariaLabel && !rest.ariaLabelledby ? undefined : ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n name,\n placeholder,\n autoFocus,\n id: controlId,\n className: clsx(\n styles.input,\n type && styles[`input-type-${type}`],\n __endIcon && styles['input-has-icon-end'],\n __startIcon && styles['input-has-icon-start'],\n __noBorderRadius && styles['input-has-no-border-radius'],\n hasPrefixOrSuffix && styles['input-adorned'],\n {\n [styles['input-readonly']]: readOnly,\n [styles['input-invalid']]: invalid && !hasPrefixOrSuffix,\n [styles['input-warning']]: warning && !invalid && !hasPrefixOrSuffix,\n }\n ),\n autoComplete: convertAutoComplete(autoComplete),\n disabled,\n readOnly,\n type,\n step,\n inputMode,\n spellCheck: spellcheck,\n onKeyDown: onKeyDown && (event => fireKeyboardEvent(onKeyDown, event)),\n onKeyUp: onKeyUp && (event => fireKeyboardEvent(onKeyUp, event)),\n // We set a default value on the component in order to force it into the controlled mode.\n value: value ?? '',\n onChange: onChange && (event => handleChange(event.target.value)),\n onBlur: e => {\n fireNonCancelableEvent(onBlur);\n fireNonCancelableEvent(__onBlurWithDetail, { relatedTarget: e.relatedTarget });\n },\n onFocus: onFocus && (() => fireNonCancelableEvent(onFocus)),\n };\n\n if (type === 'number') {\n // Chrome and Safari have a weird built-in behavior of letting focused\n // number inputs be controlled by scrolling on them. However, they don't\n // lock the browser's scroll, so it's very easy to accidentally increment\n // the input while scrolling down the page.\n attributes.onWheel = event => event.currentTarget.blur();\n }\n\n if (disableBrowserAutocorrect) {\n attributes.autoCorrect = 'off';\n attributes.autoCapitalize = 'off';\n }\n\n // ensure aria properties are string literal \"true\"\n if (ariaRequired) {\n attributes['aria-required'] = 'true';\n }\n if (invalid) {\n attributes['aria-invalid'] = 'true';\n }\n\n const mergedRef = useMergeRefs(ref, inputRef);\n\n // type = \"visualSearch\" renders a type=\"text' input\n if (attributes.type === 'visualSearch') {\n attributes.type = 'text';\n }\n\n const componentAnalyticsMetadata: GeneratedAnalyticsMetadataInputComponent = {\n name: 'awsui.Input',\n label: 'input',\n properties: {\n value: value || '',\n },\n };\n\n const mainInput = (\n <WithNativeAttributes\n {...attributes}\n tag=\"input\"\n componentName=\"Input\"\n nativeAttributes={nativeInputAttributes}\n skipWarnings={__skipNativeAttributesWarnings}\n ref={mergedRef}\n style={nativeInputStyles}\n />\n );\n\n const inputWithLabel = __inlineLabelText ? (\n <div className={clsx(styles['inline-label-wrapper'], __fullWidth && styles['inline-label-wrapper-full-width'])}>\n <label htmlFor={controlId} className={styles['inline-label']}>\n {__inlineLabelText}\n </label>\n <div\n className={clsx(\n styles['inline-label-trigger-wrapper'],\n __fullWidth && styles['inline-label-trigger-wrapper-full-width']\n )}\n >\n {mainInput}\n </div>\n </div>\n ) : (\n mainInput\n );\n\n const endIcon = __endIcon ? (\n <span\n className={styles['input-icon-end']}\n {...(__endIcon === 'close'\n ? getAnalyticsMetadataAttribute({\n action: 'clearInput',\n } as Partial<GeneratedAnalyticsMetadataInputClearInput>)\n : {})}\n >\n <InternalButton\n // Used for test utils\n className={styles['input-button-right']}\n variant=\"inline-icon-pointer-target\"\n formAction=\"none\"\n iconName={__endIcon}\n onClick={__onEndIconClick}\n ariaLabel={i18n('clearAriaLabel', clearAriaLabelOverride)}\n disabled={disabled}\n />\n </span>\n ) : null;\n\n return (\n <div\n {...baseProps}\n className={clsx(baseProps.className, styles['input-container'])}\n ref={__internalRootRef}\n dir={type === 'email' ? 'ltr' : undefined}\n {...(__injectAnalyticsComponentMetadata\n ? getAnalyticsMetadataAttribute({ component: componentAnalyticsMetadata })\n : copyAnalyticsMetadataAttribute(rest))}\n >\n {__startIcon && (\n <span onClick={__onStartIconClick} className={styles['input-icon-start']}>\n <InternalIcon name={__startIcon} variant={disabled || readOnly ? 'disabled' : __startIconVariant} />\n </span>\n )}\n {hasPrefixOrSuffix ? (\n // [prefix][divider][input][divider][suffix] - one flex bar owns the border and focus ring.\n <div\n className={clsx(\n styles['input-adorned-container'],\n invalid && styles['input-adorned-container-invalid'],\n warning && !invalid && styles['input-adorned-container-warning'],\n disabled && styles['input-adorned-container-disabled'],\n readOnly && !disabled && styles['input-adorned-container-readonly']\n )}\n aria-disabled={disabled || undefined}\n style={adornedContainerStyles}\n >\n {hasPrefix && (\n <>\n <span className={styles['input-prefix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>{prefix}</span>\n </span>\n <span className={styles['input-adornment-divider']} />\n </>\n )}\n {inputWithLabel}\n {hasSuffix && (\n <>\n <span className={styles['input-adornment-divider']} />\n <span className={styles['input-suffix']} aria-hidden=\"true\">\n <span className={styles['input-adornment-content']}>{suffix}</span>\n </span>\n </>\n )}\n {endIcon}\n </div>\n ) : (\n inputWithLabel\n )}\n {!hasPrefixOrSuffix && endIcon}\n </div>\n );\n}\n\nexport default React.forwardRef(InternalInput);\n"]}
|
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"
|
|
5
|
-
"input": "
|
|
6
|
-
"input-readonly": "awsui_input-
|
|
7
|
-
"input-
|
|
8
|
-
"
|
|
9
|
-
"input-
|
|
10
|
-
"input-
|
|
11
|
-
"input-
|
|
12
|
-
"input-
|
|
13
|
-
"input-
|
|
14
|
-
"input-
|
|
15
|
-
"input-
|
|
16
|
-
"input-
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"inline-label-wrapper": "awsui_inline-label-
|
|
20
|
-
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-
|
|
21
|
-
"inline-label": "awsui_inline-
|
|
4
|
+
"input-adorned-container": "awsui_input-adorned-container_2rhyz_997e8_145",
|
|
5
|
+
"input": "awsui_input_2rhyz_997e8_145",
|
|
6
|
+
"input-adorned-container-readonly": "awsui_input-adorned-container-readonly_2rhyz_997e8_158",
|
|
7
|
+
"input-readonly": "awsui_input-readonly_2rhyz_997e8_158",
|
|
8
|
+
"root": "awsui_root_2rhyz_997e8_175",
|
|
9
|
+
"input-invalid": "awsui_input-invalid_2rhyz_997e8_278",
|
|
10
|
+
"input-has-icon-start": "awsui_input-has-icon-start_2rhyz_997e8_287",
|
|
11
|
+
"input-warning": "awsui_input-warning_2rhyz_997e8_290",
|
|
12
|
+
"input-type-search": "awsui_input-type-search_2rhyz_997e8_302",
|
|
13
|
+
"input-has-icon-end": "awsui_input-has-icon-end_2rhyz_997e8_315",
|
|
14
|
+
"input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_997e8_318",
|
|
15
|
+
"input-container": "awsui_input-container_2rhyz_997e8_325",
|
|
16
|
+
"input-icon-start": "awsui_input-icon-start_2rhyz_997e8_330",
|
|
17
|
+
"input-icon-end": "awsui_input-icon-end_2rhyz_997e8_337",
|
|
18
|
+
"input-button-right": "awsui_input-button-right_2rhyz_997e8_343",
|
|
19
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_2rhyz_997e8_347",
|
|
20
|
+
"inline-label-trigger-wrapper-full-width": "awsui_inline-label-trigger-wrapper-full-width_2rhyz_997e8_350",
|
|
21
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_2rhyz_997e8_354",
|
|
22
|
+
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-width_2rhyz_997e8_357",
|
|
23
|
+
"inline-label": "awsui_inline-label_2rhyz_997e8_347",
|
|
24
|
+
"input-adorned-container-invalid": "awsui_input-adorned-container-invalid_2rhyz_997e8_404",
|
|
25
|
+
"input-adorned-container-warning": "awsui_input-adorned-container-warning_2rhyz_997e8_417",
|
|
26
|
+
"input-adorned-container-disabled": "awsui_input-adorned-container-disabled_2rhyz_997e8_430",
|
|
27
|
+
"input-prefix": "awsui_input-prefix_2rhyz_997e8_439",
|
|
28
|
+
"input-suffix": "awsui_input-suffix_2rhyz_997e8_440",
|
|
29
|
+
"input-adornment-content": "awsui_input-adornment-content_2rhyz_997e8_453",
|
|
30
|
+
"input-adornment-divider": "awsui_input-adornment-divider_2rhyz_997e8_462",
|
|
31
|
+
"input-adorned": "awsui_input-adorned_2rhyz_997e8_145"
|
|
22
32
|
};
|
|
23
33
|
|
|
@@ -142,11 +142,41 @@
|
|
|
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_input-adorned-container_2rhyz_997e8_145:not(#\9), .awsui_input_2rhyz_997e8_145:not(#\9) {
|
|
146
|
+
background-color: var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff));
|
|
147
|
+
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078));
|
|
148
|
+
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078));
|
|
149
|
+
box-shadow: var(--awsui-style-box-shadow-default-esndbs);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.awsui_input-adorned-container_2rhyz_997e8_145:not(#\9):hover, .awsui_input_2rhyz_997e8_145:not(#\9):hover {
|
|
153
|
+
border-color: var(--awsui-style-border-color-hover-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078)));
|
|
154
|
+
background-color: var(--awsui-style-background-hover-esndbs, var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff)));
|
|
155
|
+
box-shadow: var(--awsui-style-box-shadow-hover-esndbs, --awsui-style-box-shadow-default-esndbs);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-readonly_2rhyz_997e8_158:not(#\9), .awsui_input_2rhyz_997e8_145.awsui_input-readonly_2rhyz_997e8_158:not(#\9) {
|
|
159
|
+
background-color: var(--awsui-style-background-readonly-esndbs, var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff)));
|
|
160
|
+
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-readonly-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded)));
|
|
161
|
+
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-readonly-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded)));
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.awsui_input-adorned-container_2rhyz_997e8_145:not(#\9):focus-within, .awsui_input_2rhyz_997e8_145:not(#\9):focus {
|
|
165
|
+
outline: 2px dotted transparent;
|
|
166
|
+
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-focus-esndbs, var(--color-border-input-focused-lslq4r, #0073bb));
|
|
167
|
+
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-focus-esndbs, var(--color-border-input-focused-lslq4r, #0073bb));
|
|
168
|
+
border-start-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
169
|
+
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
170
|
+
border-end-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
171
|
+
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
172
|
+
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-focus-ring-shadow-spread-iijyo6, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.awsui_root_2rhyz_997e8_175:not(#\9) {
|
|
146
176
|
/* used in test-utils for component to distinguish input from other input-like components, for example autosuggest */
|
|
147
177
|
}
|
|
148
178
|
|
|
149
|
-
.
|
|
179
|
+
.awsui_input_2rhyz_997e8_145:not(#\9) {
|
|
150
180
|
border-collapse: separate;
|
|
151
181
|
border-spacing: 0;
|
|
152
182
|
box-sizing: border-box;
|
|
@@ -182,32 +212,22 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
182
212
|
inline-size: 100%;
|
|
183
213
|
cursor: text;
|
|
184
214
|
box-sizing: border-box;
|
|
185
|
-
background-color: var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff));
|
|
186
215
|
border-start-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
187
216
|
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
188
217
|
border-end-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
189
218
|
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
190
|
-
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078));
|
|
191
|
-
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078));
|
|
192
|
-
box-shadow: var(--awsui-style-box-shadow-default-esndbs);
|
|
193
219
|
font-size: var(--font-size-body-m-tq5a14, 14px);
|
|
194
220
|
line-height: var(--line-height-body-m-5xw6xo, 22px);
|
|
195
221
|
min-block-size: var(--size-vertical-input-8gzd1t, 32px);
|
|
196
222
|
}
|
|
197
|
-
.
|
|
198
|
-
border-color: var(--awsui-style-border-color-hover-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-default-txli8y, #687078)));
|
|
223
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):hover {
|
|
199
224
|
color: var(--awsui-style-color-hover-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-text-body-default-5qid0u, #16191f)));
|
|
200
|
-
background-color: var(--awsui-style-background-hover-esndbs, var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff)));
|
|
201
|
-
box-shadow: var(--awsui-style-box-shadow-hover-esndbs, --awsui-style-box-shadow-default-esndbs);
|
|
202
225
|
}
|
|
203
|
-
.
|
|
204
|
-
background-color: var(--awsui-style-background-readonly-esndbs, var(--awsui-style-background-default-esndbs, var(--color-background-input-default-1z2buq, #ffffff)));
|
|
205
|
-
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-readonly-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded)));
|
|
206
|
-
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-readonly-esndbs, var(--awsui-style-border-color-default-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded)));
|
|
226
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-readonly_2rhyz_997e8_158:not(#\9) {
|
|
207
227
|
color: var(--awsui-style-color-readonly-esndbs, var(--awsui-style-color-default-esndbs, var(--color-text-body-default-5qid0u, #16191f)));
|
|
208
228
|
box-shadow: var(--awsui-style-box-shadow-readonly-esndbs);
|
|
209
229
|
}
|
|
210
|
-
.
|
|
230
|
+
.awsui_input_2rhyz_997e8_145:not(#\9)::-webkit-input-placeholder {
|
|
211
231
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-hvcry0, #687078));
|
|
212
232
|
font-size: var(--awsui-style-placeholder-font-size-esndbs);
|
|
213
233
|
font-style: var(--awsui-style-placeholder-font-style-esndbs, italic);
|
|
@@ -215,33 +235,25 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
215
235
|
-webkit-user-select: none;
|
|
216
236
|
user-select: none;
|
|
217
237
|
}
|
|
218
|
-
.
|
|
238
|
+
.awsui_input_2rhyz_997e8_145:not(#\9)::-moz-placeholder {
|
|
219
239
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-hvcry0, #687078));
|
|
220
240
|
font-size: var(--awsui-style-placeholder-font-size-esndbs);
|
|
221
241
|
font-style: var(--awsui-style-placeholder-font-style-esndbs, italic);
|
|
222
242
|
font-weight: var(--awsui-style-placeholder-font-weight-esndbs);
|
|
223
243
|
opacity: 1;
|
|
224
244
|
}
|
|
225
|
-
.
|
|
245
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):-moz-placeholder {
|
|
226
246
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-hvcry0, #687078));
|
|
227
247
|
font-size: var(--awsui-style-placeholder-font-size-esndbs);
|
|
228
248
|
font-style: var(--awsui-style-placeholder-font-style-esndbs, italic);
|
|
229
249
|
font-weight: var(--awsui-style-placeholder-font-weight-esndbs);
|
|
230
250
|
opacity: 1;
|
|
231
251
|
}
|
|
232
|
-
.
|
|
233
|
-
outline: 2px dotted transparent;
|
|
234
|
-
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-focus-esndbs, var(--color-border-input-focused-lslq4r, #0073bb));
|
|
235
|
-
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-focus-esndbs, var(--color-border-input-focused-lslq4r, #0073bb));
|
|
236
|
-
border-start-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
237
|
-
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
238
|
-
border-end-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
239
|
-
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
240
|
-
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-focus-ring-shadow-spread-iijyo6, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
252
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):focus {
|
|
241
253
|
color: var(--awsui-style-color-focus-esndbs, var(--color-text-body-default-5qid0u, #16191f));
|
|
242
254
|
background-color: var(--awsui-style-background-focus-esndbs, var(--color-background-input-default-1z2buq, #ffffff));
|
|
243
255
|
}
|
|
244
|
-
.
|
|
256
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):disabled {
|
|
245
257
|
background-color: var(--awsui-style-background-disabled-esndbs, var(--color-background-input-disabled-4vlau3, #eaeded));
|
|
246
258
|
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-disabled-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded));
|
|
247
259
|
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-disabled-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded));
|
|
@@ -249,106 +261,106 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
249
261
|
cursor: default;
|
|
250
262
|
box-shadow: var(--awsui-style-box-shadow-disabled-esndbs);
|
|
251
263
|
}
|
|
252
|
-
.
|
|
264
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):disabled::-webkit-input-placeholder {
|
|
253
265
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
|
|
254
266
|
-webkit-user-select: none;
|
|
255
267
|
user-select: none;
|
|
256
268
|
}
|
|
257
|
-
.
|
|
269
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):disabled::-moz-placeholder {
|
|
258
270
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
|
|
259
271
|
opacity: 1;
|
|
260
272
|
}
|
|
261
|
-
.
|
|
273
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):disabled:-moz-placeholder {
|
|
262
274
|
color: var(--awsui-style-placeholder-color-esndbs, var(--color-text-input-placeholder-disabled-x4lauf, #687078));
|
|
263
275
|
opacity: 1;
|
|
264
276
|
}
|
|
265
|
-
.
|
|
277
|
+
.awsui_input_2rhyz_997e8_145:not(#\9):invalid {
|
|
266
278
|
box-shadow: none;
|
|
267
279
|
}
|
|
268
|
-
.
|
|
280
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-invalid_2rhyz_997e8_278:not(#\9) {
|
|
269
281
|
color: var(--awsui-style-color-default-esndbs, var(--color-text-status-error-c3at5p, #d13212));
|
|
270
282
|
border-color: var(--awsui-style-border-color-default-esndbs, var(--color-text-status-error-c3at5p, #d13212));
|
|
271
283
|
padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
272
284
|
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
273
285
|
}
|
|
274
|
-
.
|
|
286
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-invalid_2rhyz_997e8_278:not(#\9):focus {
|
|
275
287
|
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
276
288
|
}
|
|
277
|
-
.
|
|
289
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-invalid_2rhyz_997e8_278.awsui_input-has-icon-start_2rhyz_997e8_287:not(#\9) {
|
|
278
290
|
padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
279
291
|
}
|
|
280
|
-
.
|
|
292
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-warning_2rhyz_997e8_290:not(#\9) {
|
|
281
293
|
color: var(--awsui-style-color-default-esndbs, var(--color-text-status-warning-08d9ki, #906806));
|
|
282
294
|
border-color: var(--awsui-style-border-color-default-esndbs, var(--color-text-status-warning-08d9ki, #906806));
|
|
283
295
|
padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
284
296
|
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
285
297
|
}
|
|
286
|
-
.
|
|
298
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-warning_2rhyz_997e8_290:not(#\9):focus {
|
|
287
299
|
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
288
300
|
}
|
|
289
|
-
.
|
|
301
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-warning_2rhyz_997e8_290.awsui_input-has-icon-start_2rhyz_997e8_287:not(#\9) {
|
|
290
302
|
padding-inline-start: calc(var(--space-field-icon-offset-ihoxql, 32px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
291
303
|
}
|
|
292
|
-
.
|
|
304
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-type-search_2rhyz_997e8_302:not(#\9) {
|
|
293
305
|
box-sizing: border-box;
|
|
294
306
|
-webkit-appearance: none;
|
|
295
307
|
}
|
|
296
|
-
.
|
|
308
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-type-search_2rhyz_997e8_302:not(#\9)::-webkit-search-decoration {
|
|
297
309
|
-webkit-appearance: none;
|
|
298
310
|
}
|
|
299
|
-
.
|
|
311
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-type-search_2rhyz_997e8_302:not(#\9)::-webkit-search-cancel-button {
|
|
300
312
|
display: none;
|
|
301
313
|
}
|
|
302
|
-
.
|
|
314
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-has-icon-start_2rhyz_997e8_287:not(#\9) {
|
|
303
315
|
padding-inline-start: var(--space-field-icon-offset-ihoxql, 32px);
|
|
304
316
|
}
|
|
305
|
-
.
|
|
317
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-has-icon-end_2rhyz_997e8_315:not(#\9) {
|
|
306
318
|
padding-inline-end: var(--space-field-icon-offset-ihoxql, 32px);
|
|
307
319
|
}
|
|
308
|
-
.
|
|
320
|
+
.awsui_input_2rhyz_997e8_145.awsui_input-has-no-border-radius_2rhyz_997e8_318:not(#\9) {
|
|
309
321
|
border-start-start-radius: var(--border-radius-dropdown-azs8zp, 0px);
|
|
310
322
|
border-start-end-radius: var(--border-radius-dropdown-azs8zp, 0px);
|
|
311
323
|
border-end-start-radius: var(--border-radius-dropdown-azs8zp, 0px);
|
|
312
324
|
border-end-end-radius: var(--border-radius-dropdown-azs8zp, 0px);
|
|
313
325
|
}
|
|
314
326
|
|
|
315
|
-
.awsui_input-
|
|
327
|
+
.awsui_input-container_2rhyz_997e8_325:not(#\9) {
|
|
316
328
|
display: flex;
|
|
317
329
|
position: relative;
|
|
318
330
|
}
|
|
319
331
|
|
|
320
|
-
.awsui_input-icon-
|
|
332
|
+
.awsui_input-icon-start_2rhyz_997e8_330:not(#\9) {
|
|
321
333
|
position: absolute;
|
|
322
334
|
pointer-events: none;
|
|
323
335
|
inset-inline-start: var(--space-field-horizontal-n5peob, 8px);
|
|
324
336
|
inset-block-start: calc(50% - var(--line-height-body-m-5xw6xo, 22px) / 2);
|
|
325
337
|
}
|
|
326
338
|
|
|
327
|
-
.awsui_input-icon-
|
|
339
|
+
.awsui_input-icon-end_2rhyz_997e8_337:not(#\9) {
|
|
328
340
|
position: absolute;
|
|
329
341
|
inset-block-start: calc(calc(50% - var(--line-height-body-m-5xw6xo, 22px) / 2) - var(--space-xxxs-3w1kr2, 2px));
|
|
330
342
|
inset-inline-end: calc(var(--space-field-horizontal-n5peob, 8px) - var(--space-xxs-jnczic, 4px));
|
|
331
343
|
}
|
|
332
344
|
|
|
333
|
-
.awsui_input-button-
|
|
345
|
+
.awsui_input-button-right_2rhyz_997e8_343:not(#\9) {
|
|
334
346
|
/* used in test-utils */
|
|
335
347
|
}
|
|
336
348
|
|
|
337
|
-
.awsui_inline-label-trigger-
|
|
349
|
+
.awsui_inline-label-trigger-wrapper_2rhyz_997e8_347:not(#\9) {
|
|
338
350
|
margin-block-start: -7px;
|
|
339
351
|
}
|
|
340
|
-
.awsui_inline-label-trigger-wrapper-full-
|
|
352
|
+
.awsui_inline-label-trigger-wrapper-full-width_2rhyz_997e8_350:not(#\9) {
|
|
341
353
|
inline-size: 100%;
|
|
342
354
|
}
|
|
343
355
|
|
|
344
|
-
.awsui_inline-label-
|
|
356
|
+
.awsui_inline-label-wrapper_2rhyz_997e8_354:not(#\9) {
|
|
345
357
|
margin-block-start: calc(var(--space-scaled-xs-sppte9, 8px) * -1);
|
|
346
358
|
}
|
|
347
|
-
.awsui_inline-label-wrapper-full-
|
|
359
|
+
.awsui_inline-label-wrapper-full-width_2rhyz_997e8_357:not(#\9) {
|
|
348
360
|
inline-size: 100%;
|
|
349
361
|
}
|
|
350
362
|
|
|
351
|
-
.awsui_inline-
|
|
363
|
+
.awsui_inline-label_2rhyz_997e8_347:not(#\9) {
|
|
352
364
|
background: linear-gradient(to bottom, var(--color-background-layout-main-05m5y6, #f2f3f3), var(--color-background-input-default-1z2buq, #ffffff));
|
|
353
365
|
border-start-start-radius: 2px;
|
|
354
366
|
border-start-end-radius: 2px;
|
|
@@ -368,4 +380,153 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
368
380
|
padding-inline: var(--space-scaled-xxs-jatbiv, 4px);
|
|
369
381
|
max-inline-size: calc(100% - 2 * var(--space-field-horizontal-n5peob, 8px));
|
|
370
382
|
z-index: 1;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.awsui_input-adorned-container_2rhyz_997e8_145:not(#\9) {
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: stretch;
|
|
388
|
+
inline-size: 100%;
|
|
389
|
+
box-sizing: border-box;
|
|
390
|
+
color: var(--awsui-style-color-default-esndbs, var(--color-text-form-secondary-4sp9un, #687078));
|
|
391
|
+
border-start-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
392
|
+
border-start-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
393
|
+
border-end-start-radius: var(--border-radius-input-k1q34z, 2px);
|
|
394
|
+
border-end-end-radius: var(--border-radius-input-k1q34z, 2px);
|
|
395
|
+
min-block-size: var(--size-vertical-input-8gzd1t, 32px);
|
|
396
|
+
}
|
|
397
|
+
.awsui_input-adorned-container_2rhyz_997e8_145:not(#\9):hover {
|
|
398
|
+
color: var(--awsui-style-color-hover-esndbs, var(--awsui-style-color-default-esndbs, var(--color-text-form-secondary-4sp9un, #687078)));
|
|
399
|
+
}
|
|
400
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-readonly_2rhyz_997e8_158:not(#\9) {
|
|
401
|
+
color: var(--awsui-style-color-readonly-esndbs, var(--awsui-style-color-default-esndbs, var(--color-text-form-secondary-4sp9un, #687078)));
|
|
402
|
+
}
|
|
403
|
+
.awsui_input-adorned-container_2rhyz_997e8_145:not(#\9):focus-within {
|
|
404
|
+
color: var(--awsui-style-color-focus-esndbs, var(--awsui-style-color-default-esndbs, var(--color-text-form-secondary-4sp9un, #687078)));
|
|
405
|
+
}
|
|
406
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-invalid_2rhyz_997e8_404:not(#\9) {
|
|
407
|
+
color: var(--awsui-style-color-default-esndbs, var(--color-text-status-error-c3at5p, #d13212));
|
|
408
|
+
border-color: var(--awsui-style-border-color-default-esndbs, var(--color-text-status-error-c3at5p, #d13212));
|
|
409
|
+
padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
410
|
+
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
411
|
+
padding-inline-start: 0;
|
|
412
|
+
}
|
|
413
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-invalid_2rhyz_997e8_404:not(#\9):focus {
|
|
414
|
+
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
415
|
+
}
|
|
416
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-invalid_2rhyz_997e8_404:not(#\9):focus-within {
|
|
417
|
+
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
418
|
+
}
|
|
419
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-warning_2rhyz_997e8_417:not(#\9) {
|
|
420
|
+
color: var(--awsui-style-color-default-esndbs, var(--color-text-status-warning-08d9ki, #906806));
|
|
421
|
+
border-color: var(--awsui-style-border-color-default-esndbs, var(--color-text-status-warning-08d9ki, #906806));
|
|
422
|
+
padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
423
|
+
border-inline-start-width: var(--border-invalid-width-b183os, 4px);
|
|
424
|
+
padding-inline-start: 0;
|
|
425
|
+
}
|
|
426
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-warning_2rhyz_997e8_417:not(#\9):focus {
|
|
427
|
+
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
428
|
+
}
|
|
429
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-warning_2rhyz_997e8_417:not(#\9):focus-within {
|
|
430
|
+
box-shadow: var(--awsui-style-box-shadow-focus-esndbs, 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-bl5nmx, 1px) var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
431
|
+
}
|
|
432
|
+
.awsui_input-adorned-container_2rhyz_997e8_145.awsui_input-adorned-container-disabled_2rhyz_997e8_430:not(#\9) {
|
|
433
|
+
background-color: var(--awsui-style-background-disabled-esndbs, var(--color-background-input-disabled-4vlau3, #eaeded));
|
|
434
|
+
border-block: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-disabled-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded));
|
|
435
|
+
border-inline: var(--border-width-field-2365x3, 1px) solid var(--awsui-style-border-color-disabled-esndbs, var(--color-border-input-disabled-tz38ro, #eaeded));
|
|
436
|
+
color: var(--awsui-style-color-disabled-esndbs, var(--color-text-input-disabled-y5t5v9, #879596));
|
|
437
|
+
cursor: default;
|
|
438
|
+
box-shadow: var(--awsui-style-box-shadow-disabled-esndbs);
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
.awsui_input-prefix_2rhyz_997e8_439:not(#\9),
|
|
442
|
+
.awsui_input-suffix_2rhyz_997e8_440:not(#\9) {
|
|
443
|
+
display: flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
flex-shrink: 1;
|
|
446
|
+
max-inline-size: max(0px, (100% - 12rem) / 2);
|
|
447
|
+
min-inline-size: 0;
|
|
448
|
+
padding-block: var(--space-field-vertical-dgs6s0, 4px);
|
|
449
|
+
padding-inline: var(--space-field-horizontal-n5peob, 8px);
|
|
450
|
+
color: inherit;
|
|
451
|
+
font-size: var(--font-size-body-m-tq5a14, 14px);
|
|
452
|
+
line-height: var(--line-height-body-m-5xw6xo, 22px);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.awsui_input-adornment-content_2rhyz_997e8_453:not(#\9) {
|
|
456
|
+
display: block;
|
|
457
|
+
flex: 1;
|
|
458
|
+
min-inline-size: 0;
|
|
459
|
+
overflow: hidden;
|
|
460
|
+
text-overflow: ellipsis;
|
|
461
|
+
white-space: nowrap;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.awsui_input-adornment-divider_2rhyz_997e8_462:not(#\9) {
|
|
465
|
+
display: block;
|
|
466
|
+
flex-shrink: 0;
|
|
467
|
+
inline-size: var(--border-width-field-2365x3, 1px);
|
|
468
|
+
background-color: var(--color-border-divider-default-ipvpev, #eaeded);
|
|
469
|
+
align-self: stretch;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.awsui_input-adorned_2rhyz_997e8_145:not(#\9) {
|
|
473
|
+
flex: 1;
|
|
474
|
+
min-inline-size: 0;
|
|
475
|
+
border-block: none;
|
|
476
|
+
border-inline: none;
|
|
477
|
+
border-start-start-radius: 0;
|
|
478
|
+
border-start-end-radius: 0;
|
|
479
|
+
border-end-start-radius: 0;
|
|
480
|
+
border-end-end-radius: 0;
|
|
481
|
+
background-color: transparent;
|
|
482
|
+
box-shadow: none;
|
|
483
|
+
min-block-size: unset;
|
|
484
|
+
}
|
|
485
|
+
.awsui_input-adorned_2rhyz_997e8_145.awsui_input_2rhyz_997e8_145:not(#\9):focus {
|
|
486
|
+
border-block: 0;
|
|
487
|
+
border-inline: 0;
|
|
488
|
+
box-shadow: none;
|
|
489
|
+
outline: none;
|
|
490
|
+
}
|
|
491
|
+
.awsui_input-adorned_2rhyz_997e8_145:not(#\9):hover {
|
|
492
|
+
border-color: transparent;
|
|
493
|
+
background-color: transparent;
|
|
494
|
+
}
|
|
495
|
+
.awsui_input-adorned_2rhyz_997e8_145:not(#\9):disabled {
|
|
496
|
+
background-color: transparent;
|
|
497
|
+
border-color: transparent;
|
|
498
|
+
border-block: 0;
|
|
499
|
+
border-inline: 0;
|
|
500
|
+
}
|
|
501
|
+
.awsui_input-adorned_2rhyz_997e8_145.awsui_input-readonly_2rhyz_997e8_158:not(#\9) {
|
|
502
|
+
background-color: transparent;
|
|
503
|
+
border-color: transparent;
|
|
504
|
+
border-block: 0;
|
|
505
|
+
border-inline: 0;
|
|
506
|
+
}
|
|
507
|
+
.awsui_input-adorned_2rhyz_997e8_145.awsui_input-invalid_2rhyz_997e8_278:not(#\9), .awsui_input-adorned_2rhyz_997e8_145.awsui_input-warning_2rhyz_997e8_290:not(#\9) {
|
|
508
|
+
padding-inline-start: var(--space-field-horizontal-n5peob, 8px);
|
|
509
|
+
border-block: 0;
|
|
510
|
+
border-inline: 0;
|
|
511
|
+
border-inline-start-width: 0;
|
|
512
|
+
box-shadow: none;
|
|
513
|
+
}
|
|
514
|
+
.awsui_input-adorned_2rhyz_997e8_145.awsui_input-invalid_2rhyz_997e8_278:not(#\9):focus, .awsui_input-adorned_2rhyz_997e8_145.awsui_input-warning_2rhyz_997e8_290:not(#\9):focus {
|
|
515
|
+
border-block: 0;
|
|
516
|
+
border-inline: 0;
|
|
517
|
+
box-shadow: none;
|
|
518
|
+
outline: none;
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
.awsui_input-adorned-container-invalid_2rhyz_997e8_404 > .awsui_input-prefix_2rhyz_997e8_439:not(#\9),
|
|
522
|
+
.awsui_input-adorned-container-invalid_2rhyz_997e8_404 > .awsui_input-adorned_2rhyz_997e8_145:not(#\9):first-child,
|
|
523
|
+
.awsui_input-adorned-container-warning_2rhyz_997e8_417 > .awsui_input-prefix_2rhyz_997e8_439:not(#\9),
|
|
524
|
+
.awsui_input-adorned-container-warning_2rhyz_997e8_417 > .awsui_input-adorned_2rhyz_997e8_145:not(#\9):first-child {
|
|
525
|
+
padding-inline-start: calc(var(--space-field-horizontal-n5peob, 8px) - (var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)));
|
|
526
|
+
}
|
|
527
|
+
.awsui_input-adorned-container-invalid_2rhyz_997e8_404 > .awsui_input-prefix_2rhyz_997e8_439:not(#\9),
|
|
528
|
+
.awsui_input-adorned-container-invalid_2rhyz_997e8_404 > .awsui_input-suffix_2rhyz_997e8_440:not(#\9),
|
|
529
|
+
.awsui_input-adorned-container-warning_2rhyz_997e8_417 > .awsui_input-prefix_2rhyz_997e8_439:not(#\9),
|
|
530
|
+
.awsui_input-adorned-container-warning_2rhyz_997e8_417 > .awsui_input-suffix_2rhyz_997e8_440:not(#\9) {
|
|
531
|
+
max-inline-size: max(0px, (100% - 12rem + var(--border-invalid-width-b183os, 4px) - var(--border-width-field-2365x3, 1px)) / 2);
|
|
371
532
|
}
|
|
@@ -2,23 +2,33 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"
|
|
6
|
-
"input": "
|
|
7
|
-
"input-readonly": "awsui_input-
|
|
8
|
-
"input-
|
|
9
|
-
"
|
|
10
|
-
"input-
|
|
11
|
-
"input-
|
|
12
|
-
"input-
|
|
13
|
-
"input-
|
|
14
|
-
"input-
|
|
15
|
-
"input-
|
|
16
|
-
"input-
|
|
17
|
-
"input-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"inline-label-wrapper": "awsui_inline-label-
|
|
21
|
-
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-
|
|
22
|
-
"inline-label": "awsui_inline-
|
|
5
|
+
"input-adorned-container": "awsui_input-adorned-container_2rhyz_997e8_145",
|
|
6
|
+
"input": "awsui_input_2rhyz_997e8_145",
|
|
7
|
+
"input-adorned-container-readonly": "awsui_input-adorned-container-readonly_2rhyz_997e8_158",
|
|
8
|
+
"input-readonly": "awsui_input-readonly_2rhyz_997e8_158",
|
|
9
|
+
"root": "awsui_root_2rhyz_997e8_175",
|
|
10
|
+
"input-invalid": "awsui_input-invalid_2rhyz_997e8_278",
|
|
11
|
+
"input-has-icon-start": "awsui_input-has-icon-start_2rhyz_997e8_287",
|
|
12
|
+
"input-warning": "awsui_input-warning_2rhyz_997e8_290",
|
|
13
|
+
"input-type-search": "awsui_input-type-search_2rhyz_997e8_302",
|
|
14
|
+
"input-has-icon-end": "awsui_input-has-icon-end_2rhyz_997e8_315",
|
|
15
|
+
"input-has-no-border-radius": "awsui_input-has-no-border-radius_2rhyz_997e8_318",
|
|
16
|
+
"input-container": "awsui_input-container_2rhyz_997e8_325",
|
|
17
|
+
"input-icon-start": "awsui_input-icon-start_2rhyz_997e8_330",
|
|
18
|
+
"input-icon-end": "awsui_input-icon-end_2rhyz_997e8_337",
|
|
19
|
+
"input-button-right": "awsui_input-button-right_2rhyz_997e8_343",
|
|
20
|
+
"inline-label-trigger-wrapper": "awsui_inline-label-trigger-wrapper_2rhyz_997e8_347",
|
|
21
|
+
"inline-label-trigger-wrapper-full-width": "awsui_inline-label-trigger-wrapper-full-width_2rhyz_997e8_350",
|
|
22
|
+
"inline-label-wrapper": "awsui_inline-label-wrapper_2rhyz_997e8_354",
|
|
23
|
+
"inline-label-wrapper-full-width": "awsui_inline-label-wrapper-full-width_2rhyz_997e8_357",
|
|
24
|
+
"inline-label": "awsui_inline-label_2rhyz_997e8_347",
|
|
25
|
+
"input-adorned-container-invalid": "awsui_input-adorned-container-invalid_2rhyz_997e8_404",
|
|
26
|
+
"input-adorned-container-warning": "awsui_input-adorned-container-warning_2rhyz_997e8_417",
|
|
27
|
+
"input-adorned-container-disabled": "awsui_input-adorned-container-disabled_2rhyz_997e8_430",
|
|
28
|
+
"input-prefix": "awsui_input-prefix_2rhyz_997e8_439",
|
|
29
|
+
"input-suffix": "awsui_input-suffix_2rhyz_997e8_440",
|
|
30
|
+
"input-adornment-content": "awsui_input-adornment-content_2rhyz_997e8_453",
|
|
31
|
+
"input-adornment-divider": "awsui_input-adornment-divider_2rhyz_997e8_462",
|
|
32
|
+
"input-adorned": "awsui_input-adorned_2rhyz_997e8_145"
|
|
23
33
|
};
|
|
24
34
|
|
|
@@ -9,10 +9,10 @@ export const useSearchProps = (type, disabled, readOnly, value, inputRef, onChan
|
|
|
9
9
|
onChange('');
|
|
10
10
|
}, [inputRef, onChange]);
|
|
11
11
|
if (type === 'search' || type === 'visualSearch') {
|
|
12
|
-
searchProps.
|
|
12
|
+
searchProps.__startIcon = 'search';
|
|
13
13
|
if (!disabled && !readOnly && value) {
|
|
14
|
-
searchProps.
|
|
15
|
-
searchProps.
|
|
14
|
+
searchProps.__endIcon = 'close';
|
|
15
|
+
searchProps.__onEndIconClick = handleIconClick;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
return searchProps;
|