@krizaka/ui 3.74.0 → 3.75.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 +2 -6
- package/dist/{chunk-GSQRSWOE.js → chunk-RI3AA2E3.js} +3 -3
- package/dist/{chunk-E4FMPPDL.js → chunk-WC3SO4CE.js} +2 -2
- package/dist/{chunk-KF7UB3LM.js → chunk-YQWYGQTV.js} +11 -9
- package/dist/{chunk-KF7UB3LM.js.map → chunk-YQWYGQTV.js.map} +1 -1
- package/dist/{chunk-M3GEYLMR.js → chunk-ZPOVOEO3.js} +1 -2
- package/dist/data-table.js +3 -3
- package/dist/filter-bar.d.ts +12 -4
- package/dist/filter-bar.js +1 -1
- package/dist/gallery-page.js +3 -3
- package/dist/genui.js +101 -35
- package/dist/genui.js.map +1 -1
- package/dist/language-switch.d.ts +9 -9
- package/dist/{lightbox-D5NAHFEA.js → lightbox-Q45BZ3HW.js} +3 -3
- package/dist/match-dialog.js +2 -2
- package/dist/motion.css +1 -25
- package/dist/native/list.js +1 -1
- package/dist/native/list.js.map +1 -1
- package/dist/native.d.ts +2 -54
- package/dist/native.js +464 -560
- package/dist/native.js.map +1 -1
- package/dist/product-page.js +3 -3
- package/dist/shop-gallery.js +1 -1
- package/dist/tag-selector.js +16 -10
- package/dist/tag-selector.js.map +1 -1
- package/dist/vertical-video.js +1 -1
- package/dist/waveform.js.map +1 -1
- package/package.json +5 -81
- package/registry/account-menu.json +1 -1
- package/registry/account-settings.json +1 -1
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/analysis-report.json +1 -1
- package/registry/anatomy-plate.json +1 -1
- package/registry/app-frame.json +2 -2
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/bird-plate.json +1 -1
- package/registry/button.json +1 -1
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/chapter.json +1 -1
- package/registry/chat.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/collection-switcher.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/copy-button.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cover-hero.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/desktop-window.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +1 -1
- package/registry/doodle.json +1 -1
- package/registry/drop-overlay.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/elephant.json +1 -1
- package/registry/embed-facade.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/engine-flow.json +1 -1
- package/registry/entity-header.json +1 -1
- package/registry/environment-notice.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +1 -1
- package/registry/footnote.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +1 -1
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/grade-stamp.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +10 -185
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +1 -1
- package/registry/kpi-explained.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/margin-layout.json +1 -1
- package/registry/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-gallery.json +3 -14
- package/registry/meter.json +1 -1
- package/registry/money-input.json +1 -1
- package/registry/nav-bar.json +2 -2
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/opening-hours.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/price-catalogue-editor.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +2 -6
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/promo-code-field.json +1 -1
- package/registry/proposal.json +1 -1
- package/registry/qr-code.json +1 -1
- package/registry/quota-meter.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +2 -2
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +2 -3
- package/registry/reviews.json +1 -1
- package/registry/router.json +1 -1
- package/registry/schema-form.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/shop-composer.json +1 -1
- package/registry/shop-gallery.json +3 -8
- package/registry/shop.json +2 -2
- package/registry/showcase.json +2 -7
- package/registry/signature.json +1 -1
- package/registry/site-cahier.json +1 -1
- package/registry/site-footer.json +2 -2
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-chip.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +1 -1
- package/registry/swipe-deck.json +3 -4
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +2 -2
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/text-style.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/upload-queue.json +1 -1
- package/registry/usage.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/versus-card.json +1 -1
- package/registry/vertical-video.json +2 -6
- package/registry/video-player.json +2 -7
- package/registry/video-trimmer.json +3 -4
- package/registry/virtual.json +1 -1
- package/registry/wall.json +3 -9
- package/registry/waveform.json +4 -9
- package/dist/audio-player.d.ts +0 -115
- package/dist/audio-player.js +0 -211
- package/dist/audio-player.js.map +0 -1
- package/dist/chunk-YKOLME7R.js +0 -126
- package/dist/chunk-YKOLME7R.js.map +0 -1
- package/dist/how-it-works-page.d.ts +0 -49
- package/dist/how-it-works-page.js +0 -28
- package/dist/how-it-works-page.js.map +0 -1
- package/dist/marquee.d.ts +0 -34
- package/dist/marquee.js +0 -52
- package/dist/marquee.js.map +0 -1
- package/dist/media-grid.d.ts +0 -246
- package/dist/media-grid.js +0 -468
- package/dist/media-grid.js.map +0 -1
- package/dist/photo-grid.d.ts +0 -123
- package/dist/photo-grid.js +0 -94
- package/dist/photo-grid.js.map +0 -1
- package/registry/audio-player.json +0 -300
- package/registry/examples/audio-player/podcast.d.ts +0 -4
- package/registry/examples/audio-player/podcast.js +0 -22
- package/registry/examples/audio-player/podcast.tsx +0 -19
- package/registry/examples/audio-player/voice-note.d.ts +0 -4
- package/registry/examples/audio-player/voice-note.js +0 -12
- package/registry/examples/audio-player/voice-note.tsx +0 -12
- package/registry/examples/how-it-works-page/orazaka.d.ts +0 -4
- package/registry/examples/how-it-works-page/orazaka.js +0 -30
- package/registry/examples/how-it-works-page/orazaka.tsx +0 -26
- package/registry/examples/marquee/cards.d.ts +0 -4
- package/registry/examples/marquee/cards.js +0 -23
- package/registry/examples/marquee/cards.tsx +0 -21
- package/registry/examples/marquee/logos.d.ts +0 -4
- package/registry/examples/marquee/logos.js +0 -12
- package/registry/examples/marquee/logos.tsx +0 -17
- package/registry/examples/media-grid/feed.d.ts +0 -4
- package/registry/examples/media-grid/feed.js +0 -31
- package/registry/examples/media-grid/feed.tsx +0 -30
- package/registry/examples/media-grid/loading.d.ts +0 -4
- package/registry/examples/media-grid/loading.js +0 -28
- package/registry/examples/media-grid/loading.tsx +0 -25
- package/registry/examples/media-grid/uniform.d.ts +0 -4
- package/registry/examples/media-grid/uniform.js +0 -29
- package/registry/examples/media-grid/uniform.tsx +0 -26
- package/registry/examples/photo-grid/native/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/native/profile-photos.dark.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.js +0 -27
- package/registry/examples/photo-grid/native/profile-photos.light.png +0 -0
- package/registry/examples/photo-grid/native/profile-photos.tsx +0 -24
- package/registry/examples/photo-grid/profile-photos.d.ts +0 -4
- package/registry/examples/photo-grid/profile-photos.js +0 -28
- package/registry/examples/photo-grid/profile-photos.tsx +0 -25
- package/registry/how-it-works-page.json +0 -258
- package/registry/marquee.json +0 -241
- package/registry/media-grid.json +0 -1034
- package/registry/photo-grid.json +0 -316
- /package/dist/{chunk-GSQRSWOE.js.map → chunk-RI3AA2E3.js.map} +0 -0
- /package/dist/{chunk-E4FMPPDL.js.map → chunk-WC3SO4CE.js.map} +0 -0
- /package/dist/{chunk-M3GEYLMR.js.map → chunk-ZPOVOEO3.js.map} +0 -0
- /package/dist/{lightbox-D5NAHFEA.js.map → lightbox-Q45BZ3HW.js.map} +0 -0
package/dist/match-dialog.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "./chunk-NPF3OHE2.js";
|
|
3
3
|
import {
|
|
4
4
|
Dialog
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WC3SO4CE.js";
|
|
6
6
|
import {
|
|
7
7
|
Avatar
|
|
8
8
|
} from "./chunk-E46AEUPH.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import "./chunk-JXLDUDTD.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ZPOVOEO3.js";
|
|
16
16
|
import "./chunk-D3T54RSL.js";
|
|
17
17
|
import "./chunk-NSLXEDIS.js";
|
|
18
18
|
|
package/dist/motion.css
CHANGED
|
@@ -84,16 +84,6 @@
|
|
|
84
84
|
50% { background-position: 100% center; }
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
/* Marquee (logos, feature words): two copies side by side, sliding forever. */
|
|
88
|
-
.kz-marquee {
|
|
89
|
-
display: flex;
|
|
90
|
-
width: max-content;
|
|
91
|
-
animation: kz-marquee var(--kz-marquee-duration, 40s) linear infinite;
|
|
92
|
-
}
|
|
93
|
-
@keyframes kz-marquee {
|
|
94
|
-
to { transform: translateX(-50%); }
|
|
95
|
-
}
|
|
96
|
-
|
|
97
87
|
/* Entrances of what opens over the page — one vocabulary for every overlay, dialog, menu and swapped view.
|
|
98
88
|
Opacity and transform only, `backwards` fill: nothing stays transformed once in place. */
|
|
99
89
|
.kz-overlay { animation: kz-fade-in 0.22s var(--kz-ease) backwards; } /* the dimmed backdrop */
|
|
@@ -299,20 +289,6 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
299
289
|
from { color: var(--kz-danger-text, currentColor); }
|
|
300
290
|
}
|
|
301
291
|
|
|
302
|
-
/* ─── Marquee: a band that slides at a speed, pauses for the reader, and is a still row under reduced motion ─── */
|
|
303
|
-
.kz-band {
|
|
304
|
-
--kz-band-gap: 2.5rem;
|
|
305
|
-
}
|
|
306
|
-
.kz-band[data-fade] > .kz-band-viewport {
|
|
307
|
-
mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
|
|
308
|
-
}
|
|
309
|
-
.kz-band[data-direction="right"] .kz-marquee {
|
|
310
|
-
animation-direction: reverse;
|
|
311
|
-
}
|
|
312
|
-
.kz-band:is([data-paused], :hover, :focus-within) .kz-marquee {
|
|
313
|
-
animation-play-state: paused;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
292
|
/* ─── GlowCard: a still hairline ring of the brand gradient (krizaka-ui#393: no bloom under the pointer, no turning
|
|
317
293
|
ring). Faint at rest, a step brighter under the pointer or the focus, fuller on a featured (`alive`) card. ─── */
|
|
318
294
|
.kz-glow:is([data-glow="border"], [data-glow="both"])::before {
|
|
@@ -613,7 +589,7 @@ svg[data-kz-icon="ExternalIcon"] {
|
|
|
613
589
|
@keyframes kz-grow-wipe { from { clip-path: inset(-4px 100% -4px -4px); } to { clip-path: inset(-4px -4px -4px -4px); } }
|
|
614
590
|
|
|
615
591
|
@media (prefers-reduced-motion: reduce) {
|
|
616
|
-
.kz-page, .kz-word, .kz-gradient-text, .kz-
|
|
592
|
+
.kz-page, .kz-word, .kz-gradient-text, .kz-backdrop-drift, .kz-overlay, .kz-dialog, .kz-pop, .kz-fade, .kz-progress,
|
|
617
593
|
.kz-skeleton, .kz-skeleton-shape *, .kz-toast::after,
|
|
618
594
|
.kz-rotating > *, .kz-loop, .kz-count-roll, .kz-loader-trace, .kz-loader-node, .kz-loader-mark,
|
|
619
595
|
[data-kz-status], .kz-replay-caret, .kz-month, .kz-map-user::after, .kz-flow-photon, [data-kz-marker] > [data-drop], .kz-map-pulse::before, .kz-map-pulse::after { animation: none !important; }
|
package/dist/native/list.js
CHANGED
|
@@ -111,7 +111,7 @@ function useInfiniteList({
|
|
|
111
111
|
void refetch().finally(() => setPulled(false));
|
|
112
112
|
},
|
|
113
113
|
onEndReached: () => {
|
|
114
|
-
if (hasNextPage && !isFetchingNextPage && !isError) void fetchNextPage();
|
|
114
|
+
if (hasNextPage && !isFetchingNextPage && !isError) void fetchNextPage({ cancelRefetch: false });
|
|
115
115
|
},
|
|
116
116
|
loadingMore: isFetchingNextPage
|
|
117
117
|
},
|
package/dist/native/list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/native/list.tsx"],"sourcesContent":["// @krizaka/ui/native/list — its own entry, because it imports FlashList v2 (@shopify/flash-list) and @krizaka/query:\n// optional peers, installed only by the apps that list. The theme and the states come from @krizaka/ui/native (one\n// theme context); the server state comes from @krizaka/query (one QueryClient context — never @tanstack/* here).\nimport { type InfiniteData, useInfiniteQuery, type UseInfiniteQueryResult } from \"@krizaka/query\";\nimport { EmptyState, Skeleton, Spinner, useTheme } from \"@krizaka/ui/native\";\nimport { FlashList, type FlashListRef } from \"@shopify/flash-list\";\nimport * as React from \"react\";\nimport { RefreshControl, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\n\nexport type ListProps<T> = {\n /** The items (stable: a query's data, state). */\n data: readonly T[];\n /** Draws one item. */\n renderItem: (item: T, index: number) => React.ReactElement | null;\n /** A stable key per item (an id): FlashList recycles the views by it. */\n keyExtractor: (item: T, index: number) => string;\n /** The accessible name of the list (\"Notifications\"), passed translated. */\n label: string;\n /** A hairline between items: `full` (default), `inset` (aligned with the text after an avatar), `none`. */\n separator?: \"full\" | \"inset\" | \"none\";\n /** The first page is loading: skeleton rows (`loadingRows` of them) in place of the items. */\n loading?: boolean;\n /** How many skeleton rows while loading. Default 6. */\n loadingRows?: number;\n /** A failure, shown in place of the items (an `ErrorState` with a retry). */\n error?: React.ReactNode;\n /** Shown when there is no item (an `EmptyState`, or its words: `{ title, description, action }`). */\n empty?: React.ReactNode | { title: string; description?: string; action?: React.ReactNode };\n /** The list is reloading after a pull: the system's spinner at the top. */\n refreshing?: boolean;\n /** Pull to refresh: called when the person pulls the list down. */\n onRefresh?: () => void;\n /** Called when the end comes near: load the next page. */\n onEndReached?: () => void;\n /** How far from the end `onEndReached` fires, in screens. Default 0.5. */\n endReachedThreshold?: number;\n /** The next page is loading: a spinner under the last item, named by `loadingMoreLabel`. */\n loadingMore?: boolean;\n /** The name of that spinner (\"Loading more\"), passed translated. */\n loadingMoreLabel?: string;\n /** Above the first item (a title, filters): scrolls with the list. */\n header?: React.ReactElement;\n /** Under the last item. */\n footer?: React.ReactElement;\n /** Extra data the items depend on (a selection): a change re-renders the visible items. */\n extraData?: unknown;\n /** The FlashList, for `scrollToIndex` / `scrollToOffset`. */\n ref?: React.Ref<FlashListRef<T>>;\n /** Styles of the list's content (padding). */\n contentContainerStyle?: StyleProp<ViewStyle>;\n /** Styles merged last, on the list. */\n style?: StyleProp<ViewStyle>;\n};\n\nfunction SkeletonRow() {\n return (\n <View style={styles.skeleton} aria-hidden>\n <Skeleton shape=\"circle\" width={40} height={40} />\n <View style={styles.skeletonText}>\n <Skeleton width=\"60%\" />\n <Skeleton width=\"35%\" />\n </View>\n </View>\n );\n}\n\nconst isWords = (value: unknown): value is { title: string; description?: string; action?: React.ReactNode } =>\n typeof value === \"object\" && value !== null && !React.isValidElement(value) && \"title\" in value;\n\n/**\n * A long list on FlashList v2 (recycled views, 60 fps): separators, skeleton rows while the first page loads, an empty\n * or error state in place of the items, pull to refresh tinted with the theme, the next page asked for near the end and\n * a spinner under the last item. With `useInfiniteList`, a paginated API is one hook and one component.\n */\nexport function List<T>({\n data,\n renderItem,\n keyExtractor,\n label,\n separator = \"full\",\n loading,\n loadingRows = 6,\n error,\n empty,\n refreshing = false,\n onRefresh,\n onEndReached,\n endReachedThreshold = 0.5,\n loadingMore,\n loadingMoreLabel = \"Loading more\",\n header,\n footer,\n extraData,\n ref,\n contentContainerStyle,\n style,\n}: ListProps<T>) {\n const { theme } = useTheme();\n const Separator = React.useMemo(\n () =>\n separator === \"none\"\n ? undefined\n : function ListSeparator() {\n return <View style={[styles.separator, { backgroundColor: theme.borderSubtle }, separator === \"inset\" && styles.inset]} />;\n },\n [separator, theme.borderSubtle],\n );\n\n if (loading) {\n return (\n <View role=\"group\" style={[styles.fill, style]} aria-busy accessibilityLabel={label}>\n {header}\n {Array.from({ length: loadingRows }, (_, i) => (\n <React.Fragment key={i}>\n {i > 0 && Separator ? <Separator /> : null}\n <SkeletonRow />\n </React.Fragment>\n ))}\n </View>\n );\n }\n\n const state = error ? (\n <View role=\"alert\" style={styles.state}>\n {error}\n </View>\n ) : isWords(empty) ? (\n <EmptyState title={empty.title} description={empty.description} action={empty.action} style={styles.state} />\n ) : empty ? (\n <View style={styles.state}>{empty}</View>\n ) : null;\n\n return (\n <FlashList\n ref={ref}\n accessibilityLabel={label}\n // Reachable from a keyboard (a hardware keyboard, the web): a scrolling area takes the focus to be scrolled.\n focusable\n data={error ? [] : data}\n renderItem={({ item, index }) => renderItem(item, index)}\n keyExtractor={keyExtractor}\n extraData={extraData}\n ItemSeparatorComponent={Separator}\n ListHeaderComponent={header}\n ListEmptyComponent={state}\n ListFooterComponent={\n loadingMore || footer ? (\n <View>\n {loadingMore ? (\n <View style={styles.more}>\n <Spinner label={loadingMoreLabel} />\n </View>\n ) : null}\n {footer}\n </View>\n ) : null\n }\n onEndReached={onEndReached}\n onEndReachedThreshold={endReachedThreshold}\n refreshControl={\n onRefresh ? (\n <RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={theme.accent} colors={[theme.accent]} progressBackgroundColor={theme.surface1} />\n ) : undefined\n }\n contentContainerStyle={contentContainerStyle as never}\n style={style}\n />\n );\n}\n\nexport type InfiniteListOptions<TPage, TItem, TParam> = {\n /** The query key (a `defineKeys` key): one cache entry for every page. */\n queryKey: readonly unknown[];\n /** Fetches one page (`krizakaFetch`), from its page parameter (a cursor, a page number). */\n queryFn: (context: { pageParam: TParam; signal: AbortSignal }) => Promise<TPage>;\n /** The parameter of the first page (`null` for a cursor, `1` for numbers). */\n initialPageParam: TParam;\n /** The parameter of the page after `lastPage`, or `undefined` / `null` when there is none. */\n getNextPageParam: (lastPage: TPage, pages: TPage[]) => TParam | undefined | null;\n /** The items of a page (`(page) => page.items`). */\n getItems: (page: TPage) => readonly TItem[];\n /** `false` to wait (a missing id). Default `true`. */\n enabled?: boolean;\n /** How long a page stays fresh, in ms (the client's default otherwise). */\n staleTime?: number;\n};\n\n/** What `useInfiniteList` gives: the props of `List` to spread, and the query itself. */\nexport type InfiniteListResult<TPage, TItem, TParam = unknown> = {\n /** `{ data, loading, refreshing, onRefresh, onEndReached, loadingMore }` — spread on `<List>`. */\n listProps: Pick<ListProps<TItem>, \"data\" | \"loading\" | \"refreshing\" | \"onRefresh\" | \"onEndReached\" | \"loadingMore\">;\n /** The failure of the first page, if any: render an `ErrorState` in `error` (a later page's failure keeps the list). */\n error: Error | null;\n /** The query of @krizaka/query (`refetch`, `status`, the pages…). */\n query: UseInfiniteQueryResult<InfiniteData<TPage, TParam>, Error>;\n};\n\n/**\n * A paginated API as a list: `useInfiniteQuery` of @krizaka/query (a list: `meta: { list: true }`, so an error stays in\n * the list), the pages flattened, the next page asked for by `onEndReached` (once at a time, only when there is one),\n * pull to refresh — spread `listProps` on `<List>`.\n */\nexport function useInfiniteList<TPage, TItem, TParam = unknown>({\n queryKey,\n queryFn,\n initialPageParam,\n getNextPageParam,\n getItems,\n enabled,\n staleTime,\n}: InfiniteListOptions<TPage, TItem, TParam>): InfiniteListResult<TPage, TItem, TParam> {\n const query = useInfiniteQuery<TPage, Error, InfiniteData<TPage, TParam>, readonly unknown[], TParam>({\n queryKey,\n queryFn: ({ pageParam, signal }) => queryFn({ pageParam: pageParam as TParam, signal }),\n initialPageParam,\n getNextPageParam: (last, pages) => getNextPageParam(last, pages) ?? undefined,\n enabled,\n staleTime,\n meta: { list: true },\n });\n const [pulled, setPulled] = React.useState(false);\n const { data: pages, hasNextPage, isFetchingNextPage, fetchNextPage, refetch, isPending, isError, isRefetching } = query;\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `getItems` is a projection; the pages decide\n const data = React.useMemo(() => (pages?.pages ?? []).flatMap((page) => getItems(page)), [pages]);\n return {\n listProps: {\n data,\n loading: isPending && enabled !== false,\n refreshing: pulled && isRefetching,\n onRefresh: () => {\n setPulled(true);\n void refetch().finally(() => setPulled(false));\n },\n onEndReached: () => {\n if (hasNextPage && !isFetchingNextPage && !isError) void fetchNextPage();\n },\n loadingMore: isFetchingNextPage,\n },\n error: isError && !pages ? query.error : null,\n query,\n };\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n separator: { height: StyleSheet.hairlineWidth },\n inset: { marginLeft: 68 },\n skeleton: { flexDirection: \"row\", alignItems: \"center\", gap: 12, paddingHorizontal: 16, paddingVertical: 14 },\n skeletonText: { flex: 1, gap: 8 },\n state: { paddingHorizontal: 16, paddingV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AiB,GAAG;AAAA,EACpD,MAAM,EAAE,iBAAiB,IAAI,YAAY,SAAS;AACpD,CAAC;","names":["pages"]}
|
|
1
|
+
{"version":3,"sources":["../../src/native/list.tsx"],"sourcesContent":["// @krizaka/ui/native/list — its own entry, because it imports FlashList v2 (@shopify/flash-list) and @krizaka/query:\n// optional peers, installed only by the apps that list. The theme and the states come from @krizaka/ui/native (one\n// theme context); the server state comes from @krizaka/query (one QueryClient context — never @tanstack/* here).\nimport { type InfiniteData, useInfiniteQuery, type UseInfiniteQueryResult } from \"@krizaka/query\";\nimport { EmptyState, Skeleton, Spinner, useTheme } from \"@krizaka/ui/native\";\nimport { FlashList, type FlashListRef } from \"@shopify/flash-list\";\nimport * as React from \"react\";\nimport { RefreshControl, type StyleProp, StyleSheet, View, type ViewStyle } from \"react-native\";\n\nexport type ListProps<T> = {\n /** The items (stable: a query's data, state). */\n data: readonly T[];\n /** Draws one item. */\n renderItem: (item: T, index: number) => React.ReactElement | null;\n /** A stable key per item (an id): FlashList recycles the views by it. */\n keyExtractor: (item: T, index: number) => string;\n /** The accessible name of the list (\"Notifications\"), passed translated. */\n label: string;\n /** A hairline between items: `full` (default), `inset` (aligned with the text after an avatar), `none`. */\n separator?: \"full\" | \"inset\" | \"none\";\n /** The first page is loading: skeleton rows (`loadingRows` of them) in place of the items. */\n loading?: boolean;\n /** How many skeleton rows while loading. Default 6. */\n loadingRows?: number;\n /** A failure, shown in place of the items (an `ErrorState` with a retry). */\n error?: React.ReactNode;\n /** Shown when there is no item (an `EmptyState`, or its words: `{ title, description, action }`). */\n empty?: React.ReactNode | { title: string; description?: string; action?: React.ReactNode };\n /** The list is reloading after a pull: the system's spinner at the top. */\n refreshing?: boolean;\n /** Pull to refresh: called when the person pulls the list down. */\n onRefresh?: () => void;\n /** Called when the end comes near: load the next page. */\n onEndReached?: () => void;\n /** How far from the end `onEndReached` fires, in screens. Default 0.5. */\n endReachedThreshold?: number;\n /** The next page is loading: a spinner under the last item, named by `loadingMoreLabel`. */\n loadingMore?: boolean;\n /** The name of that spinner (\"Loading more\"), passed translated. */\n loadingMoreLabel?: string;\n /** Above the first item (a title, filters): scrolls with the list. */\n header?: React.ReactElement;\n /** Under the last item. */\n footer?: React.ReactElement;\n /** Extra data the items depend on (a selection): a change re-renders the visible items. */\n extraData?: unknown;\n /** The FlashList, for `scrollToIndex` / `scrollToOffset`. */\n ref?: React.Ref<FlashListRef<T>>;\n /** Styles of the list's content (padding). */\n contentContainerStyle?: StyleProp<ViewStyle>;\n /** Styles merged last, on the list. */\n style?: StyleProp<ViewStyle>;\n};\n\nfunction SkeletonRow() {\n return (\n <View style={styles.skeleton} aria-hidden>\n <Skeleton shape=\"circle\" width={40} height={40} />\n <View style={styles.skeletonText}>\n <Skeleton width=\"60%\" />\n <Skeleton width=\"35%\" />\n </View>\n </View>\n );\n}\n\nconst isWords = (value: unknown): value is { title: string; description?: string; action?: React.ReactNode } =>\n typeof value === \"object\" && value !== null && !React.isValidElement(value) && \"title\" in value;\n\n/**\n * A long list on FlashList v2 (recycled views, 60 fps): separators, skeleton rows while the first page loads, an empty\n * or error state in place of the items, pull to refresh tinted with the theme, the next page asked for near the end and\n * a spinner under the last item. With `useInfiniteList`, a paginated API is one hook and one component.\n */\nexport function List<T>({\n data,\n renderItem,\n keyExtractor,\n label,\n separator = \"full\",\n loading,\n loadingRows = 6,\n error,\n empty,\n refreshing = false,\n onRefresh,\n onEndReached,\n endReachedThreshold = 0.5,\n loadingMore,\n loadingMoreLabel = \"Loading more\",\n header,\n footer,\n extraData,\n ref,\n contentContainerStyle,\n style,\n}: ListProps<T>) {\n const { theme } = useTheme();\n const Separator = React.useMemo(\n () =>\n separator === \"none\"\n ? undefined\n : function ListSeparator() {\n return <View style={[styles.separator, { backgroundColor: theme.borderSubtle }, separator === \"inset\" && styles.inset]} />;\n },\n [separator, theme.borderSubtle],\n );\n\n if (loading) {\n return (\n <View role=\"group\" style={[styles.fill, style]} aria-busy accessibilityLabel={label}>\n {header}\n {Array.from({ length: loadingRows }, (_, i) => (\n <React.Fragment key={i}>\n {i > 0 && Separator ? <Separator /> : null}\n <SkeletonRow />\n </React.Fragment>\n ))}\n </View>\n );\n }\n\n const state = error ? (\n <View role=\"alert\" style={styles.state}>\n {error}\n </View>\n ) : isWords(empty) ? (\n <EmptyState title={empty.title} description={empty.description} action={empty.action} style={styles.state} />\n ) : empty ? (\n <View style={styles.state}>{empty}</View>\n ) : null;\n\n return (\n <FlashList\n ref={ref}\n accessibilityLabel={label}\n // Reachable from a keyboard (a hardware keyboard, the web): a scrolling area takes the focus to be scrolled.\n focusable\n data={error ? [] : data}\n renderItem={({ item, index }) => renderItem(item, index)}\n keyExtractor={keyExtractor}\n extraData={extraData}\n ItemSeparatorComponent={Separator}\n ListHeaderComponent={header}\n ListEmptyComponent={state}\n ListFooterComponent={\n loadingMore || footer ? (\n <View>\n {loadingMore ? (\n <View style={styles.more}>\n <Spinner label={loadingMoreLabel} />\n </View>\n ) : null}\n {footer}\n </View>\n ) : null\n }\n onEndReached={onEndReached}\n onEndReachedThreshold={endReachedThreshold}\n refreshControl={\n onRefresh ? (\n <RefreshControl refreshing={refreshing} onRefresh={onRefresh} tintColor={theme.accent} colors={[theme.accent]} progressBackgroundColor={theme.surface1} />\n ) : undefined\n }\n contentContainerStyle={contentContainerStyle as never}\n style={style}\n />\n );\n}\n\nexport type InfiniteListOptions<TPage, TItem, TParam> = {\n /** The query key (a `defineKeys` key): one cache entry for every page. */\n queryKey: readonly unknown[];\n /** Fetches one page (`krizakaFetch`), from its page parameter (a cursor, a page number). */\n queryFn: (context: { pageParam: TParam; signal: AbortSignal }) => Promise<TPage>;\n /** The parameter of the first page (`null` for a cursor, `1` for numbers). */\n initialPageParam: TParam;\n /** The parameter of the page after `lastPage`, or `undefined` / `null` when there is none. */\n getNextPageParam: (lastPage: TPage, pages: TPage[]) => TParam | undefined | null;\n /** The items of a page (`(page) => page.items`). */\n getItems: (page: TPage) => readonly TItem[];\n /** `false` to wait (a missing id). Default `true`. */\n enabled?: boolean;\n /** How long a page stays fresh, in ms (the client's default otherwise). */\n staleTime?: number;\n};\n\n/** What `useInfiniteList` gives: the props of `List` to spread, and the query itself. */\nexport type InfiniteListResult<TPage, TItem, TParam = unknown> = {\n /** `{ data, loading, refreshing, onRefresh, onEndReached, loadingMore }` — spread on `<List>`. */\n listProps: Pick<ListProps<TItem>, \"data\" | \"loading\" | \"refreshing\" | \"onRefresh\" | \"onEndReached\" | \"loadingMore\">;\n /** The failure of the first page, if any: render an `ErrorState` in `error` (a later page's failure keeps the list). */\n error: Error | null;\n /** The query of @krizaka/query (`refetch`, `status`, the pages…). */\n query: UseInfiniteQueryResult<InfiniteData<TPage, TParam>, Error>;\n};\n\n/**\n * A paginated API as a list: `useInfiniteQuery` of @krizaka/query (a list: `meta: { list: true }`, so an error stays in\n * the list), the pages flattened, the next page asked for by `onEndReached` (once at a time, only when there is one),\n * pull to refresh — spread `listProps` on `<List>`.\n */\nexport function useInfiniteList<TPage, TItem, TParam = unknown>({\n queryKey,\n queryFn,\n initialPageParam,\n getNextPageParam,\n getItems,\n enabled,\n staleTime,\n}: InfiniteListOptions<TPage, TItem, TParam>): InfiniteListResult<TPage, TItem, TParam> {\n const query = useInfiniteQuery<TPage, Error, InfiniteData<TPage, TParam>, readonly unknown[], TParam>({\n queryKey,\n queryFn: ({ pageParam, signal }) => queryFn({ pageParam: pageParam as TParam, signal }),\n initialPageParam,\n getNextPageParam: (last, pages) => getNextPageParam(last, pages) ?? undefined,\n enabled,\n staleTime,\n meta: { list: true },\n });\n const [pulled, setPulled] = React.useState(false);\n const { data: pages, hasNextPage, isFetchingNextPage, fetchNextPage, refetch, isPending, isError, isRefetching } = query;\n // eslint-disable-next-line react-hooks/exhaustive-deps -- `getItems` is a projection; the pages decide\n const data = React.useMemo(() => (pages?.pages ?? []).flatMap((page) => getItems(page)), [pages]);\n return {\n listProps: {\n data,\n loading: isPending && enabled !== false,\n refreshing: pulled && isRefetching,\n onRefresh: () => {\n setPulled(true);\n void refetch().finally(() => setPulled(false));\n },\n onEndReached: () => {\n // `cancelRefetch: false`: a render's closure can be stale (FlashList asks again before the next paint), and the\n // default would cancel the page on its way and ask for it a second time.\n if (hasNextPage && !isFetchingNextPage && !isError) void fetchNextPage({ cancelRefetch: false });\n },\n loadingMore: isFetchingNextPage,\n },\n error: isError && !pages ? query.error : null,\n query,\n };\n}\n\nconst styles = StyleSheet.create({\n fill: { flex: 1 },\n separator: { height: StyleSheet.hairlineWidth },\n inset: { marginLeft: 68 },\n skeleton: { flexDirection: \"row\", alignItems: \"center\", gap: 12, paddingHorizontal: 16, paddingVertical: 14 },\n skeletonText: { flex: 1, gap: 8 },\n state: { paddingHorizontal: 16, paddingVertical: 32 },\n more: { paddingVertical: 20, alignItems: \"center\" },\n});\n"],"mappings":";AAGA,SAA4B,wBAAqD;AACjF,SAAS,YAAY,UAAU,SAAS,gBAAgB;AACxD,SAAS,iBAAoC;AAC7C,YAAY,WAAW;AACvB,SAAS,gBAAgC,YAAY,YAA4B;AAkD3E,cACA,YADA;AAHN,SAAS,cAAc;AACrB,SACE,qBAAC,QAAK,OAAO,OAAO,UAAU,eAAW,MACvC;AAAA,wBAAC,YAAS,OAAM,UAAS,OAAO,IAAI,QAAQ,IAAI;AAAA,IAChD,qBAAC,QAAK,OAAO,OAAO,cAClB;AAAA,0BAAC,YAAS,OAAM,OAAM;AAAA,MACtB,oBAAC,YAAS,OAAM,OAAM;AAAA,OACxB;AAAA,KACF;AAEJ;AAEA,IAAM,UAAU,CAAC,UACf,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAO,qBAAe,KAAK,KAAK,WAAW;AAOrF,SAAS,KAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,sBAAsB;AAAA,EACtB;AAAA,EACA,mBAAm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EAAE,eAAe,MAAM,CAAC;AAAA,MACjG;AAAA,MACA,aAAa;AAAA,IACf;AAAA,IACA,OAAO,WAAW,CAAC,QAAQ,MAAM,QAAQ;AAAA,IACzC;AAAA,EACF;AACF;AAEA,IAAM,SAAS,WAAW,OAAO;AAAA,EAC/B,MAAM,EAAE,MAAM,EAAE;AAAA,EAChB,WAAW,EAAE,QAAQ,WAAW,cAAc;AAAA,EAC9C,OAAO,EAAE,YAAY,GAAG;AAAA,EACxB,UAAU,EAAE,eAAe,OAAO,YAAY,UAAU,KAAK,IAAI,mBAAmB,IAAI,iBAAiB,GAAG;AAAA,EAC5G,cAAc,EAAE,MAAM,GAAG,KAAK,EAAE;AAAA,EAChC,OAAO,EAAE,mBAAmB,IAAI,iBAAiB,GAAG;AAAA,EACpD,MAAM,EAAE,iBAAiB,IAAI,YAAY,SAAS;AACpD,CAAC;","names":["pages"]}
|
package/dist/native.d.ts
CHANGED
|
@@ -2071,58 +2071,6 @@ interface PhoenixProps {
|
|
|
2071
2071
|
/** The phoenix of the Krizaka story — the comeback — for React Native: the web `Phoenix`'s geometry. */
|
|
2072
2072
|
declare function Phoenix({ tone, size, animated, title, style }: PhoenixProps): React__default.JSX.Element;
|
|
2073
2073
|
|
|
2074
|
-
/** A photo of the grid. */
|
|
2075
|
-
type GridPhoto = {
|
|
2076
|
-
/** A stable id. */
|
|
2077
|
-
id: string;
|
|
2078
|
-
/** Its URI. */
|
|
2079
|
-
uri: string;
|
|
2080
|
-
/** What it shows — its accessible name. */
|
|
2081
|
-
alt?: string;
|
|
2082
|
-
};
|
|
2083
|
-
type PhotoGridLabels = {
|
|
2084
|
-
/** An empty slot's button (“Add a photo”). */
|
|
2085
|
-
add: string;
|
|
2086
|
-
/** The first photo's badge (“Main”). */
|
|
2087
|
-
main: string;
|
|
2088
|
-
/** A photo's menu title: `(n) => "Photo " + n`. */
|
|
2089
|
-
photo: (position: number) => string;
|
|
2090
|
-
/** Make it the main photo. */
|
|
2091
|
-
makeMain: string;
|
|
2092
|
-
/** Move it one place earlier. */
|
|
2093
|
-
moveEarlier: string;
|
|
2094
|
-
/** Move it one place later. */
|
|
2095
|
-
moveLater: string;
|
|
2096
|
-
/** Remove it. */
|
|
2097
|
-
remove: string;
|
|
2098
|
-
/** Cancel. */
|
|
2099
|
-
cancel: string;
|
|
2100
|
-
};
|
|
2101
|
-
type PhotoGridProps = {
|
|
2102
|
-
/** The photos, in order: the first is the main one. */
|
|
2103
|
-
value: readonly GridPhoto[];
|
|
2104
|
-
/** Called with the new order, or without a removed photo. */
|
|
2105
|
-
onValueChange: (photos: GridPhoto[]) => void;
|
|
2106
|
-
/** Called by an empty slot: open the `MediaPicker`, the camera or the editor, then add what comes back. */
|
|
2107
|
-
onAdd?: () => void;
|
|
2108
|
-
/** How many slots. Default 6. */
|
|
2109
|
-
slots?: number;
|
|
2110
|
-
/** Fewest photos required: the empty slots up to it are marked. Default 1. */
|
|
2111
|
-
required?: number;
|
|
2112
|
-
/** Columns. Default 3. */
|
|
2113
|
-
columns?: number;
|
|
2114
|
-
/** The words, passed translated. */
|
|
2115
|
-
labels: PhotoGridLabels;
|
|
2116
|
-
/** Styles merged last. */
|
|
2117
|
-
style?: StyleProp<ViewStyle>;
|
|
2118
|
-
};
|
|
2119
|
-
/**
|
|
2120
|
-
* A profile's photos in a grid of slots — the first one is the main photo, empty slots invite to add. A long press (or
|
|
2121
|
-
* a tap) opens a photo's menu: make it the main one, move it earlier or later, remove it; every move is a tick, and
|
|
2122
|
-
* screen readers get the same actions on each photo.
|
|
2123
|
-
*/
|
|
2124
|
-
declare function PhotoGrid({ value, onValueChange, onAdd, slots, required, columns, labels, style }: PhotoGridProps): React$1.JSX.Element;
|
|
2125
|
-
|
|
2126
2074
|
/** The mark of a Krizaka brand by id, for React Native — the counterpart of the web `ProductLogo`. */
|
|
2127
2075
|
declare function ProductMark({ id, ...props }: NativeMarkProps & {
|
|
2128
2076
|
id: BrandId;
|
|
@@ -3289,5 +3237,5 @@ declare function Wheel({ label, options, value: valueProp, defaultValue, onValue
|
|
|
3289
3237
|
*/
|
|
3290
3238
|
declare function YomizakaMark({ size, animated, title, neutral }: NativeMarkProps): React__default.JSX.Element;
|
|
3291
3239
|
|
|
3292
|
-
export { ActionSheet, ActivityFeed, AkinazaMark, AnalysisReport, AppHeader, AppHeaderCount, AppHeaderSearch, Avatar, AvatarGroup, AvatarRoot, Badge, BrandedRefresh, Button, Calendar, Card, CardBody, CardDescription, CardFooter, CardImage, CardMedia, CardOverlay, CardRoot, CardTitle, Checkbox, Chip, CollectionSwitcher, Columns, Combobox, ComposerMeta, ConversationItem, Countdown, DEFAULT_COLUMNS, DateField, DateWheel, DayStrip, DescriptionList, EmptyState, EntityHeader, EnvironmentNotice, ErrorState, Fab, ForceUpdateScreen, FormFlow, GRID_GAPS, GoalGauge, Grid, Header, IconButton, ImageViewer, KrizakaMark, ListDetail, Loader, LoaderGlyph, LoadingState, MaintenanceScreen, MarkerPicker, Mascot, MascotState, MatchDialog, MessageBubble, MessageComposer, Meter, MonthPicker, NumberTicker, OfflineBanner, Onboarding, OrazakaMark, OtpInput, Pagination, PermissionPrompt, PersonCard, Phoenix,
|
|
3293
|
-
export type { ActionSheetAction, ActionSheetProps, ActivityEvent, ActivityFeedLabels, ActivityFeedProps, ActivityTone, AnalysisReportData, AnalysisReportLabels, AnalysisReportProps, AnalysisStatus, AppHeaderCountProps, AppHeaderProps, AppHeaderSearchProps, AvatarGroupProps, AvatarProps, AvatarSize, BadgeProps, BadgeTone, BrandId, BrandedRefreshProps, BrandedRefreshScrollProps, ButtonProps, ButtonSize, ButtonVariant, CalendarLabels, CalendarProps, CardBodyProps, CardImageProps, CardMediaProps, CardOverlayProps, CardRootProps, CheckboxProps, ChipGroupProps, ChipProps, ChipSize, CollectionSwitcherProps, ColumnsProps, ComboboxLabels, ComboboxProps, ComposerMetaProps, ConversationItemProps, CountdownProps, CountdownUnits, DateFieldLabels, DateFieldProps, DatePart, DateWheelProps, DayStripProps, DefaultAvatar, DefaultAvatarBrand, DescriptionItem, DescriptionListProps, EditorRole, EmptyStateProps, EntityHeaderProps, EnvironmentNoticeProps, FabProps, ForceUpdateScreenProps, FormFlowProps, FormFlowStep, GoalGaugeProps, GridColumns, GridGap,
|
|
3240
|
+
export { ActionSheet, ActivityFeed, AkinazaMark, AnalysisReport, AppHeader, AppHeaderCount, AppHeaderSearch, Avatar, AvatarGroup, AvatarRoot, Badge, BrandedRefresh, Button, Calendar, Card, CardBody, CardDescription, CardFooter, CardImage, CardMedia, CardOverlay, CardRoot, CardTitle, Checkbox, Chip, CollectionSwitcher, Columns, Combobox, ComposerMeta, ConversationItem, Countdown, DEFAULT_COLUMNS, DateField, DateWheel, DayStrip, DescriptionList, EmptyState, EntityHeader, EnvironmentNotice, ErrorState, Fab, ForceUpdateScreen, FormFlow, GRID_GAPS, GoalGauge, Grid, Header, IconButton, ImageViewer, KrizakaMark, ListDetail, Loader, LoaderGlyph, LoadingState, MaintenanceScreen, MarkerPicker, Mascot, MascotState, MatchDialog, MessageBubble, MessageComposer, Meter, MonthPicker, NumberTicker, OfflineBanner, Onboarding, OrazakaMark, OtpInput, Pagination, PermissionPrompt, PersonCard, Phoenix, ProductMark, ProfileBanner, ProfileCard, Progress, PullToRefresh, QrCode, RadioGroup, SIZE_CLASS_FROM, Screen, SearchField, Segmented, Select, SettingsGroup, SettingsRow, Sheet, Showcase, Skeleton, Slider, Spinner, SplashHandoff, StateScreen, StatusChip, StatusSetEditor, StepProgress, Stepper, SuccessState, SwipeDeck, SwipeableRow, Switch, TAG_MARKERS, TabBar, Tabs, TagChip, TagMarker, TagSelector, TagSetEditor, TextField, ThemeProvider, TimePicker, Toaster, Txt, TypingIndicator, UpdatePrompt, VerifiedBadge, Waveform, WelcomeState, Wheel, WheelDivider, WheelPicker, YomizakaMark, addDays, addMonths, ageOn, alpha, calendarLabels, columnsFit, comboboxLabels, composeDate, dateFieldLabels, datePartsOrder, daysInMonth, defaultAvatarUrl, formatTime, gridColumns, isRealDate, itemWidth, latestBirthDate, monthNames, prefetchNeighbours, showcaseLabels, sizeClassOf, splitDuration, statusSetEditorLabels, tagSetEditorLabels, textStyles, timeSlots, timeToMinutes, toast, todayIso, useCollapsingHeader, useCountdown, useDelayedWait, useFontScale, useReducedMotion, useSizeClass, useTheme, uses12Hours };
|
|
3241
|
+
export type { ActionSheetAction, ActionSheetProps, ActivityEvent, ActivityFeedLabels, ActivityFeedProps, ActivityTone, AnalysisReportData, AnalysisReportLabels, AnalysisReportProps, AnalysisStatus, AppHeaderCountProps, AppHeaderProps, AppHeaderSearchProps, AvatarGroupProps, AvatarProps, AvatarSize, BadgeProps, BadgeTone, BrandId, BrandedRefreshProps, BrandedRefreshScrollProps, ButtonProps, ButtonSize, ButtonVariant, CalendarLabels, CalendarProps, CardBodyProps, CardImageProps, CardMediaProps, CardOverlayProps, CardRootProps, CheckboxProps, ChipGroupProps, ChipProps, ChipSize, CollectionSwitcherProps, ColumnsProps, ComboboxLabels, ComboboxProps, ComposerMetaProps, ConversationItemProps, CountdownProps, CountdownUnits, DateFieldLabels, DateFieldProps, DatePart, DateWheelProps, DayStripProps, DefaultAvatar, DefaultAvatarBrand, DescriptionItem, DescriptionListProps, EditorRole, EmptyStateProps, EntityHeaderProps, EnvironmentNoticeProps, FabProps, ForceUpdateScreenProps, FormFlowProps, FormFlowStep, GoalGaugeProps, GridColumns, GridGap, GridProps, HapticKind, HeaderProps, IconButtonProps, ImageViewerProps, Insets, ListDetailProps, LoaderGlyphProps, LoaderProps, MaintenanceScreenProps, Marker, MarkerPickerProps, MarkerShape, MascotProps, MascotStateProps, MatchDialogProps, MessageBubbleLabels, MessageBubbleProps, MessageComposerProps, MessageStatus, MeterPart, MeterProps, Mode, MonthPickerProps, Motion, NativeMarkProps, NumberTickerProps, OfflineBannerProps, OnboardingProps, OnboardingSlide, OtpInputProps, PaginationLabels, PaginationProps, PermissionPromptProps, PermissionStatus, PersonCardProps, PhoenixProps, ProfileBannerProps, ProfileCardProps, ProfileStat, ProgressProps, PullToRefreshProps, QrCodeProps, RadioGroupProps, RadioOption, Radius, ScreenProps, SearchFieldProps, SegmentedOption, SegmentedProps, SelectOption, SelectProps, SettingsGroupProps, SettingsRowProps, SheetProps, ShowcaseLabels, ShowcaseProps, SizeClass, SkeletonProps, SliderProps, SliderValue, SpinnerProps, SplashHandoffProps, StateAction, StateKind, StateScreenProps, StatusChipProps, StatusMoveOption, StatusSetEditorLabels, StatusSetEditorProps, Step, StepProgressProps, StepStatus, StepperProps, SwipeAction, SwipeDeckLabels, SwipeDeckProps, SwipeDirection, SwipeableRowProps, SwitchProps, TabBarItem, TabBarProps, TabItem, TabsHue, TabsProps, TagChipProps, TagMarkerProps, TagOption, TagSelectorProps, TagSetEditorLabels, TagSetEditorProps, TagSetValue, TextFieldProps, Theme, ThemeContextValue, ThemeFonts, ThemeName, ThemeOverrides, ThemeProviderProps, TimePickerLabels, TimePickerProps, TimeValue, ToastItem, ToastOptions, ToastTone, ToasterProps, TxtProps, TxtTone, TxtVariant, TypingIndicatorProps, UpdatePromptProps, VerifiedBadgeProps, ViewerImage, WaveformProps, WheelOption, WheelPickerProps, WheelProps };
|