@himakarinv/nativex 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 (170) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/images.d.ts +14 -0
  4. package/index.js +8 -0
  5. package/nativewind-preset.js +18 -0
  6. package/package.json +120 -0
  7. package/src/assets/branding/logo.jpg +0 -0
  8. package/src/assets/branding/softech-logo.png +0 -0
  9. package/src/assets/icons/2-layers.svg +3 -0
  10. package/src/assets/icons/Forbidden.svg +211 -0
  11. package/src/assets/icons/Internal-server-error.svg +119 -0
  12. package/src/assets/icons/Log-out-nav.svg +4 -0
  13. package/src/assets/icons/Not-Found.svg +282 -0
  14. package/src/assets/icons/Unauthorized.svg +314 -0
  15. package/src/assets/icons/User-Frame.svg +5 -0
  16. package/src/assets/icons/alert.svg +4 -0
  17. package/src/assets/icons/arrow-right.svg +3 -0
  18. package/src/assets/icons/avatar-female.svg +10 -0
  19. package/src/assets/icons/avatar-male.svg +10 -0
  20. package/src/assets/icons/bell.svg +3 -0
  21. package/src/assets/icons/calendar-event.svg +11 -0
  22. package/src/assets/icons/calendar.svg +6 -0
  23. package/src/assets/icons/card.svg +4 -0
  24. package/src/assets/icons/caret-right.svg +3 -0
  25. package/src/assets/icons/chat.svg +11 -0
  26. package/src/assets/icons/check.svg +3 -0
  27. package/src/assets/icons/checkbox-minus.svg +3 -0
  28. package/src/assets/icons/checkmark.svg +3 -0
  29. package/src/assets/icons/chevron-down.svg +3 -0
  30. package/src/assets/icons/chevron-left.svg +9 -0
  31. package/src/assets/icons/chevron-right.svg +9 -0
  32. package/src/assets/icons/circle-radio-active.svg +10 -0
  33. package/src/assets/icons/circle-radio.svg +10 -0
  34. package/src/assets/icons/clock.svg +3 -0
  35. package/src/assets/icons/close.svg +3 -0
  36. package/src/assets/icons/code.svg +3 -0
  37. package/src/assets/icons/country.svg +20 -0
  38. package/src/assets/icons/dot.svg +3 -0
  39. package/src/assets/icons/download.svg +1 -0
  40. package/src/assets/icons/dropdown-arrow.svg +3 -0
  41. package/src/assets/icons/dropdown-avatar.svg +3 -0
  42. package/src/assets/icons/email.svg +3 -0
  43. package/src/assets/icons/error.svg +3 -0
  44. package/src/assets/icons/eye-off.svg +1 -0
  45. package/src/assets/icons/eye.svg +1 -0
  46. package/src/assets/icons/hashtag-icon.svg +3 -0
  47. package/src/assets/icons/help-circle.svg +10 -0
  48. package/src/assets/icons/help.svg +4 -0
  49. package/src/assets/icons/hide-checkbox.svg +3 -0
  50. package/src/assets/icons/home-smile.svg +3 -0
  51. package/src/assets/icons/home.svg +3 -0
  52. package/src/assets/icons/info.svg +5 -0
  53. package/src/assets/icons/left-arrow.svg +3 -0
  54. package/src/assets/icons/log-out.svg +3 -0
  55. package/src/assets/icons/notification-box.svg +4 -0
  56. package/src/assets/icons/pencil.svg +1 -0
  57. package/src/assets/icons/plus.svg +3 -0
  58. package/src/assets/icons/radio-dot.svg +3 -0
  59. package/src/assets/icons/right-arrow.svg +3 -0
  60. package/src/assets/icons/search.svg +3 -0
  61. package/src/assets/icons/settings.svg +11 -0
  62. package/src/assets/icons/slack.svg +17 -0
  63. package/src/assets/icons/slash.svg +3 -0
  64. package/src/assets/icons/success.svg +3 -0
  65. package/src/assets/icons/successicon.svg +5 -0
  66. package/src/assets/icons/three-dot-vertical.svg +5 -0
  67. package/src/assets/icons/trash.svg +1 -0
  68. package/src/assets/icons/trend-down-01.svg +3 -0
  69. package/src/assets/icons/trend-up-01.svg +3 -0
  70. package/src/assets/icons/up-arrow.svg +3 -0
  71. package/src/assets/icons/user-plus.svg +10 -0
  72. package/src/assets/icons/user.svg +3 -0
  73. package/src/assets/icons/users.svg +3 -0
  74. package/src/assets/icons/vertical-dots-true-icon.svg +5 -0
  75. package/src/assets/icons/vertical-line.svg +3 -0
  76. package/src/assets/icons/vertical-three-dots-icon.svg +5 -0
  77. package/src/assets/icons/warning.svg +3 -0
  78. package/src/assets/icons/zap.svg +3 -0
  79. package/src/components/ActionsMenu/ActionsMenu.tsx +314 -0
  80. package/src/components/ActionsMenu/index.ts +2 -0
  81. package/src/components/Alert/Alert.tsx +291 -0
  82. package/src/components/Alert/index.ts +2 -0
  83. package/src/components/Badge/Badge.tsx +230 -0
  84. package/src/components/Badge/index.ts +2 -0
  85. package/src/components/Breadcrumb/Breadcrumb.tsx +364 -0
  86. package/src/components/Breadcrumb/index.ts +7 -0
  87. package/src/components/Button/Button.tsx +584 -0
  88. package/src/components/Button/index.ts +9 -0
  89. package/src/components/Checkbox/Checkbox.tsx +336 -0
  90. package/src/components/Checkbox/index.ts +2 -0
  91. package/src/components/CreatePassword/CreatePassword.tsx +161 -0
  92. package/src/components/CreatePassword/index.ts +2 -0
  93. package/src/components/DataTable/DataTable.tsx +822 -0
  94. package/src/components/DataTable/index.ts +10 -0
  95. package/src/components/Datepicker/Datepicker.tsx +797 -0
  96. package/src/components/Datepicker/index.ts +2 -0
  97. package/src/components/Dropdown/Dropdown.tsx +277 -0
  98. package/src/components/Dropdown/index.ts +7 -0
  99. package/src/components/DropdownMenu/DropdownMenu.tsx +471 -0
  100. package/src/components/DropdownMenu/index.ts +11 -0
  101. package/src/components/DynamicForm/DynamicForm.tsx +741 -0
  102. package/src/components/DynamicForm/index.ts +13 -0
  103. package/src/components/ErrorPages/ErrorPages.tsx +135 -0
  104. package/src/components/ErrorPages/index.ts +2 -0
  105. package/src/components/ForgotPassword/ForgotPassword.tsx +121 -0
  106. package/src/components/ForgotPassword/index.ts +2 -0
  107. package/src/components/HintError/HintError.tsx +37 -0
  108. package/src/components/HintError/index.ts +2 -0
  109. package/src/components/Icon/Icon.tsx +43 -0
  110. package/src/components/Icon/icon-registry.ts +227 -0
  111. package/src/components/Icon/index.ts +3 -0
  112. package/src/components/InputDropdown/InputDropdown.tsx +662 -0
  113. package/src/components/InputDropdown/index.ts +9 -0
  114. package/src/components/InputField/InputField.tsx +527 -0
  115. package/src/components/InputField/index.ts +2 -0
  116. package/src/components/Label/Label.tsx +88 -0
  117. package/src/components/Label/index.ts +2 -0
  118. package/src/components/LoginForm/LoginForm.tsx +158 -0
  119. package/src/components/LoginForm/index.ts +2 -0
  120. package/src/components/LoginShell/LoginShell.tsx +97 -0
  121. package/src/components/LoginShell/RoleCard.tsx +24 -0
  122. package/src/components/LoginShell/SoftechLogo.tsx +24 -0
  123. package/src/components/LoginShell/branding-assets.ts +2 -0
  124. package/src/components/LoginShell/index.ts +20 -0
  125. package/src/components/LoginShell/login-copy.ts +45 -0
  126. package/src/components/LoginShell/loginPageStyles.ts +210 -0
  127. package/src/components/Modals/Modals.tsx +313 -0
  128. package/src/components/Modals/index.ts +2 -0
  129. package/src/components/Offcanvas/Offcanvas.tsx +404 -0
  130. package/src/components/Offcanvas/index.ts +13 -0
  131. package/src/components/PageHeader/PageHeader.tsx +128 -0
  132. package/src/components/PageHeader/index.ts +2 -0
  133. package/src/components/Pagination/Pagination.tsx +540 -0
  134. package/src/components/Pagination/index.ts +8 -0
  135. package/src/components/ResetPassword/ResetPassword.tsx +172 -0
  136. package/src/components/ResetPassword/index.ts +2 -0
  137. package/src/components/RoleSelection/RoleSelection.tsx +111 -0
  138. package/src/components/RoleSelection/index.ts +2 -0
  139. package/src/components/SendOtp/SendOtp.tsx +149 -0
  140. package/src/components/SendOtp/index.ts +2 -0
  141. package/src/components/Sidenavbar/Sidenavbar.tsx +358 -0
  142. package/src/components/Sidenavbar/index.ts +2 -0
  143. package/src/components/StatCard/StatCard.tsx +393 -0
  144. package/src/components/StatCard/index.ts +6 -0
  145. package/src/components/Tabs/Tabs.tsx +239 -0
  146. package/src/components/Tabs/index.ts +2 -0
  147. package/src/components/Textarea/Textarea.tsx +217 -0
  148. package/src/components/Textarea/index.ts +2 -0
  149. package/src/components/Timepicker/Timepicker.tsx +384 -0
  150. package/src/components/Timepicker/index.ts +2 -0
  151. package/src/components/Toast/Toast.tsx +278 -0
  152. package/src/components/Toast/index.ts +2 -0
  153. package/src/components/Toggle/Toggle.tsx +296 -0
  154. package/src/components/Toggle/index.ts +2 -0
  155. package/src/components/Typeahead/Typeahead.tsx +521 -0
  156. package/src/components/Typeahead/index.ts +2 -0
  157. package/src/components/Verification/Verification.tsx +374 -0
  158. package/src/components/Verification/index.ts +2 -0
  159. package/src/index.ts +39 -0
  160. package/src/theme/borders.ts +19 -0
  161. package/src/theme/button.ts +41 -0
  162. package/src/theme/colors.ts +273 -0
  163. package/src/theme/index.ts +14 -0
  164. package/src/theme/nativewind-theme.js +182 -0
  165. package/src/theme/radius.ts +12 -0
  166. package/src/theme/shadows.ts +40 -0
  167. package/src/theme/spacing.ts +18 -0
  168. package/src/theme/typography.ts +35 -0
  169. package/src/utils/a11y.ts +21 -0
  170. package/svg.d.ts +7 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nativeX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,105 @@
1
+ # nativeX
2
+
3
+ React Native / Expo UI component library with NativeWind design tokens.
4
+
5
+ This repository is both:
6
+
7
+ - a Storybook/Expo playground for developing components
8
+ - a publishable npm package that exposes `src/` components and theme tokens
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ npm install nativex
14
+ npx expo install react-native-svg react-native-safe-area-context expo-linking
15
+ npm install nativewind tailwindcss@3.4.17
16
+ ```
17
+
18
+ The unscoped name `nativex` is already taken on the public npm registry (an unrelated Cordova plugin). Publish under a scoped name if needed:
19
+
20
+ ```bash
21
+ npm install @YOUR_NPM_USERNAME/nativex
22
+ ```
23
+
24
+ ## Consumer setup
25
+
26
+ NativeWind must see this package's source, and Metro must transform SVG icons.
27
+
28
+ **`babel.config.js`**
29
+
30
+ ```js
31
+ module.exports = function (api) {
32
+ api.cache(true);
33
+ return {
34
+ presets: [
35
+ ['babel-preset-expo', { jsxImportSource: 'nativewind' }],
36
+ 'nativewind/babel',
37
+ ],
38
+ };
39
+ };
40
+ ```
41
+
42
+ **`tailwind.config.js`**
43
+
44
+ ```js
45
+ /** @type {import('tailwindcss').Config} */
46
+ module.exports = {
47
+ content: [
48
+ './App.{js,jsx,ts,tsx}',
49
+ './app/**/*.{js,jsx,ts,tsx}',
50
+ './src/**/*.{js,jsx,ts,tsx}',
51
+ './node_modules/nativex/src/**/*.{js,jsx,ts,tsx}',
52
+ ],
53
+ presets: [
54
+ require('nativewind/preset'),
55
+ require('nativex/nativewind-preset'),
56
+ ],
57
+ };
58
+ ```
59
+
60
+ If you published a scoped package, replace `nativex` with `@YOUR_NPM_USERNAME/nativex` in both the `content` glob and the preset `require`.
61
+
62
+ **`metro.config.js`**
63
+
64
+ ```js
65
+ const { getDefaultConfig } = require('expo/metro-config');
66
+ const { withNativeWind } = require('nativewind/metro');
67
+
68
+ const config = getDefaultConfig(__dirname);
69
+
70
+ config.transformer = {
71
+ ...config.transformer,
72
+ babelTransformerPath: require.resolve('react-native-svg-transformer/expo'),
73
+ };
74
+
75
+ config.resolver = {
76
+ ...config.resolver,
77
+ assetExts: config.resolver.assetExts.filter((ext) => ext !== 'svg'),
78
+ sourceExts: [...config.resolver.sourceExts, 'svg'],
79
+ };
80
+
81
+ module.exports = withNativeWind(config, { input: './global.css' });
82
+ ```
83
+
84
+ Install `react-native-svg-transformer` in the consuming app, import `./global.css` once at the app root, and include:
85
+
86
+ ```css
87
+ @tailwind base;
88
+ @tailwind components;
89
+ @tailwind utilities;
90
+ ```
91
+
92
+ ## Usage
93
+
94
+ ```tsx
95
+ import { Button, ButtonVariant, InputField, colors } from 'nativex';
96
+
97
+ <Button label="Save" variant={ButtonVariant.Primary} onPress={() => {}} />
98
+ ```
99
+
100
+ ## Local Storybook
101
+
102
+ ```bash
103
+ npm install
104
+ npm run storybook
105
+ ```
package/images.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ declare module '*.png' {
2
+ const content: number;
3
+ export default content;
4
+ }
5
+
6
+ declare module '*.jpg' {
7
+ const content: number;
8
+ export default content;
9
+ }
10
+
11
+ declare module '*.jpeg' {
12
+ const content: number;
13
+ export default content;
14
+ }
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ import { registerRootComponent } from 'expo';
2
+
3
+ if (process.env.EXPO_PUBLIC_STORYBOOK_ENABLED === 'true') {
4
+ const StorybookUIRoot = require('./.rnstorybook').default;
5
+ registerRootComponent(StorybookUIRoot);
6
+ } else {
7
+ require('expo-router/entry');
8
+ }
@@ -0,0 +1,18 @@
1
+ const nativewindTheme = require('./src/theme/nativewind-theme');
2
+
3
+ /** @type {import('tailwindcss').Config} */
4
+ module.exports = {
5
+ theme: {
6
+ colors: nativewindTheme.colors,
7
+ extend: {
8
+ spacing: nativewindTheme.spacing,
9
+ borderRadius: nativewindTheme.borderRadius,
10
+ fontFamily: nativewindTheme.fontFamily,
11
+ fontSize: nativewindTheme.fontSize,
12
+ fontWeight: nativewindTheme.fontWeight,
13
+ borderWidth: nativewindTheme.borderWidth,
14
+ height: nativewindTheme.height,
15
+ width: nativewindTheme.width,
16
+ },
17
+ },
18
+ };
package/package.json ADDED
@@ -0,0 +1,120 @@
1
+ {
2
+ "name": "@himakarinv/nativex",
3
+ "version": "1.0.0",
4
+ "private": false,
5
+ "description": "React Native / Expo UI component library with NativeWind design tokens",
6
+ "license": "MIT",
7
+ "main": "index.js",
8
+ "types": "./src/index.ts",
9
+ "react-native": "./src/index.ts",
10
+ "source": "./src/index.ts",
11
+ "sideEffects": false,
12
+ "keywords": [
13
+ "react-native",
14
+ "expo",
15
+ "nativewind",
16
+ "ui",
17
+ "components"
18
+ ],
19
+ "exports": {
20
+ ".": {
21
+ "types": "./src/index.ts",
22
+ "react-native": "./src/index.ts",
23
+ "source": "./src/index.ts",
24
+ "default": "./src/index.ts"
25
+ },
26
+ "./nativewind-preset": "./nativewind-preset.js",
27
+ "./package.json": "./package.json"
28
+ },
29
+ "files": [
30
+ "src",
31
+ "!src/**/*.stories.tsx",
32
+ "!src/**/TokenTable.tsx",
33
+ "!src/**/pageStoryCanvas.tsx",
34
+ "!src/**/token-catalog.ts",
35
+ "!src/**/ColorsShowcase.tsx",
36
+ "!src/**/color-deploy.ts",
37
+ "!src/**/color-overrides.ts",
38
+ "!src/**/color-previews.tsx",
39
+ "!src/**/.npmignore",
40
+ "nativewind-preset.js",
41
+ "svg.d.ts",
42
+ "images.d.ts",
43
+ "README.md",
44
+ "LICENSE"
45
+ ],
46
+ "peerDependencies": {
47
+ "expo-linking": ">=7.0.0",
48
+ "nativewind": ">=4.1.0",
49
+ "react": ">=18.2.0",
50
+ "react-native": ">=0.76.0",
51
+ "react-native-safe-area-context": ">=4.8.0",
52
+ "react-native-svg": ">=15.0.0"
53
+ },
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "scripts": {
58
+ "start": "expo start",
59
+ "reset-project": "node ./scripts/reset-project.js",
60
+ "android": "expo start --android",
61
+ "ios": "expo start --ios",
62
+ "web": "expo start --web",
63
+ "lint": "expo lint",
64
+ "typecheck": "tsc --noEmit",
65
+ "pack:check": "npm pack --dry-run",
66
+ "storybook": "npm run storybook-generate && cross-env EXPO_PUBLIC_STORYBOOK_ENABLED=true expo start",
67
+ "storybook:ios": "npm run storybook-generate && cross-env EXPO_PUBLIC_STORYBOOK_ENABLED=true expo start --ios",
68
+ "storybook:android": "npm run storybook-generate && cross-env EXPO_PUBLIC_STORYBOOK_ENABLED=true expo start --android",
69
+ "storybook:web": "npm run storybook-generate && cross-env EXPO_PUBLIC_STORYBOOK_ENABLED=true expo start --web",
70
+ "storybook-generate": "sb-rn-get-stories"
71
+ },
72
+ "dependencies": {
73
+ "@expo/vector-icons": "^15.0.3",
74
+ "@gorhom/bottom-sheet": "latest",
75
+ "@react-native-async-storage/async-storage": "2.2.0",
76
+ "@react-native-community/datetimepicker": "8.4.4",
77
+ "@react-native-community/slider": "5.0.1",
78
+ "@react-navigation/bottom-tabs": "^7.4.0",
79
+ "@react-navigation/elements": "^2.6.3",
80
+ "@react-navigation/native": "^7.1.8",
81
+ "babel-preset-expo": "~54.0.10",
82
+ "cross-env": "latest",
83
+ "expo": "~54.0.35",
84
+ "expo-constants": "~18.0.13",
85
+ "expo-font": "~14.0.12",
86
+ "expo-haptics": "~15.0.8",
87
+ "expo-image": "~3.0.11",
88
+ "expo-linking": "~8.0.12",
89
+ "expo-router": "~6.0.24",
90
+ "expo-splash-screen": "~31.0.13",
91
+ "expo-status-bar": "~3.0.9",
92
+ "expo-symbols": "~1.0.8",
93
+ "expo-system-ui": "~6.0.9",
94
+ "expo-web-browser": "~15.0.11",
95
+ "nativewind": "^4.2.1",
96
+ "react": "19.1.0",
97
+ "react-dom": "19.1.0",
98
+ "react-native": "0.81.5",
99
+ "react-native-gesture-handler": "~2.28.0",
100
+ "react-native-reanimated": "~4.1.1",
101
+ "react-native-safe-area-context": "~5.6.0",
102
+ "react-native-screens": "~4.16.0",
103
+ "react-native-svg": "15.12.1",
104
+ "react-native-web": "~0.21.0",
105
+ "react-native-worklets": "0.5.1"
106
+ },
107
+ "devDependencies": {
108
+ "@storybook/addon-ondevice-actions": "9.1.4",
109
+ "@storybook/addon-ondevice-controls": "9.1.4",
110
+ "@storybook/react": "9.1.20",
111
+ "@storybook/react-native": "9.1.4",
112
+ "@types/react": "~19.1.0",
113
+ "eslint": "^9.25.0",
114
+ "eslint-config-expo": "~10.0.0",
115
+ "react-native-svg-transformer": "^1.5.3",
116
+ "storybook": "9.1.20",
117
+ "tailwindcss": "^3.4.17",
118
+ "typescript": "~5.9.2"
119
+ }
120
+ }
Binary file
@@ -0,0 +1,3 @@
1
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M1.33203 9.66667L7.9987 13L14.6654 9.66667M7.9987 3L1.33203 6.33333L7.9987 9.66667L14.6654 6.33333L7.9987 3Z" stroke="#414651" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>