@sibipro/sprinkles-native 0.1.8
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/README.md +101 -0
- package/dist/components/Avatar.d.ts +9 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +27 -0
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Badge.js +26 -0
- package/dist/components/Badge.js.map +1 -0
- package/dist/components/Banner.d.ts +8 -0
- package/dist/components/Banner.d.ts.map +1 -0
- package/dist/components/Banner.js +13 -0
- package/dist/components/Banner.js.map +1 -0
- package/dist/components/Button.d.ts +12 -0
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/components/Button.js +43 -0
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Card.d.ts +8 -0
- package/dist/components/Card.d.ts.map +1 -0
- package/dist/components/Card.js +11 -0
- package/dist/components/Card.js.map +1 -0
- package/dist/components/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +10 -0
- package/dist/components/Checkbox.js.map +1 -0
- package/dist/components/Chip.d.ts +8 -0
- package/dist/components/Chip.d.ts.map +1 -0
- package/dist/components/Chip.js +8 -0
- package/dist/components/Chip.js.map +1 -0
- package/dist/components/EmptyState.d.ts +11 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/components/EmptyState.js +8 -0
- package/dist/components/EmptyState.js.map +1 -0
- package/dist/components/Input.d.ts +25 -0
- package/dist/components/Input.d.ts.map +1 -0
- package/dist/components/Input.js +28 -0
- package/dist/components/Input.js.map +1 -0
- package/dist/components/Label.d.ts +6 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Label.js +7 -0
- package/dist/components/Label.js.map +1 -0
- package/dist/components/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar.d.ts.map +1 -0
- package/dist/components/ProgressBar.js +8 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/Separator.d.ts +7 -0
- package/dist/components/Separator.d.ts.map +1 -0
- package/dist/components/Separator.js +7 -0
- package/dist/components/Separator.js.map +1 -0
- package/dist/components/Skeleton.d.ts +6 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton.js +25 -0
- package/dist/components/Skeleton.js.map +1 -0
- package/dist/components/Switch.d.ts +7 -0
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/components/Switch.js +10 -0
- package/dist/components/Switch.js.map +1 -0
- package/dist/components/Text.d.ts +12 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/Text.js +27 -0
- package/dist/components/Text.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/theming/color-palettes.d.ts +82 -0
- package/dist/theming/color-palettes.d.ts.map +1 -0
- package/dist/theming/color-palettes.js +82 -0
- package/dist/theming/color-palettes.js.map +1 -0
- package/dist/theming/types.d.ts +81 -0
- package/dist/theming/types.d.ts.map +1 -0
- package/dist/theming/types.js +2 -0
- package/dist/theming/types.js.map +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/cn.js +6 -0
- package/dist/utils/cn.js.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +51 -0
- package/src/components/Avatar.tsx +58 -0
- package/src/components/Badge.tsx +70 -0
- package/src/components/Banner.tsx +34 -0
- package/src/components/Button.tsx +96 -0
- package/src/components/Card.tsx +28 -0
- package/src/components/Checkbox.tsx +43 -0
- package/src/components/Chip.tsx +38 -0
- package/src/components/EmptyState.tsx +41 -0
- package/src/components/Input.tsx +123 -0
- package/src/components/Label.tsx +16 -0
- package/src/components/ProgressBar.tsx +32 -0
- package/src/components/Separator.tsx +25 -0
- package/src/components/Skeleton.tsx +38 -0
- package/src/components/Switch.tsx +32 -0
- package/src/components/Text.tsx +57 -0
- package/src/index.ts +52 -0
- package/src/styles/global.css +245 -0
- package/src/theming/color-palettes.ts +81 -0
- package/src/theming/types.ts +82 -0
- package/src/types/react-native.d.ts +31 -0
- package/src/utils/cn.ts +6 -0
- package/src/utils/index.ts +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# @sibipro/sprinkles-native
|
|
2
|
+
|
|
3
|
+
A React Native component library with Tailwind-style theming via [Uniwind](https://github.com/nickshanks347/uniwind).
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @sibipro/sprinkles-native
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Peer dependencies: `react >= 18`, `react-native >= 0.74`, and optionally `uniwind >= 1.0.0`.
|
|
12
|
+
|
|
13
|
+
## Components
|
|
14
|
+
|
|
15
|
+
### Layout & Containers
|
|
16
|
+
|
|
17
|
+
- **Card** — `variant: "default" | "outline"`
|
|
18
|
+
- **Banner** — `variant: "info" | "warn" | "danger" | "success"`
|
|
19
|
+
- **Separator** — horizontal or vertical divider
|
|
20
|
+
- **EmptyState** — centered placeholder with title, description, icon, and action slot
|
|
21
|
+
|
|
22
|
+
### Text & Typography
|
|
23
|
+
|
|
24
|
+
- **Text** — `variant: "body" | "caption" | "label" | "heading"`, `size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl"`, `weight: "normal" | "medium" | "semibold" | "bold"`
|
|
25
|
+
|
|
26
|
+
### Form Controls
|
|
27
|
+
|
|
28
|
+
- **Input** — `variant: "default" | "search" | "ghost"`, `girth: "sm" | "md" | "lg"`
|
|
29
|
+
- **InputWithExtras** — Input with leading/trailing adornments
|
|
30
|
+
- **InputWithLabel** — Input with an attached label
|
|
31
|
+
- **Checkbox** — custom checkbox with label and disabled state
|
|
32
|
+
- **Switch** — toggle with `checked` / `onCheckedChange`
|
|
33
|
+
- **Label** — semantic label wrapper
|
|
34
|
+
|
|
35
|
+
### Buttons & Actions
|
|
36
|
+
|
|
37
|
+
- **Button** — `variant: "primary" | "secondary" | "tertiary" | "tertiary-brand" | "tertiary-danger" | "danger" | "ghost" | "link"`, `size: "sm" | "md" | "lg"`
|
|
38
|
+
- **Chip** — dismissible chip with optional `onDismiss`
|
|
39
|
+
|
|
40
|
+
### Data Display
|
|
41
|
+
|
|
42
|
+
- **Badge** — `variant: "default" | "brand" | "danger" | "success" | "warn" | "info" | "outline"`
|
|
43
|
+
- **Avatar** — auto-generates initials from `name`, `size: "sm" | "md" | "lg" | "xl"`
|
|
44
|
+
- **ProgressBar** — `value` / `max` progress indicator
|
|
45
|
+
- **Skeleton** — animated loading placeholder
|
|
46
|
+
|
|
47
|
+
## Usage
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { Button, Card, Text, Badge } from "@sibipro/sprinkles-native"
|
|
51
|
+
|
|
52
|
+
const Example = () => (
|
|
53
|
+
<Card variant="outline">
|
|
54
|
+
<Text variant="heading" size="lg">Order #1234</Text>
|
|
55
|
+
<Badge variant="success">Delivered</Badge>
|
|
56
|
+
<Button variant="primary" size="md" onPress={() => {}}>
|
|
57
|
+
View Details
|
|
58
|
+
</Button>
|
|
59
|
+
</Card>
|
|
60
|
+
)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
All components accept a `className` prop for Tailwind-style overrides (requires Uniwind):
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
<Button className="mt-4 w-full" variant="primary">Submit</Button>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Theming
|
|
70
|
+
|
|
71
|
+
Import the global stylesheet in your app entry:
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import "@sibipro/sprinkles-native/styles.css"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
This provides color tokens, font definitions, and light/dark mode support via CSS custom properties.
|
|
78
|
+
|
|
79
|
+
### Color Palettes
|
|
80
|
+
|
|
81
|
+
| Palette | Usage |
|
|
82
|
+
|-----------|--------------------------------|
|
|
83
|
+
| Neutral | Backgrounds, borders, text |
|
|
84
|
+
| Purple | Brand / primary actions |
|
|
85
|
+
| Emerald | Success states |
|
|
86
|
+
| Amber | Warnings |
|
|
87
|
+
| Blue | Informational |
|
|
88
|
+
| Magenta | Danger / destructive actions |
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pnpm install
|
|
94
|
+
pnpm build # compile TypeScript to dist/
|
|
95
|
+
pnpm test # type-check with tsc --noEmit
|
|
96
|
+
pnpm release # bump patch, tag, and push
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Kitchen Sink
|
|
100
|
+
|
|
101
|
+
An Expo app lives in `kitchen-sink/` for previewing components during development.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export interface AvatarProps extends ViewProps {
|
|
4
|
+
name: string;
|
|
5
|
+
size?: AvatarSize;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Avatar({ name, size, className, ...props }: AvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAsBnD,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,IAAW,EACX,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,2CAmBb"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
const sizeClasses = {
|
|
6
|
+
sm: 'h-8 w-8',
|
|
7
|
+
md: 'h-10 w-10',
|
|
8
|
+
lg: 'h-12 w-12',
|
|
9
|
+
xl: 'h-16 w-16',
|
|
10
|
+
};
|
|
11
|
+
const textSizeClasses = {
|
|
12
|
+
sm: 'text-xs',
|
|
13
|
+
md: 'text-sm',
|
|
14
|
+
lg: 'text-base',
|
|
15
|
+
xl: 'text-xl',
|
|
16
|
+
};
|
|
17
|
+
function getInitials(name) {
|
|
18
|
+
const parts = name.trim().split(/\s+/);
|
|
19
|
+
if (parts.length === 1)
|
|
20
|
+
return parts[0][0]?.toUpperCase() ?? '';
|
|
21
|
+
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
22
|
+
}
|
|
23
|
+
export function Avatar({ name, size = 'md', className, ...props }) {
|
|
24
|
+
const initials = getInitials(name);
|
|
25
|
+
return (_jsx(View, { className: cn('rounded-full bg-brand-100 items-center justify-center', sizeClasses[size], className), accessibilityRole: "image", accessibilityLabel: name, ...props, children: _jsx(Text, { weight: "semibold", className: cn('text-brand-700', textSizeClasses[size]), children: initials }) }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=Avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../src/components/Avatar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAA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C3E,QAAQ,GACJ,GACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ViewProps } from 'react-native';
|
|
3
|
+
export type BadgeVariant = 'default' | 'brand' | 'danger' | 'success' | 'warn' | 'info' | 'outline';
|
|
4
|
+
export interface BadgeProps extends ViewProps {
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
className?: string;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare function Badge({ variant, className, children, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,OAAO,GACP,QAAQ,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,SAAS,CAAC;AAsBd,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,KAAK,CAAC,EACpB,OAAmB,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,2CAwBZ"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
const variantClasses = {
|
|
6
|
+
default: 'bg-background-tertiary',
|
|
7
|
+
brand: 'bg-brand-50 dark:bg-brand-900',
|
|
8
|
+
danger: 'bg-danger-50 dark:bg-danger-900',
|
|
9
|
+
success: 'bg-success-50 dark:bg-success-900',
|
|
10
|
+
warn: 'bg-warn-50 dark:bg-warn-900',
|
|
11
|
+
info: 'bg-info-50 dark:bg-info-900',
|
|
12
|
+
outline: 'border border-border',
|
|
13
|
+
};
|
|
14
|
+
const textClasses = {
|
|
15
|
+
default: 'text-foreground',
|
|
16
|
+
brand: 'text-brand-700',
|
|
17
|
+
danger: 'text-danger-700',
|
|
18
|
+
success: 'text-success-700',
|
|
19
|
+
warn: 'text-warn-700',
|
|
20
|
+
info: 'text-info-700',
|
|
21
|
+
outline: 'text-foreground',
|
|
22
|
+
};
|
|
23
|
+
export function Badge({ variant = 'default', className, children, ...props }) {
|
|
24
|
+
return (_jsx(View, { className: cn('rounded-lg py-1.5 px-2.5 flex-row items-center gap-1.5', variantClasses[variant], className), ...props, children: typeof children === 'string' ? (_jsx(Text, { size: "xs", weight: "semibold", className: textClasses[variant], numberOfLines: 1, children: children })) : (children) }));
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.js","sourceRoot":"","sources":["../../src/components/Badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAW9B,MAAM,cAAc,GAAiC;IACnD,OAAO,EAAE,wBAAwB;IACjC,KAAK,EAAE,+BAA+B;IACtC,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE,mCAAmC;IAC5C,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,6BAA6B;IACnC,OAAO,EAAE,sBAAsB;CAChC,CAAC;AAEF,MAAM,WAAW,GAAiC;IAChD,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE,iBAAiB;IACzB,OAAO,EAAE,kBAAkB;IAC3B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,iBAAiB;CAC3B,CAAC;AAQF,MAAM,UAAU,KAAK,CAAC,EACpB,OAAO,GAAG,SAAS,EACnB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACG;IACX,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,wDAAwD,EACxD,cAAc,CAAC,OAAO,CAAC,EACvB,SAAS,CACV,KACG,KAAK,YAER,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC9B,KAAC,IAAI,IACH,IAAI,EAAC,IAAI,EACT,MAAM,EAAC,UAAU,EACjB,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,EAC/B,aAAa,EAAE,CAAC,YAEf,QAAQ,GACJ,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export type BannerVariant = 'info' | 'warn' | 'danger' | 'success';
|
|
3
|
+
export interface BannerProps extends ViewProps {
|
|
4
|
+
variant?: BannerVariant;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Banner({ variant, className, ...props }: BannerProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/components/Banner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AASnE,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC5C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,WAAW,2CAWb"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
const variantClasses = {
|
|
5
|
+
info: 'bg-info-50 dark:bg-info-900',
|
|
6
|
+
warn: 'bg-warn-50 dark:bg-warn-900',
|
|
7
|
+
danger: 'bg-danger-50 dark:bg-danger-900',
|
|
8
|
+
success: 'bg-success-50 dark:bg-success-900',
|
|
9
|
+
};
|
|
10
|
+
export function Banner({ variant = 'info', className, ...props }) {
|
|
11
|
+
return (_jsx(View, { className: cn('rounded-2xl p-4 flex-row items-start gap-2.5', variantClasses[variant], className), ...props }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=Banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.js","sourceRoot":"","sources":["../../src/components/Banner.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAIjC,MAAM,cAAc,GAAkC;IACpD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,6BAA6B;IACnC,MAAM,EAAE,iCAAiC;IACzC,OAAO,EAAE,mCAAmC;CAC7C,CAAC;AAOF,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,GAAG,MAAM,EAChB,SAAS,EACT,GAAG,KAAK,EACI;IACZ,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,8CAA8C,EAC9C,cAAc,CAAC,OAAO,CAAC,EACvB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type PressableProps } from 'react-native';
|
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'tertiary-brand' | 'tertiary-danger' | 'danger' | 'ghost' | 'link';
|
|
4
|
+
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface ButtonProps extends Omit<PressableProps, 'children'> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
className?: string;
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function Button({ variant, size, className, disabled, children, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAI9D,MAAM,MAAM,aAAa,GACrB,SAAS,GACT,WAAW,GACX,UAAU,GACV,gBAAgB,GAChB,iBAAiB,GACjB,QAAQ,GACR,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAyC5C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACnE,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,MAAM,CAAC,EACrB,OAAqB,EACrB,IAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,WAAW,2CAyBb"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Pressable } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
const variantClasses = {
|
|
6
|
+
primary: 'bg-button-primary',
|
|
7
|
+
secondary: 'bg-button-secondary border border-border',
|
|
8
|
+
tertiary: 'bg-transparent',
|
|
9
|
+
'tertiary-brand': 'bg-transparent',
|
|
10
|
+
'tertiary-danger': 'bg-transparent',
|
|
11
|
+
danger: 'bg-danger-500',
|
|
12
|
+
ghost: 'bg-transparent',
|
|
13
|
+
link: 'bg-transparent',
|
|
14
|
+
};
|
|
15
|
+
const pressedClasses = {
|
|
16
|
+
primary: 'bg-button-primary-hover',
|
|
17
|
+
secondary: 'bg-button-secondary-hover',
|
|
18
|
+
tertiary: 'bg-button-tertiary-hover',
|
|
19
|
+
'tertiary-brand': 'bg-brand-25',
|
|
20
|
+
'tertiary-danger': 'bg-danger-25',
|
|
21
|
+
danger: 'bg-danger-600',
|
|
22
|
+
ghost: 'bg-accent',
|
|
23
|
+
link: 'opacity-70',
|
|
24
|
+
};
|
|
25
|
+
const textClasses = {
|
|
26
|
+
primary: 'text-button-primary-foreground',
|
|
27
|
+
secondary: 'text-button-secondary-foreground',
|
|
28
|
+
tertiary: 'text-button-tertiary-foreground',
|
|
29
|
+
'tertiary-brand': 'text-brand-500',
|
|
30
|
+
'tertiary-danger': 'text-danger-500',
|
|
31
|
+
danger: 'text-white',
|
|
32
|
+
ghost: 'text-foreground',
|
|
33
|
+
link: 'text-brand-500 underline',
|
|
34
|
+
};
|
|
35
|
+
const sizeClasses = {
|
|
36
|
+
sm: 'h-8 px-3',
|
|
37
|
+
md: 'h-10 px-4',
|
|
38
|
+
lg: 'h-12 px-5',
|
|
39
|
+
};
|
|
40
|
+
export function Button({ variant = 'secondary', size = 'md', className, disabled, children, ...props }) {
|
|
41
|
+
return (_jsx(Pressable, { className: ({ pressed }) => cn('rounded-lg flex-row items-center justify-center gap-2', variantClasses[variant], sizeClasses[size], pressed && pressedClasses[variant], disabled && 'opacity-50', className), disabled: disabled, ...props, children: typeof children === 'string' ? (_jsx(Text, { size: "sm", weight: "bold", className: textClasses[variant], children: children })) : (children) }));
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAuB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAc9B,MAAM,cAAc,GAAkC;IACpD,OAAO,EAAE,mBAAmB;IAC5B,SAAS,EAAE,0CAA0C;IACrD,QAAQ,EAAE,gBAAgB;IAC1B,gBAAgB,EAAE,gBAAgB;IAClC,iBAAiB,EAAE,gBAAgB;IACnC,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,gBAAgB;IACvB,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF,MAAM,cAAc,GAAkC;IACpD,OAAO,EAAE,yBAAyB;IAClC,SAAS,EAAE,2BAA2B;IACtC,QAAQ,EAAE,0BAA0B;IACpC,gBAAgB,EAAE,aAAa;IAC/B,iBAAiB,EAAE,cAAc;IACjC,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,WAAW;IAClB,IAAI,EAAE,YAAY;CACnB,CAAC;AAEF,MAAM,WAAW,GAAkC;IACjD,OAAO,EAAE,gCAAgC;IACzC,SAAS,EAAE,kCAAkC;IAC7C,QAAQ,EAAE,iCAAiC;IAC3C,gBAAgB,EAAE,gBAAgB;IAClC,iBAAiB,EAAE,iBAAiB;IACpC,MAAM,EAAE,YAAY;IACpB,KAAK,EAAE,iBAAiB;IACxB,IAAI,EAAE,0BAA0B;CACjC,CAAC;AAEF,MAAM,WAAW,GAA+B;IAC9C,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,WAAW;IACf,EAAE,EAAE,WAAW;CAChB,CAAC;AASF,MAAM,UAAU,MAAM,CAAC,EACrB,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,IAAI,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,GAAG,KAAK,EACI;IACZ,OAAO,CACL,KAAC,SAAS,IACR,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CACzB,EAAE,CACA,uDAAuD,EACvD,cAAc,CAAC,OAAO,CAAC,EACvB,WAAW,CAAC,IAAI,CAAC,EACjB,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,EAClC,QAAQ,IAAI,YAAY,EACxB,SAAS,CACV,EAEH,QAAQ,EAAE,QAAQ,KACd,KAAK,YAER,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,CAC9B,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,SAAS,EAAE,WAAW,CAAC,OAAO,CAAC,YAC1D,QAAQ,GACJ,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,GACS,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export type CardVariant = 'default' | 'outline';
|
|
3
|
+
export interface CardProps extends ViewProps {
|
|
4
|
+
variant?: CardVariant;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Card({ variant, className, ...props }: CardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/components/Card.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAOhD,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,EACnB,OAAmB,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,SAAS,2CAOX"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
const variantClasses = {
|
|
5
|
+
default: 'bg-background shadow-md',
|
|
6
|
+
outline: 'bg-background border border-border',
|
|
7
|
+
};
|
|
8
|
+
export function Card({ variant = 'default', className, ...props }) {
|
|
9
|
+
return (_jsx(View, { className: cn('rounded-xl p-4', variantClasses[variant], className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../src/components/Card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAIjC,MAAM,cAAc,GAAgC;IAClD,OAAO,EAAE,yBAAyB;IAClC,OAAO,EAAE,oCAAoC;CAC9C,CAAC;AAOF,MAAM,UAAU,IAAI,CAAC,EACnB,OAAO,GAAG,SAAS,EACnB,SAAS,EACT,GAAG,KAAK,EACE;IACV,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,KAC/D,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface CheckboxProps {
|
|
2
|
+
checked?: boolean;
|
|
3
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Checkbox({ checked, onCheckedChange, disabled, label, className, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EACvB,OAAe,EACf,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE,aAAa,2CAuBf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Pressable, View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
export function Checkbox({ checked = false, onCheckedChange, disabled, label, className, }) {
|
|
6
|
+
return (_jsxs(Pressable, { onPress: () => !disabled && onCheckedChange?.(!checked), className: cn('flex-row items-center gap-2', disabled && 'opacity-50', className), accessibilityRole: "checkbox", accessibilityState: { checked, disabled }, children: [_jsx(View, { className: cn('h-5 w-5 rounded border items-center justify-center', checked
|
|
7
|
+
? 'bg-brand-500 border-brand-500'
|
|
8
|
+
: 'bg-background border-border'), children: checked && (_jsx(Text, { className: "text-white text-xs", children: "\u2713" })) }), label && _jsx(Text, { className: "text-foreground", children: label })] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAU9B,MAAM,UAAU,QAAQ,CAAC,EACvB,OAAO,GAAG,KAAK,EACf,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,GACK;IACd,OAAO,CACL,MAAC,SAAS,IACR,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,QAAQ,IAAI,eAAe,EAAE,CAAC,CAAC,OAAO,CAAC,EACvD,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,QAAQ,IAAI,YAAY,EAAE,SAAS,CAAC,EACjF,iBAAiB,EAAC,UAAU,EAC5B,kBAAkB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,aAEzC,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,oDAAoD,EACpD,OAAO;oBACL,CAAC,CAAC,+BAA+B;oBACjC,CAAC,CAAC,6BAA6B,CAClC,YAEA,OAAO,IAAI,CACV,KAAC,IAAI,IAAC,SAAS,EAAC,oBAAoB,uBAAS,CAC9C,GACI,EACN,KAAK,IAAI,KAAC,IAAI,IAAC,SAAS,EAAC,iBAAiB,YAAE,KAAK,GAAQ,IAChD,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export interface ChipProps extends ViewProps {
|
|
3
|
+
label: string;
|
|
4
|
+
onDismiss?: () => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function Chip({ label, onDismiss, className, ...props }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=Chip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI/D,MAAM,WAAW,SAAU,SAAQ,SAAS;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,2CA0BxE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Pressable } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
export function Chip({ label, onDismiss, className, ...props }) {
|
|
6
|
+
return (_jsxs(View, { className: cn('h-7 rounded-full bg-background-tertiary px-2.5 flex-row items-center gap-1', className), ...props, children: [_jsx(Text, { size: "sm", className: "text-foreground", children: label }), onDismiss && (_jsx(Pressable, { onPress: onDismiss, className: "ml-0.5", accessibilityRole: "button", accessibilityLabel: `Remove ${label}`, children: _jsx(Text, { size: "sm", className: "text-foreground-label", children: "\u2715" }) }))] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=Chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../src/components/Chip.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAkB,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAQ9B,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAa;IACvE,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,4EAA4E,EAC5E,SAAS,CACV,KACG,KAAK,aAET,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,iBAAiB,YACxC,KAAK,GACD,EACN,SAAS,IAAI,CACZ,KAAC,SAAS,IACR,OAAO,EAAE,SAAS,EAClB,SAAS,EAAC,QAAQ,EAClB,iBAAiB,EAAC,QAAQ,EAC1B,kBAAkB,EAAE,UAAU,KAAK,EAAE,YAErC,KAAC,IAAI,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,uBAAuB,uBAE1C,GACG,CACb,IACI,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ViewProps } from 'react-native';
|
|
3
|
+
export interface EmptyStateProps extends ViewProps {
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
action?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function EmptyState({ title, description, icon, action, className, ...props }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=EmptyState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../src/components/EmptyState.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAIpD,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,2CAoBjB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
import { Text } from './Text';
|
|
5
|
+
export function EmptyState({ title, description, icon, action, className, ...props }) {
|
|
6
|
+
return (_jsxs(View, { className: cn('items-center py-12 px-4 gap-3', className), ...props, children: [icon, _jsxs(View, { className: "items-center gap-1", children: [_jsx(Text, { variant: "heading", className: "text-2xl text-center", children: title }), description && (_jsx(Text, { className: "text-lg text-foreground text-center", children: description }))] }), action] }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../src/components/EmptyState.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAU9B,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,MAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,aAER,IAAI,EACL,MAAC,IAAI,IAAC,SAAS,EAAC,oBAAoB,aAClC,KAAC,IAAI,IAAC,OAAO,EAAC,SAAS,EAAC,SAAS,EAAC,sBAAsB,YACrD,KAAK,GACD,EACN,WAAW,IAAI,CACd,KAAC,IAAI,IAAC,SAAS,EAAC,qCAAqC,YAClD,WAAW,GACP,CACR,IACI,EACN,MAAM,IACF,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextInput, type TextInputProps } from 'react-native';
|
|
3
|
+
export type InputVariant = 'default' | 'search' | 'ghost';
|
|
4
|
+
export type InputGirth = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface InputProps extends TextInputProps {
|
|
6
|
+
variant?: InputVariant;
|
|
7
|
+
girth?: InputGirth;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<TextInput>>;
|
|
12
|
+
export interface InputWithExtrasProps extends InputProps {
|
|
13
|
+
before?: React.ReactNode;
|
|
14
|
+
after?: React.ReactNode;
|
|
15
|
+
containerClassName?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare const InputWithExtras: React.ForwardRefExoticComponent<InputWithExtrasProps & React.RefAttributes<TextInput>>;
|
|
18
|
+
export interface InputWithLabelProps extends InputProps {
|
|
19
|
+
label?: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
errorMessage?: string;
|
|
22
|
+
containerClassName?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const InputWithLabel: React.ForwardRefExoticComponent<InputWithLabelProps & React.RefAttributes<TextInput>>;
|
|
25
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EACL,SAAS,EAGT,KAAK,cAAc,EAEpB,MAAM,cAAc,CAAC;AAItB,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAc5C,MAAM,WAAW,UAAW,SAAQ,cAAc;IAChD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,8EAiBjB,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,UAAU;IACtD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,eAAe,wFA8B3B,CAAC;AAEF,MAAM,WAAW,mBAAoB,SAAQ,UAAU;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,uFAyB1B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useRef } from 'react';
|
|
3
|
+
import { TextInput, View, Pressable, } from 'react-native';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
import { Text } from './Text';
|
|
6
|
+
const variantClasses = {
|
|
7
|
+
default: 'border border-border bg-background',
|
|
8
|
+
search: 'border-0 bg-background-secondary',
|
|
9
|
+
ghost: 'border-0 bg-transparent',
|
|
10
|
+
};
|
|
11
|
+
const girthClasses = {
|
|
12
|
+
sm: 'h-8',
|
|
13
|
+
md: 'h-10',
|
|
14
|
+
lg: 'min-h-[48px] py-3',
|
|
15
|
+
};
|
|
16
|
+
export const Input = React.forwardRef(({ variant = 'default', girth = 'md', error, className, ...props }, ref) => {
|
|
17
|
+
return (_jsx(TextInput, { ref: ref, className: cn('w-full rounded-xl px-4 text-base text-foreground', variantClasses[variant], girthClasses[girth], error && 'border-2 border-danger-500', props.editable === false && 'opacity-60', className), ...props }));
|
|
18
|
+
});
|
|
19
|
+
export const InputWithExtras = React.forwardRef(({ before, after, containerClassName, variant = 'default', girth = 'md', error, className, ...props }, ref) => {
|
|
20
|
+
const innerRef = useRef(null);
|
|
21
|
+
const inputRef = ref ?? innerRef;
|
|
22
|
+
return (_jsx(Pressable, { onPress: () => inputRef.current?.focus(), children: _jsxs(View, { className: cn('flex-row items-center gap-1', variantClasses[variant], girthClasses[girth], 'rounded-xl px-4', error && 'border-2 border-danger-500', containerClassName), children: [before, _jsx(Input, { ref: inputRef, variant: "ghost", girth: girth, className: cn('flex-1 h-full px-0', className), ...props }), after] }) }));
|
|
23
|
+
});
|
|
24
|
+
export const InputWithLabel = React.forwardRef(({ label, description, errorMessage, containerClassName, error, ...props }, ref) => {
|
|
25
|
+
const hasError = error || !!errorMessage;
|
|
26
|
+
return (_jsxs(View, { className: cn('gap-1 w-full', containerClassName), children: [label && (_jsx(Text, { size: "sm", weight: "semibold", className: "text-foreground", children: label })), _jsx(Input, { ref: ref, error: hasError, ...props }), description && !errorMessage && (_jsx(Text, { size: "xs", className: "text-foreground-label", children: description })), errorMessage && (_jsx(Text, { size: "xs", weight: "semibold", className: "text-danger-700", children: errorMessage }))] }));
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAA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I,EAAC,IAAI,EAAC,MAAM,EAAC,UAAU,EAAC,SAAS,EAAC,iBAAiB,YAC1D,YAAY,GACR,CACR,IACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TextProps } from 'react-native';
|
|
2
|
+
export interface LabelProps extends TextProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Label({ className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/components/Label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAOxD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Text as RNText } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
export function Label({ className, ...props }) {
|
|
5
|
+
return (_jsx(RNText, { className: cn('text-sm font-semibold text-foreground', className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../src/components/Label.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,IAAI,MAAM,EAAkB,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAMjC,MAAM,UAAU,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAc;IACvD,OAAO,CACL,KAAC,MAAM,IACL,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,KAC7D,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export interface ProgressBarProps extends ViewProps {
|
|
3
|
+
value: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function ProgressBar({ value, max, className, ...props }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ProgressBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../src/components/ProgressBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,GAAS,EACT,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAgBlB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
export function ProgressBar({ value, max = 100, className, ...props }) {
|
|
5
|
+
const percentage = Math.min(100, Math.max(0, (value / max) * 100));
|
|
6
|
+
return (_jsx(View, { className: cn('h-2 w-full rounded-full bg-background-tertiary', className), accessibilityRole: "progressbar", accessibilityValue: { min: 0, max, now: value }, ...props, children: _jsx(View, { className: "h-full rounded-full bg-brand-500", style: { width: `${percentage}%` } }) }));
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../src/components/ProgressBar.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAQjC,MAAM,UAAU,WAAW,CAAC,EAC1B,KAAK,EACL,GAAG,GAAG,GAAG,EACT,SAAS,EACT,GAAG,KAAK,EACS;IACjB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;IAEnE,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CAAC,gDAAgD,EAAE,SAAS,CAAC,EAC1E,iBAAiB,EAAC,aAAa,EAC/B,kBAAkB,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAC3C,KAAK,YAET,KAAC,IAAI,IACH,SAAS,EAAC,kCAAkC,EAC5C,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,UAAU,GAAG,EAAE,GAClC,GACG,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export interface SeparatorProps extends ViewProps {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function Separator({ orientation, className, ...props }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=Separator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../src/components/Separator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,SAAS,CAAC,EACxB,WAA0B,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,2CAWhB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { cn } from '../utils/cn';
|
|
4
|
+
export function Separator({ orientation = 'horizontal', className, ...props }) {
|
|
5
|
+
return (_jsx(View, { className: cn('bg-border', orientation === 'horizontal' ? 'h-px w-full' : 'w-px h-full', className), ...props }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=Separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Separator.js","sourceRoot":"","sources":["../../src/components/Separator.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAOjC,MAAM,UAAU,SAAS,CAAC,EACxB,WAAW,GAAG,YAAY,EAC1B,SAAS,EACT,GAAG,KAAK,EACO;IACf,OAAO,CACL,KAAC,IAAI,IACH,SAAS,EAAE,EAAE,CACX,WAAW,EACX,WAAW,KAAK,YAAY,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,EAC5D,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
export interface SkeletonProps extends ViewProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Skeleton({ className, style, ...props }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../src/components/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CA6BrE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { Animated } from 'react-native';
|
|
4
|
+
import { cn } from '../utils/cn';
|
|
5
|
+
export function Skeleton({ className, style, ...props }) {
|
|
6
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const animation = Animated.loop(Animated.sequence([
|
|
9
|
+
Animated.timing(opacity, {
|
|
10
|
+
toValue: 0.5,
|
|
11
|
+
duration: 1000,
|
|
12
|
+
useNativeDriver: true,
|
|
13
|
+
}),
|
|
14
|
+
Animated.timing(opacity, {
|
|
15
|
+
toValue: 1,
|
|
16
|
+
duration: 1000,
|
|
17
|
+
useNativeDriver: true,
|
|
18
|
+
}),
|
|
19
|
+
]));
|
|
20
|
+
animation.start();
|
|
21
|
+
return () => animation.stop();
|
|
22
|
+
}, [opacity]);
|
|
23
|
+
return (_jsx(Animated.View, { className: cn('rounded-md bg-background-tertiary', className), style: [{ opacity }, style], ...props }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=Skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sourceRoot":"","sources":["../../src/components/Skeleton.tsx"],"names":[],"mappings":";A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