@hero-design/rn 7.19.0 → 7.20.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/.eslintrc.json +6 -1
- package/.turbo/turbo-build.log +2 -2
- package/es/index.js +612 -242
- package/lib/index.js +612 -241
- package/package.json +4 -4
- package/src/components/Alert/StyledAlert.tsx +5 -5
- package/src/components/Alert/__tests__/__snapshots__/index.spec.tsx.snap +140 -19
- package/src/components/Alert/__tests__/index.spec.tsx +21 -0
- package/src/components/Alert/index.tsx +13 -6
- package/src/components/Avatar/StyledAvatar.tsx +2 -1
- package/src/components/Avatar/index.tsx +2 -1
- package/src/components/Box/StyledBox.tsx +54 -0
- package/src/components/Box/__tests__/__snapshots__/index.spec.tsx.snap +605 -0
- package/src/components/Box/__tests__/helpers.spec.ts +14 -0
- package/src/components/Box/__tests__/index.spec.tsx +155 -0
- package/src/components/Box/config.ts +201 -0
- package/src/components/Box/helpers.ts +10 -0
- package/src/components/Box/index.tsx +13 -0
- package/src/components/Box/types.ts +38 -0
- package/src/components/Calendar/__tests__/index.spec.tsx +13 -17
- package/src/components/Card/DataCard/StyledDataCard.tsx +8 -2
- package/src/components/Card/DataCard/__tests__/StyledDataCard.spec.tsx +1 -0
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +16 -0
- package/src/components/Card/DataCard/index.tsx +1 -1
- package/src/components/Card/StyledCard.tsx +12 -19
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +147 -0
- package/src/components/Card/__tests__/index.spec.tsx +18 -0
- package/src/components/Card/index.tsx +6 -1
- package/src/components/Drawer/DragableDrawer/helpers.ts +3 -4
- package/src/components/FAB/ActionGroup/index.tsx +6 -8
- package/src/components/RichTextEditor/EditorToolbar.tsx +19 -18
- package/src/components/RichTextEditor/RichTextEditor.tsx +7 -2
- package/src/components/RichTextEditor/StyledRichTextEditor.ts +0 -2
- package/src/components/RichTextEditor/__tests__/RichTextEditor.spec.tsx +11 -12
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -10
- package/src/components/RichTextEditor/constants.ts +0 -11
- package/src/components/RichTextEditor/index.tsx +0 -3
- package/src/components/RichTextEditor/types.ts +9 -0
- package/src/components/SectionHeading/__tests__/__snapshots__/StyledHeading.spec.tsx.snap +1 -1
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +22 -20
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +4 -4
- package/src/components/Spinner/AnimatedSpinner.tsx +7 -7
- package/src/components/Spinner/StyledSpinner.tsx +24 -19
- package/src/components/Spinner/__tests__/AnimatedSpinner.spec.tsx +1 -1
- package/src/components/Spinner/__tests__/StyledSpinner.spec.tsx +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +14 -12
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +273 -31
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +14 -12
- package/src/components/Spinner/index.tsx +10 -2
- package/src/components/Tabs/ScrollableTabs.tsx +9 -4
- package/src/components/Tabs/StyledScrollableTabs.tsx +6 -5
- package/src/components/Tabs/StyledTabs.tsx +6 -0
- package/src/components/Tabs/TabWithBadge.tsx +68 -0
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +13 -0
- package/src/components/Tabs/__tests__/TabWithBadge.spec.tsx +48 -0
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +205 -43
- package/src/components/Tabs/__tests__/__snapshots__/TabWithBadge.spec.tsx.snap +165 -0
- package/src/components/Tabs/__tests__/__snapshots__/index.spec.tsx.snap +135 -34
- package/src/components/Tabs/__tests__/index.spec.tsx +12 -0
- package/src/components/Tabs/index.tsx +11 -4
- package/src/components/Tag/StyledTag.tsx +1 -11
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +4 -4
- package/src/components/Tag/index.tsx +2 -2
- package/src/components/TextInput/__tests__/index.spec.tsx +10 -14
- package/src/components/Toast/StyledToast.tsx +13 -7
- package/src/components/Toast/Toast.tsx +34 -9
- package/src/components/Toast/ToastProvider.tsx +15 -12
- package/src/components/Toast/__tests__/Toast.spec.tsx +17 -0
- package/src/components/Toast/__tests__/__snapshots__/Toast.spec.tsx.snap +299 -19
- package/src/components/Toast/types.ts +15 -1
- package/src/components/Typography/Text/StyledText.tsx +7 -1
- package/src/components/Typography/Text/__tests__/StyledText.spec.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +22 -0
- package/src/components/Typography/Text/index.tsx +7 -1
- package/src/index.ts +2 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +76 -23
- package/src/theme/components/.eslintrc.json +10 -0
- package/src/theme/components/alert.ts +5 -1
- package/src/theme/components/avatar.ts +2 -0
- package/src/theme/components/card.ts +6 -7
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/spinner.ts +19 -7
- package/src/theme/components/tabs.ts +3 -2
- package/src/theme/components/tag.ts +13 -13
- package/src/theme/components/toast.ts +17 -3
- package/src/theme/components/typography.ts +2 -0
- package/src/theme/global/colors/swag.ts +23 -0
- package/src/theme/global/colors/types.ts +23 -0
- package/src/theme/global/colors/work.ts +5 -0
- package/src/types.ts +0 -2
- package/tsconfig.json +4 -15
- package/types/components/Accordion/StyledAccordion.d.ts +14 -14
- package/types/components/Alert/StyledAlert.d.ts +16 -16
- package/types/components/Alert/index.d.ts +1 -1
- package/types/components/Avatar/StyledAvatar.d.ts +16 -16
- package/types/components/Avatar/index.d.ts +2 -2
- package/types/components/Badge/StyledBadge.d.ts +7 -7
- package/types/components/BottomNavigation/StyledBottomNavigation.d.ts +21 -21
- package/types/components/BottomSheet/Header.d.ts +1 -1
- package/types/components/BottomSheet/StyledBottomSheet.d.ts +19 -19
- package/types/components/Box/StyledBox.d.ts +15 -0
- package/types/components/Box/__tests__/helpers.spec.d.ts +1 -0
- package/types/components/Box/__tests__/index.spec.d.ts +1 -0
- package/types/components/Box/config.d.ts +170 -0
- package/types/components/Box/helpers.d.ts +1 -0
- package/types/components/Box/index.d.ts +5 -0
- package/types/components/Box/types.d.ts +31 -0
- package/types/components/Button/LoadingIndicator/StyledLoadingIndicator.d.ts +7 -7
- package/types/components/Button/StyledButton.d.ts +16 -16
- package/types/components/Button/UtilityButton/StyledUtilityButton.d.ts +8 -8
- package/types/components/Calendar/StyledCalendar.d.ts +25 -25
- package/types/components/Calendar/helpers.d.ts +2 -2
- package/types/components/Card/DataCard/StyledDataCard.d.ts +7 -7
- package/types/components/Card/DataCard/index.d.ts +1 -1
- package/types/components/Card/StyledCard.d.ts +7 -6
- package/types/components/Card/index.d.ts +5 -1
- package/types/components/Checkbox/StyledCheckbox.d.ts +10 -10
- package/types/components/Collapse/StyledCollapse.d.ts +8 -8
- package/types/components/ContentNavigator/StyledContentNavigator.d.ts +5 -5
- package/types/components/DatePicker/StyledDatePicker.d.ts +3 -3
- package/types/components/Divider/StyledDivider.d.ts +5 -5
- package/types/components/Drawer/StyledDrawer.d.ts +19 -19
- package/types/components/Empty/StyledEmpty.d.ts +12 -12
- package/types/components/FAB/ActionGroup/StyledActionGroup.d.ts +11 -11
- package/types/components/FAB/ActionGroup/StyledActionItem.d.ts +7 -7
- package/types/components/FAB/StyledFAB.d.ts +8 -8
- package/types/components/Icon/HeroIcon/index.d.ts +3 -3
- package/types/components/List/StyledBasicListItem.d.ts +14 -14
- package/types/components/List/StyledListItem.d.ts +23 -23
- package/types/components/PinInput/StyledPinInput.d.ts +30 -30
- package/types/components/Progress/StyledProgressBar.d.ts +5 -5
- package/types/components/Progress/StyledProgressCircle.d.ts +18 -18
- package/types/components/Radio/StyledRadio.d.ts +9 -9
- package/types/components/RichTextEditor/EditorToolbar.d.ts +2 -2
- package/types/components/RichTextEditor/MentionList.d.ts +1 -1
- package/types/components/RichTextEditor/RichTextEditor.d.ts +4 -0
- package/types/components/RichTextEditor/StyledRichTextEditor.d.ts +6 -6
- package/types/components/RichTextEditor/StyledToolbar.d.ts +9 -9
- package/types/components/RichTextEditor/constants.d.ts +0 -10
- package/types/components/RichTextEditor/index.d.ts +2 -4
- package/types/components/RichTextEditor/types.d.ts +1 -0
- package/types/components/SectionHeading/StyledHeading.d.ts +9 -9
- package/types/components/Select/MultiSelect/Option.d.ts +1 -1
- package/types/components/Select/SingleSelect/Option.d.ts +1 -1
- package/types/components/Select/StyledSelect.d.ts +11 -11
- package/types/components/Select/helpers.d.ts +1 -1
- package/types/components/Spinner/AnimatedSpinner.d.ts +3 -1
- package/types/components/Spinner/StyledSpinner.d.ts +14 -12
- package/types/components/Spinner/index.d.ts +5 -1
- package/types/components/Switch/StyledSwitch.d.ts +5 -5
- package/types/components/Tabs/StyledScrollableTabs.d.ts +24 -22
- package/types/components/Tabs/StyledTabs.d.ts +26 -20
- package/types/components/Tabs/TabWithBadge.d.ts +17 -0
- package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +1 -0
- package/types/components/Tabs/index.d.ts +3 -1
- package/types/components/Tag/StyledTag.d.ts +6 -6
- package/types/components/Tag/index.d.ts +1 -1
- package/types/components/TextInput/StyledTextInput.d.ts +44 -44
- package/types/components/TextInput/index.d.ts +5 -5
- package/types/components/TimePicker/StyledTimePicker.d.ts +3 -3
- package/types/components/Toast/StyledToast.d.ts +19 -18
- package/types/components/Toast/types.d.ts +2 -1
- package/types/components/Toolbar/StyledToolbar.d.ts +9 -9
- package/types/components/Typography/Text/StyledText.d.ts +4 -4
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/index.d.ts +2 -1
- package/types/testHelpers/renderWithTheme.d.ts +1 -1
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/alert.d.ts +5 -1
- package/types/theme/components/avatar.d.ts +2 -0
- package/types/theme/components/card.d.ts +6 -7
- package/types/theme/components/spinner.d.ts +17 -5
- package/types/theme/components/tabs.d.ts +1 -0
- package/types/theme/components/tag.d.ts +2 -2
- package/types/theme/components/toast.d.ts +18 -2
- package/types/theme/components/typography.d.ts +2 -0
- package/types/theme/global/colors/types.d.ts +17 -0
- package/types/theme/global/index.d.ts +17 -0
- package/types/types.d.ts +1 -2
- package/types/utils/hooks.d.ts +1 -1
|
@@ -22,6 +22,7 @@ Object {
|
|
|
22
22
|
"divider": "#e8e9ea",
|
|
23
23
|
"error": "#f46363",
|
|
24
24
|
"info": "#b5c3fd",
|
|
25
|
+
"notification": "#ffffff",
|
|
25
26
|
"success": "#5ace7d",
|
|
26
27
|
"warning": "#ffbe71",
|
|
27
28
|
},
|
|
@@ -32,7 +33,10 @@ Object {
|
|
|
32
33
|
"height": 48,
|
|
33
34
|
},
|
|
34
35
|
"space": Object {
|
|
35
|
-
"
|
|
36
|
+
"contentPaddingHorizontal": 12,
|
|
37
|
+
"ctaPadding": 12,
|
|
38
|
+
"iconLeftPadding": 12,
|
|
39
|
+
"textPaddingHorizontal": 12,
|
|
36
40
|
},
|
|
37
41
|
},
|
|
38
42
|
"avatar": Object {
|
|
@@ -54,6 +58,7 @@ Object {
|
|
|
54
58
|
"xxlarge": 32,
|
|
55
59
|
"xxxlarge": 36,
|
|
56
60
|
"xxxxlarge": 48,
|
|
61
|
+
"xxxxxlarge": 60,
|
|
57
62
|
},
|
|
58
63
|
"radii": Object {
|
|
59
64
|
"rounded": 999,
|
|
@@ -66,6 +71,7 @@ Object {
|
|
|
66
71
|
"xxlarge": 64,
|
|
67
72
|
"xxxlarge": 80,
|
|
68
73
|
"xxxxlarge": 96,
|
|
74
|
+
"xxxxxlarge": 136,
|
|
69
75
|
},
|
|
70
76
|
},
|
|
71
77
|
"badge": Object {
|
|
@@ -227,14 +233,13 @@ Object {
|
|
|
227
233
|
},
|
|
228
234
|
"card": Object {
|
|
229
235
|
"colors": Object {
|
|
236
|
+
"archived": "#bfc1c5",
|
|
237
|
+
"danger": "#e3602a",
|
|
230
238
|
"dataCardIndicator": "#8505a2",
|
|
231
|
-
"
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
"success": "#5ace7d",
|
|
236
|
-
"warning": "#ffbe71",
|
|
237
|
-
},
|
|
239
|
+
"info": "#b5c3fd",
|
|
240
|
+
"primary": "#c38cee",
|
|
241
|
+
"success": "#5ace7d",
|
|
242
|
+
"warning": "#ffbe71",
|
|
238
243
|
},
|
|
239
244
|
"radii": Object {
|
|
240
245
|
"default": 12,
|
|
@@ -547,7 +552,7 @@ Object {
|
|
|
547
552
|
},
|
|
548
553
|
"sectionHeading": Object {
|
|
549
554
|
"colors": Object {
|
|
550
|
-
"background": "#
|
|
555
|
+
"background": "#f6f6f7",
|
|
551
556
|
},
|
|
552
557
|
"space": Object {
|
|
553
558
|
"headingHorizontalPadding": 16,
|
|
@@ -574,16 +579,28 @@ Object {
|
|
|
574
579
|
},
|
|
575
580
|
},
|
|
576
581
|
"spinner": Object {
|
|
577
|
-
"
|
|
578
|
-
"
|
|
582
|
+
"colors": Object {
|
|
583
|
+
"dot1": "#795e90",
|
|
584
|
+
"dot2": "#a08cb0",
|
|
585
|
+
"dot3": "#d9d1df",
|
|
586
|
+
"dot4": "#ece8ef",
|
|
579
587
|
},
|
|
580
588
|
"radii": Object {
|
|
581
|
-
"default":
|
|
589
|
+
"default": 999,
|
|
582
590
|
},
|
|
583
591
|
"space": Object {
|
|
584
|
-
"spinnerDot":
|
|
585
|
-
|
|
586
|
-
|
|
592
|
+
"spinnerDot": Object {
|
|
593
|
+
"medium": 16,
|
|
594
|
+
"small": 8,
|
|
595
|
+
},
|
|
596
|
+
"spinnerDotPadding": Object {
|
|
597
|
+
"medium": 8,
|
|
598
|
+
"small": 4,
|
|
599
|
+
},
|
|
600
|
+
"spinnerTextPaddingTop": Object {
|
|
601
|
+
"medium": 8,
|
|
602
|
+
"small": 4,
|
|
603
|
+
},
|
|
587
604
|
},
|
|
588
605
|
},
|
|
589
606
|
"switch": Object {
|
|
@@ -622,8 +639,8 @@ Object {
|
|
|
622
639
|
"headerBottom": 1,
|
|
623
640
|
},
|
|
624
641
|
"colors": Object {
|
|
625
|
-
"active": "#
|
|
626
|
-
"activeBackground": "#
|
|
642
|
+
"active": "#001f23",
|
|
643
|
+
"activeBackground": "#ece8ef",
|
|
627
644
|
"headerBottom": "#e8e9ea",
|
|
628
645
|
"inactive": "#001f23",
|
|
629
646
|
"text": "#001f23",
|
|
@@ -637,6 +654,7 @@ Object {
|
|
|
637
654
|
"space": Object {
|
|
638
655
|
"flatListHorizontalPadding": 8,
|
|
639
656
|
"itemHorizontalPadding": 8,
|
|
657
|
+
"itemMargin": 12,
|
|
640
658
|
"itemVerticalPadding": 8,
|
|
641
659
|
"outlineHorizontalPadding": 8,
|
|
642
660
|
"outlineVerticalPadding": 4,
|
|
@@ -655,12 +673,12 @@ Object {
|
|
|
655
673
|
"defaultBackground": undefined,
|
|
656
674
|
"info": "#4568fb",
|
|
657
675
|
"infoBackground": "#ecf0ff",
|
|
658
|
-
"primary": "#
|
|
659
|
-
"primaryBackground":
|
|
676
|
+
"primary": "#001f23",
|
|
677
|
+
"primaryBackground": undefined,
|
|
660
678
|
"success": "#017d6d",
|
|
661
679
|
"successBackground": "#f0fef4",
|
|
662
680
|
"warning": "#ffa234",
|
|
663
|
-
"warningBackground": "#
|
|
681
|
+
"warningBackground": "#fff6eb",
|
|
664
682
|
},
|
|
665
683
|
"fontSizes": Object {
|
|
666
684
|
"default": 12,
|
|
@@ -770,18 +788,34 @@ Object {
|
|
|
770
788
|
"divider": "#e8e9ea",
|
|
771
789
|
"error": "#f46363",
|
|
772
790
|
"info": "#b5c3fd",
|
|
791
|
+
"notification": "#ffffff",
|
|
792
|
+
"shadow": "#001f23",
|
|
793
|
+
"snackbar": "#001f23",
|
|
773
794
|
"success": "#5ace7d",
|
|
774
795
|
"warning": "#ffbe71",
|
|
775
796
|
},
|
|
776
797
|
"radii": Object {
|
|
777
798
|
"default": 16,
|
|
778
799
|
},
|
|
800
|
+
"shadows": Object {
|
|
801
|
+
"elevation": 4,
|
|
802
|
+
"offset": Object {
|
|
803
|
+
"height": 2,
|
|
804
|
+
"width": 0,
|
|
805
|
+
},
|
|
806
|
+
"opacity": 0.12,
|
|
807
|
+
"radius": 4,
|
|
808
|
+
},
|
|
779
809
|
"sizes": Object {
|
|
780
810
|
"height": 48,
|
|
781
811
|
},
|
|
782
812
|
"space": Object {
|
|
783
|
-
"
|
|
784
|
-
"
|
|
813
|
+
"contentVerticalPadding": 12,
|
|
814
|
+
"ctaPadding": 12,
|
|
815
|
+
"iconLeftPadding": 12,
|
|
816
|
+
"textHorizontalPadding": 12,
|
|
817
|
+
"wrapperHorizontalPadding": 16,
|
|
818
|
+
"wrapperVerticalPadding": 24,
|
|
785
819
|
},
|
|
786
820
|
},
|
|
787
821
|
"toolbar": Object {
|
|
@@ -819,6 +853,7 @@ Object {
|
|
|
819
853
|
"medium": 14,
|
|
820
854
|
"small": 12,
|
|
821
855
|
"xlarge": 18,
|
|
856
|
+
"xxxlarge": 24,
|
|
822
857
|
"xxxxxlarge": 32,
|
|
823
858
|
},
|
|
824
859
|
"fonts": Object {
|
|
@@ -831,6 +866,7 @@ Object {
|
|
|
831
866
|
"medium": 22,
|
|
832
867
|
"small": 20,
|
|
833
868
|
"xlarge": 26,
|
|
869
|
+
"xxxlarge": 32,
|
|
834
870
|
"xxxxxlarge": 40,
|
|
835
871
|
},
|
|
836
872
|
},
|
|
@@ -840,6 +876,23 @@ Object {
|
|
|
840
876
|
"medium": 2,
|
|
841
877
|
},
|
|
842
878
|
"colors": Object {
|
|
879
|
+
"__alpha__globalLabel1": "#de350b",
|
|
880
|
+
"__alpha__globalLabel2": "#ffa234",
|
|
881
|
+
"__alpha__globalLabel3": "#017d6d",
|
|
882
|
+
"__alpha__globalLabel4": "#4568fb",
|
|
883
|
+
"__alpha__globalLabel5": "#737479",
|
|
884
|
+
"__alpha__globalLabel6": "#fcebe7",
|
|
885
|
+
"__alpha__globalLabel7": "#fff6eb",
|
|
886
|
+
"__alpha__globalLabel8": "#f0fef4",
|
|
887
|
+
"__alpha__globalLabel9": "#ecf0ff",
|
|
888
|
+
"__alpha__globalNeutral3": "#f6f6f7",
|
|
889
|
+
"__alpha__globalPrimary": "#001f23",
|
|
890
|
+
"__alpha__globalSecondary1": "#4d6265",
|
|
891
|
+
"__alpha__primary2": "#c38cee",
|
|
892
|
+
"__alpha__secondary1": "#795e90",
|
|
893
|
+
"__alpha__secondary2": "#a08cb0",
|
|
894
|
+
"__alpha__secondary3": "#d9d1df",
|
|
895
|
+
"__alpha__secondary4": "#ece8ef",
|
|
843
896
|
"archived": "#ccced1",
|
|
844
897
|
"archivedBackground": "#f6f6f7",
|
|
845
898
|
"archivedDark": "#737479",
|
|
@@ -880,7 +933,7 @@ Object {
|
|
|
880
933
|
"successLight": "#5ace7d",
|
|
881
934
|
"text": "#001f23",
|
|
882
935
|
"warning": "#ffbe71",
|
|
883
|
-
"warningBackground": "#
|
|
936
|
+
"warningBackground": "#fff6eb",
|
|
884
937
|
"warningDark": "#ffa234",
|
|
885
938
|
"warningLight": "#ffbe71",
|
|
886
939
|
},
|
|
@@ -7,6 +7,7 @@ const getAlertTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
warning: theme.colors.warning,
|
|
8
8
|
error: theme.colors.dangerLight,
|
|
9
9
|
info: theme.colors.infoLight,
|
|
10
|
+
notification: theme.colors.platformBackground,
|
|
10
11
|
divider: theme.colors.outline,
|
|
11
12
|
};
|
|
12
13
|
|
|
@@ -15,7 +16,10 @@ const getAlertTheme = (theme: GlobalTheme) => {
|
|
|
15
16
|
};
|
|
16
17
|
|
|
17
18
|
const space = {
|
|
18
|
-
|
|
19
|
+
contentPaddingHorizontal: theme.space.smallMedium,
|
|
20
|
+
textPaddingHorizontal: theme.space.smallMedium,
|
|
21
|
+
iconLeftPadding: theme.space.smallMedium,
|
|
22
|
+
ctaPadding: theme.space.smallMedium,
|
|
19
23
|
};
|
|
20
24
|
|
|
21
25
|
const radii = {
|
|
@@ -17,6 +17,7 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
17
17
|
xxlarge: theme.space.xlarge * 2,
|
|
18
18
|
xxxlarge: theme.space.xxlarge * 2,
|
|
19
19
|
xxxxlarge: theme.space.xxxlarge * 2,
|
|
20
|
+
xxxxxlarge: theme.space.small * 17,
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
const fontSizes = {
|
|
@@ -27,6 +28,7 @@ const getAvatarTheme = (theme: GlobalTheme) => {
|
|
|
27
28
|
xxlarge: theme.space.medium * 2,
|
|
28
29
|
xxxlarge: theme.space.large * 1.5,
|
|
29
30
|
xxxxlarge: theme.space.xlarge * 1.5,
|
|
31
|
+
xxxxxlarge: theme.space.xxlarge * 1.5,
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
const radii = {
|
|
@@ -3,13 +3,12 @@ import type { GlobalTheme } from '../global';
|
|
|
3
3
|
const getCardTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
5
|
dataCardIndicator: theme.colors.primary,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
6
|
+
primary: theme.colors.__alpha__primary2,
|
|
7
|
+
info: theme.colors.infoLight,
|
|
8
|
+
success: theme.colors.success,
|
|
9
|
+
warning: theme.colors.warning,
|
|
10
|
+
danger: theme.colors.dangerMediumLight,
|
|
11
|
+
archived: theme.colors.archivedLight,
|
|
13
12
|
};
|
|
14
13
|
|
|
15
14
|
const sizes = {
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
import type { GlobalTheme } from '../global';
|
|
2
2
|
|
|
3
3
|
const getSpinnerTheme = (theme: GlobalTheme) => {
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const colors = {
|
|
5
|
+
dot1: theme.colors.__alpha__secondary1,
|
|
6
|
+
dot2: theme.colors.__alpha__secondary2,
|
|
7
|
+
dot3: theme.colors.__alpha__secondary3,
|
|
8
|
+
dot4: theme.colors.__alpha__secondary4,
|
|
6
9
|
};
|
|
7
10
|
|
|
8
11
|
const space = {
|
|
9
|
-
spinnerDot:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
spinnerDot: {
|
|
13
|
+
small: theme.space.small,
|
|
14
|
+
medium: theme.space.medium,
|
|
15
|
+
},
|
|
16
|
+
spinnerDotPadding: {
|
|
17
|
+
small: theme.space.xsmall,
|
|
18
|
+
medium: theme.space.small,
|
|
19
|
+
},
|
|
20
|
+
spinnerTextPaddingTop: {
|
|
21
|
+
small: theme.space.xsmall,
|
|
22
|
+
medium: theme.space.small,
|
|
23
|
+
},
|
|
12
24
|
};
|
|
13
25
|
|
|
14
26
|
const radii = {
|
|
15
|
-
default: theme.radii.
|
|
27
|
+
default: theme.radii.rounded,
|
|
16
28
|
};
|
|
17
29
|
|
|
18
|
-
return {
|
|
30
|
+
return { colors, space, radii };
|
|
19
31
|
};
|
|
20
32
|
|
|
21
33
|
export default getSpinnerTheme;
|
|
@@ -2,9 +2,9 @@ import type { GlobalTheme } from '../global';
|
|
|
2
2
|
|
|
3
3
|
const getTabsTheme = (theme: GlobalTheme) => {
|
|
4
4
|
const colors = {
|
|
5
|
-
active: theme.colors.
|
|
5
|
+
active: theme.colors.text,
|
|
6
6
|
inactive: theme.colors.text,
|
|
7
|
-
activeBackground: theme.colors.
|
|
7
|
+
activeBackground: theme.colors.__alpha__secondary4,
|
|
8
8
|
headerBottom: theme.colors.outline,
|
|
9
9
|
text: theme.colors.text,
|
|
10
10
|
};
|
|
@@ -13,6 +13,7 @@ const getTabsTheme = (theme: GlobalTheme) => {
|
|
|
13
13
|
flatListHorizontalPadding: theme.space.small,
|
|
14
14
|
itemHorizontalPadding: theme.space.small,
|
|
15
15
|
itemVerticalPadding: theme.space.small,
|
|
16
|
+
itemMargin: theme.space.smallMedium,
|
|
16
17
|
outlineHorizontalPadding: theme.space.small,
|
|
17
18
|
outlineVerticalPadding: theme.space.xsmall,
|
|
18
19
|
};
|
|
@@ -6,20 +6,20 @@ const getTagTheme = (theme: GlobalTheme) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
const colors = {
|
|
9
|
-
default: theme.colors.
|
|
9
|
+
default: theme.colors.__alpha__globalPrimary,
|
|
10
10
|
defaultBackground: undefined,
|
|
11
|
-
primary: theme.colors.
|
|
12
|
-
primaryBackground:
|
|
13
|
-
info: theme.colors.
|
|
14
|
-
infoBackground: theme.colors.
|
|
15
|
-
success: theme.colors.
|
|
16
|
-
successBackground: theme.colors.
|
|
17
|
-
warning: theme.colors.
|
|
18
|
-
warningBackground: theme.colors.
|
|
19
|
-
danger: theme.colors.
|
|
20
|
-
dangerBackground: theme.colors.
|
|
21
|
-
archived: theme.colors.
|
|
22
|
-
archivedBackground: theme.colors.
|
|
11
|
+
primary: theme.colors.__alpha__globalPrimary,
|
|
12
|
+
primaryBackground: undefined,
|
|
13
|
+
info: theme.colors.__alpha__globalLabel4,
|
|
14
|
+
infoBackground: theme.colors.__alpha__globalLabel9,
|
|
15
|
+
success: theme.colors.__alpha__globalLabel3,
|
|
16
|
+
successBackground: theme.colors.__alpha__globalLabel8,
|
|
17
|
+
warning: theme.colors.__alpha__globalLabel2,
|
|
18
|
+
warningBackground: theme.colors.__alpha__globalLabel7,
|
|
19
|
+
danger: theme.colors.__alpha__globalLabel1,
|
|
20
|
+
dangerBackground: theme.colors.__alpha__globalLabel6,
|
|
21
|
+
archived: theme.colors.__alpha__globalLabel5,
|
|
22
|
+
archivedBackground: theme.colors.__alpha__globalNeutral3,
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
const fonts = {
|
|
@@ -7,7 +7,10 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
7
7
|
warning: theme.colors.warning,
|
|
8
8
|
error: theme.colors.dangerLight,
|
|
9
9
|
info: theme.colors.infoLight,
|
|
10
|
+
notification: theme.colors.platformBackground,
|
|
11
|
+
snackbar: theme.colors.backgroundDark,
|
|
10
12
|
divider: theme.colors.outline,
|
|
13
|
+
shadow: theme.colors.backgroundDark,
|
|
11
14
|
};
|
|
12
15
|
|
|
13
16
|
const sizes = {
|
|
@@ -15,8 +18,12 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
const space = {
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
wrapperVerticalPadding: theme.space.large,
|
|
22
|
+
wrapperHorizontalPadding: theme.space.medium,
|
|
23
|
+
contentVerticalPadding: theme.space.smallMedium,
|
|
24
|
+
textHorizontalPadding: theme.space.smallMedium,
|
|
25
|
+
iconLeftPadding: theme.space.smallMedium,
|
|
26
|
+
ctaPadding: theme.space.smallMedium,
|
|
20
27
|
};
|
|
21
28
|
|
|
22
29
|
const radii = {
|
|
@@ -27,7 +34,14 @@ const getToastTheme = (theme: GlobalTheme) => {
|
|
|
27
34
|
base: theme.borderWidths.base,
|
|
28
35
|
};
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
const shadows = {
|
|
38
|
+
offset: { width: 0, height: 2 },
|
|
39
|
+
opacity: 0.12,
|
|
40
|
+
radius: 4,
|
|
41
|
+
elevation: 4,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
return { colors, radii, sizes, space, borderWidths, shadows };
|
|
31
45
|
};
|
|
32
46
|
|
|
33
47
|
export default getToastTheme;
|
|
@@ -23,6 +23,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
23
23
|
medium: theme.fontSizes.medium,
|
|
24
24
|
large: theme.fontSizes.large,
|
|
25
25
|
xlarge: theme.fontSizes.xlarge,
|
|
26
|
+
xxxlarge: theme.fontSizes.xxxlarge,
|
|
26
27
|
xxxxxlarge: theme.fontSizes.xxxxxlarge,
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -31,6 +32,7 @@ const getTypographyTheme = (theme: GlobalTheme) => {
|
|
|
31
32
|
medium: theme.lineHeights.medium,
|
|
32
33
|
large: theme.lineHeights.large,
|
|
33
34
|
xlarge: theme.lineHeights.xlarge,
|
|
35
|
+
xxxlarge: theme.lineHeights.xxxlarge,
|
|
34
36
|
xxxxxlarge: theme.lineHeights.xxxxxlarge,
|
|
35
37
|
};
|
|
36
38
|
|
|
@@ -48,6 +48,29 @@ const swagSystemPalette: SystemPalette = {
|
|
|
48
48
|
black: palette.black,
|
|
49
49
|
inactiveBackground: palette.maasstrichtBlueLight50,
|
|
50
50
|
shadow: palette.greyLight45, // waiting for new color
|
|
51
|
+
|
|
52
|
+
__alpha__globalPrimary: palette.maasstrichtBlue,
|
|
53
|
+
|
|
54
|
+
__alpha__globalSecondary1: palette.maasstrichtBlueLight30,
|
|
55
|
+
|
|
56
|
+
__alpha__globalNeutral3: palette.greyLight90,
|
|
57
|
+
|
|
58
|
+
__alpha__globalLabel1: palette.vermilion,
|
|
59
|
+
__alpha__globalLabel2: palette.deepSaffron,
|
|
60
|
+
__alpha__globalLabel3: palette.pineGreen,
|
|
61
|
+
__alpha__globalLabel4: palette.ultramarineBlue,
|
|
62
|
+
__alpha__globalLabel5: palette.sonicSilver,
|
|
63
|
+
__alpha__globalLabel6: palette.linen,
|
|
64
|
+
__alpha__globalLabel7: palette.seashell,
|
|
65
|
+
__alpha__globalLabel8: palette.honeydew,
|
|
66
|
+
__alpha__globalLabel9: palette.aliceBlue,
|
|
67
|
+
|
|
68
|
+
__alpha__primary2: swagPalette.mauve,
|
|
69
|
+
|
|
70
|
+
__alpha__secondary1: swagPalette.scarletGumLight30,
|
|
71
|
+
__alpha__secondary2: swagPalette.scarletGumLight50,
|
|
72
|
+
__alpha__secondary3: swagPalette.scarletGumLight80,
|
|
73
|
+
__alpha__secondary4: swagPalette.scarletGumLight90,
|
|
51
74
|
};
|
|
52
75
|
|
|
53
76
|
export default swagSystemPalette;
|
|
@@ -42,4 +42,27 @@ export type SystemPalette = {
|
|
|
42
42
|
black: string;
|
|
43
43
|
inactiveBackground: string;
|
|
44
44
|
shadow: string;
|
|
45
|
+
|
|
46
|
+
__alpha__globalPrimary: string;
|
|
47
|
+
|
|
48
|
+
__alpha__globalSecondary1: string;
|
|
49
|
+
|
|
50
|
+
__alpha__globalNeutral3: string;
|
|
51
|
+
|
|
52
|
+
__alpha__globalLabel1: string;
|
|
53
|
+
__alpha__globalLabel2: string;
|
|
54
|
+
__alpha__globalLabel3: string;
|
|
55
|
+
__alpha__globalLabel4: string;
|
|
56
|
+
__alpha__globalLabel5: string;
|
|
57
|
+
__alpha__globalLabel6: string;
|
|
58
|
+
__alpha__globalLabel7: string;
|
|
59
|
+
__alpha__globalLabel8: string;
|
|
60
|
+
__alpha__globalLabel9: string;
|
|
61
|
+
|
|
62
|
+
__alpha__primary2: string;
|
|
63
|
+
|
|
64
|
+
__alpha__secondary1: string;
|
|
65
|
+
__alpha__secondary2: string;
|
|
66
|
+
__alpha__secondary3: string;
|
|
67
|
+
__alpha__secondary4: string;
|
|
45
68
|
};
|
|
@@ -8,6 +8,11 @@ const workSystemPalette: SystemPalette = {
|
|
|
8
8
|
primaryLight: workPalette.goldLight50,
|
|
9
9
|
primaryDark: workPalette.goldLight20,
|
|
10
10
|
primaryBackground: workPalette.goldLight90,
|
|
11
|
+
|
|
12
|
+
__alpha__secondary1: workPalette.goldLight20,
|
|
13
|
+
__alpha__secondary2: workPalette.goldLight50,
|
|
14
|
+
__alpha__secondary3: workPalette.goldLight70,
|
|
15
|
+
__alpha__secondary4: workPalette.goldLight90,
|
|
11
16
|
};
|
|
12
17
|
|
|
13
18
|
export default workSystemPalette;
|
package/src/types.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ToolbarButtonName } from './components/RichTextEditor';
|
|
2
1
|
import type { BottomNavigationTabType } from './components/BottomNavigation';
|
|
3
2
|
import type { IconName } from './components/Icon';
|
|
4
3
|
import type { SingleSelectProps, MultiSelectProps } from './components/Select';
|
|
@@ -26,5 +25,4 @@ export type {
|
|
|
26
25
|
TabType,
|
|
27
26
|
TextInputProps,
|
|
28
27
|
Theme,
|
|
29
|
-
ToolbarButtonName,
|
|
30
28
|
};
|
package/tsconfig.json
CHANGED
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "expo/tsconfig.base",
|
|
2
3
|
"compilerOptions": {
|
|
3
4
|
"target": "esnext",
|
|
4
|
-
"declaration": true,
|
|
5
5
|
"outDir": "types",
|
|
6
|
-
"
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"resolveJsonModule": true,
|
|
6
|
+
"declaration": true,
|
|
9
7
|
"jsx": "react-native",
|
|
10
|
-
"strict": true,
|
|
11
|
-
"allowUnreachableCode": false,
|
|
12
|
-
"noImplicitReturns": true,
|
|
13
|
-
"noImplicitThis": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"skipLibCheck": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
8
|
"types": ["jest"]
|
|
18
9
|
},
|
|
19
|
-
"include": ["src"]
|
|
20
|
-
|
|
21
|
-
"extends": "expo/tsconfig.base"
|
|
22
|
-
}
|
|
10
|
+
"include": ["src"]
|
|
11
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { TouchableOpacity, View } from 'react-native';
|
|
2
2
|
export declare type Variant = 'default' | 'card';
|
|
3
3
|
export declare const StyledWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
-
theme?: import("@emotion/react").Theme
|
|
5
|
-
as?: import("react").ElementType<any
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: import("react").ElementType<any>;
|
|
6
6
|
}, {}, {
|
|
7
|
-
ref?: import("react").Ref<View
|
|
7
|
+
ref?: import("react").Ref<View>;
|
|
8
8
|
}>;
|
|
9
9
|
export declare const StyledItemWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
10
|
-
theme?: import("@emotion/react").Theme
|
|
11
|
-
as?: import("react").ElementType<any
|
|
10
|
+
theme?: import("@emotion/react").Theme;
|
|
11
|
+
as?: import("react").ElementType<any>;
|
|
12
12
|
} & {
|
|
13
13
|
themeVariant: Variant;
|
|
14
14
|
}, {}, {
|
|
15
|
-
ref?: import("react").Ref<View
|
|
15
|
+
ref?: import("react").Ref<View>;
|
|
16
16
|
}>;
|
|
17
17
|
export declare const StyledHeaderWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
18
|
-
theme?: import("@emotion/react").Theme
|
|
19
|
-
as?: import("react").ElementType<any
|
|
18
|
+
theme?: import("@emotion/react").Theme;
|
|
19
|
+
as?: import("react").ElementType<any>;
|
|
20
20
|
}, {}, {
|
|
21
|
-
ref?: import("react").Ref<TouchableOpacity
|
|
21
|
+
ref?: import("react").Ref<TouchableOpacity>;
|
|
22
22
|
}>;
|
|
23
23
|
export declare const StyledCollapse: import("@emotion/native").StyledComponent<import("../Collapse").CollapseProps & {
|
|
24
|
-
theme?: import("@emotion/react").Theme
|
|
25
|
-
as?: import("react").ElementType<any
|
|
24
|
+
theme?: import("@emotion/react").Theme;
|
|
25
|
+
as?: import("react").ElementType<any>;
|
|
26
26
|
}, {}, {}>;
|
|
27
27
|
export declare const Spacer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
28
|
-
theme?: import("@emotion/react").Theme
|
|
29
|
-
as?: import("react").ElementType<any
|
|
28
|
+
theme?: import("@emotion/react").Theme;
|
|
29
|
+
as?: import("react").ElementType<any>;
|
|
30
30
|
}, {}, {
|
|
31
|
-
ref?: import("react").Ref<View
|
|
31
|
+
ref?: import("react").Ref<View>;
|
|
32
32
|
}>;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { TouchableOpacity, View } from 'react-native';
|
|
2
2
|
import type { ViewProps } from 'react-native';
|
|
3
3
|
declare const Container: import("@emotion/native").StyledComponent<ViewProps & {
|
|
4
|
-
theme?: import("@emotion/react").Theme
|
|
5
|
-
as?: import("react").ElementType<any
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: import("react").ElementType<any>;
|
|
6
6
|
} & {
|
|
7
7
|
themeVariant: 'default' | 'round';
|
|
8
|
-
themeIntent: 'success' | 'info' | 'warning' | 'error';
|
|
8
|
+
themeIntent: 'success' | 'info' | 'warning' | 'error' | 'notification';
|
|
9
9
|
}, {}, {
|
|
10
|
-
ref?: import("react").Ref<View
|
|
10
|
+
ref?: import("react").Ref<View>;
|
|
11
11
|
}>;
|
|
12
12
|
declare const IconContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
13
|
-
theme?: import("@emotion/react").Theme
|
|
14
|
-
as?: import("react").ElementType<any
|
|
13
|
+
theme?: import("@emotion/react").Theme;
|
|
14
|
+
as?: import("react").ElementType<any>;
|
|
15
15
|
}, {}, {
|
|
16
|
-
ref?: import("react").Ref<View
|
|
16
|
+
ref?: import("react").Ref<View>;
|
|
17
17
|
}>;
|
|
18
18
|
declare const TextContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
19
|
-
theme?: import("@emotion/react").Theme
|
|
20
|
-
as?: import("react").ElementType<any
|
|
19
|
+
theme?: import("@emotion/react").Theme;
|
|
20
|
+
as?: import("react").ElementType<any>;
|
|
21
21
|
}, {}, {
|
|
22
|
-
ref?: import("react").Ref<View
|
|
22
|
+
ref?: import("react").Ref<View>;
|
|
23
23
|
}>;
|
|
24
24
|
declare const ContentContainer: import("@emotion/native").StyledComponent<ViewProps & {
|
|
25
|
-
theme?: import("@emotion/react").Theme
|
|
26
|
-
as?: import("react").ElementType<any
|
|
25
|
+
theme?: import("@emotion/react").Theme;
|
|
26
|
+
as?: import("react").ElementType<any>;
|
|
27
27
|
} & {
|
|
28
28
|
showDivider: boolean;
|
|
29
29
|
}, {}, {
|
|
30
|
-
ref?: import("react").Ref<View
|
|
30
|
+
ref?: import("react").Ref<View>;
|
|
31
31
|
}>;
|
|
32
32
|
declare const CTAWrapper: import("@emotion/native").StyledComponent<import("react-native").TouchableOpacityProps & {
|
|
33
|
-
theme?: import("@emotion/react").Theme
|
|
34
|
-
as?: import("react").ElementType<any
|
|
33
|
+
theme?: import("@emotion/react").Theme;
|
|
34
|
+
as?: import("react").ElementType<any>;
|
|
35
35
|
}, {}, {
|
|
36
|
-
ref?: import("react").Ref<TouchableOpacity
|
|
36
|
+
ref?: import("react").Ref<TouchableOpacity>;
|
|
37
37
|
}>;
|
|
38
38
|
export { Container, ContentContainer, TextContainer, IconContainer, CTAWrapper, };
|