@neynar/ui 0.2.1 → 0.3.1
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/{llm-docs → .llm}/a.llm.md +2 -16
- package/{llm-docs → .llm}/badge.llm.md +16 -21
- package/{llm-docs → .llm}/blockquote.llm.md +1 -6
- package/.llm/button-group-separator.llm.md +53 -0
- package/.llm/button-group-text.llm.md +56 -0
- package/.llm/button-group.llm.md +81 -0
- package/{llm-docs → .llm}/button.llm.md +1 -1
- package/{llm-docs → .llm}/code.llm.md +1 -6
- package/.llm/empty-content.llm.md +103 -0
- package/.llm/empty-description.llm.md +70 -0
- package/.llm/empty-header.llm.md +64 -0
- package/.llm/empty-media.llm.md +81 -0
- package/.llm/empty-title.llm.md +54 -0
- package/.llm/empty.llm.md +158 -0
- package/.llm/field-content.llm.md +28 -0
- package/.llm/field-description.llm.md +28 -0
- package/.llm/field-error.llm.md +41 -0
- package/.llm/field-group.llm.md +84 -0
- package/.llm/field-label.llm.md +28 -0
- package/.llm/field-legend.llm.md +77 -0
- package/.llm/field-separator.llm.md +35 -0
- package/.llm/field-set.llm.md +80 -0
- package/.llm/field-title.llm.md +28 -0
- package/.llm/field.llm.md +35 -0
- package/{llm-docs → .llm}/h1.llm.md +2 -7
- package/{llm-docs → .llm}/h2.llm.md +2 -7
- package/{llm-docs → .llm}/h3.llm.md +2 -7
- package/{llm-docs → .llm}/h4.llm.md +2 -7
- package/{llm-docs → .llm}/h5.llm.md +2 -7
- package/{llm-docs → .llm}/h6.llm.md +1 -6
- package/.llm/input-group-addon.llm.md +91 -0
- package/.llm/input-group-button.llm.md +120 -0
- package/.llm/input-group-input.llm.md +145 -0
- package/.llm/input-group-text.llm.md +75 -0
- package/.llm/input-group-textarea.llm.md +157 -0
- package/.llm/input-group.llm.md +108 -0
- package/.llm/item-actions.llm.md +77 -0
- package/.llm/item-content.llm.md +73 -0
- package/.llm/item-description.llm.md +61 -0
- package/.llm/item-footer.llm.md +68 -0
- package/.llm/item-group.llm.md +73 -0
- package/.llm/item-header.llm.md +66 -0
- package/.llm/item-media.llm.md +75 -0
- package/.llm/item-separator.llm.md +80 -0
- package/.llm/item-title.llm.md +59 -0
- package/.llm/item.llm.md +115 -0
- package/.llm/kbd-group.llm.md +71 -0
- package/.llm/kbd.llm.md +71 -0
- package/{llm-docs → .llm}/lead.llm.md +1 -6
- package/{llm-docs → .llm}/p.llm.md +1 -6
- package/{llm-docs → .llm}/sdk-items-registry.json +390 -6
- package/{llm-docs → .llm}/small.llm.md +1 -6
- package/{llm-docs → .llm}/span.llm.md +2 -16
- package/.llm/spinner.llm.md +182 -0
- package/{llm-docs → .llm}/strong.llm.md +1 -6
- package/{llm-docs → .llm}/typography.llm.md +2 -16
- package/dist/components/ui/button-group.d.ts +448 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/empty-state.d.ts +1 -0
- package/dist/components/ui/empty-state.d.ts.map +1 -1
- package/dist/components/ui/empty.d.ts +630 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/field.d.ts +238 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/input-group.d.ts +636 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/item.d.ts +766 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/kbd.d.ts +149 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -5
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/spinner.d.ts +194 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/stack.d.ts.map +1 -1
- package/dist/components/ui/stories/accordion.stories.d.ts +0 -1
- package/dist/components/ui/stories/accordion.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/alert-dialog.stories.d.ts +0 -1
- package/dist/components/ui/stories/alert-dialog.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/alert.stories.d.ts +0 -1
- package/dist/components/ui/stories/alert.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts +0 -1
- package/dist/components/ui/stories/aspect-ratio.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/avatar.stories.d.ts +0 -1
- package/dist/components/ui/stories/avatar.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/badge.stories.d.ts +0 -1
- package/dist/components/ui/stories/badge.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/breadcrumb.stories.d.ts +0 -1
- package/dist/components/ui/stories/breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/button-group.stories.d.ts +48 -0
- package/dist/components/ui/stories/button-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/button.stories.d.ts +0 -1
- package/dist/components/ui/stories/button.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/calendar.stories.d.ts +0 -1
- package/dist/components/ui/stories/calendar.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/card.stories.d.ts +0 -1
- package/dist/components/ui/stories/card.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/carousel.stories.d.ts +0 -1
- package/dist/components/ui/stories/carousel.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/chart.stories.d.ts +0 -1
- package/dist/components/ui/stories/chart.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/checkbox.stories.d.ts +0 -1
- package/dist/components/ui/stories/checkbox.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/cn.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/collapsible.stories.d.ts +0 -1
- package/dist/components/ui/stories/collapsible.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/colors.stories.d.ts +0 -1
- package/dist/components/ui/stories/colors.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/combobox.stories.d.ts +0 -1
- package/dist/components/ui/stories/combobox.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/command.stories.d.ts +0 -1
- package/dist/components/ui/stories/command.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/container.stories.d.ts +0 -1
- package/dist/components/ui/stories/container.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/context-menu.stories.d.ts +0 -1
- package/dist/components/ui/stories/context-menu.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/date-picker.stories.d.ts +0 -1
- package/dist/components/ui/stories/date-picker.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/dialog.stories.d.ts +0 -1
- package/dist/components/ui/stories/dialog.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/drawer.stories.d.ts +0 -1
- package/dist/components/ui/stories/drawer.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts +0 -1
- package/dist/components/ui/stories/dropdown-menu.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/empty-state.stories.d.ts +0 -1
- package/dist/components/ui/stories/empty-state.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/empty.stories.d.ts +38 -0
- package/dist/components/ui/stories/empty.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/field.stories.d.ts +48 -0
- package/dist/components/ui/stories/field.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/hover-card.stories.d.ts +0 -1
- package/dist/components/ui/stories/hover-card.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/input-group.stories.d.ts +37 -0
- package/dist/components/ui/stories/input-group.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/input.stories.d.ts +0 -1
- package/dist/components/ui/stories/input.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/item.stories.d.ts +61 -0
- package/dist/components/ui/stories/item.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/kbd.stories.d.ts +37 -0
- package/dist/components/ui/stories/kbd.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/label.stories.d.ts +0 -1
- package/dist/components/ui/stories/label.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/menubar.stories.d.ts +0 -1
- package/dist/components/ui/stories/menubar.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/navigation-menu.stories.d.ts +0 -1
- package/dist/components/ui/stories/navigation-menu.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/pagination.stories.d.ts +0 -1
- package/dist/components/ui/stories/pagination.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/popover.stories.d.ts +0 -1
- package/dist/components/ui/stories/popover.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/progress.stories.d.ts +0 -1
- package/dist/components/ui/stories/progress.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/radio-group.stories.d.ts +0 -1
- package/dist/components/ui/stories/radio-group.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/resizable.stories.d.ts +0 -1
- package/dist/components/ui/stories/resizable.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/scroll-area.stories.d.ts +1 -2
- package/dist/components/ui/stories/scroll-area.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/select.stories.d.ts +0 -1
- package/dist/components/ui/stories/select.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/separator.stories.d.ts +0 -1
- package/dist/components/ui/stories/separator.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/sheet.stories.d.ts +0 -1
- package/dist/components/ui/stories/sheet.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/sidebar.stories.d.ts +0 -1
- package/dist/components/ui/stories/sidebar.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/skeleton.stories.d.ts +0 -1
- package/dist/components/ui/stories/skeleton.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/slider.stories.d.ts +0 -1
- package/dist/components/ui/stories/slider.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/sonner.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/spinner.stories.d.ts +37 -0
- package/dist/components/ui/stories/spinner.stories.d.ts.map +1 -0
- package/dist/components/ui/stories/stack.stories.d.ts +0 -1
- package/dist/components/ui/stories/stack.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/switch.stories.d.ts +0 -1
- package/dist/components/ui/stories/switch.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/table.stories.d.ts +0 -1
- package/dist/components/ui/stories/table.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/tabs.stories.d.ts +0 -1
- package/dist/components/ui/stories/tabs.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/text-field.stories.d.ts +0 -1
- package/dist/components/ui/stories/text-field.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/textarea.stories.d.ts +0 -1
- package/dist/components/ui/stories/textarea.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/theme-toggle.stories.d.ts +0 -1
- package/dist/components/ui/stories/theme-toggle.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/theme.stories.d.ts +0 -1
- package/dist/components/ui/stories/theme.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/toggle-group.stories.d.ts +0 -1
- package/dist/components/ui/stories/toggle-group.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/toggle.stories.d.ts +0 -1
- package/dist/components/ui/stories/toggle.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/tooltip.stories.d.ts +0 -1
- package/dist/components/ui/stories/tooltip.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/typography.stories.d.ts +0 -1
- package/dist/components/ui/stories/typography.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/use-mobile.stories.d.ts.map +1 -1
- package/dist/components/ui/stories/use-theme.stories.d.ts.map +1 -1
- package/dist/components/ui/theme-toggle.d.ts +0 -3
- package/dist/components/ui/theme-toggle.d.ts.map +1 -1
- package/dist/components/ui/theme.d.ts.map +1 -1
- package/dist/components/ui/typography.d.ts +12 -11
- package/dist/components/ui/typography.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4973 -2353
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/docs/llm/components/display.md +125 -0
- package/docs/llm/components/feedback.md +0 -14
- package/docs/llm/components/forms.md +94 -0
- package/docs/llm/components/layout.md +169 -0
- package/llms.txt +18 -12
- package/package.json +7 -6
- package/src/components/ui/button-group.tsx +525 -0
- package/src/components/ui/button.tsx +9 -12
- package/src/components/ui/empty-state.tsx +1 -0
- package/src/components/ui/empty.tsx +793 -0
- package/src/components/ui/field.tsx +494 -0
- package/src/components/ui/input-group.tsx +801 -0
- package/src/components/ui/item.tsx +955 -0
- package/src/components/ui/kbd.tsx +175 -0
- package/src/components/ui/skeleton.tsx +1 -1
- package/src/components/ui/spinner.tsx +211 -0
- package/src/components/ui/stack.tsx +3 -1
- package/src/components/ui/stories/accordion.stories.tsx +0 -1
- package/src/components/ui/stories/alert-dialog.stories.tsx +0 -1
- package/src/components/ui/stories/alert.stories.tsx +0 -1
- package/src/components/ui/stories/aspect-ratio.stories.tsx +0 -1
- package/src/components/ui/stories/avatar.stories.tsx +0 -1
- package/src/components/ui/stories/badge.stories.tsx +0 -1
- package/src/components/ui/stories/breadcrumb.stories.tsx +0 -1
- package/src/components/ui/stories/button-group.stories.tsx +300 -0
- package/src/components/ui/stories/button.stories.tsx +0 -1
- package/src/components/ui/stories/calendar.stories.tsx +0 -1
- package/src/components/ui/stories/card.stories.tsx +0 -1
- package/src/components/ui/stories/carousel.stories.tsx +0 -1
- package/src/components/ui/stories/chart.stories.tsx +0 -1
- package/src/components/ui/stories/checkbox.stories.tsx +0 -1
- package/src/components/ui/stories/cn.stories.tsx +0 -1
- package/src/components/ui/stories/collapsible.stories.tsx +0 -1
- package/src/components/ui/stories/colors.stories.tsx +0 -1
- package/src/components/ui/stories/combobox.stories.tsx +0 -1
- package/src/components/ui/stories/command.stories.tsx +0 -1
- package/src/components/ui/stories/container.stories.tsx +0 -1
- package/src/components/ui/stories/context-menu.stories.tsx +0 -1
- package/src/components/ui/stories/date-picker.stories.tsx +0 -1
- package/src/components/ui/stories/dialog.stories.tsx +0 -1
- package/src/components/ui/stories/drawer.stories.tsx +0 -1
- package/src/components/ui/stories/dropdown-menu.stories.tsx +0 -1
- package/src/components/ui/stories/empty-state.stories.tsx +0 -1
- package/src/components/ui/stories/empty.stories.tsx +293 -0
- package/src/components/ui/stories/field.stories.tsx +470 -0
- package/src/components/ui/stories/hover-card.stories.tsx +0 -1
- package/src/components/ui/stories/input-group.stories.tsx +444 -0
- package/src/components/ui/stories/input.stories.tsx +0 -1
- package/src/components/ui/stories/item.stories.tsx +601 -0
- package/src/components/ui/stories/kbd.stories.tsx +462 -0
- package/src/components/ui/stories/label.stories.tsx +0 -1
- package/src/components/ui/stories/menubar.stories.tsx +0 -1
- package/src/components/ui/stories/navigation-menu.stories.tsx +0 -1
- package/src/components/ui/stories/pagination.stories.tsx +0 -1
- package/src/components/ui/stories/popover.stories.tsx +0 -1
- package/src/components/ui/stories/progress.stories.tsx +0 -1
- package/src/components/ui/stories/radio-group.stories.tsx +0 -1
- package/src/components/ui/stories/resizable.stories.tsx +0 -1
- package/src/components/ui/stories/scroll-area.stories.tsx +0 -1
- package/src/components/ui/stories/select.stories.tsx +0 -1
- package/src/components/ui/stories/separator.stories.tsx +0 -1
- package/src/components/ui/stories/sheet.stories.tsx +0 -1
- package/src/components/ui/stories/sidebar.stories.tsx +0 -1
- package/src/components/ui/stories/skeleton.stories.tsx +0 -1
- package/src/components/ui/stories/slider.stories.tsx +0 -1
- package/src/components/ui/stories/sonner.stories.tsx +0 -1
- package/src/components/ui/stories/spinner.stories.tsx +356 -0
- package/src/components/ui/stories/stack.stories.tsx +0 -1
- package/src/components/ui/stories/switch.stories.tsx +0 -1
- package/src/components/ui/stories/table.stories.tsx +0 -1
- package/src/components/ui/stories/tabs.stories.tsx +0 -1
- package/src/components/ui/stories/text-field.stories.tsx +0 -1
- package/src/components/ui/stories/textarea.stories.tsx +0 -1
- package/src/components/ui/stories/theme-toggle.stories.tsx +0 -1
- package/src/components/ui/stories/theme.stories.tsx +0 -1
- package/src/components/ui/stories/toggle-group.stories.tsx +0 -1
- package/src/components/ui/stories/toggle.stories.tsx +0 -1
- package/src/components/ui/stories/tooltip.stories.tsx +0 -1
- package/src/components/ui/stories/typography.stories.tsx +5 -2
- package/src/components/ui/stories/use-mobile.stories.tsx +0 -1
- package/src/components/ui/stories/use-theme.stories.tsx +0 -1
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/theme-toggle.tsx +1 -3
- package/src/components/ui/theme.tsx +6 -1
- package/src/components/ui/typography.tsx +29 -129
- package/src/index.ts +7 -0
- package/src/styles/globals.css +82 -94
- /package/{llm-docs → .llm}/accordion-content.llm.md +0 -0
- /package/{llm-docs → .llm}/accordion-item.llm.md +0 -0
- /package/{llm-docs → .llm}/accordion-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/accordion.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-description.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-action.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-cancel.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-content.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-description.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-header.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-overlay.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-title.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-dialog.llm.md +0 -0
- /package/{llm-docs → .llm}/alert-title.llm.md +0 -0
- /package/{llm-docs → .llm}/alert.llm.md +0 -0
- /package/{llm-docs → .llm}/aspect-ratio.llm.md +0 -0
- /package/{llm-docs → .llm}/avatar-fallback.llm.md +0 -0
- /package/{llm-docs → .llm}/avatar-image.llm.md +0 -0
- /package/{llm-docs → .llm}/avatar.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-ellipsis.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-item.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-link.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-list.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-page.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/breadcrumb.llm.md +0 -0
- /package/{llm-docs → .llm}/calendar-day-button.llm.md +0 -0
- /package/{llm-docs → .llm}/calendar.llm.md +0 -0
- /package/{llm-docs → .llm}/card-action.llm.md +0 -0
- /package/{llm-docs → .llm}/card-content.llm.md +0 -0
- /package/{llm-docs → .llm}/card-description.llm.md +0 -0
- /package/{llm-docs → .llm}/card-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/card-header.llm.md +0 -0
- /package/{llm-docs → .llm}/card-title.llm.md +0 -0
- /package/{llm-docs → .llm}/card.llm.md +0 -0
- /package/{llm-docs → .llm}/carousel-content.llm.md +0 -0
- /package/{llm-docs → .llm}/carousel-item.llm.md +0 -0
- /package/{llm-docs → .llm}/carousel-next.llm.md +0 -0
- /package/{llm-docs → .llm}/carousel-previous.llm.md +0 -0
- /package/{llm-docs → .llm}/carousel.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-config.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-container.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-legend-content.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-legend.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-style.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-tooltip-content.llm.md +0 -0
- /package/{llm-docs → .llm}/chart-tooltip.llm.md +0 -0
- /package/{llm-docs → .llm}/checkbox.llm.md +0 -0
- /package/{llm-docs → .llm}/cn.llm.md +0 -0
- /package/{llm-docs → .llm}/collapsible-content.llm.md +0 -0
- /package/{llm-docs → .llm}/collapsible-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/collapsible.llm.md +0 -0
- /package/{llm-docs → .llm}/combobox-option.llm.md +0 -0
- /package/{llm-docs → .llm}/combobox.llm.md +0 -0
- /package/{llm-docs → .llm}/command-dialog.llm.md +0 -0
- /package/{llm-docs → .llm}/command-empty.llm.md +0 -0
- /package/{llm-docs → .llm}/command-group.llm.md +0 -0
- /package/{llm-docs → .llm}/command-input.llm.md +0 -0
- /package/{llm-docs → .llm}/command-item.llm.md +0 -0
- /package/{llm-docs → .llm}/command-list.llm.md +0 -0
- /package/{llm-docs → .llm}/command-loading.llm.md +0 -0
- /package/{llm-docs → .llm}/command-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/command-shortcut.llm.md +0 -0
- /package/{llm-docs → .llm}/command.llm.md +0 -0
- /package/{llm-docs → .llm}/container.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-checkbox-item.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-content.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-group.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-item.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-label.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-radio-group.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-radio-item.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-shortcut.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-sub-content.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-sub-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-sub.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/context-menu.llm.md +0 -0
- /package/{llm-docs → .llm}/date-picker.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-close.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-content.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-description.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-header.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-overlay.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-title.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/dialog.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-close.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-content.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-description.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-header.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-overlay.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-title.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/drawer.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-checkbox-item.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-content.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-group.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-item.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-label.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-radio-group.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-radio-item.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-shortcut.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-sub-content.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-sub-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-sub.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/dropdown-menu.llm.md +0 -0
- /package/{llm-docs → .llm}/empty-state.llm.md +0 -0
- /package/{llm-docs → .llm}/hover-card-content.llm.md +0 -0
- /package/{llm-docs → .llm}/hover-card-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/hover-card.llm.md +0 -0
- /package/{llm-docs → .llm}/input.llm.md +0 -0
- /package/{llm-docs → .llm}/label.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-checkbox-item.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-content.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-group.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-item.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-label.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-menu.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-portal.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-radio-group.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-radio-item.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-shortcut.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-sub-content.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-sub-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-sub.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/menubar.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-content.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-indicator.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-item.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-link.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-list.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-trigger-style.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu-viewport.llm.md +0 -0
- /package/{llm-docs → .llm}/navigation-menu.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-content.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-ellipsis.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-item.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-link.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-next.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination-previous.llm.md +0 -0
- /package/{llm-docs → .llm}/pagination.llm.md +0 -0
- /package/{llm-docs → .llm}/popover-anchor.llm.md +0 -0
- /package/{llm-docs → .llm}/popover-content.llm.md +0 -0
- /package/{llm-docs → .llm}/popover-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/popover.llm.md +0 -0
- /package/{llm-docs → .llm}/progress.llm.md +0 -0
- /package/{llm-docs → .llm}/radio-group-indicator.llm.md +0 -0
- /package/{llm-docs → .llm}/radio-group-item.llm.md +0 -0
- /package/{llm-docs → .llm}/radio-group.llm.md +0 -0
- /package/{llm-docs → .llm}/resizable-handle.llm.md +0 -0
- /package/{llm-docs → .llm}/resizable-panel-group.llm.md +0 -0
- /package/{llm-docs → .llm}/resizable-panel.llm.md +0 -0
- /package/{llm-docs → .llm}/scroll-area-corner.llm.md +0 -0
- /package/{llm-docs → .llm}/scroll-area-thumb.llm.md +0 -0
- /package/{llm-docs → .llm}/scroll-area-viewport.llm.md +0 -0
- /package/{llm-docs → .llm}/scroll-area.llm.md +0 -0
- /package/{llm-docs → .llm}/scroll-bar.llm.md +0 -0
- /package/{llm-docs → .llm}/select-content.llm.md +0 -0
- /package/{llm-docs → .llm}/select-group.llm.md +0 -0
- /package/{llm-docs → .llm}/select-item.llm.md +0 -0
- /package/{llm-docs → .llm}/select-label.llm.md +0 -0
- /package/{llm-docs → .llm}/select-scroll-down-button.llm.md +0 -0
- /package/{llm-docs → .llm}/select-scroll-up-button.llm.md +0 -0
- /package/{llm-docs → .llm}/select-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/select-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/select-value.llm.md +0 -0
- /package/{llm-docs → .llm}/select.llm.md +0 -0
- /package/{llm-docs → .llm}/separator.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-close.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-content.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-description.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-header.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-title.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/sheet.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-content.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-group-action.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-group-content.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-group-label.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-group.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-header.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-input.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-inset.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-action.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-badge.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-button.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-item.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-skeleton.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-sub-button.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-sub-item.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu-sub.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-menu.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-provider.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-rail.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-separator.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/sidebar.llm.md +0 -0
- /package/{llm-docs → .llm}/skeleton.llm.md +0 -0
- /package/{llm-docs → .llm}/slider.llm.md +0 -0
- /package/{llm-docs → .llm}/stack.llm.md +0 -0
- /package/{llm-docs → .llm}/switch.llm.md +0 -0
- /package/{llm-docs → .llm}/table-body.llm.md +0 -0
- /package/{llm-docs → .llm}/table-caption.llm.md +0 -0
- /package/{llm-docs → .llm}/table-cell.llm.md +0 -0
- /package/{llm-docs → .llm}/table-footer.llm.md +0 -0
- /package/{llm-docs → .llm}/table-head.llm.md +0 -0
- /package/{llm-docs → .llm}/table-header.llm.md +0 -0
- /package/{llm-docs → .llm}/table-row.llm.md +0 -0
- /package/{llm-docs → .llm}/table.llm.md +0 -0
- /package/{llm-docs → .llm}/tabs-content.llm.md +0 -0
- /package/{llm-docs → .llm}/tabs-list.llm.md +0 -0
- /package/{llm-docs → .llm}/tabs-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/tabs.llm.md +0 -0
- /package/{llm-docs → .llm}/text-field.llm.md +0 -0
- /package/{llm-docs → .llm}/textarea.llm.md +0 -0
- /package/{llm-docs → .llm}/theme-preference.llm.md +0 -0
- /package/{llm-docs → .llm}/theme-toggle.llm.md +0 -0
- /package/{llm-docs → .llm}/theme.llm.md +0 -0
- /package/{llm-docs → .llm}/toast.llm.md +0 -0
- /package/{llm-docs → .llm}/toaster.llm.md +0 -0
- /package/{llm-docs → .llm}/toggle-group-item.llm.md +0 -0
- /package/{llm-docs → .llm}/toggle-group.llm.md +0 -0
- /package/{llm-docs → .llm}/toggle.llm.md +0 -0
- /package/{llm-docs → .llm}/tooltip-content.llm.md +0 -0
- /package/{llm-docs → .llm}/tooltip-provider.llm.md +0 -0
- /package/{llm-docs → .llm}/tooltip-trigger.llm.md +0 -0
- /package/{llm-docs → .llm}/tooltip.llm.md +0 -0
- /package/{llm-docs → .llm}/use-carousel.llm.md +0 -0
- /package/{llm-docs → .llm}/use-command-state.llm.md +0 -0
- /package/{llm-docs → .llm}/use-is-mobile.llm.md +0 -0
- /package/{llm-docs → .llm}/use-sidebar.llm.md +0 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { cn } from "@/lib/utils"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Props for Kbd component (Documentation only - NOT used in component implementation)
|
|
5
|
+
* These types are for documentation generation and should not replace HTML kbd element inferred types
|
|
6
|
+
*/
|
|
7
|
+
type KbdDocsProps = {
|
|
8
|
+
/** Additional CSS classes for custom styling */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Content to display inside the keyboard key (text, icons, or components) */
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
} & Omit<React.HTMLAttributes<HTMLElement>, "children" | "className">;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Props for KbdGroup component (Documentation only - NOT used in component implementation)
|
|
16
|
+
* These types are for documentation generation and should not replace HTML div element inferred types
|
|
17
|
+
*/
|
|
18
|
+
type KbdGroupDocsProps = {
|
|
19
|
+
/** Additional CSS classes for custom styling */
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Kbd components or other content to group together */
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
} & Omit<React.HTMLAttributes<HTMLDivElement>, "children" | "className">;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Kbd - Display keyboard input and shortcuts
|
|
27
|
+
*
|
|
28
|
+
* A semantic component for representing keyboard keys, shortcuts, and input in documentation,
|
|
29
|
+
* tutorials, and UI instructions. Uses the HTML kbd element with consistent styling for
|
|
30
|
+
* monospace text, subtle background, and appropriate sizing. Supports icons, text, and
|
|
31
|
+
* modifier keys like Cmd, Shift, Ctrl, and Alt.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* // Display a single keyboard key
|
|
36
|
+
* <Kbd>K</Kbd>
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* // Display keyboard shortcuts with modifiers
|
|
42
|
+
* <KbdGroup>
|
|
43
|
+
* <Kbd>⌘</Kbd>
|
|
44
|
+
* <Kbd>K</Kbd>
|
|
45
|
+
* </KbdGroup>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* // Display keyboard shortcuts in help text
|
|
51
|
+
* <p>
|
|
52
|
+
* Press <Kbd>Ctrl</Kbd> + <Kbd>S</Kbd> to save your work
|
|
53
|
+
* </p>
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* // Complex keyboard shortcut with multiple modifiers
|
|
59
|
+
* <KbdGroup>
|
|
60
|
+
* <Kbd>Ctrl</Kbd>
|
|
61
|
+
* <Kbd>Shift</Kbd>
|
|
62
|
+
* <Kbd>P</Kbd>
|
|
63
|
+
* </KbdGroup>
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```tsx
|
|
68
|
+
* // Display keyboard shortcuts with icons
|
|
69
|
+
* <KbdGroup>
|
|
70
|
+
* <Kbd>
|
|
71
|
+
* <Command className="h-3 w-3" />
|
|
72
|
+
* </Kbd>
|
|
73
|
+
* <Kbd>K</Kbd>
|
|
74
|
+
* </KbdGroup>
|
|
75
|
+
* ```
|
|
76
|
+
*
|
|
77
|
+
* @accessibility
|
|
78
|
+
* - Uses semantic HTML kbd element for keyboard input representation
|
|
79
|
+
* - Screen readers announce content naturally as keyboard input
|
|
80
|
+
* - Non-interactive by default (pointer-events-none) to avoid confusion
|
|
81
|
+
* - Sufficient color contrast for readability (WCAG 2.1 AA compliant)
|
|
82
|
+
* - Respects user font size preferences with relative sizing
|
|
83
|
+
* - Works within tooltips with adjusted contrast for visibility
|
|
84
|
+
*
|
|
85
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd} MDN kbd Element Reference
|
|
86
|
+
* @see {@link https://ui.shadcn.com/docs/components/kbd} shadcn/ui Kbd Documentation
|
|
87
|
+
* @see {@link KbdGroup} Group multiple keyboard keys together
|
|
88
|
+
* @since 1.0.0
|
|
89
|
+
*/
|
|
90
|
+
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
|
|
91
|
+
return (
|
|
92
|
+
<kbd
|
|
93
|
+
data-slot="kbd"
|
|
94
|
+
className={cn(
|
|
95
|
+
"bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none",
|
|
96
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
97
|
+
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
98
|
+
className
|
|
99
|
+
)}
|
|
100
|
+
{...props}
|
|
101
|
+
/>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* KbdGroup - Group multiple keyboard keys together
|
|
107
|
+
*
|
|
108
|
+
* A container component for grouping multiple Kbd components to represent complex keyboard
|
|
109
|
+
* shortcuts or key combinations. Automatically handles spacing between individual keys and
|
|
110
|
+
* provides semantic grouping. Useful for displaying shortcuts like "Ctrl+Shift+P" or "Cmd+K".
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```tsx
|
|
114
|
+
* // Basic keyboard shortcut
|
|
115
|
+
* <KbdGroup>
|
|
116
|
+
* <Kbd>Ctrl</Kbd>
|
|
117
|
+
* <Kbd>C</Kbd>
|
|
118
|
+
* </KbdGroup>
|
|
119
|
+
* ```
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```tsx
|
|
123
|
+
* // Multiple modifier keys
|
|
124
|
+
* <KbdGroup>
|
|
125
|
+
* <Kbd>⌘</Kbd>
|
|
126
|
+
* <Kbd>⇧</Kbd>
|
|
127
|
+
* <Kbd>P</Kbd>
|
|
128
|
+
* </KbdGroup>
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* // With custom separators using text
|
|
134
|
+
* <KbdGroup>
|
|
135
|
+
* <Kbd>Ctrl</Kbd>
|
|
136
|
+
* <span className="text-muted-foreground">+</span>
|
|
137
|
+
* <Kbd>Alt</Kbd>
|
|
138
|
+
* <span className="text-muted-foreground">+</span>
|
|
139
|
+
* <Kbd>Delete</Kbd>
|
|
140
|
+
* </KbdGroup>
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* // In a command palette or menu item
|
|
146
|
+
* <div className="flex items-center justify-between">
|
|
147
|
+
* <span>Open command palette</span>
|
|
148
|
+
* <KbdGroup>
|
|
149
|
+
* <Kbd>⌘</Kbd>
|
|
150
|
+
* <Kbd>K</Kbd>
|
|
151
|
+
* </KbdGroup>
|
|
152
|
+
* </div>
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @accessibility
|
|
156
|
+
* - Groups related keyboard keys semantically
|
|
157
|
+
* - Screen readers announce grouped keys naturally
|
|
158
|
+
* - Maintains visual separation between keys for clarity
|
|
159
|
+
* - Non-interactive to prevent accidental activation
|
|
160
|
+
* - Respects user preferences for font sizing and spacing
|
|
161
|
+
*
|
|
162
|
+
* @see {@link Kbd} Individual keyboard key display
|
|
163
|
+
* @since 1.0.0
|
|
164
|
+
*/
|
|
165
|
+
function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
|
|
166
|
+
return (
|
|
167
|
+
<kbd
|
|
168
|
+
data-slot="kbd-group"
|
|
169
|
+
className={cn("inline-flex items-center gap-1", className)}
|
|
170
|
+
{...props}
|
|
171
|
+
/>
|
|
172
|
+
)
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export { Kbd, KbdGroup, type KbdDocsProps, type KbdGroupDocsProps }
|
|
@@ -149,7 +149,7 @@ function Skeleton({ className, ...props }: React.ComponentProps<"div">) {
|
|
|
149
149
|
return (
|
|
150
150
|
<div
|
|
151
151
|
data-slot="skeleton"
|
|
152
|
-
className={cn("bg-
|
|
152
|
+
className={cn("bg-card animate-pulse rounded-md", className)}
|
|
153
153
|
{...props}
|
|
154
154
|
/>
|
|
155
155
|
);
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Loader2Icon } from "lucide-react";
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Props for Spinner component (Documentation only - NOT used in component implementation)
|
|
8
|
+
* These types are for documentation generation and should not replace inferred SVG types
|
|
9
|
+
*/
|
|
10
|
+
type SpinnerDocsProps = {
|
|
11
|
+
/** Additional CSS classes for custom size, color, or animation speed styling */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** Color of the spinner icon (uses currentColor by default, inherits from parent text color) */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Size of the spinner icon in pixels @default 16 */
|
|
16
|
+
size?: number | string;
|
|
17
|
+
/** Stroke width of the spinner lines @default 2 */
|
|
18
|
+
strokeWidth?: number | string;
|
|
19
|
+
/** Accessible label for screen readers describing the loading state @default "Loading" */
|
|
20
|
+
"aria-label"?: string;
|
|
21
|
+
/** Role attribute for accessibility @default "status" */
|
|
22
|
+
role?: string;
|
|
23
|
+
/** Whether the spinner should be hidden from assistive technologies @default false */
|
|
24
|
+
"aria-hidden"?: boolean | "false" | "true";
|
|
25
|
+
/** Describes the element that is currently loading */
|
|
26
|
+
"aria-describedby"?: string;
|
|
27
|
+
/** Indicates that the region is being updated */
|
|
28
|
+
"aria-live"?: "off" | "polite" | "assertive";
|
|
29
|
+
/** Indicates that the content is currently busy loading @default false */
|
|
30
|
+
"aria-busy"?: boolean;
|
|
31
|
+
/** Style object for inline CSS styling */
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
/** Data attributes for testing or identification */
|
|
34
|
+
[key: `data-${string}`]: string | undefined;
|
|
35
|
+
} & Omit<
|
|
36
|
+
React.SVGProps<SVGSVGElement>,
|
|
37
|
+
"color" | "size" | "strokeWidth" | "children"
|
|
38
|
+
>;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Spinner - Loading indicator with animated rotation
|
|
42
|
+
*
|
|
43
|
+
* A circular loading spinner built on the Lucide React Loader2 icon with smooth rotation
|
|
44
|
+
* animation. Provides visual feedback to users during asynchronous operations such as
|
|
45
|
+
* data fetching, form submissions, or content loading. The spinner is highly customizable
|
|
46
|
+
* through CSS classes and supports all standard SVG props for size, color, and styling.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* // Basic loading spinner with default size (16px)
|
|
51
|
+
* <Spinner />
|
|
52
|
+
*
|
|
53
|
+
* // Custom size using Tailwind size utilities
|
|
54
|
+
* <Spinner className="size-6" />
|
|
55
|
+
* <Spinner className="size-8" />
|
|
56
|
+
* <Spinner className="size-12" />
|
|
57
|
+
*
|
|
58
|
+
* // Custom color using text color classes
|
|
59
|
+
* <Spinner className="text-primary" />
|
|
60
|
+
* <Spinner className="text-destructive" />
|
|
61
|
+
* <Spinner className="text-muted-foreground" />
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* // In loading buttons
|
|
67
|
+
* import { Button } from "./button";
|
|
68
|
+
*
|
|
69
|
+
* <Button disabled>
|
|
70
|
+
* <Spinner className="mr-2 size-4" />
|
|
71
|
+
* Loading...
|
|
72
|
+
* </Button>
|
|
73
|
+
*
|
|
74
|
+
* <Button variant="outline" disabled>
|
|
75
|
+
* <Spinner className="mr-2 size-4" />
|
|
76
|
+
* Processing
|
|
77
|
+
* </Button>
|
|
78
|
+
*
|
|
79
|
+
* // Icon-only loading button
|
|
80
|
+
* <Button size="icon" disabled aria-label="Loading">
|
|
81
|
+
* <Spinner className="size-4" />
|
|
82
|
+
* </Button>
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* // Full-page loading state
|
|
88
|
+
* <div className="flex min-h-screen items-center justify-center">
|
|
89
|
+
* <div className="text-center space-y-4">
|
|
90
|
+
* <Spinner className="size-12 mx-auto" />
|
|
91
|
+
* <p className="text-muted-foreground">Loading your dashboard...</p>
|
|
92
|
+
* </div>
|
|
93
|
+
* </div>
|
|
94
|
+
*
|
|
95
|
+
* // Card loading state
|
|
96
|
+
* <div className="border rounded-lg p-8 flex flex-col items-center gap-3">
|
|
97
|
+
* <Spinner className="size-8" />
|
|
98
|
+
* <p className="text-sm text-muted-foreground">Fetching data...</p>
|
|
99
|
+
* </div>
|
|
100
|
+
*
|
|
101
|
+
* // Inline loading with text
|
|
102
|
+
* <p className="flex items-center gap-2 text-sm">
|
|
103
|
+
* <Spinner className="size-4" />
|
|
104
|
+
* Syncing your data...
|
|
105
|
+
* </p>
|
|
106
|
+
* ```
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```tsx
|
|
110
|
+
* // Custom animation speed
|
|
111
|
+
* // Slow rotation
|
|
112
|
+
* <Spinner className="animate-[spin_2s_linear_infinite]" />
|
|
113
|
+
*
|
|
114
|
+
* // Fast rotation
|
|
115
|
+
* <Spinner className="animate-[spin_0.5s_linear_infinite]" />
|
|
116
|
+
*
|
|
117
|
+
* // Custom size and color combination
|
|
118
|
+
* <Spinner
|
|
119
|
+
* className="size-6 text-blue-500"
|
|
120
|
+
* strokeWidth={3}
|
|
121
|
+
* />
|
|
122
|
+
*
|
|
123
|
+
* // With background overlay
|
|
124
|
+
* <div className="relative">
|
|
125
|
+
* <div className="absolute inset-0 bg-background/50 backdrop-blur-sm flex items-center justify-center rounded-lg">
|
|
126
|
+
* <Spinner className="size-8" />
|
|
127
|
+
* </div>
|
|
128
|
+
* <div>Your content here</div>
|
|
129
|
+
* </div>
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```tsx
|
|
134
|
+
* // Conditional rendering with loading state
|
|
135
|
+
* function DataDisplay() {
|
|
136
|
+
* const [isLoading, setIsLoading] = React.useState(true);
|
|
137
|
+
*
|
|
138
|
+
* return (
|
|
139
|
+
* <div className="space-y-4">
|
|
140
|
+
* {isLoading ? (
|
|
141
|
+
* <div className="flex justify-center p-8">
|
|
142
|
+
* <Spinner className="size-6" />
|
|
143
|
+
* </div>
|
|
144
|
+
* ) : (
|
|
145
|
+
* <div>Loaded content here</div>
|
|
146
|
+
* )}
|
|
147
|
+
* </div>
|
|
148
|
+
* );
|
|
149
|
+
* }
|
|
150
|
+
*
|
|
151
|
+
* // With aria-live region for screen reader announcements
|
|
152
|
+
* <div aria-live="polite" aria-atomic="true">
|
|
153
|
+
* {isLoading && (
|
|
154
|
+
* <div className="flex items-center gap-2">
|
|
155
|
+
* <Spinner className="size-4" />
|
|
156
|
+
* <span>Loading content, please wait...</span>
|
|
157
|
+
* </div>
|
|
158
|
+
* )}
|
|
159
|
+
* </div>
|
|
160
|
+
* ```
|
|
161
|
+
*
|
|
162
|
+
* @accessibility
|
|
163
|
+
* - Includes role="status" by default to announce loading state to screen readers
|
|
164
|
+
* - Default aria-label="Loading" provides context for assistive technologies
|
|
165
|
+
* - Can be customized with custom aria-label for specific loading contexts
|
|
166
|
+
* - Spinner animation respects user's prefers-reduced-motion preferences via Tailwind
|
|
167
|
+
* - For purely decorative spinners in buttons with text labels, consider aria-hidden="true"
|
|
168
|
+
* - When used in loading overlays, ensure parent container has proper aria-live region
|
|
169
|
+
* - Icon inherits color from parent text color (currentColor) for consistent theming
|
|
170
|
+
* - Meets WCAG 2.1 AA standards when used with sufficient color contrast
|
|
171
|
+
* - Consider adding visually hidden text for additional context: <span className="sr-only">Loading...</span>
|
|
172
|
+
*
|
|
173
|
+
* @size
|
|
174
|
+
* The spinner size can be controlled through:
|
|
175
|
+
* - Tailwind size utilities: size-3 (12px), size-4 (16px), size-5 (20px), size-6 (24px), size-8 (32px), size-12 (48px)
|
|
176
|
+
* - Lucide size prop: <Spinner size={24} /> for pixel-based sizing
|
|
177
|
+
* - Custom width/height classes: w-10 h-10 for specific dimensions
|
|
178
|
+
* - Default size is 16px (size-4) when no size is specified
|
|
179
|
+
*
|
|
180
|
+
* @color
|
|
181
|
+
* The spinner color inherits from the parent text color by default:
|
|
182
|
+
* - text-primary for brand colors
|
|
183
|
+
* - text-destructive for error states
|
|
184
|
+
* - text-muted-foreground for subtle loading indicators
|
|
185
|
+
* - text-primary-foreground for use on colored backgrounds
|
|
186
|
+
* - Custom colors via arbitrary values: text-[#FF0000]
|
|
187
|
+
*
|
|
188
|
+
* @animation
|
|
189
|
+
* - Uses Tailwind's animate-spin utility (360° rotation, 1s linear infinite)
|
|
190
|
+
* - Respects prefers-reduced-motion media query automatically
|
|
191
|
+
* - Can be customized with arbitrary animation values for different speeds
|
|
192
|
+
* - Smooth 60fps rotation on modern browsers
|
|
193
|
+
*
|
|
194
|
+
* @see {@link https://lucide.dev/guide/packages/lucide-react} Lucide React documentation
|
|
195
|
+
* @see {@link https://lucide.dev/icons/loader} Loader2 icon details
|
|
196
|
+
* @see {@link https://lucide.dev/guide/advanced/accessibility} Lucide accessibility guide
|
|
197
|
+
* @see {@link Button} Button component for loading button patterns
|
|
198
|
+
* @since 1.0.0
|
|
199
|
+
*/
|
|
200
|
+
function Spinner({ className, ...props }: React.ComponentProps<"svg">) {
|
|
201
|
+
return (
|
|
202
|
+
<Loader2Icon
|
|
203
|
+
role="status"
|
|
204
|
+
aria-label="Loading"
|
|
205
|
+
className={cn("size-4 animate-spin", className)}
|
|
206
|
+
{...props}
|
|
207
|
+
/>
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export { Spinner, type SpinnerDocsProps };
|
|
@@ -475,7 +475,9 @@ const Stack = React.forwardRef<
|
|
|
475
475
|
<div
|
|
476
476
|
ref={ref}
|
|
477
477
|
className={cn(
|
|
478
|
-
direction === "vertical"
|
|
478
|
+
direction === "vertical"
|
|
479
|
+
? "flex flex-col"
|
|
480
|
+
: "flex flex-row items-center",
|
|
479
481
|
{
|
|
480
482
|
"space-y-0": direction === "vertical" && spacing === 0,
|
|
481
483
|
"space-y-1": direction === "vertical" && spacing === 1,
|