@hero-design/rn 7.20.1 → 7.22.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/.eslintrc.js +11 -0
- package/.turbo/turbo-build.log +9 -9
- package/babel.config.js +1 -1
- package/es/index.js +714 -471
- package/lib/index.js +720 -474
- package/package.json +9 -15
- package/rollup.config.js +1 -0
- package/src/components/BottomNavigation/__tests__/index.spec.tsx +1 -1
- package/src/components/BottomNavigation/index.tsx +3 -3
- package/src/components/BottomSheet/index.tsx +6 -1
- package/src/components/Box/helpers.ts +1 -1
- package/src/components/Calendar/index.tsx +9 -9
- package/src/components/Checkbox/__tests__/__snapshots__/StyledCheckbox.spec.tsx.snap +4 -4
- package/src/components/Checkbox/__tests__/__snapshots__/index.spec.tsx.snap +13 -13
- package/src/components/Collapse/index.tsx +1 -1
- package/src/components/Drawer/DragableDrawer/helpers.ts +7 -3
- package/src/components/Empty/StyledEmpty.tsx +1 -9
- package/src/components/Empty/__tests__/__snapshots__/index.spec.tsx.snap +58 -5
- package/src/components/Empty/__tests__/index.spec.tsx +13 -0
- package/src/components/Empty/index.tsx +38 -18
- package/src/components/FAB/ActionGroup/index.tsx +1 -1
- package/src/components/Icon/HeroIcon/selection.json +7029 -1
- package/src/components/Image/__tests__/__snapshots__/index.spec.tsx.snap +81 -0
- package/src/components/Image/__tests__/index.spec.tsx +29 -0
- package/src/components/Image/index.tsx +46 -0
- package/src/components/List/__tests__/__snapshots__/ListItem.spec.tsx.snap +5 -5
- package/src/components/PinInput/index.tsx +1 -1
- package/src/components/Progress/__tests__/__snapshots__/index.spec.js.snap +60 -60
- package/src/components/RichTextEditor/EditorToolbar.tsx +3 -3
- package/src/components/RichTextEditor/RichTextEditor.tsx +5 -5
- package/src/components/RichTextEditor/__tests__/EditorToolbar.spec.tsx +2 -2
- package/src/components/RichTextEditor/__tests__/MentionList.spec.tsx +1 -1
- package/src/components/RichTextEditor/__tests__/__snapshots__/EditorToolbar.spec.tsx.snap +2 -2
- package/src/components/RichTextEditor/__tests__/__snapshots__/RichTextEditor.spec.tsx.snap +2 -2
- package/src/components/Select/MultiSelect/OptionList.tsx +5 -7
- package/src/components/Select/MultiSelect/__tests__/index.spec.tsx +21 -0
- package/src/components/Select/MultiSelect/index.tsx +35 -5
- package/src/components/Select/SingleSelect/OptionList.tsx +4 -5
- package/src/components/Select/SingleSelect/__tests__/index.spec.tsx +16 -0
- package/src/components/Select/SingleSelect/index.tsx +36 -6
- package/src/components/Select/StyledOptionList.tsx +3 -9
- package/src/components/Select/helpers.tsx +4 -4
- package/src/components/Slider/__tests__/__snapshots__/index.spec.tsx.snap +43 -0
- package/src/components/Slider/__tests__/index.spec.tsx +33 -0
- package/src/components/Slider/index.tsx +89 -0
- package/src/components/Switch/SelectorSwitch/Option.tsx +67 -0
- package/src/components/Switch/SelectorSwitch/StyledSelectorSwitch.tsx +25 -0
- package/src/components/Switch/SelectorSwitch/__tests__/Option.spec.tsx +61 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/Option.spec.tsx.snap +195 -0
- package/src/components/Switch/SelectorSwitch/__tests__/__snapshots__/index.spec.tsx.snap +121 -0
- package/src/components/Switch/SelectorSwitch/__tests__/index.spec.tsx +62 -0
- package/src/components/Switch/SelectorSwitch/index.tsx +60 -0
- package/src/components/Switch/StyledSwitch.tsx +4 -4
- package/src/components/Switch/__tests__/__snapshots__/StyledSwitch.spec.tsx.snap +10 -10
- package/src/components/Switch/__tests__/__snapshots__/index.spec.tsx.snap +8 -8
- package/src/components/Switch/index.tsx +9 -5
- package/src/components/Tabs/ScrollableTabs.tsx +12 -5
- package/src/components/Tabs/__tests__/ScrollableTabs.spec.tsx +1 -1
- package/src/components/Tabs/__tests__/index.spec.tsx +1 -1
- package/src/components/Tabs/index.tsx +13 -6
- package/src/components/TextInput/__tests__/__snapshots__/index.spec.tsx.snap +3 -1
- package/src/components/TextInput/__tests__/index.spec.tsx +114 -112
- package/src/components/TextInput/index.tsx +64 -59
- package/src/components/Toast/ToastContainer.tsx +6 -6
- package/src/index.ts +4 -0
- package/src/theme/__tests__/__snapshots__/index.spec.ts.snap +70 -23
- package/src/theme/components/alert.ts +1 -2
- package/src/theme/components/avatar.ts +8 -8
- package/src/theme/components/badge.ts +4 -4
- package/src/theme/components/bottomNavigation.ts +1 -1
- package/src/theme/components/bottomSheet.ts +2 -3
- package/src/theme/components/calendar.ts +9 -7
- package/src/theme/components/card.ts +1 -1
- package/src/theme/components/checkbox.ts +2 -5
- package/src/theme/components/datePicker.ts +3 -3
- package/src/theme/components/drawer.ts +2 -3
- package/src/theme/components/empty.ts +3 -8
- package/src/theme/components/fab.ts +2 -2
- package/src/theme/components/image.ts +12 -0
- package/src/theme/components/pinInput.ts +3 -3
- package/src/theme/components/progress.ts +2 -3
- package/src/theme/components/radio.ts +7 -3
- package/src/theme/components/richTextEditor.ts +4 -4
- package/src/theme/components/slider.ts +13 -0
- package/src/theme/components/switch.ts +28 -17
- package/src/theme/components/tabs.ts +1 -1
- package/src/theme/components/timePicker.ts +3 -3
- package/src/theme/components/toast.ts +1 -2
- package/src/theme/getTheme.ts +9 -2
- package/src/theme/global/colors/swag.ts +2 -0
- package/src/theme/global/colors/types.ts +2 -0
- package/src/theme/global/index.ts +3 -0
- package/src/theme/global/scale.ts +3 -0
- package/src/theme/global/sizes.ts +29 -0
- package/testUtils/setup.tsx +15 -1
- package/tsconfig.json +1 -1
- package/types/components/BottomSheet/index.d.ts +5 -1
- package/types/components/Empty/StyledEmpty.d.ts +1 -7
- package/types/components/Empty/index.d.ts +8 -2
- package/types/components/Image/__tests__/index.spec.d.ts +1 -0
- package/types/components/Image/index.d.ts +17 -0
- package/types/components/Select/MultiSelect/OptionList.d.ts +5 -2
- package/types/components/Select/MultiSelect/index.d.ts +7 -1
- package/types/components/Select/SingleSelect/OptionList.d.ts +5 -2
- package/types/components/Select/SingleSelect/index.d.ts +8 -2
- package/types/components/Select/StyledOptionList.d.ts +4 -3
- package/types/components/Select/index.d.ts +1 -1
- package/types/components/Slider/__tests__/index.spec.d.ts +1 -0
- package/types/components/Slider/index.d.ts +52 -0
- package/types/components/Switch/SelectorSwitch/Option.d.ts +10 -0
- package/types/components/Switch/SelectorSwitch/StyledSelectorSwitch.d.ts +19 -0
- package/types/components/Switch/SelectorSwitch/__tests__/Option.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/__tests__/index.spec.d.ts +1 -0
- package/types/components/Switch/SelectorSwitch/index.d.ts +37 -0
- package/types/components/Switch/index.d.ts +5 -3
- package/types/components/Tabs/ScrollableTabs.d.ts +1 -1
- package/types/components/Tabs/index.d.ts +2 -2
- package/types/components/TextInput/index.d.ts +6 -5
- package/types/index.d.ts +3 -1
- package/types/theme/components/datePicker.d.ts +2 -1
- package/types/theme/components/empty.d.ts +2 -5
- package/types/theme/components/image.d.ts +8 -0
- package/types/theme/components/slider.d.ts +9 -0
- package/types/theme/components/switch.d.ts +27 -12
- package/types/theme/components/timePicker.d.ts +2 -1
- package/types/theme/getTheme.d.ts +4 -0
- package/types/theme/global/colors/types.d.ts +2 -0
- package/types/theme/global/index.d.ts +3 -0
- package/types/theme/global/scale.d.ts +1 -0
- package/types/theme/global/sizes.d.ts +14 -0
- package/.eslintrc.json +0 -61
- package/.prettierrc.json +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import type { IconName } from '../../Icon';
|
|
4
|
+
declare type StatusBadgeType = {
|
|
5
|
+
type: 'status';
|
|
6
|
+
};
|
|
7
|
+
export declare type BadgeConfigType = StatusBadgeType;
|
|
8
|
+
export declare type OptionType<T> = {
|
|
9
|
+
value: T;
|
|
10
|
+
text: string;
|
|
11
|
+
icon: IconName;
|
|
12
|
+
badge?: BadgeConfigType;
|
|
13
|
+
};
|
|
14
|
+
export interface SelectorSwitchProps<T> {
|
|
15
|
+
/**
|
|
16
|
+
* Array of exactly TWO options to switch between.
|
|
17
|
+
*/
|
|
18
|
+
options: [OptionType<T>, OptionType<T>];
|
|
19
|
+
/**
|
|
20
|
+
* Current selected value.
|
|
21
|
+
*/
|
|
22
|
+
value: T;
|
|
23
|
+
/**
|
|
24
|
+
* Callback called when an option is pressed.
|
|
25
|
+
*/
|
|
26
|
+
onPress?: (value: T) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Additional style.
|
|
29
|
+
*/
|
|
30
|
+
style?: StyleProp<ViewStyle>;
|
|
31
|
+
/**
|
|
32
|
+
* Testing id of the component.
|
|
33
|
+
*/
|
|
34
|
+
testID?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const SelectorSwitch: <T>({ options, value, onPress, style, testID, }: SelectorSwitchProps<T>) => ReactElement;
|
|
37
|
+
export default SelectorSwitch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { StyleProp, ViewStyle } from 'react-native';
|
|
3
3
|
export interface SwitchProps {
|
|
4
4
|
/**
|
|
@@ -27,5 +27,7 @@ export interface SwitchProps {
|
|
|
27
27
|
*/
|
|
28
28
|
testID?: string;
|
|
29
29
|
}
|
|
30
|
-
declare const
|
|
31
|
-
|
|
30
|
+
declare const _default: (({ size, disabled, checked, onPress, style, testID, }: SwitchProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
|
|
31
|
+
Selector: <T>({ options, value, onPress, style, testID, }: import("./SelectorSwitch").SelectorSwitchProps<T>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TabsProps } from '.';
|
|
2
|
-
declare const ScrollableTab: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, }: TabsProps) => JSX.Element;
|
|
2
|
+
declare const ScrollableTab: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, testID: componentTestID, }: TabsProps) => JSX.Element;
|
|
3
3
|
export default ScrollableTab;
|
|
@@ -50,7 +50,7 @@ export interface TabsProps extends ViewProps {
|
|
|
50
50
|
*/
|
|
51
51
|
testID?: string;
|
|
52
52
|
}
|
|
53
|
-
declare const _default: (({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, }: TabsProps) => JSX.Element) & {
|
|
54
|
-
Scroll: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, }: TabsProps) => JSX.Element;
|
|
53
|
+
declare const _default: (({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, testID: componentTestID, }: TabsProps) => JSX.Element) & {
|
|
54
|
+
Scroll: ({ onTabPress, selectedTabKey, tabs, containerStyle, barStyle, lazy, lazyPreloadDistance, testID: componentTestID, }: TabsProps) => JSX.Element;
|
|
55
55
|
};
|
|
56
56
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from
|
|
3
|
-
import type { Variant } from
|
|
4
|
-
import type { IconName } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { TextInputProps as NativeTextInputProps, StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
|
+
import type { Variant } from "./StyledTextInput";
|
|
4
|
+
import type { IconName } from "../Icon";
|
|
5
5
|
export interface TextInputProps extends NativeTextInputProps {
|
|
6
6
|
/**
|
|
7
7
|
* Field label.
|
|
@@ -51,6 +51,7 @@ export interface TextInputProps extends NativeTextInputProps {
|
|
|
51
51
|
loading?: boolean;
|
|
52
52
|
maxLength?: number;
|
|
53
53
|
helpText?: string;
|
|
54
|
+
renderInputValue?: (inputProps: NativeTextInputProps) => React.ReactNode;
|
|
54
55
|
}
|
|
55
56
|
export declare const getVariant: ({ disabled, error, editable, loading, isFocused, isEmptyValue, }: {
|
|
56
57
|
disabled?: boolean;
|
|
@@ -60,5 +61,5 @@ export declare const getVariant: ({ disabled, error, editable, loading, isFocuse
|
|
|
60
61
|
isFocused?: boolean;
|
|
61
62
|
isEmptyValue?: boolean;
|
|
62
63
|
}) => Variant;
|
|
63
|
-
declare const TextInput: ({ label, prefix, suffix, style, textStyle, testID, accessibilityLabelledBy, error, required, editable, disabled, loading, maxLength, helpText, value, defaultValue, ...nativeProps }: TextInputProps) => JSX.Element;
|
|
64
|
+
declare const TextInput: ({ label, prefix, suffix, style, textStyle, testID, accessibilityLabelledBy, error, required, editable, disabled, loading, maxLength, helpText, value, defaultValue, renderInputValue, ...nativeProps }: TextInputProps) => JSX.Element;
|
|
64
65
|
export default TextInput;
|
package/types/index.d.ts
CHANGED
|
@@ -19,9 +19,11 @@ import Drawer from './components/Drawer';
|
|
|
19
19
|
import Empty from './components/Empty';
|
|
20
20
|
import FAB from './components/FAB';
|
|
21
21
|
import Icon from './components/Icon';
|
|
22
|
+
import Image from './components/Image';
|
|
22
23
|
import List from './components/List';
|
|
23
24
|
import PinInput from './components/PinInput';
|
|
24
25
|
import Progress from './components/Progress';
|
|
26
|
+
import Slider from './components/Slider';
|
|
25
27
|
import Spinner from './components/Spinner';
|
|
26
28
|
import Radio from './components/Radio';
|
|
27
29
|
import SectionHeading from './components/SectionHeading';
|
|
@@ -35,5 +37,5 @@ import Toast from './components/Toast';
|
|
|
35
37
|
import Toolbar from './components/Toolbar';
|
|
36
38
|
import Typography from './components/Typography';
|
|
37
39
|
import RichTextEditor from './components/RichTextEditor';
|
|
38
|
-
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, List, PinInput, Progress, Spinner, Radio, SectionHeading, Select, Switch, Tabs, Tag, TextInput, TimePicker, Toast, Toolbar, Typography, 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, };
|
|
39
41
|
export * from './types';
|
|
@@ -11,19 +11,16 @@ declare const getEmptyTheme: (theme: GlobalTheme) => {
|
|
|
11
11
|
illustrationBackground: string;
|
|
12
12
|
};
|
|
13
13
|
sizes: {
|
|
14
|
-
|
|
14
|
+
image: number;
|
|
15
15
|
};
|
|
16
16
|
space: {
|
|
17
17
|
titleMargin: number;
|
|
18
|
-
|
|
18
|
+
imageMargin: number;
|
|
19
19
|
wrapperPadding: number;
|
|
20
20
|
};
|
|
21
21
|
fonts: {
|
|
22
22
|
title: string;
|
|
23
23
|
description: string;
|
|
24
24
|
};
|
|
25
|
-
radii: {
|
|
26
|
-
illustration: number;
|
|
27
|
-
};
|
|
28
25
|
};
|
|
29
26
|
export default getEmptyTheme;
|
|
@@ -8,26 +8,41 @@ declare const getSwitchTheme: (theme: GlobalTheme) => {
|
|
|
8
8
|
'disabled-unchecked': string;
|
|
9
9
|
};
|
|
10
10
|
thumb: string;
|
|
11
|
+
selector: {
|
|
12
|
+
background: string;
|
|
13
|
+
textBackground: string;
|
|
14
|
+
};
|
|
11
15
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
sizes: {
|
|
17
|
+
thumbs: {
|
|
18
|
+
small: number;
|
|
19
|
+
medium: number;
|
|
20
|
+
};
|
|
21
|
+
widths: {
|
|
22
|
+
small: number;
|
|
23
|
+
medium: number;
|
|
24
|
+
};
|
|
25
|
+
heights: {
|
|
26
|
+
small: number;
|
|
27
|
+
medium: number;
|
|
28
|
+
};
|
|
29
|
+
selector: {
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
23
32
|
};
|
|
24
33
|
spaces: {
|
|
25
34
|
small: number;
|
|
26
35
|
medium: number;
|
|
27
|
-
|
|
36
|
+
selector: {
|
|
37
|
+
iconPadding: number;
|
|
38
|
+
wrapperPadding: number;
|
|
39
|
+
};
|
|
28
40
|
};
|
|
29
41
|
radii: {
|
|
30
42
|
rounded: number;
|
|
43
|
+
selector: {
|
|
44
|
+
default: number;
|
|
45
|
+
};
|
|
31
46
|
};
|
|
32
47
|
};
|
|
33
48
|
export default getSwitchTheme;
|
|
@@ -15,6 +15,7 @@ import getDrawerTheme from './components/drawer';
|
|
|
15
15
|
import getEmptyTheme from './components/empty';
|
|
16
16
|
import getFABTheme from './components/fab';
|
|
17
17
|
import getIconTheme from './components/icon';
|
|
18
|
+
import getImageTheme from './components/image';
|
|
18
19
|
import getListTheme from './components/list';
|
|
19
20
|
import getPinInputTheme from './components/pinInput';
|
|
20
21
|
import getProgressTheme from './components/progress';
|
|
@@ -22,6 +23,7 @@ import getRadioTheme from './components/radio';
|
|
|
22
23
|
import getRichTextEditorTheme from './components/richTextEditor';
|
|
23
24
|
import getSectionHeadingTheme from './components/sectionHeading';
|
|
24
25
|
import getSelectTheme from './components/select';
|
|
26
|
+
import getSliderTheme from './components/slider';
|
|
25
27
|
import getSpinnerTheme from './components/spinner';
|
|
26
28
|
import getSwitchTheme from './components/switch';
|
|
27
29
|
import getTabsTheme from './components/tabs';
|
|
@@ -51,6 +53,7 @@ declare type Theme = GlobalTheme & {
|
|
|
51
53
|
empty: ReturnType<typeof getEmptyTheme>;
|
|
52
54
|
fab: ReturnType<typeof getFABTheme>;
|
|
53
55
|
icon: ReturnType<typeof getIconTheme>;
|
|
56
|
+
image: ReturnType<typeof getImageTheme>;
|
|
54
57
|
list: ReturnType<typeof getListTheme>;
|
|
55
58
|
pinInput: ReturnType<typeof getPinInputTheme>;
|
|
56
59
|
progress: ReturnType<typeof getProgressTheme>;
|
|
@@ -58,6 +61,7 @@ declare type Theme = GlobalTheme & {
|
|
|
58
61
|
richTextEditor: ReturnType<typeof getRichTextEditorTheme>;
|
|
59
62
|
sectionHeading: ReturnType<typeof getSectionHeadingTheme>;
|
|
60
63
|
select: ReturnType<typeof getSelectTheme>;
|
|
64
|
+
slider: ReturnType<typeof getSliderTheme>;
|
|
61
65
|
spinner: ReturnType<typeof getSpinnerTheme>;
|
|
62
66
|
switch: ReturnType<typeof getSwitchTheme>;
|
|
63
67
|
tabs: ReturnType<typeof getTabsTheme>;
|
|
@@ -44,6 +44,7 @@ export declare type SystemPalette = {
|
|
|
44
44
|
shadow: string;
|
|
45
45
|
__alpha__globalPrimary: string;
|
|
46
46
|
__alpha__globalSecondary1: string;
|
|
47
|
+
__alpha__globalSecondary4: string;
|
|
47
48
|
__alpha__globalNeutral3: string;
|
|
48
49
|
__alpha__globalLabel1: string;
|
|
49
50
|
__alpha__globalLabel2: string;
|
|
@@ -54,6 +55,7 @@ export declare type SystemPalette = {
|
|
|
54
55
|
__alpha__globalLabel7: string;
|
|
55
56
|
__alpha__globalLabel8: string;
|
|
56
57
|
__alpha__globalLabel9: string;
|
|
58
|
+
__alpha__primary1: string;
|
|
57
59
|
__alpha__primary2: string;
|
|
58
60
|
__alpha__secondary1: string;
|
|
59
61
|
__alpha__secondary2: string;
|
|
@@ -50,6 +50,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
50
50
|
shadow: string;
|
|
51
51
|
__alpha__globalPrimary: string;
|
|
52
52
|
__alpha__globalSecondary1: string;
|
|
53
|
+
__alpha__globalSecondary4: string;
|
|
53
54
|
__alpha__globalNeutral3: string;
|
|
54
55
|
__alpha__globalLabel1: string;
|
|
55
56
|
__alpha__globalLabel2: string;
|
|
@@ -60,6 +61,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
60
61
|
__alpha__globalLabel7: string;
|
|
61
62
|
__alpha__globalLabel8: string;
|
|
62
63
|
__alpha__globalLabel9: string;
|
|
64
|
+
__alpha__primary1: string;
|
|
63
65
|
__alpha__primary2: string;
|
|
64
66
|
__alpha__secondary1: string;
|
|
65
67
|
__alpha__secondary2: string;
|
|
@@ -71,6 +73,7 @@ declare const getGlobalTheme: (scale: Scale, systemPalette: SystemPalette) => {
|
|
|
71
73
|
lineHeights: import("./typography").FontSizes;
|
|
72
74
|
borderWidths: import("./borders").BorderWidths;
|
|
73
75
|
space: import("./space").Space;
|
|
76
|
+
sizes: import("./sizes").Sizes;
|
|
74
77
|
radii: import("./borders").Radii;
|
|
75
78
|
};
|
|
76
79
|
declare type GlobalTheme = ReturnType<typeof getGlobalTheme>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Space } from './space';
|
|
2
|
+
interface Sizes extends Space {
|
|
3
|
+
xxxxxlarge: number;
|
|
4
|
+
'6xlarge': number;
|
|
5
|
+
'7xlarge': number;
|
|
6
|
+
'9xlarge': number;
|
|
7
|
+
'14xlarge': number;
|
|
8
|
+
'15xlarge': number;
|
|
9
|
+
'18xlarge': number;
|
|
10
|
+
'19xlarge': number;
|
|
11
|
+
}
|
|
12
|
+
declare const getSizes: (baseSize: number) => Sizes;
|
|
13
|
+
export { getSizes };
|
|
14
|
+
export type { Sizes };
|
package/.eslintrc.json
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"env": {
|
|
3
|
-
"browser": true,
|
|
4
|
-
"es2021": true,
|
|
5
|
-
"jest": true
|
|
6
|
-
},
|
|
7
|
-
"extends": [
|
|
8
|
-
"plugin:prettier/recommended",
|
|
9
|
-
"plugin:react/recommended",
|
|
10
|
-
"airbnb",
|
|
11
|
-
"prettier"
|
|
12
|
-
],
|
|
13
|
-
"parser": "@typescript-eslint/parser",
|
|
14
|
-
"parserOptions": {
|
|
15
|
-
"ecmaFeatures": {
|
|
16
|
-
"jsx": true
|
|
17
|
-
},
|
|
18
|
-
"ecmaVersion": "latest",
|
|
19
|
-
"sourceType": "module"
|
|
20
|
-
},
|
|
21
|
-
"plugins": ["react", "@typescript-eslint"],
|
|
22
|
-
"settings": {
|
|
23
|
-
"import/resolver": {
|
|
24
|
-
"node": {
|
|
25
|
-
"extensions": [".js", ".jsx", ".ts", ".tsx"]
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
"rules": {
|
|
30
|
-
"react/jsx-props-no-spreading": 0,
|
|
31
|
-
"react/require-default-props": 0,
|
|
32
|
-
"react/function-component-definition": 0,
|
|
33
|
-
"react/jsx-filename-extension": [
|
|
34
|
-
1,
|
|
35
|
-
{ "extensions": [".js", ".jsx", ".tsx"] }
|
|
36
|
-
],
|
|
37
|
-
"import/prefer-default-export": 0,
|
|
38
|
-
"import/extensions": 0,
|
|
39
|
-
"no-use-before-define": 0,
|
|
40
|
-
"@typescript-eslint/no-use-before-define": 2,
|
|
41
|
-
"@typescript-eslint/no-unused-vars": [2, { "argsIgnorePattern": "^_" }],
|
|
42
|
-
"no-shadow": "off",
|
|
43
|
-
"@typescript-eslint/no-shadow": "error"
|
|
44
|
-
},
|
|
45
|
-
"overrides": [
|
|
46
|
-
{
|
|
47
|
-
"files": ["*.ts", "*.tsx"],
|
|
48
|
-
"rules": {
|
|
49
|
-
"no-undef": 0,
|
|
50
|
-
"consistent-return": 0,
|
|
51
|
-
"default-case": 0,
|
|
52
|
-
"no-underscore-dangle": [
|
|
53
|
-
2,
|
|
54
|
-
{
|
|
55
|
-
"allow": ["__hd__"]
|
|
56
|
-
}
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
}
|