@krizaka/ui 3.26.0 → 3.28.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/chip-link.js +4 -27
- package/dist/chip-link.js.map +1 -1
- package/dist/chip-row.d.ts +78 -0
- package/dist/chip-row.js +61 -0
- package/dist/chip-row.js.map +1 -0
- package/dist/chunk-BTTDIVVJ.js +33 -0
- package/dist/chunk-BTTDIVVJ.js.map +1 -0
- package/dist/{chunk-BCGJZ5PG.js → chunk-OUWPBSSL.js} +2 -2
- package/dist/{chunk-4DH2HW3D.js → chunk-TFJDIOFK.js} +2 -1
- package/dist/document-viewer.js +19 -3
- package/dist/document-viewer.js.map +1 -1
- package/dist/image-cropper.js +8 -4
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.d.ts +3 -8
- package/dist/index.js +44 -48
- package/dist/index.js.map +1 -1
- package/dist/language-switch/server.d.ts +17 -0
- package/dist/language-switch/server.js +26 -0
- package/dist/language-switch/server.js.map +1 -0
- package/dist/language-switch.js +4 -2
- package/dist/language-switch.js.map +1 -1
- package/dist/native.d.ts +32 -1
- package/dist/native.js +344 -286
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +12 -2
- package/dist/nav-bar.js +10 -3
- package/dist/nav-bar.js.map +1 -1
- package/dist/site-footer.js +2 -2
- package/package.json +31 -7
- package/registry/account-menu.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/alert.json +1 -1
- package/registry/app-header.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.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/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip-row.json +173 -0
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.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/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/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 +2 -2
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/chip-row/audience.d.ts +4 -0
- package/registry/examples/chip-row/audience.js +15 -0
- package/registry/examples/chip-row/audience.tsx +16 -0
- package/registry/examples/chip-row/many.d.ts +4 -0
- package/registry/examples/chip-row/many.js +12 -0
- package/registry/examples/chip-row/many.tsx +16 -0
- package/registry/examples/settings-layout/native/account.d.ts +4 -0
- package/registry/examples/settings-layout/native/account.dark.png +0 -0
- package/registry/examples/settings-layout/native/account.js +22 -0
- package/registry/examples/settings-layout/native/account.light.png +0 -0
- package/registry/examples/settings-layout/native/account.tsx +18 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.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/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +2 -2
- package/registry/index.json +42 -10
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/language-switch.json +6 -2
- 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/markdown.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.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 +1 -1
- package/registry/media-grid.json +1 -1
- package/registry/meta-row.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +21 -6
- 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.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.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/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 +110 -7
- package/registry/showcase.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/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-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/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.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/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +1 -1
- /package/dist/{chunk-BCGJZ5PG.js.map → chunk-OUWPBSSL.js.map} +0 -0
- /package/dist/{chunk-4DH2HW3D.js.map → chunk-TFJDIOFK.js.map} +0 -0
package/dist/native.js
CHANGED
|
@@ -4870,11 +4870,67 @@ var styles41 = StyleSheet41.create({
|
|
|
4870
4870
|
disabled: { opacity: 0.4 }
|
|
4871
4871
|
});
|
|
4872
4872
|
|
|
4873
|
-
// src/native/
|
|
4873
|
+
// src/native/settings-layout.tsx
|
|
4874
4874
|
import * as React36 from "react";
|
|
4875
|
-
import {
|
|
4875
|
+
import { Pressable as Pressable21, StyleSheet as StyleSheet42, View as View50 } from "react-native";
|
|
4876
4876
|
import Svg26, { Path as Path22 } from "react-native-svg";
|
|
4877
|
-
import { jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
4877
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
4878
|
+
function SettingsRow({ label, description, icon, value, trailing, onPress, destructive, accessibilityLabel, disabled }) {
|
|
4879
|
+
const { theme } = useTheme();
|
|
4880
|
+
const body = /* @__PURE__ */ jsxs50(Fragment9, { children: [
|
|
4881
|
+
icon ? /* @__PURE__ */ jsx56(View50, { style: [styles42.tile, { backgroundColor: theme.surface3 }], children: icon }) : null,
|
|
4882
|
+
/* @__PURE__ */ jsxs50(View50, { style: styles42.text, children: [
|
|
4883
|
+
/* @__PURE__ */ jsx56(Txt, { variant: "body", tone: destructive ? "danger" : "text", children: label }),
|
|
4884
|
+
description ? /* @__PURE__ */ jsx56(Txt, { variant: "caption", tone: "secondary", children: description }) : null
|
|
4885
|
+
] }),
|
|
4886
|
+
value ? /* @__PURE__ */ jsx56(Txt, { variant: "caption", tone: "secondary", numberOfLines: 1, style: styles42.value, children: value }) : null,
|
|
4887
|
+
trailing,
|
|
4888
|
+
onPress && !trailing ? /* @__PURE__ */ jsx56(Svg26, { width: 16, height: 16, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx56(Path22, { d: "m9 6 6 6-6 6", fill: "none", stroke: theme.textMuted, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round" }) }) : null
|
|
4889
|
+
] });
|
|
4890
|
+
if (onPress && !trailing) {
|
|
4891
|
+
return /* @__PURE__ */ jsx56(
|
|
4892
|
+
Pressable21,
|
|
4893
|
+
{
|
|
4894
|
+
role: "button",
|
|
4895
|
+
accessibilityLabel,
|
|
4896
|
+
accessibilityState: { disabled: !!disabled },
|
|
4897
|
+
disabled,
|
|
4898
|
+
onPress,
|
|
4899
|
+
style: ({ pressed }) => [styles42.row, pressed ? { backgroundColor: theme.surface2 } : null, disabled ? styles42.disabled : null],
|
|
4900
|
+
children: body
|
|
4901
|
+
}
|
|
4902
|
+
);
|
|
4903
|
+
}
|
|
4904
|
+
return /* @__PURE__ */ jsx56(View50, { accessible: !trailing, accessibilityLabel: trailing ? void 0 : accessibilityLabel, style: [styles42.row, disabled ? styles42.disabled : null], children: body });
|
|
4905
|
+
}
|
|
4906
|
+
function SettingsGroup({ title, children, style, ...props }) {
|
|
4907
|
+
const { theme } = useTheme();
|
|
4908
|
+
const rows = React36.Children.toArray(children).filter(Boolean);
|
|
4909
|
+
return /* @__PURE__ */ jsxs50(View50, { ...props, style: [styles42.group, style], children: [
|
|
4910
|
+
title ? /* @__PURE__ */ jsx56(Txt, { variant: "caption", tone: "muted", role: "heading", style: styles42.title, children: title }) : null,
|
|
4911
|
+
/* @__PURE__ */ jsx56(View50, { style: [styles42.card, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle }], children: rows.map((row, i) => /* @__PURE__ */ jsxs50(React36.Fragment, { children: [
|
|
4912
|
+
i > 0 ? /* @__PURE__ */ jsx56(View50, { style: [styles42.hairline, { backgroundColor: theme.borderSubtle }] }) : null,
|
|
4913
|
+
row
|
|
4914
|
+
] }, i)) })
|
|
4915
|
+
] });
|
|
4916
|
+
}
|
|
4917
|
+
var styles42 = StyleSheet42.create({
|
|
4918
|
+
group: { rowGap: 8 },
|
|
4919
|
+
title: { textTransform: "uppercase", letterSpacing: 0.6, fontWeight: "700", paddingHorizontal: 4 },
|
|
4920
|
+
card: { borderWidth: StyleSheet42.hairlineWidth, borderRadius: 16, overflow: "hidden" },
|
|
4921
|
+
hairline: { height: StyleSheet42.hairlineWidth, marginLeft: 16 },
|
|
4922
|
+
row: { minHeight: 52, flexDirection: "row", alignItems: "center", columnGap: 12, paddingHorizontal: 16, paddingVertical: 10 },
|
|
4923
|
+
tile: { width: 32, height: 32, borderRadius: 8, alignItems: "center", justifyContent: "center" },
|
|
4924
|
+
text: { flex: 1, rowGap: 2 },
|
|
4925
|
+
value: { maxWidth: "45%" },
|
|
4926
|
+
disabled: { opacity: 0.5 }
|
|
4927
|
+
});
|
|
4928
|
+
|
|
4929
|
+
// src/native/showcase.tsx
|
|
4930
|
+
import * as React37 from "react";
|
|
4931
|
+
import { Animated as Animated21, AppState, Easing as Easing12, FlatList, Pressable as Pressable22, StyleSheet as StyleSheet43, View as View51 } from "react-native";
|
|
4932
|
+
import Svg27, { Path as Path23 } from "react-native-svg";
|
|
4933
|
+
import { jsx as jsx57, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
4878
4934
|
var showcaseLabels = {
|
|
4879
4935
|
previous: "Previous slide",
|
|
4880
4936
|
next: "Next slide",
|
|
@@ -4888,16 +4944,16 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4888
4944
|
const { theme } = useTheme();
|
|
4889
4945
|
const reduced = useReducedMotion();
|
|
4890
4946
|
const total = items2.length;
|
|
4891
|
-
const [current, setCurrent] =
|
|
4892
|
-
const [width, setWidth] =
|
|
4893
|
-
const [paused, setPaused] =
|
|
4894
|
-
const [dragging, setDragging] =
|
|
4895
|
-
const [background, setBackground] =
|
|
4896
|
-
const [announce, setAnnounce] =
|
|
4897
|
-
const list =
|
|
4898
|
-
const [fill] =
|
|
4899
|
-
const progress =
|
|
4900
|
-
|
|
4947
|
+
const [current, setCurrent] = React37.useState(0);
|
|
4948
|
+
const [width, setWidth] = React37.useState(0);
|
|
4949
|
+
const [paused, setPaused] = React37.useState(false);
|
|
4950
|
+
const [dragging, setDragging] = React37.useState(false);
|
|
4951
|
+
const [background, setBackground] = React37.useState(false);
|
|
4952
|
+
const [announce, setAnnounce] = React37.useState(false);
|
|
4953
|
+
const list = React37.useRef(null);
|
|
4954
|
+
const [fill] = React37.useState(() => new Animated21.Value(0));
|
|
4955
|
+
const progress = React37.useRef(0);
|
|
4956
|
+
React37.useEffect(() => {
|
|
4901
4957
|
const id = fill.addListener(({ value }) => {
|
|
4902
4958
|
progress.current = value;
|
|
4903
4959
|
});
|
|
@@ -4918,11 +4974,11 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4918
4974
|
};
|
|
4919
4975
|
const playing = autoplay && !reduced && total > 1;
|
|
4920
4976
|
const running = playing && !paused && !dragging && !background && !(!loop && current === total - 1);
|
|
4921
|
-
|
|
4977
|
+
React37.useEffect(() => {
|
|
4922
4978
|
fill.setValue(0);
|
|
4923
4979
|
progress.current = 0;
|
|
4924
4980
|
}, [current, fill]);
|
|
4925
|
-
|
|
4981
|
+
React37.useEffect(() => {
|
|
4926
4982
|
if (!running) return;
|
|
4927
4983
|
const animation = Animated21.timing(fill, { toValue: 1, duration: Math.max(1, interval * (1 - progress.current)), easing: Easing12.linear, useNativeDriver: false });
|
|
4928
4984
|
animation.start(({ finished }) => {
|
|
@@ -4932,10 +4988,10 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4932
4988
|
}, [running, current, interval]);
|
|
4933
4989
|
const item = items2[current];
|
|
4934
4990
|
const title = item !== void 0 ? getTitle?.(item) : void 0;
|
|
4935
|
-
const control = [
|
|
4936
|
-
const icon = (d) => /* @__PURE__ */
|
|
4937
|
-
return /* @__PURE__ */
|
|
4938
|
-
/* @__PURE__ */
|
|
4991
|
+
const control = [styles43.control, { borderColor: theme.borderDefault, backgroundColor: theme.surface1 }];
|
|
4992
|
+
const icon = (d) => /* @__PURE__ */ jsx57(Svg27, { width: 16, height: 16, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx57(Path23, { d, stroke: theme.textSecondary, strokeWidth: 2.2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
4993
|
+
return /* @__PURE__ */ jsxs51(View51, { role: "group", "aria-label": label, style: [styles43.root, style], children: [
|
|
4994
|
+
/* @__PURE__ */ jsx57(View51, { "aria-live": announce ? "polite" : "off", onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: /* @__PURE__ */ jsx57(
|
|
4939
4995
|
FlatList,
|
|
4940
4996
|
{
|
|
4941
4997
|
ref: list,
|
|
@@ -4956,25 +5012,25 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4956
5012
|
onIndexChange?.(next, true);
|
|
4957
5013
|
}
|
|
4958
5014
|
},
|
|
4959
|
-
renderItem: ({ item: slide, index }) => /* @__PURE__ */
|
|
5015
|
+
renderItem: ({ item: slide, index }) => /* @__PURE__ */ jsx57(View51, { role: "group", "aria-label": labels.slide(index + 1, total), style: { width }, children: Math.abs(index - current) <= 1 ? renderItem(slide, { index, active: index === current }) : null })
|
|
4960
5016
|
}
|
|
4961
5017
|
) }),
|
|
4962
|
-
/* @__PURE__ */
|
|
4963
|
-
i < current || i === current && !playing ? /* @__PURE__ */
|
|
4964
|
-
i === current && playing ? /* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ jsx57(View51, { style: styles43.segments, children: items2.map((slide, i) => /* @__PURE__ */ jsx57(Pressable22, { role: "button", "aria-label": labels.goTo(i + 1, total), "aria-current": i === current ? true : void 0, onPress: () => go(i, true), style: styles43.segment, children: /* @__PURE__ */ jsxs51(View51, { style: [styles43.track, { backgroundColor: theme.surface3 }], children: [
|
|
5019
|
+
i < current || i === current && !playing ? /* @__PURE__ */ jsx57(View51, { style: [StyleSheet43.absoluteFill, { backgroundColor: theme.accent }] }) : null,
|
|
5020
|
+
i === current && playing ? /* @__PURE__ */ jsx57(Animated21.View, { style: [styles43.fill, { backgroundColor: theme.accent, width: fill.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) }] }) : null
|
|
4965
5021
|
] }) }, getId(slide))) }),
|
|
4966
|
-
/* @__PURE__ */
|
|
4967
|
-
/* @__PURE__ */
|
|
5022
|
+
/* @__PURE__ */ jsxs51(View51, { style: styles43.bar, children: [
|
|
5023
|
+
/* @__PURE__ */ jsxs51(Txt, { variant: "caption", tone: "secondary", numberOfLines: 1, style: styles43.counter, children: [
|
|
4968
5024
|
title ? `${title} \xB7 ` : "",
|
|
4969
5025
|
labels.counter(current + 1, total)
|
|
4970
5026
|
] }),
|
|
4971
|
-
/* @__PURE__ */
|
|
4972
|
-
playing ? /* @__PURE__ */
|
|
4973
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ jsx57(Pressable22, { role: "button", "aria-label": labels.previous, disabled: !loop && current === 0, hitSlop: 6, onPress: () => go(current - 1, true), style: control, children: icon("M15 5l-7 7 7 7") }),
|
|
5028
|
+
playing ? /* @__PURE__ */ jsx57(Pressable22, { role: "button", "aria-label": paused ? labels.play : labels.pause, hitSlop: 6, onPress: () => setPaused(!paused), style: control, children: icon(paused ? "M8 5.5v13l10-6.5Z" : "M8 5v14M16 5v14") }) : null,
|
|
5029
|
+
/* @__PURE__ */ jsx57(Pressable22, { role: "button", "aria-label": labels.next, disabled: !loop && current === total - 1, hitSlop: 6, onPress: () => go(current + 1, true), style: control, children: icon("M9 5l7 7-7 7") })
|
|
4974
5030
|
] })
|
|
4975
5031
|
] });
|
|
4976
5032
|
}
|
|
4977
|
-
var
|
|
5033
|
+
var styles43 = StyleSheet43.create({
|
|
4978
5034
|
root: { gap: 8 },
|
|
4979
5035
|
segments: { flexDirection: "row", gap: 4 },
|
|
4980
5036
|
segment: { flex: 1, height: 24, justifyContent: "center" },
|
|
@@ -4986,9 +5042,9 @@ var styles42 = StyleSheet42.create({
|
|
|
4986
5042
|
});
|
|
4987
5043
|
|
|
4988
5044
|
// src/native/skeleton.tsx
|
|
4989
|
-
import * as
|
|
5045
|
+
import * as React38 from "react";
|
|
4990
5046
|
import { Animated as Animated22 } from "react-native";
|
|
4991
|
-
import { jsx as
|
|
5047
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
4992
5048
|
var SHAPE = {
|
|
4993
5049
|
text: { width: "100%", height: 12, radius: 4 },
|
|
4994
5050
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -4997,8 +5053,8 @@ var SHAPE = {
|
|
|
4997
5053
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
4998
5054
|
const { theme } = useTheme();
|
|
4999
5055
|
const reduce = useReducedMotion();
|
|
5000
|
-
const [opacity] =
|
|
5001
|
-
|
|
5056
|
+
const [opacity] = React38.useState(() => new Animated22.Value(1));
|
|
5057
|
+
React38.useEffect(() => {
|
|
5002
5058
|
if (reduce) return;
|
|
5003
5059
|
const loop = Animated22.loop(
|
|
5004
5060
|
Animated22.sequence([
|
|
@@ -5014,7 +5070,7 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
5014
5070
|
}, [reduce, opacity]);
|
|
5015
5071
|
const s = SHAPE[shape];
|
|
5016
5072
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
5017
|
-
return /* @__PURE__ */
|
|
5073
|
+
return /* @__PURE__ */ jsx58(
|
|
5018
5074
|
Animated22.View,
|
|
5019
5075
|
{
|
|
5020
5076
|
testID,
|
|
@@ -5028,10 +5084,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
5028
5084
|
}
|
|
5029
5085
|
|
|
5030
5086
|
// src/native/slider.tsx
|
|
5031
|
-
import * as
|
|
5032
|
-
import { PanResponder as PanResponder2, StyleSheet as
|
|
5033
|
-
import
|
|
5034
|
-
import { jsx as
|
|
5087
|
+
import * as React39 from "react";
|
|
5088
|
+
import { PanResponder as PanResponder2, StyleSheet as StyleSheet44, Text as Text17, View as View52 } from "react-native";
|
|
5089
|
+
import Svg28, { Defs as Defs14, LinearGradient as LinearGradient11, Rect as Rect4, Stop as Stop14 } from "react-native-svg";
|
|
5090
|
+
import { jsx as jsx59, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5035
5091
|
var THUMB = 26;
|
|
5036
5092
|
var toArray = (v) => v === void 0 ? void 0 : typeof v === "number" ? [v] : [...v];
|
|
5037
5093
|
function Slider({
|
|
@@ -5057,20 +5113,20 @@ function Slider({
|
|
|
5057
5113
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
5058
5114
|
const range = Array.isArray(value ?? defaultValue);
|
|
5059
5115
|
const vertical = orientation === "vertical";
|
|
5060
|
-
const [inner, setInner] =
|
|
5116
|
+
const [inner, setInner] = React39.useState(() => toArray(defaultValue) ?? [min]);
|
|
5061
5117
|
const current = toArray(value) ?? inner;
|
|
5062
|
-
const [length, setLength] =
|
|
5063
|
-
const [dragging, setDragging] =
|
|
5118
|
+
const [length, setLength] = React39.useState(0);
|
|
5119
|
+
const [dragging, setDragging] = React39.useState(null);
|
|
5064
5120
|
const gradientId = useSvgId("kzs");
|
|
5065
5121
|
const out = (next) => range ? [next[0], next[1]] : next[0];
|
|
5066
5122
|
const snap = (v) => Math.min(max, Math.max(min, Math.round((v - min) / step) * step + min));
|
|
5067
5123
|
const pct = (v) => (v - min) / (max - min || 1);
|
|
5068
|
-
const live =
|
|
5069
|
-
|
|
5124
|
+
const live = React39.useRef({ current, length, vertical, disabled });
|
|
5125
|
+
React39.useLayoutEffect(() => {
|
|
5070
5126
|
live.current = { current, length, vertical, disabled };
|
|
5071
5127
|
});
|
|
5072
|
-
const active =
|
|
5073
|
-
const start =
|
|
5128
|
+
const active = React39.useRef(0);
|
|
5129
|
+
const start = React39.useRef(0);
|
|
5074
5130
|
const set = (next) => {
|
|
5075
5131
|
if (value === void 0) setInner(next);
|
|
5076
5132
|
onValueChange?.(out(next));
|
|
@@ -5091,11 +5147,11 @@ function Slider({
|
|
|
5091
5147
|
return min + p * (max - min);
|
|
5092
5148
|
};
|
|
5093
5149
|
const commit = () => onValueCommit?.(out(live.current.current));
|
|
5094
|
-
const handlers =
|
|
5095
|
-
|
|
5150
|
+
const handlers = React39.useRef({ move, at, commit });
|
|
5151
|
+
React39.useLayoutEffect(() => {
|
|
5096
5152
|
handlers.current = { move, at, commit };
|
|
5097
5153
|
});
|
|
5098
|
-
const [responder] =
|
|
5154
|
+
const [responder] = React39.useState(
|
|
5099
5155
|
() => PanResponder2.create({
|
|
5100
5156
|
onStartShouldSetPanResponder: () => !live.current.disabled,
|
|
5101
5157
|
onMoveShouldSetPanResponder: () => !live.current.disabled,
|
|
@@ -5123,24 +5179,24 @@ function Slider({
|
|
|
5123
5179
|
const along = (p) => vertical ? { bottom: p * length } : { left: p * length };
|
|
5124
5180
|
const onLayout = (e) => setLength(vertical ? e.nativeEvent.layout.height : e.nativeEvent.layout.width);
|
|
5125
5181
|
const fill = vertical ? { bottom: pct(lo) * length, height: (pct(hi) - pct(lo)) * length, left: 0, right: 0 } : { left: pct(lo) * length, width: (pct(hi) - pct(lo)) * length, top: 0, bottom: 0 };
|
|
5126
|
-
return /* @__PURE__ */
|
|
5127
|
-
showLabel ? /* @__PURE__ */
|
|
5128
|
-
/* @__PURE__ */
|
|
5129
|
-
/* @__PURE__ */
|
|
5182
|
+
return /* @__PURE__ */ jsxs52(View52, { style: [styles44.root, vertical ? styles44.rootVertical : null, disabled ? styles44.disabled : null, style], children: [
|
|
5183
|
+
showLabel ? /* @__PURE__ */ jsxs52(View52, { style: styles44.header, children: [
|
|
5184
|
+
/* @__PURE__ */ jsx59(Text17, { style: [styles44.label, { color: theme.textSecondary }], children: label }),
|
|
5185
|
+
/* @__PURE__ */ jsx59(Text17, { "aria-hidden": true, style: [styles44.value, { color: theme.textSecondary }], children: current.map(formatValue).join(" \u2013 ") })
|
|
5130
5186
|
] }) : null,
|
|
5131
|
-
/* @__PURE__ */
|
|
5132
|
-
/* @__PURE__ */
|
|
5133
|
-
/* @__PURE__ */
|
|
5134
|
-
/* @__PURE__ */
|
|
5135
|
-
/* @__PURE__ */
|
|
5136
|
-
/* @__PURE__ */
|
|
5187
|
+
/* @__PURE__ */ jsxs52(View52, { ...responder.panHandlers, style: vertical ? styles44.controlVertical : styles44.control, children: [
|
|
5188
|
+
/* @__PURE__ */ jsxs52(View52, { onLayout, pointerEvents: "none", style: [vertical ? styles44.trackVertical : styles44.track, { borderRadius: radius3.full, backgroundColor: theme.surface3 }], children: [
|
|
5189
|
+
/* @__PURE__ */ jsx59(View52, { style: [styles44.fill, fill, { borderRadius: radius3.full, overflow: "hidden", backgroundColor: theme.accent }], children: tone3 === "gradient" ? /* @__PURE__ */ jsxs52(Svg28, { width: "100%", height: "100%", "aria-hidden": true, children: [
|
|
5190
|
+
/* @__PURE__ */ jsx59(Defs14, { children: /* @__PURE__ */ jsxs52(LinearGradient11, { id: gradientId, x1: "0", y1: vertical ? "1" : "0", x2: vertical ? "0" : "1", y2: "0", children: [
|
|
5191
|
+
/* @__PURE__ */ jsx59(Stop14, { offset: "0", stopColor: theme.accent }),
|
|
5192
|
+
/* @__PURE__ */ jsx59(Stop14, { offset: "1", stopColor: theme.accent2 })
|
|
5137
5193
|
] }) }),
|
|
5138
|
-
/* @__PURE__ */
|
|
5194
|
+
/* @__PURE__ */ jsx59(Rect4, { width: "100%", height: "100%", fill: `url(#${gradientId})` })
|
|
5139
5195
|
] }) : null }),
|
|
5140
|
-
tickValues.map((t) => /* @__PURE__ */
|
|
5196
|
+
tickValues.map((t) => /* @__PURE__ */ jsx59(View52, { style: [vertical ? styles44.tickVertical : styles44.tick, along(pct(t)), { backgroundColor: t > lo && t < hi ? theme.onAccent : theme.borderStrong }] }, t))
|
|
5141
5197
|
] }),
|
|
5142
|
-
current.map((v, i) => /* @__PURE__ */
|
|
5143
|
-
|
|
5198
|
+
current.map((v, i) => /* @__PURE__ */ jsx59(
|
|
5199
|
+
View52,
|
|
5144
5200
|
{
|
|
5145
5201
|
accessible: true,
|
|
5146
5202
|
role: "slider",
|
|
@@ -5159,16 +5215,16 @@ function Slider({
|
|
|
5159
5215
|
onValueCommit?.(out(values));
|
|
5160
5216
|
},
|
|
5161
5217
|
pointerEvents: "none",
|
|
5162
|
-
style: [
|
|
5163
|
-
children: floatingValue === "always" || floatingValue && dragging === i ? /* @__PURE__ */
|
|
5218
|
+
style: [styles44.thumb, vertical ? { bottom: pct(v) * length, left: (44 - THUMB) / 2, marginLeft: 0, marginTop: 0 } : { left: pct(v) * length - THUMB / 2, top: 0 }, { borderColor: theme.accent, backgroundColor: theme.textOnMedia, shadowColor: theme.scrimStrong }],
|
|
5219
|
+
children: floatingValue === "always" || floatingValue && dragging === i ? /* @__PURE__ */ jsx59(View52, { "aria-hidden": true, style: [vertical ? styles44.bubbleVertical : styles44.bubble, { backgroundColor: theme.textPrimary, borderRadius: radius3.md }], children: /* @__PURE__ */ jsx59(Text17, { style: [styles44.bubbleText, { color: theme.surface0 }], children: formatValue(v) }) }) : null
|
|
5164
5220
|
},
|
|
5165
5221
|
i
|
|
5166
5222
|
))
|
|
5167
5223
|
] }),
|
|
5168
|
-
marks2?.length && !vertical ? /* @__PURE__ */
|
|
5224
|
+
marks2?.length && !vertical ? /* @__PURE__ */ jsx59(View52, { "aria-hidden": true, style: styles44.marks, children: marks2.map((m) => /* @__PURE__ */ jsx59(Text17, { style: [styles44.mark, { left: pct(m.value) * length, color: theme.textSecondary, transform: [{ translateX: m.value === min ? 0 : m.value === max ? -40 : -20 }], textAlign: m.value === min ? "left" : m.value === max ? "right" : "center" }], children: m.label }, m.value)) }) : null
|
|
5169
5225
|
] });
|
|
5170
5226
|
}
|
|
5171
|
-
var
|
|
5227
|
+
var styles44 = StyleSheet44.create({
|
|
5172
5228
|
root: { gap: 8, alignSelf: "stretch" },
|
|
5173
5229
|
rootVertical: { alignSelf: "flex-start", alignItems: "center" },
|
|
5174
5230
|
header: { flexDirection: "row", justifyContent: "space-between", alignItems: "baseline", gap: 12 },
|
|
@@ -5204,10 +5260,10 @@ var styles43 = StyleSheet43.create({
|
|
|
5204
5260
|
|
|
5205
5261
|
// src/native/spinner.tsx
|
|
5206
5262
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
5207
|
-
import { jsx as
|
|
5263
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
5208
5264
|
function Spinner({ label, size = "md", ...props }) {
|
|
5209
5265
|
const { theme } = useTheme();
|
|
5210
|
-
return /* @__PURE__ */
|
|
5266
|
+
return /* @__PURE__ */ jsx60(
|
|
5211
5267
|
ActivityIndicator2,
|
|
5212
5268
|
{
|
|
5213
5269
|
accessible: true,
|
|
@@ -5222,15 +5278,15 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
5222
5278
|
}
|
|
5223
5279
|
|
|
5224
5280
|
// src/native/splash-handoff.tsx
|
|
5225
|
-
import * as
|
|
5226
|
-
import { Animated as Animated23, Easing as Easing13, StyleSheet as
|
|
5227
|
-
import { jsx as
|
|
5281
|
+
import * as React40 from "react";
|
|
5282
|
+
import { Animated as Animated23, Easing as Easing13, StyleSheet as StyleSheet45, View as View53 } from "react-native";
|
|
5283
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
5228
5284
|
function SplashHandoff({ product, ready, onShown, onDone, size = 96, background, label, duration = 320, style }) {
|
|
5229
5285
|
const { theme } = useTheme();
|
|
5230
5286
|
const reduce = useReducedMotion();
|
|
5231
|
-
const [opacity] =
|
|
5232
|
-
const [gone, setGone] =
|
|
5233
|
-
|
|
5287
|
+
const [opacity] = React40.useState(() => new Animated23.Value(1));
|
|
5288
|
+
const [gone, setGone] = React40.useState(false);
|
|
5289
|
+
React40.useEffect(() => {
|
|
5234
5290
|
if (!ready) return;
|
|
5235
5291
|
const animation = Animated23.timing(opacity, { toValue: 0, duration: reduce ? 0 : duration, easing: Easing13.out(Easing13.ease), useNativeDriver: true });
|
|
5236
5292
|
animation.start(({ finished }) => {
|
|
@@ -5242,7 +5298,7 @@ function SplashHandoff({ product, ready, onShown, onDone, size = 96, background,
|
|
|
5242
5298
|
return () => animation.stop();
|
|
5243
5299
|
}, [ready, reduce, duration, opacity, onDone]);
|
|
5244
5300
|
if (gone) return null;
|
|
5245
|
-
return /* @__PURE__ */
|
|
5301
|
+
return /* @__PURE__ */ jsx61(
|
|
5246
5302
|
Animated23.View,
|
|
5247
5303
|
{
|
|
5248
5304
|
accessible: true,
|
|
@@ -5251,30 +5307,30 @@ function SplashHandoff({ product, ready, onShown, onDone, size = 96, background,
|
|
|
5251
5307
|
"aria-busy": true,
|
|
5252
5308
|
pointerEvents: ready ? "none" : "auto",
|
|
5253
5309
|
onLayout: onShown,
|
|
5254
|
-
style: [
|
|
5255
|
-
children: /* @__PURE__ */
|
|
5310
|
+
style: [StyleSheet45.absoluteFill, styles45.root, { backgroundColor: background ?? theme.surface0, opacity }, style],
|
|
5311
|
+
children: /* @__PURE__ */ jsx61(View53, { children: /* @__PURE__ */ jsx61(ProductMark, { id: product, size, animated: true }) })
|
|
5256
5312
|
}
|
|
5257
5313
|
);
|
|
5258
5314
|
}
|
|
5259
|
-
var
|
|
5315
|
+
var styles45 = StyleSheet45.create({ root: { alignItems: "center", justifyContent: "center", zIndex: 100 } });
|
|
5260
5316
|
|
|
5261
5317
|
// src/native/step-progress.tsx
|
|
5262
|
-
import { Pressable as
|
|
5263
|
-
import
|
|
5264
|
-
import { jsx as
|
|
5318
|
+
import { Pressable as Pressable23, StyleSheet as StyleSheet46, View as View54 } from "react-native";
|
|
5319
|
+
import Svg29, { Path as Path24 } from "react-native-svg";
|
|
5320
|
+
import { jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5265
5321
|
function StepProgress({ step, total, label, backLabel, onBack, trailing, style }) {
|
|
5266
5322
|
const { theme, insets } = useTheme();
|
|
5267
5323
|
const words2 = label(step, total);
|
|
5268
|
-
return /* @__PURE__ */
|
|
5269
|
-
/* @__PURE__ */
|
|
5270
|
-
onBack && backLabel ? /* @__PURE__ */
|
|
5271
|
-
/* @__PURE__ */
|
|
5272
|
-
/* @__PURE__ */
|
|
5324
|
+
return /* @__PURE__ */ jsxs53(View54, { style: [styles46.root, { paddingTop: insets.top + 8 }, style], children: [
|
|
5325
|
+
/* @__PURE__ */ jsxs53(View54, { style: styles46.row, children: [
|
|
5326
|
+
onBack && backLabel ? /* @__PURE__ */ jsx62(Pressable23, { role: "button", "aria-label": backLabel, hitSlop: 10, onPress: onBack, style: styles46.back, children: /* @__PURE__ */ jsx62(Svg29, { width: 22, height: 22, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx62(Path24, { d: "M15 5l-7 7 7 7", stroke: theme.textPrimary, strokeWidth: 2.4, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : /* @__PURE__ */ jsx62(View54, { style: styles46.back }),
|
|
5327
|
+
/* @__PURE__ */ jsx62(View54, { accessible: true, role: "progressbar", "aria-label": words2, "aria-valuemin": 1, "aria-valuemax": total, "aria-valuenow": step, "aria-valuetext": words2, style: styles46.bars, children: Array.from({ length: total }, (_, i) => /* @__PURE__ */ jsx62(View54, { style: [styles46.bar, { backgroundColor: i < step ? theme.accent : theme.surface3 }] }, i)) }),
|
|
5328
|
+
/* @__PURE__ */ jsx62(View54, { style: styles46.trailing, children: trailing })
|
|
5273
5329
|
] }),
|
|
5274
|
-
/* @__PURE__ */
|
|
5330
|
+
/* @__PURE__ */ jsx62(Txt, { variant: "caption", tone: "secondary", style: styles46.words, "aria-hidden": true, children: words2 })
|
|
5275
5331
|
] });
|
|
5276
5332
|
}
|
|
5277
|
-
var
|
|
5333
|
+
var styles46 = StyleSheet46.create({
|
|
5278
5334
|
root: { paddingHorizontal: 12, gap: 6 },
|
|
5279
5335
|
row: { flexDirection: "row", alignItems: "center", gap: 8 },
|
|
5280
5336
|
back: { width: 40, height: 40, alignItems: "center", justifyContent: "center" },
|
|
@@ -5285,36 +5341,36 @@ var styles45 = StyleSheet45.create({
|
|
|
5285
5341
|
});
|
|
5286
5342
|
|
|
5287
5343
|
// src/native/stepper.tsx
|
|
5288
|
-
import { StyleSheet as
|
|
5289
|
-
import
|
|
5290
|
-
import { jsx as
|
|
5344
|
+
import { StyleSheet as StyleSheet47, View as View55 } from "react-native";
|
|
5345
|
+
import Svg30, { Circle as Circle16, Path as Path25 } from "react-native-svg";
|
|
5346
|
+
import { jsx as jsx63, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5291
5347
|
var WORDS = { done: "done", current: "in progress", upcoming: "to come", error: "failed" };
|
|
5292
5348
|
function Stepper({ steps, current = 0, orientation = "vertical", statusLabels, "aria-label": label, style }) {
|
|
5293
5349
|
const { theme } = useTheme();
|
|
5294
5350
|
const words2 = { ...WORDS, ...statusLabels };
|
|
5295
5351
|
const vertical = orientation === "vertical";
|
|
5296
|
-
return /* @__PURE__ */
|
|
5352
|
+
return /* @__PURE__ */ jsx63(View55, { role: "list", "aria-label": label, style: [vertical ? styles47.column : styles47.row, style], children: steps.map((step, i) => {
|
|
5297
5353
|
const status = step.status ?? (i < current ? "done" : i === current ? "current" : "upcoming");
|
|
5298
5354
|
const last = i === steps.length - 1;
|
|
5299
|
-
const node = status === "current" ? /* @__PURE__ */
|
|
5300
|
-
/* @__PURE__ */
|
|
5301
|
-
status === "done" ? /* @__PURE__ */
|
|
5355
|
+
const node = status === "current" ? /* @__PURE__ */ jsx63(LoaderGlyph, { value: step.value ?? null, size: 24 }) : status === "error" ? /* @__PURE__ */ jsx63(LoaderGlyph, { state: "error", size: 24 }) : /* @__PURE__ */ jsxs54(Svg30, { width: 24, height: 24, viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
5356
|
+
/* @__PURE__ */ jsx63(Circle16, { cx: 12, cy: 12, r: 10, fill: status === "done" ? theme.accent : "none", stroke: status === "done" ? theme.accent : theme.borderStrong, strokeWidth: 2 }),
|
|
5357
|
+
status === "done" ? /* @__PURE__ */ jsx63(Path25, { d: "M7.5 12.3l3 3 6-6.3", stroke: theme.onAccent, strokeWidth: 2.2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) : null
|
|
5302
5358
|
] });
|
|
5303
|
-
const connector = !last ? /* @__PURE__ */
|
|
5304
|
-
return /* @__PURE__ */
|
|
5305
|
-
/* @__PURE__ */
|
|
5359
|
+
const connector = !last ? /* @__PURE__ */ jsx63(View55, { "aria-hidden": true, style: [vertical ? styles47.vLine : styles47.hLine, { backgroundColor: status === "done" ? theme.accent : theme.borderDefault }] }) : null;
|
|
5360
|
+
return /* @__PURE__ */ jsxs54(View55, { role: "listitem", accessible: true, "aria-label": `${step.title}, ${words2[status]}`, style: vertical ? styles47.vStep : styles47.hStep, children: [
|
|
5361
|
+
/* @__PURE__ */ jsxs54(View55, { style: vertical ? styles47.vRail : styles47.hRail, children: [
|
|
5306
5362
|
node,
|
|
5307
5363
|
connector
|
|
5308
5364
|
] }),
|
|
5309
|
-
/* @__PURE__ */
|
|
5310
|
-
/* @__PURE__ */
|
|
5311
|
-
step.description ? /* @__PURE__ */
|
|
5312
|
-
step.content && (status === "current" || status === "error") ? /* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ jsxs54(View55, { style: [styles47.body, vertical && !last ? { paddingBottom: 20 } : null], children: [
|
|
5366
|
+
/* @__PURE__ */ jsx63(Txt, { variant: "label", tone: status === "upcoming" ? "secondary" : "text", numberOfLines: vertical ? void 0 : 2, children: step.title }),
|
|
5367
|
+
step.description ? /* @__PURE__ */ jsx63(Txt, { variant: "caption", tone: "secondary", children: step.description }) : null,
|
|
5368
|
+
step.content && (status === "current" || status === "error") ? /* @__PURE__ */ jsx63(View55, { style: styles47.content, children: step.content }) : null
|
|
5313
5369
|
] })
|
|
5314
5370
|
] }, i);
|
|
5315
5371
|
}) });
|
|
5316
5372
|
}
|
|
5317
|
-
var
|
|
5373
|
+
var styles47 = StyleSheet47.create({
|
|
5318
5374
|
column: { gap: 0 },
|
|
5319
5375
|
row: { flexDirection: "row" },
|
|
5320
5376
|
vStep: { flexDirection: "row", gap: 12 },
|
|
@@ -5328,59 +5384,59 @@ var styles46 = StyleSheet46.create({
|
|
|
5328
5384
|
});
|
|
5329
5385
|
|
|
5330
5386
|
// src/native/swipe-deck.tsx
|
|
5331
|
-
import * as
|
|
5332
|
-
import { AccessibilityInfo as AccessibilityInfo14, Animated as Animated24, Image as Image5, PanResponder as PanResponder3, Platform as Platform4, Pressable as
|
|
5333
|
-
import
|
|
5334
|
-
import { Fragment as
|
|
5387
|
+
import * as React41 from "react";
|
|
5388
|
+
import { AccessibilityInfo as AccessibilityInfo14, Animated as Animated24, Image as Image5, PanResponder as PanResponder3, Platform as Platform4, Pressable as Pressable24, StyleSheet as StyleSheet48, useWindowDimensions as useWindowDimensions2, View as View56 } from "react-native";
|
|
5389
|
+
import Svg31, { Defs as Defs15, LinearGradient as LinearGradient12, Path as Path26, Rect as Rect5, Stop as Stop15 } from "react-native-svg";
|
|
5390
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5335
5391
|
function PersonCard({ photos, name, age, badge, meta, bio, footer, photoLabel = (n, t) => `Photo ${n} of ${t}`, style }) {
|
|
5336
5392
|
const { theme, radius: radius3 } = useTheme();
|
|
5337
|
-
const [index, setIndex] =
|
|
5393
|
+
const [index, setIndex] = React41.useState(0);
|
|
5338
5394
|
const gradient = useSvgId("kz-profile-");
|
|
5339
|
-
const [box, setBox] =
|
|
5395
|
+
const [box, setBox] = React41.useState(null);
|
|
5340
5396
|
const photo = photos[index];
|
|
5341
|
-
return /* @__PURE__ */
|
|
5342
|
-
|
|
5397
|
+
return /* @__PURE__ */ jsxs55(
|
|
5398
|
+
View56,
|
|
5343
5399
|
{
|
|
5344
5400
|
accessible: Platform4.OS !== "web",
|
|
5345
5401
|
accessibilityActions: photos.length > 1 ? [{ name: "increment" }, { name: "decrement" }] : [],
|
|
5346
5402
|
onAccessibilityAction: (e) => setIndex((i) => Math.max(0, Math.min(photos.length - 1, i + (e.nativeEvent.actionName === "increment" ? 1 : -1)))),
|
|
5347
5403
|
role: Platform4.OS === "web" ? "group" : "img",
|
|
5348
5404
|
"aria-label": [`${name}${age !== void 0 ? `, ${age}` : ""}`, bio, photos.length > 1 ? photoLabel(index + 1, photos.length) : null].filter(Boolean).join(". "),
|
|
5349
|
-
style: [
|
|
5405
|
+
style: [styles48.card, { borderRadius: radius3.xl, backgroundColor: theme.media }, style],
|
|
5350
5406
|
children: [
|
|
5351
|
-
photo ? /* @__PURE__ */
|
|
5352
|
-
photos.length > 1 ? /* @__PURE__ */
|
|
5353
|
-
/* @__PURE__ */
|
|
5354
|
-
/* @__PURE__ */
|
|
5355
|
-
/* @__PURE__ */
|
|
5407
|
+
photo ? /* @__PURE__ */ jsx64(Image5, { testID: "person-card-photo", source: { uri: photo.uri }, style: StyleSheet48.absoluteFill, resizeMode: "cover" }) : null,
|
|
5408
|
+
photos.length > 1 ? /* @__PURE__ */ jsxs55(Fragment10, { children: [
|
|
5409
|
+
/* @__PURE__ */ jsx64(View56, { style: styles48.bars, "aria-hidden": true, children: photos.map((_, i) => /* @__PURE__ */ jsx64(View56, { style: [styles48.bar, { backgroundColor: theme.textOnMedia, opacity: i === index ? 1 : 0.4 }] }, i)) }),
|
|
5410
|
+
/* @__PURE__ */ jsx64(Pressable24, { "aria-hidden": true, accessible: false, focusable: false, tabIndex: -1, style: [styles48.half, { left: 0 }], onPress: () => setIndex((i) => Math.max(0, i - 1)) }),
|
|
5411
|
+
/* @__PURE__ */ jsx64(Pressable24, { "aria-hidden": true, accessible: false, focusable: false, tabIndex: -1, style: [styles48.half, { right: 0 }], onPress: () => setIndex((i) => Math.min(photos.length - 1, i + 1)) })
|
|
5356
5412
|
] }) : null,
|
|
5357
|
-
/* @__PURE__ */
|
|
5358
|
-
|
|
5413
|
+
/* @__PURE__ */ jsxs55(
|
|
5414
|
+
View56,
|
|
5359
5415
|
{
|
|
5360
5416
|
testID: "person-card-overlay",
|
|
5361
5417
|
pointerEvents: "box-none",
|
|
5362
|
-
style:
|
|
5418
|
+
style: styles48.bottom,
|
|
5363
5419
|
onLayout: (e) => setBox({ width: e.nativeEvent.layout.width, height: e.nativeEvent.layout.height }),
|
|
5364
5420
|
children: [
|
|
5365
|
-
box ? /* @__PURE__ */
|
|
5366
|
-
/* @__PURE__ */
|
|
5367
|
-
/* @__PURE__ */
|
|
5368
|
-
/* @__PURE__ */
|
|
5369
|
-
/* @__PURE__ */
|
|
5421
|
+
box ? /* @__PURE__ */ jsxs55(Svg31, { testID: "person-card-scrim", style: styles48.scrim, width: box.width, height: box.height, "aria-hidden": true, children: [
|
|
5422
|
+
/* @__PURE__ */ jsx64(Defs15, { children: /* @__PURE__ */ jsxs55(LinearGradient12, { id: gradient, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
5423
|
+
/* @__PURE__ */ jsx64(Stop15, { offset: "0", stopColor: theme.scrimStrong, stopOpacity: 0 }),
|
|
5424
|
+
/* @__PURE__ */ jsx64(Stop15, { offset: "0.5", stopColor: theme.scrimStrong, stopOpacity: 0.8 }),
|
|
5425
|
+
/* @__PURE__ */ jsx64(Stop15, { offset: "1", stopColor: theme.scrimStrong, stopOpacity: 1 })
|
|
5370
5426
|
] }) }),
|
|
5371
|
-
/* @__PURE__ */
|
|
5427
|
+
/* @__PURE__ */ jsx64(Rect5, { x: 0, y: 0, width: box.width, height: box.height, fill: `url(#${gradient})` })
|
|
5372
5428
|
] }) : null,
|
|
5373
|
-
/* @__PURE__ */
|
|
5374
|
-
/* @__PURE__ */
|
|
5375
|
-
/* @__PURE__ */
|
|
5429
|
+
/* @__PURE__ */ jsxs55(View56, { style: styles48.text, children: [
|
|
5430
|
+
/* @__PURE__ */ jsxs55(View56, { style: styles48.nameRow, children: [
|
|
5431
|
+
/* @__PURE__ */ jsxs55(Txt, { variant: "display", tone: "onMedia", style: styles48.name, numberOfLines: 1, children: [
|
|
5376
5432
|
name,
|
|
5377
|
-
age !== void 0 ? /* @__PURE__ */
|
|
5433
|
+
age !== void 0 ? /* @__PURE__ */ jsx64(Txt, { variant: "display", tone: "onMedia", style: styles48.age, children: ` ${age}` }) : null
|
|
5378
5434
|
] }),
|
|
5379
5435
|
badge
|
|
5380
5436
|
] }),
|
|
5381
5437
|
meta,
|
|
5382
|
-
bio ? /* @__PURE__ */
|
|
5383
|
-
footer ? /* @__PURE__ */
|
|
5438
|
+
bio ? /* @__PURE__ */ jsx64(Txt, { tone: "onMedia", numberOfLines: 2, children: bio }) : null,
|
|
5439
|
+
footer ? /* @__PURE__ */ jsx64(View56, { style: styles48.footer, children: footer }) : null
|
|
5384
5440
|
] })
|
|
5385
5441
|
]
|
|
5386
5442
|
}
|
|
@@ -5393,9 +5449,9 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5393
5449
|
const { theme, haptic } = useTheme();
|
|
5394
5450
|
const reduce = useReducedMotion();
|
|
5395
5451
|
const { width } = useWindowDimensions2();
|
|
5396
|
-
const [x] =
|
|
5452
|
+
const [x] = React41.useState(() => new Animated24.Value(0));
|
|
5397
5453
|
const top = items2[0];
|
|
5398
|
-
const decide =
|
|
5454
|
+
const decide = React41.useCallback(
|
|
5399
5455
|
(direction) => {
|
|
5400
5456
|
if (!top) return;
|
|
5401
5457
|
haptic("impact");
|
|
@@ -5409,7 +5465,7 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5409
5465
|
},
|
|
5410
5466
|
[top, haptic, reduce, x, width, onSwipe, items2.length, labels.empty]
|
|
5411
5467
|
);
|
|
5412
|
-
const pan =
|
|
5468
|
+
const pan = React41.useMemo(
|
|
5413
5469
|
() => PanResponder3.create({
|
|
5414
5470
|
onMoveShouldSetPanResponder: (_, g) => Math.abs(g.dx) > 8 && Math.abs(g.dx) > Math.abs(g.dy),
|
|
5415
5471
|
onPanResponderMove: (_, g) => x.setValue(g.dx),
|
|
@@ -5424,26 +5480,26 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5424
5480
|
const rotate = x.interpolate({ inputRange: [-width, 0, width], outputRange: ["-14deg", "0deg", "14deg"] });
|
|
5425
5481
|
const likeOpacity = x.interpolate({ inputRange: [0, width / 4], outputRange: [0, 1], extrapolate: "clamp" });
|
|
5426
5482
|
const passOpacity = x.interpolate({ inputRange: [-width / 4, 0], outputRange: [1, 0], extrapolate: "clamp" });
|
|
5427
|
-
const button = (direction) => /* @__PURE__ */
|
|
5428
|
-
|
|
5483
|
+
const button = (direction) => /* @__PURE__ */ jsx64(
|
|
5484
|
+
Pressable24,
|
|
5429
5485
|
{
|
|
5430
5486
|
role: "button",
|
|
5431
5487
|
"aria-label": direction === "like" ? labels.like : labels.pass,
|
|
5432
5488
|
disabled: !top,
|
|
5433
5489
|
onPress: () => decide(direction),
|
|
5434
5490
|
style: ({ pressed }) => [
|
|
5435
|
-
|
|
5491
|
+
styles48.button,
|
|
5436
5492
|
{ borderColor: direction === "like" ? theme.success : theme.danger, backgroundColor: theme.surface1, transform: [{ scale: pressed ? 0.92 : 1 }], opacity: top ? 1 : 0.4 }
|
|
5437
5493
|
],
|
|
5438
|
-
children: /* @__PURE__ */
|
|
5494
|
+
children: /* @__PURE__ */ jsx64(Svg31, { width: 28, height: 28, viewBox: "0 0 24 24", "aria-hidden": true, children: direction === "like" ? /* @__PURE__ */ jsx64(Path26, { d: "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", fill: theme.success }) : /* @__PURE__ */ jsx64(Path26, { d: "M6 6l12 12M18 6 6 18", stroke: theme.danger, strokeWidth: 3, strokeLinecap: "round" }) })
|
|
5439
5495
|
}
|
|
5440
5496
|
);
|
|
5441
|
-
return /* @__PURE__ */
|
|
5442
|
-
/* @__PURE__ */
|
|
5497
|
+
return /* @__PURE__ */ jsxs55(View56, { style: [styles48.deck, style], children: [
|
|
5498
|
+
/* @__PURE__ */ jsxs55(View56, { style: styles48.stack, children: [
|
|
5443
5499
|
!top ? empty2 ?? null : null,
|
|
5444
5500
|
items2.slice(0, 2).reverse().map((item) => {
|
|
5445
5501
|
const isTop = item === top;
|
|
5446
|
-
return /* @__PURE__ */
|
|
5502
|
+
return /* @__PURE__ */ jsxs55(
|
|
5447
5503
|
Animated24.View,
|
|
5448
5504
|
{
|
|
5449
5505
|
...isTop ? pan.panHandlers : {},
|
|
@@ -5452,12 +5508,12 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5452
5508
|
"aria-hidden": !isTop,
|
|
5453
5509
|
importantForAccessibility: isTop ? "auto" : "no-hide-descendants",
|
|
5454
5510
|
pointerEvents: isTop ? "auto" : "none",
|
|
5455
|
-
style: [
|
|
5511
|
+
style: [StyleSheet48.absoluteFill, isTop ? { transform: [{ translateX: x }, { rotate }] } : { transform: [{ scale: 0.96 }], opacity: 0.9 }],
|
|
5456
5512
|
children: [
|
|
5457
5513
|
renderCard(item),
|
|
5458
|
-
isTop ? /* @__PURE__ */
|
|
5459
|
-
/* @__PURE__ */
|
|
5460
|
-
/* @__PURE__ */
|
|
5514
|
+
isTop ? /* @__PURE__ */ jsxs55(Fragment10, { children: [
|
|
5515
|
+
/* @__PURE__ */ jsx64(Animated24.View, { pointerEvents: "none", style: [styles48.stamp, styles48.stampLike, { borderColor: theme.success, opacity: likeOpacity }], "aria-hidden": true, children: /* @__PURE__ */ jsx64(Txt, { variant: "title", style: { color: theme.success }, children: labels.likeStamp ?? labels.like.toUpperCase() }) }),
|
|
5516
|
+
/* @__PURE__ */ jsx64(Animated24.View, { pointerEvents: "none", style: [styles48.stamp, styles48.stampPass, { borderColor: theme.danger, opacity: passOpacity }], "aria-hidden": true, children: /* @__PURE__ */ jsx64(Txt, { variant: "title", style: { color: theme.danger }, children: labels.passStamp ?? labels.pass.toUpperCase() }) })
|
|
5461
5517
|
] }) : null
|
|
5462
5518
|
]
|
|
5463
5519
|
},
|
|
@@ -5465,13 +5521,13 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5465
5521
|
);
|
|
5466
5522
|
})
|
|
5467
5523
|
] }),
|
|
5468
|
-
hideButtons ? null : /* @__PURE__ */
|
|
5524
|
+
hideButtons ? null : /* @__PURE__ */ jsxs55(View56, { style: styles48.buttons, children: [
|
|
5469
5525
|
button("pass"),
|
|
5470
5526
|
button("like")
|
|
5471
5527
|
] })
|
|
5472
5528
|
] });
|
|
5473
5529
|
}
|
|
5474
|
-
var
|
|
5530
|
+
var styles48 = StyleSheet48.create({
|
|
5475
5531
|
card: { flex: 1, overflow: "hidden" },
|
|
5476
5532
|
bars: { position: "absolute", top: 8, left: 8, right: 8, flexDirection: "row", gap: 4 },
|
|
5477
5533
|
bar: { flex: 1, height: 3, borderRadius: 2 },
|
|
@@ -5493,18 +5549,18 @@ var styles47 = StyleSheet47.create({
|
|
|
5493
5549
|
});
|
|
5494
5550
|
|
|
5495
5551
|
// src/native/swipeable-row.tsx
|
|
5496
|
-
import * as
|
|
5497
|
-
import { Animated as Animated25, PanResponder as PanResponder4, Pressable as
|
|
5498
|
-
import { jsx as
|
|
5552
|
+
import * as React42 from "react";
|
|
5553
|
+
import { Animated as Animated25, PanResponder as PanResponder4, Pressable as Pressable25, StyleSheet as StyleSheet49, View as View57 } from "react-native";
|
|
5554
|
+
import { jsx as jsx65, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
5499
5555
|
var toneColor = (t, tone3) => ({ neutral: t.surface3, accent: t.accent, success: t.success, warning: t.warning, danger: t.danger })[tone3 ?? "neutral"];
|
|
5500
5556
|
var toneText = (tone3) => tone3 === "neutral" || tone3 === void 0 ? "text" : "onAccent";
|
|
5501
5557
|
function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6, actionWidth = 80, onActivate, testID, style }) {
|
|
5502
5558
|
const { theme, haptic } = useTheme();
|
|
5503
5559
|
const reduce = useReducedMotion();
|
|
5504
|
-
const [x] =
|
|
5505
|
-
const [width, setWidth] =
|
|
5506
|
-
const rest =
|
|
5507
|
-
const armed =
|
|
5560
|
+
const [x] = React42.useState(() => new Animated25.Value(0));
|
|
5561
|
+
const [width, setWidth] = React42.useState(0);
|
|
5562
|
+
const rest = React42.useRef(0);
|
|
5563
|
+
const armed = React42.useRef(false);
|
|
5508
5564
|
const settle = (to) => {
|
|
5509
5565
|
rest.current = to;
|
|
5510
5566
|
if (reduce) x.setValue(to);
|
|
@@ -5514,7 +5570,7 @@ function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6,
|
|
|
5514
5570
|
settle(0);
|
|
5515
5571
|
action.onPress();
|
|
5516
5572
|
};
|
|
5517
|
-
const pan =
|
|
5573
|
+
const pan = React42.useMemo(
|
|
5518
5574
|
() => PanResponder4.create({
|
|
5519
5575
|
onMoveShouldSetPanResponder: (_, g) => Math.abs(g.dx) > 8 && Math.abs(g.dx) > Math.abs(g.dy) * 1.5,
|
|
5520
5576
|
onPanResponderMove: (_, g) => {
|
|
@@ -5543,18 +5599,18 @@ function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6,
|
|
|
5543
5599
|
[trailing, leading, fullSwipe, width, actionWidth]
|
|
5544
5600
|
// eslint-disable-line react-hooks/exhaustive-deps -- run/settle are stable in effect
|
|
5545
5601
|
);
|
|
5546
|
-
const side = (actions, edge) => /* @__PURE__ */
|
|
5602
|
+
const side = (actions, edge) => /* @__PURE__ */ jsx65(View57, { "aria-hidden": true, style: [styles49.side, edge === "left" ? { left: 0 } : { right: 0, flexDirection: "row-reverse" }], children: actions.map((action, i) => (
|
|
5547
5603
|
// eslint-disable-next-line react-hooks/refs -- runs on a press, never during render
|
|
5548
|
-
/* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ jsxs56(Pressable25, { focusable: false, tabIndex: -1, onPress: () => run(action), style: [styles49.action, { width: actionWidth, backgroundColor: toneColor(theme, action.tone) }], children: [
|
|
5549
5605
|
action.icon,
|
|
5550
|
-
/* @__PURE__ */
|
|
5606
|
+
/* @__PURE__ */ jsx65(Txt, { variant: "caption", tone: toneText(action.tone), style: styles49.actionText, numberOfLines: 1, children: action.label })
|
|
5551
5607
|
] }, i)
|
|
5552
5608
|
)) });
|
|
5553
5609
|
const all = [...leading, ...trailing];
|
|
5554
|
-
return /* @__PURE__ */
|
|
5610
|
+
return /* @__PURE__ */ jsxs56(View57, { style: [styles49.root, style], onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: [
|
|
5555
5611
|
leading.length > 0 ? side(leading, "left") : null,
|
|
5556
5612
|
trailing.length > 0 ? side(trailing, "right") : null,
|
|
5557
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx65(
|
|
5558
5614
|
Animated25.View,
|
|
5559
5615
|
{
|
|
5560
5616
|
...pan.panHandlers,
|
|
@@ -5566,13 +5622,13 @@ function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6,
|
|
|
5566
5622
|
const action = all.find((a) => a.label === e.nativeEvent.actionName);
|
|
5567
5623
|
if (action) action.onPress();
|
|
5568
5624
|
},
|
|
5569
|
-
style: [
|
|
5625
|
+
style: [styles49.front, { backgroundColor: theme.surface0, transform: [{ translateX: x }] }],
|
|
5570
5626
|
children
|
|
5571
5627
|
}
|
|
5572
5628
|
)
|
|
5573
5629
|
] });
|
|
5574
5630
|
}
|
|
5575
|
-
var
|
|
5631
|
+
var styles49 = StyleSheet49.create({
|
|
5576
5632
|
root: { overflow: "hidden" },
|
|
5577
5633
|
side: { position: "absolute", top: 0, bottom: 0, flexDirection: "row" },
|
|
5578
5634
|
action: { alignItems: "center", justifyContent: "center", gap: 4, paddingHorizontal: 6 },
|
|
@@ -5581,18 +5637,18 @@ var styles48 = StyleSheet48.create({
|
|
|
5581
5637
|
});
|
|
5582
5638
|
|
|
5583
5639
|
// src/native/switch.tsx
|
|
5584
|
-
import * as
|
|
5585
|
-
import { Animated as Animated26, Pressable as
|
|
5586
|
-
import { jsx as
|
|
5640
|
+
import * as React43 from "react";
|
|
5641
|
+
import { Animated as Animated26, Pressable as Pressable26, StyleSheet as StyleSheet50, Text as Text18, View as View58 } from "react-native";
|
|
5642
|
+
import { jsx as jsx66, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
5587
5643
|
var SIZES = { sm: { w: 40, h: 24, knob: 18 }, md: { w: 52, h: 32, knob: 26 } };
|
|
5588
5644
|
function Switch({ label, checked, defaultChecked = false, onCheckedChange, description, showLabel, size = "md", error, disabled, style }) {
|
|
5589
5645
|
const { theme, motion: motion3, haptic } = useTheme();
|
|
5590
|
-
const [own, setOwn] =
|
|
5646
|
+
const [own, setOwn] = React43.useState(defaultChecked);
|
|
5591
5647
|
const on = checked ?? own;
|
|
5592
5648
|
const d = SIZES[size];
|
|
5593
5649
|
const travel = d.w - d.knob - (d.h - d.knob);
|
|
5594
|
-
const [x] =
|
|
5595
|
-
|
|
5650
|
+
const [x] = React43.useState(() => new Animated26.Value(on ? 1 : 0));
|
|
5651
|
+
React43.useEffect(() => {
|
|
5596
5652
|
Animated26.timing(x, { toValue: on ? 1 : 0, duration: motion3.duration.base, useNativeDriver: true }).start();
|
|
5597
5653
|
}, [on, x, motion3.duration.base]);
|
|
5598
5654
|
const toggle = () => {
|
|
@@ -5600,11 +5656,11 @@ function Switch({ label, checked, defaultChecked = false, onCheckedChange, descr
|
|
|
5600
5656
|
if (checked === void 0) setOwn(!on);
|
|
5601
5657
|
onCheckedChange?.(!on);
|
|
5602
5658
|
};
|
|
5603
|
-
const track = /* @__PURE__ */
|
|
5659
|
+
const track = /* @__PURE__ */ jsx66(View58, { style: [styles50.track, { width: d.w, height: d.h, borderRadius: d.h / 2, backgroundColor: on ? theme.accent : theme.surface3, borderColor: error ? theme.danger : on ? theme.accent : theme.borderDefault }], children: /* @__PURE__ */ jsx66(
|
|
5604
5660
|
Animated26.View,
|
|
5605
5661
|
{
|
|
5606
5662
|
style: [
|
|
5607
|
-
|
|
5663
|
+
styles50.knob,
|
|
5608
5664
|
{
|
|
5609
5665
|
width: d.knob,
|
|
5610
5666
|
height: d.knob,
|
|
@@ -5626,19 +5682,19 @@ function Switch({ label, checked, defaultChecked = false, onCheckedChange, descr
|
|
|
5626
5682
|
onPress: toggle
|
|
5627
5683
|
};
|
|
5628
5684
|
if (!showLabel)
|
|
5629
|
-
return /* @__PURE__ */
|
|
5630
|
-
return /* @__PURE__ */
|
|
5631
|
-
/* @__PURE__ */
|
|
5632
|
-
/* @__PURE__ */
|
|
5633
|
-
/* @__PURE__ */
|
|
5634
|
-
description ? /* @__PURE__ */
|
|
5685
|
+
return /* @__PURE__ */ jsx66(Pressable26, { ...a11y, hitSlop: { top: (44 - d.h) / 2, bottom: (44 - d.h) / 2, left: Math.max(0, (44 - d.w) / 2), right: Math.max(0, (44 - d.w) / 2) }, style: [disabled ? styles50.disabled : null, style], children: track });
|
|
5686
|
+
return /* @__PURE__ */ jsxs57(View58, { style: [styles50.root, style], children: [
|
|
5687
|
+
/* @__PURE__ */ jsxs57(Pressable26, { ...a11y, style: [styles50.row, disabled ? styles50.disabled : null], children: [
|
|
5688
|
+
/* @__PURE__ */ jsxs57(View58, { style: styles50.text, children: [
|
|
5689
|
+
/* @__PURE__ */ jsx66(Text18, { style: [styles50.label, { color: theme.textPrimary }], children: label }),
|
|
5690
|
+
description ? /* @__PURE__ */ jsx66(Text18, { style: [styles50.description, { color: theme.textSecondary }], children: description }) : null
|
|
5635
5691
|
] }),
|
|
5636
5692
|
track
|
|
5637
5693
|
] }),
|
|
5638
|
-
error ? /* @__PURE__ */
|
|
5694
|
+
error ? /* @__PURE__ */ jsx66(Text18, { role: "alert", "aria-live": "polite", style: [styles50.description, { color: theme.dangerText }], children: error }) : null
|
|
5639
5695
|
] });
|
|
5640
5696
|
}
|
|
5641
|
-
var
|
|
5697
|
+
var styles50 = StyleSheet50.create({
|
|
5642
5698
|
root: { gap: 2, alignSelf: "stretch" },
|
|
5643
5699
|
row: { flexDirection: "row", alignItems: "center", gap: 16, minHeight: 48 },
|
|
5644
5700
|
text: { flex: 1, gap: 2 },
|
|
@@ -5650,16 +5706,16 @@ var styles49 = StyleSheet49.create({
|
|
|
5650
5706
|
});
|
|
5651
5707
|
|
|
5652
5708
|
// src/native/tab-bar.tsx
|
|
5653
|
-
import { Pressable as
|
|
5654
|
-
import { jsx as
|
|
5709
|
+
import { Pressable as Pressable27, StyleSheet as StyleSheet51, Text as Text19, View as View59 } from "react-native";
|
|
5710
|
+
import { jsx as jsx67, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
5655
5711
|
function TabBar({ items: items2, value, onValueChange, onReselect, "aria-label": label, style }) {
|
|
5656
5712
|
const { theme, insets, haptic } = useTheme();
|
|
5657
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsx67(View59, { role: "tablist", "aria-label": label, style: [styles51.bar, { backgroundColor: theme.glassBg, borderTopColor: theme.glassBorder, paddingBottom: Math.max(6, insets.bottom) }, style], children: items2.map((item) => {
|
|
5658
5714
|
const selected = item.value === value;
|
|
5659
5715
|
const color = selected ? theme.accentText : theme.textSecondary;
|
|
5660
5716
|
const badge = item.badge === true ? "" : typeof item.badge === "number" && item.badge > 0 ? item.badge > 99 ? "99+" : String(item.badge) : null;
|
|
5661
|
-
return /* @__PURE__ */
|
|
5662
|
-
|
|
5717
|
+
return /* @__PURE__ */ jsxs58(
|
|
5718
|
+
Pressable27,
|
|
5663
5719
|
{
|
|
5664
5720
|
role: "tab",
|
|
5665
5721
|
"aria-selected": selected,
|
|
@@ -5668,22 +5724,22 @@ function TabBar({ items: items2, value, onValueChange, onReselect, "aria-label":
|
|
|
5668
5724
|
if (selected) onReselect?.(item.value);
|
|
5669
5725
|
else onValueChange(item.value);
|
|
5670
5726
|
},
|
|
5671
|
-
style: ({ pressed }) => [
|
|
5727
|
+
style: ({ pressed }) => [styles51.item, { opacity: pressed ? 0.7 : 1 }],
|
|
5672
5728
|
children: [
|
|
5673
|
-
/* @__PURE__ */
|
|
5729
|
+
/* @__PURE__ */ jsxs58(View59, { "aria-hidden": true, style: styles51.icon, children: [
|
|
5674
5730
|
item.icon(selected, color),
|
|
5675
|
-
badge !== null ? /* @__PURE__ */
|
|
5731
|
+
badge !== null ? /* @__PURE__ */ jsx67(View59, { style: [badge ? styles51.count : styles51.dot, { backgroundColor: theme.danger, borderColor: theme.surface1 }], children: badge ? /* @__PURE__ */ jsx67(Text19, { style: [styles51.countText, { color: theme.onAccent }], children: badge }) : null }) : null
|
|
5676
5732
|
] }),
|
|
5677
|
-
/* @__PURE__ */
|
|
5678
|
-
badge !== null && item.badgeLabel ? /* @__PURE__ */
|
|
5733
|
+
/* @__PURE__ */ jsx67(Text19, { numberOfLines: 1, style: [styles51.label, { color, fontWeight: selected ? "700" : "500" }], children: item.label }),
|
|
5734
|
+
badge !== null && item.badgeLabel ? /* @__PURE__ */ jsx67(Text19, { style: styles51.unseen, children: `, ${item.badgeLabel}` }) : null
|
|
5679
5735
|
]
|
|
5680
5736
|
},
|
|
5681
5737
|
item.value
|
|
5682
5738
|
);
|
|
5683
5739
|
}) });
|
|
5684
5740
|
}
|
|
5685
|
-
var
|
|
5686
|
-
bar: { flexDirection: "row", borderTopWidth:
|
|
5741
|
+
var styles51 = StyleSheet51.create({
|
|
5742
|
+
bar: { flexDirection: "row", borderTopWidth: StyleSheet51.hairlineWidth, paddingTop: 6 },
|
|
5687
5743
|
item: { flex: 1, alignItems: "center", gap: 2, minHeight: 48, justifyContent: "center" },
|
|
5688
5744
|
icon: { width: 28, height: 26, alignItems: "center", justifyContent: "center" },
|
|
5689
5745
|
label: { fontSize: 11, lineHeight: 14 },
|
|
@@ -5694,12 +5750,12 @@ var styles50 = StyleSheet50.create({
|
|
|
5694
5750
|
});
|
|
5695
5751
|
|
|
5696
5752
|
// src/native/tabs.tsx
|
|
5697
|
-
import * as
|
|
5698
|
-
import { Pressable as
|
|
5699
|
-
import { jsx as
|
|
5753
|
+
import * as React44 from "react";
|
|
5754
|
+
import { Pressable as Pressable28, ScrollView as ScrollView7, StyleSheet as StyleSheet52, View as View60 } from "react-native";
|
|
5755
|
+
import { jsx as jsx68, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
5700
5756
|
function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label": label, variant = "underline", style }) {
|
|
5701
5757
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
5702
|
-
const [own, setOwn] =
|
|
5758
|
+
const [own, setOwn] = React44.useState(defaultValue ?? items2[0]?.value);
|
|
5703
5759
|
const current = value ?? own;
|
|
5704
5760
|
const select = (next) => {
|
|
5705
5761
|
if (next === current) return;
|
|
@@ -5710,8 +5766,8 @@ function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label":
|
|
|
5710
5766
|
const segmented = variant === "segmented";
|
|
5711
5767
|
const tabs = items2.map((item) => {
|
|
5712
5768
|
const selected = item.value === current;
|
|
5713
|
-
return /* @__PURE__ */
|
|
5714
|
-
|
|
5769
|
+
return /* @__PURE__ */ jsx68(
|
|
5770
|
+
Pressable28,
|
|
5715
5771
|
{
|
|
5716
5772
|
role: "tab",
|
|
5717
5773
|
"aria-selected": selected,
|
|
@@ -5719,45 +5775,45 @@ function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label":
|
|
|
5719
5775
|
disabled: item.disabled,
|
|
5720
5776
|
onPress: () => select(item.value),
|
|
5721
5777
|
style: [
|
|
5722
|
-
segmented ?
|
|
5778
|
+
segmented ? styles52.segment : styles52.tab,
|
|
5723
5779
|
segmented && selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault, borderRadius: radius3.sm } : null,
|
|
5724
5780
|
!segmented ? { borderBottomColor: selected ? theme.accent : "transparent" } : null,
|
|
5725
|
-
item.disabled ?
|
|
5781
|
+
item.disabled ? styles52.disabled : null
|
|
5726
5782
|
],
|
|
5727
|
-
children: /* @__PURE__ */
|
|
5783
|
+
children: /* @__PURE__ */ jsxs59(Txt, { variant: "label", tone: selected ? "text" : "secondary", numberOfLines: 1, children: [
|
|
5728
5784
|
item.label,
|
|
5729
|
-
item.count !== void 0 ? /* @__PURE__ */
|
|
5785
|
+
item.count !== void 0 ? /* @__PURE__ */ jsx68(Txt, { variant: "caption", tone: "secondary", children: ` ${item.count}` }) : null
|
|
5730
5786
|
] })
|
|
5731
5787
|
},
|
|
5732
5788
|
item.value
|
|
5733
5789
|
);
|
|
5734
5790
|
});
|
|
5735
5791
|
const panel = items2.find((i) => i.value === current)?.content;
|
|
5736
|
-
return /* @__PURE__ */
|
|
5737
|
-
segmented ? /* @__PURE__ */
|
|
5738
|
-
panel !== void 0 ? /* @__PURE__ */
|
|
5792
|
+
return /* @__PURE__ */ jsxs59(View60, { style: [styles52.root, style], children: [
|
|
5793
|
+
segmented ? /* @__PURE__ */ jsx68(View60, { role: "tablist", "aria-label": label, style: [styles52.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md }], children: tabs }) : /* @__PURE__ */ jsx68(View60, { style: [styles52.underline, { borderBottomColor: theme.borderSubtle }], children: /* @__PURE__ */ jsx68(ScrollView7, { horizontal: true, showsHorizontalScrollIndicator: false, role: "tablist", "aria-label": label, contentContainerStyle: styles52.scroll, children: tabs }) }),
|
|
5794
|
+
panel !== void 0 ? /* @__PURE__ */ jsx68(View60, { role: "tabpanel", children: panel }) : null
|
|
5739
5795
|
] });
|
|
5740
5796
|
}
|
|
5741
|
-
var
|
|
5797
|
+
var styles52 = StyleSheet52.create({
|
|
5742
5798
|
root: { gap: 12 },
|
|
5743
|
-
underline: { borderBottomWidth:
|
|
5799
|
+
underline: { borderBottomWidth: StyleSheet52.hairlineWidth },
|
|
5744
5800
|
scroll: { gap: 4, paddingHorizontal: 4 },
|
|
5745
5801
|
tab: { minHeight: 44, justifyContent: "center", paddingHorizontal: 12, borderBottomWidth: 2 },
|
|
5746
|
-
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth:
|
|
5747
|
-
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth:
|
|
5802
|
+
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth: StyleSheet52.hairlineWidth, height: 40 },
|
|
5803
|
+
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth: StyleSheet52.hairlineWidth, borderColor: "transparent" },
|
|
5748
5804
|
disabled: { opacity: 0.4 }
|
|
5749
5805
|
});
|
|
5750
5806
|
|
|
5751
5807
|
// src/native/tag-selector.tsx
|
|
5752
|
-
import { StyleSheet as
|
|
5753
|
-
import { jsx as
|
|
5808
|
+
import { StyleSheet as StyleSheet53, View as View61 } from "react-native";
|
|
5809
|
+
import { jsx as jsx69, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
5754
5810
|
function TagSelector({ label, options, value, onValueChange, max, countLabel, style }) {
|
|
5755
5811
|
const { haptic } = useTheme();
|
|
5756
5812
|
const full = max !== void 0 && value.length >= max;
|
|
5757
|
-
return /* @__PURE__ */
|
|
5758
|
-
/* @__PURE__ */
|
|
5813
|
+
return /* @__PURE__ */ jsxs60(View61, { style: [styles53.root, style], children: [
|
|
5814
|
+
/* @__PURE__ */ jsx69(View61, { role: "group", "aria-label": label, style: styles53.wrap, children: options.map((option) => {
|
|
5759
5815
|
const on = value.includes(option.value);
|
|
5760
|
-
return /* @__PURE__ */
|
|
5816
|
+
return /* @__PURE__ */ jsx69(
|
|
5761
5817
|
Chip,
|
|
5762
5818
|
{
|
|
5763
5819
|
selected: on,
|
|
@@ -5771,15 +5827,15 @@ function TagSelector({ label, options, value, onValueChange, max, countLabel, st
|
|
|
5771
5827
|
option.value
|
|
5772
5828
|
);
|
|
5773
5829
|
}) }),
|
|
5774
|
-
max !== void 0 && countLabel ? /* @__PURE__ */
|
|
5830
|
+
max !== void 0 && countLabel ? /* @__PURE__ */ jsx69(Txt, { variant: "caption", tone: full ? "accent" : "secondary", "aria-live": "polite", children: countLabel(value.length, max) }) : null
|
|
5775
5831
|
] });
|
|
5776
5832
|
}
|
|
5777
|
-
var
|
|
5833
|
+
var styles53 = StyleSheet53.create({ root: { gap: 8 }, wrap: { flexDirection: "row", flexWrap: "wrap", gap: 8 } });
|
|
5778
5834
|
|
|
5779
5835
|
// src/native/toast.tsx
|
|
5780
|
-
import * as
|
|
5781
|
-
import { AccessibilityInfo as AccessibilityInfo15, Animated as Animated27, PanResponder as PanResponder5, Pressable as
|
|
5782
|
-
import { Fragment as
|
|
5836
|
+
import * as React45 from "react";
|
|
5837
|
+
import { AccessibilityInfo as AccessibilityInfo15, Animated as Animated27, PanResponder as PanResponder5, Pressable as Pressable29, StyleSheet as StyleSheet54, Text as Text20, View as View62 } from "react-native";
|
|
5838
|
+
import { Fragment as Fragment11, jsx as jsx70, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
5783
5839
|
var items = [];
|
|
5784
5840
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
5785
5841
|
var counter = 0;
|
|
@@ -5814,8 +5870,8 @@ var toast = Object.assign(show, {
|
|
|
5814
5870
|
function ToastView({ item, closeLabel, duration }) {
|
|
5815
5871
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
5816
5872
|
const reduce = useReducedMotion();
|
|
5817
|
-
const [swipe] =
|
|
5818
|
-
const drag =
|
|
5873
|
+
const [swipe] = React45.useState(() => new Animated27.Value(0));
|
|
5874
|
+
const drag = React45.useMemo(
|
|
5819
5875
|
() => PanResponder5.create({
|
|
5820
5876
|
onMoveShouldSetPanResponder: (_, g) => Math.abs(g.dx) > 8 && Math.abs(g.dx) > Math.abs(g.dy),
|
|
5821
5877
|
onPanResponderMove: (_, g) => swipe.setValue(g.dx),
|
|
@@ -5827,80 +5883,80 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
5827
5883
|
}),
|
|
5828
5884
|
[swipe, item.id]
|
|
5829
5885
|
);
|
|
5830
|
-
|
|
5886
|
+
React45.useEffect(() => {
|
|
5831
5887
|
if (item.tone === "success" || item.tone === "warning") haptic(item.tone);
|
|
5832
5888
|
if (item.tone === "error") haptic("warning");
|
|
5833
5889
|
}, [item.id]);
|
|
5834
|
-
const [enter] =
|
|
5835
|
-
|
|
5890
|
+
const [enter] = React45.useState(() => new Animated27.Value(reduce ? 1 : 0));
|
|
5891
|
+
React45.useEffect(() => {
|
|
5836
5892
|
if (reduce) enter.setValue(1);
|
|
5837
5893
|
else Animated27.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
5838
5894
|
}, [enter, reduce]);
|
|
5839
|
-
|
|
5895
|
+
React45.useEffect(() => {
|
|
5840
5896
|
AccessibilityInfo15.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
5841
5897
|
}, [item.title, item.description]);
|
|
5842
5898
|
const ms = item.duration ?? duration;
|
|
5843
|
-
|
|
5899
|
+
React45.useEffect(() => {
|
|
5844
5900
|
if (!Number.isFinite(ms)) return;
|
|
5845
5901
|
const timer2 = setTimeout(() => dismiss(item.id), ms);
|
|
5846
5902
|
return () => clearTimeout(timer2);
|
|
5847
5903
|
}, [item.id, ms]);
|
|
5848
5904
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
5849
|
-
const text = /* @__PURE__ */
|
|
5850
|
-
item.icon ? /* @__PURE__ */
|
|
5851
|
-
/* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
5853
|
-
item.description ? /* @__PURE__ */
|
|
5905
|
+
const text = /* @__PURE__ */ jsxs61(Fragment11, { children: [
|
|
5906
|
+
item.icon ? /* @__PURE__ */ jsx70(View62, { "aria-hidden": true, children: item.icon }) : null,
|
|
5907
|
+
/* @__PURE__ */ jsxs61(View62, { style: styles54.content, children: [
|
|
5908
|
+
/* @__PURE__ */ jsx70(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
5909
|
+
item.description ? /* @__PURE__ */ jsx70(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
5854
5910
|
] })
|
|
5855
5911
|
] });
|
|
5856
|
-
const body = /* @__PURE__ */
|
|
5857
|
-
item.onPress ? /* @__PURE__ */
|
|
5858
|
-
|
|
5912
|
+
const body = /* @__PURE__ */ jsxs61(Fragment11, { children: [
|
|
5913
|
+
item.onPress ? /* @__PURE__ */ jsx70(
|
|
5914
|
+
Pressable29,
|
|
5859
5915
|
{
|
|
5860
5916
|
role: "button",
|
|
5861
5917
|
onPress: () => {
|
|
5862
5918
|
item.onPress?.();
|
|
5863
5919
|
dismiss(item.id);
|
|
5864
5920
|
},
|
|
5865
|
-
style: ({ pressed }) => [
|
|
5921
|
+
style: ({ pressed }) => [styles54.main, { opacity: pressed ? 0.8 : 1 }],
|
|
5866
5922
|
children: text
|
|
5867
5923
|
}
|
|
5868
|
-
) : /* @__PURE__ */
|
|
5869
|
-
item.action ? /* @__PURE__ */
|
|
5870
|
-
|
|
5924
|
+
) : /* @__PURE__ */ jsx70(View62, { style: styles54.main, children: text }),
|
|
5925
|
+
item.action ? /* @__PURE__ */ jsx70(
|
|
5926
|
+
Pressable29,
|
|
5871
5927
|
{
|
|
5872
5928
|
role: "button",
|
|
5873
5929
|
onPress: () => {
|
|
5874
5930
|
item.action?.onPress();
|
|
5875
5931
|
dismiss(item.id);
|
|
5876
5932
|
},
|
|
5877
|
-
style: [
|
|
5878
|
-
children: /* @__PURE__ */
|
|
5933
|
+
style: [styles54.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
5934
|
+
children: /* @__PURE__ */ jsx70(Text20, { style: [styles54.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
5879
5935
|
}
|
|
5880
5936
|
) : null,
|
|
5881
|
-
/* @__PURE__ */
|
|
5937
|
+
/* @__PURE__ */ jsx70(Pressable29, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles54.close, children: /* @__PURE__ */ jsx70(Text20, { style: [styles54.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
5882
5938
|
] });
|
|
5883
5939
|
const frame = [
|
|
5884
|
-
|
|
5940
|
+
styles54.toast,
|
|
5885
5941
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
5886
5942
|
];
|
|
5887
5943
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }, { translateX: swipe }] };
|
|
5888
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx70(Animated27.View, { "aria-live": "polite", style: motion3, ...drag.panHandlers, children: /* @__PURE__ */ jsx70(View62, { style: frame, children: body }) });
|
|
5889
5945
|
}
|
|
5890
5946
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
5891
|
-
const all =
|
|
5947
|
+
const all = React45.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
5892
5948
|
const shown = all.slice(-max);
|
|
5893
5949
|
if (shown.length === 0) return null;
|
|
5894
|
-
return /* @__PURE__ */
|
|
5950
|
+
return /* @__PURE__ */ jsx70(View62, { pointerEvents: "box-none", style: [styles54.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx70(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
5895
5951
|
}
|
|
5896
|
-
var
|
|
5952
|
+
var styles54 = StyleSheet54.create({
|
|
5897
5953
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
5898
5954
|
toast: {
|
|
5899
5955
|
flexDirection: "row",
|
|
5900
5956
|
alignItems: "center",
|
|
5901
5957
|
gap: 10,
|
|
5902
5958
|
padding: 12,
|
|
5903
|
-
borderWidth:
|
|
5959
|
+
borderWidth: StyleSheet54.hairlineWidth,
|
|
5904
5960
|
borderLeftWidth: 4,
|
|
5905
5961
|
shadowOpacity: 0.3,
|
|
5906
5962
|
shadowRadius: 16,
|
|
@@ -5916,35 +5972,35 @@ var styles53 = StyleSheet53.create({
|
|
|
5916
5972
|
});
|
|
5917
5973
|
|
|
5918
5974
|
// src/native/update-prompt.tsx
|
|
5919
|
-
import { StyleSheet as
|
|
5920
|
-
import { jsx as
|
|
5975
|
+
import { StyleSheet as StyleSheet55, View as View63 } from "react-native";
|
|
5976
|
+
import { jsx as jsx71, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
5921
5977
|
function UpdatePrompt({ title, message, versionLabel, mark, updateLabel, onUpdate, laterLabel, onLater, style }) {
|
|
5922
5978
|
const { theme, radius: radius3 } = useTheme();
|
|
5923
|
-
return /* @__PURE__ */
|
|
5924
|
-
|
|
5979
|
+
return /* @__PURE__ */ jsxs62(
|
|
5980
|
+
View63,
|
|
5925
5981
|
{
|
|
5926
5982
|
role: "region",
|
|
5927
5983
|
"aria-label": title,
|
|
5928
|
-
style: [
|
|
5984
|
+
style: [styles55.root, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle, borderRadius: radius3.xl }, style],
|
|
5929
5985
|
children: [
|
|
5930
|
-
/* @__PURE__ */
|
|
5931
|
-
mark ? /* @__PURE__ */
|
|
5932
|
-
/* @__PURE__ */
|
|
5933
|
-
/* @__PURE__ */
|
|
5934
|
-
message ? /* @__PURE__ */
|
|
5935
|
-
versionLabel ? /* @__PURE__ */
|
|
5986
|
+
/* @__PURE__ */ jsxs62(View63, { style: styles55.head, children: [
|
|
5987
|
+
mark ? /* @__PURE__ */ jsx71(View63, { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: styles55.mark, children: mark }) : null,
|
|
5988
|
+
/* @__PURE__ */ jsxs62(View63, { style: styles55.text, children: [
|
|
5989
|
+
/* @__PURE__ */ jsx71(Txt, { variant: "label", children: title }),
|
|
5990
|
+
message ? /* @__PURE__ */ jsx71(Txt, { tone: "secondary", children: message }) : null,
|
|
5991
|
+
versionLabel ? /* @__PURE__ */ jsx71(Txt, { variant: "mono", tone: "secondary", children: versionLabel }) : null
|
|
5936
5992
|
] })
|
|
5937
5993
|
] }),
|
|
5938
|
-
/* @__PURE__ */
|
|
5939
|
-
/* @__PURE__ */
|
|
5940
|
-
/* @__PURE__ */
|
|
5994
|
+
/* @__PURE__ */ jsxs62(View63, { style: styles55.actions, children: [
|
|
5995
|
+
/* @__PURE__ */ jsx71(Button, { label: laterLabel, variant: "ghost", size: "sm", onPress: onLater }),
|
|
5996
|
+
/* @__PURE__ */ jsx71(Button, { label: updateLabel, variant: "primary", size: "sm", onPress: onUpdate })
|
|
5941
5997
|
] })
|
|
5942
5998
|
]
|
|
5943
5999
|
}
|
|
5944
6000
|
);
|
|
5945
6001
|
}
|
|
5946
|
-
var
|
|
5947
|
-
root: { gap: 12, padding: 16, borderWidth:
|
|
6002
|
+
var styles55 = StyleSheet55.create({
|
|
6003
|
+
root: { gap: 12, padding: 16, borderWidth: StyleSheet55.hairlineWidth },
|
|
5948
6004
|
head: { flexDirection: "row", gap: 12, alignItems: "center" },
|
|
5949
6005
|
mark: { width: 40, height: 40, alignItems: "center", justifyContent: "center" },
|
|
5950
6006
|
text: { flex: 1, gap: 2 },
|
|
@@ -5952,15 +6008,15 @@ var styles54 = StyleSheet54.create({
|
|
|
5952
6008
|
});
|
|
5953
6009
|
|
|
5954
6010
|
// src/native/verified-badge.tsx
|
|
5955
|
-
import { StyleSheet as
|
|
5956
|
-
import
|
|
5957
|
-
import { jsx as
|
|
6011
|
+
import { StyleSheet as StyleSheet56, View as View64 } from "react-native";
|
|
6012
|
+
import Svg32, { Path as Path27 } from "react-native-svg";
|
|
6013
|
+
import { jsx as jsx72, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
5958
6014
|
function VerifiedBadge({ label, showLabel, size = 16, on = "surface" }) {
|
|
5959
6015
|
const { theme } = useTheme();
|
|
5960
|
-
return /* @__PURE__ */
|
|
5961
|
-
/* @__PURE__ */
|
|
5962
|
-
/* @__PURE__ */
|
|
5963
|
-
|
|
6016
|
+
return /* @__PURE__ */ jsxs63(View64, { accessible: true, role: "img", "aria-label": label, style: styles56.row, children: [
|
|
6017
|
+
/* @__PURE__ */ jsxs63(Svg32, { width: size, height: size, viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
6018
|
+
/* @__PURE__ */ jsx72(
|
|
6019
|
+
Path27,
|
|
5964
6020
|
{
|
|
5965
6021
|
d: "M12 2.5l2.4 1.7 2.9-.1.9 2.8 2.3 1.8-.9 2.8.9 2.8-2.3 1.8-.9 2.8-2.9-.1L12 21.5l-2.4-1.7-2.9.1-.9-2.8-2.3-1.8.9-2.8-.9-2.8 2.3-1.8.9-2.8 2.9.1z",
|
|
5966
6022
|
fill: theme.accent,
|
|
@@ -5968,16 +6024,16 @@ function VerifiedBadge({ label, showLabel, size = 16, on = "surface" }) {
|
|
|
5968
6024
|
strokeWidth: 1.2
|
|
5969
6025
|
}
|
|
5970
6026
|
),
|
|
5971
|
-
/* @__PURE__ */
|
|
6027
|
+
/* @__PURE__ */ jsx72(Path27, { d: "M8.3 12.3l2.5 2.5 4.9-5.2", fill: "none", stroke: theme.onAccent, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
5972
6028
|
] }),
|
|
5973
|
-
showLabel ? /* @__PURE__ */
|
|
6029
|
+
showLabel ? /* @__PURE__ */ jsx72(Txt, { variant: "caption", tone: on === "media" ? "onMedia" : "accent", style: styles56.text, children: label }) : null
|
|
5974
6030
|
] });
|
|
5975
6031
|
}
|
|
5976
|
-
var
|
|
6032
|
+
var styles56 = StyleSheet56.create({ row: { flexDirection: "row", alignItems: "center", gap: 4 }, text: { fontWeight: "700" } });
|
|
5977
6033
|
|
|
5978
6034
|
// src/native/waveform.tsx
|
|
5979
|
-
import * as
|
|
5980
|
-
import { Animated as Animated28, AppState as AppState2, Easing as Easing14, StyleSheet as
|
|
6035
|
+
import * as React46 from "react";
|
|
6036
|
+
import { Animated as Animated28, AppState as AppState2, Easing as Easing14, StyleSheet as StyleSheet57, View as View65 } from "react-native";
|
|
5981
6037
|
|
|
5982
6038
|
// src/waveform/bars.ts
|
|
5983
6039
|
function resamplePeaks(peaks, count) {
|
|
@@ -5992,20 +6048,20 @@ function resamplePeaks(peaks, count) {
|
|
|
5992
6048
|
}
|
|
5993
6049
|
|
|
5994
6050
|
// src/native/waveform.tsx
|
|
5995
|
-
import { jsx as
|
|
6051
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5996
6052
|
var HEIGHT = { sm: 24, md: 40, lg: 64 };
|
|
5997
6053
|
function Waveform({ peaks, bars = 32, size = "md", tone: tone3 = "accent", playing = false, label, style, ...props }) {
|
|
5998
6054
|
const { theme } = useTheme();
|
|
5999
6055
|
const reduce = useReducedMotion();
|
|
6000
|
-
const [active, setActive] =
|
|
6001
|
-
|
|
6056
|
+
const [active, setActive] = React46.useState(() => AppState2.currentState === "active");
|
|
6057
|
+
React46.useEffect(() => {
|
|
6002
6058
|
const subscription = AppState2.addEventListener("change", (state) => setActive(state === "active"));
|
|
6003
6059
|
return () => subscription.remove();
|
|
6004
6060
|
}, []);
|
|
6005
|
-
const shape =
|
|
6006
|
-
const values =
|
|
6061
|
+
const shape = React46.useMemo(() => resamplePeaks(peaks ?? [], bars), [peaks, bars]);
|
|
6062
|
+
const values = React46.useMemo(() => shape.map(() => new Animated28.Value(1)), [shape]);
|
|
6007
6063
|
const moving = playing && !reduce && active;
|
|
6008
|
-
|
|
6064
|
+
React46.useEffect(() => {
|
|
6009
6065
|
if (!moving) {
|
|
6010
6066
|
values.forEach((value) => value.setValue(1));
|
|
6011
6067
|
return;
|
|
@@ -6025,8 +6081,8 @@ function Waveform({ peaks, bars = 32, size = "md", tone: tone3 = "accent", playi
|
|
|
6025
6081
|
}, [moving, values]);
|
|
6026
6082
|
const named = label !== void 0;
|
|
6027
6083
|
const barColour = tone3 === "neutral" ? theme.borderStrong : theme.accent;
|
|
6028
|
-
return /* @__PURE__ */
|
|
6029
|
-
|
|
6084
|
+
return /* @__PURE__ */ jsx73(
|
|
6085
|
+
View65,
|
|
6030
6086
|
{
|
|
6031
6087
|
...props,
|
|
6032
6088
|
accessible: named,
|
|
@@ -6034,13 +6090,13 @@ function Waveform({ peaks, bars = 32, size = "md", tone: tone3 = "accent", playi
|
|
|
6034
6090
|
accessibilityLabel: label,
|
|
6035
6091
|
"aria-hidden": named ? void 0 : true,
|
|
6036
6092
|
importantForAccessibility: named ? "yes" : "no-hide-descendants",
|
|
6037
|
-
style: [
|
|
6038
|
-
children: shape.map((peak, i) => /* @__PURE__ */
|
|
6093
|
+
style: [styles57.root, { height: HEIGHT[size] }, style],
|
|
6094
|
+
children: shape.map((peak, i) => /* @__PURE__ */ jsx73(
|
|
6039
6095
|
Animated28.View,
|
|
6040
6096
|
{
|
|
6041
6097
|
testID: "waveform-bar",
|
|
6042
6098
|
style: [
|
|
6043
|
-
|
|
6099
|
+
styles57.bar,
|
|
6044
6100
|
{ height: `${Math.round(peak * 100)}%`, backgroundColor: barColour },
|
|
6045
6101
|
{ transform: [{ scaleY: values[i].interpolate({ inputRange: [0, 1], outputRange: [0.45, 1] }) }] }
|
|
6046
6102
|
]
|
|
@@ -6050,7 +6106,7 @@ function Waveform({ peaks, bars = 32, size = "md", tone: tone3 = "accent", playi
|
|
|
6050
6106
|
}
|
|
6051
6107
|
);
|
|
6052
6108
|
}
|
|
6053
|
-
var
|
|
6109
|
+
var styles57 = StyleSheet57.create({
|
|
6054
6110
|
root: { width: "100%", flexDirection: "row", alignItems: "center", justifyContent: "center", columnGap: 2 },
|
|
6055
6111
|
bar: { flex: 1, minWidth: 2, borderRadius: 9999 }
|
|
6056
6112
|
});
|
|
@@ -6124,6 +6180,8 @@ export {
|
|
|
6124
6180
|
SearchField,
|
|
6125
6181
|
Segmented,
|
|
6126
6182
|
Select,
|
|
6183
|
+
SettingsGroup,
|
|
6184
|
+
SettingsRow,
|
|
6127
6185
|
Sheet,
|
|
6128
6186
|
Showcase,
|
|
6129
6187
|
Skeleton,
|