@krizaka/ui 3.21.0 → 3.23.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 +5 -0
- package/dist/achievement.js +1 -1
- package/dist/action-bar.js +4 -4
- package/dist/app-header.d.ts +79 -0
- package/dist/app-header.js +32 -0
- package/dist/app-header.js.map +1 -0
- package/dist/app-shell.d.ts +20 -2
- package/dist/app-shell.js +35 -20
- package/dist/app-shell.js.map +1 -1
- package/dist/argument-card.d.ts +4 -1
- package/dist/argument-card.js +8 -5
- package/dist/argument-card.js.map +1 -1
- package/dist/audio-player.d.ts +3 -2
- package/dist/audio-player.js +14 -10
- package/dist/audio-player.js.map +1 -1
- package/dist/blocks.css +28 -0
- package/dist/button.js +2 -1
- package/dist/captcha.d.ts +81 -0
- package/dist/captcha.js +162 -0
- package/dist/captcha.js.map +1 -0
- package/dist/card-grid.d.ts +10 -1
- package/dist/card-grid.js +3 -2
- package/dist/card-grid.js.map +1 -1
- package/dist/card.js +3 -3
- package/dist/changelog-page.d.ts +57 -3
- package/dist/changelog-page.js +117 -1
- package/dist/changelog-page.js.map +1 -1
- package/dist/choice-grid.js +1 -1
- package/dist/{chunk-5MH64NIL.js → chunk-2L67YTNV.js} +2 -2
- package/dist/{chunk-3IN6TOPM.js → chunk-6ZYRUOTA.js} +6 -3
- package/dist/chunk-6ZYRUOTA.js.map +1 -0
- package/dist/chunk-APNIVNIX.js +54 -0
- package/dist/chunk-APNIVNIX.js.map +1 -0
- package/dist/{chunk-FKBHWS4N.js → chunk-CEJDH6SA.js} +2 -2
- package/dist/{chunk-OWC2LZD2.js → chunk-CHOJUCVE.js} +6 -3
- package/dist/chunk-CHOJUCVE.js.map +1 -0
- package/dist/{chunk-3BC4XQ6C.js → chunk-DZU6RMYD.js} +6 -3
- package/dist/chunk-DZU6RMYD.js.map +1 -0
- package/dist/chunk-F7FVPPBB.js +1080 -0
- package/dist/chunk-F7FVPPBB.js.map +1 -0
- package/dist/{chunk-5Z7FWCV2.js → chunk-HBZPJ3EP.js} +2 -2
- package/dist/{chunk-C2BRIFJG.js → chunk-HJFRHYCI.js} +2 -2
- package/dist/{chunk-ZNMFG62E.js → chunk-KH3JOEPY.js} +3 -2
- package/dist/chunk-KH3JOEPY.js.map +1 -0
- package/dist/{chunk-BTMFZ66D.js → chunk-KM6VAKIE.js} +2 -2
- package/dist/{chunk-DGQMDJXK.js → chunk-LZNZLCOE.js} +2 -2
- package/dist/chunk-MQPC3P4T.js +126 -0
- package/dist/chunk-MQPC3P4T.js.map +1 -0
- package/dist/{chunk-2FRWNSRO.js → chunk-NSLXEDIS.js} +3 -2
- package/dist/chunk-NSLXEDIS.js.map +1 -0
- package/dist/{chunk-3GODX3D6.js → chunk-QDXV544C.js} +2 -2
- package/dist/chunk-QDXV544C.js.map +1 -0
- package/dist/{chunk-4LOMIQVX.js → chunk-W675RFOA.js} +3 -2
- package/dist/chunk-W675RFOA.js.map +1 -0
- package/dist/{chunk-G3ETON2A.js → chunk-WU4VLSEA.js} +3 -2
- package/dist/chunk-WU4VLSEA.js.map +1 -0
- package/dist/{chunk-IZ7MV6HM.js → chunk-XVFQZ3ZG.js} +3 -2
- package/dist/chunk-XVFQZ3ZG.js.map +1 -0
- package/dist/{chunk-LIPK4UCS.js → chunk-YCIBJ6OQ.js} +140 -209
- package/dist/chunk-YCIBJ6OQ.js.map +1 -0
- package/dist/cn.js +1 -1
- package/dist/code-block.js +2 -2
- package/dist/code-block.js.map +1 -1
- package/dist/command.js +3 -3
- package/dist/comparison-table.d.ts +44 -0
- package/dist/comparison-table.js +84 -0
- package/dist/comparison-table.js.map +1 -0
- package/dist/confirm-button.js +2 -2
- package/dist/continue-prompt.js +3 -3
- package/dist/continue-prompt.js.map +1 -1
- package/dist/cta-panel.js +1 -1
- package/dist/data-table.js +19 -1066
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.js +4 -4
- package/dist/decision-list.js +1 -1
- package/dist/dialog.js +3 -2
- package/dist/dialog.js.map +1 -1
- package/dist/docs-nav.d.ts +36 -0
- package/dist/docs-nav.js +44 -0
- package/dist/docs-nav.js.map +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/error-page.js +1 -1
- package/dist/field.js +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/force-update-screen.js +2 -1
- package/dist/force-update-screen.js.map +1 -1
- package/dist/gallery-page.js +1 -1
- package/dist/genui.d.ts +221 -0
- package/dist/genui.js +533 -0
- package/dist/genui.js.map +1 -0
- package/dist/glow-card.js +1 -1
- package/dist/goal-gauge.js +1 -1
- package/dist/how-it-works-page.js +1 -1
- package/dist/image-cropper.js +3 -3
- package/dist/index.d.ts +17 -24
- package/dist/index.js +4 -4
- package/dist/landscape.js +1 -1
- package/dist/link-card.d.ts +9 -2
- package/dist/link-card.js +5 -44
- package/dist/link-card.js.map +1 -1
- package/dist/longform-page.js +1 -1
- package/dist/maintenance-screen.js +2 -1
- package/dist/maintenance-screen.js.map +1 -1
- package/dist/map.js +3 -3
- package/dist/map.js.map +1 -1
- package/dist/markdown.js +2 -1
- package/dist/markdown.js.map +1 -1
- package/dist/marketing-layout.js +1 -1
- package/dist/marketing-layout.js.map +1 -1
- package/dist/marquee.js +1 -1
- package/dist/mascot-quote.js +1 -1
- package/dist/match-dialog.js +2 -1
- package/dist/match-dialog.js.map +1 -1
- package/dist/media-grid.d.ts +26 -4
- package/dist/media-grid.js +122 -163
- package/dist/media-grid.js.map +1 -1
- package/dist/meta-row.d.ts +54 -0
- package/dist/meta-row.js +35 -0
- package/dist/meta-row.js.map +1 -0
- package/dist/native/map.js +3 -3
- package/dist/native/map.js.map +1 -1
- package/dist/native.d.ts +42 -16
- package/dist/native.js +591 -537
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.js +3 -3
- package/dist/page-hero.js +5 -5
- package/dist/page.js +2 -2
- package/dist/popover.js +1 -1
- package/dist/pricing-page.js +1 -1
- package/dist/product-page.js +1 -1
- package/dist/profile-card.js +1 -1
- package/dist/promise-card.js +1 -1
- package/dist/radio-group.js +2 -2
- package/dist/rail-nav.d.ts +149 -0
- package/dist/rail-nav.js +177 -0
- package/dist/rail-nav.js.map +1 -0
- package/dist/scroll-stage.js +1 -1
- package/dist/settings-layout.d.ts +75 -62
- package/dist/settings-layout.js +39 -6
- package/dist/settings-layout.js.map +1 -1
- package/dist/showcase.js +1 -1
- package/dist/site-footer.d.ts +48 -67
- package/dist/site-footer.js +36 -12
- package/dist/site-footer.js.map +1 -1
- package/dist/skip-link.js +1 -1
- package/dist/slider.js +2 -2
- package/dist/stage-banner.js +1 -1
- package/dist/step-showcase.d.ts +62 -0
- package/dist/step-showcase.js +227 -0
- package/dist/step-showcase.js.map +1 -0
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/terminal-replay.js +1 -1
- package/dist/theme.js +2 -1
- package/dist/theme.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/toc.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/update-prompt.js +2 -1
- package/dist/update-prompt.js.map +1 -1
- package/dist/vertical-video.js +2 -2
- package/dist/video-player.js +3 -3
- package/dist/waveform.d.ts +93 -0
- package/dist/waveform.js +95 -0
- package/dist/waveform.js.map +1 -0
- package/package.json +138 -10
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/activity-feed.json +1 -1
- package/registry/alert.json +1 -1
- package/registry/app-header.json +202 -0
- package/registry/app-shell.json +33 -9
- package/registry/argument-card.json +37 -5
- package/registry/audio-player.json +5 -3
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +1 -1
- package/registry/badge.json +1 -1
- package/registry/button.json +3 -2
- package/registry/captcha.json +300 -0
- package/registry/card-grid.json +27 -3
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.json +11 -7
- package/registry/chat.json +1 -1
- package/registry/checkbox.json +1 -1
- package/registry/chip-link.json +1 -1
- package/registry/chip.json +1 -1
- package/registry/choice-grid.json +1 -1
- package/registry/cn.json +1 -1
- package/registry/code-block.json +1 -1
- package/registry/combobox.json +1 -1
- package/registry/command.json +1 -1
- package/registry/comparison-table.json +207 -0
- package/registry/component-page.json +1 -1
- package/registry/confirm-button.json +1 -1
- package/registry/contact-page.json +1 -1
- package/registry/continue-prompt.json +1 -1
- package/registry/countdown.json +1 -1
- package/registry/cta-panel.json +1 -1
- package/registry/dashboard-layout.json +1 -1
- package/registry/data-table.json +1 -1
- package/registry/date-picker.json +1 -1
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +1 -1
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +1 -1
- package/registry/docs-article-page.json +1 -1
- package/registry/docs-hub-page.json +1 -1
- package/registry/docs-layout.json +1 -1
- package/registry/docs-nav.json +177 -0
- package/registry/document-viewer.json +1 -1
- package/registry/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/activity-feed/native/notifications.light.png +0 -0
- package/registry/examples/app-header/basic.d.ts +4 -0
- package/registry/examples/app-header/basic.js +23 -0
- package/registry/examples/app-header/basic.tsx +17 -0
- package/registry/examples/app-shell/desktop.d.ts +4 -0
- package/registry/examples/app-shell/desktop.js +41 -0
- package/registry/examples/app-shell/desktop.tsx +37 -0
- package/registry/examples/argument-card/hover-light.d.ts +4 -0
- package/registry/examples/argument-card/hover-light.js +17 -0
- package/registry/examples/argument-card/hover-light.tsx +19 -0
- package/registry/examples/argument-card/hover-quiet.d.ts +4 -0
- package/registry/examples/argument-card/hover-quiet.js +17 -0
- package/registry/examples/argument-card/hover-quiet.tsx +19 -0
- package/registry/examples/avatar/native/group.light.png +0 -0
- package/registry/examples/avatar/native/presence.light.png +0 -0
- package/registry/examples/avatar/native/sizes.light.png +0 -0
- package/registry/examples/badge/native/tones.light.png +0 -0
- package/registry/examples/button/native/ghost.light.png +0 -0
- package/registry/examples/captcha/disclosure.d.ts +4 -0
- package/registry/examples/captcha/disclosure.js +14 -0
- package/registry/examples/captcha/disclosure.tsx +11 -0
- package/registry/examples/captcha/form.d.ts +4 -0
- package/registry/examples/captcha/form.js +18 -0
- package/registry/examples/captcha/form.tsx +17 -0
- package/registry/examples/card/native/body.light.png +0 -0
- package/registry/examples/card/native/default.light.png +0 -0
- package/registry/examples/card/native/elevated.light.png +0 -0
- package/registry/examples/card/native/pressable.light.png +0 -0
- package/registry/examples/card-grid/hover-quiet.d.ts +4 -0
- package/registry/examples/card-grid/hover-quiet.js +18 -0
- package/registry/examples/card-grid/hover-quiet.tsx +20 -0
- package/registry/examples/changelog-page/releases.js +1 -1
- package/registry/examples/changelog-page/releases.tsx +1 -1
- package/registry/examples/chat/native/conversation.light.png +0 -0
- package/registry/examples/chat/native/inbox.light.png +0 -0
- package/registry/examples/chip/native/multiple.light.png +0 -0
- package/registry/examples/chip/native/removable.light.png +0 -0
- package/registry/examples/chip/native/single.light.png +0 -0
- package/registry/examples/chip/native/toggle.light.png +0 -0
- package/registry/examples/combobox/native/multiple.light.png +0 -0
- package/registry/examples/combobox/native/search.light.png +0 -0
- package/registry/examples/comparison-table/versus.d.ts +4 -0
- package/registry/examples/comparison-table/versus.js +28 -0
- package/registry/examples/comparison-table/versus.tsx +20 -0
- package/registry/examples/countdown/native/days.light.png +0 -0
- package/registry/examples/countdown/native/hours.light.png +0 -0
- package/registry/examples/countdown/native/sizes.light.png +0 -0
- package/registry/examples/countdown/native/urgent.light.png +0 -0
- package/registry/examples/countdown/native/with-label.light.png +0 -0
- package/registry/examples/date-picker/native/birth-date-wheel.light.png +0 -0
- package/registry/examples/date-picker/native/birth-date.light.png +0 -0
- package/registry/examples/date-picker/native/calendar.dark.png +0 -0
- package/registry/examples/date-picker/native/calendar.light.png +0 -0
- package/registry/examples/date-picker/native/day-strip.dark.png +0 -0
- package/registry/examples/date-picker/native/day-strip.light.png +0 -0
- package/registry/examples/date-picker/native/time-slots.dark.png +0 -0
- package/registry/examples/date-picker/native/time-slots.light.png +0 -0
- package/registry/examples/date-picker/native/time-wheel.light.png +0 -0
- package/registry/examples/description-list/native/job-details.light.png +0 -0
- package/registry/examples/dialog/native/sheet.dark.png +0 -0
- package/registry/examples/dialog/native/sheet.light.png +0 -0
- package/registry/examples/docs-nav/groups.d.ts +4 -0
- package/registry/examples/docs-nav/groups.js +21 -0
- package/registry/examples/docs-nav/groups.tsx +15 -0
- package/registry/examples/empty-state/native/default.light.png +0 -0
- package/registry/examples/field/native/default.light.png +0 -0
- package/registry/examples/field/native/select.light.png +0 -0
- package/registry/examples/force-update-screen/native/default.light.png +0 -0
- package/registry/examples/form/native/amount.light.png +0 -0
- package/registry/examples/form/native/audience.light.png +0 -0
- package/registry/examples/form/native/profile.light.png +0 -0
- package/registry/examples/form/native/settings.light.png +0 -0
- package/registry/examples/form/native/sign-up.light.png +0 -0
- package/registry/examples/form/native/upload.dark.png +0 -0
- package/registry/examples/form/native/upload.light.png +0 -0
- package/registry/examples/genui/streaming.d.ts +4 -0
- package/registry/examples/genui/streaming.js +18 -0
- package/registry/examples/genui/streaming.tsx +14 -0
- package/registry/examples/genui/table.d.ts +4 -0
- package/registry/examples/genui/table.js +19 -0
- package/registry/examples/genui/table.tsx +14 -0
- package/registry/examples/goal-gauge/native/default.light.png +0 -0
- package/registry/examples/header/native/large-title.light.png +0 -0
- package/registry/examples/link-card/hover-light.d.ts +4 -0
- package/registry/examples/link-card/hover-light.js +18 -0
- package/registry/examples/link-card/hover-light.tsx +20 -0
- package/registry/examples/link-card/hover-quiet.d.ts +4 -0
- package/registry/examples/link-card/hover-quiet.js +18 -0
- package/registry/examples/link-card/hover-quiet.tsx +20 -0
- package/registry/examples/loader/native/job-wait.light.png +0 -0
- package/registry/examples/maintenance-screen/native/default.light.png +0 -0
- package/registry/examples/map/native/places.light.png +0 -0
- package/registry/examples/markdown/native/basic.light.png +0 -0
- package/registry/examples/mascot-state/native/default.light.png +0 -0
- package/registry/examples/media-picker/native/story.light.png +0 -0
- package/registry/examples/meta-row/native/video.d.ts +4 -0
- package/registry/examples/meta-row/native/video.dark.png +0 -0
- package/registry/examples/meta-row/native/video.js +11 -0
- package/registry/examples/meta-row/native/video.light.png +0 -0
- package/registry/examples/meta-row/native/video.tsx +5 -0
- package/registry/examples/meta-row/status.d.ts +4 -0
- package/registry/examples/meta-row/status.js +12 -0
- package/registry/examples/meta-row/status.tsx +7 -0
- package/registry/examples/meta-row/video.d.ts +4 -0
- package/registry/examples/meta-row/video.js +12 -0
- package/registry/examples/meta-row/video.tsx +7 -0
- package/registry/examples/meter/native/credits.light.png +0 -0
- package/registry/examples/meter/native/split-ring.light.png +0 -0
- package/registry/examples/number-ticker/native/balance.light.png +0 -0
- package/registry/examples/onboarding/native/first-launch.light.png +0 -0
- package/registry/examples/otp-input/native/verify.light.png +0 -0
- package/registry/examples/pagination/native/cursor.light.png +0 -0
- package/registry/examples/pagination/native/pages.light.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
- package/registry/examples/permission-prompt/native/camera.light.png +0 -0
- package/registry/examples/profile-card/native/default.light.png +0 -0
- package/registry/examples/radio-group/native/buttons.light.png +0 -0
- package/registry/examples/radio-group/native/cards.light.png +0 -0
- package/registry/examples/radio-group/native/list.light.png +0 -0
- package/registry/examples/radio-group/native/segmented.light.png +0 -0
- package/registry/examples/rail-nav/expandable.d.ts +4 -0
- package/registry/examples/rail-nav/expandable.js +34 -0
- package/registry/examples/rail-nav/expandable.tsx +28 -0
- package/registry/examples/rail-nav/studio.d.ts +4 -0
- package/registry/examples/rail-nav/studio.js +43 -0
- package/registry/examples/rail-nav/studio.tsx +38 -0
- package/registry/examples/screen/native/app-shell.light.png +0 -0
- package/registry/examples/screen/native/auth.light.png +0 -0
- package/registry/examples/screen/native/map.light.png +0 -0
- package/registry/examples/screen/native/notifications.light.png +0 -0
- package/registry/examples/screen/native/profile.light.png +0 -0
- package/registry/examples/segmented/native/default.light.png +0 -0
- package/registry/examples/segmented/native/small.light.png +0 -0
- package/registry/examples/settings-layout/flat.d.ts +4 -0
- package/registry/examples/settings-layout/flat.js +26 -0
- package/registry/examples/settings-layout/flat.tsx +30 -0
- package/registry/examples/showcase/native/slides.light.png +0 -0
- package/registry/examples/site-footer/app.d.ts +4 -0
- package/registry/examples/site-footer/app.js +25 -0
- package/registry/examples/site-footer/app.tsx +22 -0
- package/registry/examples/site-footer/docs.d.ts +4 -0
- package/registry/examples/site-footer/docs.js +31 -0
- package/registry/examples/site-footer/docs.tsx +24 -0
- package/registry/examples/slider/native/default.light.png +0 -0
- package/registry/examples/slider/native/stepped.light.png +0 -0
- package/registry/examples/step-progress/native/sign-up.light.png +0 -0
- package/registry/examples/step-showcase/desktop.d.ts +4 -0
- package/registry/examples/step-showcase/desktop.js +24 -0
- package/registry/examples/step-showcase/desktop.tsx +19 -0
- package/registry/examples/step-showcase/phone.d.ts +4 -0
- package/registry/examples/step-showcase/phone.js +24 -0
- package/registry/examples/step-showcase/phone.tsx +19 -0
- package/registry/examples/stepper/native/run.light.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
- package/registry/examples/switch/native/settings.light.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
- package/registry/examples/tabs/native/sections.light.png +0 -0
- package/registry/examples/tabs/native/segmented.light.png +0 -0
- package/registry/examples/tag-selector/native/interests.light.png +0 -0
- package/registry/examples/toast/native/tones.light.png +0 -0
- package/registry/examples/txt/native/tones.dark.png +0 -0
- package/registry/examples/txt/native/tones.light.png +0 -0
- package/registry/examples/update-prompt/native/default.light.png +0 -0
- package/registry/examples/waveform/card.d.ts +4 -0
- package/registry/examples/waveform/card.js +18 -0
- package/registry/examples/waveform/card.tsx +16 -0
- package/registry/examples/waveform/native/card.d.ts +4 -0
- package/registry/examples/waveform/native/card.dark.png +0 -0
- package/registry/examples/waveform/native/card.js +19 -0
- package/registry/examples/waveform/native/card.light.png +0 -0
- package/registry/examples/waveform/native/card.tsx +19 -0
- package/registry/examples/waveform/sizes.d.ts +4 -0
- package/registry/examples/waveform/sizes.js +16 -0
- package/registry/examples/waveform/sizes.tsx +14 -0
- package/registry/field.json +1 -1
- package/registry/file-upload.json +1 -1
- package/registry/filter-bar.json +1 -1
- package/registry/force-update-screen.json +1 -1
- package/registry/form.json +1 -1
- package/registry/gallery-page.json +1 -1
- package/registry/genui.json +409 -0
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/index.json +323 -14
- package/registry/iso.json +1 -1
- package/registry/kanban.json +1 -1
- package/registry/kbd.json +1 -1
- package/registry/landing-page.json +1 -1
- package/registry/landscape.json +1 -1
- package/registry/legal-page.json +1 -1
- package/registry/link-card.json +38 -6
- package/registry/list.json +1 -1
- package/registry/loader.json +1 -1
- package/registry/longform-page.json +1 -1
- package/registry/maintenance-screen.json +1 -1
- package/registry/map.json +2 -2
- package/registry/markdown.json +1 -1
- 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 +1 -1
- package/registry/mascots.json +1 -1
- package/registry/match-dialog.json +1 -1
- package/registry/media-capture.json +1 -1
- package/registry/media-grid.json +92 -6
- package/registry/meta-row.json +215 -0
- package/registry/meter.json +1 -1
- package/registry/nav-bar.json +13 -13
- package/registry/number-ticker.json +1 -1
- package/registry/page-header.json +1 -1
- package/registry/page-hero.json +1 -1
- package/registry/page.json +1 -1
- package/registry/pagination.json +1 -1
- package/registry/photo-grid.json +1 -1
- package/registry/pointer-light.json +1 -1
- package/registry/popover.json +1 -1
- package/registry/pricing-page.json +1 -1
- package/registry/product-page.json +1 -1
- package/registry/profile-card.json +1 -1
- package/registry/progress.json +1 -1
- package/registry/promise-card.json +1 -1
- package/registry/radio-group.json +1 -1
- package/registry/rail-nav.json +493 -0
- package/registry/recipes.json +1 -1
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +1 -1
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +104 -9
- package/registry/showcase.json +1 -1
- package/registry/site-footer.json +49 -17
- package/registry/sites.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/skip-link.json +2 -2
- package/registry/slider.json +1 -1
- package/registry/slot.json +1 -1
- package/registry/spinner.json +1 -1
- package/registry/split-view.json +1 -1
- package/registry/stage-banner.json +1 -1
- package/registry/stat.json +1 -1
- package/registry/status-page.json +1 -1
- package/registry/step-progress.json +1 -1
- package/registry/step-showcase.json +296 -0
- package/registry/stepper.json +1 -1
- package/registry/swipe-deck.json +1 -1
- package/registry/switch.json +1 -1
- package/registry/tabs.json +2 -2
- package/registry/tag-input.json +1 -1
- package/registry/tag-selector.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +1 -1
- package/registry/toast.json +1 -1
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +1 -1
- package/registry/update-prompt.json +1 -1
- package/registry/verified-badge.json +1 -1
- package/registry/vertical-video.json +1 -1
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/registry/waveform.json +296 -0
- package/dist/chunk-2FRWNSRO.js.map +0 -1
- package/dist/chunk-3BC4XQ6C.js.map +0 -1
- package/dist/chunk-3GODX3D6.js.map +0 -1
- package/dist/chunk-3IN6TOPM.js.map +0 -1
- package/dist/chunk-4LOMIQVX.js.map +0 -1
- package/dist/chunk-G3ETON2A.js.map +0 -1
- package/dist/chunk-IZ7MV6HM.js.map +0 -1
- package/dist/chunk-LIPK4UCS.js.map +0 -1
- package/dist/chunk-OWC2LZD2.js.map +0 -1
- package/dist/chunk-ZNMFG62E.js.map +0 -1
- /package/dist/{chunk-5MH64NIL.js.map → chunk-2L67YTNV.js.map} +0 -0
- /package/dist/{chunk-FKBHWS4N.js.map → chunk-CEJDH6SA.js.map} +0 -0
- /package/dist/{chunk-5Z7FWCV2.js.map → chunk-HBZPJ3EP.js.map} +0 -0
- /package/dist/{chunk-C2BRIFJG.js.map → chunk-HJFRHYCI.js.map} +0 -0
- /package/dist/{chunk-BTMFZ66D.js.map → chunk-KM6VAKIE.js.map} +0 -0
- /package/dist/{chunk-DGQMDJXK.js.map → chunk-LZNZLCOE.js.map} +0 -0
package/dist/media-grid.js
CHANGED
|
@@ -3,17 +3,19 @@ import "./chunk-NPF3OHE2.js";
|
|
|
3
3
|
import {
|
|
4
4
|
Avatar
|
|
5
5
|
} from "./chunk-KB7OLYIJ.js";
|
|
6
|
+
import {
|
|
7
|
+
Card,
|
|
8
|
+
Skeleton
|
|
9
|
+
} from "./chunk-MQPC3P4T.js";
|
|
6
10
|
import "./chunk-JXLDUDTD.js";
|
|
7
11
|
import {
|
|
8
12
|
Button,
|
|
9
13
|
LoaderGlyph
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import
|
|
12
|
-
defineRecipe
|
|
13
|
-
} from "./chunk-D3T54RSL.js";
|
|
14
|
+
} from "./chunk-DZU6RMYD.js";
|
|
15
|
+
import "./chunk-D3T54RSL.js";
|
|
14
16
|
import {
|
|
15
17
|
cn
|
|
16
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NSLXEDIS.js";
|
|
17
19
|
|
|
18
20
|
// src/media-grid/load-more.tsx
|
|
19
21
|
import * as React from "react";
|
|
@@ -62,7 +64,10 @@ function LoadMore({ onLoadMore, hasMore, loading = false, failed = false, label,
|
|
|
62
64
|
] });
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
// src/media-grid/
|
|
67
|
+
// src/media-grid/media-grid.tsx
|
|
68
|
+
import * as React4 from "react";
|
|
69
|
+
|
|
70
|
+
// src/media-grid/section-hint.tsx
|
|
66
71
|
import * as React2 from "react";
|
|
67
72
|
|
|
68
73
|
// src/block-link.tsx
|
|
@@ -80,33 +85,89 @@ function BlockLink({
|
|
|
80
85
|
return /* @__PURE__ */ jsx3(Comp, { href, ...props });
|
|
81
86
|
}
|
|
82
87
|
|
|
88
|
+
// src/media-grid/section-hint.tsx
|
|
89
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
90
|
+
function SectionHint({ label, text, link }) {
|
|
91
|
+
const [open, setOpen] = React2.useState(false);
|
|
92
|
+
const id = React2.useId();
|
|
93
|
+
return /* @__PURE__ */ jsxs2(
|
|
94
|
+
"span",
|
|
95
|
+
{
|
|
96
|
+
className: "relative inline-flex",
|
|
97
|
+
onMouseEnter: () => setOpen(true),
|
|
98
|
+
onMouseLeave: () => setOpen(false),
|
|
99
|
+
onBlur: (e) => {
|
|
100
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setOpen(false);
|
|
101
|
+
},
|
|
102
|
+
onKeyDown: (e) => {
|
|
103
|
+
if (e.key === "Escape") setOpen(false);
|
|
104
|
+
},
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx4(
|
|
107
|
+
"button",
|
|
108
|
+
{
|
|
109
|
+
type: "button",
|
|
110
|
+
"aria-label": label,
|
|
111
|
+
"aria-expanded": open,
|
|
112
|
+
"aria-controls": id,
|
|
113
|
+
onClick: () => setOpen((o) => !o),
|
|
114
|
+
className: "inline-flex h-6 w-6 items-center justify-center rounded-full text-fg-muted transition-colors hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
115
|
+
children: /* @__PURE__ */ jsxs2("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": true, children: [
|
|
116
|
+
/* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "9" }),
|
|
117
|
+
/* @__PURE__ */ jsx4("path", { d: "M12 11v5M12 8h.01" })
|
|
118
|
+
] })
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsxs2(
|
|
122
|
+
"span",
|
|
123
|
+
{
|
|
124
|
+
id,
|
|
125
|
+
role: "tooltip",
|
|
126
|
+
hidden: !open,
|
|
127
|
+
className: cn("absolute left-0 top-full z-20 mt-1 w-64 max-w-[80vw] rounded-xl border border-border-default bg-surface-1 p-3 text-sm font-normal leading-snug text-fg-secondary shadow-lg"),
|
|
128
|
+
children: [
|
|
129
|
+
text,
|
|
130
|
+
link && /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
131
|
+
" ",
|
|
132
|
+
/* @__PURE__ */ jsx4(BlockLink, { href: link.href, linkAs: link.linkAs, className: "font-semibold text-fg-accent hover:underline", children: link.label })
|
|
133
|
+
] })
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
]
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
|
|
83
142
|
// src/media-grid/shorts-shelf.tsx
|
|
84
|
-
import
|
|
85
|
-
|
|
143
|
+
import * as React3 from "react";
|
|
144
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
145
|
+
var Chevron = ({ flip }) => /* @__PURE__ */ jsx5("svg", { viewBox: "0 0 24 24", width: "18", height: "18", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": true, className: flip ? "rotate-180" : void 0, children: /* @__PURE__ */ jsx5("path", { d: "m9 6 6 6-6 6" }) });
|
|
86
146
|
var ARROW = "hidden h-9 w-9 items-center justify-center rounded-full border border-border-default bg-surface-1 text-fg shadow-sm transition-colors hover:bg-surface-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40 [@media(hover:hover)]:inline-flex";
|
|
87
|
-
function ShortsShelf({ label, title, items, getId, renderItem, seeAll, previousLabel, nextLabel, className, ...props }) {
|
|
88
|
-
const row =
|
|
89
|
-
const [edge, setEdge] =
|
|
90
|
-
const measure =
|
|
147
|
+
function ShortsShelf({ label, title, hint, items, getId, renderItem, seeAll, previousLabel, nextLabel, className, ...props }) {
|
|
148
|
+
const row = React3.useRef(null);
|
|
149
|
+
const [edge, setEdge] = React3.useState({ start: true, end: false });
|
|
150
|
+
const measure = React3.useCallback(() => {
|
|
91
151
|
const el = row.current;
|
|
92
152
|
if (!el) return;
|
|
93
153
|
setEdge({ start: el.scrollLeft <= 2, end: el.scrollLeft + el.clientWidth >= el.scrollWidth - 2 });
|
|
94
154
|
}, []);
|
|
95
|
-
|
|
155
|
+
React3.useEffect(measure, [measure, items.length]);
|
|
96
156
|
const page = (dir) => {
|
|
97
157
|
const el = row.current;
|
|
98
158
|
if (el) el.scrollBy({ left: dir * el.clientWidth * 0.85, behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth" });
|
|
99
159
|
};
|
|
100
|
-
const headingId =
|
|
160
|
+
const headingId = React3.useId();
|
|
101
161
|
if (items.length === 0) return null;
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
/* @__PURE__ */
|
|
162
|
+
return /* @__PURE__ */ jsxs3("section", { "aria-labelledby": headingId, "data-shorts-shelf": true, className: cn("min-w-0", className), ...props, children: [
|
|
163
|
+
/* @__PURE__ */ jsxs3("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
164
|
+
/* @__PURE__ */ jsx5("h2", { id: headingId, className: "m-0 mr-auto text-base font-bold text-fg", children: title ?? label }),
|
|
165
|
+
hint && /* @__PURE__ */ jsx5(SectionHint, { ...hint }),
|
|
166
|
+
seeAll && /* @__PURE__ */ jsx5(BlockLink, { href: seeAll.href, linkAs: seeAll.linkAs, className: "text-sm font-semibold text-fg-accent hover:underline", children: seeAll.label }),
|
|
167
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "aria-label": previousLabel, disabled: edge.start, onClick: () => page(-1), className: ARROW, children: /* @__PURE__ */ jsx5(Chevron, { flip: true }) }),
|
|
168
|
+
/* @__PURE__ */ jsx5("button", { type: "button", "aria-label": nextLabel, disabled: edge.end, onClick: () => page(1), className: ARROW, children: /* @__PURE__ */ jsx5(Chevron, {}) })
|
|
108
169
|
] }),
|
|
109
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ jsx5(
|
|
110
171
|
"ul",
|
|
111
172
|
{
|
|
112
173
|
ref: row,
|
|
@@ -114,129 +175,40 @@ function ShortsShelf({ label, title, items, getId, renderItem, seeAll, previousL
|
|
|
114
175
|
tabIndex: 0,
|
|
115
176
|
"aria-labelledby": headingId,
|
|
116
177
|
className: "m-0 flex list-none snap-x snap-mandatory items-stretch gap-3 overflow-x-auto overflow-y-hidden overscroll-x-contain p-0 pt-1 -mt-1 pb-2 [scrollbar-width:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-scrollbar]:hidden",
|
|
117
|
-
children: items.map((item, i) => /* @__PURE__ */
|
|
178
|
+
children: items.map((item, i) => /* @__PURE__ */ jsx5("li", { className: "w-[9.5rem] shrink-0 snap-start sm:w-44", children: renderItem(item, i) }, getId(item)))
|
|
118
179
|
}
|
|
119
180
|
)
|
|
120
181
|
] });
|
|
121
182
|
}
|
|
122
183
|
|
|
123
184
|
// src/media-grid/media-grid.tsx
|
|
124
|
-
import { jsx as
|
|
185
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
125
186
|
var GRID = {
|
|
126
187
|
landscape: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
127
188
|
portrait: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-6"
|
|
128
189
|
};
|
|
129
|
-
function MediaGrid({ items, getId, orientationOf, renderItem, mode = "split", frame = "landscape", layout = "grid", shelf, className, ...props }) {
|
|
190
|
+
function MediaGrid({ items, getId, orientationOf, renderItem, mode = "split", frame = "landscape", layout = "grid", shelf, grid, className, ...props }) {
|
|
191
|
+
const gridHeading = React4.useId();
|
|
130
192
|
const row = layout === "list";
|
|
131
193
|
const split = mode === "split";
|
|
132
194
|
const verticals = split ? items.filter((i) => orientationOf(i) === "portrait") : [];
|
|
133
195
|
const rest = split ? items.filter((i) => orientationOf(i) !== "portrait") : items;
|
|
134
196
|
const gridFrame = split ? "landscape" : frame;
|
|
135
197
|
const state = (item, aspect) => ({ aspect, layout: row ? "row" : "stack", mismatch: orientationOf(item) !== aspect });
|
|
136
|
-
return /* @__PURE__ */
|
|
137
|
-
verticals.length > 0 && /* @__PURE__ */
|
|
138
|
-
rest.length > 0 && /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ jsxs4("div", { "data-media-grid": mode, className: cn("flex min-w-0 flex-col gap-8", className), ...props, children: [
|
|
199
|
+
verticals.length > 0 && /* @__PURE__ */ jsx6(ShortsShelf, { ...shelf, items: verticals, getId, renderItem: (item) => renderItem(item, { ...state(item, "portrait"), layout: "stack" }) }),
|
|
200
|
+
rest.length > 0 && /* @__PURE__ */ jsxs4("section", { "aria-labelledby": grid ? gridHeading : void 0, "data-media-grid-section": true, className: "min-w-0", children: [
|
|
201
|
+
grid && /* @__PURE__ */ jsxs4("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
202
|
+
/* @__PURE__ */ jsx6("h2", { id: gridHeading, className: "m-0 text-base font-bold text-fg", children: grid.label }),
|
|
203
|
+
grid.hint && /* @__PURE__ */ jsx6(SectionHint, { ...grid.hint })
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ jsx6("ul", { "data-grid-frame": gridFrame, className: cn("m-0 grid list-none auto-rows-fr gap-4 p-0", row ? "grid-cols-1" : GRID[gridFrame]), children: rest.map((item) => /* @__PURE__ */ jsx6("li", { className: "min-w-0", children: renderItem(item, state(item, gridFrame)) }, getId(item))) })
|
|
206
|
+
] })
|
|
139
207
|
] });
|
|
140
208
|
}
|
|
141
209
|
|
|
142
210
|
// src/media-grid/video-card.tsx
|
|
143
|
-
import * as
|
|
144
|
-
|
|
145
|
-
// src/card/card.tsx
|
|
146
|
-
import { Slot } from "radix-ui";
|
|
147
|
-
import { tv as tv2 } from "tailwind-variants";
|
|
148
|
-
|
|
149
|
-
// src/card/recipe.ts
|
|
150
|
-
var cardRecipe = defineRecipe({
|
|
151
|
-
slots: {
|
|
152
|
-
root: "group relative flex flex-col overflow-hidden border border-border-default bg-surface-1 text-fg transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
153
|
-
media: "relative overflow-hidden bg-media",
|
|
154
|
-
image: "h-full w-full object-cover transition-transform duration-500 motion-safe:group-hover:scale-105",
|
|
155
|
-
fallback: "flex h-full w-full items-center justify-center bg-linear-to-br from-accent/15 via-media to-accent-2/15 text-accent/60",
|
|
156
|
-
overlay: "absolute z-10 flex items-center gap-1.5",
|
|
157
|
-
body: "relative flex flex-1 flex-col gap-3",
|
|
158
|
-
title: "line-clamp-1 text-sm font-semibold text-fg transition-colors group-hover:text-fg-accent",
|
|
159
|
-
description: "line-clamp-2 text-xs text-fg-secondary",
|
|
160
|
-
stat: "min-w-0",
|
|
161
|
-
statLabel: "text-[10px] font-semibold uppercase tracking-wider text-fg-secondary",
|
|
162
|
-
statValue: "font-display text-xl font-black tabular-nums text-fg",
|
|
163
|
-
footer: "relative mt-auto flex items-center gap-2 border-t border-border-subtle pt-3 text-xs text-fg-secondary"
|
|
164
|
-
},
|
|
165
|
-
variants: {
|
|
166
|
-
radius: { md: { root: "rounded-md" }, lg: { root: "rounded-lg" }, xl: { root: "rounded-xl" } },
|
|
167
|
-
tone: { default: {}, elevated: { root: "bg-surface-2 shadow-md" }, glass: { root: "bg-surface-1/70 backdrop-blur-md" } },
|
|
168
|
-
interactive: { true: { root: "kz-spotlight kz-lift hover:border-accent/50" } },
|
|
169
|
-
padding: { none: { body: "p-0" }, sm: { body: "p-3" }, md: { body: "p-4" }, lg: { body: "p-6" } }
|
|
170
|
-
},
|
|
171
|
-
defaultVariants: { radius: "xl", tone: "default", padding: "md" }
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
// src/card/card.tsx
|
|
175
|
-
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
176
|
-
var card = tv2(cardRecipe);
|
|
177
|
-
var slots = card();
|
|
178
|
-
function CardRoot({ asChild, reveal, radius, tone, interactive, className, style, ...props }) {
|
|
179
|
-
const Comp = asChild ? Slot.Root : "div";
|
|
180
|
-
const revealStyle = reveal === void 0 ? style : { ...style, "--kz-delay": `${Math.min(Math.max(reveal, 0), 8) * 50}ms` };
|
|
181
|
-
return /* @__PURE__ */ jsx6(
|
|
182
|
-
Comp,
|
|
183
|
-
{
|
|
184
|
-
"data-reveal": reveal === void 0 ? void 0 : "",
|
|
185
|
-
"data-interactive": interactive ? "" : void 0,
|
|
186
|
-
style: revealStyle,
|
|
187
|
-
className: card({ radius, tone, interactive }).root({ className }),
|
|
188
|
-
...props
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
var ASPECT = { video: "aspect-video", square: "aspect-square", portrait: "aspect-[3/4]", auto: "" };
|
|
193
|
-
function CardMedia({ aspect = "video", className, ...props }) {
|
|
194
|
-
return /* @__PURE__ */ jsx6("div", { "data-aspect": aspect, className: slots.media({ className: cn(ASPECT[aspect], className) }), ...props });
|
|
195
|
-
}
|
|
196
|
-
function CardImage({ src, alt = "", fallback, loading = "lazy", className, ...props }) {
|
|
197
|
-
if (!src) {
|
|
198
|
-
return /* @__PURE__ */ jsx6("div", { "data-fallback": "", "aria-hidden": true, className: slots.fallback({ className }), children: fallback });
|
|
199
|
-
}
|
|
200
|
-
return /* @__PURE__ */ jsx6("img", { src, alt, loading, decoding: "async", className: slots.image({ className }), ...props });
|
|
201
|
-
}
|
|
202
|
-
var CORNER = {
|
|
203
|
-
"top-left": "left-2.5 top-2.5",
|
|
204
|
-
"top-right": "right-2.5 top-2.5",
|
|
205
|
-
"bottom-left": "bottom-2.5 left-2.5",
|
|
206
|
-
"bottom-right": "bottom-2.5 right-2.5"
|
|
207
|
-
};
|
|
208
|
-
function CardOverlay({ corner = "top-left", className, ...props }) {
|
|
209
|
-
return /* @__PURE__ */ jsx6("div", { "data-corner": corner, className: slots.overlay({ className: cn(CORNER[corner], className) }), ...props });
|
|
210
|
-
}
|
|
211
|
-
function CardBody({ padding, className, ...props }) {
|
|
212
|
-
return /* @__PURE__ */ jsx6("div", { className: card({ padding }).body({ className }), ...props });
|
|
213
|
-
}
|
|
214
|
-
function CardTitle({ as: Tag = "h3", className, ...props }) {
|
|
215
|
-
return /* @__PURE__ */ jsx6(Tag, { className: slots.title({ className }), ...props });
|
|
216
|
-
}
|
|
217
|
-
function CardDescription({ className, ...props }) {
|
|
218
|
-
return /* @__PURE__ */ jsx6("p", { className: slots.description({ className }), ...props });
|
|
219
|
-
}
|
|
220
|
-
function CardStat({ label, className, children, ...props }) {
|
|
221
|
-
return /* @__PURE__ */ jsxs4("div", { className: slots.stat({ className }), ...props, children: [
|
|
222
|
-
/* @__PURE__ */ jsx6("p", { className: slots.statLabel(), children: label }),
|
|
223
|
-
/* @__PURE__ */ jsx6("p", { className: slots.statValue(), children })
|
|
224
|
-
] });
|
|
225
|
-
}
|
|
226
|
-
function CardFooter({ className, ...props }) {
|
|
227
|
-
return /* @__PURE__ */ jsx6("div", { className: slots.footer({ className }), ...props });
|
|
228
|
-
}
|
|
229
|
-
var Card = {
|
|
230
|
-
Root: CardRoot,
|
|
231
|
-
Media: CardMedia,
|
|
232
|
-
Image: CardImage,
|
|
233
|
-
Overlay: CardOverlay,
|
|
234
|
-
Body: CardBody,
|
|
235
|
-
Title: CardTitle,
|
|
236
|
-
Description: CardDescription,
|
|
237
|
-
Stat: CardStat,
|
|
238
|
-
Footer: CardFooter
|
|
239
|
-
};
|
|
211
|
+
import * as React5 from "react";
|
|
240
212
|
|
|
241
213
|
// src/media-grid/preview-focus.ts
|
|
242
214
|
var MIN_RATIO = 0.6;
|
|
@@ -309,8 +281,8 @@ function VideoCard({
|
|
|
309
281
|
ref,
|
|
310
282
|
...props
|
|
311
283
|
}) {
|
|
312
|
-
const [node, setNode] =
|
|
313
|
-
const setRef =
|
|
284
|
+
const [node, setNode] = React5.useState(null);
|
|
285
|
+
const setRef = React5.useCallback(
|
|
314
286
|
(el) => {
|
|
315
287
|
setNode(el);
|
|
316
288
|
if (typeof ref === "function") ref(el);
|
|
@@ -371,7 +343,7 @@ function VideoCard({
|
|
|
371
343
|
);
|
|
372
344
|
}
|
|
373
345
|
function PreviewLayer({ src, contain }) {
|
|
374
|
-
const [ready, setReady] =
|
|
346
|
+
const [ready, setReady] = React5.useState(false);
|
|
375
347
|
return /* @__PURE__ */ jsx7(
|
|
376
348
|
"img",
|
|
377
349
|
{
|
|
@@ -390,9 +362,9 @@ var matches = (query) => typeof window !== "undefined" && typeof window.matchMed
|
|
|
390
362
|
var hoverCapable = () => matches("(hover: hover)");
|
|
391
363
|
var saveData = () => typeof navigator !== "undefined" && navigator.connection?.saveData === true;
|
|
392
364
|
function usePreviewIntent(node, enabled, delay) {
|
|
393
|
-
const [causes, setCauses] =
|
|
394
|
-
const timers =
|
|
395
|
-
const arm =
|
|
365
|
+
const [causes, setCauses] = React5.useState(/* @__PURE__ */ new Set());
|
|
366
|
+
const timers = React5.useRef(/* @__PURE__ */ new Map());
|
|
367
|
+
const arm = React5.useCallback(
|
|
396
368
|
(cause) => {
|
|
397
369
|
if (!enabled || saveData()) return;
|
|
398
370
|
if (cause === "pointer" && !hoverCapable()) return;
|
|
@@ -404,7 +376,7 @@ function usePreviewIntent(node, enabled, delay) {
|
|
|
404
376
|
},
|
|
405
377
|
[enabled, delay]
|
|
406
378
|
);
|
|
407
|
-
const disarm =
|
|
379
|
+
const disarm = React5.useCallback((cause) => {
|
|
408
380
|
clearTimeout(timers.current.get(cause));
|
|
409
381
|
timers.current.delete(cause);
|
|
410
382
|
setCauses((c) => {
|
|
@@ -414,7 +386,7 @@ function usePreviewIntent(node, enabled, delay) {
|
|
|
414
386
|
return next;
|
|
415
387
|
});
|
|
416
388
|
}, []);
|
|
417
|
-
|
|
389
|
+
React5.useEffect(() => {
|
|
418
390
|
const pending = timers.current;
|
|
419
391
|
return () => {
|
|
420
392
|
for (const t of pending.values()) clearTimeout(t);
|
|
@@ -422,23 +394,23 @@ function usePreviewIntent(node, enabled, delay) {
|
|
|
422
394
|
};
|
|
423
395
|
}, []);
|
|
424
396
|
const touch = enabled && !hoverCapable();
|
|
425
|
-
const leading =
|
|
397
|
+
const leading = React5.useSyncExternalStore(
|
|
426
398
|
subscribeLeader,
|
|
427
399
|
() => isLeader(node),
|
|
428
400
|
() => false
|
|
429
401
|
);
|
|
430
|
-
|
|
402
|
+
React5.useEffect(() => {
|
|
431
403
|
if (!node || !touch) return;
|
|
432
404
|
return trackVisibility(node);
|
|
433
405
|
}, [node, touch]);
|
|
434
|
-
const [ready, setReady] =
|
|
435
|
-
const [wasLeading, setWasLeading] =
|
|
406
|
+
const [ready, setReady] = React5.useState(false);
|
|
407
|
+
const [wasLeading, setWasLeading] = React5.useState(false);
|
|
436
408
|
if (leading !== wasLeading) {
|
|
437
409
|
setWasLeading(leading);
|
|
438
410
|
if (!leading) setReady(false);
|
|
439
411
|
}
|
|
440
412
|
const wanted = touch && leading && !saveData() && !matches("(prefers-reduced-motion: reduce)");
|
|
441
|
-
|
|
413
|
+
React5.useEffect(() => {
|
|
442
414
|
if (!wanted) return;
|
|
443
415
|
const t = setTimeout(() => setReady(true), delay);
|
|
444
416
|
return () => clearTimeout(t);
|
|
@@ -446,39 +418,25 @@ function usePreviewIntent(node, enabled, delay) {
|
|
|
446
418
|
return { live: enabled && (causes.size > 0 || wanted && ready), arm, disarm };
|
|
447
419
|
}
|
|
448
420
|
|
|
449
|
-
// src/skeleton/skeleton.tsx
|
|
450
|
-
import { tv as tv3 } from "tailwind-variants";
|
|
451
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
452
|
-
var skeletonVariants = tv3({
|
|
453
|
-
base: "kz-skeleton block bg-surface-3",
|
|
454
|
-
variants: {
|
|
455
|
-
shape: { text: "h-3 w-full rounded-sm", circle: "aspect-square h-10 rounded-full", rect: "h-24 w-full rounded-lg" }
|
|
456
|
-
},
|
|
457
|
-
defaultVariants: { shape: "text" }
|
|
458
|
-
});
|
|
459
|
-
function Skeleton({ shape, className, ...props }) {
|
|
460
|
-
return /* @__PURE__ */ jsx8("span", { "aria-hidden": true, "data-shape": shape ?? "text", className: skeletonVariants({ shape, className }), ...props });
|
|
461
|
-
}
|
|
462
|
-
|
|
463
421
|
// src/media-grid/video-card-skeleton.tsx
|
|
464
|
-
import { jsx as
|
|
422
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
465
423
|
var FRAME2 = { landscape: "aspect-video", portrait: "aspect-[9/16]" };
|
|
466
424
|
function VideoCardSkeleton({ aspect = "landscape", layout = "stack", className, ...props }) {
|
|
467
425
|
const row = layout === "row";
|
|
468
426
|
const tall = aspect === "portrait" && !row;
|
|
469
|
-
return /* @__PURE__ */
|
|
470
|
-
/* @__PURE__ */
|
|
427
|
+
return /* @__PURE__ */ jsx8("div", { "aria-hidden": true, "data-skeleton": "video-card", "data-aspect": aspect, "data-layout": layout, className: cn("h-full min-w-0", className), ...props, children: /* @__PURE__ */ jsxs6(Card.Root, { tone: "glass", className: cn("h-full w-full max-w-full", row ? "flex-row" : "flex-col"), children: [
|
|
428
|
+
/* @__PURE__ */ jsx8(Card.Media, { aspect: "auto", className: cn("shrink-0", FRAME2[aspect], row && (aspect === "portrait" ? "w-24 sm:w-28" : "w-40 sm:w-56")), children: /* @__PURE__ */ jsx8(Skeleton, { shape: "rect", className: "h-full w-full rounded-none" }) }),
|
|
471
429
|
/* @__PURE__ */ jsxs6(Card.Body, { className: "static min-w-0 flex-1 justify-between gap-2 p-3", children: [
|
|
472
430
|
/* @__PURE__ */ jsxs6("div", { className: "flex min-h-[2.5em] flex-col justify-center gap-1.5", children: [
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ jsx8(Skeleton, { className: "h-3" }),
|
|
432
|
+
/* @__PURE__ */ jsx8(Skeleton, { className: "h-3 w-3/5" })
|
|
475
433
|
] }),
|
|
476
434
|
/* @__PURE__ */ jsxs6("div", { className: cn("flex text-xs", tall ? "flex-col gap-1" : "h-8 items-center gap-2"), children: [
|
|
477
435
|
/* @__PURE__ */ jsxs6("div", { className: "flex h-6 min-w-0 items-center gap-2", children: [
|
|
478
|
-
/* @__PURE__ */
|
|
479
|
-
/* @__PURE__ */
|
|
436
|
+
/* @__PURE__ */ jsx8(Skeleton, { shape: "circle", className: "h-6 w-6 shrink-0" }),
|
|
437
|
+
/* @__PURE__ */ jsx8(Skeleton, { className: "h-2.5 w-20" })
|
|
480
438
|
] }),
|
|
481
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ jsx8("div", { className: cn("flex items-center", tall ? "h-7" : "ml-auto"), children: /* @__PURE__ */ jsx8(Skeleton, { className: "h-2.5 w-14" }) })
|
|
482
440
|
] })
|
|
483
441
|
] })
|
|
484
442
|
] }) });
|
|
@@ -490,18 +448,19 @@ var GRID2 = {
|
|
|
490
448
|
function MediaGridSkeleton({ label, count = 8, shelfCount = 0, layout = "grid", frame = "landscape", className, ...props }) {
|
|
491
449
|
const row = layout === "list";
|
|
492
450
|
return /* @__PURE__ */ jsxs6("div", { role: "status", "aria-busy": "true", "data-media-grid-skeleton": "", className: cn("flex min-w-0 flex-col gap-8", className), ...props, children: [
|
|
493
|
-
/* @__PURE__ */
|
|
451
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: label }),
|
|
494
452
|
shelfCount > 0 && /* @__PURE__ */ jsxs6("div", { "aria-hidden": true, className: "min-w-0", children: [
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
453
|
+
/* @__PURE__ */ jsx8(Skeleton, { className: "mb-3 h-4 w-24" }),
|
|
454
|
+
/* @__PURE__ */ jsx8("ul", { className: "m-0 flex list-none items-stretch gap-3 overflow-hidden p-0", children: Array.from({ length: shelfCount }, (_, i) => /* @__PURE__ */ jsx8("li", { className: "w-[9.5rem] shrink-0 sm:w-44", children: /* @__PURE__ */ jsx8(VideoCardSkeleton, { aspect: "portrait" }) }, i)) })
|
|
497
455
|
] }),
|
|
498
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ jsx8("ul", { "aria-hidden": true, className: cn("m-0 grid list-none auto-rows-fr gap-4 p-0", row ? "grid-cols-1" : GRID2[frame]), children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx8("li", { className: "min-w-0", children: /* @__PURE__ */ jsx8(VideoCardSkeleton, { aspect: frame, layout: row ? "row" : "stack" }) }, i)) })
|
|
499
457
|
] });
|
|
500
458
|
}
|
|
501
459
|
export {
|
|
502
460
|
LoadMore,
|
|
503
461
|
MediaGrid,
|
|
504
462
|
MediaGridSkeleton,
|
|
463
|
+
SectionHint,
|
|
505
464
|
ShortsShelf,
|
|
506
465
|
VideoCard,
|
|
507
466
|
VideoCardSkeleton
|