rechtspilot-ui 1.4.2 → 1.6.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 (37) hide show
  1. package/dist/chunks-native.cjs +1 -1
  2. package/dist/chunks-native.js +426 -408
  3. package/dist/chunks.cjs +1 -1
  4. package/dist/chunks.js +23 -4
  5. package/dist/icons.cjs +1 -1
  6. package/dist/icons.d.ts +2 -0
  7. package/dist/icons.es.js +2 -2
  8. package/dist/icons.native.cjs +1 -1
  9. package/dist/icons.native.es.js +2 -2
  10. package/dist/index.cjs +96 -96
  11. package/dist/index.es.js +301 -301
  12. package/dist/index.native.cjs +3 -1
  13. package/dist/index.native.es.js +1056 -325
  14. package/dist/native/components/Badge/Badge.native.d.ts +10 -0
  15. package/dist/native/components/Button/Button.native.d.ts +3 -1
  16. package/dist/native/components/Card/Card.native.d.ts +12 -0
  17. package/dist/native/components/Divider/Divider.native.d.ts +2 -0
  18. package/dist/native/components/EmptyState/EmptyState.native.d.ts +9 -0
  19. package/dist/native/components/Input/Input.native.d.ts +12 -2
  20. package/dist/native/components/Letter/Letter.native.d.ts +69 -0
  21. package/dist/native/components/MenuItem/MenuItem.native.d.ts +10 -0
  22. package/dist/native/components/RadioCard/RadioCard.native.d.ts +11 -0
  23. package/dist/native/components/Sheet/Sheet.native.d.ts +5 -1
  24. package/dist/native/components/Spinner/Spinner.native.d.ts +2 -1
  25. package/dist/native/components/StepProgress/StepProgress.native.d.ts +12 -0
  26. package/dist/native/components/Toaster/Toaster.native.d.ts +1 -0
  27. package/dist/native/icons/Warning.d.ts +2 -0
  28. package/dist/native/icons/index.d.ts +1 -0
  29. package/dist/native/icons/index.native.d.ts +1 -0
  30. package/dist/native/icons/native/Warning.native.d.ts +2 -0
  31. package/dist/native/icons/toast/Error.native.d.ts +1 -0
  32. package/dist/native/icons/toast/Info.native.d.ts +1 -0
  33. package/dist/native/icons/toast/Success.native.d.ts +1 -0
  34. package/dist/native/icons/toast/Warning.native.d.ts +1 -0
  35. package/dist/native/index.native.d.ts +16 -0
  36. package/dist/native/lib/ui/command.d.ts +1 -1
  37. package/package.json +17 -2
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ export type BadgeProps = {
4
+ icon?: React.ReactNode;
5
+ children: React.ReactNode;
6
+ backgroundColor?: string;
7
+ textColor?: string;
8
+ style?: StyleProp<ViewStyle>;
9
+ };
10
+ export default function Badge({ icon, children, backgroundColor, textColor, style, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { default as React } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
2
3
  type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'destructive' | 'destructiveSubtle';
3
4
  export type ButtonProps = {
4
5
  variant?: ButtonVariant;
@@ -7,6 +8,7 @@ export type ButtonProps = {
7
8
  disabled?: boolean;
8
9
  children?: React.ReactNode;
9
10
  onPress?: () => void;
11
+ style?: StyleProp<ViewStyle>;
10
12
  };
11
- export default function Button({ variant, fullWidth, children, loading, disabled, onPress, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export default function Button({ variant, fullWidth, children, loading, disabled, onPress, style, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
12
14
  export {};
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ export type CardVariant = 'outlined' | 'tinted' | 'elevated';
4
+ export type CardProps = {
5
+ variant?: CardVariant;
6
+ radius?: number;
7
+ padding?: number;
8
+ backgroundColor?: string;
9
+ style?: StyleProp<ViewStyle>;
10
+ children: React.ReactNode;
11
+ };
12
+ export default function Card({ variant, radius, padding, backgroundColor, style, children, }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ViewProps } from 'react-native';
2
+ export default function Divider({ style, ...props }: ViewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ export type EmptyStateProps = {
3
+ icon?: React.ReactNode;
4
+ title: string;
5
+ description?: string;
6
+ actionLabel?: string;
7
+ onAction?: () => void;
8
+ };
9
+ export default function EmptyState({ icon, title, description, actionLabel, onAction }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,26 @@
1
+ import { default as React } from 'react';
2
+ import { TextInput } from 'react-native-paper';
3
+ type PaperTextInputProps = React.ComponentProps<typeof TextInput>;
1
4
  export type InputProps = {
2
5
  label: string;
3
6
  value?: string;
4
7
  onChange: (value: string) => void;
8
+ onFocus?: () => void;
9
+ onBlur?: () => void;
5
10
  error?: string;
6
11
  helperText?: string;
7
12
  placeholder?: string;
8
13
  secureTextEntry?: boolean;
9
- keyboardType?: 'default' | 'email-address' | 'numeric' | 'phone-pad';
14
+ keyboardType?: 'default' | 'email-address' | 'numeric' | 'number-pad' | 'phone-pad';
10
15
  autoCapitalize?: 'none' | 'sentences' | 'words' | 'characters';
16
+ autoComplete?: PaperTextInputProps['autoComplete'];
17
+ autoCorrect?: boolean;
18
+ textContentType?: PaperTextInputProps['textContentType'];
11
19
  editable?: boolean;
12
20
  multiline?: boolean;
13
21
  numberOfLines?: number;
14
22
  currency?: boolean;
23
+ prefix?: string;
15
24
  };
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;
25
+ export default function Input({ label, value, onChange, onFocus, onBlur, error, helperText, placeholder, secureTextEntry, keyboardType, autoCapitalize, autoComplete, autoCorrect, textContentType, editable, multiline, numberOfLines, currency, prefix, }: InputProps): import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,69 @@
1
+ import { ReactNode } from 'react';
2
+ export interface IdentificationField {
3
+ label: string;
4
+ value: string;
5
+ }
6
+ export interface LetterProps {
7
+ senderAddressSlim?: string;
8
+ vendorAddress?: string;
9
+ senderAddress?: string;
10
+ identificationFields?: IdentificationField[];
11
+ date?: string;
12
+ letterSubject?: string;
13
+ letterText?: string;
14
+ userFullName?: string;
15
+ scale?: number;
16
+ children?: ReactNode;
17
+ }
18
+ export interface SenderAddressSumProps {
19
+ address?: string;
20
+ children?: ReactNode;
21
+ scale?: number;
22
+ }
23
+ export interface RecipientProps {
24
+ address?: string;
25
+ children?: ReactNode;
26
+ scale?: number;
27
+ }
28
+ export interface SenderAddressProps {
29
+ address?: string;
30
+ children?: ReactNode;
31
+ scale?: number;
32
+ }
33
+ export interface SenderDetailsProps {
34
+ identificationFields?: IdentificationField[];
35
+ children?: ReactNode;
36
+ scale?: number;
37
+ }
38
+ export interface DateProps {
39
+ date?: string;
40
+ children?: ReactNode;
41
+ scale?: number;
42
+ }
43
+ export interface ContextProps {
44
+ letterSubject?: string;
45
+ letterText?: string;
46
+ userFullName?: string;
47
+ scale?: number;
48
+ children?: ReactNode;
49
+ }
50
+ export interface DateLabelProps {
51
+ children?: ReactNode;
52
+ }
53
+ export interface ToWhomItMayConcernProps {
54
+ children?: ReactNode;
55
+ }
56
+ export interface YoursSincerelyProps {
57
+ children?: ReactNode;
58
+ }
59
+ export declare function DateLabel({ children }: DateLabelProps): import("react/jsx-runtime").JSX.Element;
60
+ export declare function ToWhomItMayConcern({ children }: ToWhomItMayConcernProps): import("react/jsx-runtime").JSX.Element;
61
+ export declare function YoursSincerely({ children }: YoursSincerelyProps): import("react/jsx-runtime").JSX.Element;
62
+ export declare function SenderAddressSum({ address, children, scale }: SenderAddressSumProps): import("react/jsx-runtime").JSX.Element | null;
63
+ export declare function Recipient({ address, children, scale }: RecipientProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare function SenderAddress({ address, children, scale }: SenderAddressProps): import("react/jsx-runtime").JSX.Element;
65
+ export declare function SenderDetails({ identificationFields, children, scale }: SenderDetailsProps): import("react/jsx-runtime").JSX.Element | null;
66
+ export declare function Date({ date, children, scale }: DateProps): import("react/jsx-runtime").JSX.Element | null;
67
+ export declare function Context({ letterSubject, letterText, userFullName, children, scale }: ContextProps): import("react/jsx-runtime").JSX.Element;
68
+ declare function Letter({ senderAddressSlim, vendorAddress, senderAddress, identificationFields, date, letterSubject, letterText, userFullName, scale, children, }: LetterProps): import("react/jsx-runtime").JSX.Element;
69
+ export default Letter;
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export type MenuItemProps = {
3
+ label: string;
4
+ onPress: () => void;
5
+ icon?: React.ReactNode;
6
+ destructive?: boolean;
7
+ loading?: boolean;
8
+ disabled?: boolean;
9
+ };
10
+ export default function MenuItem({ label, onPress, icon, destructive, loading, disabled, }: MenuItemProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ export type RadioCardProps = {
3
+ selected: boolean;
4
+ onSelect: () => void;
5
+ icon?: React.ReactNode;
6
+ title: string;
7
+ description?: string;
8
+ trailing?: React.ReactNode;
9
+ disabled?: boolean;
10
+ };
11
+ export default function RadioCard({ selected, onSelect, icon, title, description, trailing, disabled, }: RadioCardProps): import("react/jsx-runtime").JSX.Element;
@@ -2,9 +2,13 @@ import { default as React } from 'react';
2
2
  export type SheetProps = {
3
3
  open: boolean;
4
4
  onClose: () => void;
5
+ onDismiss?: () => void;
5
6
  onGoBack?: () => void;
6
7
  title?: string;
7
8
  children: React.ReactNode;
8
9
  footer?: React.ReactNode;
10
+ background?: React.ReactNode;
11
+ headerBackgroundColor?: string;
12
+ closeDisabled?: boolean;
9
13
  };
10
- export default function Sheet({ open, onClose, onGoBack, title, children, footer }: SheetProps): import("react/jsx-runtime").JSX.Element;
14
+ export default function Sheet({ open, onClose, onDismiss, onGoBack, title, children, footer, background, headerBackgroundColor, closeDisabled, }: SheetProps): import("react/jsx-runtime").JSX.Element;
@@ -3,7 +3,8 @@ type SpinnerProps = {
3
3
  size?: number;
4
4
  color?: string;
5
5
  trackColor?: string;
6
+ duration?: number;
6
7
  style?: StyleProp<ViewStyle>;
7
8
  };
8
- export default function Spinner({ size, color, trackColor, style, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
9
+ export default function Spinner({ size, color, trackColor, duration, style, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export type StepState = 'pending' | 'loading' | 'complete' | 'error';
3
+ export type StepProgressStep = {
4
+ label: ReactNode;
5
+ state: StepState;
6
+ mode?: 'determinate' | 'indeterminate';
7
+ durationMs?: number;
8
+ };
9
+ export type StepProgressProps = {
10
+ steps: StepProgressStep[];
11
+ };
12
+ export default function StepProgress({ steps }: StepProgressProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Toaster(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import { IconProps } from '../lib/types';
2
+ export default function Warning({ color, size, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -42,4 +42,5 @@ export { default as Sparkles } from './Sparkles';
42
42
  export { default as Summary } from './Summary';
43
43
  export { default as User } from './User';
44
44
  export { default as UserCircle } from './UserCircle';
45
+ export { default as Warning } from './Warning';
45
46
  export { default as Window } from './Window';
@@ -42,4 +42,5 @@ export { default as Sparkles } from './native/Sparkles.native';
42
42
  export { default as Summary } from './native/Summary.native';
43
43
  export { default as User } from './native/User.native';
44
44
  export { default as UserCircle } from './native/UserCircle.native';
45
+ export { default as Warning } from './native/Warning.native';
45
46
  export { default as Window } from './native/Window.native';
@@ -0,0 +1,2 @@
1
+ import { IconProps } from '../../lib/native-types';
2
+ export default function Warning({ color, size, ...props }: IconProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Error(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Info(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Success(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function Warning(): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,22 @@
1
+ export { default as Badge } from './components/Badge/Badge.native';
2
+ export type { BadgeProps } from './components/Badge/Badge.native';
1
3
  export { default as Button } from './components/Button/Button.native';
2
4
  export type { ButtonProps } from './components/Button/Button.native';
5
+ export { default as Card } from './components/Card/Card.native';
6
+ export type { CardProps, CardVariant } from './components/Card/Card.native';
7
+ export { default as Divider } from './components/Divider/Divider.native';
8
+ export { default as EmptyState } from './components/EmptyState/EmptyState.native';
9
+ export type { EmptyStateProps } from './components/EmptyState/EmptyState.native';
3
10
  export { default as IconButton } from './components/IconButton/IconButton.native';
4
11
  export type { IconButtonProps } from './components/IconButton/IconButton.native';
5
12
  export { default as Input } from './components/Input/Input.native';
6
13
  export type { InputProps } from './components/Input/Input.native';
14
+ export { default as Letter } from './components/Letter/Letter.native';
15
+ export type { IdentificationField, LetterProps } from './components/Letter/Letter.native';
16
+ export { default as MenuItem } from './components/MenuItem/MenuItem.native';
17
+ export type { MenuItemProps } from './components/MenuItem/MenuItem.native';
18
+ export { default as RadioCard } from './components/RadioCard/RadioCard.native';
19
+ export type { RadioCardProps } from './components/RadioCard/RadioCard.native';
7
20
  export { default as Select } from './components/Select/Select.native';
8
21
  export type { SelectProps, SelectOption } from './components/Select/Select.native';
9
22
  export { default as Sheet } from './components/Sheet/Sheet.native';
@@ -11,6 +24,9 @@ export type { SheetProps } from './components/Sheet/Sheet.native';
11
24
  export { default as Text } from './components/Text/Text.native';
12
25
  export type { TextProps, TextVariant } from './components/Text/Text.native';
13
26
  export { default as Spinner } from './components/Spinner/Spinner.native';
27
+ export { default as StepProgress } from './components/StepProgress/StepProgress.native';
28
+ export type { StepProgressProps, StepProgressStep, StepState } from './components/StepProgress/StepProgress.native';
29
+ export { default as Toaster } from './components/Toaster/Toaster.native';
14
30
  export { colors, typography } from './lib/theme';
15
31
  export { useIsMobile } from './hooks/mobile';
16
32
  export { useToast } from './hooks/toast';
@@ -22,7 +22,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
22
22
  ref?: React.Ref<HTMLInputElement>;
23
23
  } & {
24
24
  asChild?: boolean;
25
- }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
25
+ }, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "onChange" | "value"> & {
26
26
  value?: string;
27
27
  onValueChange?: (search: string) => void;
28
28
  } & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rechtspilot-ui",
3
- "version": "1.4.2",
3
+ "version": "1.6.0",
4
4
  "type": "module",
5
5
  "description": "Rechtspilot UI Library",
6
6
  "main": "dist/index.cjs",
@@ -52,7 +52,10 @@
52
52
  "peerDependencies": {
53
53
  "react": "^18.0.0 || ^19.0.0",
54
54
  "react-dom": "^18.0.0 ||^19.0.0",
55
- "react-native": ">=0.60.0",
55
+ "react-native": ">=0.71.0",
56
+ "react-native-keyboard-controller": ">=1.21.0",
57
+ "react-native-paper": ">=5.1.0",
58
+ "react-native-reanimated": ">=3.0.0",
56
59
  "react-native-safe-area-context": ">=4.0.0",
57
60
  "react-native-svg": ">=15",
58
61
  "styled-components": "^6.1.19",
@@ -65,6 +68,15 @@
65
68
  "react-native": {
66
69
  "optional": true
67
70
  },
71
+ "react-native-keyboard-controller": {
72
+ "optional": true
73
+ },
74
+ "react-native-paper": {
75
+ "optional": true
76
+ },
77
+ "react-native-reanimated": {
78
+ "optional": true
79
+ },
68
80
  "react-native-safe-area-context": {
69
81
  "optional": true
70
82
  },
@@ -139,6 +151,9 @@
139
151
  "prettier": "^3.8.3",
140
152
  "react": "~19.2.5",
141
153
  "react-dom": "^19.2.5",
154
+ "react-native-keyboard-controller": "^1.22.1",
155
+ "react-native-paper": "^5.15.3",
156
+ "react-native-reanimated": "^4.5.2",
142
157
  "react-native-svg": "^15.15.5",
143
158
  "react-native-web": "^0.21.2",
144
159
  "react-phone-number-input": "^3.4.16",