@razorpay/blade 6.7.0 → 7.0.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 +90 -0
- package/build/components/index.d.ts +52 -32
- package/build/components/index.native.d.ts +52 -32
- package/build/components/index.native.js +18 -18
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +143 -78
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +29 -26
- package/build/css/bankingThemeDarkMobile.css +38 -35
- package/build/css/bankingThemeLightDesktop.css +16 -13
- package/build/css/bankingThemeLightMobile.css +25 -22
- package/build/css/paymentThemeDarkDesktop.css +28 -25
- package/build/css/paymentThemeDarkMobile.css +37 -34
- package/build/css/paymentThemeLightDesktop.css +16 -13
- package/build/css/paymentThemeLightMobile.css +25 -22
- package/build/tokens/index.d.ts +82 -52
- package/build/tokens/index.native.d.ts +82 -52
- package/build/tokens/index.native.js +3 -3
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +68 -62
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.native.js +1 -1
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +35 -29
- package/build/utils/index.web.js.map +1 -1
- package/codemods/migrate-typography/transformers/migrate-typography.ts +33 -0
- package/package.json +10 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,95 @@
|
|
|
1
1
|
# @razorpay/blade
|
|
2
2
|
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0f6e2ad7: fix: ref breakage on react native
|
|
8
|
+
- 9963a7be: feat(package.json): add "main" field to package.json
|
|
9
|
+
|
|
10
|
+
## 7.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- 5248ea66: feat(Typography): streamline typography scale
|
|
15
|
+
|
|
16
|
+
> **Warning**
|
|
17
|
+
>
|
|
18
|
+
> Breaking Change!
|
|
19
|
+
> This is a breaking change for typography components and lineHeight scale
|
|
20
|
+
>
|
|
21
|
+
> We have written codemod to ease this process so please follow the [migration guide thoroughly](#breaking-changes)
|
|
22
|
+
|
|
23
|
+
### Component Changes:
|
|
24
|
+
|
|
25
|
+
- Title:
|
|
26
|
+
- Added `xlarge` size
|
|
27
|
+
- Text:
|
|
28
|
+
- Added `large` size
|
|
29
|
+
- Link:
|
|
30
|
+
- Added `large` size
|
|
31
|
+
- Code:
|
|
32
|
+
- Added `weight=bold`
|
|
33
|
+
|
|
34
|
+
### Breaking Changes:
|
|
35
|
+
|
|
36
|
+
- Title:
|
|
37
|
+
- Replace all `large` size variants to `xlarge`
|
|
38
|
+
|
|
39
|
+
```diff
|
|
40
|
+
- <Title size="large">hello world</Title>
|
|
41
|
+
+ <Title size="xlarge">hello world</Title>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
***
|
|
45
|
+
|
|
46
|
+
### Line-height scale changes
|
|
47
|
+
|
|
48
|
+
New scale has been changed to use numbered values for more flexibility, to read more about the changes [check this doc](https://docs.google.com/document/d/16j8dIKuQF9GjDgkhkZwnokVGNeoK7R-7zzIXHCgvveA/edit).
|
|
49
|
+
|
|
50
|
+
#### **Migration guide:**
|
|
51
|
+
|
|
52
|
+
Replace old named tokens to corresponding numbered values:
|
|
53
|
+
|
|
54
|
+
For example:
|
|
55
|
+
|
|
56
|
+
```diff
|
|
57
|
+
- theme.typography.lineHeights.s
|
|
58
|
+
+ theme.typography.lineHeights[50]
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Old vs New mappings:**
|
|
62
|
+
|
|
63
|
+
| old | new |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| s | 50 |
|
|
66
|
+
| m | 50 |
|
|
67
|
+
| l | 100 |
|
|
68
|
+
| xl | 200 |
|
|
69
|
+
| 2xl | 300 |
|
|
70
|
+
| 3xl | 400 |
|
|
71
|
+
| 4xl | 600 |
|
|
72
|
+
| 5xl | 700 |
|
|
73
|
+
| 6xl | 800 |
|
|
74
|
+
|
|
75
|
+
#### **Migrate with Codemod:**
|
|
76
|
+
|
|
77
|
+
To change all instances of `theme.typography.lineHeights` to the new scale automatically use this codemod:
|
|
78
|
+
|
|
79
|
+
**Step1:** Install this version of blade
|
|
80
|
+
|
|
81
|
+
**Step2:** Run the codemod with the following command
|
|
82
|
+
|
|
83
|
+
> Checkout [jscodeshift docs](https://github.com/facebook/jscodeshift) for further cli usage help.
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
npx jscodeshift ./YOUR_DIR --extensions=tsx,ts,jsx,js -t ./node_modules/@razorpay/blade/codemods/migrate-typography/transformers/migrate-typography.ts --ignore-pattern="**/node_modules/**"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
> **Note**
|
|
90
|
+
>
|
|
91
|
+
> This codemod will cover 80% of the usecases, but it might miss certain edge cases, it is advised to thoroughly test & check the code to ensure nothing is missed.
|
|
92
|
+
|
|
3
93
|
## 6.7.0
|
|
4
94
|
|
|
5
95
|
### Minor Changes
|
|
@@ -127,12 +127,12 @@ type FontWeight = {
|
|
|
127
127
|
type FontSize = {
|
|
128
128
|
/** desktop: 9(px/rem/pt)
|
|
129
129
|
*
|
|
130
|
-
* mobile:
|
|
130
|
+
* mobile: 9(px/rem/pt)
|
|
131
131
|
*/
|
|
132
132
|
10: number;
|
|
133
133
|
/** desktop: 10(px/rem/pt)
|
|
134
134
|
*
|
|
135
|
-
* mobile:
|
|
135
|
+
* mobile: 10(px/rem/pt)
|
|
136
136
|
*/
|
|
137
137
|
25: number;
|
|
138
138
|
/** desktop: 11(px/rem/pt)
|
|
@@ -147,32 +147,32 @@ type FontSize = {
|
|
|
147
147
|
75: number;
|
|
148
148
|
/** desktop: 14(px/rem/pt)
|
|
149
149
|
*
|
|
150
|
-
* mobile:
|
|
150
|
+
* mobile: 14(px/rem/pt)
|
|
151
151
|
*/
|
|
152
152
|
100: number;
|
|
153
153
|
/** desktop: 16(px/rem/pt)
|
|
154
154
|
*
|
|
155
|
-
* mobile:
|
|
155
|
+
* mobile: 16(px/rem/pt)
|
|
156
156
|
*/
|
|
157
157
|
200: number;
|
|
158
158
|
/** desktop: 18(px/rem/pt)
|
|
159
159
|
*
|
|
160
|
-
* mobile:
|
|
160
|
+
* mobile: 16(px/rem/pt)
|
|
161
161
|
*/
|
|
162
162
|
300: number;
|
|
163
163
|
/** desktop: 20(px/rem/pt)
|
|
164
164
|
*
|
|
165
|
-
* mobile:
|
|
165
|
+
* mobile: 18(px/rem/pt)
|
|
166
166
|
*/
|
|
167
167
|
400: number;
|
|
168
168
|
/** desktop: 22(px/rem/pt)
|
|
169
169
|
*
|
|
170
|
-
* mobile:
|
|
170
|
+
* mobile: 20(px/rem/pt)
|
|
171
171
|
*/
|
|
172
172
|
500: number;
|
|
173
|
-
/** desktop:
|
|
173
|
+
/** desktop: 24(px/rem/pt)
|
|
174
174
|
*
|
|
175
|
-
* mobile:
|
|
175
|
+
* mobile: 20(px/rem/pt)
|
|
176
176
|
*/
|
|
177
177
|
600: number;
|
|
178
178
|
/** desktop: 28(px/rem/pt)
|
|
@@ -187,12 +187,12 @@ type FontSize = {
|
|
|
187
187
|
800: number;
|
|
188
188
|
/** desktop: 36(px/rem/pt)
|
|
189
189
|
*
|
|
190
|
-
* mobile:
|
|
190
|
+
* mobile: 32(px/rem/pt)
|
|
191
191
|
*/
|
|
192
192
|
900: number;
|
|
193
193
|
/** desktop: 40(px/rem/pt)
|
|
194
194
|
*
|
|
195
|
-
* mobile:
|
|
195
|
+
* mobile: 32(px/rem/pt)
|
|
196
196
|
*/
|
|
197
197
|
1000: number;
|
|
198
198
|
};
|
|
@@ -204,51 +204,66 @@ type Typography = {
|
|
|
204
204
|
weight: FontWeight;
|
|
205
205
|
};
|
|
206
206
|
lineHeights: {
|
|
207
|
+
/** desktop: 0(px/rem/pt)
|
|
208
|
+
*
|
|
209
|
+
* mobile: 0(px/rem/pt)
|
|
210
|
+
*/
|
|
211
|
+
0: number;
|
|
212
|
+
/** desktop: 14(px/rem/pt)
|
|
213
|
+
*
|
|
214
|
+
* mobile: 14(px/rem/pt)
|
|
215
|
+
*/
|
|
216
|
+
25: number;
|
|
207
217
|
/** desktop: 16(px/rem/pt)
|
|
208
218
|
*
|
|
209
219
|
* mobile: 16(px/rem/pt)
|
|
210
220
|
*/
|
|
211
|
-
|
|
212
|
-
/** desktop:
|
|
221
|
+
50: number;
|
|
222
|
+
/** desktop: 18(px/rem/pt)
|
|
213
223
|
*
|
|
214
224
|
* mobile: 18(px/rem/pt)
|
|
215
225
|
*/
|
|
216
|
-
|
|
226
|
+
75: number;
|
|
217
227
|
/** desktop: 20(px/rem/pt)
|
|
218
228
|
*
|
|
219
|
-
* mobile:
|
|
229
|
+
* mobile: 20(px/rem/pt)
|
|
220
230
|
*/
|
|
221
|
-
|
|
231
|
+
100: number;
|
|
222
232
|
/** desktop: 24(px/rem/pt)
|
|
223
233
|
*
|
|
224
|
-
* mobile:
|
|
234
|
+
* mobile: 20(px/rem/pt)
|
|
225
235
|
*/
|
|
226
|
-
|
|
236
|
+
200: number;
|
|
227
237
|
/** desktop: 24(px/rem/pt)
|
|
228
238
|
*
|
|
229
239
|
* mobile: 24(px/rem/pt)
|
|
230
240
|
*/
|
|
231
|
-
|
|
241
|
+
300: number;
|
|
232
242
|
/** desktop: 28(px/rem/pt)
|
|
243
|
+
*
|
|
244
|
+
* mobile: 24(px/rem/pt)
|
|
245
|
+
*/
|
|
246
|
+
400: number;
|
|
247
|
+
/** desktop: 32(px/rem/pt)
|
|
233
248
|
*
|
|
234
249
|
* mobile: 28(px/rem/pt)
|
|
235
250
|
*/
|
|
236
|
-
|
|
251
|
+
500: number;
|
|
237
252
|
/** desktop: 40(px/rem/pt)
|
|
238
253
|
*
|
|
239
254
|
* mobile: 32(px/rem/pt)
|
|
240
255
|
*/
|
|
241
|
-
|
|
242
|
-
/** desktop:
|
|
256
|
+
600: number;
|
|
257
|
+
/** desktop: 40(px/rem/pt)
|
|
243
258
|
*
|
|
244
|
-
* mobile:
|
|
259
|
+
* mobile: 40(px/rem/pt)
|
|
245
260
|
*/
|
|
246
|
-
|
|
247
|
-
/** desktop:
|
|
261
|
+
700: number;
|
|
262
|
+
/** desktop: 48(px/rem/pt)
|
|
248
263
|
*
|
|
249
264
|
* mobile: 40(px/rem/pt)
|
|
250
265
|
*/
|
|
251
|
-
|
|
266
|
+
800: number;
|
|
252
267
|
};
|
|
253
268
|
// letterSpacings: {};
|
|
254
269
|
};
|
|
@@ -2278,7 +2293,7 @@ declare type LinkCommonProps = {
|
|
|
2278
2293
|
*
|
|
2279
2294
|
* @default medium
|
|
2280
2295
|
*/
|
|
2281
|
-
size?: 'small' | 'medium';
|
|
2296
|
+
size?: 'small' | 'medium' | 'large';
|
|
2282
2297
|
} & TestID$1 & StyledPropsBlade & Platform$1.Select<{
|
|
2283
2298
|
native: {
|
|
2284
2299
|
/**
|
|
@@ -2413,7 +2428,7 @@ type TextVariant$1 = 'body' | 'caption';
|
|
|
2413
2428
|
|
|
2414
2429
|
type TextBodyVariant$1 = TextCommonProps$1 & {
|
|
2415
2430
|
variant?: Extract<TextVariant$1, 'body'>;
|
|
2416
|
-
size?: 'xsmall' | 'small' | 'medium';
|
|
2431
|
+
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
2417
2432
|
};
|
|
2418
2433
|
|
|
2419
2434
|
type TextCaptionVariant$1 = TextCommonProps$1 & {
|
|
@@ -4299,7 +4314,7 @@ declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisa
|
|
|
4299
4314
|
declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
|
|
4300
4315
|
|
|
4301
4316
|
declare type TitleProps = {
|
|
4302
|
-
size?: 'small' | 'medium' | 'large';
|
|
4317
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
4303
4318
|
contrast?: ColorContrastTypes;
|
|
4304
4319
|
type?: TextTypes;
|
|
4305
4320
|
children: StringChildrenType;
|
|
@@ -4387,7 +4402,7 @@ declare type TextCommonProps = {
|
|
|
4387
4402
|
declare type TextVariant = 'body' | 'caption';
|
|
4388
4403
|
declare type TextBodyVariant = TextCommonProps & {
|
|
4389
4404
|
variant?: Extract<TextVariant, 'body'>;
|
|
4390
|
-
size?: 'xsmall' | 'small' | 'medium';
|
|
4405
|
+
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
4391
4406
|
};
|
|
4392
4407
|
declare type TextCaptionVariant = TextCommonProps & {
|
|
4393
4408
|
variant?: Extract<TextVariant, 'caption'>;
|
|
@@ -4403,9 +4418,13 @@ declare type TextProps<T> = T extends {
|
|
|
4403
4418
|
declare type TextForwardedAs = {
|
|
4404
4419
|
forwardedAs?: BaseTextProps['as'];
|
|
4405
4420
|
};
|
|
4421
|
+
declare type GetTextPropsReturn = Omit<BaseTextProps, 'children'> & TextForwardedAs;
|
|
4422
|
+
declare type GetTextProps<T extends {
|
|
4423
|
+
variant: TextVariant;
|
|
4424
|
+
}> = Pick<TextProps<T>, 'type' | 'variant' | 'weight' | 'size' | 'contrast' | 'testID' | 'textAlign'>;
|
|
4406
4425
|
declare const getTextProps: <T extends {
|
|
4407
4426
|
variant: TextVariant;
|
|
4408
|
-
}>({ variant, type, weight, size, contrast, testID, textAlign, }:
|
|
4427
|
+
}>({ variant, type, weight, size, contrast, testID, textAlign, }: GetTextProps<T>) => GetTextPropsReturn;
|
|
4409
4428
|
declare const Text: <T extends {
|
|
4410
4429
|
variant: TextVariant;
|
|
4411
4430
|
}>({ variant, weight, size, type, contrast, truncateAfterLines, children, color, testID, textAlign, ...styledProps }: TextProps<T>) => ReactElement;
|
|
@@ -4418,6 +4437,7 @@ declare type CodeProps = {
|
|
|
4418
4437
|
* @default small
|
|
4419
4438
|
*/
|
|
4420
4439
|
size?: 'small' | 'medium';
|
|
4440
|
+
weight?: 'regular' | 'bold';
|
|
4421
4441
|
} & TestID$1 & StyledPropsBlade;
|
|
4422
4442
|
/**
|
|
4423
4443
|
* Code component can be used for displaying token, variable names, or inlined code snippets.
|
|
@@ -4445,7 +4465,7 @@ declare type CodeProps = {
|
|
|
4445
4465
|
* </BaseBox>
|
|
4446
4466
|
* ```
|
|
4447
4467
|
*/
|
|
4448
|
-
declare const Code: ({ children, size, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4468
|
+
declare const Code: ({ children, size, weight, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4449
4469
|
|
|
4450
4470
|
declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
|
|
4451
4471
|
declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
|
|
@@ -128,12 +128,12 @@ type FontWeight = {
|
|
|
128
128
|
type FontSize = {
|
|
129
129
|
/** desktop: 9(px/rem/pt)
|
|
130
130
|
*
|
|
131
|
-
* mobile:
|
|
131
|
+
* mobile: 9(px/rem/pt)
|
|
132
132
|
*/
|
|
133
133
|
10: number;
|
|
134
134
|
/** desktop: 10(px/rem/pt)
|
|
135
135
|
*
|
|
136
|
-
* mobile:
|
|
136
|
+
* mobile: 10(px/rem/pt)
|
|
137
137
|
*/
|
|
138
138
|
25: number;
|
|
139
139
|
/** desktop: 11(px/rem/pt)
|
|
@@ -148,32 +148,32 @@ type FontSize = {
|
|
|
148
148
|
75: number;
|
|
149
149
|
/** desktop: 14(px/rem/pt)
|
|
150
150
|
*
|
|
151
|
-
* mobile:
|
|
151
|
+
* mobile: 14(px/rem/pt)
|
|
152
152
|
*/
|
|
153
153
|
100: number;
|
|
154
154
|
/** desktop: 16(px/rem/pt)
|
|
155
155
|
*
|
|
156
|
-
* mobile:
|
|
156
|
+
* mobile: 16(px/rem/pt)
|
|
157
157
|
*/
|
|
158
158
|
200: number;
|
|
159
159
|
/** desktop: 18(px/rem/pt)
|
|
160
160
|
*
|
|
161
|
-
* mobile:
|
|
161
|
+
* mobile: 16(px/rem/pt)
|
|
162
162
|
*/
|
|
163
163
|
300: number;
|
|
164
164
|
/** desktop: 20(px/rem/pt)
|
|
165
165
|
*
|
|
166
|
-
* mobile:
|
|
166
|
+
* mobile: 18(px/rem/pt)
|
|
167
167
|
*/
|
|
168
168
|
400: number;
|
|
169
169
|
/** desktop: 22(px/rem/pt)
|
|
170
170
|
*
|
|
171
|
-
* mobile:
|
|
171
|
+
* mobile: 20(px/rem/pt)
|
|
172
172
|
*/
|
|
173
173
|
500: number;
|
|
174
|
-
/** desktop:
|
|
174
|
+
/** desktop: 24(px/rem/pt)
|
|
175
175
|
*
|
|
176
|
-
* mobile:
|
|
176
|
+
* mobile: 20(px/rem/pt)
|
|
177
177
|
*/
|
|
178
178
|
600: number;
|
|
179
179
|
/** desktop: 28(px/rem/pt)
|
|
@@ -188,12 +188,12 @@ type FontSize = {
|
|
|
188
188
|
800: number;
|
|
189
189
|
/** desktop: 36(px/rem/pt)
|
|
190
190
|
*
|
|
191
|
-
* mobile:
|
|
191
|
+
* mobile: 32(px/rem/pt)
|
|
192
192
|
*/
|
|
193
193
|
900: number;
|
|
194
194
|
/** desktop: 40(px/rem/pt)
|
|
195
195
|
*
|
|
196
|
-
* mobile:
|
|
196
|
+
* mobile: 32(px/rem/pt)
|
|
197
197
|
*/
|
|
198
198
|
1000: number;
|
|
199
199
|
};
|
|
@@ -205,51 +205,66 @@ type Typography = {
|
|
|
205
205
|
weight: FontWeight;
|
|
206
206
|
};
|
|
207
207
|
lineHeights: {
|
|
208
|
+
/** desktop: 0(px/rem/pt)
|
|
209
|
+
*
|
|
210
|
+
* mobile: 0(px/rem/pt)
|
|
211
|
+
*/
|
|
212
|
+
0: number;
|
|
213
|
+
/** desktop: 14(px/rem/pt)
|
|
214
|
+
*
|
|
215
|
+
* mobile: 14(px/rem/pt)
|
|
216
|
+
*/
|
|
217
|
+
25: number;
|
|
208
218
|
/** desktop: 16(px/rem/pt)
|
|
209
219
|
*
|
|
210
220
|
* mobile: 16(px/rem/pt)
|
|
211
221
|
*/
|
|
212
|
-
|
|
213
|
-
/** desktop:
|
|
222
|
+
50: number;
|
|
223
|
+
/** desktop: 18(px/rem/pt)
|
|
214
224
|
*
|
|
215
225
|
* mobile: 18(px/rem/pt)
|
|
216
226
|
*/
|
|
217
|
-
|
|
227
|
+
75: number;
|
|
218
228
|
/** desktop: 20(px/rem/pt)
|
|
219
229
|
*
|
|
220
|
-
* mobile:
|
|
230
|
+
* mobile: 20(px/rem/pt)
|
|
221
231
|
*/
|
|
222
|
-
|
|
232
|
+
100: number;
|
|
223
233
|
/** desktop: 24(px/rem/pt)
|
|
224
234
|
*
|
|
225
|
-
* mobile:
|
|
235
|
+
* mobile: 20(px/rem/pt)
|
|
226
236
|
*/
|
|
227
|
-
|
|
237
|
+
200: number;
|
|
228
238
|
/** desktop: 24(px/rem/pt)
|
|
229
239
|
*
|
|
230
240
|
* mobile: 24(px/rem/pt)
|
|
231
241
|
*/
|
|
232
|
-
|
|
242
|
+
300: number;
|
|
233
243
|
/** desktop: 28(px/rem/pt)
|
|
244
|
+
*
|
|
245
|
+
* mobile: 24(px/rem/pt)
|
|
246
|
+
*/
|
|
247
|
+
400: number;
|
|
248
|
+
/** desktop: 32(px/rem/pt)
|
|
234
249
|
*
|
|
235
250
|
* mobile: 28(px/rem/pt)
|
|
236
251
|
*/
|
|
237
|
-
|
|
252
|
+
500: number;
|
|
238
253
|
/** desktop: 40(px/rem/pt)
|
|
239
254
|
*
|
|
240
255
|
* mobile: 32(px/rem/pt)
|
|
241
256
|
*/
|
|
242
|
-
|
|
243
|
-
/** desktop:
|
|
257
|
+
600: number;
|
|
258
|
+
/** desktop: 40(px/rem/pt)
|
|
244
259
|
*
|
|
245
|
-
* mobile:
|
|
260
|
+
* mobile: 40(px/rem/pt)
|
|
246
261
|
*/
|
|
247
|
-
|
|
248
|
-
/** desktop:
|
|
262
|
+
700: number;
|
|
263
|
+
/** desktop: 48(px/rem/pt)
|
|
249
264
|
*
|
|
250
265
|
* mobile: 40(px/rem/pt)
|
|
251
266
|
*/
|
|
252
|
-
|
|
267
|
+
800: number;
|
|
253
268
|
};
|
|
254
269
|
// letterSpacings: {};
|
|
255
270
|
};
|
|
@@ -2281,7 +2296,7 @@ declare type LinkCommonProps = {
|
|
|
2281
2296
|
*
|
|
2282
2297
|
* @default medium
|
|
2283
2298
|
*/
|
|
2284
|
-
size?: 'small' | 'medium';
|
|
2299
|
+
size?: 'small' | 'medium' | 'large';
|
|
2285
2300
|
} & TestID$1 & StyledPropsBlade & Platform.Select<{
|
|
2286
2301
|
native: {
|
|
2287
2302
|
/**
|
|
@@ -2416,7 +2431,7 @@ type TextVariant$1 = 'body' | 'caption';
|
|
|
2416
2431
|
|
|
2417
2432
|
type TextBodyVariant$1 = TextCommonProps$1 & {
|
|
2418
2433
|
variant?: Extract<TextVariant$1, 'body'>;
|
|
2419
|
-
size?: 'xsmall' | 'small' | 'medium';
|
|
2434
|
+
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
2420
2435
|
};
|
|
2421
2436
|
|
|
2422
2437
|
type TextCaptionVariant$1 = TextCommonProps$1 & {
|
|
@@ -4095,7 +4110,7 @@ declare type ListItemLinkProps = Exclude<LinkProps, 'size' | 'variant' | 'isDisa
|
|
|
4095
4110
|
declare const ListItemLink: ({ accessibilityLabel, children, href, icon, iconPosition, onClick, rel, target, testID, }: ListItemLinkProps) => React.ReactElement;
|
|
4096
4111
|
|
|
4097
4112
|
declare type TitleProps = {
|
|
4098
|
-
size?: 'small' | 'medium' | 'large';
|
|
4113
|
+
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
4099
4114
|
contrast?: ColorContrastTypes;
|
|
4100
4115
|
type?: TextTypes;
|
|
4101
4116
|
children: StringChildrenType;
|
|
@@ -4183,7 +4198,7 @@ declare type TextCommonProps = {
|
|
|
4183
4198
|
declare type TextVariant = 'body' | 'caption';
|
|
4184
4199
|
declare type TextBodyVariant = TextCommonProps & {
|
|
4185
4200
|
variant?: Extract<TextVariant, 'body'>;
|
|
4186
|
-
size?: 'xsmall' | 'small' | 'medium';
|
|
4201
|
+
size?: 'xsmall' | 'small' | 'medium' | 'large';
|
|
4187
4202
|
};
|
|
4188
4203
|
declare type TextCaptionVariant = TextCommonProps & {
|
|
4189
4204
|
variant?: Extract<TextVariant, 'caption'>;
|
|
@@ -4199,9 +4214,13 @@ declare type TextProps<T> = T extends {
|
|
|
4199
4214
|
declare type TextForwardedAs = {
|
|
4200
4215
|
forwardedAs?: BaseTextProps['as'];
|
|
4201
4216
|
};
|
|
4217
|
+
declare type GetTextPropsReturn = Omit<BaseTextProps, 'children'> & TextForwardedAs;
|
|
4218
|
+
declare type GetTextProps<T extends {
|
|
4219
|
+
variant: TextVariant;
|
|
4220
|
+
}> = Pick<TextProps<T>, 'type' | 'variant' | 'weight' | 'size' | 'contrast' | 'testID' | 'textAlign'>;
|
|
4202
4221
|
declare const getTextProps: <T extends {
|
|
4203
4222
|
variant: TextVariant;
|
|
4204
|
-
}>({ variant, type, weight, size, contrast, testID, textAlign, }:
|
|
4223
|
+
}>({ variant, type, weight, size, contrast, testID, textAlign, }: GetTextProps<T>) => GetTextPropsReturn;
|
|
4205
4224
|
declare const Text: <T extends {
|
|
4206
4225
|
variant: TextVariant;
|
|
4207
4226
|
}>({ variant, weight, size, type, contrast, truncateAfterLines, children, color, testID, textAlign, ...styledProps }: TextProps<T>) => ReactElement;
|
|
@@ -4214,6 +4233,7 @@ declare type CodeProps = {
|
|
|
4214
4233
|
* @default small
|
|
4215
4234
|
*/
|
|
4216
4235
|
size?: 'small' | 'medium';
|
|
4236
|
+
weight?: 'regular' | 'bold';
|
|
4217
4237
|
} & TestID$1 & StyledPropsBlade;
|
|
4218
4238
|
/**
|
|
4219
4239
|
* Code component can be used for displaying token, variable names, or inlined code snippets.
|
|
@@ -4241,7 +4261,7 @@ declare type CodeProps = {
|
|
|
4241
4261
|
* </BaseBox>
|
|
4242
4262
|
* ```
|
|
4243
4263
|
*/
|
|
4244
|
-
declare const Code: ({ children, size, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4264
|
+
declare const Code: ({ children, size, weight, testID, ...styledProps }: CodeProps) => JSX.Element;
|
|
4245
4265
|
|
|
4246
4266
|
declare type ListItemCodeProps = Exclude<CodeProps, 'size'>;
|
|
4247
4267
|
declare const ListItemCode: ({ children, testID }: ListItemCodeProps) => React.ReactElement;
|