@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,182 @@
|
|
|
1
|
+
# Spinner
|
|
2
|
+
|
|
3
|
+
**Type**: component
|
|
4
|
+
|
|
5
|
+
Spinner - Loading indicator with animated rotation A circular loading spinner built on the Lucide React Loader2 icon with smooth rotation animation. Provides visual feedback to users during asynchronous operations such as data fetching, form submissions, or content loading. The spinner is highly customizable through CSS classes and supports all standard SVG props for size, color, and styling.
|
|
6
|
+
|
|
7
|
+
## JSX Usage
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import { Spinner } from '@neynar/ui';
|
|
11
|
+
|
|
12
|
+
<Spinner
|
|
13
|
+
className="value"
|
|
14
|
+
color="value"
|
|
15
|
+
size={value}
|
|
16
|
+
strokeWidth={value}
|
|
17
|
+
"aria-label"="value"
|
|
18
|
+
role="value"
|
|
19
|
+
"aria-hidden"={value}
|
|
20
|
+
"aria-describedby"="value"
|
|
21
|
+
"aria-live"={value}
|
|
22
|
+
"aria-busy"={true}
|
|
23
|
+
style={value}
|
|
24
|
+
/>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Component Props
|
|
28
|
+
|
|
29
|
+
### className
|
|
30
|
+
- **Type**: `string`
|
|
31
|
+
- **Required**: No
|
|
32
|
+
- **Description**: No description available
|
|
33
|
+
|
|
34
|
+
### color
|
|
35
|
+
- **Type**: `string`
|
|
36
|
+
- **Required**: No
|
|
37
|
+
- **Description**: No description available
|
|
38
|
+
|
|
39
|
+
### size
|
|
40
|
+
- **Type**: `number | string`
|
|
41
|
+
- **Required**: No
|
|
42
|
+
- **Description**: No description available
|
|
43
|
+
|
|
44
|
+
### strokeWidth
|
|
45
|
+
- **Type**: `number | string`
|
|
46
|
+
- **Required**: No
|
|
47
|
+
- **Description**: No description available
|
|
48
|
+
|
|
49
|
+
### "aria-label"
|
|
50
|
+
- **Type**: `string`
|
|
51
|
+
- **Required**: No
|
|
52
|
+
- **Description**: No description available
|
|
53
|
+
|
|
54
|
+
### role
|
|
55
|
+
- **Type**: `string`
|
|
56
|
+
- **Required**: No
|
|
57
|
+
- **Description**: No description available
|
|
58
|
+
|
|
59
|
+
### "aria-hidden"
|
|
60
|
+
- **Type**: `boolean | "false" | "true"`
|
|
61
|
+
- **Required**: No
|
|
62
|
+
- **Description**: No description available
|
|
63
|
+
|
|
64
|
+
### "aria-describedby"
|
|
65
|
+
- **Type**: `string`
|
|
66
|
+
- **Required**: No
|
|
67
|
+
- **Description**: No description available
|
|
68
|
+
|
|
69
|
+
### "aria-live"
|
|
70
|
+
- **Type**: `"off" | "polite" | "assertive"`
|
|
71
|
+
- **Required**: No
|
|
72
|
+
- **Description**: No description available
|
|
73
|
+
|
|
74
|
+
### "aria-busy"
|
|
75
|
+
- **Type**: `boolean`
|
|
76
|
+
- **Required**: No
|
|
77
|
+
- **Description**: No description available
|
|
78
|
+
|
|
79
|
+
### style
|
|
80
|
+
- **Type**: `React.CSSProperties`
|
|
81
|
+
- **Required**: No
|
|
82
|
+
- **Description**: No description available
|
|
83
|
+
|
|
84
|
+
## Examples
|
|
85
|
+
|
|
86
|
+
### Example 1
|
|
87
|
+
```tsx
|
|
88
|
+
// Basic loading spinner with default size (16px)
|
|
89
|
+
<Spinner />
|
|
90
|
+
// Custom size using Tailwind size utilities
|
|
91
|
+
<Spinner className="size-6" />
|
|
92
|
+
<Spinner className="size-8" />
|
|
93
|
+
<Spinner className="size-12" />
|
|
94
|
+
// Custom color using text color classes
|
|
95
|
+
<Spinner className="text-primary" />
|
|
96
|
+
<Spinner className="text-destructive" />
|
|
97
|
+
<Spinner className="text-muted-foreground" />
|
|
98
|
+
```
|
|
99
|
+
### Example 2
|
|
100
|
+
```tsx
|
|
101
|
+
// In loading buttons
|
|
102
|
+
import { Button } from "./button";
|
|
103
|
+
<Button disabled>
|
|
104
|
+
<Spinner className="mr-2 size-4" />
|
|
105
|
+
Loading...
|
|
106
|
+
</Button>
|
|
107
|
+
<Button variant="outline" disabled>
|
|
108
|
+
<Spinner className="mr-2 size-4" />
|
|
109
|
+
Processing
|
|
110
|
+
</Button>
|
|
111
|
+
// Icon-only loading button
|
|
112
|
+
<Button size="icon" disabled aria-label="Loading">
|
|
113
|
+
<Spinner className="size-4" />
|
|
114
|
+
</Button>
|
|
115
|
+
```
|
|
116
|
+
### Example 3
|
|
117
|
+
```tsx
|
|
118
|
+
// Full-page loading state
|
|
119
|
+
<div className="flex min-h-screen items-center justify-center">
|
|
120
|
+
<div className="text-center space-y-4">
|
|
121
|
+
<Spinner className="size-12 mx-auto" />
|
|
122
|
+
<p className="text-muted-foreground">Loading your dashboard...</p>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
// Card loading state
|
|
126
|
+
<div className="border rounded-lg p-8 flex flex-col items-center gap-3">
|
|
127
|
+
<Spinner className="size-8" />
|
|
128
|
+
<p className="text-sm text-muted-foreground">Fetching data...</p>
|
|
129
|
+
</div>
|
|
130
|
+
// Inline loading with text
|
|
131
|
+
<p className="flex items-center gap-2 text-sm">
|
|
132
|
+
<Spinner className="size-4" />
|
|
133
|
+
Syncing your data...
|
|
134
|
+
</p>
|
|
135
|
+
```
|
|
136
|
+
### Example 4
|
|
137
|
+
```tsx
|
|
138
|
+
// Custom animation speed
|
|
139
|
+
// Slow rotation
|
|
140
|
+
<Spinner className="animate-[spin_2s_linear_infinite]" />
|
|
141
|
+
// Fast rotation
|
|
142
|
+
<Spinner className="animate-[spin_0.5s_linear_infinite]" />
|
|
143
|
+
// Custom size and color combination
|
|
144
|
+
<Spinner
|
|
145
|
+
className="size-6 text-blue-500"
|
|
146
|
+
strokeWidth={3}
|
|
147
|
+
/>
|
|
148
|
+
// With background overlay
|
|
149
|
+
<div className="relative">
|
|
150
|
+
<div className="absolute inset-0 bg-background/50 backdrop-blur-sm flex items-center justify-center rounded-lg">
|
|
151
|
+
<Spinner className="size-8" />
|
|
152
|
+
</div>
|
|
153
|
+
<div>Your content here</div>
|
|
154
|
+
</div>
|
|
155
|
+
```
|
|
156
|
+
### Example 5
|
|
157
|
+
```tsx
|
|
158
|
+
// Conditional rendering with loading state
|
|
159
|
+
function DataDisplay() {
|
|
160
|
+
const [isLoading, setIsLoading] = React.useState(true);
|
|
161
|
+
return (
|
|
162
|
+
<div className="space-y-4">
|
|
163
|
+
{isLoading ? (
|
|
164
|
+
<div className="flex justify-center p-8">
|
|
165
|
+
<Spinner className="size-6" />
|
|
166
|
+
</div>
|
|
167
|
+
) : (
|
|
168
|
+
<div>Loaded content here</div>
|
|
169
|
+
)}
|
|
170
|
+
</div>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
// With aria-live region for screen reader announcements
|
|
174
|
+
<div aria-live="polite" aria-atomic="true">
|
|
175
|
+
{isLoading && (
|
|
176
|
+
<div className="flex items-center gap-2">
|
|
177
|
+
<Spinner className="size-4" />
|
|
178
|
+
<span>Loading content, please wait...</span>
|
|
179
|
+
</div>
|
|
180
|
+
)}
|
|
181
|
+
</div>
|
|
182
|
+
```
|
|
@@ -30,12 +30,7 @@ import { Strong } from '@neynar/ui';
|
|
|
30
30
|
## Component Props
|
|
31
31
|
|
|
32
32
|
### color
|
|
33
|
-
- **Type**:
|
|
34
|
-
| "muted"
|
|
35
|
-
| "accent"
|
|
36
|
-
| "destructive"
|
|
37
|
-
| "success"
|
|
38
|
-
| "warning"`
|
|
33
|
+
- **Type**: `TypographyColor`
|
|
39
34
|
- **Required**: No
|
|
40
35
|
- **Description**: No description available
|
|
41
36
|
|
|
@@ -32,26 +32,12 @@ import { Typography } from '@neynar/ui';
|
|
|
32
32
|
## Component Props
|
|
33
33
|
|
|
34
34
|
### variant
|
|
35
|
-
- **Type**:
|
|
36
|
-
| "subheading"
|
|
37
|
-
| "body"
|
|
38
|
-
| "bodyEmphasized"
|
|
39
|
-
| "details"
|
|
40
|
-
| "field"
|
|
41
|
-
| "code"
|
|
42
|
-
| "microcopy"
|
|
43
|
-
| "tableCell"
|
|
44
|
-
| "tableHeader"`
|
|
35
|
+
- **Type**: `TypographyVariant`
|
|
45
36
|
- **Required**: No
|
|
46
37
|
- **Description**: No description available
|
|
47
38
|
|
|
48
39
|
### color
|
|
49
|
-
- **Type**:
|
|
50
|
-
| "muted"
|
|
51
|
-
| "accent"
|
|
52
|
-
| "destructive"
|
|
53
|
-
| "success"
|
|
54
|
-
| "warning"`
|
|
40
|
+
- **Type**: `TypographyColor`
|
|
55
41
|
- **Required**: No
|
|
56
42
|
- **Description**: No description available
|
|
57
43
|
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import { Separator } from "@/components/ui/separator";
|
|
3
|
+
/**
|
|
4
|
+
* Button group variant configuration using class-variance-authority
|
|
5
|
+
*
|
|
6
|
+
* Defines layout orientations and styling for the ButtonGroup container.
|
|
7
|
+
* Manages button borders, border-radius, and spacing to create seamless
|
|
8
|
+
* button group appearances where buttons visually connect together.
|
|
9
|
+
*
|
|
10
|
+
* @variant horizontal - Buttons arranged side-by-side with connected left/right borders
|
|
11
|
+
* @variant vertical - Buttons stacked vertically with connected top/bottom borders
|
|
12
|
+
*
|
|
13
|
+
* @see {@link https://cva.style/docs} CVA documentation
|
|
14
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
15
|
+
* @since 1.0.0
|
|
16
|
+
*/
|
|
17
|
+
declare const buttonGroupVariants: (props?: ({
|
|
18
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Props for ButtonGroup component (Documentation only - NOT used in component implementation)
|
|
22
|
+
* These types are for documentation generation and should not replace CVA inferred types
|
|
23
|
+
*/
|
|
24
|
+
type ButtonGroupDocsProps = {
|
|
25
|
+
/**
|
|
26
|
+
* Layout orientation of the button group
|
|
27
|
+
*
|
|
28
|
+
* - "horizontal": Buttons arranged side-by-side with connected borders (default)
|
|
29
|
+
* - "vertical": Buttons stacked vertically with connected borders
|
|
30
|
+
*
|
|
31
|
+
* @default "horizontal"
|
|
32
|
+
*/
|
|
33
|
+
orientation?: "horizontal" | "vertical";
|
|
34
|
+
/** Additional CSS classes to apply to the button group container */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Button components to group together (typically Button components) */
|
|
37
|
+
children?: React.ReactNode;
|
|
38
|
+
/** Accessible label describing the button group's purpose (recommended for screen readers) */
|
|
39
|
+
"aria-label"?: string;
|
|
40
|
+
/** ID of element that labels this button group */
|
|
41
|
+
"aria-labelledby"?: string;
|
|
42
|
+
/** ID of element that describes this button group */
|
|
43
|
+
"aria-describedby"?: string;
|
|
44
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
45
|
+
/**
|
|
46
|
+
* Props for ButtonGroupText component (Documentation only - NOT used in component implementation)
|
|
47
|
+
* These types are for documentation generation and should not replace Radix inferred types
|
|
48
|
+
*/
|
|
49
|
+
type ButtonGroupTextDocsProps = {
|
|
50
|
+
/**
|
|
51
|
+
* Render as a different element instead of a div
|
|
52
|
+
*
|
|
53
|
+
* When true, renders the text container as its child element via Radix UI Slot.
|
|
54
|
+
* Useful for semantic HTML or custom component composition.
|
|
55
|
+
*
|
|
56
|
+
* @default false
|
|
57
|
+
*/
|
|
58
|
+
asChild?: boolean;
|
|
59
|
+
/** Additional CSS classes to apply to the text container */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Text content or React nodes to display in the group */
|
|
62
|
+
children?: React.ReactNode;
|
|
63
|
+
} & React.HTMLAttributes<HTMLDivElement>;
|
|
64
|
+
/**
|
|
65
|
+
* Props for ButtonGroupSeparator component (Documentation only - NOT used in component implementation)
|
|
66
|
+
* These types are for documentation generation and should not replace Separator inferred types
|
|
67
|
+
*/
|
|
68
|
+
type ButtonGroupSeparatorDocsProps = {
|
|
69
|
+
/**
|
|
70
|
+
* Orientation of the separator line
|
|
71
|
+
*
|
|
72
|
+
* - "vertical": Vertical separator for horizontal button groups (default)
|
|
73
|
+
* - "horizontal": Horizontal separator for vertical button groups
|
|
74
|
+
*
|
|
75
|
+
* Note: Typically use vertical separators in horizontal groups and horizontal separators in vertical groups
|
|
76
|
+
*
|
|
77
|
+
* @default "vertical"
|
|
78
|
+
*/
|
|
79
|
+
orientation?: "horizontal" | "vertical";
|
|
80
|
+
/** Additional CSS classes to apply to the separator */
|
|
81
|
+
className?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the separator is purely decorative
|
|
84
|
+
*
|
|
85
|
+
* When true, separator is hidden from assistive technologies
|
|
86
|
+
*
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
decorative?: boolean;
|
|
90
|
+
} & React.ComponentProps<typeof Separator>;
|
|
91
|
+
/**
|
|
92
|
+
* ButtonGroup - Container for grouping related buttons with consistent styling
|
|
93
|
+
*
|
|
94
|
+
* A flexible container component that groups related action buttons together with seamless
|
|
95
|
+
* visual connection. Built for toolbars, pagination controls, action menus, and navigation
|
|
96
|
+
* interfaces. Supports both horizontal and vertical layouts with intelligent border and
|
|
97
|
+
* border-radius management to create cohesive button groups.
|
|
98
|
+
*
|
|
99
|
+
* The component automatically handles:
|
|
100
|
+
* - Border collapsing between adjacent buttons for seamless appearance
|
|
101
|
+
* - Focus state z-index management to ensure proper focus ring visibility
|
|
102
|
+
* - Integration with Button, Input, and Select components
|
|
103
|
+
* - Nested button group support for complex layouts
|
|
104
|
+
* - Responsive sizing that adapts to button content
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```tsx
|
|
108
|
+
* // Basic horizontal button group (most common usage)
|
|
109
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
110
|
+
*
|
|
111
|
+
* <ButtonGroup>
|
|
112
|
+
* <Button variant="outline">Copy</Button>
|
|
113
|
+
* <Button variant="outline">Paste</Button>
|
|
114
|
+
* <Button variant="outline">Cut</Button>
|
|
115
|
+
* </ButtonGroup>
|
|
116
|
+
* ```
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* // Vertical button group for navigation menus
|
|
121
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
122
|
+
*
|
|
123
|
+
* <ButtonGroup orientation="vertical" aria-label="Navigation menu">
|
|
124
|
+
* <Button variant="outline" className="justify-start">Dashboard</Button>
|
|
125
|
+
* <Button variant="outline" className="justify-start">Projects</Button>
|
|
126
|
+
* <Button variant="outline" className="justify-start">Team</Button>
|
|
127
|
+
* <Button variant="outline" className="justify-start">Settings</Button>
|
|
128
|
+
* </ButtonGroup>
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```tsx
|
|
133
|
+
* // Button group with icons and separators
|
|
134
|
+
* import { Copy, Download, Share2 } from "lucide-react"
|
|
135
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
136
|
+
*
|
|
137
|
+
* <ButtonGroup aria-label="Content actions">
|
|
138
|
+
* <Button variant="outline">
|
|
139
|
+
* <Copy className="size-4" />
|
|
140
|
+
* Copy
|
|
141
|
+
* </Button>
|
|
142
|
+
* <ButtonGroupSeparator />
|
|
143
|
+
* <Button variant="outline">
|
|
144
|
+
* <Download className="size-4" />
|
|
145
|
+
* Download
|
|
146
|
+
* </Button>
|
|
147
|
+
* <ButtonGroupSeparator />
|
|
148
|
+
* <Button variant="outline">
|
|
149
|
+
* <Share2 className="size-4" />
|
|
150
|
+
* Share
|
|
151
|
+
* </Button>
|
|
152
|
+
* </ButtonGroup>
|
|
153
|
+
* ```
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```tsx
|
|
157
|
+
* // Pagination controls with text element
|
|
158
|
+
* import { Button, ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
159
|
+
*
|
|
160
|
+
* <ButtonGroup aria-label="Pagination controls">
|
|
161
|
+
* <Button variant="outline" disabled={currentPage === 1}>
|
|
162
|
+
* Previous
|
|
163
|
+
* </Button>
|
|
164
|
+
* <ButtonGroupText>Page {currentPage} of {totalPages}</ButtonGroupText>
|
|
165
|
+
* <Button variant="outline" disabled={currentPage === totalPages}>
|
|
166
|
+
* Next
|
|
167
|
+
* </Button>
|
|
168
|
+
* </ButtonGroup>
|
|
169
|
+
* ```
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```tsx
|
|
173
|
+
* // Toolbar with multiple grouped sections
|
|
174
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
175
|
+
*
|
|
176
|
+
* <div className="flex gap-2" role="toolbar" aria-label="Editor toolbar">
|
|
177
|
+
* <ButtonGroup>
|
|
178
|
+
* <Button variant="outline" size="sm">Bold</Button>
|
|
179
|
+
* <Button variant="outline" size="sm">Italic</Button>
|
|
180
|
+
* <Button variant="outline" size="sm">Underline</Button>
|
|
181
|
+
* </ButtonGroup>
|
|
182
|
+
*
|
|
183
|
+
* <ButtonGroupSeparator orientation="vertical" className="h-8" />
|
|
184
|
+
*
|
|
185
|
+
* <ButtonGroup>
|
|
186
|
+
* <Button variant="outline" size="sm">Left</Button>
|
|
187
|
+
* <Button variant="outline" size="sm">Center</Button>
|
|
188
|
+
* <Button variant="outline" size="sm">Right</Button>
|
|
189
|
+
* </ButtonGroup>
|
|
190
|
+
* </div>
|
|
191
|
+
* ```
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```tsx
|
|
195
|
+
* // Different button sizes in groups
|
|
196
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
197
|
+
*
|
|
198
|
+
* // Small buttons for compact interfaces
|
|
199
|
+
* <ButtonGroup>
|
|
200
|
+
* <Button variant="outline" size="sm">Small</Button>
|
|
201
|
+
* <Button variant="outline" size="sm">Size</Button>
|
|
202
|
+
* <Button variant="outline" size="sm">Buttons</Button>
|
|
203
|
+
* </ButtonGroup>
|
|
204
|
+
*
|
|
205
|
+
* // Large buttons for prominent actions
|
|
206
|
+
* <ButtonGroup>
|
|
207
|
+
* <Button variant="outline" size="lg">Large</Button>
|
|
208
|
+
* <Button variant="outline" size="lg">Size</Button>
|
|
209
|
+
* <Button variant="outline" size="lg">Buttons</Button>
|
|
210
|
+
* </ButtonGroup>
|
|
211
|
+
*
|
|
212
|
+
* // Icon buttons in group
|
|
213
|
+
* <ButtonGroup>
|
|
214
|
+
* <Button variant="outline" size="icon" aria-label="Bold">
|
|
215
|
+
* <Bold className="size-4" />
|
|
216
|
+
* </Button>
|
|
217
|
+
* <Button variant="outline" size="icon" aria-label="Italic">
|
|
218
|
+
* <Italic className="size-4" />
|
|
219
|
+
* </Button>
|
|
220
|
+
* </ButtonGroup>
|
|
221
|
+
* ```
|
|
222
|
+
*
|
|
223
|
+
* @accessibility
|
|
224
|
+
* - Container has role="group" for semantic grouping
|
|
225
|
+
* - Use Tab key to navigate between buttons in the group
|
|
226
|
+
* - Each button maintains full keyboard support (Enter/Space activation)
|
|
227
|
+
* - Focus states properly layered with z-index management
|
|
228
|
+
* - Add aria-label to describe the button group's purpose
|
|
229
|
+
* - Icon-only buttons in groups require individual aria-label attributes
|
|
230
|
+
* - Use ButtonGroupText for informative text that shouldn't be actionable
|
|
231
|
+
* - For toolbar layouts, wrap ButtonGroup in element with role="toolbar"
|
|
232
|
+
* - When used for navigation, consider aria-label="Navigation menu"
|
|
233
|
+
*
|
|
234
|
+
* @variant horizontal - Buttons arranged side-by-side with connected left/right borders
|
|
235
|
+
* @variant vertical - Buttons stacked vertically with connected top/bottom borders
|
|
236
|
+
*
|
|
237
|
+
* @see {@link Button} Base button component used within groups
|
|
238
|
+
* @see {@link ButtonGroupSeparator} Visual separator between grouped buttons
|
|
239
|
+
* @see {@link ButtonGroupText} Text element for labels and info within groups
|
|
240
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
241
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/} WAI-ARIA Toolbar Pattern
|
|
242
|
+
* @since 1.0.0
|
|
243
|
+
*/
|
|
244
|
+
declare function ButtonGroup({ className, orientation, ...props }: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>): import("react/jsx-runtime").JSX.Element;
|
|
245
|
+
/**
|
|
246
|
+
* ButtonGroupText - Text display element for labels and information within button groups
|
|
247
|
+
*
|
|
248
|
+
* A styled text container designed to display non-interactive content within button groups,
|
|
249
|
+
* such as labels, pagination information, or contextual text. Maintains visual consistency
|
|
250
|
+
* with grouped buttons through matching height, border, and styling while being clearly
|
|
251
|
+
* non-interactive with a muted background.
|
|
252
|
+
*
|
|
253
|
+
* Common use cases:
|
|
254
|
+
* - Pagination counters ("Page 1 of 10")
|
|
255
|
+
* - Section labels ("Actions:", "Tools:")
|
|
256
|
+
* - Status indicators or counts
|
|
257
|
+
* - Contextual information between action buttons
|
|
258
|
+
*
|
|
259
|
+
* The component automatically:
|
|
260
|
+
* - Matches button group styling with appropriate borders and spacing
|
|
261
|
+
* - Sizes icons consistently at 16px (size-4)
|
|
262
|
+
* - Maintains visual hierarchy with muted background
|
|
263
|
+
* - Prevents pointer events on icons to avoid interaction confusion
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```tsx
|
|
267
|
+
* // Pagination with page count display
|
|
268
|
+
* import { Button, ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
269
|
+
*
|
|
270
|
+
* <ButtonGroup aria-label="Pagination">
|
|
271
|
+
* <Button variant="outline" onClick={goToPrevious}>
|
|
272
|
+
* Previous
|
|
273
|
+
* </Button>
|
|
274
|
+
* <ButtonGroupText>
|
|
275
|
+
* Page {currentPage} of {totalPages}
|
|
276
|
+
* </ButtonGroupText>
|
|
277
|
+
* <Button variant="outline" onClick={goToNext}>
|
|
278
|
+
* Next
|
|
279
|
+
* </Button>
|
|
280
|
+
* </ButtonGroup>
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```tsx
|
|
285
|
+
* // Section label with action buttons
|
|
286
|
+
* import { Copy, Download } from "lucide-react"
|
|
287
|
+
* import { Button, ButtonGroup, ButtonGroupText, ButtonGroupSeparator } from "@neynar/ui"
|
|
288
|
+
*
|
|
289
|
+
* <ButtonGroup>
|
|
290
|
+
* <ButtonGroupText>Actions:</ButtonGroupText>
|
|
291
|
+
* <ButtonGroupSeparator />
|
|
292
|
+
* <Button variant="outline">
|
|
293
|
+
* <Copy className="size-4" />
|
|
294
|
+
* Copy
|
|
295
|
+
* </Button>
|
|
296
|
+
* <Button variant="outline">
|
|
297
|
+
* <Download className="size-4" />
|
|
298
|
+
* Download
|
|
299
|
+
* </Button>
|
|
300
|
+
* </ButtonGroup>
|
|
301
|
+
* ```
|
|
302
|
+
*
|
|
303
|
+
* @example
|
|
304
|
+
* ```tsx
|
|
305
|
+
* // Status indicator with icon
|
|
306
|
+
* import { CheckCircle2 } from "lucide-react"
|
|
307
|
+
* import { ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
308
|
+
*
|
|
309
|
+
* <ButtonGroup>
|
|
310
|
+
* <ButtonGroupText>
|
|
311
|
+
* <CheckCircle2 className="text-green-500" />
|
|
312
|
+
* 3 items selected
|
|
313
|
+
* </ButtonGroupText>
|
|
314
|
+
* <Button variant="outline" onClick={clearSelection}>
|
|
315
|
+
* Clear
|
|
316
|
+
* </Button>
|
|
317
|
+
* </ButtonGroup>
|
|
318
|
+
* ```
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```tsx
|
|
322
|
+
* // Custom composition with asChild
|
|
323
|
+
* import { ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
324
|
+
*
|
|
325
|
+
* <ButtonGroup>
|
|
326
|
+
* <Button variant="outline">Action 1</Button>
|
|
327
|
+
* <ButtonGroupText asChild>
|
|
328
|
+
* <span role="status" aria-live="polite">
|
|
329
|
+
* Processing: {progress}%
|
|
330
|
+
* </span>
|
|
331
|
+
* </ButtonGroupText>
|
|
332
|
+
* <Button variant="outline">Action 2</Button>
|
|
333
|
+
* </ButtonGroup>
|
|
334
|
+
* ```
|
|
335
|
+
*
|
|
336
|
+
* @accessibility
|
|
337
|
+
* - Not focusable or interactive (use Button for clickable elements)
|
|
338
|
+
* - Text content automatically accessible to screen readers
|
|
339
|
+
* - Use semantic HTML with asChild for status indicators (role="status", aria-live)
|
|
340
|
+
* - Icons are decorative by default (pointer-events-none)
|
|
341
|
+
* - Maintains sufficient color contrast in muted background
|
|
342
|
+
* - For dynamic content like pagination, consider aria-live regions
|
|
343
|
+
*
|
|
344
|
+
* @see {@link ButtonGroup} Parent container for button groups
|
|
345
|
+
* @see {@link ButtonGroupSeparator} Visual divider between group elements
|
|
346
|
+
* @see {@link Button} Interactive button component for actions
|
|
347
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
348
|
+
* @since 1.0.0
|
|
349
|
+
*/
|
|
350
|
+
declare function ButtonGroupText({ className, asChild, ...props }: React.ComponentProps<"div"> & {
|
|
351
|
+
asChild?: boolean;
|
|
352
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
353
|
+
/**
|
|
354
|
+
* ButtonGroupSeparator - Visual divider for buttons within a button group
|
|
355
|
+
*
|
|
356
|
+
* A specialized separator component that creates visual divisions between buttons or elements
|
|
357
|
+
* within a ButtonGroup. Built on the Separator primitive with automatic sizing and styling
|
|
358
|
+
* to match button group layouts. The separator orientation typically matches the button group
|
|
359
|
+
* orientation (vertical separators in horizontal groups, horizontal separators in vertical groups).
|
|
360
|
+
*
|
|
361
|
+
* Key behaviors:
|
|
362
|
+
* - Self-stretches to match parent height/width automatically
|
|
363
|
+
* - Uses input border color for subtle visual division
|
|
364
|
+
* - Removes margins for seamless integration
|
|
365
|
+
* - Decorative by default (hidden from screen readers)
|
|
366
|
+
*
|
|
367
|
+
* Note: Separators are typically unnecessary for outline variant buttons since they
|
|
368
|
+
* already have visible borders. Use separators with ghost, default, or other variants
|
|
369
|
+
* where the visual separation is needed.
|
|
370
|
+
*
|
|
371
|
+
* @example
|
|
372
|
+
* ```tsx
|
|
373
|
+
* // Horizontal button group with vertical separators
|
|
374
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
375
|
+
*
|
|
376
|
+
* <ButtonGroup>
|
|
377
|
+
* <Button variant="outline">Copy</Button>
|
|
378
|
+
* <ButtonGroupSeparator />
|
|
379
|
+
* <Button variant="outline">Paste</Button>
|
|
380
|
+
* <ButtonGroupSeparator />
|
|
381
|
+
* <Button variant="outline">Cut</Button>
|
|
382
|
+
* </ButtonGroup>
|
|
383
|
+
* ```
|
|
384
|
+
*
|
|
385
|
+
* @example
|
|
386
|
+
* ```tsx
|
|
387
|
+
* // Vertical button group with horizontal separators
|
|
388
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
389
|
+
*
|
|
390
|
+
* <ButtonGroup orientation="vertical">
|
|
391
|
+
* <Button variant="outline">Item 1</Button>
|
|
392
|
+
* <ButtonGroupSeparator orientation="horizontal" />
|
|
393
|
+
* <Button variant="outline">Item 2</Button>
|
|
394
|
+
* <ButtonGroupSeparator orientation="horizontal" />
|
|
395
|
+
* <Button variant="outline">Item 3</Button>
|
|
396
|
+
* </ButtonGroup>
|
|
397
|
+
* ```
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* ```tsx
|
|
401
|
+
* // Separating button group sections in toolbar
|
|
402
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
403
|
+
*
|
|
404
|
+
* <div className="flex gap-2" role="toolbar">
|
|
405
|
+
* <ButtonGroup>
|
|
406
|
+
* <Button variant="outline" size="sm">Bold</Button>
|
|
407
|
+
* <Button variant="outline" size="sm">Italic</Button>
|
|
408
|
+
* </ButtonGroup>
|
|
409
|
+
*
|
|
410
|
+
* <ButtonGroupSeparator orientation="vertical" className="h-8" />
|
|
411
|
+
*
|
|
412
|
+
* <ButtonGroup>
|
|
413
|
+
* <Button variant="outline" size="sm">Left</Button>
|
|
414
|
+
* <Button variant="outline" size="sm">Center</Button>
|
|
415
|
+
* <Button variant="outline" size="sm">Right</Button>
|
|
416
|
+
* </ButtonGroup>
|
|
417
|
+
* </div>
|
|
418
|
+
* ```
|
|
419
|
+
*
|
|
420
|
+
* @example
|
|
421
|
+
* ```tsx
|
|
422
|
+
* // Separator with custom height for specific layouts
|
|
423
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
424
|
+
*
|
|
425
|
+
* <ButtonGroup>
|
|
426
|
+
* <Button variant="ghost">Action 1</Button>
|
|
427
|
+
* <ButtonGroupSeparator className="h-6" />
|
|
428
|
+
* <Button variant="ghost">Action 2</Button>
|
|
429
|
+
* </ButtonGroup>
|
|
430
|
+
* ```
|
|
431
|
+
*
|
|
432
|
+
* @accessibility
|
|
433
|
+
* - Purely decorative by default (hidden from assistive technologies)
|
|
434
|
+
* - Does not receive keyboard focus
|
|
435
|
+
* - Provides visual separation only
|
|
436
|
+
* - No ARIA attributes needed for typical button group usage
|
|
437
|
+
* - Screen reader users navigate between buttons using Tab key
|
|
438
|
+
*
|
|
439
|
+
* @see {@link ButtonGroup} Parent container for button groups
|
|
440
|
+
* @see {@link ButtonGroupText} Text display element within groups
|
|
441
|
+
* @see {@link Separator} Base separator primitive component
|
|
442
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
443
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/separator} Radix UI Separator primitive
|
|
444
|
+
* @since 1.0.0
|
|
445
|
+
*/
|
|
446
|
+
declare function ButtonGroupSeparator({ className, orientation, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
|
|
447
|
+
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, type ButtonGroupDocsProps, type ButtonGroupSeparatorDocsProps, type ButtonGroupTextDocsProps, };
|
|
448
|
+
//# sourceMappingURL=button-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,mBAAmB;;8EAexB,CAAA;AAED;;;GAGG;AACH,KAAK,oBAAoB,GAAG;IAC1B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,oEAAoE;IACpE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,8FAA8F;IAC9F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,qDAAqD;IACrD,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA;AAExC;;;GAGG;AACH,KAAK,wBAAwB,GAAG;IAC9B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAA;AAExC;;;GAGG;AACH,KAAK,6BAA6B,GAAG;IACnC;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,CAAA;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwJG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,WAAW,EACX,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,mBAAmB,CAAC,2CAUxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGG;AACH,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,2CAYA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4FG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CAYxC;AAED,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,wBAAwB,GAC9B,CAAA"}
|
|
@@ -75,7 +75,7 @@ type ButtonDocsProps = {
|
|
|
75
75
|
/** Indicates invalid state for form validation */
|
|
76
76
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
77
77
|
/** Indicates expanded state for disclosure buttons */
|
|
78
|
-
"aria-expanded"?: React.AriaAttributes[
|
|
78
|
+
"aria-expanded"?: React.AriaAttributes["aria-expanded"];
|
|
79
79
|
/** Associates button with elements it controls */
|
|
80
80
|
"aria-controls"?: string;
|
|
81
81
|
/** Indicates pressed state for toggle buttons */
|