@krizaka/ui 2.0.0-beta.4 → 2.0.0-beta.5
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 +3 -1
- package/dist/{button-8La7l0V4.d.ts → button-D5aSsmxX.d.ts} +3 -3
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/button.js.map +1 -1
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/{chunk-ZUD4U22H.js → chunk-6DJ6SQY3.js} +2 -2
- package/dist/chunk-6DJ6SQY3.js.map +1 -0
- package/dist/{chunk-3X5MVH54.js → chunk-IUGBKMJC.js} +2 -2
- package/dist/command.js +2 -2
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +90 -65
- package/dist/index.js.map +1 -1
- package/dist/motion.css +52 -2
- package/dist/native.d.ts +29 -4
- package/dist/native.js +359 -92
- package/dist/native.js.map +1 -1
- package/dist/section-backdrop.d.ts +75 -0
- package/dist/section-backdrop.js +27 -0
- package/dist/section-backdrop.js.map +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +18 -4
- package/registry/button.json +1 -1
- package/registry/card.json +1 -1
- package/registry/demos/section-backdrop.d.ts +5 -0
- package/registry/demos/section-backdrop.js +14 -0
- package/registry/demos/section-backdrop.tsx +10 -0
- package/registry/dropdown-menu.json +1 -1
- package/registry/index.json +10 -1
- package/registry/section-backdrop.json +73 -0
- package/dist/chunk-ZUD4U22H.js.map +0 -1
- /package/dist/{chunk-3X5MVH54.js.map → chunk-IUGBKMJC.js.map} +0 -0
package/dist/native.js
CHANGED
|
@@ -48,9 +48,13 @@ var themes = Object.freeze({ dark: Object.freeze({
|
|
|
48
48
|
"accent": "#196df5",
|
|
49
49
|
"accentHover": "#0e5bd8",
|
|
50
50
|
"accentSoft": "rgba(25,109,245,0.1)",
|
|
51
|
+
"accentText": "#629cf8",
|
|
51
52
|
"accent2": "#196df5",
|
|
52
53
|
"onAccent": "#ffffff",
|
|
53
54
|
"ring": "#196df5",
|
|
55
|
+
"brandGradientFrom": "#0e1525",
|
|
56
|
+
"brandGradientVia": "#0e0f16",
|
|
57
|
+
"brandGradientTo": "#0c0c0e",
|
|
54
58
|
"success": "#10b77f",
|
|
55
59
|
"warning": "#f59f0a",
|
|
56
60
|
"danger": "#ef4343",
|
|
@@ -74,9 +78,13 @@ var themes = Object.freeze({ dark: Object.freeze({
|
|
|
74
78
|
"accent": "#0a64f5",
|
|
75
79
|
"accentHover": "#0d55c9",
|
|
76
80
|
"accentSoft": "rgba(10,100,245,0.08)",
|
|
81
|
+
"accentText": "#0954ce",
|
|
77
82
|
"accent2": "#0a64f5",
|
|
78
83
|
"onAccent": "#ffffff",
|
|
79
84
|
"ring": "#0a64f5",
|
|
85
|
+
"brandGradientFrom": "#dcebfe",
|
|
86
|
+
"brandGradientVia": "#f3f6fc",
|
|
87
|
+
"brandGradientTo": "#fafafa",
|
|
80
88
|
"success": "#10b77f",
|
|
81
89
|
"warning": "#f59f0a",
|
|
82
90
|
"danger": "#ef4343",
|
|
@@ -98,6 +106,92 @@ var typography = Object.freeze({
|
|
|
98
106
|
"mono": "JetBrains Mono"
|
|
99
107
|
});
|
|
100
108
|
var motion = Object.freeze({ ease: Object.freeze([0.16, 1, 0.3, 1]) });
|
|
109
|
+
var brands = Object.freeze({
|
|
110
|
+
"krizaka": {
|
|
111
|
+
"dark": {
|
|
112
|
+
"accent": "#196df5",
|
|
113
|
+
"accentHover": "#0e5bd8",
|
|
114
|
+
"accentSoft": "rgba(25,109,245,0.1)",
|
|
115
|
+
"accentText": "#629cf8",
|
|
116
|
+
"accent2": "#196df5",
|
|
117
|
+
"onAccent": "#ffffff",
|
|
118
|
+
"ring": "#196df5",
|
|
119
|
+
"info": "#196df5",
|
|
120
|
+
"brandGradientFrom": "#0e1525",
|
|
121
|
+
"brandGradientVia": "#0e0f16",
|
|
122
|
+
"brandGradientTo": "#0c0c0e"
|
|
123
|
+
},
|
|
124
|
+
"light": {
|
|
125
|
+
"accent": "#0a64f5",
|
|
126
|
+
"accentHover": "#0d55c9",
|
|
127
|
+
"accentSoft": "rgba(10,100,245,0.08)",
|
|
128
|
+
"accentText": "#0954ce",
|
|
129
|
+
"accent2": "#0a64f5",
|
|
130
|
+
"onAccent": "#ffffff",
|
|
131
|
+
"ring": "#0a64f5",
|
|
132
|
+
"info": "#0a64f5",
|
|
133
|
+
"brandGradientFrom": "#dcebfe",
|
|
134
|
+
"brandGradientVia": "#f3f6fc",
|
|
135
|
+
"brandGradientTo": "#fafafa"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"orazaka": {
|
|
139
|
+
"dark": {
|
|
140
|
+
"accent": "#f67e23",
|
|
141
|
+
"accentHover": "#f79245",
|
|
142
|
+
"accentSoft": "rgba(246,126,35,0.12)",
|
|
143
|
+
"accentText": "#f78c3b",
|
|
144
|
+
"accent2": "#f59e0b",
|
|
145
|
+
"onAccent": "#0c0c0e",
|
|
146
|
+
"ring": "#f67e23",
|
|
147
|
+
"info": "#3b83f7",
|
|
148
|
+
"brandGradientFrom": "#28170b",
|
|
149
|
+
"brandGradientVia": "#17130c",
|
|
150
|
+
"brandGradientTo": "#0c0c0e"
|
|
151
|
+
},
|
|
152
|
+
"light": {
|
|
153
|
+
"accent": "#b45309",
|
|
154
|
+
"accentHover": "#964608",
|
|
155
|
+
"accentSoft": "rgba(180,83,9,0.08)",
|
|
156
|
+
"accentText": "#9b4808",
|
|
157
|
+
"accent2": "#a45904",
|
|
158
|
+
"onAccent": "#ffffff",
|
|
159
|
+
"ring": "#b45309",
|
|
160
|
+
"info": "#0a64f5",
|
|
161
|
+
"brandGradientFrom": "#ffebd6",
|
|
162
|
+
"brandGradientVia": "#fdf7ed",
|
|
163
|
+
"brandGradientTo": "#fafafa"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"orochia": {
|
|
167
|
+
"dark": {
|
|
168
|
+
"accent": "#7c3aed",
|
|
169
|
+
"accentHover": "#6d28d9",
|
|
170
|
+
"accentSoft": "rgba(139,92,246,0.12)",
|
|
171
|
+
"accentText": "#a78bfa",
|
|
172
|
+
"accent2": "#db2777",
|
|
173
|
+
"onAccent": "#ffffff",
|
|
174
|
+
"ring": "#a78bfa",
|
|
175
|
+
"info": "#7c3aed",
|
|
176
|
+
"brandGradientFrom": "#1a0e2a",
|
|
177
|
+
"brandGradientVia": "#1c0d17",
|
|
178
|
+
"brandGradientTo": "#0c0c0e"
|
|
179
|
+
},
|
|
180
|
+
"light": {
|
|
181
|
+
"accent": "#7c3aed",
|
|
182
|
+
"accentHover": "#6d28d9",
|
|
183
|
+
"accentSoft": "rgba(124,58,237,0.08)",
|
|
184
|
+
"accentText": "#6d28d9",
|
|
185
|
+
"accent2": "#db2777",
|
|
186
|
+
"onAccent": "#ffffff",
|
|
187
|
+
"ring": "#7c3aed",
|
|
188
|
+
"info": "#7c3aed",
|
|
189
|
+
"brandGradientFrom": "#efe7fe",
|
|
190
|
+
"brandGradientVia": "#fdedf5",
|
|
191
|
+
"brandGradientTo": "#fafafa"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
101
195
|
|
|
102
196
|
// src/native/theme.tsx
|
|
103
197
|
import * as React from "react";
|
|
@@ -272,7 +366,7 @@ var TONE = {
|
|
|
272
366
|
text: "textPrimary",
|
|
273
367
|
secondary: "textSecondary",
|
|
274
368
|
muted: "textMuted",
|
|
275
|
-
accent: "
|
|
369
|
+
accent: "accentText",
|
|
276
370
|
success: "success",
|
|
277
371
|
warning: "warning",
|
|
278
372
|
danger: "danger",
|
|
@@ -608,10 +702,170 @@ var styles8 = StyleSheet8.create({
|
|
|
608
702
|
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", justifyContent: "center", gap: 8 }
|
|
609
703
|
});
|
|
610
704
|
|
|
611
|
-
// src/native/
|
|
705
|
+
// src/native/KrizakaMark.tsx
|
|
706
|
+
import { View as View6 } from "react-native";
|
|
707
|
+
import Svg, { Circle, Defs, G as Group, LinearGradient, Path, RadialGradient, Stop } from "react-native-svg";
|
|
708
|
+
|
|
709
|
+
// src/marks/krizaka-geometry.ts
|
|
710
|
+
var KRIZAKA = {
|
|
711
|
+
viewBox: "0 0 400 400",
|
|
712
|
+
croppedViewBox: "86 82 228 228",
|
|
713
|
+
offset: 20,
|
|
714
|
+
/** The shield: a pointy-top hexagon (r 92 around 180,180), open at its upper-right edge. */
|
|
715
|
+
shield: "M259.7,134 L259.7,226 L180,272 L100.3,226 L100.3,134 L180,88 L212,106.5",
|
|
716
|
+
stroke: 22,
|
|
717
|
+
ink: { x1: 70, y1: 290, x2: 290, y2: 70 },
|
|
718
|
+
blue: { x1: 180, y1: 180, x2: 300, y2: 60, stops: [["0%", "#196df5"], ["100%", "#629cf8"]] },
|
|
719
|
+
/** The vertex where the shield opens: a node (the serpent's head in Orochia's grammar). */
|
|
720
|
+
node: { cx: 259.7, cy: 134, r: 19, inner: 6 },
|
|
721
|
+
core: { cx: 180, cy: 180, r: 24, inner: 8 },
|
|
722
|
+
highlight: "#dbeafe",
|
|
723
|
+
glow: { color: "#196df5", opacity: 0.16 },
|
|
724
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
725
|
+
ring: { r: 134, width: 1 }
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
// src/native/mark-motion.ts
|
|
612
729
|
import { useEffect as useEffect4, useState as useState6 } from "react";
|
|
613
|
-
import { AccessibilityInfo as AccessibilityInfo2, Animated as Animated3, Easing
|
|
614
|
-
|
|
730
|
+
import { AccessibilityInfo as AccessibilityInfo2, Animated as Animated3, Easing } from "react-native";
|
|
731
|
+
var markA11y = (title) => title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
732
|
+
function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
733
|
+
const [spin] = useState6(() => new Animated3.Value(0));
|
|
734
|
+
const [pulse] = useState6(() => new Animated3.Value(0));
|
|
735
|
+
useEffect4(() => {
|
|
736
|
+
if (!animated) return;
|
|
737
|
+
let loops = [];
|
|
738
|
+
let cancelled = false;
|
|
739
|
+
void AccessibilityInfo2.isReduceMotionEnabled().then((reduce) => {
|
|
740
|
+
if (reduce || cancelled) return;
|
|
741
|
+
loops = [
|
|
742
|
+
Animated3.loop(Animated3.timing(spin, { toValue: 1, duration: spinMs, easing: Easing.linear, useNativeDriver: true })),
|
|
743
|
+
Animated3.loop(
|
|
744
|
+
Animated3.sequence([
|
|
745
|
+
Animated3.timing(pulse, { toValue: 1, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true }),
|
|
746
|
+
Animated3.timing(pulse, { toValue: 0, duration: 1600, easing: Easing.inOut(Easing.ease), useNativeDriver: true })
|
|
747
|
+
])
|
|
748
|
+
)
|
|
749
|
+
];
|
|
750
|
+
loops.forEach((l) => l.start());
|
|
751
|
+
});
|
|
752
|
+
return () => {
|
|
753
|
+
cancelled = true;
|
|
754
|
+
loops.forEach((l) => l.stop());
|
|
755
|
+
};
|
|
756
|
+
}, [animated, spin, pulse, spinMs]);
|
|
757
|
+
return {
|
|
758
|
+
Animated: Animated3,
|
|
759
|
+
layer: { position: "absolute", width: size, height: size },
|
|
760
|
+
spinStyle: { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] },
|
|
761
|
+
pulseStyle: { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// src/native/KrizakaMark.tsx
|
|
766
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
767
|
+
function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
768
|
+
const { theme } = useTheme();
|
|
769
|
+
const { Animated: Animated8, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
770
|
+
const id = useSvgId("kzm");
|
|
771
|
+
const viewBox = size < 48 ? KRIZAKA.croppedViewBox : KRIZAKA.viewBox;
|
|
772
|
+
const stroke = neutral ?? theme.textMuted;
|
|
773
|
+
const blue = /* @__PURE__ */ jsx10(LinearGradient, { 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__ */ jsx10(Stop, { offset, stopColor: color }, offset)) });
|
|
774
|
+
const dot = (c) => /* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
775
|
+
/* @__PURE__ */ jsx10(Circle, { cx: c.cx, cy: c.cy, r: c.r, fill: `url(#${id}b)` }),
|
|
776
|
+
/* @__PURE__ */ jsx10(Circle, { cx: c.cx, cy: c.cy, r: c.inner, fill: KRIZAKA.highlight })
|
|
777
|
+
] });
|
|
778
|
+
return /* @__PURE__ */ jsxs7(View6, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
779
|
+
/* @__PURE__ */ jsxs7(Svg, { viewBox, style: layer, children: [
|
|
780
|
+
/* @__PURE__ */ jsxs7(Defs, { children: [
|
|
781
|
+
/* @__PURE__ */ jsxs7(RadialGradient, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
782
|
+
/* @__PURE__ */ jsx10(Stop, { offset: "0%", stopColor: KRIZAKA.glow.color, stopOpacity: KRIZAKA.glow.opacity }),
|
|
783
|
+
/* @__PURE__ */ jsx10(Stop, { offset: "100%", stopColor: KRIZAKA.glow.color, stopOpacity: 0 })
|
|
784
|
+
] }),
|
|
785
|
+
/* @__PURE__ */ jsxs7(LinearGradient, { 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: [
|
|
786
|
+
/* @__PURE__ */ jsx10(Stop, { offset: "0%", stopColor: theme.textSecondary }),
|
|
787
|
+
/* @__PURE__ */ jsx10(Stop, { offset: "100%", stopColor: theme.textPrimary })
|
|
788
|
+
] }),
|
|
789
|
+
blue
|
|
790
|
+
] }),
|
|
791
|
+
size >= 48 ? /* @__PURE__ */ jsx10(Circle, { cx: 200, cy: 200, r: 190, fill: `url(#${id}g)` }) : null,
|
|
792
|
+
/* @__PURE__ */ jsx10(Circle, { cx: 200, cy: 200, r: KRIZAKA.ring.r, stroke, strokeWidth: KRIZAKA.ring.width, opacity: 0.35, fill: "none" }),
|
|
793
|
+
/* @__PURE__ */ jsx10(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: /* @__PURE__ */ jsx10(Path, { d: KRIZAKA.shield, stroke: `url(#${id}i)`, strokeWidth: KRIZAKA.stroke, strokeLinecap: "round", strokeLinejoin: "round", fill: "none" }) })
|
|
794
|
+
] }),
|
|
795
|
+
/* @__PURE__ */ jsx10(Animated8.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsx10(Svg, { viewBox, style: layer, children: /* @__PURE__ */ jsx10(Circle, { cx: 200, cy: 200, r: KRIZAKA.orbit.r, stroke, strokeWidth: KRIZAKA.orbit.width, strokeDasharray: KRIZAKA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
796
|
+
/* @__PURE__ */ jsx10(Animated8.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs7(Svg, { viewBox, style: layer, children: [
|
|
797
|
+
/* @__PURE__ */ jsx10(Defs, { children: blue }),
|
|
798
|
+
/* @__PURE__ */ jsxs7(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: [
|
|
799
|
+
dot(KRIZAKA.node),
|
|
800
|
+
dot(KRIZAKA.core)
|
|
801
|
+
] })
|
|
802
|
+
] }) })
|
|
803
|
+
] });
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
// src/native/OrazakaMark.tsx
|
|
807
|
+
import { View as View7 } from "react-native";
|
|
808
|
+
import Svg2, { Circle as Circle2, Defs as Defs2, LinearGradient as LinearGradient2, Path as Path2, RadialGradient as RadialGradient2, Stop as Stop2 } from "react-native-svg";
|
|
809
|
+
|
|
810
|
+
// src/marks/orazaka-geometry.ts
|
|
811
|
+
var ORAZAKA = {
|
|
812
|
+
viewBox: "0 0 400 400",
|
|
813
|
+
croppedViewBox: "76 76 248 248",
|
|
814
|
+
center: 200,
|
|
815
|
+
/**
|
|
816
|
+
* The three shards — a hexagon's cap (from the original 132-unit drawing), scaled ×1.9 around the centre and turned
|
|
817
|
+
* 0°, 120°, 240° — in view-box coordinates, so that one gradient runs across all three.
|
|
818
|
+
*/
|
|
819
|
+
shards: [
|
|
820
|
+
"M154.4,121.2 L200,94.7 L245.6,121.2 L245.6,154.4 L226.6,165.4 L226.6,132.2 L200,116.8 L173.4,132.2 L173.4,165.4 L154.4,154.4 Z",
|
|
821
|
+
"M291.1,199.9 L291.2,252.6 L245.5,278.9 L216.7,262.3 L216.6,240.3 L245.4,257 L272.1,241.6 L272,210.9 L243.2,194.3 L262.3,183.3 Z",
|
|
822
|
+
"M154.5,278.9 L108.8,252.6 L108.9,199.9 L137.7,183.3 L156.8,194.3 L128,210.9 L127.9,241.6 L154.6,257 L183.4,240.3 L183.3,262.3 Z"
|
|
823
|
+
],
|
|
824
|
+
shardStroke: 5.7,
|
|
825
|
+
amber: { x1: 90, y1: 310, x2: 310, y2: 90, stops: [["0%", "#b45309"], ["100%", "#f59e0b"]] },
|
|
826
|
+
core: { r: 21, inner: 7.6 },
|
|
827
|
+
highlight: "#fffbeb",
|
|
828
|
+
glow: { color: "#f59e0b", opacity: 0.16 },
|
|
829
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
830
|
+
ring: { r: 134, width: 1 }
|
|
831
|
+
};
|
|
832
|
+
|
|
833
|
+
// src/native/OrazakaMark.tsx
|
|
834
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
835
|
+
function OrazakaMark({ size = 48, animated = true, title, neutral }) {
|
|
836
|
+
const { theme } = useTheme();
|
|
837
|
+
const { Animated: Animated8, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
838
|
+
const id = useSvgId("ozm");
|
|
839
|
+
const viewBox = size < 48 ? ORAZAKA.croppedViewBox : ORAZAKA.viewBox;
|
|
840
|
+
const stroke = neutral ?? theme.textMuted;
|
|
841
|
+
const amber = /* @__PURE__ */ jsx11(LinearGradient2, { id: `${id}a`, gradientUnits: "userSpaceOnUse", x1: ORAZAKA.amber.x1, y1: ORAZAKA.amber.y1, x2: ORAZAKA.amber.x2, y2: ORAZAKA.amber.y2, children: ORAZAKA.amber.stops.map(([offset, color]) => /* @__PURE__ */ jsx11(Stop2, { offset, stopColor: color }, offset)) });
|
|
842
|
+
const fill = `url(#${id}a)`;
|
|
843
|
+
return /* @__PURE__ */ jsxs8(View7, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
844
|
+
/* @__PURE__ */ jsxs8(Svg2, { viewBox, style: layer, children: [
|
|
845
|
+
/* @__PURE__ */ jsx11(Defs2, { children: /* @__PURE__ */ jsxs8(RadialGradient2, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
846
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "0%", stopColor: ORAZAKA.glow.color, stopOpacity: ORAZAKA.glow.opacity }),
|
|
847
|
+
/* @__PURE__ */ jsx11(Stop2, { offset: "100%", stopColor: ORAZAKA.glow.color, stopOpacity: 0 })
|
|
848
|
+
] }) }),
|
|
849
|
+
size >= 48 ? /* @__PURE__ */ jsx11(Circle2, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
850
|
+
/* @__PURE__ */ jsx11(Circle2, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.orbit.r, stroke, strokeWidth: ORAZAKA.orbit.width, strokeDasharray: ORAZAKA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
851
|
+
/* @__PURE__ */ jsx11(Circle2, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.ring.r, stroke, strokeWidth: ORAZAKA.ring.width, opacity: 0.35, fill: "none" })
|
|
852
|
+
] }),
|
|
853
|
+
/* @__PURE__ */ jsx11(Animated8.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs8(Svg2, { viewBox, style: layer, children: [
|
|
854
|
+
/* @__PURE__ */ jsx11(Defs2, { children: amber }),
|
|
855
|
+
ORAZAKA.shards.map((d) => /* @__PURE__ */ jsx11(Path2, { d, fill, stroke: fill, strokeWidth: ORAZAKA.shardStroke, strokeLinejoin: "round" }, d))
|
|
856
|
+
] }) }),
|
|
857
|
+
/* @__PURE__ */ jsx11(Animated8.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs8(Svg2, { viewBox, style: layer, children: [
|
|
858
|
+
/* @__PURE__ */ jsx11(Defs2, { children: amber }),
|
|
859
|
+
/* @__PURE__ */ jsx11(Circle2, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.r, fill }),
|
|
860
|
+
/* @__PURE__ */ jsx11(Circle2, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.inner, fill: ORAZAKA.highlight })
|
|
861
|
+
] }) })
|
|
862
|
+
] });
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
// src/native/OrochiaMark.tsx
|
|
866
|
+
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
867
|
+
import { AccessibilityInfo as AccessibilityInfo3, Animated as Animated4, Easing as Easing2, View as View8 } from "react-native";
|
|
868
|
+
import Svg3, { Circle as Circle3, Defs as Defs3, Ellipse, G as Group2, LinearGradient as LinearGradient3, Path as Path3, RadialGradient as RadialGradient3, Stop as Stop3 } from "react-native-svg";
|
|
615
869
|
|
|
616
870
|
// src/marks/orochia-geometry.ts
|
|
617
871
|
var OROCHIA = {
|
|
@@ -638,23 +892,25 @@ var OROCHIA = {
|
|
|
638
892
|
};
|
|
639
893
|
|
|
640
894
|
// src/native/OrochiaMark.tsx
|
|
641
|
-
import { jsx as
|
|
895
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
642
896
|
var CENTER = OROCHIA.offset + 180;
|
|
643
|
-
function OrochiaMark({ size = 48, animated = true, title, neutral
|
|
644
|
-
const
|
|
645
|
-
const
|
|
646
|
-
|
|
897
|
+
function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }) {
|
|
898
|
+
const { theme } = useTheme();
|
|
899
|
+
const neutral = neutralProp ?? theme.textMuted;
|
|
900
|
+
const [spin] = useState7(() => new Animated4.Value(0));
|
|
901
|
+
const [pulse] = useState7(() => new Animated4.Value(0));
|
|
902
|
+
useEffect5(() => {
|
|
647
903
|
if (!animated) return;
|
|
648
904
|
let loops = [];
|
|
649
905
|
let cancelled = false;
|
|
650
|
-
void
|
|
906
|
+
void AccessibilityInfo3.isReduceMotionEnabled().then((reduce) => {
|
|
651
907
|
if (reduce || cancelled) return;
|
|
652
908
|
loops = [
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
909
|
+
Animated4.loop(Animated4.timing(spin, { toValue: 1, duration: 3e4, easing: Easing2.linear, useNativeDriver: true })),
|
|
910
|
+
Animated4.loop(
|
|
911
|
+
Animated4.sequence([
|
|
912
|
+
Animated4.timing(pulse, { toValue: 1, duration: 1600, easing: Easing2.inOut(Easing2.ease), useNativeDriver: true }),
|
|
913
|
+
Animated4.timing(pulse, { toValue: 0, duration: 1600, easing: Easing2.inOut(Easing2.ease), useNativeDriver: true })
|
|
658
914
|
])
|
|
659
915
|
)
|
|
660
916
|
];
|
|
@@ -668,44 +924,52 @@ function OrochiaMark({ size = 48, animated = true, title, neutral = "rgba(255,25
|
|
|
668
924
|
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
669
925
|
const layer = { position: "absolute", width: size, height: size };
|
|
670
926
|
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
671
|
-
const bodyGradient = /* @__PURE__ */
|
|
672
|
-
return /* @__PURE__ */
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
/* @__PURE__ */
|
|
675
|
-
/* @__PURE__ */
|
|
676
|
-
/* @__PURE__ */
|
|
927
|
+
const bodyGradient = /* @__PURE__ */ jsx12(LinearGradient3, { 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__ */ jsx12(Stop3, { offset, stopColor: color }, offset)) });
|
|
928
|
+
return /* @__PURE__ */ jsxs9(View8, { style: { width: size, height: size }, ...a11y, children: [
|
|
929
|
+
/* @__PURE__ */ jsxs9(Svg3, { viewBox, style: layer, children: [
|
|
930
|
+
/* @__PURE__ */ jsx12(Defs3, { children: /* @__PURE__ */ jsxs9(RadialGradient3, { id: "glow", cx: "50%", cy: "50%", r: "50%", children: [
|
|
931
|
+
/* @__PURE__ */ jsx12(Stop3, { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
932
|
+
/* @__PURE__ */ jsx12(Stop3, { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: 0 })
|
|
677
933
|
] }) }),
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */
|
|
934
|
+
/* @__PURE__ */ jsx12(Circle3, { cx: CENTER, cy: CENTER, r: 170, fill: "url(#glow)" }),
|
|
935
|
+
/* @__PURE__ */ jsx12(Circle3, { cx: CENTER, cy: CENTER, r: OROCHIA.ring.r, stroke: neutral, strokeWidth: OROCHIA.ring.width, opacity: 0.35, fill: "none" })
|
|
680
936
|
] }),
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
684
|
-
/* @__PURE__ */
|
|
685
|
-
/* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */
|
|
688
|
-
/* @__PURE__ */
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx12(Animated4.View, { style: [layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] }], children: /* @__PURE__ */ jsx12(Svg3, { viewBox, style: layer, children: /* @__PURE__ */ jsx12(Circle3, { cx: CENTER, cy: CENTER, r: OROCHIA.orbit.r, stroke: neutral, strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
938
|
+
/* @__PURE__ */ jsxs9(Svg3, { viewBox, style: layer, children: [
|
|
939
|
+
/* @__PURE__ */ jsx12(Defs3, { children: bodyGradient }),
|
|
940
|
+
/* @__PURE__ */ jsxs9(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
941
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.arc, stroke: "url(#body)", strokeWidth: 22, strokeLinecap: "round", fill: "none" }),
|
|
942
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash, fill: "none" }),
|
|
943
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.neck, stroke: "url(#body)", strokeWidth: 14, strokeLinecap: "round", fill: "none" }),
|
|
944
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.tail, stroke: "url(#body)", strokeWidth: 6, strokeLinecap: "round", fill: "none" }),
|
|
945
|
+
/* @__PURE__ */ jsx12(Ellipse, { 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)" }),
|
|
946
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: 3, strokeLinecap: "round", fill: "none" })
|
|
691
947
|
] })
|
|
692
948
|
] }),
|
|
693
|
-
/* @__PURE__ */
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
949
|
+
/* @__PURE__ */ jsx12(Animated4.View, { style: [layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }], children: /* @__PURE__ */ jsxs9(Svg3, { viewBox, style: layer, children: [
|
|
950
|
+
/* @__PURE__ */ jsx12(Defs3, { children: /* @__PURE__ */ jsx12(LinearGradient3, { id: "flame", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx12(Stop3, { offset, stopColor: color }, offset)) }) }),
|
|
951
|
+
/* @__PURE__ */ jsxs9(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
952
|
+
/* @__PURE__ */ jsx12(Circle3, { cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
953
|
+
/* @__PURE__ */ jsx12(Path3, { d: OROCHIA.flame.d, transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, fill: "url(#flame)" })
|
|
698
954
|
] })
|
|
699
955
|
] }) })
|
|
700
956
|
] });
|
|
701
957
|
}
|
|
702
958
|
|
|
959
|
+
// src/native/ProductMark.tsx
|
|
960
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
961
|
+
function ProductMark({ id, ...props }) {
|
|
962
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx13(KrizakaMark, { ...props });
|
|
963
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx13(OrazakaMark, { ...props });
|
|
964
|
+
return /* @__PURE__ */ jsx13(OrochiaMark, { ...props });
|
|
965
|
+
}
|
|
966
|
+
|
|
703
967
|
// src/native/progress.tsx
|
|
704
968
|
import * as React7 from "react";
|
|
705
|
-
import { Animated as
|
|
706
|
-
import
|
|
707
|
-
import { jsx as
|
|
708
|
-
var AnimatedCircle =
|
|
969
|
+
import { Animated as Animated5, Easing as Easing3, StyleSheet as StyleSheet9, View as View9 } from "react-native";
|
|
970
|
+
import Svg4, { Circle as Circle4, Defs as Defs4, LinearGradient as LinearGradient4, Rect, Stop as Stop4 } from "react-native-svg";
|
|
971
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
972
|
+
var AnimatedCircle = Animated5.createAnimatedComponent(Circle4);
|
|
709
973
|
var BAR = { sm: 4, md: 8, lg: 12 };
|
|
710
974
|
var RING = { sm: 40, md: 80, lg: 144 };
|
|
711
975
|
var STROKE = { sm: 12, md: 9, lg: 7 };
|
|
@@ -716,21 +980,21 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
716
980
|
const known = typeof value === "number" && Number.isFinite(value);
|
|
717
981
|
const ratio = known ? Math.min(1, Math.max(0, value / (max || 1))) : 0;
|
|
718
982
|
const percent = Math.round(ratio * 100);
|
|
719
|
-
const [progress] = React7.useState(() => new
|
|
720
|
-
const [spin] = React7.useState(() => new
|
|
983
|
+
const [progress] = React7.useState(() => new Animated5.Value(ratio));
|
|
984
|
+
const [spin] = React7.useState(() => new Animated5.Value(0));
|
|
721
985
|
const [track, setTrack] = React7.useState(0);
|
|
722
986
|
React7.useEffect(() => {
|
|
723
987
|
if (reduce) {
|
|
724
988
|
progress.setValue(ratio);
|
|
725
989
|
return;
|
|
726
990
|
}
|
|
727
|
-
const animation =
|
|
991
|
+
const animation = Animated5.timing(progress, { toValue: ratio, duration: 700, easing: Easing3.out(Easing3.cubic), useNativeDriver: false });
|
|
728
992
|
animation.start();
|
|
729
993
|
return () => animation.stop();
|
|
730
994
|
}, [ratio, reduce, progress]);
|
|
731
995
|
React7.useEffect(() => {
|
|
732
996
|
if (known || reduce) return;
|
|
733
|
-
const loop =
|
|
997
|
+
const loop = Animated5.loop(Animated5.timing(spin, { toValue: 1, duration: 1200, easing: Easing3.linear, useNativeDriver: true }));
|
|
734
998
|
loop.start();
|
|
735
999
|
return () => {
|
|
736
1000
|
loop.stop();
|
|
@@ -746,9 +1010,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
746
1010
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
747
1011
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
748
1012
|
};
|
|
749
|
-
const gradient = /* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
1013
|
+
const gradient = /* @__PURE__ */ jsx14(Defs4, { children: /* @__PURE__ */ jsxs10(LinearGradient4, { id, x1: "0", y1: "0", x2: "1", y2: variant === "ring" ? "1" : "0", children: [
|
|
1014
|
+
/* @__PURE__ */ jsx14(Stop4, { offset: "0", stopColor: theme.accent }),
|
|
1015
|
+
/* @__PURE__ */ jsx14(Stop4, { offset: "1", stopColor: theme.accent2 })
|
|
752
1016
|
] }) });
|
|
753
1017
|
if (variant === "ring") {
|
|
754
1018
|
const side = RING[size];
|
|
@@ -757,11 +1021,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
757
1021
|
const circumference = 2 * Math.PI * r;
|
|
758
1022
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
759
1023
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
760
|
-
return /* @__PURE__ */
|
|
761
|
-
/* @__PURE__ */
|
|
1024
|
+
return /* @__PURE__ */ jsxs10(View9, { ...a11y, style: [styles9.ring, { width: side, height: side }, style], children: [
|
|
1025
|
+
/* @__PURE__ */ jsx14(Animated5.View, { style: [StyleSheet9.absoluteFill, { transform: [{ rotate: known ? "-90deg" : rotate }] }], children: /* @__PURE__ */ jsxs10(Svg4, { width: side, height: side, viewBox: "0 0 100 100", children: [
|
|
762
1026
|
gradient,
|
|
763
|
-
/* @__PURE__ */
|
|
764
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ jsx14(Circle4, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
1028
|
+
/* @__PURE__ */ jsx14(
|
|
765
1029
|
AnimatedCircle,
|
|
766
1030
|
{
|
|
767
1031
|
cx: 50,
|
|
@@ -781,15 +1045,15 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
781
1045
|
}
|
|
782
1046
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
783
1047
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
784
|
-
return /* @__PURE__ */
|
|
785
|
-
|
|
1048
|
+
return /* @__PURE__ */ jsx14(
|
|
1049
|
+
View9,
|
|
786
1050
|
{
|
|
787
1051
|
...a11y,
|
|
788
1052
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
789
1053
|
style: [styles9.bar, { height: BAR[size], backgroundColor: theme.surface3 }, style],
|
|
790
|
-
children: /* @__PURE__ */
|
|
1054
|
+
children: /* @__PURE__ */ jsx14(Animated5.View, { style: [styles9.fill, { width }, known || reduce ? null : { transform: [{ translateX: translate }] }], children: /* @__PURE__ */ jsxs10(Svg4, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
791
1055
|
gradient,
|
|
792
|
-
/* @__PURE__ */
|
|
1056
|
+
/* @__PURE__ */ jsx14(Rect, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
793
1057
|
] }) })
|
|
794
1058
|
}
|
|
795
1059
|
);
|
|
@@ -801,19 +1065,19 @@ var styles9 = StyleSheet9.create({
|
|
|
801
1065
|
});
|
|
802
1066
|
|
|
803
1067
|
// src/native/segmented.tsx
|
|
804
|
-
import { Pressable as Pressable4, StyleSheet as StyleSheet10, Text as Text6, View as
|
|
805
|
-
import { jsx as
|
|
1068
|
+
import { Pressable as Pressable4, StyleSheet as StyleSheet10, Text as Text6, View as View10 } from "react-native";
|
|
1069
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
806
1070
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
807
1071
|
const { theme, radius: radius3 } = useTheme();
|
|
808
|
-
return /* @__PURE__ */
|
|
809
|
-
|
|
1072
|
+
return /* @__PURE__ */ jsx15(
|
|
1073
|
+
View10,
|
|
810
1074
|
{
|
|
811
1075
|
role: "tablist",
|
|
812
1076
|
"aria-label": label,
|
|
813
1077
|
style: [styles10.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
814
1078
|
children: options.map((option) => {
|
|
815
1079
|
const selected = option.value === value;
|
|
816
|
-
return /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ jsx15(
|
|
817
1081
|
Pressable4,
|
|
818
1082
|
{
|
|
819
1083
|
role: "tab",
|
|
@@ -829,7 +1093,7 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
829
1093
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
830
1094
|
option.disabled ? styles10.disabled : null
|
|
831
1095
|
],
|
|
832
|
-
children: /* @__PURE__ */
|
|
1096
|
+
children: /* @__PURE__ */ jsx15(Text6, { numberOfLines: 1, style: [styles10.label, { color: selected ? theme.textPrimary : theme.textSecondary, fontSize: size === "sm" ? 12 : 13 }], children: option.label })
|
|
833
1097
|
},
|
|
834
1098
|
option.value
|
|
835
1099
|
);
|
|
@@ -846,8 +1110,8 @@ var styles10 = StyleSheet10.create({
|
|
|
846
1110
|
|
|
847
1111
|
// src/native/skeleton.tsx
|
|
848
1112
|
import * as React8 from "react";
|
|
849
|
-
import { Animated as
|
|
850
|
-
import { jsx as
|
|
1113
|
+
import { Animated as Animated6 } from "react-native";
|
|
1114
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
851
1115
|
var SHAPE = {
|
|
852
1116
|
text: { width: "100%", height: 12, radius: 4 },
|
|
853
1117
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -856,13 +1120,13 @@ var SHAPE = {
|
|
|
856
1120
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
857
1121
|
const { theme } = useTheme();
|
|
858
1122
|
const reduce = useReducedMotion();
|
|
859
|
-
const [opacity] = React8.useState(() => new
|
|
1123
|
+
const [opacity] = React8.useState(() => new Animated6.Value(1));
|
|
860
1124
|
React8.useEffect(() => {
|
|
861
1125
|
if (reduce) return;
|
|
862
|
-
const loop =
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
1126
|
+
const loop = Animated6.loop(
|
|
1127
|
+
Animated6.sequence([
|
|
1128
|
+
Animated6.timing(opacity, { toValue: 0.5, duration: 900, useNativeDriver: true }),
|
|
1129
|
+
Animated6.timing(opacity, { toValue: 1, duration: 900, useNativeDriver: true })
|
|
866
1130
|
])
|
|
867
1131
|
);
|
|
868
1132
|
loop.start();
|
|
@@ -873,8 +1137,8 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
873
1137
|
}, [reduce, opacity]);
|
|
874
1138
|
const s = SHAPE[shape];
|
|
875
1139
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
876
|
-
return /* @__PURE__ */
|
|
877
|
-
|
|
1140
|
+
return /* @__PURE__ */ jsx16(
|
|
1141
|
+
Animated6.View,
|
|
878
1142
|
{
|
|
879
1143
|
testID,
|
|
880
1144
|
"aria-hidden": true,
|
|
@@ -888,10 +1152,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
888
1152
|
|
|
889
1153
|
// src/native/spinner.tsx
|
|
890
1154
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
891
|
-
import { jsx as
|
|
1155
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
892
1156
|
function Spinner({ label, size = "md", ...props }) {
|
|
893
1157
|
const { theme } = useTheme();
|
|
894
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx17(
|
|
895
1159
|
ActivityIndicator2,
|
|
896
1160
|
{
|
|
897
1161
|
accessible: true,
|
|
@@ -907,8 +1171,8 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
907
1171
|
|
|
908
1172
|
// src/native/toast.tsx
|
|
909
1173
|
import * as React9 from "react";
|
|
910
|
-
import { AccessibilityInfo as
|
|
911
|
-
import { Fragment as
|
|
1174
|
+
import { AccessibilityInfo as AccessibilityInfo4, Animated as Animated7, Pressable as Pressable5, StyleSheet as StyleSheet11, Text as Text7, View as View11 } from "react-native";
|
|
1175
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
912
1176
|
var items = [];
|
|
913
1177
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
914
1178
|
var counter = 0;
|
|
@@ -943,13 +1207,13 @@ var toast = Object.assign(show, {
|
|
|
943
1207
|
function ToastView({ item, closeLabel, duration }) {
|
|
944
1208
|
const { theme, radius: radius3 } = useTheme();
|
|
945
1209
|
const reduce = useReducedMotion();
|
|
946
|
-
const [enter] = React9.useState(() => new
|
|
1210
|
+
const [enter] = React9.useState(() => new Animated7.Value(reduce ? 1 : 0));
|
|
947
1211
|
React9.useEffect(() => {
|
|
948
1212
|
if (reduce) enter.setValue(1);
|
|
949
|
-
else
|
|
1213
|
+
else Animated7.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
950
1214
|
}, [enter, reduce]);
|
|
951
1215
|
React9.useEffect(() => {
|
|
952
|
-
|
|
1216
|
+
AccessibilityInfo4.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
953
1217
|
}, [item.title, item.description]);
|
|
954
1218
|
const ms = item.duration ?? duration;
|
|
955
1219
|
React9.useEffect(() => {
|
|
@@ -958,15 +1222,15 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
958
1222
|
return () => clearTimeout(timer2);
|
|
959
1223
|
}, [item.id, ms]);
|
|
960
1224
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
961
|
-
const text = /* @__PURE__ */
|
|
962
|
-
item.icon ? /* @__PURE__ */
|
|
963
|
-
/* @__PURE__ */
|
|
964
|
-
/* @__PURE__ */
|
|
965
|
-
item.description ? /* @__PURE__ */
|
|
1225
|
+
const text = /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1226
|
+
item.icon ? /* @__PURE__ */ jsx18(View11, { "aria-hidden": true, children: item.icon }) : null,
|
|
1227
|
+
/* @__PURE__ */ jsxs11(View11, { style: styles11.content, children: [
|
|
1228
|
+
/* @__PURE__ */ jsx18(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
1229
|
+
item.description ? /* @__PURE__ */ jsx18(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
966
1230
|
] })
|
|
967
1231
|
] });
|
|
968
|
-
const body = /* @__PURE__ */
|
|
969
|
-
item.onPress ? /* @__PURE__ */
|
|
1232
|
+
const body = /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1233
|
+
item.onPress ? /* @__PURE__ */ jsx18(
|
|
970
1234
|
Pressable5,
|
|
971
1235
|
{
|
|
972
1236
|
role: "button",
|
|
@@ -977,8 +1241,8 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
977
1241
|
style: ({ pressed }) => [styles11.main, { opacity: pressed ? 0.8 : 1 }],
|
|
978
1242
|
children: text
|
|
979
1243
|
}
|
|
980
|
-
) : /* @__PURE__ */
|
|
981
|
-
item.action ? /* @__PURE__ */
|
|
1244
|
+
) : /* @__PURE__ */ jsx18(View11, { style: styles11.main, children: text }),
|
|
1245
|
+
item.action ? /* @__PURE__ */ jsx18(
|
|
982
1246
|
Pressable5,
|
|
983
1247
|
{
|
|
984
1248
|
role: "button",
|
|
@@ -987,23 +1251,23 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
987
1251
|
dismiss(item.id);
|
|
988
1252
|
},
|
|
989
1253
|
style: [styles11.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
990
|
-
children: /* @__PURE__ */
|
|
1254
|
+
children: /* @__PURE__ */ jsx18(Text7, { style: [styles11.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
991
1255
|
}
|
|
992
1256
|
) : null,
|
|
993
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ jsx18(Pressable5, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles11.close, children: /* @__PURE__ */ jsx18(Text7, { style: [styles11.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
994
1258
|
] });
|
|
995
1259
|
const frame = [
|
|
996
1260
|
styles11.toast,
|
|
997
1261
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
998
1262
|
];
|
|
999
1263
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }] };
|
|
1000
|
-
return /* @__PURE__ */
|
|
1264
|
+
return /* @__PURE__ */ jsx18(Animated7.View, { "aria-live": "polite", style: motion3, children: /* @__PURE__ */ jsx18(View11, { style: frame, children: body }) });
|
|
1001
1265
|
}
|
|
1002
1266
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
1003
1267
|
const all = React9.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
1004
1268
|
const shown = all.slice(-max);
|
|
1005
1269
|
if (shown.length === 0) return null;
|
|
1006
|
-
return /* @__PURE__ */
|
|
1270
|
+
return /* @__PURE__ */ jsx18(View11, { pointerEvents: "box-none", style: [styles11.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx18(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
1007
1271
|
}
|
|
1008
1272
|
var styles11 = StyleSheet11.create({
|
|
1009
1273
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
@@ -1045,7 +1309,10 @@ export {
|
|
|
1045
1309
|
Countdown,
|
|
1046
1310
|
EmptyState,
|
|
1047
1311
|
IconButton,
|
|
1312
|
+
KrizakaMark,
|
|
1313
|
+
OrazakaMark,
|
|
1048
1314
|
OrochiaMark,
|
|
1315
|
+
ProductMark,
|
|
1049
1316
|
Progress,
|
|
1050
1317
|
Segmented,
|
|
1051
1318
|
Skeleton,
|