@sudobility/components-rn 1.0.38 → 1.0.40

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.
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ export interface AppVersionProps {
3
+ /** App display name */
4
+ appName: string;
5
+ /** Version string (e.g. from package.json) */
6
+ version: string;
7
+ /** Additional className */
8
+ className?: string;
9
+ }
10
+ /**
11
+ * AppVersion Component
12
+ *
13
+ * Displays the app name and version in a muted text style.
14
+ * Reads the version from the consuming app's package.json.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { version } from '../package.json';
19
+ * <AppVersion appName="MyApp" version={version} />
20
+ * // renders: "MyApp v1.0.0"
21
+ * ```
22
+ */
23
+ export declare const AppVersion: React.FC<AppVersionProps>;
24
+ //# sourceMappingURL=AppVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppVersion.d.ts","sourceRoot":"","sources":["../../../src/ui/AppVersion/AppVersion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,eAAe;IAC9B,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,OAAO,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAehD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { AppVersion } from './AppVersion';
2
+ export type { AppVersionProps } from './AppVersion';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/AppVersion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/components-rn",
3
- "version": "1.0.38",
3
+ "version": "1.0.40",
4
4
  "description": "React Native UI components and design system - Ported from @sudobility/components",
5
5
  "type": "module",
6
6
  "main": "dist/index.esm.js",
@@ -41,7 +41,7 @@
41
41
  ],
42
42
  "author": "Sudobility",
43
43
  "peerDependencies": {
44
- "@sudobility/design": "^1.1.24",
44
+ "@sudobility/design": "^1.1.25",
45
45
  "@sudobility/types": "^1.9.61",
46
46
  "nativewind": ">=4.0.0",
47
47
  "react": "^18.0.0 || ^19.0.0",
@@ -64,7 +64,7 @@
64
64
  "@react-native/babel-preset": "^0.84.0",
65
65
  "@react-native/js-polyfills": "^0.84.0",
66
66
  "@react-native/normalize-colors": "^0.84.0",
67
- "@sudobility/design": "^1.1.24",
67
+ "@sudobility/design": "^1.1.25",
68
68
  "@sudobility/types": "^1.9.61",
69
69
  "@testing-library/jest-native": "^5.4.3",
70
70
  "@testing-library/react-native": "^13.3.3",
package/src/index.ts CHANGED
@@ -44,6 +44,7 @@ export * from './ui/Code';
44
44
  export * from './ui/TruncatedText';
45
45
 
46
46
  // UI Components - Display
47
+ export * from './ui/AppVersion';
47
48
  export * from './ui/Badge';
48
49
  export * from './ui/Avatar';
49
50
  export * from './ui/Skeleton';
@@ -0,0 +1,42 @@
1
+ import * as React from 'react';
2
+ import { Text } from 'react-native';
3
+ import { cn } from '../../lib/utils';
4
+
5
+ export interface AppVersionProps {
6
+ /** App display name */
7
+ appName: string;
8
+ /** Version string (e.g. from package.json) */
9
+ version: string;
10
+ /** Additional className */
11
+ className?: string;
12
+ }
13
+
14
+ /**
15
+ * AppVersion Component
16
+ *
17
+ * Displays the app name and version in a muted text style.
18
+ * Reads the version from the consuming app's package.json.
19
+ *
20
+ * @example
21
+ * ```tsx
22
+ * import { version } from '../package.json';
23
+ * <AppVersion appName="MyApp" version={version} />
24
+ * // renders: "MyApp v1.0.0"
25
+ * ```
26
+ */
27
+ export const AppVersion: React.FC<AppVersionProps> = ({
28
+ appName,
29
+ version,
30
+ className,
31
+ }) => {
32
+ return (
33
+ <Text
34
+ className={cn(
35
+ 'text-sm text-gray-500 dark:text-gray-400 text-center',
36
+ className
37
+ )}
38
+ >
39
+ {appName} v{version}
40
+ </Text>
41
+ );
42
+ };
@@ -0,0 +1,2 @@
1
+ export { AppVersion } from './AppVersion';
2
+ export type { AppVersionProps } from './AppVersion';