@idealyst/components 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,107 +1,106 @@
1
- {
2
- "name": "@idealyst/components",
3
- "version": "1.0.0",
4
- "description": "Shared component library for React and React Native",
5
- "main": "src/index.ts",
6
- "module": "src/index.ts",
7
- "types": "src/index.ts",
8
- "react-native": "src/index.native.ts",
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/your-username/idealyst-framework.git",
12
- "directory": "packages/components"
13
- },
14
- "author": "Your Name <your.email@example.com>",
15
- "license": "MIT",
16
- "publishConfig": {
17
- "access": "public"
18
- },
19
- "exports": {
20
- ".": {
21
- "react-native": "./src/index.native.ts",
22
- "import": "./src/index.ts",
23
- "require": "./src/index.ts",
24
- "types": "./src/index.ts"
25
- },
26
- "./plugin/web": {
27
- "import": "./plugin/web.js",
28
- "require": "./plugin/web.js",
29
- "types": "./plugin/web.d.ts"
30
- },
31
- "./examples": {
32
- "import": "./src/examples/index.ts",
33
- "require": "./src/examples/index.ts",
34
- "types": "./src/examples/index.ts"
35
- },
36
- "./src/unistyles": {
37
- "import": "./src/unistyles.ts",
38
- "require": "./src/unistyles.ts",
39
- "types": "./src/unistyles.ts"
40
- },
41
- "./src/theme": {
42
- "import": "./src/theme/index.ts",
43
- "require": "./src/theme/index.ts",
44
- "types": "./src/theme/index.ts"
45
- }
46
- },
47
- "scripts": {
48
- "build": "rollup -c",
49
- "dev": "rollup -c -w",
50
- "prepublishOnly": "echo 'Publishing TypeScript source directly'",
51
- "publish:npm": "npm publish"
52
- },
53
- "peerDependencies": {
54
- "@mdi/js": "^7.4.47",
55
- "@mdi/react": "^1.6.1",
56
- "@react-native-vector-icons/common": "^12.0.1",
57
- "@react-native-vector-icons/material-design-icons": "^12.0.1",
58
- "@react-native/normalize-colors": "*",
59
- "react": ">=16.8.0",
60
- "react-native": ">=0.60.0",
61
- "react-native-edge-to-edge": "*",
62
- "react-native-nitro-modules": "*",
63
- "react-native-unistyles": "3.0.0-rc.5"
64
- },
65
- "peerDependenciesMeta": {
66
- "@mdi/js": {
67
- "optional": true
68
- },
69
- "@mdi/react": {
70
- "optional": true
71
- },
72
- "@react-native/normalize-colors": {
73
- "optional": true
74
- },
75
- "react-native": {
76
- "optional": true
77
- },
78
- "react-native-edge-to-edge": {
79
- "optional": true
80
- },
81
- "react-native-nitro-modules": {
82
- "optional": true
83
- },
84
- "react-native-unistyles": {
85
- "optional": true
86
- },
87
- "react-native-vector-icons": {
88
- "optional": true
89
- }
90
- },
91
- "devDependencies": {
92
- "@types/react": "^19.1.0",
93
- "rollup": "^3.20.0",
94
- "rollup-plugin-typescript2": "^0.34.0",
95
- "typescript": "^5.0.0"
96
- },
97
- "files": [
98
- "src",
99
- "plugin"
100
- ],
101
- "keywords": [
102
- "react",
103
- "react-native",
104
- "components",
105
- "cross-platform"
106
- ]
107
- }
1
+ {
2
+ "name": "@idealyst/components",
3
+ "version": "1.0.2",
4
+ "description": "Shared component library for React and React Native",
5
+ "main": "src/index.ts",
6
+ "module": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "react-native": "src/index.native.ts",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/your-username/idealyst-framework.git",
12
+ "directory": "packages/components"
13
+ },
14
+ "author": "Your Name <your.email@example.com>",
15
+ "license": "MIT",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "react-native": "./src/index.native.ts",
22
+ "import": "./src/index.ts",
23
+ "require": "./src/index.ts",
24
+ "types": "./src/index.ts"
25
+ },
26
+ "./plugin/web": {
27
+ "import": "./plugin/web.js",
28
+ "require": "./plugin/web.js",
29
+ "types": "./plugin/web.d.ts"
30
+ },
31
+ "./examples": {
32
+ "import": "./src/examples/index.ts",
33
+ "require": "./src/examples/index.ts",
34
+ "types": "./src/examples/index.ts"
35
+ },
36
+ "./src/unistyles": {
37
+ "import": "./src/unistyles.ts",
38
+ "require": "./src/unistyles.ts",
39
+ "types": "./src/unistyles.ts"
40
+ }
41
+ },
42
+ "scripts": {
43
+ "build": "rollup -c",
44
+ "dev": "rollup -c -w",
45
+ "prepublishOnly": "echo 'Publishing TypeScript source directly'",
46
+ "publish:npm": "npm publish"
47
+ },
48
+ "peerDependencies": {
49
+ "@idealyst/theme": "workspace:^1.0.2",
50
+ "@mdi/js": "^7.4.47",
51
+ "@mdi/react": "^1.6.1",
52
+ "@react-native-vector-icons/common": "^12.0.1",
53
+ "@react-native-vector-icons/material-design-icons": "^12.0.1",
54
+ "@react-native/normalize-colors": "*",
55
+ "react": ">=16.8.0",
56
+ "react-native": ">=0.60.0",
57
+ "react-native-edge-to-edge": "*",
58
+ "react-native-nitro-modules": "*",
59
+ "react-native-unistyles": "^3.0.4"
60
+ },
61
+ "peerDependenciesMeta": {
62
+ "@idealyst/theme": {
63
+ "optional": true
64
+ },
65
+ "@mdi/js": {
66
+ "optional": true
67
+ },
68
+ "@mdi/react": {
69
+ "optional": true
70
+ },
71
+ "@react-native/normalize-colors": {
72
+ "optional": true
73
+ },
74
+ "react-native": {
75
+ "optional": true
76
+ },
77
+ "react-native-edge-to-edge": {
78
+ "optional": true
79
+ },
80
+ "react-native-nitro-modules": {
81
+ "optional": true
82
+ },
83
+ "react-native-unistyles": {
84
+ "optional": true
85
+ },
86
+ "react-native-vector-icons": {
87
+ "optional": true
88
+ }
89
+ },
90
+ "devDependencies": {
91
+ "@types/react": "^19.1.0",
92
+ "rollup": "^3.20.0",
93
+ "rollup-plugin-typescript2": "^0.34.0",
94
+ "typescript": "^5.0.0"
95
+ },
96
+ "files": [
97
+ "src",
98
+ "plugin"
99
+ ],
100
+ "keywords": [
101
+ "react",
102
+ "react-native",
103
+ "components",
104
+ "cross-platform"
105
+ ]
106
+ }
@@ -1,3 +1,3 @@
1
- // React Native-specific Button export
2
- export { default } from './Button.native';
1
+ // React Native-specific Button export
2
+ export { default } from './Button.native';
3
3
  export * from './types';
@@ -1,3 +1,3 @@
1
- // Web-specific Button export
2
- export { default } from './Button.web';
1
+ // Web-specific Button export
2
+ export { default } from './Button.web';
3
3
  export * from './types';
@@ -1,3 +1,3 @@
1
- // React Native-specific Input export
2
- export { default } from './Input.native';
1
+ // React Native-specific Input export
2
+ export { default } from './Input.native';
3
3
  export * from './types';
@@ -1,5 +1,5 @@
1
- // Platform-agnostic Input export
2
- // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
- // This file serves as fallback for web environments
4
- export { default } from './Input.web';
1
+ // Platform-agnostic Input export
2
+ // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
+ // This file serves as fallback for web environments
4
+ export { default } from './Input.web';
5
5
  export * from './types';
@@ -1,3 +1,3 @@
1
- // Web-specific Input export
2
- export { default } from './Input.web';
1
+ // Web-specific Input export
2
+ export { default } from './Input.web';
3
3
  export * from './types';
@@ -1,69 +1,69 @@
1
- import type { IntentVariant } from '../theme/variants';
2
-
3
- export interface InputProps {
4
- /**
5
- * The current value of the input
6
- */
7
- value?: string;
8
-
9
- /**
10
- * Called when the text changes
11
- */
12
- onChangeText?: (text: string) => void;
13
-
14
- /**
15
- * Placeholder text
16
- */
17
- placeholder?: string;
18
-
19
- /**
20
- * Whether the input is disabled
21
- */
22
- disabled?: boolean;
23
-
24
- /**
25
- * The type of input (affects keyboard type on mobile)
26
- */
27
- inputType?: 'text' | 'email' | 'password' | 'number';
28
-
29
- /**
30
- * Whether to show the password
31
- */
32
- secureTextEntry?: boolean;
33
-
34
- /**
35
- * Auto-capitalization behavior
36
- */
37
- autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
38
-
39
- /**
40
- * Size variant of the input
41
- */
42
- size?: 'small' | 'medium' | 'large';
43
-
44
- /**
45
- * Style variant of the input
46
- */
47
- variant?: 'default' | 'outlined' | 'filled';
48
-
49
- /**
50
- * The intent/color scheme of the input (for focus states, validation, etc.)
51
- */
52
- intent?: IntentVariant;
53
-
54
- /**
55
- * Whether the input has an error state
56
- * @deprecated Use intent="error" instead
57
- */
58
- hasError?: boolean;
59
-
60
- /**
61
- * Additional styles (platform-specific)
62
- */
63
- style?: any;
64
-
65
- /**
66
- * Test ID for testing
67
- */
68
- testID?: string;
1
+ import type { IntentVariant } from '../theme/variants';
2
+
3
+ export interface InputProps {
4
+ /**
5
+ * The current value of the input
6
+ */
7
+ value?: string;
8
+
9
+ /**
10
+ * Called when the text changes
11
+ */
12
+ onChangeText?: (text: string) => void;
13
+
14
+ /**
15
+ * Placeholder text
16
+ */
17
+ placeholder?: string;
18
+
19
+ /**
20
+ * Whether the input is disabled
21
+ */
22
+ disabled?: boolean;
23
+
24
+ /**
25
+ * The type of input (affects keyboard type on mobile)
26
+ */
27
+ inputType?: 'text' | 'email' | 'password' | 'number';
28
+
29
+ /**
30
+ * Whether to show the password
31
+ */
32
+ secureTextEntry?: boolean;
33
+
34
+ /**
35
+ * Auto-capitalization behavior
36
+ */
37
+ autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
38
+
39
+ /**
40
+ * Size variant of the input
41
+ */
42
+ size?: 'small' | 'medium' | 'large';
43
+
44
+ /**
45
+ * Style variant of the input
46
+ */
47
+ variant?: 'default' | 'outlined' | 'filled';
48
+
49
+ /**
50
+ * The intent/color scheme of the input (for focus states, validation, etc.)
51
+ */
52
+ intent?: IntentVariant;
53
+
54
+ /**
55
+ * Whether the input has an error state
56
+ * @deprecated Use intent="error" instead
57
+ */
58
+ hasError?: boolean;
59
+
60
+ /**
61
+ * Additional styles (platform-specific)
62
+ */
63
+ style?: any;
64
+
65
+ /**
66
+ * Test ID for testing
67
+ */
68
+ testID?: string;
69
69
  }
@@ -1,3 +1,3 @@
1
- // React Native-specific Text export
2
- export { default } from './Text.native';
1
+ // React Native-specific Text export
2
+ export { default } from './Text.native';
3
3
  export * from './types';
package/src/Text/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- // Platform-agnostic Text export
2
- // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
- // This file serves as fallback for web environments
4
- export { default } from './Text.web';
1
+ // Platform-agnostic Text export
2
+ // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
+ // This file serves as fallback for web environments
4
+ export { default } from './Text.web';
5
5
  export * from './types';
@@ -1,3 +1,3 @@
1
- // Web-specific Text export
2
- export { default } from './Text.web';
1
+ // Web-specific Text export
2
+ export { default } from './Text.web';
3
3
  export * from './types';
@@ -1,3 +1,3 @@
1
- // React Native-specific View export
2
- export { default } from './View.native';
1
+ // React Native-specific View export
2
+ export { default } from './View.native';
3
3
  export * from './types';
package/src/View/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- // Platform-agnostic View export
2
- // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
- // This file serves as fallback for web environments
4
- export { default } from './View.web';
1
+ // Platform-agnostic View export
2
+ // Bundlers will resolve to index.web.ts (web) or index.native.ts (React Native)
3
+ // This file serves as fallback for web environments
4
+ export { default } from './View.web';
5
5
  export * from './types';
@@ -1,3 +1,3 @@
1
- // Web-specific View export
2
- export { default } from './View.web';
1
+ // Web-specific View export
2
+ export { default } from './View.web';
3
3
  export * from './types';
package/src/View/types.ts CHANGED
@@ -1,73 +1,73 @@
1
- import { ReactNode } from 'react';
2
-
3
- export interface ViewProps {
4
- /**
5
- * The content to display inside the view
6
- */
7
- children?: ReactNode;
8
-
9
- /**
10
- * Padding variant
11
- */
12
- spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
-
14
- /**
15
- * Margin variant
16
- */
17
- marginVariant?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
18
-
19
- /**
20
- * Background variant
21
- */
22
- background?: 'transparent' | 'surface' | 'primary' | 'secondary';
23
-
24
- /**
25
- * Border radius variant
26
- */
27
- radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
28
-
29
- /**
30
- * Border variant
31
- */
32
- border?: 'none' | 'thin' | 'thick';
33
-
34
- /**
35
- * Custom background color (overrides background variant)
36
- */
37
- backgroundColor?: string;
38
-
39
- /**
40
- * Custom padding (overrides spacing variant)
41
- */
42
- padding?: number;
43
-
44
- /**
45
- * Custom margin (overrides marginVariant)
46
- */
47
- margin?: number;
48
-
49
- /**
50
- * Custom border radius (overrides radius variant)
51
- */
52
- borderRadius?: number;
53
-
54
- /**
55
- * Custom border width (overrides border variant)
56
- */
57
- borderWidth?: number;
58
-
59
- /**
60
- * Custom border color
61
- */
62
- borderColor?: string;
63
-
64
- /**
65
- * Additional styles (platform-specific)
66
- */
67
- style?: any;
68
-
69
- /**
70
- * Test ID for testing
71
- */
72
- testID?: string;
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface ViewProps {
4
+ /**
5
+ * The content to display inside the view
6
+ */
7
+ children?: ReactNode;
8
+
9
+ /**
10
+ * Padding variant
11
+ */
12
+ spacing?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
13
+
14
+ /**
15
+ * Margin variant
16
+ */
17
+ marginVariant?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
18
+
19
+ /**
20
+ * Background variant
21
+ */
22
+ background?: 'transparent' | 'surface' | 'primary' | 'secondary';
23
+
24
+ /**
25
+ * Border radius variant
26
+ */
27
+ radius?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
28
+
29
+ /**
30
+ * Border variant
31
+ */
32
+ border?: 'none' | 'thin' | 'thick';
33
+
34
+ /**
35
+ * Custom background color (overrides background variant)
36
+ */
37
+ backgroundColor?: string;
38
+
39
+ /**
40
+ * Custom padding (overrides spacing variant)
41
+ */
42
+ padding?: number;
43
+
44
+ /**
45
+ * Custom margin (overrides marginVariant)
46
+ */
47
+ margin?: number;
48
+
49
+ /**
50
+ * Custom border radius (overrides radius variant)
51
+ */
52
+ borderRadius?: number;
53
+
54
+ /**
55
+ * Custom border width (overrides border variant)
56
+ */
57
+ borderWidth?: number;
58
+
59
+ /**
60
+ * Custom border color
61
+ */
62
+ borderColor?: string;
63
+
64
+ /**
65
+ * Additional styles (platform-specific)
66
+ */
67
+ style?: any;
68
+
69
+ /**
70
+ * Test ID for testing
71
+ */
72
+ testID?: string;
73
73
  }
@@ -1,15 +1,13 @@
1
1
  import {
2
2
  createTheme,
3
- type ThemeConfig
4
- } from '../theme/themeBuilder';
5
- import {
3
+ type ThemeConfig,
6
4
  createStandardPalettes,
7
5
  createDarkPalettes,
8
6
  createLightIntentMappings,
9
7
  createDarkIntentMappings,
10
8
  createLightColorMappings,
11
9
  createDarkColorMappings
12
- } from '../theme/defaultThemes';
10
+ } from '@idealyst/theme';
13
11
 
14
12
  // Extended color palettes - includes all base colors plus additional ones
15
13
  export const extendedColorPalettes = {
package/src/index.ts CHANGED
@@ -44,5 +44,5 @@ export type { AvatarProps } from './Avatar/types';
44
44
  export type { ScreenProps } from './Screen/types';
45
45
  export type { IconProps } from './Icon/types';
46
46
 
47
- export { breakpoints } from './theme';
48
- export type { AppTheme } from './theme';
47
+ export { breakpoints } from '@idealyst/theme';
48
+ export type { AppTheme } from '@idealyst/theme';
package/src/unistyles.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { StyleSheet } from 'react-native-unistyles';
2
- import { defaultLightTheme, defaultDarkTheme } from './theme/defaultThemes';
2
+ import { defaultLightTheme, defaultDarkTheme, breakpoints } from '@idealyst/theme';
3
3
  import { extendedThemes } from './examples/extendedTheme';
4
- import { breakpoints } from './theme/breakpoints';
5
4
 
6
5
  // Use the extended themes instead of default themes
7
6
  export const lightTheme = extendedThemes.light;