@rn-components-dropdown/dropdown 1.0.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.
Files changed (86) hide show
  1. package/dist/components/dropdown/Dropdown.d.ts +4 -0
  2. package/dist/components/dropdown/Dropdown.js +313 -0
  3. package/dist/components/dropdown/DropdownStyle.d.ts +151 -0
  4. package/dist/components/dropdown/DropdownStyle.js +148 -0
  5. package/dist/components/dropdown/components/chip/Chip.d.ts +3 -0
  6. package/dist/components/dropdown/components/chip/Chip.js +22 -0
  7. package/dist/components/dropdown/components/chip/ChipStyle.d.ts +84 -0
  8. package/dist/components/dropdown/components/chip/ChipStyle.js +63 -0
  9. package/dist/components/dropdown/components/input/TextInput.d.ts +3 -0
  10. package/dist/components/dropdown/components/input/TextInput.js +60 -0
  11. package/dist/components/dropdown/components/input/TextInputStyle.d.ts +32 -0
  12. package/dist/components/dropdown/components/input/TextInputStyle.js +33 -0
  13. package/dist/components/dropdown/hooks/useDetectDevice.d.ts +3 -0
  14. package/dist/components/dropdown/hooks/useDetectDevice.js +22 -0
  15. package/dist/components/dropdown/hooks/useDropdown.d.ts +26 -0
  16. package/dist/components/dropdown/hooks/useDropdown.js +263 -0
  17. package/dist/components/dropdown/hooks/useOrientation.d.ts +1 -0
  18. package/dist/components/dropdown/hooks/useOrientation.js +30 -0
  19. package/dist/components/dropdown/interface/ChipInterface.d.ts +8 -0
  20. package/dist/components/dropdown/interface/ChipInterface.js +2 -0
  21. package/dist/components/dropdown/interface/DropdownInterface.d.ts +71 -0
  22. package/dist/components/dropdown/interface/DropdownInterface.js +2 -0
  23. package/dist/components/dropdown/interface/InputProps.d.ts +8 -0
  24. package/dist/components/dropdown/interface/InputProps.js +2 -0
  25. package/dist/components/svgButton/SvgButton.d.ts +11 -0
  26. package/dist/components/svgButton/SvgButton.js +16 -0
  27. package/dist/components/svgButton/SvgButtonStyle.d.ts +28 -0
  28. package/dist/components/svgButton/SvgButtonStyle.js +29 -0
  29. package/dist/components/text/AppText.d.ts +12 -0
  30. package/dist/components/text/AppText.js +24 -0
  31. package/dist/components/text/AppTextStyle.d.ts +171 -0
  32. package/dist/components/text/AppTextStyle.js +27 -0
  33. package/dist/components/textInput/AppTextInput.d.ts +20 -0
  34. package/dist/components/textInput/AppTextInput.js +89 -0
  35. package/dist/components/textInput/AppTextInputStyle.d.ts +79 -0
  36. package/dist/components/textInput/AppTextInputStyle.js +61 -0
  37. package/dist/controller/dropDownController/DropdownController.d.ts +10 -0
  38. package/dist/controller/dropDownController/DropdownController.js +25 -0
  39. package/dist/controller/dropDownController/DropdownControllerStyle.d.ts +50 -0
  40. package/dist/controller/dropDownController/DropdownControllerStyle.js +48 -0
  41. package/dist/controller/textInputController/AppTextInputController.d.ts +13 -0
  42. package/dist/controller/textInputController/AppTextInputController.js +14 -0
  43. package/dist/controller/textInputController/InputControllerStyle.d.ts +31 -0
  44. package/dist/controller/textInputController/InputControllerStyle.js +29 -0
  45. package/dist/index.d.ts +5 -0
  46. package/dist/index.js +16 -0
  47. package/dist/interface/colors.interface.d.ts +20 -0
  48. package/dist/interface/colors.interface.js +2 -0
  49. package/dist/style/colors.d.ts +33 -0
  50. package/dist/style/colors.js +44 -0
  51. package/dist/style/index.d.ts +7 -0
  52. package/dist/style/index.js +29 -0
  53. package/dist/style/shadow.d.ts +161 -0
  54. package/dist/style/shadow.js +158 -0
  55. package/dist/style/spacing.d.ts +23 -0
  56. package/dist/style/spacing.js +26 -0
  57. package/package.json +33 -0
  58. package/src/components/dropdown/Dropdown.tsx +512 -0
  59. package/src/components/dropdown/DropdownStyle.ts +154 -0
  60. package/src/components/dropdown/components/chip/Chip.tsx +31 -0
  61. package/src/components/dropdown/components/chip/ChipStyle.ts +64 -0
  62. package/src/components/dropdown/components/input/TextInput.tsx +46 -0
  63. package/src/components/dropdown/components/input/TextInputStyle.ts +32 -0
  64. package/src/components/dropdown/hooks/useDetectDevice.ts +25 -0
  65. package/src/components/dropdown/hooks/useDropdown.ts +356 -0
  66. package/src/components/dropdown/hooks/useOrientation.ts +36 -0
  67. package/src/components/dropdown/interface/ChipInterface.ts +9 -0
  68. package/src/components/dropdown/interface/DropdownInterface.ts +90 -0
  69. package/src/components/dropdown/interface/InputProps.ts +9 -0
  70. package/src/components/svgButton/SvgButton.tsx +37 -0
  71. package/src/components/svgButton/SvgButtonStyle.ts +27 -0
  72. package/src/components/text/AppText.tsx +41 -0
  73. package/src/components/text/AppTextStyle.ts +40 -0
  74. package/src/components/textInput/AppTextInput.tsx +148 -0
  75. package/src/components/textInput/AppTextInputStyle.ts +72 -0
  76. package/src/controller/dropDownController/DropdownController.tsx +81 -0
  77. package/src/controller/dropDownController/DropdownControllerStyle.ts +47 -0
  78. package/src/controller/textInputController/AppTextInputController.tsx +50 -0
  79. package/src/controller/textInputController/InputControllerStyle.ts +28 -0
  80. package/src/index.ts +5 -0
  81. package/src/interface/colors.interface.ts +22 -0
  82. package/src/style/colors.ts +46 -0
  83. package/src/style/index.ts +14 -0
  84. package/src/style/shadow.ts +155 -0
  85. package/src/style/spacing.ts +23 -0
  86. package/tsconfig.json +13 -0
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useAppTextInputStyle = void 0;
4
+ const react_1 = require("react");
5
+ const react_native_1 = require("react-native");
6
+ const style_1 = require("../../style");
7
+ const useAppTextInputStyle = ({ type, leftIcon, editable = true, }) => {
8
+ const { ...colors } = style_1.LIGHT_COLORS;
9
+ const styles = (0, react_1.useMemo)(() => {
10
+ return react_native_1.StyleSheet.create({
11
+ container: {
12
+ width: '100%',
13
+ ...style_1.SHADOW.shadow1,
14
+ flexDirection: 'row',
15
+ alignItems: 'center',
16
+ opacity: !editable ? 0.5 : 1,
17
+ backgroundColor: style_1.DEFAULT_COLORS.white,
18
+ },
19
+ margin: {
20
+ marginBottom: style_1.SPACING.s10,
21
+ },
22
+ rightIcon: {
23
+ position: 'absolute',
24
+ right: style_1.SPACING.s20,
25
+ },
26
+ error: {
27
+ textAlign: 'left',
28
+ paddingTop: style_1.SPACING.s4,
29
+ alignSelf: 'flex-start',
30
+ color: colors.red,
31
+ },
32
+ label: {
33
+ color: colors.primary,
34
+ marginBottom: style_1.SPACING.s12,
35
+ alignSelf: 'flex-start',
36
+ marginTop: style_1.SPACING.s10,
37
+ },
38
+ required: {
39
+ color: colors.red,
40
+ },
41
+ errorWrapper: {
42
+ borderWidth: 0.8,
43
+ borderColor: colors.red,
44
+ },
45
+ textInputStyles: {
46
+ padding: 0,
47
+ height: 48,
48
+ width: '100%',
49
+ color: colors.primary,
50
+ paddingLeft: leftIcon ? style_1.SPACING.s45 : 16,
51
+ paddingRight: type === 'password' ? 50 : 16,
52
+ },
53
+ leftIcon: {
54
+ position: 'absolute',
55
+ left: style_1.SPACING.s14,
56
+ },
57
+ });
58
+ }, [editable, colors, leftIcon, type]);
59
+ return { styles, colors };
60
+ };
61
+ exports.useAppTextInputStyle = useAppTextInputStyle;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { DropdownProps, SelectionType } from '../../components/dropdown/interface/DropdownInterface';
3
+ import { Control, FieldValues, Path } from 'react-hook-form';
4
+ type DropControllerProps<S, T extends SelectionType, U extends FieldValues> = {
5
+ control: Control<U>;
6
+ controller: Path<U>;
7
+ dropProps: DropdownProps<S, T>;
8
+ };
9
+ declare const AppDropdownController: <S, T extends SelectionType, U extends FieldValues>(props: DropControllerProps<S, T, U>) => React.JSX.Element;
10
+ export default AppDropdownController;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const react_native_1 = require("react-native");
8
+ const AppText_1 = __importDefault(require("../../components/text/AppText"));
9
+ const Dropdown_1 = __importDefault(require("../../components/dropdown/Dropdown"));
10
+ const DropdownControllerStyle_1 = require("./DropdownControllerStyle");
11
+ const react_hook_form_1 = require("react-hook-form");
12
+ const AppDropdownController = (props) => {
13
+ const { control, controller, dropProps: { data, label, labelField, valueField, placeholder, selectionType, containerStyle, ...rest }, } = props;
14
+ const { styles } = (0, DropdownControllerStyle_1.useDropdownControllerStyle)();
15
+ return (<react_hook_form_1.Controller control={control} name={controller} render={({ fieldState: { error }, field: { onBlur, onChange, value }, }) => (<react_native_1.View style={styles.mainContainer}>
16
+ <Dropdown_1.default data={data} value={value} label={label} onBlur={onBlur} onChange={(selectValue, selectedItem) => {
17
+ if (selectionType === 'single') {
18
+ return onChange(selectValue);
19
+ }
20
+ return onChange(selectedItem);
21
+ }} labelField={labelField} valueField={valueField} placeholder={placeholder} selectionType={selectionType} containerStyle={containerStyle} labelTextStyle={styles.labelText} itemTextStyle={styles.dropdownText} placeholderStyle={styles.itemContainer} selectedTextStyle={styles.selectionText} style={[styles.dropdownContainer, error && styles.errorWrapper]} {...rest}/>
22
+ {error && <AppText_1.default style={styles.error}>{error?.message}</AppText_1.default>}
23
+ </react_native_1.View>)}/>);
24
+ };
25
+ exports.default = AppDropdownController;
@@ -0,0 +1,50 @@
1
+ export declare const useDropdownControllerStyle: () => {
2
+ styles: {
3
+ mainContainer: {
4
+ width: "100%";
5
+ marginBottom: number;
6
+ };
7
+ dropdownContainer: {
8
+ borderWidth: number;
9
+ borderRadius: number;
10
+ marginBottom: number;
11
+ borderColor: string;
12
+ paddingHorizontal: number;
13
+ };
14
+ labelText: {
15
+ color: string;
16
+ };
17
+ errorWrapper: {
18
+ borderWidth: number;
19
+ borderColor: string;
20
+ };
21
+ dropdownText: {
22
+ fontSize: number;
23
+ color: string;
24
+ };
25
+ itemContainer: {
26
+ fontSize: number;
27
+ color: string;
28
+ };
29
+ selectionText: {
30
+ fontSize: number;
31
+ color: string;
32
+ };
33
+ error: {
34
+ color: string;
35
+ };
36
+ };
37
+ colors: {
38
+ blue: string;
39
+ gray: string;
40
+ error: string;
41
+ green: string;
42
+ white: string;
43
+ black: string;
44
+ primary: string;
45
+ lightGray: string;
46
+ grayishBlue: string;
47
+ red: string;
48
+ border: string;
49
+ };
50
+ };
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useDropdownControllerStyle = void 0;
4
+ const react_1 = require("react");
5
+ const react_native_1 = require("react-native");
6
+ const style_1 = require("../../style");
7
+ const useDropdownControllerStyle = () => {
8
+ const { ...colors } = style_1.LIGHT_COLORS;
9
+ const styles = (0, react_1.useMemo)(() => {
10
+ return react_native_1.StyleSheet.create({
11
+ mainContainer: {
12
+ width: '100%',
13
+ marginBottom: style_1.SPACING?.s4,
14
+ },
15
+ dropdownContainer: {
16
+ borderWidth: 1,
17
+ borderRadius: 6,
18
+ marginBottom: style_1.SPACING.s10,
19
+ borderColor: colors.border,
20
+ paddingHorizontal: style_1.SPACING.s10,
21
+ },
22
+ labelText: {
23
+ color: colors.gray,
24
+ },
25
+ errorWrapper: {
26
+ borderWidth: 0.8,
27
+ borderColor: colors.red,
28
+ },
29
+ dropdownText: {
30
+ fontSize: 14,
31
+ color: colors.gray,
32
+ },
33
+ itemContainer: {
34
+ fontSize: 14,
35
+ color: colors.gray,
36
+ },
37
+ selectionText: {
38
+ fontSize: 14,
39
+ color: colors.gray,
40
+ },
41
+ error: {
42
+ color: colors.red,
43
+ },
44
+ });
45
+ }, [colors]);
46
+ return { styles, colors };
47
+ };
48
+ exports.useDropdownControllerStyle = useDropdownControllerStyle;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { AppTextProps } from '../../components/textInput/AppTextInput';
3
+ import { StyleProp, TextStyle, ViewStyle } from 'react-native';
4
+ import { Control, FieldValues, Path } from 'react-hook-form';
5
+ interface Props<T extends FieldValues> extends AppTextProps {
6
+ textStyle?: TextStyle;
7
+ controllerName: Path<T>;
8
+ containerStyle?: ViewStyle;
9
+ control: Control<T> | undefined;
10
+ labelStyle?: StyleProp<TextStyle>;
11
+ }
12
+ declare const AppTextControlInput: <T extends FieldValues>({ control, textStyle, labelStyle, controllerName, containerStyle, ...rest }: Props<T>) => React.JSX.Element;
13
+ export default AppTextControlInput;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const react_1 = __importDefault(require("react"));
7
+ const AppTextInput_1 = __importDefault(require("../../components/textInput/AppTextInput"));
8
+ const InputControllerStyle_1 = require("./InputControllerStyle");
9
+ const react_hook_form_1 = require("react-hook-form");
10
+ const AppTextControlInput = ({ control, textStyle, labelStyle, controllerName, containerStyle, ...rest }) => {
11
+ const { styles } = (0, InputControllerStyle_1.useInputController)();
12
+ return (<react_hook_form_1.Controller control={control} name={controllerName} render={({ fieldState: { error }, field: { onChange, value, onBlur }, }) => (<AppTextInput_1.default value={value} onBlur={onBlur} error={error?.message} onChangeText={onChange} textStyle={[styles.inputText, textStyle]} labelStyle={[styles.labelText, labelStyle]} style={[styles.inputControlContainer, containerStyle]} {...rest}/>)}/>);
13
+ };
14
+ exports.default = AppTextControlInput;
@@ -0,0 +1,31 @@
1
+ export declare const useInputController: () => {
2
+ styles: {
3
+ labelText: {
4
+ color: string;
5
+ };
6
+ inputControlContainer: {
7
+ height: number;
8
+ borderWidth: number;
9
+ borderRadius: number;
10
+ alignItems: "center";
11
+ marginVertical: number;
12
+ borderColor: string;
13
+ };
14
+ inputText: {
15
+ color: string;
16
+ };
17
+ };
18
+ colors: {
19
+ blue: string;
20
+ gray: string;
21
+ error: string;
22
+ green: string;
23
+ white: string;
24
+ black: string;
25
+ primary: string;
26
+ lightGray: string;
27
+ grayishBlue: string;
28
+ red: string;
29
+ border: string;
30
+ };
31
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useInputController = void 0;
4
+ const react_1 = require("react");
5
+ const react_native_1 = require("react-native");
6
+ const style_1 = require("../../style");
7
+ const useInputController = () => {
8
+ const { ...colors } = style_1.LIGHT_COLORS;
9
+ const styles = (0, react_1.useMemo)(() => {
10
+ return react_native_1.StyleSheet.create({
11
+ labelText: {
12
+ color: colors.gray,
13
+ },
14
+ inputControlContainer: {
15
+ height: 48,
16
+ borderWidth: 1,
17
+ borderRadius: 6,
18
+ alignItems: 'center',
19
+ marginVertical: style_1.SPACING.s2,
20
+ borderColor: colors.border,
21
+ },
22
+ inputText: {
23
+ color: colors.black,
24
+ },
25
+ });
26
+ }, [colors]);
27
+ return { styles, colors };
28
+ };
29
+ exports.useInputController = useInputController;
@@ -0,0 +1,5 @@
1
+ export { default as AppText } from './components/text/AppText';
2
+ export { default as Dropdown } from './components/dropdown/Dropdown';
3
+ export { default as TextInput } from './components/textInput/AppTextInput';
4
+ export { default as DropdownController } from './controller/dropDownController/DropdownController';
5
+ export { default as TextInputController } from './controller/textInputController/AppTextInputController';
package/dist/index.js ADDED
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TextInputController = exports.DropdownController = exports.TextInput = exports.Dropdown = exports.AppText = void 0;
7
+ var AppText_1 = require("./components/text/AppText");
8
+ Object.defineProperty(exports, "AppText", { enumerable: true, get: function () { return __importDefault(AppText_1).default; } });
9
+ var Dropdown_1 = require("./components/dropdown/Dropdown");
10
+ Object.defineProperty(exports, "Dropdown", { enumerable: true, get: function () { return __importDefault(Dropdown_1).default; } });
11
+ var AppTextInput_1 = require("./components/textInput/AppTextInput");
12
+ Object.defineProperty(exports, "TextInput", { enumerable: true, get: function () { return __importDefault(AppTextInput_1).default; } });
13
+ var DropdownController_1 = require("./controller/dropDownController/DropdownController");
14
+ Object.defineProperty(exports, "DropdownController", { enumerable: true, get: function () { return __importDefault(DropdownController_1).default; } });
15
+ var AppTextInputController_1 = require("./controller/textInputController/AppTextInputController");
16
+ Object.defineProperty(exports, "TextInputController", { enumerable: true, get: function () { return __importDefault(AppTextInputController_1).default; } });
@@ -0,0 +1,20 @@
1
+ export type ThemeColors = {
2
+ red: string;
3
+ blue: string;
4
+ gray: string;
5
+ white: string;
6
+ error: string;
7
+ black: string;
8
+ green: string;
9
+ border: string;
10
+ primary: string;
11
+ lightGray: string;
12
+ grayishBlue: string;
13
+ };
14
+ export type Theme = {
15
+ mode: string;
16
+ colors: ThemeColors;
17
+ };
18
+ export interface ThemeInterface {
19
+ [index: string]: Theme;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ import { ThemeInterface } from "../interface/colors.interface";
2
+ export declare const LIGHT_COLORS: {
3
+ blue: string;
4
+ gray: string;
5
+ error: string;
6
+ green: string;
7
+ white: string;
8
+ black: string;
9
+ primary: string;
10
+ lightGray: string;
11
+ grayishBlue: string;
12
+ red: string;
13
+ border: string;
14
+ };
15
+ export declare const DARK_COLORS: {
16
+ blue: string;
17
+ gray: string;
18
+ error: string;
19
+ green: string;
20
+ white: string;
21
+ black: string;
22
+ primary: string;
23
+ lightGray: string;
24
+ grayishBlue: string;
25
+ red: string;
26
+ border: string;
27
+ };
28
+ export declare const THEMES: ThemeInterface;
29
+ export declare const DEFAULT_COLORS: {
30
+ blue: string;
31
+ white: string;
32
+ blackOpacity: string;
33
+ };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_COLORS = exports.THEMES = exports.DARK_COLORS = exports.LIGHT_COLORS = void 0;
4
+ exports.LIGHT_COLORS = {
5
+ blue: '#0000ff',
6
+ gray: '#5c5b5b',
7
+ error: '#dc3545',
8
+ green: '#2EB85C',
9
+ white: '#FFFFFF',
10
+ black: '#000000',
11
+ primary: '#3683BC',
12
+ lightGray: '#e0e0e0',
13
+ grayishBlue: '#C5C6C7',
14
+ red: 'rgba(205, 46, 49, 1)',
15
+ border: 'rgba(224, 224, 224, 1)',
16
+ };
17
+ exports.DARK_COLORS = {
18
+ blue: '#0000ff',
19
+ gray: '#5c5b5b',
20
+ error: '#dc3545',
21
+ green: '#2EB85C',
22
+ white: '#FFFFFF',
23
+ black: '#000000',
24
+ primary: '#3683BC',
25
+ lightGray: '#e0e0e0',
26
+ grayishBlue: '#C5C6C7',
27
+ red: 'rgba(205, 46, 49, 1)',
28
+ border: 'rgba(224, 224, 224, 1)',
29
+ };
30
+ exports.THEMES = {
31
+ light: {
32
+ mode: 'light',
33
+ colors: exports.LIGHT_COLORS,
34
+ },
35
+ dark: {
36
+ mode: 'dark',
37
+ colors: exports.DARK_COLORS,
38
+ },
39
+ };
40
+ exports.DEFAULT_COLORS = {
41
+ blue: '#3683BC',
42
+ white: '#FFFFFF',
43
+ blackOpacity: 'rgba(0, 0, 0, 0.5)',
44
+ };
@@ -0,0 +1,7 @@
1
+ export * from './colors';
2
+ export * from './spacing';
3
+ export * from './shadow';
4
+ export declare const addAlphaToHex: (color: string, opacity: number) => string;
5
+ export declare const SCREEN_WIDTH: number;
6
+ export declare const SCREEN_HEIGHT: number;
7
+ export declare const MIN_DEVICE_WIDTH: number;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.MIN_DEVICE_WIDTH = exports.SCREEN_HEIGHT = exports.SCREEN_WIDTH = exports.addAlphaToHex = void 0;
18
+ __exportStar(require("./colors"), exports);
19
+ __exportStar(require("./spacing"), exports);
20
+ __exportStar(require("./shadow"), exports);
21
+ const react_native_1 = require("react-native");
22
+ const addAlphaToHex = (color, opacity) => {
23
+ const _opacity = Math.round(Math.min(Math.max(opacity || 1, 0), 1) * 255);
24
+ return color + _opacity.toString(16).toUpperCase();
25
+ };
26
+ exports.addAlphaToHex = addAlphaToHex;
27
+ exports.SCREEN_WIDTH = react_native_1.Dimensions.get('window').width;
28
+ exports.SCREEN_HEIGHT = react_native_1.Dimensions.get('window').height;
29
+ exports.MIN_DEVICE_WIDTH = react_native_1.Platform.OS === 'ios' ? 390 : 360;
@@ -0,0 +1,161 @@
1
+ export declare const SHADOW: {
2
+ noShadow: {
3
+ shadowColor: string;
4
+ shadowOffset: {
5
+ width: number;
6
+ height: number;
7
+ };
8
+ shadowOpacity: number;
9
+ shadowRadius: number;
10
+ elevation: number;
11
+ };
12
+ shadow0: {
13
+ shadowColor: string;
14
+ shadowOffset: {
15
+ width: number;
16
+ height: number;
17
+ };
18
+ shadowOpacity: number;
19
+ shadowRadius: number;
20
+ elevation: number;
21
+ };
22
+ shadow1: {
23
+ shadowColor: string;
24
+ shadowOffset: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ shadowOpacity: number;
29
+ shadowRadius: number;
30
+ elevation: number;
31
+ };
32
+ shadow2: {
33
+ shadowColor: string;
34
+ shadowOffset: {
35
+ width: number;
36
+ height: number;
37
+ };
38
+ shadowOpacity: number;
39
+ shadowRadius: number;
40
+ elevation: number;
41
+ };
42
+ shadow3: {
43
+ shadowColor: string;
44
+ shadowOffset: {
45
+ width: number;
46
+ height: number;
47
+ };
48
+ shadowOpacity: number;
49
+ shadowRadius: number;
50
+ elevation: number;
51
+ };
52
+ shadow4: {
53
+ shadowColor: string;
54
+ shadowOffset: {
55
+ width: number;
56
+ height: number;
57
+ };
58
+ shadowOpacity: number;
59
+ shadowRadius: number;
60
+ elevation: number;
61
+ };
62
+ shadow5: {
63
+ shadowColor: string;
64
+ shadowOffset: {
65
+ width: number;
66
+ height: number;
67
+ };
68
+ shadowOpacity: number;
69
+ shadowRadius: number;
70
+ elevation: number;
71
+ };
72
+ shadow6: {
73
+ shadowColor: string;
74
+ shadowOffset: {
75
+ width: number;
76
+ height: number;
77
+ };
78
+ shadowOpacity: number;
79
+ shadowRadius: number;
80
+ elevation: number;
81
+ };
82
+ shadow7: {
83
+ shadowColor: string;
84
+ shadowOffset: {
85
+ width: number;
86
+ height: number;
87
+ };
88
+ shadowOpacity: number;
89
+ shadowRadius: number;
90
+ elevation: number;
91
+ };
92
+ shadow8: {
93
+ shadowColor: string;
94
+ shadowOffset: {
95
+ width: number;
96
+ height: number;
97
+ };
98
+ shadowOpacity: number;
99
+ shadowRadius: number;
100
+ elevation: number;
101
+ };
102
+ shadow9: {
103
+ shadowColor: string;
104
+ shadowOffset: {
105
+ width: number;
106
+ height: number;
107
+ };
108
+ shadowOpacity: number;
109
+ shadowRadius: number;
110
+ elevation: number;
111
+ };
112
+ shadow10: {
113
+ shadowColor: string;
114
+ shadowOffset: {
115
+ width: number;
116
+ height: number;
117
+ };
118
+ shadowOpacity: number;
119
+ shadowRadius: number;
120
+ elevation: number;
121
+ };
122
+ shadow11: {
123
+ shadowColor: string;
124
+ shadowOffset: {
125
+ width: number;
126
+ height: number;
127
+ };
128
+ shadowOpacity: number;
129
+ shadowRadius: number;
130
+ elevation: number;
131
+ };
132
+ shadow12: {
133
+ shadowColor: string;
134
+ shadowOffset: {
135
+ width: number;
136
+ height: number;
137
+ };
138
+ shadowOpacity: number;
139
+ shadowRadius: number;
140
+ elevation: number;
141
+ };
142
+ containerShadow: {
143
+ shadowOffset: {
144
+ width: number;
145
+ height: number;
146
+ };
147
+ shadowOpacity: number;
148
+ shadowRadius: number;
149
+ elevation: number;
150
+ };
151
+ shadow13: {
152
+ shadowColor: string;
153
+ shadowOffset: {
154
+ width: number;
155
+ height: number;
156
+ };
157
+ shadowOpacity: number;
158
+ shadowRadius: number;
159
+ elevation: number;
160
+ };
161
+ };