@cdek-it/react-native-ui-kit 0.2.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/LICENSE +21 -0
- package/README.md +151 -0
- package/dist/components/Accordion/Accordion.d.ts +39 -0
- package/dist/components/Accordion/Accordion.js +103 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -0
- package/dist/components/Avatar/Avatar.d.ts +96 -0
- package/dist/components/Avatar/Avatar.js +121 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Avatar/index.js +1 -0
- package/dist/components/Badge/Badge.d.ts +35 -0
- package/dist/components/Badge/Badge.js +74 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Button/BaseButton.d.ts +5 -0
- package/dist/components/Button/BaseButton.js +62 -0
- package/dist/components/Button/Button.d.ts +16 -0
- package/dist/components/Button/Button.js +21 -0
- package/dist/components/Button/ButtonBadge.d.ts +21 -0
- package/dist/components/Button/ButtonBadge.js +53 -0
- package/dist/components/Button/ButtonSeverity.d.ts +17 -0
- package/dist/components/Button/ButtonSeverity.js +22 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.js +3 -0
- package/dist/components/Button/styles/index.d.ts +2 -0
- package/dist/components/Button/styles/index.js +2 -0
- package/dist/components/Button/styles/useBasicButtonStyles.d.ts +98 -0
- package/dist/components/Button/styles/useBasicButtonStyles.js +81 -0
- package/dist/components/Button/styles/useDangerButtonStyles.d.ts +63 -0
- package/dist/components/Button/styles/useDangerButtonStyles.js +57 -0
- package/dist/components/Button/styles/useInfoButtonStyles.d.ts +63 -0
- package/dist/components/Button/styles/useInfoButtonStyles.js +56 -0
- package/dist/components/Button/styles/useSeverityButtonStyles.d.ts +64 -0
- package/dist/components/Button/styles/useSeverityButtonStyles.js +29 -0
- package/dist/components/Button/styles/useSuccessButtonStyles.d.ts +63 -0
- package/dist/components/Button/styles/useSuccessButtonStyles.js +61 -0
- package/dist/components/Button/styles/useWarningButtonStyles.d.ts +63 -0
- package/dist/components/Button/styles/useWarningButtonStyles.js +61 -0
- package/dist/components/Button/types.d.ts +107 -0
- package/dist/components/Button/types.js +0 -0
- package/dist/components/Button/utils/ButtonActivityIndicator.d.ts +3 -0
- package/dist/components/Button/utils/ButtonActivityIndicator.js +17 -0
- package/dist/components/Button/utils/ButtonContainer.d.ts +7 -0
- package/dist/components/Button/utils/ButtonContainer.js +10 -0
- package/dist/components/Button/utils/ButtonIcon.d.ts +4 -0
- package/dist/components/Button/utils/ButtonIcon.js +11 -0
- package/dist/components/Button/utils/ButtonLabel.d.ts +4 -0
- package/dist/components/Button/utils/ButtonLabel.js +13 -0
- package/dist/components/Button/utils/ButtonLeftArea.d.ts +4 -0
- package/dist/components/Button/utils/ButtonLeftArea.js +13 -0
- package/dist/components/Button/utils/ButtonRightArea.d.ts +3 -0
- package/dist/components/Button/utils/ButtonRightArea.js +13 -0
- package/dist/components/Button/utils/index.d.ts +4 -0
- package/dist/components/Button/utils/index.js +4 -0
- package/dist/components/Button/utils/useButtonContainerCallbackStyle.d.ts +3 -0
- package/dist/components/Button/utils/useButtonContainerCallbackStyle.js +141 -0
- package/dist/components/Button/utils/useButtonLabelStyle.d.ts +3 -0
- package/dist/components/Button/utils/useButtonLabelStyle.js +40 -0
- package/dist/components/Button/utils/useIconStyle.d.ts +7 -0
- package/dist/components/Button/utils/useIconStyle.js +35 -0
- package/dist/components/Button/utils/useTypeBasedStyle.d.ts +2 -0
- package/dist/components/Button/utils/useTypeBasedStyle.js +4 -0
- package/dist/components/Checkbox/Checkbox.d.ts +31 -0
- package/dist/components/Checkbox/Checkbox.js +55 -0
- package/dist/components/Checkbox/hooks/usePressableStyles.d.ts +15 -0
- package/dist/components/Checkbox/hooks/usePressableStyles.js +91 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Checkbox/index.js +1 -0
- package/dist/components/Chip/Chip.d.ts +30 -0
- package/dist/components/Chip/Chip.js +70 -0
- package/dist/components/Chip/index.d.ts +1 -0
- package/dist/components/Chip/index.js +1 -0
- package/dist/components/Dialog/Dialog.d.ts +14 -0
- package/dist/components/Dialog/Dialog.js +96 -0
- package/dist/components/Dialog/DialogComponent.d.ts +7 -0
- package/dist/components/Dialog/DialogComponent.js +34 -0
- package/dist/components/Dialog/DialogHeader.d.ts +12 -0
- package/dist/components/Dialog/DialogHeader.js +68 -0
- package/dist/components/Dialog/index.d.ts +3 -0
- package/dist/components/Dialog/index.js +3 -0
- package/dist/components/Divider/Divider.d.ts +42 -0
- package/dist/components/Divider/Divider.js +95 -0
- package/dist/components/Divider/index.d.ts +1 -0
- package/dist/components/Divider/index.js +1 -0
- package/dist/components/Input/FloatLabel.d.ts +22 -0
- package/dist/components/Input/FloatLabel.js +19 -0
- package/dist/components/Input/InputGroup.d.ts +21 -0
- package/dist/components/Input/InputGroup.js +52 -0
- package/dist/components/Input/InputGroupAddon.d.ts +17 -0
- package/dist/components/Input/InputGroupAddon.js +57 -0
- package/dist/components/Input/InputSwitch/InputSwitch.d.ts +8 -0
- package/dist/components/Input/InputSwitch/InputSwitch.js +16 -0
- package/dist/components/Input/InputSwitch/index.d.ts +1 -0
- package/dist/components/Input/InputSwitch/index.js +1 -0
- package/dist/components/Input/InputSwitch/styles/index.d.ts +2 -0
- package/dist/components/Input/InputSwitch/styles/index.js +2 -0
- package/dist/components/Input/InputSwitch/styles/useHandleStyles.d.ts +13 -0
- package/dist/components/Input/InputSwitch/styles/useHandleStyles.js +47 -0
- package/dist/components/Input/InputSwitch/styles/useSliderStyles.d.ts +17 -0
- package/dist/components/Input/InputSwitch/styles/useSliderStyles.js +95 -0
- package/dist/components/Input/InputText.d.ts +13 -0
- package/dist/components/Input/InputText.js +14 -0
- package/dist/components/Input/InputTextBase/InputTextBase.d.ts +13 -0
- package/dist/components/Input/InputTextBase/InputTextBase.js +124 -0
- package/dist/components/Input/InputTextBase/testIds.d.ts +11 -0
- package/dist/components/Input/InputTextBase/testIds.js +11 -0
- package/dist/components/Input/InputTextBase/types.d.ts +41 -0
- package/dist/components/Input/InputTextBase/types.js +0 -0
- package/dist/components/Input/InputTextBase/useStyles.d.ts +86 -0
- package/dist/components/Input/InputTextBase/useStyles.js +78 -0
- package/dist/components/Input/index.d.ts +5 -0
- package/dist/components/Input/index.js +4 -0
- package/dist/components/List/Base/ListBase.d.ts +32 -0
- package/dist/components/List/Base/ListBase.js +88 -0
- package/dist/components/List/Base/index.d.ts +1 -0
- package/dist/components/List/Base/index.js +1 -0
- package/dist/components/MenuItem/MenuItemAccessory.d.ts +11 -0
- package/dist/components/MenuItem/MenuItemAccessory.js +23 -0
- package/dist/components/MenuItem/MenuItemIcon.d.ts +36 -0
- package/dist/components/MenuItem/MenuItemIcon.js +33 -0
- package/dist/components/MenuItem/Template/MenuItemTemplate.d.ts +42 -0
- package/dist/components/MenuItem/Template/MenuItemTemplate.js +79 -0
- package/dist/components/MenuItem/index.d.ts +1 -0
- package/dist/components/MenuItem/index.js +1 -0
- package/dist/components/Message/Message.d.ts +65 -0
- package/dist/components/Message/Message.js +126 -0
- package/dist/components/Message/index.d.ts +1 -0
- package/dist/components/Message/index.js +1 -0
- package/dist/components/ProgressBar/ProgressBar.d.ts +33 -0
- package/dist/components/ProgressBar/ProgressBar.js +62 -0
- package/dist/components/ProgressBar/index.d.ts +1 -0
- package/dist/components/ProgressBar/index.js +1 -0
- package/dist/components/ProgressSpinner/ProgressSpinner.d.ts +17 -0
- package/dist/components/ProgressSpinner/ProgressSpinner.js +68 -0
- package/dist/components/ProgressSpinner/index.d.ts +1 -0
- package/dist/components/ProgressSpinner/index.js +1 -0
- package/dist/components/RadioButton/RadioButton.d.ts +18 -0
- package/dist/components/RadioButton/RadioButton.js +134 -0
- package/dist/components/RadioButton/index.d.ts +1 -0
- package/dist/components/RadioButton/index.js +1 -0
- package/dist/components/Rating/Rating.d.ts +48 -0
- package/dist/components/Rating/Rating.js +37 -0
- package/dist/components/Rating/RatingClear.d.ts +14 -0
- package/dist/components/Rating/RatingClear.js +28 -0
- package/dist/components/Rating/RatingItem.d.ts +19 -0
- package/dist/components/Rating/RatingItem.js +44 -0
- package/dist/components/Rating/RatingItemContainer.d.ts +37 -0
- package/dist/components/Rating/RatingItemContainer.js +30 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/Rating/index.js +1 -0
- package/dist/components/SelectButton/SelectButton.d.ts +32 -0
- package/dist/components/SelectButton/SelectButton.js +75 -0
- package/dist/components/SelectButton/SelectButtonItem.d.ts +35 -0
- package/dist/components/SelectButton/SelectButtonItem.js +133 -0
- package/dist/components/SelectButton/index.d.ts +1 -0
- package/dist/components/SelectButton/index.js +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +15 -0
- package/dist/components/Skeleton/Skeleton.js +53 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Slider/Slider.d.ts +36 -0
- package/dist/components/Slider/Slider.js +153 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +1 -0
- package/dist/components/Tabs/TabItem/TabItem.d.ts +24 -0
- package/dist/components/Tabs/TabItem/TabItem.js +82 -0
- package/dist/components/Tabs/TabItem/index.d.ts +1 -0
- package/dist/components/Tabs/TabItem/index.js +1 -0
- package/dist/components/Tabs/TabPanel/TabPanel.d.ts +9 -0
- package/dist/components/Tabs/TabPanel/TabPanel.js +11 -0
- package/dist/components/Tabs/TabPanel/index.d.ts +1 -0
- package/dist/components/Tabs/TabPanel/index.js +1 -0
- package/dist/components/Tabs/Tabs.d.ts +15 -0
- package/dist/components/Tabs/Tabs.js +48 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +2 -0
- package/dist/components/Tag/Tag.d.ts +33 -0
- package/dist/components/Tag/Tag.js +71 -0
- package/dist/components/Tag/index.d.ts +1 -0
- package/dist/components/Tag/index.js +1 -0
- package/dist/components/Timer/Timer.d.ts +18 -0
- package/dist/components/Timer/Timer.js +74 -0
- package/dist/components/Timer/TimerFlip.d.ts +7 -0
- package/dist/components/Timer/TimerFlip.js +69 -0
- package/dist/components/Timer/constants.d.ts +1 -0
- package/dist/components/Timer/constants.js +1 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +45 -0
- package/dist/components/ToggleButton/ToggleButton.js +85 -0
- package/dist/components/ToggleButton/hooks/useIconSize.d.ts +14 -0
- package/dist/components/ToggleButton/hooks/useIconSize.js +26 -0
- package/dist/components/ToggleButton/hooks/useLabelSize.d.ts +8 -0
- package/dist/components/ToggleButton/hooks/useLabelSize.js +19 -0
- package/dist/components/ToggleButton/hooks/useStateStyles.d.ts +11 -0
- package/dist/components/ToggleButton/hooks/useStateStyles.js +92 -0
- package/dist/components/ToggleButton/index.d.ts +1 -0
- package/dist/components/ToggleButton/index.js +1 -0
- package/dist/components/Typography/Anchor.d.ts +31 -0
- package/dist/components/Typography/Anchor.js +75 -0
- package/dist/components/Typography/Body.d.ts +9 -0
- package/dist/components/Typography/Body.js +32 -0
- package/dist/components/Typography/Caption.d.ts +9 -0
- package/dist/components/Typography/Caption.js +38 -0
- package/dist/components/Typography/Service.d.ts +25 -0
- package/dist/components/Typography/Service.js +63 -0
- package/dist/components/Typography/Subtitle.d.ts +18 -0
- package/dist/components/Typography/Subtitle.js +23 -0
- package/dist/components/Typography/Title.d.ts +5 -0
- package/dist/components/Typography/Title.js +24 -0
- package/dist/components/Typography/index.d.ts +6 -0
- package/dist/components/Typography/index.js +6 -0
- package/dist/components/index.d.ts +23 -0
- package/dist/components/index.js +23 -0
- package/dist/hooks/useChangeTheme.d.ts +1 -0
- package/dist/hooks/useChangeTheme.js +5 -0
- package/dist/hooks/useFonts.d.ts +1 -0
- package/dist/hooks/useFonts.js +5 -0
- package/dist/hooks/useLoadingRotationAnimation.d.ts +5 -0
- package/dist/hooks/useLoadingRotationAnimation.js +19 -0
- package/dist/hooks/useMakeTestId.d.ts +3 -0
- package/dist/hooks/useMakeTestId.js +7 -0
- package/dist/hooks/useTheme.d.ts +1 -0
- package/dist/hooks/useTheme.js +5 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/theme/ThemeContext.d.ts +15 -0
- package/dist/theme/ThemeContext.js +20 -0
- package/dist/theme/assets/background.json +149 -0
- package/dist/theme/assets/border.json +103 -0
- package/dist/theme/assets/customCommon.d.ts +4 -0
- package/dist/theme/assets/customCommon.js +4 -0
- package/dist/theme/assets/customDark.d.ts +5 -0
- package/dist/theme/assets/customDark.js +15 -0
- package/dist/theme/assets/customLight.d.ts +15 -0
- package/dist/theme/assets/customLight.js +15 -0
- package/dist/theme/assets/effects.json +15 -0
- package/dist/theme/assets/global.json +114 -0
- package/dist/theme/assets/primaryColors.json +14 -0
- package/dist/theme/assets/shadow.d.ts +6 -0
- package/dist/theme/assets/shadow.js +6 -0
- package/dist/theme/assets/sizing.json +78 -0
- package/dist/theme/assets/spacing.json +48 -0
- package/dist/theme/assets/themeDark.json +1141 -0
- package/dist/theme/assets/themeLight.json +1141 -0
- package/dist/theme/assets/typography.json +45 -0
- package/dist/theme/commonTheme.d.ts +582 -0
- package/dist/theme/commonTheme.js +22 -0
- package/dist/theme/darkTheme.d.ts +2 -0
- package/dist/theme/darkTheme.js +7 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +4 -0
- package/dist/theme/lightTheme.d.ts +2 -0
- package/dist/theme/lightTheme.js +7 -0
- package/dist/theme/types.d.ts +40 -0
- package/dist/theme/types.js +5 -0
- package/dist/utils/SvgUniversal.d.ts +29 -0
- package/dist/utils/SvgUniversal.js +28 -0
- package/dist/utils/genericMemo.d.ts +1 -0
- package/dist/utils/genericMemo.js +2 -0
- package/dist/utils/makeStyles.d.ts +11 -0
- package/dist/utils/makeStyles.js +19 -0
- package/package.json +159 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type background from './assets/background.json';
|
|
2
|
+
import type border from './assets/border.json';
|
|
3
|
+
import type { customCommon } from './assets/customCommon';
|
|
4
|
+
import type { customLight } from './assets/customLight';
|
|
5
|
+
import type effects from './assets/effects.json';
|
|
6
|
+
import type global from './assets/global.json';
|
|
7
|
+
import type primaryColors from './assets/primaryColors.json';
|
|
8
|
+
import type { shadow } from './assets/shadow';
|
|
9
|
+
import type sizing from './assets/sizing.json';
|
|
10
|
+
import type spacing from './assets/spacing.json';
|
|
11
|
+
import type lightTheme from './assets/themeLight.json';
|
|
12
|
+
import type typography from './assets/typography.json';
|
|
13
|
+
export interface ThemeType {
|
|
14
|
+
background: typeof background;
|
|
15
|
+
colors: {
|
|
16
|
+
primary: typeof primaryColors;
|
|
17
|
+
};
|
|
18
|
+
border: typeof border;
|
|
19
|
+
effects: typeof effects;
|
|
20
|
+
global: typeof global;
|
|
21
|
+
sizing: typeof sizing;
|
|
22
|
+
spacing: typeof spacing;
|
|
23
|
+
theme: typeof lightTheme & {
|
|
24
|
+
custom: typeof customLight;
|
|
25
|
+
};
|
|
26
|
+
typography: typeof typography;
|
|
27
|
+
custom: typeof customCommon;
|
|
28
|
+
shadow: typeof shadow;
|
|
29
|
+
}
|
|
30
|
+
export declare enum ThemeVariant {
|
|
31
|
+
Light = "Light",
|
|
32
|
+
Dark = "Dark"
|
|
33
|
+
}
|
|
34
|
+
export interface FontsConfig {
|
|
35
|
+
primary: string;
|
|
36
|
+
secondary: string;
|
|
37
|
+
}
|
|
38
|
+
export interface FontsConfigType {
|
|
39
|
+
fonts: FontsConfig;
|
|
40
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import { type SvgProps } from 'react-native-svg';
|
|
3
|
+
export type SvgSource = {
|
|
4
|
+
uri: string;
|
|
5
|
+
} | {
|
|
6
|
+
xml: string;
|
|
7
|
+
} | ComponentType<SvgProps>;
|
|
8
|
+
interface SvgUniversalProps extends SvgProps {
|
|
9
|
+
/** Источник SVG */
|
|
10
|
+
source: SvgSource;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Компонент для рендера SVG из разных источников
|
|
14
|
+
* Поддерживает:
|
|
15
|
+
* - uri
|
|
16
|
+
* - xml
|
|
17
|
+
* - ComponentType<SvgProps>
|
|
18
|
+
* @example
|
|
19
|
+
* <SvgUniversal source={{ uri: 'https://example.com/icon.svg' }} />
|
|
20
|
+
* <SvgUniversal source={{ xml: '<svg><path d="M1 1h1v1H1z" /></svg>' }} />
|
|
21
|
+
* <SvgUniversal source={IconUser} />
|
|
22
|
+
*/
|
|
23
|
+
export declare const SvgUniversal: import("react").NamedExoticComponent<SvgUniversalProps>;
|
|
24
|
+
export declare const SvgUniversalTestId: {
|
|
25
|
+
component: string;
|
|
26
|
+
uri: string;
|
|
27
|
+
xml: string;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { memo } from 'react';
|
|
2
|
+
import { SvgUri, SvgXml } from 'react-native-svg';
|
|
3
|
+
/**
|
|
4
|
+
* Компонент для рендера SVG из разных источников
|
|
5
|
+
* Поддерживает:
|
|
6
|
+
* - uri
|
|
7
|
+
* - xml
|
|
8
|
+
* - ComponentType<SvgProps>
|
|
9
|
+
* @example
|
|
10
|
+
* <SvgUniversal source={{ uri: 'https://example.com/icon.svg' }} />
|
|
11
|
+
* <SvgUniversal source={{ xml: '<svg><path d="M1 1h1v1H1z" /></svg>' }} />
|
|
12
|
+
* <SvgUniversal source={IconUser} />
|
|
13
|
+
*/
|
|
14
|
+
export const SvgUniversal = memo(({ source, ...rest }) => {
|
|
15
|
+
if ('uri' in source) {
|
|
16
|
+
return <SvgUri testID={SvgUniversalTestId.uri} uri={source.uri} {...rest}/>;
|
|
17
|
+
}
|
|
18
|
+
if ('xml' in source) {
|
|
19
|
+
return <SvgXml testID={SvgUniversalTestId.xml} xml={source.xml} {...rest}/>;
|
|
20
|
+
}
|
|
21
|
+
const Component = source;
|
|
22
|
+
return <Component testID={SvgUniversalTestId.component} {...rest}/>;
|
|
23
|
+
});
|
|
24
|
+
export const SvgUniversalTestId = {
|
|
25
|
+
component: 'SvgUniversalComponent',
|
|
26
|
+
uri: 'SvgUniversalUri',
|
|
27
|
+
xml: 'SvgUniversalXml',
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const genericMemo: <T>(component: T) => T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
+
import { type FontsConfigType, type ThemeType } from '../theme';
|
|
3
|
+
export declare const makeStyles: <T extends StylesObject>(createStyles: CreateStyles<T>) => (() => T);
|
|
4
|
+
type StylesItem = ViewStyle | ImageStyle | TextStyle;
|
|
5
|
+
type StylesObject = Record<string, StylesItem>;
|
|
6
|
+
type CreateStyles<T extends StylesObject> = (theme: ThemeType & FontsConfigType) => CheckInvalidProps<T> extends never ? T : 'TypeError. Invalid key of style property was used.';
|
|
7
|
+
type ExcludeStylesProps<T> = Exclude<keyof T, keyof (ViewStyle & ImageStyle & TextStyle)>;
|
|
8
|
+
type CheckInvalidProps<T extends object> = {
|
|
9
|
+
[Key in keyof T]: ExcludeStylesProps<T[Key]>;
|
|
10
|
+
}[keyof T];
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { useFonts } from '../hooks/useFonts';
|
|
3
|
+
import { useTheme } from '../hooks/useTheme';
|
|
4
|
+
import { darkTheme, lightTheme, ThemeVariant, } from '../theme';
|
|
5
|
+
export const makeStyles = (createStyles) => () => {
|
|
6
|
+
const fonts = useFonts();
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
const themeValues = useMemo(() => {
|
|
9
|
+
switch (theme) {
|
|
10
|
+
case ThemeVariant.Light:
|
|
11
|
+
return lightTheme;
|
|
12
|
+
case ThemeVariant.Dark:
|
|
13
|
+
return darkTheme;
|
|
14
|
+
default:
|
|
15
|
+
return lightTheme;
|
|
16
|
+
}
|
|
17
|
+
}, [theme]);
|
|
18
|
+
return useMemo(() => createStyles({ ...themeValues, fonts }), [fonts, themeValues]);
|
|
19
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cdek-it/react-native-ui-kit",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "UI kit на основе Prime Faces, Prime Flex для React Native",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://developer.cdek.ru/design-system",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/cdek-it/react-native-ui-kit.git"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"react-native",
|
|
13
|
+
"ios",
|
|
14
|
+
"android",
|
|
15
|
+
"ui-kit",
|
|
16
|
+
"uikit"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
28
|
+
"test": "jest",
|
|
29
|
+
"start": "expo start --dev-client",
|
|
30
|
+
"android": "expo run:android",
|
|
31
|
+
"ios": "expo run:ios --no-install",
|
|
32
|
+
"storybook-generate": "sb-rn-get-stories --config-path .storybook && sed -i -e 's/export const view = global.view/export const view: ReturnType<typeof start> = global.view/' .storybook/storybook.requires.ts && prettier .storybook --write",
|
|
33
|
+
"doctor": "expo-doctor",
|
|
34
|
+
"check": "expo install --check",
|
|
35
|
+
"lint:check": "eslint .",
|
|
36
|
+
"lint:fix": "eslint --fix .",
|
|
37
|
+
"prettier:check": "prettier . --check",
|
|
38
|
+
"prettier:fix": "prettier . --write",
|
|
39
|
+
"prettier:watch": "onchange . -- prettier --write --ignore-unknown \"{{changed}}\""
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@babel/core": "7.28.3",
|
|
43
|
+
"@babel/plugin-transform-class-static-block": "7.28.3",
|
|
44
|
+
"@babel/preset-env": "7.28.3",
|
|
45
|
+
"@commitlint/cli": "19.8.1",
|
|
46
|
+
"@commitlint/config-conventional": "19.8.1",
|
|
47
|
+
"@eslint/compat": "1.2.8",
|
|
48
|
+
"@expo/metro-runtime": "4.0.1",
|
|
49
|
+
"@gorhom/bottom-sheet": "5.0.6",
|
|
50
|
+
"@gorhom/portal": "1.0.14",
|
|
51
|
+
"@react-native-async-storage/async-storage": "2.1.2",
|
|
52
|
+
"@react-native-community/datetimepicker": "8.4.1",
|
|
53
|
+
"@react-native-community/slider": "4.5.6",
|
|
54
|
+
"@storybook/addon-actions": "8.3.5",
|
|
55
|
+
"@storybook/addon-controls": "8.3.5",
|
|
56
|
+
"@storybook/addon-ondevice-actions": "8.3.5",
|
|
57
|
+
"@storybook/addon-ondevice-controls": "8.3.5",
|
|
58
|
+
"@storybook/addon-ondevice-notes": "8.3.5",
|
|
59
|
+
"@storybook/core": "8.3.5",
|
|
60
|
+
"@storybook/preview-api": "8.3.5",
|
|
61
|
+
"@storybook/react": "8.3.5",
|
|
62
|
+
"@storybook/react-native": "8.3.5",
|
|
63
|
+
"@storybook/test": "8.3.5",
|
|
64
|
+
"@stylistic/eslint-plugin": "5.5.0",
|
|
65
|
+
"@tabler/icons-react-native": "3.31.0",
|
|
66
|
+
"@testing-library/react-native": "13.3.1",
|
|
67
|
+
"@types/jest": "29.5.14",
|
|
68
|
+
"@types/lodash.map": "^4",
|
|
69
|
+
"@types/react": "19.0.10",
|
|
70
|
+
"babel-loader": "8.2.3",
|
|
71
|
+
"chalk": "4.1.2",
|
|
72
|
+
"commitizen": "4.3.1",
|
|
73
|
+
"cross-env": "7.0.3",
|
|
74
|
+
"eslint": "9.39.1",
|
|
75
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
76
|
+
"eslint-plugin-import-x": "4.16.1",
|
|
77
|
+
"eslint-plugin-jest": "29.1.0",
|
|
78
|
+
"eslint-plugin-jest-extended": "3.0.1",
|
|
79
|
+
"eslint-plugin-prettier": "5.5.4",
|
|
80
|
+
"eslint-plugin-promise": "7.2.1",
|
|
81
|
+
"eslint-plugin-react": "7.37.5",
|
|
82
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
83
|
+
"eslint-plugin-react-native": "5.0.0",
|
|
84
|
+
"eslint-plugin-testing-library": "7.13.4",
|
|
85
|
+
"expo": "53.0.24",
|
|
86
|
+
"expo-application": "6.1.5",
|
|
87
|
+
"expo-constants": "17.1.7",
|
|
88
|
+
"expo-doctor": "1.17.0",
|
|
89
|
+
"expo-status-bar": "2.2.3",
|
|
90
|
+
"inquirer-search-list": "1.2.6",
|
|
91
|
+
"jest": "29.7.0",
|
|
92
|
+
"jest-expo": "53.0.10",
|
|
93
|
+
"jest-extended": "6.0.0",
|
|
94
|
+
"jest-junit": "16.0.0",
|
|
95
|
+
"jiti": "2.5.1",
|
|
96
|
+
"lefthook": "2.0.4",
|
|
97
|
+
"lodash.map": "4.6.0",
|
|
98
|
+
"longest": "2.0.1",
|
|
99
|
+
"npm-check-updates": "18.0.2",
|
|
100
|
+
"onchange": "7.1.0",
|
|
101
|
+
"prettier": "3.6.2",
|
|
102
|
+
"react": "19.0.0",
|
|
103
|
+
"react-native": "0.79.6",
|
|
104
|
+
"react-native-advanced-input-mask": "1.4.4",
|
|
105
|
+
"react-native-gesture-handler": "2.28.0",
|
|
106
|
+
"react-native-reanimated": "3.19.1",
|
|
107
|
+
"react-native-safe-area-context": "5.6.1",
|
|
108
|
+
"react-native-svg": "15.12.1",
|
|
109
|
+
"standard-version": "9.5.0",
|
|
110
|
+
"storybook": "8.3.5",
|
|
111
|
+
"ts-node": "10.9.2",
|
|
112
|
+
"typescript": "5.8.3",
|
|
113
|
+
"typescript-eslint": "8.39.0",
|
|
114
|
+
"word-wrap": "1.2.5"
|
|
115
|
+
},
|
|
116
|
+
"peerDependencies": {
|
|
117
|
+
"@gorhom/portal": "1.0.14",
|
|
118
|
+
"@tabler/icons-react-native": ">=3.x",
|
|
119
|
+
"expo": ">=53.x.x",
|
|
120
|
+
"react": ">=18.x",
|
|
121
|
+
"react-native": ">=0.77.x",
|
|
122
|
+
"react-native-reanimated": ">=3.15.x",
|
|
123
|
+
"react-native-svg": ">=15.11.x"
|
|
124
|
+
},
|
|
125
|
+
"peerDependenciesMeta": {
|
|
126
|
+
"expo": {
|
|
127
|
+
"optional": true
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"packageManager": "yarn@4.6.0",
|
|
131
|
+
"engines": {
|
|
132
|
+
"node": "20"
|
|
133
|
+
},
|
|
134
|
+
"config": {
|
|
135
|
+
"commitizen": {
|
|
136
|
+
"path": "./configs/cz-conventional-mobile"
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"expo": {
|
|
140
|
+
"autolinking": {
|
|
141
|
+
"ios": {
|
|
142
|
+
"searchPaths": [
|
|
143
|
+
"./node_modules"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"doctor": {
|
|
148
|
+
"appConfigFieldsNotSyncedCheck": {
|
|
149
|
+
"enabled": false
|
|
150
|
+
},
|
|
151
|
+
"reactNativeDirectoryCheck": {
|
|
152
|
+
"exclude": [
|
|
153
|
+
"@tabler/icons-react-native"
|
|
154
|
+
],
|
|
155
|
+
"listUnknownPackages": false
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|