@aemforms/af-react-native 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/LICENSE +5 -0
  2. package/README.md +121 -0
  3. package/lib/components/Button.d.ts +22 -0
  4. package/lib/components/Button.js +32 -0
  5. package/lib/components/Checkbox.d.ts +22 -0
  6. package/lib/components/Checkbox.js +65 -0
  7. package/lib/components/CheckboxGroup.d.ts +22 -0
  8. package/lib/components/CheckboxGroup.js +78 -0
  9. package/lib/components/DatePicker.d.ts +22 -0
  10. package/lib/components/DatePicker.js +110 -0
  11. package/lib/components/DropDown.d.ts +22 -0
  12. package/lib/components/DropDown.js +64 -0
  13. package/lib/components/FileUpload.d.ts +22 -0
  14. package/lib/components/FileUpload.js +45 -0
  15. package/lib/components/Form.d.ts +24 -0
  16. package/lib/components/Form.js +56 -0
  17. package/lib/components/NumberField.d.ts +22 -0
  18. package/lib/components/NumberField.js +81 -0
  19. package/lib/components/Panel.d.ts +23 -0
  20. package/lib/components/Panel.js +68 -0
  21. package/lib/components/PlainText.d.ts +22 -0
  22. package/lib/components/PlainText.js +39 -0
  23. package/lib/components/RadioGroup.d.ts +22 -0
  24. package/lib/components/RadioGroup.js +64 -0
  25. package/lib/components/Repeater.d.ts +23 -0
  26. package/lib/components/Repeater.js +61 -0
  27. package/lib/components/TextField.d.ts +22 -0
  28. package/lib/components/TextField.js +84 -0
  29. package/lib/index.d.ts +35 -0
  30. package/lib/index.js +55 -0
  31. package/lib/shared/FileUpload.d.ts +23 -0
  32. package/lib/shared/FileUpload.js +110 -0
  33. package/lib/shared/withRuleEngine.d.ts +22 -0
  34. package/lib/shared/withRuleEngine.js +64 -0
  35. package/lib/utils/common.d.ts +24 -0
  36. package/lib/utils/common.js +112 -0
  37. package/lib/utils/mappings.d.ts +38 -0
  38. package/lib/utils/mappings.js +54 -0
  39. package/lib/utils/theme.d.ts +19657 -0
  40. package/lib/utils/theme.js +109 -0
  41. package/lib/utils/types.d.ts +91 -0
  42. package/lib/utils/types.js +21 -0
  43. package/package.json +76 -0
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ /*************************************************************************
3
+ * ADOBE CONFIDENTIAL
4
+ * ___________________
5
+ *
6
+ * Copyright 2023 Adobe
7
+ * All Rights Reserved.
8
+ *
9
+ * NOTICE: All information contained herein is, and remains
10
+ * the property of Adobe and its suppliers, if any. The intellectual
11
+ * and technical concepts contained herein are proprietary to Adobe
12
+ * and its suppliers and are protected by all applicable intellectual
13
+ * property laws, including trade secret and copyright laws.
14
+ * Dissemination of this information or reproduction of this material
15
+ * is strictly forbidden unless prior written permission is obtained
16
+ * from Adobe.
17
+
18
+ * Adobe permits you to use and modify this file solely in accordance with
19
+ * the terms of the Adobe license agreement accompanying it.
20
+ *************************************************************************/
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ const native_base_1 = require("native-base");
23
+ const primary = (0, native_base_1.extendTheme)({
24
+ colors: {
25
+ primary: {
26
+ 50: '#ecfeff',
27
+ 100: '#cffafe',
28
+ 200: '#a5f3fc',
29
+ 300: '#67e8f9',
30
+ 400: '#22d3ee',
31
+ 500: '#06b6d4',
32
+ 600: '#0891b2',
33
+ 700: '#0e7490',
34
+ 800: '#155e75',
35
+ 900: '#164e63'
36
+ }
37
+ }
38
+ });
39
+ const tertiary = (0, native_base_1.extendTheme)({
40
+ colors: {
41
+ primary: {
42
+ 50: '#ecfdf5',
43
+ 100: '#d1fae5',
44
+ 200: '#a7f3d0',
45
+ 300: '#6ee7b7',
46
+ 400: '#34d399',
47
+ 500: '#10b981',
48
+ 600: '#059669',
49
+ 700: '#047857',
50
+ 800: '#065f46',
51
+ 900: '#064e3b'
52
+ }
53
+ }
54
+ });
55
+ const rose = (0, native_base_1.extendTheme)({
56
+ colors: {
57
+ primary: {
58
+ 50: '#fff1f2',
59
+ 100: '#ffe4e6',
60
+ 200: '#fecdd3',
61
+ 300: '#fda4af',
62
+ 400: '#fb7185',
63
+ 500: '#f43f5e',
64
+ 600: '#e11d48',
65
+ 700: '#be123c',
66
+ 800: '#9f1239',
67
+ 900: '#881337'
68
+ }
69
+ }
70
+ });
71
+ const warning = (0, native_base_1.extendTheme)({
72
+ colors: {
73
+ primary: {
74
+ 50: '#fff7ed',
75
+ 100: '#ffedd5',
76
+ 200: '#fed7aa',
77
+ 300: '#fdba74',
78
+ 400: '#fb923c',
79
+ 500: '#f97316',
80
+ 600: '#ea580c',
81
+ 700: '#c2410c',
82
+ 800: '#9a3412',
83
+ 900: '#7c2d12'
84
+ }
85
+ }
86
+ });
87
+ const indigo = (0, native_base_1.extendTheme)({
88
+ colors: {
89
+ primary: {
90
+ 50: '#eef2ff',
91
+ 100: '#e0e7ff',
92
+ 200: '#c7d2fe',
93
+ 300: '#a5b4fc',
94
+ 400: '#818cf8',
95
+ 500: '#6366f1',
96
+ 600: '#4f46e5',
97
+ 700: '#4338ca',
98
+ 800: '#3730a3',
99
+ 900: '#312e81'
100
+ }
101
+ }
102
+ });
103
+ exports.default = {
104
+ primary,
105
+ tertiary,
106
+ rose,
107
+ warning,
108
+ indigo
109
+ };
@@ -0,0 +1,91 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2023 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+ import { Handlers, WithViewState } from '@aemforms/af-react-renderer';
21
+ import { FileObject, FieldJson, State } from '@aemforms/af-core';
22
+ import { GestureResponderEvent } from 'react-native';
23
+ export type InputFieldTypes = {
24
+ label: string;
25
+ description?: string;
26
+ errorMessage?: string;
27
+ isHidden: boolean;
28
+ isInvalid?: boolean;
29
+ inputProps: {
30
+ [key: string]: any;
31
+ };
32
+ };
33
+ export type REPEATER = {
34
+ add: boolean;
35
+ remove: boolean;
36
+ index: number;
37
+ handlers: Handlers;
38
+ };
39
+ export type FileUploadType = {
40
+ maxFileSizeInBytes: number;
41
+ accept: Array<string> | string;
42
+ multiple: boolean;
43
+ onChange: Function;
44
+ value: any;
45
+ };
46
+ export type FileOptions = {
47
+ [key: string]: Array<string>;
48
+ };
49
+ export type FileType = FileObject & {
50
+ uri?: string;
51
+ };
52
+ export type Styles = {
53
+ hstack: {
54
+ [key: string]: string;
55
+ };
56
+ container: {
57
+ [key: string]: string;
58
+ };
59
+ image: {
60
+ [key: string]: string;
61
+ };
62
+ DeleteButton: {
63
+ [key: string]: string;
64
+ };
65
+ DeleteIcon: {
66
+ [key: string]: string;
67
+ };
68
+ PlaceholderTitleBox: {
69
+ [key: string]: string;
70
+ };
71
+ PlaceholderTitleText: {
72
+ [key: string]: string | number;
73
+ };
74
+ PlaceholderSizeText: {
75
+ [key: string]: string;
76
+ };
77
+ };
78
+ export type FieldViewState = WithViewState<FieldJson>;
79
+ export type INPUT = {
80
+ [key: string]: any;
81
+ type: 'password' | 'text';
82
+ };
83
+ export type HandlersTypes = {
84
+ dispatchClick: (event: GestureResponderEvent) => void;
85
+ dispatchChange: (event: GestureResponderEvent) => void;
86
+ dispatchBlur: (event: GestureResponderEvent) => void;
87
+ dispatchFocus: (event: GestureResponderEvent) => void;
88
+ isError?: boolean;
89
+ richText?: boolean;
90
+ };
91
+ export type PROPS = State<FieldJson & HandlersTypes>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /*************************************************************************
3
+ * ADOBE CONFIDENTIAL
4
+ * ___________________
5
+ *
6
+ * Copyright 2023 Adobe
7
+ * All Rights Reserved.
8
+ *
9
+ * NOTICE: All information contained herein is, and remains
10
+ * the property of Adobe and its suppliers, if any. The intellectual
11
+ * and technical concepts contained herein are proprietary to Adobe
12
+ * and its suppliers and are protected by all applicable intellectual
13
+ * property laws, including trade secret and copyright laws.
14
+ * Dissemination of this information or reproduction of this material
15
+ * is strictly forbidden unless prior written permission is obtained
16
+ * from Adobe.
17
+
18
+ * Adobe permits you to use and modify this file solely in accordance with
19
+ * the terms of the Adobe license agreement accompanying it.
20
+ *************************************************************************/
21
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@aemforms/af-react-native",
3
+ "version": "1.0.1",
4
+ "description": "React native based componets for Headless Form",
5
+ "author": "Adobe Systems",
6
+ "license": "Adobe Proprietary",
7
+ "homepage": "",
8
+ "main": "lib/index.js",
9
+ "directories": {
10
+ "lib": "lib",
11
+ "test": "__tests__"
12
+ },
13
+ "files": [
14
+ "lib",
15
+ "LICENSE"
16
+ ],
17
+ "publishConfig": {
18
+ "registry": "https://registry.npmjs.org/",
19
+ "access": "public"
20
+ },
21
+ "scripts": {
22
+ "clean": "rm -rf lib target",
23
+ "eslint": "npx eslint src/**/*.ts*",
24
+ "build": "npm run clean && npm run eslint && npx tsc",
25
+ "test:ci": "jest --silent --coverage",
26
+ "prepublishOnly": "npm run build && npm run test",
27
+ "test": "jest --silent"
28
+ },
29
+ "dependencies": {
30
+ "@aemforms/af-core": "^0.22.30",
31
+ "@aemforms/af-formatters": "^0.22.41",
32
+ "@aemforms/af-react-renderer": "^0.22.30",
33
+ "@native-base/icons": "^0.0.11",
34
+ "native-base": "^3.4.6",
35
+ "react-intl": "^6.2.1",
36
+ "react-native-date-picker": "^4.2.13",
37
+ "react-native-document-picker": "^8.1.3",
38
+ "react-native-render-html": "^6.3.4",
39
+ "react-native-svg": "^12.3.0"
40
+ },
41
+ "peerDependencies": {
42
+ "react": "18.1.0",
43
+ "react-native": "0.70.6"
44
+ },
45
+ "devDependencies": {
46
+ "@babel/core": "^7.12.9",
47
+ "@babel/preset-env": "^7.22.9",
48
+ "@babel/runtime": "^7.12.5",
49
+ "@react-native-community/eslint-config": "^2.0.0",
50
+ "@testing-library/jest-native": "^5.4.1",
51
+ "@testing-library/react-native": "^11.5.0",
52
+ "@tsconfig/react-native": "^2.0.2",
53
+ "@types/jest": "^26.0.23",
54
+ "@types/react": "^18.0.21",
55
+ "@types/react-native": "^0.70.6",
56
+ "@types/react-test-renderer": "^18.0.0",
57
+ "@typescript-eslint/eslint-plugin": "^5.37.0",
58
+ "@typescript-eslint/parser": "^5.37.0",
59
+ "babel-jest": "^26.6.3",
60
+ "eslint": "^7.32.0",
61
+ "eslint-config-standard": "^16.0.3",
62
+ "eslint-plugin-import": "^2.23.4",
63
+ "eslint-plugin-jest": "^24.3.6",
64
+ "eslint-plugin-node": "^11.1.0",
65
+ "eslint-plugin-promise": "^5.1.0",
66
+ "eslint-plugin-react-hooks": "^4.2.0",
67
+ "jest": "^26.6.3",
68
+ "metro-react-native-babel-preset": "^0.72.3",
69
+ "react": "18.1.0",
70
+ "react-native": "0.70.6",
71
+ "react-native-safe-area-context": "^4.4.1",
72
+ "react-test-renderer": "18.1.0",
73
+ "typescript": "^4.8.3"
74
+ },
75
+ "gitHead": "36c82b70410a7c2c92cdfedc282a5d33b76ec4c0"
76
+ }