@hero-design/rn 7.22.2 → 7.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +3 -3
- package/es/index.js +2395 -1880
- package/lib/index.js +2395 -1878
- package/package.json +6 -6
- package/src/components/Accordion/AccordionItem.tsx +1 -1
- package/src/components/Accordion/__tests__/__snapshots__/AccordionItem.spec.tsx.snap +8 -8
- package/src/components/Accordion/__tests__/__snapshots__/index.spec.tsx.snap +12 -12
- package/src/components/Avatar/__tests__/__snapshots__/StyledAvatar.spec.tsx.snap +3 -3
- package/src/components/Avatar/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/BottomNavigation/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Box/StyledBox.tsx +1 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/StyledLoadingIndicator.spec.tsx.snap +2 -2
- package/src/components/Button/LoadingIndicator/__tests__/__snapshots__/index.spec.tsx.snap +6 -6
- package/src/components/Button/__tests__/__snapshots__/StyledButton.spec.tsx.snap +24 -24
- package/src/components/Calendar/__tests__/__snapshots__/CalendarRowItem.spec.tsx.snap +6 -6
- package/src/components/Card/DataCard/__tests__/__snapshots__/StyledDataCard.spec.tsx.snap +3 -3
- package/src/components/Card/DataCard/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/Card/__tests__/__snapshots__/StyledCard.spec.tsx.snap +1 -1
- package/src/components/Card/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +2 -2
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +5 -5
- package/src/components/ContentNavigator/__tests__/__snapshots__/index.spec.tsx.snap +2 -2
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerAndroid.spec.tsx.snap +18 -4
- package/src/components/DatePicker/__tests__/__snapshots__/DatePickerIOS.spec.tsx.snap +19 -5
- package/src/components/Drawer/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/FAB/ActionGroup/__tests__/__snapshots__/index.spec.tsx.snap +10 -10
- package/src/components/Icon/HeroIcon/index.tsx +2 -0
- package/src/components/Icon/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Icon/index.tsx +1 -0
- package/src/components/List/__tests__/__snapshots__/BasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +12 -12
- package/src/components/List/__tests__/__snapshots__/StyledBasicListItem.spec.tsx.snap +2 -2
- package/src/components/List/__tests__/__snapshots__/StyledListItem.spec.tsx.snap +4 -4
- package/src/components/PinInput/__tests__/__snapshots__/PinCell.spec.tsx.snap +6 -6
- package/src/components/PinInput/__tests__/__snapshots__/index.spec.tsx.snap +21 -21
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +5 -5
- package/src/components/Radio/__tests__/__snapshots__/Radio.spec.tsx.snap +1 -1
- package/src/components/Radio/__tests__/__snapshots__/RadioGroup.spec.tsx.snap +1 -1
- package/src/components/RefreshControl/__tests__/__snapshots__/index.spec.tsx.snap +69 -0
- package/src/components/RefreshControl/__tests__/index.spec.tsx +55 -0
- package/src/components/RefreshControl/index.tsx +23 -0
- package/src/components/RichTextEditor/MentionList.tsx +25 -4
- package/src/components/RichTextEditor/RichTextEditor.tsx +3 -1
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +6 -6
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +38 -10
- package/src/components/SectionHeading/__tests__/__snapshots__/index.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +13 -9
- package/src/components/Select/MultiSelect/__tests__/__snapshots__/index.spec.tsx.snap +108 -38
- package/src/components/Select/MultiSelect/index.tsx +1 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/Option.spec.tsx.snap +1 -1
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/OptionList.spec.tsx.snap +12 -8
- package/src/components/Select/SingleSelect/__tests__/__snapshots__/index.spec.tsx.snap +99 -29
- package/src/components/Select/SingleSelect/index.tsx +1 -1
- package/src/components/Select/__tests__/__snapshots__/StyledSelect.spec.tsx.snap +1 -1
- package/src/components/Select/types.ts +1 -3
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +3 -3
- package/src/components/Spinner/StyledSpinner.tsx +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/AnimatedSpinner.spec.tsx.snap +8 -4
- package/src/components/Spinner/__tests__/__snapshots__/StyledSpinner.spec.tsx.snap +32 -16
- package/src/components/Spinner/__tests__/__snapshots__/index.spec.tsx.snap +8 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +3 -3
- package/src/components/Tabs/ScrollableTabs.tsx +2 -5
- package/src/components/Tabs/__tests__/__snapshots__/ScrollableTabs.spec.tsx.snap +1 -1
- package/src/components/Tag/__tests__/__snapshots__/Tag.spec.tsx.snap +1 -1
- package/src/components/TextInput/StyledTextInput.tsx +16 -11
- package/src/components/TextInput/__tests__/StyledTextInput.spec.tsx +3 -3
- package/src/components/TextInput/__tests__/__snapshots__/StyledTextInput.spec.tsx.snap +46 -28
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +246 -64
- package/src/components/TextInput/index.tsx +21 -4
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerAndroid.spec.tsx.snap +18 -4
- package/src/components/TimePicker/__tests__/__snapshots__/TimePickerIOS.spec.tsx.snap +19 -5
- package/src/components/Toast/ToastProvider.tsx +2 -4
- package/src/components/Toast/__tests__/index.spec.tsx +138 -0
- package/src/components/Toolbar/ToolbarItem.tsx +1 -1
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarGroup.spec.tsx.snap +12 -12
- package/src/components/Toolbar/__tests__/__snapshots__/ToolbarItem.spec.tsx.snap +6 -6
- package/src/components/Typography/Text/StyledText.tsx +1 -0
- package/src/components/Typography/Text/__tests__/__snapshots__/StyledText.spec.tsx.snap +3 -3
- package/src/components/Typography/Text/index.tsx +1 -0
- package/src/index.ts +4 -0
- package/src/theme/ThemeSwitcher.tsx +9 -2
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +101 -88
- package/src/theme/components/accordion.ts +1 -1
- package/src/theme/components/alert.ts +4 -4
- package/src/theme/components/avatar.ts +2 -2
- package/src/theme/components/badge.ts +6 -6
- package/src/theme/components/bottomNavigation.ts +2 -2
- package/src/theme/components/bottomSheet.ts +3 -3
- package/src/theme/components/button.ts +20 -20
- package/src/theme/components/calendar.ts +4 -4
- package/src/theme/components/card.ts +5 -5
- package/src/theme/components/checkbox.ts +1 -1
- package/src/theme/components/divider.ts +1 -1
- package/src/theme/components/drawer.ts +4 -4
- package/src/theme/components/empty.ts +3 -4
- package/src/theme/components/fab.ts +7 -7
- package/src/theme/components/icon.ts +4 -3
- package/src/theme/components/list.ts +6 -7
- package/src/theme/components/pinInput.ts +4 -4
- package/src/theme/components/progress.ts +3 -3
- package/src/theme/components/refreshControl.ts +11 -0
- package/src/theme/components/richTextEditor.ts +9 -8
- package/src/theme/components/sectionHeading.ts +1 -1
- package/src/theme/components/select.ts +1 -1
- package/src/theme/components/slider.ts +3 -3
- package/src/theme/components/spinner.ts +1 -4
- package/src/theme/components/switch.ts +7 -7
- package/src/theme/components/tabs.ts +5 -5
- package/src/theme/components/tag.ts +12 -12
- package/src/theme/components/textInput.ts +38 -38
- package/src/theme/components/toast.ts +6 -6
- package/src/theme/components/toolbar.ts +3 -2
- package/src/theme/components/typography.ts +4 -3
- package/src/theme/getTheme.ts +3 -0
- package/src/theme/global/colors/global.ts +32 -0
- package/src/theme/global/colors/jobs.ts +18 -0
- package/src/theme/global/colors/legacySystemPalette.ts +53 -0
- package/src/theme/global/colors/swag.ts +21 -35
- package/src/theme/global/colors/types.ts +46 -27
- package/src/theme/global/colors/work.ts +10 -9
- package/src/theme/global/index.ts +8 -1
- package/src/theme/index.ts +6 -1
- package/src/utils/__tests__/helpers.spec.ts +27 -0
- package/src/utils/helpers.ts +21 -0
- package/tsconfig.prod.json +4 -0
- package/types/components/Icon/HeroIcon/index.d.ts +1 -1
- package/types/components/Icon/index.d.ts +1 -1
- package/types/components/RefreshControl/index.d.ts +5 -0
- package/types/components/RichTextEditor/MentionList.d.ts +7 -3
- package/types/components/RichTextEditor/index.d.ts +1 -1
- package/types/components/Select/types.d.ts +1 -3
- package/types/components/TextInput/StyledTextInput.d.ts +9 -3
- package/types/components/Toolbar/ToolbarItem.d.ts +1 -1
- package/types/components/Typography/Text/StyledText.d.ts +1 -1
- package/types/components/Typography/Text/index.d.ts +1 -1
- package/types/index.d.ts +3 -2
- package/types/theme/ThemeSwitcher.d.ts +1 -1
- package/types/theme/components/empty.d.ts +0 -1
- package/types/theme/components/icon.d.ts +1 -0
- package/types/theme/components/refreshControl.d.ts +7 -0
- package/types/theme/components/richTextEditor.d.ts +4 -3
- package/types/theme/components/spinner.d.ts +1 -4
- package/types/theme/components/toolbar.d.ts +1 -0
- package/types/theme/components/typography.d.ts +1 -0
- package/types/theme/getTheme.d.ts +2 -0
- package/types/theme/global/colors/global.d.ts +3 -0
- package/types/theme/global/colors/jobs.d.ts +3 -0
- package/types/theme/global/colors/legacySystemPalette.d.ts +3 -0
- package/types/theme/global/colors/types.d.ts +41 -21
- package/types/theme/global/index.d.ts +30 -21
- package/types/theme/index.d.ts +2 -2
- package/types/utils/helpers.d.ts +2 -0
- package/src/components/Box/__tests__/helpers.spec.ts +0 -14
- package/src/components/Box/helpers.ts +0 -10
- package/types/components/Accordion/__tests__/AccordionItem.spec.d.ts +0 -1
- package/types/components/Accordion/__tests__/StyledAccordion.spec.d.ts +0 -1
- package/types/components/Accordion/__tests__/index.spec.d.ts +0 -1
- package/types/components/Alert/__tests__/index.spec.d.ts +0 -1
- package/types/components/Avatar/__tests__/StyledAvatar.spec.d.ts +0 -1
- package/types/components/Avatar/__tests__/index.spec.d.ts +0 -1
- package/types/components/Badge/__tests__/Badge.spec.d.ts +0 -1
- package/types/components/Badge/__tests__/Status.spec.d.ts +0 -1
- package/types/components/BottomNavigation/__tests__/index.spec.d.ts +0 -1
- package/types/components/BottomSheet/__tests__/index.spec.d.ts +0 -1
- package/types/components/Box/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Box/__tests__/index.spec.d.ts +0 -1
- package/types/components/Box/helpers.d.ts +0 -1
- package/types/components/Button/LoadingIndicator/__tests__/StyledLoadingIndicator.spec.d.ts +0 -1
- package/types/components/Button/LoadingIndicator/__tests__/index.spec.d.ts +0 -1
- package/types/components/Button/UtilityButton/__tests__/index.spec.d.ts +0 -1
- package/types/components/Button/__tests__/Button.spec.d.ts +0 -1
- package/types/components/Button/__tests__/IconButton.spec.d.ts +0 -1
- package/types/components/Button/__tests__/StyledButton.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/CalendarRowItem.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/helper.spec.d.ts +0 -1
- package/types/components/Calendar/__tests__/index.spec.d.ts +0 -1
- package/types/components/Card/DataCard/__tests__/StyledDataCard.spec.d.ts +0 -1
- package/types/components/Card/DataCard/__tests__/index.spec.d.ts +0 -1
- package/types/components/Card/__tests__/StyledCard.spec.d.ts +0 -1
- package/types/components/Card/__tests__/index.spec.d.ts +0 -1
- package/types/components/Checkbox/__tests__/StyledCheckbox.spec.d.ts +0 -1
- package/types/components/Checkbox/__tests__/index.spec.d.ts +0 -1
- package/types/components/Collapse/__tests__/StyledCollapse.spec.d.ts +0 -1
- package/types/components/Collapse/__tests__/index.spec.d.ts +0 -1
- package/types/components/ContentNavigator/__tests__/StyledContentNavigator.spec.d.ts +0 -1
- package/types/components/ContentNavigator/__tests__/index.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePicker.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePickerAndroid.spec.d.ts +0 -1
- package/types/components/DatePicker/__tests__/DatePickerIOS.spec.d.ts +0 -1
- package/types/components/Divider/__tests__/StyledDivider.spec.d.ts +0 -1
- package/types/components/Drawer/DragableDrawer/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Drawer/DragableDrawer/__tests__/index.spec.d.ts +0 -1
- package/types/components/Drawer/__tests__/index.spec.d.ts +0 -1
- package/types/components/Empty/__tests__/index.spec.d.ts +0 -1
- package/types/components/FAB/ActionGroup/__tests__/index.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/AnimatedFABIcon.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/StyledFAB.spec.d.ts +0 -1
- package/types/components/FAB/__tests__/index.spec.d.ts +0 -1
- package/types/components/Icon/__tests__/index.spec.d.ts +0 -1
- package/types/components/Image/__tests__/index.spec.d.ts +0 -1
- package/types/components/List/__tests__/BasicListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/ListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/StyledBasicListItem.spec.d.ts +0 -1
- package/types/components/List/__tests__/StyledListItem.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/PinCell.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/StyledPinInput.spec.d.ts +0 -1
- package/types/components/PinInput/__tests__/index.spec.d.ts +0 -1
- package/types/components/Radio/__tests__/Radio.spec.d.ts +0 -1
- package/types/components/Radio/__tests__/RadioGroup.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/EditorToolbar.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/MentionList.spec.d.ts +0 -1
- package/types/components/RichTextEditor/__tests__/RichTextEditor.spec.d.ts +0 -1
- package/types/components/SectionHeading/__tests__/StyledHeading.spec.d.ts +0 -1
- package/types/components/SectionHeading/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/OptionList.spec.d.ts +0 -1
- package/types/components/Select/MultiSelect/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/OptionList.spec.d.ts +0 -1
- package/types/components/Select/SingleSelect/__tests__/index.spec.d.ts +0 -1
- package/types/components/Select/__tests__/StyledSelect.spec.d.ts +0 -1
- package/types/components/Select/__tests__/helpers.spec.d.ts +0 -1
- package/types/components/Slider/__tests__/index.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/AnimatedSpinner.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/StyledSpinner.spec.d.ts +0 -1
- package/types/components/Spinner/__tests__/index.spec.d.ts +0 -1
- package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +0 -1
- package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +0 -1
- package/types/components/Switch/__tests__/StyledSwitch.spec.d.ts +0 -1
- package/types/components/Switch/__tests__/index.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/ScrollableTabs.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/TabWithBadge.spec.d.ts +0 -1
- package/types/components/Tabs/__tests__/index.spec.d.ts +0 -1
- package/types/components/Tag/__tests__/Tag.spec.d.ts +0 -1
- package/types/components/TextInput/__tests__/StyledTextInput.spec.d.ts +0 -1
- package/types/components/TextInput/__tests__/index.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePicker.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePickerAndroid.spec.d.ts +0 -1
- package/types/components/TimePicker/__tests__/TimePickerIOS.spec.d.ts +0 -1
- package/types/components/Toast/__tests__/Toast.spec.d.ts +0 -1
- package/types/components/Toast/__tests__/ToastContainer.spec.d.ts +0 -1
- package/types/components/Toolbar/__tests__/ToolbarGroup.spec.d.ts +0 -1
- package/types/components/Toolbar/__tests__/ToolbarItem.spec.d.ts +0 -1
- package/types/components/Typography/Text/__tests__/StyledText.spec.d.ts +0 -1
- package/types/components/Typography/Text/__tests__/index.spec.d.ts +0 -1
- package/types/theme/__tests__/index.spec.d.ts +0 -1
- package/types/utils/__tests__/scale.spec.d.ts +0 -1
|
@@ -1,4 +1,45 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type GlobalSystemPalette = {
|
|
2
|
+
globalPrimary: string;
|
|
3
|
+
mutedGlobalPrimary: string;
|
|
4
|
+
onGlobalPrimary: string;
|
|
5
|
+
globalSecondary: string;
|
|
6
|
+
globalPrimaryOutline: string;
|
|
7
|
+
globalSecondaryOutline: string;
|
|
8
|
+
defaultGlobalSurface: string;
|
|
9
|
+
onDefaultGlobalSurface: string;
|
|
10
|
+
neutralGlobalSurface: string;
|
|
11
|
+
disabledOnDefaultGlobalSurface: string;
|
|
12
|
+
error: string;
|
|
13
|
+
errorSurface: string;
|
|
14
|
+
onErrorSurface: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
warningSurface: string;
|
|
17
|
+
onWarningSurface: string;
|
|
18
|
+
success: string;
|
|
19
|
+
successSurface: string;
|
|
20
|
+
onSuccessSurface: string;
|
|
21
|
+
info: string;
|
|
22
|
+
infoSurface: string;
|
|
23
|
+
onInfoSurface: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
archivedSurface: string;
|
|
26
|
+
onArchivedSurface: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type BrandSystemPalette = {
|
|
30
|
+
primary: string;
|
|
31
|
+
mutedPrimary: string;
|
|
32
|
+
onPrimary: string;
|
|
33
|
+
secondary: string;
|
|
34
|
+
highlightedSecondarySurface: string; // TODO: Ask Ariel to add this
|
|
35
|
+
onSecondary: string;
|
|
36
|
+
mutedSecondary: string;
|
|
37
|
+
disabledSecondary: string;
|
|
38
|
+
highlightedSurface: string;
|
|
39
|
+
lightHighlightedSurface: string;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export type LegacySystemPalette = {
|
|
2
43
|
globalPrimary: string;
|
|
3
44
|
globalPrimaryLight: string;
|
|
4
45
|
globalPrimaryBackground: string;
|
|
@@ -42,30 +83,8 @@ export type SystemPalette = {
|
|
|
42
83
|
black: string;
|
|
43
84
|
inactiveBackground: string;
|
|
44
85
|
shadow: string;
|
|
45
|
-
|
|
46
|
-
__alpha__globalPrimary: string;
|
|
47
|
-
|
|
48
|
-
__alpha__globalSecondary1: string;
|
|
49
|
-
__alpha__globalSecondary4: string;
|
|
50
|
-
|
|
51
|
-
__alpha__globalNeutral3: string;
|
|
52
|
-
|
|
53
|
-
__alpha__globalLabel1: string;
|
|
54
|
-
__alpha__globalLabel2: string;
|
|
55
|
-
__alpha__globalLabel3: string;
|
|
56
|
-
__alpha__globalLabel4: string;
|
|
57
|
-
__alpha__globalLabel5: string;
|
|
58
|
-
__alpha__globalLabel6: string;
|
|
59
|
-
__alpha__globalLabel7: string;
|
|
60
|
-
__alpha__globalLabel8: string;
|
|
61
|
-
__alpha__globalLabel9: string;
|
|
62
|
-
|
|
63
|
-
__alpha__primary1: string;
|
|
64
|
-
__alpha__primary2: string;
|
|
65
|
-
|
|
66
|
-
__alpha__secondary1: string;
|
|
67
|
-
__alpha__secondary2: string;
|
|
68
|
-
__alpha__secondary3: string;
|
|
69
|
-
__alpha__secondary4: string;
|
|
70
|
-
__alpha__lightHighlightedSurface: string;
|
|
71
86
|
};
|
|
87
|
+
|
|
88
|
+
export type SystemPalette = LegacySystemPalette &
|
|
89
|
+
GlobalSystemPalette &
|
|
90
|
+
BrandSystemPalette;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { workPalette } from '@hero-design/colors';
|
|
1
|
+
import { workPalette as palette } from '@hero-design/colors';
|
|
2
2
|
import swag from './swag';
|
|
3
3
|
import type { SystemPalette } from './types';
|
|
4
4
|
|
|
5
5
|
const workSystemPalette: SystemPalette = {
|
|
6
6
|
...swag,
|
|
7
|
-
primary: workPalette.gold,
|
|
8
|
-
primaryLight: workPalette.goldLight50,
|
|
9
|
-
primaryDark: workPalette.goldLight20,
|
|
10
|
-
primaryBackground: workPalette.goldLight90,
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
primary: palette.gold,
|
|
9
|
+
mutedPrimary: palette.goldLight90,
|
|
10
|
+
onPrimary: palette.maasstrichtBlue,
|
|
11
|
+
secondary: palette.violet,
|
|
12
|
+
onSecondary: palette.white,
|
|
13
|
+
mutedSecondary: palette.maasstrichtBlueLight50,
|
|
14
|
+
disabledSecondary: palette.violetLight50,
|
|
15
|
+
highlightedSurface: palette.violetLight80,
|
|
16
|
+
lightHighlightedSurface: palette.violetLight90,
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export default workSystemPalette;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { scale as defaultScale } from './scale';
|
|
2
2
|
import swagSystemPalette from './colors/swag';
|
|
3
3
|
import workSystemPalette from './colors/work';
|
|
4
|
+
import jobsSystemPalette from './colors/jobs';
|
|
4
5
|
|
|
5
6
|
import { getFonts, getFontSizes, getLineHeights } from './typography';
|
|
6
7
|
import { getSpace } from './space';
|
|
@@ -36,4 +37,10 @@ type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
|
36
37
|
|
|
37
38
|
export type { GlobalTheme, Scale, SystemPalette };
|
|
38
39
|
|
|
39
|
-
export {
|
|
40
|
+
export {
|
|
41
|
+
getGlobalTheme,
|
|
42
|
+
defaultScale,
|
|
43
|
+
swagSystemPalette,
|
|
44
|
+
workSystemPalette,
|
|
45
|
+
jobsSystemPalette,
|
|
46
|
+
};
|
package/src/theme/index.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import getTheme from './getTheme';
|
|
2
2
|
import ThemeProvider, { useTheme } from './ThemeProvider';
|
|
3
3
|
import ThemeSwitcher from './ThemeSwitcher';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
swagSystemPalette,
|
|
6
|
+
workSystemPalette,
|
|
7
|
+
jobsSystemPalette,
|
|
8
|
+
} from './global';
|
|
5
9
|
|
|
6
10
|
import type { Theme } from './getTheme';
|
|
7
11
|
|
|
@@ -16,6 +20,7 @@ export {
|
|
|
16
20
|
useTheme,
|
|
17
21
|
swagSystemPalette,
|
|
18
22
|
workSystemPalette,
|
|
23
|
+
jobsSystemPalette,
|
|
19
24
|
};
|
|
20
25
|
|
|
21
26
|
export default defaultTheme;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { omit, pick } from '../helpers';
|
|
2
|
+
|
|
3
|
+
describe('pick', () => {
|
|
4
|
+
it('works', () => {
|
|
5
|
+
const keys = ['a', 'b', 'f'];
|
|
6
|
+
const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
|
|
7
|
+
|
|
8
|
+
expect(pick(keys, props)).toEqual({
|
|
9
|
+
a: 1,
|
|
10
|
+
b: true,
|
|
11
|
+
f: 'whatever',
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
describe('omit', () => {
|
|
17
|
+
it('works', () => {
|
|
18
|
+
const keys = ['a', 'b'];
|
|
19
|
+
const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
|
|
20
|
+
|
|
21
|
+
expect(omit(keys, props)).toEqual({
|
|
22
|
+
c: 'outline',
|
|
23
|
+
d: null,
|
|
24
|
+
f: 'whatever',
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/utils/helpers.ts
CHANGED
|
@@ -2,3 +2,24 @@ import { Platform } from 'react-native';
|
|
|
2
2
|
|
|
3
3
|
export const isIOS = Platform.OS === 'ios';
|
|
4
4
|
export const isAndroid = Platform.OS === 'android';
|
|
5
|
+
|
|
6
|
+
export const pick = (keys: Array<string>, props: Record<string, any>) =>
|
|
7
|
+
keys
|
|
8
|
+
.filter((key) => key in props)
|
|
9
|
+
.reduce(
|
|
10
|
+
(result, cur) => ({
|
|
11
|
+
...result,
|
|
12
|
+
[cur]: props[cur],
|
|
13
|
+
}),
|
|
14
|
+
{}
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const omit = (keys: Array<string>, props: Record<string, any>) => {
|
|
18
|
+
const result = props;
|
|
19
|
+
|
|
20
|
+
keys.forEach((key) => {
|
|
21
|
+
delete result[key];
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare type ThemeSize = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
|
|
2
|
-
declare type ThemeIntent = 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
2
|
+
declare type ThemeIntent = 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
3
3
|
declare const StyledHeroIcon: import("@emotion/native").StyledComponent<import("react-native-vector-icons/Icon").IconProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
@@ -9,7 +9,7 @@ export interface IconProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Intent of the Icon.
|
|
11
11
|
*/
|
|
12
|
-
intent?: 'text' | 'primary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
12
|
+
intent?: 'text' | 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'disabled-text' | 'text-inverted';
|
|
13
13
|
/**
|
|
14
14
|
* Size of the Icon.
|
|
15
15
|
*/
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RefreshControlProps as NativeRefreshControlProps } from 'react-native';
|
|
2
|
+
export interface RefreshControlProps extends Omit<NativeRefreshControlProps, 'colors' | 'tintColor'> {
|
|
3
|
+
}
|
|
4
|
+
declare const RefreshControl: ({ ...props }: RefreshControlProps) => JSX.Element;
|
|
5
|
+
export default RefreshControl;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
interface OnSelectOptionsType<TMetaData> {
|
|
2
|
+
highlighted: boolean;
|
|
3
|
+
meta?: TMetaData;
|
|
4
|
+
}
|
|
5
|
+
export interface MentionListProps<TMetaData = unknown> {
|
|
2
6
|
/**
|
|
3
7
|
* Unique name used to communicate with webview, should be the same with the RichTextEditor component it used with
|
|
4
8
|
*/
|
|
@@ -6,7 +10,7 @@ export interface MentionListProps {
|
|
|
6
10
|
/**
|
|
7
11
|
* Function used to render mention options
|
|
8
12
|
*/
|
|
9
|
-
render: (searchText: string, onSelect: (id: string, name: string) => void) => JSX.Element;
|
|
13
|
+
render: (searchText: string, onSelect: (id: string, name: string, options?: OnSelectOptionsType<TMetaData>) => void) => JSX.Element;
|
|
10
14
|
}
|
|
11
|
-
declare const MentionList: ({ name: eventPrefix, render }: MentionListProps) => JSX.Element;
|
|
15
|
+
declare const MentionList: <TMetaData>({ name: eventPrefix, render }: MentionListProps<TMetaData>) => JSX.Element;
|
|
12
16
|
export default MentionList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RichTextEditorProps, RichTextEditorRef } from './RichTextEditor';
|
|
2
2
|
export type { RichTextEditorProps, RichTextEditorRef };
|
|
3
3
|
declare const _default: import("react").ForwardRefExoticComponent<Omit<RichTextEditorProps, "forwardedRef"> & import("react").RefAttributes<RichTextEditorRef>> & {
|
|
4
|
-
MentionList: ({ name: eventPrefix, render }: import("./MentionList").MentionListProps) => JSX.Element;
|
|
4
|
+
MentionList: <TMetaData>({ name: eventPrefix, render }: import("./MentionList").MentionListProps<TMetaData>) => JSX.Element;
|
|
5
5
|
Toolbar: ({ name, buttons, testID, }: import("./EditorToolbar").EditorToolbarProps) => JSX.Element;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
@@ -57,9 +57,7 @@ export interface SelectProps<V, T extends OptionType<V>> extends Pick<TextInputP
|
|
|
57
57
|
/**
|
|
58
58
|
* Props that are passed to TextInput.
|
|
59
59
|
*/
|
|
60
|
-
inputProps?:
|
|
61
|
-
loading?: boolean;
|
|
62
|
-
};
|
|
60
|
+
inputProps?: Pick<TextInputProps, 'loading' | 'required'>;
|
|
63
61
|
/**
|
|
64
62
|
* Field label.
|
|
65
63
|
*/
|
|
@@ -3,8 +3,6 @@ export declare type Variant = 'default' | 'filled' | 'focused' | 'disabled' | 'r
|
|
|
3
3
|
declare const StyledContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
4
|
theme?: import("@emotion/react").Theme;
|
|
5
5
|
as?: import("react").ElementType<any>;
|
|
6
|
-
} & {
|
|
7
|
-
themeVariant: Variant;
|
|
8
6
|
}, {}, {
|
|
9
7
|
ref?: import("react").Ref<View>;
|
|
10
8
|
}>;
|
|
@@ -70,6 +68,14 @@ declare const StyledTextInput: import("@emotion/native").StyledComponent<import(
|
|
|
70
68
|
}, {}, {
|
|
71
69
|
ref?: import("react").Ref<TextInput>;
|
|
72
70
|
}>;
|
|
71
|
+
declare const StyledBorderBackDrop: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
72
|
+
theme?: import("@emotion/react").Theme;
|
|
73
|
+
as?: import("react").ElementType<any>;
|
|
74
|
+
} & {
|
|
75
|
+
themeVariant: Variant;
|
|
76
|
+
}, {}, {
|
|
77
|
+
ref?: import("react").Ref<View>;
|
|
78
|
+
}>;
|
|
73
79
|
declare const StyledTextInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
74
80
|
theme?: import("@emotion/react").Theme;
|
|
75
81
|
as?: import("react").ElementType<any>;
|
|
@@ -94,4 +100,4 @@ declare const StyledErrorAndMaxLengthContainer: import("@emotion/native").Styled
|
|
|
94
100
|
}, {}, {
|
|
95
101
|
ref?: import("react").Ref<View>;
|
|
96
102
|
}>;
|
|
97
|
-
export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledErrorAndMaxLengthContainer, };
|
|
103
|
+
export { StyledTextInputContainer, StyledLabel, StyledLabelContainer, StyledAsteriskLabel, StyledAsteriskLabelInsideTextInput, StyledTextInput, StyledError, StyledMaxLengthMessage, StyledLabelInsideTextInput, StyledContainer, StyledErrorContainer, StyledHelperText, StyledTextInputAndLabelContainer, StyledLabelContainerInsideTextInput, StyledErrorAndHelpTextContainer, StyledBorderBackDrop, StyledErrorAndMaxLengthContainer, };
|
|
@@ -3,7 +3,7 @@ export interface ToolbarItemProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* Visual intent of the toolbar item.
|
|
5
5
|
*/
|
|
6
|
-
intent?: 'primary' | 'info' | 'success' | 'danger' | 'warning';
|
|
6
|
+
intent?: 'primary' | 'secondary' | 'info' | 'success' | 'danger' | 'warning';
|
|
7
7
|
/**
|
|
8
8
|
* Icon of the toolbar item.
|
|
9
9
|
*/
|
|
@@ -5,7 +5,7 @@ declare const StyledText: import("@emotion/native").StyledComponent<import("reac
|
|
|
5
5
|
} & {
|
|
6
6
|
themeFontSize: 'small' | 'medium' | 'large' | 'xlarge' | 'xxxlarge' | 'xxxxxlarge';
|
|
7
7
|
themeFontWeight: 'light' | 'regular' | 'semi-bold';
|
|
8
|
-
themeIntent: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
8
|
+
themeIntent: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
9
9
|
}, {}, {
|
|
10
10
|
ref?: import("react").Ref<Text>;
|
|
11
11
|
}>;
|
|
@@ -16,7 +16,7 @@ export interface TextProps extends NativeTextProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* Visual intent color to apply to the text.
|
|
18
18
|
*/
|
|
19
|
-
intent?: 'body' | 'subdued' | 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
19
|
+
intent?: 'body' | 'subdued' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'inverted';
|
|
20
20
|
/**
|
|
21
21
|
* Additional style.
|
|
22
22
|
*/
|
package/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette } from './theme';
|
|
1
|
+
import theme, { getTheme, ThemeProvider, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette } from './theme';
|
|
2
2
|
import { scale } from './utils/scale';
|
|
3
3
|
import Accordion from './components/Accordion';
|
|
4
4
|
import Alert from './components/Alert';
|
|
@@ -36,6 +36,7 @@ import TimePicker from './components/TimePicker';
|
|
|
36
36
|
import Toast from './components/Toast';
|
|
37
37
|
import Toolbar from './components/Toolbar';
|
|
38
38
|
import Typography from './components/Typography';
|
|
39
|
+
import RefreshControl from './components/RefreshControl';
|
|
39
40
|
import RichTextEditor from './components/RichTextEditor';
|
|
40
|
-
export { theme, getTheme, useTheme, scale, ThemeProvider, swagSystemPalette, workSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RichTextEditor, };
|
|
41
|
+
export { theme, getTheme, useTheme, scale, ThemeProvider, swagSystemPalette, workSystemPalette, jobsSystemPalette, Accordion, Alert, Avatar, Badge, BottomNavigation, BottomSheet, Box, Button, Calendar, Card, Collapse, Checkbox, ContentNavigator, DatePicker, Divider, Drawer, Empty, FAB, Icon, Image, List, PinInput, Progress, Slider, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, RefreshControl, RichTextEditor, };
|
|
41
42
|
export * from './types';
|
|
@@ -9,9 +9,7 @@ declare const getRichTextEditorTheme: (theme: GlobalTheme) => {
|
|
|
9
9
|
wrapperMarginBottom: number;
|
|
10
10
|
toolbarHorizontalPadding: number;
|
|
11
11
|
editorPadding: number;
|
|
12
|
-
|
|
13
|
-
borderWidths: {
|
|
14
|
-
webViewBorderBottomWidth: number;
|
|
12
|
+
mention: number;
|
|
15
13
|
};
|
|
16
14
|
fontSizes: {
|
|
17
15
|
editor: number;
|
|
@@ -22,5 +20,8 @@ declare const getRichTextEditorTheme: (theme: GlobalTheme) => {
|
|
|
22
20
|
toolbarSeparatorWidth: number;
|
|
23
21
|
toolbarSeparatorHeight: number;
|
|
24
22
|
};
|
|
23
|
+
radii: {
|
|
24
|
+
mention: number;
|
|
25
|
+
};
|
|
25
26
|
};
|
|
26
27
|
export default getRichTextEditorTheme;
|
|
@@ -20,6 +20,7 @@ import getListTheme from './components/list';
|
|
|
20
20
|
import getPinInputTheme from './components/pinInput';
|
|
21
21
|
import getProgressTheme from './components/progress';
|
|
22
22
|
import getRadioTheme from './components/radio';
|
|
23
|
+
import getRefreshControlTheme from './components/refreshControl';
|
|
23
24
|
import getRichTextEditorTheme from './components/richTextEditor';
|
|
24
25
|
import getSectionHeadingTheme from './components/sectionHeading';
|
|
25
26
|
import getSelectTheme from './components/select';
|
|
@@ -58,6 +59,7 @@ declare type Theme = GlobalTheme & {
|
|
|
58
59
|
pinInput: ReturnType<typeof getPinInputTheme>;
|
|
59
60
|
progress: ReturnType<typeof getProgressTheme>;
|
|
60
61
|
radio: ReturnType<typeof getRadioTheme>;
|
|
62
|
+
refreshControl: ReturnType<typeof getRefreshControlTheme>;
|
|
61
63
|
richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
|
|
62
64
|
sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
|
|
63
65
|
select: ReturnType<typeof getSelectTheme>;
|
|
@@ -1,4 +1,43 @@
|
|
|
1
|
-
export declare type
|
|
1
|
+
export declare type GlobalSystemPalette = {
|
|
2
|
+
globalPrimary: string;
|
|
3
|
+
mutedGlobalPrimary: string;
|
|
4
|
+
onGlobalPrimary: string;
|
|
5
|
+
globalSecondary: string;
|
|
6
|
+
globalPrimaryOutline: string;
|
|
7
|
+
globalSecondaryOutline: string;
|
|
8
|
+
defaultGlobalSurface: string;
|
|
9
|
+
onDefaultGlobalSurface: string;
|
|
10
|
+
neutralGlobalSurface: string;
|
|
11
|
+
disabledOnDefaultGlobalSurface: string;
|
|
12
|
+
error: string;
|
|
13
|
+
errorSurface: string;
|
|
14
|
+
onErrorSurface: string;
|
|
15
|
+
warning: string;
|
|
16
|
+
warningSurface: string;
|
|
17
|
+
onWarningSurface: string;
|
|
18
|
+
success: string;
|
|
19
|
+
successSurface: string;
|
|
20
|
+
onSuccessSurface: string;
|
|
21
|
+
info: string;
|
|
22
|
+
infoSurface: string;
|
|
23
|
+
onInfoSurface: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
archivedSurface: string;
|
|
26
|
+
onArchivedSurface: string;
|
|
27
|
+
};
|
|
28
|
+
export declare type BrandSystemPalette = {
|
|
29
|
+
primary: string;
|
|
30
|
+
mutedPrimary: string;
|
|
31
|
+
onPrimary: string;
|
|
32
|
+
secondary: string;
|
|
33
|
+
highlightedSecondarySurface: string;
|
|
34
|
+
onSecondary: string;
|
|
35
|
+
mutedSecondary: string;
|
|
36
|
+
disabledSecondary: string;
|
|
37
|
+
highlightedSurface: string;
|
|
38
|
+
lightHighlightedSurface: string;
|
|
39
|
+
};
|
|
40
|
+
export declare type LegacySystemPalette = {
|
|
2
41
|
globalPrimary: string;
|
|
3
42
|
globalPrimaryLight: string;
|
|
4
43
|
globalPrimaryBackground: string;
|
|
@@ -42,24 +81,5 @@ export declare type SystemPalette = {
|
|
|
42
81
|
black: string;
|
|
43
82
|
inactiveBackground: string;
|
|
44
83
|
shadow: string;
|
|
45
|
-
__alpha__globalPrimary: string;
|
|
46
|
-
__alpha__globalSecondary1: string;
|
|
47
|
-
__alpha__globalSecondary4: string;
|
|
48
|
-
__alpha__globalNeutral3: string;
|
|
49
|
-
__alpha__globalLabel1: string;
|
|
50
|
-
__alpha__globalLabel2: string;
|
|
51
|
-
__alpha__globalLabel3: string;
|
|
52
|
-
__alpha__globalLabel4: string;
|
|
53
|
-
__alpha__globalLabel5: string;
|
|
54
|
-
__alpha__globalLabel6: string;
|
|
55
|
-
__alpha__globalLabel7: string;
|
|
56
|
-
__alpha__globalLabel8: string;
|
|
57
|
-
__alpha__globalLabel9: string;
|
|
58
|
-
__alpha__primary1: string;
|
|
59
|
-
__alpha__primary2: string;
|
|
60
|
-
__alpha__secondary1: string;
|
|
61
|
-
__alpha__secondary2: string;
|
|
62
|
-
__alpha__secondary3: string;
|
|
63
|
-
__alpha__secondary4: string;
|
|
64
|
-
__alpha__lightHighlightedSurface: string;
|
|
65
84
|
};
|
|
85
|
+
export declare type SystemPalette = LegacySystemPalette & GlobalSystemPalette & BrandSystemPalette;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { scale as defaultScale } from './scale';
|
|
2
2
|
import swagSystemPalette from './colors/swag';
|
|
3
3
|
import workSystemPalette from './colors/work';
|
|
4
|
+
import jobsSystemPalette from './colors/jobs';
|
|
4
5
|
import type { Scale } from './scale';
|
|
5
6
|
import type { SystemPalette } from './colors/types';
|
|
6
7
|
declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
@@ -48,26 +49,34 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
48
49
|
black: string;
|
|
49
50
|
inactiveBackground: string;
|
|
50
51
|
shadow: string;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
52
|
+
mutedGlobalPrimary: string;
|
|
53
|
+
onGlobalPrimary: string;
|
|
54
|
+
globalSecondary: string;
|
|
55
|
+
globalPrimaryOutline: string;
|
|
56
|
+
globalSecondaryOutline: string;
|
|
57
|
+
defaultGlobalSurface: string;
|
|
58
|
+
onDefaultGlobalSurface: string;
|
|
59
|
+
neutralGlobalSurface: string;
|
|
60
|
+
disabledOnDefaultGlobalSurface: string;
|
|
61
|
+
error: string;
|
|
62
|
+
errorSurface: string;
|
|
63
|
+
onErrorSurface: string;
|
|
64
|
+
warningSurface: string;
|
|
65
|
+
onWarningSurface: string;
|
|
66
|
+
successSurface: string;
|
|
67
|
+
onSuccessSurface: string;
|
|
68
|
+
infoSurface: string;
|
|
69
|
+
onInfoSurface: string;
|
|
70
|
+
archivedSurface: string;
|
|
71
|
+
onArchivedSurface: string;
|
|
72
|
+
mutedPrimary: string;
|
|
73
|
+
onPrimary: string;
|
|
74
|
+
highlightedSecondarySurface: string;
|
|
75
|
+
onSecondary: string;
|
|
76
|
+
mutedSecondary: string;
|
|
77
|
+
disabledSecondary: string;
|
|
78
|
+
highlightedSurface: string;
|
|
79
|
+
lightHighlightedSurface: string;
|
|
71
80
|
};
|
|
72
81
|
fonts: import("./typography").Fonts;
|
|
73
82
|
fontSizes: import("./typography").FontSizes;
|
|
@@ -79,4 +88,4 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
79
88
|
};
|
|
80
89
|
declare type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
81
90
|
export type { GlobalTheme, Scale, SystemPalette };
|
|
82
|
-
export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette };
|
|
91
|
+
export { getGlobalTheme, defaultScale, swagSystemPalette, workSystemPalette, jobsSystemPalette, };
|
package/types/theme/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import getTheme from './getTheme';
|
|
2
2
|
import ThemeProvider, { useTheme } from './ThemeProvider';
|
|
3
3
|
import ThemeSwitcher from './ThemeSwitcher';
|
|
4
|
-
import { swagSystemPalette, workSystemPalette } from './global';
|
|
4
|
+
import { swagSystemPalette, workSystemPalette, jobsSystemPalette } from './global';
|
|
5
5
|
import type { Theme } from './getTheme';
|
|
6
6
|
declare const defaultTheme: Theme;
|
|
7
7
|
export type { Theme };
|
|
8
|
-
export { getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, workSystemPalette, };
|
|
8
|
+
export { getTheme, ThemeProvider, ThemeSwitcher, useTheme, swagSystemPalette, workSystemPalette, jobsSystemPalette, };
|
|
9
9
|
export default defaultTheme;
|
package/types/utils/helpers.d.ts
CHANGED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { pick } from '../helpers';
|
|
2
|
-
|
|
3
|
-
describe('pick', () => {
|
|
4
|
-
it('works', () => {
|
|
5
|
-
const keys = ['a', 'b', 'f'];
|
|
6
|
-
const props = { a: 1, b: true, c: 'outline', d: null, f: 'whatever' };
|
|
7
|
-
|
|
8
|
-
expect(pick(keys, props)).toEqual({
|
|
9
|
-
a: 1,
|
|
10
|
-
b: true,
|
|
11
|
-
f: 'whatever',
|
|
12
|
-
});
|
|
13
|
-
});
|
|
14
|
-
});
|