@krizaka/ui 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/activity-feed.d.ts +199 -0
- package/dist/activity-feed.js +155 -0
- package/dist/activity-feed.js.map +1 -0
- package/dist/argument-card.js +3 -3
- package/dist/{chunk-I5RVM5CW.js → chunk-2FRWNSRO.js} +2 -6
- package/dist/chunk-2FRWNSRO.js.map +1 -0
- package/dist/chunk-7Z4KHPFC.js +42 -0
- package/dist/chunk-7Z4KHPFC.js.map +1 -0
- package/dist/chunk-BTMFZ66D.js +135 -0
- package/dist/chunk-BTMFZ66D.js.map +1 -0
- package/dist/chunk-C2BRIFJG.js +13 -0
- package/dist/chunk-C2BRIFJG.js.map +1 -0
- package/dist/chunk-KDXRYUD3.js +39 -0
- package/dist/chunk-KDXRYUD3.js.map +1 -0
- package/dist/{chunk-2PUDI7JS.js → chunk-ZKVQGXLD.js} +5 -3
- package/dist/{chunk-2PUDI7JS.js.map → chunk-ZKVQGXLD.js.map} +1 -1
- package/dist/command.js +1 -1
- package/dist/confirm-button.js +1 -1
- package/dist/data-table.js +101 -133
- package/dist/data-table.js.map +1 -1
- package/dist/date-picker.d.ts +3 -1
- package/dist/date-picker.js +13 -13
- package/dist/date-picker.js.map +1 -1
- package/dist/description-list.d.ts +105 -0
- package/dist/description-list.js +49 -0
- package/dist/description-list.js.map +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/filter-bar.js +3 -2
- package/dist/form.d.ts +23 -12
- package/dist/form.js +11 -47
- package/dist/form.js.map +1 -1
- package/dist/glow-card.js +1 -1
- package/dist/image-cropper.js +3 -1
- package/dist/image-cropper.js.map +1 -1
- package/dist/index.js +13 -66
- package/dist/index.js.map +1 -1
- package/dist/kanban.d.ts +132 -0
- package/dist/kanban.js +187 -0
- package/dist/kanban.js.map +1 -0
- package/dist/list.d.ts +153 -0
- package/dist/list.js +130 -0
- package/dist/list.js.map +1 -0
- package/dist/map.d.ts +463 -0
- package/dist/map.js +952 -0
- package/dist/map.js.map +1 -0
- package/dist/marquee.js +1 -1
- package/dist/motion.css +12 -1
- package/dist/native/form.d.ts +60 -15
- package/dist/native/form.js +103 -42
- package/dist/native/form.js.map +1 -1
- package/dist/native/map.d.ts +200 -0
- package/dist/native/map.js +673 -0
- package/dist/native/map.js.map +1 -0
- package/dist/native/media-picker.d.ts +58 -0
- package/dist/native/media-picker.js +63 -0
- package/dist/native/media-picker.js.map +1 -0
- package/dist/native.d.ts +772 -6
- package/dist/native.js +2493 -741
- package/dist/native.js.map +1 -1
- package/dist/nav-bar.js +1 -1
- package/dist/page-hero.js +3 -3
- package/dist/popover.js +1 -1
- package/dist/radio-group.d.ts +66 -32
- package/dist/radio-group.js +54 -10
- package/dist/radio-group.js.map +1 -1
- package/dist/slider.d.ts +96 -35
- package/dist/slider.js +67 -13
- package/dist/slider.js.map +1 -1
- package/dist/stat.d.ts +31 -2
- package/dist/stat.js +21 -4
- package/dist/stat.js.map +1 -1
- package/dist/terminal-replay.js +34 -60
- package/dist/terminal-replay.js.map +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip.js +1 -1
- package/dist/tree-view.d.ts +111 -0
- package/dist/tree-view.js +154 -0
- package/dist/tree-view.js.map +1 -0
- package/dist/video-player.js +3 -1
- package/dist/video-player.js.map +1 -1
- package/package.json +148 -11
- package/registry/achievement.json +1 -1
- package/registry/action-bar.json +1 -1
- package/registry/action-sheet.json +121 -0
- package/registry/activity-feed.json +468 -0
- package/registry/alert.json +1 -1
- package/registry/app-shell.json +1 -1
- package/registry/argument-card.json +1 -1
- package/registry/audio-player.json +1 -1
- package/registry/auth-layout.json +1 -1
- package/registry/avatar.json +58 -3
- package/registry/badge.json +1 -1
- package/registry/button.json +1 -1
- package/registry/card-grid.json +1 -1
- package/registry/card.json +1 -1
- package/registry/catalogue-page.json +1 -1
- package/registry/changelog-page.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/code-block.json +1 -1
- package/registry/combobox.json +226 -4
- package/registry/command.json +1 -1
- 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 +18 -4
- package/registry/decision-list.json +1 -1
- package/registry/description-list.json +232 -0
- package/registry/detail-layout.json +1 -1
- package/registry/dialog.json +75 -4
- 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/dropdown-menu.json +1 -1
- package/registry/empty-state.json +1 -1
- package/registry/error-page.json +1 -1
- package/registry/examples/action-sheet/native/video-actions.d.ts +4 -0
- package/registry/examples/action-sheet/native/video-actions.dark.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.js +30 -0
- package/registry/examples/action-sheet/native/video-actions.light.png +0 -0
- package/registry/examples/action-sheet/native/video-actions.tsx +24 -0
- package/registry/examples/activity-feed/job-activity.d.ts +4 -0
- package/registry/examples/activity-feed/job-activity.js +21 -0
- package/registry/examples/activity-feed/job-activity.tsx +17 -0
- package/registry/examples/activity-feed/live.d.ts +4 -0
- package/registry/examples/activity-feed/live.js +23 -0
- package/registry/examples/activity-feed/live.tsx +24 -0
- package/registry/examples/activity-feed/native/notifications.d.ts +4 -0
- package/registry/examples/activity-feed/native/notifications.dark.png +0 -0
- package/registry/examples/activity-feed/native/notifications.js +18 -0
- package/registry/examples/activity-feed/native/notifications.light.png +0 -0
- package/registry/examples/activity-feed/native/notifications.tsx +18 -0
- package/registry/examples/activity-feed/timeline.d.ts +4 -0
- package/registry/examples/activity-feed/timeline.js +25 -0
- package/registry/examples/activity-feed/timeline.tsx +19 -0
- package/registry/examples/avatar/native/presence.d.ts +4 -0
- package/registry/examples/avatar/native/presence.dark.png +0 -0
- package/registry/examples/avatar/native/presence.js +18 -0
- package/registry/examples/avatar/native/presence.light.png +0 -0
- package/registry/examples/avatar/native/presence.tsx +15 -0
- package/registry/examples/combobox/native/multiple.d.ts +4 -0
- package/registry/examples/combobox/native/multiple.dark.png +0 -0
- package/registry/examples/combobox/native/multiple.js +15 -0
- package/registry/examples/combobox/native/multiple.light.png +0 -0
- package/registry/examples/combobox/native/multiple.tsx +15 -0
- package/registry/examples/combobox/native/search.d.ts +4 -0
- package/registry/examples/combobox/native/search.dark.png +0 -0
- package/registry/examples/combobox/native/search.js +15 -0
- package/registry/examples/combobox/native/search.light.png +0 -0
- package/registry/examples/combobox/native/search.tsx +15 -0
- package/registry/examples/description-list/job-details.d.ts +4 -0
- package/registry/examples/description-list/job-details.js +23 -0
- package/registry/examples/description-list/job-details.tsx +17 -0
- package/registry/examples/description-list/key-value-grid.d.ts +4 -0
- package/registry/examples/description-list/key-value-grid.js +22 -0
- package/registry/examples/description-list/key-value-grid.tsx +16 -0
- package/registry/examples/description-list/native/job-details.d.ts +4 -0
- package/registry/examples/description-list/native/job-details.dark.png +0 -0
- package/registry/examples/description-list/native/job-details.js +33 -0
- package/registry/examples/description-list/native/job-details.light.png +0 -0
- package/registry/examples/description-list/native/job-details.tsx +24 -0
- package/registry/examples/description-list/receipt.d.ts +4 -0
- package/registry/examples/description-list/receipt.js +23 -0
- package/registry/examples/description-list/receipt.tsx +17 -0
- package/registry/examples/dialog/native/sheet.d.ts +4 -0
- package/registry/examples/dialog/native/sheet.dark.png +0 -0
- package/registry/examples/dialog/native/sheet.js +21 -0
- package/registry/examples/dialog/native/sheet.light.png +0 -0
- package/registry/examples/dialog/native/sheet.tsx +18 -0
- package/registry/examples/fab/native/extended.d.ts +4 -0
- package/registry/examples/fab/native/extended.dark.png +0 -0
- package/registry/examples/fab/native/extended.js +18 -0
- package/registry/examples/fab/native/extended.light.png +0 -0
- package/registry/examples/fab/native/extended.tsx +23 -0
- package/registry/examples/field/native/select.d.ts +4 -0
- package/registry/examples/field/native/select.dark.png +0 -0
- package/registry/examples/field/native/select.js +29 -0
- package/registry/examples/field/native/select.light.png +0 -0
- package/registry/examples/field/native/select.tsx +25 -0
- package/registry/examples/form/native/audience.dark.png +0 -0
- package/registry/examples/form/native/audience.light.png +0 -0
- package/registry/examples/form/native/profile.dark.png +0 -0
- package/registry/examples/form/native/profile.light.png +0 -0
- package/registry/examples/form/native/settings.dark.png +0 -0
- package/registry/examples/form/native/settings.light.png +0 -0
- package/registry/examples/form/native/sign-up.dark.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/header/native/large-title.d.ts +4 -0
- package/registry/examples/header/native/large-title.dark.png +0 -0
- package/registry/examples/header/native/large-title.js +23 -0
- package/registry/examples/header/native/large-title.light.png +0 -0
- package/registry/examples/header/native/large-title.tsx +31 -0
- package/registry/examples/image-viewer/native/gallery.d.ts +4 -0
- package/registry/examples/image-viewer/native/gallery.dark.png +0 -0
- package/registry/examples/image-viewer/native/gallery.js +22 -0
- package/registry/examples/image-viewer/native/gallery.light.png +0 -0
- package/registry/examples/image-viewer/native/gallery.tsx +21 -0
- package/registry/examples/kanban/moderation.d.ts +4 -0
- package/registry/examples/kanban/moderation.js +35 -0
- package/registry/examples/kanban/moderation.tsx +37 -0
- package/registry/examples/list/jobs.d.ts +4 -0
- package/registry/examples/list/jobs.js +35 -0
- package/registry/examples/list/jobs.tsx +33 -0
- package/registry/examples/list/selectable.d.ts +4 -0
- package/registry/examples/list/selectable.js +33 -0
- package/registry/examples/list/selectable.tsx +30 -0
- package/registry/examples/list/virtualized.d.ts +4 -0
- package/registry/examples/list/virtualized.js +22 -0
- package/registry/examples/list/virtualized.tsx +17 -0
- package/registry/examples/loader/native/block.d.ts +4 -0
- package/registry/examples/loader/native/block.dark.png +0 -0
- package/registry/examples/loader/native/block.js +12 -0
- package/registry/examples/loader/native/block.light.png +0 -0
- package/registry/examples/loader/native/block.tsx +11 -0
- package/registry/examples/loader/native/job-wait.d.ts +4 -0
- package/registry/examples/loader/native/job-wait.dark.png +0 -0
- package/registry/examples/loader/native/job-wait.js +17 -0
- package/registry/examples/loader/native/job-wait.light.png +0 -0
- package/registry/examples/loader/native/job-wait.tsx +14 -0
- package/registry/examples/map/cluster.d.ts +4 -0
- package/registry/examples/map/cluster.js +16 -0
- package/registry/examples/map/cluster.tsx +18 -0
- package/registry/examples/map/location-picker.d.ts +4 -0
- package/registry/examples/map/location-picker.js +24 -0
- package/registry/examples/map/location-picker.tsx +22 -0
- package/registry/examples/map/native/location-picker.d.ts +4 -0
- package/registry/examples/map/native/location-picker.dark.png +0 -0
- package/registry/examples/map/native/location-picker.js +14 -0
- package/registry/examples/map/native/location-picker.light.png +0 -0
- package/registry/examples/map/native/location-picker.tsx +13 -0
- package/registry/examples/map/native/places.d.ts +4 -0
- package/registry/examples/map/native/places.dark.png +0 -0
- package/registry/examples/map/native/places.js +25 -0
- package/registry/examples/map/native/places.light.png +0 -0
- package/registry/examples/map/native/places.tsx +27 -0
- package/registry/examples/map/places.d.ts +4 -0
- package/registry/examples/map/places.js +28 -0
- package/registry/examples/map/places.tsx +28 -0
- package/registry/examples/map/static.d.ts +4 -0
- package/registry/examples/map/static.js +22 -0
- package/registry/examples/map/static.tsx +18 -0
- package/registry/examples/media-picker/native/story.d.ts +4 -0
- package/registry/examples/media-picker/native/story.dark.png +0 -0
- package/registry/examples/media-picker/native/story.js +30 -0
- package/registry/examples/media-picker/native/story.light.png +0 -0
- package/registry/examples/media-picker/native/story.tsx +26 -0
- package/registry/examples/meter/native/credits.d.ts +4 -0
- package/registry/examples/meter/native/credits.dark.png +0 -0
- package/registry/examples/meter/native/credits.js +15 -0
- package/registry/examples/meter/native/credits.light.png +0 -0
- package/registry/examples/meter/native/credits.tsx +12 -0
- package/registry/examples/meter/native/split-ring.d.ts +4 -0
- package/registry/examples/meter/native/split-ring.dark.png +0 -0
- package/registry/examples/meter/native/split-ring.js +24 -0
- package/registry/examples/meter/native/split-ring.light.png +0 -0
- package/registry/examples/meter/native/split-ring.tsx +19 -0
- package/registry/examples/number-ticker/native/balance.d.ts +4 -0
- package/registry/examples/number-ticker/native/balance.dark.png +0 -0
- package/registry/examples/number-ticker/native/balance.js +18 -0
- package/registry/examples/number-ticker/native/balance.light.png +0 -0
- package/registry/examples/number-ticker/native/balance.tsx +17 -0
- package/registry/examples/onboarding/native/first-launch.d.ts +4 -0
- package/registry/examples/onboarding/native/first-launch.dark.png +0 -0
- package/registry/examples/onboarding/native/first-launch.js +23 -0
- package/registry/examples/onboarding/native/first-launch.light.png +0 -0
- package/registry/examples/onboarding/native/first-launch.tsx +19 -0
- package/registry/examples/otp-input/native/invalid.d.ts +4 -0
- package/registry/examples/otp-input/native/invalid.dark.png +0 -0
- package/registry/examples/otp-input/native/invalid.js +15 -0
- package/registry/examples/otp-input/native/invalid.light.png +0 -0
- package/registry/examples/otp-input/native/invalid.tsx +14 -0
- package/registry/examples/otp-input/native/verify.d.ts +4 -0
- package/registry/examples/otp-input/native/verify.dark.png +0 -0
- package/registry/examples/otp-input/native/verify.js +17 -0
- package/registry/examples/otp-input/native/verify.light.png +0 -0
- package/registry/examples/otp-input/native/verify.tsx +14 -0
- package/registry/examples/permission-prompt/native/blocked.d.ts +4 -0
- package/registry/examples/permission-prompt/native/blocked.dark.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.js +25 -0
- package/registry/examples/permission-prompt/native/blocked.light.png +0 -0
- package/registry/examples/permission-prompt/native/blocked.tsx +21 -0
- package/registry/examples/permission-prompt/native/camera.d.ts +4 -0
- package/registry/examples/permission-prompt/native/camera.dark.png +0 -0
- package/registry/examples/permission-prompt/native/camera.js +25 -0
- package/registry/examples/permission-prompt/native/camera.light.png +0 -0
- package/registry/examples/permission-prompt/native/camera.tsx +21 -0
- package/registry/examples/pull-to-refresh/native/feed.d.ts +4 -0
- package/registry/examples/pull-to-refresh/native/feed.dark.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.js +14 -0
- package/registry/examples/pull-to-refresh/native/feed.light.png +0 -0
- package/registry/examples/pull-to-refresh/native/feed.tsx +19 -0
- package/registry/examples/radio-group/buttons.d.ts +4 -0
- package/registry/examples/radio-group/buttons.js +17 -0
- package/registry/examples/radio-group/buttons.tsx +21 -0
- package/registry/examples/radio-group/cards.js +1 -1
- package/registry/examples/radio-group/cards.tsx +2 -2
- package/registry/examples/radio-group/native/buttons.d.ts +4 -0
- package/registry/examples/radio-group/native/buttons.dark.png +0 -0
- package/registry/examples/radio-group/native/buttons.js +25 -0
- package/registry/examples/radio-group/native/buttons.light.png +0 -0
- package/registry/examples/radio-group/native/buttons.tsx +21 -0
- package/registry/examples/radio-group/native/cards.d.ts +4 -0
- package/registry/examples/radio-group/native/cards.dark.png +0 -0
- package/registry/examples/radio-group/native/cards.js +23 -0
- package/registry/examples/radio-group/native/cards.light.png +0 -0
- package/registry/examples/radio-group/native/cards.tsx +19 -0
- package/registry/examples/radio-group/native/list.d.ts +4 -0
- package/registry/examples/radio-group/native/list.dark.png +0 -0
- package/registry/examples/radio-group/native/list.js +24 -0
- package/registry/examples/radio-group/native/list.light.png +0 -0
- package/registry/examples/radio-group/native/list.tsx +20 -0
- package/registry/examples/radio-group/native/segmented.d.ts +4 -0
- package/registry/examples/radio-group/native/segmented.dark.png +0 -0
- package/registry/examples/radio-group/native/segmented.js +24 -0
- package/registry/examples/radio-group/native/segmented.light.png +0 -0
- package/registry/examples/radio-group/native/segmented.tsx +20 -0
- package/registry/examples/radio-group/segmented.d.ts +4 -0
- package/registry/examples/radio-group/segmented.js +15 -0
- package/registry/examples/radio-group/segmented.tsx +12 -0
- package/registry/examples/search-field/native/cancel.d.ts +4 -0
- package/registry/examples/search-field/native/cancel.dark.png +0 -0
- package/registry/examples/search-field/native/cancel.js +14 -0
- package/registry/examples/search-field/native/cancel.light.png +0 -0
- package/registry/examples/search-field/native/cancel.tsx +13 -0
- package/registry/examples/slider/floating.d.ts +4 -0
- package/registry/examples/slider/floating.js +11 -0
- package/registry/examples/slider/floating.tsx +12 -0
- package/registry/examples/slider/native/default.d.ts +4 -0
- package/registry/examples/slider/native/default.dark.png +0 -0
- package/registry/examples/slider/native/default.js +14 -0
- package/registry/examples/slider/native/default.light.png +0 -0
- package/registry/examples/slider/native/default.tsx +13 -0
- package/registry/examples/slider/native/range.d.ts +4 -0
- package/registry/examples/slider/native/range.dark.png +0 -0
- package/registry/examples/slider/native/range.js +12 -0
- package/registry/examples/slider/native/range.light.png +0 -0
- package/registry/examples/slider/native/range.tsx +11 -0
- package/registry/examples/slider/native/stepped.d.ts +4 -0
- package/registry/examples/slider/native/stepped.dark.png +0 -0
- package/registry/examples/slider/native/stepped.js +28 -0
- package/registry/examples/slider/native/stepped.light.png +0 -0
- package/registry/examples/slider/native/stepped.tsx +24 -0
- package/registry/examples/slider/native/vertical.d.ts +4 -0
- package/registry/examples/slider/native/vertical.dark.png +0 -0
- package/registry/examples/slider/native/vertical.js +16 -0
- package/registry/examples/slider/native/vertical.light.png +0 -0
- package/registry/examples/slider/native/vertical.tsx +13 -0
- package/registry/examples/slider/price-range.d.ts +4 -0
- package/registry/examples/slider/price-range.js +29 -0
- package/registry/examples/slider/price-range.tsx +27 -0
- package/registry/examples/slider/stepped.d.ts +4 -0
- package/registry/examples/slider/stepped.js +28 -0
- package/registry/examples/slider/stepped.tsx +24 -0
- package/registry/examples/slider/vertical.d.ts +4 -0
- package/registry/examples/slider/vertical.js +15 -0
- package/registry/examples/slider/vertical.tsx +14 -0
- package/registry/examples/stat/grid.d.ts +4 -0
- package/registry/examples/stat/grid.js +17 -0
- package/registry/examples/stat/grid.tsx +14 -0
- package/registry/examples/stepper/native/run.d.ts +4 -0
- package/registry/examples/stepper/native/run.dark.png +0 -0
- package/registry/examples/stepper/native/run.js +24 -0
- package/registry/examples/stepper/native/run.light.png +0 -0
- package/registry/examples/stepper/native/run.tsx +20 -0
- package/registry/examples/swipeable-row/native/conversation.d.ts +4 -0
- package/registry/examples/swipeable-row/native/conversation.dark.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.js +30 -0
- package/registry/examples/swipeable-row/native/conversation.light.png +0 -0
- package/registry/examples/swipeable-row/native/conversation.tsx +27 -0
- package/registry/examples/switch/native/default.d.ts +4 -0
- package/registry/examples/switch/native/default.dark.png +0 -0
- package/registry/examples/switch/native/default.js +16 -0
- package/registry/examples/switch/native/default.light.png +0 -0
- package/registry/examples/switch/native/default.tsx +13 -0
- package/registry/examples/switch/native/settings.d.ts +4 -0
- package/registry/examples/switch/native/settings.dark.png +0 -0
- package/registry/examples/switch/native/settings.js +20 -0
- package/registry/examples/switch/native/settings.light.png +0 -0
- package/registry/examples/switch/native/settings.tsx +17 -0
- package/registry/examples/tab-bar/native/main-sections.d.ts +4 -0
- package/registry/examples/tab-bar/native/main-sections.dark.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.js +29 -0
- package/registry/examples/tab-bar/native/main-sections.light.png +0 -0
- package/registry/examples/tab-bar/native/main-sections.tsx +30 -0
- package/registry/examples/tabs/native/sections.d.ts +4 -0
- package/registry/examples/tabs/native/sections.dark.png +0 -0
- package/registry/examples/tabs/native/sections.js +23 -0
- package/registry/examples/tabs/native/sections.light.png +0 -0
- package/registry/examples/tabs/native/sections.tsx +19 -0
- package/registry/examples/tabs/native/segmented.d.ts +4 -0
- package/registry/examples/tabs/native/segmented.dark.png +0 -0
- package/registry/examples/tabs/native/segmented.js +22 -0
- package/registry/examples/tabs/native/segmented.light.png +0 -0
- package/registry/examples/tabs/native/segmented.tsx +18 -0
- package/registry/examples/toast/native/snackbar.d.ts +4 -0
- package/registry/examples/toast/native/snackbar.dark.png +0 -0
- package/registry/examples/toast/native/snackbar.js +23 -0
- package/registry/examples/toast/native/snackbar.light.png +0 -0
- package/registry/examples/toast/native/snackbar.tsx +21 -0
- package/registry/examples/tree-view/docs.d.ts +4 -0
- package/registry/examples/tree-view/docs.js +24 -0
- package/registry/examples/tree-view/docs.tsx +22 -0
- package/registry/examples/tree-view/lazy.d.ts +4 -0
- package/registry/examples/tree-view/lazy.js +21 -0
- package/registry/examples/tree-view/lazy.tsx +19 -0
- package/registry/fab.json +122 -0
- package/registry/field.json +16 -4
- package/registry/file-upload.json +2 -2
- package/registry/filter-bar.json +1 -1
- package/registry/form.json +252 -44
- package/registry/gallery-page.json +1 -1
- package/registry/glow-card.json +1 -1
- package/registry/goal-gauge.json +1 -1
- package/registry/header.json +137 -0
- package/registry/how-it-works-page.json +1 -1
- package/registry/image-cropper.json +1 -1
- package/registry/image-viewer.json +107 -0
- package/registry/index.json +322 -44
- package/registry/iso.json +1 -1
- package/registry/kanban.json +253 -0
- 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 +1 -1
- package/registry/list.json +367 -30
- package/registry/loader.json +157 -4
- package/registry/longform-page.json +1 -1
- package/registry/map.json +1368 -0
- 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/media-capture.json +1 -1
- package/registry/media-picker.json +129 -0
- package/registry/meter.json +136 -4
- package/registry/nav-bar.json +1 -1
- package/registry/number-ticker.json +96 -4
- package/registry/onboarding.json +95 -0
- package/registry/otp-input.json +150 -0
- 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/permission-prompt.json +172 -0
- 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 +2 -2
- package/registry/promise-card.json +1 -1
- package/registry/pull-to-refresh.json +74 -0
- package/registry/radio-group.json +228 -16
- package/registry/scroll-stage.json +1 -1
- package/registry/search-field.json +30 -3
- package/registry/section-backdrop.json +1 -1
- package/registry/separator.json +1 -1
- package/registry/settings-layout.json +1 -1
- package/registry/skeleton.json +1 -1
- package/registry/slider.json +315 -14
- 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 +68 -5
- package/registry/status-page.json +1 -1
- package/registry/stepper.json +75 -4
- package/registry/swipeable-row.json +124 -0
- package/registry/switch.json +116 -4
- package/registry/tab-bar.json +115 -0
- package/registry/tabs.json +96 -6
- package/registry/tag-input.json +1 -1
- package/registry/terminal-replay.json +1 -1
- package/registry/theme.json +8 -1
- package/registry/toast.json +17 -3
- package/registry/toc.json +1 -1
- package/registry/tooltip.json +1 -1
- package/registry/tree-view.json +291 -0
- package/registry/video-player.json +1 -1
- package/registry/video-trimmer.json +1 -1
- package/registry/virtual.json +1 -1
- package/skills/choice-controls/SKILL.md +39 -0
- package/skills/form/SKILL.md +3 -0
- package/skills/map/SKILL.md +35 -0
- package/dist/chunk-I5RVM5CW.js.map +0 -1
- package/dist/chunk-RUPRYJ45.js +0 -82
- package/dist/chunk-RUPRYJ45.js.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "swipeable-row",
|
|
3
|
+
"type": "native",
|
|
4
|
+
"title": "Swipeable row",
|
|
5
|
+
"summary": "A row whose actions show under a swipe: left for the trailing ones, right for the leading ones, a full swipe runs the outermost.",
|
|
6
|
+
"description": "A row whose actions show under a swipe: left for the trailing ones, right for the leading ones, a full swipe runs the outermost.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "data-display",
|
|
9
|
+
"platforms": "native",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"A conversation: pin, archive, delete.",
|
|
12
|
+
"A notification: mark read, delete."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "For the only way to reach an action: offer it in the row's menu too.",
|
|
17
|
+
"use": "action-sheet"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"bestPractices": [
|
|
21
|
+
"Two actions per side at most; the outermost is the one a full swipe runs.",
|
|
22
|
+
"Destructive actions in `danger`, at the far edge."
|
|
23
|
+
],
|
|
24
|
+
"accessibility": {
|
|
25
|
+
"keyboard": [],
|
|
26
|
+
"notes": [
|
|
27
|
+
"Each action is an accessibility action (the rotor on iOS, the actions menu on Android): nothing is reachable only by a gesture.",
|
|
28
|
+
"A medium tick when a full swipe passes its threshold."
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"related": [
|
|
32
|
+
"list",
|
|
33
|
+
"action-sheet"
|
|
34
|
+
],
|
|
35
|
+
"web": null,
|
|
36
|
+
"native": {
|
|
37
|
+
"entry": "@krizaka/ui/native",
|
|
38
|
+
"import": "import { SwipeableRow } from \"@krizaka/ui/native\";",
|
|
39
|
+
"differences": [],
|
|
40
|
+
"props": [
|
|
41
|
+
{
|
|
42
|
+
"component": "SwipeableRow",
|
|
43
|
+
"description": "A row whose actions show under a swipe — mail-style: swipe left for the trailing actions, right for the leading ones,\na full swipe runs the outermost one, a tick marks the threshold. Screen readers get the same actions from the\nrotor (accessibility actions): nothing is reachable only by a gesture.",
|
|
44
|
+
"props": [
|
|
45
|
+
{
|
|
46
|
+
"name": "children",
|
|
47
|
+
"type": "ReactNode",
|
|
48
|
+
"default": null,
|
|
49
|
+
"description": "The row's content (a `ListItem`).",
|
|
50
|
+
"required": true
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"name": "actionWidth",
|
|
54
|
+
"type": "number",
|
|
55
|
+
"default": "80",
|
|
56
|
+
"description": "Width of each action, in points. Default 80.",
|
|
57
|
+
"required": false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"name": "fullSwipe",
|
|
61
|
+
"type": "number | false",
|
|
62
|
+
"default": "0.6",
|
|
63
|
+
"description": "A full swipe past this share of the row runs the outermost action (delete, archive). Default 0.6; `false` never.",
|
|
64
|
+
"required": false
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "leading",
|
|
68
|
+
"type": "readonly SwipeAction[]",
|
|
69
|
+
"default": "[]",
|
|
70
|
+
"description": "Revealed by a swipe to the right, at the left edge.",
|
|
71
|
+
"required": false
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "onActivate",
|
|
75
|
+
"type": "(() => void)",
|
|
76
|
+
"default": null,
|
|
77
|
+
"description": "The row's own action, for screen readers: the row is one element whose actions are the swipe actions, and\nactivating it calls this (pass the `onPress` of the `ListItem` inside).",
|
|
78
|
+
"required": false
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "style",
|
|
82
|
+
"type": "StyleProp<ViewStyle>",
|
|
83
|
+
"default": null,
|
|
84
|
+
"description": "Styles merged last.",
|
|
85
|
+
"required": false
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "testID",
|
|
89
|
+
"type": "string",
|
|
90
|
+
"default": null,
|
|
91
|
+
"description": "The test id of the row's moving part (the accessibility element).",
|
|
92
|
+
"required": false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "trailing",
|
|
96
|
+
"type": "readonly SwipeAction[]",
|
|
97
|
+
"default": "[]",
|
|
98
|
+
"description": "Revealed by a swipe to the left, at the right edge (the first is the outermost).",
|
|
99
|
+
"required": false
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
"examples": [
|
|
105
|
+
{
|
|
106
|
+
"name": "conversation",
|
|
107
|
+
"title": "A conversation",
|
|
108
|
+
"description": "Pin on the right swipe; archive and delete on the left.",
|
|
109
|
+
"path": "examples/swipeable-row/native/conversation.tsx",
|
|
110
|
+
"module": "@krizaka/ui/registry/examples/swipeable-row/native/conversation",
|
|
111
|
+
"code": "import { Avatar, SwipeableRow, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// Swipe left to archive or delete, right to pin; screen readers find the same actions in the rotor.\nexport default function NativeSwipeableRowConversation() {\n return (\n <View style={{ width: 360 }}>\n <SwipeableRow\n leading={[{ label: \"Pin\", tone: \"accent\", onPress: () => undefined }]}\n trailing={[\n { label: \"Delete\", tone: \"danger\", onPress: () => undefined },\n { label: \"Archive\", onPress: () => undefined },\n ]}\n onActivate={() => undefined}\n >\n <View style={{ flexDirection: \"row\", alignItems: \"center\", gap: 12, padding: 12 }}>\n <Avatar alt=\"Elena\" presence=\"online\" presenceLabel=\"online\" />\n <View style={{ flex: 1 }}>\n <Txt variant=\"label\">Elena</Txt>\n <Txt variant=\"caption\" tone=\"secondary\">Sending the stems tonight 🎧</Txt>\n </View>\n <Txt variant=\"caption\" tone=\"secondary\">2 min</Txt>\n </View>\n </SwipeableRow>\n </View>\n );\n}\n",
|
|
112
|
+
"screenshots": {
|
|
113
|
+
"dark": "examples/swipeable-row/native/conversation.dark.png",
|
|
114
|
+
"light": "examples/swipeable-row/native/conversation.light.png"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
"files": [],
|
|
120
|
+
"dependencies": [],
|
|
121
|
+
"registryDependencies": [],
|
|
122
|
+
"demo": null,
|
|
123
|
+
"props": []
|
|
124
|
+
}
|
package/registry/switch.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "An on/off setting that applies at once.",
|
|
7
7
|
"status": "beta",
|
|
8
8
|
"category": "forms",
|
|
9
|
-
"platforms": "
|
|
9
|
+
"platforms": "both",
|
|
10
10
|
"whenToUse": [
|
|
11
11
|
"For a setting that takes effect immediately: autoplay, notifications, a weekly digest."
|
|
12
12
|
],
|
|
@@ -120,11 +120,123 @@
|
|
|
120
120
|
}
|
|
121
121
|
]
|
|
122
122
|
},
|
|
123
|
-
"native":
|
|
123
|
+
"native": {
|
|
124
|
+
"entry": "@krizaka/ui/native",
|
|
125
|
+
"import": "import { Switch } from \"@krizaka/ui/native\";",
|
|
126
|
+
"differences": [
|
|
127
|
+
"Drawn by the theme, not the system's: the same switch on iOS and Android, the accent when on, a `selection` haptic when it flips (the app's `haptics`).",
|
|
128
|
+
"`showLabel` makes it a settings row: the label and its `description` beside the switch, the whole row pressable, the description read as the hint.",
|
|
129
|
+
"`error` shows under the row and is announced."
|
|
130
|
+
],
|
|
131
|
+
"props": [
|
|
132
|
+
{
|
|
133
|
+
"component": "Switch",
|
|
134
|
+
"description": "An on/off switch for React Native — the web `Switch`, drawn by the theme (the accent when on, the material's knob),\nnot the system's: the same look on iOS and Android, a `selection` haptic when it flips. `showLabel` makes it a\nsettings row (the label and its description beside it, all pressable).",
|
|
135
|
+
"props": [
|
|
136
|
+
{
|
|
137
|
+
"name": "label",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"default": null,
|
|
140
|
+
"description": "The accessible name (\"Push notifications\"), passed translated — also the visible words when `children` is not given and `showLabel` is set.",
|
|
141
|
+
"required": true
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "checked",
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"default": null,
|
|
147
|
+
"description": "On (controlled).",
|
|
148
|
+
"required": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "defaultChecked",
|
|
152
|
+
"type": "boolean",
|
|
153
|
+
"default": "false",
|
|
154
|
+
"description": "On at first, uncontrolled.",
|
|
155
|
+
"required": false
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "description",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"default": null,
|
|
161
|
+
"description": "A line under the label, read with the switch (\"Auctions you follow, new messages\"). Shown with `showLabel`.",
|
|
162
|
+
"required": false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "disabled",
|
|
166
|
+
"type": "boolean",
|
|
167
|
+
"default": null,
|
|
168
|
+
"description": "Not available.",
|
|
169
|
+
"required": false
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "error",
|
|
173
|
+
"type": "string",
|
|
174
|
+
"default": null,
|
|
175
|
+
"description": "An error under the row, read and announced.",
|
|
176
|
+
"required": false
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"name": "onCheckedChange",
|
|
180
|
+
"type": "((checked: boolean) => void)",
|
|
181
|
+
"default": null,
|
|
182
|
+
"description": "Called with the new state.",
|
|
183
|
+
"required": false
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "showLabel",
|
|
187
|
+
"type": "boolean",
|
|
188
|
+
"default": null,
|
|
189
|
+
"description": "Draws the label (and the description) beside the switch, the whole row pressable: a settings row.",
|
|
190
|
+
"required": false
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"name": "size",
|
|
194
|
+
"type": "\"sm\" | \"md\"",
|
|
195
|
+
"default": "md",
|
|
196
|
+
"description": "sm · md (default).",
|
|
197
|
+
"required": false
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "style",
|
|
201
|
+
"type": "StyleProp<ViewStyle>",
|
|
202
|
+
"default": null,
|
|
203
|
+
"description": "Styles merged last.",
|
|
204
|
+
"required": false
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"examples": [
|
|
210
|
+
{
|
|
211
|
+
"name": "settings",
|
|
212
|
+
"title": "Settings rows",
|
|
213
|
+
"description": "Notification preferences: rows with a description, one disabled while push is off.",
|
|
214
|
+
"path": "examples/switch/native/settings.tsx",
|
|
215
|
+
"module": "@krizaka/ui/registry/examples/switch/native/settings",
|
|
216
|
+
"code": "import { Switch } from \"@krizaka/ui/native\";\nimport * as React from \"react\";\nimport { View } from \"react-native\";\n\n// Notification preferences: settings rows, the whole row pressable, a selection haptic as each one flips.\nexport default function NativeSwitchSettings() {\n const [push, setPush] = React.useState(true);\n const [auctions, setAuctions] = React.useState(true);\n const [digest, setDigest] = React.useState(false);\n return (\n <View style={{ width: 320, gap: 4 }}>\n <Switch label=\"Push notifications\" description=\"On this phone, even when the app is closed.\" showLabel checked={push} onCheckedChange={setPush} />\n <Switch label=\"Auctions you follow\" description=\"Outbid, ending soon, won.\" showLabel checked={auctions} onCheckedChange={setAuctions} disabled={!push} />\n <Switch label=\"Weekly digest\" description=\"One e-mail on Monday morning.\" showLabel checked={digest} onCheckedChange={setDigest} />\n </View>\n );\n}\n",
|
|
217
|
+
"screenshots": {
|
|
218
|
+
"dark": "examples/switch/native/settings.dark.png",
|
|
219
|
+
"light": "examples/switch/native/settings.light.png"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"name": "default",
|
|
224
|
+
"title": "Alone",
|
|
225
|
+
"description": "Named by `label`; md and sm.",
|
|
226
|
+
"path": "examples/switch/native/default.tsx",
|
|
227
|
+
"module": "@krizaka/ui/registry/examples/switch/native/default",
|
|
228
|
+
"code": "import { Switch } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// The switch alone, named by `label`: md and sm, on and off.\nexport default function NativeSwitchDefault() {\n return (\n <View style={{ flexDirection: \"row\", gap: 16, alignItems: \"center\" }}>\n <Switch label=\"Dark mode\" defaultChecked />\n <Switch label=\"Sounds\" />\n <Switch label=\"Compact\" size=\"sm\" defaultChecked />\n </View>\n );\n}\n",
|
|
229
|
+
"screenshots": {
|
|
230
|
+
"dark": "examples/switch/native/default.dark.png",
|
|
231
|
+
"light": "examples/switch/native/default.light.png"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
]
|
|
235
|
+
},
|
|
124
236
|
"files": [
|
|
125
237
|
{
|
|
126
238
|
"path": "meta.ts",
|
|
127
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
239
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
128
240
|
},
|
|
129
241
|
{
|
|
130
242
|
"path": "switch/index.ts",
|
|
@@ -132,7 +244,7 @@
|
|
|
132
244
|
},
|
|
133
245
|
{
|
|
134
246
|
"path": "switch/meta.ts",
|
|
135
|
-
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Switch\",\n summary: \"An on/off setting that applies at once.\",\n status: \"beta\",\n category: \"forms\",\n platforms: \"
|
|
247
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Switch\",\n summary: \"An on/off setting that applies at once.\",\n status: \"beta\",\n category: \"forms\",\n platforms: \"both\",\n whenToUse: [\"For a setting that takes effect immediately: autoplay, notifications, a weekly digest.\"],\n whenNotToUse: [\n { when: \"For a choice submitted with a form, or an agreement.\", use: \"checkbox\" },\n { when: \"For more than two states.\", use: \"radio-group\" },\n { when: \"To run an action.\", use: \"button\" },\n ],\n bestPractices: [\n \"Name the setting, not the state: “Autoplay”, not “Turn autoplay on”.\",\n \"Put the label first and the switch at the end of the line (`Field.Label htmlFor`), with a hint when it helps.\",\n ],\n accessibility: {\n keyboard: [{ keys: \"Space\", action: \"Toggles the switch.\" }],\n notes: [\n \"Radix Switch: `role=\\\"switch\\\"` with `aria-checked`.\",\n \"`label` names it when no visible label does; otherwise use `Field.Label htmlFor` and `aria-describedby` for the hint.\",\n ],\n },\n related: [\"checkbox\", \"field\", \"radio-group\"],\n web: {\n imports: [\"Switch\"],\n examples: [\n { name: \"off\", title: \"Off\", description: \"Named by `label`.\" },\n { name: \"on\", title: \"On\", description: \"`defaultChecked` (or `checked` + `onCheckedChange`).\" },\n { name: \"disabled\", title: \"Disabled\", description: \"Off and on.\" },\n { name: \"small\", title: \"Small\", description: \"`size=\\\"sm\\\"`.\" },\n { name: \"with-label\", title: \"With a visible label\", description: \"A label and a hint on the same line.\" },\n ],\n },\n native: {\n imports: [\"Switch\"],\n differences: [\n \"Drawn by the theme, not the system's: the same switch on iOS and Android, the accent when on, a `selection` haptic when it flips (the app's `haptics`).\",\n \"`showLabel` makes it a settings row: the label and its `description` beside the switch, the whole row pressable, the description read as the hint.\",\n \"`error` shows under the row and is announced.\",\n ],\n examples: [\n { name: \"settings\", title: \"Settings rows\", description: \"Notification preferences: rows with a description, one disabled while push is off.\" },\n { name: \"default\", title: \"Alone\", description: \"Named by `label`; md and sm.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
136
248
|
},
|
|
137
249
|
{
|
|
138
250
|
"path": "switch/switch.tsx",
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tab-bar",
|
|
3
|
+
"type": "native",
|
|
4
|
+
"title": "Tab bar",
|
|
5
|
+
"summary": "The app's main sections at the bottom of the screen: an icon and a word each, a badge for what is new, clear of the home indicator.",
|
|
6
|
+
"description": "The app's main sections at the bottom of the screen: an icon and a word each, a badge for what is new, clear of the home indicator.",
|
|
7
|
+
"status": "beta",
|
|
8
|
+
"category": "navigation",
|
|
9
|
+
"platforms": "native",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"The root of a mobile app with two to five sections (Home, Auctions, Messages, Me).",
|
|
12
|
+
"As the `tabBar` of expo-router or React Navigation."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "To switch between views of one screen.",
|
|
17
|
+
"use": "tabs"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "For more than five destinations: a list on a “More” screen."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"bestPractices": [
|
|
24
|
+
"Name each section with one word; the icon is filled when selected.",
|
|
25
|
+
"Use the badge for what needs attention (unread), never for promotion.",
|
|
26
|
+
"`onReselect`: scroll the current section to the top."
|
|
27
|
+
],
|
|
28
|
+
"accessibility": {
|
|
29
|
+
"keyboard": [],
|
|
30
|
+
"notes": [
|
|
31
|
+
"A `tablist` of `tab`s, each named by its word and its badge in words (`badgeLabel`).",
|
|
32
|
+
"At least 48 points per item; the safe area below is kept."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"related": [
|
|
36
|
+
"tabs",
|
|
37
|
+
"segmented",
|
|
38
|
+
"header"
|
|
39
|
+
],
|
|
40
|
+
"web": null,
|
|
41
|
+
"native": {
|
|
42
|
+
"entry": "@krizaka/ui/native",
|
|
43
|
+
"import": "import { TabBar } from \"@krizaka/ui/native\";",
|
|
44
|
+
"differences": [],
|
|
45
|
+
"props": [
|
|
46
|
+
{
|
|
47
|
+
"component": "TabBar",
|
|
48
|
+
"description": "The app's main sections, at the bottom of the screen: an icon and a word each, the current one in the accent, a\nbadge for what is new; clear of the home indicator (the safe area), a tick on change, a second press to go back to\nthe top. Plug it in expo-router's or React Navigation's `tabBar`.",
|
|
49
|
+
"props": [
|
|
50
|
+
{
|
|
51
|
+
"name": "items",
|
|
52
|
+
"type": "readonly TabBarItem<T>[]",
|
|
53
|
+
"default": null,
|
|
54
|
+
"description": "The app's main sections, two to five.",
|
|
55
|
+
"required": true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"name": "onValueChange",
|
|
59
|
+
"type": "(value: T) => void",
|
|
60
|
+
"default": null,
|
|
61
|
+
"description": "Called with the section pressed (navigate there); a light tick confirms it.",
|
|
62
|
+
"required": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "value",
|
|
66
|
+
"type": "string",
|
|
67
|
+
"default": null,
|
|
68
|
+
"description": "The current section.",
|
|
69
|
+
"required": true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "aria-label",
|
|
73
|
+
"type": "string",
|
|
74
|
+
"default": null,
|
|
75
|
+
"description": "The accessible name of the bar (“Main sections”) — passed translated.",
|
|
76
|
+
"required": false
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "onReselect",
|
|
80
|
+
"type": "((value: T) => void)",
|
|
81
|
+
"default": null,
|
|
82
|
+
"description": "Called when the current section is pressed again: scroll it to the top, refresh it.",
|
|
83
|
+
"required": false
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "style",
|
|
87
|
+
"type": "StyleProp<ViewStyle>",
|
|
88
|
+
"default": null,
|
|
89
|
+
"description": "Styles merged last.",
|
|
90
|
+
"required": false
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
"examples": [
|
|
96
|
+
{
|
|
97
|
+
"name": "main-sections",
|
|
98
|
+
"title": "Main sections",
|
|
99
|
+
"description": "Orochia's four sections, three unread messages.",
|
|
100
|
+
"path": "examples/tab-bar/native/main-sections.tsx",
|
|
101
|
+
"module": "@krizaka/ui/registry/examples/tab-bar/native/main-sections",
|
|
102
|
+
"code": "import { TabBar } from \"@krizaka/ui/native\";\nimport { useState } from \"react\";\nimport { View } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nconst icon = (d: string) => (on: boolean, color: string) => (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill={on ? color : \"none\"} stroke={color} strokeWidth={2} strokeLinejoin=\"round\">\n <Path d={d} />\n </Svg>\n);\n\n// Orochia's main sections: the current one in the accent, a badge on Messages, a tick on change.\nexport default function NativeTabBarMainSections() {\n const [tab, setTab] = useState<\"home\" | \"auctions\" | \"messages\" | \"me\">(\"home\");\n return (\n <View style={{ width: 360 }}>\n <TabBar\n aria-label=\"Main sections\"\n value={tab}\n onValueChange={setTab}\n items={[\n { value: \"home\", label: \"Home\", icon: icon(\"M3 11 12 4l9 7v9h-6v-6H9v6H3z\") },\n { value: \"auctions\", label: \"Auctions\", icon: icon(\"M14 4l6 6-3 3-6-6zM11 7l-8 8 3 3 8-8M4 21h9\") },\n { value: \"messages\", label: \"Messages\", badge: 3, badgeLabel: \"3 unread\", icon: icon(\"M4 5h16v11H8l-4 4z\") },\n { value: \"me\", label: \"Me\", icon: icon(\"M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM4 21a8 8 0 0 1 16 0\") },\n ]}\n />\n </View>\n );\n}\n",
|
|
103
|
+
"screenshots": {
|
|
104
|
+
"dark": "examples/tab-bar/native/main-sections.dark.png",
|
|
105
|
+
"light": "examples/tab-bar/native/main-sections.light.png"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
"files": [],
|
|
111
|
+
"dependencies": [],
|
|
112
|
+
"registryDependencies": [],
|
|
113
|
+
"demo": null,
|
|
114
|
+
"props": []
|
|
115
|
+
}
|
package/registry/tabs.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description": "Views of the same page, one at a time: underlined sections, a segmented switch or pills — one light glides from the active tab to the next, in every variant.",
|
|
7
7
|
"status": "beta",
|
|
8
8
|
"category": "navigation",
|
|
9
|
-
"platforms": "
|
|
9
|
+
"platforms": "both",
|
|
10
10
|
"whenToUse": [
|
|
11
11
|
"To split a page into sections the user switches between without leaving it: videos, stories, about.",
|
|
12
12
|
"`variant=\"segmented\"` for a view switch (grid, list); `pills` for a feed's sections."
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"props": [
|
|
60
60
|
{
|
|
61
61
|
"name": "variant",
|
|
62
|
-
"type": "\"
|
|
62
|
+
"type": "\"segmented\" | \"underline\" | \"pills\"",
|
|
63
63
|
"default": "underline",
|
|
64
64
|
"description": "underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections).",
|
|
65
65
|
"required": false
|
|
@@ -107,11 +107,101 @@
|
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
},
|
|
110
|
-
"native":
|
|
110
|
+
"native": {
|
|
111
|
+
"entry": "@krizaka/ui/native",
|
|
112
|
+
"import": "import { Tabs } from \"@krizaka/ui/native\";",
|
|
113
|
+
"differences": [
|
|
114
|
+
"`items` (value, label, count, content) instead of the web's parts.",
|
|
115
|
+
"The underlined tab list scrolls sideways when it does not fit; for the app's main sections use `TabBar`."
|
|
116
|
+
],
|
|
117
|
+
"props": [
|
|
118
|
+
{
|
|
119
|
+
"component": "Tabs",
|
|
120
|
+
"description": "Sections of one screen — the web `Tabs`: a tab list (underlined, scrolling sideways when long, or segmented) and the\nselected panel under it. For the app's main sections, use `TabBar`.",
|
|
121
|
+
"props": [
|
|
122
|
+
{
|
|
123
|
+
"name": "items",
|
|
124
|
+
"type": "readonly TabItem<T>[]",
|
|
125
|
+
"default": null,
|
|
126
|
+
"description": "The tabs, in order.",
|
|
127
|
+
"required": true
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "aria-label",
|
|
131
|
+
"type": "string",
|
|
132
|
+
"default": null,
|
|
133
|
+
"description": "The accessible name of the tab list — passed translated.",
|
|
134
|
+
"required": false
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "defaultValue",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"default": null,
|
|
140
|
+
"description": "The selected tab at first, uncontrolled. Default: the first.",
|
|
141
|
+
"required": false
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "onValueChange",
|
|
145
|
+
"type": "((value: T) => void)",
|
|
146
|
+
"default": null,
|
|
147
|
+
"description": "Called with the tab pressed; a light tick confirms it.",
|
|
148
|
+
"required": false
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"name": "style",
|
|
152
|
+
"type": "StyleProp<ViewStyle>",
|
|
153
|
+
"default": null,
|
|
154
|
+
"description": "Styles merged last, on the root.",
|
|
155
|
+
"required": false
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "value",
|
|
159
|
+
"type": "string",
|
|
160
|
+
"default": null,
|
|
161
|
+
"description": "The selected tab (controlled).",
|
|
162
|
+
"required": false
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"name": "variant",
|
|
166
|
+
"type": "\"segmented\" | \"underline\"",
|
|
167
|
+
"default": "underline",
|
|
168
|
+
"description": "`underline` (default: sections of a screen, scrolls sideways when they do not fit) or `segmented` (two to four views).",
|
|
169
|
+
"required": false
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"examples": [
|
|
175
|
+
{
|
|
176
|
+
"name": "sections",
|
|
177
|
+
"title": "Sections",
|
|
178
|
+
"description": "A creator's page: underlined tabs with counts.",
|
|
179
|
+
"path": "examples/tabs/native/sections.tsx",
|
|
180
|
+
"module": "@krizaka/ui/registry/examples/tabs/native/sections",
|
|
181
|
+
"code": "import { Tabs, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// A creator's page: sections that scroll sideways when they do not fit, a count after the words.\nexport default function NativeTabsSections() {\n return (\n <View style={{ width: 340 }}>\n <Tabs\n aria-label=\"Elena's page\"\n items={[\n { value: \"videos\", label: \"Videos\", count: 42, content: <Txt tone=\"secondary\">42 videos, newest first.</Txt> },\n { value: \"auctions\", label: \"Auctions\", count: 3, content: <Txt tone=\"secondary\">3 auctions running.</Txt> },\n { value: \"challenges\", label: \"Challenges\", content: <Txt tone=\"secondary\">Dares from fans.</Txt> },\n { value: \"about\", label: \"About\", content: <Txt tone=\"secondary\">Covers and live sessions.</Txt> },\n ]}\n />\n </View>\n );\n}\n",
|
|
182
|
+
"screenshots": {
|
|
183
|
+
"dark": "examples/tabs/native/sections.dark.png",
|
|
184
|
+
"light": "examples/tabs/native/sections.light.png"
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "segmented",
|
|
189
|
+
"title": "Segmented",
|
|
190
|
+
"description": "Two views of the same content.",
|
|
191
|
+
"path": "examples/tabs/native/segmented.tsx",
|
|
192
|
+
"module": "@krizaka/ui/registry/examples/tabs/native/segmented",
|
|
193
|
+
"code": "import { Tabs, Txt } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\n\n// Two views of the same content: `variant=\"segmented\"`.\nexport default function NativeTabsSegmented() {\n return (\n <View style={{ width: 320 }}>\n <Tabs\n variant=\"segmented\"\n aria-label=\"Story insights\"\n items={[\n { value: \"viewers\", label: \"Viewers\", content: <Txt tone=\"secondary\">312 people watched.</Txt> },\n { value: \"tips\", label: \"Tips\", content: <Txt tone=\"secondary\">$46 from 9 fans.</Txt> },\n ]}\n />\n </View>\n );\n}\n",
|
|
194
|
+
"screenshots": {
|
|
195
|
+
"dark": "examples/tabs/native/segmented.dark.png",
|
|
196
|
+
"light": "examples/tabs/native/segmented.light.png"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
111
201
|
"files": [
|
|
112
202
|
{
|
|
113
203
|
"path": "meta.ts",
|
|
114
|
-
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"iso\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"switch\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
204
|
+
"content": "// The documentation of a component, carried by its code: each primitive has a `meta.ts` beside its source\n// (`src/<name>/meta.ts`; a component that exists only in React Native: `src/native/meta/<name>.ts`). Never built into\n// the package: `scripts/build-registry.mjs` reads them into `registry/<name>.json`, which krizaka.com renders as\n// /docs/ui/<name>, and `scripts/registry.test.mjs` fails when one is missing or incomplete.\n//\n// Why a typed module and not JSDoc tags: the fields are lists and links (`related`, `whenNotToUse[].use`, examples),\n// which a type checks and a comment does not; the file is plain data (erasable TypeScript), so Node reads it without a\n// compiler, and an editor completes it.\n\n/** Every documented component: the web primitives (one entry of the package each) and the native-only ones. */\nexport type ComponentName =\n | \"achievement\"\n | \"action-bar\"\n | \"activity-feed\"\n | \"action-sheet\"\n | \"alert\"\n | \"app-shell\"\n | \"argument-card\"\n | \"audio-player\"\n | \"auth-layout\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"card-grid\"\n | \"catalogue-page\"\n | \"changelog-page\"\n | \"checkbox\"\n | \"chip\"\n | \"chip-link\"\n | \"choice-grid\"\n | \"cn\"\n | \"code-block\"\n | \"combobox\"\n | \"command\"\n | \"component-page\"\n | \"confirm-button\"\n | \"contact-page\"\n | \"continue-prompt\"\n | \"countdown\"\n | \"cta-panel\"\n | \"dashboard-layout\"\n | \"data-table\"\n | \"date-picker\"\n | \"decision-list\"\n | \"description-list\"\n | \"detail-layout\"\n | \"dialog\"\n | \"docs-article-page\"\n | \"docs-hub-page\"\n | \"docs-layout\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"error-page\"\n | \"fab\"\n | \"field\"\n | \"file-upload\"\n | \"filter-bar\"\n | \"form\"\n | \"gallery-page\"\n | \"glow-card\"\n | \"goal-gauge\"\n | \"header\"\n | \"how-it-works-page\"\n | \"image-cropper\"\n | \"image-viewer\"\n | \"iso\"\n | \"kanban\"\n | \"kbd\"\n | \"landing-page\"\n | \"landscape\"\n | \"legal-page\"\n | \"link-card\"\n | \"list\"\n | \"loader\"\n | \"map\"\n | \"longform-page\"\n | \"marketing-layout\"\n | \"marquee\"\n | \"mascot-quote\"\n | \"mascot-state\"\n | \"mascots\"\n | \"media-capture\"\n | \"media-picker\"\n | \"meter\"\n | \"nav-bar\"\n | \"number-ticker\"\n | \"onboarding\"\n | \"otp-input\"\n | \"page\"\n | \"page-header\"\n | \"page-hero\"\n | \"pagination\"\n | \"permission-prompt\"\n | \"pointer-light\"\n | \"popover\"\n | \"pricing-page\"\n | \"product-page\"\n | \"profile-card\"\n | \"progress\"\n | \"promise-card\"\n | \"pull-to-refresh\"\n | \"radio-group\"\n | \"scroll-stage\"\n | \"search-field\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"settings-layout\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"split-view\"\n | \"stage-banner\"\n | \"stat\"\n | \"status-page\"\n | \"stepper\"\n | \"swipeable-row\"\n | \"switch\"\n | \"tab-bar\"\n | \"tabs\"\n | \"tag-input\"\n | \"terminal-replay\"\n | \"theme\"\n | \"toast\"\n | \"toc\"\n | \"tooltip\"\n | \"tree-view\"\n | \"txt\"\n | \"video-player\"\n | \"video-trimmer\"\n | \"virtual\";\n\n/** Where a component exists: `@krizaka/ui/<name>` (web), `@krizaka/ui/native` (React Native), or both. */\nexport type Platform = \"web\" | \"native\" | \"both\";\n\n/** `stable`: its API only changes in a major. `beta`: it may still change in a minor. */\nexport type Status = \"stable\" | \"beta\";\n\n/**\n * The group of the catalogue. `media`: video, sound, camera, files, cropping. `blocks`: the page blocks — the frame,\n * the hero, sections, cards that lead or argue, decisions, code, calls to act — that every page of a site is made of.\n * `layouts`: the shells of whole screens — an application, a dashboard, settings, sign-in, an object, a list and its\n * item, a site's page, a documentation page — each with its screens. `templates`: the page templates — whole pages of a\n * site (a landing, a product, a docs hub, a long read, a changelog, pricing, status, an error…), each a distinct\n * composition of the blocks, words and content as props.\n */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"media\" | \"blocks\" | \"layouts\" | \"templates\" | \"layout\" | \"foundations\";\n\n/**\n * A named example: the file `registry/examples/<component>/<name>.tsx` (web) or\n * `registry/examples/<component>/native/<name>.tsx` (React Native) — at most 40 lines, imported by the stories and\n * shown (live, with its code) by the documentation.\n */\nexport interface Example {\n /** The file name, kebab-case (`primary`, `icon-button`). */\n readonly name: string;\n /** A short title (`Primary`, `Icon button`). */\n readonly title: string;\n /** One or two sentences: when this variant is the right one. */\n readonly description: string;\n /**\n * A template: a whole screen of a product composed from the platform (a layout and its blocks, real words, its phone\n * version thought out), copied as a starting point — at most 160 lines, listed on krizaka.com/docs/ui/templates.\n */\n readonly template?: boolean;\n}\n\n/** One platform's side of a component. */\nexport interface PlatformDocs {\n /** The names to import (`[\"Button\", \"IconButton\"]`): from `@krizaka/ui/<name>` on the web, `@krizaka/ui/native` in React Native. */\n readonly imports: readonly string[];\n /** The examples, in reading order; the first one is the component's preview. */\n readonly examples: readonly Example[];\n}\n\n/** The React Native side: the same concept, and what differs from the web API. */\nexport interface NativeDocs extends PlatformDocs {\n /**\n * The entry to import from when it is not `@krizaka/ui/native`: a component that needs an Expo module (an optional\n * peer) has its own, `@krizaka/ui/native/<name>`, so an app that does not use it never installs the module.\n */\n readonly entry?: string;\n /** What differs from the web API (`label` instead of children…); empty for a native-only component. */\n readonly differences: readonly string[];\n}\n\nexport interface KeyboardInteraction {\n /** The keys, as written on a keyboard: `Space`, `Enter`, `Arrow keys`, `Esc`, `Tab`. */\n readonly keys: string;\n /** What they do. */\n readonly action: string;\n}\n\nexport interface ComponentMeta {\n /** The display name: `Button`, `Dropdown menu`. */\n readonly title: string;\n /** One sentence: what it is. */\n readonly summary: string;\n readonly status: Status;\n readonly category: Category;\n /** Must match the sides below: `both` ⇔ `web` and `native`. */\n readonly platforms: Platform;\n /** When to reach for it: concrete situations, one per item. */\n readonly whenToUse: readonly string[];\n /** When not to — and what to use instead (`use`), when another component is the answer. */\n readonly whenNotToUse: readonly { readonly when: string; readonly use?: ComponentName }[];\n /** How to use it well: wording, placement, composition. */\n readonly bestPractices: readonly string[];\n readonly accessibility: {\n /** The keyboard, when it does more than Tab and Enter. */\n readonly keyboard: readonly KeyboardInteraction[];\n /** Roles, names and announcements: what the component does, what the app must provide. */\n readonly notes: readonly string[];\n };\n /** The components a reader of this page should know about. */\n readonly related: readonly ComponentName[];\n readonly web?: PlatformDocs;\n readonly native?: NativeDocs;\n}\n"
|
|
115
205
|
},
|
|
116
206
|
{
|
|
117
207
|
"path": "sliding-indicator.ts",
|
|
@@ -123,7 +213,7 @@
|
|
|
123
213
|
},
|
|
124
214
|
{
|
|
125
215
|
"path": "tabs/meta.ts",
|
|
126
|
-
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Tabs\",\n summary: \"Views of the same page, one at a time: underlined sections, a segmented switch or pills — one light glides from the active tab to the next, in every variant.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"
|
|
216
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Tabs\",\n summary: \"Views of the same page, one at a time: underlined sections, a segmented switch or pills — one light glides from the active tab to the next, in every variant.\",\n status: \"beta\",\n category: \"navigation\",\n platforms: \"both\",\n whenToUse: [\n \"To split a page into sections the user switches between without leaving it: videos, stories, about.\",\n \"`variant=\\\"segmented\\\"` for a view switch (grid, list); `pills` for a feed's sections.\",\n ],\n whenNotToUse: [\n { when: \"For a filter that narrows a list.\", use: \"chip\" },\n { when: \"To go to other pages: use links in the navigation.\" },\n { when: \"For a choice in a form.\", use: \"radio-group\" },\n ],\n bestPractices: [\n \"Short labels of one or two words; the active one should be clear without colour.\",\n \"Keep the URL in sync with the active tab when a tab is worth sharing.\",\n ],\n accessibility: {\n keyboard: [\n { keys: \"Tab\", action: \"Moves to the active tab, then into its panel.\" },\n { keys: \"Arrow keys / Home / End\", action: \"Move between tabs and activate them.\" },\n ],\n notes: [\n \"Radix Tabs: `tablist`, `tab` with `aria-selected` and `aria-controls`, `tabpanel`; name the list with `aria-label`.\",\n \"A disabled tab is skipped.\",\n ],\n },\n related: [\"chip\", \"segmented\", \"radio-group\"],\n web: {\n imports: [\"Tabs\"],\n examples: [\n { name: \"underline\", title: \"Underline\", description: \"The sections of a page; a disabled tab is skipped.\" },\n { name: \"segmented\", title: \"Segmented\", description: \"A view switch: equal segments in a track.\" },\n { name: \"pills\", title: \"Pills\", description: \"A feed's sections, scrolling sideways on a phone.\" },\n { name: \"vertical\", title: \"Vertical\", description: \"`orientation=\\\"vertical\\\"`: the list on the side.\" },\n ],\n },\n native: {\n imports: [\"Tabs\"],\n differences: [\n \"`items` (value, label, count, content) instead of the web's parts.\",\n \"The underlined tab list scrolls sideways when it does not fit; for the app's main sections use `TabBar`.\",\n ],\n examples: [\n { name: \"sections\", title: \"Sections\", description: \"A creator's page: underlined tabs with counts.\" },\n { name: \"segmented\", title: \"Segmented\", description: \"Two views of the same content.\" },\n ],\n },\n} satisfies ComponentMeta;\n"
|
|
127
217
|
},
|
|
128
218
|
{
|
|
129
219
|
"path": "tabs/tabs.tsx",
|
|
@@ -146,7 +236,7 @@
|
|
|
146
236
|
"props": [
|
|
147
237
|
{
|
|
148
238
|
"name": "variant",
|
|
149
|
-
"type": "\"
|
|
239
|
+
"type": "\"segmented\" | \"underline\" | \"pills\"",
|
|
150
240
|
"default": "underline",
|
|
151
241
|
"description": "underline (the sections of a page) · segmented (a view switch) · pills (a feed's sections).",
|
|
152
242
|
"required": false
|