@coinbase/cds-mobile 9.0.0-rc.2 → 9.0.0-rc.3
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 +76 -0
- package/dts/buttons/IconButton.d.ts +19 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/cells/Cell.d.ts +2 -1
- package/dts/cells/Cell.d.ts.map +1 -1
- package/dts/controls/InputIconButton.d.ts +5 -0
- package/dts/controls/InputIconButton.d.ts.map +1 -1
- package/dts/controls/InputLabel.d.ts.map +1 -1
- package/dts/controls/SearchInput.d.ts +4 -0
- package/dts/controls/SearchInput.d.ts.map +1 -1
- package/dts/controls/TextInput.d.ts.map +1 -1
- package/dts/core/theme.d.ts +12 -0
- package/dts/core/theme.d.ts.map +1 -1
- package/dts/illustrations/createIllustration.d.ts +3 -0
- package/dts/illustrations/createIllustration.d.ts.map +1 -1
- package/dts/page/PageFooter.d.ts +8 -0
- package/dts/page/PageFooter.d.ts.map +1 -1
- package/dts/system/ThemeProvider.d.ts.map +1 -1
- package/dts/tabs/DefaultTab.d.ts +4 -2
- package/dts/tabs/DefaultTab.d.ts.map +1 -1
- package/dts/tabs/DefaultTabsActiveIndicator.d.ts.map +1 -1
- package/dts/tabs/SegmentedTab.d.ts +4 -4
- package/dts/tabs/Tabs.d.ts +10 -1
- package/dts/tabs/Tabs.d.ts.map +1 -1
- package/dts/tag/Tag.d.ts +5 -3
- package/dts/tag/Tag.d.ts.map +1 -1
- package/dts/themes/coinbaseDenseTheme.d.ts +34 -2
- package/dts/themes/coinbaseDenseTheme.d.ts.map +1 -1
- package/dts/themes/coinbaseHighContrastTheme.d.ts +32 -0
- package/dts/themes/coinbaseHighContrastTheme.d.ts.map +1 -1
- package/dts/themes/coinbaseTheme.d.ts +34 -2
- package/dts/themes/coinbaseTheme.d.ts.map +1 -1
- package/dts/themes/defaultHighContrastTheme.d.ts +32 -0
- package/dts/themes/defaultHighContrastTheme.d.ts.map +1 -1
- package/dts/themes/defaultTheme.d.ts +34 -2
- package/dts/themes/defaultTheme.d.ts.map +1 -1
- package/dts/utils/convertThemedSvgToHex.d.ts +6 -0
- package/dts/utils/convertThemedSvgToHex.d.ts.map +1 -0
- package/dts/utils/testHelpers.d.ts +34 -2
- package/dts/utils/testHelpers.d.ts.map +1 -1
- package/dts/visualizations/chart/PeriodSelector.d.ts.map +1 -1
- package/esm/buttons/IconButton.js +8 -2
- package/esm/buttons/__stories__/IconButton.stories.js +65 -0
- package/esm/controls/InputLabel.js +4 -3
- package/esm/controls/TextInput.js +7 -1
- package/esm/illustrations/__stories__/ThemedIllustrations.stories.js +214 -0
- package/esm/illustrations/__stories__/illustrationThemes.js +122 -0
- package/esm/illustrations/createIllustration.js +31 -5
- package/esm/page/PageFooter.js +16 -5
- package/esm/page/__figma__/PageFooter.figma.js +49 -6
- package/esm/system/ThemeProvider.js +3 -1
- package/esm/system/__stories__/componentConfigStickerSheet/StickerSheet.js +4 -0
- package/esm/system/__stories__/componentConfigStickerSheet/customComponentConfig.js +24 -12
- package/esm/system/__stories__/componentConfigStickerSheet/examples/ListCell.js +2 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/Tabs.js +24 -0
- package/esm/system/__stories__/componentConfigStickerSheet/examples/TextInput.js +12 -0
- package/esm/tabs/DefaultTab.js +7 -9
- package/esm/tabs/DefaultTabsActiveIndicator.js +1 -2
- package/esm/tabs/Tabs.js +18 -12
- package/esm/tabs/__stories__/SegmentedTabs.stories.js +8 -1
- package/esm/tabs/__stories__/Tabs.stories.js +0 -1
- package/esm/tag/Tag.js +14 -4
- package/esm/themes/coinbaseHighContrastTheme.js +32 -0
- package/esm/themes/coinbaseTheme.js +34 -2
- package/esm/themes/defaultHighContrastTheme.js +32 -0
- package/esm/themes/defaultTheme.js +34 -2
- package/esm/utils/convertThemedSvgToHex.js +9 -0
- package/esm/visualizations/chart/PeriodSelector.js +3 -4
- package/package.json +3 -3
|
@@ -312,7 +312,7 @@ export declare const coinbaseTheme: {
|
|
|
312
312
|
readonly bgNegativeWash: 'rgb(255,245,246)';
|
|
313
313
|
readonly bgPositive: 'rgb(9,133,81)';
|
|
314
314
|
readonly bgPositiveWash: 'rgb(245,255,251)';
|
|
315
|
-
readonly bgWarning: 'rgb(
|
|
315
|
+
readonly bgWarning: 'rgb(207,71,14)';
|
|
316
316
|
readonly bgWarningWash: 'rgb(255,250,245)';
|
|
317
317
|
readonly currentColor: 'currentColor';
|
|
318
318
|
readonly bgLine: 'rgba(91,97,110,0.2)';
|
|
@@ -357,7 +357,7 @@ export declare const coinbaseTheme: {
|
|
|
357
357
|
readonly bgNegativeWash: 'rgb(51,0,4)';
|
|
358
358
|
readonly bgPositive: 'rgb(39,173,117)';
|
|
359
359
|
readonly bgPositiveWash: 'rgb(0,31,18)';
|
|
360
|
-
readonly bgWarning: 'rgb(
|
|
360
|
+
readonly bgWarning: 'rgb(240,120,54)';
|
|
361
361
|
readonly bgWarningWash: 'rgb(51,13,0)';
|
|
362
362
|
readonly currentColor: 'currentColor';
|
|
363
363
|
readonly bgLine: 'rgba(138,145,158,0.2)';
|
|
@@ -551,5 +551,37 @@ export declare const coinbaseTheme: {
|
|
|
551
551
|
readonly shadowRadius: 24;
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
|
+
readonly lightIllustrationColor: {
|
|
555
|
+
readonly primary: 'rgb(0,82,255)';
|
|
556
|
+
readonly black: 'rgb(10,11,13)';
|
|
557
|
+
readonly white: 'rgb(255,255,255)';
|
|
558
|
+
readonly gray: 'rgb(206,210,219)';
|
|
559
|
+
readonly gray2: 'rgb(10, 11, 15)';
|
|
560
|
+
readonly gray3: 'rgb(206, 210, 220)';
|
|
561
|
+
readonly positive: 'rgb(60,194,138)';
|
|
562
|
+
readonly negative: 'rgb(225,57,71)';
|
|
563
|
+
readonly accent1: 'rgb(255, 210, 0)';
|
|
564
|
+
readonly accent2: 'rgb(93,226,248)';
|
|
565
|
+
readonly accent3: 'rgb(237,112,47)';
|
|
566
|
+
readonly accent4: 'rgb(115,162,255)';
|
|
567
|
+
readonly invert: 'rgb(10, 11, 14)';
|
|
568
|
+
readonly invert2: 'rgb(255, 255, 254)';
|
|
569
|
+
};
|
|
570
|
+
readonly darkIllustrationColor: {
|
|
571
|
+
readonly primary: 'rgb(87,139,250)';
|
|
572
|
+
readonly black: 'rgb(10,11,13)';
|
|
573
|
+
readonly white: 'rgb(255,255,255)';
|
|
574
|
+
readonly gray: 'rgb(70,75,85)';
|
|
575
|
+
readonly gray2: 'rgb(70,75,85)';
|
|
576
|
+
readonly gray3: 'rgb(255,255,255)';
|
|
577
|
+
readonly positive: 'rgb(68,194,141)';
|
|
578
|
+
readonly negative: 'rgb(240,97,109)';
|
|
579
|
+
readonly accent1: 'rgb(236, 208, 105)';
|
|
580
|
+
readonly accent2: 'rgb(69,217,245)';
|
|
581
|
+
readonly accent3: 'rgb(240,120,54)';
|
|
582
|
+
readonly accent4: 'rgb(132,170,253)';
|
|
583
|
+
readonly invert: 'rgb(255,255,255)';
|
|
584
|
+
readonly invert2: 'rgb(114,120,134)';
|
|
585
|
+
};
|
|
554
586
|
};
|
|
555
587
|
//# sourceMappingURL=coinbaseTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coinbaseTheme.d.ts","sourceRoot":"","sources":["../../src/themes/coinbaseTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,aAAa,CAAC;AAsS1C,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"coinbaseTheme.d.ts","sourceRoot":"","sources":["../../src/themes/coinbaseTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,aAAa,CAAC;AAsS1C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8SM,CAAC"}
|
|
@@ -551,5 +551,37 @@ export declare const defaultHighContrastTheme: {
|
|
|
551
551
|
readonly shadowRadius: 24;
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
|
+
readonly lightIllustrationColor: {
|
|
555
|
+
readonly primary: 'rgb(0,82,255)';
|
|
556
|
+
readonly black: 'rgb(10,11,13)';
|
|
557
|
+
readonly white: 'rgb(255,255,255)';
|
|
558
|
+
readonly gray: 'rgb(206,210,219)';
|
|
559
|
+
readonly gray2: 'rgb(10, 11, 15)';
|
|
560
|
+
readonly gray3: 'rgb(206, 210, 220)';
|
|
561
|
+
readonly positive: 'rgb(60,194,138)';
|
|
562
|
+
readonly negative: 'rgb(225,57,71)';
|
|
563
|
+
readonly accent1: 'rgb(255, 210, 0)';
|
|
564
|
+
readonly accent2: 'rgb(93,226,248)';
|
|
565
|
+
readonly accent3: 'rgb(237,112,47)';
|
|
566
|
+
readonly accent4: 'rgb(115,162,255)';
|
|
567
|
+
readonly invert: 'rgb(10, 11, 14)';
|
|
568
|
+
readonly invert2: 'rgb(255, 255, 254)';
|
|
569
|
+
};
|
|
570
|
+
readonly darkIllustrationColor: {
|
|
571
|
+
readonly primary: 'rgb(87,139,250)';
|
|
572
|
+
readonly black: 'rgb(10,11,13)';
|
|
573
|
+
readonly white: 'rgb(255,255,255)';
|
|
574
|
+
readonly gray: 'rgb(70,75,85)';
|
|
575
|
+
readonly gray2: 'rgb(70,75,85)';
|
|
576
|
+
readonly gray3: 'rgb(255,255,255)';
|
|
577
|
+
readonly positive: 'rgb(68,194,141)';
|
|
578
|
+
readonly negative: 'rgb(240,97,109)';
|
|
579
|
+
readonly accent1: 'rgb(236, 208, 105)';
|
|
580
|
+
readonly accent2: 'rgb(69,217,245)';
|
|
581
|
+
readonly accent3: 'rgb(240,120,54)';
|
|
582
|
+
readonly accent4: 'rgb(143,178,255)';
|
|
583
|
+
readonly invert: 'rgb(255,255,255)';
|
|
584
|
+
readonly invert2: 'rgb(114,120,134)';
|
|
585
|
+
};
|
|
554
586
|
};
|
|
555
587
|
//# sourceMappingURL=defaultHighContrastTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultHighContrastTheme.d.ts","sourceRoot":"","sources":["../../src/themes/defaultHighContrastTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AAsStE,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"defaultHighContrastTheme.d.ts","sourceRoot":"","sources":["../../src/themes/defaultHighContrastTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,8BAA8B,CAAC;AAsStE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8SL,CAAC"}
|
|
@@ -312,7 +312,7 @@ export declare const defaultTheme: {
|
|
|
312
312
|
readonly bgNegativeWash: 'rgb(255,245,246)';
|
|
313
313
|
readonly bgPositive: 'rgb(9,133,81)';
|
|
314
314
|
readonly bgPositiveWash: 'rgb(245,255,251)';
|
|
315
|
-
readonly bgWarning: 'rgb(
|
|
315
|
+
readonly bgWarning: 'rgb(207,71,14)';
|
|
316
316
|
readonly bgWarningWash: 'rgb(255,250,245)';
|
|
317
317
|
readonly currentColor: 'currentColor';
|
|
318
318
|
readonly bgLine: 'rgba(91,97,110,0.2)';
|
|
@@ -357,7 +357,7 @@ export declare const defaultTheme: {
|
|
|
357
357
|
readonly bgNegativeWash: 'rgb(51,0,4)';
|
|
358
358
|
readonly bgPositive: 'rgb(39,173,117)';
|
|
359
359
|
readonly bgPositiveWash: 'rgb(0,31,18)';
|
|
360
|
-
readonly bgWarning: 'rgb(
|
|
360
|
+
readonly bgWarning: 'rgb(240,120,54)';
|
|
361
361
|
readonly bgWarningWash: 'rgb(51,13,0)';
|
|
362
362
|
readonly currentColor: 'currentColor';
|
|
363
363
|
readonly bgLine: 'rgba(138,145,158,0.2)';
|
|
@@ -381,6 +381,38 @@ export declare const defaultTheme: {
|
|
|
381
381
|
readonly accentBoldGray: 'rgb(193,198,207)';
|
|
382
382
|
readonly transparent: 'rgba(10,11,13,0)';
|
|
383
383
|
};
|
|
384
|
+
readonly lightIllustrationColor: {
|
|
385
|
+
readonly primary: 'rgb(0,82,255)';
|
|
386
|
+
readonly black: 'rgb(10,11,13)';
|
|
387
|
+
readonly white: 'rgb(255,255,255)';
|
|
388
|
+
readonly gray: 'rgb(206,210,219)';
|
|
389
|
+
readonly gray2: 'rgb(10, 11, 15)';
|
|
390
|
+
readonly gray3: 'rgb(206, 210, 220)';
|
|
391
|
+
readonly positive: 'rgb(60,194,138)';
|
|
392
|
+
readonly negative: 'rgb(225,57,71)';
|
|
393
|
+
readonly accent1: 'rgb(255, 210, 0)';
|
|
394
|
+
readonly accent2: 'rgb(93,226,248)';
|
|
395
|
+
readonly accent3: 'rgb(237,112,47)';
|
|
396
|
+
readonly accent4: 'rgb(115,162,255)';
|
|
397
|
+
readonly invert: 'rgb(10, 11, 14)';
|
|
398
|
+
readonly invert2: 'rgb(255, 255, 254)';
|
|
399
|
+
};
|
|
400
|
+
readonly darkIllustrationColor: {
|
|
401
|
+
readonly primary: 'rgb(87,139,250)';
|
|
402
|
+
readonly black: 'rgb(10,11,13)';
|
|
403
|
+
readonly white: 'rgb(255,255,255)';
|
|
404
|
+
readonly gray: 'rgb(70,75,85)';
|
|
405
|
+
readonly gray2: 'rgb(70,75,85)';
|
|
406
|
+
readonly gray3: 'rgb(255,255,255)';
|
|
407
|
+
readonly positive: 'rgb(68,194,141)';
|
|
408
|
+
readonly negative: 'rgb(240,97,109)';
|
|
409
|
+
readonly accent1: 'rgb(236, 208, 105)';
|
|
410
|
+
readonly accent2: 'rgb(69,217,245)';
|
|
411
|
+
readonly accent3: 'rgb(240,120,54)';
|
|
412
|
+
readonly accent4: 'rgb(132,170,253)';
|
|
413
|
+
readonly invert: 'rgb(255,255,255)';
|
|
414
|
+
readonly invert2: 'rgb(114,120,134)';
|
|
415
|
+
};
|
|
384
416
|
readonly space: {
|
|
385
417
|
readonly '0': 0;
|
|
386
418
|
readonly '0.25': 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../src/themes/defaultTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAsS5C,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"defaultTheme.d.ts","sourceRoot":"","sources":["../../src/themes/defaultTheme.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,gBAAgB,CAAC;AAsS5C,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8SO,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThemeVars } from '@coinbase/cds-common/core/theme';
|
|
2
|
+
export declare const convertThemedSvgToHex: (
|
|
3
|
+
xml: string,
|
|
4
|
+
illustrationPalette: { [key in ThemeVars.IllustrationColor]: string },
|
|
5
|
+
) => string;
|
|
6
|
+
//# sourceMappingURL=convertThemedSvgToHex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"convertThemedSvgToHex.d.ts","sourceRoot":"","sources":["../../src/utils/convertThemedSvgToHex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAEjE,eAAO,MAAM,qBAAqB,GAChC,KAAK,MAAM,EACX,qBAAqB,GAAG,GAAG,IAAI,SAAS,CAAC,iBAAiB,GAAG,MAAM,GAAE,WAStE,CAAC"}
|
|
@@ -333,7 +333,7 @@ export declare const theme: {
|
|
|
333
333
|
readonly bgNegativeWash: 'rgb(255,245,246)';
|
|
334
334
|
readonly bgPositive: 'rgb(9,133,81)';
|
|
335
335
|
readonly bgPositiveWash: 'rgb(245,255,251)';
|
|
336
|
-
readonly bgWarning: 'rgb(
|
|
336
|
+
readonly bgWarning: 'rgb(207,71,14)';
|
|
337
337
|
readonly bgWarningWash: 'rgb(255,250,245)';
|
|
338
338
|
readonly currentColor: 'currentColor';
|
|
339
339
|
readonly bgLine: 'rgba(91,97,110,0.2)';
|
|
@@ -378,7 +378,7 @@ export declare const theme: {
|
|
|
378
378
|
readonly bgNegativeWash: 'rgb(51,0,4)';
|
|
379
379
|
readonly bgPositive: 'rgb(39,173,117)';
|
|
380
380
|
readonly bgPositiveWash: 'rgb(0,31,18)';
|
|
381
|
-
readonly bgWarning: 'rgb(
|
|
381
|
+
readonly bgWarning: 'rgb(240,120,54)';
|
|
382
382
|
readonly bgWarningWash: 'rgb(51,13,0)';
|
|
383
383
|
readonly currentColor: 'currentColor';
|
|
384
384
|
readonly bgLine: 'rgba(138,145,158,0.2)';
|
|
@@ -402,6 +402,38 @@ export declare const theme: {
|
|
|
402
402
|
readonly accentBoldGray: 'rgb(193,198,207)';
|
|
403
403
|
readonly transparent: 'rgba(10,11,13,0)';
|
|
404
404
|
};
|
|
405
|
+
readonly lightIllustrationColor: {
|
|
406
|
+
readonly primary: 'rgb(0,82,255)';
|
|
407
|
+
readonly black: 'rgb(10,11,13)';
|
|
408
|
+
readonly white: 'rgb(255,255,255)';
|
|
409
|
+
readonly gray: 'rgb(206,210,219)';
|
|
410
|
+
readonly gray2: 'rgb(10, 11, 15)';
|
|
411
|
+
readonly gray3: 'rgb(206, 210, 220)';
|
|
412
|
+
readonly positive: 'rgb(60,194,138)';
|
|
413
|
+
readonly negative: 'rgb(225,57,71)';
|
|
414
|
+
readonly accent1: 'rgb(255, 210, 0)';
|
|
415
|
+
readonly accent2: 'rgb(93,226,248)';
|
|
416
|
+
readonly accent3: 'rgb(237,112,47)';
|
|
417
|
+
readonly accent4: 'rgb(115,162,255)';
|
|
418
|
+
readonly invert: 'rgb(10, 11, 14)';
|
|
419
|
+
readonly invert2: 'rgb(255, 255, 254)';
|
|
420
|
+
};
|
|
421
|
+
readonly darkIllustrationColor: {
|
|
422
|
+
readonly primary: 'rgb(87,139,250)';
|
|
423
|
+
readonly black: 'rgb(10,11,13)';
|
|
424
|
+
readonly white: 'rgb(255,255,255)';
|
|
425
|
+
readonly gray: 'rgb(70,75,85)';
|
|
426
|
+
readonly gray2: 'rgb(70,75,85)';
|
|
427
|
+
readonly gray3: 'rgb(255,255,255)';
|
|
428
|
+
readonly positive: 'rgb(68,194,141)';
|
|
429
|
+
readonly negative: 'rgb(240,97,109)';
|
|
430
|
+
readonly accent1: 'rgb(236, 208, 105)';
|
|
431
|
+
readonly accent2: 'rgb(69,217,245)';
|
|
432
|
+
readonly accent3: 'rgb(240,120,54)';
|
|
433
|
+
readonly accent4: 'rgb(132,170,253)';
|
|
434
|
+
readonly invert: 'rgb(255,255,255)';
|
|
435
|
+
readonly invert2: 'rgb(114,120,134)';
|
|
436
|
+
};
|
|
405
437
|
readonly space: {
|
|
406
438
|
readonly '0': 0;
|
|
407
439
|
readonly '0.25': 2;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/testHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAG7B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"testHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/testHelpers.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAIjD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAG7B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,iBAAiB,CAAC,EAAE,WAAW,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAe,CAAC;AAElC,eAAO,MAAM,oBAAoB,GAAI,yCAIlC,yBAAyB,4CAM3B,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAK3E;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,GACrD,OAAO,CAkBT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeriodSelector.d.ts","sourceRoot":"","sources":["../../../src/visualizations/chart/PeriodSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAc,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIhE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG5D,eAAO,MAAM,6BAA6B,GAAI,wDAK3C,wBAAwB,wDAmD1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAStD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;IAxBvB;;;OAGG;YACK,MAAM;IACd;;OAEG;cACO,OAAO;IACjB;;OAEG;YACK,GAAG;8BAyCZ,CAAC;
|
|
1
|
+
{"version":3,"file":"PeriodSelector.d.ts","sourceRoot":"","sources":["../../../src/visualizations/chart/PeriodSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAc,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIhE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC9B,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG5D,eAAO,MAAM,6BAA6B,GAAI,wDAK3C,wBAAwB,wDAmD1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAStD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;IAxBvB;;;OAGG;YACK,MAAM;IACd;;OAEG;cACO,OAAO;IACjB;;OAEG;YACK,GAAG;8BAyCZ,CAAC;AAQF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc;;YAhHK,CAAC;WACH,CAAC;uBAG5B,CAAC;;6BAwIH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "feedback", "flush", "padding", "loading", "progressCircleSize", "accessibilityHint", "accessibilityLabel"];
|
|
1
|
+
const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "feedback", "flush", "padding", "loading", "progressCircleSize", "style", "styles", "accessibilityHint", "accessibilityLabel"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import { forwardRef, memo } from 'react';
|
|
@@ -29,6 +29,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
29
29
|
padding = compact ? 1.5 : 2,
|
|
30
30
|
loading,
|
|
31
31
|
progressCircleSize,
|
|
32
|
+
styles,
|
|
32
33
|
accessibilityHint,
|
|
33
34
|
accessibilityLabel
|
|
34
35
|
} = mergedProps,
|
|
@@ -58,12 +59,14 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
58
59
|
marginEnd: flush === 'end' ? flushMargin : undefined,
|
|
59
60
|
marginStart: flush === 'start' ? flushMargin : undefined,
|
|
60
61
|
padding: padding,
|
|
62
|
+
style: styles == null ? void 0 : styles.root,
|
|
61
63
|
transparentWhileInactive: transparent
|
|
62
64
|
}, props, {
|
|
63
65
|
children: loading ? /*#__PURE__*/_jsx(ProgressCircle, {
|
|
64
66
|
indeterminate: true,
|
|
65
67
|
color: colorValue,
|
|
66
68
|
size: progressCircleSize != null ? progressCircleSize : iconSizeValue,
|
|
69
|
+
style: styles == null ? void 0 : styles.progressCircle,
|
|
67
70
|
testID: props.testID ? props.testID + "-progress-circle" : undefined,
|
|
68
71
|
weight: "thin"
|
|
69
72
|
}) :
|
|
@@ -73,7 +76,10 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
73
76
|
active: active,
|
|
74
77
|
color: colorValue,
|
|
75
78
|
name: name,
|
|
76
|
-
size: iconSize
|
|
79
|
+
size: iconSize,
|
|
80
|
+
styles: {
|
|
81
|
+
icon: styles == null ? void 0 : styles.icon
|
|
82
|
+
}
|
|
77
83
|
})
|
|
78
84
|
}));
|
|
79
85
|
}));
|
|
@@ -177,6 +177,71 @@ const IconButtonScreen = () => {
|
|
|
177
177
|
})]
|
|
178
178
|
})
|
|
179
179
|
})
|
|
180
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
181
|
+
inline: true,
|
|
182
|
+
title: "Icon Glyph Styles",
|
|
183
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
184
|
+
gap: 2,
|
|
185
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
flexDirection: "row",
|
|
188
|
+
gap: 2,
|
|
189
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
190
|
+
accessibilityLabel: "Custom color via styles.icon",
|
|
191
|
+
name: iconName,
|
|
192
|
+
styles: {
|
|
193
|
+
icon: {
|
|
194
|
+
color: 'dodgerblue'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
198
|
+
font: "body",
|
|
199
|
+
children: "Custom color via styles.icon"
|
|
200
|
+
})]
|
|
201
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
202
|
+
alignItems: "center",
|
|
203
|
+
flexDirection: "row",
|
|
204
|
+
gap: 2,
|
|
205
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
206
|
+
accessibilityLabel: "Rotated icon via styles.icon",
|
|
207
|
+
name: iconName,
|
|
208
|
+
styles: {
|
|
209
|
+
icon: {
|
|
210
|
+
transform: [{
|
|
211
|
+
rotate: '45deg'
|
|
212
|
+
}]
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
216
|
+
font: "body",
|
|
217
|
+
children: "Rotated icon via styles.icon"
|
|
218
|
+
})]
|
|
219
|
+
})]
|
|
220
|
+
})
|
|
221
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
222
|
+
inline: true,
|
|
223
|
+
title: "Progress Circle Styles",
|
|
224
|
+
children: /*#__PURE__*/_jsx(VStack, {
|
|
225
|
+
gap: 2,
|
|
226
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
227
|
+
alignItems: "center",
|
|
228
|
+
flexDirection: "row",
|
|
229
|
+
gap: 2,
|
|
230
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
231
|
+
loading: true,
|
|
232
|
+
accessibilityLabel: "Reduced opacity progress circle",
|
|
233
|
+
name: iconName,
|
|
234
|
+
styles: {
|
|
235
|
+
progressCircle: {
|
|
236
|
+
opacity: 0.3
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
240
|
+
font: "body",
|
|
241
|
+
children: "Reduced opacity"
|
|
242
|
+
})]
|
|
243
|
+
})
|
|
244
|
+
})
|
|
180
245
|
}), /*#__PURE__*/_jsx(Example, {
|
|
181
246
|
inline: true,
|
|
182
247
|
title: "Loading",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["color"];
|
|
1
|
+
const _excluded = ["color", "font"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { memo } from 'react';
|
|
@@ -6,12 +6,13 @@ import { Text } from '../typography/Text';
|
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const InputLabel = /*#__PURE__*/memo(function InputLabel(_ref) {
|
|
8
8
|
let {
|
|
9
|
-
color
|
|
9
|
+
color = 'fg',
|
|
10
|
+
font = 'label1'
|
|
10
11
|
} = _ref,
|
|
11
12
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
12
13
|
return /*#__PURE__*/_jsx(Text, _extends({
|
|
13
14
|
color: color,
|
|
14
|
-
font:
|
|
15
|
+
font: font,
|
|
15
16
|
paddingY: 0.5
|
|
16
17
|
}, props));
|
|
17
18
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["label", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "font", "compact", "suffix", "accessibilityLabel", "borderRadius", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "bordered", "focusedBorderWidth", "labelVariant", "labelNode", "inputBackground"];
|
|
1
|
+
const _excluded = ["label", "labelFont", "labelColor", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "font", "compact", "suffix", "accessibilityLabel", "borderRadius", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "bordered", "focusedBorderWidth", "labelVariant", "labelNode", "inputBackground"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
4
4
|
import React, { cloneElement, forwardRef, isValidElement, memo, useCallback, useMemo, useRef, useState } from 'react';
|
|
@@ -31,6 +31,8 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref)
|
|
|
31
31
|
const mergedProps = useComponentConfig('TextInput', _props);
|
|
32
32
|
const {
|
|
33
33
|
label,
|
|
34
|
+
labelFont = 'label1',
|
|
35
|
+
labelColor = 'fg',
|
|
34
36
|
helperText = '',
|
|
35
37
|
variant = 'foregroundMuted',
|
|
36
38
|
testID,
|
|
@@ -177,6 +179,8 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref)
|
|
|
177
179
|
background: readOnlyInputBackground
|
|
178
180
|
}, {
|
|
179
181
|
children: labelNode ? labelNode : /*#__PURE__*/_jsx(InputLabel, _extends({
|
|
182
|
+
color: labelColor,
|
|
183
|
+
font: labelFont,
|
|
180
184
|
testID: (_testIDMap$label = testIDMap == null ? void 0 : testIDMap.label) != null ? _testIDMap$label : ''
|
|
181
185
|
}, labelVariant === 'inside' && {
|
|
182
186
|
paddingTop: 0,
|
|
@@ -203,6 +207,8 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref)
|
|
|
203
207
|
children: /*#__PURE__*/_jsxs(HStack, {
|
|
204
208
|
paddingStart: compact && hasLabel ? 2 : undefined,
|
|
205
209
|
children: [compact && (labelNode ? labelNode : !!label && /*#__PURE__*/_jsx(InputLabel, {
|
|
210
|
+
color: labelColor,
|
|
211
|
+
font: labelFont,
|
|
206
212
|
children: label
|
|
207
213
|
})), !!start && /*#__PURE__*/_jsx(TextInputFocusVariantContext.Provider, {
|
|
208
214
|
value: focusedVariant,
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
|
+
import { Example, ExampleScreen } from '../../examples/ExampleScreen';
|
|
4
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
5
|
+
import { HStack, VStack } from '../../layout';
|
|
6
|
+
import { ThemeProvider } from '../../system/ThemeProvider';
|
|
7
|
+
import { SegmentedTabs } from '../../tabs/SegmentedTabs';
|
|
8
|
+
import { defaultTheme } from '../../themes/defaultTheme';
|
|
9
|
+
import { Text } from '../../typography/Text';
|
|
10
|
+
import { HeroSquare } from '../HeroSquare';
|
|
11
|
+
import { Pictogram } from '../Pictogram';
|
|
12
|
+
import { SpotIcon } from '../SpotIcon';
|
|
13
|
+
import { SpotRectangle } from '../SpotRectangle';
|
|
14
|
+
import { SpotSquare } from '../SpotSquare';
|
|
15
|
+
import { ILLUSTRATION_THEME_TABS, ILLUSTRATION_THEMES } from './illustrationThemes';
|
|
16
|
+
|
|
17
|
+
// ─── Illustration samples ────────────────────────────────────────────────────
|
|
18
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
const HERO_SQUARE_SAMPLES = ['accessToAdvancedCharts', 'accountUnderReview', 'add2Fa', 'addBankAccount', 'addCreditCard'];
|
|
20
|
+
const SPOT_SQUARE_SAMPLES = ['accessToAdvancedCharts', 'addCard', 'addEth', 'addMultipleCrypto', 'addPasswordProtection'];
|
|
21
|
+
const PICTOGRAM_SAMPLES = ['accountsNavigation', 'accreditedInvestor', 'add', 'addCard', 'addPayment'];
|
|
22
|
+
const SPOT_ICON_SAMPLES = ['advancedTradeProduct', 'arrowsUpDown', 'assetEmptyStateAa', 'assetEmptyStateAb', 'assetEmptyStateAc'];
|
|
23
|
+
const SPOT_RECTANGLE_SAMPLES = ['accessToAdvancedCharts', 'addBank', 'addPhoneNumber', 'advancedTradeCharts', 'advancedTrading'];
|
|
24
|
+
|
|
25
|
+
// ─── Helpers ─────────────────────────────────────────────────────────────────
|
|
26
|
+
|
|
27
|
+
const resolveTheme = key => key === 'default' ? defaultTheme : _extends({}, defaultTheme, ILLUSTRATION_THEMES[key]);
|
|
28
|
+
|
|
29
|
+
// ─── Story ───────────────────────────────────────────────────────────────────
|
|
30
|
+
|
|
31
|
+
const ThemedIllustrationsStory = () => {
|
|
32
|
+
var _activeTab$id;
|
|
33
|
+
const {
|
|
34
|
+
activeColorScheme
|
|
35
|
+
} = useTheme();
|
|
36
|
+
const [activeTab, setActiveTab] = useState(ILLUSTRATION_THEME_TABS[0]);
|
|
37
|
+
const handleChange = useCallback(tab => setActiveTab(tab), []);
|
|
38
|
+
const themeKey = (_activeTab$id = activeTab == null ? void 0 : activeTab.id) != null ? _activeTab$id : 'default';
|
|
39
|
+
const theme = resolveTheme(themeKey);
|
|
40
|
+
const garishTheme = resolveTheme('garish');
|
|
41
|
+
return /*#__PURE__*/_jsxs(ExampleScreen, {
|
|
42
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
43
|
+
title: "Side-by-side comparison",
|
|
44
|
+
children: /*#__PURE__*/_jsxs(HStack, {
|
|
45
|
+
gap: 4,
|
|
46
|
+
children: [/*#__PURE__*/_jsx(ThemeProvider, {
|
|
47
|
+
activeColorScheme: activeColorScheme,
|
|
48
|
+
theme: defaultTheme,
|
|
49
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
gap: 2,
|
|
52
|
+
padding: 2,
|
|
53
|
+
style: {
|
|
54
|
+
flex: 1
|
|
55
|
+
},
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
57
|
+
font: "label2",
|
|
58
|
+
children: "Default"
|
|
59
|
+
}), /*#__PURE__*/_jsx(HeroSquare, {
|
|
60
|
+
applyTheme: true,
|
|
61
|
+
name: "accessToAdvancedCharts",
|
|
62
|
+
scaleMultiplier: 0.35
|
|
63
|
+
}), /*#__PURE__*/_jsx(SpotSquare, {
|
|
64
|
+
applyTheme: true,
|
|
65
|
+
name: "accessToAdvancedCharts"
|
|
66
|
+
}), /*#__PURE__*/_jsx(Pictogram, {
|
|
67
|
+
applyTheme: true,
|
|
68
|
+
name: "add"
|
|
69
|
+
}), /*#__PURE__*/_jsx(SpotIcon, {
|
|
70
|
+
applyTheme: true,
|
|
71
|
+
name: "advancedTradeProduct"
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx(ThemeProvider, {
|
|
75
|
+
activeColorScheme: activeColorScheme,
|
|
76
|
+
theme: garishTheme,
|
|
77
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
78
|
+
alignItems: "center",
|
|
79
|
+
gap: 2,
|
|
80
|
+
padding: 2,
|
|
81
|
+
style: {
|
|
82
|
+
flex: 1
|
|
83
|
+
},
|
|
84
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
85
|
+
font: "label2",
|
|
86
|
+
children: "Garish"
|
|
87
|
+
}), /*#__PURE__*/_jsx(HeroSquare, {
|
|
88
|
+
applyTheme: true,
|
|
89
|
+
name: "accessToAdvancedCharts",
|
|
90
|
+
scaleMultiplier: 0.35
|
|
91
|
+
}), /*#__PURE__*/_jsx(SpotSquare, {
|
|
92
|
+
applyTheme: true,
|
|
93
|
+
name: "accessToAdvancedCharts"
|
|
94
|
+
}), /*#__PURE__*/_jsx(Pictogram, {
|
|
95
|
+
applyTheme: true,
|
|
96
|
+
name: "add"
|
|
97
|
+
}), /*#__PURE__*/_jsx(SpotIcon, {
|
|
98
|
+
applyTheme: true,
|
|
99
|
+
name: "advancedTradeProduct"
|
|
100
|
+
})]
|
|
101
|
+
})
|
|
102
|
+
})]
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
105
|
+
title: "Theme",
|
|
106
|
+
children: /*#__PURE__*/_jsx(SegmentedTabs, {
|
|
107
|
+
accessibilityLabel: "Select illustration theme",
|
|
108
|
+
activeTab: activeTab,
|
|
109
|
+
onChange: handleChange,
|
|
110
|
+
tabs: ILLUSTRATION_THEME_TABS
|
|
111
|
+
})
|
|
112
|
+
}), /*#__PURE__*/_jsxs(ThemeProvider, {
|
|
113
|
+
activeColorScheme: activeColorScheme,
|
|
114
|
+
theme: theme,
|
|
115
|
+
children: [/*#__PURE__*/_jsx(Example, {
|
|
116
|
+
title: "HeroSquare",
|
|
117
|
+
children: /*#__PURE__*/_jsx(HStack, {
|
|
118
|
+
flexWrap: "wrap",
|
|
119
|
+
gap: 2,
|
|
120
|
+
children: HERO_SQUARE_SAMPLES.map(name => /*#__PURE__*/_jsxs(VStack, {
|
|
121
|
+
alignItems: "center",
|
|
122
|
+
gap: 0,
|
|
123
|
+
children: [/*#__PURE__*/_jsx(HeroSquare, {
|
|
124
|
+
applyTheme: true,
|
|
125
|
+
name: name,
|
|
126
|
+
scaleMultiplier: 0.3
|
|
127
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
128
|
+
color: "fgMuted",
|
|
129
|
+
font: "legal",
|
|
130
|
+
numberOfLines: 1,
|
|
131
|
+
children: name
|
|
132
|
+
})]
|
|
133
|
+
}, name))
|
|
134
|
+
})
|
|
135
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
136
|
+
title: "SpotSquare",
|
|
137
|
+
children: /*#__PURE__*/_jsx(HStack, {
|
|
138
|
+
flexWrap: "wrap",
|
|
139
|
+
gap: 2,
|
|
140
|
+
children: SPOT_SQUARE_SAMPLES.map(name => /*#__PURE__*/_jsxs(VStack, {
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
gap: 0,
|
|
143
|
+
children: [/*#__PURE__*/_jsx(SpotSquare, {
|
|
144
|
+
applyTheme: true,
|
|
145
|
+
name: name
|
|
146
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
147
|
+
color: "fgMuted",
|
|
148
|
+
font: "legal",
|
|
149
|
+
numberOfLines: 1,
|
|
150
|
+
children: name
|
|
151
|
+
})]
|
|
152
|
+
}, name))
|
|
153
|
+
})
|
|
154
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
155
|
+
title: "Pictogram",
|
|
156
|
+
children: /*#__PURE__*/_jsx(HStack, {
|
|
157
|
+
flexWrap: "wrap",
|
|
158
|
+
gap: 2,
|
|
159
|
+
children: PICTOGRAM_SAMPLES.map(name => /*#__PURE__*/_jsxs(VStack, {
|
|
160
|
+
alignItems: "center",
|
|
161
|
+
gap: 0,
|
|
162
|
+
children: [/*#__PURE__*/_jsx(Pictogram, {
|
|
163
|
+
applyTheme: true,
|
|
164
|
+
name: name
|
|
165
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
166
|
+
color: "fgMuted",
|
|
167
|
+
font: "legal",
|
|
168
|
+
numberOfLines: 1,
|
|
169
|
+
children: name
|
|
170
|
+
})]
|
|
171
|
+
}, name))
|
|
172
|
+
})
|
|
173
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
174
|
+
title: "SpotIcon",
|
|
175
|
+
children: /*#__PURE__*/_jsx(HStack, {
|
|
176
|
+
flexWrap: "wrap",
|
|
177
|
+
gap: 2,
|
|
178
|
+
children: SPOT_ICON_SAMPLES.map(name => /*#__PURE__*/_jsxs(VStack, {
|
|
179
|
+
alignItems: "center",
|
|
180
|
+
gap: 0,
|
|
181
|
+
children: [/*#__PURE__*/_jsx(SpotIcon, {
|
|
182
|
+
applyTheme: true,
|
|
183
|
+
name: name
|
|
184
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
185
|
+
color: "fgMuted",
|
|
186
|
+
font: "legal",
|
|
187
|
+
numberOfLines: 1,
|
|
188
|
+
children: name
|
|
189
|
+
})]
|
|
190
|
+
}, name))
|
|
191
|
+
})
|
|
192
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
193
|
+
title: "SpotRectangle",
|
|
194
|
+
children: /*#__PURE__*/_jsx(VStack, {
|
|
195
|
+
gap: 2,
|
|
196
|
+
children: SPOT_RECTANGLE_SAMPLES.map(name => /*#__PURE__*/_jsxs(VStack, {
|
|
197
|
+
gap: 0,
|
|
198
|
+
children: [/*#__PURE__*/_jsx(SpotRectangle, {
|
|
199
|
+
applyTheme: true,
|
|
200
|
+
name: name,
|
|
201
|
+
scaleMultiplier: 0.5
|
|
202
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
203
|
+
color: "fgMuted",
|
|
204
|
+
font: "legal",
|
|
205
|
+
numberOfLines: 1,
|
|
206
|
+
children: name
|
|
207
|
+
})]
|
|
208
|
+
}, name))
|
|
209
|
+
})
|
|
210
|
+
})]
|
|
211
|
+
})]
|
|
212
|
+
});
|
|
213
|
+
};
|
|
214
|
+
export default ThemedIllustrationsStory;
|