@krizaka/ui 2.0.0-beta.5 → 2.0.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 +44 -28
- package/dist/{button-D5aSsmxX.d.ts → button-Cgfkg_3y.d.ts} +5 -1
- package/dist/button.d.ts +5 -1
- package/dist/button.js +4 -2
- package/dist/button.js.map +1 -1
- package/dist/card.d.ts +7 -1
- package/dist/card.js +2 -2
- package/dist/card.js.map +1 -1
- package/dist/{chunk-IUGBKMJC.js → chunk-FHYZSO2S.js} +2 -2
- package/dist/{chunk-6DJ6SQY3.js → chunk-PESA2R4U.js} +5 -3
- package/dist/chunk-PESA2R4U.js.map +1 -0
- package/dist/command.d.ts +11 -2
- package/dist/command.js +17 -6
- package/dist/command.js.map +1 -1
- package/dist/confirm-button.d.ts +1 -1
- package/dist/confirm-button.js +1 -1
- package/dist/countdown.d.ts +7 -6
- package/dist/countdown.js +12 -8
- package/dist/countdown.js.map +1 -1
- package/dist/dialog.js +2 -2
- package/dist/dropdown-menu.js +3 -3
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/field.js +2 -2
- package/dist/field.js.map +1 -1
- package/dist/native.d.ts +56 -6
- package/dist/native.js +129 -85
- package/dist/native.js.map +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.js +1 -1
- package/package.json +11 -11
- package/registry/alert.json +141 -3
- package/registry/avatar.json +314 -3
- package/registry/badge.json +233 -3
- package/registry/button.json +522 -8
- package/registry/card.json +427 -4
- package/registry/checkbox.json +127 -3
- package/registry/chip.json +394 -3
- package/registry/cn.json +51 -3
- package/registry/command.json +246 -5
- package/registry/confirm-button.json +172 -5
- package/registry/countdown.json +318 -7
- package/registry/dialog.json +310 -3
- package/registry/dropdown-menu.json +117 -4
- package/registry/empty-state.json +170 -3
- package/registry/examples/alert/danger.d.ts +4 -0
- package/registry/examples/alert/danger.js +22 -0
- package/registry/examples/alert/danger.tsx +25 -0
- package/registry/examples/alert/info.d.ts +4 -0
- package/registry/{demos/alert.js → examples/alert/info.js} +3 -3
- package/registry/{demos/alert.tsx → examples/alert/info.tsx} +1 -1
- package/registry/examples/alert/success.d.ts +4 -0
- package/registry/examples/alert/success.js +12 -0
- package/registry/examples/alert/success.tsx +15 -0
- package/registry/examples/alert/title-only.d.ts +4 -0
- package/registry/examples/alert/title-only.js +11 -0
- package/registry/examples/alert/title-only.tsx +5 -0
- package/registry/examples/alert/warning.d.ts +4 -0
- package/registry/examples/alert/warning.js +13 -0
- package/registry/examples/alert/warning.tsx +17 -0
- package/registry/examples/avatar/fallback.d.ts +4 -0
- package/registry/examples/avatar/fallback.js +11 -0
- package/registry/examples/avatar/fallback.tsx +6 -0
- package/registry/examples/avatar/group.d.ts +4 -0
- package/registry/examples/avatar/group.js +20 -0
- package/registry/examples/avatar/group.tsx +21 -0
- package/registry/examples/avatar/native/group.d.ts +4 -0
- package/registry/examples/avatar/native/group.dark.png +0 -0
- package/registry/examples/avatar/native/group.js +17 -0
- package/registry/examples/avatar/native/group.light.png +0 -0
- package/registry/examples/avatar/native/group.tsx +13 -0
- package/registry/examples/avatar/native/sizes.d.ts +4 -0
- package/registry/examples/avatar/native/sizes.dark.png +0 -0
- package/registry/examples/avatar/native/sizes.js +18 -0
- package/registry/examples/avatar/native/sizes.light.png +0 -0
- package/registry/examples/avatar/native/sizes.tsx +15 -0
- package/registry/examples/avatar/sizes.d.ts +4 -0
- package/registry/examples/avatar/sizes.js +17 -0
- package/registry/examples/avatar/sizes.tsx +13 -0
- package/registry/examples/avatar/with-image.d.ts +4 -0
- package/registry/{demos/avatar.js → examples/avatar/with-image.js} +3 -3
- package/registry/{demos/avatar.tsx → examples/avatar/with-image.tsx} +1 -1
- package/registry/examples/badge/accent.d.ts +4 -0
- package/registry/examples/badge/accent.js +11 -0
- package/registry/examples/badge/accent.tsx +9 -0
- package/registry/examples/badge/danger.d.ts +4 -0
- package/registry/examples/badge/danger.js +11 -0
- package/registry/examples/badge/danger.tsx +9 -0
- package/registry/examples/badge/medium.d.ts +4 -0
- package/registry/examples/badge/medium.js +11 -0
- package/registry/examples/badge/medium.tsx +9 -0
- package/registry/examples/badge/native/dot.d.ts +4 -0
- package/registry/examples/badge/native/dot.dark.png +0 -0
- package/registry/examples/badge/native/dot.js +15 -0
- package/registry/examples/badge/native/dot.light.png +0 -0
- package/registry/examples/badge/native/dot.tsx +16 -0
- package/registry/examples/badge/native/scrim.d.ts +4 -0
- package/registry/examples/badge/native/scrim.dark.png +0 -0
- package/registry/examples/badge/native/scrim.js +13 -0
- package/registry/examples/badge/native/scrim.light.png +0 -0
- package/registry/examples/badge/native/scrim.tsx +14 -0
- package/registry/examples/badge/native/tones.d.ts +4 -0
- package/registry/examples/badge/native/tones.dark.png +0 -0
- package/registry/examples/badge/native/tones.js +18 -0
- package/registry/examples/badge/native/tones.light.png +0 -0
- package/registry/examples/badge/native/tones.tsx +14 -0
- package/registry/examples/badge/neutral.d.ts +4 -0
- package/registry/{demos/badge.js → examples/badge/neutral.js} +3 -3
- package/registry/{demos/badge.tsx → examples/badge/neutral.tsx} +1 -1
- package/registry/examples/badge/scrim.d.ts +4 -0
- package/registry/examples/badge/scrim.js +11 -0
- package/registry/examples/badge/scrim.tsx +10 -0
- package/registry/examples/badge/success.d.ts +4 -0
- package/registry/examples/badge/success.js +11 -0
- package/registry/examples/badge/success.tsx +9 -0
- package/registry/examples/badge/warning.d.ts +4 -0
- package/registry/examples/badge/warning.js +11 -0
- package/registry/examples/badge/warning.tsx +9 -0
- package/registry/examples/button/as-child-link.d.ts +4 -0
- package/registry/examples/button/as-child-link.js +11 -0
- package/registry/examples/button/as-child-link.tsx +10 -0
- package/registry/examples/button/danger.d.ts +4 -0
- package/registry/examples/button/danger.js +11 -0
- package/registry/examples/button/danger.tsx +5 -0
- package/registry/examples/button/disabled.d.ts +4 -0
- package/registry/examples/button/disabled.js +11 -0
- package/registry/examples/button/disabled.tsx +9 -0
- package/registry/examples/button/ghost.d.ts +4 -0
- package/registry/examples/button/ghost.js +11 -0
- package/registry/examples/button/ghost.tsx +5 -0
- package/registry/examples/button/gradient.d.ts +4 -0
- package/registry/examples/button/gradient.js +11 -0
- package/registry/examples/button/gradient.tsx +5 -0
- package/registry/examples/button/icon.d.ts +4 -0
- package/registry/examples/button/icon.js +14 -0
- package/registry/examples/button/icon.tsx +18 -0
- package/registry/examples/button/loading.d.ts +4 -0
- package/registry/examples/button/loading.js +11 -0
- package/registry/examples/button/loading.tsx +10 -0
- package/registry/examples/button/native/danger.d.ts +4 -0
- package/registry/examples/button/native/danger.dark.png +0 -0
- package/registry/examples/button/native/danger.js +12 -0
- package/registry/examples/button/native/danger.light.png +0 -0
- package/registry/examples/button/native/danger.tsx +5 -0
- package/registry/examples/button/native/disabled.d.ts +4 -0
- package/registry/examples/button/native/disabled.dark.png +0 -0
- package/registry/examples/button/native/disabled.js +11 -0
- package/registry/examples/button/native/disabled.light.png +0 -0
- package/registry/examples/button/native/disabled.tsx +5 -0
- package/registry/examples/button/native/ghost.d.ts +4 -0
- package/registry/examples/button/native/ghost.dark.png +0 -0
- package/registry/examples/button/native/ghost.js +12 -0
- package/registry/examples/button/native/ghost.light.png +0 -0
- package/registry/examples/button/native/ghost.tsx +5 -0
- package/registry/examples/button/native/gradient.d.ts +4 -0
- package/registry/examples/button/native/gradient.dark.png +0 -0
- package/registry/examples/button/native/gradient.js +12 -0
- package/registry/examples/button/native/gradient.light.png +0 -0
- package/registry/examples/button/native/gradient.tsx +5 -0
- package/registry/examples/button/native/icon-only.d.ts +4 -0
- package/registry/examples/button/native/icon-only.dark.png +0 -0
- package/registry/examples/button/native/icon-only.js +19 -0
- package/registry/examples/button/native/icon-only.light.png +0 -0
- package/registry/examples/button/native/icon-only.tsx +21 -0
- package/registry/examples/button/native/icon.d.ts +4 -0
- package/registry/examples/button/native/icon.dark.png +0 -0
- package/registry/examples/button/native/icon.js +16 -0
- package/registry/examples/button/native/icon.light.png +0 -0
- package/registry/examples/button/native/icon.tsx +15 -0
- package/registry/examples/button/native/loading.d.ts +4 -0
- package/registry/examples/button/native/loading.dark.png +0 -0
- package/registry/examples/button/native/loading.js +11 -0
- package/registry/examples/button/native/loading.light.png +0 -0
- package/registry/examples/button/native/loading.tsx +6 -0
- package/registry/examples/button/native/outline.d.ts +4 -0
- package/registry/examples/button/native/outline.dark.png +0 -0
- package/registry/examples/button/native/outline.js +12 -0
- package/registry/examples/button/native/outline.light.png +0 -0
- package/registry/examples/button/native/outline.tsx +5 -0
- package/registry/examples/button/native/primary.d.ts +4 -0
- package/registry/examples/button/native/primary.dark.png +0 -0
- package/registry/examples/button/native/primary.js +12 -0
- package/registry/examples/button/native/primary.light.png +0 -0
- package/registry/examples/button/native/primary.tsx +5 -0
- package/registry/examples/button/native/secondary.d.ts +4 -0
- package/registry/examples/button/native/secondary.dark.png +0 -0
- package/registry/examples/button/native/secondary.js +12 -0
- package/registry/examples/button/native/secondary.light.png +0 -0
- package/registry/examples/button/native/secondary.tsx +6 -0
- package/registry/examples/button/native/sizes.d.ts +4 -0
- package/registry/examples/button/native/sizes.dark.png +0 -0
- package/registry/examples/button/native/sizes.js +15 -0
- package/registry/examples/button/native/sizes.light.png +0 -0
- package/registry/examples/button/native/sizes.tsx +11 -0
- package/registry/examples/button/outline.d.ts +4 -0
- package/registry/examples/button/outline.js +11 -0
- package/registry/examples/button/outline.tsx +5 -0
- package/registry/examples/button/pill.d.ts +4 -0
- package/registry/examples/button/pill.js +11 -0
- package/registry/examples/button/pill.tsx +9 -0
- package/registry/examples/button/primary.d.ts +4 -0
- package/registry/{demos/button.js → examples/button/primary.js} +3 -3
- package/registry/{demos/button.tsx → examples/button/primary.tsx} +1 -1
- package/registry/examples/button/secondary.d.ts +4 -0
- package/registry/examples/button/secondary.js +11 -0
- package/registry/examples/button/secondary.tsx +6 -0
- package/registry/examples/button/sizes.d.ts +4 -0
- package/registry/examples/button/sizes.js +15 -0
- package/registry/examples/button/sizes.tsx +17 -0
- package/registry/examples/card/interactive-link.d.ts +4 -0
- package/registry/examples/card/interactive-link.js +15 -0
- package/registry/examples/card/interactive-link.tsx +16 -0
- package/registry/examples/card/media-card.d.ts +4 -0
- package/registry/{demos/card.js → examples/card/media-card.js} +3 -3
- package/registry/{demos/card.tsx → examples/card/media-card.tsx} +1 -1
- package/registry/examples/card/media-fallback.d.ts +4 -0
- package/registry/examples/card/media-fallback.js +18 -0
- package/registry/examples/card/media-fallback.tsx +22 -0
- package/registry/examples/card/native/body.d.ts +4 -0
- package/registry/examples/card/native/body.dark.png +0 -0
- package/registry/examples/card/native/body.js +15 -0
- package/registry/examples/card/native/body.light.png +0 -0
- package/registry/examples/card/native/body.tsx +13 -0
- package/registry/examples/card/native/default.d.ts +4 -0
- package/registry/examples/card/native/default.dark.png +0 -0
- package/registry/examples/card/native/default.js +24 -0
- package/registry/examples/card/native/default.light.png +0 -0
- package/registry/examples/card/native/default.tsx +28 -0
- package/registry/examples/card/native/elevated.d.ts +4 -0
- package/registry/examples/card/native/elevated.dark.png +0 -0
- package/registry/examples/card/native/elevated.js +24 -0
- package/registry/examples/card/native/elevated.light.png +0 -0
- package/registry/examples/card/native/elevated.tsx +28 -0
- package/registry/examples/card/native/pressable.d.ts +4 -0
- package/registry/examples/card/native/pressable.dark.png +0 -0
- package/registry/examples/card/native/pressable.js +15 -0
- package/registry/examples/card/native/pressable.light.png +0 -0
- package/registry/examples/card/native/pressable.tsx +13 -0
- package/registry/examples/card/reveal-grid.d.ts +4 -0
- package/registry/examples/card/reveal-grid.js +28 -0
- package/registry/examples/card/reveal-grid.tsx +31 -0
- package/registry/examples/card/stat-card.d.ts +4 -0
- package/registry/examples/card/stat-card.js +18 -0
- package/registry/examples/card/stat-card.tsx +17 -0
- package/registry/examples/checkbox/checked.d.ts +4 -0
- package/registry/examples/checkbox/checked.js +11 -0
- package/registry/examples/checkbox/checked.tsx +5 -0
- package/registry/examples/checkbox/disabled.d.ts +4 -0
- package/registry/examples/checkbox/disabled.js +14 -0
- package/registry/examples/checkbox/disabled.tsx +12 -0
- package/registry/examples/checkbox/indeterminate.d.ts +4 -0
- package/registry/examples/checkbox/indeterminate.js +11 -0
- package/registry/examples/checkbox/indeterminate.tsx +6 -0
- package/registry/examples/checkbox/invalid.d.ts +4 -0
- package/registry/examples/checkbox/invalid.js +15 -0
- package/registry/examples/checkbox/invalid.tsx +14 -0
- package/registry/examples/checkbox/unchecked.d.ts +4 -0
- package/registry/{demos/checkbox.js → examples/checkbox/unchecked.js} +3 -3
- package/registry/{demos/checkbox.tsx → examples/checkbox/unchecked.tsx} +2 -1
- package/registry/examples/chip/multiple.d.ts +4 -0
- package/registry/examples/chip/multiple.js +16 -0
- package/registry/examples/chip/multiple.tsx +12 -0
- package/registry/examples/chip/native/multiple.d.ts +4 -0
- package/registry/examples/chip/native/multiple.dark.png +0 -0
- package/registry/examples/chip/native/multiple.js +18 -0
- package/registry/examples/chip/native/multiple.light.png +0 -0
- package/registry/examples/chip/native/multiple.tsx +17 -0
- package/registry/examples/chip/native/removable.d.ts +4 -0
- package/registry/examples/chip/native/removable.dark.png +0 -0
- package/registry/examples/chip/native/removable.js +17 -0
- package/registry/examples/chip/native/removable.light.png +0 -0
- package/registry/examples/chip/native/removable.tsx +15 -0
- package/registry/examples/chip/native/single.d.ts +4 -0
- package/registry/examples/chip/native/single.dark.png +0 -0
- package/registry/examples/chip/native/single.js +15 -0
- package/registry/examples/chip/native/single.light.png +0 -0
- package/registry/examples/chip/native/single.tsx +11 -0
- package/registry/examples/chip/native/toggle.d.ts +4 -0
- package/registry/examples/chip/native/toggle.dark.png +0 -0
- package/registry/examples/chip/native/toggle.js +17 -0
- package/registry/examples/chip/native/toggle.light.png +0 -0
- package/registry/examples/chip/native/toggle.tsx +16 -0
- package/registry/examples/chip/removable.d.ts +4 -0
- package/registry/examples/chip/removable.js +16 -0
- package/registry/examples/chip/removable.tsx +15 -0
- package/registry/examples/chip/single.d.ts +4 -0
- package/registry/examples/chip/single.js +16 -0
- package/registry/examples/chip/single.tsx +13 -0
- package/registry/examples/chip/small.d.ts +4 -0
- package/registry/examples/chip/small.js +16 -0
- package/registry/examples/chip/small.tsx +12 -0
- package/registry/examples/chip/toggle.d.ts +4 -0
- package/registry/{demos/chip.js → examples/chip/toggle.js} +3 -3
- package/registry/{demos/chip.tsx → examples/chip/toggle.tsx} +2 -1
- package/registry/examples/cn/merge.d.ts +4 -0
- package/registry/{demos/cn.js → examples/cn/merge.js} +3 -3
- package/registry/{demos/cn.tsx → examples/cn/merge.tsx} +1 -1
- package/registry/examples/command/dialog.d.ts +4 -0
- package/registry/examples/command/dialog.js +39 -0
- package/registry/examples/command/dialog.tsx +35 -0
- package/registry/examples/command/inline.d.ts +4 -0
- package/registry/{demos/command.js → examples/command/inline.js} +4 -5
- package/registry/{demos/command.tsx → examples/command/inline.tsx} +2 -3
- package/registry/examples/command/no-results.d.ts +4 -0
- package/registry/examples/command/no-results.js +19 -0
- package/registry/examples/command/no-results.tsx +20 -0
- package/registry/examples/confirm-button/armed.d.ts +4 -0
- package/registry/examples/confirm-button/armed.js +12 -0
- package/registry/examples/confirm-button/armed.tsx +14 -0
- package/registry/examples/confirm-button/idle.d.ts +4 -0
- package/registry/{demos/confirm-button.js → examples/confirm-button/idle.js} +3 -3
- package/registry/{demos/confirm-button.tsx → examples/confirm-button/idle.tsx} +1 -1
- package/registry/examples/confirm-button/with-text.d.ts +4 -0
- package/registry/examples/confirm-button/with-text.js +12 -0
- package/registry/examples/confirm-button/with-text.tsx +12 -0
- package/registry/examples/countdown/days.d.ts +4 -0
- package/registry/examples/countdown/days.js +13 -0
- package/registry/examples/countdown/days.tsx +10 -0
- package/registry/examples/countdown/ended.d.ts +4 -0
- package/registry/examples/countdown/ended.js +13 -0
- package/registry/examples/countdown/ended.tsx +10 -0
- package/registry/examples/countdown/hours.d.ts +4 -0
- package/registry/{demos/countdown.js → examples/countdown/hours.js} +3 -3
- package/registry/{demos/countdown.tsx → examples/countdown/hours.tsx} +1 -1
- package/registry/examples/countdown/native/days.d.ts +4 -0
- package/registry/examples/countdown/native/days.dark.png +0 -0
- package/registry/examples/countdown/native/days.js +13 -0
- package/registry/examples/countdown/native/days.light.png +0 -0
- package/registry/examples/countdown/native/days.tsx +7 -0
- package/registry/examples/countdown/native/hours.d.ts +4 -0
- package/registry/examples/countdown/native/hours.dark.png +0 -0
- package/registry/examples/countdown/native/hours.js +13 -0
- package/registry/examples/countdown/native/hours.light.png +0 -0
- package/registry/examples/countdown/native/hours.tsx +7 -0
- package/registry/examples/countdown/native/sizes.d.ts +4 -0
- package/registry/examples/countdown/native/sizes.dark.png +0 -0
- package/registry/examples/countdown/native/sizes.js +18 -0
- package/registry/examples/countdown/native/sizes.light.png +0 -0
- package/registry/examples/countdown/native/sizes.tsx +15 -0
- package/registry/examples/countdown/native/urgent.d.ts +4 -0
- package/registry/examples/countdown/native/urgent.dark.png +0 -0
- package/registry/examples/countdown/native/urgent.js +13 -0
- package/registry/examples/countdown/native/urgent.light.png +0 -0
- package/registry/examples/countdown/native/urgent.tsx +7 -0
- package/registry/examples/countdown/native/with-label.d.ts +4 -0
- package/registry/examples/countdown/native/with-label.dark.png +0 -0
- package/registry/examples/countdown/native/with-label.js +13 -0
- package/registry/examples/countdown/native/with-label.light.png +0 -0
- package/registry/examples/countdown/native/with-label.tsx +7 -0
- package/registry/examples/countdown/sizes.d.ts +4 -0
- package/registry/examples/countdown/sizes.js +18 -0
- package/registry/examples/countdown/sizes.tsx +17 -0
- package/registry/examples/countdown/urgent.d.ts +4 -0
- package/registry/examples/countdown/urgent.js +13 -0
- package/registry/examples/countdown/urgent.tsx +10 -0
- package/registry/examples/countdown/with-label.d.ts +4 -0
- package/registry/examples/countdown/with-label.js +13 -0
- package/registry/examples/countdown/with-label.tsx +10 -0
- package/registry/examples/dialog/alert-destructive.d.ts +4 -0
- package/registry/examples/dialog/alert-destructive.js +24 -0
- package/registry/examples/dialog/alert-destructive.tsx +20 -0
- package/registry/examples/dialog/bottom.d.ts +4 -0
- package/registry/examples/dialog/bottom.js +29 -0
- package/registry/examples/dialog/bottom.tsx +32 -0
- package/registry/examples/dialog/center.d.ts +4 -0
- package/registry/{demos/dialog.js → examples/dialog/center.js} +3 -3
- package/registry/{demos/dialog.tsx → examples/dialog/center.tsx} +1 -1
- package/registry/examples/dialog/gate.d.ts +4 -0
- package/registry/examples/dialog/gate.js +24 -0
- package/registry/examples/dialog/gate.tsx +27 -0
- package/registry/examples/dialog/right.d.ts +4 -0
- package/registry/examples/dialog/right.js +29 -0
- package/registry/examples/dialog/right.tsx +32 -0
- package/registry/examples/dialog/sheet-form.d.ts +4 -0
- package/registry/examples/dialog/sheet-form.js +35 -0
- package/registry/examples/dialog/sheet-form.tsx +36 -0
- package/registry/examples/dropdown-menu/actions.d.ts +4 -0
- package/registry/{demos/dropdown-menu.js → examples/dropdown-menu/actions.js} +3 -3
- package/registry/{demos/dropdown-menu.tsx → examples/dropdown-menu/actions.tsx} +1 -1
- package/registry/examples/empty-state/default.d.ts +4 -0
- package/registry/{demos/empty-state.js → examples/empty-state/default.js} +3 -3
- package/registry/{demos/empty-state.tsx → examples/empty-state/default.tsx} +1 -1
- package/registry/examples/empty-state/native/default.d.ts +4 -0
- package/registry/examples/empty-state/native/default.dark.png +0 -0
- package/registry/examples/empty-state/native/default.js +25 -0
- package/registry/examples/empty-state/native/default.light.png +0 -0
- package/registry/examples/empty-state/native/default.tsx +25 -0
- package/registry/examples/empty-state/title-only.d.ts +4 -0
- package/registry/examples/empty-state/title-only.js +11 -0
- package/registry/examples/empty-state/title-only.tsx +5 -0
- package/registry/examples/empty-state/with-action.d.ts +4 -0
- package/registry/examples/empty-state/with-action.js +24 -0
- package/registry/examples/empty-state/with-action.tsx +25 -0
- package/registry/examples/field/default.d.ts +4 -0
- package/registry/{demos/field.js → examples/field/default.js} +3 -3
- package/registry/{demos/field.tsx → examples/field/default.tsx} +1 -1
- package/registry/examples/field/disabled.d.ts +4 -0
- package/registry/examples/field/disabled.js +14 -0
- package/registry/examples/field/disabled.tsx +10 -0
- package/registry/examples/field/invalid.d.ts +4 -0
- package/registry/examples/field/invalid.js +15 -0
- package/registry/examples/field/invalid.tsx +12 -0
- package/registry/examples/field/select.d.ts +4 -0
- package/registry/examples/field/select.js +18 -0
- package/registry/examples/field/select.tsx +15 -0
- package/registry/examples/field/textarea.d.ts +4 -0
- package/registry/examples/field/textarea.js +14 -0
- package/registry/examples/field/textarea.tsx +10 -0
- package/registry/examples/kbd/key.d.ts +4 -0
- package/registry/{demos/kbd.js → examples/kbd/key.js} +3 -3
- package/registry/{demos/kbd.tsx → examples/kbd/key.tsx} +1 -1
- package/registry/examples/kbd/shortcut.d.ts +4 -0
- package/registry/examples/kbd/shortcut.js +15 -0
- package/registry/examples/kbd/shortcut.tsx +11 -0
- package/registry/examples/kbd/small.d.ts +4 -0
- package/registry/examples/kbd/small.js +11 -0
- package/registry/examples/kbd/small.tsx +5 -0
- package/registry/examples/page-header/default.d.ts +4 -0
- package/registry/{demos/page-header.js → examples/page-header/default.js} +3 -3
- package/registry/{demos/page-header.tsx → examples/page-header/default.tsx} +1 -1
- package/registry/examples/page-header/with-actions.d.ts +4 -0
- package/registry/examples/page-header/with-actions.js +22 -0
- package/registry/examples/page-header/with-actions.tsx +17 -0
- package/registry/examples/page-header/with-breadcrumb.d.ts +4 -0
- package/registry/examples/page-header/with-breadcrumb.js +24 -0
- package/registry/examples/page-header/with-breadcrumb.tsx +26 -0
- package/registry/examples/popover/form.d.ts +4 -0
- package/registry/{demos/popover.js → examples/popover/form.js} +3 -3
- package/registry/{demos/popover.tsx → examples/popover/form.tsx} +1 -1
- package/registry/examples/progress/bar-indeterminate.d.ts +4 -0
- package/registry/examples/progress/bar-indeterminate.js +11 -0
- package/registry/examples/progress/bar-indeterminate.tsx +6 -0
- package/registry/examples/progress/bar-sizes.d.ts +4 -0
- package/registry/examples/progress/bar-sizes.js +15 -0
- package/registry/examples/progress/bar-sizes.tsx +11 -0
- package/registry/examples/progress/bar.d.ts +4 -0
- package/registry/{demos/progress.js → examples/progress/bar.js} +3 -3
- package/registry/{demos/progress.tsx → examples/progress/bar.tsx} +1 -1
- package/registry/examples/progress/native/bar.d.ts +4 -0
- package/registry/examples/progress/native/bar.dark.png +0 -0
- package/registry/examples/progress/native/bar.js +16 -0
- package/registry/examples/progress/native/bar.light.png +0 -0
- package/registry/examples/progress/native/bar.tsx +12 -0
- package/registry/examples/progress/native/indeterminate.d.ts +4 -0
- package/registry/examples/progress/native/indeterminate.dark.png +0 -0
- package/registry/examples/progress/native/indeterminate.js +15 -0
- package/registry/examples/progress/native/indeterminate.light.png +0 -0
- package/registry/examples/progress/native/indeterminate.tsx +12 -0
- package/registry/examples/progress/native/ring.d.ts +4 -0
- package/registry/examples/progress/native/ring.dark.png +0 -0
- package/registry/examples/progress/native/ring.js +19 -0
- package/registry/examples/progress/native/ring.light.png +0 -0
- package/registry/examples/progress/native/ring.tsx +19 -0
- package/registry/examples/progress/ring-indeterminate.d.ts +4 -0
- package/registry/examples/progress/ring-indeterminate.js +11 -0
- package/registry/examples/progress/ring-indeterminate.tsx +5 -0
- package/registry/examples/progress/ring.d.ts +4 -0
- package/registry/examples/progress/ring.js +18 -0
- package/registry/examples/progress/ring.tsx +17 -0
- package/registry/examples/radio-group/cards.d.ts +4 -0
- package/registry/examples/radio-group/cards.js +19 -0
- package/registry/examples/radio-group/cards.tsx +21 -0
- package/registry/examples/radio-group/horizontal.d.ts +4 -0
- package/registry/examples/radio-group/horizontal.js +15 -0
- package/registry/examples/radio-group/horizontal.tsx +12 -0
- package/registry/examples/radio-group/items.d.ts +4 -0
- package/registry/{demos/radio-group.js → examples/radio-group/items.js} +3 -3
- package/registry/{demos/radio-group.tsx → examples/radio-group/items.tsx} +1 -1
- package/registry/examples/section-backdrop/depth-of-field.d.ts +4 -0
- package/registry/examples/section-backdrop/depth-of-field.js +18 -0
- package/registry/examples/section-backdrop/depth-of-field.tsx +13 -0
- package/registry/examples/section-backdrop/hero.d.ts +4 -0
- package/registry/{demos/section-backdrop.js → examples/section-backdrop/hero.js} +3 -3
- package/registry/{demos/section-backdrop.tsx → examples/section-backdrop/hero.tsx} +1 -1
- package/registry/examples/section-backdrop/plain.d.ts +4 -0
- package/registry/examples/section-backdrop/plain.js +11 -0
- package/registry/examples/section-backdrop/plain.tsx +10 -0
- package/registry/examples/section-backdrop/sequence.d.ts +4 -0
- package/registry/examples/section-backdrop/sequence.js +14 -0
- package/registry/examples/section-backdrop/sequence.tsx +15 -0
- package/registry/examples/section-backdrop/up.d.ts +4 -0
- package/registry/examples/section-backdrop/up.js +11 -0
- package/registry/examples/section-backdrop/up.tsx +10 -0
- package/registry/examples/segmented/native/default.d.ts +4 -0
- package/registry/examples/segmented/native/default.dark.png +0 -0
- package/registry/examples/segmented/native/default.js +19 -0
- package/registry/examples/segmented/native/default.light.png +0 -0
- package/registry/examples/segmented/native/default.tsx +19 -0
- package/registry/examples/segmented/native/small.d.ts +4 -0
- package/registry/examples/segmented/native/small.dark.png +0 -0
- package/registry/examples/segmented/native/small.js +19 -0
- package/registry/examples/segmented/native/small.light.png +0 -0
- package/registry/examples/segmented/native/small.tsx +19 -0
- package/registry/examples/separator/horizontal.d.ts +4 -0
- package/registry/{demos/separator.js → examples/separator/horizontal.js} +3 -3
- package/registry/{demos/separator.tsx → examples/separator/horizontal.tsx} +1 -1
- package/registry/examples/separator/vertical.d.ts +4 -0
- package/registry/examples/separator/vertical.js +17 -0
- package/registry/examples/separator/vertical.tsx +14 -0
- package/registry/examples/skeleton/circle.d.ts +4 -0
- package/registry/examples/skeleton/circle.js +11 -0
- package/registry/examples/skeleton/circle.tsx +5 -0
- package/registry/examples/skeleton/composition.d.ts +4 -0
- package/registry/{demos/skeleton.js → examples/skeleton/composition.js} +3 -3
- package/registry/{demos/skeleton.tsx → examples/skeleton/composition.tsx} +1 -1
- package/registry/examples/skeleton/native/shapes.d.ts +4 -0
- package/registry/examples/skeleton/native/shapes.dark.png +0 -0
- package/registry/examples/skeleton/native/shapes.js +21 -0
- package/registry/examples/skeleton/native/shapes.light.png +0 -0
- package/registry/examples/skeleton/native/shapes.tsx +18 -0
- package/registry/examples/skeleton/rect.d.ts +4 -0
- package/registry/examples/skeleton/rect.js +11 -0
- package/registry/examples/skeleton/rect.tsx +5 -0
- package/registry/examples/skeleton/text.d.ts +4 -0
- package/registry/examples/skeleton/text.js +11 -0
- package/registry/examples/skeleton/text.tsx +5 -0
- package/registry/examples/slider/centred.d.ts +4 -0
- package/registry/examples/slider/centred.js +11 -0
- package/registry/examples/slider/centred.tsx +8 -0
- package/registry/examples/slider/default.d.ts +4 -0
- package/registry/{demos/slider.js → examples/slider/default.js} +3 -3
- package/registry/{demos/slider.tsx → examples/slider/default.tsx} +1 -1
- package/registry/examples/slider/disabled.d.ts +4 -0
- package/registry/examples/slider/disabled.js +11 -0
- package/registry/examples/slider/disabled.tsx +5 -0
- package/registry/examples/slider/range.d.ts +4 -0
- package/registry/examples/slider/range.js +22 -0
- package/registry/examples/slider/range.tsx +18 -0
- package/registry/examples/slider/with-label.d.ts +4 -0
- package/registry/examples/slider/with-label.js +11 -0
- package/registry/examples/slider/with-label.tsx +8 -0
- package/registry/examples/slot/as-child.d.ts +4 -0
- package/registry/{demos/slot.js → examples/slot/as-child.js} +3 -3
- package/registry/{demos/slot.tsx → examples/slot/as-child.tsx} +1 -1
- package/registry/examples/slot/visually-hidden.d.ts +4 -0
- package/registry/examples/slot/visually-hidden.js +14 -0
- package/registry/examples/slot/visually-hidden.tsx +13 -0
- package/registry/examples/spinner/default.d.ts +4 -0
- package/registry/{demos/spinner.js → examples/spinner/default.js} +3 -3
- package/registry/{demos/spinner.tsx → examples/spinner/default.tsx} +1 -1
- package/registry/examples/spinner/muted.d.ts +4 -0
- package/registry/examples/spinner/muted.js +11 -0
- package/registry/examples/spinner/muted.tsx +6 -0
- package/registry/examples/spinner/native/sizes.d.ts +4 -0
- package/registry/examples/spinner/native/sizes.dark.png +0 -0
- package/registry/examples/spinner/native/sizes.js +16 -0
- package/registry/examples/spinner/native/sizes.light.png +0 -0
- package/registry/examples/spinner/native/sizes.tsx +13 -0
- package/registry/examples/spinner/sizes.d.ts +4 -0
- package/registry/examples/spinner/sizes.js +15 -0
- package/registry/examples/spinner/sizes.tsx +11 -0
- package/registry/examples/stat/down.d.ts +4 -0
- package/registry/examples/stat/down.js +11 -0
- package/registry/examples/stat/down.tsx +5 -0
- package/registry/examples/stat/flat.d.ts +4 -0
- package/registry/examples/stat/flat.js +11 -0
- package/registry/examples/stat/flat.tsx +5 -0
- package/registry/examples/stat/plain.d.ts +4 -0
- package/registry/examples/stat/plain.js +11 -0
- package/registry/examples/stat/plain.tsx +5 -0
- package/registry/examples/stat/row.d.ts +4 -0
- package/registry/examples/stat/row.js +15 -0
- package/registry/examples/stat/row.tsx +12 -0
- package/registry/examples/stat/up.d.ts +4 -0
- package/registry/{demos/stat.js → examples/stat/up.js} +3 -3
- package/registry/{demos/stat.tsx → examples/stat/up.tsx} +1 -1
- package/registry/examples/switch/disabled.d.ts +4 -0
- package/registry/examples/switch/disabled.js +14 -0
- package/registry/examples/switch/disabled.tsx +10 -0
- package/registry/examples/switch/off.d.ts +4 -0
- package/registry/{demos/switch.js → examples/switch/off.js} +3 -3
- package/registry/{demos/switch.tsx → examples/switch/off.tsx} +1 -1
- package/registry/examples/switch/on.d.ts +4 -0
- package/registry/examples/switch/on.js +11 -0
- package/registry/examples/switch/on.tsx +5 -0
- package/registry/examples/switch/small.d.ts +4 -0
- package/registry/examples/switch/small.js +11 -0
- package/registry/examples/switch/small.tsx +5 -0
- package/registry/examples/switch/with-label.d.ts +4 -0
- package/registry/examples/switch/with-label.js +18 -0
- package/registry/examples/switch/with-label.tsx +17 -0
- package/registry/examples/tabs/pills.d.ts +4 -0
- package/registry/examples/tabs/pills.js +20 -0
- package/registry/examples/tabs/pills.tsx +23 -0
- package/registry/examples/tabs/segmented.d.ts +4 -0
- package/registry/examples/tabs/segmented.js +20 -0
- package/registry/examples/tabs/segmented.tsx +23 -0
- package/registry/examples/tabs/underline.d.ts +4 -0
- package/registry/{demos/tabs.js → examples/tabs/underline.js} +3 -3
- package/registry/{demos/tabs.tsx → examples/tabs/underline.tsx} +1 -1
- package/registry/examples/tabs/vertical.d.ts +4 -0
- package/registry/examples/tabs/vertical.js +20 -0
- package/registry/examples/tabs/vertical.tsx +23 -0
- package/registry/examples/theme/native/provider.d.ts +4 -0
- package/registry/examples/theme/native/provider.js +23 -0
- package/registry/examples/theme/native/provider.tsx +21 -0
- package/registry/examples/theme/secondary.d.ts +4 -0
- package/registry/examples/theme/secondary.js +11 -0
- package/registry/examples/theme/secondary.tsx +10 -0
- package/registry/examples/theme/toggle.d.ts +4 -0
- package/registry/{demos/theme.js → examples/theme/toggle.js} +3 -3
- package/registry/{demos/theme.tsx → examples/theme/toggle.tsx} +1 -1
- package/registry/examples/toast/custom.d.ts +4 -0
- package/registry/examples/toast/custom.js +30 -0
- package/registry/examples/toast/custom.tsx +35 -0
- package/registry/examples/toast/native/notification.d.ts +4 -0
- package/registry/examples/toast/native/notification.dark.png +0 -0
- package/registry/examples/toast/native/notification.js +29 -0
- package/registry/examples/toast/native/notification.light.png +0 -0
- package/registry/examples/toast/native/notification.tsx +30 -0
- package/registry/examples/toast/native/tones.d.ts +4 -0
- package/registry/examples/toast/native/tones.dark.png +0 -0
- package/registry/examples/toast/native/tones.js +28 -0
- package/registry/examples/toast/native/tones.light.png +0 -0
- package/registry/examples/toast/native/tones.tsx +25 -0
- package/registry/examples/toast/tones.d.ts +4 -0
- package/registry/{demos/toast.js → examples/toast/tones.js} +3 -3
- package/registry/{demos/toast.tsx → examples/toast/tones.tsx} +1 -1
- package/registry/examples/tooltip/right.d.ts +4 -0
- package/registry/examples/tooltip/right.js +15 -0
- package/registry/examples/tooltip/right.tsx +15 -0
- package/registry/examples/tooltip/top.d.ts +4 -0
- package/registry/{demos/tooltip.js → examples/tooltip/top.js} +3 -3
- package/registry/{demos/tooltip.tsx → examples/tooltip/top.tsx} +1 -1
- package/registry/examples/txt/native/tones.d.ts +4 -0
- package/registry/examples/txt/native/tones.dark.png +0 -0
- package/registry/examples/txt/native/tones.js +16 -0
- package/registry/examples/txt/native/tones.light.png +0 -0
- package/registry/examples/txt/native/tones.tsx +17 -0
- package/registry/examples/txt/native/variants.d.ts +4 -0
- package/registry/examples/txt/native/variants.dark.png +0 -0
- package/registry/examples/txt/native/variants.js +18 -0
- package/registry/examples/txt/native/variants.light.png +0 -0
- package/registry/examples/txt/native/variants.tsx +15 -0
- package/registry/field.json +142 -4
- package/registry/index.json +353 -33
- package/registry/kbd.json +90 -3
- package/registry/page-header.json +121 -3
- package/registry/popover.json +90 -3
- package/registry/progress.json +265 -3
- package/registry/radio-group.json +136 -3
- package/registry/section-backdrop.json +144 -3
- package/registry/segmented.json +125 -0
- package/registry/separator.json +67 -3
- package/registry/skeleton.json +166 -3
- package/registry/slider.json +177 -3
- package/registry/slot.json +79 -3
- package/registry/spinner.json +144 -3
- package/registry/stat.json +140 -3
- package/registry/switch.json +130 -3
- package/registry/tabs.json +117 -3
- package/registry/theme.json +190 -4
- package/registry/toast.json +190 -3
- package/registry/tooltip.json +143 -3
- package/registry/txt.json +97 -0
- package/dist/chunk-6DJ6SQY3.js.map +0 -1
- package/registry/demos/alert.d.ts +0 -5
- package/registry/demos/avatar.d.ts +0 -5
- package/registry/demos/badge.d.ts +0 -5
- package/registry/demos/button.d.ts +0 -5
- package/registry/demos/card.d.ts +0 -5
- package/registry/demos/checkbox.d.ts +0 -5
- package/registry/demos/chip.d.ts +0 -5
- package/registry/demos/cn.d.ts +0 -7
- package/registry/demos/command.d.ts +0 -5
- package/registry/demos/confirm-button.d.ts +0 -5
- package/registry/demos/countdown.d.ts +0 -5
- package/registry/demos/dialog.d.ts +0 -7
- package/registry/demos/dropdown-menu.d.ts +0 -7
- package/registry/demos/empty-state.d.ts +0 -5
- package/registry/demos/field.d.ts +0 -5
- package/registry/demos/kbd.d.ts +0 -5
- package/registry/demos/page-header.d.ts +0 -5
- package/registry/demos/popover.d.ts +0 -7
- package/registry/demos/progress.d.ts +0 -5
- package/registry/demos/radio-group.d.ts +0 -5
- package/registry/demos/section-backdrop.d.ts +0 -5
- package/registry/demos/separator.d.ts +0 -5
- package/registry/demos/skeleton.d.ts +0 -5
- package/registry/demos/slider.d.ts +0 -5
- package/registry/demos/slot.d.ts +0 -5
- package/registry/demos/spinner.d.ts +0 -5
- package/registry/demos/stat.d.ts +0 -5
- package/registry/demos/switch.d.ts +0 -5
- package/registry/demos/tabs.d.ts +0 -5
- package/registry/demos/theme.d.ts +0 -5
- package/registry/demos/toast.d.ts +0 -8
- package/registry/demos/tooltip.d.ts +0 -7
- /package/dist/{chunk-IUGBKMJC.js.map → chunk-FHYZSO2S.js.map} +0 -0
|
@@ -1,7 +1,166 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "empty-state",
|
|
3
3
|
"type": "primitive",
|
|
4
|
-
"
|
|
4
|
+
"title": "Empty state",
|
|
5
|
+
"summary": "What a list, a search or a panel says when it has nothing to show: an icon, a title, a line and an action.",
|
|
6
|
+
"description": "What a list, a search or a panel says when it has nothing to show: an icon, a title, a line and an action.",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"category": "feedback",
|
|
9
|
+
"platforms": "both",
|
|
10
|
+
"whenToUse": [
|
|
11
|
+
"When a list is empty for the first time: say what will appear here and how to start.",
|
|
12
|
+
"When a search or a filter returns nothing: say so, and how to widen it."
|
|
13
|
+
],
|
|
14
|
+
"whenNotToUse": [
|
|
15
|
+
{
|
|
16
|
+
"when": "While the content is loading.",
|
|
17
|
+
"use": "skeleton"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "When loading failed: say what went wrong.",
|
|
21
|
+
"use": "alert"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"bestPractices": [
|
|
25
|
+
"Title: what is empty, in a few words (“No videos yet”); description: why, or what will fill it.",
|
|
26
|
+
"One action at most, the one that fills the list."
|
|
27
|
+
],
|
|
28
|
+
"accessibility": {
|
|
29
|
+
"keyboard": [],
|
|
30
|
+
"notes": [
|
|
31
|
+
"`role=\"status\"`: announced politely when it appears after a search.",
|
|
32
|
+
"The icon is decorative and hidden from assistive technology."
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"related": [
|
|
36
|
+
"skeleton",
|
|
37
|
+
"alert",
|
|
38
|
+
"spinner"
|
|
39
|
+
],
|
|
40
|
+
"web": {
|
|
41
|
+
"entry": "@krizaka/ui/empty-state",
|
|
42
|
+
"import": "import { EmptyState } from \"@krizaka/ui/empty-state\";",
|
|
43
|
+
"props": [
|
|
44
|
+
{
|
|
45
|
+
"component": "EmptyState",
|
|
46
|
+
"description": "",
|
|
47
|
+
"props": [
|
|
48
|
+
{
|
|
49
|
+
"name": "title",
|
|
50
|
+
"type": "ReactNode",
|
|
51
|
+
"default": null,
|
|
52
|
+
"description": "What is empty, in a few words (\"No videos yet\").",
|
|
53
|
+
"required": true
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "action",
|
|
57
|
+
"type": "ReactNode",
|
|
58
|
+
"default": null,
|
|
59
|
+
"description": "What to do next: a Button, a link.",
|
|
60
|
+
"required": false
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "description",
|
|
64
|
+
"type": "ReactNode",
|
|
65
|
+
"default": null,
|
|
66
|
+
"description": "Why, or what will fill it.",
|
|
67
|
+
"required": false
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"name": "icon",
|
|
71
|
+
"type": "ReactNode",
|
|
72
|
+
"default": null,
|
|
73
|
+
"description": "A decorative icon (hidden from assistive technology).",
|
|
74
|
+
"required": false
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"examples": [
|
|
80
|
+
{
|
|
81
|
+
"name": "default",
|
|
82
|
+
"title": "Default",
|
|
83
|
+
"description": "An icon, a title and a line.",
|
|
84
|
+
"path": "examples/empty-state/default.tsx",
|
|
85
|
+
"module": "@krizaka/ui/registry/examples/empty-state/default",
|
|
86
|
+
"code": "import { EmptyState } from \"@krizaka/ui/empty-state\";\n\nconst ICON = (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m10 9 5 3-5 3z\" />\n </svg>\n);\n\nexport default function EmptyStateDefault() {\n return <EmptyState icon={ICON} title=\"No videos yet\" description=\"The videos you publish appear here.\" />;\n}\n"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "with-action",
|
|
90
|
+
"title": "With an action",
|
|
91
|
+
"description": "What to do next.",
|
|
92
|
+
"path": "examples/empty-state/with-action.tsx",
|
|
93
|
+
"module": "@krizaka/ui/registry/examples/empty-state/with-action",
|
|
94
|
+
"code": "import { Button } from \"@krizaka/ui/button\";\nimport { EmptyState } from \"@krizaka/ui/empty-state\";\n\nconst ICON = (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m10 9 5 3-5 3z\" />\n </svg>\n);\n\n// With what to do next.\nexport default function EmptyStateWithAction() {\n return (\n <EmptyState\n icon={ICON}\n title=\"No videos yet\"\n description=\"The videos you publish appear here.\"\n action={\n <Button variant=\"primary\" size=\"sm\">\n Publish a video\n </Button>\n }\n />\n );\n}\n"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "title-only",
|
|
98
|
+
"title": "Title only",
|
|
99
|
+
"description": "A search without result.",
|
|
100
|
+
"path": "examples/empty-state/title-only.tsx",
|
|
101
|
+
"module": "@krizaka/ui/registry/examples/empty-state/title-only",
|
|
102
|
+
"code": "import { EmptyState } from \"@krizaka/ui/empty-state\";\n\nexport default function EmptyStateTitleOnly() {\n return <EmptyState title=\"No results\" />;\n}\n"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"native": {
|
|
107
|
+
"entry": "@krizaka/ui/native",
|
|
108
|
+
"import": "import { EmptyState } from \"@krizaka/ui/native\";",
|
|
109
|
+
"differences": [
|
|
110
|
+
"The action is a native `Button` (with `label`).",
|
|
111
|
+
"Style with `style`, not `className`."
|
|
112
|
+
],
|
|
113
|
+
"props": [
|
|
114
|
+
{
|
|
115
|
+
"component": "EmptyState",
|
|
116
|
+
"description": "What a list, a search or a screen says when it has nothing to show — every word is a prop.",
|
|
117
|
+
"props": [
|
|
118
|
+
{
|
|
119
|
+
"name": "title",
|
|
120
|
+
"type": "string",
|
|
121
|
+
"default": null,
|
|
122
|
+
"description": "What is empty, in a few words (\"No notifications yet\").",
|
|
123
|
+
"required": true
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"name": "action",
|
|
127
|
+
"type": "ReactNode",
|
|
128
|
+
"default": null,
|
|
129
|
+
"description": "What to do next: a Button.",
|
|
130
|
+
"required": false
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "description",
|
|
134
|
+
"type": "string",
|
|
135
|
+
"default": null,
|
|
136
|
+
"description": "Why, or what will fill it.",
|
|
137
|
+
"required": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "icon",
|
|
141
|
+
"type": "ReactNode",
|
|
142
|
+
"default": null,
|
|
143
|
+
"description": "A decorative icon (hidden from screen readers).",
|
|
144
|
+
"required": false
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"examples": [
|
|
150
|
+
{
|
|
151
|
+
"name": "default",
|
|
152
|
+
"title": "Default",
|
|
153
|
+
"description": "An icon, a header, a line and an action.",
|
|
154
|
+
"path": "examples/empty-state/native/default.tsx",
|
|
155
|
+
"module": "@krizaka/ui/registry/examples/empty-state/native/default",
|
|
156
|
+
"code": "import { Button, EmptyState, useTheme } from \"@krizaka/ui/native\";\nimport { View } from \"react-native\";\nimport Svg, { Path } from \"react-native-svg\";\n\nfunction BellIcon({ color }: { color: string }) {\n return (\n <Svg width={24} height={24} viewBox=\"0 0 24 24\" fill=\"none\" stroke={color} strokeWidth={2} strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <Path d=\"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a1.94 1.94 0 0 0 3.4 0\" />\n </Svg>\n );\n}\n\nexport default function NativeEmptyStateDefault() {\n const { theme } = useTheme();\n return (\n <View style={{ width: 320 }}>\n <EmptyState\n icon={<BellIcon color={theme.textPrimary} />}\n title=\"No notifications yet\"\n description=\"Follow a creator to hear when they go on stage.\"\n action={<Button variant=\"primary\" label=\"Explore\" />}\n />\n </View>\n );\n}\n",
|
|
157
|
+
"screenshots": {
|
|
158
|
+
"dark": "examples/empty-state/native/default.dark.png",
|
|
159
|
+
"light": "examples/empty-state/native/default.light.png"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
]
|
|
163
|
+
},
|
|
5
164
|
"files": [
|
|
6
165
|
{
|
|
7
166
|
"path": "empty-state/empty-state.tsx",
|
|
@@ -10,6 +169,14 @@
|
|
|
10
169
|
{
|
|
11
170
|
"path": "empty-state/index.ts",
|
|
12
171
|
"content": "/** @krizaka/ui/empty-state — `EmptyState`. Server-safe. */\nexport { EmptyState, emptyState, type EmptyStateProps } from \"./empty-state\";\n"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"path": "empty-state/meta.ts",
|
|
175
|
+
"content": "import type { ComponentMeta } from \"../meta\";\n\nexport const meta = {\n title: \"Empty state\",\n summary: \"What a list, a search or a panel says when it has nothing to show: an icon, a title, a line and an action.\",\n status: \"stable\",\n category: \"feedback\",\n platforms: \"both\",\n whenToUse: [\n \"When a list is empty for the first time: say what will appear here and how to start.\",\n \"When a search or a filter returns nothing: say so, and how to widen it.\",\n ],\n whenNotToUse: [\n { when: \"While the content is loading.\", use: \"skeleton\" },\n { when: \"When loading failed: say what went wrong.\", use: \"alert\" },\n ],\n bestPractices: [\n \"Title: what is empty, in a few words (“No videos yet”); description: why, or what will fill it.\",\n \"One action at most, the one that fills the list.\",\n ],\n accessibility: {\n keyboard: [],\n notes: [\"`role=\\\"status\\\"`: announced politely when it appears after a search.\", \"The icon is decorative and hidden from assistive technology.\"],\n },\n related: [\"skeleton\", \"alert\", \"spinner\"],\n web: {\n imports: [\"EmptyState\"],\n examples: [\n { name: \"default\", title: \"Default\", description: \"An icon, a title and a line.\" },\n { name: \"with-action\", title: \"With an action\", description: \"What to do next.\" },\n { name: \"title-only\", title: \"Title only\", description: \"A search without result.\" },\n ],\n },\n native: {\n imports: [\"EmptyState\"],\n differences: [\"The action is a native `Button` (with `label`).\", \"Style with `style`, not `className`.\"],\n examples: [{ name: \"default\", title: \"Default\", description: \"An icon, a header, a line and an action.\" }],\n },\n} satisfies ComponentMeta;\n"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"path": "meta.ts",
|
|
179
|
+
"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 | \"alert\"\n | \"avatar\"\n | \"badge\"\n | \"button\"\n | \"card\"\n | \"checkbox\"\n | \"chip\"\n | \"cn\"\n | \"command\"\n | \"confirm-button\"\n | \"countdown\"\n | \"dialog\"\n | \"dropdown-menu\"\n | \"empty-state\"\n | \"field\"\n | \"kbd\"\n | \"page-header\"\n | \"popover\"\n | \"progress\"\n | \"radio-group\"\n | \"section-backdrop\"\n | \"segmented\"\n | \"separator\"\n | \"skeleton\"\n | \"slider\"\n | \"slot\"\n | \"spinner\"\n | \"stat\"\n | \"switch\"\n | \"tabs\"\n | \"theme\"\n | \"toast\"\n | \"tooltip\"\n | \"txt\";\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/** The group of the catalogue. */\nexport type Category = \"actions\" | \"forms\" | \"navigation\" | \"overlays\" | \"feedback\" | \"data-display\" | \"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\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 /** 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"
|
|
13
180
|
}
|
|
14
181
|
],
|
|
15
182
|
"dependencies": [
|
|
@@ -17,8 +184,8 @@
|
|
|
17
184
|
],
|
|
18
185
|
"registryDependencies": [],
|
|
19
186
|
"demo": {
|
|
20
|
-
"path": "
|
|
21
|
-
"content": "import { EmptyState } from \"@krizaka/ui/empty-state\";\n\nconst ICON = (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m10 9 5 3-5 3z\" />\n </svg>\n);\n\nexport default function
|
|
187
|
+
"path": "examples/empty-state/default.tsx",
|
|
188
|
+
"content": "import { EmptyState } from \"@krizaka/ui/empty-state\";\n\nconst ICON = (\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n <rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\" />\n <path d=\"m10 9 5 3-5 3z\" />\n </svg>\n);\n\nexport default function EmptyStateDefault() {\n return <EmptyState icon={ICON} title=\"No videos yet\" description=\"The videos you publish appear here.\" />;\n}\n"
|
|
22
189
|
},
|
|
23
190
|
"props": [
|
|
24
191
|
{
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/alert/danger.tsx
|
|
4
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
5
|
+
import { Button } from "@krizaka/ui/button";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var WARN = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" }) });
|
|
8
|
+
function AlertDanger() {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
Alert,
|
|
11
|
+
{
|
|
12
|
+
tone: "danger",
|
|
13
|
+
icon: WARN,
|
|
14
|
+
title: "Payment failed",
|
|
15
|
+
action: /* @__PURE__ */ jsx(Button, { size: "sm", variant: "danger", children: "Retry" }),
|
|
16
|
+
children: "The card was declined. Try another one."
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
AlertDanger as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
2
|
+
import { Button } from "@krizaka/ui/button";
|
|
3
|
+
|
|
4
|
+
const WARN = (
|
|
5
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
6
|
+
<path d="M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" />
|
|
7
|
+
</svg>
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
export default function AlertDanger() {
|
|
11
|
+
return (
|
|
12
|
+
<Alert
|
|
13
|
+
tone="danger"
|
|
14
|
+
icon={WARN}
|
|
15
|
+
title="Payment failed"
|
|
16
|
+
action={
|
|
17
|
+
<Button size="sm" variant="danger">
|
|
18
|
+
Retry
|
|
19
|
+
</Button>
|
|
20
|
+
}
|
|
21
|
+
>
|
|
22
|
+
The card was declined. Try another one.
|
|
23
|
+
</Alert>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// registry/
|
|
3
|
+
// registry/examples/alert/info.tsx
|
|
4
4
|
import { Alert } from "@krizaka/ui/alert";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
var INFO = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 16v-4M12 8h.01M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20Z" }) });
|
|
7
|
-
function
|
|
7
|
+
function AlertInfo() {
|
|
8
8
|
return /* @__PURE__ */ jsx(Alert, { title: "New payout schedule", icon: INFO, children: "Payouts now arrive every Monday." });
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
AlertInfo as default
|
|
12
12
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/alert/success.tsx
|
|
4
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var CHECK = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
7
|
+
function AlertSuccess() {
|
|
8
|
+
return /* @__PURE__ */ jsx(Alert, { tone: "success", icon: CHECK, title: "Account verified", children: "You can now receive payouts." });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
AlertSuccess as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
2
|
+
|
|
3
|
+
const CHECK = (
|
|
4
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
5
|
+
<path d="M20 6 9 17l-5-5" />
|
|
6
|
+
</svg>
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
export default function AlertSuccess() {
|
|
10
|
+
return (
|
|
11
|
+
<Alert tone="success" icon={CHECK} title="Account verified">
|
|
12
|
+
You can now receive payouts.
|
|
13
|
+
</Alert>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/alert/title-only.tsx
|
|
4
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function AlertTitleOnly() {
|
|
7
|
+
return /* @__PURE__ */ jsx(Alert, { title: "New payout schedule" });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
AlertTitleOnly as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/alert/warning.tsx
|
|
4
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
5
|
+
import { Button } from "@krizaka/ui/button";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var WARN = /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx("path", { d: "M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" }) });
|
|
8
|
+
function AlertWarning() {
|
|
9
|
+
return /* @__PURE__ */ jsx(Alert, { tone: "warning", icon: WARN, title: "Low balance", action: /* @__PURE__ */ jsx(Button, { size: "sm", children: "Top up" }), children: "Two tips left before a top-up." });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
AlertWarning as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Alert } from "@krizaka/ui/alert";
|
|
2
|
+
import { Button } from "@krizaka/ui/button";
|
|
3
|
+
|
|
4
|
+
const WARN = (
|
|
5
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
|
|
6
|
+
<path d="M12 9v4M12 17h.01M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0Z" />
|
|
7
|
+
</svg>
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
// `warning` and `danger` are announced at once (role="alert").
|
|
11
|
+
export default function AlertWarning() {
|
|
12
|
+
return (
|
|
13
|
+
<Alert tone="warning" icon={WARN} title="Low balance" action={<Button size="sm">Top up</Button>}>
|
|
14
|
+
Two tips left before a top-up.
|
|
15
|
+
</Alert>
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/avatar/fallback.tsx
|
|
4
|
+
import { Avatar } from "@krizaka/ui/avatar";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
function AvatarFallback() {
|
|
7
|
+
return /* @__PURE__ */ jsx(Avatar, { fallback: "OA" });
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
AvatarFallback as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/avatar/group.tsx
|
|
4
|
+
import { Avatar } from "@krizaka/ui/avatar";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var PORTRAIT = "data:image/svg+xml;utf8," + encodeURIComponent(
|
|
7
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" fill="#3b82f6"/><circle cx="40" cy="31" r="14" fill="#dbeafe"/><path d="M12 80a28 24 0 0 1 56 0z" fill="#dbeafe"/></svg>'
|
|
8
|
+
);
|
|
9
|
+
function AvatarGroup() {
|
|
10
|
+
return /* @__PURE__ */ jsxs(Avatar.Group, { max: 3, size: "sm", children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", src: PORTRAIT, alt: "Oussama" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", fallback: "LM" }),
|
|
13
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", fallback: "SK" }),
|
|
14
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", fallback: "JD" }),
|
|
15
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", fallback: "AR" })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
AvatarGroup as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Avatar } from "@krizaka/ui/avatar";
|
|
2
|
+
|
|
3
|
+
const PORTRAIT =
|
|
4
|
+
"data:image/svg+xml;utf8," +
|
|
5
|
+
encodeURIComponent(
|
|
6
|
+
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" fill="#3b82f6"/>' +
|
|
7
|
+
'<circle cx="40" cy="31" r="14" fill="#dbeafe"/><path d="M12 80a28 24 0 0 1 56 0z" fill="#dbeafe"/></svg>',
|
|
8
|
+
);
|
|
9
|
+
|
|
10
|
+
// `max={3}`: the others become `+n`.
|
|
11
|
+
export default function AvatarGroup() {
|
|
12
|
+
return (
|
|
13
|
+
<Avatar.Group max={3} size="sm">
|
|
14
|
+
<Avatar size="sm" src={PORTRAIT} alt="Oussama" />
|
|
15
|
+
<Avatar size="sm" fallback="LM" />
|
|
16
|
+
<Avatar size="sm" fallback="SK" />
|
|
17
|
+
<Avatar size="sm" fallback="JD" />
|
|
18
|
+
<Avatar size="sm" fallback="AR" />
|
|
19
|
+
</Avatar.Group>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/avatar/native/group.tsx
|
|
4
|
+
import { Avatar } from "@krizaka/ui/native";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function NativeAvatarGroup() {
|
|
7
|
+
return /* @__PURE__ */ jsxs(Avatar.Group, { max: 3, size: "md", children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya" }),
|
|
9
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Noor" }),
|
|
10
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Ines" }),
|
|
11
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Theo" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Lou" })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
NativeAvatarGroup as default
|
|
17
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Avatar } from "@krizaka/ui/native";
|
|
2
|
+
|
|
3
|
+
export default function NativeAvatarGroup() {
|
|
4
|
+
return (
|
|
5
|
+
<Avatar.Group max={3} size="md">
|
|
6
|
+
<Avatar alt="Maya" />
|
|
7
|
+
<Avatar alt="Noor" />
|
|
8
|
+
<Avatar alt="Ines" />
|
|
9
|
+
<Avatar alt="Theo" />
|
|
10
|
+
<Avatar alt="Lou" />
|
|
11
|
+
</Avatar.Group>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/avatar/native/sizes.tsx
|
|
4
|
+
import { Avatar } from "@krizaka/ui/native";
|
|
5
|
+
import { View } from "react-native";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
function NativeAvatarSizes() {
|
|
8
|
+
return /* @__PURE__ */ jsxs(View, { style: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya", size: "xs" }),
|
|
10
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya", size: "sm" }),
|
|
11
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya", size: "md" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya", size: "lg" }),
|
|
13
|
+
/* @__PURE__ */ jsx(Avatar, { alt: "Maya", size: "xl" })
|
|
14
|
+
] });
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
NativeAvatarSizes as default
|
|
18
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Avatar } from "@krizaka/ui/native";
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
// Without an image: the initial of `alt`.
|
|
5
|
+
export default function NativeAvatarSizes() {
|
|
6
|
+
return (
|
|
7
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
8
|
+
<Avatar alt="Maya" size="xs" />
|
|
9
|
+
<Avatar alt="Maya" size="sm" />
|
|
10
|
+
<Avatar alt="Maya" size="md" />
|
|
11
|
+
<Avatar alt="Maya" size="lg" />
|
|
12
|
+
<Avatar alt="Maya" size="xl" />
|
|
13
|
+
</View>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// registry/examples/avatar/sizes.tsx
|
|
4
|
+
import { Avatar } from "@krizaka/ui/avatar";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function AvatarSizes() {
|
|
7
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
8
|
+
/* @__PURE__ */ jsx(Avatar, { size: "xs", fallback: "OA" }),
|
|
9
|
+
/* @__PURE__ */ jsx(Avatar, { size: "sm", fallback: "OA" }),
|
|
10
|
+
/* @__PURE__ */ jsx(Avatar, { size: "md", fallback: "OA" }),
|
|
11
|
+
/* @__PURE__ */ jsx(Avatar, { size: "lg", fallback: "OA" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Avatar, { size: "xl", fallback: "OA" })
|
|
13
|
+
] });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
AvatarSizes as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Avatar } from "@krizaka/ui/avatar";
|
|
2
|
+
|
|
3
|
+
export default function AvatarSizes() {
|
|
4
|
+
return (
|
|
5
|
+
<div className="flex items-center gap-3">
|
|
6
|
+
<Avatar size="xs" fallback="OA" />
|
|
7
|
+
<Avatar size="sm" fallback="OA" />
|
|
8
|
+
<Avatar size="md" fallback="OA" />
|
|
9
|
+
<Avatar size="lg" fallback="OA" />
|
|
10
|
+
<Avatar size="xl" fallback="OA" />
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
// registry/
|
|
3
|
+
// registry/examples/avatar/with-image.tsx
|
|
4
4
|
import { Avatar } from "@krizaka/ui/avatar";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
var PORTRAIT = "data:image/svg+xml;utf8," + encodeURIComponent(
|
|
7
7
|
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><rect width="80" height="80" fill="#3b82f6"/><circle cx="40" cy="31" r="14" fill="#dbeafe"/><path d="M12 80a28 24 0 0 1 56 0z" fill="#dbeafe"/></svg>'
|
|
8
8
|
);
|
|
9
|
-
function
|
|
9
|
+
function AvatarWithImage() {
|
|
10
10
|
return /* @__PURE__ */ jsx(Avatar, { src: PORTRAIT, alt: "Oussama", fallback: "OA" });
|
|
11
11
|
}
|
|
12
12
|
export {
|
|
13
|
-
|
|
13
|
+
AvatarWithImage as default
|
|
14
14
|
};
|