@krizaka/ui 2.10.0 → 3.1.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 -2
- package/dist/audio-player.js +1 -1
- package/dist/{chunk-EUPTXKH7.js → chunk-BRKMQ6JV.js} +2 -1
- package/dist/chunk-FDCMBWUU.js +168 -0
- package/dist/chunk-FDCMBWUU.js.map +1 -0
- package/dist/chunk-HCNOOPZE.js +210 -0
- package/dist/chunk-HCNOOPZE.js.map +1 -0
- package/dist/{chunk-X6TW3X6Y.js → chunk-LCZXS6AK.js} +2 -2
- package/dist/chunk-OGJI5X4W.js +157 -0
- package/dist/chunk-OGJI5X4W.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/data-table.d.ts +284 -24
- package/dist/data-table.js +914 -121
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/filter-bar.d.ts +12 -12
- package/dist/filter-bar.js +9 -145
- package/dist/filter-bar.js.map +1 -1
- package/dist/form/server.d.ts +96 -0
- package/dist/form/server.js +82 -0
- package/dist/form/server.js.map +1 -0
- package/dist/form.d.ts +503 -0
- package/dist/form.js +760 -0
- package/dist/form.js.map +1 -0
- package/dist/image-cropper.js +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/native/form.d.ts +376 -0
- package/dist/native/form.js +650 -0
- package/dist/native/form.js.map +1 -0
- package/dist/native/list.d.ts +95 -0
- package/dist/native/list.js +135 -0
- package/dist/native/list.js.map +1 -0
- package/dist/native.d.ts +113 -2
- package/dist/native.js +618 -388
- package/dist/native.js.map +1 -1
- package/dist/search-field.js +6 -160
- package/dist/search-field.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/video-player.js +1 -1
- package/dist/video-trimmer.js +1 -1
- package/dist/virtual.d.ts +140 -0
- package/dist/virtual.js +19 -0
- package/dist/virtual.js.map +1 -0
- package/package.json +111 -8
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +1 -1
- package/registry/checkbox.json +89 -4
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +643 -49
- package/registry/date-picker.json +142 -4
- package/registry/decision-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/checkbox/native/terms.d.ts +4 -0
- package/registry/examples/checkbox/native/terms.dark.png +0 -0
- package/registry/examples/checkbox/native/terms.js +26 -0
- package/registry/examples/checkbox/native/terms.light.png +0 -0
- package/registry/examples/checkbox/native/terms.tsx +28 -0
- package/registry/examples/data-table/details.d.ts +4 -0
- package/registry/examples/data-table/details.js +33 -0
- package/registry/examples/data-table/details.tsx +31 -0
- package/registry/examples/data-table/filters.d.ts +4 -0
- package/registry/examples/data-table/filters.js +40 -0
- package/registry/examples/data-table/filters.tsx +40 -0
- package/registry/examples/data-table/grouped.d.ts +4 -0
- package/registry/examples/data-table/grouped.js +24 -0
- package/registry/examples/data-table/grouped.tsx +23 -0
- package/registry/examples/data-table/paginated.d.ts +4 -0
- package/registry/examples/data-table/paginated.js +23 -0
- package/registry/examples/data-table/paginated.tsx +22 -0
- package/registry/examples/data-table/pinned.d.ts +4 -0
- package/registry/examples/data-table/pinned.js +26 -0
- package/registry/examples/data-table/pinned.tsx +25 -0
- package/registry/examples/data-table/server.d.ts +4 -0
- package/registry/examples/data-table/server.js +40 -0
- package/registry/examples/data-table/server.tsx +40 -0
- package/registry/examples/data-table/virtualized.js +2 -2
- package/registry/examples/data-table/virtualized.tsx +3 -3
- package/registry/examples/date-picker/native/birth-date.d.ts +4 -0
- package/registry/examples/date-picker/native/birth-date.dark.png +0 -0
- package/registry/examples/date-picker/native/birth-date.js +30 -0
- package/registry/examples/date-picker/native/birth-date.light.png +0 -0
- package/registry/examples/date-picker/native/birth-date.tsx +27 -0
- package/registry/examples/field/native/default.d.ts +4 -0
- package/registry/examples/field/native/default.dark.png +0 -0
- package/registry/examples/field/native/default.js +29 -0
- package/registry/examples/field/native/default.light.png +0 -0
- package/registry/examples/field/native/default.tsx +23 -0
- package/registry/examples/form/amount.d.ts +4 -0
- package/registry/examples/form/amount.js +30 -0
- package/registry/examples/form/amount.tsx +36 -0
- package/registry/examples/form/audience.d.ts +4 -0
- package/registry/examples/form/audience.js +29 -0
- package/registry/examples/form/audience.tsx +31 -0
- package/registry/examples/form/native/amount.d.ts +4 -0
- package/registry/examples/form/native/amount.dark.png +0 -0
- package/registry/examples/form/native/amount.js +26 -0
- package/registry/examples/form/native/amount.light.png +0 -0
- package/registry/examples/form/native/amount.tsx +30 -0
- package/registry/examples/form/native/audience.d.ts +4 -0
- package/registry/examples/form/native/audience.dark.png +0 -0
- package/registry/examples/form/native/audience.js +24 -0
- package/registry/examples/form/native/audience.light.png +0 -0
- package/registry/examples/form/native/audience.tsx +24 -0
- package/registry/examples/form/native/profile.d.ts +4 -0
- package/registry/examples/form/native/profile.dark.png +0 -0
- package/registry/examples/form/native/profile.js +33 -0
- package/registry/examples/form/native/profile.light.png +0 -0
- package/registry/examples/form/native/profile.tsx +36 -0
- package/registry/examples/form/native/settings.d.ts +4 -0
- package/registry/examples/form/native/settings.dark.png +0 -0
- package/registry/examples/form/native/settings.js +25 -0
- package/registry/examples/form/native/settings.light.png +0 -0
- package/registry/examples/form/native/settings.tsx +23 -0
- package/registry/examples/form/native/sign-up.d.ts +4 -0
- package/registry/examples/form/native/sign-up.dark.png +0 -0
- package/registry/examples/form/native/sign-up.js +38 -0
- package/registry/examples/form/native/sign-up.light.png +0 -0
- package/registry/examples/form/native/sign-up.tsx +34 -0
- package/registry/examples/form/native/upload.d.ts +4 -0
- package/registry/examples/form/native/upload.dark.png +0 -0
- package/registry/examples/form/native/upload.js +23 -0
- package/registry/examples/form/native/upload.light.png +0 -0
- package/registry/examples/form/native/upload.tsx +22 -0
- package/registry/examples/form/profile.d.ts +4 -0
- package/registry/examples/form/profile.js +35 -0
- package/registry/examples/form/profile.tsx +40 -0
- package/registry/examples/form/report.d.ts +4 -0
- package/registry/examples/form/report.js +30 -0
- package/registry/examples/form/report.tsx +30 -0
- package/registry/examples/form/settings.d.ts +4 -0
- package/registry/examples/form/settings.js +30 -0
- package/registry/examples/form/settings.tsx +31 -0
- package/registry/examples/form/sign-up.d.ts +4 -0
- package/registry/examples/form/sign-up.js +38 -0
- package/registry/examples/form/sign-up.tsx +37 -0
- package/registry/examples/form/upload.d.ts +4 -0
- package/registry/examples/form/upload.js +32 -0
- package/registry/examples/form/upload.tsx +32 -0
- package/registry/examples/list/native/default.d.ts +4 -0
- package/registry/examples/list/native/default.dark.png +0 -0
- package/registry/examples/list/native/default.js +33 -0
- package/registry/examples/list/native/default.light.png +0 -0
- package/registry/examples/list/native/default.tsx +31 -0
- package/registry/examples/list/native/infinite.d.ts +4 -0
- package/registry/examples/list/native/infinite.dark.png +0 -0
- package/registry/examples/list/native/infinite.js +30 -0
- package/registry/examples/list/native/infinite.light.png +0 -0
- package/registry/examples/list/native/infinite.tsx +35 -0
- package/registry/examples/list/native/states.d.ts +4 -0
- package/registry/examples/list/native/states.dark.png +0 -0
- package/registry/examples/list/native/states.js +26 -0
- package/registry/examples/list/native/states.light.png +0 -0
- package/registry/examples/list/native/states.tsx +21 -0
- package/registry/examples/virtual/feed.d.ts +4 -0
- package/registry/examples/virtual/feed.js +26 -0
- package/registry/examples/virtual/feed.tsx +24 -0
- package/registry/examples/virtual/gallery.d.ts +4 -0
- package/registry/examples/virtual/gallery.js +31 -0
- package/registry/examples/virtual/gallery.tsx +28 -0
- package/registry/examples/virtual/messages.d.ts +4 -0
- package/registry/examples/virtual/messages.js +28 -0
- package/registry/examples/virtual/messages.tsx +28 -0
- package/registry/field.json +104 -4
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/form.json +2940 -0
- package/registry/gallery-page.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +86 -11
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +249 -0
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +2 -2
- package/registry/mascots.json +2 -2
- package/registry/media-capture.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +569 -0
- package/skills/data-table/SKILL.md +56 -0
- package/skills/form/SKILL.md +44 -0
- package/skills/native-list/SKILL.md +39 -0
- package/skills/virtual/SKILL.md +35 -0
- /package/dist/{chunk-EUPTXKH7.js.map → chunk-BRKMQ6JV.js.map} +0 -0
- /package/dist/{chunk-X6TW3X6Y.js.map → chunk-LCZXS6AK.js.map} +0 -0
package/dist/native.js
CHANGED
|
@@ -27,6 +27,35 @@ function countdownParts(ms, units) {
|
|
|
27
27
|
return d > 0 ? [[d, units.d], [h, units.h], [m, units.m]] : [[h, units.h], [m, units.m], [s, units.s]];
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
// src/date-picker/parts.ts
|
|
31
|
+
var DATE_PART_LENGTH = { day: 2, month: 2, year: 4 };
|
|
32
|
+
function datePartsOrder(locale) {
|
|
33
|
+
try {
|
|
34
|
+
const parts = new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric" }).formatToParts(new Date(2001, 10, 22));
|
|
35
|
+
const order = parts.map((p) => p.type).filter((t) => t === "day" || t === "month" || t === "year");
|
|
36
|
+
if (order.length === 3) return order;
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
39
|
+
return ["day", "month", "year"];
|
|
40
|
+
}
|
|
41
|
+
function composeDate(parts) {
|
|
42
|
+
if (!parts.day && !parts.month && !parts.year) return "";
|
|
43
|
+
const pad = (v) => v.length === 1 ? `0${v}` : v;
|
|
44
|
+
return `${parts.year}-${pad(parts.month)}-${pad(parts.day)}`;
|
|
45
|
+
}
|
|
46
|
+
function splitDate(value) {
|
|
47
|
+
const m = /^(\d*)-(\d*)-(\d*)$/.exec(value ?? "");
|
|
48
|
+
return m ? { year: m[1], month: m[2], day: m[3] } : { day: "", month: "", year: "" };
|
|
49
|
+
}
|
|
50
|
+
function isRealDate(value) {
|
|
51
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return false;
|
|
52
|
+
const date = /* @__PURE__ */ new Date(`${value}T00:00:00Z`);
|
|
53
|
+
return !Number.isNaN(date.getTime()) && date.toISOString().slice(0, 10) === value;
|
|
54
|
+
}
|
|
55
|
+
function latestBirthDate(age, today = /* @__PURE__ */ new Date()) {
|
|
56
|
+
return new Date(Date.UTC(today.getFullYear() - age, today.getMonth(), today.getDate())).toISOString().slice(0, 10);
|
|
57
|
+
}
|
|
58
|
+
|
|
30
59
|
// src/native/avatar.tsx
|
|
31
60
|
import * as React2 from "react";
|
|
32
61
|
import { Image, StyleSheet, Text, View } from "react-native";
|
|
@@ -572,19 +601,77 @@ var styles5 = StyleSheet5.create({
|
|
|
572
601
|
footer: { flexDirection: "row", alignItems: "center", gap: 8, borderTopWidth: StyleSheet5.hairlineWidth, paddingTop: 12, marginTop: "auto" }
|
|
573
602
|
});
|
|
574
603
|
|
|
575
|
-
// src/native/
|
|
604
|
+
// src/native/checkbox.tsx
|
|
576
605
|
import * as React5 from "react";
|
|
577
|
-
import { Pressable as Pressable3,
|
|
578
|
-
import
|
|
579
|
-
|
|
606
|
+
import { Pressable as Pressable3, StyleSheet as StyleSheet6, Text as Text4, View as View4 } from "react-native";
|
|
607
|
+
import Svg2, { Path } from "react-native-svg";
|
|
608
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
609
|
+
function Checkbox({ children, label, checked, defaultChecked = false, onCheckedChange, error, disabled, style }) {
|
|
610
|
+
const { theme, radius: radius3 } = useTheme();
|
|
611
|
+
const [own, setOwn] = React5.useState(defaultChecked);
|
|
612
|
+
const on = checked ?? own;
|
|
613
|
+
const toggle = () => {
|
|
614
|
+
if (checked === void 0) setOwn(!on);
|
|
615
|
+
onCheckedChange?.(!on);
|
|
616
|
+
};
|
|
617
|
+
const box = /* @__PURE__ */ jsx7(
|
|
618
|
+
View4,
|
|
619
|
+
{
|
|
620
|
+
style: [
|
|
621
|
+
styles6.box,
|
|
622
|
+
{ borderRadius: radius3.xs + 2, borderColor: error ? theme.danger : on ? theme.accent : theme.borderStrong, backgroundColor: on ? theme.accent : theme.surface1 }
|
|
623
|
+
],
|
|
624
|
+
children: on ? /* @__PURE__ */ jsx7(Svg2, { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", stroke: theme.onAccent, strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx7(Path, { d: "M20 6 9 17l-5-5" }) }) : null
|
|
625
|
+
}
|
|
626
|
+
);
|
|
627
|
+
const plain = children === void 0 || typeof children === "string";
|
|
628
|
+
const a11y = {
|
|
629
|
+
role: "checkbox",
|
|
630
|
+
"aria-checked": on,
|
|
631
|
+
"aria-disabled": disabled || void 0,
|
|
632
|
+
"aria-label": label ?? (typeof children === "string" ? children : void 0),
|
|
633
|
+
accessibilityHint: error,
|
|
634
|
+
disabled,
|
|
635
|
+
onPress: toggle
|
|
636
|
+
};
|
|
637
|
+
return /* @__PURE__ */ jsxs4(View4, { style: [styles6.root, style], children: [
|
|
638
|
+
plain ? /* @__PURE__ */ jsxs4(Pressable3, { ...a11y, hitSlop: 4, style: [styles6.row, disabled ? styles6.disabled : null], children: [
|
|
639
|
+
box,
|
|
640
|
+
children !== void 0 ? /* @__PURE__ */ jsx7(View4, { style: styles6.text, children: /* @__PURE__ */ jsx7(Text4, { style: [styles6.label, { color: theme.textPrimary }], children }) }) : null
|
|
641
|
+
] }) : (
|
|
642
|
+
// Words with links: the box alone is the control (a 44-pt target, named by `label`), the links stay links.
|
|
643
|
+
/* @__PURE__ */ jsxs4(View4, { style: [styles6.row, disabled ? styles6.disabled : null], children: [
|
|
644
|
+
/* @__PURE__ */ jsx7(Pressable3, { ...a11y, hitSlop: 11, style: styles6.target, children: box }),
|
|
645
|
+
/* @__PURE__ */ jsx7(View4, { style: styles6.text, children })
|
|
646
|
+
] })
|
|
647
|
+
),
|
|
648
|
+
error ? /* @__PURE__ */ jsx7(Text4, { role: "alert", "aria-live": "polite", style: [styles6.error, { color: theme.dangerText }], children: error }) : null
|
|
649
|
+
] });
|
|
650
|
+
}
|
|
651
|
+
var styles6 = StyleSheet6.create({
|
|
652
|
+
root: { gap: 2, alignSelf: "stretch" },
|
|
653
|
+
row: { flexDirection: "row", alignItems: "center", gap: 12, minHeight: 44 },
|
|
654
|
+
target: { minHeight: 44, justifyContent: "center" },
|
|
655
|
+
box: { width: 22, height: 22, borderWidth: 1.5, alignItems: "center", justifyContent: "center" },
|
|
656
|
+
text: { flex: 1 },
|
|
657
|
+
label: { fontSize: 15, lineHeight: 21 },
|
|
658
|
+
error: { fontSize: 12, lineHeight: 16, paddingLeft: 34 },
|
|
659
|
+
disabled: { opacity: 0.4 }
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
// src/native/chip.tsx
|
|
663
|
+
import * as React6 from "react";
|
|
664
|
+
import { Pressable as Pressable4, ScrollView, StyleSheet as StyleSheet7, Text as Text5, View as View5 } from "react-native";
|
|
665
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
666
|
+
var ChipGroupContext = React6.createContext(null);
|
|
580
667
|
function Label({ children, color, size }) {
|
|
581
|
-
if (typeof children !== "string" && typeof children !== "number") return /* @__PURE__ */
|
|
582
|
-
return /* @__PURE__ */
|
|
668
|
+
if (typeof children !== "string" && typeof children !== "number") return /* @__PURE__ */ jsx8(Fragment, { children });
|
|
669
|
+
return /* @__PURE__ */ jsx8(Text5, { style: [styles7.label, { color, fontSize: size === "sm" ? 12 : 13 }], children });
|
|
583
670
|
}
|
|
584
671
|
function ChipBase(props) {
|
|
585
|
-
const group =
|
|
672
|
+
const group = React6.useContext(ChipGroupContext);
|
|
586
673
|
const { theme, radius: radius3 } = useTheme();
|
|
587
|
-
const [own, setOwn] =
|
|
674
|
+
const [own, setOwn] = React6.useState(props.removable ? false : props.defaultSelected ?? false);
|
|
588
675
|
const size = props.size ?? group?.size ?? "md";
|
|
589
676
|
const frame = (on2, pressed) => ({
|
|
590
677
|
height: size === "sm" ? 28 : 36,
|
|
@@ -595,9 +682,9 @@ function ChipBase(props) {
|
|
|
595
682
|
});
|
|
596
683
|
if (props.removable) {
|
|
597
684
|
const { removable: _r2, removeLabel, onRemove, disabled: disabled2, size: _s2, style: style2, children: children2, ...rest2 } = props;
|
|
598
|
-
return /* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
/* @__PURE__ */
|
|
685
|
+
return /* @__PURE__ */ jsxs5(View5, { ...rest2, style: [styles7.base, frame(false, false), disabled2 ? styles7.disabled : null, style2], children: [
|
|
686
|
+
/* @__PURE__ */ jsx8(Label, { color: theme.textSecondary, size, children: children2 }),
|
|
687
|
+
/* @__PURE__ */ jsx8(Pressable4, { role: "button", "aria-label": removeLabel, disabled: disabled2 ?? void 0, hitSlop: 10, onPress: onRemove, style: styles7.remove, children: /* @__PURE__ */ jsx8(Text5, { style: [styles7.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
601
688
|
] });
|
|
602
689
|
}
|
|
603
690
|
const { removable: _r, value, selected, defaultSelected: _d, onSelectedChange, disabled: ownDisabled, size: _s, style, children, ...rest } = props;
|
|
@@ -610,8 +697,8 @@ function ChipBase(props) {
|
|
|
610
697
|
onSelectedChange?.(!on);
|
|
611
698
|
};
|
|
612
699
|
const single = group?.type === "single";
|
|
613
|
-
return /* @__PURE__ */
|
|
614
|
-
|
|
700
|
+
return /* @__PURE__ */ jsx8(
|
|
701
|
+
Pressable4,
|
|
615
702
|
{
|
|
616
703
|
role: single ? "radio" : "checkbox",
|
|
617
704
|
"aria-checked": on,
|
|
@@ -619,17 +706,17 @@ function ChipBase(props) {
|
|
|
619
706
|
...rest,
|
|
620
707
|
disabled,
|
|
621
708
|
onPress: press,
|
|
622
|
-
style: ({ pressed }) => [
|
|
623
|
-
children: /* @__PURE__ */
|
|
709
|
+
style: ({ pressed }) => [styles7.base, frame(on, pressed), disabled ? styles7.disabled : null, style],
|
|
710
|
+
children: /* @__PURE__ */ jsx8(Label, { color: on ? theme.textPrimary : theme.textSecondary, size, children })
|
|
624
711
|
}
|
|
625
712
|
);
|
|
626
713
|
}
|
|
627
714
|
function ChipGroup(props) {
|
|
628
715
|
const { size, disabled, scrollable, "aria-label": label, style, children } = props;
|
|
629
716
|
const initial = props.type === "single" ? props.defaultValue ?? "" : props.defaultValue ?? [];
|
|
630
|
-
const [own, setOwn] =
|
|
717
|
+
const [own, setOwn] = React6.useState(initial);
|
|
631
718
|
const current = props.value ?? own;
|
|
632
|
-
const context =
|
|
719
|
+
const context = React6.useMemo(() => {
|
|
633
720
|
const list = Array.isArray(current) ? current : [current];
|
|
634
721
|
return {
|
|
635
722
|
type: props.type,
|
|
@@ -644,10 +731,10 @@ function ChipGroup(props) {
|
|
|
644
731
|
};
|
|
645
732
|
}, [current, props.type, props.value, props.onValueChange, size, disabled]);
|
|
646
733
|
const a11y = { role: props.type === "single" ? "radiogroup" : "group", "aria-label": label };
|
|
647
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ jsx8(ChipGroupContext.Provider, { value: context, children: scrollable ? /* @__PURE__ */ jsx8(ScrollView, { horizontal: true, showsHorizontalScrollIndicator: false, ...a11y, style, contentContainerStyle: styles7.row, children }) : /* @__PURE__ */ jsx8(View5, { ...a11y, style: [styles7.row, styles7.wrap, style], children }) });
|
|
648
735
|
}
|
|
649
736
|
var Chip = Object.assign(ChipBase, { Group: ChipGroup });
|
|
650
|
-
var
|
|
737
|
+
var styles7 = StyleSheet7.create({
|
|
651
738
|
base: { flexDirection: "row", alignItems: "center", justifyContent: "center", gap: 6, paddingHorizontal: 14, borderWidth: 1, alignSelf: "flex-start" },
|
|
652
739
|
label: { fontWeight: "600" },
|
|
653
740
|
remove: { marginRight: -6, width: 24, height: 24, alignItems: "center", justifyContent: "center" },
|
|
@@ -658,9 +745,9 @@ var styles6 = StyleSheet6.create({
|
|
|
658
745
|
});
|
|
659
746
|
|
|
660
747
|
// src/native/countdown.tsx
|
|
661
|
-
import * as
|
|
662
|
-
import { Animated as Animated2, StyleSheet as
|
|
663
|
-
import { jsx as
|
|
748
|
+
import * as React7 from "react";
|
|
749
|
+
import { Animated as Animated2, StyleSheet as StyleSheet8, Text as Text6 } from "react-native";
|
|
750
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
664
751
|
var FONT = { sm: 14, md: 20, lg: 32 };
|
|
665
752
|
function Countdown({ target, skewMs = 0, units, urgentBelowMs = 6e4, size = "md", label, showLabel = false, style }) {
|
|
666
753
|
const { theme, fonts } = useTheme();
|
|
@@ -668,8 +755,8 @@ function Countdown({ target, skewMs = 0, units, urgentBelowMs = 6e4, size = "md"
|
|
|
668
755
|
const ms = useCountdown(target, skewMs);
|
|
669
756
|
const urgent = ms > 0 && ms < urgentBelowMs;
|
|
670
757
|
const parts = countdownParts(ms, units);
|
|
671
|
-
const [opacity] =
|
|
672
|
-
|
|
758
|
+
const [opacity] = React7.useState(() => new Animated2.Value(1));
|
|
759
|
+
React7.useEffect(() => {
|
|
673
760
|
if (!urgent || reduce) return;
|
|
674
761
|
const loop = Animated2.loop(
|
|
675
762
|
Animated2.sequence([
|
|
@@ -685,24 +772,24 @@ function Countdown({ target, skewMs = 0, units, urgentBelowMs = 6e4, size = "md"
|
|
|
685
772
|
}, [urgent, reduce, opacity]);
|
|
686
773
|
const color = urgent ? theme.dangerText : theme.textPrimary;
|
|
687
774
|
const text = parts.map(([value, unit]) => `${String(value).padStart(2, "0")}${unit}`).join(" ");
|
|
688
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ jsxs6(
|
|
689
776
|
Animated2.View,
|
|
690
777
|
{
|
|
691
778
|
accessible: true,
|
|
692
779
|
role: "timer",
|
|
693
780
|
"aria-label": `${label} ${text}`,
|
|
694
|
-
style: [
|
|
781
|
+
style: [styles8.root, style],
|
|
695
782
|
children: [
|
|
696
|
-
showLabel ? /* @__PURE__ */
|
|
697
|
-
parts.map(([value, unit], i) => /* @__PURE__ */
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
/* @__PURE__ */
|
|
783
|
+
showLabel ? /* @__PURE__ */ jsx9(Text6, { style: [styles8.label, { color: theme.textSecondary, fontSize: Math.max(11, Math.round(FONT[size] * 0.6)) }], children: label }) : null,
|
|
784
|
+
parts.map(([value, unit], i) => /* @__PURE__ */ jsxs6(Animated2.View, { style: [styles8.segment, urgent && i === parts.length - 1 ? { opacity } : null], children: [
|
|
785
|
+
/* @__PURE__ */ jsx9(Text6, { style: [styles8.value, { color, fontSize: FONT[size] }, fonts.display ? { fontFamily: fonts.display } : null], children: String(value).padStart(2, "0") }),
|
|
786
|
+
/* @__PURE__ */ jsx9(Text6, { style: [styles8.unit, { color: theme.textSecondary, fontSize: Math.round(FONT[size] / 2) }], children: unit })
|
|
700
787
|
] }, unit))
|
|
701
788
|
]
|
|
702
789
|
}
|
|
703
790
|
);
|
|
704
791
|
}
|
|
705
|
-
var
|
|
792
|
+
var styles8 = StyleSheet8.create({
|
|
706
793
|
root: { flexDirection: "row", alignItems: "baseline", gap: 6 },
|
|
707
794
|
segment: { flexDirection: "row", alignItems: "baseline" },
|
|
708
795
|
value: { fontWeight: "900", fontVariant: ["tabular-nums"], letterSpacing: -0.3 },
|
|
@@ -710,34 +797,169 @@ var styles7 = StyleSheet7.create({
|
|
|
710
797
|
label: { fontWeight: "600", marginRight: 2 }
|
|
711
798
|
});
|
|
712
799
|
|
|
800
|
+
// src/native/date-picker.tsx
|
|
801
|
+
import * as React8 from "react";
|
|
802
|
+
import { Platform, StyleSheet as StyleSheet9, Text as Text7, TextInput, View as View6 } from "react-native";
|
|
803
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
804
|
+
var LENGTH = DATE_PART_LENGTH;
|
|
805
|
+
var dateFieldLabels = { day: "Day", month: "Month", year: "Year" };
|
|
806
|
+
function DateField({ label, hint, error, value, defaultValue, onValueChange, onBlur, locale = "en-US", labels: given, autoComplete, disabled, inputRef, onSubmitEditing, returnKeyType = "done", style }) {
|
|
807
|
+
const { theme, radius: radius3 } = useTheme();
|
|
808
|
+
const labels = { ...dateFieldLabels, ...given };
|
|
809
|
+
const order = React8.useMemo(() => datePartsOrder(locale), [locale]);
|
|
810
|
+
const [parts, setParts] = React8.useState(() => splitDate(value ?? defaultValue));
|
|
811
|
+
const [focused, setFocused] = React8.useState(null);
|
|
812
|
+
const refs = { day: React8.useRef(null), month: React8.useRef(null), year: React8.useRef(null) };
|
|
813
|
+
if (value !== void 0 && value !== composeDate(parts) && composeDate(splitDate(value)) === value) setParts(splitDate(value));
|
|
814
|
+
const caption = error ?? hint;
|
|
815
|
+
const change = (part, text) => {
|
|
816
|
+
const digits = text.replace(/\D/g, "").slice(0, LENGTH[part]);
|
|
817
|
+
const next = { ...parts, [part]: digits };
|
|
818
|
+
setParts(next);
|
|
819
|
+
onValueChange?.(composeDate(next));
|
|
820
|
+
const following = order[order.indexOf(part) + 1];
|
|
821
|
+
if (digits.length === LENGTH[part] && following) refs[following].current?.focus();
|
|
822
|
+
};
|
|
823
|
+
return /* @__PURE__ */ jsxs7(View6, { role: "group", "aria-label": label, style: [styles9.root, disabled ? styles9.disabled : null, style], children: [
|
|
824
|
+
/* @__PURE__ */ jsx10(Text7, { style: [styles9.label, { color: theme.textSecondary }], children: label }),
|
|
825
|
+
/* @__PURE__ */ jsx10(View6, { style: styles9.row, children: order.map((part, i) => /* @__PURE__ */ jsxs7(View6, { style: part === "year" ? styles9.yearBox : styles9.box, children: [
|
|
826
|
+
/* @__PURE__ */ jsx10(Text7, { style: [styles9.part, { color: theme.textSecondary }], children: labels[part] }),
|
|
827
|
+
/* @__PURE__ */ jsx10(
|
|
828
|
+
TextInput,
|
|
829
|
+
{
|
|
830
|
+
ref: (node) => {
|
|
831
|
+
refs[part].current = node;
|
|
832
|
+
if (i === 0 && inputRef) {
|
|
833
|
+
if (typeof inputRef === "function") inputRef(node);
|
|
834
|
+
else inputRef.current = node;
|
|
835
|
+
}
|
|
836
|
+
},
|
|
837
|
+
"aria-label": `${label}, ${labels[part]}`,
|
|
838
|
+
accessibilityHint: caption,
|
|
839
|
+
value: parts[part],
|
|
840
|
+
editable: !disabled,
|
|
841
|
+
keyboardType: "number-pad",
|
|
842
|
+
inputMode: "numeric",
|
|
843
|
+
maxLength: LENGTH[part],
|
|
844
|
+
autoComplete: autoComplete === "bday" ? Platform.OS === "web" ? `bday-${part}` : `birthdate-${part}` : "off",
|
|
845
|
+
returnKeyType: i === order.length - 1 ? returnKeyType : "next",
|
|
846
|
+
submitBehavior: i === order.length - 1 && returnKeyType !== "next" ? "blurAndSubmit" : "submit",
|
|
847
|
+
onSubmitEditing: () => {
|
|
848
|
+
const following = order[i + 1];
|
|
849
|
+
if (following) refs[following].current?.focus();
|
|
850
|
+
else onSubmitEditing?.();
|
|
851
|
+
},
|
|
852
|
+
onChangeText: (text) => change(part, text),
|
|
853
|
+
onFocus: () => setFocused(part),
|
|
854
|
+
onBlur: () => {
|
|
855
|
+
setFocused(null);
|
|
856
|
+
if (i === order.length - 1) onBlur?.();
|
|
857
|
+
},
|
|
858
|
+
style: [
|
|
859
|
+
styles9.input,
|
|
860
|
+
{ color: theme.textPrimary, backgroundColor: theme.surface2, borderRadius: radius3.md, borderColor: error ? theme.danger : focused === part ? theme.accent : theme.borderDefault }
|
|
861
|
+
]
|
|
862
|
+
}
|
|
863
|
+
)
|
|
864
|
+
] }, part)) }),
|
|
865
|
+
caption ? /* @__PURE__ */ jsx10(Text7, { role: error ? "alert" : void 0, "aria-live": error ? "polite" : void 0, style: [styles9.caption, { color: error ? theme.dangerText : theme.textSecondary }], children: caption }) : null
|
|
866
|
+
] });
|
|
867
|
+
}
|
|
868
|
+
var styles9 = StyleSheet9.create({
|
|
869
|
+
root: { gap: 6, alignSelf: "stretch" },
|
|
870
|
+
label: { fontSize: 12, lineHeight: 16, fontWeight: "600" },
|
|
871
|
+
row: { flexDirection: "row", gap: 10 },
|
|
872
|
+
box: { width: 64, gap: 4 },
|
|
873
|
+
yearBox: { width: 88, gap: 4 },
|
|
874
|
+
part: { fontSize: 11, lineHeight: 14 },
|
|
875
|
+
input: { height: 44, borderWidth: 1, paddingHorizontal: 10, fontSize: 16, fontVariant: ["tabular-nums"], textAlign: "center" },
|
|
876
|
+
caption: { fontSize: 12, lineHeight: 16 },
|
|
877
|
+
disabled: { opacity: 0.5 }
|
|
878
|
+
});
|
|
879
|
+
|
|
713
880
|
// src/native/empty-state.tsx
|
|
714
|
-
import { StyleSheet as
|
|
715
|
-
import { jsx as
|
|
881
|
+
import { StyleSheet as StyleSheet10, View as View7 } from "react-native";
|
|
882
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
716
883
|
function EmptyState({ icon, title, description, action, style, ...props }) {
|
|
717
884
|
const { theme } = useTheme();
|
|
718
|
-
return /* @__PURE__ */
|
|
719
|
-
icon ? /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
description ? /* @__PURE__ */
|
|
722
|
-
action ? /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ jsxs8(View7, { ...props, style: [styles10.root, style], children: [
|
|
886
|
+
icon ? /* @__PURE__ */ jsx11(View7, { "aria-hidden": true, style: [styles10.icon, { backgroundColor: theme.surface2 }], children: icon }) : null,
|
|
887
|
+
/* @__PURE__ */ jsx11(Txt, { variant: "label", role: "heading", style: styles10.center, children: title }),
|
|
888
|
+
description ? /* @__PURE__ */ jsx11(Txt, { tone: "secondary", style: styles10.center, children: description }) : null,
|
|
889
|
+
action ? /* @__PURE__ */ jsx11(View7, { style: styles10.action, children: action }) : null
|
|
723
890
|
] });
|
|
724
891
|
}
|
|
725
|
-
var
|
|
892
|
+
var styles10 = StyleSheet10.create({
|
|
726
893
|
root: { alignItems: "center", justifyContent: "center", gap: 8, paddingVertical: 40, paddingHorizontal: 24 },
|
|
727
894
|
icon: { width: 48, height: 48, borderRadius: 24, alignItems: "center", justifyContent: "center", marginBottom: 4 },
|
|
728
895
|
center: { textAlign: "center", maxWidth: 360 },
|
|
729
896
|
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 8 }
|
|
730
897
|
});
|
|
731
898
|
|
|
899
|
+
// src/native/field.tsx
|
|
900
|
+
import * as React9 from "react";
|
|
901
|
+
import { StyleSheet as StyleSheet11, Text as Text8, TextInput as TextInput2, View as View8 } from "react-native";
|
|
902
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
903
|
+
function TextField({ label, hint, error, value, defaultValue, onValueChange, disabled, end, inputRef, style, multiline, onFocus, onBlur, ...props }) {
|
|
904
|
+
const { theme, radius: radius3 } = useTheme();
|
|
905
|
+
const [focused, setFocused] = React9.useState(false);
|
|
906
|
+
const caption = error ?? hint;
|
|
907
|
+
const border = error ? theme.danger : focused ? theme.accent : theme.borderDefault;
|
|
908
|
+
return /* @__PURE__ */ jsxs9(View8, { style: [styles11.root, disabled ? styles11.disabled : null, style], children: [
|
|
909
|
+
/* @__PURE__ */ jsx12(Text8, { style: [styles11.label, { color: theme.textSecondary }], children: label }),
|
|
910
|
+
/* @__PURE__ */ jsxs9(View8, { style: [styles11.frame, multiline ? styles11.multiline : null, { borderRadius: radius3.md, borderColor: border, backgroundColor: theme.surface2 }], children: [
|
|
911
|
+
/* @__PURE__ */ jsx12(
|
|
912
|
+
TextInput2,
|
|
913
|
+
{
|
|
914
|
+
ref: inputRef,
|
|
915
|
+
"aria-label": label,
|
|
916
|
+
"aria-disabled": disabled || void 0,
|
|
917
|
+
accessibilityHint: caption,
|
|
918
|
+
value,
|
|
919
|
+
defaultValue,
|
|
920
|
+
editable: !disabled,
|
|
921
|
+
multiline,
|
|
922
|
+
textAlignVertical: multiline ? "top" : "center",
|
|
923
|
+
placeholderTextColor: theme.textMuted,
|
|
924
|
+
onChangeText: onValueChange,
|
|
925
|
+
onFocus: (event) => {
|
|
926
|
+
setFocused(true);
|
|
927
|
+
onFocus?.(event);
|
|
928
|
+
},
|
|
929
|
+
onBlur: (event) => {
|
|
930
|
+
setFocused(false);
|
|
931
|
+
onBlur?.(event);
|
|
932
|
+
},
|
|
933
|
+
style: [styles11.input, multiline ? styles11.inputMultiline : null, { color: theme.textPrimary }],
|
|
934
|
+
...props
|
|
935
|
+
}
|
|
936
|
+
),
|
|
937
|
+
end ? /* @__PURE__ */ jsx12(View8, { style: styles11.end, children: end }) : null
|
|
938
|
+
] }),
|
|
939
|
+
caption ? /* @__PURE__ */ jsx12(Text8, { role: error ? "alert" : void 0, "aria-live": error ? "polite" : void 0, style: [styles11.caption, { color: error ? theme.dangerText : theme.textSecondary }], children: caption }) : null
|
|
940
|
+
] });
|
|
941
|
+
}
|
|
942
|
+
var styles11 = StyleSheet11.create({
|
|
943
|
+
root: { gap: 6, alignSelf: "stretch" },
|
|
944
|
+
label: { fontSize: 12, lineHeight: 16, fontWeight: "600" },
|
|
945
|
+
frame: { flexDirection: "row", alignItems: "center", minHeight: 44, paddingHorizontal: 12, borderWidth: 1 },
|
|
946
|
+
multiline: { alignItems: "flex-start", minHeight: 96, paddingVertical: 10 },
|
|
947
|
+
input: { flex: 1, minHeight: 42, fontSize: 15, paddingVertical: 0 },
|
|
948
|
+
inputMultiline: { minHeight: 76 },
|
|
949
|
+
end: { marginLeft: 8 },
|
|
950
|
+
caption: { fontSize: 12, lineHeight: 16 },
|
|
951
|
+
disabled: { opacity: 0.5 }
|
|
952
|
+
});
|
|
953
|
+
|
|
732
954
|
// src/native/goal-gauge.tsx
|
|
733
|
-
import { Animated as Animated4, StyleSheet as
|
|
955
|
+
import { Animated as Animated4, StyleSheet as StyleSheet12, View as View9 } from "react-native";
|
|
734
956
|
|
|
735
957
|
// src/native/story-motion.ts
|
|
736
|
-
import * as
|
|
958
|
+
import * as React10 from "react";
|
|
737
959
|
import { AccessibilityInfo as AccessibilityInfo2, Animated as Animated3, Easing } from "react-native";
|
|
738
960
|
function useEntrance(animated, delay = 0, duration = 700) {
|
|
739
|
-
const [value] =
|
|
740
|
-
|
|
961
|
+
const [value] = React10.useState(() => new Animated3.Value(animated ? 0 : 1));
|
|
962
|
+
React10.useEffect(() => {
|
|
741
963
|
if (!animated) return;
|
|
742
964
|
let cancelled = false;
|
|
743
965
|
void AccessibilityInfo2.isReduceMotionEnabled().then((reduce) => {
|
|
@@ -753,17 +975,17 @@ function useEntrance(animated, delay = 0, duration = 700) {
|
|
|
753
975
|
}
|
|
754
976
|
|
|
755
977
|
// src/native/goal-gauge.tsx
|
|
756
|
-
import { jsx as
|
|
978
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
757
979
|
function Cell({ lit, animate, order, animated, arcade }) {
|
|
758
980
|
const { theme } = useTheme();
|
|
759
981
|
const t = useEntrance(animated && animate, 300 + order * 100, 350);
|
|
760
982
|
const spentOpacity = arcade ? 0.14 : 1;
|
|
761
983
|
const opacity = !animate ? 1 : lit ? t.interpolate({ inputRange: [0, 1], outputRange: [0.25, 1] }) : t.interpolate({ inputRange: [0, 1], outputRange: [1, arcade ? 0.14 : 1] });
|
|
762
984
|
const color = lit || arcade ? theme.accent : theme.surface3;
|
|
763
|
-
return /* @__PURE__ */
|
|
985
|
+
return /* @__PURE__ */ jsx13(
|
|
764
986
|
Animated4.View,
|
|
765
987
|
{
|
|
766
|
-
style: [
|
|
988
|
+
style: [styles12.cell, arcade ? styles12.cellArcade : null, { backgroundColor: color, opacity: lit || animate ? opacity : spentOpacity }]
|
|
767
989
|
}
|
|
768
990
|
);
|
|
769
991
|
}
|
|
@@ -773,8 +995,8 @@ function GoalGauge({ label, segments, value, valueText, mode = "fill", showLabel
|
|
|
773
995
|
const lit = Math.min(total, Math.max(0, Math.round(value ?? total)));
|
|
774
996
|
const words = valueText ?? `${lit} / ${total}`;
|
|
775
997
|
const arcade = variant === "arcade";
|
|
776
|
-
return /* @__PURE__ */
|
|
777
|
-
|
|
998
|
+
return /* @__PURE__ */ jsxs10(
|
|
999
|
+
View9,
|
|
778
1000
|
{
|
|
779
1001
|
accessible: true,
|
|
780
1002
|
role: "meter",
|
|
@@ -784,22 +1006,22 @@ function GoalGauge({ label, segments, value, valueText, mode = "fill", showLabel
|
|
|
784
1006
|
"aria-valuenow": lit,
|
|
785
1007
|
"aria-valuetext": words,
|
|
786
1008
|
...props,
|
|
787
|
-
style: [
|
|
1009
|
+
style: [styles12.root, style],
|
|
788
1010
|
children: [
|
|
789
|
-
showLabel ? /* @__PURE__ */
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
arcade ? null : /* @__PURE__ */
|
|
1011
|
+
showLabel ? /* @__PURE__ */ jsxs10(View9, { "aria-hidden": true, style: [styles12.head, arcade ? styles12.headArcade : null], children: [
|
|
1012
|
+
/* @__PURE__ */ jsx13(Txt, { variant: arcade ? "mono" : "caption", tone: "secondary", children: arcade ? label.toUpperCase() : label }),
|
|
1013
|
+
arcade ? null : /* @__PURE__ */ jsx13(Txt, { variant: "caption", children: words })
|
|
792
1014
|
] }) : null,
|
|
793
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ jsx13(View9, { "aria-hidden": true, style: [styles12.cells, arcade ? [styles12.cellsArcade, { borderColor: theme.borderSubtle, backgroundColor: theme.surface1 }] : null], children: Array.from({ length: total }, (_, i) => {
|
|
794
1016
|
const on = i < lit;
|
|
795
1017
|
const animate = mode === "fill" ? on : !on;
|
|
796
|
-
return /* @__PURE__ */
|
|
1018
|
+
return /* @__PURE__ */ jsx13(Cell, { lit: on, animate, order: mode === "fill" ? i : i - lit, animated, arcade }, i);
|
|
797
1019
|
}) })
|
|
798
1020
|
]
|
|
799
1021
|
}
|
|
800
1022
|
);
|
|
801
1023
|
}
|
|
802
|
-
var
|
|
1024
|
+
var styles12 = StyleSheet12.create({
|
|
803
1025
|
root: { alignSelf: "stretch", gap: 8 },
|
|
804
1026
|
head: { flexDirection: "row", justifyContent: "space-between", alignItems: "baseline", gap: 12 },
|
|
805
1027
|
headArcade: { justifyContent: "center" },
|
|
@@ -810,8 +1032,8 @@ var styles9 = StyleSheet9.create({
|
|
|
810
1032
|
});
|
|
811
1033
|
|
|
812
1034
|
// src/native/KrizakaMark.tsx
|
|
813
|
-
import { View as
|
|
814
|
-
import
|
|
1035
|
+
import { View as View10 } from "react-native";
|
|
1036
|
+
import Svg3, { Circle, Defs as Defs2, G as Group, LinearGradient as LinearGradient2, Path as Path2, RadialGradient, Stop as Stop2 } from "react-native-svg";
|
|
815
1037
|
|
|
816
1038
|
// src/marks/krizaka-geometry.ts
|
|
817
1039
|
var KRIZAKA = {
|
|
@@ -833,12 +1055,12 @@ var KRIZAKA = {
|
|
|
833
1055
|
};
|
|
834
1056
|
|
|
835
1057
|
// src/native/mark-motion.ts
|
|
836
|
-
import { useEffect as useEffect5, useState as
|
|
1058
|
+
import { useEffect as useEffect5, useState as useState10 } from "react";
|
|
837
1059
|
import { AccessibilityInfo as AccessibilityInfo3, Animated as Animated5, Easing as Easing2 } from "react-native";
|
|
838
1060
|
var markA11y = (title) => title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
839
1061
|
function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
840
|
-
const [spin] =
|
|
841
|
-
const [pulse] =
|
|
1062
|
+
const [spin] = useState10(() => new Animated5.Value(0));
|
|
1063
|
+
const [pulse] = useState10(() => new Animated5.Value(0));
|
|
842
1064
|
useEffect5(() => {
|
|
843
1065
|
if (!animated) return;
|
|
844
1066
|
let loops = [];
|
|
@@ -870,39 +1092,39 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
870
1092
|
}
|
|
871
1093
|
|
|
872
1094
|
// src/native/KrizakaMark.tsx
|
|
873
|
-
import { Fragment as Fragment2, jsx as
|
|
1095
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
874
1096
|
function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
875
1097
|
const { theme } = useTheme();
|
|
876
1098
|
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
877
1099
|
const id = useSvgId("kzm");
|
|
878
1100
|
const viewBox = size < 48 ? KRIZAKA.croppedViewBox : KRIZAKA.viewBox;
|
|
879
1101
|
const stroke = neutral ?? theme.textMuted;
|
|
880
|
-
const blue = /* @__PURE__ */
|
|
881
|
-
const dot = (c) => /* @__PURE__ */
|
|
882
|
-
/* @__PURE__ */
|
|
883
|
-
/* @__PURE__ */
|
|
1102
|
+
const blue = /* @__PURE__ */ jsx14(LinearGradient2, { id: `${id}b`, gradientUnits: "userSpaceOnUse", x1: KRIZAKA.blue.x1 + KRIZAKA.offset, y1: KRIZAKA.blue.y1 + KRIZAKA.offset, x2: KRIZAKA.blue.x2 + KRIZAKA.offset, y2: KRIZAKA.blue.y2 + KRIZAKA.offset, children: KRIZAKA.blue.stops.map(([offset, color]) => /* @__PURE__ */ jsx14(Stop2, { offset, stopColor: color }, offset)) });
|
|
1103
|
+
const dot = (c) => /* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1104
|
+
/* @__PURE__ */ jsx14(Circle, { cx: c.cx, cy: c.cy, r: c.r, fill: `url(#${id}b)` }),
|
|
1105
|
+
/* @__PURE__ */ jsx14(Circle, { cx: c.cx, cy: c.cy, r: c.inner, fill: KRIZAKA.highlight })
|
|
884
1106
|
] });
|
|
885
|
-
return /* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
/* @__PURE__ */
|
|
890
|
-
/* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsxs11(View10, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1108
|
+
/* @__PURE__ */ jsxs11(Svg3, { viewBox, style: layer, children: [
|
|
1109
|
+
/* @__PURE__ */ jsxs11(Defs2, { children: [
|
|
1110
|
+
/* @__PURE__ */ jsxs11(RadialGradient, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1111
|
+
/* @__PURE__ */ jsx14(Stop2, { offset: "0%", stopColor: KRIZAKA.glow.color, stopOpacity: KRIZAKA.glow.opacity }),
|
|
1112
|
+
/* @__PURE__ */ jsx14(Stop2, { offset: "100%", stopColor: KRIZAKA.glow.color, stopOpacity: 0 })
|
|
891
1113
|
] }),
|
|
892
|
-
/* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
894
|
-
/* @__PURE__ */
|
|
1114
|
+
/* @__PURE__ */ jsxs11(LinearGradient2, { id: `${id}i`, gradientUnits: "userSpaceOnUse", x1: KRIZAKA.ink.x1 + KRIZAKA.offset, y1: KRIZAKA.ink.y1 + KRIZAKA.offset, x2: KRIZAKA.ink.x2 + KRIZAKA.offset, y2: KRIZAKA.ink.y2 + KRIZAKA.offset, children: [
|
|
1115
|
+
/* @__PURE__ */ jsx14(Stop2, { offset: "0%", stopColor: theme.textSecondary }),
|
|
1116
|
+
/* @__PURE__ */ jsx14(Stop2, { offset: "100%", stopColor: theme.textPrimary })
|
|
895
1117
|
] }),
|
|
896
1118
|
blue
|
|
897
1119
|
] }),
|
|
898
|
-
size >= 48 ? /* @__PURE__ */
|
|
899
|
-
/* @__PURE__ */
|
|
900
|
-
/* @__PURE__ */
|
|
1120
|
+
size >= 48 ? /* @__PURE__ */ jsx14(Circle, { cx: 200, cy: 200, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1121
|
+
/* @__PURE__ */ jsx14(Circle, { cx: 200, cy: 200, r: KRIZAKA.ring.r, stroke, strokeWidth: KRIZAKA.ring.width, opacity: 0.35, fill: "none" }),
|
|
1122
|
+
/* @__PURE__ */ jsx14(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: /* @__PURE__ */ jsx14(Path2, { d: KRIZAKA.shield, stroke: `url(#${id}i)`, strokeWidth: KRIZAKA.stroke, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })
|
|
901
1123
|
] }),
|
|
902
|
-
/* @__PURE__ */
|
|
903
|
-
/* @__PURE__ */
|
|
904
|
-
/* @__PURE__ */
|
|
905
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ jsx14(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsx14(Svg3, { viewBox, style: layer, children: /* @__PURE__ */ jsx14(Circle, { cx: 200, cy: 200, r: KRIZAKA.orbit.r, stroke, strokeWidth: KRIZAKA.orbit.width, strokeDasharray: KRIZAKA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
1125
|
+
/* @__PURE__ */ jsx14(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs11(Svg3, { viewBox, style: layer, children: [
|
|
1126
|
+
/* @__PURE__ */ jsx14(Defs2, { children: blue }),
|
|
1127
|
+
/* @__PURE__ */ jsxs11(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: [
|
|
906
1128
|
dot(KRIZAKA.node),
|
|
907
1129
|
dot(KRIZAKA.core)
|
|
908
1130
|
] })
|
|
@@ -911,13 +1133,13 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
911
1133
|
}
|
|
912
1134
|
|
|
913
1135
|
// src/native/mascot-state.tsx
|
|
914
|
-
import * as
|
|
915
|
-
import { AccessibilityInfo as AccessibilityInfo5, Animated as Animated7, Easing as Easing4, StyleSheet as
|
|
1136
|
+
import * as React12 from "react";
|
|
1137
|
+
import { AccessibilityInfo as AccessibilityInfo5, Animated as Animated7, Easing as Easing4, StyleSheet as StyleSheet13, View as View12 } from "react-native";
|
|
916
1138
|
|
|
917
1139
|
// src/native/mascots.tsx
|
|
918
|
-
import { useEffect as useEffect6, useState as
|
|
919
|
-
import { AccessibilityInfo as AccessibilityInfo4, Animated as Animated6, Easing as Easing3, View as
|
|
920
|
-
import
|
|
1140
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
1141
|
+
import { AccessibilityInfo as AccessibilityInfo4, Animated as Animated6, Easing as Easing3, View as View11 } from "react-native";
|
|
1142
|
+
import Svg4, { Circle as Circle2, Defs as Defs3, Ellipse, G, LinearGradient as LinearGradient3, Path as Path3, Rect as Rect2, Stop as Stop3 } from "react-native-svg";
|
|
921
1143
|
|
|
922
1144
|
// src/mascots/geometry.ts
|
|
923
1145
|
var mirror = (d) => d.replace(/(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/g, (_, x, y) => `${120 - Number(x)} ${y}`);
|
|
@@ -1075,9 +1297,9 @@ var SHADE = "#000000";
|
|
|
1075
1297
|
var PARCEL = ["#f59e0b", "#d97706", "#b45309"];
|
|
1076
1298
|
|
|
1077
1299
|
// src/native/mascots.tsx
|
|
1078
|
-
import { jsx as
|
|
1300
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1079
1301
|
function useBob(animated) {
|
|
1080
|
-
const [y] =
|
|
1302
|
+
const [y] = useState11(() => new Animated6.Value(0));
|
|
1081
1303
|
useEffect6(() => {
|
|
1082
1304
|
if (!animated) return;
|
|
1083
1305
|
let loop;
|
|
@@ -1109,56 +1331,56 @@ function Mascot({ bird = "owl", mood = "welcome", tone: tone2 = "brand", size =
|
|
|
1109
1331
|
const look3 = mood === "thinking" ? 1.4 : 0;
|
|
1110
1332
|
const rot = (deg, [x, y]) => `rotate(${deg} ${x} ${y})`;
|
|
1111
1333
|
const [wl, wr] = g.wings;
|
|
1112
|
-
return /* @__PURE__ */
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
/* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ jsx15(View11, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx15(Animated6.View, { style: { transform: [{ translateY: bob }] }, children: /* @__PURE__ */ jsxs12(Svg4, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
1335
|
+
/* @__PURE__ */ jsx15(Defs3, { children: /* @__PURE__ */ jsxs12(LinearGradient3, { id, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
1336
|
+
/* @__PURE__ */ jsx15(Stop3, { offset: "0%", stopColor: p.from }),
|
|
1337
|
+
/* @__PURE__ */ jsx15(Stop3, { offset: "100%", stopColor: p.to })
|
|
1116
1338
|
] }) }),
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
mood === "empty" && /* @__PURE__ */
|
|
1119
|
-
g.legs.map((d) => /* @__PURE__ */
|
|
1120
|
-
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */
|
|
1121
|
-
g.parcel?.map((d, i) => /* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx15(Ellipse, { cx: g.shadow[0], cy: g.shadow[1], rx: g.shadow[2], ry: g.shadow[3], fill: SHADE, opacity: 0.14 }),
|
|
1340
|
+
mood === "empty" && /* @__PURE__ */ jsx15(Path3, { d: MOOD_PARTS.tray, stroke: outline, strokeWidth: 1.6, strokeDasharray: "3 3", fill: "none" }),
|
|
1341
|
+
g.legs.map((d) => /* @__PURE__ */ jsx15(Path3, { d, stroke: p.beak, strokeWidth: 2.6, strokeLinecap: "round", fill: "none" }, d)),
|
|
1342
|
+
g.back?.map((d) => d.endsWith("Z") ? /* @__PURE__ */ jsx15(Path3, { d, fill: p.detail, ...line }, d) : /* @__PURE__ */ jsx15(Path3, { d, stroke: outline, strokeWidth: 1.4, fill: "none" }, d)),
|
|
1343
|
+
g.parcel?.map((d, i) => /* @__PURE__ */ jsx15(Path3, { d, fill: PARCEL[i], ...line }, d)),
|
|
1344
|
+
/* @__PURE__ */ jsx15(Path3, { d: g.body, fill: body, ...line }),
|
|
1345
|
+
/* @__PURE__ */ jsx15(Path3, { d: g.belly, fill: LIGHT, opacity: 0.28 }),
|
|
1124
1346
|
[wl, wr].map((w, i) => {
|
|
1125
1347
|
const turn = mood === "success" ? i === 0 ? 28 : -28 : mood === "welcome" && i === 1 ? -20 : 0;
|
|
1126
|
-
return /* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1348
|
+
return /* @__PURE__ */ jsxs12(G, { transform: turn ? rot(turn, w.pivot) : void 0, children: [
|
|
1349
|
+
/* @__PURE__ */ jsx15(Path3, { d: w.d, fill: p.wing, ...line }),
|
|
1350
|
+
/* @__PURE__ */ jsx15(Path3, { d: w.d, fill: SHADE, opacity: 0.16 })
|
|
1129
1351
|
] }, i);
|
|
1130
1352
|
}),
|
|
1131
|
-
g.neck && /* @__PURE__ */
|
|
1132
|
-
g.head.r > 0 && /* @__PURE__ */
|
|
1133
|
-
g.details.map((d) => /* @__PURE__ */
|
|
1134
|
-
g.visor && /* @__PURE__ */
|
|
1353
|
+
g.neck && /* @__PURE__ */ jsx15(Path3, { d: g.neck.d, stroke: body, strokeWidth: g.neck.width, strokeLinecap: "round", fill: "none" }),
|
|
1354
|
+
g.head.r > 0 && /* @__PURE__ */ jsx15(Circle2, { cx: g.head.cx, cy: g.head.cy, r: g.head.r, fill: body, ...line }),
|
|
1355
|
+
g.details.map((d) => /* @__PURE__ */ jsx15(Path3, { d, fill: p.detail, ...line }, d)),
|
|
1356
|
+
g.visor && /* @__PURE__ */ jsx15(Rect2, { x: g.visor.x, y: g.visor.y, width: g.visor.w, height: g.visor.h, rx: 4, fill: theme.surface0, ...line }),
|
|
1135
1357
|
g.eyes.at.map(
|
|
1136
|
-
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1140
|
-
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */
|
|
1141
|
-
g.eyes.white > 0 && /* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1358
|
+
(at, i) => mood === "empty" && g.eyes.white > 0 ? /* @__PURE__ */ jsxs12(G, { children: [
|
|
1359
|
+
/* @__PURE__ */ jsx15(Circle2, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
1360
|
+
/* @__PURE__ */ jsx15(Circle2, { cx: at[0], cy: at[1] + g.eyes.pupil * 0.7, r: g.eyes.pupil, fill: SHADE }),
|
|
1361
|
+
/* @__PURE__ */ jsx15(Path3, { d: upperLid(at, g.eyes.white), fill: p.detail, ...line })
|
|
1362
|
+
] }, i) : mood === "success" || mood === "empty" ? /* @__PURE__ */ jsx15(Path3, { 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__ */ jsxs12(G, { children: [
|
|
1363
|
+
g.eyes.white > 0 && /* @__PURE__ */ jsx15(Circle2, { cx: at[0], cy: at[1], r: g.eyes.white, fill: LIGHT, ...line }),
|
|
1364
|
+
/* @__PURE__ */ jsx15(Circle2, { cx: at[0] + look3, cy: at[1] - look3, r: g.eyes.pupil, fill: g.visor ? p.eye : SHADE })
|
|
1143
1365
|
] }, i)
|
|
1144
1366
|
),
|
|
1145
|
-
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */
|
|
1146
|
-
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */
|
|
1149
|
-
(mood === "success" || mood === "error") && /* @__PURE__ */
|
|
1150
|
-
mood === "success" && /* @__PURE__ */
|
|
1151
|
-
mood === "error" && /* @__PURE__ */
|
|
1152
|
-
mood === "error" && /* @__PURE__ */
|
|
1367
|
+
g.glasses && g.eyes.at.map(([x, y]) => /* @__PURE__ */ jsx15(Circle2, { cx: x, cy: y, r: 6.5, fill: "none", stroke: outline, strokeWidth: 1.3 }, x)),
|
|
1368
|
+
mood === "error" && g.eyes.at.map((at, i) => /* @__PURE__ */ jsx15(Path3, { d: brow(at, eyeR, g.eyes.at.length === 1 ? 1 : i === 0 ? -1 : 1), stroke: outline, strokeWidth: 2, strokeLinecap: "round" }, i)),
|
|
1369
|
+
/* @__PURE__ */ jsx15(Path3, { d: g.beak, fill: p.beak, ...line }),
|
|
1370
|
+
mood === "thinking" && MOOD_PARTS.dots.map(([cx, cy, r], i) => /* @__PURE__ */ jsx15(Circle2, { cx, cy, r, fill: theme.textSecondary, opacity: 0.5 + i * 0.25 }, cx)),
|
|
1371
|
+
(mood === "success" || mood === "error") && /* @__PURE__ */ jsx15(Circle2, { cx: MOOD_PARTS.badge.cx, cy: MOOD_PARTS.badge.cy, r: MOOD_PARTS.badge.r, fill: mood === "success" ? theme.success : theme.danger }),
|
|
1372
|
+
mood === "success" && /* @__PURE__ */ jsx15(Path3, { d: MOOD_PARTS.check, stroke: theme.surface0, strokeWidth: 2.6, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }),
|
|
1373
|
+
mood === "error" && /* @__PURE__ */ jsx15(Path3, { d: MOOD_PARTS.bang.line, stroke: theme.surface0, strokeWidth: 2.8, strokeLinecap: "round" }),
|
|
1374
|
+
mood === "error" && /* @__PURE__ */ jsx15(Circle2, { cx: MOOD_PARTS.bang.dot[0], cy: MOOD_PARTS.bang.dot[1], r: 1.6, fill: theme.surface0 })
|
|
1153
1375
|
] }) }) });
|
|
1154
1376
|
}
|
|
1155
1377
|
|
|
1156
1378
|
// src/native/mascot-state.tsx
|
|
1157
|
-
import { jsx as
|
|
1379
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1158
1380
|
var SIZE = { sm: 64, md: 96, lg: 128 };
|
|
1159
1381
|
function useArrival(animated) {
|
|
1160
|
-
const [value] =
|
|
1161
|
-
|
|
1382
|
+
const [value] = React12.useState(() => new Animated7.Value(animated ? 0 : 1));
|
|
1383
|
+
React12.useEffect(() => {
|
|
1162
1384
|
if (!animated) return;
|
|
1163
1385
|
let cancelled = false;
|
|
1164
1386
|
void AccessibilityInfo5.isReduceMotionEnabled().then((reduce) => {
|
|
@@ -1175,30 +1397,30 @@ function useArrival(animated) {
|
|
|
1175
1397
|
function MascotState({ bird = "owl", mood = "empty", title, description, action, size = "md", layout = "stacked", tone: tone2, animated = true, style, ...props }) {
|
|
1176
1398
|
const opacity = useArrival(animated);
|
|
1177
1399
|
const inline = layout === "inline";
|
|
1178
|
-
return /* @__PURE__ */
|
|
1400
|
+
return /* @__PURE__ */ jsxs13(
|
|
1179
1401
|
Animated7.View,
|
|
1180
1402
|
{
|
|
1181
1403
|
role: mood === "error" ? "alert" : "status",
|
|
1182
1404
|
accessibilityLiveRegion: mood === "error" ? "assertive" : "polite",
|
|
1183
1405
|
"aria-busy": mood === "thinking" ? true : void 0,
|
|
1184
1406
|
...props,
|
|
1185
|
-
style: [inline ?
|
|
1407
|
+
style: [inline ? styles13.inline : styles13.stacked, { opacity, transform: [{ translateY: opacity.interpolate({ inputRange: [0, 1], outputRange: [6, 0] }) }] }, style],
|
|
1186
1408
|
children: [
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
/* @__PURE__ */
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
description ? /* @__PURE__ */
|
|
1191
|
-
action ? /* @__PURE__ */
|
|
1409
|
+
/* @__PURE__ */ jsx16(Mascot, { bird, mood, tone: tone2, size: SIZE[size], animated }),
|
|
1410
|
+
/* @__PURE__ */ jsxs13(View12, { style: inline ? styles13.wordsInline : styles13.words, children: [
|
|
1411
|
+
/* @__PURE__ */ jsx16(Txt, { variant: "label", role: "heading", style: inline ? null : styles13.center, children: title }),
|
|
1412
|
+
description ? /* @__PURE__ */ jsx16(Txt, { tone: "secondary", style: inline ? null : styles13.center, children: description }) : null,
|
|
1413
|
+
action ? /* @__PURE__ */ jsx16(View12, { style: [styles13.action, inline ? null : styles13.actionCentred], children: action }) : null
|
|
1192
1414
|
] })
|
|
1193
1415
|
]
|
|
1194
1416
|
}
|
|
1195
1417
|
);
|
|
1196
1418
|
}
|
|
1197
|
-
var ErrorState = (props) => /* @__PURE__ */
|
|
1198
|
-
var SuccessState = (props) => /* @__PURE__ */
|
|
1199
|
-
var LoadingState = (props) => /* @__PURE__ */
|
|
1200
|
-
var WelcomeState = (props) => /* @__PURE__ */
|
|
1201
|
-
var
|
|
1419
|
+
var ErrorState = (props) => /* @__PURE__ */ jsx16(MascotState, { mood: "error", ...props });
|
|
1420
|
+
var SuccessState = (props) => /* @__PURE__ */ jsx16(MascotState, { mood: "success", ...props });
|
|
1421
|
+
var LoadingState = (props) => /* @__PURE__ */ jsx16(MascotState, { mood: "thinking", ...props });
|
|
1422
|
+
var WelcomeState = (props) => /* @__PURE__ */ jsx16(MascotState, { mood: "welcome", ...props });
|
|
1423
|
+
var styles13 = StyleSheet13.create({
|
|
1202
1424
|
stacked: { alignItems: "center", justifyContent: "center", gap: 12, paddingVertical: 40, paddingHorizontal: 24 },
|
|
1203
1425
|
inline: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
1204
1426
|
words: { alignItems: "center", gap: 6 },
|
|
@@ -1209,8 +1431,8 @@ var styles10 = StyleSheet10.create({
|
|
|
1209
1431
|
});
|
|
1210
1432
|
|
|
1211
1433
|
// src/native/OrazakaMark.tsx
|
|
1212
|
-
import { View as
|
|
1213
|
-
import
|
|
1434
|
+
import { View as View13 } from "react-native";
|
|
1435
|
+
import Svg5, { Circle as Circle3, Defs as Defs4, LinearGradient as LinearGradient4, Path as Path4, RadialGradient as RadialGradient2, Stop as Stop4 } from "react-native-svg";
|
|
1214
1436
|
|
|
1215
1437
|
// src/marks/orazaka-geometry.ts
|
|
1216
1438
|
var orange = marks.orazaka[marks.orazaka.length - 1][1];
|
|
@@ -1239,41 +1461,41 @@ var ORAZAKA = {
|
|
|
1239
1461
|
};
|
|
1240
1462
|
|
|
1241
1463
|
// src/native/OrazakaMark.tsx
|
|
1242
|
-
import { jsx as
|
|
1464
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1243
1465
|
function OrazakaMark({ size = 48, animated = true, title, neutral }) {
|
|
1244
1466
|
const { theme } = useTheme();
|
|
1245
1467
|
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1246
1468
|
const id = useSvgId("ozm");
|
|
1247
1469
|
const viewBox = size < 48 ? ORAZAKA.croppedViewBox : ORAZAKA.viewBox;
|
|
1248
1470
|
const stroke = neutral ?? theme.textMuted;
|
|
1249
|
-
const gradient = /* @__PURE__ */
|
|
1471
|
+
const gradient = /* @__PURE__ */ jsx17(LinearGradient4, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: ORAZAKA.gradient.x1, y1: ORAZAKA.gradient.y1, x2: ORAZAKA.gradient.x2, y2: ORAZAKA.gradient.y2, children: ORAZAKA.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx17(Stop4, { offset, stopColor: color }, offset)) });
|
|
1250
1472
|
const fill = `url(#${id}a)`;
|
|
1251
|
-
return /* @__PURE__ */
|
|
1252
|
-
/* @__PURE__ */
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1473
|
+
return /* @__PURE__ */ jsxs14(View13, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1474
|
+
/* @__PURE__ */ jsxs14(Svg5, { viewBox, style: layer, children: [
|
|
1475
|
+
/* @__PURE__ */ jsx17(Defs4, { children: /* @__PURE__ */ jsxs14(RadialGradient2, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1476
|
+
/* @__PURE__ */ jsx17(Stop4, { offset: "0%", stopColor: ORAZAKA.glow.color, stopOpacity: ORAZAKA.glow.opacity }),
|
|
1477
|
+
/* @__PURE__ */ jsx17(Stop4, { offset: "100%", stopColor: ORAZAKA.glow.color, stopOpacity: 0 })
|
|
1256
1478
|
] }) }),
|
|
1257
|
-
size >= 48 ? /* @__PURE__ */
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
/* @__PURE__ */
|
|
1479
|
+
size >= 48 ? /* @__PURE__ */ jsx17(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1480
|
+
/* @__PURE__ */ jsx17(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.orbit.r, stroke, strokeWidth: ORAZAKA.orbit.width, strokeDasharray: ORAZAKA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
1481
|
+
/* @__PURE__ */ jsx17(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.ring.r, stroke, strokeWidth: ORAZAKA.ring.width, opacity: 0.35, fill: "none" })
|
|
1260
1482
|
] }),
|
|
1261
|
-
/* @__PURE__ */
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
ORAZAKA.shards.map((d) => /* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ jsx17(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs14(Svg5, { viewBox, style: layer, children: [
|
|
1484
|
+
/* @__PURE__ */ jsx17(Defs4, { children: gradient }),
|
|
1485
|
+
ORAZAKA.shards.map((d) => /* @__PURE__ */ jsx17(Path4, { d, fill, stroke: fill, strokeWidth: ORAZAKA.shardStroke, strokeLinejoin: "round" }, d))
|
|
1264
1486
|
] }) }),
|
|
1265
|
-
/* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1487
|
+
/* @__PURE__ */ jsx17(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs14(Svg5, { viewBox, style: layer, children: [
|
|
1488
|
+
/* @__PURE__ */ jsx17(Defs4, { children: gradient }),
|
|
1489
|
+
/* @__PURE__ */ jsx17(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.r, fill }),
|
|
1490
|
+
/* @__PURE__ */ jsx17(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.inner, fill: ORAZAKA.highlight })
|
|
1269
1491
|
] }) })
|
|
1270
1492
|
] });
|
|
1271
1493
|
}
|
|
1272
1494
|
|
|
1273
1495
|
// src/native/OrochiaMark.tsx
|
|
1274
|
-
import { useEffect as useEffect8, useState as
|
|
1275
|
-
import { AccessibilityInfo as AccessibilityInfo6, Animated as Animated8, Easing as Easing5, View as
|
|
1276
|
-
import
|
|
1496
|
+
import { useEffect as useEffect8, useState as useState13 } from "react";
|
|
1497
|
+
import { AccessibilityInfo as AccessibilityInfo6, Animated as Animated8, Easing as Easing5, View as View14 } from "react-native";
|
|
1498
|
+
import Svg6, { Circle as Circle4, Defs as Defs5, Ellipse as Ellipse2, G as Group2, LinearGradient as LinearGradient5, Path as Path5, RadialGradient as RadialGradient3, Stop as Stop5 } from "react-native-svg";
|
|
1277
1499
|
|
|
1278
1500
|
// src/marks/orochia-geometry.ts
|
|
1279
1501
|
var OROCHIA = {
|
|
@@ -1300,13 +1522,13 @@ var OROCHIA = {
|
|
|
1300
1522
|
};
|
|
1301
1523
|
|
|
1302
1524
|
// src/native/OrochiaMark.tsx
|
|
1303
|
-
import { jsx as
|
|
1525
|
+
import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1304
1526
|
var CENTER = OROCHIA.offset + 180;
|
|
1305
1527
|
function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }) {
|
|
1306
1528
|
const { theme } = useTheme();
|
|
1307
1529
|
const neutral = neutralProp ?? theme.textMuted;
|
|
1308
|
-
const [spin] =
|
|
1309
|
-
const [pulse] =
|
|
1530
|
+
const [spin] = useState13(() => new Animated8.Value(0));
|
|
1531
|
+
const [pulse] = useState13(() => new Animated8.Value(0));
|
|
1310
1532
|
useEffect8(() => {
|
|
1311
1533
|
if (!animated) return;
|
|
1312
1534
|
let loops = [];
|
|
@@ -1332,44 +1554,44 @@ function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }
|
|
|
1332
1554
|
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
1333
1555
|
const layer = { position: "absolute", width: size, height: size };
|
|
1334
1556
|
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
1335
|
-
const bodyGradient = /* @__PURE__ */
|
|
1336
|
-
return /* @__PURE__ */
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
/* @__PURE__ */
|
|
1339
|
-
/* @__PURE__ */
|
|
1340
|
-
/* @__PURE__ */
|
|
1557
|
+
const bodyGradient = /* @__PURE__ */ jsx18(LinearGradient5, { id: "body", gradientUnits: "userSpaceOnUse", x1: OROCHIA.body.x1 + OROCHIA.offset, y1: OROCHIA.body.y1 + OROCHIA.offset, x2: OROCHIA.body.x2 + OROCHIA.offset, y2: OROCHIA.body.y2 + OROCHIA.offset, children: OROCHIA.body.stops.map(([offset, color]) => /* @__PURE__ */ jsx18(Stop5, { offset, stopColor: color }, offset)) });
|
|
1558
|
+
return /* @__PURE__ */ jsxs15(View14, { style: { width: size, height: size }, ...a11y, children: [
|
|
1559
|
+
/* @__PURE__ */ jsxs15(Svg6, { viewBox, style: layer, children: [
|
|
1560
|
+
/* @__PURE__ */ jsx18(Defs5, { children: /* @__PURE__ */ jsxs15(RadialGradient3, { id: "glow", cx: "50%", cy: "50%", r: "50%", children: [
|
|
1561
|
+
/* @__PURE__ */ jsx18(Stop5, { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
1562
|
+
/* @__PURE__ */ jsx18(Stop5, { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: 0 })
|
|
1341
1563
|
] }) }),
|
|
1342
|
-
/* @__PURE__ */
|
|
1343
|
-
/* @__PURE__ */
|
|
1564
|
+
/* @__PURE__ */ jsx18(Circle4, { cx: CENTER, cy: CENTER, r: 170, fill: "url(#glow)" }),
|
|
1565
|
+
/* @__PURE__ */ jsx18(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.ring.r, stroke: neutral, strokeWidth: OROCHIA.ring.width, opacity: 0.35, fill: "none" })
|
|
1344
1566
|
] }),
|
|
1345
|
-
/* @__PURE__ */
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
/* @__PURE__ */
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1350
|
-
/* @__PURE__ */
|
|
1351
|
-
/* @__PURE__ */
|
|
1352
|
-
/* @__PURE__ */
|
|
1353
|
-
/* @__PURE__ */
|
|
1354
|
-
/* @__PURE__ */
|
|
1567
|
+
/* @__PURE__ */ jsx18(Animated8.View, { style: [layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] }], children: /* @__PURE__ */ jsx18(Svg6, { viewBox, style: layer, children: /* @__PURE__ */ jsx18(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.orbit.r, stroke: neutral, strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
1568
|
+
/* @__PURE__ */ jsxs15(Svg6, { viewBox, style: layer, children: [
|
|
1569
|
+
/* @__PURE__ */ jsx18(Defs5, { children: bodyGradient }),
|
|
1570
|
+
/* @__PURE__ */ jsxs15(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1571
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.arc, stroke: "url(#body)", strokeWidth: 22, strokeLinecap: "round", fill: "none" }),
|
|
1572
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash, fill: "none" }),
|
|
1573
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.neck, stroke: "url(#body)", strokeWidth: 14, strokeLinecap: "round", fill: "none" }),
|
|
1574
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.tail, stroke: "url(#body)", strokeWidth: 6, strokeLinecap: "round", fill: "none" }),
|
|
1575
|
+
/* @__PURE__ */ jsx18(Ellipse2, { cx: OROCHIA.head.cx, cy: OROCHIA.head.cy, rx: OROCHIA.head.rx, ry: OROCHIA.head.ry, rotation: OROCHIA.head.rotate, origin: `${OROCHIA.head.cx}, ${OROCHIA.head.cy}`, fill: "url(#body)" }),
|
|
1576
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: 3, strokeLinecap: "round", fill: "none" })
|
|
1355
1577
|
] })
|
|
1356
1578
|
] }),
|
|
1357
|
-
/* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ jsx18(Animated8.View, { style: [layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }], children: /* @__PURE__ */ jsxs15(Svg6, { viewBox, style: layer, children: [
|
|
1580
|
+
/* @__PURE__ */ jsx18(Defs5, { children: /* @__PURE__ */ jsx18(LinearGradient5, { id: "flame", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx18(Stop5, { offset, stopColor: color }, offset)) }) }),
|
|
1581
|
+
/* @__PURE__ */ jsxs15(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1582
|
+
/* @__PURE__ */ jsx18(Circle4, { cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
1583
|
+
/* @__PURE__ */ jsx18(Path5, { d: OROCHIA.flame.d, transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, fill: "url(#flame)" })
|
|
1362
1584
|
] })
|
|
1363
1585
|
] }) })
|
|
1364
1586
|
] });
|
|
1365
1587
|
}
|
|
1366
1588
|
|
|
1367
1589
|
// src/native/pagination.tsx
|
|
1368
|
-
import { Pressable as
|
|
1369
|
-
import
|
|
1370
|
-
import { jsx as
|
|
1590
|
+
import { Pressable as Pressable5, StyleSheet as StyleSheet14, Text as Text9, View as View15 } from "react-native";
|
|
1591
|
+
import Svg7, { Path as Path6 } from "react-native-svg";
|
|
1592
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1371
1593
|
function Chevron({ direction, color }) {
|
|
1372
|
-
return /* @__PURE__ */
|
|
1594
|
+
return /* @__PURE__ */ jsx19(Svg7, { 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__ */ jsx19(Path6, { d: direction === "left" ? "m15 6-6 6 6 6" : "m9 6 6 6-6 6" }) });
|
|
1373
1595
|
}
|
|
1374
1596
|
function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }) {
|
|
1375
1597
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -1378,8 +1600,8 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1378
1600
|
const current = Math.min(Math.max(1, page), count);
|
|
1379
1601
|
const canPrevious = !disabled && (paged ? current > 1 : Boolean(hasPrevious));
|
|
1380
1602
|
const canNext = !disabled && (paged ? current < count : Boolean(hasNext));
|
|
1381
|
-
const button = (direction, enabled, onPress, label) => /* @__PURE__ */
|
|
1382
|
-
|
|
1603
|
+
const button = (direction, enabled, onPress, label) => /* @__PURE__ */ jsx19(
|
|
1604
|
+
Pressable5,
|
|
1383
1605
|
{
|
|
1384
1606
|
role: "button",
|
|
1385
1607
|
"aria-label": label,
|
|
@@ -1388,29 +1610,29 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1388
1610
|
hitSlop: 6,
|
|
1389
1611
|
onPress,
|
|
1390
1612
|
style: ({ pressed }) => [
|
|
1391
|
-
|
|
1613
|
+
styles14.button,
|
|
1392
1614
|
{ borderRadius: radius3.sm, borderColor: theme.borderDefault, backgroundColor: theme.surface1, opacity: enabled ? pressed ? 0.8 : 1 : 0.4 }
|
|
1393
1615
|
],
|
|
1394
|
-
children: /* @__PURE__ */
|
|
1616
|
+
children: /* @__PURE__ */ jsx19(Chevron, { direction, color: theme.textPrimary })
|
|
1395
1617
|
}
|
|
1396
1618
|
);
|
|
1397
1619
|
const text = status ?? (paged ? labels.compact(current, count) : null);
|
|
1398
|
-
return /* @__PURE__ */
|
|
1620
|
+
return /* @__PURE__ */ jsxs16(View15, { role: "navigation", style: [styles14.row, style], children: [
|
|
1399
1621
|
button("left", canPrevious, paged ? () => onPageChange?.(current - 1) : onPrevious, labels.previous),
|
|
1400
|
-
text ? /* @__PURE__ */
|
|
1622
|
+
text ? /* @__PURE__ */ jsx19(Text9, { "aria-live": "polite", style: [styles14.status, { color: theme.textSecondary }], children: text }) : null,
|
|
1401
1623
|
button("right", canNext, paged ? () => onPageChange?.(current + 1) : onNext, labels.next)
|
|
1402
1624
|
] });
|
|
1403
1625
|
}
|
|
1404
|
-
var
|
|
1626
|
+
var styles14 = StyleSheet14.create({
|
|
1405
1627
|
row: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
|
|
1406
|
-
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth:
|
|
1628
|
+
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth: StyleSheet14.hairlineWidth },
|
|
1407
1629
|
status: { fontSize: 13, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
1408
1630
|
});
|
|
1409
1631
|
|
|
1410
1632
|
// src/native/phoenix.tsx
|
|
1411
|
-
import { useEffect as useEffect9, useState as
|
|
1412
|
-
import { AccessibilityInfo as AccessibilityInfo7, Animated as Animated9, Easing as Easing6, View as
|
|
1413
|
-
import
|
|
1633
|
+
import { useEffect as useEffect9, useState as useState14 } from "react";
|
|
1634
|
+
import { AccessibilityInfo as AccessibilityInfo7, Animated as Animated9, Easing as Easing6, View as View16 } from "react-native";
|
|
1635
|
+
import Svg8, { Circle as Circle5, Defs as Defs6, LinearGradient as LinearGradient6, Path as Path7, RadialGradient as RadialGradient4, Stop as Stop6 } from "react-native-svg";
|
|
1414
1636
|
|
|
1415
1637
|
// src/mascots/phoenix-geometry.ts
|
|
1416
1638
|
var PHOENIX = {
|
|
@@ -1433,9 +1655,9 @@ var PHOENIX_PALETTES = {
|
|
|
1433
1655
|
};
|
|
1434
1656
|
|
|
1435
1657
|
// src/native/phoenix.tsx
|
|
1436
|
-
import { jsx as
|
|
1658
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1437
1659
|
function useFloat(animated) {
|
|
1438
|
-
const [y] =
|
|
1660
|
+
const [y] = useState14(() => new Animated9.Value(0));
|
|
1439
1661
|
useEffect9(() => {
|
|
1440
1662
|
if (!animated) return;
|
|
1441
1663
|
let loop;
|
|
@@ -1458,36 +1680,36 @@ function Phoenix({ tone: tone2 = "own", size = 120, animated = true, title, styl
|
|
|
1458
1680
|
const id = useSvgId("kzp");
|
|
1459
1681
|
const y = useFloat(animated);
|
|
1460
1682
|
const p = tone2 === "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;
|
|
1461
|
-
return /* @__PURE__ */
|
|
1462
|
-
/* @__PURE__ */
|
|
1463
|
-
/* @__PURE__ */
|
|
1464
|
-
/* @__PURE__ */
|
|
1465
|
-
/* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ jsx20(View16, { style: [{ width: size, height: size }, style], ...markA11y(title), children: /* @__PURE__ */ jsx20(Animated9.View, { style: { transform: [{ translateY: y }] }, children: /* @__PURE__ */ jsxs17(Svg8, { width: size, height: size, viewBox: "0 0 120 120", children: [
|
|
1684
|
+
/* @__PURE__ */ jsxs17(Defs6, { children: [
|
|
1685
|
+
/* @__PURE__ */ jsxs17(LinearGradient6, { id: `${id}l`, x1: "1", y1: "0", x2: "0", y2: "1", children: [
|
|
1686
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "0%", stopColor: p.left[0] }),
|
|
1687
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "100%", stopColor: p.left[1] })
|
|
1466
1688
|
] }),
|
|
1467
|
-
/* @__PURE__ */
|
|
1468
|
-
/* @__PURE__ */
|
|
1469
|
-
/* @__PURE__ */
|
|
1689
|
+
/* @__PURE__ */ jsxs17(LinearGradient6, { id: `${id}r`, x1: "0", y1: "0", x2: "1", y2: "1", children: [
|
|
1690
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "0%", stopColor: p.right[0] }),
|
|
1691
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "100%", stopColor: p.right[1] })
|
|
1470
1692
|
] }),
|
|
1471
|
-
/* @__PURE__ */
|
|
1472
|
-
/* @__PURE__ */
|
|
1473
|
-
/* @__PURE__ */
|
|
1693
|
+
/* @__PURE__ */ jsxs17(RadialGradient4, { id: `${id}c`, children: [
|
|
1694
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "0%", stopColor: p.core[0] }),
|
|
1695
|
+
/* @__PURE__ */ jsx20(Stop6, { offset: "100%", stopColor: p.core[1], stopOpacity: 0 })
|
|
1474
1696
|
] })
|
|
1475
1697
|
] }),
|
|
1476
|
-
/* @__PURE__ */
|
|
1477
|
-
/* @__PURE__ */
|
|
1478
|
-
/* @__PURE__ */
|
|
1479
|
-
/* @__PURE__ */
|
|
1480
|
-
/* @__PURE__ */
|
|
1481
|
-
/* @__PURE__ */
|
|
1482
|
-
/* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1698
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.wingL, fill: `url(#${id}l)` }),
|
|
1699
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.wingR, fill: `url(#${id}r)` }),
|
|
1700
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.tailL, fill: `url(#${id}l)`, opacity: 0.7 }),
|
|
1701
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.tailR, fill: `url(#${id}r)`, opacity: 0.7 }),
|
|
1702
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.body, fill: p.body, stroke: p.edge, strokeOpacity: 0.5 }),
|
|
1703
|
+
/* @__PURE__ */ jsx20(Circle5, { cx: 60, cy: 58, r: 12, fill: `url(#${id}c)` }),
|
|
1704
|
+
/* @__PURE__ */ jsx20(Circle5, { cx: 60, cy: 58, r: 3.5, fill: "#ffffff" }),
|
|
1705
|
+
/* @__PURE__ */ jsx20(Path7, { d: PHOENIX.crest, stroke: p.crest, strokeWidth: 2, strokeLinecap: "round" })
|
|
1484
1706
|
] }) }) });
|
|
1485
1707
|
}
|
|
1486
1708
|
|
|
1487
1709
|
// src/native/YazakiaMark.tsx
|
|
1488
|
-
import
|
|
1489
|
-
import { View as
|
|
1490
|
-
import
|
|
1710
|
+
import React15 from "react";
|
|
1711
|
+
import { View as View17 } from "react-native";
|
|
1712
|
+
import Svg9, { Circle as Circle6, Defs as Defs7, LinearGradient as LinearGradient7, Path as Path8, RadialGradient as RadialGradient5, Stop as Stop7 } from "react-native-svg";
|
|
1491
1713
|
|
|
1492
1714
|
// src/marks/yazakia-geometry.ts
|
|
1493
1715
|
var turquoise = marks.yazakia[marks.yazakia.length - 1][1];
|
|
@@ -1517,54 +1739,54 @@ var YAZAKIA = {
|
|
|
1517
1739
|
};
|
|
1518
1740
|
|
|
1519
1741
|
// src/native/YazakiaMark.tsx
|
|
1520
|
-
import { jsx as
|
|
1742
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1521
1743
|
function YazakiaMark({ size = 48, animated = true, title, neutral }) {
|
|
1522
1744
|
const { theme } = useTheme();
|
|
1523
1745
|
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1524
1746
|
const id = useSvgId("yzm");
|
|
1525
1747
|
const viewBox = size < 48 ? YAZAKIA.croppedViewBox : YAZAKIA.viewBox;
|
|
1526
1748
|
const stroke = neutral ?? theme.textMuted;
|
|
1527
|
-
const gradient = /* @__PURE__ */
|
|
1749
|
+
const gradient = /* @__PURE__ */ jsx21(LinearGradient7, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: YAZAKIA.gradient.x1, y1: YAZAKIA.gradient.y1, x2: YAZAKIA.gradient.x2, y2: YAZAKIA.gradient.y2, children: YAZAKIA.gradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx21(Stop7, { offset, stopColor: color }, offset)) });
|
|
1528
1750
|
const fill = `url(#${id}a)`;
|
|
1529
|
-
return /* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
/* @__PURE__ */
|
|
1533
|
-
/* @__PURE__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
1751
|
+
return /* @__PURE__ */ jsxs18(View17, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1752
|
+
/* @__PURE__ */ jsxs18(Svg9, { viewBox, style: layer, children: [
|
|
1753
|
+
/* @__PURE__ */ jsxs18(Defs7, { children: [
|
|
1754
|
+
/* @__PURE__ */ jsxs18(RadialGradient5, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1755
|
+
/* @__PURE__ */ jsx21(Stop7, { offset: "0%", stopColor: YAZAKIA.glow.color, stopOpacity: YAZAKIA.glow.opacity }),
|
|
1756
|
+
/* @__PURE__ */ jsx21(Stop7, { offset: "100%", stopColor: YAZAKIA.glow.color, stopOpacity: 0 })
|
|
1535
1757
|
] }),
|
|
1536
1758
|
gradient
|
|
1537
1759
|
] }),
|
|
1538
|
-
size >= 48 ? /* @__PURE__ */
|
|
1539
|
-
/* @__PURE__ */
|
|
1540
|
-
YAZAKIA.voices.map((v, i) => /* @__PURE__ */
|
|
1541
|
-
/* @__PURE__ */
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
i === 0 ? /* @__PURE__ */
|
|
1760
|
+
size >= 48 ? /* @__PURE__ */ jsx21(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1761
|
+
/* @__PURE__ */ jsx21(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.ring.r, stroke, strokeWidth: YAZAKIA.ring.width, opacity: 0.35, fill: "none" }),
|
|
1762
|
+
YAZAKIA.voices.map((v, i) => /* @__PURE__ */ jsxs18(React15.Fragment, { children: [
|
|
1763
|
+
/* @__PURE__ */ jsx21(Path8, { d: v.body, fill }),
|
|
1764
|
+
/* @__PURE__ */ jsx21(Path8, { d: v.tail, fill }),
|
|
1765
|
+
i === 0 ? /* @__PURE__ */ jsx21(Path8, { d: `${v.body} ${v.tail}`, fill: YAZAKIA.shade.color, opacity: YAZAKIA.shade.opacity }) : null
|
|
1544
1766
|
] }, v.body))
|
|
1545
1767
|
] }),
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1549
|
-
YAZAKIA.pair.at.map(([cx, cy]) => /* @__PURE__ */
|
|
1768
|
+
/* @__PURE__ */ jsx21(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs18(Svg9, { viewBox, style: layer, children: [
|
|
1769
|
+
/* @__PURE__ */ jsx21(Defs7, { children: gradient }),
|
|
1770
|
+
/* @__PURE__ */ jsx21(Circle6, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.orbit.r, stroke, strokeWidth: YAZAKIA.orbit.width, strokeDasharray: YAZAKIA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
1771
|
+
YAZAKIA.pair.at.map(([cx, cy]) => /* @__PURE__ */ jsx21(Circle6, { cx, cy, r: YAZAKIA.pair.r, fill }, cx))
|
|
1550
1772
|
] }) }),
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1773
|
+
/* @__PURE__ */ jsx21(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs18(Svg9, { viewBox, style: layer, children: [
|
|
1774
|
+
/* @__PURE__ */ jsxs18(Defs7, { children: [
|
|
1553
1775
|
gradient,
|
|
1554
|
-
/* @__PURE__ */
|
|
1555
|
-
/* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsxs18(LinearGradient7, { id: `${id}l`, gradientUnits: "userSpaceOnUse", x1: 0, y1: YAZAKIA.lens.y1, x2: 0, y2: YAZAKIA.lens.y2, children: [
|
|
1777
|
+
/* @__PURE__ */ jsx21(Stop7, { offset: "0%", stopColor: YAZAKIA.highlight.color, stopOpacity: YAZAKIA.highlight.from }),
|
|
1778
|
+
/* @__PURE__ */ jsx21(Stop7, { offset: "100%", stopColor: YAZAKIA.highlight.color, stopOpacity: YAZAKIA.highlight.to })
|
|
1557
1779
|
] })
|
|
1558
1780
|
] }),
|
|
1559
|
-
/* @__PURE__ */
|
|
1560
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ jsx21(Path8, { d: YAZAKIA.lens.d, fill }),
|
|
1782
|
+
/* @__PURE__ */ jsx21(Path8, { d: YAZAKIA.lens.d, fill: `url(#${id}l)` })
|
|
1561
1783
|
] }) })
|
|
1562
1784
|
] });
|
|
1563
1785
|
}
|
|
1564
1786
|
|
|
1565
1787
|
// src/native/YororisMark.tsx
|
|
1566
|
-
import { View as
|
|
1567
|
-
import
|
|
1788
|
+
import { View as View18 } from "react-native";
|
|
1789
|
+
import Svg10, { Circle as Circle7, Defs as Defs8, LinearGradient as LinearGradient8, Path as Path9, RadialGradient as RadialGradient6, Stop as Stop8 } from "react-native-svg";
|
|
1568
1790
|
|
|
1569
1791
|
// src/marks/yororis-geometry.ts
|
|
1570
1792
|
var sand = marks.yororis[0][1];
|
|
@@ -1600,65 +1822,65 @@ var YORORIS = {
|
|
|
1600
1822
|
};
|
|
1601
1823
|
|
|
1602
1824
|
// src/native/YororisMark.tsx
|
|
1603
|
-
import { jsx as
|
|
1825
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1604
1826
|
function YororisMark({ size = 48, animated = true, title, neutral }) {
|
|
1605
1827
|
const { theme } = useTheme();
|
|
1606
1828
|
const { Animated: Animated14, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated, 36e3);
|
|
1607
1829
|
const id = useSvgId("yrm");
|
|
1608
1830
|
const viewBox = size < 48 ? YORORIS.croppedViewBox : YORORIS.viewBox;
|
|
1609
1831
|
const stroke = neutral ?? theme.textMuted;
|
|
1610
|
-
const gradient = /* @__PURE__ */
|
|
1832
|
+
const gradient = /* @__PURE__ */ jsx22(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__ */ jsx22(Stop8, { offset, stopColor: color }, offset)) });
|
|
1611
1833
|
const fill = `url(#${id}a)`;
|
|
1612
|
-
return /* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1617
|
-
/* @__PURE__ */
|
|
1834
|
+
return /* @__PURE__ */ jsxs19(View18, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1835
|
+
/* @__PURE__ */ jsxs19(Svg10, { viewBox, style: layer, children: [
|
|
1836
|
+
/* @__PURE__ */ jsxs19(Defs8, { children: [
|
|
1837
|
+
/* @__PURE__ */ jsxs19(RadialGradient6, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1838
|
+
/* @__PURE__ */ jsx22(Stop8, { offset: "0%", stopColor: YORORIS.glow.color, stopOpacity: YORORIS.glow.opacity }),
|
|
1839
|
+
/* @__PURE__ */ jsx22(Stop8, { offset: "100%", stopColor: YORORIS.glow.color, stopOpacity: 0 })
|
|
1618
1840
|
] }),
|
|
1619
1841
|
gradient
|
|
1620
1842
|
] }),
|
|
1621
|
-
size >= 48 ? /* @__PURE__ */
|
|
1622
|
-
/* @__PURE__ */
|
|
1623
|
-
/* @__PURE__ */
|
|
1624
|
-
YORORIS.leaves.map((d) => /* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1843
|
+
size >= 48 ? /* @__PURE__ */ jsx22(Circle7, { cx: YORORIS.center, cy: YORORIS.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1844
|
+
/* @__PURE__ */ jsx22(Circle7, { cx: YORORIS.center, cy: YORORIS.center, r: YORORIS.ring.r, stroke, strokeWidth: YORORIS.ring.width, opacity: 0.35, fill: "none" }),
|
|
1845
|
+
/* @__PURE__ */ jsx22(Path9, { d: YORORIS.stem, stroke: fill, strokeWidth: YORORIS.stroke, strokeLinecap: "round", fill: "none" }),
|
|
1846
|
+
YORORIS.leaves.map((d) => /* @__PURE__ */ jsx22(Path9, { d, fill }, d)),
|
|
1847
|
+
/* @__PURE__ */ jsx22(Path9, { d: YORORIS.veins, stroke: YORORIS.vein.color, strokeOpacity: YORORIS.vein.opacity, strokeWidth: YORORIS.vein.width, strokeLinecap: "round", strokeDasharray: YORORIS.vein.dash, fill: "none" })
|
|
1626
1848
|
] }),
|
|
1627
|
-
/* @__PURE__ */
|
|
1628
|
-
/* @__PURE__ */
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
/* @__PURE__ */
|
|
1849
|
+
/* @__PURE__ */ jsx22(Animated14.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs19(Svg10, { viewBox, style: layer, children: [
|
|
1850
|
+
/* @__PURE__ */ jsx22(Defs8, { children: gradient }),
|
|
1851
|
+
/* @__PURE__ */ jsx22(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" }),
|
|
1852
|
+
/* @__PURE__ */ jsx22(Circle7, { cx: YORORIS.moment.at[0], cy: YORORIS.moment.at[1], r: YORORIS.moment.r, fill })
|
|
1631
1853
|
] }) }),
|
|
1632
|
-
/* @__PURE__ */
|
|
1633
|
-
/* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
/* @__PURE__ */
|
|
1854
|
+
/* @__PURE__ */ jsx22(Animated14.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs19(Svg10, { viewBox, style: layer, children: [
|
|
1855
|
+
/* @__PURE__ */ jsx22(Defs8, { children: /* @__PURE__ */ jsx22(LinearGradient8, { id: `${id}c`, x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: YORORIS.coreGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx22(Stop8, { offset, stopColor: color }, offset)) }) }),
|
|
1856
|
+
/* @__PURE__ */ jsx22(Circle7, { cx: YORORIS.core.cx, cy: YORORIS.core.cy, r: YORORIS.core.r, fill: `url(#${id}c)` }),
|
|
1857
|
+
/* @__PURE__ */ jsx22(Circle7, { cx: YORORIS.core.cx, cy: YORORIS.core.cy, r: YORORIS.core.inner, fill: YORORIS.highlight })
|
|
1636
1858
|
] }) })
|
|
1637
1859
|
] });
|
|
1638
1860
|
}
|
|
1639
1861
|
|
|
1640
1862
|
// src/native/ProductMark.tsx
|
|
1641
|
-
import { jsx as
|
|
1863
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1642
1864
|
function ProductMark({ id, ...props }) {
|
|
1643
|
-
if (id === "krizaka") return /* @__PURE__ */
|
|
1644
|
-
if (id === "orazaka") return /* @__PURE__ */
|
|
1645
|
-
if (id === "yazakia") return /* @__PURE__ */
|
|
1646
|
-
if (id === "yororis") return /* @__PURE__ */
|
|
1647
|
-
return /* @__PURE__ */
|
|
1865
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx23(KrizakaMark, { ...props });
|
|
1866
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx23(OrazakaMark, { ...props });
|
|
1867
|
+
if (id === "yazakia") return /* @__PURE__ */ jsx23(YazakiaMark, { ...props });
|
|
1868
|
+
if (id === "yororis") return /* @__PURE__ */ jsx23(YororisMark, { ...props });
|
|
1869
|
+
return /* @__PURE__ */ jsx23(OrochiaMark, { ...props });
|
|
1648
1870
|
}
|
|
1649
1871
|
|
|
1650
1872
|
// src/native/profile-card.tsx
|
|
1651
|
-
import * as
|
|
1652
|
-
import { Animated as Animated10, StyleSheet as
|
|
1653
|
-
import { jsx as
|
|
1873
|
+
import * as React16 from "react";
|
|
1874
|
+
import { Animated as Animated10, StyleSheet as StyleSheet15, View as View19 } from "react-native";
|
|
1875
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1654
1876
|
var ratioOf = (value, max = 100) => Math.min(1, Math.max(0, value / (max || 1)));
|
|
1655
1877
|
function Bar({ label, ratio, words, animated, delay }) {
|
|
1656
1878
|
const { theme } = useTheme();
|
|
1657
1879
|
const t = useEntrance(animated, delay, 900);
|
|
1658
|
-
const [width, setWidth] =
|
|
1880
|
+
const [width, setWidth] = React16.useState(0);
|
|
1659
1881
|
const translateX = t.interpolate({ inputRange: [0, 1], outputRange: [-width * ratio, 0] });
|
|
1660
|
-
return /* @__PURE__ */
|
|
1661
|
-
|
|
1882
|
+
return /* @__PURE__ */ jsx24(
|
|
1883
|
+
View19,
|
|
1662
1884
|
{
|
|
1663
1885
|
accessible: true,
|
|
1664
1886
|
role: "meter",
|
|
@@ -1668,42 +1890,42 @@ function Bar({ label, ratio, words, animated, delay }) {
|
|
|
1668
1890
|
"aria-valuenow": Math.round(ratio * 100),
|
|
1669
1891
|
"aria-valuetext": words,
|
|
1670
1892
|
onLayout: (e) => setWidth(e.nativeEvent.layout.width),
|
|
1671
|
-
style: [
|
|
1672
|
-
children: /* @__PURE__ */
|
|
1893
|
+
style: [styles15.track, { backgroundColor: theme.surface3 }],
|
|
1894
|
+
children: /* @__PURE__ */ jsx24(Animated10.View, { style: [styles15.fill, { width: `${ratio * 100}%`, backgroundColor: theme.accent, transform: [{ translateX }] }] })
|
|
1673
1895
|
}
|
|
1674
1896
|
);
|
|
1675
1897
|
}
|
|
1676
1898
|
function ProfileCard({ visual, name, statLabel, value = 100, valueText, stats, caption, children, animated = true, style, ...props }) {
|
|
1677
1899
|
const { theme, radius: radius3 } = useTheme();
|
|
1678
1900
|
const ratio = ratioOf(value);
|
|
1679
|
-
return /* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */
|
|
1682
|
-
/* @__PURE__ */
|
|
1683
|
-
statLabel ? /* @__PURE__ */
|
|
1901
|
+
return /* @__PURE__ */ jsxs20(View19, { ...props, style: [styles15.root, { backgroundColor: theme.surface1, borderColor: theme.borderSubtle, borderRadius: radius3.xl }, style], children: [
|
|
1902
|
+
/* @__PURE__ */ jsx24(View19, { "aria-hidden": true, style: [styles15.disc, { backgroundColor: theme.surface2, borderColor: theme.accentSoft }], children: visual }),
|
|
1903
|
+
/* @__PURE__ */ jsxs20(View19, { style: styles15.head, children: [
|
|
1904
|
+
/* @__PURE__ */ jsx24(Txt, { variant: "title", style: styles15.name, children: name }),
|
|
1905
|
+
statLabel ? /* @__PURE__ */ jsxs20(Txt, { variant: "caption", tone: "secondary", children: [
|
|
1684
1906
|
statLabel,
|
|
1685
1907
|
" ",
|
|
1686
|
-
/* @__PURE__ */
|
|
1908
|
+
/* @__PURE__ */ jsx24(Txt, { variant: "caption", children: valueText ?? `${Math.round(ratio * 100)} %` })
|
|
1687
1909
|
] }) : null
|
|
1688
1910
|
] }),
|
|
1689
|
-
statLabel ? /* @__PURE__ */
|
|
1911
|
+
statLabel ? /* @__PURE__ */ jsx24(Bar, { label: statLabel, ratio, words: valueText ?? `${Math.round(ratio * 100)} %`, animated, delay: 200 }) : null,
|
|
1690
1912
|
stats?.map((s, i) => {
|
|
1691
1913
|
const r = ratioOf(s.value, s.max);
|
|
1692
1914
|
const words = s.valueText ?? `${Math.round(r * 100)} %`;
|
|
1693
|
-
return /* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1696
|
-
/* @__PURE__ */
|
|
1915
|
+
return /* @__PURE__ */ jsxs20(View19, { style: styles15.stat, children: [
|
|
1916
|
+
/* @__PURE__ */ jsxs20(View19, { "aria-hidden": true, style: styles15.statHead, children: [
|
|
1917
|
+
/* @__PURE__ */ jsx24(Txt, { variant: "caption", tone: "secondary", children: s.label }),
|
|
1918
|
+
/* @__PURE__ */ jsx24(Txt, { variant: "caption", children: words })
|
|
1697
1919
|
] }),
|
|
1698
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ jsx24(Bar, { label: s.label, ratio: r, words, animated, delay: 320 + i * 120 })
|
|
1699
1921
|
] }, s.label);
|
|
1700
1922
|
}),
|
|
1701
|
-
caption ? /* @__PURE__ */
|
|
1702
|
-
children ? /* @__PURE__ */
|
|
1923
|
+
caption ? /* @__PURE__ */ jsx24(Txt, { variant: "caption", tone: "secondary", style: styles15.caption, children: caption }) : null,
|
|
1924
|
+
children ? /* @__PURE__ */ jsx24(View19, { style: styles15.extra, children }) : null
|
|
1703
1925
|
] });
|
|
1704
1926
|
}
|
|
1705
|
-
var
|
|
1706
|
-
root: { alignItems: "center", gap: 12, padding: 20, borderWidth:
|
|
1927
|
+
var styles15 = StyleSheet15.create({
|
|
1928
|
+
root: { alignItems: "center", gap: 12, padding: 20, borderWidth: StyleSheet15.hairlineWidth },
|
|
1707
1929
|
disc: { width: 104, height: 104, borderRadius: 52, borderWidth: 1, alignItems: "center", justifyContent: "center", overflow: "hidden" },
|
|
1708
1930
|
head: { flexDirection: "row", alignSelf: "stretch", alignItems: "center", justifyContent: "space-between", gap: 8 },
|
|
1709
1931
|
name: { flexShrink: 1, fontSize: 17 },
|
|
@@ -1716,10 +1938,10 @@ var styles12 = StyleSheet12.create({
|
|
|
1716
1938
|
});
|
|
1717
1939
|
|
|
1718
1940
|
// src/native/progress.tsx
|
|
1719
|
-
import * as
|
|
1720
|
-
import { Animated as Animated11, Easing as Easing7, StyleSheet as
|
|
1721
|
-
import
|
|
1722
|
-
import { jsx as
|
|
1941
|
+
import * as React17 from "react";
|
|
1942
|
+
import { Animated as Animated11, Easing as Easing7, StyleSheet as StyleSheet16, View as View20 } from "react-native";
|
|
1943
|
+
import Svg11, { Circle as Circle8, Defs as Defs9, LinearGradient as LinearGradient9, Rect as Rect3, Stop as Stop9 } from "react-native-svg";
|
|
1944
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1723
1945
|
var AnimatedCircle = Animated11.createAnimatedComponent(Circle8);
|
|
1724
1946
|
var BAR = { sm: 4, md: 8, lg: 12 };
|
|
1725
1947
|
var RING = { sm: 40, md: 80, lg: 144 };
|
|
@@ -1731,10 +1953,10 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1731
1953
|
const known = typeof value === "number" && Number.isFinite(value);
|
|
1732
1954
|
const ratio = known ? Math.min(1, Math.max(0, value / (max || 1))) : 0;
|
|
1733
1955
|
const percent = Math.round(ratio * 100);
|
|
1734
|
-
const [progress] =
|
|
1735
|
-
const [spin] =
|
|
1736
|
-
const [track, setTrack] =
|
|
1737
|
-
|
|
1956
|
+
const [progress] = React17.useState(() => new Animated11.Value(ratio));
|
|
1957
|
+
const [spin] = React17.useState(() => new Animated11.Value(0));
|
|
1958
|
+
const [track, setTrack] = React17.useState(0);
|
|
1959
|
+
React17.useEffect(() => {
|
|
1738
1960
|
if (reduce) {
|
|
1739
1961
|
progress.setValue(ratio);
|
|
1740
1962
|
return;
|
|
@@ -1743,7 +1965,7 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1743
1965
|
animation.start();
|
|
1744
1966
|
return () => animation.stop();
|
|
1745
1967
|
}, [ratio, reduce, progress]);
|
|
1746
|
-
|
|
1968
|
+
React17.useEffect(() => {
|
|
1747
1969
|
if (known || reduce) return;
|
|
1748
1970
|
const loop = Animated11.loop(Animated11.timing(spin, { toValue: 1, duration: 1200, easing: Easing7.linear, useNativeDriver: true }));
|
|
1749
1971
|
loop.start();
|
|
@@ -1761,9 +1983,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1761
1983
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
1762
1984
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
1763
1985
|
};
|
|
1764
|
-
const gradient = /* @__PURE__ */
|
|
1765
|
-
/* @__PURE__ */
|
|
1766
|
-
/* @__PURE__ */
|
|
1986
|
+
const gradient = /* @__PURE__ */ jsx25(Defs9, { children: /* @__PURE__ */ jsxs21(LinearGradient9, { id, x1: "0", y1: "0", x2: "1", y2: variant === "ring" ? "1" : "0", children: [
|
|
1987
|
+
/* @__PURE__ */ jsx25(Stop9, { offset: "0", stopColor: theme.accent }),
|
|
1988
|
+
/* @__PURE__ */ jsx25(Stop9, { offset: "1", stopColor: theme.accent2 })
|
|
1767
1989
|
] }) });
|
|
1768
1990
|
if (variant === "ring") {
|
|
1769
1991
|
const side = RING[size];
|
|
@@ -1772,11 +1994,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1772
1994
|
const circumference = 2 * Math.PI * r;
|
|
1773
1995
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
1774
1996
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
1775
|
-
return /* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */
|
|
1997
|
+
return /* @__PURE__ */ jsxs21(View20, { ...a11y, style: [styles16.ring, { width: side, height: side }, style], children: [
|
|
1998
|
+
/* @__PURE__ */ jsx25(Animated11.View, { style: [StyleSheet16.absoluteFill, { transform: [{ rotate: known ? "-90deg" : rotate }] }], children: /* @__PURE__ */ jsxs21(Svg11, { width: side, height: side, viewBox: "0 0 100 100", children: [
|
|
1777
1999
|
gradient,
|
|
1778
|
-
/* @__PURE__ */
|
|
1779
|
-
/* @__PURE__ */
|
|
2000
|
+
/* @__PURE__ */ jsx25(Circle8, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
2001
|
+
/* @__PURE__ */ jsx25(
|
|
1780
2002
|
AnimatedCircle,
|
|
1781
2003
|
{
|
|
1782
2004
|
cx: 50,
|
|
@@ -1796,49 +2018,49 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1796
2018
|
}
|
|
1797
2019
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
1798
2020
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
1799
|
-
return /* @__PURE__ */
|
|
1800
|
-
|
|
2021
|
+
return /* @__PURE__ */ jsx25(
|
|
2022
|
+
View20,
|
|
1801
2023
|
{
|
|
1802
2024
|
...a11y,
|
|
1803
2025
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
1804
|
-
style: [
|
|
1805
|
-
children: /* @__PURE__ */
|
|
2026
|
+
style: [styles16.bar, { height: BAR[size], backgroundColor: theme.surface3 }, style],
|
|
2027
|
+
children: /* @__PURE__ */ jsx25(Animated11.View, { style: [styles16.fill, { width }, known || reduce ? null : { transform: [{ translateX: translate }] }], children: /* @__PURE__ */ jsxs21(Svg11, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
1806
2028
|
gradient,
|
|
1807
|
-
/* @__PURE__ */
|
|
2029
|
+
/* @__PURE__ */ jsx25(Rect3, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
1808
2030
|
] }) })
|
|
1809
2031
|
}
|
|
1810
2032
|
);
|
|
1811
2033
|
}
|
|
1812
|
-
var
|
|
2034
|
+
var styles16 = StyleSheet16.create({
|
|
1813
2035
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
1814
2036
|
bar: { width: "100%", overflow: "hidden", borderRadius: 9999 },
|
|
1815
2037
|
fill: { height: "100%", overflow: "hidden", borderRadius: 9999 }
|
|
1816
2038
|
});
|
|
1817
2039
|
|
|
1818
2040
|
// src/native/search-field.tsx
|
|
1819
|
-
import * as
|
|
1820
|
-
import { Pressable as
|
|
1821
|
-
import
|
|
1822
|
-
import { jsx as
|
|
2041
|
+
import * as React18 from "react";
|
|
2042
|
+
import { Pressable as Pressable6, StyleSheet as StyleSheet17, TextInput as TextInput3, View as View21 } from "react-native";
|
|
2043
|
+
import Svg12, { Circle as Circle9, Path as Path10 } from "react-native-svg";
|
|
2044
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1823
2045
|
function SearchField({ label, value, defaultValue = "", onValueChange, onSearch, debounce = 300, onSubmit, clearLabel, style, placeholder, ...props }) {
|
|
1824
2046
|
const { theme, radius: radius3 } = useTheme();
|
|
1825
|
-
const [own, setOwn] =
|
|
2047
|
+
const [own, setOwn] = React18.useState(defaultValue);
|
|
1826
2048
|
const query = value ?? own;
|
|
1827
|
-
const timer2 =
|
|
1828
|
-
|
|
2049
|
+
const timer2 = React18.useRef(void 0);
|
|
2050
|
+
React18.useEffect(() => () => clearTimeout(timer2.current), []);
|
|
1829
2051
|
const change = (next) => {
|
|
1830
2052
|
if (value === void 0) setOwn(next);
|
|
1831
2053
|
onValueChange?.(next);
|
|
1832
2054
|
clearTimeout(timer2.current);
|
|
1833
2055
|
if (onSearch) timer2.current = setTimeout(() => onSearch(next), debounce);
|
|
1834
2056
|
};
|
|
1835
|
-
return /* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
1838
|
-
/* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsxs22(View21, { style: [styles17.frame, { borderRadius: radius3.md, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style], children: [
|
|
2058
|
+
/* @__PURE__ */ jsxs22(Svg12, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2, strokeLinecap: "round", "aria-hidden": true, children: [
|
|
2059
|
+
/* @__PURE__ */ jsx26(Circle9, { cx: 11, cy: 11, r: 7 }),
|
|
2060
|
+
/* @__PURE__ */ jsx26(Path10, { d: "m20 20-3.5-3.5" })
|
|
1839
2061
|
] }),
|
|
1840
|
-
/* @__PURE__ */
|
|
1841
|
-
|
|
2062
|
+
/* @__PURE__ */ jsx26(
|
|
2063
|
+
TextInput3,
|
|
1842
2064
|
{
|
|
1843
2065
|
role: "searchbox",
|
|
1844
2066
|
"aria-label": label,
|
|
@@ -1855,34 +2077,34 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
1855
2077
|
onSearch?.(query);
|
|
1856
2078
|
onSubmit?.(query);
|
|
1857
2079
|
},
|
|
1858
|
-
style: [
|
|
2080
|
+
style: [styles17.input, { color: theme.textPrimary }],
|
|
1859
2081
|
...props
|
|
1860
2082
|
}
|
|
1861
2083
|
),
|
|
1862
|
-
query ? /* @__PURE__ */
|
|
2084
|
+
query ? /* @__PURE__ */ jsx26(Pressable6, { role: "button", "aria-label": clearLabel, hitSlop: 10, onPress: () => change(""), style: styles17.clear, children: /* @__PURE__ */ jsx26(Svg12, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2.4, strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx26(Path10, { d: "M18 6 6 18M6 6l12 12" }) }) }) : null
|
|
1863
2085
|
] });
|
|
1864
2086
|
}
|
|
1865
|
-
var
|
|
1866
|
-
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth:
|
|
2087
|
+
var styles17 = StyleSheet17.create({
|
|
2088
|
+
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth: StyleSheet17.hairlineWidth },
|
|
1867
2089
|
input: { flex: 1, height: "100%", fontSize: 15, paddingVertical: 0 },
|
|
1868
2090
|
clear: { width: 32, height: 32, alignItems: "center", justifyContent: "center" }
|
|
1869
2091
|
});
|
|
1870
2092
|
|
|
1871
2093
|
// src/native/segmented.tsx
|
|
1872
|
-
import { Pressable as
|
|
1873
|
-
import { jsx as
|
|
2094
|
+
import { Pressable as Pressable7, StyleSheet as StyleSheet18, Text as Text10, View as View22 } from "react-native";
|
|
2095
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1874
2096
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
1875
2097
|
const { theme, radius: radius3 } = useTheme();
|
|
1876
|
-
return /* @__PURE__ */
|
|
1877
|
-
|
|
2098
|
+
return /* @__PURE__ */ jsx27(
|
|
2099
|
+
View22,
|
|
1878
2100
|
{
|
|
1879
2101
|
role: "tablist",
|
|
1880
2102
|
"aria-label": label,
|
|
1881
|
-
style: [
|
|
2103
|
+
style: [styles18.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
1882
2104
|
children: options.map((option) => {
|
|
1883
2105
|
const selected = option.value === value;
|
|
1884
|
-
return /* @__PURE__ */
|
|
1885
|
-
|
|
2106
|
+
return /* @__PURE__ */ jsx27(
|
|
2107
|
+
Pressable7,
|
|
1886
2108
|
{
|
|
1887
2109
|
role: "tab",
|
|
1888
2110
|
"aria-selected": selected,
|
|
@@ -1892,12 +2114,12 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1892
2114
|
if (!selected) onValueChange(option.value);
|
|
1893
2115
|
},
|
|
1894
2116
|
style: [
|
|
1895
|
-
|
|
2117
|
+
styles18.segment,
|
|
1896
2118
|
{ borderRadius: radius3.sm },
|
|
1897
2119
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
1898
|
-
option.disabled ?
|
|
2120
|
+
option.disabled ? styles18.disabled : null
|
|
1899
2121
|
],
|
|
1900
|
-
children: /* @__PURE__ */
|
|
2122
|
+
children: /* @__PURE__ */ jsx27(Text10, { numberOfLines: 1, style: [styles18.label, { color: selected ? theme.textPrimary : theme.textSecondary, fontSize: size === "sm" ? 12 : 13 }], children: option.label })
|
|
1901
2123
|
},
|
|
1902
2124
|
option.value
|
|
1903
2125
|
);
|
|
@@ -1905,17 +2127,17 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1905
2127
|
}
|
|
1906
2128
|
);
|
|
1907
2129
|
}
|
|
1908
|
-
var
|
|
1909
|
-
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth:
|
|
1910
|
-
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth:
|
|
2130
|
+
var styles18 = StyleSheet18.create({
|
|
2131
|
+
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth: StyleSheet18.hairlineWidth },
|
|
2132
|
+
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth: StyleSheet18.hairlineWidth, borderColor: "transparent" },
|
|
1911
2133
|
label: { fontWeight: "600" },
|
|
1912
2134
|
disabled: { opacity: 0.4 }
|
|
1913
2135
|
});
|
|
1914
2136
|
|
|
1915
2137
|
// src/native/skeleton.tsx
|
|
1916
|
-
import * as
|
|
2138
|
+
import * as React19 from "react";
|
|
1917
2139
|
import { Animated as Animated12 } from "react-native";
|
|
1918
|
-
import { jsx as
|
|
2140
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1919
2141
|
var SHAPE = {
|
|
1920
2142
|
text: { width: "100%", height: 12, radius: 4 },
|
|
1921
2143
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -1924,8 +2146,8 @@ var SHAPE = {
|
|
|
1924
2146
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
1925
2147
|
const { theme } = useTheme();
|
|
1926
2148
|
const reduce = useReducedMotion();
|
|
1927
|
-
const [opacity] =
|
|
1928
|
-
|
|
2149
|
+
const [opacity] = React19.useState(() => new Animated12.Value(1));
|
|
2150
|
+
React19.useEffect(() => {
|
|
1929
2151
|
if (reduce) return;
|
|
1930
2152
|
const loop = Animated12.loop(
|
|
1931
2153
|
Animated12.sequence([
|
|
@@ -1941,7 +2163,7 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1941
2163
|
}, [reduce, opacity]);
|
|
1942
2164
|
const s = SHAPE[shape];
|
|
1943
2165
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
1944
|
-
return /* @__PURE__ */
|
|
2166
|
+
return /* @__PURE__ */ jsx28(
|
|
1945
2167
|
Animated12.View,
|
|
1946
2168
|
{
|
|
1947
2169
|
testID,
|
|
@@ -1956,10 +2178,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1956
2178
|
|
|
1957
2179
|
// src/native/spinner.tsx
|
|
1958
2180
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
1959
|
-
import { jsx as
|
|
2181
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1960
2182
|
function Spinner({ label, size = "md", ...props }) {
|
|
1961
2183
|
const { theme } = useTheme();
|
|
1962
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ jsx29(
|
|
1963
2185
|
ActivityIndicator2,
|
|
1964
2186
|
{
|
|
1965
2187
|
accessible: true,
|
|
@@ -1974,9 +2196,9 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
1974
2196
|
}
|
|
1975
2197
|
|
|
1976
2198
|
// src/native/toast.tsx
|
|
1977
|
-
import * as
|
|
1978
|
-
import { AccessibilityInfo as AccessibilityInfo8, Animated as Animated13, Pressable as
|
|
1979
|
-
import { Fragment as Fragment3, jsx as
|
|
2199
|
+
import * as React20 from "react";
|
|
2200
|
+
import { AccessibilityInfo as AccessibilityInfo8, Animated as Animated13, Pressable as Pressable8, StyleSheet as StyleSheet19, Text as Text11, View as View23 } from "react-native";
|
|
2201
|
+
import { Fragment as Fragment3, jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1980
2202
|
var items = [];
|
|
1981
2203
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
1982
2204
|
var counter = 0;
|
|
@@ -2011,76 +2233,76 @@ var toast = Object.assign(show, {
|
|
|
2011
2233
|
function ToastView({ item, closeLabel, duration }) {
|
|
2012
2234
|
const { theme, radius: radius3 } = useTheme();
|
|
2013
2235
|
const reduce = useReducedMotion();
|
|
2014
|
-
const [enter] =
|
|
2015
|
-
|
|
2236
|
+
const [enter] = React20.useState(() => new Animated13.Value(reduce ? 1 : 0));
|
|
2237
|
+
React20.useEffect(() => {
|
|
2016
2238
|
if (reduce) enter.setValue(1);
|
|
2017
2239
|
else Animated13.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
2018
2240
|
}, [enter, reduce]);
|
|
2019
|
-
|
|
2241
|
+
React20.useEffect(() => {
|
|
2020
2242
|
AccessibilityInfo8.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
2021
2243
|
}, [item.title, item.description]);
|
|
2022
2244
|
const ms = item.duration ?? duration;
|
|
2023
|
-
|
|
2245
|
+
React20.useEffect(() => {
|
|
2024
2246
|
if (!Number.isFinite(ms)) return;
|
|
2025
2247
|
const timer2 = setTimeout(() => dismiss(item.id), ms);
|
|
2026
2248
|
return () => clearTimeout(timer2);
|
|
2027
2249
|
}, [item.id, ms]);
|
|
2028
2250
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
2029
|
-
const text = /* @__PURE__ */
|
|
2030
|
-
item.icon ? /* @__PURE__ */
|
|
2031
|
-
/* @__PURE__ */
|
|
2032
|
-
/* @__PURE__ */
|
|
2033
|
-
item.description ? /* @__PURE__ */
|
|
2251
|
+
const text = /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
2252
|
+
item.icon ? /* @__PURE__ */ jsx30(View23, { "aria-hidden": true, children: item.icon }) : null,
|
|
2253
|
+
/* @__PURE__ */ jsxs23(View23, { style: styles19.content, children: [
|
|
2254
|
+
/* @__PURE__ */ jsx30(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
2255
|
+
item.description ? /* @__PURE__ */ jsx30(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
2034
2256
|
] })
|
|
2035
2257
|
] });
|
|
2036
|
-
const body = /* @__PURE__ */
|
|
2037
|
-
item.onPress ? /* @__PURE__ */
|
|
2038
|
-
|
|
2258
|
+
const body = /* @__PURE__ */ jsxs23(Fragment3, { children: [
|
|
2259
|
+
item.onPress ? /* @__PURE__ */ jsx30(
|
|
2260
|
+
Pressable8,
|
|
2039
2261
|
{
|
|
2040
2262
|
role: "button",
|
|
2041
2263
|
onPress: () => {
|
|
2042
2264
|
item.onPress?.();
|
|
2043
2265
|
dismiss(item.id);
|
|
2044
2266
|
},
|
|
2045
|
-
style: ({ pressed }) => [
|
|
2267
|
+
style: ({ pressed }) => [styles19.main, { opacity: pressed ? 0.8 : 1 }],
|
|
2046
2268
|
children: text
|
|
2047
2269
|
}
|
|
2048
|
-
) : /* @__PURE__ */
|
|
2049
|
-
item.action ? /* @__PURE__ */
|
|
2050
|
-
|
|
2270
|
+
) : /* @__PURE__ */ jsx30(View23, { style: styles19.main, children: text }),
|
|
2271
|
+
item.action ? /* @__PURE__ */ jsx30(
|
|
2272
|
+
Pressable8,
|
|
2051
2273
|
{
|
|
2052
2274
|
role: "button",
|
|
2053
2275
|
onPress: () => {
|
|
2054
2276
|
item.action?.onPress();
|
|
2055
2277
|
dismiss(item.id);
|
|
2056
2278
|
},
|
|
2057
|
-
style: [
|
|
2058
|
-
children: /* @__PURE__ */
|
|
2279
|
+
style: [styles19.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
2280
|
+
children: /* @__PURE__ */ jsx30(Text11, { style: [styles19.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
2059
2281
|
}
|
|
2060
2282
|
) : null,
|
|
2061
|
-
/* @__PURE__ */
|
|
2283
|
+
/* @__PURE__ */ jsx30(Pressable8, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles19.close, children: /* @__PURE__ */ jsx30(Text11, { style: [styles19.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
2062
2284
|
] });
|
|
2063
2285
|
const frame = [
|
|
2064
|
-
|
|
2286
|
+
styles19.toast,
|
|
2065
2287
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
2066
2288
|
];
|
|
2067
2289
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }] };
|
|
2068
|
-
return /* @__PURE__ */
|
|
2290
|
+
return /* @__PURE__ */ jsx30(Animated13.View, { "aria-live": "polite", style: motion3, children: /* @__PURE__ */ jsx30(View23, { style: frame, children: body }) });
|
|
2069
2291
|
}
|
|
2070
2292
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
2071
|
-
const all =
|
|
2293
|
+
const all = React20.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
2072
2294
|
const shown = all.slice(-max);
|
|
2073
2295
|
if (shown.length === 0) return null;
|
|
2074
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ jsx30(View23, { pointerEvents: "box-none", style: [styles19.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx30(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
2075
2297
|
}
|
|
2076
|
-
var
|
|
2298
|
+
var styles19 = StyleSheet19.create({
|
|
2077
2299
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
2078
2300
|
toast: {
|
|
2079
2301
|
flexDirection: "row",
|
|
2080
2302
|
alignItems: "center",
|
|
2081
2303
|
gap: 10,
|
|
2082
2304
|
padding: 12,
|
|
2083
|
-
borderWidth:
|
|
2305
|
+
borderWidth: StyleSheet19.hairlineWidth,
|
|
2084
2306
|
borderLeftWidth: 4,
|
|
2085
2307
|
shadowOpacity: 0.3,
|
|
2086
2308
|
shadowRadius: 16,
|
|
@@ -2109,8 +2331,10 @@ export {
|
|
|
2109
2331
|
CardOverlay,
|
|
2110
2332
|
CardRoot,
|
|
2111
2333
|
CardTitle,
|
|
2334
|
+
Checkbox,
|
|
2112
2335
|
Chip,
|
|
2113
2336
|
Countdown,
|
|
2337
|
+
DateField,
|
|
2114
2338
|
EmptyState,
|
|
2115
2339
|
ErrorState,
|
|
2116
2340
|
GoalGauge,
|
|
@@ -2131,6 +2355,7 @@ export {
|
|
|
2131
2355
|
Skeleton,
|
|
2132
2356
|
Spinner,
|
|
2133
2357
|
SuccessState,
|
|
2358
|
+
TextField,
|
|
2134
2359
|
ThemeProvider,
|
|
2135
2360
|
Toaster,
|
|
2136
2361
|
Txt,
|
|
@@ -2138,6 +2363,11 @@ export {
|
|
|
2138
2363
|
YazakiaMark,
|
|
2139
2364
|
YororisMark,
|
|
2140
2365
|
alpha,
|
|
2366
|
+
composeDate,
|
|
2367
|
+
dateFieldLabels,
|
|
2368
|
+
datePartsOrder,
|
|
2369
|
+
isRealDate,
|
|
2370
|
+
latestBirthDate,
|
|
2141
2371
|
splitDuration,
|
|
2142
2372
|
textStyles,
|
|
2143
2373
|
toast,
|