@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,200 @@
|
|
|
1
|
+
import {
|
|
2
|
+
brandClass,
|
|
3
|
+
cn,
|
|
4
|
+
storyVariantClass
|
|
5
|
+
} from "./chunk-VCAAHCHL.js";
|
|
6
|
+
|
|
7
|
+
// src/button/button.tsx
|
|
8
|
+
import { Slot } from "radix-ui";
|
|
9
|
+
import { tv } from "tailwind-variants";
|
|
10
|
+
|
|
11
|
+
// src/spinner/glyph.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var HEX = "M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z";
|
|
14
|
+
function LoaderGlyph({ state = "loading", value, ...props }) {
|
|
15
|
+
const known = typeof value === "number" && Number.isFinite(value);
|
|
16
|
+
const fill = state !== "loading" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;
|
|
17
|
+
return /* @__PURE__ */ jsxs("svg", { viewBox: "0 0 24 24", fill: "none", "aria-hidden": true, "data-state": state, "data-progress": fill === null ? void 0 : fill, ...props, children: [
|
|
18
|
+
/* @__PURE__ */ jsx("path", { d: HEX, stroke: "currentColor", strokeOpacity: "0.22", strokeWidth: "2.2", strokeLinejoin: "round" }),
|
|
19
|
+
/* @__PURE__ */ jsx(
|
|
20
|
+
"path",
|
|
21
|
+
{
|
|
22
|
+
d: HEX,
|
|
23
|
+
pathLength: 100,
|
|
24
|
+
stroke: "currentColor",
|
|
25
|
+
strokeWidth: "2.2",
|
|
26
|
+
strokeLinejoin: "round",
|
|
27
|
+
strokeLinecap: "round",
|
|
28
|
+
className: "kz-loader-trace",
|
|
29
|
+
strokeDasharray: fill === null ? void 0 : `${fill} ${100 - fill}`
|
|
30
|
+
}
|
|
31
|
+
),
|
|
32
|
+
state === "loading" && /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2.6", fill: "currentColor", className: "kz-loader-node" }),
|
|
33
|
+
state === "success" && /* @__PURE__ */ jsx("path", { d: "M8.3 12.3l2.6 2.6 4.9-5.3", pathLength: 20, stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", className: "kz-loader-mark" }),
|
|
34
|
+
state === "error" && /* @__PURE__ */ jsx("path", { d: "M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2", pathLength: 20, stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", className: "kz-loader-mark" })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// src/button/button.tsx
|
|
39
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
40
|
+
var buttonVariants = tv({
|
|
41
|
+
base: "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] [&[data-loading]]:opacity-100",
|
|
42
|
+
variants: {
|
|
43
|
+
variant: {
|
|
44
|
+
primary: "bg-accent text-on-accent shadow-sm hover:bg-accent-hover",
|
|
45
|
+
// The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).
|
|
46
|
+
gradient: "bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110",
|
|
47
|
+
secondary: "border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3",
|
|
48
|
+
outline: "border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent",
|
|
49
|
+
ghost: "text-fg-secondary hover:bg-surface-2 hover:text-fg",
|
|
50
|
+
// The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest
|
|
51
|
+
// and hovered over every surface (`text-fg-danger` is for text set directly on a surface).
|
|
52
|
+
danger: "border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20"
|
|
53
|
+
},
|
|
54
|
+
size: { sm: "h-8 px-3 text-xs", md: "h-10 px-4 text-sm", lg: "h-12 px-6 text-sm", icon: "h-10 w-10" },
|
|
55
|
+
// `cut`: the Krizaka chamfer — 45° corners (CSS corner-shape, where supported; rounded elsewhere). The border, the
|
|
56
|
+
// focus ring and the hover follow the cut, unlike a clip-path.
|
|
57
|
+
shape: { rounded: "rounded-lg", pill: "rounded-full", cut: "rounded-[10px] [corner-shape:bevel]" }
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: { variant: "secondary", size: "md", shape: "rounded" }
|
|
60
|
+
});
|
|
61
|
+
var STATUS_TEXT = { success: "text-fg-success", error: "text-fg-danger" };
|
|
62
|
+
function Button({
|
|
63
|
+
asChild,
|
|
64
|
+
loading,
|
|
65
|
+
progress,
|
|
66
|
+
status,
|
|
67
|
+
announce,
|
|
68
|
+
indicator = true,
|
|
69
|
+
shimmer,
|
|
70
|
+
magnetic,
|
|
71
|
+
variant,
|
|
72
|
+
size,
|
|
73
|
+
shape,
|
|
74
|
+
className,
|
|
75
|
+
disabled,
|
|
76
|
+
children,
|
|
77
|
+
...props
|
|
78
|
+
}) {
|
|
79
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
80
|
+
const known = loading && typeof progress === "number" && Number.isFinite(progress);
|
|
81
|
+
const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;
|
|
82
|
+
const glyph = indicator && !asChild && (loading || status) ? status ?? "loading" : null;
|
|
83
|
+
const filled = variant === "primary" || variant === "gradient";
|
|
84
|
+
const button = /* @__PURE__ */ jsx2(
|
|
85
|
+
Comp,
|
|
86
|
+
{
|
|
87
|
+
type: asChild ? void 0 : "button",
|
|
88
|
+
"aria-busy": loading || void 0,
|
|
89
|
+
"data-loading": loading ? "" : void 0,
|
|
90
|
+
"data-variant": variant ?? "secondary",
|
|
91
|
+
"data-kz-status": status ?? void 0,
|
|
92
|
+
"data-kz-magnetic": magnetic ? "" : void 0,
|
|
93
|
+
disabled: asChild ? void 0 : disabled || loading,
|
|
94
|
+
"aria-disabled": asChild && (disabled || loading) ? true : void 0,
|
|
95
|
+
className: buttonVariants({
|
|
96
|
+
variant,
|
|
97
|
+
size,
|
|
98
|
+
shape,
|
|
99
|
+
className: [known && "relative isolate overflow-hidden", shimmer && "kz-sheen", className].filter(Boolean).join(" ") || void 0
|
|
100
|
+
}),
|
|
101
|
+
...props,
|
|
102
|
+
children: asChild ? children : /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
103
|
+
known && /* @__PURE__ */ jsx2("span", { "aria-hidden": true, className: "absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500", style: { width: `${ratio * 100}%` } }),
|
|
104
|
+
glyph && /* @__PURE__ */ jsx2(
|
|
105
|
+
"span",
|
|
106
|
+
{
|
|
107
|
+
"aria-hidden": true,
|
|
108
|
+
"data-slot": "indicator",
|
|
109
|
+
className: "-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0",
|
|
110
|
+
children: /* @__PURE__ */ jsx2("span", { className: "overflow-hidden", children: /* @__PURE__ */ jsx2(LoaderGlyph, { state: glyph, value: known ? ratio : null, className: ["h-4 w-4", glyph !== "loading" && !filled && STATUS_TEXT[glyph]].filter(Boolean).join(" ") }) })
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
children
|
|
114
|
+
] })
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
if (announce === void 0 || asChild) return button;
|
|
118
|
+
return /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
119
|
+
button,
|
|
120
|
+
/* @__PURE__ */ jsx2("span", { role: "status", className: "sr-only", children: announce })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// src/continue-prompt/continue-prompt.tsx
|
|
125
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
126
|
+
var Arrow = () => /* @__PURE__ */ jsx3("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx3("path", { d: "M5 12h14M13 6l6 6-6 6" }) });
|
|
127
|
+
function countdownCss(from, to) {
|
|
128
|
+
const steps = Math.max(1, Math.abs(from - to));
|
|
129
|
+
const frames = Array.from({ length: steps + 1 }, (_, i) => {
|
|
130
|
+
const n = from > to ? from - i : from + i;
|
|
131
|
+
return `${Math.round(i / steps * 100)}% { content: "${n}"; }`;
|
|
132
|
+
}).join(" ");
|
|
133
|
+
return `@keyframes kzs-count-${from}-${to} { ${frames} }
|
|
134
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
135
|
+
[data-in] .kzs-prompt-count[data-from="${from}"][data-to="${to}"] { color: transparent; }
|
|
136
|
+
[data-in] .kzs-prompt-count[data-from="${from}"][data-to="${to}"]::after { content: "${to}"; animation: kzs-count-${from}-${to} ${steps}s steps(1) 1s both; }
|
|
137
|
+
}`;
|
|
138
|
+
}
|
|
139
|
+
function ContinuePrompt({
|
|
140
|
+
title,
|
|
141
|
+
count,
|
|
142
|
+
countdown,
|
|
143
|
+
children,
|
|
144
|
+
actionLabel,
|
|
145
|
+
onAction,
|
|
146
|
+
href,
|
|
147
|
+
actionKey,
|
|
148
|
+
actionIcon,
|
|
149
|
+
caption,
|
|
150
|
+
highlight,
|
|
151
|
+
hint,
|
|
152
|
+
status,
|
|
153
|
+
variant,
|
|
154
|
+
brand,
|
|
155
|
+
className,
|
|
156
|
+
...props
|
|
157
|
+
}) {
|
|
158
|
+
const arcade = variant === "arcade";
|
|
159
|
+
const inner = /* @__PURE__ */ jsxs3(Fragment2, { children: [
|
|
160
|
+
actionKey && /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-key", "aria-hidden": true, children: actionKey }),
|
|
161
|
+
actionLabel,
|
|
162
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-icon", "aria-hidden": true, children: actionIcon ?? /* @__PURE__ */ jsx3(Arrow, {}) })
|
|
163
|
+
] });
|
|
164
|
+
const button = { variant: arcade ? "secondary" : "primary", size: "md", shape: arcade ? "cut" : void 0, className: "kzs-prompt-action" };
|
|
165
|
+
return /* @__PURE__ */ jsxs3("div", { "data-kzs-scene": "", className: cn("kzs-prompt", storyVariantClass(variant), brandClass(brand), className), ...props, children: [
|
|
166
|
+
countdown && /* @__PURE__ */ jsx3("style", { children: countdownCss(countdown.from, countdown.to) }),
|
|
167
|
+
(caption || arcade) && /* @__PURE__ */ jsxs3("div", { className: "kzs-prompt-top", children: [
|
|
168
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-screw", "aria-hidden": true }),
|
|
169
|
+
caption && /* @__PURE__ */ jsx3("span", { children: caption }),
|
|
170
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-screw", "aria-hidden": true })
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ jsxs3("div", { className: cn("kzs-prompt-screen", arcade && "theme-dark", brandClass(brand)), children: [
|
|
173
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-texture", "aria-hidden": true }),
|
|
174
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-scan kzs-loop", "aria-hidden": true }),
|
|
175
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-glass", "aria-hidden": true }),
|
|
176
|
+
/* @__PURE__ */ jsxs3("div", { className: "kzs-prompt-content", children: [
|
|
177
|
+
/* @__PURE__ */ jsxs3("div", { className: "kzs-prompt-head", children: [
|
|
178
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-title", children: title }),
|
|
179
|
+
countdown ? /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-count", "data-from": countdown.from, "data-to": countdown.to, "aria-hidden": true, children: countdown.from }) : count !== void 0 && /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-count", "aria-hidden": true, children: count })
|
|
180
|
+
] }),
|
|
181
|
+
children
|
|
182
|
+
] })
|
|
183
|
+
] }),
|
|
184
|
+
/* @__PURE__ */ jsxs3("div", { className: "kzs-prompt-deck", children: [
|
|
185
|
+
(highlight || hint || status) && /* @__PURE__ */ jsxs3("div", { className: "kzs-prompt-coin", children: [
|
|
186
|
+
highlight && /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-highlight", children: highlight }),
|
|
187
|
+
hint && /* @__PURE__ */ jsx3("span", { className: "kzs-prompt-hint", children: hint }),
|
|
188
|
+
status && /* @__PURE__ */ jsxs3("span", { className: "kzs-prompt-status", children: [
|
|
189
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-prompt-led", "aria-hidden": true }),
|
|
190
|
+
status
|
|
191
|
+
] })
|
|
192
|
+
] }),
|
|
193
|
+
href ? /* @__PURE__ */ jsx3(Button, { asChild: true, ...button, children: /* @__PURE__ */ jsx3("a", { href, children: inner }) }) : /* @__PURE__ */ jsx3(Button, { type: "button", onClick: onAction, ...button, children: inner })
|
|
194
|
+
] })
|
|
195
|
+
] });
|
|
196
|
+
}
|
|
197
|
+
export {
|
|
198
|
+
ContinuePrompt
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=continue-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/button/button.tsx","../src/spinner/glyph.tsx","../src/continue-prompt/continue-prompt.tsx"],"sourcesContent":["// Server-safe: no hook, no context. `buttonVariants` styles a <Link> or a Server Component without the component.\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { LoaderGlyph } from \"../spinner/glyph\";\n\nexport const buttonVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap font-semibold transition-all \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:pointer-events-none disabled:opacity-40 data-loading:cursor-progress active:scale-[0.98] \" +\n // Busy is not unavailable: a loading button keeps its colour (it is disabled only so it is not pressed twice).\n \"[&[data-loading]]:opacity-100\",\n variants: {\n variant: {\n primary: \"bg-accent text-on-accent shadow-sm hover:bg-accent-hover\",\n // The brand's signature: accent → accent-2 (on-accent reads on both stops, tested in @krizaka/tokens).\n gradient: \"bg-linear-to-r from-accent to-accent-2 text-on-accent shadow-sm hover:brightness-110\",\n secondary: \"border border-border-default bg-surface-2 text-fg hover:border-border-strong hover:bg-surface-3\",\n outline: \"border border-border-default bg-transparent text-fg hover:border-accent hover:text-fg-accent\",\n ghost: \"text-fg-secondary hover:bg-surface-2 hover:text-fg\",\n // The border and the tint carry the danger; the label stays the primary text role, legible on the tint at rest\n // and hovered over every surface (`text-fg-danger` is for text set directly on a surface).\n danger: \"border border-danger/50 bg-danger/10 text-fg hover:border-danger hover:bg-danger/20\",\n },\n size: { sm: \"h-8 px-3 text-xs\", md: \"h-10 px-4 text-sm\", lg: \"h-12 px-6 text-sm\", icon: \"h-10 w-10\" },\n // `cut`: the Krizaka chamfer — 45° corners (CSS corner-shape, where supported; rounded elsewhere). The border, the\n // focus ring and the hover follow the cut, unlike a clip-path.\n shape: { rounded: \"rounded-lg\", pill: \"rounded-full\", cut: \"rounded-[10px] [corner-shape:bevel]\" },\n },\n defaultVariants: { variant: \"secondary\", size: \"md\", shape: \"rounded\" },\n});\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>;\n\nexport type ButtonProps = React.ComponentProps<\"button\"> &\n ButtonVariants & {\n /**\n * The look: `primary` (the accent), `gradient` (accent → accent-2), `secondary` (a raised surface), `outline`,\n * `ghost`, `danger`.\n * @default \"secondary\"\n */\n variant?: ButtonVariants[\"variant\"];\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"md\"\n */\n size?: ButtonVariants[\"size\"];\n /**\n * rounded · pill · cut (45° corners, the Krizaka chamfer).\n * @default \"rounded\"\n */\n shape?: ButtonVariants[\"shape\"];\n /** Renders the child (e.g. a <Link>) instead of the <button>, with props, classes and ref merged. */\n asChild?: boolean;\n /**\n * Disables and signals the wait (aria-busy, data-loading) and shows the Krizaka loader glyph before the label; the\n * button keeps its colour.\n */\n loading?: boolean;\n /**\n * Between 0 and 1, while `loading`: the glyph's trace and a light fill across the button grow to the value (an\n * upload, an export).\n */\n progress?: number | null;\n /**\n * How the action ended: `success` draws a check, `error` a cross (and the button shakes its head once); a ring of\n * the status colour opens around it. Clear it to return to rest.\n */\n status?: \"success\" | \"error\" | null;\n /** A message announced politely by assistive technology when it changes (“Saved”, “Upload failed”) — passed translated. */\n announce?: string;\n /**\n * Shows the glyph while `loading` / with a `status`. `false`: you draw your own.\n * @default true\n */\n indicator?: boolean;\n /** A sheen of light crosses the button on hover — for the one action a page is about. */\n shimmer?: boolean;\n /** The button leans a few pixels toward a fine pointer (driven by `MotionObserver`; never under reduced motion or on touch). */\n magnetic?: boolean;\n };\n\nconst STATUS_TEXT = { success: \"text-fg-success\", error: \"text-fg-danger\" } as const;\n\nexport function Button({\n asChild,\n loading,\n progress,\n status,\n announce,\n indicator = true,\n shimmer,\n magnetic,\n variant,\n size,\n shape,\n className,\n disabled,\n children,\n ...props\n}: ButtonProps) {\n const Comp = asChild ? Slot.Root : \"button\";\n const known = loading && typeof progress === \"number\" && Number.isFinite(progress);\n const ratio = known ? Math.min(1, Math.max(0, progress)) : 0;\n const glyph = indicator && !asChild && (loading || status) ? (status ?? \"loading\") : null;\n // On a filled variant the glyph stays in the label's colour; on the others it takes the status colour.\n const filled = variant === \"primary\" || variant === \"gradient\";\n const button = (\n <Comp\n type={asChild ? undefined : \"button\"}\n aria-busy={loading || undefined}\n data-loading={loading ? \"\" : undefined}\n data-variant={variant ?? \"secondary\"}\n data-kz-status={status ?? undefined}\n data-kz-magnetic={magnetic ? \"\" : undefined}\n disabled={asChild ? undefined : disabled || loading}\n aria-disabled={asChild && (disabled || loading) ? true : undefined}\n className={buttonVariants({\n variant,\n size,\n shape,\n className: [known && \"relative isolate overflow-hidden\", shimmer && \"kz-sheen\", className].filter(Boolean).join(\" \") || undefined,\n })}\n {...props}\n >\n {asChild ? (\n children\n ) : (\n <>\n {known && (\n <span aria-hidden className=\"absolute inset-y-0 left-0 -z-10 bg-current opacity-15 transition-[width] duration-500\" style={{ width: `${ratio * 100}%` }} />\n )}\n {glyph && (\n <span\n aria-hidden\n data-slot=\"indicator\"\n className=\"-my-1 grid grid-cols-[1fr] transition-[grid-template-columns,margin,opacity] duration-300 starting:-mr-2 starting:grid-cols-[0fr] starting:opacity-0\"\n >\n <span className=\"overflow-hidden\">\n <LoaderGlyph state={glyph} value={known ? ratio : null} className={[\"h-4 w-4\", glyph !== \"loading\" && !filled && STATUS_TEXT[glyph]].filter(Boolean).join(\" \")} />\n </span>\n </span>\n )}\n {children}\n </>\n )}\n </Comp>\n );\n if (announce === undefined || asChild) return button;\n return (\n <>\n {button}\n <span role=\"status\" className=\"sr-only\">\n {announce}\n </span>\n </>\n );\n}\n\nexport type IconButtonProps = Omit<ButtonProps, \"size\"> & {\n /** The accessible name (and tooltip) of the button — required, passed translated. */\n label: string;\n /**\n * sm · md · lg, or `icon` (a square).\n * @default \"icon\"\n */\n size?: ButtonProps[\"size\"];\n};\n\n/** An icon-only button: `label` is required, it is its accessible name. Loading or with a status, the glyph takes the icon's place. */\nexport function IconButton({ label, size = \"icon\", children, ...props }: IconButtonProps) {\n const swap = props.indicator !== false && !props.asChild && (props.loading || props.status);\n return (\n <Button aria-label={label} title={label} size={size} {...props}>\n {swap ? null : children}\n </Button>\n );\n}\n","// The Krizaka loader glyph, server-safe: a hexagon (the marks' shape) traced by a segment of light around a node that\n// breathes; determinate, it fills to its value; done, the trace closes and a check (or a cross) draws itself. Animated by\n// motion.css (`kz-loader-*`); still under prefers-reduced-motion — a segment at rest and the node lit, never blank.\nimport type * as React from \"react\";\n\n/** The hexagon, pointy top, radius 9 around (12, 12). */\nconst HEX = \"M12 3 19.79 7.5 19.79 16.5 12 21 4.21 16.5 4.21 7.5Z\";\n\n/** What the glyph shows: a wait (with an optional value), or how it ended. */\nexport type LoaderGlyphState = \"loading\" | \"success\" | \"error\";\n\nexport interface LoaderGlyphProps extends Omit<React.ComponentProps<\"svg\">, \"children\"> {\n /** loading · success · error. */\n state?: LoaderGlyphState;\n /** Between 0 and 1: a determinate wait, the trace grows to it. Absent: indeterminate. */\n value?: number | null;\n}\n\n/** The glyph alone (decorative): the Spinner, the Loader and the Button's `loading` draw it. */\nexport function LoaderGlyph({ state = \"loading\", value, ...props }: LoaderGlyphProps) {\n const known = typeof value === \"number\" && Number.isFinite(value);\n const fill = state !== \"loading\" ? 100 : known ? Math.round(Math.min(1, Math.max(0, value)) * 100) : null;\n return (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden data-state={state} data-progress={fill === null ? undefined : fill} {...props}>\n <path d={HEX} stroke=\"currentColor\" strokeOpacity=\"0.22\" strokeWidth=\"2.2\" strokeLinejoin=\"round\" />\n <path\n d={HEX}\n pathLength={100}\n stroke=\"currentColor\"\n strokeWidth=\"2.2\"\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n className=\"kz-loader-trace\"\n strokeDasharray={fill === null ? undefined : `${fill} ${100 - fill}`}\n />\n {state === \"loading\" && <circle cx=\"12\" cy=\"12\" r=\"2.6\" fill=\"currentColor\" className=\"kz-loader-node\" />}\n {state === \"success\" && <path d=\"M8.3 12.3l2.6 2.6 4.9-5.3\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"kz-loader-mark\" />}\n {state === \"error\" && <path d=\"M9.4 9.4l5.2 5.2M14.6 9.4l-5.2 5.2\" pathLength={20} stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" className=\"kz-loader-mark\" />}\n </svg>\n );\n}\n","// Server-safe. The last call of a page or a flow (story.css): a short question, a figure that counts (days, seats,\n// seconds), what to say before leaving, and the one action that continues — “Keep your studio? · 3 days left”.\nimport type * as React from \"react\";\n\nimport { Button } from \"../button/button\";\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type ContinuePromptProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** The question (“Keep your studio?”, arcade “Continue?”). */\n title: React.ReactNode;\n /** What counts, beside the question: a figure, or a live `Countdown` for a real deadline. Decorative: say it in words too. */\n count?: React.ReactNode;\n /**\n * A count that ticks down once when its scene plays (`{ from: 9, to: 7 }`), then waits; still under reduced motion.\n * Use `count` for anything else.\n */\n countdown?: { readonly from: number; readonly to: number };\n /** Inside the screen, under the question: a heading, a line, links — the closing call itself. */\n children?: React.ReactNode;\n /** The action's words. */\n actionLabel: React.ReactNode;\n /** Runs the action (a client handler). Without `href`, the action is a `button`. */\n onAction?: React.MouseEventHandler<HTMLButtonElement>;\n /** Makes the action a link. */\n href?: string;\n /** A key-cap before the action's words (“Enter”, arcade “1P Start”). Decorative. */\n actionKey?: React.ReactNode;\n /** The action's glyph after its words; default an arrow. Decorative. */\n actionIcon?: React.ReactNode;\n /** A small line at the top of the card (where it comes from). */\n caption?: React.ReactNode;\n /** In the deck, in the accent: the call (“Last places”, arcade “Insert coin”). */\n highlight?: React.ReactNode;\n /** Beside the highlight: how (“One click, no card”). */\n hint?: React.ReactNode;\n /** A status with a green dot (“All features on”, “Credit 01”). */\n status?: React.ReactNode;\n /**\n * `default`: a calm card. `arcade`: the cabinet — screws, a dark CRT that switches on, a coin deck.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`krizaka` → `.brand-krizaka`). */\n brand?: string;\n};\n\nconst Arrow = () => (\n <svg viewBox=\"0 0 24 24\" width=\"16\" height=\"16\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M5 12h14M13 6l6 6-6 6\" />\n </svg>\n);\n\n/** One countdown's keyframes, named by its range: the digit steps from `from` to `to`, once. */\nfunction countdownCss(from: number, to: number) {\n const steps = Math.max(1, Math.abs(from - to));\n const frames = Array.from({ length: steps + 1 }, (_, i) => {\n const n = from > to ? from - i : from + i;\n return `${Math.round((i / steps) * 100)}% { content: \"${n}\"; }`;\n }).join(\" \");\n return `@keyframes kzs-count-${from}-${to} { ${frames} }\n@media (prefers-reduced-motion: no-preference) {\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"] { color: transparent; }\n [data-in] .kzs-prompt-count[data-from=\"${from}\"][data-to=\"${to}\"]::after { content: \"${to}\"; animation: kzs-count-${from}-${to} ${steps}s steps(1) 1s both; }\n}`;\n}\n\n/** A last call: a question, what counts, the closing words, the one action that continues — a `button`, or a link. */\nexport function ContinuePrompt({\n title,\n count,\n countdown,\n children,\n actionLabel,\n onAction,\n href,\n actionKey,\n actionIcon,\n caption,\n highlight,\n hint,\n status,\n variant,\n brand,\n className,\n ...props\n}: ContinuePromptProps) {\n const arcade = variant === \"arcade\";\n const inner = (\n <>\n {actionKey && (\n <span className=\"kzs-prompt-key\" aria-hidden>\n {actionKey}\n </span>\n )}\n {actionLabel}\n <span className=\"kzs-prompt-icon\" aria-hidden>\n {actionIcon ?? <Arrow />}\n </span>\n </>\n );\n const button = { variant: arcade ? (\"secondary\" as const) : (\"primary\" as const), size: \"md\" as const, shape: arcade ? (\"cut\" as const) : undefined, className: \"kzs-prompt-action\" };\n return (\n <div data-kzs-scene=\"\" className={cn(\"kzs-prompt\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n {countdown && <style>{countdownCss(countdown.from, countdown.to)}</style>}\n {(caption || arcade) && (\n <div className=\"kzs-prompt-top\">\n <span className=\"kzs-prompt-screw\" aria-hidden />\n {caption && <span>{caption}</span>}\n <span className=\"kzs-prompt-screw\" aria-hidden />\n </div>\n )}\n <div className={cn(\"kzs-prompt-screen\", arcade && \"theme-dark\", brandClass(brand))}>\n <span className=\"kzs-texture\" aria-hidden />\n <span className=\"kzs-scan kzs-loop\" aria-hidden />\n <span className=\"kzs-prompt-glass\" aria-hidden />\n <div className=\"kzs-prompt-content\">\n <div className=\"kzs-prompt-head\">\n <span className=\"kzs-prompt-title\">{title}</span>\n {countdown ? (\n <span className=\"kzs-prompt-count\" data-from={countdown.from} data-to={countdown.to} aria-hidden>\n {countdown.from}\n </span>\n ) : (\n count !== undefined && (\n <span className=\"kzs-prompt-count\" aria-hidden>\n {count}\n </span>\n )\n )}\n </div>\n {children}\n </div>\n </div>\n <div className=\"kzs-prompt-deck\">\n {(highlight || hint || status) && (\n <div className=\"kzs-prompt-coin\">\n {highlight && <span className=\"kzs-prompt-highlight\">{highlight}</span>}\n {hint && <span className=\"kzs-prompt-hint\">{hint}</span>}\n {status && (\n <span className=\"kzs-prompt-status\">\n <span className=\"kzs-prompt-led\" aria-hidden />\n {status}\n </span>\n )}\n </div>\n )}\n {href ? (\n <Button asChild {...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;AAAA,UAC5C;AAAA,WACH;AAAA,SAEJ;AAAA,MAED,OACC,gBAAAA,KAAC,UAAO,SAAO,MAAE,GAAG,QAClB,0BAAAA,KAAC,OAAE,MAAa,iBAAM,GACxB,IAEA,gBAAAA,KAAC,UAAO,MAAK,UAAS,SAAS,UAAW,GAAG,QAC1C,iBACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["jsx","jsxs","Fragment","jsx","jsxs"]}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const dashboardLayout: tailwind_variants.TVReturnType<{
|
|
5
|
+
span: {
|
|
6
|
+
1: {
|
|
7
|
+
widget: string;
|
|
8
|
+
};
|
|
9
|
+
2: {
|
|
10
|
+
widget: string;
|
|
11
|
+
};
|
|
12
|
+
3: {
|
|
13
|
+
widget: string;
|
|
14
|
+
};
|
|
15
|
+
full: {
|
|
16
|
+
widget: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
root: string;
|
|
21
|
+
head: string;
|
|
22
|
+
text: string;
|
|
23
|
+
eyebrow: string;
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
actions: string;
|
|
27
|
+
toolbar: string;
|
|
28
|
+
grid: string;
|
|
29
|
+
widget: string;
|
|
30
|
+
widgetHead: string;
|
|
31
|
+
widgetTitle: string;
|
|
32
|
+
widgetDescription: string;
|
|
33
|
+
widgetBody: string;
|
|
34
|
+
}, undefined, {
|
|
35
|
+
span: {
|
|
36
|
+
1: {
|
|
37
|
+
widget: string;
|
|
38
|
+
};
|
|
39
|
+
2: {
|
|
40
|
+
widget: string;
|
|
41
|
+
};
|
|
42
|
+
3: {
|
|
43
|
+
widget: string;
|
|
44
|
+
};
|
|
45
|
+
full: {
|
|
46
|
+
widget: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
root: string;
|
|
51
|
+
head: string;
|
|
52
|
+
text: string;
|
|
53
|
+
eyebrow: string;
|
|
54
|
+
title: string;
|
|
55
|
+
description: string;
|
|
56
|
+
actions: string;
|
|
57
|
+
toolbar: string;
|
|
58
|
+
grid: string;
|
|
59
|
+
widget: string;
|
|
60
|
+
widgetHead: string;
|
|
61
|
+
widgetTitle: string;
|
|
62
|
+
widgetDescription: string;
|
|
63
|
+
widgetBody: string;
|
|
64
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
65
|
+
span: {
|
|
66
|
+
1: {
|
|
67
|
+
widget: string;
|
|
68
|
+
};
|
|
69
|
+
2: {
|
|
70
|
+
widget: string;
|
|
71
|
+
};
|
|
72
|
+
3: {
|
|
73
|
+
widget: string;
|
|
74
|
+
};
|
|
75
|
+
full: {
|
|
76
|
+
widget: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
root: string;
|
|
81
|
+
head: string;
|
|
82
|
+
text: string;
|
|
83
|
+
eyebrow: string;
|
|
84
|
+
title: string;
|
|
85
|
+
description: string;
|
|
86
|
+
actions: string;
|
|
87
|
+
toolbar: string;
|
|
88
|
+
grid: string;
|
|
89
|
+
widget: string;
|
|
90
|
+
widgetHead: string;
|
|
91
|
+
widgetTitle: string;
|
|
92
|
+
widgetDescription: string;
|
|
93
|
+
widgetBody: string;
|
|
94
|
+
}>>;
|
|
95
|
+
type DashboardLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
96
|
+
/** The screen's title: `Good morning, Eric`. */
|
|
97
|
+
title: React.ReactNode;
|
|
98
|
+
/** A mono line above it (the workspace, the date). */
|
|
99
|
+
eyebrow?: React.ReactNode;
|
|
100
|
+
/** One sentence under it. */
|
|
101
|
+
description?: React.ReactNode;
|
|
102
|
+
/** The screen's actions (a primary Button, a DropdownMenu). */
|
|
103
|
+
actions?: React.ReactNode;
|
|
104
|
+
/** Under the heading: the period, the filters (Segmented tabs, a DateRangePicker, a FilterBar). */
|
|
105
|
+
toolbar?: React.ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* The heading's level: `h1` when the dashboard is the screen, `h2` inside an AppShell whose header holds the h1.
|
|
108
|
+
* @default "h1"
|
|
109
|
+
*/
|
|
110
|
+
headingAs?: "h1" | "h2";
|
|
111
|
+
/** The widgets (`Widget`), in reading order. */
|
|
112
|
+
children: React.ReactNode;
|
|
113
|
+
};
|
|
114
|
+
/** A dashboard screen: heading, actions, filters, then the grid of widgets. */
|
|
115
|
+
declare function DashboardLayout({ title, eyebrow, description, actions, toolbar, headingAs: H, className, children, ...props }: DashboardLayoutProps): React.JSX.Element;
|
|
116
|
+
type WidgetProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
117
|
+
/** The widget's title: it names the region. */
|
|
118
|
+
title: React.ReactNode;
|
|
119
|
+
/** One line under the title (the period, the source). */
|
|
120
|
+
description?: React.ReactNode;
|
|
121
|
+
/** An action on the right of the title (`See all`). */
|
|
122
|
+
action?: React.ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* The columns it takes: 1, 2, 3 or the full row (from `sm`; one column on a phone).
|
|
125
|
+
* @default 1
|
|
126
|
+
*/
|
|
127
|
+
span?: 1 | 2 | 3 | "full";
|
|
128
|
+
/**
|
|
129
|
+
* The title's level: one under the dashboard's heading — `2` under an `h1`, `3` inside an AppShell (`headingAs="h2"`).
|
|
130
|
+
* @default 2
|
|
131
|
+
*/
|
|
132
|
+
level?: 2 | 3;
|
|
133
|
+
/** The content: a Stat, a chart of @krizaka/charts, a DataTable, a list. */
|
|
134
|
+
children: React.ReactNode;
|
|
135
|
+
};
|
|
136
|
+
/** A widget of the dashboard: a titled region on a card. */
|
|
137
|
+
declare function Widget({ title, description, action, span, level, className, children, id, ...props }: WidgetProps): React.JSX.Element;
|
|
138
|
+
|
|
139
|
+
export { DashboardLayout, type DashboardLayoutProps, Widget, type WidgetProps, dashboardLayout };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// src/dashboard-layout/dashboard-layout.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { tv } from "tailwind-variants";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var dashboardLayout = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
root: "flex w-full flex-col gap-6",
|
|
8
|
+
head: "flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between",
|
|
9
|
+
text: "flex min-w-0 flex-col gap-1",
|
|
10
|
+
eyebrow: "font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-fg-accent",
|
|
11
|
+
title: "font-display text-2xl font-extrabold tracking-tight text-fg sm:text-[1.75rem]",
|
|
12
|
+
description: "max-w-2xl text-sm text-fg-secondary",
|
|
13
|
+
actions: "flex shrink-0 flex-wrap items-center gap-2",
|
|
14
|
+
toolbar: "flex flex-wrap items-center gap-2",
|
|
15
|
+
grid: "grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
16
|
+
widget: "flex min-w-0 flex-col gap-3 rounded-xl border border-border-default bg-surface-1 p-4 sm:p-5",
|
|
17
|
+
widgetHead: "flex items-start justify-between gap-3",
|
|
18
|
+
widgetTitle: "text-sm font-semibold text-fg",
|
|
19
|
+
widgetDescription: "mt-0.5 text-xs text-fg-secondary",
|
|
20
|
+
widgetBody: "min-w-0 flex-1"
|
|
21
|
+
},
|
|
22
|
+
variants: {
|
|
23
|
+
span: {
|
|
24
|
+
1: { widget: "" },
|
|
25
|
+
2: { widget: "sm:col-span-2" },
|
|
26
|
+
3: { widget: "sm:col-span-2 xl:col-span-3" },
|
|
27
|
+
full: { widget: "sm:col-span-2 xl:col-span-4" }
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: { span: 1 }
|
|
31
|
+
});
|
|
32
|
+
var s = dashboardLayout();
|
|
33
|
+
function DashboardLayout({ title, eyebrow, description, actions, toolbar, headingAs: H = "h1", className, children, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsxs("div", { className: s.root({ className }), ...props, children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: s.head(), children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { className: s.text(), children: [
|
|
37
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: s.eyebrow(), children: eyebrow }),
|
|
38
|
+
/* @__PURE__ */ jsx(H, { className: s.title(), children: title }),
|
|
39
|
+
description && /* @__PURE__ */ jsx("p", { className: s.description(), children: description })
|
|
40
|
+
] }),
|
|
41
|
+
actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
|
|
42
|
+
] }),
|
|
43
|
+
toolbar && /* @__PURE__ */ jsx("div", { className: s.toolbar(), children: toolbar }),
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: s.grid(), children })
|
|
45
|
+
] });
|
|
46
|
+
}
|
|
47
|
+
function Widget({ title, description, action, span = 1, level = 2, className, children, id, ...props }) {
|
|
48
|
+
const H = level === 2 ? "h2" : "h3";
|
|
49
|
+
const sv = dashboardLayout({ span });
|
|
50
|
+
const auto = React.useId();
|
|
51
|
+
const titleId = `${id ?? auto}-title`;
|
|
52
|
+
return /* @__PURE__ */ jsxs("section", { className: sv.widget({ className }), "aria-labelledby": titleId, id, ...props, children: [
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: s.widgetHead(), children: [
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(H, { id: titleId, className: s.widgetTitle(), children: title }),
|
|
56
|
+
description && /* @__PURE__ */ jsx("p", { className: s.widgetDescription(), children: description })
|
|
57
|
+
] }),
|
|
58
|
+
action
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx("div", { className: s.widgetBody(), children })
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
DashboardLayout,
|
|
65
|
+
Widget,
|
|
66
|
+
dashboardLayout
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=dashboard-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/dashboard-layout/dashboard-layout.tsx"],"sourcesContent":["// Server-safe. A dashboard, read from the products' home screens (Orochia's creator studio, Orazaka's console for\n// Eric): the screen's heading with its actions and filters, then a responsive grid of widgets — one column on a phone,\n// two from `sm`, four from `xl`; a widget spans 1, 2, 3 columns or the full row, and keeps its order everywhere.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const dashboardLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between\",\n text: \"flex min-w-0 flex-col gap-1\",\n eyebrow: \"font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-fg-accent\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg sm:text-[1.75rem]\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2\",\n toolbar: \"flex flex-wrap items-center gap-2\",\n grid: \"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-4\",\n widget: \"flex min-w-0 flex-col gap-3 rounded-xl border border-border-default bg-surface-1 p-4 sm:p-5\",\n widgetHead: \"flex items-start justify-between gap-3\",\n widgetTitle: \"text-sm font-semibold text-fg\",\n widgetDescription: \"mt-0.5 text-xs text-fg-secondary\",\n widgetBody: \"min-w-0 flex-1\",\n },\n variants: {\n span: {\n 1: { widget: \"\" },\n 2: { widget: \"sm:col-span-2\" },\n 3: { widget: \"sm:col-span-2 xl:col-span-3\" },\n full: { widget: \"sm:col-span-2 xl:col-span-4\" },\n },\n },\n defaultVariants: { span: 1 },\n});\nconst s = dashboardLayout();\n\nexport type DashboardLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title: `Good morning, Eric`. */\n title: React.ReactNode;\n /** A mono line above it (the workspace, the date). */\n eyebrow?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The screen's actions (a primary Button, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the heading: the period, the filters (Segmented tabs, a DateRangePicker, a FilterBar). */\n toolbar?: React.ReactNode;\n /**\n * The heading's level: `h1` when the dashboard is the screen, `h2` inside an AppShell whose header holds the h1.\n * @default \"h1\"\n */\n headingAs?: \"h1\" | \"h2\";\n /** The widgets (`Widget`), in reading order. */\n children: React.ReactNode;\n};\n\n/** A dashboard screen: heading, actions, filters, then the grid of widgets. */\nexport function DashboardLayout({ title, eyebrow, description, actions, toolbar, headingAs: H = \"h1\", className, children, ...props }: DashboardLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n <div className={s.head()}>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <H className={s.title()}>{title}</H>\n {description && <p className={s.description()}>{description}</p>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n {toolbar && <div className={s.toolbar()}>{toolbar}</div>}\n <div className={s.grid()}>{children}</div>\n </div>\n );\n}\n\nexport type WidgetProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The widget's title: it names the region. */\n title: React.ReactNode;\n /** One line under the title (the period, the source). */\n description?: React.ReactNode;\n /** An action on the right of the title (`See all`). */\n action?: React.ReactNode;\n /**\n * The columns it takes: 1, 2, 3 or the full row (from `sm`; one column on a phone).\n * @default 1\n */\n span?: 1 | 2 | 3 | \"full\";\n /**\n * The title's level: one under the dashboard's heading — `2` under an `h1`, `3` inside an AppShell (`headingAs=\"h2\"`).\n * @default 2\n */\n level?: 2 | 3;\n /** The content: a Stat, a chart of @krizaka/charts, a DataTable, a list. */\n children: React.ReactNode;\n};\n\n/** A widget of the dashboard: a titled region on a card. */\nexport function Widget({ title, description, action, span = 1, level = 2, className, children, id, ...props }: WidgetProps) {\n const H = level === 2 ? \"h2\" : \"h3\";\n const sv = dashboardLayout({ span });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section className={sv.widget({ className })} aria-labelledby={titleId} id={id} {...props}>\n <div className={s.widgetHead()}>\n <div className=\"min-w-0\">\n <H id={titleId} className={s.widgetTitle()}>\n {title}\n </H>\n {description && <p className={s.widgetDescription()}>{description}</p>}\n </div>\n {action}\n </div>\n <div className={s.widgetBody()}>{children}</div>\n </section>\n );\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;AAwDX,SACc,KADd;AAtDD,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,YAAY;AAAA,EACd;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,GAAG,EAAE,QAAQ,GAAG;AAAA,MAChB,GAAG,EAAE,QAAQ,gBAAgB;AAAA,MAC7B,GAAG,EAAE,QAAQ,8BAA8B;AAAA,MAC3C,MAAM,EAAE,QAAQ,8BAA8B;AAAA,IAChD;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,EAAE;AAC7B,CAAC;AACD,IAAM,IAAI,gBAAgB;AAuBnB,SAAS,gBAAgB,EAAE,OAAO,SAAS,aAAa,SAAS,SAAS,WAAW,IAAI,MAAM,WAAW,UAAU,GAAG,MAAM,GAAyB;AAC3J,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACzC;AAAA,yBAAC,SAAI,WAAW,EAAE,KAAK,GACrB;AAAA,2BAAC,SAAI,WAAW,EAAE,KAAK,GACpB;AAAA,mBAAW,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,QAChD,oBAAC,KAAE,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,QAC/B,eAAe,oBAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,SAC9D;AAAA,MACC,WAAW,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,OACpD;AAAA,IACC,WAAW,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,IAClD,oBAAC,SAAI,WAAW,EAAE,KAAK,GAAI,UAAS;AAAA,KACtC;AAEJ;AAwBO,SAAS,OAAO,EAAE,OAAO,aAAa,QAAQ,OAAO,GAAG,QAAQ,GAAG,WAAW,UAAU,IAAI,GAAG,MAAM,GAAgB;AAC1H,QAAM,IAAI,UAAU,IAAI,OAAO;AAC/B,QAAM,KAAK,gBAAgB,EAAE,KAAK,CAAC;AACnC,QAAM,OAAa,YAAM;AACzB,QAAM,UAAU,GAAG,MAAM,IAAI;AAC7B,SACE,qBAAC,aAAQ,WAAW,GAAG,OAAO,EAAE,UAAU,CAAC,GAAG,mBAAiB,SAAS,IAAS,GAAG,OAClF;AAAA,yBAAC,SAAI,WAAW,EAAE,WAAW,GAC3B;AAAA,2BAAC,SAAI,WAAU,WACb;AAAA,4BAAC,KAAE,IAAI,SAAS,WAAW,EAAE,YAAY,GACtC,iBACH;AAAA,QACC,eAAe,oBAAC,OAAE,WAAW,EAAE,kBAAkB,GAAI,uBAAY;AAAA,SACpE;AAAA,MACC;AAAA,OACH;AAAA,IACA,oBAAC,SAAI,WAAW,EAAE,WAAW,GAAI,UAAS;AAAA,KAC5C;AAEJ;","names":[]}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const detailLayout: tailwind_variants.TVReturnType<{
|
|
5
|
+
[key: string]: {
|
|
6
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
7
|
+
root?: tailwind_variants.ClassValue;
|
|
8
|
+
back?: tailwind_variants.ClassValue;
|
|
9
|
+
header?: tailwind_variants.ClassValue;
|
|
10
|
+
media?: tailwind_variants.ClassValue;
|
|
11
|
+
text?: tailwind_variants.ClassValue;
|
|
12
|
+
eyebrow?: tailwind_variants.ClassValue;
|
|
13
|
+
titleRow?: tailwind_variants.ClassValue;
|
|
14
|
+
title?: tailwind_variants.ClassValue;
|
|
15
|
+
meta?: tailwind_variants.ClassValue;
|
|
16
|
+
actions?: tailwind_variants.ClassValue;
|
|
17
|
+
columns?: tailwind_variants.ClassValue;
|
|
18
|
+
main?: tailwind_variants.ClassValue;
|
|
19
|
+
aside?: tailwind_variants.ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
[x: string]: {
|
|
24
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
25
|
+
root?: tailwind_variants.ClassValue;
|
|
26
|
+
back?: tailwind_variants.ClassValue;
|
|
27
|
+
header?: tailwind_variants.ClassValue;
|
|
28
|
+
media?: tailwind_variants.ClassValue;
|
|
29
|
+
text?: tailwind_variants.ClassValue;
|
|
30
|
+
eyebrow?: tailwind_variants.ClassValue;
|
|
31
|
+
titleRow?: tailwind_variants.ClassValue;
|
|
32
|
+
title?: tailwind_variants.ClassValue;
|
|
33
|
+
meta?: tailwind_variants.ClassValue;
|
|
34
|
+
actions?: tailwind_variants.ClassValue;
|
|
35
|
+
columns?: tailwind_variants.ClassValue;
|
|
36
|
+
main?: tailwind_variants.ClassValue;
|
|
37
|
+
aside?: tailwind_variants.ClassValue;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
} | {}, {
|
|
41
|
+
root: string;
|
|
42
|
+
back: string;
|
|
43
|
+
header: string;
|
|
44
|
+
media: string;
|
|
45
|
+
text: string;
|
|
46
|
+
eyebrow: string;
|
|
47
|
+
titleRow: string;
|
|
48
|
+
title: string;
|
|
49
|
+
meta: string;
|
|
50
|
+
actions: string;
|
|
51
|
+
columns: string;
|
|
52
|
+
main: string;
|
|
53
|
+
aside: string;
|
|
54
|
+
}, undefined, {
|
|
55
|
+
[key: string]: {
|
|
56
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
57
|
+
root?: tailwind_variants.ClassValue;
|
|
58
|
+
back?: tailwind_variants.ClassValue;
|
|
59
|
+
header?: tailwind_variants.ClassValue;
|
|
60
|
+
media?: tailwind_variants.ClassValue;
|
|
61
|
+
text?: tailwind_variants.ClassValue;
|
|
62
|
+
eyebrow?: tailwind_variants.ClassValue;
|
|
63
|
+
titleRow?: tailwind_variants.ClassValue;
|
|
64
|
+
title?: tailwind_variants.ClassValue;
|
|
65
|
+
meta?: tailwind_variants.ClassValue;
|
|
66
|
+
actions?: tailwind_variants.ClassValue;
|
|
67
|
+
columns?: tailwind_variants.ClassValue;
|
|
68
|
+
main?: tailwind_variants.ClassValue;
|
|
69
|
+
aside?: tailwind_variants.ClassValue;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
} | {}, {
|
|
73
|
+
root: string;
|
|
74
|
+
back: string;
|
|
75
|
+
header: string;
|
|
76
|
+
media: string;
|
|
77
|
+
text: string;
|
|
78
|
+
eyebrow: string;
|
|
79
|
+
titleRow: string;
|
|
80
|
+
title: string;
|
|
81
|
+
meta: string;
|
|
82
|
+
actions: string;
|
|
83
|
+
columns: string;
|
|
84
|
+
main: string;
|
|
85
|
+
aside: string;
|
|
86
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
87
|
+
root: string;
|
|
88
|
+
back: string;
|
|
89
|
+
header: string;
|
|
90
|
+
media: string;
|
|
91
|
+
text: string;
|
|
92
|
+
eyebrow: string;
|
|
93
|
+
titleRow: string;
|
|
94
|
+
title: string;
|
|
95
|
+
meta: string;
|
|
96
|
+
actions: string;
|
|
97
|
+
columns: string;
|
|
98
|
+
main: string;
|
|
99
|
+
aside: string;
|
|
100
|
+
}>>;
|
|
101
|
+
type DetailLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
102
|
+
/** The way back to the list: your router's link (`<Link href="/videos">Videos</Link>`), drawn with its arrow. */
|
|
103
|
+
back?: React.ReactNode;
|
|
104
|
+
/** A thumbnail, a cover or an avatar beside the name. */
|
|
105
|
+
media?: React.ReactNode;
|
|
106
|
+
/** A mono line above the name (the object's kind, its id). */
|
|
107
|
+
eyebrow?: React.ReactNode;
|
|
108
|
+
/** The object's name: the `h1`. */
|
|
109
|
+
title: React.ReactNode;
|
|
110
|
+
/** Beside the name: its status (a Badge). */
|
|
111
|
+
status?: React.ReactNode;
|
|
112
|
+
/** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */
|
|
113
|
+
meta?: React.ReactNode;
|
|
114
|
+
/** The object's actions (edit, publish, a DropdownMenu). */
|
|
115
|
+
actions?: React.ReactNode;
|
|
116
|
+
/** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */
|
|
117
|
+
tabs?: React.ReactNode;
|
|
118
|
+
/** The side panel: details, related objects, activity (under the content on a phone). */
|
|
119
|
+
aside?: React.ReactNode;
|
|
120
|
+
/** The content (the current tab). */
|
|
121
|
+
children: React.ReactNode;
|
|
122
|
+
};
|
|
123
|
+
/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */
|
|
124
|
+
declare function DetailLayout({ back, media, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }: DetailLayoutProps): React.JSX.Element;
|
|
125
|
+
|
|
126
|
+
export { DetailLayout, type DetailLayoutProps, detailLayout };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/detail-layout/detail-layout.tsx
|
|
2
|
+
import { tv } from "tailwind-variants";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
var detailLayout = tv({
|
|
5
|
+
slots: {
|
|
6
|
+
root: "flex w-full flex-col gap-6",
|
|
7
|
+
back: "inline-flex w-fit items-center gap-1.5 rounded-md text-sm font-medium text-fg-secondary no-underline hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
8
|
+
header: "flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start",
|
|
9
|
+
media: "shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
10
|
+
text: "flex min-w-0 flex-1 flex-col gap-2",
|
|
11
|
+
eyebrow: "font-mono text-[11px] font-semibold uppercase tracking-[0.16em] text-fg-accent",
|
|
12
|
+
titleRow: "flex flex-wrap items-center gap-2",
|
|
13
|
+
title: "min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words",
|
|
14
|
+
meta: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary",
|
|
15
|
+
actions: "flex shrink-0 flex-wrap items-center gap-2",
|
|
16
|
+
columns: "grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8",
|
|
17
|
+
main: "flex min-w-0 flex-col gap-5",
|
|
18
|
+
aside: "flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
var s = detailLayout();
|
|
22
|
+
function DetailLayout({ back, media, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", { className: s.root({ className }), ...props, children: [
|
|
24
|
+
back && /* @__PURE__ */ jsx("div", { className: s.back(), children: back }),
|
|
25
|
+
/* @__PURE__ */ jsxs("div", { className: s.header(), children: [
|
|
26
|
+
media && /* @__PURE__ */ jsx("div", { className: s.media(), children: media }),
|
|
27
|
+
/* @__PURE__ */ jsxs("div", { className: s.text(), children: [
|
|
28
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: s.eyebrow(), children: eyebrow }),
|
|
29
|
+
/* @__PURE__ */ jsxs("div", { className: s.titleRow(), children: [
|
|
30
|
+
/* @__PURE__ */ jsx("h1", { className: s.title(), children: title }),
|
|
31
|
+
status
|
|
32
|
+
] }),
|
|
33
|
+
meta && /* @__PURE__ */ jsx("div", { className: s.meta(), children: meta })
|
|
34
|
+
] }),
|
|
35
|
+
actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
|
|
36
|
+
] }),
|
|
37
|
+
tabs,
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: aside ? s.columns() : void 0, children: [
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: s.main(), children }),
|
|
40
|
+
aside && /* @__PURE__ */ jsx("aside", { className: s.aside(), children: aside })
|
|
41
|
+
] })
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
DetailLayout,
|
|
46
|
+
detailLayout
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=detail-layout.js.map
|