@razorpay/blade 12.42.2 → 12.43.0
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/Input/TextInput/TextInput.js +1 -1
- package/build/lib/native/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +1 -1
- package/build/lib/native/components/Table/TableContext.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js +0 -1
- package/build/lib/web/development/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/development/components/InputGroup/InputRow.web.js +4 -3
- package/build/lib/web/development/components/InputGroup/InputRow.web.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +39 -8
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +82 -14
- package/build/lib/web/development/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableContext.js +2 -1
- package/build/lib/web/development/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/development/components/Table/TableFooter.web.js +15 -3
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +15 -3
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +4 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js +0 -1
- package/build/lib/web/production/components/Input/TextInput/TextInput.js.map +1 -1
- package/build/lib/web/production/components/InputGroup/InputRow.web.js +4 -3
- package/build/lib/web/production/components/InputGroup/InputRow.web.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +39 -8
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +82 -14
- package/build/lib/web/production/components/Table/TableBody.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableContext.js +2 -1
- package/build/lib/web/production/components/Table/TableContext.js.map +1 -1
- package/build/lib/web/production/components/Table/TableFooter.web.js +15 -3
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +15 -3
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +4 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/types/components/index.d.ts +48 -8
- package/build/types/components/index.native.d.ts +43 -3
- package/package.json +1 -1
|
@@ -417,7 +417,7 @@ import '../../Dropdown/DropdownHeaderFooter.js';
|
|
|
417
417
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
418
418
|
import { isIconComponent } from '../../../utils/isIconComponent/isIconComponent.js';
|
|
419
419
|
|
|
420
|
-
var _excluded=["label","accessibilityLabel","labelPosition","placeholder","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing"];var isReactNative=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _TextInput=function _TextInput(_ref,ref){var _ref4;var label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,placeholder=_ref.placeholder,_ref$type=_ref.type,type=_ref$type===void 0?'text':_ref$type,defaultValue=_ref.defaultValue,name=_ref.name,value=_ref.value,maxCharacters=_ref.maxCharacters,format=_ref.format,onChange=_ref.onChange,onClick=_ref.onClick,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,isDisabled=_ref.isDisabled,necessityIndicator=_ref.necessityIndicator,validationState=_ref.validationState,errorText=_ref.errorText,helpText=_ref.helpText,successText=_ref.successText,isRequired=_ref.isRequired,icon=_ref.icon,prefix=_ref.prefix,showClearButton=_ref.showClearButton,onClearButtonClick=_ref.onClearButtonClick,isLoading=_ref.isLoading,suffix=_ref.suffix,autoFocus=_ref.autoFocus,keyboardReturnKeyType=_ref.keyboardReturnKeyType,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,autoCapitalize=_ref.autoCapitalize,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,leadingIcon=_ref.leadingIcon,trailingIcon=_ref.trailingIcon,isTaggedInput=_ref.isTaggedInput,tags=_ref.tags,onTagChange=_ref.onTagChange,trailing=_ref.trailing,leading=_ref.leading,labelSuffix=_ref.labelSuffix,labelTrailing=_ref.labelTrailing,rest=_objectWithoutProperties(_ref,_excluded);var textInputRef=React__default.useRef(null);var mergedRef=useMergeRefs(ref,textInputRef);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];var _useState3=useState(autoFocus!=null?autoFocus:false),_useState4=_slicedToArray(_useState3,2),isInputFocussed=_useState4[0],setIsInputFocussed=_useState4[1];if(__DEV__){if(format){var hasAlphanumeric=/[a-zA-Z0-9]/.test(format);if(hasAlphanumeric){throw new Error(`[Blade: TextInput] Invalid format "${format}". Only # and special characters allowed, no letters/numbers.`);}}}var formattingResult=useFormattedInput({format:format,onChange:onChange,value:value,defaultValue:defaultValue});var inputValue=format?formattingResult.formattedValue:value;var effectiveMaxCharacters=format?formattingResult.maxLength:maxCharacters;var handleOnChange=React__default.useCallback(function(_ref2){var name=_ref2.name,inputValue=_ref2.value;if(format){formattingResult.handleChange({name:name,value:inputValue});}else {onChange==null?void 0:onChange({name:name,value:inputValue});}},[format,formattingResult.handleChange,onChange]);var _useTaggedInput=useTaggedInput({isTaggedInput:isTaggedInput,tags:tags,onTagChange:onTagChange,isDisabled:isDisabled,onChange:handleOnChange,name:name,value:inputValue,inputRef:textInputRef}),activeTagIndex=_useTaggedInput.activeTagIndex,setActiveTagIndex=_useTaggedInput.setActiveTagIndex,getTags=_useTaggedInput.getTags,handleTaggedInputKeydown=_useTaggedInput.handleTaggedInputKeydown,handleTaggedInputChange=_useTaggedInput.handleTaggedInputChange,handleTagsClear=_useTaggedInput.handleTagsClear;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isTrailingDropDownOpen=_React$useState2[0],setIsTrailingDropDownOpen=_React$useState2[1];var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isLeadingDropDownOpen=_React$useState4[0],setIsLeadingDropDownOpen=_React$useState4[1];var textInputWrapperRef=useRef(null);useEffect(function(){if(isTrailingDropDownOpen&&isLeadingDropDownOpen){setIsLeadingDropDownOpen(false);}},[isTrailingDropDownOpen]);useEffect(function(){if(isLeadingDropDownOpen&&isTrailingDropDownOpen){setIsTrailingDropDownOpen(false);}},[isLeadingDropDownOpen]);var leadingDropDown=leading&&getComponentId(leading)==='Dropdown'?leading:null;var trailingDropdown=trailing&&getComponentId(trailing)==='Dropdown'?trailing:null;var _leadingIcon=isIconComponent(leading)?leading:undefined;var _trailingIcon=isIconComponent(trailing)?trailing:undefined;var hasLeadingInteractionElement=!_leadingIcon&&!leadingDropDown&&leading;var hasTrailingInteractionElement=!_trailingIcon&&!trailingDropdown&&trailing;var renderDropdown=function renderDropdown(dropdown,isOpen,setIsOpen,defaultPlacement){if(!dropdown){return null;}return React__default.cloneElement(dropdown,{selectionType:'single',isOpen:isOpen,onOpenChange:function onOpenChange(isOpen){setIsOpen(isOpen);},children:React__default.Children.map(dropdown.props.children,function(child){if(child.type===DropdownOverlay){return React__default.cloneElement(child,{referenceRef:textInputWrapperRef,_isNestedDropdown:true,defaultPlacement:defaultPlacement});}return child;})});};var renderLeadingDropDown=renderDropdown(leadingDropDown,isLeadingDropDownOpen,setIsLeadingDropDownOpen,'bottom-start');var renderTrailingDropDown=renderDropdown(trailingDropdown,isTrailingDropDownOpen,setIsTrailingDropDownOpen,'bottom-end');React__default.useEffect(function(){setShouldShowClearButton(Boolean(showClearButton&&(defaultValue!=null?defaultValue:inputValue)));},[showClearButton,defaultValue,inputValue]);
|
|
420
|
+
var _excluded=["label","accessibilityLabel","labelPosition","placeholder","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing"];var isReactNative=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var _TextInput=function _TextInput(_ref,ref){var _ref4;var label=_ref.label,accessibilityLabel=_ref.accessibilityLabel,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,placeholder=_ref.placeholder,_ref$type=_ref.type,type=_ref$type===void 0?'text':_ref$type,defaultValue=_ref.defaultValue,name=_ref.name,value=_ref.value,maxCharacters=_ref.maxCharacters,format=_ref.format,onChange=_ref.onChange,onClick=_ref.onClick,_onFocus=_ref.onFocus,_onBlur=_ref.onBlur,onSubmit=_ref.onSubmit,isDisabled=_ref.isDisabled,necessityIndicator=_ref.necessityIndicator,validationState=_ref.validationState,errorText=_ref.errorText,helpText=_ref.helpText,successText=_ref.successText,isRequired=_ref.isRequired,icon=_ref.icon,prefix=_ref.prefix,showClearButton=_ref.showClearButton,onClearButtonClick=_ref.onClearButtonClick,isLoading=_ref.isLoading,suffix=_ref.suffix,autoFocus=_ref.autoFocus,keyboardReturnKeyType=_ref.keyboardReturnKeyType,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType,autoCapitalize=_ref.autoCapitalize,testID=_ref.testID,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,leadingIcon=_ref.leadingIcon,trailingIcon=_ref.trailingIcon,isTaggedInput=_ref.isTaggedInput,tags=_ref.tags,onTagChange=_ref.onTagChange,trailing=_ref.trailing,leading=_ref.leading,labelSuffix=_ref.labelSuffix,labelTrailing=_ref.labelTrailing,rest=_objectWithoutProperties(_ref,_excluded);var textInputRef=React__default.useRef(null);var mergedRef=useMergeRefs(ref,textInputRef);var _useState=useState(false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];var _useState3=useState(autoFocus!=null?autoFocus:false),_useState4=_slicedToArray(_useState3,2),isInputFocussed=_useState4[0],setIsInputFocussed=_useState4[1];if(__DEV__){if(format){var hasAlphanumeric=/[a-zA-Z0-9]/.test(format);if(hasAlphanumeric){throw new Error(`[Blade: TextInput] Invalid format "${format}". Only # and special characters allowed, no letters/numbers.`);}}}var formattingResult=useFormattedInput({format:format,onChange:onChange,value:value,defaultValue:defaultValue});var inputValue=format?formattingResult.formattedValue:value;var effectiveMaxCharacters=format?formattingResult.maxLength:maxCharacters;var handleOnChange=React__default.useCallback(function(_ref2){var name=_ref2.name,inputValue=_ref2.value;if(format){formattingResult.handleChange({name:name,value:inputValue});}else {onChange==null?void 0:onChange({name:name,value:inputValue});}},[format,formattingResult.handleChange,onChange]);var _useTaggedInput=useTaggedInput({isTaggedInput:isTaggedInput,tags:tags,onTagChange:onTagChange,isDisabled:isDisabled,onChange:handleOnChange,name:name,value:inputValue,inputRef:textInputRef}),activeTagIndex=_useTaggedInput.activeTagIndex,setActiveTagIndex=_useTaggedInput.setActiveTagIndex,getTags=_useTaggedInput.getTags,handleTaggedInputKeydown=_useTaggedInput.handleTaggedInputKeydown,handleTaggedInputChange=_useTaggedInput.handleTaggedInputChange,handleTagsClear=_useTaggedInput.handleTagsClear;var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isTrailingDropDownOpen=_React$useState2[0],setIsTrailingDropDownOpen=_React$useState2[1];var _React$useState3=React__default.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isLeadingDropDownOpen=_React$useState4[0],setIsLeadingDropDownOpen=_React$useState4[1];var textInputWrapperRef=useRef(null);useEffect(function(){if(isTrailingDropDownOpen&&isLeadingDropDownOpen){setIsLeadingDropDownOpen(false);}},[isTrailingDropDownOpen]);useEffect(function(){if(isLeadingDropDownOpen&&isTrailingDropDownOpen){setIsTrailingDropDownOpen(false);}},[isLeadingDropDownOpen]);var leadingDropDown=leading&&getComponentId(leading)==='Dropdown'?leading:null;var trailingDropdown=trailing&&getComponentId(trailing)==='Dropdown'?trailing:null;var _leadingIcon=isIconComponent(leading)?leading:undefined;var _trailingIcon=isIconComponent(trailing)?trailing:undefined;var hasLeadingInteractionElement=!_leadingIcon&&!leadingDropDown&&leading;var hasTrailingInteractionElement=!_trailingIcon&&!trailingDropdown&&trailing;var renderDropdown=function renderDropdown(dropdown,isOpen,setIsOpen,defaultPlacement){if(!dropdown){return null;}return React__default.cloneElement(dropdown,{selectionType:'single',isOpen:isOpen,onOpenChange:function onOpenChange(isOpen){setIsOpen(isOpen);},children:React__default.Children.map(dropdown.props.children,function(child){if(child.type===DropdownOverlay){return React__default.cloneElement(child,{referenceRef:textInputWrapperRef,_isNestedDropdown:true,defaultPlacement:defaultPlacement});}return child;})});};var renderLeadingDropDown=renderDropdown(leadingDropDown,isLeadingDropDownOpen,setIsLeadingDropDownOpen,'bottom-start');var renderTrailingDropDown=renderDropdown(trailingDropdown,isTrailingDropDownOpen,setIsTrailingDropDownOpen,'bottom-end');React__default.useEffect(function(){setShouldShowClearButton(Boolean(showClearButton&&(defaultValue!=null?defaultValue:inputValue)));},[showClearButton,defaultValue,inputValue]);var renderClearButton=function renderClearButton(){return jsx(IconButton,{size:"medium",icon:CloseIcon,onClick:function onClick(){var _textInputRef$current;if(isEmpty(inputValue)&&textInputRef.current){if(isReactNative(textInputRef.current)){textInputRef.current.clear();textInputRef.current.focus();}else if(textInputRef.current instanceof HTMLInputElement){textInputRef.current.value='';textInputRef.current.focus();}}handleTagsClear();onClearButtonClick==null?void 0:onClearButtonClick();textInputRef==null?void 0:(_textInputRef$current=textInputRef.current)==null?void 0:_textInputRef$current.focus();setShouldShowClearButton(false);},isDisabled:isDisabled,accessibilityLabel:"Clear Input Content"});};var hasTrailingDropDown=Boolean(trailingDropdown);var renderInteractionElement=function renderInteractionElement(){if(isLoading){return jsx(Spinner,{accessibilityLabel:"Loading Content",color:"primary"});}if(shouldShowClearButton&&hasTrailingDropDown){return jsxs(BaseBox,{display:"flex",gap:"spacing.3",children:[renderClearButton()," ",jsx(Divider,{orientation:"vertical"})]});}if(showClearButton&&hasTrailingInteractionElement){return jsxs(BaseBox,{display:"flex",gap:"spacing.3",children:[renderClearButton()," ",jsx(Divider,{orientation:"vertical"})," ",trailing]});}if(shouldShowClearButton){return renderClearButton();}if(hasTrailingInteractionElement){return trailing;}return null;};return jsx(BaseInput,Object.assign({id:"textinput",componentName:MetaConstants.TextInput,ref:mergedRef,setInputWrapperRef:function setInputWrapperRef(wrapperNode){textInputWrapperRef.current=wrapperNode;},label:label,labelSuffix:labelSuffix,labelTrailing:labelTrailing,accessibilityLabel:accessibilityLabel,hideLabelText:!Boolean(label),labelPosition:labelPosition,placeholder:placeholder,defaultValue:format?value!==undefined&&defaultValue!==undefined?defaultValue:undefined:defaultValue,value:format?inputValue:value,name:name,maxCharacters:effectiveMaxCharacters,isDropdownTrigger:isTaggedInput,tags:isTaggedInput?getTags({size:size}):undefined,showAllTags:isInputFocussed,maxTagRows:"single",activeTagIndex:activeTagIndex,setActiveTagIndex:setActiveTagIndex,leadingDropDown:renderLeadingDropDown,trailingDropDown:renderTrailingDropDown,leadingInteractionElement:hasLeadingInteractionElement?leading:null,onChange:function onChange(_ref3){var name=_ref3.name,value=_ref3.value;if(showClearButton&&value!=null&&value.length){setShouldShowClearButton(true);}if(shouldShowClearButton&&!(value!=null&&value.length)){setShouldShowClearButton(false);}handleTaggedInputChange({name:name,value:value});handleOnChange({name:name,value:value});},onClick:onClick,onFocus:function onFocus(e){setIsInputFocussed(true);_onFocus==null?void 0:_onFocus(e);},onBlur:function onBlur(e){setIsInputFocussed(false);_onBlur==null?void 0:_onBlur(e);},onKeyDown:function onKeyDown(e){handleTaggedInputKeydown(e);if(format){formattingResult.handleKeyDown(e.event);}},onSubmit:onSubmit,isDisabled:isDisabled,necessityIndicator:necessityIndicator,isRequired:isRequired,leadingIcon:(_ref4=_leadingIcon!=null?_leadingIcon:leadingIcon)!=null?_ref4:icon,prefix:prefix,trailingInteractionElement:renderInteractionElement(),trailingIcon:_trailingIcon!=null?_trailingIcon:trailingIcon,suffix:suffix,validationState:validationState,errorText:errorText,helpText:helpText,successText:successText,trailingFooterSlot:function trailingFooterSlot(value){var _value$length;return format?null:effectiveMaxCharacters?jsx(BaseBox,{marginTop:hintMarginTop[size],marginRight:"spacing.1",children:jsx(CharacterCounter,{currentCount:(_value$length=value==null?void 0:value.length)!=null?_value$length:0,maxCount:effectiveMaxCharacters,size:size})}):null;},autoFocus:autoFocus,testID:testID},getKeyboardAndAutocompleteProps({type:type,keyboardReturnKeyType:keyboardReturnKeyType,autoCompleteSuggestionType:autoCompleteSuggestionType,autoCapitalize:autoCapitalize}),{size:size},rest));};var TextInput=assignWithoutSideEffects(React__default.forwardRef(_TextInput),{displayName:'TextInput'});
|
|
421
421
|
|
|
422
422
|
export { TextInput };
|
|
423
423
|
//# sourceMappingURL=TextInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\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 TextInputPropsWithLabel = {\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\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n console.log('leading', leading);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","__DEV__","hasAlphanumeric","test","Error","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","console","log","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","Object","assign","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","onKeyDown","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qkBAsLA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,aAAkB,CAA4C,CACnF,OAAOC,eAAe,EAAE,GAAK,cAAc,CAC7C,CAAC,CAED,IAAMC,UAA2E,CAAG,SAA9EA,UAA2EA,CAAAC,IAAA,CA+C/EC,GAAG,CACc,CAAAC,IAAAA,KAAA,CA9Cf,IAAAC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,kBAAkB,CAAAJ,IAAA,CAAlBI,kBAAkB,CAAAC,kBAAA,CAAAL,IAAA,CAClBM,aAAa,CAAbA,aAAa,CAAAD,kBAAA,GAAG,KAAA,CAAA,CAAA,KAAK,CAAAA,kBAAA,CACrBE,WAAW,CAAAP,IAAA,CAAXO,WAAW,CAAAC,SAAA,CAAAR,IAAA,CACXS,IAAI,CAAJA,IAAI,CAAAD,SAAA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Content":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\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 TextInputPropsWithLabel = {\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\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","__DEV__","hasAlphanumeric","test","Error","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","Object","assign","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","onKeyDown","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qkBAsLA,IAAMA,aAAa,CAAG,SAAhBA,aAAaA,CAAIC,aAAkB,CAA4C,CACnF,OAAOC,eAAe,EAAE,GAAK,cAAc,CAC7C,CAAC,CAED,IAAMC,UAA2E,CAAG,SAA9EA,UAA2EA,CAAAC,IAAA,CA+C/EC,GAAG,CACc,CAAA,IAAAC,KAAA,CAAA,IA9CfC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,kBAAkB,CAAAJ,IAAA,CAAlBI,kBAAkB,CAAAC,kBA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WAAW,CAAE,WACf,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
|
|
3
|
-
var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false,hasHoverActions:false,setHasHoverActions:function setHasHoverActions(){},columnCount:0,gridTemplateColumns:undefined,isVirtualized:false,tableData:[]});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
|
|
3
|
+
var TableContext=React__default.createContext({selectionType:'none',selectedRows:undefined,totalItems:0,toggleRowSelectionById:function toggleRowSelectionById(){},toggleAllRowsSelection:function toggleAllRowsSelection(){},deselectAllRows:function deselectAllRows(){},rowDensity:'normal',toggleSort:function toggleSort(){},currentSortedState:{sortKey:'',isSortReversed:false},setPaginationPage:function setPaginationPage(){},setPaginationRowSize:function setPaginationRowSize(){},disabledRows:[],setDisabledRows:function setDisabledRows(){},paginationType:'client',setPaginationType:function setPaginationType(){},backgroundColor:'surface.background.gray.intense',setHeaderRowDensity:function setHeaderRowDensity(){},showBorderedCells:false,hasHoverActions:false,setHasHoverActions:function setHasHoverActions(){},columnCount:0,gridTemplateColumns:undefined,isVirtualized:false,tableData:[],isGrouped:false});var useTableContext=function useTableContext(){var context=React__default.useContext(TableContext);return context;};
|
|
4
4
|
|
|
5
5
|
export { TableContext, useTableContext };
|
|
6
6
|
//# sourceMappingURL=TableContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n TableNode as LocalTableNode,\n} from './types';\n\nexport type TableContextType<Item> = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors | 'transparent';\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n hasHoverActions: boolean;\n setHasHoverActions: (hasHoverActions: boolean) => void;\n columnCount: number;\n gridTemplateColumns: string | undefined;\n isVirtualized?: boolean;\n tableData: LocalTableNode<Item>[];\n};\n\nconst TableContext = React.createContext<TableContextType<unknown>>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n hasHoverActions: false,\n setHasHoverActions: () => {},\n columnCount: 0,\n gridTemplateColumns: undefined,\n isVirtualized: false,\n tableData: [],\n});\n\nconst useTableContext = <Item,>(): TableContextType<Item> => {\n const context = React.useContext(TableContext as React.Context<TableContextType<Item>>);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","hasHoverActions","setHasHoverActions","columnCount","gridTemplateColumns","isVirtualized","tableData","useTableContext","context","useContext"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"TableContext.js","sources":["../../../../../src/components/Table/TableContext.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-empty-function */\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nimport React from 'react';\nimport type { TableNode } from '@table-library/react-table-library/table';\nimport type {\n TableBackgroundColors,\n TableProps,\n TablePaginationType,\n TableHeaderRowProps,\n TableNode as LocalTableNode,\n} from './types';\n\nexport type TableContextType<Item> = {\n selectionType?: TableProps<unknown>['selectionType'];\n selectedRows?: TableNode['id'][];\n totalItems: number;\n toggleRowSelectionById: (id: TableNode['id']) => void;\n toggleAllRowsSelection: () => void;\n deselectAllRows: () => void;\n rowDensity: NonNullable<TableProps<unknown>['rowDensity']>;\n toggleSort: (sortKey: string) => void;\n currentSortedState: {\n sortKey: string;\n isSortReversed: boolean;\n sortableColumns?: string[];\n };\n setPaginationPage: (page: number) => void;\n setPaginationRowSize: (size: number) => void;\n currentPaginationState?: {\n page: number;\n size: number;\n };\n showStripedRows?: boolean;\n disabledRows: TableNode['id'][];\n setDisabledRows: React.Dispatch<React.SetStateAction<TableNode['id'][]>>;\n paginationType: NonNullable<TablePaginationType>;\n setPaginationType: React.Dispatch<React.SetStateAction<NonNullable<TablePaginationType>>>;\n backgroundColor: TableBackgroundColors | 'transparent';\n headerRowDensity?: TableHeaderRowProps['rowDensity'];\n setHeaderRowDensity: React.Dispatch<React.SetStateAction<TableHeaderRowProps['rowDensity']>>;\n showBorderedCells: NonNullable<TableProps<unknown>['showBorderedCells']>;\n hasHoverActions: boolean;\n setHasHoverActions: (hasHoverActions: boolean) => void;\n columnCount: number;\n gridTemplateColumns: string | undefined;\n isVirtualized?: boolean;\n tableData: LocalTableNode<Item>[];\n isGrouped: boolean;\n};\n\nconst TableContext = React.createContext<TableContextType<unknown>>({\n selectionType: 'none',\n selectedRows: undefined,\n totalItems: 0,\n toggleRowSelectionById: () => {},\n toggleAllRowsSelection: () => {},\n deselectAllRows: () => {},\n rowDensity: 'normal',\n toggleSort: () => {},\n currentSortedState: {\n sortKey: '',\n isSortReversed: false,\n },\n setPaginationPage: () => {},\n setPaginationRowSize: () => {},\n disabledRows: [],\n setDisabledRows: () => {},\n paginationType: 'client',\n setPaginationType: () => {},\n backgroundColor: 'surface.background.gray.intense',\n setHeaderRowDensity: () => {},\n showBorderedCells: false,\n hasHoverActions: false,\n setHasHoverActions: () => {},\n columnCount: 0,\n gridTemplateColumns: undefined,\n isVirtualized: false,\n tableData: [],\n isGrouped: false,\n});\n\nconst useTableContext = <Item,>(): TableContextType<Item> => {\n const context = React.useContext(TableContext as React.Context<TableContextType<Item>>);\n return context;\n};\n\nexport { useTableContext, TableContext };\n"],"names":["TableContext","React","createContext","selectionType","selectedRows","undefined","totalItems","toggleRowSelectionById","toggleAllRowsSelection","deselectAllRows","rowDensity","toggleSort","currentSortedState","sortKey","isSortReversed","setPaginationPage","setPaginationRowSize","disabledRows","setDisabledRows","paginationType","setPaginationType","backgroundColor","setHeaderRowDensity","showBorderedCells","hasHoverActions","setHasHoverActions","columnCount","gridTemplateColumns","isVirtualized","tableData","isGrouped","useTableContext","context","useContext"],"mappings":";;AAkDM,IAAAA,YAAY,CAAGC,cAAK,CAACC,aAAa,CAA4B,CAClEC,aAAa,CAAE,MAAM,CACrBC,YAAY,CAAEC,SAAS,CACvBC,UAAU,CAAE,CAAC,CACbC,sBAAsB,CAAE,SAAAA,sBAAA,EAAM,EAAE,CAChCC,sBAAsB,CAAE,SAAAA,wBAAM,EAAE,CAChCC,eAAe,CAAE,SAAAA,eAAA,EAAM,EAAE,CACzBC,UAAU,CAAE,QAAQ,CACpBC,UAAU,CAAE,SAAAA,UAAA,EAAM,EAAE,CACpBC,kBAAkB,CAAE,CAClBC,OAAO,CAAE,EAAE,CACXC,cAAc,CAAE,KAClB,CAAC,CACDC,iBAAiB,CAAE,SAAAA,iBAAAA,EAAM,EAAE,CAC3BC,oBAAoB,CAAE,SAAAA,oBAAA,EAAM,EAAE,CAC9BC,YAAY,CAAE,EAAE,CAChBC,eAAe,CAAE,SAAAA,iBAAM,EAAE,CACzBC,cAAc,CAAE,QAAQ,CACxBC,iBAAiB,CAAE,SAAAA,mBAAM,EAAE,CAC3BC,eAAe,CAAE,iCAAiC,CAClDC,mBAAmB,CAAE,SAAAA,qBAAM,EAAE,CAC7BC,iBAAiB,CAAE,KAAK,CACxBC,eAAe,CAAE,KAAK,CACtBC,kBAAkB,CAAE,SAAAA,kBAAA,EAAM,EAAE,CAC5BC,WAAW,CAAE,CAAC,CACdC,mBAAmB,CAAEtB,SAAS,CAC9BuB,aAAa,CAAE,KAAK,CACpBC,SAAS,CAAE,EAAE,CACbC,SAAS,CAAE,KACb,CAAC,EAEK,IAAAC,eAAe,CAAG,SAAlBA,eAAeA,EAAwC,CAC3D,IAAMC,OAAO,CAAG/B,cAAK,CAACgC,UAAU,CAACjC,YAAqD,CAAC,CACvF,OAAOgC,OAAO,CAChB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../../../src/components/Table/tokens.ts"],"sourcesContent":["import { AlertCircleIcon, CheckIcon } from '~components/Icons';\nimport { size } from '~tokens/global';\n\nconst firstColumnStickyZIndex = 2;\n\nconst refreshWrapperZIndex = 3;\n\nconst checkboxCellWidth = size['44'];\n\nconst tableBackgroundColor = 'surface.background.gray.intense';\nconst tableHeader = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n backgroundColor: 'interactive.background.gray.default',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n} as const;\n\nconst tableFooter = {\n paddingTop: 'spacing.5',\n paddingBottom: 'spacing.5',\n paddingLeft: 'spacing.4',\n paddingRight: 'spacing.4',\n borderBottomAndTopWidth: 'thin',\n borderBottomAndTopColor: 'surface.border.gray.muted',\n backgroundColor: 'interactive.background.gray.default',\n} as const;\n\nconst tableRow = {\n paddingLeft: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n paddingRight: {\n compact: 'spacing.4',\n normal: 'spacing.4',\n comfortable: 'spacing.4',\n },\n minHeight: {\n compact: '36',\n normal: '48',\n comfortable: '60',\n },\n nonStripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n // TODO: Rebranding - on design side: explore pressed state color change, right now both hover & active are same\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n nonStripeWrapper: {\n // not used anywhere\n backgroundColor: 'transparent',\n backgroundColorHover: 'transparent',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'transparent',\n backgroundColorSelectedHover: 'transparent',\n backgroundColorSelectedFocus: 'transparent',\n backgroundColorSelectedActive: 'transparent',\n },\n stripe: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'transparent',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n },\n stripeWrapper: {\n backgroundColor: 'interactive.background.gray.default',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorFocus: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.default',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.faded',\n backgroundColorSelectedFocus: 'interactive.background.primary.faded',\n backgroundColorSelectedActive: 'interactive.background.primary.faded',\n },\n borderBottomWidth: 'thin',\n borderColor: 'surface.border.gray.muted',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n groupHeaderBackgroundColor: 'surface.background.gray.moderate',\n} as const;\n\nconst tableToolbar = {\n backgroundColor: 'transparent',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorMotionEasing: 'easing.standard',\n backgroundColorMotionDuration: 'duration.xquick',\n} as const;\n\nconst tablePagination = {\n padding: 'spacing.4',\n pageSelectionButton: {\n backgroundColor: 'transparent',\n backgroundColorHover: 'interactive.background.gray.default',\n backgroundColorActive: 'interactive.background.gray.highlighted',\n backgroundColorSelected: 'interactive.background.primary.faded',\n backgroundColorSelectedHover: 'interactive.background.primary.fadedHighlighted',\n backgroundColorSelectedActive: 'interactive.background.primary.fadedHighlighted',\n padding: 'spacing.2',\n borderRadius: 'small',\n focusRingColor: 'surface.border.primary.muted',\n textColor: 'surface.text.gray.subtle',\n textColorSelected: 'surface.text.primary.normal',\n height: size['32'],\n width: size['32'],\n },\n defaultPageSize: 10,\n} as const;\n\nconst tableEditableCellRowDensityToInputSizeMap = {\n compact: 'medium',\n normal: 'large',\n comfortable: 'medium',\n} as const;\n\nconst validationStateToInputTrailingIconMap = {\n none: undefined,\n success: CheckIcon,\n error: AlertCircleIcon,\n};\n\nconst rowDensityToIsTableInputCellMapping = {\n comfortable: false,\n normal: true,\n compact: true,\n};\n\nconst classes = {\n HOVER_ACTIONS: 'hover-actions',\n HOVER_ACTIONS_LAYER2: 'hover-actions-layer-2',\n HOVER_ACTIONS_LAYER3: 'hover-actions-layer-3',\n HAS_ROW_SPANNING: 'has-row-spanning',\n};\n\nexport {\n tableHeader,\n tableFooter,\n tableRow,\n tableToolbar,\n tablePagination,\n refreshWrapperZIndex,\n tableBackgroundColor,\n firstColumnStickyZIndex,\n checkboxCellWidth,\n tableEditableCellRowDensityToInputSizeMap,\n validationStateToInputTrailingIconMap,\n rowDensityToIsTableInputCellMapping,\n classes,\n};\n"],"names":["tableEditableCellRowDensityToInputSizeMap","compact","normal","comfortable","validationStateToInputTrailingIconMap","none","undefined","success","CheckIcon","error","AlertCircleIcon","rowDensityToIsTableInputCellMapping"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HM,IAAAA,yCAAyC,CAAG,CAChDC,OAAO,CAAE,QAAQ,CACjBC,MAAM,CAAE,OAAO,CACfC,WAAW,CAAE,QACf,EAEM,IAAAC,qCAAqC,CAAG,CAC5CC,IAAI,CAAEC,SAAS,CACfC,OAAO,CAAEC,SAAS,CAClBC,KAAK,CAAEC,eACT,EAEM,IAAAC,mCAAmC,CAAG,CAC1CR,WAAW,CAAE,KAAK,CAClBD,MAAM,CAAE,IAAI,CACZD,OAAO,CAAE,IACX;;;;"}
|
|
@@ -205,7 +205,6 @@ var _TextInput = function _TextInput(_ref, ref) {
|
|
|
205
205
|
React__default.useEffect(function () {
|
|
206
206
|
setShouldShowClearButton(Boolean(showClearButton && (defaultValue !== null && defaultValue !== void 0 ? defaultValue : inputValue)));
|
|
207
207
|
}, [showClearButton, defaultValue, inputValue]);
|
|
208
|
-
console.log('leading', leading);
|
|
209
208
|
var renderClearButton = function renderClearButton() {
|
|
210
209
|
return /*#__PURE__*/jsx(IconButton, {
|
|
211
210
|
size: "medium",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\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 TextInputPropsWithLabel = {\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\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n console.log('leading', leading);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","hasAlphanumeric","test","Error","concat","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","console","log","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","onKeyDown","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoLA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,E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,IAAAA,IAAI,EAAEA,IAAAA;GACFU,EAAAA,IAAI,CACT,CAAC,CAAA;AAEN,CAAC,CAAA;AAEK0G,IAAAA,SAAS,gBAAGyB,wBAAwB,eAAC/H,cAAK,CAACgI,UAAU,CAACtL,UAAU,CAAC,EAAE;AACvEuL,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../../../../../../../src/components/Input/TextInput/TextInput.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport type { ReactElement, ReactNode } from 'react';\nimport type { TextInput as TextInputReactNative } from 'react-native';\nimport type { BaseInputProps } from '../BaseInput';\nimport { BaseInput } from '../BaseInput';\nimport { getKeyboardAndAutocompleteProps } from '../BaseInput/utils';\nimport type { TaggedInputProps } from '../BaseInput/useTaggedInput';\nimport { useTaggedInput } from '../BaseInput/useTaggedInput';\nimport { useFormattedInput } from './useFormattedInput';\nimport isEmpty from '~utils/lodashButBetter/isEmpty';\nimport type { IconComponent } from '~components/Icons';\nimport { CloseIcon } from '~components/Icons';\nimport { IconButton } from '~components/Button/IconButton';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { MetaConstants } from '~utils/metaAttribute';\nimport { CharacterCounter } from '~components/Form/CharacterCounter';\nimport BaseBox from '~components/Box/BaseBox';\nimport { Spinner } from '~components/Spinner';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { getPlatformType } from '~utils';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type {\n BladeElementRef,\n BladeElementRefWithValue,\n ContainerElementType,\n DataAnalyticsAttribute,\n} from '~utils/types';\nimport { hintMarginTop } from '~components/Form/formTokens';\nimport { Divider } from '~components/Divider';\nimport { getComponentId } from '~utils/isValidAllowedChildren';\nimport { DropdownOverlay } from '~components/Dropdown';\nimport type { FormInputOnEvent } from '~components/Form/FormTypes';\nimport { isIconComponent } from '~utils/isIconComponent';\n\n// Users should use PasswordInput for input type password\ntype Type = Exclude<BaseInputProps['type'], 'password'>;\n\ntype TextInputCommonProps = Pick<\n BaseInputProps,\n | 'label'\n | 'accessibilityLabel'\n | 'labelPosition'\n | 'labelSuffix'\n | 'labelTrailing'\n | 'necessityIndicator'\n | 'validationState'\n | 'helpText'\n | 'errorText'\n | 'successText'\n | 'placeholder'\n | 'defaultValue'\n | 'name'\n | 'onChange'\n | 'onFocus'\n | 'onBlur'\n | 'value'\n | 'isDisabled'\n | 'isRequired'\n | 'prefix'\n | 'suffix'\n | 'maxCharacters'\n | 'autoFocus'\n | 'keyboardReturnKeyType'\n | 'autoCompleteSuggestionType'\n | 'onSubmit'\n | 'autoCapitalize'\n | 'testID'\n | 'onClick'\n | 'size'\n | 'leadingIcon'\n | 'trailingButton'\n | 'trailingIcon'\n | 'textAlign'\n | keyof DataAnalyticsAttribute\n> & {\n /**\n * Decides whether to render a clear icon button\n */\n showClearButton?: boolean;\n\n /**\n * Event handler to handle the onClick event for clear button. Used when `showClearButton` is `true`\n */\n onClearButtonClick?: () => void;\n\n /**\n * Decides whether to show a loading spinner for the input field.\n */\n isLoading?: boolean;\n\n /**\n * Icon that will be rendered at the beginning of the input field\n * @deprecated Use `leading` instead. This prop will be removed in the next major version.\n */\n icon?: IconComponent;\n /**\n * Type of Input Field to be rendered. Use `PasswordInput` for type `password`\n *\n *\n * **Note on number type**\n *\n * `type=\"number\"` internally uses `inputMode=\"numeric\"` instead of HTML's `type=\"number\"` which also allows text characters.\n * If you have a usecase where you only want to support number input, you can handle it on validations end.\n *\n * Check out [Why the GOV.UK Design System team changed the input type for numbers](https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/) for reasoning\n *\n * @default text\n */\n type?: Type;\n /**\n *\n * Icon or React Element to be rendered at the end of the input field\n */\n trailing?: React.ReactElement | IconComponent;\n /**\n * Icon or React Element to be rendered at the beginning of the input field\n */\n leading?: React.ReactElement | IconComponent;\n /**\n * Format pattern where # represents input characters and other symbols act as delimiters\n * When provided, input will be automatically formatted and onChange will include rawValue\n *\n * **Note:**\n * 1. Format pattern should only contain # symbols and special characters as delimiters.\n * Alphanumeric characters (letters and numbers) are not allowed in the format pattern.\n * 2. When format is provided, user input is restricted to alphanumeric characters only.\n * Special characters and symbols will be filtered out automatically from user input.\n *\n * @example \"#### #### #### ####\" for card numbers\n * @example \"##/##\" for expiry dates\n * @example \"(###) ###-####\" for phone numbers\n */\n format?:\n | '#### #### #### ####'\n | '##/##'\n | '##/##/####'\n | '(###) ###-####'\n | '###-##-####'\n | '##:##'\n | '##:##:##'\n | '#### #### ####'\n | '###.###.###.###'\n | '## ## ####'\n | '##-###-##'\n // eslint-disable-next-line @typescript-eslint/ban-types\n | (string & {});\n} & TaggedInputProps &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype TextInputPropsWithA11yLabel = {\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 TextInputPropsWithLabel = {\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\ntype TextInputProps = (TextInputPropsWithA11yLabel | TextInputPropsWithLabel) &\n TextInputCommonProps;\n\n// need to do this to tell TS to infer type as TextInput of React Native and make it believe that `ref.current.clear()` exists\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isReactNative = (_textInputRef: any): _textInputRef is TextInputReactNative => {\n return getPlatformType() === 'react-native';\n};\n\nconst _TextInput: React.ForwardRefRenderFunction<BladeElementRef, TextInputProps> = (\n {\n label,\n accessibilityLabel,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n name,\n value,\n maxCharacters,\n format,\n onChange,\n onClick,\n onFocus,\n onBlur,\n onSubmit,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n icon,\n prefix,\n showClearButton,\n onClearButtonClick,\n isLoading,\n suffix,\n autoFocus,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n testID,\n size = 'medium',\n leadingIcon,\n trailingIcon,\n isTaggedInput,\n tags,\n onTagChange,\n trailing,\n leading,\n labelSuffix,\n labelTrailing,\n ...rest\n },\n ref,\n): ReactElement => {\n const textInputRef = React.useRef<BladeElementRefWithValue>(null);\n const mergedRef = useMergeRefs(ref, textInputRef);\n const [shouldShowClearButton, setShouldShowClearButton] = useState(false);\n const [isInputFocussed, setIsInputFocussed] = useState(autoFocus ?? false);\n\n if (__DEV__) {\n if (format) {\n const hasAlphanumeric = /[a-zA-Z0-9]/.test(format);\n if (hasAlphanumeric) {\n throw new Error(\n `[Blade: TextInput] Invalid format \"${format}\". Only # and special characters allowed, no letters/numbers.`,\n );\n }\n }\n }\n\n const formattingResult = useFormattedInput({\n format,\n onChange,\n value,\n defaultValue,\n });\n\n const inputValue = format ? formattingResult.formattedValue : value;\n const effectiveMaxCharacters = format ? formattingResult.maxLength : maxCharacters;\n\n const handleOnChange: FormInputOnEvent = React.useCallback(\n ({ name, value: inputValue }) => {\n if (format) {\n formattingResult.handleChange({ name, value: inputValue });\n } else {\n onChange?.({ name, value: inputValue });\n }\n },\n [format, formattingResult.handleChange, onChange],\n );\n\n const {\n activeTagIndex,\n setActiveTagIndex,\n getTags,\n handleTaggedInputKeydown,\n handleTaggedInputChange,\n handleTagsClear,\n } = useTaggedInput({\n isTaggedInput,\n tags,\n onTagChange,\n isDisabled,\n onChange: handleOnChange,\n name,\n value: inputValue,\n inputRef: textInputRef,\n });\n const [isTrailingDropDownOpen, setIsTrailingDropDownOpen] = React.useState(false);\n const [isLeadingDropDownOpen, setIsLeadingDropDownOpen] = React.useState(false);\n const textInputWrapperRef = useRef<ContainerElementType | null>(null);\n\n useEffect(() => {\n if (isTrailingDropDownOpen && isLeadingDropDownOpen) {\n setIsLeadingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isTrailingDropDownOpen]);\n\n useEffect(() => {\n if (isLeadingDropDownOpen && isTrailingDropDownOpen) {\n setIsTrailingDropDownOpen(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isLeadingDropDownOpen]);\n\n const leadingDropDown =\n leading && getComponentId(leading as React.ReactElement) === 'Dropdown' ? leading : null;\n\n const trailingDropdown =\n trailing && getComponentId(trailing as React.ReactElement) === 'Dropdown' ? trailing : null;\n // we need to look into name of component and check if it 's and icon or a dropdown\n const _leadingIcon: IconComponent | undefined = isIconComponent(leading)\n ? (leading as IconComponent)\n : undefined;\n\n const _trailingIcon: IconComponent | undefined = isIconComponent(trailing)\n ? (trailing as IconComponent)\n : undefined;\n const hasLeadingInteractionElement = !_leadingIcon && !leadingDropDown && leading;\n\n const hasTrailingInteractionElement = !_trailingIcon && !trailingDropdown && trailing;\n\n const renderDropdown = (\n dropdown: React.ReactElement,\n isOpen: boolean,\n setIsOpen: (isOpen: boolean) => void,\n defaultPlacement: 'bottom-start' | 'bottom-end',\n ): React.ReactElement | null => {\n if (!dropdown) {\n return null;\n }\n return React.cloneElement(dropdown, {\n selectionType: 'single',\n isOpen,\n onOpenChange: (isOpen: boolean) => {\n setIsOpen(isOpen);\n },\n children: React.Children.map(dropdown.props.children, (child) => {\n if (child.type === DropdownOverlay) {\n return React.cloneElement(child, {\n referenceRef: textInputWrapperRef,\n _isNestedDropdown: true,\n defaultPlacement,\n });\n }\n return child;\n }),\n });\n };\n\n const renderLeadingDropDown = renderDropdown(\n leadingDropDown as React.ReactElement,\n isLeadingDropDownOpen,\n setIsLeadingDropDownOpen,\n 'bottom-start',\n );\n const renderTrailingDropDown = renderDropdown(\n trailingDropdown as React.ReactElement,\n isTrailingDropDownOpen,\n setIsTrailingDropDownOpen,\n 'bottom-end',\n );\n\n React.useEffect(() => {\n setShouldShowClearButton(Boolean(showClearButton && (defaultValue ?? inputValue)));\n }, [showClearButton, defaultValue, inputValue]);\n\n const renderClearButton = (): React.ReactElement => {\n return (\n <IconButton\n size=\"medium\"\n icon={CloseIcon}\n onClick={() => {\n if (isEmpty(inputValue) && textInputRef.current) {\n // when the input field is uncontrolled take the ref and clear the input and then call the onClearButtonClick function\n if (isReactNative(textInputRef.current)) {\n textInputRef.current.clear();\n textInputRef.current.focus();\n } else if (textInputRef.current instanceof HTMLInputElement) {\n textInputRef.current.value = '';\n textInputRef.current.focus();\n }\n }\n handleTagsClear();\n // if the input field is controlled just call the click handler and the value change shall be left upto the consumer\n onClearButtonClick?.();\n textInputRef?.current?.focus();\n setShouldShowClearButton(false);\n }}\n isDisabled={isDisabled}\n accessibilityLabel=\"Clear Input Content\"\n />\n );\n };\n const hasTrailingDropDown = Boolean(trailingDropdown);\n\n const renderInteractionElement = (): ReactNode => {\n if (isLoading) {\n return <Spinner accessibilityLabel=\"Loading Content\" color=\"primary\" />;\n }\n\n if (shouldShowClearButton && hasTrailingDropDown) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" />\n </BaseBox>\n );\n }\n\n if (showClearButton && hasTrailingInteractionElement) {\n return (\n <BaseBox display=\"flex\" gap=\"spacing.3\">\n {renderClearButton()} <Divider orientation=\"vertical\" /> {trailing as React.ReactElement}\n </BaseBox>\n );\n }\n\n if (shouldShowClearButton) {\n return renderClearButton();\n }\n\n if (hasTrailingInteractionElement) {\n return trailing as React.ReactElement;\n }\n return null;\n };\n return (\n <BaseInput\n id=\"textinput\"\n componentName={MetaConstants.TextInput}\n ref={mergedRef}\n setInputWrapperRef={(wrapperNode) => {\n textInputWrapperRef.current = wrapperNode;\n }}\n label={label as string}\n labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n accessibilityLabel={accessibilityLabel}\n hideLabelText={!Boolean(label)}\n labelPosition={labelPosition}\n placeholder={placeholder}\n // CONTROLLED/UNCONTROLLED INPUT LOGIC:\n // For inputs WITHOUT format:\n // - Use standard React controlled/uncontrolled logic\n // - Controlled: user provides `value` prop → use `value` prop\n // - Uncontrolled: user provides `defaultValue` prop → use `defaultValue` prop\n //\n // For inputs WITH format:\n // - Formatting requires controlled mode to re-render and show formatted values\n // - Case 1: Only `value` provided → defaultValue: undefined, value: formattedValue (normal controlled)\n // - Case 2: Only `defaultValue` provided → defaultValue: undefined, value: formattedValue (convert to controlled)\n // - Case 3: Both `value` and `defaultValue` provided → defaultValue: defaultValue, value: formattedValue (let BaseInput detect conflict and throw error)\n //\n defaultValue={\n format\n ? value !== undefined && defaultValue !== undefined\n ? defaultValue\n : undefined\n : defaultValue\n }\n value={format ? inputValue : value}\n name={name}\n maxCharacters={effectiveMaxCharacters}\n isDropdownTrigger={isTaggedInput}\n tags={isTaggedInput ? getTags({ size }) : undefined}\n showAllTags={isInputFocussed}\n maxTagRows=\"single\"\n activeTagIndex={activeTagIndex}\n setActiveTagIndex={setActiveTagIndex}\n leadingDropDown={renderLeadingDropDown}\n trailingDropDown={renderTrailingDropDown}\n leadingInteractionElement={\n hasLeadingInteractionElement ? (leading as React.ReactElement) : null\n }\n onChange={({ name, value }: { name?: string; value?: string }) => {\n if (showClearButton && value?.length) {\n // show the clear button when the user starts typing in\n setShouldShowClearButton(true);\n }\n\n if (shouldShowClearButton && !value?.length) {\n // hide the clear button when the input field is empty\n setShouldShowClearButton(false);\n }\n\n handleTaggedInputChange({ name, value });\n handleOnChange({ name, value });\n }}\n onClick={onClick}\n onFocus={(e) => {\n setIsInputFocussed(true);\n onFocus?.(e);\n }}\n onBlur={(e) => {\n setIsInputFocussed(false);\n onBlur?.(e);\n }}\n onKeyDown={(e) => {\n handleTaggedInputKeydown(e);\n if (format) {\n formattingResult.handleKeyDown(e.event);\n }\n }}\n onSubmit={onSubmit}\n isDisabled={isDisabled}\n necessityIndicator={necessityIndicator}\n isRequired={isRequired}\n leadingIcon={_leadingIcon ?? leadingIcon ?? icon}\n prefix={prefix}\n trailingInteractionElement={renderInteractionElement()}\n trailingIcon={_trailingIcon ?? trailingIcon}\n suffix={suffix}\n validationState={validationState}\n errorText={errorText}\n helpText={helpText}\n successText={successText}\n trailingFooterSlot={(value) => {\n return format ? null : effectiveMaxCharacters ? (\n <BaseBox marginTop={hintMarginTop[size]} marginRight=\"spacing.1\">\n <CharacterCounter\n currentCount={value?.length ?? 0}\n maxCount={effectiveMaxCharacters}\n size={size}\n />\n </BaseBox>\n ) : null;\n }}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n testID={testID}\n {...getKeyboardAndAutocompleteProps({\n type,\n keyboardReturnKeyType,\n autoCompleteSuggestionType,\n autoCapitalize,\n })}\n size={size}\n {...rest}\n />\n );\n};\n\nconst TextInput = assignWithoutSideEffects(React.forwardRef(_TextInput), {\n displayName: 'TextInput',\n});\n\nexport type { TextInputProps };\nexport { TextInput };\n"],"names":["isReactNative","_textInputRef","getPlatformType","_TextInput","_ref","ref","_ref4","label","accessibilityLabel","_ref$labelPosition","labelPosition","placeholder","_ref$type","type","defaultValue","name","value","maxCharacters","format","onChange","onClick","onFocus","onBlur","onSubmit","isDisabled","necessityIndicator","validationState","errorText","helpText","successText","isRequired","icon","prefix","showClearButton","onClearButtonClick","isLoading","suffix","autoFocus","keyboardReturnKeyType","autoCompleteSuggestionType","autoCapitalize","testID","_ref$size","size","leadingIcon","trailingIcon","isTaggedInput","tags","onTagChange","trailing","leading","labelSuffix","labelTrailing","rest","_objectWithoutProperties","_excluded","textInputRef","React","useRef","mergedRef","useMergeRefs","_useState","useState","_useState2","_slicedToArray","shouldShowClearButton","setShouldShowClearButton","_useState3","_useState4","isInputFocussed","setIsInputFocussed","hasAlphanumeric","test","Error","concat","formattingResult","useFormattedInput","inputValue","formattedValue","effectiveMaxCharacters","maxLength","handleOnChange","useCallback","_ref2","handleChange","_useTaggedInput","useTaggedInput","inputRef","activeTagIndex","setActiveTagIndex","getTags","handleTaggedInputKeydown","handleTaggedInputChange","handleTagsClear","_React$useState","_React$useState2","isTrailingDropDownOpen","setIsTrailingDropDownOpen","_React$useState3","_React$useState4","isLeadingDropDownOpen","setIsLeadingDropDownOpen","textInputWrapperRef","useEffect","leadingDropDown","getComponentId","trailingDropdown","_leadingIcon","isIconComponent","undefined","_trailingIcon","hasLeadingInteractionElement","hasTrailingInteractionElement","renderDropdown","dropdown","isOpen","setIsOpen","defaultPlacement","cloneElement","selectionType","onOpenChange","children","Children","map","props","child","DropdownOverlay","referenceRef","_isNestedDropdown","renderLeadingDropDown","renderTrailingDropDown","Boolean","renderClearButton","_jsx","IconButton","CloseIcon","_textInputRef$current","isEmpty","current","clear","focus","HTMLInputElement","hasTrailingDropDown","renderInteractionElement","Spinner","color","_jsxs","BaseBox","display","gap","Divider","orientation","BaseInput","_objectSpread","id","componentName","MetaConstants","TextInput","setInputWrapperRef","wrapperNode","hideLabelText","isDropdownTrigger","showAllTags","maxTagRows","trailingDropDown","leadingInteractionElement","_ref3","length","e","onKeyDown","handleKeyDown","event","trailingInteractionElement","trailingFooterSlot","_value$length","marginTop","hintMarginTop","marginRight","CharacterCounter","currentCount","maxCount","getKeyboardAndAutocompleteProps","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoLA;AACA;AACA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,aAAkB,EAA4C;AACnF,EAAA,OAAOC,eAAe,EAAE,KAAK,cAAc,CAAA;AAC7C,CAAC,CAAA;AAED,IAAMC,UAA2E,GAAG,SAA9EA,UAA2EA,CAAAC,IAAA,EA+C/EC,GAAG,EACc;AAAA,EAAA,IAAAC,KAAA,CAAA;AAAA,EAAA,IA9CfC,KAAK,GAAAH,IAAA,CAALG,KAAK;IACLC,kBAAkB,GAAAJ,IAAA,CAAlBI,kBAAkB;IAAAC,kBAAA,GAAAL,IAAA,CAClBM,aAAa;AAAbA,IAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,kBAAA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C4B,QAAAA,SAAS,EAAEC,aAAa,CAACrI,IAAI,CAAE;AAACsI,QAAAA,WAAW,EAAC,WAAW;QAAAxD,QAAA,eAC9DY,GAAA,CAAC6C,gBAAgB,EAAA;AACfC,UAAAA,YAAY,EAAAL,CAAAA,aAAA,GAAE9J,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAALA,KAAK,CAAEuJ,MAAM,MAAAO,IAAAA,IAAAA,aAAA,KAAAA,KAAAA,CAAAA,GAAAA,aAAA,GAAI,CAAE;AACjCM,UAAAA,QAAQ,EAAErG,sBAAuB;AACjCpC,UAAAA,IAAI,EAAEA,IAAAA;SACP,CAAA;OACM,CAAC,GACR,IAAI,CAAA;AACV,KAAA;AACA;AAAA;AACAN,IAAAA,SAAS,EAAEA,SAAU;AACrBI,IAAAA,MAAM,EAAEA,MAAAA;AAAO,GAAA,EACX4I,+BAA+B,CAAC;AAClCxK,IAAAA,IAAI,EAAJA,IAAI;AACJyB,IAAAA,qBAAqB,EAArBA,qBAAqB;AACrBC,IAAAA,0BAA0B,EAA1BA,0BAA0B;AAC1BC,IAAAA,cAAc,EAAdA,cAAAA;AACF,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACFG,IAAAA,IAAI,EAAEA,IAAAA;GACFU,EAAAA,IAAI,CACT,CAAC,CAAA;AAEN,CAAC,CAAA;AAEKwG,IAAAA,SAAS,gBAAGyB,wBAAwB,eAAC7H,cAAK,CAAC8H,UAAU,CAACpL,UAAU,CAAC,EAAE;AACvEqL,EAAAA,WAAW,EAAE,WAAA;AACf,CAAC;;;;"}
|
|
@@ -5,7 +5,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
5
5
|
import { BaseBox } from '../Box/BaseBox/BaseBox.web.js';
|
|
6
6
|
import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
7
7
|
|
|
8
|
-
var _InputRow = function
|
|
8
|
+
var _InputRow = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
9
9
|
var _ref$gridTemplateColu = _ref.gridTemplateColumns,
|
|
10
10
|
gridTemplateColumns = _ref$gridTemplateColu === void 0 ? '1fr' : _ref$gridTemplateColu,
|
|
11
11
|
children = _ref.children,
|
|
@@ -15,10 +15,11 @@ var _InputRow = function _InputRow(_ref) {
|
|
|
15
15
|
gridTemplateColumns: gridTemplateColumns,
|
|
16
16
|
"data-testid": testID,
|
|
17
17
|
className: "__blade-input-row",
|
|
18
|
+
ref: ref,
|
|
18
19
|
children: children
|
|
19
20
|
});
|
|
20
|
-
};
|
|
21
|
-
var InputRow = /*#__PURE__*/assignWithoutSideEffects(
|
|
21
|
+
});
|
|
22
|
+
var InputRow = /*#__PURE__*/assignWithoutSideEffects(_InputRow, {
|
|
22
23
|
displayName: 'InputRow',
|
|
23
24
|
componentId: 'InputRow'
|
|
24
25
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputRow.web.js","sources":["../../../../../../src/components/InputGroup/InputRow.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { InputRowProps } from './types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\n\nexport const _InputRow = (
|
|
1
|
+
{"version":3,"file":"InputRow.web.js","sources":["../../../../../../src/components/InputGroup/InputRow.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { InputRowProps } from './types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport BaseBox from '~components/Box/BaseBox';\n\nexport const _InputRow = React.forwardRef<HTMLDivElement, InputRowProps>(\n ({ gridTemplateColumns = '1fr', children, testID }, ref): JSX.Element => {\n return (\n <BaseBox\n display=\"grid\"\n gridTemplateColumns={gridTemplateColumns}\n data-testid={testID}\n className=\"__blade-input-row\"\n ref={ref}\n >\n {children}\n </BaseBox>\n );\n },\n);\n\nconst InputRow = assignWithoutSideEffects(_InputRow, {\n displayName: 'InputRow',\n componentId: 'InputRow',\n});\nexport { InputRow };\n"],"names":["_InputRow","React","forwardRef","_ref","ref","_ref$gridTemplateColu","gridTemplateColumns","children","testID","_jsx","BaseBox","display","className","InputRow","assignWithoutSideEffects","displayName","componentId"],"mappings":";;;;;;;AAKO,IAAMA,SAAS,gBAAGC,cAAK,CAACC,UAAU,CACvC,UAAAC,IAAA,EAAoDC,GAAG,EAAkB;AAAA,EAAA,IAAAC,qBAAA,GAAAF,IAAA,CAAtEG,mBAAmB;AAAnBA,IAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAAEE,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;IAAEC,MAAM,GAAAL,IAAA,CAANK,MAAM,CAAA;EAC9C,oBACEC,GAAA,CAACC,OAAO,EAAA;AACNC,IAAAA,OAAO,EAAC,MAAM;AACdL,IAAAA,mBAAmB,EAAEA,mBAAoB;AACzC,IAAA,aAAA,EAAaE,MAAO;AACpBI,IAAAA,SAAS,EAAC,mBAAmB;AAC7BR,IAAAA,GAAG,EAAEA,GAAI;AAAAG,IAAAA,QAAA,EAERA,QAAAA;AAAQ,GACF,CAAC,CAAA;AAEd,CACF,EAAC;AAED,IAAMM,QAAQ,gBAAGC,wBAAwB,CAACd,SAAS,EAAE;AACnDe,EAAAA,WAAW,EAAE,UAAU;AACvBC,EAAAA,WAAW,EAAE,UAAA;AACf,CAAC;;;;"}
|