@krizaka/ui 2.1.0 → 2.3.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 +23 -9
- package/dist/{button-Cgfkg_3y.d.ts → button-BMAO7dKF.d.ts} +29 -2
- package/dist/button.d.ts +32 -5
- package/dist/button.js +62 -9
- package/dist/button.js.map +1 -1
- package/dist/chip-link.d.ts +53 -0
- package/dist/chip-link.js +32 -0
- package/dist/chip-link.js.map +1 -0
- package/dist/chunk-43PTCDTL.js +31 -0
- package/dist/chunk-43PTCDTL.js.map +1 -0
- package/dist/chunk-6ISW63JI.js +11 -0
- package/dist/chunk-6ISW63JI.js.map +1 -0
- package/dist/chunk-HAQWKORZ.js +117 -0
- package/dist/chunk-HAQWKORZ.js.map +1 -0
- package/dist/{chunk-FHYZSO2S.js → chunk-R6SDS7JM.js} +5 -3
- package/dist/chunk-R6SDS7JM.js.map +1 -0
- package/dist/chunk-RUPNPMP3.js +103 -0
- package/dist/chunk-RUPNPMP3.js.map +1 -0
- package/dist/chunk-VDR2EP6K.js +49 -0
- package/dist/chunk-VDR2EP6K.js.map +1 -0
- package/dist/chunk-WEVYKZIF.js +33 -0
- package/dist/chunk-WEVYKZIF.js.map +1 -0
- package/dist/command.d.ts +7 -7
- package/dist/command.js +3 -2
- package/dist/command.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +2 -1
- package/dist/confirm-button.js.map +1 -1
- package/dist/{dialog-GQ4Nvuyf.d.ts → dialog-D42QwYb_.d.ts} +11 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +3 -2
- package/dist/dialog.js.map +1 -1
- package/dist/glow-card.d.ts +20 -0
- package/dist/glow-card.js +30 -0
- package/dist/glow-card.js.map +1 -0
- package/dist/index.d.ts +2 -20
- package/dist/index.js +7 -64
- package/dist/index.js.map +1 -1
- package/dist/iso.d.ts +400 -0
- package/dist/iso.js +363 -0
- package/dist/iso.js.map +1 -0
- package/dist/loader.d.ts +206 -0
- package/dist/loader.js +138 -0
- package/dist/loader.js.map +1 -0
- package/dist/marquee.d.ts +33 -0
- package/dist/marquee.js +52 -0
- package/dist/marquee.js.map +1 -0
- package/dist/mascots.d.ts +40 -0
- package/dist/mascots.js +253 -0
- package/dist/mascots.js.map +1 -0
- package/dist/meter.d.ts +146 -0
- package/dist/meter.js +107 -0
- package/dist/meter.js.map +1 -0
- package/dist/motion.css +394 -3
- package/dist/motion.d.ts +46 -0
- package/dist/motion.js +10 -0
- package/dist/motion.js.map +1 -0
- package/dist/native.d.ts +40 -1
- package/dist/native.js +326 -128
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +178 -0
- package/dist/nav-bar.js +157 -0
- package/dist/nav-bar.js.map +1 -0
- package/dist/number-ticker.d.ts +32 -0
- package/dist/number-ticker.js +61 -0
- package/dist/number-ticker.js.map +1 -0
- package/dist/progress.d.ts +56 -1
- package/dist/progress.js +72 -25
- package/dist/progress.js.map +1 -1
- package/dist/skeleton.d.ts +18 -3
- package/dist/skeleton.js +9 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/spinner.d.ts +21 -5
- package/dist/spinner.js +13 -12
- package/dist/spinner.js.map +1 -1
- package/dist/stepper.d.ts +112 -0
- package/dist/stepper.js +67 -0
- package/dist/stepper.js.map +1 -0
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +14 -8
- package/dist/tabs.js.map +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +39 -4
- package/dist/toast.js +81 -7
- package/dist/toast.js.map +1 -1
- package/package.json +159 -9
- package/registry/alert.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +232 -26
- package/registry/card.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +158 -0
- package/registry/chip.json +1 -1
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +91 -7
- package/registry/countdown.json +1 -1
- package/registry/dialog.json +15 -7
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/button/error.js +11 -0
- package/registry/examples/button/error.tsx +10 -0
- package/registry/examples/button/loading.tsx +1 -1
- package/registry/examples/button/save-flow.d.ts +4 -0
- package/registry/examples/button/save-flow.js +28 -0
- package/registry/examples/button/save-flow.tsx +24 -0
- package/registry/examples/button/signature.d.ts +4 -0
- package/registry/examples/button/signature.js +17 -0
- package/registry/examples/button/signature.tsx +19 -0
- package/registry/examples/button/upload-progress.d.ts +4 -0
- package/registry/examples/button/upload-progress.js +23 -0
- package/registry/examples/button/upload-progress.tsx +26 -0
- package/registry/examples/chip-link/filters.d.ts +4 -0
- package/registry/examples/chip-link/filters.js +12 -0
- package/registry/examples/chip-link/filters.tsx +17 -0
- package/registry/examples/dialog/left.d.ts +4 -0
- package/registry/examples/dialog/left.js +22 -0
- package/registry/examples/dialog/left.tsx +32 -0
- package/registry/examples/glow-card/link-card.d.ts +4 -0
- package/registry/examples/glow-card/link-card.js +14 -0
- package/registry/examples/glow-card/link-card.tsx +13 -0
- package/registry/examples/glow-card/plans.d.ts +4 -0
- package/registry/examples/glow-card/plans.js +25 -0
- package/registry/examples/glow-card/plans.tsx +26 -0
- package/registry/examples/glow-card/spotlight.d.ts +4 -0
- package/registry/examples/glow-card/spotlight.js +14 -0
- package/registry/examples/glow-card/spotlight.tsx +15 -0
- package/registry/examples/iso/compose.d.ts +4 -0
- package/registry/examples/iso/compose.js +22 -0
- package/registry/examples/iso/compose.tsx +19 -0
- package/registry/examples/iso/orazaka-hero.d.ts +4 -0
- package/registry/examples/iso/orazaka-hero.js +26 -0
- package/registry/examples/iso/orazaka-hero.tsx +21 -0
- package/registry/examples/iso/orochia-hero.d.ts +4 -0
- package/registry/examples/iso/orochia-hero.js +29 -0
- package/registry/examples/iso/orochia-hero.tsx +23 -0
- package/registry/examples/iso/still.d.ts +4 -0
- package/registry/examples/iso/still.js +21 -0
- package/registry/examples/iso/still.tsx +15 -0
- package/registry/examples/loader/endings.d.ts +4 -0
- package/registry/examples/loader/endings.js +14 -0
- package/registry/examples/loader/endings.tsx +11 -0
- package/registry/examples/loader/fetch-flow.d.ts +4 -0
- package/registry/examples/loader/fetch-flow.js +24 -0
- package/registry/examples/loader/fetch-flow.tsx +24 -0
- package/registry/examples/loader/minimal.d.ts +4 -0
- package/registry/examples/loader/minimal.js +11 -0
- package/registry/examples/loader/minimal.tsx +6 -0
- package/registry/examples/loader/overlay.d.ts +4 -0
- package/registry/examples/loader/overlay.js +16 -0
- package/registry/examples/loader/overlay.tsx +13 -0
- package/registry/examples/loader/region-handover.d.ts +4 -0
- package/registry/examples/loader/region-handover.js +42 -0
- package/registry/examples/loader/region-handover.tsx +29 -0
- package/registry/examples/loader/upload-eta.d.ts +4 -0
- package/registry/examples/loader/upload-eta.js +11 -0
- package/registry/examples/loader/upload-eta.tsx +10 -0
- package/registry/examples/marquee/cards.d.ts +4 -0
- package/registry/examples/marquee/cards.js +23 -0
- package/registry/examples/marquee/cards.tsx +21 -0
- package/registry/examples/marquee/logos.d.ts +4 -0
- package/registry/examples/marquee/logos.js +12 -0
- package/registry/examples/marquee/logos.tsx +17 -0
- package/registry/examples/mascots/empty-state.d.ts +4 -0
- package/registry/examples/mascots/empty-state.js +24 -0
- package/registry/examples/mascots/empty-state.tsx +18 -0
- package/registry/examples/mascots/flock.d.ts +4 -0
- package/registry/examples/mascots/flock.js +14 -0
- package/registry/examples/mascots/flock.tsx +15 -0
- package/registry/examples/mascots/long-task.d.ts +4 -0
- package/registry/examples/mascots/long-task.js +18 -0
- package/registry/examples/mascots/long-task.tsx +15 -0
- package/registry/examples/mascots/moods.d.ts +4 -0
- package/registry/examples/mascots/moods.js +14 -0
- package/registry/examples/mascots/moods.tsx +15 -0
- package/registry/examples/mascots/native/default.d.ts +4 -0
- package/registry/examples/mascots/native/default.dark.png +0 -0
- package/registry/examples/mascots/native/default.js +25 -0
- package/registry/examples/mascots/native/default.light.png +0 -0
- package/registry/examples/mascots/native/default.tsx +22 -0
- package/registry/examples/mascots/own-tone.d.ts +4 -0
- package/registry/examples/mascots/own-tone.js +11 -0
- package/registry/examples/mascots/own-tone.tsx +12 -0
- package/registry/examples/meter/balance.d.ts +4 -0
- package/registry/examples/meter/balance.js +14 -0
- package/registry/examples/meter/balance.tsx +15 -0
- package/registry/examples/meter/quota.d.ts +4 -0
- package/registry/examples/meter/quota.js +15 -0
- package/registry/examples/meter/quota.tsx +12 -0
- package/registry/examples/meter/split.d.ts +4 -0
- package/registry/examples/meter/split.js +18 -0
- package/registry/examples/meter/split.tsx +18 -0
- package/registry/examples/nav-bar/app-bar.d.ts +4 -0
- package/registry/examples/nav-bar/app-bar.js +22 -0
- package/registry/examples/nav-bar/app-bar.tsx +21 -0
- package/registry/examples/nav-bar/menu-open.d.ts +4 -0
- package/registry/examples/nav-bar/menu-open.js +26 -0
- package/registry/examples/nav-bar/menu-open.tsx +26 -0
- package/registry/examples/nav-bar/site.d.ts +4 -0
- package/registry/examples/nav-bar/site.js +31 -0
- package/registry/examples/nav-bar/site.tsx +36 -0
- package/registry/examples/number-ticker/gradient.d.ts +4 -0
- package/registry/examples/number-ticker/gradient.js +11 -0
- package/registry/examples/number-ticker/gradient.tsx +10 -0
- package/registry/examples/number-ticker/live-total.d.ts +4 -0
- package/registry/examples/number-ticker/live-total.js +17 -0
- package/registry/examples/number-ticker/live-total.tsx +21 -0
- package/registry/examples/number-ticker/stats.d.ts +4 -0
- package/registry/examples/number-ticker/stats.js +19 -0
- package/registry/examples/number-ticker/stats.tsx +23 -0
- package/registry/examples/progress/buffer.d.ts +4 -0
- package/registry/examples/progress/buffer.js +11 -0
- package/registry/examples/progress/buffer.tsx +10 -0
- package/registry/examples/progress/statuses.d.ts +4 -0
- package/registry/examples/progress/statuses.js +14 -0
- package/registry/examples/progress/statuses.tsx +11 -0
- package/registry/examples/progress/steps.d.ts +4 -0
- package/registry/examples/progress/steps.js +14 -0
- package/registry/examples/progress/steps.tsx +13 -0
- package/registry/examples/progress/upload.d.ts +4 -0
- package/registry/examples/progress/upload.js +11 -0
- package/registry/examples/progress/upload.tsx +10 -0
- package/registry/examples/skeleton/paragraph.d.ts +4 -0
- package/registry/examples/skeleton/paragraph.js +14 -0
- package/registry/examples/skeleton/paragraph.tsx +12 -0
- package/registry/examples/skeleton/shape-of-content.d.ts +4 -0
- package/registry/examples/skeleton/shape-of-content.js +23 -0
- package/registry/examples/skeleton/shape-of-content.tsx +26 -0
- package/registry/examples/spinner/default.js +5 -2
- package/registry/examples/spinner/default.tsx +7 -1
- package/registry/examples/spinner/sizes.js +2 -1
- package/registry/examples/spinner/sizes.tsx +2 -0
- package/registry/examples/spinner/value.d.ts +4 -0
- package/registry/examples/spinner/value.js +11 -0
- package/registry/examples/spinner/value.tsx +12 -0
- package/registry/examples/stepper/checkout.d.ts +4 -0
- package/registry/examples/stepper/checkout.js +22 -0
- package/registry/examples/stepper/checkout.tsx +17 -0
- package/registry/examples/stepper/failed.d.ts +4 -0
- package/registry/examples/stepper/failed.js +26 -0
- package/registry/examples/stepper/failed.tsx +21 -0
- package/registry/examples/stepper/job.d.ts +4 -0
- package/registry/examples/stepper/job.js +32 -0
- package/registry/examples/stepper/job.tsx +28 -0
- package/registry/examples/toast/grouped.d.ts +4 -0
- package/registry/examples/toast/grouped.js +21 -0
- package/registry/examples/toast/grouped.tsx +23 -0
- package/registry/examples/toast/undo.d.ts +4 -0
- package/registry/examples/toast/undo.js +29 -0
- package/registry/examples/toast/undo.tsx +30 -0
- package/registry/examples/toast/upload-progress.d.ts +4 -0
- package/registry/examples/toast/upload-progress.js +29 -0
- package/registry/examples/toast/upload-progress.tsx +31 -0
- package/registry/field.json +1 -1
- package/registry/glow-card.json +162 -0
- package/registry/index.json +207 -20
- package/registry/iso.json +1355 -0
- package/registry/kbd.json +1 -1
- package/registry/loader.json +399 -0
- package/registry/marquee.json +225 -0
- package/registry/mascots.json +314 -0
- package/registry/meter.json +324 -0
- package/registry/nav-bar.json +480 -0
- package/registry/number-ticker.json +219 -0
- package/registry/page-header.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/progress.json +116 -11
- package/registry/radio-group.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +69 -13
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +91 -27
- package/registry/stat.json +1 -1
- package/registry/stepper.json +174 -0
- package/registry/switch.json +1 -1
- package/registry/tabs.json +11 -7
- package/registry/theme.json +3 -3
- package/registry/toast.json +41 -13
- package/registry/tooltip.json +1 -1
- package/dist/chunk-FHYZSO2S.js.map +0 -1
- package/dist/chunk-PESA2R4U.js +0 -51
- package/dist/chunk-PESA2R4U.js.map +0 -1
- package/registry/examples/spinner/muted.js +0 -11
- package/registry/examples/spinner/muted.tsx +0 -6
- /package/registry/examples/{spinner/muted.d.ts → button/error.d.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/iso/orochia-hero.tsx
|
|
4
|
+
import { IsoHub } from "@krizaka/ui/iso";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function IsoOrochiaHero() {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
IsoHub,
|
|
9
|
+
{
|
|
10
|
+
label: "Every support flows to the creator",
|
|
11
|
+
description: "A creator at the centre receives tips, unlocks, auction bids and challenge pledges; 90 % of each goes to them.",
|
|
12
|
+
className: "w-full max-w-xl",
|
|
13
|
+
shape: "hex",
|
|
14
|
+
size: 110,
|
|
15
|
+
layers: [{ label: "Community", height: 16 }, { label: "Creator", height: 44, material: "accent2" }],
|
|
16
|
+
core: "Payouts",
|
|
17
|
+
highlight: { strong: "90 %", text: "to the creator" },
|
|
18
|
+
satellites: [
|
|
19
|
+
{ label: "Tips", glyph: "coin", value: "+ \u20AC5" },
|
|
20
|
+
{ label: "Unlocks", glyph: "lock", value: "+ \u20AC3" },
|
|
21
|
+
{ label: "Auctions", glyph: "arrow", value: "\u20AC120" },
|
|
22
|
+
{ label: "Challenges", glyph: "flag", value: "\u20AC40" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
IsoOrochiaHero as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IsoHub } from "@krizaka/ui/iso";
|
|
2
|
+
|
|
3
|
+
// The creator at the centre; tips, unlocks, auctions and challenges flow toward them — and 90 % stays theirs.
|
|
4
|
+
export default function IsoOrochiaHero() {
|
|
5
|
+
return (
|
|
6
|
+
<IsoHub
|
|
7
|
+
label="Every support flows to the creator"
|
|
8
|
+
description="A creator at the centre receives tips, unlocks, auction bids and challenge pledges; 90 % of each goes to them."
|
|
9
|
+
className="w-full max-w-xl"
|
|
10
|
+
shape="hex"
|
|
11
|
+
size={110}
|
|
12
|
+
layers={[{ label: "Community", height: 16 }, { label: "Creator", height: 44, material: "accent2" }]}
|
|
13
|
+
core="Payouts"
|
|
14
|
+
highlight={{ strong: "90 %", text: "to the creator" }}
|
|
15
|
+
satellites={[
|
|
16
|
+
{ label: "Tips", glyph: "coin", value: "+ €5" },
|
|
17
|
+
{ label: "Unlocks", glyph: "lock", value: "+ €3" },
|
|
18
|
+
{ label: "Auctions", glyph: "arrow", value: "€120" },
|
|
19
|
+
{ label: "Challenges", glyph: "flag", value: "€40" },
|
|
20
|
+
]}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/iso/still.tsx
|
|
4
|
+
import { IsoHub } from "@krizaka/ui/iso";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function IsoStill() {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
IsoHub,
|
|
9
|
+
{
|
|
10
|
+
label: "A server under a dome",
|
|
11
|
+
className: "w-full max-w-sm",
|
|
12
|
+
animated: false,
|
|
13
|
+
dome: true,
|
|
14
|
+
layers: [{}, {}],
|
|
15
|
+
satellites: [{ label: "Requests", glyph: "dots" }, { label: "Files", glyph: "lines", material: "glass" }]
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
IsoStill as default
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsoHub } from "@krizaka/ui/iso";
|
|
2
|
+
|
|
3
|
+
// `animated={false}`: the still frame — the picture prefers-reduced-motion shows, composed, never cut mid-way.
|
|
4
|
+
export default function IsoStill() {
|
|
5
|
+
return (
|
|
6
|
+
<IsoHub
|
|
7
|
+
label="A server under a dome"
|
|
8
|
+
className="w-full max-w-sm"
|
|
9
|
+
animated={false}
|
|
10
|
+
dome
|
|
11
|
+
layers={[{}, {}]}
|
|
12
|
+
satellites={[{ label: "Requests", glyph: "dots" }, { label: "Files", glyph: "lines", material: "glass" }]}
|
|
13
|
+
/>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/endings.tsx
|
|
4
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function LoaderEndings() {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Loader, { status: "success", label: "Publishing", successLabel: "Published", endDuration: Infinity, delay: 0, minDuration: 0 }),
|
|
9
|
+
/* @__PURE__ */ jsx(Loader, { status: "error", label: "Publishing", errorLabel: "Could not publish \u2014 check your connection", endDuration: Infinity, delay: 0, minDuration: 0 })
|
|
10
|
+
] });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
LoaderEndings as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
2
|
+
|
|
3
|
+
// How a wait ends: drawn (a check or a cross in the status colour) and announced in words.
|
|
4
|
+
export default function LoaderEndings() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="flex flex-col gap-3">
|
|
7
|
+
<Loader status="success" label="Publishing" successLabel="Published" endDuration={Infinity} delay={0} minDuration={0} />
|
|
8
|
+
<Loader status="error" label="Publishing" errorLabel="Could not publish — check your connection" endDuration={Infinity} delay={0} minDuration={0} />
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/fetch-flow.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function LoaderFetchFlow() {
|
|
9
|
+
const [status, setStatus] = useState("idle");
|
|
10
|
+
const run = (ms) => {
|
|
11
|
+
setStatus("loading");
|
|
12
|
+
setTimeout(() => setStatus("success"), ms);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => run(150), children: "Fast answer" }),
|
|
17
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => run(2500), children: "Slow answer" })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsx("div", { className: "h-10", children: status !== "idle" && /* @__PURE__ */ jsx(Loader, { status, label: "Loading your invoices", successLabel: "12 invoices loaded" }) })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
LoaderFetchFlow as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "@krizaka/ui/button";
|
|
3
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
|
|
6
|
+
// Try both: a fast answer (150 ms) shows nothing at all; a slow one shows the wait, then a check, then nothing.
|
|
7
|
+
export default function LoaderFetchFlow() {
|
|
8
|
+
const [status, setStatus] = useState<"idle" | "loading" | "success">("idle");
|
|
9
|
+
const run = (ms: number) => {
|
|
10
|
+
setStatus("loading");
|
|
11
|
+
setTimeout(() => setStatus("success"), ms);
|
|
12
|
+
};
|
|
13
|
+
return (
|
|
14
|
+
<div className="flex flex-col gap-4">
|
|
15
|
+
<div className="flex gap-2">
|
|
16
|
+
<Button size="sm" onClick={() => run(150)}>Fast answer</Button>
|
|
17
|
+
<Button size="sm" onClick={() => run(2500)}>Slow answer</Button>
|
|
18
|
+
</div>
|
|
19
|
+
<div className="h-10">
|
|
20
|
+
{status !== "idle" && <Loader status={status} label="Loading your invoices" successLabel="12 invoices loaded" />}
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
);
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/minimal.tsx
|
|
4
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function LoaderMinimal() {
|
|
7
|
+
return /* @__PURE__ */ jsx(Loader, { label: "Loading", delay: 0 });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
LoaderMinimal as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/overlay.tsx
|
|
4
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function LoaderOverlay() {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative w-full max-w-sm rounded-xl border border-border-default bg-surface-1 p-5", children: [
|
|
8
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-fg", children: "Monthly report" }),
|
|
9
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-fg-secondary", children: "Revenue, supporters and payouts for October." }),
|
|
10
|
+
/* @__PURE__ */ jsx("div", { className: "mt-4 h-24 rounded-lg bg-surface-2" }),
|
|
11
|
+
/* @__PURE__ */ jsx(Loader, { variant: "overlay", label: "Refreshing the report", eta: "A few seconds", delay: 0 })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
LoaderOverlay as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
2
|
+
|
|
3
|
+
// Over a region that stays readable behind frosted glass: `variant="overlay"` in a `relative` parent.
|
|
4
|
+
export default function LoaderOverlay() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="relative w-full max-w-sm rounded-xl border border-border-default bg-surface-1 p-5">
|
|
7
|
+
<p className="font-semibold text-fg">Monthly report</p>
|
|
8
|
+
<p className="mt-1 text-sm text-fg-secondary">Revenue, supporters and payouts for October.</p>
|
|
9
|
+
<div className="mt-4 h-24 rounded-lg bg-surface-2" />
|
|
10
|
+
<Loader variant="overlay" label="Refreshing the report" eta="A few seconds" delay={0} />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/region-handover.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { LoadingRegion } from "@krizaka/ui/loader";
|
|
6
|
+
import { Skeleton } from "@krizaka/ui/skeleton";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function LoaderRegionHandover() {
|
|
10
|
+
const [loading, setLoading] = useState(false);
|
|
11
|
+
const card = "flex items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-4";
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-sm flex-col gap-3", children: [
|
|
13
|
+
/* @__PURE__ */ jsx(
|
|
14
|
+
LoadingRegion,
|
|
15
|
+
{
|
|
16
|
+
loading,
|
|
17
|
+
label: "Loading the creator",
|
|
18
|
+
slowLabel: "Still loading \u2014 the server is busy",
|
|
19
|
+
slowAfter: 2500,
|
|
20
|
+
delay: 0,
|
|
21
|
+
skeleton: /* @__PURE__ */ jsxs("div", { className: card, children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Skeleton, { shape: "circle" }),
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col gap-2", children: [
|
|
24
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-1/2" }),
|
|
25
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-3/4" })
|
|
26
|
+
] })
|
|
27
|
+
] }),
|
|
28
|
+
children: /* @__PURE__ */ jsxs("div", { className: card, children: [
|
|
29
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-10 w-10 rounded-full bg-accent-soft" }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
31
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-fg", children: "Eric Moreau" }),
|
|
32
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-fg-secondary", children: "1,204 supporters" })
|
|
33
|
+
] })
|
|
34
|
+
] })
|
|
35
|
+
}
|
|
36
|
+
),
|
|
37
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: () => setLoading((l) => !l), children: loading ? "Finish loading" : "Load again" })
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
export {
|
|
41
|
+
LoaderRegionHandover as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button } from "@krizaka/ui/button";
|
|
3
|
+
import { LoadingRegion } from "@krizaka/ui/loader";
|
|
4
|
+
import { Skeleton } from "@krizaka/ui/skeleton";
|
|
5
|
+
import { useState } from "react";
|
|
6
|
+
|
|
7
|
+
// Press “Load again”: the region hands over — a skeleton of its shape → words when it lasts → the content, fading in.
|
|
8
|
+
export default function LoaderRegionHandover() {
|
|
9
|
+
const [loading, setLoading] = useState(false);
|
|
10
|
+
const card = "flex items-center gap-3 rounded-xl border border-border-default bg-surface-1 p-4";
|
|
11
|
+
return (
|
|
12
|
+
<div className="flex w-full max-w-sm flex-col gap-3">
|
|
13
|
+
<LoadingRegion
|
|
14
|
+
loading={loading}
|
|
15
|
+
label="Loading the creator"
|
|
16
|
+
slowLabel="Still loading — the server is busy"
|
|
17
|
+
slowAfter={2500}
|
|
18
|
+
delay={0}
|
|
19
|
+
skeleton={<div className={card}><Skeleton shape="circle" /><div className="flex flex-1 flex-col gap-2"><Skeleton className="w-1/2" /><Skeleton className="w-3/4" /></div></div>}
|
|
20
|
+
>
|
|
21
|
+
<div className={card}>
|
|
22
|
+
<span aria-hidden className="h-10 w-10 rounded-full bg-accent-soft" />
|
|
23
|
+
<div><p className="font-semibold text-fg">Eric Moreau</p><p className="text-sm text-fg-secondary">1,204 supporters</p></div>
|
|
24
|
+
</div>
|
|
25
|
+
</LoadingRegion>
|
|
26
|
+
<Button size="sm" onClick={() => setLoading((l) => !l)}>{loading ? "Finish loading" : "Load again"}</Button>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/loader/upload-eta.tsx
|
|
4
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function LoaderUploadEta() {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "w-full max-w-sm rounded-xl border border-border-default bg-surface-1 p-4", children: /* @__PURE__ */ jsx(Loader, { label: "Uploading \u201CNight walk.mp4\u201D", value: 0.62, eta: "About 40 s left", delay: 0 }) });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
LoaderUploadEta as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Loader } from "@krizaka/ui/loader";
|
|
2
|
+
|
|
3
|
+
// A determinate wait with its time left: the trace grows, the percentage and the ETA read in tabular figures.
|
|
4
|
+
export default function LoaderUploadEta() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="w-full max-w-sm rounded-xl border border-border-default bg-surface-1 p-4">
|
|
7
|
+
<Loader label="Uploading “Night walk.mp4”" value={0.62} eta="About 40 s left" delay={0} />
|
|
8
|
+
</div>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/marquee/cards.tsx
|
|
4
|
+
import { Marquee } from "@krizaka/ui/marquee";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var quotes = [
|
|
7
|
+
{ who: "Maya, illustrator", text: "My supporters see exactly where their tip goes." },
|
|
8
|
+
{ who: "Eric, filmmaker", text: "I sold a cut to the highest bidder, live." },
|
|
9
|
+
{ who: "Sam, musician", text: "90 % to me \u2014 and it shows on every payout." }
|
|
10
|
+
];
|
|
11
|
+
function MarqueeCards() {
|
|
12
|
+
return /* @__PURE__ */ jsx(Marquee, { label: "What creators say", pauseLabel: "Pause", playLabel: "Play", direction: "right", speed: 24, className: "w-full max-w-2xl", children: quotes.map((q) => /* @__PURE__ */ jsxs("figure", { className: "w-72 rounded-xl border border-border-default bg-surface-1 p-4", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("blockquote", { className: "text-sm text-fg", children: [
|
|
14
|
+
"\u201C",
|
|
15
|
+
q.text,
|
|
16
|
+
"\u201D"
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsx("figcaption", { className: "mt-2 text-xs text-fg-secondary", children: q.who })
|
|
19
|
+
] }, q.who)) });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
MarqueeCards as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Marquee } from "@krizaka/ui/marquee";
|
|
2
|
+
|
|
3
|
+
const quotes = [
|
|
4
|
+
{ who: "Maya, illustrator", text: "My supporters see exactly where their tip goes." },
|
|
5
|
+
{ who: "Eric, filmmaker", text: "I sold a cut to the highest bidder, live." },
|
|
6
|
+
{ who: "Sam, musician", text: "90 % to me — and it shows on every payout." },
|
|
7
|
+
];
|
|
8
|
+
|
|
9
|
+
// Cards sliding the other way, slower; each card's text is read once (the copy is hidden from assistive technology).
|
|
10
|
+
export default function MarqueeCards() {
|
|
11
|
+
return (
|
|
12
|
+
<Marquee label="What creators say" pauseLabel="Pause" playLabel="Play" direction="right" speed={24} className="w-full max-w-2xl">
|
|
13
|
+
{quotes.map((q) => (
|
|
14
|
+
<figure key={q.who} className="w-72 rounded-xl border border-border-default bg-surface-1 p-4">
|
|
15
|
+
<blockquote className="text-sm text-fg">“{q.text}”</blockquote>
|
|
16
|
+
<figcaption className="mt-2 text-xs text-fg-secondary">{q.who}</figcaption>
|
|
17
|
+
</figure>
|
|
18
|
+
))}
|
|
19
|
+
</Marquee>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/marquee/logos.tsx
|
|
4
|
+
import { Marquee } from "@krizaka/ui/marquee";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var names = ["Postgres", "Ollama", "Spring", "Kafka", "Keycloak", "Qdrant", "MinIO", "Grafana"];
|
|
7
|
+
function MarqueeLogos() {
|
|
8
|
+
return /* @__PURE__ */ jsx(Marquee, { label: "Built on open source", pauseLabel: "Pause the band", playLabel: "Play the band", className: "w-full max-w-2xl", children: names.map((name) => /* @__PURE__ */ jsx("span", { className: "font-display text-lg font-semibold text-fg-secondary", children: name }, name)) });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
MarqueeLogos as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Marquee } from "@krizaka/ui/marquee";
|
|
2
|
+
|
|
3
|
+
const names = ["Postgres", "Ollama", "Spring", "Kafka", "Keycloak", "Qdrant", "MinIO", "Grafana"];
|
|
4
|
+
|
|
5
|
+
// A band of names at 40 px/s: it pauses under the pointer or the focus, and its pause button (top right, on hover or
|
|
6
|
+
// focus) stops it for good. Under reduced motion it is a still row you scroll.
|
|
7
|
+
export default function MarqueeLogos() {
|
|
8
|
+
return (
|
|
9
|
+
<Marquee label="Built on open source" pauseLabel="Pause the band" playLabel="Play the band" className="w-full max-w-2xl">
|
|
10
|
+
{names.map((name) => (
|
|
11
|
+
<span key={name} className="font-display text-lg font-semibold text-fg-secondary">
|
|
12
|
+
{name}
|
|
13
|
+
</span>
|
|
14
|
+
))}
|
|
15
|
+
</Marquee>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/mascots/empty-state.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { EmptyState } from "@krizaka/ui/empty-state";
|
|
6
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
function MascotEmptyState() {
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-96 flex-col items-center", children: [
|
|
10
|
+
/* @__PURE__ */ jsx(Mascot, { bird: "owl", mood: "empty", size: 112 }),
|
|
11
|
+
/* @__PURE__ */ jsx(
|
|
12
|
+
EmptyState,
|
|
13
|
+
{
|
|
14
|
+
className: "border-none pt-2",
|
|
15
|
+
title: "No documents checked yet",
|
|
16
|
+
description: "Drop a contract or an invoice: every finding comes with the passage it rests on.",
|
|
17
|
+
action: /* @__PURE__ */ jsx(Button, { variant: "primary", children: "Check a document" })
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
MascotEmptyState as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Button } from "@krizaka/ui/button";
|
|
2
|
+
import { EmptyState } from "@krizaka/ui/empty-state";
|
|
3
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
4
|
+
|
|
5
|
+
// The owl reads documents: it waits above an empty list; the words and the action say what to do.
|
|
6
|
+
export default function MascotEmptyState() {
|
|
7
|
+
return (
|
|
8
|
+
<div className="flex w-96 flex-col items-center">
|
|
9
|
+
<Mascot bird="owl" mood="empty" size={112} />
|
|
10
|
+
<EmptyState
|
|
11
|
+
className="border-none pt-2"
|
|
12
|
+
title="No documents checked yet"
|
|
13
|
+
description="Drop a contract or an invoice: every finding comes with the passage it rests on."
|
|
14
|
+
action={<Button variant="primary">Check a document</Button>}
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/mascots/flock.tsx
|
|
4
|
+
import { Mascot, MASCOT_BIRDS } from "@krizaka/ui/mascots";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function MascotFlock() {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-end gap-6", children: MASCOT_BIRDS.map((bird) => /* @__PURE__ */ jsxs("figure", { className: "flex flex-col items-center gap-2", children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Mascot, { bird, mood: "welcome", size: 88 }),
|
|
9
|
+
/* @__PURE__ */ jsx("figcaption", { className: "text-xs text-fg-secondary", children: bird })
|
|
10
|
+
] }, bird)) });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
MascotFlock as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mascot,MASCOT_BIRDS } from "@krizaka/ui/mascots";
|
|
2
|
+
|
|
3
|
+
// The five birds in the host's brand colours: blue on Krizaka, orange in Orazaka, violet in Orochia.
|
|
4
|
+
export default function MascotFlock() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="flex flex-wrap items-end gap-6">
|
|
7
|
+
{MASCOT_BIRDS.map((bird) => (
|
|
8
|
+
<figure key={bird} className="flex flex-col items-center gap-2">
|
|
9
|
+
<Mascot bird={bird} mood="welcome" size={88} />
|
|
10
|
+
<figcaption className="text-xs text-fg-secondary">{bird}</figcaption>
|
|
11
|
+
</figure>
|
|
12
|
+
))}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/mascots/long-task.tsx
|
|
4
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
5
|
+
import { Progress } from "@krizaka/ui/progress";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function MascotLongTask() {
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-96 items-center gap-4 rounded-xl border border-border-default bg-surface-1 p-4", children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Mascot, { bird: "pigeon", mood: "thinking", size: 72 }),
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
11
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium text-fg", children: "Rendering the product video" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Progress, { label: "Rendering", value: 42, className: "mt-2" })
|
|
13
|
+
] })
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
MascotLongTask as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mascot } from "@krizaka/ui/mascots";
|
|
2
|
+
import { Progress } from "@krizaka/ui/progress";
|
|
3
|
+
|
|
4
|
+
// A job of a few minutes: the pigeon thinks beside its progress; the label says what runs.
|
|
5
|
+
export default function MascotLongTask() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="flex w-96 items-center gap-4 rounded-xl border border-border-default bg-surface-1 p-4">
|
|
8
|
+
<Mascot bird="pigeon" mood="thinking" size={72} />
|
|
9
|
+
<div className="flex-1">
|
|
10
|
+
<p className="text-sm font-medium text-fg">Rendering the product video</p>
|
|
11
|
+
<Progress label="Rendering" value={42} className="mt-2" />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/mascots/moods.tsx
|
|
4
|
+
import { Mascot, MASCOT_MOODS } from "@krizaka/ui/mascots";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function MascotMoods() {
|
|
7
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-wrap items-end gap-6", children: MASCOT_MOODS.map((mood) => /* @__PURE__ */ jsxs("figure", { className: "flex flex-col items-center gap-2", children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Mascot, { bird: "owl", mood, size: 88 }),
|
|
9
|
+
/* @__PURE__ */ jsx("figcaption", { className: "text-xs text-fg-secondary", children: mood })
|
|
10
|
+
] }, mood)) });
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
MascotMoods as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Mascot,MASCOT_MOODS } from "@krizaka/ui/mascots";
|
|
2
|
+
|
|
3
|
+
// One bird, its five moods: a welcome, a long wait, a success, an empty list, an error.
|
|
4
|
+
export default function MascotMoods() {
|
|
5
|
+
return (
|
|
6
|
+
<div className="flex flex-wrap items-end gap-6">
|
|
7
|
+
{MASCOT_MOODS.map((mood) => (
|
|
8
|
+
<figure key={mood} className="flex flex-col items-center gap-2">
|
|
9
|
+
<Mascot bird="owl" mood={mood} size={88} />
|
|
10
|
+
<figcaption className="text-xs text-fg-secondary">{mood}</figcaption>
|
|
11
|
+
</figure>
|
|
12
|
+
))}
|
|
13
|
+
</div>
|
|
14
|
+
);
|
|
15
|
+
}
|