@razorpay/blade 6.4.0 → 6.5.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 +21 -0
- package/build/components/index.d.ts +1641 -101
- package/build/components/index.native.d.ts +1334 -91
- package/build/components/index.native.js +335 -321
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +4111 -1455
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +2 -2
- package/build/css/bankingThemeDarkMobile.css +2 -2
- package/build/css/bankingThemeLightDesktop.css +2 -2
- package/build/css/bankingThemeLightMobile.css +2 -2
- package/build/css/paymentThemeDarkDesktop.css +2 -2
- package/build/css/paymentThemeDarkMobile.css +2 -2
- package/build/css/paymentThemeLightDesktop.css +2 -2
- package/build/css/paymentThemeLightMobile.css +2 -2
- package/build/tokens/index.d.ts +135 -14
- package/build/tokens/index.native.d.ts +135 -14
- package/build/tokens/index.native.js +1 -1
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +7 -2
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.d.ts +69 -8
- package/build/utils/index.native.d.ts +69 -8
- package/build/utils/index.native.js +5 -3
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +17 -12
- package/build/utils/index.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(231, 67%, 10%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(231, 41%, 19%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(231, 54%, 15%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(231, 67%, 10%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(231, 41%, 19%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(231, 54%, 15%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(230, 30%, 96%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(228, 56%, 17%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(0, 0%, 100%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(230, 30%, 96%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(228, 56%, 17%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(0, 0%, 100%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:33 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(218, 67%, 10%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(219, 41%, 19%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(218, 54%, 15%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:34 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(218, 67%, 10%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(219, 41%, 19%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(218, 54%, 15%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:33 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(220, 30%, 96%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(217, 56%, 17%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(0, 0%, 100%, 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on
|
|
3
|
+
* Generated on Fri, 17 Mar 2023 09:19:33 GMT
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
--border-width-none: 0px;
|
|
14
14
|
--border-width-thin: 1px;
|
|
15
15
|
--border-width-thick: 1.5px;
|
|
16
|
+
--breakpoints-base: 0px;
|
|
16
17
|
--breakpoints-xs: 320px;
|
|
17
18
|
--breakpoints-s: 480px;
|
|
18
19
|
--breakpoints-m: 768px;
|
|
19
20
|
--breakpoints-l: 1024px;
|
|
20
21
|
--breakpoints-xl: 1200px;
|
|
21
|
-
--breakpoints-max: 1201px;
|
|
22
22
|
--colors-surface-background-level1-low-contrast: hsla(220, 30%, 96%, 1);
|
|
23
23
|
--colors-surface-background-level1-high-contrast: hsla(217, 56%, 17%, 1);
|
|
24
24
|
--colors-surface-background-level2-low-contrast: hsla(0, 0%, 100%, 1);
|
package/build/tokens/index.d.ts
CHANGED
|
@@ -26,18 +26,73 @@ declare type Border$1 = Readonly<{
|
|
|
26
26
|
}>;
|
|
27
27
|
|
|
28
28
|
declare type Breakpoints$1 = Readonly<{
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* `base` is used for responsive styling following a **mobile first** approach. It starts from 0px till the next existing token
|
|
31
|
+
*
|
|
32
|
+
* Think of this as styles without any media query.
|
|
33
|
+
*
|
|
34
|
+
* ### Example
|
|
35
|
+
*
|
|
36
|
+
* This code will set margin as `spacing.2` on "m" size screens and above. And as `spacing.1` on less than "m" size screens
|
|
37
|
+
* ```jsx
|
|
38
|
+
* <Box margin={{ base: 'spacing.1', m: 'spacing.2' }} />
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* This roughly translates into -
|
|
42
|
+
*
|
|
43
|
+
* ```
|
|
44
|
+
* .Box {
|
|
45
|
+
* margin: 'spacing.1';
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* @media screen and (min-width: 768px) {
|
|
49
|
+
* .Box {
|
|
50
|
+
* margin: 'spacing.2';
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
base: number;
|
|
56
|
+
/**
|
|
57
|
+
* `@media screen and (min-width: 320px)`
|
|
58
|
+
*
|
|
59
|
+
* Small Mobiles
|
|
60
|
+
*/
|
|
30
61
|
xs: number;
|
|
31
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* `@media screen and (min-width: 480px)`
|
|
64
|
+
*
|
|
65
|
+
* Mobiles and Small Tablets
|
|
66
|
+
*/
|
|
32
67
|
s: number;
|
|
33
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* `@media screen and (min-width: 768px)`
|
|
70
|
+
*
|
|
71
|
+
* Medium and Large Tablets.
|
|
72
|
+
*
|
|
73
|
+
* Dimensions with `m` and above can be treated as desktop in mobile-first approach (with min-width).
|
|
74
|
+
* Hence this breakpoint can be used for desktop styling.
|
|
75
|
+
*
|
|
76
|
+
* E.g. next example will keep flexDirection `row` on mobiles and `column` on large tablets, desktop, and larger screens
|
|
77
|
+
*
|
|
78
|
+
* ```jsx
|
|
79
|
+
* <Box display="flex" flexDirection={{ base: 'row', m: 'column' }} />
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
34
83
|
m: number;
|
|
35
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* `@media screen and (min-width: 1024px)`
|
|
86
|
+
*
|
|
87
|
+
* Desktop
|
|
88
|
+
*/
|
|
36
89
|
l: number;
|
|
37
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* `@media screen and (min-width: 1200px)`
|
|
92
|
+
*
|
|
93
|
+
* HD Desktop
|
|
94
|
+
*/
|
|
38
95
|
xl: number;
|
|
39
|
-
/** min width: 1201px */
|
|
40
|
-
max: number;
|
|
41
96
|
}>;
|
|
42
97
|
|
|
43
98
|
declare type ColorChromaticScale = Readonly<{
|
|
@@ -269,6 +324,11 @@ declare type Typography$1 = {
|
|
|
269
324
|
};
|
|
270
325
|
};
|
|
271
326
|
|
|
327
|
+
/**
|
|
328
|
+
* When any of the values are changed here, do change the jsdoc comments in BaseBox/types/spacingTypes.ts as well
|
|
329
|
+
*
|
|
330
|
+
* {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
|
|
331
|
+
*/
|
|
272
332
|
declare type Spacing$1 = Readonly<{
|
|
273
333
|
/** 0: 0(px/rem/pt) */
|
|
274
334
|
0: 0;
|
|
@@ -326,18 +386,73 @@ type Border = Readonly<{
|
|
|
326
386
|
}>;
|
|
327
387
|
|
|
328
388
|
type Breakpoints = Readonly<{
|
|
329
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* `base` is used for responsive styling following a **mobile first** approach. It starts from 0px till the next existing token
|
|
391
|
+
*
|
|
392
|
+
* Think of this as styles without any media query.
|
|
393
|
+
*
|
|
394
|
+
* ### Example
|
|
395
|
+
*
|
|
396
|
+
* This code will set margin as `spacing.2` on "m" size screens and above. And as `spacing.1` on less than "m" size screens
|
|
397
|
+
* ```jsx
|
|
398
|
+
* <Box margin={{ base: 'spacing.1', m: 'spacing.2' }} />
|
|
399
|
+
* ```
|
|
400
|
+
*
|
|
401
|
+
* This roughly translates into -
|
|
402
|
+
*
|
|
403
|
+
* ```
|
|
404
|
+
* .Box {
|
|
405
|
+
* margin: 'spacing.1';
|
|
406
|
+
* }
|
|
407
|
+
*
|
|
408
|
+
* @media screen and (min-width: 768px) {
|
|
409
|
+
* .Box {
|
|
410
|
+
* margin: 'spacing.2';
|
|
411
|
+
* }
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
base: number;
|
|
416
|
+
/**
|
|
417
|
+
* `@media screen and (min-width: 320px)`
|
|
418
|
+
*
|
|
419
|
+
* Small Mobiles
|
|
420
|
+
*/
|
|
330
421
|
xs: number;
|
|
331
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* `@media screen and (min-width: 480px)`
|
|
424
|
+
*
|
|
425
|
+
* Mobiles and Small Tablets
|
|
426
|
+
*/
|
|
332
427
|
s: number;
|
|
333
|
-
/**
|
|
428
|
+
/**
|
|
429
|
+
* `@media screen and (min-width: 768px)`
|
|
430
|
+
*
|
|
431
|
+
* Medium and Large Tablets.
|
|
432
|
+
*
|
|
433
|
+
* Dimensions with `m` and above can be treated as desktop in mobile-first approach (with min-width).
|
|
434
|
+
* Hence this breakpoint can be used for desktop styling.
|
|
435
|
+
*
|
|
436
|
+
* E.g. next example will keep flexDirection `row` on mobiles and `column` on large tablets, desktop, and larger screens
|
|
437
|
+
*
|
|
438
|
+
* ```jsx
|
|
439
|
+
* <Box display="flex" flexDirection={{ base: 'row', m: 'column' }} />
|
|
440
|
+
* ```
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
334
443
|
m: number;
|
|
335
|
-
/**
|
|
444
|
+
/**
|
|
445
|
+
* `@media screen and (min-width: 1024px)`
|
|
446
|
+
*
|
|
447
|
+
* Desktop
|
|
448
|
+
*/
|
|
336
449
|
l: number;
|
|
337
|
-
/**
|
|
450
|
+
/**
|
|
451
|
+
* `@media screen and (min-width: 1200px)`
|
|
452
|
+
*
|
|
453
|
+
* HD Desktop
|
|
454
|
+
*/
|
|
338
455
|
xl: number;
|
|
339
|
-
/** min width: 1201px */
|
|
340
|
-
max: number;
|
|
341
456
|
}>;
|
|
342
457
|
|
|
343
458
|
type FontFamily = {
|
|
@@ -492,6 +607,12 @@ type TypographyPlatforms = 'onDesktop' | 'onMobile';
|
|
|
492
607
|
|
|
493
608
|
type TypographyWithPlatforms = Record<TypographyPlatforms, Typography>;
|
|
494
609
|
|
|
610
|
+
/**
|
|
611
|
+
* When any of the values are changed here, do change the jsdoc comments in BaseBox/types/spacingTypes.ts as well
|
|
612
|
+
*
|
|
613
|
+
* {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
|
|
614
|
+
*/
|
|
615
|
+
|
|
495
616
|
type Spacing = Readonly<{
|
|
496
617
|
/** 0: 0(px/rem/pt) */
|
|
497
618
|
0: 0;
|
|
@@ -26,18 +26,73 @@ declare type Border$1 = Readonly<{
|
|
|
26
26
|
}>;
|
|
27
27
|
|
|
28
28
|
declare type Breakpoints$1 = Readonly<{
|
|
29
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* `base` is used for responsive styling following a **mobile first** approach. It starts from 0px till the next existing token
|
|
31
|
+
*
|
|
32
|
+
* Think of this as styles without any media query.
|
|
33
|
+
*
|
|
34
|
+
* ### Example
|
|
35
|
+
*
|
|
36
|
+
* This code will set margin as `spacing.2` on "m" size screens and above. And as `spacing.1` on less than "m" size screens
|
|
37
|
+
* ```jsx
|
|
38
|
+
* <Box margin={{ base: 'spacing.1', m: 'spacing.2' }} />
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* This roughly translates into -
|
|
42
|
+
*
|
|
43
|
+
* ```
|
|
44
|
+
* .Box {
|
|
45
|
+
* margin: 'spacing.1';
|
|
46
|
+
* }
|
|
47
|
+
*
|
|
48
|
+
* @media screen and (min-width: 768px) {
|
|
49
|
+
* .Box {
|
|
50
|
+
* margin: 'spacing.2';
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
base: number;
|
|
56
|
+
/**
|
|
57
|
+
* `@media screen and (min-width: 320px)`
|
|
58
|
+
*
|
|
59
|
+
* Small Mobiles
|
|
60
|
+
*/
|
|
30
61
|
xs: number;
|
|
31
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* `@media screen and (min-width: 480px)`
|
|
64
|
+
*
|
|
65
|
+
* Mobiles and Small Tablets
|
|
66
|
+
*/
|
|
32
67
|
s: number;
|
|
33
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* `@media screen and (min-width: 768px)`
|
|
70
|
+
*
|
|
71
|
+
* Medium and Large Tablets.
|
|
72
|
+
*
|
|
73
|
+
* Dimensions with `m` and above can be treated as desktop in mobile-first approach (with min-width).
|
|
74
|
+
* Hence this breakpoint can be used for desktop styling.
|
|
75
|
+
*
|
|
76
|
+
* E.g. next example will keep flexDirection `row` on mobiles and `column` on large tablets, desktop, and larger screens
|
|
77
|
+
*
|
|
78
|
+
* ```jsx
|
|
79
|
+
* <Box display="flex" flexDirection={{ base: 'row', m: 'column' }} />
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
34
83
|
m: number;
|
|
35
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* `@media screen and (min-width: 1024px)`
|
|
86
|
+
*
|
|
87
|
+
* Desktop
|
|
88
|
+
*/
|
|
36
89
|
l: number;
|
|
37
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* `@media screen and (min-width: 1200px)`
|
|
92
|
+
*
|
|
93
|
+
* HD Desktop
|
|
94
|
+
*/
|
|
38
95
|
xl: number;
|
|
39
|
-
/** min width: 1201px */
|
|
40
|
-
max: number;
|
|
41
96
|
}>;
|
|
42
97
|
|
|
43
98
|
declare type ColorChromaticScale = Readonly<{
|
|
@@ -269,6 +324,11 @@ declare type Typography$1 = {
|
|
|
269
324
|
};
|
|
270
325
|
};
|
|
271
326
|
|
|
327
|
+
/**
|
|
328
|
+
* When any of the values are changed here, do change the jsdoc comments in BaseBox/types/spacingTypes.ts as well
|
|
329
|
+
*
|
|
330
|
+
* {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
|
|
331
|
+
*/
|
|
272
332
|
declare type Spacing$1 = Readonly<{
|
|
273
333
|
/** 0: 0(px/rem/pt) */
|
|
274
334
|
0: 0;
|
|
@@ -326,18 +386,73 @@ type Border = Readonly<{
|
|
|
326
386
|
}>;
|
|
327
387
|
|
|
328
388
|
type Breakpoints = Readonly<{
|
|
329
|
-
/**
|
|
389
|
+
/**
|
|
390
|
+
* `base` is used for responsive styling following a **mobile first** approach. It starts from 0px till the next existing token
|
|
391
|
+
*
|
|
392
|
+
* Think of this as styles without any media query.
|
|
393
|
+
*
|
|
394
|
+
* ### Example
|
|
395
|
+
*
|
|
396
|
+
* This code will set margin as `spacing.2` on "m" size screens and above. And as `spacing.1` on less than "m" size screens
|
|
397
|
+
* ```jsx
|
|
398
|
+
* <Box margin={{ base: 'spacing.1', m: 'spacing.2' }} />
|
|
399
|
+
* ```
|
|
400
|
+
*
|
|
401
|
+
* This roughly translates into -
|
|
402
|
+
*
|
|
403
|
+
* ```
|
|
404
|
+
* .Box {
|
|
405
|
+
* margin: 'spacing.1';
|
|
406
|
+
* }
|
|
407
|
+
*
|
|
408
|
+
* @media screen and (min-width: 768px) {
|
|
409
|
+
* .Box {
|
|
410
|
+
* margin: 'spacing.2';
|
|
411
|
+
* }
|
|
412
|
+
* }
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
base: number;
|
|
416
|
+
/**
|
|
417
|
+
* `@media screen and (min-width: 320px)`
|
|
418
|
+
*
|
|
419
|
+
* Small Mobiles
|
|
420
|
+
*/
|
|
330
421
|
xs: number;
|
|
331
|
-
/**
|
|
422
|
+
/**
|
|
423
|
+
* `@media screen and (min-width: 480px)`
|
|
424
|
+
*
|
|
425
|
+
* Mobiles and Small Tablets
|
|
426
|
+
*/
|
|
332
427
|
s: number;
|
|
333
|
-
/**
|
|
428
|
+
/**
|
|
429
|
+
* `@media screen and (min-width: 768px)`
|
|
430
|
+
*
|
|
431
|
+
* Medium and Large Tablets.
|
|
432
|
+
*
|
|
433
|
+
* Dimensions with `m` and above can be treated as desktop in mobile-first approach (with min-width).
|
|
434
|
+
* Hence this breakpoint can be used for desktop styling.
|
|
435
|
+
*
|
|
436
|
+
* E.g. next example will keep flexDirection `row` on mobiles and `column` on large tablets, desktop, and larger screens
|
|
437
|
+
*
|
|
438
|
+
* ```jsx
|
|
439
|
+
* <Box display="flex" flexDirection={{ base: 'row', m: 'column' }} />
|
|
440
|
+
* ```
|
|
441
|
+
*
|
|
442
|
+
*/
|
|
334
443
|
m: number;
|
|
335
|
-
/**
|
|
444
|
+
/**
|
|
445
|
+
* `@media screen and (min-width: 1024px)`
|
|
446
|
+
*
|
|
447
|
+
* Desktop
|
|
448
|
+
*/
|
|
336
449
|
l: number;
|
|
337
|
-
/**
|
|
450
|
+
/**
|
|
451
|
+
* `@media screen and (min-width: 1200px)`
|
|
452
|
+
*
|
|
453
|
+
* HD Desktop
|
|
454
|
+
*/
|
|
338
455
|
xl: number;
|
|
339
|
-
/** min width: 1201px */
|
|
340
|
-
max: number;
|
|
341
456
|
}>;
|
|
342
457
|
|
|
343
458
|
type FontFamily = {
|
|
@@ -492,6 +607,12 @@ type TypographyPlatforms = 'onDesktop' | 'onMobile';
|
|
|
492
607
|
|
|
493
608
|
type TypographyWithPlatforms = Record<TypographyPlatforms, Typography>;
|
|
494
609
|
|
|
610
|
+
/**
|
|
611
|
+
* When any of the values are changed here, do change the jsdoc comments in BaseBox/types/spacingTypes.ts as well
|
|
612
|
+
*
|
|
613
|
+
* {@link ../../components/Box/BaseBox/types/spacingTypes.ts}
|
|
614
|
+
*/
|
|
615
|
+
|
|
495
616
|
type Spacing = Readonly<{
|
|
496
617
|
/** 0: 0(px/rem/pt) */
|
|
497
618
|
0: 0;
|
|
@@ -11,7 +11,7 @@ var colors$2={chromatic:{azure:{50:"hsla(222, 100%, 96%, "+opacities[9]+")",100:
|
|
|
11
11
|
|
|
12
12
|
var border={radius:{none:0,small:2,medium:4,large:8,max:9999,round:'50%'},width:{none:0,thin:1,thick:1.5}};
|
|
13
13
|
|
|
14
|
-
var breakpoints={xs:320,s:480,m:768,l:1024,xl:1200
|
|
14
|
+
var breakpoints={base:0,xs:320,s:480,m:768,l:1024,xl:1200};
|
|
15
15
|
|
|
16
16
|
var spacing={0:0,1:2,2:4,3:8,4:12,5:16,6:20,7:24,8:32,9:40,10:48,11:56};
|
|
17
17
|
|