@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,233 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "split-view",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Split view",
|
|
5
|
+
"summary": "A list and its open item: two panes on a desktop; on a phone one at a time, the open item with the way back — chosen by showDetail, from the address.",
|
|
6
|
+
"description": "A list and its open item: two panes on a desktop; on a phone one at a time, the open item with the way back — chosen by showDetail, from the address.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "layouts",
|
|
9
|
+
"platforms": "web",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"Messages, moderation queues, jobs, notifications.",
|
|
12
|
+
"Any list the user works through item by item."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "For an object reached from elsewhere.",
|
|
17
|
+
"use": "detail-layout"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "For rows to sort and select.",
|
|
21
|
+
"use": "data-table"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"bestPractices": [
|
|
25
|
+
"Put the open item in the address (`?thread=lea`) and pass `showDetail` from it: back and forward work, a link can be shared.",
|
|
26
|
+
"Mark the open item in the list with `aria-current`.",
|
|
27
|
+
"Say what to do when nothing is open (`empty`)."
|
|
28
|
+
],
|
|
29
|
+
"accessibility": {
|
|
30
|
+
"keyboard": [],
|
|
31
|
+
"notes": [
|
|
32
|
+
"Each pane is a `section`; the list's title is an `h2`.",
|
|
33
|
+
"On a phone the hidden pane is not rendered visibly (display none): it is not read either."
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"related": [
|
|
37
|
+
"detail-layout",
|
|
38
|
+
"data-table",
|
|
39
|
+
"app-shell"
|
|
40
|
+
],
|
|
41
|
+
"web": {
|
|
42
|
+
"entry": "@krizaka/ui/split-view",
|
|
43
|
+
"import": "import { SplitView } from \"@krizaka/ui/split-view\";",
|
|
44
|
+
"props": [
|
|
45
|
+
{
|
|
46
|
+
"component": "SplitView",
|
|
47
|
+
"description": "A list and its open item: two panes on a desktop, one at a time on a phone.",
|
|
48
|
+
"props": [
|
|
49
|
+
{
|
|
50
|
+
"name": "list",
|
|
51
|
+
"type": "ReactNode",
|
|
52
|
+
"default": null,
|
|
53
|
+
"description": "The items (a list of links, a DataTable).",
|
|
54
|
+
"required": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "listTitle",
|
|
58
|
+
"type": "ReactNode",
|
|
59
|
+
"default": null,
|
|
60
|
+
"description": "The list pane's title (`Messages`): it names the region.",
|
|
61
|
+
"required": true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"name": "back",
|
|
65
|
+
"type": "ReactNode",
|
|
66
|
+
"default": null,
|
|
67
|
+
"description": "The way back to the list on a phone: your router's link (`<Link href=\"/inbox\">Messages</Link>`).",
|
|
68
|
+
"required": false
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "detail",
|
|
72
|
+
"type": "ReactNode",
|
|
73
|
+
"default": null,
|
|
74
|
+
"description": "The open item, or nothing.",
|
|
75
|
+
"required": false
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "detailHead",
|
|
79
|
+
"type": "ReactNode",
|
|
80
|
+
"default": null,
|
|
81
|
+
"description": "The open item's head: its name, its actions.",
|
|
82
|
+
"required": false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"name": "empty",
|
|
86
|
+
"type": "ReactNode",
|
|
87
|
+
"default": null,
|
|
88
|
+
"description": "What the detail pane says when nothing is open (desktop).",
|
|
89
|
+
"required": false
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "listActions",
|
|
93
|
+
"type": "ReactNode",
|
|
94
|
+
"default": null,
|
|
95
|
+
"description": "Actions in the list's head (a search, a filter, a new item).",
|
|
96
|
+
"required": false
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "listLabel",
|
|
100
|
+
"type": "string",
|
|
101
|
+
"default": null,
|
|
102
|
+
"description": "The list pane's accessible name when `listTitle` is not text.",
|
|
103
|
+
"required": false
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"name": "showDetail",
|
|
107
|
+
"type": "boolean",
|
|
108
|
+
"default": "false",
|
|
109
|
+
"description": "On a phone, the open item replaces the list. Usually: an item is selected in the address.",
|
|
110
|
+
"required": false
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"examples": [
|
|
116
|
+
{
|
|
117
|
+
"name": "messages",
|
|
118
|
+
"title": "Messages",
|
|
119
|
+
"description": "A creator's inbox: threads beside the open one, a reply box at its foot.",
|
|
120
|
+
"template": true,
|
|
121
|
+
"path": "examples/split-view/messages.tsx",
|
|
122
|
+
"module": "@krizaka/ui/registry/examples/split-view/messages",
|
|
123
|
+
"code": "import { Avatar } from \"@krizaka/ui/avatar\";\nimport { Button } from \"@krizaka/ui/button\";\nimport { Field, Textarea } from \"@krizaka/ui/field\";\nimport { SplitView } from \"@krizaka/ui/split-view\";\n\nconst THREADS = [\n { id: \"lea\", name: \"Léa M.\", last: \"Will part 3 be out before Friday?\", time: \"09:12\", unread: true },\n { id: \"samir\", name: \"Samir K.\", last: \"Thanks for the backstage cut!\", time: \"Yesterday\" },\n { id: \"ines\", name: \"Inès B.\", last: \"I won the auction 🎉\", time: \"Mon\" },\n];\n\n// TEMPLATE — a creator's messages (Orochia): the threads beside the open one; on a phone the open thread replaces the\n// list (`showDetail`, from the address) with the way back above it. The reply box stays at the foot of the thread.\nexport default function SplitViewMessages() {\n return (\n <SplitView\n className=\"w-full\"\n listTitle=\"Messages\"\n showDetail\n back={<a href=\"#messages\" className=\"text-sm font-medium text-fg-secondary\">← Messages</a>}\n list={\n <ul>\n {THREADS.map((t, i) => (\n <li key={t.id}>\n <a href={`#${t.id}`} aria-current={i === 0 ? \"page\" : undefined} className=\"flex items-center gap-3 border-b border-border-subtle px-4 py-3 text-sm no-underline hover:bg-surface-2 aria-[current=page]:bg-accent-soft\">\n <Avatar fallback={t.name.slice(0, 2)} size=\"sm\" />\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex justify-between gap-2\"><span className=\"font-semibold text-fg\">{t.name}</span><span className=\"text-xs text-fg-secondary\">{t.time}</span></span>\n <span className={t.unread ? \"block truncate font-medium text-fg\" : \"block truncate text-fg-secondary\"}>{t.last}</span>\n </span>\n </a>\n </li>\n ))}\n </ul>\n }\n detailHead={<span className=\"text-sm font-bold text-fg\">Léa M.</span>}\n detail={\n <div className=\"flex h-full flex-col gap-4\">\n <p className=\"max-w-[80%] rounded-2xl rounded-bl-md bg-surface-2 px-3.5 py-2 text-sm text-fg\">Will part 3 be out before Friday?</p>\n <p className=\"ml-auto max-w-[80%] rounded-2xl rounded-br-md bg-accent-soft px-3.5 py-2 text-sm text-fg\">Thursday evening — you'll be the first to know.</p>\n <form className=\"mt-auto flex items-end gap-2\">\n <Field.Root className=\"flex-1\">\n <Field.Label htmlFor=\"reply\" className=\"sr-only\">Reply to Léa</Field.Label>\n <Textarea id=\"reply\" rows={2} placeholder=\"Write a reply…\" />\n </Field.Root>\n <Button type=\"submit\" variant=\"primary\" shape=\"cut\">Send</Button>\n </form>\n </div>\n }\n />\n );\n}\n"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "empty",
|
|
127
|
+
"title": "Nothing open",
|
|
128
|
+
"description": "The list, and what to do while nothing is open.",
|
|
129
|
+
"path": "examples/split-view/empty.tsx",
|
|
130
|
+
"module": "@krizaka/ui/registry/examples/split-view/empty",
|
|
131
|
+
"code": "import { SplitView } from \"@krizaka/ui/split-view\";\n\n// Nothing open yet: the detail pane says what to do (desktop); on a phone only the list shows.\nexport default function SplitViewEmpty() {\n return (\n <SplitView\n className=\"w-full\"\n listTitle=\"Moderation\"\n list={<p className=\"p-4 text-sm text-fg-secondary\">5 comments waiting.</p>}\n empty=\"Choose a comment to review it.\"\n />\n );\n}\n"
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"native": null,
|
|
136
|
+
"files": [
|
|
137
|
+
{
|
|
138
|
+
"path": "meta.ts",
|
|
139
|
+
"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"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"path": "split-view/index.ts",
|
|
143
|
+
"content": "/** @krizaka/ui/split-view — `SplitView`: a list and its open item (one at a time on a phone). Server-safe. */\nexport { SplitView, splitView, type SplitViewProps } from \"./split-view\";\n"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"path": "split-view/meta.ts",
|
|
147
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Split view\",\n summary: \"A list and its open item: two panes on a desktop; on a phone one at a time, the open item with the way back — chosen by showDetail, from the address.\",\n status: \"beta\",\n category: \"layouts\",\n platforms: \"web\",\n whenToUse: [\"Messages, moderation queues, jobs, notifications.\", \"Any list the user works through item by item.\"],\n whenNotToUse: [\n { when: \"For an object reached from elsewhere.\", use: \"detail-layout\" },\n { when: \"For rows to sort and select.\", use: \"data-table\" },\n ],\n bestPractices: [\"Put the open item in the address (`?thread=lea`) and pass `showDetail` from it: back and forward work, a link can be shared.\", \"Mark the open item in the list with `aria-current`.\", \"Say what to do when nothing is open (`empty`).\"],\n accessibility: {\n keyboard: [],\n notes: [\"Each pane is a `section`; the list's title is an `h2`.\", \"On a phone the hidden pane is not rendered visibly (display none): it is not read either.\"],\n },\n related: [\"detail-layout\", \"data-table\", \"app-shell\"],\n web: {\n imports: [\"SplitView\"],\n examples: [\n { name: \"messages\", title: \"Messages\", description: \"A creator's inbox: threads beside the open one, a reply box at its foot.\", template: true },\n { name: \"empty\", title: \"Nothing open\", description: \"The list, and what to do while nothing is open.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"path": "split-view/split-view.tsx",
|
|
151
|
+
"content": "// Server-safe. A list and the item open beside it, read from the products' inboxes and queues (messages, moderation,\n// jobs): two panes on a desktop; on a phone one at a time — the list, or the open item with the way back — chosen by\n// `showDetail` (the address says which item is open: URL = state).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const splitView = tv({\n slots: {\n root:\n \"grid w-full min-h-[min(40rem,calc(100dvh-8rem))] overflow-hidden rounded-xl border border-border-default bg-surface-1 \" +\n \"md:grid-cols-[minmax(16rem,22rem)_minmax(0,1fr)]\",\n list: \"flex min-h-0 min-w-0 flex-col border-border-subtle md:border-r data-[hidden-on-phone]:hidden md:data-[hidden-on-phone]:flex\",\n listHead: \"flex h-14 shrink-0 items-center gap-2 border-b border-border-subtle px-4\",\n listTitle: \"text-sm font-bold text-fg\",\n listBody: \"min-h-0 flex-1 overflow-y-auto\",\n detail: \"flex min-h-0 min-w-0 flex-col bg-surface-0 data-[hidden-on-phone]:hidden md:data-[hidden-on-phone]:flex\",\n detailHead: \"flex h-14 shrink-0 items-center gap-2 border-b border-border-subtle px-4\",\n back: \"md:hidden\",\n detailBody: \"min-h-0 flex-1 overflow-y-auto p-4 md:p-6\",\n empty: \"flex flex-1 items-center justify-center p-8 text-center text-sm text-fg-secondary\",\n },\n});\nconst s = splitView();\n\nexport type SplitViewProps = React.ComponentProps<\"div\"> & {\n /** The list pane's title (`Messages`): it names the region. */\n listTitle: React.ReactNode;\n /** Actions in the list's head (a search, a filter, a new item). */\n listActions?: React.ReactNode;\n /** The items (a list of links, a DataTable). */\n list: React.ReactNode;\n /** The open item's head: its name, its actions. */\n detailHead?: React.ReactNode;\n /** The open item, or nothing. */\n detail?: React.ReactNode;\n /** What the detail pane says when nothing is open (desktop). */\n empty?: React.ReactNode;\n /** On a phone, the open item replaces the list. Usually: an item is selected in the address. */\n showDetail?: boolean;\n /** The way back to the list on a phone: your router's link (`<Link href=\"/inbox\">Messages</Link>`). */\n back?: React.ReactNode;\n /** The list pane's accessible name when `listTitle` is not text. */\n listLabel?: string;\n};\n\n/** A list and its open item: two panes on a desktop, one at a time on a phone. */\nexport function SplitView({ listTitle, listActions, list, detailHead, detail, empty, showDetail = false, back, listLabel, className, ...props }: SplitViewProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <section className={s.list()} aria-label={listLabel} data-hidden-on-phone={showDetail ? \"\" : undefined}>\n <div className={s.listHead()}>\n <h2 className={s.listTitle()}>{listTitle}</h2>\n <div className=\"ml-auto flex items-center gap-1.5\">{listActions}</div>\n </div>\n <div className={s.listBody()}>{list}</div>\n </section>\n <section className={s.detail()} data-hidden-on-phone={showDetail ? undefined : \"\"}>\n {(back || detailHead) && (\n <div className={s.detailHead()}>\n {back && <div className={s.back()}>{back}</div>}\n {detailHead}\n </div>\n )}\n {detail ? <div className={s.detailBody()}>{detail}</div> : <div className={s.empty()}>{empty}</div>}\n </section>\n </div>\n );\n}\n"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"dependencies": [
|
|
155
|
+
"tailwind-variants@^3.3.1"
|
|
156
|
+
],
|
|
157
|
+
"registryDependencies": [],
|
|
158
|
+
"demo": {
|
|
159
|
+
"path": "examples/split-view/messages.tsx",
|
|
160
|
+
"content": "import { Avatar } from \"@krizaka/ui/avatar\";\nimport { Button } from \"@krizaka/ui/button\";\nimport { Field, Textarea } from \"@krizaka/ui/field\";\nimport { SplitView } from \"@krizaka/ui/split-view\";\n\nconst THREADS = [\n { id: \"lea\", name: \"Léa M.\", last: \"Will part 3 be out before Friday?\", time: \"09:12\", unread: true },\n { id: \"samir\", name: \"Samir K.\", last: \"Thanks for the backstage cut!\", time: \"Yesterday\" },\n { id: \"ines\", name: \"Inès B.\", last: \"I won the auction 🎉\", time: \"Mon\" },\n];\n\n// TEMPLATE — a creator's messages (Orochia): the threads beside the open one; on a phone the open thread replaces the\n// list (`showDetail`, from the address) with the way back above it. The reply box stays at the foot of the thread.\nexport default function SplitViewMessages() {\n return (\n <SplitView\n className=\"w-full\"\n listTitle=\"Messages\"\n showDetail\n back={<a href=\"#messages\" className=\"text-sm font-medium text-fg-secondary\">← Messages</a>}\n list={\n <ul>\n {THREADS.map((t, i) => (\n <li key={t.id}>\n <a href={`#${t.id}`} aria-current={i === 0 ? \"page\" : undefined} className=\"flex items-center gap-3 border-b border-border-subtle px-4 py-3 text-sm no-underline hover:bg-surface-2 aria-[current=page]:bg-accent-soft\">\n <Avatar fallback={t.name.slice(0, 2)} size=\"sm\" />\n <span className=\"min-w-0 flex-1\">\n <span className=\"flex justify-between gap-2\"><span className=\"font-semibold text-fg\">{t.name}</span><span className=\"text-xs text-fg-secondary\">{t.time}</span></span>\n <span className={t.unread ? \"block truncate font-medium text-fg\" : \"block truncate text-fg-secondary\"}>{t.last}</span>\n </span>\n </a>\n </li>\n ))}\n </ul>\n }\n detailHead={<span className=\"text-sm font-bold text-fg\">Léa M.</span>}\n detail={\n <div className=\"flex h-full flex-col gap-4\">\n <p className=\"max-w-[80%] rounded-2xl rounded-bl-md bg-surface-2 px-3.5 py-2 text-sm text-fg\">Will part 3 be out before Friday?</p>\n <p className=\"ml-auto max-w-[80%] rounded-2xl rounded-br-md bg-accent-soft px-3.5 py-2 text-sm text-fg\">Thursday evening — you'll be the first to know.</p>\n <form className=\"mt-auto flex items-end gap-2\">\n <Field.Root className=\"flex-1\">\n <Field.Label htmlFor=\"reply\" className=\"sr-only\">Reply to Léa</Field.Label>\n <Textarea id=\"reply\" rows={2} placeholder=\"Write a reply…\" />\n </Field.Root>\n <Button type=\"submit\" variant=\"primary\" shape=\"cut\">Send</Button>\n </form>\n </div>\n }\n />\n );\n}\n"
|
|
161
|
+
},
|
|
162
|
+
"props": [
|
|
163
|
+
{
|
|
164
|
+
"component": "SplitView",
|
|
165
|
+
"description": "A list and its open item: two panes on a desktop, one at a time on a phone.",
|
|
166
|
+
"props": [
|
|
167
|
+
{
|
|
168
|
+
"name": "list",
|
|
169
|
+
"type": "ReactNode",
|
|
170
|
+
"default": null,
|
|
171
|
+
"description": "The items (a list of links, a DataTable).",
|
|
172
|
+
"required": true
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "listTitle",
|
|
176
|
+
"type": "ReactNode",
|
|
177
|
+
"default": null,
|
|
178
|
+
"description": "The list pane's title (`Messages`): it names the region.",
|
|
179
|
+
"required": true
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "back",
|
|
183
|
+
"type": "ReactNode",
|
|
184
|
+
"default": null,
|
|
185
|
+
"description": "The way back to the list on a phone: your router's link (`<Link href=\"/inbox\">Messages</Link>`).",
|
|
186
|
+
"required": false
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"name": "detail",
|
|
190
|
+
"type": "ReactNode",
|
|
191
|
+
"default": null,
|
|
192
|
+
"description": "The open item, or nothing.",
|
|
193
|
+
"required": false
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "detailHead",
|
|
197
|
+
"type": "ReactNode",
|
|
198
|
+
"default": null,
|
|
199
|
+
"description": "The open item's head: its name, its actions.",
|
|
200
|
+
"required": false
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "empty",
|
|
204
|
+
"type": "ReactNode",
|
|
205
|
+
"default": null,
|
|
206
|
+
"description": "What the detail pane says when nothing is open (desktop).",
|
|
207
|
+
"required": false
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "listActions",
|
|
211
|
+
"type": "ReactNode",
|
|
212
|
+
"default": null,
|
|
213
|
+
"description": "Actions in the list's head (a search, a filter, a new item).",
|
|
214
|
+
"required": false
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"name": "listLabel",
|
|
218
|
+
"type": "string",
|
|
219
|
+
"default": null,
|
|
220
|
+
"description": "The list pane's accessible name when `listTitle` is not text.",
|
|
221
|
+
"required": false
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"name": "showDetail",
|
|
225
|
+
"type": "boolean",
|
|
226
|
+
"default": "false",
|
|
227
|
+
"description": "On a phone, the open item replaces the list. Usually: an item is selected in the address.",
|
|
228
|
+
"required": false
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "stage-banner",
|
|
3
|
+
"type": "primitive",
|
|
4
|
+
"title": "Stage banner",
|
|
5
|
+
"summary": "The announcement of a chapter: a stage and its name on one line, or, large, a stage above a title and a line — a sober eyebrow by default, a stage call that slams in for the arcade flavour.",
|
|
6
|
+
"description": "The announcement of a chapter: a stage and its name on one line, or, large, a stage above a title and a line — a sober eyebrow by default, a stage call that slams in for the arcade flavour.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "blocks",
|
|
9
|
+
"platforms": "web",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"Before a chapter's heading on a told page or a tour (“Step 02 · Payments”).",
|
|
12
|
+
"To open a section that turns the story (`size=\"lg\"`): a final chapter, a reveal."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "Progress through a form or a checkout.",
|
|
17
|
+
"use": "stepper"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "A plain eyebrow above a section's heading.",
|
|
21
|
+
"use": "page"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"bestPractices": [
|
|
25
|
+
"Few words: the stage (“Step 02”) and a name of one or two words.",
|
|
26
|
+
"With `size=\"lg\"` and no heading after it, pass `titleAs=\"h2\"` so the section keeps its heading."
|
|
27
|
+
],
|
|
28
|
+
"accessibility": {
|
|
29
|
+
"keyboard": [],
|
|
30
|
+
"notes": [
|
|
31
|
+
"A paragraph by default; the large title can be a heading (`titleAs`).",
|
|
32
|
+
"Its entrance plays once in a stage and never under `prefers-reduced-motion`."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"related": [
|
|
36
|
+
"scroll-stage",
|
|
37
|
+
"stepper",
|
|
38
|
+
"page-hero"
|
|
39
|
+
],
|
|
40
|
+
"web": {
|
|
41
|
+
"entry": "@krizaka/ui/stage-banner",
|
|
42
|
+
"import": "import { StageBanner } from \"@krizaka/ui/stage-banner\";",
|
|
43
|
+
"props": [
|
|
44
|
+
{
|
|
45
|
+
"component": "StageBanner",
|
|
46
|
+
"description": "Announces a chapter: a stage and its name on one line, or (`size=\"lg\"`) a stage, a title and a line, centred.",
|
|
47
|
+
"props": [
|
|
48
|
+
{
|
|
49
|
+
"name": "stage",
|
|
50
|
+
"type": "ReactNode",
|
|
51
|
+
"default": null,
|
|
52
|
+
"description": "Where the reader is: “Step 02”, “Chapter 3”, “Final round”.",
|
|
53
|
+
"required": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "brand",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"default": null,
|
|
59
|
+
"description": "A brand scope (`orochia` → `.brand-orochia`).",
|
|
60
|
+
"required": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "name",
|
|
64
|
+
"type": "ReactNode",
|
|
65
|
+
"default": null,
|
|
66
|
+
"description": "`sm`: the name of the chapter, beside the stage.",
|
|
67
|
+
"required": false
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "size",
|
|
71
|
+
"type": "\"sm\" | \"lg\"",
|
|
72
|
+
"default": "sm",
|
|
73
|
+
"description": "`sm`: one line, before a chapter's heading. `lg`: centred, the stage above a title and a line — a section's opening.",
|
|
74
|
+
"required": false
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "subtitle",
|
|
78
|
+
"type": "ReactNode",
|
|
79
|
+
"default": null,
|
|
80
|
+
"description": "`lg`: one line under the title.",
|
|
81
|
+
"required": false
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"name": "title",
|
|
85
|
+
"type": "ReactNode",
|
|
86
|
+
"default": null,
|
|
87
|
+
"description": "`lg`: the title under the stage.",
|
|
88
|
+
"required": false
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "titleAs",
|
|
92
|
+
"type": "\"h2\" | \"h3\" | \"p\"",
|
|
93
|
+
"default": "p",
|
|
94
|
+
"description": "The element of the `lg` title: a heading when the banner opens a section that has none.",
|
|
95
|
+
"required": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "variant",
|
|
99
|
+
"type": "StoryVariant",
|
|
100
|
+
"default": "default",
|
|
101
|
+
"description": "`default`: a sober eyebrow. `arcade`: the stage call — a skewed plate that slams in, a light that sweeps it.",
|
|
102
|
+
"required": false
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
"examples": [
|
|
108
|
+
{
|
|
109
|
+
"name": "steps",
|
|
110
|
+
"title": "Before a chapter",
|
|
111
|
+
"description": "A stage and its name, sober then in the arcade flavour.",
|
|
112
|
+
"path": "examples/stage-banner/steps.tsx",
|
|
113
|
+
"module": "@krizaka/ui/registry/examples/stage-banner/steps",
|
|
114
|
+
"code": "import { StageBanner } from \"@krizaka/ui/stage-banner\";\n\n// Before a chapter's heading: where the reader is. Sober by default; `variant=\"arcade\"` for a told page.\nexport default function StageBannerSteps() {\n return (\n <div className=\"grid justify-items-start gap-4\">\n <StageBanner stage=\"Step 02\" name=\"Payments\" />\n <StageBanner variant=\"arcade\" stage=\"Stage 02\" name=\"Orazaka\" />\n </div>\n );\n}\n"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "round",
|
|
118
|
+
"title": "A section's opening",
|
|
119
|
+
"description": "`size=\"lg\"`: the stage, a title and a line — sober, then a final round.",
|
|
120
|
+
"path": "examples/stage-banner/round.tsx",
|
|
121
|
+
"module": "@krizaka/ui/registry/examples/stage-banner/round",
|
|
122
|
+
"code": "import { StageBanner } from \"@krizaka/ui/stage-banner\";\n\n// `size=\"lg\"`: a section's opening — the stage, a title (a heading here) and a line.\nexport default function StageBannerRound() {\n return (\n <div className=\"grid gap-10\">\n <StageBanner size=\"lg\" titleAs=\"h3\" stage=\"Chapter 3\" title=\"Get paid on your terms\" subtitle=\"Tips, challenges and auctions — 90 % to you.\" />\n <StageBanner size=\"lg\" variant=\"arcade\" stage=\"Final round\" title=\"The last boss\" subtitle=\"Eight heads, one by one.\" />\n </div>\n );\n}\n"
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
"native": null,
|
|
127
|
+
"files": [
|
|
128
|
+
{
|
|
129
|
+
"path": "meta.ts",
|
|
130
|
+
"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"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"path": "stage-banner/index.ts",
|
|
134
|
+
"content": "/** @krizaka/ui/stage-banner — `StageBanner`, the announcement of a chapter. Server-safe. Styles: story.css. */\nexport { StageBanner, type StageBannerProps } from \"./stage-banner\";\n"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"path": "stage-banner/meta.ts",
|
|
138
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Stage banner\",\n summary: \"The announcement of a chapter: a stage and its name on one line, or, large, a stage above a title and a line — a sober eyebrow by default, a stage call that slams in for the arcade flavour.\",\n status: \"beta\",\n category: \"blocks\",\n platforms: \"web\",\n whenToUse: [\n \"Before a chapter's heading on a told page or a tour (“Step 02 · Payments”).\",\n \"To open a section that turns the story (`size=\\\"lg\\\"`): a final chapter, a reveal.\",\n ],\n whenNotToUse: [\n { when: \"Progress through a form or a checkout.\", use: \"stepper\" },\n { when: \"A plain eyebrow above a section's heading.\", use: \"page\" },\n ],\n bestPractices: [\n \"Few words: the stage (“Step 02”) and a name of one or two words.\",\n \"With `size=\\\"lg\\\"` and no heading after it, pass `titleAs=\\\"h2\\\"` so the section keeps its heading.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\n \"A paragraph by default; the large title can be a heading (`titleAs`).\",\n \"Its entrance plays once in a stage and never under `prefers-reduced-motion`.\",\n ],\n },\n related: [\"scroll-stage\", \"stepper\", \"page-hero\"],\n web: {\n imports: [\"StageBanner\"],\n examples: [\n { name: \"steps\", title: \"Before a chapter\", description: \"A stage and its name, sober then in the arcade flavour.\" },\n { name: \"round\", title: \"A section's opening\", description: \"`size=\\\"lg\\\"`: the stage, a title and a line — sober, then a final round.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"path": "stage-banner/stage-banner.tsx",
|
|
142
|
+
"content": "// Server-safe. The announcement of a chapter (story.css): “Step 02 · Payments”, or, large, a round with its title and a\n// line under it. In a `Scene` of a `ScrollStage` it arrives once, after the scene's visual.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type StageBannerProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** Where the reader is: “Step 02”, “Chapter 3”, “Final round”. */\n stage: React.ReactNode;\n /** `sm`: the name of the chapter, beside the stage. */\n name?: React.ReactNode;\n /** `lg`: the title under the stage. */\n title?: React.ReactNode;\n /** `lg`: one line under the title. */\n subtitle?: React.ReactNode;\n /**\n * `sm`: one line, before a chapter's heading. `lg`: centred, the stage above a title and a line — a section's opening.\n * @default \"sm\"\n */\n size?: \"sm\" | \"lg\";\n /**\n * The element of the `lg` title: a heading when the banner opens a section that has none.\n * @default \"p\"\n */\n titleAs?: \"p\" | \"h2\" | \"h3\";\n /**\n * `default`: a sober eyebrow. `arcade`: the stage call — a skewed plate that slams in, a light that sweeps it.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** Announces a chapter: a stage and its name on one line, or (`size=\"lg\"`) a stage, a title and a line, centred. */\nexport function StageBanner({ stage, name, title, subtitle, size = \"sm\", titleAs: Title = \"p\", variant, brand, className, ...props }: StageBannerProps) {\n const cls = cn(\"kzs-banner\", storyVariantClass(variant), brandClass(brand), className);\n if (size === \"lg\")\n return (\n <div data-size=\"lg\" className={cls} {...props}>\n <span className=\"kzs-banner-stage\">{stage}</span>\n {title && <Title className=\"kzs-banner-title\">{title}</Title>}\n {subtitle && <p className=\"kzs-banner-sub\">{subtitle}</p>}\n </div>\n );\n return (\n <p className={cls} {...props}>\n <span className=\"kzs-banner-stage\">{stage}</span>\n {name && <span className=\"kzs-banner-name\">{name}</span>}\n <span className=\"kzs-banner-sweep\" aria-hidden />\n </p>\n );\n}\n"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"path": "story-variant.ts",
|
|
146
|
+
"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"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"dependencies": [],
|
|
150
|
+
"registryDependencies": [
|
|
151
|
+
"cn"
|
|
152
|
+
],
|
|
153
|
+
"demo": {
|
|
154
|
+
"path": "examples/stage-banner/steps.tsx",
|
|
155
|
+
"content": "import { StageBanner } from \"@krizaka/ui/stage-banner\";\n\n// Before a chapter's heading: where the reader is. Sober by default; `variant=\"arcade\"` for a told page.\nexport default function StageBannerSteps() {\n return (\n <div className=\"grid justify-items-start gap-4\">\n <StageBanner stage=\"Step 02\" name=\"Payments\" />\n <StageBanner variant=\"arcade\" stage=\"Stage 02\" name=\"Orazaka\" />\n </div>\n );\n}\n"
|
|
156
|
+
},
|
|
157
|
+
"props": [
|
|
158
|
+
{
|
|
159
|
+
"component": "StageBanner",
|
|
160
|
+
"description": "Announces a chapter: a stage and its name on one line, or (`size=\"lg\"`) a stage, a title and a line, centred.",
|
|
161
|
+
"props": [
|
|
162
|
+
{
|
|
163
|
+
"name": "stage",
|
|
164
|
+
"type": "ReactNode",
|
|
165
|
+
"default": null,
|
|
166
|
+
"description": "Where the reader is: “Step 02”, “Chapter 3”, “Final round”.",
|
|
167
|
+
"required": true
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"name": "brand",
|
|
171
|
+
"type": "string",
|
|
172
|
+
"default": null,
|
|
173
|
+
"description": "A brand scope (`orochia` → `.brand-orochia`).",
|
|
174
|
+
"required": false
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "name",
|
|
178
|
+
"type": "ReactNode",
|
|
179
|
+
"default": null,
|
|
180
|
+
"description": "`sm`: the name of the chapter, beside the stage.",
|
|
181
|
+
"required": false
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "size",
|
|
185
|
+
"type": "\"sm\" | \"lg\"",
|
|
186
|
+
"default": "sm",
|
|
187
|
+
"description": "`sm`: one line, before a chapter's heading. `lg`: centred, the stage above a title and a line — a section's opening.",
|
|
188
|
+
"required": false
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "subtitle",
|
|
192
|
+
"type": "ReactNode",
|
|
193
|
+
"default": null,
|
|
194
|
+
"description": "`lg`: one line under the title.",
|
|
195
|
+
"required": false
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "title",
|
|
199
|
+
"type": "ReactNode",
|
|
200
|
+
"default": null,
|
|
201
|
+
"description": "`lg`: the title under the stage.",
|
|
202
|
+
"required": false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"name": "titleAs",
|
|
206
|
+
"type": "\"h2\" | \"h3\" | \"p\"",
|
|
207
|
+
"default": "p",
|
|
208
|
+
"description": "The element of the `lg` title: a heading when the banner opens a section that has none.",
|
|
209
|
+
"required": false
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "variant",
|
|
213
|
+
"type": "StoryVariant",
|
|
214
|
+
"default": "default",
|
|
215
|
+
"description": "`default`: a sober eyebrow. `arcade`: the stage call — a skewed plate that slams in, a light that sweeps it.",
|
|
216
|
+
"required": false
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
]
|
|
221
|
+
}
|
package/registry/stat.json
CHANGED
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
"files": [
|
|
135
135
|
{
|
|
136
136
|
"path": "meta.ts",
|
|
137
|
-
"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 | \"action-bar\"\n | \"alert\"\n | \"argument-card\"\n | \"audio-player\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"cta-panel\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"glow-card\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"link-card\"\n | \"loader\"\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 | \"progress\"\n | \"radio-group\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\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 */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"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\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"
|
|
137
|
+
"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"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
"path": "stat/index.ts",
|