@retray-dev/ui-kit 13.0.0 → 13.2.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/CONSUMER.md +24 -9
- package/README.md +9 -10
- package/{COMPONENTS.md → SKILL.md} +296 -860
- package/dist/Accordion.d.mts +2 -0
- package/dist/Accordion.d.ts +2 -0
- package/dist/Accordion.js +1 -0
- package/dist/Accordion.mjs +1 -2
- package/dist/AlertBanner.mjs +0 -1
- package/dist/AppHeader.d.mts +5 -2
- package/dist/AppHeader.d.ts +5 -2
- package/dist/AppHeader.js +8 -4
- package/dist/AppHeader.mjs +1 -2
- package/dist/Avatar.mjs +0 -1
- package/dist/Badge.mjs +0 -1
- package/dist/Button.mjs +0 -1
- package/dist/ButtonGroup.mjs +0 -1
- package/dist/Card.mjs +0 -1
- package/dist/CategoryStrip.mjs +0 -1
- package/dist/Checkbox.d.mts +2 -1
- package/dist/Checkbox.d.ts +2 -1
- package/dist/Checkbox.js +3 -1
- package/dist/Checkbox.mjs +1 -2
- package/dist/Chip.mjs +0 -1
- package/dist/ConfirmDialog.d.mts +2 -1
- package/dist/ConfirmDialog.d.ts +2 -1
- package/dist/ConfirmDialog.js +26 -14
- package/dist/ConfirmDialog.mjs +1 -2
- package/dist/CurrencyDisplay.mjs +0 -1
- package/dist/CurrencyInput.mjs +0 -1
- package/dist/DetailRow.mjs +0 -1
- package/dist/EmptyState.mjs +0 -1
- package/dist/ErrorBoundary.mjs +0 -1
- package/dist/Form.mjs +0 -1
- package/dist/HolographicCard.mjs +0 -1
- package/dist/IconButton.mjs +0 -1
- package/dist/IconPicker.mjs +0 -1
- package/dist/ImageUpload.d.mts +1 -3
- package/dist/ImageUpload.d.ts +1 -3
- package/dist/ImageUpload.js +27 -26
- package/dist/ImageUpload.mjs +1 -2
- package/dist/ImageViewer.mjs +0 -1
- package/dist/Input.mjs +0 -1
- package/dist/LabelValue.mjs +0 -1
- package/dist/ListGroup.mjs +0 -1
- package/dist/ListItem.d.mts +2 -1
- package/dist/ListItem.d.ts +2 -1
- package/dist/ListItem.js +3 -1
- package/dist/ListItem.mjs +1 -2
- package/dist/MediaCard.mjs +0 -1
- package/dist/MenuGroup.mjs +0 -1
- package/dist/MenuItem.d.mts +2 -1
- package/dist/MenuItem.d.ts +2 -1
- package/dist/MenuItem.js +3 -1
- package/dist/MenuItem.mjs +1 -2
- package/dist/MonthPicker.mjs +0 -1
- package/dist/NumberStepper.d.mts +2 -1
- package/dist/NumberStepper.d.ts +2 -1
- package/dist/NumberStepper.js +4 -1
- package/dist/NumberStepper.mjs +1 -2
- package/dist/PagerDots.mjs +0 -1
- package/dist/Pressable.mjs +0 -1
- package/dist/PricingCard.mjs +0 -1
- package/dist/Progress.mjs +0 -1
- package/dist/RadioGroup.mjs +0 -1
- package/dist/RetrayProvider.mjs +0 -1
- package/dist/Select.d.mts +2 -1
- package/dist/Select.d.ts +2 -1
- package/dist/Select.js +3 -1
- package/dist/Select.mjs +1 -2
- package/dist/SelectableCard.mjs +0 -1
- package/dist/SelectableGrid.js +0 -1
- package/dist/SelectableGrid.mjs +1 -2
- package/dist/Separator.mjs +0 -1
- package/dist/Sheet.d.mts +1 -1
- package/dist/Sheet.d.ts +1 -1
- package/dist/Sheet.js +26 -13
- package/dist/Sheet.mjs +1 -2
- package/dist/SheetSelect.mjs +0 -1
- package/dist/Skeleton.mjs +0 -1
- package/dist/Slider.d.mts +2 -1
- package/dist/Slider.d.ts +2 -1
- package/dist/Slider.js +2 -0
- package/dist/Slider.mjs +1 -2
- package/dist/Spinner.mjs +0 -1
- package/dist/Stats.mjs +0 -1
- package/dist/Switch.d.mts +2 -1
- package/dist/Switch.d.ts +2 -1
- package/dist/Switch.js +2 -1
- package/dist/Switch.mjs +1 -2
- package/dist/TabBar.mjs +0 -1
- package/dist/Tabs.mjs +0 -1
- package/dist/Text.mjs +0 -1
- package/dist/Textarea.mjs +0 -1
- package/dist/Toast.d.mts +12 -10
- package/dist/Toast.d.ts +12 -10
- package/dist/Toast.mjs +0 -1
- package/dist/Toggle.mjs +0 -1
- package/dist/{chunk-TETMEKZE.mjs → chunk-2QXJDRVU.mjs} +4 -1
- package/dist/{chunk-CBIZLRYH.mjs → chunk-422IVD3H.mjs} +1 -0
- package/dist/{chunk-4ZO5PTKF.mjs → chunk-77UOVFIS.mjs} +3 -1
- package/dist/{chunk-2QOHHBJC.mjs → chunk-7BZJRB77.mjs} +25 -15
- package/dist/{chunk-UOKFSFNJ.mjs → chunk-C5ZRMR2E.mjs} +2 -0
- package/dist/{chunk-E4EQSCKR.mjs → chunk-COA2YZOX.mjs} +3 -1
- package/dist/{chunk-6QLBHUEG.mjs → chunk-CZN6L2QU.mjs} +3 -1
- package/dist/{chunk-BTUW5LSG.mjs → chunk-E2PONRJG.mjs} +2 -1
- package/dist/{chunk-6CR4S6W2.mjs → chunk-H6MQL7PS.mjs} +9 -4
- package/dist/{chunk-EROPDCB5.mjs → chunk-HHOOFDBA.mjs} +26 -21
- package/dist/{chunk-URIH43IJ.mjs → chunk-IDVUZIVY.mjs} +3 -1
- package/dist/{chunk-MP7GLMIR.mjs → chunk-NPCBNGNE.mjs} +0 -1
- package/dist/{chunk-V2ZB2XNS.mjs → chunk-UMZTPUB3.mjs} +27 -15
- package/dist/fonts.mjs +0 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +108 -64
- package/dist/index.mjs +13 -14
- package/package.json +14 -12
- package/src/components/Accordion/Accordion.tsx +3 -0
- package/src/components/AppHeader/AppHeader.tsx +25 -10
- package/src/components/Checkbox/Checkbox.tsx +3 -0
- package/src/components/ConfirmDialog/ConfirmDialog.tsx +30 -14
- package/src/components/ImageUpload/ImageUpload.tsx +33 -25
- package/src/components/ListItem/ListItem.tsx +3 -0
- package/src/components/MenuItem/MenuItem.tsx +3 -0
- package/src/components/NumberStepper/NumberStepper.tsx +4 -0
- package/src/components/Select/Select.tsx +3 -0
- package/src/components/SelectableGrid/SelectableGrid.tsx +0 -1
- package/src/components/Sheet/Sheet.tsx +27 -14
- package/src/components/Sheet/index.ts +2 -2
- package/src/components/Slider/Slider.tsx +3 -0
- package/src/components/Switch/Switch.tsx +3 -1
- package/src/components/Text/Text.tsx +1 -0
- package/dist/chunk-Y6FXYEAI.mjs +0 -8
package/CONSUMER.md
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
|
-
# @retray-dev/ui-kit — Consumer Setup Guide (
|
|
1
|
+
# @retray-dev/ui-kit — Consumer Setup Guide (v13.2.0)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
## AI Assistant Context (Claude Code)
|
|
4
|
+
|
|
5
|
+
**Step 1 — Copy docs to your repo root:**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cp node_modules/@retray-dev/ui-kit/SKILL.md SKILL.md
|
|
9
|
+
cp node_modules/@retray-dev/ui-kit/CONSUMER.md CONSUMER.md
|
|
10
|
+
cp node_modules/@retray-dev/ui-kit/EXAMPLES.md EXAMPLES.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
> `@./node_modules/...` paths work but break when `node_modules` is regenerated or absent (CI cache miss, new clone). Copying files to repo root guarantees Claude always has context regardless of install state. Re-copy on upgrades.
|
|
14
|
+
|
|
15
|
+
**Step 2 — Add to `CLAUDE.md`:**
|
|
16
|
+
|
|
17
|
+
```markdown
|
|
18
|
+
## UI Kit
|
|
19
|
+
@./SKILL.md
|
|
20
|
+
@./CONSUMER.md
|
|
21
|
+
@./EXAMPLES.md
|
|
22
|
+
```
|
|
10
23
|
|
|
11
24
|
---
|
|
12
25
|
|
|
26
|
+
|
|
27
|
+
|
|
13
28
|
## Prerequisites
|
|
14
29
|
|
|
15
30
|
| Requirement | Minimum | Notes |
|
|
@@ -56,7 +71,7 @@ npx expo install \
|
|
|
56
71
|
## Install: Optional Peer Dependencies
|
|
57
72
|
|
|
58
73
|
```bash
|
|
59
|
-
npx expo install
|
|
74
|
+
npx expo install react-native-image-picker # Required only for ImageUpload component
|
|
60
75
|
|
|
61
76
|
# HolographicCard only — deep-import, NOT in main barrel:
|
|
62
77
|
npx expo install @shopify/react-native-skia expo-sensors
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A personal React Native / Expo UI component library with a built-in design system, dark mode support, haptic feedback, and smooth animations.
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- 55 components across 9 categories (plus the deep-import `HolographicCard`)
|
|
6
6
|
- Light/dark theme with 12 public tokens (26 resolved) and full customization
|
|
7
7
|
- Apple HIG–compliant touch targets and haptic feedback
|
|
8
8
|
- Animated interactions: spring press, sliding tabs, accordion easing, animated progress
|
|
@@ -23,7 +23,7 @@ pnpm add @retray-dev/ui-kit
|
|
|
23
23
|
Install these in your app if not already present:
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
pnpm add expo-font expo-haptics expo-linear-gradient expo-image react-native-safe-area-context @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler react-native-worklets @react-native-picker/picker @react-native-community/slider @expo/vector-icons react-native-size-matters react-native-svg react-native-screens sonner-native pressto react-native-ease
|
|
26
|
+
pnpm add expo-font expo-haptics expo-linear-gradient expo-image react-native-safe-area-context @gorhom/bottom-sheet react-native-reanimated react-native-gesture-handler react-native-worklets @react-native-picker/picker @react-native-community/slider @expo/vector-icons react-native-size-matters react-native-svg react-native-screens sonner-native pressto react-native-ease
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
For Expo projects, run `npx expo install` instead to get SDK-compatible versions.
|
|
@@ -32,7 +32,7 @@ For Expo projects, run `npx expo install` instead to get SDK-compatible versions
|
|
|
32
32
|
|
|
33
33
|
**Required:** `expo-image` is required for `Avatar`, `ImageUpload`, `ImageViewer`, `ListItem`, and `MediaCard` image rendering. It replaces React Native's built-in `Image` with caching, blurhash placeholders, and cross-fade transitions.
|
|
34
34
|
|
|
35
|
-
**Optional:** for `ImageUpload`, add `
|
|
35
|
+
**Optional:** for `ImageUpload`, add `react-native-image-picker`. For the deep-import `HolographicCard`, add `@shopify/react-native-skia expo-sensors`.
|
|
36
36
|
|
|
37
37
|
Add the Worklets Babel plugin to `babel.config.js` (required by `@gorhom/bottom-sheet`):
|
|
38
38
|
|
|
@@ -177,18 +177,18 @@ import { SPACING, ICON_SIZES, RADIUS, SHADOWS, BREAKPOINTS, TYPOGRAPHY } from '@
|
|
|
177
177
|
| `RADIUS` | `none` (0), `xs` (4), `sm` (8), `md` (14), `lg` (20), `xl` (32), `full` (9999) |
|
|
178
178
|
| `SHADOWS` | `sm`, `md`, `lg`, `xl` — cross-platform shadow presets |
|
|
179
179
|
| `BREAKPOINTS` | `wide` (700) |
|
|
180
|
-
| `TYPOGRAPHY` |
|
|
180
|
+
| `TYPOGRAPHY` | 17 variants: `display-hero`, `display-xl`, `display-lg`, `display-md`, `display-sm`, `title-md`, `title-sm`, `body-md`, `body-sm`, `caption`, `caption-sm`, `badge-text`, `badge-text-md`, `micro-label`, `uppercase-tag`, `button-lg`, `button-sm` |
|
|
181
181
|
|
|
182
182
|
### Color Utilities
|
|
183
183
|
|
|
184
184
|
- **`withAlpha(hex: string, alpha: number)`** — takes a hex color string (e.g., `"#6366f1"`) and an opacity value (0–1), returns an `rgba()` string. Useful for semi-transparent overlays without adding a separate token.
|
|
185
|
-
- **`hexToRgb(hex: string)`** — returns `{ r, g, b } | null`. Converts hex color to RGB components.
|
|
185
|
+
- **`hexToRgb(hex: string)`** — returns `{ r, g, b } | null`. Converts hex color to RGB components. Import from package root.
|
|
186
186
|
|
|
187
187
|
## Components
|
|
188
188
|
|
|
189
189
|
| Category | Components |
|
|
190
190
|
| ----------- | ----------------------------------------------------------------------------------------------- |
|
|
191
|
-
| Display | `Text`, `Badge`, `Avatar`, `Separator`, `Spinner`, `Skeleton`, `Progress`, `CurrencyDisplay`, `Stats` |
|
|
191
|
+
| Display | `Text`, `Badge`, `Avatar`, `AvatarGroup`, `Separator`, `Spinner`, `Skeleton`, `Progress`, `CurrencyDisplay`, `Stats` |
|
|
192
192
|
| Surfaces | `Card`, `AlertBanner`, `EmptyState`, `MediaCard`, `PricingCard` |
|
|
193
193
|
| Form | `Form` (+ `Form.Field` / `Form.Section` / `Form.Footer`), `Button`, `ButtonGroup`, `IconButton`, `Input`, `CurrencyInput`, `Textarea`, `Checkbox`, `Switch`, `Toggle`, `RadioGroup`, `Select`, `Slider`, `SelectableGrid`, `SelectableCard` (+ `SelectableCardGroup`), `SheetSelect`, `ImageUpload`, `IconPicker`, `NumberStepper` |
|
|
194
194
|
| Composition | `Tabs`, `Accordion` |
|
|
@@ -236,12 +236,11 @@ const { colors } = useTheme()
|
|
|
236
236
|
const rgb = hexToRgb('#6366f1') // { r: 99, g: 102, b: 241 }
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
Full props reference and more examples are available in [
|
|
239
|
+
Full props reference and more examples are available in [SKILL.md](./SKILL.md), which is also shipped inside the npm package for use with AI tools:
|
|
240
240
|
|
|
241
241
|
```markdown
|
|
242
|
-
## UI
|
|
243
|
-
|
|
244
|
-
@./node_modules/@retray-dev/ui-kit/COMPONENTS.md
|
|
242
|
+
## UI Kit
|
|
243
|
+
@./node_modules/@retray-dev/ui-kit/SKILL.md
|
|
245
244
|
```
|
|
246
245
|
|
|
247
246
|
## License
|