@expokit/cli 0.0.0-stage → 0.3.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/LICENSE +21 -0
- package/README.md +46 -2
- package/bin/expo-kit.js +1266 -0
- package/bin/lib.mjs +343 -0
- package/bin/mcp.mjs +345 -0
- package/package.json +49 -4
- package/registry/_docs/accordion.json +115 -0
- package/registry/_docs/action-sheet.json +138 -0
- package/registry/_docs/alert.json +155 -0
- package/registry/_docs/avatar.json +227 -0
- package/registry/_docs/badge.json +148 -0
- package/registry/_docs/bottom-nav.json +143 -0
- package/registry/_docs/bottom-sheet.json +186 -0
- package/registry/_docs/bullet.json +27 -0
- package/registry/_docs/button-3d.json +138 -0
- package/registry/_docs/button.json +131 -0
- package/registry/_docs/calendar.json +198 -0
- package/registry/_docs/card-stack.json +124 -0
- package/registry/_docs/card.json +131 -0
- package/registry/_docs/carousel.json +122 -0
- package/registry/_docs/chat.json +184 -0
- package/registry/_docs/checkbox.json +109 -0
- package/registry/_docs/checkout.json +105 -0
- package/registry/_docs/chip-group.json +132 -0
- package/registry/_docs/color-swatch.json +82 -0
- package/registry/_docs/confetti.json +102 -0
- package/registry/_docs/coupon.json +192 -0
- package/registry/_docs/cube-pager.json +100 -0
- package/registry/_docs/dashboard.json +123 -0
- package/registry/_docs/date-picker.json +269 -0
- package/registry/_docs/dialog.json +186 -0
- package/registry/_docs/drawer.json +199 -0
- package/registry/_docs/fab.json +144 -0
- package/registry/_docs/flip-card.json +127 -0
- package/registry/_docs/floating-input.json +211 -0
- package/registry/_docs/gift-card.json +124 -0
- package/registry/_docs/glass-button.json +142 -0
- package/registry/_docs/glass-nav-bar.json +102 -0
- package/registry/_docs/glass-search-bar.json +114 -0
- package/registry/_docs/glass-segmented.json +94 -0
- package/registry/_docs/glass-sheet.json +136 -0
- package/registry/_docs/glass-tab-bar.json +100 -0
- package/registry/_docs/glass.json +94 -0
- package/registry/_docs/inbox.json +75 -0
- package/registry/_docs/isometric-bar.json +75 -0
- package/registry/_docs/kit.json +14 -0
- package/registry/_docs/kpi-card.json +14 -0
- package/registry/_docs/like-button.json +92 -0
- package/registry/_docs/liquidglass-tab.json +30 -0
- package/registry/_docs/list-item.json +216 -0
- package/registry/_docs/loyalty-card.json +124 -0
- package/registry/_docs/morph-button.json +128 -0
- package/registry/_docs/number-ticker.json +112 -0
- package/registry/_docs/offers.json +81 -0
- package/registry/_docs/onboarding.json +69 -0
- package/registry/_docs/otp-input.json +158 -0
- package/registry/_docs/pagination-dots.json +108 -0
- package/registry/_docs/parallax-layers.json +104 -0
- package/registry/_docs/parallax-scroll.json +210 -0
- package/registry/_docs/password-input.json +112 -0
- package/registry/_docs/payment-card.json +169 -0
- package/registry/_docs/pixel-bar.json +69 -0
- package/registry/_docs/polar-area.json +81 -0
- package/registry/_docs/profile.json +87 -0
- package/registry/_docs/progress-steps.json +116 -0
- package/registry/_docs/progress.json +152 -0
- package/registry/_docs/radio-group.json +112 -0
- package/registry/_docs/rating.json +114 -0
- package/registry/_docs/ring-carousel.json +122 -0
- package/registry/_docs/scratch-card.json +110 -0
- package/registry/_docs/search-bar.json +160 -0
- package/registry/_docs/search-results.json +123 -0
- package/registry/_docs/segmented-control.json +123 -0
- package/registry/_docs/select.json +277 -0
- package/registry/_docs/settings.json +75 -0
- package/registry/_docs/shimmer-button.json +98 -0
- package/registry/_docs/sign-in.json +201 -0
- package/registry/_docs/skeleton.json +162 -0
- package/registry/_docs/slide-to-confirm.json +108 -0
- package/registry/_docs/slider.json +177 -0
- package/registry/_docs/spin-wheel.json +138 -0
- package/registry/_docs/spinner.json +121 -0
- package/registry/_docs/stateful-button.json +184 -0
- package/registry/_docs/stepper.json +184 -0
- package/registry/_docs/swipe-deck.json +118 -0
- package/registry/_docs/swipeable-row.json +95 -0
- package/registry/_docs/switch.json +124 -0
- package/registry/_docs/tabs.json +129 -0
- package/registry/_docs/tag-input.json +148 -0
- package/registry/_docs/text-animation.json +141 -0
- package/registry/_docs/textarea.json +191 -0
- package/registry/_docs/ticket-card.json +194 -0
- package/registry/_docs/ticket-shape.json +14 -0
- package/registry/_docs/tilt-card.json +157 -0
- package/registry/_docs/time-picker.json +269 -0
- package/registry/_docs/timeline-chart.json +33 -0
- package/registry/_docs/timeline.json +172 -0
- package/registry/_docs/toast.json +185 -0
- package/registry/_docs/treemap.json +33 -0
- package/registry/_docs/waterfall.json +39 -0
- package/registry/_docs/wheel-list.json +122 -0
- package/registry/accordion/files/src/components/ui/accordion.tsx +233 -0
- package/registry/accordion/files/src/lib/kit.tsx +219 -0
- package/registry/accordion.json +17 -0
- package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +580 -0
- package/registry/action-sheet/files/src/lib/kit.tsx +219 -0
- package/registry/action-sheet.json +18 -0
- package/registry/alert/files/src/components/ui/alert.tsx +654 -0
- package/registry/alert/files/src/components/ui/button.tsx +274 -0
- package/registry/alert/files/src/lib/kit.tsx +219 -0
- package/registry/alert.json +20 -0
- package/registry/avatar/files/src/components/ui/avatar.tsx +790 -0
- package/registry/avatar/files/src/lib/kit.tsx +219 -0
- package/registry/avatar.json +18 -0
- package/registry/badge/files/src/components/ui/badge.tsx +626 -0
- package/registry/badge/files/src/lib/kit.tsx +219 -0
- package/registry/badge.json +17 -0
- package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +1050 -0
- package/registry/bottom-nav/files/src/lib/kit.tsx +219 -0
- package/registry/bottom-nav.json +18 -0
- package/registry/bottom-sheet/files/src/components/ui/bottom-sheet.tsx +585 -0
- package/registry/bottom-sheet/files/src/lib/kit.tsx +219 -0
- package/registry/bottom-sheet.json +17 -0
- package/registry/bullet.json +14 -0
- package/registry/button/files/src/components/ui/button.tsx +274 -0
- package/registry/button/files/src/lib/kit.tsx +219 -0
- package/registry/button-3d/files/src/components/ui/button-3d.tsx +212 -0
- package/registry/button-3d/files/src/lib/kit.tsx +219 -0
- package/registry/button-3d.json +18 -0
- package/registry/button.json +18 -0
- package/registry/calendar/files/src/components/ui/calendar.tsx +822 -0
- package/registry/calendar/files/src/lib/kit.tsx +219 -0
- package/registry/calendar.json +17 -0
- package/registry/card/files/src/components/ui/card.tsx +300 -0
- package/registry/card/files/src/lib/kit.tsx +219 -0
- package/registry/card-stack.json +15 -0
- package/registry/card.json +17 -0
- package/registry/carousel.json +15 -0
- package/registry/chat.json +18 -0
- package/registry/checkbox/files/src/components/ui/checkbox.tsx +150 -0
- package/registry/checkbox/files/src/lib/kit.tsx +219 -0
- package/registry/checkbox.json +17 -0
- package/registry/checkout.json +26 -0
- package/registry/chip-group/files/src/components/ui/chip-group.tsx +269 -0
- package/registry/chip-group/files/src/lib/kit.tsx +219 -0
- package/registry/chip-group.json +17 -0
- package/registry/color-swatch.json +17 -0
- package/registry/confetti/files/src/components/ui/confetti.tsx +222 -0
- package/registry/confetti/files/src/lib/kit.tsx +219 -0
- package/registry/confetti.json +15 -0
- package/registry/coupon/files/src/components/ui/coupon.tsx +698 -0
- package/registry/coupon/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/coupon/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/coupon/files/src/lib/kit.tsx +219 -0
- package/registry/coupon/files/src/lib/ticket-shape.tsx +543 -0
- package/registry/coupon.json +23 -0
- package/registry/cube-pager.json +15 -0
- package/registry/dashboard.json +32 -0
- package/registry/date-picker/files/src/components/ui/calendar.tsx +822 -0
- package/registry/date-picker/files/src/components/ui/date-picker.tsx +796 -0
- package/registry/date-picker/files/src/lib/kit.tsx +219 -0
- package/registry/date-picker.json +19 -0
- package/registry/dialog/files/src/components/ui/dialog.tsx +759 -0
- package/registry/dialog/files/src/lib/kit.tsx +219 -0
- package/registry/dialog.json +18 -0
- package/registry/drawer/files/src/components/ui/drawer.tsx +1135 -0
- package/registry/drawer/files/src/lib/kit.tsx +219 -0
- package/registry/drawer.json +18 -0
- package/registry/fab.json +18 -0
- package/registry/flip-card/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/flip-card/files/src/lib/kit.tsx +219 -0
- package/registry/flip-card.json +15 -0
- package/registry/floating-input/files/src/components/ui/floating-input.tsx +528 -0
- package/registry/floating-input/files/src/lib/kit.tsx +219 -0
- package/registry/floating-input.json +17 -0
- package/registry/gift-card.json +21 -0
- package/registry/glass-button.json +22 -0
- package/registry/glass-nav-bar.json +21 -0
- package/registry/glass-search-bar.json +21 -0
- package/registry/glass-segmented.json +22 -0
- package/registry/glass-sheet.json +22 -0
- package/registry/glass-tab-bar.json +22 -0
- package/registry/glass.json +19 -0
- package/registry/inbox.json +30 -0
- package/registry/isometric-bar.json +14 -0
- package/registry/kit/files/src/lib/kit.tsx +219 -0
- package/registry/kit.json +11 -0
- package/registry/kpi-card/files/src/components/charts/kpi-card.tsx +45 -0
- package/registry/kpi-card.json +14 -0
- package/registry/like-button.json +18 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/_layout.tsx +97 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/alerts.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/explore.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/index.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/profile.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/_layout.tsx +33 -0
- package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +259 -0
- package/registry/liquidglass-tab/files/src/components/TabScreen.tsx +122 -0
- package/registry/liquidglass-tab/files/src/lib/tab-bar.ts +61 -0
- package/registry/liquidglass-tab/files/src/lib/tab-icons.ts +130 -0
- package/registry/liquidglass-tab/files/src/lib/tabs.ts +108 -0
- package/registry/liquidglass-tab.json +23 -0
- package/registry/list-item/files/src/components/ui/list-item.tsx +508 -0
- package/registry/list-item/files/src/lib/kit.tsx +219 -0
- package/registry/list-item.json +17 -0
- package/registry/loyalty-card.json +23 -0
- package/registry/morph-button.json +18 -0
- package/registry/number-ticker.json +15 -0
- package/registry/offers.json +24 -0
- package/registry/onboarding.json +17 -0
- package/registry/otp-input/files/src/components/ui/otp-input.tsx +380 -0
- package/registry/otp-input/files/src/lib/kit.tsx +219 -0
- package/registry/otp-input.json +17 -0
- package/registry/pagination-dots/files/src/components/ui/pagination-dots.tsx +262 -0
- package/registry/pagination-dots/files/src/lib/kit.tsx +219 -0
- package/registry/pagination-dots.json +15 -0
- package/registry/parallax-layers.json +15 -0
- package/registry/parallax-scroll.json +17 -0
- package/registry/password-input/files/src/components/ui/floating-input.tsx +528 -0
- package/registry/password-input/files/src/components/ui/password-input.tsx +271 -0
- package/registry/password-input/files/src/lib/kit.tsx +219 -0
- package/registry/password-input.json +19 -0
- package/registry/payment-card/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/payment-card/files/src/components/ui/payment-card.tsx +385 -0
- package/registry/payment-card/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/payment-card/files/src/lib/kit.tsx +219 -0
- package/registry/payment-card.json +21 -0
- package/registry/pixel-bar.json +14 -0
- package/registry/polar-area.json +14 -0
- package/registry/profile.json +17 -0
- package/registry/progress/files/src/components/ui/progress.tsx +883 -0
- package/registry/progress/files/src/lib/kit.tsx +219 -0
- package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +559 -0
- package/registry/progress-steps/files/src/lib/kit.tsx +219 -0
- package/registry/progress-steps.json +18 -0
- package/registry/progress.json +17 -0
- package/registry/radio-group/files/src/components/ui/radio-group.tsx +327 -0
- package/registry/radio-group/files/src/lib/kit.tsx +219 -0
- package/registry/radio-group.json +18 -0
- package/registry/rating.json +18 -0
- package/registry/ring-carousel.json +15 -0
- package/registry/scratch-card.json +18 -0
- package/registry/search-bar/files/src/components/ui/search-bar.tsx +530 -0
- package/registry/search-bar/files/src/lib/kit.tsx +219 -0
- package/registry/search-bar.json +17 -0
- package/registry/search-results.json +30 -0
- package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +341 -0
- package/registry/segmented-control/files/src/lib/kit.tsx +219 -0
- package/registry/segmented-control.json +18 -0
- package/registry/select/files/src/components/ui/select.tsx +1398 -0
- package/registry/select/files/src/lib/kit.tsx +219 -0
- package/registry/select.json +17 -0
- package/registry/settings.json +26 -0
- package/registry/shimmer-button.json +17 -0
- package/registry/sign-in.json +26 -0
- package/registry/skeleton/files/src/components/ui/skeleton.tsx +799 -0
- package/registry/skeleton/files/src/lib/kit.tsx +219 -0
- package/registry/skeleton.json +17 -0
- package/registry/slide-to-confirm.json +18 -0
- package/registry/slider/files/src/components/ui/slider.tsx +716 -0
- package/registry/slider/files/src/lib/kit.tsx +219 -0
- package/registry/slider.json +17 -0
- package/registry/spin-wheel.json +18 -0
- package/registry/spinner/files/src/components/ui/spinner.tsx +748 -0
- package/registry/spinner/files/src/lib/kit.tsx +219 -0
- package/registry/spinner.json +17 -0
- package/registry/stateful-button/files/src/components/ui/stateful-button.tsx +532 -0
- package/registry/stateful-button/files/src/lib/kit.tsx +219 -0
- package/registry/stateful-button.json +18 -0
- package/registry/stepper/files/src/components/ui/stepper.tsx +646 -0
- package/registry/stepper/files/src/lib/kit.tsx +219 -0
- package/registry/stepper.json +17 -0
- package/registry/swipe-deck.json +15 -0
- package/registry/swipeable-row.json +15 -0
- package/registry/switch/files/src/components/ui/switch.tsx +344 -0
- package/registry/switch/files/src/lib/kit.tsx +219 -0
- package/registry/switch.json +18 -0
- package/registry/tabs/files/src/components/ui/tabs.tsx +539 -0
- package/registry/tabs/files/src/lib/kit.tsx +219 -0
- package/registry/tabs.json +17 -0
- package/registry/tag-input/files/src/components/ui/tag-input.tsx +720 -0
- package/registry/tag-input/files/src/lib/kit.tsx +219 -0
- package/registry/tag-input.json +17 -0
- package/registry/text-animation/files/src/components/ui/text-animation.tsx +650 -0
- package/registry/text-animation/files/src/lib/kit.tsx +219 -0
- package/registry/text-animation.json +15 -0
- package/registry/textarea/files/src/components/ui/textarea.tsx +553 -0
- package/registry/textarea/files/src/lib/kit.tsx +219 -0
- package/registry/textarea.json +17 -0
- package/registry/ticket-card.json +24 -0
- package/registry/ticket-shape/files/src/lib/kit.tsx +219 -0
- package/registry/ticket-shape/files/src/lib/ticket-shape.tsx +543 -0
- package/registry/ticket-shape.json +17 -0
- package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/tilt-card/files/src/lib/kit.tsx +219 -0
- package/registry/tilt-card.json +17 -0
- package/registry/time-picker/files/src/components/ui/time-picker.tsx +1159 -0
- package/registry/time-picker/files/src/lib/kit.tsx +219 -0
- package/registry/time-picker.json +17 -0
- package/registry/timeline/files/src/components/ui/avatar.tsx +790 -0
- package/registry/timeline/files/src/components/ui/timeline.tsx +1059 -0
- package/registry/timeline/files/src/lib/kit.tsx +219 -0
- package/registry/timeline-chart.json +14 -0
- package/registry/timeline.json +20 -0
- package/registry/toast/files/src/components/ui/button.tsx +274 -0
- package/registry/toast/files/src/components/ui/toast.tsx +1284 -0
- package/registry/toast/files/src/lib/kit.tsx +219 -0
- package/registry/toast.json +20 -0
- package/registry/treemap.json +14 -0
- package/registry/waterfall.json +14 -0
- package/registry/wheel-list.json +17 -0
- package/schema/components.schema.json +13 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "parallax-scroll",
|
|
3
|
+
"category": "3D",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "ParallaxScrollView",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/parallax-scroll.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A photo header glides slower than the content, then a title bar fades in.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"children",
|
|
13
|
+
"ReactNode",
|
|
14
|
+
"—",
|
|
15
|
+
"The screen's content, under the header."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"header",
|
|
19
|
+
"ReactNode",
|
|
20
|
+
"—",
|
|
21
|
+
"Fills the header area: a photo, a map, a gallery (wins over headerImage)."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"headerImage",
|
|
25
|
+
"ImageSourcePropType",
|
|
26
|
+
"—",
|
|
27
|
+
"Shortcut for a full-bleed header photo."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"headerAccessibilityLabel",
|
|
31
|
+
"string",
|
|
32
|
+
"—",
|
|
33
|
+
"Describes headerImage for screen readers (skipped when omitted)."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"headerHeight",
|
|
37
|
+
"number",
|
|
38
|
+
"300",
|
|
39
|
+
"Header height, including the part under the status bar."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"headerSpeed",
|
|
43
|
+
"number",
|
|
44
|
+
"0.5",
|
|
45
|
+
"How the header moves while scrolling up: 0 scrolls with the content, 1 stays pinned while the content slides over it."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"stretch",
|
|
49
|
+
"boolean",
|
|
50
|
+
"true",
|
|
51
|
+
"iOS: pulling down stretches the header to fill the gap, anchored at the top. Turn off with a refreshControl."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"headerOverlay",
|
|
55
|
+
"ReactNode",
|
|
56
|
+
"—",
|
|
57
|
+
"Pinned to the bottom of the header (a title over the photo); lifts and fades as it scrolls away, over a bottom scrim."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"title",
|
|
61
|
+
"string",
|
|
62
|
+
"—",
|
|
63
|
+
"Ready-made top bar (theme background, hairline, centred title) that fades in once the header has scrolled under it."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"bar",
|
|
67
|
+
"ReactNode",
|
|
68
|
+
"—",
|
|
69
|
+
"Your own bar instead: fills the bar area (topInset included) and fades in the same way. Decorative — buttons go in barLeft / barRight."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"barLeft / barRight",
|
|
73
|
+
"ReactNode",
|
|
74
|
+
"—",
|
|
75
|
+
"Buttons pinned to the bar, visible over the photo too: each child sits on a round theme-coloured bubble that melts into the bar. Pass an array for several."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"barHeight",
|
|
79
|
+
"number",
|
|
80
|
+
"52",
|
|
81
|
+
"Height of the bar row, below topInset."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"topInset",
|
|
85
|
+
"number",
|
|
86
|
+
"0",
|
|
87
|
+
"Space above the bar for the status bar / notch — pass your safe-area top inset."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"contentContainerStyle",
|
|
91
|
+
"StyleProp<ViewStyle>",
|
|
92
|
+
"—",
|
|
93
|
+
"Style for the content under the header (padding, gap, background — theme background by default)."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"style",
|
|
97
|
+
"StyleProp<ViewStyle>",
|
|
98
|
+
"—",
|
|
99
|
+
"Style for the outer frame (size, margins, radius). Fills its parent by default."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"onScroll",
|
|
103
|
+
"(e) => void",
|
|
104
|
+
"—",
|
|
105
|
+
"JS handler called alongside the native parallax event. For UI-thread effects use useParallaxScroll().scroll instead of your own Animated.event."
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"ref",
|
|
109
|
+
"Ref<ScrollView>",
|
|
110
|
+
"—",
|
|
111
|
+
"Forwarded to the scroll view, so you can call scrollTo."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"…ScrollView props",
|
|
115
|
+
"ScrollViewProps",
|
|
116
|
+
"—",
|
|
117
|
+
"Everything else is passed to the scroll view (vertical only): refreshControl, onScrollEndDrag, nestedScrollEnabled…"
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"ParallaxImage.source",
|
|
121
|
+
"ImageSourcePropType",
|
|
122
|
+
"—",
|
|
123
|
+
"The photo."
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"ParallaxImage.height",
|
|
127
|
+
"number",
|
|
128
|
+
"200",
|
|
129
|
+
"Frame height."
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"ParallaxImage.speed",
|
|
133
|
+
"number",
|
|
134
|
+
"0.3",
|
|
135
|
+
"How much slower than its frame the photo moves: 0 still, 1 fixed on screen, negative the other way."
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"ParallaxImage.radius",
|
|
139
|
+
"number",
|
|
140
|
+
"radius.lg",
|
|
141
|
+
"Corner radius of the frame."
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
"ParallaxImage.scrim",
|
|
145
|
+
"boolean",
|
|
146
|
+
"on with children",
|
|
147
|
+
"Bottom gradient so white text reads on the photo."
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
"ParallaxImage.children",
|
|
151
|
+
"ReactNode",
|
|
152
|
+
"—",
|
|
153
|
+
"Content over the photo, aligned to the bottom (a caption, a tag)."
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
"ParallaxImage.accessibilityLabel",
|
|
157
|
+
"string",
|
|
158
|
+
"—",
|
|
159
|
+
"Describes the photo for screen readers."
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
"ParallaxImage.style / imageStyle",
|
|
163
|
+
"StyleProp<ViewStyle> / StyleProp<ImageStyle>",
|
|
164
|
+
"—",
|
|
165
|
+
"Style for the frame / for the photo itself."
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
"ParallaxView.speed",
|
|
169
|
+
"number",
|
|
170
|
+
"0.2",
|
|
171
|
+
"Offset relative to the scroll: positive lags behind the content, negative leads it."
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
"ParallaxView.children / style",
|
|
175
|
+
"ReactNode / StyleProp<ViewStyle>",
|
|
176
|
+
"—",
|
|
177
|
+
"What drifts, and its style (the transform is taken by the parallax)."
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
"useParallaxScroll()",
|
|
181
|
+
"() => { scroll, viewport, contentHeight, contentRef } | null",
|
|
182
|
+
"—",
|
|
183
|
+
"The live scroll offset (native-driver friendly), viewport size and content size for your own effects; null outside a ParallaxScrollView."
|
|
184
|
+
]
|
|
185
|
+
],
|
|
186
|
+
"behavior": [
|
|
187
|
+
[
|
|
188
|
+
"Motion",
|
|
189
|
+
"The header lags behind the scroll and darkens as it leaves. The bar, title and button bubbles fade in once it has scrolled under the bar."
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
"Touch",
|
|
193
|
+
"On iOS, pulling down past the top stretches the header to fill the gap. Set stretch to false when you use a refreshControl."
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
"Reduced motion",
|
|
197
|
+
"With Reduce Motion on, the header, ParallaxImage and ParallaxView parallax offsets switch off; the stretch and the fades stay."
|
|
198
|
+
],
|
|
199
|
+
[
|
|
200
|
+
"Screen readers",
|
|
201
|
+
"The bar comes first in reading order and its title is a header. Header and ParallaxImage photos are labelled images only when you give them a label."
|
|
202
|
+
],
|
|
203
|
+
[
|
|
204
|
+
"Platforms",
|
|
205
|
+
"The scroll offset drives everything through a native Animated.event, so there is no JS work while scrolling."
|
|
206
|
+
]
|
|
207
|
+
],
|
|
208
|
+
"usage": null,
|
|
209
|
+
"examples": []
|
|
210
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "password-input",
|
|
3
|
+
"category": "Inputs",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PasswordInput",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/password-input.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "An eye toggle that twists between states, and a strength meter that springs full.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"strength",
|
|
13
|
+
"boolean",
|
|
14
|
+
"true",
|
|
15
|
+
"Show the animated strength meter."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"score",
|
|
19
|
+
"(pw) => 0–4",
|
|
20
|
+
"built-in",
|
|
21
|
+
"Custom strength scorer."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"requirements",
|
|
25
|
+
"{ label, test }[] | boolean",
|
|
26
|
+
"—",
|
|
27
|
+
"Checklist under the field; true uses DEFAULT_PASSWORD_REQUIREMENTS (8+ chars, upper & lower, number, symbol)."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"confirmOf",
|
|
31
|
+
"string",
|
|
32
|
+
"—",
|
|
33
|
+
"Confirm-password mode: shows match / mismatch once the user types."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"matchMessage / mismatchMessage",
|
|
37
|
+
"string",
|
|
38
|
+
"\"Passwords match\" / \"Passwords don't match\"",
|
|
39
|
+
"Copy for confirm mode."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"floatingLabel",
|
|
43
|
+
"boolean",
|
|
44
|
+
"true",
|
|
45
|
+
"Passed to FloatingInput: set to false to put the label above the field (no notch) and show placeholder inside."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"iconColor",
|
|
49
|
+
"string",
|
|
50
|
+
"theme mutedForeground",
|
|
51
|
+
"Eye / eye-off toggle and clear button colour."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"fieldStyle / inputStyle / labelStyle / messageStyle / counterStyle",
|
|
55
|
+
"StyleProp",
|
|
56
|
+
"—",
|
|
57
|
+
"Style slots passed straight to FloatingInput — see Floating Input."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"…FloatingInputProps",
|
|
61
|
+
"",
|
|
62
|
+
"",
|
|
63
|
+
"Every Floating Input prop (error, success, size, variant, …)."
|
|
64
|
+
]
|
|
65
|
+
],
|
|
66
|
+
"behavior": [
|
|
67
|
+
[
|
|
68
|
+
"Touch",
|
|
69
|
+
"The eye button has a 44pt hit area and toggles secureTextEntry. With confirmOf, a match or mismatch message appears as soon as the typing diverges."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"Motion",
|
|
73
|
+
"Eye and eye-off cross-fade with a spring twist. The four meter segments fill left to right in a stagger, and checklist ticks pop in as rules are met."
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
"Keyboard",
|
|
77
|
+
"Auto-capitalisation and autocorrect are turned off for the field."
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"Screen readers",
|
|
81
|
+
"The toggle is a button labelled 'Show password' or 'Hide password'. The meter reads 'Password strength: Strong' and each requirement reads as done or not yet."
|
|
82
|
+
]
|
|
83
|
+
],
|
|
84
|
+
"usage": "import { useState } from 'react';\nimport { PasswordInput } from '@/components/ui/password-input';\n\nconst [password, setPassword] = useState('');\n<PasswordInput label=\"New password\" value={password} onChangeText={setPassword} requirements />",
|
|
85
|
+
"examples": [
|
|
86
|
+
{
|
|
87
|
+
"name": "CreatePassword",
|
|
88
|
+
"title": "Create Password",
|
|
89
|
+
"code": "import React, { useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { PasswordInput } from '@/components/ui/password-input';\nimport { useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nexport default function CreatePassword() {\n const [password, setPassword] = useState('Sunset');\n const [confirm, setConfirm] = useState('');\n return (\n <Card title=\"Choose a password\" subtitle=\"You'll use it to sign in on new devices.\">\n <PasswordInput label=\"New password\" value={password} onChangeText={setPassword} requirements />\n <PasswordInput label=\"Confirm password\" value={confirm} onChangeText={setConfirm} confirmOf={password} />\n </Card>\n );\n}\n"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "SignIn",
|
|
93
|
+
"title": "Sign In",
|
|
94
|
+
"code": "import React, { useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { PasswordInput } from '@/components/ui/password-input';\nimport { useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nexport default function SignIn() {\n const { colors } = useKit();\n return (\n <Card title=\"Welcome back\">\n <FloatingInput label=\"Email\" defaultValue=\"maya@studio.io\" keyboardType=\"email-address\" autoCapitalize=\"none\" />\n <PasswordInput label=\"Password\" strength={false} defaultValue=\"correct horse\" />\n <Text style={{ alignSelf: 'flex-end', fontSize: 13, fontWeight: '400', color: colors.accent }}>Forgot password?</Text>\n </Card>\n );\n}\n"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "StrengthMeter",
|
|
98
|
+
"title": "Strength Meter",
|
|
99
|
+
"code": "import { StyleSheet, Text, View } from 'react-native';\nimport { PasswordInput } from '@/components/ui/password-input';\n\nexport default function StrengthMeter() {\n return (\n <View style={{ gap: 18 }}>\n <PasswordInput label=\"Password\" defaultValue=\"hunter2\" />\n <PasswordInput label=\"Password\" defaultValue=\"Hunter2-Lighthouse!\" />\n </View>\n );\n}\n"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "CustomRules",
|
|
103
|
+
"title": "Custom Rules",
|
|
104
|
+
"code": "import React, { useState } from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\nimport { PasswordInput } from '@/components/ui/password-input';\nimport { useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nexport default function CustomRules() {\n return (\n <Card title=\"Wi-Fi password\" subtitle=\"Your router needs 12+ characters and no spaces.\">\n <PasswordInput\n variant=\"filled\"\n label=\"Network password\"\n strength={false}\n defaultValue=\"cafe latte\"\n requirements={[\n { label: '12+ characters', test: (v) => v.length >= 12 },\n { label: 'No spaces', test: (v) => v.length > 0 && !/\\s/.test(v) },\n ]}\n />\n </Card>\n );\n}\n"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "WrongPassword",
|
|
108
|
+
"title": "Wrong Password",
|
|
109
|
+
"code": "import { PasswordInput } from '@/components/ui/password-input';\n\nexport default function WrongPassword() {\n return (\n <PasswordInput\n label=\"Current password\"\n strength={false}\n defaultValue=\"password123\"\n error=\"That's not your current password\"\n helper=\"Required to change your email\"\n />\n );\n}\n"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "payment-card",
|
|
3
|
+
"category": "3D",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PaymentCard",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/payment-card.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A bank card that tilts toward your finger and flips on tap to its back.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"number",
|
|
13
|
+
"string",
|
|
14
|
+
"—",
|
|
15
|
+
"Card number (spaces ok). Masked to the last 4 unless masked={false}."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"name",
|
|
19
|
+
"string",
|
|
20
|
+
"—",
|
|
21
|
+
"Cardholder name."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"expiry",
|
|
25
|
+
"string",
|
|
26
|
+
"—",
|
|
27
|
+
"Expiry, e.g. \"09/29\"."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"cvv",
|
|
31
|
+
"string",
|
|
32
|
+
"—",
|
|
33
|
+
"Shown on the back."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"brand",
|
|
37
|
+
"\"visa\" | \"mastercard\" | \"amex\" | \"rupay\" | \"none\"",
|
|
38
|
+
"\"visa\"",
|
|
39
|
+
"Brand mark; Amex numbers group 4-6-5."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"bank",
|
|
43
|
+
"string",
|
|
44
|
+
"—",
|
|
45
|
+
"Issuer name, top-left."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"label",
|
|
49
|
+
"string",
|
|
50
|
+
"—",
|
|
51
|
+
"Small label top-right (\"Debit\", \"Platinum\")."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"image",
|
|
55
|
+
"ImageSourcePropType",
|
|
56
|
+
"brushed graphite",
|
|
57
|
+
"Card art — a photo or texture (require() or { uri }). Soft, blurred photos look premium."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"tone",
|
|
61
|
+
"\"light\" | \"dark\"",
|
|
62
|
+
"\"light\"",
|
|
63
|
+
"Light text for dark art, dark text for pale art."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"chip",
|
|
67
|
+
"\"gold\" | \"silver\"",
|
|
68
|
+
"\"gold\"",
|
|
69
|
+
"EMV chip finish."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"masked",
|
|
73
|
+
"boolean",
|
|
74
|
+
"true",
|
|
75
|
+
"Hide every digit but the last four (any card length)."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"flipped",
|
|
79
|
+
"boolean",
|
|
80
|
+
"—",
|
|
81
|
+
"Controlled side (true = back)."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"defaultFlipped",
|
|
85
|
+
"boolean",
|
|
86
|
+
"false",
|
|
87
|
+
"Uncontrolled initial side."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"onFlip",
|
|
91
|
+
"(flipped: boolean) => void",
|
|
92
|
+
"—",
|
|
93
|
+
"Fires when tapped."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"tilt",
|
|
97
|
+
"boolean",
|
|
98
|
+
"true",
|
|
99
|
+
"Tilt toward the finger."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"flippable",
|
|
103
|
+
"boolean",
|
|
104
|
+
"true",
|
|
105
|
+
"Tap flips the card. false makes a still card (no tilt, no taps) for use inside something tappable, e.g. a CardStack; a controlled flipped still turns it."
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"frozen",
|
|
109
|
+
"boolean",
|
|
110
|
+
"false",
|
|
111
|
+
"Dim the card with a Frozen label and ignore taps."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"radius",
|
|
115
|
+
"number",
|
|
116
|
+
"16",
|
|
117
|
+
"Corner radius — a real card's corner at phone size."
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"labels",
|
|
121
|
+
"{ cardholder?, validThru?, frozen?, legal?, back?, accessibility? }",
|
|
122
|
+
"English",
|
|
123
|
+
"Every built-in string, for translation ({bank} and {last4} are filled in)."
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"style",
|
|
127
|
+
"StyleProp<ViewStyle>",
|
|
128
|
+
"—",
|
|
129
|
+
"Style for the root (width, margins)."
|
|
130
|
+
]
|
|
131
|
+
],
|
|
132
|
+
"behavior": [
|
|
133
|
+
[
|
|
134
|
+
"Touch",
|
|
135
|
+
"A tap flips the card to its back (stripe, signature panel, CVV, hologram); frozen cards ignore taps. flippable={false} makes a still card for use inside something tappable."
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"Motion",
|
|
139
|
+
"With tilt on, the card leans toward the finger with a soft glare, and its shadow narrows as it turns edge-on mid-flip."
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
"Screen readers",
|
|
143
|
+
"Read as '{bank} card ending {last4}', plus 'Frozen' when frozen. The number is masked to the last four digits by default."
|
|
144
|
+
]
|
|
145
|
+
],
|
|
146
|
+
"usage": "import { PaymentCard } from '@/components/ui/payment-card';\n\n<PaymentCard\n bank=\"Northwind\"\n number=\"5412 7590 1234 0317\"\n name=\"Maya Patel\"\n expiry=\"09/29\"\n brand=\"mastercard\"\n/>",
|
|
147
|
+
"examples": [
|
|
148
|
+
{
|
|
149
|
+
"name": "WalletScreen",
|
|
150
|
+
"title": "Wallet Screen",
|
|
151
|
+
"code": "import { Image, Pressable, Text, View } from 'react-native';\nimport { PaymentCard } from '@/components/ui/payment-card';\nimport { alpha, useKit } from '@/lib/kit';\n\n/** Soft, blurred photos make premium card art — any image works (`require()` or a URL). */\nconst art = (id: number) => ({ uri: `https://picsum.photos/id/${id}/240/151?blur=10` });\n\nexport default function WalletScreen() {\n const { colors } = useKit();\n const actions = [\n ['↑', 'Send'],\n ['↓', 'Request'],\n ['+', 'Top up'],\n ['⋯', 'More'],\n ];\n const activity = [\n ['B', 'Blue Tokai Coffee', 'Today · 09:12', '−₹240'],\n ['U', 'Uber', 'Yesterday · 21:40', '−₹386'],\n ['S', 'Salary · Northwind Labs', 'Mon · 10:00', '+₹82,000'],\n ];\n return (\n <View style={{ gap: 20 }}>\n <View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>\n <View>\n <Text style={{ color: colors.mutedForeground, fontSize: 13 }}>Total balance</Text>\n <Text style={{ color: colors.foreground, fontSize: 30, fontWeight: '700', letterSpacing: -0.8, fontVariant: ['tabular-nums'] }}>₹1,24,580.20</Text>\n <Text style={{ color: colors.success, fontSize: 12, fontWeight: '500' }}>+₹2,140 this week</Text>\n </View>\n <View style={{ width: 40, height: 40, borderRadius: 20, backgroundColor: colors.muted, alignItems: 'center', justifyContent: 'center' }}>\n <Text style={{ color: colors.foreground, fontSize: 14, fontWeight: '700' }}>MP</Text>\n </View>\n </View>\n\n <PaymentCard\n image={art(189)}\n bank=\"Northwind\"\n label=\"World Elite\"\n number=\"5412 7590 1234 0317\"\n name=\"Maya Patel\"\n expiry=\"09/29\"\n cvv=\"482\"\n brand=\"mastercard\"\n />\n\n <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n {actions.map(([glyph, label]) => (\n <View key={label} style={{ alignItems: 'center', gap: 6, width: 64 }}>\n <View style={{ width: 52, height: 52, borderRadius: 26, backgroundColor: colors.muted, alignItems: 'center', justifyContent: 'center' }}>\n <Text style={{ color: colors.foreground, fontSize: 20, fontWeight: '500' }}>{glyph}</Text>\n </View>\n <Text style={{ color: colors.mutedForeground, fontSize: 12 }}>{label}</Text>\n </View>\n ))}\n </View>\n\n <View>\n <Text style={{ color: colors.foreground, fontSize: 16, fontWeight: '600', marginBottom: 4 }}>Recent activity</Text>\n {activity.map(([initial, what, when, amount]) => (\n <View key={what} style={{ flexDirection: 'row', alignItems: 'center', gap: 12, paddingVertical: 10 }}>\n <View style={{ width: 38, height: 38, borderRadius: 12, backgroundColor: colors.muted, alignItems: 'center', justifyContent: 'center' }}>\n <Text style={{ color: colors.foreground, fontSize: 14, fontWeight: '700' }}>{initial}</Text>\n </View>\n <View style={{ flex: 1 }}>\n <Text style={{ color: colors.foreground, fontSize: 14, fontWeight: '500' }}>{what}</Text>\n <Text style={{ color: colors.mutedForeground, fontSize: 12 }}>{when}</Text>\n </View>\n <Text style={{ color: amount.startsWith('+') ? colors.success : colors.foreground, fontSize: 14, fontWeight: '600', fontVariant: ['tabular-nums'] }}>{amount}</Text>\n </View>\n ))}\n </View>\n </View>\n );\n}\n"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"name": "CardControls",
|
|
155
|
+
"title": "Card Controls",
|
|
156
|
+
"code": "import React, { useState } from 'react';\nimport { Image, Pressable, Text, View } from 'react-native';\nimport { PaymentCard } from '@/components/ui/payment-card';\nimport { alpha, useKit } from '@/lib/kit';\n\n/** Soft, blurred photos make premium card art — any image works (`require()` or a URL). */\nconst art = (id: number) => ({ uri: `https://picsum.photos/id/${id}/240/151?blur=10` });\n\n/** A screen title, as it sits above the card in your app. */\nfunction Header({ title, sub, right }: { title: string; sub?: string; right?: React.ReactNode }) {\n const { colors } = useKit();\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>\n <View style={{ flex: 1 }}>\n <Text style={{ color: colors.foreground, fontSize: 22, fontWeight: '700', letterSpacing: -0.4 }}>{title}</Text>\n {sub ? <Text style={{ color: colors.mutedForeground, fontSize: 13, marginTop: 2 }}>{sub}</Text> : null}\n </View>\n {right}\n </View>\n );\n}\n\nexport default function CardControls() {\n const { colors } = useKit();\n const [shown, setShown] = useState(false);\n const [frozen, setFrozen] = useState(false);\n const [flipped, setFlipped] = useState(false);\n const row = (label: string, detail: string, value: boolean, onPress: () => void) => (\n <Pressable\n onPress={onPress}\n accessibilityRole=\"switch\"\n accessibilityState={{ checked: value }}\n style={{ flexDirection: 'row', alignItems: 'center', gap: 12, paddingVertical: 12 }}\n >\n <View style={{ flex: 1 }}>\n <Text style={{ color: colors.foreground, fontSize: 15, fontWeight: '500' }}>{label}</Text>\n <Text style={{ color: colors.mutedForeground, fontSize: 12 }}>{detail}</Text>\n </View>\n <View style={{ width: 46, height: 28, borderRadius: 14, padding: 3, backgroundColor: value ? colors.success : alpha(colors.mutedForeground, 0.3) }}>\n <View style={{ width: 22, height: 22, borderRadius: 11, backgroundColor: '#ffffff', alignSelf: value ? 'flex-end' : 'flex-start' }} />\n </View>\n </Pressable>\n );\n return (\n <View style={{ gap: 14 }}>\n <Header title=\"Manage card\" sub=\"Changes apply instantly\" />\n <PaymentCard\n image={art(888)}\n bank=\"Northwind\"\n label=\"Platinum\"\n number=\"4821 7590 3321 7752\"\n name=\"Maya Patel\"\n expiry=\"11/28\"\n cvv=\"219\"\n brand=\"visa\"\n chip=\"silver\"\n masked={!shown}\n frozen={frozen}\n flipped={flipped}\n onFlip={setFlipped}\n />\n <View>\n {row('Show card number', 'Hidden again when you leave', shown, () => setShown((v) => !v))}\n {row('Show CVV', 'Turns the card over', flipped, () => setFlipped((v) => !v))}\n {row('Freeze card', 'Blocks new payments instantly', frozen, () => setFrozen((v) => !v))}\n </View>\n </View>\n );\n}\n"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "ChooseDesign",
|
|
160
|
+
"title": "Choose Design",
|
|
161
|
+
"code": "import React, { useState } from 'react';\nimport { Image, Pressable, Text, View } from 'react-native';\nimport { PaymentCard } from '@/components/ui/payment-card';\nimport { alpha, useKit } from '@/lib/kit';\n\n/** Soft, blurred photos make premium card art — any image works (`require()` or a URL). */\nconst art = (id: number) => ({ uri: `https://picsum.photos/id/${id}/240/151?blur=10` });\n\n/** A screen title, as it sits above the card in your app. */\nfunction Header({ title, sub, right }: { title: string; sub?: string; right?: React.ReactNode }) {\n const { colors } = useKit();\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>\n <View style={{ flex: 1 }}>\n <Text style={{ color: colors.foreground, fontSize: 22, fontWeight: '700', letterSpacing: -0.4 }}>{title}</Text>\n {sub ? <Text style={{ color: colors.mutedForeground, fontSize: 13, marginTop: 2 }}>{sub}</Text> : null}\n </View>\n {right}\n </View>\n );\n}\n\nconst DESIGNS = [\n { key: 'meadow', image: art(189) },\n { key: 'lagoon', image: art(846) },\n { key: 'violet', image: art(888) },\n { key: 'dusk', image: art(721) },\n { key: 'night', image: art(765) },\n];\n\nexport default function ChooseDesign() {\n const { colors } = useKit();\n const [pick, setPick] = useState(0);\n return (\n <View style={{ gap: 16 }}>\n <Header title=\"Pick your card\" sub=\"Your design ships in 3–5 days\" />\n <PaymentCard\n image={DESIGNS[pick].image}\n bank=\"Northwind\"\n label=\"Debit\"\n number=\"6521 4400 9911 4410\"\n name=\"Maya Patel\"\n expiry=\"01/30\"\n brand=\"rupay\"\n />\n <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n {DESIGNS.map((d, i) => {\n const on = i === pick;\n return (\n <Pressable\n key={d.key}\n onPress={() => setPick(i)}\n accessibilityRole=\"radio\"\n accessibilityLabel={d.key}\n accessibilityState={{ selected: on }}\n style={{ padding: 2, borderRadius: 10, borderWidth: 2, borderColor: on ? colors.foreground : 'transparent' }}\n >\n <Image alt=\"\" source={d.image} style={{ width: 52, height: 33, borderRadius: 6, backgroundColor: colors.muted }} />\n </Pressable>\n );\n })}\n </View>\n <Pressable accessibilityRole=\"button\" style={{ alignItems: 'center', paddingVertical: 14, borderRadius: 14, backgroundColor: colors.primary, marginTop: 8 }}>\n <Text style={{ color: colors.primaryForeground, fontSize: 15, fontWeight: '600' }}>Order this card</Text>\n </Pressable>\n </View>\n );\n}\n"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "AddCard",
|
|
165
|
+
"title": "Add Card",
|
|
166
|
+
"code": "import React, { useState } from 'react';\nimport { Image, Pressable, Text, View } from 'react-native';\nimport { PaymentCard } from '@/components/ui/payment-card';\nimport { alpha, useKit } from '@/lib/kit';\n\n/** A screen title, as it sits above the card in your app. */\nfunction Header({ title, sub, right }: { title: string; sub?: string; right?: React.ReactNode }) {\n const { colors } = useKit();\n return (\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 12 }}>\n <View style={{ flex: 1 }}>\n <Text style={{ color: colors.foreground, fontSize: 22, fontWeight: '700', letterSpacing: -0.4 }}>{title}</Text>\n {sub ? <Text style={{ color: colors.mutedForeground, fontSize: 13, marginTop: 2 }}>{sub}</Text> : null}\n </View>\n {right}\n </View>\n );\n}\n\nexport default function AddCard() {\n const { colors } = useKit();\n const [digits, setDigits] = useState('4821');\n const keys = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];\n return (\n <View style={{ gap: 16 }}>\n <Header title=\"Add a card\" sub=\"Type the number on the front\" />\n <PaymentCard bank=\"New card\" number={digits.padEnd(16, '•')} name=\"Your name\" expiry=\"MM/YY\" brand=\"visa\" chip=\"silver\" masked={false} />\n <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 8, justifyContent: 'center' }}>\n {keys.map((k) => (\n <Pressable\n key={k}\n onPress={() => setDigits((d) => (d.length >= 16 ? '4821' : d + k))}\n accessibilityRole=\"button\"\n style={{ width: 58, height: 46, borderRadius: 12, alignItems: 'center', justifyContent: 'center', backgroundColor: colors.muted }}\n >\n <Text style={{ color: colors.foreground, fontSize: 19, fontWeight: '500' }}>{k}</Text>\n </Pressable>\n ))}\n </View>\n </View>\n );\n}\n"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pixel-bar",
|
|
3
|
+
"category": "Charts",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PixelBarChart",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/charts/pixel-bar.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": null,
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"data",
|
|
13
|
+
"{ label, value, color? }[]",
|
|
14
|
+
"—",
|
|
15
|
+
"One block per category."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"height",
|
|
19
|
+
"number",
|
|
20
|
+
"240",
|
|
21
|
+
"Chart height."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"animate",
|
|
25
|
+
"boolean",
|
|
26
|
+
"true",
|
|
27
|
+
"Entrance animation."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"isLoading",
|
|
31
|
+
"boolean",
|
|
32
|
+
"false",
|
|
33
|
+
"Skeleton state."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"formatValue",
|
|
37
|
+
"(v) => string",
|
|
38
|
+
"compact",
|
|
39
|
+
"Value formatting."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"onSelect",
|
|
43
|
+
"(item, index) => void",
|
|
44
|
+
"—",
|
|
45
|
+
"Tap callback."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"levels",
|
|
49
|
+
"number",
|
|
50
|
+
"10",
|
|
51
|
+
"Squares per column."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"gap",
|
|
55
|
+
"number",
|
|
56
|
+
"2",
|
|
57
|
+
"Gap between squares."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"gradient",
|
|
61
|
+
"boolean",
|
|
62
|
+
"true",
|
|
63
|
+
"Fade colour upwards."
|
|
64
|
+
]
|
|
65
|
+
],
|
|
66
|
+
"behavior": [],
|
|
67
|
+
"usage": null,
|
|
68
|
+
"examples": []
|
|
69
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "polar-area",
|
|
3
|
+
"category": "Charts",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PolarAreaChart",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/charts/polar-area.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": null,
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"data",
|
|
13
|
+
"Datum[]",
|
|
14
|
+
"—",
|
|
15
|
+
"Rows like [{ browser: \"chrome\", visitors: 275 }]."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"nameKey / valueKey",
|
|
19
|
+
"string",
|
|
20
|
+
"\"name\" / \"value\"",
|
|
21
|
+
"Which keys hold the label and the number."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"config",
|
|
25
|
+
"ChartConfig",
|
|
26
|
+
"—",
|
|
27
|
+
"Labels / colours keyed by name."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"size",
|
|
31
|
+
"number",
|
|
32
|
+
"260",
|
|
33
|
+
"Diameter."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"showLegend",
|
|
37
|
+
"boolean",
|
|
38
|
+
"false",
|
|
39
|
+
"Legend under the chart."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"legendVariant",
|
|
43
|
+
"LegendVariant",
|
|
44
|
+
"\"rounded-square\"",
|
|
45
|
+
"Legend marker style."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"glow",
|
|
49
|
+
"boolean | string[]",
|
|
50
|
+
"false",
|
|
51
|
+
"Glow every segment or only named ones."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"isLoading",
|
|
55
|
+
"boolean",
|
|
56
|
+
"false",
|
|
57
|
+
"Skeleton state."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"onSelect",
|
|
61
|
+
"(index, datum) => void",
|
|
62
|
+
"—",
|
|
63
|
+
"Selection callback."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"padAngle",
|
|
67
|
+
"number (deg)",
|
|
68
|
+
"2",
|
|
69
|
+
"Gap between petals."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"levels",
|
|
73
|
+
"number",
|
|
74
|
+
"4",
|
|
75
|
+
"Grid circles."
|
|
76
|
+
]
|
|
77
|
+
],
|
|
78
|
+
"behavior": [],
|
|
79
|
+
"usage": null,
|
|
80
|
+
"examples": []
|
|
81
|
+
}
|