@krizaka/ui 2.2.0 → 2.4.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 +33 -8
- package/dist/audio-player.d.ts +113 -0
- package/dist/audio-player.js +207 -0
- package/dist/audio-player.js.map +1 -0
- package/dist/{button-Cgfkg_3y.d.ts → button-BMAO7dKF.d.ts} +29 -2
- package/dist/button.d.ts +32 -5
- package/dist/button.js +62 -9
- package/dist/button.js.map +1 -1
- package/dist/chip-link.d.ts +53 -0
- package/dist/chip-link.js +32 -0
- package/dist/chip-link.js.map +1 -0
- package/dist/chunk-2USC2YT6.js +17 -0
- package/dist/chunk-2USC2YT6.js.map +1 -0
- package/dist/chunk-43PTCDTL.js +31 -0
- package/dist/chunk-43PTCDTL.js.map +1 -0
- package/dist/chunk-6ISW63JI.js +11 -0
- package/dist/chunk-6ISW63JI.js.map +1 -0
- package/dist/chunk-EUPTXKH7.js +95 -0
- package/dist/chunk-EUPTXKH7.js.map +1 -0
- package/dist/chunk-HAQWKORZ.js +117 -0
- package/dist/chunk-HAQWKORZ.js.map +1 -0
- package/dist/{chunk-FHYZSO2S.js → chunk-R6SDS7JM.js} +5 -3
- package/dist/chunk-R6SDS7JM.js.map +1 -0
- package/dist/chunk-RUPNPMP3.js +103 -0
- package/dist/chunk-RUPNPMP3.js.map +1 -0
- package/dist/chunk-RUPRYJ45.js +82 -0
- package/dist/chunk-RUPRYJ45.js.map +1 -0
- package/dist/chunk-VDR2EP6K.js +49 -0
- package/dist/chunk-VDR2EP6K.js.map +1 -0
- package/dist/chunk-WEVYKZIF.js +33 -0
- package/dist/chunk-WEVYKZIF.js.map +1 -0
- package/dist/chunk-XUMJA5ZI.js +283 -0
- package/dist/chunk-XUMJA5ZI.js.map +1 -0
- package/dist/chunk-YH4LMWRU.js +92 -0
- package/dist/chunk-YH4LMWRU.js.map +1 -0
- package/dist/chunk-YX6CNVJA.js +94 -0
- package/dist/chunk-YX6CNVJA.js.map +1 -0
- package/dist/chunk-ZIXB33X7.js +95 -0
- package/dist/chunk-ZIXB33X7.js.map +1 -0
- package/dist/combobox.d.ts +188 -0
- package/dist/combobox.js +16 -0
- package/dist/combobox.js.map +1 -0
- package/dist/command.d.ts +7 -7
- package/dist/command.js +3 -2
- package/dist/command.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +2 -1
- package/dist/confirm-button.js.map +1 -1
- package/dist/data-table.d.ts +246 -0
- package/dist/data-table.js +290 -0
- package/dist/data-table.js.map +1 -0
- package/dist/date-picker.d.ts +288 -0
- package/dist/date-picker.js +364 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/{dialog-GQ4Nvuyf.d.ts → dialog-D42QwYb_.d.ts} +11 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +3 -2
- package/dist/dialog.js.map +1 -1
- package/dist/file-upload.d.ts +238 -0
- package/dist/file-upload.js +437 -0
- package/dist/file-upload.js.map +1 -0
- package/dist/filter-bar.d.ts +139 -0
- package/dist/filter-bar.js +155 -0
- package/dist/filter-bar.js.map +1 -0
- package/dist/glow-card.d.ts +20 -0
- package/dist/glow-card.js +30 -0
- package/dist/glow-card.js.map +1 -0
- package/dist/image-cropper.d.ts +115 -0
- package/dist/image-cropper.js +166 -0
- package/dist/image-cropper.js.map +1 -0
- package/dist/index.d.ts +2 -20
- package/dist/index.js +7 -64
- package/dist/index.js.map +1 -1
- package/dist/iso.d.ts +400 -0
- package/dist/iso.js +363 -0
- package/dist/iso.js.map +1 -0
- package/dist/loader.d.ts +206 -0
- package/dist/loader.js +138 -0
- package/dist/loader.js.map +1 -0
- package/dist/marquee.d.ts +33 -0
- package/dist/marquee.js +52 -0
- package/dist/marquee.js.map +1 -0
- package/dist/media-capture.d.ts +155 -0
- package/dist/media-capture.js +242 -0
- package/dist/media-capture.js.map +1 -0
- package/dist/meter.d.ts +146 -0
- package/dist/meter.js +107 -0
- package/dist/meter.js.map +1 -0
- package/dist/motion.css +394 -3
- package/dist/motion.d.ts +46 -0
- package/dist/motion.js +10 -0
- package/dist/motion.js.map +1 -0
- package/dist/native/media-capture.d.ts +49 -0
- package/dist/native/media-capture.js +113 -0
- package/dist/native/media-capture.js.map +1 -0
- package/dist/native/video-player.d.ts +50 -0
- package/dist/native/video-player.js +69 -0
- package/dist/native/video-player.js.map +1 -0
- package/dist/native.d.ts +66 -2
- package/dist/native.js +166 -68
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.d.ts +178 -0
- package/dist/nav-bar.js +157 -0
- package/dist/nav-bar.js.map +1 -0
- package/dist/number-ticker.d.ts +32 -0
- package/dist/number-ticker.js +61 -0
- package/dist/number-ticker.js.map +1 -0
- package/dist/pagination.d.ts +141 -0
- package/dist/pagination.js +165 -0
- package/dist/pagination.js.map +1 -0
- package/dist/progress.d.ts +56 -1
- package/dist/progress.js +72 -25
- package/dist/progress.js.map +1 -1
- package/dist/search-field.d.ts +100 -0
- package/dist/search-field.js +167 -0
- package/dist/search-field.js.map +1 -0
- package/dist/skeleton.d.ts +18 -3
- package/dist/skeleton.js +9 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/spinner.d.ts +21 -5
- package/dist/spinner.js +13 -12
- package/dist/spinner.js.map +1 -1
- package/dist/stepper.d.ts +112 -0
- package/dist/stepper.js +67 -0
- package/dist/stepper.js.map +1 -0
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +14 -8
- package/dist/tabs.js.map +1 -1
- package/dist/tag-input.d.ts +44 -0
- package/dist/tag-input.js +67 -0
- package/dist/tag-input.js.map +1 -0
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.d.ts +39 -4
- package/dist/toast.js +81 -7
- package/dist/toast.js.map +1 -1
- package/dist/video-player.d.ts +204 -0
- package/dist/video-player.js +371 -0
- package/dist/video-player.js.map +1 -0
- package/dist/video-trimmer.d.ts +142 -0
- package/dist/video-trimmer.js +193 -0
- package/dist/video-trimmer.js.map +1 -0
- package/package.json +375 -7
- package/registry/alert.json +1 -1
- package/registry/audio-player.json +282 -0
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +232 -26
- package/registry/card.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +158 -0
- package/registry/chip.json +1 -1
- package/registry/combobox.json +475 -0
- package/registry/command.json +1 -1
- package/registry/confirm-button.json +91 -7
- package/registry/countdown.json +1 -1
- package/registry/data-table.json +500 -0
- package/registry/date-picker.json +978 -0
- package/registry/dialog.json +15 -7
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/examples/audio-player/podcast.js +22 -0
- package/registry/examples/audio-player/podcast.tsx +19 -0
- package/registry/examples/audio-player/voice-note.d.ts +4 -0
- package/registry/examples/audio-player/voice-note.js +12 -0
- package/registry/examples/audio-player/voice-note.tsx +12 -0
- package/registry/examples/button/error.d.ts +4 -0
- package/registry/examples/button/error.js +11 -0
- package/registry/examples/button/error.tsx +10 -0
- package/registry/examples/button/loading.tsx +1 -1
- package/registry/examples/button/save-flow.d.ts +4 -0
- package/registry/examples/button/save-flow.js +28 -0
- package/registry/examples/button/save-flow.tsx +24 -0
- package/registry/examples/button/signature.d.ts +4 -0
- package/registry/examples/button/signature.js +17 -0
- package/registry/examples/button/signature.tsx +19 -0
- package/registry/examples/button/upload-progress.d.ts +4 -0
- package/registry/examples/button/upload-progress.js +23 -0
- package/registry/examples/button/upload-progress.tsx +26 -0
- package/registry/examples/chip-link/filters.d.ts +4 -0
- package/registry/examples/chip-link/filters.js +12 -0
- package/registry/examples/chip-link/filters.tsx +17 -0
- package/registry/examples/combobox/async.d.ts +4 -0
- package/registry/examples/combobox/async.js +23 -0
- package/registry/examples/combobox/async.tsx +22 -0
- package/registry/examples/combobox/creatable.d.ts +4 -0
- package/registry/examples/combobox/creatable.js +32 -0
- package/registry/examples/combobox/creatable.tsx +28 -0
- package/registry/examples/combobox/invalid.d.ts +4 -0
- package/registry/examples/combobox/invalid.js +23 -0
- package/registry/examples/combobox/invalid.tsx +17 -0
- package/registry/examples/combobox/multiple.d.ts +4 -0
- package/registry/examples/combobox/multiple.js +29 -0
- package/registry/examples/combobox/multiple.tsx +26 -0
- package/registry/examples/data-table/cards.d.ts +4 -0
- package/registry/examples/data-table/cards.js +21 -0
- package/registry/examples/data-table/cards.tsx +20 -0
- package/registry/examples/data-table/empty.d.ts +4 -0
- package/registry/examples/data-table/empty.js +26 -0
- package/registry/examples/data-table/empty.tsx +21 -0
- package/registry/examples/data-table/error.d.ts +4 -0
- package/registry/examples/data-table/error.js +28 -0
- package/registry/examples/data-table/error.tsx +29 -0
- package/registry/examples/data-table/jobs.d.ts +4 -0
- package/registry/examples/data-table/jobs.js +37 -0
- package/registry/examples/data-table/jobs.tsx +36 -0
- package/registry/examples/data-table/loading.d.ts +4 -0
- package/registry/examples/data-table/loading.js +16 -0
- package/registry/examples/data-table/loading.tsx +12 -0
- package/registry/examples/data-table/virtualized.d.ts +4 -0
- package/registry/examples/data-table/virtualized.js +21 -0
- package/registry/examples/data-table/virtualized.tsx +20 -0
- package/registry/examples/date-picker/calendar.d.ts +4 -0
- package/registry/examples/date-picker/calendar.js +14 -0
- package/registry/examples/date-picker/calendar.tsx +16 -0
- package/registry/examples/date-picker/french.d.ts +4 -0
- package/registry/examples/date-picker/french.js +20 -0
- package/registry/examples/date-picker/french.tsx +14 -0
- package/registry/examples/date-picker/open.d.ts +4 -0
- package/registry/examples/date-picker/open.js +11 -0
- package/registry/examples/date-picker/open.tsx +8 -0
- package/registry/examples/date-picker/range.d.ts +4 -0
- package/registry/examples/date-picker/range.js +29 -0
- package/registry/examples/date-picker/range.tsx +25 -0
- package/registry/examples/date-picker/schedule.d.ts +4 -0
- package/registry/examples/date-picker/schedule.js +26 -0
- package/registry/examples/date-picker/schedule.tsx +22 -0
- package/registry/examples/dialog/left.d.ts +4 -0
- package/registry/examples/dialog/left.js +22 -0
- package/registry/examples/dialog/left.tsx +32 -0
- package/registry/examples/file-upload/images.d.ts +4 -0
- package/registry/examples/file-upload/images.js +32 -0
- package/registry/examples/file-upload/images.tsx +25 -0
- package/registry/examples/file-upload/states.d.ts +4 -0
- package/registry/examples/file-upload/states.js +28 -0
- package/registry/examples/file-upload/states.tsx +23 -0
- package/registry/examples/file-upload/tus.d.ts +4 -0
- package/registry/examples/file-upload/tus.js +23 -0
- package/registry/examples/file-upload/tus.tsx +26 -0
- package/registry/examples/file-upload/video.d.ts +4 -0
- package/registry/examples/file-upload/video.js +39 -0
- package/registry/examples/file-upload/video.tsx +36 -0
- package/registry/examples/filter-bar/address.d.ts +4 -0
- package/registry/examples/filter-bar/address.js +29 -0
- package/registry/examples/filter-bar/address.tsx +27 -0
- package/registry/examples/filter-bar/jobs.d.ts +4 -0
- package/registry/examples/filter-bar/jobs.js +37 -0
- package/registry/examples/filter-bar/jobs.tsx +37 -0
- package/registry/examples/filter-bar/menu.d.ts +4 -0
- package/registry/examples/filter-bar/menu.js +27 -0
- package/registry/examples/filter-bar/menu.tsx +23 -0
- package/registry/examples/glow-card/link-card.d.ts +4 -0
- package/registry/examples/glow-card/link-card.js +14 -0
- package/registry/examples/glow-card/link-card.tsx +13 -0
- package/registry/examples/glow-card/plans.d.ts +4 -0
- package/registry/examples/glow-card/plans.js +25 -0
- package/registry/examples/glow-card/plans.tsx +26 -0
- package/registry/examples/glow-card/spotlight.d.ts +4 -0
- package/registry/examples/glow-card/spotlight.js +14 -0
- package/registry/examples/glow-card/spotlight.tsx +15 -0
- package/registry/examples/image-cropper/avatar.d.ts +4 -0
- package/registry/examples/image-cropper/avatar.js +13 -0
- package/registry/examples/image-cropper/avatar.tsx +14 -0
- package/registry/examples/image-cropper/banner.d.ts +4 -0
- package/registry/examples/image-cropper/banner.js +11 -0
- package/registry/examples/image-cropper/banner.tsx +10 -0
- package/registry/examples/image-cropper/vertical-video.d.ts +4 -0
- package/registry/examples/image-cropper/vertical-video.js +12 -0
- package/registry/examples/image-cropper/vertical-video.tsx +16 -0
- package/registry/examples/iso/compose.d.ts +4 -0
- package/registry/examples/iso/compose.js +22 -0
- package/registry/examples/iso/compose.tsx +19 -0
- package/registry/examples/iso/orazaka-hero.d.ts +4 -0
- package/registry/examples/iso/orazaka-hero.js +26 -0
- package/registry/examples/iso/orazaka-hero.tsx +21 -0
- package/registry/examples/iso/orochia-hero.d.ts +4 -0
- package/registry/examples/iso/orochia-hero.js +29 -0
- package/registry/examples/iso/orochia-hero.tsx +23 -0
- package/registry/examples/iso/still.d.ts +4 -0
- package/registry/examples/iso/still.js +21 -0
- package/registry/examples/iso/still.tsx +15 -0
- package/registry/examples/loader/endings.d.ts +4 -0
- package/registry/examples/loader/endings.js +14 -0
- package/registry/examples/loader/endings.tsx +11 -0
- package/registry/examples/loader/fetch-flow.d.ts +4 -0
- package/registry/examples/loader/fetch-flow.js +24 -0
- package/registry/examples/loader/fetch-flow.tsx +24 -0
- package/registry/examples/loader/minimal.d.ts +4 -0
- package/registry/examples/loader/minimal.js +11 -0
- package/registry/examples/loader/minimal.tsx +6 -0
- package/registry/examples/loader/overlay.d.ts +4 -0
- package/registry/examples/loader/overlay.js +16 -0
- package/registry/examples/loader/overlay.tsx +13 -0
- package/registry/examples/loader/region-handover.d.ts +4 -0
- package/registry/examples/loader/region-handover.js +42 -0
- package/registry/examples/loader/region-handover.tsx +29 -0
- package/registry/examples/loader/upload-eta.d.ts +4 -0
- package/registry/examples/loader/upload-eta.js +11 -0
- package/registry/examples/loader/upload-eta.tsx +10 -0
- package/registry/examples/marquee/cards.d.ts +4 -0
- package/registry/examples/marquee/cards.js +23 -0
- package/registry/examples/marquee/cards.tsx +21 -0
- package/registry/examples/marquee/logos.d.ts +4 -0
- package/registry/examples/marquee/logos.js +12 -0
- package/registry/examples/marquee/logos.tsx +17 -0
- package/registry/examples/media-capture/clip.d.ts +4 -0
- package/registry/examples/media-capture/clip.js +20 -0
- package/registry/examples/media-capture/clip.tsx +18 -0
- package/registry/examples/media-capture/native/photo.d.ts +4 -0
- package/registry/examples/media-capture/native/photo.dark.png +0 -0
- package/registry/examples/media-capture/native/photo.js +27 -0
- package/registry/examples/media-capture/native/photo.light.png +0 -0
- package/registry/examples/media-capture/native/photo.tsx +20 -0
- package/registry/examples/media-capture/profile-photo.d.ts +4 -0
- package/registry/examples/media-capture/profile-photo.js +24 -0
- package/registry/examples/media-capture/profile-photo.tsx +20 -0
- package/registry/examples/meter/balance.d.ts +4 -0
- package/registry/examples/meter/balance.js +14 -0
- package/registry/examples/meter/balance.tsx +15 -0
- package/registry/examples/meter/quota.d.ts +4 -0
- package/registry/examples/meter/quota.js +15 -0
- package/registry/examples/meter/quota.tsx +12 -0
- package/registry/examples/meter/split.d.ts +4 -0
- package/registry/examples/meter/split.js +18 -0
- package/registry/examples/meter/split.tsx +18 -0
- package/registry/examples/nav-bar/app-bar.d.ts +4 -0
- package/registry/examples/nav-bar/app-bar.js +22 -0
- package/registry/examples/nav-bar/app-bar.tsx +21 -0
- package/registry/examples/nav-bar/menu-open.d.ts +4 -0
- package/registry/examples/nav-bar/menu-open.js +26 -0
- package/registry/examples/nav-bar/menu-open.tsx +26 -0
- package/registry/examples/nav-bar/site.d.ts +4 -0
- package/registry/examples/nav-bar/site.js +31 -0
- package/registry/examples/nav-bar/site.tsx +36 -0
- package/registry/examples/number-ticker/gradient.d.ts +4 -0
- package/registry/examples/number-ticker/gradient.js +11 -0
- package/registry/examples/number-ticker/gradient.tsx +10 -0
- package/registry/examples/number-ticker/live-total.d.ts +4 -0
- package/registry/examples/number-ticker/live-total.js +17 -0
- package/registry/examples/number-ticker/live-total.tsx +21 -0
- package/registry/examples/number-ticker/stats.d.ts +4 -0
- package/registry/examples/number-ticker/stats.js +19 -0
- package/registry/examples/number-ticker/stats.tsx +23 -0
- package/registry/examples/pagination/cursor.d.ts +4 -0
- package/registry/examples/pagination/cursor.js +24 -0
- package/registry/examples/pagination/cursor.tsx +20 -0
- package/registry/examples/pagination/links.d.ts +4 -0
- package/registry/examples/pagination/links.js +11 -0
- package/registry/examples/pagination/links.tsx +6 -0
- package/registry/examples/pagination/native/cursor.d.ts +4 -0
- package/registry/examples/pagination/native/cursor.dark.png +0 -0
- package/registry/examples/pagination/native/cursor.js +19 -0
- package/registry/examples/pagination/native/cursor.light.png +0 -0
- package/registry/examples/pagination/native/cursor.tsx +13 -0
- package/registry/examples/pagination/native/pages.d.ts +4 -0
- package/registry/examples/pagination/native/pages.dark.png +0 -0
- package/registry/examples/pagination/native/pages.js +21 -0
- package/registry/examples/pagination/native/pages.light.png +0 -0
- package/registry/examples/pagination/native/pages.tsx +14 -0
- package/registry/examples/pagination/results.d.ts +4 -0
- package/registry/examples/pagination/results.js +23 -0
- package/registry/examples/pagination/results.tsx +19 -0
- package/registry/examples/pagination/table-footer.d.ts +4 -0
- package/registry/examples/pagination/table-footer.js +31 -0
- package/registry/examples/pagination/table-footer.tsx +27 -0
- package/registry/examples/progress/buffer.d.ts +4 -0
- package/registry/examples/progress/buffer.js +11 -0
- package/registry/examples/progress/buffer.tsx +10 -0
- package/registry/examples/progress/statuses.d.ts +4 -0
- package/registry/examples/progress/statuses.js +14 -0
- package/registry/examples/progress/statuses.tsx +11 -0
- package/registry/examples/progress/steps.d.ts +4 -0
- package/registry/examples/progress/steps.js +14 -0
- package/registry/examples/progress/steps.tsx +13 -0
- package/registry/examples/progress/upload.d.ts +4 -0
- package/registry/examples/progress/upload.js +11 -0
- package/registry/examples/progress/upload.tsx +10 -0
- package/registry/examples/search-field/global.d.ts +4 -0
- package/registry/examples/search-field/global.js +19 -0
- package/registry/examples/search-field/global.tsx +15 -0
- package/registry/examples/search-field/native/default.d.ts +4 -0
- package/registry/examples/search-field/native/default.dark.png +0 -0
- package/registry/examples/search-field/native/default.js +13 -0
- package/registry/examples/search-field/native/default.light.png +0 -0
- package/registry/examples/search-field/native/default.tsx +7 -0
- package/registry/examples/search-field/suggestions.d.ts +4 -0
- package/registry/examples/search-field/suggestions.js +30 -0
- package/registry/examples/search-field/suggestions.tsx +27 -0
- package/registry/examples/search-field/toolbar.d.ts +4 -0
- package/registry/examples/search-field/toolbar.js +17 -0
- package/registry/examples/search-field/toolbar.tsx +21 -0
- package/registry/examples/skeleton/paragraph.d.ts +4 -0
- package/registry/examples/skeleton/paragraph.js +14 -0
- package/registry/examples/skeleton/paragraph.tsx +12 -0
- package/registry/examples/skeleton/shape-of-content.d.ts +4 -0
- package/registry/examples/skeleton/shape-of-content.js +23 -0
- package/registry/examples/skeleton/shape-of-content.tsx +26 -0
- package/registry/examples/spinner/default.js +5 -2
- package/registry/examples/spinner/default.tsx +7 -1
- package/registry/examples/spinner/sizes.js +2 -1
- package/registry/examples/spinner/sizes.tsx +2 -0
- package/registry/examples/spinner/value.d.ts +4 -0
- package/registry/examples/spinner/value.js +11 -0
- package/registry/examples/spinner/value.tsx +12 -0
- package/registry/examples/stepper/checkout.d.ts +4 -0
- package/registry/examples/stepper/checkout.js +22 -0
- package/registry/examples/stepper/checkout.tsx +17 -0
- package/registry/examples/stepper/failed.d.ts +4 -0
- package/registry/examples/stepper/failed.js +26 -0
- package/registry/examples/stepper/failed.tsx +21 -0
- package/registry/examples/stepper/job.d.ts +4 -0
- package/registry/examples/stepper/job.js +32 -0
- package/registry/examples/stepper/job.tsx +28 -0
- package/registry/examples/tag-input/recipients.d.ts +4 -0
- package/registry/examples/tag-input/recipients.js +23 -0
- package/registry/examples/tag-input/recipients.tsx +20 -0
- package/registry/examples/tag-input/video-tags.d.ts +4 -0
- package/registry/examples/tag-input/video-tags.js +26 -0
- package/registry/examples/tag-input/video-tags.tsx +22 -0
- package/registry/examples/toast/grouped.d.ts +4 -0
- package/registry/examples/toast/grouped.js +21 -0
- package/registry/examples/toast/grouped.tsx +23 -0
- package/registry/examples/toast/undo.d.ts +4 -0
- package/registry/examples/toast/undo.js +29 -0
- package/registry/examples/toast/undo.tsx +30 -0
- package/registry/examples/toast/upload-progress.d.ts +4 -0
- package/registry/examples/toast/upload-progress.js +29 -0
- package/registry/examples/toast/upload-progress.tsx +31 -0
- package/registry/examples/video-player/default.d.ts +4 -0
- package/registry/examples/video-player/default.js +12 -0
- package/registry/examples/video-player/default.tsx +8 -0
- package/registry/examples/video-player/gated.d.ts +4 -0
- package/registry/examples/video-player/gated.js +26 -0
- package/registry/examples/video-player/gated.tsx +23 -0
- package/registry/examples/video-player/native/default.d.ts +4 -0
- package/registry/examples/video-player/native/default.dark.png +0 -0
- package/registry/examples/video-player/native/default.js +18 -0
- package/registry/examples/video-player/native/default.light.png +0 -0
- package/registry/examples/video-player/native/default.tsx +12 -0
- package/registry/examples/video-player/signed-source.d.ts +4 -0
- package/registry/examples/video-player/signed-source.js +16 -0
- package/registry/examples/video-player/signed-source.tsx +15 -0
- package/registry/examples/video-player/vertical.d.ts +4 -0
- package/registry/examples/video-player/vertical.js +12 -0
- package/registry/examples/video-player/vertical.tsx +12 -0
- package/registry/examples/video-trimmer/custom.d.ts +4 -0
- package/registry/examples/video-trimmer/custom.js +24 -0
- package/registry/examples/video-trimmer/custom.tsx +26 -0
- package/registry/examples/video-trimmer/filmstrip.d.ts +4 -0
- package/registry/examples/video-trimmer/filmstrip.js +15 -0
- package/registry/examples/video-trimmer/filmstrip.tsx +13 -0
- package/registry/examples/video-trimmer/playhead.d.ts +4 -0
- package/registry/examples/video-trimmer/playhead.js +15 -0
- package/registry/examples/video-trimmer/playhead.tsx +13 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +471 -0
- package/registry/filter-bar.json +347 -0
- package/registry/glow-card.json +162 -0
- package/registry/image-cropper.json +313 -0
- package/registry/index.json +445 -20
- package/registry/iso.json +1355 -0
- package/registry/kbd.json +1 -1
- package/registry/loader.json +399 -0
- package/registry/marquee.json +225 -0
- package/registry/mascots.json +3 -3
- package/registry/media-capture.json +347 -0
- package/registry/meter.json +324 -0
- package/registry/nav-bar.json +480 -0
- package/registry/number-ticker.json +219 -0
- package/registry/page-header.json +1 -1
- package/registry/pagination.json +475 -0
- package/registry/popover.json +1 -1
- package/registry/progress.json +114 -9
- package/registry/radio-group.json +1 -1
- package/registry/search-field.json +436 -0
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/skeleton.json +69 -13
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +91 -27
- package/registry/stat.json +1 -1
- package/registry/stepper.json +174 -0
- package/registry/switch.json +1 -1
- package/registry/tabs.json +11 -7
- package/registry/tag-input.json +363 -0
- package/registry/theme.json +3 -3
- package/registry/toast.json +41 -13
- package/registry/tooltip.json +1 -1
- package/registry/video-player.json +598 -0
- package/registry/video-trimmer.json +385 -0
- package/dist/chunk-FHYZSO2S.js.map +0 -1
- package/dist/chunk-PESA2R4U.js +0 -51
- package/dist/chunk-PESA2R4U.js.map +0 -1
- package/registry/examples/spinner/muted.js +0 -11
- package/registry/examples/spinner/muted.tsx +0 -6
- /package/registry/examples/{spinner/muted.d.ts → audio-player/podcast.d.ts} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/date-picker/range.tsx
|
|
4
|
+
import { DateRangePicker } from "@krizaka/ui/date-picker";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function DatePickerRange({ defaultOpen }) {
|
|
8
|
+
const [period, setPeriod] = React.useState({ start: "2026-10-01", end: "2026-10-11" });
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
DateRangePicker,
|
|
11
|
+
{
|
|
12
|
+
label: "Period",
|
|
13
|
+
locale: "en-US",
|
|
14
|
+
value: period,
|
|
15
|
+
onValueChange: setPeriod,
|
|
16
|
+
max: "2026-10-11",
|
|
17
|
+
today: "2026-10-11",
|
|
18
|
+
defaultOpen,
|
|
19
|
+
presets: [
|
|
20
|
+
{ label: "Last 7 days", start: "2026-10-05", end: "2026-10-11" },
|
|
21
|
+
{ label: "This month", start: "2026-10-01", end: "2026-10-11" },
|
|
22
|
+
{ label: "Last month", start: "2026-09-01", end: "2026-09-30" }
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
DatePickerRange as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DateRangePicker } from "@krizaka/ui/date-picker";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
// An earnings report: presets for the usual periods, two clicks for any other.
|
|
7
|
+
export default function DatePickerRange({ defaultOpen }: { defaultOpen?: boolean }) {
|
|
8
|
+
const [period, setPeriod] = React.useState<{ start: string; end: string } | null>({ start: "2026-10-01", end: "2026-10-11" });
|
|
9
|
+
return (
|
|
10
|
+
<DateRangePicker
|
|
11
|
+
label="Period"
|
|
12
|
+
locale="en-US"
|
|
13
|
+
value={period}
|
|
14
|
+
onValueChange={setPeriod}
|
|
15
|
+
max="2026-10-11"
|
|
16
|
+
today="2026-10-11"
|
|
17
|
+
defaultOpen={defaultOpen}
|
|
18
|
+
presets={[
|
|
19
|
+
{ label: "Last 7 days", start: "2026-10-05", end: "2026-10-11" },
|
|
20
|
+
{ label: "This month", start: "2026-10-01", end: "2026-10-11" },
|
|
21
|
+
{ label: "Last month", start: "2026-09-01", end: "2026-09-30" },
|
|
22
|
+
]}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/date-picker/schedule.tsx
|
|
4
|
+
import { DatePicker } from "@krizaka/ui/date-picker";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function DatePickerSchedule() {
|
|
8
|
+
const [date, setDate] = React.useState("2026-10-14");
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
DatePicker,
|
|
11
|
+
{
|
|
12
|
+
label: "Publish on",
|
|
13
|
+
locale: "en-US",
|
|
14
|
+
value: date,
|
|
15
|
+
onValueChange: setDate,
|
|
16
|
+
min: "2026-10-11",
|
|
17
|
+
today: "2026-10-11",
|
|
18
|
+
clearable: true,
|
|
19
|
+
placeholder: "Publish now",
|
|
20
|
+
hint: "Your followers are told when it goes live."
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
DatePickerSchedule as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { DatePicker } from "@krizaka/ui/date-picker";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
// `today` is fixed here for the documentation; leave it out in an app.
|
|
7
|
+
export default function DatePickerSchedule() {
|
|
8
|
+
const [date, setDate] = React.useState<string | null>("2026-10-14");
|
|
9
|
+
return (
|
|
10
|
+
<DatePicker
|
|
11
|
+
label="Publish on"
|
|
12
|
+
locale="en-US"
|
|
13
|
+
value={date}
|
|
14
|
+
onValueChange={setDate}
|
|
15
|
+
min="2026-10-11"
|
|
16
|
+
today="2026-10-11"
|
|
17
|
+
clearable
|
|
18
|
+
placeholder="Publish now"
|
|
19
|
+
hint="Your followers are told when it goes live."
|
|
20
|
+
/>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/dialog/left.tsx
|
|
4
|
+
import { Button } from "@krizaka/ui/button";
|
|
5
|
+
import { Dialog } from "@krizaka/ui/dialog";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var conversations = ["Pricing questions", "Onboarding Eric", "Weekly report"];
|
|
8
|
+
function DialogLeft({ defaultOpen = false }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs(Dialog.Root, { defaultOpen, children: [
|
|
10
|
+
/* @__PURE__ */ jsx(Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { children: "Conversations" }) }),
|
|
11
|
+
/* @__PURE__ */ jsxs(Dialog.Content, { closeLabel: "Close", placement: "left", size: "sm", children: [
|
|
12
|
+
/* @__PURE__ */ jsxs(Dialog.Header, { children: [
|
|
13
|
+
/* @__PURE__ */ jsx(Dialog.Title, { children: "Conversations" }),
|
|
14
|
+
/* @__PURE__ */ jsx(Dialog.Description, { children: "Your last three conversations." })
|
|
15
|
+
] }),
|
|
16
|
+
/* @__PURE__ */ jsx(Dialog.Body, { children: /* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1", children: conversations.map((c) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("a", { href: "#chat", className: "block rounded-lg px-3 py-2.5 text-sm text-fg hover:bg-surface-2", children: c }) }, c)) }) })
|
|
17
|
+
] })
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
DialogLeft as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Button } from "@krizaka/ui/button";
|
|
2
|
+
import { Dialog } from "@krizaka/ui/dialog";
|
|
3
|
+
|
|
4
|
+
const conversations = ["Pricing questions", "Onboarding Eric", "Weekly report"];
|
|
5
|
+
|
|
6
|
+
// `placement="left"`: a navigation drawer — the conversations of a chat app on a phone, sliding in from the left.
|
|
7
|
+
export default function DialogLeft({ defaultOpen = false }: { defaultOpen?: boolean }) {
|
|
8
|
+
return (
|
|
9
|
+
<Dialog.Root defaultOpen={defaultOpen}>
|
|
10
|
+
<Dialog.Trigger asChild>
|
|
11
|
+
<Button>Conversations</Button>
|
|
12
|
+
</Dialog.Trigger>
|
|
13
|
+
<Dialog.Content closeLabel="Close" placement="left" size="sm">
|
|
14
|
+
<Dialog.Header>
|
|
15
|
+
<Dialog.Title>Conversations</Dialog.Title>
|
|
16
|
+
<Dialog.Description>Your last three conversations.</Dialog.Description>
|
|
17
|
+
</Dialog.Header>
|
|
18
|
+
<Dialog.Body>
|
|
19
|
+
<ul className="flex flex-col gap-1">
|
|
20
|
+
{conversations.map((c) => (
|
|
21
|
+
<li key={c}>
|
|
22
|
+
<a href="#chat" className="block rounded-lg px-3 py-2.5 text-sm text-fg hover:bg-surface-2">
|
|
23
|
+
{c}
|
|
24
|
+
</a>
|
|
25
|
+
</li>
|
|
26
|
+
))}
|
|
27
|
+
</ul>
|
|
28
|
+
</Dialog.Body>
|
|
29
|
+
</Dialog.Content>
|
|
30
|
+
</Dialog.Root>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/file-upload/images.tsx
|
|
4
|
+
import { Dropzone } from "@krizaka/ui/file-upload";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function FileUploadImages() {
|
|
8
|
+
const [names, setNames] = React.useState([]);
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-2", children: [
|
|
10
|
+
/* @__PURE__ */ jsx(
|
|
11
|
+
Dropzone,
|
|
12
|
+
{
|
|
13
|
+
title: "Add pictures to the gallery",
|
|
14
|
+
browseLabel: "Choose pictures",
|
|
15
|
+
hint: "JPEG, PNG or WebP \u2014 up to 6 pictures of 10 MB",
|
|
16
|
+
accept: "image/jpeg,image/png,image/webp",
|
|
17
|
+
multiple: true,
|
|
18
|
+
maxFiles: 6,
|
|
19
|
+
maxSize: 10 * 1024 ** 2,
|
|
20
|
+
onFiles: (files) => setNames(files.map((f) => f.name)),
|
|
21
|
+
refusalLabel: (r) => `${r.file.name}: ${{ type: "not a JPEG, PNG or WebP", size: "larger than 10 MB", count: "more than 6 pictures" }[r.reason]}`
|
|
22
|
+
}
|
|
23
|
+
),
|
|
24
|
+
names.length > 0 && /* @__PURE__ */ jsxs("p", { className: "text-sm text-fg-secondary", children: [
|
|
25
|
+
"Ready: ",
|
|
26
|
+
names.join(", ")
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
FileUploadImages as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Dropzone } from "@krizaka/ui/file-upload";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
// Up to six pictures of 10 MB; each refusal says why.
|
|
7
|
+
export default function FileUploadImages() {
|
|
8
|
+
const [names, setNames] = React.useState<string[]>([]);
|
|
9
|
+
return (
|
|
10
|
+
<div className="flex w-full max-w-lg flex-col gap-2">
|
|
11
|
+
<Dropzone
|
|
12
|
+
title="Add pictures to the gallery"
|
|
13
|
+
browseLabel="Choose pictures"
|
|
14
|
+
hint="JPEG, PNG or WebP — up to 6 pictures of 10 MB"
|
|
15
|
+
accept="image/jpeg,image/png,image/webp"
|
|
16
|
+
multiple
|
|
17
|
+
maxFiles={6}
|
|
18
|
+
maxSize={10 * 1024 ** 2}
|
|
19
|
+
onFiles={(files) => setNames(files.map((f) => f.name))}
|
|
20
|
+
refusalLabel={(r) => `${r.file.name}: ${{ type: "not a JPEG, PNG or WebP", size: "larger than 10 MB", count: "more than 6 pictures" }[r.reason]}`}
|
|
21
|
+
/>
|
|
22
|
+
{names.length > 0 && <p className="text-sm text-fg-secondary">Ready: {names.join(", ")}</p>}
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/file-upload/states.tsx
|
|
4
|
+
import { UploadList } from "@krizaka/ui/file-upload";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var noop = () => void 0;
|
|
7
|
+
function FileUploadStates() {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
UploadList,
|
|
10
|
+
{
|
|
11
|
+
className: "max-w-lg",
|
|
12
|
+
items: [
|
|
13
|
+
{ id: "a", name: "sunset-timelapse.mp4", size: 184e7, type: "video/mp4", progress: 0.42, status: "uploading", speed: 124e5 },
|
|
14
|
+
{ id: "b", name: "behind-the-scenes.mov", size: 62e7, type: "video/quicktime", progress: 0.71, status: "paused" },
|
|
15
|
+
{ id: "c", name: "interview.mp4", size: 24e7, type: "video/mp4", progress: 0.1, status: "error", error: "The connection was lost. Your upload resumes where it stopped." },
|
|
16
|
+
{ id: "d", name: "cover.jpg", size: 82e4, type: "image/jpeg", progress: 1, status: "done" }
|
|
17
|
+
],
|
|
18
|
+
onPause: noop,
|
|
19
|
+
onResume: noop,
|
|
20
|
+
onRetry: noop,
|
|
21
|
+
onCancel: noop,
|
|
22
|
+
onRemove: noop
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
FileUploadStates as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UploadList } from "@krizaka/ui/file-upload";
|
|
2
|
+
|
|
3
|
+
const noop = () => undefined;
|
|
4
|
+
|
|
5
|
+
// Each state with the actions it allows: pause while it sends, resume, retry, remove.
|
|
6
|
+
export default function FileUploadStates() {
|
|
7
|
+
return (
|
|
8
|
+
<UploadList
|
|
9
|
+
className="max-w-lg"
|
|
10
|
+
items={[
|
|
11
|
+
{ id: "a", name: "sunset-timelapse.mp4", size: 1_840_000_000, type: "video/mp4", progress: 0.42, status: "uploading", speed: 12_400_000 },
|
|
12
|
+
{ id: "b", name: "behind-the-scenes.mov", size: 620_000_000, type: "video/quicktime", progress: 0.71, status: "paused" },
|
|
13
|
+
{ id: "c", name: "interview.mp4", size: 240_000_000, type: "video/mp4", progress: 0.1, status: "error", error: "The connection was lost. Your upload resumes where it stopped." },
|
|
14
|
+
{ id: "d", name: "cover.jpg", size: 820_000, type: "image/jpeg", progress: 1, status: "done" },
|
|
15
|
+
]}
|
|
16
|
+
onPause={noop}
|
|
17
|
+
onResume={noop}
|
|
18
|
+
onRetry={noop}
|
|
19
|
+
onCancel={noop}
|
|
20
|
+
onRemove={noop}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/file-upload/tus.tsx
|
|
4
|
+
import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function FileUploadTus() {
|
|
7
|
+
const queue = useUploadQueue({
|
|
8
|
+
concurrency: 1,
|
|
9
|
+
// `resumed`: Tus finds the offset by itself (its fingerprint); a multipart client would skip the parts sent.
|
|
10
|
+
upload: (file, { signal, onProgress }) => new Promise((resolve, reject) => {
|
|
11
|
+
const upload = createTusUpload(file, { onProgress, onSuccess: resolve, onError: reject });
|
|
12
|
+
signal.addEventListener("abort", () => upload.abort());
|
|
13
|
+
upload.start();
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-3", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(Dropzone, { title: "Drop documents to index", browseLabel: "Choose documents", accept: ".pdf,.docx,.md", multiple: true, onFiles: queue.add }),
|
|
18
|
+
/* @__PURE__ */ jsx(UploadList, { items: queue.items, onPause: queue.pause, onResume: queue.resume, onRetry: queue.retry, onCancel: queue.cancel, onRemove: queue.remove })
|
|
19
|
+
] });
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
FileUploadTus as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
|
|
4
|
+
|
|
5
|
+
// The shape of a Tus client (tus-js-client: new Upload(file, options), start(), abort()), kept out of the example.
|
|
6
|
+
type Resumable = { start(): void; abort(): void };
|
|
7
|
+
declare function createTusUpload(file: File, events: { onProgress: (sent: number) => void; onSuccess: () => void; onError: (e: Error) => void }): Resumable;
|
|
8
|
+
|
|
9
|
+
export default function FileUploadTus() {
|
|
10
|
+
const queue = useUploadQueue({
|
|
11
|
+
concurrency: 1,
|
|
12
|
+
// `resumed`: Tus finds the offset by itself (its fingerprint); a multipart client would skip the parts sent.
|
|
13
|
+
upload: (file, { signal, onProgress }) =>
|
|
14
|
+
new Promise((resolve, reject) => {
|
|
15
|
+
const upload = createTusUpload(file, { onProgress, onSuccess: resolve, onError: reject });
|
|
16
|
+
signal.addEventListener("abort", () => upload.abort());
|
|
17
|
+
upload.start();
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
return (
|
|
21
|
+
<div className="flex w-full max-w-lg flex-col gap-3">
|
|
22
|
+
<Dropzone title="Drop documents to index" browseLabel="Choose documents" accept=".pdf,.docx,.md" multiple onFiles={queue.add} />
|
|
23
|
+
<UploadList items={queue.items} onPause={queue.pause} onResume={queue.resume} onRetry={queue.retry} onCancel={queue.cancel} onRemove={queue.remove} />
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/file-upload/video.tsx
|
|
4
|
+
import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function fakeUpload(file, { signal, onProgress }) {
|
|
7
|
+
return new Promise((resolve) => {
|
|
8
|
+
let sent = 0;
|
|
9
|
+
const timer = setInterval(() => {
|
|
10
|
+
sent = Math.min(file.size, sent + file.size / 40);
|
|
11
|
+
onProgress(sent);
|
|
12
|
+
if (sent < file.size) return;
|
|
13
|
+
clearInterval(timer);
|
|
14
|
+
resolve();
|
|
15
|
+
}, 150);
|
|
16
|
+
signal.addEventListener("abort", () => clearInterval(timer));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function FileUploadVideo() {
|
|
20
|
+
const queue = useUploadQueue({ upload: fakeUpload });
|
|
21
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex w-full max-w-lg flex-col gap-3", children: [
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Dropzone,
|
|
24
|
+
{
|
|
25
|
+
title: "Drop your video here",
|
|
26
|
+
browseLabel: "Choose a video",
|
|
27
|
+
hint: "MP4, MOV or WebM, up to 4 GB",
|
|
28
|
+
accept: "video/*",
|
|
29
|
+
maxSize: 4 * 1024 ** 3,
|
|
30
|
+
onFiles: queue.add,
|
|
31
|
+
refusalLabel: (r) => `${r.file.name}: ${r.reason === "size" ? "larger than 4 GB" : "not a video"}`
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
queue.items.length > 0 && /* @__PURE__ */ jsx(UploadList, { items: queue.items, onPause: queue.pause, onResume: queue.resume, onCancel: queue.cancel, onRemove: queue.remove, onRetry: queue.retry })
|
|
35
|
+
] });
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
FileUploadVideo as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Dropzone, UploadList, useUploadQueue } from "@krizaka/ui/file-upload";
|
|
4
|
+
|
|
5
|
+
// A stand-in for your client (Tus, multipart…): it reports progress and stops when the signal aborts.
|
|
6
|
+
function fakeUpload(file: File, { signal, onProgress }: { signal: AbortSignal; onProgress: (sent: number) => void }) {
|
|
7
|
+
return new Promise<void>((resolve) => {
|
|
8
|
+
let sent = 0;
|
|
9
|
+
const timer = setInterval(() => {
|
|
10
|
+
sent = Math.min(file.size, sent + file.size / 40);
|
|
11
|
+
onProgress(sent);
|
|
12
|
+
if (sent < file.size) return;
|
|
13
|
+
clearInterval(timer);
|
|
14
|
+
resolve();
|
|
15
|
+
}, 150);
|
|
16
|
+
signal.addEventListener("abort", () => clearInterval(timer));
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default function FileUploadVideo() {
|
|
21
|
+
const queue = useUploadQueue({ upload: fakeUpload });
|
|
22
|
+
return (
|
|
23
|
+
<div className="flex w-full max-w-lg flex-col gap-3">
|
|
24
|
+
<Dropzone
|
|
25
|
+
title="Drop your video here"
|
|
26
|
+
browseLabel="Choose a video"
|
|
27
|
+
hint="MP4, MOV or WebM, up to 4 GB"
|
|
28
|
+
accept="video/*"
|
|
29
|
+
maxSize={4 * 1024 ** 3}
|
|
30
|
+
onFiles={queue.add}
|
|
31
|
+
refusalLabel={(r) => `${r.file.name}: ${r.reason === "size" ? "larger than 4 GB" : "not a video"}`}
|
|
32
|
+
/>
|
|
33
|
+
{queue.items.length > 0 && <UploadList items={queue.items} onPause={queue.pause} onResume={queue.resume} onCancel={queue.cancel} onRemove={queue.remove} onRetry={queue.retry} />}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/filter-bar/address.tsx
|
|
4
|
+
import { FilterBar, FilterMenu, readFilterParams, writeFilterParams } from "@krizaka/ui/filter-bar";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var ROLES = [
|
|
8
|
+
{ value: "creator", label: "Creator" },
|
|
9
|
+
{ value: "fan", label: "Fan" },
|
|
10
|
+
{ value: "admin", label: "Admin" }
|
|
11
|
+
];
|
|
12
|
+
function FilterBarAddress() {
|
|
13
|
+
const [params, setParams] = React.useState(() => new URLSearchParams("role=creator,admin&page=3"));
|
|
14
|
+
const { role } = readFilterParams(params, ["role"]);
|
|
15
|
+
const set = (next) => setParams(writeFilterParams(params, { role: next }));
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
FilterBar,
|
|
18
|
+
{
|
|
19
|
+
label: "Filter users",
|
|
20
|
+
active: role.map((r) => ({ id: r, label: `Role: ${ROLES.find((o) => o.value === r)?.label}`, onRemove: () => set(role.filter((x) => x !== r)) })),
|
|
21
|
+
onClearAll: () => set([]),
|
|
22
|
+
results: `?${params.toString()}`,
|
|
23
|
+
children: /* @__PURE__ */ jsx(FilterMenu, { label: "Role", options: ROLES, value: role, onValueChange: set })
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
FilterBarAddress as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { FilterBar, FilterMenu, readFilterParams, writeFilterParams } from "@krizaka/ui/filter-bar";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
const ROLES = [
|
|
7
|
+
{ value: "creator", label: "Creator" },
|
|
8
|
+
{ value: "fan", label: "Fan" },
|
|
9
|
+
{ value: "admin", label: "Admin" },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
// The address is the state: read it, write it back (the page goes back to 1). In Next.js: useSearchParams + router.replace.
|
|
13
|
+
export default function FilterBarAddress() {
|
|
14
|
+
const [params, setParams] = React.useState(() => new URLSearchParams("role=creator,admin&page=3"));
|
|
15
|
+
const { role } = readFilterParams(params, ["role"]);
|
|
16
|
+
const set = (next: string[]) => setParams(writeFilterParams(params, { role: next }));
|
|
17
|
+
return (
|
|
18
|
+
<FilterBar
|
|
19
|
+
label="Filter users"
|
|
20
|
+
active={role!.map((r) => ({ id: r, label: `Role: ${ROLES.find((o) => o.value === r)?.label}`, onRemove: () => set(role!.filter((x) => x !== r)) }))}
|
|
21
|
+
onClearAll={() => set([])}
|
|
22
|
+
results={`?${params.toString()}`}
|
|
23
|
+
>
|
|
24
|
+
<FilterMenu label="Role" options={ROLES} value={role!} onValueChange={set} />
|
|
25
|
+
</FilterBar>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/filter-bar/jobs.tsx
|
|
4
|
+
import { FilterBar, FilterMenu } from "@krizaka/ui/filter-bar";
|
|
5
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
6
|
+
import * as React from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
var STATUS = [
|
|
9
|
+
{ value: "running", label: "Running", count: 3 },
|
|
10
|
+
{ value: "done", label: "Done", count: 128 },
|
|
11
|
+
{ value: "failed", label: "Failed", count: 6 }
|
|
12
|
+
];
|
|
13
|
+
var MODELS = [
|
|
14
|
+
{ value: "", label: "All models" },
|
|
15
|
+
{ value: "flux", label: "Flux 1.1" },
|
|
16
|
+
{ value: "whisper", label: "Whisper large" }
|
|
17
|
+
];
|
|
18
|
+
function FilterBarJobs() {
|
|
19
|
+
const [query, setQuery] = React.useState("");
|
|
20
|
+
const [status, setStatus] = React.useState(["failed"]);
|
|
21
|
+
const [model, setModel] = React.useState("flux");
|
|
22
|
+
const active = [
|
|
23
|
+
...status.map((s) => ({ id: `status:${s}`, label: `Status: ${STATUS.find((o) => o.value === s)?.label}`, onRemove: () => setStatus(status.filter((x) => x !== s)) })),
|
|
24
|
+
...model ? [{ id: "model", label: `Model: ${MODELS.find((m) => m.value === model)?.label}`, onRemove: () => setModel("") }] : []
|
|
25
|
+
];
|
|
26
|
+
return /* @__PURE__ */ jsxs(FilterBar, { label: "Filter jobs", active, onClearAll: () => {
|
|
27
|
+
setStatus([]);
|
|
28
|
+
setModel("");
|
|
29
|
+
}, results: "6 jobs", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(SearchField, { label: "Search jobs", placeholder: "Search jobs", value: query, onValueChange: setQuery, landmark: false, className: "sm:max-w-64" }),
|
|
31
|
+
/* @__PURE__ */ jsx(FilterMenu, { label: "Status", options: STATUS, value: status, onValueChange: setStatus }),
|
|
32
|
+
/* @__PURE__ */ jsx(FilterMenu, { label: "Model", multiple: false, options: MODELS, value: model, onValueChange: setModel })
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
FilterBarJobs as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { FilterBar, FilterMenu } from "@krizaka/ui/filter-bar";
|
|
4
|
+
import { SearchField } from "@krizaka/ui/search-field";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
|
|
7
|
+
const STATUS = [
|
|
8
|
+
{ value: "running", label: "Running", count: 3 },
|
|
9
|
+
{ value: "done", label: "Done", count: 128 },
|
|
10
|
+
{ value: "failed", label: "Failed", count: 6 },
|
|
11
|
+
];
|
|
12
|
+
const MODELS = [
|
|
13
|
+
{ value: "", label: "All models" },
|
|
14
|
+
{ value: "flux", label: "Flux 1.1" },
|
|
15
|
+
{ value: "whisper", label: "Whisper large" },
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
// Several criteria at once; each one in force is a chip that undoes it.
|
|
19
|
+
export default function FilterBarJobs() {
|
|
20
|
+
const [query, setQuery] = React.useState("");
|
|
21
|
+
const [status, setStatus] = React.useState(["failed"]);
|
|
22
|
+
const [model, setModel] = React.useState("flux");
|
|
23
|
+
const active = [
|
|
24
|
+
...status.map((s) => ({ id: `status:${s}`, label: `Status: ${STATUS.find((o) => o.value === s)?.label}`, onRemove: () => setStatus(status.filter((x) => x !== s)) })),
|
|
25
|
+
...(model ? [{ id: "model", label: `Model: ${MODELS.find((m) => m.value === model)?.label}`, onRemove: () => setModel("") }] : []),
|
|
26
|
+
];
|
|
27
|
+
return (
|
|
28
|
+
<FilterBar label="Filter jobs" active={active} onClearAll={() => {
|
|
29
|
+
setStatus([]);
|
|
30
|
+
setModel("");
|
|
31
|
+
}} results="6 jobs">
|
|
32
|
+
<SearchField label="Search jobs" placeholder="Search jobs" value={query} onValueChange={setQuery} landmark={false} className="sm:max-w-64" />
|
|
33
|
+
<FilterMenu label="Status" options={STATUS} value={status} onValueChange={setStatus} />
|
|
34
|
+
<FilterMenu label="Model" multiple={false} options={MODELS} value={model} onValueChange={setModel} />
|
|
35
|
+
</FilterBar>
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/filter-bar/menu.tsx
|
|
4
|
+
import { FilterMenu } from "@krizaka/ui/filter-bar";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function FilterBarMenu({ defaultOpen }) {
|
|
8
|
+
const [formats, setFormats] = React.useState(["vertical"]);
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
FilterMenu,
|
|
11
|
+
{
|
|
12
|
+
label: "Format",
|
|
13
|
+
defaultOpen,
|
|
14
|
+
options: [
|
|
15
|
+
{ value: "vertical", label: "Vertical", count: 214 },
|
|
16
|
+
{ value: "landscape", label: "Landscape", count: 96 },
|
|
17
|
+
{ value: "square", label: "Square", count: 12 },
|
|
18
|
+
{ value: "audio", label: "Audio only", count: 0, disabled: true }
|
|
19
|
+
],
|
|
20
|
+
value: formats,
|
|
21
|
+
onValueChange: setFormats
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
FilterBarMenu as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { FilterMenu } from "@krizaka/ui/filter-bar";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
|
|
6
|
+
// A filter's menu: checkboxes, and what each value would give.
|
|
7
|
+
export default function FilterBarMenu({ defaultOpen }: { defaultOpen?: boolean }) {
|
|
8
|
+
const [formats, setFormats] = React.useState(["vertical"]);
|
|
9
|
+
return (
|
|
10
|
+
<FilterMenu
|
|
11
|
+
label="Format"
|
|
12
|
+
defaultOpen={defaultOpen}
|
|
13
|
+
options={[
|
|
14
|
+
{ value: "vertical", label: "Vertical", count: 214 },
|
|
15
|
+
{ value: "landscape", label: "Landscape", count: 96 },
|
|
16
|
+
{ value: "square", label: "Square", count: 12 },
|
|
17
|
+
{ value: "audio", label: "Audio only", count: 0, disabled: true },
|
|
18
|
+
]}
|
|
19
|
+
value={formats}
|
|
20
|
+
onValueChange={setFormats}
|
|
21
|
+
/>
|
|
22
|
+
);
|
|
23
|
+
}
|