@expokit/cli 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +32 -2
- package/bin/expo-kit.js +1204 -0
- package/bin/lib.mjs +343 -0
- package/bin/mcp.mjs +338 -0
- package/package.json +44 -4
- package/registry/_docs/accordion.json +99 -0
- package/registry/_docs/action-sheet.json +110 -0
- package/registry/_docs/alert.json +127 -0
- package/registry/_docs/avatar.json +203 -0
- package/registry/_docs/badge.json +117 -0
- package/registry/_docs/bottom-nav.json +119 -0
- package/registry/_docs/bottom-sheet.json +158 -0
- package/registry/_docs/bullet.json +24 -0
- package/registry/_docs/button-3d.json +122 -0
- package/registry/_docs/button.json +115 -0
- package/registry/_docs/calendar.json +182 -0
- package/registry/_docs/card-stack.json +108 -0
- package/registry/_docs/card.json +111 -0
- package/registry/_docs/carousel.json +102 -0
- package/registry/_docs/checkbox.json +93 -0
- package/registry/_docs/checkout.json +102 -0
- package/registry/_docs/chip-group.json +116 -0
- package/registry/_docs/color-swatch.json +66 -0
- package/registry/_docs/confetti.json +82 -0
- package/registry/_docs/coupon.json +176 -0
- package/registry/_docs/cube-pager.json +84 -0
- package/registry/_docs/dashboard.json +120 -0
- package/registry/_docs/date-picker.json +249 -0
- package/registry/_docs/dialog.json +162 -0
- package/registry/_docs/drawer.json +171 -0
- package/registry/_docs/fab.json +120 -0
- package/registry/_docs/flip-card.json +111 -0
- package/registry/_docs/floating-input.json +191 -0
- package/registry/_docs/gift-card.json +108 -0
- package/registry/_docs/glass-button.json +118 -0
- package/registry/_docs/glass-nav-bar.json +78 -0
- package/registry/_docs/glass-search-bar.json +90 -0
- package/registry/_docs/glass-segmented.json +66 -0
- package/registry/_docs/glass-sheet.json +108 -0
- package/registry/_docs/glass-tab-bar.json +76 -0
- package/registry/_docs/glass.json +78 -0
- package/registry/_docs/inbox.json +72 -0
- package/registry/_docs/isometric-bar.json +72 -0
- package/registry/_docs/kit.json +11 -0
- package/registry/_docs/kpi-card.json +11 -0
- package/registry/_docs/like-button.json +72 -0
- package/registry/_docs/liquidglass-tab.json +27 -0
- package/registry/_docs/list-item.json +200 -0
- package/registry/_docs/loyalty-card.json +108 -0
- package/registry/_docs/morph-button.json +108 -0
- package/registry/_docs/number-ticker.json +96 -0
- package/registry/_docs/offers.json +78 -0
- package/registry/_docs/onboarding.json +66 -0
- package/registry/_docs/otp-input.json +134 -0
- package/registry/_docs/pagination-dots.json +88 -0
- package/registry/_docs/parallax-layers.json +84 -0
- package/registry/_docs/parallax-scroll.json +186 -0
- package/registry/_docs/password-input.json +92 -0
- package/registry/_docs/payment-card.json +153 -0
- package/registry/_docs/pixel-bar.json +66 -0
- package/registry/_docs/polar-area.json +78 -0
- package/registry/_docs/profile.json +84 -0
- package/registry/_docs/progress-steps.json +92 -0
- package/registry/_docs/progress.json +132 -0
- package/registry/_docs/radio-group.json +92 -0
- package/registry/_docs/rating.json +90 -0
- package/registry/_docs/ring-carousel.json +102 -0
- package/registry/_docs/scratch-card.json +90 -0
- package/registry/_docs/search-bar.json +140 -0
- package/registry/_docs/search-results.json +120 -0
- package/registry/_docs/segmented-control.json +103 -0
- package/registry/_docs/select.json +252 -0
- package/registry/_docs/settings.json +72 -0
- package/registry/_docs/shimmer-button.json +78 -0
- package/registry/_docs/sign-in.json +198 -0
- package/registry/_docs/skeleton.json +142 -0
- package/registry/_docs/slide-to-confirm.json +84 -0
- package/registry/_docs/slider.json +157 -0
- package/registry/_docs/spin-wheel.json +114 -0
- package/registry/_docs/spinner.json +91 -0
- package/registry/_docs/stepper.json +168 -0
- package/registry/_docs/swipe-deck.json +102 -0
- package/registry/_docs/swipeable-row.json +72 -0
- package/registry/_docs/switch.json +104 -0
- package/registry/_docs/tabs.json +105 -0
- package/registry/_docs/tag-input.json +128 -0
- package/registry/_docs/textarea.json +175 -0
- package/registry/_docs/ticket-card.json +174 -0
- package/registry/_docs/ticket-shape.json +11 -0
- package/registry/_docs/tilt-card.json +141 -0
- package/registry/_docs/time-picker.json +253 -0
- package/registry/_docs/timeline-chart.json +30 -0
- package/registry/_docs/timeline.json +156 -0
- package/registry/_docs/toast.json +161 -0
- package/registry/_docs/treemap.json +30 -0
- package/registry/_docs/waterfall.json +36 -0
- package/registry/_docs/wheel-list.json +102 -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 +316 -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/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 +335 -0
- package/registry/spinner/files/src/lib/kit.tsx +219 -0
- package/registry/spinner.json +17 -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/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,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "onboarding",
|
|
3
|
+
"category": "Blocks",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "Onboarding",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/blocks/onboarding.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"steps",
|
|
12
|
+
"{ title, body, illustration?, color? }[]",
|
|
13
|
+
"3 product steps",
|
|
14
|
+
"Pages to show. illustration is a node or 'capture' | 'insights' | 'together'."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"onDone",
|
|
18
|
+
"() => void",
|
|
19
|
+
"—",
|
|
20
|
+
"Pressed the final button."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"onSkip",
|
|
24
|
+
"() => void",
|
|
25
|
+
"onDone",
|
|
26
|
+
"Pressed Skip."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"onIndexChange",
|
|
30
|
+
"(index: number) => void",
|
|
31
|
+
"—",
|
|
32
|
+
"The visible step changed."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"skipLabel",
|
|
36
|
+
"string",
|
|
37
|
+
"'Skip'",
|
|
38
|
+
"Skip button text."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"nextLabel",
|
|
42
|
+
"string",
|
|
43
|
+
"'Next'",
|
|
44
|
+
"Accessibility label of the round next button."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"doneLabel",
|
|
48
|
+
"string",
|
|
49
|
+
"'Get started'",
|
|
50
|
+
"Button text on the last step."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"accent",
|
|
54
|
+
"string",
|
|
55
|
+
"theme accent",
|
|
56
|
+
"Active dot, primary button and built-in illustration colour."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"style",
|
|
60
|
+
"StyleProp<ViewStyle>",
|
|
61
|
+
"—",
|
|
62
|
+
"Root style."
|
|
63
|
+
]
|
|
64
|
+
],
|
|
65
|
+
"examples": []
|
|
66
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "otp-input",
|
|
3
|
+
"category": "Inputs",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "OtpInput",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/otp-input.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"length",
|
|
12
|
+
"number",
|
|
13
|
+
"6",
|
|
14
|
+
"Number of cells."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"value / onChangeText",
|
|
18
|
+
"string",
|
|
19
|
+
"—",
|
|
20
|
+
"Controlled code (digits only). Pasting a longer string fills every cell."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"onComplete",
|
|
24
|
+
"(code) => void",
|
|
25
|
+
"—",
|
|
26
|
+
"Called when every cell is filled."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"variant",
|
|
30
|
+
"\"box\" | \"underline\" | \"pill\"",
|
|
31
|
+
"\"box\"",
|
|
32
|
+
"Rounded box cells, underline bars, or round pill cells."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"error",
|
|
36
|
+
"boolean",
|
|
37
|
+
"false",
|
|
38
|
+
"Shakes the row and turns it the danger colour."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"errorText",
|
|
42
|
+
"string",
|
|
43
|
+
"—",
|
|
44
|
+
"Message (with icon) shown under the cells while `error` is set."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"success",
|
|
48
|
+
"boolean",
|
|
49
|
+
"false",
|
|
50
|
+
"Success colour with a staggered pulse across the cells."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"successText",
|
|
54
|
+
"string",
|
|
55
|
+
"—",
|
|
56
|
+
"Message with an animated check shown while `success` is set."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"helperText",
|
|
60
|
+
"string",
|
|
61
|
+
"—",
|
|
62
|
+
"Hint shown under the cells otherwise."
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"separatorAfter",
|
|
66
|
+
"number",
|
|
67
|
+
"—",
|
|
68
|
+
"Draw a dash after this many cells, e.g. 3 → 123 – 456."
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"maxCellSize",
|
|
72
|
+
"number",
|
|
73
|
+
"52",
|
|
74
|
+
"Largest cell width; cells shrink to fit the row and never overflow."
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"secure",
|
|
78
|
+
"boolean",
|
|
79
|
+
"false",
|
|
80
|
+
"Dots instead of digits."
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"disabled",
|
|
84
|
+
"boolean",
|
|
85
|
+
"false",
|
|
86
|
+
"Dims and blocks input."
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
"autoFocus",
|
|
90
|
+
"boolean",
|
|
91
|
+
"false",
|
|
92
|
+
"Focus on mount."
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
"accent",
|
|
96
|
+
"string",
|
|
97
|
+
"theme accent",
|
|
98
|
+
"Active cell colour."
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"style",
|
|
102
|
+
"StyleProp<ViewStyle>",
|
|
103
|
+
"—",
|
|
104
|
+
"Style for the root view around the cells and message."
|
|
105
|
+
]
|
|
106
|
+
],
|
|
107
|
+
"examples": [
|
|
108
|
+
{
|
|
109
|
+
"name": "VerifyPhone",
|
|
110
|
+
"title": "Verify Phone",
|
|
111
|
+
"code": "import React, { useEffect, useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { OtpInput } from '@/components/ui/otp-input';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { padding: 16, gap: 12, borderRadius: radius.xl, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nfunction Header({ title, body }: { title: string; body: string }) {\n const { colors } = useKit();\n return (\n <View style={{ gap: 4, alignItems: 'center' }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground, textAlign: 'center' }}>{title}</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground, textAlign: 'center' }}>{body}</Text>\n </View>\n );\n}\n\nexport default function VerifyPhone() {\n const { colors } = useKit();\n const [code, setCode] = useState('');\n const [left, setLeft] = useState(24);\n useEffect(() => {\n if (left <= 0) return;\n const id = setTimeout(() => setLeft((s) => s - 1), 1000);\n return () => clearTimeout(id);\n }, [left]);\n const done = code.length === 6;\n return (\n <Card>\n <Header title=\"Verify your number\" body=\"Enter the code sent to +91 98•••• 4210\" />\n <OtpInput\n value={code}\n onChangeText={setCode}\n success={code === '123456'}\n error={done && code !== '123456'}\n successText=\"Number verified\"\n errorText=\"That code didn't match. Try 123456.\"\n helperText=\"Tip: the demo code is 123456\"\n />\n <View style={{ flexDirection: 'row', justifyContent: 'center', gap: 16 }}>\n <Pressable disabled={left > 0} onPress={() => { setLeft(24); setCode(''); }} hitSlop={10}>\n <Text style={{ fontSize: 13, fontWeight: '400', color: left > 0 ? colors.mutedForeground : colors.accent }}>\n {left > 0 ? `Resend in 0:${String(left).padStart(2, '0')}` : 'Resend code'}\n </Text>\n </Pressable>\n <Pressable hitSlop={10} accessibilityRole=\"button\">\n <Text style={{ fontSize: 13, fontWeight: '400', color: colors.accent }}>Change number</Text>\n </Pressable>\n </View>\n </Card>\n );\n}\n"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "Pin",
|
|
115
|
+
"title": "Pin",
|
|
116
|
+
"code": "import React, { useEffect, useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { OtpInput } from '@/components/ui/otp-input';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { padding: 16, gap: 12, borderRadius: radius.xl, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nfunction Header({ title, body }: { title: string; body: string }) {\n const { colors } = useKit();\n return (\n <View style={{ gap: 4, alignItems: 'center' }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground, textAlign: 'center' }}>{title}</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground, textAlign: 'center' }}>{body}</Text>\n </View>\n );\n}\n\nexport default function Pin() {\n const [pin, setPin] = useState('');\n return (\n <Card>\n <Header title=\"Enter your PIN\" body=\"Confirm the transfer of ₹2,400 to Ananya\" />\n <OtpInput variant=\"pill\" length={4} secure value={pin} onChangeText={setPin} maxCellSize={56} />\n </Card>\n );\n}\n"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "Underline",
|
|
120
|
+
"title": "Underline",
|
|
121
|
+
"code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { OtpInput } from '@/components/ui/otp-input';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { padding: 16, gap: 12, borderRadius: radius.xl, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nfunction Header({ title, body }: { title: string; body: string }) {\n const { colors } = useKit();\n return (\n <View style={{ gap: 4, alignItems: 'center' }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground, textAlign: 'center' }}>{title}</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground, textAlign: 'center' }}>{body}</Text>\n </View>\n );\n}\n\nexport default function Underline() {\n return (\n <Card>\n <Header title=\"Check your inbox\" body=\"We emailed a 6-digit code to karan@…\" />\n <OtpInput variant=\"underline\" helperText=\"Code expires in 10 minutes\" />\n </Card>\n );\n}\n"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"name": "WithSeparator",
|
|
125
|
+
"title": "With Separator",
|
|
126
|
+
"code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { OtpInput } from '@/components/ui/otp-input';\nimport { useKit } from '@/lib/kit';\n\n/** Demo card that follows the kit theme, so the docs radius / accent picker reshapes it too. */\nfunction Card({ style, ...rest }: ViewProps) {\n const { colors, radius } = useKit();\n return (\n <View\n style={[\n { padding: 16, gap: 12, borderRadius: radius.xl, borderWidth: StyleSheet.hairlineWidth, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\nfunction Header({ title, body }: { title: string; body: string }) {\n const { colors } = useKit();\n return (\n <View style={{ gap: 4, alignItems: 'center' }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground, textAlign: 'center' }}>{title}</Text>\n <Text style={{ fontSize: 13, color: colors.mutedForeground, textAlign: 'center' }}>{body}</Text>\n </View>\n );\n}\n\nexport default function WithSeparator() {\n return (\n <Card>\n <Header title=\"Two-factor authentication\" body=\"Open your authenticator app\" />\n <OtpInput separatorAfter={3} maxCellSize={46} />\n </Card>\n );\n}\n"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "States",
|
|
130
|
+
"title": "States",
|
|
131
|
+
"code": "import { Pressable, StyleSheet, Text, View, type ViewProps } from 'react-native';\nimport { OtpInput } from '@/components/ui/otp-input';\n\nexport default function States() {\n return (\n <View style={{ gap: 18 }}>\n <OtpInput length={4} value=\"4821\" success successText=\"Verified\" />\n <OtpInput length={4} value=\"1093\" error errorText=\"Incorrect code\" />\n <OtpInput length={4} value=\"72\" disabled helperText=\"Too many attempts — try again in 5 min\" />\n </View>\n );\n}\n"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pagination-dots",
|
|
3
|
+
"category": "Display",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PaginationDots",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/pagination-dots.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"count",
|
|
12
|
+
"number",
|
|
13
|
+
"—",
|
|
14
|
+
"Number of pages."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"index",
|
|
18
|
+
"number",
|
|
19
|
+
"0",
|
|
20
|
+
"Active page; changes spring the indicator across."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"progress",
|
|
24
|
+
"Animated.Value | AnimatedInterpolation | number",
|
|
25
|
+
"—",
|
|
26
|
+
"Live page position (e.g. Animated.divide(scrollX, width)) for smooth tracking while swiping. Use useNativeDriver: false for the 'dots' variant."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"variant",
|
|
30
|
+
"\"dots\" | \"scale\" | \"line\" | \"numbers\"",
|
|
31
|
+
"\"dots\"",
|
|
32
|
+
"Stretching pill · growing dot · filling segments · rolling \"2 / 5\"."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"size",
|
|
36
|
+
"\"sm\" | \"md\" | \"lg\"",
|
|
37
|
+
"\"md\"",
|
|
38
|
+
"6 / 8 / 10pt dots."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"onPress",
|
|
42
|
+
"(index: number) => void",
|
|
43
|
+
"—",
|
|
44
|
+
"Makes dots tappable (44pt hit area) and enables accessibility increment / decrement."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"accent",
|
|
48
|
+
"string",
|
|
49
|
+
"theme accent",
|
|
50
|
+
"Active colour."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"inactiveColor",
|
|
54
|
+
"string",
|
|
55
|
+
"18% foreground",
|
|
56
|
+
"Inactive dot colour."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"accessibilityLabel",
|
|
60
|
+
"string",
|
|
61
|
+
"\"Page\"",
|
|
62
|
+
"Announced with \"2 of 5\"."
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"style",
|
|
66
|
+
"StyleProp<ViewStyle>",
|
|
67
|
+
"—",
|
|
68
|
+
"Style for the row of dots (the numbers pill or line track in those variants)."
|
|
69
|
+
]
|
|
70
|
+
],
|
|
71
|
+
"examples": [
|
|
72
|
+
{
|
|
73
|
+
"name": "Onboarding",
|
|
74
|
+
"title": "Onboarding",
|
|
75
|
+
"code": "import React, { useMemo, useRef, useState } from 'react';\nimport { Animated, Pressable, ScrollView, Text, View } from 'react-native';\nimport { PaginationDots } from '@/components/ui/pagination-dots';\nimport { useKit } from '@/lib/kit';\n\nconst PAGES: { color?: string; kicker: string; title: string; body: string }[] = [\n { kicker: 'PLAN', title: 'Plan your week in minutes', body: 'Drag tasks onto your calendar and we block the time for you.' },\n { color: '#0ea5e9', kicker: 'FOCUS', title: 'Stay in the zone', body: 'Focus sessions silence notifications until your block ends.' },\n { color: '#10b981', kicker: 'REVIEW', title: 'See what moved', body: 'A Friday recap shows what you shipped and what slipped.' },\n { color: '#f59e0b', kicker: 'SHARE', title: 'Bring your team along', body: 'Shared boards keep everyone on the same page.' },\n];\n\nexport default function Onboarding() {\n const { colors, radius } = useKit();\n const [width, setWidth] = useState(0);\n const [page, setPage] = useState(0);\n const scrollX = useRef(new Animated.Value(0)).current;\n const ref = useRef<ScrollView>(null);\n const progress = useMemo(() => (width ? Animated.divide(scrollX, width) : 0), [scrollX, width]);\n const go = (i: number) => ref.current?.scrollTo({ x: i * width, animated: true });\n\n return (\n <View style={{ gap: 18 }} onLayout={(e) => setWidth(e.nativeEvent.layout.width)}>\n <Animated.ScrollView\n ref={ref}\n horizontal\n pagingEnabled\n showsHorizontalScrollIndicator={false}\n scrollEventThrottle={16}\n onScroll={Animated.event([{ nativeEvent: { contentOffset: { x: scrollX } } }], { useNativeDriver: false })}\n onMomentumScrollEnd={(e) => width && setPage(Math.round(e.nativeEvent.contentOffset.x / width))}\n >\n {PAGES.map((p) => (\n <View key={p.title} style={{ width: width || 1, paddingHorizontal: 2 }}>\n <View style={{ height: 210, borderRadius: radius.scale(24), backgroundColor: p.color ?? colors.accent, padding: 22, justifyContent: 'flex-end' }}>\n <Text style={{ color: 'rgba(255,255,255,0.75)', fontSize: 12, fontWeight: '400', letterSpacing: 1.2 }}>{p.kicker}</Text>\n <Text style={{ color: '#fff', fontSize: 24, fontWeight: '400', letterSpacing: -0.5, marginTop: 6 }}>{p.title}</Text>\n <Text style={{ color: 'rgba(255,255,255,0.85)', fontSize: 14, lineHeight: 20, marginTop: 6 }}>{p.body}</Text>\n </View>\n </View>\n ))}\n </Animated.ScrollView>\n <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>\n <Pressable onPress={() => go(PAGES.length - 1)} hitSlop={12} accessibilityRole=\"button\">\n <Text style={{ fontSize: 15, fontWeight: '400', color: colors.mutedForeground }}>Skip</Text>\n </Pressable>\n <PaginationDots count={PAGES.length} progress={progress} onPress={go} accessibilityLabel=\"Onboarding page\" />\n <Pressable\n onPress={() => go(Math.min(PAGES.length - 1, page + 1))}\n accessibilityRole=\"button\"\n style={{ height: 44, paddingHorizontal: 18, borderRadius: radius.capsule(44), backgroundColor: colors.accent, justifyContent: 'center' }}\n >\n <Text style={{ fontSize: 15, fontWeight: '400', color: colors.accentForeground }}>{page === PAGES.length - 1 ? 'Done' : 'Next'}</Text>\n </Pressable>\n </View>\n </View>\n );\n}\n"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "Variants",
|
|
79
|
+
"title": "Variants",
|
|
80
|
+
"code": "import React, { useMemo, useRef, useState } from 'react';\nimport { Animated, Pressable, ScrollView, Text, View } from 'react-native';\nimport { PaginationDots } from '@/components/ui/pagination-dots';\nimport { useKit } from '@/lib/kit';\n\nfunction Label({ children }: { children: string }) {\n const { colors } = useKit();\n return <Text style={{ fontSize: 12, fontWeight: '400', letterSpacing: 0.4, color: colors.mutedForeground }}>{children}</Text>;\n}\n\nexport default function Variants() {\n const { colors, radius } = useKit();\n const [i, setI] = useState(1);\n return (\n <View style={{ gap: 22 }}>\n {(['dots', 'scale', 'line', 'numbers'] as const).map((variant) => (\n <View key={variant} style={{ gap: 10 }}>\n <Label>{variant.toUpperCase()}</Label>\n <PaginationDots variant={variant} count={5} index={i} onPress={setI} />\n </View>\n ))}\n <View style={{ flexDirection: 'row', gap: 10, justifyContent: 'center' }}>\n {['Previous', 'Next'].map((t, k) => (\n <Pressable\n key={t}\n onPress={() => setI((v) => Math.max(0, Math.min(4, v + (k ? 1 : -1))))}\n accessibilityRole=\"button\"\n style={{ height: 44, paddingHorizontal: 18, borderRadius: radius.md, borderWidth: 1, borderColor: colors.border, justifyContent: 'center' }}\n >\n <Text style={{ fontSize: 14, fontWeight: '400', color: colors.foreground }}>{t}</Text>\n </Pressable>\n ))}\n </View>\n </View>\n );\n}\n"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "Sizes",
|
|
84
|
+
"title": "Sizes",
|
|
85
|
+
"code": "import { Animated, Pressable, ScrollView, Text, View } from 'react-native';\nimport { PaginationDots } from '@/components/ui/pagination-dots';\n\nexport default function Sizes() {\n return (\n <View style={{ gap: 18, alignItems: 'center' }}>\n <PaginationDots size=\"sm\" count={6} index={2} />\n <PaginationDots size=\"md\" count={6} index={2} />\n <PaginationDots size=\"lg\" count={6} index={2} />\n </View>\n );\n}\n"
|
|
86
|
+
}
|
|
87
|
+
]
|
|
88
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "parallax-layers",
|
|
3
|
+
"category": "3D",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "ParallaxLayers",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/parallax-layers.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"children",
|
|
12
|
+
"ParallaxLayer[]",
|
|
13
|
+
"—",
|
|
14
|
+
"Layers, back to front."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"height",
|
|
18
|
+
"number",
|
|
19
|
+
"260",
|
|
20
|
+
"Scene height."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"travel",
|
|
24
|
+
"number",
|
|
25
|
+
"22",
|
|
26
|
+
"How far a depth-1 layer moves, in points."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"tilt",
|
|
30
|
+
"number",
|
|
31
|
+
"8",
|
|
32
|
+
"Scene tilt in degrees; 0 for flat parallax."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"idle",
|
|
36
|
+
"boolean",
|
|
37
|
+
"true",
|
|
38
|
+
"Drift on its own while untouched."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"clip",
|
|
42
|
+
"boolean",
|
|
43
|
+
"true",
|
|
44
|
+
"Clip layers to the scene's rounded box."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"accessibilityLabel",
|
|
48
|
+
"string",
|
|
49
|
+
"—",
|
|
50
|
+
"Describes the scene for screen readers."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"radius",
|
|
54
|
+
"number",
|
|
55
|
+
"24",
|
|
56
|
+
"Corner radius of the scene."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"style",
|
|
60
|
+
"StyleProp<ViewStyle>",
|
|
61
|
+
"—",
|
|
62
|
+
"Style for the scene."
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"ParallaxLayer.depth",
|
|
66
|
+
"number",
|
|
67
|
+
"0.5",
|
|
68
|
+
"0 stays put, 1 moves the full travel, negative moves the other way."
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"ParallaxLayer.scale",
|
|
72
|
+
"number",
|
|
73
|
+
"far layers grow slightly",
|
|
74
|
+
"Extra scale; far layers (depth ≤ 0.35) grow just enough to hide their edges."
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"ParallaxLayer.style",
|
|
78
|
+
"StyleProp<ViewStyle>",
|
|
79
|
+
"—",
|
|
80
|
+
"Style for the layer (it fills the scene)."
|
|
81
|
+
]
|
|
82
|
+
],
|
|
83
|
+
"examples": []
|
|
84
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "parallax-scroll",
|
|
3
|
+
"category": "3D",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "ParallaxScrollView",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/parallax-scroll.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"children",
|
|
12
|
+
"ReactNode",
|
|
13
|
+
"—",
|
|
14
|
+
"The screen's content, under the header."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"header",
|
|
18
|
+
"ReactNode",
|
|
19
|
+
"—",
|
|
20
|
+
"Fills the header area: a photo, a map, a gallery (wins over headerImage)."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"headerImage",
|
|
24
|
+
"ImageSourcePropType",
|
|
25
|
+
"—",
|
|
26
|
+
"Shortcut for a full-bleed header photo."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"headerAccessibilityLabel",
|
|
30
|
+
"string",
|
|
31
|
+
"—",
|
|
32
|
+
"Describes headerImage for screen readers (skipped when omitted)."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"headerHeight",
|
|
36
|
+
"number",
|
|
37
|
+
"300",
|
|
38
|
+
"Header height, including the part under the status bar."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"headerSpeed",
|
|
42
|
+
"number",
|
|
43
|
+
"0.5",
|
|
44
|
+
"How the header moves while scrolling up: 0 scrolls with the content, 1 stays pinned while the content slides over it."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"stretch",
|
|
48
|
+
"boolean",
|
|
49
|
+
"true",
|
|
50
|
+
"iOS: pulling down stretches the header to fill the gap, anchored at the top. Turn off with a refreshControl."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"headerOverlay",
|
|
54
|
+
"ReactNode",
|
|
55
|
+
"—",
|
|
56
|
+
"Pinned to the bottom of the header (a title over the photo); lifts and fades as it scrolls away, over a bottom scrim."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"title",
|
|
60
|
+
"string",
|
|
61
|
+
"—",
|
|
62
|
+
"Ready-made top bar (theme background, hairline, centred title) that fades in once the header has scrolled under it."
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"bar",
|
|
66
|
+
"ReactNode",
|
|
67
|
+
"—",
|
|
68
|
+
"Your own bar instead: fills the bar area (topInset included) and fades in the same way. Decorative — buttons go in barLeft / barRight."
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"barLeft / barRight",
|
|
72
|
+
"ReactNode",
|
|
73
|
+
"—",
|
|
74
|
+
"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."
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"barHeight",
|
|
78
|
+
"number",
|
|
79
|
+
"52",
|
|
80
|
+
"Height of the bar row, below topInset."
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"topInset",
|
|
84
|
+
"number",
|
|
85
|
+
"0",
|
|
86
|
+
"Space above the bar for the status bar / notch — pass your safe-area top inset."
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
"contentContainerStyle",
|
|
90
|
+
"StyleProp<ViewStyle>",
|
|
91
|
+
"—",
|
|
92
|
+
"Style for the content under the header (padding, gap, background — theme background by default)."
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
"style",
|
|
96
|
+
"StyleProp<ViewStyle>",
|
|
97
|
+
"—",
|
|
98
|
+
"Style for the outer frame (size, margins, radius). Fills its parent by default."
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"onScroll",
|
|
102
|
+
"(e) => void",
|
|
103
|
+
"—",
|
|
104
|
+
"JS handler called alongside the native parallax event. For UI-thread effects use useParallaxScroll().scroll instead of your own Animated.event."
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
"ref",
|
|
108
|
+
"Ref<ScrollView>",
|
|
109
|
+
"—",
|
|
110
|
+
"Forwarded to the scroll view, so you can call scrollTo."
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"…ScrollView props",
|
|
114
|
+
"ScrollViewProps",
|
|
115
|
+
"—",
|
|
116
|
+
"Everything else is passed to the scroll view (vertical only): refreshControl, onScrollEndDrag, nestedScrollEnabled…"
|
|
117
|
+
],
|
|
118
|
+
[
|
|
119
|
+
"ParallaxImage.source",
|
|
120
|
+
"ImageSourcePropType",
|
|
121
|
+
"—",
|
|
122
|
+
"The photo."
|
|
123
|
+
],
|
|
124
|
+
[
|
|
125
|
+
"ParallaxImage.height",
|
|
126
|
+
"number",
|
|
127
|
+
"200",
|
|
128
|
+
"Frame height."
|
|
129
|
+
],
|
|
130
|
+
[
|
|
131
|
+
"ParallaxImage.speed",
|
|
132
|
+
"number",
|
|
133
|
+
"0.3",
|
|
134
|
+
"How much slower than its frame the photo moves: 0 still, 1 fixed on screen, negative the other way."
|
|
135
|
+
],
|
|
136
|
+
[
|
|
137
|
+
"ParallaxImage.radius",
|
|
138
|
+
"number",
|
|
139
|
+
"radius.lg",
|
|
140
|
+
"Corner radius of the frame."
|
|
141
|
+
],
|
|
142
|
+
[
|
|
143
|
+
"ParallaxImage.scrim",
|
|
144
|
+
"boolean",
|
|
145
|
+
"on with children",
|
|
146
|
+
"Bottom gradient so white text reads on the photo."
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"ParallaxImage.children",
|
|
150
|
+
"ReactNode",
|
|
151
|
+
"—",
|
|
152
|
+
"Content over the photo, aligned to the bottom (a caption, a tag)."
|
|
153
|
+
],
|
|
154
|
+
[
|
|
155
|
+
"ParallaxImage.accessibilityLabel",
|
|
156
|
+
"string",
|
|
157
|
+
"—",
|
|
158
|
+
"Describes the photo for screen readers."
|
|
159
|
+
],
|
|
160
|
+
[
|
|
161
|
+
"ParallaxImage.style / imageStyle",
|
|
162
|
+
"StyleProp<ViewStyle> / StyleProp<ImageStyle>",
|
|
163
|
+
"—",
|
|
164
|
+
"Style for the frame / for the photo itself."
|
|
165
|
+
],
|
|
166
|
+
[
|
|
167
|
+
"ParallaxView.speed",
|
|
168
|
+
"number",
|
|
169
|
+
"0.2",
|
|
170
|
+
"Offset relative to the scroll: positive lags behind the content, negative leads it."
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
"ParallaxView.children / style",
|
|
174
|
+
"ReactNode / StyleProp<ViewStyle>",
|
|
175
|
+
"—",
|
|
176
|
+
"What drifts, and its style (the transform is taken by the parallax)."
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
"useParallaxScroll()",
|
|
180
|
+
"() => { scroll, viewport, contentHeight, contentRef } | null",
|
|
181
|
+
"—",
|
|
182
|
+
"The live scroll offset (native-driver friendly), viewport size and content size for your own effects; null outside a ParallaxScrollView."
|
|
183
|
+
]
|
|
184
|
+
],
|
|
185
|
+
"examples": []
|
|
186
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "password-input",
|
|
3
|
+
"category": "Inputs",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "PasswordInput",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/password-input.tsx"
|
|
8
|
+
],
|
|
9
|
+
"props": [
|
|
10
|
+
[
|
|
11
|
+
"strength",
|
|
12
|
+
"boolean",
|
|
13
|
+
"true",
|
|
14
|
+
"Show the animated strength meter."
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"score",
|
|
18
|
+
"(pw) => 0–4",
|
|
19
|
+
"built-in",
|
|
20
|
+
"Custom strength scorer."
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"requirements",
|
|
24
|
+
"{ label, test }[] | boolean",
|
|
25
|
+
"—",
|
|
26
|
+
"Checklist under the field; true uses DEFAULT_PASSWORD_REQUIREMENTS (8+ chars, upper & lower, number, symbol)."
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"confirmOf",
|
|
30
|
+
"string",
|
|
31
|
+
"—",
|
|
32
|
+
"Confirm-password mode: shows match / mismatch once the user types."
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"matchMessage / mismatchMessage",
|
|
36
|
+
"string",
|
|
37
|
+
"\"Passwords match\" / \"Passwords don't match\"",
|
|
38
|
+
"Copy for confirm mode."
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"floatingLabel",
|
|
42
|
+
"boolean",
|
|
43
|
+
"true",
|
|
44
|
+
"Passed to FloatingInput: set to false to put the label above the field (no notch) and show placeholder inside."
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"iconColor",
|
|
48
|
+
"string",
|
|
49
|
+
"theme mutedForeground",
|
|
50
|
+
"Eye / eye-off toggle and clear button colour."
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"fieldStyle / inputStyle / labelStyle / messageStyle / counterStyle",
|
|
54
|
+
"StyleProp",
|
|
55
|
+
"—",
|
|
56
|
+
"Style slots passed straight to FloatingInput — see Floating Input."
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"…FloatingInputProps",
|
|
60
|
+
"",
|
|
61
|
+
"",
|
|
62
|
+
"Every Floating Input prop (error, success, size, variant, …)."
|
|
63
|
+
]
|
|
64
|
+
],
|
|
65
|
+
"examples": [
|
|
66
|
+
{
|
|
67
|
+
"name": "CreatePassword",
|
|
68
|
+
"title": "Create Password",
|
|
69
|
+
"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"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "SignIn",
|
|
73
|
+
"title": "Sign In",
|
|
74
|
+
"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"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "StrengthMeter",
|
|
78
|
+
"title": "Strength Meter",
|
|
79
|
+
"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"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "CustomRules",
|
|
83
|
+
"title": "Custom Rules",
|
|
84
|
+
"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"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "WrongPassword",
|
|
88
|
+
"title": "Wrong Password",
|
|
89
|
+
"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"
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|