@krizaka/ui 3.54.0 → 3.59.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/{RotatingWord-D9s7FXFD.d.ts → RotatingWord-COSabR2c.d.ts} +2 -1
- package/dist/account-menu.d.ts +8 -3
- package/dist/account-menu.js +8 -1
- package/dist/account-menu.js.map +1 -1
- package/dist/account-settings.d.ts +153 -61
- package/dist/account-settings.js +243 -160
- package/dist/account-settings.js.map +1 -1
- package/dist/achievement.d.ts +2 -1
- package/dist/action-bar.d.ts +3 -2
- package/dist/activity-feed.d.ts +2 -1
- package/dist/agenda.d.ts +2 -1
- package/dist/alert.d.ts +2 -1
- package/dist/anatomy-plate.d.ts +6 -2
- package/dist/anatomy-plate.js +4 -0
- package/dist/anatomy-plate.js.map +1 -1
- package/dist/app-header/search.d.ts +64 -0
- package/dist/app-header/search.js +70 -0
- package/dist/app-header/search.js.map +1 -0
- package/dist/app-header.d.ts +89 -4
- package/dist/app-header.js +63 -5
- package/dist/app-header.js.map +1 -1
- package/dist/app-shell.d.ts +26 -25
- package/dist/app-shell.js +31 -40
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.d.ts +3 -2
- package/dist/argument-card.js +3 -3
- package/dist/audio-player.d.ts +2 -1
- package/dist/auth-layout.d.ts +11 -10
- package/dist/avatar/defaults.d.ts +2 -1
- package/dist/avatar.d.ts +2 -1
- package/dist/badge.d.ts +2 -1
- package/dist/bird-plate.d.ts +7 -3
- package/dist/bird-plate.js +2 -2
- package/dist/bird-plate.js.map +1 -1
- package/dist/blocks.css +235 -27
- package/dist/button.d.ts +2 -1
- package/dist/captcha.d.ts +2 -1
- package/dist/captcha.js +1 -0
- package/dist/captcha.js.map +1 -1
- package/dist/card-grid.d.ts +2 -1
- package/dist/card.d.ts +2 -1
- package/dist/catalogue-page.d.ts +82 -2
- package/dist/catalogue-page.js +156 -13
- package/dist/catalogue-page.js.map +1 -1
- package/dist/changelog-page.d.ts +2 -1
- package/dist/chapter.d.ts +2 -1
- package/dist/chat.d.ts +14 -13
- package/dist/chat.js +2 -2
- package/dist/chat.js.map +1 -1
- package/dist/checkbox.d.ts +2 -1
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/chip-link.d.ts +2 -1
- package/dist/chip-row.d.ts +8 -7
- package/dist/chip.d.ts +55 -1
- package/dist/chip.js +14 -98
- package/dist/chip.js.map +1 -1
- package/dist/choice-grid.d.ts +3 -2
- package/dist/choice-grid.js +28 -88
- package/dist/choice-grid.js.map +1 -1
- package/dist/chunk-27AWSJTK.js +46 -0
- package/dist/chunk-27AWSJTK.js.map +1 -0
- package/dist/{chunk-YGIN2YIY.js → chunk-3X3OF4TI.js} +2 -2
- package/dist/chunk-3X3OF4TI.js.map +1 -0
- package/dist/{chunk-KBQD6HE3.js → chunk-4GQH27IT.js} +3 -3
- package/dist/{chunk-KBQD6HE3.js.map → chunk-4GQH27IT.js.map} +1 -1
- package/dist/{chunk-YHKTYFOQ.js → chunk-5LANVCK7.js} +383 -107
- package/dist/chunk-5LANVCK7.js.map +1 -0
- package/dist/{chunk-KDXRYUD3.js → chunk-5QEXOGO2.js} +3 -1
- package/dist/{chunk-KDXRYUD3.js.map → chunk-5QEXOGO2.js.map} +1 -1
- package/dist/chunk-5VEVYDVC.js +11 -0
- package/dist/chunk-5VEVYDVC.js.map +1 -0
- package/dist/chunk-7J2L4HOD.js +340 -0
- package/dist/chunk-7J2L4HOD.js.map +1 -0
- package/dist/chunk-BDIU5LZB.js +18 -0
- package/dist/chunk-BDIU5LZB.js.map +1 -0
- package/dist/chunk-BQ4EOR2O.js +177 -0
- package/dist/chunk-BQ4EOR2O.js.map +1 -0
- package/dist/chunk-CSRKYZ53.js +39 -0
- package/dist/chunk-CSRKYZ53.js.map +1 -0
- package/dist/chunk-F6JTHPHE.js +399 -0
- package/dist/chunk-F6JTHPHE.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-OGWB76BR.js +90 -0
- package/dist/chunk-OGWB76BR.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-UYGUSYIC.js +173 -0
- package/dist/chunk-UYGUSYIC.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-WOZP3JLW.js +51 -0
- package/dist/chunk-WOZP3JLW.js.map +1 -0
- package/dist/chunk-XVXFMVG3.js +27 -0
- package/dist/chunk-XVXFMVG3.js.map +1 -0
- package/dist/chunk-YCZ7N6Q6.js +385 -0
- package/dist/chunk-YCZ7N6Q6.js.map +1 -0
- package/dist/code-block.d.ts +2 -1
- package/dist/code-block.js +81 -98
- package/dist/code-block.js.map +1 -1
- package/dist/combobox.d.ts +20 -19
- package/dist/combobox.js +3 -2
- package/dist/command.d.ts +21 -20
- package/dist/comparison-table.d.ts +2 -1
- package/dist/component-page.d.ts +6 -2
- package/dist/component-page.js +5 -0
- package/dist/component-page.js.map +1 -1
- package/dist/confirm-button.d.ts +2 -1
- package/dist/contact-page.d.ts +2 -1
- package/dist/continue-prompt.d.ts +6 -2
- package/dist/continue-prompt.js +4 -0
- package/dist/continue-prompt.js.map +1 -1
- package/dist/countdown.d.ts +2 -1
- package/dist/cover-hero.d.ts +20 -19
- package/dist/cover-hero.js +25 -42
- package/dist/cover-hero.js.map +1 -1
- package/dist/cta-panel.d.ts +2 -1
- package/dist/dashboard-layout.d.ts +50 -2
- package/dist/dashboard-layout.js +66 -11
- package/dist/dashboard-layout.js.map +1 -1
- package/dist/data-table.d.ts +103 -4
- package/dist/data-table.js +23 -7
- package/dist/date-picker.d.ts +29 -28
- package/dist/date-picker.js +2 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/decision-list.d.ts +2 -1
- package/dist/description-list.d.ts +2 -1
- package/dist/detail-layout.d.ts +147 -3
- package/dist/detail-layout.js +143 -17
- package/dist/detail-layout.js.map +1 -1
- package/dist/{dialog-D42QwYb_.d.ts → dialog-DpUwec2g.d.ts} +2 -1
- package/dist/dialog.d.ts +3 -2
- package/dist/docs-article-page.d.ts +2 -1
- package/dist/docs-hub-page.d.ts +2 -1
- package/dist/docs-layout.d.ts +2 -1
- package/dist/docs-nav.d.ts +3 -10
- package/dist/document-viewer.d.ts +5 -4
- package/dist/doodle.d.ts +32 -0
- package/dist/doodle.js +70 -0
- package/dist/doodle.js.map +1 -0
- package/dist/drop-overlay.d.ts +14 -5
- package/dist/drop-overlay.js +16 -6
- package/dist/drop-overlay.js.map +1 -1
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +13 -74
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/elephant.d.ts +4 -1
- package/dist/elephant.js +4 -0
- package/dist/elephant.js.map +1 -1
- package/dist/empty-state.d.ts +2 -1
- package/dist/engine-flow.d.ts +2 -1
- package/dist/error-page.d.ts +2 -1
- package/dist/field.js +1 -1
- package/dist/field.js.map +1 -1
- package/dist/file-upload.d.ts +14 -13
- package/dist/filter-bar.d.ts +84 -11
- package/dist/filter-bar.js +6 -2
- package/dist/flock.d.ts +3 -2
- package/dist/footnote.d.ts +2 -1
- package/dist/force-update-screen.d.ts +13 -8
- package/dist/force-update-screen.js +4 -0
- package/dist/force-update-screen.js.map +1 -1
- package/dist/form/server.d.ts +2 -1
- package/dist/form.d.ts +2 -1
- package/dist/gallery-page.d.ts +6 -2
- package/dist/gallery-page.js +4 -0
- package/dist/gallery-page.js.map +1 -1
- package/dist/genui.d.ts +2 -1
- package/dist/genui.js +5 -5
- package/dist/{geometry-DX-W-Yyf.d.ts → geometry-DZ4Q3hDQ.d.ts} +2 -1
- package/dist/glossary-term.d.ts +2 -1
- package/dist/glossary.d.ts +2 -1
- package/dist/glow-card.d.ts +2 -1
- package/dist/goal-gauge.d.ts +2 -1
- package/dist/grade-stamp.d.ts +23 -0
- package/dist/grade-stamp.js +42 -0
- package/dist/grade-stamp.js.map +1 -0
- package/dist/how-it-works-page.d.ts +2 -1
- package/dist/image-cropper.d.ts +15 -6
- package/dist/image-cropper.js +4 -0
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +4 -4
- package/dist/iso.d.ts +2 -1
- package/dist/kanban.d.ts +5 -1
- package/dist/kanban.js +4 -0
- package/dist/kanban.js.map +1 -1
- package/dist/kbd.d.ts +2 -1
- package/dist/kind-config-editor.d.ts +152 -0
- package/dist/kind-config-editor.js +574 -0
- package/dist/kind-config-editor.js.map +1 -0
- package/dist/kpi-explained.d.ts +2 -1
- package/dist/landing-page.d.ts +2 -1
- package/dist/landscape.d.ts +6 -2
- package/dist/landscape.js +4 -0
- package/dist/landscape.js.map +1 -1
- package/dist/language-switch/server.d.ts +2 -1
- package/dist/language-switch.d.ts +11 -10
- package/dist/legal-page.d.ts +2 -1
- package/dist/link-card.d.ts +2 -1
- package/dist/list.d.ts +2 -1
- package/dist/list.js +1 -1
- package/dist/loader.d.ts +2 -1
- package/dist/longform-page.d.ts +2 -1
- package/dist/maintenance-screen.d.ts +10 -5
- package/dist/maintenance-screen.js +4 -0
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.d.ts +8 -7
- package/dist/map.js +30 -0
- package/dist/map.js.map +1 -1
- package/dist/markdown.d.ts +7 -2
- package/dist/markdown.js +12 -5
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.d.ts +5 -4
- package/dist/marquee.d.ts +2 -1
- package/dist/mascot-quote.d.ts +2 -1
- package/dist/mascot-state.d.ts +3 -2
- package/dist/mascots.d.ts +4 -3
- package/dist/match-dialog.d.ts +6 -2
- package/dist/match-dialog.js +4 -0
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-capture.d.ts +11 -5
- package/dist/media-capture.js +4 -0
- package/dist/media-capture.js.map +1 -1
- package/dist/media-gallery.d.ts +2 -1
- package/dist/media-grid.d.ts +3 -10
- package/dist/meta-row.d.ts +2 -1
- package/dist/meter.d.ts +2 -1
- package/dist/meter.js +5 -121
- package/dist/meter.js.map +1 -1
- package/dist/motion.d.ts +3 -2
- package/dist/native/form.d.ts +2 -1
- package/dist/native/list.d.ts +2 -1
- package/dist/native/map.d.ts +2 -1
- package/dist/native/map.js +30 -0
- package/dist/native/map.js.map +1 -1
- package/dist/native/markdown.d.ts +11 -3
- package/dist/native/markdown.js +46 -7
- package/dist/native/markdown.js.map +1 -1
- package/dist/native/media-capture.d.ts +3 -1
- package/dist/native/media-capture.js +5 -0
- package/dist/native/media-capture.js.map +1 -1
- package/dist/native/media-picker.d.ts +2 -1
- package/dist/native/vertical-video.d.ts +10 -3
- package/dist/native/vertical-video.js +6 -0
- package/dist/native/vertical-video.js.map +1 -1
- package/dist/native/video-player.d.ts +2 -1
- package/dist/native.d.ts +323 -4
- package/dist/native.js +1974 -1348
- package/dist/native.js.map +1 -1
- package/dist/nav-bar/me.d.ts +33 -0
- package/dist/nav-bar/me.js +23 -0
- package/dist/nav-bar/me.js.map +1 -0
- package/dist/nav-bar.d.ts +61 -2
- package/dist/nav-bar.js +92 -48
- package/dist/nav-bar.js.map +1 -1
- package/dist/next-actions.d.ts +2 -1
- package/dist/notification-preferences.d.ts +152 -0
- package/dist/notification-preferences.js +78 -0
- package/dist/notification-preferences.js.map +1 -0
- package/dist/number-ticker.d.ts +2 -1
- package/dist/opening-hours.d.ts +2 -1
- package/dist/page-header.d.ts +2 -1
- package/dist/page-header.js +1 -1
- package/dist/page-header.js.map +1 -1
- package/dist/page-hero.d.ts +2 -1
- package/dist/page-index.d.ts +2 -1
- package/dist/page.d.ts +2 -1
- package/dist/pagination.d.ts +2 -1
- package/dist/photo-grid.d.ts +2 -1
- package/dist/pointer-light.d.ts +2 -1
- package/dist/pointer-light.js +5 -0
- package/dist/pointer-light.js.map +1 -1
- package/dist/popover.d.ts +2 -1
- package/dist/pricing-page.d.ts +2 -1
- package/dist/product-page.d.ts +6 -2
- package/dist/product-page.js +4 -0
- package/dist/product-page.js.map +1 -1
- package/dist/profile-card.d.ts +120 -1
- package/dist/profile-card.js +68 -21
- package/dist/profile-card.js.map +1 -1
- package/dist/progress.d.ts +2 -1
- package/dist/promise-card.d.ts +6 -2
- package/dist/promise-card.js +4 -0
- package/dist/promise-card.js.map +1 -1
- package/dist/quota-meter.d.ts +114 -0
- package/dist/quota-meter.js +58 -0
- package/dist/quota-meter.js.map +1 -0
- package/dist/radio-group.d.ts +2 -1
- package/dist/radio-group.js +7 -9
- package/dist/radio-group.js.map +1 -1
- package/dist/rail-nav.d.ts +35 -18
- package/dist/rail-nav.js +45 -56
- package/dist/rail-nav.js.map +1 -1
- package/dist/recipes.d.ts +2 -1
- package/dist/retro-tv.d.ts +31 -0
- package/dist/retro-tv.js +124 -0
- package/dist/retro-tv.js.map +1 -0
- package/dist/router.d.ts +13 -1
- package/dist/router.js +85 -8
- package/dist/router.js.map +1 -1
- package/dist/scroll-stage.d.ts +7 -2
- package/dist/scroll-stage.js +5 -0
- package/dist/scroll-stage.js.map +1 -1
- package/dist/search-field.d.ts +2 -1
- package/dist/search-field.js +1 -1
- package/dist/section-backdrop.d.ts +2 -1
- package/dist/separator.d.ts +2 -1
- package/dist/service-card.d.ts +9 -8
- package/dist/settings-layout.d.ts +2 -1
- package/dist/settings-layout.js +10 -324
- package/dist/settings-layout.js.map +1 -1
- package/dist/showcase.d.ts +11 -3
- package/dist/showcase.js +5 -0
- package/dist/showcase.js.map +1 -1
- package/dist/signature.d.ts +20 -0
- package/dist/signature.js +39 -0
- package/dist/signature.js.map +1 -0
- package/dist/site-cahier.d.ts +187 -0
- package/dist/site-cahier.js +844 -0
- package/dist/site-cahier.js.map +1 -0
- package/dist/site-footer.d.ts +2 -1
- package/dist/site-footer.js +1 -1
- package/dist/sites.d.ts +2 -1
- package/dist/sites.js +1 -1
- package/dist/sites.js.map +1 -1
- package/dist/skeleton.d.ts +2 -1
- package/dist/skip-link.d.ts +2 -1
- package/dist/slider.d.ts +2 -1
- package/dist/slot-picker.d.ts +86 -13
- package/dist/slot-picker.js +98 -16
- package/dist/slot-picker.js.map +1 -1
- package/dist/slot.d.ts +1 -1
- package/dist/specimen-tag.d.ts +2 -1
- package/dist/speed-lines.d.ts +19 -0
- package/dist/speed-lines.js +45 -0
- package/dist/speed-lines.js.map +1 -0
- package/dist/spinner.d.ts +2 -1
- package/dist/split-view.d.ts +2 -1
- package/dist/stage-banner.d.ts +2 -1
- package/dist/stat.d.ts +2 -1
- package/dist/stat.js +1 -1
- package/dist/stat.js.map +1 -1
- package/dist/status-chip.d.ts +44 -0
- package/dist/status-chip.js +137 -0
- package/dist/status-chip.js.map +1 -0
- package/dist/status-page.d.ts +6 -2
- package/dist/status-page.js +5 -0
- package/dist/status-page.js.map +1 -1
- package/dist/step-progress.d.ts +2 -1
- package/dist/step-showcase.d.ts +2 -1
- package/dist/stepper.d.ts +2 -1
- package/dist/sticky-action.d.ts +28 -5
- package/dist/sticky-action.js +10 -4
- package/dist/sticky-action.js.map +1 -1
- package/dist/stuck.d.ts +28 -0
- package/dist/stuck.js +26 -0
- package/dist/stuck.js.map +1 -0
- package/dist/swipe-deck.d.ts +11 -3
- package/dist/swipe-deck.js +5 -0
- package/dist/swipe-deck.js.map +1 -1
- package/dist/switch.d.ts +2 -1
- package/dist/switch.js +4 -32
- package/dist/switch.js.map +1 -1
- package/dist/tabs.d.ts +48 -8
- package/dist/tabs.js +62 -12
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.d.ts +2 -1
- package/dist/tag-input.js +3 -2
- package/dist/tag-input.js.map +1 -1
- package/dist/tag-selector.d.ts +30 -4
- package/dist/tag-selector.js +90 -8
- package/dist/tag-selector.js.map +1 -1
- package/dist/taped-photo.d.ts +2 -1
- package/dist/taped-photo.js +3 -20
- package/dist/taped-photo.js.map +1 -1
- package/dist/terminal-replay.d.ts +6 -2
- package/dist/terminal-replay.js +5 -1
- package/dist/terminal-replay.js.map +1 -1
- package/dist/text-style/server.d.ts +2 -1
- package/dist/text-style.d.ts +2 -1
- package/dist/theme.d.ts +21 -1
- package/dist/theme.js +37 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +2 -1
- package/dist/toc.d.ts +2 -1
- package/dist/tooltip.d.ts +2 -1
- package/dist/tree-view.d.ts +2 -1
- package/dist/tree-view.js +4 -0
- package/dist/tree-view.js.map +1 -1
- package/dist/update-prompt.d.ts +16 -11
- package/dist/update-prompt.js +4 -0
- package/dist/update-prompt.js.map +1 -1
- package/dist/upload-queue.d.ts +2 -1
- package/dist/verified-badge.d.ts +2 -1
- package/dist/versus-card.d.ts +40 -0
- package/dist/versus-card.js +40 -0
- package/dist/versus-card.js.map +1 -0
- package/dist/vertical-video.d.ts +2 -1
- package/dist/video-player.d.ts +20 -19
- package/dist/video-player.js +7 -376
- package/dist/video-player.js.map +1 -1
- package/dist/video-trimmer.d.ts +8 -2
- package/dist/video-trimmer.js +4 -0
- package/dist/video-trimmer.js.map +1 -1
- package/dist/virtual.d.ts +8 -7
- package/dist/waveform.d.ts +2 -1
- package/package.json +249 -52
- package/registry/account-menu.json +9 -8
- package/registry/account-settings.json +258 -6
- 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 +117 -8
- 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 +388 -12
- 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 +91 -5
- package/registry/data-table.json +215 -8
- 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 +226 -8
- 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 +302 -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/account-settings/appearance.d.ts +4 -0
- package/registry/examples/account-settings/appearance.js +40 -0
- package/registry/examples/account-settings/appearance.tsx +30 -0
- 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/catalogue-page/clients.d.ts +4 -0
- package/registry/examples/catalogue-page/clients.js +49 -0
- package/registry/examples/catalogue-page/clients.tsx +61 -0
- package/registry/examples/chip/marker-picker.d.ts +4 -0
- package/registry/examples/chip/marker-picker.js +17 -0
- package/registry/examples/chip/marker-picker.tsx +17 -0
- package/registry/examples/chip/native/marker-picker.d.ts +4 -0
- package/registry/examples/chip/native/marker-picker.dark.png +0 -0
- package/registry/examples/chip/native/marker-picker.js +18 -0
- package/registry/examples/chip/native/marker-picker.light.png +0 -0
- package/registry/examples/chip/native/marker-picker.tsx +16 -0
- package/registry/examples/chip/native/tags.d.ts +4 -0
- package/registry/examples/chip/native/tags.dark.png +0 -0
- package/registry/examples/chip/native/tags.js +22 -0
- package/registry/examples/chip/native/tags.light.png +0 -0
- package/registry/examples/chip/native/tags.tsx +20 -0
- package/registry/examples/chip/tags.d.ts +4 -0
- package/registry/examples/chip/tags.js +26 -0
- package/registry/examples/chip/tags.tsx +23 -0
- package/registry/examples/dashboard-layout/today.d.ts +4 -0
- package/registry/examples/dashboard-layout/today.js +54 -0
- package/registry/examples/dashboard-layout/today.tsx +63 -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/bulk.d.ts +4 -0
- package/registry/examples/data-table/bulk.js +45 -0
- package/registry/examples/data-table/bulk.tsx +34 -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/client.d.ts +4 -0
- package/registry/examples/detail-layout/client.js +40 -0
- package/registry/examples/detail-layout/client.tsx +39 -0
- package/registry/examples/detail-layout/new-invoice.d.ts +4 -0
- package/registry/examples/detail-layout/new-invoice.js +44 -0
- package/registry/examples/detail-layout/new-invoice.tsx +34 -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/bird-sketch.d.ts +4 -0
- package/registry/examples/doodle/bird-sketch.js +11 -0
- package/registry/examples/doodle/bird-sketch.tsx +12 -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-marks.d.ts +4 -0
- package/registry/examples/doodle/margin-marks.js +27 -0
- package/registry/examples/doodle/margin-marks.tsx +19 -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/filter-bar/views.d.ts +4 -0
- package/registry/examples/filter-bar/views.js +39 -0
- package/registry/examples/filter-bar/views.tsx +30 -0
- package/registry/examples/grade-stamp/coverage.d.ts +4 -0
- package/registry/examples/grade-stamp/coverage.js +12 -0
- package/registry/examples/grade-stamp/coverage.tsx +8 -0
- package/registry/examples/grade-stamp/lighthouse.d.ts +4 -0
- package/registry/examples/grade-stamp/lighthouse.js +12 -0
- package/registry/examples/grade-stamp/lighthouse.tsx +14 -0
- package/registry/examples/kind-config-editor/derived.d.ts +4 -0
- package/registry/examples/kind-config-editor/derived.js +26 -0
- package/registry/examples/kind-config-editor/derived.tsx +16 -0
- package/registry/examples/kind-config-editor/native/status-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/native/status-set.dark.png +0 -0
- package/registry/examples/kind-config-editor/native/status-set.js +22 -0
- package/registry/examples/kind-config-editor/native/status-set.light.png +0 -0
- package/registry/examples/kind-config-editor/native/status-set.tsx +19 -0
- package/registry/examples/kind-config-editor/native/tag-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/native/tag-set.dark.png +0 -0
- package/registry/examples/kind-config-editor/native/tag-set.js +20 -0
- package/registry/examples/kind-config-editor/native/tag-set.light.png +0 -0
- package/registry/examples/kind-config-editor/native/tag-set.tsx +18 -0
- package/registry/examples/kind-config-editor/status-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/status-set.js +29 -0
- package/registry/examples/kind-config-editor/status-set.tsx +25 -0
- package/registry/examples/kind-config-editor/tag-set.d.ts +4 -0
- package/registry/examples/kind-config-editor/tag-set.js +20 -0
- package/registry/examples/kind-config-editor/tag-set.tsx +18 -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/site-cahier/java-releases.d.ts +4 -0
- package/registry/examples/site-cahier/java-releases.js +33 -0
- package/registry/examples/site-cahier/java-releases.tsx +32 -0
- package/registry/examples/site-cahier/motion-lab.d.ts +4 -0
- package/registry/examples/site-cahier/motion-lab.js +32 -0
- package/registry/examples/site-cahier/motion-lab.tsx +29 -0
- package/registry/examples/site-cahier/ts-changelog.d.ts +4 -0
- package/registry/examples/site-cahier/ts-changelog.js +24 -0
- package/registry/examples/site-cahier/ts-changelog.tsx +20 -0
- package/registry/examples/site-cahier/ts-doc.d.ts +4 -0
- package/registry/examples/site-cahier/ts-doc.js +38 -0
- package/registry/examples/site-cahier/ts-doc.tsx +27 -0
- package/registry/examples/site-cahier/ui-home.d.ts +4 -0
- package/registry/examples/site-cahier/ui-home.js +46 -0
- package/registry/examples/site-cahier/ui-home.tsx +40 -0
- package/registry/examples/slot-picker/weeks.d.ts +4 -0
- package/registry/examples/slot-picker/weeks.js +45 -0
- package/registry/examples/slot-picker/weeks.tsx +28 -0
- package/registry/examples/speed-lines/hero.d.ts +4 -0
- package/registry/examples/speed-lines/hero.js +11 -0
- package/registry/examples/speed-lines/hero.tsx +12 -0
- package/registry/examples/speed-lines/streaks.d.ts +4 -0
- package/registry/examples/speed-lines/streaks.js +11 -0
- package/registry/examples/speed-lines/streaks.tsx +12 -0
- package/registry/examples/status-chip/default.d.ts +4 -0
- package/registry/examples/status-chip/default.js +35 -0
- package/registry/examples/status-chip/default.tsx +32 -0
- package/registry/examples/status-chip/native/default.d.ts +4 -0
- package/registry/examples/status-chip/native/default.dark.png +0 -0
- package/registry/examples/status-chip/native/default.js +26 -0
- package/registry/examples/status-chip/native/default.light.png +0 -0
- package/registry/examples/status-chip/native/default.tsx +20 -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/examples/tag-selector/creatable.d.ts +4 -0
- package/registry/examples/tag-selector/creatable.js +41 -0
- package/registry/examples/tag-selector/creatable.tsx +29 -0
- package/registry/examples/tag-selector/native/tags.d.ts +4 -0
- package/registry/examples/tag-selector/native/tags.dark.png +0 -0
- package/registry/examples/tag-selector/native/tags.js +19 -0
- package/registry/examples/tag-selector/native/tags.light.png +0 -0
- package/registry/examples/tag-selector/native/tags.tsx +19 -0
- package/registry/examples/versus-card/alternatives.d.ts +4 -0
- package/registry/examples/versus-card/alternatives.js +20 -0
- package/registry/examples/versus-card/alternatives.tsx +14 -0
- package/registry/examples/versus-card/releases.d.ts +4 -0
- package/registry/examples/versus-card/releases.js +35 -0
- package/registry/examples/versus-card/releases.tsx +29 -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 +209 -9
- 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/grade-stamp.json +227 -0
- 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 +612 -105
- package/registry/iso.json +1 -1
- package/registry/kanban.json +13 -5
- package/registry/kbd.json +1 -1
- package/registry/kind-config-editor.json +565 -0
- 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-cahier.json +548 -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 +156 -10
- package/registry/slot.json +2 -2
- package/registry/specimen-tag.json +1 -1
- package/registry/speed-lines.json +174 -0
- 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-chip.json +350 -0
- 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 +38 -8
- 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 +190 -12
- 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 +4 -3
- 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/versus-card.json +194 -0
- 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 +0 -179
- package/dist/chunk-ZQW7LF4Y.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/chip/chip.tsx","../src/chip/recipe.ts","../src/chip/tag-chip.tsx","../src/chip/markers.ts"],"sourcesContent":["// Client (a context). A chip is a pressable pill: alone it is a Radix Toggle (aria-pressed), inside `Chip.Group` an\n// item of a Radix Toggle Group (roving focus with the arrows; `single` = radio semantics, `multiple` = pressed\n// buttons). A `removable` chip is a static label with its own remove button (two buttons cannot nest).\nimport { Toggle as TogglePrimitive, ToggleGroup as ToggleGroupPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nimport { useRouteBinding } from \"../router\";\nimport { chipRecipe } from \"./recipe\";\n\nexport const chip = tv(chipRecipe);\n\nexport type ChipVariants = VariantProps<typeof chip>;\n\ntype GroupContext = { size: ChipVariants[\"size\"] };\nconst ChipGroupContext = React.createContext<GroupContext | null>(null);\n\nfunction RemoveIcon() {\n return (\n <svg viewBox=\"0 0 24 24\" className=\"h-3.5 w-3.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" aria-hidden>\n <path d=\"M18 6 6 18M6 6l12 12\" />\n </svg>\n );\n}\n\ntype ToggleChipProps = Omit<React.ComponentProps<\"button\">, \"value\" | \"defaultValue\"> &\n ChipVariants & {\n /**\n * sm · md (inside `Chip.Group`, the group's size by default).\n * @default \"md\"\n */\n size?: ChipVariants[\"size\"];\n /** Inside `Chip.Group`: the value this chip stands for (required there, ignored alone). */\n value?: string;\n /** Alone: pressed or not (`defaultSelected` uncontrolled), `onSelectedChange` on every press. */\n selected?: boolean;\n /** Alone: pressed at first, uncontrolled. */\n defaultSelected?: boolean;\n /** Alone: called with the new state on every press. */\n onSelectedChange?: (selected: boolean) => void;\n /** A pressable chip (the default); `true` makes it a static chip with a remove button. */\n removable?: false;\n };\n\ntype RemovableChipProps = Omit<React.ComponentProps<\"span\">, \"onSelect\"> &\n ChipVariants & {\n /** A static chip (a chosen tag, an applied filter) with a remove button. */\n removable: true;\n /** The accessible name of the remove button — passed translated, e.g. \"Remove #night\". */\n removeLabel: string;\n /** Runs when the remove button is pressed. */\n onRemove: () => void;\n /** Disables the remove button. */\n disabled?: boolean;\n };\n\nexport type ChipProps = ToggleChipProps | RemovableChipProps;\n\n/** A selectable pill (`selected` / `onSelectedChange`), an item of `Chip.Group` (`value`), or `removable`. */\nfunction ChipBase(props: ChipProps) {\n const group = React.useContext(ChipGroupContext);\n if (props.removable) {\n const { removable: _removable, removeLabel, onRemove, disabled, size, className, children, ...rest } = props;\n const s = chip({ size: size ?? group?.size });\n return (\n <span data-removable=\"\" className={s.base({ className })} {...rest}>\n {children}\n <button type=\"button\" aria-label={removeLabel} title={removeLabel} disabled={disabled} onClick={onRemove} className={s.remove()}>\n <RemoveIcon />\n </button>\n </span>\n );\n }\n const { removable: _removable, value, selected, defaultSelected, onSelectedChange, size, className, ...rest } = props;\n const s = chip({ size: size ?? group?.size });\n if (group) {\n if (value === undefined) throw new Error(\"Chip: a chip inside Chip.Group needs a `value`.\");\n return <ToggleGroupPrimitive.Item value={value} className={s.base({ className })} {...rest} />;\n }\n return (\n <TogglePrimitive.Root\n pressed={selected}\n defaultPressed={defaultSelected}\n onPressedChange={onSelectedChange}\n className={s.base({ className })}\n {...rest}\n />\n );\n}\n\ntype GroupBase = Omit<React.ComponentProps<\"div\">, \"defaultValue\" | \"dir\"> &\n ChipVariants & {\n /**\n * sm · md: the size of every chip of the group.\n * @default \"md\"\n */\n size?: ChipVariants[\"size\"];\n /** The group's accessible name — passed translated (\"Filter by format\"). */\n label?: string;\n /** The arrow keys that move: left / right (horizontal, a row) or up / down (vertical, a column). */\n orientation?: \"horizontal\" | \"vertical\";\n /** Arrow keys wrap from the last chip to the first (default `true`). */\n loop?: boolean;\n /** Disables every chip of the group. */\n disabled?: boolean;\n };\n\nexport type ChipGroupProps =\n | (GroupBase & {\n /** One choice: the chips behave as radios. */\n type: \"single\";\n /** The chosen value (controlled), `\"\"` when none. */\n value?: string;\n /** The value chosen at first, uncontrolled. */\n defaultValue?: string;\n /** Called with the new value on every choice. */\n onValueChange?: (value: string) => void;\n /** Keeps one chip selected: pressing the selected chip does not clear it (default `false`). */\n required?: boolean;\n /** Binds the choice to this search parameter of the URL (`?type=…`): the URL is the state. Without it the state is local — only for an ephemeral choice. */\n routeKey?: string;\n /** The values the parameter may hold (the chips' `value`s). */\n routeValues?: readonly string[];\n })\n | (GroupBase & {\n /** Any number of choices: the chips are pressed buttons. */\n type: \"multiple\";\n /** The chosen values (controlled). */\n value?: string[];\n /** The values chosen at first, uncontrolled. */\n defaultValue?: string[];\n /** Called with the new values on every press. */\n onValueChange?: (value: string[]) => void;\n required?: never;\n routeKey?: never;\n routeValues?: never;\n });\n\n/** Chips that choose together: `type` single · multiple, `value`/`defaultValue` + `onValueChange`. */\nexport function ChipGroup({ label, size, className, children, ...props }: ChipGroupProps) {\n const single = props.type === \"single\" ? props : undefined;\n const routed = useRouteBinding(single?.routeKey, single?.routeValues, { value: single?.value, defaultValue: single?.defaultValue, onValueChange: single?.onValueChange });\n const s = chip({ size });\n const context = React.useMemo(() => ({ size }), [size]);\n const common = { \"aria-label\": label, className: s.group({ className }) };\n let group: React.ReactNode;\n if (props.type === \"single\") {\n const { type: _type, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, required, routeKey: _routeKey, routeValues: _routeValues, ...rest } = props;\n group = <SingleGroup {...rest} {...common} value={routed.value} defaultValue={routed.defaultValue} onValueChange={routed.onValueChange} required={required}>{children}</SingleGroup>;\n } else {\n const { type: _type, required: _required, ...rest } = props;\n group = (\n <ToggleGroupPrimitive.Root type=\"multiple\" {...rest} {...common}>\n {children}\n </ToggleGroupPrimitive.Root>\n );\n }\n return <ChipGroupContext.Provider value={context}>{group}</ChipGroupContext.Provider>;\n}\n\n/** Radix's single group, plus `required`: the value is held here so that an empty change can be refused. */\nfunction SingleGroup({\n value,\n defaultValue,\n onValueChange,\n required,\n ...props\n}: Omit<GroupBase, \"size\" | \"label\"> & {\n value?: string;\n defaultValue?: string;\n onValueChange?: (value: string) => void;\n required?: boolean;\n}) {\n const [inner, setInner] = React.useState(defaultValue ?? \"\");\n const current = value ?? inner;\n return (\n <ToggleGroupPrimitive.Root\n type=\"single\"\n value={current}\n onValueChange={(next) => {\n if (required && !next) return;\n if (value === undefined) setInner(next);\n onValueChange?.(next);\n }}\n {...props}\n />\n );\n}\n\n/** `Chip` (selectable, removable) and `Chip.Group` (single · multiple). */\nexport const Chip = Object.assign(ChipBase, { Group: ChipGroup });\n","// The chip's parts and sizes, written once as classes of the Krizaka tokens: the web wears them with `tv(chipRecipe)`,\n// React Native reads the same classes into styles (native/chip.tsx). `data-[state=on]:` is the chosen chip.\nimport { defineRecipe } from \"../recipes/define\";\n\nexport const chipRecipe = defineRecipe({\n slots: {\n group: \"flex flex-wrap items-center gap-2 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch\",\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border font-semibold transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40 \" +\n \"border-border-default bg-surface-1 text-fg-secondary hover:border-border-strong hover:text-fg \" +\n \"data-[state=on]:border-accent data-[state=on]:bg-accent-soft data-[state=on]:text-fg\",\n remove:\n \"-mr-1.5 inline-flex h-6 w-6 items-center justify-center rounded-full text-fg-secondary transition-colors hover:bg-surface-3 hover:text-fg \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n },\n variants: {\n size: { sm: { base: \"h-7 px-3 text-xs\" }, md: { base: \"h-9 px-3.5 text-xs\" } },\n },\n defaultVariants: { size: \"md\" },\n});\n","// Client (a Radix radio group, and `Chip`'s context). The tags of a workspace (krizaka-ts#89, `@krizaka/organize`): a name\n// with a colour marker beside it. The marker is a NAME of the closed palette (`MARKERS`: blue · green · amber · red ·\n// violet · gray), mapped to `--kz-tag-<name>` — a dot (≥ 3:1) or Yomizaka's bookmark ribbon. It sits beside the name and\n// never fills the chip, and the name is always written: the colour is never the only signal.\nimport type { Marker } from \"@krizaka/organize/contract\";\nimport { RadioGroup as RadioPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport { cn } from \"../cn\";\nimport { Chip, type ChipProps } from \"./chip\";\nimport { TAG_MARKERS } from \"./markers\";\n\n/** The six names of the closed palette (`@krizaka/organize` `MARKERS`; a test keeps them equal). */\nexport const MARKERS: readonly Marker[] = TAG_MARKERS;\nexport type { Marker };\n\n/** The marker's shape: a `dot`, or the `ribbon` (a bookmark: a rectangle with a notch at the bottom). */\nexport type MarkerShape = \"dot\" | \"ribbon\";\n\n/** The CSS custom property the marker reads its colour from: `--kz-tag-<name>`. */\nconst markerVar = (marker: Marker) => `var(--kz-tag-${marker})`;\n\nexport type TagMarkerProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n /** A name of the closed palette. */\n marker: Marker;\n /**\n * dot · ribbon.\n * @default \"dot\"\n */\n shape?: MarkerShape;\n};\n\n/** The marker alone, decorative (`aria-hidden`): put the tag's name beside it. */\nexport function TagMarker({ marker, shape = \"dot\", className, style, ...props }: TagMarkerProps) {\n return (\n <span\n aria-hidden\n data-marker={marker}\n data-shape={shape}\n className={cn(\n \"inline-block shrink-0 bg-(--kz-marker) data-[shape=dot]:h-2.5 data-[shape=dot]:w-2.5 data-[shape=dot]:rounded-full\",\n \"data-[shape=ribbon]:h-3.5 data-[shape=ribbon]:w-2.5 data-[shape=ribbon]:[clip-path:polygon(0_0,100%_0,100%_100%,50%_72%,0_100%)]\",\n className,\n )}\n style={{ ...style, [\"--kz-marker\" as string]: markerVar(marker) }}\n {...props}\n />\n );\n}\n\nexport type TagChipProps = ChipProps & {\n /** The tag's marker: a name of the closed palette (`blue · green · amber · red · violet · gray`). */\n marker: Marker;\n /**\n * dot · ribbon.\n * @default \"dot\"\n */\n shape?: MarkerShape;\n};\n\n/**\n * A tag: its marker and its name. Alone a toggle (a filter), inside `Chip.Group` an item, or `removable` (a tag worn by a\n * file) — the behaviour of `Chip`, with the marker before the name.\n */\nexport function TagChip({ marker, shape, children, ...props }: TagChipProps) {\n const content = (\n <>\n <TagMarker marker={marker} shape={shape} />\n {children}\n </>\n );\n return <Chip {...(props as ChipProps)}>{content}</Chip>;\n}\n\nexport type MarkerPickerProps = {\n /** The group's accessible name (\"Colour of the tag\"), passed translated. */\n label: string;\n /** The name of each colour, passed translated: `{ blue: \"Blue\", … }`. The swatches are named, never colour alone. */\n names: Readonly<Record<Marker, string>>;\n /** The colour chosen (controlled). */\n value?: Marker;\n /** The colour chosen at first, uncontrolled. */\n defaultValue?: Marker;\n /** Called with the colour chosen. */\n onValueChange?: (value: Marker) => void;\n /** The colours offered (default: the six). */\n markers?: readonly Marker[];\n /** Not available. */\n disabled?: boolean;\n /** Classes merged on the root. */\n className?: string;\n};\n\n/** Recolours a tag from the closed palette: a radio group of swatches (arrow keys), the chosen one ticked and named. */\nexport function MarkerPicker({ label, names, value, defaultValue, onValueChange, markers = MARKERS, disabled, className }: MarkerPickerProps) {\n return (\n <RadioPrimitive.Root\n aria-label={label}\n value={value}\n defaultValue={defaultValue}\n onValueChange={(next) => onValueChange?.(next as Marker)}\n disabled={disabled}\n orientation=\"horizontal\"\n className={cn(\"flex flex-wrap items-center gap-1.5\", className)}\n >\n {markers.map((marker) => (\n <RadioPrimitive.Item\n key={marker}\n value={marker}\n aria-label={names[marker]}\n title={names[marker]}\n className={cn(\n \"inline-flex h-8 w-8 items-center justify-center rounded-full border border-border-default bg-surface-1 transition-colors\",\n \"hover:border-border-strong focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\",\n \"data-[state=checked]:border-(--kz-marker) data-[state=checked]:bg-surface-2\",\n )}\n style={{ [\"--kz-marker\" as string]: markerVar(marker) }}\n >\n <span aria-hidden className=\"relative inline-flex h-4 w-4 items-center justify-center rounded-full bg-(--kz-marker)\">\n <RadioPrimitive.Indicator forceMount className=\"hidden h-full w-full items-center justify-center data-[state=checked]:flex\">\n {/* The tick is the second signal: a shape, not a colour (it reads in the page's text colour on the swatch's ring). */}\n <svg viewBox=\"0 0 24 24\" className=\"h-3 w-3 text-surface-0\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"4\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </RadioPrimitive.Indicator>\n </span>\n </RadioPrimitive.Item>\n ))}\n </RadioPrimitive.Root>\n );\n}\n","// The six names of the closed palette of tag markers, written once for the platforms that cannot import\n// `@krizaka/organize/contract` (/native adds no dependency). A test keeps them equal to the contract's `MARKERS`.\nexport const TAG_M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
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/switch/switch.tsx
|
|
4
|
+
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
5
|
+
import { tv } from "tailwind-variants";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var switchVariants = tv({
|
|
8
|
+
slots: {
|
|
9
|
+
root: "peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-fg-muted transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 disabled:cursor-not-allowed disabled:opacity-40 data-[state=checked]:bg-accent aria-invalid:border-danger",
|
|
10
|
+
thumb: "pointer-events-none block rounded-full bg-fg-on-media shadow-sm transition-transform data-[state=unchecked]:translate-x-0.5 motion-reduce:transition-none"
|
|
11
|
+
},
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
sm: { root: "h-5 w-9", thumb: "h-4 w-4 data-[state=checked]:translate-x-[1.125rem]" },
|
|
15
|
+
md: { root: "h-6 w-11", thumb: "h-5 w-5 data-[state=checked]:translate-x-[1.375rem]" }
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { size: "md" }
|
|
19
|
+
});
|
|
20
|
+
function Switch({ label, size, invalid, className, ...props }) {
|
|
21
|
+
const s = switchVariants({ size });
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
SwitchPrimitive.Root,
|
|
24
|
+
{
|
|
25
|
+
"aria-label": label,
|
|
26
|
+
"aria-invalid": invalid || void 0,
|
|
27
|
+
"data-invalid": invalid ? "" : void 0,
|
|
28
|
+
className: s.root({ className }),
|
|
29
|
+
...props,
|
|
30
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, { className: s.thumb() })
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export {
|
|
36
|
+
switchVariants,
|
|
37
|
+
Switch
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=chunk-CSRKYZ53.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/switch/switch.tsx"],"sourcesContent":["// Client. Radix Switch: role=\"switch\", aria-checked, Space and Enter toggle, a hidden input inside a form.\nimport { Switch as SwitchPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const switchVariants = tv({\n slots: {\n root:\n \"peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent bg-fg-muted transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-surface-0 \" +\n \"disabled:cursor-not-allowed disabled:opacity-40 data-[state=checked]:bg-accent aria-invalid:border-danger\",\n thumb:\n \"pointer-events-none block rounded-full bg-fg-on-media shadow-sm transition-transform data-[state=unchecked]:translate-x-0.5 motion-reduce:transition-none\",\n },\n variants: {\n size: {\n sm: { root: \"h-5 w-9\", thumb: \"h-4 w-4 data-[state=checked]:translate-x-[1.125rem]\" },\n md: { root: \"h-6 w-11\", thumb: \"h-5 w-5 data-[state=checked]:translate-x-[1.375rem]\" },\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nexport type SwitchVariants = VariantProps<typeof switchVariants>;\n\ntype Named =\n | {\n /** The accessible name — required when no visible label names it, passed translated. */\n label: string;\n }\n /** Named by a visible `<label htmlFor={id}>` (e.g. `Field.Label`). */\n | { label?: undefined; id: string }\n /** Named by another element. */\n | { label?: undefined; \"aria-labelledby\": string };\n\nexport type SwitchProps = Omit<React.ComponentProps<typeof SwitchPrimitive.Root>, \"children\"> &\n SwitchVariants &\n Named & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: SwitchVariants[\"size\"];\n /** Marks it invalid: aria-invalid and data-invalid. */\n invalid?: boolean;\n };\n\n/** An on/off switch: `checked`/`defaultChecked` + `onCheckedChange`. */\nexport function Switch({ label, size, invalid, className, ...props }: SwitchProps) {\n const s = switchVariants({ size });\n return (\n <SwitchPrimitive.Root\n aria-label={label}\n aria-invalid={invalid || undefined}\n data-invalid={invalid ? \"\" : undefined}\n className={s.root({ className })}\n {...props}\n >\n <SwitchPrimitive.Thumb className={s.thumb()} />\n </SwitchPrimitive.Root>\n );\n}\n"],"mappings":";;;AACA,SAAS,UAAU,uBAAuB;AAE1C,SAAS,UAA6B;AAuDhC;AArDC,IAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,MACE;AAAA,IAGF,OACE;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI,EAAE,MAAM,WAAW,OAAO,sDAAsD;AAAA,MACpF,IAAI,EAAE,MAAM,YAAY,OAAO,sDAAsD;AAAA,IACvF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,MAAM,KAAK;AAChC,CAAC;AA2BM,SAAS,OAAO,EAAE,OAAO,MAAM,SAAS,WAAW,GAAG,MAAM,GAAgB;AACjF,QAAM,IAAI,eAAe,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,gBAAgB;AAAA,IAAhB;AAAA,MACC,cAAY;AAAA,MACZ,gBAAc,WAAW;AAAA,MACzB,gBAAc,UAAU,KAAK;AAAA,MAC7B,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC;AAAA,MAC9B,GAAG;AAAA,MAEJ,8BAAC,gBAAgB,OAAhB,EAAsB,WAAW,EAAE,MAAM,GAAG;AAAA;AAAA,EAC/C;AAEJ;","names":[]}
|
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Chip
|
|
4
|
+
} from "./chunk-UYGUSYIC.js";
|
|
5
|
+
import {
|
|
6
|
+
floating
|
|
7
|
+
} from "./chunk-J3NC6ER4.js";
|
|
8
|
+
import {
|
|
9
|
+
cn
|
|
10
|
+
} from "./chunk-NSLXEDIS.js";
|
|
11
|
+
import {
|
|
12
|
+
ChevronGlyph
|
|
13
|
+
} from "./chunk-CPA5CF35.js";
|
|
14
|
+
|
|
15
|
+
// src/filter-bar/filter-bar.tsx
|
|
16
|
+
import { DropdownMenu as MenuPrimitive3 } from "radix-ui";
|
|
17
|
+
import { tv as tv3 } from "tailwind-variants";
|
|
18
|
+
|
|
19
|
+
// src/dropdown-menu/dropdown-menu.tsx
|
|
20
|
+
import { DropdownMenu as MenuPrimitive } from "radix-ui";
|
|
21
|
+
import { tv } from "tailwind-variants";
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
var menu = tv({
|
|
24
|
+
slots: {
|
|
25
|
+
content: cn(floating, "min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto overflow-x-hidden overscroll-contain p-1 origin-(--radix-dropdown-menu-content-transform-origin)"),
|
|
26
|
+
item: "relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 [&>svg]:text-fg-secondary",
|
|
27
|
+
indicator: "ml-auto flex h-4 w-4 items-center justify-center text-fg-accent",
|
|
28
|
+
label: "px-2.5 pb-1 pt-2 text-[11px] font-semibold text-fg-secondary",
|
|
29
|
+
separator: "-mx-1 my-1 h-px bg-border-subtle"
|
|
30
|
+
},
|
|
31
|
+
variants: {
|
|
32
|
+
// The label reads in the danger text role (≥ 4.5:1 on the menu surface, both themes); the icon and the highlight
|
|
33
|
+
// carry the danger fill.
|
|
34
|
+
tone: { default: {}, danger: { item: "text-fg-danger data-highlighted:bg-danger/15 [&>svg]:text-danger" } }
|
|
35
|
+
},
|
|
36
|
+
defaultVariants: { tone: "default" }
|
|
37
|
+
});
|
|
38
|
+
var s = menu();
|
|
39
|
+
function DropdownMenuContent({ sideOffset = 6, align = "end", collisionPadding = 8, container, className, ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { container, children: /* @__PURE__ */ jsx(MenuPrimitive.Content, { sideOffset, align, collisionPadding, className: s.content({ className }), ...props }) });
|
|
41
|
+
}
|
|
42
|
+
function DropdownMenuItem({ tone, className, ...props }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Item, { "data-tone": tone ?? "default", className: menu({ tone }).item({ className }), ...props });
|
|
44
|
+
}
|
|
45
|
+
function DropdownMenuCheckboxItem({ className, children, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsxs(MenuPrimitive.CheckboxItem, { className: s.item({ className }), ...props, children: [
|
|
47
|
+
children,
|
|
48
|
+
/* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { className: s.indicator(), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }) })
|
|
49
|
+
] });
|
|
50
|
+
}
|
|
51
|
+
function DropdownMenuSubTrigger({ className, children, ...props }) {
|
|
52
|
+
return /* @__PURE__ */ jsxs(MenuPrimitive.SubTrigger, { className: s.item({ className: cn("data-[state=open]:bg-surface-3", className) }), ...props, children: [
|
|
53
|
+
children,
|
|
54
|
+
/* @__PURE__ */ jsx("svg", { className: "ml-auto !h-4 !w-4 text-fg-secondary", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }) })
|
|
55
|
+
] });
|
|
56
|
+
}
|
|
57
|
+
function DropdownMenuSubContent({ sideOffset = 4, collisionPadding = 8, className, ...props }) {
|
|
58
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(MenuPrimitive.SubContent, { sideOffset, collisionPadding, className: s.content({ className: cn("max-h-(--radix-dropdown-menu-content-available-height)", className) }), ...props }) });
|
|
59
|
+
}
|
|
60
|
+
function DropdownMenuRadioItem({ className, children, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsxs(MenuPrimitive.RadioItem, { className: s.item({ className }), ...props, children: [
|
|
62
|
+
children,
|
|
63
|
+
/* @__PURE__ */ jsx(MenuPrimitive.ItemIndicator, { className: s.indicator(), children: /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) }) })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
function DropdownMenuLabel({ className, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Label, { className: s.label({ className }), ...props });
|
|
68
|
+
}
|
|
69
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
70
|
+
return /* @__PURE__ */ jsx(MenuPrimitive.Separator, { className: s.separator({ className }), ...props });
|
|
71
|
+
}
|
|
72
|
+
var DropdownMenu = {
|
|
73
|
+
Root: MenuPrimitive.Root,
|
|
74
|
+
Trigger: MenuPrimitive.Trigger,
|
|
75
|
+
Content: DropdownMenuContent,
|
|
76
|
+
Item: DropdownMenuItem,
|
|
77
|
+
CheckboxItem: DropdownMenuCheckboxItem,
|
|
78
|
+
Label: DropdownMenuLabel,
|
|
79
|
+
Separator: DropdownMenuSeparator,
|
|
80
|
+
Group: MenuPrimitive.Group,
|
|
81
|
+
Sub: MenuPrimitive.Sub,
|
|
82
|
+
SubTrigger: DropdownMenuSubTrigger,
|
|
83
|
+
SubContent: DropdownMenuSubContent,
|
|
84
|
+
RadioGroup: MenuPrimitive.RadioGroup,
|
|
85
|
+
RadioItem: DropdownMenuRadioItem
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// src/filter-bar/saved-views.tsx
|
|
89
|
+
import { DropdownMenu as MenuPrimitive2 } from "radix-ui";
|
|
90
|
+
import * as React from "react";
|
|
91
|
+
|
|
92
|
+
// src/chip-link/chip-link.tsx
|
|
93
|
+
import { Slot } from "radix-ui";
|
|
94
|
+
import { tv as tv2 } from "tailwind-variants";
|
|
95
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
96
|
+
var chipVariants = tv2({
|
|
97
|
+
base: "inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border font-semibold no-underline transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
98
|
+
variants: {
|
|
99
|
+
size: { sm: "h-7 px-3 text-xs", md: "h-9 px-3.5 text-xs" },
|
|
100
|
+
selected: {
|
|
101
|
+
false: "border-border-default bg-surface-1 text-fg-secondary hover:border-border-strong hover:text-fg",
|
|
102
|
+
true: "border-accent bg-accent-soft text-fg"
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
defaultVariants: { size: "md", selected: false }
|
|
106
|
+
});
|
|
107
|
+
function ChipLink({ size, selected = false, current = "page", asChild, className, ...props }) {
|
|
108
|
+
const Comp = asChild ? Slot.Root : "a";
|
|
109
|
+
return /* @__PURE__ */ jsx2(
|
|
110
|
+
Comp,
|
|
111
|
+
{
|
|
112
|
+
"data-state": selected ? "on" : "off",
|
|
113
|
+
"aria-current": selected ? current : void 0,
|
|
114
|
+
className: chipVariants({ size, selected, className }),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// src/filter-bar/saved-views.tsx
|
|
121
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
122
|
+
var GROUPS = ["system", "workspace", "mine"];
|
|
123
|
+
var savedViewsLabels = {
|
|
124
|
+
views: "Views",
|
|
125
|
+
groups: { system: "Standard views", workspace: "Shared views", mine: "My views" },
|
|
126
|
+
menu: (current) => `View: ${current}`,
|
|
127
|
+
none: "All",
|
|
128
|
+
modified: "modified",
|
|
129
|
+
save: "Save view",
|
|
130
|
+
name: "Name of the view",
|
|
131
|
+
confirm: "Save",
|
|
132
|
+
cancel: "Cancel",
|
|
133
|
+
rename: "Rename",
|
|
134
|
+
remove: "Delete",
|
|
135
|
+
actions: (label) => `Actions for the view ${label}`
|
|
136
|
+
};
|
|
137
|
+
var field = "h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";
|
|
138
|
+
var quiet = "inline-flex h-9 items-center gap-1.5 rounded-md px-2.5 text-xs font-semibold text-fg-accent hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40";
|
|
139
|
+
function NameForm({
|
|
140
|
+
label,
|
|
141
|
+
initial = "",
|
|
142
|
+
confirm,
|
|
143
|
+
cancel,
|
|
144
|
+
maxLength,
|
|
145
|
+
onSubmit,
|
|
146
|
+
onCancel
|
|
147
|
+
}) {
|
|
148
|
+
const [name, setName] = React.useState(initial);
|
|
149
|
+
const clean = name.replace(/\s+/g, " ").trim();
|
|
150
|
+
const submit = () => {
|
|
151
|
+
if (clean) onSubmit(clean);
|
|
152
|
+
};
|
|
153
|
+
return /* @__PURE__ */ jsxs2(
|
|
154
|
+
"form",
|
|
155
|
+
{
|
|
156
|
+
className: "flex flex-wrap items-center gap-2",
|
|
157
|
+
onSubmit: (event) => {
|
|
158
|
+
event.preventDefault();
|
|
159
|
+
submit();
|
|
160
|
+
},
|
|
161
|
+
children: [
|
|
162
|
+
/* @__PURE__ */ jsx3(
|
|
163
|
+
"input",
|
|
164
|
+
{
|
|
165
|
+
autoFocus: true,
|
|
166
|
+
type: "text",
|
|
167
|
+
"aria-label": label,
|
|
168
|
+
value: name,
|
|
169
|
+
maxLength,
|
|
170
|
+
onChange: (event) => setName(event.target.value),
|
|
171
|
+
onKeyDown: (event) => {
|
|
172
|
+
if (event.key === "Escape") {
|
|
173
|
+
event.stopPropagation();
|
|
174
|
+
onCancel();
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
className: field
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
/* @__PURE__ */ jsx3("button", { type: "submit", disabled: !clean, className: "inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg disabled:opacity-40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring", children: confirm }),
|
|
181
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: onCancel, className: quiet, children: cancel })
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
var Count = ({ n }) => n === void 0 ? null : /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
187
|
+
" ",
|
|
188
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": true, children: "\xB7" }),
|
|
189
|
+
" ",
|
|
190
|
+
/* @__PURE__ */ jsx3("span", { className: "tabular-nums text-fg-secondary", children: n })
|
|
191
|
+
] });
|
|
192
|
+
function SavedViews({ views, current, modified, onSelect, onSave, onRename, onDelete, linkAs, maxLength = 80, labels: given, className }) {
|
|
193
|
+
const labels = { ...savedViewsLabels, ...given, groups: { ...savedViewsLabels.groups, ...given?.groups } };
|
|
194
|
+
const [saving, setSaving] = React.useState(false);
|
|
195
|
+
const [renaming, setRenaming] = React.useState(null);
|
|
196
|
+
const Link = linkAs ?? "a";
|
|
197
|
+
const active = views.find((v) => v.id === current);
|
|
198
|
+
const editable = (view) => Boolean(view && (view.editable ?? view.group === "mine"));
|
|
199
|
+
const canChange = editable(active);
|
|
200
|
+
const showSave = Boolean(onSave && modified);
|
|
201
|
+
const grouped = GROUPS.map((group) => ({ group, items: views.filter((v) => v.group === group) })).filter((g) => g.items.length > 0);
|
|
202
|
+
const renamed = views.find((v) => v.id === renaming);
|
|
203
|
+
const form = saving ? /* @__PURE__ */ jsx3(
|
|
204
|
+
NameForm,
|
|
205
|
+
{
|
|
206
|
+
label: labels.name,
|
|
207
|
+
confirm: labels.confirm,
|
|
208
|
+
cancel: labels.cancel,
|
|
209
|
+
maxLength,
|
|
210
|
+
onCancel: () => setSaving(false),
|
|
211
|
+
onSubmit: (name) => {
|
|
212
|
+
setSaving(false);
|
|
213
|
+
onSave?.(name);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
) : renamed ? /* @__PURE__ */ jsx3(
|
|
217
|
+
NameForm,
|
|
218
|
+
{
|
|
219
|
+
label: labels.name,
|
|
220
|
+
initial: renamed.label,
|
|
221
|
+
confirm: labels.confirm,
|
|
222
|
+
cancel: labels.cancel,
|
|
223
|
+
maxLength,
|
|
224
|
+
onCancel: () => setRenaming(null),
|
|
225
|
+
onSubmit: (name) => {
|
|
226
|
+
setRenaming(null);
|
|
227
|
+
onRename?.(renamed.id, name);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
) : null;
|
|
231
|
+
const actions = canChange && active && (onRename || onDelete) ? /* @__PURE__ */ jsxs2(DropdownMenu.Root, { modal: false, children: [
|
|
232
|
+
/* @__PURE__ */ jsx3(DropdownMenu.Trigger, { "aria-label": labels.actions(active.label), className: cn(quiet, "px-2 text-fg-secondary"), children: /* @__PURE__ */ jsxs2("svg", { viewBox: "0 0 24 24", className: "h-4 w-4", fill: "currentColor", "aria-hidden": true, children: [
|
|
233
|
+
/* @__PURE__ */ jsx3("circle", { cx: "5", cy: "12", r: "1.8" }),
|
|
234
|
+
/* @__PURE__ */ jsx3("circle", { cx: "12", cy: "12", r: "1.8" }),
|
|
235
|
+
/* @__PURE__ */ jsx3("circle", { cx: "19", cy: "12", r: "1.8" })
|
|
236
|
+
] }) }),
|
|
237
|
+
/* @__PURE__ */ jsxs2(DropdownMenu.Content, { align: "start", "aria-label": labels.actions(active.label), children: [
|
|
238
|
+
onRename ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { onSelect: () => setRenaming(active.id), children: labels.rename }) : null,
|
|
239
|
+
onDelete ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { tone: "danger", onSelect: () => onDelete(active.id), children: labels.remove }) : null
|
|
240
|
+
] })
|
|
241
|
+
] }) : null;
|
|
242
|
+
const mark = modified && active ? /* @__PURE__ */ jsxs2("span", { className: "text-xs font-semibold text-fg-secondary", children: [
|
|
243
|
+
"(",
|
|
244
|
+
labels.modified,
|
|
245
|
+
")"
|
|
246
|
+
] }) : null;
|
|
247
|
+
const saveButton = showSave && !saving ? /* @__PURE__ */ jsx3("button", { type: "button", onClick: () => setSaving(true), className: quiet, children: labels.save }) : null;
|
|
248
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
249
|
+
/* @__PURE__ */ jsxs2("div", { role: "group", "aria-label": labels.views, className: "flex flex-wrap items-center gap-x-3 gap-y-2 max-md:hidden", children: [
|
|
250
|
+
grouped.map(({ group, items }, index) => /* @__PURE__ */ jsxs2(React.Fragment, { children: [
|
|
251
|
+
index > 0 ? /* @__PURE__ */ jsx3("span", { "aria-hidden": true, className: "h-5 w-px bg-border-default" }) : null,
|
|
252
|
+
items.some((v) => v.href) ? /* @__PURE__ */ jsx3("nav", { "aria-label": labels.groups[group], className: "flex flex-wrap items-center gap-2", children: items.map((view) => /* @__PURE__ */ jsx3(ChipLink, { asChild: true, size: "sm", selected: view.id === current, children: /* @__PURE__ */ jsxs2(Link, { href: view.href ?? "#", onClick: () => onSelect?.(view.id), children: [
|
|
253
|
+
view.label,
|
|
254
|
+
/* @__PURE__ */ jsx3(Count, { n: view.count })
|
|
255
|
+
] }) }, view.id)) }) : /* @__PURE__ */ jsx3(
|
|
256
|
+
Chip.Group,
|
|
257
|
+
{
|
|
258
|
+
type: "single",
|
|
259
|
+
size: "sm",
|
|
260
|
+
label: labels.groups[group],
|
|
261
|
+
value: items.some((v) => v.id === current) ? current ?? "" : "",
|
|
262
|
+
onValueChange: (id) => id && onSelect?.(id),
|
|
263
|
+
children: items.map((view) => /* @__PURE__ */ jsxs2(Chip, { value: view.id, children: [
|
|
264
|
+
view.label,
|
|
265
|
+
/* @__PURE__ */ jsx3(Count, { n: view.count })
|
|
266
|
+
] }, view.id))
|
|
267
|
+
}
|
|
268
|
+
)
|
|
269
|
+
] }, group)),
|
|
270
|
+
mark,
|
|
271
|
+
actions,
|
|
272
|
+
saveButton
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-wrap items-center gap-2 md:hidden", children: /* @__PURE__ */ jsxs2(MenuPrimitive2.Root, { modal: false, children: [
|
|
275
|
+
/* @__PURE__ */ jsxs2(MenuPrimitive2.Trigger, { className: "inline-flex h-11 min-w-0 items-center gap-2 rounded-lg border border-border-control bg-surface-1 px-3.5 text-sm font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring", children: [
|
|
276
|
+
/* @__PURE__ */ jsx3("span", { className: "truncate", children: labels.menu(active?.label ?? labels.none) }),
|
|
277
|
+
mark,
|
|
278
|
+
/* @__PURE__ */ jsx3(ChevronGlyph, { className: "h-4 w-4 shrink-0" })
|
|
279
|
+
] }),
|
|
280
|
+
/* @__PURE__ */ jsxs2(DropdownMenu.Content, { align: "start", children: [
|
|
281
|
+
grouped.map(({ group, items }, index) => /* @__PURE__ */ jsxs2(React.Fragment, { children: [
|
|
282
|
+
index > 0 ? /* @__PURE__ */ jsx3(DropdownMenu.Separator, {}) : null,
|
|
283
|
+
/* @__PURE__ */ jsx3(DropdownMenu.Label, { children: labels.groups[group] }),
|
|
284
|
+
/* @__PURE__ */ jsx3(MenuPrimitive2.RadioGroup, { value: items.some((v) => v.id === current) ? current ?? "" : "", children: items.map(
|
|
285
|
+
(view) => view.href ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { asChild: true, children: /* @__PURE__ */ jsxs2(Link, { href: view.href, "aria-current": view.id === current ? "page" : void 0, onClick: () => onSelect?.(view.id), children: [
|
|
286
|
+
view.label,
|
|
287
|
+
/* @__PURE__ */ jsx3(Count, { n: view.count })
|
|
288
|
+
] }) }, view.id) : /* @__PURE__ */ jsxs2(DropdownMenu.RadioItem, { value: view.id, onSelect: () => onSelect?.(view.id), children: [
|
|
289
|
+
view.label,
|
|
290
|
+
/* @__PURE__ */ jsx3(Count, { n: view.count })
|
|
291
|
+
] }, view.id)
|
|
292
|
+
) })
|
|
293
|
+
] }, group)),
|
|
294
|
+
(showSave || canChange && (onRename || onDelete)) && /* @__PURE__ */ jsx3(DropdownMenu.Separator, {}),
|
|
295
|
+
showSave ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { onSelect: () => setSaving(true), children: labels.save }) : null,
|
|
296
|
+
canChange && active && onRename ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { onSelect: () => setRenaming(active.id), children: labels.rename }) : null,
|
|
297
|
+
canChange && active && onDelete ? /* @__PURE__ */ jsx3(DropdownMenu.Item, { tone: "danger", onSelect: () => onDelete(active.id), children: labels.remove }) : null
|
|
298
|
+
] })
|
|
299
|
+
] }) }),
|
|
300
|
+
form
|
|
301
|
+
] });
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
// src/filter-bar/filter-bar.tsx
|
|
305
|
+
import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
306
|
+
var filterBar = tv3({
|
|
307
|
+
slots: {
|
|
308
|
+
root: "flex w-full flex-col gap-3",
|
|
309
|
+
controls: "flex w-full flex-wrap items-center gap-2 [&>*]:min-w-0",
|
|
310
|
+
active: "flex flex-wrap items-center gap-2",
|
|
311
|
+
clear: "rounded-md px-2 py-1 text-xs font-semibold text-fg-accent hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
312
|
+
results: "ml-auto text-xs text-fg-secondary tabular-nums",
|
|
313
|
+
trigger: "inline-flex h-11 shrink-0 items-center gap-2 rounded-lg border border-border-default bg-surface-1 px-3.5 text-sm font-semibold text-fg-secondary transition-colors hover:border-border-strong hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring data-[active]:border-accent data-[active]:bg-accent-soft data-[active]:text-fg data-[state=open]:border-border-strong",
|
|
314
|
+
count: "inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-accent px-1.5 text-[11px] font-bold tabular-nums text-on-accent",
|
|
315
|
+
optionCount: "ml-auto pl-4 text-xs tabular-nums text-fg-secondary"
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
function FilterBar({
|
|
319
|
+
label,
|
|
320
|
+
children,
|
|
321
|
+
active = [],
|
|
322
|
+
onClearAll,
|
|
323
|
+
clearLabel = "Clear filters",
|
|
324
|
+
removeLabel = (text) => `Remove ${text}`,
|
|
325
|
+
results,
|
|
326
|
+
views,
|
|
327
|
+
className,
|
|
328
|
+
...props
|
|
329
|
+
}) {
|
|
330
|
+
const s2 = filterBar();
|
|
331
|
+
return /* @__PURE__ */ jsxs3("div", { role: "group", "aria-label": label, className: s2.root({ className }), ...props, children: [
|
|
332
|
+
views ? /* @__PURE__ */ jsx4(SavedViews, { ...views }) : null,
|
|
333
|
+
children ? /* @__PURE__ */ jsx4("div", { className: s2.controls(), children }) : null,
|
|
334
|
+
active.length > 0 || results !== void 0 ? /* @__PURE__ */ jsxs3("div", { className: s2.active(), children: [
|
|
335
|
+
active.map((filter) => /* @__PURE__ */ jsx4(Chip, { size: "sm", removable: true, removeLabel: removeLabel(filter.label), onRemove: filter.onRemove, children: filter.label }, filter.id)),
|
|
336
|
+
active.length > 0 && onClearAll ? /* @__PURE__ */ jsx4("button", { type: "button", className: s2.clear(), onClick: onClearAll, children: clearLabel }) : null,
|
|
337
|
+
/* @__PURE__ */ jsx4("p", { className: s2.results(), "aria-live": "polite", "aria-atomic": true, children: results })
|
|
338
|
+
] }) : null
|
|
339
|
+
] });
|
|
340
|
+
}
|
|
341
|
+
function FilterMenu(props) {
|
|
342
|
+
const { label, options, defaultOpen, className } = props;
|
|
343
|
+
const s2 = filterBar();
|
|
344
|
+
const m = menu();
|
|
345
|
+
const chosen = props.multiple === false ? props.value ? [props.value] : [] : props.value;
|
|
346
|
+
const single = props.multiple === false ? options.find((o) => o.value === props.value) : void 0;
|
|
347
|
+
const content = (option) => /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
348
|
+
option.label,
|
|
349
|
+
option.count !== void 0 ? /* @__PURE__ */ jsx4("span", { className: s2.optionCount(), children: option.count }) : null
|
|
350
|
+
] });
|
|
351
|
+
return /* @__PURE__ */ jsxs3(DropdownMenu.Root, { defaultOpen, modal: false, children: [
|
|
352
|
+
/* @__PURE__ */ jsxs3(DropdownMenu.Trigger, { className: s2.trigger({ className }), "data-active": chosen.length > 0 ? "" : void 0, children: [
|
|
353
|
+
single ? `${label}: ${single.label}` : label,
|
|
354
|
+
props.multiple !== false && chosen.length > 0 ? /* @__PURE__ */ jsx4("span", { className: s2.count(), children: chosen.length }) : null,
|
|
355
|
+
/* @__PURE__ */ jsx4(ChevronGlyph, { className: "h-4 w-4" })
|
|
356
|
+
] }),
|
|
357
|
+
/* @__PURE__ */ jsx4(DropdownMenu.Content, { align: "start", "aria-label": label, children: props.multiple === false ? /* @__PURE__ */ jsx4(MenuPrimitive3.RadioGroup, { value: props.value, onValueChange: props.onValueChange, children: options.map((option) => /* @__PURE__ */ jsxs3(MenuPrimitive3.RadioItem, { value: option.value, disabled: option.disabled, className: m.item(), children: [
|
|
358
|
+
/* @__PURE__ */ jsx4("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border-strong", children: /* @__PURE__ */ jsx4(MenuPrimitive3.ItemIndicator, { className: "h-2 w-2 rounded-full bg-accent" }) }),
|
|
359
|
+
content(option)
|
|
360
|
+
] }, option.value)) }) : options.map((option) => /* @__PURE__ */ jsx4(
|
|
361
|
+
DropdownMenu.CheckboxItem,
|
|
362
|
+
{
|
|
363
|
+
disabled: option.disabled,
|
|
364
|
+
checked: props.value.includes(option.value),
|
|
365
|
+
onSelect: (event) => event.preventDefault(),
|
|
366
|
+
onCheckedChange: (checked) => props.onValueChange(checked ? [...props.value, option.value] : props.value.filter((v) => v !== option.value)),
|
|
367
|
+
children: content(option)
|
|
368
|
+
},
|
|
369
|
+
option.value
|
|
370
|
+
)) })
|
|
371
|
+
] });
|
|
372
|
+
}
|
|
373
|
+
function readFilterParams(params, keys) {
|
|
374
|
+
return Object.fromEntries(
|
|
375
|
+
keys.map((key) => [key, params.getAll(key).flatMap((v) => v.split(",")).map((v) => v.trim()).filter(Boolean)])
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
function writeFilterParams(base, filters, resetKey = "page") {
|
|
379
|
+
const next = new URLSearchParams(base);
|
|
380
|
+
for (const [key, value] of Object.entries(filters)) {
|
|
381
|
+
const list = value == null ? [] : typeof value === "string" ? [value] : [...value];
|
|
382
|
+
if (list.filter(Boolean).length === 0) next.delete(key);
|
|
383
|
+
else next.set(key, list.filter(Boolean).join(","));
|
|
384
|
+
}
|
|
385
|
+
if (resetKey) next.delete(resetKey);
|
|
386
|
+
return next;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
export {
|
|
390
|
+
DropdownMenu,
|
|
391
|
+
savedViewsLabels,
|
|
392
|
+
SavedViews,
|
|
393
|
+
filterBar,
|
|
394
|
+
FilterBar,
|
|
395
|
+
FilterMenu,
|
|
396
|
+
readFilterParams,
|
|
397
|
+
writeFilterParams
|
|
398
|
+
};
|
|
399
|
+
//# sourceMappingURL=chunk-F6JTHPHE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/filter-bar/filter-bar.tsx","../src/dropdown-menu/dropdown-menu.tsx","../src/filter-bar/saved-views.tsx","../src/chip-link/chip-link.tsx"],"sourcesContent":["// Client (menus in a portal). The bar above a list: the controls that narrow it (a SearchField, FilterMenus, a\n// DateRangePicker — any child), the filters in force as removable chips, \"Clear all\", and the count of results in a\n// polite live region. It holds no state: the app keeps the filters — in the address, ideally — and the\n// `readFilterParams` / `writeFilterParams` helpers move them between a `URLSearchParams` and an object.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { Chip } from \"../chip\";\nimport { DropdownMenu, menu } from \"../dropdown-menu\";\nimport { ChevronGlyph } from \"../glyphs\";\nimport { SavedViews, type SavedViewsProps } from \"./saved-views\";\n\nexport const filterBar = tv({\n slots: {\n root: \"flex w-full flex-col gap-3\",\n controls: \"flex w-full flex-wrap items-center gap-2 [&>*]:min-w-0\",\n active: \"flex flex-wrap items-center gap-2\",\n clear:\n \"rounded-md px-2 py-1 text-xs font-semibold text-fg-accent hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n results: \"ml-auto text-xs text-fg-secondary tabular-nums\",\n trigger:\n \"inline-flex h-11 shrink-0 items-center gap-2 rounded-lg border border-border-default bg-surface-1 px-3.5 text-sm font-semibold text-fg-secondary \" +\n \"transition-colors hover:border-border-strong hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring \" +\n \"data-[active]:border-accent data-[active]:bg-accent-soft data-[active]:text-fg data-[state=open]:border-border-strong\",\n count: \"inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-accent px-1.5 text-[11px] font-bold tabular-nums text-on-accent\",\n optionCount: \"ml-auto pl-4 text-xs tabular-nums text-fg-secondary\",\n },\n});\n\nexport type ActiveFilter = {\n /** A stable key (`\"status:failed\"`). */\n id: string;\n /** What the chip says, passed translated (\"Status: Failed\"). */\n label: string;\n /** Removes this filter. */\n onRemove: () => void;\n};\n\nexport type FilterBarProps = Omit<React.ComponentProps<\"div\">, \"children\" | \"results\"> & {\n /** The accessible name of the bar (\"Filter jobs\"), passed translated. */\n label: string;\n /** The controls: `SearchField`, `FilterMenu`, `DateRangePicker`, a `Chip.Group`… */\n children?: React.ReactNode;\n /** The filters in force, each a removable chip. */\n active?: readonly ActiveFilter[];\n /** Clears every filter; the \"Clear all\" button shows when there is at least one. */\n onClearAll?: () => void;\n /** The \"Clear all\" button (\"Clear filters\"), passed translated. */\n clearLabel?: string;\n /** A chip's remove button: `(label) => \"Remove \" + label`, passed translated. */\n removeLabel?: (label: string) => string;\n /** The count of results (\"42 jobs\"), announced politely when it changes. */\n results?: string;\n /** The saved views of the list, above the controls: chips with counts, a menu on a phone (`SavedViews`). */\n views?: SavedViewsProps;\n};\n\n/** The bar of filters above a list: controls, active filters as chips, clear all, the count of results. */\nexport function FilterBar({\n label,\n children,\n active = [],\n onClearAll,\n clearLabel = \"Clear filters\",\n removeLabel = (text) => `Remove ${text}`,\n results,\n views,\n className,\n ...props\n}: FilterBarProps) {\n const s = filterBar();\n return (\n <div role=\"group\" aria-label={label} className={s.root({ className })} {...props}>\n {views ? <SavedViews {...views} /> : null}\n {children ? <div className={s.controls()}>{children}</div> : null}\n {active.length > 0 || results !== undefined ? (\n <div className={s.active()}>\n {active.map((filter) => (\n <Chip key={filter.id} size=\"sm\" removable removeLabel={removeLabel(filter.label)} onRemove={filter.onRemove}>\n {filter.label}\n </Chip>\n ))}\n {active.length > 0 && onClearAll ? (\n <button type=\"button\" className={s.clear()} onClick={onClearAll}>\n {clearLabel}\n </button>\n ) : null}\n <p className={s.results()} aria-live=\"polite\" aria-atomic>\n {results}\n </p>\n </div>\n ) : null}\n </div>\n );\n}\n\nexport type FilterOption = {\n /** What the app stores (and puts in the address). */\n value: string;\n /** What the person reads, passed translated. */\n label: string;\n /** How many results it would give: shown on the right. */\n count?: number;\n /** Shown but not choosable. */\n disabled?: boolean;\n};\n\ntype FilterMenuBase = {\n /** The name of the filter on its button (\"Status\"), passed translated. */\n label: string;\n /** The choices. */\n options: readonly FilterOption[];\n /** Opens the menu at first (a story, a test). */\n defaultOpen?: boolean;\n /** Classes merged on the button. */\n className?: string;\n};\n\nexport type FilterMenuProps =\n | (FilterMenuBase & {\n /** Several values (checkboxes, default) or one (radios). */\n multiple?: true;\n /** The values chosen. */\n value: readonly string[];\n /** Called with the values chosen. */\n onValueChange: (value: string[]) => void;\n })\n | (FilterMenuBase & {\n /** One value: the options are radios. */\n multiple: false;\n /** The value chosen, `\"\"` for none. */\n value: string;\n /** Called with the value chosen. */\n onValueChange: (value: string) => void;\n });\n\n/** A filter's button and its menu of options — checkboxes (several values) or radios (one) — with a count of chosen ones. */\nexport function FilterMenu(props: FilterMenuProps) {\n const { label, options, defaultOpen, className } = props;\n const s = filterBar();\n const m = menu();\n const chosen = props.multiple === false ? (props.value ? [props.value] : []) : props.value;\n const single = props.multiple === false ? options.find((o) => o.value === props.value) : undefined;\n const content = (option: FilterOption) => (\n <>\n {option.label}\n {option.count !== undefined ? <span className={s.optionCount()}>{option.count}</span> : null}\n </>\n );\n return (\n <DropdownMenu.Root defaultOpen={defaultOpen} modal={false}>\n <DropdownMenu.Trigger className={s.trigger({ className })} data-active={chosen.length > 0 ? \"\" : undefined}>\n {single ? `${label}: ${single.label}` : label}\n {props.multiple !== false && chosen.length > 0 ? <span className={s.count()}>{chosen.length}</span> : null}\n <ChevronGlyph className=\"h-4 w-4\" />\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"start\" aria-label={label}>\n {props.multiple === false ? (\n <MenuPrimitive.RadioGroup value={props.value} onValueChange={props.onValueChange}>\n {options.map((option) => (\n <MenuPrimitive.RadioItem key={option.value} value={option.value} disabled={option.disabled} className={m.item()}>\n <span className=\"flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-border-strong\">\n <MenuPrimitive.ItemIndicator className=\"h-2 w-2 rounded-full bg-accent\" />\n </span>\n {content(option)}\n </MenuPrimitive.RadioItem>\n ))}\n </MenuPrimitive.RadioGroup>\n ) : (\n options.map((option) => (\n <DropdownMenu.CheckboxItem\n key={option.value}\n disabled={option.disabled}\n checked={props.value.includes(option.value)}\n onSelect={(event) => event.preventDefault()}\n onCheckedChange={(checked) =>\n props.onValueChange(checked ? [...props.value, option.value] : props.value.filter((v) => v !== option.value))\n }\n >\n {content(option)}\n </DropdownMenu.CheckboxItem>\n ))\n )}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n );\n}\n\n/** Filters read from an address: `{ status: [\"failed\", \"running\"], q: [\"cat\"] }` for the keys asked (repeated or comma-separated values). */\nexport function readFilterParams(params: URLSearchParams, keys: readonly string[]): Record<string, string[]> {\n return Object.fromEntries(\n keys.map((key) => [key, params.getAll(key).flatMap((v) => v.split(\",\")).map((v) => v.trim()).filter(Boolean)]),\n );\n}\n\n/** Filters written into an address (a copy of `base`): empty filters removed, several values comma-separated, the page reset. */\nexport function writeFilterParams(base: URLSearchParams, filters: Record<string, string | readonly string[] | null | undefined>, resetKey = \"page\") {\n const next = new URLSearchParams(base);\n for (const [key, value] of Object.entries(filters)) {\n const list = value == null ? [] : typeof value === \"string\" ? [value] : [...value];\n if (list.filter(Boolean).length === 0) next.delete(key);\n else next.set(key, list.filter(Boolean).join(\",\"));\n }\n if (resetKey) next.delete(resetKey);\n return next;\n}\n","// Client (a portal). Radix does the roving focus, the arrows, Home/End, typeahead, Escape and the focus return.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nimport { cn } from \"../cn\";\nimport { floating } from \"../floating\";\n\nexport const menu = tv({\n slots: {\n content: cn(floating, \"min-w-48 max-h-(--radix-dropdown-menu-content-available-height) overflow-y-auto overflow-x-hidden overscroll-contain p-1 origin-(--radix-dropdown-menu-content-transform-origin)\"),\n item:\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2.5 py-2 text-sm text-fg outline-hidden transition-colors \" +\n \"data-highlighted:bg-surface-3 data-disabled:pointer-events-none data-disabled:opacity-40 [&>svg]:h-4 [&>svg]:w-4 [&>svg]:shrink-0 \" +\n \"[&>svg]:text-fg-secondary\",\n indicator: \"ml-auto flex h-4 w-4 items-center justify-center text-fg-accent\",\n label: \"px-2.5 pb-1 pt-2 text-[11px] font-semibold text-fg-secondary\",\n separator: \"-mx-1 my-1 h-px bg-border-subtle\",\n },\n variants: {\n // The label reads in the danger text role (≥ 4.5:1 on the menu surface, both themes); the icon and the highlight\n // carry the danger fill.\n tone: { default: {}, danger: { item: \"text-fg-danger data-highlighted:bg-danger/15 [&>svg]:text-danger\" } },\n },\n defaultVariants: { tone: \"default\" },\n});\nconst s = menu();\n\nexport type DropdownMenuContentProps = React.ComponentProps<typeof MenuPrimitive.Content> & {\n /** The element the portal renders into (default: document.body). */\n container?: HTMLElement | null;\n};\n\nexport function DropdownMenuContent({ sideOffset = 6, align = \"end\", collisionPadding = 8, container, className, ...props }: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal container={container}>\n <MenuPrimitive.Content sideOffset={sideOffset} align={align} collisionPadding={collisionPadding} className={s.content({ className })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\nexport type DropdownMenuItemProps = React.ComponentProps<typeof MenuPrimitive.Item> & {\n /** `danger` for a destructive action: the icon and the highlight carry the danger, the label stays legible. */\n tone?: \"default\" | \"danger\";\n};\n\n/** An action. `tone=\"danger\"` for a destructive one; `onSelect` runs it (the menu closes). */\nexport function DropdownMenuItem({ tone, className, ...props }: DropdownMenuItemProps) {\n return <MenuPrimitive.Item data-tone={tone ?? \"default\"} className={menu({ tone }).item({ className })} {...props} />;\n}\n\n/** A toggled option: `checked` + `onCheckedChange`. */\nexport function DropdownMenuCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.CheckboxItem>) {\n return (\n <MenuPrimitive.CheckboxItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.CheckboxItem>\n );\n}\n\n/** A submenu's trigger: an item that opens `DropdownMenu.SubContent`, with a chevron. */\nexport function DropdownMenuSubTrigger({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.SubTrigger>) {\n return (\n <MenuPrimitive.SubTrigger className={s.item({ className: cn(\"data-[state=open]:bg-surface-3\", className) })} {...props}>\n {children}\n <svg className=\"ml-auto !h-4 !w-4 text-fg-secondary\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"m9 18 6-6-6-6\" />\n </svg>\n </MenuPrimitive.SubTrigger>\n );\n}\n\n/** The submenu's panel (same material as the menu). */\nexport function DropdownMenuSubContent({ sideOffset = 4, collisionPadding = 8, className, ...props }: React.ComponentProps<typeof MenuPrimitive.SubContent>) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.SubContent sideOffset={sideOffset} collisionPadding={collisionPadding} className={s.content({ className: cn(\"max-h-(--radix-dropdown-menu-content-available-height)\", className) })} {...props} />\n </MenuPrimitive.Portal>\n );\n}\n\n/** One choice among several (`DropdownMenu.RadioGroup` holds the value): a language, a sort order. */\nexport function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof MenuPrimitive.RadioItem>) {\n return (\n <MenuPrimitive.RadioItem className={s.item({ className })} {...props}>\n {children}\n <MenuPrimitive.ItemIndicator className={s.indicator()}>\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden>\n <path d=\"M20 6 9 17l-5-5\" />\n </svg>\n </MenuPrimitive.ItemIndicator>\n </MenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Label>) {\n return <MenuPrimitive.Label className={s.label({ className })} {...props} />;\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof MenuPrimitive.Separator>) {\n return <MenuPrimitive.Separator className={s.separator({ className })} {...props} />;\n}\n\n/** `DropdownMenu.Root/Trigger/Content/Item/CheckboxItem/Label/Separator/Group`. `open`/`defaultOpen` + `onOpenChange`. */\nexport const DropdownMenu = {\n Root: MenuPrimitive.Root,\n Trigger: MenuPrimitive.Trigger,\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n CheckboxItem: DropdownMenuCheckboxItem,\n Label: DropdownMenuLabel,\n Separator: DropdownMenuSeparator,\n Group: MenuPrimitive.Group,\n Sub: MenuPrimitive.Sub,\n SubTrigger: DropdownMenuSubTrigger,\n SubContent: DropdownMenuSubContent,\n RadioGroup: MenuPrimitive.RadioGroup,\n RadioItem: DropdownMenuRadioItem,\n};\n","// Client (a menu in a portal). The views of a list, in the bar above it (krizaka-ts#89: `system` — the admin's —, `workspace`\n// — shared —, `mine`, in that order): a row of chips with their counts, a « modified » mark on the one that no longer\n// matches its filters, « Save view », and rename / delete for the views the person may change. On a phone the same views are\n// ONE menu (« View: To decide ▾ »). It holds no filters: the host keeps them in the address (`parseView` / `viewSearch` of\n// `@krizaka/organize/contract`, `sameFilters` for `modified`), so a view is a link when `href` is given.\nimport { DropdownMenu as MenuPrimitive } from \"radix-ui\";\nimport * as React from \"react\";\n\nimport type { LinkComponent } from \"../block-link\";\nimport { Chip } from \"../chip\";\nimport { ChipLink } from \"../chip-link\";\nimport { cn } from \"../cn\";\nimport { DropdownMenu } from \"../dropdown-menu\";\nimport { ChevronGlyph } from \"../glyphs\";\n\n/** Who the view belongs to: the admin's (`system`), the workspace's (`workspace`, shared) or the person's (`mine`). */\nexport type ViewGroup = \"system\" | \"workspace\" | \"mine\";\nconst GROUPS: readonly ViewGroup[] = [\"system\", \"workspace\", \"mine\"];\n\nexport type SavedViewItem = {\n /** A saved view's id, or a system view's key. */\n id: string;\n /** Its name, passed translated. */\n label: string;\n group: ViewGroup;\n /** How many results it gives: shown after the name. */\n count?: number;\n /** Where it leads (`/clients?view=to-follow`): the view is then a link, the address being the state. */\n href?: string;\n /** Whether the person may rename and delete it (default: only `mine`). */\n editable?: boolean;\n};\n\nexport type SavedViewsLabels = {\n /** The bar's accessible name (\"Views\"). */\n views: string;\n /** The name of each group of views. */\n groups: Record<ViewGroup, string>;\n /** The phone's menu button: `(current) => \"View: \" + current` (`current` is \"All\" when none). */\n menu: (current: string) => string;\n /** What the phone's menu button says when no view is chosen (\"All\"). */\n none: string;\n /** The mark on a view whose filters changed (\"modified\"). */\n modified: string;\n /** \"Save view\". */\n save: string;\n /** The name field of a view being saved (\"Name of the view\"). */\n name: string;\n /** The button that keeps it (\"Save\"). */\n confirm: string;\n /** \"Cancel\". */\n cancel: string;\n /** \"Rename\". */\n rename: string;\n /** \"Delete\". */\n remove: string;\n /** The button of a view's actions: `(label) => \"Actions for the view \" + label`. */\n actions: (label: string) => string;\n};\n\nexport const savedViewsLabels: SavedViewsLabels = {\n views: \"Views\",\n groups: { system: \"Standard views\", workspace: \"Shared views\", mine: \"My views\" },\n menu: (current) => `View: ${current}`,\n none: \"All\",\n modified: \"modified\",\n save: \"Save view\",\n name: \"Name of the view\",\n confirm: \"Save\",\n cancel: \"Cancel\",\n rename: \"Rename\",\n remove: \"Delete\",\n actions: (label) => `Actions for the view ${label}`,\n};\n\nexport type SavedViewsProps = {\n /** The views, in the order to show them inside each group. */\n views: readonly SavedViewItem[];\n /** The id of the view in force, or null. */\n current: string | null;\n /** The filters in force differ from the view's (`!sameFilters(...)`), or none matches a view: shows the mark and « Save view ». */\n modified?: boolean;\n /** A view was chosen (a button). Not called for a view that has an `href`: the link navigates. */\n onSelect?: (id: string) => void;\n /** « Save view » was confirmed with this name. Without it the button is not shown. */\n onSave?: (name: string) => void;\n /** A view was renamed. Without it the action is not offered. */\n onRename?: (id: string, name: string) => void;\n /** A view was deleted (the host confirms, or offers an undo). Without it the action is not offered. */\n onDelete?: (id: string) => void;\n /** Your router's link for the views that have an `href`. */\n linkAs?: LinkComponent;\n /** The most characters of a name (default 80, the contract's `NAME_MAX`). */\n maxLength?: number;\n /** The words, passed translated (English by default). */\n labels?: Partial<SavedViewsLabels>;\n /** Classes merged on the root. */\n className?: string;\n};\n\nconst field =\n \"h-9 min-w-40 flex-1 rounded-md border border-border-control bg-surface-1 px-3 text-sm text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\";\nconst quiet =\n \"inline-flex h-9 items-center gap-1.5 rounded-md px-2.5 text-xs font-semibold text-fg-accent hover:bg-surface-2 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\";\n\n/** A name being typed — a new view, or a rename: Enter keeps it, Esc leaves, the field is focused on mount. */\nfunction NameForm({\n label,\n initial = \"\",\n confirm,\n cancel,\n maxLength,\n onSubmit,\n onCancel,\n}: {\n label: string;\n initial?: string;\n confirm: string;\n cancel: string;\n maxLength: number;\n onSubmit: (name: string) => void;\n onCancel: () => void;\n}) {\n const [name, setName] = React.useState(initial);\n const clean = name.replace(/\\s+/g, \" \").trim();\n const submit = () => {\n if (clean) onSubmit(clean);\n };\n return (\n <form\n className=\"flex flex-wrap items-center gap-2\"\n onSubmit={(event) => {\n event.preventDefault();\n submit();\n }}\n >\n <input\n autoFocus\n type=\"text\"\n aria-label={label}\n value={name}\n maxLength={maxLength}\n onChange={(event) => setName(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") {\n event.stopPropagation();\n onCancel();\n }\n }}\n className={field}\n />\n <button type=\"submit\" disabled={!clean} className=\"inline-flex h-9 items-center rounded-md border border-accent bg-accent-soft px-3 text-xs font-semibold text-fg disabled:opacity-40 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\">\n {confirm}\n </button>\n <button type=\"button\" onClick={onCancel} className={quiet}>\n {cancel}\n </button>\n </form>\n );\n}\n\nconst Count = ({ n }: { n?: number }) =>\n n === undefined ? null : (\n <>\n {\" \"}\n <span aria-hidden>·</span> <span className=\"tabular-nums text-fg-secondary\">{n}</span>\n </>\n );\n\n/** The views of a list: chips with counts on a wide screen, one menu on a phone; save, rename and delete; the mark of a modified view. */\nexport function SavedViews({ views, current, modified, onSelect, onSave, onRename, onDelete, linkAs, maxLength = 80, labels: given, className }: SavedViewsProps) {\n const labels: SavedViewsLabels = { ...savedViewsLabels, ...given, groups: { ...savedViewsLabels.groups, ...given?.groups } };\n const [saving, setSaving] = React.useState(false);\n const [renaming, setRenaming] = React.useState<string | null>(null);\n const Link = (linkAs ?? \"a\") as React.ElementType;\n const active = views.find((v) => v.id === current);\n const editable = (view: SavedViewItem | undefined) => Boolean(view && (view.editable ?? view.group === \"mine\"));\n const canChange = editable(active);\n const showSave = Boolean(onSave && modified);\n const grouped = GROUPS.map((group) => ({ group, items: views.filter((v) => v.group === group) })).filter((g) => g.items.length > 0);\n const renamed = views.find((v) => v.id === renaming);\n\n const form = saving ? (\n <NameForm\n label={labels.name}\n confirm={labels.confirm}\n cancel={labels.cancel}\n maxLength={maxLength}\n onCancel={() => setSaving(false)}\n onSubmit={(name) => {\n setSaving(false);\n onSave?.(name);\n }}\n />\n ) : renamed ? (\n <NameForm\n label={labels.name}\n initial={renamed.label}\n confirm={labels.confirm}\n cancel={labels.cancel}\n maxLength={maxLength}\n onCancel={() => setRenaming(null)}\n onSubmit={(name) => {\n setRenaming(null);\n onRename?.(renamed.id, name);\n }}\n />\n ) : null;\n\n const actions =\n canChange && active && (onRename || onDelete) ? (\n <DropdownMenu.Root modal={false}>\n <DropdownMenu.Trigger aria-label={labels.actions(active.label)} className={cn(quiet, \"px-2 text-fg-secondary\")}>\n <svg viewBox=\"0 0 24 24\" className=\"h-4 w-4\" fill=\"currentColor\" aria-hidden>\n <circle cx=\"5\" cy=\"12\" r=\"1.8\" />\n <circle cx=\"12\" cy=\"12\" r=\"1.8\" />\n <circle cx=\"19\" cy=\"12\" r=\"1.8\" />\n </svg>\n </DropdownMenu.Trigger>\n <DropdownMenu.Content align=\"start\" aria-label={labels.actions(active.label)}>\n {onRename ? <DropdownMenu.Item onSelect={() => setRenaming(active.id)}>{labels.rename}</DropdownMenu.Item> : null}\n {onDelete ? (\n <DropdownMenu.Item tone=\"danger\" onSelect={() => onDelete(active.id)}>\n {labels.remove}\n </DropdownMenu.Item>\n ) : null}\n </DropdownMenu.Content>\n </DropdownMenu.Root>\n ) : null;\n\n const mark = modified && active ? <span className=\"text-xs font-semibold text-fg-secondary\">({labels.modified})</span> : null;\n const saveButton = showSave && !saving ? (\n <button type=\"button\" onClick={() => setSaving(true)} className={quiet}>\n {labels.save}\n </button>\n ) : null;\n\n return (\n <div className={cn(\"flex flex-col gap-2\", className)}>\n {/* A wide screen: the bar. */}\n <div role=\"group\" aria-label={labels.views} className=\"flex flex-wrap items-center gap-x-3 gap-y-2 max-md:hidden\">\n {grouped.map(({ group, items }, index) => (\n <React.Fragment key={group}>\n {index > 0 ? <span aria-hidden className=\"h-5 w-px bg-border-default\" /> : null}\n {items.some((v) => v.href) ? (\n <nav aria-label={labels.groups[group]} className=\"flex flex-wrap items-center gap-2\">\n {items.map((view) => (\n <ChipLink key={view.id} asChild size=\"sm\" selected={view.id === current}>\n <Link href={view.href ?? \"#\"} onClick={() => onSelect?.(view.id)}>\n {view.label}\n <Count n={view.count} />\n </Link>\n </ChipLink>\n ))}\n </nav>\n ) : (\n <Chip.Group\n type=\"single\"\n size=\"sm\"\n label={labels.groups[group]}\n value={items.some((v) => v.id === current) ? (current ?? \"\") : \"\"}\n onValueChange={(id) => id && onSelect?.(id)}\n >\n {items.map((view) => (\n <Chip key={view.id} value={view.id}>\n {view.label}\n <Count n={view.count} />\n </Chip>\n ))}\n </Chip.Group>\n )}\n </React.Fragment>\n ))}\n {mark}\n {actions}\n {saveButton}\n </div>\n\n {/* A phone: one menu. */}\n <div className=\"flex flex-wrap items-center gap-2 md:hidden\">\n <MenuPrimitive.Root modal={false}>\n <MenuPrimitive.Trigger className=\"inline-flex h-11 min-w-0 items-center gap-2 rounded-lg border border-border-control bg-surface-1 px-3.5 text-sm font-semibold text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\">\n <span className=\"truncate\">{labels.menu(active?.label ?? labels.none)}</span>\n {mark}\n <ChevronGlyph className=\"h-4 w-4 shrink-0\" />\n </MenuPrimitive.Trigger>\n <DropdownMenu.Content align=\"start\">\n {grouped.map(({ group, items }, index) => (\n <React.Fragment key={group}>\n {index > 0 ? <DropdownMenu.Separator /> : null}\n <DropdownMenu.Label>{labels.groups[group]}</DropdownMenu.Label>\n <MenuPrimitive.RadioGroup value={items.some((v) => v.id === current) ? (current ?? \"\") : \"\"}>\n {items.map((view) =>\n view.href ? (\n <DropdownMenu.Item key={view.id} asChild>\n <Link href={view.href} aria-current={view.id === current ? \"page\" : undefined} onClick={() => onSelect?.(view.id)}>\n {view.label}\n <Count n={view.count} />\n </Link>\n </DropdownMenu.Item>\n ) : (\n <DropdownMenu.RadioItem key={view.id} value={view.id} onSelect={() => onSelect?.(view.id)}>\n {view.label}\n <Count n={view.count} />\n </DropdownMenu.RadioItem>\n ),\n )}\n </MenuPrimitive.RadioGroup>\n </React.Fragment>\n ))}\n {(showSave || (canChange && (onRename || onDelete))) && <DropdownMenu.Separator />}\n {showSave ? <DropdownMenu.Item onSelect={() => setSaving(true)}>{labels.save}</DropdownMenu.Item> : null}\n {canChange && active && onRename ? <DropdownMenu.Item onSelect={() => setRenaming(active.id)}>{labels.rename}</DropdownMenu.Item> : null}\n {canChange && active && onDelete ? (\n <DropdownMenu.Item tone=\"danger\" onSelect={() => onDelete(active.id)}>\n {labels.remove}\n </DropdownMenu.Item>\n ) : null}\n </DropdownMenu.Content>\n </MenuPrimitive.Root>\n </div>\n {form}\n </div>\n );\n}\n","// Server-safe: no hook, no context. A chip that is a link — a filter that is an address (`/explore?tag=night`): the look\n// of `Chip`, the current filter marked by `selected` (`aria-current`, the accent), usable in a Server Component.\n// `chipVariants` styles anything else (a router link you render yourself).\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\nimport { tv, type VariantProps } from \"tailwind-variants\";\n\nexport const chipVariants = tv({\n base:\n \"inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border font-semibold no-underline transition-colors \" +\n \"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\",\n variants: {\n size: { sm: \"h-7 px-3 text-xs\", md: \"h-9 px-3.5 text-xs\" },\n selected: {\n false: \"border-border-default bg-surface-1 text-fg-secondary hover:border-border-strong hover:text-fg\",\n true: \"border-accent bg-accent-soft text-fg\",\n },\n },\n defaultVariants: { size: \"md\", selected: false },\n});\n\nexport type ChipVariantsProps = VariantProps<typeof chipVariants>;\n\nexport type ChipLinkProps = React.ComponentProps<\"a\"> & {\n /**\n * sm · md.\n * @default \"md\"\n */\n size?: ChipVariantsProps[\"size\"];\n /** The current filter: the accent, `aria-current` (`page` by default) and `data-state=\"on\"`. */\n selected?: boolean;\n /**\n * What `aria-current` says when selected: `page` (a filter that is a page) or `true`.\n * @default \"page\"\n */\n current?: \"page\" | \"true\";\n /** Renders your router's `<Link>` with the chip's look. */\n asChild?: boolean;\n};\n\n/** A filter that is a link, with the look of `Chip`. */\nexport function ChipLink({ size, selected = false, current = \"page\", asChild, className, ...props }: ChipLinkProps) {\n const Comp = asChild ? Slot.Root : \"a\";\n return (\n <Comp\n data-state={selected ? \"on\" : \"off\"}\n aria-current={selected ? current : undefined}\n className={chipVariants({ size, selected, className })}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAIA,SAAS,gBAAgBA,sBAAqB;AAE9C,SAAS,MAAAC,WAAU;;;ACLnB,SAAS,gBAAgB,qBAAqB;AAE9C,SAAS,UAAU;AAiCb,cAkBF,YAlBE;AA5BC,IAAM,OAAO,GAAG;AAAA,EACrB,OAAO;AAAA,IACL,SAAS,GAAG,UAAU,kLAAkL;AAAA,IACxM,MACE;AAAA,IAGF,WAAW;AAAA,IACX,OAAO;AAAA,IACP,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA;AAAA,IAGR,MAAM,EAAE,SAAS,CAAC,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