@krizaka/ui 3.54.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 +162 -27
- 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 +141 -29
- 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 +1 -1
- 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/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 +301 -87
- 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/detail-layout.d.ts
CHANGED
|
@@ -5,42 +5,45 @@ declare const detailLayout: tailwind_variants.TVReturnType<{
|
|
|
5
5
|
[key: string]: {
|
|
6
6
|
[key: string]: tailwind_variants.ClassValue | {
|
|
7
7
|
root?: tailwind_variants.ClassValue;
|
|
8
|
-
back?: tailwind_variants.ClassValue;
|
|
9
|
-
header?: tailwind_variants.ClassValue;
|
|
10
|
-
media?: tailwind_variants.ClassValue;
|
|
11
8
|
text?: tailwind_variants.ClassValue;
|
|
12
9
|
eyebrow?: tailwind_variants.ClassValue;
|
|
13
10
|
titleRow?: tailwind_variants.ClassValue;
|
|
14
11
|
title?: tailwind_variants.ClassValue;
|
|
15
12
|
meta?: tailwind_variants.ClassValue;
|
|
16
13
|
actions?: tailwind_variants.ClassValue;
|
|
17
|
-
columns?: tailwind_variants.ClassValue;
|
|
18
|
-
main?: tailwind_variants.ClassValue;
|
|
19
14
|
aside?: tailwind_variants.ClassValue;
|
|
15
|
+
header?: tailwind_variants.ClassValue;
|
|
16
|
+
main?: tailwind_variants.ClassValue;
|
|
17
|
+
banner?: tailwind_variants.ClassValue;
|
|
18
|
+
back?: tailwind_variants.ClassValue;
|
|
19
|
+
media?: tailwind_variants.ClassValue;
|
|
20
|
+
columns?: tailwind_variants.ClassValue;
|
|
20
21
|
};
|
|
21
22
|
};
|
|
22
23
|
} | {
|
|
23
24
|
[x: string]: {
|
|
24
25
|
[x: string]: tailwind_variants.ClassValue | {
|
|
25
26
|
root?: tailwind_variants.ClassValue;
|
|
26
|
-
back?: tailwind_variants.ClassValue;
|
|
27
|
-
header?: tailwind_variants.ClassValue;
|
|
28
|
-
media?: tailwind_variants.ClassValue;
|
|
29
27
|
text?: tailwind_variants.ClassValue;
|
|
30
28
|
eyebrow?: tailwind_variants.ClassValue;
|
|
31
29
|
titleRow?: tailwind_variants.ClassValue;
|
|
32
30
|
title?: tailwind_variants.ClassValue;
|
|
33
31
|
meta?: tailwind_variants.ClassValue;
|
|
34
32
|
actions?: tailwind_variants.ClassValue;
|
|
35
|
-
columns?: tailwind_variants.ClassValue;
|
|
36
|
-
main?: tailwind_variants.ClassValue;
|
|
37
33
|
aside?: tailwind_variants.ClassValue;
|
|
34
|
+
header?: tailwind_variants.ClassValue;
|
|
35
|
+
main?: tailwind_variants.ClassValue;
|
|
36
|
+
banner?: tailwind_variants.ClassValue;
|
|
37
|
+
back?: tailwind_variants.ClassValue;
|
|
38
|
+
media?: tailwind_variants.ClassValue;
|
|
39
|
+
columns?: tailwind_variants.ClassValue;
|
|
38
40
|
};
|
|
39
41
|
};
|
|
40
42
|
} | {}, {
|
|
41
43
|
root: string;
|
|
42
44
|
back: string;
|
|
43
45
|
header: string;
|
|
46
|
+
banner: string;
|
|
44
47
|
media: string;
|
|
45
48
|
text: string;
|
|
46
49
|
eyebrow: string;
|
|
@@ -55,24 +58,26 @@ declare const detailLayout: tailwind_variants.TVReturnType<{
|
|
|
55
58
|
[key: string]: {
|
|
56
59
|
[key: string]: tailwind_variants.ClassValue | {
|
|
57
60
|
root?: tailwind_variants.ClassValue;
|
|
58
|
-
back?: tailwind_variants.ClassValue;
|
|
59
|
-
header?: tailwind_variants.ClassValue;
|
|
60
|
-
media?: tailwind_variants.ClassValue;
|
|
61
61
|
text?: tailwind_variants.ClassValue;
|
|
62
62
|
eyebrow?: tailwind_variants.ClassValue;
|
|
63
63
|
titleRow?: tailwind_variants.ClassValue;
|
|
64
64
|
title?: tailwind_variants.ClassValue;
|
|
65
65
|
meta?: tailwind_variants.ClassValue;
|
|
66
66
|
actions?: tailwind_variants.ClassValue;
|
|
67
|
-
columns?: tailwind_variants.ClassValue;
|
|
68
|
-
main?: tailwind_variants.ClassValue;
|
|
69
67
|
aside?: tailwind_variants.ClassValue;
|
|
68
|
+
header?: tailwind_variants.ClassValue;
|
|
69
|
+
main?: tailwind_variants.ClassValue;
|
|
70
|
+
banner?: tailwind_variants.ClassValue;
|
|
71
|
+
back?: tailwind_variants.ClassValue;
|
|
72
|
+
media?: tailwind_variants.ClassValue;
|
|
73
|
+
columns?: tailwind_variants.ClassValue;
|
|
70
74
|
};
|
|
71
75
|
};
|
|
72
76
|
} | {}, {
|
|
73
77
|
root: string;
|
|
74
78
|
back: string;
|
|
75
79
|
header: string;
|
|
80
|
+
banner: string;
|
|
76
81
|
media: string;
|
|
77
82
|
text: string;
|
|
78
83
|
eyebrow: string;
|
|
@@ -87,6 +92,7 @@ declare const detailLayout: tailwind_variants.TVReturnType<{
|
|
|
87
92
|
root: string;
|
|
88
93
|
back: string;
|
|
89
94
|
header: string;
|
|
95
|
+
banner: string;
|
|
90
96
|
media: string;
|
|
91
97
|
text: string;
|
|
92
98
|
eyebrow: string;
|
|
@@ -101,8 +107,13 @@ declare const detailLayout: tailwind_variants.TVReturnType<{
|
|
|
101
107
|
type DetailLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
102
108
|
/** The way back to the list: your router's link (`<Link href="/videos">Videos</Link>`), drawn with its arrow. */
|
|
103
109
|
back?: React.ReactNode;
|
|
104
|
-
/** A thumbnail, a cover or an avatar beside the name. */
|
|
110
|
+
/** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */
|
|
105
111
|
media?: React.ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an
|
|
114
|
+
* `<img alt="">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.
|
|
115
|
+
*/
|
|
116
|
+
cover?: React.ReactNode;
|
|
106
117
|
/** A mono line above the name (the object's kind, its id). */
|
|
107
118
|
eyebrow?: React.ReactNode;
|
|
108
119
|
/** The object's name: the `h1`. */
|
|
@@ -121,6 +132,6 @@ type DetailLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
|
121
132
|
children: React.ReactNode;
|
|
122
133
|
};
|
|
123
134
|
/** 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;
|
|
135
|
+
declare function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }: DetailLayoutProps): React.JSX.Element;
|
|
125
136
|
|
|
126
137
|
export { DetailLayout, type DetailLayoutProps, detailLayout };
|
package/dist/detail-layout.js
CHANGED
|
@@ -1,11 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-S6NYGOJT.js";
|
|
4
|
+
|
|
1
5
|
// src/detail-layout/detail-layout.tsx
|
|
6
|
+
import { tv as tv2 } from "tailwind-variants";
|
|
7
|
+
|
|
8
|
+
// src/profile-card/banner.tsx
|
|
2
9
|
import { tv } from "tailwind-variants";
|
|
10
|
+
|
|
11
|
+
// src/story-variant.ts
|
|
12
|
+
var brandClass = (brand) => brand ? `brand-${brand}` : void 0;
|
|
13
|
+
|
|
14
|
+
// src/profile-card/banner.tsx
|
|
3
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
var
|
|
16
|
+
var profileBanner = tv({
|
|
17
|
+
slots: {
|
|
18
|
+
root: "relative flex w-full min-w-0 flex-col",
|
|
19
|
+
// The brand's accent, as a calm tint, when there is no picture; a picture fills it (`object-cover`).
|
|
20
|
+
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",
|
|
21
|
+
scrim: "pointer-events-none absolute inset-0 bg-linear-to-t from-surface-0/70 via-transparent to-transparent",
|
|
22
|
+
body: "relative flex min-w-0 flex-col gap-3 px-1 sm:flex-row sm:items-end sm:justify-between sm:px-2",
|
|
23
|
+
identity: "flex min-w-0 items-end gap-4",
|
|
24
|
+
// The avatar overlaps the cover's lower edge by the same share at every width; the ring is the page's colour.
|
|
25
|
+
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",
|
|
26
|
+
text: "flex min-w-0 flex-1 flex-col gap-1 pb-1",
|
|
27
|
+
eyebrow: "font-mono text-[11px] font-semibold text-fg-accent",
|
|
28
|
+
titleRow: "flex min-w-0 flex-wrap items-center gap-2",
|
|
29
|
+
title: "min-w-0 font-display text-xl font-extrabold tracking-tight break-words text-fg sm:text-3xl",
|
|
30
|
+
meta: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-fg-secondary",
|
|
31
|
+
actions: "flex shrink-0 flex-wrap items-center gap-2 sm:justify-end sm:pb-1"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
var s = profileBanner();
|
|
35
|
+
function ProfileBanner({ banner, avatar, eyebrow, title, titleAs: Title = "h1", status, meta, actions, brand, className, ...props }) {
|
|
36
|
+
return /* @__PURE__ */ jsxs("section", { className: s.root({ className: cn(brandClass(brand), className) }), ...props, children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { "data-cover": "", className: s.cover(), children: [
|
|
38
|
+
banner,
|
|
39
|
+
banner ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: s.scrim() }) : null
|
|
40
|
+
] }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: s.body(), children: [
|
|
42
|
+
/* @__PURE__ */ jsxs("div", { className: s.identity(), children: [
|
|
43
|
+
/* @__PURE__ */ jsx("div", { "data-avatar": "", className: s.avatar(), children: avatar }),
|
|
44
|
+
/* @__PURE__ */ jsxs("div", { className: s.text(), children: [
|
|
45
|
+
eyebrow && /* @__PURE__ */ jsx("p", { className: s.eyebrow(), children: eyebrow }),
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: s.titleRow(), children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Title, { className: s.title(), children: title }),
|
|
48
|
+
status
|
|
49
|
+
] }),
|
|
50
|
+
meta && /* @__PURE__ */ jsx("div", { className: s.meta(), children: meta })
|
|
51
|
+
] })
|
|
52
|
+
] }),
|
|
53
|
+
actions && /* @__PURE__ */ jsx("div", { className: s.actions(), children: actions })
|
|
54
|
+
] })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/detail-layout/detail-layout.tsx
|
|
59
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
60
|
+
var detailLayout = tv2({
|
|
5
61
|
slots: {
|
|
6
62
|
root: "flex w-full flex-col gap-6",
|
|
7
63
|
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
64
|
header: "flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start",
|
|
65
|
+
banner: "border-b border-border-subtle pb-5",
|
|
9
66
|
media: "shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover",
|
|
10
67
|
text: "flex min-w-0 flex-1 flex-col gap-2",
|
|
11
68
|
eyebrow: "font-mono text-[11px] font-semibold text-fg-accent",
|
|
@@ -18,26 +75,26 @@ var detailLayout = tv({
|
|
|
18
75
|
aside: "flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start"
|
|
19
76
|
}
|
|
20
77
|
});
|
|
21
|
-
var
|
|
22
|
-
function DetailLayout({ back, media, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }) {
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
back && /* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
media && /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
eyebrow && /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
78
|
+
var s2 = detailLayout();
|
|
79
|
+
function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsxs2("div", { className: s2.root({ className }), ...props, children: [
|
|
81
|
+
back && /* @__PURE__ */ jsx2("div", { className: s2.back(), children: back }),
|
|
82
|
+
cover ? /* @__PURE__ */ jsx2(ProfileBanner, { className: s2.banner(), banner: cover === true ? void 0 : cover, avatar: media, eyebrow, title, status, meta, actions }) : /* @__PURE__ */ jsxs2("div", { className: s2.header(), children: [
|
|
83
|
+
media && /* @__PURE__ */ jsx2("div", { className: s2.media(), children: media }),
|
|
84
|
+
/* @__PURE__ */ jsxs2("div", { className: s2.text(), children: [
|
|
85
|
+
eyebrow && /* @__PURE__ */ jsx2("p", { className: s2.eyebrow(), children: eyebrow }),
|
|
86
|
+
/* @__PURE__ */ jsxs2("div", { className: s2.titleRow(), children: [
|
|
87
|
+
/* @__PURE__ */ jsx2("h1", { className: s2.title(), children: title }),
|
|
31
88
|
status
|
|
32
89
|
] }),
|
|
33
|
-
meta && /* @__PURE__ */
|
|
90
|
+
meta && /* @__PURE__ */ jsx2("div", { className: s2.meta(), children: meta })
|
|
34
91
|
] }),
|
|
35
|
-
actions && /* @__PURE__ */
|
|
92
|
+
actions && /* @__PURE__ */ jsx2("div", { className: s2.actions(), children: actions })
|
|
36
93
|
] }),
|
|
37
94
|
tabs,
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
aside && /* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ jsxs2("div", { className: aside ? s2.columns() : void 0, children: [
|
|
96
|
+
/* @__PURE__ */ jsx2("div", { className: s2.main(), children }),
|
|
97
|
+
aside && /* @__PURE__ */ jsx2("aside", { className: s2.aside(), children: aside })
|
|
41
98
|
] })
|
|
42
99
|
] });
|
|
43
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/detail-layout/detail-layout.tsx"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n 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\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\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\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name. */\n media?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }: DetailLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n {tabs}\n <div className={aside ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {aside && <aside className={s.aside()}>{aside}</aside>}\n </div>\n </div>\n );\n}\n"],"mappings":";AAIA,SAAS,UAAU;AAgDJ,cAKL,YALK;AA9CR,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,UAAU;AAAA,IACV,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,EACT;AACF,CAAC;AACD,IAAM,IAAI,aAAa;AA0BhB,SAAS,aAAa,EAAE,MAAM,OAAO,SAAS,OAAO,QAAQ,MAAM,SAAS,MAAM,OAAO,WAAW,UAAU,GAAG,MAAM,GAAsB;AAClJ,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACxC;AAAA,YAAQ,oBAAC,SAAI,WAAW,EAAE,KAAK,GAAI,gBAAK;AAAA,IACzC,qBAAC,SAAI,WAAW,EAAE,OAAO,GACtB;AAAA,eAAS,oBAAC,SAAI,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MAC5C,qBAAC,SAAI,WAAW,EAAE,KAAK,GACpB;AAAA,mBAAW,oBAAC,OAAE,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,QAChD,qBAAC,SAAI,WAAW,EAAE,SAAS,GACzB;AAAA,8BAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,UAChC;AAAA,WACH;AAAA,QACC,QAAQ,oBAAC,SAAI,WAAW,EAAE,KAAK,GAAI,gBAAK;AAAA,SAC3C;AAAA,MACC,WAAW,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,mBAAQ;AAAA,OACpD;AAAA,IACC;AAAA,IACD,qBAAC,SAAI,WAAW,QAAQ,EAAE,QAAQ,IAAI,QACpC;AAAA,0BAAC,SAAI,WAAW,EAAE,KAAK,GAAI,UAAS;AAAA,MACnC,SAAS,oBAAC,WAAM,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,OAChD;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/detail-layout/detail-layout.tsx","../src/profile-card/banner.tsx","../src/story-variant.ts"],"sourcesContent":["// Server-safe. The page of one object, read from the products' detail screens (a video, a job, an account, a pack):\n// its header — the way back, a media or an avatar, the name, its facts and status, the actions — then its tabs, the\n// content, and a side panel (details, related, activity) that goes under the content on a phone.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { ProfileBanner } from \"../profile-card/banner\";\n\nexport const detailLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n 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\",\n header: \"flex flex-col gap-4 border-b border-border-subtle pb-5 sm:flex-row sm:items-start\",\n banner: \"border-b border-border-subtle pb-5\",\n media: \"shrink-0 overflow-hidden rounded-xl [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\",\n text: \"flex min-w-0 flex-1 flex-col gap-2\",\n eyebrow: \"font-mono text-[11px] font-semibold text-fg-accent\",\n titleRow: \"flex flex-wrap items-center gap-2\",\n title: \"min-w-0 font-display text-2xl font-extrabold tracking-tight text-fg break-words\",\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\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,1fr)_20rem] lg:gap-8\",\n main: \"flex min-w-0 flex-col gap-5\",\n aside: \"flex min-w-0 flex-col gap-4 lg:sticky lg:top-20 lg:self-start\",\n },\n});\nconst s = detailLayout();\n\nexport type DetailLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The way back to the list: your router's link (`<Link href=\"/videos\">Videos</Link>`), drawn with its arrow. */\n back?: React.ReactNode;\n /** A thumbnail, a cover or an avatar beside the name; with `cover`, the avatar overlapping the cover. */\n media?: React.ReactNode;\n /**\n * A person's or a place's page (a client, a shop, a creator): the header becomes a `ProfileBanner` — this cover (an\n * `<img alt=\"\">`, or `true` for a tint of the brand's accent), `media` as the avatar overlapping it, then the name and the actions.\n */\n cover?: React.ReactNode;\n /** A mono line above the name (the object's kind, its id). */\n eyebrow?: React.ReactNode;\n /** The object's name: the `h1`. */\n title: React.ReactNode;\n /** Beside the name: its status (a Badge). */\n status?: React.ReactNode;\n /** Under the name: its facts (the author, a date, a count — `Facts` or plain text). */\n meta?: React.ReactNode;\n /** The object's actions (edit, publish, a DropdownMenu). */\n actions?: React.ReactNode;\n /** Under the header: the object's tabs (`Tabs.List` of @krizaka/ui/tabs, inside your `Tabs.Root` around the layout). */\n tabs?: React.ReactNode;\n /** The side panel: details, related objects, activity (under the content on a phone). */\n aside?: React.ReactNode;\n /** The content (the current tab). */\n children: React.ReactNode;\n};\n\n/** One object's page: header (back, media, name, status, facts, actions), tabs, content and a side panel. */\nexport function DetailLayout({ back, media, cover, eyebrow, title, status, meta, actions, tabs, aside, className, children, ...props }: DetailLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n {back && <div className={s.back()}>{back}</div>}\n {cover ? (\n <ProfileBanner className={s.banner()} banner={cover === true ? undefined : cover} avatar={media} eyebrow={eyebrow} title={title} status={status} meta={meta} actions={actions} />\n ) : (\n <div className={s.header()}>\n {media && <div className={s.media()}>{media}</div>}\n <div className={s.text()}>\n {eyebrow && <p className={s.eyebrow()}>{eyebrow}</p>}\n <div className={s.titleRow()}>\n <h1 className={s.title()}>{title}</h1>\n {status}\n </div>\n {meta && <div className={s.meta()}>{meta}</div>}\n </div>\n {actions && <div className={s.actions()}>{actions}</div>}\n </div>\n )}\n {tabs}\n <div className={aside ? s.columns() : undefined}>\n <div className={s.main()}>{children}</div>\n {aside && <aside className={s.aside()}>{aside}</aside>}\n </div>\n </div>\n );\n}\n","// 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","// The two looks of the storytelling kit (story.css), shared by its entries. Server-safe.\n\n/** The look of the storytelling kit: `default` (sober, for any app) or `arcade` (the opt-in cabinet flavour). */\nexport type StoryVariant = \"default\" | \"arcade\";\n\n/** The class a storytelling component adds for its look (`kzs-arcade` for the arcade flavour). */\nexport const storyVariantClass = (variant: StoryVariant | undefined) => (variant === \"arcade\" ? \"kzs-arcade\" : undefined);\n\n/** The class of a brand scope (`brand-orochia`): the accent and the gradient become that brand's. */\nexport const brandClass = (brand: string | undefined) => (brand ? `brand-${brand}` : undefined);\n"],"mappings":";;;;;A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GACzB;AAAA,0BAAAH,KAAC,QAAG,WAAWG,GAAE,MAAM,GAAI,iBAAM;AAAA,UAChC;AAAA,WACH;AAAA,QACC,QAAQ,gBAAAH,KAAC,SAAI,WAAWG,GAAE,KAAK,GAAI,gBAAK;AAAA,SAC3C;AAAA,MACC,WAAW,gBAAAH,KAAC,SAAI,WAAWG,GAAE,QAAQ,GAAI,mBAAQ;AAAA,OACpD;AAAA,IAED;AAAA,IACD,gBAAAF,MAAC,SAAI,WAAW,QAAQE,GAAE,QAAQ,IAAI,QACpC;AAAA,sBAAAH,KAAC,SAAI,WAAWG,GAAE,KAAK,GAAI,UAAS;AAAA,MACnC,SAAS,gBAAAH,KAAC,WAAM,WAAWG,GAAE,MAAM,GAAI,iBAAM;AAAA,OAChD;AAAA,KACF;AAEJ;","names":["tv","jsx","jsxs","tv","s"]}
|
package/dist/doodle.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
type DoodleKind = "arrow" | "circle" | "star" | "wave" | "bird";
|
|
4
|
+
type DoodleProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
5
|
+
/** What is drawn: `arrow` (points at the block), `circle` (rings a `word`), `star`, `wave` (an underline) or `bird` (a tiny sketch). */
|
|
6
|
+
kind: DoodleKind;
|
|
7
|
+
/** The word a `circle` rings (« ça ! »). It is decoration too: nothing that matters is said only here. */
|
|
8
|
+
word?: string;
|
|
9
|
+
/** Which margin it sits in: `left` (where the notebook's margin is) or `right`. It points at the block from either. @default "left" */
|
|
10
|
+
side?: "left" | "right";
|
|
11
|
+
/** `margin` hangs it beside the nearest positioned ancestor, on a wide screen only; `inline` keeps it in the flow. @default "margin" */
|
|
12
|
+
place?: "margin" | "inline";
|
|
13
|
+
/** How far from the top of the block it sits, as a CSS length. @default "0px" */
|
|
14
|
+
top?: string;
|
|
15
|
+
/** Where its slight tilt comes from: the same string always leans the same way (±8°). @default "" */
|
|
16
|
+
seed?: string;
|
|
17
|
+
};
|
|
18
|
+
/** A margin doodle: an arrow, a circled word, a star, a wavy underline or a tiny bird, in the margin ink. Decoration. */
|
|
19
|
+
declare function Doodle({ kind, word, side, place, top, seed, className, style, ...props }: DoodleProps): React.JSX.Element;
|
|
20
|
+
|
|
21
|
+
export { Doodle, type DoodleKind, type DoodleProps };
|
package/dist/doodle.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
seedUnit
|
|
3
|
+
} from "./chunk-5VEVYDVC.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-W675RFOA.js";
|
|
7
|
+
|
|
8
|
+
// src/doodle/doodle.tsx
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var PATHS = {
|
|
11
|
+
arrow: { box: "0 0 56 36", d: ["M4 30 C 14 8, 32 6, 50 20", "M41 17 L50 20 L46 28"] },
|
|
12
|
+
circle: { box: "0 0 64 40", d: ["M9 22 C 6 8, 42 2, 54 14 C 62 26, 24 38, 11 29 C 4 23, 14 10, 34 8"] },
|
|
13
|
+
star: { box: "0 0 56 52", d: ["M28 4 L34 20 L52 21 L38 32 L43 48 L28 39 L13 48 L18 32 L4 21 L22 20 Z"] },
|
|
14
|
+
wave: { box: "0 0 56 16", d: ["M2 9 Q 8 1 14 9 T 26 9 T 38 9 T 50 9"] },
|
|
15
|
+
bird: { box: "0 0 56 44", d: ["M5 26 C 12 12, 28 12, 36 21 L 50 14 L 43 27 C 38 38, 18 39, 5 26 Z", "M20 38 L18 43 M27 38 L26 43", "M33 20 L33.5 20"] }
|
|
16
|
+
};
|
|
17
|
+
function Doodle({ kind, word, side = "left", place = "margin", top, seed = "", className, style, ...props }) {
|
|
18
|
+
const { box, d } = PATHS[kind];
|
|
19
|
+
return /* @__PURE__ */ jsxs(
|
|
20
|
+
"span",
|
|
21
|
+
{
|
|
22
|
+
className: cn("kz-doodle", className),
|
|
23
|
+
"data-kind": kind,
|
|
24
|
+
"data-side": side,
|
|
25
|
+
"data-place": place,
|
|
26
|
+
"aria-hidden": true,
|
|
27
|
+
style: { ...style, ["--kz-doodle-tilt"]: `${Math.round(seedUnit(`${kind}${seed}`) * 80) / 10}deg`, ...top ? { ["--kz-doodle-top"]: top } : {} },
|
|
28
|
+
...props,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ jsx("svg", { viewBox: box, focusable: "false", children: d.map((path) => /* @__PURE__ */ jsx("path", { d: path }, path)) }),
|
|
31
|
+
kind === "circle" && word ? /* @__PURE__ */ jsx("span", { className: "kz-doodle-word", children: word }) : null
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
Doodle
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=doodle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/doodle/doodle.tsx"],"sourcesContent":["// Server-safe. A margin doodle of the Cahier (ADR-004, blocks.css): an arrow, a circled word, a star, a wavy underline, a\n// tiny bird, drawn in the margin ink beside a block. Decoration only: hidden from assistive technology, never over\n// text, and gone below the width where the page's margin disappears (blocks.css: 1360 px).\nimport type * as React from \"react\";\n\nimport { seedUnit } from \"../cahier-seed\";\nimport { cn } from \"../cn\";\n\nexport type DoodleKind = \"arrow\" | \"circle\" | \"star\" | \"wave\" | \"bird\";\n\nexport type DoodleProps = Omit<React.HTMLAttributes<HTMLSpanElement>, \"children\"> & {\n /** What is drawn: `arrow` (points at the block), `circle` (rings a `word`), `star`, `wave` (an underline) or `bird` (a tiny sketch). */\n kind: DoodleKind;\n /** The word a `circle` rings (« ça ! »). It is decoration too: nothing that matters is said only here. */\n word?: string;\n /** Which margin it sits in: `left` (where the notebook's margin is) or `right`. It points at the block from either. @default \"left\" */\n side?: \"left\" | \"right\";\n /** `margin` hangs it beside the nearest positioned ancestor, on a wide screen only; `inline` keeps it in the flow. @default \"margin\" */\n place?: \"margin\" | \"inline\";\n /** How far from the top of the block it sits, as a CSS length. @default \"0px\" */\n top?: string;\n /** Where its slight tilt comes from: the same string always leans the same way (±8°). @default \"\" */\n seed?: string;\n};\n\nconst PATHS: Record<DoodleKind, { box: string; d: string[] }> = {\n arrow: { box: \"0 0 56 36\", d: [\"M4 30 C 14 8, 32 6, 50 20\", \"M41 17 L50 20 L46 28\"] },\n circle: { box: \"0 0 64 40\", d: [\"M9 22 C 6 8, 42 2, 54 14 C 62 26, 24 38, 11 29 C 4 23, 14 10, 34 8\"] },\n star: { box: \"0 0 56 52\", d: [\"M28 4 L34 20 L52 21 L38 32 L43 48 L28 39 L13 48 L18 32 L4 21 L22 20 Z\"] },\n wave: { box: \"0 0 56 16\", d: [\"M2 9 Q 8 1 14 9 T 26 9 T 38 9 T 50 9\"] },\n bird: { box: \"0 0 56 44\", d: [\"M5 26 C 12 12, 28 12, 36 21 L 50 14 L 43 27 C 38 38, 18 39, 5 26 Z\", \"M20 38 L18 43 M27 38 L26 43\", \"M33 20 L33.5 20\"] },\n};\n\n/** A margin doodle: an arrow, a circled word, a star, a wavy underline or a tiny bird, in the margin ink. Decoration. */\nexport function Doodle({ kind, word, side = \"left\", place = \"margin\", top, seed = \"\", className, style, ...props }: DoodleProps) {\n const { box, d } = PATHS[kind];\n return (\n <span\n className={cn(\"kz-doodle\", className)}\n data-kind={kind}\n data-side={side}\n data-place={place}\n aria-hidden\n style={{ ...style, [\"--kz-doodle-tilt\" as string]: `${Math.round(seedUnit(`${kind}${seed}`) * 80) / 10}deg`, ...(top ? { [\"--kz-doodle-top\" as string]: top } : {}) }}\n {...props}\n >\n <svg viewBox={box} focusable=\"false\">\n {d.map((path) => (\n <path key={path} d={path} />\n ))}\n </svg>\n {kind === \"circle\" && word ? <span className=\"kz-doodle-word\">{word}</span> : null}\n </span>\n );\n}\n"],"mappings":";;;;;;;;AAqCI,SAWM,KAXN;AAZJ,IAAM,QAA0D;AAAA,EAC9D,OAAO,EAAE,KAAK,aAAa,GAAG,CAAC,6BAA6B,sBAAsB,EAAE;AAAA,EACpF,QAAQ,EAAE,KAAK,aAAa,GAAG,CAAC,oEAAoE,EAAE;AAAA,EACtG,MAAM,EAAE,KAAK,aAAa,GAAG,CAAC,uEAAuE,EAAE;AAAA,EACvG,MAAM,EAAE,KAAK,aAAa,GAAG,CAAC,sCAAsC,EAAE;AAAA,EACtE,MAAM,EAAE,KAAK,aAAa,GAAG,CAAC,sEAAsE,+BAA+B,iBAAiB,EAAE;AACxJ;AAGO,SAAS,OAAO,EAAE,MAAM,MAAM,OAAO,QAAQ,QAAQ,UAAU,KAAK,OAAO,IAAI,WAAW,OAAO,GAAG,MAAM,GAAgB;AAC/H,QAAM,EAAE,KAAK,EAAE,IAAI,MAAM,IAAI;AAC7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,aAAa,SAAS;AAAA,MACpC,aAAW;AAAA,MACX,aAAW;AAAA,MACX,cAAY;AAAA,MACZ,eAAW;AAAA,MACX,OAAO,EAAE,GAAG,OAAO,CAAC,kBAA4B,GAAG,GAAG,KAAK,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,GAAI,MAAM,EAAE,CAAC,iBAA2B,GAAG,IAAI,IAAI,CAAC,EAAG;AAAA,MACnK,GAAG;AAAA,MAEJ;AAAA,4BAAC,SAAI,SAAS,KAAK,WAAU,SAC1B,YAAE,IAAI,CAAC,SACN,oBAAC,UAAgB,GAAG,QAAT,IAAe,CAC3B,GACH;AAAA,QACC,SAAS,YAAY,OAAO,oBAAC,UAAK,WAAU,kBAAkB,gBAAK,IAAU;AAAA;AAAA;AAAA,EAChF;AAEJ;","names":[]}
|
package/dist/drop-overlay.d.ts
CHANGED
|
@@ -18,14 +18,22 @@ type DropOverlayProps = Omit<React.ComponentProps<"div">, "children" | "onDrop">
|
|
|
18
18
|
label: string;
|
|
19
19
|
/** One line under it (“PDF or text”). */
|
|
20
20
|
hint?: string;
|
|
21
|
-
/** The files dropped: the accepted ones, then the ones `accept` refused. */
|
|
22
|
-
onFiles: (accepted: File[], rejected: File[]) => void;
|
|
23
21
|
/** What is accepted: MIME types, families (`image/*`) or extensions (`.pdf`). */
|
|
24
22
|
accept?: readonly AcceptRule[];
|
|
25
23
|
/** Turns the window back into a plain page (while a modal is open, signed out). */
|
|
26
24
|
disabled?: boolean;
|
|
27
|
-
}
|
|
25
|
+
} & ({
|
|
26
|
+
/** Controlled form (a desktop app's native drops, which arrive as paths): shown while true, the DOM listeners are off. */
|
|
27
|
+
active: boolean;
|
|
28
|
+
/** Not called in the controlled form. */
|
|
29
|
+
onFiles?: (accepted: File[], rejected: File[]) => void;
|
|
30
|
+
} | {
|
|
31
|
+
/** Leave undefined to handle DOM drops. */
|
|
32
|
+
active?: undefined;
|
|
33
|
+
/** The files dropped: the accepted ones, then the ones `accept` refused. */
|
|
34
|
+
onFiles: (accepted: File[], rejected: File[]) => void;
|
|
35
|
+
});
|
|
28
36
|
/** Drag a file anywhere on the page: a full-window overlay accepts it. */
|
|
29
|
-
declare function DropOverlay({ label, hint, onFiles, accept, disabled, className, ...props }: DropOverlayProps): React.JSX.Element | null;
|
|
37
|
+
declare function DropOverlay({ label, hint, onFiles, accept, disabled, active: controlled, className, ...props }: DropOverlayProps): React.JSX.Element | null;
|
|
30
38
|
|
|
31
39
|
export { type AcceptRule, DropOverlay, type DropOverlayProps, type DropSplit, dragHasFiles, splitDropped };
|
package/dist/drop-overlay.js
CHANGED
|
@@ -25,15 +25,25 @@ function splitDropped(files, accept) {
|
|
|
25
25
|
|
|
26
26
|
// src/drop-overlay/drop-overlay.tsx
|
|
27
27
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
|
-
function DropOverlay({
|
|
29
|
-
|
|
28
|
+
function DropOverlay({
|
|
29
|
+
label,
|
|
30
|
+
hint,
|
|
31
|
+
onFiles,
|
|
32
|
+
accept,
|
|
33
|
+
disabled,
|
|
34
|
+
active: controlled,
|
|
35
|
+
className,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
const isControlled = controlled !== void 0;
|
|
39
|
+
const [dragging, setActive] = React.useState(false);
|
|
30
40
|
const depth = React.useRef(0);
|
|
31
41
|
const latest = React.useRef({ onFiles, accept });
|
|
32
42
|
React.useEffect(() => {
|
|
33
43
|
latest.current = { onFiles, accept };
|
|
34
44
|
});
|
|
35
45
|
React.useEffect(() => {
|
|
36
|
-
if (disabled) return;
|
|
46
|
+
if (disabled || isControlled) return;
|
|
37
47
|
const reset = () => {
|
|
38
48
|
depth.current = 0;
|
|
39
49
|
setActive(false);
|
|
@@ -58,7 +68,7 @@ function DropOverlay({ label, hint, onFiles, accept, disabled, className, ...pro
|
|
|
58
68
|
const files = Array.from(event.dataTransfer?.files ?? []);
|
|
59
69
|
reset();
|
|
60
70
|
const { accepted, rejected } = splitDropped(files, latest.current.accept);
|
|
61
|
-
latest.current.onFiles(accepted, rejected);
|
|
71
|
+
latest.current.onFiles?.(accepted, rejected);
|
|
62
72
|
};
|
|
63
73
|
window.addEventListener("dragenter", enter);
|
|
64
74
|
window.addEventListener("dragover", over);
|
|
@@ -71,8 +81,8 @@ function DropOverlay({ label, hint, onFiles, accept, disabled, className, ...pro
|
|
|
71
81
|
window.removeEventListener("drop", drop);
|
|
72
82
|
reset();
|
|
73
83
|
};
|
|
74
|
-
}, [disabled]);
|
|
75
|
-
if (!
|
|
84
|
+
}, [disabled, isControlled]);
|
|
85
|
+
if (!(isControlled ? controlled && !disabled : dragging)) return null;
|
|
76
86
|
return /* @__PURE__ */ jsx("div", { role: "status", "data-state": "open", className: cn("kz-drop-overlay", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "kz-drop-overlay-card", children: [
|
|
77
87
|
/* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-fg", children: label }),
|
|
78
88
|
hint ? /* @__PURE__ */ jsx("span", { className: "text-sm text-fg-secondary", children: hint }) : null
|
package/dist/drop-overlay.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/drop-overlay/drop-overlay.tsx","../src/drop-overlay/files.ts"],"sourcesContent":["// Client (window listeners). The whole window is the drop target: while files are dragged over the page a full-window overlay\n// says so, and the dropped files go to `onFiles` (accepted, rejected). No dashed box in the page; the product keeps a real\n// file input behind its primary action for the keyboard and for phones. Motion: motion.css (« DROP OVERLAY »).\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type AcceptRule, dragHasFiles, splitDropped } from \"./files\";\n\nexport type DropOverlayProps = Omit<React.ComponentProps<\"div\">, \"children\" | \"onDrop\"> & {\n /** What the overlay says (“Drop to check”) — passed translated. */\n label: string;\n /** One line under it (“PDF or text”). */\n hint?: string;\n /**
|
|
1
|
+
{"version":3,"sources":["../src/drop-overlay/drop-overlay.tsx","../src/drop-overlay/files.ts"],"sourcesContent":["// Client (window listeners). The whole window is the drop target: while files are dragged over the page a full-window overlay\n// says so, and the dropped files go to `onFiles` (accepted, rejected). No dashed box in the page; the product keeps a real\n// file input behind its primary action for the keyboard and for phones. Motion: motion.css (« DROP OVERLAY »).\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { type AcceptRule, dragHasFiles, splitDropped } from \"./files\";\n\nexport type DropOverlayProps = Omit<React.ComponentProps<\"div\">, \"children\" | \"onDrop\"> & {\n /** What the overlay says (“Drop to check”) — passed translated. */\n label: string;\n /** One line under it (“PDF or text”). */\n hint?: string;\n /** What is accepted: MIME types, families (`image/*`) or extensions (`.pdf`). */\n accept?: readonly AcceptRule[];\n /** Turns the window back into a plain page (while a modal is open, signed out). */\n disabled?: boolean;\n} & (\n | {\n /** Controlled form (a desktop app's native drops, which arrive as paths): shown while true, the DOM listeners are off. */\n active: boolean;\n /** Not called in the controlled form. */\n onFiles?: (accepted: File[], rejected: File[]) => void;\n }\n | {\n /** Leave undefined to handle DOM drops. */\n active?: undefined;\n /** The files dropped: the accepted ones, then the ones `accept` refused. */\n onFiles: (accepted: File[], rejected: File[]) => void;\n }\n);\n\n/** Drag a file anywhere on the page: a full-window overlay accepts it. */\nexport function DropOverlay({\n label,\n hint,\n onFiles,\n accept,\n disabled,\n active: controlled,\n className,\n ...props\n}: DropOverlayProps) {\n const isControlled = controlled !== undefined;\n const [dragging, setActive] = React.useState(false);\n const depth = React.useRef(0);\n const latest = React.useRef({ onFiles, accept });\n React.useEffect(() => {\n latest.current = { onFiles, accept };\n });\n\n React.useEffect(() => {\n if (disabled || isControlled) return;\n const reset = () => {\n depth.current = 0;\n setActive(false);\n };\n const carrying = (event: Event) => dragHasFiles((event as DragEvent).dataTransfer);\n const enter = (event: Event) => {\n if (!carrying(event)) return;\n depth.current += 1;\n setActive(true);\n };\n const over = (event: Event) => {\n if (carrying(event)) event.preventDefault();\n };\n const leave = (event: Event) => {\n if (!carrying(event)) return;\n depth.current = Math.max(0, depth.current - 1);\n if (depth.current === 0) setActive(false);\n };\n const drop = (event: Event) => {\n if (!carrying(event)) return;\n event.preventDefault();\n const files = Array.from((event as DragEvent).dataTransfer?.files ?? []);\n reset();\n const { accepted, rejected } = splitDropped(files, latest.current.accept);\n latest.current.onFiles?.(accepted, rejected);\n };\n window.addEventListener(\"dragenter\", enter);\n window.addEventListener(\"dragover\", over);\n window.addEventListener(\"dragleave\", leave);\n window.addEventListener(\"drop\", drop);\n return () => {\n window.removeEventListener(\"dragenter\", enter);\n window.removeEventListener(\"dragover\", over);\n window.removeEventListener(\"dragleave\", leave);\n window.removeEventListener(\"drop\", drop);\n reset();\n };\n }, [disabled, isControlled]);\n\n if (!(isControlled ? controlled && !disabled : dragging)) return null;\n return (\n <div role=\"status\" data-state=\"open\" className={cn(\"kz-drop-overlay\", className)} {...props}>\n <div className=\"kz-drop-overlay-card\">\n <span className=\"text-lg font-semibold text-fg\">{label}</span>\n {hint ? <span className=\"text-sm text-fg-secondary\">{hint}</span> : null}\n </div>\n </div>\n );\n}\n","// Headless: what a drag carries and which of the dropped files a product accepts.\n\n/** True while the drag carries files (not text or a link): the only drag that should raise the overlay. */\nexport function dragHasFiles(transfer: { types?: readonly string[] | DOMStringList } | null | undefined): boolean {\n return Array.from(transfer?.types ?? []).includes(\"Files\");\n}\n\n/** One accepted kind: a MIME type (`application/pdf`), a family (`image/*`) or an extension (`.pdf`). */\nexport type AcceptRule = string;\n\nfunction matches(file: Pick<File, \"name\" | \"type\">, rule: AcceptRule): boolean {\n const wanted = rule.trim().toLowerCase();\n if (wanted.startsWith(\".\")) return file.name.toLowerCase().endsWith(wanted);\n if (wanted.endsWith(\"/*\")) return file.type.toLowerCase().startsWith(wanted.slice(0, -1));\n return file.type.toLowerCase() === wanted;\n}\n\nexport interface DropSplit<F> {\n accepted: F[];\n rejected: F[];\n}\n\n/** Splits dropped files by `accept` (no rule: everything is accepted). */\nexport function splitDropped<F extends Pick<File, \"name\" | \"type\">>(files: readonly F[], accept?: readonly AcceptRule[]): DropSplit<F> {\n if (!accept || accept.length === 0) return { accepted: [...files], rejected: [] };\n const accepted: F[] = [];\n const rejected: F[] = [];\n for (const file of files) (accept.some((rule) => matches(file, rule)) ? accepted : rejected).push(file);\n return { accepted, rejected };\n}\n"],"mappings":";;;;;AAGA,YAAY,WAAW;;;ACAhB,SAAS,aAAa,UAAqF;AAChH,SAAO,MAAM,KAAK,UAAU,SAAS,CAAC,CAAC,EAAE,SAAS,OAAO;AAC3D;AAKA,SAAS,QAAQ,MAAmC,MAA2B;AAC7E,QAAM,SAAS,KAAK,KAAK,EAAE,YAAY;AACvC,MAAI,OAAO,WAAW,GAAG,EAAG,QAAO,KAAK,KAAK,YAAY,EAAE,SAAS,MAAM;AAC1E,MAAI,OAAO,SAAS,IAAI,EAAG,QAAO,KAAK,KAAK,YAAY,EAAE,WAAW,OAAO,MAAM,GAAG,EAAE,CAAC;AACxF,SAAO,KAAK,KAAK,YAAY,MAAM;AACrC;AAQO,SAAS,aAAoD,OAAqB,QAA8C;AACrI,MAAI,CAAC,UAAU,OAAO,WAAW,EA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iB;AAC7B,UAAI,CAAC,SAAS,KAAK,EAAG;AACtB,YAAM,eAAe;AACrB,YAAM,QAAQ,MAAM,KAAM,MAAoB,cAAc,SAAS,CAAC,CAAC;AACvE,YAAM;AACN,YAAM,EAAE,UAAU,SAAS,IAAI,aAAa,OAAO,OAAO,QAAQ,MAAM;AACxE,aAAO,QAAQ,UAAU,UAAU,QAAQ;AAAA,IAC7C;AACA,WAAO,iBAAiB,aAAa,KAAK;AAC1C,WAAO,iBAAiB,YAAY,IAAI;AACxC,WAAO,iBAAiB,aAAa,KAAK;AAC1C,WAAO,iBAAiB,QAAQ,IAAI;AACpC,WAAO,MAAM;AACX,aAAO,oBAAoB,aAAa,KAAK;AAC7C,aAAO,oBAAoB,YAAY,IAAI;AAC3C,aAAO,oBAAoB,aAAa,KAAK;AAC7C,aAAO,oBAAoB,QAAQ,IAAI;AACvC,YAAM;AAAA,IACR;AAAA,EACF,GAAG,CAAC,UAAU,YAAY,CAAC;AAE3B,MAAI,EAAE,eAAe,cAAc,CAAC,WAAW,UAAW,QAAO;AACjE,SACE,oBAAC,SAAI,MAAK,UAAS,cAAW,QAAO,WAAW,GAAG,mBAAmB,SAAS,GAAI,GAAG,OACpF,+BAAC,SAAI,WAAU,wBACb;AAAA,wBAAC,UAAK,WAAU,iCAAiC,iBAAM;AAAA,IACtD,OAAO,oBAAC,UAAK,WAAU,6BAA6B,gBAAK,IAAU;AAAA,KACtE,GACF;AAEJ;","names":[]}
|
package/dist/elephant.d.ts
CHANGED
|
@@ -15,9 +15,11 @@ interface ElephantProps extends Omit<SVGProps<SVGSVGElement>, "width" | "height"
|
|
|
15
15
|
* The elephant: a small, playful mark from the neighbour joke — « the elephant with those ears can fly ». Not a product
|
|
16
16
|
* logo: a quiet figure for the hero of a page or the closing of a chat. Sage body, sand ear, flat colours that read on
|
|
17
17
|
* both themes; decorative by default.
|
|
18
|
+
* @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
|
|
18
19
|
*/
|
|
19
20
|
declare function Elephant({ pose, size, animated, title, className, ...rest }: ElephantProps): React.JSX.Element;
|
|
20
21
|
|
|
22
|
+
/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
|
|
21
23
|
declare const ELEPHANT: {
|
|
22
24
|
readonly viewBox: "0 0 200 200";
|
|
23
25
|
readonly stroke: 8;
|
package/dist/elephant.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import {
|
|
3
|
+
warnDeprecated
|
|
4
|
+
} from "./chunk-BDIU5LZB.js";
|
|
2
5
|
|
|
3
6
|
// src/elephant/geometry.ts
|
|
4
7
|
import { marks } from "@krizaka/tokens/native";
|
|
@@ -41,6 +44,7 @@ var CSS = `
|
|
|
41
44
|
`;
|
|
42
45
|
var line = { strokeWidth: ELEPHANT.stroke, strokeLinecap: "square", strokeLinejoin: "miter", fill: "none" };
|
|
43
46
|
function Elephant({ pose = "standing", size = 64, animated = true, title, className, ...rest }) {
|
|
47
|
+
warnDeprecated("elephant");
|
|
44
48
|
const flying = pose === "flying";
|
|
45
49
|
const p = flying ? ELEPHANT.flying : ELEPHANT.standing;
|
|
46
50
|
const a11y = title ? { role: "img", "aria-label": title } : { "aria-hidden": true };
|
package/dist/elephant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/elephant/geometry.ts","../src/elephant/elephant.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The elephant's geometry (200 × 200 view box, a pen line of 8, square caps, mitred joins — the Cahier grammar of the\n * marks and of @krizaka/icons: straight runs and 45° cuts, no rounded outline). It faces right. Two poses of one\n * animal: `standing`, the ear folded down beside the head, and `flying`, the ear spread up like a wing (the darija\n * joke: « l'éléphant avec ses oreilles, il peut voler »), the legs tucked, three lines of wind behind.\n *\n * The body and the trunk are sage, the ear and the wing sand: the two stops of Yororis' mark gradient (`marks.yororis`\n * of @krizaka/tokens), each ≥ 3:1 on the page surfaces of both themes. Flat colours: no glow, no gradient.\n */\nexport const SAND = marks.yororis[0]![1];\nexport const SAGE = marks.yororis[marks.yororis.length - 1]![1];\n\nexport const ELEPHANT = {\n viewBox: \"0 0 200 200\",\n stroke: 8,\n sand: SAND,\n sage: SAGE,\n /** The eye: one node, a filled dot. */\n eye: { cx: 154, cy: 66, r: 5 },\n standing: {\n /** Body, head and the two legs, one closed outline: straight runs and 45° cuts. */\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V168 H108 V138 H62 V168 H38 V138 H30 Z\",\n /** The trunk: down from the head's front, curling up at its tip. */\n trunk: \"M164 108 V146 L172 158 H184 V144\",\n /** The ear, folded down over the shoulder. */\n ear: \"M116 52 L92 56 L84 100 L104 124 L128 112 Z\",\n tail: \"M30 90 L20 108 V118\",\n },\n flying: {\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V140 H108 V128 H62 V140 H38 V128 H30 Z\",\n trunk: \"M164 108 V142 L172 154 H184 V140\",\n /** The ear, spread up and back: the wing. */\n ear: \"M116 78 L120 30 L90 10 L78 34 L52 24 L56 52 L30 60 L66 84 Z\",\n tail: \"M30 90 L18 102 V112\",\n wind: \"M22 150 H50 M12 166 H44 M32 180 H58\",\n },\n /** The flap: a few degrees around the shoulder, 1.6 s. */\n motion: { flap: 1.6, origin: \"114px 80px\", angle: 7 },\n} as const;\n","import type { SVGProps } from \"react\";\n\nimport { ELEPHANT as G } from \"./geometry\";\n\nexport interface ElephantProps extends Omit<SVGProps<SVGSVGElement>, \"width\" | \"height\" | \"title\"> {\n /** `standing` with the ear folded down, or `flying` with the ear spread like a wing. */\n pose?: \"standing\" | \"flying\";\n /** Width and height in pixels. */\n size?: number;\n /** The wing flaps gently (a flying elephant only). Off with `false`; always off under prefers-reduced-motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n}\n\nconst CSS = `\n.kz-elephant-flap { transform-box: view-box; transform-origin: ${G.motion.origin}; animation: kz-elephant-flap ${G.motion.flap}s ease-in-out infinite; }\n@keyframes kz-elephant-flap { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-${G.motion.angle}deg); } }\n@media (prefers-reduced-motion: reduce) { .kz-elephant-flap { animation: none; } }\n`;\n\nconst line = { strokeWidth: G.stroke, strokeLinecap: \"square\", strokeLinejoin: \"miter\", fill: \"none\" } as const;\n\n/**\n * The elephant: a small, playful mark from the neighbour joke — « the elephant with those ears can fly ». Not a product\n * logo: a quiet figure for the hero of a page or the closing of a chat. Sage body, sand ear, flat colours that read on\n * both themes; decorative by default.\n */\nexport function Elephant({ pose = \"standing\", size = 64, animated = true, title, className, ...rest }: ElephantProps) {\n const flying = pose === \"flying\";\n const p = flying ? G.flying : G.standing;\n const a11y = title ? { role: \"img\" as const, \"aria-label\": title } : { \"aria-hidden\": true as const };\n return (\n <svg width={size} height={size} viewBox={G.viewBox} xmlns=\"http://www.w3.org/2000/svg\" className={className} data-pose={pose} {...a11y} {...rest}>\n {flying && animated ? <style>{CSS}</style> : null}\n {flying ? <path d={G.flying.wind} stroke={G.sage} opacity=\".45\" {...line} /> : null}\n <path d={p.body} stroke={G.sage} {...line} />\n <path d={p.trunk} stroke={G.sage} {...line} />\n <path d={p.tail} stroke={G.sage} {...line} />\n <g className={flying && animated ? \"kz-elephant-flap\" : undefined}>\n <path d={p.ear} stroke={G.sand} {...line} />\n </g>\n <circle cx={G.eye.cx} cy={G.eye.cy} r={G.eye.r} fill={G.sage} />\n </svg>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/elephant/geometry.ts","../src/elephant/elephant.tsx"],"sourcesContent":["import { marks } from \"@krizaka/tokens/native\";\n\n/**\n * The elephant's geometry (200 × 200 view box, a pen line of 8, square caps, mitred joins — the Cahier grammar of the\n * marks and of @krizaka/icons: straight runs and 45° cuts, no rounded outline). It faces right. Two poses of one\n * animal: `standing`, the ear folded down beside the head, and `flying`, the ear spread up like a wing (the darija\n * joke: « l'éléphant avec ses oreilles, il peut voler »), the legs tucked, three lines of wind behind.\n *\n * The body and the trunk are sage, the ear and the wing sand: the two stops of Yororis' mark gradient (`marks.yororis`\n * of @krizaka/tokens), each ≥ 3:1 on the page surfaces of both themes. Flat colours: no glow, no gradient.\n */\nexport const SAND = marks.yororis[0]![1];\nexport const SAGE = marks.yororis[marks.yororis.length - 1]![1];\n\n/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */\nexport const ELEPHANT = {\n viewBox: \"0 0 200 200\",\n stroke: 8,\n sand: SAND,\n sage: SAGE,\n /** The eye: one node, a filled dot. */\n eye: { cx: 154, cy: 66, r: 5 },\n standing: {\n /** Body, head and the two legs, one closed outline: straight runs and 45° cuts. */\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V168 H108 V138 H62 V168 H38 V138 H30 Z\",\n /** The trunk: down from the head's front, curling up at its tip. */\n trunk: \"M164 108 V146 L172 158 H184 V144\",\n /** The ear, folded down over the shoulder. */\n ear: \"M116 52 L92 56 L84 100 L104 124 L128 112 Z\",\n tail: \"M30 90 L20 108 V118\",\n },\n flying: {\n body: \"M30 88 L44 74 H112 V54 L126 40 H158 L176 56 V100 L168 108 H132 V140 H108 V128 H62 V140 H38 V128 H30 Z\",\n trunk: \"M164 108 V142 L172 154 H184 V140\",\n /** The ear, spread up and back: the wing. */\n ear: \"M116 78 L120 30 L90 10 L78 34 L52 24 L56 52 L30 60 L66 84 Z\",\n tail: \"M30 90 L18 102 V112\",\n wind: \"M22 150 H50 M12 166 H44 M32 180 H58\",\n },\n /** The flap: a few degrees around the shoulder, 1.6 s. */\n motion: { flap: 1.6, origin: \"114px 80px\", angle: 7 },\n} as const;\n","import type { SVGProps } from \"react\";\n\nimport { warnDeprecated } from \"../deprecated\";\nimport { ELEPHANT as G } from \"./geometry\";\n\nexport interface ElephantProps extends Omit<SVGProps<SVGSVGElement>, \"width\" | \"height\" | \"title\"> {\n /** `standing` with the ear folded down, or `flying` with the ear spread like a wing. */\n pose?: \"standing\" | \"flying\";\n /** Width and height in pixels. */\n size?: number;\n /** The wing flaps gently (a flying elephant only). Off with `false`; always off under prefers-reduced-motion. */\n animated?: boolean;\n /** An accessible name (the mark becomes an image); without it the mark is decorative. */\n title?: string;\n}\n\nconst CSS = `\n.kz-elephant-flap { transform-box: view-box; transform-origin: ${G.motion.origin}; animation: kz-elephant-flap ${G.motion.flap}s ease-in-out infinite; }\n@keyframes kz-elephant-flap { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(-${G.motion.angle}deg); } }\n@media (prefers-reduced-motion: reduce) { .kz-elephant-flap { animation: none; } }\n`;\n\nconst line = { strokeWidth: G.stroke, strokeLinecap: \"square\", strokeLinejoin: \"miter\", fill: \"none\" } as const;\n\n/**\n * The elephant: a small, playful mark from the neighbour joke — « the elephant with those ears can fly ». Not a product\n * logo: a quiet figure for the hero of a page or the closing of a chat. Sage body, sand ear, flat colours that read on\n * both themes; decorative by default.\n * @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.\n */\nexport function Elephant({ pose = \"standing\", size = 64, animated = true, title, className, ...rest }: ElephantProps) {\n warnDeprecated(\"elephant\");\n const flying = pose === \"flying\";\n const p = flying ? G.flying : G.standing;\n const a11y = title ? { role: \"img\" as const, \"aria-label\": title } : { \"aria-hidden\": true as const };\n return (\n <svg width={size} height={size} viewBox={G.viewBox} xmlns=\"http://www.w3.org/2000/svg\" className={className} data-pose={pose} {...a11y} {...rest}>\n {flying && animated ? <style>{CSS}</style> : null}\n {flying ? <path d={G.flying.wind} stroke={G.sage} opacity=\".45\" {...line} /> : null}\n <path d={p.body} stroke={G.sage} {...line} />\n <path d={p.trunk} stroke={G.sage} {...line} />\n <path d={p.tail} stroke={G.sage} {...line} />\n <g className={flying && animated ? \"kz-elephant-flap\" : undefined}>\n <path d={p.ear} stroke={G.sand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MAAM,SAAS,SAAE,SAAS,OAAM,8BAA6B,WAAsB,aAAW,MAAO,GAAG,MAAO,GAAG,MACzI;AAAA,cAAU,WAAW,oBAAC,WAAO,eAAI,IAAW;AAAA,IAC5C,SAAS,oBAAC,UAAK,GAAG,SAAE,OAAO,MAAM,QAAQ,SAAE,MAAM,SAAQ,OAAO,GAAG,MAAM,IAAK;AAAA,IAC/E,oBAAC,UAAK,GAAG,EAAE,MAAM,QAAQ,SAAE,MAAO,GAAG,MAAM;AAAA,IACrC,oBAAC,UAAK,GAAG,EAAE,OAAO,QAAQ,SAAE,MAAO,GAAG,MAAM;AAAA,IAClD,oBAAC,UAAK,GAAG,EAAE,MAAM,QAAQ,SAAE,MAAO,GAAG,MAAM;AAAA,IAC3C,oBAAC,OAAE,WAAW,UAAU,WAAW,qBAAqB,QACtD,8BAAC,UAAK,GAAG,EAAE,KAAK,QAAQ,SAAE,MAAO,GAAG,MAAM,GAC5C;AAAA,IACA,oBAAC,YAAO,IAAI,SAAE,IAAI,IAAI,IAAI,SAAE,IAAI,IAAI,GAAG,SAAE,IAAI,GAAG,MAAM,SAAE,MAAM;AAAA,KAChE;AAEJ;","names":[]}
|
package/dist/field.js
CHANGED
|
@@ -9,7 +9,7 @@ var field = tv({
|
|
|
9
9
|
slots: {
|
|
10
10
|
root: "flex flex-col gap-1.5",
|
|
11
11
|
label: "text-xs font-semibold text-fg-secondary",
|
|
12
|
-
control: "flex h-11 w-full rounded-lg border border-border-
|
|
12
|
+
control: "flex h-11 w-full rounded-lg border border-border-control bg-surface-2 px-3 text-sm text-fg placeholder:text-fg-muted transition-[border-color,box-shadow] focus-visible:border-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/30",
|
|
13
13
|
hint: "text-xs text-fg-secondary",
|
|
14
14
|
// The message reads in the danger text role (≥ 4.5:1 on every surface, both themes); the dot is the danger fill.
|
|
15
15
|
error: "flex items-center gap-1.5 text-xs font-medium text-fg-danger before:h-1.5 before:w-1.5 before:shrink-0 before:rounded-full before:bg-danger",
|
package/dist/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/field/field.tsx"],"sourcesContent":["// Server-safe. The label ↔ control wiring is HTML (htmlFor / id, aria-describedby): no context.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\n\nexport const field = tv({\n slots: {\n root: \"flex flex-col gap-1.5\",\n label: \"text-xs font-semibold text-fg-secondary\",\n control:\n \"flex h-11 w-full rounded-lg border border-border-
|
|
1
|
+
{"version":3,"sources":["../src/field/field.tsx"],"sourcesContent":["// Server-safe. The label ↔ control wiring is HTML (htmlFor / id, aria-describedby): no context.\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\n\nexport const field = tv({\n slots: {\n root: \"flex flex-col gap-1.5\",\n label: \"text-xs font-semibold text-fg-secondary\",\n control:\n \"flex h-11 w-full rounded-lg border border-border-control bg-surface-2 px-3 text-sm text-fg placeholder:text-fg-muted \" +\n \"transition-[border-color,box-shadow] focus-visible:border-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring \" +\n \"disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/30\",\n hint: \"text-xs text-fg-secondary\",\n // The message reads in the danger text role (≥ 4.5:1 on every surface, both themes); the dot is the danger fill.\n error: \"flex items-center gap-1.5 text-xs font-medium text-fg-danger before:h-1.5 before:w-1.5 before:shrink-0 before:rounded-full before:bg-danger\",\n selectWrap: \"relative flex w-full\",\n chevron: \"pointer-events-none absolute right-3 top-1/2 h-4 w-4 -translate-y-1/2 text-fg-secondary\",\n },\n});\nconst s = field();\n\nexport const Field = {\n Root: ({ className, ...props }: React.ComponentProps<\"div\">) => <div className={s.root({ className })} {...props} />,\n Label: ({ className, ...props }: React.ComponentProps<\"label\">) => <label className={s.label({ className })} {...props} />,\n Hint: ({ className, ...props }: React.ComponentProps<\"p\">) => <p className={s.hint({ className })} {...props} />,\n Error: ({ className, ...props }: React.ComponentProps<\"p\">) => <p role=\"alert\" className={s.error({ className })} {...props} />,\n};\n\ntype ControlProps = {\n /** Marks the control invalid: aria-invalid and data-invalid (pair it with a `Field.Error` in aria-describedby). */\n invalid?: boolean;\n};\n\nconst invalidProps = (invalid?: boolean) => (invalid ? { \"aria-invalid\": true as const, \"data-invalid\": \"\" } : {});\n\nexport function Input({ invalid, className, ...props }: React.ComponentProps<\"input\"> & ControlProps) {\n return <input {...invalidProps(invalid)} className={s.control({ className })} {...props} />;\n}\n\nexport function Textarea({ invalid, className, ...props }: React.ComponentProps<\"textarea\"> & ControlProps) {\n return <textarea {...invalidProps(invalid)} className={s.control({ className: cn(\"h-auto min-h-24 py-2\", className) })} {...props} />;\n}\n\n/** A native <select>, styled like the other controls (the platform's menu: accessible and right on phones). */\nexport function Select({ invalid, className, ...props }: React.ComponentProps<\"select\"> & ControlProps) {\n return (\n <span className={s.selectWrap()}>\n <select {...invalidProps(invalid)} className={s.control({ className: cn(\"appearance-none pr-9\", className) })} {...props} />\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden className={s.chevron()}>\n <path d=\"m6 9 6 6 6-6\" />\n </svg>\n </span>\n );\n}\n"],"mappings":";;;;;AAEA,SAAS,UAAU;AAsB+C,cAwB9D,YAxB8D;AAlB3D,IAAM,QAAQ,GAAG;AAAA,EACtB,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,SACE;AAAA,IAGF,MAAM;AAAA;AAAA,IAEN,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,SAAS;AAAA,EACX;AACF,CAAC;AACD,IAAM,IAAI,MAAM;AAET,IAAM,QAAQ;AAAA,EACnB,MAAM,CAAC,EAAE,WAAW,GAAG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SAAQ,gBAAe,SAAQ,eAAW,MAAC,WAAW,EAAE,QAAQ,GACvJ,8BAAC,UAAK,GAAE,gBAAe,GACzB;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/filter-bar.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
filterBar,
|
|
6
6
|
readFilterParams,
|
|
7
7
|
writeFilterParams
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-OIMXKRXF.js";
|
|
9
|
+
import "./chunk-VIPSZXO4.js";
|
|
10
10
|
import "./chunk-D3T54RSL.js";
|
|
11
11
|
import "./chunk-J3NC6ER4.js";
|
|
12
12
|
import "./chunk-NSLXEDIS.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as tailwind_variants from 'tailwind-variants';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
+
/** @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0. */
|
|
4
5
|
declare const forceUpdateScreen: tailwind_variants.TVReturnType<{
|
|
5
6
|
[key: string]: {
|
|
6
7
|
[key: string]: tailwind_variants.ClassValue | {
|
|
@@ -74,7 +75,10 @@ type ForceUpdateScreenProps = Omit<React.ComponentProps<"main">, "title"> & {
|
|
|
74
75
|
/** Checks the backend again. */
|
|
75
76
|
onRetry?: () => void;
|
|
76
77
|
};
|
|
77
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* The forced update: one thing to do, and the way to do it.
|
|
80
|
+
* @deprecated Since 3.55 (ADR-006, krizaka-ui#674): no product uses it. Removed in 4.0.
|
|
81
|
+
*/
|
|
78
82
|
declare function ForceUpdateScreen({ title, message, versionLabel, mark, updateLabel, onUpdate, retryLabel, onRetry, className, ...props }: ForceUpdateScreenProps): React.JSX.Element;
|
|
79
83
|
|
|
80
84
|
export { ForceUpdateScreen, type ForceUpdateScreenProps, forceUpdateScreen };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
warnDeprecated
|
|
3
|
+
} from "./chunk-KGLRZMCY.js";
|
|
1
4
|
import "./chunk-TDG7ED2W.js";
|
|
2
5
|
import {
|
|
3
6
|
Button
|
|
@@ -20,6 +23,7 @@ var forceUpdateScreen = tv({
|
|
|
20
23
|
}
|
|
21
24
|
});
|
|
22
25
|
function ForceUpdateScreen({ title, message, versionLabel, mark, updateLabel, onUpdate, retryLabel, onRetry, className, ...props }) {
|
|
26
|
+
warnDeprecated("force-update-screen");
|
|
23
27
|
const s = forceUpdateScreen();
|
|
24
28
|
return /* @__PURE__ */ jsxs("main", { "data-kind": "update-force", className: s.root({ className }), ...props, children: [
|
|
25
29
|
mark && /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: s.mark(), children: mark }),
|