@krizaka/ui 2.8.0 → 2.10.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 +73 -5
- package/dist/achievement.d.ts +54 -0
- package/dist/achievement.js +73 -0
- package/dist/achievement.js.map +1 -0
- package/dist/app-shell.d.ts +203 -0
- package/dist/app-shell.js +137 -0
- package/dist/app-shell.js.map +1 -0
- package/dist/auth-layout.d.ts +136 -0
- package/dist/auth-layout.js +75 -0
- package/dist/auth-layout.js.map +1 -0
- package/dist/blocks.css +247 -0
- package/dist/catalogue-page.d.ts +34 -0
- package/dist/catalogue-page.js +26 -0
- package/dist/catalogue-page.js.map +1 -0
- package/dist/changelog-page.d.ts +50 -0
- package/dist/changelog-page.js +27 -0
- package/dist/changelog-page.js.map +1 -0
- package/dist/choice-grid.d.ts +84 -0
- package/dist/choice-grid.js +141 -0
- package/dist/choice-grid.js.map +1 -0
- package/dist/chunk-555LWYIN.js +11 -0
- package/dist/chunk-555LWYIN.js.map +1 -0
- package/dist/chunk-AZPKXP3O.js +36 -0
- package/dist/chunk-AZPKXP3O.js.map +1 -0
- package/dist/{chunk-NOVUREEC.js → chunk-JZPVUJIX.js} +25 -3
- package/dist/chunk-JZPVUJIX.js.map +1 -0
- package/dist/chunk-KNBYZGSQ.js +11 -0
- package/dist/chunk-KNBYZGSQ.js.map +1 -0
- package/dist/chunk-VCAAHCHL.js +17 -0
- package/dist/chunk-VCAAHCHL.js.map +1 -0
- package/dist/code-block.js +23 -44
- package/dist/code-block.js.map +1 -1
- package/dist/component-page.d.ts +41 -0
- package/dist/component-page.js +17 -0
- package/dist/component-page.js.map +1 -0
- package/dist/contact-page.d.ts +31 -0
- package/dist/contact-page.js +26 -0
- package/dist/contact-page.js.map +1 -0
- package/dist/continue-prompt.d.ts +48 -0
- package/dist/continue-prompt.js +200 -0
- package/dist/continue-prompt.js.map +1 -0
- package/dist/dashboard-layout.d.ts +139 -0
- package/dist/dashboard-layout.js +68 -0
- package/dist/dashboard-layout.js.map +1 -0
- package/dist/detail-layout.d.ts +126 -0
- package/dist/detail-layout.js +48 -0
- package/dist/detail-layout.js.map +1 -0
- package/dist/docs-article-page.d.ts +54 -0
- package/dist/docs-article-page.js +29 -0
- package/dist/docs-article-page.js.map +1 -0
- package/dist/docs-hub-page.d.ts +72 -0
- package/dist/docs-hub-page.js +45 -0
- package/dist/docs-hub-page.js.map +1 -0
- package/dist/docs-layout.d.ts +78 -0
- package/dist/docs-layout.js +60 -0
- package/dist/docs-layout.js.map +1 -0
- package/dist/error-page.d.ts +22 -0
- package/dist/error-page.js +23 -0
- package/dist/error-page.js.map +1 -0
- package/dist/gallery-page.d.ts +50 -0
- package/dist/gallery-page.js +30 -0
- package/dist/gallery-page.js.map +1 -0
- package/dist/{geometry-CXrAW34x.d.ts → geometry-CbOU4rtL.d.ts} +4 -4
- package/dist/goal-gauge.d.ts +38 -0
- package/dist/goal-gauge.js +53 -0
- package/dist/goal-gauge.js.map +1 -0
- package/dist/how-it-works-page.d.ts +48 -0
- package/dist/how-it-works-page.js +28 -0
- package/dist/how-it-works-page.js.map +1 -0
- package/dist/index.d.ts +16 -6
- package/dist/index.js +115 -24
- package/dist/index.js.map +1 -1
- package/dist/landing-page.d.ts +58 -0
- package/dist/landing-page.js +42 -0
- package/dist/landing-page.js.map +1 -0
- package/dist/landscape.d.ts +41 -0
- package/dist/landscape.js +836 -0
- package/dist/landscape.js.map +1 -0
- package/dist/legal-page.d.ts +34 -0
- package/dist/legal-page.js +18 -0
- package/dist/legal-page.js.map +1 -0
- package/dist/longform-page.d.ts +42 -0
- package/dist/longform-page.js +29 -0
- package/dist/longform-page.js.map +1 -0
- package/dist/marketing-layout.d.ts +60 -0
- package/dist/marketing-layout.js +25 -0
- package/dist/marketing-layout.js.map +1 -0
- package/dist/mascot-quote.d.ts +4 -4
- package/dist/mascot-quote.js +23 -1
- package/dist/mascot-quote.js.map +1 -1
- package/dist/mascot-state.d.ts +2 -2
- package/dist/mascot-state.js +1 -1
- package/dist/mascot-state.js.map +1 -1
- package/dist/mascots.d.ts +18 -5
- package/dist/mascots.js +87 -2
- package/dist/mascots.js.map +1 -1
- package/dist/native.d.ts +88 -11
- package/dist/native.js +640 -297
- package/dist/native.js.map +1 -1
- package/dist/pricing-page.d.ts +62 -0
- package/dist/pricing-page.js +71 -0
- package/dist/pricing-page.js.map +1 -0
- package/dist/product-page.d.ts +83 -0
- package/dist/product-page.js +60 -0
- package/dist/product-page.js.map +1 -0
- package/dist/profile-card.d.ts +85 -0
- package/dist/profile-card.js +87 -0
- package/dist/profile-card.js.map +1 -0
- package/dist/promise-card.d.ts +28 -0
- package/dist/promise-card.js +29 -0
- package/dist/promise-card.js.map +1 -0
- package/dist/scroll-stage.d.ts +603 -0
- package/dist/scroll-stage.js +59 -0
- package/dist/scroll-stage.js.map +1 -0
- package/dist/settings-layout.d.ts +154 -0
- package/dist/settings-layout.js +57 -0
- package/dist/settings-layout.js.map +1 -0
- package/dist/split-view.d.ts +106 -0
- package/dist/split-view.js +41 -0
- package/dist/split-view.js.map +1 -0
- package/dist/stage-banner.d.ts +34 -0
- package/dist/stage-banner.js +26 -0
- package/dist/stage-banner.js.map +1 -0
- package/dist/status-page.d.ts +42 -0
- package/dist/status-page.js +28 -0
- package/dist/status-page.js.map +1 -0
- package/dist/story-variant-CLn4H5Nt.d.ts +4 -0
- package/dist/story.css +432 -0
- package/package.json +478 -10
- package/registry/achievement.json +322 -0
- package/registry/action-bar.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +451 -0
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +230 -0
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +5 -5
- package/registry/card-grid.json +5 -5
- package/registry/card.json +3 -3
- package/registry/catalogue-page.json +240 -0
- package/registry/changelog-page.json +226 -0
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +318 -0
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/component-page.json +227 -0
- package/registry/confirm-button.json +3 -3
- package/registry/contact-page.json +212 -0
- package/registry/continue-prompt.json +312 -0
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +273 -0
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/detail-layout.json +233 -0
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +242 -0
- package/registry/docs-hub-page.json +270 -0
- package/registry/docs-layout.json +148 -0
- package/registry/dropdown-menu.json +3 -3
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +183 -0
- package/registry/examples/achievement/arcade.d.ts +4 -0
- package/registry/examples/achievement/arcade.js +15 -0
- package/registry/examples/achievement/arcade.tsx +12 -0
- package/registry/examples/achievement/milestones.d.ts +4 -0
- package/registry/examples/achievement/milestones.js +15 -0
- package/registry/examples/achievement/milestones.tsx +12 -0
- package/registry/examples/app-shell/admin-console.d.ts +4 -0
- package/registry/examples/app-shell/admin-console.js +52 -0
- package/registry/examples/app-shell/admin-console.tsx +64 -0
- package/registry/examples/app-shell/basic.d.ts +4 -0
- package/registry/examples/app-shell/basic.js +37 -0
- package/registry/examples/app-shell/basic.tsx +31 -0
- package/registry/examples/app-shell/orochia-studio.d.ts +4 -0
- package/registry/examples/app-shell/orochia-studio.js +89 -0
- package/registry/examples/app-shell/orochia-studio.tsx +101 -0
- package/registry/examples/auth-layout/onboarding.d.ts +4 -0
- package/registry/examples/auth-layout/onboarding.js +56 -0
- package/registry/examples/auth-layout/onboarding.tsx +47 -0
- package/registry/examples/auth-layout/sign-in.d.ts +4 -0
- package/registry/examples/auth-layout/sign-in.js +55 -0
- package/registry/examples/auth-layout/sign-in.tsx +47 -0
- package/registry/examples/auth-layout/verify.d.ts +4 -0
- package/registry/examples/auth-layout/verify.js +23 -0
- package/registry/examples/auth-layout/verify.tsx +19 -0
- package/registry/examples/catalogue-page/components.d.ts +4 -0
- package/registry/examples/catalogue-page/components.js +33 -0
- package/registry/examples/catalogue-page/components.tsx +36 -0
- package/registry/examples/changelog-page/releases.d.ts +4 -0
- package/registry/examples/changelog-page/releases.js +44 -0
- package/registry/examples/changelog-page/releases.tsx +39 -0
- package/registry/examples/choice-grid/line-up.d.ts +4 -0
- package/registry/examples/choice-grid/line-up.js +37 -0
- package/registry/examples/choice-grid/line-up.tsx +32 -0
- package/registry/examples/choice-grid/plans.d.ts +4 -0
- package/registry/examples/choice-grid/plans.js +28 -0
- package/registry/examples/choice-grid/plans.tsx +24 -0
- package/registry/examples/component-page/button.d.ts +4 -0
- package/registry/examples/component-page/button.js +33 -0
- package/registry/examples/component-page/button.tsx +30 -0
- package/registry/examples/contact-page/team.d.ts +4 -0
- package/registry/examples/contact-page/team.js +39 -0
- package/registry/examples/contact-page/team.tsx +38 -0
- package/registry/examples/continue-prompt/arcade.d.ts +4 -0
- package/registry/examples/continue-prompt/arcade.js +28 -0
- package/registry/examples/continue-prompt/arcade.tsx +25 -0
- package/registry/examples/continue-prompt/offer.d.ts +4 -0
- package/registry/examples/continue-prompt/offer.js +24 -0
- package/registry/examples/continue-prompt/offer.tsx +19 -0
- package/registry/examples/dashboard-layout/orazaka-eric.d.ts +4 -0
- package/registry/examples/dashboard-layout/orazaka-eric.js +58 -0
- package/registry/examples/dashboard-layout/orazaka-eric.tsx +80 -0
- package/registry/examples/dashboard-layout/widgets.d.ts +4 -0
- package/registry/examples/dashboard-layout/widgets.js +17 -0
- package/registry/examples/dashboard-layout/widgets.tsx +22 -0
- package/registry/examples/detail-layout/job.d.ts +4 -0
- package/registry/examples/detail-layout/job.js +25 -0
- package/registry/examples/detail-layout/job.tsx +20 -0
- package/registry/examples/detail-layout/video.d.ts +4 -0
- package/registry/examples/detail-layout/video.js +44 -0
- package/registry/examples/detail-layout/video.tsx +53 -0
- package/registry/examples/docs-article-page/cli.d.ts +4 -0
- package/registry/examples/docs-article-page/cli.js +33 -0
- package/registry/examples/docs-article-page/cli.tsx +38 -0
- package/registry/examples/docs-hub-page/krizaka.d.ts +4 -0
- package/registry/examples/docs-hub-page/krizaka.js +46 -0
- package/registry/examples/docs-hub-page/krizaka.tsx +37 -0
- package/registry/examples/docs-layout/page.d.ts +4 -0
- package/registry/examples/docs-layout/page.js +26 -0
- package/registry/examples/docs-layout/page.tsx +30 -0
- package/registry/examples/error-page/not-found.d.ts +4 -0
- package/registry/examples/error-page/not-found.js +24 -0
- package/registry/examples/error-page/not-found.tsx +19 -0
- package/registry/examples/gallery-page/made-here.d.ts +4 -0
- package/registry/examples/gallery-page/made-here.js +34 -0
- package/registry/examples/gallery-page/made-here.tsx +32 -0
- package/registry/examples/goal-gauge/arcade.d.ts +4 -0
- package/registry/examples/goal-gauge/arcade.js +11 -0
- package/registry/examples/goal-gauge/arcade.tsx +10 -0
- package/registry/examples/goal-gauge/challenge.d.ts +4 -0
- package/registry/examples/goal-gauge/challenge.js +11 -0
- package/registry/examples/goal-gauge/challenge.tsx +10 -0
- package/registry/examples/goal-gauge/drain.d.ts +4 -0
- package/registry/examples/goal-gauge/drain.js +11 -0
- package/registry/examples/goal-gauge/drain.tsx +10 -0
- package/registry/examples/goal-gauge/native/default.d.ts +4 -0
- package/registry/examples/goal-gauge/native/default.dark.png +0 -0
- package/registry/examples/goal-gauge/native/default.js +15 -0
- package/registry/examples/goal-gauge/native/default.light.png +0 -0
- package/registry/examples/goal-gauge/native/default.tsx +12 -0
- package/registry/examples/how-it-works-page/orazaka.d.ts +4 -0
- package/registry/examples/how-it-works-page/orazaka.js +30 -0
- package/registry/examples/how-it-works-page/orazaka.tsx +26 -0
- package/registry/examples/landing-page/krizaka.d.ts +4 -0
- package/registry/examples/landing-page/krizaka.js +44 -0
- package/registry/examples/landing-page/krizaka.tsx +44 -0
- package/registry/examples/landscape/backdrop.d.ts +4 -0
- package/registry/examples/landscape/backdrop.js +14 -0
- package/registry/examples/landscape/backdrop.tsx +11 -0
- package/registry/examples/landscape/brand.d.ts +4 -0
- package/registry/examples/landscape/brand.js +11 -0
- package/registry/examples/landscape/brand.tsx +10 -0
- package/registry/examples/legal-page/privacy.d.ts +4 -0
- package/registry/examples/legal-page/privacy.js +24 -0
- package/registry/examples/legal-page/privacy.tsx +19 -0
- package/registry/examples/longform-page/story.d.ts +4 -0
- package/registry/examples/longform-page/story.js +38 -0
- package/registry/examples/longform-page/story.tsx +35 -0
- package/registry/examples/marketing-layout/basic.d.ts +4 -0
- package/registry/examples/marketing-layout/basic.js +31 -0
- package/registry/examples/marketing-layout/basic.tsx +28 -0
- package/registry/examples/marketing-layout/docs-hub.d.ts +4 -0
- package/registry/examples/marketing-layout/docs-hub.js +37 -0
- package/registry/examples/marketing-layout/docs-hub.tsx +44 -0
- package/registry/examples/marketing-layout/pricing.d.ts +4 -0
- package/registry/examples/marketing-layout/pricing.js +45 -0
- package/registry/examples/marketing-layout/pricing.tsx +55 -0
- package/registry/examples/marketing-layout/product-page.d.ts +4 -0
- package/registry/examples/marketing-layout/product-page.js +79 -0
- package/registry/examples/marketing-layout/product-page.tsx +83 -0
- package/registry/examples/mascots/crane.d.ts +4 -0
- package/registry/examples/mascots/crane.js +19 -0
- package/registry/examples/mascots/crane.tsx +18 -0
- package/registry/examples/mascots/flock.tsx +2 -1
- package/registry/examples/mascots/native/crane.d.ts +4 -0
- package/registry/examples/mascots/native/crane.dark.png +0 -0
- package/registry/examples/mascots/native/crane.js +21 -0
- package/registry/examples/mascots/native/crane.light.png +0 -0
- package/registry/examples/mascots/native/crane.tsx +18 -0
- package/registry/examples/mascots/native/phoenix.d.ts +4 -0
- package/registry/examples/mascots/native/phoenix.dark.png +0 -0
- package/registry/examples/mascots/native/phoenix.js +21 -0
- package/registry/examples/mascots/native/phoenix.light.png +0 -0
- package/registry/examples/mascots/native/phoenix.tsx +18 -0
- package/registry/examples/mascots/phoenix.d.ts +4 -0
- package/registry/examples/mascots/phoenix.js +14 -0
- package/registry/examples/mascots/phoenix.tsx +11 -0
- package/registry/examples/pricing-page/credits.d.ts +4 -0
- package/registry/examples/pricing-page/credits.js +41 -0
- package/registry/examples/pricing-page/credits.tsx +33 -0
- package/registry/examples/product-page/orazaka.d.ts +4 -0
- package/registry/examples/product-page/orazaka.js +44 -0
- package/registry/examples/product-page/orazaka.tsx +36 -0
- package/registry/examples/profile-card/arcade.d.ts +4 -0
- package/registry/examples/profile-card/arcade.js +25 -0
- package/registry/examples/profile-card/arcade.tsx +19 -0
- package/registry/examples/profile-card/creator.d.ts +4 -0
- package/registry/examples/profile-card/creator.js +31 -0
- package/registry/examples/profile-card/creator.tsx +26 -0
- package/registry/examples/profile-card/match.d.ts +4 -0
- package/registry/examples/profile-card/match.js +25 -0
- package/registry/examples/profile-card/match.tsx +19 -0
- package/registry/examples/profile-card/native/default.d.ts +4 -0
- package/registry/examples/profile-card/native/default.dark.png +0 -0
- package/registry/examples/profile-card/native/default.js +27 -0
- package/registry/examples/profile-card/native/default.light.png +0 -0
- package/registry/examples/profile-card/native/default.tsx +22 -0
- package/registry/examples/promise-card/arcade.d.ts +4 -0
- package/registry/examples/promise-card/arcade.js +25 -0
- package/registry/examples/promise-card/arcade.tsx +19 -0
- package/registry/examples/promise-card/guarantee.d.ts +4 -0
- package/registry/examples/promise-card/guarantee.js +23 -0
- package/registry/examples/promise-card/guarantee.tsx +17 -0
- package/registry/examples/scroll-stage/arcade.d.ts +4 -0
- package/registry/examples/scroll-stage/arcade.js +16 -0
- package/registry/examples/scroll-stage/arcade.tsx +15 -0
- package/registry/examples/scroll-stage/chapters.d.ts +4 -0
- package/registry/examples/scroll-stage/chapters.js +25 -0
- package/registry/examples/scroll-stage/chapters.tsx +22 -0
- package/registry/examples/settings-layout/account.d.ts +4 -0
- package/registry/examples/settings-layout/account.js +51 -0
- package/registry/examples/settings-layout/account.tsx +50 -0
- package/registry/examples/settings-layout/sections.d.ts +4 -0
- package/registry/examples/settings-layout/sections.js +27 -0
- package/registry/examples/settings-layout/sections.tsx +24 -0
- package/registry/examples/split-view/empty.d.ts +4 -0
- package/registry/examples/split-view/empty.js +19 -0
- package/registry/examples/split-view/empty.tsx +13 -0
- package/registry/examples/split-view/messages.d.ts +4 -0
- package/registry/examples/split-view/messages.js +49 -0
- package/registry/examples/split-view/messages.tsx +52 -0
- package/registry/examples/stage-banner/round.d.ts +4 -0
- package/registry/examples/stage-banner/round.js +14 -0
- package/registry/examples/stage-banner/round.tsx +11 -0
- package/registry/examples/stage-banner/steps.d.ts +4 -0
- package/registry/examples/stage-banner/steps.js +14 -0
- package/registry/examples/stage-banner/steps.tsx +11 -0
- package/registry/examples/status-page/building.d.ts +4 -0
- package/registry/examples/status-page/building.js +29 -0
- package/registry/examples/status-page/building.tsx +25 -0
- package/registry/examples/status-page/operational.d.ts +4 -0
- package/registry/examples/status-page/operational.js +26 -0
- package/registry/examples/status-page/operational.tsx +20 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/gallery-page.json +256 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +322 -0
- package/registry/how-it-works-page.json +242 -0
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +621 -5
- package/registry/iso.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +242 -0
- package/registry/landscape.json +189 -0
- package/registry/legal-page.json +199 -0
- package/registry/link-card.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +213 -0
- package/registry/marketing-layout.json +172 -0
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +6 -6
- package/registry/mascot-state.json +34 -34
- package/registry/mascots.json +140 -23
- package/registry/media-capture.json +1 -1
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +3 -3
- package/registry/page.json +5 -5
- package/registry/pagination.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +245 -0
- package/registry/product-page.json +319 -0
- package/registry/profile-card.json +501 -0
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +228 -0
- package/registry/radio-group.json +1 -1
- package/registry/scroll-stage.json +197 -0
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +231 -0
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +233 -0
- package/registry/stage-banner.json +221 -0
- package/registry/stat.json +1 -1
- package/registry/status-page.json +263 -0
- package/registry/stepper.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +1 -1
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/dist/chunk-NOVUREEC.js.map +0 -1
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "goal-gauge",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Goal gauge",
|
|
5
|
+
"summary": "A goal counted in steps — 6 of 10 backers, 3 dares done, 3 seats left: a meter whose reached steps light one by one (or whose spent ones drain) when its chapter plays.",
|
|
6
|
+
"description": "A goal counted in steps — 6 of 10 backers, 3 dares done, 3 seats left: a meter whose reached steps light one by one (or whose spent ones drain) when its chapter plays.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "data-display",
|
|
9
|
+
"platforms": "both",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"A challenge's goal, counted in backers, dares or steps.",
|
|
12
|
+
"What is left of something countable: seats, tickets, lives (`mode=\"drain\"`).",
|
|
13
|
+
"On a told page, problems that fall one by one (the arcade boss gauge)."
|
|
14
|
+
],
|
|
15
|
+
"whenNotToUse": [
|
|
16
|
+
{
|
|
17
|
+
"when": "A continuous measure against a range (storage, credits).",
|
|
18
|
+
"use": "meter"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"when": "The progress of a running task.",
|
|
22
|
+
"use": "progress"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"when": "Steps of a flow the person goes through.",
|
|
26
|
+
"use": "stepper"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"bestPractices": [
|
|
30
|
+
"Two to twenty-four steps: beyond, use a `Meter`.",
|
|
31
|
+
"Always say the value in words (`valueText`: “6 of 10 backers”).",
|
|
32
|
+
"Pair it with the action that moves it (back the challenge, book a seat)."
|
|
33
|
+
],
|
|
34
|
+
"accessibility": {
|
|
35
|
+
"keyboard": [],
|
|
36
|
+
"notes": [
|
|
37
|
+
"`role=\"meter\"` named by `label`, with `aria-valuenow`, `aria-valuemax` (the steps) and `aria-valuetext`.",
|
|
38
|
+
"The segments are drawn, not read: the value is in words, and lit steps are not told by colour alone (the count says it).",
|
|
39
|
+
"The steps light once in a stage and never under `prefers-reduced-motion`."
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"related": [
|
|
43
|
+
"meter",
|
|
44
|
+
"progress",
|
|
45
|
+
"stepper",
|
|
46
|
+
"achievement"
|
|
47
|
+
],
|
|
48
|
+
"web": {
|
|
49
|
+
"entry": "@krizaka/ui/goal-gauge",
|
|
50
|
+
"import": "import { GoalGauge } from \"@krizaka/ui/goal-gauge\";",
|
|
51
|
+
"props": [
|
|
52
|
+
{
|
|
53
|
+
"component": "GoalGauge",
|
|
54
|
+
"description": "A goal in steps: `role=\"meter\"`, the reached steps lit, the value in words beside the label.",
|
|
55
|
+
"props": [
|
|
56
|
+
{
|
|
57
|
+
"name": "label",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": null,
|
|
60
|
+
"description": "What the gauge counts (“Backers”, “Dares completed”) — passed translated; the meter's accessible name.",
|
|
61
|
+
"required": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "segments",
|
|
65
|
+
"type": "number",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "The number of steps of the goal (2–24).",
|
|
68
|
+
"required": true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "brand",
|
|
72
|
+
"type": "string",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "A brand scope (`orochia` → `.brand-orochia`).",
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "mode",
|
|
79
|
+
"type": "\"fill\" | \"drain\"",
|
|
80
|
+
"default": "fill",
|
|
81
|
+
"description": "How the scene plays it: `fill` lights the reached steps one by one; `drain` empties the spent ones (a countdown of\nwhat is left: tickets, lives, problems still standing).",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "showLabel",
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"default": "true",
|
|
88
|
+
"description": "Shows the label and the value above the segments.",
|
|
89
|
+
"required": false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "value",
|
|
93
|
+
"type": "number",
|
|
94
|
+
"default": "segments",
|
|
95
|
+
"description": "The steps reached (lit), from 0 to `segments`.",
|
|
96
|
+
"required": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "valueText",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "The value in words (“6 of 10”, “€420 raised”); default `value / segments`.",
|
|
103
|
+
"required": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "variant",
|
|
107
|
+
"type": "StoryVariant",
|
|
108
|
+
"default": "default",
|
|
109
|
+
"description": "`default`: rounded segments. `arcade`: the boss gauge — a skewed frame, gradient cells, a centred mono label.",
|
|
110
|
+
"required": false
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"examples": [
|
|
116
|
+
{
|
|
117
|
+
"name": "challenge",
|
|
118
|
+
"title": "A challenge's goal",
|
|
119
|
+
"description": "6 backers of 10: the reached steps light one by one.",
|
|
120
|
+
"path": "examples/goal-gauge/challenge.tsx",
|
|
121
|
+
"module": "@krizaka/ui/registry/examples/goal-gauge/challenge",
|
|
122
|
+
"code": "import { GoalGauge } from \"@krizaka/ui/goal-gauge\";\n\n// A challenge's goal: 6 backers of 10 — the reached steps light one by one when its scene plays.\nexport default function GoalGaugeChallenge() {\n return (\n <div className=\"w-80\">\n <GoalGauge label=\"Backers\" segments={10} value={6} valueText=\"6 of 10 backers\" />\n </div>\n );\n}\n"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "drain",
|
|
126
|
+
"title": "What is left",
|
|
127
|
+
"description": "`mode=\"drain\"`: 3 seats left of 12, the spent ones empty one by one.",
|
|
128
|
+
"path": "examples/goal-gauge/drain.tsx",
|
|
129
|
+
"module": "@krizaka/ui/registry/examples/goal-gauge/drain",
|
|
130
|
+
"code": "import { GoalGauge } from \"@krizaka/ui/goal-gauge\";\n\n// `mode=\"drain\"`: what is left — the spent steps empty one by one (seats, tickets, problems still standing).\nexport default function GoalGaugeDrain() {\n return (\n <div className=\"w-80\">\n <GoalGauge label=\"Seats left\" segments={12} value={3} mode=\"drain\" valueText=\"3 seats left\" />\n </div>\n );\n}\n"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "arcade",
|
|
134
|
+
"title": "Arcade flavour",
|
|
135
|
+
"description": "The boss gauge: every head sealed, the gauge empty.",
|
|
136
|
+
"path": "examples/goal-gauge/arcade.tsx",
|
|
137
|
+
"module": "@krizaka/ui/registry/examples/goal-gauge/arcade",
|
|
138
|
+
"code": "import { GoalGauge } from \"@krizaka/ui/goal-gauge\";\n\n// The boss gauge: a skewed frame, gradient cells, the label centred — every head sealed, the gauge empty.\nexport default function GoalGaugeArcade() {\n return (\n <div className=\"w-96 brand-orochia\">\n <GoalGauge variant=\"arcade\" label=\"Boss gauge\" segments={8} value={0} mode=\"drain\" valueText=\"All eight sealed\" />\n </div>\n );\n}\n"
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"native": {
|
|
143
|
+
"entry": "@krizaka/ui/native",
|
|
144
|
+
"import": "import { GoalGauge } from \"@krizaka/ui/native\";",
|
|
145
|
+
"differences": [
|
|
146
|
+
"The steps light once on mount (`animated`), not on scroll.",
|
|
147
|
+
"`drain` keeps the default look's final state: the spent steps do not fade on mobile, except in the arcade flavour."
|
|
148
|
+
],
|
|
149
|
+
"props": [
|
|
150
|
+
{
|
|
151
|
+
"component": "GoalGauge",
|
|
152
|
+
"description": "A goal in steps for React Native: `role=\"meter\"`, the reached steps lit, the value in words beside the label.",
|
|
153
|
+
"props": [
|
|
154
|
+
{
|
|
155
|
+
"name": "label",
|
|
156
|
+
"type": "string",
|
|
157
|
+
"default": null,
|
|
158
|
+
"description": "What the gauge counts (“Backers”) — passed translated; the meter's accessible name.",
|
|
159
|
+
"required": true
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "segments",
|
|
163
|
+
"type": "number",
|
|
164
|
+
"default": null,
|
|
165
|
+
"description": "The number of steps of the goal (2–24).",
|
|
166
|
+
"required": true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"name": "animated",
|
|
170
|
+
"type": "boolean",
|
|
171
|
+
"default": "true",
|
|
172
|
+
"description": "The steps light (or drain) once on mount; still when the system reduces motion.",
|
|
173
|
+
"required": false
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "mode",
|
|
177
|
+
"type": "\"fill\" | \"drain\"",
|
|
178
|
+
"default": "fill",
|
|
179
|
+
"description": "`fill` (default) lights the reached steps one by one on mount; `drain` empties the spent ones.",
|
|
180
|
+
"required": false
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"name": "showLabel",
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"default": "true",
|
|
186
|
+
"description": "Shows the label and the value above the segments (default true).",
|
|
187
|
+
"required": false
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"name": "value",
|
|
191
|
+
"type": "number",
|
|
192
|
+
"default": null,
|
|
193
|
+
"description": "The steps reached (lit), from 0 to `segments` (default `segments`).",
|
|
194
|
+
"required": false
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "valueText",
|
|
198
|
+
"type": "string",
|
|
199
|
+
"default": null,
|
|
200
|
+
"description": "The value in words (“6 of 10”); default `value / segments`.",
|
|
201
|
+
"required": false
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"name": "variant",
|
|
205
|
+
"type": "\"default\" | \"arcade\"",
|
|
206
|
+
"default": "default",
|
|
207
|
+
"description": "`default`: rounded segments. `arcade`: a skewed frame, the label centred.",
|
|
208
|
+
"required": false
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"examples": [
|
|
214
|
+
{
|
|
215
|
+
"name": "default",
|
|
216
|
+
"title": "Default",
|
|
217
|
+
"description": "A challenge's goal and the seats left of a drop.",
|
|
218
|
+
"path": "examples/goal-gauge/native/default.tsx",
|
|
219
|
+
"module": "@krizaka/ui/registry/examples/goal-gauge/native/default",
|
|
220
|
+
"code": "import { GoalGauge } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// A challenge's goal and the seats left of a live drop, on mobile.\nexport default function NativeGoalGaugeDefault() {\n return (\n <View style={{ width: 300, gap: 18 }}>\n <GoalGauge label=\"Backers\" segments={10} value={6} valueText=\"6 of 10 backers\" animated={false} />\n <GoalGauge label=\"Seats left\" segments={12} value={3} mode=\"drain\" valueText=\"3 seats left\" animated={false} />\n </View>\n );\n}\n",
|
|
221
|
+
"screenshots": {
|
|
222
|
+
"dark": "examples/goal-gauge/native/default.dark.png",
|
|
223
|
+
"light": "examples/goal-gauge/native/default.light.png"
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
},
|
|
228
|
+
"files": [
|
|
229
|
+
{
|
|
230
|
+
"path": "goal-gauge/goal-gauge.tsx",
|
|
231
|
+
"content": "// Server-safe. A goal counted in steps (story.css): 6 of 10 backers, 3 of 5 dares done, 8 problems out of the way. A\n// `meter` with its value in words; in a `Scene` of a `ScrollStage` the segments light (or drain) one by one, once.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type GoalGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** What the gauge counts (“Backers”, “Dares completed”) — passed translated; the meter's accessible name. */\n label: string;\n /** The number of steps of the goal (2–24). */\n segments: number;\n /**\n * The steps reached (lit), from 0 to `segments`.\n * @default segments\n */\n value?: number;\n /** The value in words (“6 of 10”, “€420 raised”); default `value / segments`. */\n valueText?: string;\n /**\n * How the scene plays it: `fill` lights the reached steps one by one; `drain` empties the spent ones (a countdown of\n * what is left: tickets, lives, problems still standing).\n * @default \"fill\"\n */\n mode?: \"fill\" | \"drain\";\n /**\n * Shows the label and the value above the segments.\n * @default true\n */\n showLabel?: boolean;\n /**\n * `default`: rounded segments. `arcade`: the boss gauge — a skewed frame, gradient cells, a centred mono label.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** A goal in steps: `role=\"meter\"`, the reached steps lit, the value in words beside the label. */\nexport function GoalGauge({ label, segments, value, valueText, mode = \"fill\", showLabel = true, variant, brand, className, style, ...props }: GoalGaugeProps) {\n const total = Math.max(1, Math.round(segments));\n const lit = Math.min(total, Math.max(0, Math.round(value ?? total)));\n const words = valueText ?? `${lit} / ${total}`;\n return (\n <div\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={total}\n aria-valuenow={lit}\n aria-valuetext={words}\n data-mode={mode}\n className={cn(\"kzs-gauge\", storyVariantClass(variant), brandClass(brand), className)}\n style={{ \"--kzs-segments\": total, ...style } as React.CSSProperties}\n {...props}\n >\n {showLabel && (\n <div className=\"kzs-gauge-head\" aria-hidden>\n <span className=\"kzs-gauge-label\">{label}</span>\n <span className=\"kzs-gauge-value\">{words}</span>\n </div>\n )}\n <div className=\"kzs-gauge-cells\" aria-hidden>\n {Array.from({ length: total }, (_, i) => {\n const on = i < lit;\n const animate = mode === \"fill\" ? on : !on;\n const order = mode === \"fill\" ? i : i - lit;\n return (\n <span\n key={i}\n className=\"kzs-gauge-cell\"\n data-lit={on ? \"\" : undefined}\n data-animate={animate ? \"\" : undefined}\n style={animate ? ({ \"--i\": order } as React.CSSProperties) : undefined}\n />\n );\n })}\n </div>\n </div>\n );\n}\n"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"path": "goal-gauge/index.ts",
|
|
235
|
+
"content": "/** @krizaka/ui/goal-gauge — `GoalGauge`, a goal counted in steps (a meter). Server-safe. Styles: story.css. */\nexport { GoalGauge, type GoalGaugeProps } from \"./goal-gauge\";\n"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"path": "goal-gauge/meta.ts",
|
|
239
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Goal gauge\",\n summary:\n \"A goal counted in steps — 6 of 10 backers, 3 dares done, 3 seats left: a meter whose reached steps light one by one (or whose spent ones drain) when its chapter plays.\",\n status: \"beta\",\n category: \"data-display\",\n platforms: \"both\",\n whenToUse: [\n \"A challenge's goal, counted in backers, dares or steps.\",\n \"What is left of something countable: seats, tickets, lives (`mode=\\\"drain\\\"`).\",\n \"On a told page, problems that fall one by one (the arcade boss gauge).\",\n ],\n whenNotToUse: [\n { when: \"A continuous measure against a range (storage, credits).\", use: \"meter\" },\n { when: \"The progress of a running task.\", use: \"progress\" },\n { when: \"Steps of a flow the person goes through.\", use: \"stepper\" },\n ],\n bestPractices: [\n \"Two to twenty-four steps: beyond, use a `Meter`.\",\n \"Always say the value in words (`valueText`: “6 of 10 backers”).\",\n \"Pair it with the action that moves it (back the challenge, book a seat).\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"`role=\\\"meter\\\"` named by `label`, with `aria-valuenow`, `aria-valuemax` (the steps) and `aria-valuetext`.\",\n \"The segments are drawn, not read: the value is in words, and lit steps are not told by colour alone (the count says it).\",\n \"The steps light once in a stage and never under `prefers-reduced-motion`.\",\n ],\n },\n related: [\"meter\", \"progress\", \"stepper\", \"achievement\"],\n web: {\n imports: [\"GoalGauge\"],\n examples: [\n { name: \"challenge\", title: \"A challenge's goal\", description: \"6 backers of 10: the reached steps light one by one.\" },\n { name: \"drain\", title: \"What is left\", description: \"`mode=\\\"drain\\\"`: 3 seats left of 12, the spent ones empty one by one.\" },\n { name: \"arcade\", title: \"Arcade flavour\", description: \"The boss gauge: every head sealed, the gauge empty.\" },\n ],\n },\n native: {\n imports: [\"GoalGauge\"],\n differences: [\"The steps light once on mount (`animated`), not on scroll.\", \"`drain` keeps the default look's final state: the spent steps do not fade on mobile, except in the arcade flavour.\"],\n examples: [{ name: \"default\", title: \"Default\", description: \"A challenge's goal and the seats left of a drop.\" }],\n },\n} satisfies ComponentMeta;\n"
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
"path": "meta.ts",
|
|
243
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"loader\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"path": "story-variant.ts",
|
|
247
|
+
"content": "// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-orochia`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"
|
|
248
|
+
}
|
|
249
|
+
],
|
|
250
|
+
"dependencies": [],
|
|
251
|
+
"registryDependencies": [
|
|
252
|
+
"cn"
|
|
253
|
+
],
|
|
254
|
+
"demo": {
|
|
255
|
+
"path": "examples/goal-gauge/challenge.tsx",
|
|
256
|
+
"content": "import { GoalGauge } from \"@krizaka/ui/goal-gauge\";\n\n// A challenge's goal: 6 backers of 10 — the reached steps light one by one when its scene plays.\nexport default function GoalGaugeChallenge() {\n return (\n <div className=\"w-80\">\n <GoalGauge label=\"Backers\" segments={10} value={6} valueText=\"6 of 10 backers\" />\n </div>\n );\n}\n"
|
|
257
|
+
},
|
|
258
|
+
"props": [
|
|
259
|
+
{
|
|
260
|
+
"component": "GoalGauge",
|
|
261
|
+
"description": "A goal in steps: `role=\"meter\"`, the reached steps lit, the value in words beside the label.",
|
|
262
|
+
"props": [
|
|
263
|
+
{
|
|
264
|
+
"name": "label",
|
|
265
|
+
"type": "string",
|
|
266
|
+
"default": null,
|
|
267
|
+
"description": "What the gauge counts (“Backers”, “Dares completed”) — passed translated; the meter's accessible name.",
|
|
268
|
+
"required": true
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"name": "segments",
|
|
272
|
+
"type": "number",
|
|
273
|
+
"default": null,
|
|
274
|
+
"description": "The number of steps of the goal (2–24).",
|
|
275
|
+
"required": true
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"name": "brand",
|
|
279
|
+
"type": "string",
|
|
280
|
+
"default": null,
|
|
281
|
+
"description": "A brand scope (`orochia` → `.brand-orochia`).",
|
|
282
|
+
"required": false
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"name": "mode",
|
|
286
|
+
"type": "\"fill\" | \"drain\"",
|
|
287
|
+
"default": "fill",
|
|
288
|
+
"description": "How the scene plays it: `fill` lights the reached steps one by one; `drain` empties the spent ones (a countdown of\nwhat is left: tickets, lives, problems still standing).",
|
|
289
|
+
"required": false
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "showLabel",
|
|
293
|
+
"type": "boolean",
|
|
294
|
+
"default": "true",
|
|
295
|
+
"description": "Shows the label and the value above the segments.",
|
|
296
|
+
"required": false
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"name": "value",
|
|
300
|
+
"type": "number",
|
|
301
|
+
"default": "segments",
|
|
302
|
+
"description": "The steps reached (lit), from 0 to `segments`.",
|
|
303
|
+
"required": false
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"name": "valueText",
|
|
307
|
+
"type": "string",
|
|
308
|
+
"default": null,
|
|
309
|
+
"description": "The value in words (“6 of 10”, “€420 raised”); default `value / segments`.",
|
|
310
|
+
"required": false
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"name": "variant",
|
|
314
|
+
"type": "StoryVariant",
|
|
315
|
+
"default": "default",
|
|
316
|
+
"description": "`default`: rounded segments. `arcade`: the boss gauge — a skewed frame, gradient cells, a centred mono label.",
|
|
317
|
+
"required": false
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
]
|
|
322
|
+
}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "how-it-works-page",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "How-it-works page",
|
|
5
|
+
"summary": "How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.",
|
|
6
|
+
"description": "How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "templates",
|
|
9
|
+
"platforms": "web",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"The journey of a request, an onboarding, an installation.",
|
|
12
|
+
"Any process told in three to seven steps."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "For a product's overview.",
|
|
17
|
+
"use": "product-page"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "For a step the user is on right now.",
|
|
21
|
+
"use": "stepper"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"bestPractices": [
|
|
25
|
+
"Three to seven steps; a step's title says what happens, in a few words.",
|
|
26
|
+
"Each visual shows the step for real: a command, a schema, a screen.",
|
|
27
|
+
"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion)."
|
|
28
|
+
],
|
|
29
|
+
"accessibility": {
|
|
30
|
+
"keyboard": [],
|
|
31
|
+
"notes": [
|
|
32
|
+
"The steps are an ordered list; each title an `h2`.",
|
|
33
|
+
"The line and the numbers are decorative: the list says the order."
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"related": [
|
|
37
|
+
"stepper",
|
|
38
|
+
"product-page",
|
|
39
|
+
"code-block"
|
|
40
|
+
],
|
|
41
|
+
"web": {
|
|
42
|
+
"entry": "@krizaka/ui/how-it-works-page",
|
|
43
|
+
"import": "import { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";",
|
|
44
|
+
"props": [
|
|
45
|
+
{
|
|
46
|
+
"component": "HowItWorksPage",
|
|
47
|
+
"description": "How a product works: the hero, a numbered timeline of steps with their visuals, then the details.",
|
|
48
|
+
"props": [
|
|
49
|
+
{
|
|
50
|
+
"name": "steps",
|
|
51
|
+
"type": "readonly HowStep[]",
|
|
52
|
+
"default": null,
|
|
53
|
+
"description": "The steps, in order.",
|
|
54
|
+
"required": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "stepsLabel",
|
|
58
|
+
"type": "string",
|
|
59
|
+
"default": null,
|
|
60
|
+
"description": "The steps' accessible name (`The steps`).",
|
|
61
|
+
"required": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "title",
|
|
65
|
+
"type": "ReactNode",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "The page's `h1`.",
|
|
68
|
+
"required": true
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "aside",
|
|
72
|
+
"type": "ReactNode",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "Beside the hero: the page's bird or an illustration.",
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "back",
|
|
79
|
+
"type": "{ href: string; label: string; }",
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "The way back to the product.",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "brand",
|
|
86
|
+
"type": "string",
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "The brand the page wears (`.brand-<id>`).",
|
|
89
|
+
"required": false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "closing",
|
|
93
|
+
"type": "{ title: ReactNode; body?: ReactNode; actions: ReactNode; }",
|
|
94
|
+
"default": null,
|
|
95
|
+
"description": "The closing call.",
|
|
96
|
+
"required": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "eyebrow",
|
|
100
|
+
"type": "ReactNode",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "A mono line above the title.",
|
|
103
|
+
"required": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "lead",
|
|
107
|
+
"type": "ReactNode",
|
|
108
|
+
"default": null,
|
|
109
|
+
"description": "One or two sentences under it.",
|
|
110
|
+
"required": false
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"name": "linkAs",
|
|
114
|
+
"type": "LinkComponent",
|
|
115
|
+
"default": null,
|
|
116
|
+
"description": "The app's link component (Next's `Link`).",
|
|
117
|
+
"required": false
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"examples": [
|
|
123
|
+
{
|
|
124
|
+
"name": "orazaka",
|
|
125
|
+
"title": "Orazaka's journey",
|
|
126
|
+
"description": "Install, guard, answer — each with its command.",
|
|
127
|
+
"template": true,
|
|
128
|
+
"path": "examples/how-it-works-page/orazaka.tsx",
|
|
129
|
+
"module": "@krizaka/ui/registry/examples/how-it-works-page/orazaka",
|
|
130
|
+
"code": "import { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\n\nconst copy = { copyLabel: \"Copy\", copiedLabel: \"Copied\" };\n\n// TEMPLATE — how a product works, in steps along a line (Orazaka's journey of a request): each step its words beside\n// its visual, the sides alternating on a wide screen, one column on a phone.\nexport default function HowItWorksPageOrazaka() {\n return (\n <HowItWorksPage\n brand=\"orazaka\"\n back={{ href: \"#orazaka\", label: \"Orazaka\" }}\n eyebrow=\"How it works\"\n title=\"The journey of a request\"\n lead=\"Six stages, the same for every request — and none of them leaves your server.\"\n aside={<Mascot bird=\"duck\" mood=\"thinking\" size={112} />}\n stepsLabel=\"The steps\"\n steps={[\n { id: \"install\", title: \"Install\", text: \"One command pulls the engine, the models you choose and the console.\", visual: <CodeBlock code=\"npx orazaka install\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"guard\", title: \"Guard\", text: \"Every request crosses the same interceptors: identity, quotas, the rules of your workspace.\", visual: <CodeBlock code=\"orazaka rules add --deny pii-export\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"answer\", title: \"Answer\", text: \"The best local model answers; the answer is checked before it is shown.\", visual: <CodeBlock code=\"orazaka chat --model llama3.3\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n ]}\n />\n );\n}\n"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
"native": null,
|
|
135
|
+
"files": [
|
|
136
|
+
{
|
|
137
|
+
"path": "how-it-works-page/how-it-works-page.tsx",
|
|
138
|
+
"content": "// Server-safe. How a product works, told in steps (blocks.css `.kz-tpl-timeline`): the hero, then a numbered line\n// down the page — each step its words beside its visual (a command, a schema, a screen), the sides alternating on a\n// wide screen, one column on a phone — then what is under the hood and the closing call.\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { PageHero } from \"@krizaka/ui/page-hero\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface HowStep {\n /** A stable key (the step's anchor). */\n id: string;\n /** What happens, in a few words. */\n title: React.ReactNode;\n /** How, in two or three sentences. */\n text: React.ReactNode;\n /** Beside the words: a code block, a schema, a screen. */\n visual?: React.ReactNode;\n}\n\nexport type HowItWorksPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The brand the page wears (`.brand-<id>`). */\n brand?: string;\n /** The way back to the product. */\n back?: { href: string; label: string };\n /** A mono line above the title. */\n eyebrow?: React.ReactNode;\n /** The page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Beside the hero: the page's bird or an illustration. */\n aside?: React.ReactNode;\n /** The steps' accessible name (`The steps`). */\n stepsLabel: string;\n /** The steps, in order. */\n steps: readonly HowStep[];\n /** After the steps: architecture, guarantees, a module map. */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/** How a product works: the hero, a numbered timeline of steps with their visuals, then the details. */\nexport function HowItWorksPage({ brand, back, eyebrow, title, lead, aside, stepsLabel, steps, closing, linkAs, className, children, ...props }: HowItWorksPageProps) {\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <PageHero back={back} linkAs={linkAs} eyebrow={eyebrow} title={title} lead={lead} aside={aside} />\n <Section aria-label={stepsLabel}>\n <ol className=\"kz-tpl-timeline\">\n {steps.map((step, i) => (\n <li key={step.id} id={step.id} className=\"kz-tpl-step\" data-reveal=\"\">\n <span className=\"kz-tpl-step-n\" aria-hidden>\n {i + 1}\n </span>\n <div className=\"kz-tpl-step-text\">\n <h2>{step.title}</h2>\n <p>{step.text}</p>\n </div>\n {step.visual && <div className=\"kz-tpl-step-visual\">{step.visual}</div>}\n </li>\n ))}\n </ol>\n </Section>\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"how-closing\">\n <CtaPanel id=\"how-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"path": "how-it-works-page/index.ts",
|
|
142
|
+
"content": "/** @krizaka/ui/how-it-works-page — `HowItWorksPage`: How a product works: a numbered timeline of steps, each with its visual. Server-safe; a page template. */\nexport { HowItWorksPage, type HowItWorksPageProps, type HowStep } from \"./how-it-works-page\";\n"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"path": "how-it-works-page/meta.ts",
|
|
146
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"How-it-works page\",\n summary: \"How a product works, told in steps along a numbered line — each step its words beside its visual, the sides alternating on a wide screen.\",\n status: \"beta\",\n category: \"templates\",\n platforms: \"web\",\n whenToUse: [\"The journey of a request, an onboarding, an installation.\", \"Any process told in three to seven steps.\"],\n whenNotToUse: [\n { when: \"For a product's overview.\", use: \"product-page\" },\n { when: \"For a step the user is on right now.\", use: \"stepper\" },\n ],\n bestPractices: [\"Three to seven steps; a step's title says what happens, in a few words.\", \"Each visual shows the step for real: a command, a schema, a screen.\", \"Words and content arrive as props; the motion is the platform's (`[data-reveal]`, still under reduced motion).\"],\n accessibility: {\n keyboard: [],\n notes: [\"The steps are an ordered list; each title an `h2`.\", \"The line and the numbers are decorative: the list says the order.\"],\n },\n related: [\"stepper\", \"product-page\", \"code-block\"],\n web: {\n imports: [\"HowItWorksPage\"],\n examples: [\n { name: \"orazaka\", title: \"Orazaka's journey\", description: \"Install, guard, answer — each with its command.\", template: true },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"path": "meta.ts",
|
|
150
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"loader\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"dependencies": [],
|
|
154
|
+
"registryDependencies": [
|
|
155
|
+
"cn",
|
|
156
|
+
"cta-panel",
|
|
157
|
+
"page",
|
|
158
|
+
"page-hero"
|
|
159
|
+
],
|
|
160
|
+
"demo": {
|
|
161
|
+
"path": "examples/how-it-works-page/orazaka.tsx",
|
|
162
|
+
"content": "import { CodeBlock } from \"@krizaka/ui/code-block\";\nimport { HowItWorksPage } from \"@krizaka/ui/how-it-works-page\";\nimport { Mascot } from \"@krizaka/ui/mascots\";\n\nconst copy = { copyLabel: \"Copy\", copiedLabel: \"Copied\" };\n\n// TEMPLATE — how a product works, in steps along a line (Orazaka's journey of a request): each step its words beside\n// its visual, the sides alternating on a wide screen, one column on a phone.\nexport default function HowItWorksPageOrazaka() {\n return (\n <HowItWorksPage\n brand=\"orazaka\"\n back={{ href: \"#orazaka\", label: \"Orazaka\" }}\n eyebrow=\"How it works\"\n title=\"The journey of a request\"\n lead=\"Six stages, the same for every request — and none of them leaves your server.\"\n aside={<Mascot bird=\"duck\" mood=\"thinking\" size={112} />}\n stepsLabel=\"The steps\"\n steps={[\n { id: \"install\", title: \"Install\", text: \"One command pulls the engine, the models you choose and the console.\", visual: <CodeBlock code=\"npx orazaka install\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"guard\", title: \"Guard\", text: \"Every request crosses the same interceptors: identity, quotas, the rules of your workspace.\", visual: <CodeBlock code=\"orazaka rules add --deny pii-export\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n { id: \"answer\", title: \"Answer\", text: \"The best local model answers; the answer is checked before it is shown.\", visual: <CodeBlock code=\"orazaka chat --model llama3.3\" language=\"bash\" file=\"Terminal\" {...copy} /> },\n ]}\n />\n );\n}\n"
|
|
163
|
+
},
|
|
164
|
+
"props": [
|
|
165
|
+
{
|
|
166
|
+
"component": "HowItWorksPage",
|
|
167
|
+
"description": "How a product works: the hero, a numbered timeline of steps with their visuals, then the details.",
|
|
168
|
+
"props": [
|
|
169
|
+
{
|
|
170
|
+
"name": "steps",
|
|
171
|
+
"type": "readonly HowStep[]",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "The steps, in order.",
|
|
174
|
+
"required": true
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "stepsLabel",
|
|
178
|
+
"type": "string",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "The steps' accessible name (`The steps`).",
|
|
181
|
+
"required": true
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "title",
|
|
185
|
+
"type": "ReactNode",
|
|
186
|
+
"default": null,
|
|
187
|
+
"description": "The page's `h1`.",
|
|
188
|
+
"required": true
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "aside",
|
|
192
|
+
"type": "ReactNode",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "Beside the hero: the page's bird or an illustration.",
|
|
195
|
+
"required": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "back",
|
|
199
|
+
"type": "{ href: string; label: string; }",
|
|
200
|
+
"default": null,
|
|
201
|
+
"description": "The way back to the product.",
|
|
202
|
+
"required": false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "brand",
|
|
206
|
+
"type": "string",
|
|
207
|
+
"default": null,
|
|
208
|
+
"description": "The brand the page wears (`.brand-<id>`).",
|
|
209
|
+
"required": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "closing",
|
|
213
|
+
"type": "{ title: ReactNode; body?: ReactNode; actions: ReactNode; }",
|
|
214
|
+
"default": null,
|
|
215
|
+
"description": "The closing call.",
|
|
216
|
+
"required": false
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"name": "eyebrow",
|
|
220
|
+
"type": "ReactNode",
|
|
221
|
+
"default": null,
|
|
222
|
+
"description": "A mono line above the title.",
|
|
223
|
+
"required": false
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"name": "lead",
|
|
227
|
+
"type": "ReactNode",
|
|
228
|
+
"default": null,
|
|
229
|
+
"description": "One or two sentences under it.",
|
|
230
|
+
"required": false
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"name": "linkAs",
|
|
234
|
+
"type": "LinkComponent",
|
|
235
|
+
"default": null,
|
|
236
|
+
"description": "The app's link component (Next's `Link`).",
|
|
237
|
+
"required": false
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|