@cloudscape-design/components-themeable 3.0.1149 → 3.0.1151
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/template/alert/interfaces.d.ts +12 -0
- package/lib/internal/template/alert/interfaces.d.ts.map +1 -1
- package/lib/internal/template/alert/interfaces.js.map +1 -1
- package/lib/internal/template/alert/internal.d.ts.map +1 -1
- package/lib/internal/template/alert/internal.js +35 -3
- package/lib/internal/template/alert/internal.js.map +1 -1
- 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/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +14 -13
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/common.d.ts +2 -1
- package/lib/internal/template/flashbar/common.d.ts.map +1 -1
- package/lib/internal/template/flashbar/common.js +67 -1
- package/lib/internal/template/flashbar/common.js.map +1 -1
- package/lib/internal/template/flashbar/flash.d.ts.map +1 -1
- package/lib/internal/template/flashbar/flash.js +4 -4
- package/lib/internal/template/flashbar/flash.js.map +1 -1
- package/lib/internal/template/flashbar/interfaces.d.ts +8 -0
- package/lib/internal/template/flashbar/interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js +7 -6
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +13 -13
- package/lib/internal/template/input/styles.d.ts.map +1 -1
- package/lib/internal/template/input/styles.js +26 -36
- package/lib/internal/template/input/styles.js.map +1 -1
- 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/internal/persistence/index.d.ts +15 -0
- package/lib/internal/template/internal/persistence/index.d.ts.map +1 -0
- package/lib/internal/template/internal/persistence/index.js +42 -0
- package/lib/internal/template/internal/persistence/index.js.map +1 -0
- package/lib/internal/template/text-filter/interfaces.d.ts +48 -0
- package/lib/internal/template/text-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/text-filter/interfaces.js.map +1 -1
- package/lib/internal/template/text-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/text-filter/internal.js +2 -2
- package/lib/internal/template/text-filter/internal.js.map +1 -1
- package/lib/internal/template/text-filter/styles.d.ts +3 -0
- package/lib/internal/template/text-filter/styles.d.ts.map +1 -0
- package/lib/internal/template/text-filter/styles.js +44 -0
- package/lib/internal/template/text-filter/styles.js.map +1 -0
- package/package.json +1 -1
|
@@ -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,QA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AAC,gBAAgB,EAAE,qBAAqB,EAAE,aAAa,CAAC,EAChG,8BAA8B,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,KACzD,gBAAgB,GACpB,EAEJ,WAAW,EAAE,uBAAuB,EACpC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,cAAc,CAAC,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} 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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BAAiB,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,aAAa,CAAC,EAChG,8BAA8B,EAAE,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAC7D,KAAK,EAAE,KAAK,KACR,gBAAgB,GACpB,EAEJ,WAAW,EAAE,uBAAuB,EACpC,IAAI,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,CAAC,CAAC,cAAc,CAAC,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 (1128662a)";
|
|
3
|
+
export var GIT_SHA = "1128662a";
|
|
4
4
|
export var THEME = "open-source-visual-refresh";
|
|
5
5
|
export var SYSTEM = "console";
|
|
6
6
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertProps } from '../../alert/interfaces';
|
|
2
|
+
import { FlashbarProps } from '../../flashbar/interfaces';
|
|
3
|
+
interface PersistenceFunction {
|
|
4
|
+
persistFlashbarDismiss?: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<void>;
|
|
5
|
+
retrieveFlashbarDismiss?: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<boolean>;
|
|
6
|
+
persistAlertDismiss?: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<void>;
|
|
7
|
+
retrieveAlertDismiss?: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<boolean>;
|
|
8
|
+
}
|
|
9
|
+
export declare function setPersistenceFunctionsForTesting(functions: PersistenceFunction): void;
|
|
10
|
+
export declare let persistFlashbarDismiss: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<void>;
|
|
11
|
+
export declare let retrieveFlashbarDismiss: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<boolean>;
|
|
12
|
+
export declare let persistAlertDismiss: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<void>;
|
|
13
|
+
export declare let retrieveAlertDismiss: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<boolean>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/internal/persistence/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,UAAU,mBAAmB;IAC3B,sBAAsB,CAAC,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/F,uBAAuB,CAAC,EAAE,CAAC,iBAAiB,EAAE,aAAa,CAAC,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACnG,mBAAmB,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzF,oBAAoB,CAAC,EAAE,CAAC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CAC9F;AAED,wBAAgB,iCAAiC,CAAC,SAAS,EAAE,mBAAmB,QAa/E;AAGD,eAAO,IAAI,sBAAsB,GAE/B,mBAAmB,aAAa,CAAC,iBAAiB,KACjD,OAAO,CAAC,IAAI,CAEd,CAAC;AAGF,eAAO,IAAI,uBAAuB,GAEhC,mBAAmB,aAAa,CAAC,iBAAiB,KACjD,OAAO,CAAC,OAAO,CAEjB,CAAC;AAGF,eAAO,IAAI,mBAAmB,GAE5B,mBAAmB,UAAU,CAAC,iBAAiB,KAC9C,OAAO,CAAC,IAAI,CAEd,CAAC;AAGF,eAAO,IAAI,oBAAoB,GAE7B,mBAAmB,UAAU,CAAC,iBAAiB,KAC9C,OAAO,CAAC,OAAO,CAEjB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/* istanbul ignore file */
|
|
4
|
+
export function setPersistenceFunctionsForTesting(functions) {
|
|
5
|
+
if (functions.persistFlashbarDismiss) {
|
|
6
|
+
persistFlashbarDismiss = functions.persistFlashbarDismiss;
|
|
7
|
+
}
|
|
8
|
+
if (functions.retrieveFlashbarDismiss) {
|
|
9
|
+
retrieveFlashbarDismiss = functions.retrieveFlashbarDismiss;
|
|
10
|
+
}
|
|
11
|
+
if (functions.persistAlertDismiss) {
|
|
12
|
+
persistAlertDismiss = functions.persistAlertDismiss;
|
|
13
|
+
}
|
|
14
|
+
if (functions.retrieveAlertDismiss) {
|
|
15
|
+
retrieveAlertDismiss = functions.retrieveAlertDismiss;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
// eslint-disable-next-line require-await
|
|
19
|
+
export let persistFlashbarDismiss = async function (
|
|
20
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
21
|
+
persistenceConfig) {
|
|
22
|
+
return Promise.resolve();
|
|
23
|
+
};
|
|
24
|
+
// eslint-disable-next-line require-await
|
|
25
|
+
export let retrieveFlashbarDismiss = async function (
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
|
+
persistenceConfig) {
|
|
28
|
+
return Promise.resolve(false);
|
|
29
|
+
};
|
|
30
|
+
// eslint-disable-next-line require-await
|
|
31
|
+
export let persistAlertDismiss = async function (
|
|
32
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
33
|
+
persistenceConfig) {
|
|
34
|
+
return Promise.resolve();
|
|
35
|
+
};
|
|
36
|
+
// eslint-disable-next-line require-await
|
|
37
|
+
export let retrieveAlertDismiss = async function (
|
|
38
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
|
+
persistenceConfig) {
|
|
40
|
+
return Promise.resolve(false);
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/persistence/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,0BAA0B;AAY1B,MAAM,UAAU,iCAAiC,CAAC,SAA8B;IAC9E,IAAI,SAAS,CAAC,sBAAsB,EAAE,CAAC;QACrC,sBAAsB,GAAG,SAAS,CAAC,sBAAsB,CAAC;IAC5D,CAAC;IACD,IAAI,SAAS,CAAC,uBAAuB,EAAE,CAAC;QACtC,uBAAuB,GAAG,SAAS,CAAC,uBAAuB,CAAC;IAC9D,CAAC;IACD,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC;QAClC,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;IACtD,CAAC;IACD,IAAI,SAAS,CAAC,oBAAoB,EAAE,CAAC;QACnC,oBAAoB,GAAG,SAAS,CAAC,oBAAoB,CAAC;IACxD,CAAC;AACH,CAAC;AAED,yCAAyC;AACzC,MAAM,CAAC,IAAI,sBAAsB,GAAG,KAAK;AACvC,6DAA6D;AAC7D,iBAAkD;IAElD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,IAAI,uBAAuB,GAAG,KAAK;AACxC,6DAA6D;AAC7D,iBAAkD;IAElD,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,IAAI,mBAAmB,GAAG,KAAK;AACpC,6DAA6D;AAC7D,iBAA+C;IAE/C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,yCAAyC;AACzC,MAAM,CAAC,IAAI,oBAAoB,GAAG,KAAK;AACrC,6DAA6D;AAC7D,iBAA+C;IAE/C,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAChC,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n/* istanbul ignore file */\n\nimport { AlertProps } from '../../alert/interfaces';\nimport { FlashbarProps } from '../../flashbar/interfaces';\n\ninterface PersistenceFunction {\n persistFlashbarDismiss?: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<void>;\n retrieveFlashbarDismiss?: (persistenceConfig: FlashbarProps.PersistenceConfig) => Promise<boolean>;\n persistAlertDismiss?: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<void>;\n retrieveAlertDismiss?: (persistenceConfig: AlertProps.PersistenceConfig) => Promise<boolean>;\n}\n\nexport function setPersistenceFunctionsForTesting(functions: PersistenceFunction) {\n if (functions.persistFlashbarDismiss) {\n persistFlashbarDismiss = functions.persistFlashbarDismiss;\n }\n if (functions.retrieveFlashbarDismiss) {\n retrieveFlashbarDismiss = functions.retrieveFlashbarDismiss;\n }\n if (functions.persistAlertDismiss) {\n persistAlertDismiss = functions.persistAlertDismiss;\n }\n if (functions.retrieveAlertDismiss) {\n retrieveAlertDismiss = functions.retrieveAlertDismiss;\n }\n}\n\n// eslint-disable-next-line require-await\nexport let persistFlashbarDismiss = async function (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n persistenceConfig: FlashbarProps.PersistenceConfig\n): Promise<void> {\n return Promise.resolve();\n};\n\n// eslint-disable-next-line require-await\nexport let retrieveFlashbarDismiss = async function (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n persistenceConfig: FlashbarProps.PersistenceConfig\n): Promise<boolean> {\n return Promise.resolve(false);\n};\n\n// eslint-disable-next-line require-await\nexport let persistAlertDismiss = async function (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n persistenceConfig: AlertProps.PersistenceConfig\n): Promise<void> {\n return Promise.resolve();\n};\n\n// eslint-disable-next-line require-await\nexport let retrieveAlertDismiss = async function (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n persistenceConfig: AlertProps.PersistenceConfig\n): Promise<boolean> {\n return Promise.resolve(false);\n};\n"]}
|
|
@@ -48,6 +48,10 @@ export interface TextFilterProps extends BaseComponentProps, FormFieldControlPro
|
|
|
48
48
|
* period of time. If you want a delayed handler to invoke a filtering API call, you can use this event in addition to `onChange`.
|
|
49
49
|
*/
|
|
50
50
|
onDelayedChange?: NonCancelableEventHandler<TextFilterProps.ChangeDetail>;
|
|
51
|
+
/**
|
|
52
|
+
* @awsuiSystem core
|
|
53
|
+
*/
|
|
54
|
+
style?: TextFilterProps.Style;
|
|
51
55
|
}
|
|
52
56
|
export declare namespace TextFilterProps {
|
|
53
57
|
interface ChangeDetail {
|
|
@@ -59,5 +63,49 @@ export declare namespace TextFilterProps {
|
|
|
59
63
|
*/
|
|
60
64
|
focus(): void;
|
|
61
65
|
}
|
|
66
|
+
interface Style {
|
|
67
|
+
root?: {
|
|
68
|
+
backgroundColor?: {
|
|
69
|
+
default?: string;
|
|
70
|
+
disabled?: string;
|
|
71
|
+
focus?: string;
|
|
72
|
+
hover?: string;
|
|
73
|
+
readonly?: string;
|
|
74
|
+
};
|
|
75
|
+
borderColor?: {
|
|
76
|
+
default?: string;
|
|
77
|
+
disabled?: string;
|
|
78
|
+
focus?: string;
|
|
79
|
+
hover?: string;
|
|
80
|
+
readonly?: string;
|
|
81
|
+
};
|
|
82
|
+
borderRadius?: string;
|
|
83
|
+
borderWidth?: string;
|
|
84
|
+
boxShadow?: {
|
|
85
|
+
default?: string;
|
|
86
|
+
disabled?: string;
|
|
87
|
+
focus?: string;
|
|
88
|
+
hover?: string;
|
|
89
|
+
readonly?: string;
|
|
90
|
+
};
|
|
91
|
+
color?: {
|
|
92
|
+
default?: string;
|
|
93
|
+
disabled?: string;
|
|
94
|
+
focus?: string;
|
|
95
|
+
hover?: string;
|
|
96
|
+
readonly?: string;
|
|
97
|
+
};
|
|
98
|
+
fontSize?: string;
|
|
99
|
+
fontWeight?: string;
|
|
100
|
+
paddingBlock?: string;
|
|
101
|
+
paddingInline?: string;
|
|
102
|
+
};
|
|
103
|
+
placeholder?: {
|
|
104
|
+
color?: string;
|
|
105
|
+
fontSize?: string;
|
|
106
|
+
fontStyle?: string;
|
|
107
|
+
fontWeight?: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
62
110
|
}
|
|
63
111
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/text-filter/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qBAAqB,EAAE,gBAAgB;IAClG;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IAEjC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAEnE;;;OAGG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/text-filter/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,kBAAkB,EAAE,qBAAqB,EAA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;YACF,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,SAAS,CAAC,EAAE;gBACV,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,KAAK,CAAC,EAAE,MAAM,CAAC;gBACf,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;YACF,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,UAAU,CAAC,EAAE,MAAM,CAAC;YACpB,YAAY,CAAC,EAAE,MAAM,CAAC;YACtB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,KAAK,CAAC,EAAE,MAAM,CAAC;YACf,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE,MAAM,CAAC;YACnB,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/text-filter/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InputAutoCorrect } from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface TextFilterProps extends BaseComponentProps, FormFieldControlProps, InputAutoCorrect {\n /**\n * The current value of the filtering input.\n */\n filteringText: string;\n\n /**\n * Placeholder for the filtering input.\n */\n filteringPlaceholder?: string;\n\n /**\n * Label for the filtering input clear button.\n */\n filteringClearAriaLabel?: string;\n\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `filteringText` isn't empty.\n * When the `countText` or `filteringText` changes, it will be announced to assistive technologies.\n */\n countText?: string;\n\n /**\n * Set to `true` while the related collection is loading (e.g. during an async filtering action).\n * If set to `true`, the live announcement of countText by assistive technologies will be paused until it changes back to `false`.\n */\n loading?: boolean;\n\n /**\n * Specifies if the filtering input is disabled.\n * For example, you can use it if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering text.\n */\n disabled?: boolean;\n\n /**\n * Adds an `aria-label` on the filtering input.\n */\n filteringAriaLabel?: string;\n\n /**\n * Called when a change in filtering is caused by a user interaction. The event `detail` contains the current `filteringText`.\n */\n onChange?: NonCancelableEventHandler<TextFilterProps.ChangeDetail>;\n\n /**\n * Called after the user changes the value of the filtering input field and stops typing for a certain\n * period of time. If you want a delayed handler to invoke a filtering API call, you can use this event in addition to `onChange`.\n */\n onDelayedChange?: NonCancelableEventHandler<TextFilterProps.ChangeDetail>;\n}\n\nexport namespace TextFilterProps {\n export interface ChangeDetail {\n filteringText: string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/text-filter/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { InputAutoCorrect } from '../input/interfaces';\nimport { BaseComponentProps } from '../internal/base-component';\nimport { FormFieldControlProps } from '../internal/context/form-field-context';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface TextFilterProps extends BaseComponentProps, FormFieldControlProps, InputAutoCorrect {\n /**\n * The current value of the filtering input.\n */\n filteringText: string;\n\n /**\n * Placeholder for the filtering input.\n */\n filteringPlaceholder?: string;\n\n /**\n * Label for the filtering input clear button.\n */\n filteringClearAriaLabel?: string;\n\n /**\n * Accepts a human-readable, localized string that indicates the number of results. For example, \"1 match\" or \"165 matches.\"\n * If the total number of results is unknown, also include an indication that there may be more results than\n * the number listed. For example, \"25+ matches.\"\n *\n * The count text is only displayed when `filteringText` isn't empty.\n * When the `countText` or `filteringText` changes, it will be announced to assistive technologies.\n */\n countText?: string;\n\n /**\n * Set to `true` while the related collection is loading (e.g. during an async filtering action).\n * If set to `true`, the live announcement of countText by assistive technologies will be paused until it changes back to `false`.\n */\n loading?: boolean;\n\n /**\n * Specifies if the filtering input is disabled.\n * For example, you can use it if you are fetching new items upon filtering change\n * in order to prevent the user from changing the filtering text.\n */\n disabled?: boolean;\n\n /**\n * Adds an `aria-label` on the filtering input.\n */\n filteringAriaLabel?: string;\n\n /**\n * Called when a change in filtering is caused by a user interaction. The event `detail` contains the current `filteringText`.\n */\n onChange?: NonCancelableEventHandler<TextFilterProps.ChangeDetail>;\n\n /**\n * Called after the user changes the value of the filtering input field and stops typing for a certain\n * period of time. If you want a delayed handler to invoke a filtering API call, you can use this event in addition to `onChange`.\n */\n onDelayedChange?: NonCancelableEventHandler<TextFilterProps.ChangeDetail>;\n\n /**\n * @awsuiSystem core\n */\n style?: TextFilterProps.Style;\n}\n\nexport namespace TextFilterProps {\n export interface ChangeDetail {\n filteringText: string;\n }\n\n export interface Ref {\n /**\n * Sets focus on the underlying input control.\n */\n focus(): void;\n }\n\n export interface Style {\n root?: {\n backgroundColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderColor?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n borderRadius?: string;\n borderWidth?: string;\n boxShadow?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n color?: {\n default?: string;\n disabled?: string;\n focus?: string;\n hover?: string;\n readonly?: string;\n };\n fontSize?: string;\n fontWeight?: string;\n paddingBlock?: string;\n paddingInline?: string;\n };\n placeholder?: {\n color?: string;\n fontSize?: string;\n fontStyle?: string;\n fontWeight?: string;\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/text-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,QAAA,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/text-filter/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAIlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAQ/C,QAAA,MAAM,kBAAkB,0HAqEvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -12,7 +12,7 @@ import { useTableIntegration } from './analytics/use-table-integration';
|
|
|
12
12
|
import { SearchResults } from './search-results';
|
|
13
13
|
import useDebounceSearchResultCallback from './use-debounce-search-result-callback';
|
|
14
14
|
import styles from './styles.css.js';
|
|
15
|
-
const InternalTextFilter = React.forwardRef(({ filteringText, filteringAriaLabel, filteringPlaceholder, filteringClearAriaLabel, controlId, ariaLabelledby, ariaDescribedby, disabled, countText, disableBrowserAutocorrect, onChange, onDelayedChange, loading = false, __internalRootRef, ...rest }, ref) => {
|
|
15
|
+
const InternalTextFilter = React.forwardRef(({ filteringText, filteringAriaLabel, filteringPlaceholder, filteringClearAriaLabel, controlId, ariaLabelledby, ariaDescribedby, disabled, countText, disableBrowserAutocorrect, onChange, onDelayedChange, loading = false, style, __internalRootRef, ...rest }, ref) => {
|
|
16
16
|
const baseProps = getBaseProps(rest);
|
|
17
17
|
const inputRef = useRef(null);
|
|
18
18
|
const searchResultsRef = useRef(null);
|
|
@@ -30,7 +30,7 @@ const InternalTextFilter = React.forwardRef(({ filteringText, filteringAriaLabel
|
|
|
30
30
|
},
|
|
31
31
|
});
|
|
32
32
|
return (React.createElement("div", { ...baseProps, className: clsx(baseProps.className, styles.root), ref: __internalRootRef },
|
|
33
|
-
React.createElement(InternalInput, { __inheritFormFieldProps: true, disableBrowserAutocorrect: disableBrowserAutocorrect, ref: inputRef, className: styles.input, type: "search", ariaLabel: filteringAriaLabel, placeholder: filteringPlaceholder, value: filteringText, disabled: disabled, controlId: controlId, ariaLabelledby: ariaLabelledby, ariaDescribedby: joinStrings(showResults ? searchResultsId : undefined, ariaDescribedby), autoComplete: false, clearAriaLabel: filteringClearAriaLabel, onChange: event => fireNonCancelableEvent(onChange, { filteringText: event.detail.value }), __onDelayedInput: event => fireNonCancelableEvent(onDelayedChange, { filteringText: event.detail.value }) }),
|
|
33
|
+
React.createElement(InternalInput, { __inheritFormFieldProps: true, disableBrowserAutocorrect: disableBrowserAutocorrect, ref: inputRef, className: styles.input, type: "search", ariaLabel: filteringAriaLabel, placeholder: filteringPlaceholder, value: filteringText, disabled: disabled, controlId: controlId, ariaLabelledby: ariaLabelledby, ariaDescribedby: joinStrings(showResults ? searchResultsId : undefined, ariaDescribedby), autoComplete: false, clearAriaLabel: filteringClearAriaLabel, onChange: event => fireNonCancelableEvent(onChange, { filteringText: event.detail.value }), __onDelayedInput: event => fireNonCancelableEvent(onDelayedChange, { filteringText: event.detail.value }), style: style }),
|
|
34
34
|
showResults ? (React.createElement(SearchResults, { renderLiveRegion: !loading, id: searchResultsId, ref: searchResultsRef }, countText)) : null));
|
|
35
35
|
});
|
|
36
36
|
export default InternalTextFilter;
|
|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b,oBAAC,aAAa,IAAC,gBAAgB,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,gBAAgB,IAClF,SAAS,CACI,CACjB,CAAC,CAAC,CAAC,IAAI,CACJ,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, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport InternalInput from '../input/internal';\nimport { getBaseProps } from '../internal/base-component';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { joinStrings } from '../internal/utils/strings';\nimport { InternalLiveRegionRef } from '../live-region/internal';\nimport { useTableIntegration } from './analytics/use-table-integration';\nimport { TextFilterProps } from './interfaces';\nimport { SearchResults } from './search-results';\nimport useDebounceSearchResultCallback from './use-debounce-search-result-callback';\n\nimport styles from './styles.css.js';\n\ntype InternalTextFilterProps = TextFilterProps & InternalBaseComponentProps;\n\nconst InternalTextFilter = React.forwardRef(\n (\n {\n filteringText,\n filteringAriaLabel,\n filteringPlaceholder,\n filteringClearAriaLabel,\n controlId,\n ariaLabelledby,\n ariaDescribedby,\n disabled,\n countText,\n disableBrowserAutocorrect,\n onChange,\n onDelayedChange,\n loading = false,\n style,\n __internalRootRef,\n ...rest\n }: InternalTextFilterProps,\n ref: React.Ref<TextFilterProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const inputRef = useRef<HTMLInputElement>(null);\n const searchResultsRef = useRef<InternalLiveRegionRef>(null);\n useForwardFocus(ref, inputRef);\n useTableIntegration(filteringText, countText);\n\n const searchResultsId = useUniqueId('text-filter-search-results');\n const showResults = filteringText && countText && !disabled;\n\n useDebounceSearchResultCallback({\n searchQuery: filteringText,\n countText,\n loading,\n announceCallback: () => {\n searchResultsRef.current?.reannounce();\n },\n });\n\n return (\n <div {...baseProps} className={clsx(baseProps.className, styles.root)} ref={__internalRootRef}>\n <InternalInput\n __inheritFormFieldProps={true}\n disableBrowserAutocorrect={disableBrowserAutocorrect}\n ref={inputRef}\n className={styles.input}\n type=\"search\"\n ariaLabel={filteringAriaLabel}\n placeholder={filteringPlaceholder}\n value={filteringText}\n disabled={disabled}\n controlId={controlId}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={joinStrings(showResults ? searchResultsId : undefined, ariaDescribedby)}\n autoComplete={false}\n clearAriaLabel={filteringClearAriaLabel}\n onChange={event => fireNonCancelableEvent(onChange, { filteringText: event.detail.value })}\n __onDelayedInput={event => fireNonCancelableEvent(onDelayedChange, { filteringText: event.detail.value })}\n style={style}\n />\n {showResults ? (\n <SearchResults renderLiveRegion={!loading} id={searchResultsId} ref={searchResultsRef}>\n {countText}\n </SearchResults>\n ) : null}\n </div>\n );\n }\n);\n\nexport default InternalTextFilter;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/text-filter/styles.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,kBAuClE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { SYSTEM } from '../internal/environment';
|
|
4
|
+
import customCssProps from '../internal/generated/custom-css-properties';
|
|
5
|
+
export function getTextFilterStyles(style) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25;
|
|
7
|
+
let properties = {};
|
|
8
|
+
if (SYSTEM === 'core') {
|
|
9
|
+
properties = {
|
|
10
|
+
borderRadius: (_a = style === null || style === void 0 ? void 0 : style.root) === null || _a === void 0 ? void 0 : _a.borderRadius,
|
|
11
|
+
borderWidth: (_b = style === null || style === void 0 ? void 0 : style.root) === null || _b === void 0 ? void 0 : _b.borderWidth,
|
|
12
|
+
fontSize: (_c = style === null || style === void 0 ? void 0 : style.root) === null || _c === void 0 ? void 0 : _c.fontSize,
|
|
13
|
+
fontWeight: (_d = style === null || style === void 0 ? void 0 : style.root) === null || _d === void 0 ? void 0 : _d.fontWeight,
|
|
14
|
+
paddingBlock: (_e = style === null || style === void 0 ? void 0 : style.root) === null || _e === void 0 ? void 0 : _e.paddingBlock,
|
|
15
|
+
paddingInline: (_f = style === null || style === void 0 ? void 0 : style.root) === null || _f === void 0 ? void 0 : _f.paddingInline,
|
|
16
|
+
[customCssProps.styleBackgroundDefault]: (_h = (_g = style === null || style === void 0 ? void 0 : style.root) === null || _g === void 0 ? void 0 : _g.backgroundColor) === null || _h === void 0 ? void 0 : _h.default,
|
|
17
|
+
[customCssProps.styleBackgroundDisabled]: (_k = (_j = style === null || style === void 0 ? void 0 : style.root) === null || _j === void 0 ? void 0 : _j.backgroundColor) === null || _k === void 0 ? void 0 : _k.disabled,
|
|
18
|
+
[customCssProps.styleBackgroundHover]: (_m = (_l = style === null || style === void 0 ? void 0 : style.root) === null || _l === void 0 ? void 0 : _l.backgroundColor) === null || _m === void 0 ? void 0 : _m.hover,
|
|
19
|
+
[customCssProps.styleBackgroundFocus]: (_p = (_o = style === null || style === void 0 ? void 0 : style.root) === null || _o === void 0 ? void 0 : _o.backgroundColor) === null || _p === void 0 ? void 0 : _p.focus,
|
|
20
|
+
[customCssProps.styleBackgroundReadonly]: (_r = (_q = style === null || style === void 0 ? void 0 : style.root) === null || _q === void 0 ? void 0 : _q.backgroundColor) === null || _r === void 0 ? void 0 : _r.readonly,
|
|
21
|
+
[customCssProps.styleBorderColorDefault]: (_t = (_s = style === null || style === void 0 ? void 0 : style.root) === null || _s === void 0 ? void 0 : _s.borderColor) === null || _t === void 0 ? void 0 : _t.default,
|
|
22
|
+
[customCssProps.styleBorderColorDisabled]: (_v = (_u = style === null || style === void 0 ? void 0 : style.root) === null || _u === void 0 ? void 0 : _u.borderColor) === null || _v === void 0 ? void 0 : _v.disabled,
|
|
23
|
+
[customCssProps.styleBorderColorHover]: (_x = (_w = style === null || style === void 0 ? void 0 : style.root) === null || _w === void 0 ? void 0 : _w.borderColor) === null || _x === void 0 ? void 0 : _x.hover,
|
|
24
|
+
[customCssProps.styleBorderColorFocus]: (_z = (_y = style === null || style === void 0 ? void 0 : style.root) === null || _y === void 0 ? void 0 : _y.borderColor) === null || _z === void 0 ? void 0 : _z.focus,
|
|
25
|
+
[customCssProps.styleBorderColorReadonly]: (_1 = (_0 = style === null || style === void 0 ? void 0 : style.root) === null || _0 === void 0 ? void 0 : _0.borderColor) === null || _1 === void 0 ? void 0 : _1.readonly,
|
|
26
|
+
[customCssProps.styleBoxShadowDefault]: (_3 = (_2 = style === null || style === void 0 ? void 0 : style.root) === null || _2 === void 0 ? void 0 : _2.boxShadow) === null || _3 === void 0 ? void 0 : _3.default,
|
|
27
|
+
[customCssProps.styleBoxShadowDisabled]: (_5 = (_4 = style === null || style === void 0 ? void 0 : style.root) === null || _4 === void 0 ? void 0 : _4.boxShadow) === null || _5 === void 0 ? void 0 : _5.disabled,
|
|
28
|
+
[customCssProps.styleBoxShadowHover]: (_7 = (_6 = style === null || style === void 0 ? void 0 : style.root) === null || _6 === void 0 ? void 0 : _6.boxShadow) === null || _7 === void 0 ? void 0 : _7.hover,
|
|
29
|
+
[customCssProps.styleBoxShadowFocus]: (_9 = (_8 = style === null || style === void 0 ? void 0 : style.root) === null || _8 === void 0 ? void 0 : _8.boxShadow) === null || _9 === void 0 ? void 0 : _9.focus,
|
|
30
|
+
[customCssProps.styleBoxShadowReadonly]: (_11 = (_10 = style === null || style === void 0 ? void 0 : style.root) === null || _10 === void 0 ? void 0 : _10.boxShadow) === null || _11 === void 0 ? void 0 : _11.readonly,
|
|
31
|
+
[customCssProps.styleColorDefault]: (_13 = (_12 = style === null || style === void 0 ? void 0 : style.root) === null || _12 === void 0 ? void 0 : _12.color) === null || _13 === void 0 ? void 0 : _13.default,
|
|
32
|
+
[customCssProps.styleColorDisabled]: (_15 = (_14 = style === null || style === void 0 ? void 0 : style.root) === null || _14 === void 0 ? void 0 : _14.color) === null || _15 === void 0 ? void 0 : _15.disabled,
|
|
33
|
+
[customCssProps.styleColorHover]: (_17 = (_16 = style === null || style === void 0 ? void 0 : style.root) === null || _16 === void 0 ? void 0 : _16.color) === null || _17 === void 0 ? void 0 : _17.hover,
|
|
34
|
+
[customCssProps.styleColorFocus]: (_19 = (_18 = style === null || style === void 0 ? void 0 : style.root) === null || _18 === void 0 ? void 0 : _18.color) === null || _19 === void 0 ? void 0 : _19.focus,
|
|
35
|
+
[customCssProps.styleColorReadonly]: (_21 = (_20 = style === null || style === void 0 ? void 0 : style.root) === null || _20 === void 0 ? void 0 : _20.color) === null || _21 === void 0 ? void 0 : _21.readonly,
|
|
36
|
+
[customCssProps.stylePlaceholderColor]: (_22 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _22 === void 0 ? void 0 : _22.color,
|
|
37
|
+
[customCssProps.stylePlaceholderFontSize]: (_23 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _23 === void 0 ? void 0 : _23.fontSize,
|
|
38
|
+
[customCssProps.stylePlaceholderFontWeight]: (_24 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _24 === void 0 ? void 0 : _24.fontWeight,
|
|
39
|
+
[customCssProps.stylePlaceholderFontStyle]: (_25 = style === null || style === void 0 ? void 0 : style.placeholder) === null || _25 === void 0 ? void 0 : _25.fontStyle,
|
|
40
|
+
};
|
|
41
|
+
return properties;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/text-filter/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,mBAAmB,CAAC,KAA+B;;IACjE,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,UAAU,GAAG;YACX,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY;YACvC,WAAW,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,WAAW;YACrC,QAAQ,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,QAAQ;YAC/B,UAAU,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,UAAU;YACnC,YAAY,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,YAAY;YACvC,aAAa,EAAE,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,aAAa;YACzC,CAAC,cAAc,CAAC,sBAAsB,CAAC,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,eAAe,0CAAE,OAAO;YAC9E,CAAC,cAAc,CAAC,uBAAuB,CAAC,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,eAAe,0CAAE,QAAQ;YAChF,CAAC,cAAc,CAAC,oBAAoB,CAAC,EAAE,MAAA,MAAA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,CAAC,0BAA0B,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,UAAU;YAC3E,CAAC,cAAc,CAAC,yBAAyB,CAAC,EAAE,OAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,4CAAE,SAAS;SAC1E,CAAC;QAEF,OAAO,UAAU,CAAC;IACpB,CAAC;AACH,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 { TextFilterProps } from './interfaces';\n\nexport function getTextFilterStyles(style: TextFilterProps['style']) {\n let properties = {};\n\n if (SYSTEM === 'core') {\n properties = {\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.styleBackgroundDefault]: style?.root?.backgroundColor?.default,\n [customCssProps.styleBackgroundDisabled]: style?.root?.backgroundColor?.disabled,\n [customCssProps.styleBackgroundHover]: style?.root?.backgroundColor?.hover,\n [customCssProps.styleBackgroundFocus]: style?.root?.backgroundColor?.focus,\n [customCssProps.styleBackgroundReadonly]: style?.root?.backgroundColor?.readonly,\n [customCssProps.styleBorderColorDefault]: style?.root?.borderColor?.default,\n [customCssProps.styleBorderColorDisabled]: style?.root?.borderColor?.disabled,\n [customCssProps.styleBorderColorHover]: style?.root?.borderColor?.hover,\n [customCssProps.styleBorderColorFocus]: style?.root?.borderColor?.focus,\n [customCssProps.styleBorderColorReadonly]: style?.root?.borderColor?.readonly,\n [customCssProps.styleBoxShadowDefault]: style?.root?.boxShadow?.default,\n [customCssProps.styleBoxShadowDisabled]: style?.root?.boxShadow?.disabled,\n [customCssProps.styleBoxShadowHover]: style?.root?.boxShadow?.hover,\n [customCssProps.styleBoxShadowFocus]: style?.root?.boxShadow?.focus,\n [customCssProps.styleBoxShadowReadonly]: style?.root?.boxShadow?.readonly,\n [customCssProps.styleColorDefault]: style?.root?.color?.default,\n [customCssProps.styleColorDisabled]: style?.root?.color?.disabled,\n [customCssProps.styleColorHover]: style?.root?.color?.hover,\n [customCssProps.styleColorFocus]: style?.root?.color?.focus,\n [customCssProps.styleColorReadonly]: style?.root?.color?.readonly,\n [customCssProps.stylePlaceholderColor]: style?.placeholder?.color,\n [customCssProps.stylePlaceholderFontSize]: style?.placeholder?.fontSize,\n [customCssProps.stylePlaceholderFontWeight]: style?.placeholder?.fontWeight,\n [customCssProps.stylePlaceholderFontStyle]: style?.placeholder?.fontStyle,\n };\n\n return properties;\n }\n}\n"]}
|