@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
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
**The Krizaka front-end platform's components, shared by every product.**
|
|
11
11
|
The primitives (button, badge, avatar, field, theme, countdown…) on the semantic `--kz-*` tokens, the animated marks
|
|
12
|
-
of Krizaka, Orazaka, Orochia and
|
|
12
|
+
of Krizaka, Orazaka, Orochia, Yazakia and Yororis, and the Krizaka motion signature — one easing, one way to enter, reveal, roll, shine
|
|
13
13
|
and open.
|
|
14
14
|
|
|
15
15
|
[](https://www.npmjs.com/package/@krizaka/ui)
|
|
@@ -160,10 +160,19 @@ light or a product's — is a set of tokens.
|
|
|
160
160
|
| `@krizaka/ui/stepper` | `Stepper` (`steps`: `title`, `description`, `status`, `value`, `content`; `current`, `labels` of the states, `orientation`) | server |
|
|
161
161
|
| `@krizaka/ui/number-ticker` | `NumberTicker` (`value`, `locale`, `format`, `trigger` view·change, `duration`, `announce`, `align`) | client |
|
|
162
162
|
| `@krizaka/ui/terminal-replay` | `TerminalReplay` (`steps` command + output lines with a tone, `label`, `title`, `prompt`, `playLabel`/`pauseLabel`/`replayLabel`, `copyLabel`/`copiedLabel`, `typingSpeed`, `lineDelay`, `stepDelay`, `rows`, `autoPlay`) | client |
|
|
163
|
+
| `@krizaka/ui/scroll-stage` | `ScrollStage` (`variant`, `threshold`, `as`) and `Scene` (`brand`, `as`): chapters played once as they scroll in, one loop each while on screen — the storytelling kit, styles in `@krizaka/ui/story.css` | client |
|
|
164
|
+
| `@krizaka/ui/choice-grid` | `ChoiceGrid` (`items` with `badge`/`eyebrow`/`extra`/`meta`/`href`, `label`, `tag`, `caption`, `prompt`, `value`/`defaultValue`/`onValueChange`, `linkAs`, `columns`, `variant`, `brand`): choices as tiles — a radio group when selectable, links with `href` | client |
|
|
165
|
+
| `@krizaka/ui/profile-card` | `ProfileCard` (`visual`, `name`, `statLabel`/`value`/`figure`, `stats`, `caption`, `variant`, `brand`): a profile at a glance; `StatGauge` (`label`, `value`, `max`, `valueText`, `figure`): one measured strength; native too | server |
|
|
166
|
+
| `@krizaka/ui/stage-banner` | `StageBanner` (`stage`, `name`, `size="lg"` with `title`/`subtitle`, `variant`) | server |
|
|
167
|
+
| `@krizaka/ui/goal-gauge` | `GoalGauge` (`label`, `segments`, `value`, `mode` fill · drain, `variant`): a goal in steps, a meter; native too | server |
|
|
168
|
+
| `@krizaka/ui/promise-card` | `PromiseCard` (`label`, `promise`, `keys`, `bearer`, `bearerLabel`, `bearerName`, `variant`): a promise, the keys that call it, who carries it | server |
|
|
169
|
+
| `@krizaka/ui/continue-prompt` | `ContinuePrompt` (`title`, `count`/`countdown`, children, `actionLabel`, `onAction`/`href`, `actionKey`, `highlight`, `hint`, `status`, `variant`) | server |
|
|
170
|
+
| `@krizaka/ui/achievement` | `Achievement` (`title`, `eyebrow`, `badge`, `replaced`, `locked`), `AchievementList`, `Emblem` (`sword` · `mirror` · `jewel`) | server |
|
|
171
|
+
| `@krizaka/ui/landscape` | `Landscape` (`tone` own · brand, `flock`, `phoenix`, `animated`, `position`, `fade`): the Krizaka valley at dusk, decorative | client |
|
|
163
172
|
| `@krizaka/ui/glow-card` | `GlowCard` (`glow` border·spotlight·both, `alive`, `asChild`) | client |
|
|
164
173
|
| `@krizaka/ui/marquee` | `Marquee` (`label`, `pauseLabel`, `playLabel`, `speed` px/s, `direction`, `fade`, `defaultPaused`) | client |
|
|
165
174
|
| `@krizaka/ui/section-backdrop` | `SectionBackdrop` (`as`, `direction` down·up, `dome`, `grid`, `media` blurred for depth of field, `animated`): a page section on the brand's section gradient — see `@krizaka/tokens` BRAND.md, "Visual language" | server |
|
|
166
|
-
| `@krizaka/ui/mascots` | `Mascot` (`bird` falcon·owl·duck·flamingo·pigeon·lovebird, `mood` welcome·thinking·success·empty·error, `tone` brand·own, `size`, `animated`, `title`), `MASCOT_BIRDS`, `MASCOT_MOODS`: the Krizaka flock, in the host brand's accent — one bird at a moment that matters (onboarding, a long wait, a success, an empty list, an error); native `Mascot` in `/native` | client |
|
|
175
|
+
| `@krizaka/ui/mascots` | `Mascot` (`bird` falcon·owl·duck·flamingo·pigeon·lovebird·crane, `mood` welcome·thinking·success·empty·error, `tone` brand·own, `size`, `animated`, `title`), `MASCOT_BIRDS`, `MASCOT_MOODS`: the Krizaka flock, in the host brand's accent — one bird at a moment that matters (onboarding, a long wait, a success, an empty list, an error); native `Mascot` in `/native` | client |
|
|
167
176
|
| `@krizaka/ui/iso` | the isometric kit: `IsoHub` (a hero driven by data: `layers`, `dome`, `satellites`, `highlight`), `IsoScene`, `IsoPrism`, `IsoStack`, `IsoDome`, `IsoTile`, `IsoLink`, `IsoNode`, `IsoLabel`, the projection helpers — static SVG animated by motion.css | server |
|
|
168
177
|
| `@krizaka/ui/motion` | `MotionObserver` (reveal, off-screen pause, settle, spotlight, magnetism) and `RotatingWord` (no layout shift) | client |
|
|
169
178
|
| `@krizaka/ui/pagination` | `Pagination` (pages: `page`, `pageCount`, `onPageChange` or `getHref` for links; cursor: `hasPrevious`/`hasNext`, `onPrevious`/`onNext`; `status`, `pageSize` + `pageSizeOptions`, `siblings`, `boundaries`, `labels`; folds into "Page 3 of 12" in a narrow container), `pageRange` | server |
|
|
@@ -191,6 +200,29 @@ light or a product's — is a set of tokens.
|
|
|
191
200
|
| `@krizaka/ui/action-bar` | `ActionBar` (`actions`: `href`, `label`, `icon`; `variant` buttons·icons — the words in a CSS tooltip —, `primaryFirst`, `size`, `label`, `linkAs`) | server |
|
|
192
201
|
| `@krizaka/ui/cta-panel` | `CtaPanel` (`id`, `title`, `body`, the actions as children, `level`, `reveal`) | server |
|
|
193
202
|
| `@krizaka/ui/toc` | `Toc` (`label`, `items`; the section being read marked), `TocLayout` (`toc`, the sections as children) | client |
|
|
203
|
+
| `@krizaka/ui/app-shell` | `AppShell.Root` (`defaultCollapsed`, `collapsed` + `onCollapsedChange`) `/Sidebar` (`label`, `brand`, `footer`, `collapseLabels`, `closeLabel`; a drawer on a phone) `/Group/Item` (`icon`, `label`, `current`, `badge`, `asChild`) `/Body/Header` (`title`, `menuLabel`, `actions`) `/Main` — see [Layouts and templates](#layouts-and-templates) | client |
|
|
204
|
+
| `@krizaka/ui/dashboard-layout` | `DashboardLayout` (`title`, `eyebrow`, `description`, `actions`, `toolbar`, `headingAs`), `Widget` (`title`, `description`, `action`, `span` 1·2·3·full, `level`) | server |
|
|
205
|
+
| `@krizaka/ui/settings-layout` | `SettingsLayout` (`title`, `description`, `nav`, `navLabel`, `linkAs`), `SettingsSection` (`title`, `description`, `footer`) | server |
|
|
206
|
+
| `@krizaka/ui/auth-layout` | `AuthLayout` (`brand`, `title`, `description`, `footer`, `legal`, `promise`, `aside`, `asideFooter`) | server |
|
|
207
|
+
| `@krizaka/ui/detail-layout` | `DetailLayout` (`back`, `media`, `eyebrow`, `title`, `status`, `meta`, `actions`, `tabs`, `aside`) | server |
|
|
208
|
+
| `@krizaka/ui/split-view` | `SplitView` (`listTitle`, `listActions`, `list`, `detailHead`, `detail`, `empty`, `showDetail`, `back`) | server |
|
|
209
|
+
| `@krizaka/ui/marketing-layout` | `MarketingLayout` (`header`, `footer`, `skipLabel`) | server |
|
|
210
|
+
| `@krizaka/ui/docs-layout` | `DocsLayout` (`sidebar`, `sidebarLabel`, `toc`) | server |
|
|
211
|
+
| `@krizaka/ui/landing-page` | `LandingPage` — a page template, see [Page templates](#page-templates) | server |
|
|
212
|
+
| `@krizaka/ui/product-page` | `ProductPage` — a page template, see [Page templates](#page-templates) | server |
|
|
213
|
+
| `@krizaka/ui/how-it-works-page` | `HowItWorksPage` — a page template, see [Page templates](#page-templates) | server |
|
|
214
|
+
| `@krizaka/ui/gallery-page` | `GalleryPage` — a page template, see [Page templates](#page-templates) | server |
|
|
215
|
+
| `@krizaka/ui/docs-hub-page` | `DocsHubPage` — a page template, see [Page templates](#page-templates) | server |
|
|
216
|
+
| `@krizaka/ui/docs-article-page` | `DocsArticlePage` — a page template, see [Page templates](#page-templates) | server |
|
|
217
|
+
| `@krizaka/ui/component-page` | `ComponentPage` — a page template, see [Page templates](#page-templates) | server |
|
|
218
|
+
| `@krizaka/ui/catalogue-page` | `CataloguePage` — a page template, see [Page templates](#page-templates) | server |
|
|
219
|
+
| `@krizaka/ui/longform-page` | `LongformPage` — a page template, see [Page templates](#page-templates) | server |
|
|
220
|
+
| `@krizaka/ui/changelog-page` | `ChangelogPage` — a page template, see [Page templates](#page-templates) | server |
|
|
221
|
+
| `@krizaka/ui/contact-page` | `ContactPage` — a page template, see [Page templates](#page-templates) | server |
|
|
222
|
+
| `@krizaka/ui/legal-page` | `LegalPage` — a page template, see [Page templates](#page-templates) | server |
|
|
223
|
+
| `@krizaka/ui/status-page` | `StatusPage` — a page template, see [Page templates](#page-templates) | server |
|
|
224
|
+
| `@krizaka/ui/error-page` | `ErrorPage` — a page template, see [Page templates](#page-templates) | server |
|
|
225
|
+
| `@krizaka/ui/pricing-page` | `PricingPage` — a page template, see [Page templates](#page-templates) | server |
|
|
194
226
|
| `@krizaka/ui/native/video-player` | React Native `VideoPlayer` on expo-video (optional peer) | native |
|
|
195
227
|
| `@krizaka/ui/native/media-capture` | React Native `MediaCapture` on expo-camera (optional peer) | native |
|
|
196
228
|
| `@krizaka/ui` | the marks, `MotionObserver`, `RotatingWord`, `cx` (unchanged) | client |
|
|
@@ -243,6 +275,41 @@ import { LinkCard } from "@krizaka/ui/link-card";
|
|
|
243
275
|
- **Motion.** `reveal` uses `[data-reveal]` (MotionObserver): never on the first screen. The pointer's light, the lifts
|
|
244
276
|
and the hops stop under `prefers-reduced-motion`; nothing loops.
|
|
245
277
|
|
|
278
|
+
## Page templates
|
|
279
|
+
|
|
280
|
+
> Category **templates** of krizaka.com/docs/ui: every page of a Krizaka site has its template.
|
|
281
|
+
|
|
282
|
+
Fifteen templates, each a **distinct composition** of the blocks — not the same card grid everywhere: `LandingPage`
|
|
283
|
+
(split hero with the product alive, a band of proofs, a bento), `ProductPage` (split hero in the product's brand,
|
|
284
|
+
compact argument cards, decisions, the bird's promise), `HowItWorksPage` (a numbered timeline, the visuals
|
|
285
|
+
alternating), `GalleryPage` (filters, staggered columns of media), `DocsHubPage` (search first, the collections in
|
|
286
|
+
their brand with quick links, quick starts, most read, what is new), `DocsArticlePage` (pages · article · contents,
|
|
287
|
+
pager), `ComponentPage` (preview, install, sections, related), `CataloguePage` (sticky filters beside the results),
|
|
288
|
+
`LongformPage` (chapters with outlined numbers, pull quotes in the margin), `ChangelogPage` (a sticky date beside each
|
|
289
|
+
entry, changes by kind), `ContactPage` (channels beside the form, what happens next), `LegalPage` (summary, sections,
|
|
290
|
+
contents), `StatusPage` (the state in words, each service — or « under construction »), `ErrorPage` (the code drawn,
|
|
291
|
+
the bird, a search, the ways back) and `PricingPage` (plans, comparison, credits, questions).
|
|
292
|
+
|
|
293
|
+
Words and content are props or slots; `brand` puts a page under `.brand-<id>`; calls to action use the cut button;
|
|
294
|
+
what rises does so with `[data-reveal]` (still under reduced motion); every one reads in one column on a phone, and
|
|
295
|
+
each example has a phone story. The templates import the blocks through the package's own entries, so a block's client
|
|
296
|
+
boundary stays where it is: a template is a Server Component.
|
|
297
|
+
|
|
298
|
+
## Layouts and screens
|
|
299
|
+
|
|
300
|
+
> Category **layouts** of krizaka.com/docs/ui, and **templates**: whole screens composed from the platform.
|
|
301
|
+
|
|
302
|
+
The shells of the products' screens, read from their real screens (Orochia web, admin and mobile; Orazaka web-client,
|
|
303
|
+
web-admin and mobile; krizaka.com): `AppShell` (sidebar that collapses, header, drawer on a phone), `DashboardLayout`
|
|
304
|
+
(a grid of widgets), `SettingsLayout`, `AuthLayout`, `DetailLayout`, `SplitView`, and for a site `MarketingLayout` and
|
|
305
|
+
`DocsLayout`. Every layout is responsive by construction — one column, a drawer, chips or a disclosure on a phone.
|
|
306
|
+
|
|
307
|
+
A **template** is an example flagged `template: true` in its layout's `meta.ts` (≤ 160 lines): a complete screen with
|
|
308
|
+
real words — Orochia's creator studio, Orazaka's console for Eric, an administration console, sign-in, onboarding,
|
|
309
|
+
settings, a video's page, messages, a product page, pricing and credits, a documentation hub. Each has a phone story
|
|
310
|
+
(`parameters.phone`: captured at 390 × 844). Copy one into the product, keep its structure, change the words. The
|
|
311
|
+
React Native shells are `@krizaka/ui/native`'s (DS4): same names where the concept is the same.
|
|
312
|
+
|
|
246
313
|
## Registry — the code drives the documentation
|
|
247
314
|
|
|
248
315
|
Every component is also published as data: **[krizaka.com/docs/ui](https://www.krizaka.com/docs/ui)** is generated
|
|
@@ -335,7 +402,7 @@ const { theme, scheme, mode, setMode, radius } = useTheme(); // theme.surface1,
|
|
|
335
402
|
| `Segmented` | `options` (`value`, `label`, `disabled`), `value`, `onValueChange`, `size` | The web `Tabs variant="segmented"` (a tab list). To filter, `Chip.Group`. |
|
|
336
403
|
| `Progress` | `variant` bar·ring, `size`, `value`/`max`, `label`, `valueText`, a ring's centre as children | The fill is the `accent` → `accent2` gradient (react-native-svg); it animates to each new value. |
|
|
337
404
|
| `Toaster`, `toast` | `toast(title, { description, tone, icon, action, onPress, id, duration, onDismiss })`, `toast.success/warning/error/info`, `toast.dismiss(id?)`; `Toaster closeLabel position offset duration max` | No sonner: a light queue of its own. `offset` takes the safe-area inset (no safe-area dependency). |
|
|
338
|
-
| `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `YazakiaMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
|
|
405
|
+
| `KrizakaMark`, `OrazakaMark`, `OrochiaMark`, `YazakiaMark`, `YororisMark`, `ProductMark` (`id`) | `size`, `animated`, `title`, `neutral` (default `theme.textMuted`) | The brand marks, drawn with react-native-svg from the web marks' geometry. |
|
|
339
406
|
|
|
340
407
|
Every animation (skeleton, badge dot, urgent countdown, progress, toast entrance, the marks) stops when the system
|
|
341
408
|
asks to reduce motion (`useReducedMotion()`). Accessibility goes through `role` and `aria-*` (RN ≥ 0.71): headings,
|
|
@@ -365,12 +432,13 @@ Testing Library (`src/native/*.test.tsx`); `scripts/native-dist.mjs` checks that
|
|
|
365
432
|
## The marks
|
|
366
433
|
|
|
367
434
|
```tsx
|
|
368
|
-
import { KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo, YazakiaLogo } from "@krizaka/ui";
|
|
435
|
+
import { KrizakaLogo, OrazakaLogo, OrochiaLogo, ProductLogo, YazakiaLogo, YororisLogo } from "@krizaka/ui";
|
|
369
436
|
|
|
370
437
|
<OrochiaLogo size={36} /> // decorative (aria-hidden)
|
|
371
438
|
<KrizakaLogo size={48} title="Krizaka" /> // an image with an accessible name
|
|
372
439
|
<ProductLogo id="orazaka" animated={false} /> // by id, still
|
|
373
|
-
<YazakiaLogo size={32} /> // Yazakia: emerald → turquoise, two
|
|
440
|
+
<YazakiaLogo size={32} /> // Yazakia: emerald → turquoise, two voices that meet
|
|
441
|
+
<YororisLogo size={32} /> // Yororis: sand → sage, the hold
|
|
374
442
|
```
|
|
375
443
|
|
|
376
444
|
Neutral strokes follow the host's `--kz-*` tokens when they exist (`--kz-border-strong`, `--kz-text-muted`…) and the
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { S as StoryVariant } from './story-variant-CLn4H5Nt.js';
|
|
3
|
+
|
|
4
|
+
type AchievementProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
5
|
+
/** What was achieved: the outcome, in a few words. */
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
/** A small line above: its number, its kind (“Milestone 03”). */
|
|
8
|
+
eyebrow?: React.ReactNode;
|
|
9
|
+
/** A glyph before the eyebrow (an `Emblem`, an icon). Decorative. */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** The badge in the corner (“Done”, “Unlocked”, arcade “Sealed”). */
|
|
12
|
+
badge?: React.ReactNode;
|
|
13
|
+
/** What it replaced or overcame, struck through above the title (“Paying 30 % to a platform”). */
|
|
14
|
+
replaced?: React.ReactNode;
|
|
15
|
+
/** Not reached yet: muted, its badge neutral. Say it in the badge too (“Locked”). */
|
|
16
|
+
locked?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `default`: a calm badge. `arcade`: a mono stamp that slams onto the card.
|
|
19
|
+
* @default "default"
|
|
20
|
+
*/
|
|
21
|
+
variant?: StoryVariant;
|
|
22
|
+
/** A brand scope (`orochia` → `.brand-orochia`). */
|
|
23
|
+
brand?: string;
|
|
24
|
+
};
|
|
25
|
+
/** Something done: an eyebrow, a badge, what it replaced (struck through) and the outcome. */
|
|
26
|
+
declare function Achievement({ title, eyebrow, icon, badge, replaced, locked, variant, brand, className, ...props }: AchievementProps): React.JSX.Element;
|
|
27
|
+
type AchievementListProps = React.OlHTMLAttributes<HTMLOListElement> & {
|
|
28
|
+
/** The `Achievement`s, in order: each one becomes an item of the list (its badge arrives after the previous one's). */
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* The narrowest a card gets before the grid drops a column.
|
|
32
|
+
* @default "220px"
|
|
33
|
+
*/
|
|
34
|
+
minWidth?: string;
|
|
35
|
+
/** The look of every card: `default` or `arcade`. */
|
|
36
|
+
variant?: StoryVariant;
|
|
37
|
+
/** A brand scope (`orochia` → `.brand-orochia`). */
|
|
38
|
+
brand?: string;
|
|
39
|
+
};
|
|
40
|
+
/** An ordered list of `Achievement`s on one grid of hairlines. */
|
|
41
|
+
declare function AchievementList({ children, minWidth, variant, brand, className, style, ...props }: AchievementListProps): React.JSX.Element;
|
|
42
|
+
type EmblemProps = Omit<React.SVGProps<SVGSVGElement>, "children"> & {
|
|
43
|
+
/** The emblem: `sword` (courage, the first step), `mirror` (clarity, honesty), `jewel` (care, what is kept). */
|
|
44
|
+
kind: "sword" | "mirror" | "jewel";
|
|
45
|
+
/**
|
|
46
|
+
* Width and height in pixels.
|
|
47
|
+
* @default 20
|
|
48
|
+
*/
|
|
49
|
+
size?: number;
|
|
50
|
+
};
|
|
51
|
+
/** Three line emblems for achievements and choices (`currentColor`, decorative). */
|
|
52
|
+
declare function Emblem({ kind, size, ...props }: EmblemProps): React.JSX.Element;
|
|
53
|
+
|
|
54
|
+
export { Achievement, AchievementList, type AchievementListProps, type AchievementProps, Emblem, type EmblemProps };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {
|
|
2
|
+
brandClass,
|
|
3
|
+
cn,
|
|
4
|
+
storyVariantClass
|
|
5
|
+
} from "./chunk-VCAAHCHL.js";
|
|
6
|
+
|
|
7
|
+
// src/achievement/achievement.tsx
|
|
8
|
+
import * as React from "react";
|
|
9
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
function Achievement({ title, eyebrow, icon, badge, replaced, locked, variant, brand, className, ...props }) {
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", { "data-locked": locked ? "" : void 0, className: cn("kzs-achievement", storyVariantClass(variant), brandClass(brand), className), ...props, children: [
|
|
12
|
+
(eyebrow || badge || icon) && /* @__PURE__ */ jsxs("div", { className: "kzs-achievement-head", children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("span", { className: "kzs-achievement-eyebrow", children: [
|
|
14
|
+
icon && /* @__PURE__ */ jsx("span", { "aria-hidden": true, children: icon }),
|
|
15
|
+
eyebrow
|
|
16
|
+
] }),
|
|
17
|
+
badge && /* @__PURE__ */ jsx("span", { className: "kzs-achievement-badge", children: badge })
|
|
18
|
+
] }),
|
|
19
|
+
replaced && /* @__PURE__ */ jsx("del", { className: "kzs-achievement-replaced", style: { textDecorationLine: "line-through" }, children: replaced }),
|
|
20
|
+
/* @__PURE__ */ jsx("p", { className: "kzs-achievement-title", children: title })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
function AchievementList({ children, minWidth, variant, brand, className, style, ...props }) {
|
|
24
|
+
const items = React.Children.toArray(children);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"ol",
|
|
27
|
+
{
|
|
28
|
+
className: cn("kzs-achievements", storyVariantClass(variant), brandClass(brand), className),
|
|
29
|
+
style: minWidth ? { "--kzs-min": minWidth, ...style } : style,
|
|
30
|
+
...props,
|
|
31
|
+
children: items.map((child, i) => /* @__PURE__ */ jsx("li", { style: { "--i": i }, children: child }, React.isValidElement(child) && child.key != null ? child.key : i))
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
function Emblem({ kind, size = 20, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
viewBox: "0 0 48 48",
|
|
40
|
+
width: size,
|
|
41
|
+
height: size,
|
|
42
|
+
fill: "none",
|
|
43
|
+
stroke: "currentColor",
|
|
44
|
+
strokeWidth: 2.4,
|
|
45
|
+
strokeLinecap: "round",
|
|
46
|
+
strokeLinejoin: "round",
|
|
47
|
+
"aria-hidden": true,
|
|
48
|
+
focusable: "false",
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
kind === "sword" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
/* @__PURE__ */ jsx("path", { d: "M24 3 L27 28 L24 36 L21 28 Z" }),
|
|
53
|
+
/* @__PURE__ */ jsx("path", { d: "M15 30 H33 M24 36 V45" })
|
|
54
|
+
] }),
|
|
55
|
+
kind === "mirror" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
|
+
/* @__PURE__ */ jsx("circle", { cx: "24", cy: "24", r: "17" }),
|
|
57
|
+
/* @__PURE__ */ jsx("circle", { cx: "24", cy: "24", r: "9" }),
|
|
58
|
+
/* @__PURE__ */ jsx("path", { d: "M24 2 V6 M24 42 V46 M2 24 H6 M42 24 H46" })
|
|
59
|
+
] }),
|
|
60
|
+
kind === "jewel" && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx("path", { d: "M31 10 a13 13 0 1 1 -15 19 a8 8 0 0 0 8 -9 a8 8 0 0 1 7 -10 Z" }),
|
|
62
|
+
/* @__PURE__ */ jsx("circle", { cx: "29", cy: "17", r: "2.6", fill: "currentColor", stroke: "none" })
|
|
63
|
+
] })
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
Achievement,
|
|
70
|
+
AchievementList,
|
|
71
|
+
Emblem
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=achievement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/achievement/achievement.tsx"],"sourcesContent":["// Server-safe. Something done, and what it replaced (story.css): a milestone reached, a dare completed, a problem out of\n// the way. A list of them shares one grid of hairlines; in a `Scene` of a `ScrollStage` their badges arrive one by one.\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type AchievementProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** What was achieved: the outcome, in a few words. */\n title: React.ReactNode;\n /** A small line above: its number, its kind (“Milestone 03”). */\n eyebrow?: React.ReactNode;\n /** A glyph before the eyebrow (an `Emblem`, an icon). Decorative. */\n icon?: React.ReactNode;\n /** The badge in the corner (“Done”, “Unlocked”, arcade “Sealed”). */\n badge?: React.ReactNode;\n /** What it replaced or overcame, struck through above the title (“Paying 30 % to a platform”). */\n replaced?: React.ReactNode;\n /** Not reached yet: muted, its badge neutral. Say it in the badge too (“Locked”). */\n locked?: boolean;\n /**\n * `default`: a calm badge. `arcade`: a mono stamp that slams onto the card.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** Something done: an eyebrow, a badge, what it replaced (struck through) and the outcome. */\nexport function Achievement({ title, eyebrow, icon, badge, replaced, locked, variant, brand, className, ...props }: AchievementProps) {\n return (\n <div data-locked={locked ? \"\" : undefined} className={cn(\"kzs-achievement\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {(eyebrow || badge || icon) && (\n <div className=\"kzs-achievement-head\">\n <span className=\"kzs-achievement-eyebrow\">\n {icon && <span aria-hidden>{icon}</span>}\n {eyebrow}\n </span>\n {badge && <span className=\"kzs-achievement-badge\">{badge}</span>}\n </div>\n )}\n {replaced && (\n <del className=\"kzs-achievement-replaced\" style={{ textDecorationLine: \"line-through\" }}>\n {replaced}\n </del>\n )}\n <p className=\"kzs-achievement-title\">{title}</p>\n </div>\n );\n}\n\nexport type AchievementListProps = React.OlHTMLAttributes<HTMLOListElement> & {\n /** The `Achievement`s, in order: each one becomes an item of the list (its badge arrives after the previous one's). */\n children: React.ReactNode;\n /**\n * The narrowest a card gets before the grid drops a column.\n * @default \"220px\"\n */\n minWidth?: string;\n /** The look of every card: `default` or `arcade`. */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`). */\n brand?: string;\n};\n\n/** An ordered list of `Achievement`s on one grid of hairlines. */\nexport function AchievementList({ children, minWidth, variant, brand, className, style, ...props }: AchievementListProps) {\n const items = React.Children.toArray(children);\n return (\n <ol\n className={cn(\"kzs-achievements\", storyVariantClass(variant), brandClass(brand), className)}\n style={minWidth ? ({ \"--kzs-min\": minWidth, ...style } as React.CSSProperties) : style}\n {...props}\n >\n {items.map((child, i) => (\n <li key={React.isValidElement(child) && child.key != null ? child.key : i} style={{ \"--i\": i } as React.CSSProperties}>\n {child}\n </li>\n ))}\n </ol>\n );\n}\n\nexport type EmblemProps = Omit<React.SVGProps<SVGSVGElement>, \"children\"> & {\n /** The emblem: `sword` (courage, the first step), `mirror` (clarity, honesty), `jewel` (care, what is kept). */\n kind: \"sword\" | \"mirror\" | \"jewel\";\n /**\n * Width and height in pixels.\n * @default 20\n */\n size?: number;\n};\n\n/** Three line emblems for achievements and choices (`currentColor`, decorative). */\nexport function Emblem({ kind, size = 20, ...props }: EmblemProps) {\n return (\n <svg\n viewBox=\"0 0 48 48\"\n width={size}\n height={size}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={2.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n focusable=\"false\"\n {...props}\n >\n {kind === \"sword\" && (\n <>\n <path d=\"M24 3 L27 28 L24 36 L21 28 Z\" />\n <path d=\"M15 30 H33 M24 36 V45\" />\n </>\n )}\n {kind === \"mirror\" && (\n <>\n <circle cx=\"24\" cy=\"24\" r=\"17\" />\n <circle cx=\"24\" cy=\"24\" r=\"9\" />\n <path d=\"M24 2 V6 M24 42 V46 M2 24 H6 M42 24 H46\" />\n </>\n )}\n {kind === \"jewel\" && (\n <>\n <path d=\"M31 10 a13 13 0 1 1 -15 19 a8 8 0 0 0 8 -9 a8 8 0 0 1 7 -10 Z\" />\n <circle cx=\"29\" cy=\"17\" r=\"2.6\" fill=\"currentColor\" stroke=\"none\" />\n </>\n )}\n </svg>\n );\n}\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AAiCb,SA4EF,UA3Ea,KADX;AALH,SAAS,YAAY,EAAE,OAAO,SAAS,MAAM,OAAO,UAAU,QAAQ,SAAS,OAAO,WAAW,GAAG,MAAM,GAAqB;AACpI,SACE,qBAAC,SAAI,eAAa,SAAS,KAAK,QAAW,WAAW,GAAG,mBAAmB,kBAAkB,OAAO,GAAG,WAAW,KAAK,GAAG,SAAS,GAAI,GAAG,OACvI;AAAA,gBAAW,SAAS,SACpB,qBAAC,SAAI,WAAU,wBACb;AAAA,2BAAC,UAAK,WAAU,2BACb;AAAA,gBAAQ,oBAAC,UAAK,eAAW,MAAE,gBAAK;AAAA,QAChC;AAAA,SACH;AAAA,MACC,SAAS,oBAAC,UAAK,WAAU,yBAAyB,iBAAM;AAAA,OAC3D;AAAA,IAED,YACC,oBAAC,SAAI,WAAU,4BAA2B,OAAO,EAAE,oBAAoB,eAAe,GACnF,oBACH;AAAA,IAEF,oBAAC,OAAE,WAAU,yBAAyB,iBAAM;AAAA,KAC9C;AAEJ;AAiBO,SAAS,gBAAgB,EAAE,UAAU,UAAU,SAAS,OAAO,WAAW,OAAO,GAAG,MAAM,GAAyB;AACxH,QAAM,QAAc,eAAS,QAAQ,QAAQ;AAC7C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,oBAAoB,kBAAkB,OAAO,GAAG,WAAW,KAAK,GAAG,SAAS;AAAA,MAC1F,OAAO,WAAY,EAAE,aAAa,UAAU,GAAG,MAAM,IAA4B;AAAA,MAChF,GAAG;AAAA,MAEH,gBAAM,IAAI,CAAC,OAAO,MACjB,oBAAC,QAA0E,OAAO,EAAE,OAAO,EAAE,GAC1F,mBADY,qBAAe,KAAK,KAAK,MAAM,OAAO,OAAO,MAAM,MAAM,CAExE,CACD;AAAA;AAAA,EACH;AAEJ;AAaO,SAAS,OAAO,EAAE,MAAM,OAAO,IAAI,GAAG,MAAM,GAAgB;AACjE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,MAAK;AAAA,MACL,QAAO;AAAA,MACP,aAAa;AAAA,MACb,eAAc;AAAA,MACd,gBAAe;AAAA,MACf,eAAW;AAAA,MACX,WAAU;AAAA,MACT,GAAG;AAAA,MAEH;AAAA,iBAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,gCAA+B;AAAA,UACvC,oBAAC,UAAK,GAAE,yBAAwB;AAAA,WAClC;AAAA,QAED,SAAS,YACR,iCACE;AAAA,8BAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,MAAK;AAAA,UAC/B,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,KAAI;AAAA,UAC9B,oBAAC,UAAK,GAAE,2CAA0C;AAAA,WACpD;AAAA,QAED,SAAS,WACR,iCACE;AAAA,8BAAC,UAAK,GAAE,iEAAgE;AAAA,UACxE,oBAAC,YAAO,IAAG,MAAK,IAAG,MAAK,GAAE,OAAM,MAAK,gBAAe,QAAO,QAAO;AAAA,WACpE;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const appShell: tailwind_variants.TVReturnType<{
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
7
|
+
root?: tailwind_variants.ClassValue;
|
|
8
|
+
drawer?: tailwind_variants.ClassValue;
|
|
9
|
+
overlay?: tailwind_variants.ClassValue;
|
|
10
|
+
brand?: tailwind_variants.ClassValue;
|
|
11
|
+
nav?: tailwind_variants.ClassValue;
|
|
12
|
+
group?: tailwind_variants.ClassValue;
|
|
13
|
+
itemLabel?: tailwind_variants.ClassValue;
|
|
14
|
+
footer?: tailwind_variants.ClassValue;
|
|
15
|
+
body?: tailwind_variants.ClassValue;
|
|
16
|
+
header?: tailwind_variants.ClassValue;
|
|
17
|
+
title?: tailwind_variants.ClassValue;
|
|
18
|
+
actions?: tailwind_variants.ClassValue;
|
|
19
|
+
main?: tailwind_variants.ClassValue;
|
|
20
|
+
sidebar?: tailwind_variants.ClassValue;
|
|
21
|
+
item?: tailwind_variants.ClassValue;
|
|
22
|
+
itemBadge?: tailwind_variants.ClassValue;
|
|
23
|
+
collapse?: tailwind_variants.ClassValue;
|
|
24
|
+
menuButton?: tailwind_variants.ClassValue;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
[x: string]: {
|
|
29
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
30
|
+
root?: tailwind_variants.ClassValue;
|
|
31
|
+
drawer?: tailwind_variants.ClassValue;
|
|
32
|
+
overlay?: tailwind_variants.ClassValue;
|
|
33
|
+
brand?: tailwind_variants.ClassValue;
|
|
34
|
+
nav?: tailwind_variants.ClassValue;
|
|
35
|
+
group?: tailwind_variants.ClassValue;
|
|
36
|
+
itemLabel?: tailwind_variants.ClassValue;
|
|
37
|
+
footer?: tailwind_variants.ClassValue;
|
|
38
|
+
body?: tailwind_variants.ClassValue;
|
|
39
|
+
header?: tailwind_variants.ClassValue;
|
|
40
|
+
title?: tailwind_variants.ClassValue;
|
|
41
|
+
actions?: tailwind_variants.ClassValue;
|
|
42
|
+
main?: tailwind_variants.ClassValue;
|
|
43
|
+
sidebar?: tailwind_variants.ClassValue;
|
|
44
|
+
item?: tailwind_variants.ClassValue;
|
|
45
|
+
itemBadge?: tailwind_variants.ClassValue;
|
|
46
|
+
collapse?: tailwind_variants.ClassValue;
|
|
47
|
+
menuButton?: tailwind_variants.ClassValue;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
} | {}, {
|
|
51
|
+
root: string;
|
|
52
|
+
sidebar: string;
|
|
53
|
+
drawer: string;
|
|
54
|
+
overlay: string;
|
|
55
|
+
brand: string;
|
|
56
|
+
nav: string;
|
|
57
|
+
group: string;
|
|
58
|
+
item: string;
|
|
59
|
+
itemLabel: string;
|
|
60
|
+
itemBadge: string;
|
|
61
|
+
footer: string;
|
|
62
|
+
collapse: string;
|
|
63
|
+
body: string;
|
|
64
|
+
header: string;
|
|
65
|
+
menuButton: string;
|
|
66
|
+
title: string;
|
|
67
|
+
actions: string;
|
|
68
|
+
main: string;
|
|
69
|
+
}, undefined, {
|
|
70
|
+
[key: string]: {
|
|
71
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
72
|
+
root?: tailwind_variants.ClassValue;
|
|
73
|
+
drawer?: tailwind_variants.ClassValue;
|
|
74
|
+
overlay?: tailwind_variants.ClassValue;
|
|
75
|
+
brand?: tailwind_variants.ClassValue;
|
|
76
|
+
nav?: tailwind_variants.ClassValue;
|
|
77
|
+
group?: tailwind_variants.ClassValue;
|
|
78
|
+
itemLabel?: tailwind_variants.ClassValue;
|
|
79
|
+
footer?: tailwind_variants.ClassValue;
|
|
80
|
+
body?: tailwind_variants.ClassValue;
|
|
81
|
+
header?: tailwind_variants.ClassValue;
|
|
82
|
+
title?: tailwind_variants.ClassValue;
|
|
83
|
+
actions?: tailwind_variants.ClassValue;
|
|
84
|
+
main?: tailwind_variants.ClassValue;
|
|
85
|
+
sidebar?: tailwind_variants.ClassValue;
|
|
86
|
+
item?: tailwind_variants.ClassValue;
|
|
87
|
+
itemBadge?: tailwind_variants.ClassValue;
|
|
88
|
+
collapse?: tailwind_variants.ClassValue;
|
|
89
|
+
menuButton?: tailwind_variants.ClassValue;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
} | {}, {
|
|
93
|
+
root: string;
|
|
94
|
+
sidebar: string;
|
|
95
|
+
drawer: string;
|
|
96
|
+
overlay: string;
|
|
97
|
+
brand: string;
|
|
98
|
+
nav: string;
|
|
99
|
+
group: string;
|
|
100
|
+
item: string;
|
|
101
|
+
itemLabel: string;
|
|
102
|
+
itemBadge: string;
|
|
103
|
+
footer: string;
|
|
104
|
+
collapse: string;
|
|
105
|
+
body: string;
|
|
106
|
+
header: string;
|
|
107
|
+
menuButton: string;
|
|
108
|
+
title: string;
|
|
109
|
+
actions: string;
|
|
110
|
+
main: string;
|
|
111
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
112
|
+
root: string;
|
|
113
|
+
sidebar: string;
|
|
114
|
+
drawer: string;
|
|
115
|
+
overlay: string;
|
|
116
|
+
brand: string;
|
|
117
|
+
nav: string;
|
|
118
|
+
group: string;
|
|
119
|
+
item: string;
|
|
120
|
+
itemLabel: string;
|
|
121
|
+
itemBadge: string;
|
|
122
|
+
footer: string;
|
|
123
|
+
collapse: string;
|
|
124
|
+
body: string;
|
|
125
|
+
header: string;
|
|
126
|
+
menuButton: string;
|
|
127
|
+
title: string;
|
|
128
|
+
actions: string;
|
|
129
|
+
main: string;
|
|
130
|
+
}>>;
|
|
131
|
+
type AppShellRootProps = React.ComponentProps<"div"> & {
|
|
132
|
+
/** The sidebar starts collapsed to its icons (desktop). */
|
|
133
|
+
defaultCollapsed?: boolean;
|
|
134
|
+
/** Controlled collapse (desktop): pair with `onCollapsedChange` to persist the choice. */
|
|
135
|
+
collapsed?: boolean;
|
|
136
|
+
/** Called when the sidebar collapses or expands. */
|
|
137
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
138
|
+
};
|
|
139
|
+
/** The shell: holds the collapse (desktop) and the drawer (phone) state. Children: Sidebar, then Body. */
|
|
140
|
+
declare function AppShellRoot({ defaultCollapsed, collapsed: controlled, onCollapsedChange, className, ...props }: AppShellRootProps): React.JSX.Element;
|
|
141
|
+
type AppShellSidebarProps = Omit<React.ComponentProps<"nav">, "children"> & {
|
|
142
|
+
/** The navigation's accessible name (`Studio`, `Administration`). */
|
|
143
|
+
label: string;
|
|
144
|
+
/** The brand at the top: the product's mark and name (a link home through `asChild` of your router, or plain). */
|
|
145
|
+
brand?: React.ReactNode;
|
|
146
|
+
/** The sections: `AppShell.Group` and `AppShell.Item`. */
|
|
147
|
+
children: React.ReactNode;
|
|
148
|
+
/** At the bottom, above the collapse button: the account, a plan, the version. */
|
|
149
|
+
footer?: React.ReactNode;
|
|
150
|
+
/** The collapse button's words, `[collapse, expand]` (desktop only). Without it the sidebar cannot collapse. */
|
|
151
|
+
collapseLabels?: readonly [string, string];
|
|
152
|
+
/** The drawer's close button words (phone). */
|
|
153
|
+
closeLabel: string;
|
|
154
|
+
};
|
|
155
|
+
/** The sidebar: on a desktop a column that collapses to its icons; on a phone the same content in a drawer. */
|
|
156
|
+
declare function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }: AppShellSidebarProps): React.JSX.Element;
|
|
157
|
+
type AppShellGroupProps = React.ComponentProps<"p"> & {
|
|
158
|
+
/** The group's name, above its items (hidden when the sidebar is collapsed). */
|
|
159
|
+
children: React.ReactNode;
|
|
160
|
+
};
|
|
161
|
+
/** A heading between groups of items. */
|
|
162
|
+
declare function AppShellGroup({ className, ...props }: AppShellGroupProps): React.JSX.Element;
|
|
163
|
+
type AppShellItemProps = Omit<React.ComponentProps<"a">, "children"> & {
|
|
164
|
+
/** The item's icon (a signature icon): it stays when the sidebar collapses. */
|
|
165
|
+
icon?: React.ReactNode;
|
|
166
|
+
/** Its words: the accessible name, hidden visually when collapsed (the icon carries a tooltip through `title`). */
|
|
167
|
+
label: string;
|
|
168
|
+
/** The screen it opens is the current one: `aria-current="page"`. */
|
|
169
|
+
current?: boolean;
|
|
170
|
+
/** A count beside it (unread, pending): a number or a few characters. */
|
|
171
|
+
badge?: React.ReactNode;
|
|
172
|
+
/** Renders your link (Next's `Link`) with the item's look: pass it as the only child. */
|
|
173
|
+
asChild?: boolean;
|
|
174
|
+
/** Your link element when `asChild`. */
|
|
175
|
+
children?: React.ReactElement;
|
|
176
|
+
};
|
|
177
|
+
/** A destination of the sidebar: icon, words, a count. */
|
|
178
|
+
declare function AppShellItem({ icon, label, current, badge, asChild, children, className, ...props }: AppShellItemProps): React.JSX.Element;
|
|
179
|
+
/** The column right of the sidebar: Header, then Main. */
|
|
180
|
+
declare function AppShellBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
181
|
+
type AppShellHeaderProps = Omit<React.ComponentProps<"header">, "title"> & {
|
|
182
|
+
/** The screen's title (an `h1`). */
|
|
183
|
+
title?: React.ReactNode;
|
|
184
|
+
/** The button that opens the drawer on a phone: its words. */
|
|
185
|
+
menuLabel: string;
|
|
186
|
+
/** The screen's actions, on the right. */
|
|
187
|
+
actions?: React.ReactNode;
|
|
188
|
+
};
|
|
189
|
+
/** The top of the screen: the drawer's button (phone), the title, the actions. Sticky. */
|
|
190
|
+
declare function AppShellHeader({ title, menuLabel, actions, className, children, ...props }: AppShellHeaderProps): React.JSX.Element;
|
|
191
|
+
/** The screen's content. */
|
|
192
|
+
declare function AppShellMain({ className, ...props }: React.ComponentProps<"main">): React.JSX.Element;
|
|
193
|
+
declare const AppShell: {
|
|
194
|
+
Root: typeof AppShellRoot;
|
|
195
|
+
Sidebar: typeof AppShellSidebar;
|
|
196
|
+
Group: typeof AppShellGroup;
|
|
197
|
+
Item: typeof AppShellItem;
|
|
198
|
+
Body: typeof AppShellBody;
|
|
199
|
+
Header: typeof AppShellHeader;
|
|
200
|
+
Main: typeof AppShellMain;
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
export { AppShell, AppShellBody, AppShellGroup, type AppShellGroupProps, AppShellHeader, type AppShellHeaderProps, AppShellItem, type AppShellItemProps, AppShellMain, AppShellRoot, type AppShellRootProps, AppShellSidebar, type AppShellSidebarProps, appShell };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
ChevronGlyph,
|
|
4
|
+
CloseGlyph
|
|
5
|
+
} from "./chunk-AZPKXP3O.js";
|
|
6
|
+
import {
|
|
7
|
+
cn
|
|
8
|
+
} from "./chunk-5AXLA4LK.js";
|
|
9
|
+
|
|
10
|
+
// src/app-shell/app-shell.tsx
|
|
11
|
+
import { Dialog as DialogPrimitive, Slot } from "radix-ui";
|
|
12
|
+
import * as React from "react";
|
|
13
|
+
import { tv } from "tailwind-variants";
|
|
14
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
|
+
var appShell = tv({
|
|
16
|
+
slots: {
|
|
17
|
+
root: "flex min-h-dvh w-full bg-surface-0 text-fg",
|
|
18
|
+
sidebar: "sticky top-0 hidden h-dvh shrink-0 flex-col border-r border-border-subtle bg-surface-1 transition-[width] duration-300 motion-reduce:transition-none md:flex w-64 data-collapsed:w-[4.25rem]",
|
|
19
|
+
drawer: "kz-dialog fixed inset-y-0 left-0 z-50 flex w-[min(20rem,88vw)] flex-col border-r border-border-default bg-surface-1 pl-[env(safe-area-inset-left)] shadow-lg focus:outline-hidden",
|
|
20
|
+
overlay: "kz-overlay fixed inset-0 z-50 bg-overlay backdrop-blur-xs",
|
|
21
|
+
brand: "flex h-14 shrink-0 items-center gap-2.5 px-4 font-display text-[15px] font-bold tracking-tight [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0",
|
|
22
|
+
nav: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2",
|
|
23
|
+
group: "mt-3 mb-1 px-3 font-mono text-[10.5px] font-semibold uppercase tracking-[0.14em] text-fg-secondary [[data-collapsed]_&]:sr-only",
|
|
24
|
+
item: "group/item relative flex h-10 items-center gap-3 rounded-lg px-3 text-sm font-medium text-fg-secondary no-underline transition-colors hover:bg-surface-2 hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current=page]:bg-accent-soft aria-[current=page]:text-fg aria-[current=page]:before:absolute aria-[current=page]:before:inset-y-2 aria-[current=page]:before:-left-2 aria-[current=page]:before:w-1 aria-[current=page]:before:rounded-full aria-[current=page]:before:bg-accent [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0 [&>svg]:h-[18px] [&>svg]:w-[18px] [&>svg]:shrink-0",
|
|
25
|
+
itemLabel: "min-w-0 flex-1 truncate [[data-collapsed]_&]:sr-only",
|
|
26
|
+
itemBadge: "ml-auto inline-flex min-w-5 items-center justify-center rounded-full bg-accent px-1.5 text-[11px] font-bold text-on-accent [[data-collapsed]_&]:absolute [[data-collapsed]_&]:right-1.5 [[data-collapsed]_&]:top-1 [[data-collapsed]_&]:min-w-4 [[data-collapsed]_&]:px-1 [[data-collapsed]_&]:text-[10px]",
|
|
27
|
+
footer: "shrink-0 border-t border-border-subtle p-2",
|
|
28
|
+
collapse: "hidden h-9 w-full items-center gap-2 rounded-lg px-3 text-xs font-medium text-fg-secondary hover:bg-surface-2 hover:text-fg md:flex focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring [[data-collapsed]_&]:justify-center [[data-collapsed]_&]:px-0",
|
|
29
|
+
body: "flex min-w-0 flex-1 flex-col",
|
|
30
|
+
header: "sticky top-0 z-30 flex h-14 shrink-0 items-center gap-3 border-b border-border-subtle bg-surface-0/85 px-4 backdrop-blur-xl md:px-6",
|
|
31
|
+
menuButton: "inline-flex h-9 w-9 items-center justify-center rounded-lg border border-border-subtle bg-surface-1 text-fg md:hidden focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
32
|
+
title: "min-w-0 flex-1 truncate font-display text-base font-bold tracking-tight",
|
|
33
|
+
actions: "ml-auto flex shrink-0 items-center gap-2",
|
|
34
|
+
main: "min-w-0 flex-1 px-4 py-6 md:px-6 md:py-8"
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var s = appShell();
|
|
38
|
+
var ShellContext = React.createContext(null);
|
|
39
|
+
var useShell = () => {
|
|
40
|
+
const ctx = React.useContext(ShellContext);
|
|
41
|
+
if (!ctx) throw new Error("AppShell parts must be inside <AppShell.Root>");
|
|
42
|
+
return ctx;
|
|
43
|
+
};
|
|
44
|
+
function AppShellRoot({ defaultCollapsed = false, collapsed: controlled, onCollapsedChange, className, ...props }) {
|
|
45
|
+
const [own, setOwn] = React.useState(defaultCollapsed);
|
|
46
|
+
const [open, setOpen] = React.useState(false);
|
|
47
|
+
const collapsed = controlled ?? own;
|
|
48
|
+
const setCollapsed = React.useCallback(
|
|
49
|
+
(value2) => {
|
|
50
|
+
if (controlled === void 0) setOwn(value2);
|
|
51
|
+
onCollapsedChange?.(value2);
|
|
52
|
+
},
|
|
53
|
+
[controlled, onCollapsedChange]
|
|
54
|
+
);
|
|
55
|
+
const value = React.useMemo(() => ({ collapsed, setCollapsed, open, setOpen, inDrawer: false }), [collapsed, setCollapsed, open]);
|
|
56
|
+
return /* @__PURE__ */ jsx(ShellContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { className: s.root({ className }), ...props }) });
|
|
57
|
+
}
|
|
58
|
+
function SidebarContent({ brand, children, footer, collapseLabels, closeLabel }) {
|
|
59
|
+
const { collapsed, setCollapsed, inDrawer } = useShell();
|
|
60
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: s.brand(), children: [
|
|
62
|
+
brand,
|
|
63
|
+
inDrawer && /* @__PURE__ */ jsx(DialogPrimitive.Close, { className: cn(s.menuButton(), "ml-auto flex"), "aria-label": closeLabel, children: /* @__PURE__ */ jsx(CloseGlyph, { className: "h-4 w-4" }) })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsx("div", { className: s.nav(), children }),
|
|
66
|
+
(footer || collapseLabels && !inDrawer) && /* @__PURE__ */ jsxs("div", { className: s.footer(), children: [
|
|
67
|
+
footer,
|
|
68
|
+
collapseLabels && !inDrawer && /* @__PURE__ */ jsxs("button", { type: "button", className: s.collapse(), "aria-expanded": !collapsed, onClick: () => setCollapsed(!collapsed), children: [
|
|
69
|
+
/* @__PURE__ */ jsx(ChevronGlyph, { direction: collapsed ? "right" : "left", className: "h-4 w-4" }),
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: collapsed ? "sr-only" : void 0, children: collapsed ? collapseLabels[1] : collapseLabels[0] })
|
|
71
|
+
] })
|
|
72
|
+
] })
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
function AppShellSidebar({ label, brand, children, footer, collapseLabels, closeLabel, className, ...props }) {
|
|
76
|
+
const shell = useShell();
|
|
77
|
+
const content = { brand, children, footer, collapseLabels, closeLabel };
|
|
78
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": label, "data-collapsed": shell.collapsed ? "" : void 0, className: s.sidebar({ className }), ...props, children: /* @__PURE__ */ jsx(SidebarContent, { ...content }) }),
|
|
80
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Root, { open: shell.open, onOpenChange: shell.setOpen, children: /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { children: [
|
|
81
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: s.overlay() }),
|
|
82
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Content, { className: s.drawer(), "aria-describedby": void 0, children: [
|
|
83
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Title, { className: "sr-only", children: label }),
|
|
84
|
+
/* @__PURE__ */ jsx(ShellContext.Provider, { value: { ...shell, collapsed: false, inDrawer: true }, children: /* @__PURE__ */ jsx("nav", { "aria-label": label, className: "flex min-h-0 flex-1 flex-col", onClick: (e) => e.target.closest("a") && shell.setOpen(false), children: /* @__PURE__ */ jsx(SidebarContent, { ...content }) }) })
|
|
85
|
+
] })
|
|
86
|
+
] }) })
|
|
87
|
+
] });
|
|
88
|
+
}
|
|
89
|
+
function AppShellGroup({ className, ...props }) {
|
|
90
|
+
return /* @__PURE__ */ jsx("p", { className: s.group({ className }), ...props });
|
|
91
|
+
}
|
|
92
|
+
function AppShellItem({ icon, label, current, badge, asChild, children, className, ...props }) {
|
|
93
|
+
const { collapsed } = useShell();
|
|
94
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
95
|
+
const inner = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
96
|
+
icon,
|
|
97
|
+
/* @__PURE__ */ jsx("span", { className: s.itemLabel(), children: label }),
|
|
98
|
+
badge != null && /* @__PURE__ */ jsx("span", { className: s.itemBadge(), children: badge })
|
|
99
|
+
] });
|
|
100
|
+
return /* @__PURE__ */ jsx(Comp, { "aria-current": current ? "page" : void 0, title: collapsed ? label : void 0, className: s.item({ className }), ...props, children: asChild && children ? React.cloneElement(children, void 0, inner) : inner });
|
|
101
|
+
}
|
|
102
|
+
function AppShellBody({ className, ...props }) {
|
|
103
|
+
return /* @__PURE__ */ jsx("div", { className: s.body({ className }), ...props });
|
|
104
|
+
}
|
|
105
|
+
function AppShellHeader({ title, menuLabel, actions, className, children, ...props }) {
|
|
106
|
+
const { open, setOpen } = useShell();
|
|
107
|
+
return /* @__PURE__ */ jsxs("header", { className: s.header({ className }), ...props, children: [
|
|
108
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: s.menuButton(), "aria-label": menuLabel, "aria-expanded": open, "aria-haspopup": "dialog", onClick: () => setOpen(true), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M4 7h16M4 12h16M4 17h10" }) }) }),
|
|
109
|
+
title && /* @__PURE__ */ jsx("h1", { className: s.title(), children: title }),
|
|
110
|
+
children,
|
|
111
|
+
actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
|
|
112
|
+
] });
|
|
113
|
+
}
|
|
114
|
+
function AppShellMain({ className, ...props }) {
|
|
115
|
+
return /* @__PURE__ */ jsx("main", { className: s.main({ className }), ...props });
|
|
116
|
+
}
|
|
117
|
+
var AppShell = {
|
|
118
|
+
Root: AppShellRoot,
|
|
119
|
+
Sidebar: AppShellSidebar,
|
|
120
|
+
Group: AppShellGroup,
|
|
121
|
+
Item: AppShellItem,
|
|
122
|
+
Body: AppShellBody,
|
|
123
|
+
Header: AppShellHeader,
|
|
124
|
+
Main: AppShellMain
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
AppShell,
|
|
128
|
+
AppShellBody,
|
|
129
|
+
AppShellGroup,
|
|
130
|
+
AppShellHeader,
|
|
131
|
+
AppShellItem,
|
|
132
|
+
AppShellMain,
|
|
133
|
+
AppShellRoot,
|
|
134
|
+
AppShellSidebar,
|
|
135
|
+
appShell
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=app-shell.js.map
|