@razorpay/blade 5.3.0 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @razorpay/blade
2
2
 
3
+ ## 5.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 5c8005f: feat: add `ProgressBar` component
8
+
3
9
  ## 5.3.0
4
10
 
5
11
  ### Minor Changes
@@ -290,6 +290,7 @@ type AriaRoles =
290
290
  | 'menuitem'
291
291
  | 'menuitemcheckbox'
292
292
  | 'menuitemradio'
293
+ | 'meter'
293
294
  | 'navigation'
294
295
  | 'none'
295
296
  | 'note'
@@ -2009,6 +2010,83 @@ declare function clearAnnouncer(assertiveness: Assertiveness): void;
2009
2010
  */
2010
2011
  declare function destroyAnnouncer(): void;
2011
2012
 
2013
+ declare type ProgressBarCommonProps = {
2014
+ /**
2015
+ * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.
2016
+ */
2017
+ accessibilityLabel?: string;
2018
+ /**
2019
+ * Sets the contrast for the progress bar
2020
+ * @default 'low'
2021
+ */
2022
+ contrast?: ColorContrastTypes;
2023
+ /**
2024
+ * Sets the intent of the progress bar which changes the feedback color.
2025
+ */
2026
+ intent?: Feedback;
2027
+ /**
2028
+ * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.
2029
+ */
2030
+ label?: string;
2031
+ /**
2032
+ * Sets the size of the progress bar.
2033
+ * @default 'small'
2034
+ */
2035
+ size?: 'small' | 'medium';
2036
+ /**
2037
+ * Sets the progress value of the progress bar.
2038
+ * @default 'small'
2039
+ */
2040
+ value?: number;
2041
+ /**
2042
+ * Sets the minimum value for the progress bar.
2043
+ * @default 0
2044
+ */
2045
+ min?: number;
2046
+ /**
2047
+ * Sets the maximum value for the progress bar.
2048
+ * @default 100
2049
+ */
2050
+ max?: number;
2051
+ };
2052
+ declare type ProgressBarVariant = 'progress' | 'meter';
2053
+ declare type ProgressBarProgressProps = ProgressBarCommonProps & {
2054
+ /**
2055
+ * Sets the variant to be rendered for the progress bar.
2056
+ * @default 'progress'
2057
+ */
2058
+ variant?: Extract<ProgressBarVariant, 'progress'>;
2059
+ /**
2060
+ * Sets whether the progress bar is in an indeterminate state.
2061
+ * @default false
2062
+ */
2063
+ isIndeterminate?: boolean;
2064
+ /**
2065
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
2066
+ * @default true
2067
+ */
2068
+ showPercentage?: boolean;
2069
+ };
2070
+ declare type ProgressBarMeterProps = ProgressBarCommonProps & {
2071
+ /**
2072
+ * Sets the variant to be rendered for thr progress bar.
2073
+ * @default 'progress'
2074
+ */
2075
+ variant?: Extract<ProgressBarVariant, 'meter'>;
2076
+ /**
2077
+ * Sets whether the progress bar is in an indeterminate state.
2078
+ * @default false
2079
+ */
2080
+ isIndeterminate?: undefined;
2081
+ /**
2082
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
2083
+ * @default false
2084
+ */
2085
+ showPercentage?: undefined;
2086
+ };
2087
+ declare type ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;
2088
+ declare const ProgressBar: ({ accessibilityLabel, contrast, intent, isIndeterminate, label, showPercentage, size, value, variant, min, max, }: ProgressBarProps) => ReactElement;
2089
+
2012
2090
  declare type RadioProps = {
2013
2091
  /**
2014
2092
  * Sets the label text of the Radio
@@ -2315,4 +2393,4 @@ declare const VisuallyHidden: ({ children }: VisuallyHiddenProps) => JSX.Element
2315
2393
 
2316
2394
  declare const screenReaderStyles: CSSObject;
2317
2395
 
2318
- export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, 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 };
2396
+ export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, 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, ProgressBar, ProgressBarProps, ProgressBarVariant, 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 };
@@ -290,6 +290,7 @@ type AriaRoles =
290
290
  | 'menuitem'
291
291
  | 'menuitemcheckbox'
292
292
  | 'menuitemradio'
293
+ | 'meter'
293
294
  | 'navigation'
294
295
  | 'none'
295
296
  | 'note'
@@ -2000,6 +2001,83 @@ declare function announce(message: string, _assertiveness?: Assertiveness): void
2000
2001
  declare function clearAnnouncer(_assertiveness: Assertiveness): void;
2001
2002
  declare function destroyAnnouncer(): void;
2002
2003
 
2004
+ declare type ProgressBarCommonProps = {
2005
+ /**
2006
+ * Sets aria-label to help users know what the progress bar is for. Default value is the same as the `label` passed.
2007
+ */
2008
+ accessibilityLabel?: string;
2009
+ /**
2010
+ * Sets the contrast for the progress bar
2011
+ * @default 'low'
2012
+ */
2013
+ contrast?: ColorContrastTypes;
2014
+ /**
2015
+ * Sets the intent of the progress bar which changes the feedback color.
2016
+ */
2017
+ intent?: Feedback;
2018
+ /**
2019
+ * Sets the label to be rendered for the progress bar. This value will also be used as default for `accessibilityLabel`.
2020
+ */
2021
+ label?: string;
2022
+ /**
2023
+ * Sets the size of the progress bar.
2024
+ * @default 'small'
2025
+ */
2026
+ size?: 'small' | 'medium';
2027
+ /**
2028
+ * Sets the progress value of the progress bar.
2029
+ * @default 'small'
2030
+ */
2031
+ value?: number;
2032
+ /**
2033
+ * Sets the minimum value for the progress bar.
2034
+ * @default 0
2035
+ */
2036
+ min?: number;
2037
+ /**
2038
+ * Sets the maximum value for the progress bar.
2039
+ * @default 100
2040
+ */
2041
+ max?: number;
2042
+ };
2043
+ declare type ProgressBarVariant = 'progress' | 'meter';
2044
+ declare type ProgressBarProgressProps = ProgressBarCommonProps & {
2045
+ /**
2046
+ * Sets the variant to be rendered for the progress bar.
2047
+ * @default 'progress'
2048
+ */
2049
+ variant?: Extract<ProgressBarVariant, 'progress'>;
2050
+ /**
2051
+ * Sets whether the progress bar is in an indeterminate state.
2052
+ * @default false
2053
+ */
2054
+ isIndeterminate?: boolean;
2055
+ /**
2056
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
2057
+ * @default true
2058
+ */
2059
+ showPercentage?: boolean;
2060
+ };
2061
+ declare type ProgressBarMeterProps = ProgressBarCommonProps & {
2062
+ /**
2063
+ * Sets the variant to be rendered for thr progress bar.
2064
+ * @default 'progress'
2065
+ */
2066
+ variant?: Extract<ProgressBarVariant, 'meter'>;
2067
+ /**
2068
+ * Sets whether the progress bar is in an indeterminate state.
2069
+ * @default false
2070
+ */
2071
+ isIndeterminate?: undefined;
2072
+ /**
2073
+ * Sets whether or not to show the progress percentage for the progress bar. Percentage is hidden by default for the `meter` variant.
2074
+ * @default false
2075
+ */
2076
+ showPercentage?: undefined;
2077
+ };
2078
+ declare type ProgressBarProps = ProgressBarProgressProps | ProgressBarMeterProps;
2079
+ declare const ProgressBar: ({ accessibilityLabel, contrast, intent, isIndeterminate, label, showPercentage, size, value, variant, min, max, }: ProgressBarProps) => ReactElement;
2080
+
2003
2081
  declare type RadioProps = {
2004
2082
  /**
2005
2083
  * Sets the label text of the Radio
@@ -2303,4 +2381,4 @@ declare const VisuallyHidden: ({ children }: VisuallyHiddenProps) => JSX.Element
2303
2381
 
2304
2382
  declare const screenReaderStyles: CSSObject;
2305
2383
 
2306
- export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, 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 };
2384
+ export { Alert, AlertTriangleIcon as AlertOctagonIcon, AlertProps, AlertTriangleIcon$1 as AlertTriangleIcon, ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, ArrowUpRightIcon, Badge, BadgeProps, BladeProvider, BladeProviderProps, Button, ButtonProps, Card, CardBody, CardFooter, CardFooterAction, CardFooterLeading, CardFooterTrailing, CardHeader, CardHeaderBadge, CardHeaderCounter, CardHeaderIcon, CardHeaderIconButton, CardHeaderLeading, CardHeaderLink, CardHeaderText, CardHeaderTrailing, CardProps, 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, ProgressBar, ProgressBarProps, ProgressBarVariant, 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 };