@krizaka/ui 3.53.0 → 3.55.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 +1 -0
- package/dist/account-menu.d.ts +6 -2
- package/dist/account-menu.js +8 -1
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.js +28 -88
- package/dist/account-settings.js.map +1 -1
- package/dist/anatomy-plate.d.ts +4 -1
- package/dist/anatomy-plate.js +4 -0
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +63 -0
- package/dist/app-header/search.js +70 -0
- package/dist/app-header/search.js.map +1 -0
- package/dist/app-header.d.ts +88 -4
- package/dist/app-header.js +63 -5
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.js +31 -40
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.js +3 -3
- package/dist/bird-plate.d.ts +3 -1
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/blocks.css +202 -27
- package/dist/chapter.d.ts +20 -3
- package/dist/chapter.js +82 -31
- package/dist/chapter.js.map +1 -1
- package/dist/chat.js +2 -2
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip.js +5 -98
- package/dist/chip.js.map +1 -1
- package/dist/choice-grid.js +28 -88
- package/dist/choice-grid.js.map +1 -1
- package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
- package/dist/chunk-3X3OF4TI.js.map +1 -0
- package/dist/chunk-5VEVYDVC.js +11 -0
- package/dist/chunk-5VEVYDVC.js.map +1 -0
- package/dist/chunk-7U5TXA5Q.js +105 -0
- package/dist/chunk-7U5TXA5Q.js.map +1 -0
- package/dist/{chunk-KBQD6HE3.js → chunk-AEP3K4YD.js} +3 -3
- package/dist/{chunk-KBQD6HE3.js.map → chunk-AEP3K4YD.js.map} +1 -1
- package/dist/chunk-BDIU5LZB.js +18 -0
- package/dist/chunk-BDIU5LZB.js.map +1 -0
- package/dist/chunk-CSRKYZ53.js +39 -0
- package/dist/chunk-CSRKYZ53.js.map +1 -0
- package/dist/chunk-HEKDKM5Y.js +128 -0
- package/dist/chunk-HEKDKM5Y.js.map +1 -0
- package/dist/chunk-KGLRZMCY.js +16 -0
- package/dist/chunk-KGLRZMCY.js.map +1 -0
- package/dist/chunk-KID32IRJ.js +18 -0
- package/dist/chunk-KID32IRJ.js.map +1 -0
- package/dist/{chunk-ZQW7LF4Y.js → chunk-OIMXKRXF.js} +2 -2
- package/dist/{chunk-YHKTYFOQ.js → chunk-QWKCNSPF.js} +271 -47
- package/dist/chunk-QWKCNSPF.js.map +1 -0
- package/dist/{chunk-4LYKBSOG.js → chunk-USPOIQV5.js} +2 -2
- package/dist/chunk-USPOIQV5.js.map +1 -0
- package/dist/{chunk-7NRSPHAF.js → chunk-VB7MWE2N.js} +2 -2
- package/dist/{chunk-7NRSPHAF.js.map → chunk-VB7MWE2N.js.map} +1 -1
- package/dist/chunk-VIPSZXO4.js +103 -0
- package/dist/chunk-VIPSZXO4.js.map +1 -0
- package/dist/chunk-YCZ7N6Q6.js +385 -0
- package/dist/chunk-YCZ7N6Q6.js.map +1 -0
- package/dist/code-block.js +81 -98
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.js +2 -2
- package/dist/component-page.d.ts +4 -1
- package/dist/component-page.js +5 -0
- package/dist/component-page.js.map +1 -1
- package/dist/continue-prompt.d.ts +4 -1
- package/dist/continue-prompt.js +4 -0
- package/dist/continue-prompt.js.map +1 -1
- package/dist/data-table.d.ts +60 -4
- package/dist/data-table.js +19 -7
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/detail-layout.d.ts +28 -17
- package/dist/detail-layout.js +73 -16
- package/dist/detail-layout.js.map +1 -1
- package/dist/doodle.d.ts +21 -0
- package/dist/doodle.js +39 -0
- package/dist/doodle.js.map +1 -0
- package/dist/drop-overlay.d.ts +12 -4
- package/dist/drop-overlay.js +16 -6
- package/dist/drop-overlay.js.map +1 -1
- package/dist/elephant.d.ts +2 -0
- package/dist/elephant.js +4 -0
- package/dist/elephant.js.map +1 -1
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/force-update-screen.d.ts +5 -1
- package/dist/force-update-screen.js +4 -0
- package/dist/force-update-screen.js.map +1 -1
- package/dist/gallery-page.d.ts +4 -1
- package/dist/gallery-page.js +4 -0
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.js +5 -5
- package/dist/image-cropper.d.ts +10 -2
- package/dist/image-cropper.js +4 -0
- package/dist/image-cropper.js.map +1 -1
- package/dist/kanban.d.ts +3 -0
- package/dist/kanban.js +4 -0
- package/dist/kanban.js.map +1 -1
- package/dist/landscape.d.ts +4 -1
- package/dist/landscape.js +4 -0
- package/dist/landscape.js.map +1 -1
- package/dist/list.js +1 -1
- package/dist/maintenance-screen.d.ts +5 -1
- package/dist/maintenance-screen.js +4 -0
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.js +6 -0
- package/dist/map.js.map +1 -1
- package/dist/markdown.d.ts +5 -1
- package/dist/markdown.js +12 -5
- package/dist/markdown.js.map +1 -1
- package/dist/match-dialog.d.ts +4 -1
- package/dist/match-dialog.js +4 -0
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +6 -1
- package/dist/media-capture.js +4 -0
- package/dist/media-capture.js.map +1 -1
- package/dist/meter.js +5 -121
- package/dist/meter.js.map +1 -1
- package/dist/native/map.js +6 -0
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.d.ts +9 -2
- package/dist/native/markdown.js +46 -7
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +1 -0
- package/dist/native/media-capture.js +5 -0
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/vertical-video.d.ts +8 -2
- package/dist/native/vertical-video.js +6 -0
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native.d.ts +94 -4
- package/dist/native.js +1236 -1110
- package/dist/native.js.map +1 -1
- package/dist/nav-bar/me.d.ts +32 -0
- package/dist/nav-bar/me.js +23 -0
- package/dist/nav-bar/me.js.map +1 -0
- package/dist/nav-bar.d.ts +60 -2
- package/dist/nav-bar.js +92 -48
- package/dist/nav-bar.js.map +1 -1
- package/dist/notification-preferences.d.ts +151 -0
- package/dist/notification-preferences.js +77 -0
- package/dist/notification-preferences.js.map +1 -0
- package/dist/page-header.js +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/pointer-light.js +5 -0
- package/dist/pointer-light.js.map +1 -1
- package/dist/product-page.d.ts +4 -1
- package/dist/product-page.js +4 -0
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +119 -1
- package/dist/profile-card.js +68 -21
- package/dist/profile-card.js.map +1 -1
- package/dist/promise-card.d.ts +4 -1
- package/dist/promise-card.js +4 -0
- package/dist/promise-card.js.map +1 -1
- package/dist/quota-meter.d.ts +113 -0
- package/dist/quota-meter.js +58 -0
- package/dist/quota-meter.js.map +1 -0
- package/dist/radio-group.js +6 -8
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +18 -2
- package/dist/rail-nav.js +25 -2
- package/dist/rail-nav.js.map +1 -1
- package/dist/retro-tv.d.ts +30 -0
- package/dist/retro-tv.js +124 -0
- package/dist/retro-tv.js.map +1 -0
- package/dist/router.d.ts +12 -1
- package/dist/router.js +85 -8
- package/dist/router.js.map +1 -1
- package/dist/scroll-stage.d.ts +5 -1
- package/dist/scroll-stage.js +5 -0
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.js +1 -1
- package/dist/showcase.d.ts +9 -2
- package/dist/showcase.js +5 -0
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +19 -0
- package/dist/signature.js +39 -0
- package/dist/signature.js.map +1 -0
- package/dist/site-footer.js +1 -1
- package/dist/sites.js +1 -1
- package/dist/sites.js.map +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/stat.js +1 -1
- package/dist/stat.js.map +1 -1
- package/dist/status-page.d.ts +4 -1
- package/dist/status-page.js +5 -0
- package/dist/status-page.js.map +1 -1
- package/dist/stuck.d.ts +27 -0
- package/dist/stuck.js +26 -0
- package/dist/stuck.js.map +1 -0
- package/dist/swipe-deck.d.ts +9 -2
- package/dist/swipe-deck.js +5 -0
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.js +4 -32
- package/dist/switch.js.map +1 -1
- package/dist/tabs.d.ts +47 -8
- package/dist/tabs.js +62 -12
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.js +2 -2
- package/dist/tag-selector.js +1 -1
- package/dist/terminal-replay.d.ts +4 -1
- package/dist/terminal-replay.js +4 -0
- package/dist/terminal-replay.js.map +1 -1
- package/dist/tree-view.js +4 -0
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +5 -1
- package/dist/update-prompt.js +4 -0
- package/dist/update-prompt.js.map +1 -1
- package/dist/video-player.js +7 -376
- package/dist/video-player.js.map +1 -1
- package/dist/video-trimmer.d.ts +6 -1
- package/dist/video-trimmer.js +4 -0
- package/dist/video-trimmer.js.map +1 -1
- package/package.json +143 -31
- package/registry/account-menu.json +9 -8
- package/registry/account-settings.json +2 -2
- package/registry/achievement.json +3 -4
- package/registry/action-bar.json +3 -3
- package/registry/action-sheet.json +1 -0
- package/registry/activity-feed.json +2 -1
- package/registry/agenda.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/anatomy-plate.json +13 -5
- package/registry/app-header.json +470 -23
- package/registry/app-shell.json +2 -2
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +3 -2
- package/registry/badge.json +2 -1
- package/registry/bird-plate.json +16 -2
- package/registry/button.json +7 -6
- package/registry/captcha.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +7 -6
- package/registry/catalogue-page.json +3 -4
- package/registry/changelog-page.json +3 -5
- package/registry/chapter.json +46 -10
- package/registry/chat.json +3 -2
- package/registry/checkbox.json +4 -3
- package/registry/chip-link.json +2 -2
- package/registry/chip-row.json +2 -2
- package/registry/chip.json +3 -2
- package/registry/choice-grid.json +3 -4
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +3 -2
- package/registry/command.json +2 -2
- package/registry/comparison-table.json +1 -1
- package/registry/component-page.json +14 -5
- package/registry/confirm-button.json +4 -4
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +13 -5
- package/registry/countdown.json +4 -3
- package/registry/cover-hero.json +3 -4
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +63 -7
- package/registry/date-picker.json +5 -4
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +2 -1
- package/registry/detail-layout.json +30 -6
- package/registry/dialog.json +7 -6
- package/registry/docs-article-page.json +3 -4
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +1 -1
- package/registry/document-viewer.json +3 -5
- package/registry/doodle.json +209 -0
- package/registry/drop-overlay.json +30 -16
- package/registry/dropdown-menu.json +2 -2
- package/registry/elephant.json +15 -7
- package/registry/empty-state.json +2 -1
- package/registry/engine-flow.json +1 -1
- package/registry/error-page.json +3 -5
- package/registry/examples/app-header/family.d.ts +4 -0
- package/registry/examples/app-header/family.js +41 -0
- package/registry/examples/app-header/family.tsx +37 -0
- package/registry/examples/app-header/native/family.d.ts +4 -0
- package/registry/examples/app-header/native/family.dark.png +0 -0
- package/registry/examples/app-header/native/family.js +25 -0
- package/registry/examples/app-header/native/family.light.png +0 -0
- package/registry/examples/app-header/native/family.tsx +33 -0
- package/registry/examples/chapter/album.d.ts +4 -0
- package/registry/examples/chapter/album.js +34 -0
- package/registry/examples/chapter/album.tsx +30 -0
- package/registry/examples/chapter/in-ruled-page.d.ts +4 -0
- package/registry/examples/chapter/in-ruled-page.js +23 -0
- package/registry/examples/chapter/in-ruled-page.tsx +19 -0
- package/registry/examples/data-table/applicant-files.d.ts +4 -0
- package/registry/examples/data-table/applicant-files.js +24 -0
- package/registry/examples/data-table/applicant-files.tsx +23 -0
- package/registry/examples/data-table/checks.d.ts +4 -0
- package/registry/examples/data-table/checks.js +25 -0
- package/registry/examples/data-table/checks.tsx +24 -0
- package/registry/examples/detail-layout/profile.d.ts +4 -0
- package/registry/examples/detail-layout/profile.js +26 -0
- package/registry/examples/detail-layout/profile.tsx +21 -0
- package/registry/examples/doodle/kinds.d.ts +4 -0
- package/registry/examples/doodle/kinds.js +17 -0
- package/registry/examples/doodle/kinds.tsx +14 -0
- package/registry/examples/doodle/margin.d.ts +4 -0
- package/registry/examples/doodle/margin.js +17 -0
- package/registry/examples/doodle/margin.tsx +17 -0
- package/registry/examples/markdown/native/basic.dark.png +0 -0
- package/registry/examples/markdown/native/basic.light.png +0 -0
- package/registry/examples/markdown/native/wide-table.d.ts +4 -0
- package/registry/examples/markdown/native/wide-table.dark.png +0 -0
- package/registry/examples/markdown/native/wide-table.js +23 -0
- package/registry/examples/markdown/native/wide-table.light.png +0 -0
- package/registry/examples/markdown/native/wide-table.tsx +22 -0
- package/registry/examples/markdown/wide-table.d.ts +4 -0
- package/registry/examples/markdown/wide-table.js +28 -0
- package/registry/examples/markdown/wide-table.tsx +23 -0
- package/registry/examples/nav-bar/family-product.js +2 -4
- package/registry/examples/nav-bar/family-product.tsx +3 -5
- package/registry/examples/notification-preferences/default.d.ts +4 -0
- package/registry/examples/notification-preferences/default.js +29 -0
- package/registry/examples/notification-preferences/default.tsx +28 -0
- package/registry/examples/profile-card/banner.d.ts +4 -0
- package/registry/examples/profile-card/banner.js +28 -0
- package/registry/examples/profile-card/banner.tsx +24 -0
- package/registry/examples/profile-card/native/banner.d.ts +4 -0
- package/registry/examples/profile-card/native/banner.dark.png +0 -0
- package/registry/examples/profile-card/native/banner.js +22 -0
- package/registry/examples/profile-card/native/banner.light.png +0 -0
- package/registry/examples/profile-card/native/banner.tsx +18 -0
- package/registry/examples/quota-meter/default.d.ts +4 -0
- package/registry/examples/quota-meter/default.js +26 -0
- package/registry/examples/quota-meter/default.tsx +20 -0
- package/registry/examples/quota-meter/full.d.ts +4 -0
- package/registry/examples/quota-meter/full.js +25 -0
- package/registry/examples/quota-meter/full.tsx +18 -0
- package/registry/examples/rail-nav/shortcuts.d.ts +4 -0
- package/registry/examples/rail-nav/shortcuts.js +49 -0
- package/registry/examples/rail-nav/shortcuts.tsx +40 -0
- package/registry/examples/retro-tv/cabinet.d.ts +4 -0
- package/registry/examples/retro-tv/cabinet.js +12 -0
- package/registry/examples/retro-tv/cabinet.tsx +7 -0
- package/registry/examples/retro-tv/portable.d.ts +4 -0
- package/registry/examples/retro-tv/portable.js +12 -0
- package/registry/examples/retro-tv/portable.tsx +7 -0
- package/registry/examples/signature/both.d.ts +4 -0
- package/registry/examples/signature/both.js +11 -0
- package/registry/examples/signature/both.tsx +6 -0
- package/registry/examples/signature/variants.d.ts +4 -0
- package/registry/examples/signature/variants.js +14 -0
- package/registry/examples/signature/variants.tsx +11 -0
- package/registry/examples/stuck/card.d.ts +4 -0
- package/registry/examples/stuck/card.js +13 -0
- package/registry/examples/stuck/card.tsx +14 -0
- package/registry/examples/stuck/holds.d.ts +4 -0
- package/registry/examples/stuck/holds.js +12 -0
- package/registry/examples/stuck/holds.tsx +16 -0
- package/registry/examples/stuck/tag.d.ts +4 -0
- package/registry/examples/stuck/tag.js +12 -0
- package/registry/examples/stuck/tag.tsx +13 -0
- package/registry/examples/tabs/binder.d.ts +4 -0
- package/registry/examples/tabs/binder.js +22 -0
- package/registry/examples/tabs/binder.tsx +20 -0
- package/registry/examples/tabs/native/binder.d.ts +4 -0
- package/registry/examples/tabs/native/binder.dark.png +0 -0
- package/registry/examples/tabs/native/binder.js +26 -0
- package/registry/examples/tabs/native/binder.light.png +0 -0
- package/registry/examples/tabs/native/binder.tsx +22 -0
- package/registry/fab.json +1 -0
- package/registry/field.json +3 -2
- package/registry/file-upload.json +6 -11
- package/registry/filter-bar.json +2 -2
- package/registry/flock.json +3 -4
- package/registry/footnote.json +2 -3
- package/registry/force-update-screen.json +14 -5
- package/registry/form.json +5 -4
- package/registry/gallery-page.json +14 -5
- package/registry/genui.json +2 -2
- package/registry/glossary-term.json +1 -1
- package/registry/glossary.json +1 -1
- package/registry/glow-card.json +2 -2
- package/registry/goal-gauge.json +2 -1
- package/registry/header.json +1 -0
- package/registry/how-it-works-page.json +3 -5
- package/registry/image-cropper.json +13 -5
- package/registry/image-viewer.json +3 -4
- package/registry/index.json +306 -91
- package/registry/iso.json +1 -1
- package/registry/kanban.json +13 -5
- package/registry/kbd.json +1 -1
- package/registry/kpi-explained.json +2 -2
- package/registry/landing-page.json +3 -5
- package/registry/landscape.json +13 -5
- package/registry/language-switch.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +1 -1
- package/registry/list.json +2 -1
- package/registry/loader.json +2 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +14 -5
- package/registry/map.json +3 -2
- package/registry/markdown.json +86 -9
- package/registry/marketing-layout.json +1 -1
- package/registry/marquee.json +1 -1
- package/registry/mascot-quote.json +1 -1
- package/registry/mascot-state.json +12 -11
- package/registry/mascots.json +2 -1
- package/registry/match-dialog.json +14 -5
- package/registry/media-capture.json +14 -5
- package/registry/media-gallery.json +3 -5
- package/registry/media-grid.json +1 -1
- package/registry/media-picker.json +2 -3
- package/registry/meta-row.json +2 -1
- package/registry/meter.json +4 -3
- package/registry/nav-bar.json +100 -9
- package/registry/next-actions.json +1 -1
- package/registry/notification-preferences.json +250 -0
- package/registry/number-ticker.json +2 -1
- package/registry/onboarding.json +1 -0
- package/registry/opening-hours.json +1 -1
- package/registry/otp-input.json +1 -0
- package/registry/page-header.json +2 -2
- package/registry/page-hero.json +1 -1
- package/registry/page-index.json +1 -1
- package/registry/page.json +3 -3
- package/registry/pagination.json +2 -1
- package/registry/permission-prompt.json +2 -2
- package/registry/photo-grid.json +4 -4
- package/registry/pointer-light.json +6 -2
- package/registry/popover.json +2 -2
- package/registry/pricing-page.json +4 -6
- package/registry/product-page.json +14 -5
- package/registry/profile-card.json +232 -8
- package/registry/progress.json +4 -3
- package/registry/promise-card.json +13 -5
- package/registry/pull-to-refresh.json +1 -0
- package/registry/quota-meter.json +308 -0
- package/registry/radio-group.json +4 -3
- package/registry/rail-nav.json +48 -10
- package/registry/recipes.json +1 -1
- package/registry/retro-tv.json +478 -0
- package/registry/router.json +3 -3
- package/registry/screen.json +1 -0
- package/registry/scroll-stage.json +14 -5
- package/registry/search-field.json +3 -2
- package/registry/section-backdrop.json +1 -1
- package/registry/segmented.json +1 -0
- package/registry/separator.json +2 -2
- package/registry/service-card.json +1 -1
- package/registry/settings-layout.json +2 -1
- package/registry/showcase.json +14 -5
- package/registry/signature.json +185 -0
- package/registry/site-footer.json +3 -3
- package/registry/sites.json +2 -2
- package/registry/skeleton.json +2 -1
- package/registry/skip-link.json +1 -1
- package/registry/slider.json +5 -4
- package/registry/slot-picker.json +1 -1
- package/registry/slot.json +2 -2
- package/registry/specimen-tag.json +1 -1
- package/registry/spinner.json +4 -3
- package/registry/splash-handoff.json +1 -0
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +2 -3
- package/registry/stat.json +2 -2
- package/registry/status-page.json +13 -5
- package/registry/step-progress.json +2 -1
- package/registry/step-showcase.json +3 -5
- package/registry/stepper.json +2 -1
- package/registry/sticky-action.json +1 -1
- package/registry/stuck.json +219 -0
- package/registry/swipe-deck.json +14 -5
- package/registry/swipeable-row.json +1 -0
- package/registry/switch.json +3 -2
- package/registry/tab-bar.json +1 -0
- package/registry/tabs.json +154 -22
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +2 -1
- package/registry/taped-photo.json +1 -1
- package/registry/terminal-replay.json +14 -5
- package/registry/text-style.json +5 -5
- package/registry/theme.json +2 -1
- package/registry/toast.json +2 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +2 -2
- package/registry/tree-view.json +6 -2
- package/registry/txt.json +1 -0
- package/registry/update-prompt.json +14 -5
- package/registry/upload-queue.json +1 -1
- package/registry/verified-badge.json +6 -6
- package/registry/vertical-video.json +8 -3
- package/registry/video-player.json +5 -6
- package/registry/video-trimmer.json +13 -5
- package/registry/virtual.json +2 -2
- package/registry/waveform.json +4 -3
- package/dist/chunk-4LYKBSOG.js.map +0 -1
- package/dist/chunk-HHFWK2HH.js +0 -163
- package/dist/chunk-HHFWK2HH.js.map +0 -1
- package/dist/chunk-R3LTSMS5.js +0 -75
- package/dist/chunk-R3LTSMS5.js.map +0 -1
- package/dist/chunk-YGIN2YIY.js.map +0 -1
- package/dist/chunk-YHKTYFOQ.js.map +0 -1
- /package/dist/{chunk-ZQW7LF4Y.js.map → chunk-OIMXKRXF.js.map} +0 -0
package/dist/product-page.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/product-page/product-page.tsx"],"sourcesContent":["// Server-safe. A product's overview: the hero with the product's mark, its promise, facts and main action beside a live\n// window of the product; the traps it removes as compact argument cards; its decisions with their cost; the promise a\n// bird keeps; the closing call. Under the product's brand (`brand` → `.brand-<id>`).\nimport { ArgumentCard } from \"@krizaka/ui/argument-card\";\nimport { CardGrid } from \"@krizaka/ui/card-grid\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { type Decision, DecisionList } from \"@krizaka/ui/decision-list\";\nimport { MascotQuote } from \"@krizaka/ui/mascot-quote\";\nimport type { MascotBird } from \"@krizaka/ui/mascots\";\nimport { type Fact, Facts, Page, Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { SectionBackdrop } from \"@krizaka/ui/section-backdrop\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport interface ProductReason {\n /** A stable key (the card's anchor). */\n id: string;\n /** Its name. */\n title: React.ReactNode;\n /** The trap elsewhere, in one line. */\n trap: React.ReactNode;\n /** The signature icon. */\n icon?: React.ReactNode;\n /** The bird in the corner (whose rule it is). */\n mark?: React.ReactNode;\n /** Where the long version lives (a page) — or nothing, and the card stays its face. */\n href?: string;\n}\n\nexport type ProductPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The product's brand (`orazaka`, `orochia`…): the page wears `.brand-<id>`. */\n brand?: string;\n /** The product's mark and name, above the title. */\n mark?: React.ReactNode;\n /** The promise: the page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Facts under the lead (open source, a law it keeps). */\n facts?: readonly Fact[];\n /** The hero's actions. */\n actions?: React.ReactNode;\n /** The product alive, in a window beside the words. */\n visual?: React.ReactNode;\n /** The window's caption. */\n visualLabel?: React.ReactNode;\n /** The reasons' section heading. */\n reasonsHeading: { eyebrow?: React.ReactNode; title: React.ReactNode; lead?: React.ReactNode };\n /** The words of the cards: the trap's label (read, not shown) and the way in. */\n reasonLabels: { trap: string; more: React.ReactNode };\n /** The traps it removes. */\n reasons: readonly ProductReason[];\n /** The decisions' section: heading, decisions and their four labels. */\n decisions?: { eyebrow?: React.ReactNode; title: React.ReactNode; items: readonly Decision[]; labels: { chose: React.ReactNode; refused: React.ReactNode; because: React.ReactNode; cost: React.ReactNode } };\n /** The promise a bird keeps, under the decisions. */\n promise?: { bird: MascotBird; label: React.ReactNode; text: React.ReactNode };\n /** More sections between the decisions and the closing call (the tour, the platform, a comparison). */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n
|
|
1
|
+
{"version":3,"sources":["../src/product-page/product-page.tsx"],"sourcesContent":["// Server-safe. A product's overview: the hero with the product's mark, its promise, facts and main action beside a live\n// window of the product; the traps it removes as compact argument cards; its decisions with their cost; the promise a\n// bird keeps; the closing call. Under the product's brand (`brand` → `.brand-<id>`).\nimport { ArgumentCard } from \"@krizaka/ui/argument-card\";\nimport { CardGrid } from \"@krizaka/ui/card-grid\";\nimport { CtaPanel } from \"@krizaka/ui/cta-panel\";\nimport { type Decision, DecisionList } from \"@krizaka/ui/decision-list\";\nimport { MascotQuote } from \"@krizaka/ui/mascot-quote\";\nimport type { MascotBird } from \"@krizaka/ui/mascots\";\nimport { type Fact, Facts, Page, Section } from \"@krizaka/ui/page\";\nimport type { LinkComponent } from \"@krizaka/ui/page-hero\";\nimport { SectionBackdrop } from \"@krizaka/ui/section-backdrop\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { warnDeprecated } from \"../deprecated\";\n\nexport interface ProductReason {\n /** A stable key (the card's anchor). */\n id: string;\n /** Its name. */\n title: React.ReactNode;\n /** The trap elsewhere, in one line. */\n trap: React.ReactNode;\n /** The signature icon. */\n icon?: React.ReactNode;\n /** The bird in the corner (whose rule it is). */\n mark?: React.ReactNode;\n /** Where the long version lives (a page) — or nothing, and the card stays its face. */\n href?: string;\n}\n\nexport type ProductPageProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The product's brand (`orazaka`, `orochia`…): the page wears `.brand-<id>`. */\n brand?: string;\n /** The product's mark and name, above the title. */\n mark?: React.ReactNode;\n /** The promise: the page's `h1`. */\n title: React.ReactNode;\n /** One or two sentences under it. */\n lead?: React.ReactNode;\n /** Facts under the lead (open source, a law it keeps). */\n facts?: readonly Fact[];\n /** The hero's actions. */\n actions?: React.ReactNode;\n /** The product alive, in a window beside the words. */\n visual?: React.ReactNode;\n /** The window's caption. */\n visualLabel?: React.ReactNode;\n /** The reasons' section heading. */\n reasonsHeading: { eyebrow?: React.ReactNode; title: React.ReactNode; lead?: React.ReactNode };\n /** The words of the cards: the trap's label (read, not shown) and the way in. */\n reasonLabels: { trap: string; more: React.ReactNode };\n /** The traps it removes. */\n reasons: readonly ProductReason[];\n /** The decisions' section: heading, decisions and their four labels. */\n decisions?: { eyebrow?: React.ReactNode; title: React.ReactNode; items: readonly Decision[]; labels: { chose: React.ReactNode; refused: React.ReactNode; because: React.ReactNode; cost: React.ReactNode } };\n /** The promise a bird keeps, under the decisions. */\n promise?: { bird: MascotBird; label: React.ReactNode; text: React.ReactNode };\n /** More sections between the decisions and the closing call (the tour, the platform, a comparison). */\n children?: React.ReactNode;\n /** The closing call. */\n closing?: { title: React.ReactNode; body?: React.ReactNode; actions: React.ReactNode };\n /** The app's link component (Next's `Link`). */\n linkAs?: LinkComponent;\n};\n\n/**\n * A product's overview: split hero, traps as compact cards, decisions with their cost, the bird's promise, closing call.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function ProductPage({ brand, mark, title, lead, facts, actions, visual, visualLabel, reasonsHeading, reasonLabels, reasons, decisions, promise, closing, linkAs, className, children, ...props }: ProductPageProps) {\n warnDeprecated(\"product-page\");\n return (\n <div className={cn(brand && \"brand-\" + brand, className)} {...props}>\n <SectionBackdrop as=\"header\" grid className=\"kz-hero\">\n <Page>\n <div className={visual ? \"kz-tpl-split\" : undefined}>\n <div className=\"kz-hero-text\">\n {mark && <p className=\"kz-eyebrow\">{mark}</p>}\n <h1 className=\"kz-hero-title\">{title}</h1>\n {lead && <p className=\"kz-hero-lead\">{lead}</p>}\n {(facts || actions) && (\n <div className=\"kz-hero-extra\">\n {facts && <Facts items={facts} />}\n {actions && <div className=\"kz-tpl-actions\">{actions}</div>}\n </div>\n )}\n </div>\n {visual && (\n <figure className=\"kz-tpl-stage\">\n <div className=\"kz-tpl-stage-bar\" aria-hidden>\n {visualLabel && <span>{visualLabel}</span>}\n </div>\n {visual}\n </figure>\n )}\n </div>\n </Page>\n </SectionBackdrop>\n <Section id=\"why\" eyebrow={reasonsHeading.eyebrow} title={reasonsHeading.title} lead={reasonsHeading.lead} reveal>\n <CardGrid min={260} fit=\"fit\">\n {reasons.map((r) => (\n <ArgumentCard\n key={r.id}\n id={`why-${r.id}`}\n icon={r.icon}\n title={r.title}\n mark={r.mark}\n hook={{ label: reasonLabels.trap, text: r.trap }}\n more={r.href ? { href: r.href, label: reasonLabels.more } : undefined}\n linkAs={linkAs}\n />\n ))}\n </CardGrid>\n </Section>\n {decisions && (\n <Section id=\"decisions\" eyebrow={decisions.eyebrow} title={decisions.title} divider reveal>\n <DecisionList decisions={decisions.items} labels={decisions.labels} />\n {promise && (\n <div className=\"kz-tpl-promise\">\n <MascotQuote variant=\"callout\" bird={promise.bird} mood=\"welcome\" label={promise.label}>\n {promise.text}\n </MascotQuote>\n </div>\n )}\n </Section>\n )}\n {children}\n {closing && (\n <Section spacing=\"sm\" aria-labelledby=\"product-closing\">\n <CtaPanel id=\"product-closing\" title={closing.title} body={closing.body} reveal>\n {closing.actions}\n </CtaPanel>\n </Section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAGA,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AACzB,SAAS,gBAAgB;AACzB,SAAwB,oBAAoB;AAC5C,SAAS,mBAAmB;AAE5B,SAAoB,OAAO,MAAM,eAAe;AAEhD,SAAS,uBAAuB;AAoET,cAIP,YAJO;AARhB,SAAS,YAAY,EAAE,OAAO,MAAM,OAAO,MAAM,OAAO,SAAS,QAAQ,aAAa,gBAAgB,cAAc,SAAS,WAAW,SAAS,SAAS,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAqB;AAC1N,iBAAe,cAAc;AAC7B,SACE,qBAAC,SAAI,WAAW,GAAG,SAAS,WAAW,OAAO,SAAS,GAAI,GAAG,OAC5D;AAAA,wBAAC,mBAAgB,IAAG,UAAS,MAAI,MAAC,WAAU,WAC1C,8BAAC,QACC,+BAAC,SAAI,WAAW,SAAS,iBAAiB,QACxC;AAAA,2BAAC,SAAI,WAAU,gBACZ;AAAA,gBAAQ,oBAAC,OAAE,WAAU,cAAc,gBAAK;AAAA,QACzC,oBAAC,QAAG,WAAU,iBAAiB,iBAAM;AAAA,QACpC,QAAQ,oBAAC,OAAE,WAAU,gBAAgB,gBAAK;AAAA,SACzC,SAAS,YACT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AAO,MAAM,QAAQ,MAAM,QAAM,MAC5E,kBAAQ,SACX,GACF;AAAA,KAEJ;AAEJ;","names":[]}
|
package/dist/profile-card.d.ts
CHANGED
|
@@ -1,6 +1,124 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import { S as StoryVariant } from './story-variant-CLn4H5Nt.js';
|
|
3
4
|
|
|
5
|
+
declare const profileBanner: tailwind_variants.TVReturnType<{
|
|
6
|
+
[key: string]: {
|
|
7
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
8
|
+
root?: tailwind_variants.ClassValue;
|
|
9
|
+
scrim?: tailwind_variants.ClassValue;
|
|
10
|
+
body?: tailwind_variants.ClassValue;
|
|
11
|
+
identity?: tailwind_variants.ClassValue;
|
|
12
|
+
text?: tailwind_variants.ClassValue;
|
|
13
|
+
eyebrow?: tailwind_variants.ClassValue;
|
|
14
|
+
titleRow?: tailwind_variants.ClassValue;
|
|
15
|
+
title?: tailwind_variants.ClassValue;
|
|
16
|
+
meta?: tailwind_variants.ClassValue;
|
|
17
|
+
actions?: tailwind_variants.ClassValue;
|
|
18
|
+
cover?: tailwind_variants.ClassValue;
|
|
19
|
+
avatar?: tailwind_variants.ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
[x: string]: {
|
|
24
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
25
|
+
root?: tailwind_variants.ClassValue;
|
|
26
|
+
scrim?: tailwind_variants.ClassValue;
|
|
27
|
+
body?: tailwind_variants.ClassValue;
|
|
28
|
+
identity?: 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
|
+
cover?: tailwind_variants.ClassValue;
|
|
36
|
+
avatar?: tailwind_variants.ClassValue;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {}, {
|
|
40
|
+
root: string;
|
|
41
|
+
cover: string;
|
|
42
|
+
scrim: string;
|
|
43
|
+
body: string;
|
|
44
|
+
identity: string;
|
|
45
|
+
avatar: string;
|
|
46
|
+
text: string;
|
|
47
|
+
eyebrow: string;
|
|
48
|
+
titleRow: string;
|
|
49
|
+
title: string;
|
|
50
|
+
meta: string;
|
|
51
|
+
actions: string;
|
|
52
|
+
}, undefined, {
|
|
53
|
+
[key: string]: {
|
|
54
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
55
|
+
root?: tailwind_variants.ClassValue;
|
|
56
|
+
scrim?: tailwind_variants.ClassValue;
|
|
57
|
+
body?: tailwind_variants.ClassValue;
|
|
58
|
+
identity?: tailwind_variants.ClassValue;
|
|
59
|
+
text?: tailwind_variants.ClassValue;
|
|
60
|
+
eyebrow?: tailwind_variants.ClassValue;
|
|
61
|
+
titleRow?: tailwind_variants.ClassValue;
|
|
62
|
+
title?: tailwind_variants.ClassValue;
|
|
63
|
+
meta?: tailwind_variants.ClassValue;
|
|
64
|
+
actions?: tailwind_variants.ClassValue;
|
|
65
|
+
cover?: tailwind_variants.ClassValue;
|
|
66
|
+
avatar?: tailwind_variants.ClassValue;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
} | {}, {
|
|
70
|
+
root: string;
|
|
71
|
+
cover: string;
|
|
72
|
+
scrim: string;
|
|
73
|
+
body: string;
|
|
74
|
+
identity: string;
|
|
75
|
+
avatar: string;
|
|
76
|
+
text: string;
|
|
77
|
+
eyebrow: string;
|
|
78
|
+
titleRow: string;
|
|
79
|
+
title: string;
|
|
80
|
+
meta: string;
|
|
81
|
+
actions: string;
|
|
82
|
+
}, tailwind_variants.TVReturnTypeLike<unknown, {
|
|
83
|
+
root: string;
|
|
84
|
+
cover: string;
|
|
85
|
+
scrim: string;
|
|
86
|
+
body: string;
|
|
87
|
+
identity: string;
|
|
88
|
+
avatar: string;
|
|
89
|
+
text: string;
|
|
90
|
+
eyebrow: string;
|
|
91
|
+
titleRow: string;
|
|
92
|
+
title: string;
|
|
93
|
+
meta: string;
|
|
94
|
+
actions: string;
|
|
95
|
+
}>>;
|
|
96
|
+
type ProfileBannerProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
97
|
+
/** The cover: an `<img alt="">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */
|
|
98
|
+
banner?: React.ReactNode;
|
|
99
|
+
/** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */
|
|
100
|
+
avatar: React.ReactNode;
|
|
101
|
+
/** A mono line above the name: what it is (« Client », « Shop »), an id. */
|
|
102
|
+
eyebrow?: React.ReactNode;
|
|
103
|
+
/** The name: the page's heading. */
|
|
104
|
+
title: React.ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* The level of the name.
|
|
107
|
+
* @default "h1"
|
|
108
|
+
*/
|
|
109
|
+
titleAs?: "h1" | "h2";
|
|
110
|
+
/** Beside the name: a status (`Badge`), a verified mark. */
|
|
111
|
+
status?: React.ReactNode;
|
|
112
|
+
/** Under the name: its facts (a handle, a city, « client since 2024 »). */
|
|
113
|
+
meta?: React.ReactNode;
|
|
114
|
+
/** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */
|
|
115
|
+
actions?: React.ReactNode;
|
|
116
|
+
/** A brand scope (`akinaza` → `.brand-akinaza`): the default cover takes that brand's accent. */
|
|
117
|
+
brand?: string;
|
|
118
|
+
};
|
|
119
|
+
/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */
|
|
120
|
+
declare function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title, status, meta, actions, brand, className, ...props }: ProfileBannerProps): React.JSX.Element;
|
|
121
|
+
|
|
4
122
|
interface ProfileStat {
|
|
5
123
|
/** What it measures (“Response rate”) — passed translated. */
|
|
6
124
|
label: string;
|
|
@@ -82,4 +200,4 @@ type StatGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, "children"> & {
|
|
|
82
200
|
/** A measured strength: label, figure and bar; `role="meter"` with `aria-valuetext`. */
|
|
83
201
|
declare function StatGauge({ label, value, max, valueText, figure, hideLabel, className, style, ...props }: StatGaugeProps): React.JSX.Element;
|
|
84
202
|
|
|
85
|
-
export { ProfileCard, type ProfileCardProps, type ProfileStat, StatGauge, type StatGaugeProps };
|
|
203
|
+
export { ProfileBanner, type ProfileBannerProps, ProfileCard, type ProfileCardProps, type ProfileStat, StatGauge, type StatGaugeProps, profileBanner };
|
package/dist/profile-card.js
CHANGED
|
@@ -4,13 +4,58 @@ import {
|
|
|
4
4
|
storyVariantClass
|
|
5
5
|
} from "./chunk-XVFQZ3ZG.js";
|
|
6
6
|
|
|
7
|
-
// src/profile-card/
|
|
7
|
+
// src/profile-card/banner.tsx
|
|
8
|
+
import { tv } from "tailwind-variants";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var profileBanner = tv({
|
|
11
|
+
slots: {
|
|
12
|
+
root: "relative flex w-full min-w-0 flex-col",
|
|
13
|
+
// The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).
|
|
14
|
+
cover: "relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
15
|
+
scrim: "pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent",
|
|
16
|
+
body: "relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2",
|
|
17
|
+
identity: "flex min-w-0 items-end gap-4",
|
|
18
|
+
// The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.
|
|
19
|
+
avatar: "relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 [&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover",
|
|
20
|
+
text: "flex min-w-0 flex-1 flex-col gap-1 pb-1",
|
|
21
|
+
eyebrow: "font-mono text-[11px] font-semibold text-fg-accent",
|
|
22
|
+
titleRow: "flex min-w-0 flex-wrap items-center gap-2",
|
|
23
|
+
title: "min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl",
|
|
24
|
+
meta: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary",
|
|
25
|
+
actions: "flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1"
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
var s = profileBanner();
|
|
29
|
+
function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = "h1", status, meta, actions, brand, className, ...props }) {
|
|
30
|
+
return /* @__PURE__ */ jsxs("section", { className: s.root({ className: cn(brandClass(brand), className) }), ...props, children: [
|
|
31
|
+
/* @__PURE__ */ jsxs("div", { "data-cover": "", className: s.cover(), children: [
|
|
32
|
+
banner,
|
|
33
|
+
banner ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: s.scrim() }) : null
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: s.body(), children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { className: s.identity(), children: [
|
|
37
|
+
/* @__PURE__ */ jsx("div", { "data-avatar": "", className: s.avatar(), children: avatar }),
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: s.text(), children: [
|
|
39
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: s.eyebrow(), children: eyebrow }),
|
|
40
|
+
/* @__PURE__ */ jsxs("div", { className: s.titleRow(), children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Title, { className: s.title(), children: title }),
|
|
42
|
+
status
|
|
43
|
+
] }),
|
|
44
|
+
meta && /* @__PURE__ */ jsx("div", { className: s.meta(), children: meta })
|
|
45
|
+
] })
|
|
46
|
+
] }),
|
|
47
|
+
actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
|
|
48
|
+
] })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/profile-card/stat-gauge.tsx
|
|
53
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
9
54
|
var clamp = (n) => Math.min(1, Math.max(0, n));
|
|
10
55
|
function StatGauge({ label, value = 100, max = 100, valueText, figure, hideLabel, className, style, ...props }) {
|
|
11
56
|
const ratio = clamp(value / (max || 1));
|
|
12
57
|
const words = valueText ?? `${Math.round(ratio * 100)} %`;
|
|
13
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ jsxs2(
|
|
14
59
|
"div",
|
|
15
60
|
{
|
|
16
61
|
role: "meter",
|
|
@@ -23,18 +68,18 @@ function StatGauge({ label, value = 100, max = 100, valueText, figure, hideLabel
|
|
|
23
68
|
style: { "--kzs-ratio": ratio, ...style },
|
|
24
69
|
...props,
|
|
25
70
|
children: [
|
|
26
|
-
!hideLabel && /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
71
|
+
!hideLabel && /* @__PURE__ */ jsxs2("span", { className: "kzs-stat-head", "aria-hidden": true, children: [
|
|
72
|
+
/* @__PURE__ */ jsx2("span", { className: "kzs-stat-label", children: label }),
|
|
73
|
+
/* @__PURE__ */ jsx2("span", { className: "kzs-stat-value", children: figure ?? words })
|
|
29
74
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ jsx2("span", { className: "kzs-bar", "aria-hidden": true, children: /* @__PURE__ */ jsx2("span", { className: "kzs-bar-fill" }) })
|
|
31
76
|
]
|
|
32
77
|
}
|
|
33
78
|
);
|
|
34
79
|
}
|
|
35
80
|
|
|
36
81
|
// src/profile-card/profile-card.tsx
|
|
37
|
-
import { jsx as
|
|
82
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
38
83
|
function ProfileCard({
|
|
39
84
|
visual,
|
|
40
85
|
name,
|
|
@@ -54,34 +99,36 @@ function ProfileCard({
|
|
|
54
99
|
style,
|
|
55
100
|
...props
|
|
56
101
|
}) {
|
|
57
|
-
return /* @__PURE__ */
|
|
102
|
+
return /* @__PURE__ */ jsxs3(
|
|
58
103
|
"article",
|
|
59
104
|
{
|
|
60
105
|
className: cn("kzs-profile", storyVariantClass(variant), brandClass(brand), className),
|
|
61
106
|
style: visualSize ? { "--kzs-disc": `${visualSize}px`, ...style } : style,
|
|
62
107
|
...props,
|
|
63
108
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-texture", "aria-hidden": true }),
|
|
110
|
+
/* @__PURE__ */ jsxs3("div", { className: "kzs-profile-disc", "aria-hidden": true, children: [
|
|
111
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-profile-ring" }),
|
|
112
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-profile-aura kzs-loop" }),
|
|
113
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-profile-flash" }),
|
|
114
|
+
/* @__PURE__ */ jsx3("span", { className: "kzs-profile-visual", children: visual })
|
|
70
115
|
] }),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
icon && /* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ jsxs3(Name, { className: "kzs-profile-name", children: [
|
|
117
|
+
icon && /* @__PURE__ */ jsx3("span", { "aria-hidden": true, children: icon }),
|
|
73
118
|
name
|
|
74
119
|
] }),
|
|
75
|
-
statLabel && /* @__PURE__ */
|
|
76
|
-
stats && stats.length > 0 && /* @__PURE__ */
|
|
77
|
-
caption && /* @__PURE__ */
|
|
78
|
-
children && /* @__PURE__ */
|
|
120
|
+
statLabel && /* @__PURE__ */ jsx3(StatGauge, { label: statLabel, value, valueText, figure }),
|
|
121
|
+
stats && stats.length > 0 && /* @__PURE__ */ jsx3("ul", { className: "kzs-profile-stats", children: stats.map((s2) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(StatGauge, { label: s2.label, value: s2.value, max: s2.max, valueText: s2.valueText }) }, s2.label)) }),
|
|
122
|
+
caption && /* @__PURE__ */ jsx3("p", { className: "kzs-profile-caption", children: caption }),
|
|
123
|
+
children && /* @__PURE__ */ jsx3("div", { className: "kzs-profile-extra", children })
|
|
79
124
|
]
|
|
80
125
|
}
|
|
81
126
|
);
|
|
82
127
|
}
|
|
83
128
|
export {
|
|
129
|
+
ProfileBanner,
|
|
84
130
|
ProfileCard,
|
|
85
|
-
StatGauge
|
|
131
|
+
StatGauge,
|
|
132
|
+
profileBanner
|
|
86
133
|
};
|
|
87
134
|
//# sourceMappingURL=profile-card.js.map
|
package/dist/profile-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/profile-card/stat-gauge.tsx","../src/profile-card/profile-card.tsx"],"sourcesContent":["// Server-safe. One measured strength: a label, its figure, a bar (story.css) — the gauge of a ProfileCard, also usable\n// alone (in a ChoiceGrid tile, a list). A `meter` with its value in words.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type StatGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** What it measures (“Profile complete”, “Creator share”) — passed translated; the meter's accessible name. */\n label: string;\n /**\n * The value, between 0 and `max`.\n * @default 100\n */\n value?: number;\n /**\n * The top of the range.\n * @default 100\n */\n max?: number;\n /** The value in words (“12 of 15”); default: the percentage. Read by assistive technology, shown without `figure`. */\n valueText?: string;\n /** What shows as the figure instead of `valueText`: a `NumberTicker` that climbs, a formatted amount. Decorative. */\n figure?: React.ReactNode;\n /**\n * Hides the label and the figure (the bar alone, named for assistive technology).\n * @default false\n */\n hideLabel?: boolean;\n};\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/** A measured strength: label, figure and bar; `role=\"meter\"` with `aria-valuetext`. */\nexport function StatGauge({ label, value = 100, max = 100, valueText, figure, hideLabel, className, style, ...props }: StatGaugeProps) {\n const ratio = clamp(value / (max || 1));\n const words = valueText ?? `${Math.round(ratio * 100)} %`;\n return (\n <div\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(ratio * 100)}\n aria-valuetext={words}\n className={cn(\"kzs-stat\", className)}\n style={{ \"--kzs-ratio\": ratio, ...style } as React.CSSProperties}\n {...props}\n >\n {!hideLabel && (\n <span className=\"kzs-stat-head\" aria-hidden>\n <span className=\"kzs-stat-label\">{label}</span>\n <span className=\"kzs-stat-value\">{figure ?? words}</span>\n </span>\n )}\n <span className=\"kzs-bar\" aria-hidden>\n <span className=\"kzs-bar-fill\" />\n </span>\n </div>\n );\n}\n","// Server-safe. A profile at a glance (story.css): a portrait, a name, one headline gauge, a few stats, a line — a creator,\n// a match, a plan, a team member. In a `Scene` of a `ScrollStage` the card arrives and its gauges fill, once.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\nimport { StatGauge } from \"./stat-gauge\";\n\nexport interface ProfileStat {\n /** What it measures (“Response rate”) — passed translated. */\n label: string;\n /** The value, between 0 and `max`. */\n value: number;\n /** The top of the range (default 100). */\n max?: number;\n /** The value in words (“92 %”, “4.8 / 5”); default: the percentage. */\n valueText?: string;\n}\n\nexport type ProfileCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The portrait: an image, an avatar, a mark. Decorative — the name carries the meaning. */\n visual: React.ReactNode;\n /** The name (the card's heading). */\n name: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h3\"\n */\n nameAs?: \"h2\" | \"h3\" | \"h4\" | \"p\";\n /** A small glyph before the name (decorative): a verified mark, an emblem. */\n icon?: React.ReactNode;\n /** The headline gauge's label (“Profile complete”, arcade “Power”); without it, no headline gauge. */\n statLabel?: string;\n /**\n * The headline gauge's value, 0–100.\n * @default 100\n */\n value?: number;\n /** The headline value in words; default: the percentage. */\n valueText?: string;\n /** What shows as the headline figure instead of `valueText`: a `NumberTicker` that climbs. Decorative. */\n figure?: React.ReactNode;\n /** More gauges under the headline one: two to four, each with its value in words. */\n stats?: readonly ProfileStat[];\n /** One line under the gauges: where they come from, what they do. */\n caption?: React.ReactNode;\n /** Under everything: actions (follow, message), chips. */\n children?: React.ReactNode;\n /**\n * The diameter of the portrait, in pixels.\n * @default 132 (arcade 196)\n */\n visualSize?: number;\n /**\n * `default`: a sober card. `arcade`: the fighter card — the brand's light, a ring and a breathing aura, a skewed gauge.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`): the accent and gradient become that brand's. */\n brand?: string;\n};\n\n/** A profile at a glance: portrait, name, a headline gauge, stats with their values in words, a line and actions. */\nexport function ProfileCard({\n visual,\n name,\n nameAs: Name = \"h3\",\n icon,\n statLabel,\n value = 100,\n valueText,\n figure,\n stats,\n caption,\n children,\n visualSize,\n variant,\n brand,\n className,\n style,\n ...props\n}: ProfileCardProps) {\n return (\n <article\n className={cn(\"kzs-profile\", storyVariantClass(variant), brandClass(brand), className)}\n style={visualSize ? ({ \"--kzs-disc\": `${visualSize}px`, ...style } as React.CSSProperties) : style}\n {...props}\n >\n <span className=\"kzs-texture\" aria-hidden />\n <div className=\"kzs-profile-disc\" aria-hidden>\n <span className=\"kzs-profile-ring\" />\n <span className=\"kzs-profile-aura kzs-loop\" />\n <span className=\"kzs-profile-flash\" />\n <span className=\"kzs-profile-visual\">{visual}</span>\n </div>\n <Name className=\"kzs-profile-name\">\n {icon && <span aria-hidden>{icon}</span>}\n {name}\n </Name>\n {statLabel && <StatGauge label={statLabel} value={value} valueText={valueText} figure={figure} />}\n {stats && stats.length > 0 && (\n <ul className=\"kzs-profile-stats\">\n {stats.map((s) => (\n <li key={s.label}>\n <StatGauge label={s.label} value={s.value} max={s.max} valueText={s.valueText} />\n </li>\n ))}\n </ul>\n )}\n {caption && <p className=\"kzs-profile-caption\">{caption}</p>}\n {children && <div className=\"kzs-profile-extra\">{children}</div>}\n </article>\n );\n}\n"],"mappings":";;;;;;;AAiDQ,SACE,KADF;AAnBR,IAAM,QAAQ,CAAC,MAAc,KAAK,IAAI,GAAG,KAAK,IAAI,GAAG,CAAC,CAAC;AAGhD,SAAS,UAAU,EAAE,OAAO,QAAQ,KAAK,MAAM,KAAK,WAAW,QAAQ,WAAW,WAAW,OAAO,GAAG,MAAM,GAAmB;AACrI,QAAM,QAAQ,MAAM,SAAS,OAAO,EAAE;AACtC,QAAM,QAAQ,aAAa,GAAG,KAAK,MAAM,QAAQ,GAAG,CAAC;AACrD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe,KAAK,MAAM,QAAQ,GAAG;AAAA,MACrC,kBAAgB;AAAA,MAChB,WAAW,GAAG,YAAY,SAAS;AAAA,MACnC,OAAO,EAAE,eAAe,OAAO,GAAG,MAAM;AAAA,MACvC,GAAG;AAAA,MAEH;AAAA,SAAC,aACA,qBAAC,UAAK,WAAU,iBAAgB,eAAW,MACzC;AAAA,8BAAC,UAAK,WAAU,kBAAkB,iBAAM;AAAA,UACxC,oBAAC,UAAK,WAAU,kBAAkB,oBAAU,OAAM;AAAA,WACpD;AAAA,QAEF,oBAAC,UAAK,WAAU,WAAU,eAAW,MACnC,8BAAC,UAAK,WAAU,gBAAe,GACjC;AAAA;AAAA;AAAA,EACF;AAEJ;;;AC6BM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QAED,WAAW,gBAAAA,KAAC,OAAE,WAAU,uBAAuB,mBAAQ;AAAA,QACvD,YAAY,gBAAAA,KAAC,SAAI,WAAU,qBAAqB,UAAS;AAAA;AAAA;AAAA,EAC5D;AAEJ;","names":["jsx","jsxs"]}
|
|
1
|
+
{"version":3,"sources":["../src/profile-card/banner.tsx","../src/profile-card/stat-gauge.tsx","../src/profile-card/profile-card.tsx"],"sourcesContent":["// Server-safe: no hook. The top of a page about one person or place — a client, a shop, a creator, a building\n// (extracted from Orochia's ProfileHero, #650, #515): a slim cover, the avatar overlapping its lower edge, then the\n// eyebrow, the name (the page's h1), its facts and the actions. No text ever sits on the cover: the words are under it,\n// so a photo never costs their contrast (a scrim fades the photo's foot into the page all the same).\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { brandClass } from \"../story-variant\";\n\nexport const profileBanner = tv({\n slots: {\n root: \"relative flex w-full min-w-0 flex-col\",\n // The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).\n cover:\n \"relative h-28 w-full overflow-hidden rounded-xl bg-accent-soft bg-linear-to-br from-accent/30 via-accent-soft to-surface-2 sm:h-44 \" +\n \"[&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n scrim: \"pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent\",\n body: \"relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2\",\n identity: \"flex min-w-0 items-end gap-4\",\n // The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.\n avatar:\n \"relative -mt-10 h-20 w-20 shrink-0 overflow-hidden rounded-2xl bg-surface-3 ring-4 ring-surface-0 sm:-mt-14 sm:h-28 sm:w-28 \" +\n \"[&>*]:h-full! [&>*]:w-full! [&_img]:h-full [&_img]:w-full [&_img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-1 pb-1\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex min-w-0 flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl\",\n meta: \"flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary\",\n actions: \"flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1\",\n },\n});\nconst s = profileBanner();\n\nexport type ProfileBannerProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The cover: an `<img alt=\"\">` (decorative) or your framework's image. Absent: a tint of the brand's accent. */\n banner?: React.ReactNode;\n /** The avatar overlapping the cover: `Avatar` with the family's default (`defaultAvatar: { brand, seed }`, #598) when there is no photo. */\n avatar: React.ReactNode;\n /** A mono line above the name: what it is (« Client », « Shop »), an id. */\n eyebrow?: React.ReactNode;\n /** The name: the page's heading. */\n title: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h1\"\n */\n titleAs?: \"h1\" | \"h2\";\n /** Beside the name: a status (`Badge`), a verified mark. */\n status?: React.ReactNode;\n /** Under the name: its facts (a handle, a city, « client since 2024 »). */\n meta?: React.ReactNode;\n /** The actions (message, book, edit): at the right from `sm`, under the name on a phone. */\n actions?: React.ReactNode;\n /** A brand scope (`akinaza` → `.brand-akinaza`): the default cover takes that brand's accent. */\n brand?: string;\n};\n\n/** A person's or a place's banner: cover, overlapping avatar, eyebrow, name (h1), facts and actions — the words never on the cover. */\nexport function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = \"h1\", status, meta, actions, brand, className, ...props }: ProfileBannerProps) {\n return (\n <section className={s.root({ className: cn(brandClass(brand), className) })} {...props}>\n <div data-cover=\"\" className={s.cover()}>\n {banner}\n {banner ? <span aria-hidden className={s.scrim()} /> : null}\n </div>\n <div className={s.body()}>\n <div className={s.identity()}>\n <div data-avatar=\"\" className={s.avatar()}>\n {avatar}\n </div>\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <Title className={s.title()}>{title}</Title>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n </section>\n );\n}\n","// Server-safe. One measured strength: a label, its figure, a bar (story.css) — the gauge of a ProfileCard, also usable\n// alone (in a ChoiceGrid tile, a list). A `meter` with its value in words.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\n\nexport type StatGaugeProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> & {\n /** What it measures (“Profile complete”, “Creator share”) — passed translated; the meter's accessible name. */\n label: string;\n /**\n * The value, between 0 and `max`.\n * @default 100\n */\n value?: number;\n /**\n * The top of the range.\n * @default 100\n */\n max?: number;\n /** The value in words (“12 of 15”); default: the percentage. Read by assistive technology, shown without `figure`. */\n valueText?: string;\n /** What shows as the figure instead of `valueText`: a `NumberTicker` that climbs, a formatted amount. Decorative. */\n figure?: React.ReactNode;\n /**\n * Hides the label and the figure (the bar alone, named for assistive technology).\n * @default false\n */\n hideLabel?: boolean;\n};\n\nconst clamp = (n: number) => Math.min(1, Math.max(0, n));\n\n/** A measured strength: label, figure and bar; `role=\"meter\"` with `aria-valuetext`. */\nexport function StatGauge({ label, value = 100, max = 100, valueText, figure, hideLabel, className, style, ...props }: StatGaugeProps) {\n const ratio = clamp(value / (max || 1));\n const words = valueText ?? `${Math.round(ratio * 100)} %`;\n return (\n <div\n role=\"meter\"\n aria-label={label}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={Math.round(ratio * 100)}\n aria-valuetext={words}\n className={cn(\"kzs-stat\", className)}\n style={{ \"--kzs-ratio\": ratio, ...style } as React.CSSProperties}\n {...props}\n >\n {!hideLabel && (\n <span className=\"kzs-stat-head\" aria-hidden>\n <span className=\"kzs-stat-label\">{label}</span>\n <span className=\"kzs-stat-value\">{figure ?? words}</span>\n </span>\n )}\n <span className=\"kzs-bar\" aria-hidden>\n <span className=\"kzs-bar-fill\" />\n </span>\n </div>\n );\n}\n","// Server-safe. A profile at a glance (story.css): a portrait, a name, one headline gauge, a few stats, a line — a creator,\n// a match, a plan, a team member. In a `Scene` of a `ScrollStage` the card arrives and its gauges fill, once.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\nimport { StatGauge } from \"./stat-gauge\";\n\nexport interface ProfileStat {\n /** What it measures (“Response rate”) — passed translated. */\n label: string;\n /** The value, between 0 and `max`. */\n value: number;\n /** The top of the range (default 100). */\n max?: number;\n /** The value in words (“92 %”, “4.8 / 5”); default: the percentage. */\n valueText?: string;\n}\n\nexport type ProfileCardProps = Omit<React.HTMLAttributes<HTMLElement>, \"title\"> & {\n /** The portrait: an image, an avatar, a mark. Decorative — the name carries the meaning. */\n visual: React.ReactNode;\n /** The name (the card's heading). */\n name: React.ReactNode;\n /**\n * The level of the name.\n * @default \"h3\"\n */\n nameAs?: \"h2\" | \"h3\" | \"h4\" | \"p\";\n /** A small glyph before the name (decorative): a verified mark, an emblem. */\n icon?: React.ReactNode;\n /** The headline gauge's label (“Profile complete”, arcade “Power”); without it, no headline gauge. */\n statLabel?: string;\n /**\n * The headline gauge's value, 0–100.\n * @default 100\n */\n value?: number;\n /** The headline value in words; default: the percentage. */\n valueText?: string;\n /** What shows as the headline figure instead of `valueText`: a `NumberTicker` that climbs. Decorative. */\n figure?: React.ReactNode;\n /** More gauges under the headline one: two to four, each with its value in words. */\n stats?: readonly ProfileStat[];\n /** One line under the gauges: where they come from, what they do. */\n caption?: React.ReactNode;\n /** Under everything: actions (follow, message), chips. */\n children?: React.ReactNode;\n /**\n * The diameter of the portrait, in pixels.\n * @default 132 (arcade 196)\n */\n visualSize?: number;\n /**\n * `default`: a sober card. `arcade`: the fighter card — the brand's light, a ring and a breathing aura, a skewed gauge.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orochia` → `.brand-orochia`): the accent and gradient become that brand's. */\n brand?: string;\n};\n\n/** A profile at a glance: portrait, name, a headline gauge, stats with their values in words, a line and actions. */\nexport function ProfileCard({\n visual,\n name,\n nameAs: Name = \"h3\",\n icon,\n statLabel,\n value = 100,\n valueText,\n figure,\n stats,\n caption,\n children,\n visualSize,\n variant,\n brand,\n className,\n style,\n ...props\n}: ProfileCardProps) {\n return (\n <article\n className={cn(\"kzs-profile\", storyVariantClass(variant), brandClass(brand), className)}\n style={visualSize ? ({ \"--kzs-disc\": `${visualSize}px`, ...style } as React.CSSProperties) : style}\n {...props}\n >\n <span className=\"kzs-texture\" aria-hidden />\n <div className=\"kzs-profile-disc\" aria-hidden>\n <span className=\"kzs-profile-ring\" />\n <span className=\"kzs-profile-aura kzs-loop\" />\n <span className=\"kzs-profile-flash\" />\n <span className=\"kzs-profile-visual\">{visual}</span>\n </div>\n <Name className=\"kzs-profile-name\">\n {icon && <span aria-hidden>{icon}</span>}\n {name}\n </Name>\n {statLabel && <StatGauge label={statLabel} value={value} valueText={valueText} figure={figure} />}\n {stats && stats.length > 0 && (\n <ul className=\"kzs-profile-stats\">\n {stats.map((s) => (\n <li key={s.label}>\n <StatGauge label={s.label} value={s.value} max={s.max} valueText={s.valueText} />\n </li>\n ))}\n </ul>\n )}\n {caption && <p className=\"kzs-profile-caption\">{caption}</p>}\n {children && <div className=\"kzs-profile-extra\">{children}</div>}\n </article>\n );\n}\n"],"mappings":";;;;;;;AAKA,SAAS,UAAU;AAyDb,SAEY,KAFZ;AApDC,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IAEN,OACE;AAAA,IAEF,OAAO;AAAA,IACP,MAAM;AAAA,IACN,UAAU;AAAA;AAAA,IAEV,QACE;AAAA,IAEF,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AACD,IAAM,IAAI,cAAc;AA2BjB,SAAS,c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W,MAC3C;AAAA,0BAAAD,KAAC,UAAK,WAAU,oBAAmB;AAAA,UACnC,gBAAAA,KAAC,UAAK,WAAU,6BAA4B;AAAA,UAC5C,gBAAAA,KAAC,UAAK,WAAU,qBAAoB;AAAA,UACpC,gBAAAA,KAAC,UAAK,WAAU,sBAAsB,kBAAO;AAAA,WAC/C;AAAA,QACA,gBAAAC,MAAC,QAAK,WAAU,oBACb;AAAA,kBAAQ,gBAAAD,KAAC,UAAK,eAAW,MAAE,gBAAK;AAAA,UAChC;AAAA,WACH;AAAA,QACC,aAAa,gBAAAA,KAAC,aAAU,OAAO,WAAW,OAAc,WAAsB,QAAgB;AAAA,QAC9F,SAAS,MAAM,SAAS,KACvB,gBAAAA,KAAC,QAAG,WAAU,qBACX,gBAAM,IAAI,CAACE,OACV,gBAAAF,KAAC,QACC,0BAAAA,KAAC,aAAU,OAAOE,GAAE,OAAO,OAAOA,GAAE,OAAO,KAAKA,GAAE,KAAK,WAAWA,GAAE,WAAW,KADxEA,GAAE,KAEX,CACD,GACH;AAAA,QAED,WAAW,gBAAAF,KAAC,OAAE,WAAU,uBAAuB,mBAAQ;AAAA,QACvD,YAAY,gBAAAA,KAAC,SAAI,WAAU,qBAAqB,UAAS;AAAA;AAAA;AAAA,EAC5D;AAEJ;","names":["jsx","jsxs","jsx","jsxs","s"]}
|
package/dist/promise-card.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ type PromiseCardProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & {
|
|
|
22
22
|
/** A brand scope (`orazaka` → `.brand-orazaka`). */
|
|
23
23
|
brand?: string;
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* A promise, the keys that call it and who carries it.
|
|
27
|
+
* @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
|
|
28
|
+
*/
|
|
26
29
|
declare function PromiseCard({ label, promise, keys, bearer, bearerLabel, bearerName, variant, brand, className, ...props }: PromiseCardProps): React.JSX.Element;
|
|
27
30
|
|
|
28
31
|
export { PromiseCard, type PromiseCardProps };
|
package/dist/promise-card.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
warnDeprecated
|
|
3
|
+
} from "./chunk-KGLRZMCY.js";
|
|
1
4
|
import {
|
|
2
5
|
brandClass,
|
|
3
6
|
cn,
|
|
@@ -7,6 +10,7 @@ import {
|
|
|
7
10
|
// src/promise-card/promise-card.tsx
|
|
8
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
12
|
function PromiseCard({ label, promise, keys, bearer, bearerLabel, bearerName, variant, brand, className, ...props }) {
|
|
13
|
+
warnDeprecated("promise-card");
|
|
10
14
|
return /* @__PURE__ */ jsxs("div", { className: cn("kzs-promise", storyVariantClass(variant), brandClass(brand), className), ...props, children: [
|
|
11
15
|
/* @__PURE__ */ jsx("span", { className: "kzs-promise-flash", "aria-hidden": true }),
|
|
12
16
|
/* @__PURE__ */ jsxs("div", { className: "kzs-promise-head", children: [
|
package/dist/promise-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/promise-card/promise-card.tsx"],"sourcesContent":["// Server-safe. A promise, the keys that call it, and who carries it (story.css): a product's guarantee, a shortcut and\n// what it does, a rule of the house — “Your data never leaves home”, called by ← ↙ ↓ ↘ → K, carried by the owl.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type PromiseCardProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** What kind of promise (“Our promise”, “Shortcut”, arcade “Special move”). */\n label: React.ReactNode;\n /** The promise itself, in a few words. */\n promise: React.ReactNode;\n /** The keys that call it, in order (`[\"⌘\", \"K\"]`); in a stage they light one by one before the promise lands. Decorative. */\n keys?: readonly string[];\n /** Who carries it: a bird of the flock (`Mascot`, 48 px), an avatar. Decorative. */\n bearer?: React.ReactNode;\n /** Above the bearer's name (“In the corner”, “Kept by”). */\n bearerLabel?: React.ReactNode;\n /** The bearer's name and role. */\n bearerName?: React.ReactNode;\n /**\n * `default`: a calm card with its keys as key-caps. `arcade`: the combo card — the keys pressed one by one, a flash.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orazaka` → `.brand-orazaka`). */\n brand?: string;\n};\n\n
|
|
1
|
+
{"version":3,"sources":["../src/promise-card/promise-card.tsx"],"sourcesContent":["// Server-safe. A promise, the keys that call it, and who carries it (story.css): a product's guarantee, a shortcut and\n// what it does, a rule of the house — “Your data never leaves home”, called by ← ↙ ↓ ↘ → K, carried by the owl.\nimport type * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { warnDeprecated } from \"../deprecated\";\nimport { brandClass, type StoryVariant, storyVariantClass } from \"../story-variant\";\n\nexport type PromiseCardProps = Omit<React.HTMLAttributes<HTMLDivElement>, \"title\"> & {\n /** What kind of promise (“Our promise”, “Shortcut”, arcade “Special move”). */\n label: React.ReactNode;\n /** The promise itself, in a few words. */\n promise: React.ReactNode;\n /** The keys that call it, in order (`[\"⌘\", \"K\"]`); in a stage they light one by one before the promise lands. Decorative. */\n keys?: readonly string[];\n /** Who carries it: a bird of the flock (`Mascot`, 48 px), an avatar. Decorative. */\n bearer?: React.ReactNode;\n /** Above the bearer's name (“In the corner”, “Kept by”). */\n bearerLabel?: React.ReactNode;\n /** The bearer's name and role. */\n bearerName?: React.ReactNode;\n /**\n * `default`: a calm card with its keys as key-caps. `arcade`: the combo card — the keys pressed one by one, a flash.\n * @default \"default\"\n */\n variant?: StoryVariant;\n /** A brand scope (`orazaka` → `.brand-orazaka`). */\n brand?: string;\n};\n\n/**\n * A promise, the keys that call it and who carries it.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function PromiseCard({ label, promise, keys, bearer, bearerLabel, bearerName, variant, brand, className, ...props }: PromiseCardProps) {\n warnDeprecated(\"promise-card\");\n return (\n <div className={cn(\"kzs-promise\", storyVariantClass(variant), brandClass(brand), className)} {...props}>\n <span className=\"kzs-promise-flash\" aria-hidden />\n <div className=\"kzs-promise-head\">\n <span className=\"kzs-promise-label\">{label}</span>\n {keys && keys.length > 0 && (\n <span className=\"kzs-promise-keys\" aria-hidden>\n {keys.map((k, i) => (\n <kbd key={i} className=\"kzs-key\" style={{ \"--k\": i } as React.CSSProperties}>\n {k}\n </kbd>\n ))}\n </span>\n )}\n </div>\n <p className=\"kzs-promise-text\">{promise}</p>\n {(bearer || bearerName) && (\n <div className=\"kzs-promise-bearer\">\n {bearer && (\n <span className=\"kzs-promise-bird\" aria-hidden>\n {bearer}\n </span>\n )}\n <span className=\"kzs-promise-who\">\n {bearerLabel && <span className=\"kzs-promise-bearer-label\">{bearerLabel}</span>}\n {bearerName && <span className=\"kzs-promise-name\">{bearerName}</span>}\n </span>\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAsCM,cACA,YADA;AAJC,SAAS,YAAY,EAAE,OAAO,SAAS,MAAM,QAAQ,aAAa,YAAY,SAAS,OAAO,WAAW,GAAG,MAAM,GAAqB;AAC5I,iBAAe,cAAc;AAC7B,SACE,qBAAC,SAAI,WAAW,GAAG,eAAe,kBAAkB,OAAO,GAAG,WAAW,KAAK,GAAG,SAAS,GAAI,GAAG,OAC/F;AAAA,wBAAC,UAAK,WAAU,qBAAoB,eAAW,MAAC;AAAA,IAChD,qBAAC,SAAI,WAAU,oBACb;AAAA,0BAAC,UAAK,WAAU,qBAAqB,iBAAM;AAAA,MAC1C,QAAQ,KAAK,SAAS,KACrB,oBAAC,UAAK,WAAU,oBAAmB,eAAW,MAC3C,eAAK,IAAI,CAAC,GAAG,MACZ,oBAAC,SAAY,WAAU,WAAU,OAAO,EAAE,OAAO,EAAE,GAChD,eADO,CAEV,CACD,GACH;AAAA,OAEJ;AAAA,IACA,oBAAC,OAAE,WAAU,oBAAoB,mBAAQ;AAAA,KACvC,UAAU,eACV,qBAAC,SAAI,WAAU,sBACZ;AAAA,gBACC,oBAAC,UAAK,WAAU,oBAAmB,eAAW,MAC3C,kBACH;AAAA,MAEF,qBAAC,UAAK,WAAU,mBACb;AAAA,uBAAe,oBAAC,UAAK,WAAU,4BAA4B,uBAAY;AAAA,QACvE,cAAc,oBAAC,UAAK,WAAU,oBAAoB,sBAAW;AAAA,SAChE;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare const quotaMeter: tailwind_variants.TVReturnType<{
|
|
5
|
+
level: {
|
|
6
|
+
ok: {
|
|
7
|
+
status: string;
|
|
8
|
+
};
|
|
9
|
+
warning: {
|
|
10
|
+
status: string;
|
|
11
|
+
};
|
|
12
|
+
critical: {
|
|
13
|
+
status: string;
|
|
14
|
+
};
|
|
15
|
+
full: {
|
|
16
|
+
status: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
}, {
|
|
20
|
+
root: string;
|
|
21
|
+
head: string;
|
|
22
|
+
title: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
plan: string;
|
|
25
|
+
used: string;
|
|
26
|
+
status: string;
|
|
27
|
+
details: string;
|
|
28
|
+
}, undefined, {
|
|
29
|
+
level: {
|
|
30
|
+
ok: {
|
|
31
|
+
status: string;
|
|
32
|
+
};
|
|
33
|
+
warning: {
|
|
34
|
+
status: string;
|
|
35
|
+
};
|
|
36
|
+
critical: {
|
|
37
|
+
status: string;
|
|
38
|
+
};
|
|
39
|
+
full: {
|
|
40
|
+
status: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
root: string;
|
|
45
|
+
head: string;
|
|
46
|
+
title: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
plan: string;
|
|
49
|
+
used: string;
|
|
50
|
+
status: string;
|
|
51
|
+
details: string;
|
|
52
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
53
|
+
level: {
|
|
54
|
+
ok: {
|
|
55
|
+
status: string;
|
|
56
|
+
};
|
|
57
|
+
warning: {
|
|
58
|
+
status: string;
|
|
59
|
+
};
|
|
60
|
+
critical: {
|
|
61
|
+
status: string;
|
|
62
|
+
};
|
|
63
|
+
full: {
|
|
64
|
+
status: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
root: string;
|
|
69
|
+
head: string;
|
|
70
|
+
title: string;
|
|
71
|
+
icon: string;
|
|
72
|
+
plan: string;
|
|
73
|
+
used: string;
|
|
74
|
+
status: string;
|
|
75
|
+
details: string;
|
|
76
|
+
}>>;
|
|
77
|
+
type QuotaLevel = "ok" | "warning" | "critical" | "full";
|
|
78
|
+
/** Where the meter turns amber and red, as shares of the limit. */
|
|
79
|
+
declare const QUOTA_THRESHOLDS: {
|
|
80
|
+
readonly low: 0.8;
|
|
81
|
+
readonly high: 0.95;
|
|
82
|
+
};
|
|
83
|
+
type QuotaMeterProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
84
|
+
/** What is measured (`Storage`), with an optional icon before it. */
|
|
85
|
+
title: React.ReactNode;
|
|
86
|
+
/** A glyph before the title (decorative). */
|
|
87
|
+
icon?: React.ReactNode;
|
|
88
|
+
/** The plan's name, on the right of the title. */
|
|
89
|
+
plan?: React.ReactNode;
|
|
90
|
+
/** Used so far, in the unit of `max`. */
|
|
91
|
+
value: number;
|
|
92
|
+
/** The limit; `null` for no limit (no meter is drawn). */
|
|
93
|
+
max: number | null;
|
|
94
|
+
/** « 3.2 GB of 10 GB », said once for the eye and once for the meter's value. */
|
|
95
|
+
usedText: string;
|
|
96
|
+
/** The meter's accessible name. */
|
|
97
|
+
meterLabel: string;
|
|
98
|
+
/** Where the level stands: tones the sentence and gives an alarming one a status role. */
|
|
99
|
+
level?: QuotaLevel;
|
|
100
|
+
/** The sentence for that level (« You are close to your limit »). */
|
|
101
|
+
statusText?: React.ReactNode;
|
|
102
|
+
/** More sentences that matter (« 2 uploads on hold », « uploads are paused »), each a status. */
|
|
103
|
+
notices?: readonly React.ReactNode[];
|
|
104
|
+
/** Small figures under the meter (minutes, today's uploads). Left out when the card is compact. */
|
|
105
|
+
details?: readonly React.ReactNode[];
|
|
106
|
+
/** The way out, shown under the figures (a link to manage). */
|
|
107
|
+
action?: React.ReactNode;
|
|
108
|
+
/** Leaves out the footer (the small figures and the action): the title, the used line, the meter, the sentence and the notices stay. */
|
|
109
|
+
compact?: boolean;
|
|
110
|
+
};
|
|
111
|
+
declare function QuotaMeter({ title, icon, plan, value, max, usedText, meterLabel, level, statusText, notices, details, action, compact, className, ...props }: QuotaMeterProps): React.JSX.Element;
|
|
112
|
+
|
|
113
|
+
export { QUOTA_THRESHOLDS, type QuotaLevel, QuotaMeter, type QuotaMeterProps, quotaMeter };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Meter
|
|
3
|
+
} from "./chunk-HEKDKM5Y.js";
|
|
4
|
+
|
|
5
|
+
// src/quota-meter/quota-meter.tsx
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { tv } from "tailwind-variants";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var quotaMeter = tv({
|
|
10
|
+
slots: {
|
|
11
|
+
root: "flex flex-col gap-2 rounded-2xl border border-border-default bg-surface-1 p-5",
|
|
12
|
+
head: "flex items-center justify-between gap-3",
|
|
13
|
+
title: "flex items-center gap-2 font-mono text-xs text-fg-secondary",
|
|
14
|
+
icon: "inline-flex shrink-0 [&>svg]:h-3.5 [&>svg]:w-3.5",
|
|
15
|
+
plan: "text-xs text-fg-secondary",
|
|
16
|
+
used: "font-mono text-lg font-black text-fg",
|
|
17
|
+
status: "flex items-start gap-1.5 text-xs leading-relaxed",
|
|
18
|
+
details: "flex flex-wrap items-center justify-between gap-2 text-xs text-fg-secondary"
|
|
19
|
+
},
|
|
20
|
+
variants: {
|
|
21
|
+
level: {
|
|
22
|
+
ok: { status: "text-fg-secondary" },
|
|
23
|
+
warning: { status: "text-fg-warning" },
|
|
24
|
+
critical: { status: "text-fg-danger" },
|
|
25
|
+
full: { status: "text-fg-danger" }
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: { level: "ok" }
|
|
29
|
+
});
|
|
30
|
+
var QUOTA_THRESHOLDS = { low: 0.8, high: 0.95 };
|
|
31
|
+
function QuotaMeter({ title, icon, plan, value, max, usedText, meterLabel, level = "ok", statusText, notices = [], details = [], action, compact = false, className, ...props }) {
|
|
32
|
+
const s = quotaMeter({ level });
|
|
33
|
+
const alarming = level !== "ok";
|
|
34
|
+
const titleId = React.useId();
|
|
35
|
+
return /* @__PURE__ */ jsxs("section", { "aria-labelledby": titleId, className: s.root({ className }), ...props, children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { className: s.head(), children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("h3", { id: titleId, className: s.title(), children: [
|
|
38
|
+
icon && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: s.icon(), children: icon }),
|
|
39
|
+
title
|
|
40
|
+
] }),
|
|
41
|
+
plan && /* @__PURE__ */ jsx("span", { className: s.plan(), children: plan })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsx("p", { className: s.used(), children: usedText }),
|
|
44
|
+
max !== null && /* @__PURE__ */ jsx(Meter, { size: "sm", value: Math.min(value, max), max, label: meterLabel, valueText: usedText, thresholds: QUOTA_THRESHOLDS }),
|
|
45
|
+
statusText && /* @__PURE__ */ jsx("p", { className: s.status(), role: alarming ? "status" : void 0, children: statusText }),
|
|
46
|
+
notices.map((n, i) => /* @__PURE__ */ jsx("p", { className: quotaMeter({ level: "critical" }).status(), role: "status", children: n }, i)),
|
|
47
|
+
!compact && (details.length > 0 || action) && /* @__PURE__ */ jsxs("div", { className: s.details(), children: [
|
|
48
|
+
details.map((d, i) => /* @__PURE__ */ jsx("span", { children: d }, i)),
|
|
49
|
+
action
|
|
50
|
+
] })
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
QUOTA_THRESHOLDS,
|
|
55
|
+
QuotaMeter,
|
|
56
|
+
quotaMeter
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=quota-meter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/quota-meter/quota-meter.tsx"],"sourcesContent":["// Server-safe. Space or time used against a plan: what is used in words, a Meter that turns amber then red, the sentence\n// that says what to do before the limit (and a status role once it matters), the small figures and the way out.\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Meter } from \"../meter\";\n\nexport const quotaMeter = tv({\n slots: {\n root: \"flex flex-col gap-2 rounded-2xl border border-border-default bg-surface-1 p-5\",\n head: \"flex items-center justify-between gap-3\",\n title: \"flex items-center gap-2 font-mono text-xs text-fg-secondary\",\n icon: \"inline-flex shrink-0 [&>svg]:h-3.5 [&>svg]:w-3.5\",\n plan: \"text-xs text-fg-secondary\",\n used: \"font-mono text-lg font-black text-fg\",\n status: \"flex items-start gap-1.5 text-xs leading-relaxed\",\n details: \"flex flex-wrap items-center justify-between gap-2 text-xs text-fg-secondary\",\n },\n variants: {\n level: {\n ok: { status: \"text-fg-secondary\" },\n warning: { status: \"text-fg-warning\" },\n critical: { status: \"text-fg-danger\" },\n full: { status: \"text-fg-danger\" },\n },\n },\n defaultVariants: { level: \"ok\" },\n});\n\nexport type QuotaLevel = \"ok\" | \"warning\" | \"critical\" | \"full\";\n\n/** Where the meter turns amber and red, as shares of the limit. */\nexport const QUOTA_THRESHOLDS = { low: 0.8, high: 0.95 } as const;\n\nexport type QuotaMeterProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** What is measured (`Storage`), with an optional icon before it. */\n title: React.ReactNode;\n /** A glyph before the title (decorative). */\n icon?: React.ReactNode;\n /** The plan's name, on the right of the title. */\n plan?: React.ReactNode;\n /** Used so far, in the unit of `max`. */\n value: number;\n /** The limit; `null` for no limit (no meter is drawn). */\n max: number | null;\n /** « 3.2 GB of 10 GB », said once for the eye and once for the meter's value. */\n usedText: string;\n /** The meter's accessible name. */\n meterLabel: string;\n /** Where the level stands: tones the sentence and gives an alarming one a status role. */\n level?: QuotaLevel;\n /** The sentence for that level (« You are close to your limit »). */\n statusText?: React.ReactNode;\n /** More sentences that matter (« 2 uploads on hold », « uploads are paused »), each a status. */\n notices?: readonly React.ReactNode[];\n /** Small figures under the meter (minutes, today's uploads). Left out when the card is compact. */\n details?: readonly React.ReactNode[];\n /** The way out, shown under the figures (a link to manage). */\n action?: React.ReactNode;\n /** Leaves out the footer (the small figures and the action): the title, the used line, the meter, the sentence and the notices stay. */\n compact?: boolean;\n};\n\nexport function QuotaMeter({ title, icon, plan, value, max, usedText, meterLabel, level = \"ok\", statusText, notices = [], details = [], action, compact = false, className, ...props }: QuotaMeterProps) {\n const s = quotaMeter({ level });\n const alarming = level !== \"ok\";\n const titleId = React.useId();\n return (\n <section aria-labelledby={titleId} className={s.root({ className })} {...props}>\n <div className={s.head()}>\n <h3 id={titleId} className={s.title()}>\n {icon && (\n <span aria-hidden className={s.icon()}>\n {icon}\n </span>\n )}\n {title}\n </h3>\n {plan && <span className={s.plan()}>{plan}</span>}\n </div>\n <p className={s.used()}>{usedText}</p>\n {max !== null && <Meter size=\"sm\" value={Math.min(value, max)} max={max} label={meterLabel} valueText={usedText} thresholds={QUOTA_THRESHOLDS} />}\n {statusText && (\n <p className={s.status()} role={alarming ? \"status\" : undefined}>\n {statusText}\n </p>\n )}\n {notices.map((n, i) => (\n <p key={i} className={quotaMeter({ level: \"critical\" }).status()} role=\"status\">\n {n}\n </p>\n ))}\n {!compact && (details.length > 0 || action) && (\n <div className={s.details()}>\n {details.map((d, i) => (\n <span key={i}>{d}</span>\n ))}\n {action}\n </div>\n )}\n </section>\n );\n}\n"],"mappings":";;;;;AAEA,YAA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