@krizaka/ui 3.12.0 → 3.14.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 +4 -3
- package/dist/avatar.d.ts +1 -1
- package/dist/avatar.js +3 -2
- package/dist/avatar.js.map +1 -1
- package/dist/chat.js +1 -1
- package/dist/{chunk-R6ZS4FMV.js → chunk-2JFARUKC.js} +1 -1
- package/dist/chunk-2JFARUKC.js.map +1 -0
- package/dist/{chunk-OT6HX3PN.js → chunk-COJ3IDE2.js} +5 -2
- package/dist/chunk-COJ3IDE2.js.map +1 -0
- package/dist/{chunk-HG65YAV4.js → chunk-GR5JNFGQ.js} +110 -32
- package/dist/chunk-GR5JNFGQ.js.map +1 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +3 -1
- package/dist/map.js +30 -0
- package/dist/map.js.map +1 -1
- package/dist/match-dialog.js +1 -1
- package/dist/native/map.js +30 -0
- package/dist/native/map.js.map +1 -1
- package/dist/native.d.ts +11 -3
- package/dist/native.js +531 -444
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +1 -1
- package/dist/nav-bar.js +4 -4
- package/dist/nav-bar.js.map +1 -1
- package/dist/site-footer.d.ts +9 -2
- package/dist/site-footer.js +14 -4
- package/dist/site-footer.js.map +1 -1
- package/dist/{sites-CgJrxejx.d.ts → sites-ClGou6ou.d.ts} +1 -1
- package/dist/sites.d.ts +2 -2
- package/dist/sites.js +3 -0
- package/dist/sites.js.map +1 -1
- package/dist/vertical-video.js +1 -1
- package/package.json +6 -5
- package/registry/avatar.json +1 -1
- package/registry/examples/site-footer/product.js +26 -12
- package/registry/examples/site-footer/product.tsx +15 -2
- package/registry/index.json +6 -6
- package/registry/map.json +1 -1
- package/registry/nav-bar.json +11 -3
- package/registry/site-footer.json +34 -11
- package/registry/sites.json +1 -1
- package/dist/chunk-HG65YAV4.js.map +0 -1
- package/dist/chunk-OT6HX3PN.js.map +0 -1
- package/dist/chunk-R6ZS4FMV.js.map +0 -1
package/dist/native.js
CHANGED
|
@@ -345,6 +345,16 @@ var marks = /* @__PURE__ */ Object.freeze({
|
|
|
345
345
|
"100%",
|
|
346
346
|
"#5d894d"
|
|
347
347
|
]
|
|
348
|
+
],
|
|
349
|
+
"yomizaka": [
|
|
350
|
+
[
|
|
351
|
+
"0%",
|
|
352
|
+
"#5362c6"
|
|
353
|
+
],
|
|
354
|
+
[
|
|
355
|
+
"100%",
|
|
356
|
+
"#6d5ec9"
|
|
357
|
+
]
|
|
348
358
|
]
|
|
349
359
|
});
|
|
350
360
|
|
|
@@ -2814,8 +2824,8 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
2814
2824
|
|
|
2815
2825
|
// src/native/loader.tsx
|
|
2816
2826
|
import * as React22 from "react";
|
|
2817
|
-
import { AccessibilityInfo as AccessibilityInfo7, Animated as Animated11, Easing as Easing5, StyleSheet as StyleSheet24, View as
|
|
2818
|
-
import
|
|
2827
|
+
import { AccessibilityInfo as AccessibilityInfo7, Animated as Animated11, Easing as Easing5, StyleSheet as StyleSheet24, View as View27 } from "react-native";
|
|
2828
|
+
import Svg14, { Circle as Circle8, Path as Path12 } from "react-native-svg";
|
|
2819
2829
|
|
|
2820
2830
|
// src/native/OrazakaMark.tsx
|
|
2821
2831
|
import { View as View22 } from "react-native";
|
|
@@ -3052,10 +3062,85 @@ function YasakiaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
3052
3062
|
}
|
|
3053
3063
|
var YazakiaMark = YasakiaMark;
|
|
3054
3064
|
|
|
3055
|
-
// src/native/
|
|
3065
|
+
// src/native/YomizakaMark.tsx
|
|
3056
3066
|
import { View as View25 } from "react-native";
|
|
3057
3067
|
import Svg12, { Circle as Circle6, Defs as Defs7, LinearGradient as LinearGradient7, Path as Path10, RadialGradient as RadialGradient5, Stop as Stop7 } from "react-native-svg";
|
|
3058
3068
|
|
|
3069
|
+
// src/marks/yomizaka-geometry.ts
|
|
3070
|
+
var indigo = marks.yomizaka[marks.yomizaka.length - 1][1];
|
|
3071
|
+
var YOMIZAKA = {
|
|
3072
|
+
viewBox: "0 0 400 400",
|
|
3073
|
+
croppedViewBox: "80 80 240 240",
|
|
3074
|
+
center: 200,
|
|
3075
|
+
/** The page, cut at its corner (the Krizaka chamfer) and around the lens. */
|
|
3076
|
+
page: "M128 92 H228 L264 128 V185.87 A52 52 0 1 0 264 278.13 V300 H128 Z",
|
|
3077
|
+
/** Three lines of text and the start of a fourth, in light: they wrap around the lens. */
|
|
3078
|
+
lines: "M156 140 H226 M156 170 H236 M156 200 H184 M156 230 H176",
|
|
3079
|
+
line: { color: "#f4f5ff", opacity: 0.6, width: 10 },
|
|
3080
|
+
/** The lens: a ring in the brand gradient, its pale core lit from above, a glint; the handle leaves the page. */
|
|
3081
|
+
lens: { cx: 240, cy: 232, r: 40, width: 12, core: 28, glint: { cx: 230, cy: 222, r: 8 } },
|
|
3082
|
+
handle: "M276 268 L304 296",
|
|
3083
|
+
handleWidth: 20,
|
|
3084
|
+
gradient: { x1: 128, y1: 300, x2: 304, y2: 92, stops: marks.yomizaka },
|
|
3085
|
+
/** The lens' core: a pale indigo light, brighter at the top. */
|
|
3086
|
+
coreGradient: { stops: [["0%", "#c9ceff"], ["100%", "#f4f5ff"]] },
|
|
3087
|
+
highlight: "#ffffff",
|
|
3088
|
+
/** The reading (web): a line of light that scans the page from top to bottom, clipped to the page. */
|
|
3089
|
+
scan: { d: "M136 100 H236", travel: 192, color: "#f4f5ff", opacity: 0.7, width: 3 },
|
|
3090
|
+
/** A page: one node on the orbit, that turns with it. */
|
|
3091
|
+
node: { r: 9, at: [200, 40] },
|
|
3092
|
+
glow: { color: indigo, opacity: 0.18 },
|
|
3093
|
+
/** The lens' breathing shadow (web), in the indigo. */
|
|
3094
|
+
pulse: { color: indigo, low: 0.3, high: 0.6 },
|
|
3095
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
3096
|
+
ring: { r: 134, width: 1 }
|
|
3097
|
+
};
|
|
3098
|
+
|
|
3099
|
+
// src/native/YomizakaMark.tsx
|
|
3100
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3101
|
+
function YomizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
3102
|
+
const { theme } = useTheme();
|
|
3103
|
+
const { Animated: Animated28, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated, 32e3);
|
|
3104
|
+
const id = useSvgId("ymm");
|
|
3105
|
+
const viewBox = size < 48 ? YOMIZAKA.croppedViewBox : YOMIZAKA.viewBox;
|
|
3106
|
+
const stroke = neutral ?? theme.textMuted;
|
|
3107
|
+
const gradient = /* @__PURE__ */ jsx29(LinearGradient7, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: YOMIZAKA.gradient.x1, y1: YOMIZAKA.gradient.y1, x2: YOMIZAKA.gradient.x2, y2: YOMIZAKA.gradient.y2, children: YOMIZAKA.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx29(Stop7, { offset, stopColor: color }, offset)) });
|
|
3108
|
+
const fill = `url(#${id}a)`;
|
|
3109
|
+
return /* @__PURE__ */ jsxs26(View25, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
3110
|
+
/* @__PURE__ */ jsxs26(Svg12, { viewBox, style: layer, children: [
|
|
3111
|
+
/* @__PURE__ */ jsxs26(Defs7, { children: [
|
|
3112
|
+
/* @__PURE__ */ jsxs26(RadialGradient5, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
3113
|
+
/* @__PURE__ */ jsx29(Stop7, { offset: "0%", stopColor: YOMIZAKA.glow.color, stopOpacity: YOMIZAKA.glow.opacity }),
|
|
3114
|
+
/* @__PURE__ */ jsx29(Stop7, { offset: "100%", stopColor: YOMIZAKA.glow.color, stopOpacity: 0 })
|
|
3115
|
+
] }),
|
|
3116
|
+
gradient
|
|
3117
|
+
] }),
|
|
3118
|
+
size >= 48 ? /* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.center, cy: YOMIZAKA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
3119
|
+
/* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.center, cy: YOMIZAKA.center, r: YOMIZAKA.ring.r, stroke, strokeWidth: YOMIZAKA.ring.width, opacity: 0.35, fill: "none" }),
|
|
3120
|
+
/* @__PURE__ */ jsx29(Path10, { d: YOMIZAKA.page, fill }),
|
|
3121
|
+
/* @__PURE__ */ jsx29(Path10, { d: YOMIZAKA.lines, stroke: YOMIZAKA.line.color, strokeOpacity: YOMIZAKA.line.opacity, strokeWidth: YOMIZAKA.line.width, strokeLinecap: "round", fill: "none" }),
|
|
3122
|
+
/* @__PURE__ */ jsx29(Path10, { d: YOMIZAKA.handle, stroke: fill, strokeWidth: YOMIZAKA.handleWidth, strokeLinecap: "round", fill: "none" })
|
|
3123
|
+
] }),
|
|
3124
|
+
/* @__PURE__ */ jsx29(Animated28.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs26(Svg12, { viewBox, style: layer, children: [
|
|
3125
|
+
/* @__PURE__ */ jsx29(Defs7, { children: gradient }),
|
|
3126
|
+
/* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.center, cy: YOMIZAKA.center, r: YOMIZAKA.orbit.r, stroke, strokeWidth: YOMIZAKA.orbit.width, strokeDasharray: YOMIZAKA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
3127
|
+
/* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.node.at[0], cy: YOMIZAKA.node.at[1], r: YOMIZAKA.node.r, fill })
|
|
3128
|
+
] }) }),
|
|
3129
|
+
/* @__PURE__ */ jsx29(Animated28.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs26(Svg12, { viewBox, style: layer, children: [
|
|
3130
|
+
/* @__PURE__ */ jsxs26(Defs7, { children: [
|
|
3131
|
+
gradient,
|
|
3132
|
+
/* @__PURE__ */ jsx29(LinearGradient7, { id: `${id}c`, x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: YOMIZAKA.coreGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx29(Stop7, { offset, stopColor: color }, offset)) })
|
|
3133
|
+
] }),
|
|
3134
|
+
/* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.lens.cx, cy: YOMIZAKA.lens.cy, r: YOMIZAKA.lens.r, stroke: fill, strokeWidth: YOMIZAKA.lens.width, fill: `url(#${id}c)` }),
|
|
3135
|
+
/* @__PURE__ */ jsx29(Circle6, { cx: YOMIZAKA.lens.glint.cx, cy: YOMIZAKA.lens.glint.cy, r: YOMIZAKA.lens.glint.r, fill: YOMIZAKA.highlight })
|
|
3136
|
+
] }) })
|
|
3137
|
+
] });
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
// src/native/YororisMark.tsx
|
|
3141
|
+
import { View as View26 } from "react-native";
|
|
3142
|
+
import Svg13, { Circle as Circle7, Defs as Defs8, LinearGradient as LinearGradient8, Path as Path11, RadialGradient as RadialGradient6, Stop as Stop8 } from "react-native-svg";
|
|
3143
|
+
|
|
3059
3144
|
// src/marks/yororis-geometry.ts
|
|
3060
3145
|
var sand = marks.yororis[0][1];
|
|
3061
3146
|
var sage = marks.yororis[marks.yororis.length - 1][1];
|
|
@@ -3090,55 +3175,56 @@ var YORORIS = {
|
|
|
3090
3175
|
};
|
|
3091
3176
|
|
|
3092
3177
|
// src/native/YororisMark.tsx
|
|
3093
|
-
import { jsx as
|
|
3178
|
+
import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3094
3179
|
function YororisMark({ size = 48, animated = true, title, neutral }) {
|
|
3095
3180
|
const { theme } = useTheme();
|
|
3096
3181
|
const { Animated: Animated28, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated, 36e3);
|
|
3097
3182
|
const id = useSvgId("yrm");
|
|
3098
3183
|
const viewBox = size < 48 ? YORORIS.croppedViewBox : YORORIS.viewBox;
|
|
3099
3184
|
const stroke = neutral ?? theme.textMuted;
|
|
3100
|
-
const gradient = /* @__PURE__ */
|
|
3185
|
+
const gradient = /* @__PURE__ */ jsx30(LinearGradient8, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: YORORIS.gradient.x1, y1: YORORIS.gradient.y1, x2: YORORIS.gradient.x2, y2: YORORIS.gradient.y2, children: YORORIS.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx30(Stop8, { offset, stopColor: color }, offset)) });
|
|
3101
3186
|
const fill = `url(#${id}a)`;
|
|
3102
|
-
return /* @__PURE__ */
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
/* @__PURE__ */
|
|
3105
|
-
/* @__PURE__ */
|
|
3106
|
-
/* @__PURE__ */
|
|
3107
|
-
/* @__PURE__ */
|
|
3187
|
+
return /* @__PURE__ */ jsxs27(View26, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
3188
|
+
/* @__PURE__ */ jsxs27(Svg13, { viewBox, style: layer, children: [
|
|
3189
|
+
/* @__PURE__ */ jsxs27(Defs8, { children: [
|
|
3190
|
+
/* @__PURE__ */ jsxs27(RadialGradient6, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
3191
|
+
/* @__PURE__ */ jsx30(Stop8, { offset: "0%", stopColor: YORORIS.glow.color, stopOpacity: YORORIS.glow.opacity }),
|
|
3192
|
+
/* @__PURE__ */ jsx30(Stop8, { offset: "100%", stopColor: YORORIS.glow.color, stopOpacity: 0 })
|
|
3108
3193
|
] }),
|
|
3109
3194
|
gradient
|
|
3110
3195
|
] }),
|
|
3111
|
-
size >= 48 ? /* @__PURE__ */
|
|
3112
|
-
/* @__PURE__ */
|
|
3113
|
-
/* @__PURE__ */
|
|
3114
|
-
YORORIS.leaves.map((d) => /* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3196
|
+
size >= 48 ? /* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.center, cy: YORORIS.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
3197
|
+
/* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.center, cy: YORORIS.center, r: YORORIS.ring.r, stroke, strokeWidth: YORORIS.ring.width, opacity: 0.35, fill: "none" }),
|
|
3198
|
+
/* @__PURE__ */ jsx30(Path11, { d: YORORIS.stem, stroke: fill, strokeWidth: YORORIS.stroke, strokeLinecap: "round", fill: "none" }),
|
|
3199
|
+
YORORIS.leaves.map((d) => /* @__PURE__ */ jsx30(Path11, { d, fill }, d)),
|
|
3200
|
+
/* @__PURE__ */ jsx30(Path11, { d: YORORIS.veins, stroke: YORORIS.vein.color, strokeOpacity: YORORIS.vein.opacity, strokeWidth: YORORIS.vein.width, strokeLinecap: "round", strokeDasharray: YORORIS.vein.dash, fill: "none" })
|
|
3116
3201
|
] }),
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
/* @__PURE__ */
|
|
3202
|
+
/* @__PURE__ */ jsx30(Animated28.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs27(Svg13, { viewBox, style: layer, children: [
|
|
3203
|
+
/* @__PURE__ */ jsx30(Defs8, { children: gradient }),
|
|
3204
|
+
/* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.center, cy: YORORIS.center, r: YORORIS.orbit.r, stroke, strokeWidth: YORORIS.orbit.width, strokeDasharray: YORORIS.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
3205
|
+
/* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.moment.at[0], cy: YORORIS.moment.at[1], r: YORORIS.moment.r, fill })
|
|
3121
3206
|
] }) }),
|
|
3122
|
-
/* @__PURE__ */
|
|
3123
|
-
/* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */
|
|
3125
|
-
/* @__PURE__ */
|
|
3207
|
+
/* @__PURE__ */ jsx30(Animated28.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs27(Svg13, { viewBox, style: layer, children: [
|
|
3208
|
+
/* @__PURE__ */ jsx30(Defs8, { children: /* @__PURE__ */ jsx30(LinearGradient8, { id: `${id}c`, x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: YORORIS.coreGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx30(Stop8, { offset, stopColor: color }, offset)) }) }),
|
|
3209
|
+
/* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.core.cx, cy: YORORIS.core.cy, r: YORORIS.core.r, fill: `url(#${id}c)` }),
|
|
3210
|
+
/* @__PURE__ */ jsx30(Circle7, { cx: YORORIS.core.cx, cy: YORORIS.core.cy, r: YORORIS.core.inner, fill: YORORIS.highlight })
|
|
3126
3211
|
] }) })
|
|
3127
3212
|
] });
|
|
3128
3213
|
}
|
|
3129
3214
|
|
|
3130
3215
|
// src/native/ProductMark.tsx
|
|
3131
|
-
import { jsx as
|
|
3216
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
3132
3217
|
function ProductMark({ id, ...props }) {
|
|
3133
|
-
if (id === "krizaka") return /* @__PURE__ */
|
|
3134
|
-
if (id === "orazaka") return /* @__PURE__ */
|
|
3135
|
-
if (id === "yasakia" || id === "yazakia") return /* @__PURE__ */
|
|
3136
|
-
if (id === "yororis") return /* @__PURE__ */
|
|
3137
|
-
return /* @__PURE__ */
|
|
3218
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx31(KrizakaMark, { ...props });
|
|
3219
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx31(OrazakaMark, { ...props });
|
|
3220
|
+
if (id === "yasakia" || id === "yazakia") return /* @__PURE__ */ jsx31(YasakiaMark, { ...props });
|
|
3221
|
+
if (id === "yororis") return /* @__PURE__ */ jsx31(YororisMark, { ...props });
|
|
3222
|
+
if (id === "yomizaka") return /* @__PURE__ */ jsx31(YomizakaMark, { ...props });
|
|
3223
|
+
return /* @__PURE__ */ jsx31(OrochiaMark, { ...props });
|
|
3138
3224
|
}
|
|
3139
3225
|
|
|
3140
3226
|
// src/native/loader.tsx
|
|
3141
|
-
import { jsx as
|
|
3227
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3142
3228
|
var HEX = "M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z";
|
|
3143
3229
|
var PERIMETER = 54;
|
|
3144
3230
|
function LoaderGlyph({ state = "loading", value, size = 20, color }) {
|
|
@@ -3155,12 +3241,12 @@ function LoaderGlyph({ state = "loading", value, size = 20, color }) {
|
|
|
3155
3241
|
const stroke = color ?? (state === "success" ? theme.success : state === "error" ? theme.danger : theme.accent);
|
|
3156
3242
|
const fill = state !== "loading" ? 1 : known ? Math.min(1, Math.max(0, value)) : 0.3;
|
|
3157
3243
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
3158
|
-
return /* @__PURE__ */
|
|
3159
|
-
/* @__PURE__ */
|
|
3160
|
-
/* @__PURE__ */
|
|
3161
|
-
state === "loading" ? /* @__PURE__ */
|
|
3162
|
-
state === "success" ? /* @__PURE__ */
|
|
3163
|
-
state === "error" ? /* @__PURE__ */
|
|
3244
|
+
return /* @__PURE__ */ jsx32(Animated11.View, { "aria-hidden": true, style: { width: size, height: size, transform: state === "loading" && !known ? [{ rotate }] : [] }, children: /* @__PURE__ */ jsxs28(Svg14, { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
|
|
3245
|
+
/* @__PURE__ */ jsx32(Path12, { d: HEX, stroke, strokeOpacity: 0.22, strokeWidth: 2.2, strokeLinejoin: "round" }),
|
|
3246
|
+
/* @__PURE__ */ jsx32(Path12, { d: HEX, stroke, strokeWidth: 2.2, strokeLinejoin: "round", strokeLinecap: "round", strokeDasharray: `${fill * PERIMETER} ${PERIMETER}` }),
|
|
3247
|
+
state === "loading" ? /* @__PURE__ */ jsx32(Circle8, { cx: 12, cy: 12, r: 2.6, fill: stroke }) : null,
|
|
3248
|
+
state === "success" ? /* @__PURE__ */ jsx32(Path12, { d: "M8.3 12.3l2.6 2.6 4.9-5.3", stroke, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round" }) : null,
|
|
3249
|
+
state === "error" ? /* @__PURE__ */ jsx32(Path12, { d: "M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2", stroke, strokeWidth: 2.2, strokeLinecap: "round" }) : null
|
|
3164
3250
|
] }) });
|
|
3165
3251
|
}
|
|
3166
3252
|
function useDelayedWait(active, delay = 250, minDuration = 600) {
|
|
@@ -3212,17 +3298,17 @@ function Loader({ label, status = "loading", successLabel, errorLabel, value, et
|
|
|
3212
3298
|
const known = phase === "loading" && typeof value === "number" && Number.isFinite(value);
|
|
3213
3299
|
const detail = phase === "loading" ? [known ? `${Math.round(Math.min(1, Math.max(0, value)) * 100)} %` : null, eta].filter(Boolean).join(" \xB7 ") : "";
|
|
3214
3300
|
const stacked = variant !== "inline";
|
|
3215
|
-
const box = /* @__PURE__ */
|
|
3216
|
-
product && phase === "loading" ? /* @__PURE__ */
|
|
3217
|
-
/* @__PURE__ */
|
|
3218
|
-
/* @__PURE__ */
|
|
3219
|
-
detail ? /* @__PURE__ */
|
|
3301
|
+
const box = /* @__PURE__ */ jsxs28(View27, { style: [stacked ? styles24.stacked : styles24.inline, variant === "overlay" ? { backgroundColor: alpha(theme.surface1, 0.92), borderColor: theme.borderDefault, borderRadius: radius3.lg, ...styles24.card } : null], children: [
|
|
3302
|
+
product && phase === "loading" ? /* @__PURE__ */ jsx32(ProductMark, { id: product, size: GLYPH[variant], animated: true }) : /* @__PURE__ */ jsx32(LoaderGlyph, { state: phase, value: known ? value : null, size: GLYPH[variant] }),
|
|
3303
|
+
/* @__PURE__ */ jsxs28(View27, { style: stacked ? styles24.center : styles24.text, children: [
|
|
3304
|
+
/* @__PURE__ */ jsx32(Txt, { variant: variant === "page" ? "title" : "label", style: stacked ? styles24.centered : null, children: words2 }),
|
|
3305
|
+
detail ? /* @__PURE__ */ jsx32(Txt, { variant: "caption", tone: "secondary", style: stacked ? styles24.centered : null, children: detail }) : null
|
|
3220
3306
|
] })
|
|
3221
3307
|
] });
|
|
3222
3308
|
const a11y = { accessible: true, role: "progressbar", "aria-label": words2, "aria-busy": phase === "loading", accessibilityLiveRegion: "polite" };
|
|
3223
3309
|
if (variant === "overlay" || variant === "page")
|
|
3224
|
-
return /* @__PURE__ */
|
|
3225
|
-
return /* @__PURE__ */
|
|
3310
|
+
return /* @__PURE__ */ jsx32(View27, { ...a11y, style: [StyleSheet24.absoluteFill, styles24.cover, variant === "page" ? { backgroundColor: alpha(theme.surface0, 0.86) } : null, style], children: box });
|
|
3311
|
+
return /* @__PURE__ */ jsx32(View27, { ...a11y, style: [variant === "block" ? styles24.block : null, style], children: box });
|
|
3226
3312
|
}
|
|
3227
3313
|
var styles24 = StyleSheet24.create({
|
|
3228
3314
|
inline: { flexDirection: "row", alignItems: "center", gap: 10 },
|
|
@@ -3237,12 +3323,12 @@ var styles24 = StyleSheet24.create({
|
|
|
3237
3323
|
|
|
3238
3324
|
// src/native/mascot-state.tsx
|
|
3239
3325
|
import * as React24 from "react";
|
|
3240
|
-
import { AccessibilityInfo as AccessibilityInfo9, Animated as Animated13, Easing as Easing7, StyleSheet as StyleSheet25, View as
|
|
3326
|
+
import { AccessibilityInfo as AccessibilityInfo9, Animated as Animated13, Easing as Easing7, StyleSheet as StyleSheet25, View as View29 } from "react-native";
|
|
3241
3327
|
|
|
3242
3328
|
// src/native/mascots.tsx
|
|
3243
3329
|
import { useEffect as useEffect14, useState as useState22 } from "react";
|
|
3244
|
-
import { AccessibilityInfo as AccessibilityInfo8, Animated as Animated12, Easing as Easing6, View as
|
|
3245
|
-
import
|
|
3330
|
+
import { AccessibilityInfo as AccessibilityInfo8, Animated as Animated12, Easing as Easing6, View as View28 } from "react-native";
|
|
3331
|
+
import Svg15, { Circle as Circle9, Defs as Defs9, Ellipse as Ellipse2, G, LinearGradient as LinearGradient9, Path as Path13, Rect as Rect2, Stop as Stop9 } from "react-native-svg";
|
|
3246
3332
|
|
|
3247
3333
|
// src/mascots/geometry.ts
|
|
3248
3334
|
var mirror = (d) => d.replace(/(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/g, (_, x, y) => `${120 - Number(x)} ${y}`);
|
|
@@ -3400,7 +3486,7 @@ var SHADE = "#000000";
|
|
|
3400
3486
|
var PARCEL = ["#f59e0b", "#d97706", "#b45309"];
|
|
3401
3487
|
|
|
3402
3488
|
// src/native/mascots.tsx
|
|
3403
|
-
import { jsx as
|
|
3489
|
+
import { jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3404
3490
|
function useBob(animated) {
|
|
3405
3491
|
const [y] = useState22(() => new Animated12.Value(0));
|
|
3406
3492
|
useEffect14(() => {
|
|
@@ -3434,52 +3520,52 @@ function Mascot({ bird = "owl", mood = "welcome", tone: tone3 = "brand", size =
|
|
|
3434
3520
|
const look3 = mood === "thinking" ? 1.4 : 0;
|
|
3435
3521
|
const rot = (deg, [x, y]) => `rotate(${deg} ${x} ${y})`;
|
|
3436
3522
|
const [wl, wr] = g.wings;
|
|
3437
|
-
return /* @__PURE__ */
|
|
3438
|
-
/* @__PURE__ */
|
|
3439
|
-
/* @__PURE__ */
|
|
3440
|
-
/* @__PURE__ */
|
|
3523
|
+
return /* @__PURE__ */ jsx33(View28, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx33(Animated12.View, { style: { transform: [{ translateY: bob }] }, children: /* @__PURE__ */ jsxs29(Svg15, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
3524
|
+
/* @__PURE__ */ jsx33(Defs9, { children: /* @__PURE__ */ jsxs29(LinearGradient9, { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
3525
|
+
/* @__PURE__ */ jsx33(Stop9, { offset: "0%", stopColor: p.from }),
|
|
3526
|
+
/* @__PURE__ */ jsx33(Stop9, { offset: "100%", stopColor: p.to })
|
|
3441
3527
|
] }) }),
|
|
3442
|
-
/* @__PURE__ */
|
|
3443
|
-
mood === "empty" && /* @__PURE__ */
|
|
3444
|
-
g.legs.map((d) => /* @__PURE__ */
|
|
3445
|
-
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */
|
|
3446
|
-
g.parcel?.map((d, i) => /* @__PURE__ */
|
|
3447
|
-
/* @__PURE__ */
|
|
3448
|
-
/* @__PURE__ */
|
|
3528
|
+
/* @__PURE__ */ jsx33(Ellipse2, { cx: g.shadow[0], cy: g.shadow[1], rx: g.shadow[2], ry: g.shadow[3], fill: SHADE, opacity: 0.14 }),
|
|
3529
|
+
mood === "empty" && /* @__PURE__ */ jsx33(Path13, { d: MOOD_PARTS.tray, stroke: outline, strokeWidth: 1.6, strokeDasharray: "3 3", fill: "none" }),
|
|
3530
|
+
g.legs.map((d) => /* @__PURE__ */ jsx33(Path13, { d, stroke: p.beak, strokeWidth: 2.6, strokeLinecap: "round", fill: "none" }, d)),
|
|
3531
|
+
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */ jsx33(Path13, { d, fill: p.detail, ...line }, d) : /* @__PURE__ */ jsx33(Path13, { d, stroke: outline, strokeWidth: 1.4, fill: "none" }, d)),
|
|
3532
|
+
g.parcel?.map((d, i) => /* @__PURE__ */ jsx33(Path13, { d, fill: PARCEL[i], ...line }, d)),
|
|
3533
|
+
/* @__PURE__ */ jsx33(Path13, { d: g.body, fill: body, ...line }),
|
|
3534
|
+
/* @__PURE__ */ jsx33(Path13, { d: g.belly, fill: LIGHT, opacity: 0.28 }),
|
|
3449
3535
|
[wl, wr].map((w, i) => {
|
|
3450
3536
|
const turn = mood === "success" ? i === 0 ? 28 : -28 : mood === "welcome" && i === 1 ? -20 : 0;
|
|
3451
|
-
return /* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3537
|
+
return /* @__PURE__ */ jsxs29(G, { transform: turn ? rot(turn, w.pivot) : void 0, children: [
|
|
3538
|
+
/* @__PURE__ */ jsx33(Path13, { d: w.d, fill: p.wing, ...line }),
|
|
3539
|
+
/* @__PURE__ */ jsx33(Path13, { d: w.d, fill: SHADE, opacity: 0.16 })
|
|
3454
3540
|
] }, i);
|
|
3455
3541
|
}),
|
|
3456
|
-
g.neck && /* @__PURE__ */
|
|
3457
|
-
g.head.r > 0 && /* @__PURE__ */
|
|
3458
|
-
g.details.map((d) => /* @__PURE__ */
|
|
3459
|
-
g.visor && /* @__PURE__ */
|
|
3542
|
+
g.neck && /* @__PURE__ */ jsx33(Path13, { d: g.neck.d, stroke: body, strokeWidth: g.neck.width, strokeLinecap: "round", fill: "none" }),
|
|
3543
|
+
g.head.r > 0 && /* @__PURE__ */ jsx33(Circle9, { cx: g.head.cx, cy: g.head.cy, r: g.head.r, fill: body, ...line }),
|
|
3544
|
+
g.details.map((d) => /* @__PURE__ */ jsx33(Path13, { d, fill: p.detail, ...line }, d)),
|
|
3545
|
+
g.visor && /* @__PURE__ */ jsx33(Rect2, { x: g.visor.x, y: g.visor.y, width: g.visor.w, height: g.visor.h, rx: 4, fill: theme.surface0, ...line }),
|
|
3460
3546
|
g.eyes.at.map(
|
|
3461
|
-
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3465
|
-
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */
|
|
3466
|
-
g.eyes.white > 0 && /* @__PURE__ */
|
|
3467
|
-
/* @__PURE__ */
|
|
3547
|
+
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */ jsxs29(G, { children: [
|
|
3548
|
+
/* @__PURE__ */ jsx33(Circle9, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
3549
|
+
/* @__PURE__ */ jsx33(Circle9, { cx: at[0], cy: at[1] + g.eyes.pupil * 0.7, r: g.eyes.pupil, fill: SHADE }),
|
|
3550
|
+
/* @__PURE__ */ jsx33(Path13, { d: upperLid(at, g.eyes.white), fill: p.detail, ...line })
|
|
3551
|
+
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */ jsx33(Path13, { d: mood === "success" ? archEye(at, eyeR * 0.85) : lidEye(at, eyeR * 0.8), stroke: g.visor ? p.eye : outline, strokeWidth: 2.2, strokeLinecap: "round", fill: "none" }, i) : /* @__PURE__ */ jsxs29(G, { children: [
|
|
3552
|
+
g.eyes.white > 0 && /* @__PURE__ */ jsx33(Circle9, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
3553
|
+
/* @__PURE__ */ jsx33(Circle9, { cx: at[0] + look3, cy: at[1] - look3, r: g.eyes.pupil, fill: g.visor ? p.eye : SHADE })
|
|
3468
3554
|
] }, i)
|
|
3469
3555
|
),
|
|
3470
|
-
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */
|
|
3471
|
-
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */
|
|
3472
|
-
/* @__PURE__ */
|
|
3473
|
-
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */
|
|
3474
|
-
(mood === "success" || mood === "error") && /* @__PURE__ */
|
|
3475
|
-
mood === "success" && /* @__PURE__ */
|
|
3476
|
-
mood === "error" && /* @__PURE__ */
|
|
3477
|
-
mood === "error" && /* @__PURE__ */
|
|
3556
|
+
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */ jsx33(Circle9, { cx: x, cy: y, r: 6.5, fill: "none", stroke: outline, strokeWidth: 1.3 }, x)),
|
|
3557
|
+
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */ jsx33(Path13, { d: brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1), stroke: outline, strokeWidth: 2, strokeLinecap: "round" }, i)),
|
|
3558
|
+
/* @__PURE__ */ jsx33(Path13, { d: g.beak, fill: p.beak, ...line }),
|
|
3559
|
+
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */ jsx33(Circle9, { cx, cy, r, fill: theme.textSecondary, opacity: 0.5 + i * 0.25 }, cx)),
|
|
3560
|
+
(mood === "success" || mood === "error") && /* @__PURE__ */ jsx33(Circle9, { cx: MOOD_PARTS.badge.cx, cy: MOOD_PARTS.badge.cy, r: MOOD_PARTS.badge.r, fill: mood === "success" ? theme.success : theme.danger }),
|
|
3561
|
+
mood === "success" && /* @__PURE__ */ jsx33(Path13, { d: MOOD_PARTS.check, stroke: theme.surface0, strokeWidth: 2.6, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }),
|
|
3562
|
+
mood === "error" && /* @__PURE__ */ jsx33(Path13, { d: MOOD_PARTS.bang.line, stroke: theme.surface0, strokeWidth: 2.8, strokeLinecap: "round" }),
|
|
3563
|
+
mood === "error" && /* @__PURE__ */ jsx33(Circle9, { cx: MOOD_PARTS.bang.dot[0], cy: MOOD_PARTS.bang.dot[1], r: 1.6, fill: theme.surface0 })
|
|
3478
3564
|
] }) }) });
|
|
3479
3565
|
}
|
|
3480
3566
|
|
|
3481
3567
|
// src/native/mascot-state.tsx
|
|
3482
|
-
import { jsx as
|
|
3568
|
+
import { jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3483
3569
|
var SIZE = { sm: 64, md: 96, lg: 128 };
|
|
3484
3570
|
function useArrival(animated) {
|
|
3485
3571
|
const [value] = React24.useState(() => new Animated13.Value(animated ? 0 : 1));
|
|
@@ -3500,7 +3586,7 @@ function useArrival(animated) {
|
|
|
3500
3586
|
function MascotState({ bird = "owl", mood = "empty", title, description, action, size = "md", layout = "stacked", tone: tone3, animated = true, style, ...props }) {
|
|
3501
3587
|
const opacity = useArrival(animated);
|
|
3502
3588
|
const inline = layout === "inline";
|
|
3503
|
-
return /* @__PURE__ */
|
|
3589
|
+
return /* @__PURE__ */ jsxs30(
|
|
3504
3590
|
Animated13.View,
|
|
3505
3591
|
{
|
|
3506
3592
|
role: mood === "error" ? "alert" : "status",
|
|
@@ -3509,20 +3595,20 @@ function MascotState({ bird = "owl", mood = "empty", title, description, action,
|
|
|
3509
3595
|
...props,
|
|
3510
3596
|
style: [inline ? styles25.inline : styles25.stacked, { opacity, transform: [{ translateY: opacity.interpolate({ inputRange: [0, 1], outputRange: [6, 0] }) }] }, style],
|
|
3511
3597
|
children: [
|
|
3512
|
-
/* @__PURE__ */
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
/* @__PURE__ */
|
|
3515
|
-
description ? /* @__PURE__ */
|
|
3516
|
-
action ? /* @__PURE__ */
|
|
3598
|
+
/* @__PURE__ */ jsx34(Mascot, { bird, mood, tone: tone3, size: SIZE[size], animated }),
|
|
3599
|
+
/* @__PURE__ */ jsxs30(View29, { style: inline ? styles25.wordsInline : styles25.words, children: [
|
|
3600
|
+
/* @__PURE__ */ jsx34(Txt, { variant: "label", role: "heading", style: inline ? null : styles25.center, children: title }),
|
|
3601
|
+
description ? /* @__PURE__ */ jsx34(Txt, { tone: "secondary", style: inline ? null : styles25.center, children: description }) : null,
|
|
3602
|
+
action ? /* @__PURE__ */ jsx34(View29, { style: [styles25.action, inline ? null : styles25.actionCentred], children: action }) : null
|
|
3517
3603
|
] })
|
|
3518
3604
|
]
|
|
3519
3605
|
}
|
|
3520
3606
|
);
|
|
3521
3607
|
}
|
|
3522
|
-
var ErrorState = (props) => /* @__PURE__ */
|
|
3523
|
-
var SuccessState = (props) => /* @__PURE__ */
|
|
3524
|
-
var LoadingState = (props) => /* @__PURE__ */
|
|
3525
|
-
var WelcomeState = (props) => /* @__PURE__ */
|
|
3608
|
+
var ErrorState = (props) => /* @__PURE__ */ jsx34(MascotState, { mood: "error", ...props });
|
|
3609
|
+
var SuccessState = (props) => /* @__PURE__ */ jsx34(MascotState, { mood: "success", ...props });
|
|
3610
|
+
var LoadingState = (props) => /* @__PURE__ */ jsx34(MascotState, { mood: "thinking", ...props });
|
|
3611
|
+
var WelcomeState = (props) => /* @__PURE__ */ jsx34(MascotState, { mood: "welcome", ...props });
|
|
3526
3612
|
var styles25 = StyleSheet25.create({
|
|
3527
3613
|
stacked: { alignItems: "center", justifyContent: "center", gap: 12, paddingVertical: 40, paddingHorizontal: 24 },
|
|
3528
3614
|
inline: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
@@ -3535,9 +3621,9 @@ var styles25 = StyleSheet25.create({
|
|
|
3535
3621
|
|
|
3536
3622
|
// src/native/match-dialog.tsx
|
|
3537
3623
|
import * as React25 from "react";
|
|
3538
|
-
import { AccessibilityInfo as AccessibilityInfo10, Animated as Animated14, Easing as Easing8, Modal as Modal4, Pressable as Pressable14, StyleSheet as StyleSheet26, View as
|
|
3539
|
-
import
|
|
3540
|
-
import { jsx as
|
|
3624
|
+
import { AccessibilityInfo as AccessibilityInfo10, Animated as Animated14, Easing as Easing8, Modal as Modal4, Pressable as Pressable14, StyleSheet as StyleSheet26, View as View30 } from "react-native";
|
|
3625
|
+
import Svg16, { Path as Path14 } from "react-native-svg";
|
|
3626
|
+
import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3541
3627
|
function MatchDialog({ open, onOpenChange, title, description, people, primaryLabel, onPrimary, secondaryLabel }) {
|
|
3542
3628
|
const { theme, haptic } = useTheme();
|
|
3543
3629
|
const reduce = useReducedMotion();
|
|
@@ -3557,17 +3643,17 @@ function MatchDialog({ open, onOpenChange, title, description, people, primaryLa
|
|
|
3557
3643
|
}
|
|
3558
3644
|
}, [open, reduce, t]);
|
|
3559
3645
|
const side = (dir) => ({ transform: [{ translateX: t.interpolate({ inputRange: [0, 1], outputRange: [dir * 110, dir * 50] }) }, { rotate: dir === -1 ? "-8deg" : "8deg" }] });
|
|
3560
|
-
return /* @__PURE__ */
|
|
3561
|
-
/* @__PURE__ */
|
|
3562
|
-
/* @__PURE__ */
|
|
3563
|
-
description ? /* @__PURE__ */
|
|
3564
|
-
/* @__PURE__ */
|
|
3565
|
-
/* @__PURE__ */
|
|
3566
|
-
/* @__PURE__ */
|
|
3567
|
-
/* @__PURE__ */
|
|
3646
|
+
return /* @__PURE__ */ jsx35(Modal4, { ...modalName(title), visible: open, transparent: true, animationType: reduce ? "none" : "fade", onRequestClose: () => onOpenChange(false), statusBarTranslucent: true, children: /* @__PURE__ */ jsxs31(View30, { accessibilityViewIsModal: true, style: [styles26.screen, { backgroundColor: theme.accent }], children: [
|
|
3647
|
+
/* @__PURE__ */ jsx35(View30, { style: [StyleSheet26.absoluteFill, { backgroundColor: theme.accent2, opacity: 0.55 }] }),
|
|
3648
|
+
/* @__PURE__ */ jsx35(Txt, { variant: "display", tone: "onAccent", style: styles26.title, children: title }),
|
|
3649
|
+
description ? /* @__PURE__ */ jsx35(Txt, { tone: "onAccent", style: styles26.center, children: description }) : null,
|
|
3650
|
+
/* @__PURE__ */ jsxs31(View30, { style: styles26.pair, "aria-hidden": true, children: [
|
|
3651
|
+
/* @__PURE__ */ jsx35(Animated14.View, { style: [styles26.photo, side(-1), { borderColor: theme.onAccent }], children: /* @__PURE__ */ jsx35(Avatar, { src: people[0].src, alt: "", fallback: people[0].name.charAt(0), size: 112 }) }),
|
|
3652
|
+
/* @__PURE__ */ jsx35(Animated14.View, { style: [styles26.photo, side(1), { borderColor: theme.onAccent }], children: /* @__PURE__ */ jsx35(Avatar, { src: people[1].src, alt: "", fallback: people[1].name.charAt(0), size: 112 }) }),
|
|
3653
|
+
/* @__PURE__ */ jsx35(Animated14.View, { style: [styles26.heart, { backgroundColor: theme.onAccent, transform: [{ scale: t }] }], children: /* @__PURE__ */ jsx35(Svg16, { width: 26, height: 26, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx35(Path14, { 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.accent }) }) })
|
|
3568
3654
|
] }),
|
|
3569
|
-
/* @__PURE__ */
|
|
3570
|
-
/* @__PURE__ */
|
|
3655
|
+
/* @__PURE__ */ jsxs31(View30, { style: styles26.actions, children: [
|
|
3656
|
+
/* @__PURE__ */ jsx35(
|
|
3571
3657
|
Button,
|
|
3572
3658
|
{
|
|
3573
3659
|
label: primaryLabel,
|
|
@@ -3578,7 +3664,7 @@ function MatchDialog({ open, onOpenChange, title, description, people, primaryLa
|
|
|
3578
3664
|
}
|
|
3579
3665
|
}
|
|
3580
3666
|
),
|
|
3581
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx35(Pressable14, { role: "button", onPress: () => onOpenChange(false), style: ({ pressed }) => [styles26.secondary, { borderColor: theme.onAccent, opacity: pressed ? 0.8 : 1 }], children: /* @__PURE__ */ jsx35(Txt, { variant: "label", tone: "onAccent", children: secondaryLabel }) })
|
|
3582
3668
|
] })
|
|
3583
3669
|
] }) });
|
|
3584
3670
|
}
|
|
@@ -3594,9 +3680,9 @@ var styles26 = StyleSheet26.create({
|
|
|
3594
3680
|
});
|
|
3595
3681
|
|
|
3596
3682
|
// src/native/meter.tsx
|
|
3597
|
-
import { StyleSheet as StyleSheet27, View as
|
|
3598
|
-
import
|
|
3599
|
-
import { jsx as
|
|
3683
|
+
import { StyleSheet as StyleSheet27, View as View31 } from "react-native";
|
|
3684
|
+
import Svg17, { Circle as Circle10 } from "react-native-svg";
|
|
3685
|
+
import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3600
3686
|
var THICK = { sm: 6, md: 8, lg: 12 };
|
|
3601
3687
|
var RING = { sm: 56, md: 96, lg: 144 };
|
|
3602
3688
|
var partColor = (t, i) => [t.accent, t.warning, t.success, t.textSecondary, t.danger][i % 5];
|
|
@@ -3609,10 +3695,10 @@ function Meter({ label, value = 0, min = 0, max = 100, valueText, thresholds, op
|
|
|
3609
3695
|
const words2 = valueText ?? `${Math.round(ratio * 100)} %`;
|
|
3610
3696
|
const shares = (parts ?? []).map((p, i) => ({ ...p, color: partColor(theme, i), ratio: Math.min(1, Math.max(0, p.value / span)), words: p.valueText ?? `${Math.round(p.value / span * 100)} %` }));
|
|
3611
3697
|
const a11y = parts ? { role: "group", "aria-label": `${label}: ${shares.map((p) => `${p.label} ${p.words}`).join(", ")}` } : { role: "meter", "aria-label": label, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": Math.min(max, Math.max(min, value)), "aria-valuetext": words2 };
|
|
3612
|
-
const legend = parts ? /* @__PURE__ */
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3698
|
+
const legend = parts ? /* @__PURE__ */ jsx36(View31, { style: styles27.legend, "aria-hidden": true, children: shares.map((p, i) => /* @__PURE__ */ jsxs32(View31, { style: styles27.legendItem, children: [
|
|
3699
|
+
/* @__PURE__ */ jsx36(View31, { style: [styles27.swatch, { backgroundColor: p.color }] }),
|
|
3700
|
+
/* @__PURE__ */ jsx36(Txt, { variant: "caption", children: p.label }),
|
|
3701
|
+
/* @__PURE__ */ jsx36(Txt, { variant: "caption", tone: "secondary", children: p.words })
|
|
3616
3702
|
] }, i)) }) : null;
|
|
3617
3703
|
if (variant === "ring") {
|
|
3618
3704
|
const side = RING[size];
|
|
@@ -3624,23 +3710,23 @@ function Meter({ label, value = 0, min = 0, max = 100, valueText, thresholds, op
|
|
|
3624
3710
|
offset += p.ratio;
|
|
3625
3711
|
return arc;
|
|
3626
3712
|
}) : [{ color: tone3, len: ratio, start: 0 }];
|
|
3627
|
-
return /* @__PURE__ */
|
|
3628
|
-
/* @__PURE__ */
|
|
3629
|
-
/* @__PURE__ */
|
|
3630
|
-
/* @__PURE__ */
|
|
3631
|
-
arcs.map((a, i) => /* @__PURE__ */
|
|
3713
|
+
return /* @__PURE__ */ jsxs32(View31, { accessible: true, ...a11y, style: [styles27.ringRoot, style], children: [
|
|
3714
|
+
/* @__PURE__ */ jsxs32(View31, { style: { width: side, height: side }, children: [
|
|
3715
|
+
/* @__PURE__ */ jsxs32(Svg17, { width: side, height: side, viewBox: "0 0 100 100", style: { transform: [{ rotate: "-90deg" }] }, children: [
|
|
3716
|
+
/* @__PURE__ */ jsx36(Circle10, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: 9 }),
|
|
3717
|
+
arcs.map((a, i) => /* @__PURE__ */ jsx36(Circle10, { cx: 50, cy: 50, r, fill: "none", stroke: a.color, strokeWidth: 9, strokeDasharray: `${Math.max(0, a.len * c - (parts ? 2 : 0))} ${c}`, strokeDashoffset: -a.start * c, strokeLinecap: parts ? "butt" : "round" }, i))
|
|
3632
3718
|
] }),
|
|
3633
|
-
children !== void 0 ? /* @__PURE__ */
|
|
3719
|
+
children !== void 0 ? /* @__PURE__ */ jsx36(View31, { style: [StyleSheet27.absoluteFill, styles27.center], children }) : null
|
|
3634
3720
|
] }),
|
|
3635
3721
|
legend
|
|
3636
3722
|
] });
|
|
3637
3723
|
}
|
|
3638
|
-
return /* @__PURE__ */
|
|
3639
|
-
showLabel ? /* @__PURE__ */
|
|
3640
|
-
/* @__PURE__ */
|
|
3641
|
-
!parts ? /* @__PURE__ */
|
|
3724
|
+
return /* @__PURE__ */ jsxs32(View31, { accessible: true, ...a11y, style: [styles27.root, style], children: [
|
|
3725
|
+
showLabel ? /* @__PURE__ */ jsxs32(View31, { style: styles27.header, "aria-hidden": true, children: [
|
|
3726
|
+
/* @__PURE__ */ jsx36(Txt, { variant: "caption", numberOfLines: 1, style: styles27.caption, children: label }),
|
|
3727
|
+
!parts ? /* @__PURE__ */ jsx36(Txt, { variant: "caption", tone: "secondary", children: words2 }) : null
|
|
3642
3728
|
] }) : null,
|
|
3643
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ jsx36(View31, { style: [styles27.track, { height: THICK[size], backgroundColor: theme.surface3 }], children: parts ? shares.map((p, i) => /* @__PURE__ */ jsx36(View31, { style: { width: `${p.ratio * 100}%`, backgroundColor: p.color } }, i)) : /* @__PURE__ */ jsx36(View31, { style: [styles27.fill, { width: `${ratio * 100}%`, backgroundColor: tone3 }] }) }),
|
|
3644
3730
|
legend
|
|
3645
3731
|
] });
|
|
3646
3732
|
}
|
|
@@ -3660,7 +3746,7 @@ var styles27 = StyleSheet27.create({
|
|
|
3660
3746
|
// src/native/number-ticker.tsx
|
|
3661
3747
|
import * as React26 from "react";
|
|
3662
3748
|
import { AccessibilityInfo as AccessibilityInfo11, Animated as Animated15, Easing as Easing9, Text as Text13 } from "react-native";
|
|
3663
|
-
import { jsx as
|
|
3749
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3664
3750
|
function NumberTicker({ value, locale, format, trigger = "mount", duration = 1100, announce, variant = "display", tone: tone3 = "text", style }) {
|
|
3665
3751
|
const reduce = useReducedMotion();
|
|
3666
3752
|
const writer = React26.useMemo(() => new Intl.NumberFormat(locale, format), [locale, format]);
|
|
@@ -3688,13 +3774,13 @@ function NumberTicker({ value, locale, format, trigger = "mount", duration = 110
|
|
|
3688
3774
|
};
|
|
3689
3775
|
}, [value, reduce, trigger, duration, announce, anim, writer]);
|
|
3690
3776
|
const digits = Number.isInteger(value) ? Math.round(shown) : shown;
|
|
3691
|
-
return /* @__PURE__ */
|
|
3777
|
+
return /* @__PURE__ */ jsx37(Txt, { variant, tone: tone3, "aria-label": writer.format(value), style: [{ fontVariant: ["tabular-nums"] }, style], children: /* @__PURE__ */ jsx37(Text13, { "aria-hidden": true, children: writer.format(digits) }) });
|
|
3692
3778
|
}
|
|
3693
3779
|
|
|
3694
3780
|
// src/native/onboarding.tsx
|
|
3695
3781
|
import * as React27 from "react";
|
|
3696
|
-
import { ScrollView as ScrollView5, StyleSheet as StyleSheet28, View as
|
|
3697
|
-
import { jsx as
|
|
3782
|
+
import { ScrollView as ScrollView5, StyleSheet as StyleSheet28, View as View32 } from "react-native";
|
|
3783
|
+
import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3698
3784
|
function Onboarding({ slides, labels, onDone, style }) {
|
|
3699
3785
|
const { theme, insets, haptic } = useTheme();
|
|
3700
3786
|
const [width, setWidth] = React27.useState(0);
|
|
@@ -3709,15 +3795,15 @@ function Onboarding({ slides, labels, onDone, style }) {
|
|
|
3709
3795
|
const onScroll = (e) => {
|
|
3710
3796
|
if (width > 0) setPage(Math.round(e.nativeEvent.contentOffset.x / width));
|
|
3711
3797
|
};
|
|
3712
|
-
return /* @__PURE__ */
|
|
3713
|
-
/* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3715
|
-
slide.visual ? /* @__PURE__ */
|
|
3716
|
-
/* @__PURE__ */
|
|
3717
|
-
/* @__PURE__ */
|
|
3798
|
+
return /* @__PURE__ */ jsxs33(View32, { style: [styles28.root, { backgroundColor: theme.surface0, paddingTop: insets.top + 8, paddingBottom: insets.bottom + 16 }, style], onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: [
|
|
3799
|
+
/* @__PURE__ */ jsx38(View32, { style: styles28.top, children: !last ? /* @__PURE__ */ jsx38(Button, { label: labels.skip, variant: "ghost", size: "sm", onPress: onDone }) : /* @__PURE__ */ jsx38(View32, { style: styles28.spacer }) }),
|
|
3800
|
+
/* @__PURE__ */ jsx38(ScrollView5, { ref: scroller, tabIndex: 0, horizontal: true, pagingEnabled: true, showsHorizontalScrollIndicator: false, onMomentumScrollEnd: onScroll, style: styles28.flex, children: slides.map((slide, i) => /* @__PURE__ */ jsxs33(View32, { style: [styles28.slide, { width: width || void 0 }], accessible: true, "aria-label": `${labels.position(i + 1, slides.length)}. ${slide.title}. ${slide.description}`, "aria-hidden": i !== page, children: [
|
|
3801
|
+
slide.visual ? /* @__PURE__ */ jsx38(View32, { style: styles28.visual, children: slide.visual }) : null,
|
|
3802
|
+
/* @__PURE__ */ jsx38(Txt, { variant: "display", style: styles28.centred, children: slide.title }),
|
|
3803
|
+
/* @__PURE__ */ jsx38(Txt, { tone: "secondary", style: [styles28.centred, styles28.description], children: slide.description })
|
|
3718
3804
|
] }, i)) }),
|
|
3719
|
-
/* @__PURE__ */
|
|
3720
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ jsx38(View32, { style: styles28.dots, "aria-hidden": true, children: slides.map((_, i) => /* @__PURE__ */ jsx38(View32, { style: [styles28.dot, { width: i === page ? 22 : 8, backgroundColor: i === page ? theme.accent : theme.borderStrong }] }, i)) }),
|
|
3806
|
+
/* @__PURE__ */ jsx38(View32, { style: styles28.bottom, children: /* @__PURE__ */ jsx38(Button, { label: last ? labels.done : labels.next, variant: last ? "gradient" : "primary", size: "lg", onPress: () => last ? onDone() : go(page + 1) }) })
|
|
3721
3807
|
] });
|
|
3722
3808
|
}
|
|
3723
3809
|
var styles28 = StyleSheet28.create({
|
|
@@ -3736,8 +3822,8 @@ var styles28 = StyleSheet28.create({
|
|
|
3736
3822
|
|
|
3737
3823
|
// src/native/otp-input.tsx
|
|
3738
3824
|
import * as React28 from "react";
|
|
3739
|
-
import { Platform as Platform2, Pressable as Pressable15, StyleSheet as StyleSheet29, TextInput as TextInput5, View as
|
|
3740
|
-
import { jsx as
|
|
3825
|
+
import { Platform as Platform2, Pressable as Pressable15, StyleSheet as StyleSheet29, TextInput as TextInput5, View as View33 } from "react-native";
|
|
3826
|
+
import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3741
3827
|
function OtpInput({ label, length = 6, value, onValueChange, onComplete, mode = "numeric", invalid, disabled, autoFocus, style }) {
|
|
3742
3828
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
3743
3829
|
const [own, setOwn] = React28.useState("");
|
|
@@ -3756,11 +3842,11 @@ function OtpInput({ label, length = 6, value, onValueChange, onComplete, mode =
|
|
|
3756
3842
|
onComplete?.(next);
|
|
3757
3843
|
}
|
|
3758
3844
|
};
|
|
3759
|
-
return /* @__PURE__ */
|
|
3760
|
-
/* @__PURE__ */
|
|
3845
|
+
return /* @__PURE__ */ jsxs34(Pressable15, { onPress: () => input.current?.focus(), disabled, accessible: false, style: [styles29.root, style], children: [
|
|
3846
|
+
/* @__PURE__ */ jsx39(View33, { style: styles29.boxes, "aria-hidden": true, children: Array.from({ length }, (_, i) => {
|
|
3761
3847
|
const active = focused && i === Math.min(code.length, length - 1);
|
|
3762
|
-
return /* @__PURE__ */
|
|
3763
|
-
|
|
3848
|
+
return /* @__PURE__ */ jsx39(
|
|
3849
|
+
View33,
|
|
3764
3850
|
{
|
|
3765
3851
|
style: [
|
|
3766
3852
|
styles29.box,
|
|
@@ -3771,12 +3857,12 @@ function OtpInput({ label, length = 6, value, onValueChange, onComplete, mode =
|
|
|
3771
3857
|
borderWidth: invalid || active ? 2 : 1
|
|
3772
3858
|
}
|
|
3773
3859
|
],
|
|
3774
|
-
children: /* @__PURE__ */
|
|
3860
|
+
children: /* @__PURE__ */ jsx39(Txt, { variant: "title", children: code[i] ?? "" })
|
|
3775
3861
|
},
|
|
3776
3862
|
i
|
|
3777
3863
|
);
|
|
3778
3864
|
}) }),
|
|
3779
|
-
/* @__PURE__ */
|
|
3865
|
+
/* @__PURE__ */ jsx39(
|
|
3780
3866
|
TextInput5,
|
|
3781
3867
|
{
|
|
3782
3868
|
ref: input,
|
|
@@ -3808,11 +3894,11 @@ var styles29 = StyleSheet29.create({
|
|
|
3808
3894
|
});
|
|
3809
3895
|
|
|
3810
3896
|
// src/native/pagination.tsx
|
|
3811
|
-
import { Pressable as Pressable16, StyleSheet as StyleSheet30, Text as Text14, View as
|
|
3812
|
-
import
|
|
3813
|
-
import { jsx as
|
|
3897
|
+
import { Pressable as Pressable16, StyleSheet as StyleSheet30, Text as Text14, View as View34 } from "react-native";
|
|
3898
|
+
import Svg18, { Path as Path15 } from "react-native-svg";
|
|
3899
|
+
import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3814
3900
|
function Chevron3({ direction, color }) {
|
|
3815
|
-
return /* @__PURE__ */
|
|
3901
|
+
return /* @__PURE__ */ jsx40(Svg18, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx40(Path15, { d: direction === "left" ? "m15 6-6 6 6 6" : "m9 6 6 6-6 6" }) });
|
|
3816
3902
|
}
|
|
3817
3903
|
function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }) {
|
|
3818
3904
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -3821,7 +3907,7 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
3821
3907
|
const current = Math.min(Math.max(1, page), count);
|
|
3822
3908
|
const canPrevious = !disabled && (paged ? current > 1 : Boolean(hasPrevious));
|
|
3823
3909
|
const canNext = !disabled && (paged ? current < count : Boolean(hasNext));
|
|
3824
|
-
const button = (direction, enabled, onPress, label) => /* @__PURE__ */
|
|
3910
|
+
const button = (direction, enabled, onPress, label) => /* @__PURE__ */ jsx40(
|
|
3825
3911
|
Pressable16,
|
|
3826
3912
|
{
|
|
3827
3913
|
role: "button",
|
|
@@ -3834,13 +3920,13 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
3834
3920
|
styles30.button,
|
|
3835
3921
|
{ borderRadius: radius3.sm, borderColor: theme.borderDefault, backgroundColor: theme.surface1, opacity: enabled ? pressed ? 0.8 : 1 : 0.4 }
|
|
3836
3922
|
],
|
|
3837
|
-
children: /* @__PURE__ */
|
|
3923
|
+
children: /* @__PURE__ */ jsx40(Chevron3, { direction, color: theme.textPrimary })
|
|
3838
3924
|
}
|
|
3839
3925
|
);
|
|
3840
3926
|
const text = status ?? (paged ? labels.compact(current, count) : null);
|
|
3841
|
-
return /* @__PURE__ */
|
|
3927
|
+
return /* @__PURE__ */ jsxs35(View34, { role: "navigation", style: [styles30.row, style], children: [
|
|
3842
3928
|
button("left", canPrevious, paged ? () => onPageChange?.(current - 1) : onPrevious, labels.previous),
|
|
3843
|
-
text ? /* @__PURE__ */
|
|
3929
|
+
text ? /* @__PURE__ */ jsx40(Text14, { "aria-live": "polite", style: [styles30.status, { color: theme.textSecondary }], children: text }) : null,
|
|
3844
3930
|
button("right", canNext, paged ? () => onPageChange?.(current + 1) : onNext, labels.next)
|
|
3845
3931
|
] });
|
|
3846
3932
|
}
|
|
@@ -3851,8 +3937,8 @@ var styles30 = StyleSheet30.create({
|
|
|
3851
3937
|
});
|
|
3852
3938
|
|
|
3853
3939
|
// src/native/permission-prompt.tsx
|
|
3854
|
-
import { StyleSheet as StyleSheet31, View as
|
|
3855
|
-
import { Fragment as Fragment6, jsx as
|
|
3940
|
+
import { StyleSheet as StyleSheet31, View as View35 } from "react-native";
|
|
3941
|
+
import { Fragment as Fragment6, jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3856
3942
|
function PermissionPrompt({
|
|
3857
3943
|
status,
|
|
3858
3944
|
title,
|
|
@@ -3869,15 +3955,15 @@ function PermissionPrompt({
|
|
|
3869
3955
|
style
|
|
3870
3956
|
}) {
|
|
3871
3957
|
const { theme, radius: radius3 } = useTheme();
|
|
3872
|
-
if (status === "granted") return /* @__PURE__ */
|
|
3958
|
+
if (status === "granted") return /* @__PURE__ */ jsx41(Fragment6, { children: children ?? null });
|
|
3873
3959
|
const blocked = status === "blocked" || status === "denied" && Boolean(onOpenSettings);
|
|
3874
|
-
return /* @__PURE__ */
|
|
3875
|
-
/* @__PURE__ */
|
|
3876
|
-
/* @__PURE__ */
|
|
3877
|
-
/* @__PURE__ */
|
|
3878
|
-
/* @__PURE__ */
|
|
3879
|
-
blocked && settingsLabel && onOpenSettings ? /* @__PURE__ */
|
|
3880
|
-
dismissLabel && onDismiss ? /* @__PURE__ */
|
|
3960
|
+
return /* @__PURE__ */ jsxs36(View35, { style: [styles31.root, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle, borderRadius: radius3.xl }, style], children: [
|
|
3961
|
+
/* @__PURE__ */ jsx41(Mascot, { bird: mascot, mood: blocked ? "error" : "welcome", size: 104 }),
|
|
3962
|
+
/* @__PURE__ */ jsx41(Txt, { variant: "title", style: styles31.centred, children: title }),
|
|
3963
|
+
/* @__PURE__ */ jsx41(Txt, { tone: "secondary", style: styles31.centred, children: blocked && blockedDescription ? blockedDescription : description }),
|
|
3964
|
+
/* @__PURE__ */ jsxs36(View35, { style: styles31.actions, children: [
|
|
3965
|
+
blocked && settingsLabel && onOpenSettings ? /* @__PURE__ */ jsx41(Button, { label: settingsLabel, variant: "primary", onPress: onOpenSettings }) : /* @__PURE__ */ jsx41(Button, { label: allowLabel, variant: "primary", onPress: onAllow }),
|
|
3966
|
+
dismissLabel && onDismiss ? /* @__PURE__ */ jsx41(Button, { label: dismissLabel, variant: "ghost", onPress: onDismiss }) : null
|
|
3881
3967
|
] })
|
|
3882
3968
|
] });
|
|
3883
3969
|
}
|
|
@@ -3889,8 +3975,8 @@ var styles31 = StyleSheet31.create({
|
|
|
3889
3975
|
|
|
3890
3976
|
// src/native/phoenix.tsx
|
|
3891
3977
|
import { useEffect as useEffect19, useState as useState28 } from "react";
|
|
3892
|
-
import { AccessibilityInfo as AccessibilityInfo12, Animated as Animated16, Easing as Easing10, View as
|
|
3893
|
-
import
|
|
3978
|
+
import { AccessibilityInfo as AccessibilityInfo12, Animated as Animated16, Easing as Easing10, View as View36 } from "react-native";
|
|
3979
|
+
import Svg19, { Circle as Circle11, Defs as Defs10, LinearGradient as LinearGradient10, Path as Path16, RadialGradient as RadialGradient7, Stop as Stop10 } from "react-native-svg";
|
|
3894
3980
|
|
|
3895
3981
|
// src/mascots/phoenix-geometry.ts
|
|
3896
3982
|
var PHOENIX = {
|
|
@@ -3913,7 +3999,7 @@ var PHOENIX_PALETTES = {
|
|
|
3913
3999
|
};
|
|
3914
4000
|
|
|
3915
4001
|
// src/native/phoenix.tsx
|
|
3916
|
-
import { jsx as
|
|
4002
|
+
import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3917
4003
|
function useFloat(animated) {
|
|
3918
4004
|
const [y] = useState28(() => new Animated16.Value(0));
|
|
3919
4005
|
useEffect19(() => {
|
|
@@ -3938,37 +4024,37 @@ function Phoenix({ tone: tone3 = "own", size = 120, animated = true, title, styl
|
|
|
3938
4024
|
const id = useSvgId("kzp");
|
|
3939
4025
|
const y = useFloat(animated);
|
|
3940
4026
|
const p = tone3 === "brand" ? { left: [theme.accent2, theme.accent], right: [theme.accent, theme.accent2], core: ["#ffffff", theme.accent], body: theme.surface3, edge: theme.borderStrong, crest: theme.accent } : PHOENIX_PALETTES.own;
|
|
3941
|
-
return /* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
3943
|
-
/* @__PURE__ */
|
|
3944
|
-
/* @__PURE__ */
|
|
3945
|
-
/* @__PURE__ */
|
|
4027
|
+
return /* @__PURE__ */ jsx42(View36, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx42(Animated16.View, { style: { transform: [{ translateY: y }] }, children: /* @__PURE__ */ jsxs37(Svg19, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
4028
|
+
/* @__PURE__ */ jsxs37(Defs10, { children: [
|
|
4029
|
+
/* @__PURE__ */ jsxs37(LinearGradient10, { id: `${id}l`, x1: "1", y1: "0", x2: "0", y2: "1", children: [
|
|
4030
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "0%", stopColor: p.left[0] }),
|
|
4031
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "100%", stopColor: p.left[1] })
|
|
3946
4032
|
] }),
|
|
3947
|
-
/* @__PURE__ */
|
|
3948
|
-
/* @__PURE__ */
|
|
3949
|
-
/* @__PURE__ */
|
|
4033
|
+
/* @__PURE__ */ jsxs37(LinearGradient10, { id: `${id}r`, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
4034
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "0%", stopColor: p.right[0] }),
|
|
4035
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "100%", stopColor: p.right[1] })
|
|
3950
4036
|
] }),
|
|
3951
|
-
/* @__PURE__ */
|
|
3952
|
-
/* @__PURE__ */
|
|
3953
|
-
/* @__PURE__ */
|
|
4037
|
+
/* @__PURE__ */ jsxs37(RadialGradient7, { id: `${id}c`, children: [
|
|
4038
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "0%", stopColor: p.core[0] }),
|
|
4039
|
+
/* @__PURE__ */ jsx42(Stop10, { offset: "100%", stopColor: p.core[1], stopOpacity: 0 })
|
|
3954
4040
|
] })
|
|
3955
4041
|
] }),
|
|
3956
|
-
/* @__PURE__ */
|
|
3957
|
-
/* @__PURE__ */
|
|
3958
|
-
/* @__PURE__ */
|
|
3959
|
-
/* @__PURE__ */
|
|
3960
|
-
/* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
3962
|
-
/* @__PURE__ */
|
|
3963
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.wingL, fill: `url(#${id}l)` }),
|
|
4043
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.wingR, fill: `url(#${id}r)` }),
|
|
4044
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.tailL, fill: `url(#${id}l)`, opacity: 0.7 }),
|
|
4045
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.tailR, fill: `url(#${id}r)`, opacity: 0.7 }),
|
|
4046
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.body, fill: p.body, stroke: p.edge, strokeOpacity: 0.5 }),
|
|
4047
|
+
/* @__PURE__ */ jsx42(Circle11, { cx: 60, cy: 58, r: 12, fill: `url(#${id}c)` }),
|
|
4048
|
+
/* @__PURE__ */ jsx42(Circle11, { cx: 60, cy: 58, r: 3.5, fill: "#ffffff" }),
|
|
4049
|
+
/* @__PURE__ */ jsx42(Path16, { d: PHOENIX.crest, stroke: p.crest, strokeWidth: 2, strokeLinecap: "round" })
|
|
3964
4050
|
] }) }) });
|
|
3965
4051
|
}
|
|
3966
4052
|
|
|
3967
4053
|
// src/native/photo-grid.tsx
|
|
3968
4054
|
import * as React30 from "react";
|
|
3969
|
-
import { Image as Image4, Pressable as Pressable17, StyleSheet as StyleSheet32, View as
|
|
3970
|
-
import
|
|
3971
|
-
import { jsx as
|
|
4055
|
+
import { Image as Image4, Pressable as Pressable17, StyleSheet as StyleSheet32, View as View37 } from "react-native";
|
|
4056
|
+
import Svg20, { Path as Path17 } from "react-native-svg";
|
|
4057
|
+
import { jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3972
4058
|
function PhotoGrid({ value, onValueChange, onAdd, slots = 6, required = 1, columns = 3, labels, style }) {
|
|
3973
4059
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
3974
4060
|
const [menu, setMenu] = React30.useState(null);
|
|
@@ -3985,11 +4071,11 @@ function PhotoGrid({ value, onValueChange, onAdd, slots = 6, required = 1, colum
|
|
|
3985
4071
|
onValueChange(value.filter((_, j) => j !== i));
|
|
3986
4072
|
};
|
|
3987
4073
|
const width = `${100 / columns}%`;
|
|
3988
|
-
return /* @__PURE__ */
|
|
4074
|
+
return /* @__PURE__ */ jsxs38(View37, { style: [styles32.grid, style], children: [
|
|
3989
4075
|
Array.from({ length: slots }, (_, i) => {
|
|
3990
4076
|
const photo = value[i];
|
|
3991
4077
|
const cell = [styles32.slot, { borderRadius: radius3.lg, aspectRatio: 3 / 4 }];
|
|
3992
|
-
return /* @__PURE__ */
|
|
4078
|
+
return /* @__PURE__ */ jsx43(View37, { style: [styles32.cell, { width }], children: photo ? /* @__PURE__ */ jsxs38(
|
|
3993
4079
|
Pressable17,
|
|
3994
4080
|
{
|
|
3995
4081
|
role: "button",
|
|
@@ -4013,11 +4099,11 @@ function PhotoGrid({ value, onValueChange, onAdd, slots = 6, required = 1, colum
|
|
|
4013
4099
|
},
|
|
4014
4100
|
style: [...cell, { backgroundColor: theme.surface3, overflow: "hidden" }],
|
|
4015
4101
|
children: [
|
|
4016
|
-
/* @__PURE__ */
|
|
4017
|
-
i === 0 ? /* @__PURE__ */
|
|
4102
|
+
/* @__PURE__ */ jsx43(Image4, { source: { uri: photo.uri }, style: StyleSheet32.absoluteFill, resizeMode: "cover" }),
|
|
4103
|
+
i === 0 ? /* @__PURE__ */ jsx43(View37, { style: [styles32.main, { backgroundColor: theme.accent, borderRadius: radius3.full }], children: /* @__PURE__ */ jsx43(Txt, { variant: "caption", tone: "onAccent", style: styles32.mainText, children: labels.main }) }) : null
|
|
4018
4104
|
]
|
|
4019
4105
|
}
|
|
4020
|
-
) : /* @__PURE__ */
|
|
4106
|
+
) : /* @__PURE__ */ jsx43(
|
|
4021
4107
|
Pressable17,
|
|
4022
4108
|
{
|
|
4023
4109
|
role: "button",
|
|
@@ -4029,11 +4115,11 @@ function PhotoGrid({ value, onValueChange, onAdd, slots = 6, required = 1, colum
|
|
|
4029
4115
|
styles32.empty,
|
|
4030
4116
|
{ borderColor: i < required ? theme.accent : theme.borderStrong, backgroundColor: pressed ? theme.surface2 : theme.surface1, opacity: i > value.length ? 0.5 : 1 }
|
|
4031
4117
|
],
|
|
4032
|
-
children: /* @__PURE__ */
|
|
4118
|
+
children: /* @__PURE__ */ jsx43(View37, { style: [styles32.plus, { backgroundColor: i === value.length ? theme.accent : theme.surface3, borderRadius: radius3.full }], children: /* @__PURE__ */ jsx43(Svg20, { width: 16, height: 16, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx43(Path17, { d: "M12 5v14M5 12h14", stroke: i === value.length ? theme.onAccent : theme.textSecondary, strokeWidth: 2.6, strokeLinecap: "round" }) }) })
|
|
4033
4119
|
}
|
|
4034
4120
|
) }, photo?.id ?? `empty-${i}`);
|
|
4035
4121
|
}),
|
|
4036
|
-
/* @__PURE__ */
|
|
4122
|
+
/* @__PURE__ */ jsx43(
|
|
4037
4123
|
ActionSheet,
|
|
4038
4124
|
{
|
|
4039
4125
|
open: menu !== null,
|
|
@@ -4061,16 +4147,16 @@ var styles32 = StyleSheet32.create({
|
|
|
4061
4147
|
|
|
4062
4148
|
// src/native/profile-card.tsx
|
|
4063
4149
|
import * as React31 from "react";
|
|
4064
|
-
import { Animated as Animated17, StyleSheet as StyleSheet33, View as
|
|
4065
|
-
import { jsx as
|
|
4150
|
+
import { Animated as Animated17, StyleSheet as StyleSheet33, View as View38 } from "react-native";
|
|
4151
|
+
import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4066
4152
|
var ratioOf = (value, max = 100) => Math.min(1, Math.max(0, value / (max || 1)));
|
|
4067
4153
|
function Bar({ label, ratio, words: words2, animated, delay }) {
|
|
4068
4154
|
const { theme } = useTheme();
|
|
4069
4155
|
const t = useEntrance(animated, delay, 900);
|
|
4070
4156
|
const [width, setWidth] = React31.useState(0);
|
|
4071
4157
|
const translateX = t.interpolate({ inputRange: [0, 1], outputRange: [-width * ratio, 0] });
|
|
4072
|
-
return /* @__PURE__ */
|
|
4073
|
-
|
|
4158
|
+
return /* @__PURE__ */ jsx44(
|
|
4159
|
+
View38,
|
|
4074
4160
|
{
|
|
4075
4161
|
accessible: true,
|
|
4076
4162
|
role: "meter",
|
|
@@ -4081,37 +4167,37 @@ function Bar({ label, ratio, words: words2, animated, delay }) {
|
|
|
4081
4167
|
"aria-valuetext": words2,
|
|
4082
4168
|
onLayout: (e) => setWidth(e.nativeEvent.layout.width),
|
|
4083
4169
|
style: [styles33.track, { backgroundColor: theme.surface3 }],
|
|
4084
|
-
children: /* @__PURE__ */
|
|
4170
|
+
children: /* @__PURE__ */ jsx44(Animated17.View, { style: [styles33.fill, { width: `${ratio * 100}%`, backgroundColor: theme.accent, transform: [{ translateX }] }] })
|
|
4085
4171
|
}
|
|
4086
4172
|
);
|
|
4087
4173
|
}
|
|
4088
4174
|
function ProfileCard({ visual, name, statLabel, value = 100, valueText, stats, caption, children, animated = true, style, ...props }) {
|
|
4089
4175
|
const { theme, radius: radius3 } = useTheme();
|
|
4090
4176
|
const ratio = ratioOf(value);
|
|
4091
|
-
return /* @__PURE__ */
|
|
4092
|
-
/* @__PURE__ */
|
|
4093
|
-
/* @__PURE__ */
|
|
4094
|
-
/* @__PURE__ */
|
|
4095
|
-
statLabel ? /* @__PURE__ */
|
|
4177
|
+
return /* @__PURE__ */ jsxs39(View38, { ...props, style: [styles33.root, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle, borderRadius: radius3.xl }, style], children: [
|
|
4178
|
+
/* @__PURE__ */ jsx44(View38, { "aria-hidden": true, style: [styles33.disc, { backgroundColor: theme.surface2, borderColor: theme.accentSoft }], children: visual }),
|
|
4179
|
+
/* @__PURE__ */ jsxs39(View38, { style: styles33.head, children: [
|
|
4180
|
+
/* @__PURE__ */ jsx44(Txt, { variant: "title", style: styles33.name, children: name }),
|
|
4181
|
+
statLabel ? /* @__PURE__ */ jsxs39(Txt, { variant: "caption", tone: "secondary", children: [
|
|
4096
4182
|
statLabel,
|
|
4097
4183
|
" ",
|
|
4098
|
-
/* @__PURE__ */
|
|
4184
|
+
/* @__PURE__ */ jsx44(Txt, { variant: "caption", children: valueText ?? `${Math.round(ratio * 100)} %` })
|
|
4099
4185
|
] }) : null
|
|
4100
4186
|
] }),
|
|
4101
|
-
statLabel ? /* @__PURE__ */
|
|
4187
|
+
statLabel ? /* @__PURE__ */ jsx44(Bar, { label: statLabel, ratio, words: valueText ?? `${Math.round(ratio * 100)} %`, animated, delay: 200 }) : null,
|
|
4102
4188
|
stats?.map((s, i) => {
|
|
4103
4189
|
const r = ratioOf(s.value, s.max);
|
|
4104
4190
|
const words2 = s.valueText ?? `${Math.round(r * 100)} %`;
|
|
4105
|
-
return /* @__PURE__ */
|
|
4106
|
-
/* @__PURE__ */
|
|
4107
|
-
/* @__PURE__ */
|
|
4108
|
-
/* @__PURE__ */
|
|
4191
|
+
return /* @__PURE__ */ jsxs39(View38, { style: styles33.stat, children: [
|
|
4192
|
+
/* @__PURE__ */ jsxs39(View38, { "aria-hidden": true, style: styles33.statHead, children: [
|
|
4193
|
+
/* @__PURE__ */ jsx44(Txt, { variant: "caption", tone: "secondary", children: s.label }),
|
|
4194
|
+
/* @__PURE__ */ jsx44(Txt, { variant: "caption", children: words2 })
|
|
4109
4195
|
] }),
|
|
4110
|
-
/* @__PURE__ */
|
|
4196
|
+
/* @__PURE__ */ jsx44(Bar, { label: s.label, ratio: r, words: words2, animated, delay: 320 + i * 120 })
|
|
4111
4197
|
] }, s.label);
|
|
4112
4198
|
}),
|
|
4113
|
-
caption ? /* @__PURE__ */
|
|
4114
|
-
children ? /* @__PURE__ */
|
|
4199
|
+
caption ? /* @__PURE__ */ jsx44(Txt, { variant: "caption", tone: "secondary", style: styles33.caption, children: caption }) : null,
|
|
4200
|
+
children ? /* @__PURE__ */ jsx44(View38, { style: styles33.extra, children }) : null
|
|
4115
4201
|
] });
|
|
4116
4202
|
}
|
|
4117
4203
|
var styles33 = StyleSheet33.create({
|
|
@@ -4129,10 +4215,10 @@ var styles33 = StyleSheet33.create({
|
|
|
4129
4215
|
|
|
4130
4216
|
// src/native/progress.tsx
|
|
4131
4217
|
import * as React32 from "react";
|
|
4132
|
-
import { Animated as Animated18, Easing as Easing11, StyleSheet as StyleSheet34, View as
|
|
4133
|
-
import
|
|
4134
|
-
import { jsx as
|
|
4135
|
-
var AnimatedCircle = Animated18.createAnimatedComponent(
|
|
4218
|
+
import { Animated as Animated18, Easing as Easing11, StyleSheet as StyleSheet34, View as View39 } from "react-native";
|
|
4219
|
+
import Svg21, { Circle as Circle12, Defs as Defs11, LinearGradient as LinearGradient11, Rect as Rect3, Stop as Stop11 } from "react-native-svg";
|
|
4220
|
+
import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4221
|
+
var AnimatedCircle = Animated18.createAnimatedComponent(Circle12);
|
|
4136
4222
|
var BAR2 = { sm: 4, md: 8, lg: 12 };
|
|
4137
4223
|
var RING2 = { sm: 40, md: 80, lg: 144 };
|
|
4138
4224
|
var STROKE = { sm: 12, md: 9, lg: 7 };
|
|
@@ -4173,9 +4259,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
4173
4259
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
4174
4260
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
4175
4261
|
};
|
|
4176
|
-
const gradient = /* @__PURE__ */
|
|
4177
|
-
/* @__PURE__ */
|
|
4178
|
-
/* @__PURE__ */
|
|
4262
|
+
const gradient = /* @__PURE__ */ jsx45(Defs11, { children: /* @__PURE__ */ jsxs40(LinearGradient11, { id, x1: "0", y1: "0", x2: "1", y2: variant === "ring" ? "1" : "0", children: [
|
|
4263
|
+
/* @__PURE__ */ jsx45(Stop11, { offset: "0", stopColor: theme.accent }),
|
|
4264
|
+
/* @__PURE__ */ jsx45(Stop11, { offset: "1", stopColor: theme.accent2 })
|
|
4179
4265
|
] }) });
|
|
4180
4266
|
if (variant === "ring") {
|
|
4181
4267
|
const side = RING2[size];
|
|
@@ -4184,11 +4270,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
4184
4270
|
const circumference = 2 * Math.PI * r;
|
|
4185
4271
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
4186
4272
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
4187
|
-
return /* @__PURE__ */
|
|
4188
|
-
/* @__PURE__ */
|
|
4273
|
+
return /* @__PURE__ */ jsxs40(View39, { ...a11y, style: [styles34.ring, { width: side, height: side }, style], children: [
|
|
4274
|
+
/* @__PURE__ */ jsx45(Animated18.View, { style: [StyleSheet34.absoluteFill, { transform: [{ rotate: known ? "-90deg" : rotate }] }], children: /* @__PURE__ */ jsxs40(Svg21, { width: side, height: side, viewBox: "0 0 100 100", children: [
|
|
4189
4275
|
gradient,
|
|
4190
|
-
/* @__PURE__ */
|
|
4191
|
-
/* @__PURE__ */
|
|
4276
|
+
/* @__PURE__ */ jsx45(Circle12, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
4277
|
+
/* @__PURE__ */ jsx45(
|
|
4192
4278
|
AnimatedCircle,
|
|
4193
4279
|
{
|
|
4194
4280
|
cx: 50,
|
|
@@ -4208,15 +4294,15 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
4208
4294
|
}
|
|
4209
4295
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
4210
4296
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
4211
|
-
return /* @__PURE__ */
|
|
4212
|
-
|
|
4297
|
+
return /* @__PURE__ */ jsx45(
|
|
4298
|
+
View39,
|
|
4213
4299
|
{
|
|
4214
4300
|
...a11y,
|
|
4215
4301
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
4216
4302
|
style: [styles34.bar, { height: BAR2[size], backgroundColor: theme.surface3 }, style],
|
|
4217
|
-
children: /* @__PURE__ */
|
|
4303
|
+
children: /* @__PURE__ */ jsx45(Animated18.View, { style: [styles34.fill, { width }, known || reduce ? null : { transform: [{ translateX: translate }] }], children: /* @__PURE__ */ jsxs40(Svg21, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
4218
4304
|
gradient,
|
|
4219
|
-
/* @__PURE__ */
|
|
4305
|
+
/* @__PURE__ */ jsx45(Rect3, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
4220
4306
|
] }) })
|
|
4221
4307
|
}
|
|
4222
4308
|
);
|
|
@@ -4229,11 +4315,11 @@ var styles34 = StyleSheet34.create({
|
|
|
4229
4315
|
|
|
4230
4316
|
// src/native/pull-to-refresh.tsx
|
|
4231
4317
|
import * as React33 from "react";
|
|
4232
|
-
import { AccessibilityInfo as AccessibilityInfo13, Animated as Animated19, RefreshControl, StyleSheet as StyleSheet35, View as
|
|
4233
|
-
import { jsx as
|
|
4318
|
+
import { AccessibilityInfo as AccessibilityInfo13, Animated as Animated19, RefreshControl, StyleSheet as StyleSheet35, View as View40 } from "react-native";
|
|
4319
|
+
import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4234
4320
|
function PullToRefresh({ label, ...props }) {
|
|
4235
4321
|
const { theme } = useTheme();
|
|
4236
|
-
return /* @__PURE__ */
|
|
4322
|
+
return /* @__PURE__ */ jsx46(RefreshControl, { ...props, tintColor: theme.accent, colors: [theme.accent], progressBackgroundColor: theme.surface2, title: label, titleColor: theme.textSecondary });
|
|
4237
4323
|
}
|
|
4238
4324
|
var pullProgress = (offset, threshold) => Math.min(1, Math.max(0, -offset / threshold));
|
|
4239
4325
|
function BrandedRefresh({ product, refreshing, onRefresh, label, children, threshold = 72 }) {
|
|
@@ -4250,14 +4336,14 @@ function BrandedRefresh({ product, refreshing, onRefresh, label, children, thres
|
|
|
4250
4336
|
const shown = refreshing ? 1 : pull;
|
|
4251
4337
|
const scale = refreshing || reduce ? 1 : pull.interpolate({ inputRange: [0, 1], outputRange: [0.4, 1] });
|
|
4252
4338
|
const rotate = refreshing || reduce ? "0deg" : pull.interpolate({ inputRange: [0, 1], outputRange: ["-90deg", "0deg"] });
|
|
4253
|
-
return /* @__PURE__ */
|
|
4339
|
+
return /* @__PURE__ */ jsxs41(View40, { style: styles35.root, children: [
|
|
4254
4340
|
children({
|
|
4255
4341
|
// The platform's control does the gesture and the haptics, drawn transparent: the mark is ours.
|
|
4256
|
-
refreshControl: /* @__PURE__ */
|
|
4342
|
+
refreshControl: /* @__PURE__ */ jsx46(RefreshControl, { refreshing, onRefresh, tintColor: "transparent", colors: ["transparent"], progressBackgroundColor: "transparent" }),
|
|
4257
4343
|
onScroll,
|
|
4258
4344
|
scrollEventThrottle: 16
|
|
4259
4345
|
}),
|
|
4260
|
-
/* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ jsx46(Animated19.View, { pointerEvents: "none", "aria-hidden": true, style: [styles35.mark, { opacity: shown, transform: [{ scale }, { rotate }] }], children: /* @__PURE__ */ jsx46(ProductMark, { id: product, size: 32, animated: refreshing, neutral: theme.textMuted }) })
|
|
4261
4347
|
] });
|
|
4262
4348
|
}
|
|
4263
4349
|
var styles35 = StyleSheet35.create({
|
|
@@ -4267,11 +4353,11 @@ var styles35 = StyleSheet35.create({
|
|
|
4267
4353
|
|
|
4268
4354
|
// src/native/radio-group.tsx
|
|
4269
4355
|
import * as React34 from "react";
|
|
4270
|
-
import { Animated as Animated20, Pressable as Pressable18, StyleSheet as StyleSheet36, Text as Text15, View as
|
|
4271
|
-
import
|
|
4272
|
-
import { jsx as
|
|
4356
|
+
import { Animated as Animated20, Pressable as Pressable18, StyleSheet as StyleSheet36, Text as Text15, View as View41 } from "react-native";
|
|
4357
|
+
import Svg22, { Path as Path18 } from "react-native-svg";
|
|
4358
|
+
import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4273
4359
|
function Check({ color }) {
|
|
4274
|
-
return /* @__PURE__ */
|
|
4360
|
+
return /* @__PURE__ */ jsx47(Svg22, { width: 12, height: 12, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: 3.2, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx47(Path18, { d: "M20 6 9 17l-5-5" }) });
|
|
4275
4361
|
}
|
|
4276
4362
|
function Key({ option, checked, disabled, onPress }) {
|
|
4277
4363
|
const { theme, radius: radius3, motion: motion3 } = useTheme();
|
|
@@ -4281,7 +4367,7 @@ function Key({ option, checked, disabled, onPress }) {
|
|
|
4281
4367
|
React34.useEffect(() => {
|
|
4282
4368
|
Animated20.timing(sink, { toValue: down ? 1 : 0, duration: motion3.duration.fast, useNativeDriver: true }).start();
|
|
4283
4369
|
}, [down, sink, motion3.duration.fast]);
|
|
4284
|
-
return /* @__PURE__ */
|
|
4370
|
+
return /* @__PURE__ */ jsxs42(
|
|
4285
4371
|
Pressable18,
|
|
4286
4372
|
{
|
|
4287
4373
|
role: "radio",
|
|
@@ -4294,8 +4380,8 @@ function Key({ option, checked, disabled, onPress }) {
|
|
|
4294
4380
|
onPressOut: () => setHeld(false),
|
|
4295
4381
|
style: [styles36.keySlot, disabled ? styles36.disabled : null],
|
|
4296
4382
|
children: [
|
|
4297
|
-
/* @__PURE__ */
|
|
4298
|
-
/* @__PURE__ */
|
|
4383
|
+
/* @__PURE__ */ jsx47(View41, { style: [styles36.ledge, { borderRadius: radius3.lg, backgroundColor: checked ? theme.accentHover : theme.borderStrong }] }),
|
|
4384
|
+
/* @__PURE__ */ jsxs42(
|
|
4299
4385
|
Animated20.View,
|
|
4300
4386
|
{
|
|
4301
4387
|
style: [
|
|
@@ -4308,8 +4394,8 @@ function Key({ option, checked, disabled, onPress }) {
|
|
|
4308
4394
|
}
|
|
4309
4395
|
],
|
|
4310
4396
|
children: [
|
|
4311
|
-
/* @__PURE__ */
|
|
4312
|
-
option.hint ? /* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ jsx47(Text15, { style: [styles36.keyLabel, { color: checked ? theme.onAccent : theme.textPrimary }], children: option.label }),
|
|
4398
|
+
option.hint ? /* @__PURE__ */ jsx47(Text15, { style: [styles36.keyHint, { color: checked ? theme.onAccent : theme.textSecondary }], children: option.hint }) : null
|
|
4313
4399
|
]
|
|
4314
4400
|
}
|
|
4315
4401
|
)
|
|
@@ -4330,9 +4416,9 @@ function RadioGroup({ label, options, value: valueProp, defaultValue = null, onV
|
|
|
4330
4416
|
const checked = o.value === value;
|
|
4331
4417
|
const off = Boolean(disabled || o.disabled);
|
|
4332
4418
|
const name = o.description ? `${o.label}, ${o.description}` : o.label;
|
|
4333
|
-
if (variant === "buttons") return /* @__PURE__ */
|
|
4419
|
+
if (variant === "buttons") return /* @__PURE__ */ jsx47(Key, { option: o, checked, disabled: off, onPress: () => pick(o.value) }, o.value);
|
|
4334
4420
|
if (variant === "segmented")
|
|
4335
|
-
return /* @__PURE__ */
|
|
4421
|
+
return /* @__PURE__ */ jsx47(
|
|
4336
4422
|
Pressable18,
|
|
4337
4423
|
{
|
|
4338
4424
|
role: "radio",
|
|
@@ -4342,12 +4428,12 @@ function RadioGroup({ label, options, value: valueProp, defaultValue = null, onV
|
|
|
4342
4428
|
disabled: off,
|
|
4343
4429
|
onPress: () => pick(o.value),
|
|
4344
4430
|
style: [styles36.segment, { borderRadius: radius3.md }, checked ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null, off ? styles36.disabled : null],
|
|
4345
|
-
children: /* @__PURE__ */
|
|
4431
|
+
children: /* @__PURE__ */ jsx47(Text15, { numberOfLines: 1, style: [styles36.segmentLabel, { color: checked ? theme.textPrimary : theme.textSecondary }], children: o.label })
|
|
4346
4432
|
},
|
|
4347
4433
|
o.value
|
|
4348
4434
|
);
|
|
4349
4435
|
if (variant === "cards")
|
|
4350
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ jsxs42(
|
|
4351
4437
|
Pressable18,
|
|
4352
4438
|
{
|
|
4353
4439
|
role: "radio",
|
|
@@ -4362,24 +4448,24 @@ function RadioGroup({ label, options, value: valueProp, defaultValue = null, onV
|
|
|
4362
4448
|
off ? styles36.disabled : null
|
|
4363
4449
|
],
|
|
4364
4450
|
children: [
|
|
4365
|
-
/* @__PURE__ */
|
|
4366
|
-
/* @__PURE__ */
|
|
4367
|
-
o.description ? /* @__PURE__ */
|
|
4451
|
+
/* @__PURE__ */ jsx47(View41, { style: [styles36.cardCheck, { borderColor: checked ? theme.accent : theme.borderStrong, backgroundColor: checked ? theme.accent : theme.surface1 }], children: checked ? /* @__PURE__ */ jsx47(Check, { color: theme.onAccent }) : null }),
|
|
4452
|
+
/* @__PURE__ */ jsx47(Text15, { style: [styles36.cardLabel, { color: theme.textPrimary }], children: o.label }),
|
|
4453
|
+
o.description ? /* @__PURE__ */ jsx47(Text15, { style: [styles36.cardDescription, { color: theme.textSecondary }], children: o.description }) : null
|
|
4368
4454
|
]
|
|
4369
4455
|
},
|
|
4370
4456
|
o.value
|
|
4371
4457
|
);
|
|
4372
|
-
return /* @__PURE__ */
|
|
4373
|
-
/* @__PURE__ */
|
|
4374
|
-
/* @__PURE__ */
|
|
4375
|
-
/* @__PURE__ */
|
|
4376
|
-
o.description ? /* @__PURE__ */
|
|
4458
|
+
return /* @__PURE__ */ jsxs42(Pressable18, { role: "radio", "aria-checked": checked, "aria-label": name, "aria-disabled": off || void 0, disabled: off, onPress: () => pick(o.value), style: [styles36.row, off ? styles36.disabled : null], children: [
|
|
4459
|
+
/* @__PURE__ */ jsx47(View41, { style: [styles36.dot, { borderColor: checked ? theme.accent : theme.borderStrong, backgroundColor: checked ? theme.accent : theme.surface1 }], children: checked ? /* @__PURE__ */ jsx47(View41, { style: [styles36.dotIn, { backgroundColor: theme.onAccent }] }) : null }),
|
|
4460
|
+
/* @__PURE__ */ jsxs42(View41, { style: styles36.rowText, children: [
|
|
4461
|
+
/* @__PURE__ */ jsx47(Text15, { style: [styles36.rowLabel, { color: theme.textPrimary }], children: o.label }),
|
|
4462
|
+
o.description ? /* @__PURE__ */ jsx47(Text15, { style: [styles36.cardDescription, { color: theme.textSecondary }], children: o.description }) : null
|
|
4377
4463
|
] })
|
|
4378
4464
|
] }, o.value);
|
|
4379
4465
|
});
|
|
4380
|
-
return /* @__PURE__ */
|
|
4381
|
-
/* @__PURE__ */
|
|
4382
|
-
|
|
4466
|
+
return /* @__PURE__ */ jsxs42(View41, { style: [styles36.root, style], children: [
|
|
4467
|
+
/* @__PURE__ */ jsx47(
|
|
4468
|
+
View41,
|
|
4383
4469
|
{
|
|
4384
4470
|
role: "radiogroup",
|
|
4385
4471
|
"aria-label": label,
|
|
@@ -4387,7 +4473,7 @@ function RadioGroup({ label, options, value: valueProp, defaultValue = null, onV
|
|
|
4387
4473
|
children: body
|
|
4388
4474
|
}
|
|
4389
4475
|
),
|
|
4390
|
-
error ? /* @__PURE__ */
|
|
4476
|
+
error ? /* @__PURE__ */ jsx47(Text15, { role: "alert", "aria-live": "polite", style: [styles36.error, { color: theme.dangerText }], children: error }) : null
|
|
4391
4477
|
] });
|
|
4392
4478
|
}
|
|
4393
4479
|
var styles36 = StyleSheet36.create({
|
|
@@ -4417,26 +4503,26 @@ var styles36 = StyleSheet36.create({
|
|
|
4417
4503
|
});
|
|
4418
4504
|
|
|
4419
4505
|
// src/native/screen.tsx
|
|
4420
|
-
import { KeyboardAvoidingView, Platform as Platform3, ScrollView as ScrollView6, StyleSheet as StyleSheet37, View as
|
|
4421
|
-
import { Fragment as Fragment7, jsx as
|
|
4506
|
+
import { KeyboardAvoidingView, Platform as Platform3, ScrollView as ScrollView6, StyleSheet as StyleSheet37, View as View42 } from "react-native";
|
|
4507
|
+
import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4422
4508
|
function Screen({ header, footer, children, scroll = true, keyboard = true, padding = 16, surface = "surface0", contentStyle }) {
|
|
4423
4509
|
const { theme, insets } = useTheme();
|
|
4424
|
-
const body = scroll ? /* @__PURE__ */
|
|
4425
|
-
const inner = /* @__PURE__ */
|
|
4510
|
+
const body = scroll ? /* @__PURE__ */ jsx48(ScrollView6, { style: styles37.flex, contentContainerStyle: [{ padding, paddingTop: header ? padding : padding + insets.top, gap: 16 }, contentStyle], keyboardShouldPersistTaps: "handled", tabIndex: 0, children }) : /* @__PURE__ */ jsx48(View42, { style: [styles37.flex, { paddingTop: header ? 0 : insets.top }, contentStyle], children });
|
|
4511
|
+
const inner = /* @__PURE__ */ jsxs43(Fragment7, { children: [
|
|
4426
4512
|
header,
|
|
4427
4513
|
body,
|
|
4428
4514
|
footer
|
|
4429
4515
|
] });
|
|
4430
|
-
return /* @__PURE__ */
|
|
4516
|
+
return /* @__PURE__ */ jsx48(View42, { style: [styles37.flex, { backgroundColor: theme[surface] }], children: keyboard ? /* @__PURE__ */ jsx48(KeyboardAvoidingView, { style: styles37.flex, behavior: Platform3.OS === "ios" ? "padding" : void 0, children: inner }) : inner });
|
|
4431
4517
|
}
|
|
4432
4518
|
var styles37 = StyleSheet37.create({ flex: { flex: 1 } });
|
|
4433
4519
|
|
|
4434
4520
|
// src/native/search-field.tsx
|
|
4435
4521
|
import { useDebouncedCallback } from "@krizaka/pacer/react";
|
|
4436
4522
|
import * as React35 from "react";
|
|
4437
|
-
import { Pressable as Pressable19, StyleSheet as StyleSheet38, TextInput as TextInput6, View as
|
|
4438
|
-
import
|
|
4439
|
-
import { jsx as
|
|
4523
|
+
import { Pressable as Pressable19, StyleSheet as StyleSheet38, TextInput as TextInput6, View as View43 } from "react-native";
|
|
4524
|
+
import Svg23, { Circle as Circle13, Path as Path19 } from "react-native-svg";
|
|
4525
|
+
import { jsx as jsx49, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
4440
4526
|
function SearchField({ label, value, defaultValue = "", onValueChange, onSearch, debounce = 300, onSubmit, clearLabel, cancelLabel, onCancel, style, placeholder, onFocus, onBlur, ...props }) {
|
|
4441
4527
|
const [focused, setFocused] = React35.useState(false);
|
|
4442
4528
|
const input = React35.useRef(null);
|
|
@@ -4450,12 +4536,12 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
4450
4536
|
search.cancel();
|
|
4451
4537
|
if (onSearch) search(next);
|
|
4452
4538
|
};
|
|
4453
|
-
const field = /* @__PURE__ */
|
|
4454
|
-
/* @__PURE__ */
|
|
4455
|
-
/* @__PURE__ */
|
|
4456
|
-
/* @__PURE__ */
|
|
4539
|
+
const field = /* @__PURE__ */ jsxs44(View43, { style: [styles38.frame, { borderRadius: radius3.md, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style], children: [
|
|
4540
|
+
/* @__PURE__ */ jsxs44(Svg23, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2, strokeLinecap: "round", "aria-hidden": true, children: [
|
|
4541
|
+
/* @__PURE__ */ jsx49(Circle13, { cx: 11, cy: 11, r: 7 }),
|
|
4542
|
+
/* @__PURE__ */ jsx49(Path19, { d: "m20 20-3.5-3.5" })
|
|
4457
4543
|
] }),
|
|
4458
|
-
/* @__PURE__ */
|
|
4544
|
+
/* @__PURE__ */ jsx49(
|
|
4459
4545
|
TextInput6,
|
|
4460
4546
|
{
|
|
4461
4547
|
ref: input,
|
|
@@ -4486,12 +4572,12 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
4486
4572
|
...props
|
|
4487
4573
|
}
|
|
4488
4574
|
),
|
|
4489
|
-
query ? /* @__PURE__ */
|
|
4575
|
+
query ? /* @__PURE__ */ jsx49(Pressable19, { role: "button", "aria-label": clearLabel, hitSlop: 10, onPress: () => change(""), style: styles38.clear, children: /* @__PURE__ */ jsx49(Svg23, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2.4, strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx49(Path19, { d: "M18 6 6 18M6 6l12 12" }) }) }) : null
|
|
4490
4576
|
] });
|
|
4491
4577
|
if (!cancelLabel || !onCancel) return field;
|
|
4492
|
-
return /* @__PURE__ */
|
|
4493
|
-
/* @__PURE__ */
|
|
4494
|
-
focused || query ? /* @__PURE__ */
|
|
4578
|
+
return /* @__PURE__ */ jsxs44(View43, { style: styles38.bar, children: [
|
|
4579
|
+
/* @__PURE__ */ jsx49(View43, { style: styles38.grow, children: field }),
|
|
4580
|
+
focused || query ? /* @__PURE__ */ jsx49(
|
|
4495
4581
|
Pressable19,
|
|
4496
4582
|
{
|
|
4497
4583
|
role: "button",
|
|
@@ -4502,7 +4588,7 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
4502
4588
|
},
|
|
4503
4589
|
hitSlop: 8,
|
|
4504
4590
|
style: styles38.cancel,
|
|
4505
|
-
children: /* @__PURE__ */
|
|
4591
|
+
children: /* @__PURE__ */ jsx49(Txt, { variant: "label", tone: "accent", children: cancelLabel })
|
|
4506
4592
|
}
|
|
4507
4593
|
) : null
|
|
4508
4594
|
] });
|
|
@@ -4517,19 +4603,19 @@ var styles38 = StyleSheet38.create({
|
|
|
4517
4603
|
});
|
|
4518
4604
|
|
|
4519
4605
|
// src/native/segmented.tsx
|
|
4520
|
-
import { Pressable as Pressable20, StyleSheet as StyleSheet39, Text as Text16, View as
|
|
4521
|
-
import { jsx as
|
|
4606
|
+
import { Pressable as Pressable20, StyleSheet as StyleSheet39, Text as Text16, View as View44 } from "react-native";
|
|
4607
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4522
4608
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
4523
4609
|
const { theme, radius: radius3 } = useTheme();
|
|
4524
|
-
return /* @__PURE__ */
|
|
4525
|
-
|
|
4610
|
+
return /* @__PURE__ */ jsx50(
|
|
4611
|
+
View44,
|
|
4526
4612
|
{
|
|
4527
4613
|
role: "tablist",
|
|
4528
4614
|
"aria-label": label,
|
|
4529
4615
|
style: [styles39.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
4530
4616
|
children: options.map((option) => {
|
|
4531
4617
|
const selected = option.value === value;
|
|
4532
|
-
return /* @__PURE__ */
|
|
4618
|
+
return /* @__PURE__ */ jsx50(
|
|
4533
4619
|
Pressable20,
|
|
4534
4620
|
{
|
|
4535
4621
|
role: "tab",
|
|
@@ -4545,7 +4631,7 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
4545
4631
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
4546
4632
|
option.disabled ? styles39.disabled : null
|
|
4547
4633
|
],
|
|
4548
|
-
children: /* @__PURE__ */
|
|
4634
|
+
children: /* @__PURE__ */ jsx50(Text16, { numberOfLines: 1, style: [styles39.label, { color: selected ? theme.textPrimary : theme.textSecondary, fontSize: size === "sm" ? 12 : 13 }], children: option.label })
|
|
4549
4635
|
},
|
|
4550
4636
|
option.value
|
|
4551
4637
|
);
|
|
@@ -4562,9 +4648,9 @@ var styles39 = StyleSheet39.create({
|
|
|
4562
4648
|
|
|
4563
4649
|
// src/native/showcase.tsx
|
|
4564
4650
|
import * as React36 from "react";
|
|
4565
|
-
import { Animated as Animated21, AppState, Easing as Easing12, FlatList, Pressable as Pressable21, StyleSheet as StyleSheet40, View as
|
|
4566
|
-
import
|
|
4567
|
-
import { jsx as
|
|
4651
|
+
import { Animated as Animated21, AppState, Easing as Easing12, FlatList, Pressable as Pressable21, StyleSheet as StyleSheet40, View as View45 } from "react-native";
|
|
4652
|
+
import Svg24, { Path as Path20 } from "react-native-svg";
|
|
4653
|
+
import { jsx as jsx51, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
4568
4654
|
var showcaseLabels = {
|
|
4569
4655
|
previous: "Previous slide",
|
|
4570
4656
|
next: "Next slide",
|
|
@@ -4623,9 +4709,9 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4623
4709
|
const item = items2[current];
|
|
4624
4710
|
const title = item !== void 0 ? getTitle?.(item) : void 0;
|
|
4625
4711
|
const control = [styles40.control, { borderColor: theme.borderDefault, backgroundColor: theme.surface1 }];
|
|
4626
|
-
const icon = (d) => /* @__PURE__ */
|
|
4627
|
-
return /* @__PURE__ */
|
|
4628
|
-
/* @__PURE__ */
|
|
4712
|
+
const icon = (d) => /* @__PURE__ */ jsx51(Svg24, { width: 16, height: 16, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx51(Path20, { d, stroke: theme.textSecondary, strokeWidth: 2.2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
4713
|
+
return /* @__PURE__ */ jsxs45(View45, { role: "group", "aria-label": label, style: [styles40.root, style], children: [
|
|
4714
|
+
/* @__PURE__ */ jsx51(View45, { "aria-live": announce ? "polite" : "off", onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: /* @__PURE__ */ jsx51(
|
|
4629
4715
|
FlatList,
|
|
4630
4716
|
{
|
|
4631
4717
|
ref: list,
|
|
@@ -4646,21 +4732,21 @@ function Showcase({ label, items: items2, getId, renderItem, getTitle, interval
|
|
|
4646
4732
|
onIndexChange?.(next, true);
|
|
4647
4733
|
}
|
|
4648
4734
|
},
|
|
4649
|
-
renderItem: ({ item: slide, index }) => /* @__PURE__ */
|
|
4735
|
+
renderItem: ({ item: slide, index }) => /* @__PURE__ */ jsx51(View45, { role: "group", "aria-label": labels.slide(index + 1, total), style: { width }, children: Math.abs(index - current) <= 1 ? renderItem(slide, { index, active: index === current }) : null })
|
|
4650
4736
|
}
|
|
4651
4737
|
) }),
|
|
4652
|
-
/* @__PURE__ */
|
|
4653
|
-
i < current || i === current && !playing ? /* @__PURE__ */
|
|
4654
|
-
i === current && playing ? /* @__PURE__ */
|
|
4738
|
+
/* @__PURE__ */ jsx51(View45, { style: styles40.segments, children: items2.map((slide, i) => /* @__PURE__ */ jsx51(Pressable21, { role: "button", "aria-label": labels.goTo(i + 1, total), "aria-current": i === current ? true : void 0, onPress: () => go(i, true), style: styles40.segment, children: /* @__PURE__ */ jsxs45(View45, { style: [styles40.track, { backgroundColor: theme.surface3 }], children: [
|
|
4739
|
+
i < current || i === current && !playing ? /* @__PURE__ */ jsx51(View45, { style: [StyleSheet40.absoluteFill, { backgroundColor: theme.accent }] }) : null,
|
|
4740
|
+
i === current && playing ? /* @__PURE__ */ jsx51(Animated21.View, { style: [styles40.fill, { backgroundColor: theme.accent, width: fill.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) }] }) : null
|
|
4655
4741
|
] }) }, getId(slide))) }),
|
|
4656
|
-
/* @__PURE__ */
|
|
4657
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsxs45(View45, { style: styles40.bar, children: [
|
|
4743
|
+
/* @__PURE__ */ jsxs45(Txt, { variant: "caption", tone: "secondary", numberOfLines: 1, style: styles40.counter, children: [
|
|
4658
4744
|
title ? `${title} \xB7 ` : "",
|
|
4659
4745
|
labels.counter(current + 1, total)
|
|
4660
4746
|
] }),
|
|
4661
|
-
/* @__PURE__ */
|
|
4662
|
-
playing ? /* @__PURE__ */
|
|
4663
|
-
/* @__PURE__ */
|
|
4747
|
+
/* @__PURE__ */ jsx51(Pressable21, { 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") }),
|
|
4748
|
+
playing ? /* @__PURE__ */ jsx51(Pressable21, { 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,
|
|
4749
|
+
/* @__PURE__ */ jsx51(Pressable21, { 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") })
|
|
4664
4750
|
] })
|
|
4665
4751
|
] });
|
|
4666
4752
|
}
|
|
@@ -4678,7 +4764,7 @@ var styles40 = StyleSheet40.create({
|
|
|
4678
4764
|
// src/native/skeleton.tsx
|
|
4679
4765
|
import * as React37 from "react";
|
|
4680
4766
|
import { Animated as Animated22 } from "react-native";
|
|
4681
|
-
import { jsx as
|
|
4767
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
4682
4768
|
var SHAPE = {
|
|
4683
4769
|
text: { width: "100%", height: 12, radius: 4 },
|
|
4684
4770
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -4704,7 +4790,7 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
4704
4790
|
}, [reduce, opacity]);
|
|
4705
4791
|
const s = SHAPE[shape];
|
|
4706
4792
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
4707
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ jsx52(
|
|
4708
4794
|
Animated22.View,
|
|
4709
4795
|
{
|
|
4710
4796
|
testID,
|
|
@@ -4719,9 +4805,9 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
4719
4805
|
|
|
4720
4806
|
// src/native/slider.tsx
|
|
4721
4807
|
import * as React38 from "react";
|
|
4722
|
-
import { PanResponder as PanResponder2, StyleSheet as StyleSheet41, Text as Text17, View as
|
|
4723
|
-
import
|
|
4724
|
-
import { jsx as
|
|
4808
|
+
import { PanResponder as PanResponder2, StyleSheet as StyleSheet41, Text as Text17, View as View46 } from "react-native";
|
|
4809
|
+
import Svg25, { Defs as Defs12, LinearGradient as LinearGradient12, Rect as Rect4, Stop as Stop12 } from "react-native-svg";
|
|
4810
|
+
import { jsx as jsx53, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4725
4811
|
var THUMB = 26;
|
|
4726
4812
|
var toArray = (v) => v === void 0 ? void 0 : typeof v === "number" ? [v] : [...v];
|
|
4727
4813
|
function Slider({
|
|
@@ -4813,24 +4899,24 @@ function Slider({
|
|
|
4813
4899
|
const along = (p) => vertical ? { bottom: p * length } : { left: p * length };
|
|
4814
4900
|
const onLayout = (e) => setLength(vertical ? e.nativeEvent.layout.height : e.nativeEvent.layout.width);
|
|
4815
4901
|
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 };
|
|
4816
|
-
return /* @__PURE__ */
|
|
4817
|
-
showLabel ? /* @__PURE__ */
|
|
4818
|
-
/* @__PURE__ */
|
|
4819
|
-
/* @__PURE__ */
|
|
4902
|
+
return /* @__PURE__ */ jsxs46(View46, { style: [styles41.root, vertical ? styles41.rootVertical : null, disabled ? styles41.disabled : null, style], children: [
|
|
4903
|
+
showLabel ? /* @__PURE__ */ jsxs46(View46, { style: styles41.header, children: [
|
|
4904
|
+
/* @__PURE__ */ jsx53(Text17, { style: [styles41.label, { color: theme.textSecondary }], children: label }),
|
|
4905
|
+
/* @__PURE__ */ jsx53(Text17, { "aria-hidden": true, style: [styles41.value, { color: theme.textSecondary }], children: current.map(formatValue).join(" \u2013 ") })
|
|
4820
4906
|
] }) : null,
|
|
4821
|
-
/* @__PURE__ */
|
|
4822
|
-
/* @__PURE__ */
|
|
4823
|
-
/* @__PURE__ */
|
|
4824
|
-
/* @__PURE__ */
|
|
4825
|
-
/* @__PURE__ */
|
|
4826
|
-
/* @__PURE__ */
|
|
4907
|
+
/* @__PURE__ */ jsxs46(View46, { ...responder.panHandlers, style: vertical ? styles41.controlVertical : styles41.control, children: [
|
|
4908
|
+
/* @__PURE__ */ jsxs46(View46, { onLayout, pointerEvents: "none", style: [vertical ? styles41.trackVertical : styles41.track, { borderRadius: radius3.full, backgroundColor: theme.surface3 }], children: [
|
|
4909
|
+
/* @__PURE__ */ jsx53(View46, { style: [styles41.fill, fill, { borderRadius: radius3.full, overflow: "hidden", backgroundColor: theme.accent }], children: tone3 === "gradient" ? /* @__PURE__ */ jsxs46(Svg25, { width: "100%", height: "100%", "aria-hidden": true, children: [
|
|
4910
|
+
/* @__PURE__ */ jsx53(Defs12, { children: /* @__PURE__ */ jsxs46(LinearGradient12, { id: gradientId, x1: "0", y1: vertical ? "1" : "0", x2: vertical ? "0" : "1", y2: "0", children: [
|
|
4911
|
+
/* @__PURE__ */ jsx53(Stop12, { offset: "0", stopColor: theme.accent }),
|
|
4912
|
+
/* @__PURE__ */ jsx53(Stop12, { offset: "1", stopColor: theme.accent2 })
|
|
4827
4913
|
] }) }),
|
|
4828
|
-
/* @__PURE__ */
|
|
4914
|
+
/* @__PURE__ */ jsx53(Rect4, { width: "100%", height: "100%", fill: `url(#${gradientId})` })
|
|
4829
4915
|
] }) : null }),
|
|
4830
|
-
tickValues.map((t) => /* @__PURE__ */
|
|
4916
|
+
tickValues.map((t) => /* @__PURE__ */ jsx53(View46, { style: [vertical ? styles41.tickVertical : styles41.tick, along(pct(t)), { backgroundColor: t > lo && t < hi ? theme.onAccent : theme.borderStrong }] }, t))
|
|
4831
4917
|
] }),
|
|
4832
|
-
current.map((v, i) => /* @__PURE__ */
|
|
4833
|
-
|
|
4918
|
+
current.map((v, i) => /* @__PURE__ */ jsx53(
|
|
4919
|
+
View46,
|
|
4834
4920
|
{
|
|
4835
4921
|
accessible: true,
|
|
4836
4922
|
role: "slider",
|
|
@@ -4850,12 +4936,12 @@ function Slider({
|
|
|
4850
4936
|
},
|
|
4851
4937
|
pointerEvents: "none",
|
|
4852
4938
|
style: [styles41.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 }],
|
|
4853
|
-
children: floatingValue === "always" || floatingValue && dragging === i ? /* @__PURE__ */
|
|
4939
|
+
children: floatingValue === "always" || floatingValue && dragging === i ? /* @__PURE__ */ jsx53(View46, { "aria-hidden": true, style: [vertical ? styles41.bubbleVertical : styles41.bubble, { backgroundColor: theme.textPrimary, borderRadius: radius3.md }], children: /* @__PURE__ */ jsx53(Text17, { style: [styles41.bubbleText, { color: theme.surface0 }], children: formatValue(v) }) }) : null
|
|
4854
4940
|
},
|
|
4855
4941
|
i
|
|
4856
4942
|
))
|
|
4857
4943
|
] }),
|
|
4858
|
-
marks2?.length && !vertical ? /* @__PURE__ */
|
|
4944
|
+
marks2?.length && !vertical ? /* @__PURE__ */ jsx53(View46, { "aria-hidden": true, style: styles41.marks, children: marks2.map((m) => /* @__PURE__ */ jsx53(Text17, { style: [styles41.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
|
|
4859
4945
|
] });
|
|
4860
4946
|
}
|
|
4861
4947
|
var styles41 = StyleSheet41.create({
|
|
@@ -4894,10 +4980,10 @@ var styles41 = StyleSheet41.create({
|
|
|
4894
4980
|
|
|
4895
4981
|
// src/native/spinner.tsx
|
|
4896
4982
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
4897
|
-
import { jsx as
|
|
4983
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
4898
4984
|
function Spinner({ label, size = "md", ...props }) {
|
|
4899
4985
|
const { theme } = useTheme();
|
|
4900
|
-
return /* @__PURE__ */
|
|
4986
|
+
return /* @__PURE__ */ jsx54(
|
|
4901
4987
|
ActivityIndicator2,
|
|
4902
4988
|
{
|
|
4903
4989
|
accessible: true,
|
|
@@ -4913,8 +4999,8 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
4913
4999
|
|
|
4914
5000
|
// src/native/splash-handoff.tsx
|
|
4915
5001
|
import * as React39 from "react";
|
|
4916
|
-
import { Animated as Animated23, Easing as Easing13, StyleSheet as StyleSheet42, View as
|
|
4917
|
-
import { jsx as
|
|
5002
|
+
import { Animated as Animated23, Easing as Easing13, StyleSheet as StyleSheet42, View as View47 } from "react-native";
|
|
5003
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
4918
5004
|
function SplashHandoff({ product, ready, onShown, onDone, size = 96, background, label, duration = 320, style }) {
|
|
4919
5005
|
const { theme } = useTheme();
|
|
4920
5006
|
const reduce = useReducedMotion();
|
|
@@ -4932,7 +5018,7 @@ function SplashHandoff({ product, ready, onShown, onDone, size = 96, background,
|
|
|
4932
5018
|
return () => animation.stop();
|
|
4933
5019
|
}, [ready, reduce, duration, opacity, onDone]);
|
|
4934
5020
|
if (gone) return null;
|
|
4935
|
-
return /* @__PURE__ */
|
|
5021
|
+
return /* @__PURE__ */ jsx55(
|
|
4936
5022
|
Animated23.View,
|
|
4937
5023
|
{
|
|
4938
5024
|
accessible: true,
|
|
@@ -4942,26 +5028,26 @@ function SplashHandoff({ product, ready, onShown, onDone, size = 96, background,
|
|
|
4942
5028
|
pointerEvents: ready ? "none" : "auto",
|
|
4943
5029
|
onLayout: onShown,
|
|
4944
5030
|
style: [StyleSheet42.absoluteFill, styles42.root, { backgroundColor: background ?? theme.surface0, opacity }, style],
|
|
4945
|
-
children: /* @__PURE__ */
|
|
5031
|
+
children: /* @__PURE__ */ jsx55(View47, { children: /* @__PURE__ */ jsx55(ProductMark, { id: product, size, animated: true }) })
|
|
4946
5032
|
}
|
|
4947
5033
|
);
|
|
4948
5034
|
}
|
|
4949
5035
|
var styles42 = StyleSheet42.create({ root: { alignItems: "center", justifyContent: "center", zIndex: 100 } });
|
|
4950
5036
|
|
|
4951
5037
|
// src/native/step-progress.tsx
|
|
4952
|
-
import { Pressable as Pressable22, StyleSheet as StyleSheet43, View as
|
|
4953
|
-
import
|
|
4954
|
-
import { jsx as
|
|
5038
|
+
import { Pressable as Pressable22, StyleSheet as StyleSheet43, View as View48 } from "react-native";
|
|
5039
|
+
import Svg26, { Path as Path21 } from "react-native-svg";
|
|
5040
|
+
import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
4955
5041
|
function StepProgress({ step, total, label, backLabel, onBack, trailing, style }) {
|
|
4956
5042
|
const { theme, insets } = useTheme();
|
|
4957
5043
|
const words2 = label(step, total);
|
|
4958
|
-
return /* @__PURE__ */
|
|
4959
|
-
/* @__PURE__ */
|
|
4960
|
-
onBack && backLabel ? /* @__PURE__ */
|
|
4961
|
-
/* @__PURE__ */
|
|
4962
|
-
/* @__PURE__ */
|
|
5044
|
+
return /* @__PURE__ */ jsxs47(View48, { style: [styles43.root, { paddingTop: insets.top + 8 }, style], children: [
|
|
5045
|
+
/* @__PURE__ */ jsxs47(View48, { style: styles43.row, children: [
|
|
5046
|
+
onBack && backLabel ? /* @__PURE__ */ jsx56(Pressable22, { role: "button", "aria-label": backLabel, hitSlop: 10, onPress: onBack, style: styles43.back, children: /* @__PURE__ */ jsx56(Svg26, { width: 22, height: 22, viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsx56(Path21, { d: "M15 5l-7 7 7 7", stroke: theme.textPrimary, strokeWidth: 2.4, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : /* @__PURE__ */ jsx56(View48, { style: styles43.back }),
|
|
5047
|
+
/* @__PURE__ */ jsx56(View48, { accessible: true, role: "progressbar", "aria-label": words2, "aria-valuemin": 1, "aria-valuemax": total, "aria-valuenow": step, "aria-valuetext": words2, style: styles43.bars, children: Array.from({ length: total }, (_, i) => /* @__PURE__ */ jsx56(View48, { style: [styles43.bar, { backgroundColor: i < step ? theme.accent : theme.surface3 }] }, i)) }),
|
|
5048
|
+
/* @__PURE__ */ jsx56(View48, { style: styles43.trailing, children: trailing })
|
|
4963
5049
|
] }),
|
|
4964
|
-
/* @__PURE__ */
|
|
5050
|
+
/* @__PURE__ */ jsx56(Txt, { variant: "caption", tone: "secondary", style: styles43.words, "aria-hidden": true, children: words2 })
|
|
4965
5051
|
] });
|
|
4966
5052
|
}
|
|
4967
5053
|
var styles43 = StyleSheet43.create({
|
|
@@ -4975,31 +5061,31 @@ var styles43 = StyleSheet43.create({
|
|
|
4975
5061
|
});
|
|
4976
5062
|
|
|
4977
5063
|
// src/native/stepper.tsx
|
|
4978
|
-
import { StyleSheet as StyleSheet44, View as
|
|
4979
|
-
import
|
|
4980
|
-
import { jsx as
|
|
5064
|
+
import { StyleSheet as StyleSheet44, View as View49 } from "react-native";
|
|
5065
|
+
import Svg27, { Circle as Circle14, Path as Path22 } from "react-native-svg";
|
|
5066
|
+
import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
4981
5067
|
var WORDS = { done: "done", current: "in progress", upcoming: "to come", error: "failed" };
|
|
4982
5068
|
function Stepper({ steps, current = 0, orientation = "vertical", statusLabels, "aria-label": label, style }) {
|
|
4983
5069
|
const { theme } = useTheme();
|
|
4984
5070
|
const words2 = { ...WORDS, ...statusLabels };
|
|
4985
5071
|
const vertical = orientation === "vertical";
|
|
4986
|
-
return /* @__PURE__ */
|
|
5072
|
+
return /* @__PURE__ */ jsx57(View49, { role: "list", "aria-label": label, style: [vertical ? styles44.column : styles44.row, style], children: steps.map((step, i) => {
|
|
4987
5073
|
const status = step.status ?? (i < current ? "done" : i === current ? "current" : "upcoming");
|
|
4988
5074
|
const last = i === steps.length - 1;
|
|
4989
|
-
const node = status === "current" ? /* @__PURE__ */
|
|
4990
|
-
/* @__PURE__ */
|
|
4991
|
-
status === "done" ? /* @__PURE__ */
|
|
5075
|
+
const node = status === "current" ? /* @__PURE__ */ jsx57(LoaderGlyph, { value: step.value ?? null, size: 24 }) : status === "error" ? /* @__PURE__ */ jsx57(LoaderGlyph, { state: "error", size: 24 }) : /* @__PURE__ */ jsxs48(Svg27, { width: 24, height: 24, viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
5076
|
+
/* @__PURE__ */ jsx57(Circle14, { cx: 12, cy: 12, r: 10, fill: status === "done" ? theme.accent : "none", stroke: status === "done" ? theme.accent : theme.borderStrong, strokeWidth: 2 }),
|
|
5077
|
+
status === "done" ? /* @__PURE__ */ jsx57(Path22, { d: "M7.5 12.3l3 3 6-6.3", stroke: theme.onAccent, strokeWidth: 2.2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }) : null
|
|
4992
5078
|
] });
|
|
4993
|
-
const connector = !last ? /* @__PURE__ */
|
|
4994
|
-
return /* @__PURE__ */
|
|
4995
|
-
/* @__PURE__ */
|
|
5079
|
+
const connector = !last ? /* @__PURE__ */ jsx57(View49, { "aria-hidden": true, style: [vertical ? styles44.vLine : styles44.hLine, { backgroundColor: status === "done" ? theme.accent : theme.borderDefault }] }) : null;
|
|
5080
|
+
return /* @__PURE__ */ jsxs48(View49, { role: "listitem", accessible: true, "aria-label": `${step.title}, ${words2[status]}`, style: vertical ? styles44.vStep : styles44.hStep, children: [
|
|
5081
|
+
/* @__PURE__ */ jsxs48(View49, { style: vertical ? styles44.vRail : styles44.hRail, children: [
|
|
4996
5082
|
node,
|
|
4997
5083
|
connector
|
|
4998
5084
|
] }),
|
|
4999
|
-
/* @__PURE__ */
|
|
5000
|
-
/* @__PURE__ */
|
|
5001
|
-
step.description ? /* @__PURE__ */
|
|
5002
|
-
step.content && (status === "current" || status === "error") ? /* @__PURE__ */
|
|
5085
|
+
/* @__PURE__ */ jsxs48(View49, { style: [styles44.body, vertical && !last ? { paddingBottom: 20 } : null], children: [
|
|
5086
|
+
/* @__PURE__ */ jsx57(Txt, { variant: "label", tone: status === "upcoming" ? "secondary" : "text", numberOfLines: vertical ? void 0 : 2, children: step.title }),
|
|
5087
|
+
step.description ? /* @__PURE__ */ jsx57(Txt, { variant: "caption", tone: "secondary", children: step.description }) : null,
|
|
5088
|
+
step.content && (status === "current" || status === "error") ? /* @__PURE__ */ jsx57(View49, { style: styles44.content, children: step.content }) : null
|
|
5003
5089
|
] })
|
|
5004
5090
|
] }, i);
|
|
5005
5091
|
}) });
|
|
@@ -5019,17 +5105,17 @@ var styles44 = StyleSheet44.create({
|
|
|
5019
5105
|
|
|
5020
5106
|
// src/native/swipe-deck.tsx
|
|
5021
5107
|
import * as React40 from "react";
|
|
5022
|
-
import { AccessibilityInfo as AccessibilityInfo14, Animated as Animated24, Image as Image5, PanResponder as PanResponder3, Platform as Platform4, Pressable as Pressable23, StyleSheet as StyleSheet45, useWindowDimensions as useWindowDimensions2, View as
|
|
5023
|
-
import
|
|
5024
|
-
import { Fragment as Fragment8, jsx as
|
|
5108
|
+
import { AccessibilityInfo as AccessibilityInfo14, Animated as Animated24, Image as Image5, PanResponder as PanResponder3, Platform as Platform4, Pressable as Pressable23, StyleSheet as StyleSheet45, useWindowDimensions as useWindowDimensions2, View as View50 } from "react-native";
|
|
5109
|
+
import Svg28, { Defs as Defs13, LinearGradient as LinearGradient13, Path as Path23, Rect as Rect5, Stop as Stop13 } from "react-native-svg";
|
|
5110
|
+
import { Fragment as Fragment8, jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
5025
5111
|
function PersonCard({ photos, name, age, badge, meta, bio, footer, photoLabel = (n, t) => `Photo ${n} of ${t}`, style }) {
|
|
5026
5112
|
const { theme, radius: radius3 } = useTheme();
|
|
5027
5113
|
const [index, setIndex] = React40.useState(0);
|
|
5028
5114
|
const gradient = useSvgId("kz-profile-");
|
|
5029
5115
|
const [box, setBox] = React40.useState(null);
|
|
5030
5116
|
const photo = photos[index];
|
|
5031
|
-
return /* @__PURE__ */
|
|
5032
|
-
|
|
5117
|
+
return /* @__PURE__ */ jsxs49(
|
|
5118
|
+
View50,
|
|
5033
5119
|
{
|
|
5034
5120
|
accessible: Platform4.OS !== "web",
|
|
5035
5121
|
accessibilityActions: photos.length > 1 ? [{ name: "increment" }, { name: "decrement" }] : [],
|
|
@@ -5038,39 +5124,39 @@ function PersonCard({ photos, name, age, badge, meta, bio, footer, photoLabel =
|
|
|
5038
5124
|
"aria-label": [`${name}${age !== void 0 ? `, ${age}` : ""}`, bio, photos.length > 1 ? photoLabel(index + 1, photos.length) : null].filter(Boolean).join(". "),
|
|
5039
5125
|
style: [styles45.card, { borderRadius: radius3.xl, backgroundColor: theme.media }, style],
|
|
5040
5126
|
children: [
|
|
5041
|
-
photo ? /* @__PURE__ */
|
|
5042
|
-
photos.length > 1 ? /* @__PURE__ */
|
|
5043
|
-
/* @__PURE__ */
|
|
5044
|
-
/* @__PURE__ */
|
|
5045
|
-
/* @__PURE__ */
|
|
5127
|
+
photo ? /* @__PURE__ */ jsx58(Image5, { testID: "person-card-photo", source: { uri: photo.uri }, style: StyleSheet45.absoluteFill, resizeMode: "cover" }) : null,
|
|
5128
|
+
photos.length > 1 ? /* @__PURE__ */ jsxs49(Fragment8, { children: [
|
|
5129
|
+
/* @__PURE__ */ jsx58(View50, { style: styles45.bars, "aria-hidden": true, children: photos.map((_, i) => /* @__PURE__ */ jsx58(View50, { style: [styles45.bar, { backgroundColor: theme.textOnMedia, opacity: i === index ? 1 : 0.4 }] }, i)) }),
|
|
5130
|
+
/* @__PURE__ */ jsx58(Pressable23, { "aria-hidden": true, accessible: false, focusable: false, tabIndex: -1, style: [styles45.half, { left: 0 }], onPress: () => setIndex((i) => Math.max(0, i - 1)) }),
|
|
5131
|
+
/* @__PURE__ */ jsx58(Pressable23, { "aria-hidden": true, accessible: false, focusable: false, tabIndex: -1, style: [styles45.half, { right: 0 }], onPress: () => setIndex((i) => Math.min(photos.length - 1, i + 1)) })
|
|
5046
5132
|
] }) : null,
|
|
5047
|
-
/* @__PURE__ */
|
|
5048
|
-
|
|
5133
|
+
/* @__PURE__ */ jsxs49(
|
|
5134
|
+
View50,
|
|
5049
5135
|
{
|
|
5050
5136
|
testID: "person-card-overlay",
|
|
5051
5137
|
pointerEvents: "box-none",
|
|
5052
5138
|
style: styles45.bottom,
|
|
5053
5139
|
onLayout: (e) => setBox({ width: e.nativeEvent.layout.width, height: e.nativeEvent.layout.height }),
|
|
5054
5140
|
children: [
|
|
5055
|
-
box ? /* @__PURE__ */
|
|
5056
|
-
/* @__PURE__ */
|
|
5057
|
-
/* @__PURE__ */
|
|
5058
|
-
/* @__PURE__ */
|
|
5059
|
-
/* @__PURE__ */
|
|
5141
|
+
box ? /* @__PURE__ */ jsxs49(Svg28, { testID: "person-card-scrim", style: styles45.scrim, width: box.width, height: box.height, "aria-hidden": true, children: [
|
|
5142
|
+
/* @__PURE__ */ jsx58(Defs13, { children: /* @__PURE__ */ jsxs49(LinearGradient13, { id: gradient, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
5143
|
+
/* @__PURE__ */ jsx58(Stop13, { offset: "0", stopColor: theme.scrimStrong, stopOpacity: 0 }),
|
|
5144
|
+
/* @__PURE__ */ jsx58(Stop13, { offset: "0.5", stopColor: theme.scrimStrong, stopOpacity: 0.8 }),
|
|
5145
|
+
/* @__PURE__ */ jsx58(Stop13, { offset: "1", stopColor: theme.scrimStrong, stopOpacity: 1 })
|
|
5060
5146
|
] }) }),
|
|
5061
|
-
/* @__PURE__ */
|
|
5147
|
+
/* @__PURE__ */ jsx58(Rect5, { x: 0, y: 0, width: box.width, height: box.height, fill: `url(#${gradient})` })
|
|
5062
5148
|
] }) : null,
|
|
5063
|
-
/* @__PURE__ */
|
|
5064
|
-
/* @__PURE__ */
|
|
5065
|
-
/* @__PURE__ */
|
|
5149
|
+
/* @__PURE__ */ jsxs49(View50, { style: styles45.text, children: [
|
|
5150
|
+
/* @__PURE__ */ jsxs49(View50, { style: styles45.nameRow, children: [
|
|
5151
|
+
/* @__PURE__ */ jsxs49(Txt, { variant: "display", tone: "onMedia", style: styles45.name, numberOfLines: 1, children: [
|
|
5066
5152
|
name,
|
|
5067
|
-
age !== void 0 ? /* @__PURE__ */
|
|
5153
|
+
age !== void 0 ? /* @__PURE__ */ jsx58(Txt, { variant: "display", tone: "onMedia", style: styles45.age, children: ` ${age}` }) : null
|
|
5068
5154
|
] }),
|
|
5069
5155
|
badge
|
|
5070
5156
|
] }),
|
|
5071
5157
|
meta,
|
|
5072
|
-
bio ? /* @__PURE__ */
|
|
5073
|
-
footer ? /* @__PURE__ */
|
|
5158
|
+
bio ? /* @__PURE__ */ jsx58(Txt, { tone: "onMedia", numberOfLines: 2, children: bio }) : null,
|
|
5159
|
+
footer ? /* @__PURE__ */ jsx58(View50, { style: styles45.footer, children: footer }) : null
|
|
5074
5160
|
] })
|
|
5075
5161
|
]
|
|
5076
5162
|
}
|
|
@@ -5114,7 +5200,7 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5114
5200
|
const rotate = x.interpolate({ inputRange: [-width, 0, width], outputRange: ["-14deg", "0deg", "14deg"] });
|
|
5115
5201
|
const likeOpacity = x.interpolate({ inputRange: [0, width / 4], outputRange: [0, 1], extrapolate: "clamp" });
|
|
5116
5202
|
const passOpacity = x.interpolate({ inputRange: [-width / 4, 0], outputRange: [1, 0], extrapolate: "clamp" });
|
|
5117
|
-
const button = (direction) => /* @__PURE__ */
|
|
5203
|
+
const button = (direction) => /* @__PURE__ */ jsx58(
|
|
5118
5204
|
Pressable23,
|
|
5119
5205
|
{
|
|
5120
5206
|
role: "button",
|
|
@@ -5125,15 +5211,15 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5125
5211
|
styles45.button,
|
|
5126
5212
|
{ borderColor: direction === "like" ? theme.success : theme.danger, backgroundColor: theme.surface1, transform: [{ scale: pressed ? 0.92 : 1 }], opacity: top ? 1 : 0.4 }
|
|
5127
5213
|
],
|
|
5128
|
-
children: /* @__PURE__ */
|
|
5214
|
+
children: /* @__PURE__ */ jsx58(Svg28, { width: 28, height: 28, viewBox: "0 0 24 24", "aria-hidden": true, children: direction === "like" ? /* @__PURE__ */ jsx58(Path23, { 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__ */ jsx58(Path23, { d: "M6 6l12 12M18 6 6 18", stroke: theme.danger, strokeWidth: 3, strokeLinecap: "round" }) })
|
|
5129
5215
|
}
|
|
5130
5216
|
);
|
|
5131
|
-
return /* @__PURE__ */
|
|
5132
|
-
/* @__PURE__ */
|
|
5217
|
+
return /* @__PURE__ */ jsxs49(View50, { style: [styles45.deck, style], children: [
|
|
5218
|
+
/* @__PURE__ */ jsxs49(View50, { style: styles45.stack, children: [
|
|
5133
5219
|
!top ? empty2 ?? null : null,
|
|
5134
5220
|
items2.slice(0, 2).reverse().map((item) => {
|
|
5135
5221
|
const isTop = item === top;
|
|
5136
|
-
return /* @__PURE__ */
|
|
5222
|
+
return /* @__PURE__ */ jsxs49(
|
|
5137
5223
|
Animated24.View,
|
|
5138
5224
|
{
|
|
5139
5225
|
...isTop ? pan.panHandlers : {},
|
|
@@ -5145,9 +5231,9 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5145
5231
|
style: [StyleSheet45.absoluteFill, isTop ? { transform: [{ translateX: x }, { rotate }] } : { transform: [{ scale: 0.96 }], opacity: 0.9 }],
|
|
5146
5232
|
children: [
|
|
5147
5233
|
renderCard(item),
|
|
5148
|
-
isTop ? /* @__PURE__ */
|
|
5149
|
-
/* @__PURE__ */
|
|
5150
|
-
/* @__PURE__ */
|
|
5234
|
+
isTop ? /* @__PURE__ */ jsxs49(Fragment8, { children: [
|
|
5235
|
+
/* @__PURE__ */ jsx58(Animated24.View, { pointerEvents: "none", style: [styles45.stamp, styles45.stampLike, { borderColor: theme.success, opacity: likeOpacity }], "aria-hidden": true, children: /* @__PURE__ */ jsx58(Txt, { variant: "title", style: { color: theme.success }, children: labels.likeStamp ?? labels.like.toUpperCase() }) }),
|
|
5236
|
+
/* @__PURE__ */ jsx58(Animated24.View, { pointerEvents: "none", style: [styles45.stamp, styles45.stampPass, { borderColor: theme.danger, opacity: passOpacity }], "aria-hidden": true, children: /* @__PURE__ */ jsx58(Txt, { variant: "title", style: { color: theme.danger }, children: labels.passStamp ?? labels.pass.toUpperCase() }) })
|
|
5151
5237
|
] }) : null
|
|
5152
5238
|
]
|
|
5153
5239
|
},
|
|
@@ -5155,7 +5241,7 @@ function SwipeDeck({ items: items2, getId, renderCard, onSwipe, empty: empty2, l
|
|
|
5155
5241
|
);
|
|
5156
5242
|
})
|
|
5157
5243
|
] }),
|
|
5158
|
-
hideButtons ? null : /* @__PURE__ */
|
|
5244
|
+
hideButtons ? null : /* @__PURE__ */ jsxs49(View50, { style: styles45.buttons, children: [
|
|
5159
5245
|
button("pass"),
|
|
5160
5246
|
button("like")
|
|
5161
5247
|
] })
|
|
@@ -5184,8 +5270,8 @@ var styles45 = StyleSheet45.create({
|
|
|
5184
5270
|
|
|
5185
5271
|
// src/native/swipeable-row.tsx
|
|
5186
5272
|
import * as React41 from "react";
|
|
5187
|
-
import { Animated as Animated25, PanResponder as PanResponder4, Pressable as Pressable24, StyleSheet as StyleSheet46, View as
|
|
5188
|
-
import { jsx as
|
|
5273
|
+
import { Animated as Animated25, PanResponder as PanResponder4, Pressable as Pressable24, StyleSheet as StyleSheet46, View as View51 } from "react-native";
|
|
5274
|
+
import { jsx as jsx59, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
5189
5275
|
var toneColor = (t, tone3) => ({ neutral: t.surface3, accent: t.accent, success: t.success, warning: t.warning, danger: t.danger })[tone3 ?? "neutral"];
|
|
5190
5276
|
var toneText = (tone3) => tone3 === "neutral" || tone3 === void 0 ? "text" : "onAccent";
|
|
5191
5277
|
function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6, actionWidth = 80, onActivate, testID, style }) {
|
|
@@ -5233,18 +5319,18 @@ function SwipeableRow({ children, trailing = [], leading = [], fullSwipe = 0.6,
|
|
|
5233
5319
|
[trailing, leading, fullSwipe, width, actionWidth]
|
|
5234
5320
|
// eslint-disable-line react-hooks/exhaustive-deps -- run/settle are stable in effect
|
|
5235
5321
|
);
|
|
5236
|
-
const side = (actions, edge) => /* @__PURE__ */
|
|
5322
|
+
const side = (actions, edge) => /* @__PURE__ */ jsx59(View51, { "aria-hidden": true, style: [styles46.side, edge === "left" ? { left: 0 } : { right: 0, flexDirection: "row-reverse" }], children: actions.map((action, i) => (
|
|
5237
5323
|
// eslint-disable-next-line react-hooks/refs -- runs on a press, never during render
|
|
5238
|
-
/* @__PURE__ */
|
|
5324
|
+
/* @__PURE__ */ jsxs50(Pressable24, { focusable: false, tabIndex: -1, onPress: () => run(action), style: [styles46.action, { width: actionWidth, backgroundColor: toneColor(theme, action.tone) }], children: [
|
|
5239
5325
|
action.icon,
|
|
5240
|
-
/* @__PURE__ */
|
|
5326
|
+
/* @__PURE__ */ jsx59(Txt, { variant: "caption", tone: toneText(action.tone), style: styles46.actionText, numberOfLines: 1, children: action.label })
|
|
5241
5327
|
] }, i)
|
|
5242
5328
|
)) });
|
|
5243
5329
|
const all = [...leading, ...trailing];
|
|
5244
|
-
return /* @__PURE__ */
|
|
5330
|
+
return /* @__PURE__ */ jsxs50(View51, { style: [styles46.root, style], onLayout: (e) => setWidth(e.nativeEvent.layout.width), children: [
|
|
5245
5331
|
leading.length > 0 ? side(leading, "left") : null,
|
|
5246
5332
|
trailing.length > 0 ? side(trailing, "right") : null,
|
|
5247
|
-
/* @__PURE__ */
|
|
5333
|
+
/* @__PURE__ */ jsx59(
|
|
5248
5334
|
Animated25.View,
|
|
5249
5335
|
{
|
|
5250
5336
|
...pan.panHandlers,
|
|
@@ -5272,8 +5358,8 @@ var styles46 = StyleSheet46.create({
|
|
|
5272
5358
|
|
|
5273
5359
|
// src/native/switch.tsx
|
|
5274
5360
|
import * as React42 from "react";
|
|
5275
|
-
import { Animated as Animated26, Pressable as Pressable25, StyleSheet as StyleSheet47, Text as Text18, View as
|
|
5276
|
-
import { jsx as
|
|
5361
|
+
import { Animated as Animated26, Pressable as Pressable25, StyleSheet as StyleSheet47, Text as Text18, View as View52 } from "react-native";
|
|
5362
|
+
import { jsx as jsx60, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
5277
5363
|
var SIZES = { sm: { w: 40, h: 24, knob: 18 }, md: { w: 52, h: 32, knob: 26 } };
|
|
5278
5364
|
function Switch({ label, checked, defaultChecked = false, onCheckedChange, description, showLabel, size = "md", error, disabled, style }) {
|
|
5279
5365
|
const { theme, motion: motion3, haptic } = useTheme();
|
|
@@ -5290,7 +5376,7 @@ function Switch({ label, checked, defaultChecked = false, onCheckedChange, descr
|
|
|
5290
5376
|
if (checked === void 0) setOwn(!on);
|
|
5291
5377
|
onCheckedChange?.(!on);
|
|
5292
5378
|
};
|
|
5293
|
-
const track = /* @__PURE__ */
|
|
5379
|
+
const track = /* @__PURE__ */ jsx60(View52, { style: [styles47.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__ */ jsx60(
|
|
5294
5380
|
Animated26.View,
|
|
5295
5381
|
{
|
|
5296
5382
|
style: [
|
|
@@ -5316,16 +5402,16 @@ function Switch({ label, checked, defaultChecked = false, onCheckedChange, descr
|
|
|
5316
5402
|
onPress: toggle
|
|
5317
5403
|
};
|
|
5318
5404
|
if (!showLabel)
|
|
5319
|
-
return /* @__PURE__ */
|
|
5320
|
-
return /* @__PURE__ */
|
|
5321
|
-
/* @__PURE__ */
|
|
5322
|
-
/* @__PURE__ */
|
|
5323
|
-
/* @__PURE__ */
|
|
5324
|
-
description ? /* @__PURE__ */
|
|
5405
|
+
return /* @__PURE__ */ jsx60(Pressable25, { ...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 ? styles47.disabled : null, style], children: track });
|
|
5406
|
+
return /* @__PURE__ */ jsxs51(View52, { style: [styles47.root, style], children: [
|
|
5407
|
+
/* @__PURE__ */ jsxs51(Pressable25, { ...a11y, style: [styles47.row, disabled ? styles47.disabled : null], children: [
|
|
5408
|
+
/* @__PURE__ */ jsxs51(View52, { style: styles47.text, children: [
|
|
5409
|
+
/* @__PURE__ */ jsx60(Text18, { style: [styles47.label, { color: theme.textPrimary }], children: label }),
|
|
5410
|
+
description ? /* @__PURE__ */ jsx60(Text18, { style: [styles47.description, { color: theme.textSecondary }], children: description }) : null
|
|
5325
5411
|
] }),
|
|
5326
5412
|
track
|
|
5327
5413
|
] }),
|
|
5328
|
-
error ? /* @__PURE__ */
|
|
5414
|
+
error ? /* @__PURE__ */ jsx60(Text18, { role: "alert", "aria-live": "polite", style: [styles47.description, { color: theme.dangerText }], children: error }) : null
|
|
5329
5415
|
] });
|
|
5330
5416
|
}
|
|
5331
5417
|
var styles47 = StyleSheet47.create({
|
|
@@ -5340,15 +5426,15 @@ var styles47 = StyleSheet47.create({
|
|
|
5340
5426
|
});
|
|
5341
5427
|
|
|
5342
5428
|
// src/native/tab-bar.tsx
|
|
5343
|
-
import { Pressable as Pressable26, StyleSheet as StyleSheet48, Text as Text19, View as
|
|
5344
|
-
import { jsx as
|
|
5429
|
+
import { Pressable as Pressable26, StyleSheet as StyleSheet48, Text as Text19, View as View53 } from "react-native";
|
|
5430
|
+
import { jsx as jsx61, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
5345
5431
|
function TabBar({ items: items2, value, onValueChange, onReselect, "aria-label": label, style }) {
|
|
5346
5432
|
const { theme, insets, haptic } = useTheme();
|
|
5347
|
-
return /* @__PURE__ */
|
|
5433
|
+
return /* @__PURE__ */ jsx61(View53, { role: "tablist", "aria-label": label, style: [styles48.bar, { backgroundColor: theme.glassBg, borderTopColor: theme.glassBorder, paddingBottom: Math.max(6, insets.bottom) }, style], children: items2.map((item) => {
|
|
5348
5434
|
const selected = item.value === value;
|
|
5349
5435
|
const color = selected ? theme.accentText : theme.textSecondary;
|
|
5350
5436
|
const badge = item.badge === true ? "" : typeof item.badge === "number" && item.badge > 0 ? item.badge > 99 ? "99+" : String(item.badge) : null;
|
|
5351
|
-
return /* @__PURE__ */
|
|
5437
|
+
return /* @__PURE__ */ jsxs52(
|
|
5352
5438
|
Pressable26,
|
|
5353
5439
|
{
|
|
5354
5440
|
role: "tab",
|
|
@@ -5360,12 +5446,12 @@ function TabBar({ items: items2, value, onValueChange, onReselect, "aria-label":
|
|
|
5360
5446
|
},
|
|
5361
5447
|
style: ({ pressed }) => [styles48.item, { opacity: pressed ? 0.7 : 1 }],
|
|
5362
5448
|
children: [
|
|
5363
|
-
/* @__PURE__ */
|
|
5449
|
+
/* @__PURE__ */ jsxs52(View53, { "aria-hidden": true, style: styles48.icon, children: [
|
|
5364
5450
|
item.icon(selected, color),
|
|
5365
|
-
badge !== null ? /* @__PURE__ */
|
|
5451
|
+
badge !== null ? /* @__PURE__ */ jsx61(View53, { style: [badge ? styles48.count : styles48.dot, { backgroundColor: theme.danger, borderColor: theme.surface1 }], children: badge ? /* @__PURE__ */ jsx61(Text19, { style: [styles48.countText, { color: theme.onAccent }], children: badge }) : null }) : null
|
|
5366
5452
|
] }),
|
|
5367
|
-
/* @__PURE__ */
|
|
5368
|
-
badge !== null && item.badgeLabel ? /* @__PURE__ */
|
|
5453
|
+
/* @__PURE__ */ jsx61(Text19, { numberOfLines: 1, style: [styles48.label, { color, fontWeight: selected ? "700" : "500" }], children: item.label }),
|
|
5454
|
+
badge !== null && item.badgeLabel ? /* @__PURE__ */ jsx61(Text19, { style: styles48.unseen, children: `, ${item.badgeLabel}` }) : null
|
|
5369
5455
|
]
|
|
5370
5456
|
},
|
|
5371
5457
|
item.value
|
|
@@ -5385,8 +5471,8 @@ var styles48 = StyleSheet48.create({
|
|
|
5385
5471
|
|
|
5386
5472
|
// src/native/tabs.tsx
|
|
5387
5473
|
import * as React43 from "react";
|
|
5388
|
-
import { Pressable as Pressable27, ScrollView as ScrollView7, StyleSheet as StyleSheet49, View as
|
|
5389
|
-
import { jsx as
|
|
5474
|
+
import { Pressable as Pressable27, ScrollView as ScrollView7, StyleSheet as StyleSheet49, View as View54 } from "react-native";
|
|
5475
|
+
import { jsx as jsx62, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
5390
5476
|
function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label": label, variant = "underline", style }) {
|
|
5391
5477
|
const { theme, radius: radius3, haptic } = useTheme();
|
|
5392
5478
|
const [own, setOwn] = React43.useState(defaultValue ?? items2[0]?.value);
|
|
@@ -5400,7 +5486,7 @@ function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label":
|
|
|
5400
5486
|
const segmented = variant === "segmented";
|
|
5401
5487
|
const tabs = items2.map((item) => {
|
|
5402
5488
|
const selected = item.value === current;
|
|
5403
|
-
return /* @__PURE__ */
|
|
5489
|
+
return /* @__PURE__ */ jsx62(
|
|
5404
5490
|
Pressable27,
|
|
5405
5491
|
{
|
|
5406
5492
|
role: "tab",
|
|
@@ -5414,18 +5500,18 @@ function Tabs({ items: items2, value, defaultValue, onValueChange, "aria-label":
|
|
|
5414
5500
|
!segmented ? { borderBottomColor: selected ? theme.accent : "transparent" } : null,
|
|
5415
5501
|
item.disabled ? styles49.disabled : null
|
|
5416
5502
|
],
|
|
5417
|
-
children: /* @__PURE__ */
|
|
5503
|
+
children: /* @__PURE__ */ jsxs53(Txt, { variant: "label", tone: selected ? "text" : "secondary", numberOfLines: 1, children: [
|
|
5418
5504
|
item.label,
|
|
5419
|
-
item.count !== void 0 ? /* @__PURE__ */
|
|
5505
|
+
item.count !== void 0 ? /* @__PURE__ */ jsx62(Txt, { variant: "caption", tone: "secondary", children: ` ${item.count}` }) : null
|
|
5420
5506
|
] })
|
|
5421
5507
|
},
|
|
5422
5508
|
item.value
|
|
5423
5509
|
);
|
|
5424
5510
|
});
|
|
5425
5511
|
const panel = items2.find((i) => i.value === current)?.content;
|
|
5426
|
-
return /* @__PURE__ */
|
|
5427
|
-
segmented ? /* @__PURE__ */
|
|
5428
|
-
panel !== void 0 ? /* @__PURE__ */
|
|
5512
|
+
return /* @__PURE__ */ jsxs53(View54, { style: [styles49.root, style], children: [
|
|
5513
|
+
segmented ? /* @__PURE__ */ jsx62(View54, { role: "tablist", "aria-label": label, style: [styles49.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md }], children: tabs }) : /* @__PURE__ */ jsx62(View54, { style: [styles49.underline, { borderBottomColor: theme.borderSubtle }], children: /* @__PURE__ */ jsx62(ScrollView7, { horizontal: true, showsHorizontalScrollIndicator: false, role: "tablist", "aria-label": label, contentContainerStyle: styles49.scroll, children: tabs }) }),
|
|
5514
|
+
panel !== void 0 ? /* @__PURE__ */ jsx62(View54, { role: "tabpanel", children: panel }) : null
|
|
5429
5515
|
] });
|
|
5430
5516
|
}
|
|
5431
5517
|
var styles49 = StyleSheet49.create({
|
|
@@ -5439,15 +5525,15 @@ var styles49 = StyleSheet49.create({
|
|
|
5439
5525
|
});
|
|
5440
5526
|
|
|
5441
5527
|
// src/native/tag-selector.tsx
|
|
5442
|
-
import { StyleSheet as StyleSheet50, View as
|
|
5443
|
-
import { jsx as
|
|
5528
|
+
import { StyleSheet as StyleSheet50, View as View55 } from "react-native";
|
|
5529
|
+
import { jsx as jsx63, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
5444
5530
|
function TagSelector({ label, options, value, onValueChange, max, countLabel, style }) {
|
|
5445
5531
|
const { haptic } = useTheme();
|
|
5446
5532
|
const full = max !== void 0 && value.length >= max;
|
|
5447
|
-
return /* @__PURE__ */
|
|
5448
|
-
/* @__PURE__ */
|
|
5533
|
+
return /* @__PURE__ */ jsxs54(View55, { style: [styles50.root, style], children: [
|
|
5534
|
+
/* @__PURE__ */ jsx63(View55, { role: "group", "aria-label": label, style: styles50.wrap, children: options.map((option) => {
|
|
5449
5535
|
const on = value.includes(option.value);
|
|
5450
|
-
return /* @__PURE__ */
|
|
5536
|
+
return /* @__PURE__ */ jsx63(
|
|
5451
5537
|
Chip,
|
|
5452
5538
|
{
|
|
5453
5539
|
selected: on,
|
|
@@ -5461,15 +5547,15 @@ function TagSelector({ label, options, value, onValueChange, max, countLabel, st
|
|
|
5461
5547
|
option.value
|
|
5462
5548
|
);
|
|
5463
5549
|
}) }),
|
|
5464
|
-
max !== void 0 && countLabel ? /* @__PURE__ */
|
|
5550
|
+
max !== void 0 && countLabel ? /* @__PURE__ */ jsx63(Txt, { variant: "caption", tone: full ? "accent" : "secondary", "aria-live": "polite", children: countLabel(value.length, max) }) : null
|
|
5465
5551
|
] });
|
|
5466
5552
|
}
|
|
5467
5553
|
var styles50 = StyleSheet50.create({ root: { gap: 8 }, wrap: { flexDirection: "row", flexWrap: "wrap", gap: 8 } });
|
|
5468
5554
|
|
|
5469
5555
|
// src/native/toast.tsx
|
|
5470
5556
|
import * as React44 from "react";
|
|
5471
|
-
import { AccessibilityInfo as AccessibilityInfo15, Animated as Animated27, PanResponder as PanResponder5, Pressable as Pressable28, StyleSheet as StyleSheet51, Text as Text20, View as
|
|
5472
|
-
import { Fragment as Fragment9, jsx as
|
|
5557
|
+
import { AccessibilityInfo as AccessibilityInfo15, Animated as Animated27, PanResponder as PanResponder5, Pressable as Pressable28, StyleSheet as StyleSheet51, Text as Text20, View as View56 } from "react-native";
|
|
5558
|
+
import { Fragment as Fragment9, jsx as jsx64, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
5473
5559
|
var items = [];
|
|
5474
5560
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
5475
5561
|
var counter = 0;
|
|
@@ -5536,15 +5622,15 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
5536
5622
|
return () => clearTimeout(timer2);
|
|
5537
5623
|
}, [item.id, ms]);
|
|
5538
5624
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
5539
|
-
const text = /* @__PURE__ */
|
|
5540
|
-
item.icon ? /* @__PURE__ */
|
|
5541
|
-
/* @__PURE__ */
|
|
5542
|
-
/* @__PURE__ */
|
|
5543
|
-
item.description ? /* @__PURE__ */
|
|
5625
|
+
const text = /* @__PURE__ */ jsxs55(Fragment9, { children: [
|
|
5626
|
+
item.icon ? /* @__PURE__ */ jsx64(View56, { "aria-hidden": true, children: item.icon }) : null,
|
|
5627
|
+
/* @__PURE__ */ jsxs55(View56, { style: styles51.content, children: [
|
|
5628
|
+
/* @__PURE__ */ jsx64(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
5629
|
+
item.description ? /* @__PURE__ */ jsx64(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
5544
5630
|
] })
|
|
5545
5631
|
] });
|
|
5546
|
-
const body = /* @__PURE__ */
|
|
5547
|
-
item.onPress ? /* @__PURE__ */
|
|
5632
|
+
const body = /* @__PURE__ */ jsxs55(Fragment9, { children: [
|
|
5633
|
+
item.onPress ? /* @__PURE__ */ jsx64(
|
|
5548
5634
|
Pressable28,
|
|
5549
5635
|
{
|
|
5550
5636
|
role: "button",
|
|
@@ -5555,8 +5641,8 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
5555
5641
|
style: ({ pressed }) => [styles51.main, { opacity: pressed ? 0.8 : 1 }],
|
|
5556
5642
|
children: text
|
|
5557
5643
|
}
|
|
5558
|
-
) : /* @__PURE__ */
|
|
5559
|
-
item.action ? /* @__PURE__ */
|
|
5644
|
+
) : /* @__PURE__ */ jsx64(View56, { style: styles51.main, children: text }),
|
|
5645
|
+
item.action ? /* @__PURE__ */ jsx64(
|
|
5560
5646
|
Pressable28,
|
|
5561
5647
|
{
|
|
5562
5648
|
role: "button",
|
|
@@ -5565,23 +5651,23 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
5565
5651
|
dismiss(item.id);
|
|
5566
5652
|
},
|
|
5567
5653
|
style: [styles51.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
5568
|
-
children: /* @__PURE__ */
|
|
5654
|
+
children: /* @__PURE__ */ jsx64(Text20, { style: [styles51.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
5569
5655
|
}
|
|
5570
5656
|
) : null,
|
|
5571
|
-
/* @__PURE__ */
|
|
5657
|
+
/* @__PURE__ */ jsx64(Pressable28, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles51.close, children: /* @__PURE__ */ jsx64(Text20, { style: [styles51.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
5572
5658
|
] });
|
|
5573
5659
|
const frame = [
|
|
5574
5660
|
styles51.toast,
|
|
5575
5661
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
5576
5662
|
];
|
|
5577
5663
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }, { translateX: swipe }] };
|
|
5578
|
-
return /* @__PURE__ */
|
|
5664
|
+
return /* @__PURE__ */ jsx64(Animated27.View, { "aria-live": "polite", style: motion3, ...drag.panHandlers, children: /* @__PURE__ */ jsx64(View56, { style: frame, children: body }) });
|
|
5579
5665
|
}
|
|
5580
5666
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
5581
5667
|
const all = React44.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
5582
5668
|
const shown = all.slice(-max);
|
|
5583
5669
|
if (shown.length === 0) return null;
|
|
5584
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsx64(View56, { pointerEvents: "box-none", style: [styles51.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx64(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
5585
5671
|
}
|
|
5586
5672
|
var styles51 = StyleSheet51.create({
|
|
5587
5673
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
@@ -5606,15 +5692,15 @@ var styles51 = StyleSheet51.create({
|
|
|
5606
5692
|
});
|
|
5607
5693
|
|
|
5608
5694
|
// src/native/verified-badge.tsx
|
|
5609
|
-
import { StyleSheet as StyleSheet52, View as
|
|
5610
|
-
import
|
|
5611
|
-
import { jsx as
|
|
5695
|
+
import { StyleSheet as StyleSheet52, View as View57 } from "react-native";
|
|
5696
|
+
import Svg29, { Path as Path24 } from "react-native-svg";
|
|
5697
|
+
import { jsx as jsx65, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
5612
5698
|
function VerifiedBadge({ label, showLabel, size = 16, on = "surface" }) {
|
|
5613
5699
|
const { theme } = useTheme();
|
|
5614
|
-
return /* @__PURE__ */
|
|
5615
|
-
/* @__PURE__ */
|
|
5616
|
-
/* @__PURE__ */
|
|
5617
|
-
|
|
5700
|
+
return /* @__PURE__ */ jsxs56(View57, { accessible: true, role: "img", "aria-label": label, style: styles52.row, children: [
|
|
5701
|
+
/* @__PURE__ */ jsxs56(Svg29, { width: size, height: size, viewBox: "0 0 24 24", "aria-hidden": true, children: [
|
|
5702
|
+
/* @__PURE__ */ jsx65(
|
|
5703
|
+
Path24,
|
|
5618
5704
|
{
|
|
5619
5705
|
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",
|
|
5620
5706
|
fill: theme.accent,
|
|
@@ -5622,9 +5708,9 @@ function VerifiedBadge({ label, showLabel, size = 16, on = "surface" }) {
|
|
|
5622
5708
|
strokeWidth: 1.2
|
|
5623
5709
|
}
|
|
5624
5710
|
),
|
|
5625
|
-
/* @__PURE__ */
|
|
5711
|
+
/* @__PURE__ */ jsx65(Path24, { d: "M8.3 12.3l2.5 2.5 4.9-5.2", fill: "none", stroke: theme.onAccent, strokeWidth: 2.2, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
5626
5712
|
] }),
|
|
5627
|
-
showLabel ? /* @__PURE__ */
|
|
5713
|
+
showLabel ? /* @__PURE__ */ jsx65(Txt, { variant: "caption", tone: on === "media" ? "onMedia" : "accent", style: styles52.text, children: label }) : null
|
|
5628
5714
|
] });
|
|
5629
5715
|
}
|
|
5630
5716
|
var styles52 = StyleSheet52.create({ row: { flexDirection: "row", alignItems: "center", gap: 4 }, text: { fontWeight: "700" } });
|
|
@@ -5721,6 +5807,7 @@ export {
|
|
|
5721
5807
|
WheelPicker,
|
|
5722
5808
|
YasakiaMark,
|
|
5723
5809
|
YazakiaMark,
|
|
5810
|
+
YomizakaMark,
|
|
5724
5811
|
YororisMark,
|
|
5725
5812
|
addDays,
|
|
5726
5813
|
addMonths,
|