@razorpay/blade 11.7.0 → 11.8.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.
Files changed (49) hide show
  1. package/build/lib/native/components/Button/BaseButton/AnimatedButtonContent.native.js +16 -0
  2. package/build/lib/native/components/Button/BaseButton/AnimatedButtonContent.native.js.map +1 -0
  3. package/build/lib/native/components/Button/BaseButton/BaseButton.js +7 -5
  4. package/build/lib/native/components/Button/BaseButton/BaseButton.js.map +1 -1
  5. package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js +1 -1
  6. package/build/lib/native/components/Button/BaseButton/StyledBaseButton.native.js.map +1 -1
  7. package/build/lib/native/components/ButtonGroup/ButtonGroup.native.js +7 -0
  8. package/build/lib/native/components/ButtonGroup/ButtonGroup.native.js.map +1 -0
  9. package/build/lib/native/components/ButtonGroup/ButtonGroupContext.js +6 -0
  10. package/build/lib/native/components/ButtonGroup/ButtonGroupContext.js.map +1 -0
  11. package/build/lib/native/components/index.js +1 -0
  12. package/build/lib/native/components/index.js.map +1 -1
  13. package/build/lib/native/utils/metaAttribute/metaConstants.js +1 -1
  14. package/build/lib/native/utils/metaAttribute/metaConstants.js.map +1 -1
  15. package/build/lib/web/development/components/Button/BaseButton/AnimatedButtonContent.web.js +18 -0
  16. package/build/lib/web/development/components/Button/BaseButton/AnimatedButtonContent.web.js.map +1 -0
  17. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js +116 -66
  18. package/build/lib/web/development/components/Button/BaseButton/BaseButton.js.map +1 -1
  19. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js +158 -0
  20. package/build/lib/web/development/components/ButtonGroup/ButtonGroup.web.js.map +1 -0
  21. package/build/lib/web/development/components/ButtonGroup/ButtonGroupContext.js +11 -0
  22. package/build/lib/web/development/components/ButtonGroup/ButtonGroupContext.js.map +1 -0
  23. package/build/lib/web/development/components/ButtonGroup/StyledButtonGroup.js +47 -0
  24. package/build/lib/web/development/components/ButtonGroup/StyledButtonGroup.js.map +1 -0
  25. package/build/lib/web/development/components/ButtonGroup/index.js +2 -0
  26. package/build/lib/web/development/components/ButtonGroup/index.js.map +1 -0
  27. package/build/lib/web/development/components/index.js +2 -0
  28. package/build/lib/web/development/components/index.js.map +1 -1
  29. package/build/lib/web/development/utils/metaAttribute/metaConstants.js +1 -0
  30. package/build/lib/web/development/utils/metaAttribute/metaConstants.js.map +1 -1
  31. package/build/lib/web/production/components/Button/BaseButton/AnimatedButtonContent.web.js +18 -0
  32. package/build/lib/web/production/components/Button/BaseButton/AnimatedButtonContent.web.js.map +1 -0
  33. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js +116 -66
  34. package/build/lib/web/production/components/Button/BaseButton/BaseButton.js.map +1 -1
  35. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js +158 -0
  36. package/build/lib/web/production/components/ButtonGroup/ButtonGroup.web.js.map +1 -0
  37. package/build/lib/web/production/components/ButtonGroup/ButtonGroupContext.js +11 -0
  38. package/build/lib/web/production/components/ButtonGroup/ButtonGroupContext.js.map +1 -0
  39. package/build/lib/web/production/components/ButtonGroup/StyledButtonGroup.js +47 -0
  40. package/build/lib/web/production/components/ButtonGroup/StyledButtonGroup.js.map +1 -0
  41. package/build/lib/web/production/components/ButtonGroup/index.js +2 -0
  42. package/build/lib/web/production/components/ButtonGroup/index.js.map +1 -0
  43. package/build/lib/web/production/components/index.js +2 -0
  44. package/build/lib/web/production/components/index.js.map +1 -1
  45. package/build/lib/web/production/utils/metaAttribute/metaConstants.js +1 -0
  46. package/build/lib/web/production/utils/metaAttribute/metaConstants.js.map +1 -1
  47. package/build/types/components/index.d.ts +68 -1
  48. package/build/types/components/index.native.d.ts +42 -1
  49. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated';
2
+ import 'react';
3
+ import getIn from '../../../utils/lodashButBetter/get.js';
4
+ import 'styled-components/native';
5
+ import '@gorhom/portal';
6
+ import 'react-native-gesture-handler';
7
+ import useTheme from '../../BladeProvider/useTheme.js';
8
+ import 'react-native';
9
+ import '@babel/runtime/helpers/slicedToArray';
10
+ import '../../BottomSheet/BottomSheetStack.js';
11
+ import { jsx } from 'react/jsx-runtime';
12
+
13
+ var AnimatedButtonContent=function AnimatedButtonContent(_ref){var motionDuration=_ref.motionDuration,motionEasing=_ref.motionEasing,children=_ref.children,isPressed=_ref.isPressed;var _useTheme=useTheme(),theme=_useTheme.theme;var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){return {transform:[{scale:withTiming(isPressed?0.95:1,{duration:duration,easing:easing})}]};},[isPressed]);return jsx(Animated.View,{style:animatedStyles,children:children});};
14
+
15
+ export { AnimatedButtonContent as default };
16
+ //# sourceMappingURL=AnimatedButtonContent.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedButtonContent.native.js","sources":["../../../../../../src/components/Button/BaseButton/AnimatedButtonContent.native.tsx"],"sourcesContent":["import Animated, { useAnimatedStyle, withTiming } from 'react-native-reanimated';\nimport React from 'react';\nimport type { TextInput } from 'react-native';\nimport type { AnimatedButtonContentProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useTheme } from '~components/BladeProvider';\n\nconst AnimatedButtonContent: React.ForwardRefRenderFunction<\n TextInput,\n AnimatedButtonContentProps\n> = ({ motionDuration, motionEasing, children, isPressed }) => {\n const { theme } = useTheme();\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n transform: [\n {\n scale: withTiming(isPressed ? 0.95 : 1, {\n duration,\n easing,\n }),\n },\n ],\n };\n }, [isPressed]);\n\n return <Animated.View style={animatedStyles}>{children}</Animated.View>;\n};\n\nexport default AnimatedButtonContent;\n"],"names":["AnimatedButtonContent","_ref","motionDuration","motionEasing","children","isPressed","_useTheme","useTheme","theme","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","transform","scale","withTiming","_jsx","Animated","View","style"],"mappings":";;;;;;;;;;;;AAOM,IAAAA,qBAGL,CAAG,SAHEA,qBAGLA,CAAAC,IAAA,CAA8D,CAAA,IAAxDC,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAEC,YAAY,CAAAF,IAAA,CAAZE,YAAY,CAAEC,QAAQ,CAAAH,IAAA,CAARG,QAAQ,CAAEC,SAAS,CAAAJ,IAAA,CAATI,SAAS,CACtD,IAAAC,SAAA,CAAkBC,QAAQ,EAAE,CAApBC,KAAK,CAAAF,SAAA,CAALE,KAAK,CACb,IAAMC,QAAQ,CAAGC,KAAK,CAACF,KAAK,CAACG,MAAM,CAAET,cAAc,CAAC,CACpD,IAAMU,MAAM,CAAGF,KAAK,CAACF,KAAK,CAACG,MAAM,CAAER,YAAY,CAAC,CAEhD,IAAMU,cAAc,CAAGC,gBAAgB,CAAC,UAAM,CAC5C,OAAO,CACLC,SAAS,CAAE,CACT,CACEC,KAAK,CAAEC,UAAU,CAACZ,SAAS,CAAG,IAAI,CAAG,CAAC,CAAE,CACtCI,QAAQ,CAARA,QAAQ,CACRG,MAAM,CAANA,MACF,CAAC,CACH,CAAC,CAEL,CAAC,CACH,CAAC,CAAE,CAACP,SAAS,CAAC,CAAC,CAEf,OAAOa,GAAA,CAACC,QAAQ,CAACC,IAAI,EAACC,KAAK,CAAER,cAAe,CAAAT,QAAA,CAAEA,QAAQ,CAAgB,CAAC,CACzE;;;;"}
@@ -1,11 +1,12 @@
1
+ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
1
2
  import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
2
3
  import React__default from 'react';
3
4
  import styled from 'styled-components/native';
4
5
  import StyledBaseButton from './StyledBaseButton.native.js';
5
- import { buttonIconOnlySizeToIconSizeMap, buttonSizeToIconSizeMap, buttonSizeToSpinnerSizeMap, minHeight, buttonIconPadding, buttonIconOnlyPadding, buttonPadding, typography, backgroundColor, textColor } from './buttonTokens.js';
6
+ import { typography, buttonIconOnlySizeToIconSizeMap, buttonSizeToIconSizeMap, buttonSizeToSpinnerSizeMap, minHeight, buttonIconPadding, buttonIconOnlyPadding, buttonPadding, backgroundColor, textColor } from './buttonTokens.js';
7
+ import AnimatedButtonContent from './AnimatedButtonContent.native.js';
6
8
  import getIn from '../../../utils/lodashButBetter/get.js';
7
9
  import 'react-native';
8
- import '@babel/runtime/helpers/slicedToArray';
9
10
  import { throwBladeError } from '../../../utils/logger/logger.js';
10
11
  import { isReactNative } from '../../../utils/platform/isReactNative.js';
11
12
  import { makeBorderSize } from '../../../utils/makeBorderSize/makeBorderSize.js';
@@ -13,6 +14,7 @@ import { makeSpace } from '../../../utils/makeSpace/makeSpace.js';
13
14
  import { makeSize } from '../../../utils/makeSize/makeSize.js';
14
15
  import { usePrevious } from '../../../utils/usePrevious/usePrevious.js';
15
16
  import useTheme from '../../BladeProvider/useTheme.js';
17
+ import { useButtonGroupContext } from '../../ButtonGroup/ButtonGroupContext.js';
16
18
  import { getStyledProps } from '../../Box/styledProps/getStyledProps.js';
17
19
  import '../../../tokens/global/typography.js';
18
20
  import '../../../tokens/global/motion.js';
@@ -20,7 +22,7 @@ import { BaseText } from '../../Typography/BaseText/BaseText.native.js';
20
22
  import '@gorhom/portal';
21
23
  import 'react-native-gesture-handler';
22
24
  import '../../BottomSheet/BottomSheetStack.js';
23
- import { jsxs, jsx } from 'react/jsx-runtime';
25
+ import { jsx, jsxs } from 'react/jsx-runtime';
24
26
  import { announce } from '../../LiveAnnouncer/LiveAnnouncer.native.js';
25
27
  import { BaseSpinner } from '../../Spinner/BaseSpinner/BaseSpinner.js';
26
28
  import { BaseBox } from '../../Box/BaseBox/BaseBox.native.js';
@@ -30,7 +32,7 @@ import { metaAttribute } from '../../../utils/metaAttribute/metaAttribute.native
30
32
  import { MetaConstants } from '../../../utils/metaAttribute/metaConstants.js';
31
33
  import { getStringFromReactText } from '../../../utils/getStringChildren/getStringChildren.js';
32
34
 
33
- var _excluded=["href","target","rel","variant","color","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","type","children","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart"];var getRenderElement=function getRenderElement(href){if(isReactNative()){return undefined;}if(href){return 'a';}return 'button';};var getBackgroundColorToken=function getBackgroundColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,color=_ref.color;var _state=state==='focus'||state==='hover'?'highlighted':state;var tokens=backgroundColor(property);if(color==='white'){return tokens.white[variant][_state];}if(color&&color!=='primary'){if(variant==='tertiary'){throw new Error(`Tertiary variant can only be used with color: "primary" or "white" but received "${color}"`);}return tokens.color(color)[variant][_state];}return tokens.base[variant][_state];};var getTextColorToken=function getTextColorToken(_ref2){var property=_ref2.property,variant=_ref2.variant,state=_ref2.state,color=_ref2.color;var tokens=textColor(property);var _state=state==='focus'||state==='hover'?'highlighted':state;if(color==='white'){return tokens.white[variant][_state];}if(color&&color!=='primary'){if(variant==='tertiary'){throw new Error(`Tertiary variant can only be used with color: "primary" or "white" but received "${color}"`);}return tokens.color(color)[variant][_state];}return tokens.base[variant][_state];};var getProps=function getProps(_ref3){var buttonTypographyTokens=_ref3.buttonTypographyTokens,children=_ref3.children,isDisabled=_ref3.isDisabled,size=_ref3.size,theme=_ref3.theme,variant=_ref3.variant,color=_ref3.color,hasIcon=_ref3.hasIcon;if(variant==='tertiary'&&color!=='primary'&&color!=='white'){throwBladeError({moduleName:'BaseButton',message:`Tertiary variant can only be used with color: "default" or "white" but received "${color}"`});}var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?`spacing.${buttonIconPadding[size]}`:undefined,iconColor:getTextColorToken({property:'icon',variant:variant,color:color,state:'default'}),textColor:getTextColorToken({property:'text',variant:variant,color:color,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'default'})),defaultBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'default'})),hoverBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'hover'})),hoverBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'hover'})),focusBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'focus'})),focusBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'focus'})),focusRingColor:getIn(theme.colors,'surface.border.primary.muted'),borderWidth:variant=='secondary'?makeBorderSize(theme.border.width.thin):'0px',borderRadius:makeBorderSize(theme.border.radius.medium),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'disabled'}));var disabledBorderColor=getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'disabled'}));props.iconColor=getTextColorToken({property:'icon',variant:variant,color:color,state:'disabled'});props.textColor=getTextColorToken({property:'text',variant:variant,color:color,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref4){var isHidden=_ref4.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref5,ref){var href=_ref5.href,target=_ref5.target,rel=_ref5.rel,_ref5$variant=_ref5.variant,variant=_ref5$variant===void 0?'primary':_ref5$variant,_ref5$color=_ref5.color,color=_ref5$color===void 0?'primary':_ref5$color,_ref5$size=_ref5.size,size=_ref5$size===void 0?'medium':_ref5$size,Icon=_ref5.icon,_ref5$iconPosition=_ref5.iconPosition,iconPosition=_ref5$iconPosition===void 0?'left':_ref5$iconPosition,_ref5$isDisabled=_ref5.isDisabled,isDisabled=_ref5$isDisabled===void 0?false:_ref5$isDisabled,_ref5$isFullWidth=_ref5.isFullWidth,isFullWidth=_ref5$isFullWidth===void 0?false:_ref5$isFullWidth,_ref5$isLoading=_ref5.isLoading,isLoading=_ref5$isLoading===void 0?false:_ref5$isLoading,onClick=_ref5.onClick,onBlur=_ref5.onBlur,onKeyDown=_ref5.onKeyDown,_ref5$type=_ref5.type,type=_ref5$type===void 0?'button':_ref5$type,children=_ref5.children,testID=_ref5.testID,onFocus=_ref5.onFocus,onMouseLeave=_ref5.onMouseLeave,onMouseMove=_ref5.onMouseMove,onPointerDown=_ref5.onPointerDown,onPointerEnter=_ref5.onPointerEnter,accessibilityProps=_ref5.accessibilityProps,onTouchEnd=_ref5.onTouchEnd,onTouchStart=_ref5.onTouchStart,rest=_objectWithoutProperties(_ref5,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isLink=Boolean(href);var childrenString=getStringFromReactText(children);var disabled=isLoading||isDisabled&&!isLink;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'At least one of icon or text is required to render a button.',moduleName:'BaseButton'});}}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:size,variant:variant,theme:theme,color:color,hasIcon:Boolean(Icon)}),defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;var renderElement=React__default.useMemo(function(){return getRenderElement(href);},[href]);var defaultRel=target==='_blank'?'noreferrer noopener':undefined;return jsxs(StyledBaseButton,Object.assign({ref:ref,as:renderElement,href:href,target:target,rel:rel!=null?rel:defaultRel,accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:isLink?'link':'button'},accessibilityProps))),variant:variant,isLoading:isLoading,disabled:disabled,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:isFullWidth,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onKeyDown:onKeyDown,onTouchStart:onTouchStart,onTouchEnd:onTouchEnd,type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing},metaAttribute({name:MetaConstants.Button,testID:testID}),getStyledProps(rest),{children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",zIndex:1,children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,color:color})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,zIndex:1,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"medium",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
35
+ var _excluded=["href","target","rel","variant","color","size","icon","iconPosition","isDisabled","isFullWidth","isLoading","onClick","onBlur","onKeyDown","type","children","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart"];var getRenderElement=function getRenderElement(href){if(isReactNative()){return undefined;}if(href){return 'a';}return 'button';};var getBackgroundColorToken=function getBackgroundColorToken(_ref){var property=_ref.property,variant=_ref.variant,state=_ref.state,color=_ref.color;var _state=state==='focus'||state==='hover'?'highlighted':state;var tokens=backgroundColor(property);if(color==='white'){return tokens.white[variant][_state];}if(color&&color!=='primary'){if(variant==='tertiary'){throw new Error(`Tertiary variant can only be used with color: "primary" or "white" but received "${color}"`);}return tokens.color(color)[variant][_state];}return tokens.base[variant][_state];};var getTextColorToken=function getTextColorToken(_ref2){var property=_ref2.property,variant=_ref2.variant,state=_ref2.state,color=_ref2.color;var tokens=textColor(property);var _state=state==='focus'||state==='hover'?'highlighted':state;if(color==='white'){return tokens.white[variant][_state];}if(color&&color!=='primary'){if(variant==='tertiary'){throw new Error(`Tertiary variant can only be used with color: "primary" or "white" but received "${color}"`);}return tokens.color(color)[variant][_state];}return tokens.base[variant][_state];};var getProps=function getProps(_ref3){var buttonTypographyTokens=_ref3.buttonTypographyTokens,children=_ref3.children,isDisabled=_ref3.isDisabled,size=_ref3.size,theme=_ref3.theme,variant=_ref3.variant,color=_ref3.color,hasIcon=_ref3.hasIcon;if(variant==='tertiary'&&color!=='primary'&&color!=='white'){throwBladeError({moduleName:'BaseButton',message:`Tertiary variant can only be used with color: "primary" or "white" but received "${color}"`});}var isIconOnly=hasIcon&&(!children||(children==null?void 0:children.trim().length)===0);var props={iconSize:isIconOnly?buttonIconOnlySizeToIconSizeMap[size]:buttonSizeToIconSizeMap[size],spinnerSize:buttonSizeToSpinnerSizeMap[size],fontSize:buttonTypographyTokens.fonts.size[size],lineHeight:buttonTypographyTokens.lineHeights[size],minHeight:makeSize(minHeight[size]),iconPadding:hasIcon&&children!=null&&children.trim()?`spacing.${buttonIconPadding[size]}`:undefined,iconColor:getTextColorToken({property:'icon',variant:variant,color:color,state:'default'}),textColor:getTextColorToken({property:'text',variant:variant,color:color,state:'default'}),buttonPaddingTop:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].top]):makeSpace(theme.spacing[buttonPadding[size].top]),buttonPaddingBottom:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom]):makeSpace(theme.spacing[buttonPadding[size].bottom]),buttonPaddingLeft:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].left]):makeSpace(theme.spacing[buttonPadding[size].left]),buttonPaddingRight:isIconOnly?makeSpace(theme.spacing[buttonIconOnlyPadding[size].right]):makeSpace(theme.spacing[buttonPadding[size].right]),text:size==='xsmall'?children==null?void 0:children.trim().toUpperCase():children==null?void 0:children.trim(),defaultBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'default'})),defaultBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'default'})),hoverBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'hover'})),hoverBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'hover'})),focusBackgroundColor:getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'focus'})),focusBorderColor:getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'focus'})),focusRingColor:getIn(theme.colors,'surface.border.primary.muted'),borderWidth:variant=='secondary'?makeBorderSize(theme.border.width.thin):'0px',borderRadius:makeBorderSize(theme.border.radius.medium),motionDuration:'duration.xquick',motionEasing:'easing.standard.effective'};if(isDisabled){var disabledBackgroundColor=getIn(theme.colors,getBackgroundColorToken({property:'background',variant:variant,color:color,state:'disabled'}));var disabledBorderColor=getIn(theme.colors,getBackgroundColorToken({property:'border',variant:variant,color:color,state:'disabled'}));props.iconColor=getTextColorToken({property:'icon',variant:variant,color:color,state:'disabled'});props.textColor=getTextColorToken({property:'text',variant:variant,color:color,state:'disabled'});props.defaultBackgroundColor=disabledBackgroundColor;props.defaultBorderColor=disabledBorderColor;props.hoverBackgroundColor=disabledBackgroundColor;props.hoverBorderColor=disabledBorderColor;props.focusBackgroundColor=disabledBackgroundColor;props.focusBorderColor=disabledBorderColor;}return props;};var ButtonContent=styled(BaseBox)(function(_ref4){var isHidden=_ref4.isHidden;return {opacity:isHidden?0:1};});var _BaseButton=function _BaseButton(_ref5,ref){var _buttonGroupProps$isD,_buttonGroupProps$siz,_buttonGroupProps$var,_buttonGroupProps$col,_buttonGroupProps$isF;var href=_ref5.href,target=_ref5.target,rel=_ref5.rel,_ref5$variant=_ref5.variant,variant=_ref5$variant===void 0?'primary':_ref5$variant,_ref5$color=_ref5.color,color=_ref5$color===void 0?'primary':_ref5$color,_ref5$size=_ref5.size,size=_ref5$size===void 0?'medium':_ref5$size,Icon=_ref5.icon,_ref5$iconPosition=_ref5.iconPosition,iconPosition=_ref5$iconPosition===void 0?'left':_ref5$iconPosition,_ref5$isDisabled=_ref5.isDisabled,isDisabled=_ref5$isDisabled===void 0?false:_ref5$isDisabled,_ref5$isFullWidth=_ref5.isFullWidth,isFullWidth=_ref5$isFullWidth===void 0?false:_ref5$isFullWidth,_ref5$isLoading=_ref5.isLoading,isLoading=_ref5$isLoading===void 0?false:_ref5$isLoading,onClick=_ref5.onClick,onBlur=_ref5.onBlur,_onKeyDown=_ref5.onKeyDown,_ref5$type=_ref5.type,type=_ref5$type===void 0?'button':_ref5$type,children=_ref5.children,testID=_ref5.testID,onFocus=_ref5.onFocus,onMouseLeave=_ref5.onMouseLeave,onMouseMove=_ref5.onMouseMove,onPointerDown=_ref5.onPointerDown,onPointerEnter=_ref5.onPointerEnter,accessibilityProps=_ref5.accessibilityProps,_onTouchEnd=_ref5.onTouchEnd,_onTouchStart=_ref5.onTouchStart,rest=_objectWithoutProperties(_ref5,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var buttonGroupProps=useButtonGroupContext();var _React$useState=React__default.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPressed=_React$useState2[0],setIsPressed=_React$useState2[1];var isLink=Boolean(href);var childrenString=getStringFromReactText(children);var disabled=(_buttonGroupProps$isD=buttonGroupProps.isDisabled)!=null?_buttonGroupProps$isD:isLoading||isDisabled&&!isLink;if(__DEV__){if(!Icon&&!(childrenString!=null&&childrenString.trim())){throwBladeError({message:'At least one of icon or text is required to render a button.',moduleName:'BaseButton'});}}var prevLoading=usePrevious(isLoading);React__default.useEffect(function(){if(isLoading)announce('Started loading');if(!isLoading&&prevLoading)announce('Stopped loading');},[isLoading,prevLoading]);var _getProps=getProps({buttonTypographyTokens:typography,children:childrenString,isDisabled:disabled,size:(_buttonGroupProps$siz=buttonGroupProps.size)!=null?_buttonGroupProps$siz:size,variant:(_buttonGroupProps$var=buttonGroupProps.variant)!=null?_buttonGroupProps$var:variant,theme:theme,color:(_buttonGroupProps$col=buttonGroupProps.color)!=null?_buttonGroupProps$col:color,hasIcon:Boolean(Icon)}),defaultBorderColor=_getProps.defaultBorderColor,defaultBackgroundColor=_getProps.defaultBackgroundColor,minHeight=_getProps.minHeight,buttonPaddingTop=_getProps.buttonPaddingTop,buttonPaddingBottom=_getProps.buttonPaddingBottom,buttonPaddingLeft=_getProps.buttonPaddingLeft,buttonPaddingRight=_getProps.buttonPaddingRight,focusBorderColor=_getProps.focusBorderColor,focusBackgroundColor=_getProps.focusBackgroundColor,focusRingColor=_getProps.focusRingColor,fontSize=_getProps.fontSize,hoverBorderColor=_getProps.hoverBorderColor,hoverBackgroundColor=_getProps.hoverBackgroundColor,iconColor=_getProps.iconColor,iconSize=_getProps.iconSize,iconPadding=_getProps.iconPadding,spinnerSize=_getProps.spinnerSize,lineHeight=_getProps.lineHeight,text=_getProps.text,textColor=_getProps.textColor,borderWidth=_getProps.borderWidth,borderRadius=_getProps.borderRadius,motionDuration=_getProps.motionDuration,motionEasing=_getProps.motionEasing;var renderElement=React__default.useMemo(function(){return getRenderElement(href);},[href]);var defaultRel=target==='_blank'?'noreferrer noopener':undefined;var handlePointerPressedIn=React__default.useCallback(function(){if(disabled)return;setIsPressed(true);},[disabled]);var handlePointerPressedOut=React__default.useCallback(function(){if(disabled)return;setIsPressed(false);},[disabled]);var handleKeyboardPressedIn=React__default.useCallback(function(e){if(disabled)return;if(e.key===' '||e.key==='Enter'){setIsPressed(true);}},[disabled]);var handleKeyboardPressedOut=React__default.useCallback(function(e){if(disabled)return;if(e.key===' '||e.key==='Enter'){setIsPressed(false);}},[disabled]);return jsx(StyledBaseButton,Object.assign({ref:ref,as:renderElement,href:href,target:target,rel:rel!=null?rel:defaultRel,accessibilityProps:Object.assign({},makeAccessible(Object.assign({role:isLink?'link':'button'},accessibilityProps))),variant:variant,isLoading:isLoading,disabled:disabled,defaultBorderColor:defaultBorderColor,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,defaultBackgroundColor:defaultBackgroundColor,focusBorderColor:focusBorderColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,hoverBackgroundColor:hoverBackgroundColor,isFullWidth:(_buttonGroupProps$isF=buttonGroupProps.isFullWidth)!=null?_buttonGroupProps$isF:isFullWidth,onClick:onClick,onBlur:onBlur,onFocus:onFocus,onMouseLeave:onMouseLeave,onMouseMove:onMouseMove,onPointerDown:onPointerDown,onPointerEnter:onPointerEnter,onKeyDown:function onKeyDown(event){handleKeyboardPressedIn(event);_onKeyDown==null?void 0:_onKeyDown(event);},onTouchStart:function onTouchStart(event){handlePointerPressedIn();_onTouchStart==null?void 0:_onTouchStart(event);},onTouchEnd:function onTouchEnd(event){handlePointerPressedOut();_onTouchEnd==null?void 0:_onTouchEnd(event);},type:type,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,isPressed:isPressed,onMouseDown:handlePointerPressedIn,onMouseUp:handlePointerPressedOut,onMouseOut:handlePointerPressedOut,onKeyUp:handleKeyboardPressedOut},metaAttribute({name:MetaConstants.Button,testID:testID}),getStyledProps(rest),{children:jsxs(AnimatedButtonContent,{motionDuration:motionDuration,motionEasing:motionEasing,isPressed:isPressed,children:[isLoading?jsx(BaseBox,{display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"0px",left:"0px",bottom:"0px",right:"0px",zIndex:1,children:jsx(BaseSpinner,{accessibilityLabel:"Loading",size:spinnerSize,color:color})}):null,jsxs(ButtonContent,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",flex:1,isHidden:isLoading,zIndex:1,children:[Icon&&iconPosition=='left'?jsx(BaseBox,{paddingRight:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null,text?jsx(BaseText,{lineHeight:lineHeight,fontSize:fontSize,fontWeight:"medium",textAlign:"center",color:textColor,children:text}):null,Icon&&iconPosition=='right'?jsx(BaseBox,{paddingLeft:iconPadding,display:"flex",justifyContent:"center",alignItems:"center",children:jsx(Icon,{size:iconSize,color:iconColor})}):null]})]})}));};var BaseButton=assignWithoutSideEffects(React__default.forwardRef(_BaseButton),{displayName:'BaseButton'});
34
36
 
35
- export { BaseButton as default };
37
+ export { BaseButton as default, getBackgroundColorToken };
36
38
  //# sourceMappingURL=BaseButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BaseButton.js","sources":["../../../../../../src/components/Button/BaseButton/BaseButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseButton from './StyledBaseButton';\nimport type { ButtonTypography, ButtonMinHeight } from './buttonTokens';\nimport {\n textColor,\n backgroundColor,\n buttonIconOnlyPadding,\n buttonIconOnlySizeToIconSizeMap,\n typography as buttonTypography,\n minHeight as buttonMinHeight,\n buttonSizeToIconSizeMap,\n buttonSizeToSpinnerSizeMap,\n buttonIconPadding,\n buttonPadding,\n} from './buttonTokens';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { BaseLinkProps } from '~components/Link/BaseLink';\nimport type { Theme } from '~components/BladeProvider';\nimport type { IconComponent, IconProps, IconSize } from '~components/Icons';\nimport type { DurationString, EasingString } from '~tokens/global';\nimport type { BorderRadiusValues, BorderWidthValues, SpacingValues } from '~tokens/theme/theme';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { useTheme } from '~components/BladeProvider';\nimport { announce } from '~components/LiveAnnouncer';\nimport type { BaseSpinnerProps } from '~components/Spinner/BaseSpinner';\nimport { BaseSpinner } from '~components/Spinner/BaseSpinner';\nimport BaseBox from '~components/Box/BaseBox';\nimport type {\n BladeElementRef,\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n} from '~utils/types';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { usePrevious } from '~utils/usePrevious';\nimport { makeSize } from '~utils/makeSize';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { BladeCommonEvents } from '~components/types';\nimport { throwBladeError } from '~utils/logger';\n\ntype BaseButtonCommonProps = {\n href?: BaseLinkProps['href'];\n target?: BaseLinkProps['target'];\n rel?: BaseLinkProps['rel'];\n size?: 'xsmall' | 'small' | 'medium' | 'large';\n iconPosition?: 'left' | 'right';\n isDisabled?: boolean;\n isFullWidth?: boolean;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n onClick?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n type?: 'button' | 'reset' | 'submit';\n isLoading?: boolean;\n accessibilityProps?: Partial<AccessibilityProps>;\n variant?: 'primary' | 'secondary' | 'tertiary';\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n} & TestID &\n StyledPropsBlade &\n BladeCommonEvents;\n\n/*\nMandatory children prop when icon is not provided\n*/\ntype BaseButtonWithoutIconProps = BaseButtonCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseButtonWithIconProps = BaseButtonCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n With or without icon prop. We need at least an icon or a children prop present.\n*/\nexport type BaseButtonProps = BaseButtonWithIconProps | BaseButtonWithoutIconProps;\n\ntype BaseButtonColorTokenModifiers = {\n variant: NonNullable<BaseButtonProps['variant']>;\n state: 'default' | 'hover' | 'focus' | 'disabled';\n color: BaseButtonProps['color'];\n};\n\n/**\n * All possible icon colors, derived from `IconProps` minus `currentColor` because possible values should only be from tokens\n */\ntype IconColor = Exclude<IconProps['color'], 'currentColor'>;\n\nconst getRenderElement = (href?: string): 'a' | 'button' | undefined => {\n if (isReactNative()) {\n return undefined; // as property doesn't work with react native\n }\n\n if (href) {\n return 'a';\n }\n\n return 'button';\n};\n\nconst getBackgroundColorToken = ({\n property,\n variant,\n state,\n color,\n}: BaseButtonColorTokenModifiers & {\n property: 'background' | 'border';\n}): DotNotationToken<Theme['colors']> => {\n const _state = state === 'focus' || state === 'hover' ? 'highlighted' : state;\n const tokens = backgroundColor(property);\n\n if (color === 'white') {\n return tokens.white[variant][_state];\n }\n\n if (color && color !== 'primary') {\n if (variant === 'tertiary') {\n throw new Error(\n `Tertiary variant can only be used with color: \"primary\" or \"white\" but received \"${color}\"`,\n );\n }\n return tokens.color(color)[variant][_state];\n }\n\n return tokens.base[variant][_state];\n};\n\nconst getTextColorToken = ({\n property,\n variant,\n state,\n color,\n}: BaseButtonColorTokenModifiers & {\n property: 'icon' | 'text';\n}): DotNotationToken<Theme['colors']> => {\n const tokens = textColor(property);\n const _state = state === 'focus' || state === 'hover' ? 'highlighted' : state;\n\n if (color === 'white') {\n return tokens.white[variant][_state];\n }\n\n if (color && color !== 'primary') {\n if (variant === 'tertiary') {\n throw new Error(\n `Tertiary variant can only be used with color: \"primary\" or \"white\" but received \"${color}\"`,\n );\n }\n return tokens.color(color)[variant][_state];\n }\n\n return tokens.base[variant][_state];\n};\n\ntype BaseButtonStyleProps = {\n iconSize: IconSize;\n spinnerSize: BaseSpinnerProps['size'];\n fontSize: keyof Theme['typography']['fonts']['size'];\n lineHeight: keyof Theme['typography']['lineHeights'];\n minHeight: `${ButtonMinHeight}px`;\n iconPadding?: DotNotationSpacingStringToken;\n iconColor: IconColor;\n textColor: BaseTextProps['color'];\n buttonPaddingTop: SpacingValues;\n buttonPaddingBottom: SpacingValues;\n buttonPaddingLeft: SpacingValues;\n buttonPaddingRight: SpacingValues;\n text?: string;\n defaultBackgroundColor: string;\n defaultBorderColor: string;\n hoverBackgroundColor: string;\n hoverBorderColor: string;\n focusBackgroundColor: string;\n focusBorderColor: string;\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n borderWidth: BorderWidthValues;\n borderRadius: BorderRadiusValues;\n};\n\nconst getProps = ({\n buttonTypographyTokens,\n children,\n isDisabled,\n size,\n theme,\n variant,\n color,\n hasIcon,\n}: {\n buttonTypographyTokens: ButtonTypography;\n children?: string;\n isDisabled: boolean;\n hasIcon: boolean;\n theme: Theme;\n size: NonNullable<BaseButtonProps['size']>;\n variant: NonNullable<BaseButtonProps['variant']>;\n color: BaseButtonProps['color'];\n}): BaseButtonStyleProps => {\n if (variant === 'tertiary' && color !== 'primary' && color !== 'white') {\n throwBladeError({\n moduleName: 'BaseButton',\n message: `Tertiary variant can only be used with color: \"default\" or \"white\" but received \"${color}\"`,\n });\n }\n\n const isIconOnly = hasIcon && (!children || children?.trim().length === 0);\n const props: BaseButtonStyleProps = {\n iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],\n spinnerSize: buttonSizeToSpinnerSizeMap[size],\n fontSize: buttonTypographyTokens.fonts.size[size],\n lineHeight: buttonTypographyTokens.lineHeights[size],\n minHeight: makeSize(buttonMinHeight[size]),\n iconPadding: hasIcon && children?.trim() ? `spacing.${buttonIconPadding[size]}` : undefined,\n iconColor: getTextColorToken({\n property: 'icon',\n variant,\n color,\n state: 'default',\n }) as IconColor,\n textColor: getTextColorToken({\n property: 'text',\n variant,\n color,\n state: 'default',\n }) as BaseTextProps['color'],\n buttonPaddingTop: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].top])\n : makeSpace(theme.spacing[buttonPadding[size].top]),\n buttonPaddingBottom: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom])\n : makeSpace(theme.spacing[buttonPadding[size].bottom]),\n buttonPaddingLeft: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].left])\n : makeSpace(theme.spacing[buttonPadding[size].left]),\n buttonPaddingRight: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].right])\n : makeSpace(theme.spacing[buttonPadding[size].right]),\n text: size === 'xsmall' ? children?.trim().toUpperCase() : children?.trim(),\n defaultBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'default' }),\n ),\n defaultBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'default' }),\n ),\n hoverBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'hover' }),\n ),\n hoverBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'hover' }),\n ),\n focusBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'focus' }),\n ),\n focusBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'focus' }),\n ),\n focusRingColor: getIn(theme.colors, 'surface.border.primary.muted'),\n borderWidth: variant == 'secondary' ? makeBorderSize(theme.border.width.thin) : '0px',\n borderRadius: makeBorderSize(theme.border.radius.medium),\n motionDuration: 'duration.xquick',\n motionEasing: 'easing.standard.effective',\n };\n\n if (isDisabled) {\n const disabledBackgroundColor = getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'disabled' }),\n );\n const disabledBorderColor = getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'disabled' }),\n );\n props.iconColor = getTextColorToken({\n property: 'icon',\n variant,\n color,\n state: 'disabled',\n }) as IconColor;\n props.textColor = getTextColorToken({\n property: 'text',\n variant,\n color,\n state: 'disabled',\n }) as BaseTextProps['color'];\n props.defaultBackgroundColor = disabledBackgroundColor;\n props.defaultBorderColor = disabledBorderColor;\n props.hoverBackgroundColor = disabledBackgroundColor;\n props.hoverBorderColor = disabledBorderColor;\n props.focusBackgroundColor = disabledBackgroundColor;\n props.focusBorderColor = disabledBorderColor;\n }\n\n return props;\n};\n\nconst ButtonContent = styled(BaseBox)<{ isHidden: boolean }>(({ isHidden }) => ({\n opacity: isHidden ? 0 : 1,\n}));\n\nconst _BaseButton: React.ForwardRefRenderFunction<BladeElementRef, BaseButtonProps> = (\n {\n href,\n target,\n rel,\n variant = 'primary',\n color = 'primary',\n size = 'medium',\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n type = 'button',\n children,\n testID,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n accessibilityProps,\n onTouchEnd,\n onTouchStart,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const isLink = Boolean(href);\n const childrenString = getStringFromReactText(children);\n // Button cannot be disabled when its rendered as Link\n const disabled = isLoading || (isDisabled && !isLink);\n\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: 'At least one of icon or text is required to render a button.',\n moduleName: 'BaseButton',\n });\n }\n }\n\n const prevLoading = usePrevious(isLoading);\n\n React.useEffect(() => {\n if (isLoading) announce('Started loading');\n\n if (!isLoading && prevLoading) announce('Stopped loading');\n }, [isLoading, prevLoading]);\n\n const {\n defaultBorderColor,\n defaultBackgroundColor,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n focusBorderColor,\n focusBackgroundColor,\n focusRingColor,\n fontSize,\n hoverBorderColor,\n hoverBackgroundColor,\n iconColor,\n iconSize,\n iconPadding,\n spinnerSize,\n lineHeight,\n text,\n textColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n } = getProps({\n buttonTypographyTokens: buttonTypography,\n children: childrenString,\n isDisabled: disabled,\n size,\n variant,\n theme,\n color,\n hasIcon: Boolean(Icon),\n });\n\n const renderElement = React.useMemo(() => getRenderElement(href), [href]);\n const defaultRel = target === '_blank' ? 'noreferrer noopener' : undefined;\n\n return (\n <StyledBaseButton\n ref={ref as any}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: On React Native it will always be undefined but TS doesn't understand that\n as={renderElement}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n accessibilityProps={{\n ...makeAccessible({\n role: isLink ? 'link' : 'button',\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n isLoading={isLoading}\n disabled={disabled}\n defaultBorderColor={defaultBorderColor}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n defaultBackgroundColor={defaultBackgroundColor}\n focusBorderColor={focusBorderColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n isFullWidth={isFullWidth}\n onClick={onClick}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n onKeyDown={onKeyDown}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n type={type}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n {...metaAttribute({ name: MetaConstants.Button, testID })}\n {...getStyledProps(rest)}\n >\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n position=\"absolute\"\n top=\"0px\"\n left=\"0px\"\n bottom=\"0px\"\n right=\"0px\"\n zIndex={1}\n >\n <BaseSpinner accessibilityLabel=\"Loading\" size={spinnerSize} color={color} />\n </BaseBox>\n ) : null}\n <ButtonContent\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n isHidden={isLoading}\n zIndex={1}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox\n paddingRight={iconPadding}\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon size={iconSize} color={iconColor} />\n </BaseBox>\n ) : null}\n {text ? (\n <BaseText\n lineHeight={lineHeight}\n fontSize={fontSize}\n // figma and web have different font-smoothing properties\n // which causes web version of button text to look much bolder\n // than figma version. To fix this we are changing font-weight from 600 to 500\n // https://forum.figma.com/t/why-does-a-font-weight-in-figma-seem-lighter-than-the-same-weight-in-the-browser/2207\n fontWeight=\"medium\"\n textAlign=\"center\"\n color={textColor}\n >\n {text}\n </BaseText>\n ) : null}\n {Icon && iconPosition == 'right' ? (\n <BaseBox\n paddingLeft={iconPadding}\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon size={iconSize} color={iconColor} />\n </BaseBox>\n ) : null}\n </ButtonContent>\n </StyledBaseButton>\n );\n};\n\nconst BaseButton = assignWithoutSideEffects(React.forwardRef(_BaseButton), {\n displayName: 'BaseButton',\n});\n\nexport default BaseButton;\n"],"names":["getRenderElement","href","isReactNative","undefined","getBackgroundColorToken","_ref","property","variant","state","color","_state","tokens","backgroundColor","white","Error","base","getTextColorToken","_ref2","textColor","getProps","_ref3","buttonTypographyTokens","children","isDisabled","size","theme","hasIcon","throwBladeError","moduleName","message","isIconOnly","trim","length","props","iconSize","buttonIconOnlySizeToIconSizeMap","buttonSizeToIconSizeMap","spinnerSize","buttonSizeToSpinnerSizeMap","fontSize","fonts","lineHeight","lineHeights","minHeight","makeSize","buttonMinHeight","iconPadding","buttonIconPadding","iconColor","buttonPaddingTop","makeSpace","spacing","buttonIconOnlyPadding","top","buttonPadding","buttonPaddingBottom","bottom","buttonPaddingLeft","left","buttonPaddingRight","right","text","toUpperCase","defaultBackgroundColor","getIn","colors","defaultBorderColor","hoverBackgroundColor","hoverBorderColor","focusBackgroundColor","focusBorderColor","focusRingColor","borderWidth","makeBorderSize","border","width","thin","borderRadius","radius","medium","motionDuration","motionEasing","disabledBackgroundColor","disabledBorderColor","ButtonContent","styled","BaseBox","_ref4","isHidden","opacity","_BaseButton","_ref5","ref","target","rel","_ref5$variant","_ref5$color","_ref5$size","Icon","icon","_ref5$iconPosition","iconPosition","_ref5$isDisabled","_ref5$isFullWidth","isFullWidth","_ref5$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref5$type","type","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","isLink","Boolean","childrenString","getStringFromReactText","disabled","__DEV__","prevLoading","usePrevious","React","useEffect","announce","_getProps","buttonTypography","renderElement","useMemo","defaultRel","_jsxs","StyledBaseButton","Object","assign","as","makeAccessible","role","metaAttribute","name","MetaConstants","Button","getStyledProps","_jsx","display","justifyContent","alignItems","position","zIndex","BaseSpinner","accessibilityLabel","flexDirection","flex","paddingRight","BaseText","fontWeight","textAlign","paddingLeft","BaseButton","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAA,SAAA,CAAA,CAAA,MAAA,CAAA,QAAA,CAAA,KAAA,CAAA,SAAA,CAAA,OAAA,CAAA,MAAA,CAAA,MAAA,CAAA,cAAA,CAAA,YAAA,CAAA,aAAA,CAAA,WAAA,CAAA,SAAA,CAAA,QAAA,CAAA,WAAA,CAAA,MAAA,CAAA,UAAA,CAAA,QAAA,CAAA,SAAA,CAAA,cAAA,CAAA,aAAA,CAAA,eAAA,CAAA,gBAAA,CAAA,oBAAA,CAAA,YAAA,CAAA,cAAA,CAAA,CA8GA,IAAMA,gBAAgB,CAAG,SAAnBA,gBAAgBA,CAAIC,IAAa,CAAiC,CACtE,GAAIC,aAAa,EAAE,CAAE,CACnB,OAAOC,SAAS,CAClB,CAEA,GAAIF,IAAI,CAAE,CACR,OAAO,GAAG,CACZ,CAEA,OAAO,QAAQ,CACjB,CAAC,CAED,IAAMG,uBAAuB,CAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,CAOY,CANvC,IAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CACRC,OAAO,CAAAF,IAAA,CAAPE,OAAO,CACPC,KAAK,CAAAH,IAAA,CAALG,KAAK,CACLC,KAAK,CAAAJ,IAAA,CAALI,KAAK,CAIL,IAAMC,MAAM,CAAGF,KAAK,GAAK,OAAO,EAAIA,KAAK,GAAK,OAAO,CAAG,aAAa,CAAGA,KAAK,CAC7E,IAAMG,MAAM,CAAGC,eAAe,CAACN,QAAQ,CAAC,CAExC,GAAIG,KAAK,GAAK,OAAO,CAAE,CACrB,OAAOE,MAAM,CAACE,KAAK,CAACN,OAAO,CAAC,CAACG,MAAM,CAAC,CACtC,CAEA,GAAID,KAAK,EAAI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AAI,QAAA,CAEhBuC,IAAI,CACG,CAAC,CACT,IAAI,CACPqC,IAAI,EAAIG,YAAY,EAAI,OAAO,CAC9BqD,GAAA,CAACpE,OAAO,CACNkF,CAAAA,WAAW,CAAE1H,WAAY,CACzB6G,OAAO,CAAC,MAAM,CACdC,cAAc,CAAC,QAAQ,CACvBC,UAAU,CAAC,QAAQ,CAAAvI,QAAA,CAEnBoI,GAAA,CAACxD,IAAI,CAAC1E,CAAAA,IAAI,CAAEU,QAAS,CAACzB,KAAK,CAAEuC,SAAU,CAAE,CAAC,CACnC,CAAC,CACR,IAAI,CAAA,CACK,CAAC,CACA,CAAA,CAAA,CAAC,CAEvB,CAAC,CAEK,IAAAyH,UAAU,CAAGC,wBAAwB,CAACpC,cAAK,CAACqC,UAAU,CAACjF,WAAW,CAAC,CAAE,CACzEkF,WAAW,CAAE,YACf,CAAC;;;;"}
1
+ {"version":3,"file":"BaseButton.js","sources":["../../../../../../src/components/Button/BaseButton/BaseButton.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React from 'react';\nimport styled from 'styled-components';\nimport type { GestureResponderEvent } from 'react-native';\nimport StyledBaseButton from './StyledBaseButton';\nimport type { ButtonTypography, ButtonMinHeight } from './buttonTokens';\nimport {\n textColor,\n backgroundColor,\n buttonIconOnlyPadding,\n buttonIconOnlySizeToIconSizeMap,\n typography as buttonTypography,\n minHeight as buttonMinHeight,\n buttonSizeToIconSizeMap,\n buttonSizeToSpinnerSizeMap,\n buttonIconPadding,\n buttonPadding,\n} from './buttonTokens';\nimport AnimatedButtonContent from './AnimatedButtonContent';\nimport type { DotNotationToken } from '~utils/lodashButBetter/get';\nimport getIn from '~utils/lodashButBetter/get';\nimport type { BaseLinkProps } from '~components/Link/BaseLink';\nimport type { Theme } from '~components/BladeProvider';\nimport type { IconComponent, IconProps, IconSize } from '~components/Icons';\nimport type { DurationString, EasingString } from '~tokens/global';\nimport type { BorderRadiusValues, BorderWidthValues, SpacingValues } from '~tokens/theme/theme';\nimport type { Platform } from '~utils';\nimport { isReactNative } from '~utils';\nimport type { StyledPropsBlade } from '~components/Box/styledProps';\nimport { useButtonGroupContext } from '~components/ButtonGroup/ButtonGroupContext';\nimport { getStyledProps } from '~components/Box/styledProps';\nimport { BaseText } from '~components/Typography/BaseText';\nimport { useTheme } from '~components/BladeProvider';\nimport { announce } from '~components/LiveAnnouncer';\nimport type { BaseSpinnerProps } from '~components/Spinner/BaseSpinner';\nimport { BaseSpinner } from '~components/Spinner/BaseSpinner';\nimport BaseBox from '~components/Box/BaseBox';\nimport type {\n BladeElementRef,\n DotNotationSpacingStringToken,\n StringChildrenType,\n TestID,\n} from '~utils/types';\nimport type { BaseTextProps } from '~components/Typography/BaseText/types';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { usePrevious } from '~utils/usePrevious';\nimport { makeSize } from '~utils/makeSize';\nimport { makeBorderSize } from '~utils/makeBorderSize';\nimport type { AccessibilityProps } from '~utils/makeAccessible';\nimport { makeAccessible } from '~utils/makeAccessible';\nimport { makeSpace } from '~utils/makeSpace';\nimport { metaAttribute, MetaConstants } from '~utils/metaAttribute';\nimport { getStringFromReactText } from '~src/utils/getStringChildren';\nimport type { BladeCommonEvents } from '~components/types';\nimport { throwBladeError } from '~utils/logger';\n\ntype BaseButtonCommonProps = {\n href?: BaseLinkProps['href'];\n target?: BaseLinkProps['target'];\n rel?: BaseLinkProps['rel'];\n size?: 'xsmall' | 'small' | 'medium' | 'large';\n iconPosition?: 'left' | 'right';\n isDisabled?: boolean;\n isFullWidth?: boolean;\n onKeyDown?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n }>;\n onClick?: Platform.Select<{\n native: (event: GestureResponderEvent) => void;\n web: (event: React.MouseEvent<HTMLButtonElement>) => void;\n }>;\n type?: 'button' | 'reset' | 'submit';\n isLoading?: boolean;\n accessibilityProps?: Partial<AccessibilityProps>;\n variant?: 'primary' | 'secondary' | 'tertiary';\n color?: 'primary' | 'white' | 'positive' | 'negative' | 'notice' | 'information' | 'neutral';\n} & TestID &\n StyledPropsBlade &\n BladeCommonEvents;\n\n/*\nMandatory children prop when icon is not provided\n*/\ntype BaseButtonWithoutIconProps = BaseButtonCommonProps & {\n icon?: undefined;\n children: StringChildrenType;\n};\n\n/*\n Optional children prop when icon is provided\n*/\ntype BaseButtonWithIconProps = BaseButtonCommonProps & {\n icon: IconComponent;\n children?: StringChildrenType;\n};\n\n/*\n With or without icon prop. We need at least an icon or a children prop present.\n*/\nexport type BaseButtonProps = BaseButtonWithIconProps | BaseButtonWithoutIconProps;\n\ntype BaseButtonColorTokenModifiers = {\n variant: NonNullable<BaseButtonProps['variant']>;\n state: 'default' | 'hover' | 'focus' | 'disabled';\n color: BaseButtonProps['color'];\n};\n\n/**\n * All possible icon colors, derived from `IconProps` minus `currentColor` because possible values should only be from tokens\n */\ntype IconColor = Exclude<IconProps['color'], 'currentColor'>;\n\nconst getRenderElement = (href?: string): 'a' | 'button' | undefined => {\n if (isReactNative()) {\n return undefined; // as property doesn't work with react native\n }\n\n if (href) {\n return 'a';\n }\n\n return 'button';\n};\n\nexport const getBackgroundColorToken = ({\n property,\n variant,\n state,\n color,\n}: BaseButtonColorTokenModifiers & {\n property: 'background' | 'border';\n}): DotNotationToken<Theme['colors']> => {\n const _state = state === 'focus' || state === 'hover' ? 'highlighted' : state;\n const tokens = backgroundColor(property);\n\n if (color === 'white') {\n return tokens.white[variant][_state];\n }\n\n if (color && color !== 'primary') {\n if (variant === 'tertiary') {\n throw new Error(\n `Tertiary variant can only be used with color: \"primary\" or \"white\" but received \"${color}\"`,\n );\n }\n return tokens.color(color)[variant][_state];\n }\n\n return tokens.base[variant][_state];\n};\n\nconst getTextColorToken = ({\n property,\n variant,\n state,\n color,\n}: BaseButtonColorTokenModifiers & {\n property: 'icon' | 'text';\n}): DotNotationToken<Theme['colors']> => {\n const tokens = textColor(property);\n const _state = state === 'focus' || state === 'hover' ? 'highlighted' : state;\n\n if (color === 'white') {\n return tokens.white[variant][_state];\n }\n\n if (color && color !== 'primary') {\n if (variant === 'tertiary') {\n throw new Error(\n `Tertiary variant can only be used with color: \"primary\" or \"white\" but received \"${color}\"`,\n );\n }\n return tokens.color(color)[variant][_state];\n }\n\n return tokens.base[variant][_state];\n};\n\ntype BaseButtonStyleProps = {\n iconSize: IconSize;\n spinnerSize: BaseSpinnerProps['size'];\n fontSize: keyof Theme['typography']['fonts']['size'];\n lineHeight: keyof Theme['typography']['lineHeights'];\n minHeight: `${ButtonMinHeight}px`;\n iconPadding?: DotNotationSpacingStringToken;\n iconColor: IconColor;\n textColor: BaseTextProps['color'];\n buttonPaddingTop: SpacingValues;\n buttonPaddingBottom: SpacingValues;\n buttonPaddingLeft: SpacingValues;\n buttonPaddingRight: SpacingValues;\n text?: string;\n defaultBackgroundColor: string;\n defaultBorderColor: string;\n hoverBackgroundColor: string;\n hoverBorderColor: string;\n focusBackgroundColor: string;\n focusBorderColor: string;\n focusRingColor: string;\n motionDuration: DurationString;\n motionEasing: EasingString;\n borderWidth: BorderWidthValues;\n borderRadius: BorderRadiusValues;\n};\n\nconst getProps = ({\n buttonTypographyTokens,\n children,\n isDisabled,\n size,\n theme,\n variant,\n color,\n hasIcon,\n}: {\n buttonTypographyTokens: ButtonTypography;\n children?: string;\n isDisabled: boolean;\n hasIcon: boolean;\n theme: Theme;\n size: NonNullable<BaseButtonProps['size']>;\n variant: NonNullable<BaseButtonProps['variant']>;\n color: BaseButtonProps['color'];\n}): BaseButtonStyleProps => {\n if (variant === 'tertiary' && color !== 'primary' && color !== 'white') {\n throwBladeError({\n moduleName: 'BaseButton',\n message: `Tertiary variant can only be used with color: \"primary\" or \"white\" but received \"${color}\"`,\n });\n }\n\n const isIconOnly = hasIcon && (!children || children?.trim().length === 0);\n const props: BaseButtonStyleProps = {\n iconSize: isIconOnly ? buttonIconOnlySizeToIconSizeMap[size] : buttonSizeToIconSizeMap[size],\n spinnerSize: buttonSizeToSpinnerSizeMap[size],\n fontSize: buttonTypographyTokens.fonts.size[size],\n lineHeight: buttonTypographyTokens.lineHeights[size],\n minHeight: makeSize(buttonMinHeight[size]),\n iconPadding: hasIcon && children?.trim() ? `spacing.${buttonIconPadding[size]}` : undefined,\n iconColor: getTextColorToken({\n property: 'icon',\n variant,\n color,\n state: 'default',\n }) as IconColor,\n textColor: getTextColorToken({\n property: 'text',\n variant,\n color,\n state: 'default',\n }) as BaseTextProps['color'],\n buttonPaddingTop: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].top])\n : makeSpace(theme.spacing[buttonPadding[size].top]),\n buttonPaddingBottom: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].bottom])\n : makeSpace(theme.spacing[buttonPadding[size].bottom]),\n buttonPaddingLeft: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].left])\n : makeSpace(theme.spacing[buttonPadding[size].left]),\n buttonPaddingRight: isIconOnly\n ? makeSpace(theme.spacing[buttonIconOnlyPadding[size].right])\n : makeSpace(theme.spacing[buttonPadding[size].right]),\n text: size === 'xsmall' ? children?.trim().toUpperCase() : children?.trim(),\n defaultBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'default' }),\n ),\n defaultBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'default' }),\n ),\n hoverBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'hover' }),\n ),\n hoverBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'hover' }),\n ),\n focusBackgroundColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'focus' }),\n ),\n focusBorderColor: getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'focus' }),\n ),\n focusRingColor: getIn(theme.colors, 'surface.border.primary.muted'),\n borderWidth: variant == 'secondary' ? makeBorderSize(theme.border.width.thin) : '0px',\n borderRadius: makeBorderSize(theme.border.radius.medium),\n motionDuration: 'duration.xquick',\n motionEasing: 'easing.standard.effective',\n };\n\n if (isDisabled) {\n const disabledBackgroundColor = getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'background', variant, color, state: 'disabled' }),\n );\n const disabledBorderColor = getIn(\n theme.colors,\n getBackgroundColorToken({ property: 'border', variant, color, state: 'disabled' }),\n );\n props.iconColor = getTextColorToken({\n property: 'icon',\n variant,\n color,\n state: 'disabled',\n }) as IconColor;\n props.textColor = getTextColorToken({\n property: 'text',\n variant,\n color,\n state: 'disabled',\n }) as BaseTextProps['color'];\n props.defaultBackgroundColor = disabledBackgroundColor;\n props.defaultBorderColor = disabledBorderColor;\n props.hoverBackgroundColor = disabledBackgroundColor;\n props.hoverBorderColor = disabledBorderColor;\n props.focusBackgroundColor = disabledBackgroundColor;\n props.focusBorderColor = disabledBorderColor;\n }\n\n return props;\n};\n\nconst ButtonContent = styled(BaseBox)<{ isHidden: boolean }>(({ isHidden }) => ({\n opacity: isHidden ? 0 : 1,\n}));\n\nconst _BaseButton: React.ForwardRefRenderFunction<BladeElementRef, BaseButtonProps> = (\n {\n href,\n target,\n rel,\n variant = 'primary',\n color = 'primary',\n size = 'medium',\n icon: Icon,\n iconPosition = 'left',\n isDisabled = false,\n isFullWidth = false,\n isLoading = false,\n onClick,\n onBlur,\n onKeyDown,\n type = 'button',\n children,\n testID,\n onFocus,\n onMouseLeave,\n onMouseMove,\n onPointerDown,\n onPointerEnter,\n accessibilityProps,\n onTouchEnd,\n onTouchStart,\n ...rest\n },\n ref,\n) => {\n const { theme } = useTheme();\n const buttonGroupProps = useButtonGroupContext();\n const [isPressed, setIsPressed] = React.useState(false);\n const isLink = Boolean(href);\n const childrenString = getStringFromReactText(children);\n // Button cannot be disabled when its rendered as Link\n const disabled = buttonGroupProps.isDisabled ?? (isLoading || (isDisabled && !isLink));\n\n if (__DEV__) {\n if (!Icon && !childrenString?.trim()) {\n throwBladeError({\n message: 'At least one of icon or text is required to render a button.',\n moduleName: 'BaseButton',\n });\n }\n }\n\n const prevLoading = usePrevious(isLoading);\n\n React.useEffect(() => {\n if (isLoading) announce('Started loading');\n\n if (!isLoading && prevLoading) announce('Stopped loading');\n }, [isLoading, prevLoading]);\n\n const {\n defaultBorderColor,\n defaultBackgroundColor,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n focusBorderColor,\n focusBackgroundColor,\n focusRingColor,\n fontSize,\n hoverBorderColor,\n hoverBackgroundColor,\n iconColor,\n iconSize,\n iconPadding,\n spinnerSize,\n lineHeight,\n text,\n textColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n } = getProps({\n buttonTypographyTokens: buttonTypography,\n children: childrenString,\n isDisabled: disabled,\n size: buttonGroupProps.size ?? size,\n variant: buttonGroupProps.variant ?? variant,\n theme,\n color: buttonGroupProps.color ?? color,\n hasIcon: Boolean(Icon),\n });\n\n const renderElement = React.useMemo(() => getRenderElement(href), [href]);\n const defaultRel = target === '_blank' ? 'noreferrer noopener' : undefined;\n\n const handlePointerPressedIn = React.useCallback(() => {\n if (disabled) return;\n setIsPressed(true);\n }, [disabled]);\n\n const handlePointerPressedOut = React.useCallback(() => {\n if (disabled) return;\n setIsPressed(false);\n }, [disabled]);\n\n const handleKeyboardPressedIn = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n if (e.key === ' ' || e.key === 'Enter') {\n setIsPressed(true);\n }\n },\n [disabled],\n );\n\n const handleKeyboardPressedOut = React.useCallback(\n (e: React.KeyboardEvent) => {\n if (disabled) return;\n if (e.key === ' ' || e.key === 'Enter') {\n setIsPressed(false);\n }\n },\n [disabled],\n );\n\n return (\n <StyledBaseButton\n ref={ref as any}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment, @typescript-eslint/prefer-ts-expect-error\n // @ts-ignore: On React Native it will always be undefined but TS doesn't understand that\n as={renderElement}\n href={href}\n target={target}\n rel={rel ?? defaultRel}\n accessibilityProps={{\n ...makeAccessible({\n role: isLink ? 'link' : 'button',\n ...accessibilityProps,\n }),\n }}\n variant={variant}\n isLoading={isLoading}\n disabled={disabled}\n defaultBorderColor={defaultBorderColor}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n defaultBackgroundColor={defaultBackgroundColor}\n focusBorderColor={focusBorderColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n isFullWidth={buttonGroupProps.isFullWidth ?? isFullWidth}\n onClick={onClick}\n onBlur={onBlur}\n onFocus={onFocus}\n onMouseLeave={onMouseLeave}\n onMouseMove={onMouseMove}\n onPointerDown={onPointerDown}\n onPointerEnter={onPointerEnter}\n // Setting type for web fails it on native typecheck and vice versa\n onKeyDown={(event: any) => {\n handleKeyboardPressedIn(event);\n onKeyDown?.(event);\n }}\n onTouchStart={(event: React.TouchEvent) => {\n handlePointerPressedIn();\n onTouchStart?.(event);\n }}\n onTouchEnd={(event: React.TouchEvent) => {\n handlePointerPressedOut();\n onTouchEnd?.(event);\n }}\n type={type}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n isPressed={isPressed}\n onMouseDown={handlePointerPressedIn}\n onMouseUp={handlePointerPressedOut}\n onMouseOut={handlePointerPressedOut}\n onKeyUp={handleKeyboardPressedOut}\n {...metaAttribute({ name: MetaConstants.Button, testID })}\n {...getStyledProps(rest)}\n >\n <AnimatedButtonContent\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n isPressed={isPressed}\n >\n {isLoading ? (\n <BaseBox\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n position=\"absolute\"\n top=\"0px\"\n left=\"0px\"\n bottom=\"0px\"\n right=\"0px\"\n zIndex={1}\n >\n <BaseSpinner accessibilityLabel=\"Loading\" size={spinnerSize} color={color} />\n </BaseBox>\n ) : null}\n <ButtonContent\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n flex={1}\n isHidden={isLoading}\n zIndex={1}\n >\n {Icon && iconPosition == 'left' ? (\n <BaseBox\n paddingRight={iconPadding}\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon size={iconSize} color={iconColor} />\n </BaseBox>\n ) : null}\n {text ? (\n <BaseText\n lineHeight={lineHeight}\n fontSize={fontSize}\n // figma and web have different font-smoothing properties\n // which causes web version of button text to look much bolder\n // than figma version. To fix this we are changing font-weight from 600 to 500\n // https://forum.figma.com/t/why-does-a-font-weight-in-figma-seem-lighter-than-the-same-weight-in-the-browser/2207\n fontWeight=\"medium\"\n textAlign=\"center\"\n color={textColor}\n >\n {text}\n </BaseText>\n ) : null}\n {Icon && iconPosition == 'right' ? (\n <BaseBox\n paddingLeft={iconPadding}\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <Icon size={iconSize} color={iconColor} />\n </BaseBox>\n ) : null}\n </ButtonContent>\n </AnimatedButtonContent>\n </StyledBaseButton>\n );\n};\n\nconst BaseButton = assignWithoutSideEffects(React.forwardRef(_BaseButton), {\n displayName: 'BaseButton',\n});\n\nexport default BaseButton;\n"],"names":["getRenderElement","href","isReactNative","undefined","getBackgroundColorToken","_ref","property","variant","state","color","_state","tokens","backgroundColor","white","Error","base","getTextColorToken","_ref2","textColor","getProps","_ref3","buttonTypographyTokens","children","isDisabled","size","theme","hasIcon","throwBladeError","moduleName","message","isIconOnly","trim","length","props","iconSize","buttonIconOnlySizeToIconSizeMap","buttonSizeToIconSizeMap","spinnerSize","buttonSizeToSpinnerSizeMap","fontSize","fonts","lineHeight","lineHeights","minHeight","makeSize","buttonMinHeight","iconPadding","buttonIconPadding","iconColor","buttonPaddingTop","makeSpace","spacing","buttonIconOnlyPadding","top","buttonPadding","buttonPaddingBottom","bottom","buttonPaddingLeft","left","buttonPaddingRight","right","text","toUpperCase","defaultBackgroundColor","getIn","colors","defaultBorderColor","hoverBackgroundColor","hoverBorderColor","focusBackgroundColor","focusBorderColor","focusRingColor","borderWidth","makeBorderSize","border","width","thin","borderRadius","radius","medium","motionDuration","motionEasing","disabledBackgroundColor","disabledBorderColor","ButtonContent","styled","BaseBox","_ref4","isHidden","opacity","_BaseButton","_ref5","ref","_buttonGroupProps$isD","_buttonGroupProps$siz","_buttonGroupProps$var","_buttonGroupProps$col","_buttonGroupProps$isF","target","rel","_ref5$variant","_ref5$color","_ref5$size","Icon","icon","_ref5$iconPosition","iconPosition","_ref5$isDisabled","_ref5$isFullWidth","isFullWidth","_ref5$isLoading","isLoading","onClick","onBlur","onKeyDown","_ref5$type","type","testID","onFocus","onMouseLeave","onMouseMove","onPointerDown","onPointerEnter","accessibilityProps","onTouchEnd","onTouchStart","rest","_objectWithoutProperties","_excluded","_useTheme","useTheme","buttonGroupProps","useButtonGroupContext","_React$useState","React","useState","_React$useState2","_slicedToArray","isPressed","setIsPressed","isLink","Boolean","childrenString","getStringFromReactText","disabled","__DEV__","prevLoading","usePrevious","useEffect","announce","_getProps","buttonTypography","renderElement","useMemo","defaultRel","handlePointerPressedIn","useCallback","handlePointerPressedOut","handleKeyboardPressedIn","e","key","handleKeyboardPressedOut","_jsx","StyledBaseButton","Object","assign","as","makeAccessible","role","event","onMouseDown","onMouseUp","onMouseOut","onKeyUp","metaAttribute","name","MetaConstants","Button","getStyledProps","_jsxs","AnimatedButtonContent","display","justifyContent","alignItems","position","zIndex","BaseSpinner","accessibilityLabel","flexDirection","flex","paddingRight","BaseText","fontWeight","textAlign","paddingLeft","BaseButton","assignWithoutSideEffects","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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cAAK,CAAC+D,UAAU,CAAC3G,WAAW,CAAC,CAAE,CACzE4G,WAAW,CAAE,YACf,CAAC;;;;"}
@@ -17,7 +17,7 @@ import '../../BottomSheet/BottomSheetStack.js';
17
17
  import { jsx } from 'react/jsx-runtime';
18
18
  import { assignWithoutSideEffects } from '../../../utils/assignWithoutSideEffects/assignWithoutSideEffects.js';
19
19
 
20
- var _excluded=["onClick","href","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus"];var StyledPressable=styled(Animated.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseButtonStyles(props),{alignSelf:'center',display:'flex'},styledPropsCSSObject);});var openURL=function(){var _ref=_asyncToGenerator(function*(href){try{var canOpen=yield Linking.canOpenURL(href);if(canOpen){yield Linking.openURL(href);}}catch(_unused){if(__DEV__){logger({type:'warn',message:`Could not open the link "href=${href}"`,moduleName:'BaseButton'});}}});return function openURL(_x){return _ref.apply(this,arguments);};}();var _StyledBaseButton=function _StyledBaseButton(_ref2,ref){var onClick=_ref2.onClick,href=_ref2.href;_ref2.onBlur;_ref2.onKeyDown;var _children=_ref2.children,variant=_ref2.variant,minHeight=_ref2.minHeight,buttonPaddingTop=_ref2.buttonPaddingTop,buttonPaddingBottom=_ref2.buttonPaddingBottom,buttonPaddingLeft=_ref2.buttonPaddingLeft,buttonPaddingRight=_ref2.buttonPaddingRight,isFullWidth=_ref2.isFullWidth,disabled=_ref2.disabled,defaultBackgroundColor=_ref2.defaultBackgroundColor,defaultBorderColor=_ref2.defaultBorderColor,hoverBackgroundColor=_ref2.hoverBackgroundColor,focusBackgroundColor=_ref2.focusBackgroundColor,focusRingColor=_ref2.focusRingColor,hoverBorderColor=_ref2.hoverBorderColor,focusBorderColor=_ref2.focusBorderColor,borderWidth=_ref2.borderWidth,borderRadius=_ref2.borderRadius,motionDuration=_ref2.motionDuration,motionEasing=_ref2.motionEasing,isLoading=_ref2.isLoading,accessibilityProps=_ref2.accessibilityProps,testID=_ref2.testID,onTouchStart=_ref2.onTouchStart,onTouchEnd=_ref2.onTouchEnd,onPointerEnter=_ref2.onPointerEnter,onPointerDown=_ref2.onPointerDown,onFocus=_ref2.onFocus,styledProps=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){return Object.assign({backgroundColor:withTiming(isPressed.value?focusBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing})},variant!=='tertiary'&&{borderColor:withTiming(isPressed.value?focusBorderColor:defaultBorderColor,{duration:duration,easing:easing})});});var handleOnPress=function handleOnPress(event){if(href){void openURL(href);}if(onClick){onClick(event);}};return jsx(StyledPressable,Object.assign({},styledProps,accessibilityProps,{ref:ref,role:"button",onTouchStart:castNativeType(onTouchStart),onTouchEnd:castNativeType(onTouchEnd),onPointerEnter:castNativeType(onPointerEnter),onPointerDown:castNativeType(onPointerDown),onFocus:castNativeType(onFocus),isLoading:isLoading,onPress:handleOnPress,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref3){var pressed=_ref3.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
20
+ var _excluded=["onClick","href","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus"];var StyledPressable=styled(Animated.createAnimatedComponent(Pressable))(function(props){var styledPropsCSSObject=useStyledProps(props);return Object.assign({},getBaseButtonStyles(props),{alignSelf:'center',display:'flex',flexDirection:'row'},styledPropsCSSObject);});var openURL=function(){var _ref=_asyncToGenerator(function*(href){try{var canOpen=yield Linking.canOpenURL(href);if(canOpen){yield Linking.openURL(href);}}catch(_unused){if(__DEV__){logger({type:'warn',message:`Could not open the link "href=${href}"`,moduleName:'BaseButton'});}}});return function openURL(_x){return _ref.apply(this,arguments);};}();var _StyledBaseButton=function _StyledBaseButton(_ref2,ref){var onClick=_ref2.onClick,href=_ref2.href;_ref2.onBlur;_ref2.onKeyDown;var _children=_ref2.children,variant=_ref2.variant,minHeight=_ref2.minHeight,buttonPaddingTop=_ref2.buttonPaddingTop,buttonPaddingBottom=_ref2.buttonPaddingBottom,buttonPaddingLeft=_ref2.buttonPaddingLeft,buttonPaddingRight=_ref2.buttonPaddingRight,isFullWidth=_ref2.isFullWidth,disabled=_ref2.disabled,defaultBackgroundColor=_ref2.defaultBackgroundColor,defaultBorderColor=_ref2.defaultBorderColor,hoverBackgroundColor=_ref2.hoverBackgroundColor,focusBackgroundColor=_ref2.focusBackgroundColor,focusRingColor=_ref2.focusRingColor,hoverBorderColor=_ref2.hoverBorderColor,focusBorderColor=_ref2.focusBorderColor,borderWidth=_ref2.borderWidth,borderRadius=_ref2.borderRadius,motionDuration=_ref2.motionDuration,motionEasing=_ref2.motionEasing,isLoading=_ref2.isLoading,accessibilityProps=_ref2.accessibilityProps,testID=_ref2.testID,onTouchStart=_ref2.onTouchStart,onTouchEnd=_ref2.onTouchEnd,onPointerEnter=_ref2.onPointerEnter,onPointerDown=_ref2.onPointerDown,onFocus=_ref2.onFocus,styledProps=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=getIn(theme.motion,motionDuration);var easing=getIn(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){return Object.assign({backgroundColor:withTiming(isPressed.value?focusBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing})},variant!=='tertiary'&&{borderColor:withTiming(isPressed.value?focusBorderColor:defaultBorderColor,{duration:duration,easing:easing})});});var handleOnPress=function handleOnPress(event){if(href){void openURL(href);}if(onClick){onClick(event);}};return jsx(StyledPressable,Object.assign({},styledProps,accessibilityProps,{ref:ref,role:"button",onTouchStart:castNativeType(onTouchStart),onTouchEnd:castNativeType(onTouchEnd),onPointerEnter:castNativeType(onPointerEnter),onPointerDown:castNativeType(onPointerDown),onFocus:castNativeType(onFocus),isLoading:isLoading,onPress:handleOnPress,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,testID:testID,children:function children(_ref3){var pressed=_ref3.pressed;isPressed.value=pressed;return _children;}}));};var StyledBaseButton=assignWithoutSideEffects(React__default.forwardRef(_StyledBaseButton),{displayName:'StyledBaseButton'});
21
21
 
22
22
  export { StyledBaseButton as default };
23
23
  //# sourceMappingURL=StyledBaseButton.native.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StyledBaseButton.native.js","sources":["../../../../../../src/components/Button/BaseButton/StyledBaseButton.native.tsx"],"sourcesContent":["import { Linking, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport styled from 'styled-components/native';\nimport React from 'react';\nimport type { TextInput, GestureResponderEvent } from 'react-native';\nimport getStyledBaseButtonStyles from './getStyledBaseButtonStyles';\nimport type { StyledBaseButtonProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useStyledProps } from '~components/Box/styledProps';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { logger } from '~utils/logger';\nimport { castNativeType } from '~utils';\n\nconst StyledPressable = styled(Animated.createAnimatedComponent(Pressable))<\n Omit<StyledBaseButtonProps, 'accessibilityProps'>\n>((props) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getStyledBaseButtonStyles(props),\n alignSelf: 'center',\n display: 'flex',\n ...styledPropsCSSObject,\n };\n});\n\nconst openURL = async (href: string): Promise<void> => {\n try {\n const canOpen = await Linking.canOpenURL(href);\n if (canOpen) {\n await Linking.openURL(href);\n }\n } catch {\n if (__DEV__) {\n logger({\n type: 'warn',\n message: `Could not open the link \"href=${href}\"`,\n moduleName: 'BaseButton',\n });\n }\n }\n};\n\nconst _StyledBaseButton: React.ForwardRefRenderFunction<TextInput, StyledBaseButtonProps> = (\n {\n onClick,\n href,\n onBlur,\n onKeyDown,\n children,\n variant,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n isFullWidth,\n disabled,\n defaultBackgroundColor,\n defaultBorderColor,\n hoverBackgroundColor,\n focusBackgroundColor,\n focusRingColor,\n hoverBorderColor,\n focusBorderColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n isLoading,\n accessibilityProps,\n testID,\n onTouchStart,\n onTouchEnd,\n onPointerEnter,\n onPointerDown,\n onFocus,\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const isPressed = useSharedValue(false);\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n backgroundColor: withTiming(isPressed.value ? focusBackgroundColor : defaultBackgroundColor, {\n duration,\n easing,\n }),\n ...(variant !== 'tertiary' && {\n borderColor: withTiming(isPressed.value ? focusBorderColor : defaultBorderColor, {\n duration,\n easing,\n }),\n }),\n };\n });\n\n const handleOnPress = (event: GestureResponderEvent): void => {\n if (href) {\n void openURL(href);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <StyledPressable\n {...styledProps}\n {...accessibilityProps}\n ref={ref}\n role=\"button\"\n onTouchStart={castNativeType(onTouchStart)}\n onTouchEnd={castNativeType(onTouchEnd)}\n onPointerEnter={castNativeType(onPointerEnter)}\n onPointerDown={castNativeType(onPointerDown)}\n onFocus={castNativeType(onFocus)}\n isLoading={isLoading}\n onPress={handleOnPress}\n style={animatedStyles}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n isFullWidth={isFullWidth}\n disabled={disabled}\n defaultBackgroundColor={defaultBackgroundColor}\n defaultBorderColor={defaultBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n focusBorderColor={focusBorderColor}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n testID={testID}\n >\n {({ pressed }): React.ReactNode => {\n isPressed.value = pressed;\n return children;\n }}\n </StyledPressable>\n );\n};\n\nconst StyledBaseButton = assignWithoutSideEffects(React.forwardRef(_StyledBaseButton), {\n displayName: 'StyledBaseButton',\n});\n\nexport default StyledBaseButton;\n"],"names":["StyledPressable","styled","Animated","createAnimatedComponent","Pressable","props","styledPropsCSSObject","useStyledProps","Object","assign","getStyledBaseButtonStyles","alignSelf","display","openURL","_ref","_asyncToGenerator","href","canOpen","Linking","canOpenURL","_unused","__DEV__","logger","type","message","moduleName","_x","apply","arguments","_StyledBaseButton","_ref2","ref","onClick","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","isPressed","useSharedValue","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","value","borderColor","handleOnPress","event","_jsx","role","castNativeType","onPress","style","_ref3","pressed","StyledBaseButton","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,SAAA,CAAA,MAAA,CAAA,QAAA,CAAA,WAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,kBAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,aAAA,CAAA,UAAA,CAAA,wBAAA,CAAA,oBAAA,CAAA,sBAAA,CAAA,sBAAA,CAAA,gBAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,cAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,WAAA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C,cAAc,CAAEyB,cAAc,CAACzB,cAAc,CAAE,CAC/CC,aAAa,CAAEwB,cAAc,CAACxB,aAAa,CAAE,CAC7CC,OAAO,CAAEuB,cAAc,CAACvB,OAAO,CAAE,CACjCP,SAAS,CAAEA,SAAU,CACrB+B,OAAO,CAAEL,aAAc,CACvBM,KAAK,CAAEZ,cAAe,CACtBtC,SAAS,CAAEA,SAAU,CACrBC,gBAAgB,CAAEA,gBAAiB,CACnCC,mBAAmB,CAAEA,mBAAoB,CACzCC,iBAAiB,CAAEA,iBAAkB,CACrCC,kBAAkB,CAAEA,kBAAmB,CACvCC,WAAW,CAAEA,WAAY,CACzBC,QAAQ,CAAEA,QAAS,CACnBC,sBAAsB,CAAEA,sBAAuB,CAC/CC,kBAAkB,CAAEA,kBAAmB,CACvCC,oBAAoB,CAAEA,oBAAqB,CAC3CC,oBAAoB,CAAEA,oBAAqB,CAC3CC,cAAc,CAAEA,cAAe,CAC/BC,gBAAgB,CAAEA,gBAAiB,CACnCC,gBAAgB,CAAEA,gBAAiB,CACnCC,WAAW,CAAEA,WAAY,CACzBC,YAAY,CAAEA,YAAa,CAC3BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BG,MAAM,CAAEA,MAAO,CAAAtB,QAAA,CAEd,SAAAA,SAAAqD,KAAA,CAAkC,KAA/BC,OAAO,CAAAD,KAAA,CAAPC,OAAO,CACTpB,SAAS,CAACU,KAAK,CAAGU,OAAO,CACzB,OAAOtD,SAAQ,CACjB,CAAC,CACc,CAAA,CAAC,CAEtB,CAAC,CAEK,IAAAuD,gBAAgB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAChE,iBAAiB,CAAC,CAAE,CACrFiE,WAAW,CAAE,kBACf,CAAC;;;;"}
1
+ {"version":3,"file":"StyledBaseButton.native.js","sources":["../../../../../../src/components/Button/BaseButton/StyledBaseButton.native.tsx"],"sourcesContent":["import { Linking, Pressable } from 'react-native';\nimport Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';\nimport styled from 'styled-components/native';\nimport React from 'react';\nimport type { TextInput, GestureResponderEvent } from 'react-native';\nimport getStyledBaseButtonStyles from './getStyledBaseButtonStyles';\nimport type { StyledBaseButtonProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport { useStyledProps } from '~components/Box/styledProps';\nimport { useTheme } from '~components/BladeProvider';\nimport { assignWithoutSideEffects } from '~utils/assignWithoutSideEffects';\nimport { logger } from '~utils/logger';\nimport { castNativeType } from '~utils';\n\nconst StyledPressable = styled(Animated.createAnimatedComponent(Pressable))<\n Omit<StyledBaseButtonProps, 'accessibilityProps'>\n>((props) => {\n const styledPropsCSSObject = useStyledProps(props);\n\n return {\n ...getStyledBaseButtonStyles(props),\n alignSelf: 'center',\n display: 'flex',\n flexDirection: 'row',\n ...styledPropsCSSObject,\n };\n});\n\nconst openURL = async (href: string): Promise<void> => {\n try {\n const canOpen = await Linking.canOpenURL(href);\n if (canOpen) {\n await Linking.openURL(href);\n }\n } catch {\n if (__DEV__) {\n logger({\n type: 'warn',\n message: `Could not open the link \"href=${href}\"`,\n moduleName: 'BaseButton',\n });\n }\n }\n};\n\nconst _StyledBaseButton: React.ForwardRefRenderFunction<TextInput, StyledBaseButtonProps> = (\n {\n onClick,\n href,\n onBlur,\n onKeyDown,\n children,\n variant,\n minHeight,\n buttonPaddingTop,\n buttonPaddingBottom,\n buttonPaddingLeft,\n buttonPaddingRight,\n isFullWidth,\n disabled,\n defaultBackgroundColor,\n defaultBorderColor,\n hoverBackgroundColor,\n focusBackgroundColor,\n focusRingColor,\n hoverBorderColor,\n focusBorderColor,\n borderWidth,\n borderRadius,\n motionDuration,\n motionEasing,\n isLoading,\n accessibilityProps,\n testID,\n onTouchStart,\n onTouchEnd,\n onPointerEnter,\n onPointerDown,\n onFocus,\n ...styledProps\n },\n ref,\n) => {\n const { theme } = useTheme();\n const isPressed = useSharedValue(false);\n const duration = getIn(theme.motion, motionDuration);\n const easing = getIn(theme.motion, motionEasing);\n\n const animatedStyles = useAnimatedStyle(() => {\n return {\n backgroundColor: withTiming(isPressed.value ? focusBackgroundColor : defaultBackgroundColor, {\n duration,\n easing,\n }),\n ...(variant !== 'tertiary' && {\n borderColor: withTiming(isPressed.value ? focusBorderColor : defaultBorderColor, {\n duration,\n easing,\n }),\n }),\n };\n });\n\n const handleOnPress = (event: GestureResponderEvent): void => {\n if (href) {\n void openURL(href);\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <StyledPressable\n {...styledProps}\n {...accessibilityProps}\n ref={ref}\n role=\"button\"\n onTouchStart={castNativeType(onTouchStart)}\n onTouchEnd={castNativeType(onTouchEnd)}\n onPointerEnter={castNativeType(onPointerEnter)}\n onPointerDown={castNativeType(onPointerDown)}\n onFocus={castNativeType(onFocus)}\n isLoading={isLoading}\n onPress={handleOnPress}\n style={animatedStyles}\n minHeight={minHeight}\n buttonPaddingTop={buttonPaddingTop}\n buttonPaddingBottom={buttonPaddingBottom}\n buttonPaddingLeft={buttonPaddingLeft}\n buttonPaddingRight={buttonPaddingRight}\n isFullWidth={isFullWidth}\n disabled={disabled}\n defaultBackgroundColor={defaultBackgroundColor}\n defaultBorderColor={defaultBorderColor}\n hoverBackgroundColor={hoverBackgroundColor}\n focusBackgroundColor={focusBackgroundColor}\n focusRingColor={focusRingColor}\n hoverBorderColor={hoverBorderColor}\n focusBorderColor={focusBorderColor}\n borderWidth={borderWidth}\n borderRadius={borderRadius}\n motionDuration={motionDuration}\n motionEasing={motionEasing}\n testID={testID}\n >\n {({ pressed }): React.ReactNode => {\n isPressed.value = pressed;\n return children;\n }}\n </StyledPressable>\n );\n};\n\nconst StyledBaseButton = assignWithoutSideEffects(React.forwardRef(_StyledBaseButton), {\n displayName: 'StyledBaseButton',\n});\n\nexport default StyledBaseButton;\n"],"names":["StyledPressable","styled","Animated","createAnimatedComponent","Pressable","props","styledPropsCSSObject","useStyledProps","Object","assign","getStyledBaseButtonStyles","alignSelf","display","flexDirection","openURL","_ref","_asyncToGenerator","href","canOpen","Linking","canOpenURL","_unused","__DEV__","logger","type","message","moduleName","_x","apply","arguments","_StyledBaseButton","_ref2","ref","onClick","onBlur","onKeyDown","children","variant","minHeight","buttonPaddingTop","buttonPaddingBottom","buttonPaddingLeft","buttonPaddingRight","isFullWidth","disabled","defaultBackgroundColor","defaultBorderColor","hoverBackgroundColor","focusBackgroundColor","focusRingColor","hoverBorderColor","focusBorderColor","borderWidth","borderRadius","motionDuration","motionEasing","isLoading","accessibilityProps","testID","onTouchStart","onTouchEnd","onPointerEnter","onPointerDown","onFocus","styledProps","_objectWithoutProperties","_excluded","_useTheme","useTheme","theme","isPressed","useSharedValue","duration","getIn","motion","easing","animatedStyles","useAnimatedStyle","backgroundColor","withTiming","value","borderColor","handleOnPress","event","_jsx","role","castNativeType","onPress","style","_ref3","pressed","StyledBaseButton","assignWithoutSideEffects","React","forwardRef","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,IAAA,SAAA,CAAA,CAAA,SAAA,CAAA,MAAA,CAAA,QAAA,CAAA,WAAA,CAAA,UAAA,CAAA,SAAA,CAAA,WAAA,CAAA,kBAAA,CAAA,qBAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,aAAA,CAAA,UAAA,CAAA,wBAAA,CAAA,oBAAA,CAAA,sBAAA,CAAA,sBAAA,CAAA,gBAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,cAAA,CAAA,gBAAA,CAAA,cAAA,CAAA,WAAA,CAAA,oBAAA,CAAA,QAAA,CAAA,cAAA,CAAA,YAAA,CAAA,gBAAA,CAAA,eAAA,CAAA,SAAA,CAAA,CAcA,IAAMA,eAAe,CAAGC,MAAM,CAACC,QAAQ,CAACC,uBAAuB,CAACC,SAAS,CAAC,CAAC,CAEzE,SAACC,KAAK,CAAK,CACX,IAAMC,oBAAoB,CAAGC,cAAc,CAACF,KAAK,CAAC,CAElD,OAAAG,MAAA,CAAAC,MAAA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S,CAAEA,SAAU,CACrBC,gBAAgB,CAAEA,gBAAiB,CACnCC,mBAAmB,CAAEA,mBAAoB,CACzCC,iBAAiB,CAAEA,iBAAkB,CACrCC,kBAAkB,CAAEA,kBAAmB,CACvCC,WAAW,CAAEA,WAAY,CACzBC,QAAQ,CAAEA,QAAS,CACnBC,sBAAsB,CAAEA,sBAAuB,CAC/CC,kBAAkB,CAAEA,kBAAmB,CACvCC,oBAAoB,CAAEA,oBAAqB,CAC3CC,oBAAoB,CAAEA,oBAAqB,CAC3CC,cAAc,CAAEA,cAAe,CAC/BC,gBAAgB,CAAEA,gBAAiB,CACnCC,gBAAgB,CAAEA,gBAAiB,CACnCC,WAAW,CAAEA,WAAY,CACzBC,YAAY,CAAEA,YAAa,CAC3BC,cAAc,CAAEA,cAAe,CAC/BC,YAAY,CAAEA,YAAa,CAC3BG,MAAM,CAAEA,MAAO,CAAAtB,QAAA,CAEd,SAAAA,SAAAqD,KAAA,CAAkC,KAA/BC,OAAO,CAAAD,KAAA,CAAPC,OAAO,CACTpB,SAAS,CAACU,KAAK,CAAGU,OAAO,CACzB,OAAOtD,SAAQ,CACjB,CAAC,CACc,CAAA,CAAC,CAEtB,CAAC,CAEK,IAAAuD,gBAAgB,CAAGC,wBAAwB,CAACC,cAAK,CAACC,UAAU,CAAChE,iBAAiB,CAAC,CAAE,CACrFiE,WAAW,CAAE,kBACf,CAAC;;;;"}
@@ -0,0 +1,7 @@
1
+ import { throwBladeError } from '../../utils/logger/logger.js';
2
+ import { jsx, Fragment } from 'react/jsx-runtime';
3
+
4
+ var ButtonGroup=function ButtonGroup(_props){throwBladeError({message:'ButtonGroup is not yet implemented for React Native',moduleName:'ButtonGroup'});return jsx(Fragment,{});};
5
+
6
+ export { ButtonGroup };
7
+ //# sourceMappingURL=ButtonGroup.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroup.native.js","sources":["../../../../../src/components/ButtonGroup/ButtonGroup.native.tsx"],"sourcesContent":["import type { ButtonGroupProps } from './types';\nimport { throwBladeError } from '~utils/logger';\n\nconst ButtonGroup = (_props: ButtonGroupProps): React.ReactElement => {\n throwBladeError({\n message: 'ButtonGroup is not yet implemented for React Native',\n moduleName: 'ButtonGroup',\n });\n\n // eslint-disable-next-line react/jsx-no-useless-fragment\n return <></>;\n};\n\nexport { ButtonGroup };\n"],"names":["ButtonGroup","_props","throwBladeError","message","moduleName","_jsx","_Fragment"],"mappings":";;;AAGM,IAAAA,WAAW,CAAG,SAAdA,WAAWA,CAAIC,MAAwB,CAAyB,CACpEC,eAAe,CAAC,CACdC,OAAO,CAAE,qDAAqD,CAC9DC,UAAU,CAAE,aACd,CAAC,CAAC,CAGF,OAAOC,GAAA,CAAAC,QAAA,CAAA,EAAI,CAAC,CACd;;;;"}
@@ -0,0 +1,6 @@
1
+ import React__default from 'react';
2
+
3
+ var ButtonGroupContext=React__default.createContext({});ButtonGroupContext.Provider;var useButtonGroupContext=function useButtonGroupContext(){var context=React__default.useContext(ButtonGroupContext);return context;};
4
+
5
+ export { useButtonGroupContext };
6
+ //# sourceMappingURL=ButtonGroupContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ButtonGroupContext.js","sources":["../../../../../src/components/ButtonGroup/ButtonGroupContext.tsx"],"sourcesContent":["import React from 'react';\nimport type { ButtonGroupContextType } from './types';\n\nconst ButtonGroupContext = React.createContext<ButtonGroupContextType>({});\nconst ButtonGroupProvider = ButtonGroupContext.Provider;\n\nconst useButtonGroupContext = (): ButtonGroupContextType => {\n const context = React.useContext(ButtonGroupContext);\n return context;\n};\n\nexport { useButtonGroupContext, ButtonGroupProvider };\n"],"names":["ButtonGroupContext","React","createContext","Provider","useButtonGroupContext","context","useContext"],"mappings":";;AAGA,IAAMA,kBAAkB,CAAGC,cAAK,CAACC,aAAa,CAAyB,EAAE,CAAC,CAC9CF,kBAAkB,CAACG,SAEzC,IAAAC,qBAAqB,CAAG,SAAxBA,qBAAqBA,EAAiC,CAC1D,IAAMC,OAAO,CAAGJ,cAAK,CAACK,UAAU,CAACN,kBAAkB,CAAC,CACpD,OAAOK,OAAO,CAChB;;;;"}
@@ -16,6 +16,7 @@ export { BreadcrumbItem } from './Breadcrumb/BreadcrumbItem.native.js';
16
16
  export { Box } from './Box/Box.js';
17
17
  export { default as Button } from './Button/Button/Button.js';
18
18
  export { IconButton } from './Button/IconButton/IconButton.js';
19
+ export { ButtonGroup } from './ButtonGroup/ButtonGroup.native.js';
19
20
  export { Card, CardBody, ComponentIds } from './Card/Card.js';
20
21
  export { CardHeader, CardHeaderAmount, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing } from './Card/CardHeader.js';
21
22
  export { CardFooter, CardFooterLeading, CardFooterTrailing } from './Card/CardFooter.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',Carousel:'carousel',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',OTPInput:'otp-input',PasswordInput:'password-input',TextArea:'textarea',TextInput:'textinput',Toast:'toast',ToastContainer:'toast-container',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton'};
1
+ var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',AccordionItemHeader:'accordion-item-header',AccordionItemBody:'accordion-item-body',ActionList:'action-list',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',AutoComplete:'autocomplete',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',ButtonGroup:'button-group',Breadcrumb:'breadcrumb',BreadcrumbItem:'breadcrumb-item',Carousel:'carousel',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Chip:'chip',ChipGroup:'chip-group',ChipLabel:'chip-label',Code:'code',Component:'blade-component',Counter:'counter',Display:'display',Divider:'divider',Drawer:'drawer',Dropdown:'dropdown',DropdownOverlay:'dropdown-overlay',DropdownFooter:'dropdown-footer',DropdownHeader:'dropdown-header',FileUpload:'file-upload',FileUploadItem:'file-upload-item',FileUploadLabel:'file-upload-label',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',ListItemCode:'list-item-code',ListItemLink:'list-item-link',ListItemText:'list-item-text',OTPInput:'otp-input',PasswordInput:'password-input',TextArea:'textarea',TextInput:'textinput',Toast:'toast',ToastContainer:'toast-container',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tag:'tag',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',Tabs:'tabs',TabList:'tab-list',TabItem:'tab-item',TabPanel:'tab-panel',TabIndicator:'tab-indicator',Table:'table',TableBody:'table-body',TableRow:'table-row',TableCell:'table-cell',TableHeader:'table-header',TableHeaderRow:'table-header-row',TableHeaderCell:'table-header-cell',TableFooter:'table-footer',TableFooterRow:'table-footer-row',TableFooterCell:'table-footer-cell',TableElement:'table-element',TourPopover:'tour-popover',TourMask:'tour-mask',Popover:'popover',PopoverInteractiveWrapper:'popover-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input',Skeleton:'skeleton'};
2
2
 
3
3
  export { MetaConstants };
4
4
  //# sourceMappingURL=metaConstants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Badge","Box","BaseBox","BaseText","Button","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","TextArea","TextInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,KAAK,CAAE,OAAO,CACdC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,QAAQ,CAChBC,UAAU,CAAE,YAAY,CACxBC,cAAc,CAAE,iBAAiB,CACjCC,QAAQ,CAAE,UAAU,CACpBC,QAAQ,CAAE,UAAU,CACpBC,aAAa,CAAE,gBAAgB,CAC/BC,aAAa,CAAE,gBAAgB,CAC/BC,IAAI,C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Y,CACvBC,QAAQ,CAAE,WAAW,CACrBC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,cAAc,CAAE,kBAAkB,CAClCC,eAAe,CAAE,mBAAmB,CACpCC,WAAW,CAAE,cAAc,CAC3BC,cAAc,CAAE,kBAAkB,CAClCC,eAAe,CAAE,mBAAmB,CACpCC,YAAY,CAAE,eAAe,CAC7BC,WAAW,CAAE,cAAc,CAC3BC,QAAQ,CAAE,WAAW,CACrBC,OAAO,CAAE,SAAS,CAClBC,yBAAyB,CAAE,6BAA6B,CACxDC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,iBAAiB,CAAE,qBAAqB,CACxCC,iBAAiB,CAAE,qBAAqB,CACxCC,qBAAqB,CAAE,yBAAyB,CAChDC,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,WAAW,CACrBC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,aAAa,CAC1BC,eAAe,CAAE,kBAAkB,CACnCC,iBAAiB,CAAE,oBAAoB,CACvCC,eAAe,CAAE,kBAAkB,CACnCC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UACZ;;;;"}
1
+ {"version":3,"file":"metaConstants.js","sources":["../../../../../src/utils/metaAttribute/metaConstants.ts"],"sourcesContent":["export const MetaConstants = {\n Accordion: 'accordion',\n AccordionButton: 'accordion-button',\n AccordionItem: 'accordion-item',\n AccordionItemHeader: 'accordion-item-header',\n AccordionItemBody: 'accordion-item-body',\n ActionList: 'action-list',\n ActionListItem: 'action-list-item',\n ActionListSection: 'action-list-section',\n Alert: 'alert',\n Amount: 'amount',\n AutoComplete: 'autocomplete',\n Badge: 'badge',\n Box: 'box',\n BaseBox: 'base-box',\n BaseText: 'base-text',\n Button: 'button',\n ButtonGroup: 'button-group',\n Breadcrumb: 'breadcrumb',\n BreadcrumbItem: 'breadcrumb-item',\n Carousel: 'carousel',\n Checkbox: 'checkbox',\n CheckboxGroup: 'checkbox-group',\n CheckboxLabel: 'checkbox-label',\n Chip: 'chip',\n ChipGroup: 'chip-group',\n ChipLabel: 'chip-label',\n Code: 'code',\n Component: 'blade-component',\n Counter: 'counter',\n Display: 'display',\n Divider: 'divider',\n Drawer: 'drawer',\n Dropdown: 'dropdown',\n DropdownOverlay: 'dropdown-overlay',\n DropdownFooter: 'dropdown-footer',\n DropdownHeader: 'dropdown-header',\n FileUpload: 'file-upload',\n FileUploadItem: 'file-upload-item',\n FileUploadLabel: 'file-upload-label',\n Icon: 'icon',\n IconButton: 'icon-button',\n Indicator: 'indicator',\n Link: 'link',\n List: 'list',\n ListItem: 'list-item',\n ListItemCode: 'list-item-code',\n ListItemLink: 'list-item-link',\n ListItemText: 'list-item-text',\n OTPInput: 'otp-input',\n PasswordInput: 'password-input',\n TextArea: 'textarea',\n TextInput: 'textinput',\n Toast: 'toast',\n ToastContainer: 'toast-container',\n ProgressBar: 'progress-bar',\n Radio: 'radio',\n RadioGroup: 'radio-group',\n RadioLabel: 'radio-label',\n SkipNav: 'skipnav',\n Spinner: 'spinner',\n SelectInput: 'select-input',\n Tag: 'tag',\n Tooltip: 'tooltip',\n TooltipInteractiveWrapper: 'tooltip-interactive-wrapper',\n Tabs: 'tabs',\n TabList: 'tab-list',\n TabItem: 'tab-item',\n TabPanel: 'tab-panel',\n TabIndicator: 'tab-indicator',\n Table: 'table',\n TableBody: 'table-body',\n TableRow: 'table-row',\n TableCell: 'table-cell',\n TableHeader: 'table-header',\n TableHeaderRow: 'table-header-row',\n TableHeaderCell: 'table-header-cell',\n TableFooter: 'table-footer',\n TableFooterRow: 'table-footer-row',\n TableFooterCell: 'table-footer-cell',\n TableElement: 'table-element',\n TourPopover: 'tour-popover',\n TourMask: 'tour-mask',\n Popover: 'popover',\n PopoverInteractiveWrapper: 'popover-interactive-wrapper',\n BottomSheet: 'bottom-sheet',\n BottomSheetBody: 'bottom-sheet-body',\n BottomSheetHeader: 'bottom-sheet-header',\n BottomSheetFooter: 'bottom-sheet-footer',\n BottomSheetGrabHandle: 'bottomsheet-grab-handle',\n Card: 'card',\n CardBody: 'card-body',\n CardHeader: 'card-header',\n CardFooter: 'card-footer',\n Collapsible: 'collapsible',\n CollapsibleBody: 'collapsible-body',\n CollapsibleButton: 'collapsible-button',\n CollapsibleLink: 'collapsible-link',\n Modal: 'modal',\n ModalBody: 'modal-body',\n ModalHeader: 'modal-header',\n ModalFooter: 'modal-footer',\n ModalBackdrop: 'modal-backdrop',\n ModalScrollOverlay: 'modal-scroll-overlay',\n VisuallyHidden: 'visually-hidden',\n FormLabel: 'form-label',\n Switch: 'switch',\n SwitchLabel: 'switch-label',\n StyledBaseInput: 'styled-base-input',\n Skeleton: 'skeleton',\n} as const;\n"],"names":["MetaConstants","Accordion","AccordionButton","AccordionItem","AccordionItemHeader","AccordionItemBody","ActionList","ActionListItem","ActionListSection","Alert","Amount","AutoComplete","Badge","Box","BaseBox","BaseText","Button","ButtonGroup","Breadcrumb","BreadcrumbItem","Carousel","Checkbox","CheckboxGroup","CheckboxLabel","Chip","ChipGroup","ChipLabel","Code","Component","Counter","Display","Divider","Drawer","Dropdown","DropdownOverlay","DropdownFooter","DropdownHeader","FileUpload","FileUploadItem","FileUploadLabel","Icon","IconButton","Indicator","Link","List","ListItem","ListItemCode","ListItemLink","ListItemText","OTPInput","PasswordInput","TextArea","TextInput","Toast","ToastContainer","ProgressBar","Radio","RadioGroup","RadioLabel","SkipNav","Spinner","SelectInput","Tag","Tooltip","TooltipInteractiveWrapper","Tabs","TabList","TabItem","TabPanel","TabIndicator","Table","TableBody","TableRow","TableCell","TableHeader","TableHeaderRow","TableHeaderCell","TableFooter","TableFooterRow","TableFooterCell","TableElement","TourPopover","TourMask","Popover","PopoverInteractiveWrapper","BottomSheet","BottomSheetBody","BottomSheetHeader","BottomSheetFooter","BottomSheetGrabHandle","Card","CardBody","CardHeader","CardFooter","Collapsible","CollapsibleBody","CollapsibleButton","CollapsibleLink","Modal","ModalBody","ModalHeader","ModalFooter","ModalBackdrop","ModalScrollOverlay","VisuallyHidden","FormLabel","Switch","SwitchLabel","StyledBaseInput","Skeleton"],"mappings":"AAAa,IAAAA,aAAa,CAAG,CAC3BC,SAAS,CAAE,WAAW,CACtBC,eAAe,CAAE,kBAAkB,CACnCC,aAAa,CAAE,gBAAgB,CAC/BC,mBAAmB,CAAE,uBAAuB,CAC5CC,iBAAiB,CAAE,qBAAqB,CACxCC,UAAU,CAAE,aAAa,CACzBC,cAAc,CAAE,kBAAkB,CAClCC,iBAAiB,CAAE,qBAAqB,CACxCC,KAAK,CAAE,OAAO,CACdC,MAAM,CAAE,QAAQ,CAChBC,YAAY,CAAE,cAAc,CAC5BC,KAAK,CAAE,OAAO,CACdC,GAAG,CAAE,KAAK,CACVC,OAAO,CAAE,UAAU,CACnBC,QAAQ,CAAE,WAAW,CACrBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,UAAU,CAAE,YAAY,CACxBC,cAAc,CAAE,iBAAiB,CACjCC,QAAQ,CAAE,UAAU,CACpBC,QAAQ,CAAE,UAAU,CACpBC,aAAa,CAAE,gBAAgB,CAC/BC,aAAa,CAAE,gBAAgB,CAC/BC,IAAI,CAAE,MAAM,CACZC,SAAS,CAAE,YAAY,CACvBC,SAAS,CAAE,YAAY,CACvBC,IAAI,CAAE,MAAM,CACZC,SAAS,CAAE,iBAAiB,CAC5BC,OAAO,CAAE,SAAS,CAClBC,OAAO,CAAE,SAAS,CAClBC,OAAO,CAAE,SAAS,CAClBC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C,eAAe,CAAE,mBAAmB,CACpCC,YAAY,CAAE,eAAe,CAC7BC,WAAW,CAAE,cAAc,CAC3BC,QAAQ,CAAE,WAAW,CACrBC,OAAO,CAAE,SAAS,CAClBC,yBAAyB,CAAE,6BAA6B,CACxDC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,iBAAiB,CAAE,qBAAqB,CACxCC,iBAAiB,CAAE,qBAAqB,CACxCC,qBAAqB,CAAE,yBAAyB,CAChDC,IAAI,CAAE,MAAM,CACZC,QAAQ,CAAE,WAAW,CACrBC,UAAU,CAAE,aAAa,CACzBC,UAAU,CAAE,aAAa,CACzBC,WAAW,CAAE,aAAa,CAC1BC,eAAe,CAAE,kBAAkB,CACnCC,iBAAiB,CAAE,oBAAoB,CACvCC,eAAe,CAAE,kBAAkB,CACnCC,KAAK,CAAE,OAAO,CACdC,SAAS,CAAE,YAAY,CACvBC,WAAW,CAAE,cAAc,CAC3BC,WAAW,CAAE,cAAc,CAC3BC,aAAa,CAAE,gBAAgB,CAC/BC,kBAAkB,CAAE,sBAAsB,CAC1CC,cAAc,CAAE,iBAAiB,CACjCC,SAAS,CAAE,YAAY,CACvBC,MAAM,CAAE,QAAQ,CAChBC,WAAW,CAAE,cAAc,CAC3BC,eAAe,CAAE,mBAAmB,CACpCC,QAAQ,CAAE,UACZ;;;;"}
@@ -0,0 +1,18 @@
1
+ import styled from 'styled-components';
2
+ import getIn from '../../../utils/lodashButBetter/get.js';
3
+ import '../../Box/BaseBox/index.js';
4
+ import { BaseBox } from '../../Box/BaseBox/BaseBox.web.js';
5
+
6
+ var AnimatedButtonContent = /*#__PURE__*/styled(BaseBox).withConfig({
7
+ displayName: "AnimatedButtonContentweb__AnimatedButtonContent",
8
+ componentId: "sc-1fkx0t6-0"
9
+ })(function (props) {
10
+ return {
11
+ transform: "scale(".concat(props.isPressed ? '0.95' : '1', ")"),
12
+ transitionDuration: getIn(props.theme.motion, props.motionEasing),
13
+ transitionTimingFunction: getIn(props.theme.motion, props.motionDuration)
14
+ };
15
+ });
16
+
17
+ export { AnimatedButtonContent as default };
18
+ //# sourceMappingURL=AnimatedButtonContent.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnimatedButtonContent.web.js","sources":["../../../../../../../src/components/Button/BaseButton/AnimatedButtonContent.web.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport type { AnimatedButtonContentProps } from './types';\nimport getIn from '~utils/lodashButBetter/get';\nimport BaseBox from '~components/Box/BaseBox';\n\nconst AnimatedButtonContent = styled(BaseBox)<AnimatedButtonContentProps>((props) => {\n return {\n transform: `scale(${props.isPressed ? '0.95' : '1'})`,\n transitionDuration: getIn(props.theme.motion, props.motionEasing),\n transitionTimingFunction: getIn(props.theme.motion, props.motionDuration),\n };\n});\n\nexport default AnimatedButtonContent;\n"],"names":["AnimatedButtonContent","styled","BaseBox","withConfig","displayName","componentId","props","transform","concat","isPressed","transitionDuration","getIn","theme","motion","motionEasing","transitionTimingFunction","motionDuration"],"mappings":";;;;;AAKA,IAAMA,qBAAqB,gBAAGC,MAAM,CAACC,OAAO,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,iDAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAA6B,CAAA,CAAA,UAACC,KAAK,EAAK;EACnF,OAAO;IACLC,SAAS,EAAA,QAAA,CAAAC,MAAA,CAAWF,KAAK,CAACG,SAAS,GAAG,MAAM,GAAG,GAAG,EAAG,GAAA,CAAA;AACrDC,IAAAA,kBAAkB,EAAEC,KAAK,CAACL,KAAK,CAACM,KAAK,CAACC,MAAM,EAAEP,KAAK,CAACQ,YAAY,CAAC;IACjEC,wBAAwB,EAAEJ,KAAK,CAACL,KAAK,CAACM,KAAK,CAACC,MAAM,EAAEP,KAAK,CAACU,cAAc,CAAA;GACzE,CAAA;AACH,CAAC;;;;"}