@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,525 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot"
|
|
2
|
+
import { cva, type VariantProps } from "class-variance-authority"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Separator } from "@/components/ui/separator"
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Button group variant configuration using class-variance-authority
|
|
9
|
+
*
|
|
10
|
+
* Defines layout orientations and styling for the ButtonGroup container.
|
|
11
|
+
* Manages button borders, border-radius, and spacing to create seamless
|
|
12
|
+
* button group appearances where buttons visually connect together.
|
|
13
|
+
*
|
|
14
|
+
* @variant horizontal - Buttons arranged side-by-side with connected left/right borders
|
|
15
|
+
* @variant vertical - Buttons stacked vertically with connected top/bottom borders
|
|
16
|
+
*
|
|
17
|
+
* @see {@link https://cva.style/docs} CVA documentation
|
|
18
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
19
|
+
* @since 1.0.0
|
|
20
|
+
*/
|
|
21
|
+
const buttonGroupVariants = cva(
|
|
22
|
+
"flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2",
|
|
23
|
+
{
|
|
24
|
+
variants: {
|
|
25
|
+
orientation: {
|
|
26
|
+
horizontal:
|
|
27
|
+
"[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
28
|
+
vertical:
|
|
29
|
+
"flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
orientation: "horizontal",
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Props for ButtonGroup component (Documentation only - NOT used in component implementation)
|
|
40
|
+
* These types are for documentation generation and should not replace CVA inferred types
|
|
41
|
+
*/
|
|
42
|
+
type ButtonGroupDocsProps = {
|
|
43
|
+
/**
|
|
44
|
+
* Layout orientation of the button group
|
|
45
|
+
*
|
|
46
|
+
* - "horizontal": Buttons arranged side-by-side with connected borders (default)
|
|
47
|
+
* - "vertical": Buttons stacked vertically with connected borders
|
|
48
|
+
*
|
|
49
|
+
* @default "horizontal"
|
|
50
|
+
*/
|
|
51
|
+
orientation?: "horizontal" | "vertical"
|
|
52
|
+
/** Additional CSS classes to apply to the button group container */
|
|
53
|
+
className?: string
|
|
54
|
+
/** Button components to group together (typically Button components) */
|
|
55
|
+
children?: React.ReactNode
|
|
56
|
+
/** Accessible label describing the button group's purpose (recommended for screen readers) */
|
|
57
|
+
"aria-label"?: string
|
|
58
|
+
/** ID of element that labels this button group */
|
|
59
|
+
"aria-labelledby"?: string
|
|
60
|
+
/** ID of element that describes this button group */
|
|
61
|
+
"aria-describedby"?: string
|
|
62
|
+
} & React.HTMLAttributes<HTMLDivElement>
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Props for ButtonGroupText component (Documentation only - NOT used in component implementation)
|
|
66
|
+
* These types are for documentation generation and should not replace Radix inferred types
|
|
67
|
+
*/
|
|
68
|
+
type ButtonGroupTextDocsProps = {
|
|
69
|
+
/**
|
|
70
|
+
* Render as a different element instead of a div
|
|
71
|
+
*
|
|
72
|
+
* When true, renders the text container as its child element via Radix UI Slot.
|
|
73
|
+
* Useful for semantic HTML or custom component composition.
|
|
74
|
+
*
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
77
|
+
asChild?: boolean
|
|
78
|
+
/** Additional CSS classes to apply to the text container */
|
|
79
|
+
className?: string
|
|
80
|
+
/** Text content or React nodes to display in the group */
|
|
81
|
+
children?: React.ReactNode
|
|
82
|
+
} & React.HTMLAttributes<HTMLDivElement>
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Props for ButtonGroupSeparator component (Documentation only - NOT used in component implementation)
|
|
86
|
+
* These types are for documentation generation and should not replace Separator inferred types
|
|
87
|
+
*/
|
|
88
|
+
type ButtonGroupSeparatorDocsProps = {
|
|
89
|
+
/**
|
|
90
|
+
* Orientation of the separator line
|
|
91
|
+
*
|
|
92
|
+
* - "vertical": Vertical separator for horizontal button groups (default)
|
|
93
|
+
* - "horizontal": Horizontal separator for vertical button groups
|
|
94
|
+
*
|
|
95
|
+
* Note: Typically use vertical separators in horizontal groups and horizontal separators in vertical groups
|
|
96
|
+
*
|
|
97
|
+
* @default "vertical"
|
|
98
|
+
*/
|
|
99
|
+
orientation?: "horizontal" | "vertical"
|
|
100
|
+
/** Additional CSS classes to apply to the separator */
|
|
101
|
+
className?: string
|
|
102
|
+
/**
|
|
103
|
+
* Whether the separator is purely decorative
|
|
104
|
+
*
|
|
105
|
+
* When true, separator is hidden from assistive technologies
|
|
106
|
+
*
|
|
107
|
+
* @default true
|
|
108
|
+
*/
|
|
109
|
+
decorative?: boolean
|
|
110
|
+
} & React.ComponentProps<typeof Separator>
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* ButtonGroup - Container for grouping related buttons with consistent styling
|
|
114
|
+
*
|
|
115
|
+
* A flexible container component that groups related action buttons together with seamless
|
|
116
|
+
* visual connection. Built for toolbars, pagination controls, action menus, and navigation
|
|
117
|
+
* interfaces. Supports both horizontal and vertical layouts with intelligent border and
|
|
118
|
+
* border-radius management to create cohesive button groups.
|
|
119
|
+
*
|
|
120
|
+
* The component automatically handles:
|
|
121
|
+
* - Border collapsing between adjacent buttons for seamless appearance
|
|
122
|
+
* - Focus state z-index management to ensure proper focus ring visibility
|
|
123
|
+
* - Integration with Button, Input, and Select components
|
|
124
|
+
* - Nested button group support for complex layouts
|
|
125
|
+
* - Responsive sizing that adapts to button content
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* // Basic horizontal button group (most common usage)
|
|
130
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
131
|
+
*
|
|
132
|
+
* <ButtonGroup>
|
|
133
|
+
* <Button variant="outline">Copy</Button>
|
|
134
|
+
* <Button variant="outline">Paste</Button>
|
|
135
|
+
* <Button variant="outline">Cut</Button>
|
|
136
|
+
* </ButtonGroup>
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* // Vertical button group for navigation menus
|
|
142
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
143
|
+
*
|
|
144
|
+
* <ButtonGroup orientation="vertical" aria-label="Navigation menu">
|
|
145
|
+
* <Button variant="outline" className="justify-start">Dashboard</Button>
|
|
146
|
+
* <Button variant="outline" className="justify-start">Projects</Button>
|
|
147
|
+
* <Button variant="outline" className="justify-start">Team</Button>
|
|
148
|
+
* <Button variant="outline" className="justify-start">Settings</Button>
|
|
149
|
+
* </ButtonGroup>
|
|
150
|
+
* ```
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```tsx
|
|
154
|
+
* // Button group with icons and separators
|
|
155
|
+
* import { Copy, Download, Share2 } from "lucide-react"
|
|
156
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
157
|
+
*
|
|
158
|
+
* <ButtonGroup aria-label="Content actions">
|
|
159
|
+
* <Button variant="outline">
|
|
160
|
+
* <Copy className="size-4" />
|
|
161
|
+
* Copy
|
|
162
|
+
* </Button>
|
|
163
|
+
* <ButtonGroupSeparator />
|
|
164
|
+
* <Button variant="outline">
|
|
165
|
+
* <Download className="size-4" />
|
|
166
|
+
* Download
|
|
167
|
+
* </Button>
|
|
168
|
+
* <ButtonGroupSeparator />
|
|
169
|
+
* <Button variant="outline">
|
|
170
|
+
* <Share2 className="size-4" />
|
|
171
|
+
* Share
|
|
172
|
+
* </Button>
|
|
173
|
+
* </ButtonGroup>
|
|
174
|
+
* ```
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```tsx
|
|
178
|
+
* // Pagination controls with text element
|
|
179
|
+
* import { Button, ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
180
|
+
*
|
|
181
|
+
* <ButtonGroup aria-label="Pagination controls">
|
|
182
|
+
* <Button variant="outline" disabled={currentPage === 1}>
|
|
183
|
+
* Previous
|
|
184
|
+
* </Button>
|
|
185
|
+
* <ButtonGroupText>Page {currentPage} of {totalPages}</ButtonGroupText>
|
|
186
|
+
* <Button variant="outline" disabled={currentPage === totalPages}>
|
|
187
|
+
* Next
|
|
188
|
+
* </Button>
|
|
189
|
+
* </ButtonGroup>
|
|
190
|
+
* ```
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```tsx
|
|
194
|
+
* // Toolbar with multiple grouped sections
|
|
195
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
196
|
+
*
|
|
197
|
+
* <div className="flex gap-2" role="toolbar" aria-label="Editor toolbar">
|
|
198
|
+
* <ButtonGroup>
|
|
199
|
+
* <Button variant="outline" size="sm">Bold</Button>
|
|
200
|
+
* <Button variant="outline" size="sm">Italic</Button>
|
|
201
|
+
* <Button variant="outline" size="sm">Underline</Button>
|
|
202
|
+
* </ButtonGroup>
|
|
203
|
+
*
|
|
204
|
+
* <ButtonGroupSeparator orientation="vertical" className="h-8" />
|
|
205
|
+
*
|
|
206
|
+
* <ButtonGroup>
|
|
207
|
+
* <Button variant="outline" size="sm">Left</Button>
|
|
208
|
+
* <Button variant="outline" size="sm">Center</Button>
|
|
209
|
+
* <Button variant="outline" size="sm">Right</Button>
|
|
210
|
+
* </ButtonGroup>
|
|
211
|
+
* </div>
|
|
212
|
+
* ```
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```tsx
|
|
216
|
+
* // Different button sizes in groups
|
|
217
|
+
* import { Button, ButtonGroup } from "@neynar/ui"
|
|
218
|
+
*
|
|
219
|
+
* // Small buttons for compact interfaces
|
|
220
|
+
* <ButtonGroup>
|
|
221
|
+
* <Button variant="outline" size="sm">Small</Button>
|
|
222
|
+
* <Button variant="outline" size="sm">Size</Button>
|
|
223
|
+
* <Button variant="outline" size="sm">Buttons</Button>
|
|
224
|
+
* </ButtonGroup>
|
|
225
|
+
*
|
|
226
|
+
* // Large buttons for prominent actions
|
|
227
|
+
* <ButtonGroup>
|
|
228
|
+
* <Button variant="outline" size="lg">Large</Button>
|
|
229
|
+
* <Button variant="outline" size="lg">Size</Button>
|
|
230
|
+
* <Button variant="outline" size="lg">Buttons</Button>
|
|
231
|
+
* </ButtonGroup>
|
|
232
|
+
*
|
|
233
|
+
* // Icon buttons in group
|
|
234
|
+
* <ButtonGroup>
|
|
235
|
+
* <Button variant="outline" size="icon" aria-label="Bold">
|
|
236
|
+
* <Bold className="size-4" />
|
|
237
|
+
* </Button>
|
|
238
|
+
* <Button variant="outline" size="icon" aria-label="Italic">
|
|
239
|
+
* <Italic className="size-4" />
|
|
240
|
+
* </Button>
|
|
241
|
+
* </ButtonGroup>
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* @accessibility
|
|
245
|
+
* - Container has role="group" for semantic grouping
|
|
246
|
+
* - Use Tab key to navigate between buttons in the group
|
|
247
|
+
* - Each button maintains full keyboard support (Enter/Space activation)
|
|
248
|
+
* - Focus states properly layered with z-index management
|
|
249
|
+
* - Add aria-label to describe the button group's purpose
|
|
250
|
+
* - Icon-only buttons in groups require individual aria-label attributes
|
|
251
|
+
* - Use ButtonGroupText for informative text that shouldn't be actionable
|
|
252
|
+
* - For toolbar layouts, wrap ButtonGroup in element with role="toolbar"
|
|
253
|
+
* - When used for navigation, consider aria-label="Navigation menu"
|
|
254
|
+
*
|
|
255
|
+
* @variant horizontal - Buttons arranged side-by-side with connected left/right borders
|
|
256
|
+
* @variant vertical - Buttons stacked vertically with connected top/bottom borders
|
|
257
|
+
*
|
|
258
|
+
* @see {@link Button} Base button component used within groups
|
|
259
|
+
* @see {@link ButtonGroupSeparator} Visual separator between grouped buttons
|
|
260
|
+
* @see {@link ButtonGroupText} Text element for labels and info within groups
|
|
261
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
262
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/toolbar/} WAI-ARIA Toolbar Pattern
|
|
263
|
+
* @since 1.0.0
|
|
264
|
+
*/
|
|
265
|
+
function ButtonGroup({
|
|
266
|
+
className,
|
|
267
|
+
orientation,
|
|
268
|
+
...props
|
|
269
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof buttonGroupVariants>) {
|
|
270
|
+
return (
|
|
271
|
+
<div
|
|
272
|
+
role="group"
|
|
273
|
+
data-slot="button-group"
|
|
274
|
+
data-orientation={orientation}
|
|
275
|
+
className={cn(buttonGroupVariants({ orientation }), className)}
|
|
276
|
+
{...props}
|
|
277
|
+
/>
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* ButtonGroupText - Text display element for labels and information within button groups
|
|
283
|
+
*
|
|
284
|
+
* A styled text container designed to display non-interactive content within button groups,
|
|
285
|
+
* such as labels, pagination information, or contextual text. Maintains visual consistency
|
|
286
|
+
* with grouped buttons through matching height, border, and styling while being clearly
|
|
287
|
+
* non-interactive with a muted background.
|
|
288
|
+
*
|
|
289
|
+
* Common use cases:
|
|
290
|
+
* - Pagination counters ("Page 1 of 10")
|
|
291
|
+
* - Section labels ("Actions:", "Tools:")
|
|
292
|
+
* - Status indicators or counts
|
|
293
|
+
* - Contextual information between action buttons
|
|
294
|
+
*
|
|
295
|
+
* The component automatically:
|
|
296
|
+
* - Matches button group styling with appropriate borders and spacing
|
|
297
|
+
* - Sizes icons consistently at 16px (size-4)
|
|
298
|
+
* - Maintains visual hierarchy with muted background
|
|
299
|
+
* - Prevents pointer events on icons to avoid interaction confusion
|
|
300
|
+
*
|
|
301
|
+
* @example
|
|
302
|
+
* ```tsx
|
|
303
|
+
* // Pagination with page count display
|
|
304
|
+
* import { Button, ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
305
|
+
*
|
|
306
|
+
* <ButtonGroup aria-label="Pagination">
|
|
307
|
+
* <Button variant="outline" onClick={goToPrevious}>
|
|
308
|
+
* Previous
|
|
309
|
+
* </Button>
|
|
310
|
+
* <ButtonGroupText>
|
|
311
|
+
* Page {currentPage} of {totalPages}
|
|
312
|
+
* </ButtonGroupText>
|
|
313
|
+
* <Button variant="outline" onClick={goToNext}>
|
|
314
|
+
* Next
|
|
315
|
+
* </Button>
|
|
316
|
+
* </ButtonGroup>
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* @example
|
|
320
|
+
* ```tsx
|
|
321
|
+
* // Section label with action buttons
|
|
322
|
+
* import { Copy, Download } from "lucide-react"
|
|
323
|
+
* import { Button, ButtonGroup, ButtonGroupText, ButtonGroupSeparator } from "@neynar/ui"
|
|
324
|
+
*
|
|
325
|
+
* <ButtonGroup>
|
|
326
|
+
* <ButtonGroupText>Actions:</ButtonGroupText>
|
|
327
|
+
* <ButtonGroupSeparator />
|
|
328
|
+
* <Button variant="outline">
|
|
329
|
+
* <Copy className="size-4" />
|
|
330
|
+
* Copy
|
|
331
|
+
* </Button>
|
|
332
|
+
* <Button variant="outline">
|
|
333
|
+
* <Download className="size-4" />
|
|
334
|
+
* Download
|
|
335
|
+
* </Button>
|
|
336
|
+
* </ButtonGroup>
|
|
337
|
+
* ```
|
|
338
|
+
*
|
|
339
|
+
* @example
|
|
340
|
+
* ```tsx
|
|
341
|
+
* // Status indicator with icon
|
|
342
|
+
* import { CheckCircle2 } from "lucide-react"
|
|
343
|
+
* import { ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
344
|
+
*
|
|
345
|
+
* <ButtonGroup>
|
|
346
|
+
* <ButtonGroupText>
|
|
347
|
+
* <CheckCircle2 className="text-green-500" />
|
|
348
|
+
* 3 items selected
|
|
349
|
+
* </ButtonGroupText>
|
|
350
|
+
* <Button variant="outline" onClick={clearSelection}>
|
|
351
|
+
* Clear
|
|
352
|
+
* </Button>
|
|
353
|
+
* </ButtonGroup>
|
|
354
|
+
* ```
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```tsx
|
|
358
|
+
* // Custom composition with asChild
|
|
359
|
+
* import { ButtonGroup, ButtonGroupText } from "@neynar/ui"
|
|
360
|
+
*
|
|
361
|
+
* <ButtonGroup>
|
|
362
|
+
* <Button variant="outline">Action 1</Button>
|
|
363
|
+
* <ButtonGroupText asChild>
|
|
364
|
+
* <span role="status" aria-live="polite">
|
|
365
|
+
* Processing: {progress}%
|
|
366
|
+
* </span>
|
|
367
|
+
* </ButtonGroupText>
|
|
368
|
+
* <Button variant="outline">Action 2</Button>
|
|
369
|
+
* </ButtonGroup>
|
|
370
|
+
* ```
|
|
371
|
+
*
|
|
372
|
+
* @accessibility
|
|
373
|
+
* - Not focusable or interactive (use Button for clickable elements)
|
|
374
|
+
* - Text content automatically accessible to screen readers
|
|
375
|
+
* - Use semantic HTML with asChild for status indicators (role="status", aria-live)
|
|
376
|
+
* - Icons are decorative by default (pointer-events-none)
|
|
377
|
+
* - Maintains sufficient color contrast in muted background
|
|
378
|
+
* - For dynamic content like pagination, consider aria-live regions
|
|
379
|
+
*
|
|
380
|
+
* @see {@link ButtonGroup} Parent container for button groups
|
|
381
|
+
* @see {@link ButtonGroupSeparator} Visual divider between group elements
|
|
382
|
+
* @see {@link Button} Interactive button component for actions
|
|
383
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
384
|
+
* @since 1.0.0
|
|
385
|
+
*/
|
|
386
|
+
function ButtonGroupText({
|
|
387
|
+
className,
|
|
388
|
+
asChild = false,
|
|
389
|
+
...props
|
|
390
|
+
}: React.ComponentProps<"div"> & {
|
|
391
|
+
asChild?: boolean
|
|
392
|
+
}) {
|
|
393
|
+
const Comp = asChild ? Slot : "div"
|
|
394
|
+
|
|
395
|
+
return (
|
|
396
|
+
<Comp
|
|
397
|
+
className={cn(
|
|
398
|
+
"bg-muted flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
399
|
+
className
|
|
400
|
+
)}
|
|
401
|
+
{...props}
|
|
402
|
+
/>
|
|
403
|
+
)
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/**
|
|
407
|
+
* ButtonGroupSeparator - Visual divider for buttons within a button group
|
|
408
|
+
*
|
|
409
|
+
* A specialized separator component that creates visual divisions between buttons or elements
|
|
410
|
+
* within a ButtonGroup. Built on the Separator primitive with automatic sizing and styling
|
|
411
|
+
* to match button group layouts. The separator orientation typically matches the button group
|
|
412
|
+
* orientation (vertical separators in horizontal groups, horizontal separators in vertical groups).
|
|
413
|
+
*
|
|
414
|
+
* Key behaviors:
|
|
415
|
+
* - Self-stretches to match parent height/width automatically
|
|
416
|
+
* - Uses input border color for subtle visual division
|
|
417
|
+
* - Removes margins for seamless integration
|
|
418
|
+
* - Decorative by default (hidden from screen readers)
|
|
419
|
+
*
|
|
420
|
+
* Note: Separators are typically unnecessary for outline variant buttons since they
|
|
421
|
+
* already have visible borders. Use separators with ghost, default, or other variants
|
|
422
|
+
* where the visual separation is needed.
|
|
423
|
+
*
|
|
424
|
+
* @example
|
|
425
|
+
* ```tsx
|
|
426
|
+
* // Horizontal button group with vertical separators
|
|
427
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
428
|
+
*
|
|
429
|
+
* <ButtonGroup>
|
|
430
|
+
* <Button variant="outline">Copy</Button>
|
|
431
|
+
* <ButtonGroupSeparator />
|
|
432
|
+
* <Button variant="outline">Paste</Button>
|
|
433
|
+
* <ButtonGroupSeparator />
|
|
434
|
+
* <Button variant="outline">Cut</Button>
|
|
435
|
+
* </ButtonGroup>
|
|
436
|
+
* ```
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```tsx
|
|
440
|
+
* // Vertical button group with horizontal separators
|
|
441
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
442
|
+
*
|
|
443
|
+
* <ButtonGroup orientation="vertical">
|
|
444
|
+
* <Button variant="outline">Item 1</Button>
|
|
445
|
+
* <ButtonGroupSeparator orientation="horizontal" />
|
|
446
|
+
* <Button variant="outline">Item 2</Button>
|
|
447
|
+
* <ButtonGroupSeparator orientation="horizontal" />
|
|
448
|
+
* <Button variant="outline">Item 3</Button>
|
|
449
|
+
* </ButtonGroup>
|
|
450
|
+
* ```
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```tsx
|
|
454
|
+
* // Separating button group sections in toolbar
|
|
455
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
456
|
+
*
|
|
457
|
+
* <div className="flex gap-2" role="toolbar">
|
|
458
|
+
* <ButtonGroup>
|
|
459
|
+
* <Button variant="outline" size="sm">Bold</Button>
|
|
460
|
+
* <Button variant="outline" size="sm">Italic</Button>
|
|
461
|
+
* </ButtonGroup>
|
|
462
|
+
*
|
|
463
|
+
* <ButtonGroupSeparator orientation="vertical" className="h-8" />
|
|
464
|
+
*
|
|
465
|
+
* <ButtonGroup>
|
|
466
|
+
* <Button variant="outline" size="sm">Left</Button>
|
|
467
|
+
* <Button variant="outline" size="sm">Center</Button>
|
|
468
|
+
* <Button variant="outline" size="sm">Right</Button>
|
|
469
|
+
* </ButtonGroup>
|
|
470
|
+
* </div>
|
|
471
|
+
* ```
|
|
472
|
+
*
|
|
473
|
+
* @example
|
|
474
|
+
* ```tsx
|
|
475
|
+
* // Separator with custom height for specific layouts
|
|
476
|
+
* import { Button, ButtonGroup, ButtonGroupSeparator } from "@neynar/ui"
|
|
477
|
+
*
|
|
478
|
+
* <ButtonGroup>
|
|
479
|
+
* <Button variant="ghost">Action 1</Button>
|
|
480
|
+
* <ButtonGroupSeparator className="h-6" />
|
|
481
|
+
* <Button variant="ghost">Action 2</Button>
|
|
482
|
+
* </ButtonGroup>
|
|
483
|
+
* ```
|
|
484
|
+
*
|
|
485
|
+
* @accessibility
|
|
486
|
+
* - Purely decorative by default (hidden from assistive technologies)
|
|
487
|
+
* - Does not receive keyboard focus
|
|
488
|
+
* - Provides visual separation only
|
|
489
|
+
* - No ARIA attributes needed for typical button group usage
|
|
490
|
+
* - Screen reader users navigate between buttons using Tab key
|
|
491
|
+
*
|
|
492
|
+
* @see {@link ButtonGroup} Parent container for button groups
|
|
493
|
+
* @see {@link ButtonGroupText} Text display element within groups
|
|
494
|
+
* @see {@link Separator} Base separator primitive component
|
|
495
|
+
* @see {@link https://ui.shadcn.com/docs/components/button-group} shadcn/ui button-group documentation
|
|
496
|
+
* @see {@link https://www.radix-ui.com/primitives/docs/components/separator} Radix UI Separator primitive
|
|
497
|
+
* @since 1.0.0
|
|
498
|
+
*/
|
|
499
|
+
function ButtonGroupSeparator({
|
|
500
|
+
className,
|
|
501
|
+
orientation = "vertical",
|
|
502
|
+
...props
|
|
503
|
+
}: React.ComponentProps<typeof Separator>) {
|
|
504
|
+
return (
|
|
505
|
+
<Separator
|
|
506
|
+
data-slot="button-group-separator"
|
|
507
|
+
orientation={orientation}
|
|
508
|
+
className={cn(
|
|
509
|
+
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
510
|
+
className
|
|
511
|
+
)}
|
|
512
|
+
{...props}
|
|
513
|
+
/>
|
|
514
|
+
)
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export {
|
|
518
|
+
ButtonGroup,
|
|
519
|
+
ButtonGroupSeparator,
|
|
520
|
+
ButtonGroupText,
|
|
521
|
+
buttonGroupVariants,
|
|
522
|
+
type ButtonGroupDocsProps,
|
|
523
|
+
type ButtonGroupSeparatorDocsProps,
|
|
524
|
+
type ButtonGroupTextDocsProps,
|
|
525
|
+
}
|
|
@@ -32,16 +32,13 @@ const buttonVariants = cva(
|
|
|
32
32
|
{
|
|
33
33
|
variants: {
|
|
34
34
|
variant: {
|
|
35
|
-
default:
|
|
36
|
-
"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
|
|
35
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
37
36
|
destructive:
|
|
38
|
-
"bg-destructive text-white
|
|
39
|
-
outline:
|
|
40
|
-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
37
|
+
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
38
|
+
outline: "border border-border hover:bg-card",
|
|
41
39
|
secondary:
|
|
42
|
-
"bg-secondary text-secondary-foreground
|
|
43
|
-
ghost:
|
|
44
|
-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
40
|
+
"bg-secondary/80 text-secondary-foreground hover:bg-secondary",
|
|
41
|
+
ghost: "hover:bg-card",
|
|
45
42
|
link: "text-primary underline-offset-4 hover:underline",
|
|
46
43
|
},
|
|
47
44
|
size: {
|
|
@@ -114,7 +111,7 @@ type ButtonDocsProps = {
|
|
|
114
111
|
/** Indicates invalid state for form validation */
|
|
115
112
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling";
|
|
116
113
|
/** Indicates expanded state for disclosure buttons */
|
|
117
|
-
"aria-expanded"?: React.AriaAttributes[
|
|
114
|
+
"aria-expanded"?: React.AriaAttributes["aria-expanded"];
|
|
118
115
|
/** Associates button with elements it controls */
|
|
119
116
|
"aria-controls"?: string;
|
|
120
117
|
/** Indicates pressed state for toggle buttons */
|
|
@@ -140,9 +137,9 @@ type ButtonDocsProps = {
|
|
|
140
137
|
/** Button value for form submission */
|
|
141
138
|
value?: string | ReadonlyArray<string> | number;
|
|
142
139
|
} & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
};
|
|
140
|
+
/** Ref to access the button element */
|
|
141
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
142
|
+
};
|
|
146
143
|
|
|
147
144
|
/**
|
|
148
145
|
* Button - A versatile, accessible button component with multiple style variants
|
|
@@ -267,6 +267,7 @@ type EmptyStateDocsProps = {
|
|
|
267
267
|
* @see {@link https://ui.patterns.build/empty-states} Empty state design patterns
|
|
268
268
|
* @see {@link https://www.nngroup.com/articles/empty-state-interface-design/} Nielsen Norman Group empty state guidelines
|
|
269
269
|
* @since 1.0.0
|
|
270
|
+
* @deprecated Use @neynar/ui Empty component instead
|
|
270
271
|
*/
|
|
271
272
|
const EmptyState = React.forwardRef<
|
|
272
273
|
HTMLDivElement,
|