@krizaka/ui 3.4.0 → 3.6.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/README.md +1 -0
- package/dist/app-shell.d.ts +24 -22
- package/dist/app-shell.js +9 -3
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.js +3 -3
- package/dist/chat.d.ts +187 -0
- package/dist/chat.js +132 -0
- package/dist/chat.js.map +1 -0
- package/dist/chunk-3GODX3D6.js +25 -0
- package/dist/chunk-3GODX3D6.js.map +1 -0
- package/dist/chunk-ECSCA3CN.js +128 -0
- package/dist/chunk-ECSCA3CN.js.map +1 -0
- package/dist/chunk-F2GKFIYK.js +47 -0
- package/dist/chunk-F2GKFIYK.js.map +1 -0
- package/dist/{chunk-R6SDS7JM.js → chunk-ND3L5VHT.js} +25 -2
- package/dist/chunk-ND3L5VHT.js.map +1 -0
- package/dist/command.js +1 -1
- package/dist/data-table.js +20 -134
- package/dist/data-table.js.map +1 -1
- package/dist/dialog.js +7 -3
- package/dist/dialog.js.map +1 -1
- package/dist/loader.d.ts +21 -1
- package/dist/loader.js +7 -3
- package/dist/loader.js.map +1 -1
- package/dist/map.js +7 -1
- package/dist/map.js.map +1 -1
- package/dist/marketing-layout.d.ts +3 -9
- package/dist/marketing-layout.js +24 -7
- package/dist/marketing-layout.js.map +1 -1
- package/dist/match-dialog.d.ts +32 -0
- package/dist/match-dialog.js +168 -0
- package/dist/match-dialog.js.map +1 -0
- package/dist/native.d.ts +484 -106
- package/dist/native.js +1967 -1323
- package/dist/native.js.map +1 -1
- package/dist/page-hero.js +3 -3
- package/dist/photo-grid.d.ts +122 -0
- package/dist/photo-grid.js +94 -0
- package/dist/photo-grid.js.map +1 -0
- package/dist/skip-link.d.ts +15 -0
- package/dist/skip-link.js +10 -0
- package/dist/skip-link.js.map +1 -0
- package/dist/step-progress.d.ts +20 -0
- package/dist/step-progress.js +17 -0
- package/dist/step-progress.js.map +1 -0
- package/dist/swipe-deck.d.ts +183 -0
- package/dist/swipe-deck.js +144 -0
- package/dist/swipe-deck.js.map +1 -0
- package/dist/tag-selector.d.ts +26 -0
- package/dist/tag-selector.js +21 -0
- package/dist/tag-selector.js.map +1 -0
- package/dist/tree-view.d.ts +2 -0
- package/dist/tree-view.js.map +1 -1
- package/dist/verified-badge.d.ts +16 -0
- package/dist/verified-badge.js +23 -0
- package/dist/verified-badge.js.map +1 -0
- package/package.json +120 -8
- package/registry/achievement.json +2 -1
- package/registry/action-bar.json +2 -1
- package/registry/action-sheet.json +1 -0
- package/registry/activity-feed.json +2 -1
- package/registry/alert.json +2 -1
- package/registry/app-shell.json +27 -5
- package/registry/argument-card.json +2 -1
- package/registry/audio-player.json +2 -1
- package/registry/auth-layout.json +7 -2
- package/registry/avatar.json +2 -1
- package/registry/badge.json +2 -1
- package/registry/button.json +2 -1
- package/registry/card-grid.json +2 -1
- package/registry/card.json +2 -1
- package/registry/catalogue-page.json +5 -2
- package/registry/changelog-page.json +5 -2
- package/registry/chat.json +918 -0
- package/registry/checkbox.json +2 -1
- package/registry/chip-link.json +2 -1
- package/registry/chip.json +2 -1
- package/registry/choice-grid.json +2 -1
- package/registry/cn.json +1 -0
- package/registry/code-block.json +2 -1
- package/registry/combobox.json +2 -1
- package/registry/command.json +2 -1
- package/registry/component-page.json +5 -2
- package/registry/confirm-button.json +2 -1
- package/registry/contact-page.json +5 -2
- package/registry/continue-prompt.json +2 -1
- package/registry/countdown.json +2 -1
- package/registry/cta-panel.json +2 -1
- package/registry/dashboard-layout.json +5 -2
- package/registry/data-table.json +2 -1
- package/registry/date-picker.json +3 -2
- package/registry/decision-list.json +2 -1
- package/registry/description-list.json +2 -1
- package/registry/detail-layout.json +16 -2
- package/registry/dialog.json +10 -4
- package/registry/docs-article-page.json +16 -2
- package/registry/docs-hub-page.json +5 -2
- package/registry/docs-layout.json +2 -1
- package/registry/dropdown-menu.json +2 -1
- package/registry/empty-state.json +14 -2
- package/registry/error-page.json +5 -2
- package/registry/examples/chat/conversation.d.ts +4 -0
- package/registry/examples/chat/conversation.js +22 -0
- package/registry/examples/chat/conversation.tsx +21 -0
- package/registry/examples/chat/inbox.d.ts +4 -0
- package/registry/examples/chat/inbox.js +15 -0
- package/registry/examples/chat/inbox.tsx +12 -0
- package/registry/examples/chat/native/conversation.d.ts +4 -0
- package/registry/examples/chat/native/conversation.dark.png +0 -0
- package/registry/examples/chat/native/conversation.js +23 -0
- package/registry/examples/chat/native/conversation.light.png +0 -0
- package/registry/examples/chat/native/conversation.tsx +20 -0
- package/registry/examples/chat/native/inbox.d.ts +4 -0
- package/registry/examples/chat/native/inbox.dark.png +0 -0
- package/registry/examples/chat/native/inbox.js +16 -0
- package/registry/examples/chat/native/inbox.light.png +0 -0
- package/registry/examples/chat/native/inbox.tsx +13 -0
- package/registry/examples/detail-layout/checkout.d.ts +4 -0
- package/registry/examples/detail-layout/checkout.js +37 -0
- package/registry/examples/detail-layout/checkout.tsx +44 -0
- package/registry/examples/docs-article-page/faq.d.ts +4 -0
- package/registry/examples/docs-article-page/faq.js +31 -0
- package/registry/examples/docs-article-page/faq.tsx +40 -0
- package/registry/examples/empty-state/library.d.ts +4 -0
- package/registry/examples/empty-state/library.js +25 -0
- package/registry/examples/empty-state/library.tsx +20 -0
- package/registry/examples/loader/branded.d.ts +4 -0
- package/registry/examples/loader/branded.js +12 -0
- package/registry/examples/loader/branded.tsx +7 -0
- package/registry/examples/loader/native/branded.d.ts +4 -0
- package/registry/examples/loader/native/branded.dark.png +0 -0
- package/registry/examples/loader/native/branded.js +12 -0
- package/registry/examples/loader/native/branded.light.png +0 -0
- package/registry/examples/loader/native/branded.tsx +11 -0
- package/registry/examples/longform-page/case-study.d.ts +4 -0
- package/registry/examples/longform-page/case-study.js +41 -0
- package/registry/examples/longform-page/case-study.tsx +40 -0
- package/registry/examples/match-dialog/its-a-match.d.ts +4 -0
- package/registry/examples/match-dialog/its-a-match.js +29 -0
- package/registry/examples/match-dialog/its-a-match.tsx +25 -0
- package/registry/examples/match-dialog/native/its-a-match.d.ts +4 -0
- package/registry/examples/match-dialog/native/its-a-match.dark.png +0 -0
- package/registry/examples/match-dialog/native/its-a-match.js +28 -0
- package/registry/examples/match-dialog/native/its-a-match.light.png +0 -0
- package/registry/examples/match-dialog/native/its-a-match.tsx +22 -0
- package/registry/examples/photo-grid/native/profile-photos.d.ts +4 -0
- package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.js +27 -0
- package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.tsx +24 -0
- package/registry/examples/photo-grid/profile-photos.d.ts +4 -0
- package/registry/examples/photo-grid/profile-photos.js +28 -0
- package/registry/examples/photo-grid/profile-photos.tsx +25 -0
- package/registry/examples/pull-to-refresh/native/branded.d.ts +4 -0
- package/registry/examples/pull-to-refresh/native/branded.dark.png +0 -0
- package/registry/examples/pull-to-refresh/native/branded.js +14 -0
- package/registry/examples/pull-to-refresh/native/branded.light.png +0 -0
- package/registry/examples/pull-to-refresh/native/branded.tsx +23 -0
- package/registry/examples/screen/native/app-shell.d.ts +4 -0
- package/registry/examples/screen/native/app-shell.dark.png +0 -0
- package/registry/examples/screen/native/app-shell.js +25 -0
- package/registry/examples/screen/native/app-shell.light.png +0 -0
- package/registry/examples/screen/native/app-shell.tsx +33 -0
- package/registry/examples/screen/native/auth.d.ts +4 -0
- package/registry/examples/screen/native/auth.dark.png +0 -0
- package/registry/examples/screen/native/auth.js +24 -0
- package/registry/examples/screen/native/auth.light.png +0 -0
- package/registry/examples/screen/native/auth.tsx +20 -0
- package/registry/examples/screen/native/chat.d.ts +4 -0
- package/registry/examples/screen/native/chat.dark.png +0 -0
- package/registry/examples/screen/native/chat.js +27 -0
- package/registry/examples/screen/native/chat.light.png +0 -0
- package/registry/examples/screen/native/chat.tsx +22 -0
- package/registry/examples/screen/native/feed.d.ts +4 -0
- package/registry/examples/screen/native/feed.dark.png +0 -0
- package/registry/examples/screen/native/feed.js +24 -0
- package/registry/examples/screen/native/feed.light.png +0 -0
- package/registry/examples/screen/native/feed.tsx +34 -0
- package/registry/examples/screen/native/map.d.ts +4 -0
- package/registry/examples/screen/native/map.dark.png +0 -0
- package/registry/examples/screen/native/map.js +26 -0
- package/registry/examples/screen/native/map.light.png +0 -0
- package/registry/examples/screen/native/map.tsx +31 -0
- package/registry/examples/screen/native/notifications.d.ts +4 -0
- package/registry/examples/screen/native/notifications.dark.png +0 -0
- package/registry/examples/screen/native/notifications.js +21 -0
- package/registry/examples/screen/native/notifications.light.png +0 -0
- package/registry/examples/screen/native/notifications.tsx +21 -0
- package/registry/examples/screen/native/profile.d.ts +4 -0
- package/registry/examples/screen/native/profile.dark.png +0 -0
- package/registry/examples/screen/native/profile.js +29 -0
- package/registry/examples/screen/native/profile.light.png +0 -0
- package/registry/examples/screen/native/profile.tsx +27 -0
- package/registry/examples/screen/native/settings.d.ts +4 -0
- package/registry/examples/screen/native/settings.dark.png +0 -0
- package/registry/examples/screen/native/settings.js +20 -0
- package/registry/examples/screen/native/settings.light.png +0 -0
- package/registry/examples/screen/native/settings.tsx +19 -0
- package/registry/examples/skip-link/default.d.ts +4 -0
- package/registry/examples/skip-link/default.js +19 -0
- package/registry/examples/skip-link/default.tsx +12 -0
- package/registry/examples/splash-handoff/native/default.d.ts +4 -0
- package/registry/examples/splash-handoff/native/default.dark.png +0 -0
- package/registry/examples/splash-handoff/native/default.js +12 -0
- package/registry/examples/splash-handoff/native/default.light.png +0 -0
- package/registry/examples/splash-handoff/native/default.tsx +11 -0
- package/registry/examples/split-view/nearby.d.ts +4 -0
- package/registry/examples/split-view/nearby.js +33 -0
- package/registry/examples/split-view/nearby.tsx +45 -0
- package/registry/examples/split-view/notifications.d.ts +4 -0
- package/registry/examples/split-view/notifications.js +33 -0
- package/registry/examples/split-view/notifications.tsx +31 -0
- package/registry/examples/status-page/maintenance.d.ts +4 -0
- package/registry/examples/status-page/maintenance.js +29 -0
- package/registry/examples/status-page/maintenance.tsx +24 -0
- package/registry/examples/step-progress/native/sign-up.d.ts +4 -0
- package/registry/examples/step-progress/native/sign-up.dark.png +0 -0
- package/registry/examples/step-progress/native/sign-up.js +12 -0
- package/registry/examples/step-progress/native/sign-up.light.png +0 -0
- package/registry/examples/step-progress/native/sign-up.tsx +11 -0
- package/registry/examples/step-progress/sign-up.d.ts +4 -0
- package/registry/examples/step-progress/sign-up.js +22 -0
- package/registry/examples/step-progress/sign-up.tsx +16 -0
- package/registry/examples/swipe-deck/discover.d.ts +4 -0
- package/registry/examples/swipe-deck/discover.js +41 -0
- package/registry/examples/swipe-deck/discover.tsx +37 -0
- package/registry/examples/swipe-deck/native/discover.d.ts +4 -0
- package/registry/examples/swipe-deck/native/discover.dark.png +0 -0
- package/registry/examples/swipe-deck/native/discover.js +39 -0
- package/registry/examples/swipe-deck/native/discover.light.png +0 -0
- package/registry/examples/swipe-deck/native/discover.tsx +35 -0
- package/registry/examples/tag-selector/interests.d.ts +4 -0
- package/registry/examples/tag-selector/interests.js +14 -0
- package/registry/examples/tag-selector/interests.tsx +12 -0
- package/registry/examples/tag-selector/native/interests.d.ts +4 -0
- package/registry/examples/tag-selector/native/interests.dark.png +0 -0
- package/registry/examples/tag-selector/native/interests.js +15 -0
- package/registry/examples/tag-selector/native/interests.light.png +0 -0
- package/registry/examples/tag-selector/native/interests.tsx +15 -0
- package/registry/examples/verified-badge/native/verified.d.ts +4 -0
- package/registry/examples/verified-badge/native/verified.dark.png +0 -0
- package/registry/examples/verified-badge/native/verified.js +18 -0
- package/registry/examples/verified-badge/native/verified.light.png +0 -0
- package/registry/examples/verified-badge/native/verified.tsx +15 -0
- package/registry/examples/verified-badge/verified.d.ts +4 -0
- package/registry/examples/verified-badge/verified.js +17 -0
- package/registry/examples/verified-badge/verified.tsx +13 -0
- package/registry/fab.json +1 -0
- package/registry/field.json +2 -1
- package/registry/file-upload.json +3 -2
- package/registry/filter-bar.json +2 -1
- package/registry/form.json +3 -2
- package/registry/gallery-page.json +5 -2
- package/registry/glow-card.json +2 -1
- package/registry/goal-gauge.json +2 -1
- package/registry/header.json +1 -0
- package/registry/how-it-works-page.json +5 -2
- package/registry/image-cropper.json +2 -1
- package/registry/image-viewer.json +1 -0
- package/registry/index.json +608 -19
- package/registry/iso.json +2 -1
- package/registry/kanban.json +2 -1
- package/registry/kbd.json +2 -1
- package/registry/landing-page.json +5 -2
- package/registry/landscape.json +2 -1
- package/registry/legal-page.json +5 -2
- package/registry/link-card.json +2 -1
- package/registry/list.json +2 -1
- package/registry/loader.json +47 -3
- package/registry/longform-page.json +16 -2
- package/registry/map.json +4 -3
- package/registry/marketing-layout.json +13 -4
- package/registry/marquee.json +2 -1
- package/registry/mascot-quote.json +2 -1
- package/registry/mascot-state.json +2 -1
- package/registry/mascots.json +2 -1
- package/registry/match-dialog.json +315 -0
- package/registry/media-capture.json +2 -1
- package/registry/media-picker.json +1 -0
- package/registry/meter.json +2 -1
- package/registry/nav-bar.json +2 -1
- package/registry/number-ticker.json +2 -1
- package/registry/onboarding.json +1 -0
- package/registry/otp-input.json +1 -0
- package/registry/page-header.json +2 -1
- package/registry/page-hero.json +2 -1
- package/registry/page.json +2 -1
- package/registry/pagination.json +2 -1
- package/registry/permission-prompt.json +1 -0
- package/registry/photo-grid.json +303 -0
- package/registry/pointer-light.json +2 -1
- package/registry/popover.json +2 -1
- package/registry/pricing-page.json +5 -2
- package/registry/product-page.json +5 -2
- package/registry/profile-card.json +2 -1
- package/registry/progress.json +2 -1
- package/registry/promise-card.json +2 -1
- package/registry/pull-to-refresh.json +68 -4
- package/registry/radio-group.json +2 -1
- package/registry/screen.json +233 -0
- package/registry/scroll-stage.json +2 -1
- package/registry/search-field.json +2 -1
- package/registry/section-backdrop.json +2 -1
- package/registry/segmented.json +1 -0
- package/registry/separator.json +2 -1
- package/registry/settings-layout.json +5 -2
- package/registry/skeleton.json +2 -1
- package/registry/skip-link.json +122 -0
- package/registry/slider.json +2 -1
- package/registry/slot.json +2 -1
- package/registry/spinner.json +2 -1
- package/registry/splash-handoff.json +138 -0
- package/registry/split-view.json +27 -2
- package/registry/stage-banner.json +2 -1
- package/registry/stat.json +2 -1
- package/registry/status-page.json +18 -2
- package/registry/step-progress.json +256 -0
- package/registry/stepper.json +2 -1
- package/registry/swipe-deck.json +513 -0
- package/registry/swipeable-row.json +1 -0
- package/registry/switch.json +2 -1
- package/registry/tab-bar.json +1 -0
- package/registry/tabs.json +2 -1
- package/registry/tag-input.json +2 -1
- package/registry/tag-selector.json +277 -0
- package/registry/terminal-replay.json +2 -1
- package/registry/theme.json +2 -1
- package/registry/toast.json +2 -1
- package/registry/toc.json +2 -1
- package/registry/tooltip.json +2 -1
- package/registry/tree-view.json +10 -4
- package/registry/txt.json +1 -0
- package/registry/verified-badge.json +203 -0
- package/registry/video-player.json +2 -1
- package/registry/video-trimmer.json +2 -1
- package/registry/virtual.json +2 -1
- package/dist/chunk-R6SDS7JM.js.map +0 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Button, MatchDialog } from "@krizaka/ui/native";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
// Two people liked each other: the next step is a message.
|
|
5
|
+
export default function NativeMatchDialogItsAMatch({ defaultOpen = false }: { defaultOpen?: boolean }) {
|
|
6
|
+
const [open, setOpen] = useState(defaultOpen);
|
|
7
|
+
return (
|
|
8
|
+
<>
|
|
9
|
+
<Button label="Like Elena" onPress={() => setOpen(true)} />
|
|
10
|
+
<MatchDialog
|
|
11
|
+
open={open}
|
|
12
|
+
onOpenChange={setOpen}
|
|
13
|
+
title="It's a match!"
|
|
14
|
+
description="You and Elena liked each other."
|
|
15
|
+
people={[{ name: "You" }, { name: "Elena" }]}
|
|
16
|
+
primaryLabel="Send a message"
|
|
17
|
+
onPrimary={() => undefined}
|
|
18
|
+
secondaryLabel="Keep swiping"
|
|
19
|
+
/>
|
|
20
|
+
</>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/photo-grid/native/profile-photos.tsx
|
|
4
|
+
import { PhotoGrid } from "@krizaka/ui/native";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var png = (data) => `data:image/png;base64,${data}`;
|
|
9
|
+
function NativePhotoGridProfilePhotos() {
|
|
10
|
+
const [photos, setPhotos] = useState([
|
|
11
|
+
{ id: "1", uri: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaklEQVR42mWMy24UQQxF7arqlwLhIbJhwZZf5I/4IISEBIsIRSKTMOmZnp7uqrJ9zYIeIeCsrqzjw+vHDwYCCM6wbfy5gABKatsysJqLuoHciZ2dGE4ApSrbnyidVn06lVyQUrweur5pmAJAqVQGSEGnRb79mD5/H6dzuRq6929fv7t5MTSd+6VUK3Zj/XQ7frkblyJ926jwkIab6yZw3Eq58rzaz6nMq1RVA+3nMmd73nMMfCkJiRBA7u5O7g6QCFfhyLyVRJg89U3bxKiGJsQ+te6pCge+lETYPT3rujalotqkNLSdexRhJk6lshjOWXeH+WE6Z1HAi+p+Pr+czuxtG0PKlZesd+P09f5xd5iKqrlX1cfpGCiqhDdXr9Ja8DSX24f9/eG4VDGAiAzIIrvpwJ6C96FUXrId15Ivxm8MKCpzKUvRUCpXJTOHO/2Nu6uhqocqLMr4V9iAkxoHMzZjgP7XnMjBZvQLMEROG5iV3IMAAAAASUVORK5CYII="), alt: "Elena at the beach" },
|
|
12
|
+
{ id: "2", uri: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABZklEQVR42m3MzW4TUQyGYZ8zZzJpwp8UiQ0SEvfMLXETICqoKrXQdDohyZwZ258/FpPCAryyrUdv6j99ZDAiSALLFhFkULhcLAAWFEEA7ggEhYkiImQwWNx84WY+Vh0OZzVvcn657bq25MQIFlOLYCDOY/1+23/59uN0mrZX3Yf3u3dvX6+7VvhcMvXH/vT5+u7rzcM02XrVOvyqbXZvNjmlYmoMqtpY5+EwjqOae4CHX7XWWTerktOl5OYwR5AkKSSXp6sxP5fcPJHrVWlLA0Rpctc2iYQ5/5RgEHLTlbY0qt6WZrsuQrp5SlJMzRG16r4/98M4qyM4m/eH+mqzyilWTVNUfZr0bn+8vn16eDqqeZDm2A9jEgawe7Eu8zQPx+nmfrh/PNbZERQRBCf1n0NtkhQym/lU59N5nu0ilkFQDaeqddLsamZwB/+Cy5CEhzuym8M9KP8iEQkSjgwAAP9LhCQB/AYQ5Y+kAv/RXgAAAABJRU5ErkJggg=="), alt: "Elena with her guitar" }
|
|
13
|
+
]);
|
|
14
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 340 }, children: /* @__PURE__ */ jsx(
|
|
15
|
+
PhotoGrid,
|
|
16
|
+
{
|
|
17
|
+
value: photos,
|
|
18
|
+
onValueChange: setPhotos,
|
|
19
|
+
onAdd: () => void 0,
|
|
20
|
+
required: 2,
|
|
21
|
+
labels: { add: "Add a photo", main: "Main", photo: (n) => `Photo ${n}`, makeMain: "Make it the main photo", moveEarlier: "Move earlier", moveLater: "Move later", remove: "Remove", cancel: "Cancel" }
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
NativePhotoGridProfilePhotos as default
|
|
27
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type GridPhoto, PhotoGrid } from "@krizaka/ui/native";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
|
|
5
|
+
const png = (data: string) => `data:image/png;base64,${data}`;
|
|
6
|
+
|
|
7
|
+
// A profile's photos: the first is the main one; a tap opens its menu (main, earlier, later, remove).
|
|
8
|
+
export default function NativePhotoGridProfilePhotos() {
|
|
9
|
+
const [photos, setPhotos] = useState<GridPhoto[]>([
|
|
10
|
+
{ id: "1", uri: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaklEQVR42mWMy24UQQxF7arqlwLhIbJhwZZf5I/4IISEBIsIRSKTMOmZnp7uqrJ9zYIeIeCsrqzjw+vHDwYCCM6wbfy5gABKatsysJqLuoHciZ2dGE4ApSrbnyidVn06lVyQUrweur5pmAJAqVQGSEGnRb79mD5/H6dzuRq6929fv7t5MTSd+6VUK3Zj/XQ7frkblyJ926jwkIab6yZw3Eq58rzaz6nMq1RVA+3nMmd73nMMfCkJiRBA7u5O7g6QCFfhyLyVRJg89U3bxKiGJsQ+te6pCge+lETYPT3rujalotqkNLSdexRhJk6lshjOWXeH+WE6Z1HAi+p+Pr+czuxtG0PKlZesd+P09f5xd5iKqrlX1cfpGCiqhDdXr9Ja8DSX24f9/eG4VDGAiAzIIrvpwJ6C96FUXrId15Ivxm8MKCpzKUvRUCpXJTOHO/2Nu6uhqocqLMr4V9iAkxoHMzZjgP7XnMjBZvQLMEROG5iV3IMAAAAASUVORK5CYII="), alt: "Elena at the beach" },
|
|
11
|
+
{ id: "2", uri: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABZklEQVR42m3MzW4TUQyGYZ8zZzJpwp8UiQ0SEvfMLXETICqoKrXQdDohyZwZ258/FpPCAryyrUdv6j99ZDAiSALLFhFkULhcLAAWFEEA7ggEhYkiImQwWNx84WY+Vh0OZzVvcn657bq25MQIFlOLYCDOY/1+23/59uN0mrZX3Yf3u3dvX6+7VvhcMvXH/vT5+u7rzcM02XrVOvyqbXZvNjmlYmoMqtpY5+EwjqOae4CHX7XWWTerktOl5OYwR5AkKSSXp6sxP5fcPJHrVWlLA0Rpctc2iYQ5/5RgEHLTlbY0qt6WZrsuQrp5SlJMzRG16r4/98M4qyM4m/eH+mqzyilWTVNUfZr0bn+8vn16eDqqeZDm2A9jEgawe7Eu8zQPx+nmfrh/PNbZERQRBCf1n0NtkhQym/lU59N5nu0ilkFQDaeqddLsamZwB/+Cy5CEhzuym8M9KP8iEQkSjgwAAP9LhCQB/AYQ5Y+kAv/RXgAAAABJRU5ErkJggg=="), alt: "Elena with her guitar" },
|
|
12
|
+
]);
|
|
13
|
+
return (
|
|
14
|
+
<View style={{ width: 340 }}>
|
|
15
|
+
<PhotoGrid
|
|
16
|
+
value={photos}
|
|
17
|
+
onValueChange={setPhotos}
|
|
18
|
+
onAdd={() => undefined}
|
|
19
|
+
required={2}
|
|
20
|
+
labels={{ add: "Add a photo", main: "Main", photo: (n) => `Photo ${n}`, makeMain: "Make it the main photo", moveEarlier: "Move earlier", moveLater: "Move later", remove: "Remove", cancel: "Cancel" }}
|
|
21
|
+
/>
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/photo-grid/profile-photos.tsx
|
|
4
|
+
import { PhotoGrid } from "@krizaka/ui/photo-grid";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var png = (data) => `data:image/png;base64,${data}`;
|
|
8
|
+
function PhotoGridProfilePhotos() {
|
|
9
|
+
const [photos, setPhotos] = useState([
|
|
10
|
+
{ id: "1", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaklEQVR42mWMy24UQQxF7arqlwLhIbJhwZZf5I/4IISEBIsIRSKTMOmZnp7uqrJ9zYIeIeCsrqzjw+vHDwYCCM6wbfy5gABKatsysJqLuoHciZ2dGE4ApSrbnyidVn06lVyQUrweur5pmAJAqVQGSEGnRb79mD5/H6dzuRq6929fv7t5MTSd+6VUK3Zj/XQ7frkblyJ926jwkIab6yZw3Eq58rzaz6nMq1RVA+3nMmd73nMMfCkJiRBA7u5O7g6QCFfhyLyVRJg89U3bxKiGJsQ+te6pCge+lETYPT3rujalotqkNLSdexRhJk6lshjOWXeH+WE6Z1HAi+p+Pr+czuxtG0PKlZesd+P09f5xd5iKqrlX1cfpGCiqhDdXr9Ja8DSX24f9/eG4VDGAiAzIIrvpwJ6C96FUXrId15Ivxm8MKCpzKUvRUCpXJTOHO/2Nu6uhqocqLMr4V9iAkxoHMzZjgP7XnMjBZvQLMEROG5iV3IMAAAAASUVORK5CYII="), alt: "Elena at the beach" },
|
|
11
|
+
{ id: "2", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABZklEQVR42m3MzW4TUQyGYZ8zZzJpwp8UiQ0SEvfMLXETICqoKrXQdDohyZwZ258/FpPCAryyrUdv6j99ZDAiSALLFhFkULhcLAAWFEEA7ggEhYkiImQwWNx84WY+Vh0OZzVvcn657bq25MQIFlOLYCDOY/1+23/59uN0mrZX3Yf3u3dvX6+7VvhcMvXH/vT5+u7rzcM02XrVOvyqbXZvNjmlYmoMqtpY5+EwjqOae4CHX7XWWTerktOl5OYwR5AkKSSXp6sxP5fcPJHrVWlLA0Rpctc2iYQ5/5RgEHLTlbY0qt6WZrsuQrp5SlJMzRG16r4/98M4qyM4m/eH+mqzyilWTVNUfZr0bn+8vn16eDqqeZDm2A9jEgawe7Eu8zQPx+nmfrh/PNbZERQRBCf1n0NtkhQym/lU59N5nu0ilkFQDaeqddLsamZwB/+Cy5CEhzuym8M9KP8iEQkSjgwAAP9LhCQB/AYQ5Y+kAv/RXgAAAABJRU5ErkJggg=="), alt: "Elena with her guitar" },
|
|
12
|
+
{ id: "3", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaUlEQVR42mWRzW5TQRSDZ+bOTdMoFMGCFWx4SR6OF0EgQVWECmqbNOnNvTPnHNssIn6kemVZn+yF84eP30mKFEWCZwMmnROKrAAIShSIAOECKaWUkhIlkTXMzxDdbT614z7M8jCsNi+G8UI5nyEjKKKfpuOP6931Z5uO4+X26t377Zu3w2otqYY5SZjNu/uHr5/2N1+it7paR0QZLy9evs651DAjCes2n9ph58uMcIH9+Njn07De5jL8bXJ4kJSUJEkU4BFmuQzVzUTCXUplXJdhJFCGWuqFlMIjJ1aYE0SEpLrelDpmtzKMw2ojJpinnGuYMcLavOzv2+MDrItAdHvatc3VKqUyjDV697YsD7fT7bf2eIewJCK8H+6VMoBx86paa/1pP/26WXY/oy+JSCklAt774U65kLm4mS/N5+k8lP5IBMJimaK1AnO6E5HOf/0vSQGElzBHhEilZ1ASRXgUAAD0vOYfhd832o14udpJswAAAABJRU5ErkJggg=="), alt: "Elena at a concert" }
|
|
13
|
+
]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
PhotoGrid,
|
|
16
|
+
{
|
|
17
|
+
className: "max-w-sm",
|
|
18
|
+
value: photos,
|
|
19
|
+
onValueChange: setPhotos,
|
|
20
|
+
onAdd: () => void 0,
|
|
21
|
+
required: 2,
|
|
22
|
+
labels: { add: "Add a photo", main: "Main", photo: (n) => `Photo ${n}`, moveEarlier: "Move earlier", moveLater: "Move later", remove: "Remove", moved: (n) => `Moved to place ${n}` }
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
PhotoGridProfilePhotos as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { type GridPhoto, PhotoGrid } from "@krizaka/ui/photo-grid";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
const png = (data: string) => `data:image/png;base64,${data}`;
|
|
7
|
+
|
|
8
|
+
// A profile's photos: drag one onto another, or its buttons; the first is the main one.
|
|
9
|
+
export default function PhotoGridProfilePhotos() {
|
|
10
|
+
const [photos, setPhotos] = useState<GridPhoto[]>([
|
|
11
|
+
{ id: "1", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaklEQVR42mWMy24UQQxF7arqlwLhIbJhwZZf5I/4IISEBIsIRSKTMOmZnp7uqrJ9zYIeIeCsrqzjw+vHDwYCCM6wbfy5gABKatsysJqLuoHciZ2dGE4ApSrbnyidVn06lVyQUrweur5pmAJAqVQGSEGnRb79mD5/H6dzuRq6929fv7t5MTSd+6VUK3Zj/XQ7frkblyJ926jwkIab6yZw3Eq58rzaz6nMq1RVA+3nMmd73nMMfCkJiRBA7u5O7g6QCFfhyLyVRJg89U3bxKiGJsQ+te6pCge+lETYPT3rujalotqkNLSdexRhJk6lshjOWXeH+WE6Z1HAi+p+Pr+czuxtG0PKlZesd+P09f5xd5iKqrlX1cfpGCiqhDdXr9Ja8DSX24f9/eG4VDGAiAzIIrvpwJ6C96FUXrId15Ivxm8MKCpzKUvRUCpXJTOHO/2Nu6uhqocqLMr4V9iAkxoHMzZjgP7XnMjBZvQLMEROG5iV3IMAAAAASUVORK5CYII="), alt: "Elena at the beach" },
|
|
12
|
+
{ id: "2", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABZklEQVR42m3MzW4TUQyGYZ8zZzJpwp8UiQ0SEvfMLXETICqoKrXQdDohyZwZ258/FpPCAryyrUdv6j99ZDAiSALLFhFkULhcLAAWFEEA7ggEhYkiImQwWNx84WY+Vh0OZzVvcn657bq25MQIFlOLYCDOY/1+23/59uN0mrZX3Yf3u3dvX6+7VvhcMvXH/vT5+u7rzcM02XrVOvyqbXZvNjmlYmoMqtpY5+EwjqOae4CHX7XWWTerktOl5OYwR5AkKSSXp6sxP5fcPJHrVWlLA0Rpctc2iYQ5/5RgEHLTlbY0qt6WZrsuQrp5SlJMzRG16r4/98M4qyM4m/eH+mqzyilWTVNUfZr0bn+8vn16eDqqeZDm2A9jEgawe7Eu8zQPx+nmfrh/PNbZERQRBCf1n0NtkhQym/lU59N5nu0ilkFQDaeqddLsamZwB/+Cy5CEhzuym8M9KP8iEQkSjgwAAP9LhCQB/AYQ5Y+kAv/RXgAAAABJRU5ErkJggg=="), alt: "Elena with her guitar" },
|
|
13
|
+
{ id: "3", src: png("iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQCAIAAACtAwlQAAABaUlEQVR42mWRzW5TQRSDZ+bOTdMoFMGCFWx4SR6OF0EgQVWECmqbNOnNvTPnHNssIn6kemVZn+yF84eP30mKFEWCZwMmnROKrAAIShSIAOECKaWUkhIlkTXMzxDdbT614z7M8jCsNi+G8UI5nyEjKKKfpuOP6931Z5uO4+X26t377Zu3w2otqYY5SZjNu/uHr5/2N1+it7paR0QZLy9evs651DAjCes2n9ph58uMcIH9+Njn07De5jL8bXJ4kJSUJEkU4BFmuQzVzUTCXUplXJdhJFCGWuqFlMIjJ1aYE0SEpLrelDpmtzKMw2ojJpinnGuYMcLavOzv2+MDrItAdHvatc3VKqUyjDV697YsD7fT7bf2eIewJCK8H+6VMoBx86paa/1pP/26WXY/oy+JSCklAt774U65kLm4mS/N5+k8lP5IBMJimaK1AnO6E5HOf/0vSQGElzBHhEilZ1ASRXgUAAD0vOYfhd832o14udpJswAAAABJRU5ErkJggg=="), alt: "Elena at a concert" },
|
|
14
|
+
]);
|
|
15
|
+
return (
|
|
16
|
+
<PhotoGrid
|
|
17
|
+
className="max-w-sm"
|
|
18
|
+
value={photos}
|
|
19
|
+
onValueChange={setPhotos}
|
|
20
|
+
onAdd={() => undefined}
|
|
21
|
+
required={2}
|
|
22
|
+
labels={{ add: "Add a photo", main: "Main", photo: (n) => `Photo ${n}`, moveEarlier: "Move earlier", moveLater: "Move later", remove: "Remove", moved: (n) => `Moved to place ${n}` }}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/pull-to-refresh/native/branded.tsx
|
|
4
|
+
import { BrandedRefresh, Txt } from "@krizaka/ui/native";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { ScrollView, View } from "react-native";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
function NativePullToRefreshBranded() {
|
|
9
|
+
const [refreshing, setRefreshing] = useState(true);
|
|
10
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 240 }, children: /* @__PURE__ */ jsx(BrandedRefresh, { product: "orochia", refreshing, onRefresh: () => setRefreshing(true), label: "Refreshing your videos", children: (scroll) => /* @__PURE__ */ jsx(ScrollView, { ...scroll, contentContainerStyle: { paddingTop: 56 }, children: ["Sunset session \xB7 Elena \xB7 2.4K views", "Acoustic dare \xB7 Alex \xB7 918 views"].map((line) => /* @__PURE__ */ jsx(Txt, { style: { padding: 16 }, children: line }, line)) }) }) });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
NativePullToRefreshBranded as default
|
|
14
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BrandedRefresh, Txt } from "@krizaka/ui/native";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { ScrollView, View } from "react-native";
|
|
4
|
+
|
|
5
|
+
// The product's mark as the pull: it grows into place as you pull and turns while it refreshes.
|
|
6
|
+
export default function NativePullToRefreshBranded() {
|
|
7
|
+
const [refreshing, setRefreshing] = useState(true);
|
|
8
|
+
return (
|
|
9
|
+
<View style={{ width: 360, height: 240 }}>
|
|
10
|
+
<BrandedRefresh product="orochia" refreshing={refreshing} onRefresh={() => setRefreshing(true)} label="Refreshing your videos">
|
|
11
|
+
{(scroll) => (
|
|
12
|
+
<ScrollView {...scroll} contentContainerStyle={{ paddingTop: 56 }}>
|
|
13
|
+
{["Sunset session · Elena · 2.4K views", "Acoustic dare · Alex · 918 views"].map((line) => (
|
|
14
|
+
<Txt key={line} style={{ padding: 16 }}>
|
|
15
|
+
{line}
|
|
16
|
+
</Txt>
|
|
17
|
+
))}
|
|
18
|
+
</ScrollView>
|
|
19
|
+
)}
|
|
20
|
+
</BrandedRefresh>
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/app-shell.tsx
|
|
4
|
+
import { Header, Screen, TabBar, Txt } from "@krizaka/ui/native";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
import Svg, { Path } from "react-native-svg";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var icon = (d) => (on, color) => /* @__PURE__ */ jsx(Svg, { width: 24, height: 24, viewBox: "0 0 24 24", fill: on ? color : "none", stroke: color, strokeWidth: 2, strokeLinejoin: "round", children: /* @__PURE__ */ jsx(Path, { d }) });
|
|
10
|
+
var TABS = [
|
|
11
|
+
{ value: "discover", label: "Discover", icon: icon("M12 3l2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6z") },
|
|
12
|
+
{ value: "likes", label: "Likes", badge: 4, badgeLabel: "4 new", icon: icon("M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z") },
|
|
13
|
+
{ value: "chats", label: "Chats", badge: 2, badgeLabel: "2 unread", icon: icon("M4 5h16v11H8l-4 4z") },
|
|
14
|
+
{ value: "me", label: "Me", icon: icon("M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0") }
|
|
15
|
+
];
|
|
16
|
+
function NativeScreenAppShell() {
|
|
17
|
+
const [tab, setTab] = useState("likes");
|
|
18
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 640 }, children: /* @__PURE__ */ jsx(Screen, { header: /* @__PURE__ */ jsx(Header, { title: "Likes", subtitle: "4 people liked you" }), footer: /* @__PURE__ */ jsx(TabBar, { "aria-label": "Main sections", items: TABS, value: tab, onValueChange: setTab }), padding: 0, children: ["Elena, 29", "Noah, 31", "Mina, 27", "Alex, 33"].map((name) => /* @__PURE__ */ jsxs(View, { style: { gap: 2, paddingHorizontal: 16, paddingVertical: 12 }, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Txt, { variant: "label", children: name }),
|
|
20
|
+
/* @__PURE__ */ jsx(Txt, { variant: "caption", tone: "secondary", children: "Liked you today" })
|
|
21
|
+
] }, name)) }) });
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
NativeScreenAppShell as default
|
|
25
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Header, Screen, TabBar, Txt } from "@krizaka/ui/native";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import Svg, { Path } from "react-native-svg";
|
|
5
|
+
|
|
6
|
+
const icon = (d: string) => (on: boolean, color: string) => (
|
|
7
|
+
<Svg width={24} height={24} viewBox="0 0 24 24" fill={on ? color : "none"} stroke={color} strokeWidth={2} strokeLinejoin="round">
|
|
8
|
+
<Path d={d} />
|
|
9
|
+
</Svg>
|
|
10
|
+
);
|
|
11
|
+
const TABS = [
|
|
12
|
+
{ value: "discover", label: "Discover", icon: icon("M12 3l2.6 6.4L21 12l-6.4 2.6L12 21l-2.6-6.4L3 12l6.4-2.6z") },
|
|
13
|
+
{ value: "likes", label: "Likes", badge: 4, badgeLabel: "4 new", icon: icon("M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10z") },
|
|
14
|
+
{ value: "chats", label: "Chats", badge: 2, badgeLabel: "2 unread", icon: icon("M4 5h16v11H8l-4 4z") },
|
|
15
|
+
{ value: "me", label: "Me", icon: icon("M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0") },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// The app shell: a header with its large title, the section's content, the tab bar clear of the home indicator.
|
|
19
|
+
export default function NativeScreenAppShell() {
|
|
20
|
+
const [tab, setTab] = useState("likes");
|
|
21
|
+
return (
|
|
22
|
+
<View style={{ width: 360, height: 640 }}>
|
|
23
|
+
<Screen header={<Header title="Likes" subtitle="4 people liked you" />} footer={<TabBar aria-label="Main sections" items={TABS} value={tab} onValueChange={setTab} />} padding={0}>
|
|
24
|
+
{["Elena, 29", "Noah, 31", "Mina, 27", "Alex, 33"].map((name) => (
|
|
25
|
+
<View key={name} style={{ gap: 2, paddingHorizontal: 16, paddingVertical: 12 }}>
|
|
26
|
+
<Txt variant="label">{name}</Txt>
|
|
27
|
+
<Txt variant="caption" tone="secondary">Liked you today</Txt>
|
|
28
|
+
</View>
|
|
29
|
+
))}
|
|
30
|
+
</Screen>
|
|
31
|
+
</View>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/auth.tsx
|
|
4
|
+
import { Button, KrizakaMark, Screen, TextField, Txt } from "@krizaka/ui/native";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function NativeScreenAuth() {
|
|
8
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 640 }, children: /* @__PURE__ */ jsxs(Screen, { footer: /* @__PURE__ */ jsxs(View, { style: { padding: 16, gap: 8 }, children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Button, { label: "Sign in", variant: "gradient", size: "lg" }),
|
|
10
|
+
/* @__PURE__ */ jsx(Button, { label: "Create an account", variant: "ghost" })
|
|
11
|
+
] }), children: [
|
|
12
|
+
/* @__PURE__ */ jsxs(View, { style: { alignItems: "center", gap: 8, marginVertical: 24 }, children: [
|
|
13
|
+
/* @__PURE__ */ jsx(KrizakaMark, { size: 64 }),
|
|
14
|
+
/* @__PURE__ */ jsx(Txt, { variant: "display", children: "Welcome back" }),
|
|
15
|
+
/* @__PURE__ */ jsx(Txt, { tone: "secondary", style: { textAlign: "center" }, children: "Meet people who like what you like." })
|
|
16
|
+
] }),
|
|
17
|
+
/* @__PURE__ */ jsx(TextField, { label: "Email", autoComplete: "email", keyboardType: "email-address", placeholder: "you@example.com" }),
|
|
18
|
+
/* @__PURE__ */ jsx(TextField, { label: "Password", hint: "At least 12 characters", autoComplete: "current-password", secureTextEntry: true }),
|
|
19
|
+
/* @__PURE__ */ jsx(Txt, { variant: "caption", tone: "secondary", style: { textAlign: "center" }, children: "By continuing you accept the terms and the privacy policy." })
|
|
20
|
+
] }) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
NativeScreenAuth as default
|
|
24
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Button, KrizakaMark, Screen, TextField, Txt } from "@krizaka/ui/native";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
// Sign in: the mark, the promise, two fields, the main action pinned above the keyboard, the legal words.
|
|
5
|
+
export default function NativeScreenAuth() {
|
|
6
|
+
return (
|
|
7
|
+
<View style={{ width: 360, height: 640 }}>
|
|
8
|
+
<Screen footer={<View style={{ padding: 16, gap: 8 }}><Button label="Sign in" variant="gradient" size="lg" /><Button label="Create an account" variant="ghost" /></View>}>
|
|
9
|
+
<View style={{ alignItems: "center", gap: 8, marginVertical: 24 }}>
|
|
10
|
+
<KrizakaMark size={64} />
|
|
11
|
+
<Txt variant="display">Welcome back</Txt>
|
|
12
|
+
<Txt tone="secondary" style={{ textAlign: "center" }}>Meet people who like what you like.</Txt>
|
|
13
|
+
</View>
|
|
14
|
+
<TextField label="Email" autoComplete="email" keyboardType="email-address" placeholder="you@example.com" />
|
|
15
|
+
<TextField label="Password" hint="At least 12 characters" autoComplete="current-password" secureTextEntry />
|
|
16
|
+
<Txt variant="caption" tone="secondary" style={{ textAlign: "center" }}>By continuing you accept the terms and the privacy policy.</Txt>
|
|
17
|
+
</Screen>
|
|
18
|
+
</View>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/chat.tsx
|
|
4
|
+
import { Avatar, Header, MessageBubble, MessageComposer, Screen, TypingIndicator } from "@krizaka/ui/native";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
import { View } from "react-native";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function NativeScreenChat() {
|
|
9
|
+
const [draft, setDraft] = useState("");
|
|
10
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 640 }, children: /* @__PURE__ */ jsxs(
|
|
11
|
+
Screen,
|
|
12
|
+
{
|
|
13
|
+
header: /* @__PURE__ */ jsx(Header, { size: "inline", title: "Elena", backLabel: "Chats", onBack: () => void 0, actions: /* @__PURE__ */ jsx(Avatar, { alt: "Elena, online", size: "sm", presence: "online", presenceLabel: "online" }) }),
|
|
14
|
+
footer: /* @__PURE__ */ jsx(MessageComposer, { value: draft, onValueChange: setDraft, onSend: () => setDraft(""), placeholder: "Message", sendLabel: "Send" }),
|
|
15
|
+
contentStyle: { gap: 4, justifyContent: "flex-end", flexGrow: 1 },
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(MessageBubble, { text: "Hey! Loved your sunset photo \u{1F305}", time: "19:02" }),
|
|
18
|
+
/* @__PURE__ */ jsx(MessageBubble, { mine: true, text: "Thanks! Cabo da Roca, last Sunday", time: "19:05", grouped: "first" }),
|
|
19
|
+
/* @__PURE__ */ jsx(MessageBubble, { mine: true, text: "We should go together", time: "19:05", grouped: "last", status: "delivered", showStatus: true }),
|
|
20
|
+
/* @__PURE__ */ jsx(TypingIndicator, { label: "Elena is typing" })
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
NativeScreenChat as default
|
|
27
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Avatar, Header, MessageBubble, MessageComposer, Screen, TypingIndicator } from "@krizaka/ui/native";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
|
|
5
|
+
// A chat: the person in the header with their presence, the messages, the composer above the keyboard.
|
|
6
|
+
export default function NativeScreenChat() {
|
|
7
|
+
const [draft, setDraft] = useState("");
|
|
8
|
+
return (
|
|
9
|
+
<View style={{ width: 360, height: 640 }}>
|
|
10
|
+
<Screen
|
|
11
|
+
header={<Header size="inline" title="Elena" backLabel="Chats" onBack={() => undefined} actions={<Avatar alt="Elena, online" size="sm" presence="online" presenceLabel="online" />} />}
|
|
12
|
+
footer={<MessageComposer value={draft} onValueChange={setDraft} onSend={() => setDraft("")} placeholder="Message" sendLabel="Send" />}
|
|
13
|
+
contentStyle={{ gap: 4, justifyContent: "flex-end", flexGrow: 1 }}
|
|
14
|
+
>
|
|
15
|
+
<MessageBubble text="Hey! Loved your sunset photo 🌅" time="19:02" />
|
|
16
|
+
<MessageBubble mine text="Thanks! Cabo da Roca, last Sunday" time="19:05" grouped="first" />
|
|
17
|
+
<MessageBubble mine text="We should go together" time="19:05" grouped="last" status="delivered" showStatus />
|
|
18
|
+
<TypingIndicator label="Elena is typing" />
|
|
19
|
+
</Screen>
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/feed.tsx
|
|
4
|
+
import { Avatar, Card, Header, Screen, Txt } from "@krizaka/ui/native";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var POSTS = [
|
|
8
|
+
{ id: "1", who: "Elena", what: "Sunset session at Cabo da Roca", when: "2 h" },
|
|
9
|
+
{ id: "2", who: "Noah", what: "Best ramen in Porto? I have a list.", when: "5 h" },
|
|
10
|
+
{ id: "3", who: "Mina", what: "Free tickets for the jazz night!", when: "Yesterday" }
|
|
11
|
+
];
|
|
12
|
+
function NativeScreenFeed() {
|
|
13
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 640 }, children: /* @__PURE__ */ jsx(Screen, { header: /* @__PURE__ */ jsx(Header, { title: "Moments", subtitle: "From people you matched with" }), children: POSTS.map((p) => /* @__PURE__ */ jsx(Card.Root, { children: /* @__PURE__ */ jsxs(Card.Body, { children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "center", gap: 10 }, children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Avatar, { alt: p.who, size: "sm" }),
|
|
16
|
+
/* @__PURE__ */ jsx(Txt, { variant: "label", style: { flex: 1 }, children: p.who }),
|
|
17
|
+
/* @__PURE__ */ jsx(Txt, { variant: "caption", tone: "secondary", children: p.when })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsx(Txt, { children: p.what })
|
|
20
|
+
] }) }, p.id)) }) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
NativeScreenFeed as default
|
|
24
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Avatar, Card, Header, Screen, Txt } from "@krizaka/ui/native";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
const POSTS = [
|
|
5
|
+
{ id: "1", who: "Elena", what: "Sunset session at Cabo da Roca", when: "2 h" },
|
|
6
|
+
{ id: "2", who: "Noah", what: "Best ramen in Porto? I have a list.", when: "5 h" },
|
|
7
|
+
{ id: "3", who: "Mina", what: "Free tickets for the jazz night!", when: "Yesterday" },
|
|
8
|
+
];
|
|
9
|
+
|
|
10
|
+
// A feed: a large title, cards under it (a long feed uses the list of `@krizaka/ui/native/list` in `scroll={false}`).
|
|
11
|
+
export default function NativeScreenFeed() {
|
|
12
|
+
return (
|
|
13
|
+
<View style={{ width: 360, height: 640 }}>
|
|
14
|
+
<Screen header={<Header title="Moments" subtitle="From people you matched with" />}>
|
|
15
|
+
{POSTS.map((p) => (
|
|
16
|
+
<Card.Root key={p.id}>
|
|
17
|
+
<Card.Body>
|
|
18
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 10 }}>
|
|
19
|
+
<Avatar alt={p.who} size="sm" />
|
|
20
|
+
<Txt variant="label" style={{ flex: 1 }}>
|
|
21
|
+
{p.who}
|
|
22
|
+
</Txt>
|
|
23
|
+
<Txt variant="caption" tone="secondary">
|
|
24
|
+
{p.when}
|
|
25
|
+
</Txt>
|
|
26
|
+
</View>
|
|
27
|
+
<Txt>{p.what}</Txt>
|
|
28
|
+
</Card.Body>
|
|
29
|
+
</Card.Root>
|
|
30
|
+
))}
|
|
31
|
+
</Screen>
|
|
32
|
+
</View>
|
|
33
|
+
);
|
|
34
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/map.tsx
|
|
4
|
+
import { Button, Header, Screen, Sheet, Txt } from "@krizaka/ui/native";
|
|
5
|
+
import { Map, Marker } from "@krizaka/ui/native/map";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { View } from "react-native";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var SPOTS = [
|
|
10
|
+
{ id: "olimpico", label: "Caf\xE9 Olimpico", where: "Mile End \xB7 450 m", position: [-73.6005, 45.5229] },
|
|
11
|
+
{ id: "parc", label: "Parc La Fontaine", where: "Plateau \xB7 2 km", position: [-73.5695, 45.5268] },
|
|
12
|
+
{ id: "talon", label: "March\xE9 Jean-Talon", where: "Little Italy \xB7 1.2 km", position: [-73.6147, 45.5363] }
|
|
13
|
+
];
|
|
14
|
+
function NativeScreenMap() {
|
|
15
|
+
const [open, setOpen] = useState(null);
|
|
16
|
+
return /* @__PURE__ */ jsxs(View, { style: { width: 360, height: 640 }, children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Screen, { header: /* @__PURE__ */ jsx(Header, { title: "Pick-up points", subtitle: "Near Mile End" }), scroll: false, padding: 0, children: /* @__PURE__ */ jsx(Map, { label: "Pick-up points in Montr\xE9al", center: [-73.59, 45.527], zoom: 12.5, style: { flex: 1 }, children: SPOTS.map((s) => /* @__PURE__ */ jsx(Marker, { position: s.position, label: s.label, selected: open?.id === s.id, onPress: () => setOpen(s) }, s.id)) }) }),
|
|
18
|
+
/* @__PURE__ */ jsxs(Sheet, { open: Boolean(open), onOpenChange: (o) => !o && setOpen(null), title: open?.label, children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Txt, { tone: "secondary", children: open?.where }),
|
|
20
|
+
/* @__PURE__ */ jsx(Button, { label: "Pick up here", variant: "primary", onPress: () => setOpen(null) })
|
|
21
|
+
] })
|
|
22
|
+
] });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
NativeScreenMap as default
|
|
26
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Button, Header, Screen, Sheet, Txt } from "@krizaka/ui/native";
|
|
2
|
+
import { Map, Marker } from "@krizaka/ui/native/map";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { View } from "react-native";
|
|
5
|
+
|
|
6
|
+
const SPOTS = [
|
|
7
|
+
{ id: "olimpico", label: "Café Olimpico", where: "Mile End · 450 m", position: [-73.6005, 45.5229] as const },
|
|
8
|
+
{ id: "parc", label: "Parc La Fontaine", where: "Plateau · 2 km", position: [-73.5695, 45.5268] as const },
|
|
9
|
+
{ id: "talon", label: "Marché Jean-Talon", where: "Little Italy · 1.2 km", position: [-73.6147, 45.5363] as const },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
// A map-centric screen: the map fills the screen under a header, a marker pressed opens its place in a bottom sheet
|
|
13
|
+
// with the one action; every marker is also a named button, so the places are read as a list.
|
|
14
|
+
export default function NativeScreenMap() {
|
|
15
|
+
const [open, setOpen] = useState<(typeof SPOTS)[number] | null>(null);
|
|
16
|
+
return (
|
|
17
|
+
<View style={{ width: 360, height: 640 }}>
|
|
18
|
+
<Screen header={<Header title="Pick-up points" subtitle="Near Mile End" />} scroll={false} padding={0}>
|
|
19
|
+
<Map label="Pick-up points in Montréal" center={[-73.59, 45.527]} zoom={12.5} style={{ flex: 1 }}>
|
|
20
|
+
{SPOTS.map((s) => (
|
|
21
|
+
<Marker key={s.id} position={s.position} label={s.label} selected={open?.id === s.id} onPress={() => setOpen(s)} />
|
|
22
|
+
))}
|
|
23
|
+
</Map>
|
|
24
|
+
</Screen>
|
|
25
|
+
<Sheet open={Boolean(open)} onOpenChange={(o) => !o && setOpen(null)} title={open?.label}>
|
|
26
|
+
<Txt tone="secondary">{open?.where}</Txt>
|
|
27
|
+
<Button label="Pick up here" variant="primary" onPress={() => setOpen(null)} />
|
|
28
|
+
</Sheet>
|
|
29
|
+
</View>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/screen/native/notifications.tsx
|
|
4
|
+
import { ActivityFeed, Button, Header, Screen } from "@krizaka/ui/native";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var EVENTS = [
|
|
8
|
+
{ id: "e1", at: "2026-10-13T09:40:00Z", title: "Mina unlocked \u201CNight shoot, part 2\u201D", tone: "success" },
|
|
9
|
+
{ id: "e2", at: "2026-10-13T08:15:00Z", title: "Your payout of \u20AC120 was sent", tone: "info" },
|
|
10
|
+
{ id: "e3", at: "2026-10-12T19:02:00Z", title: "L\xE9a bid \u20AC25 on the auction", tone: "accent" },
|
|
11
|
+
{ id: "e4", at: "2026-10-12T11:30:00Z", title: "Clip job failed", description: "The source is too short", tone: "danger" }
|
|
12
|
+
];
|
|
13
|
+
function NativeScreenNotifications() {
|
|
14
|
+
return /* @__PURE__ */ jsx(View, { style: { width: 360, height: 640 }, children: /* @__PURE__ */ jsxs(Screen, { header: /* @__PURE__ */ jsx(Header, { title: "Notifications", subtitle: "2 new" }), children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Button, { label: "Mark all as read", variant: "ghost", size: "sm" }),
|
|
16
|
+
/* @__PURE__ */ jsx(ActivityFeed, { "aria-label": "Notifications", events: EVENTS, now: /* @__PURE__ */ new Date("2026-10-13T10:00:00Z") })
|
|
17
|
+
] }) });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
NativeScreenNotifications as default
|
|
21
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ActivityFeed, Button, Header, Screen } from "@krizaka/ui/native";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
const EVENTS = [
|
|
5
|
+
{ id: "e1", at: "2026-10-13T09:40:00Z", title: "Mina unlocked “Night shoot, part 2”", tone: "success" as const },
|
|
6
|
+
{ id: "e2", at: "2026-10-13T08:15:00Z", title: "Your payout of €120 was sent", tone: "info" as const },
|
|
7
|
+
{ id: "e3", at: "2026-10-12T19:02:00Z", title: "Léa bid €25 on the auction", tone: "accent" as const },
|
|
8
|
+
{ id: "e4", at: "2026-10-12T11:30:00Z", title: "Clip job failed", description: "The source is too short", tone: "danger" as const },
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
// A notifications centre: what happened, newest first, grouped by day; marking all as read is a button, never a hidden gesture.
|
|
12
|
+
export default function NativeScreenNotifications() {
|
|
13
|
+
return (
|
|
14
|
+
<View style={{ width: 360, height: 640 }}>
|
|
15
|
+
<Screen header={<Header title="Notifications" subtitle="2 new" />}>
|
|
16
|
+
<Button label="Mark all as read" variant="ghost" size="sm" />
|
|
17
|
+
<ActivityFeed aria-label="Notifications" events={EVENTS} now={new Date("2026-10-13T10:00:00Z")} />
|
|
18
|
+
</Screen>
|
|
19
|
+
</View>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
Binary file
|