@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
|
@@ -2,46 +2,17 @@ import * as tailwind_variants from 'tailwind-variants';
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
declare const settingsLayout: tailwind_variants.TVReturnType<{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
navList?: tailwind_variants.ClassValue;
|
|
14
|
-
content?: tailwind_variants.ClassValue;
|
|
15
|
-
section?: tailwind_variants.ClassValue;
|
|
16
|
-
sectionHead?: tailwind_variants.ClassValue;
|
|
17
|
-
sectionTitle?: tailwind_variants.ClassValue;
|
|
18
|
-
sectionDescription?: tailwind_variants.ClassValue;
|
|
19
|
-
sectionBody?: tailwind_variants.ClassValue;
|
|
20
|
-
sectionFooter?: tailwind_variants.ClassValue;
|
|
21
|
-
navLink?: tailwind_variants.ClassValue;
|
|
5
|
+
variant: {
|
|
6
|
+
card: {};
|
|
7
|
+
flat: {
|
|
8
|
+
content: string;
|
|
9
|
+
section: string;
|
|
10
|
+
sectionHead: string;
|
|
11
|
+
sectionBody: string;
|
|
12
|
+
sectionFooter: string;
|
|
22
13
|
};
|
|
23
14
|
};
|
|
24
|
-
}
|
|
25
|
-
[x: string]: {
|
|
26
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
27
|
-
root?: tailwind_variants.ClassValue;
|
|
28
|
-
head?: tailwind_variants.ClassValue;
|
|
29
|
-
title?: tailwind_variants.ClassValue;
|
|
30
|
-
description?: tailwind_variants.ClassValue;
|
|
31
|
-
columns?: tailwind_variants.ClassValue;
|
|
32
|
-
nav?: tailwind_variants.ClassValue;
|
|
33
|
-
navList?: tailwind_variants.ClassValue;
|
|
34
|
-
content?: tailwind_variants.ClassValue;
|
|
35
|
-
section?: tailwind_variants.ClassValue;
|
|
36
|
-
sectionHead?: tailwind_variants.ClassValue;
|
|
37
|
-
sectionTitle?: tailwind_variants.ClassValue;
|
|
38
|
-
sectionDescription?: tailwind_variants.ClassValue;
|
|
39
|
-
sectionBody?: tailwind_variants.ClassValue;
|
|
40
|
-
sectionFooter?: tailwind_variants.ClassValue;
|
|
41
|
-
navLink?: tailwind_variants.ClassValue;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
} | {}, {
|
|
15
|
+
}, {
|
|
45
16
|
root: string;
|
|
46
17
|
head: string;
|
|
47
18
|
title: string;
|
|
@@ -57,27 +28,24 @@ declare const settingsLayout: tailwind_variants.TVReturnType<{
|
|
|
57
28
|
sectionDescription: string;
|
|
58
29
|
sectionBody: string;
|
|
59
30
|
sectionFooter: string;
|
|
31
|
+
rows: string;
|
|
32
|
+
row: string;
|
|
33
|
+
rowText: string;
|
|
34
|
+
rowLabel: string;
|
|
35
|
+
rowDescription: string;
|
|
36
|
+
rowControl: string;
|
|
60
37
|
}, undefined, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
navList?: tailwind_variants.ClassValue;
|
|
70
|
-
content?: tailwind_variants.ClassValue;
|
|
71
|
-
section?: tailwind_variants.ClassValue;
|
|
72
|
-
sectionHead?: tailwind_variants.ClassValue;
|
|
73
|
-
sectionTitle?: tailwind_variants.ClassValue;
|
|
74
|
-
sectionDescription?: tailwind_variants.ClassValue;
|
|
75
|
-
sectionBody?: tailwind_variants.ClassValue;
|
|
76
|
-
sectionFooter?: tailwind_variants.ClassValue;
|
|
77
|
-
navLink?: tailwind_variants.ClassValue;
|
|
38
|
+
variant: {
|
|
39
|
+
card: {};
|
|
40
|
+
flat: {
|
|
41
|
+
content: string;
|
|
42
|
+
section: string;
|
|
43
|
+
sectionHead: string;
|
|
44
|
+
sectionBody: string;
|
|
45
|
+
sectionFooter: string;
|
|
78
46
|
};
|
|
79
47
|
};
|
|
80
|
-
}
|
|
48
|
+
}, {
|
|
81
49
|
root: string;
|
|
82
50
|
head: string;
|
|
83
51
|
title: string;
|
|
@@ -93,7 +61,24 @@ declare const settingsLayout: tailwind_variants.TVReturnType<{
|
|
|
93
61
|
sectionDescription: string;
|
|
94
62
|
sectionBody: string;
|
|
95
63
|
sectionFooter: string;
|
|
96
|
-
|
|
64
|
+
rows: string;
|
|
65
|
+
row: string;
|
|
66
|
+
rowText: string;
|
|
67
|
+
rowLabel: string;
|
|
68
|
+
rowDescription: string;
|
|
69
|
+
rowControl: string;
|
|
70
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
71
|
+
variant: {
|
|
72
|
+
card: {};
|
|
73
|
+
flat: {
|
|
74
|
+
content: string;
|
|
75
|
+
section: string;
|
|
76
|
+
sectionHead: string;
|
|
77
|
+
sectionBody: string;
|
|
78
|
+
sectionFooter: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}, {
|
|
97
82
|
root: string;
|
|
98
83
|
head: string;
|
|
99
84
|
title: string;
|
|
@@ -109,6 +94,12 @@ declare const settingsLayout: tailwind_variants.TVReturnType<{
|
|
|
109
94
|
sectionDescription: string;
|
|
110
95
|
sectionBody: string;
|
|
111
96
|
sectionFooter: string;
|
|
97
|
+
rows: string;
|
|
98
|
+
row: string;
|
|
99
|
+
rowText: string;
|
|
100
|
+
rowLabel: string;
|
|
101
|
+
rowDescription: string;
|
|
102
|
+
rowControl: string;
|
|
112
103
|
}>>;
|
|
113
104
|
interface SettingsNavItem {
|
|
114
105
|
/** Its id (the anchor of a section on one long page). */
|
|
@@ -133,11 +124,16 @@ type SettingsLayoutProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
|
133
124
|
navLabel: string;
|
|
134
125
|
/** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */
|
|
135
126
|
linkAs?: React.ElementType;
|
|
127
|
+
/**
|
|
128
|
+
* `card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).
|
|
129
|
+
* @default "card"
|
|
130
|
+
*/
|
|
131
|
+
variant?: "card" | "flat";
|
|
136
132
|
/** The current section's forms (`SettingsSection`). */
|
|
137
133
|
children: React.ReactNode;
|
|
138
134
|
};
|
|
139
135
|
/** A settings screen: sections on the left (chips on a phone), forms on the right. */
|
|
140
|
-
declare function SettingsLayout({ title, description, nav, navLabel, linkAs: Link, className, children, ...props }: SettingsLayoutProps): React.JSX.Element;
|
|
136
|
+
declare function SettingsLayout({ title, description, nav, navLabel, linkAs: Link, variant, className, children, ...props }: SettingsLayoutProps): React.JSX.Element;
|
|
141
137
|
type SettingsSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
142
138
|
/** The section's title: it names the region (and is its anchor's target when `id` is set). */
|
|
143
139
|
title: React.ReactNode;
|
|
@@ -145,10 +141,27 @@ type SettingsSectionProps = Omit<React.ComponentProps<"section">, "title"> & {
|
|
|
145
141
|
description?: React.ReactNode;
|
|
146
142
|
/** At the foot: the section's own save (a Button), a note. */
|
|
147
143
|
footer?: React.ReactNode;
|
|
148
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* `card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).
|
|
146
|
+
* @default "card"
|
|
147
|
+
*/
|
|
148
|
+
variant?: "card" | "flat";
|
|
149
|
+
/** The fields (or, flat, the `SettingsRow`s). */
|
|
149
150
|
children: React.ReactNode;
|
|
150
151
|
};
|
|
151
|
-
/** A group of settings: a titled card with its fields and its own save. */
|
|
152
|
-
declare function SettingsSection({ title, description, footer, id, className, children, ...props }: SettingsSectionProps): React.JSX.Element;
|
|
152
|
+
/** A group of settings: a titled card with its fields and its own save, or flat rows under a title. */
|
|
153
|
+
declare function SettingsSection({ title, description, footer, variant, id, className, children, ...props }: SettingsSectionProps): React.JSX.Element;
|
|
154
|
+
type SettingsRowProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
155
|
+
/** What the setting is (`Username`). */
|
|
156
|
+
label: React.ReactNode;
|
|
157
|
+
/** The help text under it, one sentence. */
|
|
158
|
+
description?: React.ReactNode;
|
|
159
|
+
/** The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value. */
|
|
160
|
+
htmlFor?: string;
|
|
161
|
+
/** The control or the value, on the right (stacked under the label on a phone). */
|
|
162
|
+
children?: React.ReactNode;
|
|
163
|
+
};
|
|
164
|
+
/** One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`. */
|
|
165
|
+
declare function SettingsRow({ label, description, htmlFor, className, children, ...props }: SettingsRowProps): React.JSX.Element;
|
|
153
166
|
|
|
154
|
-
export { SettingsLayout, type SettingsLayoutProps, type SettingsNavItem, SettingsSection, type SettingsSectionProps, settingsLayout };
|
|
167
|
+
export { SettingsLayout, type SettingsLayoutProps, type SettingsNavItem, SettingsRow, type SettingsRowProps, SettingsSection, type SettingsSectionProps, settingsLayout };
|
package/dist/settings-layout.js
CHANGED
|
@@ -18,11 +18,31 @@ var settingsLayout = tv({
|
|
|
18
18
|
sectionTitle: "text-base font-bold text-fg",
|
|
19
19
|
sectionDescription: "text-sm text-fg-secondary",
|
|
20
20
|
sectionBody: "flex flex-col gap-4 px-5 py-5",
|
|
21
|
-
sectionFooter: "flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl"
|
|
22
|
-
|
|
21
|
+
sectionFooter: "flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl",
|
|
22
|
+
// The flat look: no card, hairline-divided rows (Linear / Vercel / GitHub settings).
|
|
23
|
+
rows: "flex flex-col divide-y divide-border-subtle border-y border-border-subtle",
|
|
24
|
+
row: "flex flex-col gap-2 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6",
|
|
25
|
+
rowText: "flex min-w-0 flex-col gap-0.5",
|
|
26
|
+
rowLabel: "text-sm font-medium text-fg",
|
|
27
|
+
rowDescription: "text-sm text-fg-secondary",
|
|
28
|
+
rowControl: "flex min-w-0 shrink-0 items-center gap-2 text-sm text-fg sm:max-w-[60%] sm:justify-end"
|
|
29
|
+
},
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
card: {},
|
|
33
|
+
flat: {
|
|
34
|
+
content: "max-w-[45rem] gap-10",
|
|
35
|
+
section: "rounded-none border-0 bg-transparent",
|
|
36
|
+
sectionHead: "gap-0.5 px-0 pb-3 pt-0",
|
|
37
|
+
sectionBody: "gap-0 px-0 py-0",
|
|
38
|
+
sectionFooter: "justify-start border-t-0 bg-transparent px-0 pb-0 pt-4"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
defaultVariants: { variant: "card" }
|
|
23
43
|
});
|
|
24
|
-
|
|
25
|
-
|
|
44
|
+
function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = "a", variant = "card", className, children, ...props }) {
|
|
45
|
+
const s = settingsLayout({ variant });
|
|
26
46
|
return /* @__PURE__ */ jsxs("div", { className: s.root({ className }), ...props, children: [
|
|
27
47
|
(title || description) && /* @__PURE__ */ jsxs("div", { className: s.head(), children: [
|
|
28
48
|
title && /* @__PURE__ */ jsx("h1", { className: s.title(), children: title }),
|
|
@@ -37,7 +57,8 @@ function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = "a",
|
|
|
37
57
|
] })
|
|
38
58
|
] });
|
|
39
59
|
}
|
|
40
|
-
function SettingsSection({ title, description, footer, id, className, children, ...props }) {
|
|
60
|
+
function SettingsSection({ title, description, footer, variant = "card", id, className, children, ...props }) {
|
|
61
|
+
const s = settingsLayout({ variant });
|
|
41
62
|
const auto = React.useId();
|
|
42
63
|
const titleId = `${id ?? auto}-title`;
|
|
43
64
|
return /* @__PURE__ */ jsxs("section", { id, "aria-labelledby": titleId, className: s.section({ className }), ...props, children: [
|
|
@@ -45,12 +66,24 @@ function SettingsSection({ title, description, footer, id, className, children,
|
|
|
45
66
|
/* @__PURE__ */ jsx("h2", { id: titleId, className: s.sectionTitle(), children: title }),
|
|
46
67
|
description && /* @__PURE__ */ jsx("p", { className: s.sectionDescription(), children: description })
|
|
47
68
|
] }),
|
|
48
|
-
/* @__PURE__ */ jsx("div", { className: s.sectionBody(), children }),
|
|
69
|
+
/* @__PURE__ */ jsx("div", { className: variant === "flat" ? s.rows() : s.sectionBody(), "data-settings-rows": variant === "flat" ? "" : void 0, children }),
|
|
49
70
|
footer && /* @__PURE__ */ jsx("div", { className: s.sectionFooter(), children: footer })
|
|
50
71
|
] });
|
|
51
72
|
}
|
|
73
|
+
function SettingsRow({ label, description, htmlFor, className, children, ...props }) {
|
|
74
|
+
const s = settingsLayout();
|
|
75
|
+
const Label = htmlFor ? "label" : "span";
|
|
76
|
+
return /* @__PURE__ */ jsxs("div", { className: s.row({ className }), ...props, children: [
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { className: s.rowText(), children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Label, { className: s.rowLabel(), ...htmlFor ? { htmlFor } : {}, children: label }),
|
|
79
|
+
description && /* @__PURE__ */ jsx("span", { className: s.rowDescription(), children: description })
|
|
80
|
+
] }),
|
|
81
|
+
children !== void 0 && /* @__PURE__ */ jsx("div", { className: s.rowControl(), children })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
52
84
|
export {
|
|
53
85
|
SettingsLayout,
|
|
86
|
+
SettingsRow,
|
|
54
87
|
SettingsSection,
|
|
55
88
|
settingsLayout
|
|
56
89
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/settings-layout/settings-layout.tsx"],"sourcesContent":["// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone), the current section's forms on the right, each form a titled card with its\n// own save at the foot. The sections are links (one page each) or anchors (one long page).\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-full border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n },\n});\nconst s = settingsLayout();\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n}\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The sections. */\n nav: readonly SettingsNavItem[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\n/** A settings screen: sections on the left (chips on a phone), forms on the right. */\nexport function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = \"a\", className, children, ...props }: SettingsLayoutProps) {\n return (\n <div className={s.root({ className })} {...props}>\n {(title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )}\n <div className={s.columns()}>\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {nav.map((item) => (\n <li key={item.id}>\n <Link href={item.href} className={s.navLink()} aria-current={item.current ? (item.href.startsWith(\"#\") ? \"location\" : \"page\") : undefined}>\n {item.icon}\n {item.label}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /** The fields. */\n children: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save. */\nexport function SettingsSection({ title, description, footer, id, className, children, ...props }: SettingsSectionProps) {\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n <div className={s.sectionBody()}>{children}</div>\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </section>\n );\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;AA2DX,SACY,KADZ;AAzDD,IAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,IACL,SAAS;AAAA,IACT,SACE;AAAA,IAGF,SAAS;AAAA,IACT,SAAS;AAAA,IACT,aAAa;AAAA,IACb,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,aAAa;AAAA,IACb,eAAe;AAAA,EACjB;AACF,CAAC;AACD,IAAM,IAAI,eAAe;AA+BlB,SAAS,eAAe,EAAE,OAAO,aAAa,KAAK,UAAU,QAAQ,OAAO,KAAK,WAAW,UAAU,GAAG,MAAM,GAAwB;AAC5I,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACvC;AAAA,cAAS,gBACT,qBAAC,SAAI,WAAW,EAAE,KAAK,GACpB;AAAA,eAAS,oBAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MAC1C,eAAe,oBAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,OAC9D;AAAA,IAEF,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,SAAI,cAAY,UAAU,WAAW,EAAE,IAAI,GAC1C,8BAAC,QAAG,WAAW,EAAE,QAAQ,GACtB,cAAI,IAAI,CAAC,SACR,oBAAC,QACC,+BAAC,QAAK,MAAM,KAAK,MAAM,WAAW,EAAE,QAAQ,GAAG,gBAAc,KAAK,UAAW,KAAK,KAAK,WAAW,GAAG,IAAI,aAAa,SAAU,QAC7H;AAAA,aAAK;AAAA,QACL,KAAK;AAAA,SACR,KAJO,KAAK,EAKd,CACD,GACH,GACF;AAAA,MACA,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,UAAS;AAAA,OACzC;AAAA,KACF;AAEJ;AAcO,SAAS,gBAAgB,EAAE,OAAO,aAAa,QAAQ,IAAI,WAAW,UAAU,GAAG,MAAM,GAAyB;AACvH,QAAM,OAAa,YAAM;AACzB,QAAM,UAAU,GAAG,MAAM,IAAI;AAC7B,SACE,qBAAC,aAAQ,IAAQ,mBAAiB,SAAS,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAClF;AAAA,yBAAC,SAAI,WAAW,EAAE,YAAY,GAC5B;AAAA,0BAAC,QAAG,IAAI,SAAS,WAAW,EAAE,aAAa,GACxC,iBACH;AAAA,MACC,eAAe,oBAAC,OAAE,WAAW,EAAE,mBAAmB,GAAI,uBAAY;AAAA,OACrE;AAAA,IACA,oBAAC,SAAI,WAAW,EAAE,YAAY,GAAI,UAAS;AAAA,IAC1C,UAAU,oBAAC,SAAI,WAAW,EAAE,cAAc,GAAI,kBAAO;AAAA,KACxD;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/settings-layout/settings-layout.tsx"],"sourcesContent":["// Server-safe. Settings, read from the products' account and administration screens: a list of sections on the left\n// (a row of chips that scrolls on a phone), the current section's forms on the right, each form a titled card with its\n// own save at the foot. The sections are links (one page each) or anchors (one long page).\nimport * as React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nexport const settingsLayout = tv({\n slots: {\n root: \"flex w-full flex-col gap-6\",\n head: \"flex flex-col gap-1\",\n title: \"font-display text-2xl font-extrabold tracking-tight text-fg\",\n description: \"max-w-2xl text-sm text-fg-secondary\",\n columns: \"grid grid-cols-1 gap-6 lg:grid-cols-[13rem_minmax(0,1fr)] lg:gap-10\",\n nav: \"-mx-4 overflow-x-auto overflow-y-hidden px-4 py-1 -my-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden lg:mx-0 lg:overflow-visible lg:px-0 lg:py-0 lg:my-0\",\n navList: \"flex w-max gap-2 lg:sticky lg:top-20 lg:w-auto lg:flex-col lg:gap-0.5\",\n navLink:\n \"flex h-9 items-center gap-2.5 whitespace-nowrap rounded-full border border-border-default bg-surface-1 px-3.5 text-sm font-medium text-fg-secondary no-underline \" +\n \"hover:text-fg focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring aria-[current]:border-accent aria-[current]:text-fg \" +\n \"lg:rounded-lg lg:border-transparent lg:bg-transparent lg:px-3 lg:hover:bg-surface-2 lg:aria-[current]:bg-accent-soft [&>svg]:h-4 [&>svg]:w-4\",\n content: \"flex min-w-0 flex-col gap-6\",\n section: \"rounded-xl border border-border-default bg-surface-1\",\n sectionHead: \"flex flex-col gap-1 px-5 pt-5\",\n sectionTitle: \"text-base font-bold text-fg\",\n sectionDescription: \"text-sm text-fg-secondary\",\n sectionBody: \"flex flex-col gap-4 px-5 py-5\",\n sectionFooter: \"flex flex-wrap items-center justify-end gap-2 border-t border-border-subtle bg-surface-2/40 px-5 py-3 rounded-b-xl\",\n // The flat look: no card, hairline-divided rows (Linear / Vercel / GitHub settings).\n rows: \"flex flex-col divide-y divide-border-subtle border-y border-border-subtle\",\n row: \"flex flex-col gap-2 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6\",\n rowText: \"flex min-w-0 flex-col gap-0.5\",\n rowLabel: \"text-sm font-medium text-fg\",\n rowDescription: \"text-sm text-fg-secondary\",\n rowControl: \"flex min-w-0 shrink-0 items-center gap-2 text-sm text-fg sm:max-w-[60%] sm:justify-end\",\n },\n variants: {\n variant: {\n card: {},\n flat: {\n content: \"max-w-[45rem] gap-10\",\n section: \"rounded-none border-0 bg-transparent\",\n sectionHead: \"gap-0.5 px-0 pb-3 pt-0\",\n sectionBody: \"gap-0 px-0 py-0\",\n sectionFooter: \"justify-start border-t-0 bg-transparent px-0 pb-0 pt-4\",\n },\n },\n },\n defaultVariants: { variant: \"card\" },\n});\n\nexport interface SettingsNavItem {\n /** Its id (the anchor of a section on one long page). */\n id: string;\n /** Its words. */\n label: string;\n /** Where it leads: a page (`/settings/billing`) or an anchor (`#billing`). */\n href: string;\n /** Its icon (a signature icon). */\n icon?: React.ReactNode;\n /** The section shown now: `aria-current`. */\n current?: boolean;\n}\n\nexport type SettingsLayoutProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** The screen's title (`Settings`). */\n title?: React.ReactNode;\n /** One sentence under it. */\n description?: React.ReactNode;\n /** The sections. */\n nav: readonly SettingsNavItem[];\n /** The navigation's accessible name (`Settings sections`). */\n navLabel: string;\n /** The app's link component for the sections (Next's `Link`); an `<a>` otherwise. */\n linkAs?: React.ElementType;\n /**\n * `card` (each form a titled card) or `flat` (one calm column of at most 45rem, rows divided by hairlines).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The current section's forms (`SettingsSection`). */\n children: React.ReactNode;\n};\n\n/** A settings screen: sections on the left (chips on a phone), forms on the right. */\nexport function SettingsLayout({ title, description, nav, navLabel, linkAs: Link = \"a\", variant = \"card\", className, children, ...props }: SettingsLayoutProps) {\n const s = settingsLayout({ variant });\n return (\n <div className={s.root({ className })} {...props}>\n {(title || description) && (\n <div className={s.head()}>\n {title && <h1 className={s.title()}>{title}</h1>}\n {description && <p className={s.description()}>{description}</p>}\n </div>\n )}\n <div className={s.columns()}>\n <nav aria-label={navLabel} className={s.nav()}>\n <ul className={s.navList()}>\n {nav.map((item) => (\n <li key={item.id}>\n <Link href={item.href} className={s.navLink()} aria-current={item.current ? (item.href.startsWith(\"#\") ? \"location\" : \"page\") : undefined}>\n {item.icon}\n {item.label}\n </Link>\n </li>\n ))}\n </ul>\n </nav>\n <div className={s.content()}>{children}</div>\n </div>\n </div>\n );\n}\n\nexport type SettingsSectionProps = Omit<React.ComponentProps<\"section\">, \"title\"> & {\n /** The section's title: it names the region (and is its anchor's target when `id` is set). */\n title: React.ReactNode;\n /** What these settings change, in one sentence. */\n description?: React.ReactNode;\n /** At the foot: the section's own save (a Button), a note. */\n footer?: React.ReactNode;\n /**\n * `card` (a titled card) or `flat` (no card: a title, then hairline-divided `SettingsRow`s).\n * @default \"card\"\n */\n variant?: \"card\" | \"flat\";\n /** The fields (or, flat, the `SettingsRow`s). */\n children: React.ReactNode;\n};\n\n/** A group of settings: a titled card with its fields and its own save, or flat rows under a title. */\nexport function SettingsSection({ title, description, footer, variant = \"card\", id, className, children, ...props }: SettingsSectionProps) {\n const s = settingsLayout({ variant });\n const auto = React.useId();\n const titleId = `${id ?? auto}-title`;\n return (\n <section id={id} aria-labelledby={titleId} className={s.section({ className })} {...props}>\n <div className={s.sectionHead()}>\n <h2 id={titleId} className={s.sectionTitle()}>\n {title}\n </h2>\n {description && <p className={s.sectionDescription()}>{description}</p>}\n </div>\n <div className={variant === \"flat\" ? s.rows() : s.sectionBody()} data-settings-rows={variant === \"flat\" ? \"\" : undefined}>\n {children}\n </div>\n {footer && <div className={s.sectionFooter()}>{footer}</div>}\n </section>\n );\n}\n\nexport type SettingsRowProps = Omit<React.ComponentProps<\"div\">, \"title\"> & {\n /** What the setting is (`Username`). */\n label: React.ReactNode;\n /** The help text under it, one sentence. */\n description?: React.ReactNode;\n /** The id of the control, so the label names it (a `<label htmlFor>`). Leave out for a plain value. */\n htmlFor?: string;\n /** The control or the value, on the right (stacked under the label on a phone). */\n children?: React.ReactNode;\n};\n\n/** One setting: its label and help on the left, its control or value on the right. Put rows in a flat `SettingsSection`. */\nexport function SettingsRow({ label, description, htmlFor, className, children, ...props }: SettingsRowProps) {\n const s = settingsLayout();\n const Label = htmlFor ? \"label\" : \"span\";\n return (\n <div className={s.row({ className })} {...props}>\n <div className={s.rowText()}>\n <Label className={s.rowLabel()} {...(htmlFor ? { htmlFor } : {})}>\n {label}\n </Label>\n {description && <span className={s.rowDescription()}>{description}</span>}\n </div>\n {children !== undefined && <div className={s.rowControl()}>{children}</div>}\n </div>\n );\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,UAAU;AAoFX,SACY,KADZ;AAlFD,IAAM,iBAAiB,GAAG;AAAA,EAC/B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,IACL,SAAS;AAAA,IACT,SACE;AAAA,IAGF,SAAS;AAAA,IACT,SAAS;AAAA,IACT,aAAa;AAAA,IACb,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,aAAa;AAAA,IACb,eAAe;AAAA;AAAA,IAEf,MAAM;AAAA,IACN,KAAK;AAAA,IACL,SAAS;AAAA,IACT,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,MACP,MAAM,CAAC;AAAA,MACP,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,SAAS;AAAA,QACT,aAAa;AAAA,QACb,aAAa;AAAA,QACb,eAAe;AAAA,MACjB;AAAA,IACF;AAAA,EACF;AAAA,EACA,iBAAiB,EAAE,SAAS,OAAO;AACrC,CAAC;AAoCM,SAAS,eAAe,EAAE,OAAO,aAAa,KAAK,UAAU,QAAQ,OAAO,KAAK,UAAU,QAAQ,WAAW,UAAU,GAAG,MAAM,GAAwB;AAC9J,QAAM,IAAI,eAAe,EAAE,QAAQ,CAAC;AACpC,SACE,qBAAC,SAAI,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,GAAI,GAAG,OACvC;AAAA,cAAS,gBACT,qBAAC,SAAI,WAAW,EAAE,KAAK,GACpB;AAAA,eAAS,oBAAC,QAAG,WAAW,EAAE,MAAM,GAAI,iBAAM;AAAA,MAC1C,eAAe,oBAAC,OAAE,WAAW,EAAE,YAAY,GAAI,uBAAY;AAAA,OAC9D;AAAA,IAEF,qBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,SAAI,cAAY,UAAU,WAAW,EAAE,IAAI,GAC1C,8BAAC,QAAG,WAAW,EAAE,QAAQ,GACtB,cAAI,IAAI,CAAC,SACR,oBAAC,QACC,+BAAC,QAAK,MAAM,KAAK,MAAM,WAAW,EAAE,QAAQ,GAAG,gBAAc,KAAK,UAAW,KAAK,KAAK,WAAW,GAAG,IAAI,aAAa,SAAU,QAC7H;AAAA,aAAK;AAAA,QACL,KAAK;AAAA,SACR,KAJO,KAAK,EAKd,CACD,GACH,GACF;AAAA,MACA,oBAAC,SAAI,WAAW,EAAE,QAAQ,GAAI,UAAS;AAAA,OACzC;AAAA,KACF;AAEJ;AAmBO,SAAS,gBAAgB,EAAE,OAAO,aAAa,QAAQ,UAAU,QAAQ,IAAI,WAAW,UAAU,GAAG,MAAM,GAAyB;AACzI,QAAM,IAAI,eAAe,EAAE,QAAQ,CAAC;AACpC,QAAM,OAAa,YAAM;AACzB,QAAM,UAAU,GAAG,MAAM,IAAI;AAC7B,SACE,qBAAC,aAAQ,IAAQ,mBAAiB,SAAS,WAAW,EAAE,QAAQ,EAAE,UAAU,CAAC,GAAI,GAAG,OAClF;AAAA,yBAAC,SAAI,WAAW,EAAE,YAAY,GAC5B;AAAA,0BAAC,QAAG,IAAI,SAAS,WAAW,EAAE,aAAa,GACxC,iBACH;AAAA,MACC,eAAe,oBAAC,OAAE,WAAW,EAAE,mBAAmB,GAAI,uBAAY;AAAA,OACrE;AAAA,IACA,oBAAC,SAAI,WAAW,YAAY,SAAS,EAAE,KAAK,IAAI,EAAE,YAAY,GAAG,sBAAoB,YAAY,SAAS,KAAK,QAC5G,UACH;AAAA,IACC,UAAU,oBAAC,SAAI,WAAW,EAAE,cAAc,GAAI,kBAAO;AAAA,KACxD;AAEJ;AAcO,SAAS,YAAY,EAAE,OAAO,aAAa,SAAS,WAAW,UAAU,GAAG,MAAM,GAAqB;AAC5G,QAAM,IAAI,eAAe;AACzB,QAAM,QAAQ,UAAU,UAAU;AAClC,SACE,qBAAC,SAAI,WAAW,EAAE,IAAI,EAAE,UAAU,CAAC,GAAI,GAAG,OACxC;AAAA,yBAAC,SAAI,WAAW,EAAE,QAAQ,GACxB;AAAA,0BAAC,SAAM,WAAW,EAAE,SAAS,GAAI,GAAI,UAAU,EAAE,QAAQ,IAAI,CAAC,GAC3D,iBACH;AAAA,MACC,eAAe,oBAAC,UAAK,WAAW,EAAE,eAAe,GAAI,uBAAY;AAAA,OACpE;AAAA,IACC,aAAa,UAAa,oBAAC,SAAI,WAAW,EAAE,WAAW,GAAI,UAAS;AAAA,KACvE;AAEJ;","names":[]}
|
package/dist/showcase.js
CHANGED
package/dist/site-footer.d.ts
CHANGED
|
@@ -3,52 +3,20 @@ import * as React from 'react';
|
|
|
3
3
|
import { S as SiteId, F as FamilyLabels } from './sites-CHp_vELn.js';
|
|
4
4
|
|
|
5
5
|
declare const siteFooter: tailwind_variants.TVReturnType<{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
root?: tailwind_variants.ClassValue;
|
|
13
|
-
inner?: tailwind_variants.ClassValue;
|
|
14
|
-
top?: tailwind_variants.ClassValue;
|
|
15
|
-
site?: tailwind_variants.ClassValue;
|
|
16
|
-
siteName?: tailwind_variants.ClassValue;
|
|
17
|
-
siteText?: tailwind_variants.ClassValue;
|
|
18
|
-
own?: tailwind_variants.ClassValue;
|
|
19
|
-
family?: tailwind_variants.ClassValue;
|
|
20
|
-
column?: tailwind_variants.ClassValue;
|
|
21
|
-
tag?: tailwind_variants.ClassValue;
|
|
22
|
-
bottom?: tailwind_variants.ClassValue;
|
|
23
|
-
signature?: tailwind_variants.ClassValue;
|
|
24
|
-
version?: tailwind_variants.ClassValue;
|
|
25
|
-
legal?: tailwind_variants.ClassValue;
|
|
6
|
+
variant: {
|
|
7
|
+
site: {};
|
|
8
|
+
docs: {
|
|
9
|
+
inner: string;
|
|
10
|
+
top: string;
|
|
11
|
+
own: string;
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
title?: tailwind_variants.ClassValue;
|
|
32
|
-
link?: tailwind_variants.ClassValue;
|
|
33
|
-
list?: tailwind_variants.ClassValue;
|
|
34
|
-
mark?: tailwind_variants.ClassValue;
|
|
35
|
-
root?: tailwind_variants.ClassValue;
|
|
36
|
-
inner?: tailwind_variants.ClassValue;
|
|
37
|
-
top?: tailwind_variants.ClassValue;
|
|
38
|
-
site?: tailwind_variants.ClassValue;
|
|
39
|
-
siteName?: tailwind_variants.ClassValue;
|
|
40
|
-
siteText?: tailwind_variants.ClassValue;
|
|
41
|
-
own?: tailwind_variants.ClassValue;
|
|
42
|
-
family?: tailwind_variants.ClassValue;
|
|
43
|
-
column?: tailwind_variants.ClassValue;
|
|
44
|
-
tag?: tailwind_variants.ClassValue;
|
|
45
|
-
bottom?: tailwind_variants.ClassValue;
|
|
46
|
-
signature?: tailwind_variants.ClassValue;
|
|
47
|
-
version?: tailwind_variants.ClassValue;
|
|
48
|
-
legal?: tailwind_variants.ClassValue;
|
|
13
|
+
app: {
|
|
14
|
+
root: string;
|
|
15
|
+
inner: string;
|
|
16
|
+
bottom: string;
|
|
49
17
|
};
|
|
50
18
|
};
|
|
51
|
-
}
|
|
19
|
+
}, {
|
|
52
20
|
root: string;
|
|
53
21
|
inner: string;
|
|
54
22
|
top: string;
|
|
@@ -68,29 +36,20 @@ declare const siteFooter: tailwind_variants.TVReturnType<{
|
|
|
68
36
|
version: string;
|
|
69
37
|
legal: string;
|
|
70
38
|
}, undefined, {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
siteText?: tailwind_variants.ClassValue;
|
|
83
|
-
own?: tailwind_variants.ClassValue;
|
|
84
|
-
family?: tailwind_variants.ClassValue;
|
|
85
|
-
column?: tailwind_variants.ClassValue;
|
|
86
|
-
tag?: tailwind_variants.ClassValue;
|
|
87
|
-
bottom?: tailwind_variants.ClassValue;
|
|
88
|
-
signature?: tailwind_variants.ClassValue;
|
|
89
|
-
version?: tailwind_variants.ClassValue;
|
|
90
|
-
legal?: tailwind_variants.ClassValue;
|
|
39
|
+
variant: {
|
|
40
|
+
site: {};
|
|
41
|
+
docs: {
|
|
42
|
+
inner: string;
|
|
43
|
+
top: string;
|
|
44
|
+
own: string;
|
|
45
|
+
};
|
|
46
|
+
app: {
|
|
47
|
+
root: string;
|
|
48
|
+
inner: string;
|
|
49
|
+
bottom: string;
|
|
91
50
|
};
|
|
92
51
|
};
|
|
93
|
-
}
|
|
52
|
+
}, {
|
|
94
53
|
root: string;
|
|
95
54
|
inner: string;
|
|
96
55
|
top: string;
|
|
@@ -109,7 +68,21 @@ declare const siteFooter: tailwind_variants.TVReturnType<{
|
|
|
109
68
|
signature: string;
|
|
110
69
|
version: string;
|
|
111
70
|
legal: string;
|
|
112
|
-
}, tailwind_variants.TVReturnTypeLike<
|
|
71
|
+
}, tailwind_variants.TVReturnTypeLike<{
|
|
72
|
+
variant: {
|
|
73
|
+
site: {};
|
|
74
|
+
docs: {
|
|
75
|
+
inner: string;
|
|
76
|
+
top: string;
|
|
77
|
+
own: string;
|
|
78
|
+
};
|
|
79
|
+
app: {
|
|
80
|
+
root: string;
|
|
81
|
+
inner: string;
|
|
82
|
+
bottom: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
}, {
|
|
113
86
|
root: string;
|
|
114
87
|
inner: string;
|
|
115
88
|
top: string;
|
|
@@ -152,9 +125,17 @@ type SiteFooterProps = Omit<React.ComponentProps<"footer">, "children"> & {
|
|
|
152
125
|
family?: boolean;
|
|
153
126
|
/** The end of the signature line: legal links, a language switch (`SiteFooter.Link`s or any inline content). */
|
|
154
127
|
legal?: React.ReactNode;
|
|
128
|
+
/**
|
|
129
|
+
* `site` — the full footer of a marketing or company site. `docs` — a compact one for documentation pages (no site
|
|
130
|
+
* block, the columns in a row, the documentation's width; never the family). `app` — one slim line inside a signed-in
|
|
131
|
+
* product: the publisher line, the version and the legal links (no columns, no family); render it once, in the
|
|
132
|
+
* layout, and not at all where the app shell has a sidebar that holds them.
|
|
133
|
+
* @default "site"
|
|
134
|
+
*/
|
|
135
|
+
variant?: "site" | "docs" | "app";
|
|
155
136
|
};
|
|
156
137
|
/** The footer of a Krizaka site: its own columns, the family in columns, the signature, the version, Montréal. */
|
|
157
|
-
declare function SiteFooter({ current, labels, children, version, env, legal, family, className, ...props }: SiteFooterProps): React.JSX.Element;
|
|
138
|
+
declare function SiteFooter({ current, labels, children, version, env, legal, family: familyProp, variant, className, ...props }: SiteFooterProps): React.JSX.Element;
|
|
158
139
|
declare namespace SiteFooter {
|
|
159
140
|
var Column: typeof SiteFooterColumn;
|
|
160
141
|
var Link: typeof SiteFooterLink;
|
|
@@ -166,7 +147,7 @@ type SiteFooterColumnProps = Omit<React.ComponentProps<"div">, "title"> & {
|
|
|
166
147
|
children: React.ReactNode;
|
|
167
148
|
};
|
|
168
149
|
/** One of the site's own columns: a heading and its links. */
|
|
169
|
-
declare function SiteFooterColumn({ title, children, className, ...props }: SiteFooterColumnProps): React.JSX.Element;
|
|
150
|
+
declare function SiteFooterColumn({ title, children, className, ...props }: SiteFooterColumnProps): React.JSX.Element | null;
|
|
170
151
|
type SiteFooterLinkProps = React.ComponentProps<"a"> & {
|
|
171
152
|
/** The current page: `aria-current="page"`. */
|
|
172
153
|
active?: boolean;
|
package/dist/site-footer.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
familyLabels,
|
|
5
5
|
siteById,
|
|
6
6
|
sitesByGroup
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2L67YTNV.js";
|
|
8
8
|
import {
|
|
9
9
|
KrizakaLogo
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YCIBJ6OQ.js";
|
|
11
11
|
|
|
12
12
|
// src/site-footer/site-footer.tsx
|
|
13
13
|
import { Slot } from "radix-ui";
|
|
@@ -17,12 +17,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
var siteFooter = tv({
|
|
18
18
|
slots: {
|
|
19
19
|
root: "w-full border-t border-border-subtle bg-surface-0 text-fg",
|
|
20
|
-
inner: "mx-auto grid w-full max-w-(--kz-page-max,72rem) grid-cols-[minmax(0,1fr)] gap-10 px-(--kz-page-gutter,16px) py-12",
|
|
20
|
+
inner: "mx-auto grid w-full max-w-[calc(var(--kz-page-max,72rem)_+_2*var(--kz-page-gutter,clamp(16px,3.2vw,32px)))] grid-cols-[minmax(0,1fr)] gap-10 px-[var(--kz-page-gutter,clamp(16px,3.2vw,32px))] py-12",
|
|
21
21
|
top: "grid grid-cols-[minmax(0,1fr)] gap-8 lg:grid-cols-[minmax(0,1fr)_minmax(0,2fr)]",
|
|
22
22
|
site: "grid content-start gap-3",
|
|
23
23
|
siteName: "inline-flex items-center gap-2 font-display text-[15px] font-bold tracking-tight text-fg",
|
|
24
24
|
siteText: "max-w-xs text-sm leading-relaxed text-fg-secondary",
|
|
25
|
-
own: "grid grid-cols-
|
|
25
|
+
own: "grid grid-cols-[repeat(auto-fit,minmax(9rem,1fr))] gap-8",
|
|
26
26
|
family: "grid grid-cols-2 gap-8 border-t border-border-subtle pt-8 md:grid-cols-4",
|
|
27
27
|
column: "grid min-w-0 content-start gap-3",
|
|
28
28
|
title: "text-[11px] font-semibold uppercase tracking-wider text-fg-secondary",
|
|
@@ -34,9 +34,26 @@ var siteFooter = tv({
|
|
|
34
34
|
signature: "inline-flex items-center gap-2 rounded-md font-medium text-fg no-underline hover:text-fg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
35
35
|
version: "rounded-full border border-border-subtle bg-surface-2 px-2 py-0.5 font-mono text-[11px] text-fg-secondary",
|
|
36
36
|
legal: "flex flex-wrap items-center gap-x-4 gap-y-2 sm:ml-auto"
|
|
37
|
-
}
|
|
37
|
+
},
|
|
38
|
+
variants: {
|
|
39
|
+
// `site`: the full footer. `docs`: no site block, the columns in one row, on the documentation's width. `app`: one
|
|
40
|
+
// slim line inside a signed-in product — signature, version, legal links.
|
|
41
|
+
variant: {
|
|
42
|
+
site: {},
|
|
43
|
+
docs: {
|
|
44
|
+
inner: "max-w-[calc(var(--kz-page-max-docs,88rem)_+_2*var(--kz-page-gutter,clamp(16px,3.2vw,32px)))] gap-6 py-8",
|
|
45
|
+
top: "lg:grid-cols-[minmax(0,1fr)]",
|
|
46
|
+
own: "sm:grid-cols-4"
|
|
47
|
+
},
|
|
48
|
+
app: {
|
|
49
|
+
root: "bg-transparent",
|
|
50
|
+
inner: "gap-0 py-3",
|
|
51
|
+
bottom: "border-t-0 pt-0"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: { variant: "site" }
|
|
38
56
|
});
|
|
39
|
-
var s = siteFooter();
|
|
40
57
|
function SiteFooter({
|
|
41
58
|
current,
|
|
42
59
|
labels = familyLabels.en,
|
|
@@ -44,24 +61,28 @@ function SiteFooter({
|
|
|
44
61
|
version,
|
|
45
62
|
env,
|
|
46
63
|
legal,
|
|
47
|
-
family = true,
|
|
64
|
+
family: familyProp = true,
|
|
65
|
+
variant = "site",
|
|
48
66
|
className,
|
|
49
67
|
...props
|
|
50
68
|
}) {
|
|
51
69
|
const id = React.useId();
|
|
70
|
+
const s = siteFooter({ variant });
|
|
71
|
+
const family = variant === "site" && familyProp;
|
|
72
|
+
const slim = variant === "app";
|
|
52
73
|
const site = siteById(current);
|
|
53
74
|
const krizaka = siteById("krizaka");
|
|
54
75
|
const tag = [env, version && `v${version.replace(/^v/, "")}`].filter(Boolean).join(" \xB7 ");
|
|
55
76
|
return /* @__PURE__ */ jsx("footer", { className: s.root({ className }), ...props, children: /* @__PURE__ */ jsxs("div", { className: s.inner(), children: [
|
|
56
|
-
/* @__PURE__ */ jsxs("div", { className: s.top(), children: [
|
|
57
|
-
/* @__PURE__ */ jsxs("div", { className: s.site(), children: [
|
|
77
|
+
!slim && /* @__PURE__ */ jsxs("div", { className: s.top(), children: [
|
|
78
|
+
variant === "site" && /* @__PURE__ */ jsxs("div", { className: s.site(), children: [
|
|
58
79
|
/* @__PURE__ */ jsxs("a", { href: site.url, className: s.siteName(), children: [
|
|
59
80
|
/* @__PURE__ */ jsx(FamilyMark, { mark: site.mark, size: 24 }),
|
|
60
81
|
site.name
|
|
61
82
|
] }),
|
|
62
83
|
/* @__PURE__ */ jsx("p", { className: s.siteText(), children: labels.descriptions[site.id] })
|
|
63
84
|
] }),
|
|
64
|
-
children && /* @__PURE__ */ jsx("div", { className: s.own(), children })
|
|
85
|
+
React.Children.toArray(children).length > 0 && /* @__PURE__ */ jsx("div", { className: s.own(), children })
|
|
65
86
|
] }),
|
|
66
87
|
family && /* @__PURE__ */ jsx("nav", { "aria-label": labels.family, className: s.family(), children: sitesByGroup().map(({ group, sites }) => /* @__PURE__ */ jsxs("div", { className: s.column(), children: [
|
|
67
88
|
/* @__PURE__ */ jsx("p", { id: `${id}-${group}`, className: s.title(), children: labels.groups[group] }),
|
|
@@ -88,19 +109,22 @@ function SiteFooter({
|
|
|
88
109
|
] }),
|
|
89
110
|
tag
|
|
90
111
|
] }),
|
|
91
|
-
/* @__PURE__ */ jsx("span", { children: labels.place }),
|
|
112
|
+
!slim && /* @__PURE__ */ jsx("span", { children: labels.place }),
|
|
92
113
|
legal && /* @__PURE__ */ jsx("div", { className: s.legal(), children: legal })
|
|
93
114
|
] })
|
|
94
115
|
] }) });
|
|
95
116
|
}
|
|
96
117
|
function SiteFooterColumn({ title, children, className, ...props }) {
|
|
97
118
|
const id = React.useId();
|
|
119
|
+
if (React.Children.toArray(children).length === 0) return null;
|
|
120
|
+
const s = siteFooter();
|
|
98
121
|
return /* @__PURE__ */ jsxs("div", { className: s.column({ className }), ...props, children: [
|
|
99
122
|
/* @__PURE__ */ jsx("p", { id, className: s.title(), children: title }),
|
|
100
|
-
/* @__PURE__ */ jsx("ul", { "aria-labelledby": id, className: s.list(), children: React.Children.map(
|
|
123
|
+
/* @__PURE__ */ jsx("ul", { "aria-labelledby": id, className: s.list(), children: React.Children.toArray(children).map((child, i) => /* @__PURE__ */ jsx("li", { children: child }, i)) })
|
|
101
124
|
] });
|
|
102
125
|
}
|
|
103
126
|
function SiteFooterLink({ active, asChild, className, ...props }) {
|
|
127
|
+
const s = siteFooter();
|
|
104
128
|
const Comp = asChild ? Slot.Root : "a";
|
|
105
129
|
return /* @__PURE__ */ jsx(Comp, { "aria-current": active ? "page" : void 0, className: s.link({ className }), ...props });
|
|
106
130
|
}
|