@krizaka/ui 2.5.0 → 2.8.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 +49 -5
- package/dist/action-bar.d.ts +38 -0
- package/dist/action-bar.js +52 -0
- package/dist/action-bar.js.map +1 -0
- package/dist/argument-card.d.ts +67 -0
- package/dist/argument-card.js +69 -0
- package/dist/argument-card.js.map +1 -0
- package/dist/audio-player.js +1 -1
- package/dist/block-link-BAg4eoZk.d.ts +12 -0
- package/dist/blocks.css +529 -0
- package/dist/button.js +5 -94
- package/dist/button.js.map +1 -1
- package/dist/card-grid.d.ts +42 -0
- package/dist/card-grid.js +47 -0
- package/dist/card-grid.js.map +1 -0
- package/dist/chunk-2AGSO3WH.js +20 -0
- package/dist/chunk-2AGSO3WH.js.map +1 -0
- package/dist/chunk-AB5D3KBG.js +37 -0
- package/dist/chunk-AB5D3KBG.js.map +1 -0
- package/dist/{chunk-YX6CNVJA.js → chunk-CPA5CF35.js} +1 -1
- package/dist/chunk-CPA5CF35.js.map +1 -0
- package/dist/chunk-K3SWZXYT.js +92 -0
- package/dist/chunk-K3SWZXYT.js.map +1 -0
- package/dist/chunk-NOVUREEC.js +274 -0
- package/dist/chunk-NOVUREEC.js.map +1 -0
- package/dist/{chunk-XUMJA5ZI.js → chunk-X6TW3X6Y.js} +2 -2
- package/dist/chunk-XCBVFMNV.js +41 -0
- package/dist/{chunk-YX6CNVJA.js.map → chunk-XCBVFMNV.js.map} +1 -1
- package/dist/chunk-XVLWVTQA.js +28 -0
- package/dist/chunk-XVLWVTQA.js.map +1 -0
- package/dist/chunk-Z6FUPB3Q.js +102 -0
- package/dist/chunk-Z6FUPB3Q.js.map +1 -0
- package/dist/code-block.d.ts +42 -0
- package/dist/code-block.js +202 -0
- package/dist/code-block.js.map +1 -0
- package/dist/combobox.js +2 -2
- package/dist/cta-panel.d.ts +23 -0
- package/dist/cta-panel.js +20 -0
- package/dist/cta-panel.js.map +1 -0
- package/dist/data-table.js +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/decision-list.d.ts +34 -0
- package/dist/decision-list.js +67 -0
- package/dist/decision-list.js.map +1 -0
- package/dist/file-upload.js +1 -1
- package/dist/filter-bar.js +1 -1
- package/dist/geometry-CXrAW34x.d.ts +19 -0
- package/dist/index.d.ts +10 -2
- package/dist/index.js +86 -4
- package/dist/index.js.map +1 -1
- package/dist/link-card.d.ts +35 -0
- package/dist/link-card.js +46 -0
- package/dist/link-card.js.map +1 -0
- package/dist/mascot-quote.d.ts +43 -0
- package/dist/mascot-quote.js +287 -0
- package/dist/mascot-quote.js.map +1 -0
- package/dist/mascot-state.d.ts +128 -0
- package/dist/mascot-state.js +95 -0
- package/dist/mascot-state.js.map +1 -0
- package/dist/mascots.d.ts +5 -20
- package/dist/mascots.js +5 -246
- package/dist/mascots.js.map +1 -1
- package/dist/media-capture.js +1 -1
- package/dist/motion.css +25 -1
- package/dist/native.d.ts +54 -7
- package/dist/native.js +334 -166
- package/dist/native.js.map +1 -1
- package/dist/page-hero.d.ts +44 -0
- package/dist/page-hero.js +41 -0
- package/dist/page-hero.js.map +1 -0
- package/dist/page.d.ts +116 -0
- package/dist/page.js +17 -0
- package/dist/page.js.map +1 -0
- package/dist/pagination.js +25 -44
- package/dist/pagination.js.map +1 -1
- package/dist/pointer-light.d.ts +20 -0
- package/dist/pointer-light.js +12 -0
- package/dist/pointer-light.js.map +1 -0
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.js +4 -22
- package/dist/section-backdrop.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/terminal-replay.d.ts +68 -0
- package/dist/terminal-replay.js +231 -0
- package/dist/terminal-replay.js.map +1 -0
- package/dist/toc.d.ts +23 -0
- package/dist/toc.js +39 -0
- package/dist/toc.js.map +1 -0
- package/dist/video-player.js +1 -1
- package/package.json +208 -8
- package/registry/action-bar.json +205 -0
- package/registry/alert.json +1 -1
- package/registry/argument-card.json +327 -0
- package/registry/audio-player.json +2 -2
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +221 -0
- package/registry/card.json +3 -3
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/code-block.json +262 -0
- package/registry/combobox.json +2 -2
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +3 -3
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +154 -0
- package/registry/data-table.json +2 -2
- package/registry/date-picker.json +2 -2
- package/registry/decision-list.json +144 -0
- package/registry/dialog.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/action-bar/buttons.d.ts +4 -0
- package/registry/examples/action-bar/buttons.js +22 -0
- package/registry/examples/action-bar/buttons.tsx +17 -0
- package/registry/examples/action-bar/icons.d.ts +4 -0
- package/registry/examples/action-bar/icons.js +24 -0
- package/registry/examples/action-bar/icons.tsx +23 -0
- package/registry/examples/argument-card/building-block.d.ts +4 -0
- package/registry/examples/argument-card/building-block.js +29 -0
- package/registry/examples/argument-card/building-block.tsx +29 -0
- package/registry/examples/argument-card/grid.d.ts +4 -0
- package/registry/examples/argument-card/grid.js +17 -0
- package/registry/examples/argument-card/grid.tsx +19 -0
- package/registry/examples/argument-card/unfold.d.ts +4 -0
- package/registry/examples/argument-card/unfold.js +26 -0
- package/registry/examples/argument-card/unfold.tsx +21 -0
- package/registry/examples/card-grid/products.d.ts +4 -0
- package/registry/examples/card-grid/products.js +16 -0
- package/registry/examples/card-grid/products.tsx +13 -0
- package/registry/examples/card-grid/reveal.d.ts +4 -0
- package/registry/examples/card-grid/reveal.js +13 -0
- package/registry/examples/card-grid/reveal.tsx +16 -0
- package/registry/examples/code-block/build-tools.d.ts +4 -0
- package/registry/examples/code-block/build-tools.js +30 -0
- package/registry/examples/code-block/build-tools.tsx +25 -0
- package/registry/examples/code-block/file.d.ts +4 -0
- package/registry/examples/code-block/file.js +17 -0
- package/registry/examples/code-block/file.tsx +13 -0
- package/registry/examples/cta-panel/discuss.d.ts +4 -0
- package/registry/examples/cta-panel/discuss.js +31 -0
- package/registry/examples/cta-panel/discuss.tsx +23 -0
- package/registry/examples/decision-list/product.d.ts +4 -0
- package/registry/examples/decision-list/product.js +35 -0
- package/registry/examples/decision-list/product.tsx +30 -0
- package/registry/examples/link-card/docs-hub.d.ts +4 -0
- package/registry/examples/link-card/docs-hub.js +18 -0
- package/registry/examples/link-card/docs-hub.tsx +20 -0
- package/registry/examples/link-card/external.d.ts +4 -0
- package/registry/examples/link-card/external.js +22 -0
- package/registry/examples/link-card/external.tsx +16 -0
- package/registry/examples/link-card/stack.d.ts +4 -0
- package/registry/examples/link-card/stack.js +26 -0
- package/registry/examples/link-card/stack.tsx +21 -0
- package/registry/examples/mascot-quote/callout.d.ts +4 -0
- package/registry/examples/mascot-quote/callout.js +11 -0
- package/registry/examples/mascot-quote/callout.tsx +10 -0
- package/registry/examples/mascot-quote/inline.d.ts +4 -0
- package/registry/examples/mascot-quote/inline.js +11 -0
- package/registry/examples/mascot-quote/inline.tsx +10 -0
- package/registry/examples/mascot-state/empty.d.ts +4 -0
- package/registry/examples/mascot-state/empty.js +22 -0
- package/registry/examples/mascot-state/empty.tsx +20 -0
- package/registry/examples/mascot-state/error.d.ts +4 -0
- package/registry/examples/mascot-state/error.js +23 -0
- package/registry/examples/mascot-state/error.tsx +21 -0
- package/registry/examples/mascot-state/loading.d.ts +4 -0
- package/registry/examples/mascot-state/loading.js +22 -0
- package/registry/examples/mascot-state/loading.tsx +16 -0
- package/registry/examples/mascot-state/native/default.d.ts +4 -0
- package/registry/examples/mascot-state/native/default.dark.png +0 -0
- package/registry/examples/mascot-state/native/default.js +25 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/mascot-state/native/default.tsx +19 -0
- package/registry/examples/mascot-state/success.d.ts +4 -0
- package/registry/examples/mascot-state/success.js +21 -0
- package/registry/examples/mascot-state/success.tsx +19 -0
- package/registry/examples/mascot-state/welcome.d.ts +4 -0
- package/registry/examples/mascot-state/welcome.js +21 -0
- package/registry/examples/mascot-state/welcome.tsx +19 -0
- package/registry/examples/mascots/flock.tsx +1 -1
- package/registry/examples/mascots/lovebird.d.ts +4 -0
- package/registry/examples/mascots/lovebird.js +19 -0
- package/registry/examples/mascots/lovebird.tsx +18 -0
- package/registry/examples/mascots/native/lovebird.d.ts +4 -0
- package/registry/examples/mascots/native/lovebird.dark.png +0 -0
- package/registry/examples/mascots/native/lovebird.js +21 -0
- package/registry/examples/mascots/native/lovebird.light.png +0 -0
- package/registry/examples/mascots/native/lovebird.tsx +18 -0
- package/registry/examples/page/backdrop.d.ts +4 -0
- package/registry/examples/page/backdrop.js +23 -0
- package/registry/examples/page/backdrop.tsx +18 -0
- package/registry/examples/page/facts.d.ts +4 -0
- package/registry/examples/page/facts.js +24 -0
- package/registry/examples/page/facts.tsx +21 -0
- package/registry/examples/page/frame.d.ts +4 -0
- package/registry/examples/page/frame.js +15 -0
- package/registry/examples/page/frame.tsx +17 -0
- package/registry/examples/page/sections.d.ts +4 -0
- package/registry/examples/page/sections.js +14 -0
- package/registry/examples/page/sections.tsx +15 -0
- package/registry/examples/page-hero/building-block.d.ts +4 -0
- package/registry/examples/page-hero/building-block.js +24 -0
- package/registry/examples/page-hero/building-block.tsx +20 -0
- package/registry/examples/page-hero/hub.d.ts +4 -0
- package/registry/examples/page-hero/hub.js +21 -0
- package/registry/examples/page-hero/hub.tsx +15 -0
- package/registry/examples/pointer-light/list.d.ts +4 -0
- package/registry/examples/pointer-light/list.js +16 -0
- package/registry/examples/pointer-light/list.tsx +14 -0
- package/registry/examples/terminal-replay/at-rest.d.ts +4 -0
- package/registry/examples/terminal-replay/at-rest.js +32 -0
- package/registry/examples/terminal-replay/at-rest.tsx +26 -0
- package/registry/examples/terminal-replay/session.d.ts +4 -0
- package/registry/examples/terminal-replay/session.js +34 -0
- package/registry/examples/terminal-replay/session.tsx +28 -0
- package/registry/examples/toc/reading-page.d.ts +4 -0
- package/registry/examples/toc/reading-page.js +21 -0
- package/registry/examples/toc/reading-page.tsx +21 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +2 -2
- package/registry/glow-card.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +265 -5
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/link-card.json +279 -0
- package/registry/loader.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +191 -0
- package/registry/mascot-state.json +1249 -0
- package/registry/mascots.json +41 -21
- package/registry/media-capture.json +4 -4
- 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 +254 -0
- package/registry/page.json +497 -0
- package/registry/pagination.json +2 -2
- package/registry/pointer-light.json +119 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +2 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +3 -3
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/stat.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 +317 -0
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +157 -0
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +4 -4
- package/registry/video-trimmer.json +3 -3
- /package/dist/{chunk-XUMJA5ZI.js.map → chunk-X6TW3X6Y.js.map} +0 -0
package/dist/native.js
CHANGED
|
@@ -166,6 +166,16 @@ var marks = /* @__PURE__ */ Object.freeze({
|
|
|
166
166
|
"100%",
|
|
167
167
|
"#f472b6"
|
|
168
168
|
]
|
|
169
|
+
],
|
|
170
|
+
"yazakia": [
|
|
171
|
+
[
|
|
172
|
+
"0%",
|
|
173
|
+
"#079d61"
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
"100%",
|
|
177
|
+
"#089b96"
|
|
178
|
+
]
|
|
169
179
|
]
|
|
170
180
|
});
|
|
171
181
|
|
|
@@ -773,7 +783,7 @@ function useMarkMotion(size, animated, spinMs = 3e4) {
|
|
|
773
783
|
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
774
784
|
function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
775
785
|
const { theme } = useTheme();
|
|
776
|
-
const { Animated:
|
|
786
|
+
const { Animated: Animated10, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
777
787
|
const id = useSvgId("kzm");
|
|
778
788
|
const viewBox = size < 48 ? KRIZAKA.croppedViewBox : KRIZAKA.viewBox;
|
|
779
789
|
const stroke = neutral ?? theme.textMuted;
|
|
@@ -799,8 +809,8 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
799
809
|
/* @__PURE__ */ jsx10(Circle, { cx: 200, cy: 200, r: KRIZAKA.ring.r, stroke, strokeWidth: KRIZAKA.ring.width, opacity: 0.35, fill: "none" }),
|
|
800
810
|
/* @__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" }) })
|
|
801
811
|
] }),
|
|
802
|
-
/* @__PURE__ */ jsx10(
|
|
803
|
-
/* @__PURE__ */ jsx10(
|
|
812
|
+
/* @__PURE__ */ jsx10(Animated10.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsx10(Svg2, { 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" }) }) }),
|
|
813
|
+
/* @__PURE__ */ jsx10(Animated10.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs7(Svg2, { viewBox, style: layer, children: [
|
|
804
814
|
/* @__PURE__ */ jsx10(Defs2, { children: blue }),
|
|
805
815
|
/* @__PURE__ */ jsxs7(Group, { transform: `translate(${KRIZAKA.offset} ${KRIZAKA.offset})`, children: [
|
|
806
816
|
dot(KRIZAKA.node),
|
|
@@ -810,6 +820,10 @@ function KrizakaMark({ size = 48, animated = true, title, neutral }) {
|
|
|
810
820
|
] });
|
|
811
821
|
}
|
|
812
822
|
|
|
823
|
+
// src/native/mascot-state.tsx
|
|
824
|
+
import * as React8 from "react";
|
|
825
|
+
import { AccessibilityInfo as AccessibilityInfo4, Animated as Animated5, Easing as Easing3, StyleSheet as StyleSheet9, View as View8 } from "react-native";
|
|
826
|
+
|
|
813
827
|
// src/native/mascots.tsx
|
|
814
828
|
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
815
829
|
import { AccessibilityInfo as AccessibilityInfo3, Animated as Animated4, Easing as Easing2, View as View7 } from "react-native";
|
|
@@ -895,6 +909,25 @@ var BIRDS = {
|
|
|
895
909
|
beak: "M55 41 L65 41 L60 50 Z",
|
|
896
910
|
eyes: { at: [[52, 33], [68, 33]], white: 5, pupil: 2.4 },
|
|
897
911
|
parcel: ["M60 100 L71 105 L60 110 L49 105 Z", "M49 105 L60 110 L60 118 L49 113 Z", "M71 105 L60 110 L60 118 L71 113 Z"]
|
|
912
|
+
},
|
|
913
|
+
/**
|
|
914
|
+
* The lovebird — the inseparable that introduces two people. A plump little parrot: a short tail, a round head
|
|
915
|
+
* with its coloured face (the detail colour), the white eye-rings of the species and a short hooked beak.
|
|
916
|
+
*/
|
|
917
|
+
lovebird: {
|
|
918
|
+
shadow: [60, 110, 23, 3.5],
|
|
919
|
+
legs: ["M53 96 L52 106 M48 106 L56 106", "M67 96 L68 106 M64 106 L72 106"],
|
|
920
|
+
back: ["M74 90 C82 98 88 104 95 103 C91 98 86 91 82 84 Z"],
|
|
921
|
+
body: "M32 66 C32 46 88 46 88 66 C88 90 76 100 60 100 C44 100 32 90 32 66 Z",
|
|
922
|
+
belly: "M42 70 C42 59 78 59 78 70 C78 85 70 92 60 92 C50 92 42 85 42 70 Z",
|
|
923
|
+
wings: [
|
|
924
|
+
{ d: "M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z", pivot: [33, 60] },
|
|
925
|
+
{ d: mirror("M33 60 C20 68 22 88 40 90 C35 80 34 70 33 60 Z"), pivot: [87, 60] }
|
|
926
|
+
],
|
|
927
|
+
head: { cx: 60, cy: 38, r: 21 },
|
|
928
|
+
details: ["M43 40 C42 28 51 22 60 22 C69 22 78 28 77 40 C76 50 68 55 60 55 C52 55 44 50 43 40 Z"],
|
|
929
|
+
beak: "M55 44 C55 40 65 40 65 44 C65 50 62 54 60 55 C58 54 55 50 55 44 Z",
|
|
930
|
+
eyes: { at: [[51, 36], [69, 36]], white: 4.6, pupil: 2.4 }
|
|
898
931
|
}
|
|
899
932
|
};
|
|
900
933
|
var MOOD_PARTS = {
|
|
@@ -922,7 +955,8 @@ var OWN_PALETTES = {
|
|
|
922
955
|
owl: { from: "#a78bfa", to: "#6d28d9", wing: "#7c3aed", detail: "#5b21b6", beak: "#fbbf24", eye: "#1f2937" },
|
|
923
956
|
duck: { from: "#f43f5e", to: "#be123c", wing: "#db2777", detail: "#9f1239", beak: "#fbbf24", eye: "#1f2937" },
|
|
924
957
|
flamingo: { from: "#f9a8d4", to: "#db2777", wing: "#ec4899", detail: "#be185d", beak: "#fbbf24", eye: "#1f2937" },
|
|
925
|
-
pigeon: { from: "#22d3ee", to: "#6366f1", wing: "#a855f7", detail: "#4338ca", beak: "#f59e0b", eye: "#1f2937" }
|
|
958
|
+
pigeon: { from: "#22d3ee", to: "#6366f1", wing: "#a855f7", detail: "#4338ca", beak: "#f59e0b", eye: "#1f2937" },
|
|
959
|
+
lovebird: { from: "#6ee7b7", to: "#059669", wing: "#047857", detail: "#fb7185", beak: "#f97316", eye: "#1f2937" }
|
|
926
960
|
};
|
|
927
961
|
var LIGHT = "#ffffff";
|
|
928
962
|
var SHADE = "#000000";
|
|
@@ -1007,8 +1041,63 @@ function Mascot({ bird = "owl", mood = "welcome", tone: tone2 = "brand", size =
|
|
|
1007
1041
|
] }) }) });
|
|
1008
1042
|
}
|
|
1009
1043
|
|
|
1044
|
+
// src/native/mascot-state.tsx
|
|
1045
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1046
|
+
var SIZE = { sm: 64, md: 96, lg: 128 };
|
|
1047
|
+
function useArrival(animated) {
|
|
1048
|
+
const [value] = React8.useState(() => new Animated5.Value(animated ? 0 : 1));
|
|
1049
|
+
React8.useEffect(() => {
|
|
1050
|
+
if (!animated) return;
|
|
1051
|
+
let cancelled = false;
|
|
1052
|
+
void AccessibilityInfo4.isReduceMotionEnabled().then((reduce) => {
|
|
1053
|
+
if (cancelled) return;
|
|
1054
|
+
if (reduce) value.setValue(1);
|
|
1055
|
+
else Animated5.timing(value, { toValue: 1, duration: 420, easing: Easing3.out(Easing3.cubic), useNativeDriver: true }).start();
|
|
1056
|
+
});
|
|
1057
|
+
return () => {
|
|
1058
|
+
cancelled = true;
|
|
1059
|
+
};
|
|
1060
|
+
}, [animated, value]);
|
|
1061
|
+
return value;
|
|
1062
|
+
}
|
|
1063
|
+
function MascotState({ bird = "owl", mood = "empty", title, description, action, size = "md", layout = "stacked", tone: tone2, animated = true, style, ...props }) {
|
|
1064
|
+
const opacity = useArrival(animated);
|
|
1065
|
+
const inline = layout === "inline";
|
|
1066
|
+
return /* @__PURE__ */ jsxs9(
|
|
1067
|
+
Animated5.View,
|
|
1068
|
+
{
|
|
1069
|
+
role: mood === "error" ? "alert" : "status",
|
|
1070
|
+
accessibilityLiveRegion: mood === "error" ? "assertive" : "polite",
|
|
1071
|
+
"aria-busy": mood === "thinking" ? true : void 0,
|
|
1072
|
+
...props,
|
|
1073
|
+
style: [inline ? styles9.inline : styles9.stacked, { opacity, transform: [{ translateY: opacity.interpolate({ inputRange: [0, 1], outputRange: [6, 0] }) }] }, style],
|
|
1074
|
+
children: [
|
|
1075
|
+
/* @__PURE__ */ jsx12(Mascot, { bird, mood, tone: tone2, size: SIZE[size], animated }),
|
|
1076
|
+
/* @__PURE__ */ jsxs9(View8, { style: inline ? styles9.wordsInline : styles9.words, children: [
|
|
1077
|
+
/* @__PURE__ */ jsx12(Txt, { variant: "label", role: "heading", style: inline ? null : styles9.center, children: title }),
|
|
1078
|
+
description ? /* @__PURE__ */ jsx12(Txt, { tone: "secondary", style: inline ? null : styles9.center, children: description }) : null,
|
|
1079
|
+
action ? /* @__PURE__ */ jsx12(View8, { style: [styles9.action, inline ? null : styles9.actionCentred], children: action }) : null
|
|
1080
|
+
] })
|
|
1081
|
+
]
|
|
1082
|
+
}
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
var ErrorState = (props) => /* @__PURE__ */ jsx12(MascotState, { mood: "error", ...props });
|
|
1086
|
+
var SuccessState = (props) => /* @__PURE__ */ jsx12(MascotState, { mood: "success", ...props });
|
|
1087
|
+
var LoadingState = (props) => /* @__PURE__ */ jsx12(MascotState, { mood: "thinking", ...props });
|
|
1088
|
+
var WelcomeState = (props) => /* @__PURE__ */ jsx12(MascotState, { mood: "welcome", ...props });
|
|
1089
|
+
var styles9 = StyleSheet9.create({
|
|
1090
|
+
stacked: { alignItems: "center", justifyContent: "center", gap: 12, paddingVertical: 40, paddingHorizontal: 24 },
|
|
1091
|
+
inline: { flexDirection: "row", alignItems: "center", gap: 16 },
|
|
1092
|
+
words: { alignItems: "center", gap: 6 },
|
|
1093
|
+
wordsInline: { flex: 1, gap: 4 },
|
|
1094
|
+
center: { textAlign: "center", maxWidth: 360 },
|
|
1095
|
+
action: { marginTop: 8, flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
1096
|
+
actionCentred: { justifyContent: "center" }
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1010
1099
|
// src/native/OrazakaMark.tsx
|
|
1011
|
-
import { View as
|
|
1100
|
+
import { View as View9 } from "react-native";
|
|
1012
1101
|
import Svg4, { Circle as Circle3, Defs as Defs4, LinearGradient as LinearGradient4, Path as Path3, RadialGradient as RadialGradient2, Stop as Stop4 } from "react-native-svg";
|
|
1013
1102
|
|
|
1014
1103
|
// src/marks/orazaka-geometry.ts
|
|
@@ -1038,40 +1127,40 @@ var ORAZAKA = {
|
|
|
1038
1127
|
};
|
|
1039
1128
|
|
|
1040
1129
|
// src/native/OrazakaMark.tsx
|
|
1041
|
-
import { jsx as
|
|
1130
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1042
1131
|
function OrazakaMark({ size = 48, animated = true, title, neutral }) {
|
|
1043
1132
|
const { theme } = useTheme();
|
|
1044
|
-
const { Animated:
|
|
1133
|
+
const { Animated: Animated10, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1045
1134
|
const id = useSvgId("ozm");
|
|
1046
1135
|
const viewBox = size < 48 ? ORAZAKA.croppedViewBox : ORAZAKA.viewBox;
|
|
1047
1136
|
const stroke = neutral ?? theme.textMuted;
|
|
1048
|
-
const gradient = /* @__PURE__ */
|
|
1137
|
+
const gradient = /* @__PURE__ */ jsx13(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__ */ jsx13(Stop4, { offset, stopColor: color }, offset)) });
|
|
1049
1138
|
const fill = `url(#${id}a)`;
|
|
1050
|
-
return /* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1054
|
-
/* @__PURE__ */
|
|
1139
|
+
return /* @__PURE__ */ jsxs10(View9, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1140
|
+
/* @__PURE__ */ jsxs10(Svg4, { viewBox, style: layer, children: [
|
|
1141
|
+
/* @__PURE__ */ jsx13(Defs4, { children: /* @__PURE__ */ jsxs10(RadialGradient2, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1142
|
+
/* @__PURE__ */ jsx13(Stop4, { offset: "0%", stopColor: ORAZAKA.glow.color, stopOpacity: ORAZAKA.glow.opacity }),
|
|
1143
|
+
/* @__PURE__ */ jsx13(Stop4, { offset: "100%", stopColor: ORAZAKA.glow.color, stopOpacity: 0 })
|
|
1055
1144
|
] }) }),
|
|
1056
|
-
size >= 48 ? /* @__PURE__ */
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
/* @__PURE__ */
|
|
1145
|
+
size >= 48 ? /* @__PURE__ */ jsx13(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1146
|
+
/* @__PURE__ */ jsx13(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" }),
|
|
1147
|
+
/* @__PURE__ */ jsx13(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.ring.r, stroke, strokeWidth: ORAZAKA.ring.width, opacity: 0.35, fill: "none" })
|
|
1059
1148
|
] }),
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
ORAZAKA.shards.map((d) => /* @__PURE__ */
|
|
1149
|
+
/* @__PURE__ */ jsx13(Animated10.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs10(Svg4, { viewBox, style: layer, children: [
|
|
1150
|
+
/* @__PURE__ */ jsx13(Defs4, { children: gradient }),
|
|
1151
|
+
ORAZAKA.shards.map((d) => /* @__PURE__ */ jsx13(Path3, { d, fill, stroke: fill, strokeWidth: ORAZAKA.shardStroke, strokeLinejoin: "round" }, d))
|
|
1063
1152
|
] }) }),
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1067
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ jsx13(Animated10.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs10(Svg4, { viewBox, style: layer, children: [
|
|
1154
|
+
/* @__PURE__ */ jsx13(Defs4, { children: gradient }),
|
|
1155
|
+
/* @__PURE__ */ jsx13(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.r, fill }),
|
|
1156
|
+
/* @__PURE__ */ jsx13(Circle3, { cx: ORAZAKA.center, cy: ORAZAKA.center, r: ORAZAKA.core.inner, fill: ORAZAKA.highlight })
|
|
1068
1157
|
] }) })
|
|
1069
1158
|
] });
|
|
1070
1159
|
}
|
|
1071
1160
|
|
|
1072
1161
|
// src/native/OrochiaMark.tsx
|
|
1073
|
-
import { useEffect as
|
|
1074
|
-
import { AccessibilityInfo as
|
|
1162
|
+
import { useEffect as useEffect7, useState as useState9 } from "react";
|
|
1163
|
+
import { AccessibilityInfo as AccessibilityInfo5, Animated as Animated6, Easing as Easing4, View as View10 } from "react-native";
|
|
1075
1164
|
import Svg5, { Circle as Circle4, Defs as Defs5, Ellipse as Ellipse2, G as Group2, LinearGradient as LinearGradient5, Path as Path4, RadialGradient as RadialGradient3, Stop as Stop5 } from "react-native-svg";
|
|
1076
1165
|
|
|
1077
1166
|
// src/marks/orochia-geometry.ts
|
|
@@ -1099,25 +1188,25 @@ var OROCHIA = {
|
|
|
1099
1188
|
};
|
|
1100
1189
|
|
|
1101
1190
|
// src/native/OrochiaMark.tsx
|
|
1102
|
-
import { jsx as
|
|
1191
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1103
1192
|
var CENTER = OROCHIA.offset + 180;
|
|
1104
1193
|
function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }) {
|
|
1105
1194
|
const { theme } = useTheme();
|
|
1106
1195
|
const neutral = neutralProp ?? theme.textMuted;
|
|
1107
|
-
const [spin] =
|
|
1108
|
-
const [pulse] =
|
|
1109
|
-
|
|
1196
|
+
const [spin] = useState9(() => new Animated6.Value(0));
|
|
1197
|
+
const [pulse] = useState9(() => new Animated6.Value(0));
|
|
1198
|
+
useEffect7(() => {
|
|
1110
1199
|
if (!animated) return;
|
|
1111
1200
|
let loops = [];
|
|
1112
1201
|
let cancelled = false;
|
|
1113
|
-
void
|
|
1202
|
+
void AccessibilityInfo5.isReduceMotionEnabled().then((reduce) => {
|
|
1114
1203
|
if (reduce || cancelled) return;
|
|
1115
1204
|
loops = [
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1205
|
+
Animated6.loop(Animated6.timing(spin, { toValue: 1, duration: 3e4, easing: Easing4.linear, useNativeDriver: true })),
|
|
1206
|
+
Animated6.loop(
|
|
1207
|
+
Animated6.sequence([
|
|
1208
|
+
Animated6.timing(pulse, { toValue: 1, duration: 1600, easing: Easing4.inOut(Easing4.ease), useNativeDriver: true }),
|
|
1209
|
+
Animated6.timing(pulse, { toValue: 0, duration: 1600, easing: Easing4.inOut(Easing4.ease), useNativeDriver: true })
|
|
1121
1210
|
])
|
|
1122
1211
|
)
|
|
1123
1212
|
];
|
|
@@ -1131,44 +1220,44 @@ function OrochiaMark({ size = 48, animated = true, title, neutral: neutralProp }
|
|
|
1131
1220
|
const viewBox = size < 48 ? OROCHIA.croppedViewBox : OROCHIA.viewBox;
|
|
1132
1221
|
const layer = { position: "absolute", width: size, height: size };
|
|
1133
1222
|
const a11y = title ? { accessible: true, accessibilityRole: "image", accessibilityLabel: title } : { accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants" };
|
|
1134
|
-
const bodyGradient = /* @__PURE__ */
|
|
1135
|
-
return /* @__PURE__ */
|
|
1136
|
-
/* @__PURE__ */
|
|
1137
|
-
/* @__PURE__ */
|
|
1138
|
-
/* @__PURE__ */
|
|
1139
|
-
/* @__PURE__ */
|
|
1223
|
+
const bodyGradient = /* @__PURE__ */ jsx14(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__ */ jsx14(Stop5, { offset, stopColor: color }, offset)) });
|
|
1224
|
+
return /* @__PURE__ */ jsxs11(View10, { style: { width: size, height: size }, ...a11y, children: [
|
|
1225
|
+
/* @__PURE__ */ jsxs11(Svg5, { viewBox, style: layer, children: [
|
|
1226
|
+
/* @__PURE__ */ jsx14(Defs5, { children: /* @__PURE__ */ jsxs11(RadialGradient3, { id: "glow", cx: "50%", cy: "50%", r: "50%", children: [
|
|
1227
|
+
/* @__PURE__ */ jsx14(Stop5, { offset: "0%", stopColor: OROCHIA.glow.color, stopOpacity: OROCHIA.glow.opacity }),
|
|
1228
|
+
/* @__PURE__ */ jsx14(Stop5, { offset: "100%", stopColor: OROCHIA.glow.color, stopOpacity: 0 })
|
|
1140
1229
|
] }) }),
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1230
|
+
/* @__PURE__ */ jsx14(Circle4, { cx: CENTER, cy: CENTER, r: 170, fill: "url(#glow)" }),
|
|
1231
|
+
/* @__PURE__ */ jsx14(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.ring.r, stroke: neutral, strokeWidth: OROCHIA.ring.width, opacity: 0.35, fill: "none" })
|
|
1143
1232
|
] }),
|
|
1144
|
-
/* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1149
|
-
/* @__PURE__ */
|
|
1150
|
-
/* @__PURE__ */
|
|
1151
|
-
/* @__PURE__ */
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1233
|
+
/* @__PURE__ */ jsx14(Animated6.View, { style: [layer, { transform: [{ rotate: spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] }) }] }], children: /* @__PURE__ */ jsx14(Svg5, { viewBox, style: layer, children: /* @__PURE__ */ jsx14(Circle4, { cx: CENTER, cy: CENTER, r: OROCHIA.orbit.r, stroke: neutral, strokeWidth: OROCHIA.orbit.width, strokeDasharray: OROCHIA.orbit.dash, opacity: 0.6, fill: "none" }) }) }),
|
|
1234
|
+
/* @__PURE__ */ jsxs11(Svg5, { viewBox, style: layer, children: [
|
|
1235
|
+
/* @__PURE__ */ jsx14(Defs5, { children: bodyGradient }),
|
|
1236
|
+
/* @__PURE__ */ jsxs11(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1237
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.arc, stroke: "url(#body)", strokeWidth: 22, strokeLinecap: "round", fill: "none" }),
|
|
1238
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.arc, stroke: OROCHIA.scales.color, strokeOpacity: OROCHIA.scales.opacity, strokeWidth: OROCHIA.scales.width, strokeLinecap: "round", strokeDasharray: OROCHIA.scales.dash, fill: "none" }),
|
|
1239
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.neck, stroke: "url(#body)", strokeWidth: 14, strokeLinecap: "round", fill: "none" }),
|
|
1240
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.tail, stroke: "url(#body)", strokeWidth: 6, strokeLinecap: "round", fill: "none" }),
|
|
1241
|
+
/* @__PURE__ */ jsx14(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)" }),
|
|
1242
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.tongue.d, stroke: OROCHIA.tongue.color, strokeWidth: 3, strokeLinecap: "round", fill: "none" })
|
|
1154
1243
|
] })
|
|
1155
1244
|
] }),
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
/* @__PURE__ */
|
|
1158
|
-
/* @__PURE__ */
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1245
|
+
/* @__PURE__ */ jsx14(Animated6.View, { style: [layer, { opacity: pulse.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1] }) }], children: /* @__PURE__ */ jsxs11(Svg5, { viewBox, style: layer, children: [
|
|
1246
|
+
/* @__PURE__ */ jsx14(Defs5, { children: /* @__PURE__ */ jsx14(LinearGradient5, { id: "flame", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: OROCHIA.flameGradient.stops.map(([offset, color]) => /* @__PURE__ */ jsx14(Stop5, { offset, stopColor: color }, offset)) }) }),
|
|
1247
|
+
/* @__PURE__ */ jsxs11(Group2, { transform: `translate(${OROCHIA.offset} ${OROCHIA.offset})`, children: [
|
|
1248
|
+
/* @__PURE__ */ jsx14(Circle4, { cx: OROCHIA.eye.cx, cy: OROCHIA.eye.cy, r: OROCHIA.eye.r, fill: OROCHIA.eye.color }),
|
|
1249
|
+
/* @__PURE__ */ jsx14(Path4, { d: OROCHIA.flame.d, transform: `translate(${OROCHIA.flame.translate[0]} ${OROCHIA.flame.translate[1]}) scale(${OROCHIA.flame.scale})`, fill: "url(#flame)" })
|
|
1161
1250
|
] })
|
|
1162
1251
|
] }) })
|
|
1163
1252
|
] });
|
|
1164
1253
|
}
|
|
1165
1254
|
|
|
1166
1255
|
// src/native/pagination.tsx
|
|
1167
|
-
import { Pressable as Pressable4, StyleSheet as
|
|
1256
|
+
import { Pressable as Pressable4, StyleSheet as StyleSheet10, Text as Text6, View as View11 } from "react-native";
|
|
1168
1257
|
import Svg6, { Path as Path5 } from "react-native-svg";
|
|
1169
|
-
import { jsx as
|
|
1258
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1170
1259
|
function Chevron({ direction, color }) {
|
|
1171
|
-
return /* @__PURE__ */
|
|
1260
|
+
return /* @__PURE__ */ jsx15(Svg6, { 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__ */ jsx15(Path5, { d: direction === "left" ? "m15 6-6 6 6 6" : "m9 6 6 6-6 6" }) });
|
|
1172
1261
|
}
|
|
1173
1262
|
function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, onPrevious, onNext, status, disabled, labels, style }) {
|
|
1174
1263
|
const { theme, radius: radius3 } = useTheme();
|
|
@@ -1177,7 +1266,7 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1177
1266
|
const current = Math.min(Math.max(1, page), count);
|
|
1178
1267
|
const canPrevious = !disabled && (paged ? current > 1 : Boolean(hasPrevious));
|
|
1179
1268
|
const canNext = !disabled && (paged ? current < count : Boolean(hasNext));
|
|
1180
|
-
const button = (direction, enabled, onPress, label) => /* @__PURE__ */
|
|
1269
|
+
const button = (direction, enabled, onPress, label) => /* @__PURE__ */ jsx15(
|
|
1181
1270
|
Pressable4,
|
|
1182
1271
|
{
|
|
1183
1272
|
role: "button",
|
|
@@ -1187,39 +1276,112 @@ function Pagination({ page = 1, pageCount, onPageChange, hasPrevious, hasNext, o
|
|
|
1187
1276
|
hitSlop: 6,
|
|
1188
1277
|
onPress,
|
|
1189
1278
|
style: ({ pressed }) => [
|
|
1190
|
-
|
|
1279
|
+
styles10.button,
|
|
1191
1280
|
{ borderRadius: radius3.sm, borderColor: theme.borderDefault, backgroundColor: theme.surface1, opacity: enabled ? pressed ? 0.8 : 1 : 0.4 }
|
|
1192
1281
|
],
|
|
1193
|
-
children: /* @__PURE__ */
|
|
1282
|
+
children: /* @__PURE__ */ jsx15(Chevron, { direction, color: theme.textPrimary })
|
|
1194
1283
|
}
|
|
1195
1284
|
);
|
|
1196
1285
|
const text = status ?? (paged ? labels.compact(current, count) : null);
|
|
1197
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsxs12(View11, { role: "navigation", style: [styles10.row, style], children: [
|
|
1198
1287
|
button("left", canPrevious, paged ? () => onPageChange?.(current - 1) : onPrevious, labels.previous),
|
|
1199
|
-
text ? /* @__PURE__ */
|
|
1288
|
+
text ? /* @__PURE__ */ jsx15(Text6, { "aria-live": "polite", style: [styles10.status, { color: theme.textSecondary }], children: text }) : null,
|
|
1200
1289
|
button("right", canNext, paged ? () => onPageChange?.(current + 1) : onNext, labels.next)
|
|
1201
1290
|
] });
|
|
1202
1291
|
}
|
|
1203
|
-
var
|
|
1292
|
+
var styles10 = StyleSheet10.create({
|
|
1204
1293
|
row: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 12 },
|
|
1205
|
-
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth:
|
|
1294
|
+
button: { width: 44, height: 44, alignItems: "center", justifyContent: "center", borderWidth: StyleSheet10.hairlineWidth },
|
|
1206
1295
|
status: { fontSize: 13, fontWeight: "600", fontVariant: ["tabular-nums"] }
|
|
1207
1296
|
});
|
|
1208
1297
|
|
|
1298
|
+
// src/native/YazakiaMark.tsx
|
|
1299
|
+
import { View as View12 } from "react-native";
|
|
1300
|
+
import Svg7, { Circle as Circle5, Defs as Defs6, LinearGradient as LinearGradient6, Path as Path6, RadialGradient as RadialGradient4, Stop as Stop6 } from "react-native-svg";
|
|
1301
|
+
|
|
1302
|
+
// src/marks/yazakia-geometry.ts
|
|
1303
|
+
var turquoise = marks.yazakia[marks.yazakia.length - 1][1];
|
|
1304
|
+
var YAZAKIA = {
|
|
1305
|
+
viewBox: "0 0 400 400",
|
|
1306
|
+
croppedViewBox: "80 80 240 240",
|
|
1307
|
+
center: 200,
|
|
1308
|
+
/** The two arms, from each head to the core, mirrored around x = 200. */
|
|
1309
|
+
arms: ["M128 126 C130 178 168 206 200 214", "M272 126 C270 178 232 206 200 214"],
|
|
1310
|
+
/** The stem, from the core down. */
|
|
1311
|
+
stem: "M200 214 L200 280",
|
|
1312
|
+
/** The width of the arms and the stem: the weight of Orochia's body. */
|
|
1313
|
+
stroke: 36,
|
|
1314
|
+
/** The two heads, at the ends of the arms. */
|
|
1315
|
+
heads: [
|
|
1316
|
+
{ cx: 128, cy: 124, r: 28 },
|
|
1317
|
+
{ cx: 272, cy: 124, r: 28 }
|
|
1318
|
+
],
|
|
1319
|
+
gradient: { x1: 110, y1: 300, x2: 290, y2: 100, stops: marks.yazakia },
|
|
1320
|
+
/** Where the arms meet: the core that breathes. */
|
|
1321
|
+
core: { cx: 200, cy: 214, r: 24, inner: 8.5 },
|
|
1322
|
+
highlight: "#f0fdfa",
|
|
1323
|
+
/** The pair: two nodes on the orbit, opposite each other, that turn with it. */
|
|
1324
|
+
pair: { r: 8, at: [[40, 200], [360, 200]] },
|
|
1325
|
+
glow: { color: turquoise, opacity: 0.16 },
|
|
1326
|
+
/** The core's breathing shadow (web), in the mark's turquoise. */
|
|
1327
|
+
pulse: { color: turquoise, low: 0.3, high: 0.6 },
|
|
1328
|
+
orbit: { r: 160, dash: "8 8", width: 1.5 },
|
|
1329
|
+
ring: { r: 134, width: 1 }
|
|
1330
|
+
};
|
|
1331
|
+
|
|
1332
|
+
// src/native/YazakiaMark.tsx
|
|
1333
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1334
|
+
function YazakiaMark({ size = 48, animated = true, title, neutral }) {
|
|
1335
|
+
const { theme } = useTheme();
|
|
1336
|
+
const { Animated: Animated10, layer, spinStyle, pulseStyle } = useMarkMotion(size, animated);
|
|
1337
|
+
const id = useSvgId("yzm");
|
|
1338
|
+
const viewBox = size < 48 ? YAZAKIA.croppedViewBox : YAZAKIA.viewBox;
|
|
1339
|
+
const stroke = neutral ?? theme.textMuted;
|
|
1340
|
+
const gradient = /* @__PURE__ */ jsx16(LinearGradient6, { 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__ */ jsx16(Stop6, { offset, stopColor: color }, offset)) });
|
|
1341
|
+
const fill = `url(#${id}a)`;
|
|
1342
|
+
return /* @__PURE__ */ jsxs13(View12, { style: { width: size, height: size }, ...markA11y(title), children: [
|
|
1343
|
+
/* @__PURE__ */ jsxs13(Svg7, { viewBox, style: layer, children: [
|
|
1344
|
+
/* @__PURE__ */ jsxs13(Defs6, { children: [
|
|
1345
|
+
/* @__PURE__ */ jsxs13(RadialGradient4, { id: `${id}g`, cx: "50%", cy: "50%", r: "50%", children: [
|
|
1346
|
+
/* @__PURE__ */ jsx16(Stop6, { offset: "0%", stopColor: YAZAKIA.glow.color, stopOpacity: YAZAKIA.glow.opacity }),
|
|
1347
|
+
/* @__PURE__ */ jsx16(Stop6, { offset: "100%", stopColor: YAZAKIA.glow.color, stopOpacity: 0 })
|
|
1348
|
+
] }),
|
|
1349
|
+
gradient
|
|
1350
|
+
] }),
|
|
1351
|
+
size >= 48 ? /* @__PURE__ */ jsx16(Circle5, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: 190, fill: `url(#${id}g)` }) : null,
|
|
1352
|
+
/* @__PURE__ */ jsx16(Circle5, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.ring.r, stroke, strokeWidth: YAZAKIA.ring.width, opacity: 0.35, fill: "none" }),
|
|
1353
|
+
YAZAKIA.arms.map((d) => /* @__PURE__ */ jsx16(Path6, { d, stroke: fill, strokeWidth: YAZAKIA.stroke, strokeLinecap: "round", fill: "none" }, d)),
|
|
1354
|
+
/* @__PURE__ */ jsx16(Path6, { d: YAZAKIA.stem, stroke: fill, strokeWidth: YAZAKIA.stroke, strokeLinecap: "round", fill: "none" }),
|
|
1355
|
+
YAZAKIA.heads.map((h) => /* @__PURE__ */ jsx16(Circle5, { cx: h.cx, cy: h.cy, r: h.r, fill }, h.cx))
|
|
1356
|
+
] }),
|
|
1357
|
+
/* @__PURE__ */ jsx16(Animated10.View, { style: [layer, spinStyle], children: /* @__PURE__ */ jsxs13(Svg7, { viewBox, style: layer, children: [
|
|
1358
|
+
/* @__PURE__ */ jsx16(Defs6, { children: gradient }),
|
|
1359
|
+
/* @__PURE__ */ jsx16(Circle5, { cx: YAZAKIA.center, cy: YAZAKIA.center, r: YAZAKIA.orbit.r, stroke, strokeWidth: YAZAKIA.orbit.width, strokeDasharray: YAZAKIA.orbit.dash, opacity: 0.6, fill: "none" }),
|
|
1360
|
+
YAZAKIA.pair.at.map(([cx, cy]) => /* @__PURE__ */ jsx16(Circle5, { cx, cy, r: YAZAKIA.pair.r, fill }, cx))
|
|
1361
|
+
] }) }),
|
|
1362
|
+
/* @__PURE__ */ jsx16(Animated10.View, { style: [layer, pulseStyle], children: /* @__PURE__ */ jsxs13(Svg7, { viewBox, style: layer, children: [
|
|
1363
|
+
/* @__PURE__ */ jsx16(Defs6, { children: gradient }),
|
|
1364
|
+
/* @__PURE__ */ jsx16(Circle5, { cx: YAZAKIA.core.cx, cy: YAZAKIA.core.cy, r: YAZAKIA.core.r, fill }),
|
|
1365
|
+
/* @__PURE__ */ jsx16(Circle5, { cx: YAZAKIA.core.cx, cy: YAZAKIA.core.cy, r: YAZAKIA.core.inner, fill: YAZAKIA.highlight })
|
|
1366
|
+
] }) })
|
|
1367
|
+
] });
|
|
1368
|
+
}
|
|
1369
|
+
|
|
1209
1370
|
// src/native/ProductMark.tsx
|
|
1210
|
-
import { jsx as
|
|
1371
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1211
1372
|
function ProductMark({ id, ...props }) {
|
|
1212
|
-
if (id === "krizaka") return /* @__PURE__ */
|
|
1213
|
-
if (id === "orazaka") return /* @__PURE__ */
|
|
1214
|
-
return /* @__PURE__ */
|
|
1373
|
+
if (id === "krizaka") return /* @__PURE__ */ jsx17(KrizakaMark, { ...props });
|
|
1374
|
+
if (id === "orazaka") return /* @__PURE__ */ jsx17(OrazakaMark, { ...props });
|
|
1375
|
+
if (id === "yazakia") return /* @__PURE__ */ jsx17(YazakiaMark, { ...props });
|
|
1376
|
+
return /* @__PURE__ */ jsx17(OrochiaMark, { ...props });
|
|
1215
1377
|
}
|
|
1216
1378
|
|
|
1217
1379
|
// src/native/progress.tsx
|
|
1218
|
-
import * as
|
|
1219
|
-
import { Animated as
|
|
1220
|
-
import
|
|
1221
|
-
import { jsx as
|
|
1222
|
-
var AnimatedCircle =
|
|
1380
|
+
import * as React10 from "react";
|
|
1381
|
+
import { Animated as Animated7, Easing as Easing5, StyleSheet as StyleSheet11, View as View13 } from "react-native";
|
|
1382
|
+
import Svg8, { Circle as Circle6, Defs as Defs7, LinearGradient as LinearGradient7, Rect as Rect3, Stop as Stop7 } from "react-native-svg";
|
|
1383
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1384
|
+
var AnimatedCircle = Animated7.createAnimatedComponent(Circle6);
|
|
1223
1385
|
var BAR = { sm: 4, md: 8, lg: 12 };
|
|
1224
1386
|
var RING = { sm: 40, md: 80, lg: 144 };
|
|
1225
1387
|
var STROKE = { sm: 12, md: 9, lg: 7 };
|
|
@@ -1230,21 +1392,21 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1230
1392
|
const known = typeof value === "number" && Number.isFinite(value);
|
|
1231
1393
|
const ratio = known ? Math.min(1, Math.max(0, value / (max || 1))) : 0;
|
|
1232
1394
|
const percent = Math.round(ratio * 100);
|
|
1233
|
-
const [progress] =
|
|
1234
|
-
const [spin] =
|
|
1235
|
-
const [track, setTrack] =
|
|
1236
|
-
|
|
1395
|
+
const [progress] = React10.useState(() => new Animated7.Value(ratio));
|
|
1396
|
+
const [spin] = React10.useState(() => new Animated7.Value(0));
|
|
1397
|
+
const [track, setTrack] = React10.useState(0);
|
|
1398
|
+
React10.useEffect(() => {
|
|
1237
1399
|
if (reduce) {
|
|
1238
1400
|
progress.setValue(ratio);
|
|
1239
1401
|
return;
|
|
1240
1402
|
}
|
|
1241
|
-
const animation =
|
|
1403
|
+
const animation = Animated7.timing(progress, { toValue: ratio, duration: 700, easing: Easing5.out(Easing5.cubic), useNativeDriver: false });
|
|
1242
1404
|
animation.start();
|
|
1243
1405
|
return () => animation.stop();
|
|
1244
1406
|
}, [ratio, reduce, progress]);
|
|
1245
|
-
|
|
1407
|
+
React10.useEffect(() => {
|
|
1246
1408
|
if (known || reduce) return;
|
|
1247
|
-
const loop =
|
|
1409
|
+
const loop = Animated7.loop(Animated7.timing(spin, { toValue: 1, duration: 1200, easing: Easing5.linear, useNativeDriver: true }));
|
|
1248
1410
|
loop.start();
|
|
1249
1411
|
return () => {
|
|
1250
1412
|
loop.stop();
|
|
@@ -1260,9 +1422,9 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1260
1422
|
"aria-valuenow": known ? Math.min(max, Math.max(0, value)) : void 0,
|
|
1261
1423
|
"aria-valuetext": known ? valueText ?? `${percent}%` : valueText
|
|
1262
1424
|
};
|
|
1263
|
-
const gradient = /* @__PURE__ */
|
|
1264
|
-
/* @__PURE__ */
|
|
1265
|
-
/* @__PURE__ */
|
|
1425
|
+
const gradient = /* @__PURE__ */ jsx18(Defs7, { children: /* @__PURE__ */ jsxs14(LinearGradient7, { id, x1: "0", y1: "0", x2: "1", y2: variant === "ring" ? "1" : "0", children: [
|
|
1426
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "0", stopColor: theme.accent }),
|
|
1427
|
+
/* @__PURE__ */ jsx18(Stop7, { offset: "1", stopColor: theme.accent2 })
|
|
1266
1428
|
] }) });
|
|
1267
1429
|
if (variant === "ring") {
|
|
1268
1430
|
const side = RING[size];
|
|
@@ -1271,11 +1433,11 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1271
1433
|
const circumference = 2 * Math.PI * r;
|
|
1272
1434
|
const offset = known ? progress.interpolate({ inputRange: [0, 1], outputRange: [circumference, 0] }) : circumference * 0.75;
|
|
1273
1435
|
const rotate = spin.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "360deg"] });
|
|
1274
|
-
return /* @__PURE__ */
|
|
1275
|
-
/* @__PURE__ */
|
|
1436
|
+
return /* @__PURE__ */ jsxs14(View13, { ...a11y, style: [styles11.ring, { width: side, height: side }, style], children: [
|
|
1437
|
+
/* @__PURE__ */ jsx18(Animated7.View, { style: [StyleSheet11.absoluteFill, { transform: [{ rotate: known ? "-90deg" : rotate }] }], children: /* @__PURE__ */ jsxs14(Svg8, { width: side, height: side, viewBox: "0 0 100 100", children: [
|
|
1276
1438
|
gradient,
|
|
1277
|
-
/* @__PURE__ */
|
|
1278
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ jsx18(Circle6, { cx: 50, cy: 50, r, fill: "none", stroke: theme.borderDefault, strokeWidth: stroke }),
|
|
1440
|
+
/* @__PURE__ */ jsx18(
|
|
1279
1441
|
AnimatedCircle,
|
|
1280
1442
|
{
|
|
1281
1443
|
cx: 50,
|
|
@@ -1295,48 +1457,48 @@ function Progress({ variant = "bar", size = "md", value, max = 100, label, value
|
|
|
1295
1457
|
}
|
|
1296
1458
|
const width = known ? progress.interpolate({ inputRange: [0, 1], outputRange: ["0%", "100%"] }) : "40%";
|
|
1297
1459
|
const translate = spin.interpolate({ inputRange: [0, 1], outputRange: [-0.4 * track, track] });
|
|
1298
|
-
return /* @__PURE__ */
|
|
1299
|
-
|
|
1460
|
+
return /* @__PURE__ */ jsx18(
|
|
1461
|
+
View13,
|
|
1300
1462
|
{
|
|
1301
1463
|
...a11y,
|
|
1302
1464
|
onLayout: known ? void 0 : (event) => setTrack(event.nativeEvent.layout.width),
|
|
1303
|
-
style: [
|
|
1304
|
-
children: /* @__PURE__ */
|
|
1465
|
+
style: [styles11.bar, { height: BAR[size], backgroundColor: theme.surface3 }, style],
|
|
1466
|
+
children: /* @__PURE__ */ jsx18(Animated7.View, { style: [styles11.fill, { width }, known || reduce ? null : { transform: [{ translateX: translate }] }], children: /* @__PURE__ */ jsxs14(Svg8, { width: "100%", height: "100%", preserveAspectRatio: "none", children: [
|
|
1305
1467
|
gradient,
|
|
1306
|
-
/* @__PURE__ */
|
|
1468
|
+
/* @__PURE__ */ jsx18(Rect3, { x: 0, y: 0, width: "100%", height: "100%", fill: `url(#${id})` })
|
|
1307
1469
|
] }) })
|
|
1308
1470
|
}
|
|
1309
1471
|
);
|
|
1310
1472
|
}
|
|
1311
|
-
var
|
|
1473
|
+
var styles11 = StyleSheet11.create({
|
|
1312
1474
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
1313
1475
|
bar: { width: "100%", overflow: "hidden", borderRadius: 9999 },
|
|
1314
1476
|
fill: { height: "100%", overflow: "hidden", borderRadius: 9999 }
|
|
1315
1477
|
});
|
|
1316
1478
|
|
|
1317
1479
|
// src/native/search-field.tsx
|
|
1318
|
-
import * as
|
|
1319
|
-
import { Pressable as Pressable5, StyleSheet as
|
|
1320
|
-
import
|
|
1321
|
-
import { jsx as
|
|
1480
|
+
import * as React11 from "react";
|
|
1481
|
+
import { Pressable as Pressable5, StyleSheet as StyleSheet12, TextInput, View as View14 } from "react-native";
|
|
1482
|
+
import Svg9, { Circle as Circle7, Path as Path7 } from "react-native-svg";
|
|
1483
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1322
1484
|
function SearchField({ label, value, defaultValue = "", onValueChange, onSearch, debounce = 300, onSubmit, clearLabel, style, placeholder, ...props }) {
|
|
1323
1485
|
const { theme, radius: radius3 } = useTheme();
|
|
1324
|
-
const [own, setOwn] =
|
|
1486
|
+
const [own, setOwn] = React11.useState(defaultValue);
|
|
1325
1487
|
const query = value ?? own;
|
|
1326
|
-
const timer2 =
|
|
1327
|
-
|
|
1488
|
+
const timer2 = React11.useRef(void 0);
|
|
1489
|
+
React11.useEffect(() => () => clearTimeout(timer2.current), []);
|
|
1328
1490
|
const change = (next) => {
|
|
1329
1491
|
if (value === void 0) setOwn(next);
|
|
1330
1492
|
onValueChange?.(next);
|
|
1331
1493
|
clearTimeout(timer2.current);
|
|
1332
1494
|
if (onSearch) timer2.current = setTimeout(() => onSearch(next), debounce);
|
|
1333
1495
|
};
|
|
1334
|
-
return /* @__PURE__ */
|
|
1335
|
-
/* @__PURE__ */
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
/* @__PURE__ */
|
|
1496
|
+
return /* @__PURE__ */ jsxs15(View14, { style: [styles12.frame, { borderRadius: radius3.md, borderColor: theme.borderDefault, backgroundColor: theme.surface2 }, style], children: [
|
|
1497
|
+
/* @__PURE__ */ jsxs15(Svg9, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2, strokeLinecap: "round", "aria-hidden": true, children: [
|
|
1498
|
+
/* @__PURE__ */ jsx19(Circle7, { cx: 11, cy: 11, r: 7 }),
|
|
1499
|
+
/* @__PURE__ */ jsx19(Path7, { d: "m20 20-3.5-3.5" })
|
|
1338
1500
|
] }),
|
|
1339
|
-
/* @__PURE__ */
|
|
1501
|
+
/* @__PURE__ */ jsx19(
|
|
1340
1502
|
TextInput,
|
|
1341
1503
|
{
|
|
1342
1504
|
role: "searchbox",
|
|
@@ -1354,33 +1516,33 @@ function SearchField({ label, value, defaultValue = "", onValueChange, onSearch,
|
|
|
1354
1516
|
onSearch?.(query);
|
|
1355
1517
|
onSubmit?.(query);
|
|
1356
1518
|
},
|
|
1357
|
-
style: [
|
|
1519
|
+
style: [styles12.input, { color: theme.textPrimary }],
|
|
1358
1520
|
...props
|
|
1359
1521
|
}
|
|
1360
1522
|
),
|
|
1361
|
-
query ? /* @__PURE__ */
|
|
1523
|
+
query ? /* @__PURE__ */ jsx19(Pressable5, { role: "button", "aria-label": clearLabel, hitSlop: 10, onPress: () => change(""), style: styles12.clear, children: /* @__PURE__ */ jsx19(Svg9, { width: 16, height: 16, viewBox: "0 0 24 24", fill: "none", stroke: theme.textSecondary, strokeWidth: 2.4, strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx19(Path7, { d: "M18 6 6 18M6 6l12 12" }) }) }) : null
|
|
1362
1524
|
] });
|
|
1363
1525
|
}
|
|
1364
|
-
var
|
|
1365
|
-
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth:
|
|
1526
|
+
var styles12 = StyleSheet12.create({
|
|
1527
|
+
frame: { flexDirection: "row", alignItems: "center", gap: 8, height: 44, paddingLeft: 12, paddingRight: 6, borderWidth: StyleSheet12.hairlineWidth },
|
|
1366
1528
|
input: { flex: 1, height: "100%", fontSize: 15, paddingVertical: 0 },
|
|
1367
1529
|
clear: { width: 32, height: 32, alignItems: "center", justifyContent: "center" }
|
|
1368
1530
|
});
|
|
1369
1531
|
|
|
1370
1532
|
// src/native/segmented.tsx
|
|
1371
|
-
import { Pressable as Pressable6, StyleSheet as
|
|
1372
|
-
import { jsx as
|
|
1533
|
+
import { Pressable as Pressable6, StyleSheet as StyleSheet13, Text as Text7, View as View15 } from "react-native";
|
|
1534
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1373
1535
|
function Segmented({ options, value, onValueChange, size = "md", "aria-label": label, style }) {
|
|
1374
1536
|
const { theme, radius: radius3 } = useTheme();
|
|
1375
|
-
return /* @__PURE__ */
|
|
1376
|
-
|
|
1537
|
+
return /* @__PURE__ */ jsx20(
|
|
1538
|
+
View15,
|
|
1377
1539
|
{
|
|
1378
1540
|
role: "tablist",
|
|
1379
1541
|
"aria-label": label,
|
|
1380
|
-
style: [
|
|
1542
|
+
style: [styles13.track, { backgroundColor: theme.surface2, borderColor: theme.borderSubtle, borderRadius: radius3.md, height: size === "sm" ? 32 : 40 }, style],
|
|
1381
1543
|
children: options.map((option) => {
|
|
1382
1544
|
const selected = option.value === value;
|
|
1383
|
-
return /* @__PURE__ */
|
|
1545
|
+
return /* @__PURE__ */ jsx20(
|
|
1384
1546
|
Pressable6,
|
|
1385
1547
|
{
|
|
1386
1548
|
role: "tab",
|
|
@@ -1391,12 +1553,12 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1391
1553
|
if (!selected) onValueChange(option.value);
|
|
1392
1554
|
},
|
|
1393
1555
|
style: [
|
|
1394
|
-
|
|
1556
|
+
styles13.segment,
|
|
1395
1557
|
{ borderRadius: radius3.sm },
|
|
1396
1558
|
selected ? { backgroundColor: theme.surface0, borderColor: theme.borderDefault } : null,
|
|
1397
|
-
option.disabled ?
|
|
1559
|
+
option.disabled ? styles13.disabled : null
|
|
1398
1560
|
],
|
|
1399
|
-
children: /* @__PURE__ */
|
|
1561
|
+
children: /* @__PURE__ */ jsx20(Text7, { numberOfLines: 1, style: [styles13.label, { color: selected ? theme.textPrimary : theme.textSecondary, fontSize: size === "sm" ? 12 : 13 }], children: option.label })
|
|
1400
1562
|
},
|
|
1401
1563
|
option.value
|
|
1402
1564
|
);
|
|
@@ -1404,17 +1566,17 @@ function Segmented({ options, value, onValueChange, size = "md", "aria-label": l
|
|
|
1404
1566
|
}
|
|
1405
1567
|
);
|
|
1406
1568
|
}
|
|
1407
|
-
var
|
|
1408
|
-
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth:
|
|
1409
|
-
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth:
|
|
1569
|
+
var styles13 = StyleSheet13.create({
|
|
1570
|
+
track: { flexDirection: "row", padding: 3, gap: 3, borderWidth: StyleSheet13.hairlineWidth },
|
|
1571
|
+
segment: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 8, borderWidth: StyleSheet13.hairlineWidth, borderColor: "transparent" },
|
|
1410
1572
|
label: { fontWeight: "600" },
|
|
1411
1573
|
disabled: { opacity: 0.4 }
|
|
1412
1574
|
});
|
|
1413
1575
|
|
|
1414
1576
|
// src/native/skeleton.tsx
|
|
1415
|
-
import * as
|
|
1416
|
-
import { Animated as
|
|
1417
|
-
import { jsx as
|
|
1577
|
+
import * as React12 from "react";
|
|
1578
|
+
import { Animated as Animated8 } from "react-native";
|
|
1579
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1418
1580
|
var SHAPE = {
|
|
1419
1581
|
text: { width: "100%", height: 12, radius: 4 },
|
|
1420
1582
|
circle: { width: 40, height: 40, radius: 9999 },
|
|
@@ -1423,13 +1585,13 @@ var SHAPE = {
|
|
|
1423
1585
|
function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
1424
1586
|
const { theme } = useTheme();
|
|
1425
1587
|
const reduce = useReducedMotion();
|
|
1426
|
-
const [opacity] =
|
|
1427
|
-
|
|
1588
|
+
const [opacity] = React12.useState(() => new Animated8.Value(1));
|
|
1589
|
+
React12.useEffect(() => {
|
|
1428
1590
|
if (reduce) return;
|
|
1429
|
-
const loop =
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1591
|
+
const loop = Animated8.loop(
|
|
1592
|
+
Animated8.sequence([
|
|
1593
|
+
Animated8.timing(opacity, { toValue: 0.5, duration: 900, useNativeDriver: true }),
|
|
1594
|
+
Animated8.timing(opacity, { toValue: 1, duration: 900, useNativeDriver: true })
|
|
1433
1595
|
])
|
|
1434
1596
|
);
|
|
1435
1597
|
loop.start();
|
|
@@ -1440,8 +1602,8 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1440
1602
|
}, [reduce, opacity]);
|
|
1441
1603
|
const s = SHAPE[shape];
|
|
1442
1604
|
const side = shape === "circle" ? width ?? height ?? s.width : void 0;
|
|
1443
|
-
return /* @__PURE__ */
|
|
1444
|
-
|
|
1605
|
+
return /* @__PURE__ */ jsx21(
|
|
1606
|
+
Animated8.View,
|
|
1445
1607
|
{
|
|
1446
1608
|
testID,
|
|
1447
1609
|
"aria-hidden": true,
|
|
@@ -1455,10 +1617,10 @@ function Skeleton({ shape = "text", width, height, style, testID }) {
|
|
|
1455
1617
|
|
|
1456
1618
|
// src/native/spinner.tsx
|
|
1457
1619
|
import { ActivityIndicator as ActivityIndicator2 } from "react-native";
|
|
1458
|
-
import { jsx as
|
|
1620
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1459
1621
|
function Spinner({ label, size = "md", ...props }) {
|
|
1460
1622
|
const { theme } = useTheme();
|
|
1461
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx22(
|
|
1462
1624
|
ActivityIndicator2,
|
|
1463
1625
|
{
|
|
1464
1626
|
accessible: true,
|
|
@@ -1473,9 +1635,9 @@ function Spinner({ label, size = "md", ...props }) {
|
|
|
1473
1635
|
}
|
|
1474
1636
|
|
|
1475
1637
|
// src/native/toast.tsx
|
|
1476
|
-
import * as
|
|
1477
|
-
import { AccessibilityInfo as
|
|
1478
|
-
import { Fragment as Fragment3, jsx as
|
|
1638
|
+
import * as React13 from "react";
|
|
1639
|
+
import { AccessibilityInfo as AccessibilityInfo6, Animated as Animated9, Pressable as Pressable7, StyleSheet as StyleSheet14, Text as Text8, View as View16 } from "react-native";
|
|
1640
|
+
import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1479
1641
|
var items = [];
|
|
1480
1642
|
var listeners2 = /* @__PURE__ */ new Set();
|
|
1481
1643
|
var counter = 0;
|
|
@@ -1510,30 +1672,30 @@ var toast = Object.assign(show, {
|
|
|
1510
1672
|
function ToastView({ item, closeLabel, duration }) {
|
|
1511
1673
|
const { theme, radius: radius3 } = useTheme();
|
|
1512
1674
|
const reduce = useReducedMotion();
|
|
1513
|
-
const [enter] =
|
|
1514
|
-
|
|
1675
|
+
const [enter] = React13.useState(() => new Animated9.Value(reduce ? 1 : 0));
|
|
1676
|
+
React13.useEffect(() => {
|
|
1515
1677
|
if (reduce) enter.setValue(1);
|
|
1516
|
-
else
|
|
1678
|
+
else Animated9.timing(enter, { toValue: 1, duration: 220, useNativeDriver: true }).start();
|
|
1517
1679
|
}, [enter, reduce]);
|
|
1518
|
-
|
|
1519
|
-
|
|
1680
|
+
React13.useEffect(() => {
|
|
1681
|
+
AccessibilityInfo6.announceForAccessibility(item.description ? `${item.title}. ${item.description}` : item.title);
|
|
1520
1682
|
}, [item.title, item.description]);
|
|
1521
1683
|
const ms = item.duration ?? duration;
|
|
1522
|
-
|
|
1684
|
+
React13.useEffect(() => {
|
|
1523
1685
|
if (!Number.isFinite(ms)) return;
|
|
1524
1686
|
const timer2 = setTimeout(() => dismiss(item.id), ms);
|
|
1525
1687
|
return () => clearTimeout(timer2);
|
|
1526
1688
|
}, [item.id, ms]);
|
|
1527
1689
|
const edge = { success: theme.success, warning: theme.warning, error: theme.danger, info: theme.info, default: theme.borderDefault }[item.tone ?? "default"];
|
|
1528
|
-
const text = /* @__PURE__ */
|
|
1529
|
-
item.icon ? /* @__PURE__ */
|
|
1530
|
-
/* @__PURE__ */
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
item.description ? /* @__PURE__ */
|
|
1690
|
+
const text = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
1691
|
+
item.icon ? /* @__PURE__ */ jsx23(View16, { "aria-hidden": true, children: item.icon }) : null,
|
|
1692
|
+
/* @__PURE__ */ jsxs16(View16, { style: styles14.content, children: [
|
|
1693
|
+
/* @__PURE__ */ jsx23(Txt, { variant: "label", numberOfLines: 2, children: item.title }),
|
|
1694
|
+
item.description ? /* @__PURE__ */ jsx23(Txt, { variant: "caption", tone: "secondary", numberOfLines: 3, children: item.description }) : null
|
|
1533
1695
|
] })
|
|
1534
1696
|
] });
|
|
1535
|
-
const body = /* @__PURE__ */
|
|
1536
|
-
item.onPress ? /* @__PURE__ */
|
|
1697
|
+
const body = /* @__PURE__ */ jsxs16(Fragment3, { children: [
|
|
1698
|
+
item.onPress ? /* @__PURE__ */ jsx23(
|
|
1537
1699
|
Pressable7,
|
|
1538
1700
|
{
|
|
1539
1701
|
role: "button",
|
|
@@ -1541,11 +1703,11 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1541
1703
|
item.onPress?.();
|
|
1542
1704
|
dismiss(item.id);
|
|
1543
1705
|
},
|
|
1544
|
-
style: ({ pressed }) => [
|
|
1706
|
+
style: ({ pressed }) => [styles14.main, { opacity: pressed ? 0.8 : 1 }],
|
|
1545
1707
|
children: text
|
|
1546
1708
|
}
|
|
1547
|
-
) : /* @__PURE__ */
|
|
1548
|
-
item.action ? /* @__PURE__ */
|
|
1709
|
+
) : /* @__PURE__ */ jsx23(View16, { style: styles14.main, children: text }),
|
|
1710
|
+
item.action ? /* @__PURE__ */ jsx23(
|
|
1549
1711
|
Pressable7,
|
|
1550
1712
|
{
|
|
1551
1713
|
role: "button",
|
|
@@ -1553,33 +1715,33 @@ function ToastView({ item, closeLabel, duration }) {
|
|
|
1553
1715
|
item.action?.onPress();
|
|
1554
1716
|
dismiss(item.id);
|
|
1555
1717
|
},
|
|
1556
|
-
style: [
|
|
1557
|
-
children: /* @__PURE__ */
|
|
1718
|
+
style: [styles14.action, { backgroundColor: theme.accent, borderRadius: radius3.sm }],
|
|
1719
|
+
children: /* @__PURE__ */ jsx23(Text8, { style: [styles14.actionLabel, { color: theme.onAccent }], children: item.action.label })
|
|
1558
1720
|
}
|
|
1559
1721
|
) : null,
|
|
1560
|
-
/* @__PURE__ */
|
|
1722
|
+
/* @__PURE__ */ jsx23(Pressable7, { role: "button", "aria-label": closeLabel, hitSlop: 10, onPress: () => dismiss(item.id), style: styles14.close, children: /* @__PURE__ */ jsx23(Text8, { style: [styles14.cross, { color: theme.textSecondary }], children: "\xD7" }) })
|
|
1561
1723
|
] });
|
|
1562
1724
|
const frame = [
|
|
1563
|
-
|
|
1725
|
+
styles14.toast,
|
|
1564
1726
|
{ backgroundColor: theme.surface2, borderColor: theme.borderDefault, borderLeftColor: edge, borderRadius: radius3.lg, shadowColor: theme.scrimStrong }
|
|
1565
1727
|
];
|
|
1566
1728
|
const motion3 = { transform: [{ translateY: enter.interpolate({ inputRange: [0, 1], outputRange: [-8, 0] }) }] };
|
|
1567
|
-
return /* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsx23(Animated9.View, { "aria-live": "polite", style: motion3, children: /* @__PURE__ */ jsx23(View16, { style: frame, children: body }) });
|
|
1568
1730
|
}
|
|
1569
1731
|
function Toaster({ closeLabel, position = "top", offset = 12, duration = 6e3, max = 3 }) {
|
|
1570
|
-
const all =
|
|
1732
|
+
const all = React13.useSyncExternalStore(subscribe2, snapshot, snapshot);
|
|
1571
1733
|
const shown = all.slice(-max);
|
|
1572
1734
|
if (shown.length === 0) return null;
|
|
1573
|
-
return /* @__PURE__ */
|
|
1735
|
+
return /* @__PURE__ */ jsx23(View16, { pointerEvents: "box-none", style: [styles14.stack, position === "top" ? { top: offset } : { bottom: offset }], children: (position === "top" ? shown : [...shown].reverse()).map((item) => /* @__PURE__ */ jsx23(ToastView, { item, closeLabel, duration }, item.id)) });
|
|
1574
1736
|
}
|
|
1575
|
-
var
|
|
1737
|
+
var styles14 = StyleSheet14.create({
|
|
1576
1738
|
stack: { position: "absolute", left: 12, right: 12, gap: 8, zIndex: 100 },
|
|
1577
1739
|
toast: {
|
|
1578
1740
|
flexDirection: "row",
|
|
1579
1741
|
alignItems: "center",
|
|
1580
1742
|
gap: 10,
|
|
1581
1743
|
padding: 12,
|
|
1582
|
-
borderWidth:
|
|
1744
|
+
borderWidth: StyleSheet14.hairlineWidth,
|
|
1583
1745
|
borderLeftWidth: 4,
|
|
1584
1746
|
shadowOpacity: 0.3,
|
|
1585
1747
|
shadowRadius: 16,
|
|
@@ -1611,9 +1773,12 @@ export {
|
|
|
1611
1773
|
Chip,
|
|
1612
1774
|
Countdown,
|
|
1613
1775
|
EmptyState,
|
|
1776
|
+
ErrorState,
|
|
1614
1777
|
IconButton,
|
|
1615
1778
|
KrizakaMark,
|
|
1779
|
+
LoadingState,
|
|
1616
1780
|
Mascot,
|
|
1781
|
+
MascotState,
|
|
1617
1782
|
OrazakaMark,
|
|
1618
1783
|
OrochiaMark,
|
|
1619
1784
|
Pagination,
|
|
@@ -1623,9 +1788,12 @@ export {
|
|
|
1623
1788
|
Segmented,
|
|
1624
1789
|
Skeleton,
|
|
1625
1790
|
Spinner,
|
|
1791
|
+
SuccessState,
|
|
1626
1792
|
ThemeProvider,
|
|
1627
1793
|
Toaster,
|
|
1628
1794
|
Txt,
|
|
1795
|
+
WelcomeState,
|
|
1796
|
+
YazakiaMark,
|
|
1629
1797
|
alpha,
|
|
1630
1798
|
splitDuration,
|
|
1631
1799
|
textStyles,
|