@razorpay/blade 12.32.3 → 12.33.2
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/build/lib/native/components/Accordion/AccordionButton.native.js +1 -1
- package/build/lib/native/components/Accordion/AccordionButton.native.js.map +1 -1
- package/build/lib/native/components/Accordion/AccordionItemHeader.js +2 -1
- package/build/lib/native/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js +1 -1
- package/build/lib/native/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js +1 -1
- package/build/lib/native/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/native/components/ActionList/ActionListNoResults.js +2 -2
- package/build/lib/native/components/Alert/Alert.js +2 -2
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js +4 -4
- package/build/lib/native/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/native/components/BottomSheet/BottomSheetCommon.js +3 -3
- package/build/lib/native/components/Button/BaseButton/BaseButton.js +1 -1
- package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js +1 -1
- package/build/lib/native/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/native/components/Carousel/NavigationButton/NavigationButton.js +2 -2
- package/build/lib/native/components/Collapsible/CollapsibleChevronIcon.native.js +2 -2
- package/build/lib/native/components/Dropdown/Dropdown.js +1 -1
- package/build/lib/native/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js +1 -1
- package/build/lib/native/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/native/components/Dropdown/InputDropdownButton.native.js +7 -0
- package/build/lib/native/components/Dropdown/InputDropdownButton.native.js.map +1 -0
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js +1 -1
- package/build/lib/native/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/native/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/native/components/Form/FormHint.js +2 -2
- package/build/lib/native/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js +12 -0
- package/build/lib/native/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js.map +1 -0
- package/build/lib/native/components/Icons/useIconProps/iconSizeMap.js +8 -0
- package/build/lib/native/components/Icons/useIconProps/iconSizeMap.js.map +1 -0
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js +2 -4
- package/build/lib/native/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/native/components/InfoGroup/InfoGroup.native.js +7 -0
- package/build/lib/native/components/InfoGroup/InfoGroup.native.js.map +1 -0
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +2 -5
- package/build/lib/native/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/native/components/Input/DropdownInputTriggers/Chevron.js +2 -2
- package/build/lib/native/components/Input/PasswordInput/PasswordInput.js +2 -2
- package/build/lib/native/components/Input/SearchInput/SearchInput.js +14 -5
- package/build/lib/native/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/native/components/Input/TextArea/TextArea.js +2 -2
- package/build/lib/native/components/Input/TextInput/TextInput.js +13 -5
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Popover/PopoverCloseButton.js +2 -2
- package/build/lib/native/components/Table/tokens.js +2 -2
- package/build/lib/native/components/Typography/Text/Text.js +1 -1
- package/build/lib/native/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/native/components/index.js +3 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
- package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js +14 -0
- package/build/lib/native/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -0
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js +18 -2
- package/build/lib/web/development/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js +4 -3
- package/build/lib/web/development/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/development/components/Accordion/commonStyles.js +1 -11
- package/build/lib/web/development/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js +2 -1
- package/build/lib/web/development/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js +6 -3
- package/build/lib/web/development/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +24 -3
- package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js +14 -2
- package/build/lib/web/development/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js +19 -0
- package/build/lib/web/development/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/development/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownButton.js +4 -1
- package/build/lib/web/development/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js +4 -2
- package/build/lib/web/development/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js +180 -0
- package/build/lib/web/development/components/Dropdown/InputDropdownButton.web.js.map +1 -0
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js +2 -1
- package/build/lib/web/development/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/index.js +1 -0
- package/build/lib/web/development/components/Dropdown/index.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/development/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js +40 -0
- package/build/lib/web/development/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js.map +1 -0
- package/build/lib/web/development/components/Icons/ChevronUpDownIcon/index.js +2 -0
- package/build/lib/web/development/components/Icons/ChevronUpDownIcon/index.js.map +1 -0
- package/build/lib/web/development/components/Icons/index.js +1 -0
- package/build/lib/web/development/components/Icons/index.js.map +1 -1
- package/build/lib/web/development/components/Icons/useIconProps/iconSizeMap.js +14 -0
- package/build/lib/web/development/components/Icons/useIconProps/iconSizeMap.js.map +1 -0
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js +3 -12
- package/build/lib/web/development/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js +448 -0
- package/build/lib/web/development/components/InfoGroup/InfoGroup.web.js.map +1 -0
- package/build/lib/web/development/components/InfoGroup/InfoGroupContext.js +26 -0
- package/build/lib/web/development/components/InfoGroup/InfoGroupContext.js.map +1 -0
- package/build/lib/web/development/components/InfoGroup/index.js +3 -0
- package/build/lib/web/development/components/InfoGroup/index.js.map +1 -0
- package/build/lib/web/development/components/InfoGroup/infoGroupTokens.js +49 -0
- package/build/lib/web/development/components/InfoGroup/infoGroupTokens.js.map +1 -0
- package/build/lib/web/development/components/InfoGroup/types.js +2 -0
- package/build/lib/web/development/components/InfoGroup/types.js.map +1 -0
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +10 -4
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +32 -8
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +8 -4
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +25 -124
- package/build/lib/web/development/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +6 -4
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js +97 -30
- package/build/lib/web/development/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +123 -31
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/Typography/Text/Text.js +0 -1
- package/build/lib/web/development/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/development/components/index.js +4 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js +5 -0
- package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/development/utils/useControlledDropdownInput/index.js +2 -0
- package/build/lib/web/development/utils/useControlledDropdownInput/index.js.map +1 -0
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js +108 -0
- package/build/lib/web/development/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -0
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js +18 -2
- package/build/lib/web/production/components/Accordion/AccordionItemHeader.js.map +1 -1
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js +4 -3
- package/build/lib/web/production/components/Accordion/StyledAccordionButton.web.js.map +1 -1
- package/build/lib/web/production/components/Accordion/commonStyles.js +1 -11
- package/build/lib/web/production/components/Accordion/commonStyles.js.map +1 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js +2 -1
- package/build/lib/web/production/components/ActionList/ActionListItem.js.map +1 -1
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js +6 -3
- package/build/lib/web/production/components/BaseHeaderFooter/BaseHeader.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +24 -3
- package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js +14 -2
- package/build/lib/web/production/components/Button/BaseButton/StyledBaseButton.web.js.map +1 -1
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js +19 -0
- package/build/lib/web/production/components/Button/BaseButton/buttonTokens.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js +4 -1
- package/build/lib/web/production/components/Dropdown/Dropdown.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownButton.js +4 -1
- package/build/lib/web/production/components/Dropdown/DropdownButton.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js +4 -2
- package/build/lib/web/production/components/Dropdown/DropdownOverlay.web.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js +180 -0
- package/build/lib/web/production/components/Dropdown/InputDropdownButton.web.js.map +1 -0
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js +2 -1
- package/build/lib/web/production/components/Dropdown/dropdownComponentIds.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/index.js +1 -0
- package/build/lib/web/production/components/Dropdown/index.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/useDropdown.js.map +1 -1
- package/build/lib/web/production/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js +40 -0
- package/build/lib/web/production/components/Icons/ChevronUpDownIcon/ChevronUpDownIcon.js.map +1 -0
- package/build/lib/web/production/components/Icons/ChevronUpDownIcon/index.js +2 -0
- package/build/lib/web/production/components/Icons/ChevronUpDownIcon/index.js.map +1 -0
- package/build/lib/web/production/components/Icons/index.js +1 -0
- package/build/lib/web/production/components/Icons/index.js.map +1 -1
- package/build/lib/web/production/components/Icons/useIconProps/iconSizeMap.js +14 -0
- package/build/lib/web/production/components/Icons/useIconProps/iconSizeMap.js.map +1 -0
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js +3 -12
- package/build/lib/web/production/components/Icons/useIconProps/useIconProps.js.map +1 -1
- package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js +448 -0
- package/build/lib/web/production/components/InfoGroup/InfoGroup.web.js.map +1 -0
- package/build/lib/web/production/components/InfoGroup/InfoGroupContext.js +26 -0
- package/build/lib/web/production/components/InfoGroup/InfoGroupContext.js.map +1 -0
- package/build/lib/web/production/components/InfoGroup/index.js +3 -0
- package/build/lib/web/production/components/InfoGroup/index.js.map +1 -0
- package/build/lib/web/production/components/InfoGroup/infoGroupTokens.js +49 -0
- package/build/lib/web/production/components/InfoGroup/infoGroupTokens.js.map +1 -0
- package/build/lib/web/production/components/InfoGroup/types.js +2 -0
- package/build/lib/web/production/components/InfoGroup/types.js.map +1 -0
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +10 -4
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +32 -8
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +8 -4
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js +25 -124
- package/build/lib/web/production/components/Input/DropdownInputTriggers/BaseDropdownInputTrigger.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +6 -4
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js +97 -30
- package/build/lib/web/production/components/Input/SearchInput/SearchInput.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +123 -31
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/Typography/Text/Text.js +0 -1
- package/build/lib/web/production/components/Typography/Text/Text.js.map +1 -1
- package/build/lib/web/production/components/index.js +4 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js +5 -0
- package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
- package/build/lib/web/production/utils/useControlledDropdownInput/index.js +2 -0
- package/build/lib/web/production/utils/useControlledDropdownInput/index.js.map +1 -0
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js +108 -0
- package/build/lib/web/production/utils/useControlledDropdownInput/useControlledDropdownInput.js.map +1 -0
- package/build/types/components/index.d.ts +4446 -3019
- package/build/types/components/index.native.d.ts +2782 -2661
- package/package.json +2 -2
|
@@ -41,7 +41,7 @@ import { getOuterMotionRef, getInnerMotionRef } from '../../../utils/getMotionRe
|
|
|
41
41
|
import { makeAnalyticsAttribute } from '../../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
42
42
|
import { useInputGroupContext } from '../../InputGroup/InputGroupContext.js';
|
|
43
43
|
|
|
44
|
-
var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip","_motionMeta","role","tabIndex"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref11){var theme=_ref11.theme,currentInteraction=_ref11.currentInteraction,isTableInputCell=_ref11.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(theme.motion.easing[baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing])}):{}};});var _BaseInput=function _BaseInput(_ref12,ref){var _inputGroupProps$isDi,_inputGroupProps$size;var _ref12$as=_ref12.as,as=_ref12$as===void 0?'input':_ref12$as,label=_ref12.label,_ref12$labelPosition=_ref12.labelPosition,labelPosition=_ref12$labelPosition===void 0?'top':_ref12$labelPosition,placeholder=_ref12.placeholder,_ref12$type=_ref12.type,type=_ref12$type===void 0?'text':_ref12$type,defaultValue=_ref12.defaultValue,tags=_ref12.tags,_ref12$showAllTags=_ref12.showAllTags,showAllTags=_ref12$showAllTags===void 0?false:_ref12$showAllTags,_ref12$activeTagIndex=_ref12.activeTagIndex,activeTagIndex=_ref12$activeTagIndex===void 0?-1:_ref12$activeTagIndex,setActiveTagIndex=_ref12.setActiveTagIndex,name=_ref12.name,value=_ref12.value,onFocus=_ref12.onFocus,onChange=_ref12.onChange,onInput=_ref12.onInput,onBlur=_ref12.onBlur,onSubmit=_ref12.onSubmit,onClick=_ref12.onClick,onKeyDown=_ref12.onKeyDown,isDisabled=_ref12.isDisabled,necessityIndicator=_ref12.necessityIndicator,validationState=_ref12.validationState,errorText=_ref12.errorText,helpText=_ref12.helpText,successText=_ref12.successText,isRequired=_ref12.isRequired,leadingIcon=_ref12.leadingIcon,prefix=_ref12.prefix,trailingInteractionElement=_ref12.trailingInteractionElement,onTrailingInteractionElementClick=_ref12.onTrailingInteractionElementClick,leadingInteractionElement=_ref12.leadingInteractionElement,suffix=_ref12.suffix,trailingIcon=_ref12.trailingIcon,maxCharacters=_ref12.maxCharacters,textAlign=_ref12.textAlign,autoFocus=_ref12.autoFocus,keyboardReturnKeyType=_ref12.keyboardReturnKeyType,keyboardType=_ref12.keyboardType,autoCompleteSuggestionType=_ref12.autoCompleteSuggestionType,trailingHeaderSlot=_ref12.trailingHeaderSlot,trailingFooterSlot=_ref12.trailingFooterSlot,numberOfLines=_ref12.numberOfLines,id=_ref12.id,componentName=_ref12.componentName,accessibilityLabel=_ref12.accessibilityLabel,labelId=_ref12.labelId,activeDescendant=_ref12.activeDescendant,hideLabelText=_ref12.hideLabelText,hideFormHint=_ref12.hideFormHint,hasPopup=_ref12.hasPopup,popupId=_ref12.popupId,isPopupExpanded=_ref12.isPopupExpanded,maxTagRows=_ref12.maxTagRows,shouldIgnoreBlurAnimation=_ref12.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref12.setShouldIgnoreBlurAnimation,autoCapitalize=_ref12.autoCapitalize,setInputWrapperRef=_ref12.setInputWrapperRef,testID=_ref12.testID,isDropdownTrigger=_ref12.isDropdownTrigger,isLabelInsideInput=_ref12.isLabelInsideInput,_ref12$size=_ref12.size,size=_ref12$size===void 0?'medium':_ref12$size,trailingButton=_ref12.trailingButton,_ref12$valueComponent=_ref12.valueComponentType,valueComponentType=_ref12$valueComponent===void 0?'text':_ref12$valueComponent,_ref12$isTableInputCe=_ref12.isTableInputCell,isTableInputCell=_ref12$isTableInputCe===void 0?false:_ref12$isTableInputCe,_ref12$showHintsAsToo=_ref12.showHintsAsTooltip,showHintsAsTooltip=_ref12$showHintsAsToo===void 0?false:_ref12$showHintsAsToo,_motionMeta=_ref12._motionMeta,role=_ref12.role,tabIndex=_ref12.tabIndex,rest=_objectWithoutProperties(_ref12,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';var defaultRole=hasPopup?'combobox':undefined;var inputGroupProps=useInputGroupContext();var isInsideInputGroup=inputGroupProps.isInsideInputGroup;var _isDisabled=(_inputGroupProps$isDi=inputGroupProps.isDisabled)!=null?_inputGroupProps$isDi:isDisabled;var _size=(_inputGroupProps$size=inputGroupProps.size)!=null?_inputGroupProps$size:size;React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(_isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:role!=null?role:defaultRole,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({ref:getOuterMotionRef({_motionMeta:_motionMeta,ref:ref})},metaAttribute({name:componentName,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&!isInsideInputGroup&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:_size,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,className:"focus-ring-wrapper",children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:_isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:_size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:_size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:_isDisabled,leadingInteractionElement:leadingInteractionElement}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:_isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){var innerRef=getInnerMotionRef({_motionMeta:_motionMeta,ref:ref});if(innerRef&&!isReactNative&&'current'in innerRef){var _innerRef$current;(_innerRef$current=innerRef.current)==null?void 0:_innerRef$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:_size,numberOfLines:numberOfLines,isTextArea:isTextArea,children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:getInnerMotionRef({_motionMeta:_motionMeta,ref:mergedInputRef}),name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:_isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:_size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell,tabIndex:tabIndex},metaAttribute({name:MetaConstants.StyledBaseInput}),makeAnalyticsAttribute(rest)))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:_isDisabled,validationState:validationState,trailingButton:trailingButton,size:_size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip})]})})]}),hideFormHint||showHintsAsTooltip||isInsideInputGroup?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[_size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:_size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
|
|
44
|
+
var _excluded=["as","label","labelPosition","placeholder","type","defaultValue","tags","showAllTags","activeTagIndex","setActiveTagIndex","name","value","onFocus","onChange","onInput","onBlur","onSubmit","onClick","onKeyDown","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","size","trailingButton","valueComponentType","isTableInputCell","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown"];var autoCompleteSuggestionTypeValues=['none','on','name','email','username','password','newPassword','oneTimeCode','telephone','postalCode','countryName','creditCardNumber','creditCardCSC','creditCardExpiry','creditCardExpiryMonth','creditCardExpiryYear'];var useTags=function useTags(tags,activeTagIndex,setActiveTagIndex){var visibleTagsCountRef=React__default.useRef(0);React__default.useEffect(function(){if(tags&&activeTagIndex>=0&&activeTagIndex<tags.length){var _tags$activeTagIndex,_tags$activeTagIndex$;var tagTitle=(_tags$activeTagIndex=tags[activeTagIndex])==null?void 0:(_tags$activeTagIndex$=_tags$activeTagIndex.props)==null?void 0:_tags$activeTagIndex$.children;if(tagTitle){announce(`Close ${tagTitle} Tag`);}}},[activeTagIndex,tags==null?void 0:tags.length]);var onTagLeft=function onTagLeft(){if(activeTagIndex<0){setActiveTagIndex==null?void 0:setActiveTagIndex(visibleTagsCountRef.current-1);}if(activeTagIndex>0){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex-1);}};var onTagRight=function onTagRight(){if(activeTagIndex<visibleTagsCountRef.current-1){setActiveTagIndex==null?void 0:setActiveTagIndex(activeTagIndex+1);}};var onTagRemove=function onTagRemove(){if(activeTagIndex>=0&&activeTagIndex<visibleTagsCountRef.current&&tags){tags[activeTagIndex].props.onDismiss({tagIndex:activeTagIndex});}};var onInputKeydownTagHandler=function onInputKeydownTagHandler(key){if(tags&&tags.length>0){if(key==='ArrowRight'){onTagRight();}if(key==='ArrowLeft'){onTagLeft();}if(key==='Backspace'){onTagRemove();}}};return {onInputKeydownTagHandler:onInputKeydownTagHandler,visibleTagsCountRef:visibleTagsCountRef};};var useInput=function useInput(_ref){var value=_ref.value,defaultValue=_ref.defaultValue,onClick=_ref.onClick,onFocus=_ref.onFocus,onChange=_ref.onChange,onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,onInput=_ref.onInput,onKeyDown=_ref.onKeyDown,onInputKeydownTagHandler=_ref.onInputKeydownTagHandler;if(__DEV__){if(value&&defaultValue){throwBladeError({message:`Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,moduleName:'Input'});}}var _React$useState=React__default.useState(defaultValue!=null?defaultValue:value),_React$useState2=_slicedToArray(_React$useState,2),inputValue=_React$useState2[0],setInputValue=_React$useState2[1];var handleOnFocus=React__default.useCallback(function(_ref2){var name=_ref2.name,value=_ref2.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value;_value=(_value$target$value=value==null?void 0:value.target.value)!=null?_value$target$value:'';}onFocus==null?void 0:onFocus({name:name,value:_value});},[onFocus]);var handleOnClick=React__default.useCallback(function(_ref3){var name=_ref3.name,value=_ref3.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$currentTarget$;_value=(_value$currentTarget$=value==null?void 0:value.currentTarget.value)!=null?_value$currentTarget$:'';}onClick==null?void 0:onClick({name:name,value:_value});},[onClick]);var handleOnSubmit=React__default.useCallback(function(_ref4){var name=_ref4.name,value=_ref4.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value2;_value=(_value$target$value2=value==null?void 0:value.target.value)!=null?_value$target$value2:'';}if(isReactNative()){onSubmit==null?void 0:onSubmit({name:name,value:_value});}},[onSubmit]);var handleOnBlur=React__default.useCallback(function(_ref5){var name=_ref5.name,value=_ref5.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value3;_value=(_value$target$value3=value==null?void 0:value.target.value)!=null?_value$target$value3:'';}onBlur==null?void 0:onBlur({name:name,value:_value});},[onBlur]);var handleOnChange=React__default.useCallback(function(_ref6){var name=_ref6.name,value=_ref6.value;var _value='';if(getPlatformType()==='react-native'&&typeof value==='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value4;_value=(_value$target$value4=value==null?void 0:value.target.value)!=null?_value$target$value4:'';}onChange==null?void 0:onChange({name:name,value:_value});setInputValue(_value);},[onChange]);var handleOnInput=React__default.useCallback(function(_ref7){var name=_ref7.name,value=_ref7.value;var _value='';if(getPlatformType()==='react-native'&&typeof value=='string'){_value=value;}else if(typeof value!=='string'){var _value$target$value5;_value=(_value$target$value5=value==null?void 0:value.target.value)!=null?_value$target$value5:'';}onInput==null?void 0:onInput({name:name,value:_value});},[onInput]);var handleOnKeyDown=React__default.useCallback(function(_ref8){var name=_ref8.name,key=_ref8.key,code=_ref8.code,event=_ref8.event;onInputKeydownTagHandler(key);onKeyDown==null?void 0:onKeyDown({name:name,key:key,code:code,event:event});},[onKeyDown]);return {handleOnFocus:handleOnFocus,handleOnClick:handleOnClick,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,inputValue:inputValue};};var getHintType=function getHintType(_ref9){var validationState=_ref9.validationState,hasHelpText=_ref9.hasHelpText;if(validationState==='error'){return 'error';}if(validationState==='success'){return 'success';}if(hasHelpText){return 'help';}return 'help';};var getDescribedByElementId=function getDescribedByElementId(_ref10){var validationState=_ref10.validationState,hasErrorText=_ref10.hasErrorText,hasSuccessText=_ref10.hasSuccessText,hasHelpText=_ref10.hasHelpText,errorTextId=_ref10.errorTextId,successTextId=_ref10.successTextId,helpTextId=_ref10.helpTextId;if(validationState==='error'&&hasErrorText){return errorTextId;}if(validationState==='success'&&hasSuccessText){return successTextId;}if(hasHelpText){return helpTextId;}return '';};var FocusRingWrapper=styled(BaseBox)(function(_ref11){var theme=_ref11.theme,currentInteraction=_ref11.currentInteraction,isTableInputCell=_ref11.isTableInputCell;return {borderRadius:makeBorderSize(isTableInputCell?theme.border.radius.none:theme.border.radius.medium),width:'100%','&:focus-within':!isTableInputCell?Object.assign({},getFocusRingStyles(),{transitionDuration:castWebType(makeMotionTime(getIn(theme.motion.duration,baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].duration))),transitionTimingFunction:castWebType(theme.motion.easing[baseInputBorderBackgroundMotion[currentInteraction==='focus'?'enter':'exit'].easing])}):{}};});var _BaseInput=function _BaseInput(_ref12,ref){var _inputGroupProps$isDi,_inputGroupProps$size;var _ref12$as=_ref12.as,as=_ref12$as===void 0?'input':_ref12$as,label=_ref12.label,_ref12$labelPosition=_ref12.labelPosition,labelPosition=_ref12$labelPosition===void 0?'top':_ref12$labelPosition,placeholder=_ref12.placeholder,_ref12$type=_ref12.type,type=_ref12$type===void 0?'text':_ref12$type,defaultValue=_ref12.defaultValue,tags=_ref12.tags,_ref12$showAllTags=_ref12.showAllTags,showAllTags=_ref12$showAllTags===void 0?false:_ref12$showAllTags,_ref12$activeTagIndex=_ref12.activeTagIndex,activeTagIndex=_ref12$activeTagIndex===void 0?-1:_ref12$activeTagIndex,setActiveTagIndex=_ref12.setActiveTagIndex,name=_ref12.name,value=_ref12.value,onFocus=_ref12.onFocus,onChange=_ref12.onChange,onInput=_ref12.onInput,onBlur=_ref12.onBlur,onSubmit=_ref12.onSubmit,onClick=_ref12.onClick,onKeyDown=_ref12.onKeyDown,isDisabled=_ref12.isDisabled,necessityIndicator=_ref12.necessityIndicator,validationState=_ref12.validationState,errorText=_ref12.errorText,helpText=_ref12.helpText,successText=_ref12.successText,isRequired=_ref12.isRequired,leadingIcon=_ref12.leadingIcon,prefix=_ref12.prefix,trailingInteractionElement=_ref12.trailingInteractionElement,onTrailingInteractionElementClick=_ref12.onTrailingInteractionElementClick,leadingInteractionElement=_ref12.leadingInteractionElement,suffix=_ref12.suffix,trailingIcon=_ref12.trailingIcon,maxCharacters=_ref12.maxCharacters,textAlign=_ref12.textAlign,autoFocus=_ref12.autoFocus,keyboardReturnKeyType=_ref12.keyboardReturnKeyType,keyboardType=_ref12.keyboardType,autoCompleteSuggestionType=_ref12.autoCompleteSuggestionType,trailingHeaderSlot=_ref12.trailingHeaderSlot,trailingFooterSlot=_ref12.trailingFooterSlot,numberOfLines=_ref12.numberOfLines,id=_ref12.id,componentName=_ref12.componentName,accessibilityLabel=_ref12.accessibilityLabel,labelId=_ref12.labelId,activeDescendant=_ref12.activeDescendant,hideLabelText=_ref12.hideLabelText,hideFormHint=_ref12.hideFormHint,hasPopup=_ref12.hasPopup,popupId=_ref12.popupId,isPopupExpanded=_ref12.isPopupExpanded,maxTagRows=_ref12.maxTagRows,shouldIgnoreBlurAnimation=_ref12.shouldIgnoreBlurAnimation,setShouldIgnoreBlurAnimation=_ref12.setShouldIgnoreBlurAnimation,autoCapitalize=_ref12.autoCapitalize,setInputWrapperRef=_ref12.setInputWrapperRef,testID=_ref12.testID,isDropdownTrigger=_ref12.isDropdownTrigger,isLabelInsideInput=_ref12.isLabelInsideInput,_ref12$size=_ref12.size,size=_ref12$size===void 0?'medium':_ref12$size,trailingButton=_ref12.trailingButton,_ref12$valueComponent=_ref12.valueComponentType,valueComponentType=_ref12$valueComponent===void 0?'text':_ref12$valueComponent,_ref12$isTableInputCe=_ref12.isTableInputCell,isTableInputCell=_ref12$isTableInputCe===void 0?false:_ref12$isTableInputCe,_ref12$showHintsAsToo=_ref12.showHintsAsTooltip,showHintsAsTooltip=_ref12$showHintsAsToo===void 0?false:_ref12$showHintsAsToo,_motionMeta=_ref12._motionMeta,role=_ref12.role,tabIndex=_ref12.tabIndex,leadingDropDown=_ref12.leadingDropDown,trailingDropDown=_ref12.trailingDropDown,rest=_objectWithoutProperties(_ref12,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var inputRef=React__default.useRef(null);var mergedInputRef=useMergeRefs(ref,inputRef);var inputWrapperRef=React__default.useRef(null);var _useTags=useTags(tags,activeTagIndex,setActiveTagIndex),onInputKeydownTagHandler=_useTags.onInputKeydownTagHandler,visibleTagsCountRef=_useTags.visibleTagsCountRef;var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),showAllTagsWithAnimation=_React$useState4[0],setShowAllTagsWithAnimation=_React$useState4[1];var isReactNative=getPlatformType()==='react-native';var defaultRole=hasPopup?'combobox':undefined;var inputGroupProps=useInputGroupContext();var isInsideInputGroup=inputGroupProps.isInsideInputGroup;var _isDisabled=(_inputGroupProps$isDi=inputGroupProps.isDisabled)!=null?_inputGroupProps$isDi:isDisabled;var _size=(_inputGroupProps$size=inputGroupProps.size)!=null?_inputGroupProps$size:size;React__default.useEffect(function(){if(showAllTags){setShowAllTagsWithAnimation(true);}else if(maxTagRows!=='expandable'){setShowAllTagsWithAnimation(false);}},[showAllTags,maxTagRows]);var _useInput=useInput({defaultValue:defaultValue,value:value,onFocus:onFocus,onClick:onClick,onChange:onChange,onBlur:onBlur,onSubmit:onSubmit,onInput:onInput,onKeyDown:onKeyDown,onInputKeydownTagHandler:onInputKeydownTagHandler}),handleOnFocus=_useInput.handleOnFocus,handleOnChange=_useInput.handleOnChange,handleOnClick=_useInput.handleOnClick,handleOnBlur=_useInput.handleOnBlur,handleOnSubmit=_useInput.handleOnSubmit,handleOnInput=_useInput.handleOnInput,handleOnKeyDown=_useInput.handleOnKeyDown,inputValue=_useInput.inputValue;var _useFormId=useFormId(id),inputId=_useFormId.inputId,helpTextId=_useFormId.helpTextId,errorTextId=_useFormId.errorTextId,successTextId=_useFormId.successTextId;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var isLabelLeftPositioned=labelPosition==='left'&&matchedDeviceType==='desktop';var _useInteraction=useInteraction(),currentInteraction=_useInteraction.currentInteraction,setCurrentInteraction=_useInteraction.setCurrentInteraction;var _isRequired=isRequired||necessityIndicator==='required';var accessibilityProps=makeAccessible({required:Boolean(_isRequired),disabled:Boolean(_isDisabled),invalid:Boolean(validationState==='error'),describedBy:getDescribedByElementId({validationState:validationState,hasErrorText:Boolean(errorText),hasSuccessText:Boolean(successText),hasHelpText:Boolean(helpText),errorTextId:errorTextId,successTextId:successTextId,helpTextId:helpTextId}),label:accessibilityLabel,hasPopup:hasPopup,expanded:hasPopup?isPopupExpanded:undefined,controls:hasPopup?popupId:undefined,role:role!=null?role:defaultRole,activeDescendant:activeDescendant});var willRenderHintText=Boolean(helpText)||validationState==='success'&&Boolean(successText)||validationState==='error'&&Boolean(errorText);if(__DEV__){if(autoCompleteSuggestionType&&!autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)){throwBladeError({message:`Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(', ')} but received ${autoCompleteSuggestionType}`,moduleName:'Input'});}}var isTextArea=as==='textarea';return jsxs(BaseBox,Object.assign({ref:getOuterMotionRef({_motionMeta:_motionMeta,ref:ref})},metaAttribute({name:componentName,testID:testID}),getStyledProps(rest),{children:[jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'row':'column',justifyContent:isLabelLeftPositioned?'center':undefined,alignItems:isLabelLeftPositioned?'center':undefined,position:"relative",width:"100%",children:[!hideLabelText&&!isLabelInsideInput&&label&&!isInsideInputGroup&&jsxs(BaseBox,{display:"flex",flexDirection:isLabelLeftPositioned?'column':'row',justifyContent:"space-between",alignSelf:isTextArea?'flex-start':undefined,marginY:isTextArea&&isLabelLeftPositioned?'spacing.3':'spacing.0',children:[jsx(FormLabel,{as:"label",necessityIndicator:necessityIndicator,position:labelPosition,id:labelId,htmlFor:inputId,size:_size,children:label}),trailingHeaderSlot==null?void 0:trailingHeaderSlot(value!=null?value:inputValue)]}),jsx(FocusRingWrapper,{currentInteraction:currentInteraction,isTableInputCell:isTableInputCell,className:"focus-ring-wrapper",children:jsxs(BaseInputWrapper,{isDropdownTrigger:isDropdownTrigger,isTextArea:isTextArea,isDisabled:_isDisabled,validationState:validationState,currentInteraction:currentInteraction,isLabelLeftPositioned:isLabelLeftPositioned,showAllTags:showAllTags,setShowAllTagsWithAnimation:setShowAllTagsWithAnimation,ref:function ref(refNode){if(refNode){setInputWrapperRef==null?void 0:setInputWrapperRef(refNode);inputWrapperRef.current=refNode;}},maxTagRows:maxTagRows,size:_size,numberOfLines:numberOfLines,onClick:function onClick(){if(!isReactNative){var _inputRef$current;(_inputRef$current=inputRef.current)==null?void 0:_inputRef$current.focus();}},isTableInputCell:isTableInputCell,children:[jsx(BaseInputVisuals,{size:_size,leadingIcon:leadingIcon,prefix:prefix,isDisabled:_isDisabled,leadingInteractionElement:leadingInteractionElement,leadingDropDown:leadingDropDown}),jsx(BaseInputTagSlot,{renderAs:as,tags:tags,isDisabled:_isDisabled,showAllTags:showAllTagsWithAnimation,setFocusOnInput:function setFocusOnInput(){var innerRef=getInnerMotionRef({_motionMeta:_motionMeta,ref:ref});if(innerRef&&!isReactNative&&'current'in innerRef){var _innerRef$current;(_innerRef$current=innerRef.current)==null?void 0:_innerRef$current.focus();}},labelPrefix:isLabelInsideInput?label:undefined,isDropdownTrigger:isDropdownTrigger,visibleTagsCountRef:visibleTagsCountRef,handleOnInputClick:function handleOnInputClick(e){handleOnClick({name:name,value:isReactNative?value:e});},setShouldIgnoreBlurAnimation:setShouldIgnoreBlurAnimation,maxTagRows:maxTagRows,inputWrapperRef:inputWrapperRef,size:_size,numberOfLines:numberOfLines,isTextArea:isTextArea,hasLeadingDropDown:Boolean(leadingDropDown),children:jsx(StyledBaseInput,Object.assign({as:as,id:inputId,ref:getInnerMotionRef({_motionMeta:_motionMeta,ref:mergedInputRef}),name:name,type:type,defaultValue:defaultValue,value:value,placeholder:placeholder,isDisabled:_isDisabled,validationState:validationState,isRequired:_isRequired,handleOnFocus:handleOnFocus,handleOnChange:handleOnChange,handleOnBlur:handleOnBlur,handleOnSubmit:handleOnSubmit,handleOnInput:handleOnInput,handleOnKeyDown:handleOnKeyDown,handleOnClick:handleOnClick,leadingIcon:leadingIcon,prefix:prefix,trailingInteractionElement:trailingInteractionElement,leadingInteractionElement:leadingInteractionElement,suffix:suffix,trailingIcon:trailingIcon,maxCharacters:maxCharacters,textAlign:textAlign,autoFocus:autoFocus,keyboardReturnKeyType:keyboardReturnKeyType,keyboardType:keyboardType,autoCompleteSuggestionType:autoCompleteSuggestionType,accessibilityProps:accessibilityProps,currentInteraction:currentInteraction,setCurrentInteraction:setCurrentInteraction,numberOfLines:numberOfLines,isTextArea:isTextArea||maxTagRows==='multiple'||maxTagRows==='expandable',hasPopup:hasPopup,hasTags:!!(tags&&tags.length>0),shouldIgnoreBlurAnimation:shouldIgnoreBlurAnimation,autoCapitalize:autoCapitalize,isDropdownTrigger:isDropdownTrigger,$size:_size,valueComponentType:valueComponentType,isTableInputCell:isTableInputCell,tabIndex:tabIndex,hasLeadingDropdown:Boolean(leadingDropDown)},metaAttribute({name:MetaConstants.StyledBaseInput}),makeAnalyticsAttribute(rest)))}),jsx(BaseInputVisuals,{trailingInteractionElement:trailingInteractionElement,onTrailingInteractionElementClick:onTrailingInteractionElementClick,suffix:suffix,trailingIcon:trailingIcon,isDisabled:_isDisabled,validationState:validationState,trailingButton:trailingButton,size:_size,errorText:errorText,successText:successText,showHintsAsTooltip:showHintsAsTooltip,trailingDropDown:trailingDropDown})]})})]}),hideFormHint||showHintsAsTooltip||isInsideInputGroup?null:jsx(BaseBox,{marginLeft:makeSize(isLabelLeftPositioned&&!hideLabelText?formHintLeftLabelMarginLeft[_size]:0),children:jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:willRenderHintText?'space-between':'flex-end',children:[jsx(FormHint,{type:getHintType({validationState:validationState,hasHelpText:Boolean(helpText)}),helpText:helpText,errorText:errorText,successText:successText,helpTextId:helpTextId,errorTextId:errorTextId,successTextId:successTextId,size:_size}),trailingFooterSlot==null?void 0:trailingFooterSlot(value!=null?value:inputValue)]})})]}));};var BaseInputWithRef=React__default.forwardRef(_BaseInput);var BaseInput=assignWithoutSideEffects(BaseInputWithRef,{displayName:'BaseInput'});
|
|
45
45
|
|
|
46
46
|
export { BaseInput, getHintType };
|
|
47
47
|
//# sourceMappingURL=BaseInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type {\n BladeElementRef,\n ContainerElementType,\n DataAnalyticsAttribute,\n TestID,\n} from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { MotionMetaProp } from '~components/BaseMotion';\nimport { getInnerMotionRef, getOuterMotionRef } from '~utils/getMotionRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useInputGroupContext } from '~components/InputGroup/InputGroupContext';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n DataAnalyticsAttribute &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Callback to be invoked when the TrailingInteractionElement is clicked\n */\n onTrailingInteractionElementClick?: () => void;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 1 | 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n /**\n * Whether to render the input as a table cell\n * @default true\n **/\n isTableInputCell?: boolean;\n /**\n * Hides the form hints and shows them as tooltip of trailing\n */\n showHintsAsTooltip?: boolean;\n\n role?: AriaAttributes['role'];\n\n /**\n * Tab Index of the input field\n *\n * @default undefined\n */\n tabIndex?: number;\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade &\n MotionMetaProp;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n className: string;\n}>(({ theme, currentInteraction, isTableInputCell }) => ({\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n width: '100%',\n '&:focus-within': !isTableInputCell\n ? {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n theme.motion.easing[\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .easing\n ],\n ),\n }\n : {},\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n isTableInputCell = false,\n showHintsAsTooltip = false,\n _motionMeta,\n role,\n tabIndex,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n const defaultRole = hasPopup ? 'combobox' : undefined;\n\n const inputGroupProps = useInputGroupContext();\n const { isInsideInputGroup } = inputGroupProps;\n const _isDisabled = inputGroupProps.isDisabled ?? isDisabled;\n const _size = inputGroupProps.size ?? size;\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(_isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: role ?? defaultRole,\n activeDescendant,\n });\n\n const willRenderHintText =\n Boolean(helpText) ||\n (validationState === 'success' && Boolean(successText)) ||\n (validationState === 'error' && Boolean(errorText));\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n return (\n <BaseBox\n ref={getOuterMotionRef({ _motionMeta, ref })}\n {...metaAttribute({ name: componentName, testID })}\n {...getStyledProps(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {/* If the input is in an input group, we don't want to render the label */}\n {!hideLabelText && !isLabelInsideInput && label && !isInsideInputGroup && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea ? 'flex-start' : undefined}\n marginY={isTextArea && isLabelLeftPositioned ? 'spacing.3' : 'spacing.0'}\n >\n <FormLabel\n as=\"label\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={labelId}\n htmlFor={inputId}\n size={_size}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper\n currentInteraction={currentInteraction}\n isTableInputCell={isTableInputCell}\n className=\"focus-ring-wrapper\"\n >\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={_isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={_size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputVisuals\n size={_size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={_isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={_isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n const innerRef = getInnerMotionRef({ _motionMeta, ref });\n if (innerRef && !isReactNative && 'current' in innerRef) {\n innerRef.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={_size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={getInnerMotionRef({ _motionMeta, ref: mergedInputRef as any }) as never}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={_isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={_size}\n valueComponentType={valueComponentType}\n isTableInputCell={isTableInputCell}\n tabIndex={tabIndex}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n onTrailingInteractionElementClick={onTrailingInteractionElementClick}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={_isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={_size}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={showHintsAsTooltip}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n {/* If the input is in an input group, we don't want to render the hint text */}\n {hideFormHint || showHintsAsTooltip || isInsideInputGroup ? null : (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[_size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={_size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","__DEV__","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref10","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","_ref11","theme","currentInteraction","isTableInputCell","borderRadius","makeBorderSize","border","radius","none","medium","width","Object","assign","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref12","ref","_inputGroupProps$isDi","_inputGroupProps$size","_ref12$as","as","label","_ref12$labelPosition","labelPosition","placeholder","_ref12$type","type","_ref12$showAllTags","showAllTags","_ref12$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref12$size","size","trailingButton","_ref12$valueComponent","valueComponentType","_ref12$isTableInputCe","_ref12$showHintsAsToo","showHintsAsTooltip","_motionMeta","role","tabIndex","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","defaultRole","undefined","inputGroupProps","useInputGroupContext","isInsideInputGroup","_isDisabled","_size","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","controls","willRenderHintText","includes","join","isTextArea","_jsxs","getOuterMotionRef","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","className","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","innerRef","getInnerMotionRef","_innerRef$current","labelPrefix","handleOnInputClick","e","StyledBaseInput","hasTags","$size","MetaConstants","makeAnalyticsAttribute","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6hCA0aA,IAAMA,gCAAgC,CAAG,CACvC,MAAM,CACN,IAAI,CACJ,MAAM,CACN,OAAO,CACP,UAAU,CACV,UAAU,CACV,aAAa,CACb,aAAa,CACb,WAAW,CACX,YAAY,CACZ,aAAa,CACb,kBAAkB,CAClB,eAAe,CACf,kBAAkB,CAClB,uBAAuB,CACvB,sBAAsB,CACvB,CAGD,IAAMC,OAAO,CAAG,SAAVA,OAAOA,CACXC,IAA4B,CAC5BC,cAAsB,CACtBC,iBAAoD,CAIjD,CACH,IAAMC,mBAAmB,CAAGC,cAAK,CAACC,MAAM,CAAS,CAAC,CAAC,CAEnDD,cAAK,CAACE,SAAS,CAAC,UAAM,CACpB,GAAIN,IAAI,EAAIC,cAAc,EAAI,CAAC,EAAIA,cAAc,CAAGD,IAAI,CAACO,MAAM,CAAE,CAAAC,IAAAA,oBAAA,CAAAC,qBAAA,CAC/D,IAAMC,QAAQ,CAAA,CAAAF,oBAAA,CAAGR,IAAI,CAACC,cAAc,CAAC,GAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAAQ,qBAAA,CAApBD,oBAAA,CAAsBG,KAAK,GAA3BF,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,qBAAA,CAA6BG,QAAQ,CACtD,GAAIF,QAAQ,CAAE,CACZ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nD,kBAAkB,EAAA,IAAA,CAAA,KAAA,CAAA,CAAlBA,kBAAkB,CAAGzH,KAAK,EAAA,IAAA,CAALA,KAAK,CAAIiB,UAAU,CAAC,CAAA,CACnC,CAAC,CACH,CACV,CACM,CAAA,CAAA,CAAC,CAEd,CAAC,CAED,IAAM4N,gBAAgB,CAAGjQ,cAAK,CAACkQ,UAAU,CAACzJ,UAAU,CAAC,CAC/C,IAAA0J,SAAS,CAAGC,wBAAwB,CAACH,gBAAgB,CAAE,CAAEI,WAAW,CAAE,WAAY,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BaseInput.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type {\n BladeElementRef,\n ContainerElementType,\n DataAnalyticsAttribute,\n TestID,\n} from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { MotionMetaProp } from '~components/BaseMotion';\nimport { getInnerMotionRef, getOuterMotionRef } from '~utils/getMotionRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useInputGroupContext } from '~components/InputGroup/InputGroupContext';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n DataAnalyticsAttribute &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Callback to be invoked when the TrailingInteractionElement is clicked\n */\n onTrailingInteractionElementClick?: () => void;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Leading DropDown to be rendered at Prefix slot\n */\n leadingDropDown?: ReactNode;\n /**\n * Trailing DropDown to be rendered at Suffix slot\n */\n trailingDropDown?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 1 | 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n /**\n * Whether to render the input as a table cell\n * @default true\n **/\n isTableInputCell?: boolean;\n /**\n * Hides the form hints and shows them as tooltip of trailing\n */\n showHintsAsTooltip?: boolean;\n\n role?: AriaAttributes['role'];\n\n /**\n * Tab Index of the input field\n *\n * @default undefined\n */\n tabIndex?: number;\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade &\n MotionMetaProp;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n className: string;\n}>(({ theme, currentInteraction, isTableInputCell }) => ({\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n width: '100%',\n '&:focus-within': !isTableInputCell\n ? {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n theme.motion.easing[\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .easing\n ],\n ),\n }\n : {},\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n isTableInputCell = false,\n showHintsAsTooltip = false,\n _motionMeta,\n role,\n tabIndex,\n leadingDropDown,\n trailingDropDown,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n const defaultRole = hasPopup ? 'combobox' : undefined;\n\n const inputGroupProps = useInputGroupContext();\n const { isInsideInputGroup } = inputGroupProps;\n const _isDisabled = inputGroupProps.isDisabled ?? isDisabled;\n const _size = inputGroupProps.size ?? size;\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(_isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: role ?? defaultRole,\n activeDescendant,\n });\n\n const willRenderHintText =\n Boolean(helpText) ||\n (validationState === 'success' && Boolean(successText)) ||\n (validationState === 'error' && Boolean(errorText));\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n return (\n <BaseBox\n ref={getOuterMotionRef({ _motionMeta, ref })}\n {...metaAttribute({ name: componentName, testID })}\n {...getStyledProps(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {/* If the input is in an input group, we don't want to render the label */}\n {!hideLabelText && !isLabelInsideInput && label && !isInsideInputGroup && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea ? 'flex-start' : undefined}\n marginY={isTextArea && isLabelLeftPositioned ? 'spacing.3' : 'spacing.0'}\n >\n <FormLabel\n as=\"label\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={labelId}\n htmlFor={inputId}\n size={_size}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper\n currentInteraction={currentInteraction}\n isTableInputCell={isTableInputCell}\n className=\"focus-ring-wrapper\"\n >\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={_isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={_size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputVisuals\n size={_size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={_isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n leadingDropDown={leadingDropDown}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={_isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n const innerRef = getInnerMotionRef({ _motionMeta, ref });\n if (innerRef && !isReactNative && 'current' in innerRef) {\n innerRef.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={_size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n hasLeadingDropDown={Boolean(leadingDropDown)}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={getInnerMotionRef({ _motionMeta, ref: mergedInputRef as any }) as never}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={_isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={_size}\n valueComponentType={valueComponentType}\n isTableInputCell={isTableInputCell}\n tabIndex={tabIndex}\n hasLeadingDropdown={Boolean(leadingDropDown)}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n onTrailingInteractionElementClick={onTrailingInteractionElementClick}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={_isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={_size}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={showHintsAsTooltip}\n trailingDropDown={trailingDropDown}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n {/* If the input is in an input group, we don't want to render the hint text */}\n {hideFormHint || showHintsAsTooltip || isInsideInputGroup ? null : (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[_size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={_size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","__DEV__","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref10","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","_ref11","theme","currentInteraction","isTableInputCell","borderRadius","makeBorderSize","border","radius","none","medium","width","Object","assign","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref12","ref","_inputGroupProps$isDi","_inputGroupProps$size","_ref12$as","as","label","_ref12$labelPosition","labelPosition","placeholder","_ref12$type","type","_ref12$showAllTags","showAllTags","_ref12$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref12$size","size","trailingButton","_ref12$valueComponent","valueComponentType","_ref12$isTableInputCe","_ref12$showHintsAsToo","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","defaultRole","undefined","inputGroupProps","useInputGroupContext","isInsideInputGroup","_isDisabled","_size","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","controls","willRenderHintText","includes","join","isTextArea","_jsxs","getOuterMotionRef","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","className","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","innerRef","getInnerMotionRef","_innerRef$current","labelPrefix","handleOnInputClick","e","hasLeadingDropDown","StyledBaseInput","hasTags","$size","hasLeadingDropdown","MetaConstants","makeAnalyticsAttribute","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kkCAkbA,IAAMA,gCAAgC,CAAG,CACvC,MAAM,CACN,IAAI,CACJ,MAAM,CACN,OAAO,CACP,UAAU,CACV,UAAU,CACV,aAAa,CACb,aAAa,CACb,WAAW,CACX,YAAY,CACZ,aAAa,CACb,kBAAkB,CAClB,eAAe,CACf,kBAAkB,CAClB,uBAAuB,CACvB,sBAAsB,CACvB,CAGD,IAAMC,OAAO,CAAG,SAAVA,OAAOA,CACXC,IAA4B,CAC5BC,cAAsB,CACtBC,iBAAoD,CAIjD,CACH,IAAMC,mBAAmB,CAAGC,cAAK,CAACC,MAAM,CAAS,CAAC,CAAC,CAEnDD,cAAK,CAACE,SAAS,CAAC,UAAM,CACpB,GAAIN,IAAI,EAAIC,cAAc,EAAI,CAAC,EAAIA,cAAc,CAAGD,IAAI,CAACO,MAAM,CAAE,KAAAC,oBAAA,CAAAC,qBAAA,CAC/D,IAAMC,QAAQ,CAAAF,CAAAA,oBAAA,CAAGR,IAAI,CAACC,cAAc,CAAC,GAAAQ,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,CAAAA,qBAAA,CAApBD,oBAAA,CAAsBG,KAAK,GAA3BF,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,qBAAA,CAA6BG,QAAQ,CACtD,GAAIF,QAAQ,CAAE,CACZG,QAAQ,CAAE,CAAQH,MAAAA,EAAAA,QAAS,CAAK,IAAA,CAAA,CAAC,CACnC,CACF,CAEF,CAAC,CAAE,CAACT,cAAc,CAAED,IAAI,EAAA,IAAA,CAAA,KAAA,CAAA,CAAJA,IAAI,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,OAALA,KAAK,CAAIiB,UAAU,CAAC,CACnC,CAAA,CAAC,CACH,CACV,CAAA,CAAA,CACM,CAAC,CAEd,CAAC,CAED,IAAMgO,gBAAgB,CAAGrQ,cAAK,CAACsQ,UAAU,CAAC7J,UAAU,CAAC,CAC/C,IAAA8J,SAAS,CAAGC,wBAAwB,CAACH,gBAAgB,CAAE,CAAEI,WAAW,CAAE,WAAY,CAAC;;;;"}
|
|
@@ -15,7 +15,7 @@ import { isReactNative } from '../../../utils/platform/isReactNative.js';
|
|
|
15
15
|
import '../../BladeProvider/useTheme.js';
|
|
16
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
|
-
var getVisualContainerStyles=function getVisualContainerStyles(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},shouldStretchTrailingBox=_ref.shouldStretchTrailingBox;return {display:'flex',flexDirection:'row',alignItems:'center',alignSelf:shouldStretchTrailingBox?'stretch':'center'};};var trailingIconColor={none:'surface.icon.gray.subtle',error:'feedback.icon.negative.intense',success:'feedback.icon.positive.intense'};var iconSize={medium:'medium',large:'large'};var textSize={medium:'medium',large:'large'};var getPrefixStyles=function getPrefixStyles(_ref2){var hasLeadingIcon=_ref2.hasLeadingIcon,hasPrefix=_ref2.hasPrefix;if(hasPrefix&&hasLeadingIcon){return {paddingLeft:'spacing.3'};}if(hasPrefix&&!hasLeadingIcon){return {paddingLeft:'spacing.4'};}return {paddingLeft:'spacing.0'};};var getInteractionElementStyles=function getInteractionElementStyles(_ref3){var hasTrailingIcon=_ref3.hasTrailingIcon,hasLeadingInteractionElement=_ref3.hasLeadingInteractionElement,hasTrailingInteractionElement=_ref3.hasTrailingInteractionElement,hasSuffix=_ref3.hasSuffix,hasTrailingButton=_ref3.hasTrailingButton;if(hasTrailingInteractionElement&&(hasSuffix||hasTrailingIcon||hasTrailingButton)){return 'spacing.2';}if(hasTrailingInteractionElement&&!hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return 'spacing.4';}if(hasLeadingInteractionElement){return 'spacing.3';}return 'spacing.0';};var getSuffixStyles=function getSuffixStyles(_ref4){var hasTrailingIcon=_ref4.hasTrailingIcon,hasSuffix=_ref4.hasSuffix,hasTrailingButton=_ref4.hasTrailingButton;if(hasSuffix&&(hasTrailingIcon||hasTrailingButton)){return {paddingRight:'spacing.3'};}if(hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getTrailingIconStyles=function getTrailingIconStyles(_ref5){var hasTrailingIcon=_ref5.hasTrailingIcon,hasTrailingButton=_ref5.hasTrailingButton;if(hasTrailingIcon&&hasTrailingButton){return {paddingRight:'spacing.3'};}if(hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getInputVisualsToBeRendered=function getInputVisualsToBeRendered(_ref6){var leadingIcon=_ref6.leadingIcon,prefix=_ref6.prefix,trailingInteractionElement=_ref6.trailingInteractionElement,leadingInteractionElement=_ref6.leadingInteractionElement,suffix=_ref6.suffix,trailingIcon=_ref6.trailingIcon,trailingButton=_ref6.trailingButton;return {hasLeadingIcon:Boolean(leadingIcon),hasPrefix:Boolean(prefix),hasTrailingInteractionElement:Boolean(trailingInteractionElement),hasLeadingInteractionElement:Boolean(leadingInteractionElement),hasSuffix:Boolean(suffix),hasTrailingIcon:Boolean(trailingIcon),hasTrailingButton:Boolean(trailingButton)};};var getTooltipContent=function getTooltipContent(_ref7){var validationState=_ref7.validationState,errorText=_ref7.errorText,successText=_ref7.successText;if(validationState==='error'&&errorText){return errorText;}if(validationState==='success'&&successText){return successText;}return '';};var ValidationIconTooltip=function ValidationIconTooltip(_ref8){var children=_ref8.children,validationState=_ref8.validationState,errorText=_ref8.errorText,successText=_ref8.successText,showHintsAsTooltip=_ref8.showHintsAsTooltip;if(showHintsAsTooltip&&validationState==='error'&&errorText||validationState==='success'&&successText){return jsx(Tooltip,{content:getTooltipContent({validationState:validationState,errorText:errorText,successText:successText}),children:jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",children:children})});}return children;};var BaseInputVisuals=function BaseInputVisuals(_ref9){var LeadingIcon=_ref9.leadingIcon,prefix=_ref9.prefix,trailingInteractionElement=_ref9.trailingInteractionElement,onTrailingInteractionElementClick=_ref9.onTrailingInteractionElementClick,leadingInteractionElement=_ref9.leadingInteractionElement,suffix=_ref9.suffix,TrailingIcon=_ref9.trailingIcon,isDisabled=_ref9.isDisabled,_ref9$validationState=_ref9.validationState,validationState=_ref9$validationState===void 0?'none':_ref9$validationState,size=_ref9.size,showHintsAsTooltip=_ref9.showHintsAsTooltip,errorText=_ref9.errorText,successText=_ref9.successText,TrailingButton=_ref9.trailingButton;var _getInputVisualsToBeR=getInputVisualsToBeRendered({leadingIcon:LeadingIcon,prefix:prefix,leadingInteractionElement:leadingInteractionElement,trailingInteractionElement:trailingInteractionElement,suffix:suffix,trailingIcon:TrailingIcon,trailingButton:TrailingButton,size:size}),hasLeadingIcon=_getInputVisualsToBeR.hasLeadingIcon,hasPrefix=_getInputVisualsToBeR.hasPrefix,hasSuffix=_getInputVisualsToBeR.hasSuffix,hasTrailingInteractionElement=_getInputVisualsToBeR.hasTrailingInteractionElement,hasLeadingInteractionElement=_getInputVisualsToBeR.hasLeadingInteractionElement,hasTrailingIcon=_getInputVisualsToBeR.hasTrailingIcon,hasTrailingButton=_getInputVisualsToBeR.hasTrailingButton;var hasLeadingVisuals=hasLeadingInteractionElement||hasLeadingIcon||hasPrefix;var hasTrailingVisuals=hasTrailingInteractionElement||hasSuffix||hasTrailingIcon||hasTrailingButton;if(__DEV__){if(hasTrailingButton&&!isValidAllowedChildren(TrailingButton,'Link')){throwBladeError({message:'trailingButton must be a valid Blade Link component',moduleName:'BaseInput'});}}if(hasLeadingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles(),{children:[hasLeadingInteractionElement?jsx(BaseBox,{paddingLeft:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasLeadingInteractionElement:hasLeadingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),display:"flex",alignItems:"stretch",alignSelf:"stretch",children:leadingInteractionElement}):null,LeadingIcon?jsx(BaseBox,{paddingLeft:"spacing.4",display:"flex",children:jsx(LeadingIcon,{size:iconSize[size],color:isDisabled?'surface.icon.gray.disabled':'surface.icon.gray.muted'})}):null,hasPrefix?jsx(BaseBox,Object.assign({},getPrefixStyles({hasLeadingIcon:hasLeadingIcon,hasPrefix:hasPrefix}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:prefix})})):null]}));}if(hasTrailingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:[hasTrailingInteractionElement?jsx(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:jsx(BaseBox,Object.assign({paddingRight:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingInteractionElement:hasTrailingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),display:"flex",alignItems:"stretch",alignSelf:"stretch"},!isReactNative()&&{onClick:onTrailingInteractionElementClick},{children:trailingInteractionElement}))})):null,hasSuffix?jsx(BaseBox,Object.assign({},getSuffixStyles({hasTrailingIcon:hasTrailingIcon,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:suffix})})):null,TrailingIcon?jsx(BaseBox,Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},getTrailingIconStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingButton:hasTrailingButton}),{children:jsx(ValidationIconTooltip,{showHintsAsTooltip:showHintsAsTooltip,errorText:errorText,successText:successText,validationState:validationState,children:jsx(TrailingIcon,{size:iconSize[size],color:isDisabled?'interactive.icon.gray.disabled':trailingIconColor[validationState]})})})):null,TrailingButton?jsx(BaseBox,{paddingRight:"spacing.4",display:"flex",children:React__default.cloneElement(TrailingButton,{size:size,variant:'button',isDisabled:isDisabled})}):null]}));}return null;};
|
|
18
|
+
var getVisualContainerStyles=function getVisualContainerStyles(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},shouldStretchTrailingBox=_ref.shouldStretchTrailingBox;return {display:'flex',flexDirection:'row',alignItems:'center',alignSelf:shouldStretchTrailingBox?'stretch':'center'};};var trailingIconColor={none:'surface.icon.gray.subtle',error:'feedback.icon.negative.intense',success:'feedback.icon.positive.intense'};var iconSize={medium:'medium',large:'large'};var textSize={medium:'medium',large:'large'};var getPrefixStyles=function getPrefixStyles(_ref2){var hasLeadingIcon=_ref2.hasLeadingIcon,hasPrefix=_ref2.hasPrefix;if(hasPrefix&&hasLeadingIcon){return {paddingLeft:'spacing.3'};}if(hasPrefix&&!hasLeadingIcon){return {paddingLeft:'spacing.4'};}return {paddingLeft:'spacing.0'};};var getInteractionElementStyles=function getInteractionElementStyles(_ref3){var hasTrailingIcon=_ref3.hasTrailingIcon,hasLeadingInteractionElement=_ref3.hasLeadingInteractionElement,hasLeadingDropDown=_ref3.hasLeadingDropDown,hasTrailingInteractionElement=_ref3.hasTrailingInteractionElement,hasSuffix=_ref3.hasSuffix,hasTrailingButton=_ref3.hasTrailingButton,hasTrailingDropDown=_ref3.hasTrailingDropDown;if(hasTrailingInteractionElement&&(hasSuffix||hasTrailingIcon||hasTrailingButton)){return 'spacing.2';}if(hasLeadingDropDown||hasTrailingDropDown){return 'spacing.2';}if(hasTrailingInteractionElement&&!hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return 'spacing.4';}if(hasLeadingInteractionElement){return 'spacing.3';}return 'spacing.0';};var getSuffixStyles=function getSuffixStyles(_ref4){var hasTrailingIcon=_ref4.hasTrailingIcon,hasSuffix=_ref4.hasSuffix,hasTrailingButton=_ref4.hasTrailingButton;if(hasSuffix&&(hasTrailingIcon||hasTrailingButton)){return {paddingRight:'spacing.3'};}if(hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getTrailingIconStyles=function getTrailingIconStyles(_ref5){var hasTrailingIcon=_ref5.hasTrailingIcon,hasTrailingButton=_ref5.hasTrailingButton;if(hasTrailingIcon&&hasTrailingButton){return {paddingRight:'spacing.3'};}if(hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getInputVisualsToBeRendered=function getInputVisualsToBeRendered(_ref6){var leadingIcon=_ref6.leadingIcon,prefix=_ref6.prefix,trailingInteractionElement=_ref6.trailingInteractionElement,leadingInteractionElement=_ref6.leadingInteractionElement,suffix=_ref6.suffix,trailingIcon=_ref6.trailingIcon,trailingButton=_ref6.trailingButton,leadingDropDown=_ref6.leadingDropDown,trailingDropDown=_ref6.trailingDropDown;return {hasLeadingIcon:Boolean(leadingIcon),hasPrefix:Boolean(prefix),hasTrailingInteractionElement:Boolean(trailingInteractionElement),hasLeadingInteractionElement:Boolean(leadingInteractionElement),hasSuffix:Boolean(suffix),hasTrailingIcon:Boolean(trailingIcon),hasTrailingButton:Boolean(trailingButton),hasLeadingDropDown:Boolean(leadingDropDown),hasTrailingDropDown:Boolean(trailingDropDown)};};var getTooltipContent=function getTooltipContent(_ref7){var validationState=_ref7.validationState,errorText=_ref7.errorText,successText=_ref7.successText;if(validationState==='error'&&errorText){return errorText;}if(validationState==='success'&&successText){return successText;}return '';};var ValidationIconTooltip=function ValidationIconTooltip(_ref8){var children=_ref8.children,validationState=_ref8.validationState,errorText=_ref8.errorText,successText=_ref8.successText,showHintsAsTooltip=_ref8.showHintsAsTooltip;if(showHintsAsTooltip&&validationState==='error'&&errorText||validationState==='success'&&successText){return jsx(Tooltip,{content:getTooltipContent({validationState:validationState,errorText:errorText,successText:successText}),children:jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",children:children})});}return children;};var BaseInputVisuals=function BaseInputVisuals(_ref9){var LeadingIcon=_ref9.leadingIcon,prefix=_ref9.prefix,trailingInteractionElement=_ref9.trailingInteractionElement,onTrailingInteractionElementClick=_ref9.onTrailingInteractionElementClick,leadingDropDown=_ref9.leadingDropDown,trailingDropDown=_ref9.trailingDropDown,leadingInteractionElement=_ref9.leadingInteractionElement,suffix=_ref9.suffix,TrailingIcon=_ref9.trailingIcon,isDisabled=_ref9.isDisabled,_ref9$validationState=_ref9.validationState,validationState=_ref9$validationState===void 0?'none':_ref9$validationState,size=_ref9.size,showHintsAsTooltip=_ref9.showHintsAsTooltip,errorText=_ref9.errorText,successText=_ref9.successText,TrailingButton=_ref9.trailingButton;var _getInputVisualsToBeR=getInputVisualsToBeRendered({leadingIcon:LeadingIcon,prefix:prefix,leadingInteractionElement:leadingInteractionElement,trailingInteractionElement:trailingInteractionElement,suffix:suffix,trailingIcon:TrailingIcon,trailingButton:TrailingButton,leadingDropDown:leadingDropDown,trailingDropDown:trailingDropDown,size:size}),hasLeadingIcon=_getInputVisualsToBeR.hasLeadingIcon,hasPrefix=_getInputVisualsToBeR.hasPrefix,hasSuffix=_getInputVisualsToBeR.hasSuffix,hasTrailingInteractionElement=_getInputVisualsToBeR.hasTrailingInteractionElement,hasLeadingInteractionElement=_getInputVisualsToBeR.hasLeadingInteractionElement,hasTrailingIcon=_getInputVisualsToBeR.hasTrailingIcon,hasTrailingButton=_getInputVisualsToBeR.hasTrailingButton,hasLeadingDropDown=_getInputVisualsToBeR.hasLeadingDropDown,hasTrailingDropDown=_getInputVisualsToBeR.hasTrailingDropDown;var hasLeadingVisuals=hasLeadingInteractionElement||hasLeadingIcon||hasPrefix||hasLeadingDropDown;var hasTrailingVisuals=hasTrailingInteractionElement||hasSuffix||hasTrailingIcon||hasTrailingButton||hasTrailingDropDown;if(__DEV__){if(hasTrailingButton&&!isValidAllowedChildren(TrailingButton,'Link')){throwBladeError({message:'trailingButton must be a valid Blade Link component',moduleName:'BaseInput'});}}if(hasLeadingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles(),{children:[hasLeadingInteractionElement?jsx(BaseBox,{paddingLeft:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasLeadingInteractionElement:hasLeadingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),display:"flex",alignItems:"stretch",alignSelf:"stretch",children:leadingInteractionElement}):null,LeadingIcon?jsx(BaseBox,{paddingLeft:"spacing.4",display:"flex",children:jsx(LeadingIcon,{size:iconSize[size],color:isDisabled?'surface.icon.gray.disabled':'surface.icon.gray.muted'})}):null,hasPrefix?jsx(BaseBox,Object.assign({},getPrefixStyles({hasLeadingIcon:hasLeadingIcon,hasPrefix:hasPrefix}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:prefix})})):null,leadingDropDown?jsx(BaseBox,{paddingLeft:"spacing.2",display:"flex",children:leadingDropDown}):null]}));}if(hasTrailingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:[hasTrailingInteractionElement?jsx(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:jsx(BaseBox,Object.assign({paddingRight:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingInteractionElement:hasTrailingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton,hasTrailingDropDown:hasTrailingDropDown}),display:"flex",alignItems:"stretch",alignSelf:"stretch"},!isReactNative()&&{onClick:onTrailingInteractionElementClick},{children:trailingInteractionElement}))})):null,hasSuffix?jsx(BaseBox,Object.assign({},getSuffixStyles({hasTrailingIcon:hasTrailingIcon,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:suffix})})):null,TrailingIcon?jsx(BaseBox,Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},getTrailingIconStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingButton:hasTrailingButton}),{children:jsx(ValidationIconTooltip,{showHintsAsTooltip:showHintsAsTooltip,errorText:errorText,successText:successText,validationState:validationState,children:jsx(TrailingIcon,{size:iconSize[size],color:isDisabled?'interactive.icon.gray.disabled':trailingIconColor[validationState]})})})):null,TrailingButton?jsx(BaseBox,{paddingRight:"spacing.4",display:"flex",children:React__default.cloneElement(TrailingButton,{size:size,variant:'button',isDisabled:isDisabled})}):null,hasTrailingDropDown?jsx(BaseBox,{paddingRight:"spacing.2",display:"flex",children:trailingDropDown}):null]}));}return null;};
|
|
19
19
|
|
|
20
20
|
export { BaseInputVisuals, getInputVisualsToBeRendered };
|
|
21
21
|
//# sourceMappingURL=BaseInputVisuals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInputVisuals.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInputVisuals.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport type { BaseInputProps } from './BaseInput';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { BaseBoxProps, SpacingValueType } from '~components/Box/BaseBox';\nimport type { IconColors } from '~components/Icons';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport { Tooltip } from '~components/Tooltip';\nimport { Box } from '~components/Box';\nimport { isReactNative } from '~utils';\n\ntype InputVisuals = Pick<\n BaseInputProps,\n | 'leadingIcon'\n | 'prefix'\n | 'trailingInteractionElement'\n | 'onTrailingInteractionElementClick'\n | 'leadingInteractionElement'\n | 'suffix'\n | 'trailingIcon'\n | 'isDisabled'\n | 'validationState'\n | 'size'\n | 'trailingButton'\n | 'showHintsAsTooltip'\n | 'errorText'\n | 'successText'\n> & {\n size: NonNullable<BaseInputProps['size']>;\n};\n\nconst getVisualContainerStyles = ({\n shouldStretchTrailingBox,\n}: {\n shouldStretchTrailingBox?: boolean;\n} = {}): Pick<BaseBoxProps, 'display' | 'flexDirection' | 'alignItems' | 'alignSelf'> => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: shouldStretchTrailingBox ? 'stretch' : 'center',\n});\n\nconst trailingIconColor: Record<NonNullable<InputVisuals['validationState']>, IconColors> = {\n none: 'surface.icon.gray.subtle',\n error: 'feedback.icon.negative.intense',\n success: 'feedback.icon.positive.intense',\n};\n\nconst iconSize = {\n medium: 'medium',\n large: 'large',\n} as const;\n\nconst textSize = {\n medium: 'medium',\n large: 'large',\n} as const;\n\nconst getPrefixStyles = ({\n hasLeadingIcon,\n hasPrefix,\n}: {\n hasLeadingIcon: boolean;\n hasPrefix: boolean;\n}): Pick<BaseBoxProps, 'paddingLeft'> => {\n if (hasPrefix && hasLeadingIcon) {\n return {\n paddingLeft: 'spacing.3',\n };\n }\n\n if (hasPrefix && !hasLeadingIcon) {\n return {\n paddingLeft: 'spacing.4',\n };\n }\n\n return {\n paddingLeft: 'spacing.0',\n };\n};\n\nconst getInteractionElementStyles = ({\n hasTrailingIcon,\n hasLeadingInteractionElement,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n}: {\n hasTrailingIcon: boolean;\n hasLeadingInteractionElement?: boolean;\n hasTrailingInteractionElement?: boolean;\n hasSuffix: boolean;\n hasTrailingButton: boolean;\n}): SpacingValueType => {\n if (hasTrailingInteractionElement && (hasSuffix || hasTrailingIcon || hasTrailingButton)) {\n return 'spacing.2';\n }\n\n if (hasTrailingInteractionElement && !hasSuffix && !hasTrailingIcon && !hasTrailingButton) {\n return 'spacing.4';\n }\n\n if (hasLeadingInteractionElement) {\n return 'spacing.3';\n }\n\n return 'spacing.0';\n};\n\nconst getSuffixStyles = ({\n hasTrailingIcon,\n hasSuffix,\n hasTrailingButton,\n}: {\n hasTrailingIcon: boolean;\n hasSuffix: boolean;\n hasTrailingButton: boolean;\n}): Pick<BaseBoxProps, 'paddingRight'> => {\n if (hasSuffix && (hasTrailingIcon || hasTrailingButton)) {\n return {\n paddingRight: 'spacing.3',\n };\n }\n\n if (hasSuffix && !hasTrailingIcon && !hasTrailingButton) {\n return {\n paddingRight: 'spacing.4',\n };\n }\n\n return {\n paddingRight: 'spacing.0',\n };\n};\n\nconst getTrailingIconStyles = ({\n hasTrailingIcon,\n hasTrailingButton,\n}: {\n hasTrailingIcon: boolean;\n hasTrailingButton: boolean;\n}): Pick<BaseBoxProps, 'paddingRight'> => {\n if (hasTrailingIcon && hasTrailingButton) {\n return {\n paddingRight: 'spacing.3',\n };\n }\n\n if (hasTrailingIcon && !hasTrailingButton) {\n return {\n paddingRight: 'spacing.4',\n };\n }\n\n return {\n paddingRight: 'spacing.0',\n };\n};\n\nexport const getInputVisualsToBeRendered = ({\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n trailingButton,\n}: InputVisuals) => ({\n hasLeadingIcon: Boolean(leadingIcon),\n hasPrefix: Boolean(prefix),\n hasTrailingInteractionElement: Boolean(trailingInteractionElement),\n hasLeadingInteractionElement: Boolean(leadingInteractionElement),\n hasSuffix: Boolean(suffix),\n hasTrailingIcon: Boolean(trailingIcon),\n hasTrailingButton: Boolean(trailingButton),\n});\n\nconst getTooltipContent = ({\n validationState,\n errorText,\n successText,\n}: {\n validationState: BaseInputProps['validationState'];\n errorText: BaseInputProps['errorText'];\n successText: BaseInputProps['errorText'];\n}): string => {\n if (validationState === 'error' && errorText) {\n return errorText;\n }\n\n if (validationState === 'success' && successText) {\n return successText;\n }\n\n return '';\n};\n\nconst ValidationIconTooltip = ({\n children,\n validationState,\n errorText,\n successText,\n showHintsAsTooltip,\n}: {\n children: ReactElement;\n validationState: BaseInputProps['validationState'];\n errorText: BaseInputProps['errorText'];\n successText: BaseInputProps['errorText'];\n showHintsAsTooltip: BaseInputProps['showHintsAsTooltip'];\n}) => {\n if (\n (showHintsAsTooltip && validationState === 'error' && errorText) ||\n (validationState === 'success' && successText)\n ) {\n return (\n <Tooltip content={getTooltipContent({ validationState, errorText, successText })}>\n <Box display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n {children}\n </Box>\n </Tooltip>\n );\n }\n\n return children;\n};\n\nexport const BaseInputVisuals = ({\n leadingIcon: LeadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingInteractionElement,\n suffix,\n trailingIcon: TrailingIcon,\n isDisabled,\n validationState = 'none',\n size,\n showHintsAsTooltip,\n errorText,\n successText,\n trailingButton: TrailingButton,\n}: InputVisuals): ReactElement | null => {\n const {\n hasLeadingIcon,\n hasPrefix,\n hasSuffix,\n hasTrailingInteractionElement,\n hasLeadingInteractionElement,\n hasTrailingIcon,\n hasTrailingButton,\n } = getInputVisualsToBeRendered({\n leadingIcon: LeadingIcon,\n prefix,\n leadingInteractionElement,\n trailingInteractionElement,\n suffix,\n trailingIcon: TrailingIcon,\n trailingButton: TrailingButton,\n size,\n });\n\n const hasLeadingVisuals = hasLeadingInteractionElement || hasLeadingIcon || hasPrefix;\n const hasTrailingVisuals =\n hasTrailingInteractionElement || hasSuffix || hasTrailingIcon || hasTrailingButton;\n\n if (__DEV__) {\n if (hasTrailingButton && !isValidAllowedChildren(TrailingButton, 'Link')) {\n throwBladeError({\n message: 'trailingButton must be a valid Blade Link component',\n moduleName: 'BaseInput',\n });\n }\n }\n\n if (hasLeadingVisuals) {\n return (\n <BaseBox {...getVisualContainerStyles()}>\n {hasLeadingInteractionElement ? (\n <BaseBox\n paddingLeft={getInteractionElementStyles({\n hasTrailingIcon,\n hasLeadingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n })}\n display=\"flex\"\n alignItems=\"stretch\"\n alignSelf=\"stretch\"\n >\n {leadingInteractionElement}\n </BaseBox>\n ) : null}\n {LeadingIcon ? (\n <BaseBox paddingLeft=\"spacing.4\" display=\"flex\">\n <LeadingIcon\n size={iconSize[size]}\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n </BaseBox>\n ) : null}\n {hasPrefix ? (\n <BaseBox {...getPrefixStyles({ hasLeadingIcon, hasPrefix })}>\n <Text\n size={textSize[size]}\n variant=\"body\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {prefix}\n </Text>\n </BaseBox>\n ) : null}\n </BaseBox>\n );\n }\n\n if (hasTrailingVisuals) {\n return (\n <BaseBox\n {...getVisualContainerStyles({\n shouldStretchTrailingBox:\n hasTrailingInteractionElement && Boolean(onTrailingInteractionElementClick),\n })}\n >\n {hasTrailingInteractionElement ? (\n <BaseBox\n {...getVisualContainerStyles({\n shouldStretchTrailingBox:\n hasTrailingInteractionElement && Boolean(onTrailingInteractionElementClick),\n })}\n >\n <BaseBox\n paddingRight={getInteractionElementStyles({\n hasTrailingIcon,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n })}\n display=\"flex\"\n alignItems=\"stretch\"\n alignSelf=\"stretch\"\n {...(!isReactNative() && { onClick: onTrailingInteractionElementClick })}\n >\n {trailingInteractionElement}\n </BaseBox>\n </BaseBox>\n ) : null}\n {hasSuffix ? (\n <BaseBox {...getSuffixStyles({ hasTrailingIcon, hasSuffix, hasTrailingButton })}>\n <Text\n size={textSize[size]}\n variant=\"body\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {suffix}\n </Text>\n </BaseBox>\n ) : null}\n {TrailingIcon ? (\n <BaseBox\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n {...getTrailingIconStyles({ hasTrailingIcon, hasTrailingButton })}\n >\n <ValidationIconTooltip\n showHintsAsTooltip={showHintsAsTooltip}\n errorText={errorText}\n successText={successText}\n validationState={validationState}\n >\n <TrailingIcon\n size={iconSize[size]}\n color={\n isDisabled ? 'interactive.icon.gray.disabled' : trailingIconColor[validationState]\n }\n />\n </ValidationIconTooltip>\n </BaseBox>\n ) : null}\n {TrailingButton ? (\n <BaseBox paddingRight=\"spacing.4\" display=\"flex\">\n {React.cloneElement(TrailingButton, {\n size,\n variant: 'button',\n isDisabled,\n })}\n </BaseBox>\n ) : null}\n </BaseBox>\n );\n }\n\n return null;\n};\n"],"names":["getVisualContainerStyles","_ref","arguments","length","undefined","shouldStretchTrailingBox","display","flexDirection","alignItems","alignSelf","trailingIconColor","none","error","success","iconSize","medium","large","textSize","getPrefixStyles","_ref2","hasLeadingIcon","hasPrefix","paddingLeft","getInteractionElementStyles","_ref3","hasTrailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","hasSuffix","hasTrailingButton","getSuffixStyles","_ref4","paddingRight","getTrailingIconStyles","_ref5","getInputVisualsToBeRendered","_ref6","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","trailingButton","Boolean","getTooltipContent","_ref7","validationState","errorText","successText","ValidationIconTooltip","_ref8","children","showHintsAsTooltip","_jsx","Tooltip","content","Box","justifyContent","BaseInputVisuals","_ref9","LeadingIcon","onTrailingInteractionElementClick","TrailingIcon","isDisabled","_ref9$validationState","size","TrailingButton","_getInputVisualsToBeR","hasLeadingVisuals","hasTrailingVisuals","__DEV__","isValidAllowedChildren","throwBladeError","message","moduleName","_jsxs","BaseBox","Object","assign","color","Text","variant","weight","isReactNative","onClick","React","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;AAkCA,IAAMA,wBAAwB,CAAG,SAA3BA,wBAAwBA,EAAA,CAAA,IAAAC,IAAA,CAAAC,SAAA,CAAAC,MAAA,CAAA,CAAA,EAAAD,SAAA,CAAAE,CAAAA,CAAAA,GAA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E,GAAA,CAACJ,qBAAqB,CAAA,CACpBG,kBAAkB,CAAEA,kBAAmB,CACvCL,SAAS,CAAEA,SAAU,CACrBC,WAAW,CAAEA,WAAY,CACzBF,eAAe,CAAEA,eAAgB,CAAAK,QAAA,CAEjCE,GAAA,CAACS,YAAY,CAAA,CACXG,IAAI,CAAEpD,QAAQ,CAACoD,IAAI,CAAE,CACrBc,KAAK,CACHhB,UAAU,CAAG,gCAAgC,CAAGtD,iBAAiB,CAACqC,eAAe,CAClF,CACF,CAAC,CACmB,CAAC,CACjB,CAAA,CAAC,CACR,IAAI,CACPoB,cAAc,CACbb,GAAA,CAACuB,OAAO,EAAC7C,YAAY,CAAC,WAAW,CAAC1B,OAAO,CAAC,MAAM,CAAA8C,QAAA,CAC7CkC,cAAK,CAACC,YAAY,CAACpB,cAAc,CAAE,CAClCD,IAAI,CAAJA,IAAI,CACJgB,OAAO,CAAE,QAAQ,CACjBlB,UAAU,CAAVA,UACF,CAAC,CAAC,CACK,CAAC,CACR,IAAI,GACD,CAAC,CAEd,CAEA,OAAO,IAAI,CACb;;;;"}
|
|
1
|
+
{"version":3,"file":"BaseInputVisuals.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInputVisuals.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport React from 'react';\nimport type { ReactElement } from 'react';\nimport type { BaseInputProps } from './BaseInput';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Text } from '~components/Typography';\nimport type { BaseBoxProps, SpacingValueType } from '~components/Box/BaseBox';\nimport type { IconColors } from '~components/Icons';\nimport { isValidAllowedChildren } from '~utils/isValidAllowedChildren';\nimport { throwBladeError } from '~utils/logger';\nimport { Tooltip } from '~components/Tooltip';\nimport { Box } from '~components/Box';\nimport { isReactNative } from '~utils';\n\ntype InputVisuals = Pick<\n BaseInputProps,\n | 'leadingIcon'\n | 'prefix'\n | 'trailingInteractionElement'\n | 'onTrailingInteractionElementClick'\n | 'leadingInteractionElement'\n | 'leadingDropDown'\n | 'trailingDropDown'\n | 'suffix'\n | 'trailingIcon'\n | 'isDisabled'\n | 'validationState'\n | 'size'\n | 'trailingButton'\n | 'showHintsAsTooltip'\n | 'errorText'\n | 'successText'\n> & {\n size: NonNullable<BaseInputProps['size']>;\n};\n\nconst getVisualContainerStyles = ({\n shouldStretchTrailingBox,\n}: {\n shouldStretchTrailingBox?: boolean;\n} = {}): Pick<BaseBoxProps, 'display' | 'flexDirection' | 'alignItems' | 'alignSelf'> => ({\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n alignSelf: shouldStretchTrailingBox ? 'stretch' : 'center',\n});\n\nconst trailingIconColor: Record<NonNullable<InputVisuals['validationState']>, IconColors> = {\n none: 'surface.icon.gray.subtle',\n error: 'feedback.icon.negative.intense',\n success: 'feedback.icon.positive.intense',\n};\n\nconst iconSize = {\n medium: 'medium',\n large: 'large',\n} as const;\n\nconst textSize = {\n medium: 'medium',\n large: 'large',\n} as const;\n\nconst getPrefixStyles = ({\n hasLeadingIcon,\n hasPrefix,\n}: {\n hasLeadingIcon: boolean;\n hasPrefix: boolean;\n}): Pick<BaseBoxProps, 'paddingLeft'> => {\n if (hasPrefix && hasLeadingIcon) {\n return {\n paddingLeft: 'spacing.3',\n };\n }\n\n if (hasPrefix && !hasLeadingIcon) {\n return {\n paddingLeft: 'spacing.4',\n };\n }\n\n return {\n paddingLeft: 'spacing.0',\n };\n};\n\nconst getInteractionElementStyles = ({\n hasTrailingIcon,\n hasLeadingInteractionElement,\n hasLeadingDropDown,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n hasTrailingDropDown,\n}: {\n hasTrailingIcon: boolean;\n hasLeadingInteractionElement?: boolean;\n hasLeadingDropDown?: boolean;\n hasTrailingInteractionElement?: boolean;\n hasSuffix: boolean;\n hasTrailingButton: boolean;\n hasTrailingDropDown?: boolean;\n}): SpacingValueType => {\n if (hasTrailingInteractionElement && (hasSuffix || hasTrailingIcon || hasTrailingButton)) {\n return 'spacing.2';\n }\n\n if (hasLeadingDropDown || hasTrailingDropDown) {\n return 'spacing.2';\n }\n\n if (hasTrailingInteractionElement && !hasSuffix && !hasTrailingIcon && !hasTrailingButton) {\n return 'spacing.4';\n }\n\n if (hasLeadingInteractionElement) {\n return 'spacing.3';\n }\n\n return 'spacing.0';\n};\n\nconst getSuffixStyles = ({\n hasTrailingIcon,\n hasSuffix,\n hasTrailingButton,\n}: {\n hasTrailingIcon: boolean;\n hasSuffix: boolean;\n hasTrailingButton: boolean;\n}): Pick<BaseBoxProps, 'paddingRight'> => {\n if (hasSuffix && (hasTrailingIcon || hasTrailingButton)) {\n return {\n paddingRight: 'spacing.3',\n };\n }\n\n if (hasSuffix && !hasTrailingIcon && !hasTrailingButton) {\n return {\n paddingRight: 'spacing.4',\n };\n }\n\n return {\n paddingRight: 'spacing.0',\n };\n};\n\nconst getTrailingIconStyles = ({\n hasTrailingIcon,\n hasTrailingButton,\n}: {\n hasTrailingIcon: boolean;\n hasTrailingButton: boolean;\n}): Pick<BaseBoxProps, 'paddingRight'> => {\n if (hasTrailingIcon && hasTrailingButton) {\n return {\n paddingRight: 'spacing.3',\n };\n }\n\n if (hasTrailingIcon && !hasTrailingButton) {\n return {\n paddingRight: 'spacing.4',\n };\n }\n\n return {\n paddingRight: 'spacing.0',\n };\n};\n\nexport const getInputVisualsToBeRendered = ({\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n trailingButton,\n leadingDropDown,\n trailingDropDown,\n}: InputVisuals) => ({\n hasLeadingIcon: Boolean(leadingIcon),\n hasPrefix: Boolean(prefix),\n hasTrailingInteractionElement: Boolean(trailingInteractionElement),\n hasLeadingInteractionElement: Boolean(leadingInteractionElement),\n hasSuffix: Boolean(suffix),\n hasTrailingIcon: Boolean(trailingIcon),\n hasTrailingButton: Boolean(trailingButton),\n hasLeadingDropDown: Boolean(leadingDropDown),\n hasTrailingDropDown: Boolean(trailingDropDown),\n});\n\nconst getTooltipContent = ({\n validationState,\n errorText,\n successText,\n}: {\n validationState: BaseInputProps['validationState'];\n errorText: BaseInputProps['errorText'];\n successText: BaseInputProps['errorText'];\n}): string => {\n if (validationState === 'error' && errorText) {\n return errorText;\n }\n\n if (validationState === 'success' && successText) {\n return successText;\n }\n\n return '';\n};\n\nconst ValidationIconTooltip = ({\n children,\n validationState,\n errorText,\n successText,\n showHintsAsTooltip,\n}: {\n children: ReactElement;\n validationState: BaseInputProps['validationState'];\n errorText: BaseInputProps['errorText'];\n successText: BaseInputProps['errorText'];\n showHintsAsTooltip: BaseInputProps['showHintsAsTooltip'];\n}) => {\n if (\n (showHintsAsTooltip && validationState === 'error' && errorText) ||\n (validationState === 'success' && successText)\n ) {\n return (\n <Tooltip content={getTooltipContent({ validationState, errorText, successText })}>\n <Box display=\"flex\" justifyContent=\"center\" alignItems=\"center\">\n {children}\n </Box>\n </Tooltip>\n );\n }\n\n return children;\n};\n\nexport const BaseInputVisuals = ({\n leadingIcon: LeadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingDropDown,\n trailingDropDown,\n leadingInteractionElement,\n suffix,\n trailingIcon: TrailingIcon,\n isDisabled,\n validationState = 'none',\n size,\n showHintsAsTooltip,\n errorText,\n successText,\n trailingButton: TrailingButton,\n}: InputVisuals): ReactElement | null => {\n const {\n hasLeadingIcon,\n hasPrefix,\n hasSuffix,\n hasTrailingInteractionElement,\n hasLeadingInteractionElement,\n hasTrailingIcon,\n hasTrailingButton,\n hasLeadingDropDown,\n hasTrailingDropDown,\n } = getInputVisualsToBeRendered({\n leadingIcon: LeadingIcon,\n prefix,\n leadingInteractionElement,\n trailingInteractionElement,\n suffix,\n trailingIcon: TrailingIcon,\n trailingButton: TrailingButton,\n leadingDropDown,\n trailingDropDown,\n size,\n });\n\n const hasLeadingVisuals =\n hasLeadingInteractionElement || hasLeadingIcon || hasPrefix || hasLeadingDropDown;\n const hasTrailingVisuals =\n hasTrailingInteractionElement ||\n hasSuffix ||\n hasTrailingIcon ||\n hasTrailingButton ||\n hasTrailingDropDown;\n\n if (__DEV__) {\n if (hasTrailingButton && !isValidAllowedChildren(TrailingButton, 'Link')) {\n throwBladeError({\n message: 'trailingButton must be a valid Blade Link component',\n moduleName: 'BaseInput',\n });\n }\n }\n\n if (hasLeadingVisuals) {\n return (\n <BaseBox {...getVisualContainerStyles()}>\n {hasLeadingInteractionElement ? (\n <BaseBox\n paddingLeft={getInteractionElementStyles({\n hasTrailingIcon,\n hasLeadingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n })}\n display=\"flex\"\n alignItems=\"stretch\"\n alignSelf=\"stretch\"\n >\n {leadingInteractionElement}\n </BaseBox>\n ) : null}\n {LeadingIcon ? (\n <BaseBox paddingLeft=\"spacing.4\" display=\"flex\">\n <LeadingIcon\n size={iconSize[size]}\n color={isDisabled ? 'surface.icon.gray.disabled' : 'surface.icon.gray.muted'}\n />\n </BaseBox>\n ) : null}\n {hasPrefix ? (\n <BaseBox {...getPrefixStyles({ hasLeadingIcon, hasPrefix })}>\n <Text\n size={textSize[size]}\n variant=\"body\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {prefix}\n </Text>\n </BaseBox>\n ) : null}\n {leadingDropDown ? (\n <BaseBox paddingLeft=\"spacing.2\" display=\"flex\">\n {leadingDropDown}\n </BaseBox>\n ) : null}\n </BaseBox>\n );\n }\n\n if (hasTrailingVisuals) {\n return (\n <BaseBox\n {...getVisualContainerStyles({\n shouldStretchTrailingBox:\n hasTrailingInteractionElement && Boolean(onTrailingInteractionElementClick),\n })}\n >\n {hasTrailingInteractionElement ? (\n <BaseBox\n {...getVisualContainerStyles({\n shouldStretchTrailingBox:\n hasTrailingInteractionElement && Boolean(onTrailingInteractionElementClick),\n })}\n >\n <BaseBox\n paddingRight={getInteractionElementStyles({\n hasTrailingIcon,\n hasTrailingInteractionElement,\n hasSuffix,\n hasTrailingButton,\n hasTrailingDropDown,\n })}\n display=\"flex\"\n alignItems=\"stretch\"\n alignSelf=\"stretch\"\n {...(!isReactNative() && { onClick: onTrailingInteractionElementClick })}\n >\n {trailingInteractionElement}\n </BaseBox>\n </BaseBox>\n ) : null}\n {hasSuffix ? (\n <BaseBox {...getSuffixStyles({ hasTrailingIcon, hasSuffix, hasTrailingButton })}>\n <Text\n size={textSize[size]}\n variant=\"body\"\n weight=\"regular\"\n color={isDisabled ? 'surface.text.gray.disabled' : 'surface.text.gray.subtle'}\n >\n {suffix}\n </Text>\n </BaseBox>\n ) : null}\n {TrailingIcon ? (\n <BaseBox\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n {...getTrailingIconStyles({ hasTrailingIcon, hasTrailingButton })}\n >\n <ValidationIconTooltip\n showHintsAsTooltip={showHintsAsTooltip}\n errorText={errorText}\n successText={successText}\n validationState={validationState}\n >\n <TrailingIcon\n size={iconSize[size]}\n color={\n isDisabled ? 'interactive.icon.gray.disabled' : trailingIconColor[validationState]\n }\n />\n </ValidationIconTooltip>\n </BaseBox>\n ) : null}\n {TrailingButton ? (\n <BaseBox paddingRight=\"spacing.4\" display=\"flex\">\n {React.cloneElement(TrailingButton, {\n size,\n variant: 'button',\n isDisabled,\n })}\n </BaseBox>\n ) : null}\n {hasTrailingDropDown ? (\n <BaseBox paddingRight=\"spacing.2\" display=\"flex\">\n {trailingDropDown}\n </BaseBox>\n ) : null}\n </BaseBox>\n );\n }\n\n return null;\n};\n"],"names":["getVisualContainerStyles","_ref","arguments","length","undefined","shouldStretchTrailingBox","display","flexDirection","alignItems","alignSelf","trailingIconColor","none","error","success","iconSize","medium","large","textSize","getPrefixStyles","_ref2","hasLeadingIcon","hasPrefix","paddingLeft","getInteractionElementStyles","_ref3","hasTrailingIcon","hasLeadingInteractionElement","hasLeadingDropDown","hasTrailingInteractionElement","hasSuffix","hasTrailingButton","hasTrailingDropDown","getSuffixStyles","_ref4","paddingRight","getTrailingIconStyles","_ref5","getInputVisualsToBeRendered","_ref6","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","trailingButton","leadingDropDown","trailingDropDown","Boolean","getTooltipContent","_ref7","validationState","errorText","successText","ValidationIconTooltip","_ref8","children","showHintsAsTooltip","_jsx","Tooltip","content","Box","justifyContent","BaseInputVisuals","_ref9","LeadingIcon","onTrailingInteractionElementClick","TrailingIcon","isDisabled","_ref9$validationState","size","TrailingButton","_getInputVisualsToBeR","hasLeadingVisuals","hasTrailingVisuals","__DEV__","isValidAllowedChildren","throwBladeError","message","moduleName","_jsxs","BaseBox","Object","assign","color","Text","variant","weight","isReactNative","onClick","React","cloneElement"],"mappings":";;;;;;;;;;;;;;;;;AAoCA,IAAMA,wBAAwB,CAAG,SAA3BA,wBAAwBA,EAAA,CAAA,IAAAC,IAAA,CAAAC,SAAA,CAAAC,MAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,GAAAE,SAAA,CAAAF,SAAA,IAI1B,EAAE,CAHJG,wBAAwB,CAAAJ,IAAA,CAAxBI,wBAAwB,QAGgE,CACxFC,OAAO,CAAE,MAAM,CACfC,aAAa,CAAE,KAAK,CACpBC,UAAU,CAAE,QAAQ,CACpBC,SAAS,CAAEJ,wBAAwB,CAAG,SAAS,CAAG,QACpD,CAAC,CAAC,CAAA,CAEF,IAAMK,iBAAmF,CAAG,CAC1FC,IAAI,CAAE,0BAA0B,CAChCC,KAAK,CAAE,gCAAgC,CACvCC,OAAO,CAAE,gCACX,CAAC,CAED,IAAMC,QAAQ,CAAG,CACfC,MAAM,CAAE,QAAQ,CAChBC,KAAK,CAAE,OACT,CAAU,CAEV,IAAMC,QAAQ,CAAG,CACfF,MAAM,CAAE,QAAQ,CAChBC,KAAK,CAAE,OACT,CAAU,CAEV,IAAME,eAAe,CAAG,SAAlBA,eAAeA,CAAAC,KAAA,CAMoB,KALvCC,cAAc,CAAAD,KAAA,CAAdC,cAAc,CACdC,SAAS,CAAAF,KAAA,CAATE,SAAS,CAKT,GAAIA,SAA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