@12min/ds 0.1.0 → 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.
@@ -1,2 +1,118 @@
1
- export { Colors, colors } from './tokens/index.js';
2
- export { Theme, darkTheme, lightTheme } from './index.web.js';
1
+ export { Colors, Typography, colors, typography } from './tokens/index.js';
2
+ import { T as Theme } from './darkTheme-gaad4-zD.js';
3
+ export { d as darkTheme, l as lightTheme } from './darkTheme-gaad4-zD.js';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { PressableProps, StyleProp, ViewStyle } from 'react-native';
6
+
7
+ type DSThemeCtx = {
8
+ theme: Theme;
9
+ colorScheme: 'light' | 'dark';
10
+ };
11
+ declare function DSThemeProvider({ colorScheme, children, }: {
12
+ colorScheme?: 'light' | 'dark';
13
+ children: React.ReactNode;
14
+ }): react_jsx_runtime.JSX.Element;
15
+ declare function useTheme(): DSThemeCtx;
16
+
17
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost';
18
+ type ButtonSize = 'sm' | 'md' | 'lg';
19
+ type ButtonProps = {
20
+ variant?: ButtonVariant;
21
+ size?: ButtonSize;
22
+ disabled?: boolean;
23
+ children: React.ReactNode;
24
+ onPress?: PressableProps['onPress'];
25
+ };
26
+ declare function Button({ variant, size, disabled, children, onPress }: ButtonProps): react_jsx_runtime.JSX.Element;
27
+
28
+ type ChipProps = {
29
+ children: React.ReactNode;
30
+ checked?: boolean;
31
+ onPress?: () => void;
32
+ style?: StyleProp<ViewStyle>;
33
+ };
34
+ declare function Chip({ children, checked, onPress, style }: ChipProps): react_jsx_runtime.JSX.Element;
35
+
36
+ type AlertVariant = 'success' | 'info';
37
+ type AlertProps = {
38
+ variant?: AlertVariant;
39
+ title: string;
40
+ description?: string;
41
+ };
42
+ declare function Alert({ variant, title, description }: AlertProps): react_jsx_runtime.JSX.Element;
43
+
44
+ type ProgressBarProps = {
45
+ value: number;
46
+ };
47
+ declare function ProgressBar({ value }: ProgressBarProps): react_jsx_runtime.JSX.Element;
48
+
49
+ type InputState = 'default' | 'filled' | 'error' | 'disabled';
50
+ type InputProps = {
51
+ value?: string;
52
+ placeholder?: string;
53
+ state?: InputState;
54
+ leadingIcon?: React.ReactNode;
55
+ onChangeText?: (text: string) => void;
56
+ onFocus?: () => void;
57
+ onBlur?: () => void;
58
+ style?: StyleProp<ViewStyle>;
59
+ };
60
+ declare function Input({ value, placeholder, state, leadingIcon, onChangeText, onFocus, onBlur, style }: InputProps): react_jsx_runtime.JSX.Element;
61
+
62
+ type CheckboxProps = {
63
+ checked?: boolean;
64
+ onChange?: (checked: boolean) => void;
65
+ disabled?: boolean;
66
+ };
67
+ declare function Checkbox({ checked, onChange, disabled }: CheckboxProps): react_jsx_runtime.JSX.Element;
68
+
69
+ type RadioItemProps = {
70
+ label: string;
71
+ description?: string;
72
+ selected?: boolean;
73
+ icon?: React.ReactNode;
74
+ onPress?: () => void;
75
+ style?: StyleProp<ViewStyle>;
76
+ };
77
+ declare function RadioItem({ label, description, selected, icon, onPress, style }: RadioItemProps): react_jsx_runtime.JSX.Element;
78
+
79
+ type RadioGroupProps = {
80
+ children: React.ReactNode;
81
+ label?: string;
82
+ style?: StyleProp<ViewStyle>;
83
+ };
84
+ declare function RadioGroup({ children, label, style }: RadioGroupProps): react_jsx_runtime.JSX.Element;
85
+
86
+ type ActionItemProps = {
87
+ label: string;
88
+ description?: string;
89
+ selected?: boolean;
90
+ icon?: React.ReactNode;
91
+ onPress?: () => void;
92
+ style?: StyleProp<ViewStyle>;
93
+ };
94
+ declare function ActionItem({ label, description, selected, icon, onPress, style }: ActionItemProps): react_jsx_runtime.JSX.Element;
95
+
96
+ type Step = {
97
+ label: string;
98
+ };
99
+ type StepperProps = {
100
+ steps: Step[];
101
+ currentStep: number;
102
+ style?: StyleProp<ViewStyle>;
103
+ };
104
+ declare function Stepper({ steps, currentStep, style }: StepperProps): react_jsx_runtime.JSX.Element;
105
+
106
+ type RatingScaleOption = {
107
+ emoji: string;
108
+ label: string;
109
+ };
110
+ type RatingScaleProps = {
111
+ value?: number | null;
112
+ onChange?: (value: number) => void;
113
+ options?: ReadonlyArray<RatingScaleOption>;
114
+ style?: StyleProp<ViewStyle>;
115
+ };
116
+ declare function RatingScale({ value, onChange, options, style }: RatingScaleProps): react_jsx_runtime.JSX.Element;
117
+
118
+ export { ActionItem, Alert, Button, Checkbox, Chip, DSThemeProvider, Input, ProgressBar, RadioGroup, RadioItem, RatingScale, Stepper, Theme, useTheme };