rechtspilot-ui 1.3.1 → 1.4.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.
- package/dist/chunks-native.cjs +1 -1
- package/dist/chunks-native.js +149 -148
- package/dist/chunks.cjs +1 -1
- package/dist/chunks.js +8 -4
- package/dist/icons.native.cjs +1 -1
- package/dist/icons.native.es.js +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.es.js +437 -121
- package/dist/native/components/IconButton/IconButton.native.d.ts +8 -0
- package/dist/native/components/Input/Input.native.d.ts +3 -3
- package/dist/native/components/Select/Select.native.d.ts +13 -0
- package/dist/native/components/Sheet/Sheet.native.d.ts +10 -0
- package/dist/native/components/Text/Text.native.d.ts +9 -0
- package/dist/native/index.native.d.ts +10 -0
- package/dist/native/lib/theme.d.ts +8 -4
- package/dist/native/lib/ui/command.d.ts +1 -1
- package/package.json +6 -2
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PressableProps } from 'react-native';
|
|
2
|
+
type ButtonVariant = 'base' | 'primary' | 'outline';
|
|
3
|
+
export type IconButtonProps = Omit<PressableProps, 'style'> & {
|
|
4
|
+
size?: 'sm' | 'md' | 'lg';
|
|
5
|
+
variant?: ButtonVariant;
|
|
6
|
+
};
|
|
7
|
+
export default function IconButton({ children, size, variant, disabled, hitSlop, ...rest }: IconButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
type InputProps = {
|
|
1
|
+
export type InputProps = {
|
|
2
2
|
label: string;
|
|
3
3
|
value?: string;
|
|
4
4
|
onChange: (value: string) => void;
|
|
@@ -11,6 +11,6 @@ type InputProps = {
|
|
|
11
11
|
editable?: boolean;
|
|
12
12
|
multiline?: boolean;
|
|
13
13
|
numberOfLines?: number;
|
|
14
|
+
currency?: boolean;
|
|
14
15
|
};
|
|
15
|
-
export default function Input({ label, value, onChange, error, helperText, placeholder, secureTextEntry, keyboardType, autoCapitalize, editable, multiline, numberOfLines, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
16
|
+
export default function Input({ label, value, onChange, error, helperText, placeholder, secureTextEntry, keyboardType, autoCapitalize, editable, multiline, numberOfLines, currency, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SelectOption = {
|
|
2
|
+
value: string;
|
|
3
|
+
text: string;
|
|
4
|
+
};
|
|
5
|
+
export type SelectProps = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
options: SelectOption[];
|
|
10
|
+
error?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export default function Select({ label, value, onChange, options, error, disabled }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SheetProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onGoBack?: () => void;
|
|
6
|
+
title?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
footer?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
export default function Sheet({ open, onClose, onGoBack, title, children, footer }: SheetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
|
+
import { typography } from '../../lib/theme';
|
|
4
|
+
export type TextVariant = keyof typeof typography;
|
|
5
|
+
export type TextProps = {
|
|
6
|
+
variant?: TextVariant;
|
|
7
|
+
color?: string;
|
|
8
|
+
} & React.ComponentProps<typeof RNText>;
|
|
9
|
+
export default function Text({ variant, color, style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export { default as Button } from './components/Button/Button.native';
|
|
2
|
+
export type { ButtonProps } from './components/Button/Button.native';
|
|
3
|
+
export { default as IconButton } from './components/IconButton/IconButton.native';
|
|
4
|
+
export type { IconButtonProps } from './components/IconButton/IconButton.native';
|
|
2
5
|
export { default as Input } from './components/Input/Input.native';
|
|
6
|
+
export type { InputProps } from './components/Input/Input.native';
|
|
7
|
+
export { default as Select } from './components/Select/Select.native';
|
|
8
|
+
export type { SelectProps, SelectOption } from './components/Select/Select.native';
|
|
9
|
+
export { default as Sheet } from './components/Sheet/Sheet.native';
|
|
10
|
+
export type { SheetProps } from './components/Sheet/Sheet.native';
|
|
11
|
+
export { default as Text } from './components/Text/Text.native';
|
|
12
|
+
export type { TextProps, TextVariant } from './components/Text/Text.native';
|
|
3
13
|
export { default as Spinner } from './components/Spinner/Spinner.native';
|
|
4
14
|
export { colors, typography } from './lib/theme';
|
|
5
15
|
export { useIsMobile } from './hooks/mobile';
|
|
@@ -86,20 +86,24 @@ export declare const colors: {
|
|
|
86
86
|
signatureInk: string;
|
|
87
87
|
};
|
|
88
88
|
export declare const typography: {
|
|
89
|
+
heading: {
|
|
90
|
+
fontFamily: string;
|
|
91
|
+
fontWeight: "500";
|
|
92
|
+
};
|
|
89
93
|
title: {
|
|
90
94
|
fontFamily: string;
|
|
91
|
-
fontWeight:
|
|
95
|
+
fontWeight: "500";
|
|
92
96
|
};
|
|
93
97
|
label: {
|
|
94
98
|
fontFamily: string;
|
|
95
|
-
fontWeight:
|
|
99
|
+
fontWeight: "500";
|
|
96
100
|
};
|
|
97
101
|
body: {
|
|
98
102
|
fontFamily: string;
|
|
99
|
-
fontWeight:
|
|
103
|
+
fontWeight: "400";
|
|
100
104
|
};
|
|
101
105
|
caption: {
|
|
102
106
|
fontFamily: string;
|
|
103
|
-
fontWeight:
|
|
107
|
+
fontWeight: "600";
|
|
104
108
|
};
|
|
105
109
|
};
|
|
@@ -48,7 +48,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
|
48
48
|
ref?: React.Ref<HTMLDivElement>;
|
|
49
49
|
} & {
|
|
50
50
|
asChild?: boolean;
|
|
51
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "
|
|
51
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "heading" | "value"> & {
|
|
52
52
|
heading?: React.ReactNode;
|
|
53
53
|
value?: string;
|
|
54
54
|
forceMount?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rechtspilot-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rechtspilot UI Library",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"react": "^18.0.0 || ^19.0.0",
|
|
47
47
|
"react-dom": "^18.0.0 ||^19.0.0",
|
|
48
48
|
"react-native": ">=0.60.0",
|
|
49
|
+
"react-native-safe-area-context": ">=4.0.0",
|
|
49
50
|
"react-native-svg": ">=15",
|
|
50
51
|
"styled-components": "^6.1.19",
|
|
51
52
|
"tailwindcss": "^4.0.0"
|
|
@@ -57,6 +58,9 @@
|
|
|
57
58
|
"react-native": {
|
|
58
59
|
"optional": true
|
|
59
60
|
},
|
|
61
|
+
"react-native-safe-area-context": {
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
60
64
|
"react-native-svg": {
|
|
61
65
|
"optional": true
|
|
62
66
|
},
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
"generate": "node scripts/generate-native-icons.mjs --prune && pnpm run generate:icons",
|
|
75
79
|
"prebuild": "pnpm run generate",
|
|
76
80
|
"build": "pnpm run build:web && pnpm run build:native",
|
|
77
|
-
"build:web": "tsc -b && vite build",
|
|
81
|
+
"build:web": "tsc -b tsconfig.build.json && vite build",
|
|
78
82
|
"build:native": "BUILD_TARGET=native vite build",
|
|
79
83
|
"test:imports": "node test-import.cjs && node test-subpath-imports.mjs && node test-react-native-import.js",
|
|
80
84
|
"test:web-bundle": "node test-web-bundle.mjs",
|