@razorpay/blade 11.15.2 → 11.16.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 (87) hide show
  1. package/build/lib/native/components/Amount/Amount.js +1 -1
  2. package/build/lib/native/components/Amount/Amount.js.map +1 -1
  3. package/build/lib/native/components/Chip/Chip.js +1 -1
  4. package/build/lib/native/components/Chip/Chip.js.map +1 -1
  5. package/build/lib/native/components/Chip/ChipGroup.js +4 -2
  6. package/build/lib/native/components/Chip/ChipGroup.js.map +1 -1
  7. package/build/lib/native/components/Chip/chipTokens.js +2 -2
  8. package/build/lib/native/components/Chip/chipTokens.js.map +1 -1
  9. package/build/lib/native/components/Chip/getAnimatedChipStyles.js +1 -1
  10. package/build/lib/native/components/Chip/getAnimatedChipStyles.js.map +1 -1
  11. package/build/lib/native/components/Chip/useChipGroup.js +1 -1
  12. package/build/lib/native/components/Chip/useChipGroup.js.map +1 -1
  13. package/build/lib/native/components/Indicator/Indicator.js +4 -4
  14. package/build/lib/native/components/Indicator/Indicator.js.map +1 -1
  15. package/build/lib/native/components/Indicator/indicatorTokens.js +8 -0
  16. package/build/lib/native/components/Indicator/indicatorTokens.js.map +1 -0
  17. package/build/lib/native/components/List/ListItemIcons.js +1 -1
  18. package/build/lib/native/components/List/ListItemIcons.js.map +1 -1
  19. package/build/lib/native/tokens/global/colors.js +1 -1
  20. package/build/lib/native/tokens/global/colors.js.map +1 -1
  21. package/build/lib/native/tokens/global/opacity.js +1 -1
  22. package/build/lib/native/tokens/global/opacity.js.map +1 -1
  23. package/build/lib/native/tokens/theme/bladeTheme.js +1 -1
  24. package/build/lib/native/tokens/theme/bladeTheme.js.map +1 -1
  25. package/build/lib/native/tokens/theme/createTheme.js +1 -1
  26. package/build/lib/native/tokens/theme/createTheme.js.map +1 -1
  27. package/build/lib/web/development/components/Amount/Amount.js +3 -3
  28. package/build/lib/web/development/components/Amount/Amount.js.map +1 -1
  29. package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js +1 -1
  30. package/build/lib/web/development/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
  31. package/build/lib/web/development/components/Chip/Chip.js +5 -0
  32. package/build/lib/web/development/components/Chip/Chip.js.map +1 -1
  33. package/build/lib/web/development/components/Chip/ChipGroup.js +40 -6
  34. package/build/lib/web/development/components/Chip/ChipGroup.js.map +1 -1
  35. package/build/lib/web/development/components/Chip/chipTokens.js +12 -5
  36. package/build/lib/web/development/components/Chip/chipTokens.js.map +1 -1
  37. package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js +1 -2
  38. package/build/lib/web/development/components/Chip/getAnimatedChipStyles.js.map +1 -1
  39. package/build/lib/web/development/components/Chip/useChipGroup.js +8 -2
  40. package/build/lib/web/development/components/Chip/useChipGroup.js.map +1 -1
  41. package/build/lib/web/development/components/Indicator/Indicator.js +28 -32
  42. package/build/lib/web/development/components/Indicator/Indicator.js.map +1 -1
  43. package/build/lib/web/development/components/Indicator/indicatorTokens.js +41 -0
  44. package/build/lib/web/development/components/Indicator/indicatorTokens.js.map +1 -0
  45. package/build/lib/web/development/components/List/ListItemIcons.js +2 -2
  46. package/build/lib/web/development/components/List/ListItemIcons.js.map +1 -1
  47. package/build/lib/web/development/tokens/global/colors.js +222 -218
  48. package/build/lib/web/development/tokens/global/colors.js.map +1 -1
  49. package/build/lib/web/development/tokens/global/opacity.js +13 -12
  50. package/build/lib/web/development/tokens/global/opacity.js.map +1 -1
  51. package/build/lib/web/development/tokens/theme/bladeTheme.js +27 -27
  52. package/build/lib/web/development/tokens/theme/bladeTheme.js.map +1 -1
  53. package/build/lib/web/development/tokens/theme/createTheme.js +4 -4
  54. package/build/lib/web/development/tokens/theme/createTheme.js.map +1 -1
  55. package/build/lib/web/production/components/Amount/Amount.js +3 -3
  56. package/build/lib/web/production/components/Amount/Amount.js.map +1 -1
  57. package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js +1 -1
  58. package/build/lib/web/production/components/Breadcrumb/BreadcrumbItem.web.js.map +1 -1
  59. package/build/lib/web/production/components/Chip/Chip.js +5 -0
  60. package/build/lib/web/production/components/Chip/Chip.js.map +1 -1
  61. package/build/lib/web/production/components/Chip/ChipGroup.js +40 -6
  62. package/build/lib/web/production/components/Chip/ChipGroup.js.map +1 -1
  63. package/build/lib/web/production/components/Chip/chipTokens.js +12 -5
  64. package/build/lib/web/production/components/Chip/chipTokens.js.map +1 -1
  65. package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js +1 -2
  66. package/build/lib/web/production/components/Chip/getAnimatedChipStyles.js.map +1 -1
  67. package/build/lib/web/production/components/Chip/useChipGroup.js +8 -2
  68. package/build/lib/web/production/components/Chip/useChipGroup.js.map +1 -1
  69. package/build/lib/web/production/components/Indicator/Indicator.js +28 -32
  70. package/build/lib/web/production/components/Indicator/Indicator.js.map +1 -1
  71. package/build/lib/web/production/components/Indicator/indicatorTokens.js +41 -0
  72. package/build/lib/web/production/components/Indicator/indicatorTokens.js.map +1 -0
  73. package/build/lib/web/production/components/List/ListItemIcons.js +2 -2
  74. package/build/lib/web/production/components/List/ListItemIcons.js.map +1 -1
  75. package/build/lib/web/production/tokens/global/colors.js +222 -218
  76. package/build/lib/web/production/tokens/global/colors.js.map +1 -1
  77. package/build/lib/web/production/tokens/global/opacity.js +13 -12
  78. package/build/lib/web/production/tokens/global/opacity.js.map +1 -1
  79. package/build/lib/web/production/tokens/theme/bladeTheme.js +27 -27
  80. package/build/lib/web/production/tokens/theme/bladeTheme.js.map +1 -1
  81. package/build/lib/web/production/tokens/theme/createTheme.js +4 -4
  82. package/build/lib/web/production/tokens/theme/createTheme.js.map +1 -1
  83. package/build/types/components/index.d.ts +63 -6
  84. package/build/types/components/index.native.d.ts +63 -6
  85. package/build/types/tokens/index.d.ts +27 -24
  86. package/build/types/tokens/index.native.d.ts +27 -24
  87. package/package.json +1 -1
@@ -4606,11 +4606,34 @@ type ChipProps = {
4606
4606
  */
4607
4607
  value?: string;
4608
4608
  } & TestID & StyledPropsBlade;
4609
- type ChipGroupProps = {
4609
+ type ChipGroupCommonProps = {
4610
4610
  /**
4611
- * Accessibility label for the ChipGroup
4611
+ * Sets the position of the label
4612
+ *
4613
+ * @default 'top'
4612
4614
  */
4613
- accessibilityLabel: string;
4615
+ labelPosition?: 'top' | 'left';
4616
+ /**
4617
+ * Help text of the chip group
4618
+ */
4619
+ helpText?: string;
4620
+ /**
4621
+ * Error text of the chip group
4622
+ * Renders when `validationState` is set to 'error'
4623
+ *
4624
+ * Overrides helpText
4625
+ */
4626
+ errorText?: string;
4627
+ /**
4628
+ * Sets the validation state of the ChipGroup
4629
+ */
4630
+ validationState?: 'error' | 'none';
4631
+ /**
4632
+ * Renders a necessity indicator after ChipGroup label
4633
+ *
4634
+ * If set to `undefined` it renders nothing.
4635
+ */
4636
+ necessityIndicator?: 'required' | 'optional' | 'none';
4614
4637
  /**
4615
4638
  * Accepts multiple Chip components as children
4616
4639
  */
@@ -4626,6 +4649,11 @@ type ChipGroupProps = {
4626
4649
  * @default false
4627
4650
  */
4628
4651
  isDisabled?: boolean;
4652
+ /**
4653
+ * Sets the required state of the ChipGroup component.
4654
+ * @default false
4655
+ */
4656
+ isRequired?: boolean;
4629
4657
  /**
4630
4658
  * Specifies the name attribute for the ChipGroup component.
4631
4659
  * When provided, this attribute ensures that the Chip elements within the group are semantically associated, allowing them to be grouped logically for form submission.
@@ -4642,7 +4670,7 @@ type ChipGroupProps = {
4642
4670
  }) => void;
4643
4671
  /**
4644
4672
  * Defines the selection behavior within the ChipGroup component.
4645
- * When set to 'single', only one Chip can be selected at a time, akin to a radio button group.
4673
+ * When set to 'single', only one Chip can be selected at a time, akin to a chip button group.
4646
4674
  * When set to 'multiple', multiple Chips can be concurrently selected, simulating checkbox-like behavior within the group.
4647
4675
  *
4648
4676
  * @default "single"
@@ -4667,6 +4695,27 @@ type ChipGroupProps = {
4667
4695
  */
4668
4696
  color?: 'primary' | 'positive' | 'negative';
4669
4697
  } & TestID & StyledPropsBlade;
4698
+ type ChipGroupPropsWithA11yLabel = {
4699
+ /**
4700
+ * Label to be shown for the input field
4701
+ */
4702
+ label?: undefined;
4703
+ /**
4704
+ * Accessibility label for the input
4705
+ */
4706
+ accessibilityLabel: string;
4707
+ };
4708
+ type ChipGroupPropsWithLabel = {
4709
+ /**
4710
+ * Label to be shown for the input field
4711
+ */
4712
+ label: string;
4713
+ /**
4714
+ * Accessibility label for the input
4715
+ */
4716
+ accessibilityLabel?: string;
4717
+ };
4718
+ type ChipGroupProps = (ChipGroupPropsWithA11yLabel | ChipGroupPropsWithLabel) & ChipGroupCommonProps;
4670
4719
 
4671
4720
  declare const Chip: React__default.ForwardRefExoticComponent<{
4672
4721
  children: StringChildrenType;
@@ -5015,7 +5064,7 @@ declare const Chip: React__default.ForwardRefExoticComponent<{
5015
5064
  } | undefined;
5016
5065
  }, "visibility">, "__brand__">> & React__default.RefAttributes<BladeElementRef>>;
5017
5066
 
5018
- declare const ChipGroup: ({ accessibilityLabel, children, isDisabled, name, defaultValue, onChange, value, size, color, testID, selectionType, ...styledProps }: ChipGroupProps) => React__default.ReactElement;
5067
+ declare const ChipGroup: ({ accessibilityLabel, label, labelPosition, necessityIndicator, validationState, errorText, helpText, isRequired, children, isDisabled, name, defaultValue, onChange, value, size, color, testID, selectionType, ...styledProps }: ChipGroupProps) => React__default.ReactElement;
5019
5068
 
5020
5069
  type CollapsibleProps = {
5021
5070
  /**
@@ -5388,6 +5437,14 @@ type IndicatorCommonProps = {
5388
5437
  * @default neutral
5389
5438
  */
5390
5439
  color?: FeedbackColors | 'primary';
5440
+ /**
5441
+ * Sets the emphasis of the indicator
5442
+ *
5443
+ * If set to intense it will show a background circle
5444
+ *
5445
+ * @default subtle
5446
+ */
5447
+ emphasis?: 'subtle' | 'intense';
5391
5448
  /**
5392
5449
  * Size of the indicator
5393
5450
  *
@@ -5416,7 +5473,7 @@ type IndicatorWithA11yLabel = {
5416
5473
  children?: StringChildrenType;
5417
5474
  };
5418
5475
  type IndicatorProps = IndicatorCommonProps & (IndicatorWithA11yLabel | IndicatorWithoutA11yLabel);
5419
- declare const Indicator: ({ accessibilityLabel, children, size, color, testID, ...styledProps }: IndicatorProps) => ReactElement;
5476
+ declare const Indicator: ({ accessibilityLabel, children, size, color, emphasis, testID, ...styledProps }: IndicatorProps) => ReactElement;
5420
5477
 
5421
5478
  type FormInputLabelProps = {
5422
5479
  /**
@@ -142,6 +142,7 @@ type ColorNeutralGrayScale = Readonly<{
142
142
  1100: string;
143
143
  1200: string;
144
144
  1300: string;
145
+ a25: string;
145
146
  a50: string;
146
147
  a75: string;
147
148
  a100: string;
@@ -184,30 +185,32 @@ declare const colors: Color;
184
185
  type Opacity = Readonly<{
185
186
  /**0: 0 */
186
187
  0: number;
187
- /**1: 0.09 */
188
- 1: number;
189
- /**2: 0.12 */
190
- 2: number;
191
- /**3: 0.18 */
192
- 3: number;
193
- /**4: 0.24 */
194
- 4: number;
195
- /**5: 0.32 */
196
- 5: number;
197
- /**6: 0.48 */
198
- 6: number;
199
- /**7: 0.56 */
200
- 7: number;
201
- /**8: 0.64 */
202
- 8: number;
203
- /**9: 0.72 */
204
- 9: number;
205
- /**10: 0.8 */
206
- 10: number;
207
- /**11: 0.88 */
208
- 11: number;
209
- /**12: 1.0 */
210
- 12: number;
188
+ /**50: 0.06 */
189
+ 50: number;
190
+ /**100: 0.09 */
191
+ 100: number;
192
+ /**200: 0.12 */
193
+ 200: number;
194
+ /**300: 0.18 */
195
+ 300: number;
196
+ /**400: 0.24 */
197
+ 400: number;
198
+ /**500: 0.32 */
199
+ 500: number;
200
+ /**600: 0.48 */
201
+ 600: number;
202
+ /**700: 0.56 */
203
+ 700: number;
204
+ /**800: 0.64 */
205
+ 800: number;
206
+ /**900: 0.72 */
207
+ 900: number;
208
+ /**1000: 0.8 */
209
+ 1000: number;
210
+ /**1100: 0.88 */
211
+ 1100: number;
212
+ /**1200: 1.0 */
213
+ 1200: number;
211
214
  }>;
212
215
  declare const opacity: Opacity;
213
216
 
@@ -142,6 +142,7 @@ type ColorNeutralGrayScale = Readonly<{
142
142
  1100: string;
143
143
  1200: string;
144
144
  1300: string;
145
+ a25: string;
145
146
  a50: string;
146
147
  a75: string;
147
148
  a100: string;
@@ -184,30 +185,32 @@ declare const colors: Color;
184
185
  type Opacity = Readonly<{
185
186
  /**0: 0 */
186
187
  0: number;
187
- /**1: 0.09 */
188
- 1: number;
189
- /**2: 0.12 */
190
- 2: number;
191
- /**3: 0.18 */
192
- 3: number;
193
- /**4: 0.24 */
194
- 4: number;
195
- /**5: 0.32 */
196
- 5: number;
197
- /**6: 0.48 */
198
- 6: number;
199
- /**7: 0.56 */
200
- 7: number;
201
- /**8: 0.64 */
202
- 8: number;
203
- /**9: 0.72 */
204
- 9: number;
205
- /**10: 0.8 */
206
- 10: number;
207
- /**11: 0.88 */
208
- 11: number;
209
- /**12: 1.0 */
210
- 12: number;
188
+ /**50: 0.06 */
189
+ 50: number;
190
+ /**100: 0.09 */
191
+ 100: number;
192
+ /**200: 0.12 */
193
+ 200: number;
194
+ /**300: 0.18 */
195
+ 300: number;
196
+ /**400: 0.24 */
197
+ 400: number;
198
+ /**500: 0.32 */
199
+ 500: number;
200
+ /**600: 0.48 */
201
+ 600: number;
202
+ /**700: 0.56 */
203
+ 700: number;
204
+ /**800: 0.64 */
205
+ 800: number;
206
+ /**900: 0.72 */
207
+ 900: number;
208
+ /**1000: 0.8 */
209
+ 1000: number;
210
+ /**1100: 0.88 */
211
+ 1100: number;
212
+ /**1200: 1.0 */
213
+ 1200: number;
211
214
  }>;
212
215
  declare const opacity: Opacity;
213
216
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@razorpay/blade",
3
3
  "description": "The Design System that powers Razorpay",
4
- "version": "11.15.2",
4
+ "version": "11.16.0",
5
5
  "license": "MIT",
6
6
  "engines": {
7
7
  "node": ">=18.12.1"