@razorpay/blade 12.63.0 → 12.65.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/Badge/Badge.js +1 -1
- package/build/lib/native/components/Badge/Badge.js.map +1 -1
- package/build/lib/native/components/Badge/badgeTokens.js +1 -1
- package/build/lib/native/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +6 -0
- package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
- package/build/lib/native/components/Charts/CommonChartComponents/tokens.js +4 -0
- package/build/lib/native/components/Charts/CommonChartComponents/tokens.js.map +1 -0
- package/build/lib/native/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js +1 -1
- package/build/lib/native/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js +1 -1
- package/build/lib/native/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/native/components/QuickFilters/QuickFilter.js +1 -1
- package/build/lib/native/components/QuickFilters/QuickFilter.js.map +1 -1
- package/build/lib/native/components/Radio/Radio.js +1 -1
- package/build/lib/native/components/Radio/Radio.js.map +1 -1
- package/build/lib/native/components/Table/TableContext.js +1 -1
- package/build/lib/native/components/Table/TableContext.js.map +1 -1
- package/build/lib/native/components/Table/tokens.js +1 -1
- package/build/lib/native/components/Table/tokens.js.map +1 -1
- package/build/lib/native/components/index.js +2 -0
- package/build/lib/native/components/index.js.map +1 -1
- package/build/lib/native/tokens/global/colors.js +1 -1
- package/build/lib/native/tokens/global/colors.js.map +1 -1
- package/build/lib/native/tokens/global/size.js +1 -1
- package/build/lib/native/tokens/global/size.js.map +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
- package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/native/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/development/components/Badge/Badge.js +4 -0
- package/build/lib/web/development/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/development/components/Badge/badgeTokens.js +4 -0
- package/build/lib/web/development/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js +140 -38
- package/build/lib/web/development/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/BarChart/BarChart.web.js +121 -57
- package/build/lib/web/development/components/Charts/BarChart/BarChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js +145 -92
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +15 -0
- package/build/lib/web/development/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
- package/build/lib/web/development/components/Charts/CommonChartComponents/index.js +2 -0
- package/build/lib/web/development/components/Charts/CommonChartComponents/index.js.map +1 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js +2 -1
- package/build/lib/web/development/components/Charts/CommonChartComponents/tokens.js.map +1 -1
- package/build/lib/web/development/components/Charts/DonutChart/DonutChart.web.js +202 -69
- package/build/lib/web/development/components/Charts/DonutChart/DonutChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js +84 -32
- package/build/lib/web/development/components/Charts/LineChart/LineChart.web.js.map +1 -1
- package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js +33 -0
- package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/index.js +2 -0
- package/build/lib/web/development/components/Charts/utils/assignDataColorMapping/index.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/getHighestColorInRange.js +53 -0
- package/build/lib/web/development/components/Charts/utils/getHighestColorInRange.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/index.js +5 -0
- package/build/lib/web/development/components/Charts/utils/index.js.map +1 -1
- package/build/lib/web/development/components/Charts/utils/isSequentialColor.js +35 -0
- package/build/lib/web/development/components/Charts/utils/isSequentialColor.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/sanitizeString/index.js +2 -0
- package/build/lib/web/development/components/Charts/utils/sanitizeString/index.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/sanitizeString/sanitizeString.js +30 -0
- package/build/lib/web/development/components/Charts/utils/sanitizeString/sanitizeString.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/tokens.js +7 -0
- package/build/lib/web/development/components/Charts/utils/tokens.js.map +1 -0
- package/build/lib/web/development/components/Charts/utils/useColorTheme.js +32 -11
- package/build/lib/web/development/components/Charts/utils/useColorTheme.js.map +1 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js +3 -1
- package/build/lib/web/development/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js +8 -9
- package/build/lib/web/development/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/development/components/FilterChip/tokens.js +1 -1
- package/build/lib/web/development/components/FilterChip/tokens.js.map +1 -1
- package/build/lib/web/development/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js +2 -0
- package/build/lib/web/development/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js +11 -0
- package/build/lib/web/development/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
- package/build/lib/web/development/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/development/components/ListView/ListViewFilters.web.js +13 -102
- package/build/lib/web/development/components/ListView/ListViewFilters.web.js.map +1 -1
- package/build/lib/web/development/components/QuickFilters/QuickFilter.js +2 -1
- package/build/lib/web/development/components/QuickFilters/QuickFilter.js.map +1 -1
- package/build/lib/web/development/components/Radio/Radio.js +4 -2
- package/build/lib/web/development/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/development/components/Table/Table.web.js +3 -1
- package/build/lib/web/development/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableBody.web.js +2 -1
- 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 +2 -1
- package/build/lib/web/development/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableHeader.web.js +78 -68
- package/build/lib/web/development/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TablePagination.web.js +5 -2
- package/build/lib/web/development/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/development/components/Table/TableToolbar.web.js +15 -13
- package/build/lib/web/development/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/development/components/Table/tokens.js +11 -8
- package/build/lib/web/development/components/Table/tokens.js.map +1 -1
- package/build/lib/web/development/components/index.js +2 -0
- package/build/lib/web/development/components/index.js.map +1 -1
- package/build/lib/web/development/tokens/global/colors.js +48 -48
- package/build/lib/web/development/tokens/global/colors.js.map +1 -1
- package/build/lib/web/development/tokens/global/size.js +2 -0
- package/build/lib/web/development/tokens/global/size.js.map +1 -1
- package/build/lib/web/development/tokens/theme/bladeTheme.js +139 -111
- package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/development/tokens/theme/theme.js.map +1 -1
- package/build/lib/web/production/components/Badge/Badge.js +4 -0
- package/build/lib/web/production/components/Badge/Badge.js.map +1 -1
- package/build/lib/web/production/components/Badge/badgeTokens.js +4 -0
- package/build/lib/web/production/components/Badge/badgeTokens.js.map +1 -1
- package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js +140 -38
- package/build/lib/web/production/components/Charts/AreaChart/AreaChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/BarChart/BarChart.web.js +121 -57
- package/build/lib/web/production/components/Charts/BarChart/BarChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js +145 -92
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponents.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponentsContext.js +15 -0
- package/build/lib/web/production/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map +1 -0
- package/build/lib/web/production/components/Charts/CommonChartComponents/index.js +2 -0
- package/build/lib/web/production/components/Charts/CommonChartComponents/index.js.map +1 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js +2 -1
- package/build/lib/web/production/components/Charts/CommonChartComponents/tokens.js.map +1 -1
- package/build/lib/web/production/components/Charts/DonutChart/DonutChart.web.js +202 -69
- package/build/lib/web/production/components/Charts/DonutChart/DonutChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js +84 -32
- package/build/lib/web/production/components/Charts/LineChart/LineChart.web.js.map +1 -1
- package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js +33 -0
- package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/assignDataColorMapping.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/index.js +2 -0
- package/build/lib/web/production/components/Charts/utils/assignDataColorMapping/index.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/getHighestColorInRange.js +53 -0
- package/build/lib/web/production/components/Charts/utils/getHighestColorInRange.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/index.js +5 -0
- package/build/lib/web/production/components/Charts/utils/index.js.map +1 -1
- package/build/lib/web/production/components/Charts/utils/isSequentialColor.js +35 -0
- package/build/lib/web/production/components/Charts/utils/isSequentialColor.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/sanitizeString/index.js +2 -0
- package/build/lib/web/production/components/Charts/utils/sanitizeString/index.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/sanitizeString/sanitizeString.js +30 -0
- package/build/lib/web/production/components/Charts/utils/sanitizeString/sanitizeString.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/tokens.js +7 -0
- package/build/lib/web/production/components/Charts/utils/tokens.js.map +1 -0
- package/build/lib/web/production/components/Charts/utils/useColorTheme.js +32 -11
- package/build/lib/web/production/components/Charts/utils/useColorTheme.js.map +1 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js +3 -1
- package/build/lib/web/production/components/Dropdown/FilterChipGroup.web.js.map +1 -1
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js +8 -9
- package/build/lib/web/production/components/FilterChip/BaseFilterChip.web.js.map +1 -1
- package/build/lib/web/production/components/FilterChip/tokens.js +1 -1
- package/build/lib/web/production/components/FilterChip/tokens.js.map +1 -1
- package/build/lib/web/production/components/Form/CharacterCounter/CharacterCounter.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInput.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js +2 -0
- package/build/lib/web/production/components/Input/BaseInput/BaseInputVisuals.js.map +1 -1
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js +11 -0
- package/build/lib/web/production/components/Input/BaseInput/baseInputTokens.js.map +1 -1
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js +1 -0
- package/build/lib/web/production/components/Input/PhoneNumberInput/CountrySelector.web.js.map +1 -1
- package/build/lib/web/production/components/ListView/ListViewFilters.web.js +13 -102
- package/build/lib/web/production/components/ListView/ListViewFilters.web.js.map +1 -1
- package/build/lib/web/production/components/QuickFilters/QuickFilter.js +2 -1
- package/build/lib/web/production/components/QuickFilters/QuickFilter.js.map +1 -1
- package/build/lib/web/production/components/Radio/Radio.js +4 -2
- package/build/lib/web/production/components/Radio/Radio.js.map +1 -1
- package/build/lib/web/production/components/Table/Table.web.js +3 -1
- package/build/lib/web/production/components/Table/Table.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableBody.web.js +2 -1
- 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 +2 -1
- package/build/lib/web/production/components/Table/TableFooter.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableHeader.web.js +78 -68
- package/build/lib/web/production/components/Table/TableHeader.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TablePagination.web.js +5 -2
- package/build/lib/web/production/components/Table/TablePagination.web.js.map +1 -1
- package/build/lib/web/production/components/Table/TableToolbar.web.js +15 -13
- package/build/lib/web/production/components/Table/TableToolbar.web.js.map +1 -1
- package/build/lib/web/production/components/Table/tokens.js +11 -8
- package/build/lib/web/production/components/Table/tokens.js.map +1 -1
- package/build/lib/web/production/components/index.js +2 -0
- package/build/lib/web/production/components/index.js.map +1 -1
- package/build/lib/web/production/tokens/global/colors.js +48 -48
- package/build/lib/web/production/tokens/global/colors.js.map +1 -1
- package/build/lib/web/production/tokens/global/size.js +2 -0
- package/build/lib/web/production/tokens/global/size.js.map +1 -1
- package/build/lib/web/production/tokens/theme/bladeTheme.js +139 -111
- package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
- package/build/lib/web/production/tokens/theme/theme.js.map +1 -1
- package/build/types/components/index.d.ts +109 -23
- package/build/types/components/index.native.d.ts +106 -20
- package/build/types/tokens/index.d.ts +8 -6
- package/build/types/tokens/index.native.d.ts +8 -6
- package/build/types/utils/index.d.ts +29 -6
- package/build/types/utils/index.native.d.ts +29 -6
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ import { assignWithoutSideEffects } from '../../utils/assignWithoutSideEffects/a
|
|
|
23
23
|
import { makeAnalyticsAttribute } from '../../utils/makeAnalyticsAttribute/makeAnalyticsAttribute.js';
|
|
24
24
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
25
25
|
|
|
26
|
-
var _excluded=["children","emphasis","icon","size","color","testID"];var getColorProps=function getColorProps(_ref){var color=_ref.color,emphasis=_ref.emphasis;var props={iconColor:'feedback.icon.neutral.intense',textColor:'feedback.text.neutral.intense',backgroundColor:'feedback.background.neutral.subtle'};if(color==='primary'){props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`surface.text.primary.normal`;props.iconColor=emphasis==='intense'?`surface.icon.staticWhite.normal`:`surface.icon.primary.normal`;props.backgroundColor=`surface.background.primary.${emphasis}`;}else {props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`feedback.text.${color}.intense`;props.iconColor=emphasis==='intense'?`surface.icon.staticWhite.normal`:`feedback.icon.${color}.intense`;props.backgroundColor=`feedback.background.${color}.${emphasis}`;}return props;};var _Badge=function _Badge(_ref2,ref){var children=_ref2.children,_ref2$emphasis=_ref2.emphasis,emphasis=_ref2$emphasis===void 0?'subtle':_ref2$emphasis,Icon=_ref2.icon,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,testID=_ref2.testID,props=_objectWithoutProperties(_ref2,_excluded);var childrenString=getStringFromReactText(children);if(__DEV__){if(!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'Text as children is required for Badge.',moduleName:'Badge'});}}var _getColorProps=getColorProps({color:color,emphasis:emphasis}),backgroundColor=_getColorProps.backgroundColor,iconColor=_getColorProps.iconColor,textColor=_getColorProps.textColor;var badgeTextSizes={small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'small'}};return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Badge,testID:testID}),getStyledProps(props),makeAnalyticsAttribute(props),{children:jsx(StyledBadge,{height:makeSize(badgeHeight[size]),backgroundColor:backgroundColor,size:size,textAlign:'left',children:jsxs(BaseBox,{paddingX:horizontalPadding[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:[Icon?jsx(BaseBox,{paddingRight:Boolean(Icon)?iconPadding[size]:'spacing.0',display:"flex",children:jsx(Icon,{color:iconColor,size:iconSize[size]})}):null,jsx(Text,Object.assign({},badgeTextSizes[size],{weight:"medium",truncateAfterLines:1,color:textColor,children:children}))]})})}));};var Badge=assignWithoutSideEffects(React__default.forwardRef(_Badge),{displayName:'Badge',componentId:'Badge'});
|
|
26
|
+
var _excluded=["children","emphasis","icon","size","color","testID"];var getColorProps=function getColorProps(_ref){var color=_ref.color,emphasis=_ref.emphasis;var props={iconColor:'feedback.icon.neutral.intense',textColor:'feedback.text.neutral.intense',backgroundColor:'feedback.background.neutral.subtle'};if(color==='primary'){props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`surface.text.primary.normal`;props.iconColor=emphasis==='intense'?`surface.icon.staticWhite.normal`:`surface.icon.primary.normal`;props.backgroundColor=`surface.background.primary.${emphasis}`;}else {props.textColor=emphasis==='intense'?`surface.text.staticWhite.normal`:`feedback.text.${color}.intense`;props.iconColor=emphasis==='intense'?`surface.icon.staticWhite.normal`:`feedback.icon.${color}.intense`;props.backgroundColor=`feedback.background.${color}.${emphasis}`;}return props;};var _Badge=function _Badge(_ref2,ref){var children=_ref2.children,_ref2$emphasis=_ref2.emphasis,emphasis=_ref2$emphasis===void 0?'subtle':_ref2$emphasis,Icon=_ref2.icon,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$color=_ref2.color,color=_ref2$color===void 0?'neutral':_ref2$color,testID=_ref2.testID,props=_objectWithoutProperties(_ref2,_excluded);var childrenString=getStringFromReactText(children);if(__DEV__){if(!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'Text as children is required for Badge.',moduleName:'Badge'});}}var _getColorProps=getColorProps({color:color,emphasis:emphasis}),backgroundColor=_getColorProps.backgroundColor,iconColor=_getColorProps.iconColor,textColor=_getColorProps.textColor;var badgeTextSizes={xsmall:{variant:'body',size:'xsmall'},small:{variant:'body',size:'xsmall'},medium:{variant:'body',size:'small'},large:{variant:'body',size:'small'}};return jsx(BaseBox,Object.assign({ref:ref,display:isReactNative()?'flex':'inline-flex'},metaAttribute({name:MetaConstants.Badge,testID:testID}),getStyledProps(props),makeAnalyticsAttribute(props),{children:jsx(StyledBadge,{height:makeSize(badgeHeight[size]),backgroundColor:backgroundColor,size:size,textAlign:'left',children:jsxs(BaseBox,{paddingX:horizontalPadding[size],display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",overflow:"hidden",children:[Icon?jsx(BaseBox,{paddingRight:Boolean(Icon)?iconPadding[size]:'spacing.0',display:"flex",children:jsx(Icon,{color:iconColor,size:iconSize[size]})}):null,jsx(Text,Object.assign({},badgeTextSizes[size],{weight:"medium",truncateAfterLines:1,color:textColor,children:children}))]})})}));};var Badge=assignWithoutSideEffects(React__default.forwardRef(_Badge),{displayName:'Badge',componentId:'Badge'});
|
|
27
27
|
|
|
28
28
|
export { Badge };
|
|
29
29
|
//# sourceMappingURL=Badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport type { StyledBadgeProps } from './types';\nimport { StyledBadge } from './StyledBadge';\nimport { iconPadding, iconSize, horizontalPadding, badgeHeight } from './badgeTokens';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type {\n DataAnalyticsAttribute,\n BladeElementRef,\n StringChildrenType,\n TestID,\n} from '~utils/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { isReactNative, makeSize } from '~utils';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BadgeProps = {\n /**\n * Sets the label for the badge.\n *\n */\n children: StringChildrenType;\n /**\n * Sets the color of the badge.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the badge.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the badge.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Icon to be displayed in the badge.\n * Accepts a component of type `IconComponent` from Blade.\n *\n */\n icon?: IconComponent;\n} & TestID &\n StyledPropsBlade &\n DataAnalyticsAttribute;\n\ntype ColorProps = {\n iconColor: IconProps['color'];\n textColor: BaseTextProps['color'];\n backgroundColor: StyledBadgeProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color,\n emphasis,\n}: {\n color: NonNullable<BadgeProps['color']>;\n emphasis: NonNullable<BadgeProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n iconColor: 'feedback.icon.neutral.intense',\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.iconColor =\n emphasis === 'intense' ? `surface.icon.staticWhite.normal` : `surface.icon.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.iconColor =\n emphasis === 'intense' ? `surface.icon.staticWhite.normal` : `feedback.icon.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n\n return props;\n};\n\nconst _Badge = (\n {\n children,\n emphasis = 'subtle',\n icon: Icon,\n size = 'medium',\n color = 'neutral',\n testID,\n ...props\n }: BadgeProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const childrenString = getStringFromReactText(children);\n if (__DEV__) {\n if (!childrenString?.trim()) {\n throwBladeError({\n message: 'Text as children is required for Badge.',\n moduleName: 'Badge',\n });\n }\n }\n\n const { backgroundColor, iconColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const badgeTextSizes = {\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'small',\n },\n } as const;\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Badge, testID })}\n {...getStyledProps(props)}\n {...makeAnalyticsAttribute(props)}\n >\n <StyledBadge\n height={makeSize(badgeHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n textAlign={'left' as never}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n {Icon ? (\n <BaseBox paddingRight={Boolean(Icon) ? iconPadding[size] : 'spacing.0'} display=\"flex\">\n <Icon color={iconColor} size={iconSize[size]} />\n </BaseBox>\n ) : null}\n <Text {...badgeTextSizes[size]} weight=\"medium\" truncateAfterLines={1} color={textColor}>\n {children}\n </Text>\n </BaseBox>\n </StyledBadge>\n </BaseBox>\n );\n};\n\nconst Badge = assignWithoutSideEffects(React.forwardRef(_Badge), {\n displayName: 'Badge',\n componentId: 'Badge',\n});\n\nexport type { BadgeProps };\nexport { Badge };\n"],"names":["getColorProps","_ref","color","emphasis","props","iconColor","textColor","backgroundColor","_Badge","_ref2","ref","children","_ref2$emphasis","Icon","icon","_ref2$size","size","_ref2$color","testID","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","__DEV__","trim","throwBladeError","message","moduleName","_getColorProps","badgeTextSizes","
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import React from 'react';\nimport type { ReactElement } from 'react';\nimport type { StyledBadgeProps } from './types';\nimport { StyledBadge } from './StyledBadge';\nimport { iconPadding, iconSize, horizontalPadding, badgeHeight } from './badgeTokens';\nimport type { IconComponent, IconProps } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport type { FeedbackColors, SubtleOrIntense } from '~tokens/theme/theme';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { Text } from '~components/Typography';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport type {\n DataAnalyticsAttribute,\n BladeElementRef,\n StringChildrenType,\n TestID,\n} from '~utils/types';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { isReactNative, makeSize } from '~utils';\nimport { throwBladeError } from '~utils/logger';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\n\ntype BadgeProps = {\n /**\n * Sets the label for the badge.\n *\n */\n children: StringChildrenType;\n /**\n * Sets the color of the badge.\n *\n * @default 'neutral'\n */\n color?: FeedbackColors | 'primary';\n /**\n * Sets the contrast of the badge.\n *\n * @default 'subtle'\n */\n emphasis?: SubtleOrIntense;\n /**\n * Sets the size of the badge.\n *\n * @default 'medium'\n */\n size?: 'xsmall' | 'small' | 'medium' | 'large';\n /**\n * Icon to be displayed in the badge.\n * Accepts a component of type `IconComponent` from Blade.\n *\n */\n icon?: IconComponent;\n} & TestID &\n StyledPropsBlade &\n DataAnalyticsAttribute;\n\ntype ColorProps = {\n iconColor: IconProps['color'];\n textColor: BaseTextProps['color'];\n backgroundColor: StyledBadgeProps['backgroundColor'];\n};\n\nconst getColorProps = ({\n color,\n emphasis,\n}: {\n color: NonNullable<BadgeProps['color']>;\n emphasis: NonNullable<BadgeProps['emphasis']>;\n}): ColorProps => {\n const props: ColorProps = {\n iconColor: 'feedback.icon.neutral.intense',\n textColor: 'feedback.text.neutral.intense',\n backgroundColor: 'feedback.background.neutral.subtle',\n };\n\n if (color === 'primary') {\n // primary color badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `surface.text.primary.normal`;\n props.iconColor =\n emphasis === 'intense' ? `surface.icon.staticWhite.normal` : `surface.icon.primary.normal`;\n props.backgroundColor = `surface.background.primary.${emphasis}`;\n } else {\n // feedback colors badge\n props.textColor =\n emphasis === 'intense' ? `surface.text.staticWhite.normal` : `feedback.text.${color}.intense`;\n props.iconColor =\n emphasis === 'intense' ? `surface.icon.staticWhite.normal` : `feedback.icon.${color}.intense`;\n props.backgroundColor = `feedback.background.${color}.${emphasis}`;\n }\n\n return props;\n};\n\nconst _Badge = (\n {\n children,\n emphasis = 'subtle',\n icon: Icon,\n size = 'medium',\n color = 'neutral',\n testID,\n ...props\n }: BadgeProps,\n ref: React.Ref<BladeElementRef>,\n): ReactElement => {\n const childrenString = getStringFromReactText(children);\n if (__DEV__) {\n if (!childrenString?.trim()) {\n throwBladeError({\n message: 'Text as children is required for Badge.',\n moduleName: 'Badge',\n });\n }\n }\n\n const { backgroundColor, iconColor, textColor } = getColorProps({\n color,\n emphasis,\n });\n\n const badgeTextSizes = {\n xsmall: {\n variant: 'body',\n size: 'xsmall',\n },\n small: {\n variant: 'body',\n size: 'xsmall',\n },\n medium: {\n variant: 'body',\n size: 'small',\n },\n large: {\n variant: 'body',\n size: 'small',\n },\n } as const;\n\n return (\n <BaseBox\n ref={ref as never}\n display={(isReactNative() ? 'flex' : 'inline-flex') as never}\n {...metaAttribute({ name: MetaConstants.Badge, testID })}\n {...getStyledProps(props)}\n {...makeAnalyticsAttribute(props)}\n >\n <StyledBadge\n height={makeSize(badgeHeight[size])}\n backgroundColor={backgroundColor}\n size={size}\n textAlign={'left' as never}\n >\n <BaseBox\n paddingX={horizontalPadding[size]}\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent=\"center\"\n alignItems=\"center\"\n overflow=\"hidden\"\n >\n {Icon ? (\n <BaseBox paddingRight={Boolean(Icon) ? iconPadding[size] : 'spacing.0'} display=\"flex\">\n <Icon color={iconColor} size={iconSize[size]} />\n </BaseBox>\n ) : null}\n <Text {...badgeTextSizes[size]} weight=\"medium\" truncateAfterLines={1} color={textColor}>\n {children}\n </Text>\n </BaseBox>\n </StyledBadge>\n </BaseBox>\n );\n};\n\nconst Badge = assignWithoutSideEffects(React.forwardRef(_Badge), {\n displayName: 'Badge',\n componentId: 'Badge',\n});\n\nexport type { BadgeProps };\nexport { Badge };\n"],"names":["getColorProps","_ref","color","emphasis","props","iconColor","textColor","backgroundColor","_Badge","_ref2","ref","children","_ref2$emphasis","Icon","icon","_ref2$size","size","_ref2$color","testID","_objectWithoutProperties","_excluded","childrenString","getStringFromReactText","__DEV__","trim","throwBladeError","message","moduleName","_getColorProps","badgeTextSizes","xsmall","variant","small","medium","large","_jsx","BaseBox","Object","assign","display","isReactNative","metaAttribute","name","MetaConstants","Badge","getStyledProps","makeAnalyticsAttribute","StyledBadge","height","makeSize","badgeHeight","textAlign","_jsxs","paddingX","horizontalPadding","flexDirection","justifyContent","alignItems","overflow","paddingRight","Boolean","iconPadding","iconSize","Text","weight","truncateAfterLines","assignWithoutSideEffects","React","forwardRef","displayName","componentId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,UAAA,CAAA,UAAA,CAA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AAU,CAAAK,QAAA,CACrFA,QAAQ,CAAA,CACL,CAAC,CAAA,CACA,CAAC,CACC,CAAC,CACP,CAAA,CAAC,CAEd,CAAC,CAEK,IAAAiC,KAAK,CAAGsB,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAC5D,MAAM,CAAC,CAAE,CAC/D6D,WAAW,CAAE,OAAO,CACpBC,WAAW,CAAE,OACf,CAAC;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { size } from '../../tokens/global/size.js';
|
|
2
2
|
|
|
3
|
-
var badgeHeight={small:size[16],medium:size[20],large:size[24]};var horizontalPadding={small:'spacing.3',medium:'spacing.3',large:'spacing.4'};var iconPadding={small:'spacing.1',medium:'spacing.2',large:'spacing.2'};var iconSize={small:'xsmall',medium:'small',large:'small'};
|
|
3
|
+
var badgeHeight={xsmall:size[14],small:size[16],medium:size[20],large:size[24]};var horizontalPadding={xsmall:'spacing.2',small:'spacing.3',medium:'spacing.3',large:'spacing.4'};var iconPadding={xsmall:'spacing.1',small:'spacing.1',medium:'spacing.2',large:'spacing.2'};var iconSize={xsmall:'xsmall',small:'xsmall',medium:'small',large:'small'};
|
|
4
4
|
|
|
5
5
|
export { badgeHeight, horizontalPadding, iconPadding, iconSize };
|
|
6
6
|
//# sourceMappingURL=badgeTokens.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badgeTokens.js","sources":["../../../../../src/components/Badge/badgeTokens.ts"],"sourcesContent":["import type { BadgeProps } from './Badge';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { IconProps } from '~components/Icons';\nimport { size } from '~tokens/global/size';\n\nconst badgeHeight: Record<NonNullable<BadgeProps['size']>, number> = {\n small: size[16],\n medium: size[20],\n large: size[24],\n};\n\nconst horizontalPadding: Record<NonNullable<BadgeProps['size']>, DotNotationSpacingStringToken> = {\n small: 'spacing.3',\n medium: 'spacing.3',\n large: 'spacing.4',\n};\n\nconst iconPadding: Record<NonNullable<BadgeProps['size']>, DotNotationSpacingStringToken> = {\n small: 'spacing.1',\n medium: 'spacing.2',\n large: 'spacing.2',\n};\n\nconst iconSize: Record<NonNullable<BadgeProps['size']>, IconProps['size']> = {\n small: 'xsmall',\n medium: 'small',\n large: 'small',\n};\n\nexport { badgeHeight, horizontalPadding, iconPadding, iconSize };\n"],"names":["badgeHeight","
|
|
1
|
+
{"version":3,"file":"badgeTokens.js","sources":["../../../../../src/components/Badge/badgeTokens.ts"],"sourcesContent":["import type { BadgeProps } from './Badge';\nimport type { DotNotationSpacingStringToken } from '~utils/types';\nimport type { IconProps } from '~components/Icons';\nimport { size } from '~tokens/global/size';\n\nconst badgeHeight: Record<NonNullable<BadgeProps['size']>, number> = {\n xsmall: size[14],\n small: size[16],\n medium: size[20],\n large: size[24],\n};\n\nconst horizontalPadding: Record<NonNullable<BadgeProps['size']>, DotNotationSpacingStringToken> = {\n xsmall: 'spacing.2',\n small: 'spacing.3',\n medium: 'spacing.3',\n large: 'spacing.4',\n};\n\nconst iconPadding: Record<NonNullable<BadgeProps['size']>, DotNotationSpacingStringToken> = {\n xsmall: 'spacing.1',\n small: 'spacing.1',\n medium: 'spacing.2',\n large: 'spacing.2',\n};\n\nconst iconSize: Record<NonNullable<BadgeProps['size']>, IconProps['size']> = {\n xsmall: 'xsmall',\n small: 'xsmall',\n medium: 'small',\n large: 'small',\n};\n\nexport { badgeHeight, horizontalPadding, iconPadding, iconSize };\n"],"names":["badgeHeight","xsmall","size","small","medium","large","horizontalPadding","iconPadding","iconSize"],"mappings":";;AAKM,IAAAA,WAA4D,CAAG,CACnEC,MAAM,CAAEC,IAAI,CAAC,EAAE,CAAC,CAChBC,KAAK,CAAED,IAAI,CAAC,EAAE,CAAC,CACfE,MAAM,CAAEF,IAAI,CAAC,EAAE,CAAC,CAChBG,KAAK,CAAEH,IAAI,CAAC,EAAE,CAChB,EAEM,IAAAI,iBAAyF,CAAG,CAChGL,MAAM,CAAE,WAAW,CACnBE,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,EAEM,IAAAE,WAAmF,CAAG,CAC1FN,MAAM,CAAE,WAAW,CACnBE,KAAK,CAAE,WAAW,CAClBC,MAAM,CAAE,WAAW,CACnBC,KAAK,CAAE,WACT,EAEM,IAAAG,QAAoE,CAAG,CAC3EP,MAAM,CAAE,QAAQ,CAChBE,KAAK,CAAE,QAAQ,CACfC,MAAM,CAAE,OAAO,CACfC,KAAK,CAAE,OACT;;;;"}
|
package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
var CommonChartComponentsContext=createContext({dataColorMapping:undefined,setDataColorMapping:function setDataColorMapping(){return undefined;},chartName:undefined});var useCommonChartComponentsContext=function useCommonChartComponentsContext(){return useContext(CommonChartComponentsContext);};
|
|
4
|
+
|
|
5
|
+
export { CommonChartComponentsContext, useCommonChartComponentsContext };
|
|
6
|
+
//# sourceMappingURL=CommonChartComponentsContext.js.map
|
package/build/lib/native/components/Charts/CommonChartComponents/CommonChartComponentsContext.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommonChartComponentsContext.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/CommonChartComponentsContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react';\nimport type { CommonChartComponentsContextType } from './types';\n\nexport const CommonChartComponentsContext = createContext<CommonChartComponentsContextType>({\n dataColorMapping: undefined,\n setDataColorMapping: () => undefined,\n chartName: undefined,\n});\n\nexport const useCommonChartComponentsContext = (): CommonChartComponentsContextType =>\n useContext(CommonChartComponentsContext);\n"],"names":["CommonChartComponentsContext","createContext","dataColorMapping","undefined","setDataColorMapping","chartName","useCommonChartComponentsContext","useContext"],"mappings":";;AAGa,IAAAA,4BAA4B,CAAGC,aAAa,CAAmC,CAC1FC,gBAAgB,CAAEC,SAAS,CAC3BC,mBAAmB,CAAE,SAAAA,mBAAA,EAAA,CAAA,OAAMD,SAAS,CAAA,CAAA,CACpCE,SAAS,CAAEF,SACb,CAAC,EAEY,IAAAG,+BAA+B,CAAG,SAAlCA,+BAA+BA,UAC1CC,UAAU,CAACP,4BAA4B,CAAC,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../../../../../src/components/Charts/CommonChartComponents/tokens.ts"],"sourcesContent":["const RECT_WIDTH = 80;\nconst RECT_HEIGHT = 30;\nconst TEXT_BASELINE = 15;\n\n// Padding for text inside the rectangle (4px vertical, 8px horizontal)\nconst PADDING_VERTICAL = 4;\nconst PADDING_HORIZONTAL = 8;\n\nconst X_OFFSET = 32;\nconst Y_OFFSET = 14.5;\nconst X_AXIS_TEXT_BASELINE = 24;\n\nconst MIN_WIDTH = RECT_WIDTH;\nconst MAX_WIDTH = 200;\n\nconst DEFAULT_COLOR = 'data.background.categorical.gray.moderate';\n\nconst componentId = {\n chartLegend: 'chart-legend',\n};\n\nexport {\n componentId,\n RECT_WIDTH,\n RECT_HEIGHT,\n TEXT_BASELINE,\n PADDING_VERTICAL,\n PADDING_HORIZONTAL,\n X_OFFSET,\n Y_OFFSET,\n X_AXIS_TEXT_BASELINE,\n MIN_WIDTH,\n MAX_WIDTH,\n DEFAULT_COLOR,\n};\n"],"names":["DEFAULT_COLOR"],"mappings":"AAeM,IAAAA,aAAa,CAAG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterCounter.js","sources":["../../../../../../src/components/Form/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { hintTextSize } from '../formTokens';\nimport { Text } from '~components/Typography';\n\ntype CharacterCounterProps = {\n currentCount: number;\n maxCount: number;\n size?: 'xsmall' | 'medium' | 'large';\n};\n\nexport const CharacterCounter = ({\n currentCount,\n maxCount,\n size = 'medium',\n}: CharacterCounterProps): ReactElement => (\n <Text\n variant=\"caption\"\n size={hintTextSize[size]}\n weight=\"regular\"\n color=\"surface.text.gray.muted\"\n >\n {currentCount}/{maxCount}\n </Text>\n);\n"],"names":["CharacterCounter","_ref","currentCount","maxCount","_ref$size","size","_jsxs","Text","variant","hintTextSize","weight","color","children"],"mappings":";;;;;;;AAUa,IAAAA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAAA,CAAA,IAC3BC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CACZC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,SAAA,CAAAH,IAAA,CACRI,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,QAEfE,IAAA,CAACC,IAAI,EACHC,OAAO,CAAC,SAAS,CACjBH,IAAI,CAAEI,YAAY,CAACJ,IAAI,CAAE,CACzBK,MAAM,CAAC,SAAS,CAChBC,KAAK,CAAC,yBAAyB,CAAAC,QAAA,CAAA,CAE9BV,YAAY,CAAC,GAAC,CAACC,QAAQ,CAAA,CACpB,CAAC,CACR;;;;"}
|
|
1
|
+
{"version":3,"file":"CharacterCounter.js","sources":["../../../../../../src/components/Form/CharacterCounter/CharacterCounter.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { hintTextSize } from '../formTokens';\nimport { Text } from '~components/Typography';\n\ntype CharacterCounterProps = {\n currentCount: number;\n maxCount: number;\n size?: 'xsmall' | 'small' | 'medium' | 'large';\n};\n\nexport const CharacterCounter = ({\n currentCount,\n maxCount,\n size = 'medium',\n}: CharacterCounterProps): ReactElement => (\n <Text\n variant=\"caption\"\n size={hintTextSize[size]}\n weight=\"regular\"\n color=\"surface.text.gray.muted\"\n >\n {currentCount}/{maxCount}\n </Text>\n);\n"],"names":["CharacterCounter","_ref","currentCount","maxCount","_ref$size","size","_jsxs","Text","variant","hintTextSize","weight","color","children"],"mappings":";;;;;;;AAUa,IAAAA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAAC,IAAA,CAAA,CAAA,IAC3BC,YAAY,CAAAD,IAAA,CAAZC,YAAY,CACZC,QAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAAC,SAAA,CAAAH,IAAA,CACRI,IAAI,CAAJA,IAAI,CAAAD,SAAA,GAAG,KAAA,CAAA,CAAA,QAAQ,CAAAA,SAAA,QAEfE,IAAA,CAACC,IAAI,EACHC,OAAO,CAAC,SAAS,CACjBH,IAAI,CAAEI,YAAY,CAACJ,IAAI,CAAE,CACzBK,MAAM,CAAC,SAAS,CAChBC,KAAK,CAAC,yBAAyB,CAAAC,QAAA,CAAA,CAE9BV,YAAY,CAAC,GAAC,CAACC,QAAQ,CAAA,CACpB,CAAC,CACR;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseInput.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type {\n BladeElementRef,\n ContainerElementType,\n DataAnalyticsAttribute,\n TestID,\n} from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { MotionMetaProp } from '~components/BaseMotion';\nimport { getInnerMotionRef, getOuterMotionRef } from '~utils/getMotionRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useInputGroupContext } from '~components/InputGroup/InputGroupContext';\nimport { useCounterInputContext } from '~components/CounterInput/CounterInputContext';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n DataAnalyticsAttribute &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button' | 'div';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Callback to be invoked when the TrailingInteractionElement is clicked\n */\n onTrailingInteractionElementClick?: () => void;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Leading DropDown to be rendered at Prefix slot\n */\n leadingDropDown?: ReactNode;\n /**\n * Trailing DropDown to be rendered at Suffix slot\n */\n trailingDropDown?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 1 | 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'xsmall' | 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n /**\n * Whether to render the input as a table cell\n * @default true\n **/\n isTableInputCell?: boolean;\n /**\n * Hides the form hints and shows them as tooltip of trailing\n */\n showHintsAsTooltip?: boolean;\n\n role?: AriaAttributes['role'];\n\n /**\n * Tab Index of the input field\n *\n * @default undefined\n */\n tabIndex?: number;\n /**\n * Slot to be rendered adjacent to the value\n */\n valueSuffix?: React.ReactNode;\n children?: ReactNode;\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade &\n MotionMetaProp;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n className: string;\n shouldAddLimitedFocus: boolean;\n}>(({ theme, currentInteraction, isTableInputCell, shouldAddLimitedFocus }) => ({\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n width: '100%',\n '&:focus-within':\n !isTableInputCell && (shouldAddLimitedFocus ? currentInteraction === 'focus' : true)\n ? {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n theme.motion.easing[\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .easing\n ],\n ),\n }\n : {},\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n isTableInputCell = false,\n showHintsAsTooltip = false,\n _motionMeta,\n role,\n tabIndex,\n leadingDropDown,\n trailingDropDown,\n labelSuffix,\n labelTrailing,\n valueSuffix,\n children,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n const defaultRole = hasPopup ? 'combobox' : undefined;\n\n const inputGroupProps = useInputGroupContext();\n const { isInsideInputGroup } = inputGroupProps;\n const counterInputProps = useCounterInputContext();\n const {\n color,\n disabledTextColor: disabledColor,\n isDisabled: isCounterInputDisabled,\n isLoading: isCounterInputLoading,\n isInsideCounterInput,\n } = counterInputProps;\n const _isDisabled =\n inputGroupProps.isDisabled ?? (isCounterInputDisabled || isCounterInputLoading) ?? isDisabled;\n const _size = inputGroupProps.size ?? size;\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(_isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: role ?? defaultRole,\n activeDescendant,\n });\n\n const willRenderHintText =\n Boolean(helpText) ||\n (validationState === 'success' && Boolean(successText)) ||\n (validationState === 'error' && Boolean(errorText));\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n const hasLeadingDropdown = Boolean(leadingDropDown);\n const hasTrailingDropdown = Boolean(trailingDropDown);\n\n const shouldAddLimitedFocus = hasLeadingDropdown || hasTrailingDropdown;\n return (\n <BaseBox\n ref={getOuterMotionRef({ _motionMeta, ref })}\n {...metaAttribute({ name: componentName, testID })}\n {...getStyledProps(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {/* If the input is in an input group, we don't want to render the label */}\n {!hideLabelText && !isLabelInsideInput && label && !isInsideInputGroup && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea && isLabelLeftPositioned ? '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 labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper\n currentInteraction={currentInteraction}\n isTableInputCell={isTableInputCell}\n className=\"focus-ring-wrapper\"\n shouldAddLimitedFocus={shouldAddLimitedFocus}\n >\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={_isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={_size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputVisuals\n size={_size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={_isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n leadingDropDown={leadingDropDown}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={_isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n const innerRef = getInnerMotionRef({ _motionMeta, ref });\n if (innerRef && !isReactNative && 'current' in innerRef) {\n innerRef.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={_size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={getInnerMotionRef({ _motionMeta, ref: mergedInputRef as any }) as never}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={_isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n valueSuffix={valueSuffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={_size}\n valueComponentType={valueComponentType}\n isTableInputCell={isTableInputCell}\n tabIndex={tabIndex}\n hasLeadingDropdown={Boolean(leadingDropDown)}\n children={children}\n color={color}\n disabledColor={disabledColor}\n isInsideCounterInput={isInsideCounterInput}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n onTrailingInteractionElementClick={onTrailingInteractionElementClick}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={_isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={_size}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={showHintsAsTooltip}\n trailingDropDown={trailingDropDown}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n {/* If the input is in an input group, we don't want to render the hint text */}\n {hideFormHint || showHintsAsTooltip || isInsideInputGroup ? null : (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[_size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={_size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","__DEV__","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref0","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","_ref1","theme","currentInteraction","isTableInputCell","shouldAddLimitedFocus","borderRadius","makeBorderSize","border","radius","none","medium","width","Object","assign","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref10","ref","_ref11","_inputGroupProps$isDi","_inputGroupProps$size","_ref10$as","as","label","_ref10$labelPosition","labelPosition","placeholder","_ref10$type","type","_ref10$showAllTags","showAllTags","_ref10$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref10$size","size","trailingButton","_ref10$valueComponent","valueComponentType","_ref10$isTableInputCe","_ref10$showHintsAsToo","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown","labelSuffix","labelTrailing","valueSuffix","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","defaultRole","undefined","inputGroupProps","useInputGroupContext","isInsideInputGroup","counterInputProps","useCounterInputContext","color","disabledColor","disabledTextColor","isCounterInputDisabled","isCounterInputLoading","isLoading","isInsideCounterInput","_isDisabled","_size","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","controls","willRenderHintText","includes","join","isTextArea","hasLeadingDropdown","hasTrailingDropdown","_jsxs","getOuterMotionRef","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","className","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","innerRef","getInnerMotionRef","_innerRef$current","labelPrefix","handleOnInputClick","e","StyledBaseInput","hasTags","$size","MetaConstants","makeAnalyticsAttribute","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ynCAwbA,IAAMA,gCAAgC,CAAG,CACvC,MAAM,CACN,IA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BAAkB,EAAI2B,kBAAkB,CAAG,IAAI,CAC9DmD,GAAA,CAACvK,OAAO,CAAA,CACN8L,UAAU,CAAEC,QAAQ,CAClBvD,qBAAqB,EAAI,CAACnE,aAAa,CAAG2H,2BAA2B,CAACjE,KAAK,CAAC,CAAG,CACjF,CAAE,CAAAxM,QAAA,CAEFqO,IAAA,CAAC5J,OAAO,CAAA,CACNgK,OAAO,CAAC,MAAM,CACdC,aAAa,CAAC,KAAK,CACnBC,cAAc,CAAEZ,kBAAkB,CAAG,eAAe,CAAG,UAAW,CAAA/N,QAAA,CAElEgP,CAAAA,GAAA,CAAC0B,QAAQ,CACP3J,CAAAA,IAAI,CAAEnD,WAAW,CAAC,CAAEE,eAAe,CAAfA,eAAe,CAAEC,WAAW,CAAE0J,OAAO,CAACnG,QAAQ,CAAE,CAAC,CAAE,CACvEA,QAAQ,CAAEA,QAAS,CACnBD,SAAS,CAAEA,SAAU,CACrBE,WAAW,CAAEA,WAAY,CACzBjD,UAAU,CAAEA,UAAW,CACvBF,WAAW,CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BuF,IAAI,CAAE4C,KAAM,CACb,CAAC,CACDjE,kBAAkB,EAAlBA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,kBAAkB,CAAG3H,KAAK,EAAA,IAAA,CAALA,KAAK,CAAIiB,UAAU,CAAC,CACnC,CAAA,CAAC,CACH,CACV,CACM,CAAA,CAAA,CAAC,CAEd,CAAC,CAED,IAAM8O,gBAAgB,CAAGnR,cAAK,CAACoR,UAAU,CAAC1K,UAAU,CAAC,CAC/C,IAAA2K,SAAS,CAAGC,wBAAwB,CAACH,gBAAgB,CAAE,CAAEI,WAAW,CAAE,WAAY,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"BaseInput.js","sources":["../../../../../../src/components/Input/BaseInput/BaseInput.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport type { ReactNode } from 'react';\nimport styled from 'styled-components';\nimport { StyledBaseInput } from './StyledBaseInput';\nimport { BaseInputVisuals } from './BaseInputVisuals';\nimport { BaseInputWrapper } from './BaseInputWrapper';\nimport { BaseInputTagSlot } from './BaseInputTagSlot';\nimport type { InputWrapperRef } from './types';\nimport { baseInputBorderBackgroundMotion, formHintLeftLabelMarginLeft } from './baseInputTokens';\nimport type {\n FormInputLabelProps,\n FormInputValidationProps,\n FormInputHandleOnEvent,\n FormInputOnEvent,\n FormHintProps,\n} from '~components/Form';\nimport { FormHint, FormLabel } from '~components/Form';\nimport type { IconComponent } from '~components/Icons';\nimport BaseBox from '~components/Box/BaseBox';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport {\n castWebType,\n getPlatformType,\n isReactNative,\n makeBorderSize,\n makeMotionTime,\n useBreakpoint,\n} from '~utils';\nimport type { Platform } from '~utils';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { useFormId } from '~components/Form/useFormId';\nimport { useTheme } from '~components/BladeProvider';\nimport useInteraction from '~utils/useInteraction';\nimport type { ActionStates } from '~utils/useInteraction';\nimport type {\n FormInputHandleOnClickEvent,\n FormInputHandleOnKeyDownEvent,\n} from '~components/Form/FormTypes';\nimport type {\n BladeElementRef,\n ContainerElementType,\n DataAnalyticsAttribute,\n TestID,\n} from '~utils/types';\nimport { makeSize } from '~utils/makeSize';\nimport type { AriaAttributes } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { throwBladeError } from '~utils/logger';\nimport { announce } from '~components/LiveAnnouncer/LiveAnnouncer';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport type { LinkProps } from '~components/Link';\nimport { getFocusRingStyles } from '~utils/getFocusRingStyles';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useMergeRefs } from '~utils/useMergeRefs';\nimport type { MotionMetaProp } from '~components/BaseMotion';\nimport { getInnerMotionRef, getOuterMotionRef } from '~utils/getMotionRefs';\nimport { makeAnalyticsAttribute } from '~utils/makeAnalyticsAttribute';\nimport { useInputGroupContext } from '~components/InputGroup/InputGroupContext';\nimport { useCounterInputContext } from '~components/CounterInput/CounterInputContext';\n\ntype CommonAutoCompleteSuggestionTypes =\n | 'none'\n | 'name'\n | 'email'\n | 'username'\n | 'password'\n | 'newPassword'\n | 'oneTimeCode'\n | 'telephone'\n | 'postalCode'\n | 'countryName'\n | 'creditCardNumber'\n | 'creditCardCSC'\n | 'creditCardExpiry'\n | 'creditCardExpiryMonth'\n | 'creditCardExpiryYear';\n\ntype WebAutoCompleteSuggestionType = CommonAutoCompleteSuggestionTypes | 'on';\n\ntype BaseInputCommonProps = FormInputLabelProps &\n DataAnalyticsAttribute &\n FormInputValidationProps & {\n /**\n * Determines if it needs to be rendered as input, textarea or button\n */\n as?: 'input' | 'textarea' | 'button' | 'div';\n /**\n * ID that will be used for accessibility\n */\n id: string;\n /**\n * Placeholder text to be displayed inside the input field\n */\n placeholder?: string;\n /**\n * Type of Input Field to be rendered.\n *\n * @default text\n */\n type?: 'text' | 'telephone' | 'email' | 'url' | 'number' | 'search' | 'password';\n /**\n * Used to set the default value of input field when it's uncontrolled\n */\n defaultValue?: string;\n /**\n * The name of the input field.\n *\n * Useful in form submissions\n */\n name?: string;\n /**\n * The callback function to be invoked when the input field gets focus\n */\n onFocus?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field changes\n */\n onChange?: FormInputOnEvent;\n /**\n * The callback function to be invoked when input is clicked\n */\n onClick?: FormInputOnEvent;\n /**\n * The callback function to be invoked when the value of the input field has any input\n */\n onInput?: FormInputOnEvent;\n /**\n * The callback function to be invoked whenever there is a keyDown event\n */\n onKeyDown?: FormInputHandleOnKeyDownEvent;\n /**\n * The callback function to be invoked when the the input field loses focus\n *\n * For React Native this will call `onEndEditing` event since we want to get the last value of the input field\n */\n onBlur?: FormInputOnEvent;\n /**\n * Ignores the blur event animation (Used in Select to ignore blur animation when item in option is clicked)\n */\n shouldIgnoreBlurAnimation?: boolean;\n /**\n * sets boolean that ignores the blur animations on baseinput\n */\n setShouldIgnoreBlurAnimation?: (shouldIgnoreBlurAnimation: boolean) => void;\n /**\n * Used to turn the input field to controlled so user can control the value\n */\n value?: string;\n /**\n * Used to disable the input field\n */\n isDisabled?: boolean;\n /**\n * If true, the input is marked as required, and `required` attribute will be added\n */\n isRequired?: boolean;\n /**\n * Icon to be shown at the start of the input field\n */\n leadingIcon?: IconComponent;\n /**\n * Prefix symbol to be displayed at the beginning of the input field. If leadingIcon is provided it'll be placed after it\n */\n prefix?: string;\n /**\n * Element to be rendered before suffix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a loader or they could render a clear button\n */\n trailingInteractionElement?: ReactNode;\n /**\n * Callback to be invoked when the TrailingInteractionElement is clicked\n */\n onTrailingInteractionElementClick?: () => void;\n /**\n * Element to be rendered before prefix. This is decided by the component which is extending BaseInput\n *\n * eg: consumers can render a country selector or button\n */\n leadingInteractionElement?: ReactNode;\n /**\n * Leading DropDown to be rendered at Prefix slot\n */\n leadingDropDown?: ReactNode;\n /**\n * Trailing DropDown to be rendered at Suffix slot\n */\n trailingDropDown?: ReactNode;\n /**\n * Suffix symbol to be displayed at the end of the input field. If trailingIcon is provided it'll be placed before it\n */\n suffix?: string;\n /**\n * Icon to be displayed at the end of the input field\n */\n trailingIcon?: IconComponent;\n /**\n * Displays the character counter under the input field\n */\n maxCharacters?: number;\n /**\n * alignment of the text inside input field\n */\n textAlign?: 'left' | 'center' | 'right';\n /**\n * If true, focuses the input field on load\n *\n * **Note:**\n * Automatically focusing a form control can confuse visually-impaired people using screen-reading technology and people with cognitive impairments.\n * When autofocus is assigned, screen-readers \"teleport\" their user to the form control without warning them beforehand.\n */\n autoFocus?: boolean;\n /**\n * Hints the platform to display an appropriate virtual keyboard\n *\n * **Native:** Passes as is the `keyboardType` attribute\n *\n * **Web:** Passes the value to the `inputMode` attribute\n */\n keyboardType?: 'text' | 'search' | 'telephone' | 'email' | 'url' | 'decimal';\n /**\n * determines what return key to show on the keyboard of mobile devices/virtual keyboard\n * **Note**: Few values are platform dependent and might not render on all the platforms\n *\n * `default` is only available on native. it'll be mapped to `enter` for web\n * `previous` is only available on native android\n */\n keyboardReturnKeyType?: 'default' | 'go' | 'done' | 'next' | 'previous' | 'search' | 'send';\n /**\n * Element to be rendered on the trailing slot of input field label\n */\n trailingHeaderSlot?: (value?: string) => ReactNode;\n /**\n * Element to be rendered on the trailing slot of input field footer\n */\n trailingFooterSlot?: (value?: string) => ReactNode;\n /**\n * Sets the textarea's number of lines\n */\n numberOfLines?: 1 | 2 | 3 | 4 | 5;\n /**\n * Sets the accessibility label for the input\n */\n accessibilityLabel?: string;\n /**\n * Sets the id of the label\n *\n * (Useful when assigning one label to multiple elements using aria-labelledby)\n */\n labelId?: string;\n /**\n * Can be used in select to set the id of the active descendant from the listbox\n */\n activeDescendant?: string;\n /**\n * Hides the label text\n */\n hideLabelText?: boolean;\n /**\n * Hides the form hint text\n */\n hideFormHint?: boolean;\n /**\n * componentName prop sets the data-blade-component attribute name\n * for internal metric collection purposes\n */\n componentName?: string;\n /**\n * whether the input has a popup\n */\n hasPopup?: AriaAttributes['hasPopup'];\n /**\n * id of the popup\n */\n popupId?: string;\n /**\n * true if popup is in expanded state\n */\n isPopupExpanded?: boolean;\n setInputWrapperRef?: (node: ContainerElementType) => void;\n /**\n * sets the autocapitalize behavior for the input\n */\n autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';\n\n /**\n * constraints the height of input to given number rows\n *\n * When set to expandable, input takes 1 row in the begining and expands to take 3 when active\n *\n * @default 'single'\n */\n maxTagRows?: 'single' | 'multiple' | 'expandable';\n\n /**\n * A slot for adding tags to input\n */\n tags?: React.ReactElement[] | null;\n\n /**\n * Disables stripping of tags and shows all tags\n */\n showAllTags?: boolean;\n\n /**\n * State variable of active tag index\n */\n activeTagIndex?: number;\n\n /**\n * Is this input SelectInput or AutoComplete\n */\n isDropdownTrigger?: boolean;\n\n /**\n * Is the label expected to be rendered inside input?\n * Used in AutoComplete and Select when label can't exist outside\n *\n */\n isLabelInsideInput?: boolean;\n\n /**\n * State setter for active tag index\n */\n setActiveTagIndex?: (activeTagIndex: number) => void;\n /**\n * Sets the size of the input field\n * @default medium\n */\n size?: 'xsmall' | 'small' | 'medium' | 'large';\n /**\n * Link button to be rendered at the end of the input field.\n * **Note:** `size` of the Link will be set to the same size as the input field, `isDisabled` will follow Input's `isDisabled`, & `variant` will be set to `button`.\n * Example:\n * ```tsx\n * trailingButton={<Link onClick={handleClick}>Apply</Link>}\n * ```\n */\n trailingButton?: React.ReactElement<LinkProps>;\n /**\n * Whether to use Text or Heading component for Input text\n * @default text\n **/\n valueComponentType?: 'text' | 'heading';\n /**\n * Whether to render the input as a table cell\n * @default true\n **/\n isTableInputCell?: boolean;\n /**\n * Hides the form hints and shows them as tooltip of trailing\n */\n showHintsAsTooltip?: boolean;\n\n role?: AriaAttributes['role'];\n\n /**\n * Tab Index of the input field\n *\n * @default undefined\n */\n tabIndex?: number;\n /**\n * Slot to be rendered adjacent to the value\n */\n valueSuffix?: React.ReactNode;\n children?: ReactNode;\n } & TestID &\n Platform.Select<{\n native: {\n /**\n * The callback function to be invoked when the value of the input field is submitted.\n */\n onSubmit?: FormInputOnEvent;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: CommonAutoCompleteSuggestionTypes;\n };\n web: {\n /**\n * This is a react-native only prop and has no effect on web.\n */\n onSubmit?: undefined;\n /**\n * determines what autoComplete suggestion type to show\n *\n * Internally it'll render platform specific attributes:\n *\n * - web: `autocomplete`\n * - iOS: `textContentType`\n * - android: `autoComplete`\n *\n */\n autoCompleteSuggestionType?: WebAutoCompleteSuggestionType;\n };\n }> &\n StyledPropsBlade &\n MotionMetaProp;\n\n/*\n Mandatory accessibilityLabel prop when label is not provided\n*/\ntype BaseInputPropsWithA11yLabel = {\n /**\n * Label to be shown for the input field\n */\n label?: undefined;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel: string;\n};\n\n/*\n Optional accessibilityLabel prop when label is provided\n*/\ntype BaseInputPropsWithLabel = {\n /**\n * Label to be shown for the input field\n */\n label: string;\n /**\n * Accessibility label for the input\n */\n accessibilityLabel?: string;\n};\n\nexport type BaseInputProps = (BaseInputPropsWithA11yLabel | BaseInputPropsWithLabel) &\n BaseInputCommonProps;\n\nconst autoCompleteSuggestionTypeValues = [\n 'none',\n 'on',\n 'name',\n 'email',\n 'username',\n 'password',\n 'newPassword',\n 'oneTimeCode',\n 'telephone',\n 'postalCode',\n 'countryName',\n 'creditCardNumber',\n 'creditCardCSC',\n 'creditCardExpiry',\n 'creditCardExpiryMonth',\n 'creditCardExpiryYear',\n];\n\ntype OnInputKeydownTagHandlerType = (key: string | undefined) => void;\nconst useTags = (\n tags: BaseInputProps['tags'],\n activeTagIndex: number,\n setActiveTagIndex?: (activeTagIndex: number) => void,\n): {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n visibleTagsCountRef: React.MutableRefObject<number>;\n} => {\n const visibleTagsCountRef = React.useRef<number>(0);\n\n React.useEffect(() => {\n if (tags && activeTagIndex >= 0 && activeTagIndex < tags.length) {\n const tagTitle = tags[activeTagIndex]?.props?.children;\n if (tagTitle) {\n announce(`Close ${tagTitle} Tag`);\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeTagIndex, tags?.length]);\n\n const onTagLeft = (): void => {\n if (activeTagIndex < 0) {\n setActiveTagIndex?.(visibleTagsCountRef.current - 1);\n }\n\n if (activeTagIndex > 0) {\n setActiveTagIndex?.(activeTagIndex - 1);\n }\n };\n\n const onTagRight = (): void => {\n if (activeTagIndex < visibleTagsCountRef.current - 1) {\n setActiveTagIndex?.(activeTagIndex + 1);\n }\n };\n\n const onTagRemove = (): void => {\n if (activeTagIndex >= 0 && activeTagIndex < visibleTagsCountRef.current && tags) {\n tags[activeTagIndex].props.onDismiss({ tagIndex: activeTagIndex });\n }\n };\n\n const onInputKeydownTagHandler: OnInputKeydownTagHandlerType = (key) => {\n if (tags && tags.length > 0) {\n if (key === 'ArrowRight') {\n onTagRight();\n }\n\n if (key === 'ArrowLeft') {\n onTagLeft();\n }\n\n if (key === 'Backspace') {\n onTagRemove();\n }\n }\n };\n\n return {\n onInputKeydownTagHandler,\n visibleTagsCountRef,\n };\n};\n\nconst useInput = ({\n value,\n defaultValue,\n onClick,\n onFocus,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n}: Pick<\n BaseInputProps,\n | 'value'\n | 'defaultValue'\n | 'onFocus'\n | 'onChange'\n | 'onBlur'\n | 'onInput'\n | 'onKeyDown'\n | 'onClick'\n | 'onSubmit'\n> & {\n onInputKeydownTagHandler: OnInputKeydownTagHandlerType;\n}): {\n handleOnFocus: FormInputHandleOnEvent;\n handleOnClick: FormInputHandleOnClickEvent;\n handleOnChange: FormInputHandleOnEvent;\n handleOnBlur: FormInputHandleOnEvent;\n handleOnSubmit: FormInputHandleOnEvent;\n handleOnInput: FormInputHandleOnEvent;\n handleOnKeyDown: FormInputHandleOnKeyDownEvent;\n inputValue?: string;\n} => {\n if (__DEV__) {\n if (value && defaultValue) {\n throwBladeError({\n message: `Either 'value' or 'defaultValue' shall be passed. This decides if the input field is controlled or uncontrolled`,\n moduleName: 'Input',\n });\n }\n }\n\n const [inputValue, setInputValue] = React.useState(defaultValue ?? value);\n\n const handleOnFocus: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onFocus?.({\n name,\n value: _value,\n });\n },\n [onFocus],\n );\n\n const handleOnClick: FormInputHandleOnClickEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.currentTarget.value ?? '';\n }\n\n onClick?.({\n name,\n value: _value,\n });\n },\n [onClick],\n );\n\n const handleOnSubmit: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n if (isReactNative()) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n //@ts-ignore need to ignore this since it will throw a TS error for web but not for native\n onSubmit?.({\n name,\n value: _value,\n });\n }\n },\n [onSubmit],\n );\n\n const handleOnBlur: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onBlur?.({\n name,\n value: _value,\n });\n },\n [onBlur],\n );\n\n const handleOnChange: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n\n if (getPlatformType() === 'react-native' && typeof value === 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onChange?.({\n name,\n value: _value,\n });\n setInputValue(_value);\n },\n [onChange],\n );\n\n const handleOnInput: FormInputHandleOnEvent = React.useCallback(\n ({ name, value }) => {\n let _value = '';\n if (getPlatformType() === 'react-native' && typeof value == 'string') {\n _value = value;\n } else if (typeof value !== 'string') {\n // Could have just done \"getPlatformType() === 'react-native' ? value : value?.target.value\" but TS doesn't understands that\n _value = value?.target.value ?? '';\n }\n\n onInput?.({\n name,\n value: _value,\n });\n },\n [onInput],\n );\n\n const handleOnKeyDown: FormInputHandleOnKeyDownEvent = React.useCallback(\n ({ name, key, code, event }) => {\n onInputKeydownTagHandler(key);\n onKeyDown?.({\n name,\n key,\n code,\n event,\n });\n },\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [onKeyDown],\n );\n\n return {\n handleOnFocus,\n handleOnClick,\n handleOnChange,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n };\n};\n\nexport const getHintType = ({\n validationState,\n hasHelpText,\n}: {\n validationState: BaseInputProps['validationState'];\n hasHelpText: boolean;\n}): FormHintProps['type'] => {\n if (validationState === 'error') {\n return 'error';\n }\n\n if (validationState === 'success') {\n return 'success';\n }\n\n if (hasHelpText) {\n return 'help';\n }\n\n return 'help';\n};\n\nconst getDescribedByElementId = ({\n validationState,\n hasErrorText,\n hasSuccessText,\n hasHelpText,\n errorTextId,\n successTextId,\n helpTextId,\n}: {\n validationState: BaseInputProps['validationState'];\n hasErrorText: boolean;\n hasSuccessText: boolean;\n hasHelpText: boolean;\n errorTextId: string;\n successTextId: string;\n helpTextId: string;\n}): string => {\n if (validationState === 'error' && hasErrorText) {\n return errorTextId;\n }\n\n if (validationState === 'success' && hasSuccessText) {\n return successTextId;\n }\n\n if (hasHelpText) {\n return helpTextId;\n }\n\n return '';\n};\n\nconst FocusRingWrapper = styled(BaseBox)<{\n currentInteraction: ActionStates;\n isTableInputCell: NonNullable<BaseInputProps['isTableInputCell']>;\n className: string;\n shouldAddLimitedFocus: boolean;\n}>(({ theme, currentInteraction, isTableInputCell, shouldAddLimitedFocus }) => ({\n borderRadius: makeBorderSize(\n isTableInputCell ? theme.border.radius.none : theme.border.radius.medium,\n ),\n width: '100%',\n '&:focus-within':\n !isTableInputCell && (shouldAddLimitedFocus ? currentInteraction === 'focus' : true)\n ? {\n ...getFocusRingStyles({\n theme,\n }),\n transitionDuration: castWebType(\n makeMotionTime(\n getIn(\n theme.motion.duration,\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .duration,\n ),\n ),\n ),\n transitionTimingFunction: castWebType(\n theme.motion.easing[\n baseInputBorderBackgroundMotion[currentInteraction === 'focus' ? 'enter' : 'exit']\n .easing\n ],\n ),\n }\n : {},\n}));\n\nconst _BaseInput: React.ForwardRefRenderFunction<BladeElementRef, BaseInputProps> = (\n {\n as = 'input',\n label,\n labelPosition = 'top',\n placeholder,\n type = 'text',\n defaultValue,\n tags,\n showAllTags = false,\n activeTagIndex = -1,\n setActiveTagIndex,\n name,\n value,\n onFocus,\n onChange,\n onInput,\n onBlur,\n onSubmit,\n onClick,\n onKeyDown,\n isDisabled,\n necessityIndicator,\n validationState,\n errorText,\n helpText,\n successText,\n isRequired,\n leadingIcon,\n prefix,\n trailingInteractionElement,\n onTrailingInteractionElementClick,\n leadingInteractionElement,\n suffix,\n trailingIcon,\n maxCharacters,\n textAlign,\n autoFocus,\n keyboardReturnKeyType,\n keyboardType,\n autoCompleteSuggestionType,\n trailingHeaderSlot,\n trailingFooterSlot,\n numberOfLines,\n id,\n componentName,\n accessibilityLabel,\n labelId,\n activeDescendant,\n hideLabelText,\n hideFormHint,\n hasPopup,\n popupId,\n isPopupExpanded,\n maxTagRows,\n shouldIgnoreBlurAnimation,\n setShouldIgnoreBlurAnimation,\n autoCapitalize,\n setInputWrapperRef,\n testID,\n isDropdownTrigger,\n isLabelInsideInput,\n size = 'medium',\n trailingButton,\n valueComponentType = 'text',\n isTableInputCell = false,\n showHintsAsTooltip = false,\n _motionMeta,\n role,\n tabIndex,\n leadingDropDown,\n trailingDropDown,\n labelSuffix,\n labelTrailing,\n valueSuffix,\n children,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const inputRef = React.useRef<BladeElementRef>(null);\n const mergedInputRef = useMergeRefs(ref, inputRef);\n const inputWrapperRef: InputWrapperRef = React.useRef(null);\n const { onInputKeydownTagHandler, visibleTagsCountRef } = useTags(\n tags,\n activeTagIndex,\n setActiveTagIndex,\n );\n const [showAllTagsWithAnimation, setShowAllTagsWithAnimation] = React.useState(false);\n const isReactNative = getPlatformType() === 'react-native';\n const defaultRole = hasPopup ? 'combobox' : undefined;\n\n const inputGroupProps = useInputGroupContext();\n const { isInsideInputGroup } = inputGroupProps;\n const counterInputProps = useCounterInputContext();\n const {\n color,\n disabledTextColor: disabledColor,\n isDisabled: isCounterInputDisabled,\n isLoading: isCounterInputLoading,\n isInsideCounterInput,\n } = counterInputProps;\n const _isDisabled =\n inputGroupProps.isDisabled ?? (isCounterInputDisabled || isCounterInputLoading) ?? isDisabled;\n const _size = inputGroupProps.size ?? size;\n\n React.useEffect(() => {\n if (showAllTags) {\n setShowAllTagsWithAnimation(true);\n } else if (maxTagRows !== 'expandable') {\n setShowAllTagsWithAnimation(false);\n }\n }, [showAllTags, maxTagRows]);\n\n const {\n handleOnFocus,\n handleOnChange,\n handleOnClick,\n handleOnBlur,\n handleOnSubmit,\n handleOnInput,\n handleOnKeyDown,\n inputValue,\n } = useInput({\n defaultValue,\n value,\n onFocus,\n onClick,\n onChange,\n onBlur,\n onSubmit,\n onInput,\n onKeyDown,\n onInputKeydownTagHandler,\n });\n const { inputId, helpTextId, errorTextId, successTextId } = useFormId(id);\n const { matchedDeviceType } = useBreakpoint({ breakpoints: theme.breakpoints });\n const isLabelLeftPositioned = labelPosition === 'left' && matchedDeviceType === 'desktop';\n const { currentInteraction, setCurrentInteraction } = useInteraction();\n const _isRequired = isRequired || necessityIndicator === 'required';\n\n const accessibilityProps = makeAccessible({\n required: Boolean(_isRequired),\n disabled: Boolean(_isDisabled),\n invalid: Boolean(validationState === 'error'),\n describedBy: getDescribedByElementId({\n validationState,\n hasErrorText: Boolean(errorText),\n hasSuccessText: Boolean(successText),\n hasHelpText: Boolean(helpText),\n errorTextId,\n successTextId,\n helpTextId,\n }),\n label: accessibilityLabel,\n hasPopup,\n expanded: hasPopup ? isPopupExpanded : undefined,\n controls: hasPopup ? popupId : undefined,\n role: role ?? defaultRole,\n activeDescendant,\n });\n\n const willRenderHintText =\n Boolean(helpText) ||\n (validationState === 'success' && Boolean(successText)) ||\n (validationState === 'error' && Boolean(errorText));\n\n if (__DEV__) {\n if (\n autoCompleteSuggestionType &&\n !autoCompleteSuggestionTypeValues.includes(autoCompleteSuggestionType)\n ) {\n throwBladeError({\n message: `Expected autoCompleteSuggestionType to be one of ${autoCompleteSuggestionTypeValues.join(\n ', ',\n )} but received ${autoCompleteSuggestionType}`,\n moduleName: 'Input',\n });\n }\n }\n\n const isTextArea = as === 'textarea';\n const hasLeadingDropdown = Boolean(leadingDropDown);\n const hasTrailingDropdown = Boolean(trailingDropDown);\n\n const shouldAddLimitedFocus = hasLeadingDropdown || hasTrailingDropdown;\n return (\n <BaseBox\n ref={getOuterMotionRef({ _motionMeta, ref })}\n {...metaAttribute({ name: componentName, testID })}\n {...getStyledProps(rest)}\n >\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'row' : 'column'}\n justifyContent={isLabelLeftPositioned ? 'center' : undefined}\n alignItems={isLabelLeftPositioned ? 'center' : undefined}\n position=\"relative\"\n width=\"100%\"\n >\n {/* If the input is in an input group, we don't want to render the label */}\n {!hideLabelText && !isLabelInsideInput && label && !isInsideInputGroup && (\n <BaseBox\n display=\"flex\"\n flexDirection={isLabelLeftPositioned ? 'column' : 'row'}\n justifyContent=\"space-between\"\n alignSelf={isTextArea && isLabelLeftPositioned ? '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 labelSuffix={labelSuffix}\n labelTrailing={labelTrailing}\n >\n {label}\n </FormLabel>\n {trailingHeaderSlot?.(value ?? inputValue)}\n </BaseBox>\n )}\n <FocusRingWrapper\n currentInteraction={currentInteraction}\n isTableInputCell={isTableInputCell}\n className=\"focus-ring-wrapper\"\n shouldAddLimitedFocus={shouldAddLimitedFocus}\n >\n <BaseInputWrapper\n isDropdownTrigger={isDropdownTrigger}\n isTextArea={isTextArea}\n isDisabled={_isDisabled}\n validationState={validationState}\n currentInteraction={currentInteraction}\n isLabelLeftPositioned={isLabelLeftPositioned}\n showAllTags={showAllTags}\n setShowAllTagsWithAnimation={setShowAllTagsWithAnimation}\n ref={(refNode) => {\n if (refNode) {\n setInputWrapperRef?.(refNode);\n inputWrapperRef.current = refNode;\n }\n }}\n maxTagRows={maxTagRows}\n size={_size}\n numberOfLines={numberOfLines}\n onClick={() => {\n if (!isReactNative) {\n inputRef.current?.focus();\n }\n }}\n isTableInputCell={isTableInputCell}\n >\n <BaseInputVisuals\n size={_size}\n leadingIcon={leadingIcon}\n prefix={prefix}\n isDisabled={_isDisabled}\n leadingInteractionElement={leadingInteractionElement}\n leadingDropDown={leadingDropDown}\n />\n <BaseInputTagSlot\n renderAs={as}\n tags={tags}\n isDisabled={_isDisabled}\n showAllTags={showAllTagsWithAnimation}\n setFocusOnInput={() => {\n const innerRef = getInnerMotionRef({ _motionMeta, ref });\n if (innerRef && !isReactNative && 'current' in innerRef) {\n innerRef.current?.focus();\n }\n }}\n labelPrefix={isLabelInsideInput ? label : undefined}\n isDropdownTrigger={isDropdownTrigger}\n visibleTagsCountRef={visibleTagsCountRef}\n handleOnInputClick={(e) => {\n handleOnClick({ name, value: isReactNative ? value : e });\n }}\n setShouldIgnoreBlurAnimation={setShouldIgnoreBlurAnimation}\n maxTagRows={maxTagRows}\n inputWrapperRef={inputWrapperRef}\n size={_size}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea}\n >\n <StyledBaseInput\n as={as}\n id={inputId}\n ref={getInnerMotionRef({ _motionMeta, ref: mergedInputRef as any }) as never}\n name={name}\n type={type}\n defaultValue={defaultValue}\n value={value}\n placeholder={placeholder}\n isDisabled={_isDisabled}\n validationState={validationState}\n isRequired={_isRequired}\n handleOnFocus={handleOnFocus}\n handleOnChange={handleOnChange}\n handleOnBlur={handleOnBlur}\n handleOnSubmit={handleOnSubmit}\n handleOnInput={handleOnInput}\n handleOnKeyDown={handleOnKeyDown}\n handleOnClick={handleOnClick}\n leadingIcon={leadingIcon}\n prefix={prefix}\n trailingInteractionElement={trailingInteractionElement}\n leadingInteractionElement={leadingInteractionElement}\n suffix={suffix}\n valueSuffix={valueSuffix}\n trailingIcon={trailingIcon}\n maxCharacters={maxCharacters}\n textAlign={textAlign}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n keyboardReturnKeyType={keyboardReturnKeyType}\n keyboardType={keyboardType}\n autoCompleteSuggestionType={autoCompleteSuggestionType}\n accessibilityProps={accessibilityProps}\n currentInteraction={currentInteraction}\n setCurrentInteraction={setCurrentInteraction}\n numberOfLines={numberOfLines}\n isTextArea={isTextArea || maxTagRows === 'multiple' || maxTagRows === 'expandable'}\n hasPopup={hasPopup}\n hasTags={!!(tags && tags.length > 0)}\n shouldIgnoreBlurAnimation={shouldIgnoreBlurAnimation}\n autoCapitalize={autoCapitalize}\n isDropdownTrigger={isDropdownTrigger}\n $size={_size}\n valueComponentType={valueComponentType}\n isTableInputCell={isTableInputCell}\n tabIndex={tabIndex}\n hasLeadingDropdown={Boolean(leadingDropDown)}\n children={children}\n color={color}\n disabledColor={disabledColor}\n isInsideCounterInput={isInsideCounterInput}\n {...metaAttribute({ name: MetaConstants.StyledBaseInput })}\n {...makeAnalyticsAttribute(rest)}\n />\n </BaseInputTagSlot>\n <BaseInputVisuals\n trailingInteractionElement={trailingInteractionElement}\n onTrailingInteractionElementClick={onTrailingInteractionElementClick}\n suffix={suffix}\n trailingIcon={trailingIcon}\n isDisabled={_isDisabled}\n validationState={validationState}\n trailingButton={trailingButton}\n size={_size}\n errorText={errorText}\n successText={successText}\n showHintsAsTooltip={showHintsAsTooltip}\n trailingDropDown={trailingDropDown}\n />\n </BaseInputWrapper>\n </FocusRingWrapper>\n </BaseBox>\n {/* If the input is in an input group, we don't want to render the hint text */}\n {hideFormHint || showHintsAsTooltip || isInsideInputGroup ? null : (\n <BaseBox\n marginLeft={makeSize(\n isLabelLeftPositioned && !hideLabelText ? formHintLeftLabelMarginLeft[_size] : 0,\n )}\n >\n <BaseBox\n display=\"flex\"\n flexDirection=\"row\"\n justifyContent={willRenderHintText ? 'space-between' : 'flex-end'}\n >\n <FormHint\n type={getHintType({ validationState, hasHelpText: Boolean(helpText) })}\n helpText={helpText}\n errorText={errorText}\n successText={successText}\n helpTextId={helpTextId}\n errorTextId={errorTextId}\n successTextId={successTextId}\n size={_size}\n />\n {trailingFooterSlot?.(value ?? inputValue)}\n </BaseBox>\n </BaseBox>\n )}\n </BaseBox>\n );\n};\n\nconst BaseInputWithRef = React.forwardRef(_BaseInput);\nconst BaseInput = assignWithoutSideEffects(BaseInputWithRef, { displayName: 'BaseInput' });\n\nexport { BaseInput };\n"],"names":["autoCompleteSuggestionTypeValues","useTags","tags","activeTagIndex","setActiveTagIndex","visibleTagsCountRef","React","useRef","useEffect","length","_tags$activeTagIndex","_tags$activeTagIndex$","tagTitle","props","children","announce","onTagLeft","current","onTagRight","onTagRemove","onDismiss","tagIndex","onInputKeydownTagHandler","key","useInput","_ref","value","defaultValue","onClick","onFocus","onChange","onBlur","onSubmit","onInput","onKeyDown","__DEV__","throwBladeError","message","moduleName","_React$useState","useState","_React$useState2","_slicedToArray","inputValue","setInputValue","handleOnFocus","useCallback","_ref2","name","_value","getPlatformType","_value$target$value","target","handleOnClick","_ref3","_value$currentTarget$","currentTarget","handleOnSubmit","_ref4","_value$target$value2","isReactNative","handleOnBlur","_ref5","_value$target$value3","handleOnChange","_ref6","_value$target$value4","handleOnInput","_ref7","_value$target$value5","handleOnKeyDown","_ref8","code","event","getHintType","_ref9","validationState","hasHelpText","getDescribedByElementId","_ref0","hasErrorText","hasSuccessText","errorTextId","successTextId","helpTextId","FocusRingWrapper","styled","BaseBox","_ref1","theme","currentInteraction","isTableInputCell","shouldAddLimitedFocus","borderRadius","makeBorderSize","border","radius","none","medium","width","Object","assign","getFocusRingStyles","transitionDuration","castWebType","makeMotionTime","getIn","motion","duration","baseInputBorderBackgroundMotion","transitionTimingFunction","easing","_BaseInput","_ref10","ref","_ref11","_inputGroupProps$isDi","_inputGroupProps$size","_ref10$as","as","label","_ref10$labelPosition","labelPosition","placeholder","_ref10$type","type","_ref10$showAllTags","showAllTags","_ref10$activeTagIndex","isDisabled","necessityIndicator","errorText","helpText","successText","isRequired","leadingIcon","prefix","trailingInteractionElement","onTrailingInteractionElementClick","leadingInteractionElement","suffix","trailingIcon","maxCharacters","textAlign","autoFocus","keyboardReturnKeyType","keyboardType","autoCompleteSuggestionType","trailingHeaderSlot","trailingFooterSlot","numberOfLines","id","componentName","accessibilityLabel","labelId","activeDescendant","hideLabelText","hideFormHint","hasPopup","popupId","isPopupExpanded","maxTagRows","shouldIgnoreBlurAnimation","setShouldIgnoreBlurAnimation","autoCapitalize","setInputWrapperRef","testID","isDropdownTrigger","isLabelInsideInput","_ref10$size","size","trailingButton","_ref10$valueComponent","valueComponentType","_ref10$isTableInputCe","_ref10$showHintsAsToo","showHintsAsTooltip","_motionMeta","role","tabIndex","leadingDropDown","trailingDropDown","labelSuffix","labelTrailing","valueSuffix","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","inputRef","mergedInputRef","useMergeRefs","inputWrapperRef","_useTags","_React$useState3","_React$useState4","showAllTagsWithAnimation","setShowAllTagsWithAnimation","defaultRole","undefined","inputGroupProps","useInputGroupContext","isInsideInputGroup","counterInputProps","useCounterInputContext","color","disabledColor","disabledTextColor","isCounterInputDisabled","isCounterInputLoading","isLoading","isInsideCounterInput","_isDisabled","_size","_useInput","_useFormId","useFormId","inputId","_useBreakpoint","useBreakpoint","breakpoints","matchedDeviceType","isLabelLeftPositioned","_useInteraction","useInteraction","setCurrentInteraction","_isRequired","accessibilityProps","makeAccessible","required","Boolean","disabled","invalid","describedBy","expanded","controls","willRenderHintText","includes","join","isTextArea","hasLeadingDropdown","hasTrailingDropdown","_jsxs","getOuterMotionRef","metaAttribute","getStyledProps","display","flexDirection","justifyContent","alignItems","position","alignSelf","marginY","_jsx","FormLabel","htmlFor","className","BaseInputWrapper","refNode","_inputRef$current","focus","BaseInputVisuals","BaseInputTagSlot","renderAs","setFocusOnInput","innerRef","getInnerMotionRef","_innerRef$current","labelPrefix","handleOnInputClick","e","StyledBaseInput","hasTags","$size","MetaConstants","makeAnalyticsAttribute","marginLeft","makeSize","formHintLeftLabelMarginLeft","FormHint","BaseInputWithRef","forwardRef","BaseInput","assignWithoutSideEffects","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ynCAwbA,IAAMA,gCAAgC,CAAG,CACvC,MAAM,CACN,IAAI,CACJ,MAAM,CACN,OAAO,CACP,UAAU,CACV,UAAU,CACV,aAAa,CACb,aAAa,CACb,WAAW,CACX,YAAY,CACZ,aAAa,CACb,kBAAkB,CAClB,eAAe,CACf,kBAAkB,CAClB,uBAAuB,CACvB,sBAAsB,CACvB,CAGD,IAAMC,OAAO,CAAG,SAAVA,OAAOA,CACXC,IAA4B,CAC5BC,cAAsB,CACtBC,iBAAoD,CAIjD,CACH,IAAMC,mBAAmB,CAAGC,cAAK,CAACC,MAAM,CAAS,CAAC,CAAC,CAEnDD,cAAK,CAACE,SAAS,CAAC,UAAM,CACpB,GAAIN,IAAI,EAAIC,cAAc,EAAI,CAAC,EAAIA,cAAc,CAAGD,IAAI,CAACO,MAAM,CAAE,CAAA,IAAAC,oBAAA,CAAAC,qBAAA,CAC/D,IAAMC,QAAQ,CAAAF,CAAAA,oBAAA,CAAGR,IAAI,CAACC,cAAc,CAAC,GAAA,IAAA,CAAA,KAAA,CAAA,CAAA,CAAAQ,qBAAA,CAApBD,oBAAA,CAAsBG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CAAEA,WAAY,CACzBC,aAAa,CAAEA,aAAc,CAC7BuF,IAAI,CAAE4C,KAAM,CACb,CAAC,CACDjE,kBAAkB,EAAlBA,IAAAA,CAAAA,KAAAA,CAAAA,CAAAA,kBAAkB,CAAG3H,KAAK,EAAA,IAAA,CAALA,KAAK,CAAIiB,UAAU,CAAC,CACnC,CAAA,CAAC,CACH,CACV,CACM,CAAA,CAAA,CAAC,CAEd,CAAC,CAED,IAAM8O,gBAAgB,CAAGnR,cAAK,CAACoR,UAAU,CAAC1K,UAAU,CAAC,CAC/C,IAAA2K,SAAS,CAAGC,wBAAwB,CAACH,gBAAgB,CAAE,CAAEI,WAAW,CAAE,WAAY,CAAC;;;;"}
|
|
@@ -15,7 +15,7 @@ import { isReactNative } from '../../../utils/platform/isReactNative.js';
|
|
|
15
15
|
import '../../BladeProvider/useTheme.js';
|
|
16
16
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
17
17
|
|
|
18
|
-
var getVisualContainerStyles=function getVisualContainerStyles(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},shouldStretchTrailingBox=_ref.shouldStretchTrailingBox;return {display:'flex',flexDirection:'row',alignItems:'center',alignSelf:shouldStretchTrailingBox?'stretch':'center'};};var trailingIconColor={none:'surface.icon.gray.subtle',error:'feedback.icon.negative.intense',success:'feedback.icon.positive.intense'};var iconSize={xsmall:'small',medium:'medium',large:'large'};var textSize={xsmall:'small',medium:'medium',large:'large'};var getPrefixStyles=function getPrefixStyles(_ref2){var hasLeadingIcon=_ref2.hasLeadingIcon,hasPrefix=_ref2.hasPrefix;if(hasPrefix&&hasLeadingIcon){return {paddingLeft:'spacing.3'};}if(hasPrefix&&!hasLeadingIcon){return {paddingLeft:'spacing.4'};}return {paddingLeft:'spacing.0'};};var getInteractionElementStyles=function getInteractionElementStyles(_ref3){var hasTrailingIcon=_ref3.hasTrailingIcon,hasLeadingInteractionElement=_ref3.hasLeadingInteractionElement,hasLeadingDropDown=_ref3.hasLeadingDropDown,hasTrailingInteractionElement=_ref3.hasTrailingInteractionElement,hasSuffix=_ref3.hasSuffix,hasTrailingButton=_ref3.hasTrailingButton,hasTrailingDropDown=_ref3.hasTrailingDropDown;if(hasTrailingInteractionElement&&(hasSuffix||hasTrailingIcon||hasTrailingButton)){return 'spacing.2';}if(hasLeadingDropDown||hasTrailingDropDown){return 'spacing.2';}if(hasTrailingInteractionElement&&!hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return 'spacing.4';}if(hasLeadingInteractionElement){return 'spacing.3';}return 'spacing.0';};var getSuffixStyles=function getSuffixStyles(_ref4){var hasTrailingIcon=_ref4.hasTrailingIcon,hasSuffix=_ref4.hasSuffix,hasTrailingButton=_ref4.hasTrailingButton;if(hasSuffix&&(hasTrailingIcon||hasTrailingButton)){return {paddingRight:'spacing.3'};}if(hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getTrailingIconStyles=function getTrailingIconStyles(_ref5){var hasTrailingIcon=_ref5.hasTrailingIcon,hasTrailingButton=_ref5.hasTrailingButton;if(hasTrailingIcon&&hasTrailingButton){return {paddingRight:'spacing.3'};}if(hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getInputVisualsToBeRendered=function getInputVisualsToBeRendered(_ref6){var leadingIcon=_ref6.leadingIcon,prefix=_ref6.prefix,trailingInteractionElement=_ref6.trailingInteractionElement,leadingInteractionElement=_ref6.leadingInteractionElement,suffix=_ref6.suffix,trailingIcon=_ref6.trailingIcon,trailingButton=_ref6.trailingButton,leadingDropDown=_ref6.leadingDropDown,trailingDropDown=_ref6.trailingDropDown;return {hasLeadingIcon:Boolean(leadingIcon),hasPrefix:Boolean(prefix),hasTrailingInteractionElement:Boolean(trailingInteractionElement),hasLeadingInteractionElement:Boolean(leadingInteractionElement),hasSuffix:Boolean(suffix),hasTrailingIcon:Boolean(trailingIcon),hasTrailingButton:Boolean(trailingButton),hasLeadingDropDown:Boolean(leadingDropDown),hasTrailingDropDown:Boolean(trailingDropDown)};};var getTooltipContent=function getTooltipContent(_ref7){var validationState=_ref7.validationState,errorText=_ref7.errorText,successText=_ref7.successText;if(validationState==='error'&&errorText){return errorText;}if(validationState==='success'&&successText){return successText;}return '';};var ValidationIconTooltip=function ValidationIconTooltip(_ref8){var children=_ref8.children,validationState=_ref8.validationState,errorText=_ref8.errorText,successText=_ref8.successText,showHintsAsTooltip=_ref8.showHintsAsTooltip;if(showHintsAsTooltip&&validationState==='error'&&errorText||validationState==='success'&&successText){return jsx(Tooltip,{content:getTooltipContent({validationState:validationState,errorText:errorText,successText:successText}),children:jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",children:children})});}return children;};var BaseInputVisuals=function BaseInputVisuals(_ref9){var LeadingIcon=_ref9.leadingIcon,prefix=_ref9.prefix,trailingInteractionElement=_ref9.trailingInteractionElement,onTrailingInteractionElementClick=_ref9.onTrailingInteractionElementClick,leadingDropDown=_ref9.leadingDropDown,trailingDropDown=_ref9.trailingDropDown,leadingInteractionElement=_ref9.leadingInteractionElement,suffix=_ref9.suffix,TrailingIcon=_ref9.trailingIcon,isDisabled=_ref9.isDisabled,_ref9$validationState=_ref9.validationState,validationState=_ref9$validationState===void 0?'none':_ref9$validationState,size=_ref9.size,showHintsAsTooltip=_ref9.showHintsAsTooltip,errorText=_ref9.errorText,successText=_ref9.successText,TrailingButton=_ref9.trailingButton;var _getInputVisualsToBeR=getInputVisualsToBeRendered({leadingIcon:LeadingIcon,prefix:prefix,leadingInteractionElement:leadingInteractionElement,trailingInteractionElement:trailingInteractionElement,suffix:suffix,trailingIcon:TrailingIcon,trailingButton:TrailingButton,leadingDropDown:leadingDropDown,trailingDropDown:trailingDropDown,size:size}),hasLeadingIcon=_getInputVisualsToBeR.hasLeadingIcon,hasPrefix=_getInputVisualsToBeR.hasPrefix,hasSuffix=_getInputVisualsToBeR.hasSuffix,hasTrailingInteractionElement=_getInputVisualsToBeR.hasTrailingInteractionElement,hasLeadingInteractionElement=_getInputVisualsToBeR.hasLeadingInteractionElement,hasTrailingIcon=_getInputVisualsToBeR.hasTrailingIcon,hasTrailingButton=_getInputVisualsToBeR.hasTrailingButton,hasLeadingDropDown=_getInputVisualsToBeR.hasLeadingDropDown,hasTrailingDropDown=_getInputVisualsToBeR.hasTrailingDropDown;var hasLeadingVisuals=hasLeadingInteractionElement||hasLeadingIcon||hasPrefix||hasLeadingDropDown;var hasTrailingVisuals=hasTrailingInteractionElement||hasSuffix||hasTrailingIcon||hasTrailingButton||hasTrailingDropDown;if(__DEV__){if(hasTrailingButton&&!isValidAllowedChildren(TrailingButton,'Link')){throwBladeError({message:'trailingButton must be a valid Blade Link component',moduleName:'BaseInput'});}}if(hasLeadingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles(),{children:[hasLeadingInteractionElement?jsx(BaseBox,{paddingLeft:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasLeadingInteractionElement:hasLeadingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),display:"flex",alignItems:"stretch",alignSelf:"stretch",children:leadingInteractionElement}):null,LeadingIcon?jsx(BaseBox,{paddingLeft:"spacing.4",display:"flex",children:jsx(LeadingIcon,{size:iconSize[size],color:isDisabled?'surface.icon.gray.disabled':'surface.icon.gray.muted'})}):null,hasPrefix?jsx(BaseBox,Object.assign({},getPrefixStyles({hasLeadingIcon:hasLeadingIcon,hasPrefix:hasPrefix}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.muted',children:prefix})})):null,leadingDropDown?jsx(BaseBox,{paddingLeft:"spacing.2",display:"flex",children:leadingDropDown}):null]}));}if(hasTrailingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:[hasTrailingInteractionElement?jsx(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:jsx(BaseBox,Object.assign({paddingRight:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingInteractionElement:hasTrailingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton,hasTrailingDropDown:hasTrailingDropDown}),display:"flex",alignItems:"stretch",alignSelf:"stretch"},!isReactNative()&&{onClick:onTrailingInteractionElementClick},{children:trailingInteractionElement}))})):null,hasSuffix?jsx(BaseBox,Object.assign({},getSuffixStyles({hasTrailingIcon:hasTrailingIcon,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:suffix})})):null,TrailingIcon?jsx(BaseBox,Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},getTrailingIconStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingButton:hasTrailingButton}),{children:jsx(ValidationIconTooltip,{showHintsAsTooltip:showHintsAsTooltip,errorText:errorText,successText:successText,validationState:validationState,children:jsx(TrailingIcon,{size:iconSize[size],color:isDisabled?'interactive.icon.gray.disabled':trailingIconColor[validationState]})})})):null,TrailingButton?jsx(BaseBox,{paddingRight:"spacing.4",display:"flex",children:React__default.cloneElement(TrailingButton,{size:size,variant:'button',isDisabled:isDisabled})}):null,hasTrailingDropDown?jsx(BaseBox,{paddingRight:"spacing.2",display:"flex",children:trailingDropDown}):null]}));}return null;};
|
|
18
|
+
var getVisualContainerStyles=function getVisualContainerStyles(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},shouldStretchTrailingBox=_ref.shouldStretchTrailingBox;return {display:'flex',flexDirection:'row',alignItems:'center',alignSelf:shouldStretchTrailingBox?'stretch':'center'};};var trailingIconColor={none:'surface.icon.gray.subtle',error:'feedback.icon.negative.intense',success:'feedback.icon.positive.intense'};var iconSize={xsmall:'small',small:'small',medium:'medium',large:'large'};var textSize={xsmall:'small',small:'small',medium:'medium',large:'large'};var getPrefixStyles=function getPrefixStyles(_ref2){var hasLeadingIcon=_ref2.hasLeadingIcon,hasPrefix=_ref2.hasPrefix;if(hasPrefix&&hasLeadingIcon){return {paddingLeft:'spacing.3'};}if(hasPrefix&&!hasLeadingIcon){return {paddingLeft:'spacing.4'};}return {paddingLeft:'spacing.0'};};var getInteractionElementStyles=function getInteractionElementStyles(_ref3){var hasTrailingIcon=_ref3.hasTrailingIcon,hasLeadingInteractionElement=_ref3.hasLeadingInteractionElement,hasLeadingDropDown=_ref3.hasLeadingDropDown,hasTrailingInteractionElement=_ref3.hasTrailingInteractionElement,hasSuffix=_ref3.hasSuffix,hasTrailingButton=_ref3.hasTrailingButton,hasTrailingDropDown=_ref3.hasTrailingDropDown;if(hasTrailingInteractionElement&&(hasSuffix||hasTrailingIcon||hasTrailingButton)){return 'spacing.2';}if(hasLeadingDropDown||hasTrailingDropDown){return 'spacing.2';}if(hasTrailingInteractionElement&&!hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return 'spacing.4';}if(hasLeadingInteractionElement){return 'spacing.3';}return 'spacing.0';};var getSuffixStyles=function getSuffixStyles(_ref4){var hasTrailingIcon=_ref4.hasTrailingIcon,hasSuffix=_ref4.hasSuffix,hasTrailingButton=_ref4.hasTrailingButton;if(hasSuffix&&(hasTrailingIcon||hasTrailingButton)){return {paddingRight:'spacing.3'};}if(hasSuffix&&!hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getTrailingIconStyles=function getTrailingIconStyles(_ref5){var hasTrailingIcon=_ref5.hasTrailingIcon,hasTrailingButton=_ref5.hasTrailingButton;if(hasTrailingIcon&&hasTrailingButton){return {paddingRight:'spacing.3'};}if(hasTrailingIcon&&!hasTrailingButton){return {paddingRight:'spacing.4'};}return {paddingRight:'spacing.0'};};var getInputVisualsToBeRendered=function getInputVisualsToBeRendered(_ref6){var leadingIcon=_ref6.leadingIcon,prefix=_ref6.prefix,trailingInteractionElement=_ref6.trailingInteractionElement,leadingInteractionElement=_ref6.leadingInteractionElement,suffix=_ref6.suffix,trailingIcon=_ref6.trailingIcon,trailingButton=_ref6.trailingButton,leadingDropDown=_ref6.leadingDropDown,trailingDropDown=_ref6.trailingDropDown;return {hasLeadingIcon:Boolean(leadingIcon),hasPrefix:Boolean(prefix),hasTrailingInteractionElement:Boolean(trailingInteractionElement),hasLeadingInteractionElement:Boolean(leadingInteractionElement),hasSuffix:Boolean(suffix),hasTrailingIcon:Boolean(trailingIcon),hasTrailingButton:Boolean(trailingButton),hasLeadingDropDown:Boolean(leadingDropDown),hasTrailingDropDown:Boolean(trailingDropDown)};};var getTooltipContent=function getTooltipContent(_ref7){var validationState=_ref7.validationState,errorText=_ref7.errorText,successText=_ref7.successText;if(validationState==='error'&&errorText){return errorText;}if(validationState==='success'&&successText){return successText;}return '';};var ValidationIconTooltip=function ValidationIconTooltip(_ref8){var children=_ref8.children,validationState=_ref8.validationState,errorText=_ref8.errorText,successText=_ref8.successText,showHintsAsTooltip=_ref8.showHintsAsTooltip;if(showHintsAsTooltip&&validationState==='error'&&errorText||validationState==='success'&&successText){return jsx(Tooltip,{content:getTooltipContent({validationState:validationState,errorText:errorText,successText:successText}),children:jsx(Box,{display:"flex",justifyContent:"center",alignItems:"center",children:children})});}return children;};var BaseInputVisuals=function BaseInputVisuals(_ref9){var LeadingIcon=_ref9.leadingIcon,prefix=_ref9.prefix,trailingInteractionElement=_ref9.trailingInteractionElement,onTrailingInteractionElementClick=_ref9.onTrailingInteractionElementClick,leadingDropDown=_ref9.leadingDropDown,trailingDropDown=_ref9.trailingDropDown,leadingInteractionElement=_ref9.leadingInteractionElement,suffix=_ref9.suffix,TrailingIcon=_ref9.trailingIcon,isDisabled=_ref9.isDisabled,_ref9$validationState=_ref9.validationState,validationState=_ref9$validationState===void 0?'none':_ref9$validationState,size=_ref9.size,showHintsAsTooltip=_ref9.showHintsAsTooltip,errorText=_ref9.errorText,successText=_ref9.successText,TrailingButton=_ref9.trailingButton;var _getInputVisualsToBeR=getInputVisualsToBeRendered({leadingIcon:LeadingIcon,prefix:prefix,leadingInteractionElement:leadingInteractionElement,trailingInteractionElement:trailingInteractionElement,suffix:suffix,trailingIcon:TrailingIcon,trailingButton:TrailingButton,leadingDropDown:leadingDropDown,trailingDropDown:trailingDropDown,size:size}),hasLeadingIcon=_getInputVisualsToBeR.hasLeadingIcon,hasPrefix=_getInputVisualsToBeR.hasPrefix,hasSuffix=_getInputVisualsToBeR.hasSuffix,hasTrailingInteractionElement=_getInputVisualsToBeR.hasTrailingInteractionElement,hasLeadingInteractionElement=_getInputVisualsToBeR.hasLeadingInteractionElement,hasTrailingIcon=_getInputVisualsToBeR.hasTrailingIcon,hasTrailingButton=_getInputVisualsToBeR.hasTrailingButton,hasLeadingDropDown=_getInputVisualsToBeR.hasLeadingDropDown,hasTrailingDropDown=_getInputVisualsToBeR.hasTrailingDropDown;var hasLeadingVisuals=hasLeadingInteractionElement||hasLeadingIcon||hasPrefix||hasLeadingDropDown;var hasTrailingVisuals=hasTrailingInteractionElement||hasSuffix||hasTrailingIcon||hasTrailingButton||hasTrailingDropDown;if(__DEV__){if(hasTrailingButton&&!isValidAllowedChildren(TrailingButton,'Link')){throwBladeError({message:'trailingButton must be a valid Blade Link component',moduleName:'BaseInput'});}}if(hasLeadingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles(),{children:[hasLeadingInteractionElement?jsx(BaseBox,{paddingLeft:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasLeadingInteractionElement:hasLeadingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),display:"flex",alignItems:"stretch",alignSelf:"stretch",children:leadingInteractionElement}):null,LeadingIcon?jsx(BaseBox,{paddingLeft:"spacing.4",display:"flex",children:jsx(LeadingIcon,{size:iconSize[size],color:isDisabled?'surface.icon.gray.disabled':'surface.icon.gray.muted'})}):null,hasPrefix?jsx(BaseBox,Object.assign({},getPrefixStyles({hasLeadingIcon:hasLeadingIcon,hasPrefix:hasPrefix}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.muted',children:prefix})})):null,leadingDropDown?jsx(BaseBox,{paddingLeft:"spacing.2",display:"flex",children:leadingDropDown}):null]}));}if(hasTrailingVisuals){return jsxs(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:[hasTrailingInteractionElement?jsx(BaseBox,Object.assign({},getVisualContainerStyles({shouldStretchTrailingBox:hasTrailingInteractionElement&&Boolean(onTrailingInteractionElementClick)}),{children:jsx(BaseBox,Object.assign({paddingRight:getInteractionElementStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingInteractionElement:hasTrailingInteractionElement,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton,hasTrailingDropDown:hasTrailingDropDown}),display:"flex",alignItems:"stretch",alignSelf:"stretch"},!isReactNative()&&{onClick:onTrailingInteractionElementClick},{children:trailingInteractionElement}))})):null,hasSuffix?jsx(BaseBox,Object.assign({},getSuffixStyles({hasTrailingIcon:hasTrailingIcon,hasSuffix:hasSuffix,hasTrailingButton:hasTrailingButton}),{children:jsx(Text,{size:textSize[size],variant:"body",weight:"regular",color:isDisabled?'surface.text.gray.disabled':'surface.text.gray.subtle',children:suffix})})):null,TrailingIcon?jsx(BaseBox,Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},getTrailingIconStyles({hasTrailingIcon:hasTrailingIcon,hasTrailingButton:hasTrailingButton}),{children:jsx(ValidationIconTooltip,{showHintsAsTooltip:showHintsAsTooltip,errorText:errorText,successText:successText,validationState:validationState,children:jsx(TrailingIcon,{size:iconSize[size],color:isDisabled?'interactive.icon.gray.disabled':trailingIconColor[validationState]})})})):null,TrailingButton?jsx(BaseBox,{paddingRight:"spacing.4",display:"flex",children:React__default.cloneElement(TrailingButton,{size:size,variant:'button',isDisabled:isDisabled})}):null,hasTrailingDropDown?jsx(BaseBox,{paddingRight:"spacing.2",display:"flex",children:trailingDropDown}):null]}));}return null;};
|
|
19
19
|
|
|
20
20
|
export { BaseInputVisuals, getInputVisualsToBeRendered };
|
|
21
21
|
//# sourceMappingURL=BaseInputVisuals.js.map
|