@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,269 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "time-picker",
|
|
3
|
+
"category": "Inputs",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "TimePicker",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/time-picker.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A time picker as 3D wheel drums, a draggable clock dial or bookable time chips.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"value",
|
|
13
|
+
"{ hours, minutes } | null",
|
|
14
|
+
"—",
|
|
15
|
+
"Controlled 24-hour time."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"defaultValue",
|
|
19
|
+
"{ hours, minutes } | null",
|
|
20
|
+
"null",
|
|
21
|
+
"Initial time when uncontrolled."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"onChange",
|
|
25
|
+
"(time: TimeValue) => void",
|
|
26
|
+
"—",
|
|
27
|
+
"Called when a wheel settles, the clock hand snaps or a chip is picked (or on Set when staged)."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"variant",
|
|
31
|
+
"'wheel' | 'chips' | 'clock'",
|
|
32
|
+
"'wheel'",
|
|
33
|
+
"3D wheel drums, a grid of time slots, or an analog dial (24-hour mode adds an inner 13–00 ring)."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"presentation",
|
|
37
|
+
"'inline' | 'sheet'",
|
|
38
|
+
"'inline'",
|
|
39
|
+
"Render in place, or as a field that opens a bottom sheet."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"hour12",
|
|
43
|
+
"boolean",
|
|
44
|
+
"from locale",
|
|
45
|
+
"12-hour clock: an AM / PM column on the wheel, an AM / PM toggle on the clock."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"minuteInterval",
|
|
49
|
+
"number",
|
|
50
|
+
"1 (wheel, clock) · 30 (chips)",
|
|
51
|
+
"Minute step for the wheel and the clock hand (the dial labels every 5); slot spacing for chips."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"locale",
|
|
55
|
+
"string",
|
|
56
|
+
"device",
|
|
57
|
+
"Used to pick 12h / 24h when hour12 is not set."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"startTime",
|
|
61
|
+
"'HH:mm' | TimeValue",
|
|
62
|
+
"'09:00'",
|
|
63
|
+
"Chips: first slot."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"endTime",
|
|
67
|
+
"'HH:mm' | TimeValue",
|
|
68
|
+
"'17:00'",
|
|
69
|
+
"Chips: closing time (exclusive)."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"slots",
|
|
73
|
+
"('HH:mm' | TimeValue)[]",
|
|
74
|
+
"—",
|
|
75
|
+
"Chips: explicit slot list instead of start / end / interval."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"bookedTimes",
|
|
79
|
+
"('HH:mm' | TimeValue)[]",
|
|
80
|
+
"—",
|
|
81
|
+
"Chips: taken slots, struck through and not selectable."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"disabledTimes",
|
|
85
|
+
"('HH:mm' | TimeValue)[]",
|
|
86
|
+
"—",
|
|
87
|
+
"Chips: slots unavailable for another reason (faded)."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"columns",
|
|
91
|
+
"number",
|
|
92
|
+
"3",
|
|
93
|
+
"Chips per row."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"groupByPeriod",
|
|
97
|
+
"boolean",
|
|
98
|
+
"false",
|
|
99
|
+
"Chips: Morning / Afternoon / Evening headings with an open-slot count."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"label",
|
|
103
|
+
"string",
|
|
104
|
+
"'Time'",
|
|
105
|
+
"Sheet: field label."
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"floatingLabel",
|
|
109
|
+
"boolean",
|
|
110
|
+
"true",
|
|
111
|
+
"Sheet: set to false to put the label above the field as static text (no notch) and show placeholder inside."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"title",
|
|
115
|
+
"string",
|
|
116
|
+
"label",
|
|
117
|
+
"Sheet: heading."
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"placeholder",
|
|
121
|
+
"string",
|
|
122
|
+
"'Select a time'",
|
|
123
|
+
"Sheet: shown while nothing is picked."
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"size",
|
|
127
|
+
"'sm' | 'md' | 'lg'",
|
|
128
|
+
"'md'",
|
|
129
|
+
"Sheet: field height and type size."
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"confirm",
|
|
133
|
+
"boolean",
|
|
134
|
+
"true for wheel and clock",
|
|
135
|
+
"Sheet: stage the choice behind Cancel / Set; chips otherwise close on pick."
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"error",
|
|
139
|
+
"string",
|
|
140
|
+
"—",
|
|
141
|
+
"Sheet: red border, icon message and a shake."
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
"success",
|
|
145
|
+
"boolean | string",
|
|
146
|
+
"—",
|
|
147
|
+
"Sheet: success border and check; a string is shown under the field."
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
"helper",
|
|
151
|
+
"string",
|
|
152
|
+
"—",
|
|
153
|
+
"Sheet: hint under the field."
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
"disabled",
|
|
157
|
+
"boolean",
|
|
158
|
+
"false",
|
|
159
|
+
"Sheet: dims the field and blocks opening."
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
"accent",
|
|
163
|
+
"string",
|
|
164
|
+
"theme accent",
|
|
165
|
+
"Selection band, clock hand and active segment, focus and halo colour."
|
|
166
|
+
],
|
|
167
|
+
[
|
|
168
|
+
"surface",
|
|
169
|
+
"string",
|
|
170
|
+
"theme background",
|
|
171
|
+
"Sheet: background behind the field (label notch)."
|
|
172
|
+
],
|
|
173
|
+
[
|
|
174
|
+
"style",
|
|
175
|
+
"StyleProp<ViewStyle>",
|
|
176
|
+
"—",
|
|
177
|
+
"Style for the wheel, clock, slot grid or field wrapper, depending on variant and presentation."
|
|
178
|
+
],
|
|
179
|
+
[
|
|
180
|
+
"fieldStyle",
|
|
181
|
+
"StyleProp<ViewStyle>",
|
|
182
|
+
"—",
|
|
183
|
+
"Sheet: the trigger box — background, border, radius, height, padding. Wins over the computed style; a borderColor replaces the resting border only (open, error and success colours still show). A numeric height / borderRadius re-centres the label and resizes the halo."
|
|
184
|
+
],
|
|
185
|
+
[
|
|
186
|
+
"inputStyle",
|
|
187
|
+
"StyleProp<TextStyle>",
|
|
188
|
+
"—",
|
|
189
|
+
"Sheet: the formatted time text in the trigger."
|
|
190
|
+
],
|
|
191
|
+
[
|
|
192
|
+
"labelStyle",
|
|
193
|
+
"StyleProp<TextStyle>",
|
|
194
|
+
"—",
|
|
195
|
+
"Sheet: label in both modes. color is the resting colour — open (accent), error and success still take over; fontSize sets the resting size, it floats at the same ratio and the notch follows its width."
|
|
196
|
+
],
|
|
197
|
+
[
|
|
198
|
+
"messageStyle",
|
|
199
|
+
"StyleProp<TextStyle>",
|
|
200
|
+
"—",
|
|
201
|
+
"Sheet: helper / error / success text. color applies to the helper; error and success keep their tone colour."
|
|
202
|
+
],
|
|
203
|
+
[
|
|
204
|
+
"placeholderTextColor",
|
|
205
|
+
"string",
|
|
206
|
+
"theme mutedForeground",
|
|
207
|
+
"Sheet: placeholder colour in the trigger."
|
|
208
|
+
],
|
|
209
|
+
[
|
|
210
|
+
"iconColor",
|
|
211
|
+
"string",
|
|
212
|
+
"theme mutedForeground",
|
|
213
|
+
"Sheet: clock icon colour at rest (accent while open)."
|
|
214
|
+
],
|
|
215
|
+
[
|
|
216
|
+
"menuStyle",
|
|
217
|
+
"StyleProp<ViewStyle>",
|
|
218
|
+
"—",
|
|
219
|
+
"Sheet: the sheet / dialog panel — background, border, radius, padding, shadow (transform and opacity are animated)."
|
|
220
|
+
]
|
|
221
|
+
],
|
|
222
|
+
"behavior": [
|
|
223
|
+
[
|
|
224
|
+
"Touch",
|
|
225
|
+
"Wheel drums snap with momentum and a tapped row jumps into the band. On the clock, drag the hand anywhere on the dial; it snaps to hours, then moves on to minutes when you let go."
|
|
226
|
+
],
|
|
227
|
+
[
|
|
228
|
+
"Motion",
|
|
229
|
+
"Wheel rows tilt, shrink and fade past the selection band, driven by scroll on the native driver; the clock header crossfades between hours and minutes."
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"Screen readers",
|
|
233
|
+
"Each wheel column and the clock dial are adjustable with increment / decrement actions; AM / PM and the time chips are radio groups, with booked or unavailable slots named. The sheet field is a button with expanded state."
|
|
234
|
+
]
|
|
235
|
+
],
|
|
236
|
+
"usage": "import { useState } from 'react';\nimport { TimePicker, type TimeValue } from '@/components/ui/time-picker';\n\nconst [time, setTime] = useState<TimeValue | null>({ hours: 7, minutes: 30 });\n<TimePicker value={time} onChange={setTime} hour12 />",
|
|
237
|
+
"examples": [
|
|
238
|
+
{
|
|
239
|
+
"name": "Alarm",
|
|
240
|
+
"title": "Alarm",
|
|
241
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\n/** \"in 7 h 20 min\" until the next occurrence of `t`. */\nfunction until(t: TimeValue) {\n const now = new Date();\n let diff = t.hours * 60 + t.minutes - (now.getHours() * 60 + now.getMinutes());\n if (diff <= 0) diff += 24 * 60;\n const h = Math.floor(diff / 60);\n return h ? `in ${h} h ${diff % 60} min` : `in ${diff} min`;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function Alarm() {\n const [time, setTime] = useState<TimeValue>({ hours: 6, minutes: 45 });\n return (\n <Card>\n <View style={s.head}>\n <View style={s.headText}>\n <Ink style={s.title}>Wake up</Ink>\n <Ink tone=\"muted\" style={s.meta}>Weekdays · Radar</Ink>\n </View>\n <Ink tone=\"muted\" style={s.meta}>{until(time)}</Ink>\n </View>\n <TimePicker value={time} onChange={setTime} hour12 />\n </Card>\n );\n}\n"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"name": "Clock",
|
|
245
|
+
"title": "Clock",
|
|
246
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\n/** \"in 7 h 20 min\" until the next occurrence of `t`. */\nfunction until(t: TimeValue) {\n const now = new Date();\n let diff = t.hours * 60 + t.minutes - (now.getHours() * 60 + now.getMinutes());\n if (diff <= 0) diff += 24 * 60;\n const h = Math.floor(diff / 60);\n return h ? `in ${h} h ${diff % 60} min` : `in ${diff} min`;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function Clock() {\n const { colors, radius } = useKit();\n const [time, setTime] = useState<TimeValue>({ hours: 7, minutes: 30 });\n return (\n <Card>\n <View style={s.headText}>\n <Ink style={s.title}>Morning run</Ink>\n <Ink tone=\"muted\" style={s.meta}>Tap the hour or minute, then drag the dial.</Ink>\n </View>\n <TimePicker variant=\"clock\" value={time} onChange={setTime} hour12 />\n <View style={[s.note, { backgroundColor: colors.muted, borderRadius: radius.md }]}>\n <Ink tone=\"muted\" style={s.meta}>Rings {until(time)}</Ink>\n </View>\n </Card>\n );\n}\n"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "Appointment",
|
|
250
|
+
"title": "Appointment",
|
|
251
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function Appointment() {\n const { colors, radius } = useKit();\n const [slot, setSlot] = useState<TimeValue | null>(null);\n return (\n <Card>\n <Ink style={s.title}>Dr. Amara Okafor · Dermatology</Ink>\n <TimePicker\n variant=\"chips\"\n value={slot}\n onChange={setSlot}\n hour12\n startTime=\"09:00\"\n endTime=\"18:00\"\n minuteInterval={30}\n bookedTimes={['09:30', '10:00', '11:30', '13:00', '14:30', '15:00', '17:30']}\n disabledTimes={['12:00', '12:30']}\n groupByPeriod\n />\n <Pressable\n disabled={!slot}\n style={[s.button, { backgroundColor: colors.accent, borderRadius: radius.md }, !slot && s.buttonOff]}\n accessibilityRole=\"button\"\n >\n <Text style={[s.buttonText, { color: colors.accentForeground }]}>{slot ? `Book ${formatTime(slot)} · 30 min` : 'Choose a time'}</Text>\n </Pressable>\n </Card>\n );\n}\n"
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"name": "Reminder",
|
|
255
|
+
"title": "Reminder",
|
|
256
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function Reminder() {\n const [time, setTime] = useState<TimeValue>({ hours: 21, minutes: 30 });\n return (\n <Card>\n <View style={s.head}>\n <Ink style={s.title}>Daily journal reminder</Ink>\n <Ink tone=\"muted\" style={s.meta}>{formatTime(time, false)}</Ink>\n </View>\n <TimePicker value={time} onChange={setTime} hour12={false} minuteInterval={15} />\n <Ink tone=\"muted\" style={s.hint}>24-hour clock, 15-minute steps.</Ink>\n </Card>\n );\n}\n"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"name": "InSheet",
|
|
260
|
+
"title": "In Sheet",
|
|
261
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function InSheet() {\n const [pickup, setPickup] = useState<TimeValue | null>({ hours: 18, minutes: 15 });\n const [delivery, setDelivery] = useState<TimeValue | null>(null);\n return (\n <Card>\n <Ink style={s.title}>Order #4821 · Green Basket</Ink>\n <TimePicker presentation=\"sheet\" label=\"Pickup time\" title=\"When will you pick up?\" value={pickup} onChange={setPickup} minuteInterval={5} hour12 />\n <TimePicker\n presentation=\"sheet\"\n variant=\"chips\"\n label=\"Delivery slot\"\n title=\"Choose a delivery slot\"\n value={delivery}\n onChange={setDelivery}\n hour12\n startTime=\"08:00\"\n endTime=\"21:00\"\n minuteInterval={60}\n bookedTimes={['08:00', '12:00', '18:00']}\n groupByPeriod\n success={delivery ? 'Free delivery in this slot' : undefined}\n helper=\"We'll text you when the driver is close.\"\n />\n </Card>\n );\n}\n"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "ClockInSheet",
|
|
265
|
+
"title": "Clock In Sheet",
|
|
266
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View, type TextProps, type ViewProps } from 'react-native';\nimport { TimePicker, formatTime, type TimeValue } from '@/components/ui/time-picker';\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 s.card,\n { borderRadius: radius.xl, borderColor: colors.border, backgroundColor: colors.card },\n style,\n ]}\n {...rest}\n />\n );\n}\n\n/** Text in the kit's ink: `tone=\"muted\"` for secondary copy. */\nfunction Ink({ tone, style, ...rest }: TextProps & { tone?: 'muted' }) {\n const { colors } = useKit();\n return <Text style={[{ color: tone === 'muted' ? colors.mutedForeground : colors.foreground }, style]} {...rest} />;\n}\n\nconst s = StyleSheet.create({\n card: { padding: 16, borderWidth: StyleSheet.hairlineWidth, gap: 12 },\n head: { flexDirection: 'row', justifyContent: 'space-between', alignItems: 'flex-start', gap: 12 },\n headText: { flexShrink: 1, gap: 2 },\n title: { fontSize: 15, fontWeight: '400' },\n meta: { fontSize: 13, fontWeight: '400', fontVariant: ['tabular-nums'] },\n hint: { fontSize: 12.5, textAlign: 'center' },\n note: { paddingVertical: 10, alignItems: 'center' },\n button: { height: 46, alignItems: 'center', justifyContent: 'center' },\n buttonOff: { opacity: 0.45 },\n buttonText: { fontSize: 15, fontWeight: '400' },\n});\n\nexport default function ClockInSheet() {\n const [start, setStart] = useState<TimeValue | null>({ hours: 9, minutes: 0 });\n const [end, setEnd] = useState<TimeValue | null>(null);\n return (\n <Card>\n <Ink style={s.title}>Focus block · Thursday</Ink>\n <TimePicker presentation=\"sheet\" variant=\"clock\" label=\"Starts\" title=\"Start time\" value={start} onChange={setStart} hour12 />\n <TimePicker\n presentation=\"sheet\"\n variant=\"clock\"\n label=\"Ends\"\n title=\"End time\"\n value={end}\n onChange={setEnd}\n minuteInterval={5}\n hour12\n helper=\"Snaps to 5-minute steps.\"\n />\n </Card>\n );\n}\n"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "timeline-chart",
|
|
3
|
+
"category": "Charts",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "TimelineChart",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/charts/timeline-chart.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": null,
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"data",
|
|
13
|
+
"{ label, start, end, progress? }[]",
|
|
14
|
+
"—",
|
|
15
|
+
"Tasks."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"marker",
|
|
19
|
+
"{ value, label? }",
|
|
20
|
+
"—",
|
|
21
|
+
"Vertical marker."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"formatTick",
|
|
25
|
+
"(v) => string",
|
|
26
|
+
"compact",
|
|
27
|
+
"Axis labels."
|
|
28
|
+
]
|
|
29
|
+
],
|
|
30
|
+
"behavior": [],
|
|
31
|
+
"usage": null,
|
|
32
|
+
"examples": []
|
|
33
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "timeline",
|
|
3
|
+
"category": "Display",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "Timeline",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/timeline.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A vertical timeline whose connector fills down to the current step as dots check off.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"items",
|
|
13
|
+
"TimelineItem[]",
|
|
14
|
+
"—",
|
|
15
|
+
"{ key?, title, description?, time?, status?, icon?, avatar?, image?, images?, tags?, links?, content? } per event."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"items[].status",
|
|
19
|
+
"\"done\" | \"current\" | \"upcoming\" | \"error\"",
|
|
20
|
+
"\"done\"",
|
|
21
|
+
"Filled with a drawn check · pulsing · hollow on a dotted track · red with a drawn ✕."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"items[].icon",
|
|
25
|
+
"TimelineIconName | ({ color, size }) => ReactNode",
|
|
26
|
+
"—",
|
|
27
|
+
"cart, package, truck, home, rocket, bug, star, chat, tag, user, or your own glyph in a larger dot (done/failed get a mini check/✕ badge)."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"items[].avatar",
|
|
31
|
+
"{ src?, name }",
|
|
32
|
+
"—",
|
|
33
|
+
"Avatar (initials fallback) instead of a dot."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"items[].image",
|
|
37
|
+
"string | { uri, aspectRatio? }",
|
|
38
|
+
"—",
|
|
39
|
+
"Photo under the text, rounded, fades in when loaded (16:9 by default)."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"items[].images",
|
|
43
|
+
"(string | { uri, aspectRatio? })[]",
|
|
44
|
+
"—",
|
|
45
|
+
"Photo gallery: 1-up at its ratio, 2-up side by side, 3-up one large + two stacked (+N for more). Rounded, fades in."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"items[].tags",
|
|
49
|
+
"string[]",
|
|
50
|
+
"—",
|
|
51
|
+
"Small accent chips under the text."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"items[].links",
|
|
55
|
+
"{ label, onPress }[]",
|
|
56
|
+
"—",
|
|
57
|
+
"Tappable accent links under the text."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"items[].content",
|
|
61
|
+
"ReactNode",
|
|
62
|
+
"—",
|
|
63
|
+
"Rich content under the description: a card, quote, tags or buttons."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"variant",
|
|
67
|
+
"\"default\" | \"compact\" | \"card\" | \"scroll\"",
|
|
68
|
+
"\"default\"",
|
|
69
|
+
"Roomy rows · small dots on one line · each event on a card (current one tinted) · renders its own scroll view and fills the line as you scroll (give it a height)."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"accent",
|
|
73
|
+
"string",
|
|
74
|
+
"theme accent",
|
|
75
|
+
"Done / current dots and the filled line."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"checks",
|
|
79
|
+
"boolean",
|
|
80
|
+
"true",
|
|
81
|
+
"Draw a check in done dots."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"animated",
|
|
85
|
+
"boolean",
|
|
86
|
+
"true",
|
|
87
|
+
"Staggered entrance + connector fill, or the scroll-driven fill (off with reduce motion: everything shows filled)."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"surface",
|
|
91
|
+
"string",
|
|
92
|
+
"theme background",
|
|
93
|
+
"Colour behind the rail — fills hollow dots and mini badge cut-outs."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"header",
|
|
97
|
+
"ReactNode",
|
|
98
|
+
"—",
|
|
99
|
+
"scroll: shown above the timeline inside the scroll view."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"footer",
|
|
103
|
+
"ReactNode",
|
|
104
|
+
"—",
|
|
105
|
+
"scroll: shown below the timeline inside the scroll view."
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"contentContainerStyle",
|
|
109
|
+
"StyleProp<ViewStyle>",
|
|
110
|
+
"{ paddingVertical: 12 }",
|
|
111
|
+
"scroll: the scroll view's content container."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"style",
|
|
115
|
+
"StyleProp<ViewStyle>",
|
|
116
|
+
"—",
|
|
117
|
+
"Root style — for variant=\"scroll\" this is the scroll view, so set a height."
|
|
118
|
+
]
|
|
119
|
+
],
|
|
120
|
+
"behavior": [
|
|
121
|
+
[
|
|
122
|
+
"Motion",
|
|
123
|
+
"Items rise in, then the line fills to the current step: done dots draw their check as it arrives and the current dot pulses. The scroll variant ties the fill to the scroll position."
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"Reduced motion",
|
|
127
|
+
"Everything renders in its final state with no rise, fill or pulse, the same as animated={false}."
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
"Screen readers",
|
|
131
|
+
"The timeline is a list; each entry is read as its title, time, description and status, and links are exposed as links."
|
|
132
|
+
]
|
|
133
|
+
],
|
|
134
|
+
"usage": "import { Timeline } from '@/components/ui/timeline';\n\n<Timeline\n items={[\n { title: 'Order placed', time: '9:41 AM', status: 'done' },\n { title: 'Out for delivery', time: '1:15 PM', status: 'current' },\n { title: 'Delivered', status: 'upcoming' },\n ]}\n/>",
|
|
135
|
+
"examples": [
|
|
136
|
+
{
|
|
137
|
+
"name": "OrderTracking",
|
|
138
|
+
"title": "Order Tracking",
|
|
139
|
+
"code": "import { Text, View } from 'react-native';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nexport default function OrderTracking() {\n const { colors, radius, dark } = useKit();\n return (\n <View style={{ gap: 18 }}>\n <View style={{ flexDirection: 'row', alignItems: 'flex-end', justifyContent: 'space-between' }}>\n <View style={{ gap: 2 }}>\n <Text style={{ fontSize: 12.5, letterSpacing: 0.4, color: colors.mutedForeground }}>ORDER #4821</Text>\n <Text style={{ fontSize: 20, letterSpacing: -0.4, color: colors.foreground }}>Arriving today</Text>\n </View>\n <View\n style={{\n paddingHorizontal: 10,\n paddingVertical: 4,\n borderRadius: radius.capsule(24),\n backgroundColor: alpha(colors.accent, dark ? 0.2 : 0.1),\n }}\n >\n <Text style={{ fontSize: 12.5, color: colors.accent }}>by 6 PM</Text>\n </View>\n </View>\n <Timeline\n items={[\n { title: 'Ordered', time: 'Mon 9:12', description: 'Paid with Apple Pay · 2 items', icon: 'cart' },\n { title: 'Packed', time: 'Tue 16:40', description: 'Left the Rotterdam warehouse', icon: 'package' },\n {\n title: 'Out for delivery',\n time: '11:05',\n description: 'Jonas is 6 stops away in a white van',\n icon: 'truck',\n status: 'current',\n },\n { title: 'Delivered', time: 'Est. 17:30', description: 'Leave at the front door if no one answers', icon: 'home', status: 'upcoming' },\n ]}\n />\n </View>\n );\n}\n"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "Activity",
|
|
143
|
+
"title": "Activity",
|
|
144
|
+
"code": "import { Text, View } from 'react-native';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nexport default function Activity() {\n const { colors, radius, dark } = useKit();\n return (\n <Timeline\n items={[\n {\n title: 'Priya Shah commented',\n time: '2m',\n avatar: { name: 'Priya Shah', src: 'https://i.pravatar.cc/120?img=32' },\n status: 'current',\n content: (\n <View\n style={{\n padding: 12,\n borderRadius: radius.md,\n backgroundColor: alpha(colors.foreground, dark ? 0.06 : 0.035),\n }}\n >\n <Text style={{ fontSize: 14, lineHeight: 20, color: colors.foreground }}>\n Love the new onboarding — can we try the shorter headline on step two?\n </Text>\n </View>\n ),\n },\n {\n title: 'Marco Bianchi uploaded 3 photos',\n time: '1h',\n description: 'Moodboard · Autumn campaign',\n avatar: { name: 'Marco Bianchi', src: 'https://i.pravatar.cc/120?img=15' },\n image: { uri: 'https://picsum.photos/id/1043/800/450', aspectRatio: 16 / 9 },\n },\n {\n title: 'Lena Fischer shared a file',\n time: '3h',\n avatar: { name: 'Lena Fischer' },\n content: (\n <View\n style={{\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n padding: 12,\n borderRadius: radius.md,\n borderWidth: 1,\n borderColor: alpha(colors.foreground, dark ? 0.1 : 0.06),\n backgroundColor: colors.card,\n }}\n >\n <View\n style={{\n width: 36,\n height: 36,\n borderRadius: radius.sm,\n backgroundColor: alpha(colors.danger, 0.12),\n alignItems: 'center',\n justifyContent: 'center',\n }}\n >\n <Text style={{ fontSize: 11, color: colors.danger }}>PDF</Text>\n </View>\n <View style={{ flex: 1 }}>\n <Text numberOfLines={1} style={{ fontSize: 14, color: colors.foreground }}>Q4 brand guidelines.pdf</Text>\n <Text style={{ fontSize: 12.5, color: colors.mutedForeground }}>4.2 MB · 18 pages</Text>\n </View>\n </View>\n ),\n },\n { title: 'Nightly build failed', time: 'Yesterday', description: 'iOS · Signing certificate expired', status: 'error', icon: 'bug' },\n ]}\n />\n );\n}\n"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "Release",
|
|
148
|
+
"title": "Release",
|
|
149
|
+
"code": "import { Text, View } from 'react-native';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nexport default function Release() {\n const { colors, radius, dark } = useKit();\n return (\n <Timeline\n variant=\"card\"\n items={[\n { title: 'v3.0 — Widgets', time: 'Next week', description: 'Home-screen widgets for iOS and Android.', icon: 'rocket', status: 'upcoming' },\n {\n title: 'v2.4 — Offline mode',\n time: 'Oct 8',\n description: 'Edit notes without a connection; changes sync when you are back online.',\n icon: 'star',\n status: 'current',\n content: (\n <View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 6 }}>\n {['New', 'Sync', 'iOS', 'Android'].map((t) => (\n <View\n key={t}\n style={{\n paddingHorizontal: 9,\n paddingVertical: 3,\n borderRadius: radius.capsule(22),\n backgroundColor: alpha(colors.accent, dark ? 0.2 : 0.1),\n }}\n >\n <Text style={{ fontSize: 12, color: colors.accent }}>{t}</Text>\n </View>\n ))}\n </View>\n ),\n },\n { title: 'v2.3.2 — Fixes', time: 'Sep 29', description: 'Fixed a crash when sharing large PDFs.', icon: 'bug' },\n { title: 'v2.3 — Shared folders', time: 'Sep 12', description: 'Invite people to a folder and edit together.', icon: 'user' },\n ]}\n />\n );\n}\n"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "Compact",
|
|
153
|
+
"title": "Compact",
|
|
154
|
+
"code": "import { Timeline } from '@/components/ui/timeline';\n\nexport default function Compact() {\n return (\n <Timeline\n variant=\"compact\"\n items={[\n { title: 'Account created', time: '09:00' },\n { title: 'Email verified', time: '09:02' },\n { title: 'Profile completed', time: '09:10', status: 'current' },\n { title: 'First project', status: 'upcoming' },\n { title: 'Invite your team', status: 'upcoming' },\n ]}\n />\n );\n}\n"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "Support",
|
|
158
|
+
"title": "Support",
|
|
159
|
+
"code": "import { Text, View } from 'react-native';\nimport { Avatar } from '@/components/ui/avatar';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nexport default function Support() {\n const { colors } = useKit();\n return (\n <View style={{ gap: 14 }}>\n <View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>\n <Avatar size=\"sm\" name=\"Support\" status=\"online\" />\n <Text style={{ fontSize: 15, color: colors.foreground }}>Refund request #RF-2207</Text>\n </View>\n <Timeline\n variant=\"compact\"\n accent={colors.success}\n items={[\n { title: 'Request received', time: 'Oct 9' },\n { title: 'Return label sent', time: 'Oct 9' },\n { title: 'Card refund declined', time: 'Oct 12', status: 'error' },\n { title: 'Refund to store credit', time: 'Now', status: 'current' },\n ]}\n />\n </View>\n );\n}\n"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "Journey",
|
|
163
|
+
"title": "Journey",
|
|
164
|
+
"code": "import { Text, View } from 'react-native';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nconst pic = (seed: string) => `https://picsum.photos/seed/${seed}/600/400`;\n\nexport default function Journey() {\n const { colors } = useKit();\n return (\n <Timeline\n variant=\"scroll\"\n style={{ height: 560 }}\n header={\n <View style={{ gap: 2, paddingBottom: 20 }}>\n <Text style={{ fontSize: 12.5, letterSpacing: 0.4, color: colors.mutedForeground }}>12 DAYS · 1,140 KM</Text>\n <Text style={{ fontSize: 22, letterSpacing: -0.5, color: colors.foreground }}>Our journey through Portugal</Text>\n </View>\n }\n items={[\n { title: 'Landed in Lisbon', time: 'Day 1', description: 'Late flight, pastel de nata at the airport, tram 28 into Alfama before the rain.', images: [{ uri: pic('lisbon'), aspectRatio: 3 / 2 }], tags: ['Lisbon'] },\n { title: 'Lost in Alfama', time: 'Day 2', description: 'Stairs, tiles, a fado bar that only had six chairs. We stayed until two.', images: [pic('alfama'), pic('tiles')] },\n { title: 'Sintra day trip', time: 'Day 3', description: 'Fog on Pena Palace in the morning, sun in the Moorish castle by noon.', images: [pic('sintra'), pic('palace'), pic('forest'), pic('castle')] },\n { title: 'Rented the car', time: 'Day 4', description: 'A tiny Fiat with a stubborn second gear. Named it Rosa.' },\n { title: 'Comporta beaches', time: 'Day 5', description: 'Rice fields on one side, empty dunes on the other.', images: [{ uri: pic('dunes'), aspectRatio: 16 / 9 }], tags: ['Beach', 'Alentejo'] },\n { title: 'Évora', time: 'Day 6', description: 'Roman temple at sunset and the quietest night of the trip.', images: [pic('evora'), pic('temple'), pic('plains')] },\n { title: 'Wine in the Alentejo', time: 'Day 7', description: 'A cellar tour that turned into lunch with the owner’s family. Ordered a case home.' },\n { title: 'Down to the Algarve', time: 'Day 8', description: 'Benagil caves by kayak — go early, the tour boats arrive at ten.', images: [pic('caves'), pic('kayak')], links: [{ label: 'Kayak rental we used', onPress: () => {} }] },\n { title: 'Lagos', time: 'Day 9', description: 'Cliff walk to Ponta da Piedade and grilled sardines at the harbour.', images: [{ uri: pic('lagos'), aspectRatio: 3 / 2 }] },\n { title: 'Long drive north', time: 'Day 10', description: 'Six hours, two coffee stops, one wrong turn into a cork forest.' },\n { title: 'Porto', time: 'Day 11', status: 'current', description: 'Ribeira, the bridge at blue hour, port lodges across the river.', images: [pic('porto'), pic('bridge'), pic('river')], tags: ['Now'] },\n { title: 'Douro Valley', time: 'Day 12', status: 'upcoming', description: 'Train along the river to Pinhão, then home.' },\n ]}\n />\n );\n}\n"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "DeliveryScroll",
|
|
168
|
+
"title": "Delivery Scroll",
|
|
169
|
+
"code": "import { Text, View } from 'react-native';\nimport { Timeline } from '@/components/ui/timeline';\nimport { alpha, useKit } from '@/lib/kit';\n\nconst pic = (seed: string) => `https://picsum.photos/seed/${seed}/600/400`;\n\nexport default function DeliveryScroll() {\n const { colors } = useKit();\n return (\n <Timeline\n variant=\"scroll\"\n style={{ height: 560 }}\n header={\n <View style={{ gap: 2, paddingBottom: 20 }}>\n <Text style={{ fontSize: 12.5, letterSpacing: 0.4, color: colors.mutedForeground }}>PARCEL DHL 4471 9902 31</Text>\n <Text style={{ fontSize: 20, letterSpacing: -0.4, color: colors.foreground }}>Out for delivery</Text>\n </View>\n }\n items={[\n { title: 'Order placed', time: 'Oct 6 · 18:22', description: 'Walnut desk lamp, linen shade · paid with Visa', icon: 'cart' },\n { title: 'Payment confirmed', time: 'Oct 6 · 18:23', icon: 'tag' },\n { title: 'Packed', time: 'Oct 7 · 10:40', description: 'Double-boxed with paper padding. Photo from the packing station:', icon: 'package', images: [{ uri: pic('parcel'), aspectRatio: 3 / 2 }] },\n { title: 'Handed to carrier', time: 'Oct 7 · 16:05', description: 'Picked up from the Leipzig warehouse', icon: 'truck' },\n { title: 'Left the sorting hub', time: 'Oct 8 · 02:14', description: 'Hauptumschlagbasis Leipzig', icon: 'truck' },\n { title: 'Arrived in the Netherlands', time: 'Oct 9 · 07:50', description: 'Customs cleared, no fees due', icon: 'home' },\n { title: 'Delivery attempt failed', time: 'Oct 10 · 14:31', description: 'No one home and no safe place. A card was left in the mailbox.', status: 'error', icon: 'home' },\n { title: 'Rescheduled', time: 'Oct 10 · 19:02', description: 'You picked Monday, 12:00–18:00', icon: 'chat' },\n { title: 'Out for delivery', time: '11:05', description: 'Jonas is 6 stops away in a white van', icon: 'truck', status: 'current', links: [{ label: 'Track on map', onPress: () => {} }] },\n { title: 'Delivered', time: 'Est. 15:30', description: 'Leave at the front door if no one answers', icon: 'home', status: 'upcoming' },\n { title: 'Rate your delivery', status: 'upcoming', icon: 'star' },\n ]}\n />\n );\n}\n"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|