@razorpay/blade 5.0.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/build/components/index.d.ts +10 -6
- package/build/components/index.native.d.ts +10 -6
- package/build/components/index.native.js +8 -6
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +56 -32
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @razorpay/blade
|
|
2
2
|
|
|
3
|
+
## 5.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5a6b980: feat: add Mail icon
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d4b981e: fix: show `Spinner` on `TextInput` when `isLoading=true`
|
|
14
|
+
- Adds spinner when `isLoading: true` is passed to `TextInput`. This was a long pending TODO
|
|
15
|
+
- Update Spinner sizes after the design was updated \* This doesn't need any code mod since there are 9 instances of spinner being used with default variant i.e medium
|
|
16
|
+
|
|
3
17
|
## 5.0.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -1368,6 +1368,8 @@ declare const HelpCircleIcon: IconComponent;
|
|
|
1368
1368
|
|
|
1369
1369
|
declare const ExternalLinkIcon: IconComponent;
|
|
1370
1370
|
|
|
1371
|
+
declare const MailIcon: IconComponent;
|
|
1372
|
+
|
|
1371
1373
|
declare type FeedbackIconColors = `feedback.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback']['icon']>}`;
|
|
1372
1374
|
declare type FeedbackActionIconColors = `feedback.${Feedback}.action.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback'][Feedback]['action']['icon']>}`;
|
|
1373
1375
|
declare type ActionIconColors = `action.icon.${DotNotationColorStringToken<Theme$1['colors']['action']['icon']>}`;
|
|
@@ -1896,7 +1898,8 @@ declare type RadioGroupProps = {
|
|
|
1896
1898
|
};
|
|
1897
1899
|
declare const RadioGroup: ({ children, label, helpText, isDisabled, necessityIndicator, labelPosition, validationState, errorText, name, defaultValue, onChange, value, size, }: RadioGroupProps) => React__default.ReactElement;
|
|
1898
1900
|
|
|
1899
|
-
declare type
|
|
1901
|
+
declare type BaseSpinnerProps = {
|
|
1902
|
+
intent?: Feedback;
|
|
1900
1903
|
/**
|
|
1901
1904
|
* Sets the label of the spinner.
|
|
1902
1905
|
*
|
|
@@ -1919,14 +1922,15 @@ declare type SpinnerProps = {
|
|
|
1919
1922
|
*
|
|
1920
1923
|
* @default 'medium'
|
|
1921
1924
|
*/
|
|
1922
|
-
size?: '
|
|
1925
|
+
size?: 'medium' | 'large' | 'xlarge';
|
|
1923
1926
|
/**
|
|
1924
|
-
* Sets the aria-label for web & accessibilityLabel
|
|
1927
|
+
* Sets the aria-label for web & accessibilityLabel react-native.
|
|
1925
1928
|
*
|
|
1926
|
-
* @default 'Loading'
|
|
1927
1929
|
*/
|
|
1928
|
-
accessibilityLabel
|
|
1930
|
+
accessibilityLabel: string;
|
|
1929
1931
|
};
|
|
1932
|
+
|
|
1933
|
+
declare type SpinnerProps = Omit<BaseSpinnerProps, 'intent'>;
|
|
1930
1934
|
declare const Spinner: ({ label, labelPosition, accessibilityLabel, contrast, size, }: SpinnerProps) => React.ReactElement;
|
|
1931
1935
|
|
|
1932
1936
|
declare type SkipNavLinkProps = {
|
|
@@ -2094,4 +2098,4 @@ declare const VisuallyHidden: ({ children }: VisuallyHiddenProps) => JSX.Element
|
|
|
2094
2098
|
|
|
2095
2099
|
declare const screenReaderStyles: CSSObject;
|
|
2096
2100
|
|
|
2097
|
-
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, CodeProps, Counter, CounterProps, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HeadingProps, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconComponent, IconProps, IconSize, Indicator, IndicatorProps, InfoIcon, Link, LinkIcon, LinkProps, LockIcon, MinusIcon, OTPInput, OTPInputProps, PasswordInput, PasswordInputProps, PauseIcon, PlusIcon, Radio, RadioGroup, RadioGroupProps, RadioProps, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, SpinnerProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, Title, TitleProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, VisuallyHiddenProps, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
2101
|
+
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, CodeProps, Counter, CounterProps, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HeadingProps, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconComponent, IconProps, IconSize, Indicator, IndicatorProps, InfoIcon, Link, LinkIcon, LinkProps, LockIcon, MailIcon, MinusIcon, OTPInput, OTPInputProps, PasswordInput, PasswordInputProps, PauseIcon, PlusIcon, Radio, RadioGroup, RadioGroupProps, RadioProps, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, SpinnerProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, Title, TitleProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, VisuallyHiddenProps, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
@@ -1368,6 +1368,8 @@ declare const HelpCircleIcon: IconComponent;
|
|
|
1368
1368
|
|
|
1369
1369
|
declare const ExternalLinkIcon: IconComponent;
|
|
1370
1370
|
|
|
1371
|
+
declare const MailIcon: IconComponent;
|
|
1372
|
+
|
|
1371
1373
|
declare type FeedbackIconColors = `feedback.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback']['icon']>}`;
|
|
1372
1374
|
declare type FeedbackActionIconColors = `feedback.${Feedback}.action.icon.${DotNotationColorStringToken<Theme$1['colors']['feedback'][Feedback]['action']['icon']>}`;
|
|
1373
1375
|
declare type ActionIconColors = `action.icon.${DotNotationColorStringToken<Theme$1['colors']['action']['icon']>}`;
|
|
@@ -1887,7 +1889,8 @@ declare type RadioGroupProps = {
|
|
|
1887
1889
|
};
|
|
1888
1890
|
declare const RadioGroup: ({ children, label, helpText, isDisabled, necessityIndicator, labelPosition, validationState, errorText, name, defaultValue, onChange, value, size, }: RadioGroupProps) => React__default.ReactElement;
|
|
1889
1891
|
|
|
1890
|
-
declare type
|
|
1892
|
+
declare type BaseSpinnerProps = {
|
|
1893
|
+
intent?: Feedback;
|
|
1891
1894
|
/**
|
|
1892
1895
|
* Sets the label of the spinner.
|
|
1893
1896
|
*
|
|
@@ -1910,14 +1913,15 @@ declare type SpinnerProps = {
|
|
|
1910
1913
|
*
|
|
1911
1914
|
* @default 'medium'
|
|
1912
1915
|
*/
|
|
1913
|
-
size?: '
|
|
1916
|
+
size?: 'medium' | 'large' | 'xlarge';
|
|
1914
1917
|
/**
|
|
1915
|
-
* Sets the aria-label for web & accessibilityLabel
|
|
1918
|
+
* Sets the aria-label for web & accessibilityLabel react-native.
|
|
1916
1919
|
*
|
|
1917
|
-
* @default 'Loading'
|
|
1918
1920
|
*/
|
|
1919
|
-
accessibilityLabel
|
|
1921
|
+
accessibilityLabel: string;
|
|
1920
1922
|
};
|
|
1923
|
+
|
|
1924
|
+
declare type SpinnerProps = Omit<BaseSpinnerProps, 'intent'>;
|
|
1921
1925
|
declare const Spinner: ({ label, labelPosition, accessibilityLabel, contrast, size, }: SpinnerProps) => React.ReactElement;
|
|
1922
1926
|
|
|
1923
1927
|
declare type SkipNavLinkProps = {
|
|
@@ -2082,4 +2086,4 @@ declare const VisuallyHidden: ({ children }: VisuallyHiddenProps) => JSX.Element
|
|
|
2082
2086
|
|
|
2083
2087
|
declare const screenReaderStyles: CSSObject;
|
|
2084
2088
|
|
|
2085
|
-
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, CodeProps, Counter, CounterProps, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HeadingProps, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconComponent, IconProps, IconSize, Indicator, IndicatorProps, InfoIcon, Link, LinkIcon, LinkProps, LockIcon, MinusIcon, OTPInput, OTPInputProps, PasswordInput, PasswordInputProps, PauseIcon, PlusIcon, Radio, RadioGroup, RadioGroupProps, RadioProps, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, SpinnerProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, Title, TitleProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, VisuallyHiddenProps, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
2089
|
+
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, CheckboxGroupProps, CheckboxProps, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, CodeProps, Counter, CounterProps, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HeadingProps, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, IconButtonProps, IconComponent, IconProps, IconSize, Indicator, IndicatorProps, InfoIcon, Link, LinkIcon, LinkProps, LockIcon, MailIcon, MinusIcon, OTPInput, OTPInputProps, PasswordInput, PasswordInputProps, PauseIcon, PlusIcon, Radio, RadioGroup, RadioGroupProps, RadioProps, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, SpinnerProps, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, TextVariant, Theme, Title, TitleProps, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, VisuallyHiddenProps, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
@@ -3317,6 +3317,8 @@ var HelpCircleIcon=function HelpCircleIcon(_ref){var size=_ref.size,color=_ref.c
|
|
|
3317
3317
|
|
|
3318
3318
|
var ExternalLinkIcon=function ExternalLinkIcon(_ref){var size=_ref.size,color=_ref.color;var _useIconProps=useIconProps({size:size,color:color}),height=_useIconProps.height,width=_useIconProps.width,iconColor=_useIconProps.iconColor;return jsxs(Svg,{height:height,width:width,viewBox:"0 0 24 24",fill:"none",children:[jsx(Path,{d:"M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L18.5858 4H15C14.4477 4 14 3.55228 14 3Z",fill:iconColor}),jsx(Path,{d:"M5 7C4.44772 7 4 7.44772 4 8V19C4 19.5523 4.44772 20 5 20H16C16.5523 20 17 19.5523 17 19V13C17 12.4477 17.4477 12 18 12C18.5523 12 19 12.4477 19 13V19C19 20.6569 17.6569 22 16 22H5C3.34315 22 2 20.6569 2 19V8C2 6.34315 3.34315 5 5 5H11C11.5523 5 12 5.44772 12 6C12 6.55228 11.5523 7 11 7H5Z",fill:iconColor})]});};
|
|
3319
3319
|
|
|
3320
|
+
var MailIcon=function MailIcon(_ref){var size=_ref.size,color=_ref.color;var _useIconProps=useIconProps({size:size,color:color}),height=_useIconProps.height,width=_useIconProps.width,iconColor=_useIconProps.iconColor;return jsx(Svg,{width:width,height:height,viewBox:"0 0 24 24",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M23 6.01769V18C23 19.6523 21.6523 21 20 21H4C2.34772 21 1 19.6523 1 18V6C1 4.34772 2.34772 3 4 3H20C21.6443 3 22.987 4.33473 22.9999 5.97608C23.0002 5.98996 23.0003 6.00383 23 6.01769ZM3.10659 5.55392C3.27198 5.22691 3.61205 5 4 5H20C20.388 5 20.7281 5.22695 20.8935 5.55401L12.0001 11.7794L3.10659 5.55392ZM3 7.92062V18C3 18.5477 3.45228 19 4 19H20C20.5477 19 21 18.5477 21 18V7.92074L12.5735 13.8193C12.2292 14.0603 11.7709 14.0603 11.4266 13.8193L3 7.92062Z",fill:iconColor})});};
|
|
3321
|
+
|
|
3320
3322
|
var StyledPressable$1=styled.Pressable({alignSelf:'center'});var StyledIconButton=function StyledIconButton(_ref){var Icon=_ref.icon,onClick=_ref.onClick,size=_ref.size,contrast=_ref.contrast,accessibilityLabel=_ref.accessibilityLabel;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isPressed=_useState2[0],setIsPressed=_useState2[1];var getIconColorToken=function getIconColorToken(){var contrastType=contrast==='high'?'highContrast':'lowContrast';var state=isPressed?'active':'default';return "surface.action.icon."+state+"."+contrastType;};var iconColorToken=getIconColorToken();return jsx(StyledPressable$1,_extends({contrast:contrast,onPress:onClick,onPressIn:function onPressIn(){return setIsPressed(true);},onPressOut:function onPressOut(){return setIsPressed(false);}},makeAccessible({label:accessibilityLabel,role:'button'}),{children:jsx(Icon,{size:size,color:iconColorToken})}));};
|
|
3321
3323
|
|
|
3322
3324
|
var IconButton=function IconButton(_ref){var icon=_ref.icon,onClick=_ref.onClick,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,accessibilityLabel=_ref.accessibilityLabel;return jsx(StyledIconButton,{onClick:onClick,contrast:contrast,size:size,icon:icon,accessibilityLabel:accessibilityLabel});};
|
|
@@ -3341,11 +3343,11 @@ var getBaseButtonStyles=function getBaseButtonStyles(_ref){var defaultBorderColo
|
|
|
3341
3343
|
|
|
3342
3344
|
var StyledPressable=styled(Animated.createAnimatedComponent(Pressable))(function(props){return _extends({},getBaseButtonStyles(props),{alignSelf:'center'});});var StyledBaseButton=function StyledBaseButton(_ref){var onClick=_ref.onClick,_children=_ref.children,minHeight=_ref.minHeight,buttonPaddingTop=_ref.buttonPaddingTop,buttonPaddingBottom=_ref.buttonPaddingBottom,buttonPaddingLeft=_ref.buttonPaddingLeft,buttonPaddingRight=_ref.buttonPaddingRight,isFullWidth=_ref.isFullWidth,disabled=_ref.disabled,defaultBackgroundColor=_ref.defaultBackgroundColor,defaultBorderColor=_ref.defaultBorderColor,hoverBackgroundColor=_ref.hoverBackgroundColor,activeBackgroundColor=_ref.activeBackgroundColor,focusBackgroundColor=_ref.focusBackgroundColor,focusRingColor=_ref.focusRingColor,hoverBorderColor=_ref.hoverBorderColor,activeBorderColor=_ref.activeBorderColor,focusBorderColor=_ref.focusBorderColor,borderWidth=_ref.borderWidth,borderRadius=_ref.borderRadius,motionDuration=_ref.motionDuration,motionEasing=_ref.motionEasing,isLoading=_ref.isLoading,accessibilityProps=_ref.accessibilityProps;var _useTheme=useTheme(),theme=_useTheme.theme;var isPressed=useSharedValue(false);var duration=get_1(theme.motion,motionDuration);var easing=get_1(theme.motion,motionEasing);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,defaultBackgroundColor:defaultBackgroundColor,duration:duration,easing:easing,activeBorderColor:activeBorderColor,defaultBorderColor:defaultBorderColor};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,defaultBackgroundColor,duration,easing,activeBorderColor,defaultBorderColor}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor:defaultBackgroundColor,{duration:duration,easing:easing}),borderColor:withTiming(isPressed.value?activeBorderColor:defaultBorderColor,{duration:duration,easing:easing})};}}";_f.__workletHash=6870832376373;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Button/BaseButton/StyledBaseButton.native.tsx (46:42)";_f.__optimalization=2;global.__reanimatedWorkletInit(_f);return _f;}());return jsx(StyledPressable,_extends({},accessibilityProps,{isLoading:isLoading,onPress:onClick,style:animatedStyles,minHeight:minHeight,buttonPaddingTop:buttonPaddingTop,buttonPaddingBottom:buttonPaddingBottom,buttonPaddingLeft:buttonPaddingLeft,buttonPaddingRight:buttonPaddingRight,isFullWidth:isFullWidth,disabled:disabled,defaultBackgroundColor:defaultBackgroundColor,defaultBorderColor:defaultBorderColor,hoverBackgroundColor:hoverBackgroundColor,activeBackgroundColor:activeBackgroundColor,focusBackgroundColor:focusBackgroundColor,focusRingColor:focusRingColor,hoverBorderColor:hoverBorderColor,activeBorderColor:activeBorderColor,focusBorderColor:focusBorderColor,borderWidth:borderWidth,borderRadius:borderRadius,motionDuration:motionDuration,motionEasing:motionEasing,children:function children(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;return _children;}}));};
|
|
3343
3345
|
|
|
3344
|
-
var typography={fonts:{size:{xsmall:75,small:75,medium:100,large:200}},lineHeights:{xsmall:'s',small:'s',medium:'l',large:'m'}};var minHeight={xsmall:28,small:32,medium:36,large:48};var buttonPadding={xsmall:{top:0,bottom:0,left:3,right:3},small:{top:0,bottom:0,left:4,right:4},medium:{top:0,bottom:0,left:6,right:6},large:{top:0,bottom:0,left:6,right:6}};var buttonIconOnlyPadding={xsmall:{top:0,bottom:0,left:4,right:4},small:{top:0,bottom:0,left:3,right:3},medium:{top:0,bottom:0,left:3,right:3},large:{top:0,bottom:0,left:4,right:4}};var buttonSizeToIconSizeMap={xsmall:'small',small:'small',medium:'medium',large:'medium'};var buttonIconOnlySizeToIconSizeMap={xsmall:'medium',small:'medium',medium:'large',large:'xlarge'};var buttonSizeToSpinnerSizeMap={xsmall:'
|
|
3346
|
+
var typography={fonts:{size:{xsmall:75,small:75,medium:100,large:200}},lineHeights:{xsmall:'s',small:'s',medium:'l',large:'m'}};var minHeight={xsmall:28,small:32,medium:36,large:48};var buttonPadding={xsmall:{top:0,bottom:0,left:3,right:3},small:{top:0,bottom:0,left:4,right:4},medium:{top:0,bottom:0,left:6,right:6},large:{top:0,bottom:0,left:6,right:6}};var buttonIconOnlyPadding={xsmall:{top:0,bottom:0,left:4,right:4},small:{top:0,bottom:0,left:3,right:3},medium:{top:0,bottom:0,left:3,right:3},large:{top:0,bottom:0,left:4,right:4}};var buttonSizeToIconSizeMap={xsmall:'small',small:'small',medium:'medium',large:'medium'};var buttonIconOnlySizeToIconSizeMap={xsmall:'medium',small:'medium',medium:'large',large:'xlarge'};var buttonSizeToSpinnerSizeMap={xsmall:'medium',small:'large',medium:'large',large:'xlarge'};var textPadding={xsmall:2,small:2,medium:3,large:3};
|
|
3345
3347
|
|
|
3346
3348
|
function announce(message){AccessibilityInfo.announceForAccessibility(message);}function clearAnnouncer(_assertiveness){console.warn('[Blade LiveAnnouncer]: clearAnnouncer is not needed in react-native');}function destroyAnnouncer(){console.warn('[Blade LiveAnnouncer]: destroyAnnouncer is not needed in react-native');}
|
|
3347
3349
|
|
|
3348
|
-
var dimensions={
|
|
3350
|
+
var dimensions={medium:16,large:20,xlarge:24};var motion={duration:'duration.2xgentle',easing:'easing.standard.attentive'};
|
|
3349
3351
|
|
|
3350
3352
|
var SpinnerIcon=function SpinnerIcon(_ref){var dimensions=_ref.dimensions,color=_ref.color;return jsxs(Svg,{width:dimensions,height:dimensions,viewBox:"0 0 24 24",fill:"none",children:[jsx(Path,{fillOpacity:0.2,d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12Z",fill:color}),jsx(Path,{d:"M24 12C24 13.8937 23.5518 15.7606 22.6921 17.4479C21.8324 19.1352 20.5855 20.5951 19.0534 21.7082C17.5214 22.8213 15.7476 23.556 13.8772 23.8523C12.0068 24.1485 10.0928 23.9979 8.29181 23.4127L9.21886 20.5595C10.5696 20.9984 12.0051 21.1114 13.4079 20.8892C14.8107 20.667 16.141 20.116 17.2901 19.2812C18.4391 18.4463 19.3743 17.3514 20.0191 16.0859C20.6639 14.8204 21 13.4203 21 12H24Z",fill:color}),jsx(Path,{d:"M-1.33514e-05 12C-1.33514e-05 10.1063 0.448176 8.23944 1.30791 6.55211C2.16764 4.86479 3.41451 3.4049 4.94656 2.2918C6.47862 1.17869 8.25236 0.443983 10.1228 0.147739C11.9932 -0.148504 13.9072 0.00212896 15.7082 0.587322L14.7811 3.44049C13.4304 3.0016 11.9949 2.88862 10.5921 3.11081C9.18927 3.33299 7.85896 3.88402 6.70992 4.71885C5.56088 5.55367 4.62573 6.64859 3.98093 7.91409C3.33613 9.17958 2.99999 10.5797 2.99999 12H-1.33514e-05Z",fill:color})]});};
|
|
3351
3353
|
|
|
@@ -3471,7 +3473,9 @@ var autoCompleteSuggestionTypeValues=['none','name','email','username','password
|
|
|
3471
3473
|
|
|
3472
3474
|
var CharacterCounter=function CharacterCounter(_ref){var currentCount=_ref.currentCount,maxCount=_ref.maxCount;return jsxs(Text,{variant:"caption",weight:"regular",type:"muted",children:[currentCount,"/",maxCount]});};
|
|
3473
3475
|
|
|
3474
|
-
var
|
|
3476
|
+
var Spinner=function Spinner(_ref){var _ref2;var label=_ref.label,labelPosition=_ref.labelPosition,accessibilityLabel=_ref.accessibilityLabel,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size;return jsx(BaseSpinner,{label:label,labelPosition:labelPosition,accessibilityLabel:(_ref2=accessibilityLabel!=null?accessibilityLabel:label)!=null?_ref2:'Loading',contrast:contrast,size:size});};
|
|
3477
|
+
|
|
3478
|
+
var getKeyboardAndAutocompleteProps=function getKeyboardAndAutocompleteProps(_ref){var _ref$type=_ref.type,type=_ref$type===void 0?'text':_ref$type,keyboardReturnKeyType=_ref.keyboardReturnKeyType,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType;var keyboardAndAutocompleteProps={type:type,keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none'};var keyboardConfigMap={text:{keyboardType:'text',keyboardReturnKeyType:'default',autoCompleteSuggestionType:'none'},telephone:{keyboardType:'telephone',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'telephone'},email:{keyboardType:'email',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'email'},url:{keyboardType:'url',keyboardReturnKeyType:'go',autoCompleteSuggestionType:'none'},numeric:{keyboardType:'decimal',keyboardReturnKeyType:'done',autoCompleteSuggestionType:'none'},search:{keyboardType:'search',keyboardReturnKeyType:'search',autoCompleteSuggestionType:'none'}};var keyboardConfig=keyboardConfigMap[type];keyboardAndAutocompleteProps.keyboardType=keyboardConfig.keyboardType;keyboardAndAutocompleteProps.keyboardReturnKeyType=keyboardReturnKeyType!=null?keyboardReturnKeyType:keyboardConfig.keyboardReturnKeyType;keyboardAndAutocompleteProps.autoCompleteSuggestionType=autoCompleteSuggestionType!=null?autoCompleteSuggestionType:keyboardConfig.autoCompleteSuggestionType;if(type==='numeric'){keyboardAndAutocompleteProps.type='text';}if(type==='search'){keyboardAndAutocompleteProps.type='text';}return keyboardAndAutocompleteProps;};var isReactNative$2=function isReactNative(_textInputRef){return getPlatformType()==='react-native';};var TextInput=function TextInput(_ref2){var _Boolean;var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'top':_ref2$labelPosition,placeholder=_ref2.placeholder,_ref2$type=_ref2.type,type=_ref2$type===void 0?'text':_ref2$type,defaultValue=_ref2.defaultValue,name=_ref2.name,value=_ref2.value,maxCharacters=_ref2.maxCharacters,_onChange=_ref2.onChange,onBlur=_ref2.onBlur,isDisabled=_ref2.isDisabled,necessityIndicator=_ref2.necessityIndicator,validationState=_ref2.validationState,errorText=_ref2.errorText,helpText=_ref2.helpText,successText=_ref2.successText,isRequired=_ref2.isRequired,icon=_ref2.icon,prefix=_ref2.prefix,showClearButton=_ref2.showClearButton,onClearButtonClick=_ref2.onClearButtonClick,isLoading=_ref2.isLoading,suffix=_ref2.suffix,autoFocus=_ref2.autoFocus,keyboardReturnKeyType=_ref2.keyboardReturnKeyType,autoCompleteSuggestionType=_ref2.autoCompleteSuggestionType;var textInputRef=React__default.useRef(null);var _useState=useState((_Boolean=Boolean(defaultValue!=null?defaultValue:value))!=null?_Boolean:false),_useState2=_slicedToArray(_useState,2),shouldShowClearButton=_useState2[0],setShouldShowClearButton=_useState2[1];var renderInteractionElement=function renderInteractionElement(){if(isLoading){return jsx(Spinner,{accessibilityLabel:"Loading Content"});}if(shouldShowClearButton){return jsx(IconButton,{size:"medium",icon:CloseIcon,onClick:function onClick(){var _textInputRef$current;if(isEmpty_1(value)&&textInputRef.current){if(isReactNative$2(textInputRef.current)){textInputRef.current.clear();textInputRef.current.focus();}else if(textInputRef.current instanceof HTMLInputElement){textInputRef.current.value='';textInputRef.current.focus();}}onClearButtonClick==null?void 0:onClearButtonClick();textInputRef==null?void 0:(_textInputRef$current=textInputRef.current)==null?void 0:_textInputRef$current.focus();setShouldShowClearButton(false);},accessibilityLabel:"Clear Input Content"});}return null;};return jsx(BaseInput,_extends({id:"textinput",ref:textInputRef,label:label,labelPosition:labelPosition,placeholder:placeholder,defaultValue:defaultValue,value:value,name:name,maxCharacters:maxCharacters,onChange:function onChange(_ref3){var name=_ref3.name,value=_ref3.value;if(showClearButton&&value!=null&&value.length){setShouldShowClearButton(true);}if(shouldShowClearButton&&!(value!=null&&value.length)){setShouldShowClearButton(false);}_onChange==null?void 0:_onChange({name:name,value:value});},onBlur:onBlur,isDisabled:isDisabled,necessityIndicator:necessityIndicator,isRequired:isRequired,leadingIcon:icon,prefix:prefix,interactionElement:renderInteractionElement(),suffix:suffix,validationState:validationState,errorText:errorText,helpText:helpText,successText:successText,trailingFooterSlot:function trailingFooterSlot(value){var _value$length;return maxCharacters?jsx(Box,{marginTop:"spacing.2",marginRight:"spacing.1",children:jsx(CharacterCounter,{currentCount:(_value$length=value==null?void 0:value.length)!=null?_value$length:0,maxCount:maxCharacters})}):null;},autoFocus:autoFocus},getKeyboardAndAutocompleteProps({type:type,keyboardReturnKeyType:keyboardReturnKeyType,autoCompleteSuggestionType:autoCompleteSuggestionType})));};
|
|
3475
3479
|
|
|
3476
3480
|
var PasswordInput=function PasswordInput(_ref){var label=_ref.label,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$showRevealButton=_ref.showRevealButton,showRevealButton=_ref$showRevealButton===void 0?true:_ref$showRevealButton,maxCharacters=_ref.maxCharacters,validationState=_ref.validationState,errorText=_ref.errorText,successText=_ref.successText,helpText=_ref.helpText,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,defaultValue=_ref.defaultValue,placeholder=_ref.placeholder,_ref$isRequired=_ref.isRequired,isRequired=_ref$isRequired===void 0?false:_ref$isRequired,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,value=_ref.value,onChange=_ref.onChange,onFocus=_ref.onFocus,onBlur=_ref.onBlur,name=_ref.name,_ref$autoFocus=_ref.autoFocus,autoFocus=_ref$autoFocus===void 0?false:_ref$autoFocus,_ref$keyboardReturnKe=_ref.keyboardReturnKeyType,keyboardReturnKeyType=_ref$keyboardReturnKe===void 0?'done':_ref$keyboardReturnKe,autoCompleteSuggestionType=_ref.autoCompleteSuggestionType;var _useState=useState(false),_useState2=_slicedToArray(_useState,2),isRevealed=_useState2[0],setIsRevealed=_useState2[1];var isEnabled=!isDisabled;var isRevealedAndEnabled=isRevealed&&isEnabled;var toggleIsRevealed=function toggleIsRevealed(){return setIsRevealed(function(revealed){return !revealed;});};var accessibilityLabel=isRevealedAndEnabled?'Hide password':'Show password';var type=isRevealedAndEnabled?'text':'password';var revealButtonIcon=isRevealedAndEnabled?EyeOffIcon:EyeIcon;var revealButton=showRevealButton&&!isDisabled?jsx(IconButton,{size:"medium",icon:revealButtonIcon,onClick:toggleIsRevealed,accessibilityLabel:accessibilityLabel}):null;var trailingFooterSlot=function trailingFooterSlot(value){var _value$length;return maxCharacters?jsx(Box,{marginTop:"spacing.2",marginRight:"spacing.1",children:jsx(CharacterCounter,{currentCount:(_value$length=value==null?void 0:value.length)!=null?_value$length:0,maxCount:maxCharacters})}):null;};return jsx(BaseInput,{id:"password-field",label:label,labelPosition:labelPosition,type:type,interactionElement:revealButton,trailingFooterSlot:trailingFooterSlot,maxCharacters:maxCharacters,validationState:validationState,errorText:errorText,successText:successText,helpText:helpText,isDisabled:isDisabled,defaultValue:defaultValue,placeholder:placeholder,isRequired:isRequired,necessityIndicator:necessityIndicator,value:value,onChange:onChange,onBlur:onBlur,onFocus:onFocus,name:name,autoFocus:autoFocus,autoCompleteSuggestionType:autoCompleteSuggestionType,keyboardReturnKeyType:keyboardReturnKeyType});};
|
|
3477
3481
|
|
|
@@ -3505,9 +3509,7 @@ var useRadioGroup=function useRadioGroup(_ref){var value=_ref.value,defaultValue
|
|
|
3505
3509
|
|
|
3506
3510
|
var RadioGroup=function RadioGroup(_ref){var children=_ref.children,label=_ref.label,helpText=_ref.helpText,_ref$isDisabled=_ref.isDisabled,isDisabled=_ref$isDisabled===void 0?false:_ref$isDisabled,_ref$necessityIndicat=_ref.necessityIndicator,necessityIndicator=_ref$necessityIndicat===void 0?'none':_ref$necessityIndicat,_ref$labelPosition=_ref.labelPosition,labelPosition=_ref$labelPosition===void 0?'top':_ref$labelPosition,_ref$validationState=_ref.validationState,validationState=_ref$validationState===void 0?'none':_ref$validationState,errorText=_ref.errorText,name=_ref.name,defaultValue=_ref.defaultValue,onChange=_ref.onChange,value=_ref.value,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size;var _useRadioGroup=useRadioGroup({defaultValue:defaultValue,isDisabled:isDisabled,labelPosition:labelPosition,name:name,onChange:onChange,validationState:validationState,value:value,size:size}),contextValue=_useRadioGroup.contextValue,ids=_useRadioGroup.ids;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var showError=validationState==='error'&&errorText;var showHelpText=!showError&&helpText;var accessibilityText=","+(showError?errorText:'')+" "+(showHelpText?helpText:'');var isReactNative=getPlatformType()==='react-native';var gap=radioSizes.group.gap[size][matchedDeviceType];var childCount=React__default.Children.count(children);return jsx(RadioGroupProvider,{value:contextValue,children:jsxs(SelectorGroupField,{position:labelPosition,labelledBy:ids.labelId,accessibilityRole:isReactNative?'radiogroup':'group',children:[jsx(FormLabel,{as:"span",necessityIndicator:necessityIndicator,position:labelPosition,id:ids.labelId,accessibilityText:accessibilityText,children:label}),jsxs(Box,{children:[jsx(Box,{display:"flex",flexDirection:"column",children:React__default.Children.map(children,function(child,index){return jsx(Box,{marginBottom:index===childCount-1?0:gap,children:child},index);})}),jsx(FormHint,{type:validationState==='error'?'error':'help',errorText:errorText,helpText:helpText})]})]})});};
|
|
3507
3511
|
|
|
3508
|
-
var Spinner=function Spinner(_ref){var _ref2;var label=_ref.label,labelPosition=_ref.labelPosition,accessibilityLabel=_ref.accessibilityLabel,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size;return jsx(BaseSpinner,{label:label,labelPosition:labelPosition,accessibilityLabel:(_ref2=accessibilityLabel!=null?accessibilityLabel:label)!=null?_ref2:'Loading',contrast:contrast,size:size});};
|
|
3509
|
-
|
|
3510
3512
|
var SkipNavLink=function SkipNavLink(_props){throw new Error('[Blade: SkipNav]: SkipNavLink is not available on React Native');};var SkipNavContent=function SkipNavContent(_props){throw new Error('[Blade: SkipNav]: SkipNavContent is not available on React Native');};
|
|
3511
3513
|
|
|
3512
|
-
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BladeProvider, Button, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, Counter, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, Indicator, InfoIcon, Link, LinkIcon, LockIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, Text, TextArea, TextInput, Title, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
3514
|
+
export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BladeProvider, Button, CheckCircleIcon, CheckIcon, Checkbox, CheckboxGroup, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CloseIcon, Code, Counter, CreditCardIcon, DollarIcon, DownloadIcon, EditIcon, ExternalLinkIcon, EyeIcon, EyeOffIcon, FileTextIcon, Heading, HelpCircleIcon, HistoryIcon, HomeIcon, IconButton, Indicator, InfoIcon, Link, LinkIcon, LockIcon, MailIcon, MinusIcon, OTPInput, PasswordInput, PauseIcon, PlusIcon, Radio, RadioGroup, RefreshLeftIcon, RotateCounterClockWiseIcon, RupeeIcon, SearchIcon, SettingsIcon, SkipNavContent, SkipNavLink, SlashIcon, Spinner, Text, TextArea, TextInput, Title, TrashIcon, TrendingDownIcon, TrendingUpIcon, UsersIcon, VisuallyHidden, announce, clearAnnouncer, destroyAnnouncer, getTextProps, screenReaderStyles, useTheme };
|
|
3513
3515
|
//# sourceMappingURL=index.native.js.map
|