@razorpay/blade 11.23.3 → 11.24.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/BaseInput/AnimatedBaseInputWrapper.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/AnimatedBaseInputWrapper.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +4 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js +1 -1
- package/build/lib/native/components/Input/BaseInput/StyledBaseInput.native.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js +2 -2
- package/build/lib/native/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +2 -2
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/native/components/Table/TableBody.native.js +2 -2
- package/build/lib/native/components/Table/TableBody.native.js.map +1 -1
- package/build/lib/native/components/index.js +1 -1
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +8 -4
- package/build/lib/web/development/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js +17 -8
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +67 -17
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js +4 -2
- package/build/lib/web/development/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/development/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js +15 -14
- package/build/lib/web/development/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +9 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +6 -3
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +185 -30
- 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 +33 -13
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +24 -5
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/componentIds.js +1 -0
- package/build/lib/web/development/components/Table/componentIds.js.map +1 -1
- package/build/lib/web/development/components/Table/index.js +1 -1
- package/build/lib/web/development/components/Table/tokens.js +7 -2
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +1 -1
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js +8 -4
- package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js +17 -8
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +67 -17
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js +4 -2
- package/build/lib/web/production/components/Input/BaseInput/BaseInputWrapper.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js +2 -1
- package/build/lib/web/production/components/Input/BaseInput/StyledBaseInput.web.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js +15 -14
- package/build/lib/web/production/components/Input/BaseInput/baseInputStyles.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +9 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +6 -3
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +185 -30
- 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 +33 -13
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +24 -5
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/componentIds.js +1 -0
- package/build/lib/web/production/components/Table/componentIds.js.map +1 -1
- package/build/lib/web/production/components/Table/index.js +1 -1
- package/build/lib/web/production/components/Table/tokens.js +7 -2
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +1 -1
- package/build/types/components/index.d.ts +15 -2
- package/build/types/components/index.native.d.ts +14 -1
- package/package.json +1 -1
|
@@ -28,7 +28,8 @@ var StyledBaseInputWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
28
28
|
isDisabled: props.isDisabled,
|
|
29
29
|
validationState: props.validationState,
|
|
30
30
|
isTextArea: props.isTextArea,
|
|
31
|
-
isDropdownTrigger: props.isDropdownTrigger
|
|
31
|
+
isDropdownTrigger: props.isDropdownTrigger,
|
|
32
|
+
isTableInputCell: props.isTableInputCell
|
|
32
33
|
})), {}, {
|
|
33
34
|
'&:hover': _objectSpread(_objectSpread({}, getInputBackgroundAndBorderStyles({
|
|
34
35
|
theme: props.theme,
|
|
@@ -37,7 +38,8 @@ var StyledBaseInputWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
37
38
|
isDisabled: props.isDisabled,
|
|
38
39
|
validationState: props.validationState,
|
|
39
40
|
isDropdownTrigger: props.isDropdownTrigger,
|
|
40
|
-
isTextArea: props.isTextArea
|
|
41
|
+
isTextArea: props.isTextArea,
|
|
42
|
+
isTableInputCell: props.isTableInputCell
|
|
41
43
|
})), {}, {
|
|
42
44
|
transitionProperty: 'background-color',
|
|
43
45
|
transitionDuration: castWebType(makeMotionTime(props.theme.motion.duration.xquick)),
|
|
@@ -49,7 +51,8 @@ var StyledBaseInputWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
49
51
|
isDisabled: props.isDisabled,
|
|
50
52
|
validationState: props.validationState,
|
|
51
53
|
isDropdownTrigger: props.isDropdownTrigger,
|
|
52
|
-
isTextArea: props.isTextArea
|
|
54
|
+
isTextArea: props.isTextArea,
|
|
55
|
+
isTableInputCell: props.isTableInputCell
|
|
53
56
|
}))
|
|
54
57
|
});
|
|
55
58
|
});
|
|
@@ -94,7 +97,8 @@ var _AnimatedBaseInputWrapper = function _AnimatedBaseInputWrapper(_ref, ref) {
|
|
|
94
97
|
// Triggered for the collapse animation
|
|
95
98
|
setShowAllTagsWithAnimation === null || setShowAllTagsWithAnimation === void 0 ? void 0 : setShowAllTagsWithAnimation(false);
|
|
96
99
|
}
|
|
97
|
-
}
|
|
100
|
+
},
|
|
101
|
+
isTableInputCell: rest.isTableInputCell
|
|
98
102
|
}));
|
|
99
103
|
};
|
|
100
104
|
var AnimatedBaseInputWrapper = /*#__PURE__*/React__default.forwardRef(_AnimatedBaseInputWrapper);
|
package/build/lib/web/production/components/Input/BaseInput/AnimatedBaseInputWrapper.web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedBaseInputWrapper.web.js","sources":["../../../../../../../src/components/Input/BaseInput/AnimatedBaseInputWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { BaseInputWrapperProps } from './types';\nimport {\n getAnimatedBaseInputWrapperMaxHeight,\n getInputBackgroundAndBorderStyles,\n} from './baseInputStyles';\nimport { baseInputHeight, baseInputWrapperMaxHeight } from './baseInputTokens';\nimport BaseBox from '~components/Box/BaseBox';\nimport { motion } from '~tokens/global';\nimport { castWebType, makeMotionTime, makeSize, makeSpace } from '~utils';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledBaseInputWrapper = styled(BaseBox)<\n Pick<\n BaseInputWrapperProps,\n | 'currentInteraction'\n | 'isDisabled'\n | 'validationState'\n | 'isTextArea'\n | 'isDropdownTrigger'\n | 'maxTagRows'\n >\n>((props) => ({\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isTextArea: props.isTextArea,\n isDropdownTrigger: props.isDropdownTrigger,\n }),\n '&:hover': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isHovered: true,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n isTextArea: props.isTextArea,\n }),\n transitionProperty: 'background-color',\n transitionDuration: castWebType(makeMotionTime(props.theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(props.theme.motion.easing.standard.effective),\n },\n ':focus-within': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n isTextArea: props.isTextArea,\n }),\n },\n}));\n\n// Styled component with animation\nconst StyledAnimatedBaseInputWrapper = styled(StyledBaseInputWrapper)<{\n transition?: FlattenSimpleInterpolation;\n maxTagRows: BaseInputWrapperProps['maxTagRows'];\n showAllTags: BaseInputWrapperProps['showAllTags'];\n isDropdownTrigger: BaseInputWrapperProps['isDropdownTrigger'];\n size: NonNullable<BaseInputWrapperProps['size']>;\n}>((props) =>\n props.isDropdownTrigger\n ? css`\n ${props.transition};\n max-height: ${makeSize(\n getAnimatedBaseInputWrapperMaxHeight({\n maxTagRows: props.maxTagRows,\n showAllTags: props.showAllTags,\n size: props.size,\n }),\n )};\n `\n : undefined,\n);\n\nconst _AnimatedBaseInputWrapper: React.ForwardRefRenderFunction<\n BladeElementRef,\n BaseInputWrapperProps & {\n showAllTags?: boolean;\n }\n> = (\n { showAllTags, setShowAllTagsWithAnimation, maxTagRows, isDropdownTrigger, ...rest },\n ref,\n): React.ReactElement => {\n // Define the animation keyframes\n const expandAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\n`;\n\n const collapseAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\n`;\n\n const expandTransition = css`\n animation: ${expandAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.entrance.effective)};\n `;\n\n const collapseTransition = css`\n animation: ${collapseAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.exit.effective)};\n `;\n\n const noTransition = css`\n animation: none;\n `;\n return (\n <StyledAnimatedBaseInputWrapper\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n {...rest}\n transition={\n maxTagRows !== 'expandable'\n ? noTransition\n : showAllTags\n ? expandTransition\n : collapseTransition\n }\n height={\n rest.isTextArea && isDropdownTrigger\n ? makeSpace((rest.numberOfLines ?? 0) * baseInputHeight[rest.size])\n : undefined\n }\n cursor={rest.isTextArea && isDropdownTrigger ? 'text' : undefined}\n isDropdownTrigger={isDropdownTrigger}\n showAllTags={showAllTags}\n maxTagRows={maxTagRows}\n onAnimationEnd={(e) => {\n if (!showAllTags && e.animationName === collapseAnimation.getName()) {\n // Triggered for the collapse animation\n setShowAllTagsWithAnimation?.(false);\n }\n }}\n />\n );\n};\n\nconst AnimatedBaseInputWrapper = React.forwardRef(_AnimatedBaseInputWrapper);\n\nexport { AnimatedBaseInputWrapper };\n"],"names":["StyledBaseInputWrapper","styled","BaseBox","withConfig","displayName","componentId","props","_objectSpread","getInputBackgroundAndBorderStyles","theme","isFocused","currentInteraction","isDisabled","validationState","isTextArea","isDropdownTrigger","isHovered","transitionProperty","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","StyledAnimatedBaseInputWrapper","css","transition","makeSize","getAnimatedBaseInputWrapperMaxHeight","maxTagRows","showAllTags","size","undefined","_AnimatedBaseInputWrapper","_ref","ref","_rest$numberOfLines","setShowAllTagsWithAnimation","rest","_objectWithoutProperties","_excluded","expandAnimation","keyframes","baseInputHeight","baseInputWrapperMaxHeight","collapseAnimation","expandTransition","quick","String","entrance","collapseTransition","exit","noTransition","_jsx","height","makeSpace","numberOfLines","cursor","onAnimationEnd","e","animationName","getName","AnimatedBaseInputWrapper","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,sBAAsB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,qDAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAU5C,UAACC,KAAK,EAAA;AAAA,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACHC,iCAAiC,CAAC;IACnCC,KAAK,EAAEH,KAAK,CAACG,KAAK;AAClBC,IAAAA,SAAS,EAAEJ,KAAK,CAACK,k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AAAA,IAAAA,mBAAA,KAAAA,KAAAA,CAAAA,GAAAA,mBAAA,GAAI,CAAC,IAAIO,eAAe,CAACL,IAAI,CAACP,IAAI,CAAC,CAAC,GACjEC,SACL;IACDyB,MAAM,EAAEnB,IAAI,CAAC5B,UAAU,IAAIC,iBAAiB,GAAG,MAAM,GAAGqB,SAAU;AAClErB,IAAAA,iBAAiB,EAAEA,iBAAkB;AACrCmB,IAAAA,WAAW,EAAEA,WAAY;AACzBD,IAAAA,UAAU,EAAEA,UAAW;AACvB6B,IAAAA,cAAc,EAAE,SAAAA,cAACC,CAAAA,CAAC,EAAK;AACrB,MAAA,IAAI,CAAC7B,WAAW,IAAI6B,CAAC,CAACC,aAAa,KAAKf,iBAAiB,CAACgB,OAAO,EAAE,EAAE;AACnE;AACAxB,QAAAA,2BAA2B,aAA3BA,2BAA2B,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA3BA,2BAA2B,CAAG,KAAK,CAAC,CAAA;AACtC,OAAA;AACF,KAAA;AAAE,GAAA,CACH,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMyB,wBAAwB,gBAAGC,cAAK,CAACC,UAAU,CAAC/B,yBAAyB;;;;"}
|
|
1
|
+
{"version":3,"file":"AnimatedBaseInputWrapper.web.js","sources":["../../../../../../../src/components/Input/BaseInput/AnimatedBaseInputWrapper.web.tsx"],"sourcesContent":["import React from 'react';\nimport type { FlattenSimpleInterpolation } from 'styled-components';\nimport styled, { css, keyframes } from 'styled-components';\nimport type { BaseInputWrapperProps } from './types';\nimport {\n getAnimatedBaseInputWrapperMaxHeight,\n getInputBackgroundAndBorderStyles,\n} from './baseInputStyles';\nimport { baseInputHeight, baseInputWrapperMaxHeight } from './baseInputTokens';\nimport BaseBox from '~components/Box/BaseBox';\nimport { motion } from '~tokens/global';\nimport { castWebType, makeMotionTime, makeSize, makeSpace } from '~utils';\nimport type { BladeElementRef } from '~utils/types';\n\nconst StyledBaseInputWrapper = styled(BaseBox)<\n Pick<\n BaseInputWrapperProps,\n | 'currentInteraction'\n | 'isDisabled'\n | 'validationState'\n | 'isTextArea'\n | 'isDropdownTrigger'\n | 'maxTagRows'\n | 'isTableInputCell'\n >\n>((props) => ({\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isTextArea: props.isTextArea,\n isDropdownTrigger: props.isDropdownTrigger,\n isTableInputCell: props.isTableInputCell,\n }),\n '&:hover': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isHovered: true,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n isTextArea: props.isTextArea,\n isTableInputCell: props.isTableInputCell,\n }),\n transitionProperty: 'background-color',\n transitionDuration: castWebType(makeMotionTime(props.theme.motion.duration.xquick)),\n transitionTimingFunction: castWebType(props.theme.motion.easing.standard.effective),\n },\n ':focus-within': {\n ...getInputBackgroundAndBorderStyles({\n theme: props.theme,\n isFocused: props.currentInteraction === 'focus',\n isDisabled: props.isDisabled,\n validationState: props.validationState,\n isDropdownTrigger: props.isDropdownTrigger,\n isTextArea: props.isTextArea,\n isTableInputCell: props.isTableInputCell,\n }),\n },\n}));\n\n// Styled component with animation\nconst StyledAnimatedBaseInputWrapper = styled(StyledBaseInputWrapper)<{\n transition?: FlattenSimpleInterpolation;\n maxTagRows: BaseInputWrapperProps['maxTagRows'];\n showAllTags: BaseInputWrapperProps['showAllTags'];\n isDropdownTrigger: BaseInputWrapperProps['isDropdownTrigger'];\n size: NonNullable<BaseInputWrapperProps['size']>;\n}>((props) =>\n props.isDropdownTrigger\n ? css`\n ${props.transition};\n max-height: ${makeSize(\n getAnimatedBaseInputWrapperMaxHeight({\n maxTagRows: props.maxTagRows,\n showAllTags: props.showAllTags,\n size: props.size,\n }),\n )};\n `\n : undefined,\n);\n\nconst _AnimatedBaseInputWrapper: React.ForwardRefRenderFunction<\n BladeElementRef,\n BaseInputWrapperProps & {\n showAllTags?: boolean;\n }\n> = (\n { showAllTags, setShowAllTagsWithAnimation, maxTagRows, isDropdownTrigger, ...rest },\n ref,\n): React.ReactElement => {\n // Define the animation keyframes\n const expandAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\n`;\n\n const collapseAnimation = keyframes`\nfrom {\n max-height: ${makeSize(baseInputWrapperMaxHeight[rest.size])};\n}\nto {\n max-height: ${makeSize(baseInputHeight[rest.size])};\n}\n`;\n\n const expandTransition = css`\n animation: ${expandAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.entrance.effective)};\n `;\n\n const collapseTransition = css`\n animation: ${collapseAnimation} ${makeMotionTime(motion.duration.quick)}\n ${String(motion.easing.exit.effective)};\n `;\n\n const noTransition = css`\n animation: none;\n `;\n return (\n <StyledAnimatedBaseInputWrapper\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n {...rest}\n transition={\n maxTagRows !== 'expandable'\n ? noTransition\n : showAllTags\n ? expandTransition\n : collapseTransition\n }\n height={\n rest.isTextArea && isDropdownTrigger\n ? makeSpace((rest.numberOfLines ?? 0) * baseInputHeight[rest.size])\n : undefined\n }\n cursor={rest.isTextArea && isDropdownTrigger ? 'text' : undefined}\n isDropdownTrigger={isDropdownTrigger}\n showAllTags={showAllTags}\n maxTagRows={maxTagRows}\n onAnimationEnd={(e) => {\n if (!showAllTags && e.animationName === collapseAnimation.getName()) {\n // Triggered for the collapse animation\n setShowAllTagsWithAnimation?.(false);\n }\n }}\n isTableInputCell={rest.isTableInputCell}\n />\n );\n};\n\nconst AnimatedBaseInputWrapper = React.forwardRef(_AnimatedBaseInputWrapper);\n\nexport { AnimatedBaseInputWrapper };\n"],"names":["StyledBaseInputWrapper","styled","BaseBox","withConfig","displayName","componentId","props","_objectSpread","getInputBackgroundAndBorderStyles","theme","isFocused","currentInteraction","isDisabled","validationState","isTextArea","isDropdownTrigger","isTableInputCell","isHovered","transitionProperty","transitionDuration","castWebType","makeMotionTime","motion","duration","xquick","transitionTimingFunction","easing","standard","effective","StyledAnimatedBaseInputWrapper","css","transition","makeSize","getAnimatedBaseInputWrapperMaxHeight","maxTagRows","showAllTags","size","undefined","_AnimatedBaseInputWrapper","_ref","ref","_rest$numberOfLines","setShowAllTagsWithAnimation","rest","_objectWithoutProperties","_excluded","expandAnimation","keyframes","baseInputHeight","baseInputWrapperMaxHeight","collapseAnimation","expandTransition","quick","String","entrance","collapseTransition","exit","noTransition","_jsx","height","makeSpace","numberOfLines","cursor","onAnimationEnd","e","animationName","getName","AnimatedBaseInputWrapper","React","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,IAAMA,sBAAsB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,qDAAA;EAAAC,WAAA,EAAA,UAAA;AAAA,CAAA,CAAA,CAW5C,UAACC,KAAK,EAAA;AAAA,EAAA,OAAAC,aAAA,CAAAA,aAAA,CAAA,EAAA,EACHC,iCAAiC,CAAC;IACnCC,KAAK,EAAEH,KAAK,CAACG,KAAK;AAClBC,IAAAA,SAAS,EAAEJ,KAAK,CAACK,kBAAkB,KAAK,OAAO;IAC/CC,UAAU,EAAEN,KAAK,CAACM,UAAU;IAC5BC,eAAe,EAAEP,KAAK,CAACO,eAAe;IACtCC,UAAU,EAAER,KAAK,CAACQ,UAAU;IAC5BC,iBAAiB,EAAET,KAAK,CAACS,iBAAiB;IAC1CC,gBAAgB,EAAEV,KAAK,CAACU,gBAAAA;AAC1B,GAAC,CAAC,CAAA,EAAA,EAAA,EAAA;AACF,IAAA,SAAS,EAAAT,aAAA,CAAAA,aAAA,CAAA,EAAA,EACJC,iCAAiC,CAAC;MACnCC,KAAK,EAAEH,KAAK,CAACG,KAAK;AAClBQ,MAAAA,SAAS,EAAE,I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,EAAEA,WAAY;AACzBD,IAAAA,UAAU,EAAEA,UAAW;AACvB6B,IAAAA,cAAc,EAAE,SAAAA,cAACC,CAAAA,CAAC,EAAK;AACrB,MAAA,IAAI,CAAC7B,WAAW,IAAI6B,CAAC,CAACC,aAAa,KAAKf,iBAAiB,CAACgB,OAAO,EAAE,EAAE;AACnE;AACAxB,QAAAA,2BAA2B,aAA3BA,2BAA2B,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA3BA,2BAA2B,CAAG,KAAK,CAAC,CAAA;AACtC,OAAA;KACA;IACF1B,gBAAgB,EAAE2B,IAAI,CAAC3B,gBAAAA;AAAiB,GAAA,CACzC,CAAC,CAAA;AAEN,CAAC,CAAA;AAED,IAAMmD,wBAAwB,gBAAGC,cAAK,CAACC,UAAU,CAAC/B,yBAAyB;;;;"}
|
|
@@ -44,7 +44,7 @@ import { makeSize } from '../../../utils/makeSize/makeSize.js';
|
|
|
44
44
|
import { FormHint } from '../../Form/FormHint.js';
|
|
45
45
|
import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
|
|
46
46
|
|
|
47
|
-
var _excluded = ["as", "label", "labelPosition", "placeholder", "type", "defaultValue", "tags", "showAllTags", "activeTagIndex", "setActiveTagIndex", "name", "value", "onFocus", "onChange", "onInput", "onBlur", "onSubmit", "onClick", "onKeyDown", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "leadingIcon", "prefix", "trailingInteractionElement", "leadingInteractionElement", "suffix", "trailingIcon", "maxCharacters", "textAlign", "autoFocus", "keyboardReturnKeyType", "keyboardType", "autoCompleteSuggestionType", "trailingHeaderSlot", "trailingFooterSlot", "numberOfLines", "id", "componentName", "accessibilityLabel", "labelId", "activeDescendant", "hideLabelText", "hideFormHint", "hasPopup", "popupId", "isPopupExpanded", "maxTagRows", "shouldIgnoreBlurAnimation", "setShouldIgnoreBlurAnimation", "autoCapitalize", "setInputWrapperRef", "testID", "isDropdownTrigger", "isLabelInsideInput", "size", "trailingButton", "valueComponentType"];
|
|
47
|
+
var _excluded = ["as", "label", "labelPosition", "placeholder", "type", "defaultValue", "tags", "showAllTags", "activeTagIndex", "setActiveTagIndex", "name", "value", "onFocus", "onChange", "onInput", "onBlur", "onSubmit", "onClick", "onKeyDown", "isDisabled", "necessityIndicator", "validationState", "errorText", "helpText", "successText", "isRequired", "leadingIcon", "prefix", "trailingInteractionElement", "leadingInteractionElement", "suffix", "trailingIcon", "maxCharacters", "textAlign", "autoFocus", "keyboardReturnKeyType", "keyboardType", "autoCompleteSuggestionType", "trailingHeaderSlot", "trailingFooterSlot", "numberOfLines", "id", "componentName", "accessibilityLabel", "labelId", "activeDescendant", "hideLabelText", "hideFormHint", "hasPopup", "popupId", "isPopupExpanded", "maxTagRows", "shouldIgnoreBlurAnimation", "setShouldIgnoreBlurAnimation", "autoCapitalize", "setInputWrapperRef", "testID", "isDropdownTrigger", "isLabelInsideInput", "size", "trailingButton", "valueComponentType", "isTableInputCell"];
|
|
48
48
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
49
49
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
50
50
|
var autoCompleteSuggestionTypeValues = ['none', 'on', 'name', 'email', 'username', 'password', 'newPassword', 'oneTimeCode', 'telephone', 'postalCode', 'countryName', 'creditCardNumber', 'creditCardCSC', 'creditCardExpiry', 'creditCardExpiryMonth', 'creditCardExpiryYear'];
|
|
@@ -286,16 +286,17 @@ var FocusRingWrapper = /*#__PURE__*/styled(BaseBox).withConfig({
|
|
|
286
286
|
componentId: "sc-177qd3e-0"
|
|
287
287
|
})(function (_ref11) {
|
|
288
288
|
var theme = _ref11.theme,
|
|
289
|
-
currentInteraction = _ref11.currentInteraction
|
|
289
|
+
currentInteraction = _ref11.currentInteraction,
|
|
290
|
+
isTableInputCell = _ref11.isTableInputCell;
|
|
290
291
|
return {
|
|
291
|
-
borderRadius: makeBorderSize(theme.border.radius.medium),
|
|
292
|
+
borderRadius: makeBorderSize(isTableInputCell ? theme.border.radius.none : theme.border.radius.medium),
|
|
292
293
|
width: '100%',
|
|
293
|
-
'&:focus-within': _objectSpread(_objectSpread({}, getFocusRingStyles({
|
|
294
|
+
'&:focus-within': !isTableInputCell ? _objectSpread(_objectSpread({}, getFocusRingStyles({
|
|
294
295
|
theme: theme
|
|
295
296
|
})), {}, {
|
|
296
297
|
transitionDuration: castWebType(makeMotionTime(getIn(theme.motion.duration, baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit'].duration))),
|
|
297
298
|
transitionTimingFunction: castWebType(getIn(theme.motion.easing, baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit'].easing))
|
|
298
|
-
})
|
|
299
|
+
}) : {}
|
|
299
300
|
};
|
|
300
301
|
});
|
|
301
302
|
var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
@@ -368,6 +369,8 @@ var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
|
368
369
|
trailingButton = _ref12.trailingButton,
|
|
369
370
|
_ref12$valueComponent = _ref12.valueComponentType,
|
|
370
371
|
valueComponentType = _ref12$valueComponent === void 0 ? 'text' : _ref12$valueComponent,
|
|
372
|
+
_ref12$isTableInputCe = _ref12.isTableInputCell,
|
|
373
|
+
isTableInputCell = _ref12$isTableInputCe === void 0 ? false : _ref12$isTableInputCe,
|
|
371
374
|
styledProps = _objectWithoutProperties(_ref12, _excluded);
|
|
372
375
|
var _useTheme = useTheme(),
|
|
373
376
|
theme = _useTheme.theme;
|
|
@@ -481,6 +484,7 @@ var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
|
481
484
|
}), trailingHeaderSlot === null || trailingHeaderSlot === void 0 ? void 0 : trailingHeaderSlot(value !== null && value !== void 0 ? value : inputValue)]
|
|
482
485
|
}), /*#__PURE__*/jsx(FocusRingWrapper, {
|
|
483
486
|
currentInteraction: currentInteraction,
|
|
487
|
+
isTableInputCell: isTableInputCell,
|
|
484
488
|
children: /*#__PURE__*/jsxs(BaseInputWrapper, {
|
|
485
489
|
isDropdownTrigger: isDropdownTrigger,
|
|
486
490
|
isTextArea: isTextArea,
|
|
@@ -505,6 +509,7 @@ var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
|
505
509
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
506
510
|
}
|
|
507
511
|
},
|
|
512
|
+
isTableInputCell: isTableInputCell,
|
|
508
513
|
children: [/*#__PURE__*/jsx(BaseInputVisuals, {
|
|
509
514
|
size: size,
|
|
510
515
|
leadingIcon: leadingIcon,
|
|
@@ -581,7 +586,8 @@ var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
|
581
586
|
autoCapitalize: autoCapitalize,
|
|
582
587
|
isDropdownTrigger: isDropdownTrigger,
|
|
583
588
|
$size: size,
|
|
584
|
-
valueComponentType: valueComponentType
|
|
589
|
+
valueComponentType: valueComponentType,
|
|
590
|
+
isTableInputCell: isTableInputCell
|
|
585
591
|
}, metaAttribute({
|
|
586
592
|
name: MetaConstants.StyledBaseInput
|
|
587
593
|
})))
|
|
@@ -592,11 +598,14 @@ var _BaseInput = function _BaseInput(_ref12, ref) {
|
|
|
592
598
|
isDisabled: isDisabled,
|
|
593
599
|
validationState: validationState,
|
|
594
600
|
trailingButton: trailingButton,
|
|
595
|
-
size: size
|
|
601
|
+
size: size,
|
|
602
|
+
errorText: errorText,
|
|
603
|
+
successText: successText,
|
|
604
|
+
isTableInputCell: isTableInputCell
|
|
596
605
|
})]
|
|
597
606
|
})
|
|
598
607
|
})]
|
|
599
|
-
}),
|
|
608
|
+
}), hideFormHint || isTableInputCell ? null : /*#__PURE__*/jsx(BaseBox, {
|
|
600
609
|
marginLeft: makeSize(isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[size] : 0),
|
|
601
610
|
children: /*#__PURE__*/jsxs(BaseBox, {
|
|
602
611
|
display: "flex",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","sources":["../../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type { BladeElementRef, ContainerElementType, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n}>(({ theme, currentInteraction }) => ({\n borderRadius: makeBorderSize(theme.border.radius.medium),\n width: '100%',\n '&:focus-within': {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n getIn(\n theme.motion.easing,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit'].easing,\n ),\n ),\n },\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: hasPopup ? 'combobox' : undefined,\n activeDescendant,\n });\n\n const willRenderHintText = Boolean(helpText) || Boolean(successText) || Boolean(errorText);\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n return (\n <BaseBox {...metaAttribute({ name: componentName, testID })} {...getStyledProps(styledProps)}>\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {!hideLabelText && !isLabelInsideInput && label && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea ? 'flex-start' : undefined}\n marginY={isTextArea && isLabelLeftPositioned ? 'spacing.3' : 'spacing.0'}\n >\n <FormLabel\n as=\"label\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={labelId}\n htmlFor={inputId}\n size={size}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper currentInteraction={currentInteraction}>\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n >\n <BaseInputVisuals\n size={size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n if (ref && !isReactNative && 'current' in ref) {\n ref.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={mergedInputRef as any}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={size}\n valueComponentType={valueComponentType}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={size}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n\n {!hideFormHint && (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","concat","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref10","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","withConfig","displayName","componentId","_ref11","theme","currentInteraction","borderRadius","makeBorderSize","border","radius","medium","width","_objectSpread","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref12","ref","_ref12$as","as","label","_ref12$labelPosition","labelPosition","placeholder","_ref12$type","type","_ref12$showAllTags","showAllTags","_ref12$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref12$size","size","trailingButton","_ref12$valueComponent","valueComponentType","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","undefined","controls","role","willRenderHintText","includes","join","isTextArea","_jsxs","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","_ref$current","labelPrefix","handleOnInputClick","e","StyledBaseInput","hasTags","$size","MetaConstants","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyYA,IAAMA,gCAAgC,GAAG,CACvC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,CACvB,CAAA;AAGD,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CACXC,IAA4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AA,EAAA,cAElE+M,GAAA,CAACsB,QAAQ,EAAA;UACP1H,IAAI,EAAE/C,WAAW,CAAC;AAAEE,YAAAA,eAAe,EAAfA,eAAe;YAAEC,WAAW,EAAE0H,OAAO,CAACvE,QAAQ,CAAA;AAAE,WAAC,CAAE;AACvEA,UAAAA,QAAQ,EAAEA,QAAS;AACnBD,UAAAA,SAAS,EAAEA,SAAU;AACrBE,UAAAA,WAAW,EAAEA,WAAY;AACzB7C,UAAAA,UAAU,EAAEA,UAAW;AACvBF,UAAAA,WAAW,EAAEA,WAAY;AACzBC,UAAAA,aAAa,EAAEA,aAAc;AAC7BkF,UAAAA,IAAI,EAAEA,IAAAA;AAAK,SACZ,CAAC,EACDrB,kBAAkB,KAAA,IAAA,IAAlBA,kBAAkB,KAAlBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,kBAAkB,CAAGrH,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAALA,KAAK,GAAIgB,UAAU,CAAC,CAAA;OACnC,CAAA;AAAC,KACH,CACV,CAAA;AAAA,GAAA,CACM,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAMyM,gBAAgB,gBAAG9O,cAAK,CAAC+O,UAAU,CAACtI,UAAU,CAAC,CAAA;AACrD,IAAMuI,SAAS,gBAAGC,wBAAwB,CAACH,gBAAgB,EAAE;AAAE3J,EAAAA,WAAW,EAAE,WAAA;AAAY,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BaseInput.js","sources":["../../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type { BladeElementRef, ContainerElementType, TestID } from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n /**\n * Whether to render the input as a table cell\n * @default true\n **/\n isTableInputCell?: boolean;\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n}>(({ theme, currentInteraction, isTableInputCell }) => ({\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n width: '100%',\n '&:focus-within': !isTableInputCell\n ? {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n getIn(\n theme.motion.easing,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .easing,\n ),\n ),\n }\n : {},\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n isTableInputCell = false,\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: hasPopup ? 'combobox' : undefined,\n activeDescendant,\n });\n\n const willRenderHintText = Boolean(helpText) || Boolean(successText) || Boolean(errorText);\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n return (\n <BaseBox {...metaAttribute({ name: componentName, testID })} {...getStyledProps(styledProps)}>\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {!hideLabelText && !isLabelInsideInput && label && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea ? 'flex-start' : undefined}\n marginY={isTextArea && isLabelLeftPositioned ? 'spacing.3' : 'spacing.0'}\n >\n <FormLabel\n as=\"label\"\n necessityIndicator={necessityIndicator}\n position={labelPosition}\n id={labelId}\n htmlFor={inputId}\n size={size}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper\n currentInteraction={currentInteraction}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputVisuals\n size={size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n if (ref && !isReactNative && 'current' in ref) {\n ref.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={mergedInputRef as any}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={size}\n valueComponentType={valueComponentType}\n isTableInputCell={isTableInputCell}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={size}\n errorText={errorText}\n successText={successText}\n isTableInputCell={isTableInputCell}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n\n {hideFormHint || isTableInputCell ? null : (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","concat","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref10","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","withConfig","displayName","componentId","_ref11","theme","currentInteraction","isTableInputCell","borderRadius","makeBorderSize","border","radius","none","medium","width","_objectSpread","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref12","ref","_ref12$as","as","label","_ref12$labelPosition","labelPosition","placeholder","_ref12$type","type","_ref12$showAllTags","showAllTags","_ref12$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref12$size","size","trailingButton","_ref12$valueComponent","valueComponentType","_ref12$isTableInputCe","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","undefined","controls","role","willRenderHintText","includes","join","isTextArea","_jsxs","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","_ref$current","labelPrefix","handleOnInputClick","e","StyledBaseInput","hasTags","$size","MetaConstants","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8YA,IAAMA,gCAAgC,GAAG,CACvC,MAAM,EACN,IAAI,EACJ,MAAM,EACN,OAAO,EACP,UAAU,EACV,UAAU,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,uBAAuB,EACvB,sBAAsB,CACvB,CAAA;AAGD,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CACXC,IAA4B,EAC5BC,cAAsB,EACtBC,iBAAoD,EAIjD;AACH,EAAA,IAAMC,mBAAmB,GAAGC,cAAK,CAACC,MAAM,CAAS,CAAC,CAAC,CAAA;EAEnDD,cAAK,CAACE,SAAS,CAAC,YAAM;IACpB,IAAIN,IAAI,IAAIC,cAAc,IAAI,CAAC,IAAIA,cAAc,GAAGD,IAAI,CAACO,MAAM,EAAE;MAAA,IAAAC,oBAAA,EAAAC,qBAAA,CAAA;MAC/D,IAAMC,QAAQ,IAAAF,oBAAA,GAAGR,IAAI,CAACC,cAAc,C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AzJ,QAAA,eAEFwM,IAAA,CAAC/H,OAAO,EAAA;AACNkI,QAAAA,OAAO,EAAC,MAAM;AACdC,QAAAA,aAAa,EAAC,KAAK;AACnBC,QAAAA,cAAc,EAAET,kBAAkB,GAAG,eAAe,GAAG,UAAW;QAAApM,QAAA,EAAA,cAElEkN,GAAA,CAACsB,QAAQ,EAAA;UACP3H,IAAI,EAAEjD,WAAW,CAAC;AAAEE,YAAAA,eAAe,EAAfA,eAAe;YAAEC,WAAW,EAAE6H,OAAO,CAACxE,QAAQ,CAAA;AAAE,WAAC,CAAE;AACvEA,UAAAA,QAAQ,EAAEA,QAAS;AACnBD,UAAAA,SAAS,EAAEA,SAAU;AACrBE,UAAAA,WAAW,EAAEA,WAAY;AACzB/C,UAAAA,UAAU,EAAEA,UAAW;AACvBF,UAAAA,WAAW,EAAEA,WAAY;AACzBC,UAAAA,aAAa,EAAEA,aAAc;AAC7BoF,UAAAA,IAAI,EAAEA,IAAAA;AAAK,SACZ,CAAC,EACDrB,kBAAkB,KAAA,IAAA,IAAlBA,kBAAkB,KAAlBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,kBAAkB,CAAGvH,KAAK,aAALA,KAAK,KAAA,KAAA,CAAA,GAALA,KAAK,GAAIgB,UAAU,CAAC,CAAA;OACnC,CAAA;AAAC,KACH,CACV,CAAA;AAAA,GAAA,CACM,CAAC,CAAA;AAEd,CAAC,CAAA;AAED,IAAM4M,gBAAgB,gBAAGjP,cAAK,CAACkP,UAAU,CAACvI,UAAU,CAAC,CAAA;AACrD,IAAMwI,SAAS,gBAAGC,wBAAwB,CAACH,gBAAgB,EAAE;AAAE9J,EAAAA,WAAW,EAAE,WAAA;AAAY,CAAC;;;;"}
|
|
@@ -4,7 +4,11 @@ import '../../Box/BaseBox/index.js';
|
|
|
4
4
|
import '../../Typography/index.js';
|
|
5
5
|
import '../../../utils/isValidAllowedChildren/index.js';
|
|
6
6
|
import '../../../utils/logger/index.js';
|
|
7
|
-
import
|
|
7
|
+
import '../../Tooltip/index.js';
|
|
8
|
+
import '../../Box/index.js';
|
|
9
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
|
+
import { Tooltip } from '../../Tooltip/Tooltip.web.js';
|
|
11
|
+
import { Box } from '../../Box/Box.js';
|
|
8
12
|
import { isValidAllowedChildren } from '../../../utils/isValidAllowedChildren/isValidAllowedChildren.js';
|
|
9
13
|
import { throwBladeError } from '../../../utils/logger/logger.js';
|
|
10
14
|
import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
|
|
@@ -120,18 +124,56 @@ var getInputVisualsToBeRendered = function getInputVisualsToBeRendered(_ref5) {
|
|
|
120
124
|
hasTrailingButton: Boolean(trailingButton)
|
|
121
125
|
};
|
|
122
126
|
};
|
|
123
|
-
var
|
|
124
|
-
var
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
var getTooltipContent = function getTooltipContent(_ref6) {
|
|
128
|
+
var validationState = _ref6.validationState,
|
|
129
|
+
errorText = _ref6.errorText,
|
|
130
|
+
successText = _ref6.successText;
|
|
131
|
+
if (validationState === 'error' && errorText) {
|
|
132
|
+
return errorText;
|
|
133
|
+
}
|
|
134
|
+
if (validationState === 'success' && successText) {
|
|
135
|
+
return successText;
|
|
136
|
+
}
|
|
137
|
+
return '';
|
|
138
|
+
};
|
|
139
|
+
var ValidationIconTooltip = function ValidationIconTooltip(_ref7) {
|
|
140
|
+
var children = _ref7.children,
|
|
141
|
+
validationState = _ref7.validationState,
|
|
142
|
+
errorText = _ref7.errorText,
|
|
143
|
+
successText = _ref7.successText,
|
|
144
|
+
isTableInputCell = _ref7.isTableInputCell;
|
|
145
|
+
if (isTableInputCell && validationState === 'error' && errorText || validationState === 'success' && successText) {
|
|
146
|
+
return /*#__PURE__*/jsx(Tooltip, {
|
|
147
|
+
content: getTooltipContent({
|
|
148
|
+
validationState: validationState,
|
|
149
|
+
errorText: errorText,
|
|
150
|
+
successText: successText
|
|
151
|
+
}),
|
|
152
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
153
|
+
display: "flex",
|
|
154
|
+
justifyContent: "center",
|
|
155
|
+
alignItems: "center",
|
|
156
|
+
children: children
|
|
157
|
+
})
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
return children;
|
|
161
|
+
};
|
|
162
|
+
var BaseInputVisuals = function BaseInputVisuals(_ref8) {
|
|
163
|
+
var LeadingIcon = _ref8.leadingIcon,
|
|
164
|
+
prefix = _ref8.prefix,
|
|
165
|
+
trailingInteractionElement = _ref8.trailingInteractionElement,
|
|
166
|
+
leadingInteractionElement = _ref8.leadingInteractionElement,
|
|
167
|
+
suffix = _ref8.suffix,
|
|
168
|
+
TrailingIcon = _ref8.trailingIcon,
|
|
169
|
+
isDisabled = _ref8.isDisabled,
|
|
170
|
+
_ref8$validationState = _ref8.validationState,
|
|
171
|
+
validationState = _ref8$validationState === void 0 ? 'none' : _ref8$validationState,
|
|
172
|
+
size = _ref8.size,
|
|
173
|
+
isTableInputCell = _ref8.isTableInputCell,
|
|
174
|
+
errorText = _ref8.errorText,
|
|
175
|
+
successText = _ref8.successText,
|
|
176
|
+
TrailingButton = _ref8.trailingButton;
|
|
135
177
|
var _getInputVisualsToBeR = getInputVisualsToBeRendered({
|
|
136
178
|
leadingIcon: LeadingIcon,
|
|
137
179
|
prefix: prefix,
|
|
@@ -222,14 +264,22 @@ var BaseInputVisuals = function BaseInputVisuals(_ref6) {
|
|
|
222
264
|
children: suffix
|
|
223
265
|
})
|
|
224
266
|
})) : null, TrailingIcon ? /*#__PURE__*/jsx(BaseBox, _objectSpread(_objectSpread({
|
|
225
|
-
display: "flex"
|
|
267
|
+
display: "flex",
|
|
268
|
+
justifyContent: "center",
|
|
269
|
+
alignItems: "center"
|
|
226
270
|
}, getTrailingIconStyles({
|
|
227
271
|
hasTrailingIcon: hasTrailingIcon,
|
|
228
272
|
hasTrailingButton: hasTrailingButton
|
|
229
273
|
})), {}, {
|
|
230
|
-
children: /*#__PURE__*/jsx(
|
|
231
|
-
|
|
232
|
-
|
|
274
|
+
children: /*#__PURE__*/jsx(ValidationIconTooltip, {
|
|
275
|
+
isTableInputCell: isTableInputCell,
|
|
276
|
+
errorText: errorText,
|
|
277
|
+
successText: successText,
|
|
278
|
+
validationState: validationState,
|
|
279
|
+
children: /*#__PURE__*/jsx(TrailingIcon, {
|
|
280
|
+
size: iconSize[size],
|
|
281
|
+
color: isDisabled ? 'interactive.icon.gray.disabled' : trailingIconColor[validationState]
|
|
282
|
+
})
|
|
233
283
|
})
|
|
234
284
|
})) : null, TrailingButton ? /*#__PURE__*/jsx(BaseBox, {
|
|
235
285
|
paddingRight: "spacing.4",
|